@wordpress/block-editor 12.26.0 → 13.0.1
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 +6 -0
- package/README.md +1 -1
- package/build/autocompleters/block.js +7 -6
- package/build/autocompleters/block.js.map +1 -1
- package/build/autocompleters/link.js +10 -8
- package/build/autocompleters/link.js.map +1 -1
- package/build/components/alignment-control/index.js +3 -3
- package/build/components/alignment-control/index.js.map +1 -1
- package/build/components/alignment-control/ui.js +2 -2
- package/build/components/alignment-control/ui.js.map +1 -1
- package/build/components/audio-player/audio-url-parser.native.js +24 -0
- package/build/components/audio-player/audio-url-parser.native.js.map +1 -0
- package/build/components/audio-player/index.native.js +174 -0
- package/build/components/audio-player/index.native.js.map +1 -0
- package/build/components/autocomplete/index.js +3 -4
- package/build/components/autocomplete/index.js.map +1 -1
- package/build/components/block-alignment-control/index.js +3 -3
- package/build/components/block-alignment-control/index.js.map +1 -1
- package/build/components/block-alignment-control/ui.js +33 -30
- package/build/components/block-alignment-control/ui.js.map +1 -1
- package/build/components/block-alignment-control/ui.native.js +2 -2
- package/build/components/block-alignment-control/ui.native.js.map +1 -1
- package/build/components/block-alignment-matrix-control/index.js +5 -5
- package/build/components/block-alignment-matrix-control/index.js.map +1 -1
- package/build/components/block-bindings-toolbar-indicator/index.js +92 -11
- package/build/components/block-bindings-toolbar-indicator/index.js.map +1 -1
- package/build/components/block-breadcrumb/index.js +38 -34
- package/build/components/block-breadcrumb/index.js.map +1 -1
- package/build/components/block-canvas/index.js +36 -31
- package/build/components/block-canvas/index.js.map +1 -1
- package/build/components/block-caption/index.native.js +15 -14
- package/build/components/block-caption/index.native.js.map +1 -1
- package/build/components/block-card/index.js +32 -27
- package/build/components/block-card/index.js.map +1 -1
- package/build/components/block-compare/block-view.js +27 -18
- package/build/components/block-compare/block-view.js.map +1 -1
- package/build/components/block-compare/index.js +23 -22
- package/build/components/block-compare/index.js.map +1 -1
- package/build/components/block-context/index.js +3 -4
- package/build/components/block-context/index.js.map +1 -1
- package/build/components/block-controls/fill.js +22 -16
- package/build/components/block-controls/fill.js.map +1 -1
- package/build/components/block-controls/index.js +3 -3
- package/build/components/block-controls/index.js.map +1 -1
- package/build/components/block-controls/slot.js +6 -4
- package/build/components/block-controls/slot.js.map +1 -1
- package/build/components/block-controls/slot.native.js +12 -9
- package/build/components/block-controls/slot.native.js.map +1 -1
- package/build/components/block-controls/use-has-block-controls.js +1 -1
- package/build/components/block-controls/use-has-block-controls.js.map +1 -1
- package/build/components/block-draggable/draggable-chip.js +27 -19
- package/build/components/block-draggable/draggable-chip.js.map +1 -1
- package/build/components/block-draggable/draggable-chip.native.js +9 -8
- package/build/components/block-draggable/draggable-chip.native.js.map +1 -1
- package/build/components/block-draggable/dropping-insertion-point.native.js +3 -4
- package/build/components/block-draggable/dropping-insertion-point.native.js.map +1 -1
- package/build/components/block-draggable/index.js +14 -13
- package/build/components/block-draggable/index.js.map +1 -1
- package/build/components/block-draggable/index.native.js +37 -30
- package/build/components/block-draggable/index.native.js.map +1 -1
- package/build/components/block-edit/edit.js +5 -6
- package/build/components/block-edit/edit.js.map +1 -1
- package/build/components/block-edit/edit.native.js +3 -4
- package/build/components/block-edit/edit.native.js.map +1 -1
- package/build/components/block-edit/index.js +17 -9
- package/build/components/block-edit/index.js.map +1 -1
- package/build/components/block-edit/multiple-usage-warning.js +47 -0
- package/build/components/block-edit/multiple-usage-warning.js.map +1 -0
- package/build/components/block-edit-visually-button/index.js +9 -6
- package/build/components/block-edit-visually-button/index.js.map +1 -1
- package/build/components/block-full-height-alignment-control/index.js +2 -2
- package/build/components/block-full-height-alignment-control/index.js.map +1 -1
- package/build/components/block-heading-level-dropdown/heading-level-icon.js +3 -5
- package/build/components/block-heading-level-dropdown/heading-level-icon.js.map +1 -1
- package/build/components/block-heading-level-dropdown/index.js +4 -4
- package/build/components/block-heading-level-dropdown/index.js.map +1 -1
- package/build/components/block-heading-level-dropdown/index.native.js +4 -4
- package/build/components/block-heading-level-dropdown/index.native.js.map +1 -1
- package/build/components/block-icon/index.js +6 -5
- package/build/components/block-icon/index.js.map +1 -1
- package/build/components/block-icon/index.native.js +6 -5
- package/build/components/block-icon/index.native.js.map +1 -1
- package/build/components/block-info-slot-fill/index.js +3 -3
- package/build/components/block-info-slot-fill/index.js.map +1 -1
- package/build/components/block-inspector/index.js +102 -88
- package/build/components/block-inspector/index.js.map +1 -1
- package/build/components/block-inspector/useBlockInspectorAnimationSettings.js +2 -2
- package/build/components/block-inspector/useBlockInspectorAnimationSettings.js.map +1 -1
- package/build/components/block-list/block-crash-warning.js +5 -4
- package/build/components/block-list/block-crash-warning.js.map +1 -1
- package/build/components/block-list/block-crash-warning.native.js +2 -2
- package/build/components/block-list/block-crash-warning.native.js.map +1 -1
- package/build/components/block-list/block-html.js +2 -2
- package/build/components/block-list/block-html.js.map +1 -1
- package/build/components/block-list/block-invalid-warning.js +25 -21
- package/build/components/block-list/block-invalid-warning.js.map +1 -1
- package/build/components/block-list/block-invalid-warning.native.js +12 -11
- package/build/components/block-list/block-invalid-warning.native.js.map +1 -1
- package/build/components/block-list/block-list-item-cell.native.js +5 -4
- package/build/components/block-list/block-list-item-cell.native.js.map +1 -1
- package/build/components/block-list/block-list-item.native.js +29 -28
- package/build/components/block-list/block-list-item.native.js.map +1 -1
- package/build/components/block-list/block-outline.native.js +2 -2
- package/build/components/block-list/block-outline.native.js.map +1 -1
- package/build/components/block-list/block-selection-button.native.js +35 -33
- package/build/components/block-list/block-selection-button.native.js.map +1 -1
- package/build/components/block-list/block.js +107 -62
- package/build/components/block-list/block.js.map +1 -1
- package/build/components/block-list/block.native.js +63 -54
- package/build/components/block-list/block.native.js.map +1 -1
- package/build/components/block-list/grid-item.native.js +5 -4
- package/build/components/block-list/grid-item.native.js.map +1 -1
- package/build/components/block-list/index.js +38 -34
- package/build/components/block-list/index.js.map +1 -1
- package/build/components/block-list/index.native.js +97 -85
- package/build/components/block-list/index.native.js.map +1 -1
- package/build/components/block-list/insertion-point.native.js +12 -10
- package/build/components/block-list/insertion-point.native.js.map +1 -1
- package/build/components/block-list/layout.js +7 -3
- package/build/components/block-list/layout.js.map +1 -1
- package/build/components/block-list/subdirectory-icon.js +8 -7
- package/build/components/block-list/subdirectory-icon.js.map +1 -1
- package/build/components/block-list/use-block-props/index.js +1 -1
- package/build/components/block-list/use-block-props/index.js.map +1 -1
- package/build/components/block-list-appender/index.js +9 -8
- package/build/components/block-list-appender/index.js.map +1 -1
- package/build/components/block-list-appender/index.native.js +4 -4
- package/build/components/block-list-appender/index.native.js.map +1 -1
- package/build/components/block-lock/menu-item.js +13 -10
- package/build/components/block-lock/menu-item.js.map +1 -1
- package/build/components/block-lock/modal.js +107 -90
- package/build/components/block-lock/modal.js.map +1 -1
- package/build/components/block-lock/toolbar.js +18 -15
- package/build/components/block-lock/toolbar.js.map +1 -1
- package/build/components/block-media-update-progress/index.native.js +17 -15
- package/build/components/block-media-update-progress/index.native.js.map +1 -1
- package/build/components/block-mover/button.js +19 -16
- package/build/components/block-mover/button.js.map +1 -1
- package/build/components/block-mover/index.js +34 -27
- package/build/components/block-mover/index.js.map +1 -1
- package/build/components/block-mover/index.native.js +29 -27
- package/build/components/block-mover/index.native.js.map +1 -1
- package/build/components/block-navigation/dropdown.js +11 -9
- package/build/components/block-navigation/dropdown.js.map +1 -1
- package/build/components/block-parent-selector/index.js +14 -15
- package/build/components/block-parent-selector/index.js.map +1 -1
- package/build/components/block-pattern-setup/index.js +88 -76
- package/build/components/block-pattern-setup/index.js.map +1 -1
- package/build/components/block-pattern-setup/setup-toolbar.js +50 -45
- package/build/components/block-pattern-setup/setup-toolbar.js.map +1 -1
- package/build/components/block-patterns-list/index.js +96 -86
- package/build/components/block-patterns-list/index.js.map +1 -1
- package/build/components/block-patterns-paging/index.js +70 -52
- package/build/components/block-patterns-paging/index.js.map +1 -1
- package/build/components/block-popover/cover.js +13 -10
- package/build/components/block-popover/cover.js.map +1 -1
- package/build/components/block-popover/drop-zone.js +11 -10
- package/build/components/block-popover/drop-zone.js.map +1 -1
- package/build/components/block-popover/inbetween.js +8 -7
- package/build/components/block-popover/inbetween.js.map +1 -1
- package/build/components/block-popover/index.js +9 -7
- package/build/components/block-popover/index.js.map +1 -1
- package/build/components/block-preview/auto.js +53 -47
- package/build/components/block-preview/auto.js.map +1 -1
- package/build/components/block-preview/index.js +16 -14
- package/build/components/block-preview/index.js.map +1 -1
- package/build/components/block-quick-navigation/index.js +24 -16
- package/build/components/block-quick-navigation/index.js.map +1 -1
- package/build/components/block-removal-warning-modal/index.js +18 -12
- package/build/components/block-removal-warning-modal/index.js.map +1 -1
- package/build/components/block-rename/modal.js +44 -37
- package/build/components/block-rename/modal.js.map +1 -1
- package/build/components/block-rename/rename-control.js +24 -21
- package/build/components/block-rename/rename-control.js.map +1 -1
- package/build/components/block-selection-clearer/index.js +2 -2
- package/build/components/block-selection-clearer/index.js.map +1 -1
- package/build/components/block-settings/button.native.js +13 -9
- package/build/components/block-settings/button.native.js.map +1 -1
- package/build/components/block-settings/container.native.js +40 -28
- package/build/components/block-settings/container.native.js.map +1 -1
- package/build/components/block-settings-menu/block-html-convert-button.js +5 -4
- package/build/components/block-settings-menu/block-html-convert-button.js.map +1 -1
- package/build/components/block-settings-menu/block-mode-toggle.js +5 -4
- 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 +7 -6
- 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 +93 -75
- package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build/components/block-settings-menu/index.js +10 -6
- package/build/components/block-settings-menu/index.js.map +1 -1
- package/build/components/block-settings-menu-controls/index.js +29 -24
- package/build/components/block-settings-menu-controls/index.js.map +1 -1
- package/build/components/block-styles/index.js +43 -38
- package/build/components/block-styles/index.js.map +1 -1
- package/build/components/block-styles/index.native.js +7 -7
- package/build/components/block-styles/index.native.js.map +1 -1
- package/build/components/block-styles/menu-items.js +17 -14
- package/build/components/block-styles/menu-items.js.map +1 -1
- package/build/components/block-styles/preview-panel.js +2 -2
- package/build/components/block-styles/preview-panel.js.map +1 -1
- package/build/components/block-styles/preview.native.js +24 -21
- package/build/components/block-styles/preview.native.js.map +1 -1
- package/build/components/block-switcher/block-styles-menu.js +8 -7
- package/build/components/block-switcher/block-styles-menu.js.map +1 -1
- package/build/components/block-switcher/block-transformations-menu.js +32 -30
- package/build/components/block-switcher/block-transformations-menu.js.map +1 -1
- package/build/components/block-switcher/block-transformations-menu.native.js +2 -2
- package/build/components/block-switcher/block-transformations-menu.native.js.map +1 -1
- package/build/components/block-switcher/block-variation-transformations.js +19 -17
- package/build/components/block-switcher/block-variation-transformations.js.map +1 -1
- package/build/components/block-switcher/index.js +85 -70
- package/build/components/block-switcher/index.js.map +1 -1
- package/build/components/block-switcher/pattern-transformations-menu.js +61 -51
- package/build/components/block-switcher/pattern-transformations-menu.js.map +1 -1
- package/build/components/block-switcher/preview-block-popover.js +22 -17
- package/build/components/block-switcher/preview-block-popover.js.map +1 -1
- package/build/components/block-toolbar/block-toolbar-menu.native.js +38 -34
- package/build/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
- package/build/components/block-toolbar/index.js +53 -43
- package/build/components/block-toolbar/index.js.map +1 -1
- package/build/components/block-toolbar/index.native.js +27 -21
- package/build/components/block-toolbar/index.native.js.map +1 -1
- package/build/components/block-toolbar/shuffle.js +7 -5
- package/build/components/block-toolbar/shuffle.js.map +1 -1
- package/build/components/block-tools/block-selection-button.js +61 -48
- package/build/components/block-tools/block-selection-button.js.map +1 -1
- package/build/components/block-tools/block-toolbar-breadcrumb.js +8 -7
- package/build/components/block-tools/block-toolbar-breadcrumb.js.map +1 -1
- package/build/components/block-tools/block-toolbar-popover.js +15 -14
- package/build/components/block-tools/block-toolbar-popover.js.map +1 -1
- package/build/components/block-tools/empty-block-inserter.js +13 -11
- package/build/components/block-tools/empty-block-inserter.js.map +1 -1
- package/build/components/block-tools/index.js +29 -26
- package/build/components/block-tools/index.js.map +1 -1
- package/build/components/block-tools/insertion-point.js +42 -40
- package/build/components/block-tools/insertion-point.js.map +1 -1
- package/build/components/block-tools/zoom-out-mode-inserters.js +33 -32
- package/build/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
- package/build/components/block-types-list/index.js +15 -15
- package/build/components/block-types-list/index.js.map +1 -1
- package/build/components/block-types-list/index.native.js +30 -26
- package/build/components/block-types-list/index.native.js.map +1 -1
- package/build/components/block-variation-picker/index.js +30 -25
- package/build/components/block-variation-picker/index.js.map +1 -1
- package/build/components/block-variation-picker/index.native.js +32 -25
- package/build/components/block-variation-picker/index.native.js.map +1 -1
- package/build/components/block-variation-transforms/index.js +53 -47
- package/build/components/block-variation-transforms/index.js.map +1 -1
- package/build/components/block-vertical-alignment-control/icons.js +31 -26
- package/build/components/block-vertical-alignment-control/icons.js.map +1 -1
- package/build/components/block-vertical-alignment-control/index.js +3 -3
- package/build/components/block-vertical-alignment-control/index.js.map +1 -1
- package/build/components/block-vertical-alignment-control/ui.js +2 -2
- package/build/components/block-vertical-alignment-control/ui.js.map +1 -1
- package/build/components/border-radius-control/all-input-control.js +3 -3
- package/build/components/border-radius-control/all-input-control.js.map +1 -1
- package/build/components/border-radius-control/index.js +43 -38
- package/build/components/border-radius-control/index.js.map +1 -1
- package/build/components/border-radius-control/input-controls.js +23 -21
- package/build/components/border-radius-control/input-controls.js.map +1 -1
- package/build/components/border-radius-control/linked-button.js +12 -11
- package/build/components/border-radius-control/linked-button.js.map +1 -1
- package/build/components/button-block-appender/index.js +19 -13
- package/build/components/button-block-appender/index.js.map +1 -1
- package/build/components/button-block-appender/index.native.js +28 -24
- package/build/components/button-block-appender/index.native.js.map +1 -1
- package/build/components/caption/index.native.js +22 -21
- package/build/components/caption/index.native.js.map +1 -1
- package/build/components/child-layout-control/index.js +137 -129
- package/build/components/child-layout-control/index.js.map +1 -1
- package/build/components/color-palette/control.js +2 -2
- package/build/components/color-palette/control.js.map +1 -1
- package/build/components/color-palette/with-color-context.js +2 -2
- package/build/components/color-palette/with-color-context.js.map +1 -1
- package/build/components/color-style-selector/index.js +29 -20
- package/build/components/color-style-selector/index.js.map +1 -1
- package/build/components/colors/utils.js +3 -3
- package/build/components/colors/utils.js.map +1 -1
- package/build/components/colors/with-colors.js +8 -7
- package/build/components/colors/with-colors.js.map +1 -1
- package/build/components/colors-gradients/control.js +53 -39
- package/build/components/colors-gradients/control.js.map +1 -1
- package/build/components/colors-gradients/dropdown.js +70 -61
- package/build/components/colors-gradients/dropdown.js.map +1 -1
- package/build/components/colors-gradients/panel-color-gradient-settings.js +21 -18
- package/build/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
- package/build/components/colors-gradients/panel-color-gradient-settings.native.js +11 -7
- package/build/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
- package/build/components/contrast-checker/index.js +10 -8
- package/build/components/contrast-checker/index.js.map +1 -1
- package/build/components/contrast-checker/index.native.js +12 -10
- package/build/components/contrast-checker/index.native.js.map +1 -1
- package/build/components/convert-to-group-buttons/index.js +17 -13
- package/build/components/convert-to-group-buttons/index.js.map +1 -1
- package/build/components/convert-to-group-buttons/toolbar.js +20 -18
- package/build/components/convert-to-group-buttons/toolbar.js.map +1 -1
- package/build/components/copy-handler/index.js +2 -2
- package/build/components/copy-handler/index.js.map +1 -1
- package/build/components/date-format-picker/index.js +44 -40
- package/build/components/date-format-picker/index.js.map +1 -1
- package/build/components/default-block-appender/index.js +32 -30
- package/build/components/default-block-appender/index.js.map +1 -1
- package/build/components/default-block-appender/index.native.js +14 -12
- package/build/components/default-block-appender/index.native.js.map +1 -1
- package/build/components/dimensions-tool/aspect-ratio-tool.js +13 -14
- package/build/components/dimensions-tool/aspect-ratio-tool.js.map +1 -1
- package/build/components/dimensions-tool/index.js +116 -115
- package/build/components/dimensions-tool/index.js.map +1 -1
- package/build/components/dimensions-tool/scale-tool.js +16 -16
- package/build/components/dimensions-tool/scale-tool.js.map +1 -1
- package/build/components/dimensions-tool/width-height-tool.js +37 -33
- package/build/components/dimensions-tool/width-height-tool.js.map +1 -1
- package/build/components/duotone-control/index.js +21 -18
- package/build/components/duotone-control/index.js.map +1 -1
- package/build/components/editable-text/index.js +6 -5
- package/build/components/editable-text/index.js.map +1 -1
- package/build/components/editor-styles/index.js +23 -21
- package/build/components/editor-styles/index.js.map +1 -1
- package/build/components/floating-toolbar/index.native.js +18 -16
- package/build/components/floating-toolbar/index.native.js.map +1 -1
- package/build/components/floating-toolbar/nav-up-icon.js +14 -13
- package/build/components/floating-toolbar/nav-up-icon.js.map +1 -1
- package/build/components/font-appearance-control/index.js +2 -2
- package/build/components/font-appearance-control/index.js.map +1 -1
- package/build/components/font-family/index.js +2 -2
- package/build/components/font-family/index.js.map +1 -1
- package/build/components/font-sizes/font-size-picker.js +2 -2
- package/build/components/font-sizes/font-size-picker.js.map +1 -1
- package/build/components/font-sizes/utils.js +4 -3
- package/build/components/font-sizes/utils.js.map +1 -1
- package/build/components/font-sizes/with-font-sizes.js +3 -3
- package/build/components/font-sizes/with-font-sizes.js.map +1 -1
- package/build/components/global-styles/advanced-panel.js +17 -15
- package/build/components/global-styles/advanced-panel.js.map +1 -1
- package/build/components/global-styles/background-panel.js +187 -121
- package/build/components/global-styles/background-panel.js.map +1 -1
- package/build/components/global-styles/border-panel.js +62 -56
- package/build/components/global-styles/border-panel.js.map +1 -1
- package/build/components/global-styles/color-panel.js +111 -87
- package/build/components/global-styles/color-panel.js.map +1 -1
- package/build/components/global-styles/color-panel.native.js +14 -11
- package/build/components/global-styles/color-panel.native.js.map +1 -1
- package/build/components/global-styles/dimensions-panel.js +183 -171
- package/build/components/global-styles/dimensions-panel.js.map +1 -1
- package/build/components/global-styles/filters-panel.js +78 -65
- package/build/components/global-styles/filters-panel.js.map +1 -1
- package/build/components/global-styles/hooks.js +15 -3
- package/build/components/global-styles/hooks.js.map +1 -1
- package/build/components/global-styles/image-settings-panel.js +26 -22
- package/build/components/global-styles/image-settings-panel.js.map +1 -1
- package/build/components/global-styles/index.js +18 -0
- package/build/components/global-styles/index.js.map +1 -1
- package/build/components/global-styles/shadow-panel-components.js +74 -65
- package/build/components/global-styles/shadow-panel-components.js.map +1 -1
- package/build/components/global-styles/theme-file-uri-utils.js +80 -0
- package/build/components/global-styles/theme-file-uri-utils.js.map +1 -0
- package/build/components/global-styles/typography-panel.js +175 -134
- package/build/components/global-styles/typography-panel.js.map +1 -1
- package/build/components/global-styles/use-global-styles-context.native.js +450 -0
- package/build/components/global-styles/use-global-styles-context.native.js.map +1 -0
- package/build/components/global-styles/use-global-styles-output.js +113 -78
- package/build/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build/components/gradients/with-gradient.js +2 -2
- package/build/components/gradients/with-gradient.js.map +1 -1
- package/build/components/grid-visualizer/grid-item-resizer.js +59 -58
- package/build/components/grid-visualizer/grid-item-resizer.js.map +1 -1
- package/build/components/grid-visualizer/grid-visualizer.js +20 -15
- package/build/components/grid-visualizer/grid-visualizer.js.map +1 -1
- package/build/components/height-control/index.js +39 -32
- package/build/components/height-control/index.js.map +1 -1
- package/build/components/iframe/index.js +70 -62
- package/build/components/iframe/index.js.map +1 -1
- package/build/components/image-editor/aspect-ratio-dropdown.js +73 -69
- package/build/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
- package/build/components/image-editor/context.js +5 -4
- package/build/components/image-editor/context.js.map +1 -1
- package/build/components/image-editor/cropper.js +24 -21
- package/build/components/image-editor/cropper.js.map +1 -1
- package/build/components/image-editor/form-controls.js +11 -7
- package/build/components/image-editor/form-controls.js.map +1 -1
- package/build/components/image-editor/index.js +22 -13
- package/build/components/image-editor/index.js.map +1 -1
- package/build/components/image-editor/rotation-button.js +2 -2
- package/build/components/image-editor/rotation-button.js.map +1 -1
- package/build/components/image-editor/zoom-dropdown.js +4 -4
- package/build/components/image-editor/zoom-dropdown.js.map +1 -1
- package/build/components/image-link-destinations/index.native.js +37 -27
- package/build/components/image-link-destinations/index.native.js.map +1 -1
- package/build/components/image-size-control/index.js +53 -45
- package/build/components/image-size-control/index.js.map +1 -1
- package/build/components/index.native.js +37 -0
- package/build/components/index.native.js.map +1 -1
- package/build/components/inner-blocks/button-block-appender.js +2 -2
- package/build/components/inner-blocks/button-block-appender.js.map +1 -1
- package/build/components/inner-blocks/default-block-appender.js +2 -2
- package/build/components/inner-blocks/default-block-appender.js.map +1 -1
- package/build/components/inner-blocks/index.js +19 -16
- package/build/components/inner-blocks/index.js.map +1 -1
- package/build/components/inner-blocks/index.native.js +31 -29
- package/build/components/inner-blocks/index.native.js.map +1 -1
- package/build/components/inner-blocks/use-nested-settings-update.js +10 -13
- package/build/components/inner-blocks/use-nested-settings-update.js.map +1 -1
- package/build/components/inner-blocks/warning-max-depth-exceeded.native.js +20 -17
- package/build/components/inner-blocks/warning-max-depth-exceeded.native.js.map +1 -1
- package/build/components/inner-blocks/with-client-id.js +2 -2
- package/build/components/inner-blocks/with-client-id.js.map +1 -1
- package/build/components/inserter/block-patterns-explorer/index.js +22 -20
- package/build/components/inserter/block-patterns-explorer/index.js.map +1 -1
- package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js +39 -36
- package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js.map +1 -1
- package/build/components/inserter/block-patterns-explorer/pattern-list.js +25 -19
- package/build/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/index.js +38 -31
- package/build/components/inserter/block-patterns-tab/index.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +21 -4
- 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 +42 -31
- package/build/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/patterns-filter.js +54 -42
- package/build/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
- package/build/components/inserter/block-types-tab.js +108 -66
- package/build/components/inserter/block-types-tab.js.map +1 -1
- package/build/components/inserter/block-types-tab.native.js +2 -2
- package/build/components/inserter/block-types-tab.native.js.map +1 -1
- package/build/components/inserter/category-tabs/index.js +26 -20
- package/build/components/inserter/category-tabs/index.js.map +1 -1
- package/build/components/inserter/hooks/use-block-types-state.js +10 -4
- package/build/components/inserter/hooks/use-block-types-state.js.map +1 -1
- package/build/components/inserter/hooks/use-insertion-point.js +33 -5
- package/build/components/inserter/hooks/use-insertion-point.js.map +1 -1
- package/build/components/inserter/index.js +6 -6
- package/build/components/inserter/index.js.map +1 -1
- package/build/components/inserter/index.native.js +21 -19
- package/build/components/inserter/index.native.js.map +1 -1
- package/build/components/inserter/library.js +15 -8
- package/build/components/inserter/library.js.map +1 -1
- package/build/components/inserter/media-tab/media-list.js +9 -9
- package/build/components/inserter/media-tab/media-list.js.map +1 -1
- package/build/components/inserter/media-tab/media-panel.js +19 -17
- package/build/components/inserter/media-tab/media-panel.js.map +1 -1
- package/build/components/inserter/media-tab/media-preview.js +92 -66
- package/build/components/inserter/media-tab/media-preview.js.map +1 -1
- package/build/components/inserter/media-tab/media-tab.js +44 -36
- package/build/components/inserter/media-tab/media-tab.js.map +1 -1
- package/build/components/inserter/media-tab/utils.js +2 -2
- package/build/components/inserter/media-tab/utils.js.map +1 -1
- package/build/components/inserter/menu.js +101 -84
- package/build/components/inserter/menu.js.map +1 -1
- package/build/components/inserter/menu.native.js +34 -28
- package/build/components/inserter/menu.native.js.map +1 -1
- package/build/components/inserter/mobile-tab-navigation.js +56 -40
- package/build/components/inserter/mobile-tab-navigation.js.map +1 -1
- package/build/components/inserter/no-results.js +10 -7
- package/build/components/inserter/no-results.js.map +1 -1
- package/build/components/inserter/no-results.native.js +13 -8
- package/build/components/inserter/no-results.native.js.map +1 -1
- package/build/components/inserter/panel.js +15 -10
- package/build/components/inserter/panel.js.map +1 -1
- package/build/components/inserter/preview-panel.js +24 -20
- package/build/components/inserter/preview-panel.js.map +1 -1
- package/build/components/inserter/quick-inserter.js +35 -31
- package/build/components/inserter/quick-inserter.js.map +1 -1
- package/build/components/inserter/reusable-block-rename-hint.js +20 -18
- package/build/components/inserter/reusable-block-rename-hint.js.map +1 -1
- package/build/components/inserter/reusable-blocks-tab.native.js +2 -2
- package/build/components/inserter/reusable-blocks-tab.native.js.map +1 -1
- package/build/components/inserter/search-results.js +52 -41
- package/build/components/inserter/search-results.js.map +1 -1
- package/build/components/inserter/search-results.native.js +3 -3
- package/build/components/inserter/search-results.native.js.map +1 -1
- package/build/components/inserter/tabs.js +30 -26
- package/build/components/inserter/tabs.js.map +1 -1
- package/build/components/inserter/tabs.native.js +20 -18
- package/build/components/inserter/tabs.native.js.map +1 -1
- package/build/components/inserter/tips.js +7 -5
- package/build/components/inserter/tips.js.map +1 -1
- package/build/components/inserter-button/index.native.js +28 -23
- package/build/components/inserter-button/index.native.js.map +1 -1
- package/build/components/inserter-button/sparkles.js +8 -7
- package/build/components/inserter-button/sparkles.js.map +1 -1
- package/build/components/inserter-draggable-blocks/index.js +14 -13
- package/build/components/inserter-draggable-blocks/index.js.map +1 -1
- package/build/components/inserter-list-item/index.js +68 -62
- package/build/components/inserter-list-item/index.js.map +1 -1
- package/build/components/inserter-listbox/group.js +2 -2
- package/build/components/inserter-listbox/group.js.map +1 -1
- package/build/components/inserter-listbox/index.js +5 -4
- package/build/components/inserter-listbox/index.js.map +1 -1
- package/build/components/inserter-listbox/item.js +10 -8
- package/build/components/inserter-listbox/item.js.map +1 -1
- package/build/components/inserter-listbox/row.js +2 -2
- package/build/components/inserter-listbox/row.js.map +1 -1
- package/build/components/inspector-controls/block-support-slot-container.js +2 -2
- package/build/components/inspector-controls/block-support-slot-container.js.map +1 -1
- package/build/components/inspector-controls/block-support-tools-panel.js +5 -5
- package/build/components/inspector-controls/block-support-tools-panel.js.map +1 -1
- package/build/components/inspector-controls/fill.js +22 -17
- package/build/components/inspector-controls/fill.js.map +1 -1
- package/build/components/inspector-controls/fill.native.js +12 -5
- package/build/components/inspector-controls/fill.native.js.map +1 -1
- package/build/components/inspector-controls/index.js +3 -3
- package/build/components/inspector-controls/index.js.map +1 -1
- package/build/components/inspector-controls/slot.js +11 -10
- package/build/components/inspector-controls/slot.js.map +1 -1
- package/build/components/inspector-controls/slot.native.js +3 -3
- package/build/components/inspector-controls/slot.native.js.map +1 -1
- package/build/components/inspector-controls-tabs/advanced-controls-panel.js +7 -6
- package/build/components/inspector-controls-tabs/advanced-controls-panel.js.map +1 -1
- package/build/components/inspector-controls-tabs/advanced-controls-panel.native.js +11 -9
- package/build/components/inspector-controls-tabs/advanced-controls-panel.native.js.map +1 -1
- package/build/components/inspector-controls-tabs/index.js +44 -32
- package/build/components/inspector-controls-tabs/index.js.map +1 -1
- package/build/components/inspector-controls-tabs/position-controls-panel.js +8 -7
- package/build/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
- package/build/components/inspector-controls-tabs/settings-tab-hint.js +20 -18
- package/build/components/inspector-controls-tabs/settings-tab-hint.js.map +1 -1
- package/build/components/inspector-controls-tabs/settings-tab.js +6 -2
- package/build/components/inspector-controls-tabs/settings-tab.js.map +1 -1
- package/build/components/inspector-controls-tabs/styles-tab.js +31 -26
- package/build/components/inspector-controls-tabs/styles-tab.js.map +1 -1
- package/build/components/inspector-popover-header/index.js +31 -26
- package/build/components/inspector-popover-header/index.js.map +1 -1
- package/build/components/justify-content-control/index.js +3 -3
- package/build/components/justify-content-control/index.js.map +1 -1
- package/build/components/justify-content-control/ui.js +2 -2
- package/build/components/justify-content-control/ui.js.map +1 -1
- package/build/components/letter-spacing-control/index.js +3 -4
- package/build/components/letter-spacing-control/index.js.map +1 -1
- package/build/components/line-height-control/index.js +17 -16
- package/build/components/line-height-control/index.js.map +1 -1
- package/build/components/line-height-control/index.native.js +2 -2
- package/build/components/line-height-control/index.native.js.map +1 -1
- package/build/components/link-control/index.js +101 -84
- package/build/components/link-control/index.js.map +1 -1
- package/build/components/link-control/link-preview.js +62 -49
- package/build/components/link-control/link-preview.js.map +1 -1
- package/build/components/link-control/search-create-button.js +6 -5
- package/build/components/link-control/search-create-button.js.map +1 -1
- package/build/components/link-control/search-input.js +32 -31
- package/build/components/link-control/search-input.js.map +1 -1
- package/build/components/link-control/search-item.js +12 -11
- package/build/components/link-control/search-item.js.map +1 -1
- package/build/components/link-control/search-results.js +50 -46
- package/build/components/link-control/search-results.js.map +1 -1
- package/build/components/link-control/settings-drawer.js +37 -30
- package/build/components/link-control/settings-drawer.js.map +1 -1
- package/build/components/link-control/settings.js +10 -9
- package/build/components/link-control/settings.js.map +1 -1
- package/build/components/list-view/appender.js +24 -22
- package/build/components/list-view/appender.js.map +1 -1
- package/build/components/list-view/aria-referenced-text.js +6 -6
- package/build/components/list-view/aria-referenced-text.js.map +1 -1
- package/build/components/list-view/block-contents.js +32 -29
- package/build/components/list-view/block-contents.js.map +1 -1
- package/build/components/list-view/block-select-button.js +50 -42
- package/build/components/list-view/block-select-button.js.map +1 -1
- package/build/components/list-view/block.js +96 -84
- package/build/components/list-view/block.js.map +1 -1
- package/build/components/list-view/branch.js +101 -95
- package/build/components/list-view/branch.js.map +1 -1
- package/build/components/list-view/drop-indicator.js +38 -31
- package/build/components/list-view/drop-indicator.js.map +1 -1
- package/build/components/list-view/expander.js +8 -6
- package/build/components/list-view/expander.js.map +1 -1
- package/build/components/list-view/index.js +42 -38
- package/build/components/list-view/index.js.map +1 -1
- package/build/components/list-view/leaf.js +5 -4
- package/build/components/list-view/leaf.js.map +1 -1
- package/build/components/media-placeholder/index.js +99 -79
- package/build/components/media-placeholder/index.js.map +1 -1
- package/build/components/media-placeholder/index.native.js +63 -52
- package/build/components/media-placeholder/index.native.js.map +1 -1
- package/build/components/media-replace-flow/index.js +72 -60
- package/build/components/media-replace-flow/index.js.map +1 -1
- package/build/components/media-replace-flow/index.native.js +2 -2
- package/build/components/media-replace-flow/index.native.js.map +1 -1
- package/build/components/media-upload/index.native.js +44 -40
- package/build/components/media-upload/index.native.js.map +1 -1
- package/build/components/media-upload-progress/index.native.js +39 -15
- package/build/components/media-upload-progress/index.native.js.map +1 -1
- package/build/components/multi-selection-inspector/index.js +19 -15
- package/build/components/multi-selection-inspector/index.js.map +1 -1
- package/build/components/navigable-toolbar/index.js +9 -7
- package/build/components/navigable-toolbar/index.js.map +1 -1
- package/build/components/observe-typing/index.js +6 -6
- package/build/components/observe-typing/index.js.map +1 -1
- package/build/components/panel-color-settings/index.js +2 -2
- package/build/components/panel-color-settings/index.js.map +1 -1
- package/build/components/plain-text/index.js +4 -5
- package/build/components/plain-text/index.js.map +1 -1
- package/build/components/plain-text/index.native.js +3 -3
- package/build/components/plain-text/index.native.js.map +1 -1
- package/build/components/provider/block-refs-provider.js +5 -4
- package/build/components/provider/block-refs-provider.js.map +1 -1
- package/build/components/provider/index.js +11 -7
- package/build/components/provider/index.js.map +1 -1
- package/build/components/provider/index.native.js +5 -5
- package/build/components/provider/index.native.js.map +1 -1
- package/build/components/provider/with-registry-provider.js +30 -26
- package/build/components/provider/with-registry-provider.js.map +1 -1
- package/build/components/publish-date-time-picker/index.js +36 -15
- package/build/components/publish-date-time-picker/index.js.map +1 -1
- package/build/components/recursion-provider/index.js +6 -5
- package/build/components/recursion-provider/index.js.map +1 -1
- package/build/components/resizable-box-popover/index.js +7 -6
- package/build/components/resizable-box-popover/index.js.map +1 -1
- package/build/components/resolution-tool/index.js +12 -11
- package/build/components/resolution-tool/index.js.map +1 -1
- package/build/components/responsive-block-control/index.js +30 -26
- package/build/components/responsive-block-control/index.js.map +1 -1
- package/build/components/responsive-block-control/label.js +11 -7
- package/build/components/responsive-block-control/label.js.map +1 -1
- package/build/components/rich-text/content.js +8 -5
- package/build/components/rich-text/content.js.map +1 -1
- package/build/components/rich-text/embed-handler-picker.native.js +2 -2
- package/build/components/rich-text/embed-handler-picker.native.js.map +1 -1
- package/build/components/rich-text/format-edit.js +5 -5
- package/build/components/rich-text/format-edit.js.map +1 -1
- package/build/components/rich-text/format-toolbar/index.js +37 -33
- package/build/components/rich-text/format-toolbar/index.js.map +1 -1
- package/build/components/rich-text/format-toolbar/index.native.js +8 -7
- package/build/components/rich-text/format-toolbar/index.native.js.map +1 -1
- package/build/components/rich-text/format-toolbar-container.js +17 -12
- package/build/components/rich-text/format-toolbar-container.js.map +1 -1
- package/build/components/rich-text/format-toolbar-container.native.js +5 -4
- package/build/components/rich-text/format-toolbar-container.native.js.map +1 -1
- package/build/components/rich-text/get-rich-text-values.js +4 -4
- package/build/components/rich-text/get-rich-text-values.js.map +1 -1
- package/build/components/rich-text/index.js +87 -76
- package/build/components/rich-text/index.js.map +1 -1
- package/build/components/rich-text/index.native.js +51 -47
- package/build/components/rich-text/index.native.js.map +1 -1
- package/build/components/rich-text/multiline.js +62 -62
- package/build/components/rich-text/multiline.js.map +1 -1
- package/build/components/rich-text/native/format-edit.js +3 -4
- package/build/components/rich-text/native/format-edit.js.map +1 -1
- package/build/components/rich-text/native/index.native.js +87 -80
- package/build/components/rich-text/native/index.native.js.map +1 -1
- package/build/components/rich-text/native/toolbar-button-with-options.native.js +19 -16
- package/build/components/rich-text/native/toolbar-button-with-options.native.js.map +1 -1
- package/build/components/rich-text/toolbar-button.js +8 -7
- package/build/components/rich-text/toolbar-button.js.map +1 -1
- package/build/components/rich-text/utils.js +5 -4
- package/build/components/rich-text/utils.js.map +1 -1
- package/build/components/rich-text/with-deprecations.js +2 -2
- package/build/components/rich-text/with-deprecations.js.map +1 -1
- package/build/components/segmented-text-control/index.js +20 -19
- package/build/components/segmented-text-control/index.js.map +1 -1
- package/build/components/skip-to-selected-block/index.js +6 -6
- package/build/components/skip-to-selected-block/index.js.map +1 -1
- package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js +26 -14
- package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
- package/build/components/spacing-sizes-control/index.js +23 -19
- package/build/components/spacing-sizes-control/index.js.map +1 -1
- package/build/components/spacing-sizes-control/input-controls/axial.js +19 -18
- package/build/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
- package/build/components/spacing-sizes-control/input-controls/separated.js +18 -17
- package/build/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
- package/build/components/spacing-sizes-control/input-controls/single.js +2 -2
- 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 +103 -100
- 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 +42 -34
- package/build/components/spacing-sizes-control/sides-dropdown/index.js.map +1 -1
- package/build/components/spacing-sizes-control/utils.js +2 -1
- package/build/components/spacing-sizes-control/utils.js.map +1 -1
- package/build/components/text-alignment-control/index.js +2 -2
- package/build/components/text-alignment-control/index.js.map +1 -1
- package/build/components/text-decoration-control/index.js +2 -2
- package/build/components/text-decoration-control/index.js.map +1 -1
- package/build/components/text-transform-control/index.js +2 -2
- package/build/components/text-transform-control/index.js.map +1 -1
- package/build/components/tool-selector/index.js +35 -26
- package/build/components/tool-selector/index.js.map +1 -1
- package/build/components/typewriter/index.js +5 -4
- package/build/components/typewriter/index.js.map +1 -1
- package/build/components/ungroup-button/index.native.js +8 -6
- package/build/components/ungroup-button/index.native.js.map +1 -1
- package/build/components/unit-control/index.js +2 -2
- package/build/components/unit-control/index.js.map +1 -1
- package/build/components/unsupported-block-details/index.native.js +31 -28
- package/build/components/unsupported-block-details/index.native.js.map +1 -1
- package/build/components/url-input/button.js +31 -28
- package/build/components/url-input/button.js.map +1 -1
- package/build/components/url-input/index.js +27 -22
- package/build/components/url-input/index.js.map +1 -1
- package/build/components/url-input/index.native.js +2 -2
- package/build/components/url-input/index.native.js.map +1 -1
- package/build/components/url-popover/image-url-input-ui.js +104 -91
- package/build/components/url-popover/image-url-input-ui.js.map +1 -1
- package/build/components/url-popover/index.js +24 -19
- package/build/components/url-popover/index.js.map +1 -1
- package/build/components/url-popover/link-editor.js +15 -14
- package/build/components/url-popover/link-editor.js.map +1 -1
- package/build/components/url-popover/link-viewer-url.js +6 -5
- package/build/components/url-popover/link-viewer-url.js.map +1 -1
- package/build/components/url-popover/link-viewer.js +14 -13
- package/build/components/url-popover/link-viewer.js.map +1 -1
- package/build/components/use-block-commands/index.js +2 -2
- package/build/components/use-block-commands/index.js.map +1 -1
- package/build/components/video-player/gridicon-play.native.js +8 -7
- package/build/components/video-player/gridicon-play.native.js.map +1 -1
- package/build/components/video-player/index.native.js +43 -40
- package/build/components/video-player/index.native.js.map +1 -1
- package/build/components/warning/index.js +34 -26
- package/build/components/warning/index.js.map +1 -1
- package/build/components/warning/index.native.js +17 -13
- package/build/components/warning/index.native.js.map +1 -1
- package/build/components/writing-flow/index.js +9 -6
- package/build/components/writing-flow/index.js.map +1 -1
- package/build/components/writing-flow/use-clipboard-handler.js +41 -19
- package/build/components/writing-flow/use-clipboard-handler.js.map +1 -1
- package/build/components/writing-flow/use-tab-nav.js +3 -3
- package/build/components/writing-flow/use-tab-nav.js.map +1 -1
- package/build/components/writing-mode-control/index.js +2 -2
- package/build/components/writing-mode-control/index.js.map +1 -1
- package/build/hooks/align.js +10 -10
- package/build/hooks/align.js.map +1 -1
- package/build/hooks/anchor.js +29 -24
- package/build/hooks/anchor.js.map +1 -1
- package/build/hooks/background.js +6 -5
- package/build/hooks/background.js.map +1 -1
- package/build/hooks/block-bindings.js +89 -0
- package/build/hooks/block-bindings.js.map +1 -0
- package/build/hooks/block-hooks.js +41 -33
- package/build/hooks/block-hooks.js.map +1 -1
- package/build/hooks/block-style-variation.js +142 -0
- package/build/hooks/block-style-variation.js.map +1 -0
- package/build/hooks/border.js +6 -5
- package/build/hooks/border.js.map +1 -1
- package/build/hooks/color.js +11 -9
- package/build/hooks/color.js.map +1 -1
- package/build/hooks/content-lock-ui.js +23 -15
- package/build/hooks/content-lock-ui.js.map +1 -1
- package/build/hooks/contrast-checker.js +2 -2
- package/build/hooks/contrast-checker.js.map +1 -1
- package/build/hooks/custom-class-name.js +17 -16
- package/build/hooks/custom-class-name.js.map +1 -1
- package/build/hooks/dimensions.js +24 -21
- package/build/hooks/dimensions.js.map +1 -1
- package/build/hooks/duotone.js +49 -45
- package/build/hooks/duotone.js.map +1 -1
- package/build/hooks/font-family.js +3 -3
- package/build/hooks/font-family.js.map +1 -1
- package/build/hooks/font-size.js +2 -2
- package/build/hooks/font-size.js.map +1 -1
- package/build/hooks/index.js +4 -2
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/layout-child.js +26 -24
- package/build/hooks/layout-child.js.map +1 -1
- package/build/hooks/layout.js +61 -55
- package/build/hooks/layout.js.map +1 -1
- package/build/hooks/line-height.js +2 -2
- package/build/hooks/line-height.js.map +1 -1
- package/build/hooks/position.js +28 -26
- package/build/hooks/position.js.map +1 -1
- package/build/hooks/spacing-visualizer.js +10 -9
- package/build/hooks/spacing-visualizer.js.map +1 -1
- package/build/hooks/style.js +23 -13
- package/build/hooks/style.js.map +1 -1
- package/build/hooks/text-align.js +19 -18
- package/build/hooks/text-align.js.map +1 -1
- package/build/hooks/typography.js +6 -5
- package/build/hooks/typography.js.map +1 -1
- package/build/hooks/typography.native.js +11 -8
- package/build/hooks/typography.native.js.map +1 -1
- package/build/hooks/use-bindings-attributes.js +47 -15
- package/build/hooks/use-bindings-attributes.js.map +1 -1
- package/build/hooks/use-typography-props.js +4 -3
- package/build/hooks/use-typography-props.js.map +1 -1
- package/build/hooks/use-zoom-out.js +2 -2
- package/build/hooks/use-zoom-out.js.map +1 -1
- package/build/hooks/utils.js +18 -17
- package/build/hooks/utils.js.map +1 -1
- package/build/layouts/constrained.js +66 -58
- package/build/layouts/constrained.js.map +1 -1
- package/build/layouts/flex.js +75 -61
- package/build/layouts/flex.js.map +1 -1
- package/build/layouts/grid.js +146 -125
- package/build/layouts/grid.js.map +1 -1
- package/build/private-apis.js +7 -1
- package/build/private-apis.js.map +1 -1
- package/build/store/actions.js +40 -8
- package/build/store/actions.js.map +1 -1
- package/build/store/get-block-settings.js +2 -49
- package/build/store/get-block-settings.js.map +1 -1
- package/build/store/reducer.js +21 -14
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +34 -6
- package/build/store/selectors.js.map +1 -1
- package/build/store/utils.js +2 -0
- package/build/store/utils.js.map +1 -1
- package/build/utils/transform-styles/index.js +1 -1
- package/build/utils/transform-styles/index.js.map +1 -1
- package/build-module/autocompleters/block.js +9 -6
- package/build-module/autocompleters/block.js.map +1 -1
- package/build-module/autocompleters/link.js +12 -8
- package/build-module/autocompleters/link.js.map +1 -1
- package/build-module/components/alignment-control/index.js +3 -3
- package/build-module/components/alignment-control/index.js.map +1 -1
- package/build-module/components/alignment-control/ui.js +2 -2
- package/build-module/components/alignment-control/ui.js.map +1 -1
- package/build-module/components/audio-player/audio-url-parser.native.js +16 -0
- package/build-module/components/audio-player/audio-url-parser.native.js.map +1 -0
- package/build-module/components/audio-player/index.native.js +167 -0
- package/build-module/components/audio-player/index.native.js.map +1 -0
- package/build-module/components/autocomplete/index.js +2 -2
- package/build-module/components/autocomplete/index.js.map +1 -1
- package/build-module/components/block-alignment-control/index.js +3 -3
- package/build-module/components/block-alignment-control/index.js.map +1 -1
- package/build-module/components/block-alignment-control/ui.js +34 -30
- package/build-module/components/block-alignment-control/ui.js.map +1 -1
- package/build-module/components/block-alignment-control/ui.native.js +2 -2
- package/build-module/components/block-alignment-control/ui.native.js.map +1 -1
- package/build-module/components/block-alignment-matrix-control/index.js +5 -5
- package/build-module/components/block-alignment-matrix-control/index.js.map +1 -1
- package/build-module/components/block-bindings-toolbar-indicator/index.js +94 -13
- package/build-module/components/block-bindings-toolbar-indicator/index.js.map +1 -1
- package/build-module/components/block-breadcrumb/index.js +38 -32
- package/build-module/components/block-breadcrumb/index.js.map +1 -1
- package/build-module/components/block-canvas/index.js +37 -31
- package/build-module/components/block-canvas/index.js.map +1 -1
- package/build-module/components/block-caption/index.native.js +15 -14
- package/build-module/components/block-caption/index.native.js.map +1 -1
- package/build-module/components/block-card/index.js +34 -28
- package/build-module/components/block-card/index.js.map +1 -1
- package/build-module/components/block-compare/block-view.js +28 -18
- package/build-module/components/block-compare/block-view.js.map +1 -1
- package/build-module/components/block-compare/index.js +24 -22
- package/build-module/components/block-compare/index.js.map +1 -1
- package/build-module/components/block-context/index.js +2 -2
- package/build-module/components/block-context/index.js.map +1 -1
- package/build-module/components/block-controls/fill.js +24 -16
- package/build-module/components/block-controls/fill.js.map +1 -1
- package/build-module/components/block-controls/index.js +3 -3
- package/build-module/components/block-controls/index.js.map +1 -1
- package/build-module/components/block-controls/slot.js +6 -4
- package/build-module/components/block-controls/slot.js.map +1 -1
- package/build-module/components/block-controls/slot.native.js +12 -9
- package/build-module/components/block-controls/slot.native.js.map +1 -1
- package/build-module/components/block-controls/use-has-block-controls.js +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 +28 -19
- package/build-module/components/block-draggable/draggable-chip.js.map +1 -1
- package/build-module/components/block-draggable/draggable-chip.native.js +10 -8
- package/build-module/components/block-draggable/draggable-chip.native.js.map +1 -1
- package/build-module/components/block-draggable/dropping-insertion-point.native.js +2 -2
- package/build-module/components/block-draggable/dropping-insertion-point.native.js.map +1 -1
- package/build-module/components/block-draggable/index.js +14 -13
- package/build-module/components/block-draggable/index.js.map +1 -1
- package/build-module/components/block-draggable/index.native.js +39 -30
- package/build-module/components/block-draggable/index.native.js.map +1 -1
- package/build-module/components/block-edit/edit.js +4 -4
- package/build-module/components/block-edit/edit.js.map +1 -1
- package/build-module/components/block-edit/edit.native.js +2 -2
- package/build-module/components/block-edit/edit.native.js.map +1 -1
- package/build-module/components/block-edit/index.js +19 -7
- package/build-module/components/block-edit/index.js.map +1 -1
- package/build-module/components/block-edit/multiple-usage-warning.js +40 -0
- package/build-module/components/block-edit/multiple-usage-warning.js.map +1 -0
- package/build-module/components/block-edit-visually-button/index.js +9 -6
- package/build-module/components/block-edit-visually-button/index.js.map +1 -1
- package/build-module/components/block-full-height-alignment-control/index.js +2 -2
- package/build-module/components/block-full-height-alignment-control/index.js.map +1 -1
- package/build-module/components/block-heading-level-dropdown/heading-level-icon.js +2 -3
- package/build-module/components/block-heading-level-dropdown/heading-level-icon.js.map +1 -1
- package/build-module/components/block-heading-level-dropdown/index.js +4 -4
- package/build-module/components/block-heading-level-dropdown/index.js.map +1 -1
- package/build-module/components/block-heading-level-dropdown/index.native.js +4 -4
- package/build-module/components/block-heading-level-dropdown/index.native.js.map +1 -1
- package/build-module/components/block-icon/index.js +6 -5
- package/build-module/components/block-icon/index.js.map +1 -1
- package/build-module/components/block-icon/index.native.js +6 -5
- package/build-module/components/block-icon/index.native.js.map +1 -1
- package/build-module/components/block-info-slot-fill/index.js +3 -3
- package/build-module/components/block-info-slot-fill/index.js.map +1 -1
- package/build-module/components/block-inspector/index.js +104 -88
- package/build-module/components/block-inspector/index.js.map +1 -1
- package/build-module/components/block-inspector/useBlockInspectorAnimationSettings.js +2 -2
- package/build-module/components/block-inspector/useBlockInspectorAnimationSettings.js.map +1 -1
- package/build-module/components/block-list/block-crash-warning.js +5 -4
- package/build-module/components/block-list/block-crash-warning.js.map +1 -1
- package/build-module/components/block-list/block-crash-warning.native.js +2 -2
- package/build-module/components/block-list/block-crash-warning.native.js.map +1 -1
- package/build-module/components/block-list/block-html.js +2 -2
- package/build-module/components/block-list/block-html.js.map +1 -1
- package/build-module/components/block-list/block-invalid-warning.js +27 -21
- package/build-module/components/block-list/block-invalid-warning.js.map +1 -1
- package/build-module/components/block-list/block-invalid-warning.native.js +12 -11
- package/build-module/components/block-list/block-invalid-warning.native.js.map +1 -1
- package/build-module/components/block-list/block-list-item-cell.native.js +5 -4
- 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 +29 -26
- package/build-module/components/block-list/block-list-item.native.js.map +1 -1
- package/build-module/components/block-list/block-outline.native.js +2 -2
- package/build-module/components/block-list/block-outline.native.js.map +1 -1
- package/build-module/components/block-list/block-selection-button.native.js +36 -33
- package/build-module/components/block-list/block-selection-button.native.js.map +1 -1
- package/build-module/components/block-list/block.js +109 -61
- package/build-module/components/block-list/block.js.map +1 -1
- package/build-module/components/block-list/block.native.js +61 -51
- package/build-module/components/block-list/block.native.js.map +1 -1
- package/build-module/components/block-list/grid-item.native.js +5 -4
- package/build-module/components/block-list/grid-item.native.js.map +1 -1
- package/build-module/components/block-list/index.js +39 -34
- package/build-module/components/block-list/index.js.map +1 -1
- package/build-module/components/block-list/index.native.js +99 -85
- package/build-module/components/block-list/index.native.js.map +1 -1
- package/build-module/components/block-list/insertion-point.native.js +13 -10
- package/build-module/components/block-list/insertion-point.native.js.map +1 -1
- package/build-module/components/block-list/layout.js +7 -3
- package/build-module/components/block-list/layout.js.map +1 -1
- package/build-module/components/block-list/subdirectory-icon.js +8 -7
- package/build-module/components/block-list/subdirectory-icon.js.map +1 -1
- package/build-module/components/block-list/use-block-props/index.js +1 -1
- package/build-module/components/block-list/use-block-props/index.js.map +1 -1
- package/build-module/components/block-list-appender/index.js +9 -8
- package/build-module/components/block-list-appender/index.js.map +1 -1
- package/build-module/components/block-list-appender/index.native.js +4 -4
- package/build-module/components/block-list-appender/index.native.js.map +1 -1
- package/build-module/components/block-lock/menu-item.js +15 -10
- package/build-module/components/block-lock/menu-item.js.map +1 -1
- package/build-module/components/block-lock/modal.js +108 -90
- package/build-module/components/block-lock/modal.js.map +1 -1
- package/build-module/components/block-lock/toolbar.js +20 -15
- package/build-module/components/block-lock/toolbar.js.map +1 -1
- package/build-module/components/block-media-update-progress/index.native.js +18 -15
- package/build-module/components/block-media-update-progress/index.native.js.map +1 -1
- package/build-module/components/block-mover/button.js +21 -16
- package/build-module/components/block-mover/button.js.map +1 -1
- package/build-module/components/block-mover/index.js +35 -27
- package/build-module/components/block-mover/index.js.map +1 -1
- package/build-module/components/block-mover/index.native.js +30 -27
- package/build-module/components/block-mover/index.native.js.map +1 -1
- package/build-module/components/block-navigation/dropdown.js +12 -9
- package/build-module/components/block-navigation/dropdown.js.map +1 -1
- package/build-module/components/block-parent-selector/index.js +13 -13
- package/build-module/components/block-parent-selector/index.js.map +1 -1
- package/build-module/components/block-pattern-setup/index.js +90 -76
- package/build-module/components/block-pattern-setup/index.js.map +1 -1
- package/build-module/components/block-pattern-setup/setup-toolbar.js +51 -45
- package/build-module/components/block-pattern-setup/setup-toolbar.js.map +1 -1
- package/build-module/components/block-patterns-list/index.js +98 -86
- package/build-module/components/block-patterns-list/index.js.map +1 -1
- package/build-module/components/block-patterns-paging/index.js +71 -52
- package/build-module/components/block-patterns-paging/index.js.map +1 -1
- package/build-module/components/block-popover/cover.js +13 -10
- package/build-module/components/block-popover/cover.js.map +1 -1
- package/build-module/components/block-popover/drop-zone.js +11 -10
- package/build-module/components/block-popover/drop-zone.js.map +1 -1
- package/build-module/components/block-popover/inbetween.js +8 -7
- package/build-module/components/block-popover/inbetween.js.map +1 -1
- package/build-module/components/block-popover/index.js +9 -7
- package/build-module/components/block-popover/index.js.map +1 -1
- package/build-module/components/block-preview/auto.js +55 -47
- package/build-module/components/block-preview/auto.js.map +1 -1
- package/build-module/components/block-preview/index.js +17 -14
- package/build-module/components/block-preview/index.js.map +1 -1
- package/build-module/components/block-quick-navigation/index.js +25 -16
- package/build-module/components/block-quick-navigation/index.js.map +1 -1
- package/build-module/components/block-removal-warning-modal/index.js +19 -12
- package/build-module/components/block-removal-warning-modal/index.js.map +1 -1
- package/build-module/components/block-rename/modal.js +45 -37
- package/build-module/components/block-rename/modal.js.map +1 -1
- package/build-module/components/block-rename/rename-control.js +26 -21
- package/build-module/components/block-rename/rename-control.js.map +1 -1
- package/build-module/components/block-selection-clearer/index.js +2 -2
- package/build-module/components/block-selection-clearer/index.js.map +1 -1
- package/build-module/components/block-settings/button.native.js +13 -9
- package/build-module/components/block-settings/button.native.js.map +1 -1
- package/build-module/components/block-settings/container.native.js +42 -28
- package/build-module/components/block-settings/container.native.js.map +1 -1
- package/build-module/components/block-settings-menu/block-html-convert-button.js +5 -4
- 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 +5 -4
- 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 +7 -6
- 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 +95 -75
- package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build-module/components/block-settings-menu/index.js +10 -6
- package/build-module/components/block-settings-menu/index.js.map +1 -1
- package/build-module/components/block-settings-menu-controls/index.js +30 -24
- package/build-module/components/block-settings-menu-controls/index.js.map +1 -1
- package/build-module/components/block-styles/index.js +44 -38
- package/build-module/components/block-styles/index.js.map +1 -1
- package/build-module/components/block-styles/index.native.js +7 -7
- package/build-module/components/block-styles/index.native.js.map +1 -1
- package/build-module/components/block-styles/menu-items.js +18 -14
- package/build-module/components/block-styles/menu-items.js.map +1 -1
- package/build-module/components/block-styles/preview-panel.js +2 -2
- package/build-module/components/block-styles/preview-panel.js.map +1 -1
- package/build-module/components/block-styles/preview.native.js +25 -21
- package/build-module/components/block-styles/preview.native.js.map +1 -1
- package/build-module/components/block-switcher/block-styles-menu.js +8 -7
- package/build-module/components/block-switcher/block-styles-menu.js.map +1 -1
- package/build-module/components/block-switcher/block-transformations-menu.js +33 -28
- package/build-module/components/block-switcher/block-transformations-menu.js.map +1 -1
- package/build-module/components/block-switcher/block-transformations-menu.native.js +2 -2
- package/build-module/components/block-switcher/block-transformations-menu.native.js.map +1 -1
- package/build-module/components/block-switcher/block-variation-transformations.js +21 -17
- package/build-module/components/block-switcher/block-variation-transformations.js.map +1 -1
- package/build-module/components/block-switcher/index.js +87 -70
- package/build-module/components/block-switcher/index.js.map +1 -1
- package/build-module/components/block-switcher/pattern-transformations-menu.js +62 -51
- package/build-module/components/block-switcher/pattern-transformations-menu.js.map +1 -1
- package/build-module/components/block-switcher/preview-block-popover.js +23 -17
- package/build-module/components/block-switcher/preview-block-popover.js.map +1 -1
- package/build-module/components/block-toolbar/block-toolbar-menu.native.js +39 -34
- package/build-module/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
- package/build-module/components/block-toolbar/index.js +55 -43
- package/build-module/components/block-toolbar/index.js.map +1 -1
- package/build-module/components/block-toolbar/index.native.js +29 -21
- package/build-module/components/block-toolbar/index.native.js.map +1 -1
- package/build-module/components/block-toolbar/shuffle.js +7 -5
- package/build-module/components/block-toolbar/shuffle.js.map +1 -1
- package/build-module/components/block-tools/block-selection-button.js +61 -46
- package/build-module/components/block-tools/block-selection-button.js.map +1 -1
- package/build-module/components/block-tools/block-toolbar-breadcrumb.js +8 -7
- package/build-module/components/block-tools/block-toolbar-breadcrumb.js.map +1 -1
- package/build-module/components/block-tools/block-toolbar-popover.js +15 -14
- package/build-module/components/block-tools/block-toolbar-popover.js.map +1 -1
- package/build-module/components/block-tools/empty-block-inserter.js +13 -11
- package/build-module/components/block-tools/empty-block-inserter.js.map +1 -1
- package/build-module/components/block-tools/index.js +30 -26
- package/build-module/components/block-tools/index.js.map +1 -1
- package/build-module/components/block-tools/insertion-point.js +43 -40
- package/build-module/components/block-tools/insertion-point.js.map +1 -1
- package/build-module/components/block-tools/zoom-out-mode-inserters.js +34 -32
- package/build-module/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
- package/build-module/components/block-types-list/index.js +16 -15
- package/build-module/components/block-types-list/index.js.map +1 -1
- package/build-module/components/block-types-list/index.native.js +31 -26
- package/build-module/components/block-types-list/index.native.js.map +1 -1
- package/build-module/components/block-variation-picker/index.js +31 -25
- package/build-module/components/block-variation-picker/index.js.map +1 -1
- package/build-module/components/block-variation-picker/index.native.js +33 -25
- package/build-module/components/block-variation-picker/index.native.js.map +1 -1
- package/build-module/components/block-variation-transforms/index.js +54 -47
- package/build-module/components/block-variation-transforms/index.js.map +1 -1
- package/build-module/components/block-vertical-alignment-control/icons.js +31 -26
- package/build-module/components/block-vertical-alignment-control/icons.js.map +1 -1
- package/build-module/components/block-vertical-alignment-control/index.js +3 -3
- package/build-module/components/block-vertical-alignment-control/index.js.map +1 -1
- package/build-module/components/block-vertical-alignment-control/ui.js +2 -2
- package/build-module/components/block-vertical-alignment-control/ui.js.map +1 -1
- package/build-module/components/border-radius-control/all-input-control.js +3 -3
- package/build-module/components/border-radius-control/all-input-control.js.map +1 -1
- package/build-module/components/border-radius-control/index.js +45 -38
- package/build-module/components/border-radius-control/index.js.map +1 -1
- package/build-module/components/border-radius-control/input-controls.js +23 -21
- package/build-module/components/border-radius-control/input-controls.js.map +1 -1
- package/build-module/components/border-radius-control/linked-button.js +12 -11
- package/build-module/components/border-radius-control/linked-button.js.map +1 -1
- package/build-module/components/button-block-appender/index.js +20 -13
- package/build-module/components/button-block-appender/index.js.map +1 -1
- package/build-module/components/button-block-appender/index.native.js +29 -24
- package/build-module/components/button-block-appender/index.native.js.map +1 -1
- package/build-module/components/caption/index.native.js +22 -21
- package/build-module/components/caption/index.native.js.map +1 -1
- package/build-module/components/child-layout-control/index.js +139 -129
- package/build-module/components/child-layout-control/index.js.map +1 -1
- package/build-module/components/color-palette/control.js +2 -2
- package/build-module/components/color-palette/control.js.map +1 -1
- package/build-module/components/color-palette/with-color-context.js +2 -2
- package/build-module/components/color-palette/with-color-context.js.map +1 -1
- package/build-module/components/color-style-selector/index.js +29 -20
- package/build-module/components/color-style-selector/index.js.map +1 -1
- package/build-module/components/colors/utils.js +3 -3
- package/build-module/components/colors/utils.js.map +1 -1
- package/build-module/components/colors/with-colors.js +7 -7
- package/build-module/components/colors/with-colors.js.map +1 -1
- package/build-module/components/colors-gradients/control.js +54 -39
- package/build-module/components/colors-gradients/control.js.map +1 -1
- package/build-module/components/colors-gradients/dropdown.js +72 -61
- package/build-module/components/colors-gradients/dropdown.js.map +1 -1
- package/build-module/components/colors-gradients/panel-color-gradient-settings.js +23 -18
- 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 +13 -7
- package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
- package/build-module/components/contrast-checker/index.js +10 -8
- package/build-module/components/contrast-checker/index.js.map +1 -1
- package/build-module/components/contrast-checker/index.native.js +13 -10
- package/build-module/components/contrast-checker/index.native.js.map +1 -1
- package/build-module/components/convert-to-group-buttons/index.js +19 -13
- package/build-module/components/convert-to-group-buttons/index.js.map +1 -1
- package/build-module/components/convert-to-group-buttons/toolbar.js +21 -18
- package/build-module/components/convert-to-group-buttons/toolbar.js.map +1 -1
- package/build-module/components/copy-handler/index.js +2 -2
- package/build-module/components/copy-handler/index.js.map +1 -1
- package/build-module/components/date-format-picker/index.js +45 -40
- package/build-module/components/date-format-picker/index.js.map +1 -1
- package/build-module/components/default-block-appender/index.js +33 -30
- package/build-module/components/default-block-appender/index.js.map +1 -1
- package/build-module/components/default-block-appender/index.native.js +14 -12
- package/build-module/components/default-block-appender/index.native.js.map +1 -1
- package/build-module/components/dimensions-tool/aspect-ratio-tool.js +12 -12
- package/build-module/components/dimensions-tool/aspect-ratio-tool.js.map +1 -1
- package/build-module/components/dimensions-tool/index.js +117 -113
- package/build-module/components/dimensions-tool/index.js.map +1 -1
- package/build-module/components/dimensions-tool/scale-tool.js +15 -14
- package/build-module/components/dimensions-tool/scale-tool.js.map +1 -1
- package/build-module/components/dimensions-tool/width-height-tool.js +39 -33
- package/build-module/components/dimensions-tool/width-height-tool.js.map +1 -1
- package/build-module/components/duotone-control/index.js +22 -18
- package/build-module/components/duotone-control/index.js.map +1 -1
- package/build-module/components/editable-text/index.js +6 -5
- package/build-module/components/editable-text/index.js.map +1 -1
- package/build-module/components/editor-styles/index.js +25 -21
- package/build-module/components/editor-styles/index.js.map +1 -1
- package/build-module/components/floating-toolbar/index.native.js +19 -16
- package/build-module/components/floating-toolbar/index.native.js.map +1 -1
- package/build-module/components/floating-toolbar/nav-up-icon.js +15 -13
- package/build-module/components/floating-toolbar/nav-up-icon.js.map +1 -1
- package/build-module/components/font-appearance-control/index.js +2 -2
- package/build-module/components/font-appearance-control/index.js.map +1 -1
- package/build-module/components/font-family/index.js +2 -2
- package/build-module/components/font-family/index.js.map +1 -1
- package/build-module/components/font-sizes/font-size-picker.js +2 -2
- package/build-module/components/font-sizes/font-size-picker.js.map +1 -1
- package/build-module/components/font-sizes/utils.js +3 -3
- package/build-module/components/font-sizes/utils.js.map +1 -1
- package/build-module/components/font-sizes/with-font-sizes.js +3 -3
- package/build-module/components/font-sizes/with-font-sizes.js.map +1 -1
- package/build-module/components/global-styles/advanced-panel.js +18 -15
- package/build-module/components/global-styles/advanced-panel.js.map +1 -1
- package/build-module/components/global-styles/background-panel.js +189 -122
- package/build-module/components/global-styles/background-panel.js.map +1 -1
- package/build-module/components/global-styles/border-panel.js +63 -56
- package/build-module/components/global-styles/border-panel.js.map +1 -1
- package/build-module/components/global-styles/color-panel.js +112 -87
- package/build-module/components/global-styles/color-panel.js.map +1 -1
- package/build-module/components/global-styles/color-panel.native.js +13 -10
- package/build-module/components/global-styles/color-panel.native.js.map +1 -1
- package/build-module/components/global-styles/dimensions-panel.js +184 -171
- package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
- package/build-module/components/global-styles/filters-panel.js +79 -65
- package/build-module/components/global-styles/filters-panel.js.map +1 -1
- package/build-module/components/global-styles/hooks.js +14 -3
- package/build-module/components/global-styles/hooks.js.map +1 -1
- package/build-module/components/global-styles/image-settings-panel.js +27 -22
- package/build-module/components/global-styles/image-settings-panel.js.map +1 -1
- package/build-module/components/global-styles/index.js +2 -2
- package/build-module/components/global-styles/index.js.map +1 -1
- package/build-module/components/global-styles/shadow-panel-components.js +74 -63
- package/build-module/components/global-styles/shadow-panel-components.js.map +1 -1
- package/build-module/components/global-styles/theme-file-uri-utils.js +73 -0
- package/build-module/components/global-styles/theme-file-uri-utils.js.map +1 -0
- package/build-module/components/global-styles/typography-panel.js +177 -135
- package/build-module/components/global-styles/typography-panel.js.map +1 -1
- package/build-module/components/global-styles/use-global-styles-context.native.js +431 -0
- package/build-module/components/global-styles/use-global-styles-context.native.js.map +1 -0
- package/build-module/components/global-styles/use-global-styles-output.js +114 -78
- package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build-module/components/gradients/with-gradient.js +2 -2
- package/build-module/components/gradients/with-gradient.js.map +1 -1
- package/build-module/components/grid-visualizer/grid-item-resizer.js +59 -58
- package/build-module/components/grid-visualizer/grid-item-resizer.js.map +1 -1
- package/build-module/components/grid-visualizer/grid-visualizer.js +20 -15
- package/build-module/components/grid-visualizer/grid-visualizer.js.map +1 -1
- package/build-module/components/height-control/index.js +40 -32
- package/build-module/components/height-control/index.js.map +1 -1
- package/build-module/components/iframe/index.js +72 -62
- package/build-module/components/iframe/index.js.map +1 -1
- package/build-module/components/image-editor/aspect-ratio-dropdown.js +75 -69
- package/build-module/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
- package/build-module/components/image-editor/context.js +5 -4
- package/build-module/components/image-editor/context.js.map +1 -1
- package/build-module/components/image-editor/cropper.js +26 -21
- package/build-module/components/image-editor/cropper.js.map +1 -1
- package/build-module/components/image-editor/form-controls.js +13 -7
- package/build-module/components/image-editor/form-controls.js.map +1 -1
- package/build-module/components/image-editor/index.js +23 -13
- package/build-module/components/image-editor/index.js.map +1 -1
- package/build-module/components/image-editor/rotation-button.js +2 -2
- package/build-module/components/image-editor/rotation-button.js.map +1 -1
- package/build-module/components/image-editor/zoom-dropdown.js +4 -4
- package/build-module/components/image-editor/zoom-dropdown.js.map +1 -1
- package/build-module/components/image-link-destinations/index.native.js +39 -27
- package/build-module/components/image-link-destinations/index.native.js.map +1 -1
- package/build-module/components/image-size-control/index.js +55 -45
- package/build-module/components/image-size-control/index.js.map +1 -1
- package/build-module/components/index.native.js +2 -0
- package/build-module/components/index.native.js.map +1 -1
- package/build-module/components/inner-blocks/button-block-appender.js +2 -2
- package/build-module/components/inner-blocks/button-block-appender.js.map +1 -1
- package/build-module/components/inner-blocks/default-block-appender.js +2 -2
- package/build-module/components/inner-blocks/default-block-appender.js.map +1 -1
- package/build-module/components/inner-blocks/index.js +19 -16
- package/build-module/components/inner-blocks/index.js.map +1 -1
- package/build-module/components/inner-blocks/index.native.js +31 -29
- package/build-module/components/inner-blocks/index.native.js.map +1 -1
- package/build-module/components/inner-blocks/use-nested-settings-update.js +11 -14
- 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 +21 -17
- 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 +2 -2
- package/build-module/components/inner-blocks/with-client-id.js.map +1 -1
- package/build-module/components/inserter/block-patterns-explorer/index.js +23 -20
- 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 +40 -36
- 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 +27 -19
- package/build-module/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab/index.js +40 -31
- 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 +21 -5
- 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 +44 -31
- 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 +56 -42
- package/build-module/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
- package/build-module/components/inserter/block-types-tab.js +110 -67
- package/build-module/components/inserter/block-types-tab.js.map +1 -1
- package/build-module/components/inserter/block-types-tab.native.js +2 -2
- package/build-module/components/inserter/block-types-tab.native.js.map +1 -1
- package/build-module/components/inserter/category-tabs/index.js +27 -20
- package/build-module/components/inserter/category-tabs/index.js.map +1 -1
- package/build-module/components/inserter/hooks/use-block-types-state.js +11 -5
- package/build-module/components/inserter/hooks/use-block-types-state.js.map +1 -1
- package/build-module/components/inserter/hooks/use-insertion-point.js +33 -6
- package/build-module/components/inserter/hooks/use-insertion-point.js.map +1 -1
- package/build-module/components/inserter/index.js +6 -6
- package/build-module/components/inserter/index.js.map +1 -1
- package/build-module/components/inserter/index.native.js +23 -19
- package/build-module/components/inserter/index.native.js.map +1 -1
- package/build-module/components/inserter/library.js +14 -6
- package/build-module/components/inserter/library.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-list.js +9 -9
- package/build-module/components/inserter/media-tab/media-list.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-panel.js +20 -17
- package/build-module/components/inserter/media-tab/media-panel.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-preview.js +94 -66
- package/build-module/components/inserter/media-tab/media-preview.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-tab.js +46 -36
- package/build-module/components/inserter/media-tab/media-tab.js.map +1 -1
- package/build-module/components/inserter/media-tab/utils.js +2 -2
- package/build-module/components/inserter/media-tab/utils.js.map +1 -1
- package/build-module/components/inserter/menu.js +102 -83
- package/build-module/components/inserter/menu.js.map +1 -1
- package/build-module/components/inserter/menu.native.js +36 -28
- package/build-module/components/inserter/menu.native.js.map +1 -1
- package/build-module/components/inserter/mobile-tab-navigation.js +57 -40
- package/build-module/components/inserter/mobile-tab-navigation.js.map +1 -1
- package/build-module/components/inserter/no-results.js +11 -7
- package/build-module/components/inserter/no-results.js.map +1 -1
- package/build-module/components/inserter/no-results.native.js +14 -8
- package/build-module/components/inserter/no-results.native.js.map +1 -1
- package/build-module/components/inserter/panel.js +17 -10
- package/build-module/components/inserter/panel.js.map +1 -1
- package/build-module/components/inserter/preview-panel.js +25 -20
- package/build-module/components/inserter/preview-panel.js.map +1 -1
- package/build-module/components/inserter/quick-inserter.js +36 -31
- package/build-module/components/inserter/quick-inserter.js.map +1 -1
- package/build-module/components/inserter/reusable-block-rename-hint.js +21 -18
- package/build-module/components/inserter/reusable-block-rename-hint.js.map +1 -1
- package/build-module/components/inserter/reusable-blocks-tab.native.js +2 -2
- package/build-module/components/inserter/reusable-blocks-tab.native.js.map +1 -1
- package/build-module/components/inserter/search-results.js +53 -41
- package/build-module/components/inserter/search-results.js.map +1 -1
- package/build-module/components/inserter/search-results.native.js +3 -3
- package/build-module/components/inserter/search-results.native.js.map +1 -1
- package/build-module/components/inserter/tabs.js +31 -26
- package/build-module/components/inserter/tabs.js.map +1 -1
- package/build-module/components/inserter/tabs.native.js +20 -18
- package/build-module/components/inserter/tabs.native.js.map +1 -1
- package/build-module/components/inserter/tips.js +7 -5
- package/build-module/components/inserter/tips.js.map +1 -1
- package/build-module/components/inserter-button/index.native.js +29 -23
- package/build-module/components/inserter-button/index.native.js.map +1 -1
- package/build-module/components/inserter-button/sparkles.js +8 -7
- package/build-module/components/inserter-button/sparkles.js.map +1 -1
- package/build-module/components/inserter-draggable-blocks/index.js +14 -13
- package/build-module/components/inserter-draggable-blocks/index.js.map +1 -1
- package/build-module/components/inserter-list-item/index.js +69 -62
- package/build-module/components/inserter-list-item/index.js.map +1 -1
- package/build-module/components/inserter-listbox/group.js +2 -2
- package/build-module/components/inserter-listbox/group.js.map +1 -1
- package/build-module/components/inserter-listbox/index.js +6 -4
- package/build-module/components/inserter-listbox/index.js.map +1 -1
- package/build-module/components/inserter-listbox/item.js +10 -8
- package/build-module/components/inserter-listbox/item.js.map +1 -1
- package/build-module/components/inserter-listbox/row.js +2 -2
- package/build-module/components/inserter-listbox/row.js.map +1 -1
- package/build-module/components/inspector-controls/block-support-slot-container.js +2 -2
- package/build-module/components/inspector-controls/block-support-slot-container.js.map +1 -1
- package/build-module/components/inspector-controls/block-support-tools-panel.js +5 -5
- package/build-module/components/inspector-controls/block-support-tools-panel.js.map +1 -1
- package/build-module/components/inspector-controls/fill.js +22 -17
- package/build-module/components/inspector-controls/fill.js.map +1 -1
- package/build-module/components/inspector-controls/fill.native.js +14 -5
- package/build-module/components/inspector-controls/fill.native.js.map +1 -1
- package/build-module/components/inspector-controls/index.js +3 -3
- package/build-module/components/inspector-controls/index.js.map +1 -1
- package/build-module/components/inspector-controls/slot.js +11 -10
- package/build-module/components/inspector-controls/slot.js.map +1 -1
- package/build-module/components/inspector-controls/slot.native.js +3 -3
- package/build-module/components/inspector-controls/slot.native.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/advanced-controls-panel.js +7 -6
- 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 +11 -9
- package/build-module/components/inspector-controls-tabs/advanced-controls-panel.native.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/index.js +45 -32
- package/build-module/components/inspector-controls-tabs/index.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/position-controls-panel.js +8 -7
- 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 +21 -18
- package/build-module/components/inspector-controls-tabs/settings-tab-hint.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/settings-tab.js +8 -2
- package/build-module/components/inspector-controls-tabs/settings-tab.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/styles-tab.js +33 -26
- package/build-module/components/inspector-controls-tabs/styles-tab.js.map +1 -1
- package/build-module/components/inspector-popover-header/index.js +32 -26
- package/build-module/components/inspector-popover-header/index.js.map +1 -1
- package/build-module/components/justify-content-control/index.js +3 -3
- package/build-module/components/justify-content-control/index.js.map +1 -1
- package/build-module/components/justify-content-control/ui.js +2 -2
- package/build-module/components/justify-content-control/ui.js.map +1 -1
- package/build-module/components/letter-spacing-control/index.js +2 -2
- package/build-module/components/letter-spacing-control/index.js.map +1 -1
- package/build-module/components/line-height-control/index.js +17 -16
- package/build-module/components/line-height-control/index.js.map +1 -1
- package/build-module/components/line-height-control/index.native.js +2 -2
- package/build-module/components/line-height-control/index.native.js.map +1 -1
- package/build-module/components/link-control/index.js +102 -82
- package/build-module/components/link-control/index.js.map +1 -1
- package/build-module/components/link-control/link-preview.js +64 -49
- package/build-module/components/link-control/link-preview.js.map +1 -1
- package/build-module/components/link-control/search-create-button.js +6 -5
- package/build-module/components/link-control/search-create-button.js.map +1 -1
- package/build-module/components/link-control/search-input.js +33 -31
- package/build-module/components/link-control/search-input.js.map +1 -1
- package/build-module/components/link-control/search-item.js +12 -11
- package/build-module/components/link-control/search-item.js.map +1 -1
- package/build-module/components/link-control/search-results.js +51 -46
- package/build-module/components/link-control/search-results.js.map +1 -1
- package/build-module/components/link-control/settings-drawer.js +39 -30
- package/build-module/components/link-control/settings-drawer.js.map +1 -1
- package/build-module/components/link-control/settings.js +11 -9
- package/build-module/components/link-control/settings.js.map +1 -1
- package/build-module/components/list-view/appender.js +25 -22
- package/build-module/components/list-view/appender.js.map +1 -1
- package/build-module/components/list-view/aria-referenced-text.js +5 -4
- package/build-module/components/list-view/aria-referenced-text.js.map +1 -1
- package/build-module/components/list-view/block-contents.js +34 -29
- package/build-module/components/list-view/block-contents.js.map +1 -1
- package/build-module/components/list-view/block-select-button.js +51 -42
- package/build-module/components/list-view/block-select-button.js.map +1 -1
- package/build-module/components/list-view/block.js +98 -84
- package/build-module/components/list-view/block.js.map +1 -1
- package/build-module/components/list-view/branch.js +102 -93
- package/build-module/components/list-view/branch.js.map +1 -1
- package/build-module/components/list-view/drop-indicator.js +39 -31
- package/build-module/components/list-view/drop-indicator.js.map +1 -1
- package/build-module/components/list-view/expander.js +8 -6
- package/build-module/components/list-view/expander.js.map +1 -1
- package/build-module/components/list-view/index.js +43 -38
- package/build-module/components/list-view/index.js.map +1 -1
- package/build-module/components/list-view/leaf.js +5 -4
- package/build-module/components/list-view/leaf.js.map +1 -1
- package/build-module/components/media-placeholder/index.js +101 -79
- package/build-module/components/media-placeholder/index.js.map +1 -1
- package/build-module/components/media-placeholder/index.native.js +65 -52
- package/build-module/components/media-placeholder/index.native.js.map +1 -1
- package/build-module/components/media-replace-flow/index.js +74 -60
- package/build-module/components/media-replace-flow/index.js.map +1 -1
- package/build-module/components/media-replace-flow/index.native.js +2 -2
- package/build-module/components/media-replace-flow/index.native.js.map +1 -1
- package/build-module/components/media-upload/index.native.js +46 -40
- package/build-module/components/media-upload/index.native.js.map +1 -1
- package/build-module/components/media-upload-progress/index.native.js +41 -16
- package/build-module/components/media-upload-progress/index.native.js.map +1 -1
- package/build-module/components/multi-selection-inspector/index.js +20 -15
- package/build-module/components/multi-selection-inspector/index.js.map +1 -1
- package/build-module/components/navigable-toolbar/index.js +9 -7
- package/build-module/components/navigable-toolbar/index.js.map +1 -1
- package/build-module/components/observe-typing/index.js +5 -4
- package/build-module/components/observe-typing/index.js.map +1 -1
- package/build-module/components/panel-color-settings/index.js +2 -2
- package/build-module/components/panel-color-settings/index.js.map +1 -1
- package/build-module/components/plain-text/index.js +3 -3
- package/build-module/components/plain-text/index.js.map +1 -1
- package/build-module/components/plain-text/index.native.js +3 -3
- package/build-module/components/plain-text/index.native.js.map +1 -1
- package/build-module/components/provider/block-refs-provider.js +5 -4
- package/build-module/components/provider/block-refs-provider.js.map +1 -1
- package/build-module/components/provider/index.js +12 -8
- package/build-module/components/provider/index.js.map +1 -1
- package/build-module/components/provider/index.native.js +4 -3
- package/build-module/components/provider/index.native.js.map +1 -1
- package/build-module/components/provider/with-registry-provider.js +32 -28
- package/build-module/components/provider/with-registry-provider.js.map +1 -1
- package/build-module/components/publish-date-time-picker/index.js +37 -17
- package/build-module/components/publish-date-time-picker/index.js.map +1 -1
- package/build-module/components/recursion-provider/index.js +6 -5
- package/build-module/components/recursion-provider/index.js.map +1 -1
- package/build-module/components/resizable-box-popover/index.js +7 -6
- package/build-module/components/resizable-box-popover/index.js.map +1 -1
- package/build-module/components/resolution-tool/index.js +12 -11
- package/build-module/components/resolution-tool/index.js.map +1 -1
- package/build-module/components/responsive-block-control/index.js +31 -26
- package/build-module/components/responsive-block-control/index.js.map +1 -1
- package/build-module/components/responsive-block-control/label.js +13 -7
- package/build-module/components/responsive-block-control/label.js.map +1 -1
- package/build-module/components/rich-text/content.js +8 -5
- package/build-module/components/rich-text/content.js.map +1 -1
- package/build-module/components/rich-text/embed-handler-picker.native.js +2 -2
- package/build-module/components/rich-text/embed-handler-picker.native.js.map +1 -1
- package/build-module/components/rich-text/format-edit.js +5 -5
- package/build-module/components/rich-text/format-edit.js.map +1 -1
- package/build-module/components/rich-text/format-toolbar/index.js +39 -33
- package/build-module/components/rich-text/format-toolbar/index.js.map +1 -1
- package/build-module/components/rich-text/format-toolbar/index.native.js +10 -7
- package/build-module/components/rich-text/format-toolbar/index.native.js.map +1 -1
- package/build-module/components/rich-text/format-toolbar-container.js +17 -12
- package/build-module/components/rich-text/format-toolbar-container.js.map +1 -1
- package/build-module/components/rich-text/format-toolbar-container.native.js +5 -4
- 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 +3 -2
- package/build-module/components/rich-text/get-rich-text-values.js.map +1 -1
- package/build-module/components/rich-text/index.js +90 -77
- package/build-module/components/rich-text/index.js.map +1 -1
- package/build-module/components/rich-text/index.native.js +53 -47
- package/build-module/components/rich-text/index.native.js.map +1 -1
- package/build-module/components/rich-text/multiline.js +62 -62
- package/build-module/components/rich-text/multiline.js.map +1 -1
- package/build-module/components/rich-text/native/format-edit.js +3 -4
- package/build-module/components/rich-text/native/format-edit.js.map +1 -1
- package/build-module/components/rich-text/native/index.native.js +89 -80
- 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 +20 -14
- package/build-module/components/rich-text/native/toolbar-button-with-options.native.js.map +1 -1
- package/build-module/components/rich-text/toolbar-button.js +8 -7
- package/build-module/components/rich-text/toolbar-button.js.map +1 -1
- package/build-module/components/rich-text/utils.js +5 -4
- package/build-module/components/rich-text/utils.js.map +1 -1
- package/build-module/components/rich-text/with-deprecations.js +2 -2
- package/build-module/components/rich-text/with-deprecations.js.map +1 -1
- package/build-module/components/segmented-text-control/index.js +20 -17
- package/build-module/components/segmented-text-control/index.js.map +1 -1
- package/build-module/components/skip-to-selected-block/index.js +5 -4
- 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 +26 -14
- package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
- package/build-module/components/spacing-sizes-control/index.js +24 -19
- package/build-module/components/spacing-sizes-control/index.js.map +1 -1
- package/build-module/components/spacing-sizes-control/input-controls/axial.js +20 -18
- 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 +19 -17
- package/build-module/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
- package/build-module/components/spacing-sizes-control/input-controls/single.js +2 -2
- 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 +106 -101
- 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 +44 -34
- package/build-module/components/spacing-sizes-control/sides-dropdown/index.js.map +1 -1
- package/build-module/components/spacing-sizes-control/utils.js +1 -0
- package/build-module/components/spacing-sizes-control/utils.js.map +1 -1
- package/build-module/components/text-alignment-control/index.js +2 -2
- package/build-module/components/text-alignment-control/index.js.map +1 -1
- package/build-module/components/text-decoration-control/index.js +2 -2
- package/build-module/components/text-decoration-control/index.js.map +1 -1
- package/build-module/components/text-transform-control/index.js +2 -2
- package/build-module/components/text-transform-control/index.js.map +1 -1
- package/build-module/components/tool-selector/index.js +37 -26
- package/build-module/components/tool-selector/index.js.map +1 -1
- package/build-module/components/typewriter/index.js +5 -4
- package/build-module/components/typewriter/index.js.map +1 -1
- package/build-module/components/ungroup-button/index.native.js +8 -6
- package/build-module/components/ungroup-button/index.native.js.map +1 -1
- package/build-module/components/unit-control/index.js +2 -2
- package/build-module/components/unit-control/index.js.map +1 -1
- package/build-module/components/unsupported-block-details/index.native.js +32 -28
- package/build-module/components/unsupported-block-details/index.native.js.map +1 -1
- package/build-module/components/url-input/button.js +32 -28
- package/build-module/components/url-input/button.js.map +1 -1
- package/build-module/components/url-input/index.js +28 -20
- package/build-module/components/url-input/index.js.map +1 -1
- package/build-module/components/url-input/index.native.js +2 -2
- package/build-module/components/url-input/index.native.js.map +1 -1
- package/build-module/components/url-popover/image-url-input-ui.js +106 -91
- package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
- package/build-module/components/url-popover/index.js +25 -19
- package/build-module/components/url-popover/index.js.map +1 -1
- package/build-module/components/url-popover/link-editor.js +16 -14
- package/build-module/components/url-popover/link-editor.js.map +1 -1
- package/build-module/components/url-popover/link-viewer-url.js +6 -5
- package/build-module/components/url-popover/link-viewer-url.js.map +1 -1
- package/build-module/components/url-popover/link-viewer.js +15 -13
- package/build-module/components/url-popover/link-viewer.js.map +1 -1
- package/build-module/components/use-block-commands/index.js +2 -2
- package/build-module/components/use-block-commands/index.js.map +1 -1
- package/build-module/components/video-player/gridicon-play.native.js +8 -7
- package/build-module/components/video-player/gridicon-play.native.js.map +1 -1
- package/build-module/components/video-player/index.native.js +44 -40
- package/build-module/components/video-player/index.native.js.map +1 -1
- package/build-module/components/warning/index.js +35 -26
- package/build-module/components/warning/index.js.map +1 -1
- package/build-module/components/warning/index.native.js +18 -13
- package/build-module/components/warning/index.native.js.map +1 -1
- package/build-module/components/writing-flow/index.js +11 -6
- package/build-module/components/writing-flow/index.js.map +1 -1
- package/build-module/components/writing-flow/use-clipboard-handler.js +42 -20
- package/build-module/components/writing-flow/use-clipboard-handler.js.map +1 -1
- package/build-module/components/writing-flow/use-tab-nav.js +3 -3
- package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
- package/build-module/components/writing-mode-control/index.js +2 -2
- package/build-module/components/writing-mode-control/index.js.map +1 -1
- package/build-module/hooks/align.js +9 -8
- package/build-module/hooks/align.js.map +1 -1
- package/build-module/hooks/anchor.js +30 -22
- package/build-module/hooks/anchor.js.map +1 -1
- package/build-module/hooks/background.js +6 -5
- package/build-module/hooks/background.js.map +1 -1
- package/build-module/hooks/block-bindings.js +81 -0
- package/build-module/hooks/block-bindings.js.map +1 -0
- package/build-module/hooks/block-hooks.js +42 -33
- package/build-module/hooks/block-hooks.js.map +1 -1
- package/build-module/hooks/block-style-variation.js +136 -0
- package/build-module/hooks/block-style-variation.js.map +1 -0
- package/build-module/hooks/border.js +6 -5
- package/build-module/hooks/border.js.map +1 -1
- package/build-module/hooks/color.js +11 -9
- package/build-module/hooks/color.js.map +1 -1
- package/build-module/hooks/content-lock-ui.js +25 -15
- package/build-module/hooks/content-lock-ui.js.map +1 -1
- package/build-module/hooks/contrast-checker.js +2 -2
- package/build-module/hooks/contrast-checker.js.map +1 -1
- package/build-module/hooks/custom-class-name.js +17 -16
- package/build-module/hooks/custom-class-name.js.map +1 -1
- package/build-module/hooks/dimensions.js +26 -21
- package/build-module/hooks/dimensions.js.map +1 -1
- package/build-module/hooks/duotone.js +51 -45
- package/build-module/hooks/duotone.js.map +1 -1
- package/build-module/hooks/font-family.js +3 -3
- package/build-module/hooks/font-family.js.map +1 -1
- package/build-module/hooks/font-size.js +2 -2
- package/build-module/hooks/font-size.js.map +1 -1
- package/build-module/hooks/index.js +4 -2
- package/build-module/hooks/index.js.map +1 -1
- package/build-module/hooks/layout-child.js +28 -24
- package/build-module/hooks/layout-child.js.map +1 -1
- package/build-module/hooks/layout.js +63 -55
- package/build-module/hooks/layout.js.map +1 -1
- package/build-module/hooks/line-height.js +2 -2
- package/build-module/hooks/line-height.js.map +1 -1
- package/build-module/hooks/position.js +28 -26
- package/build-module/hooks/position.js.map +1 -1
- package/build-module/hooks/spacing-visualizer.js +10 -9
- package/build-module/hooks/spacing-visualizer.js.map +1 -1
- package/build-module/hooks/style.js +25 -13
- package/build-module/hooks/style.js.map +1 -1
- package/build-module/hooks/text-align.js +20 -19
- package/build-module/hooks/text-align.js.map +1 -1
- package/build-module/hooks/typography.js +6 -5
- package/build-module/hooks/typography.js.map +1 -1
- package/build-module/hooks/typography.native.js +12 -8
- package/build-module/hooks/typography.native.js.map +1 -1
- package/build-module/hooks/use-bindings-attributes.js +48 -14
- package/build-module/hooks/use-bindings-attributes.js.map +1 -1
- package/build-module/hooks/use-typography-props.js +3 -3
- package/build-module/hooks/use-typography-props.js.map +1 -1
- package/build-module/hooks/use-zoom-out.js +2 -2
- package/build-module/hooks/use-zoom-out.js.map +1 -1
- package/build-module/hooks/utils.js +18 -17
- package/build-module/hooks/utils.js.map +1 -1
- package/build-module/layouts/constrained.js +68 -58
- package/build-module/layouts/constrained.js.map +1 -1
- package/build-module/layouts/flex.js +77 -61
- package/build-module/layouts/flex.js.map +1 -1
- package/build-module/layouts/grid.js +148 -125
- package/build-module/layouts/grid.js.map +1 -1
- package/build-module/private-apis.js +7 -1
- package/build-module/private-apis.js.map +1 -1
- package/build-module/store/actions.js +40 -8
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/get-block-settings.js +2 -46
- package/build-module/store/get-block-settings.js.map +1 -1
- package/build-module/store/reducer.js +21 -14
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +35 -7
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/store/utils.js +1 -0
- package/build-module/store/utils.js.map +1 -1
- package/build-module/utils/transform-styles/index.js +1 -1
- package/build-module/utils/transform-styles/index.js.map +1 -1
- package/build-style/content-rtl.css +5 -1
- package/build-style/content.css +5 -1
- package/build-style/style-rtl.css +96 -73
- package/build-style/style.css +96 -73
- package/package.json +33 -32
- package/src/components/alignment-control/test/index.js +1 -1
- package/src/components/audio-player/audio-url-parser.native.js +20 -0
- package/src/components/audio-player/index.native.js +221 -0
- package/src/components/audio-player/styles.native.scss +114 -0
- package/src/components/audio-player/test/audio-url-parser.native.js +53 -0
- package/src/components/block-bindings-toolbar-indicator/index.js +127 -10
- package/src/components/block-bindings-toolbar-indicator/style.scss +7 -8
- package/src/components/block-canvas/style.scss +2 -6
- package/src/components/block-card/index.js +9 -5
- package/src/components/block-card/style.scss +0 -11
- package/src/components/block-edit/index.js +13 -2
- package/src/components/block-edit/multiple-usage-warning.js +46 -0
- package/src/components/block-inspector/index.js +2 -4
- package/src/components/block-inspector/useBlockInspectorAnimationSettings.js +2 -5
- package/src/components/block-list/block-invalid-warning.native.js +1 -1
- package/src/components/block-list/block.js +64 -18
- package/src/components/block-list/block.native.js +17 -9
- package/src/components/block-patterns-list/index.js +4 -1
- package/src/components/block-patterns-list/style.scss +23 -20
- package/src/components/block-preview/style.scss +0 -26
- package/src/components/block-settings/container.native.js +2 -0
- package/src/components/block-toolbar/index.js +1 -1
- package/src/components/block-tools/index.js +6 -5
- package/src/components/block-tools/style.scss +2 -2
- package/src/components/block-tools/zoom-out-mode-inserters.js +4 -3
- package/src/components/block-variation-picker/content.scss +1 -1
- package/src/components/border-radius-control/all-input-control.js +1 -1
- package/src/components/border-radius-control/input-controls.js +1 -1
- package/src/components/button-block-appender/index.js +2 -0
- package/src/components/child-layout-control/index.js +12 -12
- package/src/components/colors/utils.js +2 -2
- package/src/components/colors/with-colors.js +2 -1
- package/src/components/colors-gradients/control.js +3 -11
- package/src/components/contrast-checker/test/index.js +8 -8
- package/src/components/dimensions-tool/aspect-ratio-tool.js +1 -1
- package/src/components/dimensions-tool/scale-tool.js +1 -1
- package/src/components/dimensions-tool/width-height-tool.js +2 -2
- package/src/components/font-sizes/utils.js +2 -1
- package/src/components/global-styles/background-panel.js +128 -49
- package/src/components/global-styles/border-panel.js +8 -5
- package/src/components/global-styles/color-panel.js +27 -22
- package/src/components/global-styles/color-panel.native.js +1 -1
- package/src/components/global-styles/dimensions-panel.js +7 -8
- package/src/components/global-styles/hooks.js +14 -1
- package/src/components/global-styles/index.js +3 -0
- package/src/components/global-styles/shadow-panel-components.js +11 -5
- package/src/components/global-styles/test/theme-file-uri-utils.js +66 -0
- package/src/components/global-styles/test/use-global-styles-context.native.js +434 -0
- package/src/components/global-styles/test/use-global-styles-output.js +11 -10
- package/src/components/global-styles/theme-file-uri-utils.js +77 -0
- package/src/components/global-styles/typography-panel.js +50 -5
- package/src/components/global-styles/use-global-styles-context.native.js +586 -0
- package/src/components/global-styles/use-global-styles-output.js +199 -101
- package/src/components/grid-visualizer/grid-visualizer.js +8 -1
- package/src/components/grid-visualizer/style.scss +2 -1
- package/src/components/height-control/index.js +1 -1
- package/src/components/iframe/content.scss +4 -0
- package/src/components/index.native.js +7 -0
- package/src/components/inner-blocks/use-nested-settings-update.js +9 -16
- package/src/components/inner-blocks/warning-max-depth-exceeded.native.js +1 -1
- package/src/components/inserter/block-patterns-explorer/pattern-list.js +1 -1
- package/src/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +16 -2
- package/src/components/inserter/block-patterns-tab/pattern-category-previews.js +6 -1
- package/src/components/inserter/block-patterns-tab/patterns-filter.js +3 -2
- package/src/components/inserter/block-types-tab.js +119 -78
- package/src/components/inserter/category-tabs/index.js +1 -1
- package/src/components/inserter/hooks/use-block-types-state.js +27 -6
- package/src/components/inserter/hooks/use-insertion-point.js +53 -7
- package/src/components/inserter/library.js +17 -7
- package/src/components/inserter/menu.js +24 -11
- package/src/components/inserter/quick-inserter.js +3 -1
- package/src/components/inserter/search-results.js +2 -1
- package/src/components/inserter/style.scss +45 -18
- package/src/components/inserter/tabs.js +2 -2
- package/src/components/inspector-controls/fill.native.js +3 -5
- package/src/components/inspector-controls-tabs/index.js +15 -3
- package/src/components/inspector-controls-tabs/style.scss +2 -10
- package/src/components/link-control/index.js +10 -1
- package/src/components/link-control/link-preview.js +1 -0
- package/src/components/link-control/search-input.js +1 -1
- package/src/components/link-control/style.scss +9 -3
- package/src/components/list-view/block-contents.js +1 -1
- package/src/components/media-placeholder/index.js +1 -1
- package/src/components/media-placeholder/index.native.js +2 -2
- package/src/components/media-upload-progress/index.native.js +22 -2
- package/src/components/provider/with-registry-provider.js +33 -38
- package/src/components/publish-date-time-picker/index.js +43 -15
- package/src/components/resolution-tool/index.js +1 -1
- package/src/components/rich-text/index.js +11 -5
- package/src/components/rich-text/native/index.native.js +3 -2
- package/src/components/rich-text/native/test/index.native.js +13 -13
- package/src/components/spacing-sizes-control/hooks/use-spacing-sizes.js +58 -16
- package/src/components/spacing-sizes-control/input-controls/spacing-input-control.js +4 -3
- package/src/components/spacing-sizes-control/utils.js +2 -0
- package/src/components/video-player/index.native.js +1 -1
- package/src/components/writing-flow/use-clipboard-handler.js +48 -23
- package/src/hooks/block-bindings.js +92 -0
- package/src/hooks/block-bindings.scss +3 -0
- package/src/hooks/block-style-variation.js +156 -0
- package/src/hooks/font-family.js +1 -1
- package/src/hooks/index.js +4 -0
- package/src/hooks/layout.js +1 -2
- package/src/hooks/position.js +1 -1
- package/src/hooks/style.js +9 -1
- package/src/hooks/text-align.js +17 -11
- package/src/hooks/use-bindings-attributes.js +48 -5
- package/src/hooks/use-typography-props.js +2 -1
- package/src/hooks/use-zoom-out.js +9 -2
- package/src/hooks/utils.js +21 -4
- package/src/layouts/flex.js +2 -2
- package/src/layouts/grid.js +5 -5
- package/src/private-apis.js +6 -0
- package/src/store/actions.js +46 -13
- package/src/store/get-block-settings.js +1 -46
- package/src/store/reducer.js +24 -11
- package/src/store/selectors.js +68 -11
- package/src/store/utils.js +2 -0
- package/src/style.scss +1 -0
- package/src/utils/test/__snapshots__/transform-styles.js.snap +1 -1
- package/src/utils/test/transform-styles.js +2 -2
- package/src/utils/transform-styles/index.js +3 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_i18n","require","_element","_compose","_blockTypesList","_interopRequireDefault","_panel","_useBlockTypesState","_inserterListbox","_sorting","_noResults","getBlockNamespace","item","name","split","MAX_SUGGESTED_ITEMS","EMPTY_ARRAY","BlockTypesTab","rootClientId","onInsert","onHover","showMostUsedBlocks","ref","items","categories","collections","onSelectItem","useBlockTypesState","suggestedItems","useMemo","orderBy","slice","uncategorizedItems","filter","category","itemsPerCategory","pipe","itemList","reduce","acc","push","itemsPerCollection","result","Object","keys","forEach","namespace","length","useEffect","currentlyRenderedCategories","useAsyncList","didRenderAllCategories","collectionEntries","entries","currentlyRenderedCollections","_react","createElement","default","title","_x","onSelect","label","map","categoryItems","slug","key","icon","className","__","collection","collectionItems","_default","exports","forwardRef"],"sources":["@wordpress/block-editor/src/components/inserter/block-types-tab.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport { useMemo, useEffect, forwardRef } from '@wordpress/element';\nimport { pipe, useAsyncList } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BlockTypesList from '../block-types-list';\nimport InserterPanel from './panel';\nimport useBlockTypesState from './hooks/use-block-types-state';\nimport InserterListbox from '../inserter-listbox';\nimport { orderBy } from '../../utils/sorting';\nimport InserterNoResults from './no-results';\n\nconst getBlockNamespace = ( item ) => item.name.split( '/' )[ 0 ];\n\nconst MAX_SUGGESTED_ITEMS = 6;\n\n/**\n * Shared reference to an empty array for cases where it is important to avoid\n * returning a new array reference on every invocation and rerendering the component.\n *\n * @type {Array}\n */\nconst EMPTY_ARRAY = [];\n\nexport function BlockTypesTab(\n\t{ rootClientId, onInsert, onHover, showMostUsedBlocks },\n\tref\n) {\n\tconst [ items, categories, collections, onSelectItem ] = useBlockTypesState(\n\t\trootClientId,\n\t\tonInsert\n\t);\n\n\tconst suggestedItems = useMemo( () => {\n\t\treturn orderBy( items, 'frecency', 'desc' ).slice(\n\t\t\t0,\n\t\t\tMAX_SUGGESTED_ITEMS\n\t\t);\n\t}, [ items ] );\n\n\tconst uncategorizedItems = useMemo( () => {\n\t\treturn items.filter( ( item ) => ! item.category );\n\t}, [ items ] );\n\n\tconst itemsPerCategory = useMemo( () => {\n\t\treturn pipe(\n\t\t\t( itemList ) =>\n\t\t\t\titemList.filter(\n\t\t\t\t\t( item ) => item.category && item.category !== 'reusable'\n\t\t\t\t),\n\t\t\t( itemList ) =>\n\t\t\t\titemList.reduce( ( acc, item ) => {\n\t\t\t\t\tconst { category } = item;\n\t\t\t\t\tif ( ! acc[ category ] ) {\n\t\t\t\t\t\tacc[ category ] = [];\n\t\t\t\t\t}\n\t\t\t\t\tacc[ category ].push( item );\n\t\t\t\t\treturn acc;\n\t\t\t\t}, {} )\n\t\t)( items );\n\t}, [ items ] );\n\n\tconst itemsPerCollection = useMemo( () => {\n\t\t// Create a new Object to avoid mutating collection.\n\t\tconst result = { ...collections };\n\t\tObject.keys( collections ).forEach( ( namespace ) => {\n\t\t\tresult[ namespace ] = items.filter(\n\t\t\t\t( item ) => getBlockNamespace( item ) === namespace\n\t\t\t);\n\t\t\tif ( result[ namespace ].length === 0 ) {\n\t\t\t\tdelete result[ namespace ];\n\t\t\t}\n\t\t} );\n\n\t\treturn result;\n\t}, [ items, collections ] );\n\n\t// Hide block preview on unmount.\n\tuseEffect( () => () => onHover( null ), [] );\n\n\t/**\n\t * The inserter contains a big number of blocks and opening it is a costful operation.\n\t * The rendering is the most costful part of it, in order to improve the responsiveness\n\t * of the \"opening\" action, these lazy lists allow us to render the inserter category per category,\n\t * once all the categories are rendered, we start rendering the collections and the uncategorized block types.\n\t */\n\tconst currentlyRenderedCategories = useAsyncList( categories );\n\tconst didRenderAllCategories =\n\t\tcategories.length === currentlyRenderedCategories.length;\n\n\t// Async List requires an array.\n\tconst collectionEntries = useMemo( () => {\n\t\treturn Object.entries( collections );\n\t}, [ collections ] );\n\tconst currentlyRenderedCollections = useAsyncList(\n\t\tdidRenderAllCategories ? collectionEntries : EMPTY_ARRAY\n\t);\n\n\tif ( ! items.length ) {\n\t\treturn <InserterNoResults />;\n\t}\n\n\treturn (\n\t\t<InserterListbox>\n\t\t\t<div ref={ ref }>\n\t\t\t\t{ showMostUsedBlocks && !! suggestedItems.length && (\n\t\t\t\t\t<InserterPanel title={ _x( 'Most used', 'blocks' ) }>\n\t\t\t\t\t\t<BlockTypesList\n\t\t\t\t\t\t\titems={ suggestedItems }\n\t\t\t\t\t\t\tonSelect={ onSelectItem }\n\t\t\t\t\t\t\tonHover={ onHover }\n\t\t\t\t\t\t\tlabel={ _x( 'Most used', 'blocks' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</InserterPanel>\n\t\t\t\t) }\n\n\t\t\t\t{ currentlyRenderedCategories.map( ( category ) => {\n\t\t\t\t\tconst categoryItems = itemsPerCategory[ category.slug ];\n\t\t\t\t\tif ( ! categoryItems || ! categoryItems.length ) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<InserterPanel\n\t\t\t\t\t\t\tkey={ category.slug }\n\t\t\t\t\t\t\ttitle={ category.title }\n\t\t\t\t\t\t\ticon={ category.icon }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<BlockTypesList\n\t\t\t\t\t\t\t\titems={ categoryItems }\n\t\t\t\t\t\t\t\tonSelect={ onSelectItem }\n\t\t\t\t\t\t\t\tonHover={ onHover }\n\t\t\t\t\t\t\t\tlabel={ category.title }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</InserterPanel>\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\n\t\t\t\t{ didRenderAllCategories && uncategorizedItems.length > 0 && (\n\t\t\t\t\t<InserterPanel\n\t\t\t\t\t\tclassName=\"block-editor-inserter__uncategorized-blocks-panel\"\n\t\t\t\t\t\ttitle={ __( 'Uncategorized' ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<BlockTypesList\n\t\t\t\t\t\t\titems={ uncategorizedItems }\n\t\t\t\t\t\t\tonSelect={ onSelectItem }\n\t\t\t\t\t\t\tonHover={ onHover }\n\t\t\t\t\t\t\tlabel={ __( 'Uncategorized' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</InserterPanel>\n\t\t\t\t) }\n\n\t\t\t\t{ currentlyRenderedCollections.map(\n\t\t\t\t\t( [ namespace, collection ] ) => {\n\t\t\t\t\t\tconst collectionItems = itemsPerCollection[ namespace ];\n\t\t\t\t\t\tif ( ! collectionItems || ! collectionItems.length ) {\n\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<InserterPanel\n\t\t\t\t\t\t\t\tkey={ namespace }\n\t\t\t\t\t\t\t\ttitle={ collection.title }\n\t\t\t\t\t\t\t\ticon={ collection.icon }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<BlockTypesList\n\t\t\t\t\t\t\t\t\titems={ collectionItems }\n\t\t\t\t\t\t\t\t\tonSelect={ onSelectItem }\n\t\t\t\t\t\t\t\t\tonHover={ onHover }\n\t\t\t\t\t\t\t\t\tlabel={ collection.title }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</InserterPanel>\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</InserterListbox>\n\t);\n}\n\nexport default forwardRef( BlockTypesTab );\n"],"mappings":";;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAKA,IAAAG,eAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAD,sBAAA,CAAAJ,OAAA;AACA,IAAAM,mBAAA,GAAAF,sBAAA,CAAAJ,OAAA;AACA,IAAAO,gBAAA,GAAAH,sBAAA,CAAAJ,OAAA;AACA,IAAAQ,QAAA,GAAAR,OAAA;AACA,IAAAS,UAAA,GAAAL,sBAAA,CAAAJ,OAAA;AAfA;AACA;AACA;;AAKA;AACA;AACA;;AAQA,MAAMU,iBAAiB,GAAKC,IAAI,IAAMA,IAAI,CAACC,IAAI,CAACC,KAAK,CAAE,GAAI,CAAC,CAAE,CAAC,CAAE;AAEjE,MAAMC,mBAAmB,GAAG,CAAC;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,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CAAAmD,OAAa;IACbU,SAAS,EAAC,mDAAmD;IAC7DT,KAAK,EAAG,IAAAU,QAAE,EAAE,eAAgB;EAAG,GAE/B,IAAAb,MAAA,CAAAC,aAAA,EAACpD,eAAA,CAAAqD,OAAc;IACdlC,KAAK,EAAGS,kBAAoB;IAC5B4B,QAAQ,EAAGlC,YAAc;IACzBN,OAAO,EAAGA,OAAS;IACnByC,KAAK,EAAG,IAAAO,QAAE,EAAE,eAAgB;EAAG,CAC/B,CACa,CACf,EAECd,4BAA4B,CAACQ,GAAG,CACjC,CAAE,CAAEhB,SAAS,EAAEuB,UAAU,CAAE,KAAM;IAChC,MAAMC,eAAe,GAAG7B,kBAAkB,CAAEK,SAAS,CAAE;IACvD,IAAK,CAAEwB,eAAe,IAAI,CAAEA,eAAe,CAACvB,MAAM,EAAG;MACpD,OAAO,IAAI;IACZ;IAEA,OACC,IAAAQ,MAAA,CAAAC,aAAA,EAAClD,MAAA,CAAAmD,OAAa;MACbQ,GAAG,EAAGnB,SAAW;MACjBY,KAAK,EAAGW,UAAU,CAACX,KAAO;MAC1BQ,IAAI,EAAGG,UAAU,CAACH;IAAM,GAExB,IAAAX,MAAA,CAAAC,aAAA,EAACpD,eAAA,CAAAqD,OAAc;MACdlC,KAAK,EAAG+C,eAAiB;MACzBV,QAAQ,EAAGlC,YAAc;MACzBN,OAAO,EAAGA,OAAS;MACnByC,KAAK,EAAGQ,UAAU,CAACX;IAAO,CAC1B,CACa,CAAC;EAElB,CACD,CACI,CACW,CAAC;AAEpB;AAAC,IAAAa,QAAA,GAAAC,OAAA,CAAAf,OAAA,GAEc,IAAAgB,mBAAU,EAAExD,aAAc,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_i18n","require","_element","_compose","_blockTypesList","_interopRequireDefault","_panel","_useBlockTypesState","_inserterListbox","_sorting","_noResults","_jsxRuntime","getBlockNamespace","item","name","split","MAX_SUGGESTED_ITEMS","EMPTY_ARRAY","BlockTypesTabPanel","items","collections","categories","onSelectItem","onHover","showMostUsedBlocks","className","suggestedItems","useMemo","orderBy","slice","uncategorizedItems","filter","category","itemsPerCollection","result","Object","keys","forEach","namespace","length","useEffect","currentlyRenderedCategories","useAsyncList","didRenderAllCategories","collectionEntries","entries","currentlyRenderedCollections","jsxs","children","jsx","default","title","_x","onSelect","label","map","categoryItems","slug","icon","__","collection","collectionItems","BlockTypesTab","rootClientId","onInsert","ref","useBlockTypesState","itemsForCurrentRoot","itemsRemaining","push","Fragment","_default","exports","forwardRef"],"sources":["@wordpress/block-editor/src/components/inserter/block-types-tab.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport { useMemo, useEffect, forwardRef } from '@wordpress/element';\nimport { useAsyncList } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BlockTypesList from '../block-types-list';\nimport InserterPanel from './panel';\nimport useBlockTypesState from './hooks/use-block-types-state';\nimport InserterListbox from '../inserter-listbox';\nimport { orderBy } from '../../utils/sorting';\nimport InserterNoResults from './no-results';\n\nconst getBlockNamespace = ( item ) => item.name.split( '/' )[ 0 ];\n\nconst MAX_SUGGESTED_ITEMS = 6;\n\n/**\n * Shared reference to an empty array for cases where it is important to avoid\n * returning a new array reference on every invocation and rerendering the component.\n *\n * @type {Array}\n */\nconst EMPTY_ARRAY = [];\n\nexport function BlockTypesTabPanel( {\n\titems,\n\tcollections,\n\tcategories,\n\tonSelectItem,\n\tonHover,\n\tshowMostUsedBlocks,\n\tclassName,\n} ) {\n\tconst suggestedItems = useMemo( () => {\n\t\treturn orderBy( items, 'frecency', 'desc' ).slice(\n\t\t\t0,\n\t\t\tMAX_SUGGESTED_ITEMS\n\t\t);\n\t}, [ items ] );\n\n\tconst uncategorizedItems = useMemo( () => {\n\t\treturn items.filter( ( item ) => ! item.category );\n\t}, [ items ] );\n\n\tconst itemsPerCollection = useMemo( () => {\n\t\t// Create a new Object to avoid mutating collection.\n\t\tconst result = { ...collections };\n\t\tObject.keys( collections ).forEach( ( namespace ) => {\n\t\t\tresult[ namespace ] = items.filter(\n\t\t\t\t( item ) => getBlockNamespace( item ) === namespace\n\t\t\t);\n\t\t\tif ( result[ namespace ].length === 0 ) {\n\t\t\t\tdelete result[ namespace ];\n\t\t\t}\n\t\t} );\n\n\t\treturn result;\n\t}, [ items, collections ] );\n\n\t// Hide block preview on unmount.\n\tuseEffect( () => () => onHover( null ), [] );\n\n\t/**\n\t * The inserter contains a big number of blocks and opening it is a costful operation.\n\t * The rendering is the most costful part of it, in order to improve the responsiveness\n\t * of the \"opening\" action, these lazy lists allow us to render the inserter category per category,\n\t * once all the categories are rendered, we start rendering the collections and the uncategorized block types.\n\t */\n\tconst currentlyRenderedCategories = useAsyncList( categories );\n\tconst didRenderAllCategories =\n\t\tcategories.length === currentlyRenderedCategories.length;\n\n\t// Async List requires an array.\n\tconst collectionEntries = useMemo( () => {\n\t\treturn Object.entries( collections );\n\t}, [ collections ] );\n\tconst currentlyRenderedCollections = useAsyncList(\n\t\tdidRenderAllCategories ? collectionEntries : EMPTY_ARRAY\n\t);\n\n\treturn (\n\t\t<div className={ className }>\n\t\t\t{ showMostUsedBlocks &&\n\t\t\t\t// Only show the most used blocks if the total amount of block\n\t\t\t\t// is larger than 1 row, otherwise it is not so useful.\n\t\t\t\titems.length > 3 &&\n\t\t\t\t!! suggestedItems.length && (\n\t\t\t\t\t<InserterPanel title={ _x( 'Most used', 'blocks' ) }>\n\t\t\t\t\t\t<BlockTypesList\n\t\t\t\t\t\t\titems={ suggestedItems }\n\t\t\t\t\t\t\tonSelect={ onSelectItem }\n\t\t\t\t\t\t\tonHover={ onHover }\n\t\t\t\t\t\t\tlabel={ _x( 'Most used', 'blocks' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</InserterPanel>\n\t\t\t\t) }\n\n\t\t\t{ currentlyRenderedCategories.map( ( category ) => {\n\t\t\t\tconst categoryItems = items.filter(\n\t\t\t\t\t( item ) => item.category === category.slug\n\t\t\t\t);\n\t\t\t\tif ( ! categoryItems || ! categoryItems.length ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\treturn (\n\t\t\t\t\t<InserterPanel\n\t\t\t\t\t\tkey={ category.slug }\n\t\t\t\t\t\ttitle={ category.title }\n\t\t\t\t\t\ticon={ category.icon }\n\t\t\t\t\t>\n\t\t\t\t\t\t<BlockTypesList\n\t\t\t\t\t\t\titems={ categoryItems }\n\t\t\t\t\t\t\tonSelect={ onSelectItem }\n\t\t\t\t\t\t\tonHover={ onHover }\n\t\t\t\t\t\t\tlabel={ category.title }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</InserterPanel>\n\t\t\t\t);\n\t\t\t} ) }\n\n\t\t\t{ didRenderAllCategories && uncategorizedItems.length > 0 && (\n\t\t\t\t<InserterPanel\n\t\t\t\t\tclassName=\"block-editor-inserter__uncategorized-blocks-panel\"\n\t\t\t\t\ttitle={ __( 'Uncategorized' ) }\n\t\t\t\t>\n\t\t\t\t\t<BlockTypesList\n\t\t\t\t\t\titems={ uncategorizedItems }\n\t\t\t\t\t\tonSelect={ onSelectItem }\n\t\t\t\t\t\tonHover={ onHover }\n\t\t\t\t\t\tlabel={ __( 'Uncategorized' ) }\n\t\t\t\t\t/>\n\t\t\t\t</InserterPanel>\n\t\t\t) }\n\n\t\t\t{ currentlyRenderedCollections.map(\n\t\t\t\t( [ namespace, collection ] ) => {\n\t\t\t\t\tconst collectionItems = itemsPerCollection[ namespace ];\n\t\t\t\t\tif ( ! collectionItems || ! collectionItems.length ) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<InserterPanel\n\t\t\t\t\t\t\tkey={ namespace }\n\t\t\t\t\t\t\ttitle={ collection.title }\n\t\t\t\t\t\t\ticon={ collection.icon }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<BlockTypesList\n\t\t\t\t\t\t\t\titems={ collectionItems }\n\t\t\t\t\t\t\t\tonSelect={ onSelectItem }\n\t\t\t\t\t\t\t\tonHover={ onHover }\n\t\t\t\t\t\t\t\tlabel={ collection.title }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</InserterPanel>\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t) }\n\t\t</div>\n\t);\n}\n\nexport function BlockTypesTab(\n\t{ rootClientId, onInsert, onHover, showMostUsedBlocks },\n\tref\n) {\n\tconst [ items, categories, collections, onSelectItem ] = useBlockTypesState(\n\t\trootClientId,\n\t\tonInsert\n\t);\n\n\tif ( ! items.length ) {\n\t\treturn <InserterNoResults />;\n\t}\n\n\tconst itemsForCurrentRoot = [];\n\tconst itemsRemaining = [];\n\n\tfor ( const item of items ) {\n\t\t// Skip reusable blocks, they moved to the patterns tab.\n\t\tif ( item.category === 'reusable' ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif ( rootClientId && item.rootClientId === rootClientId ) {\n\t\t\titemsForCurrentRoot.push( item );\n\t\t} else {\n\t\t\titemsRemaining.push( item );\n\t\t}\n\t}\n\n\treturn (\n\t\t<InserterListbox>\n\t\t\t<div ref={ ref }>\n\t\t\t\t{ !! itemsForCurrentRoot.length && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<BlockTypesTabPanel\n\t\t\t\t\t\t\titems={ itemsForCurrentRoot }\n\t\t\t\t\t\t\tcategories={ categories }\n\t\t\t\t\t\t\tcollections={ collections }\n\t\t\t\t\t\t\tonSelectItem={ onSelectItem }\n\t\t\t\t\t\t\tonHover={ onHover }\n\t\t\t\t\t\t\tshowMostUsedBlocks={ showMostUsedBlocks }\n\t\t\t\t\t\t\tclassName=\"block-editor-inserter__insertable-blocks-at-selection\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t\t<BlockTypesTabPanel\n\t\t\t\t\titems={ itemsRemaining }\n\t\t\t\t\tcategories={ categories }\n\t\t\t\t\tcollections={ collections }\n\t\t\t\t\tonSelectItem={ onSelectItem }\n\t\t\t\t\tonHover={ onHover }\n\t\t\t\t\tshowMostUsedBlocks={ showMostUsedBlocks }\n\t\t\t\t\tclassName=\"block-editor-inserter__all-blocks\"\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</InserterListbox>\n\t);\n}\n\nexport default forwardRef( BlockTypesTab );\n"],"mappings":";;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAKA,IAAAG,eAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAD,sBAAA,CAAAJ,OAAA;AACA,IAAAM,mBAAA,GAAAF,sBAAA,CAAAJ,OAAA;AACA,IAAAO,gBAAA,GAAAH,sBAAA,CAAAJ,OAAA;AACA,IAAAQ,QAAA,GAAAR,OAAA;AACA,IAAAS,UAAA,GAAAL,sBAAA,CAAAJ,OAAA;AAA6C,IAAAU,WAAA,GAAAV,OAAA;AAf7C;AACA;AACA;;AAKA;AACA;AACA;;AAQA,MAAMW,iBAAiB,GAAKC,IAAI,IAAMA,IAAI,CAACC,IAAI,CAACC,KAAK,CAAE,GAAI,CAAC,CAAE,CAAC,CAAE;AAEjE,MAAMC,mBAAmB,GAAG,CAAC;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,WAAW,GAAG,EAAE;AAEf,SAASC,kBAAkBA,CAAE;EACnCC,KAAK;EACLC,WAAW;EACXC,UAAU;EACVC,YAAY;EACZC,OAAO;EACPC,kBAAkB;EAClBC;AACD,CAAC,EAAG;EACH,MAAMC,cAAc,GAAG,IAAAC,gBAAO,EAAE,MAAM;IACrC,OAAO,IAAAC,gBAAO,EAAET,KAAK,EAAE,UAAU,EAAE,MAAO,CAAC,CAACU,KAAK,CAChD,CAAC,EACDb,mBACD,CAAC;EACF,CAAC,EAAE,CAAEG,KAAK,CAAG,CAAC;EAEd,MAAMW,kBAAkB,GAAG,IAAAH,gBAAO,EAAE,MAAM;IACzC,OAAO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YAAc;QAC7BC,OAAO,EAAGA,OAAS;QACnBC,kBAAkB,EAAGA,kBAAoB;QACzCC,SAAS,EAAC;MAAmC,CAC7C,CAAC;IAAA,CACE;EAAC,CACU,CAAC;AAEpB;AAAC,IAAA8C,QAAA,GAAAC,OAAA,CAAAtB,OAAA,GAEc,IAAAuB,mBAAU,EAAEX,aAAc,CAAC","ignoreList":[]}
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _react = require("react");
|
|
9
8
|
var _element = require("@wordpress/element");
|
|
10
9
|
var _i18n = require("@wordpress/i18n");
|
|
11
10
|
var _blockTypesList = _interopRequireDefault(require("../block-types-list"));
|
|
@@ -13,6 +12,7 @@ var _useClipboardBlock = _interopRequireDefault(require("./hooks/use-clipboard-b
|
|
|
13
12
|
var _useBlockTypeImpressions = _interopRequireDefault(require("./hooks/use-block-type-impressions"));
|
|
14
13
|
var _utils = require("./utils");
|
|
15
14
|
var _useBlockTypesState = _interopRequireDefault(require("./hooks/use-block-types-state"));
|
|
15
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
16
|
/**
|
|
17
17
|
* WordPress dependencies
|
|
18
18
|
*/
|
|
@@ -60,7 +60,7 @@ function BlockTypesTab({
|
|
|
60
60
|
key: 'default',
|
|
61
61
|
items
|
|
62
62
|
}), ...collectionSections];
|
|
63
|
-
return (0,
|
|
63
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockTypesList.default, {
|
|
64
64
|
name: "Blocks",
|
|
65
65
|
sections: sections,
|
|
66
66
|
onSelect: handleSelect,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_element","require","_i18n","_blockTypesList","_interopRequireDefault","_useClipboardBlock","_useBlockTypeImpressions","_utils","_useBlockTypesState","getBlockNamespace","item","name","split","BlockTypesTab","onSelect","rootClientId","listProps","rawBlockTypes","collections","useBlockTypesState","clipboardBlock","useClipboardBlock","filteredBlockTypes","filterInserterItems","blockTypes","items","trackBlockTypeSelected","useBlockTypeImpressions","handleSelect","args","collectionSections","useMemo","result","Object","keys","forEach","namespace","data","filter","length","push","createInserterSection","key","metadata","icon","title","sections","
|
|
1
|
+
{"version":3,"names":["_element","require","_i18n","_blockTypesList","_interopRequireDefault","_useClipboardBlock","_useBlockTypeImpressions","_utils","_useBlockTypesState","_jsxRuntime","getBlockNamespace","item","name","split","BlockTypesTab","onSelect","rootClientId","listProps","rawBlockTypes","collections","useBlockTypesState","clipboardBlock","useClipboardBlock","filteredBlockTypes","filterInserterItems","blockTypes","items","trackBlockTypeSelected","useBlockTypeImpressions","handleSelect","args","collectionSections","useMemo","result","Object","keys","forEach","namespace","data","filter","length","push","createInserterSection","key","metadata","icon","title","sections","jsx","default","label","__","_default","exports"],"sources":["@wordpress/block-editor/src/components/inserter/block-types-tab.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport BlockTypesList from '../block-types-list';\nimport useClipboardBlock from './hooks/use-clipboard-block';\nimport useBlockTypeImpressions from './hooks/use-block-type-impressions';\nimport { createInserterSection, filterInserterItems } from './utils';\nimport useBlockTypesState from './hooks/use-block-types-state';\n\nconst getBlockNamespace = ( item ) => item.name.split( '/' )[ 0 ];\n\nfunction BlockTypesTab( { onSelect, rootClientId, listProps } ) {\n\tconst [ rawBlockTypes, , collections ] = useBlockTypesState(\n\t\trootClientId,\n\t\tonSelect\n\t);\n\tconst clipboardBlock = useClipboardBlock( rootClientId );\n\tconst filteredBlockTypes = filterInserterItems( rawBlockTypes );\n\tconst blockTypes = clipboardBlock\n\t\t? [ clipboardBlock, ...filteredBlockTypes ]\n\t\t: filteredBlockTypes;\n\tconst { items, trackBlockTypeSelected } =\n\t\tuseBlockTypeImpressions( blockTypes );\n\n\tconst handleSelect = ( ...args ) => {\n\t\ttrackBlockTypeSelected( ...args );\n\t\tonSelect( ...args );\n\t};\n\n\tconst collectionSections = useMemo( () => {\n\t\tconst result = [];\n\t\tObject.keys( collections ).forEach( ( namespace ) => {\n\t\t\tconst data = items.filter(\n\t\t\t\t( item ) => getBlockNamespace( item ) === namespace\n\t\t\t);\n\t\t\tif ( data.length > 0 ) {\n\t\t\t\tresult.push(\n\t\t\t\t\tcreateInserterSection( {\n\t\t\t\t\t\tkey: `collection-${ namespace }`,\n\t\t\t\t\t\tmetadata: {\n\t\t\t\t\t\t\ticon: collections[ namespace ].icon,\n\t\t\t\t\t\t\ttitle: collections[ namespace ].title,\n\t\t\t\t\t\t},\n\t\t\t\t\t\titems: data,\n\t\t\t\t\t} )\n\t\t\t\t);\n\t\t\t}\n\t\t} );\n\n\t\treturn result;\n\t}, [ items, collections ] );\n\n\tconst sections = [\n\t\tcreateInserterSection( { key: 'default', items } ),\n\t\t...collectionSections,\n\t];\n\n\treturn (\n\t\t<BlockTypesList\n\t\t\tname=\"Blocks\"\n\t\t\tsections={ sections }\n\t\t\tonSelect={ handleSelect }\n\t\t\tlistProps={ listProps }\n\t\t\tlabel={ __( 'Blocks menu' ) }\n\t\t/>\n\t);\n}\n\nexport default BlockTypesTab;\n"],"mappings":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAKA,IAAAE,eAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,kBAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,wBAAA,GAAAF,sBAAA,CAAAH,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,mBAAA,GAAAJ,sBAAA,CAAAH,OAAA;AAA+D,IAAAQ,WAAA,GAAAR,OAAA;AAb/D;AACA;AACA;;AAIA;AACA;AACA;;AAOA,MAAMS,iBAAiB,GAAKC,IAAI,IAAMA,IAAI,CAACC,IAAI,CAACC,KAAK,CAAE,GAAI,CAAC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AEY;QACR,CAAE,CACH,CAAC;MACF;IACD,CAAE,CAAC;IAEH,OAAOL,MAAM;EACd,CAAC,EAAE,CAAEP,KAAK,EAAEP,WAAW,CAAG,CAAC;EAE3B,MAAM4B,QAAQ,GAAG,CAChB,IAAAL,4BAAqB,EAAE;IAAEC,GAAG,EAAE,SAAS;IAAEjB;EAAM,CAAE,CAAC,EAClD,GAAGK,kBAAkB,CACrB;EAED,oBACC,IAAAtB,WAAA,CAAAuC,GAAA,EAAC7C,eAAA,CAAA8C,OAAc;IACdrC,IAAI,EAAC,QAAQ;IACbmC,QAAQ,EAAGA,QAAU;IACrBhC,QAAQ,EAAGc,YAAc;IACzBZ,SAAS,EAAGA,SAAW;IACvBiC,KAAK,EAAG,IAAAC,QAAE,EAAE,aAAc;EAAG,CAC7B,CAAC;AAEJ;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAJ,OAAA,GAEcnC,aAAa","ignoreList":[]}
|
|
@@ -4,11 +4,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var _react = require("react");
|
|
8
7
|
var _i18n = require("@wordpress/i18n");
|
|
9
8
|
var _components = require("@wordpress/components");
|
|
10
9
|
var _icons = require("@wordpress/icons");
|
|
11
10
|
var _lockUnlock = require("../../../lock-unlock");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
12
|
/**
|
|
13
13
|
* WordPress dependencies
|
|
14
14
|
*/
|
|
@@ -26,31 +26,37 @@ function CategoryTabs({
|
|
|
26
26
|
onSelectCategory,
|
|
27
27
|
children
|
|
28
28
|
}) {
|
|
29
|
-
return (0,
|
|
29
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Tabs, {
|
|
30
30
|
className: "block-editor-inserter__category-tabs",
|
|
31
31
|
selectOnMove: false,
|
|
32
32
|
selectedTabId: selectedCategory ? selectedCategory.name : null,
|
|
33
|
-
orientation:
|
|
33
|
+
orientation: "vertical",
|
|
34
34
|
onSelect: categoryId => {
|
|
35
35
|
// Pass the full category object
|
|
36
36
|
onSelectCategory(categories.find(category => category.name === categoryId));
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
37
|
+
},
|
|
38
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Tabs.TabList, {
|
|
39
|
+
className: "block-editor-inserter__category-tablist",
|
|
40
|
+
children: categories.map(category => /*#__PURE__*/(0, _jsxRuntime.jsx)(Tabs.Tab, {
|
|
41
|
+
tabId: category.name,
|
|
42
|
+
className: "block-editor-inserter__category-tab",
|
|
43
|
+
"aria-label": category.label,
|
|
44
|
+
"aria-current": category === selectedCategory ? 'true' : undefined,
|
|
45
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.__experimentalHStack, {
|
|
46
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.FlexBlock, {
|
|
47
|
+
children: category.label
|
|
48
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.Icon, {
|
|
49
|
+
icon: (0, _i18n.isRTL)() ? _icons.chevronLeft : _icons.chevronRight
|
|
50
|
+
})]
|
|
51
|
+
})
|
|
52
|
+
}, category.name))
|
|
53
|
+
}), categories.map(category => /*#__PURE__*/(0, _jsxRuntime.jsx)(Tabs.TabPanel, {
|
|
54
|
+
tabId: category.name,
|
|
55
|
+
focusable: false,
|
|
56
|
+
className: "block-editor-inserter__category-panel",
|
|
57
|
+
children: children
|
|
58
|
+
}, category.name))]
|
|
59
|
+
});
|
|
54
60
|
}
|
|
55
61
|
var _default = exports.default = CategoryTabs;
|
|
56
62
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_i18n","require","_components","_icons","_lockUnlock","Tabs","unlock","componentsPrivateApis","CategoryTabs","categories","selectedCategory","onSelectCategory","children","
|
|
1
|
+
{"version":3,"names":["_i18n","require","_components","_icons","_lockUnlock","_jsxRuntime","Tabs","unlock","componentsPrivateApis","CategoryTabs","categories","selectedCategory","onSelectCategory","children","jsxs","className","selectOnMove","selectedTabId","name","orientation","onSelect","categoryId","find","category","jsx","TabList","map","Tab","tabId","label","undefined","__experimentalHStack","FlexBlock","Icon","icon","isRTL","chevronLeft","chevronRight","TabPanel","focusable","_default","exports","default"],"sources":["@wordpress/block-editor/src/components/inserter/category-tabs/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { isRTL } from '@wordpress/i18n';\nimport {\n\t__experimentalHStack as HStack,\n\tFlexBlock,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport { Icon, chevronRight, chevronLeft } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../../lock-unlock';\n\nconst { Tabs } = unlock( componentsPrivateApis );\n\nfunction CategoryTabs( {\n\tcategories,\n\tselectedCategory,\n\tonSelectCategory,\n\tchildren,\n} ) {\n\treturn (\n\t\t<Tabs\n\t\t\tclassName=\"block-editor-inserter__category-tabs\"\n\t\t\tselectOnMove={ false }\n\t\t\tselectedTabId={ selectedCategory ? selectedCategory.name : null }\n\t\t\torientation=\"vertical\"\n\t\t\tonSelect={ ( categoryId ) => {\n\t\t\t\t// Pass the full category object\n\t\t\t\tonSelectCategory(\n\t\t\t\t\tcategories.find(\n\t\t\t\t\t\t( category ) => category.name === categoryId\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t} }\n\t\t>\n\t\t\t<Tabs.TabList className=\"block-editor-inserter__category-tablist\">\n\t\t\t\t{ categories.map( ( category ) => (\n\t\t\t\t\t<Tabs.Tab\n\t\t\t\t\t\tkey={ category.name }\n\t\t\t\t\t\ttabId={ category.name }\n\t\t\t\t\t\tclassName=\"block-editor-inserter__category-tab\"\n\t\t\t\t\t\taria-label={ category.label }\n\t\t\t\t\t\taria-current={\n\t\t\t\t\t\t\tcategory === selectedCategory ? 'true' : undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t<HStack>\n\t\t\t\t\t\t\t<FlexBlock>{ category.label }</FlexBlock>\n\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\ticon={ isRTL() ? chevronLeft : chevronRight }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</HStack>\n\t\t\t\t\t</Tabs.Tab>\n\t\t\t\t) ) }\n\t\t\t</Tabs.TabList>\n\t\t\t{ categories.map( ( category ) => (\n\t\t\t\t<Tabs.TabPanel\n\t\t\t\t\tkey={ category.name }\n\t\t\t\t\ttabId={ category.name }\n\t\t\t\t\tfocusable={ false }\n\t\t\t\t\tclassName=\"block-editor-inserter__category-panel\"\n\t\t\t\t>\n\t\t\t\t\t{ children }\n\t\t\t\t</Tabs.TabPanel>\n\t\t\t) ) }\n\t\t</Tabs>\n\t);\n}\n\nexport default CategoryTabs;\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAKA,IAAAE,MAAA,GAAAF,OAAA;AAKA,IAAAG,WAAA,GAAAH,OAAA;AAA8C,IAAAI,WAAA,GAAAJ,OAAA;AAd9C;AACA;AACA;;AASA;AACA;AACA;;AAGA,MAAM;EAAEK;AAAK,CAAC,GAAG,IAAAC,kBAAM,EAAEC,uBAAsB,CAAC;AAEhD,SAASC,YAAYA,CAAE;EACtBC,UAAU;EACVC,gBAAgB;EAChBC,gBAAgB;EAChBC;AACD,CAAC,EAAG;EACH,oBACC,IAAAR,WAAA,CAAAS,IAAA,EAACR,IAAI;IACJS,SAAS,EAAC,sCAAsC;IAChDC,YAAY,EAAG,KAAO;IACtBC,aAAa,EAAGN,gBAAgB,GAAGA,gBAAgB,C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GALJU,QAAQ,CAACL,IAMD,CACd,CAAC;EAAA,CACE,CAAC;AAET;AAAC,IAAAsB,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcjC,YAAY","ignoreList":[]}
|
|
@@ -8,6 +8,7 @@ var _blocks = require("@wordpress/blocks");
|
|
|
8
8
|
var _data = require("@wordpress/data");
|
|
9
9
|
var _element = require("@wordpress/element");
|
|
10
10
|
var _store = require("../../../store");
|
|
11
|
+
var _utils = require("../../../store/utils");
|
|
11
12
|
/**
|
|
12
13
|
* WordPress dependencies
|
|
13
14
|
*/
|
|
@@ -21,10 +22,14 @@ var _store = require("../../../store");
|
|
|
21
22
|
*
|
|
22
23
|
* @param {string=} rootClientId Insertion's root client ID.
|
|
23
24
|
* @param {Function} onInsert function called when inserter a list of blocks.
|
|
25
|
+
* @param {boolean} isQuick
|
|
24
26
|
* @return {Array} Returns the block types state. (block types, categories, collections, onSelect handler)
|
|
25
27
|
*/
|
|
26
|
-
const useBlockTypesState = (rootClientId, onInsert) => {
|
|
27
|
-
const
|
|
28
|
+
const useBlockTypesState = (rootClientId, onInsert, isQuick) => {
|
|
29
|
+
const options = (0, _element.useMemo)(() => ({
|
|
30
|
+
[_utils.withRootClientIdOptionKey]: !isQuick
|
|
31
|
+
}), [isQuick]);
|
|
32
|
+
const [items] = (0, _data.useSelect)(select => [select(_store.store).getInserterItems(rootClientId, options)], [rootClientId, options]);
|
|
28
33
|
const [categories, collections] = (0, _data.useSelect)(select => {
|
|
29
34
|
const {
|
|
30
35
|
getCategories,
|
|
@@ -37,12 +42,13 @@ const useBlockTypesState = (rootClientId, onInsert) => {
|
|
|
37
42
|
initialAttributes,
|
|
38
43
|
innerBlocks,
|
|
39
44
|
syncStatus,
|
|
40
|
-
content
|
|
45
|
+
content,
|
|
46
|
+
rootClientId: _rootClientId
|
|
41
47
|
}, shouldFocusBlock) => {
|
|
42
48
|
const insertedBlock = syncStatus === 'unsynced' ? (0, _blocks.parse)(content, {
|
|
43
49
|
__unstableSkipMigrationLogs: true
|
|
44
50
|
}) : (0, _blocks.createBlock)(name, initialAttributes, (0, _blocks.createBlocksFromInnerBlocksTemplate)(innerBlocks));
|
|
45
|
-
onInsert(insertedBlock, undefined, shouldFocusBlock);
|
|
51
|
+
onInsert(insertedBlock, undefined, shouldFocusBlock, _rootClientId);
|
|
46
52
|
}, [onInsert]);
|
|
47
53
|
return [items, categories, collections, onSelectItem];
|
|
48
54
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_blocks","require","_data","_element","_store","useBlockTypesState","rootClientId","onInsert","items","useSelect","select","blockEditorStore","getInserterItems","categories","collections","getCategories","getCollections","blocksStore","onSelectItem","useCallback","name","initialAttributes","innerBlocks","syncStatus","content","shouldFocusBlock","insertedBlock","parse","__unstableSkipMigrationLogs","createBlock","createBlocksFromInnerBlocksTemplate","undefined","_default","exports","default"],"sources":["@wordpress/block-editor/src/components/inserter/hooks/use-block-types-state.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tcreateBlock,\n\tcreateBlocksFromInnerBlocksTemplate,\n\tstore as blocksStore,\n\tparse,\n} from '@wordpress/blocks';\nimport { useSelect } from '@wordpress/data';\nimport { useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../../store';\n\n/**\n * Retrieves the block types inserter state.\n *\n * @param {string=} rootClientId Insertion's root client ID.\n * @param {Function} onInsert function called when inserter a list of blocks.\n * @return {Array} Returns the block types state. (block types, categories, collections, onSelect handler)\n */\nconst useBlockTypesState = ( rootClientId, onInsert ) => {\n\tconst [ items ] = useSelect(\n\t\t( select ) => [\n\t\t\tselect( blockEditorStore ).getInserterItems(
|
|
1
|
+
{"version":3,"names":["_blocks","require","_data","_element","_store","_utils","useBlockTypesState","rootClientId","onInsert","isQuick","options","useMemo","withRootClientIdOptionKey","items","useSelect","select","blockEditorStore","getInserterItems","categories","collections","getCategories","getCollections","blocksStore","onSelectItem","useCallback","name","initialAttributes","innerBlocks","syncStatus","content","_rootClientId","shouldFocusBlock","insertedBlock","parse","__unstableSkipMigrationLogs","createBlock","createBlocksFromInnerBlocksTemplate","undefined","_default","exports","default"],"sources":["@wordpress/block-editor/src/components/inserter/hooks/use-block-types-state.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tcreateBlock,\n\tcreateBlocksFromInnerBlocksTemplate,\n\tstore as blocksStore,\n\tparse,\n} from '@wordpress/blocks';\nimport { useSelect } from '@wordpress/data';\nimport { useCallback, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../../store';\nimport { withRootClientIdOptionKey } from '../../../store/utils';\n\n/**\n * Retrieves the block types inserter state.\n *\n * @param {string=} rootClientId Insertion's root client ID.\n * @param {Function} onInsert function called when inserter a list of blocks.\n * @param {boolean} isQuick\n * @return {Array} Returns the block types state. (block types, categories, collections, onSelect handler)\n */\nconst useBlockTypesState = ( rootClientId, onInsert, isQuick ) => {\n\tconst options = useMemo(\n\t\t() => ( { [ withRootClientIdOptionKey ]: ! isQuick } ),\n\t\t[ isQuick ]\n\t);\n\tconst [ items ] = useSelect(\n\t\t( select ) => [\n\t\t\tselect( blockEditorStore ).getInserterItems(\n\t\t\t\trootClientId,\n\t\t\t\toptions\n\t\t\t),\n\t\t],\n\t\t[ rootClientId, options ]\n\t);\n\n\tconst [ categories, collections ] = useSelect( ( select ) => {\n\t\tconst { getCategories, getCollections } = select( blocksStore );\n\t\treturn [ getCategories(), getCollections() ];\n\t}, [] );\n\n\tconst onSelectItem = useCallback(\n\t\t(\n\t\t\t{\n\t\t\t\tname,\n\t\t\t\tinitialAttributes,\n\t\t\t\tinnerBlocks,\n\t\t\t\tsyncStatus,\n\t\t\t\tcontent,\n\t\t\t\trootClientId: _rootClientId,\n\t\t\t},\n\t\t\tshouldFocusBlock\n\t\t) => {\n\t\t\tconst insertedBlock =\n\t\t\t\tsyncStatus === 'unsynced'\n\t\t\t\t\t? parse( content, {\n\t\t\t\t\t\t\t__unstableSkipMigrationLogs: true,\n\t\t\t\t\t } )\n\t\t\t\t\t: createBlock(\n\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\tinitialAttributes,\n\t\t\t\t\t\t\tcreateBlocksFromInnerBlocksTemplate( innerBlocks )\n\t\t\t\t\t );\n\n\t\t\tonInsert(\n\t\t\t\tinsertedBlock,\n\t\t\t\tundefined,\n\t\t\t\tshouldFocusBlock,\n\t\t\t\t_rootClientId\n\t\t\t);\n\t\t},\n\t\t[ onInsert ]\n\t);\n\n\treturn [ items, categories, collections, onSelectItem ];\n};\n\nexport default useBlockTypesState;\n"],"mappings":";;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AAMA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAKA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAhBA;AACA;AACA;;AAUA;AACA;AACA;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMK,kBAAkB,GAAGA,CAAEC,YAAY,EAAEC,QAAQ,EAAEC,OAAO,KAAM;EACjE,MAAMC,OAAO,GAAG,IAAAC,gBAAO,EACtB,OAAQ;IAAE,CAAEC,gCAAyB,GAAI,CAAEH;EAAQ,CAAC,CAAE,EACtD,CAAEA,OAAO,CACV,CAAC;EACD,MAAM,CAAEI,KAAK,CAAE,GAAG,IAAAC,eAAS,EACxBC,MAAM,IAAM,CACbA,MAAM,CAAEC,YAAiB,CAAC,CAACC,gBAAgB,CAC1CV,YAAY,EACZG,OACD,CAAC,CACD,EACD,CAAEH,YAAY,EAAEG,OAAO,CACxB,CAAC;EAED,MAAM,CAAEQ,UAAU,EAAEC,WAAW,CAAE,GAAG,IAAAL,eAAS,EAAIC,MAAM,IAAM;IAC5D,MAAM;MAAEK,aAAa;MAAEC;IAAe,CAAC,GAAGN,MAAM,CAAEO,aAAY,CAAC;IAC/D,OAAO,CAAEF,aAAa,CAAC,CAAC,EAAEC,cAAc,CAAC,CAAC,CAAE;EAC7C,CAAC,EAAE,EAAG,CAAC;EAEP,MAAME,YAAY,GAAG,IAAAC,oBAAW,EAC/B,CACC;IACCC,IAAI;IACJC,iBAAiB;IACjBC,WAAW;IACXC,UAAU;IACVC,OAAO;IACPtB,YAAY,EAAEuB;EACf,CAAC,EACDC,gBAAgB,KACZ;IACJ,MAAMC,aAAa,GAClBJ,UAAU,KAAK,UAAU,GACtB,IAAAK,aAAK,EAAEJ,OAAO,EAAE;MAChBK,2BAA2B,EAAE;IAC7B,CAAE,CAAC,GACH,IAAAC,mBAAW,EACXV,IAAI,EACJC,iBAAiB,EACjB,IAAAU,2CAAmC,EAAET,WAAY,CACjD,CAAC;IAELnB,QAAQ,CACPwB,aAAa,EACbK,SAAS,EACTN,gBAAgB,EAChBD,aACD,CAAC;EACF,CAAC,EACD,CAAEtB,QAAQ,CACX,CAAC;EAED,OAAO,CAAEK,KAAK,EAAEK,UAAU,EAAEC,WAAW,EAAEI,YAAY,CAAE;AACxD,CAAC;AAAC,IAAAe,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEalC,kBAAkB","ignoreList":[]}
|
|
@@ -19,6 +19,23 @@ var _lockUnlock = require("../../../lock-unlock");
|
|
|
19
19
|
* Internal dependencies
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
+
function getIndex({
|
|
23
|
+
destinationRootClientId,
|
|
24
|
+
destinationIndex,
|
|
25
|
+
rootClientId,
|
|
26
|
+
registry
|
|
27
|
+
}) {
|
|
28
|
+
if (rootClientId === destinationRootClientId) {
|
|
29
|
+
return destinationIndex;
|
|
30
|
+
}
|
|
31
|
+
const parents = ['', ...registry.select(_store.store).getBlockParents(destinationRootClientId), destinationRootClientId];
|
|
32
|
+
const parentIndex = parents.indexOf(rootClientId);
|
|
33
|
+
if (parentIndex !== -1) {
|
|
34
|
+
return registry.select(_store.store).getBlockIndex(parents[parentIndex + 1]) + 1;
|
|
35
|
+
}
|
|
36
|
+
return registry.select(_store.store).getBlockOrder(rootClientId).length;
|
|
37
|
+
}
|
|
38
|
+
|
|
22
39
|
/**
|
|
23
40
|
* @typedef WPInserterConfig
|
|
24
41
|
*
|
|
@@ -48,6 +65,7 @@ function useInsertionPoint({
|
|
|
48
65
|
shouldFocusBlock = true,
|
|
49
66
|
selectBlockOnInsert = true
|
|
50
67
|
}) {
|
|
68
|
+
const registry = (0, _data.useRegistry)();
|
|
51
69
|
const {
|
|
52
70
|
getSelectedBlock
|
|
53
71
|
} = (0, _data.useSelect)(_store.store);
|
|
@@ -89,7 +107,7 @@ function useInsertionPoint({
|
|
|
89
107
|
hideInsertionPoint,
|
|
90
108
|
setLastFocus
|
|
91
109
|
} = (0, _lockUnlock.unlock)((0, _data.useDispatch)(_store.store));
|
|
92
|
-
const onInsertBlocks = (0, _element.useCallback)((blocks, meta, shouldForceFocusBlock = false) => {
|
|
110
|
+
const onInsertBlocks = (0, _element.useCallback)((blocks, meta, shouldForceFocusBlock = false, _rootClientId) => {
|
|
93
111
|
// When we are trying to move focus or select a new block on insert, we also
|
|
94
112
|
// need to clear the last focus to avoid the focus being set to the wrong block
|
|
95
113
|
// when tabbing back into the canvas if the block was added from outside the
|
|
@@ -101,7 +119,12 @@ function useInsertionPoint({
|
|
|
101
119
|
if (!isAppender && selectedBlock && (0, _blocks.isUnmodifiedDefaultBlock)(selectedBlock)) {
|
|
102
120
|
replaceBlocks(selectedBlock.clientId, blocks, null, shouldFocusBlock || shouldForceFocusBlock ? 0 : null, meta);
|
|
103
121
|
} else {
|
|
104
|
-
insertBlocks(blocks,
|
|
122
|
+
insertBlocks(blocks, isAppender || _rootClientId === undefined ? destinationIndex : getIndex({
|
|
123
|
+
destinationRootClientId,
|
|
124
|
+
destinationIndex,
|
|
125
|
+
rootClientId: _rootClientId,
|
|
126
|
+
registry
|
|
127
|
+
}), isAppender || _rootClientId === undefined ? destinationRootClientId : _rootClientId, selectBlockOnInsert, shouldFocusBlock || shouldForceFocusBlock ? 0 : null, meta);
|
|
105
128
|
}
|
|
106
129
|
const blockLength = Array.isArray(blocks) ? blocks.length : 1;
|
|
107
130
|
const message = (0, _i18n.sprintf)(
|
|
@@ -112,9 +135,14 @@ function useInsertionPoint({
|
|
|
112
135
|
onSelect(blocks);
|
|
113
136
|
}
|
|
114
137
|
}, [isAppender, getSelectedBlock, replaceBlocks, insertBlocks, destinationRootClientId, destinationIndex, onSelect, shouldFocusBlock, selectBlockOnInsert]);
|
|
115
|
-
const onToggleInsertionPoint = (0, _element.useCallback)(
|
|
116
|
-
if (
|
|
117
|
-
showInsertionPoint(
|
|
138
|
+
const onToggleInsertionPoint = (0, _element.useCallback)(item => {
|
|
139
|
+
if (item?.hasOwnProperty('rootClientId')) {
|
|
140
|
+
showInsertionPoint(item.rootClientId, getIndex({
|
|
141
|
+
destinationRootClientId,
|
|
142
|
+
destinationIndex,
|
|
143
|
+
rootClientId: item.rootClientId,
|
|
144
|
+
registry
|
|
145
|
+
}));
|
|
118
146
|
} else {
|
|
119
147
|
hideInsertionPoint();
|
|
120
148
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_data","require","_blocks","_i18n","_a11y","_element","_store","_lockUnlock","useInsertionPoint","rootClientId","insertionIndex","clientId","isAppender","onSelect","shouldFocusBlock","selectBlockOnInsert","getSelectedBlock","useSelect","blockEditorStore","destinationRootClientId","destinationIndex","select","getSelectedBlockClientId","getBlockRootClientId","getBlockIndex","getBlockOrder","selectedBlockClientId","_destinationRootClientId","_destinationIndex","undefined","length","replaceBlocks","insertBlocks","showInsertionPoint","hideInsertionPoint","setLastFocus","unlock","useDispatch","onInsertBlocks","useCallback","blocks","meta","shouldForceFocusBlock","selectedBlock","isUnmodifiedDefaultBlock","blockLength","Array","isArray","message","sprintf","_n","speak","onToggleInsertionPoint","show","_default","exports","default"],"sources":["@wordpress/block-editor/src/components/inserter/hooks/use-insertion-point.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { isUnmodifiedDefaultBlock } from '@wordpress/blocks';\nimport { _n, sprintf } from '@wordpress/i18n';\nimport { speak } from '@wordpress/a11y';\nimport { useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../../store';\nimport { unlock } from '../../../lock-unlock';\n\n/**\n * @typedef WPInserterConfig\n *\n * @property {string=} rootClientId If set, insertion will be into the\n * block with this ID.\n * @property {number=} insertionIndex If set, insertion will be into this\n * explicit position.\n * @property {string=} clientId If set, insertion will be after the\n * block with this ID.\n * @property {boolean=} isAppender Whether the inserter is an appender\n * or not.\n * @property {Function=} onSelect Called after insertion.\n */\n\n/**\n * Returns the insertion point state given the inserter config.\n *\n * @param {WPInserterConfig} config Inserter Config.\n * @return {Array} Insertion Point State (rootClientID, onInsertBlocks and onToggle).\n */\nfunction useInsertionPoint( {\n\trootClientId = '',\n\tinsertionIndex,\n\tclientId,\n\tisAppender,\n\tonSelect,\n\tshouldFocusBlock = true,\n\tselectBlockOnInsert = true,\n} ) {\n\tconst { getSelectedBlock } = useSelect( blockEditorStore );\n\tconst { destinationRootClientId, destinationIndex } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetSelectedBlockClientId,\n\t\t\t\tgetBlockRootClientId,\n\t\t\t\tgetBlockIndex,\n\t\t\t\tgetBlockOrder,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst selectedBlockClientId = getSelectedBlockClientId();\n\n\t\t\tlet _destinationRootClientId = rootClientId;\n\t\t\tlet _destinationIndex;\n\n\t\t\tif ( insertionIndex !== undefined ) {\n\t\t\t\t// Insert into a specific index.\n\t\t\t\t_destinationIndex = insertionIndex;\n\t\t\t} else if ( clientId ) {\n\t\t\t\t// Insert after a specific client ID.\n\t\t\t\t_destinationIndex = getBlockIndex( clientId );\n\t\t\t} else if ( ! isAppender && selectedBlockClientId ) {\n\t\t\t\t_destinationRootClientId = getBlockRootClientId(\n\t\t\t\t\tselectedBlockClientId\n\t\t\t\t);\n\t\t\t\t_destinationIndex = getBlockIndex( selectedBlockClientId ) + 1;\n\t\t\t} else {\n\t\t\t\t// Insert at the end of the list.\n\t\t\t\t_destinationIndex = getBlockOrder(\n\t\t\t\t\t_destinationRootClientId\n\t\t\t\t).length;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tdestinationRootClientId: _destinationRootClientId,\n\t\t\t\tdestinationIndex: _destinationIndex,\n\t\t\t};\n\t\t},\n\t\t[ rootClientId, insertionIndex, clientId, isAppender ]\n\t);\n\n\tconst {\n\t\treplaceBlocks,\n\t\tinsertBlocks,\n\t\tshowInsertionPoint,\n\t\thideInsertionPoint,\n\t\tsetLastFocus,\n\t} = unlock( useDispatch( blockEditorStore ) );\n\n\tconst onInsertBlocks = useCallback(\n\t\t( blocks, meta, shouldForceFocusBlock = false ) => {\n\t\t\t// When we are trying to move focus or select a new block on insert, we also\n\t\t\t// need to clear the last focus to avoid the focus being set to the wrong block\n\t\t\t// when tabbing back into the canvas if the block was added from outside the\n\t\t\t// editor canvas.\n\t\t\tif (\n\t\t\t\tshouldForceFocusBlock ||\n\t\t\t\tshouldFocusBlock ||\n\t\t\t\tselectBlockOnInsert\n\t\t\t) {\n\t\t\t\tsetLastFocus( null );\n\t\t\t}\n\n\t\t\tconst selectedBlock = getSelectedBlock();\n\n\t\t\tif (\n\t\t\t\t! isAppender &&\n\t\t\t\tselectedBlock &&\n\t\t\t\tisUnmodifiedDefaultBlock( selectedBlock )\n\t\t\t) {\n\t\t\t\treplaceBlocks(\n\t\t\t\t\tselectedBlock.clientId,\n\t\t\t\t\tblocks,\n\t\t\t\t\tnull,\n\t\t\t\t\tshouldFocusBlock || shouldForceFocusBlock ? 0 : null,\n\t\t\t\t\tmeta\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tinsertBlocks(\n\t\t\t\t\tblocks,\n\t\t\t\t\tdestinationIndex,\n\t\t\t\t\tdestinationRootClientId,\n\t\t\t\t\tselectBlockOnInsert,\n\t\t\t\t\tshouldFocusBlock || shouldForceFocusBlock ? 0 : null,\n\t\t\t\t\tmeta\n\t\t\t\t);\n\t\t\t}\n\t\t\tconst blockLength = Array.isArray( blocks ) ? blocks.length : 1;\n\t\t\tconst message = sprintf(\n\t\t\t\t// translators: %d: the name of the block that has been added\n\t\t\t\t_n( '%d block added.', '%d blocks added.', blockLength ),\n\t\t\t\tblockLength\n\t\t\t);\n\t\t\tspeak( message );\n\n\t\t\tif ( onSelect ) {\n\t\t\t\tonSelect( blocks );\n\t\t\t}\n\t\t},\n\t\t[\n\t\t\tisAppender,\n\t\t\tgetSelectedBlock,\n\t\t\treplaceBlocks,\n\t\t\tinsertBlocks,\n\t\t\tdestinationRootClientId,\n\t\t\tdestinationIndex,\n\t\t\tonSelect,\n\t\t\tshouldFocusBlock,\n\t\t\tselectBlockOnInsert,\n\t\t]\n\t);\n\n\tconst onToggleInsertionPoint = useCallback(\n\t\t( show ) => {\n\t\t\tif ( show ) {\n\t\t\t\tshowInsertionPoint( destinationRootClientId, destinationIndex );\n\t\t\t} else {\n\t\t\t\thideInsertionPoint();\n\t\t\t}\n\t\t},\n\t\t[\n\t\t\tshowInsertionPoint,\n\t\t\thideInsertionPoint,\n\t\t\tdestinationRootClientId,\n\t\t\tdestinationIndex,\n\t\t]\n\t);\n\n\treturn [ destinationRootClientId, onInsertBlocks, onToggleInsertionPoint ];\n}\n\nexport default useInsertionPoint;\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAKA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AAbA;AACA;AACA;;AAOA;AACA;AACA;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;A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C,mBAAmB,CAErB,CAAC;EAED,MAAMqC,sBAAsB,GAAG,IAAAb,oBAAW,EACvCc,IAAI,IAAM;IACX,IAAKA,IAAI,EAAG;MACXpB,kBAAkB,CAAEd,uBAAuB,EAAEC,gBAAiB,CAAC;IAChE,CAAC,MAAM;MACNc,kBAAkB,CAAC,CAAC;IACrB;EACD,CAAC,EACD,CACCD,kBAAkB,EAClBC,kBAAkB,EAClBf,uBAAuB,EACvBC,gBAAgB,CAElB,CAAC;EAED,OAAO,CAAED,uBAAuB,EAAEmB,cAAc,EAAEc,sBAAsB,CAAE;AAC3E;AAAC,IAAAE,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEchD,iBAAiB","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_data","require","_blocks","_i18n","_a11y","_element","_store","_lockUnlock","getIndex","destinationRootClientId","destinationIndex","rootClientId","registry","parents","select","blockEditorStore","getBlockParents","parentIndex","indexOf","getBlockIndex","getBlockOrder","length","useInsertionPoint","insertionIndex","clientId","isAppender","onSelect","shouldFocusBlock","selectBlockOnInsert","useRegistry","getSelectedBlock","useSelect","getSelectedBlockClientId","getBlockRootClientId","selectedBlockClientId","_destinationRootClientId","_destinationIndex","undefined","replaceBlocks","insertBlocks","showInsertionPoint","hideInsertionPoint","setLastFocus","unlock","useDispatch","onInsertBlocks","useCallback","blocks","meta","shouldForceFocusBlock","_rootClientId","selectedBlock","isUnmodifiedDefaultBlock","blockLength","Array","isArray","message","sprintf","_n","speak","onToggleInsertionPoint","item","hasOwnProperty","_default","exports","default"],"sources":["@wordpress/block-editor/src/components/inserter/hooks/use-insertion-point.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useDispatch, useRegistry, useSelect } from '@wordpress/data';\nimport { isUnmodifiedDefaultBlock } from '@wordpress/blocks';\nimport { _n, sprintf } from '@wordpress/i18n';\nimport { speak } from '@wordpress/a11y';\nimport { useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../../store';\nimport { unlock } from '../../../lock-unlock';\n\nfunction getIndex( {\n\tdestinationRootClientId,\n\tdestinationIndex,\n\trootClientId,\n\tregistry,\n} ) {\n\tif ( rootClientId === destinationRootClientId ) {\n\t\treturn destinationIndex;\n\t}\n\tconst parents = [\n\t\t'',\n\t\t...registry\n\t\t\t.select( blockEditorStore )\n\t\t\t.getBlockParents( destinationRootClientId ),\n\t\tdestinationRootClientId,\n\t];\n\tconst parentIndex = parents.indexOf( rootClientId );\n\tif ( parentIndex !== -1 ) {\n\t\treturn (\n\t\t\tregistry\n\t\t\t\t.select( blockEditorStore )\n\t\t\t\t.getBlockIndex( parents[ parentIndex + 1 ] ) + 1\n\t\t);\n\t}\n\treturn registry.select( blockEditorStore ).getBlockOrder( rootClientId )\n\t\t.length;\n}\n\n/**\n * @typedef WPInserterConfig\n *\n * @property {string=} rootClientId If set, insertion will be into the\n * block with this ID.\n * @property {number=} insertionIndex If set, insertion will be into this\n * explicit position.\n * @property {string=} clientId If set, insertion will be after the\n * block with this ID.\n * @property {boolean=} isAppender Whether the inserter is an appender\n * or not.\n * @property {Function=} onSelect Called after insertion.\n */\n\n/**\n * Returns the insertion point state given the inserter config.\n *\n * @param {WPInserterConfig} config Inserter Config.\n * @return {Array} Insertion Point State (rootClientID, onInsertBlocks and onToggle).\n */\nfunction useInsertionPoint( {\n\trootClientId = '',\n\tinsertionIndex,\n\tclientId,\n\tisAppender,\n\tonSelect,\n\tshouldFocusBlock = true,\n\tselectBlockOnInsert = true,\n} ) {\n\tconst registry = useRegistry();\n\tconst { getSelectedBlock } = useSelect( blockEditorStore );\n\tconst { destinationRootClientId, destinationIndex } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetSelectedBlockClientId,\n\t\t\t\tgetBlockRootClientId,\n\t\t\t\tgetBlockIndex,\n\t\t\t\tgetBlockOrder,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst selectedBlockClientId = getSelectedBlockClientId();\n\n\t\t\tlet _destinationRootClientId = rootClientId;\n\t\t\tlet _destinationIndex;\n\n\t\t\tif ( insertionIndex !== undefined ) {\n\t\t\t\t// Insert into a specific index.\n\t\t\t\t_destinationIndex = insertionIndex;\n\t\t\t} else if ( clientId ) {\n\t\t\t\t// Insert after a specific client ID.\n\t\t\t\t_destinationIndex = getBlockIndex( clientId );\n\t\t\t} else if ( ! isAppender && selectedBlockClientId ) {\n\t\t\t\t_destinationRootClientId = getBlockRootClientId(\n\t\t\t\t\tselectedBlockClientId\n\t\t\t\t);\n\t\t\t\t_destinationIndex = getBlockIndex( selectedBlockClientId ) + 1;\n\t\t\t} else {\n\t\t\t\t// Insert at the end of the list.\n\t\t\t\t_destinationIndex = getBlockOrder(\n\t\t\t\t\t_destinationRootClientId\n\t\t\t\t).length;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tdestinationRootClientId: _destinationRootClientId,\n\t\t\t\tdestinationIndex: _destinationIndex,\n\t\t\t};\n\t\t},\n\t\t[ rootClientId, insertionIndex, clientId, isAppender ]\n\t);\n\n\tconst {\n\t\treplaceBlocks,\n\t\tinsertBlocks,\n\t\tshowInsertionPoint,\n\t\thideInsertionPoint,\n\t\tsetLastFocus,\n\t} = unlock( useDispatch( blockEditorStore ) );\n\n\tconst onInsertBlocks = useCallback(\n\t\t( blocks, meta, shouldForceFocusBlock = false, _rootClientId ) => {\n\t\t\t// When we are trying to move focus or select a new block on insert, we also\n\t\t\t// need to clear the last focus to avoid the focus being set to the wrong block\n\t\t\t// when tabbing back into the canvas if the block was added from outside the\n\t\t\t// editor canvas.\n\t\t\tif (\n\t\t\t\tshouldForceFocusBlock ||\n\t\t\t\tshouldFocusBlock ||\n\t\t\t\tselectBlockOnInsert\n\t\t\t) {\n\t\t\t\tsetLastFocus( null );\n\t\t\t}\n\n\t\t\tconst selectedBlock = getSelectedBlock();\n\n\t\t\tif (\n\t\t\t\t! isAppender &&\n\t\t\t\tselectedBlock &&\n\t\t\t\tisUnmodifiedDefaultBlock( selectedBlock )\n\t\t\t) {\n\t\t\t\treplaceBlocks(\n\t\t\t\t\tselectedBlock.clientId,\n\t\t\t\t\tblocks,\n\t\t\t\t\tnull,\n\t\t\t\t\tshouldFocusBlock || shouldForceFocusBlock ? 0 : null,\n\t\t\t\t\tmeta\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tinsertBlocks(\n\t\t\t\t\tblocks,\n\t\t\t\t\tisAppender || _rootClientId === undefined\n\t\t\t\t\t\t? destinationIndex\n\t\t\t\t\t\t: getIndex( {\n\t\t\t\t\t\t\t\tdestinationRootClientId,\n\t\t\t\t\t\t\t\tdestinationIndex,\n\t\t\t\t\t\t\t\trootClientId: _rootClientId,\n\t\t\t\t\t\t\t\tregistry,\n\t\t\t\t\t\t } ),\n\t\t\t\t\tisAppender || _rootClientId === undefined\n\t\t\t\t\t\t? destinationRootClientId\n\t\t\t\t\t\t: _rootClientId,\n\t\t\t\t\tselectBlockOnInsert,\n\t\t\t\t\tshouldFocusBlock || shouldForceFocusBlock ? 0 : null,\n\t\t\t\t\tmeta\n\t\t\t\t);\n\t\t\t}\n\t\t\tconst blockLength = Array.isArray( blocks ) ? blocks.length : 1;\n\t\t\tconst message = sprintf(\n\t\t\t\t// translators: %d: the name of the block that has been added\n\t\t\t\t_n( '%d block added.', '%d blocks added.', blockLength ),\n\t\t\t\tblockLength\n\t\t\t);\n\t\t\tspeak( message );\n\n\t\t\tif ( onSelect ) {\n\t\t\t\tonSelect( blocks );\n\t\t\t}\n\t\t},\n\t\t[\n\t\t\tisAppender,\n\t\t\tgetSelectedBlock,\n\t\t\treplaceBlocks,\n\t\t\tinsertBlocks,\n\t\t\tdestinationRootClientId,\n\t\t\tdestinationIndex,\n\t\t\tonSelect,\n\t\t\tshouldFocusBlock,\n\t\t\tselectBlockOnInsert,\n\t\t]\n\t);\n\n\tconst onToggleInsertionPoint = useCallback(\n\t\t( item ) => {\n\t\t\tif ( item?.hasOwnProperty( 'rootClientId' ) ) {\n\t\t\t\tshowInsertionPoint(\n\t\t\t\t\titem.rootClientId,\n\t\t\t\t\tgetIndex( {\n\t\t\t\t\t\tdestinationRootClientId,\n\t\t\t\t\t\tdestinationIndex,\n\t\t\t\t\t\trootClientId: item.rootClientId,\n\t\t\t\t\t\tregistry,\n\t\t\t\t\t} )\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\thideInsertionPoint();\n\t\t\t}\n\t\t},\n\t\t[\n\t\t\tshowInsertionPoint,\n\t\t\thideInsertionPoint,\n\t\t\tdestinationRootClientId,\n\t\t\tdestinationIndex,\n\t\t]\n\t);\n\n\treturn [ destinationRootClientId, onInsertBlocks, onToggleInsertionPoint ];\n}\n\nexport default useInsertionPoint;\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAKA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AAbA;AACA;AACA;;AAOA;AACA;AACA;;AAIA,SAASO,QAAQA,CAAE;EAClBC,uBAAuB;EACvBC,gBAAgB;EAChBC,YAAY;EACZC;AACD,CAAC,EAAG;EACH,IAAKD,YAAY,KAAKF,uBAAuB,EAAG;IAC/C,OAAOC,gBAAgB;EACxB;EACA,MAAMG,OAAO,GAAG,CACf,EAAE,EACF,GAAGD,QAAQ,CACTE,MAAM,CAAEC,YAAiB,CAAC,CAC1BC,eAAe,CAAEP,uBAAwB,CAAC,EAC5CA,uBAAuB,CACvB;EACD,MAAMQ,WAAW,GAAGJ,OAAO,CAACK,OAAO,CAAEP,YAAa,CAAC;EACnD,IAAKM,WAAW,KAAK,CAAC,CAAC,EAAG;IACzB,OACCL,QAAQ,CACNE,MAAM,CAAEC,YAAiB,CAAC,CAC1BI,aAAa,CAAEN,OAAO,CAAEI,WAAW,GAAG,CAAC,CAAG,CAAC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,GAAGC,KAAK,CAACC,OAAO,CAAER,MAAO,CAAC,GAAGA,MAAM,CAAC1B,MAAM,GAAG,CAAC;IAC/D,MAAMmC,OAAO,GAAG,IAAAC,aAAO;IACtB;IACA,IAAAC,QAAE,EAAE,iBAAiB,EAAE,kBAAkB,EAAEL,WAAY,CAAC,EACxDA,WACD,CAAC;IACD,IAAAM,WAAK,EAAEH,OAAQ,CAAC;IAEhB,IAAK9B,QAAQ,EAAG;MACfA,QAAQ,CAAEqB,MAAO,CAAC;IACnB;EACD,CAAC,EACD,CACCtB,UAAU,EACVK,gBAAgB,EAChBQ,aAAa,EACbC,YAAY,EACZ9B,uBAAuB,EACvBC,gBAAgB,EAChBgB,QAAQ,EACRC,gBAAgB,EAChBC,mBAAmB,CAErB,CAAC;EAED,MAAMgC,sBAAsB,GAAG,IAAAd,oBAAW,EACvCe,IAAI,IAAM;IACX,IAAKA,IAAI,EAAEC,cAAc,CAAE,cAAe,CAAC,EAAG;MAC7CtB,kBAAkB,CACjBqB,IAAI,CAAClD,YAAY,EACjBH,QAAQ,CAAE;QACTC,uBAAuB;QACvBC,gBAAgB;QAChBC,YAAY,EAAEkD,IAAI,CAAClD,YAAY;QAC/BC;MACD,CAAE,CACH,CAAC;IACF,CAAC,MAAM;MACN6B,kBAAkB,CAAC,CAAC;IACrB;EACD,CAAC,EACD,CACCD,kBAAkB,EAClBC,kBAAkB,EAClBhC,uBAAuB,EACvBC,gBAAgB,CAElB,CAAC;EAED,OAAO,CAAED,uBAAuB,EAAEoC,cAAc,EAAEe,sBAAsB,CAAE;AAC3E;AAAC,IAAAG,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEc3C,iBAAiB","ignoreList":[]}
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = exports.ComposedPrivateInserter = void 0;
|
|
8
|
-
var _react = require("react");
|
|
9
8
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
10
9
|
var _a11y = require("@wordpress/a11y");
|
|
11
10
|
var _i18n = require("@wordpress/i18n");
|
|
@@ -18,6 +17,7 @@ var _icons = require("@wordpress/icons");
|
|
|
18
17
|
var _menu = _interopRequireDefault(require("./menu"));
|
|
19
18
|
var _quickInserter = _interopRequireDefault(require("./quick-inserter"));
|
|
20
19
|
var _store = require("../../store");
|
|
20
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
21
|
/**
|
|
22
22
|
* External dependencies
|
|
23
23
|
*/
|
|
@@ -65,7 +65,7 @@ const defaultRenderToggle = ({
|
|
|
65
65
|
onClick(event);
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
return (0,
|
|
68
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Wrapper, {
|
|
69
69
|
icon: _icons.plus,
|
|
70
70
|
label: label,
|
|
71
71
|
tooltipPosition: "bottom",
|
|
@@ -156,7 +156,7 @@ class PrivateInserter extends _element.Component {
|
|
|
156
156
|
selectBlockOnInsert
|
|
157
157
|
} = this.props;
|
|
158
158
|
if (isQuick) {
|
|
159
|
-
return (0,
|
|
159
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_quickInserter.default, {
|
|
160
160
|
onSelect: blocks => {
|
|
161
161
|
const firstBlock = Array.isArray(blocks) && blocks?.length ? blocks[0] : blocks;
|
|
162
162
|
if (onSelectOrClose && typeof onSelectOrClose === 'function') {
|
|
@@ -171,7 +171,7 @@ class PrivateInserter extends _element.Component {
|
|
|
171
171
|
selectBlockOnInsert: selectBlockOnInsert
|
|
172
172
|
});
|
|
173
173
|
}
|
|
174
|
-
return (0,
|
|
174
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_menu.default, {
|
|
175
175
|
onSelect: () => {
|
|
176
176
|
onClose();
|
|
177
177
|
},
|
|
@@ -195,7 +195,7 @@ class PrivateInserter extends _element.Component {
|
|
|
195
195
|
onToggle: insertOnlyAllowedBlock
|
|
196
196
|
});
|
|
197
197
|
}
|
|
198
|
-
return (0,
|
|
198
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Dropdown, {
|
|
199
199
|
className: "block-editor-inserter",
|
|
200
200
|
contentClassName: (0, _clsx.default)('block-editor-inserter__popover', {
|
|
201
201
|
'is-quick': isQuick
|
|
@@ -364,7 +364,7 @@ const ComposedPrivateInserter = exports.ComposedPrivateInserter = (0, _compose.c
|
|
|
364
364
|
clientId
|
|
365
365
|
}) => hasItems || !isAppender && !rootClientId && !clientId)])(PrivateInserter);
|
|
366
366
|
const Inserter = (0, _element.forwardRef)((props, ref) => {
|
|
367
|
-
return (0,
|
|
367
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(ComposedPrivateInserter, {
|
|
368
368
|
ref: ref,
|
|
369
369
|
...props
|
|
370
370
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_clsx","_interopRequireDefault","require","_a11y","_i18n","_components","_element","_data","_compose","_blocks","_icons","_menu","_quickInserter","_store","defaultRenderToggle","onToggle","disabled","isOpen","blockTitle","hasSingleBlockType","toggleProps","prioritizePatterns","as","Wrapper","Button","label","labelProp","onClick","rest","sprintf","_x","__","handleClick","event","_react","createElement","icon","plus","tooltipPosition","className","PrivateInserter","Component","constructor","arguments","bind","renderToggle","renderContent","props","directInsertBlock","hasItems","onClose","rootClientId","clientId","isAppender","showInserterHelpPanel","__experimentalIsQuick","isQuick","onSelectOrClose","selectBlockOnInsert","default","onSelect","blocks","firstBlock","Array","isArray","length","render","position","insertOnlyAllowedBlock","Dropdown","contentClassName","clsx","popoverProps","shift","expandOnMobile","headerTitle","ComposedPrivateInserter","exports","compose","withSelect","select","shouldDirectInsert","getBlockRootClientId","hasInserterItems","getAllowedBlocks","getDirectInsertBlock","getSettings","blockEditorStore","getBlockVariations","blocksStore","undefined","allowedBlocks","settings","name","allowedBlockType","title","__experimentalPreferPatternsOnRoot","withDispatch","dispatch","ownProps","getAdjacentBlockAttributes","attributesToCopy","getBlock","getPreviousBlockClientId","result","adjacentAttributes","parentBlock","innerBlocks","lastInnerBlock","attributes","currentBlock","previousBlock","forEach","attribute","hasOwnProperty","getInsertionIndex","getBlockIndex","getBlockSelectionEnd","getBlockOrder","end","insertBlock","blockToInsert","newAttributes","createBlock","message","speak","ifCondition","Inserter","forwardRef","ref","_default"],"sources":["@wordpress/block-editor/src/components/inserter/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { speak } from '@wordpress/a11y';\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { Dropdown, Button } from '@wordpress/components';\nimport { forwardRef, Component } from '@wordpress/element';\nimport { withDispatch, withSelect } from '@wordpress/data';\nimport { compose, ifCondition } from '@wordpress/compose';\nimport { createBlock, store as blocksStore } from '@wordpress/blocks';\nimport { plus } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport InserterMenu from './menu';\nimport QuickInserter from './quick-inserter';\nimport { store as blockEditorStore } from '../../store';\n\nconst defaultRenderToggle = ( {\n\tonToggle,\n\tdisabled,\n\tisOpen,\n\tblockTitle,\n\thasSingleBlockType,\n\ttoggleProps = {},\n\tprioritizePatterns,\n} ) => {\n\tconst {\n\t\tas: Wrapper = Button,\n\t\tlabel: labelProp,\n\t\tonClick,\n\t\t...rest\n\t} = toggleProps;\n\n\tlet label = labelProp;\n\tif ( ! label && hasSingleBlockType ) {\n\t\tlabel = sprintf(\n\t\t\t// translators: %s: the name of the block when there is only one\n\t\t\t_x( 'Add %s', 'directly add the only allowed block' ),\n\t\t\tblockTitle\n\t\t);\n\t} else if ( ! label && prioritizePatterns ) {\n\t\tlabel = __( 'Add pattern' );\n\t} else if ( ! label ) {\n\t\tlabel = _x( 'Add block', 'Generic label for block inserter button' );\n\t}\n\n\t// Handle both onClick functions from the toggle and the parent component.\n\tfunction handleClick( event ) {\n\t\tif ( onToggle ) {\n\t\t\tonToggle( event );\n\t\t}\n\t\tif ( onClick ) {\n\t\t\tonClick( event );\n\t\t}\n\t}\n\n\treturn (\n\t\t<Wrapper\n\t\t\ticon={ plus }\n\t\t\tlabel={ label }\n\t\t\ttooltipPosition=\"bottom\"\n\t\t\tonClick={ handleClick }\n\t\t\tclassName=\"block-editor-inserter__toggle\"\n\t\t\taria-haspopup={ ! hasSingleBlockType ? 'true' : false }\n\t\t\taria-expanded={ ! hasSingleBlockType ? isOpen : false }\n\t\t\tdisabled={ disabled }\n\t\t\t{ ...rest }\n\t\t/>\n\t);\n};\n\nclass PrivateInserter extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.onToggle = this.onToggle.bind( this );\n\t\tthis.renderToggle = this.renderToggle.bind( this );\n\t\tthis.renderContent = this.renderContent.bind( this );\n\t}\n\n\tonToggle( isOpen ) {\n\t\tconst { onToggle } = this.props;\n\n\t\t// Surface toggle callback to parent component.\n\t\tif ( onToggle ) {\n\t\t\tonToggle( isOpen );\n\t\t}\n\t}\n\n\t/**\n\t * Render callback to display Dropdown toggle element.\n\t *\n\t * @param {Object} options\n\t * @param {Function} options.onToggle Callback to invoke when toggle is\n\t * pressed.\n\t * @param {boolean} options.isOpen Whether dropdown is currently open.\n\t *\n\t * @return {Element} Dropdown toggle element.\n\t */\n\trenderToggle( { onToggle, isOpen } ) {\n\t\tconst {\n\t\t\tdisabled,\n\t\t\tblockTitle,\n\t\t\thasSingleBlockType,\n\t\t\tdirectInsertBlock,\n\t\t\ttoggleProps,\n\t\t\thasItems,\n\t\t\trenderToggle = defaultRenderToggle,\n\t\t\tprioritizePatterns,\n\t\t} = this.props;\n\n\t\treturn renderToggle( {\n\t\t\tonToggle,\n\t\t\tisOpen,\n\t\t\tdisabled: disabled || ! hasItems,\n\t\t\tblockTitle,\n\t\t\thasSingleBlockType,\n\t\t\tdirectInsertBlock,\n\t\t\ttoggleProps,\n\t\t\tprioritizePatterns,\n\t\t} );\n\t}\n\n\t/**\n\t * Render callback to display Dropdown content element.\n\t *\n\t * @param {Object} options\n\t * @param {Function} options.onClose Callback to invoke when dropdown is\n\t * closed.\n\t *\n\t * @return {Element} Dropdown content element.\n\t */\n\trenderContent( { onClose } ) {\n\t\tconst {\n\t\t\trootClientId,\n\t\t\tclientId,\n\t\t\tisAppender,\n\t\t\tshowInserterHelpPanel,\n\n\t\t\t// This prop is experimental to give some time for the quick inserter to mature\n\t\t\t// Feel free to make them stable after a few releases.\n\t\t\t__experimentalIsQuick: isQuick,\n\t\t\tprioritizePatterns,\n\t\t\tonSelectOrClose,\n\t\t\tselectBlockOnInsert,\n\t\t} = this.props;\n\n\t\tif ( isQuick ) {\n\t\t\treturn (\n\t\t\t\t<QuickInserter\n\t\t\t\t\tonSelect={ ( blocks ) => {\n\t\t\t\t\t\tconst firstBlock =\n\t\t\t\t\t\t\tArray.isArray( blocks ) && blocks?.length\n\t\t\t\t\t\t\t\t? blocks[ 0 ]\n\t\t\t\t\t\t\t\t: blocks;\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tonSelectOrClose &&\n\t\t\t\t\t\t\ttypeof onSelectOrClose === 'function'\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tonSelectOrClose( firstBlock );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonClose();\n\t\t\t\t\t} }\n\t\t\t\t\trootClientId={ rootClientId }\n\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\tisAppender={ isAppender }\n\t\t\t\t\tprioritizePatterns={ prioritizePatterns }\n\t\t\t\t\tselectBlockOnInsert={ selectBlockOnInsert }\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<InserterMenu\n\t\t\t\tonSelect={ () => {\n\t\t\t\t\tonClose();\n\t\t\t\t} }\n\t\t\t\trootClientId={ rootClientId }\n\t\t\t\tclientId={ clientId }\n\t\t\t\tisAppender={ isAppender }\n\t\t\t\tshowInserterHelpPanel={ showInserterHelpPanel }\n\t\t\t/>\n\t\t);\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tposition,\n\t\t\thasSingleBlockType,\n\t\t\tdirectInsertBlock,\n\t\t\tinsertOnlyAllowedBlock,\n\t\t\t__experimentalIsQuick: isQuick,\n\t\t\tonSelectOrClose,\n\t\t} = this.props;\n\n\t\tif ( hasSingleBlockType || directInsertBlock ) {\n\t\t\treturn this.renderToggle( { onToggle: insertOnlyAllowedBlock } );\n\t\t}\n\n\t\treturn (\n\t\t\t<Dropdown\n\t\t\t\tclassName=\"block-editor-inserter\"\n\t\t\t\tcontentClassName={ clsx( 'block-editor-inserter__popover', {\n\t\t\t\t\t'is-quick': isQuick,\n\t\t\t\t} ) }\n\t\t\t\tpopoverProps={ { position, shift: true } }\n\t\t\t\tonToggle={ this.onToggle }\n\t\t\t\texpandOnMobile\n\t\t\t\theaderTitle={ __( 'Add a block' ) }\n\t\t\t\trenderToggle={ this.renderToggle }\n\t\t\t\trenderContent={ this.renderContent }\n\t\t\t\tonClose={ onSelectOrClose }\n\t\t\t/>\n\t\t);\n\t}\n}\n\nexport const ComposedPrivateInserter = compose( [\n\twithSelect(\n\t\t( select, { clientId, rootClientId, shouldDirectInsert = true } ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockRootClientId,\n\t\t\t\thasInserterItems,\n\t\t\t\tgetAllowedBlocks,\n\t\t\t\tgetDirectInsertBlock,\n\t\t\t\tgetSettings,\n\t\t\t} = select( blockEditorStore );\n\n\t\t\tconst { getBlockVariations } = select( blocksStore );\n\n\t\t\trootClientId =\n\t\t\t\trootClientId || getBlockRootClientId( clientId ) || undefined;\n\n\t\t\tconst allowedBlocks = getAllowedBlocks( rootClientId );\n\n\t\t\tconst directInsertBlock =\n\t\t\t\tshouldDirectInsert && getDirectInsertBlock( rootClientId );\n\n\t\t\tconst settings = getSettings();\n\n\t\t\tconst hasSingleBlockType =\n\t\t\t\tallowedBlocks?.length === 1 &&\n\t\t\t\tgetBlockVariations( allowedBlocks[ 0 ].name, 'inserter' )\n\t\t\t\t\t?.length === 0;\n\n\t\t\tlet allowedBlockType = false;\n\t\t\tif ( hasSingleBlockType ) {\n\t\t\t\tallowedBlockType = allowedBlocks[ 0 ];\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\thasItems: hasInserterItems( rootClientId ),\n\t\t\t\thasSingleBlockType,\n\t\t\t\tblockTitle: allowedBlockType ? allowedBlockType.title : '',\n\t\t\t\tallowedBlockType,\n\t\t\t\tdirectInsertBlock,\n\t\t\t\trootClientId,\n\t\t\t\tprioritizePatterns:\n\t\t\t\t\tsettings.__experimentalPreferPatternsOnRoot &&\n\t\t\t\t\t! rootClientId,\n\t\t\t};\n\t\t}\n\t),\n\twithDispatch( ( dispatch, ownProps, { select } ) => {\n\t\treturn {\n\t\t\tinsertOnlyAllowedBlock() {\n\t\t\t\tconst {\n\t\t\t\t\trootClientId,\n\t\t\t\t\tclientId,\n\t\t\t\t\tisAppender,\n\t\t\t\t\thasSingleBlockType,\n\t\t\t\t\tallowedBlockType,\n\t\t\t\t\tdirectInsertBlock,\n\t\t\t\t\tonSelectOrClose,\n\t\t\t\t\tselectBlockOnInsert,\n\t\t\t\t} = ownProps;\n\n\t\t\t\tif ( ! hasSingleBlockType && ! directInsertBlock ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tfunction getAdjacentBlockAttributes( attributesToCopy ) {\n\t\t\t\t\tconst { getBlock, getPreviousBlockClientId } =\n\t\t\t\t\t\tselect( blockEditorStore );\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t! attributesToCopy ||\n\t\t\t\t\t\t( ! clientId && ! rootClientId )\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn {};\n\t\t\t\t\t}\n\n\t\t\t\t\tconst result = {};\n\t\t\t\t\tlet adjacentAttributes = {};\n\n\t\t\t\t\t// If there is no clientId, then attempt to get attributes\n\t\t\t\t\t// from the last block within innerBlocks of the root block.\n\t\t\t\t\tif ( ! clientId ) {\n\t\t\t\t\t\tconst parentBlock = getBlock( rootClientId );\n\n\t\t\t\t\t\tif ( parentBlock?.innerBlocks?.length ) {\n\t\t\t\t\t\t\tconst lastInnerBlock =\n\t\t\t\t\t\t\t\tparentBlock.innerBlocks[\n\t\t\t\t\t\t\t\t\tparentBlock.innerBlocks.length - 1\n\t\t\t\t\t\t\t\t];\n\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tdirectInsertBlock &&\n\t\t\t\t\t\t\t\tdirectInsertBlock?.name === lastInnerBlock.name\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tadjacentAttributes = lastInnerBlock.attributes;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Otherwise, attempt to get attributes from the\n\t\t\t\t\t\t// previous block relative to the current clientId.\n\t\t\t\t\t\tconst currentBlock = getBlock( clientId );\n\t\t\t\t\t\tconst previousBlock = getBlock(\n\t\t\t\t\t\t\tgetPreviousBlockClientId( clientId )\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tif ( currentBlock?.name === previousBlock?.name ) {\n\t\t\t\t\t\t\tadjacentAttributes =\n\t\t\t\t\t\t\t\tpreviousBlock?.attributes || {};\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Copy over only those attributes flagged to be copied.\n\t\t\t\t\tattributesToCopy.forEach( ( attribute ) => {\n\t\t\t\t\t\tif ( adjacentAttributes.hasOwnProperty( attribute ) ) {\n\t\t\t\t\t\t\tresult[ attribute ] =\n\t\t\t\t\t\t\t\tadjacentAttributes[ attribute ];\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tfunction getInsertionIndex() {\n\t\t\t\t\tconst {\n\t\t\t\t\t\tgetBlockIndex,\n\t\t\t\t\t\tgetBlockSelectionEnd,\n\t\t\t\t\t\tgetBlockOrder,\n\t\t\t\t\t\tgetBlockRootClientId,\n\t\t\t\t\t} = select( blockEditorStore );\n\n\t\t\t\t\t// If the clientId is defined, we insert at the position of the block.\n\t\t\t\t\tif ( clientId ) {\n\t\t\t\t\t\treturn getBlockIndex( clientId );\n\t\t\t\t\t}\n\n\t\t\t\t\t// If there a selected block, we insert after the selected block.\n\t\t\t\t\tconst end = getBlockSelectionEnd();\n\t\t\t\t\tif (\n\t\t\t\t\t\t! isAppender &&\n\t\t\t\t\t\tend &&\n\t\t\t\t\t\tgetBlockRootClientId( end ) === rootClientId\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn getBlockIndex( end ) + 1;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Otherwise, we insert at the end of the current rootClientId.\n\t\t\t\t\treturn getBlockOrder( rootClientId ).length;\n\t\t\t\t}\n\n\t\t\t\tconst { insertBlock } = dispatch( blockEditorStore );\n\n\t\t\t\tlet blockToInsert;\n\n\t\t\t\t// Attempt to augment the directInsertBlock with attributes from an adjacent block.\n\t\t\t\t// This ensures styling from nearby blocks is preserved in the newly inserted block.\n\t\t\t\t// See: https://github.com/WordPress/gutenberg/issues/37904\n\t\t\t\tif ( directInsertBlock ) {\n\t\t\t\t\tconst newAttributes = getAdjacentBlockAttributes(\n\t\t\t\t\t\tdirectInsertBlock.attributesToCopy\n\t\t\t\t\t);\n\n\t\t\t\t\tblockToInsert = createBlock( directInsertBlock.name, {\n\t\t\t\t\t\t...( directInsertBlock.attributes || {} ),\n\t\t\t\t\t\t...newAttributes,\n\t\t\t\t\t} );\n\t\t\t\t} else {\n\t\t\t\t\tblockToInsert = createBlock( allowedBlockType.name );\n\t\t\t\t}\n\n\t\t\t\tinsertBlock(\n\t\t\t\t\tblockToInsert,\n\t\t\t\t\tgetInsertionIndex(),\n\t\t\t\t\trootClientId,\n\t\t\t\t\tselectBlockOnInsert\n\t\t\t\t);\n\n\t\t\t\tif ( onSelectOrClose ) {\n\t\t\t\t\tonSelectOrClose( {\n\t\t\t\t\t\tclientId: blockToInsert?.clientId,\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\tconst message = sprintf(\n\t\t\t\t\t// translators: %s: the name of the block that has been added\n\t\t\t\t\t__( '%s block added' ),\n\t\t\t\t\tallowedBlockType.title\n\t\t\t\t);\n\t\t\t\tspeak( message );\n\t\t\t},\n\t\t};\n\t} ),\n\t// The global inserter should always be visible, we are using ( ! isAppender && ! rootClientId && ! clientId ) as\n\t// a way to detect the global Inserter.\n\tifCondition(\n\t\t( { hasItems, isAppender, rootClientId, clientId } ) =>\n\t\t\thasItems || ( ! isAppender && ! rootClientId && ! clientId )\n\t),\n] )( PrivateInserter );\n\nconst Inserter = forwardRef( ( props, ref ) => {\n\treturn <ComposedPrivateInserter ref={ ref } { ...props } />;\n} );\n\nexport default Inserter;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AAKA,IAAAS,KAAA,GAAAV,sBAAA,CAAAC,OAAA;AACA,IAAAU,cAAA,GAAAX,sBAAA,CAAAC,OAAA;AACA,IAAAW,MAAA,GAAAX,OAAA;AAtBA;AACA;AACA;;AAGA;AACA;AACA;;AAUA;AACA;AACA;;AAKA,MAAMY,mBAAmB,GAAGA,CAAE;EAC7BC,QAAQ;EACRC,QAAQ;EACRC,MAAM;EACNC,UAAU;EACVC,kBAAkB;EAClBC,WAAW,GAAG,CAAC,CAAC;EAChBC;AACD,CAAC,KAAM;EACN,MAAM;IACLC,EAAE,EAAEC,OAAO,GAAGC,kBAAM;IACpBC,KAAK,EAAEC,SAAS;IAChBC,OAAO;IACP,GAAGC;EACJ,CAAC,GAAGR,WAAW;EAEf,IAAIK,KAAK,GAAGC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6D,UAAU,IAAI,CAAC,CAAC,CAAE;UACzC,GAAGa;QACJ,CAAE,CAAC;MACJ,CAAC,MAAM;QACND,aAAa,GAAG,IAAAE,mBAAW,EAAE7B,gBAAgB,CAACD,IAAK,CAAC;MACrD;MAEA2B,WAAW,CACVC,aAAa,EACbN,iBAAiB,CAAC,CAAC,EACnBhE,YAAY,EACZO,mBACD,CAAC;MAED,IAAKD,eAAe,EAAG;QACtBA,eAAe,CAAE;UAChBL,QAAQ,EAAEqE,aAAa,EAAErE;QAC1B,CAAE,CAAC;MACJ;MAEA,MAAMwE,OAAO,GAAG,IAAA/F,aAAO;MACtB;MACA,IAAAE,QAAE,EAAE,gBAAiB,CAAC,EACtB+D,gBAAgB,CAACC,KAClB,CAAC;MACD,IAAA8B,WAAK,EAAED,OAAQ,CAAC;IACjB;EACD,CAAC;AACF,CAAE,CAAC;AACH;AACA;AACA,IAAAE,oBAAW,EACV,CAAE;EAAE7E,QAAQ;EAAEI,UAAU;EAAEF,YAAY;EAAEC;AAAS,CAAC,KACjDH,QAAQ,IAAM,CAAEI,UAAU,IAAI,CAAEF,YAAY,IAAI,CAAEC,QACpD,CAAC,CACA,CAAC,CAAEZ,eAAgB,CAAC;AAEtB,MAAMuF,QAAQ,GAAG,IAAAC,mBAAU,EAAE,CAAEjF,KAAK,EAAEkF,GAAG,KAAM;EAC9C,OAAO,IAAA/F,MAAA,CAAAC,aAAA,EAACyC,uBAAuB;IAACqD,GAAG,EAAGA,GAAK;IAAA,GAAMlF;EAAK,CAAI,CAAC;AAC5D,CAAE,CAAC;AAAC,IAAAmF,QAAA,GAAArD,OAAA,CAAAlB,OAAA,GAEWoE,QAAQ","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_clsx","_interopRequireDefault","require","_a11y","_i18n","_components","_element","_data","_compose","_blocks","_icons","_menu","_quickInserter","_store","_jsxRuntime","defaultRenderToggle","onToggle","disabled","isOpen","blockTitle","hasSingleBlockType","toggleProps","prioritizePatterns","as","Wrapper","Button","label","labelProp","onClick","rest","sprintf","_x","__","handleClick","event","jsx","icon","plus","tooltipPosition","className","PrivateInserter","Component","constructor","arguments","bind","renderToggle","renderContent","props","directInsertBlock","hasItems","onClose","rootClientId","clientId","isAppender","showInserterHelpPanel","__experimentalIsQuick","isQuick","onSelectOrClose","selectBlockOnInsert","default","onSelect","blocks","firstBlock","Array","isArray","length","render","position","insertOnlyAllowedBlock","Dropdown","contentClassName","clsx","popoverProps","shift","expandOnMobile","headerTitle","ComposedPrivateInserter","exports","compose","withSelect","select","shouldDirectInsert","getBlockRootClientId","hasInserterItems","getAllowedBlocks","getDirectInsertBlock","getSettings","blockEditorStore","getBlockVariations","blocksStore","undefined","allowedBlocks","settings","name","allowedBlockType","title","__experimentalPreferPatternsOnRoot","withDispatch","dispatch","ownProps","getAdjacentBlockAttributes","attributesToCopy","getBlock","getPreviousBlockClientId","result","adjacentAttributes","parentBlock","innerBlocks","lastInnerBlock","attributes","currentBlock","previousBlock","forEach","attribute","hasOwnProperty","getInsertionIndex","getBlockIndex","getBlockSelectionEnd","getBlockOrder","end","insertBlock","blockToInsert","newAttributes","createBlock","message","speak","ifCondition","Inserter","forwardRef","ref","_default"],"sources":["@wordpress/block-editor/src/components/inserter/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { speak } from '@wordpress/a11y';\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { Dropdown, Button } from '@wordpress/components';\nimport { forwardRef, Component } from '@wordpress/element';\nimport { withDispatch, withSelect } from '@wordpress/data';\nimport { compose, ifCondition } from '@wordpress/compose';\nimport { createBlock, store as blocksStore } from '@wordpress/blocks';\nimport { plus } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport InserterMenu from './menu';\nimport QuickInserter from './quick-inserter';\nimport { store as blockEditorStore } from '../../store';\n\nconst defaultRenderToggle = ( {\n\tonToggle,\n\tdisabled,\n\tisOpen,\n\tblockTitle,\n\thasSingleBlockType,\n\ttoggleProps = {},\n\tprioritizePatterns,\n} ) => {\n\tconst {\n\t\tas: Wrapper = Button,\n\t\tlabel: labelProp,\n\t\tonClick,\n\t\t...rest\n\t} = toggleProps;\n\n\tlet label = labelProp;\n\tif ( ! label && hasSingleBlockType ) {\n\t\tlabel = sprintf(\n\t\t\t// translators: %s: the name of the block when there is only one\n\t\t\t_x( 'Add %s', 'directly add the only allowed block' ),\n\t\t\tblockTitle\n\t\t);\n\t} else if ( ! label && prioritizePatterns ) {\n\t\tlabel = __( 'Add pattern' );\n\t} else if ( ! label ) {\n\t\tlabel = _x( 'Add block', 'Generic label for block inserter button' );\n\t}\n\n\t// Handle both onClick functions from the toggle and the parent component.\n\tfunction handleClick( event ) {\n\t\tif ( onToggle ) {\n\t\t\tonToggle( event );\n\t\t}\n\t\tif ( onClick ) {\n\t\t\tonClick( event );\n\t\t}\n\t}\n\n\treturn (\n\t\t<Wrapper\n\t\t\ticon={ plus }\n\t\t\tlabel={ label }\n\t\t\ttooltipPosition=\"bottom\"\n\t\t\tonClick={ handleClick }\n\t\t\tclassName=\"block-editor-inserter__toggle\"\n\t\t\taria-haspopup={ ! hasSingleBlockType ? 'true' : false }\n\t\t\taria-expanded={ ! hasSingleBlockType ? isOpen : false }\n\t\t\tdisabled={ disabled }\n\t\t\t{ ...rest }\n\t\t/>\n\t);\n};\n\nclass PrivateInserter extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.onToggle = this.onToggle.bind( this );\n\t\tthis.renderToggle = this.renderToggle.bind( this );\n\t\tthis.renderContent = this.renderContent.bind( this );\n\t}\n\n\tonToggle( isOpen ) {\n\t\tconst { onToggle } = this.props;\n\n\t\t// Surface toggle callback to parent component.\n\t\tif ( onToggle ) {\n\t\t\tonToggle( isOpen );\n\t\t}\n\t}\n\n\t/**\n\t * Render callback to display Dropdown toggle element.\n\t *\n\t * @param {Object} options\n\t * @param {Function} options.onToggle Callback to invoke when toggle is\n\t * pressed.\n\t * @param {boolean} options.isOpen Whether dropdown is currently open.\n\t *\n\t * @return {Element} Dropdown toggle element.\n\t */\n\trenderToggle( { onToggle, isOpen } ) {\n\t\tconst {\n\t\t\tdisabled,\n\t\t\tblockTitle,\n\t\t\thasSingleBlockType,\n\t\t\tdirectInsertBlock,\n\t\t\ttoggleProps,\n\t\t\thasItems,\n\t\t\trenderToggle = defaultRenderToggle,\n\t\t\tprioritizePatterns,\n\t\t} = this.props;\n\n\t\treturn renderToggle( {\n\t\t\tonToggle,\n\t\t\tisOpen,\n\t\t\tdisabled: disabled || ! hasItems,\n\t\t\tblockTitle,\n\t\t\thasSingleBlockType,\n\t\t\tdirectInsertBlock,\n\t\t\ttoggleProps,\n\t\t\tprioritizePatterns,\n\t\t} );\n\t}\n\n\t/**\n\t * Render callback to display Dropdown content element.\n\t *\n\t * @param {Object} options\n\t * @param {Function} options.onClose Callback to invoke when dropdown is\n\t * closed.\n\t *\n\t * @return {Element} Dropdown content element.\n\t */\n\trenderContent( { onClose } ) {\n\t\tconst {\n\t\t\trootClientId,\n\t\t\tclientId,\n\t\t\tisAppender,\n\t\t\tshowInserterHelpPanel,\n\n\t\t\t// This prop is experimental to give some time for the quick inserter to mature\n\t\t\t// Feel free to make them stable after a few releases.\n\t\t\t__experimentalIsQuick: isQuick,\n\t\t\tprioritizePatterns,\n\t\t\tonSelectOrClose,\n\t\t\tselectBlockOnInsert,\n\t\t} = this.props;\n\n\t\tif ( isQuick ) {\n\t\t\treturn (\n\t\t\t\t<QuickInserter\n\t\t\t\t\tonSelect={ ( blocks ) => {\n\t\t\t\t\t\tconst firstBlock =\n\t\t\t\t\t\t\tArray.isArray( blocks ) && blocks?.length\n\t\t\t\t\t\t\t\t? blocks[ 0 ]\n\t\t\t\t\t\t\t\t: blocks;\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tonSelectOrClose &&\n\t\t\t\t\t\t\ttypeof onSelectOrClose === 'function'\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tonSelectOrClose( firstBlock );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonClose();\n\t\t\t\t\t} }\n\t\t\t\t\trootClientId={ rootClientId }\n\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\tisAppender={ isAppender }\n\t\t\t\t\tprioritizePatterns={ prioritizePatterns }\n\t\t\t\t\tselectBlockOnInsert={ selectBlockOnInsert }\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<InserterMenu\n\t\t\t\tonSelect={ () => {\n\t\t\t\t\tonClose();\n\t\t\t\t} }\n\t\t\t\trootClientId={ rootClientId }\n\t\t\t\tclientId={ clientId }\n\t\t\t\tisAppender={ isAppender }\n\t\t\t\tshowInserterHelpPanel={ showInserterHelpPanel }\n\t\t\t/>\n\t\t);\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tposition,\n\t\t\thasSingleBlockType,\n\t\t\tdirectInsertBlock,\n\t\t\tinsertOnlyAllowedBlock,\n\t\t\t__experimentalIsQuick: isQuick,\n\t\t\tonSelectOrClose,\n\t\t} = this.props;\n\n\t\tif ( hasSingleBlockType || directInsertBlock ) {\n\t\t\treturn this.renderToggle( { onToggle: insertOnlyAllowedBlock } );\n\t\t}\n\n\t\treturn (\n\t\t\t<Dropdown\n\t\t\t\tclassName=\"block-editor-inserter\"\n\t\t\t\tcontentClassName={ clsx( 'block-editor-inserter__popover', {\n\t\t\t\t\t'is-quick': isQuick,\n\t\t\t\t} ) }\n\t\t\t\tpopoverProps={ { position, shift: true } }\n\t\t\t\tonToggle={ this.onToggle }\n\t\t\t\texpandOnMobile\n\t\t\t\theaderTitle={ __( 'Add a block' ) }\n\t\t\t\trenderToggle={ this.renderToggle }\n\t\t\t\trenderContent={ this.renderContent }\n\t\t\t\tonClose={ onSelectOrClose }\n\t\t\t/>\n\t\t);\n\t}\n}\n\nexport const ComposedPrivateInserter = compose( [\n\twithSelect(\n\t\t( select, { clientId, rootClientId, shouldDirectInsert = true } ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockRootClientId,\n\t\t\t\thasInserterItems,\n\t\t\t\tgetAllowedBlocks,\n\t\t\t\tgetDirectInsertBlock,\n\t\t\t\tgetSettings,\n\t\t\t} = select( blockEditorStore );\n\n\t\t\tconst { getBlockVariations } = select( blocksStore );\n\n\t\t\trootClientId =\n\t\t\t\trootClientId || getBlockRootClientId( clientId ) || undefined;\n\n\t\t\tconst allowedBlocks = getAllowedBlocks( rootClientId );\n\n\t\t\tconst directInsertBlock =\n\t\t\t\tshouldDirectInsert && getDirectInsertBlock( rootClientId );\n\n\t\t\tconst settings = getSettings();\n\n\t\t\tconst hasSingleBlockType =\n\t\t\t\tallowedBlocks?.length === 1 &&\n\t\t\t\tgetBlockVariations( allowedBlocks[ 0 ].name, 'inserter' )\n\t\t\t\t\t?.length === 0;\n\n\t\t\tlet allowedBlockType = false;\n\t\t\tif ( hasSingleBlockType ) {\n\t\t\t\tallowedBlockType = allowedBlocks[ 0 ];\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\thasItems: hasInserterItems( rootClientId ),\n\t\t\t\thasSingleBlockType,\n\t\t\t\tblockTitle: allowedBlockType ? allowedBlockType.title : '',\n\t\t\t\tallowedBlockType,\n\t\t\t\tdirectInsertBlock,\n\t\t\t\trootClientId,\n\t\t\t\tprioritizePatterns:\n\t\t\t\t\tsettings.__experimentalPreferPatternsOnRoot &&\n\t\t\t\t\t! rootClientId,\n\t\t\t};\n\t\t}\n\t),\n\twithDispatch( ( dispatch, ownProps, { select } ) => {\n\t\treturn {\n\t\t\tinsertOnlyAllowedBlock() {\n\t\t\t\tconst {\n\t\t\t\t\trootClientId,\n\t\t\t\t\tclientId,\n\t\t\t\t\tisAppender,\n\t\t\t\t\thasSingleBlockType,\n\t\t\t\t\tallowedBlockType,\n\t\t\t\t\tdirectInsertBlock,\n\t\t\t\t\tonSelectOrClose,\n\t\t\t\t\tselectBlockOnInsert,\n\t\t\t\t} = ownProps;\n\n\t\t\t\tif ( ! hasSingleBlockType && ! directInsertBlock ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tfunction getAdjacentBlockAttributes( attributesToCopy ) {\n\t\t\t\t\tconst { getBlock, getPreviousBlockClientId } =\n\t\t\t\t\t\tselect( blockEditorStore );\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t! attributesToCopy ||\n\t\t\t\t\t\t( ! clientId && ! rootClientId )\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn {};\n\t\t\t\t\t}\n\n\t\t\t\t\tconst result = {};\n\t\t\t\t\tlet adjacentAttributes = {};\n\n\t\t\t\t\t// If there is no clientId, then attempt to get attributes\n\t\t\t\t\t// from the last block within innerBlocks of the root block.\n\t\t\t\t\tif ( ! clientId ) {\n\t\t\t\t\t\tconst parentBlock = getBlock( rootClientId );\n\n\t\t\t\t\t\tif ( parentBlock?.innerBlocks?.length ) {\n\t\t\t\t\t\t\tconst lastInnerBlock =\n\t\t\t\t\t\t\t\tparentBlock.innerBlocks[\n\t\t\t\t\t\t\t\t\tparentBlock.innerBlocks.length - 1\n\t\t\t\t\t\t\t\t];\n\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tdirectInsertBlock &&\n\t\t\t\t\t\t\t\tdirectInsertBlock?.name === lastInnerBlock.name\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tadjacentAttributes = lastInnerBlock.attributes;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Otherwise, attempt to get attributes from the\n\t\t\t\t\t\t// previous block relative to the current clientId.\n\t\t\t\t\t\tconst currentBlock = getBlock( clientId );\n\t\t\t\t\t\tconst previousBlock = getBlock(\n\t\t\t\t\t\t\tgetPreviousBlockClientId( clientId )\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tif ( currentBlock?.name === previousBlock?.name ) {\n\t\t\t\t\t\t\tadjacentAttributes =\n\t\t\t\t\t\t\t\tpreviousBlock?.attributes || {};\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Copy over only those attributes flagged to be copied.\n\t\t\t\t\tattributesToCopy.forEach( ( attribute ) => {\n\t\t\t\t\t\tif ( adjacentAttributes.hasOwnProperty( attribute ) ) {\n\t\t\t\t\t\t\tresult[ attribute ] =\n\t\t\t\t\t\t\t\tadjacentAttributes[ attribute ];\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tfunction getInsertionIndex() {\n\t\t\t\t\tconst {\n\t\t\t\t\t\tgetBlockIndex,\n\t\t\t\t\t\tgetBlockSelectionEnd,\n\t\t\t\t\t\tgetBlockOrder,\n\t\t\t\t\t\tgetBlockRootClientId,\n\t\t\t\t\t} = select( blockEditorStore );\n\n\t\t\t\t\t// If the clientId is defined, we insert at the position of the block.\n\t\t\t\t\tif ( clientId ) {\n\t\t\t\t\t\treturn getBlockIndex( clientId );\n\t\t\t\t\t}\n\n\t\t\t\t\t// If there a selected block, we insert after the selected block.\n\t\t\t\t\tconst end = getBlockSelectionEnd();\n\t\t\t\t\tif (\n\t\t\t\t\t\t! isAppender &&\n\t\t\t\t\t\tend &&\n\t\t\t\t\t\tgetBlockRootClientId( end ) === rootClientId\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn getBlockIndex( end ) + 1;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Otherwise, we insert at the end of the current rootClientId.\n\t\t\t\t\treturn getBlockOrder( rootClientId ).length;\n\t\t\t\t}\n\n\t\t\t\tconst { insertBlock } = dispatch( blockEditorStore );\n\n\t\t\t\tlet blockToInsert;\n\n\t\t\t\t// Attempt to augment the directInsertBlock with attributes from an adjacent block.\n\t\t\t\t// This ensures styling from nearby blocks is preserved in the newly inserted block.\n\t\t\t\t// See: https://github.com/WordPress/gutenberg/issues/37904\n\t\t\t\tif ( directInsertBlock ) {\n\t\t\t\t\tconst newAttributes = getAdjacentBlockAttributes(\n\t\t\t\t\t\tdirectInsertBlock.attributesToCopy\n\t\t\t\t\t);\n\n\t\t\t\t\tblockToInsert = createBlock( directInsertBlock.name, {\n\t\t\t\t\t\t...( directInsertBlock.attributes || {} ),\n\t\t\t\t\t\t...newAttributes,\n\t\t\t\t\t} );\n\t\t\t\t} else {\n\t\t\t\t\tblockToInsert = createBlock( allowedBlockType.name );\n\t\t\t\t}\n\n\t\t\t\tinsertBlock(\n\t\t\t\t\tblockToInsert,\n\t\t\t\t\tgetInsertionIndex(),\n\t\t\t\t\trootClientId,\n\t\t\t\t\tselectBlockOnInsert\n\t\t\t\t);\n\n\t\t\t\tif ( onSelectOrClose ) {\n\t\t\t\t\tonSelectOrClose( {\n\t\t\t\t\t\tclientId: blockToInsert?.clientId,\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\tconst message = sprintf(\n\t\t\t\t\t// translators: %s: the name of the block that has been added\n\t\t\t\t\t__( '%s block added' ),\n\t\t\t\t\tallowedBlockType.title\n\t\t\t\t);\n\t\t\t\tspeak( message );\n\t\t\t},\n\t\t};\n\t} ),\n\t// The global inserter should always be visible, we are using ( ! isAppender && ! rootClientId && ! clientId ) as\n\t// a way to detect the global Inserter.\n\tifCondition(\n\t\t( { hasItems, isAppender, rootClientId, clientId } ) =>\n\t\t\thasItems || ( ! isAppender && ! rootClientId && ! clientId )\n\t),\n] )( PrivateInserter );\n\nconst Inserter = forwardRef( ( props, ref ) => {\n\treturn <ComposedPrivateInserter ref={ ref } { ...props } />;\n} );\n\nexport default Inserter;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;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