@wordpress/block-editor 14.3.4 → 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 +4 -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 +12 -24
- package/build/components/media-placeholder/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/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/layouts/flex.js +6 -38
- package/build/layouts/flex.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 +2 -0
- package/build/utils/block-bindings.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 +12 -24
- package/build-module/components/media-placeholder/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/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/layouts/flex.js +7 -39
- package/build-module/layouts/flex.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 +2 -0
- package/build-module/utils/block-bindings.js.map +1 -1
- package/build-style/content-rtl.css +14 -56
- package/build-style/content.css +14 -56
- 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/index.js +6 -12
- 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/duotone.js +4 -1
- package/src/hooks/layout-child.js +4 -1
- package/src/hooks/position.js +4 -1
- package/src/layouts/flex.js +10 -53
- 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 +2 -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
|
@@ -1,16 +1,3 @@
|
|
|
1
1
|
.block-editor-inspector-popover-header {
|
|
2
2
|
margin-bottom: $grid-unit-20;
|
|
3
3
|
}
|
|
4
|
-
|
|
5
|
-
[class].block-editor-inspector-popover-header__action {
|
|
6
|
-
height: $icon-size;
|
|
7
|
-
|
|
8
|
-
&.has-icon {
|
|
9
|
-
min-width: $icon-size;
|
|
10
|
-
padding: 0;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
&:not(.has-icon) {
|
|
14
|
-
text-decoration: underline;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -421,7 +421,6 @@ function LinkControl( {
|
|
|
421
421
|
</InputControlSuffixWrapper>
|
|
422
422
|
)
|
|
423
423
|
}
|
|
424
|
-
props
|
|
425
424
|
/>
|
|
426
425
|
</div>
|
|
427
426
|
{ errorMessage && (
|
|
@@ -475,16 +474,14 @@ function LinkControl( {
|
|
|
475
474
|
className="block-editor-link-control__search-actions"
|
|
476
475
|
>
|
|
477
476
|
<Button
|
|
478
|
-
|
|
479
|
-
__next40pxDefaultSize={ false }
|
|
477
|
+
__next40pxDefaultSize
|
|
480
478
|
variant="tertiary"
|
|
481
479
|
onClick={ handleCancel }
|
|
482
480
|
>
|
|
483
481
|
{ __( 'Cancel' ) }
|
|
484
482
|
</Button>
|
|
485
483
|
<Button
|
|
486
|
-
|
|
487
|
-
__next40pxDefaultSize={ false }
|
|
484
|
+
__next40pxDefaultSize
|
|
488
485
|
variant="primary"
|
|
489
486
|
onClick={ isDisabled ? noop : handleSubmit }
|
|
490
487
|
className="block-editor-link-control__search-submit"
|
|
@@ -25,8 +25,7 @@ function LinkSettingsDrawer( { children, settingsOpen, setSettingsOpen } ) {
|
|
|
25
25
|
return (
|
|
26
26
|
<>
|
|
27
27
|
<Button
|
|
28
|
-
|
|
29
|
-
__next40pxDefaultSize={ false }
|
|
28
|
+
__next40pxDefaultSize
|
|
30
29
|
className="block-editor-link-control__drawer-toggle"
|
|
31
30
|
aria-expanded={ settingsOpen }
|
|
32
31
|
onClick={ () => setSettingsOpen( ! settingsOpen ) }
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
|
-
import clsx from 'clsx';
|
|
5
|
-
|
|
6
1
|
/**
|
|
7
2
|
* WordPress dependencies
|
|
8
3
|
*/
|
|
9
|
-
import { useSelect } from '@wordpress/data';
|
|
10
4
|
import { forwardRef } from '@wordpress/element';
|
|
11
5
|
|
|
12
6
|
/**
|
|
@@ -14,7 +8,6 @@ import { forwardRef } from '@wordpress/element';
|
|
|
14
8
|
*/
|
|
15
9
|
import ListViewBlockSelectButton from './block-select-button';
|
|
16
10
|
import BlockDraggable from '../block-draggable';
|
|
17
|
-
import { store as blockEditorStore } from '../../store';
|
|
18
11
|
import { useListViewContext } from './context';
|
|
19
12
|
|
|
20
13
|
const ListViewBlockContents = forwardRef(
|
|
@@ -34,29 +27,9 @@ const ListViewBlockContents = forwardRef(
|
|
|
34
27
|
ref
|
|
35
28
|
) => {
|
|
36
29
|
const { clientId } = block;
|
|
37
|
-
|
|
38
|
-
const { blockMovingClientId, selectedBlockInBlockEditor } = useSelect(
|
|
39
|
-
( select ) => {
|
|
40
|
-
const { hasBlockMovingClientId, getSelectedBlockClientId } =
|
|
41
|
-
select( blockEditorStore );
|
|
42
|
-
return {
|
|
43
|
-
blockMovingClientId: hasBlockMovingClientId(),
|
|
44
|
-
selectedBlockInBlockEditor: getSelectedBlockClientId(),
|
|
45
|
-
};
|
|
46
|
-
},
|
|
47
|
-
[]
|
|
48
|
-
);
|
|
49
|
-
|
|
50
30
|
const { AdditionalBlockContent, insertedBlock, setInsertedBlock } =
|
|
51
31
|
useListViewContext();
|
|
52
32
|
|
|
53
|
-
const isBlockMoveTarget =
|
|
54
|
-
blockMovingClientId && selectedBlockInBlockEditor === clientId;
|
|
55
|
-
|
|
56
|
-
const className = clsx( 'block-editor-list-view-block-contents', {
|
|
57
|
-
'is-dropping-before': isBlockMoveTarget,
|
|
58
|
-
} );
|
|
59
|
-
|
|
60
33
|
// Only include all selected blocks if the currently clicked on block
|
|
61
34
|
// is one of the selected blocks. This ensures that if a user attempts
|
|
62
35
|
// to drag a block that isn't part of the selection, they're still able
|
|
@@ -82,7 +55,7 @@ const ListViewBlockContents = forwardRef(
|
|
|
82
55
|
{ ( { draggable, onDragStart, onDragEnd } ) => (
|
|
83
56
|
<ListViewBlockSelectButton
|
|
84
57
|
ref={ ref }
|
|
85
|
-
className=
|
|
58
|
+
className="block-editor-list-view-block-contents"
|
|
86
59
|
block={ block }
|
|
87
60
|
onClick={ onClick }
|
|
88
61
|
onToggleExpanded={ onToggleExpanded }
|
|
@@ -7,7 +7,6 @@ import clsx from 'clsx';
|
|
|
7
7
|
* WordPress dependencies
|
|
8
8
|
*/
|
|
9
9
|
import {
|
|
10
|
-
Button,
|
|
11
10
|
__experimentalHStack as HStack,
|
|
12
11
|
__experimentalTruncate as Truncate,
|
|
13
12
|
} from '@wordpress/components';
|
|
@@ -82,9 +81,7 @@ function ListViewBlockSelectButton(
|
|
|
82
81
|
}
|
|
83
82
|
|
|
84
83
|
return (
|
|
85
|
-
<
|
|
86
|
-
// TODO: Switch to `true` (40px size) if possible
|
|
87
|
-
__next40pxDefaultSize={ false }
|
|
84
|
+
<a
|
|
88
85
|
className={ clsx(
|
|
89
86
|
'block-editor-list-view-block-select-button',
|
|
90
87
|
className
|
|
@@ -156,7 +153,7 @@ function ListViewBlockSelectButton(
|
|
|
156
153
|
</span>
|
|
157
154
|
) }
|
|
158
155
|
</HStack>
|
|
159
|
-
</
|
|
156
|
+
</a>
|
|
160
157
|
);
|
|
161
158
|
}
|
|
162
159
|
|
|
@@ -41,6 +41,15 @@
|
|
|
41
41
|
&:hover {
|
|
42
42
|
color: var(--wp-admin-theme-color);
|
|
43
43
|
}
|
|
44
|
+
|
|
45
|
+
svg {
|
|
46
|
+
fill: currentColor;
|
|
47
|
+
// Optimizate for high contrast modes.
|
|
48
|
+
// See also https://blogs.windows.com/msedgedev/2020/09/17/styling-for-windows-high-contrast-with-new-standards-for-forced-colors/.
|
|
49
|
+
@media (forced-colors: active) {
|
|
50
|
+
fill: CanvasText;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
44
53
|
}
|
|
45
54
|
|
|
46
55
|
&:not(.is-selected) .block-editor-list-view-block-select-button {
|
|
@@ -216,20 +225,15 @@
|
|
|
216
225
|
text-align: left;
|
|
217
226
|
position: relative;
|
|
218
227
|
white-space: nowrap;
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
top: -2px;
|
|
229
|
-
right: 0;
|
|
230
|
-
left: 0;
|
|
231
|
-
border-top: 4px solid var(--wp-admin-theme-color);
|
|
232
|
-
}
|
|
228
|
+
border-radius: 2px;
|
|
229
|
+
box-sizing: border-box;
|
|
230
|
+
color: inherit;
|
|
231
|
+
font-family: inherit;
|
|
232
|
+
font-size: 13px;
|
|
233
|
+
font-weight: 400;
|
|
234
|
+
margin: 0;
|
|
235
|
+
text-decoration: none;
|
|
236
|
+
transition: box-shadow 0.1s linear;
|
|
233
237
|
|
|
234
238
|
.components-modal__content & {
|
|
235
239
|
padding-left: 0;
|
|
@@ -91,8 +91,7 @@ const URLSelectionUI = ( { src, onChangeSrc, onSelectURL } ) => {
|
|
|
91
91
|
return (
|
|
92
92
|
<div className="block-editor-media-placeholder__url-input-container">
|
|
93
93
|
<Button
|
|
94
|
-
|
|
95
|
-
__next40pxDefaultSize={ false }
|
|
94
|
+
__next40pxDefaultSize
|
|
96
95
|
className="block-editor-media-placeholder__button"
|
|
97
96
|
onClick={ openURLInput }
|
|
98
97
|
isPressed={ isURLInputVisible }
|
|
@@ -389,8 +388,7 @@ export function MediaPlaceholder( {
|
|
|
389
388
|
return (
|
|
390
389
|
onCancel && (
|
|
391
390
|
<Button
|
|
392
|
-
|
|
393
|
-
__next40pxDefaultSize={ false }
|
|
391
|
+
__next40pxDefaultSize
|
|
394
392
|
className="block-editor-media-placeholder__cancel-button"
|
|
395
393
|
title={ __( 'Cancel' ) }
|
|
396
394
|
variant="link"
|
|
@@ -419,8 +417,7 @@ export function MediaPlaceholder( {
|
|
|
419
417
|
onToggleFeaturedImage && (
|
|
420
418
|
<div className="block-editor-media-placeholder__url-input-container">
|
|
421
419
|
<Button
|
|
422
|
-
|
|
423
|
-
__next40pxDefaultSize={ false }
|
|
420
|
+
__next40pxDefaultSize
|
|
424
421
|
className="block-editor-media-placeholder__button"
|
|
425
422
|
onClick={ onToggleFeaturedImage }
|
|
426
423
|
variant="secondary"
|
|
@@ -436,8 +433,7 @@ export function MediaPlaceholder( {
|
|
|
436
433
|
const defaultButton = ( { open } ) => {
|
|
437
434
|
return (
|
|
438
435
|
<Button
|
|
439
|
-
|
|
440
|
-
__next40pxDefaultSize={ false }
|
|
436
|
+
__next40pxDefaultSize
|
|
441
437
|
variant="secondary"
|
|
442
438
|
onClick={ () => {
|
|
443
439
|
open();
|
|
@@ -477,8 +473,7 @@ export function MediaPlaceholder( {
|
|
|
477
473
|
const content = (
|
|
478
474
|
<>
|
|
479
475
|
<Button
|
|
480
|
-
|
|
481
|
-
__next40pxDefaultSize={ false }
|
|
476
|
+
__next40pxDefaultSize
|
|
482
477
|
variant="primary"
|
|
483
478
|
className={ clsx(
|
|
484
479
|
'block-editor-media-placeholder__button',
|
|
@@ -508,8 +503,7 @@ export function MediaPlaceholder( {
|
|
|
508
503
|
<FormFileUpload
|
|
509
504
|
render={ ( { openFileDialog } ) => (
|
|
510
505
|
<Button
|
|
511
|
-
|
|
512
|
-
__next40pxDefaultSize={ false }
|
|
506
|
+
__next40pxDefaultSize
|
|
513
507
|
onClick={ openFileDialog }
|
|
514
508
|
variant="primary"
|
|
515
509
|
className={ clsx(
|
|
@@ -28,8 +28,7 @@ export default function SkipToSelectedBlock() {
|
|
|
28
28
|
|
|
29
29
|
return selectedBlockClientId ? (
|
|
30
30
|
<Button
|
|
31
|
-
|
|
32
|
-
__next40pxDefaultSize={ false }
|
|
31
|
+
__next40pxDefaultSize
|
|
33
32
|
variant="secondary"
|
|
34
33
|
className="block-editor-skip-to-selected-block"
|
|
35
34
|
onClick={ onClick }
|
|
@@ -3,18 +3,9 @@
|
|
|
3
3
|
top: -9999em;
|
|
4
4
|
|
|
5
5
|
&:focus {
|
|
6
|
-
height: auto;
|
|
7
|
-
width: auto;
|
|
8
|
-
display: block;
|
|
9
6
|
font-size: 14px;
|
|
10
7
|
font-weight: 600;
|
|
11
|
-
padding: 15px 23px 14px;
|
|
12
8
|
background: #f1f1f1;
|
|
13
|
-
color: var(--wp-admin-theme-color);
|
|
14
|
-
line-height: normal;
|
|
15
|
-
box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
|
|
16
|
-
text-decoration: none;
|
|
17
|
-
outline: none;
|
|
18
9
|
z-index: z-index(".skip-to-selected-block");
|
|
19
10
|
}
|
|
20
11
|
}
|
|
@@ -44,11 +44,10 @@ function ToolSelector( props, ref ) {
|
|
|
44
44
|
<Dropdown
|
|
45
45
|
renderToggle={ ( { isOpen, onToggle } ) => (
|
|
46
46
|
<Button
|
|
47
|
-
|
|
48
|
-
__next40pxDefaultSize={ false }
|
|
47
|
+
size="compact"
|
|
49
48
|
{ ...props }
|
|
50
49
|
ref={ ref }
|
|
51
|
-
icon={ mode === 'navigation' ?
|
|
50
|
+
icon={ mode === 'navigation' ? editIcon : selectIcon }
|
|
52
51
|
aria-expanded={ isOpen }
|
|
53
52
|
aria-haspopup="true"
|
|
54
53
|
onClick={ onToggle }
|
|
@@ -59,7 +58,11 @@ function ToolSelector( props, ref ) {
|
|
|
59
58
|
popoverProps={ { placement: 'bottom-start' } }
|
|
60
59
|
renderContent={ () => (
|
|
61
60
|
<>
|
|
62
|
-
<NavigableMenu
|
|
61
|
+
<NavigableMenu
|
|
62
|
+
className="block-editor-tool-selector__menu"
|
|
63
|
+
role="menu"
|
|
64
|
+
aria-label={ __( 'Tools' ) }
|
|
65
|
+
>
|
|
63
66
|
<MenuItemsChoice
|
|
64
67
|
value={
|
|
65
68
|
mode === 'navigation' ? 'navigation' : 'edit'
|
|
@@ -67,29 +70,31 @@ function ToolSelector( props, ref ) {
|
|
|
67
70
|
onSelect={ __unstableSetEditorMode }
|
|
68
71
|
choices={ [
|
|
69
72
|
{
|
|
70
|
-
value: '
|
|
73
|
+
value: 'navigation',
|
|
71
74
|
label: (
|
|
72
75
|
<>
|
|
73
76
|
<Icon icon={ editIcon } />
|
|
74
|
-
{ __( '
|
|
77
|
+
{ __( 'Write' ) }
|
|
75
78
|
</>
|
|
76
79
|
),
|
|
80
|
+
info: __( 'Focus on content.' ),
|
|
77
81
|
},
|
|
78
82
|
{
|
|
79
|
-
value: '
|
|
83
|
+
value: 'edit',
|
|
80
84
|
label: (
|
|
81
85
|
<>
|
|
82
86
|
{ selectIcon }
|
|
83
|
-
{ __( '
|
|
87
|
+
{ __( 'Design' ) }
|
|
84
88
|
</>
|
|
85
89
|
),
|
|
90
|
+
info: __( 'Edit layout and styles.' ),
|
|
86
91
|
},
|
|
87
92
|
] }
|
|
88
93
|
/>
|
|
89
94
|
</NavigableMenu>
|
|
90
95
|
<div className="block-editor-tool-selector__help">
|
|
91
96
|
{ __(
|
|
92
|
-
'Tools provide different interactions for
|
|
97
|
+
'Tools provide different sets of interactions for blocks. Toggle between simplified content tools (Write) and advanced visual editing tools (Design).'
|
|
93
98
|
) }
|
|
94
99
|
</div>
|
|
95
100
|
</>
|
|
@@ -3,7 +3,10 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { __ } from '@wordpress/i18n';
|
|
5
5
|
import { Component } from '@wordpress/element';
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
Button,
|
|
8
|
+
__experimentalInputControlSuffixWrapper as InputControlSuffixWrapper,
|
|
9
|
+
} from '@wordpress/components';
|
|
7
10
|
import { link, keyboardReturn, arrowLeft } from '@wordpress/icons';
|
|
8
11
|
|
|
9
12
|
/**
|
|
@@ -38,8 +41,7 @@ class URLInputButton extends Component {
|
|
|
38
41
|
return (
|
|
39
42
|
<div className="block-editor-url-input__button">
|
|
40
43
|
<Button
|
|
41
|
-
|
|
42
|
-
__next40pxDefaultSize={ false }
|
|
44
|
+
size="compact"
|
|
43
45
|
icon={ link }
|
|
44
46
|
label={ buttonLabel }
|
|
45
47
|
onClick={ this.toggle }
|
|
@@ -53,8 +55,7 @@ class URLInputButton extends Component {
|
|
|
53
55
|
>
|
|
54
56
|
<div className="block-editor-url-input__button-modal-line">
|
|
55
57
|
<Button
|
|
56
|
-
|
|
57
|
-
__next40pxDefaultSize={ false }
|
|
58
|
+
__next40pxDefaultSize
|
|
58
59
|
className="block-editor-url-input__back"
|
|
59
60
|
icon={ arrowLeft }
|
|
60
61
|
label={ __( 'Close' ) }
|
|
@@ -63,13 +64,16 @@ class URLInputButton extends Component {
|
|
|
63
64
|
<URLInput
|
|
64
65
|
value={ url || '' }
|
|
65
66
|
onChange={ onChange }
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
67
|
+
suffix={
|
|
68
|
+
<InputControlSuffixWrapper variant="control">
|
|
69
|
+
<Button
|
|
70
|
+
size="small"
|
|
71
|
+
icon={ keyboardReturn }
|
|
72
|
+
label={ __( 'Submit' ) }
|
|
73
|
+
type="submit"
|
|
74
|
+
/>
|
|
75
|
+
</InputControlSuffixWrapper>
|
|
76
|
+
}
|
|
73
77
|
/>
|
|
74
78
|
</div>
|
|
75
79
|
</form>
|
|
@@ -540,8 +540,7 @@ class URLInput extends Component {
|
|
|
540
540
|
>
|
|
541
541
|
{ suggestions.map( ( suggestion, index ) => (
|
|
542
542
|
<Button
|
|
543
|
-
|
|
544
|
-
__next40pxDefaultSize={ false }
|
|
543
|
+
__next40pxDefaultSize
|
|
545
544
|
{ ...buildSuggestionItemProps( suggestion, index ) }
|
|
546
545
|
key={ suggestion.id }
|
|
547
546
|
className={ clsx(
|
|
@@ -16,7 +16,6 @@ import {
|
|
|
16
16
|
plus as add,
|
|
17
17
|
group,
|
|
18
18
|
ungroup,
|
|
19
|
-
moveTo as move,
|
|
20
19
|
} from '@wordpress/icons';
|
|
21
20
|
|
|
22
21
|
/**
|
|
@@ -127,59 +126,6 @@ export const useTransformCommands = () => {
|
|
|
127
126
|
return { isLoading: false, commands };
|
|
128
127
|
};
|
|
129
128
|
|
|
130
|
-
const useActionsCommands = () => {
|
|
131
|
-
const { clientIds } = useSelect( ( select ) => {
|
|
132
|
-
const { getSelectedBlockClientIds } = select( blockEditorStore );
|
|
133
|
-
const selectedBlockClientIds = getSelectedBlockClientIds();
|
|
134
|
-
|
|
135
|
-
return {
|
|
136
|
-
clientIds: selectedBlockClientIds,
|
|
137
|
-
};
|
|
138
|
-
}, [] );
|
|
139
|
-
|
|
140
|
-
const { getBlockRootClientId, canMoveBlocks, getBlockCount } =
|
|
141
|
-
useSelect( blockEditorStore );
|
|
142
|
-
|
|
143
|
-
const { setBlockMovingClientId, setNavigationMode, selectBlock } =
|
|
144
|
-
useDispatch( blockEditorStore );
|
|
145
|
-
|
|
146
|
-
if ( ! clientIds || clientIds.length < 1 ) {
|
|
147
|
-
return { isLoading: false, commands: [] };
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
const rootClientId = getBlockRootClientId( clientIds[ 0 ] );
|
|
151
|
-
|
|
152
|
-
const canMove =
|
|
153
|
-
canMoveBlocks( clientIds ) && getBlockCount( rootClientId ) !== 1;
|
|
154
|
-
|
|
155
|
-
const commands = [];
|
|
156
|
-
|
|
157
|
-
if ( canMove ) {
|
|
158
|
-
commands.push( {
|
|
159
|
-
name: 'move-to',
|
|
160
|
-
label: __( 'Move to' ),
|
|
161
|
-
callback: () => {
|
|
162
|
-
setNavigationMode( true );
|
|
163
|
-
selectBlock( clientIds[ 0 ] );
|
|
164
|
-
setBlockMovingClientId( clientIds[ 0 ] );
|
|
165
|
-
},
|
|
166
|
-
icon: move,
|
|
167
|
-
} );
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
return {
|
|
171
|
-
isLoading: false,
|
|
172
|
-
commands: commands.map( ( command ) => ( {
|
|
173
|
-
...command,
|
|
174
|
-
name: 'core/block-editor/action-' + command.name,
|
|
175
|
-
callback: ( { close } ) => {
|
|
176
|
-
command.callback();
|
|
177
|
-
close();
|
|
178
|
-
},
|
|
179
|
-
} ) ),
|
|
180
|
-
};
|
|
181
|
-
};
|
|
182
|
-
|
|
183
129
|
const useQuickActionsCommands = () => {
|
|
184
130
|
const { clientIds, isUngroupable, isGroupable } = useSelect( ( select ) => {
|
|
185
131
|
const {
|
|
@@ -344,10 +290,6 @@ export const useBlockCommands = () => {
|
|
|
344
290
|
name: 'core/block-editor/blockTransforms',
|
|
345
291
|
hook: useTransformCommands,
|
|
346
292
|
} );
|
|
347
|
-
useCommandLoader( {
|
|
348
|
-
name: 'core/block-editor/blockActions',
|
|
349
|
-
hook: useActionsCommands,
|
|
350
|
-
} );
|
|
351
293
|
useCommandLoader( {
|
|
352
294
|
name: 'core/block-editor/blockQuickActions',
|
|
353
295
|
hook: useQuickActionsCommands,
|
|
@@ -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";
|
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 }`;
|