@wordpress/block-editor 14.8.1-next.a9f418477.0 → 14.9.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 +8 -0
- package/build/autocompleters/block.js +1 -0
- package/build/autocompleters/block.js.map +1 -1
- package/build/autocompleters/link.js +1 -0
- package/build/autocompleters/link.js.map +1 -1
- package/build/components/alignment-control/ui.js +1 -0
- package/build/components/alignment-control/ui.js.map +1 -1
- package/build/components/autocomplete/index.js +1 -0
- package/build/components/autocomplete/index.js.map +1 -1
- package/build/components/background-image-control/index.js +1 -0
- package/build/components/background-image-control/index.js.map +1 -1
- package/build/components/block-actions/index.js +1 -0
- package/build/components/block-actions/index.js.map +1 -1
- package/build/components/block-alignment-control/ui.js +1 -0
- package/build/components/block-alignment-control/ui.js.map +1 -1
- package/build/components/block-alignment-control/ui.native.js +1 -0
- package/build/components/block-alignment-control/ui.native.js.map +1 -1
- package/build/components/block-alignment-control/use-available-alignments.js +1 -0
- package/build/components/block-alignment-control/use-available-alignments.js.map +1 -1
- package/build/components/block-breadcrumb/index.js +1 -0
- package/build/components/block-breadcrumb/index.js.map +1 -1
- package/build/components/block-compare/index.js +1 -0
- package/build/components/block-compare/index.js.map +1 -1
- package/build/components/block-controls/fill.js +1 -0
- package/build/components/block-controls/fill.js.map +1 -1
- package/build/components/block-edit/edit.js +1 -0
- package/build/components/block-edit/edit.js.map +1 -1
- package/build/components/block-edit/edit.native.js +1 -0
- package/build/components/block-edit/edit.native.js.map +1 -1
- package/build/components/block-heading-level-dropdown/index.js +1 -0
- package/build/components/block-heading-level-dropdown/index.js.map +1 -1
- package/build/components/block-heading-level-dropdown/index.native.js +1 -0
- package/build/components/block-heading-level-dropdown/index.native.js.map +1 -1
- package/build/components/block-inspector/index.js +1 -0
- package/build/components/block-inspector/index.js.map +1 -1
- package/build/components/block-list/block-invalid-warning.js +1 -0
- package/build/components/block-list/block-invalid-warning.js.map +1 -1
- package/build/components/block-list/block-list-context.native.js +1 -0
- package/build/components/block-list/block-list-context.native.js.map +1 -1
- package/build/components/block-list/block.js +1 -0
- package/build/components/block-list/block.js.map +1 -1
- package/build/components/block-list/block.native.js +1 -0
- package/build/components/block-list/block.native.js.map +1 -1
- package/build/components/block-list/index.js +1 -0
- package/build/components/block-list/index.js.map +1 -1
- package/build/components/block-list/index.native.js +1 -0
- package/build/components/block-list/index.native.js.map +1 -1
- package/build/components/block-list/use-block-props/use-focus-first-element.js +1 -0
- package/build/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
- package/build/components/block-list/use-in-between-inserter.js +1 -0
- package/build/components/block-list/use-in-between-inserter.js.map +1 -1
- package/build/components/block-lock/modal.js +1 -0
- package/build/components/block-lock/modal.js.map +1 -1
- package/build/components/block-manager/category.js +1 -0
- package/build/components/block-manager/category.js.map +1 -1
- package/build/components/block-manager/checklist.js +1 -0
- package/build/components/block-manager/checklist.js.map +1 -1
- package/build/components/block-manager/index.js +1 -0
- package/build/components/block-manager/index.js.map +1 -1
- package/build/components/block-media-update-progress/index.native.js +1 -0
- package/build/components/block-media-update-progress/index.native.js.map +1 -1
- package/build/components/block-mover/index.native.js +1 -0
- package/build/components/block-mover/index.native.js.map +1 -1
- package/build/components/block-mover/mover-description.native.js +1 -0
- package/build/components/block-mover/mover-description.native.js.map +1 -1
- package/build/components/block-pattern-setup/index.js +1 -0
- package/build/components/block-pattern-setup/index.js.map +1 -1
- package/build/components/block-pattern-setup/use-patterns-setup.js +1 -0
- package/build/components/block-pattern-setup/use-patterns-setup.js.map +1 -1
- package/build/components/block-patterns-list/index.js +1 -0
- package/build/components/block-patterns-list/index.js.map +1 -1
- package/build/components/block-quick-navigation/index.js +1 -0
- package/build/components/block-quick-navigation/index.js.map +1 -1
- package/build/components/block-rename/rename-control.js +1 -0
- package/build/components/block-rename/rename-control.js.map +1 -1
- package/build/components/block-settings-menu/block-settings-dropdown.js +1 -0
- package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build/components/block-styles/index.js +1 -0
- package/build/components/block-styles/index.js.map +1 -1
- package/build/components/block-styles/index.native.js +1 -0
- package/build/components/block-styles/index.native.js.map +1 -1
- package/build/components/block-styles/menu-items.js +1 -0
- package/build/components/block-styles/menu-items.js.map +1 -1
- package/build/components/block-styles/preview.native.js +1 -0
- package/build/components/block-styles/preview.native.js.map +1 -1
- package/build/components/block-switcher/block-transformations-menu.js +1 -0
- package/build/components/block-switcher/block-transformations-menu.js.map +1 -1
- package/build/components/block-switcher/block-transformations-menu.native.js +1 -0
- package/build/components/block-switcher/block-transformations-menu.native.js.map +1 -1
- package/build/components/block-switcher/block-variation-transformations.js +1 -0
- package/build/components/block-switcher/block-variation-transformations.js.map +1 -1
- package/build/components/block-switcher/index.js +1 -0
- package/build/components/block-switcher/index.js.map +1 -1
- package/build/components/block-switcher/pattern-transformations-menu.js +1 -0
- package/build/components/block-switcher/pattern-transformations-menu.js.map +1 -1
- package/build/components/block-switcher/use-transformed-patterns.js +1 -0
- package/build/components/block-switcher/use-transformed-patterns.js.map +1 -1
- package/build/components/block-switcher/utils.js +1 -0
- package/build/components/block-switcher/utils.js.map +1 -1
- package/build/components/block-toolbar/block-toolbar-menu.native.js +1 -0
- package/build/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
- package/build/components/block-toolbar/change-design.js +1 -0
- package/build/components/block-toolbar/change-design.js.map +1 -1
- package/build/components/block-toolbar/index.js +1 -0
- package/build/components/block-toolbar/index.js.map +1 -1
- package/build/components/block-tools/use-selected-block-tool-props.js +1 -0
- package/build/components/block-tools/use-selected-block-tool-props.js.map +1 -1
- package/build/components/block-types-list/index.js +1 -0
- package/build/components/block-types-list/index.js.map +1 -1
- package/build/components/block-variation-picker/index.js +1 -0
- package/build/components/block-variation-picker/index.js.map +1 -1
- package/build/components/block-variation-picker/index.native.js +1 -0
- package/build/components/block-variation-picker/index.native.js.map +1 -1
- package/build/components/block-variation-transforms/index.js +1 -0
- package/build/components/block-variation-transforms/index.js.map +1 -1
- package/build/components/block-vertical-alignment-control/ui.js +1 -0
- package/build/components/block-vertical-alignment-control/ui.js.map +1 -1
- package/build/components/border-radius-control/index.js +1 -0
- package/build/components/border-radius-control/index.js.map +1 -1
- package/build/components/border-radius-control/input-controls.js +1 -0
- package/build/components/border-radius-control/input-controls.js.map +1 -1
- package/build/components/border-radius-control/utils.js +1 -0
- package/build/components/border-radius-control/utils.js.map +1 -1
- package/build/components/colors/utils.js +1 -0
- package/build/components/colors/utils.js.map +1 -1
- package/build/components/colors/with-colors.js +1 -0
- package/build/components/colors/with-colors.js.map +1 -1
- package/build/components/colors-gradients/dropdown.js +1 -0
- package/build/components/colors-gradients/dropdown.js.map +1 -1
- package/build/components/colors-gradients/panel-color-gradient-settings.js +1 -0
- package/build/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
- package/build/components/colors-gradients/panel-color-gradient-settings.native.js +1 -0
- package/build/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
- package/build/components/convert-to-group-buttons/toolbar.js +1 -0
- package/build/components/convert-to-group-buttons/toolbar.js.map +1 -1
- package/build/components/date-format-picker/index.js +1 -0
- package/build/components/date-format-picker/index.js.map +1 -1
- package/build/components/dimensions-tool/scale-tool.js +1 -0
- package/build/components/dimensions-tool/scale-tool.js.map +1 -1
- package/build/components/duotone/utils.js +1 -0
- package/build/components/duotone/utils.js.map +1 -1
- package/build/components/editor-styles/index.js +1 -0
- package/build/components/editor-styles/index.js.map +1 -1
- package/build/components/font-appearance-control/index.js +1 -0
- package/build/components/font-appearance-control/index.js.map +1 -1
- package/build/components/font-family/index.js +1 -0
- package/build/components/font-family/index.js.map +1 -1
- package/build/components/font-sizes/with-font-sizes.js +1 -0
- package/build/components/font-sizes/with-font-sizes.js.map +1 -1
- package/build/components/global-styles/border-panel.js +1 -0
- package/build/components/global-styles/border-panel.js.map +1 -1
- package/build/components/global-styles/color-panel.js +25 -8
- package/build/components/global-styles/color-panel.js.map +1 -1
- package/build/components/global-styles/color-panel.native.js +1 -0
- package/build/components/global-styles/color-panel.native.js.map +1 -1
- package/build/components/global-styles/dimensions-panel.js +1 -0
- package/build/components/global-styles/dimensions-panel.js.map +1 -1
- package/build/components/global-styles/filters-panel.js +3 -2
- package/build/components/global-styles/filters-panel.js.map +1 -1
- package/build/components/global-styles/get-global-styles-changes.js +1 -0
- package/build/components/global-styles/get-global-styles-changes.js.map +1 -1
- package/build/components/global-styles/shadow-panel-components.js +1 -0
- package/build/components/global-styles/shadow-panel-components.js.map +1 -1
- package/build/components/global-styles/typography-utils.js +1 -0
- package/build/components/global-styles/typography-utils.js.map +1 -1
- package/build/components/global-styles/use-global-styles-context.native.js +1 -0
- package/build/components/global-styles/use-global-styles-context.native.js.map +1 -1
- package/build/components/global-styles/use-global-styles-output.js +2 -1
- package/build/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build/components/global-styles/utils.js +1 -0
- package/build/components/global-styles/utils.js.map +1 -1
- package/build/components/grid/grid-visualizer.js +1 -0
- package/build/components/grid/grid-visualizer.js.map +1 -1
- package/build/components/grid/use-grid-layout-sync.js +1 -0
- package/build/components/grid/use-grid-layout-sync.js.map +1 -1
- package/build/components/grid/utils.js +1 -0
- package/build/components/grid/utils.js.map +1 -1
- package/build/components/iframe/get-compatibility-styles.js +1 -0
- package/build/components/iframe/get-compatibility-styles.js.map +1 -1
- package/build/components/image-editor/aspect-ratio-dropdown.js +1 -0
- package/build/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
- package/build/components/index.js +15 -8
- package/build/components/index.js.map +1 -1
- package/build/components/inner-blocks/use-block-context.js +1 -0
- package/build/components/inner-blocks/use-block-context.js.map +1 -1
- package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js +1 -0
- package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js.map +1 -1
- package/build/components/inserter/block-patterns-explorer/pattern-list.js +1 -0
- package/build/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/pattern-category-previews.js +1 -0
- package/build/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/use-pattern-categories.js +1 -0
- package/build/components/inserter/block-patterns-tab/use-pattern-categories.js.map +1 -1
- package/build/components/inserter/block-types-tab.js +2 -1
- package/build/components/inserter/block-types-tab.js.map +1 -1
- package/build/components/inserter/block-types-tab.native.js +1 -0
- package/build/components/inserter/block-types-tab.native.js.map +1 -1
- package/build/components/inserter/category-tabs/index.js +1 -0
- package/build/components/inserter/category-tabs/index.js.map +1 -1
- package/build/components/inserter/hooks/use-block-type-impressions.native.js +1 -0
- package/build/components/inserter/hooks/use-block-type-impressions.native.js.map +1 -1
- package/build/components/inserter/hooks/use-patterns-state.js +1 -0
- package/build/components/inserter/hooks/use-patterns-state.js.map +1 -1
- package/build/components/inserter/index.js +1 -0
- package/build/components/inserter/index.js.map +1 -1
- package/build/components/inserter/index.native.js +1 -0
- package/build/components/inserter/index.native.js.map +1 -1
- package/build/components/inserter/media-tab/hooks.js +1 -0
- package/build/components/inserter/media-tab/hooks.js.map +1 -1
- package/build/components/inserter/media-tab/media-list.js +1 -0
- package/build/components/inserter/media-tab/media-list.js.map +1 -1
- package/build/components/inserter/media-tab/media-tab.js +1 -0
- package/build/components/inserter/media-tab/media-tab.js.map +1 -1
- package/build/components/inserter/menu.js +1 -0
- package/build/components/inserter/menu.js.map +1 -1
- package/build/components/inserter/mobile-tab-navigation.js +1 -0
- package/build/components/inserter/mobile-tab-navigation.js.map +1 -1
- package/build/components/inserter/search-items.js +1 -0
- package/build/components/inserter/search-items.js.map +1 -1
- package/build/components/inserter/search-results.js +1 -0
- package/build/components/inserter/search-results.js.map +1 -1
- package/build/components/inserter/tabs.native.js +1 -0
- package/build/components/inserter/tabs.native.js.map +1 -1
- package/build/components/inserter/utils.native.js +1 -0
- package/build/components/inserter/utils.native.js.map +1 -1
- package/build/components/inspector-controls/block-support-tools-panel.js +1 -0
- package/build/components/inspector-controls/block-support-tools-panel.js.map +1 -1
- package/build/components/inspector-controls/fill.js +1 -0
- package/build/components/inspector-controls/fill.js.map +1 -1
- package/build/components/inspector-controls-tabs/index.js +1 -0
- package/build/components/inspector-controls-tabs/index.js.map +1 -1
- package/build/components/inspector-controls-tabs/position-controls-panel.js +1 -0
- package/build/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
- package/build/components/inspector-popover-header/index.js +1 -0
- package/build/components/inspector-popover-header/index.js.map +1 -1
- package/build/components/justify-content-control/ui.js +1 -0
- package/build/components/justify-content-control/ui.js.map +1 -1
- package/build/components/link-control/index.js +13 -1
- package/build/components/link-control/index.js.map +1 -1
- package/build/components/link-control/search-input.js +11 -1
- package/build/components/link-control/search-input.js.map +1 -1
- package/build/components/link-control/search-item.js +12 -1
- package/build/components/link-control/search-item.js.map +1 -1
- package/build/components/link-control/search-results.js +13 -1
- package/build/components/link-control/search-results.js.map +1 -1
- package/build/components/link-control/settings.js +1 -0
- package/build/components/link-control/settings.js.map +1 -1
- package/build/components/link-control/use-internal-value.js +1 -0
- package/build/components/link-control/use-internal-value.js.map +1 -1
- package/build/components/link-control/use-search-handler.js +1 -0
- package/build/components/link-control/use-search-handler.js.map +1 -1
- package/build/components/list-view/block-select-button.js +1 -0
- package/build/components/list-view/block-select-button.js.map +1 -1
- package/build/components/list-view/block.js +1 -0
- package/build/components/list-view/block.js.map +1 -1
- package/build/components/list-view/branch.js +1 -0
- package/build/components/list-view/branch.js.map +1 -1
- package/build/components/list-view/index.js +1 -0
- package/build/components/list-view/index.js.map +1 -1
- package/build/components/list-view/use-block-selection.js +1 -0
- package/build/components/list-view/use-block-selection.js.map +1 -1
- package/build/components/list-view/use-clipboard-handler.js +1 -0
- package/build/components/list-view/use-clipboard-handler.js.map +1 -1
- package/build/components/list-view/use-list-view-block-indexes.js +1 -0
- package/build/components/list-view/use-list-view-block-indexes.js.map +1 -1
- package/build/components/list-view/use-list-view-drop-zone.js +1 -0
- package/build/components/list-view/use-list-view-drop-zone.js.map +1 -1
- package/build/components/list-view/utils.js +1 -0
- package/build/components/list-view/utils.js.map +1 -1
- package/build/components/media-placeholder/index.js +1 -0
- package/build/components/media-placeholder/index.js.map +1 -1
- package/build/components/media-placeholder/index.native.js +1 -0
- package/build/components/media-placeholder/index.native.js.map +1 -1
- package/build/components/media-replace-flow/index.js +1 -0
- package/build/components/media-replace-flow/index.js.map +1 -1
- package/build/components/media-upload/index.native.js +1 -0
- package/build/components/media-upload/index.native.js.map +1 -1
- package/build/components/navigable-toolbar/index.js +1 -0
- package/build/components/navigable-toolbar/index.js.map +1 -1
- package/build/components/panel-color-settings/index.js +1 -0
- package/build/components/panel-color-settings/index.js.map +1 -1
- package/build/components/provider/use-block-sync.js +1 -0
- package/build/components/provider/use-block-sync.js.map +1 -1
- package/build/components/responsive-block-control/index.js +1 -0
- package/build/components/responsive-block-control/index.js.map +1 -1
- package/build/components/rich-text/embed-handler-picker.native.js +1 -0
- package/build/components/rich-text/embed-handler-picker.native.js.map +1 -1
- package/build/components/rich-text/event-listeners/before-input-rules.js +1 -0
- package/build/components/rich-text/event-listeners/before-input-rules.js.map +1 -1
- package/build/components/rich-text/event-listeners/index.js +1 -0
- package/build/components/rich-text/event-listeners/index.js.map +1 -1
- package/build/components/rich-text/event-listeners/input-rules.js +1 -0
- package/build/components/rich-text/event-listeners/input-rules.js.map +1 -1
- package/build/components/rich-text/event-listeners/paste-handler.js +1 -0
- package/build/components/rich-text/event-listeners/paste-handler.js.map +1 -1
- package/build/components/rich-text/file-paste-handler.native.js +1 -0
- package/build/components/rich-text/file-paste-handler.native.js.map +1 -1
- package/build/components/rich-text/format-edit.js +1 -0
- package/build/components/rich-text/format-edit.js.map +1 -1
- package/build/components/rich-text/format-toolbar/index.js +1 -0
- package/build/components/rich-text/format-toolbar/index.js.map +1 -1
- package/build/components/rich-text/index.js +1 -0
- package/build/components/rich-text/index.js.map +1 -1
- package/build/components/rich-text/index.native.js +1 -0
- package/build/components/rich-text/index.native.js.map +1 -1
- package/build/components/rich-text/multiline.js +1 -0
- package/build/components/rich-text/multiline.js.map +1 -1
- package/build/components/rich-text/native/format-edit.js +1 -0
- package/build/components/rich-text/native/format-edit.js.map +1 -1
- package/build/components/rich-text/native/get-format-colors.native.js +1 -0
- package/build/components/rich-text/native/get-format-colors.native.js.map +1 -1
- package/build/components/rich-text/native/index.native.js +1 -0
- package/build/components/rich-text/native/index.native.js.map +1 -1
- package/build/components/rich-text/native/toolbar-button-with-options.native.js +1 -0
- 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 +1 -0
- package/build/components/rich-text/native/use-format-types.js.map +1 -1
- package/build/components/rich-text/use-format-types.js +1 -0
- package/build/components/rich-text/use-format-types.js.map +1 -1
- package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js +1 -0
- package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
- package/build/components/spacing-sizes-control/input-controls/axial.js +1 -0
- package/build/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
- package/build/components/spacing-sizes-control/input-controls/separated.js +1 -0
- package/build/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
- package/build/components/spacing-sizes-control/input-controls/single.js +1 -0
- 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 +1 -0
- package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
- package/build/components/spacing-sizes-control/utils.js +1 -0
- package/build/components/spacing-sizes-control/utils.js.map +1 -1
- package/build/components/tabbed-sidebar/index.js +1 -0
- package/build/components/tabbed-sidebar/index.js.map +1 -1
- package/build/components/text-alignment-control/index.js +1 -0
- package/build/components/text-alignment-control/index.js.map +1 -1
- package/build/components/text-decoration-control/index.js +1 -0
- package/build/components/text-decoration-control/index.js.map +1 -1
- package/build/components/text-transform-control/index.js +1 -0
- package/build/components/text-transform-control/index.js.map +1 -1
- package/build/components/unsupported-block-details/index.native.js +1 -0
- package/build/components/unsupported-block-details/index.native.js.map +1 -1
- package/build/components/url-input/index.js +1 -0
- package/build/components/url-input/index.js.map +1 -1
- package/build/components/url-popover/image-url-input-ui.js +1 -0
- package/build/components/url-popover/image-url-input-ui.js.map +1 -1
- package/build/components/use-block-commands/index.js +1 -0
- package/build/components/use-block-commands/index.js.map +1 -1
- package/build/components/use-block-drop-zone/index.js +1 -0
- package/build/components/use-block-drop-zone/index.js.map +1 -1
- package/build/components/use-block-drop-zone/index.native.js +1 -0
- package/build/components/use-block-drop-zone/index.native.js.map +1 -1
- package/build/components/use-flash-editable-blocks/index.js +1 -0
- package/build/components/use-flash-editable-blocks/index.js.map +1 -1
- package/build/components/use-on-block-drop/index.js +1 -0
- package/build/components/use-on-block-drop/index.js.map +1 -1
- package/build/components/use-on-block-drop/index.native.js +1 -0
- package/build/components/use-on-block-drop/index.native.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/warning/index.js +1 -0
- package/build/components/warning/index.js.map +1 -1
- package/build/components/writing-flow/use-arrow-nav.js +1 -0
- package/build/components/writing-flow/use-arrow-nav.js.map +1 -1
- package/build/components/writing-flow/use-clipboard-handler.js +1 -0
- package/build/components/writing-flow/use-clipboard-handler.js.map +1 -1
- package/build/components/writing-flow/use-input.js +1 -0
- package/build/components/writing-flow/use-input.js.map +1 -1
- package/build/components/writing-flow/use-tab-nav.js +1 -0
- package/build/components/writing-flow/use-tab-nav.js.map +1 -1
- package/build/components/writing-flow/utils.js +1 -0
- package/build/components/writing-flow/utils.js.map +1 -1
- package/build/components/writing-mode-control/index.js +1 -0
- package/build/components/writing-mode-control/index.js.map +1 -1
- package/build/hooks/align.js +1 -0
- package/build/hooks/align.js.map +1 -1
- package/build/hooks/align.native.js +1 -0
- package/build/hooks/align.native.js.map +1 -1
- package/build/hooks/block-bindings.js +1 -0
- package/build/hooks/block-bindings.js.map +1 -1
- package/build/hooks/block-hooks.js +1 -0
- package/build/hooks/block-hooks.js.map +1 -1
- package/build/hooks/block-style-variation.js +1 -0
- package/build/hooks/block-style-variation.js.map +1 -1
- package/build/hooks/border.js +1 -0
- package/build/hooks/border.js.map +1 -1
- package/build/hooks/duotone.js +1 -0
- package/build/hooks/duotone.js.map +1 -1
- package/build/hooks/index.js +1 -0
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/layout.js +1 -0
- package/build/hooks/layout.js.map +1 -1
- package/build/hooks/position.js +1 -0
- package/build/hooks/position.js.map +1 -1
- package/build/hooks/style.js +2 -1
- package/build/hooks/style.js.map +1 -1
- package/build/hooks/supports.js +1 -0
- package/build/hooks/supports.js.map +1 -1
- package/build/hooks/text-align.js +1 -0
- package/build/hooks/text-align.js.map +1 -1
- package/build/hooks/typography.js +1 -0
- package/build/hooks/typography.js.map +1 -1
- package/build/hooks/use-bindings-attributes.js +1 -0
- package/build/hooks/use-bindings-attributes.js.map +1 -1
- package/build/hooks/utils.js +1 -0
- package/build/hooks/utils.js.map +1 -1
- package/build/layouts/constrained.js +1 -0
- package/build/layouts/constrained.js.map +1 -1
- package/build/layouts/flex.js +1 -0
- package/build/layouts/flex.js.map +1 -1
- package/build/layouts/flow.js +1 -0
- package/build/layouts/flow.js.map +1 -1
- package/build/layouts/index.js +1 -0
- package/build/layouts/index.js.map +1 -1
- package/build/layouts/utils.js +1 -0
- package/build/layouts/utils.js.map +1 -1
- package/build/store/actions.js +1 -0
- package/build/store/actions.js.map +1 -1
- package/build/store/get-block-settings.js +1 -0
- package/build/store/get-block-settings.js.map +1 -1
- package/build/store/private-actions.js +1 -0
- package/build/store/private-actions.js.map +1 -1
- package/build/store/private-selectors.js +1 -0
- package/build/store/private-selectors.js.map +1 -1
- package/build/store/reducer.js +1 -0
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +13 -15
- package/build/store/selectors.js.map +1 -1
- package/build/store/utils.js +1 -0
- package/build/store/utils.js.map +1 -1
- package/build/utils/block-bindings.js +1 -0
- package/build/utils/block-bindings.js.map +1 -1
- package/build/utils/get-editor-region.js +1 -0
- package/build/utils/get-editor-region.js.map +1 -1
- package/build/utils/get-font-styles-and-weights.js +1 -0
- package/build/utils/get-font-styles-and-weights.js.map +1 -1
- package/build/utils/math.js +1 -0
- package/build/utils/math.js.map +1 -1
- package/build/utils/object.js +1 -0
- package/build/utils/object.js.map +1 -1
- package/build/utils/selection.js +1 -0
- package/build/utils/selection.js.map +1 -1
- package/build/utils/transform-styles/index.js +1 -0
- package/build/utils/transform-styles/index.js.map +1 -1
- package/build-module/autocompleters/block.js +1 -0
- package/build-module/autocompleters/block.js.map +1 -1
- package/build-module/autocompleters/link.js +1 -0
- package/build-module/autocompleters/link.js.map +1 -1
- package/build-module/components/alignment-control/ui.js +1 -0
- package/build-module/components/alignment-control/ui.js.map +1 -1
- package/build-module/components/autocomplete/index.js +1 -0
- package/build-module/components/autocomplete/index.js.map +1 -1
- package/build-module/components/background-image-control/index.js +1 -0
- package/build-module/components/background-image-control/index.js.map +1 -1
- package/build-module/components/block-actions/index.js +1 -0
- package/build-module/components/block-actions/index.js.map +1 -1
- package/build-module/components/block-alignment-control/ui.js +1 -0
- package/build-module/components/block-alignment-control/ui.js.map +1 -1
- package/build-module/components/block-alignment-control/ui.native.js +1 -0
- package/build-module/components/block-alignment-control/ui.native.js.map +1 -1
- package/build-module/components/block-alignment-control/use-available-alignments.js +1 -0
- package/build-module/components/block-alignment-control/use-available-alignments.js.map +1 -1
- package/build-module/components/block-breadcrumb/index.js +1 -0
- package/build-module/components/block-breadcrumb/index.js.map +1 -1
- package/build-module/components/block-compare/index.js +1 -0
- package/build-module/components/block-compare/index.js.map +1 -1
- package/build-module/components/block-controls/fill.js +1 -0
- package/build-module/components/block-controls/fill.js.map +1 -1
- package/build-module/components/block-edit/edit.js +1 -0
- package/build-module/components/block-edit/edit.js.map +1 -1
- package/build-module/components/block-edit/edit.native.js +1 -0
- package/build-module/components/block-edit/edit.native.js.map +1 -1
- package/build-module/components/block-heading-level-dropdown/index.js +1 -0
- package/build-module/components/block-heading-level-dropdown/index.js.map +1 -1
- package/build-module/components/block-heading-level-dropdown/index.native.js +1 -0
- package/build-module/components/block-heading-level-dropdown/index.native.js.map +1 -1
- package/build-module/components/block-inspector/index.js +1 -0
- package/build-module/components/block-inspector/index.js.map +1 -1
- package/build-module/components/block-list/block-invalid-warning.js +1 -0
- package/build-module/components/block-list/block-invalid-warning.js.map +1 -1
- package/build-module/components/block-list/block-list-context.native.js +1 -0
- package/build-module/components/block-list/block-list-context.native.js.map +1 -1
- package/build-module/components/block-list/block.js +1 -0
- package/build-module/components/block-list/block.js.map +1 -1
- package/build-module/components/block-list/block.native.js +1 -0
- package/build-module/components/block-list/block.native.js.map +1 -1
- package/build-module/components/block-list/index.js +1 -0
- package/build-module/components/block-list/index.js.map +1 -1
- package/build-module/components/block-list/index.native.js +1 -0
- package/build-module/components/block-list/index.native.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-focus-first-element.js +1 -0
- package/build-module/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
- package/build-module/components/block-list/use-in-between-inserter.js +1 -0
- package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
- package/build-module/components/block-lock/modal.js +1 -0
- package/build-module/components/block-lock/modal.js.map +1 -1
- package/build-module/components/block-manager/category.js +1 -0
- package/build-module/components/block-manager/category.js.map +1 -1
- package/build-module/components/block-manager/checklist.js +1 -0
- package/build-module/components/block-manager/checklist.js.map +1 -1
- package/build-module/components/block-manager/index.js +1 -0
- package/build-module/components/block-manager/index.js.map +1 -1
- package/build-module/components/block-media-update-progress/index.native.js +1 -0
- package/build-module/components/block-media-update-progress/index.native.js.map +1 -1
- package/build-module/components/block-mover/index.native.js +1 -0
- package/build-module/components/block-mover/index.native.js.map +1 -1
- package/build-module/components/block-mover/mover-description.native.js +1 -0
- package/build-module/components/block-mover/mover-description.native.js.map +1 -1
- package/build-module/components/block-pattern-setup/index.js +1 -0
- package/build-module/components/block-pattern-setup/index.js.map +1 -1
- package/build-module/components/block-pattern-setup/use-patterns-setup.js +1 -0
- package/build-module/components/block-pattern-setup/use-patterns-setup.js.map +1 -1
- package/build-module/components/block-patterns-list/index.js +1 -0
- package/build-module/components/block-patterns-list/index.js.map +1 -1
- package/build-module/components/block-quick-navigation/index.js +1 -0
- package/build-module/components/block-quick-navigation/index.js.map +1 -1
- package/build-module/components/block-rename/rename-control.js +1 -0
- package/build-module/components/block-rename/rename-control.js.map +1 -1
- package/build-module/components/block-settings-menu/block-settings-dropdown.js +1 -0
- package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build-module/components/block-styles/index.js +1 -0
- package/build-module/components/block-styles/index.js.map +1 -1
- package/build-module/components/block-styles/index.native.js +1 -0
- package/build-module/components/block-styles/index.native.js.map +1 -1
- package/build-module/components/block-styles/menu-items.js +1 -0
- package/build-module/components/block-styles/menu-items.js.map +1 -1
- package/build-module/components/block-styles/preview.native.js +1 -0
- package/build-module/components/block-styles/preview.native.js.map +1 -1
- package/build-module/components/block-switcher/block-transformations-menu.js +1 -0
- package/build-module/components/block-switcher/block-transformations-menu.js.map +1 -1
- package/build-module/components/block-switcher/block-transformations-menu.native.js +1 -0
- package/build-module/components/block-switcher/block-transformations-menu.native.js.map +1 -1
- package/build-module/components/block-switcher/block-variation-transformations.js +1 -0
- package/build-module/components/block-switcher/block-variation-transformations.js.map +1 -1
- package/build-module/components/block-switcher/index.js +1 -0
- package/build-module/components/block-switcher/index.js.map +1 -1
- package/build-module/components/block-switcher/pattern-transformations-menu.js +1 -0
- package/build-module/components/block-switcher/pattern-transformations-menu.js.map +1 -1
- package/build-module/components/block-switcher/use-transformed-patterns.js +1 -0
- package/build-module/components/block-switcher/use-transformed-patterns.js.map +1 -1
- package/build-module/components/block-switcher/utils.js +1 -0
- package/build-module/components/block-switcher/utils.js.map +1 -1
- package/build-module/components/block-toolbar/block-toolbar-menu.native.js +1 -0
- package/build-module/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
- package/build-module/components/block-toolbar/change-design.js +1 -0
- package/build-module/components/block-toolbar/change-design.js.map +1 -1
- package/build-module/components/block-toolbar/index.js +1 -0
- package/build-module/components/block-toolbar/index.js.map +1 -1
- package/build-module/components/block-tools/use-selected-block-tool-props.js +1 -0
- package/build-module/components/block-tools/use-selected-block-tool-props.js.map +1 -1
- package/build-module/components/block-types-list/index.js +1 -0
- package/build-module/components/block-types-list/index.js.map +1 -1
- package/build-module/components/block-variation-picker/index.js +1 -0
- package/build-module/components/block-variation-picker/index.js.map +1 -1
- package/build-module/components/block-variation-picker/index.native.js +1 -0
- package/build-module/components/block-variation-picker/index.native.js.map +1 -1
- package/build-module/components/block-variation-transforms/index.js +1 -0
- package/build-module/components/block-variation-transforms/index.js.map +1 -1
- package/build-module/components/block-vertical-alignment-control/ui.js +1 -0
- package/build-module/components/block-vertical-alignment-control/ui.js.map +1 -1
- package/build-module/components/border-radius-control/index.js +1 -0
- package/build-module/components/border-radius-control/index.js.map +1 -1
- package/build-module/components/border-radius-control/input-controls.js +1 -0
- package/build-module/components/border-radius-control/input-controls.js.map +1 -1
- package/build-module/components/border-radius-control/utils.js +1 -0
- package/build-module/components/border-radius-control/utils.js.map +1 -1
- package/build-module/components/colors/utils.js +1 -0
- package/build-module/components/colors/utils.js.map +1 -1
- package/build-module/components/colors/with-colors.js +1 -0
- package/build-module/components/colors/with-colors.js.map +1 -1
- package/build-module/components/colors-gradients/dropdown.js +1 -0
- package/build-module/components/colors-gradients/dropdown.js.map +1 -1
- package/build-module/components/colors-gradients/panel-color-gradient-settings.js +1 -0
- package/build-module/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
- package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js +1 -0
- package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
- package/build-module/components/convert-to-group-buttons/toolbar.js +1 -0
- package/build-module/components/convert-to-group-buttons/toolbar.js.map +1 -1
- package/build-module/components/date-format-picker/index.js +1 -0
- package/build-module/components/date-format-picker/index.js.map +1 -1
- package/build-module/components/dimensions-tool/scale-tool.js +1 -0
- package/build-module/components/dimensions-tool/scale-tool.js.map +1 -1
- package/build-module/components/duotone/utils.js +1 -0
- package/build-module/components/duotone/utils.js.map +1 -1
- package/build-module/components/editor-styles/index.js +1 -0
- package/build-module/components/editor-styles/index.js.map +1 -1
- package/build-module/components/font-appearance-control/index.js +1 -0
- package/build-module/components/font-appearance-control/index.js.map +1 -1
- package/build-module/components/font-family/index.js +1 -0
- package/build-module/components/font-family/index.js.map +1 -1
- package/build-module/components/font-sizes/with-font-sizes.js +1 -0
- package/build-module/components/font-sizes/with-font-sizes.js.map +1 -1
- package/build-module/components/global-styles/border-panel.js +1 -0
- package/build-module/components/global-styles/border-panel.js.map +1 -1
- package/build-module/components/global-styles/color-panel.js +27 -10
- package/build-module/components/global-styles/color-panel.js.map +1 -1
- package/build-module/components/global-styles/color-panel.native.js +1 -0
- package/build-module/components/global-styles/color-panel.native.js.map +1 -1
- package/build-module/components/global-styles/dimensions-panel.js +1 -0
- package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
- package/build-module/components/global-styles/filters-panel.js +4 -3
- package/build-module/components/global-styles/filters-panel.js.map +1 -1
- package/build-module/components/global-styles/get-global-styles-changes.js +1 -0
- package/build-module/components/global-styles/get-global-styles-changes.js.map +1 -1
- package/build-module/components/global-styles/shadow-panel-components.js +1 -0
- package/build-module/components/global-styles/shadow-panel-components.js.map +1 -1
- package/build-module/components/global-styles/typography-utils.js +1 -0
- package/build-module/components/global-styles/typography-utils.js.map +1 -1
- package/build-module/components/global-styles/use-global-styles-context.native.js +1 -0
- package/build-module/components/global-styles/use-global-styles-context.native.js.map +1 -1
- package/build-module/components/global-styles/use-global-styles-output.js +2 -1
- package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build-module/components/global-styles/utils.js +1 -0
- package/build-module/components/global-styles/utils.js.map +1 -1
- package/build-module/components/grid/grid-visualizer.js +1 -0
- package/build-module/components/grid/grid-visualizer.js.map +1 -1
- package/build-module/components/grid/use-grid-layout-sync.js +1 -0
- package/build-module/components/grid/use-grid-layout-sync.js.map +1 -1
- package/build-module/components/grid/utils.js +1 -0
- package/build-module/components/grid/utils.js.map +1 -1
- package/build-module/components/iframe/get-compatibility-styles.js +1 -0
- package/build-module/components/iframe/get-compatibility-styles.js.map +1 -1
- package/build-module/components/image-editor/aspect-ratio-dropdown.js +1 -0
- package/build-module/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
- package/build-module/components/index.js +4 -4
- package/build-module/components/index.js.map +1 -1
- package/build-module/components/inner-blocks/use-block-context.js +1 -0
- package/build-module/components/inner-blocks/use-block-context.js.map +1 -1
- package/build-module/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js +1 -0
- 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 +1 -0
- package/build-module/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js +1 -0
- package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab/use-pattern-categories.js +1 -0
- package/build-module/components/inserter/block-patterns-tab/use-pattern-categories.js.map +1 -1
- package/build-module/components/inserter/block-types-tab.js +2 -1
- package/build-module/components/inserter/block-types-tab.js.map +1 -1
- package/build-module/components/inserter/block-types-tab.native.js +1 -0
- package/build-module/components/inserter/block-types-tab.native.js.map +1 -1
- package/build-module/components/inserter/category-tabs/index.js +1 -0
- package/build-module/components/inserter/category-tabs/index.js.map +1 -1
- package/build-module/components/inserter/hooks/use-block-type-impressions.native.js +1 -0
- package/build-module/components/inserter/hooks/use-block-type-impressions.native.js.map +1 -1
- package/build-module/components/inserter/hooks/use-patterns-state.js +1 -0
- package/build-module/components/inserter/hooks/use-patterns-state.js.map +1 -1
- package/build-module/components/inserter/index.js +1 -0
- package/build-module/components/inserter/index.js.map +1 -1
- package/build-module/components/inserter/index.native.js +1 -0
- package/build-module/components/inserter/index.native.js.map +1 -1
- package/build-module/components/inserter/media-tab/hooks.js +1 -0
- package/build-module/components/inserter/media-tab/hooks.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-list.js +1 -0
- package/build-module/components/inserter/media-tab/media-list.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-tab.js +1 -0
- package/build-module/components/inserter/media-tab/media-tab.js.map +1 -1
- package/build-module/components/inserter/menu.js +1 -0
- package/build-module/components/inserter/menu.js.map +1 -1
- package/build-module/components/inserter/mobile-tab-navigation.js +1 -0
- package/build-module/components/inserter/mobile-tab-navigation.js.map +1 -1
- package/build-module/components/inserter/search-items.js +1 -0
- package/build-module/components/inserter/search-items.js.map +1 -1
- package/build-module/components/inserter/search-results.js +1 -0
- package/build-module/components/inserter/search-results.js.map +1 -1
- package/build-module/components/inserter/tabs.native.js +1 -0
- package/build-module/components/inserter/tabs.native.js.map +1 -1
- package/build-module/components/inserter/utils.native.js +1 -0
- package/build-module/components/inserter/utils.native.js.map +1 -1
- package/build-module/components/inspector-controls/block-support-tools-panel.js +1 -0
- package/build-module/components/inspector-controls/block-support-tools-panel.js.map +1 -1
- package/build-module/components/inspector-controls/fill.js +1 -0
- package/build-module/components/inspector-controls/fill.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/index.js +1 -0
- package/build-module/components/inspector-controls-tabs/index.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/position-controls-panel.js +1 -0
- package/build-module/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
- package/build-module/components/inspector-popover-header/index.js +1 -0
- package/build-module/components/inspector-popover-header/index.js.map +1 -1
- package/build-module/components/justify-content-control/ui.js +1 -0
- package/build-module/components/justify-content-control/ui.js.map +1 -1
- package/build-module/components/link-control/index.js +11 -0
- package/build-module/components/link-control/index.js.map +1 -1
- package/build-module/components/link-control/search-input.js +9 -0
- package/build-module/components/link-control/search-input.js.map +1 -1
- package/build-module/components/link-control/search-item.js +9 -0
- package/build-module/components/link-control/search-item.js.map +1 -1
- package/build-module/components/link-control/search-results.js +12 -1
- package/build-module/components/link-control/search-results.js.map +1 -1
- package/build-module/components/link-control/settings.js +1 -0
- package/build-module/components/link-control/settings.js.map +1 -1
- package/build-module/components/link-control/use-internal-value.js +1 -0
- package/build-module/components/link-control/use-internal-value.js.map +1 -1
- package/build-module/components/link-control/use-search-handler.js +1 -0
- package/build-module/components/link-control/use-search-handler.js.map +1 -1
- package/build-module/components/list-view/block-select-button.js +1 -0
- package/build-module/components/list-view/block-select-button.js.map +1 -1
- package/build-module/components/list-view/block.js +1 -0
- package/build-module/components/list-view/block.js.map +1 -1
- package/build-module/components/list-view/branch.js +1 -0
- package/build-module/components/list-view/branch.js.map +1 -1
- package/build-module/components/list-view/index.js +1 -0
- package/build-module/components/list-view/index.js.map +1 -1
- package/build-module/components/list-view/use-block-selection.js +1 -0
- package/build-module/components/list-view/use-block-selection.js.map +1 -1
- package/build-module/components/list-view/use-clipboard-handler.js +1 -0
- 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 +1 -0
- package/build-module/components/list-view/use-list-view-block-indexes.js.map +1 -1
- package/build-module/components/list-view/use-list-view-drop-zone.js +1 -0
- package/build-module/components/list-view/use-list-view-drop-zone.js.map +1 -1
- package/build-module/components/list-view/utils.js +1 -0
- package/build-module/components/list-view/utils.js.map +1 -1
- package/build-module/components/media-placeholder/index.js +1 -0
- package/build-module/components/media-placeholder/index.js.map +1 -1
- package/build-module/components/media-placeholder/index.native.js +1 -0
- package/build-module/components/media-placeholder/index.native.js.map +1 -1
- package/build-module/components/media-replace-flow/index.js +1 -0
- package/build-module/components/media-replace-flow/index.js.map +1 -1
- package/build-module/components/media-upload/index.native.js +1 -0
- package/build-module/components/media-upload/index.native.js.map +1 -1
- package/build-module/components/navigable-toolbar/index.js +1 -0
- package/build-module/components/navigable-toolbar/index.js.map +1 -1
- package/build-module/components/panel-color-settings/index.js +1 -0
- package/build-module/components/panel-color-settings/index.js.map +1 -1
- package/build-module/components/provider/use-block-sync.js +1 -0
- package/build-module/components/provider/use-block-sync.js.map +1 -1
- package/build-module/components/responsive-block-control/index.js +1 -0
- package/build-module/components/responsive-block-control/index.js.map +1 -1
- package/build-module/components/rich-text/embed-handler-picker.native.js +1 -0
- package/build-module/components/rich-text/embed-handler-picker.native.js.map +1 -1
- package/build-module/components/rich-text/event-listeners/before-input-rules.js +1 -0
- package/build-module/components/rich-text/event-listeners/before-input-rules.js.map +1 -1
- package/build-module/components/rich-text/event-listeners/index.js +1 -0
- package/build-module/components/rich-text/event-listeners/index.js.map +1 -1
- package/build-module/components/rich-text/event-listeners/input-rules.js +1 -0
- package/build-module/components/rich-text/event-listeners/input-rules.js.map +1 -1
- package/build-module/components/rich-text/event-listeners/paste-handler.js +1 -0
- package/build-module/components/rich-text/event-listeners/paste-handler.js.map +1 -1
- package/build-module/components/rich-text/file-paste-handler.native.js +1 -0
- package/build-module/components/rich-text/file-paste-handler.native.js.map +1 -1
- package/build-module/components/rich-text/format-edit.js +1 -0
- package/build-module/components/rich-text/format-edit.js.map +1 -1
- package/build-module/components/rich-text/format-toolbar/index.js +1 -0
- package/build-module/components/rich-text/format-toolbar/index.js.map +1 -1
- package/build-module/components/rich-text/index.js +1 -0
- package/build-module/components/rich-text/index.js.map +1 -1
- package/build-module/components/rich-text/index.native.js +1 -0
- package/build-module/components/rich-text/index.native.js.map +1 -1
- package/build-module/components/rich-text/multiline.js +1 -0
- package/build-module/components/rich-text/multiline.js.map +1 -1
- package/build-module/components/rich-text/native/format-edit.js +1 -0
- 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 +1 -0
- package/build-module/components/rich-text/native/get-format-colors.native.js.map +1 -1
- package/build-module/components/rich-text/native/index.native.js +1 -0
- package/build-module/components/rich-text/native/index.native.js.map +1 -1
- package/build-module/components/rich-text/native/toolbar-button-with-options.native.js +1 -0
- package/build-module/components/rich-text/native/toolbar-button-with-options.native.js.map +1 -1
- package/build-module/components/rich-text/native/use-format-types.js +1 -0
- package/build-module/components/rich-text/native/use-format-types.js.map +1 -1
- package/build-module/components/rich-text/use-format-types.js +1 -0
- package/build-module/components/rich-text/use-format-types.js.map +1 -1
- package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.js +1 -0
- package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
- package/build-module/components/spacing-sizes-control/input-controls/axial.js +1 -0
- package/build-module/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
- package/build-module/components/spacing-sizes-control/input-controls/separated.js +1 -0
- 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 +1 -0
- 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 +1 -0
- package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
- package/build-module/components/spacing-sizes-control/utils.js +1 -0
- package/build-module/components/spacing-sizes-control/utils.js.map +1 -1
- package/build-module/components/tabbed-sidebar/index.js +1 -0
- package/build-module/components/tabbed-sidebar/index.js.map +1 -1
- package/build-module/components/text-alignment-control/index.js +1 -0
- package/build-module/components/text-alignment-control/index.js.map +1 -1
- package/build-module/components/text-decoration-control/index.js +1 -0
- package/build-module/components/text-decoration-control/index.js.map +1 -1
- package/build-module/components/text-transform-control/index.js +1 -0
- package/build-module/components/text-transform-control/index.js.map +1 -1
- package/build-module/components/unsupported-block-details/index.native.js +1 -0
- package/build-module/components/unsupported-block-details/index.native.js.map +1 -1
- package/build-module/components/url-input/index.js +1 -0
- package/build-module/components/url-input/index.js.map +1 -1
- package/build-module/components/url-popover/image-url-input-ui.js +1 -0
- package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
- package/build-module/components/use-block-commands/index.js +1 -0
- package/build-module/components/use-block-commands/index.js.map +1 -1
- package/build-module/components/use-block-drop-zone/index.js +1 -0
- package/build-module/components/use-block-drop-zone/index.js.map +1 -1
- package/build-module/components/use-block-drop-zone/index.native.js +1 -0
- package/build-module/components/use-block-drop-zone/index.native.js.map +1 -1
- package/build-module/components/use-flash-editable-blocks/index.js +1 -0
- package/build-module/components/use-flash-editable-blocks/index.js.map +1 -1
- package/build-module/components/use-on-block-drop/index.js +1 -0
- package/build-module/components/use-on-block-drop/index.js.map +1 -1
- package/build-module/components/use-on-block-drop/index.native.js +1 -0
- package/build-module/components/use-on-block-drop/index.native.js.map +1 -1
- package/build-module/components/use-paste-styles/index.js +1 -0
- package/build-module/components/use-paste-styles/index.js.map +1 -1
- package/build-module/components/warning/index.js +1 -0
- package/build-module/components/warning/index.js.map +1 -1
- package/build-module/components/writing-flow/use-arrow-nav.js +1 -0
- package/build-module/components/writing-flow/use-arrow-nav.js.map +1 -1
- package/build-module/components/writing-flow/use-clipboard-handler.js +1 -0
- package/build-module/components/writing-flow/use-clipboard-handler.js.map +1 -1
- package/build-module/components/writing-flow/use-input.js +1 -0
- package/build-module/components/writing-flow/use-input.js.map +1 -1
- package/build-module/components/writing-flow/use-tab-nav.js +1 -0
- package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
- package/build-module/components/writing-flow/utils.js +1 -0
- package/build-module/components/writing-flow/utils.js.map +1 -1
- package/build-module/components/writing-mode-control/index.js +1 -0
- package/build-module/components/writing-mode-control/index.js.map +1 -1
- package/build-module/hooks/align.js +1 -0
- package/build-module/hooks/align.js.map +1 -1
- package/build-module/hooks/align.native.js +1 -0
- package/build-module/hooks/align.native.js.map +1 -1
- package/build-module/hooks/block-bindings.js +1 -0
- package/build-module/hooks/block-bindings.js.map +1 -1
- package/build-module/hooks/block-hooks.js +1 -0
- package/build-module/hooks/block-hooks.js.map +1 -1
- package/build-module/hooks/block-style-variation.js +1 -0
- package/build-module/hooks/block-style-variation.js.map +1 -1
- package/build-module/hooks/border.js +1 -0
- package/build-module/hooks/border.js.map +1 -1
- package/build-module/hooks/duotone.js +1 -0
- package/build-module/hooks/duotone.js.map +1 -1
- package/build-module/hooks/index.js +1 -0
- package/build-module/hooks/index.js.map +1 -1
- package/build-module/hooks/layout.js +1 -0
- package/build-module/hooks/layout.js.map +1 -1
- package/build-module/hooks/position.js +1 -0
- package/build-module/hooks/position.js.map +1 -1
- package/build-module/hooks/style.js +2 -1
- package/build-module/hooks/style.js.map +1 -1
- package/build-module/hooks/supports.js +1 -0
- package/build-module/hooks/supports.js.map +1 -1
- package/build-module/hooks/text-align.js +1 -0
- package/build-module/hooks/text-align.js.map +1 -1
- package/build-module/hooks/typography.js +1 -0
- package/build-module/hooks/typography.js.map +1 -1
- package/build-module/hooks/use-bindings-attributes.js +1 -0
- package/build-module/hooks/use-bindings-attributes.js.map +1 -1
- package/build-module/hooks/utils.js +1 -0
- package/build-module/hooks/utils.js.map +1 -1
- package/build-module/layouts/constrained.js +1 -0
- package/build-module/layouts/constrained.js.map +1 -1
- package/build-module/layouts/flex.js +1 -0
- package/build-module/layouts/flex.js.map +1 -1
- package/build-module/layouts/flow.js +1 -0
- package/build-module/layouts/flow.js.map +1 -1
- package/build-module/layouts/index.js +1 -0
- package/build-module/layouts/index.js.map +1 -1
- package/build-module/layouts/utils.js +1 -0
- package/build-module/layouts/utils.js.map +1 -1
- package/build-module/store/actions.js +1 -0
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/get-block-settings.js +1 -0
- package/build-module/store/get-block-settings.js.map +1 -1
- package/build-module/store/private-actions.js +1 -0
- package/build-module/store/private-actions.js.map +1 -1
- package/build-module/store/private-selectors.js +1 -0
- package/build-module/store/private-selectors.js.map +1 -1
- package/build-module/store/reducer.js +1 -0
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +13 -15
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/store/utils.js +1 -0
- package/build-module/store/utils.js.map +1 -1
- package/build-module/utils/block-bindings.js +1 -0
- package/build-module/utils/block-bindings.js.map +1 -1
- package/build-module/utils/get-editor-region.js +1 -0
- package/build-module/utils/get-editor-region.js.map +1 -1
- package/build-module/utils/get-font-styles-and-weights.js +1 -0
- package/build-module/utils/get-font-styles-and-weights.js.map +1 -1
- package/build-module/utils/math.js +1 -0
- package/build-module/utils/math.js.map +1 -1
- package/build-module/utils/object.js +1 -0
- package/build-module/utils/object.js.map +1 -1
- package/build-module/utils/selection.js +1 -0
- package/build-module/utils/selection.js.map +1 -1
- package/build-module/utils/transform-styles/index.js +1 -0
- package/build-module/utils/transform-styles/index.js.map +1 -1
- package/build-style/style-rtl.css +22 -0
- package/build-style/style.css +22 -0
- package/package.json +32 -32
- package/src/components/block-heading-level-dropdown/stories/index.story.js +61 -0
- package/src/components/colors-gradients/style.scss +21 -0
- package/src/components/global-styles/color-panel.js +26 -7
- package/src/components/global-styles/filters-panel.js +3 -6
- package/src/components/global-styles/use-global-styles-output.js +1 -1
- package/src/components/index.js +7 -4
- package/src/components/inserter/block-types-tab.js +1 -1
- package/src/components/inserter/menu.js +2 -0
- package/src/components/link-control/index.js +10 -0
- package/src/components/link-control/search-input.js +9 -0
- package/src/components/link-control/search-item.js +9 -0
- package/src/components/link-control/search-results.js +12 -1
- package/src/components/writing-mode-control/stories/index.story.js +56 -0
- package/src/hooks/style.js +1 -1
- package/src/hooks/test/font-size.js +15 -12
- package/src/store/selectors.js +26 -24
- package/src/store/test/selectors.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_i18n","require","_components","_icons","_dom","_url","_compose","_jsxRuntime","ICONS_MAP","post","postList","page","post_tag","tag","category","attachment","file","SearchItemIcon","isURL","suggestion","icon","globe","type","isFrontPage","home","isBlogHome","verse","jsx","Icon","className","addLeadingSlash","url","trimmedURL","trim","length","replace","removeTrailingSlash","partialRight","fn","partialArgs","args","defaultTo","d","v","undefined","getURLForDisplay","pipe","safeDecodeURI","getPath","filterURLForDisplay","LinkControlSearchItem","itemProps","searchTerm","onClick","shouldShowType","info","__","MenuItem","iconPosition","shortcut","getVisualTypeName","children","TextHighlight","text","stripHTML","title","highlight","exports","_default","default"],"sources":["@wordpress/block-editor/src/components/link-control/search-item.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { MenuItem, TextHighlight } from '@wordpress/components';\nimport {\n\tIcon,\n\tglobe,\n\tpage,\n\ttag,\n\tpostList,\n\tcategory,\n\tfile,\n\thome,\n\tverse,\n} from '@wordpress/icons';\nimport { __unstableStripHTML as stripHTML } from '@wordpress/dom';\nimport { safeDecodeURI, filterURLForDisplay, getPath } from '@wordpress/url';\nimport { pipe } from '@wordpress/compose';\n\nconst ICONS_MAP = {\n\tpost: postList,\n\tpage,\n\tpost_tag: tag,\n\tcategory,\n\tattachment: file,\n};\n\nfunction SearchItemIcon( { isURL, suggestion } ) {\n\tlet icon = null;\n\n\tif ( isURL ) {\n\t\ticon = globe;\n\t} else if ( suggestion.type in ICONS_MAP ) {\n\t\ticon = ICONS_MAP[ suggestion.type ];\n\t\tif ( suggestion.type === 'page' ) {\n\t\t\tif ( suggestion.isFrontPage ) {\n\t\t\t\ticon = home;\n\t\t\t}\n\t\t\tif ( suggestion.isBlogHome ) {\n\t\t\t\ticon = verse;\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( icon ) {\n\t\treturn (\n\t\t\t<Icon\n\t\t\t\tclassName=\"block-editor-link-control__search-item-icon\"\n\t\t\t\ticon={ icon }\n\t\t\t/>\n\t\t);\n\t}\n\n\treturn null;\n}\n\n/**\n * Adds a leading slash to a url if it doesn't already have one.\n * @param {string} url the url to add a leading slash to.\n * @return {string} the url with a leading slash.\n */\nfunction addLeadingSlash( url ) {\n\tconst trimmedURL = url?.trim();\n\n\tif ( ! trimmedURL?.length ) {\n\t\treturn url;\n\t}\n\n\treturn url?.replace( /^\\/?/, '/' );\n}\n\nfunction removeTrailingSlash( url ) {\n\tconst trimmedURL = url?.trim();\n\n\tif ( ! trimmedURL?.length ) {\n\t\treturn url;\n\t}\n\n\treturn url?.replace( /\\/$/, '' );\n}\n\nconst partialRight =\n\t( fn, ...partialArgs ) =>\n\t( ...args ) =>\n\t\tfn( ...args, ...partialArgs );\n\nconst defaultTo = ( d ) => ( v ) => {\n\treturn v === null || v === undefined || v !== v ? d : v;\n};\n\n/**\n * Prepares a URL for display in the UI.\n * - decodes the URL.\n * - filters it (removes protocol, www, etc.).\n * - truncates it if necessary.\n * - adds a leading slash.\n * @param {string} url the url.\n * @return {string} the processed url to display.\n */\nfunction getURLForDisplay( url ) {\n\tif ( ! url ) {\n\t\treturn url;\n\t}\n\n\treturn pipe(\n\t\tsafeDecodeURI,\n\t\tgetPath,\n\t\tdefaultTo( '' ),\n\t\tpartialRight( filterURLForDisplay, 24 ),\n\t\tremoveTrailingSlash,\n\t\taddLeadingSlash\n\t)( url );\n}\n\nexport const LinkControlSearchItem = ( {\n\titemProps,\n\tsuggestion,\n\tsearchTerm,\n\tonClick,\n\tisURL = false,\n\tshouldShowType = false,\n} ) => {\n\tconst info = isURL\n\t\t? __( 'Press ENTER to add this link' )\n\t\t: getURLForDisplay( suggestion.url );\n\n\treturn (\n\t\t<MenuItem\n\t\t\t{ ...itemProps }\n\t\t\tinfo={ info }\n\t\t\ticonPosition=\"left\"\n\t\t\ticon={\n\t\t\t\t<SearchItemIcon suggestion={ suggestion } isURL={ isURL } />\n\t\t\t}\n\t\t\tonClick={ onClick }\n\t\t\tshortcut={ shouldShowType && getVisualTypeName( suggestion ) }\n\t\t\tclassName=\"block-editor-link-control__search-item\"\n\t\t>\n\t\t\t<TextHighlight\n\t\t\t\t// The component expects a plain text string.\n\t\t\t\ttext={ stripHTML( suggestion.title ) }\n\t\t\t\thighlight={ searchTerm }\n\t\t\t/>\n\t\t</MenuItem>\n\t);\n};\n\nfunction getVisualTypeName( suggestion ) {\n\tif ( suggestion.isFrontPage ) {\n\t\treturn 'front page';\n\t}\n\n\tif ( suggestion.isBlogHome ) {\n\t\treturn 'blog home';\n\t}\n\n\t// Rename 'post_tag' to 'tag'. Ideally, the API would return the localised CPT or taxonomy label.\n\treturn suggestion.type === 'post_tag' ? 'tag' : suggestion.type;\n}\n\nexport default LinkControlSearchItem;\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_i18n","require","_components","_icons","_dom","_url","_compose","_deprecated","_interopRequireDefault","_jsxRuntime","ICONS_MAP","post","postList","page","post_tag","tag","category","attachment","file","SearchItemIcon","isURL","suggestion","icon","globe","type","isFrontPage","home","isBlogHome","verse","jsx","Icon","className","addLeadingSlash","url","trimmedURL","trim","length","replace","removeTrailingSlash","partialRight","fn","partialArgs","args","defaultTo","d","v","undefined","getURLForDisplay","pipe","safeDecodeURI","getPath","filterURLForDisplay","LinkControlSearchItem","itemProps","searchTerm","onClick","shouldShowType","info","__","MenuItem","iconPosition","shortcut","getVisualTypeName","children","TextHighlight","text","stripHTML","title","highlight","exports","_default","default","__experimentalLinkControlSearchItem","props","deprecated","since"],"sources":["@wordpress/block-editor/src/components/link-control/search-item.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { MenuItem, TextHighlight } from '@wordpress/components';\nimport {\n\tIcon,\n\tglobe,\n\tpage,\n\ttag,\n\tpostList,\n\tcategory,\n\tfile,\n\thome,\n\tverse,\n} from '@wordpress/icons';\nimport { __unstableStripHTML as stripHTML } from '@wordpress/dom';\nimport { safeDecodeURI, filterURLForDisplay, getPath } from '@wordpress/url';\nimport { pipe } from '@wordpress/compose';\nimport deprecated from '@wordpress/deprecated';\n\nconst ICONS_MAP = {\n\tpost: postList,\n\tpage,\n\tpost_tag: tag,\n\tcategory,\n\tattachment: file,\n};\n\nfunction SearchItemIcon( { isURL, suggestion } ) {\n\tlet icon = null;\n\n\tif ( isURL ) {\n\t\ticon = globe;\n\t} else if ( suggestion.type in ICONS_MAP ) {\n\t\ticon = ICONS_MAP[ suggestion.type ];\n\t\tif ( suggestion.type === 'page' ) {\n\t\t\tif ( suggestion.isFrontPage ) {\n\t\t\t\ticon = home;\n\t\t\t}\n\t\t\tif ( suggestion.isBlogHome ) {\n\t\t\t\ticon = verse;\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( icon ) {\n\t\treturn (\n\t\t\t<Icon\n\t\t\t\tclassName=\"block-editor-link-control__search-item-icon\"\n\t\t\t\ticon={ icon }\n\t\t\t/>\n\t\t);\n\t}\n\n\treturn null;\n}\n\n/**\n * Adds a leading slash to a url if it doesn't already have one.\n * @param {string} url the url to add a leading slash to.\n * @return {string} the url with a leading slash.\n */\nfunction addLeadingSlash( url ) {\n\tconst trimmedURL = url?.trim();\n\n\tif ( ! trimmedURL?.length ) {\n\t\treturn url;\n\t}\n\n\treturn url?.replace( /^\\/?/, '/' );\n}\n\nfunction removeTrailingSlash( url ) {\n\tconst trimmedURL = url?.trim();\n\n\tif ( ! trimmedURL?.length ) {\n\t\treturn url;\n\t}\n\n\treturn url?.replace( /\\/$/, '' );\n}\n\nconst partialRight =\n\t( fn, ...partialArgs ) =>\n\t( ...args ) =>\n\t\tfn( ...args, ...partialArgs );\n\nconst defaultTo = ( d ) => ( v ) => {\n\treturn v === null || v === undefined || v !== v ? d : v;\n};\n\n/**\n * Prepares a URL for display in the UI.\n * - decodes the URL.\n * - filters it (removes protocol, www, etc.).\n * - truncates it if necessary.\n * - adds a leading slash.\n * @param {string} url the url.\n * @return {string} the processed url to display.\n */\nfunction getURLForDisplay( url ) {\n\tif ( ! url ) {\n\t\treturn url;\n\t}\n\n\treturn pipe(\n\t\tsafeDecodeURI,\n\t\tgetPath,\n\t\tdefaultTo( '' ),\n\t\tpartialRight( filterURLForDisplay, 24 ),\n\t\tremoveTrailingSlash,\n\t\taddLeadingSlash\n\t)( url );\n}\n\nexport const LinkControlSearchItem = ( {\n\titemProps,\n\tsuggestion,\n\tsearchTerm,\n\tonClick,\n\tisURL = false,\n\tshouldShowType = false,\n} ) => {\n\tconst info = isURL\n\t\t? __( 'Press ENTER to add this link' )\n\t\t: getURLForDisplay( suggestion.url );\n\n\treturn (\n\t\t<MenuItem\n\t\t\t{ ...itemProps }\n\t\t\tinfo={ info }\n\t\t\ticonPosition=\"left\"\n\t\t\ticon={\n\t\t\t\t<SearchItemIcon suggestion={ suggestion } isURL={ isURL } />\n\t\t\t}\n\t\t\tonClick={ onClick }\n\t\t\tshortcut={ shouldShowType && getVisualTypeName( suggestion ) }\n\t\t\tclassName=\"block-editor-link-control__search-item\"\n\t\t>\n\t\t\t<TextHighlight\n\t\t\t\t// The component expects a plain text string.\n\t\t\t\ttext={ stripHTML( suggestion.title ) }\n\t\t\t\thighlight={ searchTerm }\n\t\t\t/>\n\t\t</MenuItem>\n\t);\n};\n\nfunction getVisualTypeName( suggestion ) {\n\tif ( suggestion.isFrontPage ) {\n\t\treturn 'front page';\n\t}\n\n\tif ( suggestion.isBlogHome ) {\n\t\treturn 'blog home';\n\t}\n\n\t// Rename 'post_tag' to 'tag'. Ideally, the API would return the localised CPT or taxonomy label.\n\treturn suggestion.type === 'post_tag' ? 'tag' : suggestion.type;\n}\n\nexport default LinkControlSearchItem;\n\nexport const __experimentalLinkControlSearchItem = ( props ) => {\n\tdeprecated( 'wp.blockEditor.__experimentalLinkControlSearchItem', {\n\t\tsince: '6.8',\n\t} );\n\n\treturn <LinkControlSearchItem { ...props } />;\n};\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAWA,IAAAG,IAAA,GAAAH,OAAA;AACA,IAAAI,IAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAC,sBAAA,CAAAP,OAAA;AAA+C,IAAAQ,WAAA,GAAAR,OAAA;AAnB/C;AACA;AACA;;AAmBA,MAAMS,SAAS,GAAG;EACjBC,IAAI,EAAEC,eAAQ;EACdC,IAAI,EAAJA,WAAI;EACJC,QAAQ,EAAEC,UAAG;EACb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U,SAAS,EAAC,wCAAwC;IAAAgC,QAAA,eAElD,IAAAtD,WAAA,CAAAoB,GAAA,EAAC3B,WAAA,CAAA8D;IACA;IAAA;MACAC,IAAI,EAAG,IAAAC,wBAAS,EAAE7C,UAAU,CAAC8C,KAAM,CAAG;MACtCC,SAAS,EAAGd;IAAY,CACxB;EAAC,CACO,CAAC;AAEb,CAAC;AAACe,OAAA,CAAAjB,qBAAA,GAAAA,qBAAA;AAEF,SAASU,iBAAiBA,CAAEzC,UAAU,EAAG;EACxC,IAAKA,UAAU,CAACI,WAAW,EAAG;IAC7B,OAAO,YAAY;EACpB;EAEA,IAAKJ,UAAU,CAACM,UAAU,EAAG;IAC5B,OAAO,WAAW;EACnB;;EAEA;EACA,OAAON,UAAU,CAACG,IAAI,KAAK,UAAU,GAAG,KAAK,GAAGH,UAAU,CAACG,IAAI;AAChE;AAAC,IAAA8C,QAAA,GAAAD,OAAA,CAAAE,OAAA,GAEcnB,qBAAqB;AAE7B,MAAMoB,mCAAmC,GAAKC,KAAK,IAAM;EAC/D,IAAAC,mBAAU,EAAE,oDAAoD,EAAE;IACjEC,KAAK,EAAE;EACR,CAAE,CAAC;EAEH,oBAAO,IAAAlE,WAAA,CAAAoB,GAAA,EAACuB,qBAAqB;IAAA,GAAMqB;EAAK,CAAI,CAAC;AAC9C,CAAC;AAACJ,OAAA,CAAAG,mCAAA,GAAAA,mCAAA","ignoreList":[]}
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
+
/* wp:polyfill */
|
|
1
2
|
"use strict";
|
|
2
3
|
|
|
3
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
|
-
exports.default =
|
|
8
|
+
exports.default = exports.__experimentalLinkControlSearchResults = void 0;
|
|
8
9
|
var _i18n = require("@wordpress/i18n");
|
|
9
10
|
var _components = require("@wordpress/components");
|
|
10
11
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
11
12
|
var _searchCreateButton = _interopRequireDefault(require("./search-create-button"));
|
|
12
13
|
var _searchItem = _interopRequireDefault(require("./search-item"));
|
|
13
14
|
var _constants = require("./constants");
|
|
15
|
+
var _deprecated = _interopRequireDefault(require("@wordpress/deprecated"));
|
|
14
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
17
|
/**
|
|
16
18
|
* WordPress dependencies
|
|
@@ -93,4 +95,14 @@ function LinkControlSearchResults({
|
|
|
93
95
|
})
|
|
94
96
|
});
|
|
95
97
|
}
|
|
98
|
+
var _default = exports.default = LinkControlSearchResults;
|
|
99
|
+
const __experimentalLinkControlSearchResults = props => {
|
|
100
|
+
(0, _deprecated.default)('wp.blockEditor.__experimentalLinkControlSearchResults', {
|
|
101
|
+
since: '6.8'
|
|
102
|
+
});
|
|
103
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(LinkControlSearchResults, {
|
|
104
|
+
...props
|
|
105
|
+
});
|
|
106
|
+
};
|
|
107
|
+
exports.__experimentalLinkControlSearchResults = __experimentalLinkControlSearchResults;
|
|
96
108
|
//# sourceMappingURL=search-results.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_i18n","require","_components","_clsx","_interopRequireDefault","_searchCreateButton","_searchItem","_constants","_jsxRuntime","LinkControlSearchResults","withCreateSuggestion","currentInputValue","handleSuggestionClick","suggestionsListProps","buildSuggestionItemProps","suggestions","selectedSuggestion","isLoading","isInitialSuggestions","createSuggestionButtonText","suggestionsQuery","resultsListClasses","clsx","isSingleDirectEntryResult","length","LINK_ENTRY_TYPES","includes","type","shouldShowCreateSuggestion","shouldShowSuggestionsTypes","labelText","__","sprintf","jsx","className","children","MenuGroup","map","suggestion","index","CREATE_TYPE","default","searchTerm","buttonText","onClick","itemProps","isSelected","isURL","shouldShowType","isFrontPage","isBlogHome","id"],"sources":["@wordpress/block-editor/src/components/link-control/search-results.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { MenuGroup } from '@wordpress/components';\n\n/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * Internal dependencies\n */\nimport LinkControlSearchCreate from './search-create-button';\nimport LinkControlSearchItem from './search-item';\nimport { CREATE_TYPE, LINK_ENTRY_TYPES } from './constants';\n\
|
|
1
|
+
{"version":3,"names":["_i18n","require","_components","_clsx","_interopRequireDefault","_searchCreateButton","_searchItem","_constants","_deprecated","_jsxRuntime","LinkControlSearchResults","withCreateSuggestion","currentInputValue","handleSuggestionClick","suggestionsListProps","buildSuggestionItemProps","suggestions","selectedSuggestion","isLoading","isInitialSuggestions","createSuggestionButtonText","suggestionsQuery","resultsListClasses","clsx","isSingleDirectEntryResult","length","LINK_ENTRY_TYPES","includes","type","shouldShowCreateSuggestion","shouldShowSuggestionsTypes","labelText","__","sprintf","jsx","className","children","MenuGroup","map","suggestion","index","CREATE_TYPE","default","searchTerm","buttonText","onClick","itemProps","isSelected","isURL","shouldShowType","isFrontPage","isBlogHome","id","_default","exports","__experimentalLinkControlSearchResults","props","deprecated","since"],"sources":["@wordpress/block-editor/src/components/link-control/search-results.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { MenuGroup } from '@wordpress/components';\n\n/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * Internal dependencies\n */\nimport LinkControlSearchCreate from './search-create-button';\nimport LinkControlSearchItem from './search-item';\nimport { CREATE_TYPE, LINK_ENTRY_TYPES } from './constants';\nimport deprecated from '@wordpress/deprecated';\n\nfunction LinkControlSearchResults( {\n\twithCreateSuggestion,\n\tcurrentInputValue,\n\thandleSuggestionClick,\n\tsuggestionsListProps,\n\tbuildSuggestionItemProps,\n\tsuggestions,\n\tselectedSuggestion,\n\tisLoading,\n\tisInitialSuggestions,\n\tcreateSuggestionButtonText,\n\tsuggestionsQuery,\n} ) {\n\tconst resultsListClasses = clsx(\n\t\t'block-editor-link-control__search-results',\n\t\t{\n\t\t\t'is-loading': isLoading,\n\t\t}\n\t);\n\n\tconst isSingleDirectEntryResult =\n\t\tsuggestions.length === 1 &&\n\t\tLINK_ENTRY_TYPES.includes( suggestions[ 0 ].type );\n\tconst shouldShowCreateSuggestion =\n\t\twithCreateSuggestion &&\n\t\t! isSingleDirectEntryResult &&\n\t\t! isInitialSuggestions;\n\t// If the query has a specified type, then we can skip showing them in the result. See #24839.\n\tconst shouldShowSuggestionsTypes = ! suggestionsQuery?.type;\n\n\tconst labelText = isInitialSuggestions\n\t\t? __( 'Suggestions' )\n\t\t: sprintf(\n\t\t\t\t/* translators: %s: search term. */\n\t\t\t\t__( 'Search results for \"%s\"' ),\n\t\t\t\tcurrentInputValue\n\t\t );\n\n\treturn (\n\t\t<div className=\"block-editor-link-control__search-results-wrapper\">\n\t\t\t<div\n\t\t\t\t{ ...suggestionsListProps }\n\t\t\t\tclassName={ resultsListClasses }\n\t\t\t\taria-label={ labelText }\n\t\t\t>\n\t\t\t\t<MenuGroup>\n\t\t\t\t\t{ suggestions.map( ( suggestion, index ) => {\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tshouldShowCreateSuggestion &&\n\t\t\t\t\t\t\tCREATE_TYPE === suggestion.type\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<LinkControlSearchCreate\n\t\t\t\t\t\t\t\t\tsearchTerm={ currentInputValue }\n\t\t\t\t\t\t\t\t\tbuttonText={ createSuggestionButtonText }\n\t\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\t\thandleSuggestionClick( suggestion )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// Intentionally only using `type` here as\n\t\t\t\t\t\t\t\t\t// the constant is enough to uniquely\n\t\t\t\t\t\t\t\t\t// identify the single \"CREATE\" suggestion.\n\t\t\t\t\t\t\t\t\tkey={ suggestion.type }\n\t\t\t\t\t\t\t\t\titemProps={ buildSuggestionItemProps(\n\t\t\t\t\t\t\t\t\t\tsuggestion,\n\t\t\t\t\t\t\t\t\t\tindex\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tisSelected={ index === selectedSuggestion }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// If we're not handling \"Create\" suggestions above then\n\t\t\t\t\t\t// we don't want them in the main results so exit early.\n\t\t\t\t\t\tif ( CREATE_TYPE === suggestion.type ) {\n\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<LinkControlSearchItem\n\t\t\t\t\t\t\t\tkey={ `${ suggestion.id }-${ suggestion.type }` }\n\t\t\t\t\t\t\t\titemProps={ buildSuggestionItemProps(\n\t\t\t\t\t\t\t\t\tsuggestion,\n\t\t\t\t\t\t\t\t\tindex\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tsuggestion={ suggestion }\n\t\t\t\t\t\t\t\tindex={ index }\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\thandleSuggestionClick( suggestion );\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tisSelected={ index === selectedSuggestion }\n\t\t\t\t\t\t\t\tisURL={ LINK_ENTRY_TYPES.includes(\n\t\t\t\t\t\t\t\t\tsuggestion.type\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tsearchTerm={ currentInputValue }\n\t\t\t\t\t\t\t\tshouldShowType={ shouldShowSuggestionsTypes }\n\t\t\t\t\t\t\t\tisFrontPage={ suggestion?.isFrontPage }\n\t\t\t\t\t\t\t\tisBlogHome={ suggestion?.isBlogHome }\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</MenuGroup>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n\nexport default LinkControlSearchResults;\n\nexport const __experimentalLinkControlSearchResults = ( props ) => {\n\tdeprecated( 'wp.blockEditor.__experimentalLinkControlSearchResults', {\n\t\tsince: '6.8',\n\t} );\n\n\treturn <LinkControlSearchResults { ...props } />;\n};\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAKA,IAAAE,KAAA,GAAAC,sBAAA,CAAAH,OAAA;AAKA,IAAAI,mBAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,WAAA,GAAAF,sBAAA,CAAAH,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AACA,IAAAO,WAAA,GAAAJ,sBAAA,CAAAH,OAAA;AAA+C,IAAAQ,WAAA,GAAAR,OAAA;AAjB/C;AACA;AACA;;AAIA;AACA;AACA;;AAGA;AACA;AACA;;AAMA,SAASS,wBAAwBA,CAAE;EAClCC,oBAAoB;EACpBC,iBAAiB;EACjBC,qBAAqB;EACrBC,oBAAoB;EACpBC,wBAAwB;EACxBC,WAAW;EACXC,kBAAkB;EAClBC,SAAS;EACTC,oBAAoB;EACpBC,0BAA0B;EAC1BC;AACD,CAAC,EAAG;EACH,MAAMC,kBAAkB,GAAG,IAAAC,aAAI,EAC9B,2CAA2C,EAC3C;IACC,YAAY,EAAEL;EACf,CACD,CAAC;EAED,MAAMM,yBAAyB,GAC9BR,WAAW,CAACS,MAAM,KAAK,CAAC,IACxBC,2BAAgB,CAACC,QAAQ,CAAEX,WAAW,CAAE,CAAC,CAAE,CAACY,IAAK,CAAC;EACnD,MAAMC,0BAA0B,GAC/BlB,oBAAoB,IACpB,CAAEa,yBAAyB,IAC3B,CAAEL,oBAAoB;EACvB;EACA,MAAMW,0BAA0B,GAAG,CAAET,gBAAgB,EAAEO,IAAI;EAE3D,MAAMG,SAAS,GAAGZ,oBAAoB,GACnC,IAAAa,QAAE,EAAE,aAAc,CAAC,GACnB,IAAAC,aAAO,EACP;EAC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K,EAAGtB,2BAAgB,CAACC,QAAQ,CAChCY,UAAU,CAACX,IACZ,CAAG;YACHe,UAAU,EAAG/B,iBAAmB;YAChCqC,cAAc,EAAGnB,0BAA4B;YAC7CoB,WAAW,EAAGX,UAAU,EAAEW,WAAa;YACvCC,UAAU,EAAGZ,UAAU,EAAEY;UAAY,GAjB/B,GAAIZ,UAAU,CAACa,EAAE,IAAMb,UAAU,CAACX,IAAI,EAkB5C,CAAC;QAEJ,CAAE;MAAC,CACO;IAAC,CACR;EAAC,CACF,CAAC;AAER;AAAC,IAAAyB,QAAA,GAAAC,OAAA,CAAAZ,OAAA,GAEchC,wBAAwB;AAEhC,MAAM6C,sCAAsC,GAAKC,KAAK,IAAM;EAClE,IAAAC,mBAAU,EAAE,uDAAuD,EAAE;IACpEC,KAAK,EAAE;EACR,CAAE,CAAC;EAEH,oBAAO,IAAAjD,WAAA,CAAAyB,GAAA,EAACxB,wBAAwB;IAAA,GAAM8C;EAAK,CAAI,CAAC;AACjD,CAAC;AAACF,OAAA,CAAAC,sCAAA,GAAAA,sCAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_i18n","require","_components","_jsxRuntime","noop","LinkControlSettings","value","onChange","settings","length","handleSettingChange","setting","newValue","id","theSettings","map","jsx","CheckboxControl","__nextHasNoMarginBottom","className","label","title","checked","help","jsxs","children","VisuallyHidden","as","__","_default","exports","default"],"sources":["@wordpress/block-editor/src/components/link-control/settings.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { CheckboxControl, VisuallyHidden } from '@wordpress/components';\n\nconst noop = () => {};\n\nconst LinkControlSettings = ( { value, onChange = noop, settings } ) => {\n\tif ( ! settings || ! settings.length ) {\n\t\treturn null;\n\t}\n\n\tconst handleSettingChange = ( setting ) => ( newValue ) => {\n\t\tonChange( {\n\t\t\t...value,\n\t\t\t[ setting.id ]: newValue,\n\t\t} );\n\t};\n\n\tconst theSettings = settings.map( ( setting ) => (\n\t\t<CheckboxControl\n\t\t\t__nextHasNoMarginBottom\n\t\t\tclassName=\"block-editor-link-control__setting\"\n\t\t\tkey={ setting.id }\n\t\t\tlabel={ setting.title }\n\t\t\tonChange={ handleSettingChange( setting ) }\n\t\t\tchecked={ value ? !! value[ setting.id ] : false }\n\t\t\thelp={ setting?.help }\n\t\t/>\n\t) );\n\n\treturn (\n\t\t<fieldset className=\"block-editor-link-control__settings\">\n\t\t\t<VisuallyHidden as=\"legend\">\n\t\t\t\t{ __( 'Currently selected link settings' ) }\n\t\t\t</VisuallyHidden>\n\t\t\t{ theSettings }\n\t\t</fieldset>\n\t);\n};\n\nexport default LinkControlSettings;\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_i18n","require","_components","_jsxRuntime","noop","LinkControlSettings","value","onChange","settings","length","handleSettingChange","setting","newValue","id","theSettings","map","jsx","CheckboxControl","__nextHasNoMarginBottom","className","label","title","checked","help","jsxs","children","VisuallyHidden","as","__","_default","exports","default"],"sources":["@wordpress/block-editor/src/components/link-control/settings.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { CheckboxControl, VisuallyHidden } from '@wordpress/components';\n\nconst noop = () => {};\n\nconst LinkControlSettings = ( { value, onChange = noop, settings } ) => {\n\tif ( ! settings || ! settings.length ) {\n\t\treturn null;\n\t}\n\n\tconst handleSettingChange = ( setting ) => ( newValue ) => {\n\t\tonChange( {\n\t\t\t...value,\n\t\t\t[ setting.id ]: newValue,\n\t\t} );\n\t};\n\n\tconst theSettings = settings.map( ( setting ) => (\n\t\t<CheckboxControl\n\t\t\t__nextHasNoMarginBottom\n\t\t\tclassName=\"block-editor-link-control__setting\"\n\t\t\tkey={ setting.id }\n\t\t\tlabel={ setting.title }\n\t\t\tonChange={ handleSettingChange( setting ) }\n\t\t\tchecked={ value ? !! value[ setting.id ] : false }\n\t\t\thelp={ setting?.help }\n\t\t/>\n\t) );\n\n\treturn (\n\t\t<fieldset className=\"block-editor-link-control__settings\">\n\t\t\t<VisuallyHidden as=\"legend\">\n\t\t\t\t{ __( 'Currently selected link settings' ) }\n\t\t\t</VisuallyHidden>\n\t\t\t{ theSettings }\n\t\t</fieldset>\n\t);\n};\n\nexport default LinkControlSettings;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAAwE,IAAAE,WAAA,GAAAF,OAAA;AAJxE;AACA;AACA;;AAIA,MAAMG,IAAI,GAAGA,CAAA,KAAM,CAAC,CAAC;AAErB,MAAMC,mBAAmB,GAAGA,CAAE;EAAEC,KAAK;EAAEC,QAAQ,GAAGH,IAAI;EAAEI;AAAS,CAAC,KAAM;EACvE,IAAK,CAAEA,QAAQ,IAAI,CAAEA,QAAQ,CAACC,MAAM,EAAG;IACtC,OAAO,IAAI;EACZ;EAEA,MAAMC,mBAAmB,GAAKC,OAAO,IAAQC,QAAQ,IAAM;IAC1DL,QAAQ,CAAE;MACT,GAAGD,KAAK;MACR,CAAEK,OAAO,CAACE,EAAE,GAAID;IACjB,CAAE,CAAC;EACJ,CAAC;EAED,MAAME,WAAW,GAAGN,QAAQ,CAACO,GAAG,CAAIJ,OAAO,iBAC1C,IAAAR,WAAA,CAAAa,GAAA,EAACd,WAAA,CAAAe,eAAe;IACfC,uBAAuB;IACvBC,SAAS,EAAC,oCAAoC;IAE9CC,KAAK,EAAGT,OAAO,CAACU,KAAO;IACvBd,QAAQ,EAAGG,mBAAmB,CAAEC,OAAQ,CAAG;IAC3CW,OAAO,EAAGhB,KAAK,GAAG,CAAC,CAAEA,KAAK,CAAEK,OAAO,CAACE,EAAE,CAAE,GAAG,KAAO;IAClDU,IAAI,EAAGZ,OAAO,EAAEY;EAAM,GAJhBZ,OAAO,CAACE,EAKd,CACA,CAAC;EAEH,oBACC,IAAAV,WAAA,CAAAqB,IAAA;IAAUL,SAAS,EAAC,qCAAqC;IAAAM,QAAA,gBACxD,IAAAtB,WAAA,CAAAa,GAAA,EAACd,WAAA,CAAAwB,cAAc;MAACC,EAAE,EAAC,QAAQ;MAAAF,QAAA,EACxB,IAAAG,QAAE,EAAE,kCAAmC;IAAC,CAC3B,CAAC,EACfd,WAAW;EAAA,CACJ,CAAC;AAEb,CAAC;AAAC,IAAAe,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEa1B,mBAAmB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_element","require","_fastDeepEqual","_interopRequireDefault","useInternalValue","value","internalValue","setInternalValue","useState","previousValue","setPreviousValue","fastDeepEqual","setInternalURLInputValue","nextValue","url","setInternalTextInputValue","title","createSetInternalSettingValueHandler","settingsKeys","settingsUpdates","Object","keys","reduce","acc","key","includes"],"sources":["@wordpress/block-editor/src/components/link-control/use-internal-value.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\n\n/**\n * External dependencies\n */\nimport fastDeepEqual from 'fast-deep-equal';\n\nexport default function useInternalValue( value ) {\n\tconst [ internalValue, setInternalValue ] = useState( value || {} );\n\tconst [ previousValue, setPreviousValue ] = useState( value );\n\n\t// If the value prop changes, update the internal state.\n\t// See:\n\t// - https://github.com/WordPress/gutenberg/pull/51387#issuecomment-1722927384.\n\t// - https://react.dev/reference/react/useState#storing-information-from-previous-renders.\n\tif ( ! fastDeepEqual( value, previousValue ) ) {\n\t\tsetPreviousValue( value );\n\t\tsetInternalValue( value );\n\t}\n\n\tconst setInternalURLInputValue = ( nextValue ) => {\n\t\tsetInternalValue( {\n\t\t\t...internalValue,\n\t\t\turl: nextValue,\n\t\t} );\n\t};\n\n\tconst setInternalTextInputValue = ( nextValue ) => {\n\t\tsetInternalValue( {\n\t\t\t...internalValue,\n\t\t\ttitle: nextValue,\n\t\t} );\n\t};\n\n\tconst createSetInternalSettingValueHandler =\n\t\t( settingsKeys ) => ( nextValue ) => {\n\t\t\t// Only apply settings values which are defined in the settings prop.\n\t\t\tconst settingsUpdates = Object.keys( nextValue ).reduce(\n\t\t\t\t( acc, key ) => {\n\t\t\t\t\tif ( settingsKeys.includes( key ) ) {\n\t\t\t\t\t\tacc[ key ] = nextValue[ key ];\n\t\t\t\t\t}\n\t\t\t\t\treturn acc;\n\t\t\t\t},\n\t\t\t\t{}\n\t\t\t);\n\n\t\t\tsetInternalValue( {\n\t\t\t\t...internalValue,\n\t\t\t\t...settingsUpdates,\n\t\t\t} );\n\t\t};\n\n\treturn [\n\t\tinternalValue,\n\t\tsetInternalValue,\n\t\tsetInternalURLInputValue,\n\t\tsetInternalTextInputValue,\n\t\tcreateSetInternalSettingValueHandler,\n\t];\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_element","require","_fastDeepEqual","_interopRequireDefault","useInternalValue","value","internalValue","setInternalValue","useState","previousValue","setPreviousValue","fastDeepEqual","setInternalURLInputValue","nextValue","url","setInternalTextInputValue","title","createSetInternalSettingValueHandler","settingsKeys","settingsUpdates","Object","keys","reduce","acc","key","includes"],"sources":["@wordpress/block-editor/src/components/link-control/use-internal-value.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\n\n/**\n * External dependencies\n */\nimport fastDeepEqual from 'fast-deep-equal';\n\nexport default function useInternalValue( value ) {\n\tconst [ internalValue, setInternalValue ] = useState( value || {} );\n\tconst [ previousValue, setPreviousValue ] = useState( value );\n\n\t// If the value prop changes, update the internal state.\n\t// See:\n\t// - https://github.com/WordPress/gutenberg/pull/51387#issuecomment-1722927384.\n\t// - https://react.dev/reference/react/useState#storing-information-from-previous-renders.\n\tif ( ! fastDeepEqual( value, previousValue ) ) {\n\t\tsetPreviousValue( value );\n\t\tsetInternalValue( value );\n\t}\n\n\tconst setInternalURLInputValue = ( nextValue ) => {\n\t\tsetInternalValue( {\n\t\t\t...internalValue,\n\t\t\turl: nextValue,\n\t\t} );\n\t};\n\n\tconst setInternalTextInputValue = ( nextValue ) => {\n\t\tsetInternalValue( {\n\t\t\t...internalValue,\n\t\t\ttitle: nextValue,\n\t\t} );\n\t};\n\n\tconst createSetInternalSettingValueHandler =\n\t\t( settingsKeys ) => ( nextValue ) => {\n\t\t\t// Only apply settings values which are defined in the settings prop.\n\t\t\tconst settingsUpdates = Object.keys( nextValue ).reduce(\n\t\t\t\t( acc, key ) => {\n\t\t\t\t\tif ( settingsKeys.includes( key ) ) {\n\t\t\t\t\t\tacc[ key ] = nextValue[ key ];\n\t\t\t\t\t}\n\t\t\t\t\treturn acc;\n\t\t\t\t},\n\t\t\t\t{}\n\t\t\t);\n\n\t\t\tsetInternalValue( {\n\t\t\t\t...internalValue,\n\t\t\t\t...settingsUpdates,\n\t\t\t} );\n\t\t};\n\n\treturn [\n\t\tinternalValue,\n\t\tsetInternalValue,\n\t\tsetInternalURLInputValue,\n\t\tsetInternalTextInputValue,\n\t\tcreateSetInternalSettingValueHandler,\n\t];\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AAKA,IAAAC,cAAA,GAAAC,sBAAA,CAAAF,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAGe,SAASG,gBAAgBA,CAAEC,KAAK,EAAG;EACjD,MAAM,CAAEC,aAAa,EAAEC,gBAAgB,CAAE,GAAG,IAAAC,iBAAQ,EAAEH,KAAK,IAAI,CAAC,CAAE,CAAC;EACnE,MAAM,CAAEI,aAAa,EAAEC,gBAAgB,CAAE,GAAG,IAAAF,iBAAQ,EAAEH,KAAM,CAAC;;EAE7D;EACA;EACA;EACA;EACA,IAAK,CAAE,IAAAM,sBAAa,EAAEN,KAAK,EAAEI,aAAc,CAAC,EAAG;IAC9CC,gBAAgB,CAAEL,KAAM,CAAC;IACzBE,gBAAgB,CAAEF,KAAM,CAAC;EAC1B;EAEA,MAAMO,wBAAwB,GAAKC,SAAS,IAAM;IACjDN,gBAAgB,CAAE;MACjB,GAAGD,aAAa;MAChBQ,GAAG,EAAED;IACN,CAAE,CAAC;EACJ,CAAC;EAED,MAAME,yBAAyB,GAAKF,SAAS,IAAM;IAClDN,gBAAgB,CAAE;MACjB,GAAGD,aAAa;MAChBU,KAAK,EAAEH;IACR,CAAE,CAAC;EACJ,CAAC;EAED,MAAMI,oCAAoC,GACvCC,YAAY,IAAQL,SAAS,IAAM;IACpC;IACA,MAAMM,eAAe,GAAGC,MAAM,CAACC,IAAI,CAAER,SAAU,CAAC,CAACS,MAAM,CACtD,CAAEC,GAAG,EAAEC,GAAG,KAAM;MACf,IAAKN,YAAY,CAACO,QAAQ,CAAED,GAAI,CAAC,EAAG;QACnCD,GAAG,CAAEC,GAAG,CAAE,GAAGX,SAAS,CAAEW,GAAG,CAAE;MAC9B;MACA,OAAOD,GAAG;IACX,CAAC,EACD,CAAC,CACF,CAAC;IAEDhB,gBAAgB,CAAE;MACjB,GAAGD,aAAa;MAChB,GAAGa;IACJ,CAAE,CAAC;EACJ,CAAC;EAEF,OAAO,CACNb,aAAa,EACbC,gBAAgB,EAChBK,wBAAwB,EACxBG,yBAAyB,EACzBE,oCAAoC,CACpC;AACF","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_url","require","_element","_data","_isUrlLike","_interopRequireDefault","_constants","_store","handleNoop","Promise","resolve","exports","handleDirectEntry","val","type","URL_TYPE","protocol","getProtocol","includes","MAILTO_TYPE","TEL_TYPE","startsWith","INTERNAL_TYPE","id","title","url","prependHTTP","handleEntitySearch","suggestionsQuery","fetchSearchSuggestions","withCreateSuggestion","pageOnFront","pageForPosts","isInitialSuggestions","results","map","result","Number","isFrontPage","isBlogHome","isURLLike","concat","CREATE_TYPE","useSearchHandler","allowDirectEntry","useSelect","select","getSettings","blockEditorStore","__experimentalFetchLinkSuggestions","directEntryHandler","useCallback"],"sources":["@wordpress/block-editor/src/components/link-control/use-search-handler.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getProtocol, prependHTTP } from '@wordpress/url';\nimport { useCallback } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport isURLLike from './is-url-like';\nimport {\n\tCREATE_TYPE,\n\tTEL_TYPE,\n\tMAILTO_TYPE,\n\tINTERNAL_TYPE,\n\tURL_TYPE,\n} from './constants';\nimport { store as blockEditorStore } from '../../store';\n\nexport const handleNoop = () => Promise.resolve( [] );\n\nexport const handleDirectEntry = ( val ) => {\n\tlet type = URL_TYPE;\n\n\tconst protocol = getProtocol( val ) || '';\n\n\tif ( protocol.includes( 'mailto' ) ) {\n\t\ttype = MAILTO_TYPE;\n\t}\n\n\tif ( protocol.includes( 'tel' ) ) {\n\t\ttype = TEL_TYPE;\n\t}\n\n\tif ( val?.startsWith( '#' ) ) {\n\t\ttype = INTERNAL_TYPE;\n\t}\n\n\treturn Promise.resolve( [\n\t\t{\n\t\t\tid: val,\n\t\t\ttitle: val,\n\t\t\turl: type === 'URL' ? prependHTTP( val ) : val,\n\t\t\ttype,\n\t\t},\n\t] );\n};\n\nconst handleEntitySearch = async (\n\tval,\n\tsuggestionsQuery,\n\tfetchSearchSuggestions,\n\twithCreateSuggestion,\n\tpageOnFront,\n\tpageForPosts\n) => {\n\tconst { isInitialSuggestions } = suggestionsQuery;\n\n\tconst results = await fetchSearchSuggestions( val, suggestionsQuery );\n\n\t// Identify front page and update type to match.\n\tresults.map( ( result ) => {\n\t\tif ( Number( result.id ) === pageOnFront ) {\n\t\t\tresult.isFrontPage = true;\n\t\t\treturn result;\n\t\t} else if ( Number( result.id ) === pageForPosts ) {\n\t\t\tresult.isBlogHome = true;\n\t\t\treturn result;\n\t\t}\n\n\t\treturn result;\n\t} );\n\n\t// If displaying initial suggestions just return plain results.\n\tif ( isInitialSuggestions ) {\n\t\treturn results;\n\t}\n\n\t// Here we append a faux suggestion to represent a \"CREATE\" option. This\n\t// is detected in the rendering of the search results and handled as a\n\t// special case. This is currently necessary because the suggestions\n\t// dropdown will only appear if there are valid suggestions and\n\t// therefore unless the create option is a suggestion it will not\n\t// display in scenarios where there are no results returned from the\n\t// API. In addition promoting CREATE to a first class suggestion affords\n\t// the a11y benefits afforded by `URLInput` to all suggestions (eg:\n\t// keyboard handling, ARIA roles...etc).\n\t//\n\t// Note also that the value of the `title` and `url` properties must correspond\n\t// to the text value of the `<input>`. This is because `title` is used\n\t// when creating the suggestion. Similarly `url` is used when using keyboard to select\n\t// the suggestion (the <form> `onSubmit` handler falls-back to `url`).\n\treturn isURLLike( val ) || ! withCreateSuggestion\n\t\t? results\n\t\t: results.concat( {\n\t\t\t\t// the `id` prop is intentionally ommitted here because it\n\t\t\t\t// is never exposed as part of the component's public API.\n\t\t\t\t// see: https://github.com/WordPress/gutenberg/pull/19775#discussion_r378931316.\n\t\t\t\ttitle: val, // Must match the existing `<input>`s text value.\n\t\t\t\turl: val, // Must match the existing `<input>`s text value.\n\t\t\t\ttype: CREATE_TYPE,\n\t\t } );\n};\n\nexport default function useSearchHandler(\n\tsuggestionsQuery,\n\tallowDirectEntry,\n\twithCreateSuggestion\n) {\n\tconst { fetchSearchSuggestions, pageOnFront, pageForPosts } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getSettings } = select( blockEditorStore );\n\n\t\t\treturn {\n\t\t\t\tpageOnFront: getSettings().pageOnFront,\n\t\t\t\tpageForPosts: getSettings().pageForPosts,\n\t\t\t\tfetchSearchSuggestions:\n\t\t\t\t\tgetSettings().__experimentalFetchLinkSuggestions,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tconst directEntryHandler = allowDirectEntry\n\t\t? handleDirectEntry\n\t\t: handleNoop;\n\n\treturn useCallback(\n\t\t( val, { isInitialSuggestions } ) => {\n\t\t\treturn isURLLike( val )\n\t\t\t\t? directEntryHandler( val, { isInitialSuggestions } )\n\t\t\t\t: handleEntitySearch(\n\t\t\t\t\t\tval,\n\t\t\t\t\t\t{ ...suggestionsQuery, isInitialSuggestions },\n\t\t\t\t\t\tfetchSearchSuggestions,\n\t\t\t\t\t\twithCreateSuggestion,\n\t\t\t\t\t\tpageOnFront,\n\t\t\t\t\t\tpageForPosts\n\t\t\t\t );\n\t\t},\n\t\t[\n\t\t\tdirectEntryHandler,\n\t\t\tfetchSearchSuggestions,\n\t\t\tpageOnFront,\n\t\t\tpageForPosts,\n\t\t\tsuggestionsQuery,\n\t\t\twithCreateSuggestion,\n\t\t]\n\t);\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_url","require","_element","_data","_isUrlLike","_interopRequireDefault","_constants","_store","handleNoop","Promise","resolve","exports","handleDirectEntry","val","type","URL_TYPE","protocol","getProtocol","includes","MAILTO_TYPE","TEL_TYPE","startsWith","INTERNAL_TYPE","id","title","url","prependHTTP","handleEntitySearch","suggestionsQuery","fetchSearchSuggestions","withCreateSuggestion","pageOnFront","pageForPosts","isInitialSuggestions","results","map","result","Number","isFrontPage","isBlogHome","isURLLike","concat","CREATE_TYPE","useSearchHandler","allowDirectEntry","useSelect","select","getSettings","blockEditorStore","__experimentalFetchLinkSuggestions","directEntryHandler","useCallback"],"sources":["@wordpress/block-editor/src/components/link-control/use-search-handler.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getProtocol, prependHTTP } from '@wordpress/url';\nimport { useCallback } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport isURLLike from './is-url-like';\nimport {\n\tCREATE_TYPE,\n\tTEL_TYPE,\n\tMAILTO_TYPE,\n\tINTERNAL_TYPE,\n\tURL_TYPE,\n} from './constants';\nimport { store as blockEditorStore } from '../../store';\n\nexport const handleNoop = () => Promise.resolve( [] );\n\nexport const handleDirectEntry = ( val ) => {\n\tlet type = URL_TYPE;\n\n\tconst protocol = getProtocol( val ) || '';\n\n\tif ( protocol.includes( 'mailto' ) ) {\n\t\ttype = MAILTO_TYPE;\n\t}\n\n\tif ( protocol.includes( 'tel' ) ) {\n\t\ttype = TEL_TYPE;\n\t}\n\n\tif ( val?.startsWith( '#' ) ) {\n\t\ttype = INTERNAL_TYPE;\n\t}\n\n\treturn Promise.resolve( [\n\t\t{\n\t\t\tid: val,\n\t\t\ttitle: val,\n\t\t\turl: type === 'URL' ? prependHTTP( val ) : val,\n\t\t\ttype,\n\t\t},\n\t] );\n};\n\nconst handleEntitySearch = async (\n\tval,\n\tsuggestionsQuery,\n\tfetchSearchSuggestions,\n\twithCreateSuggestion,\n\tpageOnFront,\n\tpageForPosts\n) => {\n\tconst { isInitialSuggestions } = suggestionsQuery;\n\n\tconst results = await fetchSearchSuggestions( val, suggestionsQuery );\n\n\t// Identify front page and update type to match.\n\tresults.map( ( result ) => {\n\t\tif ( Number( result.id ) === pageOnFront ) {\n\t\t\tresult.isFrontPage = true;\n\t\t\treturn result;\n\t\t} else if ( Number( result.id ) === pageForPosts ) {\n\t\t\tresult.isBlogHome = true;\n\t\t\treturn result;\n\t\t}\n\n\t\treturn result;\n\t} );\n\n\t// If displaying initial suggestions just return plain results.\n\tif ( isInitialSuggestions ) {\n\t\treturn results;\n\t}\n\n\t// Here we append a faux suggestion to represent a \"CREATE\" option. This\n\t// is detected in the rendering of the search results and handled as a\n\t// special case. This is currently necessary because the suggestions\n\t// dropdown will only appear if there are valid suggestions and\n\t// therefore unless the create option is a suggestion it will not\n\t// display in scenarios where there are no results returned from the\n\t// API. In addition promoting CREATE to a first class suggestion affords\n\t// the a11y benefits afforded by `URLInput` to all suggestions (eg:\n\t// keyboard handling, ARIA roles...etc).\n\t//\n\t// Note also that the value of the `title` and `url` properties must correspond\n\t// to the text value of the `<input>`. This is because `title` is used\n\t// when creating the suggestion. Similarly `url` is used when using keyboard to select\n\t// the suggestion (the <form> `onSubmit` handler falls-back to `url`).\n\treturn isURLLike( val ) || ! withCreateSuggestion\n\t\t? results\n\t\t: results.concat( {\n\t\t\t\t// the `id` prop is intentionally ommitted here because it\n\t\t\t\t// is never exposed as part of the component's public API.\n\t\t\t\t// see: https://github.com/WordPress/gutenberg/pull/19775#discussion_r378931316.\n\t\t\t\ttitle: val, // Must match the existing `<input>`s text value.\n\t\t\t\turl: val, // Must match the existing `<input>`s text value.\n\t\t\t\ttype: CREATE_TYPE,\n\t\t } );\n};\n\nexport default function useSearchHandler(\n\tsuggestionsQuery,\n\tallowDirectEntry,\n\twithCreateSuggestion\n) {\n\tconst { fetchSearchSuggestions, pageOnFront, pageForPosts } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getSettings } = select( blockEditorStore );\n\n\t\t\treturn {\n\t\t\t\tpageOnFront: getSettings().pageOnFront,\n\t\t\t\tpageForPosts: getSettings().pageForPosts,\n\t\t\t\tfetchSearchSuggestions:\n\t\t\t\t\tgetSettings().__experimentalFetchLinkSuggestions,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tconst directEntryHandler = allowDirectEntry\n\t\t? handleDirectEntry\n\t\t: handleNoop;\n\n\treturn useCallback(\n\t\t( val, { isInitialSuggestions } ) => {\n\t\t\treturn isURLLike( val )\n\t\t\t\t? directEntryHandler( val, { isInitialSuggestions } )\n\t\t\t\t: handleEntitySearch(\n\t\t\t\t\t\tval,\n\t\t\t\t\t\t{ ...suggestionsQuery, isInitialSuggestions },\n\t\t\t\t\t\tfetchSearchSuggestions,\n\t\t\t\t\t\twithCreateSuggestion,\n\t\t\t\t\t\tpageOnFront,\n\t\t\t\t\t\tpageForPosts\n\t\t\t\t );\n\t\t},\n\t\t[\n\t\t\tdirectEntryHandler,\n\t\t\tfetchSearchSuggestions,\n\t\t\tpageOnFront,\n\t\t\tpageForPosts,\n\t\t\tsuggestionsQuery,\n\t\t\twithCreateSuggestion,\n\t\t]\n\t);\n}\n"],"mappings":";;;;;;;;;AAGA,IAAAA,IAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAKA,IAAAG,UAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AAOA,IAAAM,MAAA,GAAAN,OAAA;AAlBA;AACA;AACA;;AAKA;AACA;AACA;;AAWO,MAAMO,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,CAAE,CAAC,GACnDN,kBAAkB,CAClBd,GAAG,EACH;MAAE,GAAGe,gBAAgB;MAAEK;IAAqB,CAAC,EAC7CJ,sBAAsB,EACtBC,oBAAoB,EACpBC,WAAW,EACXC,YACA,CAAC;EACL,CAAC,EACD,CACCkB,kBAAkB,EAClBrB,sBAAsB,EACtBE,WAAW,EACXC,YAAY,EACZJ,gBAAgB,EAChBE,oBAAoB,CAEtB,CAAC;AACF","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_clsx","_interopRequireDefault","require","_components","_element","_icons","_keycodes","_data","_blockIcon","_useBlockDisplayInformation","_useBlockDisplayTitle","_expander","_blockLock","_useListViewImages","_store","_jsxRuntime","ListViewBlockSelectButton","className","block","clientId","onClick","onContextMenu","onMouseDown","onToggleExpanded","tabIndex","onFocus","onDragStart","onDragEnd","draggable","isExpanded","ariaDescribedBy","ref","blockInformation","useBlockDisplayInformation","blockTitle","useBlockDisplayTitle","context","isLocked","useBlockLock","isContentOnly","useSelect","select","blockEditorStore","getBlockEditingMode","shouldShowLockIcon","isSticky","positionType","images","useListViewImages","onDragStartHandler","event","dataTransfer","clearData","onKeyDown","keyCode","ENTER","SPACE","jsxs","clsx","href","children","jsx","default","icon","showColors","__experimentalHStack","alignment","justify","spacing","__experimentalTruncate","ellipsizeMode","anchor","Icon","pinSmall","length","map","image","index","style","backgroundImage","url","zIndex","lock","_default","exports","forwardRef"],"sources":["@wordpress/block-editor/src/components/list-view/block-select-button.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalTruncate as Truncate,\n} from '@wordpress/components';\nimport { forwardRef } from '@wordpress/element';\nimport { Icon, lockSmall as lock, pinSmall } from '@wordpress/icons';\nimport { SPACE, ENTER } from '@wordpress/keycodes';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport BlockIcon from '../block-icon';\nimport useBlockDisplayInformation from '../use-block-display-information';\nimport useBlockDisplayTitle from '../block-title/use-block-display-title';\nimport ListViewExpander from './expander';\nimport { useBlockLock } from '../block-lock';\nimport useListViewImages from './use-list-view-images';\nimport { store as blockEditorStore } from '../../store';\n\nfunction ListViewBlockSelectButton(\n\t{\n\t\tclassName,\n\t\tblock: { clientId },\n\t\tonClick,\n\t\tonContextMenu,\n\t\tonMouseDown,\n\t\tonToggleExpanded,\n\t\ttabIndex,\n\t\tonFocus,\n\t\tonDragStart,\n\t\tonDragEnd,\n\t\tdraggable,\n\t\tisExpanded,\n\t\tariaDescribedBy,\n\t},\n\tref\n) {\n\tconst blockInformation = useBlockDisplayInformation( clientId );\n\tconst blockTitle = useBlockDisplayTitle( {\n\t\tclientId,\n\t\tcontext: 'list-view',\n\t} );\n\tconst { isLocked } = useBlockLock( clientId );\n\tconst { isContentOnly } = useSelect(\n\t\t( select ) => ( {\n\t\t\tisContentOnly:\n\t\t\t\tselect( blockEditorStore ).getBlockEditingMode( clientId ) ===\n\t\t\t\t'contentOnly',\n\t\t} ),\n\t\t[ clientId ]\n\t);\n\tconst shouldShowLockIcon = isLocked && ! isContentOnly;\n\tconst isSticky = blockInformation?.positionType === 'sticky';\n\tconst images = useListViewImages( { clientId, isExpanded } );\n\n\t// The `href` attribute triggers the browser's native HTML drag operations.\n\t// When the link is dragged, the element's outerHTML is set in DataTransfer object as text/html.\n\t// We need to clear any HTML drag data to prevent `pasteHandler` from firing\n\t// inside the `useOnBlockDrop` hook.\n\tconst onDragStartHandler = ( event ) => {\n\t\tevent.dataTransfer.clearData();\n\t\tonDragStart?.( event );\n\t};\n\n\t/**\n\t * @param {KeyboardEvent} event\n\t */\n\tfunction onKeyDown( event ) {\n\t\tif ( event.keyCode === ENTER || event.keyCode === SPACE ) {\n\t\t\tonClick( event );\n\t\t}\n\t}\n\n\treturn (\n\t\t<a\n\t\t\tclassName={ clsx(\n\t\t\t\t'block-editor-list-view-block-select-button',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\tonClick={ onClick }\n\t\t\tonContextMenu={ onContextMenu }\n\t\t\tonKeyDown={ onKeyDown }\n\t\t\tonMouseDown={ onMouseDown }\n\t\t\tref={ ref }\n\t\t\ttabIndex={ tabIndex }\n\t\t\tonFocus={ onFocus }\n\t\t\tonDragStart={ onDragStartHandler }\n\t\t\tonDragEnd={ onDragEnd }\n\t\t\tdraggable={ draggable }\n\t\t\thref={ `#block-${ clientId }` }\n\t\t\taria-describedby={ ariaDescribedBy }\n\t\t\taria-expanded={ isExpanded }\n\t\t>\n\t\t\t<ListViewExpander onClick={ onToggleExpanded } />\n\t\t\t<BlockIcon\n\t\t\t\ticon={ blockInformation?.icon }\n\t\t\t\tshowColors\n\t\t\t\tcontext=\"list-view\"\n\t\t\t/>\n\t\t\t<HStack\n\t\t\t\talignment=\"center\"\n\t\t\t\tclassName=\"block-editor-list-view-block-select-button__label-wrapper\"\n\t\t\t\tjustify=\"flex-start\"\n\t\t\t\tspacing={ 1 }\n\t\t\t>\n\t\t\t\t<span className=\"block-editor-list-view-block-select-button__title\">\n\t\t\t\t\t<Truncate ellipsizeMode=\"auto\">{ blockTitle }</Truncate>\n\t\t\t\t</span>\n\t\t\t\t{ blockInformation?.anchor && (\n\t\t\t\t\t<span className=\"block-editor-list-view-block-select-button__anchor-wrapper\">\n\t\t\t\t\t\t<Truncate\n\t\t\t\t\t\t\tclassName=\"block-editor-list-view-block-select-button__anchor\"\n\t\t\t\t\t\t\tellipsizeMode=\"auto\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ blockInformation.anchor }\n\t\t\t\t\t\t</Truncate>\n\t\t\t\t\t</span>\n\t\t\t\t) }\n\t\t\t\t{ isSticky && (\n\t\t\t\t\t<span className=\"block-editor-list-view-block-select-button__sticky\">\n\t\t\t\t\t\t<Icon icon={ pinSmall } />\n\t\t\t\t\t</span>\n\t\t\t\t) }\n\t\t\t\t{ images.length ? (\n\t\t\t\t\t<span\n\t\t\t\t\t\tclassName=\"block-editor-list-view-block-select-button__images\"\n\t\t\t\t\t\taria-hidden\n\t\t\t\t\t>\n\t\t\t\t\t\t{ images.map( ( image, index ) => (\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tclassName=\"block-editor-list-view-block-select-button__image\"\n\t\t\t\t\t\t\t\tkey={ image.clientId }\n\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\tbackgroundImage: `url(${ image.url })`,\n\t\t\t\t\t\t\t\t\tzIndex: images.length - index, // Ensure the first image is on top, and subsequent images are behind.\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) ) }\n\t\t\t\t\t</span>\n\t\t\t\t) : null }\n\t\t\t\t{ shouldShowLockIcon && (\n\t\t\t\t\t<span className=\"block-editor-list-view-block-select-button__lock\">\n\t\t\t\t\t\t<Icon icon={ lock } />\n\t\t\t\t\t</span>\n\t\t\t\t) }\n\t\t\t</HStack>\n\t\t</a>\n\t);\n}\n\nexport default forwardRef( ListViewBlockSelectButton );\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_clsx","_interopRequireDefault","require","_components","_element","_icons","_keycodes","_data","_blockIcon","_useBlockDisplayInformation","_useBlockDisplayTitle","_expander","_blockLock","_useListViewImages","_store","_jsxRuntime","ListViewBlockSelectButton","className","block","clientId","onClick","onContextMenu","onMouseDown","onToggleExpanded","tabIndex","onFocus","onDragStart","onDragEnd","draggable","isExpanded","ariaDescribedBy","ref","blockInformation","useBlockDisplayInformation","blockTitle","useBlockDisplayTitle","context","isLocked","useBlockLock","isContentOnly","useSelect","select","blockEditorStore","getBlockEditingMode","shouldShowLockIcon","isSticky","positionType","images","useListViewImages","onDragStartHandler","event","dataTransfer","clearData","onKeyDown","keyCode","ENTER","SPACE","jsxs","clsx","href","children","jsx","default","icon","showColors","__experimentalHStack","alignment","justify","spacing","__experimentalTruncate","ellipsizeMode","anchor","Icon","pinSmall","length","map","image","index","style","backgroundImage","url","zIndex","lock","_default","exports","forwardRef"],"sources":["@wordpress/block-editor/src/components/list-view/block-select-button.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalTruncate as Truncate,\n} from '@wordpress/components';\nimport { forwardRef } from '@wordpress/element';\nimport { Icon, lockSmall as lock, pinSmall } from '@wordpress/icons';\nimport { SPACE, ENTER } from '@wordpress/keycodes';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport BlockIcon from '../block-icon';\nimport useBlockDisplayInformation from '../use-block-display-information';\nimport useBlockDisplayTitle from '../block-title/use-block-display-title';\nimport ListViewExpander from './expander';\nimport { useBlockLock } from '../block-lock';\nimport useListViewImages from './use-list-view-images';\nimport { store as blockEditorStore } from '../../store';\n\nfunction ListViewBlockSelectButton(\n\t{\n\t\tclassName,\n\t\tblock: { clientId },\n\t\tonClick,\n\t\tonContextMenu,\n\t\tonMouseDown,\n\t\tonToggleExpanded,\n\t\ttabIndex,\n\t\tonFocus,\n\t\tonDragStart,\n\t\tonDragEnd,\n\t\tdraggable,\n\t\tisExpanded,\n\t\tariaDescribedBy,\n\t},\n\tref\n) {\n\tconst blockInformation = useBlockDisplayInformation( clientId );\n\tconst blockTitle = useBlockDisplayTitle( {\n\t\tclientId,\n\t\tcontext: 'list-view',\n\t} );\n\tconst { isLocked } = useBlockLock( clientId );\n\tconst { isContentOnly } = useSelect(\n\t\t( select ) => ( {\n\t\t\tisContentOnly:\n\t\t\t\tselect( blockEditorStore ).getBlockEditingMode( clientId ) ===\n\t\t\t\t'contentOnly',\n\t\t} ),\n\t\t[ clientId ]\n\t);\n\tconst shouldShowLockIcon = isLocked && ! isContentOnly;\n\tconst isSticky = blockInformation?.positionType === 'sticky';\n\tconst images = useListViewImages( { clientId, isExpanded } );\n\n\t// The `href` attribute triggers the browser's native HTML drag operations.\n\t// When the link is dragged, the element's outerHTML is set in DataTransfer object as text/html.\n\t// We need to clear any HTML drag data to prevent `pasteHandler` from firing\n\t// inside the `useOnBlockDrop` hook.\n\tconst onDragStartHandler = ( event ) => {\n\t\tevent.dataTransfer.clearData();\n\t\tonDragStart?.( event );\n\t};\n\n\t/**\n\t * @param {KeyboardEvent} event\n\t */\n\tfunction onKeyDown( event ) {\n\t\tif ( event.keyCode === ENTER || event.keyCode === SPACE ) {\n\t\t\tonClick( event );\n\t\t}\n\t}\n\n\treturn (\n\t\t<a\n\t\t\tclassName={ clsx(\n\t\t\t\t'block-editor-list-view-block-select-button',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\tonClick={ onClick }\n\t\t\tonContextMenu={ onContextMenu }\n\t\t\tonKeyDown={ onKeyDown }\n\t\t\tonMouseDown={ onMouseDown }\n\t\t\tref={ ref }\n\t\t\ttabIndex={ tabIndex }\n\t\t\tonFocus={ onFocus }\n\t\t\tonDragStart={ onDragStartHandler }\n\t\t\tonDragEnd={ onDragEnd }\n\t\t\tdraggable={ draggable }\n\t\t\thref={ `#block-${ clientId }` }\n\t\t\taria-describedby={ ariaDescribedBy }\n\t\t\taria-expanded={ isExpanded }\n\t\t>\n\t\t\t<ListViewExpander onClick={ onToggleExpanded } />\n\t\t\t<BlockIcon\n\t\t\t\ticon={ blockInformation?.icon }\n\t\t\t\tshowColors\n\t\t\t\tcontext=\"list-view\"\n\t\t\t/>\n\t\t\t<HStack\n\t\t\t\talignment=\"center\"\n\t\t\t\tclassName=\"block-editor-list-view-block-select-button__label-wrapper\"\n\t\t\t\tjustify=\"flex-start\"\n\t\t\t\tspacing={ 1 }\n\t\t\t>\n\t\t\t\t<span className=\"block-editor-list-view-block-select-button__title\">\n\t\t\t\t\t<Truncate ellipsizeMode=\"auto\">{ blockTitle }</Truncate>\n\t\t\t\t</span>\n\t\t\t\t{ blockInformation?.anchor && (\n\t\t\t\t\t<span className=\"block-editor-list-view-block-select-button__anchor-wrapper\">\n\t\t\t\t\t\t<Truncate\n\t\t\t\t\t\t\tclassName=\"block-editor-list-view-block-select-button__anchor\"\n\t\t\t\t\t\t\tellipsizeMode=\"auto\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ blockInformation.anchor }\n\t\t\t\t\t\t</Truncate>\n\t\t\t\t\t</span>\n\t\t\t\t) }\n\t\t\t\t{ isSticky && (\n\t\t\t\t\t<span className=\"block-editor-list-view-block-select-button__sticky\">\n\t\t\t\t\t\t<Icon icon={ pinSmall } />\n\t\t\t\t\t</span>\n\t\t\t\t) }\n\t\t\t\t{ images.length ? (\n\t\t\t\t\t<span\n\t\t\t\t\t\tclassName=\"block-editor-list-view-block-select-button__images\"\n\t\t\t\t\t\taria-hidden\n\t\t\t\t\t>\n\t\t\t\t\t\t{ images.map( ( image, index ) => (\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tclassName=\"block-editor-list-view-block-select-button__image\"\n\t\t\t\t\t\t\t\tkey={ image.clientId }\n\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\tbackgroundImage: `url(${ image.url })`,\n\t\t\t\t\t\t\t\t\tzIndex: images.length - index, // Ensure the first image is on top, and subsequent images are behind.\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) ) }\n\t\t\t\t\t</span>\n\t\t\t\t) : null }\n\t\t\t\t{ shouldShowLockIcon && (\n\t\t\t\t\t<span className=\"block-editor-list-view-block-select-button__lock\">\n\t\t\t\t\t\t<Icon icon={ lock } />\n\t\t\t\t\t</span>\n\t\t\t\t) }\n\t\t\t</HStack>\n\t\t</a>\n\t);\n}\n\nexport default forwardRef( ListViewBlockSelectButton );\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AAIA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AACA,I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AKZ,CACA;MAAC,CACE,CAAC,GACJ,IAAI,EACNyB,kBAAkB,iBACnB,IAAA7B,WAAA,CAAA8C,GAAA;QAAM5C,SAAS,EAAC,kDAAkD;QAAA2C,QAAA,eACjE,IAAA7C,WAAA,CAAA8C,GAAA,EAACxD,MAAA,CAAAmE,IAAI;UAACT,IAAI,EAAGmB;QAAM,CAAE;MAAC,CACjB,CACN;IAAA,CACM,CAAC;EAAA,CACP,CAAC;AAEN;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAtB,OAAA,GAEc,IAAAuB,mBAAU,EAAErE,yBAA0B,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_clsx","_interopRequireDefault","require","_blocks","_components","_compose","_icons","_element","_data","_i18n","_keycodes","_isShallowEqual","_keyboardShortcuts","_a11y","_leaf","_useListViewScrollIntoView","_button","_blockContents","_context","_utils","_store","_useBlockDisplayInformation","_blockLock","_ariaReferencedText","_lockUnlock","_jsxRuntime","ListViewBlock","block","clientId","displacement","isAfterDraggedBlocks","isDragged","isNesting","isSelected","isBranchSelected","selectBlock","position","level","rowCount","siblingBlockCount","showBlockMovers","path","isExpanded","selectedClientIds","isSyncedBranch","cellRef","useRef","rowRef","settingsRef","isHovered","setIsHovered","useState","settingsAnchorRect","setSettingsAnchorRect","isLocked","canEdit","canMove","useBlockLock","isFirstSelectedBlock","isLastSelectedBlock","length","toggleBlockHighlight","duplicateBlocks","multiSelect","replaceBlocks","removeBlocks","insertAfterBlock","insertBeforeBlock","setOpenedBlockSettingsMenu","unlock","useDispatch","blockEditorStore","canInsertBlockType","getSelectedBlockClientIds","getPreviousBlockClientId","getBlockRootClientId","getBlockOrder","getBlockParents","getBlocksByClientId","canRemoveBlocks","isGroupable","useSelect","getGroupingBlockName","blocksStore","blockInformation","useBlockDisplayInformation","blockName","allowRightClickOverrides","select","getBlock","getBlockName","getSettings","showBlockActions","hasBlockSupport","instanceId","useInstanceId","descriptionId","expand","collapse","collapseAll","BlockSettingsMenu","listViewInstanceId","expandedState","setInsertedBlock","treeGridElementRef","rootClientId","useListViewContext","isMatch","useShortcutEventMatch","getBlocksToUpdate","selectedBlockClientIds","isUpdatingSelectedBlocks","includes","firstBlockClientId","firstBlockRootClientId","blocksToUpdate","onKeyDown","event","defaultPrevented","target","closest","isDeleteKey","BACKSPACE","DELETE","keyCode","stopPropagation","preventDefault","undefined","_getPreviousBlockClie","blocksToDelete","blockToFocus","shouldUpdateSelection","updateFocusAndSelection","canDuplicate","every","blockToUpdate","name","updatedBlocks","newlySelectedBlocks","at","blockClientIds","isShallowEqual","blockParents","blocks","groupingBlockName","newBlocks","switchToBlockType","speak","__","onMouseEnter","useCallback","onMouseLeave","selectEditorBlock","focusClientId","shouldSelectBlock","focusListItem","current","toggleExpanded","onContextMenu","click","window","DOMRect","clientX","clientY","onMouseDown","button","settingsPopoverAnchor","useMemo","ownerDocument","getBoundingClientRect","clearSettingsAnchorRect","useListViewScrollIntoView","rowItemRef","blockPositionDescription","getBlockPositionDescription","blockPropertiesDescription","getBlockPropertiesDescription","hasSiblings","hasRenderedMovers","moverCellClassName","clsx","listViewBlockSettingsClassName","colSpan","classes","isSynced","dropdownClientIds","currentlyEditingBlockInCanvas","jsxs","default","className","onFocus","onBlur","id","ref","children","jsx","__experimentalTreeGridCell","tabIndex","onClick","onToggleExpanded","ariaDescribedBy","filter","Boolean","join","Fragment","withoutGridItem","__experimentalTreeGridItem","BlockMoverUpButton","orientation","clientIds","BlockMoverDownButton","icon","moreVertical","label","popoverProps","anchor","toggleProps","disableOpenOnArrowDown","__experimentalSelectBlock","_default","exports","memo"],"sources":["@wordpress/block-editor/src/components/list-view/block.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\thasBlockSupport,\n\tswitchToBlockType,\n\tstore as blocksStore,\n} from '@wordpress/blocks';\nimport {\n\t__experimentalTreeGridCell as TreeGridCell,\n\t__experimentalTreeGridItem as TreeGridItem,\n} from '@wordpress/components';\nimport { useInstanceId } from '@wordpress/compose';\nimport { moreVertical } from '@wordpress/icons';\nimport {\n\tuseCallback,\n\tuseMemo,\n\tuseState,\n\tuseRef,\n\tmemo,\n} from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { BACKSPACE, DELETE } from '@wordpress/keycodes';\nimport isShallowEqual from '@wordpress/is-shallow-equal';\nimport { __unstableUseShortcutEventMatch as useShortcutEventMatch } from '@wordpress/keyboard-shortcuts';\nimport { speak } from '@wordpress/a11y';\n\n/**\n * Internal dependencies\n */\nimport ListViewLeaf from './leaf';\nimport useListViewScrollIntoView from './use-list-view-scroll-into-view';\nimport {\n\tBlockMoverUpButton,\n\tBlockMoverDownButton,\n} from '../block-mover/button';\nimport ListViewBlockContents from './block-contents';\nimport { useListViewContext } from './context';\nimport {\n\tgetBlockPositionDescription,\n\tgetBlockPropertiesDescription,\n\tfocusListItem,\n} from './utils';\nimport { store as blockEditorStore } from '../../store';\nimport useBlockDisplayInformation from '../use-block-display-information';\nimport { useBlockLock } from '../block-lock';\nimport AriaReferencedText from './aria-referenced-text';\nimport { unlock } from '../../lock-unlock';\n\nfunction ListViewBlock( {\n\tblock: { clientId },\n\tdisplacement,\n\tisAfterDraggedBlocks,\n\tisDragged,\n\tisNesting,\n\tisSelected,\n\tisBranchSelected,\n\tselectBlock,\n\tposition,\n\tlevel,\n\trowCount,\n\tsiblingBlockCount,\n\tshowBlockMovers,\n\tpath,\n\tisExpanded,\n\tselectedClientIds,\n\tisSyncedBranch,\n} ) {\n\tconst cellRef = useRef( null );\n\tconst rowRef = useRef( null );\n\tconst settingsRef = useRef( null );\n\tconst [ isHovered, setIsHovered ] = useState( false );\n\tconst [ settingsAnchorRect, setSettingsAnchorRect ] = useState();\n\n\tconst { isLocked, canEdit, canMove } = useBlockLock( clientId );\n\n\tconst isFirstSelectedBlock =\n\t\tisSelected && selectedClientIds[ 0 ] === clientId;\n\tconst isLastSelectedBlock =\n\t\tisSelected &&\n\t\tselectedClientIds[ selectedClientIds.length - 1 ] === clientId;\n\n\tconst {\n\t\ttoggleBlockHighlight,\n\t\tduplicateBlocks,\n\t\tmultiSelect,\n\t\treplaceBlocks,\n\t\tremoveBlocks,\n\t\tinsertAfterBlock,\n\t\tinsertBeforeBlock,\n\t\tsetOpenedBlockSettingsMenu,\n\t} = unlock( useDispatch( blockEditorStore ) );\n\n\tconst {\n\t\tcanInsertBlockType,\n\t\tgetSelectedBlockClientIds,\n\t\tgetPreviousBlockClientId,\n\t\tgetBlockRootClientId,\n\t\tgetBlockOrder,\n\t\tgetBlockParents,\n\t\tgetBlocksByClientId,\n\t\tcanRemoveBlocks,\n\t\tisGroupable,\n\t} = useSelect( blockEditorStore );\n\tconst { getGroupingBlockName } = useSelect( blocksStore );\n\n\tconst blockInformation = useBlockDisplayInformation( clientId );\n\n\tconst { block, blockName, allowRightClickOverrides } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlock, getBlockName, getSettings } =\n\t\t\t\tselect( blockEditorStore );\n\n\t\t\treturn {\n\t\t\t\tblock: getBlock( clientId ),\n\t\t\t\tblockName: getBlockName( clientId ),\n\t\t\t\tallowRightClickOverrides:\n\t\t\t\t\tgetSettings().allowRightClickOverrides,\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst showBlockActions =\n\t\t// When a block hides its toolbar it also hides the block settings menu,\n\t\t// since that menu is part of the toolbar in the editor canvas.\n\t\t// List View respects this by also hiding the block settings menu.\n\t\thasBlockSupport( blockName, '__experimentalToolbar', true );\n\tconst instanceId = useInstanceId( ListViewBlock );\n\tconst descriptionId = `list-view-block-select-button__description-${ instanceId }`;\n\n\tconst {\n\t\texpand,\n\t\tcollapse,\n\t\tcollapseAll,\n\t\tBlockSettingsMenu,\n\t\tlistViewInstanceId,\n\t\texpandedState,\n\t\tsetInsertedBlock,\n\t\ttreeGridElementRef,\n\t\trootClientId,\n\t} = useListViewContext();\n\tconst isMatch = useShortcutEventMatch();\n\n\t// Determine which blocks to update:\n\t// If the current (focused) block is part of the block selection, use the whole selection.\n\t// If the focused block is not part of the block selection, only update the focused block.\n\tfunction getBlocksToUpdate() {\n\t\tconst selectedBlockClientIds = getSelectedBlockClientIds();\n\t\tconst isUpdatingSelectedBlocks =\n\t\t\tselectedBlockClientIds.includes( clientId );\n\t\tconst firstBlockClientId = isUpdatingSelectedBlocks\n\t\t\t? selectedBlockClientIds[ 0 ]\n\t\t\t: clientId;\n\t\tconst firstBlockRootClientId =\n\t\t\tgetBlockRootClientId( firstBlockClientId );\n\n\t\tconst blocksToUpdate = isUpdatingSelectedBlocks\n\t\t\t? selectedBlockClientIds\n\t\t\t: [ clientId ];\n\n\t\treturn {\n\t\t\tblocksToUpdate,\n\t\t\tfirstBlockClientId,\n\t\t\tfirstBlockRootClientId,\n\t\t\tselectedBlockClientIds,\n\t\t};\n\t}\n\n\t/**\n\t * @param {KeyboardEvent} event\n\t */\n\tasync function onKeyDown( event ) {\n\t\tif ( event.defaultPrevented ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Do not handle events if it comes from modals;\n\t\t// retain the default behavior for these keys.\n\t\tif ( event.target.closest( '[role=dialog]' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst isDeleteKey = [ BACKSPACE, DELETE ].includes( event.keyCode );\n\n\t\t// If multiple blocks are selected, deselect all blocks when the user\n\t\t// presses the escape key.\n\t\tif (\n\t\t\tisMatch( 'core/block-editor/unselect', event ) &&\n\t\t\tselectedClientIds.length > 0\n\t\t) {\n\t\t\tevent.stopPropagation();\n\t\t\tevent.preventDefault();\n\t\t\tselectBlock( event, undefined );\n\t\t} else if (\n\t\t\tisDeleteKey ||\n\t\t\tisMatch( 'core/block-editor/remove', event )\n\t\t) {\n\t\t\tconst {\n\t\t\t\tblocksToUpdate: blocksToDelete,\n\t\t\t\tfirstBlockClientId,\n\t\t\t\tfirstBlockRootClientId,\n\t\t\t\tselectedBlockClientIds,\n\t\t\t} = getBlocksToUpdate();\n\n\t\t\t// Don't update the selection if the blocks cannot be deleted.\n\t\t\tif ( ! canRemoveBlocks( blocksToDelete ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet blockToFocus =\n\t\t\t\tgetPreviousBlockClientId( firstBlockClientId ) ??\n\t\t\t\t// If the previous block is not found (when the first block is deleted),\n\t\t\t\t// fallback to focus the parent block.\n\t\t\t\tfirstBlockRootClientId;\n\n\t\t\tremoveBlocks( blocksToDelete, false );\n\n\t\t\t// Update the selection if the original selection has been removed.\n\t\t\tconst shouldUpdateSelection =\n\t\t\t\tselectedBlockClientIds.length > 0 &&\n\t\t\t\tgetSelectedBlockClientIds().length === 0;\n\n\t\t\t// If there's no previous block nor parent block, focus the first block.\n\t\t\tif ( ! blockToFocus ) {\n\t\t\t\tblockToFocus = getBlockOrder()[ 0 ];\n\t\t\t}\n\n\t\t\tupdateFocusAndSelection( blockToFocus, shouldUpdateSelection );\n\t\t} else if ( isMatch( 'core/block-editor/duplicate', event ) ) {\n\t\t\tevent.preventDefault();\n\n\t\t\tconst { blocksToUpdate, firstBlockRootClientId } =\n\t\t\t\tgetBlocksToUpdate();\n\n\t\t\tconst canDuplicate = getBlocksByClientId( blocksToUpdate ).every(\n\t\t\t\t( blockToUpdate ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t!! blockToUpdate &&\n\t\t\t\t\t\thasBlockSupport(\n\t\t\t\t\t\t\tblockToUpdate.name,\n\t\t\t\t\t\t\t'multiple',\n\t\t\t\t\t\t\ttrue\n\t\t\t\t\t\t) &&\n\t\t\t\t\t\tcanInsertBlockType(\n\t\t\t\t\t\t\tblockToUpdate.name,\n\t\t\t\t\t\t\tfirstBlockRootClientId\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tif ( canDuplicate ) {\n\t\t\t\tconst updatedBlocks = await duplicateBlocks(\n\t\t\t\t\tblocksToUpdate,\n\t\t\t\t\tfalse\n\t\t\t\t);\n\n\t\t\t\tif ( updatedBlocks?.length ) {\n\t\t\t\t\t// If blocks have been duplicated, focus the first duplicated block.\n\t\t\t\t\tupdateFocusAndSelection( updatedBlocks[ 0 ], false );\n\t\t\t\t}\n\t\t\t}\n\t\t} else if ( isMatch( 'core/block-editor/insert-before', event ) ) {\n\t\t\tevent.preventDefault();\n\n\t\t\tconst { blocksToUpdate } = getBlocksToUpdate();\n\t\t\tawait insertBeforeBlock( blocksToUpdate[ 0 ] );\n\t\t\tconst newlySelectedBlocks = getSelectedBlockClientIds();\n\n\t\t\t// Focus the first block of the newly inserted blocks, to keep focus within the list view.\n\t\t\tsetOpenedBlockSettingsMenu( undefined );\n\t\t\tupdateFocusAndSelection( newlySelectedBlocks[ 0 ], false );\n\t\t} else if ( isMatch( 'core/block-editor/insert-after', event ) ) {\n\t\t\tevent.preventDefault();\n\n\t\t\tconst { blocksToUpdate } = getBlocksToUpdate();\n\t\t\tawait insertAfterBlock( blocksToUpdate.at( -1 ) );\n\t\t\tconst newlySelectedBlocks = getSelectedBlockClientIds();\n\n\t\t\t// Focus the first block of the newly inserted blocks, to keep focus within the list view.\n\t\t\tsetOpenedBlockSettingsMenu( undefined );\n\t\t\tupdateFocusAndSelection( newlySelectedBlocks[ 0 ], false );\n\t\t} else if ( isMatch( 'core/block-editor/select-all', event ) ) {\n\t\t\tevent.preventDefault();\n\n\t\t\tconst { firstBlockRootClientId, selectedBlockClientIds } =\n\t\t\t\tgetBlocksToUpdate();\n\t\t\tconst blockClientIds = getBlockOrder( firstBlockRootClientId );\n\t\t\tif ( ! blockClientIds.length ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If we have selected all sibling nested blocks, try selecting up a level.\n\t\t\t// This is a similar implementation to that used by `useSelectAll`.\n\t\t\t// `isShallowEqual` is used for the list view instead of a length check,\n\t\t\t// as the array of siblings of the currently focused block may be a different\n\t\t\t// set of blocks from the current block selection if the user is focused\n\t\t\t// on a different part of the list view from the block selection.\n\t\t\tif ( isShallowEqual( selectedBlockClientIds, blockClientIds ) ) {\n\t\t\t\t// Only select up a level if the first block is not the root block.\n\t\t\t\t// This ensures that the block selection can't break out of the root block\n\t\t\t\t// used by the list view, if the list view is only showing a partial hierarchy.\n\t\t\t\tif (\n\t\t\t\t\tfirstBlockRootClientId &&\n\t\t\t\t\tfirstBlockRootClientId !== rootClientId\n\t\t\t\t) {\n\t\t\t\t\tupdateFocusAndSelection( firstBlockRootClientId, true );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Select all while passing `null` to skip focusing to the editor canvas,\n\t\t\t// and retain focus within the list view.\n\t\t\tmultiSelect(\n\t\t\t\tblockClientIds[ 0 ],\n\t\t\t\tblockClientIds[ blockClientIds.length - 1 ],\n\t\t\t\tnull\n\t\t\t);\n\t\t} else if ( isMatch( 'core/block-editor/collapse-list-view', event ) ) {\n\t\t\tevent.preventDefault();\n\t\t\tconst { firstBlockClientId } = getBlocksToUpdate();\n\t\t\tconst blockParents = getBlockParents( firstBlockClientId, false );\n\t\t\t// Collapse all blocks.\n\t\t\tcollapseAll();\n\t\t\t// Expand all parents of the current block.\n\t\t\texpand( blockParents );\n\t\t} else if ( isMatch( 'core/block-editor/group', event ) ) {\n\t\t\tconst { blocksToUpdate } = getBlocksToUpdate();\n\t\t\tif ( blocksToUpdate.length > 1 && isGroupable( blocksToUpdate ) ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tconst blocks = getBlocksByClientId( blocksToUpdate );\n\t\t\t\tconst groupingBlockName = getGroupingBlockName();\n\t\t\t\tconst newBlocks = switchToBlockType(\n\t\t\t\t\tblocks,\n\t\t\t\t\tgroupingBlockName\n\t\t\t\t);\n\t\t\t\treplaceBlocks( blocksToUpdate, newBlocks );\n\t\t\t\tspeak( __( 'Selected blocks are grouped.' ) );\n\t\t\t\tconst newlySelectedBlocks = getSelectedBlockClientIds();\n\t\t\t\t// Focus the first block of the newly inserted blocks, to keep focus within the list view.\n\t\t\t\tsetOpenedBlockSettingsMenu( undefined );\n\t\t\t\tupdateFocusAndSelection( newlySelectedBlocks[ 0 ], false );\n\t\t\t}\n\t\t}\n\t}\n\n\tconst onMouseEnter = useCallback( () => {\n\t\tsetIsHovered( true );\n\t\ttoggleBlockHighlight( clientId, true );\n\t}, [ clientId, setIsHovered, toggleBlockHighlight ] );\n\tconst onMouseLeave = useCallback( () => {\n\t\tsetIsHovered( false );\n\t\ttoggleBlockHighlight( clientId, false );\n\t}, [ clientId, setIsHovered, toggleBlockHighlight ] );\n\n\tconst selectEditorBlock = useCallback(\n\t\t( event ) => {\n\t\t\tselectBlock( event, clientId );\n\t\t\tevent.preventDefault();\n\t\t},\n\t\t[ clientId, selectBlock ]\n\t);\n\n\tconst updateFocusAndSelection = useCallback(\n\t\t( focusClientId, shouldSelectBlock ) => {\n\t\t\tif ( shouldSelectBlock ) {\n\t\t\t\tselectBlock( undefined, focusClientId, null, null );\n\t\t\t}\n\n\t\t\tfocusListItem( focusClientId, treeGridElementRef?.current );\n\t\t},\n\t\t[ selectBlock, treeGridElementRef ]\n\t);\n\n\tconst toggleExpanded = useCallback(\n\t\t( event ) => {\n\t\t\t// Prevent shift+click from opening link in a new window when toggling.\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\tif ( isExpanded === true ) {\n\t\t\t\tcollapse( clientId );\n\t\t\t} else if ( isExpanded === false ) {\n\t\t\t\texpand( clientId );\n\t\t\t}\n\t\t},\n\t\t[ clientId, expand, collapse, isExpanded ]\n\t);\n\n\t// Allow right-clicking an item in the List View to open up the block settings dropdown.\n\tconst onContextMenu = useCallback(\n\t\t( event ) => {\n\t\t\tif ( showBlockActions && allowRightClickOverrides ) {\n\t\t\t\tsettingsRef.current?.click();\n\t\t\t\t// Ensure the position of the settings dropdown is at the cursor.\n\t\t\t\tsetSettingsAnchorRect(\n\t\t\t\t\tnew window.DOMRect( event.clientX, event.clientY, 0, 0 )\n\t\t\t\t);\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t},\n\t\t[ allowRightClickOverrides, settingsRef, showBlockActions ]\n\t);\n\n\tconst onMouseDown = useCallback(\n\t\t( event ) => {\n\t\t\t// Prevent right-click from focusing the block,\n\t\t\t// because focus will be handled when opening the block settings dropdown.\n\t\t\tif ( allowRightClickOverrides && event.button === 2 ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t},\n\t\t[ allowRightClickOverrides ]\n\t);\n\n\tconst settingsPopoverAnchor = useMemo( () => {\n\t\tconst { ownerDocument } = rowRef?.current || {};\n\n\t\t// If no custom position is set, the settings dropdown will be anchored to the\n\t\t// DropdownMenu toggle button.\n\t\tif ( ! settingsAnchorRect || ! ownerDocument ) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// Position the settings dropdown at the cursor when right-clicking a block.\n\t\treturn {\n\t\t\townerDocument,\n\t\t\tgetBoundingClientRect() {\n\t\t\t\treturn settingsAnchorRect;\n\t\t\t},\n\t\t};\n\t}, [ settingsAnchorRect ] );\n\n\tconst clearSettingsAnchorRect = useCallback( () => {\n\t\t// Clear the custom position for the settings dropdown so that it is restored back\n\t\t// to being anchored to the DropdownMenu toggle button.\n\t\tsetSettingsAnchorRect( undefined );\n\t}, [ setSettingsAnchorRect ] );\n\n\t// Pass in a ref to the row, so that it can be scrolled\n\t// into view when selected. For long lists, the placeholder for the\n\t// selected block is also observed, within ListViewLeafPlaceholder.\n\tuseListViewScrollIntoView( {\n\t\tisSelected,\n\t\trowItemRef: rowRef,\n\t\tselectedClientIds,\n\t} );\n\n\t// When switching between rendering modes (such as template preview and content only),\n\t// it is possible for a block to temporarily be unavailable. In this case, we should not\n\t// render the leaf, to avoid errors further down the tree.\n\tif ( ! block ) {\n\t\treturn null;\n\t}\n\n\tconst blockPositionDescription = getBlockPositionDescription(\n\t\tposition,\n\t\tsiblingBlockCount,\n\t\tlevel\n\t);\n\n\tconst blockPropertiesDescription = getBlockPropertiesDescription(\n\t\tblockInformation,\n\t\tisLocked\n\t);\n\n\tconst hasSiblings = siblingBlockCount > 0;\n\tconst hasRenderedMovers = showBlockMovers && hasSiblings;\n\tconst moverCellClassName = clsx(\n\t\t'block-editor-list-view-block__mover-cell',\n\t\t{ 'is-visible': isHovered || isSelected }\n\t);\n\n\tconst listViewBlockSettingsClassName = clsx(\n\t\t'block-editor-list-view-block__menu-cell',\n\t\t{ 'is-visible': isHovered || isFirstSelectedBlock }\n\t);\n\n\tlet colSpan;\n\tif ( hasRenderedMovers ) {\n\t\tcolSpan = 2;\n\t} else if ( ! showBlockActions ) {\n\t\tcolSpan = 3;\n\t}\n\n\tconst classes = clsx( {\n\t\t'is-selected': isSelected,\n\t\t'is-first-selected': isFirstSelectedBlock,\n\t\t'is-last-selected': isLastSelectedBlock,\n\t\t'is-branch-selected': isBranchSelected,\n\t\t'is-synced-branch': isSyncedBranch,\n\t\t'is-dragging': isDragged,\n\t\t'has-single-cell': ! showBlockActions,\n\t\t'is-synced': blockInformation?.isSynced,\n\t\t'is-draggable': canMove,\n\t\t'is-displacement-normal': displacement === 'normal',\n\t\t'is-displacement-up': displacement === 'up',\n\t\t'is-displacement-down': displacement === 'down',\n\t\t'is-after-dragged-blocks': isAfterDraggedBlocks,\n\t\t'is-nesting': isNesting,\n\t} );\n\n\t// Only include all selected blocks if the currently clicked on block\n\t// is one of the selected blocks. This ensures that if a user attempts\n\t// to alter a block that isn't part of the selection, they're still able\n\t// to do so.\n\tconst dropdownClientIds = selectedClientIds.includes( clientId )\n\t\t? selectedClientIds\n\t\t: [ clientId ];\n\n\t// Detect if there is a block in the canvas currently being edited and multi-selection is not happening.\n\tconst currentlyEditingBlockInCanvas =\n\t\tisSelected && selectedClientIds.length === 1;\n\n\treturn (\n\t\t<ListViewLeaf\n\t\t\tclassName={ classes }\n\t\t\tisDragged={ isDragged }\n\t\t\tonKeyDown={ onKeyDown }\n\t\t\tonMouseEnter={ onMouseEnter }\n\t\t\tonMouseLeave={ onMouseLeave }\n\t\t\tonFocus={ onMouseEnter }\n\t\t\tonBlur={ onMouseLeave }\n\t\t\tlevel={ level }\n\t\t\tposition={ position }\n\t\t\trowCount={ rowCount }\n\t\t\tpath={ path }\n\t\t\tid={ `list-view-${ listViewInstanceId }-block-${ clientId }` }\n\t\t\tdata-block={ clientId }\n\t\t\tdata-expanded={ canEdit ? isExpanded : undefined }\n\t\t\tref={ rowRef }\n\t\t>\n\t\t\t<TreeGridCell\n\t\t\t\tclassName=\"block-editor-list-view-block__contents-cell\"\n\t\t\t\tcolSpan={ colSpan }\n\t\t\t\tref={ cellRef }\n\t\t\t\taria-selected={ !! isSelected }\n\t\t\t>\n\t\t\t\t{ ( { ref, tabIndex, onFocus } ) => (\n\t\t\t\t\t<div className=\"block-editor-list-view-block__contents-container\">\n\t\t\t\t\t\t<ListViewBlockContents\n\t\t\t\t\t\t\tblock={ block }\n\t\t\t\t\t\t\tonClick={ selectEditorBlock }\n\t\t\t\t\t\t\tonContextMenu={ onContextMenu }\n\t\t\t\t\t\t\tonMouseDown={ onMouseDown }\n\t\t\t\t\t\t\tonToggleExpanded={ toggleExpanded }\n\t\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\t\tposition={ position }\n\t\t\t\t\t\t\tsiblingBlockCount={ siblingBlockCount }\n\t\t\t\t\t\t\tlevel={ level }\n\t\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\t\ttabIndex={\n\t\t\t\t\t\t\t\tcurrentlyEditingBlockInCanvas ? 0 : tabIndex\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonFocus={ onFocus }\n\t\t\t\t\t\t\tisExpanded={ canEdit ? isExpanded : undefined }\n\t\t\t\t\t\t\tselectedClientIds={ selectedClientIds }\n\t\t\t\t\t\t\tariaDescribedBy={ descriptionId }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<AriaReferencedText id={ descriptionId }>\n\t\t\t\t\t\t\t{ [\n\t\t\t\t\t\t\t\tblockPositionDescription,\n\t\t\t\t\t\t\t\tblockPropertiesDescription,\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t.filter( Boolean )\n\t\t\t\t\t\t\t\t.join( ' ' ) }\n\t\t\t\t\t\t</AriaReferencedText>\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t</TreeGridCell>\n\t\t\t{ hasRenderedMovers && (\n\t\t\t\t<>\n\t\t\t\t\t<TreeGridCell\n\t\t\t\t\t\tclassName={ moverCellClassName }\n\t\t\t\t\t\twithoutGridItem\n\t\t\t\t\t>\n\t\t\t\t\t\t<TreeGridItem>\n\t\t\t\t\t\t\t{ ( { ref, tabIndex, onFocus } ) => (\n\t\t\t\t\t\t\t\t<BlockMoverUpButton\n\t\t\t\t\t\t\t\t\torientation=\"vertical\"\n\t\t\t\t\t\t\t\t\tclientIds={ [ clientId ] }\n\t\t\t\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\t\t\t\ttabIndex={ tabIndex }\n\t\t\t\t\t\t\t\t\tonFocus={ onFocus }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</TreeGridItem>\n\t\t\t\t\t\t<TreeGridItem>\n\t\t\t\t\t\t\t{ ( { ref, tabIndex, onFocus } ) => (\n\t\t\t\t\t\t\t\t<BlockMoverDownButton\n\t\t\t\t\t\t\t\t\torientation=\"vertical\"\n\t\t\t\t\t\t\t\t\tclientIds={ [ clientId ] }\n\t\t\t\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\t\t\t\ttabIndex={ tabIndex }\n\t\t\t\t\t\t\t\t\tonFocus={ onFocus }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</TreeGridItem>\n\t\t\t\t\t</TreeGridCell>\n\t\t\t\t</>\n\t\t\t) }\n\n\t\t\t{ showBlockActions && BlockSettingsMenu && (\n\t\t\t\t<TreeGridCell\n\t\t\t\t\tclassName={ listViewBlockSettingsClassName }\n\t\t\t\t\taria-selected={ !! isSelected }\n\t\t\t\t\tref={ settingsRef }\n\t\t\t\t>\n\t\t\t\t\t{ ( { ref, tabIndex, onFocus } ) => (\n\t\t\t\t\t\t<BlockSettingsMenu\n\t\t\t\t\t\t\tclientIds={ dropdownClientIds }\n\t\t\t\t\t\t\tblock={ block }\n\t\t\t\t\t\t\ticon={ moreVertical }\n\t\t\t\t\t\t\tlabel={ __( 'Options' ) }\n\t\t\t\t\t\t\tpopoverProps={ {\n\t\t\t\t\t\t\t\tanchor: settingsPopoverAnchor, // Used to position the settings at the cursor on right-click.\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\ttoggleProps={ {\n\t\t\t\t\t\t\t\tref,\n\t\t\t\t\t\t\t\tclassName: 'block-editor-list-view-block__menu',\n\t\t\t\t\t\t\t\ttabIndex,\n\t\t\t\t\t\t\t\tonClick: clearSettingsAnchorRect,\n\t\t\t\t\t\t\t\tonFocus,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tdisableOpenOnArrowDown\n\t\t\t\t\t\t\texpand={ expand }\n\t\t\t\t\t\t\texpandedState={ expandedState }\n\t\t\t\t\t\t\tsetInsertedBlock={ setInsertedBlock }\n\t\t\t\t\t\t\t__experimentalSelectBlock={\n\t\t\t\t\t\t\t\tupdateFocusAndSelection\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</TreeGridCell>\n\t\t\t) }\n\t\t</ListViewLeaf>\n\t);\n}\n\nexport default memo( ListViewBlock );\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,OAAA,GAAAD,OAAA;AAKA,IAAAE,WAAA,GAAAF,OAAA;AAIA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AAOA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,KAAA,GAA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tC,IAAA3E,WAAA,CAAA0K,GAAA,EAAC/L,WAAA,CAAAgM,0BAAY;MACZP,SAAS,EAAGR,8BAAgC;MAC5C,iBAAgB,CAAC,CAAEpJ,UAAY;MAC/BgK,GAAG,EAAGjJ,WAAa;MAAAkJ,QAAA,EAEjBA,CAAE;QAAED,GAAG;QAAEI,QAAQ;QAAEP;MAAQ,CAAC,kBAC7B,IAAArK,WAAA,CAAA0K,GAAA,EAAC/F,iBAAiB;QACjB6G,SAAS,EAAGxB,iBAAmB;QAC/B9J,KAAK,EAAGA,KAAO;QACfwL,IAAI,EAAGC,mBAAc;QACrBC,KAAK,EAAG,IAAAjE,QAAE,EAAE,SAAU,CAAG;QACzBkE,YAAY,EAAG;UACdC,MAAM,EAAEjD,qBAAqB,CAAE;QAChC,CAAG;QACHkD,WAAW,EAAG;UACbvB,GAAG;UACHJ,SAAS,EAAE,oCAAoC;UAC/CQ,QAAQ;UACRC,OAAO,EAAE5B,uBAAuB;UAChCoB;QACD,CAAG;QACH2B,sBAAsB;QACtBxH,MAAM,EAAGA,MAAQ;QACjBK,aAAa,EAAGA,aAAe;QAC/BC,gBAAgB,EAAGA,gBAAkB;QACrCmH,yBAAyB,EACxBtF;MACA,CACD;IACD,CACY,CACd;EAAA,CACY,CAAC;AAEjB;AAAC,IAAAuF,QAAA,GAAAC,OAAA,CAAAhC,OAAA,GAEc,IAAAiC,aAAI,EAAEnM,aAAc,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_clsx","_interopRequireDefault","require","_blocks","_components","_compose","_icons","_element","_data","_i18n","_keycodes","_isShallowEqual","_keyboardShortcuts","_a11y","_leaf","_useListViewScrollIntoView","_button","_blockContents","_context","_utils","_store","_useBlockDisplayInformation","_blockLock","_ariaReferencedText","_lockUnlock","_jsxRuntime","ListViewBlock","block","clientId","displacement","isAfterDraggedBlocks","isDragged","isNesting","isSelected","isBranchSelected","selectBlock","position","level","rowCount","siblingBlockCount","showBlockMovers","path","isExpanded","selectedClientIds","isSyncedBranch","cellRef","useRef","rowRef","settingsRef","isHovered","setIsHovered","useState","settingsAnchorRect","setSettingsAnchorRect","isLocked","canEdit","canMove","useBlockLock","isFirstSelectedBlock","isLastSelectedBlock","length","toggleBlockHighlight","duplicateBlocks","multiSelect","replaceBlocks","removeBlocks","insertAfterBlock","insertBeforeBlock","setOpenedBlockSettingsMenu","unlock","useDispatch","blockEditorStore","canInsertBlockType","getSelectedBlockClientIds","getPreviousBlockClientId","getBlockRootClientId","getBlockOrder","getBlockParents","getBlocksByClientId","canRemoveBlocks","isGroupable","useSelect","getGroupingBlockName","blocksStore","blockInformation","useBlockDisplayInformation","blockName","allowRightClickOverrides","select","getBlock","getBlockName","getSettings","showBlockActions","hasBlockSupport","instanceId","useInstanceId","descriptionId","expand","collapse","collapseAll","BlockSettingsMenu","listViewInstanceId","expandedState","setInsertedBlock","treeGridElementRef","rootClientId","useListViewContext","isMatch","useShortcutEventMatch","getBlocksToUpdate","selectedBlockClientIds","isUpdatingSelectedBlocks","includes","firstBlockClientId","firstBlockRootClientId","blocksToUpdate","onKeyDown","event","defaultPrevented","target","closest","isDeleteKey","BACKSPACE","DELETE","keyCode","stopPropagation","preventDefault","undefined","_getPreviousBlockClie","blocksToDelete","blockToFocus","shouldUpdateSelection","updateFocusAndSelection","canDuplicate","every","blockToUpdate","name","updatedBlocks","newlySelectedBlocks","at","blockClientIds","isShallowEqual","blockParents","blocks","groupingBlockName","newBlocks","switchToBlockType","speak","__","onMouseEnter","useCallback","onMouseLeave","selectEditorBlock","focusClientId","shouldSelectBlock","focusListItem","current","toggleExpanded","onContextMenu","click","window","DOMRect","clientX","clientY","onMouseDown","button","settingsPopoverAnchor","useMemo","ownerDocument","getBoundingClientRect","clearSettingsAnchorRect","useListViewScrollIntoView","rowItemRef","blockPositionDescription","getBlockPositionDescription","blockPropertiesDescription","getBlockPropertiesDescription","hasSiblings","hasRenderedMovers","moverCellClassName","clsx","listViewBlockSettingsClassName","colSpan","classes","isSynced","dropdownClientIds","currentlyEditingBlockInCanvas","jsxs","default","className","onFocus","onBlur","id","ref","children","jsx","__experimentalTreeGridCell","tabIndex","onClick","onToggleExpanded","ariaDescribedBy","filter","Boolean","join","Fragment","withoutGridItem","__experimentalTreeGridItem","BlockMoverUpButton","orientation","clientIds","BlockMoverDownButton","icon","moreVertical","label","popoverProps","anchor","toggleProps","disableOpenOnArrowDown","__experimentalSelectBlock","_default","exports","memo"],"sources":["@wordpress/block-editor/src/components/list-view/block.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\thasBlockSupport,\n\tswitchToBlockType,\n\tstore as blocksStore,\n} from '@wordpress/blocks';\nimport {\n\t__experimentalTreeGridCell as TreeGridCell,\n\t__experimentalTreeGridItem as TreeGridItem,\n} from '@wordpress/components';\nimport { useInstanceId } from '@wordpress/compose';\nimport { moreVertical } from '@wordpress/icons';\nimport {\n\tuseCallback,\n\tuseMemo,\n\tuseState,\n\tuseRef,\n\tmemo,\n} from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { BACKSPACE, DELETE } from '@wordpress/keycodes';\nimport isShallowEqual from '@wordpress/is-shallow-equal';\nimport { __unstableUseShortcutEventMatch as useShortcutEventMatch } from '@wordpress/keyboard-shortcuts';\nimport { speak } from '@wordpress/a11y';\n\n/**\n * Internal dependencies\n */\nimport ListViewLeaf from './leaf';\nimport useListViewScrollIntoView from './use-list-view-scroll-into-view';\nimport {\n\tBlockMoverUpButton,\n\tBlockMoverDownButton,\n} from '../block-mover/button';\nimport ListViewBlockContents from './block-contents';\nimport { useListViewContext } from './context';\nimport {\n\tgetBlockPositionDescription,\n\tgetBlockPropertiesDescription,\n\tfocusListItem,\n} from './utils';\nimport { store as blockEditorStore } from '../../store';\nimport useBlockDisplayInformation from '../use-block-display-information';\nimport { useBlockLock } from '../block-lock';\nimport AriaReferencedText from './aria-referenced-text';\nimport { unlock } from '../../lock-unlock';\n\nfunction ListViewBlock( {\n\tblock: { clientId },\n\tdisplacement,\n\tisAfterDraggedBlocks,\n\tisDragged,\n\tisNesting,\n\tisSelected,\n\tisBranchSelected,\n\tselectBlock,\n\tposition,\n\tlevel,\n\trowCount,\n\tsiblingBlockCount,\n\tshowBlockMovers,\n\tpath,\n\tisExpanded,\n\tselectedClientIds,\n\tisSyncedBranch,\n} ) {\n\tconst cellRef = useRef( null );\n\tconst rowRef = useRef( null );\n\tconst settingsRef = useRef( null );\n\tconst [ isHovered, setIsHovered ] = useState( false );\n\tconst [ settingsAnchorRect, setSettingsAnchorRect ] = useState();\n\n\tconst { isLocked, canEdit, canMove } = useBlockLock( clientId );\n\n\tconst isFirstSelectedBlock =\n\t\tisSelected && selectedClientIds[ 0 ] === clientId;\n\tconst isLastSelectedBlock =\n\t\tisSelected &&\n\t\tselectedClientIds[ selectedClientIds.length - 1 ] === clientId;\n\n\tconst {\n\t\ttoggleBlockHighlight,\n\t\tduplicateBlocks,\n\t\tmultiSelect,\n\t\treplaceBlocks,\n\t\tremoveBlocks,\n\t\tinsertAfterBlock,\n\t\tinsertBeforeBlock,\n\t\tsetOpenedBlockSettingsMenu,\n\t} = unlock( useDispatch( blockEditorStore ) );\n\n\tconst {\n\t\tcanInsertBlockType,\n\t\tgetSelectedBlockClientIds,\n\t\tgetPreviousBlockClientId,\n\t\tgetBlockRootClientId,\n\t\tgetBlockOrder,\n\t\tgetBlockParents,\n\t\tgetBlocksByClientId,\n\t\tcanRemoveBlocks,\n\t\tisGroupable,\n\t} = useSelect( blockEditorStore );\n\tconst { getGroupingBlockName } = useSelect( blocksStore );\n\n\tconst blockInformation = useBlockDisplayInformation( clientId );\n\n\tconst { block, blockName, allowRightClickOverrides } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlock, getBlockName, getSettings } =\n\t\t\t\tselect( blockEditorStore );\n\n\t\t\treturn {\n\t\t\t\tblock: getBlock( clientId ),\n\t\t\t\tblockName: getBlockName( clientId ),\n\t\t\t\tallowRightClickOverrides:\n\t\t\t\t\tgetSettings().allowRightClickOverrides,\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst showBlockActions =\n\t\t// When a block hides its toolbar it also hides the block settings menu,\n\t\t// since that menu is part of the toolbar in the editor canvas.\n\t\t// List View respects this by also hiding the block settings menu.\n\t\thasBlockSupport( blockName, '__experimentalToolbar', true );\n\tconst instanceId = useInstanceId( ListViewBlock );\n\tconst descriptionId = `list-view-block-select-button__description-${ instanceId }`;\n\n\tconst {\n\t\texpand,\n\t\tcollapse,\n\t\tcollapseAll,\n\t\tBlockSettingsMenu,\n\t\tlistViewInstanceId,\n\t\texpandedState,\n\t\tsetInsertedBlock,\n\t\ttreeGridElementRef,\n\t\trootClientId,\n\t} = useListViewContext();\n\tconst isMatch = useShortcutEventMatch();\n\n\t// Determine which blocks to update:\n\t// If the current (focused) block is part of the block selection, use the whole selection.\n\t// If the focused block is not part of the block selection, only update the focused block.\n\tfunction getBlocksToUpdate() {\n\t\tconst selectedBlockClientIds = getSelectedBlockClientIds();\n\t\tconst isUpdatingSelectedBlocks =\n\t\t\tselectedBlockClientIds.includes( clientId );\n\t\tconst firstBlockClientId = isUpdatingSelectedBlocks\n\t\t\t? selectedBlockClientIds[ 0 ]\n\t\t\t: clientId;\n\t\tconst firstBlockRootClientId =\n\t\t\tgetBlockRootClientId( firstBlockClientId );\n\n\t\tconst blocksToUpdate = isUpdatingSelectedBlocks\n\t\t\t? selectedBlockClientIds\n\t\t\t: [ clientId ];\n\n\t\treturn {\n\t\t\tblocksToUpdate,\n\t\t\tfirstBlockClientId,\n\t\t\tfirstBlockRootClientId,\n\t\t\tselectedBlockClientIds,\n\t\t};\n\t}\n\n\t/**\n\t * @param {KeyboardEvent} event\n\t */\n\tasync function onKeyDown( event ) {\n\t\tif ( event.defaultPrevented ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Do not handle events if it comes from modals;\n\t\t// retain the default behavior for these keys.\n\t\tif ( event.target.closest( '[role=dialog]' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst isDeleteKey = [ BACKSPACE, DELETE ].includes( event.keyCode );\n\n\t\t// If multiple blocks are selected, deselect all blocks when the user\n\t\t// presses the escape key.\n\t\tif (\n\t\t\tisMatch( 'core/block-editor/unselect', event ) &&\n\t\t\tselectedClientIds.length > 0\n\t\t) {\n\t\t\tevent.stopPropagation();\n\t\t\tevent.preventDefault();\n\t\t\tselectBlock( event, undefined );\n\t\t} else if (\n\t\t\tisDeleteKey ||\n\t\t\tisMatch( 'core/block-editor/remove', event )\n\t\t) {\n\t\t\tconst {\n\t\t\t\tblocksToUpdate: blocksToDelete,\n\t\t\t\tfirstBlockClientId,\n\t\t\t\tfirstBlockRootClientId,\n\t\t\t\tselectedBlockClientIds,\n\t\t\t} = getBlocksToUpdate();\n\n\t\t\t// Don't update the selection if the blocks cannot be deleted.\n\t\t\tif ( ! canRemoveBlocks( blocksToDelete ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet blockToFocus =\n\t\t\t\tgetPreviousBlockClientId( firstBlockClientId ) ??\n\t\t\t\t// If the previous block is not found (when the first block is deleted),\n\t\t\t\t// fallback to focus the parent block.\n\t\t\t\tfirstBlockRootClientId;\n\n\t\t\tremoveBlocks( blocksToDelete, false );\n\n\t\t\t// Update the selection if the original selection has been removed.\n\t\t\tconst shouldUpdateSelection =\n\t\t\t\tselectedBlockClientIds.length > 0 &&\n\t\t\t\tgetSelectedBlockClientIds().length === 0;\n\n\t\t\t// If there's no previous block nor parent block, focus the first block.\n\t\t\tif ( ! blockToFocus ) {\n\t\t\t\tblockToFocus = getBlockOrder()[ 0 ];\n\t\t\t}\n\n\t\t\tupdateFocusAndSelection( blockToFocus, shouldUpdateSelection );\n\t\t} else if ( isMatch( 'core/block-editor/duplicate', event ) ) {\n\t\t\tevent.preventDefault();\n\n\t\t\tconst { blocksToUpdate, firstBlockRootClientId } =\n\t\t\t\tgetBlocksToUpdate();\n\n\t\t\tconst canDuplicate = getBlocksByClientId( blocksToUpdate ).every(\n\t\t\t\t( blockToUpdate ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t!! blockToUpdate &&\n\t\t\t\t\t\thasBlockSupport(\n\t\t\t\t\t\t\tblockToUpdate.name,\n\t\t\t\t\t\t\t'multiple',\n\t\t\t\t\t\t\ttrue\n\t\t\t\t\t\t) &&\n\t\t\t\t\t\tcanInsertBlockType(\n\t\t\t\t\t\t\tblockToUpdate.name,\n\t\t\t\t\t\t\tfirstBlockRootClientId\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tif ( canDuplicate ) {\n\t\t\t\tconst updatedBlocks = await duplicateBlocks(\n\t\t\t\t\tblocksToUpdate,\n\t\t\t\t\tfalse\n\t\t\t\t);\n\n\t\t\t\tif ( updatedBlocks?.length ) {\n\t\t\t\t\t// If blocks have been duplicated, focus the first duplicated block.\n\t\t\t\t\tupdateFocusAndSelection( updatedBlocks[ 0 ], false );\n\t\t\t\t}\n\t\t\t}\n\t\t} else if ( isMatch( 'core/block-editor/insert-before', event ) ) {\n\t\t\tevent.preventDefault();\n\n\t\t\tconst { blocksToUpdate } = getBlocksToUpdate();\n\t\t\tawait insertBeforeBlock( blocksToUpdate[ 0 ] );\n\t\t\tconst newlySelectedBlocks = getSelectedBlockClientIds();\n\n\t\t\t// Focus the first block of the newly inserted blocks, to keep focus within the list view.\n\t\t\tsetOpenedBlockSettingsMenu( undefined );\n\t\t\tupdateFocusAndSelection( newlySelectedBlocks[ 0 ], false );\n\t\t} else if ( isMatch( 'core/block-editor/insert-after', event ) ) {\n\t\t\tevent.preventDefault();\n\n\t\t\tconst { blocksToUpdate } = getBlocksToUpdate();\n\t\t\tawait insertAfterBlock( blocksToUpdate.at( -1 ) );\n\t\t\tconst newlySelectedBlocks = getSelectedBlockClientIds();\n\n\t\t\t// Focus the first block of the newly inserted blocks, to keep focus within the list view.\n\t\t\tsetOpenedBlockSettingsMenu( undefined );\n\t\t\tupdateFocusAndSelection( newlySelectedBlocks[ 0 ], false );\n\t\t} else if ( isMatch( 'core/block-editor/select-all', event ) ) {\n\t\t\tevent.preventDefault();\n\n\t\t\tconst { firstBlockRootClientId, selectedBlockClientIds } =\n\t\t\t\tgetBlocksToUpdate();\n\t\t\tconst blockClientIds = getBlockOrder( firstBlockRootClientId );\n\t\t\tif ( ! blockClientIds.length ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If we have selected all sibling nested blocks, try selecting up a level.\n\t\t\t// This is a similar implementation to that used by `useSelectAll`.\n\t\t\t// `isShallowEqual` is used for the list view instead of a length check,\n\t\t\t// as the array of siblings of the currently focused block may be a different\n\t\t\t// set of blocks from the current block selection if the user is focused\n\t\t\t// on a different part of the list view from the block selection.\n\t\t\tif ( isShallowEqual( selectedBlockClientIds, blockClientIds ) ) {\n\t\t\t\t// Only select up a level if the first block is not the root block.\n\t\t\t\t// This ensures that the block selection can't break out of the root block\n\t\t\t\t// used by the list view, if the list view is only showing a partial hierarchy.\n\t\t\t\tif (\n\t\t\t\t\tfirstBlockRootClientId &&\n\t\t\t\t\tfirstBlockRootClientId !== rootClientId\n\t\t\t\t) {\n\t\t\t\t\tupdateFocusAndSelection( firstBlockRootClientId, true );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Select all while passing `null` to skip focusing to the editor canvas,\n\t\t\t// and retain focus within the list view.\n\t\t\tmultiSelect(\n\t\t\t\tblockClientIds[ 0 ],\n\t\t\t\tblockClientIds[ blockClientIds.length - 1 ],\n\t\t\t\tnull\n\t\t\t);\n\t\t} else if ( isMatch( 'core/block-editor/collapse-list-view', event ) ) {\n\t\t\tevent.preventDefault();\n\t\t\tconst { firstBlockClientId } = getBlocksToUpdate();\n\t\t\tconst blockParents = getBlockParents( firstBlockClientId, false );\n\t\t\t// Collapse all blocks.\n\t\t\tcollapseAll();\n\t\t\t// Expand all parents of the current block.\n\t\t\texpand( blockParents );\n\t\t} else if ( isMatch( 'core/block-editor/group', event ) ) {\n\t\t\tconst { blocksToUpdate } = getBlocksToUpdate();\n\t\t\tif ( blocksToUpdate.length > 1 && isGroupable( blocksToUpdate ) ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tconst blocks = getBlocksByClientId( blocksToUpdate );\n\t\t\t\tconst groupingBlockName = getGroupingBlockName();\n\t\t\t\tconst newBlocks = switchToBlockType(\n\t\t\t\t\tblocks,\n\t\t\t\t\tgroupingBlockName\n\t\t\t\t);\n\t\t\t\treplaceBlocks( blocksToUpdate, newBlocks );\n\t\t\t\tspeak( __( 'Selected blocks are grouped.' ) );\n\t\t\t\tconst newlySelectedBlocks = getSelectedBlockClientIds();\n\t\t\t\t// Focus the first block of the newly inserted blocks, to keep focus within the list view.\n\t\t\t\tsetOpenedBlockSettingsMenu( undefined );\n\t\t\t\tupdateFocusAndSelection( newlySelectedBlocks[ 0 ], false );\n\t\t\t}\n\t\t}\n\t}\n\n\tconst onMouseEnter = useCallback( () => {\n\t\tsetIsHovered( true );\n\t\ttoggleBlockHighlight( clientId, true );\n\t}, [ clientId, setIsHovered, toggleBlockHighlight ] );\n\tconst onMouseLeave = useCallback( () => {\n\t\tsetIsHovered( false );\n\t\ttoggleBlockHighlight( clientId, false );\n\t}, [ clientId, setIsHovered, toggleBlockHighlight ] );\n\n\tconst selectEditorBlock = useCallback(\n\t\t( event ) => {\n\t\t\tselectBlock( event, clientId );\n\t\t\tevent.preventDefault();\n\t\t},\n\t\t[ clientId, selectBlock ]\n\t);\n\n\tconst updateFocusAndSelection = useCallback(\n\t\t( focusClientId, shouldSelectBlock ) => {\n\t\t\tif ( shouldSelectBlock ) {\n\t\t\t\tselectBlock( undefined, focusClientId, null, null );\n\t\t\t}\n\n\t\t\tfocusListItem( focusClientId, treeGridElementRef?.current );\n\t\t},\n\t\t[ selectBlock, treeGridElementRef ]\n\t);\n\n\tconst toggleExpanded = useCallback(\n\t\t( event ) => {\n\t\t\t// Prevent shift+click from opening link in a new window when toggling.\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\tif ( isExpanded === true ) {\n\t\t\t\tcollapse( clientId );\n\t\t\t} else if ( isExpanded === false ) {\n\t\t\t\texpand( clientId );\n\t\t\t}\n\t\t},\n\t\t[ clientId, expand, collapse, isExpanded ]\n\t);\n\n\t// Allow right-clicking an item in the List View to open up the block settings dropdown.\n\tconst onContextMenu = useCallback(\n\t\t( event ) => {\n\t\t\tif ( showBlockActions && allowRightClickOverrides ) {\n\t\t\t\tsettingsRef.current?.click();\n\t\t\t\t// Ensure the position of the settings dropdown is at the cursor.\n\t\t\t\tsetSettingsAnchorRect(\n\t\t\t\t\tnew window.DOMRect( event.clientX, event.clientY, 0, 0 )\n\t\t\t\t);\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t},\n\t\t[ allowRightClickOverrides, settingsRef, showBlockActions ]\n\t);\n\n\tconst onMouseDown = useCallback(\n\t\t( event ) => {\n\t\t\t// Prevent right-click from focusing the block,\n\t\t\t// because focus will be handled when opening the block settings dropdown.\n\t\t\tif ( allowRightClickOverrides && event.button === 2 ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t},\n\t\t[ allowRightClickOverrides ]\n\t);\n\n\tconst settingsPopoverAnchor = useMemo( () => {\n\t\tconst { ownerDocument } = rowRef?.current || {};\n\n\t\t// If no custom position is set, the settings dropdown will be anchored to the\n\t\t// DropdownMenu toggle button.\n\t\tif ( ! settingsAnchorRect || ! ownerDocument ) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// Position the settings dropdown at the cursor when right-clicking a block.\n\t\treturn {\n\t\t\townerDocument,\n\t\t\tgetBoundingClientRect() {\n\t\t\t\treturn settingsAnchorRect;\n\t\t\t},\n\t\t};\n\t}, [ settingsAnchorRect ] );\n\n\tconst clearSettingsAnchorRect = useCallback( () => {\n\t\t// Clear the custom position for the settings dropdown so that it is restored back\n\t\t// to being anchored to the DropdownMenu toggle button.\n\t\tsetSettingsAnchorRect( undefined );\n\t}, [ setSettingsAnchorRect ] );\n\n\t// Pass in a ref to the row, so that it can be scrolled\n\t// into view when selected. For long lists, the placeholder for the\n\t// selected block is also observed, within ListViewLeafPlaceholder.\n\tuseListViewScrollIntoView( {\n\t\tisSelected,\n\t\trowItemRef: rowRef,\n\t\tselectedClientIds,\n\t} );\n\n\t// When switching between rendering modes (such as template preview and content only),\n\t// it is possible for a block to temporarily be unavailable. In this case, we should not\n\t// render the leaf, to avoid errors further down the tree.\n\tif ( ! block ) {\n\t\treturn null;\n\t}\n\n\tconst blockPositionDescription = getBlockPositionDescription(\n\t\tposition,\n\t\tsiblingBlockCount,\n\t\tlevel\n\t);\n\n\tconst blockPropertiesDescription = getBlockPropertiesDescription(\n\t\tblockInformation,\n\t\tisLocked\n\t);\n\n\tconst hasSiblings = siblingBlockCount > 0;\n\tconst hasRenderedMovers = showBlockMovers && hasSiblings;\n\tconst moverCellClassName = clsx(\n\t\t'block-editor-list-view-block__mover-cell',\n\t\t{ 'is-visible': isHovered || isSelected }\n\t);\n\n\tconst listViewBlockSettingsClassName = clsx(\n\t\t'block-editor-list-view-block__menu-cell',\n\t\t{ 'is-visible': isHovered || isFirstSelectedBlock }\n\t);\n\n\tlet colSpan;\n\tif ( hasRenderedMovers ) {\n\t\tcolSpan = 2;\n\t} else if ( ! showBlockActions ) {\n\t\tcolSpan = 3;\n\t}\n\n\tconst classes = clsx( {\n\t\t'is-selected': isSelected,\n\t\t'is-first-selected': isFirstSelectedBlock,\n\t\t'is-last-selected': isLastSelectedBlock,\n\t\t'is-branch-selected': isBranchSelected,\n\t\t'is-synced-branch': isSyncedBranch,\n\t\t'is-dragging': isDragged,\n\t\t'has-single-cell': ! showBlockActions,\n\t\t'is-synced': blockInformation?.isSynced,\n\t\t'is-draggable': canMove,\n\t\t'is-displacement-normal': displacement === 'normal',\n\t\t'is-displacement-up': displacement === 'up',\n\t\t'is-displacement-down': displacement === 'down',\n\t\t'is-after-dragged-blocks': isAfterDraggedBlocks,\n\t\t'is-nesting': isNesting,\n\t} );\n\n\t// Only include all selected blocks if the currently clicked on block\n\t// is one of the selected blocks. This ensures that if a user attempts\n\t// to alter a block that isn't part of the selection, they're still able\n\t// to do so.\n\tconst dropdownClientIds = selectedClientIds.includes( clientId )\n\t\t? selectedClientIds\n\t\t: [ clientId ];\n\n\t// Detect if there is a block in the canvas currently being edited and multi-selection is not happening.\n\tconst currentlyEditingBlockInCanvas =\n\t\tisSelected && selectedClientIds.length === 1;\n\n\treturn (\n\t\t<ListViewLeaf\n\t\t\tclassName={ classes }\n\t\t\tisDragged={ isDragged }\n\t\t\tonKeyDown={ onKeyDown }\n\t\t\tonMouseEnter={ onMouseEnter }\n\t\t\tonMouseLeave={ onMouseLeave }\n\t\t\tonFocus={ onMouseEnter }\n\t\t\tonBlur={ onMouseLeave }\n\t\t\tlevel={ level }\n\t\t\tposition={ position }\n\t\t\trowCount={ rowCount }\n\t\t\tpath={ path }\n\t\t\tid={ `list-view-${ listViewInstanceId }-block-${ clientId }` }\n\t\t\tdata-block={ clientId }\n\t\t\tdata-expanded={ canEdit ? isExpanded : undefined }\n\t\t\tref={ rowRef }\n\t\t>\n\t\t\t<TreeGridCell\n\t\t\t\tclassName=\"block-editor-list-view-block__contents-cell\"\n\t\t\t\tcolSpan={ colSpan }\n\t\t\t\tref={ cellRef }\n\t\t\t\taria-selected={ !! isSelected }\n\t\t\t>\n\t\t\t\t{ ( { ref, tabIndex, onFocus } ) => (\n\t\t\t\t\t<div className=\"block-editor-list-view-block__contents-container\">\n\t\t\t\t\t\t<ListViewBlockContents\n\t\t\t\t\t\t\tblock={ block }\n\t\t\t\t\t\t\tonClick={ selectEditorBlock }\n\t\t\t\t\t\t\tonContextMenu={ onContextMenu }\n\t\t\t\t\t\t\tonMouseDown={ onMouseDown }\n\t\t\t\t\t\t\tonToggleExpanded={ toggleExpanded }\n\t\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\t\tposition={ position }\n\t\t\t\t\t\t\tsiblingBlockCount={ siblingBlockCount }\n\t\t\t\t\t\t\tlevel={ level }\n\t\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\t\ttabIndex={\n\t\t\t\t\t\t\t\tcurrentlyEditingBlockInCanvas ? 0 : tabIndex\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonFocus={ onFocus }\n\t\t\t\t\t\t\tisExpanded={ canEdit ? isExpanded : undefined }\n\t\t\t\t\t\t\tselectedClientIds={ selectedClientIds }\n\t\t\t\t\t\t\tariaDescribedBy={ descriptionId }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<AriaReferencedText id={ descriptionId }>\n\t\t\t\t\t\t\t{ [\n\t\t\t\t\t\t\t\tblockPositionDescription,\n\t\t\t\t\t\t\t\tblockPropertiesDescription,\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t.filter( Boolean )\n\t\t\t\t\t\t\t\t.join( ' ' ) }\n\t\t\t\t\t\t</AriaReferencedText>\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t</TreeGridCell>\n\t\t\t{ hasRenderedMovers && (\n\t\t\t\t<>\n\t\t\t\t\t<TreeGridCell\n\t\t\t\t\t\tclassName={ moverCellClassName }\n\t\t\t\t\t\twithoutGridItem\n\t\t\t\t\t>\n\t\t\t\t\t\t<TreeGridItem>\n\t\t\t\t\t\t\t{ ( { ref, tabIndex, onFocus } ) => (\n\t\t\t\t\t\t\t\t<BlockMoverUpButton\n\t\t\t\t\t\t\t\t\torientation=\"vertical\"\n\t\t\t\t\t\t\t\t\tclientIds={ [ clientId ] }\n\t\t\t\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\t\t\t\ttabIndex={ tabIndex }\n\t\t\t\t\t\t\t\t\tonFocus={ onFocus }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</TreeGridItem>\n\t\t\t\t\t\t<TreeGridItem>\n\t\t\t\t\t\t\t{ ( { ref, tabIndex, onFocus } ) => (\n\t\t\t\t\t\t\t\t<BlockMoverDownButton\n\t\t\t\t\t\t\t\t\torientation=\"vertical\"\n\t\t\t\t\t\t\t\t\tclientIds={ [ clientId ] }\n\t\t\t\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\t\t\t\ttabIndex={ tabIndex }\n\t\t\t\t\t\t\t\t\tonFocus={ onFocus }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</TreeGridItem>\n\t\t\t\t\t</TreeGridCell>\n\t\t\t\t</>\n\t\t\t) }\n\n\t\t\t{ showBlockActions && BlockSettingsMenu && (\n\t\t\t\t<TreeGridCell\n\t\t\t\t\tclassName={ listViewBlockSettingsClassName }\n\t\t\t\t\taria-selected={ !! isSelected }\n\t\t\t\t\tref={ settingsRef }\n\t\t\t\t>\n\t\t\t\t\t{ ( { ref, tabIndex, onFocus } ) => (\n\t\t\t\t\t\t<BlockSettingsMenu\n\t\t\t\t\t\t\tclientIds={ dropdownClientIds }\n\t\t\t\t\t\t\tblock={ block }\n\t\t\t\t\t\t\ticon={ moreVertical }\n\t\t\t\t\t\t\tlabel={ __( 'Options' ) }\n\t\t\t\t\t\t\tpopoverProps={ {\n\t\t\t\t\t\t\t\tanchor: settingsPopoverAnchor, // Used to position the settings at the cursor on right-click.\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\ttoggleProps={ {\n\t\t\t\t\t\t\t\tref,\n\t\t\t\t\t\t\t\tclassName: 'block-editor-list-view-block__menu',\n\t\t\t\t\t\t\t\ttabIndex,\n\t\t\t\t\t\t\t\tonClick: clearSettingsAnchorRect,\n\t\t\t\t\t\t\t\tonFocus,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tdisableOpenOnArrowDown\n\t\t\t\t\t\t\texpand={ expand }\n\t\t\t\t\t\t\texpandedState={ expandedState }\n\t\t\t\t\t\t\tsetInsertedBlock={ setInsertedBlock }\n\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ACxBtF;MACA,CACD;IACD,CACY,CACd;EAAA,CACY,CAAC;AAEjB;AAAC,IAAAuF,QAAA,GAAAC,OAAA,CAAAhC,OAAA,GAEc,IAAAiC,aAAI,EAAEnM,aAAc,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","_element","_data","_appender","_block","_interopRequireDefault","_context","_utils","_store","_useBlockDisplayInformation","_jsxRuntime","countBlocks","block","expandedState","draggedClientIds","isExpandedByDefault","_expandedState$block$","isDragged","includes","clientId","isExpanded","innerBlocks","reduce","countReducer","count","_expandedState$block$2","length","noop","ListViewBranch","props","blocks","selectBlock","showBlockMovers","selectedClientIds","level","path","isBranchSelected","listPosition","fixedListWindow","parentId","shouldShowInnerBlocks","isSyncedBranch","showAppender","showAppenderProp","parentBlockInformation","useBlockDisplayInformation","syncedBranch","isSynced","canParentExpand","useSelect","select","blockEditorStore","canEditBlock","blockDropPosition","blockDropTargetIndex","firstDraggedBlockIndex","blockIndexes","useListViewContext","nextPositionRef","useRef","filteredBlocks","filter","Boolean","blockCount","rowCount","current","jsxs","Fragment","children","map","index","_expandedState$client","displacement","isAfterDraggedBlocks","isNesting","getDragDisplacementValues","itemInView","blockInView","position","updatedPath","hasNestedBlocks","shouldExpand","undefined","isSelected","isClientIdSelected","isSelectedBranch","showBlock","AsyncModeProvider","value","jsx","default","siblingBlockCount","className","__experimentalTreeGridRow","setSize","positionInSet","__experimentalTreeGridCell","treeGridCellProps","Appender","nestingLevel","_default","exports","memo"],"sources":["@wordpress/block-editor/src/components/list-view/branch.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalTreeGridRow as TreeGridRow,\n\t__experimentalTreeGridCell as TreeGridCell,\n} from '@wordpress/components';\nimport { memo, useRef } from '@wordpress/element';\nimport { AsyncModeProvider, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { Appender } from './appender';\nimport ListViewBlock from './block';\nimport { useListViewContext } from './context';\nimport { getDragDisplacementValues, isClientIdSelected } from './utils';\nimport { store as blockEditorStore } from '../../store';\nimport useBlockDisplayInformation from '../use-block-display-information';\n\n/**\n * Given a block, returns the total number of blocks in that subtree. This is used to help determine\n * the list position of a block.\n *\n * When a block is collapsed, we do not count their children as part of that total. In the current drag\n * implementation dragged blocks and their children are not counted.\n *\n * @param {Object} block block tree\n * @param {Object} expandedState state that notes which branches are collapsed\n * @param {Array} draggedClientIds a list of dragged client ids\n * @param {boolean} isExpandedByDefault flag to determine the default fallback expanded state.\n * @return {number} block count\n */\nfunction countBlocks(\n\tblock,\n\texpandedState,\n\tdraggedClientIds,\n\tisExpandedByDefault\n) {\n\tconst isDragged = draggedClientIds?.includes( block.clientId );\n\tif ( isDragged ) {\n\t\treturn 0;\n\t}\n\tconst isExpanded = expandedState[ block.clientId ] ?? isExpandedByDefault;\n\n\tif ( isExpanded ) {\n\t\treturn (\n\t\t\t1 +\n\t\t\tblock.innerBlocks.reduce(\n\t\t\t\tcountReducer(\n\t\t\t\t\texpandedState,\n\t\t\t\t\tdraggedClientIds,\n\t\t\t\t\tisExpandedByDefault\n\t\t\t\t),\n\t\t\t\t0\n\t\t\t)\n\t\t);\n\t}\n\treturn 1;\n}\nconst countReducer =\n\t( expandedState, draggedClientIds, isExpandedByDefault ) =>\n\t( count, block ) => {\n\t\tconst isDragged = draggedClientIds?.includes( block.clientId );\n\t\tif ( isDragged ) {\n\t\t\treturn count;\n\t\t}\n\t\tconst isExpanded =\n\t\t\texpandedState[ block.clientId ] ?? isExpandedByDefault;\n\t\tif ( isExpanded && block.innerBlocks.length > 0 ) {\n\t\t\treturn (\n\t\t\t\tcount +\n\t\t\t\tcountBlocks(\n\t\t\t\t\tblock,\n\t\t\t\t\texpandedState,\n\t\t\t\t\tdraggedClientIds,\n\t\t\t\t\tisExpandedByDefault\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\treturn count + 1;\n\t};\n\nconst noop = () => {};\n\nfunction ListViewBranch( props ) {\n\tconst {\n\t\tblocks,\n\t\tselectBlock = noop,\n\t\tshowBlockMovers,\n\t\tselectedClientIds,\n\t\tlevel = 1,\n\t\tpath = '',\n\t\tisBranchSelected = false,\n\t\tlistPosition = 0,\n\t\tfixedListWindow,\n\t\tisExpanded,\n\t\tparentId,\n\t\tshouldShowInnerBlocks = true,\n\t\tisSyncedBranch = false,\n\t\tshowAppender: showAppenderProp = true,\n\t} = props;\n\n\tconst parentBlockInformation = useBlockDisplayInformation( parentId );\n\tconst syncedBranch = isSyncedBranch || !! parentBlockInformation?.isSynced;\n\n\tconst canParentExpand = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! parentId ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn select( blockEditorStore ).canEditBlock( parentId );\n\t\t},\n\t\t[ parentId ]\n\t);\n\n\tconst {\n\t\tblockDropPosition,\n\t\tblockDropTargetIndex,\n\t\tfirstDraggedBlockIndex,\n\t\tblockIndexes,\n\t\texpandedState,\n\t\tdraggedClientIds,\n\t} = useListViewContext();\n\n\tconst nextPositionRef = useRef();\n\n\tif ( ! canParentExpand ) {\n\t\treturn null;\n\t}\n\n\t// Only show the appender at the first level.\n\tconst showAppender = showAppenderProp && level === 1;\n\tconst filteredBlocks = blocks.filter( Boolean );\n\tconst blockCount = filteredBlocks.length;\n\t// The appender means an extra row in List View, so add 1 to the row count.\n\tconst rowCount = showAppender ? blockCount + 1 : blockCount;\n\tnextPositionRef.current = listPosition;\n\n\treturn (\n\t\t<>\n\t\t\t{ filteredBlocks.map( ( block, index ) => {\n\t\t\t\tconst { clientId, innerBlocks } = block;\n\n\t\t\t\tif ( index > 0 ) {\n\t\t\t\t\tnextPositionRef.current += countBlocks(\n\t\t\t\t\t\tfilteredBlocks[ index - 1 ],\n\t\t\t\t\t\texpandedState,\n\t\t\t\t\t\tdraggedClientIds,\n\t\t\t\t\t\tisExpanded\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst isDragged = !! draggedClientIds?.includes( clientId );\n\n\t\t\t\t// Determine the displacement of the block while dragging. This\n\t\t\t\t// works out whether the current block should be displaced up or\n\t\t\t\t// down, relative to the dragged blocks and the drop target.\n\t\t\t\tconst { displacement, isAfterDraggedBlocks, isNesting } =\n\t\t\t\t\tgetDragDisplacementValues( {\n\t\t\t\t\t\tblockIndexes,\n\t\t\t\t\t\tblockDropTargetIndex,\n\t\t\t\t\t\tblockDropPosition,\n\t\t\t\t\t\tclientId,\n\t\t\t\t\t\tfirstDraggedBlockIndex,\n\t\t\t\t\t\tisDragged,\n\t\t\t\t\t} );\n\n\t\t\t\tconst { itemInView } = fixedListWindow;\n\t\t\t\tconst blockInView = itemInView( nextPositionRef.current );\n\n\t\t\t\tconst position = index + 1;\n\t\t\t\tconst updatedPath =\n\t\t\t\t\tpath.length > 0\n\t\t\t\t\t\t? `${ path }_${ position }`\n\t\t\t\t\t\t: `${ position }`;\n\t\t\t\tconst hasNestedBlocks = !! innerBlocks?.length;\n\n\t\t\t\tconst shouldExpand =\n\t\t\t\t\thasNestedBlocks && shouldShowInnerBlocks\n\t\t\t\t\t\t? expandedState[ clientId ] ?? isExpanded\n\t\t\t\t\t\t: undefined;\n\n\t\t\t\t// Make updates to the selected or dragged blocks synchronous,\n\t\t\t\t// but asynchronous for any other block.\n\t\t\t\tconst isSelected = isClientIdSelected(\n\t\t\t\t\tclientId,\n\t\t\t\t\tselectedClientIds\n\t\t\t\t);\n\t\t\t\tconst isSelectedBranch =\n\t\t\t\t\tisBranchSelected || ( isSelected && hasNestedBlocks );\n\n\t\t\t\t// To avoid performance issues, we only render blocks that are in view,\n\t\t\t\t// or blocks that are selected or dragged. If a block is selected,\n\t\t\t\t// it is only counted if it is the first of the block selection.\n\t\t\t\t// This prevents the entire tree from being rendered when a branch is\n\t\t\t\t// selected, or a user selects all blocks, while still enabling scroll\n\t\t\t\t// into view behavior when selecting a block or opening the list view.\n\t\t\t\t// The first and last blocks of the list are always rendered, to ensure\n\t\t\t\t// that Home and End keys work as expected.\n\t\t\t\tconst showBlock =\n\t\t\t\t\tisDragged ||\n\t\t\t\t\tblockInView ||\n\t\t\t\t\t( isSelected && clientId === selectedClientIds[ 0 ] ) ||\n\t\t\t\t\tindex === 0 ||\n\t\t\t\t\tindex === blockCount - 1;\n\t\t\t\treturn (\n\t\t\t\t\t<AsyncModeProvider key={ clientId } value={ ! isSelected }>\n\t\t\t\t\t\t{ showBlock && (\n\t\t\t\t\t\t\t<ListViewBlock\n\t\t\t\t\t\t\t\tblock={ block }\n\t\t\t\t\t\t\t\tselectBlock={ selectBlock }\n\t\t\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\t\t\tisBranchSelected={ isSelectedBranch }\n\t\t\t\t\t\t\t\tisDragged={ isDragged }\n\t\t\t\t\t\t\t\tlevel={ level }\n\t\t\t\t\t\t\t\tposition={ position }\n\t\t\t\t\t\t\t\trowCount={ rowCount }\n\t\t\t\t\t\t\t\tsiblingBlockCount={ blockCount }\n\t\t\t\t\t\t\t\tshowBlockMovers={ showBlockMovers }\n\t\t\t\t\t\t\t\tpath={ updatedPath }\n\t\t\t\t\t\t\t\tisExpanded={ isDragged ? false : shouldExpand }\n\t\t\t\t\t\t\t\tlistPosition={ nextPositionRef.current }\n\t\t\t\t\t\t\t\tselectedClientIds={ selectedClientIds }\n\t\t\t\t\t\t\t\tisSyncedBranch={ syncedBranch }\n\t\t\t\t\t\t\t\tdisplacement={ displacement }\n\t\t\t\t\t\t\t\tisAfterDraggedBlocks={ isAfterDraggedBlocks }\n\t\t\t\t\t\t\t\tisNesting={ isNesting }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ ! showBlock && (\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td className=\"block-editor-list-view-placeholder\" />\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ hasNestedBlocks && shouldExpand && ! isDragged && (\n\t\t\t\t\t\t\t<ListViewBranch\n\t\t\t\t\t\t\t\tparentId={ clientId }\n\t\t\t\t\t\t\t\tblocks={ innerBlocks }\n\t\t\t\t\t\t\t\tselectBlock={ selectBlock }\n\t\t\t\t\t\t\t\tshowBlockMovers={ showBlockMovers }\n\t\t\t\t\t\t\t\tlevel={ level + 1 }\n\t\t\t\t\t\t\t\tpath={ updatedPath }\n\t\t\t\t\t\t\t\tlistPosition={ nextPositionRef.current + 1 }\n\t\t\t\t\t\t\t\tfixedListWindow={ fixedListWindow }\n\t\t\t\t\t\t\t\tisBranchSelected={ isSelectedBranch }\n\t\t\t\t\t\t\t\tselectedClientIds={ selectedClientIds }\n\t\t\t\t\t\t\t\tisExpanded={ isExpanded }\n\t\t\t\t\t\t\t\tisSyncedBranch={ syncedBranch }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</AsyncModeProvider>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t\t{ showAppender && (\n\t\t\t\t<TreeGridRow\n\t\t\t\t\tlevel={ level }\n\t\t\t\t\tsetSize={ rowCount }\n\t\t\t\t\tpositionInSet={ rowCount }\n\t\t\t\t\tisExpanded\n\t\t\t\t>\n\t\t\t\t\t<TreeGridCell>\n\t\t\t\t\t\t{ ( treeGridCellProps ) => (\n\t\t\t\t\t\t\t<Appender\n\t\t\t\t\t\t\t\tclientId={ parentId }\n\t\t\t\t\t\t\t\tnestingLevel={ level }\n\t\t\t\t\t\t\t\tblockCount={ blockCount }\n\t\t\t\t\t\t\t\t{ ...treeGridCellProps }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</TreeGridCell>\n\t\t\t\t</TreeGridRow>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default memo( ListViewBranch );\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAIA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAKA,IAAAG,SAAA,GA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;UACR/E,QAAQ,EAAGoB,QAAU;UACrB4D,YAAY,EAAGjE,KAAO;UACtB6B,UAAU,EAAGA,UAAY;UAAA,GACpBkC;QAAiB,CACtB;MACD,CACY;IAAC,CACH,CACb;EAAA,CACA,CAAC;AAEL;AAAC,IAAAG,QAAA,GAAAC,OAAA,CAAAX,OAAA,GAEc,IAAAY,aAAI,EAAE1E,cAAe,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_components","require","_element","_data","_appender","_block","_interopRequireDefault","_context","_utils","_store","_useBlockDisplayInformation","_jsxRuntime","countBlocks","block","expandedState","draggedClientIds","isExpandedByDefault","_expandedState$block$","isDragged","includes","clientId","isExpanded","innerBlocks","reduce","countReducer","count","_expandedState$block$2","length","noop","ListViewBranch","props","blocks","selectBlock","showBlockMovers","selectedClientIds","level","path","isBranchSelected","listPosition","fixedListWindow","parentId","shouldShowInnerBlocks","isSyncedBranch","showAppender","showAppenderProp","parentBlockInformation","useBlockDisplayInformation","syncedBranch","isSynced","canParentExpand","useSelect","select","blockEditorStore","canEditBlock","blockDropPosition","blockDropTargetIndex","firstDraggedBlockIndex","blockIndexes","useListViewContext","nextPositionRef","useRef","filteredBlocks","filter","Boolean","blockCount","rowCount","current","jsxs","Fragment","children","map","index","_expandedState$client","displacement","isAfterDraggedBlocks","isNesting","getDragDisplacementValues","itemInView","blockInView","position","updatedPath","hasNestedBlocks","shouldExpand","undefined","isSelected","isClientIdSelected","isSelectedBranch","showBlock","AsyncModeProvider","value","jsx","default","siblingBlockCount","className","__experimentalTreeGridRow","setSize","positionInSet","__experimentalTreeGridCell","treeGridCellProps","Appender","nestingLevel","_default","exports","memo"],"sources":["@wordpress/block-editor/src/components/list-view/branch.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalTreeGridRow as TreeGridRow,\n\t__experimentalTreeGridCell as TreeGridCell,\n} from '@wordpress/components';\nimport { memo, useRef } from '@wordpress/element';\nimport { AsyncModeProvider, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { Appender } from './appender';\nimport ListViewBlock from './block';\nimport { useListViewContext } from './context';\nimport { getDragDisplacementValues, isClientIdSelected } from './utils';\nimport { store as blockEditorStore } from '../../store';\nimport useBlockDisplayInformation from '../use-block-display-information';\n\n/**\n * Given a block, returns the total number of blocks in that subtree. This is used to help determine\n * the list position of a block.\n *\n * When a block is collapsed, we do not count their children as part of that total. In the current drag\n * implementation dragged blocks and their children are not counted.\n *\n * @param {Object} block block tree\n * @param {Object} expandedState state that notes which branches are collapsed\n * @param {Array} draggedClientIds a list of dragged client ids\n * @param {boolean} isExpandedByDefault flag to determine the default fallback expanded state.\n * @return {number} block count\n */\nfunction countBlocks(\n\tblock,\n\texpandedState,\n\tdraggedClientIds,\n\tisExpandedByDefault\n) {\n\tconst isDragged = draggedClientIds?.includes( block.clientId );\n\tif ( isDragged ) {\n\t\treturn 0;\n\t}\n\tconst isExpanded = expandedState[ block.clientId ] ?? isExpandedByDefault;\n\n\tif ( isExpanded ) {\n\t\treturn (\n\t\t\t1 +\n\t\t\tblock.innerBlocks.reduce(\n\t\t\t\tcountReducer(\n\t\t\t\t\texpandedState,\n\t\t\t\t\tdraggedClientIds,\n\t\t\t\t\tisExpandedByDefault\n\t\t\t\t),\n\t\t\t\t0\n\t\t\t)\n\t\t);\n\t}\n\treturn 1;\n}\nconst countReducer =\n\t( expandedState, draggedClientIds, isExpandedByDefault ) =>\n\t( count, block ) => {\n\t\tconst isDragged = draggedClientIds?.includes( block.clientId );\n\t\tif ( isDragged ) {\n\t\t\treturn count;\n\t\t}\n\t\tconst isExpanded =\n\t\t\texpandedState[ block.clientId ] ?? isExpandedByDefault;\n\t\tif ( isExpanded && block.innerBlocks.length > 0 ) {\n\t\t\treturn (\n\t\t\t\tcount +\n\t\t\t\tcountBlocks(\n\t\t\t\t\tblock,\n\t\t\t\t\texpandedState,\n\t\t\t\t\tdraggedClientIds,\n\t\t\t\t\tisExpandedByDefault\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\treturn count + 1;\n\t};\n\nconst noop = () => {};\n\nfunction ListViewBranch( props ) {\n\tconst {\n\t\tblocks,\n\t\tselectBlock = noop,\n\t\tshowBlockMovers,\n\t\tselectedClientIds,\n\t\tlevel = 1,\n\t\tpath = '',\n\t\tisBranchSelected = false,\n\t\tlistPosition = 0,\n\t\tfixedListWindow,\n\t\tisExpanded,\n\t\tparentId,\n\t\tshouldShowInnerBlocks = true,\n\t\tisSyncedBranch = false,\n\t\tshowAppender: showAppenderProp = true,\n\t} = props;\n\n\tconst parentBlockInformation = useBlockDisplayInformation( parentId );\n\tconst syncedBranch = isSyncedBranch || !! parentBlockInformation?.isSynced;\n\n\tconst canParentExpand = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! parentId ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn select( blockEditorStore ).canEditBlock( parentId );\n\t\t},\n\t\t[ parentId ]\n\t);\n\n\tconst {\n\t\tblockDropPosition,\n\t\tblockDropTargetIndex,\n\t\tfirstDraggedBlockIndex,\n\t\tblockIndexes,\n\t\texpandedState,\n\t\tdraggedClientIds,\n\t} = useListViewContext();\n\n\tconst nextPositionRef = useRef();\n\n\tif ( ! canParentExpand ) {\n\t\treturn null;\n\t}\n\n\t// Only show the appender at the first level.\n\tconst showAppender = showAppenderProp && level === 1;\n\tconst filteredBlocks = blocks.filter( Boolean );\n\tconst blockCount = filteredBlocks.length;\n\t// The appender means an extra row in List View, so add 1 to the row count.\n\tconst rowCount = showAppender ? blockCount + 1 : blockCount;\n\tnextPositionRef.current = listPosition;\n\n\treturn (\n\t\t<>\n\t\t\t{ filteredBlocks.map( ( block, index ) => {\n\t\t\t\tconst { clientId, innerBlocks } = block;\n\n\t\t\t\tif ( index > 0 ) {\n\t\t\t\t\tnextPositionRef.current += countBlocks(\n\t\t\t\t\t\tfilteredBlocks[ index - 1 ],\n\t\t\t\t\t\texpandedState,\n\t\t\t\t\t\tdraggedClientIds,\n\t\t\t\t\t\tisExpanded\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst isDragged = !! draggedClientIds?.includes( clientId );\n\n\t\t\t\t// Determine the displacement of the block while dragging. This\n\t\t\t\t// works out whether the current block should be displaced up or\n\t\t\t\t// down, relative to the dragged blocks and the drop target.\n\t\t\t\tconst { displacement, isAfterDraggedBlocks, isNesting } =\n\t\t\t\t\tgetDragDisplacementValues( {\n\t\t\t\t\t\tblockIndexes,\n\t\t\t\t\t\tblockDropTargetIndex,\n\t\t\t\t\t\tblockDropPosition,\n\t\t\t\t\t\tclientId,\n\t\t\t\t\t\tfirstDraggedBlockIndex,\n\t\t\t\t\t\tisDragged,\n\t\t\t\t\t} );\n\n\t\t\t\tconst { itemInView } = fixedListWindow;\n\t\t\t\tconst blockInView = itemInView( nextPositionRef.current );\n\n\t\t\t\tconst position = index + 1;\n\t\t\t\tconst updatedPath =\n\t\t\t\t\tpath.length > 0\n\t\t\t\t\t\t? `${ path }_${ position }`\n\t\t\t\t\t\t: `${ position }`;\n\t\t\t\tconst hasNestedBlocks = !! innerBlocks?.length;\n\n\t\t\t\tconst shouldExpand =\n\t\t\t\t\thasNestedBlocks && shouldShowInnerBlocks\n\t\t\t\t\t\t? expandedState[ clientId ] ?? isExpanded\n\t\t\t\t\t\t: undefined;\n\n\t\t\t\t// Make updates to the selected or dragged blocks synchronous,\n\t\t\t\t// but asynchronous for any other block.\n\t\t\t\tconst isSelected = isClientIdSelected(\n\t\t\t\t\tclientId,\n\t\t\t\t\tselectedClientIds\n\t\t\t\t);\n\t\t\t\tconst isSelectedBranch =\n\t\t\t\t\tisBranchSelected || ( isSelected && hasNestedBlocks );\n\n\t\t\t\t// To avoid performance issues, we only render blocks that are in view,\n\t\t\t\t// or blocks that are selected or dragged. If a block is selected,\n\t\t\t\t// it is only counted if it is the first of the block selection.\n\t\t\t\t// This prevents the entire tree from being rendered when a branch is\n\t\t\t\t// selected, or a user selects all blocks, while still enabling scroll\n\t\t\t\t// into view behavior when selecting a block or opening the list view.\n\t\t\t\t// The first and last blocks of the list are always rendered, to ensure\n\t\t\t\t// that Home and End keys work as expected.\n\t\t\t\tconst showBlock =\n\t\t\t\t\tisDragged ||\n\t\t\t\t\tblockInView ||\n\t\t\t\t\t( isSelected && clientId === selectedClientIds[ 0 ] ) ||\n\t\t\t\t\tindex === 0 ||\n\t\t\t\t\tindex === blockCount - 1;\n\t\t\t\treturn (\n\t\t\t\t\t<AsyncModeProvider key={ clientId } value={ ! isSelected }>\n\t\t\t\t\t\t{ showBlock && (\n\t\t\t\t\t\t\t<ListViewBlock\n\t\t\t\t\t\t\t\tblock={ block }\n\t\t\t\t\t\t\t\tselectBlock={ selectBlock }\n\t\t\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\t\t\tisBranchSelected={ isSelectedBranch }\n\t\t\t\t\t\t\t\tisDragged={ isDragged }\n\t\t\t\t\t\t\t\tlevel={ level }\n\t\t\t\t\t\t\t\tposition={ position }\n\t\t\t\t\t\t\t\trowCount={ rowCount }\n\t\t\t\t\t\t\t\tsiblingBlockCount={ blockCount }\n\t\t\t\t\t\t\t\tshowBlockMovers={ showBlockMovers }\n\t\t\t\t\t\t\t\tpath={ updatedPath }\n\t\t\t\t\t\t\t\tisExpanded={ isDragged ? false : shouldExpand }\n\t\t\t\t\t\t\t\tlistPosition={ nextPositionRef.current }\n\t\t\t\t\t\t\t\tselectedClientIds={ selectedClientIds }\n\t\t\t\t\t\t\t\tisSyncedBranch={ syncedBranch }\n\t\t\t\t\t\t\t\tdisplacement={ displacement }\n\t\t\t\t\t\t\t\tisAfterDraggedBlocks={ isAfterDraggedBlocks }\n\t\t\t\t\t\t\t\tisNesting={ isNesting }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ ! showBlock && (\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td className=\"block-editor-list-view-placeholder\" />\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ hasNestedBlocks && shouldExpand && ! isDragged && (\n\t\t\t\t\t\t\t<ListViewBranch\n\t\t\t\t\t\t\t\tparentId={ clientId }\n\t\t\t\t\t\t\t\tblocks={ innerBlocks }\n\t\t\t\t\t\t\t\tselectBlock={ selectBlock }\n\t\t\t\t\t\t\t\tshowBlockMovers={ showBlockMovers }\n\t\t\t\t\t\t\t\tlevel={ level + 1 }\n\t\t\t\t\t\t\t\tpath={ updatedPath }\n\t\t\t\t\t\t\t\tlistPosition={ nextPositionRef.current + 1 }\n\t\t\t\t\t\t\t\tfixedListWindow={ fixedListWindow }\n\t\t\t\t\t\t\t\tisBranchSelected={ isSelectedBranch }\n\t\t\t\t\t\t\t\tselectedClientIds={ selectedClientIds }\n\t\t\t\t\t\t\t\tisExpanded={ isExpanded }\n\t\t\t\t\t\t\t\tisSyncedBranch={ syncedBranch }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</AsyncModeProvider>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t\t{ showAppender && (\n\t\t\t\t<TreeGridRow\n\t\t\t\t\tlevel={ level }\n\t\t\t\t\tsetSize={ rowCount }\n\t\t\t\t\tpositionInSet={ rowCount }\n\t\t\t\t\tisExpanded\n\t\t\t\t>\n\t\t\t\t\t<TreeGridCell>\n\t\t\t\t\t\t{ ( treeGridCellProps ) => (\n\t\t\t\t\t\t\t<Appender\n\t\t\t\t\t\t\t\tclientId={ parentId }\n\t\t\t\t\t\t\t\tnestingLevel={ level }\n\t\t\t\t\t\t\t\tblockCount={ blockCount }\n\t\t\t\t\t\t\t\t{ ...treeGridCellProps }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</TreeGridCell>\n\t\t\t\t</TreeGridRow>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default memo( ListViewBranch );\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AA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