@wordpress/block-editor 8.3.0 → 8.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/README.md +56 -18
- package/build/components/alignment-control/index.js +13 -6
- package/build/components/alignment-control/index.js.map +1 -1
- package/build/components/block-alignment-control/index.js +13 -6
- package/build/components/block-alignment-control/index.js.map +1 -1
- package/build/components/block-draggable/index.js +2 -3
- package/build/components/block-draggable/index.js.map +1 -1
- package/build/components/block-icon/index.js +4 -0
- package/build/components/block-icon/index.js.map +1 -1
- package/build/components/block-inspector/index.js +6 -1
- package/build/components/block-inspector/index.js.map +1 -1
- package/build/components/block-list/block-html.js +4 -1
- package/build/components/block-list/block-html.js.map +1 -1
- package/build/components/block-list/block.js +4 -1
- package/build/components/block-list/block.js.map +1 -1
- package/build/components/block-list/use-block-props/index.js +1 -6
- package/build/components/block-list/use-block-props/index.js.map +1 -1
- package/build/components/block-list/use-block-props/use-focus-first-element.js +22 -6
- package/build/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
- package/build/components/block-list/use-block-props/use-focus-handler.js +7 -1
- package/build/components/block-list/use-block-props/use-focus-handler.js.map +1 -1
- package/build/components/block-list-appender/index.js +6 -1
- package/build/components/block-list-appender/index.js.map +1 -1
- package/build/components/block-lock/index.js +32 -0
- package/build/components/block-lock/index.js.map +1 -0
- package/build/components/block-lock/menu-item.js +67 -0
- package/build/components/block-lock/menu-item.js.map +1 -0
- package/build/components/block-lock/modal.js +134 -0
- package/build/components/block-lock/modal.js.map +1 -0
- package/build/components/block-lock/toolbar.js +78 -0
- package/build/components/block-lock/toolbar.js.map +1 -0
- package/build/components/block-mover/index.js +4 -0
- package/build/components/block-mover/index.js.map +1 -1
- package/build/components/block-settings-menu/block-settings-dropdown.js +75 -10
- package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build/components/block-settings-menu-controls/index.js +19 -9
- package/build/components/block-settings-menu-controls/index.js.map +1 -1
- package/build/components/block-switcher/index.js +1 -1
- package/build/components/block-switcher/index.js.map +1 -1
- package/build/components/block-title/index.js +2 -2
- package/build/components/block-title/index.js.map +1 -1
- package/build/components/block-title/use-block-display-title.js +8 -6
- package/build/components/block-title/use-block-display-title.js.map +1 -1
- package/build/components/block-toolbar/block-name-context.js +17 -0
- package/build/components/block-toolbar/block-name-context.js.map +1 -0
- package/build/components/block-toolbar/block-toolbar-last-item.js +20 -0
- package/build/components/block-toolbar/block-toolbar-last-item.js.map +1 -0
- package/build/components/block-toolbar/index.js +24 -5
- package/build/components/block-toolbar/index.js.map +1 -1
- package/build/components/block-tools/index.js +0 -16
- package/build/components/block-tools/index.js.map +1 -1
- package/build/components/block-variation-transforms/index.js +92 -47
- package/build/components/block-variation-transforms/index.js.map +1 -1
- package/build/components/block-vertical-alignment-control/index.js +13 -6
- package/build/components/block-vertical-alignment-control/index.js.map +1 -1
- package/build/components/border-radius-control/index.js +0 -1
- package/build/components/border-radius-control/index.js.map +1 -1
- package/build/components/border-radius-control/utils.js +1 -1
- package/build/components/border-radius-control/utils.js.map +1 -1
- package/build/components/colors-gradients/control.js +3 -1
- package/build/components/colors-gradients/control.js.map +1 -1
- package/build/components/contrast-checker/index.js +4 -0
- package/build/components/contrast-checker/index.js.map +1 -1
- package/build/components/convert-to-group-buttons/index.js +8 -0
- package/build/components/convert-to-group-buttons/index.js.map +1 -1
- package/build/components/convert-to-group-buttons/toolbar.js +105 -0
- package/build/components/convert-to-group-buttons/toolbar.js.map +1 -0
- package/build/components/copy-handler/index.js +4 -0
- package/build/components/copy-handler/index.js.map +1 -1
- package/build/components/date-format-picker/index.js +132 -0
- package/build/components/date-format-picker/index.js.map +1 -0
- package/build/components/font-sizes/font-size-picker.js +4 -0
- package/build/components/font-sizes/font-size-picker.js.map +1 -1
- package/build/components/iframe/index.js +6 -9
- package/build/components/iframe/index.js.map +1 -1
- package/build/components/index.js +27 -0
- package/build/components/index.js.map +1 -1
- package/build/components/justify-content-control/index.js +13 -6
- package/build/components/justify-content-control/index.js.map +1 -1
- package/build/components/keyboard-shortcuts/index.js +1 -1
- package/build/components/keyboard-shortcuts/index.js.map +1 -1
- package/build/components/line-height-control/index.js +15 -6
- package/build/components/line-height-control/index.js.map +1 -1
- package/build/components/list-view/block-select-button.js +24 -23
- package/build/components/list-view/block-select-button.js.map +1 -1
- package/build/components/list-view/block.js +38 -13
- package/build/components/list-view/block.js.map +1 -1
- package/build/components/list-view/branch.js +16 -13
- package/build/components/list-view/branch.js.map +1 -1
- package/build/components/list-view/index.js +7 -1
- package/build/components/list-view/index.js.map +1 -1
- package/build/components/list-view/use-block-selection.js +9 -2
- package/build/components/list-view/use-block-selection.js.map +1 -1
- package/build/components/media-replace-flow/index.js +4 -0
- package/build/components/media-replace-flow/index.js.map +1 -1
- package/build/components/multi-selection-inspector/index.js +1 -1
- package/build/components/multi-selection-inspector/index.js.map +1 -1
- package/build/components/rich-text/index.js +27 -5
- package/build/components/rich-text/index.js.map +1 -1
- package/build/components/rich-text/index.native.js +13 -9
- package/build/components/rich-text/index.native.js.map +1 -1
- package/build/components/rich-text/split-value.js +12 -2
- package/build/components/rich-text/split-value.js.map +1 -1
- package/build/components/rich-text/use-firefox-compat.js +49 -0
- package/build/components/rich-text/use-firefox-compat.js.map +1 -0
- package/build/components/rich-text/use-input-rules.js +34 -2
- package/build/components/rich-text/use-input-rules.js.map +1 -1
- package/build/components/skip-to-selected-block/index.js +4 -0
- package/build/components/skip-to-selected-block/index.js.map +1 -1
- package/build/components/url-popover/image-url-input-ui.js +11 -27
- package/build/components/url-popover/image-url-input-ui.js.map +1 -1
- package/build/components/writing-flow/index.js +9 -1
- package/build/components/writing-flow/index.js.map +1 -1
- package/build/components/writing-flow/use-arrow-nav.js +3 -44
- package/build/components/writing-flow/use-arrow-nav.js.map +1 -1
- package/build/components/writing-flow/use-click-selection.js +68 -0
- package/build/components/writing-flow/use-click-selection.js.map +1 -0
- package/build/components/writing-flow/use-drag-selection.js +134 -0
- package/build/components/writing-flow/use-drag-selection.js.map +1 -0
- package/build/components/writing-flow/use-input.js +116 -0
- package/build/components/writing-flow/use-input.js.map +1 -0
- package/build/components/writing-flow/use-multi-selection.js +18 -38
- package/build/components/writing-flow/use-multi-selection.js.map +1 -1
- package/build/components/writing-flow/use-selection-observer.js +161 -0
- package/build/components/writing-flow/use-selection-observer.js.map +1 -0
- package/build/components/writing-flow/use-tab-nav.js +1 -8
- package/build/components/writing-flow/use-tab-nav.js.map +1 -1
- package/build/hooks/anchor.js +7 -6
- package/build/hooks/anchor.js.map +1 -1
- package/build/hooks/border-color.js +3 -3
- package/build/hooks/border-color.js.map +1 -1
- package/build/hooks/border.js +0 -14
- package/build/hooks/border.js.map +1 -1
- package/build/hooks/color.js +20 -17
- package/build/hooks/color.js.map +1 -1
- package/build/hooks/font-family.js +5 -1
- package/build/hooks/font-family.js.map +1 -1
- package/build/hooks/font-size.js +4 -2
- package/build/hooks/font-size.js.map +1 -1
- package/build/hooks/gap.js +77 -5
- package/build/hooks/gap.js.map +1 -1
- package/build/hooks/layout.js +7 -2
- package/build/hooks/layout.js.map +1 -1
- package/build/hooks/style.js +34 -3
- package/build/hooks/style.js.map +1 -1
- package/build/hooks/utils.js +29 -0
- package/build/hooks/utils.js.map +1 -1
- package/build/layouts/flex.js +82 -15
- package/build/layouts/flex.js.map +1 -1
- package/build/layouts/flow.js +22 -13
- package/build/layouts/flow.js.map +1 -1
- package/build/store/actions.js +297 -51
- package/build/store/actions.js.map +1 -1
- package/build/store/defaults.js +5 -1
- package/build/store/defaults.js.map +1 -1
- package/build/store/reducer.js +25 -13
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +171 -21
- package/build/store/selectors.js.map +1 -1
- package/build/utils/dom.js +2 -1
- package/build/utils/dom.js.map +1 -1
- package/build-module/components/alignment-control/index.js +12 -4
- package/build-module/components/alignment-control/index.js.map +1 -1
- package/build-module/components/block-alignment-control/index.js +12 -4
- package/build-module/components/block-alignment-control/index.js.map +1 -1
- package/build-module/components/block-draggable/index.js +2 -3
- package/build-module/components/block-draggable/index.js.map +1 -1
- package/build-module/components/block-icon/index.js +4 -0
- package/build-module/components/block-icon/index.js.map +1 -1
- package/build-module/components/block-inspector/index.js +6 -1
- package/build-module/components/block-inspector/index.js.map +1 -1
- package/build-module/components/block-list/block-html.js +5 -2
- package/build-module/components/block-list/block-html.js.map +1 -1
- package/build-module/components/block-list/block.js +5 -2
- package/build-module/components/block-list/block.js.map +1 -1
- package/build-module/components/block-list/use-block-props/index.js +1 -4
- package/build-module/components/block-list/use-block-props/index.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-focus-first-element.js +22 -6
- package/build-module/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-focus-handler.js +7 -1
- package/build-module/components/block-list/use-block-props/use-focus-handler.js.map +1 -1
- package/build-module/components/block-list-appender/index.js +6 -1
- package/build-module/components/block-list-appender/index.js.map +1 -1
- package/build-module/components/block-lock/index.js +4 -0
- package/build-module/components/block-lock/index.js.map +1 -0
- package/build-module/components/block-lock/menu-item.js +53 -0
- package/build-module/components/block-lock/menu-item.js.map +1 -0
- package/build-module/components/block-lock/modal.js +119 -0
- package/build-module/components/block-lock/modal.js.map +1 -0
- package/build-module/components/block-lock/toolbar.js +63 -0
- package/build-module/components/block-lock/toolbar.js.map +1 -0
- package/build-module/components/block-mover/index.js +4 -0
- package/build-module/components/block-mover/index.js.map +1 -1
- package/build-module/components/block-settings-menu/block-settings-dropdown.js +75 -12
- package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build-module/components/block-settings-menu-controls/index.js +18 -9
- package/build-module/components/block-settings-menu-controls/index.js.map +1 -1
- package/build-module/components/block-switcher/index.js +2 -2
- package/build-module/components/block-switcher/index.js.map +1 -1
- package/build-module/components/block-title/index.js +2 -2
- package/build-module/components/block-title/index.js.map +1 -1
- package/build-module/components/block-title/use-block-display-title.js +8 -6
- package/build-module/components/block-title/use-block-display-title.js.map +1 -1
- package/build-module/components/block-toolbar/block-name-context.js +9 -0
- package/build-module/components/block-toolbar/block-name-context.js.map +1 -0
- package/build-module/components/block-toolbar/block-toolbar-last-item.js +11 -0
- package/build-module/components/block-toolbar/block-toolbar-last-item.js.map +1 -0
- package/build-module/components/block-toolbar/index.js +19 -4
- package/build-module/components/block-toolbar/index.js.map +1 -1
- package/build-module/components/block-tools/index.js +0 -16
- package/build-module/components/block-tools/index.js.map +1 -1
- package/build-module/components/block-variation-transforms/index.js +95 -49
- package/build-module/components/block-variation-transforms/index.js.map +1 -1
- package/build-module/components/block-vertical-alignment-control/index.js +12 -4
- package/build-module/components/block-vertical-alignment-control/index.js.map +1 -1
- package/build-module/components/border-radius-control/index.js +0 -1
- package/build-module/components/border-radius-control/index.js.map +1 -1
- package/build-module/components/border-radius-control/utils.js +1 -1
- package/build-module/components/border-radius-control/utils.js.map +1 -1
- package/build-module/components/colors-gradients/control.js +3 -1
- package/build-module/components/colors-gradients/control.js.map +1 -1
- package/build-module/components/contrast-checker/index.js +4 -0
- package/build-module/components/contrast-checker/index.js.map +1 -1
- package/build-module/components/convert-to-group-buttons/index.js +2 -1
- package/build-module/components/convert-to-group-buttons/index.js.map +1 -1
- package/build-module/components/convert-to-group-buttons/toolbar.js +90 -0
- package/build-module/components/convert-to-group-buttons/toolbar.js.map +1 -0
- package/build-module/components/copy-handler/index.js +4 -0
- package/build-module/components/copy-handler/index.js.map +1 -1
- package/build-module/components/date-format-picker/index.js +122 -0
- package/build-module/components/date-format-picker/index.js.map +1 -0
- package/build-module/components/font-sizes/font-size-picker.js +4 -0
- package/build-module/components/font-sizes/font-size-picker.js.map +1 -1
- package/build-module/components/iframe/index.js +6 -9
- package/build-module/components/iframe/index.js.map +1 -1
- package/build-module/components/index.js +3 -0
- package/build-module/components/index.js.map +1 -1
- package/build-module/components/justify-content-control/index.js +12 -4
- package/build-module/components/justify-content-control/index.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/index.js +1 -1
- package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
- package/build-module/components/line-height-control/index.js +14 -5
- package/build-module/components/line-height-control/index.js.map +1 -1
- package/build-module/components/list-view/block-select-button.js +24 -23
- package/build-module/components/list-view/block-select-button.js.map +1 -1
- package/build-module/components/list-view/block.js +36 -13
- package/build-module/components/list-view/block.js.map +1 -1
- package/build-module/components/list-view/branch.js +16 -13
- package/build-module/components/list-view/branch.js.map +1 -1
- package/build-module/components/list-view/index.js +7 -1
- package/build-module/components/list-view/index.js.map +1 -1
- package/build-module/components/list-view/use-block-selection.js +10 -3
- package/build-module/components/list-view/use-block-selection.js.map +1 -1
- package/build-module/components/media-replace-flow/index.js +4 -0
- package/build-module/components/media-replace-flow/index.js.map +1 -1
- package/build-module/components/multi-selection-inspector/index.js +2 -2
- package/build-module/components/multi-selection-inspector/index.js.map +1 -1
- package/build-module/components/rich-text/index.js +26 -5
- package/build-module/components/rich-text/index.js.map +1 -1
- package/build-module/components/rich-text/index.native.js +13 -9
- package/build-module/components/rich-text/index.native.js.map +1 -1
- package/build-module/components/rich-text/split-value.js +12 -2
- package/build-module/components/rich-text/split-value.js.map +1 -1
- package/build-module/components/rich-text/use-firefox-compat.js +39 -0
- package/build-module/components/rich-text/use-firefox-compat.js.map +1 -0
- package/build-module/components/rich-text/use-input-rules.js +35 -4
- package/build-module/components/rich-text/use-input-rules.js.map +1 -1
- package/build-module/components/skip-to-selected-block/index.js +4 -0
- package/build-module/components/skip-to-selected-block/index.js.map +1 -1
- package/build-module/components/url-popover/image-url-input-ui.js +12 -28
- package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
- package/build-module/components/writing-flow/index.js +5 -1
- package/build-module/components/writing-flow/index.js.map +1 -1
- package/build-module/components/writing-flow/use-arrow-nav.js +4 -45
- package/build-module/components/writing-flow/use-arrow-nav.js.map +1 -1
- package/build-module/components/writing-flow/use-click-selection.js +57 -0
- package/build-module/components/writing-flow/use-click-selection.js.map +1 -0
- package/build-module/components/writing-flow/use-drag-selection.js +124 -0
- package/build-module/components/writing-flow/use-drag-selection.js.map +1 -0
- package/build-module/components/writing-flow/use-input.js +104 -0
- package/build-module/components/writing-flow/use-input.js.map +1 -0
- package/build-module/components/writing-flow/use-multi-selection.js +18 -37
- package/build-module/components/writing-flow/use-multi-selection.js.map +1 -1
- package/build-module/components/writing-flow/use-selection-observer.js +150 -0
- package/build-module/components/writing-flow/use-selection-observer.js.map +1 -0
- package/build-module/components/writing-flow/use-tab-nav.js +1 -9
- package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
- package/build-module/hooks/anchor.js +7 -6
- package/build-module/hooks/anchor.js.map +1 -1
- package/build-module/hooks/border-color.js +5 -5
- package/build-module/hooks/border-color.js.map +1 -1
- package/build-module/hooks/border.js +0 -12
- package/build-module/hooks/border.js.map +1 -1
- package/build-module/hooks/color.js +19 -18
- package/build-module/hooks/color.js.map +1 -1
- package/build-module/hooks/font-family.js +3 -1
- package/build-module/hooks/font-family.js.map +1 -1
- package/build-module/hooks/font-size.js +4 -3
- package/build-module/hooks/font-size.js.map +1 -1
- package/build-module/hooks/gap.js +75 -7
- package/build-module/hooks/gap.js.map +1 -1
- package/build-module/hooks/layout.js +7 -2
- package/build-module/hooks/layout.js.map +1 -1
- package/build-module/hooks/style.js +33 -3
- package/build-module/hooks/style.js.map +1 -1
- package/build-module/hooks/utils.js +26 -0
- package/build-module/hooks/utils.js.map +1 -1
- package/build-module/layouts/flex.js +81 -16
- package/build-module/layouts/flex.js.map +1 -1
- package/build-module/layouts/flow.js +20 -13
- package/build-module/layouts/flow.js.map +1 -1
- package/build-module/store/actions.js +286 -49
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/defaults.js +5 -1
- package/build-module/store/defaults.js.map +1 -1
- package/build-module/store/reducer.js +25 -13
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +162 -20
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/utils/dom.js +2 -1
- package/build-module/utils/dom.js.map +1 -1
- package/build-style/style-rtl.css +214 -24
- package/build-style/style.css +214 -24
- package/build-types/utils/dom.d.ts.map +1 -1
- package/package.json +28 -27
- package/src/components/alignment-control/index.js +9 -4
- package/src/components/block-alignment-control/index.js +9 -4
- package/src/components/block-draggable/index.js +2 -5
- package/src/components/block-icon/index.js +3 -0
- package/src/components/block-inspector/index.js +4 -0
- package/src/components/block-list/block-html.js +8 -4
- package/src/components/block-list/block.js +5 -1
- package/src/components/block-list/style.scss +4 -5
- package/src/components/block-list/use-block-props/index.js +0 -5
- package/src/components/block-list/use-block-props/use-focus-first-element.js +27 -6
- package/src/components/block-list/use-block-props/use-focus-handler.js +8 -0
- package/src/components/block-list-appender/index.js +5 -0
- package/src/components/block-lock/index.js +3 -0
- package/src/components/block-lock/menu-item.js +59 -0
- package/src/components/block-lock/modal.js +170 -0
- package/src/components/block-lock/style.scss +70 -0
- package/src/components/block-lock/toolbar.js +68 -0
- package/src/components/block-mover/index.js +3 -0
- package/src/components/block-mover/style.scss +4 -0
- package/src/components/block-settings-menu/block-settings-dropdown.js +109 -9
- package/src/components/block-settings-menu-controls/index.js +33 -12
- package/src/components/block-switcher/index.js +2 -2
- package/src/components/block-switcher/style.scss +8 -1
- package/src/components/block-switcher/test/index.js +2 -2
- package/src/components/block-title/README.md +6 -1
- package/src/components/block-title/index.js +2 -2
- package/src/components/block-title/test/index.js +43 -1
- package/src/components/block-title/use-block-display-title.js +10 -7
- package/src/components/block-toolbar/block-name-context.js +8 -0
- package/src/components/block-toolbar/block-toolbar-last-item.js +12 -0
- package/src/components/block-toolbar/index.js +24 -2
- package/src/components/block-toolbar/style.scss +10 -0
- package/src/components/block-tools/index.js +0 -19
- package/src/components/block-tools/style.scss +27 -0
- package/src/components/block-variation-transforms/index.js +105 -36
- package/src/components/block-variation-transforms/style.scss +1 -1
- package/src/components/block-vertical-alignment-control/index.js +9 -4
- package/src/components/border-radius-control/index.js +0 -1
- package/src/components/border-radius-control/test/utils.js +4 -0
- package/src/components/border-radius-control/utils.js +2 -1
- package/src/components/button-block-appender/style.scss +5 -1
- package/src/components/color-palette/test/__snapshots__/control.js.snap +70 -4
- package/src/components/colors-gradients/control.js +1 -1
- package/src/components/colors-gradients/style.scss +6 -0
- package/src/components/contrast-checker/index.js +3 -0
- package/src/components/convert-to-group-buttons/index.js +6 -1
- package/src/components/convert-to-group-buttons/toolbar.js +87 -0
- package/src/components/copy-handler/index.js +3 -0
- package/src/components/date-format-picker/README.md +58 -0
- package/src/components/date-format-picker/index.js +161 -0
- package/src/components/date-format-picker/style.scss +31 -0
- package/src/components/font-sizes/font-size-picker.js +3 -0
- package/src/components/iframe/index.js +5 -7
- package/src/components/index.js +3 -0
- package/src/components/justify-content-control/index.js +9 -4
- package/src/components/keyboard-shortcuts/index.js +1 -1
- package/src/components/line-height-control/index.js +11 -6
- package/src/components/link-control/README.md +1 -1
- package/src/components/list-view/block-select-button.js +21 -30
- package/src/components/list-view/block.js +55 -13
- package/src/components/list-view/branch.js +37 -15
- package/src/components/list-view/index.js +6 -0
- package/src/components/list-view/style.scss +56 -14
- package/src/components/list-view/use-block-selection.js +15 -2
- package/src/components/media-placeholder/README.md +8 -0
- package/src/components/media-replace-flow/index.js +3 -0
- package/src/components/multi-selection-inspector/index.js +2 -2
- package/src/components/rich-text/index.js +25 -2
- package/src/components/rich-text/index.native.js +24 -8
- package/src/components/rich-text/split-value.js +5 -1
- package/src/components/rich-text/use-firefox-compat.js +39 -0
- package/src/components/rich-text/use-input-rules.js +40 -3
- package/src/components/skip-to-selected-block/index.js +3 -0
- package/src/components/url-input/style.scss +3 -2
- package/src/components/url-popover/image-url-input-ui.js +16 -29
- package/src/components/writing-flow/index.js +8 -0
- package/src/components/writing-flow/readme.md +28 -0
- package/src/components/writing-flow/use-arrow-nav.js +4 -53
- package/src/components/writing-flow/use-click-selection.js +65 -0
- package/src/components/writing-flow/use-drag-selection.js +126 -0
- package/src/components/writing-flow/use-input.js +112 -0
- package/src/components/writing-flow/use-multi-selection.js +13 -36
- package/src/components/writing-flow/use-selection-observer.js +153 -0
- package/src/components/writing-flow/use-tab-nav.js +1 -11
- package/src/hooks/anchor.js +8 -6
- package/src/hooks/border-color.js +5 -5
- package/src/hooks/border.js +0 -13
- package/src/hooks/color.js +51 -24
- package/src/hooks/font-family.js +5 -2
- package/src/hooks/font-size.js +10 -7
- package/src/hooks/gap.js +91 -12
- package/src/hooks/layout.js +11 -1
- package/src/hooks/style.js +40 -4
- package/src/hooks/test/gap.js +66 -0
- package/src/hooks/test/style.js +94 -0
- package/src/hooks/test/utils.js +1 -1
- package/src/hooks/utils.js +26 -0
- package/src/layouts/flex.js +93 -6
- package/src/layouts/flow.js +28 -12
- package/src/store/actions.js +349 -32
- package/src/store/defaults.js +7 -1
- package/src/store/reducer.js +25 -10
- package/src/store/selectors.js +207 -25
- package/src/store/test/selectors.js +305 -5
- package/src/style.scss +2 -0
- package/src/utils/dom.js +2 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/build/components/block-list/use-block-props/use-multi-selection.js +0 -205
- package/build/components/block-list/use-block-props/use-multi-selection.js.map +0 -1
- package/build/components/block-list/use-block-props/use-scroll-into-view.js +0 -77
- package/build/components/block-list/use-block-props/use-scroll-into-view.js.map +0 -1
- package/build-module/components/block-list/use-block-props/use-multi-selection.js +0 -192
- package/build-module/components/block-list/use-block-props/use-multi-selection.js.map +0 -1
- package/build-module/components/block-list/use-block-props/use-scroll-into-view.js +0 -63
- package/build-module/components/block-list/use-block-props/use-scroll-into-view.js.map +0 -1
- package/src/components/block-list/use-block-props/use-multi-selection.js +0 -227
- package/src/components/block-list/use-block-props/use-scroll-into-view.js +0 -73
package/build-style/style.css
CHANGED
|
@@ -185,8 +185,9 @@
|
|
|
185
185
|
cursor: default;
|
|
186
186
|
}
|
|
187
187
|
.block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-selected::after, .block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-hovered::after,
|
|
188
|
+
.block-editor-block-list__layout .block-editor-block-list__block.is-multi-selected:not([contenteditable])::after,
|
|
188
189
|
.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted::after,
|
|
189
|
-
.block-editor-block-list__layout .block-editor-block-list__block.is-multi-selected::after {
|
|
190
|
+
.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted ~ .is-multi-selected::after {
|
|
190
191
|
position: absolute;
|
|
191
192
|
z-index: 1;
|
|
192
193
|
pointer-events: none;
|
|
@@ -195,28 +196,30 @@
|
|
|
195
196
|
bottom: 1px;
|
|
196
197
|
left: 1px;
|
|
197
198
|
right: 1px;
|
|
198
|
-
box-shadow: 0 0 0
|
|
199
|
+
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
199
200
|
border-radius: 1px;
|
|
200
201
|
outline: 2px solid transparent;
|
|
201
202
|
}
|
|
202
203
|
.is-dark-theme .block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-selected::after, .is-dark-theme .block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-hovered::after,
|
|
204
|
+
.is-dark-theme .block-editor-block-list__layout .block-editor-block-list__block.is-multi-selected:not([contenteditable])::after,
|
|
203
205
|
.is-dark-theme .block-editor-block-list__layout .block-editor-block-list__block.is-highlighted::after,
|
|
204
|
-
.is-dark-theme .block-editor-block-list__layout .block-editor-block-list__block.is-multi-selected::after {
|
|
206
|
+
.is-dark-theme .block-editor-block-list__layout .block-editor-block-list__block.is-highlighted ~ .is-multi-selected::after {
|
|
205
207
|
box-shadow: 0 0 0 1px #fff;
|
|
206
208
|
}
|
|
207
209
|
.block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-selected .components-placeholder ::selection, .block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-hovered .components-placeholder ::selection,
|
|
210
|
+
.block-editor-block-list__layout .block-editor-block-list__block.is-multi-selected:not([contenteditable]) .components-placeholder ::selection,
|
|
208
211
|
.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted .components-placeholder ::selection,
|
|
209
|
-
.block-editor-block-list__layout .block-editor-block-list__block.is-multi-selected .components-placeholder ::selection {
|
|
212
|
+
.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted ~ .is-multi-selected .components-placeholder ::selection {
|
|
210
213
|
background: transparent;
|
|
211
214
|
}
|
|
212
215
|
.block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-hovered:not(.is-selected)::after {
|
|
213
216
|
box-shadow: 0 0 0 1px var(--wp-admin-theme-color);
|
|
214
217
|
}
|
|
215
218
|
.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted::after {
|
|
216
|
-
box-shadow: 0 0 0
|
|
219
|
+
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
217
220
|
outline: 1px solid transparent;
|
|
218
221
|
}
|
|
219
|
-
.block-editor-block-list__layout
|
|
222
|
+
.block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-selected::after, .block-editor-block-list__layout .is-block-moving-mode.block-editor-block-list__block.has-child-selected {
|
|
220
223
|
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
221
224
|
outline: 2px solid transparent;
|
|
222
225
|
}
|
|
@@ -737,6 +740,47 @@
|
|
|
737
740
|
display: none;
|
|
738
741
|
}
|
|
739
742
|
|
|
743
|
+
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot,
|
|
744
|
+
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar,
|
|
745
|
+
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown,
|
|
746
|
+
.block-editor-block-toolbar .components-toolbar-group {
|
|
747
|
+
padding-left: 6px;
|
|
748
|
+
padding-right: 6px;
|
|
749
|
+
}
|
|
750
|
+
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot .components-button,
|
|
751
|
+
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot .components-button.has-icon.has-icon,
|
|
752
|
+
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar .components-button,
|
|
753
|
+
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar .components-button.has-icon.has-icon,
|
|
754
|
+
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown .components-button,
|
|
755
|
+
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown .components-button.has-icon.has-icon,
|
|
756
|
+
.block-editor-block-toolbar .components-toolbar-group .components-button,
|
|
757
|
+
.block-editor-block-toolbar .components-toolbar-group .components-button.has-icon.has-icon {
|
|
758
|
+
min-width: 36px;
|
|
759
|
+
padding-left: 6px;
|
|
760
|
+
padding-right: 6px;
|
|
761
|
+
}
|
|
762
|
+
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot .components-button svg,
|
|
763
|
+
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot .components-button.has-icon.has-icon svg,
|
|
764
|
+
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar .components-button svg,
|
|
765
|
+
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar .components-button.has-icon.has-icon svg,
|
|
766
|
+
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown .components-button svg,
|
|
767
|
+
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown .components-button.has-icon.has-icon svg,
|
|
768
|
+
.block-editor-block-toolbar .components-toolbar-group .components-button svg,
|
|
769
|
+
.block-editor-block-toolbar .components-toolbar-group .components-button.has-icon.has-icon svg {
|
|
770
|
+
min-width: 24px;
|
|
771
|
+
}
|
|
772
|
+
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot .components-button::before,
|
|
773
|
+
.block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot .components-button.has-icon.has-icon::before,
|
|
774
|
+
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar .components-button::before,
|
|
775
|
+
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar .components-button.has-icon.has-icon::before,
|
|
776
|
+
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown .components-button::before,
|
|
777
|
+
.block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown .components-button.has-icon.has-icon::before,
|
|
778
|
+
.block-editor-block-toolbar .components-toolbar-group .components-button::before,
|
|
779
|
+
.block-editor-block-toolbar .components-toolbar-group .components-button.has-icon.has-icon::before {
|
|
780
|
+
left: 2px;
|
|
781
|
+
right: 2px;
|
|
782
|
+
}
|
|
783
|
+
|
|
740
784
|
.is-vertical .block-list-appender {
|
|
741
785
|
width: 24px;
|
|
742
786
|
margin-right: auto;
|
|
@@ -753,6 +797,68 @@
|
|
|
753
797
|
transform: scale(0);
|
|
754
798
|
}
|
|
755
799
|
|
|
800
|
+
.block-editor-block-lock-modal {
|
|
801
|
+
z-index: 1000001;
|
|
802
|
+
}
|
|
803
|
+
@media (min-width: 600px) {
|
|
804
|
+
.block-editor-block-lock-modal .components-modal__frame {
|
|
805
|
+
max-width: 480px;
|
|
806
|
+
}
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
.block-editor-block-lock-modal__checklist {
|
|
810
|
+
margin: 0;
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
.block-editor-block-lock-modal__options-title {
|
|
814
|
+
padding: 12px 0;
|
|
815
|
+
}
|
|
816
|
+
.block-editor-block-lock-modal__options-title .components-checkbox-control__label {
|
|
817
|
+
font-weight: 600;
|
|
818
|
+
}
|
|
819
|
+
.block-editor-block-lock-modal__options-title .components-base-control__field {
|
|
820
|
+
align-items: center;
|
|
821
|
+
display: flex;
|
|
822
|
+
margin: 0;
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
.block-editor-block-lock-modal__checklist-item {
|
|
826
|
+
margin-bottom: 0;
|
|
827
|
+
padding: 12px 0 12px 32px;
|
|
828
|
+
}
|
|
829
|
+
.block-editor-block-lock-modal__checklist-item .components-base-control__field {
|
|
830
|
+
align-items: center;
|
|
831
|
+
display: flex;
|
|
832
|
+
margin: 0;
|
|
833
|
+
}
|
|
834
|
+
.block-editor-block-lock-modal__checklist-item .components-checkbox-control__label {
|
|
835
|
+
display: flex;
|
|
836
|
+
align-items: center;
|
|
837
|
+
justify-content: space-between;
|
|
838
|
+
flex-grow: 1;
|
|
839
|
+
}
|
|
840
|
+
.block-editor-block-lock-modal__checklist-item .components-checkbox-control__label svg {
|
|
841
|
+
margin-right: 12px;
|
|
842
|
+
fill: #1e1e1e;
|
|
843
|
+
}
|
|
844
|
+
.block-editor-block-lock-modal__checklist-item:hover {
|
|
845
|
+
background-color: #f0f0f0;
|
|
846
|
+
border-radius: 2px;
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
.block-editor-block-lock-modal__actions {
|
|
850
|
+
margin-top: 24px;
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
.block-editor-block-lock-toolbar .components-button.has-icon {
|
|
854
|
+
min-width: 36px !important;
|
|
855
|
+
padding-left: 0 !important;
|
|
856
|
+
}
|
|
857
|
+
.block-editor-block-lock-toolbar .components-button.has-icon:focus::before {
|
|
858
|
+
left: 0 !important;
|
|
859
|
+
right: 12px !important;
|
|
860
|
+
}
|
|
861
|
+
|
|
756
862
|
.block-editor-block-breadcrumb {
|
|
757
863
|
list-style: none;
|
|
758
864
|
padding: 0;
|
|
@@ -1021,6 +1127,7 @@
|
|
|
1021
1127
|
flex: 1;
|
|
1022
1128
|
flex-direction: row;
|
|
1023
1129
|
border-right: none !important;
|
|
1130
|
+
padding: 0;
|
|
1024
1131
|
}
|
|
1025
1132
|
@media (min-width: 600px) {
|
|
1026
1133
|
.block-editor-block-mover .block-editor-block-mover__move-button-container,
|
|
@@ -1278,6 +1385,10 @@
|
|
|
1278
1385
|
|
|
1279
1386
|
.block-editor-block-switcher {
|
|
1280
1387
|
position: relative;
|
|
1388
|
+
padding: 0 6px;
|
|
1389
|
+
}
|
|
1390
|
+
.block-editor-block-switcher .components-button.components-dropdown-menu__toggle.has-icon.has-icon {
|
|
1391
|
+
min-width: 36px;
|
|
1281
1392
|
}
|
|
1282
1393
|
|
|
1283
1394
|
.block-editor-block-switcher__no-switcher-icon,
|
|
@@ -1644,7 +1755,7 @@
|
|
|
1644
1755
|
}
|
|
1645
1756
|
|
|
1646
1757
|
.block-editor-block-variation-transforms {
|
|
1647
|
-
padding: 0 16px 16px
|
|
1758
|
+
padding: 0 16px 16px 52px;
|
|
1648
1759
|
width: 100%;
|
|
1649
1760
|
}
|
|
1650
1761
|
.block-editor-block-variation-transforms .components-dropdown-menu__toggle {
|
|
@@ -1743,12 +1854,14 @@
|
|
|
1743
1854
|
flex-direction: column;
|
|
1744
1855
|
align-items: center;
|
|
1745
1856
|
justify-content: center;
|
|
1746
|
-
padding: 8px;
|
|
1747
1857
|
width: 100%;
|
|
1748
1858
|
height: auto;
|
|
1749
1859
|
color: #1e1e1e;
|
|
1750
1860
|
box-shadow: inset 0 0 0 1px #1e1e1e;
|
|
1751
1861
|
}
|
|
1862
|
+
.block-editor-button-block-appender.components-button.components-button {
|
|
1863
|
+
padding: 12px;
|
|
1864
|
+
}
|
|
1752
1865
|
.is-dark-theme .block-editor-button-block-appender {
|
|
1753
1866
|
color: rgba(255, 255, 255, 0.65);
|
|
1754
1867
|
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
|
|
@@ -1768,6 +1881,10 @@
|
|
|
1768
1881
|
margin-bottom: 12px;
|
|
1769
1882
|
}
|
|
1770
1883
|
|
|
1884
|
+
.block-editor-color-gradient-control__fieldset {
|
|
1885
|
+
min-width: 0;
|
|
1886
|
+
}
|
|
1887
|
+
|
|
1771
1888
|
.block-editor-panel-color-gradient-settings .block-editor-panel-color-gradient-settings__panel-title {
|
|
1772
1889
|
display: flex;
|
|
1773
1890
|
gap: 8px;
|
|
@@ -1932,6 +2049,33 @@
|
|
|
1932
2049
|
cursor: text;
|
|
1933
2050
|
}
|
|
1934
2051
|
|
|
2052
|
+
.block-editor-date-format-picker {
|
|
2053
|
+
margin-bottom: 16px;
|
|
2054
|
+
}
|
|
2055
|
+
|
|
2056
|
+
.block-editor-date-format-picker__default-format-toggle-control__hint {
|
|
2057
|
+
color: #757575;
|
|
2058
|
+
display: block;
|
|
2059
|
+
}
|
|
2060
|
+
|
|
2061
|
+
.block-editor-date-format-picker__custom-format-select-control.components-base-control {
|
|
2062
|
+
margin-bottom: 0;
|
|
2063
|
+
}
|
|
2064
|
+
.block-editor-date-format-picker__custom-format-select-control .components-custom-select-control__button {
|
|
2065
|
+
width: 100%;
|
|
2066
|
+
}
|
|
2067
|
+
|
|
2068
|
+
.block-editor-date-format-picker__custom-format-select-control__custom-option {
|
|
2069
|
+
border-top: 1px solid #ddd;
|
|
2070
|
+
}
|
|
2071
|
+
.block-editor-date-format-picker__custom-format-select-control__custom-option.has-hint {
|
|
2072
|
+
grid-template-columns: auto 30px;
|
|
2073
|
+
}
|
|
2074
|
+
.block-editor-date-format-picker__custom-format-select-control__custom-option .components-custom-select-control__item-hint {
|
|
2075
|
+
grid-row: 2;
|
|
2076
|
+
text-align: left;
|
|
2077
|
+
}
|
|
2078
|
+
|
|
1935
2079
|
.block-editor-duotone-control__popover > .components-popover__content > div {
|
|
1936
2080
|
padding: 16px;
|
|
1937
2081
|
width: 280px;
|
|
@@ -2559,7 +2703,7 @@
|
|
|
2559
2703
|
.block-editor-list-view-leaf {
|
|
2560
2704
|
position: relative;
|
|
2561
2705
|
}
|
|
2562
|
-
.block-editor-list-view-leaf.is-selected {
|
|
2706
|
+
.block-editor-list-view-leaf.is-selected td {
|
|
2563
2707
|
background: var(--wp-admin-theme-color);
|
|
2564
2708
|
}
|
|
2565
2709
|
.block-editor-list-view-leaf.is-selected .block-editor-list-view-block-contents, .block-editor-list-view-leaf.is-selected .components-button.has-icon {
|
|
@@ -2575,20 +2719,44 @@
|
|
|
2575
2719
|
.block-editor-list-view-leaf.is-selected .block-editor-list-view-block__menu:focus {
|
|
2576
2720
|
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) #fff;
|
|
2577
2721
|
}
|
|
2722
|
+
.block-editor-list-view-leaf.is-dragging {
|
|
2723
|
+
display: none;
|
|
2724
|
+
}
|
|
2725
|
+
.block-editor-list-view-leaf.is-first-selected td:first-child {
|
|
2726
|
+
border-top-left-radius: 2px;
|
|
2727
|
+
}
|
|
2728
|
+
.block-editor-list-view-leaf.is-first-selected td:last-child {
|
|
2729
|
+
border-top-right-radius: 2px;
|
|
2730
|
+
}
|
|
2731
|
+
.block-editor-list-view-leaf.is-last-selected td:first-child {
|
|
2732
|
+
border-bottom-left-radius: 2px;
|
|
2733
|
+
}
|
|
2734
|
+
.block-editor-list-view-leaf.is-last-selected td:last-child {
|
|
2735
|
+
border-bottom-right-radius: 2px;
|
|
2736
|
+
}
|
|
2578
2737
|
.block-editor-list-view-leaf.is-branch-selected:not(.is-selected) {
|
|
2579
2738
|
background: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)), linear-gradient(var(--wp-admin-theme-color), var(--wp-admin-theme-color));
|
|
2580
2739
|
}
|
|
2581
|
-
.block-editor-list-view-leaf.is-branch-selected.is-selected
|
|
2582
|
-
border-radius: 2px
|
|
2740
|
+
.block-editor-list-view-leaf.is-branch-selected.is-first-selected td:first-child {
|
|
2741
|
+
border-top-left-radius: 2px;
|
|
2583
2742
|
}
|
|
2584
|
-
.block-editor-list-view-leaf
|
|
2585
|
-
border-radius: 2px;
|
|
2743
|
+
.block-editor-list-view-leaf.is-branch-selected.is-first-selected td:last-child {
|
|
2744
|
+
border-top-right-radius: 2px;
|
|
2586
2745
|
}
|
|
2587
|
-
.block-editor-list-view-leaf.is-branch-selected
|
|
2588
|
-
border-radius:
|
|
2746
|
+
.block-editor-list-view-leaf[aria-expanded=false].is-branch-selected.is-first-selected td:first-child {
|
|
2747
|
+
border-top-left-radius: 2px;
|
|
2589
2748
|
}
|
|
2590
|
-
.block-editor-list-view-leaf.is-
|
|
2591
|
-
|
|
2749
|
+
.block-editor-list-view-leaf[aria-expanded=false].is-branch-selected.is-first-selected td:last-child {
|
|
2750
|
+
border-top-right-radius: 2px;
|
|
2751
|
+
}
|
|
2752
|
+
.block-editor-list-view-leaf[aria-expanded=false].is-branch-selected.is-last-selected td:first-child {
|
|
2753
|
+
border-bottom-left-radius: 2px;
|
|
2754
|
+
}
|
|
2755
|
+
.block-editor-list-view-leaf[aria-expanded=false].is-branch-selected.is-last-selected td:last-child {
|
|
2756
|
+
border-bottom-right-radius: 2px;
|
|
2757
|
+
}
|
|
2758
|
+
.block-editor-list-view-leaf.is-branch-selected:not(.is-selected) td {
|
|
2759
|
+
border-radius: 0;
|
|
2592
2760
|
}
|
|
2593
2761
|
.block-editor-list-view-leaf .block-editor-list-view-block-contents {
|
|
2594
2762
|
display: flex;
|
|
@@ -2628,7 +2796,7 @@
|
|
|
2628
2796
|
left: 0;
|
|
2629
2797
|
border-radius: inherit;
|
|
2630
2798
|
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
2631
|
-
z-index:
|
|
2799
|
+
z-index: 2;
|
|
2632
2800
|
pointer-events: none;
|
|
2633
2801
|
}
|
|
2634
2802
|
.is-dragging-components-draggable .block-editor-list-view-leaf .block-editor-list-view-block-contents:focus::after {
|
|
@@ -2670,7 +2838,6 @@
|
|
|
2670
2838
|
.block-editor-list-view-leaf .block-editor-list-view-block__mover-cell {
|
|
2671
2839
|
line-height: 0;
|
|
2672
2840
|
width: 36px;
|
|
2673
|
-
opacity: 0;
|
|
2674
2841
|
vertical-align: middle;
|
|
2675
2842
|
}
|
|
2676
2843
|
@media (prefers-reduced-motion: reduce) {
|
|
@@ -2680,19 +2847,27 @@
|
|
|
2680
2847
|
transition-delay: 0s;
|
|
2681
2848
|
}
|
|
2682
2849
|
}
|
|
2850
|
+
.block-editor-list-view-leaf .block-editor-list-view-block__menu-cell > *,
|
|
2851
|
+
.block-editor-list-view-leaf .block-editor-list-view-block__mover-cell > * {
|
|
2852
|
+
opacity: 0;
|
|
2853
|
+
}
|
|
2683
2854
|
.block-editor-list-view-leaf .block-editor-list-view-block__menu-cell:hover, .block-editor-list-view-leaf .block-editor-list-view-block__menu-cell.is-visible,
|
|
2684
2855
|
.block-editor-list-view-leaf .block-editor-list-view-block__mover-cell:hover,
|
|
2685
2856
|
.block-editor-list-view-leaf .block-editor-list-view-block__mover-cell.is-visible {
|
|
2686
2857
|
position: relative;
|
|
2687
2858
|
z-index: 1;
|
|
2859
|
+
}
|
|
2860
|
+
.block-editor-list-view-leaf .block-editor-list-view-block__menu-cell:hover > *, .block-editor-list-view-leaf .block-editor-list-view-block__menu-cell.is-visible > *,
|
|
2861
|
+
.block-editor-list-view-leaf .block-editor-list-view-block__mover-cell:hover > *,
|
|
2862
|
+
.block-editor-list-view-leaf .block-editor-list-view-block__mover-cell.is-visible > * {
|
|
2688
2863
|
opacity: 1;
|
|
2689
2864
|
animation: edit-post__fade-in-animation 0.2s ease-out 0s;
|
|
2690
2865
|
animation-fill-mode: forwards;
|
|
2691
2866
|
}
|
|
2692
2867
|
@media (prefers-reduced-motion: reduce) {
|
|
2693
|
-
.block-editor-list-view-leaf .block-editor-list-view-block__menu-cell:hover
|
|
2694
|
-
.block-editor-list-view-leaf .block-editor-list-view-block__mover-cell:hover
|
|
2695
|
-
.block-editor-list-view-leaf .block-editor-list-view-block__mover-cell.is-visible {
|
|
2868
|
+
.block-editor-list-view-leaf .block-editor-list-view-block__menu-cell:hover > *, .block-editor-list-view-leaf .block-editor-list-view-block__menu-cell.is-visible > *,
|
|
2869
|
+
.block-editor-list-view-leaf .block-editor-list-view-block__mover-cell:hover > *,
|
|
2870
|
+
.block-editor-list-view-leaf .block-editor-list-view-block__mover-cell.is-visible > * {
|
|
2696
2871
|
animation-duration: 1ms;
|
|
2697
2872
|
animation-delay: 0s;
|
|
2698
2873
|
}
|
|
@@ -2793,6 +2968,14 @@
|
|
|
2793
2968
|
.block-editor-list-view-leaf.is-selected .block-editor-list-view-block-select-button__anchor {
|
|
2794
2969
|
background: rgba(0, 0, 0, 0.3);
|
|
2795
2970
|
}
|
|
2971
|
+
.block-editor-list-view-leaf .block-editor-list-view-block-select-button__lock {
|
|
2972
|
+
line-height: 0;
|
|
2973
|
+
width: 24px;
|
|
2974
|
+
min-width: 24px;
|
|
2975
|
+
margin-left: auto;
|
|
2976
|
+
padding: 0;
|
|
2977
|
+
vertical-align: middle;
|
|
2978
|
+
}
|
|
2796
2979
|
|
|
2797
2980
|
.block-editor-list-view-block-select-button__description,
|
|
2798
2981
|
.block-editor-list-view-appender__description {
|
|
@@ -3345,12 +3528,13 @@ figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before
|
|
|
3345
3528
|
@media (min-width: 600px) {
|
|
3346
3529
|
.block-editor-url-input__suggestions,
|
|
3347
3530
|
.block-editor-url-input .components-spinner {
|
|
3348
|
-
display:
|
|
3531
|
+
display: grid;
|
|
3349
3532
|
}
|
|
3350
3533
|
}
|
|
3351
3534
|
|
|
3352
3535
|
.block-editor-url-input__suggestion {
|
|
3353
|
-
|
|
3536
|
+
min-height: 36px;
|
|
3537
|
+
height: auto;
|
|
3354
3538
|
color: #757575;
|
|
3355
3539
|
display: block;
|
|
3356
3540
|
font-size: 13px;
|
|
@@ -3732,6 +3916,12 @@ figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before
|
|
|
3732
3916
|
.block-editor-block-toolbar__block-controls .block-editor-block-mover {
|
|
3733
3917
|
margin-left: -6px;
|
|
3734
3918
|
}
|
|
3919
|
+
.block-editor-block-toolbar__block-controls .block-editor-block-lock-toolbar {
|
|
3920
|
+
margin-left: -6px !important;
|
|
3921
|
+
}
|
|
3922
|
+
.block-editor-block-toolbar__block-controls .components-toolbar-group {
|
|
3923
|
+
padding: 0;
|
|
3924
|
+
}
|
|
3735
3925
|
|
|
3736
3926
|
.block-editor-block-toolbar .components-toolbar-group,
|
|
3737
3927
|
.block-editor-block-toolbar .components-toolbar,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../src/utils/dom.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../src/utils/dom.js"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH,iCALW,OAAO,KACP,OAAO,GAEN,OAAO,CAIlB;AAED;;;;;;;;;GASG;AACH,gDANW,OAAO,WACP,OAAO,GAEN,OAAO,CAQlB;AAED;;;;;;;GAOG;AACH,uCALW,IAAI,UAEH,MAAM,GAAC,SAAS,CAoB3B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/block-editor",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.5.0",
|
|
4
4
|
"description": "Generic block editor.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -33,31 +33,32 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@babel/runtime": "^7.16.0",
|
|
35
35
|
"@react-spring/web": "^9.2.4",
|
|
36
|
-
"@wordpress/a11y": "^3.
|
|
37
|
-
"@wordpress/api-fetch": "^6.
|
|
38
|
-
"@wordpress/blob": "^3.
|
|
39
|
-
"@wordpress/blocks": "^11.
|
|
40
|
-
"@wordpress/components": "^19.
|
|
41
|
-
"@wordpress/compose": "^5.
|
|
42
|
-
"@wordpress/data": "^6.
|
|
43
|
-
"@wordpress/
|
|
44
|
-
"@wordpress/
|
|
45
|
-
"@wordpress/
|
|
46
|
-
"@wordpress/
|
|
47
|
-
"@wordpress/
|
|
48
|
-
"@wordpress/
|
|
49
|
-
"@wordpress/
|
|
50
|
-
"@wordpress/
|
|
51
|
-
"@wordpress/
|
|
52
|
-
"@wordpress/
|
|
53
|
-
"@wordpress/
|
|
54
|
-
"@wordpress/
|
|
55
|
-
"@wordpress/
|
|
56
|
-
"@wordpress/
|
|
57
|
-
"@wordpress/
|
|
58
|
-
"@wordpress/
|
|
59
|
-
"@wordpress/
|
|
60
|
-
"@wordpress/
|
|
36
|
+
"@wordpress/a11y": "^3.6.0",
|
|
37
|
+
"@wordpress/api-fetch": "^6.3.0",
|
|
38
|
+
"@wordpress/blob": "^3.6.0",
|
|
39
|
+
"@wordpress/blocks": "^11.5.0",
|
|
40
|
+
"@wordpress/components": "^19.8.0",
|
|
41
|
+
"@wordpress/compose": "^5.4.0",
|
|
42
|
+
"@wordpress/data": "^6.6.0",
|
|
43
|
+
"@wordpress/date": "^4.6.0",
|
|
44
|
+
"@wordpress/deprecated": "^3.6.0",
|
|
45
|
+
"@wordpress/dom": "^3.6.0",
|
|
46
|
+
"@wordpress/element": "^4.4.0",
|
|
47
|
+
"@wordpress/hooks": "^3.6.0",
|
|
48
|
+
"@wordpress/html-entities": "^3.6.0",
|
|
49
|
+
"@wordpress/i18n": "^4.6.0",
|
|
50
|
+
"@wordpress/icons": "^8.2.0",
|
|
51
|
+
"@wordpress/is-shallow-equal": "^4.6.0",
|
|
52
|
+
"@wordpress/keyboard-shortcuts": "^3.4.0",
|
|
53
|
+
"@wordpress/keycodes": "^3.6.0",
|
|
54
|
+
"@wordpress/notices": "^3.6.0",
|
|
55
|
+
"@wordpress/rich-text": "^5.4.0",
|
|
56
|
+
"@wordpress/shortcode": "^3.6.0",
|
|
57
|
+
"@wordpress/style-engine": "^0.5.0",
|
|
58
|
+
"@wordpress/token-list": "^2.6.0",
|
|
59
|
+
"@wordpress/url": "^3.7.0",
|
|
60
|
+
"@wordpress/warning": "^2.6.0",
|
|
61
|
+
"@wordpress/wordcount": "^3.6.0",
|
|
61
62
|
"classnames": "^2.3.1",
|
|
62
63
|
"colord": "^2.7.0",
|
|
63
64
|
"diff": "^4.0.2",
|
|
@@ -76,5 +77,5 @@
|
|
|
76
77
|
"publishConfig": {
|
|
77
78
|
"access": "public"
|
|
78
79
|
},
|
|
79
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "11eb1241e63c9240018323551c6753f8a5fa96f9"
|
|
80
81
|
}
|
|
@@ -3,10 +3,15 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import AlignmentUI from './ui';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
const AlignmentControl = ( props ) => {
|
|
7
7
|
return <AlignmentUI { ...props } isToolbar={ false } />;
|
|
8
|
-
}
|
|
8
|
+
};
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
const AlignmentToolbar = ( props ) => {
|
|
11
11
|
return <AlignmentUI { ...props } isToolbar />;
|
|
12
|
-
}
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/alignment-control/README.md
|
|
16
|
+
*/
|
|
17
|
+
export { AlignmentControl, AlignmentToolbar };
|
|
@@ -3,10 +3,15 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import BlockAlignmentUI from './ui';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
const BlockAlignmentControl = ( props ) => {
|
|
7
7
|
return <BlockAlignmentUI { ...props } isToolbar={ false } />;
|
|
8
|
-
}
|
|
8
|
+
};
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
const BlockAlignmentToolbar = ( props ) => {
|
|
11
11
|
return <BlockAlignmentUI { ...props } isToolbar />;
|
|
12
|
-
}
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-alignment-control/README.md
|
|
16
|
+
*/
|
|
17
|
+
export { BlockAlignmentControl, BlockAlignmentToolbar };
|
|
@@ -23,19 +23,16 @@ const BlockDraggable = ( {
|
|
|
23
23
|
const { srcRootClientId, isDraggable, icon } = useSelect(
|
|
24
24
|
( select ) => {
|
|
25
25
|
const {
|
|
26
|
+
canMoveBlocks,
|
|
26
27
|
getBlockRootClientId,
|
|
27
|
-
getTemplateLock,
|
|
28
28
|
getBlockName,
|
|
29
29
|
} = select( blockEditorStore );
|
|
30
30
|
const rootClientId = getBlockRootClientId( clientIds[ 0 ] );
|
|
31
|
-
const templateLock = rootClientId
|
|
32
|
-
? getTemplateLock( rootClientId )
|
|
33
|
-
: null;
|
|
34
31
|
const blockName = getBlockName( clientIds[ 0 ] );
|
|
35
32
|
|
|
36
33
|
return {
|
|
37
34
|
srcRootClientId: rootClientId,
|
|
38
|
-
isDraggable:
|
|
35
|
+
isDraggable: canMoveBlocks( clientIds, rootClientId ),
|
|
39
36
|
icon: getBlockType( blockName )?.icon,
|
|
40
37
|
};
|
|
41
38
|
},
|
|
@@ -70,6 +70,7 @@ const BlockInspector = ( { showNoBlockSelectedMessage = true } ) => {
|
|
|
70
70
|
<InspectorControls.Slot
|
|
71
71
|
__experimentalGroup="color"
|
|
72
72
|
label={ __( 'Color' ) }
|
|
73
|
+
className="color-block-support-panel__inner-wrapper"
|
|
73
74
|
/>
|
|
74
75
|
<InspectorControls.Slot
|
|
75
76
|
__experimentalGroup="typography"
|
|
@@ -187,4 +188,7 @@ const AdvancedControls = () => {
|
|
|
187
188
|
);
|
|
188
189
|
};
|
|
189
190
|
|
|
191
|
+
/**
|
|
192
|
+
* @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-inspector/README.md
|
|
193
|
+
*/
|
|
190
194
|
export default BlockInspector;
|
|
@@ -12,8 +12,8 @@ import {
|
|
|
12
12
|
getBlockAttributes,
|
|
13
13
|
getBlockContent,
|
|
14
14
|
getBlockType,
|
|
15
|
-
isValidBlockContent,
|
|
16
15
|
getSaveContent,
|
|
16
|
+
validateBlock,
|
|
17
17
|
} from '@wordpress/blocks';
|
|
18
18
|
|
|
19
19
|
/**
|
|
@@ -43,9 +43,13 @@ function BlockHTML( { clientId } ) {
|
|
|
43
43
|
|
|
44
44
|
// If html is empty we reset the block to the default HTML and mark it as valid to avoid triggering an error
|
|
45
45
|
const content = html ? html : getSaveContent( blockType, attributes );
|
|
46
|
-
const isValid = html
|
|
47
|
-
?
|
|
48
|
-
|
|
46
|
+
const [ isValid ] = html
|
|
47
|
+
? validateBlock( {
|
|
48
|
+
...block,
|
|
49
|
+
attributes,
|
|
50
|
+
originalContent: content,
|
|
51
|
+
} )
|
|
52
|
+
: [ true ];
|
|
49
53
|
|
|
50
54
|
updateBlock( clientId, {
|
|
51
55
|
attributes,
|
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
getBlockType,
|
|
18
18
|
getSaveContent,
|
|
19
19
|
isUnmodifiedDefaultBlock,
|
|
20
|
+
serializeRawBlock,
|
|
20
21
|
} from '@wordpress/blocks';
|
|
21
22
|
import { withFilters } from '@wordpress/components';
|
|
22
23
|
import {
|
|
@@ -74,6 +75,7 @@ function Block( { children, isHtml, ...props } ) {
|
|
|
74
75
|
}
|
|
75
76
|
|
|
76
77
|
function BlockListBlock( {
|
|
78
|
+
block: { __unstableBlockSource },
|
|
77
79
|
mode,
|
|
78
80
|
isLocked,
|
|
79
81
|
canRemove,
|
|
@@ -155,7 +157,9 @@ function BlockListBlock( {
|
|
|
155
157
|
let block;
|
|
156
158
|
|
|
157
159
|
if ( ! isValid ) {
|
|
158
|
-
const saveContent =
|
|
160
|
+
const saveContent = __unstableBlockSource
|
|
161
|
+
? serializeRawBlock( __unstableBlockSource )
|
|
162
|
+
: getSaveContent( blockType, attributes );
|
|
159
163
|
|
|
160
164
|
block = (
|
|
161
165
|
<Block className="has-warning">
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
// When selecting multiple blocks, we provide an additional selection indicator.
|
|
27
27
|
&.is-navigate-mode .block-editor-block-list__block.is-selected,
|
|
28
28
|
&.is-navigate-mode .block-editor-block-list__block.is-hovered,
|
|
29
|
+
.block-editor-block-list__block.is-multi-selected:not([contenteditable]),
|
|
29
30
|
.block-editor-block-list__block.is-highlighted,
|
|
30
|
-
.block-editor-block-list__block.is-multi-selected {
|
|
31
|
-
|
|
31
|
+
.block-editor-block-list__block.is-highlighted ~ .is-multi-selected {
|
|
32
32
|
&::after {
|
|
33
33
|
// Show selection borders around every non-nested block's actual footprint.
|
|
34
34
|
position: absolute;
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
right: $border-width;
|
|
42
42
|
|
|
43
43
|
// Everything else.
|
|
44
|
-
box-shadow: 0 0 0
|
|
44
|
+
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
45
45
|
border-radius: $radius-block-ui - $border-width; // Border is outset, so subtract the width to achieve correct radius.
|
|
46
46
|
|
|
47
47
|
// Windows High Contrast mode will show this outline.
|
|
@@ -66,11 +66,10 @@
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
.block-editor-block-list__block.is-highlighted::after {
|
|
69
|
-
box-shadow: 0 0 0
|
|
69
|
+
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
70
70
|
outline: $border-width solid transparent;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
.block-editor-block-list__block.is-multi-selected::after,
|
|
74
73
|
&.is-navigate-mode .block-editor-block-list__block.is-selected::after,
|
|
75
74
|
& .is-block-moving-mode.block-editor-block-list__block.has-child-selected {
|
|
76
75
|
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|