@wordpress/block-editor 12.7.0 → 12.8.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 +2 -0
- package/README.md +42 -0
- package/build/autocompleters/block.js +3 -22
- package/build/autocompleters/block.js.map +1 -1
- package/build/autocompleters/link.js +3 -14
- package/build/autocompleters/link.js.map +1 -1
- package/build/components/alignment-control/index.js +6 -10
- package/build/components/alignment-control/index.js.map +1 -1
- package/build/components/alignment-control/ui.js +3 -11
- package/build/components/alignment-control/ui.js.map +1 -1
- package/build/components/autocomplete/index.js +8 -22
- package/build/components/autocomplete/index.js.map +1 -1
- package/build/components/block-actions/index.js +3 -26
- package/build/components/block-actions/index.js.map +1 -1
- package/build/components/block-alignment-control/constants.js +1 -3
- package/build/components/block-alignment-control/constants.js.map +1 -1
- package/build/components/block-alignment-control/index.js +6 -10
- package/build/components/block-alignment-control/index.js.map +1 -1
- package/build/components/block-alignment-control/ui.js +7 -16
- package/build/components/block-alignment-control/ui.js.map +1 -1
- package/build/components/block-alignment-control/ui.native.js +5 -13
- package/build/components/block-alignment-control/ui.native.js.map +1 -1
- package/build/components/block-alignment-control/use-available-alignments.js +10 -18
- package/build/components/block-alignment-control/use-available-alignments.js.map +1 -1
- package/build/components/block-alignment-matrix-control/index.js +1 -8
- package/build/components/block-alignment-matrix-control/index.js.map +1 -1
- package/build/components/block-breadcrumb/index.js +2 -15
- package/build/components/block-breadcrumb/index.js.map +1 -1
- package/build/components/block-caption/index.native.js +7 -16
- package/build/components/block-caption/index.native.js.map +1 -1
- package/build/components/block-card/index.js +5 -17
- package/build/components/block-card/index.js.map +1 -1
- package/build/components/block-compare/block-view.js +1 -4
- package/build/components/block-compare/block-view.js.map +1 -1
- package/build/components/block-compare/index.js +4 -12
- package/build/components/block-compare/index.js.map +1 -1
- package/build/components/block-content-overlay/index.js +1 -3
- package/build/components/block-content-overlay/index.js.map +1 -1
- package/build/components/block-context/index.js +3 -5
- package/build/components/block-context/index.js.map +1 -1
- package/build/components/block-controls/fill.js +3 -8
- package/build/components/block-controls/fill.js.map +1 -1
- package/build/components/block-controls/groups.js +1 -2
- package/build/components/block-controls/groups.js.map +1 -1
- package/build/components/block-controls/hook.js +1 -11
- package/build/components/block-controls/hook.js.map +1 -1
- package/build/components/block-controls/index.js +3 -9
- package/build/components/block-controls/index.js.map +1 -1
- package/build/components/block-controls/slot.js +3 -14
- package/build/components/block-controls/slot.js.map +1 -1
- package/build/components/block-controls/slot.native.js +5 -12
- package/build/components/block-controls/slot.native.js.map +1 -1
- package/build/components/block-controls/use-has-block-controls.js +43 -0
- package/build/components/block-controls/use-has-block-controls.js.map +1 -0
- package/build/components/block-draggable/draggable-chip.js +2 -9
- package/build/components/block-draggable/draggable-chip.js.map +1 -1
- package/build/components/block-draggable/draggable-chip.native.js +2 -9
- package/build/components/block-draggable/draggable-chip.native.js.map +1 -1
- package/build/components/block-draggable/dropping-insertion-point.native.js +2 -23
- package/build/components/block-draggable/dropping-insertion-point.native.js.map +1 -1
- package/build/components/block-draggable/index.js +3 -15
- package/build/components/block-draggable/index.js.map +1 -1
- package/build/components/block-draggable/index.native.js +7 -56
- package/build/components/block-draggable/index.native.js.map +1 -1
- package/build/components/block-draggable/use-scroll-when-dragging.js +9 -13
- package/build/components/block-draggable/use-scroll-when-dragging.js.map +1 -1
- package/build/components/block-draggable/use-scroll-when-dragging.native.js +2 -14
- package/build/components/block-draggable/use-scroll-when-dragging.native.js.map +1 -1
- package/build/components/block-edit/context.js +1 -3
- package/build/components/block-edit/context.js.map +1 -1
- package/build/components/block-edit/edit.js +13 -23
- package/build/components/block-edit/edit.js.map +1 -1
- package/build/components/block-edit/edit.native.js +4 -14
- package/build/components/block-edit/edit.native.js.map +1 -1
- package/build/components/block-edit/index.js +5 -8
- package/build/components/block-edit/index.js.map +1 -1
- package/build/components/block-edit-visually-button/index.js +1 -8
- package/build/components/block-edit-visually-button/index.js.map +1 -1
- package/build/components/block-editing-mode/index.js +2 -11
- package/build/components/block-editing-mode/index.js.map +1 -1
- package/build/components/block-full-height-alignment-control/index.js +1 -6
- package/build/components/block-full-height-alignment-control/index.js.map +1 -1
- package/build/components/block-heading-level-dropdown/heading-level-icon.js +2 -6
- package/build/components/block-heading-level-dropdown/heading-level-icon.js.map +1 -1
- package/build/components/block-heading-level-dropdown/index.js +4 -10
- package/build/components/block-heading-level-dropdown/index.js.map +1 -1
- package/build/components/block-heading-level-dropdown/index.native.js +2 -8
- package/build/components/block-heading-level-dropdown/index.native.js.map +1 -1
- package/build/components/block-icon/index.js +2 -10
- package/build/components/block-icon/index.js.map +1 -1
- package/build/components/block-icon/index.native.js +1 -10
- package/build/components/block-icon/index.native.js.map +1 -1
- package/build/components/block-info-slot-fill/index.js +5 -13
- package/build/components/block-info-slot-fill/index.js.map +1 -1
- package/build/components/block-inspector/index.js +11 -46
- package/build/components/block-inspector/index.js.map +1 -1
- package/build/components/block-inspector/useBlockInspectorAnimationSettings.js +7 -10
- package/build/components/block-inspector/useBlockInspectorAnimationSettings.js.map +1 -1
- package/build/components/block-list/block-crash-boundary.js +1 -7
- package/build/components/block-list/block-crash-boundary.js.map +1 -1
- package/build/components/block-list/block-crash-warning.js +1 -7
- package/build/components/block-list/block-crash-warning.js.map +1 -1
- package/build/components/block-list/block-html.js +7 -15
- package/build/components/block-list/block-html.js.map +1 -1
- package/build/components/block-list/block-invalid-warning.js +3 -16
- package/build/components/block-list/block-invalid-warning.js.map +1 -1
- package/build/components/block-list/block-invalid-warning.native.js +4 -16
- package/build/components/block-list/block-invalid-warning.native.js.map +1 -1
- package/build/components/block-list/block-list-block-context.js +1 -2
- package/build/components/block-list/block-list-block-context.js.map +1 -1
- package/build/components/block-list/block-list-context.native.js +10 -25
- package/build/components/block-list/block-list-context.native.js.map +1 -1
- package/build/components/block-list/block-list-item-cell.native.js +1 -8
- package/build/components/block-list/block-list-item-cell.native.js.map +1 -1
- package/build/components/block-list/block-list-item.native.js +5 -18
- package/build/components/block-list/block-list-item.native.js.map +1 -1
- package/build/components/block-list/block-outline.native.js +2 -9
- package/build/components/block-list/block-outline.native.js.map +1 -1
- package/build/components/block-list/block-selection-button.native.js +2 -21
- package/build/components/block-list/block-selection-button.native.js.map +1 -1
- package/build/components/block-list/block.js +38 -81
- package/build/components/block-list/block.js.map +1 -1
- package/build/components/block-list/block.native.js +40 -71
- package/build/components/block-list/block.native.js.map +1 -1
- package/build/components/block-list/grid-item.native.js +1 -6
- package/build/components/block-list/grid-item.native.js.map +1 -1
- package/build/components/block-list/index.js +9 -28
- package/build/components/block-list/index.js.map +1 -1
- package/build/components/block-list/index.native.js +18 -49
- package/build/components/block-list/index.native.js.map +1 -1
- package/build/components/block-list/insertion-point.native.js +1 -9
- package/build/components/block-list/insertion-point.native.js.map +1 -1
- package/build/components/block-list/layout.js +3 -13
- package/build/components/block-list/layout.js.map +1 -1
- package/build/components/block-list/subdirectory-icon.js +3 -6
- package/build/components/block-list/subdirectory-icon.js.map +1 -1
- package/build/components/block-list/use-block-props/index.js +10 -35
- package/build/components/block-list/use-block-props/index.js.map +1 -1
- package/build/components/block-list/use-block-props/index.native.js +5 -5
- package/build/components/block-list/use-block-props/index.native.js.map +1 -1
- package/build/components/block-list/use-block-props/use-block-class-names.js +2 -8
- package/build/components/block-list/use-block-props/use-block-class-names.js.map +1 -1
- package/build/components/block-list/use-block-props/use-block-custom-class-name.js +0 -8
- package/build/components/block-list/use-block-props/use-block-custom-class-name.js.map +1 -1
- package/build/components/block-list/use-block-props/use-block-default-class-name.js +0 -6
- package/build/components/block-list/use-block-props/use-block-default-class-name.js.map +1 -1
- package/build/components/block-list/use-block-props/use-block-moving-mode-class-names.js +3 -10
- package/build/components/block-list/use-block-props/use-block-moving-mode-class-names.js.map +1 -1
- package/build/components/block-list/use-block-props/use-block-refs.js +9 -18
- package/build/components/block-list/use-block-props/use-block-refs.js.map +1 -1
- package/build/components/block-list/use-block-props/use-focus-first-element.js +13 -27
- package/build/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
- package/build/components/block-list/use-block-props/use-focus-handler.js +6 -14
- package/build/components/block-list/use-block-props/use-focus-handler.js.map +1 -1
- package/build/components/block-list/use-block-props/use-intersection-observer.js +1 -4
- package/build/components/block-list/use-block-props/use-intersection-observer.js.map +1 -1
- package/build/components/block-list/use-block-props/use-is-hovered.js +4 -8
- package/build/components/block-list/use-block-props/use-is-hovered.js.map +1 -1
- package/build/components/block-list/use-block-props/use-nav-mode-exit.js +2 -6
- package/build/components/block-list/use-block-props/use-nav-mode-exit.js.map +1 -1
- package/build/components/block-list/use-block-props/use-selected-block-event-handlers.js +2 -15
- package/build/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +1 -1
- package/build/components/block-list/use-in-between-inserter.js +15 -37
- package/build/components/block-list/use-in-between-inserter.js.map +1 -1
- package/build/components/block-list-appender/index.js +12 -32
- package/build/components/block-list-appender/index.js.map +1 -1
- package/build/components/block-list-appender/index.native.js +1 -14
- package/build/components/block-list-appender/index.native.js.map +1 -1
- package/build/components/block-lock/index.js +0 -5
- package/build/components/block-lock/index.js.map +1 -1
- package/build/components/block-lock/menu-item.js +1 -10
- package/build/components/block-lock/menu-item.js.map +1 -1
- package/build/components/block-lock/modal.js +10 -22
- package/build/components/block-lock/modal.js.map +1 -1
- package/build/components/block-lock/toolbar.js +6 -16
- package/build/components/block-lock/toolbar.js.map +1 -1
- package/build/components/block-lock/use-block-lock.js +0 -3
- package/build/components/block-lock/use-block-lock.js.map +1 -1
- package/build/components/block-media-update-progress/index.native.js +9 -64
- package/build/components/block-media-update-progress/index.native.js.map +1 -1
- package/build/components/block-mover/button.js +1 -23
- package/build/components/block-mover/button.js.map +1 -1
- package/build/components/block-mover/index.js +4 -18
- package/build/components/block-mover/index.js.map +1 -1
- package/build/components/block-mover/index.native.js +3 -21
- package/build/components/block-mover/index.native.js.map +1 -1
- package/build/components/block-mover/mover-description.js +41 -63
- package/build/components/block-mover/mover-description.js.map +1 -1
- package/build/components/block-mover/mover-description.native.js +1 -20
- package/build/components/block-mover/mover-description.native.js.map +1 -1
- package/build/components/block-navigation/dropdown.js +6 -17
- package/build/components/block-navigation/dropdown.js.map +1 -1
- package/build/components/block-parent-selector/index.js +5 -22
- package/build/components/block-parent-selector/index.js.map +1 -1
- package/build/components/block-pattern-setup/constants.js.map +1 -1
- package/build/components/block-pattern-setup/index.js +3 -23
- package/build/components/block-pattern-setup/index.js.map +1 -1
- package/build/components/block-pattern-setup/setup-toolbar.js +1 -9
- package/build/components/block-pattern-setup/setup-toolbar.js.map +1 -1
- package/build/components/block-pattern-setup/use-patterns-setup.js +1 -6
- package/build/components/block-pattern-setup/use-patterns-setup.js.map +1 -1
- package/build/components/block-patterns-list/index.js +3 -17
- package/build/components/block-patterns-list/index.js.map +1 -1
- package/build/components/block-popover/drop-zone.js +1 -12
- package/build/components/block-popover/drop-zone.js.map +1 -1
- package/build/components/block-popover/inbetween.js +16 -33
- package/build/components/block-popover/inbetween.js.map +1 -1
- package/build/components/block-popover/index.js +15 -26
- package/build/components/block-popover/index.js.map +1 -1
- package/build/components/block-popover/use-popover-scroll.js +2 -7
- package/build/components/block-popover/use-popover-scroll.js.map +1 -1
- package/build/components/block-preview/auto.js +9 -18
- package/build/components/block-preview/auto.js.map +1 -1
- package/build/components/block-preview/index.js +8 -24
- package/build/components/block-preview/index.js.map +1 -1
- package/build/components/block-quick-navigation/index.js +2 -13
- package/build/components/block-quick-navigation/index.js.map +1 -1
- package/build/components/block-removal-warning-modal/index.js +5 -15
- package/build/components/block-removal-warning-modal/index.js.map +1 -1
- package/build/components/block-selection-clearer/index.js +2 -11
- package/build/components/block-selection-clearer/index.js.map +1 -1
- package/build/components/block-settings/button.native.js +3 -10
- package/build/components/block-settings/button.native.js.map +1 -1
- package/build/components/block-settings/container.native.js +3 -9
- package/build/components/block-settings/container.native.js.map +1 -1
- package/build/components/block-settings/index.native.js +0 -5
- package/build/components/block-settings/index.native.js.map +1 -1
- package/build/components/block-settings-menu/block-convert-button.js +1 -5
- package/build/components/block-settings-menu/block-convert-button.js.map +1 -1
- package/build/components/block-settings-menu/block-html-convert-button.js +0 -9
- package/build/components/block-settings-menu/block-html-convert-button.js.map +1 -1
- package/build/components/block-settings-menu/block-mode-toggle.js +1 -13
- package/build/components/block-settings-menu/block-mode-toggle.js.map +1 -1
- package/build/components/block-settings-menu/block-settings-dropdown.js +14 -37
- package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build/components/block-settings-menu/block-settings-menu-first-item.js +1 -2
- package/build/components/block-settings-menu/block-settings-menu-first-item.js.map +1 -1
- package/build/components/block-settings-menu/index.js +1 -6
- package/build/components/block-settings-menu/index.js.map +1 -1
- package/build/components/block-settings-menu-controls/index.js +13 -22
- package/build/components/block-settings-menu-controls/index.js.map +1 -1
- package/build/components/block-styles/index.js +2 -20
- package/build/components/block-styles/index.js.map +1 -1
- package/build/components/block-styles/index.native.js +1 -17
- package/build/components/block-styles/index.native.js.map +1 -1
- package/build/components/block-styles/menu-items.js +1 -9
- package/build/components/block-styles/menu-items.js.map +1 -1
- package/build/components/block-styles/preview-panel.js +5 -8
- package/build/components/block-styles/preview-panel.js.map +1 -1
- package/build/components/block-styles/preview.native.js +3 -19
- package/build/components/block-styles/preview.native.js.map +1 -1
- package/build/components/block-styles/use-styles-for-block.js +1 -15
- package/build/components/block-styles/use-styles-for-block.js.map +1 -1
- package/build/components/block-styles/utils.js +3 -16
- package/build/components/block-styles/utils.js.map +1 -1
- package/build/components/block-switcher/block-styles-menu.js +1 -6
- package/build/components/block-switcher/block-styles-menu.js.map +1 -1
- package/build/components/block-switcher/block-transformations-menu.js +4 -18
- package/build/components/block-switcher/block-transformations-menu.js.map +1 -1
- package/build/components/block-switcher/block-transformations-menu.native.js +4 -18
- package/build/components/block-switcher/block-transformations-menu.native.js.map +1 -1
- package/build/components/block-switcher/block-variation-transformations.js +3 -16
- package/build/components/block-switcher/block-variation-transformations.js.map +1 -1
- package/build/components/block-switcher/index.js +12 -43
- package/build/components/block-switcher/index.js.map +1 -1
- package/build/components/block-switcher/pattern-transformations-menu.js +3 -14
- package/build/components/block-switcher/pattern-transformations-menu.js.map +1 -1
- package/build/components/block-switcher/preview-block-popover.js +1 -6
- package/build/components/block-switcher/preview-block-popover.js.map +1 -1
- package/build/components/block-switcher/use-transformed-patterns.js +12 -27
- package/build/components/block-switcher/use-transformed-patterns.js.map +1 -1
- package/build/components/block-switcher/utils.js +5 -10
- package/build/components/block-switcher/utils.js.map +1 -1
- package/build/components/block-title/index.js +0 -3
- package/build/components/block-title/index.js.map +1 -1
- package/build/components/block-title/use-block-display-title.js +2 -15
- package/build/components/block-title/use-block-display-title.js.map +1 -1
- package/build/components/block-toolbar/block-name-context.js +1 -3
- package/build/components/block-toolbar/block-name-context.js.map +1 -1
- package/build/components/block-toolbar/block-toolbar-last-item.js +1 -2
- package/build/components/block-toolbar/block-toolbar-last-item.js.map +1 -1
- package/build/components/block-toolbar/block-toolbar-menu.native.js +24 -43
- package/build/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
- package/build/components/block-toolbar/index.js +6 -30
- package/build/components/block-toolbar/index.js.map +1 -1
- package/build/components/block-toolbar/index.native.js +1 -15
- package/build/components/block-toolbar/index.native.js.map +1 -1
- package/build/components/block-toolbar/utils.js +4 -25
- package/build/components/block-toolbar/utils.js.map +1 -1
- package/build/components/block-tools/back-compat.js +3 -11
- package/build/components/block-tools/back-compat.js.map +1 -1
- package/build/components/block-tools/block-contextual-toolbar.js +51 -26
- package/build/components/block-tools/block-contextual-toolbar.js.map +1 -1
- package/build/components/block-tools/block-selection-button.js +8 -43
- package/build/components/block-tools/block-selection-button.js.map +1 -1
- package/build/components/block-tools/index.js +9 -32
- package/build/components/block-tools/index.js.map +1 -1
- package/build/components/block-tools/insertion-point.js +8 -30
- package/build/components/block-tools/insertion-point.js.map +1 -1
- package/build/components/block-tools/selected-block-popover.js +12 -35
- package/build/components/block-tools/selected-block-popover.js.map +1 -1
- package/build/components/block-tools/use-block-toolbar-popover-props.js +35 -36
- package/build/components/block-tools/use-block-toolbar-popover-props.js.map +1 -1
- package/build/components/block-tools/zoom-out-mode-inserters.js +3 -12
- package/build/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
- package/build/components/block-types-list/index.js +1 -10
- package/build/components/block-types-list/index.js.map +1 -1
- package/build/components/block-types-list/index.native.js +3 -22
- package/build/components/block-types-list/index.native.js.map +1 -1
- package/build/components/block-variation-picker/index.js +1 -8
- package/build/components/block-variation-picker/index.js.map +1 -1
- package/build/components/block-variation-picker/index.native.js +1 -16
- package/build/components/block-variation-picker/index.native.js.map +1 -1
- package/build/components/block-variation-transforms/index.js +8 -22
- package/build/components/block-variation-transforms/index.js.map +1 -1
- package/build/components/block-vertical-alignment-control/icons.js +1 -3
- package/build/components/block-vertical-alignment-control/icons.js.map +1 -1
- package/build/components/block-vertical-alignment-control/index.js +6 -10
- package/build/components/block-vertical-alignment-control/index.js.map +1 -1
- package/build/components/block-vertical-alignment-control/ui.js +4 -10
- package/build/components/block-vertical-alignment-control/ui.js.map +1 -1
- package/build/components/border-radius-control/all-input-control.js +8 -13
- package/build/components/border-radius-control/all-input-control.js.map +1 -1
- package/build/components/border-radius-control/index.js +5 -16
- package/build/components/border-radius-control/index.js.map +1 -1
- package/build/components/border-radius-control/input-controls.js +14 -15
- package/build/components/border-radius-control/input-controls.js.map +1 -1
- package/build/components/border-radius-control/linked-button.js +5 -7
- package/build/components/border-radius-control/linked-button.js.map +1 -1
- package/build/components/border-radius-control/utils.js +9 -17
- package/build/components/border-radius-control/utils.js.map +1 -1
- package/build/components/button-block-appender/index.js +5 -19
- package/build/components/button-block-appender/index.js.map +1 -1
- package/build/components/button-block-appender/index.native.js +4 -13
- package/build/components/button-block-appender/index.native.js.map +1 -1
- package/build/components/caption/index.native.js +1 -7
- package/build/components/caption/index.native.js.map +1 -1
- package/build/components/child-layout-control/index.js +8 -13
- package/build/components/child-layout-control/index.js.map +1 -1
- package/build/components/color-palette/control.js +3 -5
- package/build/components/color-palette/control.js.map +1 -1
- package/build/components/color-palette/index.js +0 -6
- package/build/components/color-palette/index.js.map +1 -1
- package/build/components/color-palette/with-color-context.js +2 -8
- package/build/components/color-palette/with-color-context.js.map +1 -1
- package/build/components/color-style-selector/index.js +3 -14
- package/build/components/color-style-selector/index.js.map +1 -1
- package/build/components/colors/index.js +0 -4
- package/build/components/colors/index.js.map +1 -1
- package/build/components/colors/utils.js +5 -20
- package/build/components/colors/utils.js.map +1 -1
- package/build/components/colors/with-colors.js +15 -30
- package/build/components/colors/with-colors.js.map +1 -1
- package/build/components/colors-gradients/control.js +7 -19
- package/build/components/colors-gradients/control.js.map +1 -1
- package/build/components/colors-gradients/dropdown.js +15 -21
- package/build/components/colors-gradients/dropdown.js.map +1 -1
- package/build/components/colors-gradients/panel-color-gradient-settings.js +7 -20
- package/build/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
- package/build/components/colors-gradients/panel-color-gradient-settings.native.js +1 -5
- package/build/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
- package/build/components/colors-gradients/use-multiple-origin-colors-and-gradients.js +0 -13
- package/build/components/colors-gradients/use-multiple-origin-colors-and-gradients.js.map +1 -1
- package/build/components/contrast-checker/index.js +20 -31
- package/build/components/contrast-checker/index.js.map +1 -1
- package/build/components/contrast-checker/index.native.js +4 -21
- package/build/components/contrast-checker/index.native.js.map +1 -1
- package/build/components/convert-to-group-buttons/index.js +1 -18
- package/build/components/convert-to-group-buttons/index.js.map +1 -1
- package/build/components/convert-to-group-buttons/index.native.js +5 -17
- package/build/components/convert-to-group-buttons/index.native.js.map +1 -1
- package/build/components/convert-to-group-buttons/toolbar.js +3 -19
- package/build/components/convert-to-group-buttons/toolbar.js.map +1 -1
- package/build/components/convert-to-group-buttons/use-convert-to-group-button-props.js +4 -7
- package/build/components/convert-to-group-buttons/use-convert-to-group-button-props.js.map +1 -1
- package/build/components/copy-handler/index.js +24 -53
- package/build/components/copy-handler/index.js.map +1 -1
- package/build/components/date-format-picker/index.js +2 -8
- package/build/components/date-format-picker/index.js.map +1 -1
- package/build/components/default-block-appender/index.js +4 -18
- package/build/components/default-block-appender/index.js.map +1 -1
- package/build/components/default-block-appender/index.native.js +14 -21
- package/build/components/default-block-appender/index.native.js.map +1 -1
- package/build/components/default-style-picker/index.js +4 -12
- package/build/components/default-style-picker/index.js.map +1 -1
- package/build/components/dimensions-tool/aspect-ratio-tool.js +1 -6
- package/build/components/dimensions-tool/aspect-ratio-tool.js.map +1 -1
- package/build/components/dimensions-tool/index.js +37 -36
- package/build/components/dimensions-tool/index.js.map +1 -1
- package/build/components/dimensions-tool/scale-tool.js +1 -5
- package/build/components/dimensions-tool/scale-tool.js.map +1 -1
- package/build/components/dimensions-tool/width-height-tool.js +5 -15
- package/build/components/dimensions-tool/width-height-tool.js.map +1 -1
- package/build/components/duotone/components.js +5 -11
- package/build/components/duotone/components.js.map +1 -1
- package/build/components/duotone/index.js +0 -2
- package/build/components/duotone/index.js.map +1 -1
- package/build/components/duotone/utils.js +0 -2
- package/build/components/duotone/utils.js.map +1 -1
- package/build/components/duotone-control/index.js +1 -10
- package/build/components/duotone-control/index.js.map +1 -1
- package/build/components/editable-text/index.js +4 -8
- package/build/components/editable-text/index.js.map +1 -1
- package/build/components/editor-styles/index.js +3 -15
- package/build/components/editor-styles/index.js.map +1 -1
- package/build/components/floating-toolbar/index.native.js +3 -18
- package/build/components/floating-toolbar/index.native.js.map +1 -1
- package/build/components/floating-toolbar/nav-up-icon.js +1 -5
- package/build/components/floating-toolbar/nav-up-icon.js.map +1 -1
- package/build/components/font-appearance-control/index.js +25 -30
- package/build/components/font-appearance-control/index.js.map +1 -1
- package/build/components/font-family/index.js +1 -9
- package/build/components/font-family/index.js.map +1 -1
- package/build/components/font-sizes/fluid-utils.js +41 -40
- package/build/components/font-sizes/fluid-utils.js.map +1 -1
- package/build/components/font-sizes/font-size-picker.js +4 -8
- package/build/components/font-sizes/font-size-picker.js.map +1 -1
- package/build/components/font-sizes/index.js +0 -5
- package/build/components/font-sizes/index.js.map +1 -1
- package/build/components/font-sizes/index.native.js +0 -4
- package/build/components/font-sizes/index.native.js.map +1 -1
- package/build/components/font-sizes/utils.js +2 -12
- package/build/components/font-sizes/utils.js.map +1 -1
- package/build/components/font-sizes/with-font-sizes.js +15 -27
- package/build/components/font-sizes/with-font-sizes.js.map +1 -1
- package/build/components/global-styles/advanced-panel.js +3 -14
- package/build/components/global-styles/advanced-panel.js.map +1 -1
- package/build/components/global-styles/behaviors-panel.js +3 -5
- package/build/components/global-styles/behaviors-panel.js.map +1 -1
- package/build/components/global-styles/border-panel.js +22 -43
- package/build/components/global-styles/border-panel.js.map +1 -1
- package/build/components/global-styles/color-panel.js +30 -69
- package/build/components/global-styles/color-panel.js.map +1 -1
- package/build/components/global-styles/color-panel.native.js +5 -19
- package/build/components/global-styles/color-panel.native.js.map +1 -1
- package/build/components/global-styles/context.js +1 -2
- package/build/components/global-styles/context.js.map +1 -1
- package/build/components/global-styles/dimensions-panel.js +33 -92
- package/build/components/global-styles/dimensions-panel.js.map +1 -1
- package/build/components/global-styles/effects-panel.js +7 -27
- package/build/components/global-styles/effects-panel.js.map +1 -1
- package/build/components/global-styles/filters-panel.js +9 -25
- package/build/components/global-styles/filters-panel.js.map +1 -1
- package/build/components/global-styles/get-block-css-selector.js +33 -31
- package/build/components/global-styles/get-block-css-selector.js.map +1 -1
- package/build/components/global-styles/hooks.js +41 -90
- package/build/components/global-styles/hooks.js.map +1 -1
- package/build/components/global-styles/index.js +0 -16
- package/build/components/global-styles/index.js.map +1 -1
- package/build/components/global-styles/typography-panel.js +25 -87
- package/build/components/global-styles/typography-panel.js.map +1 -1
- package/build/components/global-styles/typography-utils.js +6 -14
- package/build/components/global-styles/typography-utils.js.map +1 -1
- package/build/components/global-styles/use-global-styles-output.js +96 -190
- package/build/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build/components/global-styles/utils.js +11 -48
- package/build/components/global-styles/utils.js.map +1 -1
- package/build/components/gradients/index.js +0 -2
- package/build/components/gradients/index.js.map +1 -1
- package/build/components/gradients/index.native.js +0 -4
- package/build/components/gradients/index.native.js.map +1 -1
- package/build/components/gradients/use-gradient.js +3 -21
- package/build/components/gradients/use-gradient.js.map +1 -1
- package/build/components/gradients/with-gradient.js +3 -5
- package/build/components/gradients/with-gradient.js.map +1 -1
- package/build/components/height-control/index.js +2 -12
- package/build/components/height-control/index.js.map +1 -1
- package/build/components/iframe/index.js +23 -46
- package/build/components/iframe/index.js.map +1 -1
- package/build/components/iframe/use-compatibility-styles.js +8 -20
- package/build/components/iframe/use-compatibility-styles.js.map +1 -1
- package/build/components/image-editor/aspect-ratio-dropdown.js +3 -9
- package/build/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
- package/build/components/image-editor/constants.js.map +1 -1
- package/build/components/image-editor/context.js +3 -9
- package/build/components/image-editor/context.js.map +1 -1
- package/build/components/image-editor/cropper.js +3 -11
- package/build/components/image-editor/cropper.js.map +1 -1
- package/build/components/image-editor/form-controls.js +1 -5
- package/build/components/image-editor/form-controls.js.map +1 -1
- package/build/components/image-editor/index.js +1 -11
- package/build/components/image-editor/index.js.map +1 -1
- package/build/components/image-editor/rotation-button.js +1 -6
- package/build/components/image-editor/rotation-button.js.map +1 -1
- package/build/components/image-editor/use-save-image.js +5 -15
- package/build/components/image-editor/use-save-image.js.map +1 -1
- package/build/components/image-editor/use-transform-image.js +1 -12
- package/build/components/image-editor/use-transform-image.js.map +1 -1
- package/build/components/image-editor/zoom-dropdown.js +1 -7
- package/build/components/image-editor/zoom-dropdown.js.map +1 -1
- package/build/components/image-size-control/index.js +1 -9
- package/build/components/image-size-control/index.js.map +1 -1
- package/build/components/image-size-control/use-dimension-handler.js +7 -14
- package/build/components/image-size-control/use-dimension-handler.js.map +1 -1
- package/build/components/index.js +25 -115
- package/build/components/index.js.map +1 -1
- package/build/components/index.native.js +0 -53
- package/build/components/index.native.js.map +1 -1
- package/build/components/inner-blocks/button-block-appender.js +1 -9
- package/build/components/inner-blocks/button-block-appender.js.map +1 -1
- package/build/components/inner-blocks/default-block-appender.js +1 -11
- package/build/components/inner-blocks/default-block-appender.js.map +1 -1
- package/build/components/inner-blocks/index.js +22 -38
- package/build/components/inner-blocks/index.js.map +1 -1
- package/build/components/inner-blocks/index.native.js +18 -31
- package/build/components/inner-blocks/index.native.js.map +1 -1
- package/build/components/inner-blocks/use-block-context.js +0 -9
- package/build/components/inner-blocks/use-block-context.js.map +1 -1
- package/build/components/inner-blocks/use-inner-block-template-sync.js +10 -18
- package/build/components/inner-blocks/use-inner-block-template-sync.js.map +1 -1
- package/build/components/inner-blocks/use-nested-settings-update.js +18 -27
- package/build/components/inner-blocks/use-nested-settings-update.js.map +1 -1
- package/build/components/inner-blocks/with-client-id.js +3 -5
- package/build/components/inner-blocks/with-client-id.js.map +1 -1
- package/build/components/inserter/block-patterns-explorer/explorer.js +3 -10
- package/build/components/inserter/block-patterns-explorer/explorer.js.map +1 -1
- package/build/components/inserter/block-patterns-explorer/patterns-list.js +5 -24
- package/build/components/inserter/block-patterns-explorer/patterns-list.js.map +1 -1
- package/build/components/inserter/block-patterns-explorer/sidebar.js +1 -7
- package/build/components/inserter/block-patterns-explorer/sidebar.js.map +1 -1
- package/build/components/inserter/block-patterns-tab.js +12 -33
- package/build/components/inserter/block-patterns-tab.js.map +1 -1
- package/build/components/inserter/block-types-tab.js +9 -25
- package/build/components/inserter/block-types-tab.js.map +1 -1
- package/build/components/inserter/block-types-tab.native.js +1 -14
- package/build/components/inserter/block-types-tab.native.js.map +1 -1
- package/build/components/inserter/hooks/use-block-type-impressions.native.js +9 -12
- package/build/components/inserter/hooks/use-block-type-impressions.native.js.map +1 -1
- package/build/components/inserter/hooks/use-block-types-state.js +0 -6
- package/build/components/inserter/hooks/use-block-types-state.js.map +1 -1
- package/build/components/inserter/hooks/use-clipboard-block.native.js +1 -7
- package/build/components/inserter/hooks/use-clipboard-block.native.js.map +1 -1
- package/build/components/inserter/hooks/use-debounced-input.js +1 -3
- package/build/components/inserter/hooks/use-debounced-input.js.map +1 -1
- package/build/components/inserter/hooks/use-insertion-point.js +2 -15
- package/build/components/inserter/hooks/use-insertion-point.js.map +1 -1
- package/build/components/inserter/hooks/use-patterns-state.js +4 -12
- package/build/components/inserter/hooks/use-patterns-state.js.map +1 -1
- package/build/components/inserter/index.js +29 -66
- package/build/components/inserter/index.js.map +1 -1
- package/build/components/inserter/index.native.js +23 -71
- package/build/components/inserter/index.native.js.map +1 -1
- package/build/components/inserter/library.js +1 -11
- package/build/components/inserter/library.js.map +1 -1
- package/build/components/inserter/media-tab/hooks.js +12 -27
- package/build/components/inserter/media-tab/hooks.js.map +1 -1
- package/build/components/inserter/media-tab/index.js +0 -4
- package/build/components/inserter/media-tab/index.js.map +1 -1
- package/build/components/inserter/media-tab/media-list.js +3 -7
- package/build/components/inserter/media-tab/media-list.js.map +1 -1
- package/build/components/inserter/media-tab/media-panel.js +1 -13
- package/build/components/inserter/media-tab/media-panel.js.map +1 -1
- package/build/components/inserter/media-tab/media-preview.js +10 -35
- package/build/components/inserter/media-tab/media-preview.js.map +1 -1
- package/build/components/inserter/media-tab/media-tab.js +3 -18
- package/build/components/inserter/media-tab/media-tab.js.map +1 -1
- package/build/components/inserter/media-tab/utils.js +2 -6
- package/build/components/inserter/media-tab/utils.js.map +1 -1
- package/build/components/inserter/menu.js +2 -22
- package/build/components/inserter/menu.js.map +1 -1
- package/build/components/inserter/menu.native.js +5 -24
- package/build/components/inserter/menu.native.js.map +1 -1
- package/build/components/inserter/mobile-tab-navigation.js +3 -7
- package/build/components/inserter/mobile-tab-navigation.js.map +1 -1
- package/build/components/inserter/no-results.js +1 -5
- package/build/components/inserter/no-results.js.map +1 -1
- package/build/components/inserter/no-results.native.js +1 -8
- package/build/components/inserter/no-results.native.js.map +1 -1
- package/build/components/inserter/panel.js +1 -4
- package/build/components/inserter/panel.js.map +1 -1
- package/build/components/inserter/preview-panel.js +14 -15
- package/build/components/inserter/preview-panel.js.map +1 -1
- package/build/components/inserter/quick-inserter.js +4 -18
- package/build/components/inserter/quick-inserter.js.map +1 -1
- package/build/components/inserter/reusable-block-rename-hint.js +2 -16
- package/build/components/inserter/reusable-block-rename-hint.js.map +1 -1
- package/build/components/inserter/reusable-blocks-tab.js +3 -17
- package/build/components/inserter/reusable-blocks-tab.js.map +1 -1
- package/build/components/inserter/reusable-blocks-tab.native.js +1 -9
- package/build/components/inserter/reusable-blocks-tab.native.js.map +1 -1
- package/build/components/inserter/search-items.js +21 -41
- package/build/components/inserter/search-items.js.map +1 -1
- package/build/components/inserter/search-results.js +6 -37
- package/build/components/inserter/search-results.js.map +1 -1
- package/build/components/inserter/search-results.native.js +1 -15
- package/build/components/inserter/search-results.native.js.map +1 -1
- package/build/components/inserter/tabs.js +1 -17
- package/build/components/inserter/tabs.js.map +1 -1
- package/build/components/inserter/tabs.native.js +5 -20
- package/build/components/inserter/tabs.native.js.map +1 -1
- package/build/components/inserter/tips.js +3 -7
- package/build/components/inserter/tips.js.map +1 -1
- package/build/components/inserter/utils.native.js +2 -9
- package/build/components/inserter/utils.native.js.map +1 -1
- package/build/components/inserter-draggable-blocks/index.js +1 -8
- package/build/components/inserter-draggable-blocks/index.js.map +1 -1
- package/build/components/inserter-list-item/index.js +1 -16
- package/build/components/inserter-list-item/index.js.map +1 -1
- package/build/components/inserter-listbox/context.js +1 -2
- package/build/components/inserter-listbox/context.js.map +1 -1
- package/build/components/inserter-listbox/group.js +1 -7
- package/build/components/inserter-listbox/group.js.map +1 -1
- package/build/components/inserter-listbox/index.js +1 -9
- package/build/components/inserter-listbox/index.js.map +1 -1
- package/build/components/inserter-listbox/item.js +9 -14
- package/build/components/inserter-listbox/item.js.map +1 -1
- package/build/components/inserter-listbox/row.js +1 -7
- package/build/components/inserter-listbox/row.js.map +1 -1
- package/build/components/inserter-menu-extension/index.js +1 -2
- package/build/components/inserter-menu-extension/index.js.map +1 -1
- package/build/components/inspector-controls/block-support-slot-container.js +3 -4
- package/build/components/inspector-controls/block-support-slot-container.js.map +1 -1
- package/build/components/inspector-controls/block-support-tools-panel.js +7 -9
- package/build/components/inspector-controls/block-support-tools-panel.js.map +1 -1
- package/build/components/inspector-controls/fill.js +4 -16
- package/build/components/inspector-controls/fill.js.map +1 -1
- package/build/components/inspector-controls/fill.native.js +3 -15
- package/build/components/inspector-controls/fill.native.js.map +1 -1
- package/build/components/inspector-controls/groups.js +1 -2
- package/build/components/inspector-controls/groups.js.map +1 -1
- package/build/components/inspector-controls/index.js +8 -12
- package/build/components/inspector-controls/index.js.map +1 -1
- package/build/components/inspector-controls/slot.js +5 -16
- package/build/components/inspector-controls/slot.js.map +1 -1
- package/build/components/inspector-controls/slot.native.js +3 -10
- package/build/components/inspector-controls/slot.native.js.map +1 -1
- package/build/components/inspector-controls-tabs/advanced-controls-panel.js +1 -10
- package/build/components/inspector-controls-tabs/advanced-controls-panel.js.map +1 -1
- package/build/components/inspector-controls-tabs/index.js +1 -11
- package/build/components/inspector-controls-tabs/index.js.map +1 -1
- package/build/components/inspector-controls-tabs/position-controls-panel.js +3 -14
- package/build/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
- package/build/components/inspector-controls-tabs/settings-tab-hint.js +1 -13
- package/build/components/inspector-controls-tabs/settings-tab-hint.js.map +1 -1
- package/build/components/inspector-controls-tabs/settings-tab.js +1 -8
- package/build/components/inspector-controls-tabs/settings-tab.js.map +1 -1
- package/build/components/inspector-controls-tabs/styles-tab.js +1 -10
- package/build/components/inspector-controls-tabs/styles-tab.js.map +1 -1
- package/build/components/inspector-controls-tabs/use-inspector-controls-tabs.js +14 -24
- package/build/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +1 -1
- package/build/components/inspector-controls-tabs/use-is-list-view-tab-disabled.js +0 -2
- package/build/components/inspector-controls-tabs/use-is-list-view-tab-disabled.js.map +1 -1
- package/build/components/inspector-controls-tabs/utils.js +1 -3
- package/build/components/inspector-controls-tabs/utils.js.map +1 -1
- package/build/components/inspector-popover-header/index.js +1 -5
- package/build/components/inspector-popover-header/index.js.map +1 -1
- package/build/components/justify-content-control/index.js +6 -10
- package/build/components/justify-content-control/index.js.map +1 -1
- package/build/components/justify-content-control/ui.js +1 -8
- package/build/components/justify-content-control/ui.js.map +1 -1
- package/build/components/keyboard-shortcuts/index.js +10 -7
- package/build/components/keyboard-shortcuts/index.js.map +1 -1
- package/build/components/letter-spacing-control/index.js +2 -7
- package/build/components/letter-spacing-control/index.js.map +1 -1
- package/build/components/line-height-control/index.js +21 -37
- package/build/components/line-height-control/index.js.map +1 -1
- package/build/components/line-height-control/index.native.js +5 -7
- package/build/components/line-height-control/index.native.js.map +1 -1
- package/build/components/line-height-control/utils.js +10 -6
- package/build/components/line-height-control/utils.js.map +1 -1
- package/build/components/link-control/constants.js +1 -2
- package/build/components/link-control/constants.js.map +1 -1
- package/build/components/link-control/index.js +42 -56
- package/build/components/link-control/index.js.map +1 -1
- package/build/components/link-control/is-url-like.js +4 -8
- package/build/components/link-control/is-url-like.js.map +1 -1
- package/build/components/link-control/link-preview.js +10 -18
- package/build/components/link-control/link-preview.js.map +1 -1
- package/build/components/link-control/search-create-button.js +4 -12
- package/build/components/link-control/search-create-button.js.map +1 -1
- package/build/components/link-control/search-input.js +15 -28
- package/build/components/link-control/search-input.js.map +1 -1
- package/build/components/link-control/search-item.js +7 -19
- package/build/components/link-control/search-item.js.map +1 -1
- package/build/components/link-control/search-results.js +13 -22
- package/build/components/link-control/search-results.js.map +1 -1
- package/build/components/link-control/settings-drawer.js +1 -7
- package/build/components/link-control/settings-drawer.js.map +1 -1
- package/build/components/link-control/settings.js +3 -9
- package/build/components/link-control/settings.js.map +1 -1
- package/build/components/link-control/use-create-page.js +5 -12
- package/build/components/link-control/use-create-page.js.map +1 -1
- package/build/components/link-control/use-internal-value.js +9 -12
- package/build/components/link-control/use-internal-value.js.map +1 -1
- package/build/components/link-control/use-rich-url-data.js +9 -14
- package/build/components/link-control/use-rich-url-data.js.map +1 -1
- package/build/components/link-control/use-search-handler.js +10 -24
- package/build/components/link-control/use-search-handler.js.map +1 -1
- package/build/components/link-control/viewer-slot.js +1 -2
- package/build/components/link-control/viewer-slot.js.map +1 -1
- package/build/components/list-view/appender.js +4 -18
- package/build/components/list-view/appender.js.map +1 -1
- package/build/components/list-view/aria-referenced-text.js +0 -2
- package/build/components/list-view/aria-referenced-text.js.map +1 -1
- package/build/components/list-view/block-contents.js +4 -11
- package/build/components/list-view/block-contents.js.map +1 -1
- package/build/components/list-view/block-select-button.js +31 -32
- package/build/components/list-view/block-select-button.js.map +1 -1
- package/build/components/list-view/block.js +24 -46
- package/build/components/list-view/block.js.map +1 -1
- package/build/components/list-view/branch.js +7 -37
- package/build/components/list-view/branch.js.map +1 -1
- package/build/components/list-view/context.js +1 -4
- package/build/components/list-view/context.js.map +1 -1
- package/build/components/list-view/drop-indicator.js +35 -47
- package/build/components/list-view/drop-indicator.js.map +1 -1
- package/build/components/list-view/expander.js +3 -5
- package/build/components/list-view/expander.js.map +1 -1
- package/build/components/list-view/index.js +18 -39
- package/build/components/list-view/index.js.map +1 -1
- package/build/components/list-view/leaf.js +1 -8
- package/build/components/list-view/leaf.js.map +1 -1
- package/build/components/list-view/use-block-selection.js +15 -30
- package/build/components/list-view/use-block-selection.js.map +1 -1
- package/build/components/list-view/use-list-view-client-ids.js +1 -4
- package/build/components/list-view/use-list-view-client-ids.js.map +1 -1
- package/build/components/list-view/use-list-view-drop-zone.js +33 -63
- package/build/components/list-view/use-list-view-drop-zone.js.map +1 -1
- package/build/components/list-view/use-list-view-expand-selected-item.js +5 -7
- package/build/components/list-view/use-list-view-expand-selected-item.js.map +1 -1
- package/build/components/list-view/use-list-view-images.js +84 -0
- package/build/components/list-view/use-list-view-images.js.map +1 -0
- package/build/components/list-view/use-list-view-scroll-into-view.js +6 -8
- package/build/components/list-view/use-list-view-scroll-into-view.js.map +1 -1
- package/build/components/list-view/utils.js +4 -10
- package/build/components/list-view/utils.js.map +1 -1
- package/build/components/media-placeholder/index.js +11 -71
- package/build/components/media-placeholder/index.js.map +1 -1
- package/build/components/media-placeholder/index.native.js +7 -30
- package/build/components/media-placeholder/index.native.js.map +1 -1
- package/build/components/media-replace-flow/index.js +8 -39
- package/build/components/media-replace-flow/index.js.map +1 -1
- package/build/components/media-replace-flow/index.native.js +1 -4
- package/build/components/media-replace-flow/index.native.js.map +1 -1
- package/build/components/media-upload/check.js +2 -5
- package/build/components/media-upload/check.js.map +1 -1
- package/build/components/media-upload/index.js +1 -5
- package/build/components/media-upload/index.js.map +1 -1
- package/build/components/media-upload/index.native.js +18 -43
- package/build/components/media-upload/index.native.js.map +1 -1
- package/build/components/media-upload-progress/index.native.js +3 -33
- package/build/components/media-upload-progress/index.native.js.map +1 -1
- package/build/components/multi-selection-inspector/index.js +3 -16
- package/build/components/multi-selection-inspector/index.js.map +1 -1
- package/build/components/navigable-toolbar/index.js +10 -32
- package/build/components/navigable-toolbar/index.js.map +1 -1
- package/build/components/observe-typing/index.js +24 -43
- package/build/components/observe-typing/index.js.map +1 -1
- package/build/components/panel-color-settings/index.js +3 -7
- package/build/components/panel-color-settings/index.js.map +1 -1
- package/build/components/plain-text/index.js +0 -7
- package/build/components/plain-text/index.js.map +1 -1
- package/build/components/plain-text/index.native.js +7 -27
- package/build/components/plain-text/index.native.js.map +1 -1
- package/build/components/preview-options/index.js +1 -8
- package/build/components/preview-options/index.js.map +1 -1
- package/build/components/provider/block-refs-provider.js +1 -3
- package/build/components/provider/block-refs-provider.js.map +1 -1
- package/build/components/provider/index.js +7 -14
- package/build/components/provider/index.js.map +1 -1
- package/build/components/provider/index.native.js +3 -9
- package/build/components/provider/index.native.js.map +1 -1
- package/build/components/provider/use-block-sync.js +23 -41
- package/build/components/provider/use-block-sync.js.map +1 -1
- package/build/components/provider/with-registry-provider.js +1 -9
- package/build/components/provider/with-registry-provider.js.map +1 -1
- package/build/components/publish-date-time-picker/index.js +1 -9
- package/build/components/publish-date-time-picker/index.js.map +1 -1
- package/build/components/recursion-provider/index.js +6 -9
- package/build/components/recursion-provider/index.js.map +1 -1
- package/build/components/resizable-box-popover/index.js +3 -6
- package/build/components/resizable-box-popover/index.js.map +1 -1
- package/build/components/resolution-tool/index.js +1 -5
- package/build/components/resolution-tool/index.js.map +1 -1
- package/build/components/responsive-block-control/index.js +3 -16
- package/build/components/responsive-block-control/index.js.map +1 -1
- package/build/components/responsive-block-control/label.js +2 -7
- package/build/components/responsive-block-control/label.js.map +1 -1
- package/build/components/rich-text/content.js +3 -13
- package/build/components/rich-text/content.js.map +1 -1
- package/build/components/rich-text/embed-handler-picker.native.js +1 -7
- package/build/components/rich-text/embed-handler-picker.native.js.map +1 -1
- package/build/components/rich-text/file-paste-handler.native.js +0 -1
- package/build/components/rich-text/file-paste-handler.native.js.map +1 -1
- package/build/components/rich-text/format-edit.js +3 -10
- package/build/components/rich-text/format-edit.js.map +1 -1
- package/build/components/rich-text/format-toolbar/index.js +4 -14
- package/build/components/rich-text/format-toolbar/index.js.map +1 -1
- package/build/components/rich-text/format-toolbar/index.native.js +1 -4
- package/build/components/rich-text/format-toolbar/index.native.js.map +1 -1
- package/build/components/rich-text/format-toolbar-container.js +4 -22
- package/build/components/rich-text/format-toolbar-container.js.map +1 -1
- package/build/components/rich-text/format-toolbar-container.native.js +1 -6
- package/build/components/rich-text/format-toolbar-container.native.js.map +1 -1
- package/build/components/rich-text/get-rich-text-values.js +2 -21
- package/build/components/rich-text/get-rich-text-values.js.map +1 -1
- package/build/components/rich-text/index.js +18 -68
- package/build/components/rich-text/index.js.map +1 -1
- package/build/components/rich-text/index.native.js +48 -94
- package/build/components/rich-text/index.native.js.map +1 -1
- package/build/components/rich-text/input-event.js +1 -4
- package/build/components/rich-text/input-event.js.map +1 -1
- package/build/components/rich-text/input-event.native.js +1 -4
- package/build/components/rich-text/input-event.native.js.map +1 -1
- package/build/components/rich-text/prevent-event-discovery.js +1 -6
- package/build/components/rich-text/prevent-event-discovery.js.map +1 -1
- package/build/components/rich-text/remove-browser-shortcuts.native.js +0 -2
- package/build/components/rich-text/remove-browser-shortcuts.native.js.map +1 -1
- package/build/components/rich-text/shortcut.js +1 -5
- package/build/components/rich-text/shortcut.js.map +1 -1
- package/build/components/rich-text/shortcut.native.js +1 -4
- package/build/components/rich-text/shortcut.native.js.map +1 -1
- package/build/components/rich-text/split-value.js +18 -17
- package/build/components/rich-text/split-value.js.map +1 -1
- package/build/components/rich-text/toolbar-button.js +3 -8
- package/build/components/rich-text/toolbar-button.js.map +1 -1
- package/build/components/rich-text/use-before-input-rules.js +5 -22
- package/build/components/rich-text/use-before-input-rules.js.map +1 -1
- package/build/components/rich-text/use-delete.js +6 -15
- package/build/components/rich-text/use-delete.js.map +1 -1
- package/build/components/rich-text/use-enter.js +3 -18
- package/build/components/rich-text/use-enter.js.map +1 -1
- package/build/components/rich-text/use-firefox-compat.js +5 -41
- package/build/components/rich-text/use-firefox-compat.js.map +1 -1
- package/build/components/rich-text/use-format-types.js +10 -23
- package/build/components/rich-text/use-format-types.js.map +1 -1
- package/build/components/rich-text/use-input-events.js +1 -3
- package/build/components/rich-text/use-input-events.js.map +1 -1
- package/build/components/rich-text/use-input-rules.js +10 -35
- package/build/components/rich-text/use-input-rules.js.map +1 -1
- package/build/components/rich-text/use-insert-replacement-text.js +0 -5
- package/build/components/rich-text/use-insert-replacement-text.js.map +1 -1
- package/build/components/rich-text/use-mark-persistent.js +6 -9
- package/build/components/rich-text/use-mark-persistent.js.map +1 -1
- package/build/components/rich-text/use-paste-handler.js +24 -71
- package/build/components/rich-text/use-paste-handler.js.map +1 -1
- package/build/components/rich-text/use-remove-browser-shortcuts.js +0 -4
- package/build/components/rich-text/use-remove-browser-shortcuts.js.map +1 -1
- package/build/components/rich-text/use-shortcuts.js +1 -3
- package/build/components/rich-text/use-shortcuts.js.map +1 -1
- package/build/components/rich-text/use-undo-automatic-change.js +1 -13
- package/build/components/rich-text/use-undo-automatic-change.js.map +1 -1
- package/build/components/rich-text/utils.js +3 -15
- package/build/components/rich-text/utils.js.map +1 -1
- package/build/components/selection-scroll-into-view/index.js +0 -3
- package/build/components/selection-scroll-into-view/index.js.map +1 -1
- package/build/components/skip-to-selected-block/index.js +2 -12
- package/build/components/skip-to-selected-block/index.js.map +1 -1
- package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js +1 -6
- package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
- package/build/components/spacing-sizes-control/index.js +13 -23
- package/build/components/spacing-sizes-control/index.js.map +1 -1
- package/build/components/spacing-sizes-control/input-controls/axial.js +7 -14
- package/build/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
- package/build/components/spacing-sizes-control/input-controls/separated.js +3 -8
- package/build/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
- package/build/components/spacing-sizes-control/input-controls/single.js +3 -7
- package/build/components/spacing-sizes-control/input-controls/single.js.map +1 -1
- package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js +6 -29
- package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
- package/build/components/spacing-sizes-control/sides-dropdown/index.js +1 -7
- package/build/components/spacing-sizes-control/sides-dropdown/index.js.map +1 -1
- package/build/components/spacing-sizes-control/utils.js +34 -66
- package/build/components/spacing-sizes-control/utils.js.map +1 -1
- package/build/components/text-decoration-control/index.js +2 -8
- package/build/components/text-decoration-control/index.js.map +1 -1
- package/build/components/text-transform-control/index.js +2 -8
- package/build/components/text-transform-control/index.js.map +1 -1
- package/build/components/tool-selector/index.js +4 -13
- package/build/components/tool-selector/index.js.map +1 -1
- package/build/components/typewriter/index.js +30 -52
- package/build/components/typewriter/index.js.map +1 -1
- package/build/components/ungroup-button/index.native.js +1 -16
- package/build/components/ungroup-button/index.native.js.map +1 -1
- package/build/components/unit-control/index.js +1 -5
- package/build/components/unit-control/index.js.map +1 -1
- package/build/components/url-input/button.js +2 -13
- package/build/components/url-input/button.js.map +1 -1
- package/build/components/url-input/index.js +38 -91
- package/build/components/url-input/index.js.map +1 -1
- package/build/components/url-input/index.native.js +1 -4
- package/build/components/url-input/index.native.js.map +1 -1
- package/build/components/url-popover/image-url-input-ui.js +3 -36
- package/build/components/url-popover/image-url-input-ui.js.map +1 -1
- package/build/components/url-popover/index.js +5 -20
- package/build/components/url-popover/index.js.map +1 -1
- package/build/components/url-popover/link-editor.js +1 -8
- package/build/components/url-popover/link-editor.js.map +1 -1
- package/build/components/url-popover/link-viewer-url.js +1 -8
- package/build/components/url-popover/link-viewer-url.js.map +1 -1
- package/build/components/url-popover/link-viewer.js +1 -8
- package/build/components/url-popover/link-viewer.js.map +1 -1
- package/build/components/use-block-commands/index.js +247 -0
- package/build/components/use-block-commands/index.js.map +1 -0
- package/build/components/use-block-display-information/index.js +1 -9
- package/build/components/use-block-display-information/index.js.map +1 -1
- package/build/components/use-block-drop-zone/index.js +12 -29
- package/build/components/use-block-drop-zone/index.js.map +1 -1
- package/build/components/use-block-drop-zone/index.native.js +12 -24
- package/build/components/use-block-drop-zone/index.native.js.map +1 -1
- package/build/components/use-display-block-controls/index.js +1 -7
- package/build/components/use-display-block-controls/index.js.map +1 -1
- package/build/components/use-display-block-controls/index.native.js +1 -7
- package/build/components/use-display-block-controls/index.native.js.map +1 -1
- package/build/components/use-moving-animation/index.js +4 -20
- package/build/components/use-moving-animation/index.js.map +1 -1
- package/build/components/use-on-block-drop/index.js +19 -38
- package/build/components/use-on-block-drop/index.js.map +1 -1
- package/build/components/use-on-block-drop/index.native.js +11 -15
- package/build/components/use-on-block-drop/index.native.js.map +1 -1
- package/build/components/use-on-block-drop/types.js.map +1 -1
- package/build/components/use-paste-styles/index.js +10 -27
- package/build/components/use-paste-styles/index.js.map +1 -1
- package/build/components/use-resize-canvas/index.js +0 -14
- package/build/components/use-resize-canvas/index.js.map +1 -1
- package/build/components/use-setting/index.js +17 -39
- package/build/components/use-setting/index.js.map +1 -1
- package/build/components/video-player/gridicon-play.native.js +0 -4
- package/build/components/video-player/gridicon-play.native.js.map +1 -1
- package/build/components/video-player/index.native.js +9 -24
- package/build/components/video-player/index.native.js.map +1 -1
- package/build/components/warning/index.js +2 -9
- package/build/components/warning/index.js.map +1 -1
- package/build/components/warning/index.native.js +1 -10
- package/build/components/warning/index.native.js.map +1 -1
- package/build/components/writing-flow/index.js +4 -23
- package/build/components/writing-flow/index.js.map +1 -1
- package/build/components/writing-flow/use-arrow-nav.js +35 -60
- package/build/components/writing-flow/use-arrow-nav.js.map +1 -1
- package/build/components/writing-flow/use-click-selection.js +3 -10
- package/build/components/writing-flow/use-click-selection.js.map +1 -1
- package/build/components/writing-flow/use-drag-selection.js +25 -31
- package/build/components/writing-flow/use-drag-selection.js.map +1 -1
- package/build/components/writing-flow/use-input.js +6 -21
- package/build/components/writing-flow/use-input.js.map +1 -1
- package/build/components/writing-flow/use-multi-selection.js +10 -16
- package/build/components/writing-flow/use-multi-selection.js.map +1 -1
- package/build/components/writing-flow/use-select-all.js +4 -14
- package/build/components/writing-flow/use-select-all.js.map +1 -1
- package/build/components/writing-flow/use-selection-observer.js +18 -47
- package/build/components/writing-flow/use-selection-observer.js.map +1 -1
- package/build/components/writing-flow/use-tab-nav.js +28 -44
- package/build/components/writing-flow/use-tab-nav.js.map +1 -1
- package/build/components/writing-mode-control/index.js +2 -8
- package/build/components/writing-mode-control/index.js.map +1 -1
- package/build/elements/index.js +0 -2
- package/build/elements/index.js.map +1 -1
- package/build/hooks/align.js +22 -46
- package/build/hooks/align.js.map +1 -1
- package/build/hooks/align.native.js +5 -9
- package/build/hooks/align.native.js.map +1 -1
- package/build/hooks/anchor.js +9 -24
- package/build/hooks/anchor.js.map +1 -1
- package/build/hooks/aria-label.js +5 -11
- package/build/hooks/aria-label.js.map +1 -1
- package/build/hooks/behaviors.js +12 -23
- package/build/hooks/behaviors.js.map +1 -1
- package/build/hooks/border.js +45 -79
- package/build/hooks/border.js.map +1 -1
- package/build/hooks/color.js +31 -69
- package/build/hooks/color.js.map +1 -1
- package/build/hooks/compat.js +1 -5
- package/build/hooks/compat.js.map +1 -1
- package/build/hooks/content-lock-ui.js +5 -19
- package/build/hooks/content-lock-ui.js.map +1 -1
- package/build/hooks/contrast-checker.js +4 -13
- package/build/hooks/contrast-checker.js.map +1 -1
- package/build/hooks/custom-class-name.js +21 -37
- package/build/hooks/custom-class-name.js.map +1 -1
- package/build/hooks/custom-class-name.native.js +3 -11
- package/build/hooks/custom-class-name.native.js.map +1 -1
- package/build/hooks/custom-fields.js +115 -0
- package/build/hooks/custom-fields.js.map +1 -0
- package/build/hooks/dimensions.js +6 -23
- package/build/hooks/dimensions.js.map +1 -1
- package/build/hooks/duotone.js +42 -64
- package/build/hooks/duotone.js.map +1 -1
- package/build/hooks/font-family.js +9 -29
- package/build/hooks/font-family.js.map +1 -1
- package/build/hooks/font-size.js +36 -62
- package/build/hooks/font-size.js.map +1 -1
- package/build/hooks/gap.js +1 -7
- package/build/hooks/gap.js.map +1 -1
- package/build/hooks/generated-class-name.js +1 -5
- package/build/hooks/generated-class-name.js.map +1 -1
- package/build/hooks/index.js +1 -27
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/index.native.js +0 -14
- package/build/hooks/index.native.js.map +1 -1
- package/build/hooks/layout.js +45 -72
- package/build/hooks/layout.js.map +1 -1
- package/build/hooks/layout.native.js +4 -4
- package/build/hooks/layout.native.js.map +1 -1
- package/build/hooks/line-height.js +7 -15
- package/build/hooks/line-height.js.map +1 -1
- package/build/hooks/lock.js +4 -8
- package/build/hooks/lock.js.map +1 -1
- package/build/hooks/margin.js +1 -13
- package/build/hooks/margin.js.map +1 -1
- package/build/hooks/metadata-name.js +4 -8
- package/build/hooks/metadata-name.js.map +1 -1
- package/build/hooks/metadata.js +4 -14
- package/build/hooks/metadata.js.map +1 -1
- package/build/hooks/padding.js +1 -13
- package/build/hooks/padding.js.map +1 -1
- package/build/hooks/position.js +35 -61
- package/build/hooks/position.js.map +1 -1
- package/build/hooks/settings.js +5 -8
- package/build/hooks/settings.js.map +1 -1
- package/build/hooks/style.js +29 -61
- package/build/hooks/style.js.map +1 -1
- package/build/hooks/supports.js +23 -76
- package/build/hooks/supports.js.map +1 -1
- package/build/hooks/typography.js +11 -27
- package/build/hooks/typography.js.map +1 -1
- package/build/hooks/typography.native.js +5 -14
- package/build/hooks/typography.native.js.map +1 -1
- package/build/hooks/use-border-props.js +5 -10
- package/build/hooks/use-border-props.js.map +1 -1
- package/build/hooks/use-cached-truthy.js +0 -2
- package/build/hooks/use-cached-truthy.js.map +1 -1
- package/build/hooks/use-color-props.js +14 -20
- package/build/hooks/use-color-props.js.map +1 -1
- package/build/hooks/use-editor-wrapper-styles.native.js +7 -30
- package/build/hooks/use-editor-wrapper-styles.native.js.map +1 -1
- package/build/hooks/use-spacing-props.js +3 -3
- package/build/hooks/use-spacing-props.js.map +1 -1
- package/build/hooks/use-typography-props.js +2 -9
- package/build/hooks/use-typography-props.js.map +1 -1
- package/build/hooks/utils.js +10 -26
- package/build/hooks/utils.js.map +1 -1
- package/build/index.js +0 -10
- package/build/index.js.map +1 -1
- package/build/index.native.js +0 -3
- package/build/index.native.js.map +1 -1
- package/build/layouts/constrained.js +13 -37
- package/build/layouts/constrained.js.map +1 -1
- package/build/layouts/definitions.js.map +1 -1
- package/build/layouts/flex.js +16 -48
- package/build/layouts/flex.js.map +1 -1
- package/build/layouts/flow.js +7 -23
- package/build/layouts/flow.js.map +1 -1
- package/build/layouts/grid.js +18 -32
- package/build/layouts/grid.js.map +1 -1
- package/build/layouts/index.js +3 -9
- package/build/layouts/index.js.map +1 -1
- package/build/layouts/utils.js +3 -12
- package/build/layouts/utils.js.map +1 -1
- package/build/lock-unlock.js +1 -2
- package/build/lock-unlock.js.map +1 -1
- package/build/private-apis.js +2 -27
- package/build/private-apis.js.map +1 -1
- package/build/private-apis.native.js +2 -8
- package/build/private-apis.native.js.map +1 -1
- package/build/store/actions.js +187 -285
- package/build/store/actions.js.map +1 -1
- package/build/store/array.js +1 -3
- package/build/store/array.js.map +1 -1
- package/build/store/constants.js.map +1 -1
- package/build/store/defaults.js +2 -3
- package/build/store/defaults.js.map +1 -1
- package/build/store/defaults.native.js +3 -3
- package/build/store/defaults.native.js.map +1 -1
- package/build/store/index.js +11 -19
- package/build/store/index.js.map +1 -1
- package/build/store/private-actions.js +26 -91
- package/build/store/private-actions.js.map +1 -1
- package/build/store/private-selectors.js +8 -90
- package/build/store/private-selectors.js.map +1 -1
- package/build/store/reducer.js +161 -358
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +255 -453
- package/build/store/selectors.js.map +1 -1
- package/build/store/utils.js +0 -1
- package/build/store/utils.js.map +1 -1
- package/build/utils/block-variation-transforms.js +2 -5
- package/build/utils/block-variation-transforms.js.map +1 -1
- package/build/utils/dom.js +4 -12
- package/build/utils/dom.js.map +1 -1
- package/build/utils/index.js +0 -5
- package/build/utils/index.js.map +1 -1
- package/build/utils/math.js +5 -10
- package/build/utils/math.js.map +1 -1
- package/build/utils/object.js +14 -25
- package/build/utils/object.js.map +1 -1
- package/build/utils/order-inserter-block-items.js +2 -5
- package/build/utils/order-inserter-block-items.js.map +1 -1
- package/build/utils/parse-css-unit-to-px.js +14 -66
- package/build/utils/parse-css-unit-to-px.js.map +1 -1
- package/build/utils/pasting.js +9 -15
- package/build/utils/pasting.js.map +1 -1
- package/build/utils/pre-parse-patterns.js +1 -16
- package/build/utils/pre-parse-patterns.js.map +1 -1
- package/build/utils/selection.js +1 -4
- package/build/utils/selection.js.map +1 -1
- package/build/utils/sorting.js +3 -8
- package/build/utils/sorting.js.map +1 -1
- package/build/utils/transform-styles/ast/index.js +0 -3
- package/build/utils/transform-styles/ast/index.js.map +1 -1
- package/build/utils/transform-styles/ast/parse.js +95 -137
- package/build/utils/transform-styles/ast/parse.js.map +1 -1
- package/build/utils/transform-styles/ast/stringify/compiler.js +3 -9
- package/build/utils/transform-styles/ast/stringify/compiler.js.map +1 -1
- package/build/utils/transform-styles/ast/stringify/compress.js +25 -27
- package/build/utils/transform-styles/ast/stringify/compress.js.map +1 -1
- package/build/utils/transform-styles/ast/stringify/identity.js +28 -33
- package/build/utils/transform-styles/ast/stringify/identity.js.map +1 -1
- package/build/utils/transform-styles/ast/stringify/index.js +1 -4
- package/build/utils/transform-styles/ast/stringify/index.js.map +1 -1
- package/build/utils/transform-styles/index.js +0 -11
- package/build/utils/transform-styles/index.js.map +1 -1
- package/build/utils/transform-styles/transforms/url-rewrite.js +12 -25
- package/build/utils/transform-styles/transforms/url-rewrite.js.map +1 -1
- package/build/utils/transform-styles/transforms/wrap.js +7 -9
- package/build/utils/transform-styles/transforms/wrap.js.map +1 -1
- package/build/utils/transform-styles/traverse.js +1 -8
- package/build/utils/transform-styles/traverse.js.map +1 -1
- package/build/utils/use-should-contextual-toolbar-show.js +0 -9
- package/build/utils/use-should-contextual-toolbar-show.js.map +1 -1
- package/build-module/autocompleters/block.js +3 -13
- package/build-module/autocompleters/block.js.map +1 -1
- package/build-module/autocompleters/link.js +2 -8
- package/build-module/autocompleters/link.js.map +1 -1
- package/build-module/components/alignment-control/index.js +5 -7
- package/build-module/components/alignment-control/index.js.map +1 -1
- package/build-module/components/alignment-control/ui.js +2 -7
- package/build-module/components/alignment-control/ui.js.map +1 -1
- package/build-module/components/autocomplete/index.js +10 -15
- package/build-module/components/autocomplete/index.js.map +1 -1
- package/build-module/components/block-actions/index.js +3 -20
- package/build-module/components/block-actions/index.js.map +1 -1
- package/build-module/components/block-alignment-control/constants.js.map +1 -1
- package/build-module/components/block-alignment-control/index.js +5 -7
- package/build-module/components/block-alignment-control/index.js.map +1 -1
- package/build-module/components/block-alignment-control/ui.js +8 -12
- package/build-module/components/block-alignment-control/ui.js.map +1 -1
- package/build-module/components/block-alignment-control/ui.native.js +5 -9
- package/build-module/components/block-alignment-control/ui.native.js.map +1 -1
- package/build-module/components/block-alignment-control/use-available-alignments.js +10 -13
- package/build-module/components/block-alignment-control/use-available-alignments.js.map +1 -1
- package/build-module/components/block-alignment-matrix-control/index.js +0 -5
- package/build-module/components/block-alignment-matrix-control/index.js.map +1 -1
- package/build-module/components/block-breadcrumb/index.js +4 -9
- package/build-module/components/block-breadcrumb/index.js.map +1 -1
- package/build-module/components/block-caption/index.native.js +8 -9
- package/build-module/components/block-caption/index.native.js.map +1 -1
- package/build-module/components/block-card/index.js +6 -10
- package/build-module/components/block-card/index.js.map +1 -1
- package/build-module/components/block-compare/block-view.js +0 -1
- package/build-module/components/block-compare/block-view.js.map +1 -1
- package/build-module/components/block-compare/index.js +6 -10
- package/build-module/components/block-compare/index.js.map +1 -1
- package/build-module/components/block-content-overlay/index.js +1 -1
- package/build-module/components/block-content-overlay/index.js.map +1 -1
- package/build-module/components/block-context/index.js +4 -4
- package/build-module/components/block-context/index.js.map +1 -1
- package/build-module/components/block-controls/fill.js +3 -5
- package/build-module/components/block-controls/fill.js.map +1 -1
- package/build-module/components/block-controls/groups.js.map +1 -1
- package/build-module/components/block-controls/hook.js +1 -4
- package/build-module/components/block-controls/hook.js.map +1 -1
- package/build-module/components/block-controls/index.js +2 -4
- package/build-module/components/block-controls/index.js.map +1 -1
- package/build-module/components/block-controls/slot.js +3 -8
- package/build-module/components/block-controls/slot.js.map +1 -1
- package/build-module/components/block-controls/slot.native.js +5 -8
- package/build-module/components/block-controls/slot.native.js.map +1 -1
- package/build-module/components/block-controls/use-has-block-controls.js +34 -0
- package/build-module/components/block-controls/use-has-block-controls.js.map +1 -0
- package/build-module/components/block-draggable/draggable-chip.js +2 -5
- package/build-module/components/block-draggable/draggable-chip.js.map +1 -1
- package/build-module/components/block-draggable/draggable-chip.native.js +3 -4
- package/build-module/components/block-draggable/draggable-chip.native.js.map +1 -1
- package/build-module/components/block-draggable/dropping-insertion-point.native.js +5 -15
- package/build-module/components/block-draggable/dropping-insertion-point.native.js.map +1 -1
- package/build-module/components/block-draggable/index.js +3 -9
- package/build-module/components/block-draggable/index.js.map +1 -1
- package/build-module/components/block-draggable/index.native.js +8 -34
- package/build-module/components/block-draggable/index.native.js.map +1 -1
- package/build-module/components/block-draggable/use-scroll-when-dragging.js +8 -10
- package/build-module/components/block-draggable/use-scroll-when-dragging.js.map +1 -1
- package/build-module/components/block-draggable/use-scroll-when-dragging.native.js +2 -11
- package/build-module/components/block-draggable/use-scroll-when-dragging.native.js.map +1 -1
- package/build-module/components/block-edit/context.js +1 -1
- package/build-module/components/block-edit/context.js.map +1 -1
- package/build-module/components/block-edit/edit.js +16 -20
- package/build-module/components/block-edit/edit.js.map +1 -1
- package/build-module/components/block-edit/edit.native.js +6 -7
- package/build-module/components/block-edit/edit.native.js.map +1 -1
- package/build-module/components/block-edit/index.js +5 -5
- package/build-module/components/block-edit/index.js.map +1 -1
- package/build-module/components/block-edit-visually-button/index.js +1 -4
- package/build-module/components/block-edit-visually-button/index.js.map +1 -1
- package/build-module/components/block-editing-mode/index.js +4 -7
- package/build-module/components/block-editing-mode/index.js.map +1 -1
- package/build-module/components/block-full-height-alignment-control/index.js +0 -3
- package/build-module/components/block-full-height-alignment-control/index.js.map +1 -1
- package/build-module/components/block-heading-level-dropdown/heading-level-icon.js +2 -3
- package/build-module/components/block-heading-level-dropdown/heading-level-icon.js.map +1 -1
- package/build-module/components/block-heading-level-dropdown/index.js +4 -6
- package/build-module/components/block-heading-level-dropdown/index.js.map +1 -1
- package/build-module/components/block-heading-level-dropdown/index.native.js +2 -4
- package/build-module/components/block-heading-level-dropdown/index.native.js.map +1 -1
- package/build-module/components/block-icon/index.js +2 -6
- package/build-module/components/block-icon/index.js.map +1 -1
- package/build-module/components/block-icon/index.native.js +2 -4
- package/build-module/components/block-icon/index.native.js.map +1 -1
- package/build-module/components/block-info-slot-fill/index.js +5 -9
- package/build-module/components/block-info-slot-fill/index.js.map +1 -1
- package/build-module/components/block-inspector/index.js +11 -25
- package/build-module/components/block-inspector/index.js.map +1 -1
- package/build-module/components/block-inspector/useBlockInspectorAnimationSettings.js +7 -8
- package/build-module/components/block-inspector/useBlockInspectorAnimationSettings.js.map +1 -1
- package/build-module/components/block-list/block-crash-boundary.js +0 -6
- package/build-module/components/block-list/block-crash-boundary.js.map +1 -1
- package/build-module/components/block-list/block-crash-warning.js +1 -2
- package/build-module/components/block-list/block-crash-warning.js.map +1 -1
- package/build-module/components/block-list/block-html.js +8 -12
- package/build-module/components/block-list/block-html.js.map +1 -1
- package/build-module/components/block-list/block-invalid-warning.js +3 -9
- package/build-module/components/block-list/block-invalid-warning.js.map +1 -1
- package/build-module/components/block-list/block-invalid-warning.native.js +5 -10
- package/build-module/components/block-list/block-invalid-warning.native.js.map +1 -1
- package/build-module/components/block-list/block-list-block-context.js.map +1 -1
- package/build-module/components/block-list/block-list-context.native.js +11 -21
- package/build-module/components/block-list/block-list-context.native.js.map +1 -1
- package/build-module/components/block-list/block-list-item-cell.native.js +2 -6
- package/build-module/components/block-list/block-list-item-cell.native.js.map +1 -1
- package/build-module/components/block-list/block-list-item.native.js +8 -12
- package/build-module/components/block-list/block-list-item.native.js.map +1 -1
- package/build-module/components/block-list/block-outline.native.js +4 -7
- package/build-module/components/block-list/block-outline.native.js.map +1 -1
- package/build-module/components/block-list/block-selection-button.native.js +3 -10
- package/build-module/components/block-list/block-selection-button.native.js.map +1 -1
- package/build-module/components/block-list/block.js +41 -64
- package/build-module/components/block-list/block.js.map +1 -1
- package/build-module/components/block-list/block.native.js +41 -57
- package/build-module/components/block-list/block.native.js.map +1 -1
- package/build-module/components/block-list/grid-item.native.js +1 -4
- package/build-module/components/block-list/grid-item.native.js.map +1 -1
- package/build-module/components/block-list/index.js +10 -15
- package/build-module/components/block-list/index.js.map +1 -1
- package/build-module/components/block-list/index.native.js +21 -39
- package/build-module/components/block-list/index.native.js.map +1 -1
- package/build-module/components/block-list/insertion-point.native.js +2 -5
- package/build-module/components/block-list/insertion-point.native.js.map +1 -1
- package/build-module/components/block-list/layout.js +3 -8
- package/build-module/components/block-list/layout.js.map +1 -1
- package/build-module/components/block-list/subdirectory-icon.js +2 -4
- package/build-module/components/block-list/subdirectory-icon.js.map +1 -1
- package/build-module/components/block-list/use-block-props/index.js +13 -11
- package/build-module/components/block-list/use-block-props/index.js.map +1 -1
- package/build-module/components/block-list/use-block-props/index.native.js +4 -2
- package/build-module/components/block-list/use-block-props/index.native.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-block-class-names.js +5 -5
- package/build-module/components/block-list/use-block-props/use-block-class-names.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-block-custom-class-name.js +2 -6
- package/build-module/components/block-list/use-block-props/use-block-custom-class-name.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-block-default-class-name.js +2 -4
- package/build-module/components/block-list/use-block-props/use-block-default-class-name.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-block-moving-mode-class-names.js +6 -8
- package/build-module/components/block-list/use-block-props/use-block-moving-mode-class-names.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-block-refs.js +11 -16
- 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-focus-first-element.js +15 -21
- package/build-module/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-focus-handler.js +8 -11
- package/build-module/components/block-list/use-block-props/use-focus-handler.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-intersection-observer.js +1 -1
- package/build-module/components/block-list/use-block-props/use-intersection-observer.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-is-hovered.js +4 -6
- 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-nav-mode-exit.js +4 -4
- package/build-module/components/block-list/use-block-props/use-nav-mode-exit.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.js +4 -11
- package/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +1 -1
- package/build-module/components/block-list/use-in-between-inserter.js +15 -30
- package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
- package/build-module/components/block-list-appender/index.js +13 -26
- package/build-module/components/block-list-appender/index.js.map +1 -1
- package/build-module/components/block-list-appender/index.native.js +1 -9
- package/build-module/components/block-list-appender/index.native.js.map +1 -1
- package/build-module/components/block-lock/index.js.map +1 -1
- package/build-module/components/block-lock/menu-item.js +1 -4
- package/build-module/components/block-lock/menu-item.js.map +1 -1
- package/build-module/components/block-lock/modal.js +12 -13
- package/build-module/components/block-lock/modal.js.map +1 -1
- package/build-module/components/block-lock/toolbar.js +6 -9
- package/build-module/components/block-lock/toolbar.js.map +1 -1
- package/build-module/components/block-lock/use-block-lock.js +2 -2
- package/build-module/components/block-lock/use-block-lock.js.map +1 -1
- package/build-module/components/block-media-update-progress/index.native.js +10 -59
- package/build-module/components/block-media-update-progress/index.native.js.map +1 -1
- package/build-module/components/block-mover/button.js +2 -15
- package/build-module/components/block-mover/button.js.map +1 -1
- package/build-module/components/block-mover/index.js +5 -11
- package/build-module/components/block-mover/index.js.map +1 -1
- package/build-module/components/block-mover/index.native.js +4 -11
- package/build-module/components/block-mover/index.native.js.map +1 -1
- package/build-module/components/block-mover/mover-description.js +40 -61
- package/build-module/components/block-mover/mover-description.js.map +1 -1
- package/build-module/components/block-mover/mover-description.native.js +0 -16
- package/build-module/components/block-mover/mover-description.native.js.map +1 -1
- package/build-module/components/block-navigation/dropdown.js +7 -10
- package/build-module/components/block-navigation/dropdown.js.map +1 -1
- package/build-module/components/block-parent-selector/index.js +7 -13
- package/build-module/components/block-parent-selector/index.js.map +1 -1
- package/build-module/components/block-pattern-setup/constants.js.map +1 -1
- package/build-module/components/block-pattern-setup/index.js +3 -13
- package/build-module/components/block-pattern-setup/index.js.map +1 -1
- package/build-module/components/block-pattern-setup/setup-toolbar.js +1 -6
- package/build-module/components/block-pattern-setup/setup-toolbar.js.map +1 -1
- package/build-module/components/block-pattern-setup/use-patterns-setup.js +1 -5
- package/build-module/components/block-pattern-setup/use-patterns-setup.js.map +1 -1
- package/build-module/components/block-patterns-list/index.js +3 -12
- package/build-module/components/block-patterns-list/index.js.map +1 -1
- package/build-module/components/block-popover/drop-zone.js +1 -6
- package/build-module/components/block-popover/drop-zone.js.map +1 -1
- package/build-module/components/block-popover/inbetween.js +17 -25
- package/build-module/components/block-popover/inbetween.js.map +1 -1
- package/build-module/components/block-popover/index.js +16 -20
- package/build-module/components/block-popover/index.js.map +1 -1
- package/build-module/components/block-popover/use-popover-scroll.js +3 -6
- package/build-module/components/block-popover/use-popover-scroll.js.map +1 -1
- package/build-module/components/block-preview/auto.js +11 -11
- package/build-module/components/block-preview/auto.js.map +1 -1
- package/build-module/components/block-preview/index.js +10 -13
- package/build-module/components/block-preview/index.js.map +1 -1
- package/build-module/components/block-quick-navigation/index.js +2 -7
- package/build-module/components/block-quick-navigation/index.js.map +1 -1
- package/build-module/components/block-removal-warning-modal/index.js +5 -10
- package/build-module/components/block-removal-warning-modal/index.js.map +1 -1
- package/build-module/components/block-selection-clearer/index.js +4 -8
- package/build-module/components/block-selection-clearer/index.js.map +1 -1
- package/build-module/components/block-settings/button.native.js +2 -5
- package/build-module/components/block-settings/button.native.js.map +1 -1
- package/build-module/components/block-settings/container.native.js +3 -3
- package/build-module/components/block-settings/container.native.js.map +1 -1
- package/build-module/components/block-settings/index.native.js.map +1 -1
- package/build-module/components/block-settings-menu/block-convert-button.js +0 -3
- package/build-module/components/block-settings-menu/block-convert-button.js.map +1 -1
- package/build-module/components/block-settings-menu/block-html-convert-button.js +1 -1
- package/build-module/components/block-settings-menu/block-html-convert-button.js.map +1 -1
- package/build-module/components/block-settings-menu/block-mode-toggle.js +1 -6
- package/build-module/components/block-settings-menu/block-mode-toggle.js.map +1 -1
- package/build-module/components/block-settings-menu/block-settings-dropdown.js +14 -23
- package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build-module/components/block-settings-menu/block-settings-menu-first-item.js.map +1 -1
- package/build-module/components/block-settings-menu/index.js +1 -2
- package/build-module/components/block-settings-menu/index.js.map +1 -1
- package/build-module/components/block-settings-menu-controls/index.js +13 -13
- package/build-module/components/block-settings-menu-controls/index.js.map +1 -1
- package/build-module/components/block-styles/index.js +4 -15
- package/build-module/components/block-styles/index.js.map +1 -1
- package/build-module/components/block-styles/index.native.js +2 -10
- package/build-module/components/block-styles/index.native.js.map +1 -1
- package/build-module/components/block-styles/menu-items.js +1 -6
- package/build-module/components/block-styles/menu-items.js.map +1 -1
- package/build-module/components/block-styles/preview-panel.js +5 -4
- package/build-module/components/block-styles/preview-panel.js.map +1 -1
- package/build-module/components/block-styles/preview.native.js +4 -12
- package/build-module/components/block-styles/preview.native.js.map +1 -1
- package/build-module/components/block-styles/use-styles-for-block.js +3 -11
- package/build-module/components/block-styles/use-styles-for-block.js.map +1 -1
- package/build-module/components/block-styles/utils.js +4 -10
- package/build-module/components/block-styles/utils.js.map +1 -1
- package/build-module/components/block-switcher/block-styles-menu.js +1 -2
- package/build-module/components/block-switcher/block-styles-menu.js.map +1 -1
- package/build-module/components/block-switcher/block-transformations-menu.js +6 -12
- package/build-module/components/block-switcher/block-transformations-menu.js.map +1 -1
- package/build-module/components/block-switcher/block-transformations-menu.native.js +5 -13
- package/build-module/components/block-switcher/block-transformations-menu.native.js.map +1 -1
- package/build-module/components/block-switcher/block-variation-transformations.js +3 -8
- package/build-module/components/block-switcher/block-variation-transformations.js.map +1 -1
- package/build-module/components/block-switcher/index.js +12 -26
- package/build-module/components/block-switcher/index.js.map +1 -1
- package/build-module/components/block-switcher/pattern-transformations-menu.js +3 -8
- package/build-module/components/block-switcher/pattern-transformations-menu.js.map +1 -1
- package/build-module/components/block-switcher/preview-block-popover.js +1 -2
- package/build-module/components/block-switcher/preview-block-popover.js.map +1 -1
- package/build-module/components/block-switcher/use-transformed-patterns.js +14 -21
- package/build-module/components/block-switcher/use-transformed-patterns.js.map +1 -1
- package/build-module/components/block-switcher/utils.js +6 -6
- package/build-module/components/block-switcher/utils.js.map +1 -1
- package/build-module/components/block-title/index.js +2 -1
- package/build-module/components/block-title/index.js.map +1 -1
- package/build-module/components/block-title/use-block-display-title.js +4 -11
- package/build-module/components/block-title/use-block-display-title.js.map +1 -1
- package/build-module/components/block-toolbar/block-name-context.js +0 -2
- package/build-module/components/block-toolbar/block-name-context.js.map +1 -1
- package/build-module/components/block-toolbar/block-toolbar-last-item.js.map +1 -1
- package/build-module/components/block-toolbar/block-toolbar-menu.native.js +26 -31
- package/build-module/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
- package/build-module/components/block-toolbar/index.js +7 -13
- package/build-module/components/block-toolbar/index.js.map +1 -1
- package/build-module/components/block-toolbar/index.native.js +1 -6
- package/build-module/components/block-toolbar/index.native.js.map +1 -1
- package/build-module/components/block-toolbar/utils.js +4 -22
- package/build-module/components/block-toolbar/utils.js.map +1 -1
- package/build-module/components/block-tools/back-compat.js +3 -4
- package/build-module/components/block-tools/back-compat.js.map +1 -1
- package/build-module/components/block-tools/block-contextual-toolbar.js +52 -16
- package/build-module/components/block-tools/block-contextual-toolbar.js.map +1 -1
- package/build-module/components/block-tools/block-selection-button.js +11 -30
- package/build-module/components/block-tools/block-selection-button.js.map +1 -1
- package/build-module/components/block-tools/index.js +9 -20
- package/build-module/components/block-tools/index.js.map +1 -1
- package/build-module/components/block-tools/insertion-point.js +9 -22
- package/build-module/components/block-tools/insertion-point.js.map +1 -1
- package/build-module/components/block-tools/selected-block-popover.js +13 -25
- package/build-module/components/block-tools/selected-block-popover.js.map +1 -1
- package/build-module/components/block-tools/use-block-toolbar-popover-props.js +35 -29
- package/build-module/components/block-tools/use-block-toolbar-popover-props.js.map +1 -1
- package/build-module/components/block-tools/zoom-out-mode-inserters.js +3 -8
- package/build-module/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
- package/build-module/components/block-types-list/index.js +1 -7
- package/build-module/components/block-types-list/index.js.map +1 -1
- package/build-module/components/block-types-list/index.native.js +4 -14
- package/build-module/components/block-types-list/index.native.js.map +1 -1
- package/build-module/components/block-variation-picker/index.js +1 -4
- package/build-module/components/block-variation-picker/index.js.map +1 -1
- package/build-module/components/block-variation-picker/index.native.js +2 -7
- package/build-module/components/block-variation-picker/index.native.js.map +1 -1
- package/build-module/components/block-variation-transforms/index.js +8 -15
- package/build-module/components/block-variation-transforms/index.js.map +1 -1
- package/build-module/components/block-vertical-alignment-control/icons.js +0 -1
- package/build-module/components/block-vertical-alignment-control/icons.js.map +1 -1
- package/build-module/components/block-vertical-alignment-control/index.js +5 -7
- package/build-module/components/block-vertical-alignment-control/index.js.map +1 -1
- package/build-module/components/block-vertical-alignment-control/ui.js +4 -7
- package/build-module/components/block-vertical-alignment-control/ui.js.map +1 -1
- package/build-module/components/border-radius-control/all-input-control.js +8 -10
- package/build-module/components/border-radius-control/all-input-control.js.map +1 -1
- package/build-module/components/border-radius-control/index.js +5 -8
- package/build-module/components/border-radius-control/index.js.map +1 -1
- package/build-module/components/border-radius-control/input-controls.js +13 -11
- package/build-module/components/border-radius-control/input-controls.js.map +1 -1
- package/build-module/components/border-radius-control/linked-button.js +4 -3
- package/build-module/components/border-radius-control/linked-button.js.map +1 -1
- package/build-module/components/border-radius-control/utils.js +10 -12
- package/build-module/components/border-radius-control/utils.js.map +1 -1
- package/build-module/components/button-block-appender/index.js +6 -12
- package/build-module/components/button-block-appender/index.js.map +1 -1
- package/build-module/components/button-block-appender/index.native.js +5 -7
- package/build-module/components/button-block-appender/index.native.js.map +1 -1
- package/build-module/components/caption/index.native.js +1 -4
- package/build-module/components/caption/index.native.js.map +1 -1
- package/build-module/components/child-layout-control/index.js +7 -10
- package/build-module/components/child-layout-control/index.js.map +1 -1
- package/build-module/components/color-palette/control.js +2 -2
- package/build-module/components/color-palette/control.js.map +1 -1
- package/build-module/components/color-palette/index.js +1 -1
- package/build-module/components/color-palette/index.js.map +1 -1
- package/build-module/components/color-palette/with-color-context.js +3 -3
- package/build-module/components/color-palette/with-color-context.js.map +1 -1
- package/build-module/components/color-style-selector/index.js +2 -9
- package/build-module/components/color-style-selector/index.js.map +1 -1
- package/build-module/components/colors/index.js.map +1 -1
- package/build-module/components/colors/utils.js +5 -10
- package/build-module/components/colors/utils.js.map +1 -1
- package/build-module/components/colors/with-colors.js +17 -25
- package/build-module/components/colors/with-colors.js.map +1 -1
- package/build-module/components/colors-gradients/control.js +8 -15
- package/build-module/components/colors-gradients/control.js.map +1 -1
- package/build-module/components/colors-gradients/dropdown.js +18 -19
- package/build-module/components/colors-gradients/dropdown.js.map +1 -1
- package/build-module/components/colors-gradients/panel-color-gradient-settings.js +8 -12
- package/build-module/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
- package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js +2 -3
- package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
- package/build-module/components/colors-gradients/use-multiple-origin-colors-and-gradients.js +2 -10
- package/build-module/components/colors-gradients/use-multiple-origin-colors-and-gradients.js.map +1 -1
- package/build-module/components/contrast-checker/index.js +20 -24
- package/build-module/components/contrast-checker/index.js.map +1 -1
- package/build-module/components/contrast-checker/index.native.js +4 -12
- package/build-module/components/contrast-checker/index.native.js.map +1 -1
- package/build-module/components/convert-to-group-buttons/index.js +1 -12
- package/build-module/components/convert-to-group-buttons/index.js.map +1 -1
- package/build-module/components/convert-to-group-buttons/index.native.js +5 -12
- package/build-module/components/convert-to-group-buttons/index.native.js.map +1 -1
- package/build-module/components/convert-to-group-buttons/toolbar.js +3 -12
- package/build-module/components/convert-to-group-buttons/toolbar.js.map +1 -1
- package/build-module/components/convert-to-group-buttons/use-convert-to-group-button-props.js +6 -5
- package/build-module/components/convert-to-group-buttons/use-convert-to-group-button-props.js.map +1 -1
- package/build-module/components/copy-handler/index.js +24 -44
- package/build-module/components/copy-handler/index.js.map +1 -1
- package/build-module/components/date-format-picker/index.js +4 -6
- package/build-module/components/date-format-picker/index.js.map +1 -1
- package/build-module/components/default-block-appender/index.js +7 -9
- package/build-module/components/default-block-appender/index.js.map +1 -1
- package/build-module/components/default-block-appender/index.native.js +16 -10
- package/build-module/components/default-block-appender/index.native.js.map +1 -1
- package/build-module/components/default-style-picker/index.js +4 -6
- package/build-module/components/default-style-picker/index.js.map +1 -1
- package/build-module/components/dimensions-tool/aspect-ratio-tool.js +2 -2
- package/build-module/components/dimensions-tool/aspect-ratio-tool.js.map +1 -1
- package/build-module/components/dimensions-tool/index.js +39 -33
- package/build-module/components/dimensions-tool/index.js.map +1 -1
- package/build-module/components/dimensions-tool/scale-tool.js +2 -3
- package/build-module/components/dimensions-tool/scale-tool.js.map +1 -1
- package/build-module/components/dimensions-tool/width-height-tool.js +5 -12
- package/build-module/components/dimensions-tool/width-height-tool.js.map +1 -1
- package/build-module/components/duotone/components.js +7 -7
- package/build-module/components/duotone/components.js.map +1 -1
- package/build-module/components/duotone/index.js.map +1 -1
- package/build-module/components/duotone/utils.js +1 -1
- package/build-module/components/duotone/utils.js.map +1 -1
- package/build-module/components/duotone-control/index.js +0 -6
- package/build-module/components/duotone-control/index.js.map +1 -1
- package/build-module/components/editable-text/index.js +4 -6
- package/build-module/components/editable-text/index.js.map +1 -1
- package/build-module/components/editor-styles/index.js +4 -10
- package/build-module/components/editor-styles/index.js.map +1 -1
- package/build-module/components/floating-toolbar/index.native.js +4 -8
- package/build-module/components/floating-toolbar/index.native.js.map +1 -1
- package/build-module/components/floating-toolbar/nav-up-icon.js +0 -3
- package/build-module/components/floating-toolbar/nav-up-icon.js.map +1 -1
- package/build-module/components/font-appearance-control/index.js +24 -27
- package/build-module/components/font-appearance-control/index.js.map +1 -1
- package/build-module/components/font-family/index.js +1 -5
- package/build-module/components/font-family/index.js.map +1 -1
- package/build-module/components/font-sizes/fluid-utils.js +41 -37
- package/build-module/components/font-sizes/fluid-utils.js.map +1 -1
- package/build-module/components/font-sizes/font-size-picker.js +4 -6
- package/build-module/components/font-sizes/font-size-picker.js.map +1 -1
- package/build-module/components/font-sizes/index.js.map +1 -1
- package/build-module/components/font-sizes/index.native.js.map +1 -1
- package/build-module/components/font-sizes/utils.js +3 -8
- package/build-module/components/font-sizes/utils.js.map +1 -1
- package/build-module/components/font-sizes/with-font-sizes.js +15 -22
- package/build-module/components/font-sizes/with-font-sizes.js.map +1 -1
- package/build-module/components/global-styles/advanced-panel.js +3 -9
- package/build-module/components/global-styles/advanced-panel.js.map +1 -1
- package/build-module/components/global-styles/behaviors-panel.js +2 -2
- package/build-module/components/global-styles/behaviors-panel.js.map +1 -1
- package/build-module/components/global-styles/border-panel.js +22 -36
- package/build-module/components/global-styles/border-panel.js.map +1 -1
- package/build-module/components/global-styles/color-panel.js +31 -56
- package/build-module/components/global-styles/color-panel.js.map +1 -1
- package/build-module/components/global-styles/color-panel.native.js +5 -8
- package/build-module/components/global-styles/color-panel.native.js.map +1 -1
- package/build-module/components/global-styles/context.js.map +1 -1
- package/build-module/components/global-styles/dimensions-panel.js +34 -80
- package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
- package/build-module/components/global-styles/effects-panel.js +8 -20
- package/build-module/components/global-styles/effects-panel.js.map +1 -1
- package/build-module/components/global-styles/filters-panel.js +10 -20
- package/build-module/components/global-styles/filters-panel.js.map +1 -1
- package/build-module/components/global-styles/get-block-css-selector.js +34 -29
- package/build-module/components/global-styles/get-block-css-selector.js.map +1 -1
- package/build-module/components/global-styles/hooks.js +42 -72
- package/build-module/components/global-styles/hooks.js.map +1 -1
- package/build-module/components/global-styles/index.js.map +1 -1
- package/build-module/components/global-styles/typography-panel.js +25 -73
- package/build-module/components/global-styles/typography-panel.js.map +1 -1
- package/build-module/components/global-styles/typography-utils.js +8 -14
- package/build-module/components/global-styles/typography-utils.js.map +1 -1
- package/build-module/components/global-styles/use-global-styles-output.js +99 -163
- package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build-module/components/global-styles/utils.js +13 -43
- package/build-module/components/global-styles/utils.js.map +1 -1
- package/build-module/components/gradients/index.js.map +1 -1
- package/build-module/components/gradients/index.native.js.map +1 -1
- package/build-module/components/gradients/use-gradient.js +3 -11
- package/build-module/components/gradients/use-gradient.js.map +1 -1
- package/build-module/components/gradients/with-gradient.js +2 -3
- package/build-module/components/gradients/with-gradient.js.map +1 -1
- package/build-module/components/height-control/index.js +2 -8
- package/build-module/components/height-control/index.js.map +1 -1
- package/build-module/components/iframe/index.js +26 -37
- package/build-module/components/iframe/index.js.map +1 -1
- package/build-module/components/iframe/use-compatibility-styles.js +9 -19
- package/build-module/components/iframe/use-compatibility-styles.js.map +1 -1
- package/build-module/components/image-editor/aspect-ratio-dropdown.js +3 -5
- package/build-module/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
- package/build-module/components/image-editor/constants.js.map +1 -1
- package/build-module/components/image-editor/context.js +3 -3
- package/build-module/components/image-editor/context.js.map +1 -1
- package/build-module/components/image-editor/cropper.js +4 -6
- package/build-module/components/image-editor/cropper.js.map +1 -1
- package/build-module/components/image-editor/form-controls.js +1 -2
- package/build-module/components/image-editor/form-controls.js.map +1 -1
- package/build-module/components/image-editor/index.js +1 -2
- package/build-module/components/image-editor/index.js.map +1 -1
- package/build-module/components/image-editor/rotation-button.js +2 -2
- package/build-module/components/image-editor/rotation-button.js.map +1 -1
- package/build-module/components/image-editor/use-save-image.js +4 -7
- package/build-module/components/image-editor/use-save-image.js.map +1 -1
- package/build-module/components/image-editor/use-transform-image.js +0 -9
- package/build-module/components/image-editor/use-transform-image.js.map +1 -1
- package/build-module/components/image-editor/zoom-dropdown.js +1 -2
- package/build-module/components/image-editor/zoom-dropdown.js.map +1 -1
- package/build-module/components/image-size-control/index.js +1 -4
- package/build-module/components/image-size-control/index.js.map +1 -1
- package/build-module/components/image-size-control/use-dimension-handler.js +6 -12
- package/build-module/components/image-size-control/use-dimension-handler.js.map +1 -1
- package/build-module/components/index.js +11 -1
- package/build-module/components/index.js.map +1 -1
- package/build-module/components/index.native.js +4 -3
- package/build-module/components/index.native.js.map +1 -1
- package/build-module/components/inner-blocks/button-block-appender.js +1 -2
- package/build-module/components/inner-blocks/button-block-appender.js.map +1 -1
- package/build-module/components/inner-blocks/default-block-appender.js +1 -2
- package/build-module/components/inner-blocks/default-block-appender.js.map +1 -1
- package/build-module/components/inner-blocks/index.js +23 -21
- package/build-module/components/inner-blocks/index.js.map +1 -1
- package/build-module/components/inner-blocks/index.native.js +21 -20
- package/build-module/components/inner-blocks/index.native.js.map +1 -1
- package/build-module/components/inner-blocks/use-block-context.js +2 -7
- package/build-module/components/inner-blocks/use-block-context.js.map +1 -1
- package/build-module/components/inner-blocks/use-inner-block-template-sync.js +13 -14
- package/build-module/components/inner-blocks/use-inner-block-template-sync.js.map +1 -1
- package/build-module/components/inner-blocks/use-nested-settings-update.js +19 -21
- package/build-module/components/inner-blocks/use-nested-settings-update.js.map +1 -1
- package/build-module/components/inner-blocks/with-client-id.js +3 -3
- package/build-module/components/inner-blocks/with-client-id.js.map +1 -1
- package/build-module/components/inserter/block-patterns-explorer/explorer.js +3 -6
- package/build-module/components/inserter/block-patterns-explorer/explorer.js.map +1 -1
- package/build-module/components/inserter/block-patterns-explorer/patterns-list.js +5 -13
- package/build-module/components/inserter/block-patterns-explorer/patterns-list.js.map +1 -1
- package/build-module/components/inserter/block-patterns-explorer/sidebar.js +0 -5
- package/build-module/components/inserter/block-patterns-explorer/sidebar.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab.js +12 -22
- package/build-module/components/inserter/block-patterns-tab.js.map +1 -1
- package/build-module/components/inserter/block-types-tab.js +9 -16
- package/build-module/components/inserter/block-types-tab.js.map +1 -1
- package/build-module/components/inserter/block-types-tab.native.js +1 -8
- package/build-module/components/inserter/block-types-tab.native.js.map +1 -1
- package/build-module/components/inserter/hooks/use-block-type-impressions.native.js +9 -10
- package/build-module/components/inserter/hooks/use-block-type-impressions.native.js.map +1 -1
- package/build-module/components/inserter/hooks/use-block-types-state.js +2 -3
- package/build-module/components/inserter/hooks/use-block-types-state.js.map +1 -1
- package/build-module/components/inserter/hooks/use-clipboard-block.native.js +1 -3
- package/build-module/components/inserter/hooks/use-clipboard-block.native.js.map +1 -1
- package/build-module/components/inserter/hooks/use-debounced-input.js.map +1 -1
- package/build-module/components/inserter/hooks/use-insertion-point.js +4 -10
- package/build-module/components/inserter/hooks/use-insertion-point.js.map +1 -1
- package/build-module/components/inserter/hooks/use-patterns-state.js +4 -6
- package/build-module/components/inserter/hooks/use-patterns-state.js.map +1 -1
- package/build-module/components/inserter/index.js +30 -56
- package/build-module/components/inserter/index.js.map +1 -1
- package/build-module/components/inserter/index.native.js +24 -56
- package/build-module/components/inserter/index.native.js.map +1 -1
- package/build-module/components/inserter/library.js +1 -7
- package/build-module/components/inserter/library.js.map +1 -1
- package/build-module/components/inserter/media-tab/hooks.js +14 -25
- package/build-module/components/inserter/media-tab/hooks.js.map +1 -1
- package/build-module/components/inserter/media-tab/index.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-list.js +3 -5
- package/build-module/components/inserter/media-tab/media-list.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-panel.js +1 -4
- package/build-module/components/inserter/media-tab/media-panel.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-preview.js +11 -24
- package/build-module/components/inserter/media-tab/media-preview.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-tab.js +4 -7
- package/build-module/components/inserter/media-tab/media-tab.js.map +1 -1
- package/build-module/components/inserter/media-tab/utils.js +1 -4
- package/build-module/components/inserter/media-tab/utils.js.map +1 -1
- package/build-module/components/inserter/menu.js +3 -5
- package/build-module/components/inserter/menu.js.map +1 -1
- package/build-module/components/inserter/menu.native.js +6 -15
- package/build-module/components/inserter/menu.native.js.map +1 -1
- package/build-module/components/inserter/mobile-tab-navigation.js +2 -4
- package/build-module/components/inserter/mobile-tab-navigation.js.map +1 -1
- package/build-module/components/inserter/no-results.js +0 -3
- package/build-module/components/inserter/no-results.js.map +1 -1
- package/build-module/components/inserter/no-results.native.js +2 -5
- package/build-module/components/inserter/no-results.native.js.map +1 -1
- package/build-module/components/inserter/panel.js +0 -3
- package/build-module/components/inserter/panel.js.map +1 -1
- package/build-module/components/inserter/preview-panel.js +15 -11
- package/build-module/components/inserter/preview-panel.js.map +1 -1
- package/build-module/components/inserter/quick-inserter.js +5 -8
- package/build-module/components/inserter/quick-inserter.js.map +1 -1
- package/build-module/components/inserter/reusable-block-rename-hint.js +1 -7
- package/build-module/components/inserter/reusable-block-rename-hint.js.map +1 -1
- package/build-module/components/inserter/reusable-blocks-tab.js +3 -8
- package/build-module/components/inserter/reusable-blocks-tab.js.map +1 -1
- package/build-module/components/inserter/reusable-blocks-tab.native.js +1 -4
- package/build-module/components/inserter/reusable-blocks-tab.native.js.map +1 -1
- package/build-module/components/inserter/search-items.js +22 -33
- package/build-module/components/inserter/search-items.js.map +1 -1
- package/build-module/components/inserter/search-results.js +6 -18
- package/build-module/components/inserter/search-results.js.map +1 -1
- package/build-module/components/inserter/search-results.native.js +1 -7
- package/build-module/components/inserter/search-results.native.js.map +1 -1
- package/build-module/components/inserter/tabs.js +0 -13
- package/build-module/components/inserter/tabs.js.map +1 -1
- package/build-module/components/inserter/tabs.native.js +6 -13
- package/build-module/components/inserter/tabs.native.js.map +1 -1
- package/build-module/components/inserter/tips.js +2 -4
- package/build-module/components/inserter/tips.js.map +1 -1
- package/build-module/components/inserter/utils.native.js +2 -6
- package/build-module/components/inserter/utils.native.js.map +1 -1
- package/build-module/components/inserter-draggable-blocks/index.js +0 -4
- package/build-module/components/inserter-draggable-blocks/index.js.map +1 -1
- package/build-module/components/inserter-list-item/index.js +2 -9
- package/build-module/components/inserter-list-item/index.js.map +1 -1
- package/build-module/components/inserter-listbox/context.js.map +1 -1
- package/build-module/components/inserter-listbox/group.js +0 -4
- package/build-module/components/inserter-listbox/group.js.map +1 -1
- package/build-module/components/inserter-listbox/index.js +1 -4
- package/build-module/components/inserter-listbox/index.js.map +1 -1
- package/build-module/components/inserter-listbox/item.js +9 -11
- package/build-module/components/inserter-listbox/item.js.map +1 -1
- package/build-module/components/inserter-listbox/row.js +1 -4
- package/build-module/components/inserter-listbox/row.js.map +1 -1
- package/build-module/components/inserter-menu-extension/index.js.map +1 -1
- package/build-module/components/inspector-controls/block-support-slot-container.js +2 -2
- package/build-module/components/inspector-controls/block-support-slot-container.js.map +1 -1
- package/build-module/components/inspector-controls/block-support-tools-panel.js +7 -5
- package/build-module/components/inspector-controls/block-support-tools-panel.js.map +1 -1
- package/build-module/components/inspector-controls/fill.js +4 -10
- package/build-module/components/inspector-controls/fill.js.map +1 -1
- package/build-module/components/inspector-controls/fill.native.js +4 -8
- package/build-module/components/inspector-controls/fill.native.js.map +1 -1
- package/build-module/components/inspector-controls/groups.js.map +1 -1
- package/build-module/components/inspector-controls/index.js +7 -7
- package/build-module/components/inspector-controls/index.js.map +1 -1
- package/build-module/components/inspector-controls/slot.js +5 -9
- package/build-module/components/inspector-controls/slot.js.map +1 -1
- package/build-module/components/inspector-controls/slot.native.js +3 -6
- package/build-module/components/inspector-controls/slot.native.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/advanced-controls-panel.js +1 -6
- package/build-module/components/inspector-controls-tabs/advanced-controls-panel.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/index.js +1 -4
- package/build-module/components/inspector-controls-tabs/index.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/position-controls-panel.js +3 -8
- package/build-module/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/settings-tab-hint.js +0 -4
- package/build-module/components/inspector-controls-tabs/settings-tab-hint.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/settings-tab.js +0 -3
- package/build-module/components/inspector-controls-tabs/settings-tab.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/styles-tab.js +1 -4
- package/build-module/components/inspector-controls-tabs/styles-tab.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/use-inspector-controls-tabs.js +14 -16
- package/build-module/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/use-is-list-view-tab-disabled.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/utils.js.map +1 -1
- package/build-module/components/inspector-popover-header/index.js +0 -1
- package/build-module/components/inspector-popover-header/index.js.map +1 -1
- package/build-module/components/justify-content-control/index.js +5 -7
- package/build-module/components/justify-content-control/index.js.map +1 -1
- package/build-module/components/justify-content-control/ui.js +0 -4
- package/build-module/components/justify-content-control/ui.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/index.js +9 -3
- package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
- package/build-module/components/letter-spacing-control/index.js +4 -4
- package/build-module/components/letter-spacing-control/index.js.map +1 -1
- package/build-module/components/line-height-control/index.js +22 -34
- package/build-module/components/line-height-control/index.js.map +1 -1
- package/build-module/components/line-height-control/index.native.js +4 -4
- package/build-module/components/line-height-control/index.native.js.map +1 -1
- package/build-module/components/line-height-control/utils.js +7 -3
- package/build-module/components/line-height-control/utils.js.map +1 -1
- package/build-module/components/link-control/constants.js +3 -2
- package/build-module/components/link-control/constants.js.map +1 -1
- package/build-module/components/link-control/index.js +44 -40
- package/build-module/components/link-control/index.js.map +1 -1
- package/build-module/components/link-control/is-url-like.js +5 -6
- package/build-module/components/link-control/is-url-like.js.map +1 -1
- package/build-module/components/link-control/link-preview.js +11 -10
- package/build-module/components/link-control/link-preview.js.map +1 -1
- package/build-module/components/link-control/search-create-button.js +3 -7
- package/build-module/components/link-control/search-create-button.js.map +1 -1
- package/build-module/components/link-control/search-input.js +18 -23
- package/build-module/components/link-control/search-input.js.map +1 -1
- package/build-module/components/link-control/search-item.js +6 -12
- package/build-module/components/link-control/search-item.js.map +1 -1
- package/build-module/components/link-control/search-results.js +14 -14
- package/build-module/components/link-control/search-results.js.map +1 -1
- package/build-module/components/link-control/settings-drawer.js +0 -3
- package/build-module/components/link-control/settings-drawer.js.map +1 -1
- package/build-module/components/link-control/settings.js +2 -7
- package/build-module/components/link-control/settings.js.map +1 -1
- package/build-module/components/link-control/use-create-page.js +4 -8
- package/build-module/components/link-control/use-create-page.js.map +1 -1
- package/build-module/components/link-control/use-internal-value.js +8 -10
- package/build-module/components/link-control/use-internal-value.js.map +1 -1
- package/build-module/components/link-control/use-rich-url-data.js +9 -12
- package/build-module/components/link-control/use-rich-url-data.js.map +1 -1
- package/build-module/components/link-control/use-search-handler.js +10 -14
- package/build-module/components/link-control/use-search-handler.js.map +1 -1
- package/build-module/components/link-control/viewer-slot.js.map +1 -1
- package/build-module/components/list-view/appender.js +4 -8
- package/build-module/components/list-view/appender.js.map +1 -1
- package/build-module/components/list-view/aria-referenced-text.js +1 -2
- package/build-module/components/list-view/aria-referenced-text.js.map +1 -1
- package/build-module/components/list-view/block-contents.js +5 -5
- package/build-module/components/list-view/block-contents.js.map +1 -1
- package/build-module/components/list-view/block-select-button.js +32 -19
- package/build-module/components/list-view/block-select-button.js.map +1 -1
- package/build-module/components/list-view/block.js +25 -29
- package/build-module/components/list-view/block.js.map +1 -1
- package/build-module/components/list-view/branch.js +9 -28
- package/build-module/components/list-view/branch.js.map +1 -1
- package/build-module/components/list-view/context.js.map +1 -1
- package/build-module/components/list-view/drop-indicator.js +34 -43
- package/build-module/components/list-view/drop-indicator.js.map +1 -1
- package/build-module/components/list-view/expander.js +2 -2
- package/build-module/components/list-view/expander.js.map +1 -1
- package/build-module/components/list-view/index.js +18 -22
- package/build-module/components/list-view/index.js.map +1 -1
- package/build-module/components/list-view/leaf.js +2 -3
- package/build-module/components/list-view/leaf.js.map +1 -1
- package/build-module/components/list-view/use-block-selection.js +15 -22
- package/build-module/components/list-view/use-block-selection.js.map +1 -1
- package/build-module/components/list-view/use-list-view-client-ids.js +2 -1
- package/build-module/components/list-view/use-list-view-client-ids.js.map +1 -1
- package/build-module/components/list-view/use-list-view-drop-zone.js +35 -54
- package/build-module/components/list-view/use-list-view-drop-zone.js.map +1 -1
- package/build-module/components/list-view/use-list-view-expand-selected-item.js +5 -4
- package/build-module/components/list-view/use-list-view-expand-selected-item.js.map +1 -1
- package/build-module/components/list-view/use-list-view-images.js +78 -0
- package/build-module/components/list-view/use-list-view-images.js.map +1 -0
- package/build-module/components/list-view/use-list-view-scroll-into-view.js +5 -5
- package/build-module/components/list-view/use-list-view-scroll-into-view.js.map +1 -1
- package/build-module/components/list-view/utils.js +3 -4
- package/build-module/components/list-view/utils.js.map +1 -1
- package/build-module/components/media-placeholder/index.js +12 -59
- package/build-module/components/media-placeholder/index.js.map +1 -1
- package/build-module/components/media-placeholder/index.native.js +9 -24
- package/build-module/components/media-placeholder/index.native.js.map +1 -1
- package/build-module/components/media-replace-flow/index.js +9 -25
- package/build-module/components/media-replace-flow/index.js.map +1 -1
- package/build-module/components/media-replace-flow/index.native.js +3 -4
- package/build-module/components/media-replace-flow/index.native.js.map +1 -1
- package/build-module/components/media-upload/check.js +2 -2
- package/build-module/components/media-upload/check.js.map +1 -1
- package/build-module/components/media-upload/index.js +2 -3
- package/build-module/components/media-upload/index.js.map +1 -1
- package/build-module/components/media-upload/index.native.js +18 -29
- package/build-module/components/media-upload/index.native.js.map +1 -1
- package/build-module/components/media-upload-progress/index.native.js +4 -27
- package/build-module/components/media-upload-progress/index.native.js.map +1 -1
- package/build-module/components/multi-selection-inspector/index.js +3 -8
- package/build-module/components/multi-selection-inspector/index.js.map +1 -1
- package/build-module/components/navigable-toolbar/index.js +9 -26
- package/build-module/components/navigable-toolbar/index.js.map +1 -1
- package/build-module/components/observe-typing/index.js +26 -38
- package/build-module/components/observe-typing/index.js.map +1 -1
- package/build-module/components/panel-color-settings/index.js +2 -5
- package/build-module/components/panel-color-settings/index.js.map +1 -1
- package/build-module/components/plain-text/index.js +3 -5
- package/build-module/components/plain-text/index.js.map +1 -1
- package/build-module/components/plain-text/index.native.js +8 -22
- package/build-module/components/plain-text/index.native.js.map +1 -1
- package/build-module/components/preview-options/index.js +1 -2
- package/build-module/components/preview-options/index.js.map +1 -1
- package/build-module/components/provider/block-refs-provider.js +0 -1
- package/build-module/components/provider/block-refs-provider.js.map +1 -1
- package/build-module/components/provider/index.js +8 -5
- package/build-module/components/provider/index.js.map +1 -1
- package/build-module/components/provider/index.native.js +4 -3
- package/build-module/components/provider/index.native.js.map +1 -1
- package/build-module/components/provider/use-block-sync.js +23 -38
- package/build-module/components/provider/use-block-sync.js.map +1 -1
- package/build-module/components/provider/with-registry-provider.js +1 -5
- package/build-module/components/provider/with-registry-provider.js.map +1 -1
- package/build-module/components/publish-date-time-picker/index.js +1 -4
- package/build-module/components/publish-date-time-picker/index.js.map +1 -1
- package/build-module/components/recursion-provider/index.js +6 -7
- package/build-module/components/recursion-provider/index.js.map +1 -1
- package/build-module/components/resizable-box-popover/index.js +3 -3
- package/build-module/components/resizable-box-popover/index.js.map +1 -1
- package/build-module/components/resolution-tool/index.js +0 -1
- package/build-module/components/resolution-tool/index.js.map +1 -1
- package/build-module/components/responsive-block-control/index.js +4 -14
- package/build-module/components/responsive-block-control/index.js.map +1 -1
- package/build-module/components/responsive-block-control/label.js +1 -3
- package/build-module/components/responsive-block-control/label.js.map +1 -1
- package/build-module/components/rich-text/content.js +3 -8
- package/build-module/components/rich-text/content.js.map +1 -1
- package/build-module/components/rich-text/embed-handler-picker.native.js +0 -3
- package/build-module/components/rich-text/embed-handler-picker.native.js.map +1 -1
- package/build-module/components/rich-text/file-paste-handler.native.js.map +1 -1
- package/build-module/components/rich-text/format-edit.js +3 -7
- package/build-module/components/rich-text/format-edit.js.map +1 -1
- package/build-module/components/rich-text/format-toolbar/index.js +5 -9
- package/build-module/components/rich-text/format-toolbar/index.js.map +1 -1
- package/build-module/components/rich-text/format-toolbar/index.native.js +1 -3
- package/build-module/components/rich-text/format-toolbar/index.native.js.map +1 -1
- package/build-module/components/rich-text/format-toolbar-container.js +4 -14
- package/build-module/components/rich-text/format-toolbar-container.js.map +1 -1
- package/build-module/components/rich-text/format-toolbar-container.native.js +0 -3
- package/build-module/components/rich-text/format-toolbar-container.native.js.map +1 -1
- package/build-module/components/rich-text/get-rich-text-values.js +4 -18
- package/build-module/components/rich-text/get-rich-text-values.js.map +1 -1
- package/build-module/components/rich-text/index.js +19 -37
- package/build-module/components/rich-text/index.js.map +1 -1
- package/build-module/components/rich-text/index.native.js +49 -76
- package/build-module/components/rich-text/index.native.js.map +1 -1
- package/build-module/components/rich-text/input-event.js +1 -2
- package/build-module/components/rich-text/input-event.js.map +1 -1
- package/build-module/components/rich-text/input-event.native.js +0 -1
- package/build-module/components/rich-text/input-event.native.js.map +1 -1
- package/build-module/components/rich-text/prevent-event-discovery.js +0 -4
- package/build-module/components/rich-text/prevent-event-discovery.js.map +1 -1
- package/build-module/components/rich-text/remove-browser-shortcuts.native.js.map +1 -1
- package/build-module/components/rich-text/shortcut.js +1 -2
- package/build-module/components/rich-text/shortcut.js.map +1 -1
- package/build-module/components/rich-text/shortcut.native.js +0 -1
- package/build-module/components/rich-text/shortcut.native.js.map +1 -1
- package/build-module/components/rich-text/split-value.js +19 -16
- package/build-module/components/rich-text/split-value.js.map +1 -1
- package/build-module/components/rich-text/toolbar-button.js +2 -5
- package/build-module/components/rich-text/toolbar-button.js.map +1 -1
- package/build-module/components/rich-text/use-before-input-rules.js +7 -16
- package/build-module/components/rich-text/use-before-input-rules.js.map +1 -1
- package/build-module/components/rich-text/use-delete.js +5 -10
- package/build-module/components/rich-text/use-delete.js.map +1 -1
- package/build-module/components/rich-text/use-enter.js +3 -10
- package/build-module/components/rich-text/use-enter.js.map +1 -1
- package/build-module/components/rich-text/use-firefox-compat.js +5 -35
- package/build-module/components/rich-text/use-firefox-compat.js.map +1 -1
- package/build-module/components/rich-text/use-format-types.js +9 -20
- package/build-module/components/rich-text/use-format-types.js.map +1 -1
- package/build-module/components/rich-text/use-input-events.js +0 -1
- package/build-module/components/rich-text/use-input-events.js.map +1 -1
- package/build-module/components/rich-text/use-input-rules.js +10 -28
- package/build-module/components/rich-text/use-input-rules.js.map +1 -1
- package/build-module/components/rich-text/use-insert-replacement-text.js +2 -3
- package/build-module/components/rich-text/use-insert-replacement-text.js.map +1 -1
- package/build-module/components/rich-text/use-mark-persistent.js +6 -6
- package/build-module/components/rich-text/use-mark-persistent.js.map +1 -1
- package/build-module/components/rich-text/use-paste-handler.js +26 -62
- package/build-module/components/rich-text/use-paste-handler.js.map +1 -1
- package/build-module/components/rich-text/use-remove-browser-shortcuts.js +1 -2
- package/build-module/components/rich-text/use-remove-browser-shortcuts.js.map +1 -1
- package/build-module/components/rich-text/use-shortcuts.js +0 -1
- package/build-module/components/rich-text/use-shortcuts.js.map +1 -1
- package/build-module/components/rich-text/use-undo-automatic-change.js +1 -9
- package/build-module/components/rich-text/use-undo-automatic-change.js.map +1 -1
- package/build-module/components/rich-text/utils.js +2 -6
- package/build-module/components/rich-text/utils.js.map +1 -1
- package/build-module/components/selection-scroll-into-view/index.js +1 -1
- package/build-module/components/selection-scroll-into-view/index.js.map +1 -1
- package/build-module/components/skip-to-selected-block/index.js +2 -7
- package/build-module/components/skip-to-selected-block/index.js.map +1 -1
- package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.js +1 -3
- package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
- package/build-module/components/spacing-sizes-control/index.js +13 -14
- package/build-module/components/spacing-sizes-control/index.js.map +1 -1
- package/build-module/components/spacing-sizes-control/input-controls/axial.js +6 -9
- package/build-module/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
- package/build-module/components/spacing-sizes-control/input-controls/separated.js +2 -4
- package/build-module/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
- package/build-module/components/spacing-sizes-control/input-controls/single.js +2 -3
- package/build-module/components/spacing-sizes-control/input-controls/single.js.map +1 -1
- package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js +6 -19
- package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
- package/build-module/components/spacing-sizes-control/sides-dropdown/index.js +1 -3
- package/build-module/components/spacing-sizes-control/sides-dropdown/index.js.map +1 -1
- package/build-module/components/spacing-sizes-control/utils.js +33 -50
- package/build-module/components/spacing-sizes-control/utils.js.map +1 -1
- package/build-module/components/text-decoration-control/index.js +2 -3
- package/build-module/components/text-decoration-control/index.js.map +1 -1
- package/build-module/components/text-transform-control/index.js +2 -3
- package/build-module/components/text-transform-control/index.js.map +1 -1
- package/build-module/components/tool-selector/index.js +4 -7
- package/build-module/components/tool-selector/index.js.map +1 -1
- package/build-module/components/typewriter/index.js +30 -46
- package/build-module/components/typewriter/index.js.map +1 -1
- package/build-module/components/ungroup-button/index.native.js +1 -7
- package/build-module/components/ungroup-button/index.native.js.map +1 -1
- package/build-module/components/unit-control/index.js +1 -2
- package/build-module/components/unit-control/index.js.map +1 -1
- package/build-module/components/url-input/button.js +2 -9
- package/build-module/components/url-input/button.js.map +1 -1
- package/build-module/components/url-input/index.js +41 -81
- package/build-module/components/url-input/index.js.map +1 -1
- package/build-module/components/url-input/index.native.js +1 -2
- package/build-module/components/url-input/index.native.js.map +1 -1
- package/build-module/components/url-popover/image-url-input-ui.js +3 -31
- package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
- package/build-module/components/url-popover/index.js +5 -12
- package/build-module/components/url-popover/index.js.map +1 -1
- package/build-module/components/url-popover/link-editor.js +2 -3
- package/build-module/components/url-popover/link-editor.js.map +1 -1
- package/build-module/components/url-popover/link-viewer-url.js +1 -4
- package/build-module/components/url-popover/link-viewer-url.js.map +1 -1
- package/build-module/components/url-popover/link-viewer.js +2 -3
- package/build-module/components/url-popover/link-viewer.js.map +1 -1
- package/build-module/components/use-block-commands/index.js +238 -0
- package/build-module/components/use-block-commands/index.js.map +1 -0
- package/build-module/components/use-block-display-information/index.js +3 -6
- package/build-module/components/use-block-display-information/index.js.map +1 -1
- package/build-module/components/use-block-drop-zone/index.js +14 -19
- package/build-module/components/use-block-drop-zone/index.js.map +1 -1
- package/build-module/components/use-block-drop-zone/index.native.js +13 -16
- package/build-module/components/use-block-drop-zone/index.native.js.map +1 -1
- package/build-module/components/use-display-block-controls/index.js +1 -4
- package/build-module/components/use-display-block-controls/index.js.map +1 -1
- package/build-module/components/use-display-block-controls/index.native.js +1 -3
- package/build-module/components/use-display-block-controls/index.native.js.map +1 -1
- package/build-module/components/use-moving-animation/index.js +6 -17
- package/build-module/components/use-moving-animation/index.js.map +1 -1
- package/build-module/components/use-on-block-drop/index.js +21 -30
- package/build-module/components/use-on-block-drop/index.js.map +1 -1
- package/build-module/components/use-on-block-drop/index.native.js +13 -12
- package/build-module/components/use-on-block-drop/index.native.js.map +1 -1
- package/build-module/components/use-on-block-drop/types.js.map +1 -1
- package/build-module/components/use-paste-styles/index.js +12 -21
- package/build-module/components/use-paste-styles/index.js.map +1 -1
- package/build-module/components/use-resize-canvas/index.js +1 -13
- package/build-module/components/use-resize-canvas/index.js.map +1 -1
- package/build-module/components/use-setting/index.js +17 -33
- package/build-module/components/use-setting/index.js.map +1 -1
- package/build-module/components/video-player/gridicon-play.native.js +0 -1
- package/build-module/components/video-player/gridicon-play.native.js.map +1 -1
- package/build-module/components/video-player/index.native.js +12 -17
- package/build-module/components/video-player/index.native.js.map +1 -1
- package/build-module/components/warning/index.js +2 -5
- package/build-module/components/warning/index.js.map +1 -1
- package/build-module/components/warning/index.native.js +2 -5
- package/build-module/components/warning/index.native.js.map +1 -1
- package/build-module/components/writing-flow/index.js +5 -9
- package/build-module/components/writing-flow/index.js.map +1 -1
- package/build-module/components/writing-flow/use-arrow-nav.js +37 -53
- package/build-module/components/writing-flow/use-arrow-nav.js.map +1 -1
- package/build-module/components/writing-flow/use-click-selection.js +3 -6
- package/build-module/components/writing-flow/use-click-selection.js.map +1 -1
- package/build-module/components/writing-flow/use-drag-selection.js +27 -29
- package/build-module/components/writing-flow/use-drag-selection.js.map +1 -1
- package/build-module/components/writing-flow/use-input.js +8 -17
- package/build-module/components/writing-flow/use-input.js.map +1 -1
- package/build-module/components/writing-flow/use-multi-selection.js +10 -14
- package/build-module/components/writing-flow/use-multi-selection.js.map +1 -1
- package/build-module/components/writing-flow/use-select-all.js +4 -9
- package/build-module/components/writing-flow/use-select-all.js.map +1 -1
- package/build-module/components/writing-flow/use-selection-observer.js +20 -44
- package/build-module/components/writing-flow/use-selection-observer.js.map +1 -1
- package/build-module/components/writing-flow/use-tab-nav.js +28 -34
- package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
- package/build-module/components/writing-mode-control/index.js +2 -3
- package/build-module/components/writing-mode-control/index.js.map +1 -1
- package/build-module/elements/index.js.map +1 -1
- package/build-module/hooks/align.js +25 -36
- package/build-module/hooks/align.js.map +1 -1
- package/build-module/hooks/align.native.js +6 -4
- package/build-module/hooks/align.native.js.map +1 -1
- package/build-module/hooks/anchor.js +11 -15
- package/build-module/hooks/anchor.js.map +1 -1
- package/build-module/hooks/aria-label.js +4 -6
- package/build-module/hooks/aria-label.js.map +1 -1
- package/build-module/hooks/behaviors.js +12 -16
- package/build-module/hooks/behaviors.js.map +1 -1
- package/build-module/hooks/border.js +46 -64
- package/build-module/hooks/border.js.map +1 -1
- package/build-module/hooks/color.js +32 -52
- package/build-module/hooks/color.js.map +1 -1
- package/build-module/hooks/compat.js +0 -4
- package/build-module/hooks/compat.js.map +1 -1
- package/build-module/hooks/content-lock-ui.js +5 -13
- package/build-module/hooks/content-lock-ui.js.map +1 -1
- package/build-module/hooks/contrast-checker.js +4 -11
- package/build-module/hooks/contrast-checker.js.map +1 -1
- package/build-module/hooks/custom-class-name.js +24 -26
- package/build-module/hooks/custom-class-name.js.map +1 -1
- package/build-module/hooks/custom-class-name.native.js +5 -6
- package/build-module/hooks/custom-class-name.native.js.map +1 -1
- package/build-module/hooks/custom-fields.js +113 -0
- package/build-module/hooks/custom-fields.js.map +1 -0
- package/build-module/hooks/dimensions.js +6 -11
- package/build-module/hooks/dimensions.js.map +1 -1
- package/build-module/hooks/duotone.js +43 -49
- package/build-module/hooks/duotone.js.map +1 -1
- package/build-module/hooks/font-family.js +9 -20
- package/build-module/hooks/font-family.js.map +1 -1
- package/build-module/hooks/font-size.js +36 -47
- package/build-module/hooks/font-size.js.map +1 -1
- package/build-module/hooks/gap.js +2 -5
- package/build-module/hooks/gap.js.map +1 -1
- package/build-module/hooks/generated-class-name.js +2 -2
- package/build-module/hooks/generated-class-name.js.map +1 -1
- package/build-module/hooks/index.js +1 -0
- package/build-module/hooks/index.js.map +1 -1
- package/build-module/hooks/index.native.js.map +1 -1
- package/build-module/hooks/layout.js +46 -54
- package/build-module/hooks/layout.js.map +1 -1
- package/build-module/hooks/layout.native.js +5 -3
- package/build-module/hooks/layout.native.js.map +1 -1
- package/build-module/hooks/line-height.js +7 -8
- package/build-module/hooks/line-height.js.map +1 -1
- package/build-module/hooks/lock.js +5 -6
- package/build-module/hooks/lock.js.map +1 -1
- package/build-module/hooks/margin.js +1 -10
- package/build-module/hooks/margin.js.map +1 -1
- package/build-module/hooks/metadata-name.js +5 -6
- package/build-module/hooks/metadata-name.js.map +1 -1
- package/build-module/hooks/metadata.js +3 -7
- package/build-module/hooks/metadata.js.map +1 -1
- package/build-module/hooks/padding.js +1 -10
- package/build-module/hooks/padding.js.map +1 -1
- package/build-module/hooks/position.js +36 -38
- package/build-module/hooks/position.js.map +1 -1
- package/build-module/hooks/settings.js +4 -7
- package/build-module/hooks/settings.js.map +1 -1
- package/build-module/hooks/style.js +30 -44
- package/build-module/hooks/style.js.map +1 -1
- package/build-module/hooks/supports.js +22 -33
- package/build-module/hooks/supports.js.map +1 -1
- package/build-module/hooks/typography.js +11 -16
- package/build-module/hooks/typography.js.map +1 -1
- package/build-module/hooks/typography.native.js +5 -7
- package/build-module/hooks/typography.native.js.map +1 -1
- package/build-module/hooks/use-border-props.js +7 -6
- package/build-module/hooks/use-border-props.js.map +1 -1
- package/build-module/hooks/use-cached-truthy.js +1 -1
- package/build-module/hooks/use-cached-truthy.js.map +1 -1
- package/build-module/hooks/use-color-props.js +18 -17
- package/build-module/hooks/use-color-props.js.map +1 -1
- package/build-module/hooks/use-editor-wrapper-styles.native.js +8 -26
- package/build-module/hooks/use-editor-wrapper-styles.native.js.map +1 -1
- package/build-module/hooks/use-spacing-props.js +5 -3
- package/build-module/hooks/use-spacing-props.js.map +1 -1
- package/build-module/hooks/use-typography-props.js +4 -4
- package/build-module/hooks/use-typography-props.js.map +1 -1
- package/build-module/hooks/utils.js +12 -18
- package/build-module/hooks/utils.js.map +1 -1
- package/build-module/index.js.map +1 -1
- package/build-module/index.native.js.map +1 -1
- package/build-module/layouts/constrained.js +14 -26
- package/build-module/layouts/constrained.js.map +1 -1
- package/build-module/layouts/definitions.js.map +1 -1
- package/build-module/layouts/flex.js +18 -41
- package/build-module/layouts/flex.js.map +1 -1
- package/build-module/layouts/flow.js +8 -17
- package/build-module/layouts/flow.js.map +1 -1
- package/build-module/layouts/grid.js +20 -25
- package/build-module/layouts/grid.js.map +1 -1
- package/build-module/layouts/index.js +2 -2
- package/build-module/layouts/index.js.map +1 -1
- package/build-module/layouts/utils.js +5 -9
- package/build-module/layouts/utils.js.map +1 -1
- package/build-module/lock-unlock.js.map +1 -1
- package/build-module/private-apis.js +3 -4
- package/build-module/private-apis.js.map +1 -1
- package/build-module/private-apis.native.js +3 -2
- package/build-module/private-apis.native.js.map +1 -1
- package/build-module/store/actions.js +188 -196
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/array.js +1 -1
- package/build-module/store/array.js.map +1 -1
- package/build-module/store/constants.js.map +1 -1
- package/build-module/store/defaults.js +1 -1
- package/build-module/store/defaults.js.map +1 -1
- package/build-module/store/defaults.native.js +2 -1
- package/build-module/store/defaults.native.js.map +1 -1
- package/build-module/store/index.js +13 -9
- package/build-module/store/index.js.map +1 -1
- package/build-module/store/private-actions.js +25 -78
- package/build-module/store/private-actions.js.map +1 -1
- package/build-module/store/private-selectors.js +6 -76
- package/build-module/store/private-selectors.js.map +1 -1
- package/build-module/store/reducer.js +161 -328
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +253 -331
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/store/utils.js.map +1 -1
- package/build-module/utils/block-variation-transforms.js +2 -3
- package/build-module/utils/block-variation-transforms.js.map +1 -1
- package/build-module/utils/dom.js +4 -10
- package/build-module/utils/dom.js.map +1 -1
- package/build-module/utils/index.js.map +1 -1
- package/build-module/utils/math.js +5 -7
- package/build-module/utils/math.js.map +1 -1
- package/build-module/utils/object.js +15 -21
- package/build-module/utils/object.js.map +1 -1
- package/build-module/utils/order-inserter-block-items.js +2 -3
- package/build-module/utils/order-inserter-block-items.js.map +1 -1
- package/build-module/utils/parse-css-unit-to-px.js +14 -64
- package/build-module/utils/parse-css-unit-to-px.js.map +1 -1
- package/build-module/utils/pasting.js +8 -12
- package/build-module/utils/pasting.js.map +1 -1
- package/build-module/utils/pre-parse-patterns.js +1 -14
- package/build-module/utils/pre-parse-patterns.js.map +1 -1
- package/build-module/utils/selection.js +1 -2
- package/build-module/utils/selection.js.map +1 -1
- package/build-module/utils/sorting.js +3 -7
- package/build-module/utils/sorting.js.map +1 -1
- package/build-module/utils/transform-styles/ast/index.js +1 -0
- package/build-module/utils/transform-styles/ast/index.js.map +1 -1
- package/build-module/utils/transform-styles/ast/parse.js +95 -134
- package/build-module/utils/transform-styles/ast/parse.js.map +1 -1
- package/build-module/utils/transform-styles/ast/stringify/compiler.js +5 -6
- package/build-module/utils/transform-styles/ast/stringify/compiler.js.map +1 -1
- package/build-module/utils/transform-styles/ast/stringify/compress.js +28 -19
- package/build-module/utils/transform-styles/ast/stringify/compress.js.map +1 -1
- package/build-module/utils/transform-styles/ast/stringify/identity.js +32 -23
- package/build-module/utils/transform-styles/ast/stringify/identity.js.map +1 -1
- package/build-module/utils/transform-styles/ast/stringify/index.js +1 -0
- package/build-module/utils/transform-styles/ast/stringify/index.js.map +1 -1
- package/build-module/utils/transform-styles/index.js +2 -7
- package/build-module/utils/transform-styles/index.js.map +1 -1
- package/build-module/utils/transform-styles/transforms/url-rewrite.js +12 -24
- package/build-module/utils/transform-styles/transforms/url-rewrite.js.map +1 -1
- package/build-module/utils/transform-styles/transforms/wrap.js +7 -8
- package/build-module/utils/transform-styles/transforms/wrap.js.map +1 -1
- package/build-module/utils/transform-styles/traverse.js +1 -4
- package/build-module/utils/transform-styles/traverse.js.map +1 -1
- package/build-module/utils/use-should-contextual-toolbar-show.js +2 -5
- package/build-module/utils/use-should-contextual-toolbar-show.js.map +1 -1
- package/build-style/style-rtl.css +52 -6
- package/build-style/style.css +52 -6
- package/package.json +33 -32
- package/src/components/block-caption/README.md +109 -0
- package/src/components/block-controls/use-has-block-controls.js +35 -0
- package/src/components/block-editing-mode/index.js +3 -7
- package/src/components/block-inspector/index.js +1 -2
- package/src/components/block-list/block-outline.native.js +2 -2
- package/src/components/block-list/block.js +1 -2
- package/src/components/block-list/index.native.js +14 -14
- package/src/components/block-list/test/block-invalid-warning.native.js +7 -0
- package/src/components/block-list/use-in-between-inserter.js +1 -2
- package/src/components/block-list-appender/index.js +1 -2
- package/src/components/block-parent-selector/index.js +1 -2
- package/src/components/block-preview/index.js +0 -1
- package/src/components/block-toolbar/index.js +1 -2
- package/src/components/block-toolbar/style.scss +10 -0
- package/src/components/block-tools/block-contextual-toolbar.js +87 -9
- package/src/components/block-tools/style.scss +34 -10
- package/src/components/copy-handler/index.js +1 -0
- package/src/components/default-block-appender/index.native.js +13 -11
- package/src/components/dimensions-tool/index.js +1 -1
- package/src/components/global-styles/test/typography-utils.js +55 -0
- package/src/components/global-styles/typography-utils.js +12 -3
- package/src/components/global-styles/use-global-styles-output.js +1 -2
- package/src/components/iframe/index.js +1 -0
- package/src/components/index.js +7 -0
- package/src/components/inserter/hooks/use-patterns-state.js +1 -1
- package/src/components/inserter/menu.js +1 -0
- package/src/components/inserter/preview-panel.js +15 -11
- package/src/components/inserter/search-results.js +2 -1
- package/src/components/inserter/stories/{index.js → index.story.js} +4 -4
- package/src/components/inserter/test/search-items.js +4 -1
- package/src/components/keyboard-shortcuts/index.js +10 -0
- package/src/components/line-height-control/index.js +14 -11
- package/src/components/line-height-control/test/index.js +7 -5
- package/src/components/line-height-control/utils.js +6 -1
- package/src/components/link-control/index.js +27 -7
- package/src/components/link-control/link-preview.js +4 -0
- package/src/components/link-control/style.scss +9 -0
- package/src/components/link-control/test/index.js +63 -4
- package/src/components/list-view/block-select-button.js +19 -0
- package/src/components/list-view/block.js +1 -4
- package/src/components/list-view/style.scss +25 -0
- package/src/components/list-view/use-list-view-images.js +79 -0
- package/src/components/rich-text/index.js +8 -1
- package/src/components/rich-text/use-firefox-compat.js +1 -27
- package/src/components/rich-text/use-format-types.js +3 -3
- package/src/components/rich-text/use-paste-handler.js +4 -23
- package/src/components/use-block-commands/index.js +284 -0
- package/src/components/use-block-drop-zone/index.js +1 -2
- package/src/components/use-setting/README.md +39 -0
- package/src/components/writing-flow/use-drag-selection.js +5 -1
- package/src/hooks/custom-fields.js +139 -0
- package/src/hooks/index.js +1 -0
- package/src/hooks/layout.js +13 -4
- package/src/private-apis.js +0 -2
- package/src/store/actions.js +49 -2
- package/src/store/private-actions.js +0 -39
- package/src/store/private-selectors.js +1 -67
- package/src/store/selectors.js +64 -2
- package/src/store/test/actions.js +28 -0
- package/src/store/test/private-actions.js +0 -28
- package/src/store/test/private-selectors.js +88 -261
- package/src/store/test/selectors.js +203 -1
- package/src/utils/transform-styles/ast/parse.js +31 -0
- package/src/utils/transform-styles/ast/stringify/compress.js +13 -0
- package/src/utils/transform-styles/ast/stringify/identity.js +13 -0
- package/src/utils/transform-styles/transforms/test/__snapshots__/wrap.js.snap +8 -0
- package/src/utils/transform-styles/transforms/test/wrap.js +11 -0
- package/tsconfig.tsbuildinfo +1 -1
- /package/src/components/block-draggable/stories/{index.js → index.story.js} +0 -0
- /package/src/components/block-mover/stories/{index.js → index.story.js} +0 -0
- /package/src/components/dimensions-tool/stories/{aspect-ratio-tool.js → aspect-ratio-tool.story.js} +0 -0
- /package/src/components/dimensions-tool/stories/{index.js → index.story.js} +0 -0
- /package/src/components/dimensions-tool/stories/{scale-tool.js → scale-tool.story.js} +0 -0
- /package/src/components/dimensions-tool/stories/{width-height-tool.js → width-height-tool.story.js} +0 -0
- /package/src/components/height-control/stories/{index.js → index.story.js} +0 -0
- /package/src/components/line-height-control/stories/{index.js → index.story.js} +0 -0
- /package/src/components/resolution-tool/stories/{index.js → index.story.js} +0 -0
- /package/src/components/text-decoration-control/stories/{index.js → index.story.js} +0 -0
- /package/src/components/text-transform-control/stories/{index.js → index.story.js} +0 -0
- /package/src/components/url-popover/stories/{index.js → index.story.js} +0 -0
package/build/store/selectors.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
@@ -34,6 +33,7 @@ exports.getAllowedBlocks = void 0;
|
|
|
34
33
|
exports.getBlock = getBlock;
|
|
35
34
|
exports.getBlockAttributes = getBlockAttributes;
|
|
36
35
|
exports.getBlockCount = getBlockCount;
|
|
36
|
+
exports.getBlockEditingMode = void 0;
|
|
37
37
|
exports.getBlockHierarchyRootClientId = getBlockHierarchyRootClientId;
|
|
38
38
|
exports.getBlockIndex = getBlockIndex;
|
|
39
39
|
exports.getBlockInsertionPoint = void 0;
|
|
@@ -97,27 +97,16 @@ exports.isSelectionEnabled = isSelectionEnabled;
|
|
|
97
97
|
exports.isTyping = isTyping;
|
|
98
98
|
exports.isValidTemplate = isValidTemplate;
|
|
99
99
|
exports.wasBlockJustInserted = wasBlockJustInserted;
|
|
100
|
-
|
|
101
100
|
var _rememo = _interopRequireDefault(require("rememo"));
|
|
102
|
-
|
|
103
101
|
var _blocks = require("@wordpress/blocks");
|
|
104
|
-
|
|
105
102
|
var _element = require("@wordpress/element");
|
|
106
|
-
|
|
107
103
|
var _hooks = require("@wordpress/hooks");
|
|
108
|
-
|
|
109
104
|
var _icons = require("@wordpress/icons");
|
|
110
|
-
|
|
111
105
|
var _richText = require("@wordpress/rich-text");
|
|
112
|
-
|
|
113
106
|
var _deprecated = _interopRequireDefault(require("@wordpress/deprecated"));
|
|
114
|
-
|
|
107
|
+
var _data = require("@wordpress/data");
|
|
115
108
|
var _utils = require("./utils");
|
|
116
|
-
|
|
117
109
|
var _sorting = require("../utils/sorting");
|
|
118
|
-
|
|
119
|
-
var _privateSelectors = require("./private-selectors");
|
|
120
|
-
|
|
121
110
|
/**
|
|
122
111
|
* External dependencies
|
|
123
112
|
*/
|
|
@@ -140,10 +129,12 @@ var _privateSelectors = require("./private-selectors");
|
|
|
140
129
|
* @property {number} offset An attribute value offset, based on the rich
|
|
141
130
|
* text value. See `wp.richText.create`.
|
|
142
131
|
*/
|
|
132
|
+
|
|
143
133
|
// Module constants.
|
|
144
134
|
const MILLISECONDS_PER_HOUR = 3600 * 1000;
|
|
145
135
|
const MILLISECONDS_PER_DAY = 24 * 3600 * 1000;
|
|
146
136
|
const MILLISECONDS_PER_WEEK = 7 * 24 * 3600 * 1000;
|
|
137
|
+
|
|
147
138
|
/**
|
|
148
139
|
* Shared reference to an empty array for cases where it is important to avoid
|
|
149
140
|
* returning a new array reference on every invocation, as in a connected or
|
|
@@ -153,8 +144,8 @@ const MILLISECONDS_PER_WEEK = 7 * 24 * 3600 * 1000;
|
|
|
153
144
|
*
|
|
154
145
|
* @type {Array}
|
|
155
146
|
*/
|
|
156
|
-
|
|
157
147
|
const EMPTY_ARRAY = [];
|
|
148
|
+
|
|
158
149
|
/**
|
|
159
150
|
* Shared reference to an empty Set for cases where it is important to avoid
|
|
160
151
|
* returning a new Set reference on every invocation, as in a connected or
|
|
@@ -164,8 +155,8 @@ const EMPTY_ARRAY = [];
|
|
|
164
155
|
*
|
|
165
156
|
* @type {Set}
|
|
166
157
|
*/
|
|
167
|
-
|
|
168
158
|
const EMPTY_SET = new Set();
|
|
159
|
+
|
|
169
160
|
/**
|
|
170
161
|
* Returns a block's name given its client ID, or null if no block exists with
|
|
171
162
|
* the client ID.
|
|
@@ -175,11 +166,9 @@ const EMPTY_SET = new Set();
|
|
|
175
166
|
*
|
|
176
167
|
* @return {string} Block name.
|
|
177
168
|
*/
|
|
178
|
-
|
|
179
169
|
function getBlockName(state, clientId) {
|
|
180
170
|
const block = state.blocks.byClientId.get(clientId);
|
|
181
171
|
const socialLinkName = 'core/social-link';
|
|
182
|
-
|
|
183
172
|
if (_element.Platform.OS !== 'web' && block?.name === socialLinkName) {
|
|
184
173
|
const attributes = state.blocks.attributes.get(clientId);
|
|
185
174
|
const {
|
|
@@ -187,9 +176,9 @@ function getBlockName(state, clientId) {
|
|
|
187
176
|
} = attributes !== null && attributes !== void 0 ? attributes : {};
|
|
188
177
|
return service ? `${socialLinkName}-${service}` : socialLinkName;
|
|
189
178
|
}
|
|
190
|
-
|
|
191
179
|
return block ? block.name : null;
|
|
192
180
|
}
|
|
181
|
+
|
|
193
182
|
/**
|
|
194
183
|
* Returns whether a block is valid or not.
|
|
195
184
|
*
|
|
@@ -198,12 +187,11 @@ function getBlockName(state, clientId) {
|
|
|
198
187
|
*
|
|
199
188
|
* @return {boolean} Is Valid.
|
|
200
189
|
*/
|
|
201
|
-
|
|
202
|
-
|
|
203
190
|
function isBlockValid(state, clientId) {
|
|
204
191
|
const block = state.blocks.byClientId.get(clientId);
|
|
205
192
|
return !!block && block.isValid;
|
|
206
193
|
}
|
|
194
|
+
|
|
207
195
|
/**
|
|
208
196
|
* Returns a block's attributes given its client ID, or null if no block exists with
|
|
209
197
|
* the client ID.
|
|
@@ -213,17 +201,14 @@ function isBlockValid(state, clientId) {
|
|
|
213
201
|
*
|
|
214
202
|
* @return {Object?} Block attributes.
|
|
215
203
|
*/
|
|
216
|
-
|
|
217
|
-
|
|
218
204
|
function getBlockAttributes(state, clientId) {
|
|
219
205
|
const block = state.blocks.byClientId.get(clientId);
|
|
220
|
-
|
|
221
206
|
if (!block) {
|
|
222
207
|
return null;
|
|
223
208
|
}
|
|
224
|
-
|
|
225
209
|
return state.blocks.attributes.get(clientId);
|
|
226
210
|
}
|
|
211
|
+
|
|
227
212
|
/**
|
|
228
213
|
* Returns a block given its client ID. This is a parsed copy of the block,
|
|
229
214
|
* containing its `blockName`, `clientId`, and current `attributes` state. This
|
|
@@ -245,25 +230,22 @@ function getBlockAttributes(state, clientId) {
|
|
|
245
230
|
*
|
|
246
231
|
* @return {Object} Parsed block object.
|
|
247
232
|
*/
|
|
248
|
-
|
|
249
|
-
|
|
250
233
|
function getBlock(state, clientId) {
|
|
251
234
|
if (!state.blocks.byClientId.has(clientId)) {
|
|
252
235
|
return null;
|
|
253
236
|
}
|
|
254
|
-
|
|
255
237
|
return state.blocks.tree.get(clientId);
|
|
256
238
|
}
|
|
257
|
-
|
|
258
239
|
const __unstableGetBlockWithoutInnerBlocks = (0, _rememo.default)((state, clientId) => {
|
|
259
240
|
if (!state.blocks.byClientId.has(clientId)) {
|
|
260
241
|
return null;
|
|
261
242
|
}
|
|
262
|
-
|
|
263
|
-
|
|
243
|
+
return {
|
|
244
|
+
...state.blocks.byClientId.get(clientId),
|
|
264
245
|
attributes: getBlockAttributes(state, clientId)
|
|
265
246
|
};
|
|
266
247
|
}, (state, clientId) => [state.blocks.byClientId.get(clientId), state.blocks.attributes.get(clientId)]);
|
|
248
|
+
|
|
267
249
|
/**
|
|
268
250
|
* Returns all block objects for the current post being edited as an array in
|
|
269
251
|
* the order they appear in the post. Note that this will exclude child blocks
|
|
@@ -274,14 +256,12 @@ const __unstableGetBlockWithoutInnerBlocks = (0, _rememo.default)((state, client
|
|
|
274
256
|
*
|
|
275
257
|
* @return {Object[]} Post blocks.
|
|
276
258
|
*/
|
|
277
|
-
|
|
278
|
-
|
|
279
259
|
exports.__unstableGetBlockWithoutInnerBlocks = __unstableGetBlockWithoutInnerBlocks;
|
|
280
|
-
|
|
281
260
|
function getBlocks(state, rootClientId) {
|
|
282
261
|
const treeKey = !rootClientId || !areInnerBlocksControlled(state, rootClientId) ? rootClientId || '' : 'controlled||' + rootClientId;
|
|
283
262
|
return state.blocks.tree.get(treeKey)?.innerBlocks || EMPTY_ARRAY;
|
|
284
263
|
}
|
|
264
|
+
|
|
285
265
|
/**
|
|
286
266
|
* Returns a stripped down block object containing only its client ID,
|
|
287
267
|
* and its inner blocks' client IDs.
|
|
@@ -293,8 +273,6 @@ function getBlocks(state, rootClientId) {
|
|
|
293
273
|
*
|
|
294
274
|
* @return {Object} Client IDs of the post blocks.
|
|
295
275
|
*/
|
|
296
|
-
|
|
297
|
-
|
|
298
276
|
const __unstableGetClientIdWithClientIdsTree = (0, _rememo.default)((state, clientId) => {
|
|
299
277
|
(0, _deprecated.default)("wp.data.select( 'core/block-editor' ).__unstableGetClientIdWithClientIdsTree", {
|
|
300
278
|
since: '6.3',
|
|
@@ -305,6 +283,7 @@ const __unstableGetClientIdWithClientIdsTree = (0, _rememo.default)((state, clie
|
|
|
305
283
|
innerBlocks: __unstableGetClientIdsTree(state, clientId)
|
|
306
284
|
};
|
|
307
285
|
}, state => [state.blocks.order]);
|
|
286
|
+
|
|
308
287
|
/**
|
|
309
288
|
* Returns the block tree represented in the block-editor store from the
|
|
310
289
|
* given root, consisting of stripped down block objects containing only
|
|
@@ -317,10 +296,7 @@ const __unstableGetClientIdWithClientIdsTree = (0, _rememo.default)((state, clie
|
|
|
317
296
|
*
|
|
318
297
|
* @return {Object[]} Client IDs of the post blocks.
|
|
319
298
|
*/
|
|
320
|
-
|
|
321
|
-
|
|
322
299
|
exports.__unstableGetClientIdWithClientIdsTree = __unstableGetClientIdWithClientIdsTree;
|
|
323
|
-
|
|
324
300
|
const __unstableGetClientIdsTree = (0, _rememo.default)((state, rootClientId = '') => {
|
|
325
301
|
(0, _deprecated.default)("wp.data.select( 'core/block-editor' ).__unstableGetClientIdsTree", {
|
|
326
302
|
since: '6.3',
|
|
@@ -328,6 +304,7 @@ const __unstableGetClientIdsTree = (0, _rememo.default)((state, rootClientId = '
|
|
|
328
304
|
});
|
|
329
305
|
return getBlockOrder(state, rootClientId).map(clientId => __unstableGetClientIdWithClientIdsTree(state, clientId));
|
|
330
306
|
}, state => [state.blocks.order]);
|
|
307
|
+
|
|
331
308
|
/**
|
|
332
309
|
* Returns an array containing the clientIds of all descendants of the blocks
|
|
333
310
|
* given. Returned ids are ordered first by the order of the ids given, then
|
|
@@ -338,20 +315,17 @@ const __unstableGetClientIdsTree = (0, _rememo.default)((state, rootClientId = '
|
|
|
338
315
|
*
|
|
339
316
|
* @return {Array} ids of descendants.
|
|
340
317
|
*/
|
|
341
|
-
|
|
342
|
-
|
|
343
318
|
exports.__unstableGetClientIdsTree = __unstableGetClientIdsTree;
|
|
344
319
|
const getClientIdsOfDescendants = (0, _rememo.default)((state, clientIds) => {
|
|
345
320
|
const collectedIds = [];
|
|
346
|
-
|
|
347
321
|
for (const givenId of clientIds) {
|
|
348
322
|
for (const descendantId of getBlockOrder(state, givenId)) {
|
|
349
323
|
collectedIds.push(descendantId, ...getClientIdsOfDescendants(state, [descendantId]));
|
|
350
324
|
}
|
|
351
325
|
}
|
|
352
|
-
|
|
353
326
|
return collectedIds;
|
|
354
327
|
}, state => [state.blocks.order]);
|
|
328
|
+
|
|
355
329
|
/**
|
|
356
330
|
* Returns an array containing the clientIds of the top-level blocks and
|
|
357
331
|
* their descendants of any depth (for nested blocks). Ids are returned
|
|
@@ -361,17 +335,15 @@ const getClientIdsOfDescendants = (0, _rememo.default)((state, clientIds) => {
|
|
|
361
335
|
*
|
|
362
336
|
* @return {Array} ids of top-level and descendant blocks.
|
|
363
337
|
*/
|
|
364
|
-
|
|
365
338
|
exports.getClientIdsOfDescendants = getClientIdsOfDescendants;
|
|
366
339
|
const getClientIdsWithDescendants = (0, _rememo.default)(state => {
|
|
367
340
|
const collectedIds = [];
|
|
368
|
-
|
|
369
341
|
for (const topLevelId of getBlockOrder(state)) {
|
|
370
342
|
collectedIds.push(topLevelId, ...getClientIdsOfDescendants(state, [topLevelId]));
|
|
371
343
|
}
|
|
372
|
-
|
|
373
344
|
return collectedIds;
|
|
374
345
|
}, state => [state.blocks.order]);
|
|
346
|
+
|
|
375
347
|
/**
|
|
376
348
|
* Returns the total number of blocks, or the total number of blocks with a specific name in a post.
|
|
377
349
|
* The number returned includes nested blocks.
|
|
@@ -381,20 +353,18 @@ const getClientIdsWithDescendants = (0, _rememo.default)(state => {
|
|
|
381
353
|
*
|
|
382
354
|
* @return {number} Number of blocks in the post, or number of blocks with name equal to blockName.
|
|
383
355
|
*/
|
|
384
|
-
|
|
385
356
|
exports.getClientIdsWithDescendants = getClientIdsWithDescendants;
|
|
386
357
|
const getGlobalBlockCount = (0, _rememo.default)((state, blockName) => {
|
|
387
358
|
const clientIds = getClientIdsWithDescendants(state);
|
|
388
|
-
|
|
389
359
|
if (!blockName) {
|
|
390
360
|
return clientIds.length;
|
|
391
361
|
}
|
|
392
|
-
|
|
393
362
|
return clientIds.reduce((accumulator, clientId) => {
|
|
394
363
|
const block = state.blocks.byClientId.get(clientId);
|
|
395
364
|
return block.name === blockName ? accumulator + 1 : accumulator;
|
|
396
365
|
}, 0);
|
|
397
366
|
}, state => [state.blocks.order, state.blocks.byClientId]);
|
|
367
|
+
|
|
398
368
|
/**
|
|
399
369
|
* Returns all global blocks that match a blockName. Results include nested blocks.
|
|
400
370
|
*
|
|
@@ -403,14 +373,11 @@ const getGlobalBlockCount = (0, _rememo.default)((state, blockName) => {
|
|
|
403
373
|
*
|
|
404
374
|
* @return {Array} Array of clientIds of blocks with name equal to blockName.
|
|
405
375
|
*/
|
|
406
|
-
|
|
407
376
|
exports.getGlobalBlockCount = getGlobalBlockCount;
|
|
408
|
-
|
|
409
377
|
const __experimentalGetGlobalBlocksByName = (0, _rememo.default)((state, blockName) => {
|
|
410
378
|
if (!blockName) {
|
|
411
379
|
return EMPTY_ARRAY;
|
|
412
380
|
}
|
|
413
|
-
|
|
414
381
|
const blockNames = Array.isArray(blockName) ? blockName : [blockName];
|
|
415
382
|
const clientIds = getClientIdsWithDescendants(state);
|
|
416
383
|
const foundBlocks = clientIds.filter(clientId => {
|
|
@@ -419,6 +386,7 @@ const __experimentalGetGlobalBlocksByName = (0, _rememo.default)((state, blockNa
|
|
|
419
386
|
});
|
|
420
387
|
return foundBlocks.length > 0 ? foundBlocks : EMPTY_ARRAY;
|
|
421
388
|
}, state => [state.blocks.order, state.blocks.byClientId]);
|
|
389
|
+
|
|
422
390
|
/**
|
|
423
391
|
* Given an array of block client IDs, returns the corresponding array of block
|
|
424
392
|
* objects.
|
|
@@ -428,10 +396,9 @@ const __experimentalGetGlobalBlocksByName = (0, _rememo.default)((state, blockNa
|
|
|
428
396
|
*
|
|
429
397
|
* @return {WPBlock[]} Block objects.
|
|
430
398
|
*/
|
|
431
|
-
|
|
432
|
-
|
|
433
399
|
exports.__experimentalGetGlobalBlocksByName = __experimentalGetGlobalBlocksByName;
|
|
434
400
|
const getBlocksByClientId = (0, _rememo.default)((state, clientIds) => (Array.isArray(clientIds) ? clientIds : [clientIds]).map(clientId => getBlock(state, clientId)), (state, clientIds) => (Array.isArray(clientIds) ? clientIds : [clientIds]).map(clientId => state.blocks.tree.get(clientId)));
|
|
401
|
+
|
|
435
402
|
/**
|
|
436
403
|
* Given an array of block client IDs, returns the corresponding array of block
|
|
437
404
|
* names.
|
|
@@ -441,9 +408,9 @@ const getBlocksByClientId = (0, _rememo.default)((state, clientIds) => (Array.is
|
|
|
441
408
|
*
|
|
442
409
|
* @return {string[]} Block names.
|
|
443
410
|
*/
|
|
444
|
-
|
|
445
411
|
exports.getBlocksByClientId = getBlocksByClientId;
|
|
446
412
|
const getBlockNamesByClientId = (0, _rememo.default)((state, clientIds) => getBlocksByClientId(state, clientIds).filter(Boolean).map(block => block.name), (state, clientIds) => getBlocksByClientId(state, clientIds));
|
|
413
|
+
|
|
447
414
|
/**
|
|
448
415
|
* Returns the number of blocks currently present in the post.
|
|
449
416
|
*
|
|
@@ -452,12 +419,11 @@ const getBlockNamesByClientId = (0, _rememo.default)((state, clientIds) => getBl
|
|
|
452
419
|
*
|
|
453
420
|
* @return {number} Number of blocks in the post.
|
|
454
421
|
*/
|
|
455
|
-
|
|
456
422
|
exports.getBlockNamesByClientId = getBlockNamesByClientId;
|
|
457
|
-
|
|
458
423
|
function getBlockCount(state, rootClientId) {
|
|
459
424
|
return getBlockOrder(state, rootClientId).length;
|
|
460
425
|
}
|
|
426
|
+
|
|
461
427
|
/**
|
|
462
428
|
* Returns the current selection start block client ID, attribute key and text
|
|
463
429
|
* offset.
|
|
@@ -466,11 +432,10 @@ function getBlockCount(state, rootClientId) {
|
|
|
466
432
|
*
|
|
467
433
|
* @return {WPBlockSelection} Selection start information.
|
|
468
434
|
*/
|
|
469
|
-
|
|
470
|
-
|
|
471
435
|
function getSelectionStart(state) {
|
|
472
436
|
return state.selection.selectionStart;
|
|
473
437
|
}
|
|
438
|
+
|
|
474
439
|
/**
|
|
475
440
|
* Returns the current selection end block client ID, attribute key and text
|
|
476
441
|
* offset.
|
|
@@ -479,11 +444,10 @@ function getSelectionStart(state) {
|
|
|
479
444
|
*
|
|
480
445
|
* @return {WPBlockSelection} Selection end information.
|
|
481
446
|
*/
|
|
482
|
-
|
|
483
|
-
|
|
484
447
|
function getSelectionEnd(state) {
|
|
485
448
|
return state.selection.selectionEnd;
|
|
486
449
|
}
|
|
450
|
+
|
|
487
451
|
/**
|
|
488
452
|
* Returns the current block selection start. This value may be null, and it
|
|
489
453
|
* may represent either a singular block selection or multi-selection start.
|
|
@@ -493,11 +457,10 @@ function getSelectionEnd(state) {
|
|
|
493
457
|
*
|
|
494
458
|
* @return {?string} Client ID of block selection start.
|
|
495
459
|
*/
|
|
496
|
-
|
|
497
|
-
|
|
498
460
|
function getBlockSelectionStart(state) {
|
|
499
461
|
return state.selection.selectionStart.clientId;
|
|
500
462
|
}
|
|
463
|
+
|
|
501
464
|
/**
|
|
502
465
|
* Returns the current block selection end. This value may be null, and it
|
|
503
466
|
* may represent either a singular block selection or multi-selection end.
|
|
@@ -507,11 +470,10 @@ function getBlockSelectionStart(state) {
|
|
|
507
470
|
*
|
|
508
471
|
* @return {?string} Client ID of block selection end.
|
|
509
472
|
*/
|
|
510
|
-
|
|
511
|
-
|
|
512
473
|
function getBlockSelectionEnd(state) {
|
|
513
474
|
return state.selection.selectionEnd.clientId;
|
|
514
475
|
}
|
|
476
|
+
|
|
515
477
|
/**
|
|
516
478
|
* Returns the number of blocks currently selected in the post.
|
|
517
479
|
*
|
|
@@ -519,17 +481,14 @@ function getBlockSelectionEnd(state) {
|
|
|
519
481
|
*
|
|
520
482
|
* @return {number} Number of blocks selected in the post.
|
|
521
483
|
*/
|
|
522
|
-
|
|
523
|
-
|
|
524
484
|
function getSelectedBlockCount(state) {
|
|
525
485
|
const multiSelectedBlockCount = getMultiSelectedBlockClientIds(state).length;
|
|
526
|
-
|
|
527
486
|
if (multiSelectedBlockCount) {
|
|
528
487
|
return multiSelectedBlockCount;
|
|
529
488
|
}
|
|
530
|
-
|
|
531
489
|
return state.selection.selectionStart.clientId ? 1 : 0;
|
|
532
490
|
}
|
|
491
|
+
|
|
533
492
|
/**
|
|
534
493
|
* Returns true if there is a single selected block, or false otherwise.
|
|
535
494
|
*
|
|
@@ -537,8 +496,6 @@ function getSelectedBlockCount(state) {
|
|
|
537
496
|
*
|
|
538
497
|
* @return {boolean} Whether a single block is selected.
|
|
539
498
|
*/
|
|
540
|
-
|
|
541
|
-
|
|
542
499
|
function hasSelectedBlock(state) {
|
|
543
500
|
const {
|
|
544
501
|
selectionStart,
|
|
@@ -546,6 +503,7 @@ function hasSelectedBlock(state) {
|
|
|
546
503
|
} = state.selection;
|
|
547
504
|
return !!selectionStart.clientId && selectionStart.clientId === selectionEnd.clientId;
|
|
548
505
|
}
|
|
506
|
+
|
|
549
507
|
/**
|
|
550
508
|
* Returns the currently selected block client ID, or null if there is no
|
|
551
509
|
* selected block.
|
|
@@ -554,8 +512,6 @@ function hasSelectedBlock(state) {
|
|
|
554
512
|
*
|
|
555
513
|
* @return {?string} Selected block client ID.
|
|
556
514
|
*/
|
|
557
|
-
|
|
558
|
-
|
|
559
515
|
function getSelectedBlockClientId(state) {
|
|
560
516
|
const {
|
|
561
517
|
selectionStart,
|
|
@@ -564,13 +520,12 @@ function getSelectedBlockClientId(state) {
|
|
|
564
520
|
const {
|
|
565
521
|
clientId
|
|
566
522
|
} = selectionStart;
|
|
567
|
-
|
|
568
523
|
if (!clientId || clientId !== selectionEnd.clientId) {
|
|
569
524
|
return null;
|
|
570
525
|
}
|
|
571
|
-
|
|
572
526
|
return clientId;
|
|
573
527
|
}
|
|
528
|
+
|
|
574
529
|
/**
|
|
575
530
|
* Returns the currently selected block, or null if there is no selected block.
|
|
576
531
|
*
|
|
@@ -578,12 +533,11 @@ function getSelectedBlockClientId(state) {
|
|
|
578
533
|
*
|
|
579
534
|
* @return {?Object} Selected block.
|
|
580
535
|
*/
|
|
581
|
-
|
|
582
|
-
|
|
583
536
|
function getSelectedBlock(state) {
|
|
584
537
|
const clientId = getSelectedBlockClientId(state);
|
|
585
538
|
return clientId ? getBlock(state, clientId) : null;
|
|
586
539
|
}
|
|
540
|
+
|
|
587
541
|
/**
|
|
588
542
|
* Given a block client ID, returns the root block from which the block is
|
|
589
543
|
* nested, an empty string for top-level blocks, or null if the block does not
|
|
@@ -594,11 +548,10 @@ function getSelectedBlock(state) {
|
|
|
594
548
|
*
|
|
595
549
|
* @return {?string} Root client ID, if exists
|
|
596
550
|
*/
|
|
597
|
-
|
|
598
|
-
|
|
599
551
|
function getBlockRootClientId(state, clientId) {
|
|
600
552
|
return state.blocks.parents.has(clientId) ? state.blocks.parents.get(clientId) : null;
|
|
601
553
|
}
|
|
554
|
+
|
|
602
555
|
/**
|
|
603
556
|
* Given a block client ID, returns the list of all its parents from top to bottom.
|
|
604
557
|
*
|
|
@@ -608,23 +561,19 @@ function getBlockRootClientId(state, clientId) {
|
|
|
608
561
|
*
|
|
609
562
|
* @return {Array} ClientIDs of the parent blocks.
|
|
610
563
|
*/
|
|
611
|
-
|
|
612
|
-
|
|
613
564
|
const getBlockParents = (0, _rememo.default)((state, clientId, ascending = false) => {
|
|
614
565
|
const parents = [];
|
|
615
566
|
let current = clientId;
|
|
616
|
-
|
|
617
567
|
while (!!state.blocks.parents.get(current)) {
|
|
618
568
|
current = state.blocks.parents.get(current);
|
|
619
569
|
parents.push(current);
|
|
620
570
|
}
|
|
621
|
-
|
|
622
571
|
if (!parents.length) {
|
|
623
572
|
return EMPTY_ARRAY;
|
|
624
573
|
}
|
|
625
|
-
|
|
626
574
|
return ascending ? parents : parents.reverse();
|
|
627
575
|
}, state => [state.blocks.parents]);
|
|
576
|
+
|
|
628
577
|
/**
|
|
629
578
|
* Given a block client ID and a block name, returns the list of all its parents
|
|
630
579
|
* from top to bottom, filtered by the given name(s). For example, if passed
|
|
@@ -639,7 +588,6 @@ const getBlockParents = (0, _rememo.default)((state, clientId, ascending = false
|
|
|
639
588
|
*
|
|
640
589
|
* @return {Array} ClientIDs of the parent blocks.
|
|
641
590
|
*/
|
|
642
|
-
|
|
643
591
|
exports.getBlockParents = getBlockParents;
|
|
644
592
|
const getBlockParentsByBlockName = (0, _rememo.default)((state, clientId, blockName, ascending = false) => {
|
|
645
593
|
const parents = getBlockParents(state, clientId, ascending);
|
|
@@ -654,20 +602,17 @@ const getBlockParentsByBlockName = (0, _rememo.default)((state, clientId, blockN
|
|
|
654
602
|
*
|
|
655
603
|
* @return {string} Root client ID
|
|
656
604
|
*/
|
|
657
|
-
|
|
658
605
|
exports.getBlockParentsByBlockName = getBlockParentsByBlockName;
|
|
659
|
-
|
|
660
606
|
function getBlockHierarchyRootClientId(state, clientId) {
|
|
661
607
|
let current = clientId;
|
|
662
608
|
let parent;
|
|
663
|
-
|
|
664
609
|
do {
|
|
665
610
|
parent = current;
|
|
666
611
|
current = state.blocks.parents.get(current);
|
|
667
612
|
} while (current);
|
|
668
|
-
|
|
669
613
|
return parent;
|
|
670
614
|
}
|
|
615
|
+
|
|
671
616
|
/**
|
|
672
617
|
* Given a block client ID, returns the lowest common ancestor with selected client ID.
|
|
673
618
|
*
|
|
@@ -676,15 +621,12 @@ function getBlockHierarchyRootClientId(state, clientId) {
|
|
|
676
621
|
*
|
|
677
622
|
* @return {string} Common ancestor client ID or undefined
|
|
678
623
|
*/
|
|
679
|
-
|
|
680
|
-
|
|
681
624
|
function getLowestCommonAncestorWithSelectedBlock(state, clientId) {
|
|
682
625
|
const selectedId = getSelectedBlockClientId(state);
|
|
683
626
|
const clientParents = [...getBlockParents(state, clientId), clientId];
|
|
684
627
|
const selectedParents = [...getBlockParents(state, selectedId), selectedId];
|
|
685
628
|
let lowestCommonAncestor;
|
|
686
629
|
const maxDepth = Math.min(clientParents.length, selectedParents.length);
|
|
687
|
-
|
|
688
630
|
for (let index = 0; index < maxDepth; index++) {
|
|
689
631
|
if (clientParents[index] === selectedParents[index]) {
|
|
690
632
|
lowestCommonAncestor = clientParents[index];
|
|
@@ -692,9 +634,9 @@ function getLowestCommonAncestorWithSelectedBlock(state, clientId) {
|
|
|
692
634
|
break;
|
|
693
635
|
}
|
|
694
636
|
}
|
|
695
|
-
|
|
696
637
|
return lowestCommonAncestor;
|
|
697
638
|
}
|
|
639
|
+
|
|
698
640
|
/**
|
|
699
641
|
* Returns the client ID of the block adjacent one at the given reference
|
|
700
642
|
* startClientId and modifier directionality. Defaults start startClientId to
|
|
@@ -709,55 +651,53 @@ function getLowestCommonAncestorWithSelectedBlock(state, clientId) {
|
|
|
709
651
|
*
|
|
710
652
|
* @return {?string} Return the client ID of the block, or null if none exists.
|
|
711
653
|
*/
|
|
712
|
-
|
|
713
|
-
|
|
714
654
|
function getAdjacentBlockClientId(state, startClientId, modifier = 1) {
|
|
715
655
|
// Default to selected block.
|
|
716
656
|
if (startClientId === undefined) {
|
|
717
657
|
startClientId = getSelectedBlockClientId(state);
|
|
718
|
-
}
|
|
719
|
-
|
|
658
|
+
}
|
|
720
659
|
|
|
660
|
+
// Try multi-selection starting at extent based on modifier.
|
|
721
661
|
if (startClientId === undefined) {
|
|
722
662
|
if (modifier < 0) {
|
|
723
663
|
startClientId = getFirstMultiSelectedBlockClientId(state);
|
|
724
664
|
} else {
|
|
725
665
|
startClientId = getLastMultiSelectedBlockClientId(state);
|
|
726
666
|
}
|
|
727
|
-
}
|
|
728
|
-
|
|
667
|
+
}
|
|
729
668
|
|
|
669
|
+
// Validate working start client ID.
|
|
730
670
|
if (!startClientId) {
|
|
731
671
|
return null;
|
|
732
|
-
}
|
|
733
|
-
// empty string top-level root by explicitly testing against null.
|
|
734
|
-
|
|
672
|
+
}
|
|
735
673
|
|
|
674
|
+
// Retrieve start block root client ID, being careful to allow the falsey
|
|
675
|
+
// empty string top-level root by explicitly testing against null.
|
|
736
676
|
const rootClientId = getBlockRootClientId(state, startClientId);
|
|
737
|
-
|
|
738
677
|
if (rootClientId === null) {
|
|
739
678
|
return null;
|
|
740
679
|
}
|
|
741
|
-
|
|
742
680
|
const {
|
|
743
681
|
order
|
|
744
682
|
} = state.blocks;
|
|
745
683
|
const orderSet = order.get(rootClientId);
|
|
746
684
|
const index = orderSet.indexOf(startClientId);
|
|
747
|
-
const nextIndex = index + 1 * modifier;
|
|
685
|
+
const nextIndex = index + 1 * modifier;
|
|
748
686
|
|
|
687
|
+
// Block was first in set and we're attempting to get previous.
|
|
749
688
|
if (nextIndex < 0) {
|
|
750
689
|
return null;
|
|
751
|
-
}
|
|
752
|
-
|
|
690
|
+
}
|
|
753
691
|
|
|
692
|
+
// Block was last in set and we're attempting to get next.
|
|
754
693
|
if (nextIndex === orderSet.length) {
|
|
755
694
|
return null;
|
|
756
|
-
}
|
|
757
|
-
|
|
695
|
+
}
|
|
758
696
|
|
|
697
|
+
// Assume incremented index is within the set.
|
|
759
698
|
return orderSet[nextIndex];
|
|
760
699
|
}
|
|
700
|
+
|
|
761
701
|
/**
|
|
762
702
|
* Returns the previous block's client ID from the given reference start ID.
|
|
763
703
|
* Defaults start to the selected block. Returns null if there is no previous
|
|
@@ -769,11 +709,10 @@ function getAdjacentBlockClientId(state, startClientId, modifier = 1) {
|
|
|
769
709
|
*
|
|
770
710
|
* @return {?string} Adjacent block's client ID, or null if none exists.
|
|
771
711
|
*/
|
|
772
|
-
|
|
773
|
-
|
|
774
712
|
function getPreviousBlockClientId(state, startClientId) {
|
|
775
713
|
return getAdjacentBlockClientId(state, startClientId, -1);
|
|
776
714
|
}
|
|
715
|
+
|
|
777
716
|
/**
|
|
778
717
|
* Returns the next block's client ID from the given reference start ID.
|
|
779
718
|
* Defaults start to the selected block. Returns null if there is no next
|
|
@@ -785,13 +724,11 @@ function getPreviousBlockClientId(state, startClientId) {
|
|
|
785
724
|
*
|
|
786
725
|
* @return {?string} Adjacent block's client ID, or null if none exists.
|
|
787
726
|
*/
|
|
788
|
-
|
|
789
|
-
|
|
790
727
|
function getNextBlockClientId(state, startClientId) {
|
|
791
728
|
return getAdjacentBlockClientId(state, startClientId, 1);
|
|
792
729
|
}
|
|
793
|
-
/* eslint-disable jsdoc/valid-types */
|
|
794
730
|
|
|
731
|
+
/* eslint-disable jsdoc/valid-types */
|
|
795
732
|
/**
|
|
796
733
|
* Returns the initial caret position for the selected block.
|
|
797
734
|
* This position is to used to position the caret properly when the selected block changes.
|
|
@@ -801,12 +738,11 @@ function getNextBlockClientId(state, startClientId) {
|
|
|
801
738
|
*
|
|
802
739
|
* @return {0|-1|null} Initial position.
|
|
803
740
|
*/
|
|
804
|
-
|
|
805
|
-
|
|
806
741
|
function getSelectedBlocksInitialCaretPosition(state) {
|
|
807
742
|
/* eslint-enable jsdoc/valid-types */
|
|
808
743
|
return state.initialPosition;
|
|
809
744
|
}
|
|
745
|
+
|
|
810
746
|
/**
|
|
811
747
|
* Returns the current selection set of block client IDs (multiselection or single selection).
|
|
812
748
|
*
|
|
@@ -814,41 +750,34 @@ function getSelectedBlocksInitialCaretPosition(state) {
|
|
|
814
750
|
*
|
|
815
751
|
* @return {Array} Multi-selected block client IDs.
|
|
816
752
|
*/
|
|
817
|
-
|
|
818
|
-
|
|
819
753
|
const getSelectedBlockClientIds = (0, _rememo.default)(state => {
|
|
820
754
|
const {
|
|
821
755
|
selectionStart,
|
|
822
756
|
selectionEnd
|
|
823
757
|
} = state.selection;
|
|
824
|
-
|
|
825
758
|
if (!selectionStart.clientId || !selectionEnd.clientId) {
|
|
826
759
|
return EMPTY_ARRAY;
|
|
827
760
|
}
|
|
828
|
-
|
|
829
761
|
if (selectionStart.clientId === selectionEnd.clientId) {
|
|
830
762
|
return [selectionStart.clientId];
|
|
831
|
-
}
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
// Retrieve root client ID to aid in retrieving relevant nested block
|
|
832
766
|
// order, being careful to allow the falsey empty string top-level root
|
|
833
767
|
// by explicitly testing against null.
|
|
834
|
-
|
|
835
|
-
|
|
836
768
|
const rootClientId = getBlockRootClientId(state, selectionStart.clientId);
|
|
837
|
-
|
|
838
769
|
if (rootClientId === null) {
|
|
839
770
|
return EMPTY_ARRAY;
|
|
840
771
|
}
|
|
841
|
-
|
|
842
772
|
const blockOrder = getBlockOrder(state, rootClientId);
|
|
843
773
|
const startIndex = blockOrder.indexOf(selectionStart.clientId);
|
|
844
774
|
const endIndex = blockOrder.indexOf(selectionEnd.clientId);
|
|
845
|
-
|
|
846
775
|
if (startIndex > endIndex) {
|
|
847
776
|
return blockOrder.slice(endIndex, startIndex + 1);
|
|
848
777
|
}
|
|
849
|
-
|
|
850
778
|
return blockOrder.slice(startIndex, endIndex + 1);
|
|
851
779
|
}, state => [state.blocks.order, state.selection.selectionStart.clientId, state.selection.selectionEnd.clientId]);
|
|
780
|
+
|
|
852
781
|
/**
|
|
853
782
|
* Returns the current multi-selection set of block client IDs, or an empty
|
|
854
783
|
* array if there is no multi-selection.
|
|
@@ -857,21 +786,18 @@ const getSelectedBlockClientIds = (0, _rememo.default)(state => {
|
|
|
857
786
|
*
|
|
858
787
|
* @return {Array} Multi-selected block client IDs.
|
|
859
788
|
*/
|
|
860
|
-
|
|
861
789
|
exports.getSelectedBlockClientIds = getSelectedBlockClientIds;
|
|
862
|
-
|
|
863
790
|
function getMultiSelectedBlockClientIds(state) {
|
|
864
791
|
const {
|
|
865
792
|
selectionStart,
|
|
866
793
|
selectionEnd
|
|
867
794
|
} = state.selection;
|
|
868
|
-
|
|
869
795
|
if (selectionStart.clientId === selectionEnd.clientId) {
|
|
870
796
|
return EMPTY_ARRAY;
|
|
871
797
|
}
|
|
872
|
-
|
|
873
798
|
return getSelectedBlockClientIds(state);
|
|
874
799
|
}
|
|
800
|
+
|
|
875
801
|
/**
|
|
876
802
|
* Returns the current multi-selection set of blocks, or an empty array if
|
|
877
803
|
* there is no multi-selection.
|
|
@@ -880,17 +806,14 @@ function getMultiSelectedBlockClientIds(state) {
|
|
|
880
806
|
*
|
|
881
807
|
* @return {Array} Multi-selected block objects.
|
|
882
808
|
*/
|
|
883
|
-
|
|
884
|
-
|
|
885
809
|
const getMultiSelectedBlocks = (0, _rememo.default)(state => {
|
|
886
810
|
const multiSelectedBlockClientIds = getMultiSelectedBlockClientIds(state);
|
|
887
|
-
|
|
888
811
|
if (!multiSelectedBlockClientIds.length) {
|
|
889
812
|
return EMPTY_ARRAY;
|
|
890
813
|
}
|
|
891
|
-
|
|
892
814
|
return multiSelectedBlockClientIds.map(clientId => getBlock(state, clientId));
|
|
893
815
|
}, state => [...getSelectedBlockClientIds.getDependants(state), state.blocks.byClientId, state.blocks.order, state.blocks.attributes]);
|
|
816
|
+
|
|
894
817
|
/**
|
|
895
818
|
* Returns the client ID of the first block in the multi-selection set, or null
|
|
896
819
|
* if there is no multi-selection.
|
|
@@ -899,12 +822,11 @@ const getMultiSelectedBlocks = (0, _rememo.default)(state => {
|
|
|
899
822
|
*
|
|
900
823
|
* @return {?string} First block client ID in the multi-selection set.
|
|
901
824
|
*/
|
|
902
|
-
|
|
903
825
|
exports.getMultiSelectedBlocks = getMultiSelectedBlocks;
|
|
904
|
-
|
|
905
826
|
function getFirstMultiSelectedBlockClientId(state) {
|
|
906
827
|
return getMultiSelectedBlockClientIds(state)[0] || null;
|
|
907
828
|
}
|
|
829
|
+
|
|
908
830
|
/**
|
|
909
831
|
* Returns the client ID of the last block in the multi-selection set, or null
|
|
910
832
|
* if there is no multi-selection.
|
|
@@ -913,12 +835,11 @@ function getFirstMultiSelectedBlockClientId(state) {
|
|
|
913
835
|
*
|
|
914
836
|
* @return {?string} Last block client ID in the multi-selection set.
|
|
915
837
|
*/
|
|
916
|
-
|
|
917
|
-
|
|
918
838
|
function getLastMultiSelectedBlockClientId(state) {
|
|
919
839
|
const selectedClientIds = getMultiSelectedBlockClientIds(state);
|
|
920
840
|
return selectedClientIds[selectedClientIds.length - 1] || null;
|
|
921
841
|
}
|
|
842
|
+
|
|
922
843
|
/**
|
|
923
844
|
* Returns true if a multi-selection exists, and the block corresponding to the
|
|
924
845
|
* specified client ID is the first block of the multi-selection set, or false
|
|
@@ -929,11 +850,10 @@ function getLastMultiSelectedBlockClientId(state) {
|
|
|
929
850
|
*
|
|
930
851
|
* @return {boolean} Whether block is first in multi-selection.
|
|
931
852
|
*/
|
|
932
|
-
|
|
933
|
-
|
|
934
853
|
function isFirstMultiSelectedBlock(state, clientId) {
|
|
935
854
|
return getFirstMultiSelectedBlockClientId(state) === clientId;
|
|
936
855
|
}
|
|
856
|
+
|
|
937
857
|
/**
|
|
938
858
|
* Returns true if the client ID occurs within the block multi-selection, or
|
|
939
859
|
* false otherwise.
|
|
@@ -943,11 +863,10 @@ function isFirstMultiSelectedBlock(state, clientId) {
|
|
|
943
863
|
*
|
|
944
864
|
* @return {boolean} Whether block is in multi-selection set.
|
|
945
865
|
*/
|
|
946
|
-
|
|
947
|
-
|
|
948
866
|
function isBlockMultiSelected(state, clientId) {
|
|
949
867
|
return getMultiSelectedBlockClientIds(state).indexOf(clientId) !== -1;
|
|
950
868
|
}
|
|
869
|
+
|
|
951
870
|
/**
|
|
952
871
|
* Returns true if an ancestor of the block is multi-selected, or false
|
|
953
872
|
* otherwise.
|
|
@@ -958,19 +877,16 @@ function isBlockMultiSelected(state, clientId) {
|
|
|
958
877
|
* @return {boolean} Whether an ancestor of the block is in multi-selection
|
|
959
878
|
* set.
|
|
960
879
|
*/
|
|
961
|
-
|
|
962
|
-
|
|
963
880
|
const isAncestorMultiSelected = (0, _rememo.default)((state, clientId) => {
|
|
964
881
|
let ancestorClientId = clientId;
|
|
965
882
|
let isMultiSelected = false;
|
|
966
|
-
|
|
967
883
|
while (ancestorClientId && !isMultiSelected) {
|
|
968
884
|
ancestorClientId = getBlockRootClientId(state, ancestorClientId);
|
|
969
885
|
isMultiSelected = isBlockMultiSelected(state, ancestorClientId);
|
|
970
886
|
}
|
|
971
|
-
|
|
972
887
|
return isMultiSelected;
|
|
973
888
|
}, state => [state.blocks.order, state.selection.selectionStart.clientId, state.selection.selectionEnd.clientId]);
|
|
889
|
+
|
|
974
890
|
/**
|
|
975
891
|
* Returns the client ID of the block which begins the multi-selection set, or
|
|
976
892
|
* null if there is no multi-selection.
|
|
@@ -983,21 +899,18 @@ const isAncestorMultiSelected = (0, _rememo.default)((state, clientId) => {
|
|
|
983
899
|
*
|
|
984
900
|
* @return {?string} Client ID of block beginning multi-selection.
|
|
985
901
|
*/
|
|
986
|
-
|
|
987
902
|
exports.isAncestorMultiSelected = isAncestorMultiSelected;
|
|
988
|
-
|
|
989
903
|
function getMultiSelectedBlocksStartClientId(state) {
|
|
990
904
|
const {
|
|
991
905
|
selectionStart,
|
|
992
906
|
selectionEnd
|
|
993
907
|
} = state.selection;
|
|
994
|
-
|
|
995
908
|
if (selectionStart.clientId === selectionEnd.clientId) {
|
|
996
909
|
return null;
|
|
997
910
|
}
|
|
998
|
-
|
|
999
911
|
return selectionStart.clientId || null;
|
|
1000
912
|
}
|
|
913
|
+
|
|
1001
914
|
/**
|
|
1002
915
|
* Returns the client ID of the block which ends the multi-selection set, or
|
|
1003
916
|
* null if there is no multi-selection.
|
|
@@ -1010,20 +923,17 @@ function getMultiSelectedBlocksStartClientId(state) {
|
|
|
1010
923
|
*
|
|
1011
924
|
* @return {?string} Client ID of block ending multi-selection.
|
|
1012
925
|
*/
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
926
|
function getMultiSelectedBlocksEndClientId(state) {
|
|
1016
927
|
const {
|
|
1017
928
|
selectionStart,
|
|
1018
929
|
selectionEnd
|
|
1019
930
|
} = state.selection;
|
|
1020
|
-
|
|
1021
931
|
if (selectionStart.clientId === selectionEnd.clientId) {
|
|
1022
932
|
return null;
|
|
1023
933
|
}
|
|
1024
|
-
|
|
1025
934
|
return selectionEnd.clientId || null;
|
|
1026
935
|
}
|
|
936
|
+
|
|
1027
937
|
/**
|
|
1028
938
|
* Returns true if the selection is not partial.
|
|
1029
939
|
*
|
|
@@ -1031,13 +941,12 @@ function getMultiSelectedBlocksEndClientId(state) {
|
|
|
1031
941
|
*
|
|
1032
942
|
* @return {boolean} Whether the selection is mergeable.
|
|
1033
943
|
*/
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
944
|
function __unstableIsFullySelected(state) {
|
|
1037
945
|
const selectionAnchor = getSelectionStart(state);
|
|
1038
946
|
const selectionFocus = getSelectionEnd(state);
|
|
1039
947
|
return !selectionAnchor.attributeKey && !selectionFocus.attributeKey && typeof selectionAnchor.offset === 'undefined' && typeof selectionFocus.offset === 'undefined';
|
|
1040
948
|
}
|
|
949
|
+
|
|
1041
950
|
/**
|
|
1042
951
|
* Returns true if the selection is collapsed.
|
|
1043
952
|
*
|
|
@@ -1045,14 +954,11 @@ function __unstableIsFullySelected(state) {
|
|
|
1045
954
|
*
|
|
1046
955
|
* @return {boolean} Whether the selection is collapsed.
|
|
1047
956
|
*/
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
957
|
function __unstableIsSelectionCollapsed(state) {
|
|
1051
958
|
const selectionAnchor = getSelectionStart(state);
|
|
1052
959
|
const selectionFocus = getSelectionEnd(state);
|
|
1053
960
|
return !!selectionAnchor && !!selectionFocus && selectionAnchor.clientId === selectionFocus.clientId && selectionAnchor.attributeKey === selectionFocus.attributeKey && selectionAnchor.offset === selectionFocus.offset;
|
|
1054
961
|
}
|
|
1055
|
-
|
|
1056
962
|
function __unstableSelectionHasUnmergeableBlock(state) {
|
|
1057
963
|
return getSelectedBlockClientIds(state).some(clientId => {
|
|
1058
964
|
const blockName = getBlockName(state, clientId);
|
|
@@ -1060,6 +966,7 @@ function __unstableSelectionHasUnmergeableBlock(state) {
|
|
|
1060
966
|
return !blockType.merge;
|
|
1061
967
|
});
|
|
1062
968
|
}
|
|
969
|
+
|
|
1063
970
|
/**
|
|
1064
971
|
* Check whether the selection is mergeable.
|
|
1065
972
|
*
|
|
@@ -1068,29 +975,29 @@ function __unstableSelectionHasUnmergeableBlock(state) {
|
|
|
1068
975
|
*
|
|
1069
976
|
* @return {boolean} Whether the selection is mergeable.
|
|
1070
977
|
*/
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
978
|
function __unstableIsSelectionMergeable(state, isForward) {
|
|
1074
979
|
const selectionAnchor = getSelectionStart(state);
|
|
1075
|
-
const selectionFocus = getSelectionEnd(state);
|
|
980
|
+
const selectionFocus = getSelectionEnd(state);
|
|
1076
981
|
|
|
1077
|
-
|
|
982
|
+
// It's not mergeable if the start and end are within the same block.
|
|
983
|
+
if (selectionAnchor.clientId === selectionFocus.clientId) return false;
|
|
1078
984
|
|
|
985
|
+
// It's not mergeable if there's no rich text selection.
|
|
1079
986
|
if (!selectionAnchor.attributeKey || !selectionFocus.attributeKey || typeof selectionAnchor.offset === 'undefined' || typeof selectionFocus.offset === 'undefined') return false;
|
|
1080
987
|
const anchorRootClientId = getBlockRootClientId(state, selectionAnchor.clientId);
|
|
1081
|
-
const focusRootClientId = getBlockRootClientId(state, selectionFocus.clientId);
|
|
1082
|
-
// block list. Maybe in the future it should be allowed.
|
|
988
|
+
const focusRootClientId = getBlockRootClientId(state, selectionFocus.clientId);
|
|
1083
989
|
|
|
990
|
+
// It's not mergeable if the selection doesn't start and end in the same
|
|
991
|
+
// block list. Maybe in the future it should be allowed.
|
|
1084
992
|
if (anchorRootClientId !== focusRootClientId) {
|
|
1085
993
|
return false;
|
|
1086
994
|
}
|
|
1087
|
-
|
|
1088
995
|
const blockOrder = getBlockOrder(state, anchorRootClientId);
|
|
1089
996
|
const anchorIndex = blockOrder.indexOf(selectionAnchor.clientId);
|
|
1090
|
-
const focusIndex = blockOrder.indexOf(selectionFocus.clientId);
|
|
997
|
+
const focusIndex = blockOrder.indexOf(selectionFocus.clientId);
|
|
1091
998
|
|
|
999
|
+
// Reassign selection start and end based on order.
|
|
1092
1000
|
let selectionStart, selectionEnd;
|
|
1093
|
-
|
|
1094
1001
|
if (anchorIndex > focusIndex) {
|
|
1095
1002
|
selectionStart = selectionFocus;
|
|
1096
1003
|
selectionEnd = selectionAnchor;
|
|
@@ -1098,20 +1005,22 @@ function __unstableIsSelectionMergeable(state, isForward) {
|
|
|
1098
1005
|
selectionStart = selectionAnchor;
|
|
1099
1006
|
selectionEnd = selectionFocus;
|
|
1100
1007
|
}
|
|
1101
|
-
|
|
1102
1008
|
const targetBlockClientId = isForward ? selectionEnd.clientId : selectionStart.clientId;
|
|
1103
1009
|
const blockToMergeClientId = isForward ? selectionStart.clientId : selectionEnd.clientId;
|
|
1104
1010
|
const targetBlockName = getBlockName(state, targetBlockClientId);
|
|
1105
1011
|
const targetBlockType = (0, _blocks.getBlockType)(targetBlockName);
|
|
1106
1012
|
if (!targetBlockType.merge) return false;
|
|
1107
|
-
const blockToMerge = getBlock(state, blockToMergeClientId);
|
|
1013
|
+
const blockToMerge = getBlock(state, blockToMergeClientId);
|
|
1108
1014
|
|
|
1109
|
-
|
|
1110
|
-
|
|
1015
|
+
// It's mergeable if the blocks are of the same type.
|
|
1016
|
+
if (blockToMerge.name === targetBlockName) return true;
|
|
1111
1017
|
|
|
1018
|
+
// If the blocks are of a different type, try to transform the block being
|
|
1019
|
+
// merged into the same type of block.
|
|
1112
1020
|
const blocksToMerge = (0, _blocks.switchToBlockType)(blockToMerge, targetBlockName);
|
|
1113
1021
|
return blocksToMerge && blocksToMerge.length;
|
|
1114
1022
|
}
|
|
1023
|
+
|
|
1115
1024
|
/**
|
|
1116
1025
|
* Get partial selected blocks with their content updated
|
|
1117
1026
|
* based on the selection.
|
|
@@ -1120,33 +1029,30 @@ function __unstableIsSelectionMergeable(state, isForward) {
|
|
|
1120
1029
|
*
|
|
1121
1030
|
* @return {Object[]} Updated partial selected blocks.
|
|
1122
1031
|
*/
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
1032
|
const __unstableGetSelectedBlocksWithPartialSelection = state => {
|
|
1126
1033
|
const selectionAnchor = getSelectionStart(state);
|
|
1127
1034
|
const selectionFocus = getSelectionEnd(state);
|
|
1128
|
-
|
|
1129
1035
|
if (selectionAnchor.clientId === selectionFocus.clientId) {
|
|
1130
1036
|
return EMPTY_ARRAY;
|
|
1131
|
-
}
|
|
1132
|
-
|
|
1037
|
+
}
|
|
1133
1038
|
|
|
1039
|
+
// Can't split if the selection is not set.
|
|
1134
1040
|
if (!selectionAnchor.attributeKey || !selectionFocus.attributeKey || typeof selectionAnchor.offset === 'undefined' || typeof selectionFocus.offset === 'undefined') {
|
|
1135
1041
|
return EMPTY_ARRAY;
|
|
1136
1042
|
}
|
|
1137
|
-
|
|
1138
1043
|
const anchorRootClientId = getBlockRootClientId(state, selectionAnchor.clientId);
|
|
1139
|
-
const focusRootClientId = getBlockRootClientId(state, selectionFocus.clientId);
|
|
1140
|
-
// block list. Maybe in the future it should be allowed.
|
|
1044
|
+
const focusRootClientId = getBlockRootClientId(state, selectionFocus.clientId);
|
|
1141
1045
|
|
|
1046
|
+
// It's not splittable if the selection doesn't start and end in the same
|
|
1047
|
+
// block list. Maybe in the future it should be allowed.
|
|
1142
1048
|
if (anchorRootClientId !== focusRootClientId) {
|
|
1143
1049
|
return EMPTY_ARRAY;
|
|
1144
1050
|
}
|
|
1145
|
-
|
|
1146
1051
|
const blockOrder = getBlockOrder(state, anchorRootClientId);
|
|
1147
1052
|
const anchorIndex = blockOrder.indexOf(selectionAnchor.clientId);
|
|
1148
|
-
const focusIndex = blockOrder.indexOf(selectionFocus.clientId);
|
|
1053
|
+
const focusIndex = blockOrder.indexOf(selectionFocus.clientId);
|
|
1149
1054
|
|
|
1055
|
+
// Reassign selection start and end based on order.
|
|
1150
1056
|
const [selectionStart, selectionEnd] = anchorIndex > focusIndex ? [selectionFocus, selectionAnchor] : [selectionAnchor, selectionFocus];
|
|
1151
1057
|
const blockA = getBlock(state, selectionStart.clientId);
|
|
1152
1058
|
const blockAType = (0, _blocks.getBlockType)(blockA.name);
|
|
@@ -1166,15 +1072,19 @@ const __unstableGetSelectedBlocksWithPartialSelection = state => {
|
|
|
1166
1072
|
});
|
|
1167
1073
|
valueA = (0, _richText.remove)(valueA, 0, selectionStart.offset);
|
|
1168
1074
|
valueB = (0, _richText.remove)(valueB, selectionEnd.offset, valueB.text.length);
|
|
1169
|
-
return [{
|
|
1170
|
-
|
|
1075
|
+
return [{
|
|
1076
|
+
...blockA,
|
|
1077
|
+
attributes: {
|
|
1078
|
+
...blockA.attributes,
|
|
1171
1079
|
[selectionStart.attributeKey]: (0, _richText.toHTMLString)({
|
|
1172
1080
|
value: valueA,
|
|
1173
1081
|
...(0, _utils.mapRichTextSettings)(attributeDefinitionA)
|
|
1174
1082
|
})
|
|
1175
1083
|
}
|
|
1176
|
-
}, {
|
|
1177
|
-
|
|
1084
|
+
}, {
|
|
1085
|
+
...blockB,
|
|
1086
|
+
attributes: {
|
|
1087
|
+
...blockB.attributes,
|
|
1178
1088
|
[selectionEnd.attributeKey]: (0, _richText.toHTMLString)({
|
|
1179
1089
|
value: valueB,
|
|
1180
1090
|
...(0, _utils.mapRichTextSettings)(attributeDefinitionB)
|
|
@@ -1182,6 +1092,7 @@ const __unstableGetSelectedBlocksWithPartialSelection = state => {
|
|
|
1182
1092
|
}
|
|
1183
1093
|
}];
|
|
1184
1094
|
};
|
|
1095
|
+
|
|
1185
1096
|
/**
|
|
1186
1097
|
* Returns an array containing all block client IDs in the editor in the order
|
|
1187
1098
|
* they appear. Optionally accepts a root client ID of the block list for which
|
|
@@ -1192,13 +1103,11 @@ const __unstableGetSelectedBlocksWithPartialSelection = state => {
|
|
|
1192
1103
|
*
|
|
1193
1104
|
* @return {Array} Ordered client IDs of editor blocks.
|
|
1194
1105
|
*/
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
1106
|
exports.__unstableGetSelectedBlocksWithPartialSelection = __unstableGetSelectedBlocksWithPartialSelection;
|
|
1198
|
-
|
|
1199
1107
|
function getBlockOrder(state, rootClientId) {
|
|
1200
1108
|
return state.blocks.order.get(rootClientId || '') || EMPTY_ARRAY;
|
|
1201
1109
|
}
|
|
1110
|
+
|
|
1202
1111
|
/**
|
|
1203
1112
|
* Returns the index at which the block corresponding to the specified client
|
|
1204
1113
|
* ID occurs within the block order, or `-1` if the block does not exist.
|
|
@@ -1208,12 +1117,11 @@ function getBlockOrder(state, rootClientId) {
|
|
|
1208
1117
|
*
|
|
1209
1118
|
* @return {number} Index at which block exists in order.
|
|
1210
1119
|
*/
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
1120
|
function getBlockIndex(state, clientId) {
|
|
1214
1121
|
const rootClientId = getBlockRootClientId(state, clientId);
|
|
1215
1122
|
return getBlockOrder(state, rootClientId).indexOf(clientId);
|
|
1216
1123
|
}
|
|
1124
|
+
|
|
1217
1125
|
/**
|
|
1218
1126
|
* Returns true if the block corresponding to the specified client ID is
|
|
1219
1127
|
* currently selected and no multi-selection exists, or false otherwise.
|
|
@@ -1223,20 +1131,17 @@ function getBlockIndex(state, clientId) {
|
|
|
1223
1131
|
*
|
|
1224
1132
|
* @return {boolean} Whether block is selected and multi-selection exists.
|
|
1225
1133
|
*/
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
1134
|
function isBlockSelected(state, clientId) {
|
|
1229
1135
|
const {
|
|
1230
1136
|
selectionStart,
|
|
1231
1137
|
selectionEnd
|
|
1232
1138
|
} = state.selection;
|
|
1233
|
-
|
|
1234
1139
|
if (selectionStart.clientId !== selectionEnd.clientId) {
|
|
1235
1140
|
return false;
|
|
1236
1141
|
}
|
|
1237
|
-
|
|
1238
1142
|
return selectionStart.clientId === clientId;
|
|
1239
1143
|
}
|
|
1144
|
+
|
|
1240
1145
|
/**
|
|
1241
1146
|
* Returns true if one of the block's inner blocks is selected.
|
|
1242
1147
|
*
|
|
@@ -1246,11 +1151,10 @@ function isBlockSelected(state, clientId) {
|
|
|
1246
1151
|
*
|
|
1247
1152
|
* @return {boolean} Whether the block has an inner block selected
|
|
1248
1153
|
*/
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
1154
|
function hasSelectedInnerBlock(state, clientId, deep = false) {
|
|
1252
1155
|
return getBlockOrder(state, clientId).some(innerClientId => isBlockSelected(state, innerClientId) || isBlockMultiSelected(state, innerClientId) || deep && hasSelectedInnerBlock(state, innerClientId, deep));
|
|
1253
1156
|
}
|
|
1157
|
+
|
|
1254
1158
|
/**
|
|
1255
1159
|
* Returns true if one of the block's inner blocks is dragged.
|
|
1256
1160
|
*
|
|
@@ -1260,11 +1164,10 @@ function hasSelectedInnerBlock(state, clientId, deep = false) {
|
|
|
1260
1164
|
*
|
|
1261
1165
|
* @return {boolean} Whether the block has an inner block dragged
|
|
1262
1166
|
*/
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
1167
|
function hasDraggedInnerBlock(state, clientId, deep = false) {
|
|
1266
1168
|
return getBlockOrder(state, clientId).some(innerClientId => isBlockBeingDragged(state, innerClientId) || deep && hasDraggedInnerBlock(state, innerClientId, deep));
|
|
1267
1169
|
}
|
|
1170
|
+
|
|
1268
1171
|
/**
|
|
1269
1172
|
* Returns true if the block corresponding to the specified client ID is
|
|
1270
1173
|
* currently selected but isn't the last of the selected blocks. Here "last"
|
|
@@ -1277,17 +1180,15 @@ function hasDraggedInnerBlock(state, clientId, deep = false) {
|
|
|
1277
1180
|
* @return {boolean} Whether block is selected and not the last in the
|
|
1278
1181
|
* selection.
|
|
1279
1182
|
*/
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
1183
|
function isBlockWithinSelection(state, clientId) {
|
|
1283
1184
|
if (!clientId) {
|
|
1284
1185
|
return false;
|
|
1285
1186
|
}
|
|
1286
|
-
|
|
1287
1187
|
const clientIds = getMultiSelectedBlockClientIds(state);
|
|
1288
1188
|
const index = clientIds.indexOf(clientId);
|
|
1289
1189
|
return index > -1 && index < clientIds.length - 1;
|
|
1290
1190
|
}
|
|
1191
|
+
|
|
1291
1192
|
/**
|
|
1292
1193
|
* Returns true if a multi-selection has been made, or false otherwise.
|
|
1293
1194
|
*
|
|
@@ -1295,8 +1196,6 @@ function isBlockWithinSelection(state, clientId) {
|
|
|
1295
1196
|
*
|
|
1296
1197
|
* @return {boolean} Whether multi-selection has been made.
|
|
1297
1198
|
*/
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
1199
|
function hasMultiSelection(state) {
|
|
1301
1200
|
const {
|
|
1302
1201
|
selectionStart,
|
|
@@ -1304,6 +1203,7 @@ function hasMultiSelection(state) {
|
|
|
1304
1203
|
} = state.selection;
|
|
1305
1204
|
return selectionStart.clientId !== selectionEnd.clientId;
|
|
1306
1205
|
}
|
|
1206
|
+
|
|
1307
1207
|
/**
|
|
1308
1208
|
* Whether in the process of multi-selecting or not. This flag is only true
|
|
1309
1209
|
* while the multi-selection is being selected (by mouse move), and is false
|
|
@@ -1315,11 +1215,10 @@ function hasMultiSelection(state) {
|
|
|
1315
1215
|
*
|
|
1316
1216
|
* @return {boolean} True if multi-selecting, false if not.
|
|
1317
1217
|
*/
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
1218
|
function isMultiSelecting(state) {
|
|
1321
1219
|
return state.isMultiSelecting;
|
|
1322
1220
|
}
|
|
1221
|
+
|
|
1323
1222
|
/**
|
|
1324
1223
|
* Selector that returns if multi-selection is enabled or not.
|
|
1325
1224
|
*
|
|
@@ -1327,11 +1226,10 @@ function isMultiSelecting(state) {
|
|
|
1327
1226
|
*
|
|
1328
1227
|
* @return {boolean} True if it should be possible to multi-select blocks, false if multi-selection is disabled.
|
|
1329
1228
|
*/
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
1229
|
function isSelectionEnabled(state) {
|
|
1333
1230
|
return state.isSelectionEnabled;
|
|
1334
1231
|
}
|
|
1232
|
+
|
|
1335
1233
|
/**
|
|
1336
1234
|
* Returns the block's editing mode, defaulting to "visual" if not explicitly
|
|
1337
1235
|
* assigned.
|
|
@@ -1341,11 +1239,10 @@ function isSelectionEnabled(state) {
|
|
|
1341
1239
|
*
|
|
1342
1240
|
* @return {Object} Block editing mode.
|
|
1343
1241
|
*/
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
1242
|
function getBlockMode(state, clientId) {
|
|
1347
1243
|
return state.blocksMode[clientId] || 'visual';
|
|
1348
1244
|
}
|
|
1245
|
+
|
|
1349
1246
|
/**
|
|
1350
1247
|
* Returns true if the user is typing, or false otherwise.
|
|
1351
1248
|
*
|
|
@@ -1353,11 +1250,10 @@ function getBlockMode(state, clientId) {
|
|
|
1353
1250
|
*
|
|
1354
1251
|
* @return {boolean} Whether user is typing.
|
|
1355
1252
|
*/
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
1253
|
function isTyping(state) {
|
|
1359
1254
|
return state.isTyping;
|
|
1360
1255
|
}
|
|
1256
|
+
|
|
1361
1257
|
/**
|
|
1362
1258
|
* Returns true if the user is dragging blocks, or false otherwise.
|
|
1363
1259
|
*
|
|
@@ -1365,11 +1261,10 @@ function isTyping(state) {
|
|
|
1365
1261
|
*
|
|
1366
1262
|
* @return {boolean} Whether user is dragging blocks.
|
|
1367
1263
|
*/
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
1264
|
function isDraggingBlocks(state) {
|
|
1371
1265
|
return !!state.draggedBlocks.length;
|
|
1372
1266
|
}
|
|
1267
|
+
|
|
1373
1268
|
/**
|
|
1374
1269
|
* Returns the client ids of any blocks being directly dragged.
|
|
1375
1270
|
*
|
|
@@ -1379,11 +1274,10 @@ function isDraggingBlocks(state) {
|
|
|
1379
1274
|
*
|
|
1380
1275
|
* @return {string[]} Array of dragged block client ids.
|
|
1381
1276
|
*/
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
1277
|
function getDraggedBlockClientIds(state) {
|
|
1385
1278
|
return state.draggedBlocks;
|
|
1386
1279
|
}
|
|
1280
|
+
|
|
1387
1281
|
/**
|
|
1388
1282
|
* Returns whether the block is being dragged.
|
|
1389
1283
|
*
|
|
@@ -1396,11 +1290,10 @@ function getDraggedBlockClientIds(state) {
|
|
|
1396
1290
|
*
|
|
1397
1291
|
* @return {boolean} Whether the block is being dragged.
|
|
1398
1292
|
*/
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
1293
|
function isBlockBeingDragged(state, clientId) {
|
|
1402
1294
|
return state.draggedBlocks.includes(clientId);
|
|
1403
1295
|
}
|
|
1296
|
+
|
|
1404
1297
|
/**
|
|
1405
1298
|
* Returns whether a parent/ancestor of the block is being dragged.
|
|
1406
1299
|
*
|
|
@@ -1409,18 +1302,16 @@ function isBlockBeingDragged(state, clientId) {
|
|
|
1409
1302
|
*
|
|
1410
1303
|
* @return {boolean} Whether the block's ancestor is being dragged.
|
|
1411
1304
|
*/
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
1305
|
function isAncestorBeingDragged(state, clientId) {
|
|
1415
1306
|
// Return early if no blocks are being dragged rather than
|
|
1416
1307
|
// the more expensive check for parents.
|
|
1417
1308
|
if (!isDraggingBlocks(state)) {
|
|
1418
1309
|
return false;
|
|
1419
1310
|
}
|
|
1420
|
-
|
|
1421
1311
|
const parents = getBlockParents(state, clientId);
|
|
1422
1312
|
return parents.some(parentClientId => isBlockBeingDragged(state, parentClientId));
|
|
1423
1313
|
}
|
|
1314
|
+
|
|
1424
1315
|
/**
|
|
1425
1316
|
* Returns true if the caret is within formatted text, or false otherwise.
|
|
1426
1317
|
*
|
|
@@ -1428,8 +1319,6 @@ function isAncestorBeingDragged(state, clientId) {
|
|
|
1428
1319
|
*
|
|
1429
1320
|
* @return {boolean} Whether the caret is within formatted text.
|
|
1430
1321
|
*/
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
1322
|
function isCaretWithinFormattedText() {
|
|
1434
1323
|
(0, _deprecated.default)('wp.data.select( "core/block-editor" ).isCaretWithinFormattedText', {
|
|
1435
1324
|
since: '6.1',
|
|
@@ -1437,6 +1326,7 @@ function isCaretWithinFormattedText() {
|
|
|
1437
1326
|
});
|
|
1438
1327
|
return false;
|
|
1439
1328
|
}
|
|
1329
|
+
|
|
1440
1330
|
/**
|
|
1441
1331
|
* Returns the insertion point, the index at which the new inserted block would
|
|
1442
1332
|
* be placed. Defaults to the last index.
|
|
@@ -1445,8 +1335,6 @@ function isCaretWithinFormattedText() {
|
|
|
1445
1335
|
*
|
|
1446
1336
|
* @return {Object} Insertion point object with `rootClientId`, `index`.
|
|
1447
1337
|
*/
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
1338
|
const getBlockInsertionPoint = (0, _rememo.default)(state => {
|
|
1451
1339
|
let rootClientId, index;
|
|
1452
1340
|
const {
|
|
@@ -1455,27 +1343,24 @@ const getBlockInsertionPoint = (0, _rememo.default)(state => {
|
|
|
1455
1343
|
selectionEnd
|
|
1456
1344
|
}
|
|
1457
1345
|
} = state;
|
|
1458
|
-
|
|
1459
1346
|
if (insertionPoint !== null) {
|
|
1460
1347
|
return insertionPoint;
|
|
1461
1348
|
}
|
|
1462
|
-
|
|
1463
1349
|
const {
|
|
1464
1350
|
clientId
|
|
1465
1351
|
} = selectionEnd;
|
|
1466
|
-
|
|
1467
1352
|
if (clientId) {
|
|
1468
1353
|
rootClientId = getBlockRootClientId(state, clientId) || undefined;
|
|
1469
1354
|
index = getBlockIndex(state, selectionEnd.clientId) + 1;
|
|
1470
1355
|
} else {
|
|
1471
1356
|
index = getBlockOrder(state).length;
|
|
1472
1357
|
}
|
|
1473
|
-
|
|
1474
1358
|
return {
|
|
1475
1359
|
rootClientId,
|
|
1476
1360
|
index
|
|
1477
1361
|
};
|
|
1478
1362
|
}, state => [state.insertionPoint, state.selection.selectionEnd.clientId, state.blocks.parents, state.blocks.order]);
|
|
1363
|
+
|
|
1479
1364
|
/**
|
|
1480
1365
|
* Returns true if we should show the block insertion point.
|
|
1481
1366
|
*
|
|
@@ -1483,23 +1368,21 @@ const getBlockInsertionPoint = (0, _rememo.default)(state => {
|
|
|
1483
1368
|
*
|
|
1484
1369
|
* @return {?boolean} Whether the insertion point is visible or not.
|
|
1485
1370
|
*/
|
|
1486
|
-
|
|
1487
1371
|
exports.getBlockInsertionPoint = getBlockInsertionPoint;
|
|
1488
|
-
|
|
1489
1372
|
function isBlockInsertionPointVisible(state) {
|
|
1490
1373
|
return state.insertionPoint !== null;
|
|
1491
1374
|
}
|
|
1375
|
+
|
|
1492
1376
|
/**
|
|
1493
1377
|
* Returns whether the blocks matches the template or not.
|
|
1494
1378
|
*
|
|
1495
1379
|
* @param {boolean} state
|
|
1496
1380
|
* @return {?boolean} Whether the template is valid or not.
|
|
1497
1381
|
*/
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
1382
|
function isValidTemplate(state) {
|
|
1501
1383
|
return state.template.isValid;
|
|
1502
1384
|
}
|
|
1385
|
+
|
|
1503
1386
|
/**
|
|
1504
1387
|
* Returns the defined block template
|
|
1505
1388
|
*
|
|
@@ -1507,11 +1390,10 @@ function isValidTemplate(state) {
|
|
|
1507
1390
|
*
|
|
1508
1391
|
* @return {?Array} Block Template.
|
|
1509
1392
|
*/
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
1393
|
function getTemplate(state) {
|
|
1513
1394
|
return state.settings.template;
|
|
1514
1395
|
}
|
|
1396
|
+
|
|
1515
1397
|
/**
|
|
1516
1398
|
* Returns the defined block template lock. Optionally accepts a root block
|
|
1517
1399
|
* client ID as context, otherwise defaulting to the global context.
|
|
@@ -1521,25 +1403,18 @@ function getTemplate(state) {
|
|
|
1521
1403
|
*
|
|
1522
1404
|
* @return {string|false} Block Template Lock
|
|
1523
1405
|
*/
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
1406
|
function getTemplateLock(state, rootClientId) {
|
|
1527
1407
|
var _getBlockListSettings;
|
|
1528
|
-
|
|
1529
1408
|
if (!rootClientId) {
|
|
1530
1409
|
var _state$settings$templ;
|
|
1531
|
-
|
|
1532
1410
|
return (_state$settings$templ = state.settings.templateLock) !== null && _state$settings$templ !== void 0 ? _state$settings$templ : false;
|
|
1533
1411
|
}
|
|
1534
|
-
|
|
1535
1412
|
return (_getBlockListSettings = getBlockListSettings(state, rootClientId)?.templateLock) !== null && _getBlockListSettings !== void 0 ? _getBlockListSettings : false;
|
|
1536
1413
|
}
|
|
1537
|
-
|
|
1538
1414
|
const checkAllowList = (list, item, defaultResult = null) => {
|
|
1539
1415
|
if (typeof list === 'boolean') {
|
|
1540
1416
|
return list;
|
|
1541
1417
|
}
|
|
1542
|
-
|
|
1543
1418
|
if (Array.isArray(list)) {
|
|
1544
1419
|
// TODO: when there is a canonical way to detect that we are editing a post
|
|
1545
1420
|
// the following check should be changed to something like:
|
|
@@ -1547,12 +1422,11 @@ const checkAllowList = (list, item, defaultResult = null) => {
|
|
|
1547
1422
|
if (list.includes('core/post-content') && item === null) {
|
|
1548
1423
|
return true;
|
|
1549
1424
|
}
|
|
1550
|
-
|
|
1551
1425
|
return list.includes(item);
|
|
1552
1426
|
}
|
|
1553
|
-
|
|
1554
1427
|
return defaultResult;
|
|
1555
1428
|
};
|
|
1429
|
+
|
|
1556
1430
|
/**
|
|
1557
1431
|
* Determines if the given block type is allowed to be inserted into the block list.
|
|
1558
1432
|
* This function is not exported and not memoized because using a memoized selector
|
|
@@ -1566,48 +1440,38 @@ const checkAllowList = (list, item, defaultResult = null) => {
|
|
|
1566
1440
|
*
|
|
1567
1441
|
* @return {boolean} Whether the given block type is allowed to be inserted.
|
|
1568
1442
|
*/
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
1443
|
const canInsertBlockTypeUnmemoized = (state, blockName, rootClientId = null) => {
|
|
1572
1444
|
let blockType;
|
|
1573
|
-
|
|
1574
1445
|
if (blockName && 'object' === typeof blockName) {
|
|
1575
1446
|
blockType = blockName;
|
|
1576
1447
|
blockName = blockType.name;
|
|
1577
1448
|
} else {
|
|
1578
1449
|
blockType = (0, _blocks.getBlockType)(blockName);
|
|
1579
1450
|
}
|
|
1580
|
-
|
|
1581
1451
|
if (!blockType) {
|
|
1582
1452
|
return false;
|
|
1583
1453
|
}
|
|
1584
|
-
|
|
1585
1454
|
const {
|
|
1586
1455
|
allowedBlockTypes
|
|
1587
1456
|
} = getSettings(state);
|
|
1588
1457
|
const isBlockAllowedInEditor = checkAllowList(allowedBlockTypes, blockName, true);
|
|
1589
|
-
|
|
1590
1458
|
if (!isBlockAllowedInEditor) {
|
|
1591
1459
|
return false;
|
|
1592
1460
|
}
|
|
1593
|
-
|
|
1594
1461
|
const isLocked = !!getTemplateLock(state, rootClientId);
|
|
1595
|
-
|
|
1596
1462
|
if (isLocked) {
|
|
1597
1463
|
return false;
|
|
1598
1464
|
}
|
|
1599
|
-
|
|
1600
|
-
if ((0, _privateSelectors.getBlockEditingMode)(state, rootClientId !== null && rootClientId !== void 0 ? rootClientId : '') === 'disabled') {
|
|
1465
|
+
if (getBlockEditingMode(state, rootClientId !== null && rootClientId !== void 0 ? rootClientId : '') === 'disabled') {
|
|
1601
1466
|
return false;
|
|
1602
1467
|
}
|
|
1468
|
+
const parentBlockListSettings = getBlockListSettings(state, rootClientId);
|
|
1603
1469
|
|
|
1604
|
-
|
|
1470
|
+
// The parent block doesn't have settings indicating it doesn't support
|
|
1605
1471
|
// inner blocks, return false.
|
|
1606
|
-
|
|
1607
1472
|
if (rootClientId && parentBlockListSettings === undefined) {
|
|
1608
1473
|
return false;
|
|
1609
1474
|
}
|
|
1610
|
-
|
|
1611
1475
|
const parentAllowedBlocks = parentBlockListSettings?.allowedBlocks;
|
|
1612
1476
|
const hasParentAllowedBlock = checkAllowList(parentAllowedBlocks, blockName);
|
|
1613
1477
|
const blockAllowedParentBlocks = blockType.parent;
|
|
@@ -1615,17 +1479,15 @@ const canInsertBlockTypeUnmemoized = (state, blockName, rootClientId = null) =>
|
|
|
1615
1479
|
const hasBlockAllowedParent = checkAllowList(blockAllowedParentBlocks, parentName);
|
|
1616
1480
|
let hasBlockAllowedAncestor = true;
|
|
1617
1481
|
const blockAllowedAncestorBlocks = blockType.ancestor;
|
|
1618
|
-
|
|
1619
1482
|
if (blockAllowedAncestorBlocks) {
|
|
1620
1483
|
const ancestors = [rootClientId, ...getBlockParents(state, rootClientId)];
|
|
1621
1484
|
hasBlockAllowedAncestor = ancestors.some(ancestorClientId => checkAllowList(blockAllowedAncestorBlocks, getBlockName(state, ancestorClientId)));
|
|
1622
1485
|
}
|
|
1623
|
-
|
|
1624
1486
|
const canInsert = hasBlockAllowedAncestor && (hasParentAllowedBlock === null && hasBlockAllowedParent === null || hasParentAllowedBlock === true || hasBlockAllowedParent === true);
|
|
1625
|
-
|
|
1626
1487
|
if (!canInsert) {
|
|
1627
1488
|
return canInsert;
|
|
1628
1489
|
}
|
|
1490
|
+
|
|
1629
1491
|
/**
|
|
1630
1492
|
* This filter is an ad-hoc solution to prevent adding template parts inside post content.
|
|
1631
1493
|
* Conceptually, having a filter inside a selector is bad pattern so this code will be
|
|
@@ -1638,8 +1500,6 @@ const canInsertBlockTypeUnmemoized = (state, blockName, rootClientId = null) =>
|
|
|
1638
1500
|
* Filters are global: Once they're defined, they will affect all editor instances and all registries.
|
|
1639
1501
|
* An ideal API would only affect specific editor instances.
|
|
1640
1502
|
*/
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
1503
|
return (0, _hooks.applyFilters)('blockEditor.__unstableCanInsertBlockType', canInsert, blockType, rootClientId, {
|
|
1644
1504
|
// Pass bound selectors of the current registry. If we're in a nested
|
|
1645
1505
|
// context, the data will differ from the one selected from the root
|
|
@@ -1648,6 +1508,7 @@ const canInsertBlockTypeUnmemoized = (state, blockName, rootClientId = null) =>
|
|
|
1648
1508
|
getBlockParentsByBlockName: getBlockParentsByBlockName.bind(null, state)
|
|
1649
1509
|
});
|
|
1650
1510
|
};
|
|
1511
|
+
|
|
1651
1512
|
/**
|
|
1652
1513
|
* Determines if the given block type is allowed to be inserted into the block list.
|
|
1653
1514
|
*
|
|
@@ -1657,9 +1518,8 @@ const canInsertBlockTypeUnmemoized = (state, blockName, rootClientId = null) =>
|
|
|
1657
1518
|
*
|
|
1658
1519
|
* @return {boolean} Whether the given block type is allowed to be inserted.
|
|
1659
1520
|
*/
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
1521
|
const canInsertBlockType = (0, _rememo.default)(canInsertBlockTypeUnmemoized, (state, blockName, rootClientId) => [state.blockListSettings[rootClientId], state.blocks.byClientId.get(rootClientId), state.settings.allowedBlockTypes, state.settings.templateLock, state.blockEditingModes]);
|
|
1522
|
+
|
|
1663
1523
|
/**
|
|
1664
1524
|
* Determines if the given blocks are allowed to be inserted into the block
|
|
1665
1525
|
* list.
|
|
@@ -1670,12 +1530,11 @@ const canInsertBlockType = (0, _rememo.default)(canInsertBlockTypeUnmemoized, (s
|
|
|
1670
1530
|
*
|
|
1671
1531
|
* @return {boolean} Whether the given blocks are allowed to be inserted.
|
|
1672
1532
|
*/
|
|
1673
|
-
|
|
1674
1533
|
exports.canInsertBlockType = canInsertBlockType;
|
|
1675
|
-
|
|
1676
1534
|
function canInsertBlocks(state, clientIds, rootClientId = null) {
|
|
1677
1535
|
return clientIds.every(id => canInsertBlockType(state, getBlockName(state, id), rootClientId));
|
|
1678
1536
|
}
|
|
1537
|
+
|
|
1679
1538
|
/**
|
|
1680
1539
|
* Determines if the given block is allowed to be deleted.
|
|
1681
1540
|
*
|
|
@@ -1685,25 +1544,20 @@ function canInsertBlocks(state, clientIds, rootClientId = null) {
|
|
|
1685
1544
|
*
|
|
1686
1545
|
* @return {boolean} Whether the given block is allowed to be removed.
|
|
1687
1546
|
*/
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
1547
|
function canRemoveBlock(state, clientId, rootClientId = null) {
|
|
1691
1548
|
const attributes = getBlockAttributes(state, clientId);
|
|
1692
|
-
|
|
1693
1549
|
if (attributes === null) {
|
|
1694
1550
|
return true;
|
|
1695
1551
|
}
|
|
1696
|
-
|
|
1697
1552
|
if (attributes.lock?.remove !== undefined) {
|
|
1698
1553
|
return !attributes.lock.remove;
|
|
1699
1554
|
}
|
|
1700
|
-
|
|
1701
1555
|
if (getTemplateLock(state, rootClientId)) {
|
|
1702
1556
|
return false;
|
|
1703
1557
|
}
|
|
1704
|
-
|
|
1705
|
-
return (0, _privateSelectors.getBlockEditingMode)(state, rootClientId) !== 'disabled';
|
|
1558
|
+
return getBlockEditingMode(state, rootClientId) !== 'disabled';
|
|
1706
1559
|
}
|
|
1560
|
+
|
|
1707
1561
|
/**
|
|
1708
1562
|
* Determines if the given blocks are allowed to be removed.
|
|
1709
1563
|
*
|
|
@@ -1713,11 +1567,10 @@ function canRemoveBlock(state, clientId, rootClientId = null) {
|
|
|
1713
1567
|
*
|
|
1714
1568
|
* @return {boolean} Whether the given blocks are allowed to be removed.
|
|
1715
1569
|
*/
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
1570
|
function canRemoveBlocks(state, clientIds, rootClientId = null) {
|
|
1719
1571
|
return clientIds.every(clientId => canRemoveBlock(state, clientId, rootClientId));
|
|
1720
1572
|
}
|
|
1573
|
+
|
|
1721
1574
|
/**
|
|
1722
1575
|
* Determines if the given block is allowed to be moved.
|
|
1723
1576
|
*
|
|
@@ -1727,25 +1580,20 @@ function canRemoveBlocks(state, clientIds, rootClientId = null) {
|
|
|
1727
1580
|
*
|
|
1728
1581
|
* @return {boolean | undefined} Whether the given block is allowed to be moved.
|
|
1729
1582
|
*/
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
1583
|
function canMoveBlock(state, clientId, rootClientId = null) {
|
|
1733
1584
|
const attributes = getBlockAttributes(state, clientId);
|
|
1734
|
-
|
|
1735
1585
|
if (attributes === null) {
|
|
1736
1586
|
return true;
|
|
1737
1587
|
}
|
|
1738
|
-
|
|
1739
1588
|
if (attributes.lock?.move !== undefined) {
|
|
1740
1589
|
return !attributes.lock.move;
|
|
1741
1590
|
}
|
|
1742
|
-
|
|
1743
1591
|
if (getTemplateLock(state, rootClientId) === 'all') {
|
|
1744
1592
|
return false;
|
|
1745
1593
|
}
|
|
1746
|
-
|
|
1747
|
-
return (0, _privateSelectors.getBlockEditingMode)(state, rootClientId) !== 'disabled';
|
|
1594
|
+
return getBlockEditingMode(state, rootClientId) !== 'disabled';
|
|
1748
1595
|
}
|
|
1596
|
+
|
|
1749
1597
|
/**
|
|
1750
1598
|
* Determines if the given blocks are allowed to be moved.
|
|
1751
1599
|
*
|
|
@@ -1755,11 +1603,10 @@ function canMoveBlock(state, clientId, rootClientId = null) {
|
|
|
1755
1603
|
*
|
|
1756
1604
|
* @return {boolean} Whether the given blocks are allowed to be moved.
|
|
1757
1605
|
*/
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
1606
|
function canMoveBlocks(state, clientIds, rootClientId = null) {
|
|
1761
1607
|
return clientIds.every(clientId => canMoveBlock(state, clientId, rootClientId));
|
|
1762
1608
|
}
|
|
1609
|
+
|
|
1763
1610
|
/**
|
|
1764
1611
|
* Determines if the given block is allowed to be edited.
|
|
1765
1612
|
*
|
|
@@ -1768,21 +1615,19 @@ function canMoveBlocks(state, clientIds, rootClientId = null) {
|
|
|
1768
1615
|
*
|
|
1769
1616
|
* @return {boolean} Whether the given block is allowed to be edited.
|
|
1770
1617
|
*/
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
1618
|
function canEditBlock(state, clientId) {
|
|
1774
1619
|
const attributes = getBlockAttributes(state, clientId);
|
|
1775
|
-
|
|
1776
1620
|
if (attributes === null) {
|
|
1777
1621
|
return true;
|
|
1778
1622
|
}
|
|
1779
|
-
|
|
1780
1623
|
const {
|
|
1781
1624
|
lock
|
|
1782
|
-
} = attributes;
|
|
1625
|
+
} = attributes;
|
|
1783
1626
|
|
|
1627
|
+
// When the edit is true, we cannot edit the block.
|
|
1784
1628
|
return !lock?.edit;
|
|
1785
1629
|
}
|
|
1630
|
+
|
|
1786
1631
|
/**
|
|
1787
1632
|
* Determines if the given block type can be locked/unlocked by a user.
|
|
1788
1633
|
*
|
|
@@ -1791,16 +1636,15 @@ function canEditBlock(state, clientId) {
|
|
|
1791
1636
|
*
|
|
1792
1637
|
* @return {boolean} Whether a given block type can be locked/unlocked.
|
|
1793
1638
|
*/
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
1639
|
function canLockBlockType(state, nameOrType) {
|
|
1797
1640
|
if (!(0, _blocks.hasBlockSupport)(nameOrType, 'lock', true)) {
|
|
1798
1641
|
return false;
|
|
1799
|
-
}
|
|
1800
|
-
|
|
1642
|
+
}
|
|
1801
1643
|
|
|
1644
|
+
// Use block editor settings as the default value.
|
|
1802
1645
|
return !!state.settings?.canLockBlocks;
|
|
1803
1646
|
}
|
|
1647
|
+
|
|
1804
1648
|
/**
|
|
1805
1649
|
* Returns information about how recently and frequently a block has been inserted.
|
|
1806
1650
|
*
|
|
@@ -1811,13 +1655,11 @@ function canLockBlockType(state, nameOrType) {
|
|
|
1811
1655
|
* insert occurred as a UNIX epoch, and `count` which is
|
|
1812
1656
|
* the number of inserts that have occurred.
|
|
1813
1657
|
*/
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
1658
|
function getInsertUsage(state, id) {
|
|
1817
1659
|
var _state$preferences$in;
|
|
1818
|
-
|
|
1819
1660
|
return (_state$preferences$in = state.preferences.insertUsage?.[id]) !== null && _state$preferences$in !== void 0 ? _state$preferences$in : null;
|
|
1820
1661
|
}
|
|
1662
|
+
|
|
1821
1663
|
/**
|
|
1822
1664
|
* Returns whether we can show a block type in the inserter
|
|
1823
1665
|
*
|
|
@@ -1827,15 +1669,13 @@ function getInsertUsage(state, id) {
|
|
|
1827
1669
|
*
|
|
1828
1670
|
* @return {boolean} Whether the given block type is allowed to be shown in the inserter.
|
|
1829
1671
|
*/
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
1672
|
const canIncludeBlockTypeInInserter = (state, blockType, rootClientId) => {
|
|
1833
1673
|
if (!(0, _blocks.hasBlockSupport)(blockType, 'inserter', true)) {
|
|
1834
1674
|
return false;
|
|
1835
1675
|
}
|
|
1836
|
-
|
|
1837
1676
|
return canInsertBlockTypeUnmemoized(state, blockType.name, rootClientId);
|
|
1838
1677
|
};
|
|
1678
|
+
|
|
1839
1679
|
/**
|
|
1840
1680
|
* Return a function to be used to tranform a block variation to an inserter item
|
|
1841
1681
|
*
|
|
@@ -1843,15 +1683,14 @@ const canIncludeBlockTypeInInserter = (state, blockType, rootClientId) => {
|
|
|
1843
1683
|
* @param {Object} item Denormalized inserter item
|
|
1844
1684
|
* @return {Function} Function to transform a block variation to inserter item
|
|
1845
1685
|
*/
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
1686
|
const getItemFromVariation = (state, item) => variation => {
|
|
1849
1687
|
const variationId = `${item.id}/${variation.name}`;
|
|
1850
1688
|
const {
|
|
1851
1689
|
time,
|
|
1852
1690
|
count = 0
|
|
1853
1691
|
} = getInsertUsage(state, variationId) || {};
|
|
1854
|
-
return {
|
|
1692
|
+
return {
|
|
1693
|
+
...item,
|
|
1855
1694
|
id: variationId,
|
|
1856
1695
|
icon: variation.icon || item.icon,
|
|
1857
1696
|
title: variation.title || item.title,
|
|
@@ -1859,7 +1698,8 @@ const getItemFromVariation = (state, item) => variation => {
|
|
|
1859
1698
|
category: variation.category || item.category,
|
|
1860
1699
|
// If `example` is explicitly undefined for the variation, the preview will not be shown.
|
|
1861
1700
|
example: variation.hasOwnProperty('example') ? variation.example : item.example,
|
|
1862
|
-
initialAttributes: {
|
|
1701
|
+
initialAttributes: {
|
|
1702
|
+
...item.initialAttributes,
|
|
1863
1703
|
...variation.attributes
|
|
1864
1704
|
},
|
|
1865
1705
|
innerBlocks: variation.innerBlocks,
|
|
@@ -1867,6 +1707,7 @@ const getItemFromVariation = (state, item) => variation => {
|
|
|
1867
1707
|
frecency: calculateFrecency(time, count)
|
|
1868
1708
|
};
|
|
1869
1709
|
};
|
|
1710
|
+
|
|
1870
1711
|
/**
|
|
1871
1712
|
* Returns the calculated frecency.
|
|
1872
1713
|
*
|
|
@@ -1878,31 +1719,25 @@ const getItemFromVariation = (state, item) => variation => {
|
|
|
1878
1719
|
*
|
|
1879
1720
|
* @return {number} The calculated frecency.
|
|
1880
1721
|
*/
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
1722
|
const calculateFrecency = (time, count) => {
|
|
1884
1723
|
if (!time) {
|
|
1885
1724
|
return count;
|
|
1886
|
-
}
|
|
1725
|
+
}
|
|
1726
|
+
// The selector is cached, which means Date.now() is the last time that the
|
|
1887
1727
|
// relevant state changed. This suits our needs.
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
1728
|
const duration = Date.now() - time;
|
|
1891
|
-
|
|
1892
1729
|
switch (true) {
|
|
1893
1730
|
case duration < MILLISECONDS_PER_HOUR:
|
|
1894
1731
|
return count * 4;
|
|
1895
|
-
|
|
1896
1732
|
case duration < MILLISECONDS_PER_DAY:
|
|
1897
1733
|
return count * 2;
|
|
1898
|
-
|
|
1899
1734
|
case duration < MILLISECONDS_PER_WEEK:
|
|
1900
1735
|
return count / 2;
|
|
1901
|
-
|
|
1902
1736
|
default:
|
|
1903
1737
|
return count / 4;
|
|
1904
1738
|
}
|
|
1905
1739
|
};
|
|
1740
|
+
|
|
1906
1741
|
/**
|
|
1907
1742
|
* Returns a function that accepts a block type and builds an item to be shown
|
|
1908
1743
|
* in a specific context. It's used for building items for Inserter and available
|
|
@@ -1913,20 +1748,16 @@ const calculateFrecency = (time, count) => {
|
|
|
1913
1748
|
* @param {string} options.buildScope The scope for which the item is going to be used.
|
|
1914
1749
|
* @return {Function} Function returns an item to be shown in a specific context (Inserter|Transforms list).
|
|
1915
1750
|
*/
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
1751
|
const buildBlockTypeItem = (state, {
|
|
1919
1752
|
buildScope = 'inserter'
|
|
1920
1753
|
}) => blockType => {
|
|
1921
1754
|
const id = blockType.name;
|
|
1922
1755
|
let isDisabled = false;
|
|
1923
|
-
|
|
1924
1756
|
if (!(0, _blocks.hasBlockSupport)(blockType.name, 'multiple', true)) {
|
|
1925
1757
|
isDisabled = getBlocksByClientId(state, getClientIdsWithDescendants(state)).some(({
|
|
1926
1758
|
name
|
|
1927
1759
|
}) => name === blockType.name);
|
|
1928
1760
|
}
|
|
1929
|
-
|
|
1930
1761
|
const {
|
|
1931
1762
|
time,
|
|
1932
1763
|
count = 0
|
|
@@ -1941,7 +1772,8 @@ const buildBlockTypeItem = (state, {
|
|
|
1941
1772
|
};
|
|
1942
1773
|
if (buildScope === 'transform') return blockItemBase;
|
|
1943
1774
|
const inserterVariations = (0, _blocks.getBlockVariations)(blockType.name, 'inserter');
|
|
1944
|
-
return {
|
|
1775
|
+
return {
|
|
1776
|
+
...blockItemBase,
|
|
1945
1777
|
initialAttributes: {},
|
|
1946
1778
|
description: blockType.description,
|
|
1947
1779
|
category: blockType.category,
|
|
@@ -1949,9 +1781,9 @@ const buildBlockTypeItem = (state, {
|
|
|
1949
1781
|
variations: inserterVariations,
|
|
1950
1782
|
example: blockType.example,
|
|
1951
1783
|
utility: 1 // Deprecated.
|
|
1952
|
-
|
|
1953
1784
|
};
|
|
1954
1785
|
};
|
|
1786
|
+
|
|
1955
1787
|
/**
|
|
1956
1788
|
* Determines the items that appear in the inserter. Includes both static
|
|
1957
1789
|
* items (e.g. a regular block type) and dynamic items (e.g. a reusable block).
|
|
@@ -1981,11 +1813,12 @@ const buildBlockTypeItem = (state, {
|
|
|
1981
1813
|
* this item.
|
|
1982
1814
|
* @property {number} frecency Heuristic that combines frequency and recency.
|
|
1983
1815
|
*/
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
1816
|
const getInserterItems = (0, _rememo.default)((state, rootClientId = null) => {
|
|
1987
1817
|
const buildReusableBlockInserterItem = reusableBlock => {
|
|
1988
|
-
const icon =
|
|
1818
|
+
const icon = !reusableBlock.wp_pattern_sync_status ? {
|
|
1819
|
+
src: _icons.symbol,
|
|
1820
|
+
foreground: 'var(--wp-block-synced-color)'
|
|
1821
|
+
} : _icons.symbol;
|
|
1989
1822
|
const id = `core/block/${reusableBlock.id}`;
|
|
1990
1823
|
const {
|
|
1991
1824
|
time,
|
|
@@ -2010,7 +1843,6 @@ const getInserterItems = (0, _rememo.default)((state, rootClientId = null) => {
|
|
|
2010
1843
|
syncStatus: reusableBlock.wp_pattern_sync_status
|
|
2011
1844
|
};
|
|
2012
1845
|
};
|
|
2013
|
-
|
|
2014
1846
|
const syncedPatternInserterItems = canInsertBlockTypeUnmemoized(state, 'core/block', rootClientId) ? getReusableBlocks(state).map(buildReusableBlockInserterItem) : [];
|
|
2015
1847
|
const buildBlockTypeInserterItem = buildBlockTypeItem(state, {
|
|
2016
1848
|
buildScope: 'inserter'
|
|
@@ -2019,26 +1851,25 @@ const getInserterItems = (0, _rememo.default)((state, rootClientId = null) => {
|
|
|
2019
1851
|
const items = blockTypeInserterItems.reduce((accumulator, item) => {
|
|
2020
1852
|
const {
|
|
2021
1853
|
variations = []
|
|
2022
|
-
} = item;
|
|
2023
|
-
|
|
1854
|
+
} = item;
|
|
1855
|
+
// Exclude any block type item that is to be replaced by a default variation.
|
|
2024
1856
|
if (!variations.some(({
|
|
2025
1857
|
isDefault
|
|
2026
1858
|
}) => isDefault)) {
|
|
2027
1859
|
accumulator.push(item);
|
|
2028
1860
|
}
|
|
2029
|
-
|
|
2030
1861
|
if (variations.length) {
|
|
2031
1862
|
const variationMapper = getItemFromVariation(state, item);
|
|
2032
1863
|
accumulator.push(...variations.map(variationMapper));
|
|
2033
1864
|
}
|
|
2034
|
-
|
|
2035
1865
|
return accumulator;
|
|
2036
|
-
}, []);
|
|
1866
|
+
}, []);
|
|
1867
|
+
|
|
1868
|
+
// Ensure core blocks are prioritized in the returned results,
|
|
2037
1869
|
// because third party blocks can be registered earlier than
|
|
2038
1870
|
// the core blocks (usually by using the `init` action),
|
|
2039
1871
|
// thus affecting the display order.
|
|
2040
1872
|
// We don't sort reusable blocks as they are handled differently.
|
|
2041
|
-
|
|
2042
1873
|
const groupByType = (blocks, block) => {
|
|
2043
1874
|
const {
|
|
2044
1875
|
core,
|
|
@@ -2048,7 +1879,6 @@ const getInserterItems = (0, _rememo.default)((state, rootClientId = null) => {
|
|
|
2048
1879
|
type.push(block);
|
|
2049
1880
|
return blocks;
|
|
2050
1881
|
};
|
|
2051
|
-
|
|
2052
1882
|
const {
|
|
2053
1883
|
core: coreItems,
|
|
2054
1884
|
noncore: nonCoreItems
|
|
@@ -2059,6 +1889,7 @@ const getInserterItems = (0, _rememo.default)((state, rootClientId = null) => {
|
|
|
2059
1889
|
const sortedBlockTypes = [...coreItems, ...nonCoreItems];
|
|
2060
1890
|
return [...sortedBlockTypes, ...syncedPatternInserterItems];
|
|
2061
1891
|
}, (state, rootClientId) => [state.blockListSettings[rootClientId], state.blocks.byClientId, state.blocks.order, state.preferences.insertUsage, state.settings.allowedBlockTypes, state.settings.templateLock, getReusableBlocks(state), (0, _blocks.getBlockTypes)()]);
|
|
1892
|
+
|
|
2062
1893
|
/**
|
|
2063
1894
|
* Determines the items that appear in the available block transforms list.
|
|
2064
1895
|
*
|
|
@@ -2085,7 +1916,6 @@ const getInserterItems = (0, _rememo.default)((state, rootClientId = null) => {
|
|
|
2085
1916
|
* this item.
|
|
2086
1917
|
* @property {number} frecency Heuristic that combines frequency and recency.
|
|
2087
1918
|
*/
|
|
2088
|
-
|
|
2089
1919
|
exports.getInserterItems = getInserterItems;
|
|
2090
1920
|
const getBlockTransformItems = (0, _rememo.default)((state, blocks, rootClientId = null) => {
|
|
2091
1921
|
const normalizedBlocks = Array.isArray(blocks) ? blocks : [blocks];
|
|
@@ -2098,11 +1928,11 @@ const getBlockTransformItems = (0, _rememo.default)((state, blocks, rootClientId
|
|
|
2098
1928
|
if (itemsByName[block?.name]) {
|
|
2099
1929
|
accumulator.push(itemsByName[block.name]);
|
|
2100
1930
|
}
|
|
2101
|
-
|
|
2102
1931
|
return accumulator;
|
|
2103
1932
|
}, []);
|
|
2104
1933
|
return (0, _sorting.orderBy)(possibleTransforms, block => itemsByName[block.name].frecency, 'desc');
|
|
2105
1934
|
}, (state, blocks, rootClientId) => [state.blockListSettings[rootClientId], state.blocks.byClientId, state.preferences.insertUsage, state.settings.allowedBlockTypes, state.settings.templateLock, (0, _blocks.getBlockTypes)()]);
|
|
1935
|
+
|
|
2106
1936
|
/**
|
|
2107
1937
|
* Determines whether there are items to show in the inserter.
|
|
2108
1938
|
*
|
|
@@ -2111,18 +1941,16 @@ const getBlockTransformItems = (0, _rememo.default)((state, blocks, rootClientId
|
|
|
2111
1941
|
*
|
|
2112
1942
|
* @return {boolean} Items that appear in inserter.
|
|
2113
1943
|
*/
|
|
2114
|
-
|
|
2115
1944
|
exports.getBlockTransformItems = getBlockTransformItems;
|
|
2116
1945
|
const hasInserterItems = (0, _rememo.default)((state, rootClientId = null) => {
|
|
2117
1946
|
const hasBlockType = (0, _blocks.getBlockTypes)().some(blockType => canIncludeBlockTypeInInserter(state, blockType, rootClientId));
|
|
2118
|
-
|
|
2119
1947
|
if (hasBlockType) {
|
|
2120
1948
|
return true;
|
|
2121
1949
|
}
|
|
2122
|
-
|
|
2123
1950
|
const hasReusableBlock = canInsertBlockTypeUnmemoized(state, 'core/block', rootClientId) && getReusableBlocks(state).length > 0;
|
|
2124
1951
|
return hasReusableBlock;
|
|
2125
1952
|
}, (state, rootClientId) => [state.blockListSettings[rootClientId], state.blocks.byClientId, state.settings.allowedBlockTypes, state.settings.templateLock, getReusableBlocks(state), (0, _blocks.getBlockTypes)()]);
|
|
1953
|
+
|
|
2126
1954
|
/**
|
|
2127
1955
|
* Returns the list of allowed inserter blocks for inner blocks children.
|
|
2128
1956
|
*
|
|
@@ -2131,19 +1959,16 @@ const hasInserterItems = (0, _rememo.default)((state, rootClientId = null) => {
|
|
|
2131
1959
|
*
|
|
2132
1960
|
* @return {Array?} The list of allowed block types.
|
|
2133
1961
|
*/
|
|
2134
|
-
|
|
2135
1962
|
exports.hasInserterItems = hasInserterItems;
|
|
2136
1963
|
const getAllowedBlocks = (0, _rememo.default)((state, rootClientId = null) => {
|
|
2137
1964
|
if (!rootClientId) {
|
|
2138
1965
|
return;
|
|
2139
1966
|
}
|
|
2140
|
-
|
|
2141
1967
|
const blockTypes = (0, _blocks.getBlockTypes)().filter(blockType => canIncludeBlockTypeInInserter(state, blockType, rootClientId));
|
|
2142
1968
|
const hasReusableBlock = canInsertBlockTypeUnmemoized(state, 'core/block', rootClientId) && getReusableBlocks(state).length > 0;
|
|
2143
1969
|
return [...blockTypes, ...(hasReusableBlock ? ['core/block'] : [])];
|
|
2144
1970
|
}, (state, rootClientId) => [state.blockListSettings[rootClientId], state.blocks.byClientId, state.settings.allowedBlockTypes, state.settings.templateLock, getReusableBlocks(state), (0, _blocks.getBlockTypes)()]);
|
|
2145
1971
|
exports.getAllowedBlocks = getAllowedBlocks;
|
|
2146
|
-
|
|
2147
1972
|
const __experimentalGetAllowedBlocks = (0, _rememo.default)((state, rootClientId = null) => {
|
|
2148
1973
|
(0, _deprecated.default)('wp.data.select( "core/block-editor" ).__experimentalGetAllowedBlocks', {
|
|
2149
1974
|
alternative: 'wp.data.select( "core/block-editor" ).getAllowedBlocks',
|
|
@@ -2152,6 +1977,7 @@ const __experimentalGetAllowedBlocks = (0, _rememo.default)((state, rootClientId
|
|
|
2152
1977
|
});
|
|
2153
1978
|
return getAllowedBlocks(state, rootClientId);
|
|
2154
1979
|
}, (state, rootClientId) => [...getAllowedBlocks.getDependants(state, rootClientId)]);
|
|
1980
|
+
|
|
2155
1981
|
/**
|
|
2156
1982
|
* Returns the block to be directly inserted by the block appender.
|
|
2157
1983
|
*
|
|
@@ -2165,29 +1991,22 @@ const __experimentalGetAllowedBlocks = (0, _rememo.default)((state, rootClientId
|
|
|
2165
1991
|
* @property {?Object} attributes Attributes to pass to the newly created block.
|
|
2166
1992
|
* @property {?Array<string>} attributesToCopy Attributes to be copied from adjecent blocks when inserted.
|
|
2167
1993
|
*/
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
1994
|
exports.__experimentalGetAllowedBlocks = __experimentalGetAllowedBlocks;
|
|
2171
1995
|
const getDirectInsertBlock = (0, _rememo.default)((state, rootClientId = null) => {
|
|
2172
1996
|
if (!rootClientId) {
|
|
2173
1997
|
return;
|
|
2174
1998
|
}
|
|
2175
|
-
|
|
2176
1999
|
const defaultBlock = state.blockListSettings[rootClientId]?.defaultBlock;
|
|
2177
2000
|
const directInsert = state.blockListSettings[rootClientId]?.directInsert;
|
|
2178
|
-
|
|
2179
2001
|
if (!defaultBlock || !directInsert) {
|
|
2180
2002
|
return;
|
|
2181
2003
|
}
|
|
2182
|
-
|
|
2183
2004
|
if (typeof directInsert === 'function') {
|
|
2184
2005
|
return directInsert(getBlock(state, rootClientId)) ? defaultBlock : null;
|
|
2185
2006
|
}
|
|
2186
|
-
|
|
2187
2007
|
return defaultBlock;
|
|
2188
2008
|
}, (state, rootClientId) => [state.blockListSettings[rootClientId], state.blocks.tree.get(rootClientId)]);
|
|
2189
2009
|
exports.getDirectInsertBlock = getDirectInsertBlock;
|
|
2190
|
-
|
|
2191
2010
|
const __experimentalGetDirectInsertBlock = (0, _rememo.default)((state, rootClientId = null) => {
|
|
2192
2011
|
(0, _deprecated.default)('wp.data.select( "core/block-editor" ).__experimentalGetDirectInsertBlock', {
|
|
2193
2012
|
alternative: 'wp.data.select( "core/block-editor" ).getDirectInsertBlock',
|
|
@@ -2196,35 +2015,26 @@ const __experimentalGetDirectInsertBlock = (0, _rememo.default)((state, rootClie
|
|
|
2196
2015
|
});
|
|
2197
2016
|
return getDirectInsertBlock(state, rootClientId);
|
|
2198
2017
|
}, (state, rootClientId) => [state.blockListSettings[rootClientId], state.blocks.tree.get(rootClientId)]);
|
|
2199
|
-
|
|
2200
2018
|
exports.__experimentalGetDirectInsertBlock = __experimentalGetDirectInsertBlock;
|
|
2201
|
-
|
|
2202
2019
|
const checkAllowListRecursive = (blocks, allowedBlockTypes) => {
|
|
2203
2020
|
if (typeof allowedBlockTypes === 'boolean') {
|
|
2204
2021
|
return allowedBlockTypes;
|
|
2205
2022
|
}
|
|
2206
|
-
|
|
2207
2023
|
const blocksQueue = [...blocks];
|
|
2208
|
-
|
|
2209
2024
|
while (blocksQueue.length > 0) {
|
|
2210
2025
|
const block = blocksQueue.shift();
|
|
2211
2026
|
const isAllowed = checkAllowList(allowedBlockTypes, block.name || block.blockName, true);
|
|
2212
|
-
|
|
2213
2027
|
if (!isAllowed) {
|
|
2214
2028
|
return false;
|
|
2215
2029
|
}
|
|
2216
|
-
|
|
2217
2030
|
block.innerBlocks?.forEach(innerBlock => {
|
|
2218
2031
|
blocksQueue.push(innerBlock);
|
|
2219
2032
|
});
|
|
2220
2033
|
}
|
|
2221
|
-
|
|
2222
2034
|
return true;
|
|
2223
2035
|
};
|
|
2224
|
-
|
|
2225
2036
|
function getUnsyncedPatterns(state) {
|
|
2226
2037
|
var _state$settings$__exp;
|
|
2227
|
-
|
|
2228
2038
|
const reusableBlocks = (_state$settings$__exp = state?.settings?.__experimentalReusableBlocks) !== null && _state$settings$__exp !== void 0 ? _state$settings$__exp : EMPTY_ARRAY;
|
|
2229
2039
|
return reusableBlocks.filter(reusableBlock => reusableBlock.wp_pattern_sync_status === 'unsynced').map(reusableBlock => {
|
|
2230
2040
|
return {
|
|
@@ -2235,25 +2045,22 @@ function getUnsyncedPatterns(state) {
|
|
|
2235
2045
|
};
|
|
2236
2046
|
});
|
|
2237
2047
|
}
|
|
2238
|
-
|
|
2239
2048
|
const __experimentalGetParsedPattern = (0, _rememo.default)((state, patternName) => {
|
|
2240
2049
|
const patterns = state.settings.__experimentalBlockPatterns;
|
|
2241
2050
|
const unsyncedPatterns = getUnsyncedPatterns(state);
|
|
2242
2051
|
const pattern = [...patterns, ...unsyncedPatterns].find(({
|
|
2243
2052
|
name
|
|
2244
2053
|
}) => name === patternName);
|
|
2245
|
-
|
|
2246
2054
|
if (!pattern) {
|
|
2247
2055
|
return null;
|
|
2248
2056
|
}
|
|
2249
|
-
|
|
2250
|
-
|
|
2057
|
+
return {
|
|
2058
|
+
...pattern,
|
|
2251
2059
|
blocks: (0, _blocks.parse)(pattern.content, {
|
|
2252
2060
|
__unstableSkipMigrationLogs: true
|
|
2253
2061
|
})
|
|
2254
2062
|
};
|
|
2255
2063
|
}, state => [state.settings.__experimentalBlockPatterns, state.settings.__experimentalReusableBlocks]);
|
|
2256
|
-
|
|
2257
2064
|
exports.__experimentalGetParsedPattern = __experimentalGetParsedPattern;
|
|
2258
2065
|
const getAllAllowedPatterns = (0, _rememo.default)(state => {
|
|
2259
2066
|
const patterns = state.settings.__experimentalBlockPatterns;
|
|
@@ -2271,6 +2078,7 @@ const getAllAllowedPatterns = (0, _rememo.default)(state => {
|
|
|
2271
2078
|
}) => checkAllowListRecursive(blocks, allowedBlockTypes));
|
|
2272
2079
|
return allowedPatterns;
|
|
2273
2080
|
}, state => [state.settings.__experimentalBlockPatterns, state.settings.__experimentalReusableBlocks, state.settings.allowedBlockTypes]);
|
|
2081
|
+
|
|
2274
2082
|
/**
|
|
2275
2083
|
* Returns the list of allowed patterns for inner blocks children.
|
|
2276
2084
|
*
|
|
@@ -2279,7 +2087,6 @@ const getAllAllowedPatterns = (0, _rememo.default)(state => {
|
|
|
2279
2087
|
*
|
|
2280
2088
|
* @return {Array?} The list of allowed patterns.
|
|
2281
2089
|
*/
|
|
2282
|
-
|
|
2283
2090
|
const __experimentalGetAllowedPatterns = (0, _rememo.default)((state, rootClientId = null) => {
|
|
2284
2091
|
const availableParsedPatterns = getAllAllowedPatterns(state);
|
|
2285
2092
|
const patternsAllowed = availableParsedPatterns.filter(({
|
|
@@ -2289,6 +2096,7 @@ const __experimentalGetAllowedPatterns = (0, _rememo.default)((state, rootClient
|
|
|
2289
2096
|
}) => canInsertBlockType(state, name, rootClientId)));
|
|
2290
2097
|
return patternsAllowed;
|
|
2291
2098
|
}, (state, rootClientId) => [state.settings.__experimentalBlockPatterns, state.settings.__experimentalReusableBlocks, state.settings.allowedBlockTypes, state.settings.templateLock, state.blockListSettings[rootClientId], state.blocks.byClientId.get(rootClientId)]);
|
|
2099
|
+
|
|
2292
2100
|
/**
|
|
2293
2101
|
* Returns the list of patterns based on their declared `blockTypes`
|
|
2294
2102
|
* and a block's name.
|
|
@@ -2302,25 +2110,18 @@ const __experimentalGetAllowedPatterns = (0, _rememo.default)((state, rootClient
|
|
|
2302
2110
|
*
|
|
2303
2111
|
* @return {Array} The list of matched block patterns based on declared `blockTypes` and block name.
|
|
2304
2112
|
*/
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
2113
|
exports.__experimentalGetAllowedPatterns = __experimentalGetAllowedPatterns;
|
|
2308
2114
|
const getPatternsByBlockTypes = (0, _rememo.default)((state, blockNames, rootClientId = null) => {
|
|
2309
2115
|
if (!blockNames) return EMPTY_ARRAY;
|
|
2310
|
-
|
|
2311
2116
|
const patterns = __experimentalGetAllowedPatterns(state, rootClientId);
|
|
2312
|
-
|
|
2313
2117
|
const normalizedBlockNames = Array.isArray(blockNames) ? blockNames : [blockNames];
|
|
2314
2118
|
const filteredPatterns = patterns.filter(pattern => pattern?.blockTypes?.some?.(blockName => normalizedBlockNames.includes(blockName)));
|
|
2315
|
-
|
|
2316
2119
|
if (filteredPatterns.length === 0) {
|
|
2317
2120
|
return EMPTY_ARRAY;
|
|
2318
2121
|
}
|
|
2319
|
-
|
|
2320
2122
|
return filteredPatterns;
|
|
2321
2123
|
}, (state, blockNames, rootClientId) => [...__experimentalGetAllowedPatterns.getDependants(state, rootClientId)]);
|
|
2322
2124
|
exports.getPatternsByBlockTypes = getPatternsByBlockTypes;
|
|
2323
|
-
|
|
2324
2125
|
const __experimentalGetPatternsByBlockTypes = (0, _rememo.default)((state, blockNames, rootClientId = null) => {
|
|
2325
2126
|
(0, _deprecated.default)('wp.data.select( "core/block-editor" ).__experimentalGetPatternsByBlockTypes', {
|
|
2326
2127
|
alternative: 'wp.data.select( "core/block-editor" ).getPatternsByBlockTypes',
|
|
@@ -2329,6 +2130,7 @@ const __experimentalGetPatternsByBlockTypes = (0, _rememo.default)((state, block
|
|
|
2329
2130
|
});
|
|
2330
2131
|
return getPatternsByBlockTypes(state, blockNames, rootClientId);
|
|
2331
2132
|
}, (state, blockNames, rootClientId) => [...__experimentalGetAllowedPatterns.getDependants(state, rootClientId)]);
|
|
2133
|
+
|
|
2332
2134
|
/**
|
|
2333
2135
|
* Determines the items that appear in the available pattern transforms list.
|
|
2334
2136
|
*
|
|
@@ -2346,10 +2148,7 @@ const __experimentalGetPatternsByBlockTypes = (0, _rememo.default)((state, block
|
|
|
2346
2148
|
*
|
|
2347
2149
|
* @return {WPBlockPattern[]} Items that are eligible for a pattern transformation.
|
|
2348
2150
|
*/
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
2151
|
exports.__experimentalGetPatternsByBlockTypes = __experimentalGetPatternsByBlockTypes;
|
|
2352
|
-
|
|
2353
2152
|
const __experimentalGetPatternTransformItems = (0, _rememo.default)((state, blocks, rootClientId = null) => {
|
|
2354
2153
|
if (!blocks) return EMPTY_ARRAY;
|
|
2355
2154
|
/**
|
|
@@ -2359,15 +2158,14 @@ const __experimentalGetPatternTransformItems = (0, _rememo.default)((state, bloc
|
|
|
2359
2158
|
* return the inner blocks of an inner block controller, so we still need
|
|
2360
2159
|
* to check for this case too.
|
|
2361
2160
|
*/
|
|
2362
|
-
|
|
2363
2161
|
if (blocks.some(({
|
|
2364
2162
|
clientId,
|
|
2365
2163
|
innerBlocks
|
|
2366
2164
|
}) => innerBlocks.length || areInnerBlocksControlled(state, clientId))) {
|
|
2367
2165
|
return EMPTY_ARRAY;
|
|
2368
|
-
}
|
|
2369
|
-
|
|
2166
|
+
}
|
|
2370
2167
|
|
|
2168
|
+
// Create a Set of the selected block names that is used in patterns filtering.
|
|
2371
2169
|
const selectedBlockNames = Array.from(new Set(blocks.map(({
|
|
2372
2170
|
name
|
|
2373
2171
|
}) => name)));
|
|
@@ -2377,9 +2175,9 @@ const __experimentalGetPatternTransformItems = (0, _rememo.default)((state, bloc
|
|
|
2377
2175
|
* block pattern's blocks and try to find matches from the selected blocks.
|
|
2378
2176
|
* Now this happens in the consumer to avoid heavy operations in the selector.
|
|
2379
2177
|
*/
|
|
2380
|
-
|
|
2381
2178
|
return getPatternsByBlockTypes(state, selectedBlockNames, rootClientId);
|
|
2382
2179
|
}, (state, blocks, rootClientId) => [...getPatternsByBlockTypes.getDependants(state, rootClientId)]);
|
|
2180
|
+
|
|
2383
2181
|
/**
|
|
2384
2182
|
* Returns the Block List settings of a block, if any exist.
|
|
2385
2183
|
*
|
|
@@ -2388,13 +2186,11 @@ const __experimentalGetPatternTransformItems = (0, _rememo.default)((state, bloc
|
|
|
2388
2186
|
*
|
|
2389
2187
|
* @return {?Object} Block settings of the block if set.
|
|
2390
2188
|
*/
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
2189
|
exports.__experimentalGetPatternTransformItems = __experimentalGetPatternTransformItems;
|
|
2394
|
-
|
|
2395
2190
|
function getBlockListSettings(state, clientId) {
|
|
2396
2191
|
return state.blockListSettings[clientId];
|
|
2397
2192
|
}
|
|
2193
|
+
|
|
2398
2194
|
/**
|
|
2399
2195
|
* Returns the editor settings.
|
|
2400
2196
|
*
|
|
@@ -2402,11 +2198,10 @@ function getBlockListSettings(state, clientId) {
|
|
|
2402
2198
|
*
|
|
2403
2199
|
* @return {Object} The editor settings object.
|
|
2404
2200
|
*/
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
2201
|
function getSettings(state) {
|
|
2408
2202
|
return state.settings;
|
|
2409
2203
|
}
|
|
2204
|
+
|
|
2410
2205
|
/**
|
|
2411
2206
|
* Returns true if the most recent block change is be considered persistent, or
|
|
2412
2207
|
* false otherwise. A persistent change is one committed by BlockEditorProvider
|
|
@@ -2416,11 +2211,10 @@ function getSettings(state) {
|
|
|
2416
2211
|
*
|
|
2417
2212
|
* @return {boolean} Whether the most recent block change was persistent.
|
|
2418
2213
|
*/
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
2214
|
function isLastBlockChangePersistent(state) {
|
|
2422
2215
|
return state.blocks.isPersistentChange;
|
|
2423
2216
|
}
|
|
2217
|
+
|
|
2424
2218
|
/**
|
|
2425
2219
|
* Returns the block list settings for an array of blocks, if any exist.
|
|
2426
2220
|
*
|
|
@@ -2430,19 +2224,18 @@ function isLastBlockChangePersistent(state) {
|
|
|
2430
2224
|
* @return {Object} An object where the keys are client ids and the values are
|
|
2431
2225
|
* a block list setting object.
|
|
2432
2226
|
*/
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
2227
|
const __experimentalGetBlockListSettingsForBlocks = (0, _rememo.default)((state, clientIds = []) => {
|
|
2436
2228
|
return clientIds.reduce((blockListSettingsForBlocks, clientId) => {
|
|
2437
2229
|
if (!state.blockListSettings[clientId]) {
|
|
2438
2230
|
return blockListSettingsForBlocks;
|
|
2439
2231
|
}
|
|
2440
|
-
|
|
2441
|
-
|
|
2232
|
+
return {
|
|
2233
|
+
...blockListSettingsForBlocks,
|
|
2442
2234
|
[clientId]: state.blockListSettings[clientId]
|
|
2443
2235
|
};
|
|
2444
2236
|
}, {});
|
|
2445
2237
|
}, state => [state.blockListSettings]);
|
|
2238
|
+
|
|
2446
2239
|
/**
|
|
2447
2240
|
* Returns the title of a given reusable block
|
|
2448
2241
|
*
|
|
@@ -2451,19 +2244,15 @@ const __experimentalGetBlockListSettingsForBlocks = (0, _rememo.default)((state,
|
|
|
2451
2244
|
*
|
|
2452
2245
|
* @return {string} The reusable block saved title.
|
|
2453
2246
|
*/
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
2247
|
exports.__experimentalGetBlockListSettingsForBlocks = __experimentalGetBlockListSettingsForBlocks;
|
|
2457
|
-
|
|
2458
2248
|
const __experimentalGetReusableBlockTitle = (0, _rememo.default)((state, ref) => {
|
|
2459
2249
|
const reusableBlock = getReusableBlocks(state).find(block => block.id === ref);
|
|
2460
|
-
|
|
2461
2250
|
if (!reusableBlock) {
|
|
2462
2251
|
return null;
|
|
2463
2252
|
}
|
|
2464
|
-
|
|
2465
2253
|
return reusableBlock.title?.raw;
|
|
2466
2254
|
}, state => [getReusableBlocks(state)]);
|
|
2255
|
+
|
|
2467
2256
|
/**
|
|
2468
2257
|
* Returns true if the most recent block change is be considered ignored, or
|
|
2469
2258
|
* false otherwise. An ignored change is one not to be committed by
|
|
@@ -2473,10 +2262,7 @@ const __experimentalGetReusableBlockTitle = (0, _rememo.default)((state, ref) =>
|
|
|
2473
2262
|
*
|
|
2474
2263
|
* @return {boolean} Whether the most recent block change was ignored.
|
|
2475
2264
|
*/
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
2265
|
exports.__experimentalGetReusableBlockTitle = __experimentalGetReusableBlockTitle;
|
|
2479
|
-
|
|
2480
2266
|
function __unstableIsLastBlockChangeIgnored(state) {
|
|
2481
2267
|
// TODO: Removal Plan: Changes incurred by RECEIVE_BLOCKS should not be
|
|
2482
2268
|
// ignored if in-fact they result in a change in blocks state. The current
|
|
@@ -2485,6 +2271,7 @@ function __unstableIsLastBlockChangeIgnored(state) {
|
|
|
2485
2271
|
// their own separate block editor / state (#7119).
|
|
2486
2272
|
return state.blocks.isIgnoredChange;
|
|
2487
2273
|
}
|
|
2274
|
+
|
|
2488
2275
|
/**
|
|
2489
2276
|
* Returns the block attributes changed as a result of the last dispatched
|
|
2490
2277
|
* action.
|
|
@@ -2494,11 +2281,10 @@ function __unstableIsLastBlockChangeIgnored(state) {
|
|
|
2494
2281
|
* @return {Object<string,Object>} Subsets of block attributes changed, keyed
|
|
2495
2282
|
* by block client ID.
|
|
2496
2283
|
*/
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
2284
|
function __experimentalGetLastBlockAttributeChanges(state) {
|
|
2500
2285
|
return state.lastBlockAttributesChange;
|
|
2501
2286
|
}
|
|
2287
|
+
|
|
2502
2288
|
/**
|
|
2503
2289
|
* Returns the available reusable blocks
|
|
2504
2290
|
*
|
|
@@ -2506,13 +2292,11 @@ function __experimentalGetLastBlockAttributeChanges(state) {
|
|
|
2506
2292
|
*
|
|
2507
2293
|
* @return {Array} Reusable blocks
|
|
2508
2294
|
*/
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
2295
|
function getReusableBlocks(state) {
|
|
2512
2296
|
var _state$settings$__exp2;
|
|
2513
|
-
|
|
2514
2297
|
return (_state$settings$__exp2 = state?.settings?.__experimentalReusableBlocks) !== null && _state$settings$__exp2 !== void 0 ? _state$settings$__exp2 : EMPTY_ARRAY;
|
|
2515
2298
|
}
|
|
2299
|
+
|
|
2516
2300
|
/**
|
|
2517
2301
|
* Returns whether the navigation mode is enabled.
|
|
2518
2302
|
*
|
|
@@ -2520,11 +2304,10 @@ function getReusableBlocks(state) {
|
|
|
2520
2304
|
*
|
|
2521
2305
|
* @return {boolean} Is navigation mode enabled.
|
|
2522
2306
|
*/
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
2307
|
function isNavigationMode(state) {
|
|
2526
2308
|
return state.editorMode === 'navigation';
|
|
2527
2309
|
}
|
|
2310
|
+
|
|
2528
2311
|
/**
|
|
2529
2312
|
* Returns the current editor mode.
|
|
2530
2313
|
*
|
|
@@ -2532,11 +2315,10 @@ function isNavigationMode(state) {
|
|
|
2532
2315
|
*
|
|
2533
2316
|
* @return {string} the editor mode.
|
|
2534
2317
|
*/
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
2318
|
function __unstableGetEditorMode(state) {
|
|
2538
2319
|
return state.editorMode;
|
|
2539
2320
|
}
|
|
2321
|
+
|
|
2540
2322
|
/**
|
|
2541
2323
|
* Returns whether block moving mode is enabled.
|
|
2542
2324
|
*
|
|
@@ -2544,11 +2326,10 @@ function __unstableGetEditorMode(state) {
|
|
|
2544
2326
|
*
|
|
2545
2327
|
* @return {string} Client Id of moving block.
|
|
2546
2328
|
*/
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
2329
|
function hasBlockMovingClientId(state) {
|
|
2550
2330
|
return state.hasBlockMovingClientId;
|
|
2551
2331
|
}
|
|
2332
|
+
|
|
2552
2333
|
/**
|
|
2553
2334
|
* Returns true if the last change was an automatic change, false otherwise.
|
|
2554
2335
|
*
|
|
@@ -2556,11 +2337,10 @@ function hasBlockMovingClientId(state) {
|
|
|
2556
2337
|
*
|
|
2557
2338
|
* @return {boolean} Whether the last change was automatic.
|
|
2558
2339
|
*/
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
2340
|
function didAutomaticChange(state) {
|
|
2562
2341
|
return !!state.automaticChangeStatus;
|
|
2563
2342
|
}
|
|
2343
|
+
|
|
2564
2344
|
/**
|
|
2565
2345
|
* Returns true if the current highlighted block matches the block clientId.
|
|
2566
2346
|
*
|
|
@@ -2569,11 +2349,10 @@ function didAutomaticChange(state) {
|
|
|
2569
2349
|
*
|
|
2570
2350
|
* @return {boolean} Whether the block is currently highlighted.
|
|
2571
2351
|
*/
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
2352
|
function isBlockHighlighted(state, clientId) {
|
|
2575
2353
|
return state.highlightedBlock === clientId;
|
|
2576
2354
|
}
|
|
2355
|
+
|
|
2577
2356
|
/**
|
|
2578
2357
|
* Checks if a given block has controlled inner blocks.
|
|
2579
2358
|
*
|
|
@@ -2582,11 +2361,10 @@ function isBlockHighlighted(state, clientId) {
|
|
|
2582
2361
|
*
|
|
2583
2362
|
* @return {boolean} True if the block has controlled inner blocks.
|
|
2584
2363
|
*/
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
2364
|
function areInnerBlocksControlled(state, clientId) {
|
|
2588
2365
|
return !!state.blocks.controlledInnerBlocks[clientId];
|
|
2589
2366
|
}
|
|
2367
|
+
|
|
2590
2368
|
/**
|
|
2591
2369
|
* Returns the clientId for the first 'active' block of a given array of block names.
|
|
2592
2370
|
* A block is 'active' if it (or a child) is the selected block.
|
|
@@ -2597,31 +2375,25 @@ function areInnerBlocksControlled(state, clientId) {
|
|
|
2597
2375
|
*
|
|
2598
2376
|
* @return {string} The matching block's clientId.
|
|
2599
2377
|
*/
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
2378
|
const __experimentalGetActiveBlockIdByBlockNames = (0, _rememo.default)((state, validBlockNames) => {
|
|
2603
2379
|
if (!validBlockNames.length) {
|
|
2604
2380
|
return null;
|
|
2605
|
-
}
|
|
2606
|
-
|
|
2607
|
-
|
|
2381
|
+
}
|
|
2382
|
+
// Check if selected block is a valid entity area.
|
|
2608
2383
|
const selectedBlockClientId = getSelectedBlockClientId(state);
|
|
2609
|
-
|
|
2610
2384
|
if (validBlockNames.includes(getBlockName(state, selectedBlockClientId))) {
|
|
2611
2385
|
return selectedBlockClientId;
|
|
2612
|
-
}
|
|
2613
|
-
|
|
2614
|
-
|
|
2386
|
+
}
|
|
2387
|
+
// Check if first selected block is a child of a valid entity area.
|
|
2615
2388
|
const multiSelectedBlockClientIds = getMultiSelectedBlockClientIds(state);
|
|
2616
2389
|
const entityAreaParents = getBlockParentsByBlockName(state, selectedBlockClientId || multiSelectedBlockClientIds[0], validBlockNames);
|
|
2617
|
-
|
|
2618
2390
|
if (entityAreaParents) {
|
|
2619
2391
|
// Last parent closest/most interior.
|
|
2620
2392
|
return entityAreaParents[entityAreaParents.length - 1];
|
|
2621
2393
|
}
|
|
2622
|
-
|
|
2623
2394
|
return null;
|
|
2624
2395
|
}, (state, validBlockNames) => [state.selection.selectionStart.clientId, state.selection.selectionEnd.clientId, validBlockNames]);
|
|
2396
|
+
|
|
2625
2397
|
/**
|
|
2626
2398
|
* Tells if the block with the passed clientId was just inserted.
|
|
2627
2399
|
*
|
|
@@ -2630,16 +2402,14 @@ const __experimentalGetActiveBlockIdByBlockNames = (0, _rememo.default)((state,
|
|
|
2630
2402
|
* @param {?string} source Optional insertion source of the block.
|
|
2631
2403
|
* @return {boolean} True if the block matches the last block inserted from the specified source.
|
|
2632
2404
|
*/
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
2405
|
exports.__experimentalGetActiveBlockIdByBlockNames = __experimentalGetActiveBlockIdByBlockNames;
|
|
2636
|
-
|
|
2637
2406
|
function wasBlockJustInserted(state, clientId, source) {
|
|
2638
2407
|
const {
|
|
2639
2408
|
lastBlockInserted
|
|
2640
2409
|
} = state;
|
|
2641
2410
|
return lastBlockInserted.clientIds?.includes(clientId) && lastBlockInserted.source === source;
|
|
2642
2411
|
}
|
|
2412
|
+
|
|
2643
2413
|
/**
|
|
2644
2414
|
* Tells if the block is visible on the canvas or not.
|
|
2645
2415
|
*
|
|
@@ -2647,53 +2417,43 @@ function wasBlockJustInserted(state, clientId, source) {
|
|
|
2647
2417
|
* @param {Object} clientId Client Id of the block.
|
|
2648
2418
|
* @return {boolean} True if the block is visible.
|
|
2649
2419
|
*/
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
2420
|
function isBlockVisible(state, clientId) {
|
|
2653
2421
|
var _state$blockVisibilit;
|
|
2654
|
-
|
|
2655
2422
|
return (_state$blockVisibilit = state.blockVisibility?.[clientId]) !== null && _state$blockVisibilit !== void 0 ? _state$blockVisibilit : true;
|
|
2656
2423
|
}
|
|
2424
|
+
|
|
2657
2425
|
/**
|
|
2658
2426
|
* Returns the list of all hidden blocks.
|
|
2659
2427
|
*
|
|
2660
2428
|
* @param {Object} state Global application state.
|
|
2661
2429
|
* @return {[string]} List of hidden blocks.
|
|
2662
2430
|
*/
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
2431
|
const __unstableGetVisibleBlocks = (0, _rememo.default)(state => {
|
|
2666
2432
|
const visibleBlocks = new Set(Object.keys(state.blockVisibility).filter(key => state.blockVisibility[key]));
|
|
2667
|
-
|
|
2668
2433
|
if (visibleBlocks.size === 0) {
|
|
2669
2434
|
return EMPTY_SET;
|
|
2670
2435
|
}
|
|
2671
|
-
|
|
2672
2436
|
return visibleBlocks;
|
|
2673
2437
|
}, state => [state.blockVisibility]);
|
|
2438
|
+
|
|
2674
2439
|
/**
|
|
2675
2440
|
* DO-NOT-USE in production.
|
|
2676
2441
|
* This selector is created for internal/experimental only usage and may be
|
|
2677
2442
|
* removed anytime without any warning, causing breakage on any plugin or theme invoking it.
|
|
2678
2443
|
*/
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
2444
|
exports.__unstableGetVisibleBlocks = __unstableGetVisibleBlocks;
|
|
2682
|
-
|
|
2683
2445
|
const __unstableGetContentLockingParent = (0, _rememo.default)((state, clientId) => {
|
|
2684
2446
|
let current = clientId;
|
|
2685
2447
|
let result;
|
|
2686
|
-
|
|
2687
2448
|
while (state.blocks.parents.has(current)) {
|
|
2688
2449
|
current = state.blocks.parents.get(current);
|
|
2689
|
-
|
|
2690
2450
|
if (current && getTemplateLock(state, current) === 'contentOnly') {
|
|
2691
2451
|
result = current;
|
|
2692
2452
|
}
|
|
2693
2453
|
}
|
|
2694
|
-
|
|
2695
2454
|
return result;
|
|
2696
2455
|
}, state => [state.blocks.parents, state.blockListSettings]);
|
|
2456
|
+
|
|
2697
2457
|
/**
|
|
2698
2458
|
* DO-NOT-USE in production.
|
|
2699
2459
|
* This selector is created for internal/experimental only usage and may be
|
|
@@ -2701,56 +2461,98 @@ const __unstableGetContentLockingParent = (0, _rememo.default)((state, clientId)
|
|
|
2701
2461
|
*
|
|
2702
2462
|
* @param {Object} state Global application state.
|
|
2703
2463
|
*/
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
2464
|
exports.__unstableGetContentLockingParent = __unstableGetContentLockingParent;
|
|
2707
|
-
|
|
2708
2465
|
function __unstableGetTemporarilyEditingAsBlocks(state) {
|
|
2709
2466
|
return state.temporarilyEditingAsBlocks;
|
|
2710
2467
|
}
|
|
2711
|
-
|
|
2712
2468
|
function __unstableHasActiveBlockOverlayActive(state, clientId) {
|
|
2713
2469
|
// Prevent overlay on blocks with a non-default editing mode. If the mdoe is
|
|
2714
2470
|
// 'disabled' then the overlay is redundant since the block can't be
|
|
2715
2471
|
// selected. If the mode is 'contentOnly' then the overlay is redundant
|
|
2716
2472
|
// since there will be no controls to interact with once selected.
|
|
2717
|
-
if (
|
|
2473
|
+
if (getBlockEditingMode(state, clientId) !== 'default') {
|
|
2718
2474
|
return false;
|
|
2719
|
-
}
|
|
2720
|
-
|
|
2475
|
+
}
|
|
2721
2476
|
|
|
2477
|
+
// If the block editing is locked, the block overlay is always active.
|
|
2722
2478
|
if (!canEditBlock(state, clientId)) {
|
|
2723
2479
|
return true;
|
|
2724
2480
|
}
|
|
2481
|
+
const editorMode = __unstableGetEditorMode(state);
|
|
2725
2482
|
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2483
|
+
// In zoom-out mode, the block overlay is always active for top level blocks.
|
|
2729
2484
|
if (editorMode === 'zoom-out' && clientId && !getBlockRootClientId(state, clientId)) {
|
|
2730
2485
|
return true;
|
|
2731
|
-
}
|
|
2486
|
+
}
|
|
2487
|
+
|
|
2488
|
+
// In navigation mode, the block overlay is active when the block is not
|
|
2732
2489
|
// selected (and doesn't contain a selected child). The same behavior is
|
|
2733
2490
|
// also enabled in all modes for blocks that have controlled children
|
|
2734
2491
|
// (reusable block, template part, navigation), unless explicitly disabled
|
|
2735
2492
|
// with `supports.__experimentalDisableBlockOverlay`.
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
2493
|
const blockSupportDisable = (0, _blocks.hasBlockSupport)(getBlockName(state, clientId), '__experimentalDisableBlockOverlay', false);
|
|
2739
2494
|
const shouldEnableIfUnselected = editorMode === 'navigation' || (blockSupportDisable ? false : areInnerBlocksControlled(state, clientId));
|
|
2740
2495
|
return shouldEnableIfUnselected && !isBlockSelected(state, clientId) && !hasSelectedInnerBlock(state, clientId, true);
|
|
2741
2496
|
}
|
|
2742
|
-
|
|
2743
2497
|
function __unstableIsWithinBlockOverlay(state, clientId) {
|
|
2744
2498
|
let parent = state.blocks.parents.get(clientId);
|
|
2745
|
-
|
|
2746
2499
|
while (!!parent) {
|
|
2747
2500
|
if (__unstableHasActiveBlockOverlayActive(state, parent)) {
|
|
2748
2501
|
return true;
|
|
2749
2502
|
}
|
|
2750
|
-
|
|
2751
2503
|
parent = state.blocks.parents.get(parent);
|
|
2752
2504
|
}
|
|
2753
|
-
|
|
2754
2505
|
return false;
|
|
2755
2506
|
}
|
|
2507
|
+
|
|
2508
|
+
/**
|
|
2509
|
+
* @typedef {import('../components/block-editing-mode').BlockEditingMode} BlockEditingMode
|
|
2510
|
+
*/
|
|
2511
|
+
|
|
2512
|
+
/**
|
|
2513
|
+
* Returns the block editing mode for a given block.
|
|
2514
|
+
*
|
|
2515
|
+
* The mode can be one of three options:
|
|
2516
|
+
*
|
|
2517
|
+
* - `'disabled'`: Prevents editing the block entirely, i.e. it cannot be
|
|
2518
|
+
* selected.
|
|
2519
|
+
* - `'contentOnly'`: Hides all non-content UI, e.g. auxiliary controls in the
|
|
2520
|
+
* toolbar, the block movers, block settings.
|
|
2521
|
+
* - `'default'`: Allows editing the block as normal.
|
|
2522
|
+
*
|
|
2523
|
+
* Blocks can set a mode using the `useBlockEditingMode` hook.
|
|
2524
|
+
*
|
|
2525
|
+
* The mode is inherited by all of the block's inner blocks, unless they have
|
|
2526
|
+
* their own mode.
|
|
2527
|
+
*
|
|
2528
|
+
* A template lock can also set a mode. If the template lock is `'contentOnly'`,
|
|
2529
|
+
* the block's mode is overridden to `'contentOnly'` if the block has a content
|
|
2530
|
+
* role attribute, or `'disabled'` otherwise.
|
|
2531
|
+
*
|
|
2532
|
+
* @see useBlockEditingMode
|
|
2533
|
+
*
|
|
2534
|
+
* @param {Object} state Global application state.
|
|
2535
|
+
* @param {string} clientId The block client ID, or `''` for the root container.
|
|
2536
|
+
*
|
|
2537
|
+
* @return {BlockEditingMode} The block editing mode. One of `'disabled'`,
|
|
2538
|
+
* `'contentOnly'`, or `'default'`.
|
|
2539
|
+
*/
|
|
2540
|
+
const getBlockEditingMode = (0, _data.createRegistrySelector)(select => (state, clientId = '') => {
|
|
2541
|
+
if (state.blockEditingModes.has(clientId)) {
|
|
2542
|
+
return state.blockEditingModes.get(clientId);
|
|
2543
|
+
}
|
|
2544
|
+
if (!clientId) {
|
|
2545
|
+
return 'default';
|
|
2546
|
+
}
|
|
2547
|
+
const rootClientId = getBlockRootClientId(state, clientId);
|
|
2548
|
+
const templateLock = getTemplateLock(state, rootClientId);
|
|
2549
|
+
if (templateLock === 'contentOnly') {
|
|
2550
|
+
const name = getBlockName(state, clientId);
|
|
2551
|
+
const isContent = select(_blocks.store).__experimentalHasContentRoleAttribute(name);
|
|
2552
|
+
return isContent ? 'contentOnly' : 'disabled';
|
|
2553
|
+
}
|
|
2554
|
+
const parentMode = getBlockEditingMode(state, rootClientId);
|
|
2555
|
+
return parentMode === 'contentOnly' ? 'default' : parentMode;
|
|
2556
|
+
});
|
|
2557
|
+
exports.getBlockEditingMode = getBlockEditingMode;
|
|
2756
2558
|
//# sourceMappingURL=selectors.js.map
|