@wordpress/block-editor 12.22.0 → 12.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/README.md +8 -0
- package/build/autocompleters/block.js.map +1 -1
- package/build/autocompleters/link.js.map +1 -1
- package/build/components/alignment-control/index.js.map +1 -1
- package/build/components/alignment-control/ui.js.map +1 -1
- package/build/components/autocomplete/index.js.map +1 -1
- package/build/components/block-actions/index.js.map +1 -1
- package/build/components/block-alignment-control/constants.js.map +1 -1
- package/build/components/block-alignment-control/index.js.map +1 -1
- package/build/components/block-alignment-control/ui.js.map +1 -1
- package/build/components/block-alignment-control/ui.native.js.map +1 -1
- package/build/components/block-alignment-control/use-available-alignments.js.map +1 -1
- package/build/components/block-alignment-matrix-control/index.js.map +1 -1
- package/build/components/block-bindings-toolbar-indicator/index.js.map +1 -1
- package/build/components/block-breadcrumb/index.js.map +1 -1
- package/build/components/block-canvas/index.js.map +1 -1
- package/build/components/block-caption/index.native.js.map +1 -1
- package/build/components/block-card/index.js.map +1 -1
- package/build/components/block-compare/block-view.js.map +1 -1
- package/build/components/block-compare/index.js.map +1 -1
- package/build/components/block-content-overlay/index.js.map +1 -1
- package/build/components/block-context/index.js.map +1 -1
- package/build/components/block-controls/fill.js.map +1 -1
- package/build/components/block-controls/groups.js.map +1 -1
- package/build/components/block-controls/hook.js.map +1 -1
- package/build/components/block-controls/index.js.map +1 -1
- package/build/components/block-controls/slot.js.map +1 -1
- package/build/components/block-controls/slot.native.js.map +1 -1
- package/build/components/block-controls/use-has-block-controls.js.map +1 -1
- package/build/components/block-draggable/draggable-chip.js.map +1 -1
- package/build/components/block-draggable/draggable-chip.native.js.map +1 -1
- package/build/components/block-draggable/dropping-insertion-point.native.js +1 -1
- package/build/components/block-draggable/dropping-insertion-point.native.js.map +1 -1
- package/build/components/block-draggable/index.js.map +1 -1
- package/build/components/block-draggable/index.native.js +1 -1
- package/build/components/block-draggable/index.native.js.map +1 -1
- package/build/components/block-draggable/use-scroll-when-dragging.js.map +1 -1
- package/build/components/block-draggable/use-scroll-when-dragging.native.js.map +1 -1
- package/build/components/block-edit/context.js +2 -1
- package/build/components/block-edit/context.js.map +1 -1
- package/build/components/block-edit/edit.js.map +1 -1
- package/build/components/block-edit/edit.native.js.map +1 -1
- package/build/components/block-edit/index.js +4 -2
- package/build/components/block-edit/index.js.map +1 -1
- package/build/components/block-edit-visually-button/index.js.map +1 -1
- package/build/components/block-editing-mode/index.js.map +1 -1
- package/build/components/block-full-height-alignment-control/index.js.map +1 -1
- package/build/components/block-heading-level-dropdown/heading-level-icon.js.map +1 -1
- package/build/components/block-heading-level-dropdown/index.js.map +1 -1
- package/build/components/block-heading-level-dropdown/index.native.js.map +1 -1
- package/build/components/block-icon/index.js.map +1 -1
- package/build/components/block-icon/index.native.js.map +1 -1
- package/build/components/block-info-slot-fill/index.js.map +1 -1
- package/build/components/block-inspector/index.js +5 -4
- package/build/components/block-inspector/index.js.map +1 -1
- package/build/components/block-inspector/useBlockInspectorAnimationSettings.js.map +1 -1
- package/build/components/block-list/block-crash-boundary.js.map +1 -1
- package/build/components/block-list/block-crash-boundary.native.js.map +1 -1
- package/build/components/block-list/block-crash-warning.js.map +1 -1
- package/build/components/block-list/block-crash-warning.native.js.map +1 -1
- package/build/components/block-list/block-html.js.map +1 -1
- package/build/components/block-list/block-invalid-warning.js.map +1 -1
- package/build/components/block-list/block-invalid-warning.native.js.map +1 -1
- package/build/components/block-list/block-list-context.native.js.map +1 -1
- package/build/components/block-list/block-list-item-cell.native.js.map +1 -1
- package/build/components/block-list/block-list-item.native.js.map +1 -1
- package/build/components/block-list/block-outline.native.js.map +1 -1
- package/build/components/block-list/block-selection-button.native.js.map +1 -1
- package/build/components/block-list/block.js +55 -29
- package/build/components/block-list/block.js.map +1 -1
- package/build/components/block-list/block.native.js +2 -2
- package/build/components/block-list/block.native.js.map +1 -1
- package/build/components/block-list/grid-item.native.js.map +1 -1
- package/build/components/block-list/index.js +16 -5
- package/build/components/block-list/index.js.map +1 -1
- package/build/components/block-list/index.native.js.map +1 -1
- package/build/components/block-list/insertion-point.native.js.map +1 -1
- package/build/components/block-list/layout.js.map +1 -1
- package/build/components/block-list/private-block-context.js.map +1 -1
- package/build/components/block-list/subdirectory-icon.js.map +1 -1
- package/build/components/block-list/use-block-props/index.js +2 -1
- package/build/components/block-list/use-block-props/index.js.map +1 -1
- package/build/components/block-list/use-block-props/index.native.js.map +1 -1
- package/build/components/block-list/use-block-props/use-block-moving-mode-class-names.js.map +1 -1
- package/build/components/block-list/use-block-props/use-block-refs.js.map +1 -1
- package/build/components/block-list/use-block-props/use-focus-first-element.js +3 -2
- package/build/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
- package/build/components/block-list/use-block-props/use-focus-handler.js.map +1 -1
- package/build/components/block-list/use-block-props/use-intersection-observer.js.map +1 -1
- package/build/components/block-list/use-block-props/use-is-hovered.js.map +1 -1
- package/build/components/block-list/use-block-props/use-nav-mode-exit.js.map +1 -1
- package/build/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +1 -1
- package/build/components/block-list/use-in-between-inserter.js.map +1 -1
- package/build/components/block-list/use-scroll-upon-insertion.native.js.map +1 -1
- package/build/components/block-list-appender/index.js.map +1 -1
- package/build/components/block-list-appender/index.native.js.map +1 -1
- package/build/components/block-lock/index.js.map +1 -1
- package/build/components/block-lock/menu-item.js.map +1 -1
- package/build/components/block-lock/modal.js.map +1 -1
- package/build/components/block-lock/toolbar.js.map +1 -1
- package/build/components/block-lock/use-block-lock.js.map +1 -1
- package/build/components/block-media-update-progress/index.native.js.map +1 -1
- package/build/components/block-mover/button.js +4 -1
- package/build/components/block-mover/button.js.map +1 -1
- package/build/components/block-mover/index.js +5 -1
- package/build/components/block-mover/index.js.map +1 -1
- package/build/components/block-mover/index.native.js.map +1 -1
- package/build/components/block-mover/mover-description.js.map +1 -1
- package/build/components/block-mover/mover-description.native.js.map +1 -1
- package/build/components/block-navigation/dropdown.js.map +1 -1
- package/build/components/block-parent-selector/index.js.map +1 -1
- package/build/components/block-pattern-setup/constants.js.map +1 -1
- package/build/components/block-pattern-setup/index.js.map +1 -1
- package/build/components/block-pattern-setup/setup-toolbar.js.map +1 -1
- package/build/components/block-pattern-setup/use-patterns-setup.js.map +1 -1
- package/build/components/block-patterns-list/index.js +4 -1
- package/build/components/block-patterns-list/index.js.map +1 -1
- package/build/components/block-patterns-paging/index.js +8 -4
- package/build/components/block-patterns-paging/index.js.map +1 -1
- package/build/components/block-popover/cover.js.map +1 -1
- package/build/components/block-popover/drop-zone.js.map +1 -1
- package/build/components/block-popover/inbetween.js.map +1 -1
- package/build/components/block-popover/index.js.map +1 -1
- package/build/components/block-popover/use-popover-scroll.js.map +1 -1
- package/build/components/block-preview/auto.js.map +1 -1
- package/build/components/block-preview/index.js.map +1 -1
- package/build/components/block-quick-navigation/index.js.map +1 -1
- package/build/components/block-removal-warning-modal/index.js.map +1 -1
- package/build/components/block-rename/index.js.map +1 -1
- package/build/components/block-rename/is-empty-string.js.map +1 -1
- package/build/components/block-rename/modal.js +13 -9
- package/build/components/block-rename/modal.js.map +1 -1
- package/build/components/block-rename/rename-control.js +3 -1
- package/build/components/block-rename/rename-control.js.map +1 -1
- package/build/components/block-rename/use-block-rename.js.map +1 -1
- package/build/components/block-selection-clearer/index.js.map +1 -1
- package/build/components/block-settings/button.native.js.map +1 -1
- package/build/components/block-settings/container.native.js.map +1 -1
- package/build/components/block-settings/index.native.js +1 -1
- package/build/components/block-settings/index.native.js.map +1 -1
- package/build/components/block-settings-menu/block-html-convert-button.js.map +1 -1
- package/build/components/block-settings-menu/block-mode-toggle.js.map +1 -1
- package/build/components/block-settings-menu/block-parent-selector-menu-item.js.map +1 -1
- package/build/components/block-settings-menu/block-settings-dropdown.js +7 -3
- package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build/components/block-settings-menu/block-settings-menu-first-item.js.map +1 -1
- package/build/components/block-settings-menu/index.js.map +1 -1
- package/build/components/block-settings-menu-controls/index.js.map +1 -1
- package/build/components/block-styles/index.js.map +1 -1
- package/build/components/block-styles/index.native.js.map +1 -1
- package/build/components/block-styles/menu-items.js.map +1 -1
- package/build/components/block-styles/preview-panel.js.map +1 -1
- package/build/components/block-styles/preview.native.js.map +1 -1
- package/build/components/block-styles/use-styles-for-block.js.map +1 -1
- package/build/components/block-styles/utils.js.map +1 -1
- package/build/components/block-switcher/block-styles-menu.js.map +1 -1
- package/build/components/block-switcher/block-transformations-menu.js.map +1 -1
- package/build/components/block-switcher/block-transformations-menu.native.js.map +1 -1
- package/build/components/block-switcher/block-variation-transformations.js.map +1 -1
- package/build/components/block-switcher/index.js +4 -3
- package/build/components/block-switcher/index.js.map +1 -1
- package/build/components/block-switcher/pattern-transformations-menu.js.map +1 -1
- package/build/components/block-switcher/preview-block-popover.js.map +1 -1
- package/build/components/block-switcher/use-transformed-patterns.js.map +1 -1
- package/build/components/block-switcher/utils.js.map +1 -1
- package/build/components/block-title/index.js.map +1 -1
- package/build/components/block-title/use-block-display-title.js.map +1 -1
- package/build/components/block-toolbar/block-name-context.js.map +1 -1
- package/build/components/block-toolbar/block-toolbar-last-item.js.map +1 -1
- package/build/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
- package/build/components/block-toolbar/index.js +5 -4
- package/build/components/block-toolbar/index.js.map +1 -1
- package/build/components/block-toolbar/index.native.js.map +1 -1
- package/build/components/block-toolbar/shuffle.js +18 -9
- package/build/components/block-toolbar/shuffle.js.map +1 -1
- package/build/components/block-toolbar/use-has-block-toolbar.js +6 -3
- package/build/components/block-toolbar/use-has-block-toolbar.js.map +1 -1
- package/build/components/block-toolbar/utils.js.map +1 -1
- package/build/components/block-tools/block-selection-button.js +56 -12
- package/build/components/block-tools/block-selection-button.js.map +1 -1
- package/build/components/block-tools/block-toolbar-breadcrumb.js.map +1 -1
- package/build/components/block-tools/block-toolbar-popover.js.map +1 -1
- package/build/components/block-tools/empty-block-inserter.js.map +1 -1
- package/build/components/block-tools/index.js +15 -3
- package/build/components/block-tools/index.js.map +1 -1
- package/build/components/block-tools/insertion-point.js.map +1 -1
- package/build/components/block-tools/use-block-toolbar-popover-props.js.map +1 -1
- package/build/components/block-tools/use-selected-block-tool-props.js.map +1 -1
- package/build/components/block-tools/use-show-block-tools.js +7 -13
- package/build/components/block-tools/use-show-block-tools.js.map +1 -1
- package/build/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
- package/build/components/block-types-list/index.js.map +1 -1
- package/build/components/block-types-list/index.native.js.map +1 -1
- package/build/components/block-variation-picker/index.js.map +1 -1
- package/build/components/block-variation-picker/index.native.js.map +1 -1
- package/build/components/block-variation-transforms/index.js +4 -1
- package/build/components/block-variation-transforms/index.js.map +1 -1
- package/build/components/block-vertical-alignment-control/icons.js.map +1 -1
- package/build/components/block-vertical-alignment-control/index.js.map +1 -1
- package/build/components/block-vertical-alignment-control/ui.js.map +1 -1
- package/build/components/border-radius-control/all-input-control.js.map +1 -1
- package/build/components/border-radius-control/index.js.map +1 -1
- package/build/components/border-radius-control/input-controls.js.map +1 -1
- package/build/components/border-radius-control/linked-button.js.map +1 -1
- package/build/components/border-radius-control/utils.js.map +1 -1
- package/build/components/button-block-appender/index.js.map +1 -1
- package/build/components/button-block-appender/index.native.js +11 -1
- package/build/components/button-block-appender/index.native.js.map +1 -1
- package/build/components/caption/index.native.js.map +1 -1
- package/build/components/child-layout-control/index.js.map +1 -1
- package/build/components/color-palette/control.js.map +1 -1
- package/build/components/color-palette/index.js.map +1 -1
- package/build/components/color-palette/with-color-context.js.map +1 -1
- package/build/components/color-style-selector/index.js.map +1 -1
- package/build/components/colors/index.js +1 -1
- package/build/components/colors/index.js.map +1 -1
- package/build/components/colors/utils.js.map +1 -1
- package/build/components/colors/with-colors.js.map +1 -1
- package/build/components/colors-gradients/control.js.map +1 -1
- package/build/components/colors-gradients/dropdown.js.map +1 -1
- package/build/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
- package/build/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
- package/build/components/colors-gradients/use-multiple-origin-colors-and-gradients.js.map +1 -1
- package/build/components/contrast-checker/index.js.map +1 -1
- package/build/components/contrast-checker/index.native.js.map +1 -1
- package/build/components/convert-to-group-buttons/index.js.map +1 -1
- package/build/components/convert-to-group-buttons/index.native.js.map +1 -1
- package/build/components/convert-to-group-buttons/toolbar.js.map +1 -1
- package/build/components/convert-to-group-buttons/use-convert-to-group-button-props.js.map +1 -1
- package/build/components/copy-handler/index.js.map +1 -1
- package/build/components/date-format-picker/index.js.map +1 -1
- package/build/components/default-block-appender/index.js.map +1 -1
- package/build/components/default-block-appender/index.native.js.map +1 -1
- package/build/components/dimensions-tool/aspect-ratio-tool.js.map +1 -1
- package/build/components/dimensions-tool/index.js.map +1 -1
- package/build/components/dimensions-tool/scale-tool.js.map +1 -1
- package/build/components/dimensions-tool/width-height-tool.js +6 -2
- package/build/components/dimensions-tool/width-height-tool.js.map +1 -1
- package/build/components/duotone/utils.js.map +1 -1
- package/build/components/duotone-control/index.js.map +1 -1
- package/build/components/editable-text/index.js.map +1 -1
- package/build/components/editor-styles/index.js +2 -1
- package/build/components/editor-styles/index.js.map +1 -1
- package/build/components/floating-toolbar/index.native.js.map +1 -1
- package/build/components/floating-toolbar/nav-up-icon.js.map +1 -1
- package/build/components/font-appearance-control/index.js.map +1 -1
- package/build/components/font-family/index.js.map +1 -1
- package/build/components/font-sizes/fluid-utils.js.map +1 -1
- package/build/components/font-sizes/font-size-picker.js.map +1 -1
- package/build/components/font-sizes/index.js.map +1 -1
- package/build/components/font-sizes/index.native.js.map +1 -1
- package/build/components/font-sizes/utils.js.map +1 -1
- package/build/components/font-sizes/with-font-sizes.js.map +1 -1
- package/build/components/global-styles/advanced-panel.js +9 -2
- package/build/components/global-styles/advanced-panel.js.map +1 -1
- package/build/components/global-styles/background-panel.js +447 -0
- package/build/components/global-styles/background-panel.js.map +1 -0
- package/build/components/global-styles/border-panel.js.map +1 -1
- package/build/components/global-styles/color-panel.js +2 -1
- package/build/components/global-styles/color-panel.js.map +1 -1
- package/build/components/global-styles/color-panel.native.js.map +1 -1
- package/build/components/global-styles/context.js.map +1 -1
- package/build/components/global-styles/dimensions-panel.js.map +1 -1
- package/build/components/global-styles/filters-panel.js.map +1 -1
- package/build/components/global-styles/get-block-css-selector.js.map +1 -1
- package/build/components/global-styles/get-global-styles-changes.js +3 -0
- package/build/components/global-styles/get-global-styles-changes.js.map +1 -1
- package/build/components/global-styles/hooks.js +1 -1
- package/build/components/global-styles/hooks.js.map +1 -1
- package/build/components/global-styles/image-settings-panel.js.map +1 -1
- package/build/components/global-styles/index.js +14 -1
- package/build/components/global-styles/index.js.map +1 -1
- package/build/components/global-styles/shadow-panel-components.js.map +1 -1
- package/build/components/global-styles/typography-panel.js.map +1 -1
- package/build/components/global-styles/typography-utils.js.map +1 -1
- package/build/components/global-styles/use-global-styles-output.js +19 -18
- package/build/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build/components/global-styles/utils.js +2 -1
- package/build/components/global-styles/utils.js.map +1 -1
- package/build/components/gradients/index.js.map +1 -1
- package/build/components/gradients/index.native.js.map +1 -1
- package/build/components/gradients/use-gradient.js.map +1 -1
- package/build/components/gradients/with-gradient.js.map +1 -1
- package/build/components/grid-visualizer/grid-item-resizer.js.map +1 -1
- package/build/components/grid-visualizer/grid-visualizer.js.map +1 -1
- package/build/components/grid-visualizer/index.js.map +1 -1
- package/build/components/grid-visualizer/utils.js.map +1 -1
- package/build/components/height-control/index.js.map +1 -1
- package/build/components/iframe/get-compatibility-styles.js.map +1 -1
- package/build/components/iframe/index.js +14 -10
- package/build/components/iframe/index.js.map +1 -1
- package/build/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
- package/build/components/image-editor/constants.js.map +1 -1
- package/build/components/image-editor/context.js.map +1 -1
- package/build/components/image-editor/cropper.js +6 -2
- package/build/components/image-editor/cropper.js.map +1 -1
- package/build/components/image-editor/form-controls.js.map +1 -1
- package/build/components/image-editor/index.js +0 -2
- package/build/components/image-editor/index.js.map +1 -1
- package/build/components/image-editor/rotation-button.js.map +1 -1
- package/build/components/image-editor/use-save-image.js.map +1 -1
- package/build/components/image-editor/use-transform-image.js.map +1 -1
- package/build/components/image-editor/zoom-dropdown.js.map +1 -1
- package/build/components/image-link-destinations/index.native.js.map +1 -1
- package/build/components/image-size-control/index.js.map +1 -1
- package/build/components/image-size-control/use-dimension-handler.js.map +1 -1
- package/build/components/index.js +1 -1
- package/build/components/index.js.map +1 -1
- package/build/components/index.native.js +1 -1
- package/build/components/index.native.js.map +1 -1
- package/build/components/inner-blocks/button-block-appender.js.map +1 -1
- package/build/components/inner-blocks/constants.native.js.map +1 -1
- package/build/components/inner-blocks/default-block-appender.js.map +1 -1
- package/build/components/inner-blocks/index.js.map +1 -1
- package/build/components/inner-blocks/index.native.js.map +1 -1
- package/build/components/inner-blocks/use-block-context.js.map +1 -1
- package/build/components/inner-blocks/use-inner-block-template-sync.js.map +1 -1
- package/build/components/inner-blocks/use-nested-settings-update.js.map +1 -1
- package/build/components/inner-blocks/warning-max-depth-exceeded.native.js.map +1 -1
- package/build/components/inner-blocks/with-client-id.js.map +1 -1
- package/build/components/inserter/block-patterns-explorer/index.js.map +1 -1
- package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js.map +1 -1
- package/build/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/index.js +31 -18
- package/build/components/inserter/block-patterns-tab/index.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +2 -19
- package/build/components/inserter/block-patterns-tab/pattern-category-preview-panel.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/pattern-category-previews.js +1 -3
- package/build/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/use-pattern-categories.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/utils.js.map +1 -1
- package/build/components/inserter/block-types-tab.js.map +1 -1
- package/build/components/inserter/block-types-tab.native.js.map +1 -1
- package/build/components/inserter/hooks/use-block-type-impressions.native.js.map +1 -1
- package/build/components/inserter/hooks/use-block-types-state.js.map +1 -1
- package/build/components/inserter/hooks/use-clipboard-block.native.js.map +1 -1
- package/build/components/inserter/hooks/use-insertion-point.js.map +1 -1
- package/build/components/inserter/hooks/use-patterns-paging.js.map +1 -1
- package/build/components/inserter/hooks/use-patterns-state.js.map +1 -1
- package/build/components/inserter/index.js.map +1 -1
- package/build/components/inserter/index.native.js.map +1 -1
- package/build/components/inserter/library.js +2 -0
- package/build/components/inserter/library.js.map +1 -1
- package/build/components/inserter/media-tab/hooks.js.map +1 -1
- package/build/components/inserter/media-tab/index.js.map +1 -1
- package/build/components/inserter/media-tab/media-list.js.map +1 -1
- package/build/components/inserter/media-tab/media-panel.js.map +1 -1
- package/build/components/inserter/media-tab/media-preview.js.map +1 -1
- package/build/components/inserter/media-tab/media-tab.js.map +1 -1
- package/build/components/inserter/media-tab/utils.js.map +1 -1
- package/build/components/inserter/menu.js +25 -13
- package/build/components/inserter/menu.js.map +1 -1
- package/build/components/inserter/menu.native.js.map +1 -1
- package/build/components/inserter/mobile-tab-navigation.js.map +1 -1
- package/build/components/inserter/no-results.js.map +1 -1
- package/build/components/inserter/no-results.native.js.map +1 -1
- package/build/components/inserter/panel.js.map +1 -1
- package/build/components/inserter/preview-panel.js.map +1 -1
- package/build/components/inserter/quick-inserter.js.map +1 -1
- package/build/components/inserter/reusable-block-rename-hint.js.map +1 -1
- package/build/components/inserter/reusable-blocks-tab.native.js.map +1 -1
- package/build/components/inserter/search-items.js +36 -15
- package/build/components/inserter/search-items.js.map +1 -1
- package/build/components/inserter/search-results.js.map +1 -1
- package/build/components/inserter/search-results.native.js.map +1 -1
- package/build/components/inserter/tabs.js +7 -3
- package/build/components/inserter/tabs.js.map +1 -1
- package/build/components/inserter/tabs.native.js.map +1 -1
- package/build/components/inserter/tips.js.map +1 -1
- package/build/components/inserter/utils.native.js.map +1 -1
- package/build/components/inserter-button/index.native.js.map +1 -1
- package/build/components/inserter-button/sparkles.js.map +1 -1
- package/build/components/inserter-draggable-blocks/index.js.map +1 -1
- package/build/components/inserter-list-item/index.js.map +1 -1
- package/build/components/inserter-listbox/context.js.map +1 -1
- package/build/components/inserter-listbox/group.js.map +1 -1
- package/build/components/inserter-listbox/index.js.map +1 -1
- package/build/components/inserter-listbox/item.js.map +1 -1
- package/build/components/inserter-listbox/row.js.map +1 -1
- package/build/components/inserter-menu-extension/index.js.map +1 -1
- package/build/components/inspector-controls/block-support-slot-container.js.map +1 -1
- package/build/components/inspector-controls/block-support-tools-panel.js.map +1 -1
- package/build/components/inspector-controls/fill.js.map +1 -1
- package/build/components/inspector-controls/fill.native.js.map +1 -1
- package/build/components/inspector-controls/groups.js.map +1 -1
- package/build/components/inspector-controls/index.js.map +1 -1
- package/build/components/inspector-controls/slot.js.map +1 -1
- package/build/components/inspector-controls/slot.native.js.map +1 -1
- package/build/components/inspector-controls-tabs/advanced-controls-panel.js +1 -1
- package/build/components/inspector-controls-tabs/advanced-controls-panel.js.map +1 -1
- package/build/components/inspector-controls-tabs/advanced-controls-panel.native.js.map +1 -1
- package/build/components/inspector-controls-tabs/index.js.map +1 -1
- package/build/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
- package/build/components/inspector-controls-tabs/settings-tab-hint.js.map +1 -1
- package/build/components/inspector-controls-tabs/settings-tab.js.map +1 -1
- package/build/components/inspector-controls-tabs/styles-tab.js +1 -1
- package/build/components/inspector-controls-tabs/styles-tab.js.map +1 -1
- package/build/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +1 -1
- package/build/components/inspector-controls-tabs/use-is-list-view-tab-disabled.js.map +1 -1
- package/build/components/inspector-controls-tabs/utils.js.map +1 -1
- package/build/components/inspector-popover-header/index.js.map +1 -1
- package/build/components/justify-content-control/index.js.map +1 -1
- package/build/components/justify-content-control/ui.js.map +1 -1
- package/build/components/keyboard-shortcuts/index.js +11 -0
- package/build/components/keyboard-shortcuts/index.js.map +1 -1
- package/build/components/letter-spacing-control/index.js.map +1 -1
- package/build/components/line-height-control/index.js.map +1 -1
- package/build/components/line-height-control/index.native.js.map +1 -1
- package/build/components/line-height-control/utils.js.map +1 -1
- package/build/components/link-control/constants.js.map +1 -1
- package/build/components/link-control/index.js.map +1 -1
- package/build/components/link-control/is-url-like.js.map +1 -1
- package/build/components/link-control/link-preview.js.map +1 -1
- package/build/components/link-control/search-create-button.js.map +1 -1
- package/build/components/link-control/search-input.js.map +1 -1
- package/build/components/link-control/search-item.js.map +1 -1
- package/build/components/link-control/search-results.js.map +1 -1
- package/build/components/link-control/settings-drawer.js.map +1 -1
- package/build/components/link-control/settings.js.map +1 -1
- package/build/components/link-control/use-create-page.js.map +1 -1
- package/build/components/link-control/use-internal-value.js.map +1 -1
- package/build/components/link-control/use-rich-url-data.js.map +1 -1
- package/build/components/link-control/use-search-handler.js.map +1 -1
- package/build/components/link-control/viewer-slot.js.map +1 -1
- package/build/components/list-view/appender.js.map +1 -1
- package/build/components/list-view/aria-referenced-text.js.map +1 -1
- package/build/components/list-view/block-contents.js.map +1 -1
- package/build/components/list-view/block-select-button.js +45 -1
- package/build/components/list-view/block-select-button.js.map +1 -1
- package/build/components/list-view/block.js +1 -1
- package/build/components/list-view/block.js.map +1 -1
- package/build/components/list-view/branch.js.map +1 -1
- package/build/components/list-view/context.js.map +1 -1
- package/build/components/list-view/drop-indicator.js.map +1 -1
- package/build/components/list-view/expander.js.map +1 -1
- package/build/components/list-view/index.js +17 -2
- package/build/components/list-view/index.js.map +1 -1
- package/build/components/list-view/leaf.js.map +1 -1
- package/build/components/list-view/use-block-selection.js.map +1 -1
- package/build/components/list-view/use-clipboard-handler.js.map +1 -1
- package/build/components/list-view/use-list-view-block-indexes.js.map +1 -1
- package/build/components/list-view/use-list-view-client-ids.js.map +1 -1
- package/build/components/list-view/use-list-view-collapse-items.js +47 -0
- package/build/components/list-view/use-list-view-collapse-items.js.map +1 -0
- package/build/components/list-view/use-list-view-drop-zone.js +5 -0
- package/build/components/list-view/use-list-view-drop-zone.js.map +1 -1
- package/build/components/list-view/use-list-view-expand-selected-item.js.map +1 -1
- package/build/components/list-view/use-list-view-images.js.map +1 -1
- package/build/components/list-view/use-list-view-scroll-into-view.js.map +1 -1
- package/build/components/list-view/utils.js.map +1 -1
- package/build/components/media-placeholder/index.js.map +1 -1
- package/build/components/media-placeholder/index.native.js.map +1 -1
- package/build/components/media-replace-flow/index.js.map +1 -1
- package/build/components/media-replace-flow/index.native.js.map +1 -1
- package/build/components/media-upload/check.js.map +1 -1
- package/build/components/media-upload/constants.native.js.map +1 -1
- package/build/components/media-upload/index.js.map +1 -1
- package/build/components/media-upload/index.native.js.map +1 -1
- package/build/components/media-upload-progress/constants.js.map +1 -1
- package/build/components/media-upload-progress/index.native.js.map +1 -1
- package/build/components/multi-selection-inspector/index.js.map +1 -1
- package/build/components/navigable-toolbar/index.js.map +1 -1
- package/build/components/observe-typing/index.js.map +1 -1
- package/build/components/panel-color-settings/index.js.map +1 -1
- package/build/components/plain-text/index.js.map +1 -1
- package/build/components/plain-text/index.native.js.map +1 -1
- package/build/components/preview-options/index.js.map +1 -1
- package/build/components/provider/block-refs-provider.js.map +1 -1
- package/build/components/provider/index.js.map +1 -1
- package/build/components/provider/index.native.js.map +1 -1
- package/build/components/provider/use-block-sync.js.map +1 -1
- package/build/components/provider/with-registry-provider.js.map +1 -1
- package/build/components/publish-date-time-picker/index.js.map +1 -1
- package/build/components/recursion-provider/index.js +2 -2
- package/build/components/recursion-provider/index.js.map +1 -1
- package/build/components/resizable-box-popover/index.js.map +1 -1
- package/build/components/resolution-tool/index.js.map +1 -1
- package/build/components/responsive-block-control/index.js.map +1 -1
- package/build/components/responsive-block-control/label.js.map +1 -1
- package/build/components/rich-text/content.js +26 -19
- package/build/components/rich-text/content.js.map +1 -1
- package/build/components/rich-text/embed-handler-picker.native.js.map +1 -1
- package/build/components/rich-text/file-paste-handler.native.js.map +1 -1
- package/build/components/rich-text/format-edit.js.map +1 -1
- package/build/components/rich-text/format-toolbar/index.js.map +1 -1
- package/build/components/rich-text/format-toolbar/index.native.js.map +1 -1
- package/build/components/rich-text/format-toolbar-container.js.map +1 -1
- package/build/components/rich-text/format-toolbar-container.native.js.map +1 -1
- package/build/components/rich-text/get-rich-text-values.js.map +1 -1
- package/build/components/rich-text/index.js +54 -11
- package/build/components/rich-text/index.js.map +1 -1
- package/build/components/rich-text/index.native.js +20 -12
- package/build/components/rich-text/index.native.js.map +1 -1
- package/build/components/rich-text/input-event.js.map +1 -1
- package/build/components/rich-text/input-event.native.js.map +1 -1
- package/build/components/rich-text/multiline.js.map +1 -1
- package/build/components/rich-text/native/format-edit.js.map +1 -1
- package/build/components/rich-text/native/get-format-colors.native.js +1 -1
- package/build/components/rich-text/native/get-format-colors.native.js.map +1 -1
- package/build/components/rich-text/native/index.js.map +1 -1
- package/build/components/rich-text/native/index.native.js +2 -2
- package/build/components/rich-text/native/index.native.js.map +1 -1
- package/build/components/rich-text/native/toolbar-button-with-options.native.js.map +1 -1
- package/build/components/rich-text/native/use-format-types.js.map +1 -1
- package/build/components/rich-text/prevent-event-discovery.js.map +1 -1
- package/build/components/rich-text/remove-browser-shortcuts.native.js.map +1 -1
- package/build/components/rich-text/shortcut.js.map +1 -1
- package/build/components/rich-text/shortcut.native.js.map +1 -1
- package/build/components/rich-text/split-value.js.map +1 -1
- package/build/components/rich-text/toolbar-button.js.map +1 -1
- package/build/components/rich-text/use-before-input-rules.js.map +1 -1
- package/build/components/rich-text/use-delete.js.map +1 -1
- package/build/components/rich-text/use-enter.js.map +1 -1
- package/build/components/rich-text/use-firefox-compat.js.map +1 -1
- package/build/components/rich-text/use-format-types.js.map +1 -1
- package/build/components/rich-text/use-input-events.js.map +1 -1
- package/build/components/rich-text/use-input-rules.js.map +1 -1
- package/build/components/rich-text/use-insert-replacement-text.js.map +1 -1
- package/build/components/rich-text/use-mark-persistent.js.map +1 -1
- package/build/components/rich-text/use-paste-handler.js.map +1 -1
- package/build/components/rich-text/use-remove-browser-shortcuts.js.map +1 -1
- package/build/components/rich-text/use-shortcuts.js.map +1 -1
- package/build/components/rich-text/use-undo-automatic-change.js +1 -1
- package/build/components/rich-text/use-undo-automatic-change.js.map +1 -1
- package/build/components/rich-text/utils.js.map +1 -1
- package/build/components/rich-text/with-deprecations.js +0 -3
- package/build/components/rich-text/with-deprecations.js.map +1 -1
- package/build/components/selection-scroll-into-view/index.js.map +1 -1
- package/build/components/skip-to-selected-block/index.js.map +1 -1
- package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
- package/build/components/spacing-sizes-control/index.js.map +1 -1
- package/build/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
- package/build/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
- package/build/components/spacing-sizes-control/input-controls/single.js.map +1 -1
- package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
- package/build/components/spacing-sizes-control/sides-dropdown/index.js.map +1 -1
- package/build/components/spacing-sizes-control/utils.js.map +1 -1
- package/build/components/text-decoration-control/index.js.map +1 -1
- package/build/components/text-transform-control/index.js.map +1 -1
- package/build/components/tool-selector/index.js.map +1 -1
- package/build/components/typewriter/index.js.map +1 -1
- package/build/components/ungroup-button/index.native.js.map +1 -1
- package/build/components/unit-control/index.js.map +1 -1
- package/build/components/unsupported-block-details/index.native.js.map +1 -1
- package/build/components/url-input/button.js.map +1 -1
- package/build/components/url-input/index.js.map +1 -1
- package/build/components/url-input/index.native.js.map +1 -1
- package/build/components/url-popover/image-url-input-ui.js +50 -36
- package/build/components/url-popover/image-url-input-ui.js.map +1 -1
- package/build/components/url-popover/index.js.map +1 -1
- package/build/components/url-popover/link-editor.js.map +1 -1
- package/build/components/url-popover/link-viewer-url.js.map +1 -1
- package/build/components/url-popover/link-viewer.js.map +1 -1
- package/build/components/use-block-commands/index.js +20 -2
- package/build/components/use-block-commands/index.js.map +1 -1
- package/build/components/use-block-display-information/index.js +4 -6
- package/build/components/use-block-display-information/index.js.map +1 -1
- package/build/components/use-block-drop-zone/index.js.map +1 -1
- package/build/components/use-block-drop-zone/index.native.js.map +1 -1
- package/build/components/use-flash-editable-blocks/index.js.map +1 -1
- package/build/components/use-moving-animation/index.js.map +1 -1
- package/build/components/use-on-block-drop/index.js.map +1 -1
- package/build/components/use-on-block-drop/index.native.js.map +1 -1
- package/build/components/use-on-block-drop/types.js.map +1 -1
- package/build/components/use-paste-styles/index.js +1 -0
- package/build/components/use-paste-styles/index.js.map +1 -1
- package/build/components/use-resize-canvas/index.js.map +1 -1
- package/build/components/use-settings/index.js.map +1 -1
- package/build/components/use-unsupported-block-editor/index.native.js.map +1 -1
- package/build/components/video-player/gridicon-play.native.js.map +1 -1
- package/build/components/video-player/index.native.js.map +1 -1
- package/build/components/warning/index.js.map +1 -1
- package/build/components/warning/index.native.js.map +1 -1
- package/build/components/writing-flow/index.js.map +1 -1
- package/build/components/writing-flow/use-arrow-nav.js.map +1 -1
- package/build/components/writing-flow/use-click-selection.js.map +1 -1
- package/build/components/writing-flow/use-clipboard-handler.js.map +1 -1
- package/build/components/writing-flow/use-drag-selection.js.map +1 -1
- package/build/components/writing-flow/use-input.js.map +1 -1
- package/build/components/writing-flow/use-multi-selection.js.map +1 -1
- package/build/components/writing-flow/use-select-all.js.map +1 -1
- package/build/components/writing-flow/use-selection-observer.js.map +1 -1
- package/build/components/writing-flow/use-tab-nav.js.map +1 -1
- package/build/components/writing-flow/utils.js.map +1 -1
- package/build/components/writing-mode-control/index.js.map +1 -1
- package/build/elements/index.js.map +1 -1
- package/build/hooks/align.js.map +1 -1
- package/build/hooks/align.native.js +1 -1
- package/build/hooks/align.native.js.map +1 -1
- package/build/hooks/anchor.js +2 -2
- package/build/hooks/anchor.js.map +1 -1
- package/build/hooks/aria-label.js.map +1 -1
- package/build/hooks/background.js +70 -424
- package/build/hooks/background.js.map +1 -1
- package/build/hooks/block-hooks.js.map +1 -1
- package/build/hooks/block-renaming.js +0 -37
- package/build/hooks/block-renaming.js.map +1 -1
- package/build/hooks/border.js.map +1 -1
- package/build/hooks/color.js +1 -1
- package/build/hooks/color.js.map +1 -1
- package/build/hooks/compat.js.map +1 -1
- package/build/hooks/content-lock-ui.js +5 -5
- package/build/hooks/content-lock-ui.js.map +1 -1
- package/build/hooks/contrast-checker.js.map +1 -1
- package/build/hooks/custom-class-name.js.map +1 -1
- package/build/hooks/custom-class-name.native.js.map +1 -1
- package/build/hooks/dimensions.js.map +1 -1
- package/build/hooks/duotone.js.map +1 -1
- package/build/hooks/font-family.js.map +1 -1
- package/build/hooks/font-size.js.map +1 -1
- package/build/hooks/gap.js.map +1 -1
- package/build/hooks/generated-class-name.js.map +1 -1
- package/build/hooks/index.js +13 -5
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/index.native.js.map +1 -1
- package/build/hooks/layout-child.js.map +1 -1
- package/build/hooks/layout.js +38 -19
- package/build/hooks/layout.js.map +1 -1
- package/build/hooks/layout.native.js.map +1 -1
- package/build/hooks/line-height.js.map +1 -1
- package/build/hooks/lock.js.map +1 -1
- package/build/hooks/metadata.js.map +1 -1
- package/build/hooks/position.js.map +1 -1
- package/build/hooks/settings.js.map +1 -1
- package/build/hooks/spacing-visualizer.js.map +1 -1
- package/build/hooks/style.js.map +1 -1
- package/build/hooks/supports.js +27 -4
- package/build/hooks/supports.js.map +1 -1
- package/build/hooks/text-align.js +156 -0
- package/build/hooks/text-align.js.map +1 -0
- package/build/hooks/typography.js +3 -2
- package/build/hooks/typography.js.map +1 -1
- package/build/hooks/typography.native.js.map +1 -1
- package/build/hooks/use-bindings-attributes.js +66 -129
- package/build/hooks/use-bindings-attributes.js.map +1 -1
- package/build/hooks/use-border-props.js.map +1 -1
- package/build/hooks/use-cached-truthy.js.map +1 -1
- package/build/hooks/use-color-props.js.map +1 -1
- package/build/hooks/use-editor-wrapper-styles.native.js.map +1 -1
- package/build/hooks/use-shadow-props.js.map +1 -1
- package/build/hooks/use-spacing-props.js.map +1 -1
- package/build/hooks/use-typography-props.js +2 -1
- package/build/hooks/use-typography-props.js.map +1 -1
- package/build/hooks/use-zoom-out.js +54 -0
- package/build/hooks/use-zoom-out.js.map +1 -0
- package/build/hooks/utils.js +29 -5
- package/build/hooks/utils.js.map +1 -1
- package/build/index.js +7 -0
- package/build/index.js.map +1 -1
- package/build/index.native.js.map +1 -1
- package/build/layouts/constrained.js.map +1 -1
- package/build/layouts/definitions.js +8 -6
- package/build/layouts/definitions.js.map +1 -1
- package/build/layouts/flex.js.map +1 -1
- package/build/layouts/flow.js.map +1 -1
- package/build/layouts/grid.js +52 -9
- package/build/layouts/grid.js.map +1 -1
- package/build/layouts/index.js.map +1 -1
- package/build/layouts/utils.js.map +1 -1
- package/build/lock-unlock.js.map +1 -1
- package/build/private-apis.js +7 -2
- package/build/private-apis.js.map +1 -1
- package/build/private-apis.native.js +4 -2
- package/build/private-apis.native.js.map +1 -1
- package/build/store/actions.js +18 -4
- package/build/store/actions.js.map +1 -1
- package/build/store/array.js.map +1 -1
- package/build/store/constants.js.map +1 -1
- package/build/store/defaults.js.map +1 -1
- package/build/store/defaults.native.js.map +1 -1
- package/build/store/get-block-settings.js.map +1 -1
- package/build/store/index.js +1 -1
- package/build/store/index.js.map +1 -1
- package/build/store/private-actions.js +18 -2
- package/build/store/private-actions.js.map +1 -1
- package/build/store/private-keys.js +2 -1
- package/build/store/private-keys.js.map +1 -1
- package/build/store/private-selectors.js +113 -36
- package/build/store/private-selectors.js.map +1 -1
- package/build/store/reducer.js +22 -0
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +152 -109
- package/build/store/selectors.js.map +1 -1
- package/build/store/undo-ignore.js.map +1 -1
- package/build/store/utils.js +7 -1
- package/build/store/utils.js.map +1 -1
- package/build/utils/dom.js.map +1 -1
- package/build/utils/get-px-from-css-unit.js.map +1 -1
- package/build/utils/index.js.map +1 -1
- package/build/utils/math.js.map +1 -1
- package/build/utils/object.js.map +1 -1
- package/build/utils/order-inserter-block-items.js.map +1 -1
- package/build/utils/pasting.js.map +1 -1
- package/build/utils/selection.js.map +1 -1
- package/build/utils/sorting.js.map +1 -1
- package/build/utils/transform-styles/index.js +3 -2
- package/build/utils/transform-styles/index.js.map +1 -1
- package/build/utils/use-notify-copy.js.map +1 -1
- package/build-module/autocompleters/block.js.map +1 -1
- package/build-module/autocompleters/link.js.map +1 -1
- package/build-module/components/alignment-control/index.js.map +1 -1
- package/build-module/components/alignment-control/ui.js.map +1 -1
- package/build-module/components/autocomplete/index.js.map +1 -1
- package/build-module/components/block-actions/index.js.map +1 -1
- package/build-module/components/block-alignment-control/constants.js.map +1 -1
- package/build-module/components/block-alignment-control/index.js.map +1 -1
- package/build-module/components/block-alignment-control/ui.js.map +1 -1
- package/build-module/components/block-alignment-control/ui.native.js.map +1 -1
- package/build-module/components/block-alignment-control/use-available-alignments.js.map +1 -1
- package/build-module/components/block-alignment-matrix-control/index.js.map +1 -1
- package/build-module/components/block-bindings-toolbar-indicator/index.js.map +1 -1
- package/build-module/components/block-breadcrumb/index.js.map +1 -1
- package/build-module/components/block-canvas/index.js.map +1 -1
- package/build-module/components/block-caption/index.native.js.map +1 -1
- package/build-module/components/block-card/index.js.map +1 -1
- package/build-module/components/block-compare/block-view.js.map +1 -1
- package/build-module/components/block-compare/index.js.map +1 -1
- package/build-module/components/block-content-overlay/index.js.map +1 -1
- package/build-module/components/block-context/index.js.map +1 -1
- package/build-module/components/block-controls/fill.js.map +1 -1
- package/build-module/components/block-controls/groups.js.map +1 -1
- package/build-module/components/block-controls/hook.js.map +1 -1
- package/build-module/components/block-controls/index.js.map +1 -1
- package/build-module/components/block-controls/slot.js.map +1 -1
- package/build-module/components/block-controls/slot.native.js.map +1 -1
- package/build-module/components/block-controls/use-has-block-controls.js.map +1 -1
- package/build-module/components/block-draggable/draggable-chip.js.map +1 -1
- package/build-module/components/block-draggable/draggable-chip.native.js.map +1 -1
- package/build-module/components/block-draggable/dropping-insertion-point.native.js.map +1 -1
- package/build-module/components/block-draggable/index.js.map +1 -1
- package/build-module/components/block-draggable/index.native.js.map +1 -1
- package/build-module/components/block-draggable/use-scroll-when-dragging.js.map +1 -1
- package/build-module/components/block-draggable/use-scroll-when-dragging.native.js.map +1 -1
- package/build-module/components/block-edit/context.js +1 -0
- package/build-module/components/block-edit/context.js.map +1 -1
- package/build-module/components/block-edit/edit.js.map +1 -1
- package/build-module/components/block-edit/edit.native.js.map +1 -1
- package/build-module/components/block-edit/index.js +5 -3
- package/build-module/components/block-edit/index.js.map +1 -1
- package/build-module/components/block-edit-visually-button/index.js.map +1 -1
- package/build-module/components/block-editing-mode/index.js.map +1 -1
- package/build-module/components/block-full-height-alignment-control/index.js.map +1 -1
- package/build-module/components/block-heading-level-dropdown/heading-level-icon.js.map +1 -1
- package/build-module/components/block-heading-level-dropdown/index.js.map +1 -1
- package/build-module/components/block-heading-level-dropdown/index.native.js.map +1 -1
- package/build-module/components/block-icon/index.js.map +1 -1
- package/build-module/components/block-icon/index.native.js.map +1 -1
- package/build-module/components/block-info-slot-fill/index.js.map +1 -1
- package/build-module/components/block-inspector/index.js +5 -4
- package/build-module/components/block-inspector/index.js.map +1 -1
- package/build-module/components/block-inspector/useBlockInspectorAnimationSettings.js.map +1 -1
- package/build-module/components/block-list/block-crash-boundary.js.map +1 -1
- package/build-module/components/block-list/block-crash-boundary.native.js.map +1 -1
- package/build-module/components/block-list/block-crash-warning.js.map +1 -1
- package/build-module/components/block-list/block-crash-warning.native.js.map +1 -1
- package/build-module/components/block-list/block-html.js.map +1 -1
- package/build-module/components/block-list/block-invalid-warning.js.map +1 -1
- package/build-module/components/block-list/block-invalid-warning.native.js.map +1 -1
- package/build-module/components/block-list/block-list-context.native.js.map +1 -1
- package/build-module/components/block-list/block-list-item-cell.native.js.map +1 -1
- package/build-module/components/block-list/block-list-item.native.js.map +1 -1
- package/build-module/components/block-list/block-outline.native.js.map +1 -1
- package/build-module/components/block-list/block-selection-button.native.js.map +1 -1
- package/build-module/components/block-list/block.js +55 -29
- package/build-module/components/block-list/block.js.map +1 -1
- package/build-module/components/block-list/block.native.js +2 -2
- package/build-module/components/block-list/block.native.js.map +1 -1
- package/build-module/components/block-list/grid-item.native.js.map +1 -1
- package/build-module/components/block-list/index.js +16 -5
- package/build-module/components/block-list/index.js.map +1 -1
- package/build-module/components/block-list/index.native.js.map +1 -1
- package/build-module/components/block-list/insertion-point.native.js.map +1 -1
- package/build-module/components/block-list/layout.js.map +1 -1
- package/build-module/components/block-list/private-block-context.js.map +1 -1
- package/build-module/components/block-list/subdirectory-icon.js.map +1 -1
- package/build-module/components/block-list/use-block-props/index.js +2 -1
- package/build-module/components/block-list/use-block-props/index.js.map +1 -1
- package/build-module/components/block-list/use-block-props/index.native.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-block-moving-mode-class-names.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-block-refs.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-focus-first-element.js +3 -2
- package/build-module/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-focus-handler.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-intersection-observer.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-is-hovered.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-nav-mode-exit.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +1 -1
- package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
- package/build-module/components/block-list/use-scroll-upon-insertion.native.js.map +1 -1
- package/build-module/components/block-list-appender/index.js.map +1 -1
- package/build-module/components/block-list-appender/index.native.js.map +1 -1
- package/build-module/components/block-lock/index.js.map +1 -1
- package/build-module/components/block-lock/menu-item.js.map +1 -1
- package/build-module/components/block-lock/modal.js.map +1 -1
- package/build-module/components/block-lock/toolbar.js.map +1 -1
- package/build-module/components/block-lock/use-block-lock.js.map +1 -1
- package/build-module/components/block-media-update-progress/index.native.js.map +1 -1
- package/build-module/components/block-mover/button.js +4 -1
- package/build-module/components/block-mover/button.js.map +1 -1
- package/build-module/components/block-mover/index.js +5 -1
- package/build-module/components/block-mover/index.js.map +1 -1
- package/build-module/components/block-mover/index.native.js.map +1 -1
- package/build-module/components/block-mover/mover-description.js.map +1 -1
- package/build-module/components/block-mover/mover-description.native.js.map +1 -1
- package/build-module/components/block-navigation/dropdown.js.map +1 -1
- package/build-module/components/block-parent-selector/index.js.map +1 -1
- package/build-module/components/block-pattern-setup/constants.js.map +1 -1
- package/build-module/components/block-pattern-setup/index.js.map +1 -1
- package/build-module/components/block-pattern-setup/setup-toolbar.js.map +1 -1
- package/build-module/components/block-pattern-setup/use-patterns-setup.js.map +1 -1
- package/build-module/components/block-patterns-list/index.js +4 -1
- package/build-module/components/block-patterns-list/index.js.map +1 -1
- package/build-module/components/block-patterns-paging/index.js +8 -4
- package/build-module/components/block-patterns-paging/index.js.map +1 -1
- package/build-module/components/block-popover/cover.js.map +1 -1
- package/build-module/components/block-popover/drop-zone.js.map +1 -1
- package/build-module/components/block-popover/inbetween.js.map +1 -1
- package/build-module/components/block-popover/index.js.map +1 -1
- package/build-module/components/block-popover/use-popover-scroll.js.map +1 -1
- package/build-module/components/block-preview/auto.js.map +1 -1
- package/build-module/components/block-preview/index.js.map +1 -1
- package/build-module/components/block-quick-navigation/index.js.map +1 -1
- package/build-module/components/block-removal-warning-modal/index.js.map +1 -1
- package/build-module/components/block-rename/index.js.map +1 -1
- package/build-module/components/block-rename/is-empty-string.js.map +1 -1
- package/build-module/components/block-rename/modal.js +14 -10
- package/build-module/components/block-rename/modal.js.map +1 -1
- package/build-module/components/block-rename/rename-control.js +3 -1
- package/build-module/components/block-rename/rename-control.js.map +1 -1
- package/build-module/components/block-rename/use-block-rename.js.map +1 -1
- package/build-module/components/block-selection-clearer/index.js.map +1 -1
- package/build-module/components/block-settings/button.native.js.map +1 -1
- package/build-module/components/block-settings/container.native.js.map +1 -1
- package/build-module/components/block-settings/index.native.js.map +1 -1
- package/build-module/components/block-settings-menu/block-html-convert-button.js.map +1 -1
- package/build-module/components/block-settings-menu/block-mode-toggle.js.map +1 -1
- package/build-module/components/block-settings-menu/block-parent-selector-menu-item.js.map +1 -1
- package/build-module/components/block-settings-menu/block-settings-dropdown.js +7 -3
- package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build-module/components/block-settings-menu/block-settings-menu-first-item.js.map +1 -1
- package/build-module/components/block-settings-menu/index.js.map +1 -1
- package/build-module/components/block-settings-menu-controls/index.js.map +1 -1
- package/build-module/components/block-styles/index.js.map +1 -1
- package/build-module/components/block-styles/index.native.js.map +1 -1
- package/build-module/components/block-styles/menu-items.js.map +1 -1
- package/build-module/components/block-styles/preview-panel.js.map +1 -1
- package/build-module/components/block-styles/preview.native.js.map +1 -1
- package/build-module/components/block-styles/use-styles-for-block.js.map +1 -1
- package/build-module/components/block-styles/utils.js.map +1 -1
- package/build-module/components/block-switcher/block-styles-menu.js.map +1 -1
- package/build-module/components/block-switcher/block-transformations-menu.js.map +1 -1
- package/build-module/components/block-switcher/block-transformations-menu.native.js.map +1 -1
- package/build-module/components/block-switcher/block-variation-transformations.js.map +1 -1
- package/build-module/components/block-switcher/index.js +4 -3
- package/build-module/components/block-switcher/index.js.map +1 -1
- package/build-module/components/block-switcher/pattern-transformations-menu.js.map +1 -1
- package/build-module/components/block-switcher/preview-block-popover.js.map +1 -1
- package/build-module/components/block-switcher/use-transformed-patterns.js.map +1 -1
- package/build-module/components/block-switcher/utils.js.map +1 -1
- package/build-module/components/block-title/index.js.map +1 -1
- package/build-module/components/block-title/use-block-display-title.js.map +1 -1
- package/build-module/components/block-toolbar/block-name-context.js.map +1 -1
- package/build-module/components/block-toolbar/block-toolbar-last-item.js.map +1 -1
- package/build-module/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
- package/build-module/components/block-toolbar/index.js +5 -4
- package/build-module/components/block-toolbar/index.js.map +1 -1
- package/build-module/components/block-toolbar/index.native.js.map +1 -1
- package/build-module/components/block-toolbar/shuffle.js +18 -9
- package/build-module/components/block-toolbar/shuffle.js.map +1 -1
- package/build-module/components/block-toolbar/use-has-block-toolbar.js +6 -3
- package/build-module/components/block-toolbar/use-has-block-toolbar.js.map +1 -1
- package/build-module/components/block-toolbar/utils.js.map +1 -1
- package/build-module/components/block-tools/block-selection-button.js +58 -14
- package/build-module/components/block-tools/block-selection-button.js.map +1 -1
- package/build-module/components/block-tools/block-toolbar-breadcrumb.js.map +1 -1
- package/build-module/components/block-tools/block-toolbar-popover.js.map +1 -1
- package/build-module/components/block-tools/empty-block-inserter.js.map +1 -1
- package/build-module/components/block-tools/index.js +14 -2
- package/build-module/components/block-tools/index.js.map +1 -1
- package/build-module/components/block-tools/insertion-point.js.map +1 -1
- package/build-module/components/block-tools/use-block-toolbar-popover-props.js.map +1 -1
- package/build-module/components/block-tools/use-selected-block-tool-props.js.map +1 -1
- package/build-module/components/block-tools/use-show-block-tools.js +7 -13
- package/build-module/components/block-tools/use-show-block-tools.js.map +1 -1
- package/build-module/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
- package/build-module/components/block-types-list/index.js.map +1 -1
- package/build-module/components/block-types-list/index.native.js.map +1 -1
- package/build-module/components/block-variation-picker/index.js.map +1 -1
- package/build-module/components/block-variation-picker/index.native.js.map +1 -1
- package/build-module/components/block-variation-transforms/index.js +4 -1
- package/build-module/components/block-variation-transforms/index.js.map +1 -1
- package/build-module/components/block-vertical-alignment-control/icons.js.map +1 -1
- package/build-module/components/block-vertical-alignment-control/index.js.map +1 -1
- package/build-module/components/block-vertical-alignment-control/ui.js.map +1 -1
- package/build-module/components/border-radius-control/all-input-control.js.map +1 -1
- package/build-module/components/border-radius-control/index.js.map +1 -1
- package/build-module/components/border-radius-control/input-controls.js.map +1 -1
- package/build-module/components/border-radius-control/linked-button.js.map +1 -1
- package/build-module/components/border-radius-control/utils.js.map +1 -1
- package/build-module/components/button-block-appender/index.js.map +1 -1
- package/build-module/components/button-block-appender/index.native.js +11 -1
- package/build-module/components/button-block-appender/index.native.js.map +1 -1
- package/build-module/components/caption/index.native.js.map +1 -1
- package/build-module/components/child-layout-control/index.js.map +1 -1
- package/build-module/components/color-palette/control.js.map +1 -1
- package/build-module/components/color-palette/index.js.map +1 -1
- package/build-module/components/color-palette/with-color-context.js.map +1 -1
- package/build-module/components/color-style-selector/index.js.map +1 -1
- package/build-module/components/colors/index.js.map +1 -1
- package/build-module/components/colors/utils.js.map +1 -1
- package/build-module/components/colors/with-colors.js.map +1 -1
- package/build-module/components/colors-gradients/control.js.map +1 -1
- package/build-module/components/colors-gradients/dropdown.js.map +1 -1
- package/build-module/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
- package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
- package/build-module/components/colors-gradients/use-multiple-origin-colors-and-gradients.js.map +1 -1
- package/build-module/components/contrast-checker/index.js.map +1 -1
- package/build-module/components/contrast-checker/index.native.js.map +1 -1
- package/build-module/components/convert-to-group-buttons/index.js.map +1 -1
- package/build-module/components/convert-to-group-buttons/index.native.js.map +1 -1
- package/build-module/components/convert-to-group-buttons/toolbar.js.map +1 -1
- package/build-module/components/convert-to-group-buttons/use-convert-to-group-button-props.js.map +1 -1
- package/build-module/components/copy-handler/index.js.map +1 -1
- package/build-module/components/date-format-picker/index.js.map +1 -1
- package/build-module/components/default-block-appender/index.js.map +1 -1
- package/build-module/components/default-block-appender/index.native.js.map +1 -1
- package/build-module/components/dimensions-tool/aspect-ratio-tool.js.map +1 -1
- package/build-module/components/dimensions-tool/index.js.map +1 -1
- package/build-module/components/dimensions-tool/scale-tool.js.map +1 -1
- package/build-module/components/dimensions-tool/width-height-tool.js.map +1 -1
- package/build-module/components/duotone/utils.js.map +1 -1
- package/build-module/components/duotone-control/index.js.map +1 -1
- package/build-module/components/editable-text/index.js.map +1 -1
- package/build-module/components/editor-styles/index.js +3 -2
- package/build-module/components/editor-styles/index.js.map +1 -1
- package/build-module/components/floating-toolbar/index.native.js.map +1 -1
- package/build-module/components/floating-toolbar/nav-up-icon.js.map +1 -1
- package/build-module/components/font-appearance-control/index.js.map +1 -1
- package/build-module/components/font-family/index.js.map +1 -1
- package/build-module/components/font-sizes/fluid-utils.js.map +1 -1
- package/build-module/components/font-sizes/font-size-picker.js.map +1 -1
- package/build-module/components/font-sizes/index.js.map +1 -1
- package/build-module/components/font-sizes/index.native.js.map +1 -1
- package/build-module/components/font-sizes/utils.js.map +1 -1
- package/build-module/components/font-sizes/with-font-sizes.js.map +1 -1
- package/build-module/components/global-styles/advanced-panel.js +9 -2
- package/build-module/components/global-styles/advanced-panel.js.map +1 -1
- package/build-module/components/global-styles/background-panel.js +433 -0
- package/build-module/components/global-styles/background-panel.js.map +1 -0
- package/build-module/components/global-styles/border-panel.js.map +1 -1
- package/build-module/components/global-styles/color-panel.js +2 -1
- package/build-module/components/global-styles/color-panel.js.map +1 -1
- package/build-module/components/global-styles/color-panel.native.js.map +1 -1
- package/build-module/components/global-styles/context.js.map +1 -1
- package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
- package/build-module/components/global-styles/filters-panel.js.map +1 -1
- package/build-module/components/global-styles/get-block-css-selector.js.map +1 -1
- package/build-module/components/global-styles/get-global-styles-changes.js +3 -0
- package/build-module/components/global-styles/get-global-styles-changes.js.map +1 -1
- package/build-module/components/global-styles/hooks.js +1 -1
- package/build-module/components/global-styles/hooks.js.map +1 -1
- package/build-module/components/global-styles/image-settings-panel.js.map +1 -1
- package/build-module/components/global-styles/index.js +1 -0
- package/build-module/components/global-styles/index.js.map +1 -1
- package/build-module/components/global-styles/shadow-panel-components.js.map +1 -1
- package/build-module/components/global-styles/typography-panel.js.map +1 -1
- package/build-module/components/global-styles/typography-utils.js.map +1 -1
- package/build-module/components/global-styles/use-global-styles-output.js +20 -19
- 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/gradients/index.js.map +1 -1
- package/build-module/components/gradients/index.native.js.map +1 -1
- package/build-module/components/gradients/use-gradient.js.map +1 -1
- package/build-module/components/gradients/with-gradient.js.map +1 -1
- package/build-module/components/grid-visualizer/grid-item-resizer.js.map +1 -1
- package/build-module/components/grid-visualizer/grid-visualizer.js.map +1 -1
- package/build-module/components/grid-visualizer/index.js.map +1 -1
- package/build-module/components/grid-visualizer/utils.js.map +1 -1
- package/build-module/components/height-control/index.js.map +1 -1
- package/build-module/components/iframe/get-compatibility-styles.js.map +1 -1
- package/build-module/components/iframe/index.js +14 -10
- package/build-module/components/iframe/index.js.map +1 -1
- package/build-module/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
- package/build-module/components/image-editor/constants.js.map +1 -1
- package/build-module/components/image-editor/context.js.map +1 -1
- package/build-module/components/image-editor/cropper.js +7 -3
- package/build-module/components/image-editor/cropper.js.map +1 -1
- package/build-module/components/image-editor/form-controls.js.map +1 -1
- package/build-module/components/image-editor/index.js +0 -2
- package/build-module/components/image-editor/index.js.map +1 -1
- package/build-module/components/image-editor/rotation-button.js.map +1 -1
- package/build-module/components/image-editor/use-save-image.js.map +1 -1
- package/build-module/components/image-editor/use-transform-image.js.map +1 -1
- package/build-module/components/image-editor/zoom-dropdown.js.map +1 -1
- package/build-module/components/image-link-destinations/index.native.js.map +1 -1
- package/build-module/components/image-size-control/index.js.map +1 -1
- package/build-module/components/image-size-control/use-dimension-handler.js.map +1 -1
- package/build-module/components/index.js.map +1 -1
- package/build-module/components/index.native.js.map +1 -1
- package/build-module/components/inner-blocks/button-block-appender.js.map +1 -1
- package/build-module/components/inner-blocks/constants.native.js.map +1 -1
- package/build-module/components/inner-blocks/default-block-appender.js.map +1 -1
- package/build-module/components/inner-blocks/index.js.map +1 -1
- package/build-module/components/inner-blocks/index.native.js.map +1 -1
- package/build-module/components/inner-blocks/use-block-context.js.map +1 -1
- package/build-module/components/inner-blocks/use-inner-block-template-sync.js.map +1 -1
- package/build-module/components/inner-blocks/use-nested-settings-update.js.map +1 -1
- package/build-module/components/inner-blocks/warning-max-depth-exceeded.native.js.map +1 -1
- package/build-module/components/inner-blocks/with-client-id.js.map +1 -1
- package/build-module/components/inserter/block-patterns-explorer/index.js.map +1 -1
- package/build-module/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js.map +1 -1
- package/build-module/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab/index.js +32 -19
- package/build-module/components/inserter/block-patterns-tab/index.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +2 -19
- package/build-module/components/inserter/block-patterns-tab/pattern-category-preview-panel.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js +2 -4
- package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab/use-pattern-categories.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab/utils.js.map +1 -1
- package/build-module/components/inserter/block-types-tab.js.map +1 -1
- package/build-module/components/inserter/block-types-tab.native.js.map +1 -1
- package/build-module/components/inserter/hooks/use-block-type-impressions.native.js.map +1 -1
- package/build-module/components/inserter/hooks/use-block-types-state.js.map +1 -1
- package/build-module/components/inserter/hooks/use-clipboard-block.native.js.map +1 -1
- package/build-module/components/inserter/hooks/use-insertion-point.js.map +1 -1
- package/build-module/components/inserter/hooks/use-patterns-paging.js.map +1 -1
- package/build-module/components/inserter/hooks/use-patterns-state.js.map +1 -1
- package/build-module/components/inserter/index.js.map +1 -1
- package/build-module/components/inserter/index.native.js.map +1 -1
- package/build-module/components/inserter/library.js +2 -0
- package/build-module/components/inserter/library.js.map +1 -1
- package/build-module/components/inserter/media-tab/hooks.js.map +1 -1
- package/build-module/components/inserter/media-tab/index.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-list.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-panel.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-preview.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-tab.js.map +1 -1
- package/build-module/components/inserter/media-tab/utils.js.map +1 -1
- package/build-module/components/inserter/menu.js +25 -13
- package/build-module/components/inserter/menu.js.map +1 -1
- package/build-module/components/inserter/menu.native.js.map +1 -1
- package/build-module/components/inserter/mobile-tab-navigation.js.map +1 -1
- package/build-module/components/inserter/no-results.js.map +1 -1
- package/build-module/components/inserter/no-results.native.js.map +1 -1
- package/build-module/components/inserter/panel.js.map +1 -1
- package/build-module/components/inserter/preview-panel.js.map +1 -1
- package/build-module/components/inserter/quick-inserter.js.map +1 -1
- package/build-module/components/inserter/reusable-block-rename-hint.js.map +1 -1
- package/build-module/components/inserter/reusable-blocks-tab.native.js.map +1 -1
- package/build-module/components/inserter/search-items.js +33 -15
- package/build-module/components/inserter/search-items.js.map +1 -1
- package/build-module/components/inserter/search-results.js.map +1 -1
- package/build-module/components/inserter/search-results.native.js.map +1 -1
- package/build-module/components/inserter/tabs.js +7 -3
- package/build-module/components/inserter/tabs.js.map +1 -1
- package/build-module/components/inserter/tabs.native.js.map +1 -1
- package/build-module/components/inserter/tips.js.map +1 -1
- package/build-module/components/inserter/utils.native.js.map +1 -1
- package/build-module/components/inserter-button/index.native.js.map +1 -1
- package/build-module/components/inserter-button/sparkles.js.map +1 -1
- package/build-module/components/inserter-draggable-blocks/index.js.map +1 -1
- package/build-module/components/inserter-list-item/index.js.map +1 -1
- package/build-module/components/inserter-listbox/context.js.map +1 -1
- package/build-module/components/inserter-listbox/group.js.map +1 -1
- package/build-module/components/inserter-listbox/index.js.map +1 -1
- package/build-module/components/inserter-listbox/item.js.map +1 -1
- package/build-module/components/inserter-listbox/row.js.map +1 -1
- package/build-module/components/inserter-menu-extension/index.js.map +1 -1
- package/build-module/components/inspector-controls/block-support-slot-container.js.map +1 -1
- package/build-module/components/inspector-controls/block-support-tools-panel.js.map +1 -1
- package/build-module/components/inspector-controls/fill.js.map +1 -1
- package/build-module/components/inspector-controls/fill.native.js.map +1 -1
- package/build-module/components/inspector-controls/groups.js.map +1 -1
- package/build-module/components/inspector-controls/index.js.map +1 -1
- package/build-module/components/inspector-controls/slot.js.map +1 -1
- package/build-module/components/inspector-controls/slot.native.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/advanced-controls-panel.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/advanced-controls-panel.native.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/index.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/settings-tab-hint.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/settings-tab.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/styles-tab.js +1 -1
- package/build-module/components/inspector-controls-tabs/styles-tab.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/use-is-list-view-tab-disabled.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/utils.js.map +1 -1
- package/build-module/components/inspector-popover-header/index.js.map +1 -1
- package/build-module/components/justify-content-control/index.js.map +1 -1
- package/build-module/components/justify-content-control/ui.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/index.js +11 -0
- package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
- package/build-module/components/letter-spacing-control/index.js.map +1 -1
- package/build-module/components/line-height-control/index.js.map +1 -1
- package/build-module/components/line-height-control/index.native.js.map +1 -1
- package/build-module/components/line-height-control/utils.js.map +1 -1
- package/build-module/components/link-control/constants.js.map +1 -1
- package/build-module/components/link-control/index.js.map +1 -1
- package/build-module/components/link-control/is-url-like.js.map +1 -1
- package/build-module/components/link-control/link-preview.js.map +1 -1
- package/build-module/components/link-control/search-create-button.js.map +1 -1
- package/build-module/components/link-control/search-input.js.map +1 -1
- package/build-module/components/link-control/search-item.js.map +1 -1
- package/build-module/components/link-control/search-results.js.map +1 -1
- package/build-module/components/link-control/settings-drawer.js.map +1 -1
- package/build-module/components/link-control/settings.js.map +1 -1
- package/build-module/components/link-control/use-create-page.js.map +1 -1
- package/build-module/components/link-control/use-internal-value.js.map +1 -1
- package/build-module/components/link-control/use-rich-url-data.js.map +1 -1
- package/build-module/components/link-control/use-search-handler.js.map +1 -1
- package/build-module/components/link-control/viewer-slot.js.map +1 -1
- package/build-module/components/list-view/appender.js.map +1 -1
- package/build-module/components/list-view/aria-referenced-text.js.map +1 -1
- package/build-module/components/list-view/block-contents.js.map +1 -1
- package/build-module/components/list-view/block-select-button.js +45 -1
- package/build-module/components/list-view/block-select-button.js.map +1 -1
- package/build-module/components/list-view/block.js +1 -1
- package/build-module/components/list-view/block.js.map +1 -1
- package/build-module/components/list-view/branch.js.map +1 -1
- package/build-module/components/list-view/context.js.map +1 -1
- package/build-module/components/list-view/drop-indicator.js.map +1 -1
- package/build-module/components/list-view/expander.js.map +1 -1
- package/build-module/components/list-view/index.js +17 -2
- package/build-module/components/list-view/index.js.map +1 -1
- package/build-module/components/list-view/leaf.js.map +1 -1
- package/build-module/components/list-view/use-block-selection.js.map +1 -1
- package/build-module/components/list-view/use-clipboard-handler.js.map +1 -1
- package/build-module/components/list-view/use-list-view-block-indexes.js.map +1 -1
- package/build-module/components/list-view/use-list-view-client-ids.js.map +1 -1
- package/build-module/components/list-view/use-list-view-collapse-items.js +40 -0
- package/build-module/components/list-view/use-list-view-collapse-items.js.map +1 -0
- package/build-module/components/list-view/use-list-view-drop-zone.js +5 -0
- package/build-module/components/list-view/use-list-view-drop-zone.js.map +1 -1
- package/build-module/components/list-view/use-list-view-expand-selected-item.js.map +1 -1
- package/build-module/components/list-view/use-list-view-images.js.map +1 -1
- package/build-module/components/list-view/use-list-view-scroll-into-view.js.map +1 -1
- package/build-module/components/list-view/utils.js.map +1 -1
- package/build-module/components/media-placeholder/index.js.map +1 -1
- package/build-module/components/media-placeholder/index.native.js.map +1 -1
- package/build-module/components/media-replace-flow/index.js.map +1 -1
- package/build-module/components/media-replace-flow/index.native.js.map +1 -1
- package/build-module/components/media-upload/check.js.map +1 -1
- package/build-module/components/media-upload/constants.native.js.map +1 -1
- package/build-module/components/media-upload/index.js.map +1 -1
- package/build-module/components/media-upload/index.native.js.map +1 -1
- package/build-module/components/media-upload-progress/constants.js.map +1 -1
- package/build-module/components/media-upload-progress/index.native.js.map +1 -1
- package/build-module/components/multi-selection-inspector/index.js.map +1 -1
- package/build-module/components/navigable-toolbar/index.js.map +1 -1
- package/build-module/components/observe-typing/index.js.map +1 -1
- package/build-module/components/panel-color-settings/index.js.map +1 -1
- package/build-module/components/plain-text/index.js.map +1 -1
- package/build-module/components/plain-text/index.native.js.map +1 -1
- package/build-module/components/preview-options/index.js.map +1 -1
- package/build-module/components/provider/block-refs-provider.js.map +1 -1
- package/build-module/components/provider/index.js.map +1 -1
- package/build-module/components/provider/index.native.js.map +1 -1
- package/build-module/components/provider/use-block-sync.js.map +1 -1
- package/build-module/components/provider/with-registry-provider.js.map +1 -1
- package/build-module/components/publish-date-time-picker/index.js.map +1 -1
- package/build-module/components/recursion-provider/index.js +2 -2
- package/build-module/components/recursion-provider/index.js.map +1 -1
- package/build-module/components/resizable-box-popover/index.js.map +1 -1
- package/build-module/components/resolution-tool/index.js.map +1 -1
- package/build-module/components/responsive-block-control/index.js.map +1 -1
- package/build-module/components/responsive-block-control/label.js.map +1 -1
- package/build-module/components/rich-text/content.js +25 -19
- package/build-module/components/rich-text/content.js.map +1 -1
- package/build-module/components/rich-text/embed-handler-picker.native.js.map +1 -1
- package/build-module/components/rich-text/file-paste-handler.native.js.map +1 -1
- package/build-module/components/rich-text/format-edit.js.map +1 -1
- package/build-module/components/rich-text/format-toolbar/index.js.map +1 -1
- package/build-module/components/rich-text/format-toolbar/index.native.js.map +1 -1
- package/build-module/components/rich-text/format-toolbar-container.js.map +1 -1
- package/build-module/components/rich-text/format-toolbar-container.native.js.map +1 -1
- package/build-module/components/rich-text/get-rich-text-values.js.map +1 -1
- package/build-module/components/rich-text/index.js +57 -14
- package/build-module/components/rich-text/index.js.map +1 -1
- package/build-module/components/rich-text/index.native.js +19 -12
- package/build-module/components/rich-text/index.native.js.map +1 -1
- package/build-module/components/rich-text/input-event.js.map +1 -1
- package/build-module/components/rich-text/input-event.native.js.map +1 -1
- package/build-module/components/rich-text/multiline.js.map +1 -1
- package/build-module/components/rich-text/native/format-edit.js.map +1 -1
- package/build-module/components/rich-text/native/get-format-colors.native.js +1 -1
- package/build-module/components/rich-text/native/get-format-colors.native.js.map +1 -1
- package/build-module/components/rich-text/native/index.js.map +1 -1
- package/build-module/components/rich-text/native/index.native.js +2 -2
- package/build-module/components/rich-text/native/index.native.js.map +1 -1
- package/build-module/components/rich-text/native/toolbar-button-with-options.native.js.map +1 -1
- package/build-module/components/rich-text/native/use-format-types.js.map +1 -1
- package/build-module/components/rich-text/prevent-event-discovery.js.map +1 -1
- package/build-module/components/rich-text/remove-browser-shortcuts.native.js.map +1 -1
- package/build-module/components/rich-text/shortcut.js.map +1 -1
- package/build-module/components/rich-text/shortcut.native.js.map +1 -1
- package/build-module/components/rich-text/split-value.js.map +1 -1
- package/build-module/components/rich-text/toolbar-button.js.map +1 -1
- package/build-module/components/rich-text/use-before-input-rules.js.map +1 -1
- package/build-module/components/rich-text/use-delete.js.map +1 -1
- package/build-module/components/rich-text/use-enter.js.map +1 -1
- package/build-module/components/rich-text/use-firefox-compat.js.map +1 -1
- package/build-module/components/rich-text/use-format-types.js.map +1 -1
- package/build-module/components/rich-text/use-input-events.js.map +1 -1
- package/build-module/components/rich-text/use-input-rules.js.map +1 -1
- package/build-module/components/rich-text/use-insert-replacement-text.js.map +1 -1
- package/build-module/components/rich-text/use-mark-persistent.js.map +1 -1
- package/build-module/components/rich-text/use-paste-handler.js.map +1 -1
- package/build-module/components/rich-text/use-remove-browser-shortcuts.js.map +1 -1
- package/build-module/components/rich-text/use-shortcuts.js.map +1 -1
- package/build-module/components/rich-text/use-undo-automatic-change.js +2 -2
- package/build-module/components/rich-text/use-undo-automatic-change.js.map +1 -1
- package/build-module/components/rich-text/utils.js.map +1 -1
- package/build-module/components/rich-text/with-deprecations.js +0 -3
- package/build-module/components/rich-text/with-deprecations.js.map +1 -1
- package/build-module/components/selection-scroll-into-view/index.js.map +1 -1
- package/build-module/components/skip-to-selected-block/index.js.map +1 -1
- package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
- package/build-module/components/spacing-sizes-control/index.js.map +1 -1
- package/build-module/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
- package/build-module/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
- package/build-module/components/spacing-sizes-control/input-controls/single.js.map +1 -1
- package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
- package/build-module/components/spacing-sizes-control/sides-dropdown/index.js.map +1 -1
- package/build-module/components/spacing-sizes-control/utils.js.map +1 -1
- package/build-module/components/text-decoration-control/index.js.map +1 -1
- package/build-module/components/text-transform-control/index.js.map +1 -1
- package/build-module/components/tool-selector/index.js.map +1 -1
- package/build-module/components/typewriter/index.js.map +1 -1
- package/build-module/components/ungroup-button/index.native.js.map +1 -1
- package/build-module/components/unit-control/index.js.map +1 -1
- package/build-module/components/unsupported-block-details/index.native.js.map +1 -1
- package/build-module/components/url-input/button.js.map +1 -1
- package/build-module/components/url-input/index.js.map +1 -1
- package/build-module/components/url-input/index.native.js.map +1 -1
- package/build-module/components/url-popover/image-url-input-ui.js +50 -36
- package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
- package/build-module/components/url-popover/index.js.map +1 -1
- package/build-module/components/url-popover/link-editor.js.map +1 -1
- package/build-module/components/url-popover/link-viewer-url.js.map +1 -1
- package/build-module/components/url-popover/link-viewer.js.map +1 -1
- package/build-module/components/use-block-commands/index.js +20 -2
- package/build-module/components/use-block-commands/index.js.map +1 -1
- package/build-module/components/use-block-display-information/index.js +5 -7
- package/build-module/components/use-block-display-information/index.js.map +1 -1
- package/build-module/components/use-block-drop-zone/index.js.map +1 -1
- package/build-module/components/use-block-drop-zone/index.native.js.map +1 -1
- package/build-module/components/use-flash-editable-blocks/index.js.map +1 -1
- package/build-module/components/use-moving-animation/index.js.map +1 -1
- package/build-module/components/use-on-block-drop/index.js.map +1 -1
- package/build-module/components/use-on-block-drop/index.native.js.map +1 -1
- package/build-module/components/use-on-block-drop/types.js.map +1 -1
- package/build-module/components/use-paste-styles/index.js +2 -1
- package/build-module/components/use-paste-styles/index.js.map +1 -1
- package/build-module/components/use-resize-canvas/index.js.map +1 -1
- package/build-module/components/use-settings/index.js.map +1 -1
- package/build-module/components/use-unsupported-block-editor/index.native.js.map +1 -1
- package/build-module/components/video-player/gridicon-play.native.js.map +1 -1
- package/build-module/components/video-player/index.native.js.map +1 -1
- package/build-module/components/warning/index.js.map +1 -1
- package/build-module/components/warning/index.native.js.map +1 -1
- package/build-module/components/writing-flow/index.js.map +1 -1
- package/build-module/components/writing-flow/use-arrow-nav.js.map +1 -1
- package/build-module/components/writing-flow/use-click-selection.js.map +1 -1
- package/build-module/components/writing-flow/use-clipboard-handler.js.map +1 -1
- package/build-module/components/writing-flow/use-drag-selection.js.map +1 -1
- package/build-module/components/writing-flow/use-input.js.map +1 -1
- package/build-module/components/writing-flow/use-multi-selection.js.map +1 -1
- package/build-module/components/writing-flow/use-select-all.js.map +1 -1
- package/build-module/components/writing-flow/use-selection-observer.js.map +1 -1
- package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
- package/build-module/components/writing-flow/utils.js.map +1 -1
- package/build-module/components/writing-mode-control/index.js.map +1 -1
- package/build-module/elements/index.js.map +1 -1
- package/build-module/hooks/align.js.map +1 -1
- package/build-module/hooks/align.native.js.map +1 -1
- package/build-module/hooks/anchor.js +2 -2
- package/build-module/hooks/anchor.js.map +1 -1
- package/build-module/hooks/aria-label.js.map +1 -1
- package/build-module/hooks/background.js +67 -419
- package/build-module/hooks/background.js.map +1 -1
- package/build-module/hooks/block-hooks.js.map +1 -1
- package/build-module/hooks/block-renaming.js +0 -36
- package/build-module/hooks/block-renaming.js.map +1 -1
- package/build-module/hooks/border.js.map +1 -1
- package/build-module/hooks/color.js.map +1 -1
- package/build-module/hooks/compat.js.map +1 -1
- package/build-module/hooks/content-lock-ui.js +5 -5
- package/build-module/hooks/content-lock-ui.js.map +1 -1
- package/build-module/hooks/contrast-checker.js.map +1 -1
- package/build-module/hooks/custom-class-name.js.map +1 -1
- package/build-module/hooks/custom-class-name.native.js.map +1 -1
- package/build-module/hooks/dimensions.js.map +1 -1
- package/build-module/hooks/duotone.js.map +1 -1
- package/build-module/hooks/font-family.js.map +1 -1
- package/build-module/hooks/font-size.js.map +1 -1
- package/build-module/hooks/gap.js.map +1 -1
- package/build-module/hooks/generated-class-name.js.map +1 -1
- package/build-module/hooks/index.js +6 -4
- package/build-module/hooks/index.js.map +1 -1
- package/build-module/hooks/index.native.js.map +1 -1
- package/build-module/hooks/layout-child.js.map +1 -1
- package/build-module/hooks/layout.js +38 -19
- package/build-module/hooks/layout.js.map +1 -1
- package/build-module/hooks/layout.native.js.map +1 -1
- package/build-module/hooks/line-height.js.map +1 -1
- package/build-module/hooks/lock.js.map +1 -1
- package/build-module/hooks/metadata.js.map +1 -1
- package/build-module/hooks/position.js.map +1 -1
- package/build-module/hooks/settings.js.map +1 -1
- package/build-module/hooks/spacing-visualizer.js.map +1 -1
- package/build-module/hooks/style.js.map +1 -1
- package/build-module/hooks/supports.js +22 -1
- package/build-module/hooks/supports.js.map +1 -1
- package/build-module/hooks/text-align.js +145 -0
- package/build-module/hooks/text-align.js.map +1 -0
- package/build-module/hooks/typography.js +2 -1
- package/build-module/hooks/typography.js.map +1 -1
- package/build-module/hooks/typography.native.js.map +1 -1
- package/build-module/hooks/use-bindings-attributes.js +68 -132
- package/build-module/hooks/use-bindings-attributes.js.map +1 -1
- package/build-module/hooks/use-border-props.js.map +1 -1
- package/build-module/hooks/use-cached-truthy.js.map +1 -1
- package/build-module/hooks/use-color-props.js.map +1 -1
- package/build-module/hooks/use-editor-wrapper-styles.native.js.map +1 -1
- package/build-module/hooks/use-shadow-props.js.map +1 -1
- package/build-module/hooks/use-spacing-props.js.map +1 -1
- package/build-module/hooks/use-typography-props.js +2 -1
- package/build-module/hooks/use-typography-props.js.map +1 -1
- package/build-module/hooks/use-zoom-out.js +48 -0
- package/build-module/hooks/use-zoom-out.js.map +1 -0
- package/build-module/hooks/utils.js +30 -6
- package/build-module/hooks/utils.js.map +1 -1
- package/build-module/index.js +1 -1
- package/build-module/index.js.map +1 -1
- package/build-module/index.native.js.map +1 -1
- package/build-module/layouts/constrained.js.map +1 -1
- package/build-module/layouts/definitions.js +8 -6
- package/build-module/layouts/definitions.js.map +1 -1
- package/build-module/layouts/flex.js.map +1 -1
- package/build-module/layouts/flow.js.map +1 -1
- package/build-module/layouts/grid.js +52 -9
- package/build-module/layouts/grid.js.map +1 -1
- package/build-module/layouts/index.js.map +1 -1
- package/build-module/layouts/utils.js.map +1 -1
- package/build-module/lock-unlock.js.map +1 -1
- package/build-module/private-apis.js +7 -2
- package/build-module/private-apis.js.map +1 -1
- package/build-module/private-apis.native.js +3 -1
- package/build-module/private-apis.native.js.map +1 -1
- package/build-module/store/actions.js +18 -4
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/array.js.map +1 -1
- package/build-module/store/constants.js.map +1 -1
- package/build-module/store/defaults.js.map +1 -1
- package/build-module/store/defaults.native.js.map +1 -1
- package/build-module/store/get-block-settings.js.map +1 -1
- package/build-module/store/index.js.map +1 -1
- package/build-module/store/private-actions.js +17 -2
- package/build-module/store/private-actions.js.map +1 -1
- package/build-module/store/private-keys.js +1 -0
- package/build-module/store/private-keys.js.map +1 -1
- package/build-module/store/private-selectors.js +105 -33
- package/build-module/store/private-selectors.js.map +1 -1
- package/build-module/store/reducer.js +21 -0
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +130 -88
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/store/undo-ignore.js.map +1 -1
- package/build-module/store/utils.js +6 -1
- package/build-module/store/utils.js.map +1 -1
- package/build-module/utils/dom.js.map +1 -1
- package/build-module/utils/get-px-from-css-unit.js.map +1 -1
- package/build-module/utils/index.js.map +1 -1
- package/build-module/utils/math.js.map +1 -1
- package/build-module/utils/object.js.map +1 -1
- package/build-module/utils/order-inserter-block-items.js.map +1 -1
- package/build-module/utils/pasting.js.map +1 -1
- package/build-module/utils/selection.js.map +1 -1
- package/build-module/utils/sorting.js.map +1 -1
- package/build-module/utils/transform-styles/index.js +2 -1
- package/build-module/utils/transform-styles/index.js.map +1 -1
- package/build-module/utils/use-notify-copy.js.map +1 -1
- package/build-style/content-rtl.css +40 -19
- package/build-style/content.css +40 -19
- package/build-style/default-editor-styles-rtl.css +1 -1
- package/build-style/default-editor-styles.css +1 -1
- package/build-style/style-rtl.css +150 -130
- package/build-style/style.css +150 -130
- package/package.json +32 -33
- package/src/components/block-bindings-toolbar-indicator/style.scss +1 -1
- package/src/components/block-edit/context.js +1 -0
- package/src/components/block-edit/index.js +4 -0
- package/src/components/block-inspector/index.js +6 -4
- package/src/components/block-list/block.js +69 -30
- package/src/components/block-list/block.native.js +3 -2
- package/src/components/block-list/content.scss +37 -19
- package/src/components/block-list/index.js +22 -6
- package/src/components/block-list/use-block-props/index.js +5 -1
- package/src/components/block-list/use-block-props/use-focus-first-element.js +7 -3
- package/src/components/block-mover/button.js +4 -1
- package/src/components/block-mover/index.js +8 -1
- package/src/components/block-patterns-list/index.js +22 -17
- package/src/components/block-patterns-paging/index.js +4 -0
- package/src/components/block-preview/style.scss +28 -0
- package/src/components/block-rename/modal.js +17 -13
- package/src/components/block-rename/rename-control.js +8 -1
- package/src/components/block-settings-menu/block-settings-dropdown.js +8 -2
- package/src/components/block-switcher/index.js +5 -3
- package/src/components/block-switcher/style.scss +1 -1
- package/src/components/block-toolbar/index.js +16 -9
- package/src/components/block-toolbar/shuffle.js +19 -13
- package/src/components/block-toolbar/style.scss +1 -1
- package/src/components/block-toolbar/use-has-block-toolbar.js +5 -3
- package/src/components/block-tools/block-selection-button.js +103 -34
- package/src/components/block-tools/index.js +18 -1
- package/src/components/block-tools/use-show-block-tools.js +4 -7
- package/src/components/block-variation-transforms/index.js +3 -1
- package/src/components/button-block-appender/content.scss +5 -1
- package/src/components/button-block-appender/index.native.js +16 -1
- package/src/components/default-block-appender/content.scss +3 -3
- package/src/components/editor-styles/index.js +4 -2
- package/src/components/global-styles/advanced-panel.js +8 -2
- package/src/components/global-styles/background-panel.js +595 -0
- package/src/components/global-styles/color-panel.js +2 -1
- package/src/components/global-styles/get-global-styles-changes.js +3 -0
- package/src/components/global-styles/hooks.js +1 -0
- package/src/components/global-styles/index.js +4 -0
- package/src/components/global-styles/style.scss +72 -1
- package/src/{hooks/test/background.js → components/global-styles/test/background-panel.js} +36 -1
- package/src/components/global-styles/test/get-global-styles-changes.js +22 -3
- package/src/components/global-styles/test/use-global-styles-output.js +12 -21
- package/src/components/global-styles/use-global-styles-output.js +32 -21
- package/src/components/global-styles/utils.js +1 -0
- package/src/components/iframe/index.js +17 -14
- package/src/components/image-editor/cropper.js +11 -2
- package/src/components/image-editor/index.js +0 -2
- package/src/components/inserter/block-patterns-tab/index.js +54 -39
- package/src/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +9 -31
- package/src/components/inserter/block-patterns-tab/pattern-category-previews.js +2 -2
- package/src/components/inserter/library.js +4 -0
- package/src/components/inserter/menu.js +35 -17
- package/src/components/inserter/search-items.js +37 -15
- package/src/components/inserter/style.scss +88 -70
- package/src/components/inserter/tabs.js +7 -2
- package/src/components/inspector-controls-tabs/styles-tab.js +1 -1
- package/src/components/keyboard-shortcuts/index.js +11 -0
- package/src/components/link-control/style.scss +10 -2
- package/src/components/link-control/test/index.js +1 -1
- package/src/components/list-view/block-select-button.js +44 -3
- package/src/components/list-view/block.js +1 -1
- package/src/components/list-view/index.js +18 -1
- package/src/components/list-view/style.scss +4 -4
- package/src/components/list-view/use-list-view-collapse-items.js +33 -0
- package/src/components/list-view/use-list-view-drop-zone.js +5 -0
- package/src/components/recursion-provider/index.js +2 -2
- package/src/components/rich-text/README.md +4 -0
- package/src/components/rich-text/content.js +26 -19
- package/src/components/rich-text/index.js +76 -15
- package/src/components/rich-text/index.native.js +17 -12
- package/src/components/rich-text/native/get-format-colors.native.js +1 -1
- package/src/components/rich-text/native/index.native.js +2 -2
- package/src/components/rich-text/use-undo-automatic-change.js +2 -6
- package/src/components/rich-text/with-deprecations.js +0 -3
- package/src/components/url-popover/image-url-input-ui.js +68 -51
- package/src/components/use-block-commands/index.js +46 -28
- package/src/components/use-block-display-information/index.js +8 -10
- package/src/components/use-paste-styles/index.js +2 -0
- package/src/hooks/anchor.js +11 -9
- package/src/hooks/background.js +77 -538
- package/src/hooks/block-renaming.js +0 -33
- package/src/hooks/content-lock-ui.js +5 -7
- package/src/hooks/index.js +6 -2
- package/src/hooks/layout.js +57 -25
- package/src/hooks/supports.js +24 -0
- package/src/hooks/test/text-align.js +114 -0
- package/src/hooks/test/use-typography-props.js +3 -1
- package/src/hooks/text-align.js +178 -0
- package/src/hooks/typography.js +2 -0
- package/src/hooks/use-bindings-attributes.js +90 -161
- package/src/hooks/use-typography-props.js +4 -1
- package/src/hooks/use-zoom-out.js +46 -0
- package/src/hooks/utils.js +41 -3
- package/src/index.js +1 -0
- package/src/layouts/definitions.js +6 -6
- package/src/layouts/grid.js +106 -47
- package/src/private-apis.js +13 -1
- package/src/private-apis.native.js +2 -0
- package/src/store/actions.js +22 -6
- package/src/store/private-actions.js +18 -3
- package/src/store/private-keys.js +1 -0
- package/src/store/private-selectors.js +160 -41
- package/src/store/reducer.js +22 -0
- package/src/store/selectors.js +333 -262
- package/src/store/test/private-actions.js +10 -0
- package/src/store/test/private-selectors.js +13 -0
- package/src/store/test/reducer.js +26 -0
- package/src/store/test/selectors.js +90 -199
- package/src/store/utils.js +13 -0
- package/src/style.scss +0 -2
- package/src/utils/transform-styles/index.js +2 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/src/hooks/anchor.scss +0 -4
- package/src/hooks/background.scss +0 -75
package/build-module/components/inspector-controls-tabs/use-is-list-view-tab-disabled.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["allowlist","useIsListViewTabDisabled","blockName","includes"],"sources":["@wordpress/block-editor/src/components/inspector-controls-tabs/use-is-list-view-tab-disabled.js"],"sourcesContent":["// List view tab restricts the blocks that may render to it via the\n// allowlist below.\nconst allowlist = [ 'core/navigation' ];\n\nexport const useIsListViewTabDisabled = ( blockName ) => {\n\treturn ! allowlist.includes( blockName );\n};\n\nexport default useIsListViewTabDisabled;\n"],"mappings":"AAAA;AACA;AACA,MAAMA,SAAS,GAAG,CAAE,iBAAiB,CAAE;AAEvC,OAAO,MAAMC,wBAAwB,GAAKC,SAAS,IAAM;EACxD,OAAO,CAAEF,SAAS,CAACG,QAAQ,CAAED,SAAU,CAAC;AACzC,CAAC;AAED,eAAeD,wBAAwB"}
|
|
1
|
+
{"version":3,"names":["allowlist","useIsListViewTabDisabled","blockName","includes"],"sources":["@wordpress/block-editor/src/components/inspector-controls-tabs/use-is-list-view-tab-disabled.js"],"sourcesContent":["// List view tab restricts the blocks that may render to it via the\n// allowlist below.\nconst allowlist = [ 'core/navigation' ];\n\nexport const useIsListViewTabDisabled = ( blockName ) => {\n\treturn ! allowlist.includes( blockName );\n};\n\nexport default useIsListViewTabDisabled;\n"],"mappings":"AAAA;AACA;AACA,MAAMA,SAAS,GAAG,CAAE,iBAAiB,CAAE;AAEvC,OAAO,MAAMC,wBAAwB,GAAKC,SAAS,IAAM;EACxD,OAAO,CAAEF,SAAS,CAACG,QAAQ,CAAED,SAAU,CAAC;AACzC,CAAC;AAED,eAAeD,wBAAwB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["cog","styles","listView","__","TAB_SETTINGS","name","title","value","icon","className","TAB_STYLES","TAB_LIST_VIEW"],"sources":["@wordpress/block-editor/src/components/inspector-controls-tabs/utils.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { cog, styles, listView } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\n\nexport const TAB_SETTINGS = {\n\tname: 'settings',\n\ttitle: __( 'Settings' ),\n\tvalue: 'settings',\n\ticon: cog,\n\tclassName: 'block-editor-block-inspector__tab-item',\n};\n\nexport const TAB_STYLES = {\n\tname: 'styles',\n\ttitle: __( 'Styles' ),\n\tvalue: 'styles',\n\ticon: styles,\n\tclassName: 'block-editor-block-inspector__tab-item',\n};\n\nexport const TAB_LIST_VIEW = {\n\tname: 'list',\n\ttitle: __( 'List View' ),\n\tvalue: 'list-view',\n\ticon: listView,\n\tclassName: 'block-editor-block-inspector__tab-item',\n};\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,GAAG,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,kBAAkB;AACxD,SAASC,EAAE,QAAQ,iBAAiB;AAEpC,OAAO,MAAMC,YAAY,GAAG;EAC3BC,IAAI,EAAE,UAAU;EAChBC,KAAK,EAAEH,EAAE,CAAE,UAAW,CAAC;EACvBI,KAAK,EAAE,UAAU;EACjBC,IAAI,EAAER,GAAG;EACTS,SAAS,EAAE;AACZ,CAAC;AAED,OAAO,MAAMC,UAAU,GAAG;EACzBL,IAAI,EAAE,QAAQ;EACdC,KAAK,EAAEH,EAAE,CAAE,QAAS,CAAC;EACrBI,KAAK,EAAE,QAAQ;EACfC,IAAI,EAAEP,MAAM;EACZQ,SAAS,EAAE;AACZ,CAAC;AAED,OAAO,MAAME,aAAa,GAAG;EAC5BN,IAAI,EAAE,MAAM;EACZC,KAAK,EAAEH,EAAE,CAAE,WAAY,CAAC;EACxBI,KAAK,EAAE,WAAW;EAClBC,IAAI,EAAEN,QAAQ;EACdO,SAAS,EAAE;AACZ,CAAC"}
|
|
1
|
+
{"version":3,"names":["cog","styles","listView","__","TAB_SETTINGS","name","title","value","icon","className","TAB_STYLES","TAB_LIST_VIEW"],"sources":["@wordpress/block-editor/src/components/inspector-controls-tabs/utils.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { cog, styles, listView } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\n\nexport const TAB_SETTINGS = {\n\tname: 'settings',\n\ttitle: __( 'Settings' ),\n\tvalue: 'settings',\n\ticon: cog,\n\tclassName: 'block-editor-block-inspector__tab-item',\n};\n\nexport const TAB_STYLES = {\n\tname: 'styles',\n\ttitle: __( 'Styles' ),\n\tvalue: 'styles',\n\ticon: styles,\n\tclassName: 'block-editor-block-inspector__tab-item',\n};\n\nexport const TAB_LIST_VIEW = {\n\tname: 'list',\n\ttitle: __( 'List View' ),\n\tvalue: 'list-view',\n\ticon: listView,\n\tclassName: 'block-editor-block-inspector__tab-item',\n};\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,GAAG,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,kBAAkB;AACxD,SAASC,EAAE,QAAQ,iBAAiB;AAEpC,OAAO,MAAMC,YAAY,GAAG;EAC3BC,IAAI,EAAE,UAAU;EAChBC,KAAK,EAAEH,EAAE,CAAE,UAAW,CAAC;EACvBI,KAAK,EAAE,UAAU;EACjBC,IAAI,EAAER,GAAG;EACTS,SAAS,EAAE;AACZ,CAAC;AAED,OAAO,MAAMC,UAAU,GAAG;EACzBL,IAAI,EAAE,QAAQ;EACdC,KAAK,EAAEH,EAAE,CAAE,QAAS,CAAC;EACrBI,KAAK,EAAE,QAAQ;EACfC,IAAI,EAAEP,MAAM;EACZQ,SAAS,EAAE;AACZ,CAAC;AAED,OAAO,MAAME,aAAa,GAAG;EAC5BN,IAAI,EAAE,MAAM;EACZC,KAAK,EAAEH,EAAE,CAAE,WAAY,CAAC;EACxBI,KAAK,EAAE,WAAW;EAClBC,IAAI,EAAEN,QAAQ;EACdO,SAAS,EAAE;AACZ,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__experimentalVStack","VStack","__experimentalHStack","HStack","__experimentalHeading","Heading","__experimentalSpacer","Spacer","Button","__experimentalText","Text","closeSmall","__","InspectorPopoverHeader","title","help","actions","onClose","createElement","className","spacing","alignment","level","size","map","label","icon","onClick","key","variant"],"sources":["@wordpress/block-editor/src/components/inspector-popover-header/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalVStack as VStack,\n\t__experimentalHStack as HStack,\n\t__experimentalHeading as Heading,\n\t__experimentalSpacer as Spacer,\n\tButton,\n\t__experimentalText as Text,\n} from '@wordpress/components';\nimport { closeSmall } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\n\nexport default function InspectorPopoverHeader( {\n\ttitle,\n\thelp,\n\tactions = [],\n\tonClose,\n} ) {\n\treturn (\n\t\t<VStack className=\"block-editor-inspector-popover-header\" spacing={ 4 }>\n\t\t\t<HStack alignment=\"center\">\n\t\t\t\t<Heading\n\t\t\t\t\tclassName=\"block-editor-inspector-popover-header__heading\"\n\t\t\t\t\tlevel={ 2 }\n\t\t\t\t\tsize={ 13 }\n\t\t\t\t>\n\t\t\t\t\t{ title }\n\t\t\t\t</Heading>\n\t\t\t\t<Spacer />\n\t\t\t\t{ actions.map( ( { label, icon, onClick } ) => (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tkey={ label }\n\t\t\t\t\t\tclassName=\"block-editor-inspector-popover-header__action\"\n\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\tvariant={ ! icon && 'tertiary' }\n\t\t\t\t\t\tonClick={ onClick }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ ! icon && label }\n\t\t\t\t\t</Button>\n\t\t\t\t) ) }\n\t\t\t\t{ onClose && (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tclassName=\"block-editor-inspector-popover-header__action\"\n\t\t\t\t\t\tlabel={ __( 'Close' ) }\n\t\t\t\t\t\ticon={ closeSmall }\n\t\t\t\t\t\tonClick={ onClose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;IACnBgB,OAAO,EAAGV;EAAS,CACnB,CAEK,CAAC,EACPF,IAAI,IAAIG,aAAA,CAACR,IAAI,QAAGK,IAAY,CACvB,CAAC;AAEX"}
|
|
1
|
+
{"version":3,"names":["__experimentalVStack","VStack","__experimentalHStack","HStack","__experimentalHeading","Heading","__experimentalSpacer","Spacer","Button","__experimentalText","Text","closeSmall","__","InspectorPopoverHeader","title","help","actions","onClose","createElement","className","spacing","alignment","level","size","map","label","icon","onClick","key","variant"],"sources":["@wordpress/block-editor/src/components/inspector-popover-header/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalVStack as VStack,\n\t__experimentalHStack as HStack,\n\t__experimentalHeading as Heading,\n\t__experimentalSpacer as Spacer,\n\tButton,\n\t__experimentalText as Text,\n} from '@wordpress/components';\nimport { closeSmall } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\n\nexport default function InspectorPopoverHeader( {\n\ttitle,\n\thelp,\n\tactions = [],\n\tonClose,\n} ) {\n\treturn (\n\t\t<VStack className=\"block-editor-inspector-popover-header\" spacing={ 4 }>\n\t\t\t<HStack alignment=\"center\">\n\t\t\t\t<Heading\n\t\t\t\t\tclassName=\"block-editor-inspector-popover-header__heading\"\n\t\t\t\t\tlevel={ 2 }\n\t\t\t\t\tsize={ 13 }\n\t\t\t\t>\n\t\t\t\t\t{ title }\n\t\t\t\t</Heading>\n\t\t\t\t<Spacer />\n\t\t\t\t{ actions.map( ( { label, icon, onClick } ) => (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tkey={ label }\n\t\t\t\t\t\tclassName=\"block-editor-inspector-popover-header__action\"\n\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\tvariant={ ! icon && 'tertiary' }\n\t\t\t\t\t\tonClick={ onClick }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ ! icon && label }\n\t\t\t\t\t</Button>\n\t\t\t\t) ) }\n\t\t\t\t{ onClose && (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tclassName=\"block-editor-inspector-popover-header__action\"\n\t\t\t\t\t\tlabel={ __( 'Close' ) }\n\t\t\t\t\t\ticon={ closeSmall }\n\t\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</HStack>\n\t\t\t{ help && <Text>{ help }</Text> }\n\t\t</VStack>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,oBAAoB,IAAIC,MAAM,EAC9BC,oBAAoB,IAAIC,MAAM,EAC9BC,qBAAqB,IAAIC,OAAO,EAChCC,oBAAoB,IAAIC,MAAM,EAC9BC,MAAM,EACNC,kBAAkB,IAAIC,IAAI,QACpB,uBAAuB;AAC9B,SAASC,UAAU,QAAQ,kBAAkB;AAC7C,SAASC,EAAE,QAAQ,iBAAiB;AAEpC,eAAe,SAASC,sBAAsBA,CAAE;EAC/CC,KAAK;EACLC,IAAI;EACJC,OAAO,GAAG,EAAE;EACZC;AACD,CAAC,EAAG;EACH,OACCC,aAAA,CAACjB,MAAM;IAACkB,SAAS,EAAC,uCAAuC;IAACC,OAAO,EAAG;EAAG,GACtEF,aAAA,CAACf,MAAM;IAACkB,SAAS,EAAC;EAAQ,GACzBH,aAAA,CAACb,OAAO;IACPc,SAAS,EAAC,gDAAgD;IAC1DG,KAAK,EAAG,CAAG;IACXC,IAAI,EAAG;EAAI,GAETT,KACM,CAAC,EACVI,aAAA,CAACX,MAAM,MAAE,CAAC,EACRS,OAAO,CAACQ,GAAG,CAAE,CAAE;IAAEC,KAAK;IAAEC,IAAI;IAAEC;EAAQ,CAAC,KACxCT,aAAA,CAACV,MAAM;IACNoB,GAAG,EAAGH,KAAO;IACbN,SAAS,EAAC,+CAA+C;IACzDM,KAAK,EAAGA,KAAO;IACfC,IAAI,EAAGA,IAAM;IACbG,OAAO,EAAG,CAAEH,IAAI,IAAI,UAAY;IAChCC,OAAO,EAAGA;EAAS,GAEjB,CAAED,IAAI,IAAID,KACL,CACP,CAAC,EACDR,OAAO,IACRC,aAAA,CAACV,MAAM;IACNW,SAAS,EAAC,+CAA+C;IACzDM,KAAK,EAAGb,EAAE,CAAE,OAAQ,CAAG;IACvBc,IAAI,EAAGf,UAAY;IACnBgB,OAAO,EAAGV;EAAS,CACnB,CAEK,CAAC,EACPF,IAAI,IAAIG,aAAA,CAACR,IAAI,QAAGK,IAAY,CACvB,CAAC;AAEX","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["JustifyContentUI","JustifyContentControl","props","createElement","isToolbar","JustifyToolbar"],"sources":["@wordpress/block-editor/src/components/justify-content-control/index.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport JustifyContentUI from './ui';\n\nconst JustifyContentControl = ( props ) => {\n\treturn <JustifyContentUI { ...props } isToolbar={ false } />;\n};\n\nconst JustifyToolbar = ( props ) => {\n\treturn <JustifyContentUI { ...props } isToolbar />;\n};\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/justify-content-control/README.md\n */\nexport { JustifyContentControl, JustifyToolbar };\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,gBAAgB,MAAM,MAAM;AAEnC,MAAMC,qBAAqB,GAAKC,KAAK,IAAM;EAC1C,OAAOC,aAAA,CAACH,gBAAgB;IAAA,GAAME,KAAK;IAAGE,SAAS,EAAG;EAAO,CAAE,CAAC;AAC7D,CAAC;AAED,MAAMC,cAAc,GAAKH,KAAK,IAAM;EACnC,OAAOC,aAAA,CAACH,gBAAgB;IAAA,GAAME,KAAK;IAAGE,SAAS;EAAA,CAAE,CAAC;AACnD,CAAC;;AAED;AACA;AACA;AACA,SAASH,qBAAqB,EAAEI,cAAc"}
|
|
1
|
+
{"version":3,"names":["JustifyContentUI","JustifyContentControl","props","createElement","isToolbar","JustifyToolbar"],"sources":["@wordpress/block-editor/src/components/justify-content-control/index.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport JustifyContentUI from './ui';\n\nconst JustifyContentControl = ( props ) => {\n\treturn <JustifyContentUI { ...props } isToolbar={ false } />;\n};\n\nconst JustifyToolbar = ( props ) => {\n\treturn <JustifyContentUI { ...props } isToolbar />;\n};\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/justify-content-control/README.md\n */\nexport { JustifyContentControl, JustifyToolbar };\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,gBAAgB,MAAM,MAAM;AAEnC,MAAMC,qBAAqB,GAAKC,KAAK,IAAM;EAC1C,OAAOC,aAAA,CAACH,gBAAgB;IAAA,GAAME,KAAK;IAAGE,SAAS,EAAG;EAAO,CAAE,CAAC;AAC7D,CAAC;AAED,MAAMC,cAAc,GAAKH,KAAK,IAAM;EACnC,OAAOC,aAAA,CAACH,gBAAgB;IAAA,GAAME,KAAK;IAAGE,SAAS;EAAA,CAAE,CAAC;AACnD,CAAC;;AAED;AACA;AACA;AACA,SAASH,qBAAqB,EAAEI,cAAc","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ToolbarDropdownMenu","ToolbarGroup","justifyLeft","justifyCenter","justifyRight","justifySpaceBetween","justifyStretch","__","icons","left","center","right","stretch","JustifyContentUI","allowedControls","isCollapsed","onChange","value","popoverProps","isToolbar","handleClick","next","undefined","icon","allControls","name","title","isActive","onClick","UIComponent","extraProps","createElement","label","controls","filter","elem","includes"],"sources":["@wordpress/block-editor/src/components/justify-content-control/ui.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { ToolbarDropdownMenu, ToolbarGroup } from '@wordpress/components';\nimport {\n\tjustifyLeft,\n\tjustifyCenter,\n\tjustifyRight,\n\tjustifySpaceBetween,\n\tjustifyStretch,\n} from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\n\nconst icons = {\n\tleft: justifyLeft,\n\tcenter: justifyCenter,\n\tright: justifyRight,\n\t'space-between': justifySpaceBetween,\n\tstretch: justifyStretch,\n};\n\nfunction JustifyContentUI( {\n\tallowedControls = [ 'left', 'center', 'right', 'space-between' ],\n\tisCollapsed = true,\n\tonChange,\n\tvalue,\n\tpopoverProps,\n\tisToolbar,\n} ) {\n\t// If the control is already selected we want a click\n\t// again on the control to deselect the item, so we\n\t// call onChange( undefined )\n\tconst handleClick = ( next ) => {\n\t\tif ( next === value ) {\n\t\t\tonChange( undefined );\n\t\t} else {\n\t\t\tonChange( next );\n\t\t}\n\t};\n\n\tconst icon = value ? icons[ value ] : icons.left;\n\tconst allControls = [\n\t\t{\n\t\t\tname: 'left',\n\t\t\ticon: justifyLeft,\n\t\t\ttitle: __( 'Justify items left' ),\n\t\t\tisActive: 'left' === value,\n\t\t\tonClick: () => handleClick( 'left' ),\n\t\t},\n\t\t{\n\t\t\tname: 'center',\n\t\t\ticon: justifyCenter,\n\t\t\ttitle: __( 'Justify items center' ),\n\t\t\tisActive: 'center' === value,\n\t\t\tonClick: () => handleClick( 'center' ),\n\t\t},\n\t\t{\n\t\t\tname: 'right',\n\t\t\ticon: justifyRight,\n\t\t\ttitle: __( 'Justify items right' ),\n\t\t\tisActive: 'right' === value,\n\t\t\tonClick: () => handleClick( 'right' ),\n\t\t},\n\t\t{\n\t\t\tname: 'space-between',\n\t\t\ticon: justifySpaceBetween,\n\t\t\ttitle: __( 'Space between items' ),\n\t\t\tisActive: 'space-between' === value,\n\t\t\tonClick: () => handleClick( 'space-between' ),\n\t\t},\n\t\t{\n\t\t\tname: 'stretch',\n\t\t\ticon: justifyStretch,\n\t\t\ttitle: __( 'Stretch items' ),\n\t\t\tisActive: 'stretch' === value,\n\t\t\tonClick: () => handleClick( 'stretch' ),\n\t\t},\n\t];\n\n\tconst UIComponent = isToolbar ? ToolbarGroup : ToolbarDropdownMenu;\n\tconst extraProps = isToolbar ? { isCollapsed } : {};\n\n\treturn (\n\t\t<UIComponent\n\t\t\ticon={ icon }\n\t\t\tpopoverProps={ popoverProps }\n\t\t\tlabel={ __( 'Change items justification' ) }\n\t\t\tcontrols={ allControls.filter( ( elem ) =>\n\t\t\t\tallowedControls.includes( elem.name )\n\t\t\t) }\n\t\t\t{ ...extraProps }\n\t\t/>\n\t);\n}\n\nexport default JustifyContentUI;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,mBAAmB,EAAEC,YAAY,QAAQ,uBAAuB;AACzE,SACCC,WAAW,EACXC,aAAa,EACbC,YAAY,EACZC,mBAAmB,EACnBC,cAAc,QACR,kBAAkB;AACzB,SAASC,EAAE,QAAQ,iBAAiB;AAEpC,MAAMC,KAAK,GAAG;EACbC,IAAI,EAAEP,WAAW;EACjBQ,MAAM,EAAEP,aAAa;EACrBQ,KAAK,EAAEP,YAAY;EACnB,eAAe,EAAEC,mBAAmB;EACpCO,OAAO,EAAEN;AACV,CAAC;AAED,SAASO,gBAAgBA,CAAE;EAC1BC,eAAe,GAAG,CAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,eAAe,CAAE;EAChEC,WAAW,GAAG,IAAI;EAClBC,QAAQ;EACRC,KAAK;EACLC,YAAY;EACZC;AACD,CAAC,EAAG;EACH;EACA;EACA;EACA,MAAMC,WAAW,GAAKC,IAAI,IAAM;IAC/B,IAAKA,IAAI,KAAKJ,KAAK,EAAG;MACrBD,QAAQ,CAAEM,SAAU,CAAC;IACtB,CAAC,MAAM;MACNN,QAAQ,CAAEK,IAAK,CAAC;IACjB;EACD,CAAC;EAED,MAAME,IAAI,GAAGN,KAAK,GAAGT,KAAK,CAAES,KAAK,CAAE,GAAGT,KAAK,CAACC,IAAI;EAChD,MAAMe,WAAW,GAAG,CACnB;IACCC,IAAI,EAAE,MAAM;IACZF,IAAI,EAAErB,WAAW;IACjBwB,KAAK,EAAEnB,EAAE,CAAE,oBAAqB,CAAC;IACjCoB,QAAQ,EAAE,MAAM,KAAKV,KAAK;IAC1BW,OAAO,EAAEA,CAAA,KAAMR,WAAW,CAAE,MAAO;EACpC,CAAC,EACD;IACCK,IAAI,EAAE,QAAQ;IACdF,IAA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AAC;AAEJ;AAEA,eAAejB,gBAAgB"}
|
|
1
|
+
{"version":3,"names":["ToolbarDropdownMenu","ToolbarGroup","justifyLeft","justifyCenter","justifyRight","justifySpaceBetween","justifyStretch","__","icons","left","center","right","stretch","JustifyContentUI","allowedControls","isCollapsed","onChange","value","popoverProps","isToolbar","handleClick","next","undefined","icon","allControls","name","title","isActive","onClick","UIComponent","extraProps","createElement","label","controls","filter","elem","includes"],"sources":["@wordpress/block-editor/src/components/justify-content-control/ui.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { ToolbarDropdownMenu, ToolbarGroup } from '@wordpress/components';\nimport {\n\tjustifyLeft,\n\tjustifyCenter,\n\tjustifyRight,\n\tjustifySpaceBetween,\n\tjustifyStretch,\n} from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\n\nconst icons = {\n\tleft: justifyLeft,\n\tcenter: justifyCenter,\n\tright: justifyRight,\n\t'space-between': justifySpaceBetween,\n\tstretch: justifyStretch,\n};\n\nfunction JustifyContentUI( {\n\tallowedControls = [ 'left', 'center', 'right', 'space-between' ],\n\tisCollapsed = true,\n\tonChange,\n\tvalue,\n\tpopoverProps,\n\tisToolbar,\n} ) {\n\t// If the control is already selected we want a click\n\t// again on the control to deselect the item, so we\n\t// call onChange( undefined )\n\tconst handleClick = ( next ) => {\n\t\tif ( next === value ) {\n\t\t\tonChange( undefined );\n\t\t} else {\n\t\t\tonChange( next );\n\t\t}\n\t};\n\n\tconst icon = value ? icons[ value ] : icons.left;\n\tconst allControls = [\n\t\t{\n\t\t\tname: 'left',\n\t\t\ticon: justifyLeft,\n\t\t\ttitle: __( 'Justify items left' ),\n\t\t\tisActive: 'left' === value,\n\t\t\tonClick: () => handleClick( 'left' ),\n\t\t},\n\t\t{\n\t\t\tname: 'center',\n\t\t\ticon: justifyCenter,\n\t\t\ttitle: __( 'Justify items center' ),\n\t\t\tisActive: 'center' === value,\n\t\t\tonClick: () => handleClick( 'center' ),\n\t\t},\n\t\t{\n\t\t\tname: 'right',\n\t\t\ticon: justifyRight,\n\t\t\ttitle: __( 'Justify items right' ),\n\t\t\tisActive: 'right' === value,\n\t\t\tonClick: () => handleClick( 'right' ),\n\t\t},\n\t\t{\n\t\t\tname: 'space-between',\n\t\t\ticon: justifySpaceBetween,\n\t\t\ttitle: __( 'Space between items' ),\n\t\t\tisActive: 'space-between' === value,\n\t\t\tonClick: () => handleClick( 'space-between' ),\n\t\t},\n\t\t{\n\t\t\tname: 'stretch',\n\t\t\ticon: justifyStretch,\n\t\t\ttitle: __( 'Stretch items' ),\n\t\t\tisActive: 'stretch' === value,\n\t\t\tonClick: () => handleClick( 'stretch' ),\n\t\t},\n\t];\n\n\tconst UIComponent = isToolbar ? ToolbarGroup : ToolbarDropdownMenu;\n\tconst extraProps = isToolbar ? { isCollapsed } : {};\n\n\treturn (\n\t\t<UIComponent\n\t\t\ticon={ icon }\n\t\t\tpopoverProps={ popoverProps }\n\t\t\tlabel={ __( 'Change items justification' ) }\n\t\t\tcontrols={ allControls.filter( ( elem ) =>\n\t\t\t\tallowedControls.includes( elem.name )\n\t\t\t) }\n\t\t\t{ ...extraProps }\n\t\t/>\n\t);\n}\n\nexport default JustifyContentUI;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,mBAAmB,EAAEC,YAAY,QAAQ,uBAAuB;AACzE,SACCC,WAAW,EACXC,aAAa,EACbC,YAAY,EACZC,mBAAmB,EACnBC,cAAc,QACR,kBAAkB;AACzB,SAASC,EAAE,QAAQ,iBAAiB;AAEpC,MAAMC,KAAK,GAAG;EACbC,IAAI,EAAEP,WAAW;EACjBQ,MAAM,EAAEP,aAAa;EACrBQ,KAAK,EAAEP,YAAY;EACnB,eAAe,EAAEC,mBAAmB;EACpCO,OAAO,EAAEN;AACV,CAAC;AAED,SAASO,gBAAgBA,CAAE;EAC1BC,eAAe,GAAG,CAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,eAAe,CAAE;EAChEC,WAAW,GAAG,IAAI;EAClBC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,SAAS;IACfF,IAAI,EAAEjB,cAAc;IACpBoB,KAAK,EAAEnB,EAAE,CAAE,eAAgB,CAAC;IAC5BoB,QAAQ,EAAE,SAAS,KAAKV,KAAK;IAC7BW,OAAO,EAAEA,CAAA,KAAMR,WAAW,CAAE,SAAU;EACvC,CAAC,CACD;EAED,MAAMS,WAAW,GAAGV,SAAS,GAAGlB,YAAY,GAAGD,mBAAmB;EAClE,MAAM8B,UAAU,GAAGX,SAAS,GAAG;IAAEJ;EAAY,CAAC,GAAG,CAAC,CAAC;EAEnD,OACCgB,aAAA,CAACF,WAAW;IACXN,IAAI,EAAGA,IAAM;IACbL,YAAY,EAAGA,YAAc;IAC7Bc,KAAK,EAAGzB,EAAE,CAAE,4BAA6B,CAAG;IAC5C0B,QAAQ,EAAGT,WAAW,CAACU,MAAM,CAAIC,IAAI,IACpCrB,eAAe,CAACsB,QAAQ,CAAED,IAAI,CAACV,IAAK,CACrC,CAAG;IAAA,GACEK;EAAU,CACf,CAAC;AAEJ;AAEA,eAAejB,gBAAgB","ignoreList":[]}
|
|
@@ -114,6 +114,17 @@ function KeyboardShortcutsRegister() {
|
|
|
114
114
|
character: 'y'
|
|
115
115
|
}
|
|
116
116
|
});
|
|
117
|
+
|
|
118
|
+
// List view shortcuts.
|
|
119
|
+
registerShortcut({
|
|
120
|
+
name: 'core/block-editor/collapse-list-view',
|
|
121
|
+
category: 'list-view',
|
|
122
|
+
description: __('Collapse all other items.'),
|
|
123
|
+
keyCombination: {
|
|
124
|
+
modifier: 'alt',
|
|
125
|
+
character: 'l'
|
|
126
|
+
}
|
|
127
|
+
});
|
|
117
128
|
}, [registerShortcut]);
|
|
118
129
|
return null;
|
|
119
130
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useEffect","useDispatch","store","keyboardShortcutsStore","__","KeyboardShortcuts","KeyboardShortcutsRegister","registerShortcut","name","category","description","keyCombination","modifier","character","aliases","Register"],"sources":["@wordpress/block-editor/src/components/keyboard-shortcuts/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport { useDispatch } from '@wordpress/data';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { __ } from '@wordpress/i18n';\n\nfunction KeyboardShortcuts() {\n\treturn null;\n}\n\nfunction KeyboardShortcutsRegister() {\n\t// Registering the shortcuts.\n\tconst { registerShortcut } = useDispatch( keyboardShortcutsStore );\n\tuseEffect( () => {\n\t\tregisterShortcut( {\n\t\t\tname: 'core/block-editor/duplicate',\n\t\t\tcategory: 'block',\n\t\t\tdescription: __( 'Duplicate the selected block(s).' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primaryShift',\n\t\t\t\tcharacter: 'd',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/block-editor/remove',\n\t\t\tcategory: 'block',\n\t\t\tdescription: __( 'Remove the selected block(s).' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'access',\n\t\t\t\tcharacter: 'z',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/block-editor/insert-before',\n\t\t\tcategory: 'block',\n\t\t\tdescription: __(\n\t\t\t\t'Insert a new block before the selected block(s).'\n\t\t\t),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primaryAlt',\n\t\t\t\tcharacter: 't',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/block-editor/insert-after',\n\t\t\tcategory: 'block',\n\t\t\tdescription: __(\n\t\t\t\t'Insert a new block after the selected block(s).'\n\t\t\t),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primaryAlt',\n\t\t\t\tcharacter: 'y',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/block-editor/delete-multi-selection',\n\t\t\tcategory: 'block',\n\t\t\tdescription: __( 'Delete selection.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tcharacter: 'del',\n\t\t\t},\n\t\t\taliases: [\n\t\t\t\t{\n\t\t\t\t\tcharacter: 'backspace',\n\t\t\t\t},\n\t\t\t],\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/block-editor/select-all',\n\t\t\tcategory: 'selection',\n\t\t\tdescription: __(\n\t\t\t\t'Select all text when typing. Press again to select all blocks.'\n\t\t\t),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primary',\n\t\t\t\tcharacter: 'a',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/block-editor/unselect',\n\t\t\tcategory: 'selection',\n\t\t\tdescription: __( 'Clear selection.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tcharacter: 'escape',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/block-editor/multi-text-selection',\n\t\t\tcategory: 'selection',\n\t\t\tdescription: __( 'Select text across multiple blocks.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'shift',\n\t\t\t\tcharacter: 'arrow',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/block-editor/focus-toolbar',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Navigate to the nearest toolbar.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'alt',\n\t\t\t\tcharacter: 'F10',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/block-editor/move-up',\n\t\t\tcategory: 'block',\n\t\t\tdescription: __( 'Move the selected block(s) up.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'secondary',\n\t\t\t\tcharacter: 't',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/block-editor/move-down',\n\t\t\tcategory: 'block',\n\t\t\tdescription: __( 'Move the selected block(s) down.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'secondary',\n\t\t\t\tcharacter: 'y',\n\t\t\t},\n\t\t} );\n\t}, [ registerShortcut ] );\n\n\treturn null;\n}\n\nKeyboardShortcuts.Register = KeyboardShortcutsRegister;\n\nexport default KeyboardShortcuts;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,oBAAoB;AAC9C,SAASC,WAAW,QAAQ,iBAAiB;AAC7C,SAASC,KAAK,IAAIC,sBAAsB,QAAQ,+BAA+B;AAC/E,SAASC,EAAE,QAAQ,iBAAiB;AAEpC,SAASC,iBAAiBA,CAAA,EAAG;EAC5B,OAAO,IAAI;AACZ;AAEA,SAASC,yBAAyBA,CAAA,EAAG;EACpC;EACA,MAAM;IAAEC;EAAiB,CAAC,GAAGN,WAAW,CAAEE,sBAAuB,CAAC;EAClEH,SAAS,CAAE,MAAM;IAChBO,gBAAgB,CAAE;MACjBC,IAAI,EAAE,6BAA6B;MACnCC,QAAQ,EAAE,OAAO;MACjBC,WAAW,EAAEN,EAAE,CAAE,kCAAmC,CAAC;MACrDO,cAAc,EAAE;QACfC,QAAQ,EAAE,cAAc;QACxBC,SAAS,EAAE;MACZ;IACD,CAAE,CAAC;IAEHN,gBAAgB,CAAE;MACjBC,IAAI,EAAE,0BAA0B;MAChCC,QAAQ,EAAE,OAAO;MACjBC,WAAW,EAAEN,EAAE,CAAE,+BAAgC,CAAC;MAClDO,cAAc,EAAE;QACfC,QAAQ,EAAE,QAAQ;QAClBC,SAAS,EAAE;MACZ;IACD,CAAE,CAAC;IAEHN,gBAAgB,CAAE;MACjBC,IAAI,EAAE,iCAAiC;MACvCC,QAAQ,EAAE,OAAO;MACjBC,WAAW,EAAEN,EAAE,CACd,kDACD,CAAC;MACDO,cAAc,EAAE;QACfC,QAAQ,EAAE,YAAY;QACtBC,SAAS,EAAE;MACZ;IACD,CAAE,CAAC;IAEHN,gBAAgB,CAAE;MACjBC,IAAI,EAAE,gCAAgC;MACtCC,QAAQ,EAAE,OAAO;MACjBC,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Q,EAAE,OAAO;MACjBC,WAAW,EAAEN,EAAE,CAAE,gCAAiC,CAAC;MACnDO,cAAc,EAAE;QACfC,QAAQ,EAAE,WAAW;QACrBC,SAAS,EAAE;MACZ;IACD,CAAE,CAAC;IAEHN,gBAAgB,CAAE;MACjBC,IAAI,EAAE,6BAA6B;MACnCC,QAAQ,EAAE,OAAO;MACjBC,WAAW,EAAEN,EAAE,CAAE,kCAAmC,CAAC;MACrDO,cAAc,EAAE;QACfC,QAAQ,EAAE,WAAW;QACrBC,SAAS,EAAE;MACZ;IACD,CAAE,CAAC;EACJ,CAAC,EAAE,CAAEN,gBAAgB,CAAG,CAAC;EAEzB,OAAO,IAAI;AACZ;AAEAF,iBAAiB,CAACU,QAAQ,GAAGT,yBAAyB;AAEtD,eAAeD,iBAAiB"}
|
|
1
|
+
{"version":3,"names":["useEffect","useDispatch","store","keyboardShortcutsStore","__","KeyboardShortcuts","KeyboardShortcutsRegister","registerShortcut","name","category","description","keyCombination","modifier","character","aliases","Register"],"sources":["@wordpress/block-editor/src/components/keyboard-shortcuts/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport { useDispatch } from '@wordpress/data';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { __ } from '@wordpress/i18n';\n\nfunction KeyboardShortcuts() {\n\treturn null;\n}\n\nfunction KeyboardShortcutsRegister() {\n\t// Registering the shortcuts.\n\tconst { registerShortcut } = useDispatch( keyboardShortcutsStore );\n\tuseEffect( () => {\n\t\tregisterShortcut( {\n\t\t\tname: 'core/block-editor/duplicate',\n\t\t\tcategory: 'block',\n\t\t\tdescription: __( 'Duplicate the selected block(s).' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primaryShift',\n\t\t\t\tcharacter: 'd',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/block-editor/remove',\n\t\t\tcategory: 'block',\n\t\t\tdescription: __( 'Remove the selected block(s).' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'access',\n\t\t\t\tcharacter: 'z',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/block-editor/insert-before',\n\t\t\tcategory: 'block',\n\t\t\tdescription: __(\n\t\t\t\t'Insert a new block before the selected block(s).'\n\t\t\t),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primaryAlt',\n\t\t\t\tcharacter: 't',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/block-editor/insert-after',\n\t\t\tcategory: 'block',\n\t\t\tdescription: __(\n\t\t\t\t'Insert a new block after the selected block(s).'\n\t\t\t),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primaryAlt',\n\t\t\t\tcharacter: 'y',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/block-editor/delete-multi-selection',\n\t\t\tcategory: 'block',\n\t\t\tdescription: __( 'Delete selection.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tcharacter: 'del',\n\t\t\t},\n\t\t\taliases: [\n\t\t\t\t{\n\t\t\t\t\tcharacter: 'backspace',\n\t\t\t\t},\n\t\t\t],\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/block-editor/select-all',\n\t\t\tcategory: 'selection',\n\t\t\tdescription: __(\n\t\t\t\t'Select all text when typing. Press again to select all blocks.'\n\t\t\t),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primary',\n\t\t\t\tcharacter: 'a',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/block-editor/unselect',\n\t\t\tcategory: 'selection',\n\t\t\tdescription: __( 'Clear selection.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tcharacter: 'escape',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/block-editor/multi-text-selection',\n\t\t\tcategory: 'selection',\n\t\t\tdescription: __( 'Select text across multiple blocks.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'shift',\n\t\t\t\tcharacter: 'arrow',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/block-editor/focus-toolbar',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Navigate to the nearest toolbar.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'alt',\n\t\t\t\tcharacter: 'F10',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/block-editor/move-up',\n\t\t\tcategory: 'block',\n\t\t\tdescription: __( 'Move the selected block(s) up.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'secondary',\n\t\t\t\tcharacter: 't',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/block-editor/move-down',\n\t\t\tcategory: 'block',\n\t\t\tdescription: __( 'Move the selected block(s) down.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'secondary',\n\t\t\t\tcharacter: 'y',\n\t\t\t},\n\t\t} );\n\n\t\t// List view shortcuts.\n\t\tregisterShortcut( {\n\t\t\tname: 'core/block-editor/collapse-list-view',\n\t\t\tcategory: 'list-view',\n\t\t\tdescription: __( 'Collapse all other items.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'alt',\n\t\t\t\tcharacter: 'l',\n\t\t\t},\n\t\t} );\n\t}, [ registerShortcut ] );\n\n\treturn null;\n}\n\nKeyboardShortcuts.Register = KeyboardShortcutsRegister;\n\nexport default KeyboardShortcuts;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,oBAAoB;AAC9C,SAASC,WAAW,QAAQ,iBAAiB;AAC7C,SAASC,KAAK,IAAIC,sBAAsB,QAAQ,+BAA+B;AAC/E,SAASC,EAAE,QAAQ,iBAAiB;AAEpC,SAASC,iBAAiBA,CAAA,E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H;IACAN,gBAAgB,CAAE;MACjBC,IAAI,EAAE,sCAAsC;MAC5CC,QAAQ,EAAE,WAAW;MACrBC,WAAW,EAAEN,EAAE,CAAE,2BAA4B,CAAC;MAC9CO,cAAc,EAAE;QACfC,QAAQ,EAAE,KAAK;QACfC,SAAS,EAAE;MACZ;IACD,CAAE,CAAC;EACJ,CAAC,EAAE,CAAEN,gBAAgB,CAAG,CAAC;EAEzB,OAAO,IAAI;AACZ;AAEAF,iBAAiB,CAACU,QAAQ,GAAGT,yBAAyB;AAEtD,eAAeD,iBAAiB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__experimentalUnitControl","UnitControl","__experimentalUseCustomUnits","useCustomUnits","__","useSettings","LetterSpacingControl","value","onChange","__unstableInputWidth","otherProps","availableUnits","units","defaultValues","px","em","rem","createElement","label"],"sources":["@wordpress/block-editor/src/components/letter-spacing-control/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalUnitControl as UnitControl,\n\t__experimentalUseCustomUnits as useCustomUnits,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { useSettings } from '../../components/use-settings';\n\n/**\n * Control for letter-spacing.\n *\n * @param {Object} props Component props.\n * @param {string} props.value Currently selected letter-spacing.\n * @param {Function} props.onChange Handles change in letter-spacing selection.\n * @param {string|number|undefined} props.__unstableInputWidth Input width to pass through to inner UnitControl. Should be a valid CSS value.\n *\n * @return {Element} Letter-spacing control.\n */\nexport default function LetterSpacingControl( {\n\tvalue,\n\tonChange,\n\t__unstableInputWidth = '60px',\n\t...otherProps\n} ) {\n\tconst [ availableUnits ] = useSettings( 'spacing.units' );\n\tconst units = useCustomUnits( {\n\t\tavailableUnits: availableUnits || [ 'px', 'em', 'rem' ],\n\t\tdefaultValues: { px: 2, em: 0.2, rem: 0.2 },\n\t} );\n\treturn (\n\t\t<UnitControl\n\t\t\t{ ...otherProps }\n\t\t\tlabel={ __( 'Letter spacing' ) }\n\t\t\tvalue={ value }\n\t\t\t__unstableInputWidth={ __unstableInputWidth }\n\t\t\tunits={ units }\n\t\t\tonChange={ onChange }\n\t\t/>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,yBAAyB,IAAIC,WAAW,EACxCC,4BAA4B,IAAIC,cAAc,QACxC,uBAAuB;AAC9B,SAASC,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,SAASC,WAAW,QAAQ,+BAA+B;;AAE3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,oBAAoBA,CAAE;EAC7CC,KAAK;EACLC,QAAQ;EACRC,oBAAoB,GAAG,MAAM;EAC7B,GAAGC;AACJ,CAAC,EAAG;EACH,MAAM,CAAEC,cAAc,CAAE,GAAGN,WAAW,CAAE,eAAgB,CAAC;EACzD,MAAMO,KAAK,GAAGT,cAAc,CAAE;IAC7BQ,cAAc,EAAEA,cAAc,IAAI,CAAE,IAAI,EAAE,IAAI,EAAE,KAAK,CAAE;IACvDE,aAAa,EAAE;MAAEC,EAAE,EAAE,CAAC;MAAEC,EAAE,EAAE,GAAG;MAAEC,GAAG,EAAE;IAAI;EAC3C,CAAE,CAAC;EACH,OACCC,aAAA,CAAChB,WAAW;IAAA,GACNS,UAAU;IACfQ,KAAK,EAAGd,EAAE,CAAE,gBAAiB,CAAG;IAChCG,KAAK,EAAGA,KAAO;IACfE,oBAAoB,EAAGA,oBAAsB;IAC7CG,KAAK,EAAGA,KAAO;IACfJ,QAAQ,EAAGA;EAAU,CACrB,CAAC;AAEJ"}
|
|
1
|
+
{"version":3,"names":["__experimentalUnitControl","UnitControl","__experimentalUseCustomUnits","useCustomUnits","__","useSettings","LetterSpacingControl","value","onChange","__unstableInputWidth","otherProps","availableUnits","units","defaultValues","px","em","rem","createElement","label"],"sources":["@wordpress/block-editor/src/components/letter-spacing-control/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalUnitControl as UnitControl,\n\t__experimentalUseCustomUnits as useCustomUnits,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { useSettings } from '../../components/use-settings';\n\n/**\n * Control for letter-spacing.\n *\n * @param {Object} props Component props.\n * @param {string} props.value Currently selected letter-spacing.\n * @param {Function} props.onChange Handles change in letter-spacing selection.\n * @param {string|number|undefined} props.__unstableInputWidth Input width to pass through to inner UnitControl. Should be a valid CSS value.\n *\n * @return {Element} Letter-spacing control.\n */\nexport default function LetterSpacingControl( {\n\tvalue,\n\tonChange,\n\t__unstableInputWidth = '60px',\n\t...otherProps\n} ) {\n\tconst [ availableUnits ] = useSettings( 'spacing.units' );\n\tconst units = useCustomUnits( {\n\t\tavailableUnits: availableUnits || [ 'px', 'em', 'rem' ],\n\t\tdefaultValues: { px: 2, em: 0.2, rem: 0.2 },\n\t} );\n\treturn (\n\t\t<UnitControl\n\t\t\t{ ...otherProps }\n\t\t\tlabel={ __( 'Letter spacing' ) }\n\t\t\tvalue={ value }\n\t\t\t__unstableInputWidth={ __unstableInputWidth }\n\t\t\tunits={ units }\n\t\t\tonChange={ onChange }\n\t\t/>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,yBAAyB,IAAIC,WAAW,EACxCC,4BAA4B,IAAIC,cAAc,QACxC,uBAAuB;AAC9B,SAASC,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,SAASC,WAAW,QAAQ,+BAA+B;;AAE3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,oBAAoBA,CAAE;EAC7CC,KAAK;EACLC,QAAQ;EACRC,oBAAoB,GAAG,MAAM;EAC7B,GAAGC;AACJ,CAAC,EAAG;EACH,MAAM,CAAEC,cAAc,CAAE,GAAGN,WAAW,CAAE,eAAgB,CAAC;EACzD,MAAMO,KAAK,GAAGT,cAAc,CAAE;IAC7BQ,cAAc,EAAEA,cAAc,IAAI,CAAE,IAAI,EAAE,IAAI,EAAE,KAAK,CAAE;IACvDE,aAAa,EAAE;MAAEC,EAAE,EAAE,CAAC;MAAEC,EAAE,EAAE,GAAG;MAAEC,GAAG,EAAE;IAAI;EAC3C,CAAE,CAAC;EACH,OACCC,aAAA,CAAChB,WAAW;IAAA,GACNS,UAAU;IACfQ,KAAK,EAAGd,EAAE,CAAE,gBAAiB,CAAG;IAChCG,KAAK,EAAGA,KAAO;IACfE,oBAAoB,EAAGA,oBAAsB;IAC7CG,KAAK,EAAGA,KAAO;IACfJ,QAAQ,EAAGA;EAAU,CACrB,CAAC;AAEJ","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["deprecated","__","__experimentalNumberControl","NumberControl","BASE_DEFAULT_VALUE","RESET_VALUE","STEP","SPIN_FACTOR","isLineHeightDefined","LineHeightControl","value","lineHeight","onChange","__nextHasNoMarginBottom","__unstableInputWidth","otherProps","isDefined","adjustNextValue","nextValue","wasTypedOrPasted","spin","stateReducer","state","action","includes","payload","event","nativeEvent","inputType","since","version","hint","deprecatedStyles","undefined","marginBottom","handleOnChange","type","createElement","className","style","__unstableStateReducer","label","placeholder","step","spinFactor","min","spinControls"],"sources":["@wordpress/block-editor/src/components/line-height-control/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { __ } from '@wordpress/i18n';\nimport { __experimentalNumberControl as NumberControl } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport {\n\tBASE_DEFAULT_VALUE,\n\tRESET_VALUE,\n\tSTEP,\n\tSPIN_FACTOR,\n\tisLineHeightDefined,\n} from './utils';\n\nconst LineHeightControl = ( {\n\tvalue: lineHeight,\n\tonChange,\n\t/** Start opting into the new margin-free styles that will become the default in a future version. */\n\t__nextHasNoMarginBottom = false,\n\t__unstableInputWidth = '60px',\n\t...otherProps\n} ) => {\n\tconst isDefined = isLineHeightDefined( lineHeight );\n\n\tconst adjustNextValue = ( nextValue, wasTypedOrPasted ) => {\n\t\t// Set the next value without modification if lineHeight has been defined.\n\t\tif ( isDefined ) return nextValue;\n\n\t\t/**\n\t\t * The following logic handles the initial spin up/down action\n\t\t * (from an undefined value state) so that the next values are better suited for\n\t\t * line-height rendering. For example, the first spin up should immediately\n\t\t * go to 1.6, rather than the normally expected 0.1.\n\t\t *\n\t\t * Spin up/down actions can be triggered by keydowns of the up/down arrow keys,\n\t\t * dragging the input or by clicking the spin buttons.\n\t\t */\n\t\tconst spin = STEP * SPIN_FACTOR;\n\t\tswitch ( `${ nextValue }` ) {\n\t\t\tcase `${ spin }`:\n\t\t\t\t// Increment by spin value.\n\t\t\t\treturn BASE_DEFAULT_VALUE + spin;\n\t\t\tcase '0': {\n\t\t\t\t// This means the user explicitly input '0', rather than using the\n\t\t\t\t// spin down action from an undefined value state.\n\t\t\t\tif ( wasTypedOrPasted ) return nextValue;\n\t\t\t\t// Decrement by spin value.\n\t\t\t\treturn BASE_DEFAULT_VALUE - spin;\n\t\t\t}\n\t\t\tcase '':\n\t\t\t\treturn BASE_DEFAULT_VALUE;\n\t\t\tdefault:\n\t\t\t\treturn nextValue;\n\t\t}\n\t};\n\n\tconst stateReducer = ( state, action ) => {\n\t\t// Be careful when changing this — cross-browser behavior of the\n\t\t// `inputType` field in `input` events are inconsistent.\n\t\t// For example, Firefox emits an input event with inputType=\"insertReplacementText\"\n\t\t// on spin button clicks, while other browsers do not even emit an input event.\n\t\tconst wasTypedOrPasted = [ 'insertText', 'insertFromPaste' ].includes(\n\t\t\taction.payload.event.nativeEvent?.inputType\n\t\t);\n\t\tconst value = adjustNextValue( state.value, wasTypedOrPasted );\n\t\treturn { ...state, value };\n\t};\n\n\tconst value = isDefined ? lineHeight : RESET_VALUE;\n\n\tif ( ! __nextHasNoMarginBottom ) {\n\t\tdeprecated(\n\t\t\t'Bottom margin styles for wp.blockEditor.LineHeightControl',\n\t\t\t{\n\t\t\t\tsince: '6.0',\n\t\t\t\tversion: '6.4',\n\t\t\t\thint: 'Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version',\n\t\t\t}\n\t\t);\n\t}\n\tconst deprecatedStyles = __nextHasNoMarginBottom\n\t\t? undefined\n\t\t: { marginBottom: 24 };\n\n\tconst handleOnChange = ( nextValue, { event } ) => {\n\t\tif ( nextValue === '' ) {\n\t\t\tonChange();\n\t\t\treturn;\n\t\t}\n\n\t\tif ( event.type === 'click' ) {\n\t\t\tonChange( adjustNextValue( `${ nextValue }`, false ) );\n\t\t\treturn;\n\t\t}\n\n\t\tonChange( `${ nextValue }` );\n\t};\n\n\treturn (\n\t\t<div\n\t\t\tclassName=\"block-editor-line-height-control\"\n\t\t\tstyle={ deprecatedStyles }\n\t\t>\n\t\t\t<NumberControl\n\t\t\t\t{ ...otherProps }\n\t\t\t\t__unstableInputWidth={ __unstableInputWidth }\n\t\t\t\t__unstableStateReducer={ stateReducer }\n\t\t\t\tonChange={ handleOnChange }\n\t\t\t\tlabel={ __( 'Line height' ) }\n\t\t\t\tplaceholder={ BASE_DEFAULT_VALUE }\n\t\t\t\tstep={ STEP }\n\t\t\t\tspinFactor={ SPIN_FACTOR }\n\t\t\t\tvalue={ value }\n\t\t\t\tmin={ 0 }\n\t\t\t\tspinControls=\"custom\"\n\t\t\t/>\n\t\t</div>\n\t);\n};\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/line-height-control/README.md\n */\nexport default LineHeightControl;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,uBAAuB;AAC9C,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,2BAA2B,IAAIC,aAAa,QAAQ,uBAAuB;;AAEpF;AACA;AACA;AACA,SACCC,kBAAkB,EAClBC,WAAW,EACXC,IAAI,EACJC,WAAW,EACXC,mBAAmB,QACb,SAAS;AAEhB,MAAMC,iBAAiB,GAAGA,CAAE;EAC3BC,KAAK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AE;IACP,CACD,CAAC;EACF;EACA,MAAMC,gBAAgB,GAAGnB,uBAAuB,GAC7CoB,SAAS,GACT;IAAEC,YAAY,EAAE;EAAG,CAAC;EAEvB,MAAMC,cAAc,GAAGA,CAAEjB,SAAS,EAAE;IAAEQ;EAAM,CAAC,KAAM;IAClD,IAAKR,SAAS,KAAK,EAAE,EAAG;MACvBN,QAAQ,CAAC,CAAC;MACV;IACD;IAEA,IAAKc,KAAK,CAACU,IAAI,KAAK,OAAO,EAAG;MAC7BxB,QAAQ,CAAEK,eAAe,CAAG,GAAGC,SAAW,EAAC,EAAE,KAAM,CAAE,CAAC;MACtD;IACD;IAEAN,QAAQ,CAAG,GAAGM,SAAW,EAAE,CAAC;EAC7B,CAAC;EAED,OACCmB,aAAA;IACCC,SAAS,EAAC,kCAAkC;IAC5CC,KAAK,EAAGP;EAAkB,GAE1BK,aAAA,CAAClC,aAAa;IAAA,GACRY,UAAU;IACfD,oBAAoB,EAAGA,oBAAsB;IAC7C0B,sBAAsB,EAAGnB,YAAc;IACvCT,QAAQ,EAAGuB,cAAgB;IAC3BM,KAAK,EAAGxC,EAAE,CAAE,aAAc,CAAG;IAC7ByC,WAAW,EAAGtC,kBAAoB;IAClCuC,IAAI,EAAGrC,IAAM;IACbsC,UAAU,EAAGrC,WAAa;IAC1BG,KAAK,EAAGA,KAAO;IACfmC,GAAG,EAAG,CAAG;IACTC,YAAY,EAAC;EAAQ,CACrB,CACG,CAAC;AAER,CAAC;;AAED;AACA;AACA;AACA,eAAerC,iBAAiB"}
|
|
1
|
+
{"version":3,"names":["deprecated","__","__experimentalNumberControl","NumberControl","BASE_DEFAULT_VALUE","RESET_VALUE","STEP","SPIN_FACTOR","isLineHeightDefined","LineHeightControl","value","lineHeight","onChange","__nextHasNoMarginBottom","__unstableInputWidth","otherProps","isDefined","adjustNextValue","nextValue","wasTypedOrPasted","spin","stateReducer","state","action","includes","payload","event","nativeEvent","inputType","since","version","hint","deprecatedStyles","undefined","marginBottom","handleOnChange","type","createElement","className","style","__unstableStateReducer","label","placeholder","step","spinFactor","min","spinControls"],"sources":["@wordpress/block-editor/src/components/line-height-control/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { __ } from '@wordpress/i18n';\nimport { __experimentalNumberControl as NumberControl } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport {\n\tBASE_DEFAULT_VALUE,\n\tRESET_VALUE,\n\tSTEP,\n\tSPIN_FACTOR,\n\tisLineHeightDefined,\n} from './utils';\n\nconst LineHeightControl = ( {\n\tvalue: lineHeight,\n\tonChange,\n\t/** Start opting into the new margin-free styles that will become the default in a future version. */\n\t__nextHasNoMarginBottom = false,\n\t__unstableInputWidth = '60px',\n\t...otherProps\n} ) => {\n\tconst isDefined = isLineHeightDefined( lineHeight );\n\n\tconst adjustNextValue = ( nextValue, wasTypedOrPasted ) => {\n\t\t// Set the next value without modification if lineHeight has been defined.\n\t\tif ( isDefined ) return nextValue;\n\n\t\t/**\n\t\t * The following logic handles the initial spin up/down action\n\t\t * (from an undefined value state) so that the next values are better suited for\n\t\t * line-height rendering. For example, the first spin up should immediately\n\t\t * go to 1.6, rather than the normally expected 0.1.\n\t\t *\n\t\t * Spin up/down actions can be triggered by keydowns of the up/down arrow keys,\n\t\t * dragging the input or by clicking the spin buttons.\n\t\t */\n\t\tconst spin = STEP * SPIN_FACTOR;\n\t\tswitch ( `${ nextValue }` ) {\n\t\t\tcase `${ spin }`:\n\t\t\t\t// Increment by spin value.\n\t\t\t\treturn BASE_DEFAULT_VALUE + spin;\n\t\t\tcase '0': {\n\t\t\t\t// This means the user explicitly input '0', rather than using the\n\t\t\t\t// spin down action from an undefined value state.\n\t\t\t\tif ( wasTypedOrPasted ) return nextValue;\n\t\t\t\t// Decrement by spin value.\n\t\t\t\treturn BASE_DEFAULT_VALUE - spin;\n\t\t\t}\n\t\t\tcase '':\n\t\t\t\treturn BASE_DEFAULT_VALUE;\n\t\t\tdefault:\n\t\t\t\treturn nextValue;\n\t\t}\n\t};\n\n\tconst stateReducer = ( state, action ) => {\n\t\t// Be careful when changing this — cross-browser behavior of the\n\t\t// `inputType` field in `input` events are inconsistent.\n\t\t// For example, Firefox emits an input event with inputType=\"insertReplacementText\"\n\t\t// on spin button clicks, while other browsers do not even emit an input event.\n\t\tconst wasTypedOrPasted = [ 'insertText', 'insertFromPaste' ].includes(\n\t\t\taction.payload.event.nativeEvent?.inputType\n\t\t);\n\t\tconst value = adjustNextValue( state.value, wasTypedOrPasted );\n\t\treturn { ...state, value };\n\t};\n\n\tconst value = isDefined ? lineHeight : RESET_VALUE;\n\n\tif ( ! __nextHasNoMarginBottom ) {\n\t\tdeprecated(\n\t\t\t'Bottom margin styles for wp.blockEditor.LineHeightControl',\n\t\t\t{\n\t\t\t\tsince: '6.0',\n\t\t\t\tversion: '6.4',\n\t\t\t\thint: 'Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version',\n\t\t\t}\n\t\t);\n\t}\n\tconst deprecatedStyles = __nextHasNoMarginBottom\n\t\t? undefined\n\t\t: { marginBottom: 24 };\n\n\tconst handleOnChange = ( nextValue, { event } ) => {\n\t\tif ( nextValue === '' ) {\n\t\t\tonChange();\n\t\t\treturn;\n\t\t}\n\n\t\tif ( event.type === 'click' ) {\n\t\t\tonChange( adjustNextValue( `${ nextValue }`, false ) );\n\t\t\treturn;\n\t\t}\n\n\t\tonChange( `${ nextValue }` );\n\t};\n\n\treturn (\n\t\t<div\n\t\t\tclassName=\"block-editor-line-height-control\"\n\t\t\tstyle={ deprecatedStyles }\n\t\t>\n\t\t\t<NumberControl\n\t\t\t\t{ ...otherProps }\n\t\t\t\t__unstableInputWidth={ __unstableInputWidth }\n\t\t\t\t__unstableStateReducer={ stateReducer }\n\t\t\t\tonChange={ handleOnChange }\n\t\t\t\tlabel={ __( 'Line height' ) }\n\t\t\t\tplaceholder={ BASE_DEFAULT_VALUE }\n\t\t\t\tstep={ STEP }\n\t\t\t\tspinFactor={ SPIN_FACTOR }\n\t\t\t\tvalue={ value }\n\t\t\t\tmin={ 0 }\n\t\t\t\tspinControls=\"custom\"\n\t\t\t/>\n\t\t</div>\n\t);\n};\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/line-height-control/README.md\n */\nexport default LineHeightControl;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,uBAAuB;AAC9C,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,2BAA2B,IAAIC,aAAa,QAAQ,uBAAuB;;AAEpF;AACA;AACA;AACA,SACCC,kBAAkB,EAClBC,WAAW,EACXC,IAAI,EACJC,WAAW,EACXC,mBAAmB,QACb,SAAS;AAEhB,MAAMC,iBAAiB,GAAGA,CAAE;EAC3BC,KAAK,EAAEC,UAAU;EACjBC,QAAQ;EACR;EACAC,uBAAuB,GAAG,KAAK;EAC/BC,oBAAoB,GAAG,MAAM;EAC7B,GAAGC;AACJ,CAAC,KAAM;EACN,MAAMC,SAAS,GAAGR,mBAAmB,CAAEG,UAAW,CAAC;EAEnD,MAAMM,eAAe,GAAGA,CAAEC,SAAS,EAAEC,gBAAgB,KAAM;IAC1D;IACA,IAAKH,SAAS,EAAG,OAAOE,SAAS;;IAEjC;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACE,MAAME,IAAI,GAAGd,IAAI,GAAGC,WAAW;IAC/B,QAAU,GAAGW,SAAW,EAAC;MACxB,KAAM,GAAGE,IAAM,EAAC;QACf;QACA,OAAOhB,kBAAkB,GAAGgB,IAAI;MACjC,KAAK,GAAG;QAAE;UACT;UACA;UACA,IAAKD,gBAAgB,EAAG,OAAOD,SAAS;UACxC;UACA,OAAOd,kBAAkB,GAAGgB,IAAI;QACjC;MACA,KAAK,EAAE;QACN,OAAOhB,kBAAkB;MAC1B;QACC,OAAOc,SAAS;IAClB;EACD,CAAC;EAED,MAAMG,YAAY,GAAGA,CAAEC,KAAK,EAAEC,M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ByC,WAAW,EAAGtC,kBAAoB;IAClCuC,IAAI,EAAGrC,IAAM;IACbsC,UAAU,EAAGrC,WAAa;IAC1BG,KAAK,EAAGA,KAAO;IACfmC,GAAG,EAAG,CAAG;IACTC,YAAY,EAAC;EAAQ,CACrB,CACG,CAAC;AAER,CAAC;;AAED;AACA;AACA;AACA,eAAerC,iBAAiB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__","UnitControl","BASE_DEFAULT_VALUE","STEP","isLineHeightDefined","LineHeightControl","value","lineHeight","onChange","isDefined","createElement","label","min","max","step","units"],"sources":["@wordpress/block-editor/src/components/line-height-control/index.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { UnitControl } from '@wordpress/components';\n/**\n * Internal dependencies\n */\nimport { BASE_DEFAULT_VALUE, STEP, isLineHeightDefined } from './utils';\n\nexport default function LineHeightControl( { value: lineHeight, onChange } ) {\n\tconst isDefined = isLineHeightDefined( lineHeight );\n\tconst value = isDefined ? lineHeight : BASE_DEFAULT_VALUE;\n\treturn (\n\t\t<UnitControl\n\t\t\tlabel={ __( 'Line Height' ) }\n\t\t\t// Set minimun value of 1 since lower values break on Android\n\t\t\tmin={ 1 }\n\t\t\tmax={ 5 }\n\t\t\tstep={ STEP }\n\t\t\tvalue={ value }\n\t\t\tonChange={ onChange }\n\t\t\t// TODO: should be updated to avoid using `false`, in order to\n\t\t\t// align with the web version of `UnitControl`\n\t\t\tunits={ false }\n\t\t/>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,WAAW,QAAQ,uBAAuB;AACnD;AACA;AACA;AACA,SAASC,kBAAkB,EAAEC,IAAI,EAAEC,mBAAmB,QAAQ,SAAS;AAEvE,eAAe,SAASC,iBAAiBA,CAAE;EAAEC,KAAK,EAAEC,UAAU;EAAEC;AAAS,CAAC,EAAG;EAC5E,MAAMC,SAAS,GAAGL,mBAAmB,CAAEG,UAAW,CAAC;EACnD,MAAMD,KAAK,GAAGG,SAAS,GAAGF,UAAU,GAAGL,kBAAkB;EACzD,OACCQ,aAAA,CAACT,WAAW;IACXU,KAAK,EAAGX,EAAE,CAAE,aAAc;IAC1B;IAAA;IACAY,GAAG,EAAG,CAAG;IACTC,GAAG,EAAG,CAAG;IACTC,IAAI,EAAGX,IAAM;IACbG,KAAK,EAAGA,KAAO;IACfE,QAAQ,EAAGA;IACX;IACA;IAAA;IACAO,KAAK,EAAG;EAAO,CACf,CAAC;AAEJ"}
|
|
1
|
+
{"version":3,"names":["__","UnitControl","BASE_DEFAULT_VALUE","STEP","isLineHeightDefined","LineHeightControl","value","lineHeight","onChange","isDefined","createElement","label","min","max","step","units"],"sources":["@wordpress/block-editor/src/components/line-height-control/index.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { UnitControl } from '@wordpress/components';\n/**\n * Internal dependencies\n */\nimport { BASE_DEFAULT_VALUE, STEP, isLineHeightDefined } from './utils';\n\nexport default function LineHeightControl( { value: lineHeight, onChange } ) {\n\tconst isDefined = isLineHeightDefined( lineHeight );\n\tconst value = isDefined ? lineHeight : BASE_DEFAULT_VALUE;\n\treturn (\n\t\t<UnitControl\n\t\t\tlabel={ __( 'Line Height' ) }\n\t\t\t// Set minimun value of 1 since lower values break on Android\n\t\t\tmin={ 1 }\n\t\t\tmax={ 5 }\n\t\t\tstep={ STEP }\n\t\t\tvalue={ value }\n\t\t\tonChange={ onChange }\n\t\t\t// TODO: should be updated to avoid using `false`, in order to\n\t\t\t// align with the web version of `UnitControl`\n\t\t\tunits={ false }\n\t\t/>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,WAAW,QAAQ,uBAAuB;AACnD;AACA;AACA;AACA,SAASC,kBAAkB,EAAEC,IAAI,EAAEC,mBAAmB,QAAQ,SAAS;AAEvE,eAAe,SAASC,iBAAiBA,CAAE;EAAEC,KAAK,EAAEC,UAAU;EAAEC;AAAS,CAAC,EAAG;EAC5E,MAAMC,SAAS,GAAGL,mBAAmB,CAAEG,UAAW,CAAC;EACnD,MAAMD,KAAK,GAAGG,SAAS,GAAGF,UAAU,GAAGL,kBAAkB;EACzD,OACCQ,aAAA,CAACT,WAAW;IACXU,KAAK,EAAGX,EAAE,CAAE,aAAc;IAC1B;IAAA;IACAY,GAAG,EAAG,CAAG;IACTC,GAAG,EAAG,CAAG;IACTC,IAAI,EAAGX,IAAM;IACbG,KAAK,EAAGA,KAAO;IACfE,QAAQ,EAAGA;IACX;IACA;IAAA;IACAO,KAAK,EAAG;EAAO,CACf,CAAC;AAEJ","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BASE_DEFAULT_VALUE","STEP","SPIN_FACTOR","RESET_VALUE","isLineHeightDefined","lineHeight","undefined"],"sources":["@wordpress/block-editor/src/components/line-height-control/utils.js"],"sourcesContent":["export const BASE_DEFAULT_VALUE = 1.5;\nexport const STEP = 0.01;\n/**\n * A spin factor of 10 allows the spin controls to increment/decrement by 0.1.\n * e.g. A line-height value of 1.55 will increment to 1.65.\n */\nexport const SPIN_FACTOR = 10;\n/**\n * There are varying value types within LineHeightControl:\n *\n * {undefined} Initial value. No changes from the user.\n * {string} Input value. Value consumed/outputted by the input. Empty would be ''.\n * {number} Block attribute type. Input value needs to be converted for attribute setting.\n *\n * Note: If the value is undefined, the input requires it to be an empty string ('')\n * in order to be considered \"controlled\" by props (rather than internal state).\n */\nexport const RESET_VALUE = '';\n\n/**\n * Determines if the lineHeight attribute has been properly defined.\n *\n * @param {any} lineHeight The value to check.\n *\n * @return {boolean} Whether the lineHeight attribute is valid.\n */\nexport function isLineHeightDefined( lineHeight ) {\n\treturn lineHeight !== undefined && lineHeight !== RESET_VALUE;\n}\n"],"mappings":"AAAA,OAAO,MAAMA,kBAAkB,GAAG,GAAG;AACrC,OAAO,MAAMC,IAAI,GAAG,IAAI;AACxB;AACA;AACA;AACA;AACA,OAAO,MAAMC,WAAW,GAAG,EAAE;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,WAAW,GAAG,EAAE;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,mBAAmBA,CAAEC,UAAU,EAAG;EACjD,OAAOA,UAAU,KAAKC,SAAS,IAAID,UAAU,KAAKF,WAAW;AAC9D"}
|
|
1
|
+
{"version":3,"names":["BASE_DEFAULT_VALUE","STEP","SPIN_FACTOR","RESET_VALUE","isLineHeightDefined","lineHeight","undefined"],"sources":["@wordpress/block-editor/src/components/line-height-control/utils.js"],"sourcesContent":["export const BASE_DEFAULT_VALUE = 1.5;\nexport const STEP = 0.01;\n/**\n * A spin factor of 10 allows the spin controls to increment/decrement by 0.1.\n * e.g. A line-height value of 1.55 will increment to 1.65.\n */\nexport const SPIN_FACTOR = 10;\n/**\n * There are varying value types within LineHeightControl:\n *\n * {undefined} Initial value. No changes from the user.\n * {string} Input value. Value consumed/outputted by the input. Empty would be ''.\n * {number} Block attribute type. Input value needs to be converted for attribute setting.\n *\n * Note: If the value is undefined, the input requires it to be an empty string ('')\n * in order to be considered \"controlled\" by props (rather than internal state).\n */\nexport const RESET_VALUE = '';\n\n/**\n * Determines if the lineHeight attribute has been properly defined.\n *\n * @param {any} lineHeight The value to check.\n *\n * @return {boolean} Whether the lineHeight attribute is valid.\n */\nexport function isLineHeightDefined( lineHeight ) {\n\treturn lineHeight !== undefined && lineHeight !== RESET_VALUE;\n}\n"],"mappings":"AAAA,OAAO,MAAMA,kBAAkB,GAAG,GAAG;AACrC,OAAO,MAAMC,IAAI,GAAG,IAAI;AACxB;AACA;AACA;AACA;AACA,OAAO,MAAMC,WAAW,GAAG,EAAE;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,WAAW,GAAG,EAAE;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,mBAAmBA,CAAEC,UAAU,EAAG;EACjD,OAAOA,UAAU,KAAKC,SAAS,IAAID,UAAU,KAAKF,WAAW;AAC9D","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__","CREATE_TYPE","TEL_TYPE","URL_TYPE","MAILTO_TYPE","INTERNAL_TYPE","LINK_ENTRY_TYPES","DEFAULT_LINK_SETTINGS","id","title"],"sources":["@wordpress/block-editor/src/components/link-control/constants.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n// Used as a unique identifier for the \"Create\" option within search results.\n// Used to help distinguish the \"Create\" suggestion within the search results in\n// order to handle it as a unique case.\nexport const CREATE_TYPE = '__CREATE__';\nexport const TEL_TYPE = 'tel';\nexport const URL_TYPE = 'link';\nexport const MAILTO_TYPE = 'mailto';\nexport const INTERNAL_TYPE = 'internal';\n\nexport const LINK_ENTRY_TYPES = [\n\tURL_TYPE,\n\tMAILTO_TYPE,\n\tTEL_TYPE,\n\tINTERNAL_TYPE,\n];\n\nexport const DEFAULT_LINK_SETTINGS = [\n\t{\n\t\tid: 'opensInNewTab',\n\t\ttitle: __( 'Open in new tab' ),\n\t},\n];\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,OAAO,MAAMC,WAAW,GAAG,YAAY;AACvC,OAAO,MAAMC,QAAQ,GAAG,KAAK;AAC7B,OAAO,MAAMC,QAAQ,GAAG,MAAM;AAC9B,OAAO,MAAMC,WAAW,GAAG,QAAQ;AACnC,OAAO,MAAMC,aAAa,GAAG,UAAU;AAEvC,OAAO,MAAMC,gBAAgB,GAAG,CAC/BH,QAAQ,EACRC,WAAW,EACXF,QAAQ,EACRG,aAAa,CACb;AAED,OAAO,MAAME,qBAAqB,GAAG,CACpC;EACCC,EAAE,EAAE,eAAe;EACnBC,KAAK,EAAET,EAAE,CAAE,iBAAkB;AAC9B,CAAC,CACD"}
|
|
1
|
+
{"version":3,"names":["__","CREATE_TYPE","TEL_TYPE","URL_TYPE","MAILTO_TYPE","INTERNAL_TYPE","LINK_ENTRY_TYPES","DEFAULT_LINK_SETTINGS","id","title"],"sources":["@wordpress/block-editor/src/components/link-control/constants.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n// Used as a unique identifier for the \"Create\" option within search results.\n// Used to help distinguish the \"Create\" suggestion within the search results in\n// order to handle it as a unique case.\nexport const CREATE_TYPE = '__CREATE__';\nexport const TEL_TYPE = 'tel';\nexport const URL_TYPE = 'link';\nexport const MAILTO_TYPE = 'mailto';\nexport const INTERNAL_TYPE = 'internal';\n\nexport const LINK_ENTRY_TYPES = [\n\tURL_TYPE,\n\tMAILTO_TYPE,\n\tTEL_TYPE,\n\tINTERNAL_TYPE,\n];\n\nexport const DEFAULT_LINK_SETTINGS = [\n\t{\n\t\tid: 'opensInNewTab',\n\t\ttitle: __( 'Open in new tab' ),\n\t},\n];\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,OAAO,MAAMC,WAAW,GAAG,YAAY;AACvC,OAAO,MAAMC,QAAQ,GAAG,KAAK;AAC7B,OAAO,MAAMC,QAAQ,GAAG,MAAM;AAC9B,OAAO,MAAMC,WAAW,GAAG,QAAQ;AACnC,OAAO,MAAMC,aAAa,GAAG,UAAU;AAEvC,OAAO,MAAMC,gBAAgB,GAAG,CAC/BH,QAAQ,EACRC,WAAW,EACXF,QAAQ,EACRG,aAAa,CACb;AAED,OAAO,MAAME,qBAAqB,GAAG,CACpC;EACCC,EAAE,EAAE,eAAe;EACnBC,KAAK,EAAET,EAAE,CAAE,iBAAkB;AAC9B,CAAC,CACD","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["classnames","Button","Spinner","Notice","TextControl","__experimentalHStack","HStack","__","useRef","useState","useEffect","focus","ENTER","isShallowEqualObjects","useSelect","useDispatch","store","preferencesStore","keyboardReturn","LinkControlSettingsDrawer","LinkControlSearchInput","LinkPreview","LinkSettings","useCreatePage","useInternalValue","ViewerFill","DEFAULT_LINK_SETTINGS","noop","PREFERENCE_SCOPE","PREFERENCE_KEY","LinkControl","searchInputPlaceholder","value","settings","onChange","onRemove","onCancel","noDirectEntry","showSuggestions","showInitialSuggestions","forceIsEditingLink","createSuggestion","withCreateSuggestion","inputValue","propInputValue","suggestionsQuery","noURLSuggestion","createSuggestionButtonText","hasRichPreviews","hasTextControl","renderControlBottom","undefined","settingsOpen","setSettingsOpen","advancedSettingsPreference","select","_prefsStore$get","prefsStore","get","set","setPreference","setSettingsOpenWithPreference","prefVal","isSettingsOpen","isMounting","wrapperNode","textInputRef","isEndingEditWithFocus","settingsKeys","map","id","internalControlValue","setInternalControlValue","setInternalURLInputValue","setInternalTextInputValue","createSetInternalSettingValueHandler","valueHasChanges","isEditingLink","setIsEditingLink","url","createPage","isCreatingPage","errorMessage","current","nextFocusTarget","focusable","find","hasLinkValue","trim","length","stopEditing","contains","ownerDocument","activeElement","handleSelectSuggestion","updatedValue","nonSettingsChanges","Object","keys","reduce","acc","key","includes","title","handleSubmit","currentUrlInputValue","handleSubmitWithEnter","event","keyCode","currentInputIsEmpty","preventDefault","resetInternalValues","handleCancel","stopPropagation","shownUnlinkControl","showActions","showTextControl","isEditing","isDisabled","showSettings","createElement","tabIndex","ref","className","Fragment","__nextHasNoMarginBottom","label","onKeyDown","size","currentLink","placeholder","onCreateSuggestion","onSelect","allowDirectEntry","withURLSuggestion","hideLabelFromVision","onClick","icon","status","isDismissible","onEditClick","hasUnlinkControl","justify","variant"],"sources":["@wordpress/block-editor/src/components/link-control/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tButton,\n\tSpinner,\n\tNotice,\n\tTextControl,\n\t__experimentalHStack as HStack,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useRef, useState, useEffect } from '@wordpress/element';\nimport { focus } from '@wordpress/dom';\nimport { ENTER } from '@wordpress/keycodes';\nimport { isShallowEqualObjects } from '@wordpress/is-shallow-equal';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { keyboardReturn } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport LinkControlSettingsDrawer from './settings-drawer';\nimport LinkControlSearchInput from './search-input';\nimport LinkPreview from './link-preview';\nimport LinkSettings from './settings';\nimport useCreatePage from './use-create-page';\nimport useInternalValue from './use-internal-value';\nimport { ViewerFill } from './viewer-slot';\nimport { DEFAULT_LINK_SETTINGS } from './constants';\n\n/**\n * Default properties associated with a link control value.\n *\n * @typedef WPLinkControlDefaultValue\n *\n * @property {string} url Link URL.\n * @property {string=} title Link title.\n * @property {boolean=} opensInNewTab Whether link should open in a new browser\n * tab. This value is only assigned if not\n * providing a custom `settings` prop.\n */\n\n/* eslint-disable jsdoc/valid-types */\n/**\n * Custom settings values associated with a link.\n *\n * @typedef {{[setting:string]:any}} WPLinkControlSettingsValue\n */\n/* eslint-enable */\n\n/**\n * Custom settings values associated with a link.\n *\n * @typedef WPLinkControlSetting\n *\n * @property {string} id Identifier to use as property for setting value.\n * @property {string} title Human-readable label to show in user interface.\n */\n\n/**\n * Properties associated with a link control value, composed as a union of the\n * default properties and any custom settings values.\n *\n * @typedef {WPLinkControlDefaultValue&WPLinkControlSettingsValue} WPLinkControlValue\n */\n\n/** @typedef {(nextValue:WPLinkControlValue)=>void} WPLinkControlOnChangeProp */\n\n/**\n * Properties associated with a search suggestion used within the LinkControl.\n *\n * @typedef WPLinkControlSuggestion\n *\n * @property {string} id Identifier to use to uniquely identify the suggestion.\n * @property {string} type Identifies the type of the suggestion (eg: `post`,\n * `page`, `url`...etc)\n * @property {string} title Human-readable label to show in user interface.\n * @property {string} url A URL for the suggestion.\n */\n\n/** @typedef {(title:string)=>WPLinkControlSuggestion} WPLinkControlCreateSuggestionProp */\n\n/**\n * @typedef WPLinkControlProps\n *\n * @property {(WPLinkControlSetting[])=} settings An array of settings objects. Each object will used to\n * render a `ToggleControl` for that setting.\n * @property {boolean=} forceIsEditingLink If passed as either `true` or `false`, controls the\n * internal editing state of the component to respective\n * show or not show the URL input field.\n * @property {WPLinkControlValue=} value Current link value.\n * @property {WPLinkControlOnChangeProp=} onChange Value change handler, called with the updated value if\n * the user selects a new link or updates settings.\n * @property {boolean=} noDirectEntry Whether to allow turning a URL-like search query directly into a link.\n * @property {boolean=} showSuggestions Whether to present suggestions when typing the URL.\n * @property {boolean=} showInitialSuggestions Whether to present initial suggestions immediately.\n * @property {boolean=} withCreateSuggestion Whether to allow creation of link value from suggestion.\n * @property {Object=} suggestionsQuery Query parameters to pass along to wp.blockEditor.__experimentalFetchLinkSuggestions.\n * @property {boolean=} noURLSuggestion Whether to add a fallback suggestion which treats the search query as a URL.\n * @property {boolean=} hasTextControl Whether to add a text field to the UI to update the value.title.\n * @property {string|Function|undefined} createSuggestionButtonText The text to use in the button that calls createSuggestion.\n * @property {Function} renderControlBottom Optional controls to be rendered at the bottom of the component.\n */\n\nconst noop = () => {};\n\nconst PREFERENCE_SCOPE = 'core/block-editor';\nconst PREFERENCE_KEY = 'linkControlSettingsDrawer';\n\n/**\n * Renders a link control. A link control is a controlled input which maintains\n * a value associated with a link (HTML anchor element) and relevant settings\n * for how that link is expected to behave.\n *\n * @param {WPLinkControlProps} props Component props.\n */\nfunction LinkControl( {\n\tsearchInputPlaceholder,\n\tvalue,\n\tsettings = DEFAULT_LINK_SETTINGS,\n\tonChange = noop,\n\tonRemove,\n\tonCancel,\n\tnoDirectEntry = false,\n\tshowSuggestions = true,\n\tshowInitialSuggestions,\n\tforceIsEditingLink,\n\tcreateSuggestion,\n\twithCreateSuggestion,\n\tinputValue: propInputValue = '',\n\tsuggestionsQuery = {},\n\tnoURLSuggestion = false,\n\tcreateSuggestionButtonText,\n\thasRichPreviews = false,\n\thasTextControl = false,\n\trenderControlBottom = null,\n} ) {\n\tif ( withCreateSuggestion === undefined && createSuggestion ) {\n\t\twithCreateSuggestion = true;\n\t}\n\n\tconst [ settingsOpen, setSettingsOpen ] = useState( false );\n\n\tconst { advancedSettingsPreference } = useSelect( ( select ) => {\n\t\tconst prefsStore = select( preferencesStore );\n\n\t\treturn {\n\t\t\tadvancedSettingsPreference:\n\t\t\t\tprefsStore.get( PREFERENCE_SCOPE, PREFERENCE_KEY ) ?? false,\n\t\t};\n\t}, [] );\n\n\tconst { set: setPreference } = useDispatch( preferencesStore );\n\n\t/**\n\t * Sets the open/closed state of the Advanced Settings Drawer,\n\t * optionlly persisting the state to the user's preferences.\n\t *\n\t * Note that Block Editor components can be consumed by non-WordPress\n\t * environments which may not have preferences setup.\n\t * Therefore a local state is also used as a fallback.\n\t *\n\t * @param {boolean} prefVal the open/closed state of the Advanced Settings Drawer.\n\t */\n\tconst setSettingsOpenWithPreference = ( prefVal ) => {\n\t\tif ( setPreference ) {\n\t\t\tsetPreference( PREFERENCE_SCOPE, PREFERENCE_KEY, prefVal );\n\t\t}\n\t\tsetSettingsOpen( prefVal );\n\t};\n\n\t// Block Editor components can be consumed by non-WordPress environments\n\t// which may not have these preferences setup.\n\t// Therefore a local state is used as a fallback.\n\tconst isSettingsOpen = advancedSettingsPreference || settingsOpen;\n\n\tconst isMounting = useRef( true );\n\tconst wrapperNode = useRef();\n\tconst textInputRef = useRef();\n\tconst isEndingEditWithFocus = useRef( false );\n\n\tconst settingsKeys = settings.map( ( { id } ) => id );\n\n\tconst [\n\t\tinternalControlValue,\n\t\tsetInternalControlValue,\n\t\tsetInternalURLInputValue,\n\t\tsetInternalTextInputValue,\n\t\tcreateSetInternalSettingValueHandler,\n\t] = useInternalValue( value );\n\n\tconst valueHasChanges =\n\t\tvalue && ! isShallowEqualObjects( internalControlValue, value );\n\n\tconst [ isEditingLink, setIsEditingLink ] = useState(\n\t\tforceIsEditingLink !== undefined\n\t\t\t? forceIsEditingLink\n\t\t\t: ! value || ! value.url\n\t);\n\n\tconst { createPage, isCreatingPage, errorMessage } =\n\t\tuseCreatePage( createSuggestion );\n\n\tuseEffect( () => {\n\t\tif ( forceIsEditingLink === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetIsEditingLink( forceIsEditingLink );\n\t}, [ forceIsEditingLink ] );\n\n\tuseEffect( () => {\n\t\t// We don't auto focus into the Link UI on mount\n\t\t// because otherwise using the keyboard to select text\n\t\t// *within* the link format is not possible.\n\t\tif ( isMounting.current ) {\n\t\t\tisMounting.current = false;\n\t\t\treturn;\n\t\t}\n\n\t\t// Scenario - when:\n\t\t// - switching between editable and non editable LinkControl\n\t\t// - clicking on a link\n\t\t// ...then move focus to the *first* element to avoid focus loss\n\t\t// and to ensure focus is *within* the Link UI.\n\t\tconst nextFocusTarget =\n\t\t\tfocus.focusable.find( wrapperNode.current )[ 0 ] ||\n\t\t\twrapperNode.current;\n\n\t\tnextFocusTarget.focus();\n\n\t\tisEndingEditWithFocus.current = false;\n\t}, [ isEditingLink, isCreatingPage ] );\n\n\tconst hasLinkValue = value?.url?.trim()?.length > 0;\n\n\t/**\n\t * Cancels editing state and marks that focus may need to be restored after\n\t * the next render, if focus was within the wrapper when editing finished.\n\t */\n\tconst stopEditing = () => {\n\t\tisEndingEditWithFocus.current = !! wrapperNode.current?.contains(\n\t\t\twrapperNode.current.ownerDocument.activeElement\n\t\t);\n\n\t\tsetIsEditingLink( false );\n\t};\n\n\tconst handleSelectSuggestion = ( updatedValue ) => {\n\t\t// Suggestions may contains \"settings\" values (e.g. `opensInNewTab`)\n\t\t// which should not overide any existing settings values set by the\n\t\t// user. This filters out any settings values from the suggestion.\n\t\tconst nonSettingsChanges = Object.keys( updatedValue ).reduce(\n\t\t\t( acc, key ) => {\n\t\t\t\tif ( ! settingsKeys.includes( key ) ) {\n\t\t\t\t\tacc[ key ] = updatedValue[ key ];\n\t\t\t\t}\n\t\t\t\treturn acc;\n\t\t\t},\n\t\t\t{}\n\t\t);\n\n\t\tonChange( {\n\t\t\t...internalControlValue,\n\t\t\t...nonSettingsChanges,\n\t\t\t// As title is not a setting, it must be manually applied\n\t\t\t// in such a way as to preserve the users changes over\n\t\t\t// any \"title\" value provided by the \"suggestion\".\n\t\t\ttitle: internalControlValue?.title || updatedValue?.title,\n\t\t} );\n\n\t\tstopEditing();\n\t};\n\n\tconst handleSubmit = () => {\n\t\tif ( valueHasChanges ) {\n\t\t\t// Submit the original value with new stored values applied\n\t\t\t// on top. URL is a special case as it may also be a prop.\n\t\t\tonChange( {\n\t\t\t\t...value,\n\t\t\t\t...internalControlValue,\n\t\t\t\turl: currentUrlInputValue,\n\t\t\t} );\n\t\t}\n\t\tstopEditing();\n\t};\n\n\tconst handleSubmitWithEnter = ( event ) => {\n\t\tconst { keyCode } = event;\n\n\t\tif (\n\t\t\tkeyCode === ENTER &&\n\t\t\t! currentInputIsEmpty // Disallow submitting empty values.\n\t\t) {\n\t\t\tevent.preventDefault();\n\t\t\thandleSubmit();\n\t\t}\n\t};\n\n\tconst resetInternalValues = () => {\n\t\tsetInternalControlValue( value );\n\t};\n\n\tconst handleCancel = ( event ) => {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\n\t\t// Ensure that any unsubmitted input changes are reset.\n\t\tresetInternalValues();\n\n\t\tif ( hasLinkValue ) {\n\t\t\t// If there is a link then exist editing mode and show preview.\n\t\t\tstopEditing();\n\t\t} else {\n\t\t\t// If there is no link value, then remove the link entirely.\n\t\t\tonRemove?.();\n\t\t}\n\n\t\tonCancel?.();\n\t};\n\n\tconst currentUrlInputValue =\n\t\tpropInputValue || internalControlValue?.url || '';\n\n\tconst currentInputIsEmpty = ! currentUrlInputValue?.trim()?.length;\n\n\tconst shownUnlinkControl =\n\t\tonRemove && value && ! isEditingLink && ! isCreatingPage;\n\n\tconst showActions = isEditingLink && hasLinkValue;\n\n\t// Only show text control once a URL value has been committed\n\t// and it isn't just empty whitespace.\n\t// See https://github.com/WordPress/gutenberg/pull/33849/#issuecomment-932194927.\n\tconst showTextControl = hasLinkValue && hasTextControl;\n\n\tconst isEditing = ( isEditingLink || ! value ) && ! isCreatingPage;\n\tconst isDisabled = ! valueHasChanges || currentInputIsEmpty;\n\tconst showSettings = !! settings?.length && isEditingLink && hasLinkValue;\n\n\treturn (\n\t\t<div\n\t\t\ttabIndex={ -1 }\n\t\t\tref={ wrapperNode }\n\t\t\tclassName=\"block-editor-link-control\"\n\t\t>\n\t\t\t{ isCreatingPage && (\n\t\t\t\t<div className=\"block-editor-link-control__loading\">\n\t\t\t\t\t<Spinner /> { __( 'Creating' ) }…\n\t\t\t\t</div>\n\t\t\t) }\n\n\t\t\t{ isEditing && (\n\t\t\t\t<>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={ classnames( {\n\t\t\t\t\t\t\t'block-editor-link-control__search-input-wrapper': true,\n\t\t\t\t\t\t\t'has-text-control': showTextControl,\n\t\t\t\t\t\t\t'has-actions': showActions,\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ showTextControl && (\n\t\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tref={ textInputRef }\n\t\t\t\t\t\t\t\tclassName=\"block-editor-link-control__field block-editor-link-control__text-content\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Text' ) }\n\t\t\t\t\t\t\t\tvalue={ internalControlValue?.title }\n\t\t\t\t\t\t\t\tonChange={ setInternalTextInputValue }\n\t\t\t\t\t\t\t\tonKeyDown={ handleSubmitWithEnter }\n\t\t\t\t\t\t\t\tsize=\"__unstable-large\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<LinkControlSearchInput\n\t\t\t\t\t\t\tcurrentLink={ value }\n\t\t\t\t\t\t\tclassName=\"block-editor-link-control__field block-editor-link-control__search-input\"\n\t\t\t\t\t\t\tplaceholder={ searchInputPlaceholder }\n\t\t\t\t\t\t\tvalue={ currentUrlInputValue }\n\t\t\t\t\t\t\twithCreateSuggestion={ withCreateSuggestion }\n\t\t\t\t\t\t\tonCreateSuggestion={ createPage }\n\t\t\t\t\t\t\tonChange={ setInternalURLInputValue }\n\t\t\t\t\t\t\tonSelect={ handleSelectSuggestion }\n\t\t\t\t\t\t\tshowInitialSuggestions={ showInitialSuggestions }\n\t\t\t\t\t\t\tallowDirectEntry={ ! noDirectEntry }\n\t\t\t\t\t\t\tshowSuggestions={ showSuggestions }\n\t\t\t\t\t\t\tsuggestionsQuery={ suggestionsQuery }\n\t\t\t\t\t\t\twithURLSuggestion={ ! noURLSuggestion }\n\t\t\t\t\t\t\tcreateSuggestionButtonText={\n\t\t\t\t\t\t\t\tcreateSuggestionButtonText\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\thideLabelFromVision={ ! showTextControl }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{ ! showActions && (\n\t\t\t\t\t\t\t<div className=\"block-editor-link-control__search-enter\">\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tonClick={ isDisabled ? noop : handleSubmit }\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Submit' ) }\n\t\t\t\t\t\t\t\t\ticon={ keyboardReturn }\n\t\t\t\t\t\t\t\t\tclassName=\"block-editor-link-control__search-submit\"\n\t\t\t\t\t\t\t\t\taria-disabled={ isDisabled }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</div>\n\t\t\t\t\t{ errorMessage && (\n\t\t\t\t\t\t<Notice\n\t\t\t\t\t\t\tclassName=\"block-editor-link-control__search-error\"\n\t\t\t\t\t\t\tstatus=\"error\"\n\t\t\t\t\t\t\tisDismissible={ false }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ errorMessage }\n\t\t\t\t\t\t</Notice>\n\t\t\t\t\t) }\n\t\t\t\t</>\n\t\t\t) }\n\n\t\t\t{ value && ! isEditingLink && ! isCreatingPage && (\n\t\t\t\t<LinkPreview\n\t\t\t\t\tkey={ value?.url } // force remount when URL changes to avoid race conditions for rich previews\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\tonEditClick={ () => setIsEditingLink( true ) }\n\t\t\t\t\thasRichPreviews={ hasRichPreviews }\n\t\t\t\t\thasUnlinkControl={ shownUnlinkControl }\n\t\t\t\t\tonRemove={ () => {\n\t\t\t\t\t\tonRemove();\n\t\t\t\t\t\tsetIsEditingLink( true );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t) }\n\n\t\t\t{ showSettings && (\n\t\t\t\t<div className=\"block-editor-link-control__tools\">\n\t\t\t\t\t{ ! currentInputIsEmpty && (\n\t\t\t\t\t\t<LinkControlSettingsDrawer\n\t\t\t\t\t\t\tsettingsOpen={ isSettingsOpen }\n\t\t\t\t\t\t\tsetSettingsOpen={ setSettingsOpenWithPreference }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<LinkSettings\n\t\t\t\t\t\t\t\tvalue={ internalControlValue }\n\t\t\t\t\t\t\t\tsettings={ settings }\n\t\t\t\t\t\t\t\tonChange={ createSetInternalSettingValueHandler(\n\t\t\t\t\t\t\t\t\tsettingsKeys\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</LinkControlSettingsDrawer>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t) }\n\n\t\t\t{ showActions && (\n\t\t\t\t<HStack\n\t\t\t\t\tjustify=\"right\"\n\t\t\t\t\tclassName=\"block-editor-link-control__search-actions\"\n\t\t\t\t>\n\t\t\t\t\t<Button variant=\"tertiary\" onClick={ handleCancel }>\n\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\tonClick={ isDisabled ? noop : handleSubmit }\n\t\t\t\t\t\tclassName=\"block-editor-link-control__search-submit\"\n\t\t\t\t\t\taria-disabled={ isDisabled }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Save' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</HStack>\n\t\t\t) }\n\n\t\t\t{ ! isCreatingPage && renderControlBottom && renderControlBottom() }\n\t\t</div>\n\t);\n}\n\nLinkControl.ViewerFill = ViewerFill;\nLinkControl.DEFAULT_LINK_SETTINGS = DEFAULT_LINK_SETTINGS;\n\nexport default LinkControl;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SACCC,MAAM,EACNC,OAAO,EACPC,MAAM,EACNC,WAAW,EACXC,oBAAoB,IAAIC,MAAM,QACxB,uBAAuB;AAC9B,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,MAAM,EAAEC,QAAQ,EAAEC,SAAS,QAAQ,oBAAoB;AAChE,SAASC,KAAK,QAAQ,gBAAgB;AACtC,SAASC,KAAK,QAAQ,qBAAqB;AAC3C,SAASC,qBAAqB,QAAQ,6BAA6B;AACnE,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,wBAAwB;AAClE,SAASC,cAAc,QAAQ,kBAAkB;;AAEjD;AACA;AACA;AACA,OAAOC,yBAAyB,MAAM,mBAAmB;AACzD,OAAOC,sBAAsB,MAAM,gBAAgB;AACnD,OAAOC,WAAW,MAAM,gBAAgB;AACxC,OAAOC,YAAY,MAAM,YAAY;AACrC,OAAOC,aAAa,MAAM,mBAAmB;AAC7C,OAAOC,gBAAgB,MAAM,sBAAsB;AACnD,SAASC,UAAU,QAAQ,eAAe;AAC1C,SAASC,qBAAqB,QAAQ,aAAa;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;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gB,CAAE,IAAK,CAAG;IAC9C9B,eAAe,EAAGA,eAAiB;IACnC6F,gBAAgB,EAAG3B,kBAAoB;IACvC/E,QAAQ,EAAGA,CAAA,KAAM;MAChBA,QAAQ,CAAC,CAAC;MACV2C,gBAAgB,CAAE,IAAK,CAAC;IACzB;EAAG,CACH,CACD,EAECyC,YAAY,IACbC,aAAA;IAAKG,SAAS,EAAC;EAAkC,GAC9C,CAAEd,mBAAmB,IACtBW,aAAA,CAACrG,yBAAyB;IACzBiC,YAAY,EAAGW,cAAgB;IAC/BV,eAAe,EAAGQ;EAA+B,GAEjD2D,aAAA,CAAClG,YAAY;IACZU,KAAK,EAAGuC,oBAAsB;IAC9BtC,QAAQ,EAAGA,QAAU;IACrBC,QAAQ,EAAGyC,oCAAoC,CAC9CP,YACD;EAAG,CACH,CACyB,CAExB,CACL,EAEC+C,WAAW,IACZK,aAAA,CAAClH,MAAM;IACNwI,OAAO,EAAC,OAAO;IACfnB,SAAS,EAAC;EAA2C,GAErDH,aAAA,CAACvH,MAAM;IAAC8I,OAAO,EAAC,UAAU;IAACP,OAAO,EAAGxB;EAAc,GAChDzG,EAAE,CAAE,QAAS,CACR,CAAC,EACTiH,aAAA,CAACvH,MAAM;IACN8I,OAAO,EAAC,SAAS;IACjBP,OAAO,EAAGlB,UAAU,GAAG3F,IAAI,GAAG6E,YAAc;IAC5CmB,SAAS,EAAC,0CAA0C;IACpD,iBAAgBL;EAAY,GAE1B/G,EAAE,CAAE,MAAO,CACN,CACD,CACR,EAEC,CAAE0E,cAAc,IAAI/B,mBAAmB,IAAIA,mBAAmB,CAAC,CAC7D,CAAC;AAER;AAEApB,WAAW,CAACL,UAAU,GAAGA,UAAU;AACnCK,WAAW,CAACJ,qBAAqB,GAAGA,qBAAqB;AAEzD,eAAeI,WAAW"}
|
|
1
|
+
{"version":3,"names":["classnames","Button","Spinner","Notice","TextControl","__experimentalHStack","HStack","__","useRef","useState","useEffect","focus","ENTER","isShallowEqualObjects","useSelect","useDispatch","store","preferencesStore","keyboardReturn","LinkControlSettingsDrawer","LinkControlSearchInput","LinkPreview","LinkSettings","useCreatePage","useInternalValue","ViewerFill","DEFAULT_LINK_SETTINGS","noop","PREFERENCE_SCOPE","PREFERENCE_KEY","LinkControl","searchInputPlaceholder","value","settings","onChange","onRemove","onCancel","noDirectEntry","showSuggestions","showInitialSuggestions","forceIsEditingLink","createSuggestion","withCreateSuggestion","inputValue","propInputValue","suggestionsQuery","noURLSuggestion","createSuggestionButtonText","hasRichPreviews","hasTextControl","renderControlBottom","undefined","settingsOpen","setSettingsOpen","advancedSettingsPreference","select","_prefsStore$get","prefsStore","get","set","setPreference","setSettingsOpenWithPreference","prefVal","isSettingsOpen","isMounting","wrapperNode","textInputRef","isEndingEditWithFocus","settingsKeys","map","id","internalControlValue","setInternalControlValue","setInternalURLInputValue","setInternalTextInputValue","createSetInternalSettingValueHandler","valueHasChanges","isEditingLink","setIsEditingLink","url","createPage","isCreatingPage","errorMessage","current","nextFocusTarget","focusable","find","hasLinkValue","trim","length","stopEditing","contains","ownerDocument","activeElement","handleSelectSuggestion","updatedValue","nonSettingsChanges","Object","keys","reduce","acc","key","includes","title","handleSubmit","currentUrlInputValue","handleSubmitWithEnter","event","keyCode","currentInputIsEmpty","preventDefault","resetInternalValues","handleCancel","stopPropagation","shownUnlinkControl","showActions","showTextControl","isEditing","isDisabled","showSettings","createElement","tabIndex","ref","className","Fragment","__nextHasNoMarginBottom","label","onKeyDown","size","currentLink","placeholder","onCreateSuggestion","onSelect","allowDirectEntry","withURLSuggestion","hideLabelFromVision","onClick","icon","status","isDismissible","onEditClick","hasUnlinkControl","justify","variant"],"sources":["@wordpress/block-editor/src/components/link-control/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tButton,\n\tSpinner,\n\tNotice,\n\tTextControl,\n\t__experimentalHStack as HStack,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useRef, useState, useEffect } from '@wordpress/element';\nimport { focus } from '@wordpress/dom';\nimport { ENTER } from '@wordpress/keycodes';\nimport { isShallowEqualObjects } from '@wordpress/is-shallow-equal';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { keyboardReturn } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport LinkControlSettingsDrawer from './settings-drawer';\nimport LinkControlSearchInput from './search-input';\nimport LinkPreview from './link-preview';\nimport LinkSettings from './settings';\nimport useCreatePage from './use-create-page';\nimport useInternalValue from './use-internal-value';\nimport { ViewerFill } from './viewer-slot';\nimport { DEFAULT_LINK_SETTINGS } from './constants';\n\n/**\n * Default properties associated with a link control value.\n *\n * @typedef WPLinkControlDefaultValue\n *\n * @property {string} url Link URL.\n * @property {string=} title Link title.\n * @property {boolean=} opensInNewTab Whether link should open in a new browser\n * tab. This value is only assigned if not\n * providing a custom `settings` prop.\n */\n\n/* eslint-disable jsdoc/valid-types */\n/**\n * Custom settings values associated with a link.\n *\n * @typedef {{[setting:string]:any}} WPLinkControlSettingsValue\n */\n/* eslint-enable */\n\n/**\n * Custom settings values associated with a link.\n *\n * @typedef WPLinkControlSetting\n *\n * @property {string} id Identifier to use as property for setting value.\n * @property {string} title Human-readable label to show in user interface.\n */\n\n/**\n * Properties associated with a link control value, composed as a union of the\n * default properties and any custom settings values.\n *\n * @typedef {WPLinkControlDefaultValue&WPLinkControlSettingsValue} WPLinkControlValue\n */\n\n/** @typedef {(nextValue:WPLinkControlValue)=>void} WPLinkControlOnChangeProp */\n\n/**\n * Properties associated with a search suggestion used within the LinkControl.\n *\n * @typedef WPLinkControlSuggestion\n *\n * @property {string} id Identifier to use to uniquely identify the suggestion.\n * @property {string} type Identifies the type of the suggestion (eg: `post`,\n * `page`, `url`...etc)\n * @property {string} title Human-readable label to show in user interface.\n * @property {string} url A URL for the suggestion.\n */\n\n/** @typedef {(title:string)=>WPLinkControlSuggestion} WPLinkControlCreateSuggestionProp */\n\n/**\n * @typedef WPLinkControlProps\n *\n * @property {(WPLinkControlSetting[])=} settings An array of settings objects. Each object will used to\n * render a `ToggleControl` for that setting.\n * @property {boolean=} forceIsEditingLink If passed as either `true` or `false`, controls the\n * internal editing state of the component to respective\n * show or not show the URL input field.\n * @property {WPLinkControlValue=} value Current link value.\n * @property {WPLinkControlOnChangeProp=} onChange Value change handler, called with the updated value if\n * the user selects a new link or updates settings.\n * @property {boolean=} noDirectEntry Whether to allow turning a URL-like search query directly into a link.\n * @property {boolean=} showSuggestions Whether to present suggestions when typing the URL.\n * @property {boolean=} showInitialSuggestions Whether to present initial suggestions immediately.\n * @property {boolean=} withCreateSuggestion Whether to allow creation of link value from suggestion.\n * @property {Object=} suggestionsQuery Query parameters to pass along to wp.blockEditor.__experimentalFetchLinkSuggestions.\n * @property {boolean=} noURLSuggestion Whether to add a fallback suggestion which treats the search query as a URL.\n * @property {boolean=} hasTextControl Whether to add a text field to the UI to update the value.title.\n * @property {string|Function|undefined} createSuggestionButtonText The text to use in the button that calls createSuggestion.\n * @property {Function} renderControlBottom Optional controls to be rendered at the bottom of the component.\n */\n\nconst noop = () => {};\n\nconst PREFERENCE_SCOPE = 'core/block-editor';\nconst PREFERENCE_KEY = 'linkControlSettingsDrawer';\n\n/**\n * Renders a link control. A link control is a controlled input which maintains\n * a value associated with a link (HTML anchor element) and relevant settings\n * for how that link is expected to behave.\n *\n * @param {WPLinkControlProps} props Component props.\n */\nfunction LinkControl( {\n\tsearchInputPlaceholder,\n\tvalue,\n\tsettings = DEFAULT_LINK_SETTINGS,\n\tonChange = noop,\n\tonRemove,\n\tonCancel,\n\tnoDirectEntry = false,\n\tshowSuggestions = true,\n\tshowInitialSuggestions,\n\tforceIsEditingLink,\n\tcreateSuggestion,\n\twithCreateSuggestion,\n\tinputValue: propInputValue = '',\n\tsuggestionsQuery = {},\n\tnoURLSuggestion = false,\n\tcreateSuggestionButtonText,\n\thasRichPreviews = false,\n\thasTextControl = false,\n\trenderControlBottom = null,\n} ) {\n\tif ( withCreateSuggestion === undefined && createSuggestion ) {\n\t\twithCreateSuggestion = true;\n\t}\n\n\tconst [ settingsOpen, setSettingsOpen ] = useState( false );\n\n\tconst { advancedSettingsPreference } = useSelect( ( select ) => {\n\t\tconst prefsStore = select( preferencesStore );\n\n\t\treturn {\n\t\t\tadvancedSettingsPreference:\n\t\t\t\tprefsStore.get( PREFERENCE_SCOPE, PREFERENCE_KEY ) ?? false,\n\t\t};\n\t}, [] );\n\n\tconst { set: setPreference } = useDispatch( preferencesStore );\n\n\t/**\n\t * Sets the open/closed state of the Advanced Settings Drawer,\n\t * optionlly persisting the state to the user's preferences.\n\t *\n\t * Note that Block Editor components can be consumed by non-WordPress\n\t * environments which may not have preferences setup.\n\t * Therefore a local state is also used as a fallback.\n\t *\n\t * @param {boolean} prefVal the open/closed state of the Advanced Settings Drawer.\n\t */\n\tconst setSettingsOpenWithPreference = ( prefVal ) => {\n\t\tif ( setPreference ) {\n\t\t\tsetPreference( PREFERENCE_SCOPE, PREFERENCE_KEY, prefVal );\n\t\t}\n\t\tsetSettingsOpen( prefVal );\n\t};\n\n\t// Block Editor components can be consumed by non-WordPress environments\n\t// which may not have these preferences setup.\n\t// Therefore a local state is used as a fallback.\n\tconst isSettingsOpen = advancedSettingsPreference || settingsOpen;\n\n\tconst isMounting = useRef( true );\n\tconst wrapperNode = useRef();\n\tconst textInputRef = useRef();\n\tconst isEndingEditWithFocus = useRef( false );\n\n\tconst settingsKeys = settings.map( ( { id } ) => id );\n\n\tconst [\n\t\tinternalControlValue,\n\t\tsetInternalControlValue,\n\t\tsetInternalURLInputValue,\n\t\tsetInternalTextInputValue,\n\t\tcreateSetInternalSettingValueHandler,\n\t] = useInternalValue( value );\n\n\tconst valueHasChanges =\n\t\tvalue && ! isShallowEqualObjects( internalControlValue, value );\n\n\tconst [ isEditingLink, setIsEditingLink ] = useState(\n\t\tforceIsEditingLink !== undefined\n\t\t\t? forceIsEditingLink\n\t\t\t: ! value || ! value.url\n\t);\n\n\tconst { createPage, isCreatingPage, errorMessage } =\n\t\tuseCreatePage( createSuggestion );\n\n\tuseEffect( () => {\n\t\tif ( forceIsEditingLink === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetIsEditingLink( forceIsEditingLink );\n\t}, [ forceIsEditingLink ] );\n\n\tuseEffect( () => {\n\t\t// We don't auto focus into the Link UI on mount\n\t\t// because otherwise using the keyboard to select text\n\t\t// *within* the link format is not possible.\n\t\tif ( isMounting.current ) {\n\t\t\tisMounting.current = false;\n\t\t\treturn;\n\t\t}\n\n\t\t// Scenario - when:\n\t\t// - switching between editable and non editable LinkControl\n\t\t// - clicking on a link\n\t\t// ...then move focus to the *first* element to avoid focus loss\n\t\t// and to ensure focus is *within* the Link UI.\n\t\tconst nextFocusTarget =\n\t\t\tfocus.focusable.find( wrapperNode.current )[ 0 ] ||\n\t\t\twrapperNode.current;\n\n\t\tnextFocusTarget.focus();\n\n\t\tisEndingEditWithFocus.current = false;\n\t}, [ isEditingLink, isCreatingPage ] );\n\n\tconst hasLinkValue = value?.url?.trim()?.length > 0;\n\n\t/**\n\t * Cancels editing state and marks that focus may need to be restored after\n\t * the next render, if focus was within the wrapper when editing finished.\n\t */\n\tconst stopEditing = () => {\n\t\tisEndingEditWithFocus.current = !! wrapperNode.current?.contains(\n\t\t\twrapperNode.current.ownerDocument.activeElement\n\t\t);\n\n\t\tsetIsEditingLink( false );\n\t};\n\n\tconst handleSelectSuggestion = ( updatedValue ) => {\n\t\t// Suggestions may contains \"settings\" values (e.g. `opensInNewTab`)\n\t\t// which should not overide any existing settings values set by the\n\t\t// user. This filters out any settings values from the suggestion.\n\t\tconst nonSettingsChanges = Object.keys( updatedValue ).reduce(\n\t\t\t( acc, key ) => {\n\t\t\t\tif ( ! settingsKeys.includes( key ) ) {\n\t\t\t\t\tacc[ key ] = updatedValue[ key ];\n\t\t\t\t}\n\t\t\t\treturn acc;\n\t\t\t},\n\t\t\t{}\n\t\t);\n\n\t\tonChange( {\n\t\t\t...internalControlValue,\n\t\t\t...nonSettingsChanges,\n\t\t\t// As title is not a setting, it must be manually applied\n\t\t\t// in such a way as to preserve the users changes over\n\t\t\t// any \"title\" value provided by the \"suggestion\".\n\t\t\ttitle: internalControlValue?.title || updatedValue?.title,\n\t\t} );\n\n\t\tstopEditing();\n\t};\n\n\tconst handleSubmit = () => {\n\t\tif ( valueHasChanges ) {\n\t\t\t// Submit the original value with new stored values applied\n\t\t\t// on top. URL is a special case as it may also be a prop.\n\t\t\tonChange( {\n\t\t\t\t...value,\n\t\t\t\t...internalControlValue,\n\t\t\t\turl: currentUrlInputValue,\n\t\t\t} );\n\t\t}\n\t\tstopEditing();\n\t};\n\n\tconst handleSubmitWithEnter = ( event ) => {\n\t\tconst { keyCode } = event;\n\n\t\tif (\n\t\t\tkeyCode === ENTER &&\n\t\t\t! currentInputIsEmpty // Disallow submitting empty values.\n\t\t) {\n\t\t\tevent.preventDefault();\n\t\t\thandleSubmit();\n\t\t}\n\t};\n\n\tconst resetInternalValues = () => {\n\t\tsetInternalControlValue( value );\n\t};\n\n\tconst handleCancel = ( event ) => {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\n\t\t// Ensure that any unsubmitted input changes are reset.\n\t\tresetInternalValues();\n\n\t\tif ( hasLinkValue ) {\n\t\t\t// If there is a link then exist editing mode and show preview.\n\t\t\tstopEditing();\n\t\t} else {\n\t\t\t// If there is no link value, then remove the link entirely.\n\t\t\tonRemove?.();\n\t\t}\n\n\t\tonCancel?.();\n\t};\n\n\tconst currentUrlInputValue =\n\t\tpropInputValue || internalControlValue?.url || '';\n\n\tconst currentInputIsEmpty = ! currentUrlInputValue?.trim()?.length;\n\n\tconst shownUnlinkControl =\n\t\tonRemove && value && ! isEditingLink && ! isCreatingPage;\n\n\tconst showActions = isEditingLink && hasLinkValue;\n\n\t// Only show text control once a URL value has been committed\n\t// and it isn't just empty whitespace.\n\t// See https://github.com/WordPress/gutenberg/pull/33849/#issuecomment-932194927.\n\tconst showTextControl = hasLinkValue && hasTextControl;\n\n\tconst isEditing = ( isEditingLink || ! value ) && ! isCreatingPage;\n\tconst isDisabled = ! valueHasChanges || currentInputIsEmpty;\n\tconst showSettings = !! settings?.length && isEditingLink && hasLinkValue;\n\n\treturn (\n\t\t<div\n\t\t\ttabIndex={ -1 }\n\t\t\tref={ wrapperNode }\n\t\t\tclassName=\"block-editor-link-control\"\n\t\t>\n\t\t\t{ isCreatingPage && (\n\t\t\t\t<div className=\"block-editor-link-control__loading\">\n\t\t\t\t\t<Spinner /> { __( 'Creating' ) }…\n\t\t\t\t</div>\n\t\t\t) }\n\n\t\t\t{ isEditing && (\n\t\t\t\t<>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={ classnames( {\n\t\t\t\t\t\t\t'block-editor-link-control__search-input-wrapper': true,\n\t\t\t\t\t\t\t'has-text-control': showTextControl,\n\t\t\t\t\t\t\t'has-actions': showActions,\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ showTextControl && (\n\t\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tref={ textInputRef }\n\t\t\t\t\t\t\t\tclassName=\"block-editor-link-control__field block-editor-link-control__text-content\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Text' ) }\n\t\t\t\t\t\t\t\tvalue={ internalControlValue?.title }\n\t\t\t\t\t\t\t\tonChange={ setInternalTextInputValue }\n\t\t\t\t\t\t\t\tonKeyDown={ handleSubmitWithEnter }\n\t\t\t\t\t\t\t\tsize=\"__unstable-large\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<LinkControlSearchInput\n\t\t\t\t\t\t\tcurrentLink={ value }\n\t\t\t\t\t\t\tclassName=\"block-editor-link-control__field block-editor-link-control__search-input\"\n\t\t\t\t\t\t\tplaceholder={ searchInputPlaceholder }\n\t\t\t\t\t\t\tvalue={ currentUrlInputValue }\n\t\t\t\t\t\t\twithCreateSuggestion={ withCreateSuggestion }\n\t\t\t\t\t\t\tonCreateSuggestion={ createPage }\n\t\t\t\t\t\t\tonChange={ setInternalURLInputValue }\n\t\t\t\t\t\t\tonSelect={ handleSelectSuggestion }\n\t\t\t\t\t\t\tshowInitialSuggestions={ showInitialSuggestions }\n\t\t\t\t\t\t\tallowDirectEntry={ ! noDirectEntry }\n\t\t\t\t\t\t\tshowSuggestions={ showSuggestions }\n\t\t\t\t\t\t\tsuggestionsQuery={ suggestionsQuery }\n\t\t\t\t\t\t\twithURLSuggestion={ ! noURLSuggestion }\n\t\t\t\t\t\t\tcreateSuggestionButtonText={\n\t\t\t\t\t\t\t\tcreateSuggestionButtonText\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\thideLabelFromVision={ ! showTextControl }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{ ! showActions && (\n\t\t\t\t\t\t\t<div className=\"block-editor-link-control__search-enter\">\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tonClick={ isDisabled ? noop : handleSubmit }\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Submit' ) }\n\t\t\t\t\t\t\t\t\ticon={ keyboardReturn }\n\t\t\t\t\t\t\t\t\tclassName=\"block-editor-link-control__search-submit\"\n\t\t\t\t\t\t\t\t\taria-disabled={ isDisabled }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</div>\n\t\t\t\t\t{ errorMessage && (\n\t\t\t\t\t\t<Notice\n\t\t\t\t\t\t\tclassName=\"block-editor-link-control__search-error\"\n\t\t\t\t\t\t\tstatus=\"error\"\n\t\t\t\t\t\t\tisDismissible={ false }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ errorMessage }\n\t\t\t\t\t\t</Notice>\n\t\t\t\t\t) }\n\t\t\t\t</>\n\t\t\t) }\n\n\t\t\t{ value && ! isEditingLink && ! isCreatingPage && (\n\t\t\t\t<LinkPreview\n\t\t\t\t\tkey={ value?.url } // force remount when URL changes to avoid race conditions for rich previews\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\tonEditClick={ () => setIsEditingLink( true ) }\n\t\t\t\t\thasRichPreviews={ hasRichPreviews }\n\t\t\t\t\thasUnlinkControl={ shownUnlinkControl }\n\t\t\t\t\tonRemove={ () => {\n\t\t\t\t\t\tonRemove();\n\t\t\t\t\t\tsetIsEditingLink( true );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t) }\n\n\t\t\t{ showSettings && (\n\t\t\t\t<div className=\"block-editor-link-control__tools\">\n\t\t\t\t\t{ ! currentInputIsEmpty && (\n\t\t\t\t\t\t<LinkControlSettingsDrawer\n\t\t\t\t\t\t\tsettingsOpen={ isSettingsOpen }\n\t\t\t\t\t\t\tsetSettingsOpen={ setSettingsOpenWithPreference }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<LinkSettings\n\t\t\t\t\t\t\t\tvalue={ internalControlValue }\n\t\t\t\t\t\t\t\tsettings={ settings }\n\t\t\t\t\t\t\t\tonChange={ createSetInternalSettingValueHandler(\n\t\t\t\t\t\t\t\t\tsettingsKeys\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</LinkControlSettingsDrawer>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t) }\n\n\t\t\t{ showActions && (\n\t\t\t\t<HStack\n\t\t\t\t\tjustify=\"right\"\n\t\t\t\t\tclassName=\"block-editor-link-control__search-actions\"\n\t\t\t\t>\n\t\t\t\t\t<Button variant=\"tertiary\" onClick={ handleCancel }>\n\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\tonClick={ isDisabled ? noop : handleSubmit }\n\t\t\t\t\t\tclassName=\"block-editor-link-control__search-submit\"\n\t\t\t\t\t\taria-disabled={ isDisabled }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Save' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</HStack>\n\t\t\t) }\n\n\t\t\t{ ! isCreatingPage && renderControlBottom && renderControlBottom() }\n\t\t</div>\n\t);\n}\n\nLinkControl.ViewerFill = ViewerFill;\nLinkControl.DEFAULT_LINK_SETTINGS = DEFAULT_LINK_SETTINGS;\n\nexport default LinkControl;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SACCC,MAAM,EACNC,OAAO,EACPC,MAAM,EACNC,WAAW,EACXC,oBAAoB,IAAIC,MAAM,QACxB,uBAAuB;AAC9B,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,MAAM,EAAEC,QAAQ,EAAEC,SAAS,QAAQ,oBAAoB;AAChE,SAASC,KAAK,QAAQ,gBAAgB;AACtC,SAASC,KAAK,QAAQ,qBAAqB;AAC3C,SAASC,qBAAqB,QAAQ,6BAA6B;AACnE,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,wBAAwB;AAClE,SAASC,cAAc,QAAQ,kBAAkB;;AAEjD;AACA;AACA;AACA,OAAOC,yBAAyB,MAAM,mBAAmB;AACzD,OAAOC,sBAAsB,MAAM,gBAAgB;AACnD,OAAOC,WAAW,MAAM,gBAAgB;AACxC,OAAOC,YAAY,MAAM,YAAY;AACrC,OAAOC,aAAa,MAAM,mBAAmB;AAC7C,OAAOC,gBAAgB,MAAM,sBAAsB;AACnD,SAASC,UAAU,QAAQ,eAAe;AAC1C,SAASC,qBAAqB,QAAQ,aAAa;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AAC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;IACvC/E,QAAQ,EAAGA,CAAA,KAAM;MAChBA,QAAQ,CAAC,CAAC;MACV2C,gBAAgB,CAAE,IAAK,CAAC;IACzB;EAAG,CACH,CACD,EAECyC,YAAY,IACbC,aAAA;IAAKG,SAAS,EAAC;EAAkC,GAC9C,CAAEd,mBAAmB,IACtBW,aAAA,CAACrG,yBAAyB;IACzBiC,YAAY,EAAGW,cAAgB;IAC/BV,eAAe,EAAGQ;EAA+B,GAEjD2D,aAAA,CAAClG,YAAY;IACZU,KAAK,EAAGuC,oBAAsB;IAC9BtC,QAAQ,EAAGA,QAAU;IACrBC,QAAQ,EAAGyC,oCAAoC,CAC9CP,YACD;EAAG,CACH,CACyB,CAExB,CACL,EAEC+C,WAAW,IACZK,aAAA,CAAClH,MAAM;IACNwI,OAAO,EAAC,OAAO;IACfnB,SAAS,EAAC;EAA2C,GAErDH,aAAA,CAACvH,MAAM;IAAC8I,OAAO,EAAC,UAAU;IAACP,OAAO,EAAGxB;EAAc,GAChDzG,EAAE,CAAE,QAAS,CACR,CAAC,EACTiH,aAAA,CAACvH,MAAM;IACN8I,OAAO,EAAC,SAAS;IACjBP,OAAO,EAAGlB,UAAU,GAAG3F,IAAI,GAAG6E,YAAc;IAC5CmB,SAAS,EAAC,0CAA0C;IACpD,iBAAgBL;EAAY,GAE1B/G,EAAE,CAAE,MAAO,CACN,CACD,CACR,EAEC,CAAE0E,cAAc,IAAI/B,mBAAmB,IAAIA,mBAAmB,CAAC,CAC7D,CAAC;AAER;AAEApB,WAAW,CAACL,UAAU,GAAGA,UAAU;AACnCK,WAAW,CAACJ,qBAAqB,GAAGA,qBAAqB;AAEzD,eAAeI,WAAW","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getProtocol","isValidProtocol","isValidFragment","isURLLike","val","hasSpaces","includes","protocol","protocolIsValid","mayBeTLD","hasPossibleTLD","isWWW","startsWith","isInternal","url","maxLength","cleanedURL","split","regex","RegExp","test"],"sources":["@wordpress/block-editor/src/components/link-control/is-url-like.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getProtocol, isValidProtocol, isValidFragment } from '@wordpress/url';\n\n/**\n * Determines whether a given value could be a URL. Note this does not\n * guarantee the value is a URL only that it looks like it might be one. For\n * example, just because a string has `www.` in it doesn't make it a URL,\n * but it does make it highly likely that it will be so in the context of\n * creating a link it makes sense to treat it like one.\n *\n * @param {string} val the candidate for being URL-like (or not).\n *\n * @return {boolean} whether or not the value is potentially a URL.\n */\nexport default function isURLLike( val ) {\n\tconst hasSpaces = val.includes( ' ' );\n\n\tif ( hasSpaces ) {\n\t\treturn false;\n\t}\n\n\tconst protocol = getProtocol( val );\n\tconst protocolIsValid = isValidProtocol( protocol );\n\n\tconst mayBeTLD = hasPossibleTLD( val );\n\n\tconst isWWW = val?.startsWith( 'www.' );\n\n\tconst isInternal = val?.startsWith( '#' ) && isValidFragment( val );\n\n\treturn protocolIsValid || isWWW || isInternal || mayBeTLD;\n}\n\n/**\n * Checks if a given URL has a valid Top-Level Domain (TLD).\n *\n * @param {string} url - The URL to check.\n * @param {number} maxLength - The maximum length of the TLD.\n * @return {boolean} Returns true if the URL has a valid TLD, false otherwise.\n */\nfunction hasPossibleTLD( url, maxLength = 6 ) {\n\t// Clean the URL by removing anything after the first occurrence of \"?\" or \"#\".\n\tconst cleanedURL = url.split( /[?#]/ )[ 0 ];\n\n\t// Regular expression explanation:\n\t// - (?<=\\S) : Positive lookbehind assertion to ensure there is at least one non-whitespace character before the TLD\n\t// - \\. : Matches a literal dot (.)\n\t// - [a-zA-Z_]{2,maxLength} : Matches 2 to maxLength letters or underscores, representing the TLD\n\t// - (?:\\/|$) : Non-capturing group that matches either a forward slash (/) or the end of the string\n\tconst regex = new RegExp(\n\t\t`(?<=\\\\S)\\\\.(?:[a-zA-Z_]{2,${ maxLength }})(?:\\\\/|$)`\n\t);\n\n\treturn regex.test( cleanedURL );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAW,EAAEC,eAAe,EAAEC,eAAe,QAAQ,gBAAgB;;AAE9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,SAASA,CAAEC,GAAG,EAAG;EACxC,MAAMC,SAAS,GAAGD,GAAG,CAACE,QAAQ,CAAE,GAAI,CAAC;EAErC,IAAKD,SAAS,EAAG;IAChB,OAAO,KAAK;EACb;EAEA,MAAME,QAAQ,GAAGP,WAAW,CAAEI,GAAI,CAAC;EACnC,MAAMI,eAAe,GAAGP,eAAe,CAAEM,QAAS,CAAC;EAEnD,MAAME,QAAQ,GAAGC,cAAc,CAAEN,GAAI,CAAC;EAEtC,MAAMO,KAAK,GAAGP,GAAG,EAAEQ,UAAU,CAAE,MAAO,CAAC;EAEvC,MAAMC,UAAU,GAAGT,GAAG,EAAEQ,UAAU,CAAE,GAAI,CAAC,IAAIV,eAAe,CAAEE,GAAI,CAAC;EAEnE,OAAOI,eAAe,IAAIG,KAAK,IAAIE,UAAU,IAAIJ,QAAQ;AAC1D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,cAAcA,CAAEI,GAAG,EAAEC,SAAS,GAAG,CAAC,EAAG;EAC7C;EACA,MAAMC,UAAU,GAAGF,GAAG,CAACG,KAAK,CAAE,MAAO,CAAC,CAAE,CAAC,CAAE;;EAE3C;EACA;EACA;EACA;EACA;EACA,MAAMC,KAAK,GAAG,IAAIC,MAAM,CACtB,6BAA6BJ,SAAW,aAC1C,CAAC;EAED,OAAOG,KAAK,CAACE,IAAI,CAAEJ,UAAW,CAAC;AAChC"}
|
|
1
|
+
{"version":3,"names":["getProtocol","isValidProtocol","isValidFragment","isURLLike","val","hasSpaces","includes","protocol","protocolIsValid","mayBeTLD","hasPossibleTLD","isWWW","startsWith","isInternal","url","maxLength","cleanedURL","split","regex","RegExp","test"],"sources":["@wordpress/block-editor/src/components/link-control/is-url-like.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getProtocol, isValidProtocol, isValidFragment } from '@wordpress/url';\n\n/**\n * Determines whether a given value could be a URL. Note this does not\n * guarantee the value is a URL only that it looks like it might be one. For\n * example, just because a string has `www.` in it doesn't make it a URL,\n * but it does make it highly likely that it will be so in the context of\n * creating a link it makes sense to treat it like one.\n *\n * @param {string} val the candidate for being URL-like (or not).\n *\n * @return {boolean} whether or not the value is potentially a URL.\n */\nexport default function isURLLike( val ) {\n\tconst hasSpaces = val.includes( ' ' );\n\n\tif ( hasSpaces ) {\n\t\treturn false;\n\t}\n\n\tconst protocol = getProtocol( val );\n\tconst protocolIsValid = isValidProtocol( protocol );\n\n\tconst mayBeTLD = hasPossibleTLD( val );\n\n\tconst isWWW = val?.startsWith( 'www.' );\n\n\tconst isInternal = val?.startsWith( '#' ) && isValidFragment( val );\n\n\treturn protocolIsValid || isWWW || isInternal || mayBeTLD;\n}\n\n/**\n * Checks if a given URL has a valid Top-Level Domain (TLD).\n *\n * @param {string} url - The URL to check.\n * @param {number} maxLength - The maximum length of the TLD.\n * @return {boolean} Returns true if the URL has a valid TLD, false otherwise.\n */\nfunction hasPossibleTLD( url, maxLength = 6 ) {\n\t// Clean the URL by removing anything after the first occurrence of \"?\" or \"#\".\n\tconst cleanedURL = url.split( /[?#]/ )[ 0 ];\n\n\t// Regular expression explanation:\n\t// - (?<=\\S) : Positive lookbehind assertion to ensure there is at least one non-whitespace character before the TLD\n\t// - \\. : Matches a literal dot (.)\n\t// - [a-zA-Z_]{2,maxLength} : Matches 2 to maxLength letters or underscores, representing the TLD\n\t// - (?:\\/|$) : Non-capturing group that matches either a forward slash (/) or the end of the string\n\tconst regex = new RegExp(\n\t\t`(?<=\\\\S)\\\\.(?:[a-zA-Z_]{2,${ maxLength }})(?:\\\\/|$)`\n\t);\n\n\treturn regex.test( cleanedURL );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAW,EAAEC,eAAe,EAAEC,eAAe,QAAQ,gBAAgB;;AAE9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,SAASA,CAAEC,GAAG,EAAG;EACxC,MAAMC,SAAS,GAAGD,GAAG,CAACE,QAAQ,CAAE,GAAI,CAAC;EAErC,IAAKD,SAAS,EAAG;IAChB,OAAO,KAAK;EACb;EAEA,MAAME,QAAQ,GAAGP,WAAW,CAAEI,GAAI,CAAC;EACnC,MAAMI,eAAe,GAAGP,eAAe,CAAEM,QAAS,CAAC;EAEnD,MAAME,QAAQ,GAAGC,cAAc,CAAEN,GAAI,CAAC;EAEtC,MAAMO,KAAK,GAAGP,GAAG,EAAEQ,UAAU,CAAE,MAAO,CAAC;EAEvC,MAAMC,UAAU,GAAGT,GAAG,EAAEQ,UAAU,CAAE,GAAI,CAAC,IAAIV,eAAe,CAAEE,GAAI,CAAC;EAEnE,OAAOI,eAAe,IAAIG,KAAK,IAAIE,UAAU,IAAIJ,QAAQ;AAC1D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,cAAcA,CAAEI,GAAG,EAAEC,SAAS,GAAG,CAAC,EAAG;EAC7C;EACA,MAAMC,UAAU,GAAGF,GAAG,CAACG,KAAK,CAAE,MAAO,CAAC,CAAE,CAAC,CAAE;;EAE3C;EACA;EACA;EACA;EACA;EACA,MAAMC,KAAK,GAAG,IAAIC,MAAM,CACtB,6BAA6BJ,SAAW,aAC1C,CAAC;EAED,OAAOG,KAAK,CAACE,IAAI,CAAEJ,UAAW,CAAC;AAChC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["classnames","__","sprintf","Button","ExternalLink","__experimentalTruncate","Truncate","useCopyToClipboard","filterURLForDisplay","safeDecodeURI","Icon","globe","info","linkOff","edit","copySmall","__unstableStripHTML","stripHTML","useDispatch","useSelect","store","noticesStore","preferencesStore","ViewerSlot","useRichUrlData","LinkPreview","value","onEditClick","hasRichPreviews","hasUnlinkControl","onRemove","showIconLabels","select","get","showRichPreviews","url","richData","isFetching","hasRichData","Object","keys","length","displayURL","isEmptyURL","displayTitle","title","icon","createElement","src","alt","size","createNotice","ref","isDismissible","type","className","Fragment","href","numberOfLines","label","onClick","disabled","fillProps"],"sources":["@wordpress/block-editor/src/components/link-control/link-preview.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\tButton,\n\tExternalLink,\n\t__experimentalTruncate as Truncate,\n} from '@wordpress/components';\nimport { useCopyToClipboard } from '@wordpress/compose';\nimport { filterURLForDisplay, safeDecodeURI } from '@wordpress/url';\nimport { Icon, globe, info, linkOff, edit, copySmall } from '@wordpress/icons';\nimport { __unstableStripHTML as stripHTML } from '@wordpress/dom';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport { ViewerSlot } from './viewer-slot';\n\nimport useRichUrlData from './use-rich-url-data';\n\nexport default function LinkPreview( {\n\tvalue,\n\tonEditClick,\n\thasRichPreviews = false,\n\thasUnlinkControl = false,\n\tonRemove,\n} ) {\n\tconst showIconLabels = useSelect(\n\t\t( select ) =>\n\t\t\tselect( preferencesStore ).get( 'core', 'showIconLabels' ),\n\t\t[]\n\t);\n\n\t// Avoid fetching if rich previews are not desired.\n\tconst showRichPreviews = hasRichPreviews ? value?.url : null;\n\n\tconst { richData, isFetching } = useRichUrlData( showRichPreviews );\n\n\t// Rich data may be an empty object so test for that.\n\tconst hasRichData = richData && Object.keys( richData ).length;\n\n\tconst displayURL =\n\t\t( value && filterURLForDisplay( safeDecodeURI( value.url ), 24 ) ) ||\n\t\t'';\n\n\t// url can be undefined if the href attribute is unset\n\tconst isEmptyURL = ! value?.url?.length;\n\n\tconst displayTitle =\n\t\t! isEmptyURL &&\n\t\tstripHTML( richData?.title || value?.title || displayURL );\n\n\tlet icon;\n\n\tif ( richData?.icon ) {\n\t\ticon = <img src={ richData?.icon } alt=\"\" />;\n\t} else if ( isEmptyURL ) {\n\t\ticon = <Icon icon={ info } size={ 32 } />;\n\t} else {\n\t\ticon = <Icon icon={ globe } />;\n\t}\n\n\tconst { createNotice } = useDispatch( noticesStore );\n\tconst ref = useCopyToClipboard( value.url, () => {\n\t\tcreateNotice( 'info', __( 'Link copied to clipboard.' ), {\n\t\t\tisDismissible: true,\n\t\t\ttype: 'snackbar',\n\t\t} );\n\t} );\n\n\treturn (\n\t\t<div\n\t\t\taria-label={ __( 'Currently selected' ) }\n\t\t\tclassName={ classnames( 'block-editor-link-control__search-item', {\n\t\t\t\t'is-current': true,\n\t\t\t\t'is-rich': hasRichData,\n\t\t\t\t'is-fetching': !! isFetching,\n\t\t\t\t'is-preview': true,\n\t\t\t\t'is-error': isEmptyURL,\n\t\t\t\t'is-url-title': displayTitle === displayURL,\n\t\t\t} ) }\n\t\t>\n\t\t\t<div className=\"block-editor-link-control__search-item-top\">\n\t\t\t\t<span className=\"block-editor-link-control__search-item-header\">\n\t\t\t\t\t<span\n\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t'block-editor-link-control__search-item-icon',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'is-image': richData?.icon,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ icon }\n\t\t\t\t\t</span>\n\t\t\t\t\t<span className=\"block-editor-link-control__search-item-details\">\n\t\t\t\t\t\t{ ! isEmptyURL ? (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\tclassName=\"block-editor-link-control__search-item-title\"\n\t\t\t\t\t\t\t\t\thref={ value.url }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Truncate numberOfLines={ 1 }>\n\t\t\t\t\t\t\t\t\t\t{ displayTitle }\n\t\t\t\t\t\t\t\t\t</Truncate>\n\t\t\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t\t\t\t{ value?.url && displayTitle !== displayURL && (\n\t\t\t\t\t\t\t\t\t<span className=\"block-editor-link-control__search-item-info\">\n\t\t\t\t\t\t\t\t\t\t<Truncate numberOfLines={ 1 }>\n\t\t\t\t\t\t\t\t\t\t\t{ displayURL }\n\t\t\t\t\t\t\t\t\t\t</Truncate>\n\t\t\t\t\t\t\t\t\t</span>\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\t\t<span className=\"block-editor-link-control__search-item-error-notice\">\n\t\t\t\t\t\t\t\t{ __( 'Link is empty' ) }\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</span>\n\t\t\t\t</span>\n\t\t\t\t<Button\n\t\t\t\t\ticon={ edit }\n\t\t\t\t\tlabel={ __( 'Edit link' ) }\n\t\t\t\t\tonClick={ onEditClick }\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t/>\n\t\t\t\t{ hasUnlinkControl && (\n\t\t\t\t\t<Button\n\t\t\t\t\t\ticon={ linkOff }\n\t\t\t\t\t\tlabel={ __( 'Remove link' ) }\n\t\t\t\t\t\tonClick={ onRemove }\n\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t<Button\n\t\t\t\t\ticon={ copySmall }\n\t\t\t\t\tlabel={ sprintf(\n\t\t\t\t\t\t// Translators: %s is a placeholder for the link URL and an optional colon, (if a Link URL is present).\n\t\t\t\t\t\t__( 'Copy link%s' ), // Ends up looking like \"Copy link: https://example.com\".\n\t\t\t\t\t\tisEmptyURL || showIconLabels ? '' : ': ' + value.url\n\t\t\t\t\t) }\n\t\t\t\t\tref={ ref }\n\t\t\t\t\tdisabled={ isEmptyURL }\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t/>\n\t\t\t\t<ViewerSlot fillProps={ value } />\n\t\t\t</div>\n\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,EAAGzD,OAAO;IACd;IACAD,EAAE,CAAE,aAAc,CAAC;IAAE;IACrB0C,UAAU,IAAIZ,cAAc,GAAG,EAAE,GAAG,IAAI,GAAGL,KAAK,CAACS,GAClD,CAAG;IACHiB,GAAG,EAAGA,GAAK;IACXS,QAAQ,EAAGlB,UAAY;IACvBO,IAAI,EAAC;EAAS,CACd,CAAC,EACFH,aAAA,CAACxB,UAAU;IAACuC,SAAS,EAAGpC;EAAO,CAAE,CAC7B,CACD,CAAC;AAER"}
|
|
1
|
+
{"version":3,"names":["classnames","__","sprintf","Button","ExternalLink","__experimentalTruncate","Truncate","useCopyToClipboard","filterURLForDisplay","safeDecodeURI","Icon","globe","info","linkOff","edit","copySmall","__unstableStripHTML","stripHTML","useDispatch","useSelect","store","noticesStore","preferencesStore","ViewerSlot","useRichUrlData","LinkPreview","value","onEditClick","hasRichPreviews","hasUnlinkControl","onRemove","showIconLabels","select","get","showRichPreviews","url","richData","isFetching","hasRichData","Object","keys","length","displayURL","isEmptyURL","displayTitle","title","icon","createElement","src","alt","size","createNotice","ref","isDismissible","type","className","Fragment","href","numberOfLines","label","onClick","disabled","fillProps"],"sources":["@wordpress/block-editor/src/components/link-control/link-preview.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\tButton,\n\tExternalLink,\n\t__experimentalTruncate as Truncate,\n} from '@wordpress/components';\nimport { useCopyToClipboard } from '@wordpress/compose';\nimport { filterURLForDisplay, safeDecodeURI } from '@wordpress/url';\nimport { Icon, globe, info, linkOff, edit, copySmall } from '@wordpress/icons';\nimport { __unstableStripHTML as stripHTML } from '@wordpress/dom';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport { ViewerSlot } from './viewer-slot';\n\nimport useRichUrlData from './use-rich-url-data';\n\nexport default function LinkPreview( {\n\tvalue,\n\tonEditClick,\n\thasRichPreviews = false,\n\thasUnlinkControl = false,\n\tonRemove,\n} ) {\n\tconst showIconLabels = useSelect(\n\t\t( select ) =>\n\t\t\tselect( preferencesStore ).get( 'core', 'showIconLabels' ),\n\t\t[]\n\t);\n\n\t// Avoid fetching if rich previews are not desired.\n\tconst showRichPreviews = hasRichPreviews ? value?.url : null;\n\n\tconst { richData, isFetching } = useRichUrlData( showRichPreviews );\n\n\t// Rich data may be an empty object so test for that.\n\tconst hasRichData = richData && Object.keys( richData ).length;\n\n\tconst displayURL =\n\t\t( value && filterURLForDisplay( safeDecodeURI( value.url ), 24 ) ) ||\n\t\t'';\n\n\t// url can be undefined if the href attribute is unset\n\tconst isEmptyURL = ! value?.url?.length;\n\n\tconst displayTitle =\n\t\t! isEmptyURL &&\n\t\tstripHTML( richData?.title || value?.title || displayURL );\n\n\tlet icon;\n\n\tif ( richData?.icon ) {\n\t\ticon = <img src={ richData?.icon } alt=\"\" />;\n\t} else if ( isEmptyURL ) {\n\t\ticon = <Icon icon={ info } size={ 32 } />;\n\t} else {\n\t\ticon = <Icon icon={ globe } />;\n\t}\n\n\tconst { createNotice } = useDispatch( noticesStore );\n\tconst ref = useCopyToClipboard( value.url, () => {\n\t\tcreateNotice( 'info', __( 'Link copied to clipboard.' ), {\n\t\t\tisDismissible: true,\n\t\t\ttype: 'snackbar',\n\t\t} );\n\t} );\n\n\treturn (\n\t\t<div\n\t\t\taria-label={ __( 'Currently selected' ) }\n\t\t\tclassName={ classnames( 'block-editor-link-control__search-item', {\n\t\t\t\t'is-current': true,\n\t\t\t\t'is-rich': hasRichData,\n\t\t\t\t'is-fetching': !! isFetching,\n\t\t\t\t'is-preview': true,\n\t\t\t\t'is-error': isEmptyURL,\n\t\t\t\t'is-url-title': displayTitle === displayURL,\n\t\t\t} ) }\n\t\t>\n\t\t\t<div className=\"block-editor-link-control__search-item-top\">\n\t\t\t\t<span className=\"block-editor-link-control__search-item-header\">\n\t\t\t\t\t<span\n\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t'block-editor-link-control__search-item-icon',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'is-image': richData?.icon,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ icon }\n\t\t\t\t\t</span>\n\t\t\t\t\t<span className=\"block-editor-link-control__search-item-details\">\n\t\t\t\t\t\t{ ! isEmptyURL ? (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\tclassName=\"block-editor-link-control__search-item-title\"\n\t\t\t\t\t\t\t\t\thref={ value.url }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Truncate numberOfLines={ 1 }>\n\t\t\t\t\t\t\t\t\t\t{ displayTitle }\n\t\t\t\t\t\t\t\t\t</Truncate>\n\t\t\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t\t\t\t{ value?.url && displayTitle !== displayURL && (\n\t\t\t\t\t\t\t\t\t<span className=\"block-editor-link-control__search-item-info\">\n\t\t\t\t\t\t\t\t\t\t<Truncate numberOfLines={ 1 }>\n\t\t\t\t\t\t\t\t\t\t\t{ displayURL }\n\t\t\t\t\t\t\t\t\t\t</Truncate>\n\t\t\t\t\t\t\t\t\t</span>\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\t\t<span className=\"block-editor-link-control__search-item-error-notice\">\n\t\t\t\t\t\t\t\t{ __( 'Link is empty' ) }\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</span>\n\t\t\t\t</span>\n\t\t\t\t<Button\n\t\t\t\t\ticon={ edit }\n\t\t\t\t\tlabel={ __( 'Edit link' ) }\n\t\t\t\t\tonClick={ onEditClick }\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t/>\n\t\t\t\t{ hasUnlinkControl && (\n\t\t\t\t\t<Button\n\t\t\t\t\t\ticon={ linkOff }\n\t\t\t\t\t\tlabel={ __( 'Remove link' ) }\n\t\t\t\t\t\tonClick={ onRemove }\n\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t<Button\n\t\t\t\t\ticon={ copySmall }\n\t\t\t\t\tlabel={ sprintf(\n\t\t\t\t\t\t// Translators: %s is a placeholder for the link URL and an optional colon, (if a Link URL is present).\n\t\t\t\t\t\t__( 'Copy link%s' ), // Ends up looking like \"Copy link: https://example.com\".\n\t\t\t\t\t\tisEmptyURL || showIconLabels ? '' : ': ' + value.url\n\t\t\t\t\t) }\n\t\t\t\t\tref={ ref }\n\t\t\t\t\tdisabled={ isEmptyURL }\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t/>\n\t\t\t\t<ViewerSlot fillProps={ value } />\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SACCC,MAAM,EACNC,YAAY,EACZC,sBAAsB,IAAIC,QAAQ,QAC5B,uBAAuB;AAC9B,SAASC,kBAAkB,QAAQ,oBAAoB;AACvD,SAASC,mBAAmB,EAAEC,aAAa,QAAQ,gBAAgB;AACnE,SAASC,IAAI,EAAEC,KAAK,EAAEC,IAAI,EAAEC,OAAO,EAAEC,IAAI,EAAEC,SAAS,QAAQ,kBAAkB;AAC9E,SAASC,mBAAmB,IAAIC,SAAS,QAAQ,gBAAgB;AACjE,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SAASC,KAAK,IAAIC,YAAY,QAAQ,oBAAoB;AAC1D,SAASD,KAAK,IAAIE,gBAAgB,QAAQ,wBAAwB;;AAElE;AACA;AACA;AACA,SAASC,UAAU,QAAQ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,GAC5DR,aAAA,CAACzC,QAAQ;IAACoD,aAAa,EAAG;EAAG,GAC1BhB,UACO,CACL,CAEN,CAAC,GAEHK,aAAA;IAAMQ,SAAS,EAAC;EAAqD,GAClEtD,EAAE,CAAE,eAAgB,CACjB,CAEF,CACD,CAAC,EACP8C,aAAA,CAAC5C,MAAM;IACN2C,IAAI,EAAGhC,IAAM;IACb6C,KAAK,EAAG1D,EAAE,CAAE,WAAY,CAAG;IAC3B2D,OAAO,EAAGjC,WAAa;IACvBuB,IAAI,EAAC;EAAS,CACd,CAAC,EACArB,gBAAgB,IACjBkB,aAAA,CAAC5C,MAAM;IACN2C,IAAI,EAAGjC,OAAS;IAChB8C,KAAK,EAAG1D,EAAE,CAAE,aAAc,CAAG;IAC7B2D,OAAO,EAAG9B,QAAU;IACpBoB,IAAI,EAAC;EAAS,CACd,CACD,EACDH,aAAA,CAAC5C,MAAM;IACN2C,IAAI,EAAG/B,SAAW;IAClB4C,KAAK,EAAGzD,OAAO;IACd;IACAD,EAAE,CAAE,aAAc,CAAC;IAAE;IACrB0C,UAAU,IAAIZ,cAAc,GAAG,EAAE,GAAG,IAAI,GAAGL,KAAK,CAACS,GAClD,CAAG;IACHiB,GAAG,EAAGA,GAAK;IACXS,QAAQ,EAAGlB,UAAY;IACvBO,IAAI,EAAC;EAAS,CACd,CAAC,EACFH,aAAA,CAACxB,UAAU;IAACuC,SAAS,EAAGpC;EAAO,CAAE,CAC7B,CACD,CAAC;AAER","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__","sprintf","MenuItem","createInterpolateElement","plus","LinkControlSearchCreate","searchTerm","onClick","itemProps","buttonText","text","mark","createElement","iconPosition","icon","className"],"sources":["@wordpress/block-editor/src/components/link-control/search-create-button.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { MenuItem } from '@wordpress/components';\nimport { createInterpolateElement } from '@wordpress/element';\nimport { plus } from '@wordpress/icons';\n\nexport const LinkControlSearchCreate = ( {\n\tsearchTerm,\n\tonClick,\n\titemProps,\n\tbuttonText,\n} ) => {\n\tif ( ! searchTerm ) {\n\t\treturn null;\n\t}\n\n\tlet text;\n\tif ( buttonText ) {\n\t\ttext =\n\t\t\ttypeof buttonText === 'function'\n\t\t\t\t? buttonText( searchTerm )\n\t\t\t\t: buttonText;\n\t} else {\n\t\ttext = createInterpolateElement(\n\t\t\tsprintf(\n\t\t\t\t/* translators: %s: search term. */\n\t\t\t\t__( 'Create: <mark>%s</mark>' ),\n\t\t\t\tsearchTerm\n\t\t\t),\n\t\t\t{ mark: <mark /> }\n\t\t);\n\t}\n\n\treturn (\n\t\t<MenuItem\n\t\t\t{ ...itemProps }\n\t\t\ticonPosition=\"left\"\n\t\t\ticon={ plus }\n\t\t\tclassName=\"block-editor-link-control__search-item\"\n\t\t\tonClick={ onClick }\n\t\t>\n\t\t\t{ text }\n\t\t</MenuItem>\n\t);\n};\n\nexport default LinkControlSearchCreate;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SAASC,QAAQ,QAAQ,uBAAuB;AAChD,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,IAAI,QAAQ,kBAAkB;AAEvC,OAAO,MAAMC,uBAAuB,GAAGA,CAAE;EACxCC,UAAU;EACVC,OAAO;EACPC,SAAS;EACTC;AACD,CAAC,KAAM;EACN,IAAK,CAAEH,UAAU,EAAG;IACnB,OAAO,IAAI;EACZ;EAEA,IAAII,IAAI;EACR,IAAKD,UAAU,EAAG;IACjBC,IAAI,GACH,OAAOD,UAAU,KAAK,UAAU,GAC7BA,UAAU,CAAEH,UAAW,CAAC,GACxBG,UAAU;EACf,CAAC,MAAM;IACNC,IAAI,GAAGP,wBAAwB,CAC9BF,OAAO,EACN;IACAD,EAAE,CAAE,yBAA0B,CAAC,EAC/BM,UACD,CAAC,EACD;MAAEK,IAAI,EAAEC,aAAA,aAAO;IAAE,CAClB,CAAC;EACF;EAEA,OACCA,aAAA,CAACV,QAAQ;IAAA,GACHM,SAAS;IACdK,YAAY,EAAC,MAAM;IACnBC,IAAI,EAAGV,IAAM;IACbW,SAAS,EAAC,wCAAwC;IAClDR,OAAO,EAAGA;EAAS,GAEjBG,IACO,CAAC;AAEb,CAAC;AAED,eAAeL,uBAAuB"}
|
|
1
|
+
{"version":3,"names":["__","sprintf","MenuItem","createInterpolateElement","plus","LinkControlSearchCreate","searchTerm","onClick","itemProps","buttonText","text","mark","createElement","iconPosition","icon","className"],"sources":["@wordpress/block-editor/src/components/link-control/search-create-button.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { MenuItem } from '@wordpress/components';\nimport { createInterpolateElement } from '@wordpress/element';\nimport { plus } from '@wordpress/icons';\n\nexport const LinkControlSearchCreate = ( {\n\tsearchTerm,\n\tonClick,\n\titemProps,\n\tbuttonText,\n} ) => {\n\tif ( ! searchTerm ) {\n\t\treturn null;\n\t}\n\n\tlet text;\n\tif ( buttonText ) {\n\t\ttext =\n\t\t\ttypeof buttonText === 'function'\n\t\t\t\t? buttonText( searchTerm )\n\t\t\t\t: buttonText;\n\t} else {\n\t\ttext = createInterpolateElement(\n\t\t\tsprintf(\n\t\t\t\t/* translators: %s: search term. */\n\t\t\t\t__( 'Create: <mark>%s</mark>' ),\n\t\t\t\tsearchTerm\n\t\t\t),\n\t\t\t{ mark: <mark /> }\n\t\t);\n\t}\n\n\treturn (\n\t\t<MenuItem\n\t\t\t{ ...itemProps }\n\t\t\ticonPosition=\"left\"\n\t\t\ticon={ plus }\n\t\t\tclassName=\"block-editor-link-control__search-item\"\n\t\t\tonClick={ onClick }\n\t\t>\n\t\t\t{ text }\n\t\t</MenuItem>\n\t);\n};\n\nexport default LinkControlSearchCreate;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SAASC,QAAQ,QAAQ,uBAAuB;AAChD,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,IAAI,QAAQ,kBAAkB;AAEvC,OAAO,MAAMC,uBAAuB,GAAGA,CAAE;EACxCC,UAAU;EACVC,OAAO;EACPC,SAAS;EACTC;AACD,CAAC,KAAM;EACN,IAAK,CAAEH,UAAU,EAAG;IACnB,OAAO,IAAI;EACZ;EAEA,IAAII,IAAI;EACR,IAAKD,UAAU,EAAG;IACjBC,IAAI,GACH,OAAOD,UAAU,KAAK,UAAU,GAC7BA,UAAU,CAAEH,UAAW,CAAC,GACxBG,UAAU;EACf,CAAC,MAAM;IACNC,IAAI,GAAGP,wBAAwB,CAC9BF,OAAO,EACN;IACAD,EAAE,CAAE,yBAA0B,CAAC,EAC/BM,UACD,CAAC,EACD;MAAEK,IAAI,EAAEC,aAAA,aAAO;IAAE,CAClB,CAAC;EACF;EAEA,OACCA,aAAA,CAACV,QAAQ;IAAA,GACHM,SAAS;IACdK,YAAY,EAAC,MAAM;IACnBC,IAAI,EAAGV,IAAM;IACbW,SAAS,EAAC,wCAAwC;IAClDR,OAAO,EAAGA;EAAS,GAEjBG,IACO,CAAC;AAEb,CAAC;AAED,eAAeL,uBAAuB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useInstanceId","forwardRef","useState","__","URLInput","LinkControlSearchResults","CREATE_TYPE","useSearchHandler","noopSearchHandler","Promise","resolve","noop","LinkControlSearchInput","value","children","currentLink","className","placeholder","withCreateSuggestion","onCreateSuggestion","onChange","onSelect","showSuggestions","renderSuggestions","props","createElement","fetchSuggestions","allowDirectEntry","showInitialSuggestions","suggestionsQuery","withURLSuggestion","createSuggestionButtonText","hideLabelFromVision","ref","genericSearchHandler","searchHandler","instanceId","focusedSuggestion","setFocusedSuggestion","onInputChange","selection","suggestion","handleRenderSuggestions","handleSuggestionClick","onSuggestionSelected","selectedSuggestion","type","title","url","e","Object","keys","length","id","restLinkProps","disableSuggestions","__nextHasNoMarginBottom","label","__experimentalRenderSuggestions","__experimentalFetchLinkSuggestions","__experimentalHandleURLSuggestions","__experimentalShowInitialSuggestions","onSubmit","event","hasSuggestion","trim","preventDefault"],"sources":["@wordpress/block-editor/src/components/link-control/search-input.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef, useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { URLInput } from '../';\nimport LinkControlSearchResults from './search-results';\nimport { CREATE_TYPE } from './constants';\nimport useSearchHandler from './use-search-handler';\n\n// Must be a function as otherwise URLInput will default\n// to the fetchLinkSuggestions passed in block editor settings\n// which will cause an unintended http request.\nconst noopSearchHandler = () => Promise.resolve( [] );\n\nconst noop = () => {};\n\nconst LinkControlSearchInput = forwardRef(\n\t(\n\t\t{\n\t\t\tvalue,\n\t\t\tchildren,\n\t\t\tcurrentLink = {},\n\t\t\tclassName = null,\n\t\t\tplaceholder = null,\n\t\t\twithCreateSuggestion = false,\n\t\t\tonCreateSuggestion = noop,\n\t\t\tonChange = noop,\n\t\t\tonSelect = noop,\n\t\t\tshowSuggestions = true,\n\t\t\trenderSuggestions = ( props ) => (\n\t\t\t\t<LinkControlSearchResults { ...props } />\n\t\t\t),\n\t\t\tfetchSuggestions = null,\n\t\t\tallowDirectEntry = true,\n\t\t\tshowInitialSuggestions = false,\n\t\t\tsuggestionsQuery = {},\n\t\t\twithURLSuggestion = true,\n\t\t\tcreateSuggestionButtonText,\n\t\t\thideLabelFromVision = false,\n\t\t},\n\t\tref\n\t) => {\n\t\tconst genericSearchHandler = useSearchHandler(\n\t\t\tsuggestionsQuery,\n\t\t\tallowDirectEntry,\n\t\t\twithCreateSuggestion,\n\t\t\twithURLSuggestion\n\t\t);\n\n\t\tconst searchHandler = showSuggestions\n\t\t\t? fetchSuggestions || genericSearchHandler\n\t\t\t: noopSearchHandler;\n\n\t\tconst instanceId = useInstanceId( LinkControlSearchInput );\n\t\tconst [ focusedSuggestion, setFocusedSuggestion ] = useState();\n\n\t\t/**\n\t\t * Handles the user moving between different suggestions. Does not handle\n\t\t * choosing an individual item.\n\t\t *\n\t\t * @param {string} selection the url of the selected suggestion.\n\t\t * @param {Object} suggestion the suggestion object.\n\t\t */\n\t\tconst onInputChange = ( selection, suggestion ) => {\n\t\t\tonChange( selection );\n\t\t\tsetFocusedSuggestion( suggestion );\n\t\t};\n\n\t\tconst handleRenderSuggestions = ( props ) =>\n\t\t\trenderSuggestions( {\n\t\t\t\t...props,\n\t\t\t\tinstanceId,\n\t\t\t\twithCreateSuggestion,\n\t\t\t\tcreateSuggestionButtonText,\n\t\t\t\tsuggestionsQuery,\n\t\t\t\thandleSuggestionClick: ( suggestion ) => {\n\t\t\t\t\tif ( props.handleSuggestionClick ) {\n\t\t\t\t\t\tprops.handleSuggestionClick( suggestion );\n\t\t\t\t\t}\n\t\t\t\t\tonSuggestionSelected( suggestion );\n\t\t\t\t},\n\t\t\t} );\n\n\t\tconst onSuggestionSelected = async ( selectedSuggestion ) => {\n\t\t\tlet suggestion = selectedSuggestion;\n\t\t\tif ( CREATE_TYPE === selectedSuggestion.type ) {\n\t\t\t\t// Create a new page and call onSelect with the output from the onCreateSuggestion callback.\n\t\t\t\ttry {\n\t\t\t\t\tsuggestion = await onCreateSuggestion(\n\t\t\t\t\t\tselectedSuggestion.title\n\t\t\t\t\t);\n\t\t\t\t\tif ( suggestion?.url ) {\n\t\t\t\t\t\tonSelect( suggestion );\n\t\t\t\t\t}\n\t\t\t\t} catch ( e ) {}\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tallowDirectEntry ||\n\t\t\t\t( suggestion && Object.keys( suggestion ).length >= 1 )\n\t\t\t) {\n\t\t\t\tconst { id, url, ...restLinkProps } = currentLink ?? {};\n\t\t\t\tonSelect(\n\t\t\t\t\t// Some direct entries don't have types or IDs, and we still need to clear the previous ones.\n\t\t\t\t\t{ ...restLinkProps, ...suggestion },\n\t\t\t\t\tsuggestion\n\t\t\t\t);\n\t\t\t}\n\t\t};\n\n\t\treturn (\n\t\t\t<div className=\"block-editor-link-control__search-input-container\">\n\t\t\t\t<URLInput\n\t\t\t\t\tdisableSuggestions={ currentLink?.url === value }\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Link' ) }\n\t\t\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\t\t\tclassName={ className }\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\tonChange={ onInputChange }\n\t\t\t\t\tplaceholder={ placeholder ?? __( 'Search or type url' ) }\n\t\t\t\t\t__experimentalRenderSuggestions={\n\t\t\t\t\t\tshowSuggestions ? handleRenderSuggestions : null\n\t\t\t\t\t}\n\t\t\t\t\t__experimentalFetchLinkSuggestions={ searchHandler }\n\t\t\t\t\t__experimentalHandleURLSuggestions\n\t\t\t\t\t__experimentalShowInitialSuggestions={\n\t\t\t\t\t\tshowInitialSuggestions\n\t\t\t\t\t}\n\t\t\t\t\tonSubmit={ ( suggestion, event ) => {\n\t\t\t\t\t\tconst hasSuggestion = suggestion || focusedSuggestion;\n\n\t\t\t\t\t\t// If there is no suggestion and the value (ie: any manually entered URL) is empty\n\t\t\t\t\t\t// then don't allow submission otherwise we get empty links.\n\t\t\t\t\t\tif ( ! hasSuggestion && ! value?.trim()?.length ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tonSuggestionSelected(\n\t\t\t\t\t\t\t\thasSuggestion || { url: value }\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\tref={ ref }\n\t\t\t\t/>\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t);\n\t}\n);\n\nexport default LinkControlSearchInput;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,aAAa,QAAQ,oBAAoB;AAClD,SAASC,UAAU,EAAE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;EACD,CAAC;EAED,OACChB,aAAA;IAAKT,SAAS,EAAC;EAAmD,GACjES,aAAA,CAACrB,QAAQ;IACRmD,kBAAkB,EAAGxC,WAAW,EAAEiC,GAAG,KAAKnC,KAAO;IACjD2C,uBAAuB;IACvBC,KAAK,EAAGtD,EAAE,CAAE,MAAO,CAAG;IACtB6B,mBAAmB,EAAGA,mBAAqB;IAC3ChB,SAAS,EAAGA,SAAW;IACvBH,KAAK,EAAGA,KAAO;IACfO,QAAQ,EAAGmB,aAAe;IAC1BtB,WAAW,EAAGA,WAAW,aAAXA,WAAW,cAAXA,WAAW,GAAId,EAAE,CAAE,oBAAqB,CAAG;IACzDuD,+BAA+B,EAC9BpC,eAAe,GAAGoB,uBAAuB,GAAG,IAC5C;IACDiB,kCAAkC,EAAGxB,aAAe;IACpDyB,kCAAkC;IAClCC,oCAAoC,EACnCjC,sBACA;IACDkC,QAAQ,EAAGA,CAAErB,UAAU,EAAEsB,KAAK,KAAM;MACnC,MAAMC,aAAa,GAAGvB,UAAU,IAAIJ,iBAAiB;;MAErD;MACA;MACA,IAAK,CAAE2B,aAAa,IAAI,CAAEnD,KAAK,EAAEoD,IAAI,CAAC,CAAC,EAAEb,MAAM,EAAG;QACjDW,KAAK,CAACG,cAAc,CAAC,CAAC;MACvB,CAAC,MAAM;QACNtB,oBAAoB,CACnBoB,aAAa,IAAI;UAAEhB,GAAG,EAAEnC;QAAM,CAC/B,CAAC;MACF;IACD,CAAG;IACHoB,GAAG,EAAGA;EAAK,CACX,CAAC,EACAnB,QACE,CAAC;AAER,CACD,CAAC;AAED,eAAeF,sBAAsB"}
|
|
1
|
+
{"version":3,"names":["useInstanceId","forwardRef","useState","__","URLInput","LinkControlSearchResults","CREATE_TYPE","useSearchHandler","noopSearchHandler","Promise","resolve","noop","LinkControlSearchInput","value","children","currentLink","className","placeholder","withCreateSuggestion","onCreateSuggestion","onChange","onSelect","showSuggestions","renderSuggestions","props","createElement","fetchSuggestions","allowDirectEntry","showInitialSuggestions","suggestionsQuery","withURLSuggestion","createSuggestionButtonText","hideLabelFromVision","ref","genericSearchHandler","searchHandler","instanceId","focusedSuggestion","setFocusedSuggestion","onInputChange","selection","suggestion","handleRenderSuggestions","handleSuggestionClick","onSuggestionSelected","selectedSuggestion","type","title","url","e","Object","keys","length","id","restLinkProps","disableSuggestions","__nextHasNoMarginBottom","label","__experimentalRenderSuggestions","__experimentalFetchLinkSuggestions","__experimentalHandleURLSuggestions","__experimentalShowInitialSuggestions","onSubmit","event","hasSuggestion","trim","preventDefault"],"sources":["@wordpress/block-editor/src/components/link-control/search-input.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef, useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { URLInput } from '../';\nimport LinkControlSearchResults from './search-results';\nimport { CREATE_TYPE } from './constants';\nimport useSearchHandler from './use-search-handler';\n\n// Must be a function as otherwise URLInput will default\n// to the fetchLinkSuggestions passed in block editor settings\n// which will cause an unintended http request.\nconst noopSearchHandler = () => Promise.resolve( [] );\n\nconst noop = () => {};\n\nconst LinkControlSearchInput = forwardRef(\n\t(\n\t\t{\n\t\t\tvalue,\n\t\t\tchildren,\n\t\t\tcurrentLink = {},\n\t\t\tclassName = null,\n\t\t\tplaceholder = null,\n\t\t\twithCreateSuggestion = false,\n\t\t\tonCreateSuggestion = noop,\n\t\t\tonChange = noop,\n\t\t\tonSelect = noop,\n\t\t\tshowSuggestions = true,\n\t\t\trenderSuggestions = ( props ) => (\n\t\t\t\t<LinkControlSearchResults { ...props } />\n\t\t\t),\n\t\t\tfetchSuggestions = null,\n\t\t\tallowDirectEntry = true,\n\t\t\tshowInitialSuggestions = false,\n\t\t\tsuggestionsQuery = {},\n\t\t\twithURLSuggestion = true,\n\t\t\tcreateSuggestionButtonText,\n\t\t\thideLabelFromVision = false,\n\t\t},\n\t\tref\n\t) => {\n\t\tconst genericSearchHandler = useSearchHandler(\n\t\t\tsuggestionsQuery,\n\t\t\tallowDirectEntry,\n\t\t\twithCreateSuggestion,\n\t\t\twithURLSuggestion\n\t\t);\n\n\t\tconst searchHandler = showSuggestions\n\t\t\t? fetchSuggestions || genericSearchHandler\n\t\t\t: noopSearchHandler;\n\n\t\tconst instanceId = useInstanceId( LinkControlSearchInput );\n\t\tconst [ focusedSuggestion, setFocusedSuggestion ] = useState();\n\n\t\t/**\n\t\t * Handles the user moving between different suggestions. Does not handle\n\t\t * choosing an individual item.\n\t\t *\n\t\t * @param {string} selection the url of the selected suggestion.\n\t\t * @param {Object} suggestion the suggestion object.\n\t\t */\n\t\tconst onInputChange = ( selection, suggestion ) => {\n\t\t\tonChange( selection );\n\t\t\tsetFocusedSuggestion( suggestion );\n\t\t};\n\n\t\tconst handleRenderSuggestions = ( props ) =>\n\t\t\trenderSuggestions( {\n\t\t\t\t...props,\n\t\t\t\tinstanceId,\n\t\t\t\twithCreateSuggestion,\n\t\t\t\tcreateSuggestionButtonText,\n\t\t\t\tsuggestionsQuery,\n\t\t\t\thandleSuggestionClick: ( suggestion ) => {\n\t\t\t\t\tif ( props.handleSuggestionClick ) {\n\t\t\t\t\t\tprops.handleSuggestionClick( suggestion );\n\t\t\t\t\t}\n\t\t\t\t\tonSuggestionSelected( suggestion );\n\t\t\t\t},\n\t\t\t} );\n\n\t\tconst onSuggestionSelected = async ( selectedSuggestion ) => {\n\t\t\tlet suggestion = selectedSuggestion;\n\t\t\tif ( CREATE_TYPE === selectedSuggestion.type ) {\n\t\t\t\t// Create a new page and call onSelect with the output from the onCreateSuggestion callback.\n\t\t\t\ttry {\n\t\t\t\t\tsuggestion = await onCreateSuggestion(\n\t\t\t\t\t\tselectedSuggestion.title\n\t\t\t\t\t);\n\t\t\t\t\tif ( suggestion?.url ) {\n\t\t\t\t\t\tonSelect( suggestion );\n\t\t\t\t\t}\n\t\t\t\t} catch ( e ) {}\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tallowDirectEntry ||\n\t\t\t\t( suggestion && Object.keys( suggestion ).length >= 1 )\n\t\t\t) {\n\t\t\t\tconst { id, url, ...restLinkProps } = currentLink ?? {};\n\t\t\t\tonSelect(\n\t\t\t\t\t// Some direct entries don't have types or IDs, and we still need to clear the previous ones.\n\t\t\t\t\t{ ...restLinkProps, ...suggestion },\n\t\t\t\t\tsuggestion\n\t\t\t\t);\n\t\t\t}\n\t\t};\n\n\t\treturn (\n\t\t\t<div className=\"block-editor-link-control__search-input-container\">\n\t\t\t\t<URLInput\n\t\t\t\t\tdisableSuggestions={ currentLink?.url === value }\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Link' ) }\n\t\t\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\t\t\tclassName={ className }\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\tonChange={ onInputChange }\n\t\t\t\t\tplaceholder={ placeholder ?? __( 'Search or type url' ) }\n\t\t\t\t\t__experimentalRenderSuggestions={\n\t\t\t\t\t\tshowSuggestions ? handleRenderSuggestions : null\n\t\t\t\t\t}\n\t\t\t\t\t__experimentalFetchLinkSuggestions={ searchHandler }\n\t\t\t\t\t__experimentalHandleURLSuggestions\n\t\t\t\t\t__experimentalShowInitialSuggestions={\n\t\t\t\t\t\tshowInitialSuggestions\n\t\t\t\t\t}\n\t\t\t\t\tonSubmit={ ( suggestion, event ) => {\n\t\t\t\t\t\tconst hasSuggestion = suggestion || focusedSuggestion;\n\n\t\t\t\t\t\t// If there is no suggestion and the value (ie: any manually entered URL) is empty\n\t\t\t\t\t\t// then don't allow submission otherwise we get empty links.\n\t\t\t\t\t\tif ( ! hasSuggestion && ! value?.trim()?.length ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tonSuggestionSelected(\n\t\t\t\t\t\t\t\thasSuggestion || { url: value }\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t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
|
-
{"version":3,"names":["__","MenuItem","TextHighlight","Icon","globe","page","tag","postList","category","file","home","verse","__unstableStripHTML","stripHTML","safeDecodeURI","filterURLForDisplay","getPath","pipe","ICONS_MAP","post","post_tag","attachment","SearchItemIcon","isURL","suggestion","icon","type","isFrontPage","isBlogHome","createElement","className","addLeadingSlash","url","trimmedURL","trim","length","replace","removeTrailingSlash","partialRight","fn","partialArgs","args","defaultTo","d","v","undefined","getURLForDisplay","LinkControlSearchItem","itemProps","searchTerm","onClick","shouldShowType","info","iconPosition","shortcut","getVisualTypeName","text","title","highlight"],"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 ) return url;\n\n\treturn url?.replace( /^\\/?/, '/' );\n}\n\nfunction removeTrailingSlash( url ) {\n\tconst trimmedURL = url?.trim();\n\n\tif ( ! trimmedURL?.length ) return url;\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 ) return url;\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":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,QAAQ,EAAEC,aAAa,QAAQ,uBAAuB;AAC/D,SACCC,IAAI,EACJC,KAAK,EACLC,IAAI,EACJC,GAAG,EACHC,QAAQ,EACRC,QAAQ,EACRC,IAAI,EACJC,IAAI,EACJC,KAAK,QACC,kBAAkB;AACzB,SAASC,mBAAmB,IAAIC,SAAS,QAAQ,gBAAgB;AACjE,SAASC,aAAa,EAAEC,mBAAmB,EAAEC,OAAO,QAAQ,gBAAgB;AAC5E,SAASC,IAAI,QAAQ,oBAAoB;AAEzC,MAAMC,SAAS,GAAG;EACjBC,IAAI,EAAEZ,QAAQ;EACdF,IAAI;EACJe,QAAQ,EAAEd,GAAG;EACbE,QAAQ;EACRa,UAAU,EAAEZ;AACb,CAAC;AAED,SAASa,cAAcA,CAAE;EAAEC,KAAK;EAAEC;AAAW,CAAC,EAAG;EAChD,IAAIC,IAAI,GAAG,IAAI;EAEf,IAAKF,KAAK,EAAG;IACZE,IAAI,GAAGrB,KAAK;EACb,CAAC,MAAM,IAAKoB,UAAU,CAACE,IAAI,IAAIR,SAAS,EAAG;IAC1CO,IAAI,GAAGP,SAAS,CAAEM,UAAU,CAACE,IAAI,CAAE;IACnC,IAAKF,UAAU,CAACE,IAAI,KAAK,MAAM,EAAG;MACjC,IAAKF,UAAU,CAACG,WAAW,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O,EACP0B,SAAS,CAAE,EAAG,CAAC,EACfJ,YAAY,CAAEvB,mBAAmB,EAAE,EAAG,CAAC,EACvCsB,mBAAmB,EACnBN,eACD,CAAC,CAAEC,GAAI,CAAC;AACT;AAEA,OAAO,MAAMe,qBAAqB,GAAGA,CAAE;EACtCC,SAAS;EACTxB,UAAU;EACVyB,UAAU;EACVC,OAAO;EACP3B,KAAK,GAAG,KAAK;EACb4B,cAAc,GAAG;AAClB,CAAC,KAAM;EACN,MAAMC,IAAI,GAAG7B,KAAK,GACfvB,EAAE,CAAE,8BAA+B,CAAC,GACpC8C,gBAAgB,CAAEtB,UAAU,CAACQ,GAAI,CAAC;EAErC,OACCH,aAAA,CAAC5B,QAAQ;IAAA,GACH+C,SAAS;IACdI,IAAI,EAAGA,IAAM;IACbC,YAAY,EAAC,MAAM;IACnB5B,IAAI,EACHI,aAAA,CAACP,cAAc;MAACE,UAAU,EAAGA,UAAY;MAACD,KAAK,EAAGA;IAAO,CAAE,CAC3D;IACD2B,OAAO,EAAGA,OAAS;IACnBI,QAAQ,EAAGH,cAAc,IAAII,iBAAiB,CAAE/B,UAAW,CAAG;IAC9DM,SAAS,EAAC;EAAwC,GAElDD,aAAA,CAAC3B;EACA;EAAA;IACAsD,IAAI,EAAG3C,SAAS,CAAEW,UAAU,CAACiC,KAAM,CAAG;IACtCC,SAAS,EAAGT;EAAY,CACxB,CACQ,CAAC;AAEb,CAAC;AAED,SAASM,iBAAiBA,CAAE/B,UAAU,EAAG;EACxC,IAAKA,UAAU,CAACG,WAAW,EAAG;IAC7B,OAAO,YAAY;EACpB;EAEA,IAAKH,UAAU,CAACI,UAAU,EAAG;IAC5B,OAAO,WAAW;EACnB;;EAEA;EACA,OAAOJ,UAAU,CAACE,IAAI,KAAK,UAAU,GAAG,KAAK,GAAGF,UAAU,CAACE,IAAI;AAChE;AAEA,eAAeqB,qBAAqB"}
|
|
1
|
+
{"version":3,"names":["__","MenuItem","TextHighlight","Icon","globe","page","tag","postList","category","file","home","verse","__unstableStripHTML","stripHTML","safeDecodeURI","filterURLForDisplay","getPath","pipe","ICONS_MAP","post","post_tag","attachment","SearchItemIcon","isURL","suggestion","icon","type","isFrontPage","isBlogHome","createElement","className","addLeadingSlash","url","trimmedURL","trim","length","replace","removeTrailingSlash","partialRight","fn","partialArgs","args","defaultTo","d","v","undefined","getURLForDisplay","LinkControlSearchItem","itemProps","searchTerm","onClick","shouldShowType","info","iconPosition","shortcut","getVisualTypeName","text","title","highlight"],"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 ) return url;\n\n\treturn url?.replace( /^\\/?/, '/' );\n}\n\nfunction removeTrailingSlash( url ) {\n\tconst trimmedURL = url?.trim();\n\n\tif ( ! trimmedURL?.length ) return url;\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 ) return url;\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":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,QAAQ,EAAEC,aAAa,QAAQ,uBAAuB;AAC/D,SACCC,IAAI,EACJC,KAAK,EACLC,IAAI,EACJC,GAAG,EACHC,QAAQ,EACRC,QAAQ,EACRC,IAAI,EACJC,IAAI,EACJC,KAAK,QACC,kBAAkB;AACzB,SAASC,mBAAmB,IAAIC,SAAS,QAAQ,gBAAgB;AACjE,SAASC,aAAa,EAAEC,mBAAmB,EAAEC,OAAO,QAAQ,gBAAgB;AAC5E,SAASC,IAAI,QAAQ,oBAAoB;AAEzC,MAAMC,SAAS,GAAG;EACjBC,IAAI,EAAEZ,QAAQ;EACdF,IAAI;EACJe,QAAQ,EAAEd,GAAG;EACbE,QAAQ;EACRa,UAAU,EAAEZ;AACb,CAAC;AAED,SAASa,cAAcA,CAAE;EAAEC,KAAK;EAAEC;AAAW,CAAC,EAAG;EAChD,IAAIC,IAAI,GAAG,IAAI;EAEf,IAAKF,KAAK,EAAG;IACZE,IAAI,GAAGrB,KAAK;EACb,CAAC,MAAM,IAAKoB,UAAU,CAACE,IAAI,IAAIR,SAAS,EAAG;IAC1CO,IAAI,GAAGP,SAAS,CAAEM,UAAU,CAACE,IAAI,CAAE;IACnC,IAAKF,UAAU,CAACE,IAAI,KAAK,MAAM,EAAG;MACjC,IAAKF,UAAU,CAACG,WAAW,EAAG;QAC7BF,IAAI,GAAGf,IAAI;MACZ;MACA,IAAKc,UAAU,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