@wordpress/block-editor 12.0.0 → 12.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 +6 -0
- package/README.md +1 -1
- package/build/autocompleters/block.js +13 -5
- package/build/autocompleters/block.js.map +1 -1
- package/build/components/block-breadcrumb/index.js +6 -3
- package/build/components/block-breadcrumb/index.js.map +1 -1
- package/build/components/block-controls/slot.js +12 -4
- package/build/components/block-controls/slot.js.map +1 -1
- package/build/components/block-controls/slot.native.js +10 -1
- package/build/components/block-controls/slot.native.js.map +1 -1
- package/build/components/block-draggable/index.js +11 -7
- package/build/components/block-draggable/index.js.map +1 -1
- package/build/components/block-draggable/use-scroll-when-dragging.js +2 -2
- package/build/components/block-draggable/use-scroll-when-dragging.js.map +1 -1
- package/build/components/block-editing-mode/index.js +84 -0
- package/build/components/block-editing-mode/index.js.map +1 -0
- package/build/components/block-list/block-invalid-warning.native.js +15 -7
- package/build/components/block-list/block-invalid-warning.native.js.map +1 -1
- package/build/components/block-list/block-list-block-context.js +15 -0
- package/build/components/block-list/block-list-block-context.js.map +1 -0
- package/build/components/block-list/block-list-item-cell.native.js +15 -2
- package/build/components/block-list/block-list-item-cell.native.js.map +1 -1
- package/build/components/block-list/block-list-item.native.js +158 -195
- package/build/components/block-list/block-list-item.native.js.map +1 -1
- package/build/components/block-list/block-outline.native.js +57 -0
- package/build/components/block-list/block-outline.native.js.map +1 -0
- package/build/components/block-list/block.js +29 -37
- package/build/components/block-list/block.js.map +1 -1
- package/build/components/block-list/block.native.js +347 -311
- package/build/components/block-list/block.native.js.map +1 -1
- package/build/components/block-list/index.native.js +260 -357
- package/build/components/block-list/index.native.js.map +1 -1
- package/build/components/block-list/insertion-point.native.js +4 -2
- package/build/components/block-list/insertion-point.native.js.map +1 -1
- package/build/components/block-list/use-block-props/index.js +2 -2
- package/build/components/block-list/use-block-props/index.js.map +1 -1
- package/build/components/block-list/use-in-between-inserter.js +7 -5
- package/build/components/block-list/use-in-between-inserter.js.map +1 -1
- package/build/components/block-list-appender/index.js +15 -1
- package/build/components/block-list-appender/index.js.map +1 -1
- package/build/components/block-mobile-toolbar/block-actions-menu.native.js +19 -4
- package/build/components/block-mobile-toolbar/block-actions-menu.native.js.map +1 -1
- package/build/components/block-settings-menu/block-settings-dropdown.js +8 -10
- package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build/components/block-settings-menu-controls/index.js +15 -4
- package/build/components/block-settings-menu-controls/index.js.map +1 -1
- package/build/components/block-styles/preview-panel.js +1 -2
- package/build/components/block-styles/preview-panel.js.map +1 -1
- package/build/components/block-switcher/block-transformations-menu.js +8 -0
- package/build/components/block-switcher/block-transformations-menu.js.map +1 -1
- package/build/components/block-switcher/block-variation-transformations.js +125 -0
- package/build/components/block-switcher/block-variation-transformations.js.map +1 -0
- package/build/components/block-switcher/index.js +34 -12
- package/build/components/block-switcher/index.js.map +1 -1
- package/build/components/block-switcher/pattern-transformations-menu.js +3 -3
- package/build/components/block-switcher/pattern-transformations-menu.js.map +1 -1
- package/build/components/block-toolbar/index.js +9 -7
- package/build/components/block-toolbar/index.js.map +1 -1
- package/build/components/block-tools/block-contextual-toolbar.js +22 -65
- package/build/components/block-tools/block-contextual-toolbar.js.map +1 -1
- package/build/components/block-tools/insertion-point.js +11 -5
- package/build/components/block-tools/insertion-point.js.map +1 -1
- package/build/components/block-tools/selected-block-popover.js +3 -8
- package/build/components/block-tools/selected-block-popover.js.map +1 -1
- package/build/components/colors-gradients/use-multiple-origin-colors-and-gradients.js +3 -2
- package/build/components/colors-gradients/use-multiple-origin-colors-and-gradients.js.map +1 -1
- package/build/components/convert-to-group-buttons/index.js +7 -2
- package/build/components/convert-to-group-buttons/index.js.map +1 -1
- package/build/components/convert-to-group-buttons/index.native.js +87 -3
- package/build/components/convert-to-group-buttons/index.native.js.map +1 -1
- package/build/components/convert-to-group-buttons/use-convert-to-group-button-props.js +23 -37
- package/build/components/convert-to-group-buttons/use-convert-to-group-button-props.js.map +1 -1
- package/build/components/global-styles/advanced-panel.js +86 -0
- package/build/components/global-styles/advanced-panel.js.map +1 -0
- package/build/components/global-styles/color-panel.js +4 -1
- package/build/components/global-styles/color-panel.js.map +1 -1
- package/build/components/global-styles/dimensions-panel.js +9 -8
- package/build/components/global-styles/dimensions-panel.js.map +1 -1
- package/build/components/global-styles/hooks.js +1 -2
- package/build/components/global-styles/hooks.js.map +1 -1
- package/build/components/global-styles/index.js +24 -0
- package/build/components/global-styles/index.js.map +1 -1
- package/build/components/global-styles/typography-panel.js +1 -1
- package/build/components/global-styles/typography-panel.js.map +1 -1
- package/build/components/global-styles/use-global-styles-output.js +27 -4
- package/build/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build/components/global-styles/utils.js +30 -0
- package/build/components/global-styles/utils.js.map +1 -1
- package/build/components/iframe/index.js +14 -7
- package/build/components/iframe/index.js.map +1 -1
- package/build/components/image-editor/use-save-image.js +24 -8
- package/build/components/image-editor/use-save-image.js.map +1 -1
- package/build/components/inner-blocks/index.js +2 -1
- package/build/components/inner-blocks/index.js.map +1 -1
- package/build/components/inner-blocks/index.native.js +7 -7
- package/build/components/inner-blocks/index.native.js.map +1 -1
- package/build/components/inner-blocks/use-nested-settings-update.js +13 -5
- package/build/components/inner-blocks/use-nested-settings-update.js.map +1 -1
- package/build/components/inserter/index.js +3 -7
- package/build/components/inserter/index.js.map +1 -1
- package/build/components/inserter/quick-inserter.js +2 -4
- package/build/components/inserter/quick-inserter.js.map +1 -1
- package/build/components/inserter/search-results.js +19 -6
- package/build/components/inserter/search-results.js.map +1 -1
- package/build/components/inserter-draggable-blocks/index.js +5 -0
- package/build/components/inserter-draggable-blocks/index.js.map +1 -1
- package/build/components/inspector-controls/fill.js +1 -1
- package/build/components/inspector-controls/fill.js.map +1 -1
- package/build/components/inspector-controls/fill.native.js +1 -1
- package/build/components/inspector-controls/fill.native.js.map +1 -1
- package/build/components/inspector-controls/slot.js +3 -6
- package/build/components/inspector-controls/slot.js.map +1 -1
- package/build/components/inspector-controls/slot.native.js +1 -1
- package/build/components/inspector-controls/slot.native.js.map +1 -1
- package/build/components/line-height-control/index.js +7 -2
- package/build/components/line-height-control/index.js.map +1 -1
- package/build/components/link-control/use-internal-input-value.js +9 -8
- package/build/components/link-control/use-internal-input-value.js.map +1 -1
- package/build/components/list-view/appender.js +6 -1
- package/build/components/list-view/appender.js.map +1 -1
- package/build/components/list-view/block-contents.js +9 -2
- package/build/components/list-view/block-contents.js.map +1 -1
- package/build/components/list-view/block-select-button.js +2 -1
- package/build/components/list-view/block-select-button.js.map +1 -1
- package/build/components/list-view/block.js +25 -29
- package/build/components/list-view/block.js.map +1 -1
- package/build/components/list-view/branch.js +1 -3
- package/build/components/list-view/branch.js.map +1 -1
- package/build/components/list-view/index.js +43 -22
- package/build/components/list-view/index.js.map +1 -1
- package/build/components/list-view/use-list-view-client-ids.js +27 -3
- package/build/components/list-view/use-list-view-client-ids.js.map +1 -1
- package/build/components/list-view/use-list-view-drop-zone.js +163 -11
- package/build/components/list-view/use-list-view-drop-zone.js.map +1 -1
- package/build/components/media-placeholder/index.js +68 -7
- package/build/components/media-placeholder/index.js.map +1 -1
- package/build/components/multi-selection-inspector/index.js +2 -2
- package/build/components/multi-selection-inspector/index.js.map +1 -1
- package/build/components/preview-options/index.js +6 -1
- package/build/components/preview-options/index.js.map +1 -1
- package/build/components/publish-date-time-picker/index.js +0 -2
- package/build/components/publish-date-time-picker/index.js.map +1 -1
- package/build/components/spacing-sizes-control/spacing-input-control.js +1 -1
- package/build/components/spacing-sizes-control/spacing-input-control.js.map +1 -1
- package/build/components/url-input/index.js +4 -2
- package/build/components/url-input/index.js.map +1 -1
- package/build/components/use-block-drop-zone/index.js +25 -15
- package/build/components/use-block-drop-zone/index.js.map +1 -1
- package/build/components/use-resize-canvas/index.js +8 -1
- package/build/components/use-resize-canvas/index.js.map +1 -1
- package/build/components/writing-flow/use-arrow-nav.js +13 -7
- package/build/components/writing-flow/use-arrow-nav.js.map +1 -1
- package/build/hooks/align.js +4 -8
- package/build/hooks/align.js.map +1 -1
- package/build/hooks/behaviors.js +115 -0
- package/build/hooks/behaviors.js.map +1 -0
- package/build/hooks/border.js +1 -1
- package/build/hooks/border.js.map +1 -1
- package/build/hooks/color.js +1 -1
- package/build/hooks/color.js.map +1 -1
- package/build/hooks/content-lock-ui.js +8 -12
- package/build/hooks/content-lock-ui.js.map +1 -1
- package/build/hooks/dimensions.js +0 -30
- package/build/hooks/dimensions.js.map +1 -1
- package/build/hooks/duotone.js +5 -9
- package/build/hooks/duotone.js.map +1 -1
- package/build/hooks/index.js +2 -0
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/index.native.js +8 -0
- package/build/hooks/index.native.js.map +1 -1
- package/build/hooks/layout.js +10 -11
- package/build/hooks/layout.js.map +1 -1
- package/build/hooks/position.js +1 -1
- package/build/hooks/position.js.map +1 -1
- package/build/hooks/style.js +1 -1
- package/build/hooks/style.js.map +1 -1
- package/build/hooks/use-editor-wrapper-styles.native.js +255 -0
- package/build/hooks/use-editor-wrapper-styles.native.js.map +1 -0
- package/build/hooks/use-typography-props.js +14 -10
- package/build/hooks/use-typography-props.js.map +1 -1
- package/build/index.native.js +31 -0
- package/build/index.native.js.map +1 -0
- package/build/private-apis.js +4 -7
- package/build/private-apis.js.map +1 -1
- package/build/store/private-actions.js +46 -0
- package/build/store/private-actions.js.map +1 -1
- package/build/store/private-selectors.js +88 -0
- package/build/store/private-selectors.js.map +1 -1
- package/build/store/reducer.js +36 -1
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +28 -18
- package/build/store/selectors.js.map +1 -1
- package/build/utils/order-inserter-block-items.js +41 -0
- package/build/utils/order-inserter-block-items.js.map +1 -0
- package/build/utils/use-should-contextual-toolbar-show.js +16 -12
- package/build/utils/use-should-contextual-toolbar-show.js.map +1 -1
- package/build-module/autocompleters/block.js +12 -5
- package/build-module/autocompleters/block.js.map +1 -1
- package/build-module/components/block-breadcrumb/index.js +5 -3
- package/build-module/components/block-breadcrumb/index.js.map +1 -1
- package/build-module/components/block-controls/slot.js +11 -4
- package/build-module/components/block-controls/slot.js.map +1 -1
- package/build-module/components/block-controls/slot.native.js +9 -1
- package/build-module/components/block-controls/slot.native.js.map +1 -1
- package/build-module/components/block-draggable/index.js +10 -6
- package/build-module/components/block-draggable/index.js.map +1 -1
- package/build-module/components/block-draggable/use-scroll-when-dragging.js +2 -2
- package/build-module/components/block-draggable/use-scroll-when-dragging.js.map +1 -1
- package/build-module/components/block-editing-mode/index.js +72 -0
- package/build-module/components/block-editing-mode/index.js.map +1 -0
- package/build-module/components/block-list/block-invalid-warning.native.js +16 -8
- package/build-module/components/block-list/block-invalid-warning.native.js.map +1 -1
- package/build-module/components/block-list/block-list-block-context.js +6 -0
- package/build-module/components/block-list/block-list-block-context.js.map +1 -0
- package/build-module/components/block-list/block-list-item-cell.native.js +13 -2
- package/build-module/components/block-list/block-list-item-cell.native.js.map +1 -1
- package/build-module/components/block-list/block-list-item.native.js +160 -190
- package/build-module/components/block-list/block-list-item.native.js.map +1 -1
- package/build-module/components/block-list/block-outline.native.js +44 -0
- package/build-module/components/block-list/block-outline.native.js.map +1 -0
- package/build-module/components/block-list/block.js +26 -34
- package/build-module/components/block-list/block.js.map +1 -1
- package/build-module/components/block-list/block.native.js +345 -310
- package/build-module/components/block-list/block.native.js.map +1 -1
- package/build-module/components/block-list/index.native.js +263 -355
- package/build-module/components/block-list/index.native.js.map +1 -1
- package/build-module/components/block-list/insertion-point.native.js +4 -2
- package/build-module/components/block-list/insertion-point.native.js.map +1 -1
- package/build-module/components/block-list/use-block-props/index.js +1 -1
- package/build-module/components/block-list/use-block-props/index.js.map +1 -1
- package/build-module/components/block-list/use-in-between-inserter.js +6 -5
- package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
- package/build-module/components/block-list-appender/index.js +15 -1
- package/build-module/components/block-list-appender/index.js.map +1 -1
- package/build-module/components/block-mobile-toolbar/block-actions-menu.native.js +18 -4
- package/build-module/components/block-mobile-toolbar/block-actions-menu.native.js.map +1 -1
- package/build-module/components/block-settings-menu/block-settings-dropdown.js +8 -9
- package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build-module/components/block-settings-menu-controls/index.js +13 -5
- package/build-module/components/block-settings-menu-controls/index.js.map +1 -1
- package/build-module/components/block-styles/preview-panel.js +1 -2
- package/build-module/components/block-styles/preview-panel.js.map +1 -1
- package/build-module/components/block-switcher/block-transformations-menu.js +7 -0
- package/build-module/components/block-switcher/block-transformations-menu.js.map +1 -1
- package/build-module/components/block-switcher/block-variation-transformations.js +108 -0
- package/build-module/components/block-switcher/block-variation-transformations.js.map +1 -0
- package/build-module/components/block-switcher/index.js +33 -12
- package/build-module/components/block-switcher/index.js.map +1 -1
- package/build-module/components/block-switcher/pattern-transformations-menu.js +3 -3
- package/build-module/components/block-switcher/pattern-transformations-menu.js.map +1 -1
- package/build-module/components/block-toolbar/index.js +8 -7
- package/build-module/components/block-toolbar/index.js.map +1 -1
- package/build-module/components/block-tools/block-contextual-toolbar.js +22 -65
- package/build-module/components/block-tools/block-contextual-toolbar.js.map +1 -1
- package/build-module/components/block-tools/insertion-point.js +11 -5
- package/build-module/components/block-tools/insertion-point.js.map +1 -1
- package/build-module/components/block-tools/selected-block-popover.js +3 -7
- package/build-module/components/block-tools/selected-block-popover.js.map +1 -1
- package/build-module/components/colors-gradients/use-multiple-origin-colors-and-gradients.js +3 -2
- package/build-module/components/colors-gradients/use-multiple-origin-colors-and-gradients.js.map +1 -1
- package/build-module/components/convert-to-group-buttons/index.js +7 -2
- package/build-module/components/convert-to-group-buttons/index.js.map +1 -1
- package/build-module/components/convert-to-group-buttons/index.native.js +76 -1
- package/build-module/components/convert-to-group-buttons/index.native.js.map +1 -1
- package/build-module/components/convert-to-group-buttons/use-convert-to-group-button-props.js +22 -36
- package/build-module/components/convert-to-group-buttons/use-convert-to-group-button-props.js.map +1 -1
- package/build-module/components/global-styles/advanced-panel.js +74 -0
- package/build-module/components/global-styles/advanced-panel.js.map +1 -0
- package/build-module/components/global-styles/color-panel.js +5 -2
- package/build-module/components/global-styles/color-panel.js.map +1 -1
- package/build-module/components/global-styles/dimensions-panel.js +9 -8
- package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
- package/build-module/components/global-styles/hooks.js +1 -2
- package/build-module/components/global-styles/hooks.js.map +1 -1
- package/build-module/components/global-styles/index.js +3 -1
- package/build-module/components/global-styles/index.js.map +1 -1
- package/build-module/components/global-styles/typography-panel.js +1 -1
- package/build-module/components/global-styles/typography-panel.js.map +1 -1
- package/build-module/components/global-styles/use-global-styles-output.js +25 -4
- package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build-module/components/global-styles/utils.js +25 -0
- package/build-module/components/global-styles/utils.js.map +1 -1
- package/build-module/components/iframe/index.js +15 -8
- package/build-module/components/iframe/index.js.map +1 -1
- package/build-module/components/image-editor/use-save-image.js +24 -8
- package/build-module/components/image-editor/use-save-image.js.map +1 -1
- package/build-module/components/inner-blocks/index.js +2 -1
- package/build-module/components/inner-blocks/index.js.map +1 -1
- package/build-module/components/inner-blocks/index.native.js +7 -6
- package/build-module/components/inner-blocks/index.native.js.map +1 -1
- package/build-module/components/inner-blocks/use-nested-settings-update.js +13 -5
- package/build-module/components/inner-blocks/use-nested-settings-update.js.map +1 -1
- package/build-module/components/inserter/index.js +3 -7
- package/build-module/components/inserter/index.js.map +1 -1
- package/build-module/components/inserter/quick-inserter.js +2 -4
- package/build-module/components/inserter/quick-inserter.js.map +1 -1
- package/build-module/components/inserter/search-results.js +16 -6
- package/build-module/components/inserter/search-results.js.map +1 -1
- package/build-module/components/inserter-draggable-blocks/index.js +4 -0
- package/build-module/components/inserter-draggable-blocks/index.js.map +1 -1
- package/build-module/components/inspector-controls/fill.js +1 -1
- package/build-module/components/inspector-controls/fill.js.map +1 -1
- package/build-module/components/inspector-controls/fill.native.js +1 -1
- package/build-module/components/inspector-controls/fill.native.js.map +1 -1
- package/build-module/components/inspector-controls/slot.js +4 -7
- package/build-module/components/inspector-controls/slot.js.map +1 -1
- package/build-module/components/inspector-controls/slot.native.js +1 -1
- package/build-module/components/inspector-controls/slot.native.js.map +1 -1
- package/build-module/components/line-height-control/index.js +7 -2
- package/build-module/components/line-height-control/index.js.map +1 -1
- package/build-module/components/link-control/use-internal-input-value.js +9 -8
- package/build-module/components/link-control/use-internal-input-value.js.map +1 -1
- package/build-module/components/list-view/appender.js +6 -2
- package/build-module/components/list-view/appender.js.map +1 -1
- package/build-module/components/list-view/block-contents.js +9 -3
- package/build-module/components/list-view/block-contents.js.map +1 -1
- package/build-module/components/list-view/block-select-button.js +2 -1
- package/build-module/components/list-view/block-select-button.js.map +1 -1
- package/build-module/components/list-view/block.js +24 -29
- package/build-module/components/list-view/block.js.map +1 -1
- package/build-module/components/list-view/branch.js +1 -3
- package/build-module/components/list-view/branch.js.map +1 -1
- package/build-module/components/list-view/index.js +44 -23
- package/build-module/components/list-view/index.js.map +1 -1
- package/build-module/components/list-view/use-list-view-client-ids.js +26 -3
- package/build-module/components/list-view/use-list-view-client-ids.js.map +1 -1
- package/build-module/components/list-view/use-list-view-drop-zone.js +160 -11
- package/build-module/components/list-view/use-list-view-drop-zone.js.map +1 -1
- package/build-module/components/media-placeholder/index.js +66 -7
- package/build-module/components/media-placeholder/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/preview-options/index.js +7 -2
- package/build-module/components/preview-options/index.js.map +1 -1
- package/build-module/components/publish-date-time-picker/index.js +0 -2
- package/build-module/components/publish-date-time-picker/index.js.map +1 -1
- package/build-module/components/spacing-sizes-control/spacing-input-control.js +1 -1
- package/build-module/components/spacing-sizes-control/spacing-input-control.js.map +1 -1
- package/build-module/components/url-input/index.js +4 -2
- package/build-module/components/url-input/index.js.map +1 -1
- package/build-module/components/use-block-drop-zone/index.js +25 -16
- package/build-module/components/use-block-drop-zone/index.js.map +1 -1
- package/build-module/components/use-resize-canvas/index.js +8 -1
- package/build-module/components/use-resize-canvas/index.js.map +1 -1
- package/build-module/components/writing-flow/use-arrow-nav.js +13 -7
- package/build-module/components/writing-flow/use-arrow-nav.js.map +1 -1
- package/build-module/hooks/align.js +4 -7
- package/build-module/hooks/align.js.map +1 -1
- package/build-module/hooks/behaviors.js +97 -0
- package/build-module/hooks/behaviors.js.map +1 -0
- package/build-module/hooks/border.js +1 -1
- package/build-module/hooks/border.js.map +1 -1
- package/build-module/hooks/color.js +1 -1
- package/build-module/hooks/color.js.map +1 -1
- package/build-module/hooks/content-lock-ui.js +8 -11
- package/build-module/hooks/content-lock-ui.js.map +1 -1
- package/build-module/hooks/dimensions.js +0 -28
- package/build-module/hooks/dimensions.js.map +1 -1
- package/build-module/hooks/duotone.js +4 -7
- package/build-module/hooks/duotone.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/index.native.js +1 -0
- package/build-module/hooks/index.native.js.map +1 -1
- package/build-module/hooks/layout.js +9 -11
- package/build-module/hooks/layout.js.map +1 -1
- package/build-module/hooks/position.js +1 -1
- package/build-module/hooks/position.js.map +1 -1
- package/build-module/hooks/style.js +1 -1
- package/build-module/hooks/style.js.map +1 -1
- package/build-module/hooks/use-editor-wrapper-styles.native.js +242 -0
- package/build-module/hooks/use-editor-wrapper-styles.native.js.map +1 -0
- package/build-module/hooks/use-typography-props.js +14 -10
- package/build-module/hooks/use-typography-props.js.map +1 -1
- package/build-module/index.native.js +6 -0
- package/build-module/index.native.js.map +1 -0
- package/build-module/private-apis.js +3 -5
- package/build-module/private-apis.js.map +1 -1
- package/build-module/store/private-actions.js +42 -0
- package/build-module/store/private-actions.js.map +1 -1
- package/build-module/store/private-selectors.js +79 -0
- package/build-module/store/private-selectors.js.map +1 -1
- package/build-module/store/reducer.js +34 -1
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +26 -17
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/utils/order-inserter-block-items.js +32 -0
- package/build-module/utils/order-inserter-block-items.js.map +1 -0
- package/build-module/utils/use-should-contextual-toolbar-show.js +16 -12
- package/build-module/utils/use-should-contextual-toolbar-show.js.map +1 -1
- package/build-style/content-rtl.css +32 -14
- package/build-style/content.css +32 -14
- package/build-style/default-editor-styles-rtl.css +1 -1
- package/build-style/default-editor-styles.css +1 -1
- package/build-style/style-rtl.css +56 -77
- package/build-style/style.css +57 -77
- package/package.json +32 -31
- package/src/autocompleters/block.js +15 -7
- package/src/components/block-breadcrumb/index.js +11 -3
- package/src/components/block-breadcrumb/style.scss +2 -1
- package/src/components/block-controls/slot.js +8 -4
- package/src/components/block-controls/slot.native.js +6 -1
- package/src/components/block-draggable/index.js +10 -6
- package/src/components/block-draggable/use-scroll-when-dragging.js +8 -2
- package/src/components/block-editing-mode/index.js +71 -0
- package/src/components/block-list/block-invalid-warning.native.js +17 -9
- package/src/components/block-list/block-list-block-context.js +6 -0
- package/src/components/block-list/block-list-item-cell.native.js +10 -1
- package/src/components/block-list/block-list-item.native.js +180 -208
- package/src/components/block-list/block-outline.native.js +58 -0
- package/src/components/block-list/block.js +38 -56
- package/src/components/block-list/block.native.js +531 -501
- package/src/components/block-list/content.scss +5 -6
- package/src/components/block-list/index.native.js +324 -382
- package/src/components/block-list/insertion-point.native.js +2 -2
- package/src/components/block-list/test/block-invalid-warning.native.js +48 -0
- package/src/components/block-list/test/index.native.js +205 -0
- package/src/components/block-list/use-block-props/index.js +1 -1
- package/src/components/block-list/use-in-between-inserter.js +7 -3
- package/src/components/block-list-appender/index.js +22 -4
- package/src/components/block-mobile-toolbar/block-actions-menu.native.js +26 -1
- package/src/components/block-mover/style.scss +1 -0
- package/src/components/block-pattern-setup/style.scss +1 -4
- package/src/components/block-patterns-list/style.scss +1 -4
- package/src/components/block-settings-menu/block-settings-dropdown.js +10 -17
- package/src/components/block-settings-menu-controls/index.js +24 -4
- package/src/components/block-styles/preview-panel.js +1 -3
- package/src/components/block-styles/style.scss +4 -4
- package/src/components/block-switcher/block-transformations-menu.js +12 -0
- package/src/components/block-switcher/block-variation-transformations.js +115 -0
- package/src/components/block-switcher/index.js +38 -5
- package/src/components/block-switcher/pattern-transformations-menu.js +5 -5
- package/src/components/block-switcher/style.scss +6 -5
- package/src/components/block-toolbar/index.js +10 -11
- package/src/components/block-tools/block-contextual-toolbar.js +32 -67
- package/src/components/block-tools/insertion-point.js +23 -9
- package/src/components/block-tools/selected-block-popover.js +3 -5
- package/src/components/block-tools/style.scss +8 -0
- package/src/components/button-block-appender/content.scss +22 -0
- package/src/components/colors-gradients/use-multiple-origin-colors-and-gradients.js +16 -2
- package/src/components/convert-to-group-buttons/index.js +9 -2
- package/src/components/convert-to-group-buttons/index.native.js +79 -1
- package/src/components/convert-to-group-buttons/use-convert-to-group-button-props.js +32 -38
- package/src/components/global-styles/advanced-panel.js +82 -0
- package/src/components/global-styles/color-panel.js +6 -1
- package/src/components/global-styles/dimensions-panel.js +9 -8
- package/src/components/global-styles/hooks.js +1 -5
- package/src/components/global-styles/index.js +6 -1
- package/src/components/global-styles/style.scss +17 -0
- package/src/components/global-styles/test/utils.js +57 -1
- package/src/components/global-styles/typography-panel.js +1 -1
- package/src/components/global-styles/use-global-styles-output.js +21 -3
- package/src/components/global-styles/utils.js +27 -0
- package/src/components/iframe/index.js +22 -12
- package/src/components/image-editor/use-save-image.js +20 -9
- package/src/components/inner-blocks/README.md +5 -0
- package/src/components/inner-blocks/index.js +2 -0
- package/src/components/inner-blocks/index.native.js +16 -6
- package/src/components/inner-blocks/use-nested-settings-update.js +20 -3
- package/src/components/inserter/index.js +1 -9
- package/src/components/inserter/quick-inserter.js +0 -2
- package/src/components/inserter/search-results.js +32 -6
- package/src/components/inserter-draggable-blocks/index.js +4 -0
- package/src/components/inspector-controls/fill.js +1 -1
- package/src/components/inspector-controls/fill.native.js +1 -1
- package/src/components/inspector-controls/slot.js +4 -9
- package/src/components/inspector-controls/slot.native.js +1 -1
- package/src/components/line-height-control/index.js +7 -2
- package/src/components/line-height-control/stories/index.js +1 -1
- package/src/components/link-control/test/index.js +42 -0
- package/src/components/link-control/use-internal-input-value.js +8 -7
- package/src/components/list-view/appender.js +3 -2
- package/src/components/list-view/block-contents.js +32 -20
- package/src/components/list-view/block-select-button.js +5 -1
- package/src/components/list-view/block.js +34 -37
- package/src/components/list-view/branch.js +1 -7
- package/src/components/list-view/index.js +42 -17
- package/src/components/list-view/style.scss +7 -7
- package/src/components/list-view/test/use-list-view-drop-zone.js +88 -12
- package/src/components/list-view/use-list-view-client-ids.js +21 -4
- package/src/components/list-view/use-list-view-drop-zone.js +194 -11
- package/src/components/media-placeholder/index.js +74 -1
- package/src/components/multi-selection-inspector/index.js +2 -2
- package/src/components/preview-options/index.js +9 -2
- package/src/components/publish-date-time-picker/index.js +0 -2
- package/src/components/spacing-sizes-control/spacing-input-control.js +1 -0
- package/src/components/url-input/README.md +6 -0
- package/src/components/url-input/index.js +2 -2
- package/src/components/use-block-drop-zone/index.js +31 -17
- package/src/components/use-resize-canvas/index.js +9 -1
- package/src/components/writing-flow/test/index.js +15 -0
- package/src/components/writing-flow/use-arrow-nav.js +17 -4
- package/src/hooks/align.js +5 -12
- package/src/hooks/behaviors.js +104 -0
- package/src/hooks/border.js +2 -1
- package/src/hooks/color.js +2 -1
- package/src/hooks/content-lock-ui.js +3 -15
- package/src/hooks/dimensions.js +0 -40
- package/src/hooks/duotone.js +4 -11
- package/src/hooks/index.js +1 -0
- package/src/hooks/index.native.js +1 -0
- package/src/hooks/layout.js +14 -20
- package/src/hooks/position.js +2 -1
- package/src/hooks/style.js +2 -1
- package/src/hooks/test/use-editor-wrapper-styles.native.js +282 -0
- package/src/hooks/test/use-typography-props.js +47 -2
- package/src/hooks/use-editor-wrapper-styles.native.js +250 -0
- package/src/hooks/use-editor-wrapper-styles.native.scss +11 -0
- package/src/hooks/use-typography-props.js +10 -11
- package/src/index.native.js +6 -0
- package/src/private-apis.js +2 -4
- package/src/store/private-actions.js +39 -0
- package/src/store/private-selectors.js +95 -0
- package/src/store/reducer.js +27 -0
- package/src/store/selectors.js +25 -15
- package/src/store/test/private-actions.js +32 -1
- package/src/store/test/private-selectors.js +158 -0
- package/src/store/test/reducer.js +48 -0
- package/src/style.scss +0 -3
- package/src/utils/order-inserter-block-items.js +26 -0
- package/src/utils/use-should-contextual-toolbar-show.js +19 -9
- package/tsconfig.json +1 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/build/components/block-list/block-list-compact.native.js +0 -75
- package/build/components/block-list/block-list-compact.native.js.map +0 -1
- package/build/components/off-canvas-editor/appender.js +0 -125
- package/build/components/off-canvas-editor/appender.js.map +0 -1
- package/build/components/off-canvas-editor/block-contents.js +0 -141
- package/build/components/off-canvas-editor/block-contents.js.map +0 -1
- package/build/components/off-canvas-editor/block-select-button.js +0 -126
- package/build/components/off-canvas-editor/block-select-button.js.map +0 -1
- package/build/components/off-canvas-editor/block.js +0 -297
- package/build/components/off-canvas-editor/block.js.map +0 -1
- package/build/components/off-canvas-editor/branch.js +0 -197
- package/build/components/off-canvas-editor/branch.js.map +0 -1
- package/build/components/off-canvas-editor/context.js +0 -19
- package/build/components/off-canvas-editor/context.js.map +0 -1
- package/build/components/off-canvas-editor/drop-indicator.js +0 -118
- package/build/components/off-canvas-editor/drop-indicator.js.map +0 -1
- package/build/components/off-canvas-editor/expander.js +0 -41
- package/build/components/off-canvas-editor/expander.js.map +0 -1
- package/build/components/off-canvas-editor/index.js +0 -236
- package/build/components/off-canvas-editor/index.js.map +0 -1
- package/build/components/off-canvas-editor/leaf-more-menu.js +0 -146
- package/build/components/off-canvas-editor/leaf-more-menu.js.map +0 -1
- package/build/components/off-canvas-editor/leaf.js +0 -60
- package/build/components/off-canvas-editor/leaf.js.map +0 -1
- package/build/components/off-canvas-editor/link-ui.js +0 -186
- package/build/components/off-canvas-editor/link-ui.js.map +0 -1
- package/build/components/off-canvas-editor/update-attributes.js +0 -108
- package/build/components/off-canvas-editor/update-attributes.js.map +0 -1
- package/build/components/off-canvas-editor/use-block-selection.js +0 -139
- package/build/components/off-canvas-editor/use-block-selection.js.map +0 -1
- package/build/components/off-canvas-editor/use-inserted-block.js +0 -58
- package/build/components/off-canvas-editor/use-inserted-block.js.map +0 -1
- package/build/components/off-canvas-editor/use-list-view-client-ids.js +0 -33
- package/build/components/off-canvas-editor/use-list-view-client-ids.js.map +0 -1
- package/build/components/off-canvas-editor/use-list-view-drop-zone.js +0 -235
- package/build/components/off-canvas-editor/use-list-view-drop-zone.js.map +0 -1
- package/build/components/off-canvas-editor/use-list-view-expand-selected-item.js +0 -60
- package/build/components/off-canvas-editor/use-list-view-expand-selected-item.js.map +0 -1
- package/build/components/off-canvas-editor/utils.js +0 -60
- package/build/components/off-canvas-editor/utils.js.map +0 -1
- package/build-module/components/block-list/block-list-compact.native.js +0 -60
- package/build-module/components/block-list/block-list-compact.native.js.map +0 -1
- package/build-module/components/off-canvas-editor/appender.js +0 -108
- package/build-module/components/off-canvas-editor/appender.js.map +0 -1
- package/build-module/components/off-canvas-editor/block-contents.js +0 -121
- package/build-module/components/off-canvas-editor/block-contents.js.map +0 -1
- package/build-module/components/off-canvas-editor/block-select-button.js +0 -107
- package/build-module/components/off-canvas-editor/block-select-button.js.map +0 -1
- package/build-module/components/off-canvas-editor/block.js +0 -273
- package/build-module/components/off-canvas-editor/block.js.map +0 -1
- package/build-module/components/off-canvas-editor/branch.js +0 -179
- package/build-module/components/off-canvas-editor/branch.js.map +0 -1
- package/build-module/components/off-canvas-editor/context.js +0 -7
- package/build-module/components/off-canvas-editor/context.js.map +0 -1
- package/build-module/components/off-canvas-editor/drop-indicator.js +0 -111
- package/build-module/components/off-canvas-editor/drop-indicator.js.map +0 -1
- package/build-module/components/off-canvas-editor/expander.js +0 -32
- package/build-module/components/off-canvas-editor/expander.js.map +0 -1
- package/build-module/components/off-canvas-editor/index.js +0 -213
- package/build-module/components/off-canvas-editor/index.js.map +0 -1
- package/build-module/components/off-canvas-editor/leaf-more-menu.js +0 -128
- package/build-module/components/off-canvas-editor/leaf-more-menu.js.map +0 -1
- package/build-module/components/off-canvas-editor/leaf.js +0 -45
- package/build-module/components/off-canvas-editor/leaf.js.map +0 -1
- package/build-module/components/off-canvas-editor/link-ui.js +0 -166
- package/build-module/components/off-canvas-editor/link-ui.js.map +0 -1
- package/build-module/components/off-canvas-editor/update-attributes.js +0 -97
- package/build-module/components/off-canvas-editor/update-attributes.js.map +0 -1
- package/build-module/components/off-canvas-editor/use-block-selection.js +0 -124
- package/build-module/components/off-canvas-editor/use-block-selection.js.map +0 -1
- package/build-module/components/off-canvas-editor/use-inserted-block.js +0 -47
- package/build-module/components/off-canvas-editor/use-inserted-block.js.map +0 -1
- package/build-module/components/off-canvas-editor/use-list-view-client-ids.js +0 -24
- package/build-module/components/off-canvas-editor/use-list-view-client-ids.js.map +0 -1
- package/build-module/components/off-canvas-editor/use-list-view-drop-zone.js +0 -220
- package/build-module/components/off-canvas-editor/use-list-view-drop-zone.js.map +0 -1
- package/build-module/components/off-canvas-editor/use-list-view-expand-selected-item.js +0 -50
- package/build-module/components/off-canvas-editor/use-list-view-expand-selected-item.js.map +0 -1
- package/build-module/components/off-canvas-editor/utils.js +0 -44
- package/build-module/components/off-canvas-editor/utils.js.map +0 -1
- package/src/components/block-list/block-list-compact.native.js +0 -63
- package/src/components/off-canvas-editor/README.md +0 -5
- package/src/components/off-canvas-editor/appender.js +0 -124
- package/src/components/off-canvas-editor/block-contents.js +0 -156
- package/src/components/off-canvas-editor/block-select-button.js +0 -128
- package/src/components/off-canvas-editor/block.js +0 -347
- package/src/components/off-canvas-editor/branch.js +0 -238
- package/src/components/off-canvas-editor/context.js +0 -8
- package/src/components/off-canvas-editor/drop-indicator.js +0 -126
- package/src/components/off-canvas-editor/expander.js +0 -26
- package/src/components/off-canvas-editor/index.js +0 -271
- package/src/components/off-canvas-editor/leaf-more-menu.js +0 -157
- package/src/components/off-canvas-editor/leaf.js +0 -52
- package/src/components/off-canvas-editor/link-ui.js +0 -167
- package/src/components/off-canvas-editor/style.scss +0 -34
- package/src/components/off-canvas-editor/test/use-inserted-block.js +0 -108
- package/src/components/off-canvas-editor/test/utils.js +0 -50
- package/src/components/off-canvas-editor/update-attributes.js +0 -99
- package/src/components/off-canvas-editor/use-block-selection.js +0 -169
- package/src/components/off-canvas-editor/use-inserted-block.js +0 -47
- package/src/components/off-canvas-editor/use-list-view-client-ids.js +0 -29
- package/src/components/off-canvas-editor/use-list-view-drop-zone.js +0 -260
- package/src/components/off-canvas-editor/use-list-view-expand-selected-item.js +0 -58
- package/src/components/off-canvas-editor/utils.js +0 -58
|
@@ -14,7 +14,7 @@ import { withPreferredColorScheme } from '@wordpress/compose';
|
|
|
14
14
|
*/
|
|
15
15
|
import styles from './style.scss';
|
|
16
16
|
|
|
17
|
-
const BlockInsertionPoint = ( { getStylesFromColorScheme } ) => {
|
|
17
|
+
const BlockInsertionPoint = ( { getStylesFromColorScheme, testID } ) => {
|
|
18
18
|
const lineStyle = getStylesFromColorScheme(
|
|
19
19
|
styles.lineStyleAddHere,
|
|
20
20
|
styles.lineStyleAddHereDark
|
|
@@ -25,7 +25,7 @@ const BlockInsertionPoint = ( { getStylesFromColorScheme } ) => {
|
|
|
25
25
|
);
|
|
26
26
|
|
|
27
27
|
return (
|
|
28
|
-
<View style={ styles.containerStyleAddHere }>
|
|
28
|
+
<View style={ styles.containerStyleAddHere } testID={ testID }>
|
|
29
29
|
<View style={ lineStyle }></View>
|
|
30
30
|
<Text style={ labelStyle }>{ __( 'ADD BLOCK HERE' ) }</Text>
|
|
31
31
|
<View style={ lineStyle }></View>
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import {
|
|
5
|
+
fireEvent,
|
|
6
|
+
getBlock,
|
|
7
|
+
getEditorHtml,
|
|
8
|
+
initializeEditor,
|
|
9
|
+
setupCoreBlocks,
|
|
10
|
+
} from 'test/helpers';
|
|
11
|
+
|
|
12
|
+
setupCoreBlocks();
|
|
13
|
+
|
|
14
|
+
describe( 'Block invalid warning', () => {
|
|
15
|
+
it( 'shows invalid placeholder', async () => {
|
|
16
|
+
// Arrange
|
|
17
|
+
const screen = await initializeEditor( {
|
|
18
|
+
initialHtml: `<!-- wp:spacer -->
|
|
19
|
+
<div styless="height:100px" aria-hidden="true" class="wp-block-spacer"></div>
|
|
20
|
+
<!-- /wp:spacer -->`,
|
|
21
|
+
} );
|
|
22
|
+
|
|
23
|
+
// Assert
|
|
24
|
+
const warningElement = screen.getByText( /Problem displaying block./ );
|
|
25
|
+
expect( warningElement ).toBeVisible();
|
|
26
|
+
} );
|
|
27
|
+
|
|
28
|
+
it( 'recovers a block successfully', async () => {
|
|
29
|
+
// Arrange
|
|
30
|
+
const screen = await initializeEditor( {
|
|
31
|
+
initialHtml: `<!-- wp:spacer -->
|
|
32
|
+
<div styless="height:100px" aria-hidden="true" class="wp-block-spacer"></div>
|
|
33
|
+
<!-- /wp:spacer -->`,
|
|
34
|
+
} );
|
|
35
|
+
|
|
36
|
+
// Act
|
|
37
|
+
fireEvent.press( screen.getByText( /Problem displaying block./ ) );
|
|
38
|
+
const spacerBlock = getBlock( screen, 'Spacer' );
|
|
39
|
+
fireEvent.press( spacerBlock );
|
|
40
|
+
|
|
41
|
+
// Assert
|
|
42
|
+
expect( getEditorHtml() ).toMatchInlineSnapshot( `
|
|
43
|
+
"<!-- wp:spacer -->
|
|
44
|
+
<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>
|
|
45
|
+
<!-- /wp:spacer -->"
|
|
46
|
+
` );
|
|
47
|
+
} );
|
|
48
|
+
} );
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import {
|
|
5
|
+
addBlock,
|
|
6
|
+
getBlock,
|
|
7
|
+
fireEvent,
|
|
8
|
+
initializeEditor,
|
|
9
|
+
screen,
|
|
10
|
+
setupCoreBlocks,
|
|
11
|
+
triggerBlockListLayout,
|
|
12
|
+
within,
|
|
13
|
+
} from 'test/helpers';
|
|
14
|
+
|
|
15
|
+
setupCoreBlocks();
|
|
16
|
+
|
|
17
|
+
describe( 'BlockList', () => {
|
|
18
|
+
describe( 'when empty', () => {
|
|
19
|
+
beforeEach( async () => {
|
|
20
|
+
// Arrange
|
|
21
|
+
await initializeEditor();
|
|
22
|
+
} );
|
|
23
|
+
|
|
24
|
+
it( 'renders a post title', async () => {
|
|
25
|
+
// Assert
|
|
26
|
+
expect( screen.getByPlaceholderText( 'Add title' ) ).toBeTruthy();
|
|
27
|
+
} );
|
|
28
|
+
|
|
29
|
+
it( 'renders a block appender as a content placeholder', async () => {
|
|
30
|
+
// Act
|
|
31
|
+
const appender = screen.getByPlaceholderText( /Start writing/ );
|
|
32
|
+
fireEvent.press( appender );
|
|
33
|
+
|
|
34
|
+
// Assert
|
|
35
|
+
expect( await getBlock( screen, 'Paragraph' ) ).toBeVisible();
|
|
36
|
+
} );
|
|
37
|
+
|
|
38
|
+
it( 'renders an end-of-list paragraph appender', async () => {
|
|
39
|
+
// Act
|
|
40
|
+
const appender = screen.getByLabelText( 'Add paragraph block' );
|
|
41
|
+
fireEvent.press( appender );
|
|
42
|
+
|
|
43
|
+
// Assert
|
|
44
|
+
expect( await getBlock( screen, 'Paragraph' ) ).toBeVisible();
|
|
45
|
+
} );
|
|
46
|
+
} );
|
|
47
|
+
|
|
48
|
+
describe( 'when not empty', () => {
|
|
49
|
+
it( 'renders a footer appender', async () => {
|
|
50
|
+
// Arrange
|
|
51
|
+
await initializeEditor();
|
|
52
|
+
await addBlock( screen, 'Social Icons' );
|
|
53
|
+
const socialLinksBlock = await getBlock( screen, 'Social Icons' );
|
|
54
|
+
fireEvent.press( socialLinksBlock );
|
|
55
|
+
await triggerBlockListLayout( socialLinksBlock );
|
|
56
|
+
|
|
57
|
+
// Act
|
|
58
|
+
fireEvent.press(
|
|
59
|
+
within( socialLinksBlock ).getByTestId( 'appender-button' )
|
|
60
|
+
);
|
|
61
|
+
const blockList = screen.getByTestId( 'InserterUI-Blocks' );
|
|
62
|
+
fireEvent.scroll( blockList, {
|
|
63
|
+
nativeEvent: {
|
|
64
|
+
contentOffset: { y: 0, x: 0 },
|
|
65
|
+
contentSize: { width: 100, height: 100 },
|
|
66
|
+
layoutMeasurement: { width: 100, height: 100 },
|
|
67
|
+
},
|
|
68
|
+
} );
|
|
69
|
+
fireEvent.press( await screen.findByText( 'Amazon' ) );
|
|
70
|
+
|
|
71
|
+
// Assert
|
|
72
|
+
const amazonSettings = await screen.findByTestId(
|
|
73
|
+
'navigation-screen-LinkSettingsScreen'
|
|
74
|
+
);
|
|
75
|
+
expect( amazonSettings ).toBeVisible();
|
|
76
|
+
} );
|
|
77
|
+
} );
|
|
78
|
+
|
|
79
|
+
describe( 'for inner blocks', () => {
|
|
80
|
+
it( 'renders an inner block appender', async () => {
|
|
81
|
+
// Arrange
|
|
82
|
+
await initializeEditor();
|
|
83
|
+
await addBlock( screen, 'Group' );
|
|
84
|
+
const groupBlock = await getBlock( screen, 'Group' );
|
|
85
|
+
await triggerBlockListLayout( groupBlock );
|
|
86
|
+
|
|
87
|
+
// Assert
|
|
88
|
+
expect(
|
|
89
|
+
within( groupBlock ).getByTestId( 'appender-button' )
|
|
90
|
+
).toBeTruthy();
|
|
91
|
+
} );
|
|
92
|
+
|
|
93
|
+
describe( 'when a non-last block is selected', () => {
|
|
94
|
+
beforeEach( async () => {
|
|
95
|
+
// Arrange
|
|
96
|
+
await initializeEditor();
|
|
97
|
+
await addBlock( screen, 'Group' );
|
|
98
|
+
const groupBlock = await getBlock( screen, 'Group' );
|
|
99
|
+
fireEvent.press(
|
|
100
|
+
within( groupBlock ).getByTestId( 'appender-button' )
|
|
101
|
+
);
|
|
102
|
+
await addBlock( screen, 'Paragraph', { isPickerOpened: true } );
|
|
103
|
+
fireEvent.press( screen.getByLabelText( 'Navigate Up' ) );
|
|
104
|
+
fireEvent.press(
|
|
105
|
+
within( groupBlock ).getByTestId( 'appender-button' )
|
|
106
|
+
);
|
|
107
|
+
await addBlock( screen, 'Paragraph', { isPickerOpened: true } );
|
|
108
|
+
} );
|
|
109
|
+
|
|
110
|
+
it( 'renders an insertion point before the block', async () => {
|
|
111
|
+
// Act
|
|
112
|
+
const paragraphBlock = await getBlock( screen, 'Paragraph', {
|
|
113
|
+
rowIndex: 1,
|
|
114
|
+
} );
|
|
115
|
+
fireEvent.press( paragraphBlock );
|
|
116
|
+
fireEvent( screen.getByLabelText( 'Add block' ), 'longPress' );
|
|
117
|
+
fireEvent.press( screen.getByText( 'Add Block Before' ) );
|
|
118
|
+
|
|
119
|
+
// Assert
|
|
120
|
+
expect( screen.getByText( 'ADD BLOCK HERE' ) ).toBeTruthy();
|
|
121
|
+
expect(
|
|
122
|
+
screen.getByTestId( 'block-insertion-point-before-row-1' )
|
|
123
|
+
).toBeTruthy();
|
|
124
|
+
} );
|
|
125
|
+
|
|
126
|
+
it( 'renders an insertion point after the block', async () => {
|
|
127
|
+
// Act
|
|
128
|
+
const paragraphBlock = await getBlock( screen, 'Paragraph', {
|
|
129
|
+
rowIndex: 1,
|
|
130
|
+
} );
|
|
131
|
+
fireEvent.press( paragraphBlock );
|
|
132
|
+
fireEvent( screen.getByLabelText( 'Add block' ), 'longPress' );
|
|
133
|
+
fireEvent.press( screen.getByText( 'Add Block After' ) );
|
|
134
|
+
|
|
135
|
+
// Assert
|
|
136
|
+
expect( screen.getByText( 'ADD BLOCK HERE' ) ).toBeTruthy();
|
|
137
|
+
expect(
|
|
138
|
+
screen.getByTestId( 'block-insertion-point-before-row-2' )
|
|
139
|
+
).toBeTruthy();
|
|
140
|
+
} );
|
|
141
|
+
} );
|
|
142
|
+
|
|
143
|
+
describe( 'when the last block is selected', () => {
|
|
144
|
+
it( 'renders an insertion point before the block', async () => {
|
|
145
|
+
// Arrange
|
|
146
|
+
await initializeEditor();
|
|
147
|
+
await addBlock( screen, 'Group' );
|
|
148
|
+
const groupBlock = await getBlock( screen, 'Group' );
|
|
149
|
+
fireEvent.press(
|
|
150
|
+
within( groupBlock ).getByTestId( 'appender-button' )
|
|
151
|
+
);
|
|
152
|
+
await addBlock( screen, 'Paragraph', { isPickerOpened: true } );
|
|
153
|
+
fireEvent.press( screen.getByLabelText( 'Navigate Up' ) );
|
|
154
|
+
fireEvent.press(
|
|
155
|
+
within( groupBlock ).getByTestId( 'appender-button' )
|
|
156
|
+
);
|
|
157
|
+
await addBlock( screen, 'Paragraph', { isPickerOpened: true } );
|
|
158
|
+
|
|
159
|
+
// Act
|
|
160
|
+
const paragraphBlock = await getBlock( screen, 'Paragraph', {
|
|
161
|
+
rowIndex: 2,
|
|
162
|
+
} );
|
|
163
|
+
fireEvent.press( paragraphBlock );
|
|
164
|
+
fireEvent( screen.getByLabelText( 'Add block' ), 'longPress' );
|
|
165
|
+
fireEvent.press( screen.getByText( 'Add Block Before' ) );
|
|
166
|
+
|
|
167
|
+
// Assert
|
|
168
|
+
expect( screen.getByText( 'ADD BLOCK HERE' ) ).toBeTruthy();
|
|
169
|
+
expect(
|
|
170
|
+
screen.getByTestId( 'block-insertion-point-before-row-2' )
|
|
171
|
+
).toBeTruthy();
|
|
172
|
+
} );
|
|
173
|
+
|
|
174
|
+
it( 'renders an insertion point after the block', async () => {
|
|
175
|
+
// Arrange
|
|
176
|
+
await initializeEditor();
|
|
177
|
+
await addBlock( screen, 'Group' );
|
|
178
|
+
const groupBlock = await getBlock( screen, 'Group' );
|
|
179
|
+
fireEvent.press(
|
|
180
|
+
within( groupBlock ).getByTestId( 'appender-button' )
|
|
181
|
+
);
|
|
182
|
+
await addBlock( screen, 'Paragraph', { isPickerOpened: true } );
|
|
183
|
+
fireEvent.press( screen.getByLabelText( 'Navigate Up' ) );
|
|
184
|
+
fireEvent.press(
|
|
185
|
+
within( groupBlock ).getByTestId( 'appender-button' )
|
|
186
|
+
);
|
|
187
|
+
await addBlock( screen, 'Paragraph', { isPickerOpened: true } );
|
|
188
|
+
|
|
189
|
+
// Act
|
|
190
|
+
const paragraphBlock = await getBlock( screen, 'Paragraph', {
|
|
191
|
+
rowIndex: 2,
|
|
192
|
+
} );
|
|
193
|
+
fireEvent.press( paragraphBlock );
|
|
194
|
+
fireEvent( screen.getByLabelText( 'Add block' ), 'longPress' );
|
|
195
|
+
fireEvent.press( screen.getByText( 'Add Block After' ) );
|
|
196
|
+
|
|
197
|
+
// Assert
|
|
198
|
+
expect( screen.getByText( 'ADD BLOCK HERE' ) ).toBeTruthy();
|
|
199
|
+
expect(
|
|
200
|
+
screen.getByTestId( 'block-insertion-point-after-row-2' )
|
|
201
|
+
).toBeTruthy();
|
|
202
|
+
} );
|
|
203
|
+
} );
|
|
204
|
+
} );
|
|
205
|
+
} );
|
|
@@ -21,7 +21,7 @@ import warning from '@wordpress/warning';
|
|
|
21
21
|
* Internal dependencies
|
|
22
22
|
*/
|
|
23
23
|
import useMovingAnimation from '../../use-moving-animation';
|
|
24
|
-
import { BlockListBlockContext } from '../block';
|
|
24
|
+
import { BlockListBlockContext } from '../block-list-block-context';
|
|
25
25
|
import { useFocusFirstElement } from './use-focus-first-element';
|
|
26
26
|
import { useIsHovered } from './use-is-hovered';
|
|
27
27
|
import { useBlockEditContext } from '../../block-edit/context';
|
|
@@ -11,6 +11,7 @@ import { isRTL } from '@wordpress/i18n';
|
|
|
11
11
|
*/
|
|
12
12
|
import { store as blockEditorStore } from '../../store';
|
|
13
13
|
import { InsertionPointOpenRef } from '../block-tools/insertion-point';
|
|
14
|
+
import { unlock } from '../../lock-unlock';
|
|
14
15
|
|
|
15
16
|
export function useInBetweenInserter() {
|
|
16
17
|
const openRef = useContext( InsertionPointOpenRef );
|
|
@@ -29,7 +30,8 @@ export function useInBetweenInserter() {
|
|
|
29
30
|
getSelectedBlockClientIds,
|
|
30
31
|
getTemplateLock,
|
|
31
32
|
__unstableIsWithinBlockOverlay,
|
|
32
|
-
|
|
33
|
+
getBlockEditingMode,
|
|
34
|
+
} = unlock( useSelect( blockEditorStore ) );
|
|
33
35
|
const { showInsertionPoint, hideInsertionPoint } =
|
|
34
36
|
useDispatch( blockEditorStore );
|
|
35
37
|
|
|
@@ -74,8 +76,10 @@ export function useInBetweenInserter() {
|
|
|
74
76
|
rootClientId = blockElement.getAttribute( 'data-block' );
|
|
75
77
|
}
|
|
76
78
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
+
if (
|
|
80
|
+
getTemplateLock( rootClientId ) ||
|
|
81
|
+
getBlockEditingMode( rootClientId ) === 'disabled'
|
|
82
|
+
) {
|
|
79
83
|
return;
|
|
80
84
|
}
|
|
81
85
|
|
|
@@ -85,6 +85,25 @@ function BlockListAppender( {
|
|
|
85
85
|
tagName: TagName = 'div',
|
|
86
86
|
} ) {
|
|
87
87
|
const appender = useAppender( rootClientId, renderAppender );
|
|
88
|
+
const isDragOver = useSelect(
|
|
89
|
+
( select ) => {
|
|
90
|
+
const {
|
|
91
|
+
getBlockInsertionPoint,
|
|
92
|
+
isBlockInsertionPointVisible,
|
|
93
|
+
getBlockCount,
|
|
94
|
+
} = select( blockEditorStore );
|
|
95
|
+
const insertionPoint = getBlockInsertionPoint();
|
|
96
|
+
// Ideally we should also check for `isDragging` but currently it
|
|
97
|
+
// requires a lot more setup. We can revisit this once we refactor
|
|
98
|
+
// the DnD utility hooks.
|
|
99
|
+
return (
|
|
100
|
+
isBlockInsertionPointVisible() &&
|
|
101
|
+
rootClientId === insertionPoint?.rootClientId &&
|
|
102
|
+
getBlockCount( rootClientId ) === 0
|
|
103
|
+
);
|
|
104
|
+
},
|
|
105
|
+
[ rootClientId ]
|
|
106
|
+
);
|
|
88
107
|
|
|
89
108
|
if ( ! appender ) {
|
|
90
109
|
return null;
|
|
@@ -101,10 +120,9 @@ function BlockListAppender( {
|
|
|
101
120
|
//
|
|
102
121
|
// See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#Clicking_and_focus
|
|
103
122
|
tabIndex={ -1 }
|
|
104
|
-
className={ classnames(
|
|
105
|
-
'
|
|
106
|
-
|
|
107
|
-
) }
|
|
123
|
+
className={ classnames( 'block-list-appender wp-block', className, {
|
|
124
|
+
'is-drag-over': isDragOver,
|
|
125
|
+
} ) }
|
|
108
126
|
// Needed in case the whole editor is content editable (for multi
|
|
109
127
|
// selection). It fixes an edge case where ArrowDown and ArrowRight
|
|
110
128
|
// should collapse the selection to the end of that selection and
|
|
@@ -39,6 +39,10 @@ import { store as coreStore } from '@wordpress/core-data';
|
|
|
39
39
|
import { getMoversSetup } from '../block-mover/mover-description';
|
|
40
40
|
import { store as blockEditorStore } from '../../store';
|
|
41
41
|
import BlockTransformationsMenu from '../block-switcher/block-transformations-menu';
|
|
42
|
+
import {
|
|
43
|
+
useConvertToGroupButtons,
|
|
44
|
+
useConvertToGroupButtonProps,
|
|
45
|
+
} from '../convert-to-group-buttons';
|
|
42
46
|
|
|
43
47
|
const BlockActionsMenu = ( {
|
|
44
48
|
// Select.
|
|
@@ -55,6 +59,7 @@ const BlockActionsMenu = ( {
|
|
|
55
59
|
rootClientId,
|
|
56
60
|
selectedBlockClientId,
|
|
57
61
|
selectedBlockPossibleTransformations,
|
|
62
|
+
canRemove,
|
|
58
63
|
// Dispatch.
|
|
59
64
|
createSuccessNotice,
|
|
60
65
|
convertToRegularBlocks,
|
|
@@ -93,6 +98,17 @@ const BlockActionsMenu = ( {
|
|
|
93
98
|
},
|
|
94
99
|
} = getMoversSetup( isStackedHorizontally, moversOptions );
|
|
95
100
|
|
|
101
|
+
// Check if selected block is Groupable and/or Ungroupable.
|
|
102
|
+
const convertToGroupButtonProps = useConvertToGroupButtonProps( [
|
|
103
|
+
selectedBlockClientId,
|
|
104
|
+
] );
|
|
105
|
+
const { isGroupable, isUngroupable } = convertToGroupButtonProps;
|
|
106
|
+
const showConvertToGroupButton =
|
|
107
|
+
( isGroupable || isUngroupable ) && canRemove;
|
|
108
|
+
const convertToGroupButtons = useConvertToGroupButtons( {
|
|
109
|
+
...convertToGroupButtonProps,
|
|
110
|
+
} );
|
|
111
|
+
|
|
96
112
|
const allOptions = {
|
|
97
113
|
settings: {
|
|
98
114
|
id: 'settingsOption',
|
|
@@ -229,7 +245,13 @@ const BlockActionsMenu = ( {
|
|
|
229
245
|
canDuplicate && allOptions.cutButton,
|
|
230
246
|
canDuplicate && isPasteEnabled && allOptions.pasteButton,
|
|
231
247
|
canDuplicate && allOptions.duplicateButton,
|
|
232
|
-
|
|
248
|
+
showConvertToGroupButton && isGroupable && convertToGroupButtons.group,
|
|
249
|
+
showConvertToGroupButton &&
|
|
250
|
+
isUngroupable &&
|
|
251
|
+
convertToGroupButtons.ungroup,
|
|
252
|
+
isReusableBlockType &&
|
|
253
|
+
innerBlockCount > 0 &&
|
|
254
|
+
allOptions.convertToRegularBlocks,
|
|
233
255
|
! isLocked && allOptions.delete,
|
|
234
256
|
].filter( Boolean );
|
|
235
257
|
|
|
@@ -325,6 +347,7 @@ export default compose(
|
|
|
325
347
|
getSelectedBlockClientIds,
|
|
326
348
|
canInsertBlockType,
|
|
327
349
|
getTemplateLock,
|
|
350
|
+
canRemoveBlock,
|
|
328
351
|
} = select( blockEditorStore );
|
|
329
352
|
const block = getBlock( clientId );
|
|
330
353
|
const blockName = getBlockName( clientId );
|
|
@@ -361,6 +384,7 @@ export default compose(
|
|
|
361
384
|
const selectedBlockPossibleTransformations = selectedBlock
|
|
362
385
|
? getBlockTransformItems( selectedBlock, rootClientId )
|
|
363
386
|
: EMPTY_BLOCK_LIST;
|
|
387
|
+
const canRemove = canRemoveBlock( selectedBlockClientId );
|
|
364
388
|
|
|
365
389
|
const isReusableBlockType = block ? isReusableBlock( block ) : false;
|
|
366
390
|
const reusableBlock = isReusableBlockType
|
|
@@ -386,6 +410,7 @@ export default compose(
|
|
|
386
410
|
rootClientId,
|
|
387
411
|
selectedBlockClientId,
|
|
388
412
|
selectedBlockPossibleTransformations,
|
|
413
|
+
canRemove,
|
|
389
414
|
};
|
|
390
415
|
} ),
|
|
391
416
|
withDispatch(
|
|
@@ -37,10 +37,7 @@
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
&:focus .block-editor-block-preview__container {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
// Windows High Contrast mode will show this outline, but not the box-shadow.
|
|
43
|
-
outline: 2px solid transparent;
|
|
40
|
+
@include button-style-outset__focus(var(--wp-admin-theme-color));
|
|
44
41
|
}
|
|
45
42
|
&:hover .block-editor-block-pattern-setup-list__item-title,
|
|
46
43
|
&:focus .block-editor-block-pattern-setup-list__item-title {
|
|
@@ -37,10 +37,7 @@
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
&:focus .block-editor-block-preview__container {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
// Windows High Contrast mode will show this outline, but not the box-shadow.
|
|
43
|
-
outline: 2px solid transparent;
|
|
40
|
+
@include button-style-outset__focus(var(--wp-admin-theme-color));
|
|
44
41
|
}
|
|
45
42
|
|
|
46
43
|
|
|
@@ -24,7 +24,6 @@ import { pipe, useCopyToClipboard } from '@wordpress/compose';
|
|
|
24
24
|
*/
|
|
25
25
|
import BlockActions from '../block-actions';
|
|
26
26
|
import BlockIcon from '../block-icon';
|
|
27
|
-
import BlockModeToggle from './block-mode-toggle';
|
|
28
27
|
import BlockHTMLConvertButton from './block-html-convert-button';
|
|
29
28
|
import __unstableBlockSettingsMenuFirstItem from './block-settings-menu-first-item';
|
|
30
29
|
import BlockSettingsMenuControls from '../block-settings-menu-controls';
|
|
@@ -278,7 +277,7 @@ export function BlockSettingsDropdown( {
|
|
|
278
277
|
) }
|
|
279
278
|
shortcut={ shortcuts.insertBefore }
|
|
280
279
|
>
|
|
281
|
-
{ __( '
|
|
280
|
+
{ __( 'Add before' ) }
|
|
282
281
|
</MenuItem>
|
|
283
282
|
<MenuItem
|
|
284
283
|
onClick={ pipe(
|
|
@@ -287,23 +286,10 @@ export function BlockSettingsDropdown( {
|
|
|
287
286
|
) }
|
|
288
287
|
shortcut={ shortcuts.insertAfter }
|
|
289
288
|
>
|
|
290
|
-
{ __( '
|
|
289
|
+
{ __( 'Add after' ) }
|
|
291
290
|
</MenuItem>
|
|
292
291
|
</>
|
|
293
292
|
) }
|
|
294
|
-
{ canMove && ! onlyBlock && (
|
|
295
|
-
<MenuItem
|
|
296
|
-
onClick={ pipe( onClose, onMoveTo ) }
|
|
297
|
-
>
|
|
298
|
-
{ __( 'Move to' ) }
|
|
299
|
-
</MenuItem>
|
|
300
|
-
) }
|
|
301
|
-
{ count === 1 && (
|
|
302
|
-
<BlockModeToggle
|
|
303
|
-
clientId={ firstBlockClientId }
|
|
304
|
-
onToggle={ onClose }
|
|
305
|
-
/>
|
|
306
|
-
) }
|
|
307
293
|
</MenuGroup>
|
|
308
294
|
<MenuGroup>
|
|
309
295
|
<CopyMenuItem
|
|
@@ -316,7 +302,14 @@ export function BlockSettingsDropdown( {
|
|
|
316
302
|
</MenuItem>
|
|
317
303
|
</MenuGroup>
|
|
318
304
|
<BlockSettingsMenuControls.Slot
|
|
319
|
-
fillProps={ {
|
|
305
|
+
fillProps={ {
|
|
306
|
+
onClose,
|
|
307
|
+
canMove,
|
|
308
|
+
onMoveTo,
|
|
309
|
+
onlyBlock,
|
|
310
|
+
count,
|
|
311
|
+
firstBlockClientId,
|
|
312
|
+
} }
|
|
320
313
|
clientIds={ clientIds }
|
|
321
314
|
__unstableDisplayLocation={
|
|
322
315
|
__unstableDisplayLocation
|
|
@@ -4,9 +4,12 @@
|
|
|
4
4
|
import {
|
|
5
5
|
createSlotFill,
|
|
6
6
|
MenuGroup,
|
|
7
|
+
MenuItem,
|
|
7
8
|
__experimentalStyleProvider as StyleProvider,
|
|
8
9
|
} from '@wordpress/components';
|
|
9
10
|
import { useSelect } from '@wordpress/data';
|
|
11
|
+
import { pipe } from '@wordpress/compose';
|
|
12
|
+
import { __ } from '@wordpress/i18n';
|
|
10
13
|
|
|
11
14
|
/**
|
|
12
15
|
* Internal dependencies
|
|
@@ -17,6 +20,7 @@ import {
|
|
|
17
20
|
} from '../convert-to-group-buttons';
|
|
18
21
|
import { BlockLockMenuItem, useBlockLock } from '../block-lock';
|
|
19
22
|
import { store as blockEditorStore } from '../../store';
|
|
23
|
+
import BlockModeToggle from '../block-settings-menu/block-mode-toggle';
|
|
20
24
|
|
|
21
25
|
const { Fill, Slot } = createSlotFill( 'BlockSettingsMenuControls' );
|
|
22
26
|
|
|
@@ -74,16 +78,32 @@ const BlockSettingsMenuControlsSlot = ( {
|
|
|
74
78
|
|
|
75
79
|
return (
|
|
76
80
|
<MenuGroup>
|
|
81
|
+
{ showConvertToGroupButton && (
|
|
82
|
+
<ConvertToGroupButton
|
|
83
|
+
{ ...convertToGroupButtonProps }
|
|
84
|
+
onClose={ fillProps?.onClose }
|
|
85
|
+
/>
|
|
86
|
+
) }
|
|
77
87
|
{ showLockButton && (
|
|
78
88
|
<BlockLockMenuItem
|
|
79
89
|
clientId={ selectedClientIds[ 0 ] }
|
|
80
90
|
/>
|
|
81
91
|
) }
|
|
82
92
|
{ fills }
|
|
83
|
-
{
|
|
84
|
-
<
|
|
85
|
-
{
|
|
86
|
-
|
|
93
|
+
{ fillProps?.canMove && ! fillProps?.onlyBlock && (
|
|
94
|
+
<MenuItem
|
|
95
|
+
onClick={ pipe(
|
|
96
|
+
fillProps?.onClose,
|
|
97
|
+
fillProps?.onMoveTo
|
|
98
|
+
) }
|
|
99
|
+
>
|
|
100
|
+
{ __( 'Move to' ) }
|
|
101
|
+
</MenuItem>
|
|
102
|
+
) }
|
|
103
|
+
{ fillProps?.count === 1 && (
|
|
104
|
+
<BlockModeToggle
|
|
105
|
+
clientId={ fillProps?.firstBlockClientId }
|
|
106
|
+
onToggle={ fillProps?.onClose }
|
|
87
107
|
/>
|
|
88
108
|
) }
|
|
89
109
|
</MenuGroup>
|
|
@@ -33,7 +33,5 @@ export default function BlockStylesPreviewPanel( {
|
|
|
33
33
|
};
|
|
34
34
|
}, [ genericPreviewBlock, styleClassName ] );
|
|
35
35
|
|
|
36
|
-
return
|
|
37
|
-
<InserterPreviewPanel item={ previewBlocks } isStylePreview={ true } />
|
|
38
|
-
);
|
|
36
|
+
return <InserterPreviewPanel item={ previewBlocks } />;
|
|
39
37
|
}
|
|
@@ -37,16 +37,15 @@
|
|
|
37
37
|
justify-content: space-between;
|
|
38
38
|
gap: $grid-unit-10;
|
|
39
39
|
|
|
40
|
-
.block-editor-block-styles__item {
|
|
40
|
+
button.components-button.block-editor-block-styles__item {
|
|
41
41
|
color: $gray-900;
|
|
42
42
|
box-shadow: inset 0 0 0 1px $gray-400;
|
|
43
43
|
display: inline-block;
|
|
44
44
|
width: calc(50% - #{$grid-unit-05});
|
|
45
45
|
|
|
46
|
-
&:focus,
|
|
47
46
|
&:hover {
|
|
48
47
|
color: var(--wp-admin-theme-color);
|
|
49
|
-
box-shadow: inset 0 0 0
|
|
48
|
+
box-shadow: inset 0 0 0 1px $gray-400;
|
|
50
49
|
}
|
|
51
50
|
|
|
52
51
|
&.is-active,
|
|
@@ -60,8 +59,9 @@
|
|
|
60
59
|
color: $white;
|
|
61
60
|
}
|
|
62
61
|
|
|
62
|
+
&:focus,
|
|
63
63
|
&.is-active:focus {
|
|
64
|
-
|
|
64
|
+
@include button-style__focus();
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
|
|
@@ -14,6 +14,7 @@ import { useState, useMemo } from '@wordpress/element';
|
|
|
14
14
|
*/
|
|
15
15
|
import BlockIcon from '../block-icon';
|
|
16
16
|
import PreviewBlockPopover from './preview-block-popover';
|
|
17
|
+
import BlockVariationTransformations from './block-variation-transformations';
|
|
17
18
|
|
|
18
19
|
/**
|
|
19
20
|
* Helper hook to group transformations to display them in a specific order in the UI.
|
|
@@ -65,7 +66,9 @@ function useGroupedTransforms( possibleBlockTransformations ) {
|
|
|
65
66
|
const BlockTransformationsMenu = ( {
|
|
66
67
|
className,
|
|
67
68
|
possibleBlockTransformations,
|
|
69
|
+
possibleBlockVariationTransformations,
|
|
68
70
|
onSelect,
|
|
71
|
+
onSelectVariation,
|
|
69
72
|
blocks,
|
|
70
73
|
} ) => {
|
|
71
74
|
const [ hoveredTransformItemName, setHoveredTransformItemName ] =
|
|
@@ -95,6 +98,15 @@ const BlockTransformationsMenu = ( {
|
|
|
95
98
|
) }
|
|
96
99
|
/>
|
|
97
100
|
) }
|
|
101
|
+
{ !! possibleBlockVariationTransformations?.length && (
|
|
102
|
+
<BlockVariationTransformations
|
|
103
|
+
transformations={
|
|
104
|
+
possibleBlockVariationTransformations
|
|
105
|
+
}
|
|
106
|
+
blocks={ blocks }
|
|
107
|
+
onSelect={ onSelectVariation }
|
|
108
|
+
/>
|
|
109
|
+
) }
|
|
98
110
|
{ priorityTextTransformations.map( ( item ) => (
|
|
99
111
|
<BlockTranformationItem
|
|
100
112
|
key={ item.name }
|