@wordpress/block-editor 14.3.3 → 14.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 +2 -0
- package/README.md +46 -0
- package/build/autocompleters/link.js +2 -1
- package/build/autocompleters/link.js.map +1 -1
- package/build/components/block-actions/index.js +1 -13
- package/build/components/block-actions/index.js.map +1 -1
- package/build/components/block-inspector/index.js +56 -75
- package/build/components/block-inspector/index.js.map +1 -1
- package/build/components/block-list/block.js +5 -19
- package/build/components/block-list/block.js.map +1 -1
- package/build/components/block-list/index.js +5 -8
- package/build/components/block-list/index.js.map +1 -1
- package/build/components/block-list/use-block-props/index.js +3 -11
- package/build/components/block-list/use-block-props/index.js.map +1 -1
- package/build/components/block-list/use-block-props/use-zoom-out-mode-exit.js +9 -12
- package/build/components/block-list/use-block-props/use-zoom-out-mode-exit.js.map +1 -1
- package/build/components/block-list/use-in-between-inserter.js +5 -3
- package/build/components/block-list/use-in-between-inserter.js.map +1 -1
- package/build/components/block-list/zoom-out-separator.js +14 -6
- package/build/components/block-list/zoom-out-separator.js.map +1 -1
- package/build/components/block-navigation/dropdown.js +2 -4
- package/build/components/block-navigation/dropdown.js.map +1 -1
- package/build/components/block-parent-selector/index.js +13 -10
- package/build/components/block-parent-selector/index.js.map +1 -1
- package/build/components/block-pattern-setup/setup-toolbar.js +10 -20
- package/build/components/block-pattern-setup/setup-toolbar.js.map +1 -1
- package/build/components/block-patterns-paging/index.js +11 -13
- package/build/components/block-patterns-paging/index.js.map +1 -1
- package/build/components/block-quick-navigation/index.js +2 -4
- package/build/components/block-quick-navigation/index.js.map +1 -1
- package/build/components/block-settings-menu/block-settings-dropdown.js +79 -76
- package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build/components/block-settings-menu-controls/index.js +1 -6
- package/build/components/block-settings-menu-controls/index.js.map +1 -1
- package/build/components/block-switcher/index.js +17 -14
- package/build/components/block-switcher/index.js.map +1 -1
- package/build/components/block-toolbar/index.js +16 -19
- package/build/components/block-toolbar/index.js.map +1 -1
- package/build/components/block-toolbar/use-has-block-toolbar.js +3 -5
- package/build/components/block-toolbar/use-has-block-toolbar.js.map +1 -1
- package/build/components/block-tools/index.js +8 -11
- package/build/components/block-tools/index.js.map +1 -1
- package/build/components/block-tools/insertion-point.js +1 -4
- package/build/components/block-tools/insertion-point.js.map +1 -1
- package/build/components/block-tools/use-show-block-tools.js +2 -5
- package/build/components/block-tools/use-show-block-tools.js.map +1 -1
- package/build/components/block-tools/zoom-out-mode-inserter-button.js +1 -12
- package/build/components/block-tools/zoom-out-mode-inserter-button.js.map +1 -1
- package/build/components/block-tools/zoom-out-mode-inserters.js +14 -17
- package/build/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
- package/build/components/block-tools/zoom-out-toolbar.js +2 -12
- package/build/components/block-tools/zoom-out-toolbar.js.map +1 -1
- package/build/components/block-variation-picker/index.js +2 -4
- package/build/components/block-variation-picker/index.js.map +1 -1
- package/build/components/block-variation-transforms/index.js +3 -4
- package/build/components/block-variation-transforms/index.js.map +1 -1
- package/build/components/button-block-appender/index.js +2 -4
- package/build/components/button-block-appender/index.js.map +1 -1
- package/build/components/colors-gradients/dropdown.js +2 -4
- package/build/components/colors-gradients/dropdown.js.map +1 -1
- package/build/components/global-styles/border-panel.js +1 -1
- package/build/components/global-styles/border-panel.js.map +1 -1
- package/build/components/global-styles/color-panel.js +2 -4
- package/build/components/global-styles/color-panel.js.map +1 -1
- package/build/components/global-styles/dimensions-panel.js +3 -3
- package/build/components/global-styles/dimensions-panel.js.map +1 -1
- package/build/components/global-styles/filters-panel.js +2 -4
- package/build/components/global-styles/filters-panel.js.map +1 -1
- package/build/components/global-styles/shadow-panel-components.js +24 -29
- package/build/components/global-styles/shadow-panel-components.js.map +1 -1
- package/build/components/inner-blocks/index.js +1 -9
- package/build/components/inner-blocks/index.js.map +1 -1
- package/build/components/inserter/block-types-tab.js +1 -1
- package/build/components/inserter/block-types-tab.js.map +1 -1
- package/build/components/inserter/hooks/use-block-types-state.js +24 -5
- package/build/components/inserter/hooks/use-block-types-state.js.map +1 -1
- package/build/components/inserter/hooks/use-insertion-point.js +22 -12
- package/build/components/inserter/hooks/use-insertion-point.js.map +1 -1
- package/build/components/inserter/hooks/use-patterns-state.js +23 -10
- package/build/components/inserter/hooks/use-patterns-state.js.map +1 -1
- package/build/components/inserter/media-tab/media-preview.js +35 -13
- package/build/components/inserter/media-tab/media-preview.js.map +1 -1
- package/build/components/inserter/menu.js +2 -2
- package/build/components/inserter/menu.js.map +1 -1
- package/build/components/inserter/mobile-tab-navigation.js +5 -5
- package/build/components/inserter/mobile-tab-navigation.js.map +1 -1
- package/build/components/inserter/quick-inserter.js +4 -4
- package/build/components/inserter/quick-inserter.js.map +1 -1
- package/build/components/inspector-controls-tabs/index.js +11 -8
- package/build/components/inspector-controls-tabs/index.js.map +1 -1
- package/build/components/inspector-popover-header/index.js +4 -8
- package/build/components/inspector-popover-header/index.js.map +1 -1
- package/build/components/link-control/index.js +5 -10
- package/build/components/link-control/index.js.map +1 -1
- package/build/components/link-control/settings-drawer.js +2 -4
- package/build/components/link-control/settings-drawer.js.map +1 -1
- package/build/components/list-view/block-contents.js +1 -25
- package/build/components/list-view/block-contents.js.map +1 -1
- package/build/components/list-view/block-select-button.js +1 -4
- package/build/components/list-view/block-select-button.js.map +1 -1
- package/build/components/media-placeholder/index.js +29 -43
- package/build/components/media-placeholder/index.js.map +1 -1
- package/build/components/rich-text/index.js +4 -8
- package/build/components/rich-text/index.js.map +1 -1
- package/build/components/skip-to-selected-block/index.js +2 -4
- package/build/components/skip-to-selected-block/index.js.map +1 -1
- package/build/components/tool-selector/index.js +13 -12
- package/build/components/tool-selector/index.js.map +1 -1
- package/build/components/url-input/button.js +14 -16
- package/build/components/url-input/button.js.map +1 -1
- package/build/components/url-input/index.js +2 -4
- package/build/components/url-input/index.js.map +1 -1
- package/build/components/use-block-commands/index.js +0 -61
- package/build/components/use-block-commands/index.js.map +1 -1
- package/build/components/writing-flow/use-tab-nav.js +2 -25
- package/build/components/writing-flow/use-tab-nav.js.map +1 -1
- package/build/hooks/block-bindings.js +6 -13
- package/build/hooks/block-bindings.js.map +1 -1
- package/build/hooks/duotone.js +4 -1
- package/build/hooks/duotone.js.map +1 -1
- package/build/hooks/layout-child.js +3 -1
- package/build/hooks/layout-child.js.map +1 -1
- package/build/hooks/position.js +3 -2
- package/build/hooks/position.js.map +1 -1
- package/build/hooks/use-bindings-attributes.js +5 -4
- package/build/hooks/use-bindings-attributes.js.map +1 -1
- package/build/layouts/flex.js +6 -38
- package/build/layouts/flex.js.map +1 -1
- package/build/private-apis.js +0 -2
- package/build/private-apis.js.map +1 -1
- package/build/store/actions.js +13 -14
- package/build/store/actions.js.map +1 -1
- package/build/store/private-actions.js +15 -0
- package/build/store/private-actions.js.map +1 -1
- package/build/store/private-selectors.js +104 -7
- package/build/store/private-selectors.js.map +1 -1
- package/build/store/reducer.js +22 -26
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +127 -56
- package/build/store/selectors.js.map +1 -1
- package/build/store/utils.js +4 -3
- package/build/store/utils.js.map +1 -1
- package/build/utils/block-bindings.js +50 -0
- package/build/utils/block-bindings.js.map +1 -1
- package/build/utils/index.js +7 -0
- package/build/utils/index.js.map +1 -1
- package/build-module/autocompleters/link.js +2 -1
- package/build-module/autocompleters/link.js.map +1 -1
- package/build-module/components/block-actions/index.js +1 -13
- package/build-module/components/block-actions/index.js.map +1 -1
- package/build-module/components/block-inspector/index.js +57 -76
- package/build-module/components/block-inspector/index.js.map +1 -1
- package/build-module/components/block-list/block.js +5 -19
- package/build-module/components/block-list/block.js.map +1 -1
- package/build-module/components/block-list/index.js +5 -8
- package/build-module/components/block-list/index.js.map +1 -1
- package/build-module/components/block-list/use-block-props/index.js +3 -11
- package/build-module/components/block-list/use-block-props/index.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-zoom-out-mode-exit.js +9 -12
- package/build-module/components/block-list/use-block-props/use-zoom-out-mode-exit.js.map +1 -1
- package/build-module/components/block-list/use-in-between-inserter.js +5 -3
- package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
- package/build-module/components/block-list/zoom-out-separator.js +14 -6
- package/build-module/components/block-list/zoom-out-separator.js.map +1 -1
- package/build-module/components/block-navigation/dropdown.js +2 -4
- package/build-module/components/block-navigation/dropdown.js.map +1 -1
- package/build-module/components/block-parent-selector/index.js +13 -10
- package/build-module/components/block-parent-selector/index.js.map +1 -1
- package/build-module/components/block-pattern-setup/setup-toolbar.js +10 -20
- package/build-module/components/block-pattern-setup/setup-toolbar.js.map +1 -1
- package/build-module/components/block-patterns-paging/index.js +11 -13
- package/build-module/components/block-patterns-paging/index.js.map +1 -1
- package/build-module/components/block-quick-navigation/index.js +2 -4
- package/build-module/components/block-quick-navigation/index.js.map +1 -1
- package/build-module/components/block-settings-menu/block-settings-dropdown.js +79 -76
- package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build-module/components/block-settings-menu-controls/index.js +2 -7
- package/build-module/components/block-settings-menu-controls/index.js.map +1 -1
- package/build-module/components/block-switcher/index.js +17 -14
- package/build-module/components/block-switcher/index.js.map +1 -1
- package/build-module/components/block-toolbar/index.js +17 -20
- package/build-module/components/block-toolbar/index.js.map +1 -1
- package/build-module/components/block-toolbar/use-has-block-toolbar.js +3 -5
- package/build-module/components/block-toolbar/use-has-block-toolbar.js.map +1 -1
- package/build-module/components/block-tools/index.js +8 -11
- package/build-module/components/block-tools/index.js.map +1 -1
- package/build-module/components/block-tools/insertion-point.js +1 -4
- package/build-module/components/block-tools/insertion-point.js.map +1 -1
- package/build-module/components/block-tools/use-show-block-tools.js +2 -5
- 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 +1 -12
- package/build-module/components/block-tools/zoom-out-mode-inserter-button.js.map +1 -1
- package/build-module/components/block-tools/zoom-out-mode-inserters.js +14 -17
- package/build-module/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
- package/build-module/components/block-tools/zoom-out-toolbar.js +2 -12
- package/build-module/components/block-tools/zoom-out-toolbar.js.map +1 -1
- package/build-module/components/block-variation-picker/index.js +2 -4
- package/build-module/components/block-variation-picker/index.js.map +1 -1
- package/build-module/components/block-variation-transforms/index.js +3 -4
- package/build-module/components/block-variation-transforms/index.js.map +1 -1
- package/build-module/components/button-block-appender/index.js +2 -4
- package/build-module/components/button-block-appender/index.js.map +1 -1
- package/build-module/components/colors-gradients/dropdown.js +2 -4
- package/build-module/components/colors-gradients/dropdown.js.map +1 -1
- package/build-module/components/global-styles/border-panel.js +1 -1
- package/build-module/components/global-styles/border-panel.js.map +1 -1
- package/build-module/components/global-styles/color-panel.js +2 -4
- package/build-module/components/global-styles/color-panel.js.map +1 -1
- package/build-module/components/global-styles/dimensions-panel.js +1 -1
- package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
- package/build-module/components/global-styles/filters-panel.js +2 -4
- package/build-module/components/global-styles/filters-panel.js.map +1 -1
- package/build-module/components/global-styles/shadow-panel-components.js +25 -30
- package/build-module/components/global-styles/shadow-panel-components.js.map +1 -1
- package/build-module/components/inner-blocks/index.js +1 -9
- package/build-module/components/inner-blocks/index.js.map +1 -1
- package/build-module/components/inserter/block-types-tab.js +1 -1
- package/build-module/components/inserter/block-types-tab.js.map +1 -1
- package/build-module/components/inserter/hooks/use-block-types-state.js +27 -8
- package/build-module/components/inserter/hooks/use-block-types-state.js.map +1 -1
- package/build-module/components/inserter/hooks/use-insertion-point.js +22 -12
- package/build-module/components/inserter/hooks/use-insertion-point.js.map +1 -1
- package/build-module/components/inserter/hooks/use-patterns-state.js +23 -10
- package/build-module/components/inserter/hooks/use-patterns-state.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-preview.js +35 -13
- package/build-module/components/inserter/media-tab/media-preview.js.map +1 -1
- package/build-module/components/inserter/menu.js +2 -2
- package/build-module/components/inserter/menu.js.map +1 -1
- package/build-module/components/inserter/mobile-tab-navigation.js +6 -6
- package/build-module/components/inserter/mobile-tab-navigation.js.map +1 -1
- package/build-module/components/inserter/quick-inserter.js +4 -4
- package/build-module/components/inserter/quick-inserter.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/index.js +12 -9
- package/build-module/components/inspector-controls-tabs/index.js.map +1 -1
- package/build-module/components/inspector-popover-header/index.js +4 -8
- package/build-module/components/inspector-popover-header/index.js.map +1 -1
- package/build-module/components/link-control/index.js +5 -10
- package/build-module/components/link-control/index.js.map +1 -1
- package/build-module/components/link-control/settings-drawer.js +2 -4
- package/build-module/components/link-control/settings-drawer.js.map +1 -1
- package/build-module/components/list-view/block-contents.js +1 -25
- package/build-module/components/list-view/block-contents.js.map +1 -1
- package/build-module/components/list-view/block-select-button.js +2 -5
- package/build-module/components/list-view/block-select-button.js.map +1 -1
- package/build-module/components/media-placeholder/index.js +30 -44
- package/build-module/components/media-placeholder/index.js.map +1 -1
- package/build-module/components/rich-text/index.js +4 -8
- package/build-module/components/rich-text/index.js.map +1 -1
- package/build-module/components/skip-to-selected-block/index.js +2 -4
- package/build-module/components/skip-to-selected-block/index.js.map +1 -1
- package/build-module/components/tool-selector/index.js +13 -12
- package/build-module/components/tool-selector/index.js.map +1 -1
- package/build-module/components/url-input/button.js +15 -17
- package/build-module/components/url-input/button.js.map +1 -1
- package/build-module/components/url-input/index.js +2 -4
- package/build-module/components/url-input/index.js.map +1 -1
- package/build-module/components/use-block-commands/index.js +1 -62
- package/build-module/components/use-block-commands/index.js.map +1 -1
- package/build-module/components/writing-flow/use-tab-nav.js +3 -26
- package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
- package/build-module/hooks/block-bindings.js +6 -13
- package/build-module/hooks/block-bindings.js.map +1 -1
- package/build-module/hooks/duotone.js +4 -1
- package/build-module/hooks/duotone.js.map +1 -1
- package/build-module/hooks/layout-child.js +4 -1
- package/build-module/hooks/layout-child.js.map +1 -1
- package/build-module/hooks/position.js +4 -1
- package/build-module/hooks/position.js.map +1 -1
- package/build-module/hooks/use-bindings-attributes.js +5 -4
- package/build-module/hooks/use-bindings-attributes.js.map +1 -1
- package/build-module/layouts/flex.js +7 -39
- package/build-module/layouts/flex.js.map +1 -1
- package/build-module/private-apis.js +0 -2
- package/build-module/private-apis.js.map +1 -1
- package/build-module/store/actions.js +12 -12
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/private-actions.js +14 -0
- package/build-module/store/private-actions.js.map +1 -1
- package/build-module/store/private-selectors.js +98 -7
- package/build-module/store/private-selectors.js.map +1 -1
- package/build-module/store/reducer.js +21 -25
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +129 -58
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/store/utils.js +3 -2
- package/build-module/store/utils.js.map +1 -1
- package/build-module/utils/block-bindings.js +50 -0
- package/build-module/utils/block-bindings.js.map +1 -1
- package/build-module/utils/index.js +1 -0
- package/build-module/utils/index.js.map +1 -1
- package/build-style/content-rtl.css +16 -70
- package/build-style/content.css +16 -70
- package/build-style/default-editor-styles-rtl.css +10 -1
- package/build-style/default-editor-styles.css +10 -1
- package/build-style/style-rtl.css +51 -149
- package/build-style/style.css +51 -149
- package/package.json +32 -32
- package/src/autocompleters/link.js +2 -1
- package/src/components/block-actions/index.js +1 -13
- package/src/components/block-draggable/style.scss +2 -2
- package/src/components/block-inspector/index.js +79 -95
- package/src/components/block-inspector/style.scss +2 -0
- package/src/components/block-list/block.js +7 -28
- package/src/components/block-list/content.scss +1 -61
- package/src/components/block-list/index.js +21 -29
- package/src/components/block-list/use-block-props/index.js +3 -10
- package/src/components/block-list/use-block-props/use-zoom-out-mode-exit.js +19 -11
- package/src/components/block-list/use-in-between-inserter.js +5 -2
- package/src/components/block-list/zoom-out-separator.js +24 -8
- package/src/components/block-navigation/dropdown.js +1 -2
- package/src/components/block-parent-selector/index.js +13 -10
- package/src/components/block-pattern-setup/setup-toolbar.js +5 -10
- package/src/components/block-patterns-paging/index.js +8 -7
- package/src/components/block-patterns-paging/style.scss +10 -27
- package/src/components/block-quick-navigation/index.js +1 -2
- package/src/components/block-settings-menu/block-settings-dropdown.js +120 -106
- package/src/components/block-settings-menu-controls/index.js +0 -15
- package/src/components/block-switcher/index.js +37 -30
- package/src/components/block-toolbar/index.js +22 -34
- package/src/components/block-toolbar/style.scss +10 -1
- package/src/components/block-toolbar/use-has-block-toolbar.js +19 -31
- package/src/components/block-tools/index.js +7 -16
- package/src/components/block-tools/insertion-point.js +1 -4
- package/src/components/block-tools/style.scss +3 -88
- package/src/components/block-tools/use-show-block-tools.js +2 -12
- package/src/components/block-tools/zoom-out-mode-inserter-button.js +2 -17
- package/src/components/block-tools/zoom-out-mode-inserters.js +11 -19
- package/src/components/block-tools/zoom-out-toolbar.js +2 -13
- package/src/components/block-variation-picker/index.js +1 -2
- package/src/components/block-variation-transforms/index.js +2 -2
- package/src/components/button-block-appender/content.scss +0 -5
- package/src/components/button-block-appender/index.js +1 -2
- package/src/components/colors-gradients/dropdown.js +1 -5
- package/src/components/font-family/README.md +5 -1
- package/src/components/global-styles/border-panel.js +1 -1
- package/src/components/global-styles/color-panel.js +1 -5
- package/src/components/global-styles/dimensions-panel.js +1 -1
- package/src/components/global-styles/filters-panel.js +1 -2
- package/src/components/global-styles/shadow-panel-components.js +28 -33
- package/src/components/global-styles/style.scss +5 -0
- package/src/components/inner-blocks/index.js +1 -16
- package/src/components/inserter/block-types-tab.js +1 -1
- package/src/components/inserter/hooks/use-block-types-state.js +34 -14
- package/src/components/inserter/hooks/use-insertion-point.js +35 -13
- package/src/components/inserter/hooks/use-patterns-state.js +46 -9
- package/src/components/inserter/media-tab/media-preview.js +38 -12
- package/src/components/inserter/menu.js +2 -2
- package/src/components/inserter/mobile-tab-navigation.js +10 -13
- package/src/components/inserter/quick-inserter.js +5 -4
- package/src/components/inserter/style.scss +0 -28
- package/src/components/inspector-controls-tabs/index.js +21 -20
- package/src/components/inspector-controls-tabs/style.scss +2 -6
- package/src/components/inspector-popover-header/index.js +2 -4
- package/src/components/inspector-popover-header/style.scss +0 -13
- package/src/components/link-control/index.js +2 -5
- package/src/components/link-control/settings-drawer.js +1 -2
- package/src/components/list-view/block-contents.js +1 -28
- package/src/components/list-view/block-select-button.js +2 -5
- package/src/components/list-view/style.scss +18 -14
- package/src/components/media-placeholder/content.scss +3 -19
- package/src/components/media-placeholder/index.js +23 -29
- package/src/components/rich-text/index.js +4 -13
- package/src/components/skip-to-selected-block/index.js +1 -2
- package/src/components/skip-to-selected-block/style.scss +0 -9
- package/src/components/tool-selector/index.js +14 -9
- package/src/components/tool-selector/style.scss +5 -0
- package/src/components/url-input/button.js +16 -12
- package/src/components/url-input/index.js +1 -2
- package/src/components/url-input/style.scss +0 -6
- package/src/components/use-block-commands/index.js +0 -58
- package/src/components/writing-flow/use-tab-nav.js +4 -36
- package/src/content.scss +0 -1
- package/src/hooks/block-bindings.js +9 -10
- package/src/hooks/duotone.js +4 -1
- package/src/hooks/layout-child.js +4 -1
- package/src/hooks/position.js +4 -1
- package/src/hooks/use-bindings-attributes.js +66 -63
- package/src/layouts/flex.js +10 -53
- package/src/private-apis.js +0 -2
- package/src/store/actions.js +14 -13
- package/src/store/private-actions.js +14 -0
- package/src/store/private-selectors.js +120 -16
- package/src/store/reducer.js +22 -28
- package/src/store/selectors.js +203 -114
- package/src/store/test/private-actions.js +15 -0
- package/src/store/test/private-selectors.js +34 -0
- package/src/store/test/reducer.js +40 -4
- package/src/store/test/selectors.js +183 -20
- package/src/store/utils.js +4 -2
- package/src/utils/block-bindings.js +49 -0
- package/src/utils/index.js +1 -0
- package/build/components/block-controls/use-has-block-controls.js +0 -43
- package/build/components/block-controls/use-has-block-controls.js.map +0 -1
- package/build/components/block-list/use-block-props/use-nav-mode-exit.js +0 -54
- package/build/components/block-list/use-block-props/use-nav-mode-exit.js.map +0 -1
- package/build/components/block-tools/block-selection-button.js +0 -259
- package/build/components/block-tools/block-selection-button.js.map +0 -1
- package/build/components/block-tools/block-toolbar-breadcrumb.js +0 -57
- package/build/components/block-tools/block-toolbar-breadcrumb.js.map +0 -1
- package/build/components/inserter/tabs.js +0 -78
- package/build/components/inserter/tabs.js.map +0 -1
- package/build-module/components/block-controls/use-has-block-controls.js +0 -34
- package/build-module/components/block-controls/use-has-block-controls.js.map +0 -1
- package/build-module/components/block-list/use-block-props/use-nav-mode-exit.js +0 -48
- package/build-module/components/block-list/use-block-props/use-nav-mode-exit.js.map +0 -1
- package/build-module/components/block-tools/block-selection-button.js +0 -254
- package/build-module/components/block-tools/block-selection-button.js.map +0 -1
- package/build-module/components/block-tools/block-toolbar-breadcrumb.js +0 -49
- package/build-module/components/block-tools/block-toolbar-breadcrumb.js.map +0 -1
- package/build-module/components/inserter/tabs.js +0 -72
- package/build-module/components/inserter/tabs.js.map +0 -1
- package/src/components/block-controls/use-has-block-controls.js +0 -35
- package/src/components/block-list/use-block-props/use-nav-mode-exit.js +0 -46
- package/src/components/block-tools/block-selection-button.js +0 -302
- package/src/components/block-tools/block-toolbar-breadcrumb.js +0 -51
- package/src/components/inner-blocks/content.scss +0 -13
- package/src/components/inserter/tabs.js +0 -78
- package/src/components/inserter/test/block-types-tab.native.js +0 -67
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { focus, isFormElement } from '@wordpress/dom';
|
|
5
|
-
import { TAB
|
|
5
|
+
import { TAB } from '@wordpress/keycodes';
|
|
6
6
|
import { useSelect, useDispatch } from '@wordpress/data';
|
|
7
7
|
import { useRefEffect, useMergeRefs } from '@wordpress/compose';
|
|
8
8
|
import { useRef } from '@wordpress/element';
|
|
@@ -21,19 +21,9 @@ export default function useTabNav() {
|
|
|
21
21
|
|
|
22
22
|
const { hasMultiSelection, getSelectedBlockClientId, getBlockCount } =
|
|
23
23
|
useSelect( blockEditorStore );
|
|
24
|
-
const {
|
|
25
|
-
useDispatch( blockEditorStore )
|
|
26
|
-
);
|
|
27
|
-
const isNavigationMode = useSelect(
|
|
28
|
-
( select ) => select( blockEditorStore ).isNavigationMode(),
|
|
29
|
-
[]
|
|
30
|
-
);
|
|
31
|
-
|
|
24
|
+
const { setLastFocus } = unlock( useDispatch( blockEditorStore ) );
|
|
32
25
|
const { getLastFocus } = unlock( useSelect( blockEditorStore ) );
|
|
33
26
|
|
|
34
|
-
// Don't allow tabbing to this element in Navigation mode.
|
|
35
|
-
const focusCaptureTabIndex = ! isNavigationMode ? '0' : undefined;
|
|
36
|
-
|
|
37
27
|
// Reference that holds the a flag for enabling or disabling
|
|
38
28
|
// capturing on the focus capture elements.
|
|
39
29
|
const noCaptureRef = useRef();
|
|
@@ -56,8 +46,6 @@ export default function useTabNav() {
|
|
|
56
46
|
.focus();
|
|
57
47
|
}
|
|
58
48
|
} else {
|
|
59
|
-
setNavigationMode( true );
|
|
60
|
-
|
|
61
49
|
const canvasElement =
|
|
62
50
|
container.current.ownerDocument === event.target.ownerDocument
|
|
63
51
|
? container.current
|
|
@@ -82,7 +70,7 @@ export default function useTabNav() {
|
|
|
82
70
|
const before = (
|
|
83
71
|
<div
|
|
84
72
|
ref={ focusCaptureBeforeRef }
|
|
85
|
-
tabIndex=
|
|
73
|
+
tabIndex="0"
|
|
86
74
|
onFocus={ onFocusCapture }
|
|
87
75
|
/>
|
|
88
76
|
);
|
|
@@ -90,7 +78,7 @@ export default function useTabNav() {
|
|
|
90
78
|
const after = (
|
|
91
79
|
<div
|
|
92
80
|
ref={ focusCaptureAfterRef }
|
|
93
|
-
tabIndex=
|
|
81
|
+
tabIndex="0"
|
|
94
82
|
onFocus={ onFocusCapture }
|
|
95
83
|
/>
|
|
96
84
|
);
|
|
@@ -101,12 +89,6 @@ export default function useTabNav() {
|
|
|
101
89
|
return;
|
|
102
90
|
}
|
|
103
91
|
|
|
104
|
-
if ( event.keyCode === ESCAPE && ! hasMultiSelection() ) {
|
|
105
|
-
event.preventDefault();
|
|
106
|
-
setNavigationMode( true );
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
92
|
// In Edit mode, Tab should focus the first tabbable element after
|
|
111
93
|
// the content, which is normally the sidebar (with block controls)
|
|
112
94
|
// and Shift+Tab should focus the first tabbable element before the
|
|
@@ -119,20 +101,6 @@ export default function useTabNav() {
|
|
|
119
101
|
|
|
120
102
|
const isShift = event.shiftKey;
|
|
121
103
|
const direction = isShift ? 'findPrevious' : 'findNext';
|
|
122
|
-
|
|
123
|
-
if ( ! hasMultiSelection() && ! getSelectedBlockClientId() ) {
|
|
124
|
-
// Preserve the behaviour of entering navigation mode when
|
|
125
|
-
// tabbing into the content without a block selection.
|
|
126
|
-
// `onFocusCapture` already did this previously, but we need to
|
|
127
|
-
// do it again here because after clearing block selection,
|
|
128
|
-
// focus land on the writing flow container and pressing Tab
|
|
129
|
-
// will no longer send focus through the focus capture element.
|
|
130
|
-
if ( event.target === node ) {
|
|
131
|
-
setNavigationMode( true );
|
|
132
|
-
}
|
|
133
|
-
return;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
104
|
const nextTabbable = focus.tabbable[ direction ]( event.target );
|
|
137
105
|
|
|
138
106
|
// We want to constrain the tabbing to the block and its child blocks.
|
package/src/content.scss
CHANGED
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
@import "./components/button-block-appender/content.scss";
|
|
9
9
|
@import "./components/default-block-appender/content.scss";
|
|
10
10
|
@import "./components/iframe/content.scss";
|
|
11
|
-
@import "./components/inner-blocks/content.scss";
|
|
12
11
|
@import "./components/media-placeholder/content.scss";
|
|
13
12
|
@import "./components/plain-text/content.scss";
|
|
14
13
|
@import "./components/rich-text/content.scss";
|
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { __ } from '@wordpress/i18n';
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
getBlockBindingsSource,
|
|
7
|
+
getBlockBindingsSources,
|
|
8
|
+
} from '@wordpress/blocks';
|
|
6
9
|
import {
|
|
7
10
|
__experimentalItemGroup as ItemGroup,
|
|
8
11
|
__experimentalItem as Item,
|
|
@@ -12,7 +15,7 @@ import {
|
|
|
12
15
|
__experimentalVStack as VStack,
|
|
13
16
|
privateApis as componentsPrivateApis,
|
|
14
17
|
} from '@wordpress/components';
|
|
15
|
-
import {
|
|
18
|
+
import { useSelect } from '@wordpress/data';
|
|
16
19
|
import { useContext, Fragment } from '@wordpress/element';
|
|
17
20
|
import { useViewportMatch } from '@wordpress/compose';
|
|
18
21
|
|
|
@@ -47,7 +50,6 @@ const useToolsPanelDropdownMenuProps = () => {
|
|
|
47
50
|
};
|
|
48
51
|
|
|
49
52
|
function BlockBindingsPanelDropdown( { fieldsList, attribute, binding } ) {
|
|
50
|
-
const { getBlockBindingsSources } = unlock( blocksPrivateApis );
|
|
51
53
|
const registeredSources = getBlockBindingsSources();
|
|
52
54
|
const { updateBlockBindings } = useBlockBindingsUtils();
|
|
53
55
|
const currentKey = binding?.args?.key;
|
|
@@ -96,8 +98,7 @@ function BlockBindingsPanelDropdown( { fieldsList, attribute, binding } ) {
|
|
|
96
98
|
|
|
97
99
|
function BlockBindingsAttribute( { attribute, binding, fieldsList } ) {
|
|
98
100
|
const { source: sourceName, args } = binding || {};
|
|
99
|
-
const sourceProps =
|
|
100
|
-
unlock( blocksPrivateApis ).getBlockBindingsSource( sourceName );
|
|
101
|
+
const sourceProps = getBlockBindingsSource( sourceName );
|
|
101
102
|
const isSourceInvalid = ! sourceProps;
|
|
102
103
|
return (
|
|
103
104
|
<VStack className="block-editor-bindings__item" spacing={ 0 }>
|
|
@@ -186,7 +187,6 @@ function EditableBlockBindingsPanelItems( {
|
|
|
186
187
|
}
|
|
187
188
|
|
|
188
189
|
export const BlockBindingsPanel = ( { name: blockName, metadata } ) => {
|
|
189
|
-
const registry = useRegistry();
|
|
190
190
|
const blockContext = useContext( BlockContext );
|
|
191
191
|
const { removeAllBlockBindings } = useBlockBindingsUtils();
|
|
192
192
|
const bindableAttributes = getBindableAttributes( blockName );
|
|
@@ -194,14 +194,13 @@ export const BlockBindingsPanel = ( { name: blockName, metadata } ) => {
|
|
|
194
194
|
|
|
195
195
|
// `useSelect` is used purposely here to ensure `getFieldsList`
|
|
196
196
|
// is updated whenever there are updates in block context.
|
|
197
|
-
// `source.getFieldsList` may also call a selector via `
|
|
197
|
+
// `source.getFieldsList` may also call a selector via `select`.
|
|
198
198
|
const _fieldsList = {};
|
|
199
199
|
const { fieldsList, canUpdateBlockBindings } = useSelect(
|
|
200
200
|
( select ) => {
|
|
201
201
|
if ( ! bindableAttributes || bindableAttributes.length === 0 ) {
|
|
202
202
|
return EMPTY_OBJECT;
|
|
203
203
|
}
|
|
204
|
-
const { getBlockBindingsSources } = unlock( blocksPrivateApis );
|
|
205
204
|
const registeredSources = getBlockBindingsSources();
|
|
206
205
|
Object.entries( registeredSources ).forEach(
|
|
207
206
|
( [ sourceName, { getFieldsList, usesContext } ] ) => {
|
|
@@ -214,7 +213,7 @@ export const BlockBindingsPanel = ( { name: blockName, metadata } ) => {
|
|
|
214
213
|
}
|
|
215
214
|
}
|
|
216
215
|
const sourceList = getFieldsList( {
|
|
217
|
-
|
|
216
|
+
select,
|
|
218
217
|
context,
|
|
219
218
|
} );
|
|
220
219
|
// Only add source if the list is not empty.
|
|
@@ -234,7 +233,7 @@ export const BlockBindingsPanel = ( { name: blockName, metadata } ) => {
|
|
|
234
233
|
.canUpdateBlockBindings,
|
|
235
234
|
};
|
|
236
235
|
},
|
|
237
|
-
[ blockContext, bindableAttributes
|
|
236
|
+
[ blockContext, bindableAttributes ]
|
|
238
237
|
);
|
|
239
238
|
// Return early if there are no bindable attributes.
|
|
240
239
|
if ( ! bindableAttributes || bindableAttributes.length === 0 ) {
|
package/src/hooks/duotone.js
CHANGED
|
@@ -314,8 +314,11 @@ function useDuotoneStyles( {
|
|
|
314
314
|
}, [ isValidFilter, blockElement, colors ] );
|
|
315
315
|
}
|
|
316
316
|
|
|
317
|
+
// Used for generating the instance ID
|
|
318
|
+
const DUOTONE_BLOCK_PROPS_REFERENCE = {};
|
|
319
|
+
|
|
317
320
|
function useBlockProps( { clientId, name, style } ) {
|
|
318
|
-
const id = useInstanceId(
|
|
321
|
+
const id = useInstanceId( DUOTONE_BLOCK_PROPS_REFERENCE );
|
|
319
322
|
const selector = useMemo( () => {
|
|
320
323
|
const blockType = getBlockType( name );
|
|
321
324
|
|
|
@@ -17,6 +17,9 @@ import {
|
|
|
17
17
|
GridItemMovers,
|
|
18
18
|
} from '../components/grid';
|
|
19
19
|
|
|
20
|
+
// Used for generating the instance ID
|
|
21
|
+
const LAYOUT_CHILD_BLOCK_PROPS_REFERENCE = {};
|
|
22
|
+
|
|
20
23
|
function useBlockPropsChildLayoutStyles( { style } ) {
|
|
21
24
|
const shouldRenderChildLayoutStyles = useSelect( ( select ) => {
|
|
22
25
|
return ! select( blockEditorStore ).getSettings().disableLayoutStyles;
|
|
@@ -32,7 +35,7 @@ function useBlockPropsChildLayoutStyles( { style } ) {
|
|
|
32
35
|
} = layout;
|
|
33
36
|
const parentLayout = useLayout() || {};
|
|
34
37
|
const { columnCount, minimumColumnWidth } = parentLayout;
|
|
35
|
-
const id = useInstanceId(
|
|
38
|
+
const id = useInstanceId( LAYOUT_CHILD_BLOCK_PROPS_REFERENCE );
|
|
36
39
|
const selector = `.wp-container-content-${ id }`;
|
|
37
40
|
|
|
38
41
|
// Check that the grid layout attributes are of the correct type, so that we don't accidentally
|
package/src/hooks/position.js
CHANGED
|
@@ -310,6 +310,9 @@ export default {
|
|
|
310
310
|
},
|
|
311
311
|
};
|
|
312
312
|
|
|
313
|
+
// Used for generating the instance ID
|
|
314
|
+
const POSITION_BLOCK_PROPS_REFERENCE = {};
|
|
315
|
+
|
|
313
316
|
function useBlockProps( { name, style } ) {
|
|
314
317
|
const hasPositionBlockSupport = hasBlockSupport(
|
|
315
318
|
name,
|
|
@@ -318,7 +321,7 @@ function useBlockProps( { name, style } ) {
|
|
|
318
321
|
const isPositionDisabled = useIsPositionDisabled( { name } );
|
|
319
322
|
const allowPositionStyles = hasPositionBlockSupport && ! isPositionDisabled;
|
|
320
323
|
|
|
321
|
-
const id = useInstanceId(
|
|
324
|
+
const id = useInstanceId( POSITION_BLOCK_PROPS_REFERENCE );
|
|
322
325
|
|
|
323
326
|
// Higher specificity to override defaults in editor UI.
|
|
324
327
|
const positionSelector = `.wp-container-${ id }.wp-container-${ id }`;
|
|
@@ -118,79 +118,81 @@ export const withBlockBindingSupport = createHigherOrderComponent(
|
|
|
118
118
|
// there are attribute updates.
|
|
119
119
|
// `source.getValues` may also call a selector via `registry.select`.
|
|
120
120
|
const updatedContext = {};
|
|
121
|
-
const boundAttributes = useSelect(
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
121
|
+
const boundAttributes = useSelect(
|
|
122
|
+
( select ) => {
|
|
123
|
+
if ( ! blockBindings ) {
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
125
126
|
|
|
126
|
-
|
|
127
|
+
const attributes = {};
|
|
127
128
|
|
|
128
|
-
|
|
129
|
+
const blockBindingsBySource = new Map();
|
|
129
130
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
131
|
+
for ( const [ attributeName, binding ] of Object.entries(
|
|
132
|
+
blockBindings
|
|
133
|
+
) ) {
|
|
134
|
+
const { source: sourceName, args: sourceArgs } = binding;
|
|
135
|
+
const source = sources[ sourceName ];
|
|
136
|
+
if (
|
|
137
|
+
! source ||
|
|
138
|
+
! canBindAttribute( name, attributeName )
|
|
139
|
+
) {
|
|
140
|
+
continue;
|
|
141
|
+
}
|
|
138
142
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
+
// Populate context.
|
|
144
|
+
for ( const key of source.usesContext || [] ) {
|
|
145
|
+
updatedContext[ key ] = blockContext[ key ];
|
|
146
|
+
}
|
|
143
147
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
148
|
+
blockBindingsBySource.set( source, {
|
|
149
|
+
...blockBindingsBySource.get( source ),
|
|
150
|
+
[ attributeName ]: {
|
|
151
|
+
args: sourceArgs,
|
|
152
|
+
},
|
|
153
|
+
} );
|
|
154
|
+
}
|
|
151
155
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
context: updatedContext,
|
|
165
|
-
clientId,
|
|
166
|
-
bindings,
|
|
167
|
-
} );
|
|
168
|
-
}
|
|
169
|
-
for ( const [ attributeName, value ] of Object.entries(
|
|
170
|
-
values
|
|
171
|
-
) ) {
|
|
172
|
-
if (
|
|
173
|
-
attributeName === 'url' &&
|
|
174
|
-
( ! value || ! isURLLike( value ) )
|
|
175
|
-
) {
|
|
176
|
-
// Return null if value is not a valid URL.
|
|
177
|
-
attributes[ attributeName ] = null;
|
|
156
|
+
if ( blockBindingsBySource.size ) {
|
|
157
|
+
for ( const [
|
|
158
|
+
source,
|
|
159
|
+
bindings,
|
|
160
|
+
] of blockBindingsBySource ) {
|
|
161
|
+
// Get values in batch if the source supports it.
|
|
162
|
+
let values = {};
|
|
163
|
+
if ( ! source.getValues ) {
|
|
164
|
+
Object.keys( bindings ).forEach( ( attr ) => {
|
|
165
|
+
// Default to the the source label when `getValues` doesn't exist.
|
|
166
|
+
values[ attr ] = source.label;
|
|
167
|
+
} );
|
|
178
168
|
} else {
|
|
179
|
-
|
|
169
|
+
values = source.getValues( {
|
|
170
|
+
select,
|
|
171
|
+
context: updatedContext,
|
|
172
|
+
clientId,
|
|
173
|
+
bindings,
|
|
174
|
+
} );
|
|
175
|
+
}
|
|
176
|
+
for ( const [ attributeName, value ] of Object.entries(
|
|
177
|
+
values
|
|
178
|
+
) ) {
|
|
179
|
+
if (
|
|
180
|
+
attributeName === 'url' &&
|
|
181
|
+
( ! value || ! isURLLike( value ) )
|
|
182
|
+
) {
|
|
183
|
+
// Return null if value is not a valid URL.
|
|
184
|
+
attributes[ attributeName ] = null;
|
|
185
|
+
} else {
|
|
186
|
+
attributes[ attributeName ] = value;
|
|
187
|
+
}
|
|
180
188
|
}
|
|
181
189
|
}
|
|
182
190
|
}
|
|
183
|
-
}
|
|
184
191
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
blockBindings,
|
|
188
|
-
|
|
189
|
-
clientId,
|
|
190
|
-
updatedContext,
|
|
191
|
-
registry,
|
|
192
|
-
sources,
|
|
193
|
-
] );
|
|
192
|
+
return attributes;
|
|
193
|
+
},
|
|
194
|
+
[ blockBindings, name, clientId, updatedContext, sources ]
|
|
195
|
+
);
|
|
194
196
|
|
|
195
197
|
const hasParentPattern = !! updatedContext[ 'pattern/overrides' ];
|
|
196
198
|
const hasPatternOverridesDefaultBinding =
|
|
@@ -240,7 +242,8 @@ export const withBlockBindingSupport = createHigherOrderComponent(
|
|
|
240
242
|
bindings,
|
|
241
243
|
] of blockBindingsBySource ) {
|
|
242
244
|
source.setValues( {
|
|
243
|
-
registry,
|
|
245
|
+
select: registry.select,
|
|
246
|
+
dispatch: registry.dispatch,
|
|
244
247
|
context: updatedContext,
|
|
245
248
|
clientId,
|
|
246
249
|
bindings,
|
package/src/layouts/flex.js
CHANGED
|
@@ -12,7 +12,6 @@ import {
|
|
|
12
12
|
arrowDown,
|
|
13
13
|
} from '@wordpress/icons';
|
|
14
14
|
import {
|
|
15
|
-
Button,
|
|
16
15
|
ToggleControl,
|
|
17
16
|
Flex,
|
|
18
17
|
FlexItem,
|
|
@@ -110,7 +109,6 @@ export default {
|
|
|
110
109
|
<FlexLayoutVerticalAlignmentControl
|
|
111
110
|
layout={ layout }
|
|
112
111
|
onChange={ onChange }
|
|
113
|
-
isToolbar
|
|
114
112
|
/>
|
|
115
113
|
) }
|
|
116
114
|
</BlockControls>
|
|
@@ -190,11 +188,7 @@ export default {
|
|
|
190
188
|
},
|
|
191
189
|
};
|
|
192
190
|
|
|
193
|
-
function FlexLayoutVerticalAlignmentControl( {
|
|
194
|
-
layout,
|
|
195
|
-
onChange,
|
|
196
|
-
isToolbar = false,
|
|
197
|
-
} ) {
|
|
191
|
+
function FlexLayoutVerticalAlignmentControl( { layout, onChange } ) {
|
|
198
192
|
const { orientation = 'horizontal' } = layout;
|
|
199
193
|
|
|
200
194
|
const defaultVerticalAlignment =
|
|
@@ -210,54 +204,17 @@ function FlexLayoutVerticalAlignmentControl( {
|
|
|
210
204
|
verticalAlignment: value,
|
|
211
205
|
} );
|
|
212
206
|
};
|
|
213
|
-
if ( isToolbar ) {
|
|
214
|
-
return (
|
|
215
|
-
<BlockVerticalAlignmentControl
|
|
216
|
-
onChange={ onVerticalAlignmentChange }
|
|
217
|
-
value={ verticalAlignment }
|
|
218
|
-
controls={
|
|
219
|
-
orientation === 'horizontal'
|
|
220
|
-
? [ 'top', 'center', 'bottom', 'stretch' ]
|
|
221
|
-
: [ 'top', 'center', 'bottom', 'space-between' ]
|
|
222
|
-
}
|
|
223
|
-
/>
|
|
224
|
-
);
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
const verticalAlignmentOptions = [
|
|
228
|
-
{
|
|
229
|
-
value: 'flex-start',
|
|
230
|
-
label: __( 'Align items top' ),
|
|
231
|
-
},
|
|
232
|
-
{
|
|
233
|
-
value: 'center',
|
|
234
|
-
label: __( 'Align items center' ),
|
|
235
|
-
},
|
|
236
|
-
{
|
|
237
|
-
value: 'flex-end',
|
|
238
|
-
label: __( 'Align items bottom' ),
|
|
239
|
-
},
|
|
240
|
-
];
|
|
241
207
|
|
|
242
208
|
return (
|
|
243
|
-
<
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
label={ label }
|
|
253
|
-
icon={ icon }
|
|
254
|
-
isPressed={ verticalAlignment === value }
|
|
255
|
-
onClick={ () => onVerticalAlignmentChange( value ) }
|
|
256
|
-
/>
|
|
257
|
-
);
|
|
258
|
-
} ) }
|
|
259
|
-
</div>
|
|
260
|
-
</fieldset>
|
|
209
|
+
<BlockVerticalAlignmentControl
|
|
210
|
+
onChange={ onVerticalAlignmentChange }
|
|
211
|
+
value={ verticalAlignment }
|
|
212
|
+
controls={
|
|
213
|
+
orientation === 'horizontal'
|
|
214
|
+
? [ 'top', 'center', 'bottom', 'stretch' ]
|
|
215
|
+
: [ 'top', 'center', 'bottom', 'space-between' ]
|
|
216
|
+
}
|
|
217
|
+
/>
|
|
261
218
|
);
|
|
262
219
|
}
|
|
263
220
|
|
package/src/private-apis.js
CHANGED
|
@@ -47,7 +47,6 @@ import { PrivatePublishDateTimePicker } from './components/publish-date-time-pic
|
|
|
47
47
|
import useSpacingSizes from './components/spacing-sizes-control/hooks/use-spacing-sizes';
|
|
48
48
|
import useBlockDisplayTitle from './components/block-title/use-block-display-title';
|
|
49
49
|
import TabbedSidebar from './components/tabbed-sidebar';
|
|
50
|
-
import { useBlockBindingsUtils } from './utils/block-bindings';
|
|
51
50
|
|
|
52
51
|
/**
|
|
53
52
|
* Private @wordpress/block-editor APIs.
|
|
@@ -92,6 +91,5 @@ lock( privateApis, {
|
|
|
92
91
|
useBlockDisplayTitle,
|
|
93
92
|
__unstableBlockStyleVariationOverridesWithConfig,
|
|
94
93
|
setBackgroundStyleDefaults,
|
|
95
|
-
useBlockBindingsUtils,
|
|
96
94
|
sectionRootClientIdKey,
|
|
97
95
|
} );
|
package/src/store/actions.js
CHANGED
|
@@ -1728,23 +1728,24 @@ export const __unstableSetEditorMode =
|
|
|
1728
1728
|
};
|
|
1729
1729
|
|
|
1730
1730
|
/**
|
|
1731
|
-
*
|
|
1731
|
+
* Set the block moving client ID.
|
|
1732
1732
|
*
|
|
1733
|
-
* @
|
|
1733
|
+
* @deprecated
|
|
1734
|
+
*
|
|
1735
|
+
* @return {Object} Action object.
|
|
1734
1736
|
*/
|
|
1735
|
-
export
|
|
1736
|
-
(
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
speak(
|
|
1742
|
-
__(
|
|
1743
|
-
'Use the Tab key and Arrow keys to choose new block location. Use Left and Right Arrow keys to move between nesting levels. Once location is selected press Enter or Space to move the block.'
|
|
1744
|
-
)
|
|
1745
|
-
);
|
|
1737
|
+
export function setBlockMovingClientId() {
|
|
1738
|
+
deprecated(
|
|
1739
|
+
'wp.data.dispatch( "core/block-editor" ).setBlockMovingClientId',
|
|
1740
|
+
{
|
|
1741
|
+
since: '6.7',
|
|
1742
|
+
hint: 'Block moving mode feature has been removed',
|
|
1746
1743
|
}
|
|
1744
|
+
);
|
|
1745
|
+
return {
|
|
1746
|
+
type: 'DO_NOTHING',
|
|
1747
1747
|
};
|
|
1748
|
+
}
|
|
1748
1749
|
|
|
1749
1750
|
/**
|
|
1750
1751
|
* Action that duplicates a list of blocks.
|
|
@@ -359,6 +359,20 @@ export function expandBlock( clientId ) {
|
|
|
359
359
|
};
|
|
360
360
|
}
|
|
361
361
|
|
|
362
|
+
/**
|
|
363
|
+
* @param {Object} value
|
|
364
|
+
* @param {string} value.rootClientId The root client ID to insert at.
|
|
365
|
+
* @param {number} value.index The index to insert at.
|
|
366
|
+
*
|
|
367
|
+
* @return {Object} Action object.
|
|
368
|
+
*/
|
|
369
|
+
export function setInsertionPoint( value ) {
|
|
370
|
+
return {
|
|
371
|
+
type: 'SET_INSERTION_POINT',
|
|
372
|
+
value,
|
|
373
|
+
};
|
|
374
|
+
}
|
|
375
|
+
|
|
362
376
|
/**
|
|
363
377
|
* Temporarily modify/unlock the content-only block for editions.
|
|
364
378
|
*
|