@wordpress/block-editor 13.2.0 → 13.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/README.md +0 -5
- package/build/components/alignment-control/ui.js +2 -2
- package/build/components/alignment-control/ui.js.map +1 -1
- package/build/components/block-alignment-control/ui.js +1 -1
- package/build/components/block-alignment-control/ui.js.map +1 -1
- package/build/components/block-alignment-control/ui.native.js +1 -1
- package/build/components/block-alignment-control/ui.native.js.map +1 -1
- package/build/components/block-breadcrumb/index.js +12 -1
- package/build/components/block-breadcrumb/index.js.map +1 -1
- package/build/components/block-inspector/index.js +6 -3
- package/build/components/block-inspector/index.js.map +1 -1
- package/build/components/block-list/use-block-props/index.js +3 -1
- package/build/components/block-list/use-block-props/index.js.map +1 -1
- package/build/components/block-list/use-block-props/use-block-refs.js +9 -2
- package/build/components/block-list/use-block-props/use-block-refs.js.map +1 -1
- package/build/components/block-list/use-block-props/use-is-hovered.js +25 -9
- package/build/components/block-list/use-block-props/use-is-hovered.js.map +1 -1
- package/build/components/block-list/use-in-between-inserter.js +3 -2
- package/build/components/block-list/use-in-between-inserter.js.map +1 -1
- package/build/components/block-lock/modal.js +2 -0
- package/build/components/block-lock/modal.js.map +1 -1
- package/build/components/block-lock/toolbar.js +0 -1
- package/build/components/block-lock/toolbar.js.map +1 -1
- package/build/components/block-mover/button.js +1 -1
- package/build/components/block-mover/button.js.map +1 -1
- package/build/components/block-mover/index.js +1 -1
- package/build/components/block-mover/index.js.map +1 -1
- package/build/components/block-pattern-setup/setup-toolbar.js +2 -2
- package/build/components/block-pattern-setup/setup-toolbar.js.map +1 -1
- package/build/components/block-patterns-paging/index.js +5 -7
- package/build/components/block-patterns-paging/index.js.map +1 -1
- package/build/components/block-quick-navigation/index.js +20 -17
- package/build/components/block-quick-navigation/index.js.map +1 -1
- package/build/components/block-removal-warning-modal/index.js +2 -0
- package/build/components/block-removal-warning-modal/index.js.map +1 -1
- package/build/components/block-rename/modal.js +4 -12
- package/build/components/block-rename/modal.js.map +1 -1
- package/build/components/block-switcher/index.js +1 -1
- package/build/components/block-switcher/index.js.map +1 -1
- package/build/components/block-switcher/pattern-transformations-menu.js +11 -12
- package/build/components/block-switcher/pattern-transformations-menu.js.map +1 -1
- package/build/components/block-switcher/preview-block-popover.js +20 -17
- package/build/components/block-switcher/preview-block-popover.js.map +1 -1
- package/build/components/block-toolbar/shuffle.js +6 -2
- package/build/components/block-toolbar/shuffle.js.map +1 -1
- package/build/components/block-tools/block-selection-button.js +7 -58
- package/build/components/block-tools/block-selection-button.js.map +1 -1
- package/build/components/block-tools/block-toolbar-breadcrumb.js +9 -2
- package/build/components/block-tools/block-toolbar-breadcrumb.js.map +1 -1
- package/build/components/block-tools/index.js +14 -1
- package/build/components/block-tools/index.js.map +1 -1
- package/build/components/block-tools/use-show-block-tools.js +9 -8
- package/build/components/block-tools/use-show-block-tools.js.map +1 -1
- package/build/components/block-tools/zoom-out-mode-inserter-button.js +45 -0
- package/build/components/block-tools/zoom-out-mode-inserter-button.js.map +1 -0
- package/build/components/block-tools/zoom-out-mode-inserters.js +29 -28
- package/build/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
- package/build/components/block-tools/zoom-out-popover.js +58 -0
- package/build/components/block-tools/zoom-out-popover.js.map +1 -0
- package/build/components/block-tools/zoom-out-toolbar.js +138 -0
- package/build/components/block-tools/zoom-out-toolbar.js.map +1 -0
- package/build/components/button-block-appender/index.js +3 -1
- package/build/components/button-block-appender/index.js.map +1 -1
- package/build/components/child-layout-control/index.js +26 -18
- package/build/components/child-layout-control/index.js.map +1 -1
- package/build/components/date-format-picker/index.js +1 -1
- package/build/components/date-format-picker/index.js.map +1 -1
- package/build/components/default-block-appender/index.js +7 -4
- package/build/components/default-block-appender/index.js.map +1 -1
- package/build/components/dimensions-tool/index.js +6 -4
- package/build/components/dimensions-tool/index.js.map +1 -1
- package/build/components/font-appearance-control/index.js +22 -62
- package/build/components/font-appearance-control/index.js.map +1 -1
- package/build/components/global-styles/background-panel.js +185 -116
- package/build/components/global-styles/background-panel.js.map +1 -1
- package/build/components/global-styles/border-panel.js +2 -1
- package/build/components/global-styles/border-panel.js.map +1 -1
- package/build/components/global-styles/color-panel.js +2 -1
- package/build/components/global-styles/color-panel.js.map +1 -1
- package/build/components/global-styles/dimensions-panel.js +2 -1
- package/build/components/global-styles/dimensions-panel.js.map +1 -1
- package/build/components/global-styles/filters-panel.js +2 -1
- package/build/components/global-styles/filters-panel.js.map +1 -1
- package/build/components/global-styles/hooks.js +13 -1
- package/build/components/global-styles/hooks.js.map +1 -1
- package/build/components/global-styles/image-settings-panel.js +2 -1
- package/build/components/global-styles/image-settings-panel.js.map +1 -1
- package/build/components/global-styles/typography-panel.js +45 -24
- package/build/components/global-styles/typography-panel.js.map +1 -1
- package/build/components/global-styles/typography-utils.js +121 -0
- package/build/components/global-styles/typography-utils.js.map +1 -1
- package/build/components/global-styles/use-global-styles-output.js +47 -13
- package/build/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build/components/global-styles/utils.js +17 -7
- package/build/components/global-styles/utils.js.map +1 -1
- package/build/components/grid/grid-item-movers.js +90 -48
- package/build/components/grid/grid-item-movers.js.map +1 -1
- package/build/components/grid/grid-item-resizer.js +2 -2
- package/build/components/grid/grid-item-resizer.js.map +1 -1
- package/build/components/grid/grid-visualizer.js +117 -37
- package/build/components/grid/grid-visualizer.js.map +1 -1
- package/build/components/grid/use-grid-layout-sync.js +60 -41
- package/build/components/grid/use-grid-layout-sync.js.map +1 -1
- package/build/components/index.js +1 -9
- package/build/components/index.js.map +1 -1
- package/build/components/inner-blocks/index.js +2 -2
- package/build/components/inner-blocks/index.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +1 -19
- package/build/components/inserter/block-patterns-tab/pattern-category-preview-panel.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/patterns-filter.js +20 -23
- package/build/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
- package/build/components/inserter/media-tab/media-panel.js +1 -0
- package/build/components/inserter/media-tab/media-panel.js.map +1 -1
- package/build/components/inserter/menu.js +26 -4
- package/build/components/inserter/menu.js.map +1 -1
- package/build/components/inserter/preview-panel.js +20 -3
- package/build/components/inserter/preview-panel.js.map +1 -1
- package/build/components/inserter/quick-inserter.js +2 -1
- package/build/components/inserter/quick-inserter.js.map +1 -1
- package/build/components/inserter-draggable-blocks/index.js +10 -3
- package/build/components/inserter-draggable-blocks/index.js.map +1 -1
- package/build/components/inspector-controls/block-support-tools-panel.js +2 -1
- package/build/components/inspector-controls/block-support-tools-panel.js.map +1 -1
- package/build/components/inspector-controls-tabs/settings-tab.js +1 -2
- package/build/components/inspector-controls-tabs/settings-tab.js.map +1 -1
- package/build/components/link-control/link-preview.js +1 -1
- package/build/components/link-control/link-preview.js.map +1 -1
- package/build/components/list-view/block-select-button.js +2 -6
- package/build/components/list-view/block-select-button.js.map +1 -1
- package/build/components/list-view/block.js +2 -2
- package/build/components/list-view/block.js.map +1 -1
- package/build/components/list-view/utils.js +3 -1
- package/build/components/list-view/utils.js.map +1 -1
- package/build/components/media-placeholder/index.js +19 -23
- package/build/components/media-placeholder/index.js.map +1 -1
- package/build/components/navigable-toolbar/index.js +3 -1
- package/build/components/navigable-toolbar/index.js.map +1 -1
- package/build/components/rich-text/format-toolbar/index.js +1 -1
- package/build/components/rich-text/format-toolbar/index.js.map +1 -1
- package/build/components/rich-text/index.js +1 -1
- package/build/components/rich-text/index.js.map +1 -1
- package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js +9 -3
- package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
- package/build/components/tabbed-sidebar/index.js +66 -0
- package/build/components/tabbed-sidebar/index.js.map +1 -0
- package/build/components/url-popover/image-url-input-ui.js +3 -3
- package/build/components/url-popover/image-url-input-ui.js.map +1 -1
- package/build/components/url-popover/index.js +3 -0
- package/build/components/url-popover/index.js.map +1 -1
- package/build/hooks/background.js +26 -4
- package/build/hooks/background.js.map +1 -1
- package/build/hooks/block-hooks.js +11 -17
- package/build/hooks/block-hooks.js.map +1 -1
- package/build/hooks/block-style-variation.js +169 -4
- package/build/hooks/block-style-variation.js.map +1 -1
- package/build/hooks/duotone.js +16 -11
- package/build/hooks/duotone.js.map +1 -1
- package/build/hooks/grid-visualizer.js +62 -0
- package/build/hooks/grid-visualizer.js.map +1 -0
- package/build/hooks/index.js +15 -2
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/layout-child.js +47 -23
- package/build/hooks/layout-child.js.map +1 -1
- package/build/hooks/position.js +4 -15
- package/build/hooks/position.js.map +1 -1
- package/build/hooks/use-bindings-attributes.js +96 -55
- package/build/hooks/use-bindings-attributes.js.map +1 -1
- package/build/hooks/utils.js +2 -0
- package/build/hooks/utils.js.map +1 -1
- package/build/layouts/constrained.js +50 -4
- package/build/layouts/constrained.js.map +1 -1
- package/build/layouts/grid.js +92 -51
- package/build/layouts/grid.js.map +1 -1
- package/build/private-apis.js +6 -4
- package/build/private-apis.js.map +1 -1
- package/build/store/actions.js +18 -1
- package/build/store/actions.js.map +1 -1
- package/build/store/defaults.js +0 -2
- package/build/store/defaults.js.map +1 -1
- package/build/store/defaults.native.js +0 -3
- package/build/store/defaults.native.js.map +1 -1
- package/build/store/private-keys.js +2 -1
- package/build/store/private-keys.js.map +1 -1
- package/build/store/reducer.js +19 -1
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +13 -1
- package/build/store/selectors.js.map +1 -1
- package/build/utils/format-font-style.js +45 -0
- package/build/utils/format-font-style.js.map +1 -0
- package/build/utils/format-font-weight.js +68 -0
- package/build/utils/format-font-weight.js.map +1 -0
- package/build/utils/get-editor-region.js +34 -0
- package/build/utils/get-editor-region.js.map +1 -0
- package/build/utils/get-font-styles-and-weights.js +167 -0
- package/build/utils/get-font-styles-and-weights.js.map +1 -0
- package/build/utils/pasting.js +5 -13
- package/build/utils/pasting.js.map +1 -1
- package/build-module/components/alignment-control/ui.js +2 -2
- package/build-module/components/alignment-control/ui.js.map +1 -1
- package/build-module/components/block-alignment-control/ui.js +1 -1
- package/build-module/components/block-alignment-control/ui.js.map +1 -1
- package/build-module/components/block-alignment-control/ui.native.js +1 -1
- package/build-module/components/block-alignment-control/ui.native.js.map +1 -1
- package/build-module/components/block-breadcrumb/index.js +12 -1
- package/build-module/components/block-breadcrumb/index.js.map +1 -1
- package/build-module/components/block-inspector/index.js +6 -3
- package/build-module/components/block-inspector/index.js.map +1 -1
- package/build-module/components/block-list/use-block-props/index.js +3 -1
- package/build-module/components/block-list/use-block-props/index.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-block-refs.js +11 -4
- package/build-module/components/block-list/use-block-props/use-block-refs.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-is-hovered.js +26 -9
- package/build-module/components/block-list/use-block-props/use-is-hovered.js.map +1 -1
- package/build-module/components/block-list/use-in-between-inserter.js +3 -2
- package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
- package/build-module/components/block-lock/modal.js +2 -0
- package/build-module/components/block-lock/modal.js.map +1 -1
- package/build-module/components/block-lock/toolbar.js +0 -1
- package/build-module/components/block-lock/toolbar.js.map +1 -1
- package/build-module/components/block-mover/button.js +1 -1
- package/build-module/components/block-mover/button.js.map +1 -1
- package/build-module/components/block-mover/index.js +1 -1
- package/build-module/components/block-mover/index.js.map +1 -1
- package/build-module/components/block-pattern-setup/setup-toolbar.js +2 -2
- package/build-module/components/block-pattern-setup/setup-toolbar.js.map +1 -1
- package/build-module/components/block-patterns-paging/index.js +5 -7
- package/build-module/components/block-patterns-paging/index.js.map +1 -1
- package/build-module/components/block-quick-navigation/index.js +20 -17
- package/build-module/components/block-quick-navigation/index.js.map +1 -1
- package/build-module/components/block-removal-warning-modal/index.js +2 -0
- package/build-module/components/block-removal-warning-modal/index.js.map +1 -1
- package/build-module/components/block-rename/modal.js +5 -13
- package/build-module/components/block-rename/modal.js.map +1 -1
- package/build-module/components/block-switcher/index.js +1 -1
- package/build-module/components/block-switcher/index.js.map +1 -1
- package/build-module/components/block-switcher/pattern-transformations-menu.js +12 -13
- package/build-module/components/block-switcher/pattern-transformations-menu.js.map +1 -1
- package/build-module/components/block-switcher/preview-block-popover.js +20 -17
- package/build-module/components/block-switcher/preview-block-popover.js.map +1 -1
- package/build-module/components/block-toolbar/shuffle.js +6 -2
- package/build-module/components/block-toolbar/shuffle.js.map +1 -1
- package/build-module/components/block-tools/block-selection-button.js +10 -61
- package/build-module/components/block-tools/block-selection-button.js.map +1 -1
- package/build-module/components/block-tools/block-toolbar-breadcrumb.js +9 -2
- package/build-module/components/block-tools/block-toolbar-breadcrumb.js.map +1 -1
- package/build-module/components/block-tools/index.js +14 -1
- package/build-module/components/block-tools/index.js.map +1 -1
- package/build-module/components/block-tools/use-show-block-tools.js +9 -8
- package/build-module/components/block-tools/use-show-block-tools.js.map +1 -1
- package/build-module/components/block-tools/zoom-out-mode-inserter-button.js +37 -0
- package/build-module/components/block-tools/zoom-out-mode-inserter-button.js.map +1 -0
- package/build-module/components/block-tools/zoom-out-mode-inserters.js +30 -29
- package/build-module/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
- package/build-module/components/block-tools/zoom-out-popover.js +49 -0
- package/build-module/components/block-tools/zoom-out-popover.js.map +1 -0
- package/build-module/components/block-tools/zoom-out-toolbar.js +131 -0
- package/build-module/components/block-tools/zoom-out-toolbar.js.map +1 -0
- package/build-module/components/button-block-appender/index.js +3 -1
- package/build-module/components/button-block-appender/index.js.map +1 -1
- package/build-module/components/child-layout-control/index.js +27 -19
- package/build-module/components/child-layout-control/index.js.map +1 -1
- package/build-module/components/date-format-picker/index.js +2 -2
- package/build-module/components/date-format-picker/index.js.map +1 -1
- package/build-module/components/default-block-appender/index.js +7 -4
- package/build-module/components/default-block-appender/index.js.map +1 -1
- package/build-module/components/dimensions-tool/index.js +6 -4
- package/build-module/components/dimensions-tool/index.js.map +1 -1
- package/build-module/components/font-appearance-control/index.js +24 -62
- package/build-module/components/font-appearance-control/index.js.map +1 -1
- package/build-module/components/global-styles/background-panel.js +188 -119
- package/build-module/components/global-styles/background-panel.js.map +1 -1
- package/build-module/components/global-styles/border-panel.js +3 -2
- package/build-module/components/global-styles/border-panel.js.map +1 -1
- package/build-module/components/global-styles/color-panel.js +3 -2
- package/build-module/components/global-styles/color-panel.js.map +1 -1
- package/build-module/components/global-styles/dimensions-panel.js +3 -2
- package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
- package/build-module/components/global-styles/filters-panel.js +3 -2
- package/build-module/components/global-styles/filters-panel.js.map +1 -1
- package/build-module/components/global-styles/hooks.js +13 -1
- package/build-module/components/global-styles/hooks.js.map +1 -1
- package/build-module/components/global-styles/image-settings-panel.js +3 -2
- package/build-module/components/global-styles/image-settings-panel.js.map +1 -1
- package/build-module/components/global-styles/typography-panel.js +47 -26
- package/build-module/components/global-styles/typography-panel.js.map +1 -1
- package/build-module/components/global-styles/typography-utils.js +117 -0
- package/build-module/components/global-styles/typography-utils.js.map +1 -1
- package/build-module/components/global-styles/use-global-styles-output.js +47 -13
- package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build-module/components/global-styles/utils.js +15 -6
- package/build-module/components/global-styles/utils.js.map +1 -1
- package/build-module/components/grid/grid-item-movers.js +93 -50
- package/build-module/components/grid/grid-item-movers.js.map +1 -1
- package/build-module/components/grid/grid-item-resizer.js +2 -2
- package/build-module/components/grid/grid-item-resizer.js.map +1 -1
- package/build-module/components/grid/grid-visualizer.js +118 -38
- package/build-module/components/grid/grid-visualizer.js.map +1 -1
- package/build-module/components/grid/use-grid-layout-sync.js +61 -42
- package/build-module/components/grid/use-grid-layout-sync.js.map +1 -1
- package/build-module/components/index.js +0 -5
- package/build-module/components/index.js.map +1 -1
- package/build-module/components/inner-blocks/index.js +2 -2
- package/build-module/components/inner-blocks/index.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +1 -19
- package/build-module/components/inserter/block-patterns-tab/pattern-category-preview-panel.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab/patterns-filter.js +20 -23
- package/build-module/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-panel.js +1 -0
- package/build-module/components/inserter/media-tab/media-panel.js.map +1 -1
- package/build-module/components/inserter/menu.js +26 -4
- package/build-module/components/inserter/menu.js.map +1 -1
- package/build-module/components/inserter/preview-panel.js +20 -3
- package/build-module/components/inserter/preview-panel.js.map +1 -1
- package/build-module/components/inserter/quick-inserter.js +2 -1
- package/build-module/components/inserter/quick-inserter.js.map +1 -1
- package/build-module/components/inserter-draggable-blocks/index.js +10 -3
- package/build-module/components/inserter-draggable-blocks/index.js.map +1 -1
- package/build-module/components/inspector-controls/block-support-tools-panel.js +3 -2
- package/build-module/components/inspector-controls/block-support-tools-panel.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/settings-tab.js +1 -2
- package/build-module/components/inspector-controls-tabs/settings-tab.js.map +1 -1
- package/build-module/components/link-control/link-preview.js +1 -1
- package/build-module/components/link-control/link-preview.js.map +1 -1
- package/build-module/components/list-view/block-select-button.js +3 -7
- package/build-module/components/list-view/block-select-button.js.map +1 -1
- package/build-module/components/list-view/block.js +2 -2
- package/build-module/components/list-view/block.js.map +1 -1
- package/build-module/components/list-view/utils.js +3 -1
- package/build-module/components/list-view/utils.js.map +1 -1
- package/build-module/components/media-placeholder/index.js +19 -23
- package/build-module/components/media-placeholder/index.js.map +1 -1
- package/build-module/components/navigable-toolbar/index.js +3 -1
- package/build-module/components/navigable-toolbar/index.js.map +1 -1
- package/build-module/components/rich-text/format-toolbar/index.js +1 -1
- package/build-module/components/rich-text/format-toolbar/index.js.map +1 -1
- package/build-module/components/rich-text/index.js +1 -1
- package/build-module/components/rich-text/index.js.map +1 -1
- package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js +9 -3
- package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
- package/build-module/components/tabbed-sidebar/index.js +60 -0
- package/build-module/components/tabbed-sidebar/index.js.map +1 -0
- package/build-module/components/url-popover/image-url-input-ui.js +3 -3
- package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
- package/build-module/components/url-popover/index.js +3 -0
- package/build-module/components/url-popover/index.js.map +1 -1
- package/build-module/hooks/background.js +26 -4
- package/build-module/hooks/background.js.map +1 -1
- package/build-module/hooks/block-hooks.js +11 -17
- package/build-module/hooks/block-hooks.js.map +1 -1
- package/build-module/hooks/block-style-variation.js +168 -4
- package/build-module/hooks/block-style-variation.js.map +1 -1
- package/build-module/hooks/duotone.js +16 -11
- package/build-module/hooks/duotone.js.map +1 -1
- package/build-module/hooks/grid-visualizer.js +61 -0
- package/build-module/hooks/grid-visualizer.js.map +1 -0
- package/build-module/hooks/index.js +3 -0
- package/build-module/hooks/index.js.map +1 -1
- package/build-module/hooks/layout-child.js +47 -23
- package/build-module/hooks/layout-child.js.map +1 -1
- package/build-module/hooks/position.js +4 -15
- package/build-module/hooks/position.js.map +1 -1
- package/build-module/hooks/use-bindings-attributes.js +96 -56
- package/build-module/hooks/use-bindings-attributes.js.map +1 -1
- package/build-module/hooks/utils.js +2 -0
- package/build-module/hooks/utils.js.map +1 -1
- package/build-module/layouts/constrained.js +50 -4
- package/build-module/layouts/constrained.js.map +1 -1
- package/build-module/layouts/grid.js +92 -51
- package/build-module/layouts/grid.js.map +1 -1
- package/build-module/private-apis.js +8 -6
- package/build-module/private-apis.js.map +1 -1
- package/build-module/store/actions.js +15 -0
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/defaults.js +0 -2
- package/build-module/store/defaults.js.map +1 -1
- package/build-module/store/defaults.native.js +0 -3
- package/build-module/store/defaults.native.js.map +1 -1
- package/build-module/store/private-keys.js +1 -0
- package/build-module/store/private-keys.js.map +1 -1
- package/build-module/store/reducer.js +18 -1
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +10 -0
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/utils/format-font-style.js +39 -0
- package/build-module/utils/format-font-style.js.map +1 -0
- package/build-module/utils/format-font-weight.js +62 -0
- package/build-module/utils/format-font-weight.js.map +1 -0
- package/build-module/utils/get-editor-region.js +28 -0
- package/build-module/utils/get-editor-region.js.map +1 -0
- package/build-module/utils/get-font-styles-and-weights.js +160 -0
- package/build-module/utils/get-font-styles-and-weights.js.map +1 -0
- package/build-module/utils/pasting.js +5 -13
- package/build-module/utils/pasting.js.map +1 -1
- package/build-style/content-rtl.css +7 -6
- package/build-style/content.css +7 -6
- package/build-style/style-rtl.css +356 -181
- package/build-style/style.css +356 -181
- package/build-types/components/block-context/index.d.ts +2 -2
- package/build-types/components/block-context/index.d.ts.map +1 -1
- package/build-types/utils/dom.d.ts.map +1 -1
- package/package.json +32 -32
- package/src/components/alignment-control/ui.js +2 -2
- package/src/components/block-alignment-control/ui.js +1 -1
- package/src/components/block-alignment-control/ui.native.js +1 -1
- package/src/components/block-breadcrumb/index.js +16 -1
- package/src/components/block-context/README.md +4 -4
- package/src/components/block-inspector/index.js +8 -4
- package/src/components/block-list/content.scss +2 -16
- package/src/components/block-list/use-block-props/index.js +1 -1
- package/src/components/block-list/use-block-props/use-block-refs.js +19 -3
- package/src/components/block-list/use-block-props/use-is-hovered.js +26 -11
- package/src/components/block-list/use-in-between-inserter.js +5 -1
- package/src/components/block-lock/modal.js +10 -2
- package/src/components/block-lock/style.scss +4 -8
- package/src/components/block-lock/toolbar.js +0 -1
- package/src/components/block-mover/button.js +1 -1
- package/src/components/block-mover/index.js +1 -1
- package/src/components/block-pattern-setup/setup-toolbar.js +2 -2
- package/src/components/block-patterns-paging/index.js +8 -11
- package/src/components/block-patterns-paging/style.scss +0 -5
- package/src/components/block-quick-navigation/index.js +21 -28
- package/src/components/block-removal-warning-modal/index.js +10 -2
- package/src/components/block-rename/modal.js +2 -8
- package/src/components/block-switcher/index.js +1 -1
- package/src/components/block-switcher/pattern-transformations-menu.js +17 -15
- package/src/components/block-switcher/preview-block-popover.js +20 -14
- package/src/components/block-switcher/style.scss +8 -17
- package/src/components/block-switcher/test/index.js +6 -6
- package/src/components/block-toolbar/shuffle.js +9 -1
- package/src/components/block-toolbar/style.scss +1 -11
- package/src/components/block-tools/block-selection-button.js +11 -83
- package/src/components/block-tools/block-toolbar-breadcrumb.js +9 -4
- package/src/components/block-tools/index.js +21 -1
- package/src/components/block-tools/style.scss +23 -0
- package/src/components/block-tools/use-show-block-tools.js +21 -10
- package/src/components/block-tools/zoom-out-mode-inserter-button.js +47 -0
- package/src/components/block-tools/zoom-out-mode-inserters.js +44 -33
- package/src/components/block-tools/zoom-out-popover.js +50 -0
- package/src/components/block-tools/zoom-out-toolbar.js +140 -0
- package/src/components/button-block-appender/index.js +2 -1
- package/src/components/child-layout-control/index.js +41 -23
- package/src/components/date-format-picker/index.js +2 -2
- package/src/components/date-format-picker/style.scss +0 -9
- package/src/components/default-block-appender/index.js +11 -4
- package/src/components/dimensions-tool/index.js +97 -89
- package/src/components/font-appearance-control/index.js +24 -82
- package/src/components/font-appearance-control/style.scss +3 -5
- package/src/components/global-styles/background-panel.js +266 -167
- package/src/components/global-styles/border-panel.js +3 -2
- package/src/components/global-styles/color-panel.js +3 -2
- package/src/components/global-styles/dimensions-panel.js +3 -2
- package/src/components/global-styles/filters-panel.js +3 -2
- package/src/components/global-styles/hooks.js +14 -1
- package/src/components/global-styles/image-settings-panel.js +3 -2
- package/src/components/global-styles/style.scss +116 -19
- package/src/components/global-styles/test/typography-utils.js +594 -0
- package/src/components/global-styles/test/use-global-styles-output.js +3 -1
- package/src/components/global-styles/typography-panel.js +56 -27
- package/src/components/global-styles/typography-utils.js +159 -0
- package/src/components/global-styles/use-global-styles-output.js +45 -10
- package/src/components/global-styles/utils.js +17 -6
- package/src/components/grid/grid-item-movers.js +140 -86
- package/src/components/grid/grid-item-resizer.js +3 -2
- package/src/components/grid/grid-visualizer.js +172 -55
- package/src/components/grid/style.scss +157 -8
- package/src/components/grid/use-grid-layout-sync.js +88 -46
- package/src/components/iframe/content.scss +2 -1
- package/src/components/index.js +0 -5
- package/src/components/inner-blocks/index.js +6 -2
- package/src/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +1 -16
- package/src/components/inserter/block-patterns-tab/patterns-filter.js +40 -44
- package/src/components/inserter/media-tab/media-panel.js +1 -0
- package/src/components/inserter/menu.js +47 -13
- package/src/components/inserter/preview-panel.js +27 -4
- package/src/components/inserter/quick-inserter.js +6 -1
- package/src/components/inserter/style.scss +58 -92
- package/src/components/inserter-draggable-blocks/index.js +11 -3
- package/src/components/inspector-controls/block-support-tools-panel.js +3 -3
- package/src/components/inspector-controls-tabs/settings-tab.js +0 -2
- package/src/components/inspector-controls-tabs/style.scss +0 -21
- package/src/components/link-control/link-preview.js +1 -1
- package/src/components/list-view/block-select-button.js +3 -13
- package/src/components/list-view/block.js +10 -3
- package/src/components/list-view/style.scss +2 -1
- package/src/components/list-view/utils.js +13 -2
- package/src/components/media-placeholder/index.js +22 -32
- package/src/components/navigable-toolbar/index.js +3 -1
- package/src/components/rich-text/format-toolbar/index.js +1 -1
- package/src/components/rich-text/index.js +1 -1
- package/src/components/spacing-sizes-control/input-controls/spacing-input-control.js +9 -2
- package/src/components/tabbed-sidebar/README.md +76 -0
- package/src/components/tabbed-sidebar/index.js +70 -0
- package/src/components/tabbed-sidebar/style.scss +53 -0
- package/src/components/url-popover/image-url-input-ui.js +3 -3
- package/src/components/url-popover/index.js +3 -0
- package/src/components/url-popover/style.scss +1 -0
- package/src/hooks/background.js +25 -10
- package/src/hooks/block-hooks.js +9 -16
- package/src/hooks/block-style-variation.js +202 -3
- package/src/hooks/duotone.js +16 -12
- package/src/hooks/grid-visualizer.js +62 -0
- package/src/hooks/index.js +3 -0
- package/src/hooks/layout-child.js +64 -39
- package/src/hooks/position.js +3 -20
- package/src/hooks/test/get-variation-styles-with-ref-values.js +91 -0
- package/src/hooks/use-bindings-attributes.js +107 -63
- package/src/hooks/utils.js +2 -0
- package/src/layouts/constrained.js +53 -4
- package/src/layouts/grid.js +148 -51
- package/src/private-apis.js +12 -7
- package/src/store/actions.js +15 -0
- package/src/store/defaults.js +0 -2
- package/src/store/defaults.native.js +0 -3
- package/src/store/private-keys.js +1 -0
- package/src/store/reducer.js +18 -0
- package/src/store/selectors.js +10 -0
- package/src/style.scss +1 -1
- package/src/utils/format-font-style.js +40 -0
- package/src/utils/format-font-weight.js +63 -0
- package/src/utils/get-editor-region.js +31 -0
- package/src/utils/get-font-styles-and-weights.js +191 -0
- package/src/utils/pasting.js +5 -12
- package/src/utils/test/format-font-style.js +34 -0
- package/src/utils/test/format-font-weight.js +66 -0
- package/src/utils/test/get-font-styles-and-weights.js +513 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/build/components/inserter/reusable-block-rename-hint.js +0 -71
- package/build/components/inserter/reusable-block-rename-hint.js.map +0 -1
- package/build/components/inspector-controls-tabs/settings-tab-hint.js +0 -53
- package/build/components/inspector-controls-tabs/settings-tab-hint.js.map +0 -1
- package/build-module/components/inserter/reusable-block-rename-hint.js +0 -64
- package/build-module/components/inserter/reusable-block-rename-hint.js.map +0 -1
- package/build-module/components/inspector-controls-tabs/settings-tab-hint.js +0 -47
- package/build-module/components/inspector-controls-tabs/settings-tab-hint.js.map +0 -1
- package/src/components/inserter/reusable-block-rename-hint.js +0 -69
- package/src/components/inspector-controls-tabs/settings-tab-hint.js +0 -52
- package/src/hooks/position.scss +0 -18
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
export function BlockContextProvider({ value, children }: BlockContextProviderProps): import("react").JSX.Element;
|
|
9
9
|
export default Context;
|
|
10
|
-
export type ReactNode = import(
|
|
10
|
+
export type ReactNode = import("react").ReactNode;
|
|
11
11
|
export type BlockContextProviderProps = {
|
|
12
12
|
/**
|
|
13
13
|
* Context value to merge with current
|
|
@@ -28,5 +28,5 @@ export type BlockContextProviderProps = {
|
|
|
28
28
|
* @property {ReactNode} children Component children.
|
|
29
29
|
*/
|
|
30
30
|
/** @type {import('react').Context<Record<string,*>>} */
|
|
31
|
-
declare const Context: import(
|
|
31
|
+
declare const Context: import("react").Context<Record<string, any>>;
|
|
32
32
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/block-context/index.js"],"names":[],"mappings":"AAkBA;;;;;;GAMG;AACH,0DAFW,yBAAyB,+BAUnC;;wBA5Ba,OAAO,OAAO,EAAE,SAAS;;;;;;WAKzB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/block-context/index.js"],"names":[],"mappings":"AAkBA;;;;;;GAMG;AACH,0DAFW,yBAAyB,+BAUnC;;wBA5Ba,OAAO,OAAO,EAAE,SAAS;;;;;;WAKzB,MAAM,CAAC,MAAM,EAAC,GAAC,CAAC;;;;cAEhB,SAAS;;AAPvB,qDAAqD;AAErD;;;;;;GAMG;AAEH,wDAAwD;AACxD,uBADW,OAAO,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAC,GAAC,CAAC,CAAC,CAChB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../src/utils/dom.js"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH,iCALW,OAAO,KACP,OAAO,GAEN,OAAO,CAIlB;AAED;;;;;;;;;GASG;AACH,gDANW,OAAO,WACP,OAAO,GAEN,OAAO,CAQlB;AAED;;;;;;;GAOG;AACH,uCALW,IAAI,
|
|
1
|
+
{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../src/utils/dom.js"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH,iCALW,OAAO,KACP,OAAO,GAEN,OAAO,CAIlB;AAED;;;;;;;;;GASG;AACH,gDANW,OAAO,WACP,OAAO,GAEN,OAAO,CAQlB;AAED;;;;;;;GAOG;AACH,uCALW,IAAI,OAAC,GAEJ,MAAM,GAAC,SAAS,CAoB3B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/block-editor",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.4.0",
|
|
4
4
|
"description": "Generic block editor.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -36,35 +36,35 @@
|
|
|
36
36
|
"@emotion/react": "^11.7.1",
|
|
37
37
|
"@emotion/styled": "^11.6.0",
|
|
38
38
|
"@react-spring/web": "^9.4.5",
|
|
39
|
-
"@wordpress/a11y": "^4.
|
|
40
|
-
"@wordpress/api-fetch": "^7.
|
|
41
|
-
"@wordpress/blob": "^4.
|
|
42
|
-
"@wordpress/blocks": "^13.
|
|
43
|
-
"@wordpress/commands": "^1.
|
|
44
|
-
"@wordpress/components": "^28.
|
|
45
|
-
"@wordpress/compose": "^7.
|
|
46
|
-
"@wordpress/data": "^10.
|
|
47
|
-
"@wordpress/date": "^5.
|
|
48
|
-
"@wordpress/deprecated": "^4.
|
|
49
|
-
"@wordpress/dom": "^4.
|
|
50
|
-
"@wordpress/element": "^6.
|
|
51
|
-
"@wordpress/escape-html": "^3.
|
|
52
|
-
"@wordpress/hooks": "^4.
|
|
53
|
-
"@wordpress/html-entities": "^4.
|
|
54
|
-
"@wordpress/i18n": "^5.
|
|
55
|
-
"@wordpress/icons": "^10.
|
|
56
|
-
"@wordpress/is-shallow-equal": "^5.
|
|
57
|
-
"@wordpress/keyboard-shortcuts": "^5.
|
|
58
|
-
"@wordpress/keycodes": "^4.
|
|
59
|
-
"@wordpress/notices": "^5.
|
|
60
|
-
"@wordpress/preferences": "^4.
|
|
61
|
-
"@wordpress/private-apis": "^1.
|
|
62
|
-
"@wordpress/rich-text": "^7.
|
|
63
|
-
"@wordpress/style-engine": "^2.
|
|
64
|
-
"@wordpress/token-list": "^3.
|
|
65
|
-
"@wordpress/url": "^4.
|
|
66
|
-
"@wordpress/warning": "^3.
|
|
67
|
-
"@wordpress/wordcount": "^4.
|
|
39
|
+
"@wordpress/a11y": "^4.4.0",
|
|
40
|
+
"@wordpress/api-fetch": "^7.4.0",
|
|
41
|
+
"@wordpress/blob": "^4.4.0",
|
|
42
|
+
"@wordpress/blocks": "^13.4.0",
|
|
43
|
+
"@wordpress/commands": "^1.4.0",
|
|
44
|
+
"@wordpress/components": "^28.4.0",
|
|
45
|
+
"@wordpress/compose": "^7.4.0",
|
|
46
|
+
"@wordpress/data": "^10.4.0",
|
|
47
|
+
"@wordpress/date": "^5.4.0",
|
|
48
|
+
"@wordpress/deprecated": "^4.4.0",
|
|
49
|
+
"@wordpress/dom": "^4.4.0",
|
|
50
|
+
"@wordpress/element": "^6.4.0",
|
|
51
|
+
"@wordpress/escape-html": "^3.4.0",
|
|
52
|
+
"@wordpress/hooks": "^4.4.0",
|
|
53
|
+
"@wordpress/html-entities": "^4.4.0",
|
|
54
|
+
"@wordpress/i18n": "^5.4.0",
|
|
55
|
+
"@wordpress/icons": "^10.4.0",
|
|
56
|
+
"@wordpress/is-shallow-equal": "^5.4.0",
|
|
57
|
+
"@wordpress/keyboard-shortcuts": "^5.4.0",
|
|
58
|
+
"@wordpress/keycodes": "^4.4.0",
|
|
59
|
+
"@wordpress/notices": "^5.4.0",
|
|
60
|
+
"@wordpress/preferences": "^4.4.0",
|
|
61
|
+
"@wordpress/private-apis": "^1.4.0",
|
|
62
|
+
"@wordpress/rich-text": "^7.4.0",
|
|
63
|
+
"@wordpress/style-engine": "^2.4.0",
|
|
64
|
+
"@wordpress/token-list": "^3.4.0",
|
|
65
|
+
"@wordpress/url": "^4.4.0",
|
|
66
|
+
"@wordpress/warning": "^3.4.0",
|
|
67
|
+
"@wordpress/wordcount": "^4.4.0",
|
|
68
68
|
"change-case": "^4.1.2",
|
|
69
69
|
"clsx": "^2.1.1",
|
|
70
70
|
"colord": "^2.7.0",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"memize": "^2.1.0",
|
|
75
75
|
"postcss": "^8.4.21",
|
|
76
76
|
"postcss-prefixwrap": "^1.41.0",
|
|
77
|
-
"postcss-urlrebase": "^1.
|
|
77
|
+
"postcss-urlrebase": "^1.4.0",
|
|
78
78
|
"react-autosize-textarea": "^7.1.0",
|
|
79
79
|
"react-easy-crop": "^5.0.6",
|
|
80
80
|
"remove-accents": "^0.5.0"
|
|
@@ -86,5 +86,5 @@
|
|
|
86
86
|
"publishConfig": {
|
|
87
87
|
"access": "public"
|
|
88
88
|
},
|
|
89
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "363edb39b8dda8727f652e42cbb8497732693ed2"
|
|
90
90
|
}
|
|
@@ -32,7 +32,7 @@ function AlignmentUI( {
|
|
|
32
32
|
onChange,
|
|
33
33
|
alignmentControls = DEFAULT_ALIGNMENT_CONTROLS,
|
|
34
34
|
label = __( 'Align text' ),
|
|
35
|
-
|
|
35
|
+
description = __( 'Change text alignment' ),
|
|
36
36
|
isCollapsed = true,
|
|
37
37
|
isToolbar,
|
|
38
38
|
} ) {
|
|
@@ -56,7 +56,7 @@ function AlignmentUI( {
|
|
|
56
56
|
? { isCollapsed }
|
|
57
57
|
: {
|
|
58
58
|
toggleProps: {
|
|
59
|
-
|
|
59
|
+
description,
|
|
60
60
|
},
|
|
61
61
|
popoverProps: POPOVER_PROPS,
|
|
62
62
|
};
|
|
@@ -77,7 +77,7 @@ function BlockAlignmentUI( {
|
|
|
77
77
|
};
|
|
78
78
|
} ),
|
|
79
79
|
popoverProps: POPOVER_PROPS,
|
|
80
|
-
toggleProps: {
|
|
80
|
+
toggleProps: { description: __( 'Change alignment' ) },
|
|
81
81
|
};
|
|
82
82
|
|
|
83
83
|
return <UIComponent { ...commonProps } { ...extraProps } />;
|
|
@@ -12,6 +12,8 @@ import { chevronRightSmall, Icon } from '@wordpress/icons';
|
|
|
12
12
|
import BlockTitle from '../block-title';
|
|
13
13
|
import { store as blockEditorStore } from '../../store';
|
|
14
14
|
import { unlock } from '../../lock-unlock';
|
|
15
|
+
import { __unstableUseBlockRef as useBlockRef } from '../block-list/use-block-props/use-block-refs';
|
|
16
|
+
import getEditorRegion from '../../utils/get-editor-region';
|
|
15
17
|
|
|
16
18
|
/**
|
|
17
19
|
* Block breadcrumb component, displaying the hierarchy of the current block selection as a breadcrumb.
|
|
@@ -37,6 +39,10 @@ function BlockBreadcrumb( { rootLabelText } ) {
|
|
|
37
39
|
}, [] );
|
|
38
40
|
const rootLabel = rootLabelText || __( 'Document' );
|
|
39
41
|
|
|
42
|
+
// We don't care about this specific ref, but this is a way
|
|
43
|
+
// to get a ref within the editor canvas so we can focus it later.
|
|
44
|
+
const blockRef = useBlockRef( clientId );
|
|
45
|
+
|
|
40
46
|
/*
|
|
41
47
|
* Disable reason: The `list` ARIA role is redundant but
|
|
42
48
|
* Safari+VoiceOver won't announce the list otherwise.
|
|
@@ -60,7 +66,16 @@ function BlockBreadcrumb( { rootLabelText } ) {
|
|
|
60
66
|
<Button
|
|
61
67
|
className="block-editor-block-breadcrumb__button"
|
|
62
68
|
variant="tertiary"
|
|
63
|
-
onClick={
|
|
69
|
+
onClick={ () => {
|
|
70
|
+
// Find the block editor wrapper for the selected block
|
|
71
|
+
const blockEditor = blockRef.current?.closest(
|
|
72
|
+
'.editor-styles-wrapper'
|
|
73
|
+
);
|
|
74
|
+
|
|
75
|
+
clearSelectedBlock();
|
|
76
|
+
|
|
77
|
+
getEditorRegion( blockEditor )?.focus();
|
|
78
|
+
} }
|
|
64
79
|
>
|
|
65
80
|
{ rootLabel }
|
|
66
81
|
</Button>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# Block Context
|
|
2
2
|
|
|
3
|
-
Block Context is a React implementation of WordPress's block context. Block context, much like [React's context](https://
|
|
3
|
+
Block Context is a React implementation of WordPress's block context. Block context, much like [React's context](https://react.dev/learn/passing-data-deeply-with-context), is a method for passing and inheriting values deeply through a hierarchy of blocks. Because of the similarities with React's context, the client-side implementation here is quite minimal. It is complemented by equivalent behaviors in the server-side rendering of a block.
|
|
4
4
|
|
|
5
5
|
Note that the implementation of Block Context is distinct from [the `BlockEdit` context](../block-edit). While it is true that both provide context relevant for the editing of a block, Block Context is implemented separately so as to prioritize it as most identifiable amongst the machinery of block context, and not amongst other client-side editing context of a block.
|
|
6
6
|
|
|
7
7
|
## Usage
|
|
8
8
|
|
|
9
|
-
Currently, only the [Provider component](https://
|
|
9
|
+
Currently, only the [Provider component](https://react.dev/reference/react/createContext#provider) is made available on the public interface of the `@wordpress/block-editor` module. This can be used to add or override context which can then be consumed by blocks rendered within that context in the block editor.
|
|
10
10
|
|
|
11
11
|
```js
|
|
12
12
|
import { BlockContextProvider } from '@wordpress/block-editor';
|
|
@@ -20,7 +20,7 @@ function MyCustomPostEditor() {
|
|
|
20
20
|
}
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
Internal to the `@wordpress/block-editor` module, a component can access the [full Context object](https://
|
|
23
|
+
Internal to the `@wordpress/block-editor` module, a component can access the [full Context object](https://react.dev/reference/react/createContext), typically for use in combination with [`useContext`](https://react.dev/reference/react/useContext).
|
|
24
24
|
|
|
25
25
|
```js
|
|
26
26
|
import { useContext } from 'react';
|
|
@@ -39,7 +39,7 @@ The reason `BlockContext` is only internally available within the `@wordpress/bl
|
|
|
39
39
|
|
|
40
40
|
## Props
|
|
41
41
|
|
|
42
|
-
`BlockContextProvider` behaves like a standard [`Context.Provider` component](https://
|
|
42
|
+
`BlockContextProvider` behaves like a standard [`Context.Provider` component](https://react.dev/reference/react/createContext#provider). It receives `value` and `children` props. The `value` is merged with the current block context value.
|
|
43
43
|
|
|
44
44
|
### `value`
|
|
45
45
|
|
|
@@ -132,6 +132,10 @@ const BlockInspector = ( { showNoBlockSelectedMessage = true } ) => {
|
|
|
132
132
|
label={ __( 'Color' ) }
|
|
133
133
|
className="color-block-support-panel__inner-wrapper"
|
|
134
134
|
/>
|
|
135
|
+
<InspectorControls.Slot
|
|
136
|
+
group="background"
|
|
137
|
+
label={ __( 'Background image' ) }
|
|
138
|
+
/>
|
|
135
139
|
<InspectorControls.Slot
|
|
136
140
|
group="typography"
|
|
137
141
|
label={ __( 'Typography' ) }
|
|
@@ -285,6 +289,10 @@ const BlockInspectorSingleBlock = ( { clientId, blockName } ) => {
|
|
|
285
289
|
label={ __( 'Color' ) }
|
|
286
290
|
className="color-block-support-panel__inner-wrapper"
|
|
287
291
|
/>
|
|
292
|
+
<InspectorControls.Slot
|
|
293
|
+
group="background"
|
|
294
|
+
label={ __( 'Background image' ) }
|
|
295
|
+
/>
|
|
288
296
|
<InspectorControls.Slot
|
|
289
297
|
group="typography"
|
|
290
298
|
label={ __( 'Typography' ) }
|
|
@@ -298,10 +306,6 @@ const BlockInspectorSingleBlock = ( { clientId, blockName } ) => {
|
|
|
298
306
|
label={ borderPanelLabel }
|
|
299
307
|
/>
|
|
300
308
|
<InspectorControls.Slot group="styles" />
|
|
301
|
-
<InspectorControls.Slot
|
|
302
|
-
group="background"
|
|
303
|
-
label={ __( 'Background image' ) }
|
|
304
|
-
/>
|
|
305
309
|
<PositionControls />
|
|
306
310
|
<div>
|
|
307
311
|
<AdvancedControls />
|
|
@@ -17,20 +17,6 @@
|
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
@mixin selectedOutline() {
|
|
21
|
-
content: "";
|
|
22
|
-
position: absolute;
|
|
23
|
-
pointer-events: none;
|
|
24
|
-
top: 0;
|
|
25
|
-
right: 0;
|
|
26
|
-
bottom: 0;
|
|
27
|
-
left: 0;
|
|
28
|
-
outline-color: var(--wp-admin-theme-color);
|
|
29
|
-
outline-style: solid;
|
|
30
|
-
outline-width: calc(var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1));
|
|
31
|
-
outline-offset: calc((-1 * var(--wp-admin-border-width-focus)) / var(--wp-block-editor-iframe-zoom-out-scale, 1));
|
|
32
|
-
}
|
|
33
|
-
|
|
34
20
|
// Hide selections on this element, otherwise Safari will include it stacked
|
|
35
21
|
// under your actual selection.
|
|
36
22
|
// This uses a CSS hack to show the rules to Safari only. Failing here is okay,
|
|
@@ -101,7 +87,7 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
|
|
|
101
87
|
// We're using a pseudo element to overflow placeholder borders
|
|
102
88
|
// and any border inside the block itself.
|
|
103
89
|
&::after {
|
|
104
|
-
@include
|
|
90
|
+
@include selected-block-focus();
|
|
105
91
|
z-index: 1;
|
|
106
92
|
|
|
107
93
|
// Show a light color for dark themes.
|
|
@@ -281,7 +267,7 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
|
|
|
281
267
|
&:not(.rich-text):not([contenteditable="true"]).is-selected {
|
|
282
268
|
|
|
283
269
|
&::after {
|
|
284
|
-
@include
|
|
270
|
+
@include selected-block-focus();
|
|
285
271
|
}
|
|
286
272
|
}
|
|
287
273
|
}
|
|
@@ -115,7 +115,7 @@ export function useBlockProps( props = {}, { __unstableIsHtml } = {} ) {
|
|
|
115
115
|
useFocusHandler( clientId ),
|
|
116
116
|
useEventHandlers( { clientId, isSelected } ),
|
|
117
117
|
useNavModeExit( clientId ),
|
|
118
|
-
useIsHovered(),
|
|
118
|
+
useIsHovered( { clientId } ),
|
|
119
119
|
useIntersectionObserver(),
|
|
120
120
|
useMovingAnimation( { triggerAnimationOnChange: index, clientId } ),
|
|
121
121
|
useDisabled( { isDisabled: ! hasOverlay } ),
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
5
|
-
|
|
4
|
+
import {
|
|
5
|
+
useContext,
|
|
6
|
+
useMemo,
|
|
7
|
+
useRef,
|
|
8
|
+
useState,
|
|
9
|
+
useLayoutEffect,
|
|
10
|
+
} from '@wordpress/element';
|
|
11
|
+
import { useRefEffect } from '@wordpress/compose';
|
|
6
12
|
|
|
7
13
|
/**
|
|
8
14
|
* Internal dependencies
|
|
@@ -67,7 +73,17 @@ function useBlockRef( clientId ) {
|
|
|
67
73
|
*/
|
|
68
74
|
function useBlockElement( clientId ) {
|
|
69
75
|
const { refsMap } = useContext( BlockRefs );
|
|
70
|
-
|
|
76
|
+
const [ blockElement, setBlockElement ] = useState( null );
|
|
77
|
+
// Delay setting the resulting `blockElement` until an effect. If the block element
|
|
78
|
+
// changes (i.e., the block is unmounted and re-mounted), this allows enough time
|
|
79
|
+
// for the ref callbacks to clean up the old element and set the new one.
|
|
80
|
+
useLayoutEffect( () => {
|
|
81
|
+
setBlockElement( refsMap.get( clientId ) );
|
|
82
|
+
return refsMap.subscribe( clientId, () =>
|
|
83
|
+
setBlockElement( refsMap.get( clientId ) )
|
|
84
|
+
);
|
|
85
|
+
}, [ refsMap, clientId ] );
|
|
86
|
+
return blockElement;
|
|
71
87
|
}
|
|
72
88
|
|
|
73
89
|
export { useBlockRef as __unstableUseBlockRef };
|
|
@@ -2,23 +2,37 @@
|
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { useRefEffect } from '@wordpress/compose';
|
|
5
|
+
import { useDispatch } from '@wordpress/data';
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const action = event.type === 'mouseover' ? 'add' : 'remove';
|
|
12
|
-
|
|
13
|
-
event.preventDefault();
|
|
14
|
-
event.currentTarget.classList[ action ]( 'is-hovered' );
|
|
15
|
-
}
|
|
7
|
+
/**
|
|
8
|
+
* Internal dependencies
|
|
9
|
+
*/
|
|
10
|
+
import { store as blockEditorStore } from '../../../store';
|
|
16
11
|
|
|
17
12
|
/*
|
|
18
13
|
* Adds `is-hovered` class when the block is hovered and in navigation or
|
|
19
14
|
* outline mode.
|
|
20
15
|
*/
|
|
21
|
-
export function useIsHovered() {
|
|
16
|
+
export function useIsHovered( { clientId } ) {
|
|
17
|
+
const { hoverBlock } = useDispatch( blockEditorStore );
|
|
18
|
+
|
|
19
|
+
function listener( event ) {
|
|
20
|
+
if ( event.defaultPrevented ) {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const action = event.type === 'mouseover' ? 'add' : 'remove';
|
|
25
|
+
|
|
26
|
+
event.preventDefault();
|
|
27
|
+
event.currentTarget.classList[ action ]( 'is-hovered' );
|
|
28
|
+
|
|
29
|
+
if ( action === 'add' ) {
|
|
30
|
+
hoverBlock( clientId );
|
|
31
|
+
} else {
|
|
32
|
+
hoverBlock( null );
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
22
36
|
return useRefEffect( ( node ) => {
|
|
23
37
|
node.addEventListener( 'mouseout', listener );
|
|
24
38
|
node.addEventListener( 'mouseover', listener );
|
|
@@ -29,6 +43,7 @@ export function useIsHovered() {
|
|
|
29
43
|
|
|
30
44
|
// Remove class in case it lingers.
|
|
31
45
|
node.classList.remove( 'is-hovered' );
|
|
46
|
+
hoverBlock( null );
|
|
32
47
|
};
|
|
33
48
|
}, [] );
|
|
34
49
|
}
|
|
@@ -29,6 +29,7 @@ export function useInBetweenInserter() {
|
|
|
29
29
|
__unstableIsWithinBlockOverlay,
|
|
30
30
|
getBlockEditingMode,
|
|
31
31
|
getBlockName,
|
|
32
|
+
getBlockAttributes,
|
|
32
33
|
} = useSelect( blockEditorStore );
|
|
33
34
|
const { showInsertionPoint, hideInsertionPoint } =
|
|
34
35
|
useDispatch( blockEditorStore );
|
|
@@ -79,7 +80,10 @@ export function useInBetweenInserter() {
|
|
|
79
80
|
if (
|
|
80
81
|
getTemplateLock( rootClientId ) ||
|
|
81
82
|
getBlockEditingMode( rootClientId ) === 'disabled' ||
|
|
82
|
-
getBlockName( rootClientId ) === 'core/block'
|
|
83
|
+
getBlockName( rootClientId ) === 'core/block' ||
|
|
84
|
+
( rootClientId &&
|
|
85
|
+
getBlockAttributes( rootClientId ).layout
|
|
86
|
+
?.isManualPlacement )
|
|
83
87
|
) {
|
|
84
88
|
return;
|
|
85
89
|
}
|
|
@@ -217,12 +217,20 @@ export default function BlockLockModal( { clientId, onClose } ) {
|
|
|
217
217
|
expanded={ false }
|
|
218
218
|
>
|
|
219
219
|
<FlexItem>
|
|
220
|
-
<Button
|
|
220
|
+
<Button
|
|
221
|
+
variant="tertiary"
|
|
222
|
+
onClick={ onClose }
|
|
223
|
+
__next40pxDefaultSize
|
|
224
|
+
>
|
|
221
225
|
{ __( 'Cancel' ) }
|
|
222
226
|
</Button>
|
|
223
227
|
</FlexItem>
|
|
224
228
|
<FlexItem>
|
|
225
|
-
<Button
|
|
229
|
+
<Button
|
|
230
|
+
variant="primary"
|
|
231
|
+
type="submit"
|
|
232
|
+
__next40pxDefaultSize
|
|
233
|
+
>
|
|
226
234
|
{ __( 'Apply' ) }
|
|
227
235
|
</Button>
|
|
228
236
|
</FlexItem>
|
|
@@ -8,13 +8,9 @@
|
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
.block-editor-block-lock-modal__options {
|
|
12
|
-
margin-
|
|
13
|
-
|
|
14
|
-
legend {
|
|
15
|
-
margin-bottom: $grid-unit-20;
|
|
16
|
-
padding: 0;
|
|
17
|
-
}
|
|
11
|
+
.block-editor-block-lock-modal__options legend {
|
|
12
|
+
margin-bottom: $grid-unit-20;
|
|
13
|
+
padding: 0;
|
|
18
14
|
}
|
|
19
15
|
|
|
20
16
|
.block-editor-block-lock-modal__checklist {
|
|
@@ -52,7 +48,7 @@
|
|
|
52
48
|
.block-editor-block-lock-modal__template-lock {
|
|
53
49
|
border-top: $border-width solid $gray-300;
|
|
54
50
|
margin-top: $grid-unit-20;
|
|
55
|
-
padding: $grid-unit-
|
|
51
|
+
padding-top: $grid-unit-20;
|
|
56
52
|
}
|
|
57
53
|
|
|
58
54
|
.block-editor-block-lock-modal__actions {
|
|
@@ -143,7 +143,7 @@ const BlockMoverButton = forwardRef(
|
|
|
143
143
|
{ ...props }
|
|
144
144
|
onClick={ isDisabled ? null : onClick }
|
|
145
145
|
disabled={ isDisabled }
|
|
146
|
-
|
|
146
|
+
accessibleWhenDisabled
|
|
147
147
|
/>
|
|
148
148
|
<VisuallyHidden id={ descriptionId }>
|
|
149
149
|
{ getBlockMoverDescription(
|
|
@@ -35,14 +35,14 @@ const CarouselNavigation = ( {
|
|
|
35
35
|
label={ __( 'Previous pattern' ) }
|
|
36
36
|
onClick={ handlePrevious }
|
|
37
37
|
disabled={ activeSlide === 0 }
|
|
38
|
-
|
|
38
|
+
accessibleWhenDisabled
|
|
39
39
|
/>
|
|
40
40
|
<Button
|
|
41
41
|
icon={ chevronRight }
|
|
42
42
|
label={ __( 'Next pattern' ) }
|
|
43
43
|
onClick={ handleNext }
|
|
44
44
|
disabled={ activeSlide === totalSlides - 1 }
|
|
45
|
-
|
|
45
|
+
accessibleWhenDisabled
|
|
46
46
|
/>
|
|
47
47
|
</div>
|
|
48
48
|
);
|
|
@@ -18,14 +18,11 @@ export default function Pagination( {
|
|
|
18
18
|
return (
|
|
19
19
|
<VStack className="block-editor-patterns__grid-pagination-wrapper">
|
|
20
20
|
<Text variant="muted">
|
|
21
|
-
{
|
|
21
|
+
{ sprintf(
|
|
22
22
|
// translators: %s: Total number of patterns.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
totalItems
|
|
27
|
-
)
|
|
28
|
-
}
|
|
23
|
+
_n( '%s item', '%s items', totalItems ),
|
|
24
|
+
totalItems
|
|
25
|
+
) }
|
|
29
26
|
</Text>
|
|
30
27
|
|
|
31
28
|
{ numPages > 1 && (
|
|
@@ -45,7 +42,7 @@ export default function Pagination( {
|
|
|
45
42
|
onClick={ () => changePage( 1 ) }
|
|
46
43
|
disabled={ currentPage === 1 }
|
|
47
44
|
aria-label={ __( 'First page' ) }
|
|
48
|
-
|
|
45
|
+
accessibleWhenDisabled
|
|
49
46
|
>
|
|
50
47
|
<span>«</span>
|
|
51
48
|
</Button>
|
|
@@ -54,7 +51,7 @@ export default function Pagination( {
|
|
|
54
51
|
onClick={ () => changePage( currentPage - 1 ) }
|
|
55
52
|
disabled={ currentPage === 1 }
|
|
56
53
|
aria-label={ __( 'Previous page' ) }
|
|
57
|
-
|
|
54
|
+
accessibleWhenDisabled
|
|
58
55
|
>
|
|
59
56
|
<span>‹</span>
|
|
60
57
|
</Button>
|
|
@@ -77,7 +74,7 @@ export default function Pagination( {
|
|
|
77
74
|
onClick={ () => changePage( currentPage + 1 ) }
|
|
78
75
|
disabled={ currentPage === numPages }
|
|
79
76
|
aria-label={ __( 'Next page' ) }
|
|
80
|
-
|
|
77
|
+
accessibleWhenDisabled
|
|
81
78
|
>
|
|
82
79
|
<span>›</span>
|
|
83
80
|
</Button>
|
|
@@ -87,7 +84,7 @@ export default function Pagination( {
|
|
|
87
84
|
disabled={ currentPage === numPages }
|
|
88
85
|
aria-label={ __( 'Last page' ) }
|
|
89
86
|
size="default"
|
|
90
|
-
|
|
87
|
+
accessibleWhenDisabled
|
|
91
88
|
>
|
|
92
89
|
<span>»</span>
|
|
93
90
|
</Button>
|
|
@@ -24,11 +24,6 @@
|
|
|
24
24
|
|
|
25
25
|
.show-icon-labels {
|
|
26
26
|
.block-editor-patterns__grid-pagination {
|
|
27
|
-
flex-direction: column;
|
|
28
|
-
.block-editor-patterns__grid-pagination-previous,
|
|
29
|
-
.block-editor-patterns__grid-pagination-next {
|
|
30
|
-
flex-direction: column;
|
|
31
|
-
}
|
|
32
27
|
.components-button {
|
|
33
28
|
width: auto;
|
|
34
29
|
// Hide the button icons when labels are set to display...
|