@wordpress/block-editor 11.0.0 → 11.2.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 +16 -1
- package/LICENSE.md +1 -1
- package/README.md +2 -1
- package/build/components/alignment-control/ui.js +1 -7
- package/build/components/alignment-control/ui.js.map +1 -1
- package/build/components/block-actions/index.js +9 -0
- package/build/components/block-actions/index.js.map +1 -1
- package/build/components/block-alignment-control/use-available-alignments.js +4 -3
- package/build/components/block-alignment-control/use-available-alignments.js.map +1 -1
- package/build/components/block-icon/index.js +4 -2
- package/build/components/block-icon/index.js.map +1 -1
- package/build/components/block-inspector/index.js +58 -5
- package/build/components/block-inspector/index.js.map +1 -1
- package/build/components/block-list-appender/index.js +46 -34
- package/build/components/block-list-appender/index.js.map +1 -1
- package/build/components/block-list-appender/index.native.js +39 -34
- package/build/components/block-list-appender/index.native.js.map +1 -1
- package/build/components/block-mobile-toolbar/block-actions-menu.native.js +18 -18
- package/build/components/block-mobile-toolbar/block-actions-menu.native.js.map +1 -1
- package/build/components/block-mobile-toolbar/index.native.js +1 -1
- package/build/components/block-mobile-toolbar/index.native.js.map +1 -1
- package/build/components/block-pattern-setup/index.js +14 -7
- package/build/components/block-pattern-setup/index.js.map +1 -1
- package/build/components/block-preview/auto.js +1 -4
- package/build/components/block-preview/auto.js.map +1 -1
- package/build/components/block-settings-menu/block-settings-dropdown.js +4 -1
- package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build/components/block-styles/index.js +3 -1
- package/build/components/block-styles/index.js.map +1 -1
- package/build/components/block-styles/index.native.js +1 -3
- package/build/components/block-styles/index.native.js.map +1 -1
- package/build/components/block-styles/utils.js +7 -10
- package/build/components/block-styles/utils.js.map +1 -1
- package/build/components/block-toolbar/index.native.js +6 -8
- package/build/components/block-toolbar/index.native.js.map +1 -1
- package/build/components/block-tools/selected-block-popover.js +1 -3
- package/build/components/block-tools/selected-block-popover.js.map +1 -1
- package/build/components/block-tools/use-block-toolbar-popover-props.js +43 -10
- package/build/components/block-tools/use-block-toolbar-popover-props.js.map +1 -1
- package/build/components/block-variation-picker/index.js +1 -1
- package/build/components/block-variation-picker/index.js.map +1 -1
- package/build/components/colors/utils.js +2 -6
- package/build/components/colors/utils.js.map +1 -1
- package/build/components/colors-gradients/control.js +0 -3
- package/build/components/colors-gradients/control.js.map +1 -1
- package/build/components/colors-gradients/dropdown.js +0 -2
- package/build/components/colors-gradients/dropdown.js.map +1 -1
- package/build/components/colors-gradients/panel-color-gradient-settings.js +2 -19
- package/build/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
- package/build/components/colors-gradients/use-multiple-origin-colors-and-gradients.js +4 -3
- package/build/components/colors-gradients/use-multiple-origin-colors-and-gradients.js.map +1 -1
- package/build/components/copy-handler/index.js +37 -9
- package/build/components/copy-handler/index.js.map +1 -1
- package/build/components/default-style-picker/index.js +1 -0
- package/build/components/default-style-picker/index.js.map +1 -1
- package/build/components/font-sizes/fluid-utils.js +5 -2
- package/build/components/font-sizes/fluid-utils.js.map +1 -1
- package/build/components/font-sizes/utils.js +10 -4
- package/build/components/font-sizes/utils.js.map +1 -1
- package/build/components/font-sizes/with-font-sizes.js +14 -12
- package/build/components/font-sizes/with-font-sizes.js.map +1 -1
- package/build/components/gradients/use-gradient.js +2 -8
- package/build/components/gradients/use-gradient.js.map +1 -1
- package/build/components/iframe/index.js +48 -101
- package/build/components/iframe/index.js.map +1 -1
- package/build/components/iframe/use-compatibility-styles.js +98 -0
- package/build/components/iframe/use-compatibility-styles.js.map +1 -0
- package/build/components/image-size-control/index.js +1 -0
- package/build/components/image-size-control/index.js.map +1 -1
- package/build/components/inner-blocks/index.js +6 -2
- package/build/components/inner-blocks/index.js.map +1 -1
- package/build/components/inserter/block-patterns-tab.js +4 -4
- package/build/components/inserter/block-patterns-tab.js.map +1 -1
- package/build/components/inserter/hooks/use-insertion-point.js +4 -3
- package/build/components/inserter/hooks/use-insertion-point.js.map +1 -1
- package/build/components/inserter/index.js +16 -6
- package/build/components/inserter/index.js.map +1 -1
- package/build/components/inserter/media-tab/hooks.js +8 -5
- package/build/components/inserter/media-tab/hooks.js.map +1 -1
- package/build/components/inserter/menu.js +11 -5
- package/build/components/inserter/menu.js.map +1 -1
- package/build/components/inserter/quick-inserter.js +6 -3
- package/build/components/inserter/quick-inserter.js.map +1 -1
- package/build/components/inserter/search-items.js +15 -14
- package/build/components/inserter/search-items.js.map +1 -1
- package/build/components/inserter/search-results.js +4 -2
- package/build/components/inserter/search-results.js.map +1 -1
- package/build/components/inspector-controls/groups.js +3 -1
- package/build/components/inspector-controls/groups.js.map +1 -1
- package/build/components/inspector-controls-tabs/position-controls-panel.js +46 -0
- package/build/components/inspector-controls-tabs/position-controls-panel.js.map +1 -0
- package/build/components/inspector-controls-tabs/settings-tab.js +3 -1
- package/build/components/inspector-controls-tabs/settings-tab.js.map +1 -1
- package/build/components/inspector-controls-tabs/use-inspector-controls-tabs.js +4 -11
- package/build/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +1 -1
- package/build/components/link-control/search-input.js +1 -0
- package/build/components/link-control/search-input.js.map +1 -1
- package/build/components/list-view/block-select-button.js +1 -1
- package/build/components/list-view/block-select-button.js.map +1 -1
- package/build/components/off-canvas-editor/appender.js +3 -44
- package/build/components/off-canvas-editor/appender.js.map +1 -1
- package/build/components/off-canvas-editor/block-contents.js +38 -5
- package/build/components/off-canvas-editor/block-contents.js.map +1 -1
- package/build/components/off-canvas-editor/block-select-button.js +3 -2
- package/build/components/off-canvas-editor/block-select-button.js.map +1 -1
- package/build/components/off-canvas-editor/block.js +51 -57
- package/build/components/off-canvas-editor/block.js.map +1 -1
- package/build/components/off-canvas-editor/index.js +12 -5
- package/build/components/off-canvas-editor/index.js.map +1 -1
- package/build/components/off-canvas-editor/use-inserted-block.js +58 -0
- package/build/components/off-canvas-editor/use-inserted-block.js.map +1 -0
- package/build/components/provider/index.js +3 -1
- package/build/components/provider/index.js.map +1 -1
- package/build/components/responsive-block-control/label.js.map +1 -1
- package/build/components/rich-text/format-edit.js +12 -10
- package/build/components/rich-text/format-edit.js.map +1 -1
- package/build/components/rich-text/index.js.map +1 -1
- package/build/components/rich-text/use-enter.js +4 -5
- package/build/components/rich-text/use-enter.js.map +1 -1
- package/build/components/rich-text/use-paste-handler.js +21 -12
- package/build/components/rich-text/use-paste-handler.js.map +1 -1
- package/build/components/spacing-sizes-control/index.js +0 -1
- package/build/components/spacing-sizes-control/index.js.map +1 -1
- package/build/components/spacing-sizes-control/utils.js +1 -1
- package/build/components/spacing-sizes-control/utils.js.map +1 -1
- package/build/components/typewriter/index.js +1 -1
- package/build/components/typewriter/index.js.map +1 -1
- package/build/components/url-input/button.js +1 -0
- package/build/components/url-input/button.js.map +1 -1
- package/build/components/url-input/index.js +15 -1
- package/build/components/url-input/index.js.map +1 -1
- package/build/components/url-popover/image-url-input-ui.js +2 -2
- package/build/components/url-popover/image-url-input-ui.js.map +1 -1
- package/build/components/url-popover/link-editor.js +1 -0
- package/build/components/url-popover/link-editor.js.map +1 -1
- package/build/components/use-paste-styles/index.js +188 -0
- package/build/components/use-paste-styles/index.js.map +1 -0
- package/build/components/writing-flow/index.js +1 -1
- package/build/components/writing-flow/index.js.map +1 -1
- package/build/components/writing-flow/use-arrow-nav.js +22 -29
- package/build/components/writing-flow/use-arrow-nav.js.map +1 -1
- package/build/hooks/border.js +0 -1
- package/build/hooks/border.js.map +1 -1
- package/build/hooks/color-panel.js +0 -1
- package/build/hooks/color-panel.js.map +1 -1
- package/build/hooks/color.js +1 -2
- package/build/hooks/color.js.map +1 -1
- package/build/hooks/font-family.js +4 -4
- package/build/hooks/font-family.js.map +1 -1
- package/build/hooks/font-size.js +5 -3
- package/build/hooks/font-size.js.map +1 -1
- package/build/hooks/index.js +2 -0
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/metadata.js +1 -1
- package/build/hooks/metadata.js.map +1 -1
- package/build/hooks/position.js +376 -0
- package/build/hooks/position.js.map +1 -0
- package/build/hooks/supports.js +328 -0
- package/build/hooks/supports.js.map +1 -0
- package/build/hooks/use-typography-props.js +11 -8
- package/build/hooks/use-typography-props.js.map +1 -1
- package/build/store/reducer.js +27 -9
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +9 -7
- package/build/store/selectors.js.map +1 -1
- package/build/utils/pasting.js +6 -11
- package/build/utils/pasting.js.map +1 -1
- package/build-module/components/alignment-control/ui.js +1 -6
- package/build-module/components/alignment-control/ui.js.map +1 -1
- package/build-module/components/block-actions/index.js +6 -0
- package/build-module/components/block-actions/index.js.map +1 -1
- package/build-module/components/block-alignment-control/use-available-alignments.js +4 -3
- package/build-module/components/block-alignment-control/use-available-alignments.js.map +1 -1
- package/build-module/components/block-icon/index.js +4 -2
- package/build-module/components/block-icon/index.js.map +1 -1
- package/build-module/components/block-inspector/index.js +58 -6
- package/build-module/components/block-inspector/index.js.map +1 -1
- package/build-module/components/block-list-appender/index.js +46 -34
- package/build-module/components/block-list-appender/index.js.map +1 -1
- package/build-module/components/block-list-appender/index.native.js +39 -32
- package/build-module/components/block-list-appender/index.native.js.map +1 -1
- package/build-module/components/block-mobile-toolbar/block-actions-menu.native.js +18 -18
- package/build-module/components/block-mobile-toolbar/block-actions-menu.native.js.map +1 -1
- package/build-module/components/block-mobile-toolbar/index.native.js +1 -1
- package/build-module/components/block-mobile-toolbar/index.native.js.map +1 -1
- package/build-module/components/block-pattern-setup/index.js +14 -7
- package/build-module/components/block-pattern-setup/index.js.map +1 -1
- package/build-module/components/block-preview/auto.js +1 -4
- package/build-module/components/block-preview/auto.js.map +1 -1
- package/build-module/components/block-settings-menu/block-settings-dropdown.js +4 -1
- package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build-module/components/block-styles/index.js +2 -1
- package/build-module/components/block-styles/index.js.map +1 -1
- package/build-module/components/block-styles/index.native.js +1 -2
- package/build-module/components/block-styles/index.native.js.map +1 -1
- package/build-module/components/block-styles/utils.js +7 -9
- package/build-module/components/block-styles/utils.js.map +1 -1
- package/build-module/components/block-toolbar/index.native.js +6 -8
- package/build-module/components/block-toolbar/index.native.js.map +1 -1
- package/build-module/components/block-tools/selected-block-popover.js +1 -2
- package/build-module/components/block-tools/selected-block-popover.js.map +1 -1
- package/build-module/components/block-tools/use-block-toolbar-popover-props.js +42 -11
- package/build-module/components/block-tools/use-block-toolbar-popover-props.js.map +1 -1
- package/build-module/components/block-variation-picker/index.js +1 -1
- package/build-module/components/block-variation-picker/index.js.map +1 -1
- package/build-module/components/colors/utils.js +3 -7
- package/build-module/components/colors/utils.js.map +1 -1
- package/build-module/components/colors-gradients/control.js +0 -3
- package/build-module/components/colors-gradients/control.js.map +1 -1
- package/build-module/components/colors-gradients/dropdown.js +0 -2
- package/build-module/components/colors-gradients/dropdown.js.map +1 -1
- package/build-module/components/colors-gradients/panel-color-gradient-settings.js +4 -19
- package/build-module/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
- package/build-module/components/colors-gradients/use-multiple-origin-colors-and-gradients.js +4 -2
- package/build-module/components/colors-gradients/use-multiple-origin-colors-and-gradients.js.map +1 -1
- package/build-module/components/copy-handler/index.js +38 -10
- package/build-module/components/copy-handler/index.js.map +1 -1
- package/build-module/components/default-style-picker/index.js +1 -0
- package/build-module/components/default-style-picker/index.js.map +1 -1
- package/build-module/components/font-sizes/fluid-utils.js +5 -2
- package/build-module/components/font-sizes/fluid-utils.js.map +1 -1
- package/build-module/components/font-sizes/utils.js +11 -5
- package/build-module/components/font-sizes/utils.js.map +1 -1
- package/build-module/components/font-sizes/with-font-sizes.js +14 -11
- package/build-module/components/font-sizes/with-font-sizes.js.map +1 -1
- package/build-module/components/gradients/use-gradient.js +2 -7
- package/build-module/components/gradients/use-gradient.js.map +1 -1
- package/build-module/components/iframe/index.js +46 -102
- package/build-module/components/iframe/index.js.map +1 -1
- package/build-module/components/iframe/use-compatibility-styles.js +90 -0
- package/build-module/components/iframe/use-compatibility-styles.js.map +1 -0
- package/build-module/components/image-size-control/index.js +1 -0
- package/build-module/components/image-size-control/index.js.map +1 -1
- package/build-module/components/inner-blocks/index.js +6 -2
- package/build-module/components/inner-blocks/index.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab.js +4 -4
- package/build-module/components/inserter/block-patterns-tab.js.map +1 -1
- package/build-module/components/inserter/hooks/use-insertion-point.js +4 -3
- package/build-module/components/inserter/hooks/use-insertion-point.js.map +1 -1
- package/build-module/components/inserter/index.js +16 -6
- package/build-module/components/inserter/index.js.map +1 -1
- package/build-module/components/inserter/media-tab/hooks.js +8 -5
- package/build-module/components/inserter/media-tab/hooks.js.map +1 -1
- package/build-module/components/inserter/menu.js +11 -5
- package/build-module/components/inserter/menu.js.map +1 -1
- package/build-module/components/inserter/quick-inserter.js +6 -3
- package/build-module/components/inserter/quick-inserter.js.map +1 -1
- package/build-module/components/inserter/search-items.js +15 -13
- package/build-module/components/inserter/search-items.js.map +1 -1
- package/build-module/components/inserter/search-results.js +4 -2
- package/build-module/components/inserter/search-results.js.map +1 -1
- package/build-module/components/inspector-controls/groups.js +3 -1
- package/build-module/components/inspector-controls/groups.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/position-controls-panel.js +33 -0
- package/build-module/components/inspector-controls-tabs/position-controls-panel.js.map +1 -0
- package/build-module/components/inspector-controls-tabs/settings-tab.js +2 -1
- package/build-module/components/inspector-controls-tabs/settings-tab.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/use-inspector-controls-tabs.js +4 -11
- package/build-module/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +1 -1
- package/build-module/components/link-control/search-input.js +1 -0
- package/build-module/components/link-control/search-input.js.map +1 -1
- package/build-module/components/list-view/block-select-button.js +1 -1
- package/build-module/components/list-view/block-select-button.js.map +1 -1
- package/build-module/components/off-canvas-editor/appender.js +5 -44
- package/build-module/components/off-canvas-editor/appender.js.map +1 -1
- package/build-module/components/off-canvas-editor/block-contents.js +37 -7
- package/build-module/components/off-canvas-editor/block-contents.js.map +1 -1
- package/build-module/components/off-canvas-editor/block-select-button.js +3 -2
- package/build-module/components/off-canvas-editor/block-select-button.js.map +1 -1
- package/build-module/components/off-canvas-editor/block.js +54 -60
- package/build-module/components/off-canvas-editor/block.js.map +1 -1
- package/build-module/components/off-canvas-editor/index.js +12 -5
- package/build-module/components/off-canvas-editor/index.js.map +1 -1
- package/build-module/components/off-canvas-editor/use-inserted-block.js +47 -0
- package/build-module/components/off-canvas-editor/use-inserted-block.js.map +1 -0
- package/build-module/components/provider/index.js +3 -1
- package/build-module/components/provider/index.js.map +1 -1
- package/build-module/components/responsive-block-control/label.js +1 -2
- package/build-module/components/responsive-block-control/label.js.map +1 -1
- package/build-module/components/rich-text/format-edit.js +12 -9
- package/build-module/components/rich-text/format-edit.js.map +1 -1
- package/build-module/components/rich-text/index.js.map +1 -1
- package/build-module/components/rich-text/use-enter.js +4 -5
- package/build-module/components/rich-text/use-enter.js.map +1 -1
- package/build-module/components/rich-text/use-paste-handler.js +22 -12
- package/build-module/components/rich-text/use-paste-handler.js.map +1 -1
- package/build-module/components/spacing-sizes-control/index.js +0 -1
- package/build-module/components/spacing-sizes-control/index.js.map +1 -1
- package/build-module/components/spacing-sizes-control/utils.js +1 -1
- package/build-module/components/spacing-sizes-control/utils.js.map +1 -1
- package/build-module/components/typewriter/index.js +1 -1
- package/build-module/components/typewriter/index.js.map +1 -1
- package/build-module/components/url-input/button.js +1 -0
- package/build-module/components/url-input/button.js.map +1 -1
- package/build-module/components/url-input/index.js +14 -1
- package/build-module/components/url-input/index.js.map +1 -1
- package/build-module/components/url-popover/image-url-input-ui.js +3 -3
- package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
- package/build-module/components/url-popover/link-editor.js +1 -0
- package/build-module/components/url-popover/link-editor.js.map +1 -1
- package/build-module/components/use-paste-styles/index.js +174 -0
- package/build-module/components/use-paste-styles/index.js.map +1 -0
- package/build-module/components/writing-flow/index.js +1 -1
- package/build-module/components/writing-flow/index.js.map +1 -1
- package/build-module/components/writing-flow/use-arrow-nav.js +22 -29
- package/build-module/components/writing-flow/use-arrow-nav.js.map +1 -1
- package/build-module/hooks/border.js +0 -1
- package/build-module/hooks/border.js.map +1 -1
- package/build-module/hooks/color-panel.js +0 -1
- package/build-module/hooks/color-panel.js.map +1 -1
- package/build-module/hooks/color.js +1 -2
- package/build-module/hooks/color.js.map +1 -1
- package/build-module/hooks/font-family.js +5 -5
- package/build-module/hooks/font-family.js.map +1 -1
- package/build-module/hooks/font-size.js +5 -3
- package/build-module/hooks/font-size.js.map +1 -1
- package/build-module/hooks/index.js +1 -0
- package/build-module/hooks/index.js.map +1 -1
- package/build-module/hooks/metadata.js +1 -1
- package/build-module/hooks/metadata.js.map +1 -1
- package/build-module/hooks/position.js +337 -0
- package/build-module/hooks/position.js.map +1 -0
- package/build-module/hooks/supports.js +257 -0
- package/build-module/hooks/supports.js.map +1 -0
- package/build-module/hooks/use-typography-props.js +11 -8
- package/build-module/hooks/use-typography-props.js.map +1 -1
- package/build-module/store/reducer.js +27 -8
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +9 -7
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/utils/pasting.js +6 -10
- package/build-module/utils/pasting.js.map +1 -1
- package/build-style/content-rtl.css +60 -3
- package/build-style/content.css +60 -3
- package/build-style/default-editor-styles-rtl.css +3 -3
- package/build-style/default-editor-styles.css +3 -3
- package/build-style/style-rtl.css +62 -69
- package/build-style/style.css +62 -69
- package/package.json +29 -29
- package/src/components/alignment-control/test/index.js +2 -0
- package/src/components/alignment-control/ui.js +1 -7
- package/src/components/block-actions/index.js +5 -0
- package/src/components/block-alignment-control/test/index.js +2 -0
- package/src/components/block-alignment-control/use-available-alignments.js +4 -3
- package/src/components/block-icon/index.js +4 -2
- package/src/components/block-icon/test/index.js +9 -5
- package/src/components/block-inspector/index.js +79 -4
- package/src/components/block-inspector/style.scss +7 -0
- package/src/components/block-list-appender/index.js +65 -54
- package/src/components/block-list-appender/index.native.js +45 -34
- package/src/components/block-mobile-toolbar/block-actions-menu.native.js +18 -22
- package/src/components/block-mobile-toolbar/index.native.js +1 -1
- package/src/components/block-mobile-toolbar/test/__snapshots__/block-actions-menu.native.js.snap +125 -0
- package/src/components/block-mobile-toolbar/test/block-actions-menu.native.js +439 -0
- package/src/components/block-mover/test/__snapshots__/index.native.js.snap +42 -0
- package/src/components/block-mover/test/index.native.js +157 -1
- package/src/components/block-pattern-setup/index.js +15 -6
- package/src/components/block-pattern-setup/style.scss +29 -1
- package/src/components/block-preview/auto.js +2 -4
- package/src/components/block-settings-menu/block-settings-dropdown.js +4 -0
- package/src/components/block-styles/index.js +4 -1
- package/src/components/block-styles/index.native.js +1 -2
- package/src/components/block-styles/utils.js +5 -7
- package/src/components/block-switcher/test/index.js +3 -2
- package/src/components/block-toolbar/index.native.js +8 -11
- package/src/components/block-tools/selected-block-popover.js +1 -3
- package/src/components/block-tools/use-block-toolbar-popover-props.js +68 -12
- package/src/components/block-variation-picker/index.js +5 -1
- package/src/components/block-vertical-alignment-control/test/index.js +2 -0
- package/src/components/button-block-appender/{style.scss → content.scss} +0 -0
- package/src/components/colors/test/with-colors.js +2 -0
- package/src/components/colors/utils.js +5 -3
- package/src/components/colors-gradients/control.js +0 -7
- package/src/components/colors-gradients/dropdown.js +0 -2
- package/src/components/colors-gradients/panel-color-gradient-settings.js +4 -22
- package/src/components/colors-gradients/use-multiple-origin-colors-and-gradients.js +4 -2
- package/src/components/copy-handler/index.js +53 -7
- package/src/components/default-block-appender/test/index.js +2 -0
- package/src/components/default-style-picker/index.js +1 -0
- package/src/components/font-sizes/fluid-utils.js +7 -1
- package/src/components/font-sizes/utils.js +5 -3
- package/src/components/font-sizes/with-font-sizes.js +36 -36
- package/src/components/gradients/use-gradient.js +2 -7
- package/src/components/iframe/index.js +60 -122
- package/src/components/iframe/use-compatibility-styles.js +101 -0
- package/src/components/image-size-control/index.js +1 -0
- package/src/components/image-size-control/test/index.js +147 -79
- package/src/components/inner-blocks/index.js +4 -2
- package/src/components/inserter/block-patterns-tab.js +7 -4
- package/src/components/inserter/hooks/use-insertion-point.js +3 -2
- package/src/components/inserter/index.js +61 -43
- package/src/components/inserter/media-tab/hooks.js +5 -4
- package/src/components/inserter/menu.js +8 -4
- package/src/components/inserter/quick-inserter.js +3 -0
- package/src/components/inserter/search-items.js +1 -2
- package/src/components/inserter/search-results.js +2 -0
- package/src/components/inserter/test/__snapshots__/index.native.js.snap +117 -0
- package/src/components/inserter/test/index.native.js +255 -1
- package/src/components/inspector-controls/groups.js +2 -0
- package/src/components/inspector-controls-tabs/position-controls-panel.js +37 -0
- package/src/components/inspector-controls-tabs/settings-tab.js +2 -0
- package/src/components/inspector-controls-tabs/style.scss +15 -0
- package/src/components/inspector-controls-tabs/use-inspector-controls-tabs.js +3 -8
- package/src/components/link-control/search-input.js +1 -0
- package/src/components/link-control/style.scss +1 -0
- package/src/components/link-control/test/index.js +18 -4
- package/src/components/list-view/block-select-button.js +1 -1
- package/src/components/list-view/style.scss +14 -10
- package/src/components/media-replace-flow/test/index.js +2 -0
- package/src/components/off-canvas-editor/appender.js +4 -49
- package/src/components/off-canvas-editor/block-contents.js +84 -23
- package/src/components/off-canvas-editor/block-select-button.js +6 -2
- package/src/components/off-canvas-editor/block.js +90 -105
- package/src/components/off-canvas-editor/index.js +21 -2
- package/src/components/off-canvas-editor/style.scss +5 -1
- package/src/components/off-canvas-editor/test/use-inserted-block.js +108 -0
- package/src/components/off-canvas-editor/use-inserted-block.js +47 -0
- package/src/components/provider/index.js +4 -1
- package/src/components/responsive-block-control/label.js +2 -3
- package/src/components/responsive-block-control/test/index.js +4 -2
- package/src/components/rich-text/format-edit.js +6 -10
- package/src/components/rich-text/index.js +1 -0
- package/src/components/rich-text/use-enter.js +4 -4
- package/src/components/rich-text/use-paste-handler.js +33 -14
- package/src/components/spacing-sizes-control/index.js +0 -1
- package/src/components/spacing-sizes-control/utils.js +1 -1
- package/src/components/typewriter/index.js +3 -1
- package/src/components/url-input/README.md +5 -0
- package/src/components/url-input/button.js +1 -0
- package/src/components/url-input/index.js +15 -1
- package/src/components/url-input/test/button.js +2 -0
- package/src/components/url-popover/image-url-input-ui.js +5 -4
- package/src/components/url-popover/link-editor.js +1 -0
- package/src/components/url-popover/test/index.js +21 -5
- package/src/components/use-paste-styles/index.js +230 -0
- package/src/components/warning/test/index.js +2 -0
- package/src/components/writing-flow/index.js +1 -1
- package/src/components/writing-flow/use-arrow-nav.js +20 -28
- package/src/content.scss +1 -0
- package/src/hooks/border.js +0 -1
- package/src/hooks/color-panel.js +0 -1
- package/src/hooks/color.js +0 -2
- package/src/hooks/font-family.js +3 -5
- package/src/hooks/font-size.js +13 -4
- package/src/hooks/index.js +1 -0
- package/src/hooks/metadata.js +1 -2
- package/src/hooks/position.js +375 -0
- package/src/hooks/position.scss +18 -0
- package/src/hooks/supports.js +302 -0
- package/src/hooks/test/__snapshots__/align.native.js.snap +73 -0
- package/src/hooks/test/align.native.js +133 -0
- package/src/hooks/test/use-typography-props.js +26 -0
- package/src/hooks/use-typography-props.js +15 -7
- package/src/store/reducer.js +20 -8
- package/src/store/selectors.js +7 -8
- package/src/store/test/reducer.js +45 -3
- package/src/store/test/selectors.js +12 -9
- package/src/style.scss +2 -1
- package/src/utils/pasting.js +3 -9
- package/tsconfig.tsbuildinfo +1 -1
- package/build/components/colors-gradients/use-common-single-multiple-selects.js +0 -21
- package/build/components/colors-gradients/use-common-single-multiple-selects.js.map +0 -1
- package/build/components/rich-text/file-paste-handler.js +0 -21
- package/build/components/rich-text/file-paste-handler.js.map +0 -1
- package/build-module/components/colors-gradients/use-common-single-multiple-selects.js +0 -11
- package/build-module/components/colors-gradients/use-common-single-multiple-selects.js.map +0 -1
- package/build-module/components/rich-text/file-paste-handler.js +0 -13
- package/build-module/components/rich-text/file-paste-handler.js.map +0 -1
- package/src/components/colors-gradients/use-common-single-multiple-selects.js +0 -11
- package/src/components/rich-text/file-paste-handler.js +0 -13
package/build-style/style.css
CHANGED
|
@@ -58,15 +58,15 @@
|
|
|
58
58
|
* @param {string} hex - the hexadecimal value to convert
|
|
59
59
|
* @return {string} comma separated rgb values
|
|
60
60
|
*/
|
|
61
|
-
/**
|
|
62
|
-
* Breakpoint mixins
|
|
63
|
-
*/
|
|
64
61
|
/**
|
|
65
62
|
* Long content fade mixin
|
|
66
63
|
*
|
|
67
64
|
* Creates a fading overlay to signify that the content is longer
|
|
68
65
|
* than the space allows.
|
|
69
66
|
*/
|
|
67
|
+
/**
|
|
68
|
+
* Breakpoint mixins
|
|
69
|
+
*/
|
|
70
70
|
/**
|
|
71
71
|
* Focus styles.
|
|
72
72
|
*/
|
|
@@ -158,6 +158,9 @@
|
|
|
158
158
|
.block-editor-block-inspector .components-base-control:last-child {
|
|
159
159
|
margin-bottom: 8px;
|
|
160
160
|
}
|
|
161
|
+
.block-editor-block-inspector .components-focal-point-picker-control .components-base-control {
|
|
162
|
+
margin-bottom: 0;
|
|
163
|
+
}
|
|
161
164
|
.block-editor-block-inspector .components-panel__body {
|
|
162
165
|
border: none;
|
|
163
166
|
border-top: 1px solid #e0e0e0;
|
|
@@ -1171,6 +1174,9 @@
|
|
|
1171
1174
|
width: 100%;
|
|
1172
1175
|
border-radius: 2px;
|
|
1173
1176
|
}
|
|
1177
|
+
.block-editor-block-pattern-setup.view-mode-grid {
|
|
1178
|
+
padding-top: 4px;
|
|
1179
|
+
}
|
|
1174
1180
|
.block-editor-block-pattern-setup.view-mode-grid .block-editor-block-pattern-setup__toolbar {
|
|
1175
1181
|
justify-content: center;
|
|
1176
1182
|
}
|
|
@@ -1192,10 +1198,26 @@
|
|
|
1192
1198
|
.block-editor-block-pattern-setup.view-mode-grid .block-editor-block-pattern-setup__container div[role=button] {
|
|
1193
1199
|
cursor: pointer;
|
|
1194
1200
|
}
|
|
1201
|
+
.block-editor-block-pattern-setup.view-mode-grid .block-editor-block-pattern-setup__container .block-editor-block-pattern-setup-list__item:hover .block-editor-block-preview__container {
|
|
1202
|
+
box-shadow: 0 0 0 2px var(--wp-admin-theme-color);
|
|
1203
|
+
}
|
|
1204
|
+
.block-editor-block-pattern-setup.view-mode-grid .block-editor-block-pattern-setup__container .block-editor-block-pattern-setup-list__item:focus .block-editor-block-preview__container {
|
|
1205
|
+
box-shadow: inset 0 0 0 1px #fff, 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
1206
|
+
outline: 2px solid transparent;
|
|
1207
|
+
}
|
|
1208
|
+
.block-editor-block-pattern-setup.view-mode-grid .block-editor-block-pattern-setup__container .block-editor-block-pattern-setup-list__item:hover .block-editor-block-pattern-setup-list__item-title, .block-editor-block-pattern-setup.view-mode-grid .block-editor-block-pattern-setup__container .block-editor-block-pattern-setup-list__item:focus .block-editor-block-pattern-setup-list__item-title {
|
|
1209
|
+
color: var(--wp-admin-theme-color);
|
|
1210
|
+
}
|
|
1195
1211
|
.block-editor-block-pattern-setup.view-mode-grid .block-editor-block-pattern-setup__container .block-editor-block-pattern-setup-list__list-item {
|
|
1196
1212
|
break-inside: avoid-column;
|
|
1197
1213
|
margin-bottom: 24px;
|
|
1198
1214
|
}
|
|
1215
|
+
.block-editor-block-pattern-setup.view-mode-grid .block-editor-block-pattern-setup__container .block-editor-block-pattern-setup-list__list-item .block-editor-block-pattern-setup-list__item-title {
|
|
1216
|
+
padding-top: 8px;
|
|
1217
|
+
font-size: 12px;
|
|
1218
|
+
text-align: center;
|
|
1219
|
+
cursor: pointer;
|
|
1220
|
+
}
|
|
1199
1221
|
.block-editor-block-pattern-setup.view-mode-grid .block-editor-block-pattern-setup__container .block-editor-block-pattern-setup-list__list-item .block-editor-block-preview__container {
|
|
1200
1222
|
min-height: 100px;
|
|
1201
1223
|
border-radius: 2px;
|
|
@@ -1237,6 +1259,7 @@
|
|
|
1237
1259
|
display: flex;
|
|
1238
1260
|
flex-direction: column;
|
|
1239
1261
|
width: 100%;
|
|
1262
|
+
height: 100%;
|
|
1240
1263
|
box-sizing: border-box;
|
|
1241
1264
|
}
|
|
1242
1265
|
.block-editor-block-pattern-setup .block-editor-block-pattern-setup__container .carousel-container {
|
|
@@ -1244,6 +1267,7 @@
|
|
|
1244
1267
|
position: relative;
|
|
1245
1268
|
padding: 0;
|
|
1246
1269
|
margin: 0;
|
|
1270
|
+
height: 100%;
|
|
1247
1271
|
list-style: none;
|
|
1248
1272
|
transform-style: preserve-3d;
|
|
1249
1273
|
}
|
|
@@ -1254,6 +1278,8 @@
|
|
|
1254
1278
|
position: absolute;
|
|
1255
1279
|
top: 0;
|
|
1256
1280
|
width: 100%;
|
|
1281
|
+
height: 100%;
|
|
1282
|
+
background-color: #fff;
|
|
1257
1283
|
margin: auto;
|
|
1258
1284
|
padding: 0;
|
|
1259
1285
|
transition: transform 0.5s, z-index 0.5s;
|
|
@@ -1358,63 +1384,6 @@
|
|
|
1358
1384
|
margin-right: 0;
|
|
1359
1385
|
}
|
|
1360
1386
|
|
|
1361
|
-
.block-editor-button-block-appender {
|
|
1362
|
-
display: flex;
|
|
1363
|
-
flex-direction: column;
|
|
1364
|
-
align-items: center;
|
|
1365
|
-
justify-content: center;
|
|
1366
|
-
width: 100%;
|
|
1367
|
-
height: auto;
|
|
1368
|
-
color: #1e1e1e;
|
|
1369
|
-
box-shadow: inset 0 0 0 1px #1e1e1e;
|
|
1370
|
-
}
|
|
1371
|
-
.block-editor-button-block-appender.components-button.components-button {
|
|
1372
|
-
padding: 12px;
|
|
1373
|
-
}
|
|
1374
|
-
.is-dark-theme .block-editor-button-block-appender {
|
|
1375
|
-
color: rgba(255, 255, 255, 0.65);
|
|
1376
|
-
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
|
|
1377
|
-
}
|
|
1378
|
-
.block-editor-button-block-appender:hover {
|
|
1379
|
-
color: var(--wp-admin-theme-color);
|
|
1380
|
-
box-shadow: inset 0 0 0 1px var(--wp-admin-theme-color);
|
|
1381
|
-
}
|
|
1382
|
-
.block-editor-button-block-appender:focus {
|
|
1383
|
-
box-shadow: inset 0 0 0 2px var(--wp-admin-theme-color);
|
|
1384
|
-
}
|
|
1385
|
-
.block-editor-button-block-appender:active {
|
|
1386
|
-
color: #000;
|
|
1387
|
-
}
|
|
1388
|
-
|
|
1389
|
-
.is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child, .is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .wp-block-group__inner-container > .block-list-appender:only-child, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .wp-block-group__inner-container > .block-list-appender:only-child {
|
|
1390
|
-
pointer-events: none;
|
|
1391
|
-
}
|
|
1392
|
-
.is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child::after, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child::after, .is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .wp-block-group__inner-container > .block-list-appender:only-child::after, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .wp-block-group__inner-container > .block-list-appender:only-child::after {
|
|
1393
|
-
content: "";
|
|
1394
|
-
position: absolute;
|
|
1395
|
-
top: 0;
|
|
1396
|
-
right: 0;
|
|
1397
|
-
bottom: 0;
|
|
1398
|
-
left: 0;
|
|
1399
|
-
pointer-events: none;
|
|
1400
|
-
border: 1px dashed currentColor;
|
|
1401
|
-
border-radius: 2px;
|
|
1402
|
-
}
|
|
1403
|
-
.is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child::after::before, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child::after::before, .is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .wp-block-group__inner-container > .block-list-appender:only-child::after::before, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .wp-block-group__inner-container > .block-list-appender:only-child::after::before {
|
|
1404
|
-
content: "";
|
|
1405
|
-
position: absolute;
|
|
1406
|
-
top: 0;
|
|
1407
|
-
right: 0;
|
|
1408
|
-
bottom: 0;
|
|
1409
|
-
left: 0;
|
|
1410
|
-
pointer-events: none;
|
|
1411
|
-
background: currentColor;
|
|
1412
|
-
opacity: 0.1;
|
|
1413
|
-
}
|
|
1414
|
-
.is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child .block-editor-inserter, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child .block-editor-inserter, .is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .wp-block-group__inner-container > .block-list-appender:only-child .block-editor-inserter, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .wp-block-group__inner-container > .block-list-appender:only-child .block-editor-inserter {
|
|
1415
|
-
visibility: hidden;
|
|
1416
|
-
}
|
|
1417
|
-
|
|
1418
1387
|
.block-editor-color-gradient-control .block-editor-color-gradient-control__color-indicator {
|
|
1419
1388
|
margin-bottom: 12px;
|
|
1420
1389
|
}
|
|
@@ -1701,6 +1670,13 @@
|
|
|
1701
1670
|
font-size: 12px;
|
|
1702
1671
|
}
|
|
1703
1672
|
|
|
1673
|
+
.show-icon-labels .block-editor-block-inspector__tabs .components-tab-panel__tabs .components-button.has-icon svg {
|
|
1674
|
+
display: none;
|
|
1675
|
+
}
|
|
1676
|
+
.show-icon-labels .block-editor-block-inspector__tabs .components-tab-panel__tabs .components-button.has-icon::before {
|
|
1677
|
+
content: attr(aria-label);
|
|
1678
|
+
}
|
|
1679
|
+
|
|
1704
1680
|
.block-editor-inspector-popover-header {
|
|
1705
1681
|
margin-bottom: 16px;
|
|
1706
1682
|
}
|
|
@@ -1776,6 +1752,7 @@
|
|
|
1776
1752
|
.block-editor-link-control__field .components-base-control__label {
|
|
1777
1753
|
margin-right: 16px;
|
|
1778
1754
|
margin-bottom: 0;
|
|
1755
|
+
min-width: 29px;
|
|
1779
1756
|
}
|
|
1780
1757
|
.block-editor-link-control__field input[type=text], .block-editor-link-control__field.block-editor-url-input input[type=text].block-editor-url-input__input {
|
|
1781
1758
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
|
@@ -2202,9 +2179,13 @@
|
|
|
2202
2179
|
.block-editor-list-view-leaf.is-selected.is-synced td {
|
|
2203
2180
|
background: var(--wp-block-synced-color);
|
|
2204
2181
|
}
|
|
2182
|
+
.block-editor-list-view-leaf.is-synced:not(.is-selected) .block-editor-list-view-block-contents:hover, .block-editor-list-view-leaf.is-synced:not(.is-selected) .block-editor-list-view-block-contents:focus,
|
|
2205
2183
|
.block-editor-list-view-leaf.is-synced:not(.is-selected) .block-editor-list-view-block-contents .block-editor-block-icon {
|
|
2206
2184
|
color: var(--wp-block-synced-color);
|
|
2207
2185
|
}
|
|
2186
|
+
.block-editor-list-view-leaf.is-synced:not(.is-selected) .block-editor-list-view-block-contents:focus::after {
|
|
2187
|
+
box-shadow: inset 0 0 0 1px #fff, 0 0 0 var(--wp-admin-border-width-focus) var(--wp-block-synced-color);
|
|
2188
|
+
}
|
|
2208
2189
|
.block-editor-list-view-leaf.is-selected .block-editor-list-view-block-contents, .block-editor-list-view-leaf.is-selected .components-button.has-icon {
|
|
2209
2190
|
color: #fff;
|
|
2210
2191
|
}
|
|
@@ -2239,7 +2220,7 @@
|
|
|
2239
2220
|
.block-editor-list-view-leaf.is-branch-selected:not(.is-selected):not(.is-synced-branch) {
|
|
2240
2221
|
background: rgba(var(--wp-admin-theme-color--rgb), 0.04);
|
|
2241
2222
|
}
|
|
2242
|
-
.block-editor-list-view-leaf.is-synced-branch
|
|
2223
|
+
.block-editor-list-view-leaf.is-synced-branch.is-branch-selected {
|
|
2243
2224
|
background: rgba(var(--wp-block-synced-color--rgb), 0.04);
|
|
2244
2225
|
}
|
|
2245
2226
|
.block-editor-list-view-leaf.is-branch-selected.is-first-selected td:first-child {
|
|
@@ -2328,9 +2309,8 @@
|
|
|
2328
2309
|
}
|
|
2329
2310
|
}
|
|
2330
2311
|
.block-editor-list-view-leaf .block-editor-block-icon {
|
|
2331
|
-
align-self: flex-start;
|
|
2332
2312
|
margin-right: 8px;
|
|
2333
|
-
|
|
2313
|
+
flex: 0 0 24px;
|
|
2334
2314
|
}
|
|
2335
2315
|
.block-editor-list-view-leaf .block-editor-list-view-block__menu-cell,
|
|
2336
2316
|
.block-editor-list-view-leaf .block-editor-list-view-block__mover-cell,
|
|
@@ -2462,11 +2442,6 @@
|
|
|
2462
2442
|
}
|
|
2463
2443
|
.block-editor-list-view-leaf .block-editor-list-view-block-select-button__lock {
|
|
2464
2444
|
line-height: 0;
|
|
2465
|
-
width: 24px;
|
|
2466
|
-
min-width: 24px;
|
|
2467
|
-
margin-left: auto;
|
|
2468
|
-
padding: 0;
|
|
2469
|
-
vertical-align: middle;
|
|
2470
2445
|
}
|
|
2471
2446
|
|
|
2472
2447
|
.block-editor-list-view-block-select-button__description,
|
|
@@ -3169,6 +3144,20 @@
|
|
|
3169
3144
|
grid-column: span 1;
|
|
3170
3145
|
}
|
|
3171
3146
|
|
|
3147
|
+
.block-editor-hooks__position-selection__select-control .components-custom-select-control__hint {
|
|
3148
|
+
display: none;
|
|
3149
|
+
}
|
|
3150
|
+
|
|
3151
|
+
.block-editor-hooks__position-selection__select-control__option.has-hint {
|
|
3152
|
+
grid-template-columns: auto 30px;
|
|
3153
|
+
line-height: 1.4;
|
|
3154
|
+
margin-bottom: 0;
|
|
3155
|
+
}
|
|
3156
|
+
.block-editor-hooks__position-selection__select-control__option .components-custom-select-control__item-hint {
|
|
3157
|
+
grid-row: 2;
|
|
3158
|
+
text-align: left;
|
|
3159
|
+
}
|
|
3160
|
+
|
|
3172
3161
|
.typography-block-support-panel .single-column {
|
|
3173
3162
|
grid-column: span 1;
|
|
3174
3163
|
}
|
|
@@ -4143,7 +4132,7 @@
|
|
|
4143
4132
|
.offcanvas-editor__appender .block-editor-inserter__toggle {
|
|
4144
4133
|
background-color: #1e1e1e;
|
|
4145
4134
|
color: #fff;
|
|
4146
|
-
margin: 8px 0 0
|
|
4135
|
+
margin: 8px 0 0 24px;
|
|
4147
4136
|
border-radius: 2px;
|
|
4148
4137
|
height: 24px;
|
|
4149
4138
|
min-width: 24px;
|
|
@@ -4164,6 +4153,10 @@
|
|
|
4164
4153
|
max-width: 248px;
|
|
4165
4154
|
}
|
|
4166
4155
|
|
|
4156
|
+
.offcanvas-editor-list-view-is-empty {
|
|
4157
|
+
margin-left: 16px;
|
|
4158
|
+
}
|
|
4159
|
+
|
|
4167
4160
|
body.admin-color-light {
|
|
4168
4161
|
--wp-admin-theme-color: #0085ba;
|
|
4169
4162
|
--wp-admin-theme-color--rgb: 0, 133, 186;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/block-editor",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.2.0",
|
|
4
4
|
"description": "Generic block editor.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -33,33 +33,33 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@babel/runtime": "^7.16.0",
|
|
35
35
|
"@react-spring/web": "^9.4.5",
|
|
36
|
-
"@wordpress/a11y": "^3.
|
|
37
|
-
"@wordpress/api-fetch": "^6.
|
|
38
|
-
"@wordpress/blob": "^3.
|
|
39
|
-
"@wordpress/blocks": "^12.
|
|
40
|
-
"@wordpress/components": "^23.
|
|
41
|
-
"@wordpress/compose": "^6.
|
|
42
|
-
"@wordpress/data": "^8.
|
|
43
|
-
"@wordpress/date": "^4.
|
|
44
|
-
"@wordpress/deprecated": "^3.
|
|
45
|
-
"@wordpress/dom": "^3.
|
|
46
|
-
"@wordpress/element": "^5.
|
|
47
|
-
"@wordpress/escape-html": "^2.
|
|
48
|
-
"@wordpress/hooks": "^3.
|
|
49
|
-
"@wordpress/html-entities": "^3.
|
|
50
|
-
"@wordpress/i18n": "^4.
|
|
51
|
-
"@wordpress/icons": "^9.
|
|
52
|
-
"@wordpress/is-shallow-equal": "^4.
|
|
53
|
-
"@wordpress/keyboard-shortcuts": "^4.
|
|
54
|
-
"@wordpress/keycodes": "^3.
|
|
55
|
-
"@wordpress/notices": "^3.
|
|
56
|
-
"@wordpress/rich-text": "^6.
|
|
57
|
-
"@wordpress/shortcode": "^3.
|
|
58
|
-
"@wordpress/style-engine": "^1.
|
|
59
|
-
"@wordpress/token-list": "^2.
|
|
60
|
-
"@wordpress/url": "^3.
|
|
61
|
-
"@wordpress/warning": "^2.
|
|
62
|
-
"@wordpress/wordcount": "^3.
|
|
36
|
+
"@wordpress/a11y": "^3.25.0",
|
|
37
|
+
"@wordpress/api-fetch": "^6.22.0",
|
|
38
|
+
"@wordpress/blob": "^3.25.0",
|
|
39
|
+
"@wordpress/blocks": "^12.2.0",
|
|
40
|
+
"@wordpress/components": "^23.2.0",
|
|
41
|
+
"@wordpress/compose": "^6.2.0",
|
|
42
|
+
"@wordpress/data": "^8.2.0",
|
|
43
|
+
"@wordpress/date": "^4.25.0",
|
|
44
|
+
"@wordpress/deprecated": "^3.25.0",
|
|
45
|
+
"@wordpress/dom": "^3.25.0",
|
|
46
|
+
"@wordpress/element": "^5.2.0",
|
|
47
|
+
"@wordpress/escape-html": "^2.25.0",
|
|
48
|
+
"@wordpress/hooks": "^3.25.0",
|
|
49
|
+
"@wordpress/html-entities": "^3.25.0",
|
|
50
|
+
"@wordpress/i18n": "^4.25.0",
|
|
51
|
+
"@wordpress/icons": "^9.16.0",
|
|
52
|
+
"@wordpress/is-shallow-equal": "^4.25.0",
|
|
53
|
+
"@wordpress/keyboard-shortcuts": "^4.2.0",
|
|
54
|
+
"@wordpress/keycodes": "^3.25.0",
|
|
55
|
+
"@wordpress/notices": "^3.25.0",
|
|
56
|
+
"@wordpress/rich-text": "^6.2.0",
|
|
57
|
+
"@wordpress/shortcode": "^3.25.0",
|
|
58
|
+
"@wordpress/style-engine": "^1.8.0",
|
|
59
|
+
"@wordpress/token-list": "^2.25.0",
|
|
60
|
+
"@wordpress/url": "^3.26.0",
|
|
61
|
+
"@wordpress/warning": "^2.25.0",
|
|
62
|
+
"@wordpress/wordcount": "^3.25.0",
|
|
63
63
|
"change-case": "^4.1.2",
|
|
64
64
|
"classnames": "^2.3.1",
|
|
65
65
|
"colord": "^2.7.0",
|
|
@@ -81,5 +81,5 @@
|
|
|
81
81
|
"publishConfig": {
|
|
82
82
|
"access": "public"
|
|
83
83
|
},
|
|
84
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "204c880ff65295768e9695dfee6c7a9fee1fdd05"
|
|
85
85
|
}
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { find } from 'lodash';
|
|
5
|
-
|
|
6
1
|
/**
|
|
7
2
|
* WordPress dependencies
|
|
8
3
|
*/
|
|
@@ -46,8 +41,7 @@ function AlignmentUI( {
|
|
|
46
41
|
return () => onChange( value === align ? undefined : align );
|
|
47
42
|
}
|
|
48
43
|
|
|
49
|
-
const activeAlignment = find(
|
|
50
|
-
alignmentControls,
|
|
44
|
+
const activeAlignment = alignmentControls.find(
|
|
51
45
|
( control ) => control.align === value
|
|
52
46
|
);
|
|
53
47
|
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
* Internal dependencies
|
|
13
13
|
*/
|
|
14
14
|
import { useNotifyCopy } from '../copy-handler';
|
|
15
|
+
import usePasteStyles from '../use-paste-styles';
|
|
15
16
|
import { store as blockEditorStore } from '../../store';
|
|
16
17
|
|
|
17
18
|
export default function BlockActions( {
|
|
@@ -60,6 +61,7 @@ export default function BlockActions( {
|
|
|
60
61
|
} = useDispatch( blockEditorStore );
|
|
61
62
|
|
|
62
63
|
const notifyCopy = useNotifyCopy();
|
|
64
|
+
const pasteStyles = usePasteStyles();
|
|
63
65
|
|
|
64
66
|
return children( {
|
|
65
67
|
canDuplicate,
|
|
@@ -128,5 +130,8 @@ export default function BlockActions( {
|
|
|
128
130
|
}
|
|
129
131
|
notifyCopy( 'copy', selectedBlockClientIds );
|
|
130
132
|
},
|
|
133
|
+
async onPasteStyles() {
|
|
134
|
+
await pasteStyles( blocks );
|
|
135
|
+
},
|
|
131
136
|
} );
|
|
132
137
|
}
|
|
@@ -10,6 +10,7 @@ import { useLayout } from '../block-list/layout';
|
|
|
10
10
|
import { store as blockEditorStore } from '../../store';
|
|
11
11
|
import { getLayoutType } from '../../layouts';
|
|
12
12
|
|
|
13
|
+
const EMPTY_ARRAY = [];
|
|
13
14
|
const DEFAULT_CONTROLS = [ 'none', 'left', 'center', 'right', 'wide', 'full' ];
|
|
14
15
|
const WIDE_CONTROLS = [ 'wide', 'full' ];
|
|
15
16
|
|
|
@@ -40,14 +41,14 @@ export default function useAvailableAlignments( controls = DEFAULT_CONTROLS ) {
|
|
|
40
41
|
// While we treat `none` as an alignment, we shouldn't return it if no
|
|
41
42
|
// other alignments exist.
|
|
42
43
|
if ( alignments.length === 1 && alignments[ 0 ].name === 'none' ) {
|
|
43
|
-
return
|
|
44
|
+
return EMPTY_ARRAY;
|
|
44
45
|
}
|
|
45
46
|
return alignments;
|
|
46
47
|
}
|
|
47
48
|
|
|
48
49
|
// Starting here, it's the fallback for themes not supporting the layout config.
|
|
49
50
|
if ( layoutType.name !== 'default' && layoutType.name !== 'constrained' ) {
|
|
50
|
-
return
|
|
51
|
+
return EMPTY_ARRAY;
|
|
51
52
|
}
|
|
52
53
|
const { alignments: availableAlignments = DEFAULT_CONTROLS } = layout;
|
|
53
54
|
const enabledControls = controls
|
|
@@ -66,7 +67,7 @@ export default function useAvailableAlignments( controls = DEFAULT_CONTROLS ) {
|
|
|
66
67
|
enabledControls.length === 1 &&
|
|
67
68
|
enabledControls[ 0 ].name === 'none'
|
|
68
69
|
) {
|
|
69
|
-
return
|
|
70
|
+
return EMPTY_ARRAY;
|
|
70
71
|
}
|
|
71
72
|
|
|
72
73
|
return enabledControls;
|
|
@@ -10,14 +10,16 @@ import { Icon } from '@wordpress/components';
|
|
|
10
10
|
import { blockDefault } from '@wordpress/icons';
|
|
11
11
|
import { memo } from '@wordpress/element';
|
|
12
12
|
|
|
13
|
-
function BlockIcon( { icon, showColors = false, className } ) {
|
|
13
|
+
function BlockIcon( { icon, showColors = false, className, context } ) {
|
|
14
14
|
if ( icon?.src === 'block-default' ) {
|
|
15
15
|
icon = {
|
|
16
16
|
src: blockDefault,
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
const renderedIcon =
|
|
20
|
+
const renderedIcon = (
|
|
21
|
+
<Icon icon={ icon && icon.src ? icon.src : icon } context={ context } />
|
|
22
|
+
);
|
|
21
23
|
const style = showColors
|
|
22
24
|
? {
|
|
23
25
|
backgroundColor: icon && icon.background,
|
|
@@ -13,6 +13,10 @@ import { image } from '@wordpress/icons';
|
|
|
13
13
|
*/
|
|
14
14
|
import BlockIcon from '../';
|
|
15
15
|
|
|
16
|
+
function getIconWrapper( container ) {
|
|
17
|
+
return container.firstChild;
|
|
18
|
+
}
|
|
19
|
+
|
|
16
20
|
describe( 'BlockIcon', () => {
|
|
17
21
|
it( 'renders a Icon', () => {
|
|
18
22
|
const { container } = render( <BlockIcon icon={ image } /> );
|
|
@@ -23,13 +27,13 @@ describe( 'BlockIcon', () => {
|
|
|
23
27
|
it( 'renders a span without the has-colors classname', () => {
|
|
24
28
|
const { container } = render( <BlockIcon icon={ image } /> );
|
|
25
29
|
|
|
26
|
-
expect( container
|
|
30
|
+
expect( getIconWrapper( container ) ).not.toHaveClass( 'has-colors' );
|
|
27
31
|
} );
|
|
28
32
|
|
|
29
33
|
it( 'renders a span with the has-colors classname', () => {
|
|
30
34
|
const { container } = render( <BlockIcon icon={ image } showColors /> );
|
|
31
35
|
|
|
32
|
-
expect( container
|
|
36
|
+
expect( getIconWrapper( container ) ).toHaveClass( 'has-colors' );
|
|
33
37
|
} );
|
|
34
38
|
|
|
35
39
|
it( 'supports adding a className to the wrapper', () => {
|
|
@@ -37,7 +41,7 @@ describe( 'BlockIcon', () => {
|
|
|
37
41
|
<BlockIcon icon={ image } className="foo-bar" />
|
|
38
42
|
);
|
|
39
43
|
|
|
40
|
-
expect( container
|
|
44
|
+
expect( getIconWrapper( container ) ).toHaveClass( 'foo-bar' );
|
|
41
45
|
} );
|
|
42
46
|
|
|
43
47
|
it( 'skips adding background and foreground styles when colors are not enabled', () => {
|
|
@@ -51,7 +55,7 @@ describe( 'BlockIcon', () => {
|
|
|
51
55
|
/>
|
|
52
56
|
);
|
|
53
57
|
|
|
54
|
-
expect( container
|
|
58
|
+
expect( getIconWrapper( container ) ).not.toHaveAttribute( 'style' );
|
|
55
59
|
} );
|
|
56
60
|
|
|
57
61
|
it( 'adds background and foreground styles when colors are enabled', () => {
|
|
@@ -66,7 +70,7 @@ describe( 'BlockIcon', () => {
|
|
|
66
70
|
/>
|
|
67
71
|
);
|
|
68
72
|
|
|
69
|
-
expect( container
|
|
73
|
+
expect( getIconWrapper( container ) ).toHaveStyle( {
|
|
70
74
|
backgroundColor: 'white',
|
|
71
75
|
color: 'black',
|
|
72
76
|
} );
|
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
__experimentalHStack as HStack,
|
|
15
15
|
__experimentalVStack as VStack,
|
|
16
16
|
Button,
|
|
17
|
+
__unstableMotion as motion,
|
|
17
18
|
} from '@wordpress/components';
|
|
18
19
|
import { useSelect, useDispatch } from '@wordpress/data';
|
|
19
20
|
import { useMemo, useCallback } from '@wordpress/element';
|
|
@@ -34,6 +35,7 @@ import { default as InspectorControls } from '../inspector-controls';
|
|
|
34
35
|
import { default as InspectorControlsTabs } from '../inspector-controls-tabs';
|
|
35
36
|
import useInspectorControlsTabs from '../inspector-controls-tabs/use-inspector-controls-tabs';
|
|
36
37
|
import AdvancedControls from '../inspector-controls-tabs/advanced-controls-panel';
|
|
38
|
+
import PositionControls from '../inspector-controls-tabs/position-controls-panel';
|
|
37
39
|
|
|
38
40
|
function useContentBlocks( blockTypes, block ) {
|
|
39
41
|
const contentBlocksObjectAux = useMemo( () => {
|
|
@@ -171,6 +173,24 @@ const BlockInspector = ( { showNoBlockSelectedMessage = true } ) => {
|
|
|
171
173
|
const availableTabs = useInspectorControlsTabs( blockType?.name );
|
|
172
174
|
const showTabs = availableTabs?.length > 1;
|
|
173
175
|
|
|
176
|
+
const isOffCanvasNavigationEditorEnabled =
|
|
177
|
+
window?.__experimentalEnableOffCanvasNavigationEditor === true;
|
|
178
|
+
|
|
179
|
+
const blockInspectorAnimationSettings = useSelect(
|
|
180
|
+
( select ) => {
|
|
181
|
+
if ( isOffCanvasNavigationEditorEnabled && blockType ) {
|
|
182
|
+
const globalBlockInspectorAnimationSettings =
|
|
183
|
+
select( blockEditorStore ).getSettings()
|
|
184
|
+
.__experimentalBlockInspectorAnimation;
|
|
185
|
+
return globalBlockInspectorAnimationSettings?.[
|
|
186
|
+
blockType.name
|
|
187
|
+
];
|
|
188
|
+
}
|
|
189
|
+
return null;
|
|
190
|
+
},
|
|
191
|
+
[ selectedBlockClientId, isOffCanvasNavigationEditorEnabled, blockType ]
|
|
192
|
+
);
|
|
193
|
+
|
|
174
194
|
if ( count > 1 ) {
|
|
175
195
|
return (
|
|
176
196
|
<div className="block-editor-block-inspector">
|
|
@@ -231,11 +251,65 @@ const BlockInspector = ( { showNoBlockSelectedMessage = true } ) => {
|
|
|
231
251
|
/>
|
|
232
252
|
);
|
|
233
253
|
}
|
|
254
|
+
|
|
234
255
|
return (
|
|
235
|
-
<
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
256
|
+
<BlockInspectorSingleBlockWrapper
|
|
257
|
+
animate={
|
|
258
|
+
isOffCanvasNavigationEditorEnabled &&
|
|
259
|
+
blockInspectorAnimationSettings
|
|
260
|
+
}
|
|
261
|
+
wrapper={ ( children ) => (
|
|
262
|
+
<AnimatedContainer
|
|
263
|
+
blockInspectorAnimationSettings={
|
|
264
|
+
blockInspectorAnimationSettings
|
|
265
|
+
}
|
|
266
|
+
selectedBlockClientId={ selectedBlockClientId }
|
|
267
|
+
>
|
|
268
|
+
{ children }
|
|
269
|
+
</AnimatedContainer>
|
|
270
|
+
) }
|
|
271
|
+
>
|
|
272
|
+
<BlockInspectorSingleBlock
|
|
273
|
+
clientId={ selectedBlockClientId }
|
|
274
|
+
blockName={ blockType.name }
|
|
275
|
+
/>
|
|
276
|
+
</BlockInspectorSingleBlockWrapper>
|
|
277
|
+
);
|
|
278
|
+
};
|
|
279
|
+
|
|
280
|
+
const BlockInspectorSingleBlockWrapper = ( { animate, wrapper, children } ) => {
|
|
281
|
+
return animate ? wrapper( children ) : children;
|
|
282
|
+
};
|
|
283
|
+
|
|
284
|
+
const AnimatedContainer = ( {
|
|
285
|
+
blockInspectorAnimationSettings,
|
|
286
|
+
selectedBlockClientId,
|
|
287
|
+
children,
|
|
288
|
+
} ) => {
|
|
289
|
+
const animationOrigin =
|
|
290
|
+
blockInspectorAnimationSettings &&
|
|
291
|
+
blockInspectorAnimationSettings.enterDirection === 'leftToRight'
|
|
292
|
+
? -50
|
|
293
|
+
: 50;
|
|
294
|
+
|
|
295
|
+
return (
|
|
296
|
+
<motion.div
|
|
297
|
+
animate={ {
|
|
298
|
+
x: 0,
|
|
299
|
+
opacity: 1,
|
|
300
|
+
transition: {
|
|
301
|
+
ease: 'easeInOut',
|
|
302
|
+
duration: 0.14,
|
|
303
|
+
},
|
|
304
|
+
} }
|
|
305
|
+
initial={ {
|
|
306
|
+
x: animationOrigin,
|
|
307
|
+
opacity: 0,
|
|
308
|
+
} }
|
|
309
|
+
key={ selectedBlockClientId }
|
|
310
|
+
>
|
|
311
|
+
{ children }
|
|
312
|
+
</motion.div>
|
|
239
313
|
);
|
|
240
314
|
};
|
|
241
315
|
|
|
@@ -304,6 +378,7 @@ const BlockInspectorSingleBlock = ( { clientId, blockName } ) => {
|
|
|
304
378
|
__experimentalGroup="border"
|
|
305
379
|
label={ __( 'Border' ) }
|
|
306
380
|
/>
|
|
381
|
+
<PositionControls />
|
|
307
382
|
<div>
|
|
308
383
|
<AdvancedControls />
|
|
309
384
|
</div>
|
|
@@ -17,6 +17,13 @@
|
|
|
17
17
|
margin-bottom: $grid-unit-10;
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
+
|
|
21
|
+
// Reset unexpected margin-bottom from being applied to the `BaseControl`
|
|
22
|
+
// component of the `FocalPointPicker` component.
|
|
23
|
+
.components-focal-point-picker-control .components-base-control {
|
|
24
|
+
margin-bottom: 0;
|
|
25
|
+
}
|
|
26
|
+
|
|
20
27
|
.components-panel__body {
|
|
21
28
|
border: none;
|
|
22
29
|
border-top: $border-width solid $gray-200;
|