@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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/block-editor",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.4.0",
|
|
4
4
|
"description": "Generic block editor.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -36,36 +36,36 @@
|
|
|
36
36
|
"@emotion/react": "^11.7.1",
|
|
37
37
|
"@emotion/styled": "^11.6.0",
|
|
38
38
|
"@react-spring/web": "^9.4.5",
|
|
39
|
-
"@wordpress/a11y": "^4.
|
|
40
|
-
"@wordpress/api-fetch": "^7.
|
|
41
|
-
"@wordpress/blob": "^4.
|
|
42
|
-
"@wordpress/block-serialization-default-parser": "^5.
|
|
43
|
-
"@wordpress/blocks": "^13.
|
|
44
|
-
"@wordpress/commands": "^1.
|
|
45
|
-
"@wordpress/components": "^28.
|
|
46
|
-
"@wordpress/compose": "^7.
|
|
47
|
-
"@wordpress/data": "^10.
|
|
48
|
-
"@wordpress/date": "^5.
|
|
49
|
-
"@wordpress/deprecated": "^4.
|
|
50
|
-
"@wordpress/dom": "^4.
|
|
51
|
-
"@wordpress/element": "^6.
|
|
52
|
-
"@wordpress/escape-html": "^3.
|
|
53
|
-
"@wordpress/hooks": "^4.
|
|
54
|
-
"@wordpress/html-entities": "^4.
|
|
55
|
-
"@wordpress/i18n": "^5.
|
|
56
|
-
"@wordpress/icons": "^10.
|
|
57
|
-
"@wordpress/is-shallow-equal": "^5.
|
|
58
|
-
"@wordpress/keyboard-shortcuts": "^5.
|
|
59
|
-
"@wordpress/keycodes": "^4.
|
|
60
|
-
"@wordpress/notices": "^5.
|
|
61
|
-
"@wordpress/preferences": "^4.
|
|
62
|
-
"@wordpress/private-apis": "^1.
|
|
63
|
-
"@wordpress/rich-text": "^7.
|
|
64
|
-
"@wordpress/style-engine": "^2.
|
|
65
|
-
"@wordpress/token-list": "^3.
|
|
66
|
-
"@wordpress/url": "^4.
|
|
67
|
-
"@wordpress/warning": "^3.
|
|
68
|
-
"@wordpress/wordcount": "^4.
|
|
39
|
+
"@wordpress/a11y": "^4.9.0",
|
|
40
|
+
"@wordpress/api-fetch": "^7.9.0",
|
|
41
|
+
"@wordpress/blob": "^4.9.0",
|
|
42
|
+
"@wordpress/block-serialization-default-parser": "^5.9.0",
|
|
43
|
+
"@wordpress/blocks": "^13.9.0",
|
|
44
|
+
"@wordpress/commands": "^1.9.0",
|
|
45
|
+
"@wordpress/components": "^28.9.0",
|
|
46
|
+
"@wordpress/compose": "^7.9.0",
|
|
47
|
+
"@wordpress/data": "^10.9.0",
|
|
48
|
+
"@wordpress/date": "^5.9.0",
|
|
49
|
+
"@wordpress/deprecated": "^4.9.0",
|
|
50
|
+
"@wordpress/dom": "^4.9.0",
|
|
51
|
+
"@wordpress/element": "^6.9.0",
|
|
52
|
+
"@wordpress/escape-html": "^3.9.0",
|
|
53
|
+
"@wordpress/hooks": "^4.9.0",
|
|
54
|
+
"@wordpress/html-entities": "^4.9.0",
|
|
55
|
+
"@wordpress/i18n": "^5.9.0",
|
|
56
|
+
"@wordpress/icons": "^10.9.0",
|
|
57
|
+
"@wordpress/is-shallow-equal": "^5.9.0",
|
|
58
|
+
"@wordpress/keyboard-shortcuts": "^5.9.0",
|
|
59
|
+
"@wordpress/keycodes": "^4.9.0",
|
|
60
|
+
"@wordpress/notices": "^5.9.0",
|
|
61
|
+
"@wordpress/preferences": "^4.9.0",
|
|
62
|
+
"@wordpress/private-apis": "^1.9.0",
|
|
63
|
+
"@wordpress/rich-text": "^7.9.0",
|
|
64
|
+
"@wordpress/style-engine": "^2.9.0",
|
|
65
|
+
"@wordpress/token-list": "^3.9.0",
|
|
66
|
+
"@wordpress/url": "^4.9.0",
|
|
67
|
+
"@wordpress/warning": "^3.9.0",
|
|
68
|
+
"@wordpress/wordcount": "^4.9.0",
|
|
69
69
|
"change-case": "^4.1.2",
|
|
70
70
|
"clsx": "^2.1.1",
|
|
71
71
|
"colord": "^2.7.0",
|
|
@@ -88,5 +88,5 @@
|
|
|
88
88
|
"publishConfig": {
|
|
89
89
|
"access": "public"
|
|
90
90
|
},
|
|
91
|
-
"gitHead": "
|
|
91
|
+
"gitHead": "2e5495c635910cb34bfaca3c6258d2e989f66214"
|
|
92
92
|
}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import apiFetch from '@wordpress/api-fetch';
|
|
7
7
|
import { addQueryArgs } from '@wordpress/url';
|
|
8
8
|
import { Icon, page, post } from '@wordpress/icons';
|
|
9
|
+
import { decodeEntities } from '@wordpress/html-entities';
|
|
9
10
|
|
|
10
11
|
const SHOWN_SUGGESTIONS = 10;
|
|
11
12
|
|
|
@@ -46,7 +47,7 @@ function createLinkCompleter() {
|
|
|
46
47
|
key="icon"
|
|
47
48
|
icon={ item.subtype === 'page' ? page : post }
|
|
48
49
|
/>
|
|
49
|
-
{ item.title }
|
|
50
|
+
{ decodeEntities( item.title ) }
|
|
50
51
|
</>
|
|
51
52
|
);
|
|
52
53
|
},
|
|
@@ -29,7 +29,6 @@ export default function BlockActions( {
|
|
|
29
29
|
getBlockRootClientId,
|
|
30
30
|
getBlocksByClientId,
|
|
31
31
|
getDirectInsertBlock,
|
|
32
|
-
canMoveBlocks,
|
|
33
32
|
canRemoveBlocks,
|
|
34
33
|
} = select( blockEditorStore );
|
|
35
34
|
|
|
@@ -44,7 +43,6 @@ export default function BlockActions( {
|
|
|
44
43
|
: null;
|
|
45
44
|
|
|
46
45
|
return {
|
|
47
|
-
canMove: canMoveBlocks( clientIds ),
|
|
48
46
|
canRemove: canRemoveBlocks( clientIds ),
|
|
49
47
|
canInsertBlock: canInsertDefaultBlock || !! directInsertBlock,
|
|
50
48
|
canCopyStyles: blocks.every( ( block ) => {
|
|
@@ -67,8 +65,7 @@ export default function BlockActions( {
|
|
|
67
65
|
);
|
|
68
66
|
const { getBlocksByClientId, getBlocks } = useSelect( blockEditorStore );
|
|
69
67
|
|
|
70
|
-
const {
|
|
71
|
-
selected;
|
|
68
|
+
const { canRemove, canInsertBlock, canCopyStyles, canDuplicate } = selected;
|
|
72
69
|
|
|
73
70
|
const {
|
|
74
71
|
removeBlocks,
|
|
@@ -77,9 +74,6 @@ export default function BlockActions( {
|
|
|
77
74
|
insertAfterBlock,
|
|
78
75
|
insertBeforeBlock,
|
|
79
76
|
flashBlock,
|
|
80
|
-
setBlockMovingClientId,
|
|
81
|
-
setNavigationMode,
|
|
82
|
-
selectBlock,
|
|
83
77
|
} = useDispatch( blockEditorStore );
|
|
84
78
|
|
|
85
79
|
const notifyCopy = useNotifyCopy();
|
|
@@ -89,7 +83,6 @@ export default function BlockActions( {
|
|
|
89
83
|
canCopyStyles,
|
|
90
84
|
canDuplicate,
|
|
91
85
|
canInsertBlock,
|
|
92
|
-
canMove,
|
|
93
86
|
canRemove,
|
|
94
87
|
onDuplicate() {
|
|
95
88
|
return duplicateBlocks( clientIds, updateSelection );
|
|
@@ -103,11 +96,6 @@ export default function BlockActions( {
|
|
|
103
96
|
onInsertAfter() {
|
|
104
97
|
insertAfterBlock( clientIds[ clientIds.length - 1 ] );
|
|
105
98
|
},
|
|
106
|
-
onMoveTo() {
|
|
107
|
-
setNavigationMode( true );
|
|
108
|
-
selectBlock( clientIds[ 0 ] );
|
|
109
|
-
setBlockMovingClientId( clientIds[ 0 ] );
|
|
110
|
-
},
|
|
111
99
|
onGroup() {
|
|
112
100
|
if ( ! clientIds.length ) {
|
|
113
101
|
return;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
.block-editor-block-draggable-chip {
|
|
9
9
|
background-color: $gray-900;
|
|
10
10
|
border-radius: $radius-small;
|
|
11
|
-
box-shadow:
|
|
11
|
+
box-shadow: $elevation-small;
|
|
12
12
|
color: $white;
|
|
13
13
|
cursor: grabbing;
|
|
14
14
|
display: inline-flex;
|
|
@@ -77,6 +77,6 @@
|
|
|
77
77
|
.block-editor-block-draggable-chip__disabled.block-editor-block-draggable-chip__disabled {
|
|
78
78
|
background-color: $gray-700;
|
|
79
79
|
opacity: 1;
|
|
80
|
-
box-shadow:
|
|
80
|
+
box-shadow: $elevation-small;
|
|
81
81
|
}
|
|
82
82
|
}
|
|
@@ -40,83 +40,36 @@ function BlockStylesPanel( { clientId } ) {
|
|
|
40
40
|
);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
function BlockInspectorLockedBlocks( { topLevelLockedBlock } ) {
|
|
44
|
-
const contentClientIds = useSelect(
|
|
45
|
-
( select ) => {
|
|
46
|
-
const {
|
|
47
|
-
getClientIdsOfDescendants,
|
|
48
|
-
getBlockName,
|
|
49
|
-
getBlockEditingMode,
|
|
50
|
-
} = select( blockEditorStore );
|
|
51
|
-
return getClientIdsOfDescendants( topLevelLockedBlock ).filter(
|
|
52
|
-
( clientId ) =>
|
|
53
|
-
getBlockName( clientId ) !== 'core/list-item' &&
|
|
54
|
-
getBlockEditingMode( clientId ) === 'contentOnly'
|
|
55
|
-
);
|
|
56
|
-
},
|
|
57
|
-
[ topLevelLockedBlock ]
|
|
58
|
-
);
|
|
59
|
-
const hasBlockStyles = useSelect(
|
|
60
|
-
( select ) => {
|
|
61
|
-
const { getBlockName } = select( blockEditorStore );
|
|
62
|
-
const { getBlockStyles } = select( blocksStore );
|
|
63
|
-
return !! getBlockStyles( getBlockName( topLevelLockedBlock ) )
|
|
64
|
-
?.length;
|
|
65
|
-
},
|
|
66
|
-
[ topLevelLockedBlock ]
|
|
67
|
-
);
|
|
68
|
-
const blockInformation = useBlockDisplayInformation( topLevelLockedBlock );
|
|
69
|
-
return (
|
|
70
|
-
<div className="block-editor-block-inspector">
|
|
71
|
-
<BlockCard
|
|
72
|
-
{ ...blockInformation }
|
|
73
|
-
className={ blockInformation.isSynced && 'is-synced' }
|
|
74
|
-
/>
|
|
75
|
-
<BlockInfo.Slot />
|
|
76
|
-
{ hasBlockStyles && (
|
|
77
|
-
<BlockStylesPanel clientId={ topLevelLockedBlock } />
|
|
78
|
-
) }
|
|
79
|
-
{ contentClientIds.length > 0 && (
|
|
80
|
-
<PanelBody title={ __( 'Content' ) }>
|
|
81
|
-
<BlockQuickNavigation clientIds={ contentClientIds } />
|
|
82
|
-
</PanelBody>
|
|
83
|
-
) }
|
|
84
|
-
</div>
|
|
85
|
-
);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
43
|
const BlockInspector = ( { showNoBlockSelectedMessage = true } ) => {
|
|
89
44
|
const {
|
|
90
45
|
count,
|
|
91
46
|
selectedBlockName,
|
|
92
47
|
selectedBlockClientId,
|
|
93
48
|
blockType,
|
|
94
|
-
|
|
49
|
+
isSectionBlock,
|
|
95
50
|
} = useSelect( ( select ) => {
|
|
96
51
|
const {
|
|
97
52
|
getSelectedBlockClientId,
|
|
98
53
|
getSelectedBlockCount,
|
|
99
54
|
getBlockName,
|
|
100
|
-
|
|
101
|
-
|
|
55
|
+
getParentSectionBlock,
|
|
56
|
+
isSectionBlock: _isSectionBlock,
|
|
102
57
|
} = unlock( select( blockEditorStore ) );
|
|
103
58
|
const _selectedBlockClientId = getSelectedBlockClientId();
|
|
59
|
+
const renderedBlockClientId =
|
|
60
|
+
getParentSectionBlock( _selectedBlockClientId ) ||
|
|
61
|
+
getSelectedBlockClientId();
|
|
104
62
|
const _selectedBlockName =
|
|
105
|
-
|
|
63
|
+
renderedBlockClientId && getBlockName( renderedBlockClientId );
|
|
106
64
|
const _blockType =
|
|
107
65
|
_selectedBlockName && getBlockType( _selectedBlockName );
|
|
108
66
|
|
|
109
67
|
return {
|
|
110
68
|
count: getSelectedBlockCount(),
|
|
111
|
-
selectedBlockClientId:
|
|
69
|
+
selectedBlockClientId: renderedBlockClientId,
|
|
112
70
|
selectedBlockName: _selectedBlockName,
|
|
113
71
|
blockType: _blockType,
|
|
114
|
-
|
|
115
|
-
getContentLockingParent( _selectedBlockClientId ) ||
|
|
116
|
-
( getTemplateLock( _selectedBlockClientId ) === 'contentOnly' ||
|
|
117
|
-
_selectedBlockName === 'core/block'
|
|
118
|
-
? _selectedBlockClientId
|
|
119
|
-
: undefined ),
|
|
72
|
+
isSectionBlock: _isSectionBlock( renderedBlockClientId ),
|
|
120
73
|
};
|
|
121
74
|
}, [] );
|
|
122
75
|
|
|
@@ -136,7 +89,7 @@ const BlockInspector = ( { showNoBlockSelectedMessage = true } ) => {
|
|
|
136
89
|
blockName: selectedBlockName,
|
|
137
90
|
} );
|
|
138
91
|
|
|
139
|
-
if ( count > 1 ) {
|
|
92
|
+
if ( count > 1 && ! isSectionBlock ) {
|
|
140
93
|
return (
|
|
141
94
|
<div className="block-editor-block-inspector">
|
|
142
95
|
<MultiSelectionInspector />
|
|
@@ -194,13 +147,6 @@ const BlockInspector = ( { showNoBlockSelectedMessage = true } ) => {
|
|
|
194
147
|
}
|
|
195
148
|
return null;
|
|
196
149
|
}
|
|
197
|
-
if ( topLevelLockedBlock ) {
|
|
198
|
-
return (
|
|
199
|
-
<BlockInspectorLockedBlocks
|
|
200
|
-
topLevelLockedBlock={ topLevelLockedBlock }
|
|
201
|
-
/>
|
|
202
|
-
);
|
|
203
|
-
}
|
|
204
150
|
|
|
205
151
|
return (
|
|
206
152
|
<BlockInspectorSingleBlockWrapper
|
|
@@ -219,6 +165,7 @@ const BlockInspector = ( { showNoBlockSelectedMessage = true } ) => {
|
|
|
219
165
|
<BlockInspectorSingleBlock
|
|
220
166
|
clientId={ selectedBlockClientId }
|
|
221
167
|
blockName={ blockType.name }
|
|
168
|
+
isSectionBlock={ isSectionBlock }
|
|
222
169
|
/>
|
|
223
170
|
</BlockInspectorSingleBlockWrapper>
|
|
224
171
|
);
|
|
@@ -260,9 +207,13 @@ const AnimatedContainer = ( {
|
|
|
260
207
|
);
|
|
261
208
|
};
|
|
262
209
|
|
|
263
|
-
const BlockInspectorSingleBlock = ( {
|
|
210
|
+
const BlockInspectorSingleBlock = ( {
|
|
211
|
+
clientId,
|
|
212
|
+
blockName,
|
|
213
|
+
isSectionBlock,
|
|
214
|
+
} ) => {
|
|
264
215
|
const availableTabs = useInspectorControlsTabs( blockName );
|
|
265
|
-
const showTabs = availableTabs?.length > 1;
|
|
216
|
+
const showTabs = ! isSectionBlock && availableTabs?.length > 1;
|
|
266
217
|
|
|
267
218
|
const hasBlockStyles = useSelect(
|
|
268
219
|
( select ) => {
|
|
@@ -274,6 +225,26 @@ const BlockInspectorSingleBlock = ( { clientId, blockName } ) => {
|
|
|
274
225
|
);
|
|
275
226
|
const blockInformation = useBlockDisplayInformation( clientId );
|
|
276
227
|
const borderPanelLabel = useBorderPanelLabel( { blockName } );
|
|
228
|
+
const contentClientIds = useSelect(
|
|
229
|
+
( select ) => {
|
|
230
|
+
// Avoid unnecessary subscription.
|
|
231
|
+
if ( ! isSectionBlock ) {
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
const {
|
|
236
|
+
getClientIdsOfDescendants,
|
|
237
|
+
getBlockName,
|
|
238
|
+
getBlockEditingMode,
|
|
239
|
+
} = select( blockEditorStore );
|
|
240
|
+
return getClientIdsOfDescendants( clientId ).filter(
|
|
241
|
+
( current ) =>
|
|
242
|
+
getBlockName( current ) !== 'core/list-item' &&
|
|
243
|
+
getBlockEditingMode( current ) === 'contentOnly'
|
|
244
|
+
);
|
|
245
|
+
},
|
|
246
|
+
[ isSectionBlock, clientId ]
|
|
247
|
+
);
|
|
277
248
|
|
|
278
249
|
return (
|
|
279
250
|
<div className="block-editor-block-inspector">
|
|
@@ -296,35 +267,48 @@ const BlockInspectorSingleBlock = ( { clientId, blockName } ) => {
|
|
|
296
267
|
{ hasBlockStyles && (
|
|
297
268
|
<BlockStylesPanel clientId={ clientId } />
|
|
298
269
|
) }
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
270
|
+
|
|
271
|
+
{ contentClientIds && contentClientIds?.length > 0 && (
|
|
272
|
+
<PanelBody title={ __( 'Content' ) }>
|
|
273
|
+
<BlockQuickNavigation
|
|
274
|
+
clientIds={ contentClientIds }
|
|
275
|
+
/>
|
|
276
|
+
</PanelBody>
|
|
277
|
+
) }
|
|
278
|
+
|
|
279
|
+
{ ! isSectionBlock && (
|
|
280
|
+
<>
|
|
281
|
+
<InspectorControls.Slot />
|
|
282
|
+
<InspectorControls.Slot group="list" />
|
|
283
|
+
<InspectorControls.Slot
|
|
284
|
+
group="color"
|
|
285
|
+
label={ __( 'Color' ) }
|
|
286
|
+
className="color-block-support-panel__inner-wrapper"
|
|
287
|
+
/>
|
|
288
|
+
<InspectorControls.Slot
|
|
289
|
+
group="background"
|
|
290
|
+
label={ __( 'Background image' ) }
|
|
291
|
+
/>
|
|
292
|
+
<InspectorControls.Slot
|
|
293
|
+
group="typography"
|
|
294
|
+
label={ __( 'Typography' ) }
|
|
295
|
+
/>
|
|
296
|
+
<InspectorControls.Slot
|
|
297
|
+
group="dimensions"
|
|
298
|
+
label={ __( 'Dimensions' ) }
|
|
299
|
+
/>
|
|
300
|
+
<InspectorControls.Slot
|
|
301
|
+
group="border"
|
|
302
|
+
label={ borderPanelLabel }
|
|
303
|
+
/>
|
|
304
|
+
<InspectorControls.Slot group="styles" />
|
|
305
|
+
<PositionControls />
|
|
306
|
+
<InspectorControls.Slot group="bindings" />
|
|
307
|
+
<div>
|
|
308
|
+
<AdvancedControls />
|
|
309
|
+
</div>
|
|
310
|
+
</>
|
|
311
|
+
) }
|
|
328
312
|
</>
|
|
329
313
|
) }
|
|
330
314
|
<SkipToSelectedBlock key="back" />
|
|
@@ -585,6 +585,7 @@ function BlockListBlockProvider( props ) {
|
|
|
585
585
|
getBlockMode,
|
|
586
586
|
isSelectionEnabled,
|
|
587
587
|
getTemplateLock,
|
|
588
|
+
isSectionBlock: _isSectionBlock,
|
|
588
589
|
getBlockWithoutAttributes,
|
|
589
590
|
getBlockAttributes,
|
|
590
591
|
canRemoveBlock,
|
|
@@ -607,10 +608,7 @@ function BlockListBlockProvider( props ) {
|
|
|
607
608
|
__unstableSelectionHasUnmergeableBlock,
|
|
608
609
|
isBlockBeingDragged,
|
|
609
610
|
isDragging,
|
|
610
|
-
hasBlockMovingClientId,
|
|
611
|
-
canInsertBlockType,
|
|
612
611
|
__unstableHasActiveBlockOverlayActive,
|
|
613
|
-
__unstableGetEditorMode,
|
|
614
612
|
getSelectedBlocksInitialCaretPosition,
|
|
615
613
|
} = unlock( select( blockEditorStore ) );
|
|
616
614
|
const blockWithoutAttributes =
|
|
@@ -668,7 +666,6 @@ function BlockListBlockProvider( props ) {
|
|
|
668
666
|
clientId,
|
|
669
667
|
checkDeep
|
|
670
668
|
);
|
|
671
|
-
const movingClientId = hasBlockMovingClientId();
|
|
672
669
|
const blockEditingMode = getBlockEditingMode( clientId );
|
|
673
670
|
|
|
674
671
|
const multiple = hasBlockSupport( blockName, 'multiple', true );
|
|
@@ -682,14 +679,12 @@ function BlockListBlockProvider( props ) {
|
|
|
682
679
|
blocksWithSameName.length &&
|
|
683
680
|
blocksWithSameName[ 0 ] !== clientId;
|
|
684
681
|
|
|
685
|
-
const editorMode = __unstableGetEditorMode();
|
|
686
|
-
|
|
687
682
|
return {
|
|
688
683
|
...previewContext,
|
|
689
684
|
mode: getBlockMode( clientId ),
|
|
690
685
|
isSelectionEnabled: isSelectionEnabled(),
|
|
691
686
|
isLocked: !! getTemplateLock( rootClientId ),
|
|
692
|
-
|
|
687
|
+
isSectionBlock: _isSectionBlock( clientId ),
|
|
693
688
|
canRemove,
|
|
694
689
|
canMove,
|
|
695
690
|
isSelected: _isSelected,
|
|
@@ -710,18 +705,15 @@ function BlockListBlockProvider( props ) {
|
|
|
710
705
|
) && hasSelectedInnerBlock( clientId ),
|
|
711
706
|
blockApiVersion: blockType?.apiVersion || 1,
|
|
712
707
|
blockTitle: match?.title || blockType?.title,
|
|
713
|
-
editorMode,
|
|
714
708
|
isSubtreeDisabled:
|
|
715
709
|
blockEditingMode === 'disabled' &&
|
|
716
710
|
isBlockSubtreeDisabled( clientId ),
|
|
717
711
|
hasOverlay:
|
|
718
712
|
__unstableHasActiveBlockOverlayActive( clientId ) &&
|
|
719
713
|
! isDragging(),
|
|
720
|
-
initialPosition:
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
? getSelectedBlocksInitialCaretPosition()
|
|
724
|
-
: undefined,
|
|
714
|
+
initialPosition: _isSelected
|
|
715
|
+
? getSelectedBlocksInitialCaretPosition()
|
|
716
|
+
: undefined,
|
|
725
717
|
isHighlighted: isBlockHighlighted( clientId ),
|
|
726
718
|
isMultiSelected,
|
|
727
719
|
isPartiallySelected:
|
|
@@ -730,13 +722,6 @@ function BlockListBlockProvider( props ) {
|
|
|
730
722
|
! __unstableSelectionHasUnmergeableBlock(),
|
|
731
723
|
isDragging: isBlockBeingDragged( clientId ),
|
|
732
724
|
hasChildSelected: isAncestorOfSelectedBlock,
|
|
733
|
-
isBlockMovingMode: !! movingClientId,
|
|
734
|
-
canInsertMovingBlock:
|
|
735
|
-
movingClientId &&
|
|
736
|
-
canInsertBlockType(
|
|
737
|
-
getBlockName( movingClientId ),
|
|
738
|
-
rootClientId
|
|
739
|
-
),
|
|
740
725
|
isEditingDisabled: blockEditingMode === 'disabled',
|
|
741
726
|
hasEditableOutline:
|
|
742
727
|
blockEditingMode !== 'disabled' &&
|
|
@@ -766,7 +751,6 @@ function BlockListBlockProvider( props ) {
|
|
|
766
751
|
themeSupportsLayout,
|
|
767
752
|
isTemporarilyEditingAsBlocks,
|
|
768
753
|
blockEditingMode,
|
|
769
|
-
editorMode,
|
|
770
754
|
mayDisplayControls,
|
|
771
755
|
mayDisplayParentControls,
|
|
772
756
|
index,
|
|
@@ -781,9 +765,7 @@ function BlockListBlockProvider( props ) {
|
|
|
781
765
|
isReusable,
|
|
782
766
|
isDragging,
|
|
783
767
|
hasChildSelected,
|
|
784
|
-
|
|
785
|
-
canInsertMovingBlock,
|
|
786
|
-
templateLock,
|
|
768
|
+
isSectionBlock,
|
|
787
769
|
isEditingDisabled,
|
|
788
770
|
hasEditableOutline,
|
|
789
771
|
className,
|
|
@@ -821,16 +803,13 @@ function BlockListBlockProvider( props ) {
|
|
|
821
803
|
hasOverlay,
|
|
822
804
|
initialPosition,
|
|
823
805
|
blockEditingMode,
|
|
824
|
-
editorMode,
|
|
825
806
|
isHighlighted,
|
|
826
807
|
isMultiSelected,
|
|
827
808
|
isPartiallySelected,
|
|
828
809
|
isReusable,
|
|
829
810
|
isDragging,
|
|
830
811
|
hasChildSelected,
|
|
831
|
-
|
|
832
|
-
canInsertMovingBlock,
|
|
833
|
-
templateLock,
|
|
812
|
+
isSectionBlock,
|
|
834
813
|
isEditingDisabled,
|
|
835
814
|
hasEditableOutline,
|
|
836
815
|
isTemporarilyEditingAsBlocks,
|
|
@@ -80,7 +80,6 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
|
|
|
80
80
|
// since things like border-radius need to be able to be set on the block itself.
|
|
81
81
|
.block-editor-block-list__block.is-highlighted,
|
|
82
82
|
.block-editor-block-list__block.is-highlighted ~ .is-multi-selected,
|
|
83
|
-
&.is-navigate-mode .block-editor-block-list__block.is-selected,
|
|
84
83
|
.block-editor-block-list__block:not([contenteditable="true"]):focus {
|
|
85
84
|
outline: none;
|
|
86
85
|
|
|
@@ -92,56 +91,12 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
|
|
|
92
91
|
}
|
|
93
92
|
}
|
|
94
93
|
|
|
95
|
-
// Moving blocks using keyboard (Ellipsis > Move).
|
|
96
|
-
& .is-block-moving-mode.block-editor-block-list__block.is-selected {
|
|
97
|
-
|
|
98
|
-
&::after {
|
|
99
|
-
content: "";
|
|
100
|
-
position: absolute;
|
|
101
|
-
z-index: 0;
|
|
102
|
-
pointer-events: none;
|
|
103
|
-
transition:
|
|
104
|
-
border-color 0.1s linear,
|
|
105
|
-
border-style 0.1s linear,
|
|
106
|
-
box-shadow 0.1s linear;
|
|
107
|
-
right: 0;
|
|
108
|
-
left: 0;
|
|
109
|
-
top: -$default-block-margin * 0.5;
|
|
110
|
-
border-radius: $radius-small;
|
|
111
|
-
border-top: 4px solid $gray-400;
|
|
112
|
-
bottom: auto;
|
|
113
|
-
box-shadow: none;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
& .is-block-moving-mode.can-insert-moving-block.block-editor-block-list__block.is-selected {
|
|
118
|
-
&::after {
|
|
119
|
-
border-color: var(--wp-admin-theme-color);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
// Ensure an accurate partial text selection.
|
|
124
|
-
// To do this, we disable text selection on the main container, then re-enable it only on the
|
|
125
|
-
// elements that actually get selected.
|
|
126
|
-
// To keep in mind: user-select is currently inherited to all nodes inside.
|
|
127
|
-
.has-multi-selection & {
|
|
128
|
-
user-select: none;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
94
|
// Re-enable it on components inside.
|
|
132
95
|
[class^="components-"] {
|
|
133
96
|
user-select: text;
|
|
134
97
|
}
|
|
135
98
|
}
|
|
136
99
|
|
|
137
|
-
.is-block-moving-mode.block-editor-block-list__block-selection-button {
|
|
138
|
-
// Should be invisible but not unfocusable.
|
|
139
|
-
opacity: 0;
|
|
140
|
-
font-size: 1px;
|
|
141
|
-
height: 1px;
|
|
142
|
-
padding: 0;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
100
|
.block-editor-block-list__layout .block-editor-block-list__block {
|
|
146
101
|
// With `position: static`, Safari marks a full-width selection rectangle, including margins.
|
|
147
102
|
// With `position: relative`, Safari marks an inline selection rectangle, similar to that of
|
|
@@ -154,11 +109,9 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
|
|
|
154
109
|
overflow-wrap: break-word;
|
|
155
110
|
|
|
156
111
|
pointer-events: auto;
|
|
157
|
-
user-select: text;
|
|
158
112
|
|
|
159
113
|
&.is-editing-disabled {
|
|
160
114
|
pointer-events: none;
|
|
161
|
-
user-select: none;
|
|
162
115
|
}
|
|
163
116
|
|
|
164
117
|
&.has-negative-margin {
|
|
@@ -223,19 +176,6 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
|
|
|
223
176
|
background-color: transparent;
|
|
224
177
|
}
|
|
225
178
|
|
|
226
|
-
// Reusable blocks clickthrough overlays.
|
|
227
|
-
&.is-reusable > .block-editor-inner-blocks > .block-editor-block-list__layout.has-overlay {
|
|
228
|
-
// Remove only the top click overlay.
|
|
229
|
-
&::after {
|
|
230
|
-
display: none;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
// Restore it for subsequent.
|
|
234
|
-
.block-editor-block-list__layout.has-overlay::after {
|
|
235
|
-
display: block;
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
|
|
239
179
|
// Reusable blocks parent border.
|
|
240
180
|
&.is-reusable.has-child-selected::after {
|
|
241
181
|
box-shadow: 0 0 0 1px var(--wp-admin-theme-color);
|
|
@@ -307,7 +247,7 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
|
|
|
307
247
|
}
|
|
308
248
|
}
|
|
309
249
|
|
|
310
|
-
.is-root-container:not([inert]) .block-editor-block-list__block.is-
|
|
250
|
+
.is-root-container:not([inert]) .block-editor-block-list__block.is-selected .block-editor-block-list__block.has-editable-outline::after {
|
|
311
251
|
animation-name: block-editor-is-editable__animation;
|
|
312
252
|
animation-duration: 0.8s;
|
|
313
253
|
animation-timing-function: ease-out;
|