@wordpress/block-editor 14.3.6 → 14.5.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 +4 -0
- package/README.md +6 -2
- package/build/autocompleters/block.js.map +1 -1
- package/build/autocompleters/link.js +2 -1
- package/build/autocompleters/link.js.map +1 -1
- package/build/components/background-image-control/index.js +1 -1
- package/build/components/background-image-control/index.js.map +1 -1
- package/build/components/block-actions/index.js +1 -13
- package/build/components/block-actions/index.js.map +1 -1
- package/build/components/block-controls/slot.js.map +1 -1
- package/build/components/block-controls/slot.native.js.map +1 -1
- package/build/components/block-draggable/draggable-chip.js +1 -1
- package/build/components/block-draggable/draggable-chip.js.map +1 -1
- package/build/components/block-inspector/index.js +56 -75
- package/build/components/block-inspector/index.js.map +1 -1
- package/build/components/block-list/block-invalid-warning.native.js +1 -1
- package/build/components/block-list/block-invalid-warning.native.js.map +1 -1
- package/build/components/block-list/block-list-item.native.js.map +1 -1
- package/build/components/block-list/block.js +5 -16
- package/build/components/block-list/block.js.map +1 -1
- package/build/components/block-list/index.js +6 -8
- package/build/components/block-list/index.js.map +1 -1
- package/build/components/block-list/index.native.js.map +1 -1
- package/build/components/block-list/use-block-props/index.js +3 -8
- package/build/components/block-list/use-block-props/index.js.map +1 -1
- package/build/components/block-list/use-block-props/use-selected-block-event-handlers.js +14 -6
- 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 +5 -3
- package/build/components/block-list/use-in-between-inserter.js.map +1 -1
- package/build/components/block-list/zoom-out-separator.js +24 -13
- package/build/components/block-list/zoom-out-separator.js.map +1 -1
- package/build/components/block-lock/modal.js +1 -1
- package/build/components/block-lock/modal.js.map +1 -1
- package/build/components/block-mover/button.js.map +1 -1
- package/build/components/block-navigation/dropdown.js +2 -4
- package/build/components/block-navigation/dropdown.js.map +1 -1
- package/build/components/block-parent-selector/index.js +14 -11
- package/build/components/block-parent-selector/index.js.map +1 -1
- package/build/components/block-pattern-setup/index.js.map +1 -1
- package/build/components/block-pattern-setup/setup-toolbar.js +10 -20
- package/build/components/block-pattern-setup/setup-toolbar.js.map +1 -1
- package/build/components/block-patterns-list/index.js.map +1 -1
- package/build/components/block-patterns-paging/index.js +11 -13
- package/build/components/block-patterns-paging/index.js.map +1 -1
- package/build/components/block-popover/index.js +45 -2
- package/build/components/block-popover/index.js.map +1 -1
- package/build/components/block-preview/auto.js +1 -4
- package/build/components/block-preview/auto.js.map +1 -1
- package/build/components/block-preview/index.js.map +1 -1
- package/build/components/block-quick-navigation/index.js +2 -4
- package/build/components/block-quick-navigation/index.js.map +1 -1
- package/build/components/block-rename/modal.js +2 -2
- package/build/components/block-rename/modal.js.map +1 -1
- package/build/components/block-settings-menu/block-parent-selector-menu-item.js +1 -1
- package/build/components/block-settings-menu/block-parent-selector-menu-item.js.map +1 -1
- package/build/components/block-settings-menu/block-settings-dropdown.js +79 -76
- package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build/components/block-settings-menu-controls/index.js +1 -6
- package/build/components/block-settings-menu-controls/index.js.map +1 -1
- package/build/components/block-switcher/block-transformations-menu.native.js +1 -1
- package/build/components/block-switcher/block-transformations-menu.native.js.map +1 -1
- package/build/components/block-switcher/index.js +19 -15
- package/build/components/block-switcher/index.js.map +1 -1
- package/build/components/block-switcher/pattern-transformations-menu.js.map +1 -1
- package/build/components/block-switcher/use-transformed-patterns.js +1 -0
- package/build/components/block-switcher/use-transformed-patterns.js.map +1 -1
- package/build/components/block-switcher/utils.js +1 -0
- package/build/components/block-switcher/utils.js.map +1 -1
- package/build/components/block-toolbar/index.js +16 -19
- package/build/components/block-toolbar/index.js.map +1 -1
- package/build/components/block-toolbar/use-has-block-toolbar.js +3 -5
- package/build/components/block-toolbar/use-has-block-toolbar.js.map +1 -1
- package/build/components/block-tools/index.js +8 -18
- package/build/components/block-tools/index.js.map +1 -1
- package/build/components/block-tools/insertion-point.js +1 -4
- package/build/components/block-tools/insertion-point.js.map +1 -1
- package/build/components/block-tools/use-show-block-tools.js +8 -7
- package/build/components/block-tools/use-show-block-tools.js.map +1 -1
- package/build/components/block-tools/zoom-out-mode-inserter-button.js +1 -12
- package/build/components/block-tools/zoom-out-mode-inserter-button.js.map +1 -1
- package/build/components/block-tools/zoom-out-mode-inserters.js +14 -17
- package/build/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
- package/build/components/block-tools/zoom-out-popover.js +3 -2
- package/build/components/block-tools/zoom-out-popover.js.map +1 -1
- package/build/components/block-tools/zoom-out-toolbar.js +5 -32
- package/build/components/block-tools/zoom-out-toolbar.js.map +1 -1
- package/build/components/block-types-list/index.js.map +1 -1
- package/build/components/block-types-list/index.native.js.map +1 -1
- package/build/components/block-variation-transforms/index.js +3 -2
- package/build/components/block-variation-transforms/index.js.map +1 -1
- package/build/components/border-radius-control/index.js.map +1 -1
- package/build/components/border-radius-control/utils.js.map +1 -1
- package/build/components/button-block-appender/index.js.map +1 -1
- package/build/components/color-style-selector/index.js.map +1 -1
- package/build/components/colors/utils.js.map +1 -1
- package/build/components/colors/with-colors.js.map +1 -1
- package/build/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
- package/build/components/date-format-picker/index.js +1 -0
- package/build/components/date-format-picker/index.js.map +1 -1
- package/build/components/duotone/utils.js.map +1 -1
- package/build/components/duotone-control/index.js.map +1 -1
- package/build/components/font-sizes/fluid-utils.js.map +1 -1
- package/build/components/font-sizes/utils.js.map +1 -1
- package/build/components/font-sizes/with-font-sizes.js.map +1 -1
- package/build/components/global-styles/border-panel.js +1 -1
- package/build/components/global-styles/border-panel.js.map +1 -1
- package/build/components/global-styles/color-panel.js +1 -1
- package/build/components/global-styles/color-panel.js.map +1 -1
- package/build/components/global-styles/dimensions-panel.js +3 -3
- package/build/components/global-styles/dimensions-panel.js.map +1 -1
- package/build/components/global-styles/filters-panel.js.map +1 -1
- package/build/components/global-styles/get-block-css-selector.js.map +1 -1
- package/build/components/global-styles/get-global-styles-changes.js +2 -1
- package/build/components/global-styles/get-global-styles-changes.js.map +1 -1
- package/build/components/global-styles/hooks.js.map +1 -1
- package/build/components/global-styles/typography-panel.js.map +1 -1
- package/build/components/global-styles/use-global-styles-context.native.js.map +1 -1
- package/build/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build/components/global-styles/utils.js.map +1 -1
- package/build/components/gradients/use-gradient.js.map +1 -1
- package/build/components/grid/grid-item-movers.js.map +1 -1
- package/build/components/grid/grid-visualizer.js.map +1 -1
- package/build/components/iframe/index.js +44 -9
- package/build/components/iframe/index.js.map +1 -1
- package/build/components/image-editor/use-save-image.js +1 -1
- package/build/components/image-editor/use-save-image.js.map +1 -1
- package/build/components/inner-blocks/index.js +1 -9
- package/build/components/inner-blocks/index.js.map +1 -1
- package/build/components/inner-blocks/use-nested-settings-update.js +15 -8
- package/build/components/inner-blocks/use-nested-settings-update.js.map +1 -1
- package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js +1 -1
- package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js.map +1 -1
- package/build/components/inserter/block-patterns-explorer/pattern-list.js +2 -2
- package/build/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/use-pattern-categories.js +1 -1
- package/build/components/inserter/block-patterns-tab/use-pattern-categories.js.map +1 -1
- package/build/components/inserter/block-types-tab.js +1 -1
- package/build/components/inserter/block-types-tab.js.map +1 -1
- package/build/components/inserter/block-types-tab.native.js.map +1 -1
- package/build/components/inserter/category-tabs/index.js +1 -10
- package/build/components/inserter/category-tabs/index.js.map +1 -1
- package/build/components/inserter/hooks/use-block-types-state.js +24 -5
- package/build/components/inserter/hooks/use-block-types-state.js.map +1 -1
- package/build/components/inserter/hooks/use-insertion-point.js +22 -12
- package/build/components/inserter/hooks/use-insertion-point.js.map +1 -1
- package/build/components/inserter/hooks/use-patterns-state.js +24 -11
- package/build/components/inserter/hooks/use-patterns-state.js.map +1 -1
- package/build/components/inserter/media-tab/media-panel.js.map +1 -1
- package/build/components/inserter/media-tab/media-preview.js +36 -14
- package/build/components/inserter/media-tab/media-preview.js.map +1 -1
- package/build/components/inserter/media-tab/media-tab.js.map +1 -1
- package/build/components/inserter/media-tab/utils.js.map +1 -1
- package/build/components/inserter/menu.js +4 -4
- package/build/components/inserter/menu.js.map +1 -1
- package/build/components/inserter/mobile-tab-navigation.js +5 -5
- package/build/components/inserter/mobile-tab-navigation.js.map +1 -1
- package/build/components/inserter/preview-panel.js.map +1 -1
- package/build/components/inserter/quick-inserter.js +5 -5
- package/build/components/inserter/quick-inserter.js.map +1 -1
- package/build/components/inserter/search-results.js +1 -1
- package/build/components/inserter/search-results.js.map +1 -1
- package/build/components/inserter/tabs.native.js.map +1 -1
- package/build/components/inspector-controls/block-support-tools-panel.js.map +1 -1
- package/build/components/inspector-controls/fill.js.map +1 -1
- package/build/components/inspector-controls/fill.native.js.map +1 -1
- package/build/components/inspector-controls/slot.js.map +1 -1
- package/build/components/inspector-controls/slot.native.js.map +1 -1
- package/build/components/line-height-control/index.js.map +1 -1
- package/build/components/link-control/index.js +1 -2
- package/build/components/link-control/index.js.map +1 -1
- package/build/components/link-control/is-url-like.js.map +1 -1
- package/build/components/link-control/search-create-button.js +1 -1
- package/build/components/link-control/search-create-button.js.map +1 -1
- package/build/components/link-control/search-input.js +3 -5
- package/build/components/link-control/search-input.js.map +1 -1
- package/build/components/link-control/search-results.js +5 -15
- package/build/components/link-control/search-results.js.map +1 -1
- package/build/components/link-control/settings-drawer.js.map +1 -1
- package/build/components/link-control/use-rich-url-data.js.map +1 -1
- package/build/components/list-view/appender.js +1 -1
- package/build/components/list-view/appender.js.map +1 -1
- package/build/components/list-view/block-contents.js +1 -25
- package/build/components/list-view/block-contents.js.map +1 -1
- package/build/components/list-view/block-select-button.js.map +1 -1
- package/build/components/list-view/block.js.map +1 -1
- package/build/components/list-view/branch.js.map +1 -1
- package/build/components/list-view/drop-indicator.js.map +1 -1
- package/build/components/list-view/index.js.map +1 -1
- package/build/components/list-view/use-block-selection.js +2 -2
- package/build/components/list-view/use-block-selection.js.map +1 -1
- package/build/components/list-view/utils.js +1 -1
- package/build/components/list-view/utils.js.map +1 -1
- package/build/components/media-placeholder/index.native.js +1 -1
- package/build/components/media-placeholder/index.native.js.map +1 -1
- package/build/components/media-replace-flow/index.js.map +1 -1
- package/build/components/multi-selection-inspector/index.js +2 -2
- package/build/components/multi-selection-inspector/index.js.map +1 -1
- package/build/components/observe-typing/index.js +1 -0
- package/build/components/observe-typing/index.js.map +1 -1
- package/build/components/recursion-provider/index.js +1 -0
- package/build/components/recursion-provider/index.js.map +1 -1
- package/build/components/responsive-block-control/index.js +3 -3
- package/build/components/responsive-block-control/index.js.map +1 -1
- package/build/components/responsive-block-control/label.js +1 -1
- package/build/components/responsive-block-control/label.js.map +1 -1
- package/build/components/rich-text/content.js.map +1 -1
- package/build/components/rich-text/file-paste-handler.native.js.map +1 -1
- package/build/components/rich-text/format-toolbar/index.js.map +1 -1
- package/build/components/rich-text/format-toolbar/index.native.js.map +1 -1
- package/build/components/rich-text/index.js +3 -2
- package/build/components/rich-text/index.js.map +1 -1
- package/build/components/rich-text/multiline.js.map +1 -1
- package/build/components/rich-text/native/get-format-colors.native.js.map +1 -1
- package/build/components/rich-text/native/index.native.js.map +1 -1
- package/build/components/rich-text/native/use-format-types.js +1 -0
- package/build/components/rich-text/native/use-format-types.js.map +1 -1
- package/build/components/rich-text/toolbar-button.js.map +1 -1
- package/build/components/rich-text/use-format-types.js +1 -0
- package/build/components/rich-text/use-format-types.js.map +1 -1
- package/build/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
- package/build/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
- package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
- package/build/components/spacing-sizes-control/utils.js +1 -0
- package/build/components/spacing-sizes-control/utils.js.map +1 -1
- package/build/components/tool-selector/index.js +13 -8
- package/build/components/tool-selector/index.js.map +1 -1
- package/build/components/typewriter/index.js +1 -0
- package/build/components/typewriter/index.js.map +1 -1
- package/build/components/unsupported-block-details/index.native.js.map +1 -1
- package/build/components/url-input/index.js +1 -1
- package/build/components/url-input/index.js.map +1 -1
- package/build/components/use-block-commands/index.js +0 -61
- package/build/components/use-block-commands/index.js.map +1 -1
- package/build/components/use-block-drop-zone/index.js.map +1 -1
- package/build/components/use-flash-editable-blocks/index.js.map +1 -1
- package/build/components/use-moving-animation/index.js.map +1 -1
- package/build/components/writing-flow/use-tab-nav.js +23 -30
- package/build/components/writing-flow/use-tab-nav.js.map +1 -1
- package/build/hooks/align.js.map +1 -1
- package/build/hooks/block-hooks.js +1 -1
- package/build/hooks/block-hooks.js.map +1 -1
- package/build/hooks/block-style-variation.js.map +1 -1
- package/build/hooks/duotone.js +4 -1
- package/build/hooks/duotone.js.map +1 -1
- package/build/hooks/font-family.js.map +1 -1
- package/build/hooks/gap.js.map +1 -1
- package/build/hooks/generated-class-name.js +1 -0
- package/build/hooks/generated-class-name.js.map +1 -1
- package/build/hooks/layout-child.js +3 -1
- package/build/hooks/layout-child.js.map +1 -1
- package/build/hooks/layout.js.map +1 -1
- package/build/hooks/position.js +4 -3
- package/build/hooks/position.js.map +1 -1
- package/build/hooks/spacing-visualizer.js.map +1 -1
- package/build/hooks/style.js.map +1 -1
- package/build/hooks/text-align.js.map +1 -1
- package/build/hooks/use-typography-props.js.map +1 -1
- package/build/hooks/use-zoom-out.js +24 -16
- package/build/hooks/use-zoom-out.js.map +1 -1
- package/build/layouts/constrained.js.map +1 -1
- package/build/layouts/flex.js.map +1 -1
- package/build/layouts/grid.js.map +1 -1
- package/build/layouts/utils.js.map +1 -1
- package/build/store/actions.js +18 -20
- package/build/store/actions.js.map +1 -1
- package/build/store/private-actions.js +15 -0
- package/build/store/private-actions.js.map +1 -1
- package/build/store/private-selectors.js +104 -7
- package/build/store/private-selectors.js.map +1 -1
- package/build/store/reducer.js +24 -44
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +149 -71
- package/build/store/selectors.js.map +1 -1
- package/build/store/utils.js +4 -3
- package/build/store/utils.js.map +1 -1
- package/build/utils/block-bindings.js +2 -0
- package/build/utils/block-bindings.js.map +1 -1
- package/build/utils/get-font-styles-and-weights.js +1 -1
- package/build/utils/get-font-styles-and-weights.js.map +1 -1
- package/build/utils/object.js +1 -0
- package/build/utils/object.js.map +1 -1
- package/build/utils/pasting.js.map +1 -1
- package/build-module/autocompleters/block.js +1 -3
- package/build-module/autocompleters/block.js.map +1 -1
- package/build-module/autocompleters/link.js +3 -4
- package/build-module/autocompleters/link.js.map +1 -1
- package/build-module/components/audio-player/index.native.js +1 -2
- package/build-module/components/audio-player/index.native.js.map +1 -1
- package/build-module/components/background-image-control/index.js +2 -3
- package/build-module/components/background-image-control/index.js.map +1 -1
- package/build-module/components/block-actions/index.js +1 -13
- package/build-module/components/block-actions/index.js.map +1 -1
- package/build-module/components/block-alignment-control/ui.js +1 -2
- package/build-module/components/block-alignment-control/ui.js.map +1 -1
- package/build-module/components/block-breadcrumb/index.js +1 -2
- package/build-module/components/block-breadcrumb/index.js.map +1 -1
- package/build-module/components/block-canvas/index.js +1 -2
- package/build-module/components/block-canvas/index.js.map +1 -1
- package/build-module/components/block-card/index.js +1 -2
- package/build-module/components/block-card/index.js.map +1 -1
- package/build-module/components/block-compare/block-view.js +1 -2
- package/build-module/components/block-compare/block-view.js.map +1 -1
- package/build-module/components/block-compare/index.js +1 -2
- package/build-module/components/block-compare/index.js.map +1 -1
- package/build-module/components/block-controls/fill.js +1 -3
- package/build-module/components/block-controls/fill.js.map +1 -1
- package/build-module/components/block-controls/slot.js.map +1 -1
- package/build-module/components/block-controls/slot.native.js.map +1 -1
- package/build-module/components/block-draggable/draggable-chip.js +2 -3
- package/build-module/components/block-draggable/draggable-chip.js.map +1 -1
- package/build-module/components/block-draggable/draggable-chip.native.js +1 -2
- package/build-module/components/block-draggable/draggable-chip.native.js.map +1 -1
- package/build-module/components/block-draggable/index.native.js +1 -3
- package/build-module/components/block-draggable/index.native.js.map +1 -1
- package/build-module/components/block-edit/index.js +1 -2
- package/build-module/components/block-edit/index.js.map +1 -1
- package/build-module/components/block-edit/multiple-usage-warning.js +1 -2
- package/build-module/components/block-edit/multiple-usage-warning.js.map +1 -1
- package/build-module/components/block-inspector/index.js +57 -78
- package/build-module/components/block-inspector/index.js.map +1 -1
- package/build-module/components/block-list/block-crash-warning.js +1 -1
- package/build-module/components/block-list/block-crash-warning.js.map +1 -1
- package/build-module/components/block-list/block-crash-warning.native.js +1 -1
- package/build-module/components/block-list/block-crash-warning.native.js.map +1 -1
- package/build-module/components/block-list/block-invalid-warning.js +1 -3
- package/build-module/components/block-list/block-invalid-warning.js.map +1 -1
- package/build-module/components/block-list/block-invalid-warning.native.js +1 -1
- package/build-module/components/block-list/block-invalid-warning.native.js.map +1 -1
- package/build-module/components/block-list/block-list-item.native.js +1 -2
- package/build-module/components/block-list/block-list-item.native.js.map +1 -1
- package/build-module/components/block-list/block-selection-button.native.js +1 -2
- package/build-module/components/block-list/block-selection-button.native.js.map +1 -1
- package/build-module/components/block-list/block.js +6 -19
- package/build-module/components/block-list/block.js.map +1 -1
- package/build-module/components/block-list/block.native.js +1 -2
- package/build-module/components/block-list/block.native.js.map +1 -1
- package/build-module/components/block-list/index.js +7 -10
- package/build-module/components/block-list/index.js.map +1 -1
- package/build-module/components/block-list/index.native.js +1 -3
- package/build-module/components/block-list/index.native.js.map +1 -1
- package/build-module/components/block-list/insertion-point.native.js +1 -2
- package/build-module/components/block-list/insertion-point.native.js.map +1 -1
- package/build-module/components/block-list/use-block-props/index.js +3 -8
- package/build-module/components/block-list/use-block-props/index.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.js +14 -6
- 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 +5 -3
- package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
- package/build-module/components/block-list/zoom-out-separator.js +24 -13
- package/build-module/components/block-list/zoom-out-separator.js.map +1 -1
- package/build-module/components/block-lock/menu-item.js +1 -3
- package/build-module/components/block-lock/menu-item.js.map +1 -1
- package/build-module/components/block-lock/modal.js +2 -3
- package/build-module/components/block-lock/modal.js.map +1 -1
- package/build-module/components/block-lock/toolbar.js +1 -3
- package/build-module/components/block-lock/toolbar.js.map +1 -1
- package/build-module/components/block-media-update-progress/index.native.js +1 -2
- package/build-module/components/block-media-update-progress/index.native.js.map +1 -1
- package/build-module/components/block-mover/button.js +1 -3
- package/build-module/components/block-mover/button.js.map +1 -1
- package/build-module/components/block-mover/index.js +1 -2
- package/build-module/components/block-mover/index.js.map +1 -1
- package/build-module/components/block-mover/index.native.js +1 -2
- package/build-module/components/block-mover/index.native.js.map +1 -1
- package/build-module/components/block-navigation/dropdown.js +3 -6
- package/build-module/components/block-navigation/dropdown.js.map +1 -1
- package/build-module/components/block-parent-selector/index.js +14 -11
- package/build-module/components/block-parent-selector/index.js.map +1 -1
- package/build-module/components/block-pattern-setup/index.js +1 -3
- package/build-module/components/block-pattern-setup/index.js.map +1 -1
- package/build-module/components/block-pattern-setup/setup-toolbar.js +11 -22
- package/build-module/components/block-pattern-setup/setup-toolbar.js.map +1 -1
- package/build-module/components/block-patterns-list/index.js +1 -3
- package/build-module/components/block-patterns-list/index.js.map +1 -1
- package/build-module/components/block-patterns-paging/index.js +12 -15
- package/build-module/components/block-patterns-paging/index.js.map +1 -1
- package/build-module/components/block-popover/index.js +45 -2
- package/build-module/components/block-popover/index.js.map +1 -1
- package/build-module/components/block-preview/auto.js +2 -7
- package/build-module/components/block-preview/auto.js.map +1 -1
- package/build-module/components/block-preview/index.js +1 -2
- package/build-module/components/block-preview/index.js.map +1 -1
- package/build-module/components/block-quick-navigation/index.js +3 -6
- package/build-module/components/block-quick-navigation/index.js.map +1 -1
- package/build-module/components/block-removal-warning-modal/index.js +1 -2
- package/build-module/components/block-removal-warning-modal/index.js.map +1 -1
- package/build-module/components/block-rename/modal.js +3 -4
- package/build-module/components/block-rename/modal.js.map +1 -1
- package/build-module/components/block-rename/rename-control.js +1 -3
- package/build-module/components/block-rename/rename-control.js.map +1 -1
- package/build-module/components/block-settings/container.native.js +1 -3
- package/build-module/components/block-settings/container.native.js.map +1 -1
- package/build-module/components/block-settings-menu/block-parent-selector-menu-item.js +1 -1
- package/build-module/components/block-settings-menu/block-parent-selector-menu-item.js.map +1 -1
- package/build-module/components/block-settings-menu/block-settings-dropdown.js +80 -79
- package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build-module/components/block-settings-menu-controls/index.js +3 -9
- package/build-module/components/block-settings-menu-controls/index.js.map +1 -1
- package/build-module/components/block-styles/index.js +1 -2
- package/build-module/components/block-styles/index.js.map +1 -1
- package/build-module/components/block-styles/menu-items.js +1 -2
- package/build-module/components/block-styles/menu-items.js.map +1 -1
- package/build-module/components/block-styles/preview.native.js +1 -2
- package/build-module/components/block-styles/preview.native.js.map +1 -1
- package/build-module/components/block-switcher/block-transformations-menu.js +1 -3
- package/build-module/components/block-switcher/block-transformations-menu.js.map +1 -1
- package/build-module/components/block-switcher/block-transformations-menu.native.js +1 -1
- package/build-module/components/block-switcher/block-transformations-menu.native.js.map +1 -1
- package/build-module/components/block-switcher/block-variation-transformations.js +1 -3
- package/build-module/components/block-switcher/block-variation-transformations.js.map +1 -1
- package/build-module/components/block-switcher/index.js +20 -18
- package/build-module/components/block-switcher/index.js.map +1 -1
- package/build-module/components/block-switcher/pattern-transformations-menu.js +1 -2
- 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 +1 -0
- package/build-module/components/block-switcher/use-transformed-patterns.js.map +1 -1
- package/build-module/components/block-switcher/utils.js +1 -0
- package/build-module/components/block-switcher/utils.js.map +1 -1
- package/build-module/components/block-toolbar/block-toolbar-menu.native.js +1 -2
- package/build-module/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
- package/build-module/components/block-toolbar/index.js +17 -22
- package/build-module/components/block-toolbar/index.js.map +1 -1
- package/build-module/components/block-toolbar/index.native.js +1 -3
- package/build-module/components/block-toolbar/index.native.js.map +1 -1
- package/build-module/components/block-toolbar/use-has-block-toolbar.js +3 -5
- package/build-module/components/block-toolbar/use-has-block-toolbar.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 +2 -6
- package/build-module/components/block-tools/insertion-point.js.map +1 -1
- package/build-module/components/block-tools/use-show-block-tools.js +8 -7
- package/build-module/components/block-tools/use-show-block-tools.js.map +1 -1
- package/build-module/components/block-tools/zoom-out-mode-inserter-button.js +1 -12
- package/build-module/components/block-tools/zoom-out-mode-inserter-button.js.map +1 -1
- package/build-module/components/block-tools/zoom-out-mode-inserters.js +14 -17
- package/build-module/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
- package/build-module/components/block-tools/zoom-out-popover.js +2 -1
- package/build-module/components/block-tools/zoom-out-popover.js.map +1 -1
- package/build-module/components/block-tools/zoom-out-toolbar.js +7 -35
- package/build-module/components/block-tools/zoom-out-toolbar.js.map +1 -1
- package/build-module/components/block-types-list/index.js +1 -2
- package/build-module/components/block-types-list/index.js.map +1 -1
- package/build-module/components/block-types-list/index.native.js +1 -2
- package/build-module/components/block-types-list/index.native.js.map +1 -1
- package/build-module/components/block-variation-picker/index.js +1 -2
- package/build-module/components/block-variation-picker/index.js.map +1 -1
- package/build-module/components/block-variation-picker/index.native.js +1 -2
- package/build-module/components/block-variation-picker/index.native.js.map +1 -1
- package/build-module/components/block-variation-transforms/index.js +4 -4
- package/build-module/components/block-variation-transforms/index.js.map +1 -1
- package/build-module/components/border-radius-control/index.js +1 -3
- package/build-module/components/border-radius-control/index.js.map +1 -1
- package/build-module/components/border-radius-control/utils.js.map +1 -1
- package/build-module/components/button-block-appender/index.js.map +1 -1
- package/build-module/components/button-block-appender/index.native.js +1 -2
- package/build-module/components/button-block-appender/index.native.js.map +1 -1
- package/build-module/components/child-layout-control/index.js +1 -3
- package/build-module/components/child-layout-control/index.js.map +1 -1
- package/build-module/components/color-style-selector/index.js.map +1 -1
- package/build-module/components/colors/utils.js.map +1 -1
- package/build-module/components/colors/with-colors.js.map +1 -1
- package/build-module/components/colors-gradients/control.js +1 -2
- package/build-module/components/colors-gradients/control.js.map +1 -1
- package/build-module/components/colors-gradients/dropdown.js +1 -3
- package/build-module/components/colors-gradients/dropdown.js.map +1 -1
- package/build-module/components/colors-gradients/panel-color-gradient-settings.js +1 -3
- 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 +1 -3
- package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
- package/build-module/components/contrast-checker/index.native.js +1 -2
- package/build-module/components/contrast-checker/index.native.js.map +1 -1
- package/build-module/components/convert-to-group-buttons/index.js +1 -3
- package/build-module/components/convert-to-group-buttons/index.js.map +1 -1
- package/build-module/components/convert-to-group-buttons/toolbar.js +1 -2
- package/build-module/components/convert-to-group-buttons/toolbar.js.map +1 -1
- package/build-module/components/date-format-picker/index.js +2 -2
- package/build-module/components/date-format-picker/index.js.map +1 -1
- package/build-module/components/default-block-appender/index.js +1 -2
- package/build-module/components/default-block-appender/index.js.map +1 -1
- package/build-module/components/dimensions-tool/index.js +1 -3
- package/build-module/components/dimensions-tool/index.js.map +1 -1
- package/build-module/components/dimensions-tool/width-height-tool.js +1 -3
- package/build-module/components/dimensions-tool/width-height-tool.js.map +1 -1
- package/build-module/components/duotone/utils.js.map +1 -1
- package/build-module/components/duotone-control/index.js +1 -2
- package/build-module/components/duotone-control/index.js.map +1 -1
- package/build-module/components/editor-styles/index.js +1 -3
- package/build-module/components/editor-styles/index.js.map +1 -1
- package/build-module/components/floating-toolbar/index.native.js +1 -2
- package/build-module/components/floating-toolbar/index.native.js.map +1 -1
- package/build-module/components/floating-toolbar/nav-up-icon.js +1 -2
- package/build-module/components/floating-toolbar/nav-up-icon.js.map +1 -1
- package/build-module/components/font-sizes/fluid-utils.js.map +1 -1
- package/build-module/components/font-sizes/utils.js.map +1 -1
- package/build-module/components/font-sizes/with-font-sizes.js +2 -2
- package/build-module/components/font-sizes/with-font-sizes.js.map +1 -1
- package/build-module/components/global-styles/advanced-panel.js +1 -2
- package/build-module/components/global-styles/advanced-panel.js.map +1 -1
- package/build-module/components/global-styles/border-panel.js +2 -3
- package/build-module/components/global-styles/border-panel.js.map +1 -1
- package/build-module/components/global-styles/color-panel.js +2 -3
- package/build-module/components/global-styles/color-panel.js.map +1 -1
- package/build-module/components/global-styles/dimensions-panel.js +2 -3
- package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
- package/build-module/components/global-styles/filters-panel.js +1 -2
- package/build-module/components/global-styles/filters-panel.js.map +1 -1
- package/build-module/components/global-styles/get-block-css-selector.js.map +1 -1
- package/build-module/components/global-styles/get-global-styles-changes.js +2 -1
- package/build-module/components/global-styles/get-global-styles-changes.js.map +1 -1
- package/build-module/components/global-styles/hooks.js.map +1 -1
- package/build-module/components/global-styles/image-settings-panel.js +1 -2
- package/build-module/components/global-styles/image-settings-panel.js.map +1 -1
- package/build-module/components/global-styles/shadow-panel-components.js +1 -2
- package/build-module/components/global-styles/shadow-panel-components.js.map +1 -1
- package/build-module/components/global-styles/typography-panel.js +1 -2
- package/build-module/components/global-styles/typography-panel.js.map +1 -1
- package/build-module/components/global-styles/use-global-styles-context.native.js.map +1 -1
- package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build-module/components/global-styles/utils.js.map +1 -1
- package/build-module/components/gradients/use-gradient.js.map +1 -1
- package/build-module/components/grid/grid-item-movers.js +1 -3
- package/build-module/components/grid/grid-item-movers.js.map +1 -1
- package/build-module/components/grid/grid-visualizer.js.map +1 -1
- package/build-module/components/height-control/index.js +1 -2
- package/build-module/components/height-control/index.js.map +1 -1
- package/build-module/components/iframe/index.js +45 -12
- package/build-module/components/iframe/index.js.map +1 -1
- package/build-module/components/image-editor/aspect-ratio-dropdown.js +1 -3
- package/build-module/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
- package/build-module/components/image-editor/cropper.js +1 -3
- package/build-module/components/image-editor/cropper.js.map +1 -1
- package/build-module/components/image-editor/form-controls.js +1 -3
- 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/use-save-image.js +1 -1
- package/build-module/components/image-editor/use-save-image.js.map +1 -1
- package/build-module/components/image-link-destinations/index.native.js +1 -3
- package/build-module/components/image-link-destinations/index.native.js.map +1 -1
- package/build-module/components/image-size-control/index.js +1 -3
- package/build-module/components/image-size-control/index.js.map +1 -1
- package/build-module/components/inner-blocks/index.js +1 -9
- package/build-module/components/inner-blocks/index.js.map +1 -1
- package/build-module/components/inner-blocks/use-nested-settings-update.js +16 -9
- package/build-module/components/inner-blocks/use-nested-settings-update.js.map +1 -1
- package/build-module/components/inner-blocks/warning-max-depth-exceeded.native.js +1 -2
- package/build-module/components/inner-blocks/warning-max-depth-exceeded.native.js.map +1 -1
- package/build-module/components/inserter/block-patterns-explorer/index.js +1 -2
- package/build-module/components/inserter/block-patterns-explorer/index.js.map +1 -1
- package/build-module/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js +2 -3
- package/build-module/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js.map +1 -1
- package/build-module/components/inserter/block-patterns-explorer/pattern-list.js +3 -5
- package/build-module/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab/index.js +1 -3
- package/build-module/components/inserter/block-patterns-tab/index.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js +1 -3
- package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab/patterns-filter.js +1 -3
- package/build-module/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab/use-pattern-categories.js +1 -1
- package/build-module/components/inserter/block-patterns-tab/use-pattern-categories.js.map +1 -1
- package/build-module/components/inserter/block-types-tab.js +2 -4
- package/build-module/components/inserter/block-types-tab.js.map +1 -1
- package/build-module/components/inserter/block-types-tab.native.js.map +1 -1
- package/build-module/components/inserter/category-tabs/index.js +3 -13
- package/build-module/components/inserter/category-tabs/index.js.map +1 -1
- package/build-module/components/inserter/hooks/use-block-types-state.js +27 -8
- package/build-module/components/inserter/hooks/use-block-types-state.js.map +1 -1
- package/build-module/components/inserter/hooks/use-insertion-point.js +22 -12
- package/build-module/components/inserter/hooks/use-insertion-point.js.map +1 -1
- package/build-module/components/inserter/hooks/use-patterns-state.js +24 -11
- package/build-module/components/inserter/hooks/use-patterns-state.js.map +1 -1
- package/build-module/components/inserter/index.native.js +1 -3
- package/build-module/components/inserter/index.native.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-panel.js +1 -2
- package/build-module/components/inserter/media-tab/media-panel.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-preview.js +37 -17
- package/build-module/components/inserter/media-tab/media-preview.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-tab.js +1 -3
- package/build-module/components/inserter/media-tab/media-tab.js.map +1 -1
- package/build-module/components/inserter/media-tab/utils.js.map +1 -1
- package/build-module/components/inserter/menu.js +5 -7
- package/build-module/components/inserter/menu.js.map +1 -1
- package/build-module/components/inserter/menu.native.js +1 -3
- package/build-module/components/inserter/menu.native.js.map +1 -1
- package/build-module/components/inserter/mobile-tab-navigation.js +7 -8
- package/build-module/components/inserter/mobile-tab-navigation.js.map +1 -1
- package/build-module/components/inserter/no-results.js +1 -2
- package/build-module/components/inserter/no-results.js.map +1 -1
- package/build-module/components/inserter/no-results.native.js +1 -2
- package/build-module/components/inserter/no-results.native.js.map +1 -1
- package/build-module/components/inserter/panel.js +1 -3
- package/build-module/components/inserter/panel.js.map +1 -1
- package/build-module/components/inserter/preview-panel.js +1 -2
- package/build-module/components/inserter/preview-panel.js.map +1 -1
- package/build-module/components/inserter/quick-inserter.js +6 -7
- package/build-module/components/inserter/quick-inserter.js.map +1 -1
- package/build-module/components/inserter/search-results.js +2 -3
- package/build-module/components/inserter/search-results.js.map +1 -1
- package/build-module/components/inserter/tabs.native.js.map +1 -1
- package/build-module/components/inserter-button/index.native.js +1 -2
- package/build-module/components/inserter-button/index.native.js.map +1 -1
- package/build-module/components/inserter-list-item/index.js +1 -2
- package/build-module/components/inserter-list-item/index.js.map +1 -1
- package/build-module/components/inserter-listbox/index.js +1 -2
- package/build-module/components/inserter-listbox/index.js.map +1 -1
- package/build-module/components/inspector-controls/block-support-tools-panel.js.map +1 -1
- package/build-module/components/inspector-controls/fill.js.map +1 -1
- package/build-module/components/inspector-controls/fill.native.js +1 -3
- package/build-module/components/inspector-controls/fill.native.js.map +1 -1
- package/build-module/components/inspector-controls/slot.js.map +1 -1
- package/build-module/components/inspector-controls/slot.native.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/index.js +1 -2
- package/build-module/components/inspector-controls-tabs/index.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/settings-tab.js +1 -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 -3
- package/build-module/components/inspector-controls-tabs/styles-tab.js.map +1 -1
- package/build-module/components/inspector-popover-header/index.js +1 -2
- package/build-module/components/inspector-popover-header/index.js.map +1 -1
- package/build-module/components/line-height-control/index.js.map +1 -1
- package/build-module/components/link-control/index.js +2 -5
- package/build-module/components/link-control/index.js.map +1 -1
- package/build-module/components/link-control/is-url-like.js.map +1 -1
- package/build-module/components/link-control/link-preview.js +1 -3
- package/build-module/components/link-control/link-preview.js.map +1 -1
- package/build-module/components/link-control/search-create-button.js +1 -1
- package/build-module/components/link-control/search-create-button.js.map +1 -1
- package/build-module/components/link-control/search-input.js +4 -7
- package/build-module/components/link-control/search-input.js.map +1 -1
- package/build-module/components/link-control/search-results.js +6 -17
- package/build-module/components/link-control/search-results.js.map +1 -1
- package/build-module/components/link-control/settings-drawer.js +1 -3
- package/build-module/components/link-control/settings-drawer.js.map +1 -1
- package/build-module/components/link-control/settings.js +1 -2
- package/build-module/components/link-control/settings.js.map +1 -1
- package/build-module/components/link-control/use-rich-url-data.js.map +1 -1
- package/build-module/components/list-view/appender.js +2 -3
- package/build-module/components/list-view/appender.js.map +1 -1
- package/build-module/components/list-view/block-contents.js +2 -28
- package/build-module/components/list-view/block-contents.js.map +1 -1
- package/build-module/components/list-view/block-select-button.js +1 -2
- package/build-module/components/list-view/block-select-button.js.map +1 -1
- package/build-module/components/list-view/block.js +1 -3
- package/build-module/components/list-view/block.js.map +1 -1
- package/build-module/components/list-view/branch.js +1 -3
- package/build-module/components/list-view/branch.js.map +1 -1
- package/build-module/components/list-view/drop-indicator.js +1 -2
- package/build-module/components/list-view/drop-indicator.js.map +1 -1
- package/build-module/components/list-view/index.js +1 -2
- package/build-module/components/list-view/index.js.map +1 -1
- package/build-module/components/list-view/use-block-selection.js +2 -2
- package/build-module/components/list-view/use-block-selection.js.map +1 -1
- package/build-module/components/list-view/utils.js +1 -1
- package/build-module/components/list-view/utils.js.map +1 -1
- package/build-module/components/media-placeholder/index.js +1 -3
- package/build-module/components/media-placeholder/index.js.map +1 -1
- package/build-module/components/media-placeholder/index.native.js +2 -4
- package/build-module/components/media-placeholder/index.native.js.map +1 -1
- package/build-module/components/media-replace-flow/index.js +1 -3
- package/build-module/components/media-replace-flow/index.js.map +1 -1
- package/build-module/components/media-upload/index.native.js +1 -3
- package/build-module/components/media-upload/index.native.js.map +1 -1
- package/build-module/components/media-upload-progress/index.native.js +1 -2
- package/build-module/components/media-upload-progress/index.native.js.map +1 -1
- package/build-module/components/multi-selection-inspector/index.js +3 -4
- package/build-module/components/multi-selection-inspector/index.js.map +1 -1
- package/build-module/components/observe-typing/index.js +1 -0
- package/build-module/components/observe-typing/index.js.map +1 -1
- package/build-module/components/provider/index.js +1 -2
- package/build-module/components/provider/index.js.map +1 -1
- package/build-module/components/publish-date-time-picker/index.js +1 -2
- package/build-module/components/publish-date-time-picker/index.js.map +1 -1
- package/build-module/components/recursion-provider/index.js +1 -0
- package/build-module/components/recursion-provider/index.js.map +1 -1
- package/build-module/components/responsive-block-control/index.js +4 -5
- package/build-module/components/responsive-block-control/index.js.map +1 -1
- package/build-module/components/responsive-block-control/label.js +2 -4
- package/build-module/components/responsive-block-control/label.js.map +1 -1
- package/build-module/components/rich-text/content.js.map +1 -1
- package/build-module/components/rich-text/event-listeners/before-input-rules.js +2 -2
- package/build-module/components/rich-text/event-listeners/before-input-rules.js.map +1 -1
- package/build-module/components/rich-text/event-listeners/delete.js +2 -2
- package/build-module/components/rich-text/event-listeners/delete.js.map +1 -1
- package/build-module/components/rich-text/event-listeners/enter.js +2 -2
- package/build-module/components/rich-text/event-listeners/enter.js.map +1 -1
- package/build-module/components/rich-text/event-listeners/firefox-compat.js +2 -2
- package/build-module/components/rich-text/event-listeners/firefox-compat.js.map +1 -1
- package/build-module/components/rich-text/event-listeners/input-events.js +2 -2
- package/build-module/components/rich-text/event-listeners/input-events.js.map +1 -1
- package/build-module/components/rich-text/event-listeners/input-rules.js +2 -2
- package/build-module/components/rich-text/event-listeners/input-rules.js.map +1 -1
- package/build-module/components/rich-text/event-listeners/insert-replacement-text.js +2 -2
- package/build-module/components/rich-text/event-listeners/insert-replacement-text.js.map +1 -1
- package/build-module/components/rich-text/event-listeners/paste-handler.js +2 -2
- package/build-module/components/rich-text/event-listeners/paste-handler.js.map +1 -1
- package/build-module/components/rich-text/event-listeners/remove-browser-shortcuts.js +2 -2
- package/build-module/components/rich-text/event-listeners/remove-browser-shortcuts.js.map +1 -1
- package/build-module/components/rich-text/event-listeners/shortcuts.js +2 -2
- package/build-module/components/rich-text/event-listeners/shortcuts.js.map +1 -1
- package/build-module/components/rich-text/event-listeners/undo-automatic-change.js +2 -2
- package/build-module/components/rich-text/event-listeners/undo-automatic-change.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-toolbar/index.js +1 -3
- 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/index.js +4 -5
- package/build-module/components/rich-text/index.js.map +1 -1
- package/build-module/components/rich-text/index.native.js +1 -3
- package/build-module/components/rich-text/index.native.js.map +1 -1
- package/build-module/components/rich-text/multiline.js.map +1 -1
- package/build-module/components/rich-text/native/get-format-colors.native.js.map +1 -1
- package/build-module/components/rich-text/native/index.js +1 -1
- package/build-module/components/rich-text/native/index.js.map +1 -1
- package/build-module/components/rich-text/native/index.native.js +1 -3
- package/build-module/components/rich-text/native/index.native.js.map +1 -1
- package/build-module/components/rich-text/native/toolbar-button-with-options.native.js +1 -3
- package/build-module/components/rich-text/native/toolbar-button-with-options.native.js.map +1 -1
- package/build-module/components/rich-text/native/use-format-types.js +1 -0
- package/build-module/components/rich-text/native/use-format-types.js.map +1 -1
- package/build-module/components/rich-text/toolbar-button.js.map +1 -1
- package/build-module/components/rich-text/use-format-types.js +1 -0
- package/build-module/components/rich-text/use-format-types.js.map +1 -1
- package/build-module/components/spacing-sizes-control/index.js +1 -2
- package/build-module/components/spacing-sizes-control/index.js.map +1 -1
- package/build-module/components/spacing-sizes-control/input-controls/axial.js +1 -2
- 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 +1 -2
- package/build-module/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
- package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js +1 -3
- package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
- package/build-module/components/spacing-sizes-control/utils.js +1 -0
- package/build-module/components/spacing-sizes-control/utils.js.map +1 -1
- package/build-module/components/tabbed-sidebar/index.js +1 -2
- package/build-module/components/tabbed-sidebar/index.js.map +1 -1
- package/build-module/components/tool-selector/index.js +14 -11
- package/build-module/components/tool-selector/index.js.map +1 -1
- package/build-module/components/typewriter/index.js +1 -0
- package/build-module/components/typewriter/index.js.map +1 -1
- package/build-module/components/unsupported-block-details/index.native.js +1 -2
- package/build-module/components/unsupported-block-details/index.native.js.map +1 -1
- package/build-module/components/url-input/button.js +1 -2
- package/build-module/components/url-input/button.js.map +1 -1
- package/build-module/components/url-input/index.js +2 -4
- package/build-module/components/url-input/index.js.map +1 -1
- package/build-module/components/url-popover/image-url-input-ui.js +1 -3
- package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
- package/build-module/components/url-popover/index.js +1 -2
- package/build-module/components/url-popover/index.js.map +1 -1
- package/build-module/components/url-popover/link-editor.js +1 -2
- package/build-module/components/url-popover/link-editor.js.map +1 -1
- package/build-module/components/url-popover/link-viewer.js +1 -2
- package/build-module/components/url-popover/link-viewer.js.map +1 -1
- package/build-module/components/use-block-commands/index.js +1 -62
- package/build-module/components/use-block-commands/index.js.map +1 -1
- package/build-module/components/use-block-drop-zone/index.js.map +1 -1
- package/build-module/components/use-flash-editable-blocks/index.js.map +1 -1
- package/build-module/components/use-moving-animation/index.js.map +1 -1
- package/build-module/components/video-player/index.native.js +1 -2
- package/build-module/components/video-player/index.native.js.map +1 -1
- package/build-module/components/warning/index.js +1 -2
- package/build-module/components/warning/index.js.map +1 -1
- package/build-module/components/warning/index.native.js +1 -2
- package/build-module/components/warning/index.native.js.map +1 -1
- package/build-module/components/writing-flow/index.js +1 -3
- package/build-module/components/writing-flow/index.js.map +1 -1
- package/build-module/components/writing-flow/use-tab-nav.js +24 -31
- package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
- package/build-module/hooks/align.js.map +1 -1
- package/build-module/hooks/anchor.js +1 -3
- package/build-module/hooks/anchor.js.map +1 -1
- package/build-module/hooks/block-bindings.js +1 -3
- package/build-module/hooks/block-bindings.js.map +1 -1
- package/build-module/hooks/block-hooks.js +2 -3
- package/build-module/hooks/block-hooks.js.map +1 -1
- package/build-module/hooks/block-style-variation.js +1 -2
- package/build-module/hooks/block-style-variation.js.map +1 -1
- package/build-module/hooks/dimensions.js +1 -3
- package/build-module/hooks/dimensions.js.map +1 -1
- package/build-module/hooks/duotone.js +5 -4
- package/build-module/hooks/duotone.js.map +1 -1
- package/build-module/hooks/font-family.js.map +1 -1
- package/build-module/hooks/gap.js.map +1 -1
- package/build-module/hooks/generated-class-name.js +1 -0
- package/build-module/hooks/generated-class-name.js.map +1 -1
- package/build-module/hooks/grid-visualizer.js +1 -3
- package/build-module/hooks/grid-visualizer.js.map +1 -1
- package/build-module/hooks/layout-child.js +5 -4
- package/build-module/hooks/layout-child.js.map +1 -1
- package/build-module/hooks/layout.js +1 -3
- package/build-module/hooks/layout.js.map +1 -1
- package/build-module/hooks/position.js +5 -2
- package/build-module/hooks/position.js.map +1 -1
- package/build-module/hooks/spacing-visualizer.js.map +1 -1
- package/build-module/hooks/style.js +1 -3
- package/build-module/hooks/style.js.map +1 -1
- package/build-module/hooks/text-align.js.map +1 -1
- package/build-module/hooks/typography.native.js +1 -2
- package/build-module/hooks/typography.native.js.map +1 -1
- package/build-module/hooks/use-bindings-attributes.js +1 -2
- package/build-module/hooks/use-bindings-attributes.js.map +1 -1
- package/build-module/hooks/use-typography-props.js.map +1 -1
- package/build-module/hooks/use-zoom-out.js +24 -17
- package/build-module/hooks/use-zoom-out.js.map +1 -1
- package/build-module/layouts/constrained.js +1 -3
- package/build-module/layouts/constrained.js.map +1 -1
- package/build-module/layouts/flex.js +1 -3
- package/build-module/layouts/flex.js.map +1 -1
- package/build-module/layouts/grid.js +1 -3
- package/build-module/layouts/grid.js.map +1 -1
- package/build-module/layouts/utils.js.map +1 -1
- package/build-module/store/actions.js +17 -18
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/private-actions.js +14 -0
- package/build-module/store/private-actions.js.map +1 -1
- package/build-module/store/private-selectors.js +98 -7
- package/build-module/store/private-selectors.js.map +1 -1
- package/build-module/store/reducer.js +22 -41
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +150 -70
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/store/utils.js +3 -2
- package/build-module/store/utils.js.map +1 -1
- package/build-module/utils/block-bindings.js +2 -0
- package/build-module/utils/block-bindings.js.map +1 -1
- package/build-module/utils/get-font-styles-and-weights.js +1 -1
- package/build-module/utils/get-font-styles-and-weights.js.map +1 -1
- package/build-module/utils/get-px-from-css-unit.js +1 -1
- package/build-module/utils/get-px-from-css-unit.js.map +1 -1
- package/build-module/utils/object.js +1 -0
- package/build-module/utils/object.js.map +1 -1
- package/build-module/utils/pasting.js.map +1 -1
- package/build-style/content-rtl.css +22 -73
- package/build-style/content.css +22 -73
- package/build-style/default-editor-styles-rtl.css +10 -1
- package/build-style/default-editor-styles.css +10 -1
- package/build-style/style-rtl.css +48 -165
- package/build-style/style.css +48 -165
- package/package.json +33 -33
- package/src/autocompleters/link.js +2 -1
- package/src/components/block-actions/index.js +1 -13
- package/src/components/block-canvas/style.scss +0 -1
- package/src/components/block-draggable/style.scss +2 -2
- package/src/components/block-inspector/index.js +79 -95
- package/src/components/block-list/block.js +7 -25
- package/src/components/block-list/content.scss +4 -63
- package/src/components/block-list/index.js +21 -29
- package/src/components/block-list/use-block-props/index.js +2 -8
- package/src/components/block-list/use-block-props/use-selected-block-event-handlers.js +25 -4
- package/src/components/block-list/use-in-between-inserter.js +5 -2
- package/src/components/block-list/zoom-out-separator.js +32 -14
- package/src/components/block-navigation/dropdown.js +1 -2
- package/src/components/block-parent-selector/index.js +13 -10
- package/src/components/block-pattern-setup/setup-toolbar.js +5 -10
- package/src/components/block-patterns-paging/index.js +8 -7
- package/src/components/block-patterns-paging/style.scss +10 -27
- package/src/components/block-popover/index.js +64 -2
- package/src/components/block-preview/auto.js +1 -4
- package/src/components/block-quick-navigation/index.js +1 -2
- package/src/components/block-settings-menu/block-settings-dropdown.js +120 -106
- package/src/components/block-settings-menu-controls/index.js +0 -15
- package/src/components/block-switcher/index.js +37 -30
- package/src/components/block-toolbar/index.js +22 -34
- package/src/components/block-toolbar/style.scss +10 -1
- package/src/components/block-toolbar/use-has-block-toolbar.js +19 -31
- package/src/components/block-tools/index.js +7 -27
- package/src/components/block-tools/insertion-point.js +1 -4
- package/src/components/block-tools/style.scss +0 -90
- package/src/components/block-tools/use-show-block-tools.js +10 -13
- package/src/components/block-tools/zoom-out-mode-inserter-button.js +2 -17
- package/src/components/block-tools/zoom-out-mode-inserters.js +11 -19
- package/src/components/block-tools/zoom-out-popover.js +2 -1
- package/src/components/block-tools/zoom-out-toolbar.js +4 -36
- package/src/components/font-family/README.md +5 -1
- package/src/components/global-styles/border-panel.js +1 -1
- package/src/components/global-styles/dimensions-panel.js +1 -1
- package/src/components/iframe/content.scss +20 -24
- package/src/components/iframe/index.js +56 -12
- package/src/components/iframe/style.scss +6 -5
- package/src/components/inner-blocks/index.js +1 -16
- package/src/components/inner-blocks/use-nested-settings-update.js +16 -10
- package/src/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js +1 -1
- package/src/components/inserter/block-types-tab.js +1 -1
- package/src/components/inserter/category-tabs/index.js +1 -11
- package/src/components/inserter/hooks/use-block-types-state.js +34 -14
- package/src/components/inserter/hooks/use-insertion-point.js +35 -13
- package/src/components/inserter/hooks/use-patterns-state.js +46 -9
- package/src/components/inserter/media-tab/media-preview.js +38 -12
- package/src/components/inserter/menu.js +4 -4
- package/src/components/inserter/mobile-tab-navigation.js +10 -13
- package/src/components/inserter/quick-inserter.js +6 -5
- package/src/components/inserter/style.scss +1 -69
- package/src/components/inspector-controls-tabs/style.scss +2 -6
- package/src/components/link-control/index.js +0 -1
- package/src/components/link-control/search-input.js +4 -5
- package/src/components/link-control/search-results.js +2 -13
- package/src/components/link-control/test/index.js +84 -46
- package/src/components/list-view/block-contents.js +1 -28
- package/src/components/list-view/style.scss +0 -14
- package/src/components/media-replace-flow/test/index.js +1 -1
- package/src/components/responsive-block-control/style.scss +0 -1
- package/src/components/rich-text/style.scss +5 -0
- package/src/components/tool-selector/index.js +15 -7
- package/src/components/tool-selector/style.scss +5 -0
- package/src/components/use-block-commands/index.js +0 -58
- package/src/components/writing-flow/use-tab-nav.js +32 -40
- package/src/content.scss +0 -1
- package/src/hooks/duotone.js +4 -1
- package/src/hooks/layout-child.js +4 -1
- package/src/hooks/position.js +4 -1
- package/src/hooks/use-zoom-out.js +36 -20
- package/src/store/actions.js +17 -15
- package/src/store/private-actions.js +14 -0
- package/src/store/private-selectors.js +120 -16
- package/src/store/reducer.js +22 -45
- package/src/store/selectors.js +218 -118
- package/src/store/test/private-actions.js +15 -0
- package/src/store/test/private-selectors.js +41 -1
- package/src/store/test/reducer.js +40 -4
- package/src/store/test/selectors.js +195 -21
- package/src/store/utils.js +4 -2
- package/src/style.scss +1 -0
- package/src/utils/block-bindings.js +2 -0
- package/build/components/block-controls/use-has-block-controls.js +0 -43
- package/build/components/block-controls/use-has-block-controls.js.map +0 -1
- package/build/components/block-list/use-block-props/use-nav-mode-exit.js +0 -54
- package/build/components/block-list/use-block-props/use-nav-mode-exit.js.map +0 -1
- package/build/components/block-tools/block-selection-button.js +0 -259
- package/build/components/block-tools/block-selection-button.js.map +0 -1
- package/build/components/block-tools/block-toolbar-breadcrumb.js +0 -57
- package/build/components/block-tools/block-toolbar-breadcrumb.js.map +0 -1
- package/build/components/inserter/tabs.js +0 -78
- package/build/components/inserter/tabs.js.map +0 -1
- package/build-module/components/block-controls/use-has-block-controls.js +0 -34
- package/build-module/components/block-controls/use-has-block-controls.js.map +0 -1
- package/build-module/components/block-list/use-block-props/use-nav-mode-exit.js +0 -48
- package/build-module/components/block-list/use-block-props/use-nav-mode-exit.js.map +0 -1
- package/build-module/components/block-tools/block-selection-button.js +0 -254
- package/build-module/components/block-tools/block-selection-button.js.map +0 -1
- package/build-module/components/block-tools/block-toolbar-breadcrumb.js +0 -49
- package/build-module/components/block-tools/block-toolbar-breadcrumb.js.map +0 -1
- package/build-module/components/inserter/tabs.js +0 -72
- package/build-module/components/inserter/tabs.js.map +0 -1
- package/src/components/block-controls/use-has-block-controls.js +0 -35
- package/src/components/block-list/use-block-props/use-nav-mode-exit.js +0 -46
- package/src/components/block-tools/block-selection-button.js +0 -302
- package/src/components/block-tools/block-toolbar-breadcrumb.js +0 -51
- package/src/components/inner-blocks/content.scss +0 -13
- package/src/components/inserter/tabs.js +0 -78
- package/src/components/inserter/test/block-types-tab.native.js +0 -67
|
@@ -1,259 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _clsx = _interopRequireDefault(require("clsx"));
|
|
9
|
-
var _icons = require("@wordpress/icons");
|
|
10
|
-
var _components = require("@wordpress/components");
|
|
11
|
-
var _data = require("@wordpress/data");
|
|
12
|
-
var _element = require("@wordpress/element");
|
|
13
|
-
var _keycodes = require("@wordpress/keycodes");
|
|
14
|
-
var _blocks = require("@wordpress/blocks");
|
|
15
|
-
var _a11y = require("@wordpress/a11y");
|
|
16
|
-
var _dom = require("@wordpress/dom");
|
|
17
|
-
var _i18n = require("@wordpress/i18n");
|
|
18
|
-
var _blockTitle = _interopRequireDefault(require("../block-title"));
|
|
19
|
-
var _blockIcon = _interopRequireDefault(require("../block-icon"));
|
|
20
|
-
var _store = require("../../store");
|
|
21
|
-
var _blockDraggable = _interopRequireDefault(require("../block-draggable"));
|
|
22
|
-
var _useBlockRefs = require("../block-list/use-block-props/use-block-refs");
|
|
23
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
24
|
-
/**
|
|
25
|
-
* External dependencies
|
|
26
|
-
*/
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* WordPress dependencies
|
|
30
|
-
*/
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Internal dependencies
|
|
34
|
-
*/
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Block selection button component, displaying the label of the block. If the block
|
|
38
|
-
* descends from a root block, a button is displayed enabling the user to select
|
|
39
|
-
* the root block.
|
|
40
|
-
*
|
|
41
|
-
* @param {string} props Component props.
|
|
42
|
-
* @param {string} props.clientId Client ID of block.
|
|
43
|
-
* @param {Object} ref Reference to the component.
|
|
44
|
-
*
|
|
45
|
-
* @return {Component} The component to be rendered.
|
|
46
|
-
*/function BlockSelectionButton({
|
|
47
|
-
clientId,
|
|
48
|
-
rootClientId
|
|
49
|
-
}, ref) {
|
|
50
|
-
const selected = (0, _data.useSelect)(select => {
|
|
51
|
-
const {
|
|
52
|
-
getBlock,
|
|
53
|
-
getBlockIndex,
|
|
54
|
-
hasBlockMovingClientId,
|
|
55
|
-
getBlockListSettings,
|
|
56
|
-
__unstableGetEditorMode,
|
|
57
|
-
getNextBlockClientId,
|
|
58
|
-
getPreviousBlockClientId,
|
|
59
|
-
canMoveBlock
|
|
60
|
-
} = select(_store.store);
|
|
61
|
-
const {
|
|
62
|
-
getActiveBlockVariation,
|
|
63
|
-
getBlockType
|
|
64
|
-
} = select(_blocks.store);
|
|
65
|
-
const index = getBlockIndex(clientId);
|
|
66
|
-
const {
|
|
67
|
-
name,
|
|
68
|
-
attributes
|
|
69
|
-
} = getBlock(clientId);
|
|
70
|
-
const blockType = getBlockType(name);
|
|
71
|
-
const orientation = getBlockListSettings(rootClientId)?.orientation;
|
|
72
|
-
const match = getActiveBlockVariation(name, attributes);
|
|
73
|
-
return {
|
|
74
|
-
blockMovingMode: hasBlockMovingClientId(),
|
|
75
|
-
editorMode: __unstableGetEditorMode(),
|
|
76
|
-
icon: match?.icon || blockType.icon,
|
|
77
|
-
label: (0, _blocks.__experimentalGetAccessibleBlockLabel)(blockType, attributes, index + 1, orientation),
|
|
78
|
-
canMove: canMoveBlock(clientId, rootClientId),
|
|
79
|
-
getNextBlockClientId,
|
|
80
|
-
getPreviousBlockClientId
|
|
81
|
-
};
|
|
82
|
-
}, [clientId, rootClientId]);
|
|
83
|
-
const {
|
|
84
|
-
label,
|
|
85
|
-
icon,
|
|
86
|
-
blockMovingMode,
|
|
87
|
-
editorMode,
|
|
88
|
-
canMove
|
|
89
|
-
} = selected;
|
|
90
|
-
const {
|
|
91
|
-
setNavigationMode,
|
|
92
|
-
removeBlock
|
|
93
|
-
} = (0, _data.useDispatch)(_store.store);
|
|
94
|
-
|
|
95
|
-
// Focus the breadcrumb in navigation mode.
|
|
96
|
-
(0, _element.useEffect)(() => {
|
|
97
|
-
if (editorMode === 'navigation') {
|
|
98
|
-
ref.current.focus();
|
|
99
|
-
(0, _a11y.speak)(label);
|
|
100
|
-
}
|
|
101
|
-
}, [label, editorMode]);
|
|
102
|
-
const blockElement = (0, _useBlockRefs.useBlockElement)(clientId);
|
|
103
|
-
const {
|
|
104
|
-
hasBlockMovingClientId,
|
|
105
|
-
getBlockIndex,
|
|
106
|
-
getBlockRootClientId,
|
|
107
|
-
getClientIdsOfDescendants,
|
|
108
|
-
getSelectedBlockClientId,
|
|
109
|
-
getMultiSelectedBlocksEndClientId,
|
|
110
|
-
getPreviousBlockClientId,
|
|
111
|
-
getNextBlockClientId
|
|
112
|
-
} = (0, _data.useSelect)(_store.store);
|
|
113
|
-
const {
|
|
114
|
-
selectBlock,
|
|
115
|
-
clearSelectedBlock,
|
|
116
|
-
setBlockMovingClientId,
|
|
117
|
-
moveBlockToPosition
|
|
118
|
-
} = (0, _data.useDispatch)(_store.store);
|
|
119
|
-
function onKeyDown(event) {
|
|
120
|
-
const {
|
|
121
|
-
keyCode
|
|
122
|
-
} = event;
|
|
123
|
-
const isUp = keyCode === _keycodes.UP;
|
|
124
|
-
const isDown = keyCode === _keycodes.DOWN;
|
|
125
|
-
const isLeft = keyCode === _keycodes.LEFT;
|
|
126
|
-
const isRight = keyCode === _keycodes.RIGHT;
|
|
127
|
-
const isTab = keyCode === _keycodes.TAB;
|
|
128
|
-
const isEscape = keyCode === _keycodes.ESCAPE;
|
|
129
|
-
const isEnter = keyCode === _keycodes.ENTER;
|
|
130
|
-
const isSpace = keyCode === _keycodes.SPACE;
|
|
131
|
-
const isShift = event.shiftKey;
|
|
132
|
-
if (keyCode === _keycodes.BACKSPACE || keyCode === _keycodes.DELETE) {
|
|
133
|
-
removeBlock(clientId);
|
|
134
|
-
event.preventDefault();
|
|
135
|
-
return;
|
|
136
|
-
}
|
|
137
|
-
const selectedBlockClientId = getSelectedBlockClientId();
|
|
138
|
-
const selectionEndClientId = getMultiSelectedBlocksEndClientId();
|
|
139
|
-
const selectionBeforeEndClientId = getPreviousBlockClientId(selectionEndClientId || selectedBlockClientId);
|
|
140
|
-
const selectionAfterEndClientId = getNextBlockClientId(selectionEndClientId || selectedBlockClientId);
|
|
141
|
-
const navigateUp = isTab && isShift || isUp;
|
|
142
|
-
const navigateDown = isTab && !isShift || isDown;
|
|
143
|
-
// Move out of current nesting level (no effect if at root level).
|
|
144
|
-
const navigateOut = isLeft;
|
|
145
|
-
// Move into next nesting level (no effect if the current block has no innerBlocks).
|
|
146
|
-
const navigateIn = isRight;
|
|
147
|
-
let focusedBlockUid;
|
|
148
|
-
if (navigateUp) {
|
|
149
|
-
focusedBlockUid = selectionBeforeEndClientId;
|
|
150
|
-
} else if (navigateDown) {
|
|
151
|
-
focusedBlockUid = selectionAfterEndClientId;
|
|
152
|
-
} else if (navigateOut) {
|
|
153
|
-
var _getBlockRootClientId;
|
|
154
|
-
focusedBlockUid = (_getBlockRootClientId = getBlockRootClientId(selectedBlockClientId)) !== null && _getBlockRootClientId !== void 0 ? _getBlockRootClientId : selectedBlockClientId;
|
|
155
|
-
} else if (navigateIn) {
|
|
156
|
-
var _getClientIdsOfDescen;
|
|
157
|
-
focusedBlockUid = (_getClientIdsOfDescen = getClientIdsOfDescendants(selectedBlockClientId)[0]) !== null && _getClientIdsOfDescen !== void 0 ? _getClientIdsOfDescen : selectedBlockClientId;
|
|
158
|
-
}
|
|
159
|
-
const startingBlockClientId = hasBlockMovingClientId();
|
|
160
|
-
if (isEscape && startingBlockClientId && !event.defaultPrevented) {
|
|
161
|
-
setBlockMovingClientId(null);
|
|
162
|
-
event.preventDefault();
|
|
163
|
-
}
|
|
164
|
-
if ((isEnter || isSpace) && startingBlockClientId) {
|
|
165
|
-
const sourceRoot = getBlockRootClientId(startingBlockClientId);
|
|
166
|
-
const destRoot = getBlockRootClientId(selectedBlockClientId);
|
|
167
|
-
const sourceBlockIndex = getBlockIndex(startingBlockClientId);
|
|
168
|
-
let destinationBlockIndex = getBlockIndex(selectedBlockClientId);
|
|
169
|
-
if (sourceBlockIndex < destinationBlockIndex && sourceRoot === destRoot) {
|
|
170
|
-
destinationBlockIndex -= 1;
|
|
171
|
-
}
|
|
172
|
-
moveBlockToPosition(startingBlockClientId, sourceRoot, destRoot, destinationBlockIndex);
|
|
173
|
-
selectBlock(startingBlockClientId);
|
|
174
|
-
setBlockMovingClientId(null);
|
|
175
|
-
}
|
|
176
|
-
// Prevent the block from being moved into itself.
|
|
177
|
-
if (startingBlockClientId && selectedBlockClientId === startingBlockClientId && navigateIn) {
|
|
178
|
-
return;
|
|
179
|
-
}
|
|
180
|
-
if (navigateDown || navigateUp || navigateOut || navigateIn) {
|
|
181
|
-
if (focusedBlockUid) {
|
|
182
|
-
event.preventDefault();
|
|
183
|
-
selectBlock(focusedBlockUid);
|
|
184
|
-
} else if (isTab && selectedBlockClientId) {
|
|
185
|
-
let nextTabbable;
|
|
186
|
-
if (navigateDown) {
|
|
187
|
-
nextTabbable = blockElement;
|
|
188
|
-
do {
|
|
189
|
-
nextTabbable = _dom.focus.tabbable.findNext(nextTabbable);
|
|
190
|
-
} while (nextTabbable && blockElement.contains(nextTabbable));
|
|
191
|
-
if (!nextTabbable) {
|
|
192
|
-
nextTabbable = blockElement.ownerDocument.defaultView.frameElement;
|
|
193
|
-
nextTabbable = _dom.focus.tabbable.findNext(nextTabbable);
|
|
194
|
-
}
|
|
195
|
-
} else {
|
|
196
|
-
nextTabbable = _dom.focus.tabbable.findPrevious(blockElement);
|
|
197
|
-
}
|
|
198
|
-
if (nextTabbable) {
|
|
199
|
-
event.preventDefault();
|
|
200
|
-
nextTabbable.focus();
|
|
201
|
-
clearSelectedBlock();
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
const classNames = (0, _clsx.default)('block-editor-block-list__block-selection-button', {
|
|
207
|
-
'is-block-moving-mode': !!blockMovingMode
|
|
208
|
-
});
|
|
209
|
-
const dragHandleLabel = (0, _i18n.__)('Drag');
|
|
210
|
-
const showBlockDraggable = canMove && editorMode === 'navigation';
|
|
211
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
212
|
-
className: classNames,
|
|
213
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.Flex, {
|
|
214
|
-
justify: "center",
|
|
215
|
-
className: "block-editor-block-list__block-selection-button__content",
|
|
216
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.FlexItem, {
|
|
217
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockIcon.default, {
|
|
218
|
-
icon: icon,
|
|
219
|
-
showColors: true
|
|
220
|
-
})
|
|
221
|
-
}), showBlockDraggable && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.FlexItem, {
|
|
222
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockDraggable.default, {
|
|
223
|
-
clientIds: [clientId],
|
|
224
|
-
children: draggableProps => /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button
|
|
225
|
-
// TODO: Switch to `true` (40px size) if possible
|
|
226
|
-
, {
|
|
227
|
-
__next40pxDefaultSize: false,
|
|
228
|
-
icon: _icons.dragHandle,
|
|
229
|
-
className: "block-selection-button_drag-handle",
|
|
230
|
-
label: dragHandleLabel
|
|
231
|
-
// Should not be able to tab to drag handle as this
|
|
232
|
-
// button can only be used with a pointer device.
|
|
233
|
-
,
|
|
234
|
-
tabIndex: "-1",
|
|
235
|
-
...draggableProps
|
|
236
|
-
})
|
|
237
|
-
})
|
|
238
|
-
}), editorMode === 'navigation' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.FlexItem, {
|
|
239
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button
|
|
240
|
-
// TODO: Switch to `true` (40px size) if possible
|
|
241
|
-
, {
|
|
242
|
-
__next40pxDefaultSize: false,
|
|
243
|
-
ref: ref,
|
|
244
|
-
onClick: editorMode === 'navigation' ? () => setNavigationMode(false) : undefined,
|
|
245
|
-
onKeyDown: onKeyDown,
|
|
246
|
-
label: label,
|
|
247
|
-
showTooltip: false,
|
|
248
|
-
className: "block-selection-button_select-button",
|
|
249
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockTitle.default, {
|
|
250
|
-
clientId: clientId,
|
|
251
|
-
maximumLength: 35
|
|
252
|
-
})
|
|
253
|
-
})
|
|
254
|
-
})]
|
|
255
|
-
})
|
|
256
|
-
});
|
|
257
|
-
}
|
|
258
|
-
var _default = exports.default = (0, _element.forwardRef)(BlockSelectionButton);
|
|
259
|
-
//# sourceMappingURL=block-selection-button.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_clsx","_interopRequireDefault","require","_icons","_components","_data","_element","_keycodes","_blocks","_a11y","_dom","_i18n","_blockTitle","_blockIcon","_store","_blockDraggable","_useBlockRefs","_jsxRuntime","BlockSelectionButton","clientId","rootClientId","ref","selected","useSelect","select","getBlock","getBlockIndex","hasBlockMovingClientId","getBlockListSettings","__unstableGetEditorMode","getNextBlockClientId","getPreviousBlockClientId","canMoveBlock","blockEditorStore","getActiveBlockVariation","getBlockType","blocksStore","index","name","attributes","blockType","orientation","match","blockMovingMode","editorMode","icon","label","getAccessibleBlockLabel","canMove","setNavigationMode","removeBlock","useDispatch","useEffect","current","focus","speak","blockElement","useBlockElement","getBlockRootClientId","getClientIdsOfDescendants","getSelectedBlockClientId","getMultiSelectedBlocksEndClientId","selectBlock","clearSelectedBlock","setBlockMovingClientId","moveBlockToPosition","onKeyDown","event","keyCode","isUp","UP","isDown","DOWN","isLeft","LEFT","isRight","RIGHT","isTab","TAB","isEscape","ESCAPE","isEnter","ENTER","isSpace","SPACE","isShift","shiftKey","BACKSPACE","DELETE","preventDefault","selectedBlockClientId","selectionEndClientId","selectionBeforeEndClientId","selectionAfterEndClientId","navigateUp","navigateDown","navigateOut","navigateIn","focusedBlockUid","_getBlockRootClientId","_getClientIdsOfDescen","startingBlockClientId","defaultPrevented","sourceRoot","destRoot","sourceBlockIndex","destinationBlockIndex","nextTabbable","tabbable","findNext","contains","ownerDocument","defaultView","frameElement","findPrevious","classNames","clsx","dragHandleLabel","__","showBlockDraggable","jsx","className","children","jsxs","Flex","justify","FlexItem","default","showColors","clientIds","draggableProps","Button","__next40pxDefaultSize","dragHandle","tabIndex","onClick","undefined","showTooltip","maximumLength","_default","exports","forwardRef"],"sources":["@wordpress/block-editor/src/components/block-tools/block-selection-button.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { dragHandle } from '@wordpress/icons';\nimport { Button, Flex, FlexItem } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { forwardRef, useEffect } from '@wordpress/element';\nimport {\n\tBACKSPACE,\n\tDELETE,\n\tUP,\n\tDOWN,\n\tLEFT,\n\tRIGHT,\n\tTAB,\n\tESCAPE,\n\tENTER,\n\tSPACE,\n} from '@wordpress/keycodes';\nimport {\n\t__experimentalGetAccessibleBlockLabel as getAccessibleBlockLabel,\n\tstore as blocksStore,\n} from '@wordpress/blocks';\nimport { speak } from '@wordpress/a11y';\nimport { focus } from '@wordpress/dom';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport BlockTitle from '../block-title';\nimport BlockIcon from '../block-icon';\nimport { store as blockEditorStore } from '../../store';\nimport BlockDraggable from '../block-draggable';\nimport { useBlockElement } from '../block-list/use-block-props/use-block-refs';\n\n/**\n * Block selection button component, displaying the label of the block. If the block\n * descends from a root block, a button is displayed enabling the user to select\n * the root block.\n *\n * @param {string} props Component props.\n * @param {string} props.clientId Client ID of block.\n * @param {Object} ref Reference to the component.\n *\n * @return {Component} The component to be rendered.\n */\nfunction BlockSelectionButton( { clientId, rootClientId }, ref ) {\n\tconst selected = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlock,\n\t\t\t\tgetBlockIndex,\n\t\t\t\thasBlockMovingClientId,\n\t\t\t\tgetBlockListSettings,\n\t\t\t\t__unstableGetEditorMode,\n\t\t\t\tgetNextBlockClientId,\n\t\t\t\tgetPreviousBlockClientId,\n\t\t\t\tcanMoveBlock,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst { getActiveBlockVariation, getBlockType } =\n\t\t\t\tselect( blocksStore );\n\t\t\tconst index = getBlockIndex( clientId );\n\t\t\tconst { name, attributes } = getBlock( clientId );\n\t\t\tconst blockType = getBlockType( name );\n\t\t\tconst orientation =\n\t\t\t\tgetBlockListSettings( rootClientId )?.orientation;\n\t\t\tconst match = getActiveBlockVariation( name, attributes );\n\n\t\t\treturn {\n\t\t\t\tblockMovingMode: hasBlockMovingClientId(),\n\t\t\t\teditorMode: __unstableGetEditorMode(),\n\t\t\t\ticon: match?.icon || blockType.icon,\n\t\t\t\tlabel: getAccessibleBlockLabel(\n\t\t\t\t\tblockType,\n\t\t\t\t\tattributes,\n\t\t\t\t\tindex + 1,\n\t\t\t\t\torientation\n\t\t\t\t),\n\t\t\t\tcanMove: canMoveBlock( clientId, rootClientId ),\n\t\t\t\tgetNextBlockClientId,\n\t\t\t\tgetPreviousBlockClientId,\n\t\t\t};\n\t\t},\n\t\t[ clientId, rootClientId ]\n\t);\n\tconst { label, icon, blockMovingMode, editorMode, canMove } = selected;\n\tconst { setNavigationMode, removeBlock } = useDispatch( blockEditorStore );\n\n\t// Focus the breadcrumb in navigation mode.\n\tuseEffect( () => {\n\t\tif ( editorMode === 'navigation' ) {\n\t\t\tref.current.focus();\n\t\t\tspeak( label );\n\t\t}\n\t}, [ label, editorMode ] );\n\tconst blockElement = useBlockElement( clientId );\n\n\tconst {\n\t\thasBlockMovingClientId,\n\t\tgetBlockIndex,\n\t\tgetBlockRootClientId,\n\t\tgetClientIdsOfDescendants,\n\t\tgetSelectedBlockClientId,\n\t\tgetMultiSelectedBlocksEndClientId,\n\t\tgetPreviousBlockClientId,\n\t\tgetNextBlockClientId,\n\t} = useSelect( blockEditorStore );\n\tconst {\n\t\tselectBlock,\n\t\tclearSelectedBlock,\n\t\tsetBlockMovingClientId,\n\t\tmoveBlockToPosition,\n\t} = useDispatch( blockEditorStore );\n\n\tfunction onKeyDown( event ) {\n\t\tconst { keyCode } = event;\n\t\tconst isUp = keyCode === UP;\n\t\tconst isDown = keyCode === DOWN;\n\t\tconst isLeft = keyCode === LEFT;\n\t\tconst isRight = keyCode === RIGHT;\n\t\tconst isTab = keyCode === TAB;\n\t\tconst isEscape = keyCode === ESCAPE;\n\t\tconst isEnter = keyCode === ENTER;\n\t\tconst isSpace = keyCode === SPACE;\n\t\tconst isShift = event.shiftKey;\n\n\t\tif ( keyCode === BACKSPACE || keyCode === DELETE ) {\n\t\t\tremoveBlock( clientId );\n\t\t\tevent.preventDefault();\n\t\t\treturn;\n\t\t}\n\n\t\tconst selectedBlockClientId = getSelectedBlockClientId();\n\t\tconst selectionEndClientId = getMultiSelectedBlocksEndClientId();\n\t\tconst selectionBeforeEndClientId = getPreviousBlockClientId(\n\t\t\tselectionEndClientId || selectedBlockClientId\n\t\t);\n\t\tconst selectionAfterEndClientId = getNextBlockClientId(\n\t\t\tselectionEndClientId || selectedBlockClientId\n\t\t);\n\n\t\tconst navigateUp = ( isTab && isShift ) || isUp;\n\t\tconst navigateDown = ( isTab && ! isShift ) || isDown;\n\t\t// Move out of current nesting level (no effect if at root level).\n\t\tconst navigateOut = isLeft;\n\t\t// Move into next nesting level (no effect if the current block has no innerBlocks).\n\t\tconst navigateIn = isRight;\n\n\t\tlet focusedBlockUid;\n\t\tif ( navigateUp ) {\n\t\t\tfocusedBlockUid = selectionBeforeEndClientId;\n\t\t} else if ( navigateDown ) {\n\t\t\tfocusedBlockUid = selectionAfterEndClientId;\n\t\t} else if ( navigateOut ) {\n\t\t\tfocusedBlockUid =\n\t\t\t\tgetBlockRootClientId( selectedBlockClientId ) ??\n\t\t\t\tselectedBlockClientId;\n\t\t} else if ( navigateIn ) {\n\t\t\tfocusedBlockUid =\n\t\t\t\tgetClientIdsOfDescendants( selectedBlockClientId )[ 0 ] ??\n\t\t\t\tselectedBlockClientId;\n\t\t}\n\t\tconst startingBlockClientId = hasBlockMovingClientId();\n\t\tif ( isEscape && startingBlockClientId && ! event.defaultPrevented ) {\n\t\t\tsetBlockMovingClientId( null );\n\t\t\tevent.preventDefault();\n\t\t}\n\t\tif ( ( isEnter || isSpace ) && startingBlockClientId ) {\n\t\t\tconst sourceRoot = getBlockRootClientId( startingBlockClientId );\n\t\t\tconst destRoot = getBlockRootClientId( selectedBlockClientId );\n\t\t\tconst sourceBlockIndex = getBlockIndex( startingBlockClientId );\n\t\t\tlet destinationBlockIndex = getBlockIndex( selectedBlockClientId );\n\t\t\tif (\n\t\t\t\tsourceBlockIndex < destinationBlockIndex &&\n\t\t\t\tsourceRoot === destRoot\n\t\t\t) {\n\t\t\t\tdestinationBlockIndex -= 1;\n\t\t\t}\n\t\t\tmoveBlockToPosition(\n\t\t\t\tstartingBlockClientId,\n\t\t\t\tsourceRoot,\n\t\t\t\tdestRoot,\n\t\t\t\tdestinationBlockIndex\n\t\t\t);\n\t\t\tselectBlock( startingBlockClientId );\n\t\t\tsetBlockMovingClientId( null );\n\t\t}\n\t\t// Prevent the block from being moved into itself.\n\t\tif (\n\t\t\tstartingBlockClientId &&\n\t\t\tselectedBlockClientId === startingBlockClientId &&\n\t\t\tnavigateIn\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\tif ( navigateDown || navigateUp || navigateOut || navigateIn ) {\n\t\t\tif ( focusedBlockUid ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tselectBlock( focusedBlockUid );\n\t\t\t} else if ( isTab && selectedBlockClientId ) {\n\t\t\t\tlet nextTabbable;\n\n\t\t\t\tif ( navigateDown ) {\n\t\t\t\t\tnextTabbable = blockElement;\n\t\t\t\t\tdo {\n\t\t\t\t\t\tnextTabbable = focus.tabbable.findNext( nextTabbable );\n\t\t\t\t\t} while (\n\t\t\t\t\t\tnextTabbable &&\n\t\t\t\t\t\tblockElement.contains( nextTabbable )\n\t\t\t\t\t);\n\n\t\t\t\t\tif ( ! nextTabbable ) {\n\t\t\t\t\t\tnextTabbable =\n\t\t\t\t\t\t\tblockElement.ownerDocument.defaultView.frameElement;\n\t\t\t\t\t\tnextTabbable = focus.tabbable.findNext( nextTabbable );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tnextTabbable = focus.tabbable.findPrevious( blockElement );\n\t\t\t\t}\n\n\t\t\t\tif ( nextTabbable ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tnextTabbable.focus();\n\t\t\t\t\tclearSelectedBlock();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tconst classNames = clsx(\n\t\t'block-editor-block-list__block-selection-button',\n\t\t{\n\t\t\t'is-block-moving-mode': !! blockMovingMode,\n\t\t}\n\t);\n\n\tconst dragHandleLabel = __( 'Drag' );\n\tconst showBlockDraggable = canMove && editorMode === 'navigation';\n\n\treturn (\n\t\t<div className={ classNames }>\n\t\t\t<Flex\n\t\t\t\tjustify=\"center\"\n\t\t\t\tclassName=\"block-editor-block-list__block-selection-button__content\"\n\t\t\t>\n\t\t\t\t<FlexItem>\n\t\t\t\t\t<BlockIcon icon={ icon } showColors />\n\t\t\t\t</FlexItem>\n\t\t\t\t{ showBlockDraggable && (\n\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t<BlockDraggable clientIds={ [ clientId ] }>\n\t\t\t\t\t\t\t{ ( draggableProps ) => (\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t// TODO: Switch to `true` (40px size) if possible\n\t\t\t\t\t\t\t\t\t__next40pxDefaultSize={ false }\n\t\t\t\t\t\t\t\t\ticon={ dragHandle }\n\t\t\t\t\t\t\t\t\tclassName=\"block-selection-button_drag-handle\"\n\t\t\t\t\t\t\t\t\tlabel={ dragHandleLabel }\n\t\t\t\t\t\t\t\t\t// Should not be able to tab to drag handle as this\n\t\t\t\t\t\t\t\t\t// button can only be used with a pointer device.\n\t\t\t\t\t\t\t\t\ttabIndex=\"-1\"\n\t\t\t\t\t\t\t\t\t{ ...draggableProps }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</BlockDraggable>\n\t\t\t\t\t</FlexItem>\n\t\t\t\t) }\n\t\t\t\t{ editorMode === 'navigation' && (\n\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t// TODO: Switch to `true` (40px size) if possible\n\t\t\t\t\t\t\t__next40pxDefaultSize={ false }\n\t\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\t\tonClick={\n\t\t\t\t\t\t\t\teditorMode === 'navigation'\n\t\t\t\t\t\t\t\t\t? () => setNavigationMode( false )\n\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonKeyDown={ onKeyDown }\n\t\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\t\tshowTooltip={ false }\n\t\t\t\t\t\t\tclassName=\"block-selection-button_select-button\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<BlockTitle\n\t\t\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\t\t\tmaximumLength={ 35 }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</FlexItem>\n\t\t\t\t) }\n\t\t\t</Flex>\n\t\t</div>\n\t);\n}\n\nexport default forwardRef( BlockSelectionButton );\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AAYA,IAAAM,OAAA,GAAAN,OAAA;AAIA,IAAAO,KAAA,GAAAP,OAAA;AACA,IAAAQ,IAAA,GAAAR,OAAA;AACA,IAAAS,KAAA,GAAAT,OAAA;AAKA,IAAAU,WAAA,GAAAX,sBAAA,CAAAC,OAAA;AACA,IAAAW,UAAA,GAAAZ,sBAAA,CAAAC,OAAA;AACA,IAAAY,MAAA,GAAAZ,OAAA;AACA,IAAAa,eAAA,GAAAd,sBAAA,CAAAC,OAAA;AACA,IAAAc,aAAA,GAAAd,OAAA;AAA+E,IAAAe,WAAA,GAAAf,OAAA;AAvC/E;AACA;AACA;;AAGA;AACA;AACA;;AAyBA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACA,SAASgB,oBAAoBA,CAAE;EAAEC,QAAQ;EAAEC;AAAa,CAAC,EAAEC,GAAG,EAAG;EAChE,MAAMC,QAAQ,GAAG,IAAAC,eAAS,EACvBC,MAAM,IAAM;IACb,MAAM;MACLC,QAAQ;MACRC,aAAa;MACbC,sBAAsB;MACtBC,oBAAoB;MACpBC,uBAAuB;MACvBC,oBAAoB;MACpBC,wBAAwB;MACxBC;IACD,CAAC,GAAGR,MAAM,CAAES,YAAiB,CAAC;IAC9B,MAAM;MAAEC,uBAAuB;M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AA,CAAA0H,QAAQ;QAAAJ,QAAA,eACR,IAAAzG,WAAA,CAAAuG,GAAA,EAACpH,WAAA,CAAA+H;QACA;QAAA;UACAC,qBAAqB,EAAG,KAAO;UAC/B/G,GAAG,EAAGA,GAAK;UACXkH,OAAO,EACN3F,UAAU,KAAK,YAAY,GACxB,MAAMK,iBAAiB,CAAE,KAAM,CAAC,GAChCuF,SACH;UACDtE,SAAS,EAAGA,SAAW;UACvBpB,KAAK,EAAGA,KAAO;UACf2F,WAAW,EAAG,KAAO;UACrBhB,SAAS,EAAC,sCAAsC;UAAAC,QAAA,eAEhD,IAAAzG,WAAA,CAAAuG,GAAA,EAAC5G,WAAA,CAAAmH,OAAU;YACV5G,QAAQ,EAAGA,QAAU;YACrBuH,aAAa,EAAG;UAAI,CACpB;QAAC,CACK;MAAC,CACA,CACV;IAAA,CACI;EAAC,CACH,CAAC;AAER;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAb,OAAA,GAEc,IAAAc,mBAAU,EAAE3H,oBAAqB,CAAC","ignoreList":[]}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _clsx = _interopRequireDefault(require("clsx"));
|
|
9
|
-
var _element = require("@wordpress/element");
|
|
10
|
-
var _blockSelectionButton = _interopRequireDefault(require("./block-selection-button"));
|
|
11
|
-
var _blockPopover = require("../block-popover");
|
|
12
|
-
var _useBlockToolbarPopoverProps = _interopRequireDefault(require("./use-block-toolbar-popover-props"));
|
|
13
|
-
var _useSelectedBlockToolProps = _interopRequireDefault(require("./use-selected-block-tool-props"));
|
|
14
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
-
/**
|
|
16
|
-
* External dependencies
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* WordPress dependencies
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Internal dependencies
|
|
25
|
-
*/
|
|
26
|
-
|
|
27
|
-
function BlockToolbarBreadcrumb({
|
|
28
|
-
clientId,
|
|
29
|
-
__unstableContentRef
|
|
30
|
-
}, ref) {
|
|
31
|
-
const {
|
|
32
|
-
capturingClientId,
|
|
33
|
-
isInsertionPointVisible,
|
|
34
|
-
lastClientId,
|
|
35
|
-
rootClientId
|
|
36
|
-
} = (0, _useSelectedBlockToolProps.default)(clientId);
|
|
37
|
-
const popoverProps = (0, _useBlockToolbarPopoverProps.default)({
|
|
38
|
-
contentElement: __unstableContentRef?.current,
|
|
39
|
-
clientId
|
|
40
|
-
});
|
|
41
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockPopover.PrivateBlockPopover, {
|
|
42
|
-
clientId: capturingClientId || clientId,
|
|
43
|
-
bottomClientId: lastClientId,
|
|
44
|
-
className: (0, _clsx.default)('block-editor-block-list__block-popover', {
|
|
45
|
-
'is-insertion-point-visible': isInsertionPointVisible
|
|
46
|
-
}),
|
|
47
|
-
resize: false,
|
|
48
|
-
...popoverProps,
|
|
49
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockSelectionButton.default, {
|
|
50
|
-
ref: ref,
|
|
51
|
-
clientId: clientId,
|
|
52
|
-
rootClientId: rootClientId
|
|
53
|
-
})
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
var _default = exports.default = (0, _element.forwardRef)(BlockToolbarBreadcrumb);
|
|
57
|
-
//# sourceMappingURL=block-toolbar-breadcrumb.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_clsx","_interopRequireDefault","require","_element","_blockSelectionButton","_blockPopover","_useBlockToolbarPopoverProps","_useSelectedBlockToolProps","_jsxRuntime","BlockToolbarBreadcrumb","clientId","__unstableContentRef","ref","capturingClientId","isInsertionPointVisible","lastClientId","rootClientId","useSelectedBlockToolProps","popoverProps","useBlockToolbarPopoverProps","contentElement","current","jsx","PrivateBlockPopover","bottomClientId","className","clsx","resize","children","default","_default","exports","forwardRef"],"sources":["@wordpress/block-editor/src/components/block-tools/block-toolbar-breadcrumb.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BlockSelectionButton from './block-selection-button';\nimport { PrivateBlockPopover } from '../block-popover';\nimport useBlockToolbarPopoverProps from './use-block-toolbar-popover-props';\nimport useSelectedBlockToolProps from './use-selected-block-tool-props';\n\nfunction BlockToolbarBreadcrumb( { clientId, __unstableContentRef }, ref ) {\n\tconst {\n\t\tcapturingClientId,\n\t\tisInsertionPointVisible,\n\t\tlastClientId,\n\t\trootClientId,\n\t} = useSelectedBlockToolProps( clientId );\n\n\tconst popoverProps = useBlockToolbarPopoverProps( {\n\t\tcontentElement: __unstableContentRef?.current,\n\t\tclientId,\n\t} );\n\n\treturn (\n\t\t<PrivateBlockPopover\n\t\t\tclientId={ capturingClientId || clientId }\n\t\t\tbottomClientId={ lastClientId }\n\t\t\tclassName={ clsx( 'block-editor-block-list__block-popover', {\n\t\t\t\t'is-insertion-point-visible': isInsertionPointVisible,\n\t\t\t} ) }\n\t\t\tresize={ false }\n\t\t\t{ ...popoverProps }\n\t\t>\n\t\t\t<BlockSelectionButton\n\t\t\t\tref={ ref }\n\t\t\t\tclientId={ clientId }\n\t\t\t\trootClientId={ rootClientId }\n\t\t\t/>\n\t\t</PrivateBlockPopover>\n\t);\n}\n\nexport default forwardRef( BlockToolbarBreadcrumb );\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AAKA,IAAAE,qBAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG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|
|
7
|
-
var _components = require("@wordpress/components");
|
|
8
|
-
var _i18n = require("@wordpress/i18n");
|
|
9
|
-
var _element = require("@wordpress/element");
|
|
10
|
-
var _icons = require("@wordpress/icons");
|
|
11
|
-
var _lockUnlock = require("../../lock-unlock");
|
|
12
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
-
/**
|
|
14
|
-
* WordPress dependencies
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Internal dependencies
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
const {
|
|
22
|
-
Tabs
|
|
23
|
-
} = (0, _lockUnlock.unlock)(_components.privateApis);
|
|
24
|
-
const blocksTab = {
|
|
25
|
-
name: 'blocks',
|
|
26
|
-
/* translators: Blocks tab title in the block inserter. */
|
|
27
|
-
title: (0, _i18n.__)('Blocks')
|
|
28
|
-
};
|
|
29
|
-
const patternsTab = {
|
|
30
|
-
name: 'patterns',
|
|
31
|
-
/* translators: Theme and Directory Patterns tab title in the block inserter. */
|
|
32
|
-
title: (0, _i18n.__)('Patterns')
|
|
33
|
-
};
|
|
34
|
-
const mediaTab = {
|
|
35
|
-
name: 'media',
|
|
36
|
-
/* translators: Media tab title in the block inserter. */
|
|
37
|
-
title: (0, _i18n.__)('Media')
|
|
38
|
-
};
|
|
39
|
-
function InserterTabs({
|
|
40
|
-
onSelect,
|
|
41
|
-
children,
|
|
42
|
-
onClose,
|
|
43
|
-
selectedTab
|
|
44
|
-
}, ref) {
|
|
45
|
-
const tabs = [blocksTab, patternsTab, mediaTab];
|
|
46
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
47
|
-
className: "block-editor-inserter__tabs",
|
|
48
|
-
ref: ref,
|
|
49
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(Tabs, {
|
|
50
|
-
onSelect: onSelect,
|
|
51
|
-
selectedTabId: selectedTab,
|
|
52
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
53
|
-
className: "block-editor-inserter__tablist-and-close-button",
|
|
54
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
|
|
55
|
-
className: "block-editor-inserter__close-button",
|
|
56
|
-
icon: _icons.closeSmall,
|
|
57
|
-
label: (0, _i18n.__)('Close block inserter'),
|
|
58
|
-
onClick: () => onClose(),
|
|
59
|
-
size: "small"
|
|
60
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(Tabs.TabList, {
|
|
61
|
-
className: "block-editor-inserter__tablist",
|
|
62
|
-
children: tabs.map(tab => /*#__PURE__*/(0, _jsxRuntime.jsx)(Tabs.Tab, {
|
|
63
|
-
tabId: tab.name,
|
|
64
|
-
className: "block-editor-inserter__tab",
|
|
65
|
-
children: tab.title
|
|
66
|
-
}, tab.name))
|
|
67
|
-
})]
|
|
68
|
-
}), tabs.map(tab => /*#__PURE__*/(0, _jsxRuntime.jsx)(Tabs.TabPanel, {
|
|
69
|
-
tabId: tab.name,
|
|
70
|
-
focusable: false,
|
|
71
|
-
className: "block-editor-inserter__tabpanel",
|
|
72
|
-
children: children
|
|
73
|
-
}, tab.name))]
|
|
74
|
-
})
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
var _default = exports.default = (0, _element.forwardRef)(InserterTabs);
|
|
78
|
-
//# sourceMappingURL=tabs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","_i18n","_element","_icons","_lockUnlock","_jsxRuntime","Tabs","unlock","componentsPrivateApis","blocksTab","name","title","__","patternsTab","mediaTab","InserterTabs","onSelect","children","onClose","selectedTab","ref","tabs","jsx","className","jsxs","selectedTabId","Button","icon","closeSmall","label","onClick","size","TabList","map","tab","Tab","tabId","TabPanel","focusable","_default","exports","default","forwardRef"],"sources":["@wordpress/block-editor/src/components/inserter/tabs.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tButton,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { forwardRef } from '@wordpress/element';\nimport { closeSmall } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { Tabs } = unlock( componentsPrivateApis );\n\nconst blocksTab = {\n\tname: 'blocks',\n\t/* translators: Blocks tab title in the block inserter. */\n\ttitle: __( 'Blocks' ),\n};\nconst patternsTab = {\n\tname: 'patterns',\n\t/* translators: Theme and Directory Patterns tab title in the block inserter. */\n\ttitle: __( 'Patterns' ),\n};\n\nconst mediaTab = {\n\tname: 'media',\n\t/* translators: Media tab title in the block inserter. */\n\ttitle: __( 'Media' ),\n};\n\nfunction InserterTabs( { onSelect, children, onClose, selectedTab }, ref ) {\n\tconst tabs = [ blocksTab, patternsTab, mediaTab ];\n\n\treturn (\n\t\t<div className=\"block-editor-inserter__tabs\" ref={ ref }>\n\t\t\t<Tabs onSelect={ onSelect } selectedTabId={ selectedTab }>\n\t\t\t\t<div className=\"block-editor-inserter__tablist-and-close-button\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tclassName=\"block-editor-inserter__close-button\"\n\t\t\t\t\t\ticon={ closeSmall }\n\t\t\t\t\t\tlabel={ __( 'Close block inserter' ) }\n\t\t\t\t\t\tonClick={ () => onClose() }\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t/>\n\n\t\t\t\t\t<Tabs.TabList className=\"block-editor-inserter__tablist\">\n\t\t\t\t\t\t{ tabs.map( ( tab ) => (\n\t\t\t\t\t\t\t<Tabs.Tab\n\t\t\t\t\t\t\t\tkey={ tab.name }\n\t\t\t\t\t\t\t\ttabId={ tab.name }\n\t\t\t\t\t\t\t\tclassName=\"block-editor-inserter__tab\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ tab.title }\n\t\t\t\t\t\t\t</Tabs.Tab>\n\t\t\t\t\t\t) ) }\n\t\t\t\t\t</Tabs.TabList>\n\t\t\t\t</div>\n\t\t\t\t{ tabs.map( ( tab ) => (\n\t\t\t\t\t<Tabs.TabPanel\n\t\t\t\t\t\tkey={ tab.name }\n\t\t\t\t\t\ttabId={ tab.name }\n\t\t\t\t\t\tfocusable={ false }\n\t\t\t\t\t\tclassName=\"block-editor-inserter__tabpanel\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ children }\n\t\t\t\t\t</Tabs.TabPanel>\n\t\t\t\t) ) }\n\t\t\t</Tabs>\n\t\t</div>\n\t);\n}\n\nexport default forwardRef( InserterTabs );\n"],"mappings":";;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAIA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAKA,IAAAI,WAAA,GAAAJ,OAAA;AAA2C,IAAAK,WAAA,GAAAL,OAAA;AAd3C;AACA;AACA;;AASA;AACA;AACA;;AAGA,MAAM;EAAEM;AAAK,CAAC,GAAG,IAAAC,kBAAM,EAAEC,uBAAsB,CAAC;AAEhD,MAAMC,SAAS,GAAG;EACjBC,IAAI,EAAE,QAAQ;EACd;EACAC,KAAK,EAAE,IAAAC,QAAE,EAAE,QAAS;AACrB,CAAC;AACD,MAAMC,WAAW,GAAG;EACnBH,IAAI,EAAE,UAAU;EAChB;EACAC,KAAK,EAAE,IAAAC,QAAE,EAAE,UAAW;AACvB,CAAC;AAED,MAAME,QAAQ,GAAG;EAChBJ,IAAI,EAAE,OAAO;EACb;EACAC,KAAK,EAAE,IAAAC,QAAE,EAAE,OAAQ;AACpB,CAAC;AAED,SAASG,YAAYA,CAAE;EAAEC,QAAQ;EAAEC,QAAQ;EAAEC,OAAO;EAAEC;AAAY,CAAC,EAAEC,GAAG,EAAG;EAC1E,MAAMC,IAAI,GAAG,CAAEZ,SAAS,EAAEI,WAAW,EAAEC,QAAQ,CAAE;EAEjD,oBACC,IAAAT,WAAA,CAAAiB,GAAA;IAAKC,SAAS,EAAC,6BAA6B;IAACH,GAAG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3B,YAAa,CAAC","ignoreList":[]}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { __experimentalUseSlotFills as useSlotFills } from '@wordpress/components';
|
|
5
|
-
import warning from '@wordpress/warning';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Internal dependencies
|
|
9
|
-
*/
|
|
10
|
-
import groups from './groups';
|
|
11
|
-
export function useHasAnyBlockControls() {
|
|
12
|
-
let hasAnyBlockControls = false;
|
|
13
|
-
for (const group in groups) {
|
|
14
|
-
// It is safe to violate the rules of hooks here as the `groups` object
|
|
15
|
-
// is static and will not change length between renders. Do not return
|
|
16
|
-
// early as that will cause the hook to be called a different number of
|
|
17
|
-
// times between renders.
|
|
18
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
19
|
-
if (useHasBlockControls(group)) {
|
|
20
|
-
hasAnyBlockControls = true;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
return hasAnyBlockControls;
|
|
24
|
-
}
|
|
25
|
-
export function useHasBlockControls(group = 'default') {
|
|
26
|
-
const Slot = groups[group]?.Slot;
|
|
27
|
-
const fills = useSlotFills(Slot?.__unstableName);
|
|
28
|
-
if (!Slot) {
|
|
29
|
-
globalThis.SCRIPT_DEBUG === true ? warning(`Unknown BlockControls group "${group}" provided.`) : void 0;
|
|
30
|
-
return null;
|
|
31
|
-
}
|
|
32
|
-
return !!fills?.length;
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=use-has-block-controls.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["__experimentalUseSlotFills","useSlotFills","warning","groups","useHasAnyBlockControls","hasAnyBlockControls","group","useHasBlockControls","Slot","fills","__unstableName","globalThis","SCRIPT_DEBUG","length"],"sources":["@wordpress/block-editor/src/components/block-controls/use-has-block-controls.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalUseSlotFills as useSlotFills } from '@wordpress/components';\nimport warning from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport groups from './groups';\n\nexport function useHasAnyBlockControls() {\n\tlet hasAnyBlockControls = false;\n\tfor ( const group in groups ) {\n\t\t// It is safe to violate the rules of hooks here as the `groups` object\n\t\t// is static and will not change length between renders. Do not return\n\t\t// early as that will cause the hook to be called a different number of\n\t\t// times between renders.\n\t\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\t\tif ( useHasBlockControls( group ) ) {\n\t\t\thasAnyBlockControls = true;\n\t\t}\n\t}\n\treturn hasAnyBlockControls;\n}\n\nexport function useHasBlockControls( group = 'default' ) {\n\tconst Slot = groups[ group ]?.Slot;\n\tconst fills = useSlotFills( Slot?.__unstableName );\n\tif ( ! Slot ) {\n\t\twarning( `Unknown BlockControls group \"${ group }\" provided.` );\n\t\treturn null;\n\t}\n\treturn !! fills?.length;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,0BAA0B,IAAIC,YAAY,QAAQ,uBAAuB;AAClF,OAAOC,OAAO,MAAM,oBAAoB;;AAExC;AACA;AACA;AACA,OAAOC,MAAM,MAAM,UAAU;AAE7B,OAAO,SAASC,sBAAsBA,CAAA,EAAG;EACxC,IAAIC,mBAAmB,GAAG,KAAK;EAC/B,KAAM,MAAMC,KAAK,IAAIH,MAAM,EAAG;IAC7B;IACA;IACA;IACA;IACA;IACA,IAAKI,mBAAmB,CAAED,KAAM,CAAC,EAAG;MACnCD,mBAAmB,GAAG,IAAI;IAC3B;EACD;EACA,OAAOA,mBAAmB;AAC3B;AAEA,OAAO,SAASE,mBAAmBA,CAAED,KAAK,GAAG,SAAS,EAAG;EACxD,MAAME,IAAI,GAAGL,MAAM,CAAEG,KAAK,CAAE,EAAEE,IAAI;EAClC,MAAMC,KAAK,GAAGR,YAAY,CAAEO,IAAI,EAAEE,cAAe,CAAC;EAClD,IAAK,CAAEF,IAAI,EAAG;IACbG,UAAA,CAAAC,YAAA,YAAAV,OAAO,CAAG,gCAAgCI,KAAO,aAAa,CAAC;IAC/D,OAAO,IAAI;EACZ;EACA,OAAO,CAAC,CAAEG,KAAK,EAAEI,MAAM;AACxB","ignoreList":[]}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { useSelect, useDispatch } from '@wordpress/data';
|
|
5
|
-
import { useRefEffect } from '@wordpress/compose';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Internal dependencies
|
|
9
|
-
*/
|
|
10
|
-
import { store as blockEditorStore } from '../../../store';
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Allows navigation mode to be exited by clicking in the selected block.
|
|
14
|
-
*
|
|
15
|
-
* @param {string} clientId Block client ID.
|
|
16
|
-
*/
|
|
17
|
-
export function useNavModeExit(clientId) {
|
|
18
|
-
const {
|
|
19
|
-
isNavigationMode,
|
|
20
|
-
isBlockSelected
|
|
21
|
-
} = useSelect(blockEditorStore);
|
|
22
|
-
const {
|
|
23
|
-
setNavigationMode,
|
|
24
|
-
selectBlock
|
|
25
|
-
} = useDispatch(blockEditorStore);
|
|
26
|
-
return useRefEffect(node => {
|
|
27
|
-
function onMouseDown(event) {
|
|
28
|
-
// Don't select a block if it's already handled by a child
|
|
29
|
-
// block.
|
|
30
|
-
if (isNavigationMode() && !event.defaultPrevented) {
|
|
31
|
-
// Prevent focus from moving to the block.
|
|
32
|
-
event.preventDefault();
|
|
33
|
-
|
|
34
|
-
// When clicking on a selected block, exit navigation mode.
|
|
35
|
-
if (isBlockSelected(clientId)) {
|
|
36
|
-
setNavigationMode(false);
|
|
37
|
-
} else {
|
|
38
|
-
selectBlock(clientId);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
node.addEventListener('mousedown', onMouseDown);
|
|
43
|
-
return () => {
|
|
44
|
-
node.removeEventListener('mousedown', onMouseDown);
|
|
45
|
-
};
|
|
46
|
-
}, [clientId, isNavigationMode, isBlockSelected, setNavigationMode]);
|
|
47
|
-
}
|
|
48
|
-
//# sourceMappingURL=use-nav-mode-exit.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["useSelect","useDispatch","useRefEffect","store","blockEditorStore","useNavModeExit","clientId","isNavigationMode","isBlockSelected","setNavigationMode","selectBlock","node","onMouseDown","event","defaultPrevented","preventDefault","addEventListener","removeEventListener"],"sources":["@wordpress/block-editor/src/components/block-list/use-block-props/use-nav-mode-exit.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useRefEffect } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../../store';\n\n/**\n * Allows navigation mode to be exited by clicking in the selected block.\n *\n * @param {string} clientId Block client ID.\n */\nexport function useNavModeExit( clientId ) {\n\tconst { isNavigationMode, isBlockSelected } = useSelect( blockEditorStore );\n\tconst { setNavigationMode, selectBlock } = useDispatch( blockEditorStore );\n\treturn useRefEffect(\n\t\t( node ) => {\n\t\t\tfunction onMouseDown( event ) {\n\t\t\t\t// Don't select a block if it's already handled by a child\n\t\t\t\t// block.\n\t\t\t\tif ( isNavigationMode() && ! event.defaultPrevented ) {\n\t\t\t\t\t// Prevent focus from moving to the block.\n\t\t\t\t\tevent.preventDefault();\n\n\t\t\t\t\t// When clicking on a selected block, exit navigation mode.\n\t\t\t\t\tif ( isBlockSelected( clientId ) ) {\n\t\t\t\t\t\tsetNavigationMode( false );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tselectBlock( clientId );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tnode.addEventListener( 'mousedown', onMouseDown );\n\n\t\t\treturn () => {\n\t\t\t\tnode.removeEventListener( 'mousedown', onMouseDown );\n\t\t\t};\n\t\t},\n\t\t[ clientId, isNavigationMode, isBlockSelected, setNavigationMode ]\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,YAAY,QAAQ,oBAAoB;;AAEjD;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,gBAAgB;;AAE1D;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,cAAcA,CAAEC,QAAQ,EAAG;EAC1C,MAAM;IAAEC,gBAAgB;IAAEC;EAAgB,CAAC,GAAGR,SAAS,CAAEI,gBAAiB,CAAC;EAC3E,MAAM;IAAEK,iBAAiB;IAAEC;EAAY,CAAC,GAAGT,WAAW,CAAEG,gBAAiB,CAAC;EAC1E,OAAOF,YAAY,CAChBS,IAAI,IAAM;IACX,SAASC,WAAWA,CAAEC,KAAK,EAAG;MAC7B;MACA;MACA,IAAKN,gBAAgB,CAAC,CAAC,IAAI,CAAEM,KAAK,CAACC,gBAAgB,EAAG;QACrD;QACAD,KAAK,CAACE,cAAc,CAAC,CAAC;;QAEtB;QACA,IAAKP,eAAe,CAAEF,QAAS,CAAC,EAAG;UAClCG,iBAAiB,CAAE,KAAM,CAAC;QAC3B,CAAC,MAAM;UACNC,WAAW,CAAEJ,QAAS,CAAC;QACxB;MACD;IACD;IAEAK,IAAI,CAACK,gBAAgB,CAAE,WAAW,EAAEJ,WAAY,CAAC;IAEjD,OAAO,MAAM;MACZD,IAAI,CAACM,mBAAmB,CAAE,WAAW,EAAEL,WAAY,CAAC;IACrD,CAAC;EACF,CAAC,EACD,CAAEN,QAAQ,EAAEC,gBAAgB,EAAEC,eAAe,EAAEC,iBAAiB,CACjE,CAAC;AACF","ignoreList":[]}
|