@wordpress/block-editor 12.23.0 → 12.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/README.md +4 -0
- package/build/autocompleters/block.js.map +1 -1
- package/build/autocompleters/link.js.map +1 -1
- package/build/components/alignment-control/index.js.map +1 -1
- package/build/components/alignment-control/ui.js.map +1 -1
- package/build/components/autocomplete/index.js.map +1 -1
- package/build/components/block-actions/index.js.map +1 -1
- package/build/components/block-alignment-control/constants.js.map +1 -1
- package/build/components/block-alignment-control/index.js.map +1 -1
- package/build/components/block-alignment-control/ui.js.map +1 -1
- package/build/components/block-alignment-control/ui.native.js.map +1 -1
- package/build/components/block-alignment-control/use-available-alignments.js.map +1 -1
- package/build/components/block-alignment-matrix-control/index.js.map +1 -1
- package/build/components/block-bindings-toolbar-indicator/index.js.map +1 -1
- package/build/components/block-breadcrumb/index.js.map +1 -1
- package/build/components/block-canvas/index.js.map +1 -1
- package/build/components/block-caption/index.native.js.map +1 -1
- package/build/components/block-card/index.js.map +1 -1
- package/build/components/block-compare/block-view.js.map +1 -1
- package/build/components/block-compare/index.js.map +1 -1
- package/build/components/block-content-overlay/index.js.map +1 -1
- package/build/components/block-context/index.js.map +1 -1
- package/build/components/block-controls/fill.js.map +1 -1
- package/build/components/block-controls/groups.js.map +1 -1
- package/build/components/block-controls/hook.js.map +1 -1
- package/build/components/block-controls/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-controls/use-has-block-controls.js.map +1 -1
- package/build/components/block-draggable/draggable-chip.js.map +1 -1
- package/build/components/block-draggable/draggable-chip.native.js.map +1 -1
- package/build/components/block-draggable/dropping-insertion-point.native.js +1 -1
- package/build/components/block-draggable/dropping-insertion-point.native.js.map +1 -1
- package/build/components/block-draggable/index.js.map +1 -1
- package/build/components/block-draggable/index.native.js +1 -1
- package/build/components/block-draggable/index.native.js.map +1 -1
- package/build/components/block-draggable/use-scroll-when-dragging.js.map +1 -1
- package/build/components/block-draggable/use-scroll-when-dragging.native.js.map +1 -1
- package/build/components/block-edit/context.js +2 -1
- package/build/components/block-edit/context.js.map +1 -1
- package/build/components/block-edit/edit.js.map +1 -1
- package/build/components/block-edit/edit.native.js.map +1 -1
- package/build/components/block-edit/index.js +4 -2
- package/build/components/block-edit/index.js.map +1 -1
- package/build/components/block-edit-visually-button/index.js.map +1 -1
- package/build/components/block-editing-mode/index.js.map +1 -1
- package/build/components/block-full-height-alignment-control/index.js.map +1 -1
- package/build/components/block-heading-level-dropdown/heading-level-icon.js.map +1 -1
- package/build/components/block-heading-level-dropdown/index.js.map +1 -1
- package/build/components/block-heading-level-dropdown/index.native.js.map +1 -1
- package/build/components/block-icon/index.js.map +1 -1
- package/build/components/block-icon/index.native.js.map +1 -1
- package/build/components/block-info-slot-fill/index.js.map +1 -1
- package/build/components/block-inspector/index.js +5 -4
- package/build/components/block-inspector/index.js.map +1 -1
- package/build/components/block-inspector/useBlockInspectorAnimationSettings.js.map +1 -1
- package/build/components/block-list/block-crash-boundary.js.map +1 -1
- package/build/components/block-list/block-crash-boundary.native.js.map +1 -1
- package/build/components/block-list/block-crash-warning.js.map +1 -1
- package/build/components/block-list/block-crash-warning.native.js.map +1 -1
- package/build/components/block-list/block-html.js.map +1 -1
- package/build/components/block-list/block-invalid-warning.js.map +1 -1
- package/build/components/block-list/block-invalid-warning.native.js.map +1 -1
- package/build/components/block-list/block-list-context.native.js.map +1 -1
- package/build/components/block-list/block-list-item-cell.native.js.map +1 -1
- package/build/components/block-list/block-list-item.native.js.map +1 -1
- package/build/components/block-list/block-outline.native.js.map +1 -1
- package/build/components/block-list/block-selection-button.native.js.map +1 -1
- package/build/components/block-list/block.js +44 -26
- package/build/components/block-list/block.js.map +1 -1
- package/build/components/block-list/block.native.js +2 -2
- package/build/components/block-list/block.native.js.map +1 -1
- package/build/components/block-list/grid-item.native.js.map +1 -1
- package/build/components/block-list/index.js +16 -5
- 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/insertion-point.native.js.map +1 -1
- package/build/components/block-list/layout.js.map +1 -1
- package/build/components/block-list/private-block-context.js.map +1 -1
- package/build/components/block-list/subdirectory-icon.js.map +1 -1
- package/build/components/block-list/use-block-props/index.js +2 -1
- package/build/components/block-list/use-block-props/index.js.map +1 -1
- package/build/components/block-list/use-block-props/index.native.js.map +1 -1
- package/build/components/block-list/use-block-props/use-block-moving-mode-class-names.js.map +1 -1
- package/build/components/block-list/use-block-props/use-block-refs.js.map +1 -1
- package/build/components/block-list/use-block-props/use-focus-first-element.js +3 -2
- package/build/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
- package/build/components/block-list/use-block-props/use-focus-handler.js.map +1 -1
- package/build/components/block-list/use-block-props/use-intersection-observer.js.map +1 -1
- package/build/components/block-list/use-block-props/use-is-hovered.js.map +1 -1
- package/build/components/block-list/use-block-props/use-nav-mode-exit.js.map +1 -1
- package/build/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +1 -1
- package/build/components/block-list/use-in-between-inserter.js.map +1 -1
- package/build/components/block-list/use-scroll-upon-insertion.native.js.map +1 -1
- package/build/components/block-list-appender/index.js.map +1 -1
- package/build/components/block-list-appender/index.native.js.map +1 -1
- package/build/components/block-lock/index.js.map +1 -1
- package/build/components/block-lock/menu-item.js.map +1 -1
- package/build/components/block-lock/modal.js.map +1 -1
- package/build/components/block-lock/toolbar.js.map +1 -1
- package/build/components/block-lock/use-block-lock.js.map +1 -1
- package/build/components/block-media-update-progress/index.native.js.map +1 -1
- package/build/components/block-mover/button.js.map +1 -1
- package/build/components/block-mover/index.js.map +1 -1
- package/build/components/block-mover/index.native.js.map +1 -1
- package/build/components/block-mover/mover-description.js.map +1 -1
- package/build/components/block-mover/mover-description.native.js.map +1 -1
- package/build/components/block-navigation/dropdown.js.map +1 -1
- package/build/components/block-parent-selector/index.js.map +1 -1
- package/build/components/block-pattern-setup/constants.js.map +1 -1
- package/build/components/block-pattern-setup/index.js.map +1 -1
- package/build/components/block-pattern-setup/setup-toolbar.js.map +1 -1
- package/build/components/block-pattern-setup/use-patterns-setup.js.map +1 -1
- package/build/components/block-patterns-list/index.js.map +1 -1
- package/build/components/block-patterns-paging/index.js +8 -4
- package/build/components/block-patterns-paging/index.js.map +1 -1
- package/build/components/block-popover/cover.js.map +1 -1
- package/build/components/block-popover/drop-zone.js.map +1 -1
- package/build/components/block-popover/inbetween.js.map +1 -1
- package/build/components/block-popover/index.js.map +1 -1
- package/build/components/block-popover/use-popover-scroll.js.map +1 -1
- 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.map +1 -1
- package/build/components/block-removal-warning-modal/index.js.map +1 -1
- package/build/components/block-rename/index.js.map +1 -1
- package/build/components/block-rename/is-empty-string.js.map +1 -1
- package/build/components/block-rename/modal.js +13 -9
- package/build/components/block-rename/modal.js.map +1 -1
- package/build/components/block-rename/rename-control.js +3 -1
- package/build/components/block-rename/rename-control.js.map +1 -1
- package/build/components/block-rename/use-block-rename.js.map +1 -1
- package/build/components/block-selection-clearer/index.js.map +1 -1
- package/build/components/block-settings/button.native.js.map +1 -1
- package/build/components/block-settings/container.native.js.map +1 -1
- package/build/components/block-settings/index.native.js +1 -1
- package/build/components/block-settings/index.native.js.map +1 -1
- package/build/components/block-settings-menu/block-html-convert-button.js.map +1 -1
- package/build/components/block-settings-menu/block-mode-toggle.js.map +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.map +1 -1
- package/build/components/block-settings-menu/block-settings-menu-first-item.js.map +1 -1
- package/build/components/block-settings-menu/index.js.map +1 -1
- package/build/components/block-settings-menu-controls/index.js.map +1 -1
- package/build/components/block-styles/index.js.map +1 -1
- package/build/components/block-styles/index.native.js.map +1 -1
- package/build/components/block-styles/menu-items.js.map +1 -1
- package/build/components/block-styles/preview-panel.js.map +1 -1
- package/build/components/block-styles/preview.native.js.map +1 -1
- package/build/components/block-styles/use-styles-for-block.js.map +1 -1
- package/build/components/block-styles/utils.js.map +1 -1
- package/build/components/block-switcher/block-styles-menu.js.map +1 -1
- package/build/components/block-switcher/block-transformations-menu.js.map +1 -1
- package/build/components/block-switcher/block-transformations-menu.native.js.map +1 -1
- package/build/components/block-switcher/block-variation-transformations.js.map +1 -1
- 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/preview-block-popover.js.map +1 -1
- package/build/components/block-switcher/use-transformed-patterns.js.map +1 -1
- package/build/components/block-switcher/utils.js.map +1 -1
- package/build/components/block-title/index.js.map +1 -1
- package/build/components/block-title/use-block-display-title.js.map +1 -1
- package/build/components/block-toolbar/block-name-context.js.map +1 -1
- package/build/components/block-toolbar/block-toolbar-last-item.js.map +1 -1
- package/build/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
- package/build/components/block-toolbar/index.js +1 -1
- package/build/components/block-toolbar/index.js.map +1 -1
- package/build/components/block-toolbar/index.native.js.map +1 -1
- package/build/components/block-toolbar/shuffle.js.map +1 -1
- package/build/components/block-toolbar/use-has-block-toolbar.js +6 -3
- package/build/components/block-toolbar/use-has-block-toolbar.js.map +1 -1
- package/build/components/block-toolbar/utils.js.map +1 -1
- package/build/components/block-tools/block-selection-button.js +16 -12
- package/build/components/block-tools/block-selection-button.js.map +1 -1
- package/build/components/block-tools/block-toolbar-breadcrumb.js.map +1 -1
- package/build/components/block-tools/block-toolbar-popover.js.map +1 -1
- package/build/components/block-tools/empty-block-inserter.js.map +1 -1
- package/build/components/block-tools/index.js +1 -1
- package/build/components/block-tools/index.js.map +1 -1
- package/build/components/block-tools/insertion-point.js.map +1 -1
- package/build/components/block-tools/use-block-toolbar-popover-props.js.map +1 -1
- package/build/components/block-tools/use-selected-block-tool-props.js.map +1 -1
- package/build/components/block-tools/use-show-block-tools.js +7 -13
- package/build/components/block-tools/use-show-block-tools.js.map +1 -1
- package/build/components/block-tools/zoom-out-mode-inserters.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-picker/index.js.map +1 -1
- package/build/components/block-variation-picker/index.native.js.map +1 -1
- package/build/components/block-variation-transforms/index.js +4 -1
- package/build/components/block-variation-transforms/index.js.map +1 -1
- package/build/components/block-vertical-alignment-control/icons.js.map +1 -1
- package/build/components/block-vertical-alignment-control/index.js.map +1 -1
- package/build/components/block-vertical-alignment-control/ui.js.map +1 -1
- package/build/components/border-radius-control/all-input-control.js.map +1 -1
- package/build/components/border-radius-control/index.js.map +1 -1
- package/build/components/border-radius-control/input-controls.js.map +1 -1
- package/build/components/border-radius-control/linked-button.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/button-block-appender/index.native.js +11 -1
- package/build/components/button-block-appender/index.native.js.map +1 -1
- package/build/components/caption/index.native.js.map +1 -1
- package/build/components/child-layout-control/index.js.map +1 -1
- package/build/components/color-palette/control.js.map +1 -1
- package/build/components/color-palette/index.js.map +1 -1
- package/build/components/color-palette/with-color-context.js.map +1 -1
- package/build/components/color-style-selector/index.js.map +1 -1
- package/build/components/colors/index.js +1 -1
- package/build/components/colors/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/control.js.map +1 -1
- package/build/components/colors-gradients/dropdown.js.map +1 -1
- package/build/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
- package/build/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
- package/build/components/colors-gradients/use-multiple-origin-colors-and-gradients.js.map +1 -1
- package/build/components/contrast-checker/index.js.map +1 -1
- package/build/components/contrast-checker/index.native.js.map +1 -1
- package/build/components/convert-to-group-buttons/index.js.map +1 -1
- package/build/components/convert-to-group-buttons/index.native.js.map +1 -1
- package/build/components/convert-to-group-buttons/toolbar.js.map +1 -1
- package/build/components/convert-to-group-buttons/use-convert-to-group-button-props.js.map +1 -1
- package/build/components/copy-handler/index.js.map +1 -1
- package/build/components/date-format-picker/index.js.map +1 -1
- package/build/components/default-block-appender/index.js.map +1 -1
- package/build/components/default-block-appender/index.native.js.map +1 -1
- package/build/components/dimensions-tool/aspect-ratio-tool.js.map +1 -1
- package/build/components/dimensions-tool/index.js.map +1 -1
- package/build/components/dimensions-tool/scale-tool.js.map +1 -1
- package/build/components/dimensions-tool/width-height-tool.js +6 -2
- package/build/components/dimensions-tool/width-height-tool.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/editable-text/index.js.map +1 -1
- package/build/components/editor-styles/index.js +2 -1
- package/build/components/editor-styles/index.js.map +1 -1
- package/build/components/floating-toolbar/index.native.js.map +1 -1
- package/build/components/floating-toolbar/nav-up-icon.js.map +1 -1
- package/build/components/font-appearance-control/index.js.map +1 -1
- package/build/components/font-family/index.js.map +1 -1
- package/build/components/font-sizes/fluid-utils.js.map +1 -1
- package/build/components/font-sizes/font-size-picker.js.map +1 -1
- package/build/components/font-sizes/index.js.map +1 -1
- package/build/components/font-sizes/index.native.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/advanced-panel.js.map +1 -1
- package/build/components/global-styles/background-panel.js +19 -16
- package/build/components/global-styles/background-panel.js.map +1 -1
- package/build/components/global-styles/border-panel.js.map +1 -1
- package/build/components/global-styles/color-panel.js.map +1 -1
- package/build/components/global-styles/color-panel.native.js.map +1 -1
- package/build/components/global-styles/context.js.map +1 -1
- 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.map +1 -1
- package/build/components/global-styles/hooks.js.map +1 -1
- package/build/components/global-styles/image-settings-panel.js.map +1 -1
- package/build/components/global-styles/index.js +1 -1
- package/build/components/global-styles/index.js.map +1 -1
- package/build/components/global-styles/shadow-panel-components.js.map +1 -1
- package/build/components/global-styles/typography-panel.js.map +1 -1
- package/build/components/global-styles/typography-utils.js.map +1 -1
- package/build/components/global-styles/use-global-styles-output.js +4 -4
- 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/index.js.map +1 -1
- package/build/components/gradients/index.native.js.map +1 -1
- package/build/components/gradients/use-gradient.js.map +1 -1
- package/build/components/gradients/with-gradient.js.map +1 -1
- package/build/components/grid-visualizer/grid-item-resizer.js.map +1 -1
- package/build/components/grid-visualizer/grid-visualizer.js.map +1 -1
- package/build/components/grid-visualizer/index.js.map +1 -1
- package/build/components/grid-visualizer/utils.js.map +1 -1
- package/build/components/height-control/index.js.map +1 -1
- package/build/components/iframe/get-compatibility-styles.js.map +1 -1
- package/build/components/iframe/index.js +12 -13
- package/build/components/iframe/index.js.map +1 -1
- package/build/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
- package/build/components/image-editor/constants.js.map +1 -1
- package/build/components/image-editor/context.js.map +1 -1
- package/build/components/image-editor/cropper.js +6 -2
- package/build/components/image-editor/cropper.js.map +1 -1
- package/build/components/image-editor/form-controls.js.map +1 -1
- package/build/components/image-editor/index.js +0 -2
- package/build/components/image-editor/index.js.map +1 -1
- package/build/components/image-editor/rotation-button.js.map +1 -1
- package/build/components/image-editor/use-save-image.js.map +1 -1
- package/build/components/image-editor/use-transform-image.js.map +1 -1
- package/build/components/image-editor/zoom-dropdown.js.map +1 -1
- package/build/components/image-link-destinations/index.native.js.map +1 -1
- package/build/components/image-size-control/index.js.map +1 -1
- package/build/components/image-size-control/use-dimension-handler.js.map +1 -1
- package/build/components/index.js +1 -1
- package/build/components/index.js.map +1 -1
- package/build/components/index.native.js +1 -1
- package/build/components/index.native.js.map +1 -1
- package/build/components/inner-blocks/button-block-appender.js.map +1 -1
- package/build/components/inner-blocks/constants.native.js.map +1 -1
- package/build/components/inner-blocks/default-block-appender.js.map +1 -1
- package/build/components/inner-blocks/index.js.map +1 -1
- package/build/components/inner-blocks/index.native.js.map +1 -1
- package/build/components/inner-blocks/use-block-context.js.map +1 -1
- package/build/components/inner-blocks/use-inner-block-template-sync.js.map +1 -1
- package/build/components/inner-blocks/use-nested-settings-update.js.map +1 -1
- package/build/components/inner-blocks/warning-max-depth-exceeded.native.js.map +1 -1
- package/build/components/inner-blocks/with-client-id.js.map +1 -1
- package/build/components/inserter/block-patterns-explorer/index.js.map +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.map +1 -1
- package/build/components/inserter/block-patterns-tab/index.js +31 -18
- package/build/components/inserter/block-patterns-tab/index.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +2 -24
- package/build/components/inserter/block-patterns-tab/pattern-category-preview-panel.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/pattern-category-previews.js +1 -3
- package/build/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/use-pattern-categories.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/utils.js.map +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/hooks/use-block-type-impressions.native.js.map +1 -1
- package/build/components/inserter/hooks/use-block-types-state.js.map +1 -1
- package/build/components/inserter/hooks/use-clipboard-block.native.js.map +1 -1
- package/build/components/inserter/hooks/use-insertion-point.js.map +1 -1
- package/build/components/inserter/hooks/use-patterns-paging.js.map +1 -1
- package/build/components/inserter/hooks/use-patterns-state.js.map +1 -1
- package/build/components/inserter/index.js.map +1 -1
- package/build/components/inserter/index.native.js.map +1 -1
- package/build/components/inserter/library.js.map +1 -1
- package/build/components/inserter/media-tab/hooks.js.map +1 -1
- package/build/components/inserter/media-tab/index.js.map +1 -1
- package/build/components/inserter/media-tab/media-list.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.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 +17 -11
- package/build/components/inserter/menu.js.map +1 -1
- package/build/components/inserter/menu.native.js.map +1 -1
- package/build/components/inserter/mobile-tab-navigation.js.map +1 -1
- package/build/components/inserter/no-results.js.map +1 -1
- package/build/components/inserter/no-results.native.js.map +1 -1
- package/build/components/inserter/panel.js.map +1 -1
- package/build/components/inserter/preview-panel.js.map +1 -1
- package/build/components/inserter/quick-inserter.js.map +1 -1
- package/build/components/inserter/reusable-block-rename-hint.js.map +1 -1
- package/build/components/inserter/reusable-blocks-tab.native.js.map +1 -1
- package/build/components/inserter/search-items.js.map +1 -1
- package/build/components/inserter/search-results.js.map +1 -1
- package/build/components/inserter/search-results.native.js.map +1 -1
- package/build/components/inserter/tabs.js +7 -3
- package/build/components/inserter/tabs.js.map +1 -1
- package/build/components/inserter/tabs.native.js.map +1 -1
- package/build/components/inserter/tips.js.map +1 -1
- package/build/components/inserter/utils.native.js.map +1 -1
- package/build/components/inserter-button/index.native.js.map +1 -1
- package/build/components/inserter-button/sparkles.js.map +1 -1
- package/build/components/inserter-draggable-blocks/index.js.map +1 -1
- package/build/components/inserter-list-item/index.js.map +1 -1
- package/build/components/inserter-listbox/context.js.map +1 -1
- package/build/components/inserter-listbox/group.js.map +1 -1
- package/build/components/inserter-listbox/index.js.map +1 -1
- package/build/components/inserter-listbox/item.js.map +1 -1
- package/build/components/inserter-listbox/row.js.map +1 -1
- package/build/components/inserter-menu-extension/index.js.map +1 -1
- package/build/components/inspector-controls/block-support-slot-container.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/groups.js.map +1 -1
- package/build/components/inspector-controls/index.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/inspector-controls-tabs/advanced-controls-panel.js +1 -1
- package/build/components/inspector-controls-tabs/advanced-controls-panel.js.map +1 -1
- package/build/components/inspector-controls-tabs/advanced-controls-panel.native.js.map +1 -1
- package/build/components/inspector-controls-tabs/index.js.map +1 -1
- package/build/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
- package/build/components/inspector-controls-tabs/settings-tab-hint.js.map +1 -1
- package/build/components/inspector-controls-tabs/settings-tab.js.map +1 -1
- package/build/components/inspector-controls-tabs/styles-tab.js +1 -1
- package/build/components/inspector-controls-tabs/styles-tab.js.map +1 -1
- package/build/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +1 -1
- package/build/components/inspector-controls-tabs/use-is-list-view-tab-disabled.js.map +1 -1
- package/build/components/inspector-controls-tabs/utils.js.map +1 -1
- package/build/components/inspector-popover-header/index.js.map +1 -1
- package/build/components/justify-content-control/index.js.map +1 -1
- package/build/components/justify-content-control/ui.js.map +1 -1
- package/build/components/keyboard-shortcuts/index.js.map +1 -1
- package/build/components/letter-spacing-control/index.js.map +1 -1
- package/build/components/line-height-control/index.js.map +1 -1
- package/build/components/line-height-control/index.native.js.map +1 -1
- package/build/components/line-height-control/utils.js.map +1 -1
- package/build/components/link-control/constants.js.map +1 -1
- 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/link-preview.js.map +1 -1
- package/build/components/link-control/search-create-button.js.map +1 -1
- package/build/components/link-control/search-input.js.map +1 -1
- package/build/components/link-control/search-item.js.map +1 -1
- 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/settings.js.map +1 -1
- package/build/components/link-control/use-create-page.js.map +1 -1
- package/build/components/link-control/use-internal-value.js.map +1 -1
- package/build/components/link-control/use-rich-url-data.js.map +1 -1
- package/build/components/link-control/use-search-handler.js.map +1 -1
- package/build/components/link-control/viewer-slot.js.map +1 -1
- package/build/components/list-view/appender.js.map +1 -1
- package/build/components/list-view/aria-referenced-text.js.map +1 -1
- package/build/components/list-view/block-contents.js.map +1 -1
- package/build/components/list-view/block-select-button.js +29 -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/context.js.map +1 -1
- package/build/components/list-view/drop-indicator.js.map +1 -1
- package/build/components/list-view/expander.js.map +1 -1
- package/build/components/list-view/index.js.map +1 -1
- package/build/components/list-view/leaf.js.map +1 -1
- package/build/components/list-view/use-block-selection.js.map +1 -1
- package/build/components/list-view/use-clipboard-handler.js.map +1 -1
- package/build/components/list-view/use-list-view-block-indexes.js.map +1 -1
- package/build/components/list-view/use-list-view-client-ids.js.map +1 -1
- package/build/components/list-view/use-list-view-collapse-items.js.map +1 -1
- package/build/components/list-view/use-list-view-drop-zone.js +5 -0
- package/build/components/list-view/use-list-view-drop-zone.js.map +1 -1
- package/build/components/list-view/use-list-view-expand-selected-item.js.map +1 -1
- package/build/components/list-view/use-list-view-images.js.map +1 -1
- package/build/components/list-view/use-list-view-scroll-into-view.js.map +1 -1
- package/build/components/list-view/utils.js.map +1 -1
- package/build/components/media-placeholder/index.js.map +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/media-replace-flow/index.native.js.map +1 -1
- package/build/components/media-upload/check.js.map +1 -1
- package/build/components/media-upload/constants.native.js.map +1 -1
- package/build/components/media-upload/index.js.map +1 -1
- package/build/components/media-upload/index.native.js.map +1 -1
- package/build/components/media-upload-progress/constants.js.map +1 -1
- package/build/components/media-upload-progress/index.native.js.map +1 -1
- package/build/components/multi-selection-inspector/index.js.map +1 -1
- package/build/components/navigable-toolbar/index.js.map +1 -1
- package/build/components/observe-typing/index.js.map +1 -1
- package/build/components/panel-color-settings/index.js.map +1 -1
- package/build/components/plain-text/index.js.map +1 -1
- package/build/components/plain-text/index.native.js.map +1 -1
- package/build/components/preview-options/index.js.map +1 -1
- package/build/components/provider/block-refs-provider.js.map +1 -1
- package/build/components/provider/index.js.map +1 -1
- package/build/components/provider/index.native.js.map +1 -1
- package/build/components/provider/use-block-sync.js.map +1 -1
- package/build/components/provider/with-registry-provider.js.map +1 -1
- package/build/components/publish-date-time-picker/index.js.map +1 -1
- package/build/components/recursion-provider/index.js +2 -2
- package/build/components/recursion-provider/index.js.map +1 -1
- package/build/components/resizable-box-popover/index.js.map +1 -1
- package/build/components/resolution-tool/index.js.map +1 -1
- package/build/components/responsive-block-control/index.js.map +1 -1
- package/build/components/responsive-block-control/label.js.map +1 -1
- package/build/components/rich-text/content.js +26 -19
- package/build/components/rich-text/content.js.map +1 -1
- package/build/components/rich-text/embed-handler-picker.native.js.map +1 -1
- package/build/components/rich-text/file-paste-handler.native.js.map +1 -1
- package/build/components/rich-text/format-edit.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/format-toolbar-container.js.map +1 -1
- package/build/components/rich-text/format-toolbar-container.native.js.map +1 -1
- package/build/components/rich-text/get-rich-text-values.js.map +1 -1
- package/build/components/rich-text/index.js +40 -0
- package/build/components/rich-text/index.js.map +1 -1
- package/build/components/rich-text/index.native.js +3 -1
- package/build/components/rich-text/index.native.js.map +1 -1
- package/build/components/rich-text/input-event.js.map +1 -1
- package/build/components/rich-text/input-event.native.js.map +1 -1
- package/build/components/rich-text/multiline.js.map +1 -1
- package/build/components/rich-text/native/format-edit.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.js.map +1 -1
- package/build/components/rich-text/native/index.native.js.map +1 -1
- package/build/components/rich-text/native/toolbar-button-with-options.native.js.map +1 -1
- package/build/components/rich-text/native/use-format-types.js.map +1 -1
- package/build/components/rich-text/prevent-event-discovery.js.map +1 -1
- package/build/components/rich-text/remove-browser-shortcuts.native.js.map +1 -1
- package/build/components/rich-text/shortcut.js.map +1 -1
- package/build/components/rich-text/shortcut.native.js.map +1 -1
- package/build/components/rich-text/split-value.js.map +1 -1
- package/build/components/rich-text/toolbar-button.js.map +1 -1
- package/build/components/rich-text/use-before-input-rules.js.map +1 -1
- package/build/components/rich-text/use-delete.js.map +1 -1
- package/build/components/rich-text/use-enter.js.map +1 -1
- package/build/components/rich-text/use-firefox-compat.js.map +1 -1
- package/build/components/rich-text/use-format-types.js.map +1 -1
- package/build/components/rich-text/use-input-events.js.map +1 -1
- package/build/components/rich-text/use-input-rules.js.map +1 -1
- package/build/components/rich-text/use-insert-replacement-text.js.map +1 -1
- package/build/components/rich-text/use-mark-persistent.js.map +1 -1
- package/build/components/rich-text/use-paste-handler.js.map +1 -1
- package/build/components/rich-text/use-remove-browser-shortcuts.js.map +1 -1
- package/build/components/rich-text/use-shortcuts.js.map +1 -1
- package/build/components/rich-text/use-undo-automatic-change.js +1 -1
- package/build/components/rich-text/use-undo-automatic-change.js.map +1 -1
- package/build/components/rich-text/utils.js.map +1 -1
- package/build/components/rich-text/with-deprecations.js.map +1 -1
- package/build/components/selection-scroll-into-view/index.js.map +1 -1
- package/build/components/skip-to-selected-block/index.js.map +1 -1
- package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
- package/build/components/spacing-sizes-control/index.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/single.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/sides-dropdown/index.js.map +1 -1
- package/build/components/spacing-sizes-control/utils.js.map +1 -1
- package/build/components/text-decoration-control/index.js.map +1 -1
- package/build/components/text-transform-control/index.js.map +1 -1
- package/build/components/tool-selector/index.js.map +1 -1
- package/build/components/typewriter/index.js.map +1 -1
- package/build/components/ungroup-button/index.native.js.map +1 -1
- package/build/components/unit-control/index.js.map +1 -1
- package/build/components/unsupported-block-details/index.native.js.map +1 -1
- package/build/components/url-input/button.js.map +1 -1
- package/build/components/url-input/index.js.map +1 -1
- package/build/components/url-input/index.native.js.map +1 -1
- package/build/components/url-popover/image-url-input-ui.js.map +1 -1
- package/build/components/url-popover/index.js.map +1 -1
- package/build/components/url-popover/link-editor.js.map +1 -1
- package/build/components/url-popover/link-viewer-url.js.map +1 -1
- package/build/components/url-popover/link-viewer.js.map +1 -1
- package/build/components/use-block-commands/index.js +20 -2
- package/build/components/use-block-commands/index.js.map +1 -1
- package/build/components/use-block-display-information/index.js.map +1 -1
- package/build/components/use-block-drop-zone/index.js.map +1 -1
- package/build/components/use-block-drop-zone/index.native.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/use-on-block-drop/index.js.map +1 -1
- package/build/components/use-on-block-drop/index.native.js.map +1 -1
- package/build/components/use-on-block-drop/types.js.map +1 -1
- package/build/components/use-paste-styles/index.js +1 -0
- package/build/components/use-paste-styles/index.js.map +1 -1
- package/build/components/use-resize-canvas/index.js.map +1 -1
- package/build/components/use-settings/index.js.map +1 -1
- package/build/components/use-unsupported-block-editor/index.native.js.map +1 -1
- package/build/components/video-player/gridicon-play.native.js.map +1 -1
- package/build/components/video-player/index.native.js.map +1 -1
- package/build/components/warning/index.js.map +1 -1
- package/build/components/warning/index.native.js.map +1 -1
- package/build/components/writing-flow/index.js.map +1 -1
- package/build/components/writing-flow/use-arrow-nav.js.map +1 -1
- package/build/components/writing-flow/use-click-selection.js.map +1 -1
- package/build/components/writing-flow/use-clipboard-handler.js.map +1 -1
- package/build/components/writing-flow/use-drag-selection.js.map +1 -1
- package/build/components/writing-flow/use-input.js.map +1 -1
- package/build/components/writing-flow/use-multi-selection.js.map +1 -1
- package/build/components/writing-flow/use-select-all.js.map +1 -1
- package/build/components/writing-flow/use-selection-observer.js.map +1 -1
- package/build/components/writing-flow/use-tab-nav.js.map +1 -1
- package/build/components/writing-flow/utils.js.map +1 -1
- package/build/components/writing-mode-control/index.js.map +1 -1
- package/build/elements/index.js.map +1 -1
- package/build/hooks/align.js.map +1 -1
- package/build/hooks/align.native.js +1 -1
- package/build/hooks/align.native.js.map +1 -1
- package/build/hooks/anchor.js.map +1 -1
- package/build/hooks/aria-label.js.map +1 -1
- package/build/hooks/background.js +3 -3
- package/build/hooks/background.js.map +1 -1
- package/build/hooks/block-hooks.js.map +1 -1
- package/build/hooks/block-renaming.js +0 -37
- package/build/hooks/block-renaming.js.map +1 -1
- package/build/hooks/border.js.map +1 -1
- package/build/hooks/color.js +1 -1
- package/build/hooks/color.js.map +1 -1
- package/build/hooks/compat.js.map +1 -1
- package/build/hooks/content-lock-ui.js +5 -5
- package/build/hooks/content-lock-ui.js.map +1 -1
- package/build/hooks/contrast-checker.js.map +1 -1
- package/build/hooks/custom-class-name.js.map +1 -1
- package/build/hooks/custom-class-name.native.js.map +1 -1
- package/build/hooks/dimensions.js.map +1 -1
- package/build/hooks/duotone.js.map +1 -1
- package/build/hooks/font-family.js.map +1 -1
- package/build/hooks/font-size.js.map +1 -1
- package/build/hooks/gap.js.map +1 -1
- package/build/hooks/generated-class-name.js.map +1 -1
- package/build/hooks/index.js +6 -5
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/index.native.js.map +1 -1
- package/build/hooks/layout-child.js.map +1 -1
- package/build/hooks/layout.js +38 -19
- package/build/hooks/layout.js.map +1 -1
- package/build/hooks/layout.native.js.map +1 -1
- package/build/hooks/line-height.js.map +1 -1
- package/build/hooks/lock.js.map +1 -1
- package/build/hooks/metadata.js.map +1 -1
- package/build/hooks/position.js.map +1 -1
- package/build/hooks/settings.js.map +1 -1
- package/build/hooks/spacing-visualizer.js.map +1 -1
- package/build/hooks/style.js.map +1 -1
- package/build/hooks/supports.js +27 -4
- package/build/hooks/supports.js.map +1 -1
- package/build/hooks/text-align.js +156 -0
- package/build/hooks/text-align.js.map +1 -0
- package/build/hooks/typography.js +3 -2
- package/build/hooks/typography.js.map +1 -1
- package/build/hooks/typography.native.js.map +1 -1
- package/build/hooks/use-bindings-attributes.js +66 -129
- package/build/hooks/use-bindings-attributes.js.map +1 -1
- package/build/hooks/use-border-props.js.map +1 -1
- package/build/hooks/use-cached-truthy.js.map +1 -1
- package/build/hooks/use-color-props.js.map +1 -1
- package/build/hooks/use-editor-wrapper-styles.native.js.map +1 -1
- package/build/hooks/use-shadow-props.js.map +1 -1
- package/build/hooks/use-spacing-props.js.map +1 -1
- package/build/hooks/use-typography-props.js +2 -1
- package/build/hooks/use-typography-props.js.map +1 -1
- package/build/hooks/use-zoom-out.js +22 -15
- package/build/hooks/use-zoom-out.js.map +1 -1
- package/build/hooks/utils.js +29 -5
- package/build/hooks/utils.js.map +1 -1
- package/build/index.js.map +1 -1
- package/build/index.native.js.map +1 -1
- package/build/layouts/constrained.js.map +1 -1
- package/build/layouts/definitions.js +8 -6
- package/build/layouts/definitions.js.map +1 -1
- package/build/layouts/flex.js.map +1 -1
- package/build/layouts/flow.js.map +1 -1
- package/build/layouts/grid.js +52 -9
- package/build/layouts/grid.js.map +1 -1
- package/build/layouts/index.js.map +1 -1
- package/build/layouts/utils.js.map +1 -1
- package/build/lock-unlock.js.map +1 -1
- package/build/private-apis.js +1 -1
- package/build/private-apis.js.map +1 -1
- package/build/private-apis.native.js +1 -1
- package/build/private-apis.native.js.map +1 -1
- package/build/store/actions.js +18 -4
- package/build/store/actions.js.map +1 -1
- package/build/store/array.js.map +1 -1
- package/build/store/constants.js.map +1 -1
- package/build/store/defaults.js.map +1 -1
- package/build/store/defaults.native.js.map +1 -1
- package/build/store/get-block-settings.js.map +1 -1
- package/build/store/index.js +1 -1
- package/build/store/index.js.map +1 -1
- package/build/store/private-actions.js +5 -2
- package/build/store/private-actions.js.map +1 -1
- package/build/store/private-keys.js.map +1 -1
- package/build/store/private-selectors.js +94 -38
- package/build/store/private-selectors.js.map +1 -1
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +122 -81
- package/build/store/selectors.js.map +1 -1
- package/build/store/undo-ignore.js.map +1 -1
- package/build/store/utils.js.map +1 -1
- package/build/utils/dom.js.map +1 -1
- package/build/utils/get-px-from-css-unit.js.map +1 -1
- package/build/utils/index.js.map +1 -1
- package/build/utils/math.js.map +1 -1
- package/build/utils/object.js.map +1 -1
- package/build/utils/order-inserter-block-items.js.map +1 -1
- package/build/utils/pasting.js.map +1 -1
- package/build/utils/selection.js.map +1 -1
- package/build/utils/sorting.js.map +1 -1
- package/build/utils/transform-styles/index.js +1 -1
- package/build/utils/transform-styles/index.js.map +1 -1
- package/build/utils/use-notify-copy.js.map +1 -1
- package/build-module/autocompleters/block.js.map +1 -1
- package/build-module/autocompleters/link.js.map +1 -1
- package/build-module/components/alignment-control/index.js.map +1 -1
- package/build-module/components/alignment-control/ui.js.map +1 -1
- package/build-module/components/autocomplete/index.js.map +1 -1
- package/build-module/components/block-actions/index.js.map +1 -1
- package/build-module/components/block-alignment-control/constants.js.map +1 -1
- package/build-module/components/block-alignment-control/index.js.map +1 -1
- package/build-module/components/block-alignment-control/ui.js.map +1 -1
- package/build-module/components/block-alignment-control/ui.native.js.map +1 -1
- package/build-module/components/block-alignment-control/use-available-alignments.js.map +1 -1
- package/build-module/components/block-alignment-matrix-control/index.js.map +1 -1
- package/build-module/components/block-bindings-toolbar-indicator/index.js.map +1 -1
- package/build-module/components/block-breadcrumb/index.js.map +1 -1
- package/build-module/components/block-canvas/index.js.map +1 -1
- package/build-module/components/block-caption/index.native.js.map +1 -1
- package/build-module/components/block-card/index.js.map +1 -1
- package/build-module/components/block-compare/block-view.js.map +1 -1
- package/build-module/components/block-compare/index.js.map +1 -1
- package/build-module/components/block-content-overlay/index.js.map +1 -1
- package/build-module/components/block-context/index.js.map +1 -1
- package/build-module/components/block-controls/fill.js.map +1 -1
- package/build-module/components/block-controls/groups.js.map +1 -1
- package/build-module/components/block-controls/hook.js.map +1 -1
- package/build-module/components/block-controls/index.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-controls/use-has-block-controls.js.map +1 -1
- package/build-module/components/block-draggable/draggable-chip.js.map +1 -1
- package/build-module/components/block-draggable/draggable-chip.native.js.map +1 -1
- package/build-module/components/block-draggable/dropping-insertion-point.native.js.map +1 -1
- package/build-module/components/block-draggable/index.js.map +1 -1
- package/build-module/components/block-draggable/index.native.js.map +1 -1
- package/build-module/components/block-draggable/use-scroll-when-dragging.js.map +1 -1
- package/build-module/components/block-draggable/use-scroll-when-dragging.native.js.map +1 -1
- package/build-module/components/block-edit/context.js +1 -0
- package/build-module/components/block-edit/context.js.map +1 -1
- package/build-module/components/block-edit/edit.js.map +1 -1
- package/build-module/components/block-edit/edit.native.js.map +1 -1
- package/build-module/components/block-edit/index.js +5 -3
- package/build-module/components/block-edit/index.js.map +1 -1
- package/build-module/components/block-edit-visually-button/index.js.map +1 -1
- package/build-module/components/block-editing-mode/index.js.map +1 -1
- package/build-module/components/block-full-height-alignment-control/index.js.map +1 -1
- package/build-module/components/block-heading-level-dropdown/heading-level-icon.js.map +1 -1
- package/build-module/components/block-heading-level-dropdown/index.js.map +1 -1
- package/build-module/components/block-heading-level-dropdown/index.native.js.map +1 -1
- package/build-module/components/block-icon/index.js.map +1 -1
- package/build-module/components/block-icon/index.native.js.map +1 -1
- package/build-module/components/block-info-slot-fill/index.js.map +1 -1
- package/build-module/components/block-inspector/index.js +5 -4
- package/build-module/components/block-inspector/index.js.map +1 -1
- package/build-module/components/block-inspector/useBlockInspectorAnimationSettings.js.map +1 -1
- package/build-module/components/block-list/block-crash-boundary.js.map +1 -1
- package/build-module/components/block-list/block-crash-boundary.native.js.map +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.map +1 -1
- package/build-module/components/block-list/block-html.js.map +1 -1
- package/build-module/components/block-list/block-invalid-warning.js.map +1 -1
- package/build-module/components/block-list/block-invalid-warning.native.js.map +1 -1
- package/build-module/components/block-list/block-list-context.native.js.map +1 -1
- package/build-module/components/block-list/block-list-item-cell.native.js.map +1 -1
- package/build-module/components/block-list/block-list-item.native.js.map +1 -1
- package/build-module/components/block-list/block-outline.native.js.map +1 -1
- package/build-module/components/block-list/block-selection-button.native.js.map +1 -1
- package/build-module/components/block-list/block.js +44 -26
- package/build-module/components/block-list/block.js.map +1 -1
- package/build-module/components/block-list/block.native.js +2 -2
- package/build-module/components/block-list/block.native.js.map +1 -1
- package/build-module/components/block-list/grid-item.native.js.map +1 -1
- package/build-module/components/block-list/index.js +16 -5
- package/build-module/components/block-list/index.js.map +1 -1
- package/build-module/components/block-list/index.native.js.map +1 -1
- package/build-module/components/block-list/insertion-point.native.js.map +1 -1
- package/build-module/components/block-list/layout.js.map +1 -1
- package/build-module/components/block-list/private-block-context.js.map +1 -1
- package/build-module/components/block-list/subdirectory-icon.js.map +1 -1
- package/build-module/components/block-list/use-block-props/index.js +2 -1
- package/build-module/components/block-list/use-block-props/index.js.map +1 -1
- package/build-module/components/block-list/use-block-props/index.native.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-block-moving-mode-class-names.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-block-refs.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-focus-first-element.js +3 -2
- package/build-module/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-focus-handler.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-intersection-observer.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-is-hovered.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-nav-mode-exit.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +1 -1
- package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
- package/build-module/components/block-list/use-scroll-upon-insertion.native.js.map +1 -1
- package/build-module/components/block-list-appender/index.js.map +1 -1
- package/build-module/components/block-list-appender/index.native.js.map +1 -1
- package/build-module/components/block-lock/index.js.map +1 -1
- package/build-module/components/block-lock/menu-item.js.map +1 -1
- package/build-module/components/block-lock/modal.js.map +1 -1
- package/build-module/components/block-lock/toolbar.js.map +1 -1
- package/build-module/components/block-lock/use-block-lock.js.map +1 -1
- package/build-module/components/block-media-update-progress/index.native.js.map +1 -1
- package/build-module/components/block-mover/button.js.map +1 -1
- package/build-module/components/block-mover/index.js.map +1 -1
- package/build-module/components/block-mover/index.native.js.map +1 -1
- package/build-module/components/block-mover/mover-description.js.map +1 -1
- package/build-module/components/block-mover/mover-description.native.js.map +1 -1
- package/build-module/components/block-navigation/dropdown.js.map +1 -1
- package/build-module/components/block-parent-selector/index.js.map +1 -1
- package/build-module/components/block-pattern-setup/constants.js.map +1 -1
- package/build-module/components/block-pattern-setup/index.js.map +1 -1
- package/build-module/components/block-pattern-setup/setup-toolbar.js.map +1 -1
- package/build-module/components/block-pattern-setup/use-patterns-setup.js.map +1 -1
- package/build-module/components/block-patterns-list/index.js.map +1 -1
- package/build-module/components/block-patterns-paging/index.js +8 -4
- package/build-module/components/block-patterns-paging/index.js.map +1 -1
- package/build-module/components/block-popover/cover.js.map +1 -1
- package/build-module/components/block-popover/drop-zone.js.map +1 -1
- package/build-module/components/block-popover/inbetween.js.map +1 -1
- package/build-module/components/block-popover/index.js.map +1 -1
- package/build-module/components/block-popover/use-popover-scroll.js.map +1 -1
- package/build-module/components/block-preview/auto.js.map +1 -1
- package/build-module/components/block-preview/index.js.map +1 -1
- package/build-module/components/block-quick-navigation/index.js.map +1 -1
- package/build-module/components/block-removal-warning-modal/index.js.map +1 -1
- package/build-module/components/block-rename/index.js.map +1 -1
- package/build-module/components/block-rename/is-empty-string.js.map +1 -1
- package/build-module/components/block-rename/modal.js +14 -10
- package/build-module/components/block-rename/modal.js.map +1 -1
- package/build-module/components/block-rename/rename-control.js +3 -1
- package/build-module/components/block-rename/rename-control.js.map +1 -1
- package/build-module/components/block-rename/use-block-rename.js.map +1 -1
- package/build-module/components/block-selection-clearer/index.js.map +1 -1
- package/build-module/components/block-settings/button.native.js.map +1 -1
- package/build-module/components/block-settings/container.native.js.map +1 -1
- package/build-module/components/block-settings/index.native.js.map +1 -1
- package/build-module/components/block-settings-menu/block-html-convert-button.js.map +1 -1
- package/build-module/components/block-settings-menu/block-mode-toggle.js.map +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.map +1 -1
- package/build-module/components/block-settings-menu/block-settings-menu-first-item.js.map +1 -1
- package/build-module/components/block-settings-menu/index.js.map +1 -1
- package/build-module/components/block-settings-menu-controls/index.js.map +1 -1
- package/build-module/components/block-styles/index.js.map +1 -1
- package/build-module/components/block-styles/index.native.js.map +1 -1
- package/build-module/components/block-styles/menu-items.js.map +1 -1
- package/build-module/components/block-styles/preview-panel.js.map +1 -1
- package/build-module/components/block-styles/preview.native.js.map +1 -1
- package/build-module/components/block-styles/use-styles-for-block.js.map +1 -1
- package/build-module/components/block-styles/utils.js.map +1 -1
- package/build-module/components/block-switcher/block-styles-menu.js.map +1 -1
- package/build-module/components/block-switcher/block-transformations-menu.js.map +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.map +1 -1
- package/build-module/components/block-switcher/index.js.map +1 -1
- package/build-module/components/block-switcher/pattern-transformations-menu.js.map +1 -1
- package/build-module/components/block-switcher/preview-block-popover.js.map +1 -1
- package/build-module/components/block-switcher/use-transformed-patterns.js.map +1 -1
- package/build-module/components/block-switcher/utils.js.map +1 -1
- package/build-module/components/block-title/index.js.map +1 -1
- package/build-module/components/block-title/use-block-display-title.js.map +1 -1
- package/build-module/components/block-toolbar/block-name-context.js.map +1 -1
- package/build-module/components/block-toolbar/block-toolbar-last-item.js.map +1 -1
- package/build-module/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
- package/build-module/components/block-toolbar/index.js +1 -1
- package/build-module/components/block-toolbar/index.js.map +1 -1
- package/build-module/components/block-toolbar/index.native.js.map +1 -1
- package/build-module/components/block-toolbar/shuffle.js.map +1 -1
- package/build-module/components/block-toolbar/use-has-block-toolbar.js +6 -3
- package/build-module/components/block-toolbar/use-has-block-toolbar.js.map +1 -1
- package/build-module/components/block-toolbar/utils.js.map +1 -1
- package/build-module/components/block-tools/block-selection-button.js +16 -12
- package/build-module/components/block-tools/block-selection-button.js.map +1 -1
- package/build-module/components/block-tools/block-toolbar-breadcrumb.js.map +1 -1
- package/build-module/components/block-tools/block-toolbar-popover.js.map +1 -1
- package/build-module/components/block-tools/empty-block-inserter.js.map +1 -1
- package/build-module/components/block-tools/index.js.map +1 -1
- package/build-module/components/block-tools/insertion-point.js.map +1 -1
- package/build-module/components/block-tools/use-block-toolbar-popover-props.js.map +1 -1
- package/build-module/components/block-tools/use-selected-block-tool-props.js.map +1 -1
- package/build-module/components/block-tools/use-show-block-tools.js +7 -13
- package/build-module/components/block-tools/use-show-block-tools.js.map +1 -1
- package/build-module/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
- package/build-module/components/block-types-list/index.js.map +1 -1
- package/build-module/components/block-types-list/index.native.js.map +1 -1
- package/build-module/components/block-variation-picker/index.js.map +1 -1
- package/build-module/components/block-variation-picker/index.native.js.map +1 -1
- package/build-module/components/block-variation-transforms/index.js +4 -1
- package/build-module/components/block-variation-transforms/index.js.map +1 -1
- package/build-module/components/block-vertical-alignment-control/icons.js.map +1 -1
- package/build-module/components/block-vertical-alignment-control/index.js.map +1 -1
- package/build-module/components/block-vertical-alignment-control/ui.js.map +1 -1
- package/build-module/components/border-radius-control/all-input-control.js.map +1 -1
- package/build-module/components/border-radius-control/index.js.map +1 -1
- package/build-module/components/border-radius-control/input-controls.js.map +1 -1
- package/build-module/components/border-radius-control/linked-button.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 +11 -1
- package/build-module/components/button-block-appender/index.native.js.map +1 -1
- package/build-module/components/caption/index.native.js.map +1 -1
- package/build-module/components/child-layout-control/index.js.map +1 -1
- package/build-module/components/color-palette/control.js.map +1 -1
- package/build-module/components/color-palette/index.js.map +1 -1
- package/build-module/components/color-palette/with-color-context.js.map +1 -1
- package/build-module/components/color-style-selector/index.js.map +1 -1
- package/build-module/components/colors/index.js.map +1 -1
- package/build-module/components/colors/utils.js.map +1 -1
- package/build-module/components/colors/with-colors.js.map +1 -1
- package/build-module/components/colors-gradients/control.js.map +1 -1
- package/build-module/components/colors-gradients/dropdown.js.map +1 -1
- 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.map +1 -1
- package/build-module/components/colors-gradients/use-multiple-origin-colors-and-gradients.js.map +1 -1
- package/build-module/components/contrast-checker/index.js.map +1 -1
- package/build-module/components/contrast-checker/index.native.js.map +1 -1
- package/build-module/components/convert-to-group-buttons/index.js.map +1 -1
- package/build-module/components/convert-to-group-buttons/index.native.js.map +1 -1
- package/build-module/components/convert-to-group-buttons/toolbar.js.map +1 -1
- package/build-module/components/convert-to-group-buttons/use-convert-to-group-button-props.js.map +1 -1
- package/build-module/components/copy-handler/index.js.map +1 -1
- package/build-module/components/date-format-picker/index.js.map +1 -1
- package/build-module/components/default-block-appender/index.js.map +1 -1
- package/build-module/components/default-block-appender/index.native.js.map +1 -1
- package/build-module/components/dimensions-tool/aspect-ratio-tool.js.map +1 -1
- package/build-module/components/dimensions-tool/index.js.map +1 -1
- package/build-module/components/dimensions-tool/scale-tool.js.map +1 -1
- 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.map +1 -1
- package/build-module/components/editable-text/index.js.map +1 -1
- package/build-module/components/editor-styles/index.js +3 -2
- package/build-module/components/editor-styles/index.js.map +1 -1
- package/build-module/components/floating-toolbar/index.native.js.map +1 -1
- package/build-module/components/floating-toolbar/nav-up-icon.js.map +1 -1
- package/build-module/components/font-appearance-control/index.js.map +1 -1
- package/build-module/components/font-family/index.js.map +1 -1
- package/build-module/components/font-sizes/fluid-utils.js.map +1 -1
- package/build-module/components/font-sizes/font-size-picker.js.map +1 -1
- package/build-module/components/font-sizes/index.js.map +1 -1
- package/build-module/components/font-sizes/index.native.js.map +1 -1
- package/build-module/components/font-sizes/utils.js.map +1 -1
- package/build-module/components/font-sizes/with-font-sizes.js.map +1 -1
- package/build-module/components/global-styles/advanced-panel.js.map +1 -1
- package/build-module/components/global-styles/background-panel.js +19 -16
- package/build-module/components/global-styles/background-panel.js.map +1 -1
- package/build-module/components/global-styles/border-panel.js.map +1 -1
- package/build-module/components/global-styles/color-panel.js.map +1 -1
- package/build-module/components/global-styles/color-panel.native.js.map +1 -1
- package/build-module/components/global-styles/context.js.map +1 -1
- package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
- 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.map +1 -1
- package/build-module/components/global-styles/hooks.js.map +1 -1
- package/build-module/components/global-styles/image-settings-panel.js.map +1 -1
- package/build-module/components/global-styles/index.js.map +1 -1
- package/build-module/components/global-styles/shadow-panel-components.js.map +1 -1
- package/build-module/components/global-styles/typography-panel.js.map +1 -1
- package/build-module/components/global-styles/typography-utils.js.map +1 -1
- package/build-module/components/global-styles/use-global-styles-output.js +4 -4
- 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/index.js.map +1 -1
- package/build-module/components/gradients/index.native.js.map +1 -1
- package/build-module/components/gradients/use-gradient.js.map +1 -1
- package/build-module/components/gradients/with-gradient.js.map +1 -1
- package/build-module/components/grid-visualizer/grid-item-resizer.js.map +1 -1
- package/build-module/components/grid-visualizer/grid-visualizer.js.map +1 -1
- package/build-module/components/grid-visualizer/index.js.map +1 -1
- package/build-module/components/grid-visualizer/utils.js.map +1 -1
- package/build-module/components/height-control/index.js.map +1 -1
- package/build-module/components/iframe/get-compatibility-styles.js.map +1 -1
- package/build-module/components/iframe/index.js +12 -13
- package/build-module/components/iframe/index.js.map +1 -1
- package/build-module/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
- package/build-module/components/image-editor/constants.js.map +1 -1
- package/build-module/components/image-editor/context.js.map +1 -1
- package/build-module/components/image-editor/cropper.js +7 -3
- package/build-module/components/image-editor/cropper.js.map +1 -1
- package/build-module/components/image-editor/form-controls.js.map +1 -1
- package/build-module/components/image-editor/index.js +0 -2
- package/build-module/components/image-editor/index.js.map +1 -1
- package/build-module/components/image-editor/rotation-button.js.map +1 -1
- package/build-module/components/image-editor/use-save-image.js.map +1 -1
- package/build-module/components/image-editor/use-transform-image.js.map +1 -1
- package/build-module/components/image-editor/zoom-dropdown.js.map +1 -1
- package/build-module/components/image-link-destinations/index.native.js.map +1 -1
- package/build-module/components/image-size-control/index.js.map +1 -1
- package/build-module/components/image-size-control/use-dimension-handler.js.map +1 -1
- package/build-module/components/index.js.map +1 -1
- package/build-module/components/index.native.js.map +1 -1
- package/build-module/components/inner-blocks/button-block-appender.js.map +1 -1
- package/build-module/components/inner-blocks/constants.native.js.map +1 -1
- package/build-module/components/inner-blocks/default-block-appender.js.map +1 -1
- package/build-module/components/inner-blocks/index.js.map +1 -1
- package/build-module/components/inner-blocks/index.native.js.map +1 -1
- package/build-module/components/inner-blocks/use-block-context.js.map +1 -1
- package/build-module/components/inner-blocks/use-inner-block-template-sync.js.map +1 -1
- 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.map +1 -1
- package/build-module/components/inner-blocks/with-client-id.js.map +1 -1
- 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.map +1 -1
- package/build-module/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab/index.js +32 -19
- package/build-module/components/inserter/block-patterns-tab/index.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +2 -24
- package/build-module/components/inserter/block-patterns-tab/pattern-category-preview-panel.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js +2 -4
- 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.map +1 -1
- package/build-module/components/inserter/block-patterns-tab/use-pattern-categories.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab/utils.js.map +1 -1
- 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/hooks/use-block-type-impressions.native.js.map +1 -1
- package/build-module/components/inserter/hooks/use-block-types-state.js.map +1 -1
- package/build-module/components/inserter/hooks/use-clipboard-block.native.js.map +1 -1
- package/build-module/components/inserter/hooks/use-insertion-point.js.map +1 -1
- package/build-module/components/inserter/hooks/use-patterns-paging.js.map +1 -1
- package/build-module/components/inserter/hooks/use-patterns-state.js.map +1 -1
- package/build-module/components/inserter/index.js.map +1 -1
- package/build-module/components/inserter/index.native.js.map +1 -1
- package/build-module/components/inserter/library.js.map +1 -1
- package/build-module/components/inserter/media-tab/hooks.js.map +1 -1
- package/build-module/components/inserter/media-tab/index.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-list.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-panel.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-preview.js.map +1 -1
- 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 +17 -11
- package/build-module/components/inserter/menu.js.map +1 -1
- package/build-module/components/inserter/menu.native.js.map +1 -1
- package/build-module/components/inserter/mobile-tab-navigation.js.map +1 -1
- package/build-module/components/inserter/no-results.js.map +1 -1
- package/build-module/components/inserter/no-results.native.js.map +1 -1
- package/build-module/components/inserter/panel.js.map +1 -1
- package/build-module/components/inserter/preview-panel.js.map +1 -1
- package/build-module/components/inserter/quick-inserter.js.map +1 -1
- package/build-module/components/inserter/reusable-block-rename-hint.js.map +1 -1
- package/build-module/components/inserter/reusable-blocks-tab.native.js.map +1 -1
- package/build-module/components/inserter/search-items.js.map +1 -1
- package/build-module/components/inserter/search-results.js.map +1 -1
- package/build-module/components/inserter/search-results.native.js.map +1 -1
- package/build-module/components/inserter/tabs.js +7 -3
- package/build-module/components/inserter/tabs.js.map +1 -1
- package/build-module/components/inserter/tabs.native.js.map +1 -1
- package/build-module/components/inserter/tips.js.map +1 -1
- package/build-module/components/inserter/utils.native.js.map +1 -1
- package/build-module/components/inserter-button/index.native.js.map +1 -1
- package/build-module/components/inserter-button/sparkles.js.map +1 -1
- package/build-module/components/inserter-draggable-blocks/index.js.map +1 -1
- package/build-module/components/inserter-list-item/index.js.map +1 -1
- package/build-module/components/inserter-listbox/context.js.map +1 -1
- package/build-module/components/inserter-listbox/group.js.map +1 -1
- package/build-module/components/inserter-listbox/index.js.map +1 -1
- package/build-module/components/inserter-listbox/item.js.map +1 -1
- package/build-module/components/inserter-listbox/row.js.map +1 -1
- package/build-module/components/inserter-menu-extension/index.js.map +1 -1
- package/build-module/components/inspector-controls/block-support-slot-container.js.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.map +1 -1
- package/build-module/components/inspector-controls/groups.js.map +1 -1
- package/build-module/components/inspector-controls/index.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/advanced-controls-panel.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/advanced-controls-panel.native.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/index.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/settings-tab-hint.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/settings-tab.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/styles-tab.js +1 -1
- package/build-module/components/inspector-controls-tabs/styles-tab.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/use-is-list-view-tab-disabled.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/utils.js.map +1 -1
- package/build-module/components/inspector-popover-header/index.js.map +1 -1
- package/build-module/components/justify-content-control/index.js.map +1 -1
- package/build-module/components/justify-content-control/ui.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
- package/build-module/components/letter-spacing-control/index.js.map +1 -1
- package/build-module/components/line-height-control/index.js.map +1 -1
- package/build-module/components/line-height-control/index.native.js.map +1 -1
- package/build-module/components/line-height-control/utils.js.map +1 -1
- package/build-module/components/link-control/constants.js.map +1 -1
- 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.map +1 -1
- package/build-module/components/link-control/search-create-button.js.map +1 -1
- package/build-module/components/link-control/search-input.js.map +1 -1
- package/build-module/components/link-control/search-item.js.map +1 -1
- package/build-module/components/link-control/search-results.js.map +1 -1
- package/build-module/components/link-control/settings-drawer.js.map +1 -1
- package/build-module/components/link-control/settings.js.map +1 -1
- package/build-module/components/link-control/use-create-page.js.map +1 -1
- package/build-module/components/link-control/use-internal-value.js.map +1 -1
- package/build-module/components/link-control/use-rich-url-data.js.map +1 -1
- package/build-module/components/link-control/use-search-handler.js.map +1 -1
- package/build-module/components/link-control/viewer-slot.js.map +1 -1
- package/build-module/components/list-view/appender.js.map +1 -1
- package/build-module/components/list-view/aria-referenced-text.js.map +1 -1
- package/build-module/components/list-view/block-contents.js.map +1 -1
- package/build-module/components/list-view/block-select-button.js +29 -1
- package/build-module/components/list-view/block-select-button.js.map +1 -1
- package/build-module/components/list-view/block.js.map +1 -1
- package/build-module/components/list-view/branch.js.map +1 -1
- package/build-module/components/list-view/context.js.map +1 -1
- package/build-module/components/list-view/drop-indicator.js.map +1 -1
- package/build-module/components/list-view/expander.js.map +1 -1
- package/build-module/components/list-view/index.js.map +1 -1
- package/build-module/components/list-view/leaf.js.map +1 -1
- package/build-module/components/list-view/use-block-selection.js.map +1 -1
- package/build-module/components/list-view/use-clipboard-handler.js.map +1 -1
- package/build-module/components/list-view/use-list-view-block-indexes.js.map +1 -1
- package/build-module/components/list-view/use-list-view-client-ids.js.map +1 -1
- package/build-module/components/list-view/use-list-view-collapse-items.js.map +1 -1
- package/build-module/components/list-view/use-list-view-drop-zone.js +5 -0
- package/build-module/components/list-view/use-list-view-drop-zone.js.map +1 -1
- package/build-module/components/list-view/use-list-view-expand-selected-item.js.map +1 -1
- package/build-module/components/list-view/use-list-view-images.js.map +1 -1
- package/build-module/components/list-view/use-list-view-scroll-into-view.js.map +1 -1
- package/build-module/components/list-view/utils.js.map +1 -1
- package/build-module/components/media-placeholder/index.js.map +1 -1
- package/build-module/components/media-placeholder/index.native.js.map +1 -1
- package/build-module/components/media-replace-flow/index.js.map +1 -1
- package/build-module/components/media-replace-flow/index.native.js.map +1 -1
- package/build-module/components/media-upload/check.js.map +1 -1
- package/build-module/components/media-upload/constants.native.js.map +1 -1
- package/build-module/components/media-upload/index.js.map +1 -1
- package/build-module/components/media-upload/index.native.js.map +1 -1
- package/build-module/components/media-upload-progress/constants.js.map +1 -1
- package/build-module/components/media-upload-progress/index.native.js.map +1 -1
- package/build-module/components/multi-selection-inspector/index.js.map +1 -1
- package/build-module/components/navigable-toolbar/index.js.map +1 -1
- package/build-module/components/observe-typing/index.js.map +1 -1
- package/build-module/components/panel-color-settings/index.js.map +1 -1
- package/build-module/components/plain-text/index.js.map +1 -1
- package/build-module/components/plain-text/index.native.js.map +1 -1
- package/build-module/components/preview-options/index.js.map +1 -1
- package/build-module/components/provider/block-refs-provider.js.map +1 -1
- package/build-module/components/provider/index.js.map +1 -1
- package/build-module/components/provider/index.native.js.map +1 -1
- package/build-module/components/provider/use-block-sync.js.map +1 -1
- package/build-module/components/provider/with-registry-provider.js.map +1 -1
- package/build-module/components/publish-date-time-picker/index.js.map +1 -1
- package/build-module/components/recursion-provider/index.js +2 -2
- package/build-module/components/recursion-provider/index.js.map +1 -1
- package/build-module/components/resizable-box-popover/index.js.map +1 -1
- package/build-module/components/resolution-tool/index.js.map +1 -1
- package/build-module/components/responsive-block-control/index.js.map +1 -1
- package/build-module/components/responsive-block-control/label.js.map +1 -1
- package/build-module/components/rich-text/content.js +25 -19
- package/build-module/components/rich-text/content.js.map +1 -1
- package/build-module/components/rich-text/embed-handler-picker.native.js.map +1 -1
- package/build-module/components/rich-text/file-paste-handler.native.js.map +1 -1
- package/build-module/components/rich-text/format-edit.js.map +1 -1
- package/build-module/components/rich-text/format-toolbar/index.js.map +1 -1
- package/build-module/components/rich-text/format-toolbar/index.native.js.map +1 -1
- package/build-module/components/rich-text/format-toolbar-container.js.map +1 -1
- package/build-module/components/rich-text/format-toolbar-container.native.js.map +1 -1
- package/build-module/components/rich-text/get-rich-text-values.js.map +1 -1
- package/build-module/components/rich-text/index.js +42 -2
- package/build-module/components/rich-text/index.js.map +1 -1
- package/build-module/components/rich-text/index.native.js +3 -1
- package/build-module/components/rich-text/index.native.js.map +1 -1
- package/build-module/components/rich-text/input-event.js.map +1 -1
- package/build-module/components/rich-text/input-event.native.js.map +1 -1
- package/build-module/components/rich-text/multiline.js.map +1 -1
- package/build-module/components/rich-text/native/format-edit.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.map +1 -1
- 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.map +1 -1
- package/build-module/components/rich-text/native/use-format-types.js.map +1 -1
- package/build-module/components/rich-text/prevent-event-discovery.js.map +1 -1
- package/build-module/components/rich-text/remove-browser-shortcuts.native.js.map +1 -1
- package/build-module/components/rich-text/shortcut.js.map +1 -1
- package/build-module/components/rich-text/shortcut.native.js.map +1 -1
- package/build-module/components/rich-text/split-value.js.map +1 -1
- package/build-module/components/rich-text/toolbar-button.js.map +1 -1
- package/build-module/components/rich-text/use-before-input-rules.js.map +1 -1
- package/build-module/components/rich-text/use-delete.js.map +1 -1
- package/build-module/components/rich-text/use-enter.js.map +1 -1
- package/build-module/components/rich-text/use-firefox-compat.js.map +1 -1
- package/build-module/components/rich-text/use-format-types.js.map +1 -1
- package/build-module/components/rich-text/use-input-events.js.map +1 -1
- package/build-module/components/rich-text/use-input-rules.js.map +1 -1
- package/build-module/components/rich-text/use-insert-replacement-text.js.map +1 -1
- package/build-module/components/rich-text/use-mark-persistent.js.map +1 -1
- package/build-module/components/rich-text/use-paste-handler.js.map +1 -1
- package/build-module/components/rich-text/use-remove-browser-shortcuts.js.map +1 -1
- package/build-module/components/rich-text/use-shortcuts.js.map +1 -1
- package/build-module/components/rich-text/use-undo-automatic-change.js +2 -2
- package/build-module/components/rich-text/use-undo-automatic-change.js.map +1 -1
- package/build-module/components/rich-text/utils.js.map +1 -1
- package/build-module/components/rich-text/with-deprecations.js.map +1 -1
- package/build-module/components/selection-scroll-into-view/index.js.map +1 -1
- package/build-module/components/skip-to-selected-block/index.js.map +1 -1
- package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
- package/build-module/components/spacing-sizes-control/index.js.map +1 -1
- 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.map +1 -1
- package/build-module/components/spacing-sizes-control/input-controls/single.js.map +1 -1
- package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
- package/build-module/components/spacing-sizes-control/sides-dropdown/index.js.map +1 -1
- package/build-module/components/spacing-sizes-control/utils.js.map +1 -1
- package/build-module/components/text-decoration-control/index.js.map +1 -1
- package/build-module/components/text-transform-control/index.js.map +1 -1
- package/build-module/components/tool-selector/index.js.map +1 -1
- package/build-module/components/typewriter/index.js.map +1 -1
- package/build-module/components/ungroup-button/index.native.js.map +1 -1
- package/build-module/components/unit-control/index.js.map +1 -1
- package/build-module/components/unsupported-block-details/index.native.js.map +1 -1
- package/build-module/components/url-input/button.js.map +1 -1
- package/build-module/components/url-input/index.js.map +1 -1
- package/build-module/components/url-input/index.native.js.map +1 -1
- package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
- package/build-module/components/url-popover/index.js.map +1 -1
- package/build-module/components/url-popover/link-editor.js.map +1 -1
- package/build-module/components/url-popover/link-viewer-url.js.map +1 -1
- package/build-module/components/url-popover/link-viewer.js.map +1 -1
- package/build-module/components/use-block-commands/index.js +20 -2
- package/build-module/components/use-block-commands/index.js.map +1 -1
- package/build-module/components/use-block-display-information/index.js.map +1 -1
- package/build-module/components/use-block-drop-zone/index.js.map +1 -1
- package/build-module/components/use-block-drop-zone/index.native.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/use-on-block-drop/index.js.map +1 -1
- package/build-module/components/use-on-block-drop/index.native.js.map +1 -1
- package/build-module/components/use-on-block-drop/types.js.map +1 -1
- package/build-module/components/use-paste-styles/index.js +2 -1
- package/build-module/components/use-paste-styles/index.js.map +1 -1
- package/build-module/components/use-resize-canvas/index.js.map +1 -1
- package/build-module/components/use-settings/index.js.map +1 -1
- package/build-module/components/use-unsupported-block-editor/index.native.js.map +1 -1
- package/build-module/components/video-player/gridicon-play.native.js.map +1 -1
- package/build-module/components/video-player/index.native.js.map +1 -1
- package/build-module/components/warning/index.js.map +1 -1
- package/build-module/components/warning/index.native.js.map +1 -1
- package/build-module/components/writing-flow/index.js.map +1 -1
- package/build-module/components/writing-flow/use-arrow-nav.js.map +1 -1
- package/build-module/components/writing-flow/use-click-selection.js.map +1 -1
- package/build-module/components/writing-flow/use-clipboard-handler.js.map +1 -1
- package/build-module/components/writing-flow/use-drag-selection.js.map +1 -1
- package/build-module/components/writing-flow/use-input.js.map +1 -1
- package/build-module/components/writing-flow/use-multi-selection.js.map +1 -1
- package/build-module/components/writing-flow/use-select-all.js.map +1 -1
- package/build-module/components/writing-flow/use-selection-observer.js.map +1 -1
- package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
- package/build-module/components/writing-flow/utils.js.map +1 -1
- package/build-module/components/writing-mode-control/index.js.map +1 -1
- package/build-module/elements/index.js.map +1 -1
- package/build-module/hooks/align.js.map +1 -1
- package/build-module/hooks/align.native.js.map +1 -1
- package/build-module/hooks/anchor.js.map +1 -1
- package/build-module/hooks/aria-label.js.map +1 -1
- package/build-module/hooks/background.js +2 -2
- package/build-module/hooks/background.js.map +1 -1
- package/build-module/hooks/block-hooks.js.map +1 -1
- package/build-module/hooks/block-renaming.js +0 -36
- package/build-module/hooks/block-renaming.js.map +1 -1
- package/build-module/hooks/border.js.map +1 -1
- package/build-module/hooks/color.js.map +1 -1
- package/build-module/hooks/compat.js.map +1 -1
- package/build-module/hooks/content-lock-ui.js +5 -5
- package/build-module/hooks/content-lock-ui.js.map +1 -1
- package/build-module/hooks/contrast-checker.js.map +1 -1
- package/build-module/hooks/custom-class-name.js.map +1 -1
- package/build-module/hooks/custom-class-name.native.js.map +1 -1
- package/build-module/hooks/dimensions.js.map +1 -1
- package/build-module/hooks/duotone.js.map +1 -1
- package/build-module/hooks/font-family.js.map +1 -1
- package/build-module/hooks/font-size.js.map +1 -1
- package/build-module/hooks/gap.js.map +1 -1
- package/build-module/hooks/generated-class-name.js.map +1 -1
- package/build-module/hooks/index.js +5 -4
- package/build-module/hooks/index.js.map +1 -1
- package/build-module/hooks/index.native.js.map +1 -1
- package/build-module/hooks/layout-child.js.map +1 -1
- package/build-module/hooks/layout.js +38 -19
- package/build-module/hooks/layout.js.map +1 -1
- package/build-module/hooks/layout.native.js.map +1 -1
- package/build-module/hooks/line-height.js.map +1 -1
- package/build-module/hooks/lock.js.map +1 -1
- package/build-module/hooks/metadata.js.map +1 -1
- package/build-module/hooks/position.js.map +1 -1
- package/build-module/hooks/settings.js.map +1 -1
- package/build-module/hooks/spacing-visualizer.js.map +1 -1
- package/build-module/hooks/style.js.map +1 -1
- package/build-module/hooks/supports.js +22 -1
- package/build-module/hooks/supports.js.map +1 -1
- package/build-module/hooks/text-align.js +145 -0
- package/build-module/hooks/text-align.js.map +1 -0
- package/build-module/hooks/typography.js +2 -1
- package/build-module/hooks/typography.js.map +1 -1
- package/build-module/hooks/typography.native.js.map +1 -1
- package/build-module/hooks/use-bindings-attributes.js +68 -132
- package/build-module/hooks/use-bindings-attributes.js.map +1 -1
- package/build-module/hooks/use-border-props.js.map +1 -1
- package/build-module/hooks/use-cached-truthy.js.map +1 -1
- package/build-module/hooks/use-color-props.js.map +1 -1
- package/build-module/hooks/use-editor-wrapper-styles.native.js.map +1 -1
- package/build-module/hooks/use-shadow-props.js.map +1 -1
- package/build-module/hooks/use-spacing-props.js.map +1 -1
- package/build-module/hooks/use-typography-props.js +2 -1
- package/build-module/hooks/use-typography-props.js.map +1 -1
- package/build-module/hooks/use-zoom-out.js +23 -16
- package/build-module/hooks/use-zoom-out.js.map +1 -1
- package/build-module/hooks/utils.js +30 -6
- package/build-module/hooks/utils.js.map +1 -1
- package/build-module/index.js.map +1 -1
- package/build-module/index.native.js.map +1 -1
- package/build-module/layouts/constrained.js.map +1 -1
- package/build-module/layouts/definitions.js +8 -6
- package/build-module/layouts/definitions.js.map +1 -1
- package/build-module/layouts/flex.js.map +1 -1
- package/build-module/layouts/flow.js.map +1 -1
- package/build-module/layouts/grid.js +52 -9
- package/build-module/layouts/grid.js.map +1 -1
- package/build-module/layouts/index.js.map +1 -1
- package/build-module/layouts/utils.js.map +1 -1
- package/build-module/lock-unlock.js.map +1 -1
- package/build-module/private-apis.js.map +1 -1
- package/build-module/private-apis.native.js.map +1 -1
- package/build-module/store/actions.js +18 -4
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/array.js.map +1 -1
- package/build-module/store/constants.js.map +1 -1
- package/build-module/store/defaults.js.map +1 -1
- package/build-module/store/defaults.native.js.map +1 -1
- package/build-module/store/get-block-settings.js.map +1 -1
- package/build-module/store/index.js.map +1 -1
- package/build-module/store/private-actions.js +5 -2
- package/build-module/store/private-actions.js.map +1 -1
- package/build-module/store/private-keys.js.map +1 -1
- package/build-module/store/private-selectors.js +87 -33
- package/build-module/store/private-selectors.js.map +1 -1
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +95 -55
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/store/undo-ignore.js.map +1 -1
- package/build-module/store/utils.js.map +1 -1
- package/build-module/utils/dom.js.map +1 -1
- package/build-module/utils/get-px-from-css-unit.js.map +1 -1
- package/build-module/utils/index.js.map +1 -1
- package/build-module/utils/math.js.map +1 -1
- package/build-module/utils/object.js.map +1 -1
- package/build-module/utils/order-inserter-block-items.js.map +1 -1
- package/build-module/utils/pasting.js.map +1 -1
- package/build-module/utils/selection.js.map +1 -1
- package/build-module/utils/sorting.js.map +1 -1
- package/build-module/utils/transform-styles/index.js.map +1 -1
- package/build-module/utils/use-notify-copy.js.map +1 -1
- package/build-style/content-rtl.css +36 -18
- package/build-style/content.css +36 -18
- package/build-style/default-editor-styles-rtl.css +1 -1
- package/build-style/default-editor-styles.css +1 -1
- package/build-style/style-rtl.css +73 -58
- package/build-style/style.css +73 -58
- package/package.json +32 -33
- package/src/components/block-bindings-toolbar-indicator/style.scss +1 -1
- package/src/components/block-edit/context.js +1 -0
- package/src/components/block-edit/index.js +4 -0
- package/src/components/block-inspector/index.js +6 -4
- package/src/components/block-list/block.js +50 -27
- package/src/components/block-list/block.native.js +3 -2
- package/src/components/block-list/content.scss +37 -19
- package/src/components/block-list/index.js +22 -6
- package/src/components/block-list/use-block-props/index.js +5 -1
- package/src/components/block-list/use-block-props/use-focus-first-element.js +7 -3
- package/src/components/block-patterns-paging/index.js +4 -0
- package/src/components/block-rename/modal.js +17 -13
- package/src/components/block-rename/rename-control.js +8 -1
- package/src/components/block-toolbar/index.js +26 -22
- package/src/components/block-toolbar/use-has-block-toolbar.js +5 -3
- package/src/components/block-tools/block-selection-button.js +55 -43
- package/src/components/block-tools/use-show-block-tools.js +4 -7
- package/src/components/block-variation-transforms/index.js +3 -1
- package/src/components/button-block-appender/index.native.js +16 -1
- package/src/components/default-block-appender/content.scss +1 -1
- package/src/components/editor-styles/index.js +4 -2
- package/src/components/global-styles/background-panel.js +30 -26
- package/src/components/global-styles/style.scss +2 -8
- package/src/components/global-styles/test/use-global-styles-output.js +8 -17
- package/src/components/global-styles/use-global-styles-output.js +5 -5
- package/src/components/iframe/index.js +20 -27
- package/src/components/image-editor/cropper.js +11 -2
- package/src/components/image-editor/index.js +0 -2
- package/src/components/inserter/block-patterns-tab/index.js +53 -39
- package/src/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +9 -36
- package/src/components/inserter/block-patterns-tab/pattern-category-previews.js +2 -2
- package/src/components/inserter/menu.js +27 -16
- package/src/components/inserter/style.scss +83 -59
- package/src/components/inserter/tabs.js +7 -2
- package/src/components/inspector-controls-tabs/styles-tab.js +1 -1
- package/src/components/link-control/style.scss +10 -2
- package/src/components/link-control/test/index.js +1 -1
- package/src/components/list-view/block-select-button.js +31 -2
- package/src/components/list-view/use-list-view-drop-zone.js +5 -0
- package/src/components/recursion-provider/index.js +2 -2
- package/src/components/rich-text/README.md +4 -0
- package/src/components/rich-text/content.js +26 -19
- package/src/components/rich-text/index.js +46 -2
- package/src/components/rich-text/index.native.js +3 -1
- package/src/components/rich-text/use-undo-automatic-change.js +2 -6
- package/src/components/use-block-commands/index.js +46 -28
- package/src/components/use-paste-styles/index.js +2 -0
- package/src/hooks/background.js +2 -2
- package/src/hooks/block-renaming.js +0 -33
- package/src/hooks/content-lock-ui.js +5 -7
- package/src/hooks/index.js +5 -2
- package/src/hooks/layout.js +57 -25
- package/src/hooks/supports.js +24 -0
- package/src/hooks/test/text-align.js +114 -0
- package/src/hooks/test/use-typography-props.js +3 -1
- package/src/hooks/text-align.js +178 -0
- package/src/hooks/typography.js +2 -0
- package/src/hooks/use-bindings-attributes.js +90 -161
- package/src/hooks/use-typography-props.js +4 -1
- package/src/hooks/use-zoom-out.js +25 -15
- package/src/hooks/utils.js +41 -3
- package/src/layouts/definitions.js +6 -6
- package/src/layouts/grid.js +106 -47
- package/src/store/actions.js +22 -6
- package/src/store/private-actions.js +6 -3
- package/src/store/private-selectors.js +127 -35
- package/src/store/selectors.js +142 -86
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["classnames","dragHandle","trash","Button","Flex","FlexItem","ToolbarButton","useSelect","useDispatch","useEffect","useRef","BACKSPACE","DELETE","UP","DOWN","LEFT","RIGHT","TAB","ESCAPE","ENTER","SPACE","__experimentalGetAccessibleBlockLabel","getAccessibleBlockLabel","store","blocksStore","speak","focus","__","BlockTitle","BlockIcon","blockEditorStore","BlockDraggable","__unstableUseBlockElement","useBlockElement","BlockMover","Shuffle","BlockSelectionButton","clientId","rootClientId","selected","select","getBlock","getBlockIndex","hasBlockMovingClientId","getBlockListSettings","__unstableGetEditorMode","getNextBlockClientId","getPreviousBlockClientId","canRemoveBlock","getActiveBlockVariation","getBlockType","index","name","attributes","blockType","orientation","match","isBlockTemplatePart","isNextBlockTemplatePart","nextClientId","nextName","nextBlockType","isPrevBlockTemplatePart","prevClientId","prevName","prevBlockType","blockMovingMode","editorMode","icon","label","canRemove","setNavigationMode","removeBlock","ref","current","blockElement","getBlockRootClientId","getClientIdsOfDescendants","getSelectedBlockClientId","getMultiSelectedBlocksEndClientId","selectBlock","clearSelectedBlock","setBlockMovingClientId","moveBlockToPosition","onKeyDown","event","keyCode","isUp","isDown","isLeft","isRight","isTab","isEscape","isEnter","isSpace","isShift","shiftKey","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","dragHandleLabel","createElement","className","justify","showColors","clientIds","hideDragHandle","isBlockMoverUpButtonDisabled","isBlockMoverDownButtonDisabled","draggableProps","tabIndex","as","onClick","undefined","showTooltip","maximumLength"],"sources":["@wordpress/block-editor/src/components/block-tools/block-selection-button.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { dragHandle, trash } from '@wordpress/icons';\nimport { Button, Flex, FlexItem, ToolbarButton } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useEffect, useRef } 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 { __unstableUseBlockElement as useBlockElement } from '../block-list/use-block-props/use-block-refs';\nimport BlockMover from '../block-mover';\nimport Shuffle from '../block-toolbar/shuffle';\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 *\n * @return {Component} The component to be rendered.\n */\nfunction BlockSelectionButton( { clientId, rootClientId } ) {\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\tcanRemoveBlock,\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\t\t\tconst isBlockTemplatePart =\n\t\t\t\tblockType?.name === 'core/template-part';\n\n\t\t\tlet isNextBlockTemplatePart = false;\n\t\t\tconst nextClientId = getNextBlockClientId();\n\t\t\tif ( nextClientId ) {\n\t\t\t\tconst { name: nextName } = getBlock( nextClientId );\n\t\t\t\tconst nextBlockType = getBlockType( nextName );\n\t\t\t\tisNextBlockTemplatePart =\n\t\t\t\t\tnextBlockType?.name === 'core/template-part';\n\t\t\t}\n\n\t\t\tlet isPrevBlockTemplatePart = false;\n\t\t\tconst prevClientId = getPreviousBlockClientId();\n\t\t\tif ( prevClientId ) {\n\t\t\t\tconst { name: prevName } = getBlock( prevClientId );\n\t\t\t\tconst prevBlockType = getBlockType( prevName );\n\t\t\t\tisPrevBlockTemplatePart =\n\t\t\t\t\tprevBlockType?.name === 'core/template-part';\n\t\t\t}\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\tisBlockTemplatePart,\n\t\t\t\tisNextBlockTemplatePart,\n\t\t\t\tisPrevBlockTemplatePart,\n\t\t\t\tcanRemove: canRemoveBlock( clientId, rootClientId ),\n\t\t\t};\n\t\t},\n\t\t[ clientId, rootClientId ]\n\t);\n\tconst {\n\t\tlabel,\n\t\ticon,\n\t\tblockMovingMode,\n\t\teditorMode,\n\t\tisBlockTemplatePart,\n\t\tisNextBlockTemplatePart,\n\t\tisPrevBlockTemplatePart,\n\t\tcanRemove,\n\t} = selected;\n\tconst { setNavigationMode, removeBlock } = useDispatch( blockEditorStore );\n\tconst ref = useRef();\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\t\tif ( isEscape && editorMode === 'navigation' ) {\n\t\t\tsetNavigationMode( false );\n\t\t\tevent.preventDefault();\n\t\t\treturn;\n\t\t}\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 = classnames(\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\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<FlexItem>\n\t\t\t\t\t{ editorMode === 'zoom-out' && ! isBlockTemplatePart && (\n\t\t\t\t\t\t<BlockMover\n\t\t\t\t\t\t\tclientIds={ [ clientId ] }\n\t\t\t\t\t\t\thideDragHandle\n\t\t\t\t\t\t\tisBlockMoverUpButtonDisabled={\n\t\t\t\t\t\t\t\tisPrevBlockTemplatePart\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tisBlockMoverDownButtonDisabled={\n\t\t\t\t\t\t\t\tisNextBlockTemplatePart\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ editorMode === 'navigation' && (\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\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\taria-hidden=\"true\"\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) }\n\t\t\t\t</FlexItem>\n\t\t\t\t{ editorMode === 'zoom-out' && (\n\t\t\t\t\t<Shuffle clientId={ clientId } as={ Button } />\n\t\t\t\t) }\n\t\t\t\t{ canRemove &&\n\t\t\t\t\teditorMode === 'zoom-out' &&\n\t\t\t\t\t! isBlockTemplatePart && (\n\t\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\t\ticon={ trash }\n\t\t\t\t\t\t\tlabel=\"Delete\"\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tremoveBlock( clientId );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t<FlexItem>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\tonClick={\n\t\t\t\t\t\t\teditorMode === 'navigation'\n\t\t\t\t\t\t\t\t? () => setNavigationMode( false )\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonKeyDown={ onKeyDown }\n\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\tshowTooltip={ false }\n\t\t\t\t\t\tclassName=\"block-selection-button_select-button\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<BlockTitle\n\t\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\t\tmaximumLength={ 35 }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</Button>\n\t\t\t\t</FlexItem>\n\t\t\t</Flex>\n\t\t</div>\n\t);\n}\n\nexport default BlockSelectionButton;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,UAAU,EAAEC,KAAK,QAAQ,kBAAkB;AACpD,SAASC,MAAM,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,aAAa,QAAQ,uBAAuB;AAC7E,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,SAAS,EAAEC,MAAM,QAAQ,oBAAoB;AACtD,SACCC,SAAS,EACTC,MAAM,EACNC,EAAE,EACFC,IAAI,EACJC,IAAI,EACJC,KAAK,EACLC,GAAG,EACHC,MAAM,EACNC,KAAK,EACLC,KAAK,QACC,qBAAqB;AAC5B,SACCC,qCAAqC,IAAIC,uBAAuB,EAChEC,KAAK,IAAIC,WAAW,QACd,mBAAmB;AAC1B,SAASC,KAAK,QAAQ,iBAAiB;AACvC,SAASC,KAAK,QAAQ,gBAAgB;AACtC,SAASC,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,OAAOC,UAAU,MAAM,gBAAgB;AACvC,OAAOC,SAAS,MAAM,eAAe;AACrC,SAASN,KAAK,IAAIO,gBAAgB,QAAQ,aAAa;AACvD,OAAOC,cAAc,MAAM,oBAAoB;AAC/C,SAASC,yBAAyB,IAAIC,eAAe,QAAQ,8CAA8C;AAC3G,OAAOC,UAAU,MAAM,gBAAgB;AACvC,OAAOC,OAAO,MAAM,0BAA0B;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,oBAAoBA,CAAE;EAAEC,QAAQ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AAC;IACxB;EAAG,CACH,CACD,EACFwF,aAAA,CAACxH,QAAQ,QACRwH,aAAA,CAAC1H,MAAM;IACNsE,GAAG,EAAGA,GAAK;IACX+D,OAAO,EACNrE,UAAU,KAAK,YAAY,GACxB,MAAMI,iBAAiB,CAAE,KAAM,CAAC,GAChCkE,SACH;IACDrD,SAAS,EAAGA,SAAW;IACvBf,KAAK,EAAGA,KAAO;IACfqE,WAAW,EAAG,KAAO;IACrBZ,SAAS,EAAC;EAAsC,GAEhDD,aAAA,CAACjG,UAAU;IACVS,QAAQ,EAAGA,QAAU;IACrBsG,aAAa,EAAG;EAAI,CACpB,CACM,CACC,CACL,CACF,CAAC;AAER;AAEA,eAAevG,oBAAoB"}
|
|
1
|
+
{"version":3,"names":["classnames","dragHandle","trash","Button","Flex","FlexItem","ToolbarButton","useSelect","useDispatch","useEffect","useRef","BACKSPACE","DELETE","UP","DOWN","LEFT","RIGHT","TAB","ESCAPE","ENTER","SPACE","__experimentalGetAccessibleBlockLabel","getAccessibleBlockLabel","store","blocksStore","speak","focus","__","BlockTitle","BlockIcon","blockEditorStore","BlockDraggable","__unstableUseBlockElement","useBlockElement","BlockMover","Shuffle","BlockSelectionButton","clientId","rootClientId","selected","select","getBlock","getBlockIndex","hasBlockMovingClientId","getBlockListSettings","__unstableGetEditorMode","getNextBlockClientId","getPreviousBlockClientId","canRemoveBlock","canMoveBlock","getActiveBlockVariation","getBlockType","index","name","attributes","blockType","orientation","match","isBlockTemplatePart","isNextBlockTemplatePart","nextClientId","nextName","nextBlockType","isPrevBlockTemplatePart","prevClientId","prevName","prevBlockType","blockMovingMode","editorMode","icon","label","canRemove","canMove","setNavigationMode","removeBlock","ref","current","blockElement","getBlockRootClientId","getClientIdsOfDescendants","getSelectedBlockClientId","getMultiSelectedBlocksEndClientId","selectBlock","clearSelectedBlock","setBlockMovingClientId","moveBlockToPosition","onKeyDown","event","keyCode","isUp","isDown","isLeft","isRight","isTab","isEscape","isEnter","isSpace","isShift","shiftKey","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","dragHandleLabel","showBlockDraggable","createElement","className","justify","showColors","clientIds","draggableProps","tabIndex","hideDragHandle","isBlockMoverUpButtonDisabled","isBlockMoverDownButtonDisabled","as","onClick","undefined","showTooltip","maximumLength"],"sources":["@wordpress/block-editor/src/components/block-tools/block-selection-button.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { dragHandle, trash } from '@wordpress/icons';\nimport { Button, Flex, FlexItem, ToolbarButton } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useEffect, useRef } 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 { __unstableUseBlockElement as useBlockElement } from '../block-list/use-block-props/use-block-refs';\nimport BlockMover from '../block-mover';\nimport Shuffle from '../block-toolbar/shuffle';\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 *\n * @return {Component} The component to be rendered.\n */\nfunction BlockSelectionButton( { clientId, rootClientId } ) {\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\tcanRemoveBlock,\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\t\t\tconst isBlockTemplatePart =\n\t\t\t\tblockType?.name === 'core/template-part';\n\n\t\t\tlet isNextBlockTemplatePart = false;\n\t\t\tconst nextClientId = getNextBlockClientId();\n\t\t\tif ( nextClientId ) {\n\t\t\t\tconst { name: nextName } = getBlock( nextClientId );\n\t\t\t\tconst nextBlockType = getBlockType( nextName );\n\t\t\t\tisNextBlockTemplatePart =\n\t\t\t\t\tnextBlockType?.name === 'core/template-part';\n\t\t\t}\n\n\t\t\tlet isPrevBlockTemplatePart = false;\n\t\t\tconst prevClientId = getPreviousBlockClientId();\n\t\t\tif ( prevClientId ) {\n\t\t\t\tconst { name: prevName } = getBlock( prevClientId );\n\t\t\t\tconst prevBlockType = getBlockType( prevName );\n\t\t\t\tisPrevBlockTemplatePart =\n\t\t\t\t\tprevBlockType?.name === 'core/template-part';\n\t\t\t}\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\tisBlockTemplatePart,\n\t\t\t\tisNextBlockTemplatePart,\n\t\t\t\tisPrevBlockTemplatePart,\n\t\t\t\tcanRemove: canRemoveBlock( clientId, rootClientId ),\n\t\t\t\tcanMove: canMoveBlock( clientId, rootClientId ),\n\t\t\t};\n\t\t},\n\t\t[ clientId, rootClientId ]\n\t);\n\tconst {\n\t\tlabel,\n\t\ticon,\n\t\tblockMovingMode,\n\t\teditorMode,\n\t\tisBlockTemplatePart,\n\t\tisNextBlockTemplatePart,\n\t\tisPrevBlockTemplatePart,\n\t\tcanRemove,\n\t\tcanMove,\n\t} = selected;\n\tconst { setNavigationMode, removeBlock } = useDispatch( blockEditorStore );\n\tconst ref = useRef();\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\t\tif ( isEscape && editorMode === 'navigation' ) {\n\t\t\tsetNavigationMode( false );\n\t\t\tevent.preventDefault();\n\t\t\treturn;\n\t\t}\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 = classnames(\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 =\n\t\t( canMove && editorMode === 'navigation' ) ||\n\t\t( editorMode === 'zoom-out' && canMove && ! isBlockTemplatePart );\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\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\taria-hidden=\"true\"\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 === 'zoom-out' && ! isBlockTemplatePart && (\n\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t<BlockMover\n\t\t\t\t\t\t\tclientIds={ [ clientId ] }\n\t\t\t\t\t\t\thideDragHandle\n\t\t\t\t\t\t\tisBlockMoverUpButtonDisabled={\n\t\t\t\t\t\t\t\tisPrevBlockTemplatePart\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tisBlockMoverDownButtonDisabled={\n\t\t\t\t\t\t\t\tisNextBlockTemplatePart\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</FlexItem>\n\t\t\t\t) }\n\t\t\t\t{ canMove && canRemove && editorMode === 'zoom-out' && (\n\t\t\t\t\t<Shuffle clientId={ clientId } as={ Button } />\n\t\t\t\t) }\n\t\t\t\t{ canRemove &&\n\t\t\t\t\teditorMode === 'zoom-out' &&\n\t\t\t\t\t! isBlockTemplatePart && (\n\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\t\t\ticon={ trash }\n\t\t\t\t\t\t\t\tlabel=\"Delete\"\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\tremoveBlock( clientId );\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</FlexItem>\n\t\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\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 BlockSelectionButton;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,UAAU,EAAEC,KAAK,QAAQ,kBAAkB;AACpD,SAASC,MAAM,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,aAAa,QAAQ,uBAAuB;AAC7E,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,SAAS,EAAEC,MAAM,QAAQ,oBAAoB;AACtD,SACCC,SAAS,EACTC,MAAM,EACNC,EAAE,EACFC,IAAI,EACJC,IAAI,EACJC,KAAK,EACLC,GAAG,EACHC,MAAM,EACNC,KAAK,EACLC,KAAK,QACC,qBAAqB;AAC5B,SACCC,qCAAqC,IAAIC,uBAAuB,EAChEC,KAAK,IAAIC,WAAW,QACd,mBAAmB;AAC1B,SAASC,KAAK,QAAQ,iBAAiB;AACvC,SAASC,KAAK,QAAQ,gBAAgB;AACtC,SAASC,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,OAAOC,UAAU,MAAM,gBAAgB;AACvC,OAAOC,SAAS,MAAM,eAAe;AACrC,SAASN,KAAK,IAAIO,gBAAgB,QAAQ,aAAa;AACvD,OAAOC,cAAc,MAAM,oBAAoB;AAC/C,SAASC,yBAAyB,IAAIC,eAAe,QAAQ,8CAA8C;AAC3G,OAAOC,UAAU,MAAM,gBAAgB;AACvC,OAAOC,OAAO,MAAM,0BAA0B;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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AU,IAClD4D,aAAA,CAAC7F,OAAO;IAACE,QAAQ,EAAGA,QAAU;IAACqG,EAAE,EAAGvI;EAAQ,CAAE,CAC9C,EACCoE,SAAS,IACVH,UAAU,KAAK,UAAU,IACzB,CAAEV,mBAAmB,IACpBsE,aAAA,CAAC3H,QAAQ,QACR2H,aAAA,CAAC1H,aAAa;IACb+D,IAAI,EAAGnE,KAAO;IACdoE,KAAK,EAAC,QAAQ;IACdqE,OAAO,EAAGA,CAAA,KAAM;MACfjE,WAAW,CAAErC,QAAS,CAAC;IACxB;EAAG,CACH,CACQ,CACV,EACA+B,UAAU,KAAK,YAAY,IAC5B4D,aAAA,CAAC3H,QAAQ,QACR2H,aAAA,CAAC7H,MAAM;IACNwE,GAAG,EAAGA,GAAK;IACXgE,OAAO,EACNvE,UAAU,KAAK,YAAY,GACxB,MAAMK,iBAAiB,CAAE,KAAM,CAAC,GAChCmE,SACH;IACDtD,SAAS,EAAGA,SAAW;IACvBhB,KAAK,EAAGA,KAAO;IACfuE,WAAW,EAAG,KAAO;IACrBZ,SAAS,EAAC;EAAsC,GAEhDD,aAAA,CAACpG,UAAU;IACVS,QAAQ,EAAGA,QAAU;IACrByG,aAAa,EAAG;EAAI,CACpB,CACM,CACC,CAEN,CACF,CAAC;AAER;AAEA,eAAe1G,oBAAoB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["classnames","BlockSelectionButton","BlockPopover","useBlockToolbarPopoverProps","useSelectedBlockToolProps","BlockToolbarBreadcrumb","clientId","__unstableContentRef","capturingClientId","isInsertionPointVisible","lastClientId","rootClientId","popoverProps","contentElement","current","createElement","bottomClientId","className","resize"],"sources":["@wordpress/block-editor/src/components/block-tools/block-toolbar-breadcrumb.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * Internal dependencies\n */\nimport BlockSelectionButton from './block-selection-button';\nimport BlockPopover from '../block-popover';\nimport useBlockToolbarPopoverProps from './use-block-toolbar-popover-props';\nimport useSelectedBlockToolProps from './use-selected-block-tool-props';\n\nexport default function BlockToolbarBreadcrumb( {\n\tclientId,\n\t__unstableContentRef,\n} ) {\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<BlockPopover\n\t\t\tclientId={ capturingClientId || clientId }\n\t\t\tbottomClientId={ lastClientId }\n\t\t\tclassName={ classnames( '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\tclientId={ clientId }\n\t\t\t\trootClientId={ rootClientId }\n\t\t\t/>\n\t\t</BlockPopover>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,OAAOC,oBAAoB,MAAM,0BAA0B;AAC3D,OAAOC,YAAY,MAAM,kBAAkB;AAC3C,OAAOC,2BAA2B,MAAM,mCAAmC;AAC3E,OAAOC,yBAAyB,MAAM,iCAAiC;AAEvE,eAAe,SAASC,sBAAsBA,CAAE;EAC/CC,QAAQ;EACRC;AACD,CAAC,EAAG;EACH,MAAM;IACLC,iBAAiB;IACjBC,uBAAuB;IACvBC,YAAY;IACZC;EACD,CAAC,GAAGP,yBAAyB,CAAEE,QAAS,CAAC;EAEzC,MAAMM,YAAY,GAAGT,2BAA2B,CAAE;IACjDU,cAAc,EAAEN,oBAAoB,EAAEO,OAAO;IAC7CR;EACD,CAAE,CAAC;EAEH,OACCS,aAAA,CAACb,YAAY;IACZI,QAAQ,EAAGE,iBAAiB,IAAIF,QAAU;IAC1CU,cAAc,EAAGN,YAAc;IAC/BO,SAAS,EAAGjB,UAAU,CAAE,wCAAwC,EAAE;MACjE,4BAA4B,EAAES;IAC/B,CAAE,CAAG;IACLS,MAAM,EAAG,KAAO;IAAA,GACXN;EAAY,GAEjBG,aAAA,CAACd,oBAAoB;IACpBK,QAAQ,EAAGA,QAAU;IACrBK,YAAY,EAAGA;EAAc,CAC7B,CACY,CAAC;AAEjB"}
|
|
1
|
+
{"version":3,"names":["classnames","BlockSelectionButton","BlockPopover","useBlockToolbarPopoverProps","useSelectedBlockToolProps","BlockToolbarBreadcrumb","clientId","__unstableContentRef","capturingClientId","isInsertionPointVisible","lastClientId","rootClientId","popoverProps","contentElement","current","createElement","bottomClientId","className","resize"],"sources":["@wordpress/block-editor/src/components/block-tools/block-toolbar-breadcrumb.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * Internal dependencies\n */\nimport BlockSelectionButton from './block-selection-button';\nimport BlockPopover from '../block-popover';\nimport useBlockToolbarPopoverProps from './use-block-toolbar-popover-props';\nimport useSelectedBlockToolProps from './use-selected-block-tool-props';\n\nexport default function BlockToolbarBreadcrumb( {\n\tclientId,\n\t__unstableContentRef,\n} ) {\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<BlockPopover\n\t\t\tclientId={ capturingClientId || clientId }\n\t\t\tbottomClientId={ lastClientId }\n\t\t\tclassName={ classnames( '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\tclientId={ clientId }\n\t\t\t\trootClientId={ rootClientId }\n\t\t\t/>\n\t\t</BlockPopover>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,OAAOC,oBAAoB,MAAM,0BAA0B;AAC3D,OAAOC,YAAY,MAAM,kBAAkB;AAC3C,OAAOC,2BAA2B,MAAM,mCAAmC;AAC3E,OAAOC,yBAAyB,MAAM,iCAAiC;AAEvE,eAAe,SAASC,sBAAsBA,CAAE;EAC/CC,QAAQ;EACRC;AACD,CAAC,EAAG;EACH,MAAM;IACLC,iBAAiB;IACjBC,uBAAuB;IACvBC,YAAY;IACZC;EACD,CAAC,GAAGP,yBAAyB,CAAEE,QAAS,CAAC;EAEzC,MAAMM,YAAY,GAAGT,2BAA2B,CAAE;IACjDU,cAAc,EAAEN,oBAAoB,EAAEO,OAAO;IAC7CR;EACD,CAAE,CAAC;EAEH,OACCS,aAAA,CAACb,YAAY;IACZI,QAAQ,EAAGE,iBAAiB,IAAIF,QAAU;IAC1CU,cAAc,EAAGN,YAAc;IAC/BO,SAAS,EAAGjB,UAAU,CAAE,wCAAwC,EAAE;MACjE,4BAA4B,EAAES;IAC/B,CAAE,CAAG;IACLS,MAAM,EAAG,KAAO;IAAA,GACXN;EAAY,GAEjBG,aAAA,CAACd,oBAAoB;IACpBK,QAAQ,EAAGA,QAAU;IACrBK,YAAY,EAAGA;EAAc,CAC7B,CACY,CAAC;AAEjB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["classnames","useDispatch","useEffect","useRef","useShortcut","BlockPopover","useBlockToolbarPopoverProps","useSelectedBlockToolProps","store","blockEditorStore","PrivateBlockToolbar","BlockToolbarPopover","clientId","isTyping","__unstableContentRef","capturingClientId","isInsertionPointVisible","lastClientId","initialToolbarItemIndexRef","current","undefined","stopTyping","isToolbarForced","popoverProps","contentElement","createElement","bottomClientId","className","resize","focusOnMount","__experimentalInitialIndex","__experimentalOnIndexChange","index","variant"],"sources":["@wordpress/block-editor/src/components/block-tools/block-toolbar-popover.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n/**\n * WordPress dependencies\n */\nimport { useDispatch } from '@wordpress/data';\nimport { useEffect, useRef } from '@wordpress/element';\nimport { useShortcut } from '@wordpress/keyboard-shortcuts';\n/**\n * Internal dependencies\n */\nimport BlockPopover from '../block-popover';\nimport useBlockToolbarPopoverProps from './use-block-toolbar-popover-props';\nimport useSelectedBlockToolProps from './use-selected-block-tool-props';\nimport { store as blockEditorStore } from '../../store';\nimport { PrivateBlockToolbar } from '../block-toolbar';\n\nexport default function BlockToolbarPopover( {\n\tclientId,\n\tisTyping,\n\t__unstableContentRef,\n} ) {\n\tconst { capturingClientId, isInsertionPointVisible, lastClientId } =\n\t\tuseSelectedBlockToolProps( clientId );\n\n\t// Stores the active toolbar item index so the block toolbar can return focus\n\t// to it when re-mounting.\n\tconst initialToolbarItemIndexRef = useRef();\n\n\tuseEffect( () => {\n\t\t// Resets the index whenever the active block changes so this is not\n\t\t// persisted. See https://github.com/WordPress/gutenberg/pull/25760#issuecomment-717906169\n\t\tinitialToolbarItemIndexRef.current = undefined;\n\t}, [ clientId ] );\n\n\tconst { stopTyping } = useDispatch( blockEditorStore );\n\tconst isToolbarForced = useRef( false );\n\n\tuseShortcut( 'core/block-editor/focus-toolbar', () => {\n\t\tisToolbarForced.current = true;\n\t\tstopTyping( true );\n\t} );\n\n\tuseEffect( () => {\n\t\tisToolbarForced.current = false;\n\t} );\n\n\tconst popoverProps = useBlockToolbarPopoverProps( {\n\t\tcontentElement: __unstableContentRef?.current,\n\t\tclientId,\n\t} );\n\n\treturn (\n\t\t! isTyping && (\n\t\t\t<BlockPopover\n\t\t\t\tclientId={ capturingClientId || clientId }\n\t\t\t\tbottomClientId={ lastClientId }\n\t\t\t\tclassName={ classnames(\n\t\t\t\t\t'block-editor-block-list__block-popover',\n\t\t\t\t\t{\n\t\t\t\t\t\t'is-insertion-point-visible': isInsertionPointVisible,\n\t\t\t\t\t}\n\t\t\t\t) }\n\t\t\t\tresize={ false }\n\t\t\t\t{ ...popoverProps }\n\t\t\t>\n\t\t\t\t<PrivateBlockToolbar\n\t\t\t\t\t// If the toolbar is being shown because of being forced\n\t\t\t\t\t// it should focus the toolbar right after the mount.\n\t\t\t\t\tfocusOnMount={ isToolbarForced.current }\n\t\t\t\t\t__experimentalInitialIndex={\n\t\t\t\t\t\tinitialToolbarItemIndexRef.current\n\t\t\t\t\t}\n\t\t\t\t\t__experimentalOnIndexChange={ ( index ) => {\n\t\t\t\t\t\tinitialToolbarItemIndexRef.current = index;\n\t\t\t\t\t} }\n\t\t\t\t\tvariant=\"toolbar\"\n\t\t\t\t/>\n\t\t\t</BlockPopover>\n\t\t)\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;AACnC;AACA;AACA;AACA,SAASC,WAAW,QAAQ,iBAAiB;AAC7C,SAASC,SAAS,EAAEC,MAAM,QAAQ,oBAAoB;AACtD,SAASC,WAAW,QAAQ,+BAA+B;AAC3D;AACA;AACA;AACA,OAAOC,YAAY,MAAM,kBAAkB;AAC3C,OAAOC,2BAA2B,MAAM,mCAAmC;AAC3E,OAAOC,yBAAyB,MAAM,iCAAiC;AACvE,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,SAASC,mBAAmB,QAAQ,kBAAkB;AAEtD,eAAe,SAASC,mBAAmBA,CAAE;EAC5CC,QAAQ;EACRC,QAAQ;EACRC;AACD,CAAC,EAAG;EACH,MAAM;IAAEC,iBAAiB;IAAEC,uBAAuB;IAAEC;EAAa,CAAC,GACjEV,yBAAyB,CAAEK,QAAS,CAAC;;EAEtC;EACA;EACA,MAAMM,0BAA0B,GAAGf,MAAM,CAAC,CAAC;EAE3CD,SAAS,CAAE,MAAM;IAChB;IACA;IACAgB,0BAA0B,CAACC,OAAO,GAAGC,SAAS;EAC/C,CAAC,EAAE,CAAER,QAAQ,CAAG,CAAC;EAEjB,MAAM;IAAES;EAAW,CAAC,GAAGpB,WAAW,CAAEQ,gBAAiB,CAAC;EACtD,MAAMa,eAAe,GAAGnB,MAAM,CAAE,KAAM,CAAC;EAEvCC,WAAW,CAAE,iCAAiC,EAAE,MAAM;IACrDkB,eAAe,CAACH,OAAO,GAAG,IAAI;IAC9BE,UAAU,CAAE,IAAK,CAAC;EACnB,CAAE,CAAC;EAEHnB,SAAS,CAAE,MAAM;IAChBoB,eAAe,CAACH,OAAO,GAAG,KAAK;EAChC,CAAE,CAAC;EAEH,MAAMI,YAAY,GAAGjB,2BAA2B,CAAE;IACjDkB,cAAc,EAAEV,oBAAoB,EAAEK,OAAO;IAC7CP;EACD,CAAE,CAAC;EAEH,OACC,CAAEC,QAAQ,IACTY,aAAA,CAACpB,YAAY;IACZO,QAAQ,EAAGG,iBAAiB,IAAIH,QAAU;IAC1Cc,cAAc,EAAGT,YAAc;IAC/BU,SAAS,EAAG3B,UAAU,CACrB,wCAAwC,EACxC;MACC,4BAA4B,EAAEgB;IAC/B,CACD,CAAG;IACHY,MAAM,EAAG,KAAO;IAAA,GACXL;EAAY,GAEjBE,aAAA,CAACf;EACA;EACA;EAAA;IACAmB,YAAY,EAAGP,eAAe,CAACH,OAAS;IACxCW,0BAA0B,EACzBZ,0BAA0B,CAACC,OAC3B;IACDY,2BAA2B,EAAKC,KAAK,IAAM;MAC1Cd,0BAA0B,CAACC,OAAO,GAAGa,KAAK;IAC3C,CAAG;IACHC,OAAO,EAAC;EAAS,CACjB,CACY,CACd;AAEH"}
|
|
1
|
+
{"version":3,"names":["classnames","useDispatch","useEffect","useRef","useShortcut","BlockPopover","useBlockToolbarPopoverProps","useSelectedBlockToolProps","store","blockEditorStore","PrivateBlockToolbar","BlockToolbarPopover","clientId","isTyping","__unstableContentRef","capturingClientId","isInsertionPointVisible","lastClientId","initialToolbarItemIndexRef","current","undefined","stopTyping","isToolbarForced","popoverProps","contentElement","createElement","bottomClientId","className","resize","focusOnMount","__experimentalInitialIndex","__experimentalOnIndexChange","index","variant"],"sources":["@wordpress/block-editor/src/components/block-tools/block-toolbar-popover.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n/**\n * WordPress dependencies\n */\nimport { useDispatch } from '@wordpress/data';\nimport { useEffect, useRef } from '@wordpress/element';\nimport { useShortcut } from '@wordpress/keyboard-shortcuts';\n/**\n * Internal dependencies\n */\nimport BlockPopover from '../block-popover';\nimport useBlockToolbarPopoverProps from './use-block-toolbar-popover-props';\nimport useSelectedBlockToolProps from './use-selected-block-tool-props';\nimport { store as blockEditorStore } from '../../store';\nimport { PrivateBlockToolbar } from '../block-toolbar';\n\nexport default function BlockToolbarPopover( {\n\tclientId,\n\tisTyping,\n\t__unstableContentRef,\n} ) {\n\tconst { capturingClientId, isInsertionPointVisible, lastClientId } =\n\t\tuseSelectedBlockToolProps( clientId );\n\n\t// Stores the active toolbar item index so the block toolbar can return focus\n\t// to it when re-mounting.\n\tconst initialToolbarItemIndexRef = useRef();\n\n\tuseEffect( () => {\n\t\t// Resets the index whenever the active block changes so this is not\n\t\t// persisted. See https://github.com/WordPress/gutenberg/pull/25760#issuecomment-717906169\n\t\tinitialToolbarItemIndexRef.current = undefined;\n\t}, [ clientId ] );\n\n\tconst { stopTyping } = useDispatch( blockEditorStore );\n\tconst isToolbarForced = useRef( false );\n\n\tuseShortcut( 'core/block-editor/focus-toolbar', () => {\n\t\tisToolbarForced.current = true;\n\t\tstopTyping( true );\n\t} );\n\n\tuseEffect( () => {\n\t\tisToolbarForced.current = false;\n\t} );\n\n\tconst popoverProps = useBlockToolbarPopoverProps( {\n\t\tcontentElement: __unstableContentRef?.current,\n\t\tclientId,\n\t} );\n\n\treturn (\n\t\t! isTyping && (\n\t\t\t<BlockPopover\n\t\t\t\tclientId={ capturingClientId || clientId }\n\t\t\t\tbottomClientId={ lastClientId }\n\t\t\t\tclassName={ classnames(\n\t\t\t\t\t'block-editor-block-list__block-popover',\n\t\t\t\t\t{\n\t\t\t\t\t\t'is-insertion-point-visible': isInsertionPointVisible,\n\t\t\t\t\t}\n\t\t\t\t) }\n\t\t\t\tresize={ false }\n\t\t\t\t{ ...popoverProps }\n\t\t\t>\n\t\t\t\t<PrivateBlockToolbar\n\t\t\t\t\t// If the toolbar is being shown because of being forced\n\t\t\t\t\t// it should focus the toolbar right after the mount.\n\t\t\t\t\tfocusOnMount={ isToolbarForced.current }\n\t\t\t\t\t__experimentalInitialIndex={\n\t\t\t\t\t\tinitialToolbarItemIndexRef.current\n\t\t\t\t\t}\n\t\t\t\t\t__experimentalOnIndexChange={ ( index ) => {\n\t\t\t\t\t\tinitialToolbarItemIndexRef.current = index;\n\t\t\t\t\t} }\n\t\t\t\t\tvariant=\"toolbar\"\n\t\t\t\t/>\n\t\t\t</BlockPopover>\n\t\t)\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;AACnC;AACA;AACA;AACA,SAASC,WAAW,QAAQ,iBAAiB;AAC7C,SAASC,SAAS,EAAEC,MAAM,QAAQ,oBAAoB;AACtD,SAASC,WAAW,QAAQ,+BAA+B;AAC3D;AACA;AACA;AACA,OAAOC,YAAY,MAAM,kBAAkB;AAC3C,OAAOC,2BAA2B,MAAM,mCAAmC;AAC3E,OAAOC,yBAAyB,MAAM,iCAAiC;AACvE,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,SAASC,mBAAmB,QAAQ,kBAAkB;AAEtD,eAAe,SAASC,mBAAmBA,CAAE;EAC5CC,QAAQ;EACRC,QAAQ;EACRC;AACD,CAAC,EAAG;EACH,MAAM;IAAEC,iBAAiB;IAAEC,uBAAuB;IAAEC;EAAa,CAAC,GACjEV,yBAAyB,CAAEK,QAAS,CAAC;;EAEtC;EACA;EACA,MAAMM,0BAA0B,GAAGf,MAAM,CAAC,CAAC;EAE3CD,SAAS,CAAE,MAAM;IAChB;IACA;IACAgB,0BAA0B,CAACC,OAAO,GAAGC,SAAS;EAC/C,CAAC,EAAE,CAAER,QAAQ,CAAG,CAAC;EAEjB,MAAM;IAAES;EAAW,CAAC,GAAGpB,WAAW,CAAEQ,gBAAiB,CAAC;EACtD,MAAMa,eAAe,GAAGnB,MAAM,CAAE,KAAM,CAAC;EAEvCC,WAAW,CAAE,iCAAiC,EAAE,MAAM;IACrDkB,eAAe,CAACH,OAAO,GAAG,IAAI;IAC9BE,UAAU,CAAE,IAAK,CAAC;EACnB,CAAE,CAAC;EAEHnB,SAAS,CAAE,MAAM;IAChBoB,eAAe,CAACH,OAAO,GAAG,KAAK;EAChC,CAAE,CAAC;EAEH,MAAMI,YAAY,GAAGjB,2BAA2B,CAAE;IACjDkB,cAAc,EAAEV,oBAAoB,EAAEK,OAAO;IAC7CP;EACD,CAAE,CAAC;EAEH,OACC,CAAEC,QAAQ,IACTY,aAAA,CAACpB,YAAY;IACZO,QAAQ,EAAGG,iBAAiB,IAAIH,QAAU;IAC1Cc,cAAc,EAAGT,YAAc;IAC/BU,SAAS,EAAG3B,UAAU,CACrB,wCAAwC,EACxC;MACC,4BAA4B,EAAEgB;IAC/B,CACD,CAAG;IACHY,MAAM,EAAG,KAAO;IAAA,GACXL;EAAY,GAEjBE,aAAA,CAACf;EACA;EACA;EAAA;IACAmB,YAAY,EAAGP,eAAe,CAACH,OAAS;IACxCW,0BAA0B,EACzBZ,0BAA0B,CAACC,OAC3B;IACDY,2BAA2B,EAAKC,KAAK,IAAM;MAC1Cd,0BAA0B,CAACC,OAAO,GAAGa,KAAK;IAC3C,CAAG;IACHC,OAAO,EAAC;EAAS,CACjB,CACY,CACd;AAEH","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["classnames","BlockPopoverCover","useBlockToolbarPopoverProps","Inserter","useSelectedBlockToolProps","EmptyBlockInserter","clientId","__unstableContentRef","capturingClientId","isInsertionPointVisible","lastClientId","rootClientId","popoverProps","contentElement","current","createElement","bottomClientId","className","position","__experimentalIsQuick"],"sources":["@wordpress/block-editor/src/components/block-tools/empty-block-inserter.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * Internal dependencies\n */\nimport BlockPopoverCover from '../block-popover/cover';\nimport useBlockToolbarPopoverProps from './use-block-toolbar-popover-props';\nimport Inserter from '../inserter';\nimport useSelectedBlockToolProps from './use-selected-block-tool-props';\n\nexport default function EmptyBlockInserter( {\n\tclientId,\n\t__unstableContentRef,\n} ) {\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<BlockPopoverCover\n\t\t\tclientId={ capturingClientId || clientId }\n\t\t\tbottomClientId={ lastClientId }\n\t\t\tclassName={ classnames(\n\t\t\t\t'block-editor-block-list__block-side-inserter-popover',\n\t\t\t\t{\n\t\t\t\t\t'is-insertion-point-visible': isInsertionPointVisible,\n\t\t\t\t}\n\t\t\t) }\n\t\t\t__unstableContentRef={ __unstableContentRef }\n\t\t\t{ ...popoverProps }\n\t\t>\n\t\t\t<div className=\"block-editor-block-list__empty-block-inserter\">\n\t\t\t\t<Inserter\n\t\t\t\t\tposition=\"bottom right\"\n\t\t\t\t\trootClientId={ rootClientId }\n\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t__experimentalIsQuick\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</BlockPopoverCover>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,OAAOC,iBAAiB,MAAM,wBAAwB;AACtD,OAAOC,2BAA2B,MAAM,mCAAmC;AAC3E,OAAOC,QAAQ,MAAM,aAAa;AAClC,OAAOC,yBAAyB,MAAM,iCAAiC;AAEvE,eAAe,SAASC,kBAAkBA,CAAE;EAC3CC,QAAQ;EACRC;AACD,CAAC,EAAG;EACH,MAAM;IACLC,iBAAiB;IACjBC,uBAAuB;IACvBC,YAAY;IACZC;EACD,CAAC,GAAGP,yBAAyB,CAAEE,QAAS,CAAC;EAEzC,MAAMM,YAAY,GAAGV,2BAA2B,CAAE;IACjDW,cAAc,EAAEN,oBAAoB,EAAEO,OAAO;IAC7CR;EACD,CAAE,CAAC;EAEH,OACCS,aAAA,CAACd,iBAAiB;IACjBK,QAAQ,EAAGE,iBAAiB,IAAIF,QAAU;IAC1CU,cAAc,EAAGN,YAAc;IAC/BO,SAAS,EAAGjB,UAAU,CACrB,sDAAsD,EACtD;MACC,4BAA4B,EAAES;IAC/B,CACD,CAAG;IACHF,oBAAoB,EAAGA,oBAAsB;IAAA,GACxCK;EAAY,GAEjBG,aAAA;IAAKE,SAAS,EAAC;EAA+C,GAC7DF,aAAA,CAACZ,QAAQ;IACRe,QAAQ,EAAC,cAAc;IACvBP,YAAY,EAAGA,YAAc;IAC7BL,QAAQ,EAAGA,QAAU;IACrBa,qBAAqB;EAAA,CACrB,CACG,CACa,CAAC;AAEtB"}
|
|
1
|
+
{"version":3,"names":["classnames","BlockPopoverCover","useBlockToolbarPopoverProps","Inserter","useSelectedBlockToolProps","EmptyBlockInserter","clientId","__unstableContentRef","capturingClientId","isInsertionPointVisible","lastClientId","rootClientId","popoverProps","contentElement","current","createElement","bottomClientId","className","position","__experimentalIsQuick"],"sources":["@wordpress/block-editor/src/components/block-tools/empty-block-inserter.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * Internal dependencies\n */\nimport BlockPopoverCover from '../block-popover/cover';\nimport useBlockToolbarPopoverProps from './use-block-toolbar-popover-props';\nimport Inserter from '../inserter';\nimport useSelectedBlockToolProps from './use-selected-block-tool-props';\n\nexport default function EmptyBlockInserter( {\n\tclientId,\n\t__unstableContentRef,\n} ) {\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<BlockPopoverCover\n\t\t\tclientId={ capturingClientId || clientId }\n\t\t\tbottomClientId={ lastClientId }\n\t\t\tclassName={ classnames(\n\t\t\t\t'block-editor-block-list__block-side-inserter-popover',\n\t\t\t\t{\n\t\t\t\t\t'is-insertion-point-visible': isInsertionPointVisible,\n\t\t\t\t}\n\t\t\t) }\n\t\t\t__unstableContentRef={ __unstableContentRef }\n\t\t\t{ ...popoverProps }\n\t\t>\n\t\t\t<div className=\"block-editor-block-list__empty-block-inserter\">\n\t\t\t\t<Inserter\n\t\t\t\t\tposition=\"bottom right\"\n\t\t\t\t\trootClientId={ rootClientId }\n\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t__experimentalIsQuick\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</BlockPopoverCover>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,OAAOC,iBAAiB,MAAM,wBAAwB;AACtD,OAAOC,2BAA2B,MAAM,mCAAmC;AAC3E,OAAOC,QAAQ,MAAM,aAAa;AAClC,OAAOC,yBAAyB,MAAM,iCAAiC;AAEvE,eAAe,SAASC,kBAAkBA,CAAE;EAC3CC,QAAQ;EACRC;AACD,CAAC,EAAG;EACH,MAAM;IACLC,iBAAiB;IACjBC,uBAAuB;IACvBC,YAAY;IACZC;EACD,CAAC,GAAGP,yBAAyB,CAAEE,QAAS,CAAC;EAEzC,MAAMM,YAAY,GAAGV,2BAA2B,CAAE;IACjDW,cAAc,EAAEN,oBAAoB,EAAEO,OAAO;IAC7CR;EACD,CAAE,CAAC;EAEH,OACCS,aAAA,CAACd,iBAAiB;IACjBK,QAAQ,EAAGE,iBAAiB,IAAIF,QAAU;IAC1CU,cAAc,EAAGN,YAAc;IAC/BO,SAAS,EAAGjB,UAAU,CACrB,sDAAsD,EACtD;MACC,4BAA4B,EAAES;IAC/B,CACD,CAAG;IACHF,oBAAoB,EAAGA,oBAAsB;IAAA,GACxCK;EAAY,GAEjBG,aAAA;IAAKE,SAAS,EAAC;EAA+C,GAC7DF,aAAA,CAACZ,QAAQ;IACRe,QAAQ,EAAC,cAAc;IACvBP,YAAY,EAAGA,YAAc;IAC7BL,QAAQ,EAAGA,QAAU;IACrBa,qBAAqB;EAAA,CACrB,CACG,CACa,CAAC;AAEtB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useSelect","useDispatch","isTextField","Popover","__unstableUseShortcutEventMatch","useShortcutEventMatch","useRef","EmptyBlockInserter","InsertionPointOpenRef","default","InsertionPoint","BlockToolbarPopover","BlockToolbarBreadcrumb","store","blockEditorStore","usePopoverScroll","ZoomOutModeInserters","useShowBlockTools","unlock","selector","select","getSelectedBlockClientId","getFirstMultiSelectedBlockClientId","getSettings","__unstableGetEditorMode","isTyping","clientId","editorMode","hasFixedToolbar","isZoomOutMode","BlockTools","children","__unstableContentRef","props","isMatch","getSelectedBlockClientIds","getBlockRootClientId","showEmptyBlockSideInserter","showBreadcrumb","showBlockToolbarPopover","duplicateBlocks","removeBlocks","insertAfterBlock","insertBeforeBlock","selectBlock","moveBlocksUp","moveBlocksDown","expandBlock","onKeyDown","event","defaultPrevented","clientIds","length","preventDefault","rootClientId","target","closest","contentWindow","document","activeElement","blockToolbarRef","blockToolbarAfterRef","createElement","Provider","value","Slot","name","ref"],"sources":["@wordpress/block-editor/src/components/block-tools/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { isTextField } from '@wordpress/dom';\nimport { Popover } from '@wordpress/components';\nimport { __unstableUseShortcutEventMatch as useShortcutEventMatch } from '@wordpress/keyboard-shortcuts';\nimport { useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport EmptyBlockInserter from './empty-block-inserter';\nimport {\n\tInsertionPointOpenRef,\n\tdefault as InsertionPoint,\n} from './insertion-point';\nimport BlockToolbarPopover from './block-toolbar-popover';\nimport BlockToolbarBreadcrumb from './block-toolbar-breadcrumb';\nimport { store as blockEditorStore } from '../../store';\nimport usePopoverScroll from '../block-popover/use-popover-scroll';\nimport ZoomOutModeInserters from './zoom-out-mode-inserters';\nimport { useShowBlockTools } from './use-show-block-tools';\nimport { unlock } from '../../lock-unlock';\n\nfunction selector( select ) {\n\tconst {\n\t\tgetSelectedBlockClientId,\n\t\tgetFirstMultiSelectedBlockClientId,\n\t\tgetSettings,\n\t\t__unstableGetEditorMode,\n\t\tisTyping,\n\t} = select( blockEditorStore );\n\n\tconst clientId =\n\t\tgetSelectedBlockClientId() || getFirstMultiSelectedBlockClientId();\n\n\tconst editorMode = __unstableGetEditorMode();\n\n\treturn {\n\t\tclientId,\n\t\thasFixedToolbar: getSettings().hasFixedToolbar,\n\t\tisTyping: isTyping(),\n\t\tisZoomOutMode: editorMode === 'zoom-out',\n\t};\n}\n\n/**\n * Renders block tools (the block toolbar, select/navigation mode toolbar, the\n * insertion point and a slot for the inline rich text toolbar). Must be wrapped\n * around the block content and editor styles wrapper or iframe.\n *\n * @param {Object} $0 Props.\n * @param {Object} $0.children The block content and style container.\n * @param {Object} $0.__unstableContentRef Ref holding the content scroll container.\n */\nexport default function BlockTools( {\n\tchildren,\n\t__unstableContentRef,\n\t...props\n} ) {\n\tconst { clientId, hasFixedToolbar, isTyping, isZoomOutMode } = useSelect(\n\t\tselector,\n\t\t[]\n\t);\n\tconst isMatch = useShortcutEventMatch();\n\tconst { getSelectedBlockClientIds, getBlockRootClientId } =\n\t\tuseSelect( blockEditorStore );\n\n\tconst {\n\t\tshowEmptyBlockSideInserter,\n\t\tshowBreadcrumb,\n\t\tshowBlockToolbarPopover,\n\t} = useShowBlockTools();\n\n\tconst {\n\t\tduplicateBlocks,\n\t\tremoveBlocks,\n\t\tinsertAfterBlock,\n\t\tinsertBeforeBlock,\n\t\tselectBlock,\n\t\tmoveBlocksUp,\n\t\tmoveBlocksDown,\n\t\texpandBlock,\n\t} = unlock( useDispatch( blockEditorStore ) );\n\n\tfunction onKeyDown( event ) {\n\t\tif ( event.defaultPrevented ) return;\n\n\t\tif ( isMatch( 'core/block-editor/move-up', event ) ) {\n\t\t\tconst clientIds = getSelectedBlockClientIds();\n\t\t\tif ( clientIds.length ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tconst rootClientId = getBlockRootClientId( clientIds[ 0 ] );\n\t\t\t\tmoveBlocksUp( clientIds, rootClientId );\n\t\t\t}\n\t\t} else if ( isMatch( 'core/block-editor/move-down', event ) ) {\n\t\t\tconst clientIds = getSelectedBlockClientIds();\n\t\t\tif ( clientIds.length ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tconst rootClientId = getBlockRootClientId( clientIds[ 0 ] );\n\t\t\t\tmoveBlocksDown( clientIds, rootClientId );\n\t\t\t}\n\t\t} else if ( isMatch( 'core/block-editor/duplicate', event ) ) {\n\t\t\tconst clientIds = getSelectedBlockClientIds();\n\t\t\tif ( clientIds.length ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tduplicateBlocks( clientIds );\n\t\t\t}\n\t\t} else if ( isMatch( 'core/block-editor/remove', event ) ) {\n\t\t\tconst clientIds = getSelectedBlockClientIds();\n\t\t\tif ( clientIds.length ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tremoveBlocks( clientIds );\n\t\t\t}\n\t\t} else if ( isMatch( 'core/block-editor/insert-after', event ) ) {\n\t\t\tconst clientIds = getSelectedBlockClientIds();\n\t\t\tif ( clientIds.length ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tinsertAfterBlock( clientIds[ clientIds.length - 1 ] );\n\t\t\t}\n\t\t} else if ( isMatch( 'core/block-editor/insert-before', event ) ) {\n\t\t\tconst clientIds = getSelectedBlockClientIds();\n\t\t\tif ( clientIds.length ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tinsertBeforeBlock( clientIds[ 0 ] );\n\t\t\t}\n\t\t} else if ( isMatch( 'core/block-editor/unselect', event ) ) {\n\t\t\tif ( event.target.closest( '[role=toolbar]' ) ) {\n\t\t\t\t// This shouldn't be necessary, but we have a combination of a few things all combining to create a situation where:\n\t\t\t\t// - Because the block toolbar uses createPortal to populate the block toolbar fills, we can't rely on the React event bubbling to hit the onKeyDown listener for the block toolbar\n\t\t\t\t// - Since we can't use the React tree, we use the DOM tree which _should_ handle the event bubbling correctly from a `createPortal` element.\n\t\t\t\t// - This bubbles via the React tree, which hits this `unselect` escape keypress before the block toolbar DOM event listener has access to it.\n\t\t\t\t// An alternative would be to remove the addEventListener on the navigableToolbar and use this event to handle it directly right here. That feels hacky too though.\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst clientIds = getSelectedBlockClientIds();\n\t\t\tif ( clientIds.length > 1 ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\t// If there is more than one block selected, select the first\n\t\t\t\t// block so that focus is directed back to the beginning of the selection.\n\t\t\t\t// In effect, to the user this feels like deselecting the multi-selection.\n\t\t\t\tselectBlock( clientIds[ 0 ] );\n\t\t\t}\n\t\t} else if ( isMatch( 'core/block-editor/collapse-list-view', event ) ) {\n\t\t\t// If focus is currently within a text field, such as a rich text block or other editable field,\n\t\t\t// skip collapsing the list view, and allow the keyboard shortcut to be handled by the text field.\n\t\t\t// This condition checks for both the active element and the active element within an iframed editor.\n\t\t\tif (\n\t\t\t\tisTextField( event.target ) ||\n\t\t\t\tisTextField(\n\t\t\t\t\tevent.target?.contentWindow?.document?.activeElement\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tevent.preventDefault();\n\t\t\texpandBlock( clientId );\n\t\t}\n\t}\n\n\tconst blockToolbarRef = usePopoverScroll( __unstableContentRef );\n\tconst blockToolbarAfterRef = usePopoverScroll( __unstableContentRef );\n\n\treturn (\n\t\t// eslint-disable-next-line jsx-a11y/no-static-element-interactions\n\t\t<div { ...props } onKeyDown={ onKeyDown }>\n\t\t\t<InsertionPointOpenRef.Provider value={ useRef( false ) }>\n\t\t\t\t{ ! isTyping && (\n\t\t\t\t\t<InsertionPoint\n\t\t\t\t\t\t__unstableContentRef={ __unstableContentRef }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\n\t\t\t\t{ showEmptyBlockSideInserter && (\n\t\t\t\t\t<EmptyBlockInserter\n\t\t\t\t\t\t__unstableContentRef={ __unstableContentRef }\n\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\n\t\t\t\t{ showBlockToolbarPopover && (\n\t\t\t\t\t<BlockToolbarPopover\n\t\t\t\t\t\t__unstableContentRef={ __unstableContentRef }\n\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\tisTyping={ isTyping }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\n\t\t\t\t{ showBreadcrumb && (\n\t\t\t\t\t<BlockToolbarBreadcrumb\n\t\t\t\t\t\t__unstableContentRef={ __unstableContentRef }\n\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\n\t\t\t\t{ /* Used for the inline rich text toolbar. Until this toolbar is combined into BlockToolbar, someone implementing their own BlockToolbar will also need to use this to see the image caption toolbar. */ }\n\t\t\t\t{ ! isZoomOutMode && ! hasFixedToolbar && (\n\t\t\t\t\t<Popover.Slot\n\t\t\t\t\t\tname=\"block-toolbar\"\n\t\t\t\t\t\tref={ blockToolbarRef }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ children }\n\t\t\t\t{ /* Used for inline rich text popovers. */ }\n\t\t\t\t<Popover.Slot\n\t\t\t\t\tname=\"__unstable-block-tools-after\"\n\t\t\t\t\tref={ blockToolbarAfterRef }\n\t\t\t\t/>\n\t\t\t\t{ isZoomOutMode && (\n\t\t\t\t\t<ZoomOutModeInserters\n\t\t\t\t\t\t__unstableContentRef={ __un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EAAGA,oBAAsB;MAC7CN,QAAQ,EAAGA;IAAU,CACrB,CACD,EAGC,CAAEG,aAAa,IAAI,CAAED,eAAe,IACrCkC,aAAA,CAAC3D,OAAO,CAAC8D,IAAI;MACZC,IAAI,EAAC,eAAe;MACpBC,GAAG,EAAGP;IAAiB,CACvB,CACD,EACC7B,QAAQ,EAEV+B,aAAA,CAAC3D,OAAO,CAAC8D,IAAI;MACZC,IAAI,EAAC,8BAA8B;MACnCC,GAAG,EAAGN;IAAsB,CAC5B,CAAC,EACAhC,aAAa,IACdiC,aAAA,CAAC9C,oBAAoB;MACpBgB,oBAAoB,EAAGA;IAAsB,CAC7C,CAE6B,CAC5B;EAAC;AAER"}
|
|
1
|
+
{"version":3,"names":["useSelect","useDispatch","isTextField","Popover","__unstableUseShortcutEventMatch","useShortcutEventMatch","useRef","EmptyBlockInserter","InsertionPointOpenRef","default","InsertionPoint","BlockToolbarPopover","BlockToolbarBreadcrumb","store","blockEditorStore","usePopoverScroll","ZoomOutModeInserters","useShowBlockTools","unlock","selector","select","getSelectedBlockClientId","getFirstMultiSelectedBlockClientId","getSettings","__unstableGetEditorMode","isTyping","clientId","editorMode","hasFixedToolbar","isZoomOutMode","BlockTools","children","__unstableContentRef","props","isMatch","getSelectedBlockClientIds","getBlockRootClientId","showEmptyBlockSideInserter","showBreadcrumb","showBlockToolbarPopover","duplicateBlocks","removeBlocks","insertAfterBlock","insertBeforeBlock","selectBlock","moveBlocksUp","moveBlocksDown","expandBlock","onKeyDown","event","defaultPrevented","clientIds","length","preventDefault","rootClientId","target","closest","contentWindow","document","activeElement","blockToolbarRef","blockToolbarAfterRef","createElement","Provider","value","Slot","name","ref"],"sources":["@wordpress/block-editor/src/components/block-tools/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { isTextField } from '@wordpress/dom';\nimport { Popover } from '@wordpress/components';\nimport { __unstableUseShortcutEventMatch as useShortcutEventMatch } from '@wordpress/keyboard-shortcuts';\nimport { useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport EmptyBlockInserter from './empty-block-inserter';\nimport {\n\tInsertionPointOpenRef,\n\tdefault as InsertionPoint,\n} from './insertion-point';\nimport BlockToolbarPopover from './block-toolbar-popover';\nimport BlockToolbarBreadcrumb from './block-toolbar-breadcrumb';\nimport { store as blockEditorStore } from '../../store';\nimport usePopoverScroll from '../block-popover/use-popover-scroll';\nimport ZoomOutModeInserters from './zoom-out-mode-inserters';\nimport { useShowBlockTools } from './use-show-block-tools';\nimport { unlock } from '../../lock-unlock';\n\nfunction selector( select ) {\n\tconst {\n\t\tgetSelectedBlockClientId,\n\t\tgetFirstMultiSelectedBlockClientId,\n\t\tgetSettings,\n\t\t__unstableGetEditorMode,\n\t\tisTyping,\n\t} = select( blockEditorStore );\n\n\tconst clientId =\n\t\tgetSelectedBlockClientId() || getFirstMultiSelectedBlockClientId();\n\n\tconst editorMode = __unstableGetEditorMode();\n\n\treturn {\n\t\tclientId,\n\t\thasFixedToolbar: getSettings().hasFixedToolbar,\n\t\tisTyping: isTyping(),\n\t\tisZoomOutMode: editorMode === 'zoom-out',\n\t};\n}\n\n/**\n * Renders block tools (the block toolbar, select/navigation mode toolbar, the\n * insertion point and a slot for the inline rich text toolbar). Must be wrapped\n * around the block content and editor styles wrapper or iframe.\n *\n * @param {Object} $0 Props.\n * @param {Object} $0.children The block content and style container.\n * @param {Object} $0.__unstableContentRef Ref holding the content scroll container.\n */\nexport default function BlockTools( {\n\tchildren,\n\t__unstableContentRef,\n\t...props\n} ) {\n\tconst { clientId, hasFixedToolbar, isTyping, isZoomOutMode } = useSelect(\n\t\tselector,\n\t\t[]\n\t);\n\tconst isMatch = useShortcutEventMatch();\n\tconst { getSelectedBlockClientIds, getBlockRootClientId } =\n\t\tuseSelect( blockEditorStore );\n\n\tconst {\n\t\tshowEmptyBlockSideInserter,\n\t\tshowBreadcrumb,\n\t\tshowBlockToolbarPopover,\n\t} = useShowBlockTools();\n\n\tconst {\n\t\tduplicateBlocks,\n\t\tremoveBlocks,\n\t\tinsertAfterBlock,\n\t\tinsertBeforeBlock,\n\t\tselectBlock,\n\t\tmoveBlocksUp,\n\t\tmoveBlocksDown,\n\t\texpandBlock,\n\t} = unlock( useDispatch( blockEditorStore ) );\n\n\tfunction onKeyDown( event ) {\n\t\tif ( event.defaultPrevented ) return;\n\n\t\tif ( isMatch( 'core/block-editor/move-up', event ) ) {\n\t\t\tconst clientIds = getSelectedBlockClientIds();\n\t\t\tif ( clientIds.length ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tconst rootClientId = getBlockRootClientId( clientIds[ 0 ] );\n\t\t\t\tmoveBlocksUp( clientIds, rootClientId );\n\t\t\t}\n\t\t} else if ( isMatch( 'core/block-editor/move-down', event ) ) {\n\t\t\tconst clientIds = getSelectedBlockClientIds();\n\t\t\tif ( clientIds.length ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tconst rootClientId = getBlockRootClientId( clientIds[ 0 ] );\n\t\t\t\tmoveBlocksDown( clientIds, rootClientId );\n\t\t\t}\n\t\t} else if ( isMatch( 'core/block-editor/duplicate', event ) ) {\n\t\t\tconst clientIds = getSelectedBlockClientIds();\n\t\t\tif ( clientIds.length ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tduplicateBlocks( clientIds );\n\t\t\t}\n\t\t} else if ( isMatch( 'core/block-editor/remove', event ) ) {\n\t\t\tconst clientIds = getSelectedBlockClientIds();\n\t\t\tif ( clientIds.length ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tremoveBlocks( clientIds );\n\t\t\t}\n\t\t} else if ( isMatch( 'core/block-editor/insert-after', event ) ) {\n\t\t\tconst clientIds = getSelectedBlockClientIds();\n\t\t\tif ( clientIds.length ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tinsertAfterBlock( clientIds[ clientIds.length - 1 ] );\n\t\t\t}\n\t\t} else if ( isMatch( 'core/block-editor/insert-before', event ) ) {\n\t\t\tconst clientIds = getSelectedBlockClientIds();\n\t\t\tif ( clientIds.length ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tinsertBeforeBlock( clientIds[ 0 ] );\n\t\t\t}\n\t\t} else if ( isMatch( 'core/block-editor/unselect', event ) ) {\n\t\t\tif ( event.target.closest( '[role=toolbar]' ) ) {\n\t\t\t\t// This shouldn't be necessary, but we have a combination of a few things all combining to create a situation where:\n\t\t\t\t// - Because the block toolbar uses createPortal to populate the block toolbar fills, we can't rely on the React event bubbling to hit the onKeyDown listener for the block toolbar\n\t\t\t\t// - Since we can't use the React tree, we use the DOM tree which _should_ handle the event bubbling correctly from a `createPortal` element.\n\t\t\t\t// - This bubbles via the React tree, which hits this `unselect` escape keypress before the block toolbar DOM event listener has access to it.\n\t\t\t\t// An alternative would be to remove the addEventListener on the navigableToolbar and use this event to handle it directly right here. That feels hacky too though.\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst clientIds = getSelectedBlockClientIds();\n\t\t\tif ( clientIds.length > 1 ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\t// If there is more than one block selected, select the first\n\t\t\t\t// block so that focus is directed back to the beginning of the selection.\n\t\t\t\t// In effect, to the user this feels like deselecting the multi-selection.\n\t\t\t\tselectBlock( clientIds[ 0 ] );\n\t\t\t}\n\t\t} else if ( isMatch( 'core/block-editor/collapse-list-view', event ) ) {\n\t\t\t// If focus is currently within a text field, such as a rich text block or other editable field,\n\t\t\t// skip collapsing the list view, and allow the keyboard shortcut to be handled by the text field.\n\t\t\t// This condition checks for both the active element and the active element within an iframed editor.\n\t\t\tif (\n\t\t\t\tisTextField( event.target ) ||\n\t\t\t\tisTextField(\n\t\t\t\t\tevent.target?.contentWindow?.document?.activeElement\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tevent.preventDefault();\n\t\t\texpandBlock( clientId );\n\t\t}\n\t}\n\n\tconst blockToolbarRef = usePopoverScroll( __unstableContentRef );\n\tconst blockToolbarAfterRef = usePopoverScroll( __unstableContentRef );\n\n\treturn (\n\t\t// eslint-disable-next-line jsx-a11y/no-static-element-interactions\n\t\t<div { ...props } onKeyDown={ onKeyDown }>\n\t\t\t<InsertionPointOpenRef.Provider value={ useRef( false ) }>\n\t\t\t\t{ ! isTyping && (\n\t\t\t\t\t<InsertionPoint\n\t\t\t\t\t\t__unstableContentRef={ __unstableContentRef }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\n\t\t\t\t{ showEmptyBlockSideInserter && (\n\t\t\t\t\t<EmptyBlockInserter\n\t\t\t\t\t\t__unstableContentRef={ __unstableContentRef }\n\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\n\t\t\t\t{ showBlockToolbarPopover && (\n\t\t\t\t\t<BlockToolbarPopover\n\t\t\t\t\t\t__unstableContentRef={ __unstableContentRef }\n\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\tisTyping={ isTyping }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\n\t\t\t\t{ showBreadcrumb && (\n\t\t\t\t\t<BlockToolbarBreadcrumb\n\t\t\t\t\t\t__unstableContentRef={ __unstableContentRef }\n\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\n\t\t\t\t{ /* Used for the inline rich text toolbar. Until this toolbar is combined into BlockToolbar, someone implementing their own BlockToolbar will also need to use this to see the image caption toolbar. */ }\n\t\t\t\t{ ! isZoomOutMode && ! hasFixedToolbar && (\n\t\t\t\t\t<Popover.Slot\n\t\t\t\t\t\tname=\"block-toolbar\"\n\t\t\t\t\t\tref={ blockToolbarRef }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ children }\n\t\t\t\t{ /* Used for inline rich text popovers. */ }\n\t\t\t\t<Popover.Slot\n\t\t\t\t\tname=\"__unstable-block-tools-after\"\n\t\t\t\t\tref={ blockToolbarAfterRef }\n\t\t\t\t/>\n\t\t\t\t{ isZoomOut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B,CACD,EAECa,cAAc,IACfwB,aAAA,CAAClD,sBAAsB;MACtBoB,oBAAoB,EAAGA,oBAAsB;MAC7CN,QAAQ,EAAGA;IAAU,CACrB,CACD,EAGC,CAAEG,aAAa,IAAI,CAAED,eAAe,IACrCkC,aAAA,CAAC3D,OAAO,CAAC8D,IAAI;MACZC,IAAI,EAAC,eAAe;MACpBC,GAAG,EAAGP;IAAiB,CACvB,CACD,EACC7B,QAAQ,EAEV+B,aAAA,CAAC3D,OAAO,CAAC8D,IAAI;MACZC,IAAI,EAAC,8BAA8B;MACnCC,GAAG,EAAGN;IAAsB,CAC5B,CAAC,EACAhC,aAAa,IACdiC,aAAA,CAAC9C,oBAAoB;MACpBgB,oBAAoB,EAAGA;IAAsB,CAC7C,CAE6B,CAC5B;EAAC;AAER","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["classnames","useSelect","useDispatch","useRef","createContext","useContext","__unstableMotion","motion","useReducedMotion","Inserter","store","blockEditorStore","BlockPopoverInbetween","BlockDropZonePopover","InsertionPointOpenRef","InbetweenInsertionPointPopover","__unstablePopoverSlot","__unstableContentRef","operation","nearestSide","selectBlock","hideInsertionPoint","openRef","ref","orientation","previousClientId","nextClientId","rootClientId","isInserterShown","isDistractionFree","isNavigationMode","select","getBlockOrder","getBlockListSettings","getBlockInsertionPoint","isBlockBeingDragged","getPreviousBlockClientId","getNextBlockClientId","getSettings","_isNavigationMode","insertionPoint","order","length","_previousClientId","index","_nextClientId","settings","__unstableWithInserter","getBlockEditingMode","disableMotion","onClick","event","target","current","maybeHideInserterPoint","onFocus","lineVariants","start","opacity","scale","rest","transition","delay","type","hover","inserterVariants","orientationClassname","className","createElement","div","layout","initial","animate","whileHover","whileTap","exit","tabIndex","onHoverEnd","variants","position","clientId","__experimentalIsQuick","onToggle","isOpen","onSelectOrClose","InsertionPoint","props","isVisible","isBlockListEmpty","isBlockInsertionPointVisible","getBlockCount","blockInsertionPoint","key"],"sources":["@wordpress/block-editor/src/components/block-tools/insertion-point.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useRef, createContext, useContext } from '@wordpress/element';\nimport { __unstableMotion as motion } from '@wordpress/components';\nimport { useReducedMotion } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport Inserter from '../inserter';\nimport { store as blockEditorStore } from '../../store';\nimport BlockPopoverInbetween from '../block-popover/inbetween';\nimport BlockDropZonePopover from '../block-popover/drop-zone';\n\nexport const InsertionPointOpenRef = createContext();\n\nfunction InbetweenInsertionPointPopover( {\n\t__unstablePopoverSlot,\n\t__unstableContentRef,\n\toperation = 'insert',\n\tnearestSide = 'right',\n} ) {\n\tconst { selectBlock, hideInsertionPoint } = useDispatch( blockEditorStore );\n\tconst openRef = useContext( InsertionPointOpenRef );\n\tconst ref = useRef();\n\tconst {\n\t\torientation,\n\t\tpreviousClientId,\n\t\tnextClientId,\n\t\trootClientId,\n\t\tisInserterShown,\n\t\tisDistractionFree,\n\t\tisNavigationMode,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetBlockOrder,\n\t\t\tgetBlockListSettings,\n\t\t\tgetBlockInsertionPoint,\n\t\t\tisBlockBeingDragged,\n\t\t\tgetPreviousBlockClientId,\n\t\t\tgetNextBlockClientId,\n\t\t\tgetSettings,\n\t\t\tisNavigationMode: _isNavigationMode,\n\t\t} = select( blockEditorStore );\n\t\tconst insertionPoint = getBlockInsertionPoint();\n\t\tconst order = getBlockOrder( insertionPoint.rootClientId );\n\n\t\tif ( ! order.length ) {\n\t\t\treturn {};\n\t\t}\n\n\t\tlet _previousClientId = order[ insertionPoint.index - 1 ];\n\t\tlet _nextClientId = order[ insertionPoint.index ];\n\n\t\twhile ( isBlockBeingDragged( _previousClientId ) ) {\n\t\t\t_previousClientId = getPreviousBlockClientId( _previousClientId );\n\t\t}\n\n\t\twhile ( isBlockBeingDragged( _nextClientId ) ) {\n\t\t\t_nextClientId = getNextBlockClientId( _nextClientId );\n\t\t}\n\n\t\tconst settings = getSettings();\n\n\t\treturn {\n\t\t\tpreviousClientId: _previousClientId,\n\t\t\tnextClientId: _nextClientId,\n\t\t\torientation:\n\t\t\t\tgetBlockListSettings( insertionPoint.rootClientId )\n\t\t\t\t\t?.orientation || 'vertical',\n\t\t\trootClientId: insertionPoint.rootClientId,\n\t\t\tisNavigationMode: _isNavigationMode(),\n\t\t\tisDistractionFree: settings.isDistractionFree,\n\t\t\tisInserterShown: insertionPoint?.__unstableWithInserter,\n\t\t};\n\t}, [] );\n\tconst { getBlockEditingMode } = useSelect( blockEditorStore );\n\n\tconst disableMotion = useReducedMotion();\n\n\tfunction onClick( event ) {\n\t\tif (\n\t\t\tevent.target === ref.current &&\n\t\t\tnextClientId &&\n\t\t\tgetBlockEditingMode( nextClientId ) !== 'disabled'\n\t\t) {\n\t\t\tselectBlock( nextClientId, -1 );\n\t\t}\n\t}\n\n\tfunction maybeHideInserterPoint( event ) {\n\t\t// Only hide the inserter if it's triggered on the wrapper,\n\t\t// and the inserter is not open.\n\t\tif ( event.target === ref.current && ! openRef.current ) {\n\t\t\thideInsertionPoint();\n\t\t}\n\t}\n\n\tfunction onFocus( event ) {\n\t\t// Only handle click on the wrapper specifically, and not an event\n\t\t// bubbled from the inserter itself.\n\t\tif ( event.target !== ref.current ) {\n\t\t\topenRef.current = true;\n\t\t}\n\t}\n\n\tconst lineVariants = {\n\t\t// Initial position starts from the center and invisible.\n\t\tstart: {\n\t\t\topacity: 0,\n\t\t\tscale: 0,\n\t\t},\n\t\t// The line expands to fill the container. If the inserter is visible it\n\t\t// is delayed so it appears orchestrated.\n\t\trest: {\n\t\t\topacity: 1,\n\t\t\tscale: 1,\n\t\t\ttransition: { delay: isInserterShown ? 0.5 : 0, type: 'tween' },\n\t\t},\n\t\thover: {\n\t\t\topacity: 1,\n\t\t\tscale: 1,\n\t\t\ttransition: { delay: 0.5, type: 'tween' },\n\t\t},\n\t};\n\n\tconst inserterVariants = {\n\t\tstart: {\n\t\t\tscale: disableMotion ? 1 : 0,\n\t\t},\n\t\trest: {\n\t\t\tscale: 1,\n\t\t\ttransition: { delay: 0.4, type: 'tween' },\n\t\t},\n\t};\n\n\tif ( isDistractionFree && ! isNavigationMode ) {\n\t\treturn null;\n\t}\n\n\tconst orientationClassname =\n\t\torientation === 'horizontal' || operation === 'group'\n\t\t\t? 'is-horizontal'\n\t\t\t: 'is-vertical';\n\n\tconst className = classnames(\n\t\t'block-editor-block-list__insertion-point',\n\t\torientationClassname\n\t);\n\n\treturn (\n\t\t<BlockPopoverInbetween\n\t\t\tpreviousClientId={ previousClientId }\n\t\t\tnextClientId={ nextClientId }\n\t\t\t__unstablePopoverSlot={ __unstablePopoverSlot }\n\t\t\t__unstableContentRef={ __unstableContentRef }\n\t\t\toperation={ operation }\n\t\t\tnearestSide={ nearestSide }\n\t\t>\n\t\t\t<motion.div\n\t\t\t\tlayout={ ! disableMotion }\n\t\t\t\tinitial={ disableMotion ? 'rest' : 'start' }\n\t\t\t\tanimate=\"rest\"\n\t\t\t\twhileHover=\"hover\"\n\t\t\t\twhileTap=\"pressed\"\n\t\t\t\texit=\"start\"\n\t\t\t\tref={ ref }\n\t\t\t\ttabIndex={ -1 }\n\t\t\t\tonClick={ onClick }\n\t\t\t\tonFocus={ onFocus }\n\t\t\t\tclassName={ classnames( className, {\n\t\t\t\t\t'is-with-inserter': isInserterShown,\n\t\t\t\t} ) }\n\t\t\t\tonHoverEnd={ maybeHideInserterPoint }\n\t\t\t>\n\t\t\t\t<motion.div\n\t\t\t\t\tvariants={ lineVariants }\n\t\t\t\t\tclassName=\"block-editor-block-list__insertion-point-indicator\"\n\t\t\t\t\tdata-testid=\"block-list-insertion-point-indicator\"\n\t\t\t\t/>\n\t\t\t\t{ isInserterShown && (\n\t\t\t\t\t<motion.div\n\t\t\t\t\t\tvariants={ inserterVariants }\n\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t'block-editor-block-list__insertion-point-inserter'\n\t\t\t\t\t\t) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Inserter\n\t\t\t\t\t\t\tposition=\"bottom center\"\n\t\t\t\t\t\t\tclientId={ nextClientId }\n\t\t\t\t\t\t\trootClientId={ rootClientId }\n\t\t\t\t\t\t\t__experimentalIsQuick\n\t\t\t\t\t\t\tonToggle={ ( isOpen ) => {\n\t\t\t\t\t\t\t\topenRef.current = isOpen;\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tonSelectOrClose={ () => {\n\t\t\t\t\t\t\t\topenRef.current = false;\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</motion.div>\n\t\t\t\t) }\n\t\t\t</motion.div>\n\t\t</BlockPopoverInbetween>\n\t);\n}\n\nexport default function InsertionPoint( props ) {\n\tconst { insertionPoint, isVisible, isBlockListEmpty } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockInsertionPoint,\n\t\t\t\tisBlockInsertionPointVisible,\n\t\t\t\tgetBlockCount,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst blockInsertionPoint = getBlockInsertionPoint();\n\t\t\treturn {\n\t\t\t\tinsertionPoint: blockInsertionPoint,\n\t\t\t\tisVisible: isBlockInsertionPointVisible(),\n\t\t\t\tisBlockListEmpty:\n\t\t\t\t\tgetBlockCount( blockInsertionPoint?.rootClientId ) === 0,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tif (\n\t\t! isVisible ||\n\t\t// Don't render the insertion point if the block list is empty.\n\t\t// The insertion point will be represented by the appender instead.\n\t\tisBlockListEmpty\n\t) {\n\t\treturn null;\n\t}\n\n\t/**\n\t * Render a popover that overlays the block when the desired operation is to replace it.\n\t * Otherwise, render a popover in between blocks for the indication of inserting between them.\n\t */\n\treturn insertionPoint.operation === 'replace' ? (\n\t\t<BlockDropZonePopover\n\t\t\t// Force remount to trigger the animation.\n\t\t\tkey={ `${ insertionPoint.rootClientId }-${ insertionPoint.index }` }\n\t\t\t{ ...props }\n\t\t/>\n\t) : (\n\t\t<InbetweenInsertionPointPopover\n\t\t\toperation={ insertionPoint.operation }\n\t\t\tnearestSide={ insertionPoint.nearestSide }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,MAAM,EAAEC,aAAa,EAAEC,UAAU,QAAQ,oBAAoB;AACtE,SAASC,gBAAgB,IAAIC,MAAM,QAAQ,uBAAuB;AAClE,SAASC,gBAAgB,QAAQ,oBAAoB;;AAErD;AACA;AACA;AACA,OAAOC,QAAQ,MAAM,aAAa;AAClC,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,OAAOC,qBAAqB,MAAM,4BAA4B;AAC9D,OAAOC,oBAAoB,MAAM,4BAA4B;AAE7D,OAAO,MAAMC,qBAAqB,GAAGV,aAAa,CAAC,CAAC;AAEpD,SAASW,8BAA8BA,CAAE;EACxCC,qBAAqB;EACrBC,oBAAoB;EACpBC,SAAS,GAAG,QAAQ;EACpBC,WAAW,GAAG;AACf,CAAC,EAAG;EACH,MAAM;IAAEC,WAAW;IAAEC;EAAmB,CAAC,GAAGnB,WAAW,CAAES,gBAAiB,CAAC;EAC3E,MAAMW,OAAO,GAAGjB,UAAU,CAAES,qBAAsB,CAAC;EACnD,MAAMS,GAAG,GAAGpB,MAAM,CAAC,CAAC;EACpB,MAAM;IACLqB,WAAW;IACXC,gBAAgB;IAChBC,YAAY;IACZC,YAAY;IACZC,eAAe;IACfC,iBAAiB;IACjBC;EACD,CAAC,GAAG7B,SAAS,CAAI8B,MAAM,IAAM;IAC5B,MAAM;MACLC,aAAa;MACbC,oBAAoB;MACpBC,sBAAsB;MACtBC,mBAAmB;MACnBC,wBAAwB;MAC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ACzBC,YAAY,EAAGA,YAAc;IAC7BsD,qBAAqB;IACrBC,QAAQ,EAAKC,MAAM,IAAM;MACxB7D,OAAO,CAAC+B,OAAO,GAAG8B,MAAM;IACzB,CAAG;IACHC,eAAe,EAAGA,CAAA,KAAM;MACvB9D,OAAO,CAAC+B,OAAO,GAAG,KAAK;IACxB;EAAG,CACH,CACU,CAEF,CACU,CAAC;AAE1B;AAEA,eAAe,SAASgC,cAAcA,CAAEC,KAAK,EAAG;EAC/C,MAAM;IAAE9C,cAAc;IAAE+C,SAAS;IAAEC;EAAiB,CAAC,GAAGvF,SAAS,CAC9D8B,MAAM,IAAM;IACb,MAAM;MACLG,sBAAsB;MACtBuD,4BAA4B;MAC5BC;IACD,CAAC,GAAG3D,MAAM,CAAEpB,gBAAiB,CAAC;IAC9B,MAAMgF,mBAAmB,GAAGzD,sBAAsB,CAAC,CAAC;IACpD,OAAO;MACNM,cAAc,EAAEmD,mBAAmB;MACnCJ,SAAS,EAAEE,4BAA4B,CAAC,CAAC;MACzCD,gBAAgB,EACfE,aAAa,CAAEC,mBAAmB,EAAEhE,YAAa,CAAC,KAAK;IACzD,CAAC;EACF,CAAC,EACD,EACD,CAAC;EAED,IACC,CAAE4D,SAAS;EACX;EACA;EACAC,gBAAgB,EACf;IACD,OAAO,IAAI;EACZ;;EAEA;AACD;AACA;AACA;EACC,OAAOhD,cAAc,CAACtB,SAAS,KAAK,SAAS,GAC5CkD,aAAA,CAACvD;EACA;EAAA;IACA+E,GAAG,EAAI,GAAGpD,cAAc,CAACb,YAAc,IAAIa,cAAc,CAACI,KAAO,EAAG;IAAA,GAC/D0C;EAAK,CACV,CAAC,GAEFlB,aAAA,CAACrD,8BAA8B;IAC9BG,SAAS,EAAGsB,cAAc,CAACtB,SAAW;IACtCC,WAAW,EAAGqB,cAAc,CAACrB,WAAa;IAAA,GACrCmE;EAAK,CACV,CACD;AACF"}
|
|
1
|
+
{"version":3,"names":["classnames","useSelect","useDispatch","useRef","createContext","useContext","__unstableMotion","motion","useReducedMotion","Inserter","store","blockEditorStore","BlockPopoverInbetween","BlockDropZonePopover","InsertionPointOpenRef","InbetweenInsertionPointPopover","__unstablePopoverSlot","__unstableContentRef","operation","nearestSide","selectBlock","hideInsertionPoint","openRef","ref","orientation","previousClientId","nextClientId","rootClientId","isInserterShown","isDistractionFree","isNavigationMode","select","getBlockOrder","getBlockListSettings","getBlockInsertionPoint","isBlockBeingDragged","getPreviousBlockClientId","getNextBlockClientId","getSettings","_isNavigationMode","insertionPoint","order","length","_previousClientId","index","_nextClientId","settings","__unstableWithInserter","getBlockEditingMode","disableMotion","onClick","event","target","current","maybeHideInserterPoint","onFocus","lineVariants","start","opacity","scale","rest","transition","delay","type","hover","inserterVariants","orientationClassname","className","createElement","div","layout","initial","animate","whileHover","whileTap","exit","tabIndex","onHoverEnd","variants","position","clientId","__experimentalIsQuick","onToggle","isOpen","onSelectOrClose","InsertionPoint","props","isVisible","isBlockListEmpty","isBlockInsertionPointVisible","getBlockCount","blockInsertionPoint","key"],"sources":["@wordpress/block-editor/src/components/block-tools/insertion-point.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useRef, createContext, useContext } from '@wordpress/element';\nimport { __unstableMotion as motion } from '@wordpress/components';\nimport { useReducedMotion } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport Inserter from '../inserter';\nimport { store as blockEditorStore } from '../../store';\nimport BlockPopoverInbetween from '../block-popover/inbetween';\nimport BlockDropZonePopover from '../block-popover/drop-zone';\n\nexport const InsertionPointOpenRef = createContext();\n\nfunction InbetweenInsertionPointPopover( {\n\t__unstablePopoverSlot,\n\t__unstableContentRef,\n\toperation = 'insert',\n\tnearestSide = 'right',\n} ) {\n\tconst { selectBlock, hideInsertionPoint } = useDispatch( blockEditorStore );\n\tconst openRef = useContext( InsertionPointOpenRef );\n\tconst ref = useRef();\n\tconst {\n\t\torientation,\n\t\tpreviousClientId,\n\t\tnextClientId,\n\t\trootClientId,\n\t\tisInserterShown,\n\t\tisDistractionFree,\n\t\tisNavigationMode,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetBlockOrder,\n\t\t\tgetBlockListSettings,\n\t\t\tgetBlockInsertionPoint,\n\t\t\tisBlockBeingDragged,\n\t\t\tgetPreviousBlockClientId,\n\t\t\tgetNextBlockClientId,\n\t\t\tgetSettings,\n\t\t\tisNavigationMode: _isNavigationMode,\n\t\t} = select( blockEditorStore );\n\t\tconst insertionPoint = getBlockInsertionPoint();\n\t\tconst order = getBlockOrder( insertionPoint.rootClientId );\n\n\t\tif ( ! order.length ) {\n\t\t\treturn {};\n\t\t}\n\n\t\tlet _previousClientId = order[ insertionPoint.index - 1 ];\n\t\tlet _nextClientId = order[ insertionPoint.index ];\n\n\t\twhile ( isBlockBeingDragged( _previousClientId ) ) {\n\t\t\t_previousClientId = getPreviousBlockClientId( _previousClientId );\n\t\t}\n\n\t\twhile ( isBlockBeingDragged( _nextClientId ) ) {\n\t\t\t_nextClientId = getNextBlockClientId( _nextClientId );\n\t\t}\n\n\t\tconst settings = getSettings();\n\n\t\treturn {\n\t\t\tpreviousClientId: _previousClientId,\n\t\t\tnextClientId: _nextClientId,\n\t\t\torientation:\n\t\t\t\tgetBlockListSettings( insertionPoint.rootClientId )\n\t\t\t\t\t?.orientation || 'vertical',\n\t\t\trootClientId: insertionPoint.rootClientId,\n\t\t\tisNavigationMode: _isNavigationMode(),\n\t\t\tisDistractionFree: settings.isDistractionFree,\n\t\t\tisInserterShown: insertionPoint?.__unstableWithInserter,\n\t\t};\n\t}, [] );\n\tconst { getBlockEditingMode } = useSelect( blockEditorStore );\n\n\tconst disableMotion = useReducedMotion();\n\n\tfunction onClick( event ) {\n\t\tif (\n\t\t\tevent.target === ref.current &&\n\t\t\tnextClientId &&\n\t\t\tgetBlockEditingMode( nextClientId ) !== 'disabled'\n\t\t) {\n\t\t\tselectBlock( nextClientId, -1 );\n\t\t}\n\t}\n\n\tfunction maybeHideInserterPoint( event ) {\n\t\t// Only hide the inserter if it's triggered on the wrapper,\n\t\t// and the inserter is not open.\n\t\tif ( event.target === ref.current && ! openRef.current ) {\n\t\t\thideInsertionPoint();\n\t\t}\n\t}\n\n\tfunction onFocus( event ) {\n\t\t// Only handle click on the wrapper specifically, and not an event\n\t\t// bubbled from the inserter itself.\n\t\tif ( event.target !== ref.current ) {\n\t\t\topenRef.current = true;\n\t\t}\n\t}\n\n\tconst lineVariants = {\n\t\t// Initial position starts from the center and invisible.\n\t\tstart: {\n\t\t\topacity: 0,\n\t\t\tscale: 0,\n\t\t},\n\t\t// The line expands to fill the container. If the inserter is visible it\n\t\t// is delayed so it appears orchestrated.\n\t\trest: {\n\t\t\topacity: 1,\n\t\t\tscale: 1,\n\t\t\ttransition: { delay: isInserterShown ? 0.5 : 0, type: 'tween' },\n\t\t},\n\t\thover: {\n\t\t\topacity: 1,\n\t\t\tscale: 1,\n\t\t\ttransition: { delay: 0.5, type: 'tween' },\n\t\t},\n\t};\n\n\tconst inserterVariants = {\n\t\tstart: {\n\t\t\tscale: disableMotion ? 1 : 0,\n\t\t},\n\t\trest: {\n\t\t\tscale: 1,\n\t\t\ttransition: { delay: 0.4, type: 'tween' },\n\t\t},\n\t};\n\n\tif ( isDistractionFree && ! isNavigationMode ) {\n\t\treturn null;\n\t}\n\n\tconst orientationClassname =\n\t\torientation === 'horizontal' || operation === 'group'\n\t\t\t? 'is-horizontal'\n\t\t\t: 'is-vertical';\n\n\tconst className = classnames(\n\t\t'block-editor-block-list__insertion-point',\n\t\torientationClassname\n\t);\n\n\treturn (\n\t\t<BlockPopoverInbetween\n\t\t\tpreviousClientId={ previousClientId }\n\t\t\tnextClientId={ nextClientId }\n\t\t\t__unstablePopoverSlot={ __unstablePopoverSlot }\n\t\t\t__unstableContentRef={ __unstableContentRef }\n\t\t\toperation={ operation }\n\t\t\tnearestSide={ nearestSide }\n\t\t>\n\t\t\t<motion.div\n\t\t\t\tlayout={ ! disableMotion }\n\t\t\t\tinitial={ disableMotion ? 'rest' : 'start' }\n\t\t\t\tanimate=\"rest\"\n\t\t\t\twhileHover=\"hover\"\n\t\t\t\twhileTap=\"pressed\"\n\t\t\t\texit=\"start\"\n\t\t\t\tref={ ref }\n\t\t\t\ttabIndex={ -1 }\n\t\t\t\tonClick={ onClick }\n\t\t\t\tonFocus={ onFocus }\n\t\t\t\tclassName={ classnames( className, {\n\t\t\t\t\t'is-with-inserter': isInserterShown,\n\t\t\t\t} ) }\n\t\t\t\tonHoverEnd={ maybeHideInserterPoint }\n\t\t\t>\n\t\t\t\t<motion.div\n\t\t\t\t\tvariants={ lineVariants }\n\t\t\t\t\tclassName=\"block-editor-block-list__insertion-point-indicator\"\n\t\t\t\t\tdata-testid=\"block-list-insertion-point-indicator\"\n\t\t\t\t/>\n\t\t\t\t{ isInserterShown && (\n\t\t\t\t\t<motion.div\n\t\t\t\t\t\tvariants={ inserterVariants }\n\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t'block-editor-block-list__insertion-point-inserter'\n\t\t\t\t\t\t) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Inserter\n\t\t\t\t\t\t\tposition=\"bottom center\"\n\t\t\t\t\t\t\tclientId={ nextClientId }\n\t\t\t\t\t\t\trootClientId={ rootClientId }\n\t\t\t\t\t\t\t__experimentalIsQuick\n\t\t\t\t\t\t\tonToggle={ ( isOpen ) => {\n\t\t\t\t\t\t\t\topenRef.current = isOpen;\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tonSelectOrClose={ () => {\n\t\t\t\t\t\t\t\topenRef.current = false;\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</motion.div>\n\t\t\t\t) }\n\t\t\t</motion.div>\n\t\t</BlockPopoverInbetween>\n\t);\n}\n\nexport default function InsertionPoint( props ) {\n\tconst { insertionPoint, isVisible, isBlockListEmpty } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockInsertionPoint,\n\t\t\t\tisBlockInsertionPointVisible,\n\t\t\t\tgetBlockCount,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst blockInsertionPoint = getBlockInsertionPoint();\n\t\t\treturn {\n\t\t\t\tinsertionPoint: blockInsertionPoint,\n\t\t\t\tisVisible: isBlockInsertionPointVisible(),\n\t\t\t\tisBlockListEmpty:\n\t\t\t\t\tgetBlockCount( blockInsertionPoint?.rootClientId ) === 0,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tif (\n\t\t! isVisible ||\n\t\t// Don't render the insertion point if the block list is empty.\n\t\t// The insertion point will be represented by the appender instead.\n\t\tisBlockListEmpty\n\t) {\n\t\treturn null;\n\t}\n\n\t/**\n\t * Render a popover that overlays the block when the desired operation is to replace it.\n\t * Otherwise, render a popover in between blocks for the indication of inserting between them.\n\t */\n\treturn insertionPoint.operation === 'replace' ? (\n\t\t<BlockDropZonePopover\n\t\t\t// Force remount to trigger the animation.\n\t\t\tkey={ `${ insertionPoint.rootClientId }-${ insertionPoint.index }` }\n\t\t\t{ ...props }\n\t\t/>\n\t) : (\n\t\t<InbetweenInsertionPointPopover\n\t\t\toperation={ insertionPoint.operation }\n\t\t\tnearestSide={ insertionPoint.nearestSide }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,MAAM,EAAEC,aAAa,EAAEC,UAAU,QAAQ,oBAAoB;AACtE,SAASC,gBAAgB,IAAIC,MAAM,QAAQ,uBAAuB;AAClE,SAASC,gBAAgB,QAAQ,oBAAoB;;AAErD;AACA;AACA;AACA,OAAOC,QAAQ,MAAM,aAAa;AAClC,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,OAAOC,qBAAqB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ACnCJ,SAAS,EAAEE,4BAA4B,CAAC,CAAC;MACzCD,gBAAgB,EACfE,aAAa,CAAEC,mBAAmB,EAAEhE,YAAa,CAAC,KAAK;IACzD,CAAC;EACF,CAAC,EACD,EACD,CAAC;EAED,IACC,CAAE4D,SAAS;EACX;EACA;EACAC,gBAAgB,EACf;IACD,OAAO,IAAI;EACZ;;EAEA;AACD;AACA;AACA;EACC,OAAOhD,cAAc,CAACtB,SAAS,KAAK,SAAS,GAC5CkD,aAAA,CAACvD;EACA;EAAA;IACA+E,GAAG,EAAI,GAAGpD,cAAc,CAACb,YAAc,IAAIa,cAAc,CAACI,KAAO,EAAG;IAAA,GAC/D0C;EAAK,CACV,CAAC,GAEFlB,aAAA,CAACrD,8BAA8B;IAC9BG,SAAS,EAAGsB,cAAc,CAACtB,SAAW;IACtCC,WAAW,EAAGqB,cAAc,CAACrB,WAAa;IAAA,GACrCmE;EAAK,CACV,CACD;AACF","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useRefEffect","useSelect","getScrollContainer","useCallback","useLayoutEffect","useMemo","useState","store","blockEditorStore","__unstableUseBlockElement","useBlockElement","hasStickyOrFixedPositionValue","COMMON_PROPS","placement","DEFAULT_PROPS","flip","shift","RESTRICTED_HEIGHT_PROPS","getProps","contentElement","selectedBlockElement","scrollContainer","toolbarHeight","isSticky","scrollTop","blockRect","getBoundingClientRect","contentRect","topOfContentElementInViewport","top","viewportHeight","ownerDocument","documentElement","clientHeight","restrictedTopArea","hasSpaceForToolbarAbove","isBlockTallerThanViewport","height","useBlockToolbarPopoverProps","clientId","setToolbarHeight","blockIndex","select","getBlockIndex","getBlockAttributes","props","setProps","popoverRef","popoverNode","offsetHeight","updateProps","contentView","defaultView","addEventHandler","resizeObserver","blockView","ResizeObserver","observe","removeEventHandler","disconnect","ref"],"sources":["@wordpress/block-editor/src/components/block-tools/use-block-toolbar-popover-props.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useRefEffect } from '@wordpress/compose';\nimport { useSelect } from '@wordpress/data';\nimport { getScrollContainer } from '@wordpress/dom';\nimport {\n\tuseCallback,\n\tuseLayoutEffect,\n\tuseMemo,\n\tuseState,\n} from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport { __unstableUseBlockElement as useBlockElement } from '../block-list/use-block-props/use-block-refs';\nimport { hasStickyOrFixedPositionValue } from '../../hooks/position';\n\nconst COMMON_PROPS = {\n\tplacement: 'top-start',\n};\n\n// By default the toolbar sets the `shift` prop. If the user scrolls the page\n// down the toolbar will stay on screen by adopting a sticky position at the\n// top of the viewport.\nconst DEFAULT_PROPS = {\n\t...COMMON_PROPS,\n\tflip: false,\n\tshift: true,\n};\n\n// When there isn't enough height between the top of the block and the editor\n// canvas, the `shift` prop is set to `false`, as it will cause the block to be\n// obscured. The `flip` behavior is enabled, which positions the toolbar below\n// the block. This only happens if the block is smaller than the viewport, as\n// otherwise the toolbar will be off-screen.\nconst RESTRICTED_HEIGHT_PROPS = {\n\t...COMMON_PROPS,\n\tflip: true,\n\tshift: false,\n};\n\n/**\n * Get the popover props for the block toolbar, determined by the space at the top of the canvas and the toolbar height.\n *\n * @param {Element} contentElement The DOM element that represents the editor content or canvas.\n * @param {Element} selectedBlockElement The outer DOM element of the first selected block.\n * @param {Element} scrollContainer The scrollable container for the contentElement.\n * @param {number} toolbarHeight The height of the toolbar in pixels.\n * @param {boolean} isSticky Whether or not the selected block is sticky or fixed.\n *\n * @return {Object} The popover props used to determine the position of the toolbar.\n */\nfunction getProps(\n\tcontentElement,\n\tselectedBlockElement,\n\tscrollContainer,\n\ttoolbarHeight,\n\tisSticky\n) {\n\tif ( ! contentElement || ! selectedBlockElement ) {\n\t\treturn DEFAULT_PROPS;\n\t}\n\n\t// Get how far the content area has been scrolled.\n\tconst scrollTop = scrollContainer?.scrollTop || 0;\n\n\tconst blockRect = selectedBlockElement.getBoundingClientRect();\n\tconst contentRect = contentElement.getBoundingClientRect();\n\n\t// Get the vertical position of top of the visible content area.\n\tconst topOfContentElementInViewport = scrollTop + contentRect.top;\n\n\t// The document element's clientHeight represents the viewport height.\n\tconst viewportHeight =\n\t\tcontentElement.ownerDocument.documentElement.clientHeight;\n\n\t// The restricted height area is calculated as the sum of the\n\t// vertical position of the visible content area, plus the height\n\t// of the block toolbar.\n\tconst restrictedTopArea = topOfContentElementInViewport + toolbarHeight;\n\tconst hasSpaceForToolbarAbove = blockRect.top > restrictedTopArea;\n\n\tconst isBlockTallerThanViewport =\n\t\tblockRect.height > viewportHeight - toolbarHeight;\n\n\t// Sticky blocks are treated as if they will never have enough space for the toolbar above.\n\tif (\n\t\t! isSticky &&\n\t\t( hasSpaceForToolbarAbove || isBlockTallerThanViewport )\n\t) {\n\t\treturn DEFAULT_PROPS;\n\t}\n\n\treturn RESTRICTED_HEIGHT_PROPS;\n}\n\n/**\n * Determines the desired popover positioning behavior, returning a set of appropriate props.\n *\n * @param {Object} elements\n * @param {Element} elements.contentElement The DOM element that represents the editor content or canvas.\n * @param {string} elements.clientId The clientId of the first selected block.\n *\n * @return {Object} The popover props used to determine the position of the toolbar.\n */\nexport default function useBlockToolbarPopoverProps( {\n\tcontentElement,\n\tclientId,\n} ) {\n\tconst selectedBlockElement = useBlockElement( clientId );\n\tconst [ toolbarHeight, setToolbarHeight ] = useState( 0 );\n\tconst { blockIndex, isSticky } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockIndex, getBlockAttributes } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\treturn {\n\t\t\t\tblockIndex: getBlockIndex( clientId ),\n\t\t\t\tisSticky: hasStickyOrFixedPositionValue(\n\t\t\t\t\tgetBlockAttributes( clientId )\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\tconst scrollContainer = useMemo( () => {\n\t\tif ( ! contentElement ) {\n\t\t\treturn;\n\t\t}\n\t\treturn getScrollContainer( contentElement );\n\t}, [ contentElement ] );\n\tconst [ props, setProps ] = useState( () =>\n\t\tgetProps(\n\t\t\tcontentElement,\n\t\t\tselectedBlockElement,\n\t\t\tscrollContainer,\n\t\t\ttoolbarHeight,\n\t\t\tisSticky\n\t\t)\n\t);\n\n\tconst popoverRef = useRefEffect( ( popoverNode ) => {\n\t\tsetToolbarHeight( popoverNode.offsetHeight );\n\t}, [] );\n\n\tconst updateProps = useCallback(\n\t\t() =>\n\t\t\tsetProps(\n\t\t\t\tgetProps(\n\t\t\t\t\tcontentElement,\n\t\t\t\t\tselectedBlockElement,\n\t\t\t\t\tscrollContainer,\n\t\t\t\t\ttoolbarHeight,\n\t\t\t\t\tisSticky\n\t\t\t\t)\n\t\t\t),\n\t\t[ contentElement, selectedBlockElement, scrollContainer, toolbarHeight ]\n\t);\n\n\t// Update props when the block is moved. This also ensures the props are\n\t// correct on initial mount, and when the selected block or content element\n\t// changes (since the callback ref will update).\n\tuseLayoutEffect( updateProps, [ blockIndex, updateProps ] );\n\n\t// Update props when the viewport is resized or the block is resized.\n\tuseLayoutEffect( () => {\n\t\tif ( ! contentElement || ! selectedBlockElement ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Update the toolbar props on viewport resize.\n\t\tconst contentView = contentElement?.ownerDocument?.defaultView;\n\t\tcontentView?.addEventHandler?.( 'resize', updateProps );\n\n\t\t// Update the toolbar props on block resize.\n\t\tlet resizeObserver;\n\t\tconst blockView = selectedBlockElement?.ownerDocument?.defaultView;\n\t\tif ( blockView.ResizeObserver ) {\n\t\t\tresizeObserver = new blockView.ResizeObserver( updateProps );\n\t\t\tresizeObserver.observe( selectedBlockElement );\n\t\t}\n\n\t\treturn () => {\n\t\t\tcontentView?.removeEventHandler?.( 'resize', updateProps );\n\n\t\t\tif ( resizeObserver ) {\n\t\t\t\tresizeObserver.disconnect();\n\t\t\t}\n\t\t};\n\t}, [ updateProps, contentElement, selectedBlockElement ] );\n\n\treturn {\n\t\t...props,\n\t\tref: popoverRef,\n\t};\n}\n"],"mappings":"AAA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er","useCallback","useLayoutEffect","useMemo","useState","store","blockEditorStore","__unstableUseBlockElement","useBlockElement","hasStickyOrFixedPositionValue","COMMON_PROPS","placement","DEFAULT_PROPS","flip","shift","RESTRICTED_HEIGHT_PROPS","getProps","contentElement","selectedBlockElement","scrollContainer","toolbarHeight","isSticky","scrollTop","blockRect","getBoundingClientRect","contentRect","topOfContentElementInViewport","top","viewportHeight","ownerDocument","documentElement","clientHeight","restrictedTopArea","hasSpaceForToolbarAbove","isBlockTallerThanViewport","height","useBlockToolbarPopoverProps","clientId","setToolbarHeight","blockIndex","select","getBlockIndex","getBlockAttributes","props","setProps","popoverRef","popoverNode","offsetHeight","updateProps","contentView","defaultView","addEventHandler","resizeObserver","blockView","ResizeObserver","observe","removeEventHandler","disconnect","ref"],"sources":["@wordpress/block-editor/src/components/block-tools/use-block-toolbar-popover-props.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useRefEffect } from '@wordpress/compose';\nimport { useSelect } from '@wordpress/data';\nimport { getScrollContainer } from '@wordpress/dom';\nimport {\n\tuseCallback,\n\tuseLayoutEffect,\n\tuseMemo,\n\tuseState,\n} from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport { __unstableUseBlockElement as useBlockElement } from '../block-list/use-block-props/use-block-refs';\nimport { hasStickyOrFixedPositionValue } from '../../hooks/position';\n\nconst COMMON_PROPS = {\n\tplacement: 'top-start',\n};\n\n// By default the toolbar sets the `shift` prop. If the user scrolls the page\n// down the toolbar will stay on screen by adopting a sticky position at the\n// top of the viewport.\nconst DEFAULT_PROPS = {\n\t...COMMON_PROPS,\n\tflip: false,\n\tshift: true,\n};\n\n// When there isn't enough height between the top of the block and the editor\n// canvas, the `shift` prop is set to `false`, as it will cause the block to be\n// obscured. The `flip` behavior is enabled, which positions the toolbar below\n// the block. This only happens if the block is smaller than the viewport, as\n// otherwise the toolbar will be off-screen.\nconst RESTRICTED_HEIGHT_PROPS = {\n\t...COMMON_PROPS,\n\tflip: true,\n\tshift: false,\n};\n\n/**\n * Get the popover props for the block toolbar, determined by the space at the top of the canvas and the toolbar height.\n *\n * @param {Element} contentElement The DOM element that represents the editor content or canvas.\n * @param {Element} selectedBlockElement The outer DOM element of the first selected block.\n * @param {Element} scrollContainer The scrollable container for the contentElement.\n * @param {number} toolbarHeight The height of the toolbar in pixels.\n * @param {boolean} isSticky Whether or not the selected block is sticky or fixed.\n *\n * @return {Object} The popover props used to determine the position of the toolbar.\n */\nfunction getProps(\n\tcontentElement,\n\tselectedBlockElement,\n\tscrollContainer,\n\ttoolbarHeight,\n\tisSticky\n) {\n\tif ( ! contentElement || ! selectedBlockElement ) {\n\t\treturn DEFAULT_PROPS;\n\t}\n\n\t// Get how far the content area has been scrolled.\n\tconst scrollTop = scrollContainer?.scrollTop || 0;\n\n\tconst blockRect = selectedBlockElement.getBoundingClientRect();\n\tconst contentRect = contentElement.getBoundingClientRect();\n\n\t// Get the vertical position of top of the visible content area.\n\tconst topOfContentElementInViewport = scrollTop + contentRect.top;\n\n\t// The document element's clientHeight represents the viewport height.\n\tconst viewportHeight =\n\t\tcontentElement.ownerDocument.documentElement.clientHeight;\n\n\t// The restricted height area is calculated as the sum of the\n\t// vertical position of the visible content area, plus the height\n\t// of the block toolbar.\n\tconst restrictedTopArea = topOfContentElementInViewport + toolbarHeight;\n\tconst hasSpaceForToolbarAbove = blockRect.top > restrictedTopArea;\n\n\tconst isBlockTallerThanViewport =\n\t\tblockRect.height > viewportHeight - toolbarHeight;\n\n\t// Sticky blocks are treated as if they will never have enough space for the toolbar above.\n\tif (\n\t\t! isSticky &&\n\t\t( hasSpaceForToolbarAbove || isBlockTallerThanViewport )\n\t) {\n\t\treturn DEFAULT_PROPS;\n\t}\n\n\treturn RESTRICTED_HEIGHT_PROPS;\n}\n\n/**\n * Determines the desired popover positioning behavior, returning a set of appropriate props.\n *\n * @param {Object} elements\n * @param {Element} elements.contentElement The DOM element that represents the editor content or canvas.\n * @param {string} elements.clientId The clientId of the first selected block.\n *\n * @return {Object} The popover props used to determine the position of the toolbar.\n */\nexport default function useBlockToolbarPopoverProps( {\n\tcontentElement,\n\tclientId,\n} ) {\n\tconst selectedBlockElement = useBlockElement( clientId );\n\tconst [ toolbarHeight, setToolbarHeight ] = useState( 0 );\n\tconst { blockIndex, isSticky } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockIndex, getBlockAttributes } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\treturn {\n\t\t\t\tblockIndex: getBlockIndex( clientId ),\n\t\t\t\tisSticky: hasStickyOrFixedPositionValue(\n\t\t\t\t\tgetBlockAttributes( clientId )\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\tconst scrollContainer = useMemo( () => {\n\t\tif ( ! contentElement ) {\n\t\t\treturn;\n\t\t}\n\t\treturn getScrollContainer( contentElement );\n\t}, [ contentElement ] );\n\tconst [ props, setProps ] = useState( () =>\n\t\tgetProps(\n\t\t\tcontentElement,\n\t\t\tselectedBlockElement,\n\t\t\tscrollContainer,\n\t\t\ttoolbarHeight,\n\t\t\tisSticky\n\t\t)\n\t);\n\n\tconst popoverRef = useRefEffect( ( popoverNode ) => {\n\t\tsetToolbarHeight( popoverNode.offsetHeight );\n\t}, [] );\n\n\tconst updateProps = useCallback(\n\t\t() =>\n\t\t\tsetProps(\n\t\t\t\tgetProps(\n\t\t\t\t\tcontentElement,\n\t\t\t\t\tselectedBlockElement,\n\t\t\t\t\tscrollContainer,\n\t\t\t\t\ttoolbarHeight,\n\t\t\t\t\tisSticky\n\t\t\t\t)\n\t\t\t),\n\t\t[ contentElement, selectedBlockElement, scrollContainer, toolbarHeight ]\n\t);\n\n\t// Update props when the block is moved. This also ensures the props are\n\t// correct on initial mount, and when the selected block or content element\n\t// changes (since the callback ref will update).\n\tuseLayoutEffect( updateProps, [ blockIndex, updateProps ] );\n\n\t// Update props when the viewport is resized or the block is resized.\n\tuseLayoutEffect( () => {\n\t\tif ( ! contentElement || ! selectedBlockElement ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Update the toolbar props on viewport resize.\n\t\tconst contentView = contentElement?.ownerDocument?.defaultView;\n\t\tcontentView?.addEventHandler?.( 'resize', updateProps );\n\n\t\t// Update the toolbar props on block resize.\n\t\tlet resizeObserver;\n\t\tconst blockView = selectedBlockElement?.ownerDocument?.defaultView;\n\t\tif ( blockView.ResizeObserver ) {\n\t\t\tresizeObserver = new blockView.ResizeObserver( updateProps );\n\t\t\tresizeObserver.observe( selectedBlockElement );\n\t\t}\n\n\t\treturn () => {\n\t\t\tcontentView?.removeEventHandler?.( 'resize', updateProps );\n\n\t\t\tif ( resizeObserver ) {\n\t\t\t\tresizeObserver.disconnect();\n\t\t\t}\n\t\t};\n\t}, [ updateProps, contentElement, selectedBlockElement ] );\n\n\treturn {\n\t\t...props,\n\t\tref: popoverRef,\n\t};\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,YAAY,QAAQ,oBAAoB;AACjD,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,kBAAkB,QAAQ,gBAAgB;AACnD,SACCC,WAAW,EACXC,eAAe,EACfC,OAAO,EACPC,QAAQ,QACF,oBAAoB;;AAE3B;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,SAASC,yBAAyB,IAAIC,eAAe,QAAQ,8CAA8C;AAC3G,SAASC,6BAA6B,QAAQ,sBAAsB;AAEpE,MAAMC,YAAY,GAAG;EACpBC,SAAS,EAAE;AACZ,CAAC;;AAED;AACA;AACA;AACA,MAAMC,aAAa,GAAG;EACrB,GAAGF,YAAY;EACfG,IAAI,EAAE,KAAK;EACXC,KAAK,EAAE;AACR,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,MAAMC,uBAAuB,GAAG;EAC/B,GAAGL,YAAY;EACfG,IAAI,EAAE,IAAI;EACVC,KAAK,EAAE;AACR,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AAC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;IAClB,MAAMC,SAAS,GAAGnC,oBAAoB,EAAEW,aAAa,EAAEqB,WAAW;IAClE,IAAKG,SAAS,CAACC,cAAc,EAAG;MAC/BF,cAAc,GAAG,IAAIC,SAAS,CAACC,cAAc,CAAEN,WAAY,CAAC;MAC5DI,cAAc,CAACG,OAAO,CAAErC,oBAAqB,CAAC;IAC/C;IAEA,OAAO,MAAM;MACZ+B,WAAW,EAAEO,kBAAkB,GAAI,QAAQ,EAAER,WAAY,CAAC;MAE1D,IAAKI,cAAc,EAAG;QACrBA,cAAc,CAACK,UAAU,CAAC,CAAC;MAC5B;IACD,CAAC;EACF,CAAC,EAAE,CAAET,WAAW,EAAE/B,cAAc,EAAEC,oBAAoB,CAAG,CAAC;EAE1D,OAAO;IACN,GAAGyB,KAAK;IACRe,GAAG,EAAEb;EACN,CAAC;AACF","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useSelect","store","blockEditorStore","useSelectedBlockToolProps","clientId","selectedBlockProps","select","getBlockRootClientId","getBlockParents","__experimentalGetBlockListSettingsForBlocks","isBlockInsertionPointVisible","getBlockInsertionPoint","getBlockOrder","hasMultiSelection","getLastMultiSelectedBlockClientId","blockParentsClientIds","parentBlockListSettings","capturingClientId","find","parentClientId","__experimentalCaptureToolbars","isInsertionPointVisible","insertionPoint","order","rootClientId","index","lastClientId"],"sources":["@wordpress/block-editor/src/components/block-tools/use-selected-block-tool-props.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\n/**\n * Returns props for the selected block tools and empty block inserter.\n *\n * @param {string} clientId Selected block client ID.\n */\nexport default function useSelectedBlockToolProps( clientId ) {\n\tconst selectedBlockProps = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockRootClientId,\n\t\t\t\tgetBlockParents,\n\t\t\t\t__experimentalGetBlockListSettingsForBlocks,\n\t\t\t\tisBlockInsertionPointVisible,\n\t\t\t\tgetBlockInsertionPoint,\n\t\t\t\tgetBlockOrder,\n\t\t\t\thasMultiSelection,\n\t\t\t\tgetLastMultiSelectedBlockClientId,\n\t\t\t} = select( blockEditorStore );\n\n\t\t\tconst blockParentsClientIds = getBlockParents( clientId );\n\n\t\t\t// Get Block List Settings for all ancestors of the current Block clientId.\n\t\t\tconst parentBlockListSettings =\n\t\t\t\t__experimentalGetBlockListSettingsForBlocks(\n\t\t\t\t\tblockParentsClientIds\n\t\t\t\t);\n\n\t\t\t// Get the clientId of the topmost parent with the capture toolbars setting.\n\t\t\tconst capturingClientId = blockParentsClientIds.find(\n\t\t\t\t( parentClientId ) =>\n\t\t\t\t\tparentBlockListSettings[ parentClientId ]\n\t\t\t\t\t\t?.__experimentalCaptureToolbars\n\t\t\t);\n\n\t\t\tlet isInsertionPointVisible = false;\n\t\t\tif ( isBlockInsertionPointVisible() ) {\n\t\t\t\tconst insertionPoint = getBlockInsertionPoint();\n\t\t\t\tconst order = getBlockOrder( insertionPoint.rootClientId );\n\t\t\t\tisInsertionPointVisible =\n\t\t\t\t\torder[ insertionPoint.index ] === clientId;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tcapturingClientId,\n\t\t\t\tisInsertionPointVisible,\n\t\t\t\tlastClientId: hasMultiSelection()\n\t\t\t\t\t? getLastMultiSelectedBlockClientId()\n\t\t\t\t\t: null,\n\t\t\t\trootClientId: getBlockRootClientId( clientId ),\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\treturn selectedBlockProps;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;;AAE3C;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;;AAEvD;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,yBAAyBA,CAAEC,QAAQ,EAAG;EAC7D,MAAMC,kBAAkB,GAAGL,SAAS,CACjCM,MAAM,IAAM;IACb,MAAM;MACLC,oBAAoB;MACpBC,eAAe;MACfC,2CAA2C;MAC3CC,4BAA4B;MAC5BC,sBAAsB;MACtBC,aAAa;MACbC,iBAAiB;MACjBC;IACD,CAAC,GAAGR,MAAM,CAAEJ,gBAAiB,CAAC;IAE9B,MAAMa,qBAAqB,GAAGP,eAAe,CAAEJ,QAAS,CAAC;;IAEzD;IACA,MAAMY,uBAAuB,GAC5BP,2CAA2C,CAC1CM,qBACD,CAAC;;IAEF;IACA,MAAME,iBAAiB,GAAGF,qBAAqB,CAACG,IAAI,CACjDC,cAAc,IACfH,uBAAuB,CAAEG,cAAc,CAAE,EACtCC,6BACL,CAAC;IAED,IAAIC,uBAAuB,GAAG,KAAK;IACnC,IAAKX,4BAA4B,CAAC,CAAC,EAAG;MACrC,MAAMY,cAAc,GAAGX,sBAAsB,CAAC,CAAC;MAC/C,MAAMY,KAAK,GAAGX,aAAa,CAAEU,cAAc,CAACE,YAAa,CAAC;MAC1DH,uBAAuB,GACtBE,KAAK,CAAED,cAAc,CAACG,KAAK,CAAE,KAAKrB,QAAQ;IAC5C;IAEA,OAAO;MACNa,iBAAiB;MACjBI,uBAAuB;MACvBK,YAAY,EAAEb,iBAAiB,CAAC,CAAC,GAC9BC,iCAAiC,CAAC,CAAC,GACnC,IAAI;MACPU,YAAY,EAAEjB,oBAAoB,CAAEH,QAAS;IAC9C,CAAC;EACF,CAAC,EACD,CAAEA,QAAQ,CACX,CAAC;EAED,OAAOC,kBAAkB;AAC1B"}
|
|
1
|
+
{"version":3,"names":["useSelect","store","blockEditorStore","useSelectedBlockToolProps","clientId","selectedBlockProps","select","getBlockRootClientId","getBlockParents","__experimentalGetBlockListSettingsForBlocks","isBlockInsertionPointVisible","getBlockInsertionPoint","getBlockOrder","hasMultiSelection","getLastMultiSelectedBlockClientId","blockParentsClientIds","parentBlockListSettings","capturingClientId","find","parentClientId","__experimentalCaptureToolbars","isInsertionPointVisible","insertionPoint","order","rootClientId","index","lastClientId"],"sources":["@wordpress/block-editor/src/components/block-tools/use-selected-block-tool-props.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\n/**\n * Returns props for the selected block tools and empty block inserter.\n *\n * @param {string} clientId Selected block client ID.\n */\nexport default function useSelectedBlockToolProps( clientId ) {\n\tconst selectedBlockProps = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockRootClientId,\n\t\t\t\tgetBlockParents,\n\t\t\t\t__experimentalGetBlockListSettingsForBlocks,\n\t\t\t\tisBlockInsertionPointVisible,\n\t\t\t\tgetBlockInsertionPoint,\n\t\t\t\tgetBlockOrder,\n\t\t\t\thasMultiSelection,\n\t\t\t\tgetLastMultiSelectedBlockClientId,\n\t\t\t} = select( blockEditorStore );\n\n\t\t\tconst blockParentsClientIds = getBlockParents( clientId );\n\n\t\t\t// Get Block List Settings for all ancestors of the current Block clientId.\n\t\t\tconst parentBlockListSettings =\n\t\t\t\t__experimentalGetBlockListSettingsForBlocks(\n\t\t\t\t\tblockParentsClientIds\n\t\t\t\t);\n\n\t\t\t// Get the clientId of the topmost parent with the capture toolbars setting.\n\t\t\tconst capturingClientId = blockParentsClientIds.find(\n\t\t\t\t( parentClientId ) =>\n\t\t\t\t\tparentBlockListSettings[ parentClientId ]\n\t\t\t\t\t\t?.__experimentalCaptureToolbars\n\t\t\t);\n\n\t\t\tlet isInsertionPointVisible = false;\n\t\t\tif ( isBlockInsertionPointVisible() ) {\n\t\t\t\tconst insertionPoint = getBlockInsertionPoint();\n\t\t\t\tconst order = getBlockOrder( insertionPoint.rootClientId );\n\t\t\t\tisInsertionPointVisible =\n\t\t\t\t\torder[ insertionPoint.index ] === clientId;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tcapturingClientId,\n\t\t\t\tisInsertionPointVisible,\n\t\t\t\tlastClientId: hasMultiSelection()\n\t\t\t\t\t? getLastMultiSelectedBlockClientId()\n\t\t\t\t\t: null,\n\t\t\t\trootClientId: getBlockRootClientId( clientId ),\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\treturn selectedBlockProps;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;;AAE3C;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;;AAEvD;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,yBAAyBA,CAAEC,QAAQ,EAAG;EAC7D,MAAMC,kBAAkB,GAAGL,SAAS,CACjCM,MAAM,IAAM;IACb,MAAM;MACLC,oBAAoB;MACpBC,eAAe;MACfC,2CAA2C;MAC3CC,4BAA4B;MAC5BC,sBAAsB;MACtBC,aAAa;MACbC,iBAAiB;MACjBC;IACD,CAAC,GAAGR,MAAM,CAAEJ,gBAAiB,CAAC;IAE9B,MAAMa,qBAAqB,GAAGP,eAAe,CAAEJ,QAAS,CAAC;;IAEzD;IACA,MAAMY,uBAAuB,GAC5BP,2CAA2C,CAC1CM,qBACD,CAAC;;IAEF;IACA,MAAME,iBAAiB,GAAGF,qBAAqB,CAACG,IAAI,CACjDC,cAAc,IACfH,uBAAuB,CAAEG,cAAc,CAAE,EACtCC,6BACL,CAAC;IAED,IAAIC,uBAAuB,GAAG,KAAK;IACnC,IAAKX,4BAA4B,CAAC,CAAC,EAAG;MACrC,MAAMY,cAAc,GAAGX,sBAAsB,CAAC,CAAC;MAC/C,MAAMY,KAAK,GAAGX,aAAa,CAAEU,cAAc,CAACE,YAAa,CAAC;MAC1DH,uBAAuB,GACtBE,KAAK,CAAED,cAAc,CAACG,KAAK,CAAE,KAAKrB,QAAQ;IAC5C;IAEA,OAAO;MACNa,iBAAiB;MACjBI,uBAAuB;MACvBK,YAAY,EAAEb,iBAAiB,CAAC,CAAC,GAC9BC,iCAAiC,CAAC,CAAC,GACnC,IAAI;MACPU,YAAY,EAAEjB,oBAAoB,CAAEH,QAAS;IAC9C,CAAC;EACF,CAAC,EACD,CAAEA,QAAQ,CACX,CAAC;EAED,OAAOC,kBAAkB;AAC1B","ignoreList":[]}
|
|
@@ -28,20 +28,14 @@ export function useShowBlockTools() {
|
|
|
28
28
|
isTyping
|
|
29
29
|
} = select(blockEditorStore);
|
|
30
30
|
const clientId = getSelectedBlockClientId() || getFirstMultiSelectedBlockClientId();
|
|
31
|
-
const {
|
|
32
|
-
name
|
|
33
|
-
attributes
|
|
34
|
-
}
|
|
31
|
+
const block = getBlock(clientId) || {
|
|
32
|
+
name: '',
|
|
33
|
+
attributes: {}
|
|
34
|
+
};
|
|
35
35
|
const editorMode = __unstableGetEditorMode();
|
|
36
|
-
const hasSelectedBlock = clientId && name;
|
|
37
|
-
const isEmptyDefaultBlock = isUnmodifiedDefaultBlock(
|
|
38
|
-
|
|
39
|
-
attributes
|
|
40
|
-
});
|
|
41
|
-
const _showEmptyBlockSideInserter = clientId && !isTyping() && editorMode === 'edit' && isUnmodifiedDefaultBlock({
|
|
42
|
-
name,
|
|
43
|
-
attributes
|
|
44
|
-
});
|
|
36
|
+
const hasSelectedBlock = clientId && block?.name;
|
|
37
|
+
const isEmptyDefaultBlock = isUnmodifiedDefaultBlock(block);
|
|
38
|
+
const _showEmptyBlockSideInserter = clientId && !isTyping() && editorMode === 'edit' && isEmptyDefaultBlock;
|
|
45
39
|
const maybeShowBreadcrumb = hasSelectedBlock && !hasMultiSelection() && (editorMode === 'navigation' || editorMode === 'zoom-out');
|
|
46
40
|
return {
|
|
47
41
|
showEmptyBlockSideInserter: _showEmptyBlockSideInserter,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useSelect","isUnmodifiedDefaultBlock","store","blockEditorStore","useHasBlockToolbar","useShowBlockTools","hasBlockToolbar","select","getSelectedBlockClientId","getFirstMultiSelectedBlockClientId","getBlock","getSettings","hasMultiSelection","__unstableGetEditorMode","isTyping","clientId","name","attributes","editorMode","hasSelectedBlock","isEmptyDefaultBlock","_showEmptyBlockSideInserter","maybeShowBreadcrumb","showEmptyBlockSideInserter","showBreadcrumb","showBlockToolbarPopover","hasFixedToolbar","showFixedToolbar"],"sources":["@wordpress/block-editor/src/components/block-tools/use-show-block-tools.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { isUnmodifiedDefaultBlock } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport { useHasBlockToolbar } from '../block-toolbar/use-has-block-toolbar';\n\n/**\n * Source of truth for which block tools are showing in the block editor.\n *\n * @return {Object} Object of which block tools will be shown.\n */\nexport function useShowBlockTools() {\n\tconst hasBlockToolbar = useHasBlockToolbar();\n\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetSelectedBlockClientId,\n\t\t\t\tgetFirstMultiSelectedBlockClientId,\n\t\t\t\tgetBlock,\n\t\t\t\tgetSettings,\n\t\t\t\thasMultiSelection,\n\t\t\t\t__unstableGetEditorMode,\n\t\t\t\tisTyping,\n\t\t\t} = select( blockEditorStore );\n\n\t\t\tconst clientId =\n\t\t\t\tgetSelectedBlockClientId() ||\n\t\t\t\tgetFirstMultiSelectedBlockClientId();\n\n\t\t\tconst { name
|
|
1
|
+
{"version":3,"names":["useSelect","isUnmodifiedDefaultBlock","store","blockEditorStore","useHasBlockToolbar","useShowBlockTools","hasBlockToolbar","select","getSelectedBlockClientId","getFirstMultiSelectedBlockClientId","getBlock","getSettings","hasMultiSelection","__unstableGetEditorMode","isTyping","clientId","block","name","attributes","editorMode","hasSelectedBlock","isEmptyDefaultBlock","_showEmptyBlockSideInserter","maybeShowBreadcrumb","showEmptyBlockSideInserter","showBreadcrumb","showBlockToolbarPopover","hasFixedToolbar","showFixedToolbar"],"sources":["@wordpress/block-editor/src/components/block-tools/use-show-block-tools.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { isUnmodifiedDefaultBlock } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport { useHasBlockToolbar } from '../block-toolbar/use-has-block-toolbar';\n\n/**\n * Source of truth for which block tools are showing in the block editor.\n *\n * @return {Object} Object of which block tools will be shown.\n */\nexport function useShowBlockTools() {\n\tconst hasBlockToolbar = useHasBlockToolbar();\n\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetSelectedBlockClientId,\n\t\t\t\tgetFirstMultiSelectedBlockClientId,\n\t\t\t\tgetBlock,\n\t\t\t\tgetSettings,\n\t\t\t\thasMultiSelection,\n\t\t\t\t__unstableGetEditorMode,\n\t\t\t\tisTyping,\n\t\t\t} = select( blockEditorStore );\n\n\t\t\tconst clientId =\n\t\t\t\tgetSelectedBlockClientId() ||\n\t\t\t\tgetFirstMultiSelectedBlockClientId();\n\n\t\t\tconst block = getBlock( clientId ) || { name: '', attributes: {} };\n\t\t\tconst editorMode = __unstableGetEditorMode();\n\t\t\tconst hasSelectedBlock = clientId && block?.name;\n\t\t\tconst isEmptyDefaultBlock = isUnmodifiedDefaultBlock( block );\n\t\t\tconst _showEmptyBlockSideInserter =\n\t\t\t\tclientId &&\n\t\t\t\t! isTyping() &&\n\t\t\t\teditorMode === 'edit' &&\n\t\t\t\tisEmptyDefaultBlock;\n\t\t\tconst maybeShowBreadcrumb =\n\t\t\t\thasSelectedBlock &&\n\t\t\t\t! hasMultiSelection() &&\n\t\t\t\t( editorMode === 'navigation' || editorMode === 'zoom-out' );\n\n\t\t\treturn {\n\t\t\t\tshowEmptyBlockSideInserter: _showEmptyBlockSideInserter,\n\t\t\t\tshowBreadcrumb:\n\t\t\t\t\t! _showEmptyBlockSideInserter && maybeShowBreadcrumb,\n\t\t\t\tshowBlockToolbarPopover:\n\t\t\t\t\thasBlockToolbar &&\n\t\t\t\t\t! getSettings().hasFixedToolbar &&\n\t\t\t\t\t! _showEmptyBlockSideInserter &&\n\t\t\t\t\thasSelectedBlock &&\n\t\t\t\t\t! isEmptyDefaultBlock &&\n\t\t\t\t\t! maybeShowBreadcrumb,\n\t\t\t\tshowFixedToolbar:\n\t\t\t\t\teditorMode !== 'zoom-out' &&\n\t\t\t\t\thasBlockToolbar &&\n\t\t\t\t\tgetSettings().hasFixedToolbar,\n\t\t\t};\n\t\t},\n\t\t[ hasBlockToolbar ]\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,wBAAwB,QAAQ,mBAAmB;;AAE5D;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,SAASC,kBAAkB,QAAQ,wCAAwC;;AAE3E;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,iBAAiBA,CAAA,EAAG;EACnC,MAAMC,eAAe,GAAGF,kBAAkB,CAAC,CAAC;EAE5C,OAAOJ,SAAS,CACbO,MAAM,IAAM;IACb,MAAM;MACLC,wBAAwB;MACxBC,kCAAkC;MAClCC,QAAQ;MACRC,WAAW;MACXC,iBAAiB;MACjBC,uBAAuB;MACvBC;IACD,CAAC,GAAGP,MAAM,CAAEJ,gBAAiB,CAAC;IAE9B,MAAMY,QAAQ,GACbP,wBAAwB,CAAC,CAAC,IAC1BC,kCAAkC,CAAC,CAAC;IAErC,MAAMO,KAAK,GAAGN,QAAQ,CAAEK,QAAS,CAAC,IAAI;MAAEE,IAAI,EAAE,EAAE;MAAEC,UAAU,EAAE,CAAC;IAAE,CAAC;IAClE,MAAMC,UAAU,GAAGN,uBAAuB,CAAC,CAAC;IAC5C,MAAMO,gBAAgB,GAAGL,QAAQ,IAAIC,KAAK,EAAEC,IAAI;IAChD,MAAMI,mBAAmB,GAAGpB,wBAAwB,CAAEe,KAAM,CAAC;IAC7D,MAAMM,2BAA2B,GAChCP,QAAQ,IACR,CAAED,QAAQ,CAAC,CAAC,IACZK,UAAU,KAAK,MAAM,IACrBE,mBAAmB;IACpB,MAAME,mBAAmB,GACxBH,gBAAgB,IAChB,CAAER,iBAAiB,CAAC,CAAC,KACnBO,UAAU,KAAK,YAAY,IAAIA,UAAU,KAAK,UAAU,CAAE;IAE7D,OAAO;MACNK,0BAA0B,EAAEF,2BAA2B;MACvDG,cAAc,EACb,CAAEH,2BAA2B,IAAIC,mBAAmB;MACrDG,uBAAuB,EACtBpB,eAAe,IACf,CAAEK,WAAW,CAAC,CAAC,CAACgB,eAAe,IAC/B,CAAEL,2BAA2B,IAC7BF,gBAAgB,IAChB,CAAEC,mBAAmB,IACrB,CAAEE,mBAAmB;MACtBK,gBAAgB,EACfT,UAAU,KAAK,UAAU,IACzBb,eAAe,IACfK,WAAW,CAAC,CAAC,CAACgB;IAChB,CAAC;EACF,CAAC,EACD,CAAErB,eAAe,CAClB,CAAC;AACF","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useSelect","useEffect","useState","BlockPopoverInbetween","store","blockEditorStore","Inserter","ZoomOutModeInserters","__unstableContentRef","isReady","setIsReady","blockOrder","select","getBlockOrder","timeout","setTimeout","clearTimeout","map","clientId","index","length","createElement","key","previousClientId","nextClientId","className","position","__experimentalIsQuick"],"sources":["@wordpress/block-editor/src/components/block-tools/zoom-out-mode-inserters.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useEffect, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BlockPopoverInbetween from '../block-popover/inbetween';\nimport { store as blockEditorStore } from '../../store';\nimport Inserter from '../inserter';\n\nfunction ZoomOutModeInserters( { __unstableContentRef } ) {\n\tconst [ isReady, setIsReady ] = useState( false );\n\tconst blockOrder = useSelect( ( select ) => {\n\t\treturn select( blockEditorStore ).getBlockOrder();\n\t}, [] );\n\n\t// Defer the initial rendering to avoid the jumps due to the animation.\n\tuseEffect( () => {\n\t\tconst timeout = setTimeout( () => {\n\t\t\tsetIsReady( true );\n\t\t}, 500 );\n\t\treturn () => {\n\t\t\tclearTimeout( timeout );\n\t\t};\n\t}, [] );\n\n\tif ( ! isReady ) {\n\t\treturn null;\n\t}\n\n\treturn blockOrder.map( ( clientId, index ) => {\n\t\tif ( index === blockOrder.length - 1 ) {\n\t\t\treturn null;\n\t\t}\n\t\treturn (\n\t\t\t<BlockPopoverInbetween\n\t\t\t\tkey={ clientId }\n\t\t\t\tpreviousClientId={ clientId }\n\t\t\t\tnextClientId={ blockOrder[ index + 1 ] }\n\t\t\t\t__unstableContentRef={ __unstableContentRef }\n\t\t\t>\n\t\t\t\t<div className=\"block-editor-block-list__insertion-point-inserter is-with-inserter\">\n\t\t\t\t\t<Inserter\n\t\t\t\t\t\tposition=\"bottom center\"\n\t\t\t\t\t\tclientId={ blockOrder[ index + 1 ] }\n\t\t\t\t\t\t__experimentalIsQuick\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</BlockPopoverInbetween>\n\t\t);\n\t} );\n}\n\nexport default ZoomOutModeInserters;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,SAAS,EAAEC,QAAQ,QAAQ,oBAAoB;;AAExD;AACA;AACA;AACA,OAAOC,qBAAqB,MAAM,4BAA4B;AAC9D,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,OAAOC,QAAQ,MAAM,aAAa;AAElC,SAASC,oBAAoBA,CAAE;EAAEC;AAAqB,CAAC,EAAG;EACzD,MAAM,CAAEC,OAAO,EAAEC,UAAU,CAAE,GAAGR,QAAQ,CAAE,KAAM,CAAC;EACjD,MAAMS,UAAU,GAAGX,SAAS,CAAIY,MAAM,IAAM;IAC3C,OAAOA,MAAM,CAAEP,gBAAiB,CAAC,CAACQ,aAAa,CAAC,CAAC;EAClD,CAAC,EAAE,EAAG,CAAC;;EAEP;EACAZ,SAAS,CAAE,MAAM;IAChB,MAAMa,OAAO,GAAGC,UAAU,CAAE,MAAM;MACjCL,UAAU,CAAE,IAAK,CAAC;IACnB,CAAC,EAAE,GAAI,CAAC;IACR,OAAO,MAAM;MACZM,YAAY,CAAEF,OAAQ,CAAC;IACxB,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EAEP,IAAK,CAAEL,OAAO,EAAG;IAChB,OAAO,IAAI;EACZ;EAEA,OAAOE,UAAU,CAACM,GAAG,CAAE,CAAEC,QAAQ,EAAEC,KAAK,KAAM;IAC7C,IAAKA,KAAK,KAAKR,UAAU,CAACS,MAAM,GAAG,CAAC,EAAG;MACtC,OAAO,IAAI;IACZ;IACA,OACCC,aAAA,CAAClB,qBAAqB;MACrBmB,GAAG,EAAGJ,QAAU;MAChBK,gBAAgB,EAAGL,QAAU;MAC7BM,YAAY,EAAGb,UAAU,CAAEQ,KAAK,GAAG,CAAC,CAAI;MACxCX,oBAAoB,EAAGA;IAAsB,GAE7Ca,aAAA;MAAKI,SAAS,EAAC;IAAoE,GAClFJ,aAAA,CAACf,QAAQ;MACRoB,QAAQ,EAAC,eAAe;MACxBR,QAAQ,EAAGP,UAAU,CAAEQ,KAAK,GAAG,CAAC,CAAI;MACpCQ,qBAAqB;IAAA,CACrB,CACG,CACiB,CAAC;EAE1B,CAAE,CAAC;AACJ;AAEA,eAAepB,oBAAoB"}
|
|
1
|
+
{"version":3,"names":["useSelect","useEffect","useState","BlockPopoverInbetween","store","blockEditorStore","Inserter","ZoomOutModeInserters","__unstableContentRef","isReady","setIsReady","blockOrder","select","getBlockOrder","timeout","setTimeout","clearTimeout","map","clientId","index","length","createElement","key","previousClientId","nextClientId","className","position","__experimentalIsQuick"],"sources":["@wordpress/block-editor/src/components/block-tools/zoom-out-mode-inserters.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useEffect, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BlockPopoverInbetween from '../block-popover/inbetween';\nimport { store as blockEditorStore } from '../../store';\nimport Inserter from '../inserter';\n\nfunction ZoomOutModeInserters( { __unstableContentRef } ) {\n\tconst [ isReady, setIsReady ] = useState( false );\n\tconst blockOrder = useSelect( ( select ) => {\n\t\treturn select( blockEditorStore ).getBlockOrder();\n\t}, [] );\n\n\t// Defer the initial rendering to avoid the jumps due to the animation.\n\tuseEffect( () => {\n\t\tconst timeout = setTimeout( () => {\n\t\t\tsetIsReady( true );\n\t\t}, 500 );\n\t\treturn () => {\n\t\t\tclearTimeout( timeout );\n\t\t};\n\t}, [] );\n\n\tif ( ! isReady ) {\n\t\treturn null;\n\t}\n\n\treturn blockOrder.map( ( clientId, index ) => {\n\t\tif ( index === blockOrder.length - 1 ) {\n\t\t\treturn null;\n\t\t}\n\t\treturn (\n\t\t\t<BlockPopoverInbetween\n\t\t\t\tkey={ clientId }\n\t\t\t\tpreviousClientId={ clientId }\n\t\t\t\tnextClientId={ blockOrder[ index + 1 ] }\n\t\t\t\t__unstableContentRef={ __unstableContentRef }\n\t\t\t>\n\t\t\t\t<div className=\"block-editor-block-list__insertion-point-inserter is-with-inserter\">\n\t\t\t\t\t<Inserter\n\t\t\t\t\t\tposition=\"bottom center\"\n\t\t\t\t\t\tclientId={ blockOrder[ index + 1 ] }\n\t\t\t\t\t\t__experimentalIsQuick\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</BlockPopoverInbetween>\n\t\t);\n\t} );\n}\n\nexport default ZoomOutModeInserters;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,SAAS,EAAEC,QAAQ,QAAQ,oBAAoB;;AAExD;AACA;AACA;AACA,OAAOC,qBAAqB,MAAM,4BAA4B;AAC9D,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,OAAOC,QAAQ,MAAM,aAAa;AAElC,SAASC,oBAAoBA,CAAE;EAAEC;AAAqB,CAAC,EAAG;EACzD,MAAM,CAAEC,OAAO,EAAEC,UAAU,CAAE,GAAGR,QAAQ,CAAE,KAAM,CAAC;EACjD,MAAMS,UAAU,GAAGX,SAAS,CAAIY,MAAM,IAAM;IAC3C,OAAOA,MAAM,CAAEP,gBAAiB,CAAC,CAACQ,aAAa,CAAC,CAAC;EAClD,CAAC,EAAE,EAAG,CAAC;;EAEP;EACAZ,SAAS,CAAE,MAAM;IAChB,MAAMa,OAAO,GAAGC,UAAU,CAAE,MAAM;MACjCL,UAAU,CAAE,IAAK,CAAC;IACnB,CAAC,EAAE,GAAI,CAAC;IACR,OAAO,MAAM;MACZM,YAAY,CAAEF,OAAQ,CAAC;IACxB,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EAEP,IAAK,CAAEL,OAAO,EAAG;IAChB,OAAO,IAAI;EACZ;EAEA,OAAOE,UAAU,CAACM,GAAG,CAAE,CAAEC,QAAQ,EAAEC,KAAK,KAAM;IAC7C,IAAKA,KAAK,KAAKR,UAAU,CAACS,MAAM,GAAG,CAAC,EAAG;MACtC,OAAO,IAAI;IACZ;IACA,OACCC,aAAA,CAAClB,qBAAqB;MACrBmB,GAAG,EAAGJ,QAAU;MAChBK,gBAAgB,EAAGL,QAAU;MAC7BM,YAAY,EAAGb,UAAU,CAAEQ,KAAK,GAAG,CAAC,CAAI;MACxCX,oBAAoB,EAAGA;IAAsB,GAE7Ca,aAAA;MAAKI,SAAS,EAAC;IAAoE,GAClFJ,aAAA,CAACf,QAAQ;MACRoB,QAAQ,EAAC,eAAe;MACxBR,QAAQ,EAAGP,UAAU,CAAEQ,KAAK,GAAG,CAAC,CAAI;MACpCQ,qBAAqB;IAAA,CACrB,CACG,CACiB,CAAC;EAE1B,CAAE,CAAC;AACJ;AAEA,eAAepB,oBAAoB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getBlockMenuDefaultClassName","useInstanceId","InserterListItem","InserterListboxGroup","InserterListboxRow","chunk","array","size","chunks","i","j","length","push","slice","BlockTypesList","items","onSelect","onHover","children","label","isDraggable","className","listId","createElement","map","row","key","item","id","isDisabled","isFirst","rowId"],"sources":["@wordpress/block-editor/src/components/block-types-list/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockMenuDefaultClassName } from '@wordpress/blocks';\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport InserterListItem from '../inserter-list-item';\nimport { InserterListboxGroup, InserterListboxRow } from '../inserter-listbox';\n\nfunction chunk( array, size ) {\n\tconst chunks = [];\n\tfor ( let i = 0, j = array.length; i < j; i += size ) {\n\t\tchunks.push( array.slice( i, i + size ) );\n\t}\n\treturn chunks;\n}\n\nfunction BlockTypesList( {\n\titems = [],\n\tonSelect,\n\tonHover = () => {},\n\tchildren,\n\tlabel,\n\tisDraggable = true,\n} ) {\n\tconst className = 'block-editor-block-types-list';\n\tconst listId = useInstanceId( BlockTypesList, className );\n\treturn (\n\t\t<InserterListboxGroup className={ className } aria-label={ label }>\n\t\t\t{ chunk( items, 3 ).map( ( row, i ) => (\n\t\t\t\t<InserterListboxRow key={ i }>\n\t\t\t\t\t{ row.map( ( item, j ) => (\n\t\t\t\t\t\t<InserterListItem\n\t\t\t\t\t\t\tkey={ item.id }\n\t\t\t\t\t\t\titem={ item }\n\t\t\t\t\t\t\tclassName={ getBlockMenuDefaultClassName(\n\t\t\t\t\t\t\t\titem.id\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\t\tonHover={ onHover }\n\t\t\t\t\t\t\tisDraggable={ isDraggable && ! item.isDisabled }\n\t\t\t\t\t\t\tisFirst={ i === 0 && j === 0 }\n\t\t\t\t\t\t\trowId={ `${ listId }-${ i }` }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) ) }\n\t\t\t\t</InserterListboxRow>\n\t\t\t) ) }\n\t\t\t{ children }\n\t\t</InserterListboxGroup>\n\t);\n}\n\nexport default BlockTypesList;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,4BAA4B,QAAQ,mBAAmB;AAChE,SAASC,aAAa,QAAQ,oBAAoB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AAW,EAAGA,WAAW,IAAI,CAAEO,IAAI,CAACE,UAAY;IAChDC,OAAO,EAAGrB,CAAC,KAAK,CAAC,IAAIC,CAAC,KAAK,CAAG;IAC9BqB,KAAK,EAAI,GAAGT,MAAQ,IAAIb,CAAG;EAAG,CAC9B,CACA,CACiB,CACnB,CAAC,EACDS,QACmB,CAAC;AAEzB;AAEA,eAAeJ,cAAc"}
|
|
1
|
+
{"version":3,"names":["getBlockMenuDefaultClassName","useInstanceId","InserterListItem","InserterListboxGroup","InserterListboxRow","chunk","array","size","chunks","i","j","length","push","slice","BlockTypesList","items","onSelect","onHover","children","label","isDraggable","className","listId","createElement","map","row","key","item","id","isDisabled","isFirst","rowId"],"sources":["@wordpress/block-editor/src/components/block-types-list/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockMenuDefaultClassName } from '@wordpress/blocks';\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport InserterListItem from '../inserter-list-item';\nimport { InserterListboxGroup, InserterListboxRow } from '../inserter-listbox';\n\nfunction chunk( array, size ) {\n\tconst chunks = [];\n\tfor ( let i = 0, j = array.length; i < j; i += size ) {\n\t\tchunks.push( array.slice( i, i + size ) );\n\t}\n\treturn chunks;\n}\n\nfunction BlockTypesList( {\n\titems = [],\n\tonSelect,\n\tonHover = () => {},\n\tchildren,\n\tlabel,\n\tisDraggable = true,\n} ) {\n\tconst className = 'block-editor-block-types-list';\n\tconst listId = useInstanceId( BlockTypesList, className );\n\treturn (\n\t\t<InserterListboxGroup className={ className } aria-label={ label }>\n\t\t\t{ chunk( items, 3 ).map( ( row, i ) => (\n\t\t\t\t<InserterListboxRow key={ i }>\n\t\t\t\t\t{ row.map( ( item, j ) => (\n\t\t\t\t\t\t<InserterListItem\n\t\t\t\t\t\t\tkey={ item.id }\n\t\t\t\t\t\t\titem={ item }\n\t\t\t\t\t\t\tclassName={ getBlockMenuDefaultClassName(\n\t\t\t\t\t\t\t\titem.id\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\t\tonHover={ onHover }\n\t\t\t\t\t\t\tisDraggable={ isDraggable && ! item.isDisabled }\n\t\t\t\t\t\t\tisFirst={ i === 0 && j === 0 }\n\t\t\t\t\t\t\trowId={ `${ listId }-${ i }` }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) ) }\n\t\t\t\t</InserterListboxRow>\n\t\t\t) ) }\n\t\t\t{ children }\n\t\t</InserterListboxGroup>\n\t);\n}\n\nexport default BlockTypesList;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,4BAA4B,QAAQ,mBAAmB;AAChE,SAASC,aAAa,QAAQ,oBAAoB;;AAElD;AACA;AACA;AACA,OAAOC,gBAAgB,MAAM,uBAAuB;AACpD,SAASC,oBAAoB,EAAEC,kBAAkB,QAAQ,qBAAqB;AAE9E,SAASC,KAAKA,CAAEC,KAAK,EAAEC,IAAI,EAAG;EAC7B,MAAMC,MAAM,GAAG,EAAE;EACjB,KAAM,IAAIC,CAAC,GAAG,CAAC,EAAEC,CAAC,GAAGJ,KAAK,CAACK,MAAM,EAAEF,CAAC,GAAGC,CAAC,EAAED,CAAC,IAAIF,IAAI,EAAG;IACrDC,MAAM,CAACI,IAAI,CAAEN,KAAK,CAACO,KAAK,CAAEJ,CAAC,EAAEA,CAAC,GAAGF,IAAK,CAAE,CAAC;EAC1C;EACA,OAAOC,MAAM;AACd;AAEA,SAASM,cAAcA,CAAE;EACxBC,KAAK,GAAG,EAAE;EACVC,QAAQ;EACRC,OAAO,GAAGA,CAAA,KAAM,CAAC,CAAC;EAClBC,QAAQ;EACRC,KAAK;EACLC,WAAW,GAAG;AACf,CAAC,EAAG;EACH,MAAMC,SAAS,GAAG,+BAA+B;EACjD,MAAMC,MAAM,GAAGrB,aAAa,CAAEa,cAAc,EAAEO,SAAU,CAAC;EACzD,OACCE,aAAA,CAACpB,oBAAoB;IAACkB,SAAS,EAAGA,SAAW;IAAC,cAAaF;EAAO,GAC/Dd,KAAK,CAAEU,KAAK,EAAE,CAAE,CAAC,CAACS,GAAG,CAAE,CAAEC,GAAG,EAAEhB,CAAC,KAChCc,aAAA,CAACnB,kBAAkB;IAACsB,GAAG,EAAGjB;EAAG,GAC1BgB,GAAG,CAACD,GAAG,CAAE,CAAEG,IAAI,EAAEjB,CAAC,KACnBa,aAAA,CAACrB,gBAAgB;IAChBwB,GAAG,EAAGC,IAAI,CAACC,EAAI;IACfD,IAAI,EAAGA,IAAM;IACbN,SAAS,EAAGrB,4BAA4B,CACvC2B,IAAI,CAACC,EACN,CAAG;IACHZ,QAAQ,EAAGA,QAAU;IACrBC,OAAO,EAAGA,OAAS;IACnBG,WAAW,EAAGA,WAAW,IAAI,CAAEO,IAAI,CAACE,UAAY;IAChDC,OAAO,EAAGrB,CAAC,KAAK,CAAC,IAAIC,CAAC,KAAK,CAAG;IAC9BqB,KAAK,EAAI,GAAGT,MAAQ,IAAIb,CAAG;EAAG,CAC9B,CACA,CACiB,CACnB,CAAC,EACDS,QACmB,CAAC;AAEzB;AAEA,eAAeJ,cAAc","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Dimensions","FlatList","SectionList","StyleSheet","Text","TouchableWithoutFeedback","View","useState","useEffect","BottomSheet","Gradient","usePreferredColorScheme","usePreferredColorSchemeStyle","styles","InserterButton","MIN_COL_NUM","BlockTypesList","name","sections","onSelect","label","listProps","initialNumToRender","numberOfColumns","setNumberOfColumns","itemWidth","setItemWidth","maxWidth","setMaxWidth","dimensionsChangeSubscription","addEventListener","onLayout","remove","calculateItemWidth","paddingLeft","itemPaddingLeft","paddingRight","itemPaddingRight","Styles","modalItem","width","modalIconWrapper","columnStyle","sumLeftRightPadding","bottomSheetWidth","getWidth","containerTotalWidth","itemTotalWidth","columnsFitToWidth","Math","floor","numColumns","max","updatedItemWidth","contentContainerStyle","flatten","renderSection","item","createElement","accessible","data","list","key","ItemSeparatorComponent","style","scrollEnabled","renderItem","renderListItem","colorScheme","sectionHeaderGradientValue","sectionHeaderTitleStyles","renderSectionHeader","section","metadata","icon","title","gradientValue","testID","accessibilityLabel","keyboardShouldPersistTaps","paddingBottom","safeAreaBottomInset"],"sources":["@wordpress/block-editor/src/components/block-types-list/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport {\n\tDimensions,\n\tFlatList,\n\tSectionList,\n\tStyleSheet,\n\tText,\n\tTouchableWithoutFeedback,\n\tView,\n} from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { useState, useEffect } from '@wordpress/element';\nimport { BottomSheet, Gradient } from '@wordpress/components';\nimport {\n\tusePreferredColorScheme,\n\tusePreferredColorSchemeStyle,\n} from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\nimport InserterButton from '../inserter-button';\n\nconst MIN_COL_NUM = 3;\n\nexport default function BlockTypesList( {\n\tname,\n\tsections,\n\tonSelect,\n\tlabel,\n\tlistProps,\n\tinitialNumToRender = 3,\n} ) {\n\tconst [ numberOfColumns, setNumberOfColumns ] = useState( MIN_COL_NUM );\n\tconst [ itemWidth, setItemWidth ] = useState();\n\tconst [ maxWidth, setMaxWidth ] = useState();\n\n\tuseEffect( () => {\n\t\tconst dimensionsChangeSubscription = Dimensions.addEventListener(\n\t\t\t'change',\n\t\t\tonLayout\n\t\t);\n\t\tonLayout();\n\t\treturn () => {\n\t\t\tdimensionsChangeSubscription.remove();\n\t\t};\n\t}, [] );\n\n\tfunction calculateItemWidth() {\n\t\tconst { paddingLeft: itemPaddingLeft, paddingRight: itemPaddingRight } =\n\t\t\tInserterButton.Styles.modalItem;\n\t\tconst { width } = InserterButton.Styles.modalIconWrapper;\n\t\treturn width + itemPaddingLeft + itemPaddingRight;\n\t}\n\n\tfunction onLayout() {\n\t\tconst columnStyle = styles[ 'block-types-list__column' ];\n\t\tconst sumLeftRightPadding =\n\t\t\tcolumnStyle.paddingLeft + columnStyle.paddingRight;\n\n\t\tconst bottomSheetWidth = BottomSheet.getWidth();\n\t\tconst containerTotalWidth = bottomSheetWidth - sumLeftRightPadding;\n\t\tconst itemTotalWidth = calculateItemWidth();\n\n\t\tconst columnsFitToWidth = Math.floor(\n\t\t\tcontainerTotalWidth / itemTotalWidth\n\t\t);\n\n\t\tconst numColumns = Math.max( MIN_COL_NUM, columnsFitToWidth );\n\n\t\tsetNumberOfColumns( numColumns );\n\t\tsetMaxWidth( containerTotalWidth / numColumns );\n\n\t\tif ( columnsFitToWidth < MIN_COL_NUM ) {\n\t\t\tconst updatedItemWidth =\n\t\t\t\t( bottomSheetWidth - 2 * sumLeftRightPadding ) / MIN_COL_NUM;\n\t\t\tsetItemWidth( updatedItemWidth );\n\t\t}\n\t}\n\n\tconst contentContainerStyle = StyleSheet.flatten(\n\t\tlistProps.contentContainerStyle\n\t);\n\n\tconst renderSection = ( { item } ) => {\n\t\treturn (\n\t\t\t<TouchableWithoutFeedback accessible={ false }>\n\t\t\t\t<FlatList\n\t\t\t\t\tdata={ item.list }\n\t\t\t\t\tkey={ `InserterUI-${ name }-${ numberOfColumns }` } // Re-render when numberOfColumns changes.\n\t\t\t\t\tnumColumns={ numberOfColumns }\n\t\t\t\t\tItemSeparatorComponent={ () => (\n\t\t\t\t\t\t<TouchableWithoutFeedback accessible={ false }>\n\t\t\t\t\t\t\t<View\n\t\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t\tstyles[ 'block-types-list__row-separator' ]\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</TouchableWithoutFeedback>\n\t\t\t\t\t) }\n\t\t\t\t\tscrollEnabled={ false }\n\t\t\t\t\trenderItem={ renderListItem }\n\t\t\t\t/>\n\t\t\t</TouchableWithoutFeedback>\n\t\t);\n\t};\n\n\tconst renderListItem = ( { item } ) => {\n\t\treturn (\n\t\t\t<InserterButton\n\t\t\t\titem={ item }\n\t\t\t\titemWidth={ itemWidth }\n\t\t\t\tmaxWidth={ maxWidth }\n\t\t\t\tonSelect={ onSelect }\n\t\t\t/>\n\t\t);\n\t};\n\n\tconst colorScheme = usePreferredColorScheme();\n\tconst sectionHeaderGradientValue =\n\t\tcolorScheme === 'light'\n\t\t\t? 'linear-gradient(#fff 70%, rgba(255, 255, 255, 0))'\n\t\t\t: 'linear-gradient(#2e2e2e 70%, rgba(46, 46, 46, 0))';\n\tconst sectionHeaderTitleStyles = usePreferredColorSchemeStyle(\n\t\tstyles[ 'block-types-list__section-header-title' ],\n\t\tstyles[ 'block-types-list__section-header-title--dark' ]\n\t);\n\n\tconst renderSectionHeader = ( { section: { metadata } } ) => {\n\t\tif ( ! metadata?.icon || ! metadata?.title ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn (\n\t\t\t<TouchableWithoutFeedback accessible={ false }>\n\t\t\t\t<Gradient\n\t\t\t\t\tgradientValue={ sectionHeaderGradientValue }\n\t\t\t\t\tstyle={ styles[ 'block-types-list__section-header' ] }\n\t\t\t\t>\n\t\t\t\t\t{ metadata?.icon }\n\t\t\t\t\t<Text style={ sectionHeaderTitleStyles }>\n\t\t\t\t\t\t{ metadata?.title }\n\t\t\t\t\t</Text>\n\t\t\t\t</Gradient>\n\t\t\t</TouchableWithoutFeedback>\n\t\t);\n\t};\n\n\treturn (\n\t\t<SectionList\n\t\t\tonLayout={ onLayout }\n\t\t\ttestID={ `InserterUI-${ name }` }\n\t\t\taccessibilityLabel={ label }\n\t\t\tkeyboardShouldPersistTaps=\"always\"\n\t\t\tsections={ sections }\n\t\t\tinitialNumToRender={ initialNumToRender }\n\t\t\trenderItem={ renderSection }\n\t\t\trenderSectionHeader={ renderSectionHeader }\n\t\t\t{ ...listProps }\n\t\t\tcontentContainerStyle={ {\n\t\t\t\t...contentContainerStyle,\n\t\t\t\tpaddingBottom: Math.max(\n\t\t\t\t\tlistProps.safeAreaBottomInset,\n\t\t\t\t\tcontentContainerStyle.paddingBottom\n\t\t\t\t),\n\t\t\t} }\n\t\t/>\n\t);\n}\n"],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I,cAAc5D,IAAM,EAAG;IACjC6D,kBAAkB,EAAG1D,KAAO;IAC5B2D,yBAAyB,EAAC,QAAQ;IAClC7D,QAAQ,EAAGA,QAAU;IACrBI,kBAAkB,EAAGA,kBAAoB;IACzC4C,UAAU,EAAGV,aAAe;IAC5Be,mBAAmB,EAAGA,mBAAqB;IAAA,GACtClD,SAAS;IACdiC,qBAAqB,EAAG;MACvB,GAAGA,qBAAqB;MACxB0B,aAAa,EAAE/B,IAAI,CAACG,GAAG,CACtB/B,SAAS,CAAC4D,mBAAmB,EAC7B3B,qBAAqB,CAAC0B,aACvB;IACD;EAAG,CACH,CAAC;AAEJ"}
|
|
1
|
+
{"version":3,"names":["Dimensions","FlatList","SectionList","StyleSheet","Text","TouchableWithoutFeedback","View","useState","useEffect","BottomSheet","Gradient","usePreferredColorScheme","usePreferredColorSchemeStyle","styles","InserterButton","MIN_COL_NUM","BlockTypesList","name","sections","onSelect","label","listProps","initialNumToRender","numberOfColumns","setNumberOfColumns","itemWidth","setItemWidth","maxWidth","setMaxWidth","dimensionsChangeSubscription","addEventListener","onLayout","remove","calculateItemWidth","paddingLeft","itemPaddingLeft","paddingRight","itemPaddingRight","Styles","modalItem","width","modalIconWrapper","columnStyle","sumLeftRightPadding","bottomSheetWidth","getWidth","containerTotalWidth","itemTotalWidth","columnsFitToWidth","Math","floor","numColumns","max","updatedItemWidth","contentContainerStyle","flatten","renderSection","item","createElement","accessible","data","list","key","ItemSeparatorComponent","style","scrollEnabled","renderItem","renderListItem","colorScheme","sectionHeaderGradientValue","sectionHeaderTitleStyles","renderSectionHeader","section","metadata","icon","title","gradientValue","testID","accessibilityLabel","keyboardShouldPersistTaps","paddingBottom","safeAreaBottomInset"],"sources":["@wordpress/block-editor/src/components/block-types-list/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport {\n\tDimensions,\n\tFlatList,\n\tSectionList,\n\tStyleSheet,\n\tText,\n\tTouchableWithoutFeedback,\n\tView,\n} from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { useState, useEffect } from '@wordpress/element';\nimport { BottomSheet, Gradient } from '@wordpress/components';\nimport {\n\tusePreferredColorScheme,\n\tusePreferredColorSchemeStyle,\n} from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\nimport InserterButton from '../inserter-button';\n\nconst MIN_COL_NUM = 3;\n\nexport default function BlockTypesList( {\n\tname,\n\tsections,\n\tonSelect,\n\tlabel,\n\tlistProps,\n\tinitialNumToRender = 3,\n} ) {\n\tconst [ numberOfColumns, setNumberOfColumns ] = useState( MIN_COL_NUM );\n\tconst [ itemWidth, setItemWidth ] = useState();\n\tconst [ maxWidth, setMaxWidth ] = useState();\n\n\tuseEffect( () => {\n\t\tconst dimensionsChangeSubscription = Dimensions.addEventListener(\n\t\t\t'change',\n\t\t\tonLayout\n\t\t);\n\t\tonLayout();\n\t\treturn () => {\n\t\t\tdimensionsChangeSubscription.remove();\n\t\t};\n\t}, [] );\n\n\tfunction calculateItemWidth() {\n\t\tconst { paddingLeft: itemPaddingLeft, paddingRight: itemPaddingRight } =\n\t\t\tInserterButton.Styles.modalItem;\n\t\tconst { width } = InserterButton.Styles.modalIconWrapper;\n\t\treturn width + itemPaddingLeft + itemPaddingRight;\n\t}\n\n\tfunction onLayout() {\n\t\tconst columnStyle = styles[ 'block-types-list__column' ];\n\t\tconst sumLeftRightPadding =\n\t\t\tcolumnStyle.paddingLeft + columnStyle.paddingRight;\n\n\t\tconst bottomSheetWidth = BottomSheet.getWidth();\n\t\tconst containerTotalWidth = bottomSheetWidth - sumLeftRightPadding;\n\t\tconst itemTotalWidth = calculateItemWidth();\n\n\t\tconst columnsFitToWidth = Math.floor(\n\t\t\tcontainerTotalWidth / itemTotalWidth\n\t\t);\n\n\t\tconst numColumns = Math.max( MIN_COL_NUM, columnsFitToWidth );\n\n\t\tsetNumberOfColumns( numColumns );\n\t\tsetMaxWidth( containerTotalWidth / numColumns );\n\n\t\tif ( columnsFitToWidth < MIN_COL_NUM ) {\n\t\t\tconst updatedItemWidth =\n\t\t\t\t( bottomSheetWidth - 2 * sumLeftRightPadding ) / MIN_COL_NUM;\n\t\t\tsetItemWidth( updatedItemWidth );\n\t\t}\n\t}\n\n\tconst contentContainerStyle = StyleSheet.flatten(\n\t\tlistProps.contentContainerStyle\n\t);\n\n\tconst renderSection = ( { item } ) => {\n\t\treturn (\n\t\t\t<TouchableWithoutFeedback accessible={ false }>\n\t\t\t\t<FlatList\n\t\t\t\t\tdata={ item.list }\n\t\t\t\t\tkey={ `InserterUI-${ name }-${ numberOfColumns }` } // Re-render when numberOfColumns changes.\n\t\t\t\t\tnumColumns={ numberOfColumns }\n\t\t\t\t\tItemSeparatorComponent={ () => (\n\t\t\t\t\t\t<TouchableWithoutFeedback accessible={ false }>\n\t\t\t\t\t\t\t<View\n\t\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t\tstyles[ 'block-types-list__row-separator' ]\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</TouchableWithoutFeedback>\n\t\t\t\t\t) }\n\t\t\t\t\tscrollEnabled={ false }\n\t\t\t\t\trenderItem={ renderListItem }\n\t\t\t\t/>\n\t\t\t</TouchableWithoutFeedback>\n\t\t);\n\t};\n\n\tconst renderListItem = ( { item } ) => {\n\t\treturn (\n\t\t\t<InserterButton\n\t\t\t\titem={ item }\n\t\t\t\titemWidth={ itemWidth }\n\t\t\t\tmaxWidth={ maxWidth }\n\t\t\t\tonSelect={ onSelect }\n\t\t\t/>\n\t\t);\n\t};\n\n\tconst colorScheme = usePreferredColorScheme();\n\tconst sectionHeaderGradientValue =\n\t\tcolorScheme === 'light'\n\t\t\t? 'linear-gradient(#fff 70%, rgba(255, 255, 255, 0))'\n\t\t\t: 'linear-gradient(#2e2e2e 70%, rgba(46, 46, 46, 0))';\n\tconst sectionHeaderTitleStyles = usePreferredColorSchemeStyle(\n\t\tstyles[ 'block-types-list__section-header-title' ],\n\t\tstyles[ 'block-types-list__section-header-title--dark' ]\n\t);\n\n\tconst renderSectionHeader = ( { section: { metadata } } ) => {\n\t\tif ( ! metadata?.icon || ! metadata?.title ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn (\n\t\t\t<TouchableWithoutFeedback accessible={ false }>\n\t\t\t\t<Gradient\n\t\t\t\t\tgradientValue={ sectionHeaderGradientValue }\n\t\t\t\t\tstyle={ styles[ 'block-types-list__section-header' ] }\n\t\t\t\t>\n\t\t\t\t\t{ metadata?.icon }\n\t\t\t\t\t<Text style={ sectionHeaderTitleStyles }>\n\t\t\t\t\t\t{ metadata?.title }\n\t\t\t\t\t</Text>\n\t\t\t\t</Gradient>\n\t\t\t</TouchableWithoutFeedback>\n\t\t);\n\t};\n\n\treturn (\n\t\t<SectionList\n\t\t\tonLayout={ onLayout }\n\t\t\ttestID={ `InserterUI-${ name }` }\n\t\t\taccessibilityLabel={ label }\n\t\t\tkeyboardShouldPersistTaps=\"always\"\n\t\t\tsections={ sections }\n\t\t\tinitialNumToRender={ initialNumToRender }\n\t\t\trenderItem={ renderSection }\n\t\t\trenderSectionHeader={ renderSectionHeader }\n\t\t\t{ ...listProps }\n\t\t\tcontentContainerStyle={ {\n\t\t\t\t...contentContainerStyle,\n\t\t\t\tpaddingBottom: Math.max(\n\t\t\t\t\tlistProps.safeAreaBottomInset,\n\t\t\t\t\tcontentContainerStyle.paddingBottom\n\t\t\t\t),\n\t\t\t} }\n\t\t/>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,UAAU,EACVC,QAAQ,EACRC,WAAW,EACXC,UAAU,EACVC,IAAI,EACJC,wBAAwB,EACxBC,IAAI,QACE,cAAc;;AAErB;AACA;AACA;AACA,SAASC,QAAQ,EAAEC,SAAS,QAAQ,oBAAoB;AACxD,SAASC,WAAW,EAAEC,QAAQ,QAAQ,uBAAuB;AAC7D,SACCC,uBAAuB,EACvBC,4BAA4B,QACtB,oBAAoB;;AAE3B;AACA;AACA;AACA,O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