@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
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { MenuItem } from '@wordpress/components';
|
|
5
|
+
import {
|
|
6
|
+
getBlockMenuDefaultClassName,
|
|
7
|
+
cloneBlock,
|
|
8
|
+
store as blocksStore,
|
|
9
|
+
} from '@wordpress/blocks';
|
|
10
|
+
import { useSelect } from '@wordpress/data';
|
|
11
|
+
import { useState, useMemo } from '@wordpress/element';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Internal dependencies
|
|
15
|
+
*/
|
|
16
|
+
import { store as blockEditorStore } from '../../store';
|
|
17
|
+
import BlockIcon from '../block-icon';
|
|
18
|
+
import PreviewBlockPopover from './preview-block-popover';
|
|
19
|
+
|
|
20
|
+
const EMPTY_OBJECT = {};
|
|
21
|
+
|
|
22
|
+
export function useBlockVariationTransforms( { clientIds, blocks } ) {
|
|
23
|
+
const { activeBlockVariation, blockVariationTransformations } = useSelect(
|
|
24
|
+
( select ) => {
|
|
25
|
+
const {
|
|
26
|
+
getBlockRootClientId,
|
|
27
|
+
getBlockAttributes,
|
|
28
|
+
canRemoveBlocks,
|
|
29
|
+
} = select( blockEditorStore );
|
|
30
|
+
const { getActiveBlockVariation, getBlockVariations } =
|
|
31
|
+
select( blocksStore );
|
|
32
|
+
const rootClientId = getBlockRootClientId(
|
|
33
|
+
Array.isArray( clientIds ) ? clientIds[ 0 ] : clientIds
|
|
34
|
+
);
|
|
35
|
+
const canRemove = canRemoveBlocks( clientIds, rootClientId );
|
|
36
|
+
// Only handle single selected blocks for now.
|
|
37
|
+
if ( blocks.length !== 1 || ! canRemove ) {
|
|
38
|
+
return EMPTY_OBJECT;
|
|
39
|
+
}
|
|
40
|
+
const [ firstBlock ] = blocks;
|
|
41
|
+
return {
|
|
42
|
+
blockVariationTransformations: getBlockVariations(
|
|
43
|
+
firstBlock.name,
|
|
44
|
+
'transform'
|
|
45
|
+
),
|
|
46
|
+
activeBlockVariation: getActiveBlockVariation(
|
|
47
|
+
firstBlock.name,
|
|
48
|
+
getBlockAttributes( firstBlock.clientId )
|
|
49
|
+
),
|
|
50
|
+
};
|
|
51
|
+
},
|
|
52
|
+
[ clientIds, blocks ]
|
|
53
|
+
);
|
|
54
|
+
const transformations = useMemo( () => {
|
|
55
|
+
return blockVariationTransformations?.filter(
|
|
56
|
+
( { name } ) => name !== activeBlockVariation?.name
|
|
57
|
+
);
|
|
58
|
+
}, [ blockVariationTransformations, activeBlockVariation ] );
|
|
59
|
+
return transformations;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const BlockVariationTransformations = ( {
|
|
63
|
+
transformations,
|
|
64
|
+
onSelect,
|
|
65
|
+
blocks,
|
|
66
|
+
} ) => {
|
|
67
|
+
const [ hoveredTransformItemName, setHoveredTransformItemName ] =
|
|
68
|
+
useState();
|
|
69
|
+
return (
|
|
70
|
+
<>
|
|
71
|
+
{ hoveredTransformItemName && (
|
|
72
|
+
<PreviewBlockPopover
|
|
73
|
+
blocks={ cloneBlock(
|
|
74
|
+
blocks[ 0 ],
|
|
75
|
+
transformations.find(
|
|
76
|
+
( { name } ) => name === hoveredTransformItemName
|
|
77
|
+
).attributes
|
|
78
|
+
) }
|
|
79
|
+
/>
|
|
80
|
+
) }
|
|
81
|
+
{ transformations?.map( ( item ) => (
|
|
82
|
+
<BlockVariationTranformationItem
|
|
83
|
+
key={ item.name }
|
|
84
|
+
item={ item }
|
|
85
|
+
onSelect={ onSelect }
|
|
86
|
+
setHoveredTransformItemName={ setHoveredTransformItemName }
|
|
87
|
+
/>
|
|
88
|
+
) ) }
|
|
89
|
+
</>
|
|
90
|
+
);
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
function BlockVariationTranformationItem( {
|
|
94
|
+
item,
|
|
95
|
+
onSelect,
|
|
96
|
+
setHoveredTransformItemName,
|
|
97
|
+
} ) {
|
|
98
|
+
const { name, icon, title } = item;
|
|
99
|
+
return (
|
|
100
|
+
<MenuItem
|
|
101
|
+
className={ getBlockMenuDefaultClassName( name ) }
|
|
102
|
+
onClick={ ( event ) => {
|
|
103
|
+
event.preventDefault();
|
|
104
|
+
onSelect( name );
|
|
105
|
+
} }
|
|
106
|
+
onMouseLeave={ () => setHoveredTransformItemName( null ) }
|
|
107
|
+
onMouseEnter={ () => setHoveredTransformItemName( name ) }
|
|
108
|
+
>
|
|
109
|
+
<BlockIcon icon={ icon } showColors />
|
|
110
|
+
{ title }
|
|
111
|
+
</MenuItem>
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export default BlockVariationTransformations;
|
|
@@ -24,12 +24,14 @@ import { store as blockEditorStore } from '../../store';
|
|
|
24
24
|
import useBlockDisplayInformation from '../use-block-display-information';
|
|
25
25
|
import BlockIcon from '../block-icon';
|
|
26
26
|
import BlockTransformationsMenu from './block-transformations-menu';
|
|
27
|
+
import { useBlockVariationTransforms } from './block-variation-transformations';
|
|
27
28
|
import BlockStylesMenu from './block-styles-menu';
|
|
28
29
|
import PatternTransformationsMenu from './pattern-transformations-menu';
|
|
29
30
|
import useBlockDisplayTitle from '../block-title/use-block-display-title';
|
|
30
31
|
|
|
31
32
|
export const BlockSwitcherDropdownMenu = ( { clientIds, blocks } ) => {
|
|
32
|
-
const { replaceBlocks, multiSelect } =
|
|
33
|
+
const { replaceBlocks, multiSelect, updateBlockAttributes } =
|
|
34
|
+
useDispatch( blockEditorStore );
|
|
33
35
|
const blockInformation = useBlockDisplayInformation( blocks[ 0 ].clientId );
|
|
34
36
|
const {
|
|
35
37
|
possibleBlockTransformations,
|
|
@@ -43,9 +45,9 @@ export const BlockSwitcherDropdownMenu = ( { clientIds, blocks } ) => {
|
|
|
43
45
|
getBlockRootClientId,
|
|
44
46
|
getBlockTransformItems,
|
|
45
47
|
__experimentalGetPatternTransformItems,
|
|
48
|
+
canRemoveBlocks,
|
|
46
49
|
} = select( blockEditorStore );
|
|
47
50
|
const { getBlockStyles, getBlockType } = select( blocksStore );
|
|
48
|
-
const { canRemoveBlocks } = select( blockEditorStore );
|
|
49
51
|
const rootClientId = getBlockRootClientId(
|
|
50
52
|
Array.isArray( clientIds ) ? clientIds[ 0 ] : clientIds
|
|
51
53
|
);
|
|
@@ -82,6 +84,11 @@ export const BlockSwitcherDropdownMenu = ( { clientIds, blocks } ) => {
|
|
|
82
84
|
[ clientIds, blocks, blockInformation?.icon ]
|
|
83
85
|
);
|
|
84
86
|
|
|
87
|
+
const blockVariationTransformations = useBlockVariationTransforms( {
|
|
88
|
+
clientIds,
|
|
89
|
+
blocks,
|
|
90
|
+
} );
|
|
91
|
+
|
|
85
92
|
const blockTitle = useBlockDisplayTitle( {
|
|
86
93
|
clientId: Array.isArray( clientIds ) ? clientIds[ 0 ] : clientIds,
|
|
87
94
|
maximumLength: 35,
|
|
@@ -105,6 +112,14 @@ export const BlockSwitcherDropdownMenu = ( { clientIds, blocks } ) => {
|
|
|
105
112
|
selectForMultipleBlocks( newBlocks );
|
|
106
113
|
}
|
|
107
114
|
|
|
115
|
+
function onBlockVariationTransform( name ) {
|
|
116
|
+
updateBlockAttributes( blocks[ 0 ].clientId, {
|
|
117
|
+
...blockVariationTransformations.find(
|
|
118
|
+
( { name: variationName } ) => variationName === name
|
|
119
|
+
).attributes,
|
|
120
|
+
} );
|
|
121
|
+
}
|
|
122
|
+
|
|
108
123
|
// Pattern transformation through the `Patterns` API.
|
|
109
124
|
function onPatternTransform( transformedBlocks ) {
|
|
110
125
|
replaceBlocks( clientIds, transformedBlocks );
|
|
@@ -118,8 +133,14 @@ export const BlockSwitcherDropdownMenu = ( { clientIds, blocks } ) => {
|
|
|
118
133
|
*/
|
|
119
134
|
const hasPossibleBlockTransformations =
|
|
120
135
|
!! possibleBlockTransformations.length && canRemove && ! isTemplate;
|
|
136
|
+
const hasPossibleBlockVariationTransformations =
|
|
137
|
+
!! blockVariationTransformations?.length;
|
|
121
138
|
const hasPatternTransformation = !! patterns?.length && canRemove;
|
|
122
|
-
if (
|
|
139
|
+
if (
|
|
140
|
+
! hasBlockStyles &&
|
|
141
|
+
! hasPossibleBlockTransformations &&
|
|
142
|
+
! hasPossibleBlockVariationTransformations
|
|
143
|
+
) {
|
|
123
144
|
return (
|
|
124
145
|
<ToolbarGroup>
|
|
125
146
|
<ToolbarButton
|
|
@@ -160,9 +181,12 @@ export const BlockSwitcherDropdownMenu = ( { clientIds, blocks } ) => {
|
|
|
160
181
|
blocks.length
|
|
161
182
|
);
|
|
162
183
|
|
|
184
|
+
const hasBlockOrBlockVariationTransforms =
|
|
185
|
+
hasPossibleBlockTransformations ||
|
|
186
|
+
hasPossibleBlockVariationTransformations;
|
|
163
187
|
const showDropDown =
|
|
164
188
|
hasBlockStyles ||
|
|
165
|
-
|
|
189
|
+
hasBlockOrBlockVariationTransforms ||
|
|
166
190
|
hasPatternTransformation;
|
|
167
191
|
return (
|
|
168
192
|
<ToolbarGroup>
|
|
@@ -213,17 +237,26 @@ export const BlockSwitcherDropdownMenu = ( { clientIds, blocks } ) => {
|
|
|
213
237
|
} }
|
|
214
238
|
/>
|
|
215
239
|
) }
|
|
216
|
-
{
|
|
240
|
+
{ hasBlockOrBlockVariationTransforms && (
|
|
217
241
|
<BlockTransformationsMenu
|
|
218
242
|
className="block-editor-block-switcher__transforms__menugroup"
|
|
219
243
|
possibleBlockTransformations={
|
|
220
244
|
possibleBlockTransformations
|
|
221
245
|
}
|
|
246
|
+
possibleBlockVariationTransformations={
|
|
247
|
+
blockVariationTransformations
|
|
248
|
+
}
|
|
222
249
|
blocks={ blocks }
|
|
223
250
|
onSelect={ ( name ) => {
|
|
224
251
|
onBlockTransform( name );
|
|
225
252
|
onClose();
|
|
226
253
|
} }
|
|
254
|
+
onSelectVariation={ ( name ) => {
|
|
255
|
+
onBlockVariationTransform(
|
|
256
|
+
name
|
|
257
|
+
);
|
|
258
|
+
onClose();
|
|
259
|
+
} }
|
|
227
260
|
/>
|
|
228
261
|
) }
|
|
229
262
|
{ hasBlockStyles && (
|
|
@@ -105,15 +105,15 @@ function BlockPattern( { pattern, onSelect, composite } ) {
|
|
|
105
105
|
`${ baseClassName }-list__item-description`
|
|
106
106
|
);
|
|
107
107
|
return (
|
|
108
|
-
<div
|
|
109
|
-
className={ `${ baseClassName }-list__list-item` }
|
|
110
|
-
aria-label={ pattern.title }
|
|
111
|
-
aria-describedby={ pattern.description ? descriptionId : undefined }
|
|
112
|
-
>
|
|
108
|
+
<div className={ `${ baseClassName }-list__list-item` }>
|
|
113
109
|
<CompositeItem
|
|
114
110
|
role="option"
|
|
115
111
|
as="div"
|
|
116
112
|
{ ...composite }
|
|
113
|
+
aria-label={ pattern.title }
|
|
114
|
+
aria-describedby={
|
|
115
|
+
pattern.description ? descriptionId : undefined
|
|
116
|
+
}
|
|
117
117
|
className={ `${ baseClassName }-list__item` }
|
|
118
118
|
onClick={ () => onSelect( pattern.transformedBlocks ) }
|
|
119
119
|
>
|
|
@@ -109,19 +109,20 @@
|
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
.components-popover__content {
|
|
112
|
-
|
|
112
|
+
width: 300px;
|
|
113
113
|
border: $border-width solid $gray-900;
|
|
114
114
|
background: $white;
|
|
115
115
|
border-radius: $radius-block-ui;
|
|
116
116
|
outline: none;
|
|
117
|
+
box-shadow: none;
|
|
117
118
|
}
|
|
118
119
|
|
|
119
120
|
.block-editor-block-switcher__preview {
|
|
120
|
-
|
|
121
|
-
height: auto;
|
|
122
|
-
// Subtract margin from max-height.
|
|
121
|
+
// Subtract vertical margin from max-height.
|
|
123
122
|
max-height: calc(500px - #{$grid-unit-40});
|
|
124
|
-
margin: $grid-unit-20;
|
|
123
|
+
margin: $grid-unit-20 0;
|
|
124
|
+
// Use padding to prevent the pattern previews focus style from being cut-off.
|
|
125
|
+
padding: 0 $grid-unit-20;
|
|
125
126
|
overflow: hidden;
|
|
126
127
|
}
|
|
127
128
|
}
|
|
@@ -32,6 +32,7 @@ import BlockEditVisuallyButton from '../block-edit-visually-button';
|
|
|
32
32
|
import { useShowMoversGestures } from './utils';
|
|
33
33
|
import { store as blockEditorStore } from '../../store';
|
|
34
34
|
import __unstableBlockNameContext from './block-name-context';
|
|
35
|
+
import { unlock } from '../../lock-unlock';
|
|
35
36
|
|
|
36
37
|
const BlockToolbar = ( { hideDragHandle } ) => {
|
|
37
38
|
const {
|
|
@@ -42,7 +43,7 @@ const BlockToolbar = ( { hideDragHandle } ) => {
|
|
|
42
43
|
isDistractionFree,
|
|
43
44
|
isValid,
|
|
44
45
|
isVisual,
|
|
45
|
-
|
|
46
|
+
blockEditingMode,
|
|
46
47
|
} = useSelect( ( select ) => {
|
|
47
48
|
const {
|
|
48
49
|
getBlockName,
|
|
@@ -51,8 +52,8 @@ const BlockToolbar = ( { hideDragHandle } ) => {
|
|
|
51
52
|
isBlockValid,
|
|
52
53
|
getBlockRootClientId,
|
|
53
54
|
getSettings,
|
|
54
|
-
|
|
55
|
-
} = select( blockEditorStore );
|
|
55
|
+
getBlockEditingMode,
|
|
56
|
+
} = unlock( select( blockEditorStore ) );
|
|
56
57
|
const selectedBlockClientIds = getSelectedBlockClientIds();
|
|
57
58
|
const selectedBlockClientId = selectedBlockClientIds[ 0 ];
|
|
58
59
|
const blockRootClientId = getBlockRootClientId( selectedBlockClientId );
|
|
@@ -73,9 +74,7 @@ const BlockToolbar = ( { hideDragHandle } ) => {
|
|
|
73
74
|
isVisual: selectedBlockClientIds.every(
|
|
74
75
|
( id ) => getBlockMode( id ) === 'visual'
|
|
75
76
|
),
|
|
76
|
-
|
|
77
|
-
selectedBlockClientId
|
|
78
|
-
),
|
|
77
|
+
blockEditingMode: getBlockEditingMode( selectedBlockClientId ),
|
|
79
78
|
};
|
|
80
79
|
}, [] );
|
|
81
80
|
|
|
@@ -125,12 +124,12 @@ const BlockToolbar = ( { hideDragHandle } ) => {
|
|
|
125
124
|
|
|
126
125
|
return (
|
|
127
126
|
<div className={ classes }>
|
|
128
|
-
{ ! isMultiToolbar &&
|
|
129
|
-
|
|
130
|
-
|
|
127
|
+
{ ! isMultiToolbar &&
|
|
128
|
+
isLargeViewport &&
|
|
129
|
+
blockEditingMode === 'default' && <BlockParentSelector /> }
|
|
131
130
|
<div ref={ nodeRef } { ...showMoversGestures }>
|
|
132
131
|
{ ( shouldShowVisualToolbar || isMultiToolbar ) &&
|
|
133
|
-
|
|
132
|
+
blockEditingMode === 'default' && (
|
|
134
133
|
<ToolbarGroup className="block-editor-block-toolbar__block-controls">
|
|
135
134
|
<BlockSwitcher clientIds={ blockClientIds } />
|
|
136
135
|
{ ! isMultiToolbar && (
|
|
@@ -175,7 +174,7 @@ const BlockToolbar = ( { hideDragHandle } ) => {
|
|
|
175
174
|
</>
|
|
176
175
|
) }
|
|
177
176
|
<BlockEditVisuallyButton clientIds={ blockClientIds } />
|
|
178
|
-
{
|
|
177
|
+
{ blockEditingMode === 'default' && (
|
|
179
178
|
<BlockSettingsMenu clientIds={ blockClientIds } />
|
|
180
179
|
) }
|
|
181
180
|
</div>
|
|
@@ -7,7 +7,7 @@ import classnames from 'classnames';
|
|
|
7
7
|
* WordPress dependencies
|
|
8
8
|
*/
|
|
9
9
|
import { __ } from '@wordpress/i18n';
|
|
10
|
-
import {
|
|
10
|
+
import { useEffect, useRef, useState } from '@wordpress/element';
|
|
11
11
|
import { hasBlockSupport, store as blocksStore } from '@wordpress/blocks';
|
|
12
12
|
import { useSelect } from '@wordpress/data';
|
|
13
13
|
import {
|
|
@@ -25,62 +25,22 @@ import NavigableToolbar from '../navigable-toolbar';
|
|
|
25
25
|
import BlockToolbar from '../block-toolbar';
|
|
26
26
|
import { store as blockEditorStore } from '../../store';
|
|
27
27
|
import BlockIcon from '../block-icon';
|
|
28
|
-
|
|
29
|
-
const CollapseFixedToolbarButton = forwardRef( ( { onClick }, ref ) => {
|
|
30
|
-
return (
|
|
31
|
-
<ToolbarItem
|
|
32
|
-
as={ ToolbarButton }
|
|
33
|
-
className="block-editor-block-toolbar__collapse-fixed-toolbar"
|
|
34
|
-
icon={ levelUp }
|
|
35
|
-
onClick={ onClick }
|
|
36
|
-
ref={ ref }
|
|
37
|
-
label={ __( 'Show document tools' ) }
|
|
38
|
-
/>
|
|
39
|
-
);
|
|
40
|
-
} );
|
|
41
|
-
|
|
42
|
-
const ExpandFixedToolbarButton = forwardRef( ( { onClick, icon }, ref ) => {
|
|
43
|
-
return (
|
|
44
|
-
<ToolbarItem
|
|
45
|
-
as={ ToolbarButton }
|
|
46
|
-
className="block-editor-block-toolbar__expand-fixed-toolbar"
|
|
47
|
-
icon={ <BlockIcon icon={ icon } /> }
|
|
48
|
-
onClick={ onClick }
|
|
49
|
-
ref={ ref }
|
|
50
|
-
label={ __( 'Show block tools' ) }
|
|
51
|
-
/>
|
|
52
|
-
);
|
|
53
|
-
} );
|
|
28
|
+
import { unlock } from '../../lock-unlock';
|
|
54
29
|
|
|
55
30
|
function BlockContextualToolbar( { focusOnMount, isFixed, ...props } ) {
|
|
56
31
|
// When the toolbar is fixed it can be collapsed
|
|
57
32
|
const [ isCollapsed, setIsCollapsed ] = useState( false );
|
|
58
|
-
const
|
|
59
|
-
const collapseFixedToolbarButtonRef = useRef();
|
|
60
|
-
|
|
61
|
-
// Don't focus the block toolbar just because it mounts
|
|
62
|
-
const initialRender = useRef( true );
|
|
63
|
-
useEffect( () => {
|
|
64
|
-
if ( initialRender.current ) {
|
|
65
|
-
initialRender.current = false;
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
if ( isCollapsed && expandFixedToolbarButtonRef.current ) {
|
|
69
|
-
expandFixedToolbarButtonRef.current.focus();
|
|
70
|
-
}
|
|
71
|
-
if ( ! isCollapsed && collapseFixedToolbarButtonRef.current ) {
|
|
72
|
-
collapseFixedToolbarButtonRef.current.focus();
|
|
73
|
-
}
|
|
74
|
-
}, [ isCollapsed ] );
|
|
33
|
+
const toolbarButtonRef = useRef();
|
|
75
34
|
|
|
35
|
+
const isLargeViewport = useViewportMatch( 'medium' );
|
|
76
36
|
const { blockType, hasParents, showParentSelector, selectedBlockClientId } =
|
|
77
37
|
useSelect( ( select ) => {
|
|
78
38
|
const {
|
|
79
39
|
getBlockName,
|
|
80
40
|
getBlockParents,
|
|
81
41
|
getSelectedBlockClientIds,
|
|
82
|
-
|
|
83
|
-
} = select( blockEditorStore );
|
|
42
|
+
getBlockEditingMode,
|
|
43
|
+
} = unlock( select( blockEditorStore ) );
|
|
84
44
|
const { getBlockType } = select( blocksStore );
|
|
85
45
|
const selectedBlockClientIds = getSelectedBlockClientIds();
|
|
86
46
|
const _selectedBlockClientId = selectedBlockClientIds[ 0 ];
|
|
@@ -103,9 +63,7 @@ function BlockContextualToolbar( { focusOnMount, isFixed, ...props } ) {
|
|
|
103
63
|
true
|
|
104
64
|
) &&
|
|
105
65
|
selectedBlockClientIds.length <= 1 &&
|
|
106
|
-
|
|
107
|
-
_selectedBlockClientId
|
|
108
|
-
),
|
|
66
|
+
getBlockEditingMode( _selectedBlockClientId ) === 'default',
|
|
109
67
|
};
|
|
110
68
|
}, [] );
|
|
111
69
|
|
|
@@ -113,12 +71,11 @@ function BlockContextualToolbar( { focusOnMount, isFixed, ...props } ) {
|
|
|
113
71
|
setIsCollapsed( false );
|
|
114
72
|
}, [ selectedBlockClientId ] );
|
|
115
73
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
}
|
|
74
|
+
if (
|
|
75
|
+
blockType &&
|
|
76
|
+
! hasBlockSupport( blockType, '__experimentalToolbar', true )
|
|
77
|
+
) {
|
|
78
|
+
return null;
|
|
122
79
|
}
|
|
123
80
|
|
|
124
81
|
// Shifts the toolbar to make room for the parent block selector.
|
|
@@ -144,18 +101,26 @@ function BlockContextualToolbar( { focusOnMount, isFixed, ...props } ) {
|
|
|
144
101
|
: 'block-editor-block-toolbar__group-collapse-fixed-toolbar'
|
|
145
102
|
}
|
|
146
103
|
>
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
104
|
+
<ToolbarItem
|
|
105
|
+
as={ ToolbarButton }
|
|
106
|
+
ref={ toolbarButtonRef }
|
|
107
|
+
icon={
|
|
108
|
+
isCollapsed ? (
|
|
109
|
+
<BlockIcon icon={ blockType.icon } />
|
|
110
|
+
) : (
|
|
111
|
+
levelUp
|
|
112
|
+
)
|
|
113
|
+
}
|
|
114
|
+
onClick={ () => {
|
|
115
|
+
setIsCollapsed( ( collapsed ) => ! collapsed );
|
|
116
|
+
toolbarButtonRef.current.focus();
|
|
117
|
+
} }
|
|
118
|
+
label={
|
|
119
|
+
isCollapsed
|
|
120
|
+
? __( 'Show block tools' )
|
|
121
|
+
: __( 'Show document tools' )
|
|
122
|
+
}
|
|
123
|
+
/>
|
|
159
124
|
</ToolbarGroup>
|
|
160
125
|
) }
|
|
161
126
|
{ ! isCollapsed && <BlockToolbar hideDragHandle={ isFixed } /> }
|
|
@@ -198,16 +198,30 @@ function InbetweenInsertionPointPopover( {
|
|
|
198
198
|
}
|
|
199
199
|
|
|
200
200
|
export default function InsertionPoint( props ) {
|
|
201
|
-
const { insertionPoint, isVisible } = useSelect(
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
201
|
+
const { insertionPoint, isVisible, isBlockListEmpty } = useSelect(
|
|
202
|
+
( select ) => {
|
|
203
|
+
const {
|
|
204
|
+
getBlockInsertionPoint,
|
|
205
|
+
isBlockInsertionPointVisible,
|
|
206
|
+
getBlockCount,
|
|
207
|
+
} = select( blockEditorStore );
|
|
208
|
+
const blockInsertionPoint = getBlockInsertionPoint();
|
|
209
|
+
return {
|
|
210
|
+
insertionPoint: blockInsertionPoint,
|
|
211
|
+
isVisible: isBlockInsertionPointVisible(),
|
|
212
|
+
isBlockListEmpty:
|
|
213
|
+
getBlockCount( blockInsertionPoint?.rootClientId ) === 0,
|
|
214
|
+
};
|
|
215
|
+
},
|
|
216
|
+
[]
|
|
217
|
+
);
|
|
209
218
|
|
|
210
|
-
if (
|
|
219
|
+
if (
|
|
220
|
+
! isVisible ||
|
|
221
|
+
// Don't render the insertion point if the block list is empty.
|
|
222
|
+
// The insertion point will be represented by the appender instead.
|
|
223
|
+
isBlockListEmpty
|
|
224
|
+
) {
|
|
211
225
|
return null;
|
|
212
226
|
}
|
|
213
227
|
|
|
@@ -20,8 +20,7 @@ import { store as blockEditorStore } from '../../store';
|
|
|
20
20
|
import BlockPopover from '../block-popover';
|
|
21
21
|
import useBlockToolbarPopoverProps from './use-block-toolbar-popover-props';
|
|
22
22
|
import Inserter from '../inserter';
|
|
23
|
-
import {
|
|
24
|
-
import { privateApis } from '../../private-apis';
|
|
23
|
+
import { useShouldContextualToolbarShow } from '../../utils/use-should-contextual-toolbar-show';
|
|
25
24
|
|
|
26
25
|
function selector( select ) {
|
|
27
26
|
const {
|
|
@@ -29,7 +28,7 @@ function selector( select ) {
|
|
|
29
28
|
hasMultiSelection,
|
|
30
29
|
isTyping,
|
|
31
30
|
getLastMultiSelectedBlockClientId,
|
|
32
|
-
} =
|
|
31
|
+
} = select( blockEditorStore );
|
|
33
32
|
|
|
34
33
|
return {
|
|
35
34
|
editorMode: __unstableGetEditorMode(),
|
|
@@ -54,7 +53,6 @@ function SelectedBlockPopover( {
|
|
|
54
53
|
[]
|
|
55
54
|
);
|
|
56
55
|
|
|
57
|
-
const { useShouldContextualToolbarShow } = unlock( privateApis );
|
|
58
56
|
const isInsertionPointVisible = useSelect(
|
|
59
57
|
( select ) => {
|
|
60
58
|
const {
|
|
@@ -75,7 +73,7 @@ function SelectedBlockPopover( {
|
|
|
75
73
|
);
|
|
76
74
|
const isToolbarForced = useRef( false );
|
|
77
75
|
const { shouldShowContextualToolbar, canFocusHiddenToolbar } =
|
|
78
|
-
useShouldContextualToolbarShow(
|
|
76
|
+
useShouldContextualToolbarShow();
|
|
79
77
|
|
|
80
78
|
const { stopTyping } = useDispatch( blockEditorStore );
|
|
81
79
|
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
|
|
35
36
|
// When the appender shows up in empty container blocks, such as Group and Columns, add an extra click state.
|
|
36
37
|
.block-list-appender:only-child {
|
|
37
38
|
.is-layout-constrained.block-editor-block-list__block:not(.is-selected) > &,
|
|
@@ -56,5 +57,26 @@
|
|
|
56
57
|
.block-editor-inserter {
|
|
57
58
|
visibility: hidden;
|
|
58
59
|
}
|
|
60
|
+
|
|
61
|
+
&.is-drag-over {
|
|
62
|
+
&::after {
|
|
63
|
+
border: none;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.block-editor-inserter {
|
|
67
|
+
visibility: visible;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&.is-drag-over .block-editor-button-block-appender {
|
|
73
|
+
background-color: var(--wp-admin-theme-color);
|
|
74
|
+
box-shadow: inset 0 0 0 $border-width $light-gray-placeholder;
|
|
75
|
+
color: $light-gray-placeholder;
|
|
76
|
+
transition: background-color 0.2s ease-in-out;
|
|
77
|
+
|
|
78
|
+
@media ( prefers-reduced-motion: reduce ) {
|
|
79
|
+
transition: none;
|
|
80
|
+
}
|
|
59
81
|
}
|
|
60
82
|
}
|
|
@@ -61,7 +61,12 @@ export default function useMultipleOriginColorsAndGradients() {
|
|
|
61
61
|
} );
|
|
62
62
|
}
|
|
63
63
|
return result;
|
|
64
|
-
}, [
|
|
64
|
+
}, [
|
|
65
|
+
defaultColors,
|
|
66
|
+
themeColors,
|
|
67
|
+
customColors,
|
|
68
|
+
shouldDisplayDefaultColors,
|
|
69
|
+
] );
|
|
65
70
|
|
|
66
71
|
const customGradients = useSetting( 'color.gradients.custom' );
|
|
67
72
|
const themeGradients = useSetting( 'color.gradients.theme' );
|
|
@@ -103,7 +108,16 @@ export default function useMultipleOriginColorsAndGradients() {
|
|
|
103
108
|
} );
|
|
104
109
|
}
|
|
105
110
|
return result;
|
|
106
|
-
}, [
|
|
111
|
+
}, [
|
|
112
|
+
customGradients,
|
|
113
|
+
themeGradients,
|
|
114
|
+
defaultGradients,
|
|
115
|
+
shouldDisplayDefaultGradients,
|
|
116
|
+
] );
|
|
117
|
+
|
|
118
|
+
colorGradientSettings.hasColorsOrGradients =
|
|
119
|
+
!! colorGradientSettings.colors.length ||
|
|
120
|
+
!! colorGradientSettings.gradients.length;
|
|
107
121
|
|
|
108
122
|
return colorGradientSettings;
|
|
109
123
|
}
|
|
@@ -17,6 +17,7 @@ function ConvertToGroupButton( {
|
|
|
17
17
|
clientIds,
|
|
18
18
|
isGroupable,
|
|
19
19
|
isUngroupable,
|
|
20
|
+
onUngroup,
|
|
20
21
|
blocksSelection,
|
|
21
22
|
groupingBlockName,
|
|
22
23
|
onClose = () => {},
|
|
@@ -34,10 +35,16 @@ function ConvertToGroupButton( {
|
|
|
34
35
|
};
|
|
35
36
|
|
|
36
37
|
const onConvertFromGroup = () => {
|
|
37
|
-
|
|
38
|
+
let innerBlocks = blocksSelection[ 0 ].innerBlocks;
|
|
38
39
|
if ( ! innerBlocks.length ) {
|
|
39
40
|
return;
|
|
40
41
|
}
|
|
42
|
+
if ( onUngroup ) {
|
|
43
|
+
innerBlocks = onUngroup(
|
|
44
|
+
blocksSelection[ 0 ].attributes,
|
|
45
|
+
blocksSelection[ 0 ].innerBlocks
|
|
46
|
+
);
|
|
47
|
+
}
|
|
41
48
|
replaceBlocks( clientIds, innerBlocks );
|
|
42
49
|
};
|
|
43
50
|
|
|
@@ -66,7 +73,7 @@ function ConvertToGroupButton( {
|
|
|
66
73
|
>
|
|
67
74
|
{ _x(
|
|
68
75
|
'Ungroup',
|
|
69
|
-
'Ungrouping blocks from within a
|
|
76
|
+
'Ungrouping blocks from within a grouping block back into individual blocks within the Editor '
|
|
70
77
|
) }
|
|
71
78
|
</MenuItem>
|
|
72
79
|
) }
|