@wordpress/edit-site 5.16.0 → 5.17.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-page/index.js +3 -13
- package/build/components/add-new-page/index.js.map +1 -1
- package/build/components/add-new-pattern/index.js +13 -26
- package/build/components/add-new-pattern/index.js.map +1 -1
- package/build/components/add-new-template/add-custom-generic-template-modal-content.js +1 -11
- package/build/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
- package/build/components/add-new-template/add-custom-template-modal-content.js +9 -28
- package/build/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
- package/build/components/add-new-template/index.js +3 -10
- package/build/components/add-new-template/index.js.map +1 -1
- package/build/components/add-new-template/new-template.js +19 -49
- package/build/components/add-new-template/new-template.js.map +1 -1
- package/build/components/add-new-template/template-actions-loading-screen.js +1 -3
- package/build/components/add-new-template/template-actions-loading-screen.js.map +1 -1
- package/build/components/add-new-template/utils.js +52 -102
- package/build/components/add-new-template/utils.js.map +1 -1
- package/build/components/app/index.js +2 -19
- package/build/components/app/index.js.map +1 -1
- package/build/components/block-editor/back-button.js +1 -11
- package/build/components/block-editor/back-button.js.map +1 -1
- package/build/components/block-editor/block-inspector-button.js +3 -14
- package/build/components/block-editor/block-inspector-button.js.map +1 -1
- package/build/components/block-editor/constants.js.map +1 -1
- package/build/components/block-editor/editor-canvas.js +5 -14
- package/build/components/block-editor/editor-canvas.js.map +1 -1
- package/build/components/block-editor/get-block-editor-provider.js +0 -7
- package/build/components/block-editor/get-block-editor-provider.js.map +1 -1
- package/build/components/block-editor/index.js +10 -15
- package/build/components/block-editor/index.js.map +1 -1
- package/build/components/block-editor/inserter-media-categories.js +30 -45
- package/build/components/block-editor/inserter-media-categories.js.map +1 -1
- package/build/components/block-editor/providers/default-block-editor-provider.js +1 -10
- package/build/components/block-editor/providers/default-block-editor-provider.js.map +1 -1
- package/build/components/block-editor/providers/navigation-block-editor-provider.js +10 -19
- package/build/components/block-editor/providers/navigation-block-editor-provider.js.map +1 -1
- package/build/components/block-editor/resizable-editor.js +3 -8
- package/build/components/block-editor/resizable-editor.js.map +1 -1
- package/build/components/block-editor/resize-handle.js +1 -7
- package/build/components/block-editor/resize-handle.js.map +1 -1
- package/build/components/block-editor/site-editor-canvas.js +6 -22
- package/build/components/block-editor/site-editor-canvas.js.map +1 -1
- package/build/components/block-editor/use-site-editor-settings.js +11 -29
- package/build/components/block-editor/use-site-editor-settings.js.map +1 -1
- package/build/components/canvas-spinner/index.js +31 -5
- package/build/components/canvas-spinner/index.js.map +1 -1
- package/build/components/code-editor/index.js +3 -18
- package/build/components/code-editor/index.js.map +1 -1
- package/build/components/create-template-part-modal/index.js +4 -19
- package/build/components/create-template-part-modal/index.js.map +1 -1
- package/build/components/editor/index.js +30 -46
- package/build/components/editor/index.js.map +1 -1
- package/build/components/editor-canvas-container/index.js +2 -28
- package/build/components/editor-canvas-container/index.js.map +1 -1
- package/build/components/error-boundary/index.js +1 -12
- package/build/components/error-boundary/index.js.map +1 -1
- package/build/components/error-boundary/warning.js +1 -7
- package/build/components/error-boundary/warning.js.map +1 -1
- package/build/components/global-styles/block-preview-panel.js +22 -13
- package/build/components/global-styles/block-preview-panel.js.map +1 -1
- package/build/components/global-styles/color-indicator-wrapper.js +1 -6
- package/build/components/global-styles/color-indicator-wrapper.js.map +1 -1
- package/build/components/global-styles/color-palette-panel.js +1 -8
- package/build/components/global-styles/color-palette-panel.js.map +1 -1
- package/build/components/global-styles/dimensions-panel.js +14 -16
- package/build/components/global-styles/dimensions-panel.js.map +1 -1
- package/build/components/global-styles/global-styles-provider.js +1 -22
- package/build/components/global-styles/global-styles-provider.js.map +1 -1
- package/build/components/global-styles/gradients-palette-panel.js +1 -11
- package/build/components/global-styles/gradients-palette-panel.js.map +1 -1
- package/build/components/global-styles/header.js +3 -7
- package/build/components/global-styles/header.js.map +1 -1
- package/build/components/global-styles/hooks.js +26 -15
- package/build/components/global-styles/hooks.js.map +1 -1
- package/build/components/global-styles/icon-with-current-color.js +1 -5
- package/build/components/global-styles/icon-with-current-color.js.map +1 -1
- package/build/components/global-styles/index.js +0 -2
- package/build/components/global-styles/index.js.map +1 -1
- package/build/components/global-styles/navigation-button.js +3 -7
- package/build/components/global-styles/navigation-button.js.map +1 -1
- package/build/components/global-styles/palette.js +3 -15
- package/build/components/global-styles/palette.js.map +1 -1
- package/build/components/global-styles/preview.js +7 -18
- package/build/components/global-styles/preview.js.map +1 -1
- package/build/components/global-styles/root-menu.js +1 -10
- package/build/components/global-styles/root-menu.js.map +1 -1
- package/build/components/global-styles/screen-block-list.js +10 -32
- package/build/components/global-styles/screen-block-list.js.map +1 -1
- package/build/components/global-styles/screen-block.js +28 -49
- package/build/components/global-styles/screen-block.js.map +1 -1
- package/build/components/global-styles/screen-color-palette.js +1 -9
- package/build/components/global-styles/screen-color-palette.js.map +1 -1
- package/build/components/global-styles/screen-colors.js +2 -14
- package/build/components/global-styles/screen-colors.js.map +1 -1
- package/build/components/global-styles/screen-css.js +1 -10
- package/build/components/global-styles/screen-css.js.map +1 -1
- package/build/components/global-styles/screen-layout.js +2 -13
- package/build/components/global-styles/screen-layout.js.map +1 -1
- package/build/components/global-styles/screen-revisions/index.js +7 -25
- package/build/components/global-styles/screen-revisions/index.js.map +1 -1
- package/build/components/global-styles/screen-revisions/revisions-buttons.js +20 -24
- package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
- package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js +12 -22
- package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
- package/build/components/global-styles/screen-root.js +2 -20
- package/build/components/global-styles/screen-root.js.map +1 -1
- package/build/components/global-styles/screen-style-variations.js +6 -15
- package/build/components/global-styles/screen-style-variations.js.map +1 -1
- package/build/components/global-styles/screen-typography-element.js +2 -12
- package/build/components/global-styles/screen-typography-element.js.map +1 -1
- package/build/components/global-styles/screen-typography.js +4 -17
- package/build/components/global-styles/screen-typography.js.map +1 -1
- package/build/components/global-styles/style-variations-container.js +4 -25
- package/build/components/global-styles/style-variations-container.js.map +1 -1
- package/build/components/global-styles/subtitle.js +1 -4
- package/build/components/global-styles/subtitle.js.map +1 -1
- package/build/components/global-styles/typography-panel.js +1 -7
- package/build/components/global-styles/typography-panel.js.map +1 -1
- package/build/components/global-styles/typography-preview.js +1 -7
- package/build/components/global-styles/typography-preview.js.map +1 -1
- package/build/components/global-styles/ui.js +14 -62
- package/build/components/global-styles/ui.js.map +1 -1
- package/build/components/global-styles/utils.js +0 -2
- package/build/components/global-styles/utils.js.map +1 -1
- package/build/components/global-styles/variations-panel.js +1 -9
- package/build/components/global-styles/variations-panel.js.map +1 -1
- package/build/components/global-styles-renderer/index.js +3 -11
- package/build/components/global-styles-renderer/index.js.map +1 -1
- package/build/components/header-edit-mode/document-actions/index.js +10 -51
- package/build/components/header-edit-mode/document-actions/index.js.map +1 -1
- package/build/components/header-edit-mode/index.js +8 -36
- package/build/components/header-edit-mode/index.js.map +1 -1
- package/build/components/header-edit-mode/mode-switcher/index.js +2 -11
- package/build/components/header-edit-mode/mode-switcher/index.js.map +1 -1
- package/build/components/header-edit-mode/more-menu/copy-content-menu-item.js +1 -14
- package/build/components/header-edit-mode/more-menu/copy-content-menu-item.js.map +1 -1
- package/build/components/header-edit-mode/more-menu/index.js +2 -24
- package/build/components/header-edit-mode/more-menu/index.js.map +1 -1
- package/build/components/header-edit-mode/more-menu/site-export.js +1 -14
- package/build/components/header-edit-mode/more-menu/site-export.js.map +1 -1
- package/build/components/header-edit-mode/more-menu/welcome-guide-menu-item.js +1 -6
- package/build/components/header-edit-mode/more-menu/welcome-guide-menu-item.js.map +1 -1
- package/build/components/header-edit-mode/plugin-more-menu-item/index.js +0 -8
- package/build/components/header-edit-mode/plugin-more-menu-item/index.js.map +1 -1
- package/build/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +3 -4
- package/build/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js.map +1 -1
- package/build/components/header-edit-mode/tools-more-menu-group/index.js +1 -5
- package/build/components/header-edit-mode/tools-more-menu-group/index.js.map +1 -1
- package/build/components/header-edit-mode/undo-redo/redo.js +5 -12
- package/build/components/header-edit-mode/undo-redo/redo.js.map +1 -1
- package/build/components/header-edit-mode/undo-redo/undo.js +5 -12
- package/build/components/header-edit-mode/undo-redo/undo.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/config.js +1 -2
- package/build/components/keyboard-shortcut-help-modal/config.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +1 -8
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/index.js +4 -24
- package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/shortcut.js +1 -5
- package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
- package/build/components/keyboard-shortcuts/edit-mode.js +3 -24
- package/build/components/keyboard-shortcuts/edit-mode.js.map +1 -1
- package/build/components/keyboard-shortcuts/global.js +1 -9
- package/build/components/keyboard-shortcuts/global.js.map +1 -1
- package/build/components/keyboard-shortcuts/register.js +1 -7
- package/build/components/keyboard-shortcuts/register.js.map +1 -1
- package/build/components/layout/hooks.js +2 -9
- package/build/components/layout/hooks.js.map +1 -1
- package/build/components/layout/index.js +17 -50
- package/build/components/layout/index.js.map +1 -1
- package/build/components/list/added-by.js +10 -23
- package/build/components/list/added-by.js.map +1 -1
- package/build/components/list/header.js +1 -10
- package/build/components/list/header.js.map +1 -1
- package/build/components/list/index.js +8 -20
- package/build/components/list/index.js.map +1 -1
- package/build/components/list/table.js +5 -16
- package/build/components/list/table.js.map +1 -1
- package/build/components/list/use-register-shortcuts.js +1 -5
- package/build/components/list/use-register-shortcuts.js.map +1 -1
- package/build/components/page/header.js +1 -3
- package/build/components/page/header.js.map +1 -1
- package/build/components/page/index.js +1 -7
- package/build/components/page/index.js.map +1 -1
- package/build/components/page-actions/index.js +1 -7
- package/build/components/page-actions/index.js.map +1 -1
- package/build/components/page-actions/trash-page-menu-item.js +4 -13
- package/build/components/page-actions/trash-page-menu-item.js.map +1 -1
- package/build/components/page-content-focus-manager/back-to-page-notification.js +1 -9
- package/build/components/page-content-focus-manager/back-to-page-notification.js.map +1 -1
- package/build/components/page-content-focus-manager/disable-non-page-content-blocks.js +7 -17
- package/build/components/page-content-focus-manager/disable-non-page-content-blocks.js.map +1 -1
- package/build/components/page-content-focus-manager/edit-template-notification.js +0 -16
- package/build/components/page-content-focus-manager/edit-template-notification.js.map +1 -1
- package/build/components/page-content-focus-manager/index.js +1 -8
- package/build/components/page-content-focus-manager/index.js.map +1 -1
- package/build/components/page-main/index.js +1 -11
- package/build/components/page-main/index.js.map +1 -1
- package/build/components/page-patterns/duplicate-menu-item.js +22 -49
- package/build/components/page-patterns/duplicate-menu-item.js.map +1 -1
- package/build/components/page-patterns/grid-item.js +12 -32
- package/build/components/page-patterns/grid-item.js.map +1 -1
- package/build/components/page-patterns/grid.js +1 -5
- package/build/components/page-patterns/grid.js.map +1 -1
- package/build/components/page-patterns/header.js +1 -11
- package/build/components/page-patterns/header.js.map +1 -1
- package/build/components/page-patterns/index.js +6 -15
- package/build/components/page-patterns/index.js.map +1 -1
- package/build/components/page-patterns/no-patterns.js +1 -3
- package/build/components/page-patterns/no-patterns.js.map +1 -1
- package/build/components/page-patterns/pagination.js +7 -7
- package/build/components/page-patterns/pagination.js.map +1 -1
- package/build/components/page-patterns/patterns-list.js +1 -23
- package/build/components/page-patterns/patterns-list.js.map +1 -1
- package/build/components/page-patterns/rename-menu-item.js +5 -14
- package/build/components/page-patterns/rename-menu-item.js.map +1 -1
- package/build/components/page-patterns/search-items.js +27 -38
- package/build/components/page-patterns/search-items.js.map +1 -1
- package/build/components/page-patterns/use-pattern-settings.js +5 -10
- package/build/components/page-patterns/use-pattern-settings.js.map +1 -1
- package/build/components/page-patterns/use-patterns.js +15 -34
- package/build/components/page-patterns/use-patterns.js.map +1 -1
- package/build/components/page-patterns/utils.js +0 -2
- package/build/components/page-patterns/utils.js.map +1 -1
- package/build/components/page-template-parts/add-new-template-part.js +1 -13
- package/build/components/page-template-parts/add-new-template-part.js.map +1 -1
- package/build/components/page-template-parts/index.js +1 -13
- package/build/components/page-template-parts/index.js.map +1 -1
- package/build/components/page-templates/index.js +1 -13
- package/build/components/page-templates/index.js.map +1 -1
- package/build/components/plugin-template-setting-panel/index.js +2 -3
- package/build/components/plugin-template-setting-panel/index.js.map +1 -1
- package/build/components/preferences-modal/enable-feature.js +1 -7
- package/build/components/preferences-modal/enable-feature.js.map +1 -1
- package/build/components/preferences-modal/index.js +1 -16
- package/build/components/preferences-modal/index.js.map +1 -1
- package/build/components/resizable-frame/index.js +24 -44
- package/build/components/resizable-frame/index.js.map +1 -1
- package/build/components/revisions/index.js +5 -17
- package/build/components/revisions/index.js.map +1 -1
- package/build/components/routes/link.js +3 -14
- package/build/components/routes/link.js.map +1 -1
- package/build/components/routes/use-title.js +5 -16
- package/build/components/routes/use-title.js.map +1 -1
- package/build/components/save-button/index.js +3 -20
- package/build/components/save-button/index.js.map +1 -1
- package/build/components/save-hub/index.js +7 -29
- package/build/components/save-hub/index.js.map +1 -1
- package/build/components/save-panel/index.js +6 -28
- package/build/components/save-panel/index.js.map +1 -1
- package/build/components/secondary-sidebar/inserter-sidebar.js +1 -9
- package/build/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
- package/build/components/secondary-sidebar/list-view-sidebar.js +21 -32
- package/build/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
- package/build/components/sidebar/index.js +1 -25
- package/build/components/sidebar/index.js.map +1 -1
- package/build/components/sidebar-button/index.js +3 -6
- package/build/components/sidebar-button/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/constants.js.map +1 -1
- package/build/components/sidebar-edit-mode/default-sidebar.js +2 -5
- package/build/components/sidebar-edit-mode/default-sidebar.js.map +1 -1
- package/build/components/sidebar-edit-mode/global-styles-sidebar.js +1 -18
- package/build/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
- package/build/components/sidebar-edit-mode/index.js +1 -24
- package/build/components/sidebar-edit-mode/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/page-panels/edit-template.js +11 -20
- package/build/components/sidebar-edit-mode/page-panels/edit-template.js.map +1 -1
- package/build/components/sidebar-edit-mode/page-panels/index.js +3 -18
- package/build/components/sidebar-edit-mode/page-panels/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/page-panels/page-content.js +1 -6
- package/build/components/sidebar-edit-mode/page-panels/page-content.js.map +1 -1
- package/build/components/sidebar-edit-mode/page-panels/page-status.js +3 -20
- package/build/components/sidebar-edit-mode/page-panels/page-status.js.map +1 -1
- package/build/components/sidebar-edit-mode/page-panels/page-summary.js +1 -6
- package/build/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -1
- package/build/components/sidebar-edit-mode/page-panels/publish-date.js +3 -15
- package/build/components/sidebar-edit-mode/page-panels/publish-date.js.map +1 -1
- package/build/components/sidebar-edit-mode/plugin-sidebar/index.js +0 -5
- package/build/components/sidebar-edit-mode/plugin-sidebar/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/settings-header/index.js +14 -25
- package/build/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/sidebar-card/index.js +1 -5
- package/build/components/sidebar-edit-mode/sidebar-card/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/sidebar-fixed-bottom.js +1 -5
- package/build/components/sidebar-edit-mode/sidebar-fixed-bottom.js.map +1 -1
- package/build/components/sidebar-edit-mode/template-panel/index.js +1 -21
- package/build/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/template-panel/last-revision.js +2 -17
- package/build/components/sidebar-edit-mode/template-panel/last-revision.js.map +1 -1
- package/build/components/sidebar-edit-mode/template-panel/template-actions.js +1 -11
- package/build/components/sidebar-edit-mode/template-panel/template-actions.js.map +1 -1
- package/build/components/sidebar-edit-mode/template-panel/template-areas.js +1 -15
- package/build/components/sidebar-edit-mode/template-panel/template-areas.js.map +1 -1
- package/build/components/sidebar-navigation-item/index.js +1 -7
- package/build/components/sidebar-navigation-item/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen/index.js +2 -19
- package/build/components/sidebar-navigation-screen/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-details-footer/index.js +2 -7
- package/build/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-details-panel/index.js +1 -7
- package/build/components/sidebar-navigation-screen-details-panel/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +1 -3
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -1
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +1 -5
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -1
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +1 -3
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -1
- package/build/components/sidebar-navigation-screen-global-styles/index.js +19 -48
- package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-main/index.js +3 -14
- package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-main/template-part-hint.js +1 -10
- package/build/components/sidebar-navigation-screen-main/template-part-hint.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-item/index.js +1 -13
- package/build/components/sidebar-navigation-screen-navigation-item/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/delete-modal.js +3 -5
- package/build/components/sidebar-navigation-screen-navigation-menu/delete-modal.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/edit-button.js +3 -8
- package/build/components/sidebar-navigation-screen-navigation-menu/edit-button.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/index.js +5 -25
- package/build/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js +5 -16
- package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +1 -13
- package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +3 -8
- package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +1 -10
- package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +12 -33
- package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js +3 -6
- package/build/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/constants.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/index.js +14 -35
- package/build/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +5 -19
- package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +6 -14
- package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
- package/build/components/sidebar-navigation-screen-page/index.js +6 -23
- package/build/components/sidebar-navigation-screen-page/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-page/page-details.js +9 -32
- package/build/components/sidebar-navigation-screen-page/page-details.js.map +1 -1
- package/build/components/sidebar-navigation-screen-page/status-label.js +3 -17
- package/build/components/sidebar-navigation-screen-page/status-label.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pages/index.js +6 -31
- package/build/components/sidebar-navigation-screen-pages/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pattern/index.js +11 -25
- package/build/components/sidebar-navigation-screen-pattern/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js +1 -7
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js +1 -5
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +1 -7
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +5 -10
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +5 -22
- package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js +7 -29
- package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/category-item.js +3 -8
- package/build/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/index.js +4 -22
- package/build/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js +1 -6
- package/build/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/use-my-patterns.js +1 -5
- package/build/components/sidebar-navigation-screen-patterns/use-my-patterns.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +11 -12
- package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/use-template-part-areas.js +6 -8
- package/build/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/use-theme-patterns.js +1 -8
- package/build/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +1 -1
- package/build/components/sidebar-navigation-screen-template/home-template-details.js +7 -31
- package/build/components/sidebar-navigation-screen-template/home-template-details.js.map +1 -1
- package/build/components/sidebar-navigation-screen-template/index.js +1 -20
- package/build/components/sidebar-navigation-screen-template/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-templates/index.js +4 -16
- package/build/components/sidebar-navigation-screen-templates/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-templates-browse/index.js +1 -9
- package/build/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
- package/build/components/site-hub/index.js +4 -21
- package/build/components/site-hub/index.js.map +1 -1
- package/build/components/site-icon/index.js +1 -12
- package/build/components/site-icon/index.js.map +1 -1
- package/build/components/start-template-options/index.js +3 -26
- package/build/components/start-template-options/index.js.map +1 -1
- package/build/components/style-book/index.js +23 -34
- package/build/components/style-book/index.js.map +1 -1
- package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +8 -25
- 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 +5 -13
- 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 +9 -19
- package/build/components/sync-state-with-url/use-sync-path-with-url.js.map +1 -1
- package/build/components/table/index.js +0 -2
- package/build/components/table/index.js.map +1 -1
- package/build/components/template-actions/index.js +2 -21
- package/build/components/template-actions/index.js.map +1 -1
- package/build/components/template-actions/rename-menu-item.js +7 -15
- package/build/components/template-actions/rename-menu-item.js.map +1 -1
- package/build/components/template-part-converter/convert-to-regular.js +1 -8
- package/build/components/template-part-converter/convert-to-regular.js.map +1 -1
- package/build/components/template-part-converter/convert-to-template-part.js +4 -15
- package/build/components/template-part-converter/convert-to-template-part.js.map +1 -1
- package/build/components/template-part-converter/index.js +3 -10
- package/build/components/template-part-converter/index.js.map +1 -1
- package/build/components/use-edited-entity-record/index.js +2 -15
- package/build/components/use-edited-entity-record/index.js.map +1 -1
- package/build/components/welcome-guide/editor.js +1 -10
- package/build/components/welcome-guide/editor.js.map +1 -1
- package/build/components/welcome-guide/image.js +0 -2
- package/build/components/welcome-guide/image.js.map +1 -1
- package/build/components/welcome-guide/index.js +1 -7
- package/build/components/welcome-guide/index.js.map +1 -1
- package/build/components/welcome-guide/page.js +1 -9
- package/build/components/welcome-guide/page.js.map +1 -1
- package/build/components/welcome-guide/styles.js +1 -12
- package/build/components/welcome-guide/styles.js.map +1 -1
- package/build/components/welcome-guide/template.js +1 -9
- package/build/components/welcome-guide/template.js.map +1 -1
- package/build/hooks/commands/use-common-commands.js +132 -122
- package/build/hooks/commands/use-common-commands.js.map +1 -1
- package/build/hooks/commands/use-edit-mode-commands.js +68 -65
- package/build/hooks/commands/use-edit-mode-commands.js.map +1 -1
- package/build/hooks/components.js +1 -2
- package/build/hooks/components.js.map +1 -1
- package/build/hooks/index.js +0 -3
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/navigation-menu-edit.js +11 -24
- package/build/hooks/navigation-menu-edit.js.map +1 -1
- package/build/hooks/push-changes-to-global-styles/index.js +161 -69
- package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
- package/build/hooks/template-part-edit.js +7 -19
- package/build/hooks/template-part-edit.js.map +1 -1
- package/build/index.js +8 -31
- package/build/index.js.map +1 -1
- package/build/lock-unlock.js +1 -2
- package/build/lock-unlock.js.map +1 -1
- package/build/store/actions.js +33 -98
- package/build/store/actions.js.map +1 -1
- package/build/store/constants.js +0 -1
- package/build/store/constants.js.map +1 -1
- package/build/store/index.js +1 -12
- package/build/store/index.js.map +1 -1
- package/build/store/private-actions.js +5 -13
- package/build/store/private-actions.js.map +1 -1
- package/build/store/private-selectors.js +1 -3
- package/build/store/private-selectors.js.map +1 -1
- package/build/store/reducer.js +12 -38
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +23 -60
- package/build/store/selectors.js.map +1 -1
- package/build/store/utils.js +13 -16
- package/build/store/utils.js.map +1 -1
- package/build/utils/get-is-list-page.js +2 -2
- package/build/utils/get-is-list-page.js.map +1 -1
- package/build/utils/is-previewing-theme.js +1 -4
- package/build/utils/is-previewing-theme.js.map +1 -1
- package/build/utils/is-template-removable.js +0 -2
- package/build/utils/is-template-removable.js.map +1 -1
- package/build/utils/is-template-revertable.js +0 -3
- package/build/utils/is-template-revertable.js.map +1 -1
- package/build/utils/template-part-create.js +3 -15
- package/build/utils/template-part-create.js.map +1 -1
- package/build/utils/use-activate-theme.js +2 -5
- package/build/utils/use-activate-theme.js.map +1 -1
- package/build/utils/use-debounced-input.js +1 -3
- package/build/utils/use-debounced-input.js.map +1 -1
- package/build-module/components/add-new-page/index.js +2 -7
- package/build-module/components/add-new-page/index.js.map +1 -1
- package/build-module/components/add-new-pattern/index.js +12 -13
- package/build-module/components/add-new-pattern/index.js.map +1 -1
- package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js +1 -11
- package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
- package/build-module/components/add-new-template/add-custom-template-modal-content.js +9 -21
- package/build-module/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
- package/build-module/components/add-new-template/index.js +3 -6
- package/build-module/components/add-new-template/index.js.map +1 -1
- package/build-module/components/add-new-template/new-template.js +20 -34
- package/build-module/components/add-new-template/new-template.js.map +1 -1
- package/build-module/components/add-new-template/template-actions-loading-screen.js +0 -1
- package/build-module/components/add-new-template/template-actions-loading-screen.js.map +1 -1
- package/build-module/components/add-new-template/utils.js +52 -82
- package/build-module/components/add-new-template/utils.js.map +1 -1
- package/build-module/components/app/index.js +2 -6
- package/build-module/components/app/index.js.map +1 -1
- package/build-module/components/block-editor/back-button.js +1 -6
- package/build-module/components/block-editor/back-button.js.map +1 -1
- package/build-module/components/block-editor/block-inspector-button.js +3 -5
- package/build-module/components/block-editor/block-inspector-button.js.map +1 -1
- package/build-module/components/block-editor/constants.js.map +1 -1
- package/build-module/components/block-editor/editor-canvas.js +6 -8
- package/build-module/components/block-editor/editor-canvas.js.map +1 -1
- package/build-module/components/block-editor/get-block-editor-provider.js +1 -4
- package/build-module/components/block-editor/get-block-editor-provider.js.map +1 -1
- package/build-module/components/block-editor/index.js +10 -6
- package/build-module/components/block-editor/index.js.map +1 -1
- package/build-module/components/block-editor/inserter-media-categories.js +31 -41
- package/build-module/components/block-editor/inserter-media-categories.js.map +1 -1
- package/build-module/components/block-editor/providers/default-block-editor-provider.js +1 -2
- package/build-module/components/block-editor/providers/default-block-editor-provider.js.map +1 -1
- package/build-module/components/block-editor/providers/navigation-block-editor-provider.js +10 -11
- package/build-module/components/block-editor/providers/navigation-block-editor-provider.js.map +1 -1
- package/build-module/components/block-editor/resizable-editor.js +5 -6
- package/build-module/components/block-editor/resizable-editor.js.map +1 -1
- package/build-module/components/block-editor/resize-handle.js +0 -3
- package/build-module/components/block-editor/resize-handle.js.map +1 -1
- package/build-module/components/block-editor/site-editor-canvas.js +5 -8
- package/build-module/components/block-editor/site-editor-canvas.js.map +1 -1
- package/build-module/components/block-editor/use-site-editor-settings.js +10 -23
- package/build-module/components/block-editor/use-site-editor-settings.js.map +1 -1
- package/build-module/components/canvas-spinner/index.js +31 -4
- package/build-module/components/canvas-spinner/index.js.map +1 -1
- package/build-module/components/code-editor/index.js +4 -9
- package/build-module/components/code-editor/index.js.map +1 -1
- package/build-module/components/create-template-part-modal/index.js +4 -8
- package/build-module/components/create-template-part-modal/index.js.map +1 -1
- package/build-module/components/editor/index.js +31 -21
- package/build-module/components/editor/index.js.map +1 -1
- package/build-module/components/editor-canvas-container/index.js +4 -18
- package/build-module/components/editor-canvas-container/index.js.map +1 -1
- package/build-module/components/error-boundary/index.js +1 -7
- package/build-module/components/error-boundary/index.js.map +1 -1
- package/build-module/components/error-boundary/warning.js +0 -3
- package/build-module/components/error-boundary/warning.js.map +1 -1
- package/build-module/components/global-styles/block-preview-panel.js +22 -10
- package/build-module/components/global-styles/block-preview-panel.js.map +1 -1
- package/build-module/components/global-styles/color-indicator-wrapper.js +1 -4
- package/build-module/components/global-styles/color-indicator-wrapper.js.map +1 -1
- package/build-module/components/global-styles/color-palette-panel.js +1 -2
- package/build-module/components/global-styles/color-palette-panel.js.map +1 -1
- package/build-module/components/global-styles/dimensions-panel.js +14 -13
- package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
- package/build-module/components/global-styles/global-styles-provider.js +2 -15
- package/build-module/components/global-styles/global-styles-provider.js.map +1 -1
- package/build-module/components/global-styles/gradients-palette-panel.js +1 -4
- package/build-module/components/global-styles/gradients-palette-panel.js.map +1 -1
- package/build-module/components/global-styles/header.js +2 -4
- package/build-module/components/global-styles/header.js.map +1 -1
- package/build-module/components/global-styles/hooks.js +26 -7
- package/build-module/components/global-styles/hooks.js.map +1 -1
- package/build-module/components/global-styles/icon-with-current-color.js +1 -2
- package/build-module/components/global-styles/icon-with-current-color.js.map +1 -1
- package/build-module/components/global-styles/index.js.map +1 -1
- package/build-module/components/global-styles/navigation-button.js +3 -7
- package/build-module/components/global-styles/navigation-button.js.map +1 -1
- package/build-module/components/global-styles/palette.js +3 -5
- package/build-module/components/global-styles/palette.js.map +1 -1
- package/build-module/components/global-styles/preview.js +7 -14
- package/build-module/components/global-styles/preview.js.map +1 -1
- package/build-module/components/global-styles/root-menu.js +1 -4
- package/build-module/components/global-styles/root-menu.js.map +1 -1
- package/build-module/components/global-styles/screen-block-list.js +10 -20
- package/build-module/components/global-styles/screen-block-list.js.map +1 -1
- package/build-module/components/global-styles/screen-block.js +28 -38
- package/build-module/components/global-styles/screen-block.js.map +1 -1
- package/build-module/components/global-styles/screen-color-palette.js +1 -4
- package/build-module/components/global-styles/screen-color-palette.js.map +1 -1
- package/build-module/components/global-styles/screen-colors.js +2 -6
- package/build-module/components/global-styles/screen-colors.js.map +1 -1
- package/build-module/components/global-styles/screen-css.js +1 -5
- package/build-module/components/global-styles/screen-css.js.map +1 -1
- package/build-module/components/global-styles/screen-layout.js +2 -6
- package/build-module/components/global-styles/screen-layout.js.map +1 -1
- package/build-module/components/global-styles/screen-revisions/index.js +7 -13
- package/build-module/components/global-styles/screen-revisions/index.js.map +1 -1
- package/build-module/components/global-styles/screen-revisions/revisions-buttons.js +22 -22
- package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
- package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js +12 -16
- package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
- package/build-module/components/global-styles/screen-root.js +2 -9
- package/build-module/components/global-styles/screen-root.js.map +1 -1
- package/build-module/components/global-styles/screen-style-variations.js +6 -9
- package/build-module/components/global-styles/screen-style-variations.js.map +1 -1
- package/build-module/components/global-styles/screen-typography-element.js +2 -6
- package/build-module/components/global-styles/screen-typography-element.js.map +1 -1
- package/build-module/components/global-styles/screen-typography.js +4 -8
- package/build-module/components/global-styles/screen-typography.js.map +1 -1
- package/build-module/components/global-styles/style-variations-container.js +5 -15
- package/build-module/components/global-styles/style-variations-container.js.map +1 -1
- package/build-module/components/global-styles/subtitle.js +0 -3
- package/build-module/components/global-styles/subtitle.js.map +1 -1
- package/build-module/components/global-styles/typography-panel.js +1 -4
- package/build-module/components/global-styles/typography-panel.js.map +1 -1
- package/build-module/components/global-styles/typography-preview.js +1 -4
- package/build-module/components/global-styles/typography-preview.js.map +1 -1
- package/build-module/components/global-styles/ui.js +15 -37
- package/build-module/components/global-styles/ui.js.map +1 -1
- package/build-module/components/global-styles/utils.js +0 -1
- package/build-module/components/global-styles/utils.js.map +1 -1
- package/build-module/components/global-styles/variations-panel.js +0 -4
- package/build-module/components/global-styles/variations-panel.js.map +1 -1
- package/build-module/components/global-styles-renderer/index.js +3 -6
- package/build-module/components/global-styles-renderer/index.js.map +1 -1
- package/build-module/components/header-edit-mode/document-actions/index.js +12 -41
- package/build-module/components/header-edit-mode/document-actions/index.js.map +1 -1
- package/build-module/components/header-edit-mode/index.js +9 -18
- package/build-module/components/header-edit-mode/index.js.map +1 -1
- package/build-module/components/header-edit-mode/mode-switcher/index.js +4 -7
- package/build-module/components/header-edit-mode/mode-switcher/index.js.map +1 -1
- package/build-module/components/header-edit-mode/more-menu/copy-content-menu-item.js +1 -6
- package/build-module/components/header-edit-mode/more-menu/copy-content-menu-item.js.map +1 -1
- package/build-module/components/header-edit-mode/more-menu/index.js +2 -6
- package/build-module/components/header-edit-mode/more-menu/index.js.map +1 -1
- package/build-module/components/header-edit-mode/more-menu/site-export.js +1 -6
- package/build-module/components/header-edit-mode/more-menu/site-export.js.map +1 -1
- package/build-module/components/header-edit-mode/more-menu/welcome-guide-menu-item.js +0 -1
- package/build-module/components/header-edit-mode/more-menu/welcome-guide-menu-item.js.map +1 -1
- package/build-module/components/header-edit-mode/plugin-more-menu-item/index.js +1 -2
- package/build-module/components/header-edit-mode/plugin-more-menu-item/index.js.map +1 -1
- package/build-module/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +3 -2
- package/build-module/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js.map +1 -1
- package/build-module/components/header-edit-mode/tools-more-menu-group/index.js +0 -3
- package/build-module/components/header-edit-mode/tools-more-menu-group/index.js.map +1 -1
- package/build-module/components/header-edit-mode/undo-redo/redo.js +4 -5
- package/build-module/components/header-edit-mode/undo-redo/redo.js.map +1 -1
- package/build-module/components/header-edit-mode/undo-redo/undo.js +4 -5
- package/build-module/components/header-edit-mode/undo-redo/undo.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/config.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +1 -4
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/index.js +5 -15
- package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +0 -4
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/edit-mode.js +3 -13
- package/build-module/components/keyboard-shortcuts/edit-mode.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/global.js +1 -6
- package/build-module/components/keyboard-shortcuts/global.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/register.js +0 -2
- package/build-module/components/keyboard-shortcuts/register.js.map +1 -1
- package/build-module/components/layout/hooks.js +2 -4
- package/build-module/components/layout/hooks.js.map +1 -1
- package/build-module/components/layout/index.js +19 -20
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/list/added-by.js +12 -15
- package/build-module/components/list/added-by.js.map +1 -1
- package/build-module/components/list/header.js +1 -4
- package/build-module/components/list/header.js.map +1 -1
- package/build-module/components/list/index.js +8 -6
- package/build-module/components/list/index.js.map +1 -1
- package/build-module/components/list/table.js +5 -7
- package/build-module/components/list/table.js.map +1 -1
- package/build-module/components/list/use-register-shortcuts.js +1 -0
- package/build-module/components/list/use-register-shortcuts.js.map +1 -1
- package/build-module/components/page/header.js +1 -1
- package/build-module/components/page/header.js.map +1 -1
- package/build-module/components/page/index.js +2 -3
- package/build-module/components/page/index.js.map +1 -1
- package/build-module/components/page-actions/index.js +1 -2
- package/build-module/components/page-actions/index.js.map +1 -1
- package/build-module/components/page-actions/trash-page-menu-item.js +3 -6
- package/build-module/components/page-actions/trash-page-menu-item.js.map +1 -1
- package/build-module/components/page-content-focus-manager/back-to-page-notification.js +3 -4
- package/build-module/components/page-content-focus-manager/back-to-page-notification.js.map +1 -1
- package/build-module/components/page-content-focus-manager/disable-non-page-content-blocks.js +6 -9
- package/build-module/components/page-content-focus-manager/disable-non-page-content-blocks.js.map +1 -1
- package/build-module/components/page-content-focus-manager/edit-template-notification.js +2 -12
- package/build-module/components/page-content-focus-manager/edit-template-notification.js.map +1 -1
- package/build-module/components/page-content-focus-manager/index.js +1 -2
- package/build-module/components/page-content-focus-manager/index.js.map +1 -1
- package/build-module/components/page-main/index.js +1 -4
- package/build-module/components/page-main/index.js.map +1 -1
- package/build-module/components/page-patterns/duplicate-menu-item.js +22 -40
- package/build-module/components/page-patterns/duplicate-menu-item.js.map +1 -1
- package/build-module/components/page-patterns/grid-item.js +13 -18
- package/build-module/components/page-patterns/grid-item.js.map +1 -1
- package/build-module/components/page-patterns/grid.js +0 -2
- package/build-module/components/page-patterns/grid.js.map +1 -1
- package/build-module/components/page-patterns/header.js +1 -4
- package/build-module/components/page-patterns/header.js.map +1 -1
- package/build-module/components/page-patterns/index.js +6 -5
- package/build-module/components/page-patterns/index.js.map +1 -1
- package/build-module/components/page-patterns/no-patterns.js +0 -1
- package/build-module/components/page-patterns/no-patterns.js.map +1 -1
- package/build-module/components/page-patterns/pagination.js +6 -4
- package/build-module/components/page-patterns/pagination.js.map +1 -1
- package/build-module/components/page-patterns/patterns-list.js +1 -7
- package/build-module/components/page-patterns/patterns-list.js.map +1 -1
- package/build-module/components/page-patterns/rename-menu-item.js +5 -8
- package/build-module/components/page-patterns/rename-menu-item.js.map +1 -1
- package/build-module/components/page-patterns/search-items.js +28 -32
- package/build-module/components/page-patterns/search-items.js.map +1 -1
- package/build-module/components/page-patterns/use-pattern-settings.js +5 -4
- package/build-module/components/page-patterns/use-pattern-settings.js.map +1 -1
- package/build-module/components/page-patterns/use-patterns.js +15 -24
- package/build-module/components/page-patterns/use-patterns.js.map +1 -1
- package/build-module/components/page-patterns/utils.js.map +1 -1
- package/build-module/components/page-template-parts/add-new-template-part.js +1 -4
- package/build-module/components/page-template-parts/add-new-template-part.js.map +1 -1
- package/build-module/components/page-template-parts/index.js +1 -2
- package/build-module/components/page-template-parts/index.js.map +1 -1
- package/build-module/components/page-templates/index.js +1 -2
- package/build-module/components/page-templates/index.js.map +1 -1
- package/build-module/components/plugin-template-setting-panel/index.js +1 -1
- package/build-module/components/plugin-template-setting-panel/index.js.map +1 -1
- package/build-module/components/preferences-modal/enable-feature.js +0 -3
- package/build-module/components/preferences-modal/enable-feature.js.map +1 -1
- package/build-module/components/preferences-modal/index.js +1 -8
- package/build-module/components/preferences-modal/index.js.map +1 -1
- package/build-module/components/resizable-frame/index.js +27 -38
- package/build-module/components/resizable-frame/index.js.map +1 -1
- package/build-module/components/revisions/index.js +5 -7
- package/build-module/components/revisions/index.js.map +1 -1
- package/build-module/components/routes/link.js +3 -8
- package/build-module/components/routes/link.js.map +1 -1
- package/build-module/components/routes/use-title.js +5 -7
- package/build-module/components/routes/use-title.js.map +1 -1
- package/build-module/components/save-button/index.js +3 -13
- package/build-module/components/save-button/index.js.map +1 -1
- package/build-module/components/save-hub/index.js +7 -16
- package/build-module/components/save-hub/index.js.map +1 -1
- package/build-module/components/save-panel/index.js +7 -17
- package/build-module/components/save-panel/index.js.map +1 -1
- package/build-module/components/secondary-sidebar/inserter-sidebar.js +1 -2
- package/build-module/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
- package/build-module/components/secondary-sidebar/list-view-sidebar.js +21 -19
- package/build-module/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
- package/build-module/components/sidebar/index.js +1 -5
- package/build-module/components/sidebar/index.js.map +1 -1
- package/build-module/components/sidebar-button/index.js +3 -3
- package/build-module/components/sidebar-button/index.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/constants.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/default-sidebar.js +2 -2
- package/build-module/components/sidebar-edit-mode/default-sidebar.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js +1 -6
- package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/index.js +1 -7
- package/build-module/components/sidebar-edit-mode/index.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/page-panels/edit-template.js +11 -13
- package/build-module/components/sidebar-edit-mode/page-panels/edit-template.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/page-panels/index.js +3 -5
- package/build-module/components/sidebar-edit-mode/page-panels/index.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/page-panels/page-content.js +1 -2
- package/build-module/components/sidebar-edit-mode/page-panels/page-content.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/page-panels/page-status.js +2 -11
- package/build-module/components/sidebar-edit-mode/page-panels/page-status.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js +0 -2
- package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/page-panels/publish-date.js +2 -7
- package/build-module/components/sidebar-edit-mode/page-panels/publish-date.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js +2 -3
- package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/settings-header/index.js +15 -17
- package/build-module/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/sidebar-card/index.js +1 -2
- package/build-module/components/sidebar-edit-mode/sidebar-card/index.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/sidebar-fixed-bottom.js +1 -2
- package/build-module/components/sidebar-edit-mode/sidebar-fixed-bottom.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/template-panel/index.js +1 -7
- package/build-module/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/template-panel/last-revision.js +2 -11
- package/build-module/components/sidebar-edit-mode/template-panel/last-revision.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/template-panel/template-actions.js +1 -4
- package/build-module/components/sidebar-edit-mode/template-panel/template-actions.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/template-panel/template-areas.js +1 -10
- package/build-module/components/sidebar-edit-mode/template-panel/template-areas.js.map +1 -1
- package/build-module/components/sidebar-navigation-item/index.js +1 -2
- package/build-module/components/sidebar-navigation-item/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen/index.js +3 -7
- package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-details-footer/index.js +2 -4
- package/build-module/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-details-panel/index.js +1 -4
- package/build-module/components/sidebar-navigation-screen-details-panel/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +0 -1
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +1 -2
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +0 -1
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-global-styles/index.js +19 -30
- package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-main/index.js +3 -3
- package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-main/template-part-hint.js +0 -4
- package/build-module/components/sidebar-navigation-screen-main/template-part-hint.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-item/index.js +1 -2
- package/build-module/components/sidebar-navigation-screen-navigation-item/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-modal.js +2 -2
- package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-modal.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/edit-button.js +2 -3
- package/build-module/components/sidebar-navigation-screen-navigation-menu/edit-button.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js +5 -13
- package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js +5 -9
- package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +1 -7
- package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +2 -6
- package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +0 -2
- package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +11 -28
- package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js +4 -4
- package/build-module/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/constants.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +16 -20
- package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +5 -9
- package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +6 -6
- 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 +6 -6
- package/build-module/components/sidebar-navigation-screen-page/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-page/page-details.js +11 -22
- package/build-module/components/sidebar-navigation-screen-page/page-details.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-page/status-label.js +3 -13
- package/build-module/components/sidebar-navigation-screen-page/status-label.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-pages/index.js +6 -17
- package/build-module/components/sidebar-navigation-screen-pages/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/index.js +11 -12
- package/build-module/components/sidebar-navigation-screen-pattern/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js +1 -2
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js +0 -2
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +1 -2
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +4 -5
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +7 -19
- package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js +8 -18
- package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/category-item.js +2 -4
- package/build-module/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/index.js +4 -7
- package/build-module/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js +1 -2
- package/build-module/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/use-my-patterns.js +0 -1
- package/build-module/components/sidebar-navigation-screen-patterns/use-my-patterns.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +11 -7
- package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.js +5 -5
- package/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/use-theme-patterns.js +1 -2
- package/build-module/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-template/home-template-details.js +7 -18
- package/build-module/components/sidebar-navigation-screen-template/home-template-details.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-template/index.js +0 -6
- package/build-module/components/sidebar-navigation-screen-template/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-templates/index.js +4 -6
- package/build-module/components/sidebar-navigation-screen-templates/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-templates-browse/index.js +1 -2
- package/build-module/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
- package/build-module/components/site-hub/index.js +5 -7
- package/build-module/components/site-hub/index.js.map +1 -1
- package/build-module/components/site-icon/index.js +1 -6
- package/build-module/components/site-icon/index.js.map +1 -1
- package/build-module/components/start-template-options/index.js +3 -14
- package/build-module/components/start-template-options/index.js.map +1 -1
- package/build-module/components/style-book/index.js +24 -24
- package/build-module/components/style-book/index.js.map +1 -1
- package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +8 -15
- 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 -7
- 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 +9 -14
- package/build-module/components/sync-state-with-url/use-sync-path-with-url.js.map +1 -1
- package/build-module/components/table/index.js.map +1 -1
- package/build-module/components/template-actions/index.js +2 -9
- package/build-module/components/template-actions/index.js.map +1 -1
- package/build-module/components/template-actions/rename-menu-item.js +6 -8
- package/build-module/components/template-actions/rename-menu-item.js.map +1 -1
- package/build-module/components/template-part-converter/convert-to-regular.js +0 -3
- package/build-module/components/template-part-converter/convert-to-regular.js.map +1 -1
- package/build-module/components/template-part-converter/convert-to-template-part.js +4 -5
- package/build-module/components/template-part-converter/convert-to-template-part.js.map +1 -1
- package/build-module/components/template-part-converter/index.js +3 -5
- package/build-module/components/template-part-converter/index.js.map +1 -1
- package/build-module/components/use-edited-entity-record/index.js +2 -7
- package/build-module/components/use-edited-entity-record/index.js.map +1 -1
- package/build-module/components/welcome-guide/editor.js +1 -4
- package/build-module/components/welcome-guide/editor.js.map +1 -1
- package/build-module/components/welcome-guide/image.js.map +1 -1
- package/build-module/components/welcome-guide/index.js +0 -1
- package/build-module/components/welcome-guide/index.js.map +1 -1
- package/build-module/components/welcome-guide/page.js +1 -5
- package/build-module/components/welcome-guide/page.js.map +1 -1
- package/build-module/components/welcome-guide/styles.js +1 -5
- package/build-module/components/welcome-guide/styles.js.map +1 -1
- package/build-module/components/welcome-guide/template.js +1 -5
- package/build-module/components/welcome-guide/template.js.map +1 -1
- package/build-module/hooks/commands/use-common-commands.js +133 -108
- package/build-module/hooks/commands/use-common-commands.js.map +1 -1
- package/build-module/hooks/commands/use-edit-mode-commands.js +69 -49
- package/build-module/hooks/commands/use-edit-mode-commands.js.map +1 -1
- package/build-module/hooks/components.js.map +1 -1
- package/build-module/hooks/index.js.map +1 -1
- package/build-module/hooks/navigation-menu-edit.js +11 -14
- package/build-module/hooks/navigation-menu-edit.js.map +1 -1
- package/build-module/hooks/push-changes-to-global-styles/index.js +162 -61
- package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -1
- package/build-module/hooks/template-part-edit.js +7 -9
- package/build-module/hooks/template-part-edit.js.map +1 -1
- package/build-module/index.js +10 -15
- package/build-module/index.js.map +1 -1
- package/build-module/lock-unlock.js.map +1 -1
- package/build-module/store/actions.js +35 -53
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/constants.js.map +1 -1
- package/build-module/store/index.js +1 -1
- package/build-module/store/index.js.map +1 -1
- package/build-module/store/private-actions.js +6 -8
- package/build-module/store/private-actions.js.map +1 -1
- package/build-module/store/private-selectors.js +1 -1
- package/build-module/store/private-selectors.js.map +1 -1
- package/build-module/store/reducer.js +13 -29
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +26 -31
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/store/utils.js +13 -13
- package/build-module/store/utils.js.map +1 -1
- package/build-module/utils/get-is-list-page.js +2 -1
- package/build-module/utils/get-is-list-page.js.map +1 -1
- package/build-module/utils/is-previewing-theme.js +0 -1
- package/build-module/utils/is-previewing-theme.js.map +1 -1
- package/build-module/utils/is-template-removable.js +0 -1
- package/build-module/utils/is-template-removable.js.map +1 -1
- package/build-module/utils/is-template-revertable.js +0 -2
- package/build-module/utils/is-template-revertable.js.map +1 -1
- package/build-module/utils/template-part-create.js +3 -7
- package/build-module/utils/template-part-create.js.map +1 -1
- package/build-module/utils/use-activate-theme.js +2 -2
- package/build-module/utils/use-activate-theme.js.map +1 -1
- package/build-module/utils/use-debounced-input.js.map +1 -1
- package/build-style/style-rtl.css +37 -27
- package/build-style/style.css +37 -27
- package/package.json +41 -40
- package/src/components/add-new-pattern/index.js +4 -3
- package/src/components/block-editor/index.js +4 -3
- package/src/components/block-editor/providers/navigation-block-editor-provider.js +2 -3
- package/src/components/canvas-spinner/index.js +21 -3
- package/src/components/canvas-spinner/style.scss +5 -2
- package/src/components/editor/index.js +15 -1
- package/src/components/global-styles/block-preview-panel.js +26 -15
- package/src/components/global-styles/hooks.js +27 -1
- package/src/components/global-styles/preview.js +3 -13
- package/src/components/global-styles/screen-colors.js +0 -4
- package/src/components/global-styles/screen-layout.js +0 -2
- package/src/components/global-styles/screen-revisions/index.js +6 -4
- package/src/components/global-styles/screen-revisions/revisions-buttons.js +46 -21
- package/src/components/global-styles/screen-revisions/test/use-global-styles-revisions.js +10 -0
- package/src/components/global-styles/screen-revisions/use-global-styles-revisions.js +6 -0
- package/src/components/global-styles/screen-typography.js +0 -4
- package/src/components/global-styles/ui.js +1 -1
- package/src/components/header-edit-mode/document-actions/index.js +13 -26
- package/src/components/header-edit-mode/document-actions/style.scss +17 -4
- package/src/components/header-edit-mode/index.js +1 -1
- package/src/components/header-edit-mode/style.scss +0 -9
- package/src/components/layout/index.js +5 -2
- package/src/components/page-actions/trash-page-menu-item.js +5 -1
- package/src/components/page-content-focus-manager/disable-non-page-content-blocks.js +1 -4
- package/src/components/page-patterns/duplicate-menu-item.js +18 -39
- package/src/components/page-patterns/use-patterns.js +9 -3
- package/src/components/sidebar-edit-mode/default-sidebar.js +1 -0
- package/src/components/sidebar-edit-mode/page-panels/edit-template.js +13 -5
- package/src/components/sidebar-navigation-screen-global-styles/index.js +1 -1
- package/src/components/sidebar-navigation-screen-navigation-menu/index.js +3 -4
- package/src/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +2 -1
- package/src/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +11 -10
- package/src/components/sidebar-navigation-screen-page/index.js +3 -3
- package/src/components/sidebar-navigation-screen-pages/index.js +1 -1
- package/src/components/sidebar-navigation-screen-pattern/index.js +2 -5
- package/src/components/sidebar-navigation-screen-pattern/use-pattern-details.js +0 -3
- package/src/components/sidebar-navigation-screen-patterns/index.js +1 -1
- package/src/components/sidebar-navigation-screen-template/home-template-details.js +4 -2
- package/src/components/sidebar-navigation-screen-templates/index.js +1 -1
- package/src/components/site-hub/index.js +1 -1
- package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +2 -8
- package/src/components/template-actions/index.js +1 -5
- package/src/components/use-edited-entity-record/index.js +1 -6
- package/src/hooks/commands/use-common-commands.js +153 -72
- package/src/hooks/commands/use-edit-mode-commands.js +61 -19
- package/src/hooks/navigation-menu-edit.js +1 -5
- package/src/hooks/push-changes-to-global-styles/index.js +163 -28
- package/src/style.scss +0 -1
- package/build/components/create-pattern-modal/index.js +0 -129
- package/build/components/create-pattern-modal/index.js.map +0 -1
- package/build/utils/normalize-record-key.js +0 -19
- package/build/utils/normalize-record-key.js.map +0 -1
- package/build-module/components/create-pattern-modal/index.js +0 -116
- package/build-module/components/create-pattern-modal/index.js.map +0 -1
- package/build-module/utils/normalize-record-key.js +0 -12
- package/build-module/utils/normalize-record-key.js.map +0 -1
- package/src/components/create-pattern-modal/index.js +0 -136
- package/src/components/create-pattern-modal/style.scss +0 -3
- package/src/utils/normalize-record-key.js +0 -11
- /package/src/components/global-styles/stories/{index.js → index.story.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/screen-block-list.js"],"names":["store","blocksStore","__","sprintf","_n","FlexItem","SearchControl","__experimentalHStack","HStack","useSelect","useState","useMemo","useEffect","useRef","BlockIcon","privateApis","blockEditorPrivateApis","useDebounce","speak","useBlockVariations","ScreenHeader","NavigationButtonAsItem","unlock","useHasDimensionsPanel","useHasTypographyPanel","useHasBorderPanel","useGlobalSetting","useSettingsForBlockElement","useHasColorPanel","useSortedBlockTypes","blockItems","select","getBlockTypes","groupByType","blocks","block","core","noncore","type","name","startsWith","push","coreItems","nonCoreItems","reduce","useBlockHasGlobalStyles","blockName","rawSettings","settings","hasTypographyPanel","hasColorPanel","hasBorderPanel","hasDimensionsPanel","hasLayoutPanel","hasVariationsPanel","length","hasGlobalStyles","BlockMenuItem","hasBlockMenuItem","navigationButtonLabel","title","encodeURIComponent","icon","ScreenBlockList","sortedBlockTypes","filterValue","setFilterValue","debouncedSpeak","isMatchingSearchTerm","filteredBlockTypes","filter","blockType","blockTypesListRef","count","current","childElementCount","resultsFoundMessage","map"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,KAAK,I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,mBAAtB,EAA2CqE,KAA3C,CAFgC,EAGlCA,KAHkC,CAAnC;AAKAN,IAAAA,cAAc,CAAES,mBAAF,EAAuBH,KAAvB,CAAd;AACA,GAnBQ,EAmBN,CAAER,WAAF,EAAeE,cAAf,CAnBM,CAAT;AAqBA,SACC,8BACC,cAAC,YAAD;AACC,IAAA,KAAK,EAAGjE,EAAE,CAAE,QAAF,CADX;AAEC,IAAA,WAAW,EAAGA,EAAE,CACf,qEADe;AAFjB,IADD,EAOC,cAAC,aAAD;AACC,IAAA,uBAAuB,MADxB;AAEC,IAAA,SAAS,EAAC,8BAFX;AAGC,IAAA,QAAQ,EAAGgE,cAHZ;AAIC,IAAA,KAAK,EAAGD,WAJT;AAKC,IAAA,KAAK,EAAG/D,EAAE,CAAE,mBAAF,CALX;AAMC,IAAA,WAAW,EAAGA,EAAE,CAAE,QAAF;AANjB,IAPD,EAeC;AACC,IAAA,GAAG,EAAGsE,iBADP;AAEC,IAAA,SAAS,EAAC;AAFX,KAIGH,kBAAkB,CAACQ,GAAnB,CAA0B1C,KAAF,IACzB,cAAC,aAAD;AACC,IAAA,KAAK,EAAGA,KADT;AAEC,IAAA,GAAG,EAAG,oBAAoBA,KAAK,CAACI;AAFjC,IADC,CAJH,CAfD,CADD;AA6BA;;AAED,eAAewB,eAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { __, sprintf, _n } from '@wordpress/i18n';\nimport {\n\tFlexItem,\n\tSearchControl,\n\t__experimentalHStack as HStack,\n} from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { useState, useMemo, useEffect, useRef } from '@wordpress/element';\nimport {\n\tBlockIcon,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { useDebounce } from '@wordpress/compose';\nimport { speak } from '@wordpress/a11y';\n\n/**\n * Internal dependencies\n */\nimport { useBlockVariations } from './variations-panel';\nimport ScreenHeader from './header';\nimport { NavigationButtonAsItem } from './navigation-button';\nimport { unlock } from '../../lock-unlock';\n\nconst {\n\tuseHasDimensionsPanel,\n\tuseHasTypographyPanel,\n\tuseHasBorderPanel,\n\tuseGlobalSetting,\n\tuseSettingsForBlockElement,\n\tuseHasColorPanel,\n} = unlock( blockEditorPrivateApis );\n\nfunction useSortedBlockTypes() {\n\tconst blockItems = useSelect(\n\t\t( select ) => select( blocksStore ).getBlockTypes(),\n\t\t[]\n\t);\n\t// Ensure core blocks are prioritized in the returned results,\n\t// because third party blocks can be registered earlier than\n\t// the core blocks (usually by using the `init` action),\n\t// thus affecting the display order.\n\t// We don't sort reusable blocks as they are handled differently.\n\tconst groupByType = ( blocks, block ) => {\n\t\tconst { core, noncore } = blocks;\n\t\tconst type = block.name.startsWith( 'core/' ) ? core : noncore;\n\t\ttype.push( block );\n\t\treturn blocks;\n\t};\n\tconst { core: coreItems, noncore: nonCoreItems } = blockItems.reduce(\n\t\tgroupByType,\n\t\t{ core: [], noncore: [] }\n\t);\n\treturn [ ...coreItems, ...nonCoreItems ];\n}\n\nexport function useBlockHasGlobalStyles( blockName ) {\n\tconst [ rawSettings ] = useGlobalSetting( '', blockName );\n\tconst settings = useSettingsForBlockElement( rawSettings, blockName );\n\tconst hasTypographyPanel = useHasTypographyPanel( settings );\n\tconst hasColorPanel = useHasColorPanel( settings );\n\tconst hasBorderPanel = useHasBorderPanel( settings );\n\tconst hasDimensionsPanel = useHasDimensionsPanel( settings );\n\tconst hasLayoutPanel = hasBorderPanel || hasDimensionsPanel;\n\tconst hasVariationsPanel = !! useBlockVariations( blockName )?.length;\n\tconst hasGlobalStyles =\n\t\thasTypographyPanel ||\n\t\thasColorPanel ||\n\t\thasLayoutPanel ||\n\t\thasVariationsPanel;\n\treturn hasGlobalStyles;\n}\n\nfunction BlockMenuItem( { block } ) {\n\tconst hasBlockMenuItem = useBlockHasGlobalStyles( block.name );\n\tif ( ! hasBlockMenuItem ) {\n\t\treturn null;\n\t}\n\n\tconst navigationButtonLabel = sprintf(\n\t\t// translators: %s: is the name of a block e.g., 'Image' or 'Table'.\n\t\t__( '%s block styles' ),\n\t\tblock.title\n\t);\n\n\treturn (\n\t\t<NavigationButtonAsItem\n\t\t\tpath={ '/blocks/' + encodeURIComponent( block.name ) }\n\t\t\taria-label={ navigationButtonLabel }\n\t\t>\n\t\t\t<HStack justify=\"flex-start\">\n\t\t\t\t<BlockIcon icon={ block.icon } />\n\t\t\t\t<FlexItem>{ block.title }</FlexItem>\n\t\t\t</HStack>\n\t\t</NavigationButtonAsItem>\n\t);\n}\n\nfunction ScreenBlockList() {\n\tconst sortedBlockTypes = useSortedBlockTypes();\n\tconst [ filterValue, setFilterValue ] = useState( '' );\n\tconst debouncedSpeak = useDebounce( speak, 500 );\n\tconst isMatchingSearchTerm = useSelect(\n\t\t( select ) => select( blocksStore ).isMatchingSearchTerm,\n\t\t[]\n\t);\n\tconst filteredBlockTypes = useMemo( () => {\n\t\tif ( ! filterValue ) {\n\t\t\treturn sortedBlockTypes;\n\t\t}\n\t\treturn sortedBlockTypes.filter( ( blockType ) =>\n\t\t\tisMatchingSearchTerm( blockType, filterValue )\n\t\t);\n\t}, [ filterValue, sortedBlockTypes, isMatchingSearchTerm ] );\n\n\tconst blockTypesListRef = useRef();\n\n\t// Announce search results on change\n\tuseEffect( () => {\n\t\tif ( ! filterValue ) {\n\t\t\treturn;\n\t\t}\n\t\t// We extract the results from the wrapper div's `ref` because\n\t\t// filtered items can contain items that will eventually not\n\t\t// render and there is no reliable way to detect when a child\n\t\t// will return `null`.\n\t\t// TODO: We should find a better way of handling this as it's\n\t\t// fragile and depends on the number of rendered elements of `BlockMenuItem`,\n\t\t// which is now one.\n\t\t// @see https://github.com/WordPress/gutenberg/pull/39117#discussion_r816022116\n\t\tconst count = blockTypesListRef.current.childElementCount;\n\t\tconst resultsFoundMessage = sprintf(\n\t\t\t/* translators: %d: number of results. */\n\t\t\t_n( '%d result found.', '%d results found.', count ),\n\t\t\tcount\n\t\t);\n\t\tdebouncedSpeak( resultsFoundMessage, count );\n\t}, [ filterValue, debouncedSpeak ] );\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Blocks' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Customize the appearance of specific blocks and for the whole site.'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<SearchControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\tclassName=\"edit-site-block-types-search\"\n\t\t\t\tonChange={ setFilterValue }\n\t\t\t\tvalue={ filterValue }\n\t\t\t\tlabel={ __( 'Search for blocks' ) }\n\t\t\t\tplaceholder={ __( 'Search' ) }\n\t\t\t/>\n\t\t\t<div\n\t\t\t\tref={ blockTypesListRef }\n\t\t\t\tclassName=\"edit-site-block-types-item-list\"\n\t\t\t>\n\t\t\t\t{ filteredBlockTypes.map( ( block ) => (\n\t\t\t\t\t<BlockMenuItem\n\t\t\t\t\t\tblock={ block }\n\t\t\t\t\t\tkey={ 'menu-itemblock-' + block.name }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default ScreenBlockList;\n"]}
|
|
1
|
+
{"version":3,"names":["store","blocksStore","__","sprintf","_n","FlexItem","SearchControl","__experimentalHStack","HStack","useSelect","useState","useMemo","useEffect","useRef","BlockIcon","privateApis","blockEditorPrivateApis","useDebounce","speak","useBlockVariations","ScreenHeader","NavigationButtonAsItem","unlock","useHasDimensionsPanel","useHasTypographyPanel","useHasBorderPanel","useGlobalSetting","useSettingsForBlockElement","useHasColorPanel","useSortedBlockTypes","blockItems","select","getBlockTypes","groupByType","blocks","block","core","noncore","type","name","startsWith","push","coreItems","nonCoreItems","reduce","useBlockHasGlobalStyles","blockName","rawSettings","settings","hasTypographyPanel","hasColorPanel","hasBorderPanel","hasDimensionsPanel","hasLayoutPanel","hasVariationsPanel","length","hasGlobalStyles","BlockMenuItem","hasBlockMenuItem","navigationButtonLabel","title","createElement","path","encodeURIComponent","justify","icon","ScreenBlockList","sortedBlockTypes","filterValue","setFilterValue","debouncedSpeak","isMatchingSearchTerm","filteredBlockTypes","filter","blockType","blockTypesListRef","count","current","childElementCount","resultsFoundMessage","Fragment","description","__nextHasNoMarginBottom","className","onChange","value","label","placeholder","ref","map","key"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-block-list.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { __, sprintf, _n } from '@wordpress/i18n';\nimport {\n\tFlexItem,\n\tSearchControl,\n\t__experimentalHStack as HStack,\n} from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { useState, useMemo, useEffect, useRef } from '@wordpress/element';\nimport {\n\tBlockIcon,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { useDebounce } from '@wordpress/compose';\nimport { speak } from '@wordpress/a11y';\n\n/**\n * Internal dependencies\n */\nimport { useBlockVariations } from './variations-panel';\nimport ScreenHeader from './header';\nimport { NavigationButtonAsItem } from './navigation-button';\nimport { unlock } from '../../lock-unlock';\n\nconst {\n\tuseHasDimensionsPanel,\n\tuseHasTypographyPanel,\n\tuseHasBorderPanel,\n\tuseGlobalSetting,\n\tuseSettingsForBlockElement,\n\tuseHasColorPanel,\n} = unlock( blockEditorPrivateApis );\n\nfunction useSortedBlockTypes() {\n\tconst blockItems = useSelect(\n\t\t( select ) => select( blocksStore ).getBlockTypes(),\n\t\t[]\n\t);\n\t// Ensure core blocks are prioritized in the returned results,\n\t// because third party blocks can be registered earlier than\n\t// the core blocks (usually by using the `init` action),\n\t// thus affecting the display order.\n\t// We don't sort reusable blocks as they are handled differently.\n\tconst groupByType = ( blocks, block ) => {\n\t\tconst { core, noncore } = blocks;\n\t\tconst type = block.name.startsWith( 'core/' ) ? core : noncore;\n\t\ttype.push( block );\n\t\treturn blocks;\n\t};\n\tconst { core: coreItems, noncore: nonCoreItems } = blockItems.reduce(\n\t\tgroupByType,\n\t\t{ core: [], noncore: [] }\n\t);\n\treturn [ ...coreItems, ...nonCoreItems ];\n}\n\nexport function useBlockHasGlobalStyles( blockName ) {\n\tconst [ rawSettings ] = useGlobalSetting( '', blockName );\n\tconst settings = useSettingsForBlockElement( rawSettings, blockName );\n\tconst hasTypographyPanel = useHasTypographyPanel( settings );\n\tconst hasColorPanel = useHasColorPanel( settings );\n\tconst hasBorderPanel = useHasBorderPanel( settings );\n\tconst hasDimensionsPanel = useHasDimensionsPanel( settings );\n\tconst hasLayoutPanel = hasBorderPanel || hasDimensionsPanel;\n\tconst hasVariationsPanel = !! useBlockVariations( blockName )?.length;\n\tconst hasGlobalStyles =\n\t\thasTypographyPanel ||\n\t\thasColorPanel ||\n\t\thasLayoutPanel ||\n\t\thasVariationsPanel;\n\treturn hasGlobalStyles;\n}\n\nfunction BlockMenuItem( { block } ) {\n\tconst hasBlockMenuItem = useBlockHasGlobalStyles( block.name );\n\tif ( ! hasBlockMenuItem ) {\n\t\treturn null;\n\t}\n\n\tconst navigationButtonLabel = sprintf(\n\t\t// translators: %s: is the name of a block e.g., 'Image' or 'Table'.\n\t\t__( '%s block styles' ),\n\t\tblock.title\n\t);\n\n\treturn (\n\t\t<NavigationButtonAsItem\n\t\t\tpath={ '/blocks/' + encodeURIComponent( block.name ) }\n\t\t\taria-label={ navigationButtonLabel }\n\t\t>\n\t\t\t<HStack justify=\"flex-start\">\n\t\t\t\t<BlockIcon icon={ block.icon } />\n\t\t\t\t<FlexItem>{ block.title }</FlexItem>\n\t\t\t</HStack>\n\t\t</NavigationButtonAsItem>\n\t);\n}\n\nfunction ScreenBlockList() {\n\tconst sortedBlockTypes = useSortedBlockTypes();\n\tconst [ filterValue, setFilterValue ] = useState( '' );\n\tconst debouncedSpeak = useDebounce( speak, 500 );\n\tconst isMatchingSearchTerm = useSelect(\n\t\t( select ) => select( blocksStore ).isMatchingSearchTerm,\n\t\t[]\n\t);\n\tconst filteredBlockTypes = useMemo( () => {\n\t\tif ( ! filterValue ) {\n\t\t\treturn sortedBlockTypes;\n\t\t}\n\t\treturn sortedBlockTypes.filter( ( blockType ) =>\n\t\t\tisMatchingSearchTerm( blockType, filterValue )\n\t\t);\n\t}, [ filterValue, sortedBlockTypes, isMatchingSearchTerm ] );\n\n\tconst blockTypesListRef = useRef();\n\n\t// Announce search results on change\n\tuseEffect( () => {\n\t\tif ( ! filterValue ) {\n\t\t\treturn;\n\t\t}\n\t\t// We extract the results from the wrapper div's `ref` because\n\t\t// filtered items can contain items that will eventually not\n\t\t// render and there is no reliable way to detect when a child\n\t\t// will return `null`.\n\t\t// TODO: We should find a better way of handling this as it's\n\t\t// fragile and depends on the number of rendered elements of `BlockMenuItem`,\n\t\t// which is now one.\n\t\t// @see https://github.com/WordPress/gutenberg/pull/39117#discussion_r816022116\n\t\tconst count = blockTypesListRef.current.childElementCount;\n\t\tconst resultsFoundMessage = sprintf(\n\t\t\t/* translators: %d: number of results. */\n\t\t\t_n( '%d result found.', '%d results found.', count ),\n\t\t\tcount\n\t\t);\n\t\tdebouncedSpeak( resultsFoundMessage, count );\n\t}, [ filterValue, debouncedSpeak ] );\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Blocks' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Customize the appearance of specific blocks and for the whole site.'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<SearchControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\tclassName=\"edit-site-block-types-search\"\n\t\t\t\tonChange={ setFilterValue }\n\t\t\t\tvalue={ filterValue }\n\t\t\t\tlabel={ __( 'Search for blocks' ) }\n\t\t\t\tplaceholder={ __( 'Search' ) }\n\t\t\t/>\n\t\t\t<div\n\t\t\t\tref={ blockTypesListRef }\n\t\t\t\tclassName=\"edit-site-block-types-item-list\"\n\t\t\t>\n\t\t\t\t{ filteredBlockTypes.map( ( block ) => (\n\t\t\t\t\t<BlockMenuItem\n\t\t\t\t\t\tblock={ block }\n\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GD,iBAAiB,CAACE,OAAO,CAACC,iBAAiB;IACzD,MAAMC,mBAAmB,GAAG5E,OAAO,EAClC;IACAC,EAAE,CAAE,kBAAkB,EAAE,mBAAmB,EAAEwE,KAAM,CAAC,EACpDA,KACD,CAAC;IACDN,cAAc,CAAES,mBAAmB,EAAEH,KAAM,CAAC;EAC7C,CAAC,EAAE,CAAER,WAAW,EAAEE,cAAc,CAAG,CAAC;EAEpC,OACCT,aAAA,CAAAmB,QAAA,QACCnB,aAAA,CAACzC,YAAY;IACZwC,KAAK,EAAG1D,EAAE,CAAE,QAAS,CAAG;IACxB+E,WAAW,EAAG/E,EAAE,CACf,qEACD;EAAG,CACH,CAAC,EACF2D,aAAA,CAACvD,aAAa;IACb4E,uBAAuB;IACvBC,SAAS,EAAC,8BAA8B;IACxCC,QAAQ,EAAGf,cAAgB;IAC3BgB,KAAK,EAAGjB,WAAa;IACrBkB,KAAK,EAAGpF,EAAE,CAAE,mBAAoB,CAAG;IACnCqF,WAAW,EAAGrF,EAAE,CAAE,QAAS;EAAG,CAC9B,CAAC,EACF2D,aAAA;IACC2B,GAAG,EAAGb,iBAAmB;IACzBQ,SAAS,EAAC;EAAiC,GAEzCX,kBAAkB,CAACiB,GAAG,CAAItD,KAAK,IAChC0B,aAAA,CAACJ,aAAa;IACbtB,KAAK,EAAGA,KAAO;IACfuD,GAAG,EAAG,iBAAiB,GAAGvD,KAAK,CAACI;EAAM,CACtC,CACA,CACE,CACJ,CAAC;AAEL;AAEA,eAAe2B,eAAe"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { createElement, Fragment } from "@wordpress/element";
|
|
2
|
-
|
|
3
2
|
/**
|
|
4
3
|
* WordPress dependencies
|
|
5
4
|
*/
|
|
@@ -10,41 +9,35 @@ import { useSelect } from '@wordpress/data';
|
|
|
10
9
|
import { store as coreStore } from '@wordpress/core-data';
|
|
11
10
|
import { PanelBody, __experimentalVStack as VStack, __experimentalHasSplitBorders as hasSplitBorders } from '@wordpress/components';
|
|
12
11
|
import { __, sprintf } from '@wordpress/i18n';
|
|
12
|
+
|
|
13
13
|
/**
|
|
14
14
|
* Internal dependencies
|
|
15
15
|
*/
|
|
16
|
-
|
|
17
16
|
import ScreenHeader from './header';
|
|
18
17
|
import BlockPreviewPanel from './block-preview-panel';
|
|
19
18
|
import { unlock } from '../../lock-unlock';
|
|
20
19
|
import Subtitle from './subtitle';
|
|
21
20
|
import { useBlockVariations, VariationsPanel } from './variations-panel';
|
|
22
|
-
|
|
23
21
|
function applyFallbackStyle(border) {
|
|
24
22
|
if (!border) {
|
|
25
23
|
return border;
|
|
26
24
|
}
|
|
27
|
-
|
|
28
25
|
const hasColorOrWidth = border.color || border.width;
|
|
29
|
-
|
|
30
26
|
if (!border.style && hasColorOrWidth) {
|
|
31
|
-
return {
|
|
27
|
+
return {
|
|
28
|
+
...border,
|
|
32
29
|
style: 'solid'
|
|
33
30
|
};
|
|
34
31
|
}
|
|
35
|
-
|
|
36
32
|
if (border.style && !hasColorOrWidth) {
|
|
37
33
|
return undefined;
|
|
38
34
|
}
|
|
39
|
-
|
|
40
35
|
return border;
|
|
41
36
|
}
|
|
42
|
-
|
|
43
37
|
function applyAllFallbackStyles(border) {
|
|
44
38
|
if (!border) {
|
|
45
39
|
return border;
|
|
46
40
|
}
|
|
47
|
-
|
|
48
41
|
if (hasSplitBorders(border)) {
|
|
49
42
|
return {
|
|
50
43
|
top: applyFallbackStyle(border.top),
|
|
@@ -53,10 +46,8 @@ function applyAllFallbackStyles(border) {
|
|
|
53
46
|
left: applyFallbackStyle(border.left)
|
|
54
47
|
};
|
|
55
48
|
}
|
|
56
|
-
|
|
57
49
|
return applyFallbackStyle(border);
|
|
58
50
|
}
|
|
59
|
-
|
|
60
51
|
const {
|
|
61
52
|
useHasDimensionsPanel,
|
|
62
53
|
useHasTypographyPanel,
|
|
@@ -78,17 +69,14 @@ const {
|
|
|
78
69
|
FiltersPanel: StylesFiltersPanel,
|
|
79
70
|
AdvancedPanel: StylesAdvancedPanel
|
|
80
71
|
} = unlock(blockEditorPrivateApis);
|
|
81
|
-
|
|
82
72
|
function ScreenBlock({
|
|
83
73
|
name,
|
|
84
74
|
variation
|
|
85
75
|
}) {
|
|
86
76
|
let prefixParts = [];
|
|
87
|
-
|
|
88
77
|
if (variation) {
|
|
89
78
|
prefixParts = ['variations', variation].concat(prefixParts);
|
|
90
79
|
}
|
|
91
|
-
|
|
92
80
|
const prefix = prefixParts.join('.');
|
|
93
81
|
const [style] = useGlobalStyle(prefix, name, 'user', {
|
|
94
82
|
shouldDecodeEncode: false
|
|
@@ -119,51 +107,52 @@ function ScreenBlock({
|
|
|
119
107
|
canEditCSS
|
|
120
108
|
} = useSelect(select => {
|
|
121
109
|
var _globalStyles$_links$;
|
|
122
|
-
|
|
123
110
|
const {
|
|
124
111
|
getEntityRecord,
|
|
125
112
|
__experimentalGetCurrentGlobalStylesId
|
|
126
113
|
} = select(coreStore);
|
|
127
|
-
|
|
128
114
|
const globalStylesId = __experimentalGetCurrentGlobalStylesId();
|
|
129
|
-
|
|
130
115
|
const globalStyles = globalStylesId ? getEntityRecord('root', 'globalStyles', globalStylesId) : undefined;
|
|
131
116
|
return {
|
|
132
117
|
canEditCSS: (_globalStyles$_links$ = !!globalStyles?._links?.['wp:action-edit-css']) !== null && _globalStyles$_links$ !== void 0 ? _globalStyles$_links$ : false
|
|
133
118
|
};
|
|
134
119
|
}, []);
|
|
135
|
-
const currentBlockStyle = variation ? blockVariations.find(s => s.name === variation) : null;
|
|
136
|
-
// in settings rather than styles.
|
|
120
|
+
const currentBlockStyle = variation ? blockVariations.find(s => s.name === variation) : null;
|
|
137
121
|
|
|
122
|
+
// These intermediary objects are needed because the "layout" property is stored
|
|
123
|
+
// in settings rather than styles.
|
|
138
124
|
const inheritedStyleWithLayout = useMemo(() => {
|
|
139
|
-
return {
|
|
125
|
+
return {
|
|
126
|
+
...inheritedStyle,
|
|
140
127
|
layout: settings.layout
|
|
141
128
|
};
|
|
142
129
|
}, [inheritedStyle, settings.layout]);
|
|
143
130
|
const styleWithLayout = useMemo(() => {
|
|
144
|
-
return {
|
|
131
|
+
return {
|
|
132
|
+
...style,
|
|
145
133
|
layout: settings.layout
|
|
146
134
|
};
|
|
147
135
|
}, [style, settings.layout]);
|
|
148
|
-
|
|
149
136
|
const onChangeDimensions = newStyle => {
|
|
150
|
-
const updatedStyle = {
|
|
137
|
+
const updatedStyle = {
|
|
138
|
+
...newStyle
|
|
151
139
|
};
|
|
152
140
|
delete updatedStyle.layout;
|
|
153
141
|
setStyle(updatedStyle);
|
|
154
|
-
|
|
155
142
|
if (newStyle.layout !== settings.layout) {
|
|
156
|
-
setSettings({
|
|
143
|
+
setSettings({
|
|
144
|
+
...rawSettings,
|
|
157
145
|
layout: newStyle.layout
|
|
158
146
|
});
|
|
159
147
|
}
|
|
160
148
|
};
|
|
161
|
-
|
|
162
149
|
const onChangeBorders = newStyle => {
|
|
163
150
|
if (!newStyle?.border) {
|
|
164
151
|
setStyle(newStyle);
|
|
165
152
|
return;
|
|
166
|
-
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// As Global Styles can't conditionally generate styles based on if
|
|
167
156
|
// other style properties have been set, we need to force split
|
|
168
157
|
// border definitions for user set global border styles. Border
|
|
169
158
|
// radius is derived from the same property i.e. `border.radius` if
|
|
@@ -174,8 +163,6 @@ function ScreenBlock({
|
|
|
174
163
|
// the `border` style property. This means if the theme.json defined
|
|
175
164
|
// split borders and the user condenses them into a flat border or
|
|
176
165
|
// vice-versa we'd get both sets of styles which would conflict.
|
|
177
|
-
|
|
178
|
-
|
|
179
166
|
const {
|
|
180
167
|
radius,
|
|
181
168
|
...newBorder
|
|
@@ -192,13 +179,14 @@ function ScreenBlock({
|
|
|
192
179
|
width: null,
|
|
193
180
|
...border
|
|
194
181
|
};
|
|
195
|
-
setStyle({
|
|
196
|
-
|
|
182
|
+
setStyle({
|
|
183
|
+
...newStyle,
|
|
184
|
+
border: {
|
|
185
|
+
...updatedBorder,
|
|
197
186
|
radius
|
|
198
187
|
}
|
|
199
188
|
});
|
|
200
189
|
};
|
|
201
|
-
|
|
202
190
|
return createElement(Fragment, null, createElement(ScreenHeader, {
|
|
203
191
|
title: variation ? currentBlockStyle.label : blockType.title
|
|
204
192
|
}), createElement(BlockPreviewPanel, {
|
|
@@ -241,17 +229,20 @@ function ScreenBlock({
|
|
|
241
229
|
inheritedValue: inheritedStyleWithLayout,
|
|
242
230
|
value: styleWithLayout,
|
|
243
231
|
onChange: setStyle,
|
|
244
|
-
settings: {
|
|
245
|
-
|
|
232
|
+
settings: {
|
|
233
|
+
...settings,
|
|
234
|
+
color: {
|
|
235
|
+
...settings.color,
|
|
246
236
|
customDuotone: false //TO FIX: Custom duotone only works on the block level right now
|
|
247
|
-
|
|
248
237
|
}
|
|
249
238
|
},
|
|
239
|
+
|
|
250
240
|
includeLayoutControls: true
|
|
251
241
|
}), canEditCSS && createElement(PanelBody, {
|
|
252
242
|
title: __('Advanced'),
|
|
253
243
|
initialOpen: false
|
|
254
|
-
}, createElement("p", null, sprintf(
|
|
244
|
+
}, createElement("p", null, sprintf(
|
|
245
|
+
// translators: %s: is the name of a block e.g., 'Image' or 'Table'.
|
|
255
246
|
__('Add your own CSS to customize the appearance of the %s block.'), blockType?.title)), createElement(StylesAdvancedPanel, {
|
|
256
247
|
value: style,
|
|
257
248
|
onChange: setStyle,
|
|
@@ -263,6 +254,5 @@ function ScreenBlock({
|
|
|
263
254
|
blockName: name
|
|
264
255
|
})));
|
|
265
256
|
}
|
|
266
|
-
|
|
267
257
|
export default ScreenBlock;
|
|
268
258
|
//# sourceMappingURL=screen-block.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/screen-block.js"],"names":["getBlockType","privateApis","blockEditorPrivateApis","useMemo","useSelect","store","coreStore","PanelBody","__experimentalVStack","VStack","__experimentalHasSplitBorders","hasSplitBorders","__","sprintf","ScreenHeader","BlockPreviewPanel","unlock","Subtitle","useBlockVariations","VariationsPanel","applyFallbackStyle","border","hasColorOrWidth","color","width","style","undefined","applyAllFallbackStyles","top","right","bottom","left","useHasDimensionsPanel","useHasTypographyPanel","useHasBorderPanel","__experimentalUseHasBehaviorsPanel","useHasBehaviorsPanel","useGlobalSetting","useSettingsForBlockElement","useHasColorPanel","useHasEffectsPanel","useHasFiltersPanel","useGlobalStyle","__experimentalUseGlobalBehaviors","useGlobalBehaviors","__experimentalBehaviorsPanel","StylesBehaviorsPanel","BorderPanel","StylesBorderPanel","ColorPanel","StylesColorPanel","TypographyPanel","StylesTypographyPanel","DimensionsPanel","StylesDimensionsPanel","EffectsPanel","StylesEffectsPanel","FiltersPanel","StylesFiltersPanel","AdvancedPanel","StylesAdvancedPanel","ScreenBlock","name","variation","prefixParts","concat","prefix","join","shouldDecodeEncode","inheritedStyle","setStyle","rawSettings","setSettings","settings","inheritedBehaviors","setBehavior","behavior","blockType","blockVariations","hasTypographyPanel","hasColorPanel","hasBehaviorsPanel","hasBorderPanel","hasDimensionsPanel","hasEffectsPanel","hasFiltersPanel","hasVariationsPanel","length","canEditCSS","select","getEntityRecord","__experimentalGetCurrentGlobalStylesId","globalStylesId","globalStyles","_links","currentBlockStyle","find","s","inheritedStyleWithLayout","layout","styleWithLayout","onChangeDimensions","newStyle","updatedStyle","onChangeBorders","radius","newBorder","updatedBorder","label","title","customDuotone"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,YAAT,QAA6B,mBAA7B;AACA,SAASC,WAAW,IAAIC,sBAAxB,QAAsD,yBAAtD;AACA,SAASC,OAAT,QAAwB,oBAAxB;AACA,SAASC,SAAT,QAA0B,iBAA1B;AACA,SAASC,KAAK,IAAIC,SAAlB,QAAmC,sBAAnC;AACA,SACCC,SADD,EAECC,oBAAoB,IAAIC,MAFzB,EAGCC,6BAA6B,IAAIC,eAHlC,QAIO,uBAJP;AAKA,SAASC,EAAT,EAAaC,OAAb,QAA4B,iBAA5B;AAEA;AACA;AACA;;AAC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IAAA,KAAK,EAAGpF,KADT;AAEC,IAAA,QAAQ,EAAG6C,QAFZ;AAGC,IAAA,cAAc,EAAGD;AAHlB,IAVD,EAeGY,iBAAiB,IAClB,cAAC,oBAAD;AACC,IAAA,KAAK,EAAGL,QADT;AAEC,IAAA,QAAQ,EAAGD,WAFZ;AAGC,IAAA,SAAS,EAAGD,kBAHb;AAIC,IAAA,SAAS,EAAGZ;AAJb,IAhBF,CAvEF,CADD;AAmGA;;AAED,eAAeD,WAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockType } from '@wordpress/blocks';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tPanelBody,\n\t__experimentalVStack as VStack,\n\t__experimentalHasSplitBorders as hasSplitBorders,\n} from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from './header';\nimport BlockPreviewPanel from './block-preview-panel';\nimport { unlock } from '../../lock-unlock';\nimport Subtitle from './subtitle';\nimport { useBlockVariations, VariationsPanel } from './variations-panel';\n\nfunction applyFallbackStyle( border ) {\n\tif ( ! border ) {\n\t\treturn border;\n\t}\n\n\tconst hasColorOrWidth = border.color || border.width;\n\n\tif ( ! border.style && hasColorOrWidth ) {\n\t\treturn { ...border, style: 'solid' };\n\t}\n\n\tif ( border.style && ! hasColorOrWidth ) {\n\t\treturn undefined;\n\t}\n\n\treturn border;\n}\n\nfunction applyAllFallbackStyles( border ) {\n\tif ( ! border ) {\n\t\treturn border;\n\t}\n\n\tif ( hasSplitBorders( border ) ) {\n\t\treturn {\n\t\t\ttop: applyFallbackStyle( border.top ),\n\t\t\tright: applyFallbackStyle( border.right ),\n\t\t\tbottom: applyFallbackStyle( border.bottom ),\n\t\t\tleft: applyFallbackStyle( border.left ),\n\t\t};\n\t}\n\n\treturn applyFallbackStyle( border );\n}\n\nconst {\n\tuseHasDimensionsPanel,\n\tuseHasTypographyPanel,\n\tuseHasBorderPanel,\n\t__experimentalUseHasBehaviorsPanel: useHasBehaviorsPanel,\n\tuseGlobalSetting,\n\tuseSettingsForBlockElement,\n\tuseHasColorPanel,\n\tuseHasEffectsPanel,\n\tuseHasFiltersPanel,\n\tuseGlobalStyle,\n\t__experimentalUseGlobalBehaviors: useGlobalBehaviors,\n\t__experimentalBehaviorsPanel: StylesBehaviorsPanel,\n\tBorderPanel: StylesBorderPanel,\n\tColorPanel: StylesColorPanel,\n\tTypographyPanel: StylesTypographyPanel,\n\tDimensionsPanel: StylesDimensionsPanel,\n\tEffectsPanel: StylesEffectsPanel,\n\tFiltersPanel: StylesFiltersPanel,\n\tAdvancedPanel: StylesAdvancedPanel,\n} = unlock( blockEditorPrivateApis );\n\nfunction ScreenBlock( { name, variation } ) {\n\tlet prefixParts = [];\n\tif ( variation ) {\n\t\tprefixParts = [ 'variations', variation ].concat( prefixParts );\n\t}\n\tconst prefix = prefixParts.join( '.' );\n\n\tconst [ style ] = useGlobalStyle( prefix, name, 'user', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ inheritedStyle, setStyle ] = useGlobalStyle( prefix, name, 'all', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ rawSettings, setSettings ] = useGlobalSetting( '', name );\n\tconst settings = useSettingsForBlockElement( rawSettings, name );\n\tconst { inheritedBehaviors, setBehavior } = useGlobalBehaviors( name );\n\tconst { behavior } = useGlobalBehaviors( name, 'user' );\n\n\tconst blockType = getBlockType( name );\n\tconst blockVariations = useBlockVariations( name );\n\tconst hasTypographyPanel = useHasTypographyPanel( settings );\n\tconst hasColorPanel = useHasColorPanel( settings );\n\tconst hasBehaviorsPanel = useHasBehaviorsPanel( rawSettings, name );\n\tconst hasBorderPanel = useHasBorderPanel( settings );\n\tconst hasDimensionsPanel = useHasDimensionsPanel( settings );\n\tconst hasEffectsPanel = useHasEffectsPanel( settings );\n\tconst hasFiltersPanel = useHasFiltersPanel( settings );\n\tconst hasVariationsPanel = !! blockVariations?.length && ! variation;\n\tconst { canEditCSS } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\tselect( coreStore );\n\n\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\tconst globalStyles = globalStylesId\n\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t: undefined;\n\n\t\treturn {\n\t\t\tcanEditCSS:\n\t\t\t\t!! globalStyles?._links?.[ 'wp:action-edit-css' ] ?? false,\n\t\t};\n\t}, [] );\n\tconst currentBlockStyle = variation\n\t\t? blockVariations.find( ( s ) => s.name === variation )\n\t\t: null;\n\n\t// These intermediary objects are needed because the \"layout\" property is stored\n\t// in settings rather than styles.\n\tconst inheritedStyleWithLayout = useMemo( () => {\n\t\treturn {\n\t\t\t...inheritedStyle,\n\t\t\tlayout: settings.layout,\n\t\t};\n\t}, [ inheritedStyle, settings.layout ] );\n\tconst styleWithLayout = useMemo( () => {\n\t\treturn {\n\t\t\t...style,\n\t\t\tlayout: settings.layout,\n\t\t};\n\t}, [ style, settings.layout ] );\n\tconst onChangeDimensions = ( newStyle ) => {\n\t\tconst updatedStyle = { ...newStyle };\n\t\tdelete updatedStyle.layout;\n\t\tsetStyle( updatedStyle );\n\n\t\tif ( newStyle.layout !== settings.layout ) {\n\t\t\tsetSettings( {\n\t\t\t\t...rawSettings,\n\t\t\t\tlayout: newStyle.layout,\n\t\t\t} );\n\t\t}\n\t};\n\tconst onChangeBorders = ( newStyle ) => {\n\t\tif ( ! newStyle?.border ) {\n\t\t\tsetStyle( newStyle );\n\t\t\treturn;\n\t\t}\n\n\t\t// As Global Styles can't conditionally generate styles based on if\n\t\t// other style properties have been set, we need to force split\n\t\t// border definitions for user set global border styles. Border\n\t\t// radius is derived from the same property i.e. `border.radius` if\n\t\t// it is a string that is used. The longhand border radii styles are\n\t\t// only generated if that property is an object.\n\t\t//\n\t\t// For borders (color, style, and width) those are all properties on\n\t\t// the `border` style property. This means if the theme.json defined\n\t\t// split borders and the user condenses them into a flat border or\n\t\t// vice-versa we'd get both sets of styles which would conflict.\n\t\tconst { radius, ...newBorder } = newStyle.border;\n\t\tconst border = applyAllFallbackStyles( newBorder );\n\t\tconst updatedBorder = ! hasSplitBorders( border )\n\t\t\t? {\n\t\t\t\t\ttop: border,\n\t\t\t\t\tright: border,\n\t\t\t\t\tbottom: border,\n\t\t\t\t\tleft: border,\n\t\t\t }\n\t\t\t: {\n\t\t\t\t\tcolor: null,\n\t\t\t\t\tstyle: null,\n\t\t\t\t\twidth: null,\n\t\t\t\t\t...border,\n\t\t\t };\n\n\t\tsetStyle( { ...newStyle, border: { ...updatedBorder, radius } } );\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ variation ? currentBlockStyle.label : blockType.title }\n\t\t\t/>\n\t\t\t<BlockPreviewPanel name={ name } variation={ variation } />\n\t\t\t{ hasVariationsPanel && (\n\t\t\t\t<div className=\"edit-site-global-styles-screen-variations\">\n\t\t\t\t\t<VStack spacing={ 3 }>\n\t\t\t\t\t\t<Subtitle>{ __( 'Style Variations' ) }</Subtitle>\n\t\t\t\t\t\t<VariationsPanel name={ name } />\n\t\t\t\t\t</VStack>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t{ hasColorPanel && (\n\t\t\t\t<StylesColorPanel\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasTypographyPanel && (\n\t\t\t\t<StylesTypographyPanel\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasDimensionsPanel && (\n\t\t\t\t<StylesDimensionsPanel\n\t\t\t\t\tinheritedValue={ inheritedStyleWithLayout }\n\t\t\t\t\tvalue={ styleWithLayout }\n\t\t\t\t\tonChange={ onChangeDimensions }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tincludeLayoutControls\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasBorderPanel && (\n\t\t\t\t<StylesBorderPanel\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ onChangeBorders }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasEffectsPanel && (\n\t\t\t\t<StylesEffectsPanel\n\t\t\t\t\tinheritedValue={ inheritedStyleWithLayout }\n\t\t\t\t\tvalue={ styleWithLayout }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tincludeLayoutControls\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasFiltersPanel && (\n\t\t\t\t<StylesFiltersPanel\n\t\t\t\t\tinheritedValue={ inheritedStyleWithLayout }\n\t\t\t\t\tvalue={ styleWithLayout }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ {\n\t\t\t\t\t\t...settings,\n\t\t\t\t\t\tcolor: {\n\t\t\t\t\t\t\t...settings.color,\n\t\t\t\t\t\t\tcustomDuotone: false, //TO FIX: Custom duotone only works on the block level right now\n\t\t\t\t\t\t},\n\t\t\t\t\t} }\n\t\t\t\t\tincludeLayoutControls\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ canEditCSS && (\n\t\t\t\t<PanelBody title={ __( 'Advanced' ) } initialOpen={ false }>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t// translators: %s: is the name of a block e.g., 'Image' or 'Table'.\n\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t'Add your own CSS to customize the appearance of the %s block.'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tblockType?.title\n\t\t\t\t\t\t) }\n\t\t\t\t\t</p>\n\t\t\t\t\t<StylesAdvancedPanel\n\t\t\t\t\t\tvalue={ style }\n\t\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\t/>\n\t\t\t\t\t{ hasBehaviorsPanel && (\n\t\t\t\t\t\t<StylesBehaviorsPanel\n\t\t\t\t\t\t\tvalue={ behavior }\n\t\t\t\t\t\t\tonChange={ setBehavior }\n\t\t\t\t\t\t\tbehaviors={ inheritedBehaviors }\n\t\t\t\t\t\t\tblockName={ name }\n\t\t\t\t\t\t></StylesBehaviorsPanel>\n\t\t\t\t\t) }\n\t\t\t\t</PanelBody>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default ScreenBlock;\n"]}
|
|
1
|
+
{"version":3,"names":["getBlockType","privateApis","blockEditorPrivateApis","useMemo","useSelect","store","coreStore","PanelBody","__experimentalVStack","VStack","__experimentalHasSplitBorders","hasSplitBorders","__","sprintf","ScreenHeader","BlockPreviewPanel","unlock","Subtitle","useBlockVariations","VariationsPanel","applyFallbackStyle","border","hasColorOrWidth","color","width","style","undefined","applyAllFallbackStyles","top","right","bottom","left","useHasDimensionsPanel","useHasTypographyPanel","useHasBorderPanel","__experimentalUseHasBehaviorsPanel","useHasBehaviorsPanel","useGlobalSetting","useSettingsForBlockElement","useHasColorPanel","useHasEffectsPanel","useHasFiltersPanel","useGlobalStyle","__experimentalUseGlobalBehaviors","useGlobalBehaviors","__experimentalBehaviorsPanel","StylesBehaviorsPanel","BorderPanel","StylesBorderPanel","ColorPanel","StylesColorPanel","TypographyPanel","StylesTypographyPanel","DimensionsPanel","StylesDimensionsPanel","EffectsPanel","StylesEffectsPanel","FiltersPanel","StylesFiltersPanel","AdvancedPanel","StylesAdvancedPanel","ScreenBlock","name","variation","prefixParts","concat","prefix","join","shouldDecodeEncode","inheritedStyle","setStyle","rawSettings","setSettings","settings","inheritedBehaviors","setBehavior","behavior","blockType","blockVariations","hasTypographyPanel","hasColorPanel","hasBehaviorsPanel","hasBorderPanel","hasDimensionsPanel","hasEffectsPanel","hasFiltersPanel","hasVariationsPanel","length","canEditCSS","select","_globalStyles$_links$","getEntityRecord","__experimentalGetCurrentGlobalStylesId","globalStylesId","globalStyles","_links","currentBlockStyle","find","s","inheritedStyleWithLayout","layout","styleWithLayout","onChangeDimensions","newStyle","updatedStyle","onChangeBorders","radius","newBorder","updatedBorder","createElement","Fragment","title","label","className","spacing","inheritedValue","value","onChange","includeLayoutControls","customDuotone","initialOpen","behaviors","blockName"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-block.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockType } from '@wordpress/blocks';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tPanelBody,\n\t__experimentalVStack as VStack,\n\t__experimentalHasSplitBorders as hasSplitBorders,\n} from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from './header';\nimport BlockPreviewPanel from './block-preview-panel';\nimport { unlock } from '../../lock-unlock';\nimport Subtitle from './subtitle';\nimport { useBlockVariations, VariationsPanel } from './variations-panel';\n\nfunction applyFallbackStyle( border ) {\n\tif ( ! border ) {\n\t\treturn border;\n\t}\n\n\tconst hasColorOrWidth = border.color || border.width;\n\n\tif ( ! border.style && hasColorOrWidth ) {\n\t\treturn { ...border, style: 'solid' };\n\t}\n\n\tif ( border.style && ! hasColorOrWidth ) {\n\t\treturn undefined;\n\t}\n\n\treturn border;\n}\n\nfunction applyAllFallbackStyles( border ) {\n\tif ( ! border ) {\n\t\treturn border;\n\t}\n\n\tif ( hasSplitBorders( border ) ) {\n\t\treturn {\n\t\t\ttop: applyFallbackStyle( border.top ),\n\t\t\tright: applyFallbackStyle( border.right ),\n\t\t\tbottom: applyFallbackStyle( border.bottom ),\n\t\t\tleft: applyFallbackStyle( border.left ),\n\t\t};\n\t}\n\n\treturn applyFallbackStyle( border );\n}\n\nconst {\n\tuseHasDimensionsPanel,\n\tuseHasTypographyPanel,\n\tuseHasBorderPanel,\n\t__experimentalUseHasBehaviorsPanel: useHasBehaviorsPanel,\n\tuseGlobalSetting,\n\tuseSettingsForBlockElement,\n\tuseHasColorPanel,\n\tuseHasEffectsPanel,\n\tuseHasFiltersPanel,\n\tuseGlobalStyle,\n\t__experimentalUseGlobalBehaviors: useGlobalBehaviors,\n\t__experimentalBehaviorsPanel: StylesBehaviorsPanel,\n\tBorderPanel: StylesBorderPanel,\n\tColorPanel: StylesColorPanel,\n\tTypographyPanel: StylesTypographyPanel,\n\tDimensionsPanel: StylesDimensionsPanel,\n\tEffectsPanel: StylesEffectsPanel,\n\tFiltersPanel: StylesFiltersPanel,\n\tAdvancedPanel: StylesAdvancedPanel,\n} = unlock( blockEditorPrivateApis );\n\nfunction ScreenBlock( { name, variation } ) {\n\tlet prefixParts = [];\n\tif ( variation ) {\n\t\tprefixParts = [ 'variations', variation ].concat( prefixParts );\n\t}\n\tconst prefix = prefixParts.join( '.' );\n\n\tconst [ style ] = useGlobalStyle( prefix, name, 'user', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ inheritedStyle, setStyle ] = useGlobalStyle( prefix, name, 'all', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ rawSettings, setSettings ] = useGlobalSetting( '', name );\n\tconst settings = useSettingsForBlockElement( rawSettings, name );\n\tconst { inheritedBehaviors, setBehavior } = useGlobalBehaviors( name );\n\tconst { behavior } = useGlobalBehaviors( name, 'user' );\n\n\tconst blockType = getBlockType( name );\n\tconst blockVariations = useBlockVariations( name );\n\tconst hasTypographyPanel = useHasTypographyPanel( settings );\n\tconst hasColorPanel = useHasColorPanel( settings );\n\tconst hasBehaviorsPanel = useHasBehaviorsPanel( rawSettings, name );\n\tconst hasBorderPanel = useHasBorderPanel( settings );\n\tconst hasDimensionsPanel = useHasDimensionsPanel( settings );\n\tconst hasEffectsPanel = useHasEffectsPanel( settings );\n\tconst hasFiltersPanel = useHasFiltersPanel( settings );\n\tconst hasVariationsPanel = !! blockVariations?.length && ! variation;\n\tconst { canEditCSS } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\tselect( coreStore );\n\n\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\tconst globalStyles = globalStylesId\n\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t: undefined;\n\n\t\treturn {\n\t\t\tcanEditCSS:\n\t\t\t\t!! globalStyles?._links?.[ 'wp:action-edit-css' ] ?? false,\n\t\t};\n\t}, [] );\n\tconst currentBlockStyle = variation\n\t\t? blockVariations.find( ( s ) => s.name === variation )\n\t\t: null;\n\n\t// These intermediary objects are needed because the \"layout\" property is stored\n\t// in settings rather than styles.\n\tconst inheritedStyleWithLayout = useMemo( () => {\n\t\treturn {\n\t\t\t...inheritedStyle,\n\t\t\tlayout: settings.layout,\n\t\t};\n\t}, [ inheritedStyle, settings.layout ] );\n\tconst styleWithLayout = useMemo( () => {\n\t\treturn {\n\t\t\t...style,\n\t\t\tlayout: settings.layout,\n\t\t};\n\t}, [ style, settings.layout ] );\n\tconst onChangeDimensions = ( newStyle ) => {\n\t\tconst updatedStyle = { ...newStyle };\n\t\tdelete updatedStyle.layout;\n\t\tsetStyle( updatedStyle );\n\n\t\tif ( newStyle.layout !== settings.layout ) {\n\t\t\tsetSettings( {\n\t\t\t\t...rawSettings,\n\t\t\t\tlayout: newStyle.layout,\n\t\t\t} );\n\t\t}\n\t};\n\tconst onChangeBorders = ( newStyle ) => {\n\t\tif ( ! newStyle?.border ) {\n\t\t\tsetStyle( newStyle );\n\t\t\treturn;\n\t\t}\n\n\t\t// As Global Styles can't conditionally generate styles based on if\n\t\t// other style properties have been set, we need to force split\n\t\t// border definitions for user set global border styles. Border\n\t\t// radius is derived from the same property i.e. `border.radius` if\n\t\t// it is a string that is used. The longhand border radii styles are\n\t\t// only generated if that property is an object.\n\t\t//\n\t\t// For borders (color, style, and width) those are all properties on\n\t\t// the `border` style property. This means if the theme.json defined\n\t\t// split borders and the user condenses them into a flat border or\n\t\t// vice-versa we'd get both sets of styles which would conflict.\n\t\tconst { radius, ...newBorder } = newStyle.border;\n\t\tconst border = applyAllFallbackStyles( newBorder );\n\t\tconst updatedBorder = ! hasSplitBorders( border )\n\t\t\t? {\n\t\t\t\t\ttop: border,\n\t\t\t\t\tright: border,\n\t\t\t\t\tbottom: border,\n\t\t\t\t\tleft: border,\n\t\t\t }\n\t\t\t: {\n\t\t\t\t\tcolor: null,\n\t\t\t\t\tstyle: null,\n\t\t\t\t\twidth: null,\n\t\t\t\t\t...border,\n\t\t\t };\n\n\t\tsetStyle( { ...newStyle, border: { ...updatedBorder, radius } } );\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ variation ? currentBlockStyle.label : blockType.title }\n\t\t\t/>\n\t\t\t<BlockPreviewPanel name={ name } variation={ variation } />\n\t\t\t{ hasVariationsPanel && (\n\t\t\t\t<div className=\"edit-site-global-styles-screen-variations\">\n\t\t\t\t\t<VStack spacing={ 3 }>\n\t\t\t\t\t\t<Subtitle>{ __( 'Style Variations' ) }</Subtitle>\n\t\t\t\t\t\t<VariationsPanel name={ name } />\n\t\t\t\t\t</VStack>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t{ hasColorPanel && (\n\t\t\t\t<StylesColorPanel\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasTypographyPanel && (\n\t\t\t\t<StylesTypographyPanel\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasDimensionsPanel && (\n\t\t\t\t<StylesDimensionsPanel\n\t\t\t\t\tinheritedValue={ inheritedStyleWithLayout }\n\t\t\t\t\tvalue={ styleWithLayout }\n\t\t\t\t\tonChange={ onChangeDimensions }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tincludeLayoutControls\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasBorderPanel && (\n\t\t\t\t<StylesBorderPanel\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ onChangeBorders }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasEffectsPanel && (\n\t\t\t\t<StylesEffectsPanel\n\t\t\t\t\tinheritedValue={ inheritedStyleWithLayout }\n\t\t\t\t\tvalue={ styleWithLayout }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tincludeLayoutControls\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasFiltersPanel && (\n\t\t\t\t<StylesFiltersPanel\n\t\t\t\t\tinheritedValue={ inheritedStyleWithLayout }\n\t\t\t\t\tvalue={ styleWithLayout }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ {\n\t\t\t\t\t\t...settings,\n\t\t\t\t\t\tcolor: {\n\t\t\t\t\t\t\t...settings.color,\n\t\t\t\t\t\t\tcustomDuotone: false, //TO FIX: Custom duotone only works on the block level right now\n\t\t\t\t\t\t},\n\t\t\t\t\t} }\n\t\t\t\t\tincludeLayoutControls\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ canEditCSS && (\n\t\t\t\t<PanelBody title={ __( 'Advanced' ) } initialOpen={ false }>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t// translators: %s: is the name of a block e.g., 'Image' or 'Table'.\n\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t'Add your own CSS to customize the appearance of the %s block.'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tblockType?.title\n\t\t\t\t\t\t) }\n\t\t\t\t\t</p>\n\t\t\t\t\t<StylesAdvancedPanel\n\t\t\t\t\t\tvalue={ style }\n\t\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\t/>\n\t\t\t\t\t{ hasBehaviorsPanel && (\n\t\t\t\t\t\t<StylesBehaviorsPanel\n\t\t\t\t\t\t\tvalue={ behavior }\n\t\t\t\t\t\t\tonChange={ setBehavior }\n\t\t\t\t\t\t\tbehaviors={ inheritedBehaviors }\n\t\t\t\t\t\t\tblockName={ name }\n\t\t\t\t\t\t></StylesBehaviorsPanel>\n\t\t\t\t\t) }\n\t\t\t\t</PanelBody>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default ScreenBlock;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,YAAY,QAAQ,mBAAmB;AAChD,SAASC,WAAW,IAAIC,sBAAsB,QAAQ,yBAAyB;AAC/E,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AACzD,SACCC,SAAS,EACTC,oBAAoB,IAAIC,MAAM,EAC9BC,6BAA6B,IAAIC,eAAe,QAC1C,uBAAuB;AAC9B,SAASC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;;AAE7C;AACA;AACA;AACA,OAAOC,YAAY,MAAM,UAAU;AACnC,OAAOC,iBAAiB,MAAM,uBAAuB;AACrD,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,OAAOC,QAAQ,MAAM,YAAY;AACjC,SAAS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AQ,EAAGA;EAAU,CACrB,CACD,EACCW,eAAe,IAChByB,aAAA,CAACrD,kBAAkB;IAClB2D,cAAc,EAAGhB,wBAA0B;IAC3CiB,KAAK,EAAGf,eAAiB;IACzBgB,QAAQ,EAAG/C,QAAU;IACrBG,QAAQ,EAAGA,QAAU;IACrB6C,qBAAqB;EAAA,CACrB,CACD,EACCjC,eAAe,IAChBwB,aAAA,CAACnD,kBAAkB;IAClByD,cAAc,EAAGhB,wBAA0B;IAC3CiB,KAAK,EAAGf,eAAiB;IACzBgB,QAAQ,EAAG/C,QAAU;IACrBG,QAAQ,EAAG;MACV,GAAGA,QAAQ;MACXlD,KAAK,EAAE;QACN,GAAGkD,QAAQ,CAAClD,KAAK;QACjBgG,aAAa,EAAE,KAAK,CAAE;MACvB;IACD,CAAG;;IACHD,qBAAqB;EAAA,CACrB,CACD,EACC9B,UAAU,IACXqB,aAAA,CAACtG,SAAS;IAACwG,KAAK,EAAGnG,EAAE,CAAE,UAAW,CAAG;IAAC4G,WAAW,EAAG;EAAO,GAC1DX,aAAA,YACGhG,OAAO;EACR;EACAD,EAAE,CACD,+DACD,CAAC,EACDiE,SAAS,EAAEkC,KACZ,CACE,CAAC,EACJF,aAAA,CAACjD,mBAAmB;IACnBwD,KAAK,EAAG3F,KAAO;IACf4F,QAAQ,EAAG/C,QAAU;IACrB6C,cAAc,EAAG9C;EAAgB,CACjC,CAAC,EACAY,iBAAiB,IAClB4B,aAAA,CAAC/D,oBAAoB;IACpBsE,KAAK,EAAGxC,QAAU;IAClByC,QAAQ,EAAG1C,WAAa;IACxB8C,SAAS,EAAG/C,kBAAoB;IAChCgD,SAAS,EAAG5D;EAAM,CACI,CAEd,CAEX,CAAC;AAEL;AAEA,eAAeD,WAAW"}
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
import { createElement, Fragment } from "@wordpress/element";
|
|
2
|
-
|
|
3
2
|
/**
|
|
4
3
|
* WordPress dependencies
|
|
5
4
|
*/
|
|
6
5
|
import { __ } from '@wordpress/i18n';
|
|
7
6
|
import { TabPanel } from '@wordpress/components';
|
|
7
|
+
|
|
8
8
|
/**
|
|
9
9
|
* Internal dependencies
|
|
10
10
|
*/
|
|
11
|
-
|
|
12
11
|
import ColorPalettePanel from './color-palette-panel';
|
|
13
12
|
import GradientPalettePanel from './gradients-palette-panel';
|
|
14
13
|
import ScreenHeader from './header';
|
|
15
|
-
|
|
16
14
|
function ScreenColorPalette({
|
|
17
15
|
name
|
|
18
16
|
}) {
|
|
@@ -35,6 +33,5 @@ function ScreenColorPalette({
|
|
|
35
33
|
name: name
|
|
36
34
|
}))));
|
|
37
35
|
}
|
|
38
|
-
|
|
39
36
|
export default ScreenColorPalette;
|
|
40
37
|
//# sourceMappingURL=screen-color-palette.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["__","TabPanel","ColorPalettePanel","GradientPalettePanel","ScreenHeader","ScreenColorPalette","name","createElement","Fragment","title","description","tabs","value","tab"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-color-palette.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { TabPanel } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport ColorPalettePanel from './color-palette-panel';\nimport GradientPalettePanel from './gradients-palette-panel';\nimport ScreenHeader from './header';\n\nfunction ScreenColorPalette( { name } ) {\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Palette' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Palettes are used to provide default color options for blocks and various design tools. Here you can edit the colors with their labels.'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<TabPanel\n\t\t\t\ttabs={ [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'solid',\n\t\t\t\t\t\ttitle: 'Solid',\n\t\t\t\t\t\tvalue: 'solid',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'gradient',\n\t\t\t\t\t\ttitle: 'Gradient',\n\t\t\t\t\t\tvalue: 'gradient',\n\t\t\t\t\t},\n\t\t\t\t] }\n\t\t\t>\n\t\t\t\t{ ( tab ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ tab.value === 'solid' && (\n\t\t\t\t\t\t\t<ColorPalettePanel name={ name } />\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ tab.value === 'gradient' && (\n\t\t\t\t\t\t\t<GradientPalettePanel name={ name } />\n\t\t\t\t\t\t) }\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</TabPanel>\n\t\t</>\n\t);\n}\n\nexport default ScreenColorPalette;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,QAAQ,QAAQ,uBAAuB;;AAEhD;AACA;AACA;AACA,OAAOC,iBAAiB,MAAM,uBAAuB;AACrD,OAAOC,oBAAoB,MAAM,2BAA2B;AAC5D,OAAOC,YAAY,MAAM,UAAU;AAEnC,SAASC,kBAAkBA,CAAE;EAAEC;AAAK,CAAC,EAAG;EACvC,OACCC,aAAA,CAAAC,QAAA,QACCD,aAAA,CAACH,YAAY;IACZK,KAAK,EAAGT,EAAE,CAAE,SAAU,CAAG;IACzBU,WAAW,EAAGV,EAAE,CACf,yIACD;EAAG,CACH,CAAC,EACFO,aAAA,CAACN,QAAQ;IACRU,IAAI,EAAG,CACN;MACCL,IAAI,EAAE,OAAO;MACbG,KAAK,EAAE,OAAO;MACdG,KAAK,EAAE;IACR,CAAC,EACD;MACCN,IAAI,EAAE,UAAU;MAChBG,KAAK,EAAE,UAAU;MACjBG,KAAK,EAAE;IACR,CAAC;EACC,GAECC,GAAG,IACNN,aAAA,CAAAC,QAAA,QACGK,GAAG,CAACD,KAAK,KAAK,OAAO,IACtBL,aAAA,CAACL,iBAAiB;IAACI,IAAI,EAAGA;EAAM,CAAE,CAClC,EACCO,GAAG,CAACD,KAAK,KAAK,UAAU,IACzBL,aAAA,CAACJ,oBAAoB;IAACG,IAAI,EAAGA;EAAM,CAAE,CAErC,CAEM,CACT,CAAC;AAEL;AAEA,eAAeD,kBAAkB"}
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
import { createElement, Fragment } from "@wordpress/element";
|
|
2
|
-
|
|
3
2
|
/**
|
|
4
3
|
* WordPress dependencies
|
|
5
4
|
*/
|
|
6
5
|
import { __ } from '@wordpress/i18n';
|
|
7
6
|
import { __experimentalVStack as VStack } from '@wordpress/components';
|
|
8
7
|
import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
|
|
8
|
+
|
|
9
9
|
/**
|
|
10
10
|
* Internal dependencies
|
|
11
11
|
*/
|
|
12
|
-
|
|
13
12
|
import ScreenHeader from './header';
|
|
14
13
|
import Palette from './palette';
|
|
15
|
-
import BlockPreviewPanel from './block-preview-panel';
|
|
16
14
|
import { unlock } from '../../lock-unlock';
|
|
17
15
|
const {
|
|
18
16
|
useGlobalStyle,
|
|
@@ -20,7 +18,6 @@ const {
|
|
|
20
18
|
useSettingsForBlockElement,
|
|
21
19
|
ColorPanel: StylesColorPanel
|
|
22
20
|
} = unlock(blockEditorPrivateApis);
|
|
23
|
-
|
|
24
21
|
function ScreenColors() {
|
|
25
22
|
const [style] = useGlobalStyle('', undefined, 'user', {
|
|
26
23
|
shouldDecodeEncode: false
|
|
@@ -33,7 +30,7 @@ function ScreenColors() {
|
|
|
33
30
|
return createElement(Fragment, null, createElement(ScreenHeader, {
|
|
34
31
|
title: __('Colors'),
|
|
35
32
|
description: __('Manage palettes and the default color of different global elements on the site.')
|
|
36
|
-
}), createElement(
|
|
33
|
+
}), createElement("div", {
|
|
37
34
|
className: "edit-site-global-styles-screen-colors"
|
|
38
35
|
}, createElement(VStack, {
|
|
39
36
|
spacing: 10
|
|
@@ -44,6 +41,5 @@ function ScreenColors() {
|
|
|
44
41
|
settings: settings
|
|
45
42
|
}))));
|
|
46
43
|
}
|
|
47
|
-
|
|
48
44
|
export default ScreenColors;
|
|
49
45
|
//# sourceMappingURL=screen-colors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["__","__experimentalVStack","VStack","privateApis","blockEditorPrivateApis","ScreenHeader","Palette","unlock","useGlobalStyle","useGlobalSetting","useSettingsForBlockElement","ColorPanel","StylesColorPanel","ScreenColors","style","undefined","shouldDecodeEncode","inheritedStyle","setStyle","rawSettings","settings","createElement","Fragment","title","description","className","spacing","inheritedValue","value","onChange"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-colors.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { __experimentalVStack as VStack } from '@wordpress/components';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from './header';\nimport Palette from './palette';\nimport { unlock } from '../../lock-unlock';\n\nconst {\n\tuseGlobalStyle,\n\tuseGlobalSetting,\n\tuseSettingsForBlockElement,\n\tColorPanel: StylesColorPanel,\n} = unlock( blockEditorPrivateApis );\n\nfunction ScreenColors() {\n\tconst [ style ] = useGlobalStyle( '', undefined, 'user', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ inheritedStyle, setStyle ] = useGlobalStyle( '', undefined, 'all', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ rawSettings ] = useGlobalSetting( '' );\n\tconst settings = useSettingsForBlockElement( rawSettings );\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Colors' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Manage palettes and the default color of different global elements on the site.'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<div className=\"edit-site-global-styles-screen-colors\">\n\t\t\t\t<VStack spacing={ 10 }>\n\t\t\t\t\t<Palette />\n\n\t\t\t\t\t<StylesColorPanel\n\t\t\t\t\t\tinheritedValue={ inheritedSty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AAI,GACrBL,aAAA,CAACf,OAAO,MAAE,CAAC,EAEXe,aAAA,CAACT,gBAAgB;IAChBe,cAAc,EAAGV,cAAgB;IACjCW,KAAK,EAAGd,KAAO;IACfe,QAAQ,EAAGX,QAAU;IACrBE,QAAQ,EAAGA;EAAU,CACrB,CACM,CACJ,CACJ,CAAC;AAEL;AAEA,eAAeP,YAAY"}
|
|
@@ -1,25 +1,22 @@
|
|
|
1
1
|
import { createElement, Fragment } from "@wordpress/element";
|
|
2
|
-
|
|
3
2
|
/**
|
|
4
3
|
* WordPress dependencies
|
|
5
4
|
*/
|
|
6
5
|
import { __ } from '@wordpress/i18n';
|
|
7
6
|
import { ExternalLink } from '@wordpress/components';
|
|
8
7
|
import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
|
|
8
|
+
|
|
9
9
|
/**
|
|
10
10
|
* Internal dependencies
|
|
11
11
|
*/
|
|
12
|
-
|
|
13
12
|
import { unlock } from '../../lock-unlock';
|
|
14
13
|
import ScreenHeader from './header';
|
|
15
14
|
const {
|
|
16
15
|
useGlobalStyle,
|
|
17
16
|
AdvancedPanel: StylesAdvancedPanel
|
|
18
17
|
} = unlock(blockEditorPrivateApis);
|
|
19
|
-
|
|
20
18
|
function ScreenCSS() {
|
|
21
19
|
const description = __('Add your own CSS to customize the appearance and layout of your site.');
|
|
22
|
-
|
|
23
20
|
const [style] = useGlobalStyle('', undefined, 'user', {
|
|
24
21
|
shouldDecodeEncode: false
|
|
25
22
|
});
|
|
@@ -40,6 +37,5 @@ function ScreenCSS() {
|
|
|
40
37
|
inheritedValue: inheritedStyle
|
|
41
38
|
})));
|
|
42
39
|
}
|
|
43
|
-
|
|
44
40
|
export default ScreenCSS;
|
|
45
41
|
//# sourceMappingURL=screen-css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["__","ExternalLink","privateApis","blockEditorPrivateApis","unlock","ScreenHeader","useGlobalStyle","AdvancedPanel","StylesAdvancedPanel","ScreenCSS","description","style","undefined","shouldDecodeEncode","inheritedStyle","setStyle","createElement","Fragment","title","href","className","value","onChange","inheritedValue"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-css.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { ExternalLink } from '@wordpress/components';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport ScreenHeader from './header';\n\nconst { useGlobalStyle, AdvancedPanel: StylesAdvancedPanel } = unlock(\n\tblockEditorPrivateApis\n);\n\nfunction ScreenCSS() {\n\tconst description = __(\n\t\t'Add your own CSS to customize the appearance and layout of your site.'\n\t);\n\tconst [ style ] = useGlobalStyle( '', undefined, 'user', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ inheritedStyle, setStyle ] = useGlobalStyle( '', undefined, 'all', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'CSS' ) }\n\t\t\t\tdescription={\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ description }\n\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\thref=\"https://wordpress.org/documentation/article/css/\"\n\t\t\t\t\t\t\tclassName=\"edit-site-global-styles-screen-css-help-link\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Learn more about CSS' ) }\n\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t</>\n\t\t\t\t}\n\t\t\t/>\n\t\t\t<div className=\"edit-site-global-styles-screen-css\">\n\t\t\t\t<StylesAdvancedPanel\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default ScreenCSS;\n"],"mappings":";AAAA;AACA;AACA;AAC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ress dependencies
|
|
5
4
|
*/
|
|
6
5
|
import { __ } from '@wordpress/i18n';
|
|
7
6
|
import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
|
|
7
|
+
|
|
8
8
|
/**
|
|
9
9
|
* Internal dependencies
|
|
10
10
|
*/
|
|
11
|
-
|
|
12
11
|
import DimensionsPanel from './dimensions-panel';
|
|
13
12
|
import ScreenHeader from './header';
|
|
14
|
-
import BlockPreviewPanel from './block-preview-panel';
|
|
15
13
|
import { unlock } from '../../lock-unlock';
|
|
16
14
|
const {
|
|
17
15
|
useHasDimensionsPanel,
|
|
18
16
|
useGlobalSetting,
|
|
19
17
|
useSettingsForBlockElement
|
|
20
18
|
} = unlock(blockEditorPrivateApis);
|
|
21
|
-
|
|
22
19
|
function ScreenLayout() {
|
|
23
20
|
const [rawSettings] = useGlobalSetting('');
|
|
24
21
|
const settings = useSettingsForBlockElement(rawSettings);
|
|
25
22
|
const hasDimensionsPanel = useHasDimensionsPanel(settings);
|
|
26
23
|
return createElement(Fragment, null, createElement(ScreenHeader, {
|
|
27
24
|
title: __('Layout')
|
|
28
|
-
}),
|
|
25
|
+
}), hasDimensionsPanel && createElement(DimensionsPanel, null));
|
|
29
26
|
}
|
|
30
|
-
|
|
31
27
|
export default ScreenLayout;
|
|
32
28
|
//# sourceMappingURL=screen-layout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["__","privateApis","blockEditorPrivateApis","DimensionsPanel","ScreenHeader","unlock","useHasDimensionsPanel","useGlobalSetting","useSettingsForBlockElement","ScreenLayout","rawSettings","settings","hasDimensionsPanel","createElement","Fragment","title"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-layout.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport DimensionsPanel from './dimensions-panel';\nimport ScreenHeader from './header';\nimport { unlock } from '../../lock-unlock';\n\nconst { useHasDimensionsPanel, useGlobalSetting, useSettingsForBlockElement } =\n\tunlock( blockEditorPrivateApis );\n\nfunction ScreenLayout() {\n\tconst [ rawSettings ] = useGlobalSetting( '' );\n\tconst settings = useSettingsForBlockElement( rawSettings );\n\tconst hasDimensionsPanel = useHasDimensionsPanel( settings );\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader title={ __( 'Layout' ) } />\n\t\t\t{ hasDimensionsPanel && <DimensionsPanel /> }\n\t\t</>\n\t);\n}\n\nexport default ScreenLayout;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,WAAW,IAAIC,sBAAsB,QAAQ,yBAAyB;;AAE/E;AACA;AACA;AACA,OAAOC,eAAe,MAAM,oBAAoB;AAChD,OAAOC,YAAY,MAAM,UAAU;AACnC,SAASC,MAAM,QAAQ,mBAAmB;AAE1C,MAAM;EAAEC,qBAAqB;EAAEC,gBAAgB;EAAEC;AAA2B,CAAC,GAC5EH,MAAM,CAAEH,sBAAuB,CAAC;AAEjC,SAASO,YAAYA,CAAA,EAAG;EACvB,MAAM,CAAEC,WAAW,CAAE,GAAGH,gBAAgB,CAAE,EAAG,CAAC;EAC9C,MAAMI,QAAQ,GAAGH,0BAA0B,CAAEE,WAAY,CAAC;EAC1D,MAAME,kBAAkB,GAAGN,qBAAqB,CAAEK,QAAS,CAAC;EAC5D,OACCE,aAAA,CAAAC,QAAA,QACCD,aAAA,CAACT,YAAY;IAACW,KAAK,EAAGf,EAAE,CAAE,QAAS;EAAG,CAAE,CAAC,EACvCY,kBAAkB,IAAIC,aAAA,CAACV,eAAe,MAAE,CACzC,CAAC;AAEL;AAEA,eAAeM,YAAY"}
|