@wordpress/block-editor 12.24.0 → 12.26.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 +11 -3
- package/README.md +7 -1
- package/build/components/alignment-control/ui.js +3 -1
- package/build/components/alignment-control/ui.js.map +1 -1
- package/build/components/block-actions/index.js +4 -2
- package/build/components/block-actions/index.js.map +1 -1
- package/build/components/block-alignment-control/ui.js +2 -2
- package/build/components/block-alignment-control/ui.js.map +1 -1
- package/build/components/block-card/index.js +2 -2
- package/build/components/block-card/index.js.map +1 -1
- package/build/components/block-compare/index.js +2 -2
- package/build/components/block-compare/index.js.map +1 -1
- package/build/components/block-edit/edit.js +2 -2
- package/build/components/block-edit/edit.js.map +1 -1
- package/build/components/block-icon/index.js +2 -2
- package/build/components/block-icon/index.js.map +1 -1
- package/build/components/block-list/block.js +4 -13
- package/build/components/block-list/block.js.map +1 -1
- package/build/components/block-list/block.native.js +2 -2
- package/build/components/block-list/block.native.js.map +1 -1
- package/build/components/block-list/index.js +6 -5
- package/build/components/block-list/index.js.map +1 -1
- package/build/components/block-list/index.native.js +1 -9
- package/build/components/block-list/index.native.js.map +1 -1
- package/build/components/block-list/use-block-props/index.js +11 -8
- package/build/components/block-list/use-block-props/index.js.map +1 -1
- package/build/components/block-list/use-block-props/use-block-refs.js +17 -46
- package/build/components/block-list/use-block-props/use-block-refs.js.map +1 -1
- package/build/components/block-list/use-block-props/use-is-hovered.js +10 -14
- package/build/components/block-list/use-block-props/use-is-hovered.js.map +1 -1
- package/build/components/block-list/use-block-props/use-scroll-into-view.js +44 -0
- package/build/components/block-list/use-block-props/use-scroll-into-view.js.map +1 -0
- package/build/components/block-list-appender/index.js +2 -2
- package/build/components/block-list-appender/index.js.map +1 -1
- package/build/components/block-mover/button.js +2 -2
- package/build/components/block-mover/button.js.map +1 -1
- package/build/components/block-mover/index.js +2 -2
- package/build/components/block-mover/index.js.map +1 -1
- package/build/components/block-mover/index.native.js +3 -1
- package/build/components/block-mover/index.native.js.map +1 -1
- package/build/components/block-patterns-list/index.js +26 -5
- package/build/components/block-patterns-list/index.js.map +1 -1
- package/build/components/block-popover/cover.js +9 -6
- package/build/components/block-popover/cover.js.map +1 -1
- package/build/components/block-popover/inbetween.js +2 -2
- package/build/components/block-popover/inbetween.js.map +1 -1
- package/build/components/block-popover/index.js +22 -4
- package/build/components/block-popover/index.js.map +1 -1
- package/build/components/block-preview/index.js +2 -2
- package/build/components/block-preview/index.js.map +1 -1
- package/build/components/block-settings-menu/block-settings-dropdown.js +8 -30
- package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build/components/block-settings-menu-controls/index.js +10 -7
- package/build/components/block-settings-menu-controls/index.js.map +1 -1
- package/build/components/block-styles/index.js +2 -2
- package/build/components/block-styles/index.js.map +1 -1
- package/build/components/block-switcher/pattern-transformations-menu.js +3 -1
- package/build/components/block-switcher/pattern-transformations-menu.js.map +1 -1
- package/build/components/block-switcher/use-transformed-patterns.js +6 -2
- package/build/components/block-switcher/use-transformed-patterns.js.map +1 -1
- package/build/components/block-switcher/utils.js +15 -5
- package/build/components/block-switcher/utils.js.map +1 -1
- package/build/components/block-toolbar/index.js +3 -3
- package/build/components/block-toolbar/index.js.map +1 -1
- package/build/components/block-toolbar/use-has-block-toolbar.js +14 -9
- package/build/components/block-toolbar/use-has-block-toolbar.js.map +1 -1
- package/build/components/block-tools/block-selection-button.js +2 -2
- package/build/components/block-tools/block-selection-button.js.map +1 -1
- package/build/components/block-tools/block-toolbar-breadcrumb.js +4 -4
- package/build/components/block-tools/block-toolbar-breadcrumb.js.map +1 -1
- package/build/components/block-tools/block-toolbar-popover.js +2 -2
- package/build/components/block-tools/block-toolbar-popover.js.map +1 -1
- package/build/components/block-tools/empty-block-inserter.js +2 -2
- package/build/components/block-tools/empty-block-inserter.js.map +1 -1
- package/build/components/block-tools/index.js +23 -2
- package/build/components/block-tools/index.js.map +1 -1
- package/build/components/block-tools/insertion-point.js +4 -4
- package/build/components/block-tools/insertion-point.js.map +1 -1
- package/build/components/block-tools/use-show-block-tools.js +2 -5
- package/build/components/block-tools/use-show-block-tools.js.map +1 -1
- package/build/components/block-tools/zoom-out-mode-inserters.js +68 -20
- package/build/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
- package/build/components/block-variation-picker/index.js +5 -4
- package/build/components/block-variation-picker/index.js.map +1 -1
- package/build/components/block-variation-transforms/index.js +3 -1
- package/build/components/block-variation-transforms/index.js.map +1 -1
- package/build/components/button-block-appender/index.js +2 -2
- package/build/components/button-block-appender/index.js.map +1 -1
- package/build/components/child-layout-control/index.js +2 -2
- package/build/components/child-layout-control/index.js.map +1 -1
- package/build/components/colors-gradients/control.js +3 -3
- package/build/components/colors-gradients/control.js.map +1 -1
- package/build/components/colors-gradients/dropdown.js +2 -2
- package/build/components/colors-gradients/dropdown.js.map +1 -1
- package/build/components/colors-gradients/panel-color-gradient-settings.js +2 -2
- package/build/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
- package/build/components/convert-to-group-buttons/index.js +6 -0
- package/build/components/convert-to-group-buttons/index.js.map +1 -1
- package/build/components/default-block-appender/index.js +2 -2
- package/build/components/default-block-appender/index.js.map +1 -1
- package/build/components/dimensions-tool/aspect-ratio-tool.js +30 -36
- package/build/components/dimensions-tool/aspect-ratio-tool.js.map +1 -1
- package/build/components/floating-toolbar/index.native.js +9 -5
- package/build/components/floating-toolbar/index.native.js.map +1 -1
- package/build/components/global-styles/background-panel.js +4 -4
- package/build/components/global-styles/background-panel.js.map +1 -1
- package/build/components/global-styles/color-panel.js +6 -4
- package/build/components/global-styles/color-panel.js.map +1 -1
- package/build/components/global-styles/dimensions-panel.js +20 -4
- package/build/components/global-styles/dimensions-panel.js.map +1 -1
- package/build/components/global-styles/filters-panel.js +2 -2
- package/build/components/global-styles/filters-panel.js.map +1 -1
- package/build/components/global-styles/hooks.js +3 -2
- package/build/components/global-styles/hooks.js.map +1 -1
- package/build/components/global-styles/shadow-panel-components.js +4 -4
- package/build/components/global-styles/shadow-panel-components.js.map +1 -1
- package/build/components/global-styles/typography-panel.js +23 -23
- package/build/components/global-styles/typography-panel.js.map +1 -1
- package/build/components/global-styles/use-global-styles-output.js +149 -132
- package/build/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build/components/global-styles/utils.js +45 -0
- package/build/components/global-styles/utils.js.map +1 -1
- package/build/components/grid-visualizer/grid-item-resizer.js +141 -24
- package/build/components/grid-visualizer/grid-item-resizer.js.map +1 -1
- package/build/components/grid-visualizer/grid-visualizer.js +11 -5
- package/build/components/grid-visualizer/grid-visualizer.js.map +1 -1
- package/build/components/iframe/index.js +69 -30
- package/build/components/iframe/index.js.map +1 -1
- package/build/components/image-editor/aspect-ratio-dropdown.js +53 -36
- package/build/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
- package/build/components/image-editor/cropper.js +2 -2
- package/build/components/image-editor/cropper.js.map +1 -1
- package/build/components/image-editor/index.js +1 -1
- package/build/components/image-editor/index.js.map +1 -1
- package/build/components/index.js +8 -0
- package/build/components/index.js.map +1 -1
- package/build/components/inner-blocks/button-block-appender.js +2 -2
- package/build/components/inner-blocks/button-block-appender.js.map +1 -1
- package/build/components/inner-blocks/index.js +25 -10
- package/build/components/inner-blocks/index.js.map +1 -1
- package/build/components/inserter/block-patterns-explorer/pattern-list.js +1 -1
- package/build/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/index.js +20 -30
- package/build/components/inserter/block-patterns-tab/index.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/pattern-category-previews.js +1 -1
- package/build/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
- package/build/components/inserter/block-types-tab.js +9 -3
- package/build/components/inserter/block-types-tab.js.map +1 -1
- package/build/components/inserter/category-tabs/index.js +56 -0
- package/build/components/inserter/category-tabs/index.js.map +1 -0
- package/build/components/inserter/hooks/use-insertion-point.js +11 -2
- package/build/components/inserter/hooks/use-insertion-point.js.map +1 -1
- package/build/components/inserter/hooks/use-patterns-state.js +12 -5
- package/build/components/inserter/hooks/use-patterns-state.js.map +1 -1
- package/build/components/inserter/index.js +2 -2
- package/build/components/inserter/index.js.map +1 -1
- package/build/components/inserter/library.js +8 -2
- package/build/components/inserter/library.js.map +1 -1
- package/build/components/inserter/media-tab/index.js +2 -2
- package/build/components/inserter/media-tab/index.js.map +1 -1
- package/build/components/inserter/media-tab/media-panel.js +0 -25
- package/build/components/inserter/media-tab/media-panel.js.map +1 -1
- package/build/components/inserter/media-tab/media-preview.js +15 -5
- package/build/components/inserter/media-tab/media-preview.js.map +1 -1
- package/build/components/inserter/media-tab/media-tab.js +15 -29
- package/build/components/inserter/media-tab/media-tab.js.map +1 -1
- package/build/components/inserter/menu.js +115 -109
- package/build/components/inserter/menu.js.map +1 -1
- package/build/components/inserter/quick-inserter.js +2 -2
- package/build/components/inserter/quick-inserter.js.map +1 -1
- package/build/components/inserter/tabs.js +23 -11
- package/build/components/inserter/tabs.js.map +1 -1
- package/build/components/inserter-list-item/index.js +3 -3
- package/build/components/inserter-list-item/index.js.map +1 -1
- package/build/components/keyboard-shortcuts/index.js +9 -0
- package/build/components/keyboard-shortcuts/index.js.map +1 -1
- package/build/components/line-height-control/index.js +6 -2
- package/build/components/line-height-control/index.js.map +1 -1
- package/build/components/link-control/index.js +2 -2
- package/build/components/link-control/index.js.map +1 -1
- package/build/components/link-control/link-preview.js +3 -3
- package/build/components/link-control/link-preview.js.map +1 -1
- package/build/components/link-control/search-item.js +9 -3
- package/build/components/link-control/search-item.js.map +1 -1
- package/build/components/link-control/search-results.js +2 -2
- package/build/components/link-control/search-results.js.map +1 -1
- package/build/components/list-view/block-contents.js +2 -2
- package/build/components/list-view/block-contents.js.map +1 -1
- package/build/components/list-view/block-select-button.js +15 -172
- package/build/components/list-view/block-select-button.js.map +1 -1
- package/build/components/list-view/block.js +196 -21
- package/build/components/list-view/block.js.map +1 -1
- package/build/components/list-view/drop-indicator.js +3 -3
- package/build/components/list-view/drop-indicator.js.map +1 -1
- package/build/components/list-view/index.js +3 -3
- package/build/components/list-view/index.js.map +1 -1
- package/build/components/list-view/leaf.js +2 -2
- package/build/components/list-view/leaf.js.map +1 -1
- package/build/components/list-view/use-list-view-drop-zone.js +1 -1
- package/build/components/list-view/use-list-view-drop-zone.js.map +1 -1
- package/build/components/list-view/utils.js +3 -1
- package/build/components/list-view/utils.js.map +1 -1
- package/build/components/media-placeholder/index.js +7 -7
- package/build/components/media-placeholder/index.js.map +1 -1
- package/build/components/media-replace-flow/index.js +2 -2
- package/build/components/media-replace-flow/index.js.map +1 -1
- package/build/components/navigable-toolbar/index.js +3 -1
- package/build/components/navigable-toolbar/index.js.map +1 -1
- package/build/components/plain-text/index.js +2 -2
- package/build/components/plain-text/index.js.map +1 -1
- package/build/components/provider/block-refs-provider.js +3 -4
- package/build/components/provider/block-refs-provider.js.map +1 -1
- package/build/components/provider/use-block-sync.js +10 -1
- package/build/components/provider/use-block-sync.js.map +1 -1
- package/build/components/responsive-block-control/index.js +2 -2
- package/build/components/responsive-block-control/index.js.map +1 -1
- package/build/components/rich-text/event-listeners/before-input-rules.js +93 -0
- package/build/components/rich-text/event-listeners/before-input-rules.js.map +1 -0
- package/build/components/rich-text/event-listeners/delete.js +58 -0
- package/build/components/rich-text/event-listeners/delete.js.map +1 -0
- package/build/components/rich-text/event-listeners/enter.js +89 -0
- package/build/components/rich-text/event-listeners/enter.js.map +1 -0
- package/build/components/rich-text/event-listeners/firefox-compat.js +36 -0
- package/build/components/rich-text/event-listeners/firefox-compat.js.map +1 -0
- package/build/components/rich-text/event-listeners/index.js +44 -0
- package/build/components/rich-text/event-listeners/index.js.map +1 -0
- package/build/components/rich-text/event-listeners/input-events.js +22 -0
- package/build/components/rich-text/event-listeners/input-events.js.map +1 -0
- package/build/components/rich-text/event-listeners/input-rules.js +135 -0
- package/build/components/rich-text/event-listeners/input-rules.js.map +1 -0
- package/build/components/rich-text/event-listeners/insert-replacement-text.js +33 -0
- package/build/components/rich-text/event-listeners/insert-replacement-text.js.map +1 -0
- package/build/components/rich-text/event-listeners/paste-handler.js +126 -0
- package/build/components/rich-text/event-listeners/paste-handler.js.map +1 -0
- package/build/components/rich-text/event-listeners/remove-browser-shortcuts.js +27 -0
- package/build/components/rich-text/event-listeners/remove-browser-shortcuts.js.map +1 -0
- package/build/components/rich-text/event-listeners/shortcuts.js +22 -0
- package/build/components/rich-text/event-listeners/shortcuts.js.map +1 -0
- package/build/components/rich-text/event-listeners/undo-automatic-change.js +51 -0
- package/build/components/rich-text/event-listeners/undo-automatic-change.js.map +1 -0
- package/build/components/rich-text/format-toolbar/index.js +2 -2
- package/build/components/rich-text/format-toolbar/index.js.map +1 -1
- package/build/components/rich-text/index.js +20 -33
- package/build/components/rich-text/index.js.map +1 -1
- package/build/components/rich-text/index.native.js +15 -5
- package/build/components/rich-text/index.native.js.map +1 -1
- package/build/components/rich-text/multiline.js +36 -4
- package/build/components/rich-text/multiline.js.map +1 -1
- package/build/components/rich-text/native/index.native.js +12 -0
- package/build/components/rich-text/native/index.native.js.map +1 -1
- package/build/components/rich-text/use-format-types.js +8 -4
- package/build/components/rich-text/use-format-types.js.map +1 -1
- package/build/components/segmented-text-control/index.js +62 -0
- package/build/components/segmented-text-control/index.js.map +1 -0
- package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js +16 -2
- package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
- package/build/components/text-alignment-control/index.js +76 -0
- package/build/components/text-alignment-control/index.js.map +1 -0
- package/build/components/text-decoration-control/index.js +22 -26
- package/build/components/text-decoration-control/index.js.map +1 -1
- package/build/components/text-transform-control/index.js +19 -23
- package/build/components/text-transform-control/index.js.map +1 -1
- package/build/components/url-input/index.js +4 -4
- package/build/components/url-input/index.js.map +1 -1
- package/build/components/url-popover/link-editor.js +2 -2
- package/build/components/url-popover/link-editor.js.map +1 -1
- package/build/components/url-popover/link-viewer-url.js +2 -2
- package/build/components/url-popover/link-viewer-url.js.map +1 -1
- package/build/components/url-popover/link-viewer.js +2 -2
- package/build/components/url-popover/link-viewer.js.map +1 -1
- package/build/components/use-block-display-information/index.js +9 -3
- package/build/components/use-block-display-information/index.js.map +1 -1
- package/build/components/use-on-block-drop/index.js +3 -1
- package/build/components/use-on-block-drop/index.js.map +1 -1
- package/build/components/warning/index.js +2 -2
- package/build/components/warning/index.js.map +1 -1
- package/build/components/writing-flow/index.js +2 -2
- package/build/components/writing-flow/index.js.map +1 -1
- package/build/components/writing-flow/use-clipboard-handler.js +77 -30
- package/build/components/writing-flow/use-clipboard-handler.js.map +1 -1
- package/build/components/writing-flow/use-drag-selection.js +3 -1
- package/build/components/writing-flow/use-drag-selection.js.map +1 -1
- package/build/components/writing-flow/use-input.js +44 -2
- package/build/components/writing-flow/use-input.js.map +1 -1
- package/build/components/writing-flow/use-tab-nav.js +9 -2
- package/build/components/writing-flow/use-tab-nav.js.map +1 -1
- package/build/components/writing-mode-control/index.js +17 -21
- package/build/components/writing-mode-control/index.js.map +1 -1
- package/build/hooks/align.js +2 -2
- package/build/hooks/align.js.map +1 -1
- package/build/hooks/background.js +1 -1
- package/build/hooks/background.js.map +1 -1
- package/build/hooks/border.js +3 -3
- package/build/hooks/border.js.map +1 -1
- package/build/hooks/color.js +3 -3
- package/build/hooks/color.js.map +1 -1
- package/build/hooks/content-lock-ui.js +5 -28
- package/build/hooks/content-lock-ui.js.map +1 -1
- package/build/hooks/custom-class-name.js +2 -2
- package/build/hooks/custom-class-name.js.map +1 -1
- package/build/hooks/custom-class-name.native.js +2 -2
- package/build/hooks/custom-class-name.native.js.map +1 -1
- package/build/hooks/dimensions.js +2 -2
- package/build/hooks/dimensions.js.map +1 -1
- package/build/hooks/duotone.js +3 -1
- package/build/hooks/duotone.js.map +1 -1
- package/build/hooks/layout-child.js +16 -8
- package/build/hooks/layout-child.js.map +1 -1
- package/build/hooks/layout.js +2 -2
- package/build/hooks/layout.js.map +1 -1
- package/build/hooks/position.js +2 -2
- package/build/hooks/position.js.map +1 -1
- package/build/hooks/text-align.js +3 -3
- package/build/hooks/text-align.js.map +1 -1
- package/build/hooks/use-bindings-attributes.js +39 -13
- package/build/hooks/use-bindings-attributes.js.map +1 -1
- package/build/hooks/use-color-props.js +2 -2
- package/build/hooks/use-color-props.js.map +1 -1
- package/build/hooks/use-typography-props.js +2 -2
- package/build/hooks/use-typography-props.js.map +1 -1
- package/build/hooks/utils.js +13 -8
- package/build/hooks/utils.js.map +1 -1
- package/build/layouts/grid.js +7 -6
- package/build/layouts/grid.js.map +1 -1
- package/build/private-apis.js +8 -3
- package/build/private-apis.js.map +1 -1
- package/build/store/actions.js +143 -25
- package/build/store/actions.js.map +1 -1
- package/build/store/private-actions.js +26 -1
- package/build/store/private-actions.js.map +1 -1
- package/build/store/private-keys.js +2 -1
- package/build/store/private-keys.js.map +1 -1
- package/build/store/private-selectors.js +33 -6
- package/build/store/private-selectors.js.map +1 -1
- package/build/store/reducer.js +11 -8
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +25 -8
- package/build/store/selectors.js.map +1 -1
- package/build/utils/object.js +17 -0
- package/build/utils/object.js.map +1 -1
- package/build/utils/order-inserter-block-items.js +6 -2
- package/build/utils/order-inserter-block-items.js.map +1 -1
- package/build/utils/pasting.js +6 -2
- package/build/utils/pasting.js.map +1 -1
- package/build/utils/selection.js +8 -0
- package/build/utils/selection.js.map +1 -1
- package/build/utils/transform-styles/index.js +12 -7
- package/build/utils/transform-styles/index.js.map +1 -1
- package/build-module/components/alignment-control/ui.js +3 -1
- package/build-module/components/alignment-control/ui.js.map +1 -1
- package/build-module/components/block-actions/index.js +4 -2
- package/build-module/components/block-actions/index.js.map +1 -1
- package/build-module/components/block-alignment-control/ui.js +2 -2
- package/build-module/components/block-alignment-control/ui.js.map +1 -1
- package/build-module/components/block-card/index.js +2 -2
- package/build-module/components/block-card/index.js.map +1 -1
- package/build-module/components/block-compare/index.js +2 -2
- package/build-module/components/block-compare/index.js.map +1 -1
- package/build-module/components/block-edit/edit.js +2 -2
- package/build-module/components/block-edit/edit.js.map +1 -1
- package/build-module/components/block-icon/index.js +2 -2
- package/build-module/components/block-icon/index.js.map +1 -1
- package/build-module/components/block-list/block.js +4 -13
- package/build-module/components/block-list/block.js.map +1 -1
- package/build-module/components/block-list/block.native.js +2 -2
- package/build-module/components/block-list/block.native.js.map +1 -1
- package/build-module/components/block-list/index.js +6 -5
- package/build-module/components/block-list/index.js.map +1 -1
- package/build-module/components/block-list/index.native.js +1 -9
- package/build-module/components/block-list/index.native.js.map +1 -1
- package/build-module/components/block-list/use-block-props/index.js +11 -8
- package/build-module/components/block-list/use-block-props/index.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-block-refs.js +19 -48
- package/build-module/components/block-list/use-block-props/use-block-refs.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-is-hovered.js +10 -14
- package/build-module/components/block-list/use-block-props/use-is-hovered.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-scroll-into-view.js +37 -0
- package/build-module/components/block-list/use-block-props/use-scroll-into-view.js.map +1 -0
- package/build-module/components/block-list-appender/index.js +2 -2
- package/build-module/components/block-list-appender/index.js.map +1 -1
- package/build-module/components/block-mover/button.js +2 -2
- package/build-module/components/block-mover/button.js.map +1 -1
- package/build-module/components/block-mover/index.js +2 -2
- package/build-module/components/block-mover/index.js.map +1 -1
- package/build-module/components/block-mover/index.native.js +3 -1
- package/build-module/components/block-mover/index.native.js.map +1 -1
- package/build-module/components/block-patterns-list/index.js +27 -6
- package/build-module/components/block-patterns-list/index.js.map +1 -1
- package/build-module/components/block-popover/cover.js +9 -5
- package/build-module/components/block-popover/cover.js.map +1 -1
- package/build-module/components/block-popover/inbetween.js +2 -2
- package/build-module/components/block-popover/inbetween.js.map +1 -1
- package/build-module/components/block-popover/index.js +21 -3
- package/build-module/components/block-popover/index.js.map +1 -1
- package/build-module/components/block-preview/index.js +2 -2
- package/build-module/components/block-preview/index.js.map +1 -1
- package/build-module/components/block-settings-menu/block-settings-dropdown.js +9 -31
- package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build-module/components/block-settings-menu-controls/index.js +10 -7
- package/build-module/components/block-settings-menu-controls/index.js.map +1 -1
- package/build-module/components/block-styles/index.js +2 -2
- package/build-module/components/block-styles/index.js.map +1 -1
- package/build-module/components/block-switcher/pattern-transformations-menu.js +3 -1
- package/build-module/components/block-switcher/pattern-transformations-menu.js.map +1 -1
- package/build-module/components/block-switcher/use-transformed-patterns.js +6 -2
- package/build-module/components/block-switcher/use-transformed-patterns.js.map +1 -1
- package/build-module/components/block-switcher/utils.js +15 -5
- package/build-module/components/block-switcher/utils.js.map +1 -1
- package/build-module/components/block-toolbar/index.js +3 -3
- package/build-module/components/block-toolbar/index.js.map +1 -1
- package/build-module/components/block-toolbar/use-has-block-toolbar.js +14 -9
- package/build-module/components/block-toolbar/use-has-block-toolbar.js.map +1 -1
- package/build-module/components/block-tools/block-selection-button.js +2 -2
- package/build-module/components/block-tools/block-selection-button.js.map +1 -1
- package/build-module/components/block-tools/block-toolbar-breadcrumb.js +4 -4
- package/build-module/components/block-tools/block-toolbar-breadcrumb.js.map +1 -1
- package/build-module/components/block-tools/block-toolbar-popover.js +2 -2
- package/build-module/components/block-tools/block-toolbar-popover.js.map +1 -1
- package/build-module/components/block-tools/empty-block-inserter.js +2 -2
- package/build-module/components/block-tools/empty-block-inserter.js.map +1 -1
- package/build-module/components/block-tools/index.js +23 -2
- package/build-module/components/block-tools/index.js.map +1 -1
- package/build-module/components/block-tools/insertion-point.js +4 -4
- package/build-module/components/block-tools/insertion-point.js.map +1 -1
- package/build-module/components/block-tools/use-show-block-tools.js +2 -5
- package/build-module/components/block-tools/use-show-block-tools.js.map +1 -1
- package/build-module/components/block-tools/zoom-out-mode-inserters.js +69 -21
- package/build-module/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
- package/build-module/components/block-variation-picker/index.js +5 -4
- package/build-module/components/block-variation-picker/index.js.map +1 -1
- package/build-module/components/block-variation-transforms/index.js +3 -1
- package/build-module/components/block-variation-transforms/index.js.map +1 -1
- package/build-module/components/button-block-appender/index.js +2 -2
- package/build-module/components/button-block-appender/index.js.map +1 -1
- package/build-module/components/child-layout-control/index.js +2 -2
- package/build-module/components/child-layout-control/index.js.map +1 -1
- package/build-module/components/colors-gradients/control.js +3 -3
- package/build-module/components/colors-gradients/control.js.map +1 -1
- package/build-module/components/colors-gradients/dropdown.js +2 -2
- package/build-module/components/colors-gradients/dropdown.js.map +1 -1
- package/build-module/components/colors-gradients/panel-color-gradient-settings.js +2 -2
- package/build-module/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
- package/build-module/components/convert-to-group-buttons/index.js +7 -1
- package/build-module/components/convert-to-group-buttons/index.js.map +1 -1
- package/build-module/components/default-block-appender/index.js +2 -2
- package/build-module/components/default-block-appender/index.js.map +1 -1
- package/build-module/components/dimensions-tool/aspect-ratio-tool.js +30 -36
- package/build-module/components/dimensions-tool/aspect-ratio-tool.js.map +1 -1
- package/build-module/components/floating-toolbar/index.native.js +9 -5
- package/build-module/components/floating-toolbar/index.native.js.map +1 -1
- package/build-module/components/global-styles/background-panel.js +4 -4
- package/build-module/components/global-styles/background-panel.js.map +1 -1
- package/build-module/components/global-styles/color-panel.js +6 -4
- package/build-module/components/global-styles/color-panel.js.map +1 -1
- package/build-module/components/global-styles/dimensions-panel.js +21 -5
- package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
- package/build-module/components/global-styles/filters-panel.js +2 -2
- package/build-module/components/global-styles/filters-panel.js.map +1 -1
- package/build-module/components/global-styles/hooks.js +3 -2
- package/build-module/components/global-styles/hooks.js.map +1 -1
- package/build-module/components/global-styles/shadow-panel-components.js +4 -4
- package/build-module/components/global-styles/shadow-panel-components.js.map +1 -1
- package/build-module/components/global-styles/typography-panel.js +24 -24
- package/build-module/components/global-styles/typography-panel.js.map +1 -1
- package/build-module/components/global-styles/use-global-styles-output.js +149 -132
- package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build-module/components/global-styles/utils.js +44 -0
- package/build-module/components/global-styles/utils.js.map +1 -1
- package/build-module/components/grid-visualizer/grid-item-resizer.js +141 -24
- package/build-module/components/grid-visualizer/grid-item-resizer.js.map +1 -1
- package/build-module/components/grid-visualizer/grid-visualizer.js +12 -6
- package/build-module/components/grid-visualizer/grid-visualizer.js.map +1 -1
- package/build-module/components/iframe/index.js +70 -31
- package/build-module/components/iframe/index.js.map +1 -1
- package/build-module/components/image-editor/aspect-ratio-dropdown.js +52 -36
- package/build-module/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
- package/build-module/components/image-editor/cropper.js +2 -2
- package/build-module/components/image-editor/cropper.js.map +1 -1
- package/build-module/components/image-editor/index.js +1 -1
- package/build-module/components/image-editor/index.js.map +1 -1
- package/build-module/components/index.js +1 -0
- package/build-module/components/index.js.map +1 -1
- package/build-module/components/inner-blocks/button-block-appender.js +2 -2
- package/build-module/components/inner-blocks/button-block-appender.js.map +1 -1
- package/build-module/components/inner-blocks/index.js +25 -10
- package/build-module/components/inner-blocks/index.js.map +1 -1
- package/build-module/components/inserter/block-patterns-explorer/pattern-list.js +1 -1
- package/build-module/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab/index.js +21 -31
- package/build-module/components/inserter/block-patterns-tab/index.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js +1 -1
- package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
- package/build-module/components/inserter/block-types-tab.js +10 -4
- package/build-module/components/inserter/block-types-tab.js.map +1 -1
- package/build-module/components/inserter/category-tabs/index.js +49 -0
- package/build-module/components/inserter/category-tabs/index.js.map +1 -0
- package/build-module/components/inserter/hooks/use-insertion-point.js +11 -2
- package/build-module/components/inserter/hooks/use-insertion-point.js.map +1 -1
- package/build-module/components/inserter/hooks/use-patterns-state.js +12 -5
- package/build-module/components/inserter/hooks/use-patterns-state.js.map +1 -1
- package/build-module/components/inserter/index.js +2 -2
- package/build-module/components/inserter/index.js.map +1 -1
- package/build-module/components/inserter/library.js +8 -2
- package/build-module/components/inserter/library.js.map +1 -1
- package/build-module/components/inserter/media-tab/index.js +1 -1
- package/build-module/components/inserter/media-tab/index.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-panel.js +0 -24
- package/build-module/components/inserter/media-tab/media-panel.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-preview.js +15 -5
- package/build-module/components/inserter/media-tab/media-preview.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-tab.js +17 -31
- package/build-module/components/inserter/media-tab/media-tab.js.map +1 -1
- package/build-module/components/inserter/menu.js +117 -111
- package/build-module/components/inserter/menu.js.map +1 -1
- package/build-module/components/inserter/quick-inserter.js +2 -2
- package/build-module/components/inserter/quick-inserter.js.map +1 -1
- package/build-module/components/inserter/tabs.js +24 -12
- package/build-module/components/inserter/tabs.js.map +1 -1
- package/build-module/components/inserter-list-item/index.js +3 -3
- package/build-module/components/inserter-list-item/index.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/index.js +9 -0
- package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
- package/build-module/components/line-height-control/index.js +6 -2
- package/build-module/components/line-height-control/index.js.map +1 -1
- package/build-module/components/link-control/index.js +2 -2
- package/build-module/components/link-control/index.js.map +1 -1
- package/build-module/components/link-control/link-preview.js +3 -3
- package/build-module/components/link-control/link-preview.js.map +1 -1
- package/build-module/components/link-control/search-item.js +9 -3
- package/build-module/components/link-control/search-item.js.map +1 -1
- package/build-module/components/link-control/search-results.js +2 -2
- package/build-module/components/link-control/search-results.js.map +1 -1
- package/build-module/components/list-view/block-contents.js +2 -2
- package/build-module/components/list-view/block-contents.js.map +1 -1
- package/build-module/components/list-view/block-select-button.js +17 -174
- package/build-module/components/list-view/block-select-button.js.map +1 -1
- package/build-module/components/list-view/block.js +198 -23
- package/build-module/components/list-view/block.js.map +1 -1
- package/build-module/components/list-view/drop-indicator.js +3 -3
- package/build-module/components/list-view/drop-indicator.js.map +1 -1
- package/build-module/components/list-view/index.js +3 -3
- package/build-module/components/list-view/index.js.map +1 -1
- package/build-module/components/list-view/leaf.js +2 -2
- package/build-module/components/list-view/leaf.js.map +1 -1
- package/build-module/components/list-view/use-list-view-drop-zone.js +1 -1
- package/build-module/components/list-view/use-list-view-drop-zone.js.map +1 -1
- package/build-module/components/list-view/utils.js +3 -1
- package/build-module/components/list-view/utils.js.map +1 -1
- package/build-module/components/media-placeholder/index.js +7 -7
- package/build-module/components/media-placeholder/index.js.map +1 -1
- package/build-module/components/media-replace-flow/index.js +2 -2
- package/build-module/components/media-replace-flow/index.js.map +1 -1
- package/build-module/components/navigable-toolbar/index.js +3 -1
- package/build-module/components/navigable-toolbar/index.js.map +1 -1
- package/build-module/components/plain-text/index.js +2 -2
- package/build-module/components/plain-text/index.js.map +1 -1
- package/build-module/components/provider/block-refs-provider.js +3 -4
- package/build-module/components/provider/block-refs-provider.js.map +1 -1
- package/build-module/components/provider/use-block-sync.js +10 -1
- package/build-module/components/provider/use-block-sync.js.map +1 -1
- package/build-module/components/responsive-block-control/index.js +2 -2
- package/build-module/components/responsive-block-control/index.js.map +1 -1
- package/build-module/components/rich-text/event-listeners/before-input-rules.js +86 -0
- package/build-module/components/rich-text/event-listeners/before-input-rules.js.map +1 -0
- package/build-module/components/rich-text/event-listeners/delete.js +51 -0
- package/build-module/components/rich-text/event-listeners/delete.js.map +1 -0
- package/build-module/components/rich-text/event-listeners/enter.js +82 -0
- package/build-module/components/rich-text/event-listeners/enter.js.map +1 -0
- package/build-module/components/rich-text/event-listeners/firefox-compat.js +29 -0
- package/build-module/components/rich-text/event-listeners/firefox-compat.js.map +1 -0
- package/build-module/components/rich-text/event-listeners/index.js +36 -0
- package/build-module/components/rich-text/event-listeners/index.js.map +1 -0
- package/build-module/components/rich-text/event-listeners/input-events.js +15 -0
- package/build-module/components/rich-text/event-listeners/input-events.js.map +1 -0
- package/build-module/components/rich-text/event-listeners/input-rules.js +127 -0
- package/build-module/components/rich-text/event-listeners/input-rules.js.map +1 -0
- package/build-module/components/rich-text/event-listeners/insert-replacement-text.js +27 -0
- package/build-module/components/rich-text/event-listeners/insert-replacement-text.js.map +1 -0
- package/build-module/components/rich-text/event-listeners/paste-handler.js +122 -0
- package/build-module/components/rich-text/event-listeners/paste-handler.js.map +1 -0
- package/build-module/components/rich-text/event-listeners/remove-browser-shortcuts.js +21 -0
- package/build-module/components/rich-text/event-listeners/remove-browser-shortcuts.js.map +1 -0
- package/build-module/components/rich-text/event-listeners/shortcuts.js +15 -0
- package/build-module/components/rich-text/event-listeners/shortcuts.js.map +1 -0
- package/build-module/components/rich-text/event-listeners/undo-automatic-change.js +45 -0
- package/build-module/components/rich-text/event-listeners/undo-automatic-change.js.map +1 -0
- package/build-module/components/rich-text/format-toolbar/index.js +2 -2
- package/build-module/components/rich-text/format-toolbar/index.js.map +1 -1
- package/build-module/components/rich-text/index.js +21 -34
- package/build-module/components/rich-text/index.js.map +1 -1
- package/build-module/components/rich-text/index.native.js +15 -5
- package/build-module/components/rich-text/index.native.js.map +1 -1
- package/build-module/components/rich-text/multiline.js +37 -5
- package/build-module/components/rich-text/multiline.js.map +1 -1
- package/build-module/components/rich-text/native/index.native.js +12 -0
- package/build-module/components/rich-text/native/index.native.js.map +1 -1
- package/build-module/components/rich-text/use-format-types.js +8 -4
- package/build-module/components/rich-text/use-format-types.js.map +1 -1
- package/build-module/components/segmented-text-control/index.js +55 -0
- package/build-module/components/segmented-text-control/index.js.map +1 -0
- package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js +16 -2
- package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
- package/build-module/components/text-alignment-control/index.js +68 -0
- package/build-module/components/text-alignment-control/index.js.map +1 -0
- package/build-module/components/text-decoration-control/index.js +22 -26
- package/build-module/components/text-decoration-control/index.js.map +1 -1
- package/build-module/components/text-transform-control/index.js +19 -23
- package/build-module/components/text-transform-control/index.js.map +1 -1
- package/build-module/components/url-input/index.js +4 -4
- package/build-module/components/url-input/index.js.map +1 -1
- package/build-module/components/url-popover/link-editor.js +2 -2
- package/build-module/components/url-popover/link-editor.js.map +1 -1
- package/build-module/components/url-popover/link-viewer-url.js +2 -2
- package/build-module/components/url-popover/link-viewer-url.js.map +1 -1
- package/build-module/components/url-popover/link-viewer.js +2 -2
- package/build-module/components/url-popover/link-viewer.js.map +1 -1
- package/build-module/components/use-block-display-information/index.js +9 -3
- package/build-module/components/use-block-display-information/index.js.map +1 -1
- package/build-module/components/use-on-block-drop/index.js +3 -1
- package/build-module/components/use-on-block-drop/index.js.map +1 -1
- package/build-module/components/warning/index.js +2 -2
- package/build-module/components/warning/index.js.map +1 -1
- package/build-module/components/writing-flow/index.js +2 -2
- package/build-module/components/writing-flow/index.js.map +1 -1
- package/build-module/components/writing-flow/use-clipboard-handler.js +78 -31
- package/build-module/components/writing-flow/use-clipboard-handler.js.map +1 -1
- package/build-module/components/writing-flow/use-drag-selection.js +3 -1
- package/build-module/components/writing-flow/use-drag-selection.js.map +1 -1
- package/build-module/components/writing-flow/use-input.js +45 -3
- package/build-module/components/writing-flow/use-input.js.map +1 -1
- package/build-module/components/writing-flow/use-tab-nav.js +9 -2
- package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
- package/build-module/components/writing-mode-control/index.js +17 -21
- package/build-module/components/writing-mode-control/index.js.map +1 -1
- package/build-module/hooks/align.js +2 -2
- package/build-module/hooks/align.js.map +1 -1
- package/build-module/hooks/background.js +1 -1
- package/build-module/hooks/background.js.map +1 -1
- package/build-module/hooks/border.js +3 -3
- package/build-module/hooks/border.js.map +1 -1
- package/build-module/hooks/color.js +3 -3
- package/build-module/hooks/color.js.map +1 -1
- package/build-module/hooks/content-lock-ui.js +5 -28
- package/build-module/hooks/content-lock-ui.js.map +1 -1
- package/build-module/hooks/custom-class-name.js +2 -2
- package/build-module/hooks/custom-class-name.js.map +1 -1
- package/build-module/hooks/custom-class-name.native.js +2 -2
- package/build-module/hooks/custom-class-name.native.js.map +1 -1
- package/build-module/hooks/dimensions.js +2 -2
- package/build-module/hooks/dimensions.js.map +1 -1
- package/build-module/hooks/duotone.js +3 -1
- package/build-module/hooks/duotone.js.map +1 -1
- package/build-module/hooks/layout-child.js +16 -8
- package/build-module/hooks/layout-child.js.map +1 -1
- package/build-module/hooks/layout.js +2 -2
- package/build-module/hooks/layout.js.map +1 -1
- package/build-module/hooks/position.js +2 -2
- package/build-module/hooks/position.js.map +1 -1
- package/build-module/hooks/text-align.js +3 -3
- package/build-module/hooks/text-align.js.map +1 -1
- package/build-module/hooks/use-bindings-attributes.js +39 -13
- package/build-module/hooks/use-bindings-attributes.js.map +1 -1
- package/build-module/hooks/use-color-props.js +2 -2
- package/build-module/hooks/use-color-props.js.map +1 -1
- package/build-module/hooks/use-typography-props.js +2 -2
- package/build-module/hooks/use-typography-props.js.map +1 -1
- package/build-module/hooks/utils.js +13 -8
- package/build-module/hooks/utils.js.map +1 -1
- package/build-module/layouts/grid.js +7 -6
- package/build-module/layouts/grid.js.map +1 -1
- package/build-module/private-apis.js +9 -4
- package/build-module/private-apis.js.map +1 -1
- package/build-module/store/actions.js +145 -27
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/private-actions.js +24 -0
- package/build-module/store/private-actions.js.map +1 -1
- package/build-module/store/private-keys.js +1 -0
- package/build-module/store/private-keys.js.map +1 -1
- package/build-module/store/private-selectors.js +32 -5
- package/build-module/store/private-selectors.js.map +1 -1
- package/build-module/store/reducer.js +11 -8
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +25 -8
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/utils/object.js +16 -0
- package/build-module/utils/object.js.map +1 -1
- package/build-module/utils/order-inserter-block-items.js +6 -2
- package/build-module/utils/order-inserter-block-items.js.map +1 -1
- package/build-module/utils/pasting.js +6 -2
- package/build-module/utils/pasting.js.map +1 -1
- package/build-module/utils/selection.js +7 -0
- package/build-module/utils/selection.js.map +1 -1
- package/build-module/utils/transform-styles/index.js +12 -7
- package/build-module/utils/transform-styles/index.js.map +1 -1
- package/build-style/content-rtl.css +124 -158
- package/build-style/content.css +124 -158
- package/build-style/style-rtl.css +114 -203
- package/build-style/style.css +114 -203
- package/build-types/components/block-context/index.d.ts +1 -1
- package/build-types/components/block-context/index.d.ts.map +1 -1
- package/package.json +32 -32
- package/src/components/alignment-control/ui.js +3 -1
- package/src/components/block-actions/index.js +5 -1
- package/src/components/block-alignment-control/ui.js +2 -2
- package/src/components/block-bindings-toolbar-indicator/style.scss +1 -4
- package/src/components/block-canvas/style.scss +1 -3
- package/src/components/block-card/index.js +2 -2
- package/src/components/block-compare/index.js +2 -2
- package/src/components/block-content-overlay/content.scss +4 -37
- package/src/components/block-edit/edit.js +2 -2
- package/src/components/block-icon/index.js +2 -2
- package/src/components/block-list/block.js +6 -17
- package/src/components/block-list/block.native.js +2 -2
- package/src/components/block-list/content.scss +53 -72
- package/src/components/block-list/index.js +6 -6
- package/src/components/block-list/index.native.js +1 -6
- package/src/components/block-list/use-block-props/index.js +16 -6
- package/src/components/block-list/use-block-props/use-block-refs.js +17 -57
- package/src/components/block-list/use-block-props/use-is-hovered.js +11 -16
- package/src/components/block-list/use-block-props/use-scroll-into-view.js +38 -0
- package/src/components/block-list-appender/index.js +2 -2
- package/src/components/block-mover/button.js +2 -2
- package/src/components/block-mover/index.js +2 -2
- package/src/components/block-mover/index.native.js +3 -1
- package/src/components/block-patterns-list/index.js +29 -4
- package/src/components/block-patterns-list/style.scss +1 -3
- package/src/components/block-popover/README.md +1 -1
- package/src/components/block-popover/cover.js +22 -7
- package/src/components/block-popover/inbetween.js +2 -2
- package/src/components/block-popover/index.js +24 -6
- package/src/components/block-preview/index.js +2 -2
- package/src/components/block-preview/style.scss +13 -15
- package/src/components/block-settings-menu/block-settings-dropdown.js +15 -57
- package/src/components/block-settings-menu-controls/index.js +25 -16
- package/src/components/block-styles/index.js +2 -2
- package/src/components/block-switcher/pattern-transformations-menu.js +3 -1
- package/src/components/block-switcher/use-transformed-patterns.js +6 -2
- package/src/components/block-switcher/utils.js +14 -5
- package/src/components/block-toolbar/index.js +3 -3
- package/src/components/block-toolbar/style.scss +8 -11
- package/src/components/block-toolbar/use-has-block-toolbar.js +21 -16
- package/src/components/block-tools/block-selection-button.js +2 -2
- package/src/components/block-tools/block-toolbar-breadcrumb.js +5 -5
- package/src/components/block-tools/block-toolbar-popover.js +4 -7
- package/src/components/block-tools/empty-block-inserter.js +2 -2
- package/src/components/block-tools/index.js +27 -4
- package/src/components/block-tools/insertion-point.js +4 -4
- package/src/components/block-tools/style.scss +8 -0
- package/src/components/block-tools/use-show-block-tools.js +36 -48
- package/src/components/block-tools/zoom-out-mode-inserters.js +74 -18
- package/src/components/block-variation-picker/content.scss +22 -72
- package/src/components/block-variation-picker/index.js +5 -4
- package/src/components/block-variation-transforms/index.js +3 -1
- package/src/components/button-block-appender/index.js +2 -2
- package/src/components/child-layout-control/index.js +14 -2
- package/src/components/colors-gradients/control.js +3 -3
- package/src/components/colors-gradients/dropdown.js +2 -2
- package/src/components/colors-gradients/panel-color-gradient-settings.js +2 -2
- package/src/components/colors-gradients/test/control.js +3 -3
- package/src/components/convert-to-group-buttons/index.js +10 -1
- package/src/components/default-block-appender/index.js +2 -2
- package/src/components/dimensions-tool/aspect-ratio-tool.js +40 -67
- package/src/components/dimensions-tool/test/index.js +10 -0
- package/src/components/editable-text/README.md +0 -4
- package/src/components/floating-toolbar/index.native.js +5 -2
- package/src/components/global-styles/background-panel.js +4 -6
- package/src/components/global-styles/color-panel.js +6 -4
- package/src/components/global-styles/dimensions-panel.js +22 -5
- package/src/components/global-styles/filters-panel.js +2 -2
- package/src/components/global-styles/hooks.js +2 -0
- package/src/components/global-styles/shadow-panel-components.js +6 -9
- package/src/components/global-styles/test/get-global-styles-changes.js +0 -2
- package/src/components/global-styles/test/use-global-styles-output.js +5 -5
- package/src/components/global-styles/test/utils.js +21 -0
- package/src/components/global-styles/typography-panel.js +27 -23
- package/src/components/global-styles/use-global-styles-output.js +211 -187
- package/src/components/global-styles/utils.js +55 -0
- package/src/components/grid-visualizer/grid-item-resizer.js +169 -40
- package/src/components/grid-visualizer/grid-visualizer.js +19 -6
- package/src/components/iframe/content.scss +63 -0
- package/src/components/iframe/index.js +119 -39
- package/src/components/image-editor/aspect-ratio-dropdown.js +91 -59
- package/src/components/image-editor/cropper.js +2 -2
- package/src/components/image-editor/index.js +1 -1
- package/src/components/image-editor/test/index.js +22 -0
- package/src/components/index.js +1 -0
- package/src/components/inner-blocks/button-block-appender.js +2 -2
- package/src/components/inner-blocks/index.js +24 -9
- package/src/components/inserter/block-patterns-explorer/pattern-list.js +2 -1
- package/src/components/inserter/block-patterns-tab/index.js +30 -64
- package/src/components/inserter/block-patterns-tab/pattern-category-previews.js +2 -1
- package/src/components/inserter/block-types-tab.js +12 -9
- package/src/components/inserter/category-tabs/index.js +74 -0
- package/src/components/inserter/hooks/use-insertion-point.js +15 -1
- package/src/components/inserter/hooks/use-patterns-state.js +18 -5
- package/src/components/inserter/index.js +4 -5
- package/src/components/inserter/library.js +6 -0
- package/src/components/inserter/media-tab/index.js +1 -1
- package/src/components/inserter/media-tab/media-panel.js +0 -22
- package/src/components/inserter/media-tab/media-preview.js +17 -9
- package/src/components/inserter/media-tab/media-tab.js +44 -83
- package/src/components/inserter/menu.js +168 -140
- package/src/components/inserter/quick-inserter.js +2 -2
- package/src/components/inserter/style.scss +96 -178
- package/src/components/inserter/tabs.js +33 -27
- package/src/components/inserter-list-item/index.js +3 -3
- package/src/components/keyboard-shortcuts/index.js +12 -0
- package/src/components/line-height-control/index.js +6 -2
- package/src/components/line-height-control/test/index.js +16 -14
- package/src/components/link-control/index.js +2 -2
- package/src/components/link-control/link-preview.js +3 -3
- package/src/components/link-control/search-item.js +9 -3
- package/src/components/link-control/search-results.js +2 -2
- package/src/components/list-view/block-contents.js +2 -2
- package/src/components/list-view/block-select-button.js +85 -267
- package/src/components/list-view/block.js +240 -26
- package/src/components/list-view/drop-indicator.js +3 -3
- package/src/components/list-view/index.js +3 -3
- package/src/components/list-view/leaf.js +2 -5
- package/src/components/list-view/style.scss +20 -28
- package/src/components/list-view/use-list-view-drop-zone.js +1 -1
- package/src/components/list-view/utils.js +3 -1
- package/src/components/media-placeholder/content.scss +0 -11
- package/src/components/media-placeholder/index.js +7 -7
- package/src/components/media-replace-flow/index.js +2 -2
- package/src/components/navigable-toolbar/index.js +3 -1
- package/src/components/plain-text/index.js +2 -2
- package/src/components/provider/block-refs-provider.js +3 -8
- package/src/components/provider/test/use-block-sync.js +7 -0
- package/src/components/provider/use-block-sync.js +10 -1
- package/src/components/responsive-block-control/index.js +2 -2
- package/src/components/rich-text/README.md +0 -8
- package/src/components/rich-text/event-listeners/before-input-rules.js +92 -0
- package/src/components/rich-text/event-listeners/delete.js +53 -0
- package/src/components/rich-text/event-listeners/enter.js +84 -0
- package/src/components/rich-text/event-listeners/firefox-compat.js +31 -0
- package/src/components/rich-text/event-listeners/index.js +56 -0
- package/src/components/rich-text/event-listeners/input-events.js +13 -0
- package/src/components/rich-text/event-listeners/input-rules.js +146 -0
- package/src/components/rich-text/event-listeners/insert-replacement-text.js +28 -0
- package/src/components/rich-text/event-listeners/paste-handler.js +132 -0
- package/src/components/rich-text/event-listeners/remove-browser-shortcuts.js +24 -0
- package/src/components/rich-text/event-listeners/shortcuts.js +13 -0
- package/src/components/rich-text/event-listeners/undo-automatic-change.js +45 -0
- package/src/components/rich-text/format-toolbar/index.js +2 -2
- package/src/components/rich-text/index.js +17 -37
- package/src/components/rich-text/index.native.js +13 -2
- package/src/components/rich-text/multiline.js +37 -5
- package/src/components/rich-text/native/index.native.js +11 -0
- package/src/components/rich-text/use-format-types.js +6 -2
- package/src/components/segmented-text-control/index.js +63 -0
- package/src/components/{writing-mode-control → segmented-text-control}/style.scss +2 -5
- package/src/components/spacing-sizes-control/input-controls/spacing-input-control.js +16 -1
- package/src/components/text-alignment-control/index.js +91 -0
- package/src/components/text-alignment-control/stories/index.story.js +39 -0
- package/src/components/text-decoration-control/index.js +22 -35
- package/src/components/text-transform-control/index.js +19 -32
- package/src/components/url-input/index.js +4 -4
- package/src/components/url-popover/link-editor.js +2 -2
- package/src/components/url-popover/link-viewer-url.js +2 -2
- package/src/components/url-popover/link-viewer.js +2 -2
- package/src/components/use-block-display-information/index.js +9 -3
- package/src/components/use-on-block-drop/index.js +3 -1
- package/src/components/warning/index.js +2 -2
- package/src/components/writing-flow/index.js +2 -2
- package/src/components/writing-flow/use-clipboard-handler.js +107 -47
- package/src/components/writing-flow/use-drag-selection.js +3 -1
- package/src/components/writing-flow/use-input.js +75 -1
- package/src/components/writing-flow/use-tab-nav.js +13 -2
- package/src/components/writing-mode-control/index.js +17 -33
- package/src/content.scss +1 -0
- package/src/hooks/align.js +2 -2
- package/src/hooks/background.js +1 -1
- package/src/hooks/border.js +3 -3
- package/src/hooks/color.js +12 -19
- package/src/hooks/color.scss +1 -0
- package/src/hooks/content-lock-ui.js +16 -33
- package/src/hooks/custom-class-name.js +2 -2
- package/src/hooks/custom-class-name.native.js +2 -2
- package/src/hooks/dimensions.js +2 -2
- package/src/hooks/duotone.js +3 -1
- package/src/hooks/layout-child.js +34 -20
- package/src/hooks/layout.js +2 -2
- package/src/hooks/position.js +2 -2
- package/src/hooks/text-align.js +3 -3
- package/src/hooks/use-bindings-attributes.js +48 -16
- package/src/hooks/use-color-props.js +2 -2
- package/src/hooks/use-typography-props.js +2 -2
- package/src/hooks/utils.js +18 -4
- package/src/layouts/grid.js +3 -7
- package/src/private-apis.js +8 -2
- package/src/store/actions.js +233 -54
- package/src/store/private-actions.js +24 -0
- package/src/store/private-keys.js +1 -0
- package/src/store/private-selectors.js +43 -4
- package/src/store/reducer.js +13 -23
- package/src/store/selectors.js +24 -9
- package/src/style.scss +1 -2
- package/src/utils/object.js +16 -0
- package/src/utils/order-inserter-block-items.js +6 -2
- package/src/utils/pasting.js +6 -2
- package/src/utils/selection.js +8 -0
- package/src/utils/test/__snapshots__/transform-styles.js.snap +6 -0
- package/src/utils/test/transform-styles.js +14 -0
- package/src/utils/transform-styles/index.js +12 -9
- package/tsconfig.tsbuildinfo +1 -1
- package/build/components/block-list/use-block-props/use-block-moving-mode-class-names.js +0 -54
- package/build/components/block-list/use-block-props/use-block-moving-mode-class-names.js.map +0 -1
- package/build/components/rich-text/split-value.js +0 -81
- package/build/components/rich-text/split-value.js.map +0 -1
- package/build/components/rich-text/use-before-input-rules.js +0 -98
- package/build/components/rich-text/use-before-input-rules.js.map +0 -1
- package/build/components/rich-text/use-delete.js +0 -64
- package/build/components/rich-text/use-delete.js.map +0 -1
- package/build/components/rich-text/use-enter.js +0 -109
- package/build/components/rich-text/use-enter.js.map +0 -1
- package/build/components/rich-text/use-firefox-compat.js +0 -44
- package/build/components/rich-text/use-firefox-compat.js.map +0 -1
- package/build/components/rich-text/use-input-events.js +0 -25
- package/build/components/rich-text/use-input-events.js.map +0 -1
- package/build/components/rich-text/use-input-rules.js +0 -139
- package/build/components/rich-text/use-input-rules.js.map +0 -1
- package/build/components/rich-text/use-insert-replacement-text.js +0 -38
- package/build/components/rich-text/use-insert-replacement-text.js.map +0 -1
- package/build/components/rich-text/use-paste-handler.js +0 -158
- package/build/components/rich-text/use-paste-handler.js.map +0 -1
- package/build/components/rich-text/use-remove-browser-shortcuts.js +0 -32
- package/build/components/rich-text/use-remove-browser-shortcuts.js.map +0 -1
- package/build/components/rich-text/use-shortcuts.js +0 -25
- package/build/components/rich-text/use-shortcuts.js.map +0 -1
- package/build/components/rich-text/use-undo-automatic-change.js +0 -53
- package/build/components/rich-text/use-undo-automatic-change.js.map +0 -1
- package/build-module/components/block-list/use-block-props/use-block-moving-mode-class-names.js +0 -47
- package/build-module/components/block-list/use-block-props/use-block-moving-mode-class-names.js.map +0 -1
- package/build-module/components/rich-text/split-value.js +0 -75
- package/build-module/components/rich-text/split-value.js.map +0 -1
- package/build-module/components/rich-text/use-before-input-rules.js +0 -92
- package/build-module/components/rich-text/use-before-input-rules.js.map +0 -1
- package/build-module/components/rich-text/use-delete.js +0 -57
- package/build-module/components/rich-text/use-delete.js.map +0 -1
- package/build-module/components/rich-text/use-enter.js +0 -102
- package/build-module/components/rich-text/use-enter.js.map +0 -1
- package/build-module/components/rich-text/use-firefox-compat.js +0 -37
- package/build-module/components/rich-text/use-firefox-compat.js.map +0 -1
- package/build-module/components/rich-text/use-input-events.js +0 -18
- package/build-module/components/rich-text/use-input-events.js.map +0 -1
- package/build-module/components/rich-text/use-input-rules.js +0 -132
- package/build-module/components/rich-text/use-input-rules.js.map +0 -1
- package/build-module/components/rich-text/use-insert-replacement-text.js +0 -32
- package/build-module/components/rich-text/use-insert-replacement-text.js.map +0 -1
- package/build-module/components/rich-text/use-paste-handler.js +0 -152
- package/build-module/components/rich-text/use-paste-handler.js.map +0 -1
- package/build-module/components/rich-text/use-remove-browser-shortcuts.js +0 -26
- package/build-module/components/rich-text/use-remove-browser-shortcuts.js.map +0 -1
- package/build-module/components/rich-text/use-shortcuts.js +0 -18
- package/build-module/components/rich-text/use-shortcuts.js.map +0 -1
- package/build-module/components/rich-text/use-undo-automatic-change.js +0 -46
- package/build-module/components/rich-text/use-undo-automatic-change.js.map +0 -1
- package/src/components/block-list/use-block-props/use-block-moving-mode-class-names.js +0 -55
- package/src/components/rich-text/split-value.js +0 -64
- package/src/components/rich-text/use-before-input-rules.js +0 -99
- package/src/components/rich-text/use-delete.js +0 -59
- package/src/components/rich-text/use-enter.js +0 -110
- package/src/components/rich-text/use-firefox-compat.js +0 -39
- package/src/components/rich-text/use-input-events.js +0 -19
- package/src/components/rich-text/use-input-rules.js +0 -150
- package/src/components/rich-text/use-insert-replacement-text.js +0 -31
- package/src/components/rich-text/use-paste-handler.js +0 -180
- package/src/components/rich-text/use-remove-browser-shortcuts.js +0 -29
- package/src/components/rich-text/use-shortcuts.js +0 -19
- package/src/components/rich-text/use-undo-automatic-change.js +0 -46
- package/src/components/text-decoration-control/style.scss +0 -18
- package/src/components/text-transform-control/style.scss +0 -18
|
@@ -26,7 +26,7 @@ Object.defineProperty(exports, "__unstableRichTextInputEvent", {
|
|
|
26
26
|
});
|
|
27
27
|
exports.default = void 0;
|
|
28
28
|
var _react = require("react");
|
|
29
|
-
var
|
|
29
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
30
30
|
var _element = require("@wordpress/element");
|
|
31
31
|
var _data = require("@wordpress/data");
|
|
32
32
|
var _blocks = require("@wordpress/blocks");
|
|
@@ -126,7 +126,8 @@ function RichTextWrapper({
|
|
|
126
126
|
didAutomaticChange,
|
|
127
127
|
getBlock,
|
|
128
128
|
isMultiSelecting,
|
|
129
|
-
hasMultiSelection
|
|
129
|
+
hasMultiSelection,
|
|
130
|
+
getSelectedBlockClientId
|
|
130
131
|
} = select(_store.store);
|
|
131
132
|
const selectionStart = getSelectionStart();
|
|
132
133
|
const selectionEnd = getSelectionEnd();
|
|
@@ -157,6 +158,7 @@ function RichTextWrapper({
|
|
|
157
158
|
didAutomaticChange: didAutomaticChange(),
|
|
158
159
|
disabled: isMultiSelecting() || hasMultiSelection(),
|
|
159
160
|
undo,
|
|
161
|
+
getSelectedBlockClientId,
|
|
160
162
|
...extraProps
|
|
161
163
|
};
|
|
162
164
|
};
|
|
@@ -167,6 +169,7 @@ function RichTextWrapper({
|
|
|
167
169
|
selectionStart,
|
|
168
170
|
selectionEnd,
|
|
169
171
|
isSelected,
|
|
172
|
+
getSelectedBlockClientId,
|
|
170
173
|
didAutomaticChange,
|
|
171
174
|
disabled,
|
|
172
175
|
undo,
|
|
@@ -177,7 +180,8 @@ function RichTextWrapper({
|
|
|
177
180
|
enterFormattedText,
|
|
178
181
|
exitFormattedText,
|
|
179
182
|
selectionChange,
|
|
180
|
-
__unstableMarkAutomaticChange
|
|
183
|
+
__unstableMarkAutomaticChange,
|
|
184
|
+
clearSelectedBlock
|
|
181
185
|
} = (0, _data.useDispatch)(_store.store);
|
|
182
186
|
const adjustedAllowedFormats = (0, _utils.getAllowedFormats)({
|
|
183
187
|
allowedFormats,
|
|
@@ -197,6 +201,11 @@ function RichTextWrapper({
|
|
|
197
201
|
},
|
|
198
202
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
199
203
|
[clientId, identifier]);
|
|
204
|
+
const clearCurrentSelectionOnUnmount = (0, _element.useCallback)(() => {
|
|
205
|
+
if (getSelectedBlockClientId() === clientId) {
|
|
206
|
+
clearSelectedBlock();
|
|
207
|
+
}
|
|
208
|
+
}, [clearSelectedBlock, clientId, getSelectedBlockClientId]);
|
|
200
209
|
const onDelete = (0, _element.useCallback)(({
|
|
201
210
|
value,
|
|
202
211
|
isReverse
|
|
@@ -505,7 +514,8 @@ function RichTextWrapper({
|
|
|
505
514
|
onBlur: onBlur,
|
|
506
515
|
disableSuggestions: disableSuggestions,
|
|
507
516
|
disableAutocorrection: disableAutocorrection,
|
|
508
|
-
containerWidth: containerWidth
|
|
517
|
+
containerWidth: containerWidth,
|
|
518
|
+
clearCurrentSelectionOnUnmount: clearCurrentSelectionOnUnmount
|
|
509
519
|
// Props to be set on the editable container are destructured on the
|
|
510
520
|
// element itself for web (see below), but passed through rich text
|
|
511
521
|
// for native.
|
|
@@ -544,7 +554,7 @@ function RichTextWrapper({
|
|
|
544
554
|
...props.style,
|
|
545
555
|
...editableProps.style
|
|
546
556
|
} : editableProps.style,
|
|
547
|
-
className: (0,
|
|
557
|
+
className: (0, _clsx.default)(classes, props.className, editableProps.className),
|
|
548
558
|
"aria-autocomplete": listBoxId ? 'list' : undefined,
|
|
549
559
|
"aria-owns": listBoxId,
|
|
550
560
|
"aria-activedescendant": activeId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_classnames","_interopRequireDefault","require","_element","_data","_blocks","_compose","_richText","_url","_autocomplete","_blockEdit","_removeBrowserShortcuts","_filePasteHandler","_formatToolbarContainer","_store","_utils","_embedHandlerPicker","_content","_native","_withDeprecations","_shortcut","_toolbarButton","_inputEvent","classes","RichTextWrapper","children","tagName","start","reversed","value","originalValue","onChange","originalOnChange","isSelected","originalIsSelected","inlineToolbar","wrapperClassName","autocompleters","onReplace","placeholder","allowedFormats","withoutInteractiveFormatting","onRemove","onMerge","onSplit","__unstableOnSplitAtEnd","onSplitAtEnd","__unstableOnSplitMiddle","onSplitMiddle","__unstableOnSplitAtDoubleLineEnd","onSplitAtDoubleLineEnd","identifier","preserveWhiteSpace","__unstablePastePlainText","pastePlainText","__unstableEmbedURLOnPaste","__unstableDisableFormats","disableFormats","disableLineBreaks","unstableOnFocus","__unstableAllowPrefixTransformations","__unstableMobileNoFocusOnMount","deleteEnter","placeholderTextColor","textAlign","selectionColor","tagsToEliminate","disableEditingMenu","fontSize","fontFamily","fontWeight","fontStyle","minWidth","maxWidth","onBlur","disableSuggestions","disableAutocorrection","containerWidth","onEnter","onCustomEnter","props","providedRef","instanceId","useInstanceId","fallbackRef","useRef","clientId","blockIsSelected","useBlockEditContext","embedHandlerPickerRef","selector","select","getSelectionStart","getSelectionEnd","getSettings","didAutomaticChange","getBlock","isMultiSelecting","hasMultiSelection","blockEditorStore","selectionStart","selectionEnd","__experimentalUndo","undo","undefined","attributeKey","extraProps","Platform","OS","block","shouldBlurOnUnmount","isUnmodifiedDefaultBlock","offset","disabled","useSelect","__unstableMarkLastChangeAsPersistent","enterFormattedText","exitFormattedText","selectionChange","__unstableMarkAutomaticChange","useDispatch","adjustedAllowedFormats","getAllowedFormats","hasFormats","length","adjustedValue","adjustedOnChange","Array","isArray","childrenSource","toHTML","newValue","fromDOM","__unstableCreateElement","document","childNodes","onSelectionChange","useCallback","selectionChangeStart","selectionChangeEnd","onDelete","isReverse","isEmpty","splitValue","record","pastedBlocks","blocks","before","after","split","hasPastedBlocks","lastPastedBlockIndex","isAfterOriginal","push","toHTMLString","indexToSelect","initialPosition","shiftKey","canSplit","transforms","getBlockTransforms","filter","type","transformation","findTransform","item","regExp","test","text","transform","content","splitStart","end","splitEnd","canSplitAtEnd","insert","slice","remove","onPaste","html","plainText","isInternal","files","activeFormats","pastedValue","create","addActiveFormats","pasteHandler","HTML","filePasteHandler","mode","window","console","log","isPastedURL","isURL","trim","presentEmbedHandlerPicker","current","presentPicker","createEmbed","createLink","createLinkInParagraph","valueToInsert","canPasteEmbed","name","source","inputRule","valueToFormat","startPosition","characterBefore","trimmedTextBefore","prefixTransforms","prefix","mergedRef","useMergeRefs","_react","createElement","default","nativeEditorRef","__unstableIsSelected","__unstableInputRule","__unstableOnEnterFormattedText","__unstableOnExitFormattedText","__unstableOnCreateUndoLevel","__unstableDidAutomaticChange","__unstableUndo","id","style","nestedIsSelected","onFocus","editableProps","editableTagName","TagName","Fragment","inline","anchorRef","RemoveBrowserShortcuts","completers","contentRef","listBoxId","activeId","onKeyDown","className","classnames","event","ref","PrivateRichText","exports","withDeprecations","forwardRef","Content","defaultProps","format","Raw","_default"],"sources":["@wordpress/block-editor/src/components/rich-text/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { Platform, useRef, useCallback, forwardRef } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\tpasteHandler,\n\tchildren as childrenSource,\n\tgetBlockTransforms,\n\tfindTransform,\n\tisUnmodifiedDefaultBlock,\n} from '@wordpress/blocks';\nimport { useInstanceId, useMergeRefs } from '@wordpress/compose';\nimport {\n\t__unstableCreateElement,\n\tisEmpty,\n\tinsert,\n\tremove,\n\tcreate,\n\tsplit,\n\ttoHTMLString,\n\tslice,\n} from '@wordpress/rich-text';\nimport { isURL } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport Autocomplete from '../autocomplete';\nimport { useBlockEditContext } from '../block-edit';\nimport { RemoveBrowserShortcuts } from './remove-browser-shortcuts';\nimport { filePasteHandler } from './file-paste-handler';\nimport FormatToolbarContainer from './format-toolbar-container';\nimport { store as blockEditorStore } from '../../store';\nimport {\n\taddActiveFormats,\n\tgetAllowedFormats,\n\tcreateLinkInParagraph,\n} from './utils';\nimport EmbedHandlerPicker from './embed-handler-picker';\nimport { Content } from './content';\nimport RichText from './native';\nimport { withDeprecations } from './with-deprecations';\n\nconst classes = 'block-editor-rich-text__editable';\n\nexport function RichTextWrapper(\n\t{\n\t\tchildren,\n\t\ttagName,\n\t\tstart,\n\t\treversed,\n\t\tvalue: originalValue,\n\t\tonChange: originalOnChange,\n\t\tisSelected: originalIsSelected,\n\t\tinlineToolbar,\n\t\twrapperClassName,\n\t\tautocompleters,\n\t\tonReplace,\n\t\tplaceholder,\n\t\tallowedFormats,\n\t\twithoutInteractiveFormatting,\n\t\tonRemove,\n\t\tonMerge,\n\t\tonSplit,\n\t\t__unstableOnSplitAtEnd: onSplitAtEnd,\n\t\t__unstableOnSplitMiddle: onSplitMiddle,\n\t\t__unstableOnSplitAtDoubleLineEnd: onSplitAtDoubleLineEnd,\n\t\tidentifier,\n\t\tpreserveWhiteSpace,\n\t\t__unstablePastePlainText: pastePlainText,\n\t\t__unstableEmbedURLOnPaste,\n\t\t__unstableDisableFormats: disableFormats,\n\t\tdisableLineBreaks,\n\t\tunstableOnFocus,\n\t\t__unstableAllowPrefixTransformations,\n\t\t// Native props.\n\t\t__unstableMobileNoFocusOnMount,\n\t\tdeleteEnter,\n\t\tplaceholderTextColor,\n\t\ttextAlign,\n\t\tselectionColor,\n\t\ttagsToEliminate,\n\t\tdisableEditingMenu,\n\t\tfontSize,\n\t\tfontFamily,\n\t\tfontWeight,\n\t\tfontStyle,\n\t\tminWidth,\n\t\tmaxWidth,\n\t\tonBlur,\n\t\tdisableSuggestions,\n\t\tdisableAutocorrection,\n\t\tcontainerWidth,\n\t\tonEnter: onCustomEnter,\n\t\t...props\n\t},\n\tprovidedRef\n) {\n\tconst instanceId = useInstanceId( RichTextWrapper );\n\n\tidentifier = identifier || instanceId;\n\n\tconst fallbackRef = useRef();\n\tconst { clientId, isSelected: blockIsSelected } = useBlockEditContext();\n\tconst embedHandlerPickerRef = useRef();\n\tconst selector = ( select ) => {\n\t\tconst {\n\t\t\tgetSelectionStart,\n\t\t\tgetSelectionEnd,\n\t\t\tgetSettings,\n\t\t\tdidAutomaticChange,\n\t\t\tgetBlock,\n\t\t\tisMultiSelecting,\n\t\t\thasMultiSelection,\n\t\t} = select( blockEditorStore );\n\n\t\tconst selectionStart = getSelectionStart();\n\t\tconst selectionEnd = getSelectionEnd();\n\t\tconst { __experimentalUndo: undo } = getSettings();\n\n\t\tlet isSelected;\n\n\t\tif ( originalIsSelected === undefined ) {\n\t\t\tisSelected =\n\t\t\t\tselectionStart.clientId === clientId &&\n\t\t\t\tselectionStart.attributeKey === identifier;\n\t\t} else if ( originalIsSelected ) {\n\t\t\tisSelected = selectionStart.clientId === clientId;\n\t\t}\n\n\t\tlet extraProps = {};\n\t\tif ( Platform.OS === 'native' ) {\n\t\t\t// If the block of this RichText is unmodified then it's a candidate for replacing when adding a new block.\n\t\t\t// In order to fix https://github.com/wordpress-mobile/gutenberg-mobile/issues/1126, let's blur on unmount in that case.\n\t\t\t// This apparently assumes functionality the BlockHlder actually.\n\t\t\tconst block = clientId && getBlock( clientId );\n\t\t\tconst shouldBlurOnUnmount =\n\t\t\t\tblock && isSelected && isUnmodifiedDefaultBlock( block );\n\t\t\textraProps = {\n\t\t\t\tshouldBlurOnUnmount,\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\tselectionStart: isSelected ? selectionStart.offset : undefined,\n\t\t\tselectionEnd: isSelected ? selectionEnd.offset : undefined,\n\t\t\tisSelected,\n\t\t\tdidAutomaticChange: didAutomaticChange(),\n\t\t\tdisabled: isMultiSelecting() || hasMultiSelection(),\n\t\t\tundo,\n\t\t\t...extraProps,\n\t\t};\n\t};\n\t// This selector must run on every render so the right selection state is\n\t// retrieved from the store on merge.\n\t// To do: fix this somehow.\n\tconst {\n\t\tselectionStart,\n\t\tselectionEnd,\n\t\tisSelected,\n\t\tdidAutomaticChange,\n\t\tdisabled,\n\t\tundo,\n\t\tshouldBlurOnUnmount,\n\t} = useSelect( selector );\n\tconst {\n\t\t__unstableMarkLastChangeAsPersistent,\n\t\tenterFormattedText,\n\t\texitFormattedText,\n\t\tselectionChange,\n\t\t__unstableMarkAutomaticChange,\n\t} = useDispatch( blockEditorStore );\n\tconst adjustedAllowedFormats = getAllowedFormats( {\n\t\tallowedFormats,\n\t\tdisableFormats,\n\t} );\n\tconst hasFormats =\n\t\t! adjustedAllowedFormats || adjustedAllowedFormats.length > 0;\n\tlet adjustedValue = originalValue;\n\tlet adjustedOnChange = originalOnChange;\n\n\t// Handle deprecated format.\n\tif ( Array.isArray( originalValue ) ) {\n\t\tadjustedValue = childrenSource.toHTML( originalValue );\n\t\tadjustedOnChange = ( newValue ) =>\n\t\t\toriginalOnChange(\n\t\t\t\tchildrenSource.fromDOM(\n\t\t\t\t\t__unstableCreateElement( document, newValue ).childNodes\n\t\t\t\t)\n\t\t\t);\n\t}\n\n\tconst onSelectionChange = useCallback(\n\t\t( selectionChangeStart, selectionChangeEnd ) => {\n\t\t\tselectionChange(\n\t\t\t\tclientId,\n\t\t\t\tidentifier,\n\t\t\t\tselectionChangeStart,\n\t\t\t\tselectionChangeEnd\n\t\t\t);\n\t\t},\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t[ clientId, identifier ]\n\t);\n\n\tconst onDelete = useCallback(\n\t\t( { value, isReverse } ) => {\n\t\t\tif ( onMerge ) {\n\t\t\t\tonMerge( ! isReverse );\n\t\t\t}\n\n\t\t\t// Only handle remove on Backspace. This serves dual-purpose of being\n\t\t\t// an intentional user interaction distinguishing between Backspace and\n\t\t\t// Delete to remove the empty field, but also to avoid merge & remove\n\t\t\t// causing destruction of two fields (merge, then removed merged).\n\t\t\telse if ( onRemove && isEmpty( value ) && isReverse ) {\n\t\t\t\tonRemove( ! isReverse );\n\t\t\t}\n\t\t},\n\t\t[ onMerge, onRemove ]\n\t);\n\n\t/**\n\t * Signals to the RichText owner that the block can be replaced with two\n\t * blocks as a result of splitting the block by pressing enter, or with\n\t * blocks as a result of splitting the block by pasting block content in the\n\t * instance.\n\t *\n\t * @param {Object} record The rich text value to split.\n\t * @param {Array} pastedBlocks The pasted blocks to insert, if any.\n\t */\n\tconst splitValue = useCallback(\n\t\t( record, pastedBlocks = [] ) => {\n\t\t\tif ( ! onReplace || ! onSplit ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst blocks = [];\n\t\t\tconst [ before, after ] = split( record );\n\t\t\tconst hasPastedBlocks = pastedBlocks.length > 0;\n\t\t\tlet lastPastedBlockIndex = -1;\n\n\t\t\t// Consider the after value to be the original it is not empty and\n\t\t\t// the before value *is* empty.\n\t\t\tconst isAfterOriginal = isEmpty( before ) && ! isEmpty( after );\n\n\t\t\t// Create a block with the content before the caret if there's no pasted\n\t\t\t// blocks, or if there are pasted blocks and the value is not empty.\n\t\t\t// We do not want a leading empty block on paste, but we do if split\n\t\t\t// with e.g. the enter key.\n\t\t\tif ( ! hasPastedBlocks || ! isEmpty( before ) ) {\n\t\t\t\tblocks.push(\n\t\t\t\t\tonSplit(\n\t\t\t\t\t\ttoHTMLString( { value: before } ),\n\t\t\t\t\t\t! isAfterOriginal\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\tlastPastedBlockIndex += 1;\n\t\t\t}\n\n\t\t\tif ( hasPastedBlocks ) {\n\t\t\t\tblocks.push( ...pastedBlocks );\n\t\t\t\tlastPastedBlockIndex += pastedBlocks.length;\n\t\t\t} else if ( onSplitMiddle ) {\n\t\t\t\tblocks.push( onSplitMiddle() );\n\t\t\t}\n\n\t\t\t// If there's pasted blocks, append a block with non empty content\n\t\t\t// after the caret. Otherwise, do append an empty block if there\n\t\t\t// is no `onSplitMiddle` prop, but if there is and the content is\n\t\t\t// empty, the middle block is enough to set focus in.\n\t\t\tif (\n\t\t\t\thasPastedBlocks\n\t\t\t\t\t? ! isEmpty( after )\n\t\t\t\t\t: ! onSplitMiddle || ! isEmpty( after )\n\t\t\t) {\n\t\t\t\tblocks.push(\n\t\t\t\t\tonSplit( toHTMLString( { value: after } ), isAfterOriginal )\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// If there are pasted blocks, set the selection to the last one.\n\t\t\t// Otherwise, set the selection to the second block.\n\t\t\tconst indexToSelect = hasPastedBlocks ? lastPastedBlockIndex : 1;\n\n\t\t\t// If there are pasted blocks, move the caret to the end of the selected block\n\t\t\t// Otherwise, retain the default value.\n\t\t\tconst initialPosition = hasPastedBlocks ? -1 : 0;\n\n\t\t\tonReplace( blocks, indexToSelect, initialPosition );\n\t\t},\n\t\t[ onReplace, onSplit, onSplitMiddle ]\n\t);\n\n\tconst onEnter = useCallback(\n\t\t( { value, onChange, shiftKey } ) => {\n\t\t\tconst canSplit = onReplace && onSplit;\n\n\t\t\tif ( onReplace ) {\n\t\t\t\tconst transforms = getBlockTransforms( 'from' ).filter(\n\t\t\t\t\t( { type } ) => type === 'enter'\n\t\t\t\t);\n\t\t\t\tconst transformation = findTransform( transforms, ( item ) => {\n\t\t\t\t\treturn item.regExp.test( value.text );\n\t\t\t\t} );\n\n\t\t\t\tif ( transformation ) {\n\t\t\t\t\tonReplace( [\n\t\t\t\t\t\ttransformation.transform( { content: value.text } ),\n\t\t\t\t\t] );\n\t\t\t\t\t__unstableMarkAutomaticChange();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( onCustomEnter ) {\n\t\t\t\tonCustomEnter();\n\t\t\t}\n\n\t\t\tconst { text, start: splitStart, end: splitEnd } = value;\n\t\t\tconst canSplitAtEnd =\n\t\t\t\tonSplitAtEnd &&\n\t\t\t\tsplitStart === splitEnd &&\n\t\t\t\tsplitEnd === text.length;\n\n\t\t\tif ( shiftKey ) {\n\t\t\t\tif ( ! disableLineBreaks ) {\n\t\t\t\t\tonChange( insert( value, '\\n' ) );\n\t\t\t\t}\n\t\t\t} else if ( canSplit ) {\n\t\t\t\tsplitValue( value );\n\t\t\t} else if ( canSplitAtEnd ) {\n\t\t\t\tonSplitAtEnd();\n\t\t\t} else if (\n\t\t\t\t// For some blocks it's desirable to split at the end of the\n\t\t\t\t// block when there are two line breaks at the end of the\n\t\t\t\t// block, so triple Enter exits the block.\n\t\t\t\tonSplitAtDoubleLineEnd &&\n\t\t\t\tsplitStart === splitEnd &&\n\t\t\t\tsplitEnd === text.length &&\n\t\t\t\ttext.slice( -2 ) === '\\n\\n'\n\t\t\t) {\n\t\t\t\tvalue.start = value.end - 2;\n\t\t\t\tonChange( remove( value ) );\n\t\t\t\tonSplitAtDoubleLineEnd();\n\t\t\t} else if ( ! disableLineBreaks ) {\n\t\t\t\tonChange( insert( value, '\\n' ) );\n\t\t\t}\n\t\t},\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t[\n\t\t\tonReplace,\n\t\t\tonSplit,\n\t\t\t__unstableMarkAutomaticChange,\n\t\t\tsplitValue,\n\t\t\tonSplitAtEnd,\n\t\t]\n\t);\n\n\tconst onPaste = useCallback(\n\t\t( {\n\t\t\tvalue,\n\t\t\tonChange,\n\t\t\thtml,\n\t\t\tplainText,\n\t\t\tisInternal,\n\t\t\tfiles,\n\t\t\tactiveFormats,\n\t\t} ) => {\n\t\t\t// If the data comes from a rich text instance, we can directly use it\n\t\t\t// without filtering the data. The filters are only meant for externally\n\t\t\t// pasted content and remove inline styles.\n\t\t\tif ( isInternal ) {\n\t\t\t\tconst pastedValue = create( {\n\t\t\t\t\thtml,\n\t\t\t\t\tpreserveWhiteSpace,\n\t\t\t\t} );\n\t\t\t\taddActiveFormats( pastedValue, activeFormats );\n\t\t\t\tonChange( insert( value, pastedValue ) );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( pastePlainText ) {\n\t\t\t\tonChange( insert( value, create( { text: plainText } ) ) );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Only process file if no HTML is present.\n\t\t\t// Note: a pasted file may have the URL as plain text.\n\t\t\tif ( files && files.length && ! html ) {\n\t\t\t\tconst content = pasteHandler( {\n\t\t\t\t\tHTML: filePasteHandler( files ),\n\t\t\t\t\tmode: 'BLOCKS',\n\t\t\t\t\ttagName,\n\t\t\t\t\tpreserveWhiteSpace,\n\t\t\t\t} );\n\n\t\t\t\t// Allows us to ask for this information when we get a report.\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\twindow.console.log( 'Received items:\\n\\n', files );\n\n\t\t\t\tif ( onReplace && isEmpty( value ) ) {\n\t\t\t\t\tonReplace( content );\n\t\t\t\t} else {\n\t\t\t\t\tsplitValue( value, content );\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet mode = onReplace && onSplit ? 'AUTO' : 'INLINE';\n\n\t\t\tconst isPastedURL = isURL( plainText.trim() );\n\t\t\tconst presentEmbedHandlerPicker = () =>\n\t\t\t\tembedHandlerPickerRef.current?.presentPicker( {\n\t\t\t\t\tcreateEmbed: () =>\n\t\t\t\t\t\tonReplace( content, content.length - 1, -1 ),\n\t\t\t\t\tcreateLink: () =>\n\t\t\t\t\t\tcreateLinkInParagraph( plainText.trim(), onReplace ),\n\t\t\t\t} );\n\n\t\t\tif (\n\t\t\t\t__unstableEmbedURLOnPaste &&\n\t\t\t\tisEmpty( value ) &&\n\t\t\t\tisPastedURL\n\t\t\t) {\n\t\t\t\tmode = 'BLOCKS';\n\t\t\t}\n\n\t\t\tconst content = pasteHandler( {\n\t\t\t\tHTML: html,\n\t\t\t\tplainText,\n\t\t\t\tmode,\n\t\t\t\ttagName,\n\t\t\t\tpreserveWhiteSpace,\n\t\t\t} );\n\n\t\t\tif ( typeof content === 'string' ) {\n\t\t\t\tconst valueToInsert = create( { html: content } );\n\t\t\t\taddActiveFormats( valueToInsert, activeFormats );\n\t\t\t\tonChange( insert( value, valueToInsert ) );\n\t\t\t} else if ( content.length > 0 ) {\n\t\t\t\t// When an URL is pasted in an empty paragraph then the EmbedHandlerPicker should showcase options allowing the transformation of that URL\n\t\t\t\t// into either an Embed block or a link within the target paragraph. If the paragraph is non-empty, the URL is pasted as text.\n\t\t\t\tconst canPasteEmbed =\n\t\t\t\t\tisPastedURL &&\n\t\t\t\t\tcontent.length === 1 &&\n\t\t\t\t\tcontent[ 0 ].name === 'core/embed';\n\t\t\t\tif ( onReplace && isEmpty( value ) ) {\n\t\t\t\t\tif ( canPasteEmbed ) {\n\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\tinsert( value, create( { text: plainText } ) )\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif ( __unstableEmbedURLOnPaste ) {\n\t\t\t\t\t\t\tpresentEmbedHandlerPicker();\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tonReplace( content, content.length - 1, -1, {\n\t\t\t\t\t\tsource: 'clipboard',\n\t\t\t\t\t} );\n\t\t\t\t} else {\n\t\t\t\t\tif ( canPasteEmbed ) {\n\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\tinsert( value, create( { text: plainText } ) )\n\t\t\t\t\t\t);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tsplitValue( value, content );\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t[\n\t\t\ttagName,\n\t\t\tonReplace,\n\t\t\tonSplit,\n\t\t\tsplitValue,\n\t\t\t__unstableEmbedURLOnPaste,\n\t\t\tpreserveWhiteSpace,\n\t\t\tpastePlainText,\n\t\t]\n\t);\n\n\tconst inputRule = useCallback(\n\t\t( value, valueToFormat ) => {\n\t\t\tif ( ! onReplace ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst { start: startPosition, text } = value;\n\t\t\tconst characterBefore = text.slice(\n\t\t\t\tstartPosition - 1,\n\t\t\t\tstartPosition\n\t\t\t);\n\n\t\t\t// The character right before the caret must be a plain space.\n\t\t\tif ( characterBefore !== ' ' ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst trimmedTextBefore = text.slice( 0, startPosition ).trim();\n\t\t\tconst prefixTransforms = getBlockTransforms( 'from' ).filter(\n\t\t\t\t( { type } ) => type === 'prefix'\n\t\t\t);\n\t\t\tconst transformation = findTransform(\n\t\t\t\tprefixTransforms,\n\t\t\t\t( { prefix } ) => {\n\t\t\t\t\treturn trimmedTextBefore === prefix;\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tif ( ! transformation ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst content = valueToFormat(\n\t\t\t\tslice( value, startPosition, text.length )\n\t\t\t);\n\t\t\tconst block = transformation.transform( content );\n\n\t\t\tonReplace( [ block ] );\n\t\t\t__unstableMarkAutomaticChange();\n\t\t},\n\t\t[ onReplace, __unstableMarkAutomaticChange ]\n\t);\n\n\tconst mergedRef = useMergeRefs( [ providedRef, fallbackRef ] );\n\n\treturn (\n\t\t<RichText\n\t\t\tclientId={ clientId }\n\t\t\tidentifier={ identifier }\n\t\t\tnativeEditorRef={ mergedRef }\n\t\t\tvalue={ adjustedValue }\n\t\t\tonChange={ adjustedOnChange }\n\t\t\tselectionStart={ selectionStart }\n\t\t\tselectionEnd={ selectionEnd }\n\t\t\tonSelectionChange={ onSelectionChange }\n\t\t\ttagName={ tagName }\n\t\t\tstart={ start }\n\t\t\treversed={ reversed }\n\t\t\tplaceholder={ placeholder }\n\t\t\tallowedFormats={ adjustedAllowedFormats }\n\t\t\twithoutInteractiveFormatting={ withoutInteractiveFormatting }\n\t\t\tonEnter={ onEnter }\n\t\t\tonDelete={ onDelete }\n\t\t\tonPaste={ onPaste }\n\t\t\t__unstableIsSelected={ isSelected }\n\t\t\t__unstableInputRule={ inputRule }\n\t\t\t__unstableOnEnterFormattedText={ enterFormattedText }\n\t\t\t__unstableOnExitFormattedText={ exitFormattedText }\n\t\t\t__unstableOnCreateUndoLevel={ __unstableMarkLastChangeAsPersistent }\n\t\t\t__unstableMarkAutomaticChange={ __unstableMarkAutomaticChange }\n\t\t\t__unstableDidAutomaticChange={ didAutomaticChange }\n\t\t\t__unstableUndo={ undo }\n\t\t\t__unstableDisableFormats={ disableFormats }\n\t\t\tpreserveWhiteSpace={ preserveWhiteSpace }\n\t\t\tdisabled={ disabled }\n\t\t\tunstableOnFocus={ unstableOnFocus }\n\t\t\t__unstableAllowPrefixTransformations={\n\t\t\t\t__unstableAllowPrefixTransformations\n\t\t\t}\n\t\t\t// Native props.\n\t\t\tblockIsSelected={\n\t\t\t\toriginalIsSelected !== undefined\n\t\t\t\t\t? originalIsSelected\n\t\t\t\t\t: blockIsSelected\n\t\t\t}\n\t\t\tshouldBlurOnUnmount={ shouldBlurOnUnmount }\n\t\t\t__unstableMobileNoFocusOnMount={ __unstableMobileNoFocusOnMount }\n\t\t\tdeleteEnter={ deleteEnter }\n\t\t\tplaceholderTextColor={ placeholderTextColor }\n\t\t\ttextAlign={ textAlign }\n\t\t\tselectionColor={ selectionColor }\n\t\t\ttagsToEliminate={ tagsToEliminate }\n\t\t\tdisableEditingMenu={ disableEditingMenu }\n\t\t\tfontSize={ fontSize }\n\t\t\tfontFamily={ fontFamily }\n\t\t\tfontWeight={ fontWeight }\n\t\t\tfontStyle={ fontStyle }\n\t\t\tminWidth={ minWidth }\n\t\t\tmaxWidth={ maxWidth }\n\t\t\tonBlur={ onBlur }\n\t\t\tdisableSuggestions={ disableSuggestions }\n\t\t\tdisableAutocorrection={ disableAutocorrection }\n\t\t\tcontainerWidth={ containerWidth }\n\t\t\t// Props to be set on the editable container are destructured on the\n\t\t\t// element itself for web (see below), but passed through rich text\n\t\t\t// for native.\n\t\t\tid={ props.id }\n\t\t\tstyle={ props.style }\n\t\t>\n\t\t\t{ ( {\n\t\t\t\tisSelected: nestedIsSelected,\n\t\t\t\tvalue,\n\t\t\t\tonChange,\n\t\t\t\tonFocus,\n\t\t\t\teditableProps,\n\t\t\t\teditableTagName: TagName,\n\t\t\t} ) => (\n\t\t\t\t<>\n\t\t\t\t\t{ children && children( { value, onChange, onFocus } ) }\n\t\t\t\t\t{ nestedIsSelected && hasFormats && (\n\t\t\t\t\t\t<FormatToolbarContainer\n\t\t\t\t\t\t\tinline={ inlineToolbar }\n\t\t\t\t\t\t\tanchorRef={ fallbackRef.current }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ nestedIsSelected && <RemoveBrowserShortcuts /> }\n\t\t\t\t\t<Autocomplete\n\t\t\t\t\t\tonReplace={ onReplace }\n\t\t\t\t\t\tcompleters={ autocompleters }\n\t\t\t\t\t\trecord={ value }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\tisSelected={ nestedIsSelected }\n\t\t\t\t\t\tcontentRef={ fallbackRef }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ ( { listBoxId, activeId, onKeyDown } ) => (\n\t\t\t\t\t\t\t<TagName\n\t\t\t\t\t\t\t\t{ ...editableProps }\n\t\t\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t\tprops.style\n\t\t\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t\t\t\t...props.style,\n\t\t\t\t\t\t\t\t\t\t\t\t...editableProps.style,\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t: editableProps.style\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t\t\tclasses,\n\t\t\t\t\t\t\t\t\tprops.className,\n\t\t\t\t\t\t\t\t\teditableProps.className\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\taria-autocomplete={\n\t\t\t\t\t\t\t\t\tlistBoxId ? 'list' : undefined\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\taria-owns={ listBoxId }\n\t\t\t\t\t\t\t\taria-activedescendant={ activeId }\n\t\t\t\t\t\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\t\t\t\t\t\tonKeyDown( event );\n\t\t\t\t\t\t\t\t\teditableProps.onKeyDown( event );\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</Autocomplete>\n\t\t\t\t\t<EmbedHandlerPicker ref={ embedHandlerPickerRef } />\n\t\t\t\t</>\n\t\t\t) }\n\t\t</RichText>\n\t);\n}\n\n// This export does not actually implement a private API, but was exported\n// under this name for interoperability with the web version of the RichText\n// component.\nexport const PrivateRichText = withDeprecations(\n\tforwardRef( RichTextWrapper )\n);\n\nPrivateRichText.Content = Content;\n\nPrivateRichText.isEmpty = ( value ) => {\n\treturn ! value || value.length === 0;\n};\n\nPrivateRichText.Content.defaultProps = {\n\tformat: 'string',\n\tvalue: '',\n};\n\nPrivateRichText.Raw = forwardRef( ( props, ref ) => (\n\t<RichText { ...props } nativeEditorRef={ ref } />\n) );\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/rich-text/README.md\n */\nexport default PrivateRichText;\nexport { RichTextShortcut } from './shortcut';\nexport { RichTextToolbarButton } from './toolbar-button';\nexport { __unstableRichTextInputEvent } from './input-event';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAOA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AAUA,IAAAM,IAAA,GAAAN,OAAA;AAKA,IAAAO,aAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,UAAA,GAAAR,OAAA;AACA,IAAAS,uBAAA,GAAAT,OAAA;AACA,IAAAU,iBAAA,GAAAV,OAAA;AACA,IAAAW,uBAAA,GAAAZ,sBAAA,CAAAC,OAAA;AACA,IAAAY,MAAA,GAAAZ,OAAA;AACA,IAAAa,MAAA,GAAAb,OAAA;AAKA,IAAAc,mBAAA,GAAAf,sBAAA,CAAAC,OAAA;AACA,IAAAe,QAAA,GAAAf,OAAA;A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K,IAAM;MACxBH,SAAS,CAAEG,KAAM,CAAC;MAClBd,aAAa,CAACW,SAAS,CAAEG,KAAM,CAAC;IACjC;EAAG,CACH,CAEW,CAAC,EACf,IAAA7B,MAAA,CAAAC,aAAA,EAACzM,mBAAA,CAAA0M,OAAkB;IAAC4B,GAAG,EAAG7J;EAAuB,CAAE,CAClD,CAEM,CAAC;AAEb;;AAEA;AACA;AACA;AACO,MAAM8J,eAAe,GAAAC,OAAA,CAAAD,eAAA,GAAG,IAAAE,kCAAgB,EAC9C,IAAAC,mBAAU,EAAElO,eAAgB,CAC7B,CAAC;AAED+N,eAAe,CAACI,OAAO,GAAGA,gBAAO;AAEjCJ,eAAe,CAACzG,OAAO,GAAKjH,KAAK,IAAM;EACtC,OAAO,CAAEA,KAAK,IAAIA,KAAK,CAAC+F,MAAM,KAAK,CAAC;AACrC,CAAC;AAED2H,eAAe,CAACI,OAAO,CAACC,YAAY,GAAG;EACtCC,MAAM,EAAE,QAAQ;EAChBhO,KAAK,EAAE;AACR,CAAC;AAED0N,eAAe,CAACO,GAAG,GAAG,IAAAJ,mBAAU,EAAE,CAAE1K,KAAK,EAAEsK,GAAG,KAC7C,IAAA9B,MAAA,CAAAC,aAAA,EAACvM,OAAA,CAAAwM,OAAQ;EAAA,GAAM1I,KAAK;EAAG2I,eAAe,EAAG2B;AAAK,CAAE,CAC/C,CAAC;;AAEH;AACA;AACA;AAFA,IAAAS,QAAA,GAAAP,OAAA,CAAA9B,OAAA,GAGe6B,eAAe","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_clsx","_interopRequireDefault","require","_element","_data","_blocks","_compose","_richText","_url","_autocomplete","_blockEdit","_removeBrowserShortcuts","_filePasteHandler","_formatToolbarContainer","_store","_utils","_embedHandlerPicker","_content","_native","_withDeprecations","_shortcut","_toolbarButton","_inputEvent","classes","RichTextWrapper","children","tagName","start","reversed","value","originalValue","onChange","originalOnChange","isSelected","originalIsSelected","inlineToolbar","wrapperClassName","autocompleters","onReplace","placeholder","allowedFormats","withoutInteractiveFormatting","onRemove","onMerge","onSplit","__unstableOnSplitAtEnd","onSplitAtEnd","__unstableOnSplitMiddle","onSplitMiddle","__unstableOnSplitAtDoubleLineEnd","onSplitAtDoubleLineEnd","identifier","preserveWhiteSpace","__unstablePastePlainText","pastePlainText","__unstableEmbedURLOnPaste","__unstableDisableFormats","disableFormats","disableLineBreaks","unstableOnFocus","__unstableAllowPrefixTransformations","__unstableMobileNoFocusOnMount","deleteEnter","placeholderTextColor","textAlign","selectionColor","tagsToEliminate","disableEditingMenu","fontSize","fontFamily","fontWeight","fontStyle","minWidth","maxWidth","onBlur","disableSuggestions","disableAutocorrection","containerWidth","onEnter","onCustomEnter","props","providedRef","instanceId","useInstanceId","fallbackRef","useRef","clientId","blockIsSelected","useBlockEditContext","embedHandlerPickerRef","selector","select","getSelectionStart","getSelectionEnd","getSettings","didAutomaticChange","getBlock","isMultiSelecting","hasMultiSelection","getSelectedBlockClientId","blockEditorStore","selectionStart","selectionEnd","__experimentalUndo","undo","undefined","attributeKey","extraProps","Platform","OS","block","shouldBlurOnUnmount","isUnmodifiedDefaultBlock","offset","disabled","useSelect","__unstableMarkLastChangeAsPersistent","enterFormattedText","exitFormattedText","selectionChange","__unstableMarkAutomaticChange","clearSelectedBlock","useDispatch","adjustedAllowedFormats","getAllowedFormats","hasFormats","length","adjustedValue","adjustedOnChange","Array","isArray","childrenSource","toHTML","newValue","fromDOM","__unstableCreateElement","document","childNodes","onSelectionChange","useCallback","selectionChangeStart","selectionChangeEnd","clearCurrentSelectionOnUnmount","onDelete","isReverse","isEmpty","splitValue","record","pastedBlocks","blocks","before","after","split","hasPastedBlocks","lastPastedBlockIndex","isAfterOriginal","push","toHTMLString","indexToSelect","initialPosition","shiftKey","canSplit","transforms","getBlockTransforms","filter","type","transformation","findTransform","item","regExp","test","text","transform","content","splitStart","end","splitEnd","canSplitAtEnd","insert","slice","remove","onPaste","html","plainText","isInternal","files","activeFormats","pastedValue","create","addActiveFormats","pasteHandler","HTML","filePasteHandler","mode","window","console","log","isPastedURL","isURL","trim","presentEmbedHandlerPicker","current","presentPicker","createEmbed","createLink","createLinkInParagraph","valueToInsert","canPasteEmbed","name","source","inputRule","valueToFormat","startPosition","characterBefore","trimmedTextBefore","prefixTransforms","prefix","mergedRef","useMergeRefs","_react","createElement","default","nativeEditorRef","__unstableIsSelected","__unstableInputRule","__unstableOnEnterFormattedText","__unstableOnExitFormattedText","__unstableOnCreateUndoLevel","__unstableDidAutomaticChange","__unstableUndo","id","style","nestedIsSelected","onFocus","editableProps","editableTagName","TagName","Fragment","inline","anchorRef","RemoveBrowserShortcuts","completers","contentRef","listBoxId","activeId","onKeyDown","className","clsx","event","ref","PrivateRichText","exports","withDeprecations","forwardRef","Content","defaultProps","format","Raw","_default"],"sources":["@wordpress/block-editor/src/components/rich-text/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { Platform, useRef, useCallback, forwardRef } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\tpasteHandler,\n\tchildren as childrenSource,\n\tgetBlockTransforms,\n\tfindTransform,\n\tisUnmodifiedDefaultBlock,\n} from '@wordpress/blocks';\nimport { useInstanceId, useMergeRefs } from '@wordpress/compose';\nimport {\n\t__unstableCreateElement,\n\tisEmpty,\n\tinsert,\n\tremove,\n\tcreate,\n\tsplit,\n\ttoHTMLString,\n\tslice,\n} from '@wordpress/rich-text';\nimport { isURL } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport Autocomplete from '../autocomplete';\nimport { useBlockEditContext } from '../block-edit';\nimport { RemoveBrowserShortcuts } from './remove-browser-shortcuts';\nimport { filePasteHandler } from './file-paste-handler';\nimport FormatToolbarContainer from './format-toolbar-container';\nimport { store as blockEditorStore } from '../../store';\nimport {\n\taddActiveFormats,\n\tgetAllowedFormats,\n\tcreateLinkInParagraph,\n} from './utils';\nimport EmbedHandlerPicker from './embed-handler-picker';\nimport { Content } from './content';\nimport RichText from './native';\nimport { withDeprecations } from './with-deprecations';\n\nconst classes = 'block-editor-rich-text__editable';\n\nexport function RichTextWrapper(\n\t{\n\t\tchildren,\n\t\ttagName,\n\t\tstart,\n\t\treversed,\n\t\tvalue: originalValue,\n\t\tonChange: originalOnChange,\n\t\tisSelected: originalIsSelected,\n\t\tinlineToolbar,\n\t\twrapperClassName,\n\t\tautocompleters,\n\t\tonReplace,\n\t\tplaceholder,\n\t\tallowedFormats,\n\t\twithoutInteractiveFormatting,\n\t\tonRemove,\n\t\tonMerge,\n\t\tonSplit,\n\t\t__unstableOnSplitAtEnd: onSplitAtEnd,\n\t\t__unstableOnSplitMiddle: onSplitMiddle,\n\t\t__unstableOnSplitAtDoubleLineEnd: onSplitAtDoubleLineEnd,\n\t\tidentifier,\n\t\tpreserveWhiteSpace,\n\t\t__unstablePastePlainText: pastePlainText,\n\t\t__unstableEmbedURLOnPaste,\n\t\t__unstableDisableFormats: disableFormats,\n\t\tdisableLineBreaks,\n\t\tunstableOnFocus,\n\t\t__unstableAllowPrefixTransformations,\n\t\t// Native props.\n\t\t__unstableMobileNoFocusOnMount,\n\t\tdeleteEnter,\n\t\tplaceholderTextColor,\n\t\ttextAlign,\n\t\tselectionColor,\n\t\ttagsToEliminate,\n\t\tdisableEditingMenu,\n\t\tfontSize,\n\t\tfontFamily,\n\t\tfontWeight,\n\t\tfontStyle,\n\t\tminWidth,\n\t\tmaxWidth,\n\t\tonBlur,\n\t\tdisableSuggestions,\n\t\tdisableAutocorrection,\n\t\tcontainerWidth,\n\t\tonEnter: onCustomEnter,\n\t\t...props\n\t},\n\tprovidedRef\n) {\n\tconst instanceId = useInstanceId( RichTextWrapper );\n\n\tidentifier = identifier || instanceId;\n\n\tconst fallbackRef = useRef();\n\tconst { clientId, isSelected: blockIsSelected } = useBlockEditContext();\n\tconst embedHandlerPickerRef = useRef();\n\tconst selector = ( select ) => {\n\t\tconst {\n\t\t\tgetSelectionStart,\n\t\t\tgetSelectionEnd,\n\t\t\tgetSettings,\n\t\t\tdidAutomaticChange,\n\t\t\tgetBlock,\n\t\t\tisMultiSelecting,\n\t\t\thasMultiSelection,\n\t\t\tgetSelectedBlockClientId,\n\t\t} = select( blockEditorStore );\n\n\t\tconst selectionStart = getSelectionStart();\n\t\tconst selectionEnd = getSelectionEnd();\n\t\tconst { __experimentalUndo: undo } = getSettings();\n\n\t\tlet isSelected;\n\n\t\tif ( originalIsSelected === undefined ) {\n\t\t\tisSelected =\n\t\t\t\tselectionStart.clientId === clientId &&\n\t\t\t\tselectionStart.attributeKey === identifier;\n\t\t} else if ( originalIsSelected ) {\n\t\t\tisSelected = selectionStart.clientId === clientId;\n\t\t}\n\n\t\tlet extraProps = {};\n\t\tif ( Platform.OS === 'native' ) {\n\t\t\t// If the block of this RichText is unmodified then it's a candidate for replacing when adding a new block.\n\t\t\t// In order to fix https://github.com/wordpress-mobile/gutenberg-mobile/issues/1126, let's blur on unmount in that case.\n\t\t\t// This apparently assumes functionality the BlockHlder actually.\n\t\t\tconst block = clientId && getBlock( clientId );\n\t\t\tconst shouldBlurOnUnmount =\n\t\t\t\tblock && isSelected && isUnmodifiedDefaultBlock( block );\n\t\t\textraProps = {\n\t\t\t\tshouldBlurOnUnmount,\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\tselectionStart: isSelected ? selectionStart.offset : undefined,\n\t\t\tselectionEnd: isSelected ? selectionEnd.offset : undefined,\n\t\t\tisSelected,\n\t\t\tdidAutomaticChange: didAutomaticChange(),\n\t\t\tdisabled: isMultiSelecting() || hasMultiSelection(),\n\t\t\tundo,\n\t\t\tgetSelectedBlockClientId,\n\t\t\t...extraProps,\n\t\t};\n\t};\n\t// This selector must run on every render so the right selection state is\n\t// retrieved from the store on merge.\n\t// To do: fix this somehow.\n\tconst {\n\t\tselectionStart,\n\t\tselectionEnd,\n\t\tisSelected,\n\t\tgetSelectedBlockClientId,\n\t\tdidAutomaticChange,\n\t\tdisabled,\n\t\tundo,\n\t\tshouldBlurOnUnmount,\n\t} = useSelect( selector );\n\tconst {\n\t\t__unstableMarkLastChangeAsPersistent,\n\t\tenterFormattedText,\n\t\texitFormattedText,\n\t\tselectionChange,\n\t\t__unstableMarkAutomaticChange,\n\t\tclearSelectedBlock,\n\t} = useDispatch( blockEditorStore );\n\tconst adjustedAllowedFormats = getAllowedFormats( {\n\t\tallowedFormats,\n\t\tdisableFormats,\n\t} );\n\tconst hasFormats =\n\t\t! adjustedAllowedFormats || adjustedAllowedFormats.length > 0;\n\tlet adjustedValue = originalValue;\n\tlet adjustedOnChange = originalOnChange;\n\n\t// Handle deprecated format.\n\tif ( Array.isArray( originalValue ) ) {\n\t\tadjustedValue = childrenSource.toHTML( originalValue );\n\t\tadjustedOnChange = ( newValue ) =>\n\t\t\toriginalOnChange(\n\t\t\t\tchildrenSource.fromDOM(\n\t\t\t\t\t__unstableCreateElement( document, newValue ).childNodes\n\t\t\t\t)\n\t\t\t);\n\t}\n\n\tconst onSelectionChange = useCallback(\n\t\t( selectionChangeStart, selectionChangeEnd ) => {\n\t\t\tselectionChange(\n\t\t\t\tclientId,\n\t\t\t\tidentifier,\n\t\t\t\tselectionChangeStart,\n\t\t\t\tselectionChangeEnd\n\t\t\t);\n\t\t},\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t[ clientId, identifier ]\n\t);\n\n\tconst clearCurrentSelectionOnUnmount = useCallback( () => {\n\t\tif ( getSelectedBlockClientId() === clientId ) {\n\t\t\tclearSelectedBlock();\n\t\t}\n\t}, [ clearSelectedBlock, clientId, getSelectedBlockClientId ] );\n\n\tconst onDelete = useCallback(\n\t\t( { value, isReverse } ) => {\n\t\t\tif ( onMerge ) {\n\t\t\t\tonMerge( ! isReverse );\n\t\t\t}\n\n\t\t\t// Only handle remove on Backspace. This serves dual-purpose of being\n\t\t\t// an intentional user interaction distinguishing between Backspace and\n\t\t\t// Delete to remove the empty field, but also to avoid merge & remove\n\t\t\t// causing destruction of two fields (merge, then removed merged).\n\t\t\telse if ( onRemove && isEmpty( value ) && isReverse ) {\n\t\t\t\tonRemove( ! isReverse );\n\t\t\t}\n\t\t},\n\t\t[ onMerge, onRemove ]\n\t);\n\n\t/**\n\t * Signals to the RichText owner that the block can be replaced with two\n\t * blocks as a result of splitting the block by pressing enter, or with\n\t * blocks as a result of splitting the block by pasting block content in the\n\t * instance.\n\t *\n\t * @param {Object} record The rich text value to split.\n\t * @param {Array} pastedBlocks The pasted blocks to insert, if any.\n\t */\n\tconst splitValue = useCallback(\n\t\t( record, pastedBlocks = [] ) => {\n\t\t\tif ( ! onReplace || ! onSplit ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst blocks = [];\n\t\t\tconst [ before, after ] = split( record );\n\t\t\tconst hasPastedBlocks = pastedBlocks.length > 0;\n\t\t\tlet lastPastedBlockIndex = -1;\n\n\t\t\t// Consider the after value to be the original it is not empty and\n\t\t\t// the before value *is* empty.\n\t\t\tconst isAfterOriginal = isEmpty( before ) && ! isEmpty( after );\n\n\t\t\t// Create a block with the content before the caret if there's no pasted\n\t\t\t// blocks, or if there are pasted blocks and the value is not empty.\n\t\t\t// We do not want a leading empty block on paste, but we do if split\n\t\t\t// with e.g. the enter key.\n\t\t\tif ( ! hasPastedBlocks || ! isEmpty( before ) ) {\n\t\t\t\tblocks.push(\n\t\t\t\t\tonSplit(\n\t\t\t\t\t\ttoHTMLString( { value: before } ),\n\t\t\t\t\t\t! isAfterOriginal\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\tlastPastedBlockIndex += 1;\n\t\t\t}\n\n\t\t\tif ( hasPastedBlocks ) {\n\t\t\t\tblocks.push( ...pastedBlocks );\n\t\t\t\tlastPastedBlockIndex += pastedBlocks.length;\n\t\t\t} else if ( onSplitMiddle ) {\n\t\t\t\tblocks.push( onSplitMiddle() );\n\t\t\t}\n\n\t\t\t// If there's pasted blocks, append a block with non empty content\n\t\t\t// after the caret. Otherwise, do append an empty block if there\n\t\t\t// is no `onSplitMiddle` prop, but if there is and the content is\n\t\t\t// empty, the middle block is enough to set focus in.\n\t\t\tif (\n\t\t\t\thasPastedBlocks\n\t\t\t\t\t? ! isEmpty( after )\n\t\t\t\t\t: ! onSplitMiddle || ! isEmpty( after )\n\t\t\t) {\n\t\t\t\tblocks.push(\n\t\t\t\t\tonSplit( toHTMLString( { value: after } ), isAfterOriginal )\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// If there are pasted blocks, set the selection to the last one.\n\t\t\t// Otherwise, set the selection to the second block.\n\t\t\tconst indexToSelect = hasPastedBlocks ? lastPastedBlockIndex : 1;\n\n\t\t\t// If there are pasted blocks, move the caret to the end of the selected block\n\t\t\t// Otherwise, retain the default value.\n\t\t\tconst initialPosition = hasPastedBlocks ? -1 : 0;\n\n\t\t\tonReplace( blocks, indexToSelect, initialPosition );\n\t\t},\n\t\t[ onReplace, onSplit, onSplitMiddle ]\n\t);\n\n\tconst onEnter = useCallback(\n\t\t( { value, onChange, shiftKey } ) => {\n\t\t\tconst canSplit = onReplace && onSplit;\n\n\t\t\tif ( onReplace ) {\n\t\t\t\tconst transforms = getBlockTransforms( 'from' ).filter(\n\t\t\t\t\t( { type } ) => type === 'enter'\n\t\t\t\t);\n\t\t\t\tconst transformation = findTransform( transforms, ( item ) => {\n\t\t\t\t\treturn item.regExp.test( value.text );\n\t\t\t\t} );\n\n\t\t\t\tif ( transformation ) {\n\t\t\t\t\tonReplace( [\n\t\t\t\t\t\ttransformation.transform( { content: value.text } ),\n\t\t\t\t\t] );\n\t\t\t\t\t__unstableMarkAutomaticChange();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( onCustomEnter ) {\n\t\t\t\tonCustomEnter();\n\t\t\t}\n\n\t\t\tconst { text, start: splitStart, end: splitEnd } = value;\n\t\t\tconst canSplitAtEnd =\n\t\t\t\tonSplitAtEnd &&\n\t\t\t\tsplitStart === splitEnd &&\n\t\t\t\tsplitEnd === text.length;\n\n\t\t\tif ( shiftKey ) {\n\t\t\t\tif ( ! disableLineBreaks ) {\n\t\t\t\t\tonChange( insert( value, '\\n' ) );\n\t\t\t\t}\n\t\t\t} else if ( canSplit ) {\n\t\t\t\tsplitValue( value );\n\t\t\t} else if ( canSplitAtEnd ) {\n\t\t\t\tonSplitAtEnd();\n\t\t\t} else if (\n\t\t\t\t// For some blocks it's desirable to split at the end of the\n\t\t\t\t// block when there are two line breaks at the end of the\n\t\t\t\t// block, so triple Enter exits the block.\n\t\t\t\tonSplitAtDoubleLineEnd &&\n\t\t\t\tsplitStart === splitEnd &&\n\t\t\t\tsplitEnd === text.length &&\n\t\t\t\ttext.slice( -2 ) === '\\n\\n'\n\t\t\t) {\n\t\t\t\tvalue.start = value.end - 2;\n\t\t\t\tonChange( remove( value ) );\n\t\t\t\tonSplitAtDoubleLineEnd();\n\t\t\t} else if ( ! disableLineBreaks ) {\n\t\t\t\tonChange( insert( value, '\\n' ) );\n\t\t\t}\n\t\t},\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t[\n\t\t\tonReplace,\n\t\t\tonSplit,\n\t\t\t__unstableMarkAutomaticChange,\n\t\t\tsplitValue,\n\t\t\tonSplitAtEnd,\n\t\t]\n\t);\n\n\tconst onPaste = useCallback(\n\t\t( {\n\t\t\tvalue,\n\t\t\tonChange,\n\t\t\thtml,\n\t\t\tplainText,\n\t\t\tisInternal,\n\t\t\tfiles,\n\t\t\tactiveFormats,\n\t\t} ) => {\n\t\t\t// If the data comes from a rich text instance, we can directly use it\n\t\t\t// without filtering the data. The filters are only meant for externally\n\t\t\t// pasted content and remove inline styles.\n\t\t\tif ( isInternal ) {\n\t\t\t\tconst pastedValue = create( {\n\t\t\t\t\thtml,\n\t\t\t\t\tpreserveWhiteSpace,\n\t\t\t\t} );\n\t\t\t\taddActiveFormats( pastedValue, activeFormats );\n\t\t\t\tonChange( insert( value, pastedValue ) );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( pastePlainText ) {\n\t\t\t\tonChange( insert( value, create( { text: plainText } ) ) );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Only process file if no HTML is present.\n\t\t\t// Note: a pasted file may have the URL as plain text.\n\t\t\tif ( files && files.length && ! html ) {\n\t\t\t\tconst content = pasteHandler( {\n\t\t\t\t\tHTML: filePasteHandler( files ),\n\t\t\t\t\tmode: 'BLOCKS',\n\t\t\t\t\ttagName,\n\t\t\t\t\tpreserveWhiteSpace,\n\t\t\t\t} );\n\n\t\t\t\t// Allows us to ask for this information when we get a report.\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\twindow.console.log( 'Received items:\\n\\n', files );\n\n\t\t\t\tif ( onReplace && isEmpty( value ) ) {\n\t\t\t\t\tonReplace( content );\n\t\t\t\t} else {\n\t\t\t\t\tsplitValue( value, content );\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet mode = onReplace && onSplit ? 'AUTO' : 'INLINE';\n\n\t\t\tconst isPastedURL = isURL( plainText.trim() );\n\t\t\tconst presentEmbedHandlerPicker = () =>\n\t\t\t\tembedHandlerPickerRef.current?.presentPicker( {\n\t\t\t\t\tcreateEmbed: () =>\n\t\t\t\t\t\tonReplace( content, content.length - 1, -1 ),\n\t\t\t\t\tcreateLink: () =>\n\t\t\t\t\t\tcreateLinkInParagraph( plainText.trim(), onReplace ),\n\t\t\t\t} );\n\n\t\t\tif (\n\t\t\t\t__unstableEmbedURLOnPaste &&\n\t\t\t\tisEmpty( value ) &&\n\t\t\t\tisPastedURL\n\t\t\t) {\n\t\t\t\tmode = 'BLOCKS';\n\t\t\t}\n\n\t\t\tconst content = pasteHandler( {\n\t\t\t\tHTML: html,\n\t\t\t\tplainText,\n\t\t\t\tmode,\n\t\t\t\ttagName,\n\t\t\t\tpreserveWhiteSpace,\n\t\t\t} );\n\n\t\t\tif ( typeof content === 'string' ) {\n\t\t\t\tconst valueToInsert = create( { html: content } );\n\t\t\t\taddActiveFormats( valueToInsert, activeFormats );\n\t\t\t\tonChange( insert( value, valueToInsert ) );\n\t\t\t} else if ( content.length > 0 ) {\n\t\t\t\t// When an URL is pasted in an empty paragraph then the EmbedHandlerPicker should showcase options allowing the transformation of that URL\n\t\t\t\t// into either an Embed block or a link within the target paragraph. If the paragraph is non-empty, the URL is pasted as text.\n\t\t\t\tconst canPasteEmbed =\n\t\t\t\t\tisPastedURL &&\n\t\t\t\t\tcontent.length === 1 &&\n\t\t\t\t\tcontent[ 0 ].name === 'core/embed';\n\t\t\t\tif ( onReplace && isEmpty( value ) ) {\n\t\t\t\t\tif ( canPasteEmbed ) {\n\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\tinsert( value, create( { text: plainText } ) )\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif ( __unstableEmbedURLOnPaste ) {\n\t\t\t\t\t\t\tpresentEmbedHandlerPicker();\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tonReplace( content, content.length - 1, -1, {\n\t\t\t\t\t\tsource: 'clipboard',\n\t\t\t\t\t} );\n\t\t\t\t} else {\n\t\t\t\t\tif ( canPasteEmbed ) {\n\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\tinsert( value, create( { text: plainText } ) )\n\t\t\t\t\t\t);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tsplitValue( value, content );\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t[\n\t\t\ttagName,\n\t\t\tonReplace,\n\t\t\tonSplit,\n\t\t\tsplitValue,\n\t\t\t__unstableEmbedURLOnPaste,\n\t\t\tpreserveWhiteSpace,\n\t\t\tpastePlainText,\n\t\t]\n\t);\n\n\tconst inputRule = useCallback(\n\t\t( value, valueToFormat ) => {\n\t\t\tif ( ! onReplace ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst { start: startPosition, text } = value;\n\t\t\tconst characterBefore = text.slice(\n\t\t\t\tstartPosition - 1,\n\t\t\t\tstartPosition\n\t\t\t);\n\n\t\t\t// The character right before the caret must be a plain space.\n\t\t\tif ( characterBefore !== ' ' ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst trimmedTextBefore = text.slice( 0, startPosition ).trim();\n\t\t\tconst prefixTransforms = getBlockTransforms( 'from' ).filter(\n\t\t\t\t( { type } ) => type === 'prefix'\n\t\t\t);\n\t\t\tconst transformation = findTransform(\n\t\t\t\tprefixTransforms,\n\t\t\t\t( { prefix } ) => {\n\t\t\t\t\treturn trimmedTextBefore === prefix;\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tif ( ! transformation ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst content = valueToFormat(\n\t\t\t\tslice( value, startPosition, text.length )\n\t\t\t);\n\t\t\tconst block = transformation.transform( content );\n\n\t\t\tonReplace( [ block ] );\n\t\t\t__unstableMarkAutomaticChange();\n\t\t},\n\t\t[ onReplace, __unstableMarkAutomaticChange ]\n\t);\n\n\tconst mergedRef = useMergeRefs( [ providedRef, fallbackRef ] );\n\n\treturn (\n\t\t<RichText\n\t\t\tclientId={ clientId }\n\t\t\tidentifier={ identifier }\n\t\t\tnativeEditorRef={ mergedRef }\n\t\t\tvalue={ adjustedValue }\n\t\t\tonChange={ adjustedOnChange }\n\t\t\tselectionStart={ selectionStart }\n\t\t\tselectionEnd={ selectionEnd }\n\t\t\tonSelectionChange={ onSelectionChange }\n\t\t\ttagName={ tagName }\n\t\t\tstart={ start }\n\t\t\treversed={ reversed }\n\t\t\tplaceholder={ placeholder }\n\t\t\tallowedFormats={ adjustedAllowedFormats }\n\t\t\twithoutInteractiveFormatting={ withoutInteractiveFormatting }\n\t\t\tonEnter={ onEnter }\n\t\t\tonDelete={ onDelete }\n\t\t\tonPaste={ onPaste }\n\t\t\t__unstableIsSelected={ isSelected }\n\t\t\t__unstableInputRule={ inputRule }\n\t\t\t__unstableOnEnterFormattedText={ enterFormattedText }\n\t\t\t__unstableOnExitFormattedText={ exitFormattedText }\n\t\t\t__unstableOnCreateUndoLevel={ __unstableMarkLastChangeAsPersistent }\n\t\t\t__unstableMarkAutomaticChange={ __unstableMarkAutomaticChange }\n\t\t\t__unstableDidAutomaticChange={ didAutomaticChange }\n\t\t\t__unstableUndo={ undo }\n\t\t\t__unstableDisableFormats={ disableFormats }\n\t\t\tpreserveWhiteSpace={ preserveWhiteSpace }\n\t\t\tdisabled={ disabled }\n\t\t\tunstableOnFocus={ unstableOnFocus }\n\t\t\t__unstableAllowPrefixTransformations={\n\t\t\t\t__unstableAllowPrefixTransformations\n\t\t\t}\n\t\t\t// Native props.\n\t\t\tblockIsSelected={\n\t\t\t\toriginalIsSelected !== undefined\n\t\t\t\t\t? originalIsSelected\n\t\t\t\t\t: blockIsSelected\n\t\t\t}\n\t\t\tshouldBlurOnUnmount={ shouldBlurOnUnmount }\n\t\t\t__unstableMobileNoFocusOnMount={ __unstableMobileNoFocusOnMount }\n\t\t\tdeleteEnter={ deleteEnter }\n\t\t\tplaceholderTextColor={ placeholderTextColor }\n\t\t\ttextAlign={ textAlign }\n\t\t\tselectionColor={ selectionColor }\n\t\t\ttagsToEliminate={ tagsToEliminate }\n\t\t\tdisableEditingMenu={ disableEditingMenu }\n\t\t\tfontSize={ fontSize }\n\t\t\tfontFamily={ fontFamily }\n\t\t\tfontWeight={ fontWeight }\n\t\t\tfontStyle={ fontStyle }\n\t\t\tminWidth={ minWidth }\n\t\t\tmaxWidth={ maxWidth }\n\t\t\tonBlur={ onBlur }\n\t\t\tdisableSuggestions={ disableSuggestions }\n\t\t\tdisableAutocorrection={ disableAutocorrection }\n\t\t\tcontainerWidth={ containerWidth }\n\t\t\tclearCurrentSelectionOnUnmount={ clearCurrentSelectionOnUnmount }\n\t\t\t// Props to be set on the editable container are destructured on the\n\t\t\t// element itself for web (see below), but passed through rich text\n\t\t\t// for native.\n\t\t\tid={ props.id }\n\t\t\tstyle={ props.style }\n\t\t>\n\t\t\t{ ( {\n\t\t\t\tisSelected: nestedIsSelected,\n\t\t\t\tvalue,\n\t\t\t\tonChange,\n\t\t\t\tonFocus,\n\t\t\t\teditableProps,\n\t\t\t\teditableTagName: TagName,\n\t\t\t} ) => (\n\t\t\t\t<>\n\t\t\t\t\t{ children && children( { value, onChange, onFocus } ) }\n\t\t\t\t\t{ nestedIsSelected && hasFormats && (\n\t\t\t\t\t\t<FormatToolbarContainer\n\t\t\t\t\t\t\tinline={ inlineToolbar }\n\t\t\t\t\t\t\tanchorRef={ fallbackRef.current }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ nestedIsSelected && <RemoveBrowserShortcuts /> }\n\t\t\t\t\t<Autocomplete\n\t\t\t\t\t\tonReplace={ onReplace }\n\t\t\t\t\t\tcompleters={ autocompleters }\n\t\t\t\t\t\trecord={ value }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\tisSelected={ nestedIsSelected }\n\t\t\t\t\t\tcontentRef={ fallbackRef }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ ( { listBoxId, activeId, onKeyDown } ) => (\n\t\t\t\t\t\t\t<TagName\n\t\t\t\t\t\t\t\t{ ...editableProps }\n\t\t\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t\tprops.style\n\t\t\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t\t\t\t...props.style,\n\t\t\t\t\t\t\t\t\t\t\t\t...editableProps.style,\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t: editableProps.style\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t\t\tclasses,\n\t\t\t\t\t\t\t\t\tprops.className,\n\t\t\t\t\t\t\t\t\teditableProps.className\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\taria-autocomplete={\n\t\t\t\t\t\t\t\t\tlistBoxId ? 'list' : undefined\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\taria-owns={ listBoxId }\n\t\t\t\t\t\t\t\taria-activedescendant={ activeId }\n\t\t\t\t\t\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\t\t\t\t\t\tonKeyDown( event );\n\t\t\t\t\t\t\t\t\teditableProps.onKeyDown( event );\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</Autocomplete>\n\t\t\t\t\t<EmbedHandlerPicker ref={ embedHandlerPickerRef } />\n\t\t\t\t</>\n\t\t\t) }\n\t\t</RichText>\n\t);\n}\n\n// This export does not actually implement a private API, but was exported\n// under this name for interoperability with the web version of the RichText\n// component.\nexport const PrivateRichText = withDeprecations(\n\tforwardRef( RichTextWrapper )\n);\n\nPrivateRichText.Content = Content;\n\nPrivateRichText.isEmpty = ( value ) => {\n\treturn ! value || value.length === 0;\n};\n\nPrivateRichText.Content.defaultProps = {\n\tformat: 'string',\n\tvalue: '',\n};\n\nPrivateRichText.Raw = forwardRef( ( props, ref ) => (\n\t<RichText { ...props } nativeEditorRef={ ref } />\n) );\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/rich-text/README.md\n */\nexport default PrivateRichText;\nexport { RichTextShortcut } from './shortcut';\nexport { RichTextToolbarButton } from './toolbar-button';\nexport { __unstableRichTextInputEvent } from './input-event';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAOA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AAUA,IAAAM,IAAA,GAAAN,OAAA;AAKA,IAAAO,aAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,UAAA,GAAAR,O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CAACO,GAAG,GAAG,IAAAJ,mBAAU,EAAE,CAAE7K,KAAK,EAAEyK,GAAG,KAC7C,IAAA9B,MAAA,CAAAC,aAAA,EAAC1M,OAAA,CAAA2M,OAAQ;EAAA,GAAM7I,KAAK;EAAG8I,eAAe,EAAG2B;AAAK,CAAE,CAC/C,CAAC;;AAEH;AACA;AACA;AAFA,IAAAS,QAAA,GAAAP,OAAA,CAAA9B,OAAA,GAGe6B,eAAe","ignoreList":[]}
|
|
@@ -9,6 +9,8 @@ var _react = require("react");
|
|
|
9
9
|
var _element = require("@wordpress/element");
|
|
10
10
|
var _deprecated = _interopRequireDefault(require("@wordpress/deprecated"));
|
|
11
11
|
var _data = require("@wordpress/data");
|
|
12
|
+
var _keycodes = require("@wordpress/keycodes");
|
|
13
|
+
var _richText = require("@wordpress/rich-text");
|
|
12
14
|
var _ = require("./");
|
|
13
15
|
var _store = require("../../store");
|
|
14
16
|
var _blockEdit = require("../block-edit");
|
|
@@ -39,6 +41,10 @@ function RichTextMultiline({
|
|
|
39
41
|
const {
|
|
40
42
|
clientId
|
|
41
43
|
} = (0, _blockEdit.useBlockEditContext)();
|
|
44
|
+
const {
|
|
45
|
+
getSelectionStart,
|
|
46
|
+
getSelectionEnd
|
|
47
|
+
} = (0, _data.useSelect)(_store.store);
|
|
42
48
|
const {
|
|
43
49
|
selectionChange
|
|
44
50
|
} = (0, _data.useDispatch)(_store.store);
|
|
@@ -65,8 +71,30 @@ function RichTextMultiline({
|
|
|
65
71
|
_onChange(newValues);
|
|
66
72
|
},
|
|
67
73
|
isSelected: undefined,
|
|
68
|
-
|
|
69
|
-
|
|
74
|
+
onKeyDown: event => {
|
|
75
|
+
if (event.keyCode !== _keycodes.ENTER) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
event.preventDefault();
|
|
79
|
+
const {
|
|
80
|
+
offset: start
|
|
81
|
+
} = getSelectionStart();
|
|
82
|
+
const {
|
|
83
|
+
offset: end
|
|
84
|
+
} = getSelectionEnd();
|
|
85
|
+
|
|
86
|
+
// Cannot split if there is no selection.
|
|
87
|
+
if (typeof start !== 'number' || typeof end !== 'number') {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
const richTextValue = (0, _richText.create)({
|
|
91
|
+
html: _value
|
|
92
|
+
});
|
|
93
|
+
richTextValue.start = start;
|
|
94
|
+
richTextValue.end = end;
|
|
95
|
+
const array = (0, _richText.split)(richTextValue).map(v => (0, _richText.toHTMLString)({
|
|
96
|
+
value: v
|
|
97
|
+
}));
|
|
70
98
|
const newValues = values.slice();
|
|
71
99
|
newValues.splice(index, 1, ...array);
|
|
72
100
|
_onChange(newValues);
|
|
@@ -76,11 +104,15 @@ function RichTextMultiline({
|
|
|
76
104
|
const newValues = values.slice();
|
|
77
105
|
let offset = 0;
|
|
78
106
|
if (forward) {
|
|
79
|
-
if (!newValues[index + 1])
|
|
107
|
+
if (!newValues[index + 1]) {
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
80
110
|
newValues.splice(index, 2, newValues[index] + newValues[index + 1]);
|
|
81
111
|
offset = newValues[index].length - 1;
|
|
82
112
|
} else {
|
|
83
|
-
if (!newValues[index - 1])
|
|
113
|
+
if (!newValues[index - 1]) {
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
84
116
|
newValues.splice(index - 1, 2, newValues[index - 1] + newValues[index]);
|
|
85
117
|
offset = newValues[index - 1].length - 1;
|
|
86
118
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_element","require","_deprecated","_interopRequireDefault","_data","_","_store","_blockEdit","_utils","RichTextMultiline","children","identifier","tagName","TagName","value","onChange","multiline","props","forwardedRef","deprecated","since","version","alternative","link","clientId","useBlockEditContext","
|
|
1
|
+
{"version":3,"names":["_element","require","_deprecated","_interopRequireDefault","_data","_keycodes","_richText","_","_store","_blockEdit","_utils","RichTextMultiline","children","identifier","tagName","TagName","value","onChange","multiline","props","forwardedRef","deprecated","since","version","alternative","link","clientId","useBlockEditContext","getSelectionStart","getSelectionEnd","useSelect","blockEditorStore","selectionChange","useDispatch","multilineTagName","getMultilineTag","padded","values","split","shift","pop","_onChange","newValues","join","_react","createElement","ref","map","_value","index","RichTextWrapper","key","newValue","slice","isSelected","undefined","onKeyDown","event","keyCode","ENTER","preventDefault","offset","start","end","richTextValue","create","html","array","v","toHTMLString","splice","onMerge","forward","length","_default","exports","default","forwardRef"],"sources":["@wordpress/block-editor/src/components/rich-text/multiline.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { ENTER } from '@wordpress/keycodes';\nimport { create, split, toHTMLString } from '@wordpress/rich-text';\n\n/**\n * Internal dependencies\n */\nimport { RichTextWrapper } from './';\nimport { store as blockEditorStore } from '../../store';\nimport { useBlockEditContext } from '../block-edit';\nimport { getMultilineTag } from './utils';\n\nfunction RichTextMultiline(\n\t{\n\t\tchildren,\n\t\tidentifier,\n\t\ttagName: TagName = 'div',\n\t\tvalue = '',\n\t\tonChange,\n\t\tmultiline,\n\t\t...props\n\t},\n\tforwardedRef\n) {\n\tdeprecated( 'wp.blockEditor.RichText multiline prop', {\n\t\tsince: '6.1',\n\t\tversion: '6.3',\n\t\talternative: 'nested blocks (InnerBlocks)',\n\t\tlink: 'https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/nested-blocks-inner-blocks/',\n\t} );\n\n\tconst { clientId } = useBlockEditContext();\n\tconst { getSelectionStart, getSelectionEnd } =\n\t\tuseSelect( blockEditorStore );\n\tconst { selectionChange } = useDispatch( blockEditorStore );\n\n\tconst multilineTagName = getMultilineTag( multiline );\n\tvalue = value || `<${ multilineTagName }></${ multilineTagName }>`;\n\tconst padded = `</${ multilineTagName }>${ value }<${ multilineTagName }>`;\n\tconst values = padded.split(\n\t\t`</${ multilineTagName }><${ multilineTagName }>`\n\t);\n\n\tvalues.shift();\n\tvalues.pop();\n\n\tfunction _onChange( newValues ) {\n\t\tonChange(\n\t\t\t`<${ multilineTagName }>${ newValues.join(\n\t\t\t\t`</${ multilineTagName }><${ multilineTagName }>`\n\t\t\t) }</${ multilineTagName }>`\n\t\t);\n\t}\n\n\treturn (\n\t\t<TagName ref={ forwardedRef }>\n\t\t\t{ values.map( ( _value, index ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<RichTextWrapper\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\tidentifier={ `${ identifier }-${ index }` }\n\t\t\t\t\t\ttagName={ multilineTagName }\n\t\t\t\t\t\tvalue={ _value }\n\t\t\t\t\t\tonChange={ ( newValue ) => {\n\t\t\t\t\t\t\tconst newValues = values.slice();\n\t\t\t\t\t\t\tnewValues[ index ] = newValue;\n\t\t\t\t\t\t\t_onChange( newValues );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tisSelected={ undefined }\n\t\t\t\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\t\t\t\tif ( event.keyCode !== ENTER ) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tevent.preventDefault();\n\n\t\t\t\t\t\t\tconst { offset: start } = getSelectionStart();\n\t\t\t\t\t\t\tconst { offset: end } = getSelectionEnd();\n\n\t\t\t\t\t\t\t// Cannot split if there is no selection.\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\ttypeof start !== 'number' ||\n\t\t\t\t\t\t\t\ttypeof end !== 'number'\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tconst richTextValue = create( { html: _value } );\n\t\t\t\t\t\t\trichTextValue.start = start;\n\t\t\t\t\t\t\trichTextValue.end = end;\n\n\t\t\t\t\t\t\tconst array = split( richTextValue ).map( ( v ) =>\n\t\t\t\t\t\t\t\ttoHTMLString( { value: v } )\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tconst newValues = values.slice();\n\t\t\t\t\t\t\tnewValues.splice( index, 1, ...array );\n\t\t\t\t\t\t\t_onChange( newValues );\n\t\t\t\t\t\t\tselectionChange(\n\t\t\t\t\t\t\t\tclientId,\n\t\t\t\t\t\t\t\t`${ identifier }-${ index + 1 }`,\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t0\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tonMerge={ ( forward ) => {\n\t\t\t\t\t\t\tconst newValues = values.slice();\n\t\t\t\t\t\t\tlet offset = 0;\n\t\t\t\t\t\t\tif ( forward ) {\n\t\t\t\t\t\t\t\tif ( ! newValues[ index + 1 ] ) {\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tnewValues.splice(\n\t\t\t\t\t\t\t\t\tindex,\n\t\t\t\t\t\t\t\t\t2,\n\t\t\t\t\t\t\t\t\tnewValues[ index ] + newValues[ index + 1 ]\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\toffset = newValues[ index ].length - 1;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif ( ! newValues[ index - 1 ] ) {\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tnewValues.splice(\n\t\t\t\t\t\t\t\t\tindex - 1,\n\t\t\t\t\t\t\t\t\t2,\n\t\t\t\t\t\t\t\t\tnewValues[ index - 1 ] + newValues[ index ]\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\toffset = newValues[ index - 1 ].length - 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t_onChange( newValues );\n\t\t\t\t\t\t\tselectionChange(\n\t\t\t\t\t\t\t\tclientId,\n\t\t\t\t\t\t\t\t`${ identifier }-${\n\t\t\t\t\t\t\t\t\tindex - ( forward ? 0 : 1 )\n\t\t\t\t\t\t\t\t}`,\n\t\t\t\t\t\t\t\toffset,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AAEO,KAAK,GAAG,CAAC,CAAE,EAAG;YAC/B;UACD;UACAP,SAAS,CAAC4B,MAAM,CACfrB,KAAK,GAAG,CAAC,EACT,CAAC,EACDP,SAAS,CAAEO,KAAK,GAAG,CAAC,CAAE,GAAGP,SAAS,CAAEO,KAAK,CAC1C,CAAC;UACDY,MAAM,GAAGnB,SAAS,CAAEO,KAAK,GAAG,CAAC,CAAE,CAACwB,MAAM,GAAG,CAAC;QAC3C;QACAhC,SAAS,CAAEC,SAAU,CAAC;QACtBV,eAAe,CACdN,QAAQ,EACP,GAAGb,UAAY,IACfoC,KAAK,IAAKuB,OAAO,GAAG,CAAC,GAAG,CAAC,CACzB,EAAC,EACFX,MAAM,EACNA,MACD,CAAC;MACF,CAAG;MAAA,GACE1C;IAAK,CACV,CAAC;EAEJ,CAAE,CACM,CAAC;AAEZ;AAAC,IAAAuD,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEc,IAAAC,mBAAU,EAAElE,iBAAkB,CAAC","ignoreList":[]}
|
|
@@ -735,6 +735,18 @@ class RichText extends _element.Component {
|
|
|
735
735
|
});
|
|
736
736
|
}
|
|
737
737
|
}
|
|
738
|
+
componentWillUnmount() {
|
|
739
|
+
const {
|
|
740
|
+
clearCurrentSelectionOnUnmount
|
|
741
|
+
} = this.props;
|
|
742
|
+
|
|
743
|
+
// There are cases when the component is unmounted e.g. scrolling in a
|
|
744
|
+
// long post due to virtualization, so the block selection needs to be cleared
|
|
745
|
+
// so it doesn't auto-focus when it's added back.
|
|
746
|
+
if (this._editor?.isFocused()) {
|
|
747
|
+
clearCurrentSelectionOnUnmount?.();
|
|
748
|
+
}
|
|
749
|
+
}
|
|
738
750
|
getHtmlToRender(record, tagName) {
|
|
739
751
|
// Save back to HTML from React tree.
|
|
740
752
|
let value = this.valueToFormat(record);
|