@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":["_blocks","require","_components","_data","_element","_compose","_draggableChip","_interopRequireDefault","_useScrollWhenDragging","_store","_useBlockRefs","_useBlockDropZone","BlockDraggable","appendToOwnerDocument","children","clientIds","cloneClassname","elementId","onDragStart","onDragEnd","fadeWhenDisabled","dragComponent","srcRootClientId","isDraggable","icon","visibleInserter","getBlockType","useSelect","select","canMoveBlocks","getBlockRootClientId","getBlockName","getBlockAttributes","isBlockInsertionPointVisible","blockEditorStore","_getBlockType","getActiveBlockVariation","blocksStore","rootClientId","blockName","variation","isDragging","useRef","startScrolling","scrollOnDragOver","stopScrolling","useScrollWhenDragging","getAllowedBlocks","getBlockNamesByClientId","startDraggingBlocks","stopDraggingBlocks","useDispatch","useEffect","current","blockRef","useBlockRef","editorRoot","closest","onDragOver","event","target","draggedBlockNames","targetClientId","getAttribute","allowedBlocks","targetBlockName","dropTargetValid","length","targetRootClientId","targetRootBlockName","rootAllowedBlocks","isDropTargetValid","window","document","body","classList","add","remove","throttledOnDragOver","throttle","addEventListener","removeEventListener","draggable","transferData","type","srcClientIds","_react","createElement","Draggable","__experimentalTransferDataType","requestAnimationFrame","__experimentalDragComponent","undefined","default","count","onDraggableStart","onDraggableEnd","_default","exports"],"sources":["@wordpress/block-editor/src/components/block-draggable/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { Draggable } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useEffect, useRef } from '@wordpress/element';\nimport { throttle } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BlockDraggableChip from './draggable-chip';\nimport useScrollWhenDragging from './use-scroll-when-dragging';\nimport { store as blockEditorStore } from '../../store';\nimport { __unstableUseBlockRef as useBlockRef } from '../block-list/use-block-props/use-block-refs';\nimport { isDropTargetValid } from '../use-block-drop-zone';\n\nconst BlockDraggable = ( {\n\tappendToOwnerDocument,\n\tchildren,\n\tclientIds,\n\tcloneClassname,\n\telementId,\n\tonDragStart,\n\tonDragEnd,\n\tfadeWhenDisabled = false,\n\tdragComponent,\n} ) => {\n\tconst {\n\t\tsrcRootClientId,\n\t\tisDraggable,\n\t\ticon,\n\t\tvisibleInserter,\n\t\tgetBlockType,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tcanMoveBlocks,\n\t\t\t\tgetBlockRootClientId,\n\t\t\t\tgetBlockName,\n\t\t\t\tgetBlockAttributes,\n\t\t\t\tisBlockInsertionPointVisible,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst { getBlockType: _getBlockType, getActiveBlockVariation } =\n\t\t\t\tselect( blocksStore );\n\t\t\tconst rootClientId = getBlockRootClientId( clientIds[ 0 ] );\n\t\t\tconst blockName = getBlockName( clientIds[ 0 ] );\n\t\t\tconst variation = getActiveBlockVariation(\n\t\t\t\tblockName,\n\t\t\t\tgetBlockAttributes( clientIds[ 0 ] )\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\tsrcRootClientId: rootClientId,\n\t\t\t\tisDraggable: canMoveBlocks( clientIds, rootClientId ),\n\t\t\t\ticon: variation?.icon || _getBlockType( blockName )?.icon,\n\t\t\t\tvisibleInserter: isBlockInsertionPointVisible(),\n\t\t\t\tgetBlockType: _getBlockType,\n\t\t\t};\n\t\t},\n\t\t[ clientIds ]\n\t);\n\n\tconst isDragging = useRef( false );\n\tconst [ startScrolling, scrollOnDragOver, stopScrolling ] =\n\t\tuseScrollWhenDragging();\n\n\tconst { getAllowedBlocks, getBlockNamesByClientId, getBlockRootClientId } =\n\t\tuseSelect( blockEditorStore );\n\n\tconst { startDraggingBlocks, stopDraggingBlocks } =\n\t\tuseDispatch( blockEditorStore );\n\n\t// Stop dragging blocks if the block draggable is unmounted.\n\tuseEffect( () => {\n\t\treturn () => {\n\t\t\tif ( isDragging.current ) {\n\t\t\t\tstopDraggingBlocks();\n\t\t\t}\n\t\t};\n\t}, [] );\n\n\t// Find the root of the editor iframe.\n\tconst blockRef = useBlockRef( clientIds[ 0 ] );\n\tconst editorRoot = blockRef.current?.closest( 'body' );\n\n\t/*\n\t * Add a dragover event listener to the editor root to track the blocks being dragged over.\n\t * The listener has to be inside the editor iframe otherwise the target isn't accessible.\n\t */\n\tuseEffect( () => {\n\t\tif ( ! editorRoot || ! fadeWhenDisabled ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst onDragOver = ( event ) => {\n\t\t\tif ( ! event.target.closest( '[data-block]' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst draggedBlockNames = getBlockNamesByClientId( clientIds );\n\t\t\tconst targetClientId = event.target\n\t\t\t\t.closest( '[data-block]' )\n\t\t\t\t.getAttribute( 'data-block' );\n\n\t\t\tconst allowedBlocks = getAllowedBlocks( targetClientId );\n\t\t\tconst targetBlockName = getBlockNamesByClientId( [\n\t\t\t\ttargetClientId,\n\t\t\t] )[ 0 ];\n\n\t\t\t/*\n\t\t\t * Check if the target is valid to drop in.\n\t\t\t * If the target's allowedBlocks is an empty array,\n\t\t\t * it isn't a container block, in which case we check\n\t\t\t * its parent's validity instead.\n\t\t\t */\n\t\t\tlet dropTargetValid;\n\t\t\tif ( allowedBlocks?.length === 0 ) {\n\t\t\t\tconst targetRootClientId =\n\t\t\t\t\tgetBlockRootClientId( targetClientId );\n\t\t\t\tconst targetRootBlockName = getBlockNamesByClientId( [\n\t\t\t\t\ttargetRootClientId,\n\t\t\t\t] )[ 0 ];\n\t\t\t\tconst rootAllowedBlocks =\n\t\t\t\t\tgetAllowedBlocks( targetRootClientId );\n\t\t\t\tdropTargetValid = isDropTargetValid(\n\t\t\t\t\tgetBlockType,\n\t\t\t\t\trootAllowedBlocks,\n\t\t\t\t\tdraggedBlockNames,\n\t\t\t\t\ttargetRootBlockName\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tdropTargetValid = isDropTargetValid(\n\t\t\t\t\tgetBlockType,\n\t\t\t\t\tallowedBlocks,\n\t\t\t\t\tdraggedBlockNames,\n\t\t\t\t\ttargetBlockName\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t/*\n\t\t\t * Update the body class to reflect if drop target is valid.\n\t\t\t * This has to be done on the document body because the draggable\n\t\t\t * chip is rendered outside of the editor iframe.\n\t\t\t */\n\t\t\tif ( ! dropTargetValid && ! visibleInserter ) {\n\t\t\t\twindow?.document?.body?.classList?.add(\n\t\t\t\t\t'block-draggable-invalid-drag-token'\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\twindow?.document?.body?.classList?.remove(\n\t\t\t\t\t'block-draggable-invalid-drag-token'\n\t\t\t\t);\n\t\t\t}\n\t\t};\n\n\t\tconst throttledOnDragOver = throttle( onDragOver, 200 );\n\n\t\teditorRoot.addEventListener( 'dragover', throttledOnDragOver );\n\n\t\treturn () => {\n\t\t\teditorRoot.removeEventListener( 'dragover', throttledOnDragOver );\n\t\t};\n\t}, [\n\t\tclientIds,\n\t\teditorRoot,\n\t\tfadeWhenDisabled,\n\t\tgetAllowedBlocks,\n\t\tgetBlockNamesByClientId,\n\t\tgetBlockRootClientId,\n\t\tgetBlockType,\n\t\tvisibleInserter,\n\t] );\n\n\tif ( ! isDraggable ) {\n\t\treturn children( { draggable: false } );\n\t}\n\n\tconst transferData = {\n\t\ttype: 'block',\n\t\tsrcClientIds: clientIds,\n\t\tsrcRootClientId,\n\t};\n\n\treturn (\n\t\t<Draggable\n\t\t\tappendToOwnerDocument={ appendToOwnerDocument }\n\t\t\tcloneClassname={ cloneClassname }\n\t\t\t__experimentalTransferDataType=\"wp-blocks\"\n\t\t\ttransferData={ transferData }\n\t\t\tonDragStart={ ( event ) => {\n\t\t\t\t// Defer hiding the dragged source element to the next\n\t\t\t\t// frame to enable dragging.\n\t\t\t\twindow.requestAnimationFrame( () => {\n\t\t\t\t\tstartDraggingBlocks( clientIds );\n\t\t\t\t\tisDragging.current = true;\n\n\t\t\t\t\tstartScrolling( event );\n\n\t\t\t\t\tif ( onDragStart ) {\n\t\t\t\t\t\tonDragStart();\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t} }\n\t\t\tonDragOver={ scrollOnDragOver }\n\t\t\tonDragEnd={ () => {\n\t\t\t\tstopDraggingBlocks();\n\t\t\t\tisDragging.current = false;\n\n\t\t\t\tstopScrolling();\n\n\t\t\t\tif ( onDragEnd ) {\n\t\t\t\t\tonDragEnd();\n\t\t\t\t}\n\t\t\t} }\n\t\t\t__experimentalDragComponent={\n\t\t\t\t// Check against `undefined` so that `null` can be used to disable\n\t\t\t\t// the default drag component.\n\t\t\t\tdragComponent !== undefined ? (\n\t\t\t\t\tdragComponent\n\t\t\t\t) : (\n\t\t\t\t\t<BlockDraggableChip\n\t\t\t\t\t\tcount={ clientIds.length }\n\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\tfadeWhenDisabled\n\t\t\t\t\t/>\n\t\t\t\t)\n\t\t\t}\n\t\t\telementId={ elementId }\n\t\t>\n\t\t\t{ ( { onDraggableStart, onDraggableEnd } ) => {\n\t\t\t\treturn children( {\n\t\t\t\t\tdraggable: true,\n\t\t\t\t\tonDragStart: onDraggableStart,\n\t\t\t\t\tonDragEnd: onDraggableEnd,\n\t\t\t\t} );\n\t\t\t} }\n\t\t</Draggable>\n\t);\n};\n\nexport default BlockDraggable;\n"],"mappings":";;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAKA,IAAAK,cAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,sBAAA,GAAAD,sBAAA,CAAAN,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,aAAA,GAAAT,OAAA;AACA,IAAAU,iBAAA,GAAAV,OAAA;AAhBA;AACA;AACA;;AAOA;AACA;AACA;;AAOA,MAAMW,cAAc,GAAGA,CAAE;EACxBC,qBAAqB;EACrBC,QAAQ;EACRC,SAAS;EACTC,cAAc;EACdC,SAAS;EACTC,WAAW;EACXC,SAAS;EACTC,gBAAgB,GAAG,KAAK;EACxBC;AACD,CAAC,KAAM;EACN,MAAM;IACLC,eAAe;IACfC,WAAW;IACXC,IAAI;IACJC,eAAe;IACfC;EACD,CAAC,GAAG,IAAAC,eAAS,EACVC,MAAM,IAAM;IACb,MAAM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AO,GAAG,IAAI;QAEzBV,cAAc,CAAEgB,KAAM,CAAC;QAEvB,IAAKzC,WAAW,EAAG;UAClBA,WAAW,CAAC,CAAC;QACd;MACD,CAAE,CAAC;IACJ,CAAG;IACHwC,UAAU,EAAGd,gBAAkB;IAC/BzB,SAAS,EAAGA,CAAA,KAAM;MACjB+B,kBAAkB,CAAC,CAAC;MACpBT,UAAU,CAACY,OAAO,GAAG,KAAK;MAE1BR,aAAa,CAAC,CAAC;MAEf,IAAK1B,SAAS,EAAG;QAChBA,SAAS,CAAC,CAAC;MACZ;IACD,CAAG;IACHwE,2BAA2B;IAC1B;IACA;IACAtE,aAAa,KAAKuE,SAAS,GAC1BvE,aAAa,GAEb,IAAAiE,MAAA,CAAAC,aAAA,EAACjF,cAAA,CAAAuF,OAAkB;MAClBC,KAAK,EAAG/E,SAAS,CAACoD,MAAQ;MAC1B3C,IAAI,EAAGA,IAAM;MACbJ,gBAAgB;IAAA,CAChB,CAEF;IACDH,SAAS,EAAGA;EAAW,GAErB,CAAE;IAAE8E,gBAAgB;IAAEC;EAAe,CAAC,KAAM;IAC7C,OAAOlF,QAAQ,CAAE;MAChBoE,SAAS,EAAE,IAAI;MACfhE,WAAW,EAAE6E,gBAAgB;MAC7B5E,SAAS,EAAE6E;IACZ,CAAE,CAAC;EACJ,CACU,CAAC;AAEd,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAL,OAAA,GAEajF,cAAc","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_blocks","require","_components","_data","_element","_compose","_draggableChip","_interopRequireDefault","_useScrollWhenDragging","_store","_useBlockRefs","_useBlockDropZone","_jsxRuntime","BlockDraggable","appendToOwnerDocument","children","clientIds","cloneClassname","elementId","onDragStart","onDragEnd","fadeWhenDisabled","dragComponent","srcRootClientId","isDraggable","icon","visibleInserter","getBlockType","useSelect","select","canMoveBlocks","getBlockRootClientId","getBlockName","getBlockAttributes","isBlockInsertionPointVisible","blockEditorStore","_getBlockType","getActiveBlockVariation","blocksStore","rootClientId","blockName","variation","isDragging","useRef","startScrolling","scrollOnDragOver","stopScrolling","useScrollWhenDragging","getAllowedBlocks","getBlockNamesByClientId","startDraggingBlocks","stopDraggingBlocks","useDispatch","useEffect","current","blockRef","useBlockRef","editorRoot","closest","onDragOver","event","target","draggedBlockNames","targetClientId","getAttribute","allowedBlocks","targetBlockName","dropTargetValid","length","targetRootClientId","targetRootBlockName","rootAllowedBlocks","isDropTargetValid","window","document","body","classList","add","remove","throttledOnDragOver","throttle","addEventListener","removeEventListener","draggable","transferData","type","srcClientIds","jsx","Draggable","__experimentalTransferDataType","requestAnimationFrame","__experimentalDragComponent","undefined","default","count","onDraggableStart","onDraggableEnd","_default","exports"],"sources":["@wordpress/block-editor/src/components/block-draggable/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { Draggable } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useEffect, useRef } from '@wordpress/element';\nimport { throttle } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BlockDraggableChip from './draggable-chip';\nimport useScrollWhenDragging from './use-scroll-when-dragging';\nimport { store as blockEditorStore } from '../../store';\nimport { __unstableUseBlockRef as useBlockRef } from '../block-list/use-block-props/use-block-refs';\nimport { isDropTargetValid } from '../use-block-drop-zone';\n\nconst BlockDraggable = ( {\n\tappendToOwnerDocument,\n\tchildren,\n\tclientIds,\n\tcloneClassname,\n\telementId,\n\tonDragStart,\n\tonDragEnd,\n\tfadeWhenDisabled = false,\n\tdragComponent,\n} ) => {\n\tconst {\n\t\tsrcRootClientId,\n\t\tisDraggable,\n\t\ticon,\n\t\tvisibleInserter,\n\t\tgetBlockType,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tcanMoveBlocks,\n\t\t\t\tgetBlockRootClientId,\n\t\t\t\tgetBlockName,\n\t\t\t\tgetBlockAttributes,\n\t\t\t\tisBlockInsertionPointVisible,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst { getBlockType: _getBlockType, getActiveBlockVariation } =\n\t\t\t\tselect( blocksStore );\n\t\t\tconst rootClientId = getBlockRootClientId( clientIds[ 0 ] );\n\t\t\tconst blockName = getBlockName( clientIds[ 0 ] );\n\t\t\tconst variation = getActiveBlockVariation(\n\t\t\t\tblockName,\n\t\t\t\tgetBlockAttributes( clientIds[ 0 ] )\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\tsrcRootClientId: rootClientId,\n\t\t\t\tisDraggable: canMoveBlocks( clientIds, rootClientId ),\n\t\t\t\ticon: variation?.icon || _getBlockType( blockName )?.icon,\n\t\t\t\tvisibleInserter: isBlockInsertionPointVisible(),\n\t\t\t\tgetBlockType: _getBlockType,\n\t\t\t};\n\t\t},\n\t\t[ clientIds ]\n\t);\n\n\tconst isDragging = useRef( false );\n\tconst [ startScrolling, scrollOnDragOver, stopScrolling ] =\n\t\tuseScrollWhenDragging();\n\n\tconst { getAllowedBlocks, getBlockNamesByClientId, getBlockRootClientId } =\n\t\tuseSelect( blockEditorStore );\n\n\tconst { startDraggingBlocks, stopDraggingBlocks } =\n\t\tuseDispatch( blockEditorStore );\n\n\t// Stop dragging blocks if the block draggable is unmounted.\n\tuseEffect( () => {\n\t\treturn () => {\n\t\t\tif ( isDragging.current ) {\n\t\t\t\tstopDraggingBlocks();\n\t\t\t}\n\t\t};\n\t}, [] );\n\n\t// Find the root of the editor iframe.\n\tconst blockRef = useBlockRef( clientIds[ 0 ] );\n\tconst editorRoot = blockRef.current?.closest( 'body' );\n\n\t/*\n\t * Add a dragover event listener to the editor root to track the blocks being dragged over.\n\t * The listener has to be inside the editor iframe otherwise the target isn't accessible.\n\t */\n\tuseEffect( () => {\n\t\tif ( ! editorRoot || ! fadeWhenDisabled ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst onDragOver = ( event ) => {\n\t\t\tif ( ! event.target.closest( '[data-block]' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst draggedBlockNames = getBlockNamesByClientId( clientIds );\n\t\t\tconst targetClientId = event.target\n\t\t\t\t.closest( '[data-block]' )\n\t\t\t\t.getAttribute( 'data-block' );\n\n\t\t\tconst allowedBlocks = getAllowedBlocks( targetClientId );\n\t\t\tconst targetBlockName = getBlockNamesByClientId( [\n\t\t\t\ttargetClientId,\n\t\t\t] )[ 0 ];\n\n\t\t\t/*\n\t\t\t * Check if the target is valid to drop in.\n\t\t\t * If the target's allowedBlocks is an empty array,\n\t\t\t * it isn't a container block, in which case we check\n\t\t\t * its parent's validity instead.\n\t\t\t */\n\t\t\tlet dropTargetValid;\n\t\t\tif ( allowedBlocks?.length === 0 ) {\n\t\t\t\tconst targetRootClientId =\n\t\t\t\t\tgetBlockRootClientId( targetClientId );\n\t\t\t\tconst targetRootBlockName = getBlockNamesByClientId( [\n\t\t\t\t\ttargetRootClientId,\n\t\t\t\t] )[ 0 ];\n\t\t\t\tconst rootAllowedBlocks =\n\t\t\t\t\tgetAllowedBlocks( targetRootClientId );\n\t\t\t\tdropTargetValid = isDropTargetValid(\n\t\t\t\t\tgetBlockType,\n\t\t\t\t\trootAllowedBlocks,\n\t\t\t\t\tdraggedBlockNames,\n\t\t\t\t\ttargetRootBlockName\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tdropTargetValid = isDropTargetValid(\n\t\t\t\t\tgetBlockType,\n\t\t\t\t\tallowedBlocks,\n\t\t\t\t\tdraggedBlockNames,\n\t\t\t\t\ttargetBlockName\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t/*\n\t\t\t * Update the body class to reflect if drop target is valid.\n\t\t\t * This has to be done on the document body because the draggable\n\t\t\t * chip is rendered outside of the editor iframe.\n\t\t\t */\n\t\t\tif ( ! dropTargetValid && ! visibleInserter ) {\n\t\t\t\twindow?.document?.body?.classList?.add(\n\t\t\t\t\t'block-draggable-invalid-drag-token'\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\twindow?.document?.body?.classList?.remove(\n\t\t\t\t\t'block-draggable-invalid-drag-token'\n\t\t\t\t);\n\t\t\t}\n\t\t};\n\n\t\tconst throttledOnDragOver = throttle( onDragOver, 200 );\n\n\t\teditorRoot.addEventListener( 'dragover', throttledOnDragOver );\n\n\t\treturn () => {\n\t\t\teditorRoot.removeEventListener( 'dragover', throttledOnDragOver );\n\t\t};\n\t}, [\n\t\tclientIds,\n\t\teditorRoot,\n\t\tfadeWhenDisabled,\n\t\tgetAllowedBlocks,\n\t\tgetBlockNamesByClientId,\n\t\tgetBlockRootClientId,\n\t\tgetBlockType,\n\t\tvisibleInserter,\n\t] );\n\n\tif ( ! isDraggable ) {\n\t\treturn children( { draggable: false } );\n\t}\n\n\tconst transferData = {\n\t\ttype: 'block',\n\t\tsrcClientIds: clientIds,\n\t\tsrcRootClientId,\n\t};\n\n\treturn (\n\t\t<Draggable\n\t\t\tappendToOwnerDocument={ appendToOwnerDocument }\n\t\t\tcloneClassname={ cloneClassname }\n\t\t\t__experimentalTransferDataType=\"wp-blocks\"\n\t\t\ttransferData={ transferData }\n\t\t\tonDragStart={ ( event ) => {\n\t\t\t\t// Defer hiding the dragged source element to the next\n\t\t\t\t// frame to enable dragging.\n\t\t\t\twindow.requestAnimationFrame( () => {\n\t\t\t\t\tstartDraggingBlocks( clientIds );\n\t\t\t\t\tisDragging.current = true;\n\n\t\t\t\t\tstartScrolling( event );\n\n\t\t\t\t\tif ( onDragStart ) {\n\t\t\t\t\t\tonDragStart();\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t} }\n\t\t\tonDragOver={ scrollOnDragOver }\n\t\t\tonDragEnd={ () => {\n\t\t\t\tstopDraggingBlocks();\n\t\t\t\tisDragging.current = false;\n\n\t\t\t\tstopScrolling();\n\n\t\t\t\tif ( onDragEnd ) {\n\t\t\t\t\tonDragEnd();\n\t\t\t\t}\n\t\t\t} }\n\t\t\t__experimentalDragComponent={\n\t\t\t\t// Check against `undefined` so that `null` can be used to disable\n\t\t\t\t// the default drag component.\n\t\t\t\tdragComponent !== undefined ? (\n\t\t\t\t\tdragComponent\n\t\t\t\t) : (\n\t\t\t\t\t<BlockDraggableChip\n\t\t\t\t\t\tcount={ clientIds.length }\n\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\tfadeWhenDisabled\n\t\t\t\t\t/>\n\t\t\t\t)\n\t\t\t}\n\t\t\telementId={ elementId }\n\t\t>\n\t\t\t{ ( { onDraggableStart, onDraggableEnd } ) => {\n\t\t\t\treturn children( {\n\t\t\t\t\tdraggable: true,\n\t\t\t\t\tonDragStart: onDraggableStart,\n\t\t\t\t\tonDragEnd: onDraggableEnd,\n\t\t\t\t} );\n\t\t\t} }\n\t\t</Draggable>\n\t);\n};\n\nexport default BlockDraggable;\n"],"mappings":";;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAKA,IAAAK,cAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,sBAAA,GAAAD,sBAAA,CAAAN,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,aAAA,GAAAT,OAAA;AACA,IAAAU,iBAAA,GAAAV,OAAA;AAA2D,IAAAW,WAAA,GAAAX,OAAA;AAhB3D;AACA;AACA;;AAOA;AACA;AACA;;AAOA,MAAMY,cAAc,GAAGA,CAAE;EACxBC,qBAAqB;EACrBC,QAAQ;EACRC,SAAS;EACTC,cAAc;EACdC,SAAS;EACTC,WAAW;EACXC,SAAS;EACTC,gBAAgB,GAAG,KAAK;EACxBC;AACD,CAAC,KAAM;EACN,MAAM;IACLC,eAAe;IACfC,WAAW;IACXC,IAAI;IACJC,eAAe;IACfC;EACD,CAAC,GAAG,IAAAC,eAAS,EACVC,MAAM,IAAM;IACb,MAAM;MACLC,aAAa;MACbC,oBAAoB;MACpBC,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EgB,KAAM,CAAC;QAEvB,IAAKzC,WAAW,EAAG;UAClBA,WAAW,CAAC,CAAC;QACd;MACD,CAAE,CAAC;IACJ,CAAG;IACHwC,UAAU,EAAGd,gBAAkB;IAC/BzB,SAAS,EAAGA,CAAA,KAAM;MACjB+B,kBAAkB,CAAC,CAAC;MACpBT,UAAU,CAACY,OAAO,GAAG,KAAK;MAE1BR,aAAa,CAAC,CAAC;MAEf,IAAK1B,SAAS,EAAG;QAChBA,SAAS,CAAC,CAAC;MACZ;IACD,CAAG;IACHuE,2BAA2B;IAC1B;IACA;IACArE,aAAa,KAAKsE,SAAS,GAC1BtE,aAAa,gBAEb,IAAAV,WAAA,CAAA2E,GAAA,EAACjF,cAAA,CAAAuF,OAAkB;MAClBC,KAAK,EAAG9E,SAAS,CAACoD,MAAQ;MAC1B3C,IAAI,EAAGA,IAAM;MACbJ,gBAAgB;IAAA,CAChB,CAEF;IACDH,SAAS,EAAGA,SAAW;IAAAH,QAAA,EAErBA,CAAE;MAAEgF,gBAAgB;MAAEC;IAAe,CAAC,KAAM;MAC7C,OAAOjF,QAAQ,CAAE;QAChBoE,SAAS,EAAE,IAAI;QACfhE,WAAW,EAAE4E,gBAAgB;QAC7B3E,SAAS,EAAE4E;MACZ,CAAE,CAAC;IACJ;EAAC,CACS,CAAC;AAEd,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAL,OAAA,GAEahF,cAAc","ignoreList":[]}
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = exports.BlockDraggableWrapper = void 0;
|
|
8
|
-
var _react = require("react");
|
|
9
8
|
var _reactNative = require("react-native");
|
|
10
9
|
var _reactNativeSafeAreaContext = require("react-native-safe-area-context");
|
|
11
10
|
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
@@ -21,6 +20,7 @@ var _store = require("../../store");
|
|
|
21
20
|
var _droppingInsertionPoint = _interopRequireDefault(require("./dropping-insertion-point"));
|
|
22
21
|
var _useBlockDropZone = _interopRequireDefault(require("../use-block-drop-zone"));
|
|
23
22
|
var _style = _interopRequireDefault(require("./style.scss"));
|
|
23
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
24
24
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
25
25
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
26
26
|
/**
|
|
@@ -265,28 +265,33 @@ const BlockDraggableWrapper = ({
|
|
|
265
265
|
animations
|
|
266
266
|
};
|
|
267
267
|
};
|
|
268
|
-
return (0,
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
268
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
269
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_droppingInsertionPoint.default, {
|
|
270
|
+
scroll: scroll,
|
|
271
|
+
currentYPosition: currentYPosition,
|
|
272
|
+
isDragging: isDragging,
|
|
273
|
+
targetBlockIndex: targetBlockIndex
|
|
274
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Draggable, {
|
|
275
|
+
onDragStart: startDragging,
|
|
276
|
+
onDragOver: updateDragging,
|
|
277
|
+
onDragEnd: stopDragging,
|
|
278
|
+
testID: "block-draggable-wrapper",
|
|
279
|
+
children: children({
|
|
280
|
+
onScroll: scrollHandler
|
|
281
|
+
})
|
|
282
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
283
|
+
onLayout: onChipLayout,
|
|
284
|
+
style: chipStyles,
|
|
285
|
+
pointerEvents: "none",
|
|
286
|
+
children: draggedBlockIcon && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
287
|
+
entering: _reactNativeReanimated.ZoomInEasyDown.duration(200),
|
|
288
|
+
exiting: exitingAnimation,
|
|
289
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_draggableChip.default, {
|
|
290
|
+
icon: draggedBlockIcon
|
|
291
|
+
})
|
|
292
|
+
})
|
|
293
|
+
})]
|
|
294
|
+
});
|
|
290
295
|
};
|
|
291
296
|
exports.BlockDraggableWrapper = BlockDraggableWrapper;
|
|
292
297
|
function useIsScreenReaderEnabled() {
|
|
@@ -402,7 +407,7 @@ const BlockDraggable = ({
|
|
|
402
407
|
isDraggable: false
|
|
403
408
|
});
|
|
404
409
|
}
|
|
405
|
-
return (0,
|
|
410
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.DraggableTrigger, {
|
|
406
411
|
id: draggingClientId || clientId,
|
|
407
412
|
enabled: enabled && canDragBlock,
|
|
408
413
|
minDuration: _element.Platform.select({
|
|
@@ -414,12 +419,14 @@ const BlockDraggable = ({
|
|
|
414
419
|
android: DEFAULT_LONG_PRESS_MIN_DURATION
|
|
415
420
|
}),
|
|
416
421
|
onLongPress: onLongPressDraggable,
|
|
417
|
-
testID: testID
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
422
|
+
testID: testID,
|
|
423
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
424
|
+
style: wrapperStyles,
|
|
425
|
+
children: children({
|
|
426
|
+
isDraggable: true
|
|
427
|
+
})
|
|
428
|
+
})
|
|
429
|
+
});
|
|
423
430
|
};
|
|
424
431
|
var _default = exports.default = BlockDraggable;
|
|
425
432
|
//# sourceMappingURL=index.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_reactNativeSafeAreaContext","_reactNativeReanimated","_interopRequireWildcard","_components","_data","_element","_blocks","_reactNativeBridge","_reactNativeAztec","_interopRequireDefault","_useScrollWhenDragging","_draggableChip","_store","_droppingInsertionPoint","_useBlockDropZone","_style","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","CHIP_OFFSET_TO_TOUCH_POSITION","BLOCK_OPACITY_ANIMATION_CONFIG","duration","BLOCK_OPACITY_ANIMATION_DELAY","DEFAULT_LONG_PRESS_MIN_DURATION","DEFAULT_IOS_LONG_PRESS_MIN_DURATION","BlockDraggableWrapper","children","isRTL","draggedBlockIcon","setDraggedBlockIcon","useState","selectBlock","startDraggingBlocks","stopDraggingBlocks","useDispatch","blockEditorStore","left","right","useSafeAreaInsets","width","useSafeAreaFrame","safeAreaOffset","contentWidth","scroll","offsetY","useSharedValue","chip","x","y","height","currentYPosition","isDragging","startScrolling","scrollOnDragOver","stopScrolling","draggingScrollHandler","useScrollWhenDragging","scrollHandler","event","contentOffset","value","onBlockDragOverWorklet","onBlockDragEnd","onBlockDrop","targetBlockIndex","useBlockDropZone","useEffect","setDraggedBlockIconByClientId","clientId","blockName","select","getBlockName","blockIcon","getBlockType","icon","onStartDragging","position","runOnUI","generateHapticFeedback","stopDragging","onStopDragging","srcRootClientId","srcClientIds","type","undefined","onChipLayout","nativeEvent","layout","startDragging","id","dragPosition","runOnJS","updateDragging","chipDynamicStyles","useAnimatedStyle","chipOffset","translateX","transform","translateY","chipStyles","styles","exitingAnimation","currentHeight","currentWidth","animations","withTiming","scale","initialValues","_react","createElement","Fragment","Draggable","onDragStart","onDragOver","onDragEnd","testID","onScroll","View","onLayout","style","pointerEvents","entering","ZoomInEasyDown","exiting","exports","useIsScreenReaderEnabled","isScreenReaderEnabled","setIsScreenReaderEnabled","mounted","changeListener","AccessibilityInfo","addEventListener","enabled","then","screenReaderEnabled","remove","useIsEditingText","isEditingText","setIsEditingText","RCTAztecView","InputState","isFocused","onFocusChangeAztec","addFocusChangeListener","removeFocusChangeListener","BlockDraggable","draggingClientId","wasBeingDragged","useRef","draggingAnimation","opacity","startDraggingBlock","stopDraggingBlock","withDelay","isDraggable","isBeingDragged","isBlockSelected","useSelect","_select","getBlockRootClientId","getTemplateLock","isBlockBeingDragged","getSelectedBlockClientId","rootClientId","templateLock","selectedBlockClientId","current","onLongPressDraggable","useCallback","blurCurrentFocusedElement","animatedWrapperStyles","wrapperStyles","canDragBlock","DraggableTrigger","minDuration","Platform","ios","android","onLongPress","_default"],"sources":["@wordpress/block-editor/src/components/block-draggable/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { AccessibilityInfo } from 'react-native';\nimport {\n\tuseSafeAreaInsets,\n\tuseSafeAreaFrame,\n} from 'react-native-safe-area-context';\nimport Animated, {\n\trunOnJS,\n\trunOnUI,\n\tuseAnimatedStyle,\n\tuseSharedValue,\n\twithDelay,\n\twithTiming,\n\tZoomInEasyDown,\n} from 'react-native-reanimated';\n\n/**\n * WordPress dependencies\n */\nimport { Draggable, DraggableTrigger } from '@wordpress/components';\nimport { select, useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tuseCallback,\n\tuseEffect,\n\tuseRef,\n\tuseState,\n\tPlatform,\n} from '@wordpress/element';\nimport { getBlockType } from '@wordpress/blocks';\nimport { generateHapticFeedback } from '@wordpress/react-native-bridge';\nimport RCTAztecView from '@wordpress/react-native-aztec';\n\n/**\n * Internal dependencies\n */\nimport useScrollWhenDragging from './use-scroll-when-dragging';\nimport DraggableChip from './draggable-chip';\nimport { store as blockEditorStore } from '../../store';\nimport DroppingInsertionPoint from './dropping-insertion-point';\nimport useBlockDropZone from '../use-block-drop-zone';\nimport styles from './style.scss';\n\nconst CHIP_OFFSET_TO_TOUCH_POSITION = 32;\nconst BLOCK_OPACITY_ANIMATION_CONFIG = { duration: 350 };\nconst BLOCK_OPACITY_ANIMATION_DELAY = 250;\nconst DEFAULT_LONG_PRESS_MIN_DURATION = 500;\nconst DEFAULT_IOS_LONG_PRESS_MIN_DURATION =\n\tDEFAULT_LONG_PRESS_MIN_DURATION - 50;\n\n/**\n * Block draggable wrapper component\n *\n * This component handles all the interactions for dragging blocks.\n * It relies on the block list and its context for dragging, hence it\n * should be rendered between the `BlockListProvider` component and the\n * block list rendering. It also requires listening to scroll events,\n * therefore for this purpose, it returns the `onScroll` event handler\n * that should be attached to the list that renders the blocks.\n *\n *\n * @param {Object} props Component props.\n * @param {JSX.Element} props.children Children to be rendered.\n * @param {boolean} props.isRTL Check if current locale is RTL.\n *\n * @return {Function} Render function that passes `onScroll` event handler.\n */\nconst BlockDraggableWrapper = ( { children, isRTL } ) => {\n\tconst [ draggedBlockIcon, setDraggedBlockIcon ] = useState();\n\n\tconst { selectBlock, startDraggingBlocks, stopDraggingBlocks } =\n\t\tuseDispatch( blockEditorStore );\n\n\tconst { left, right } = useSafeAreaInsets();\n\tconst { width } = useSafeAreaFrame();\n\tconst safeAreaOffset = left + right;\n\tconst contentWidth = width - safeAreaOffset;\n\n\tconst scroll = {\n\t\toffsetY: useSharedValue( 0 ),\n\t};\n\tconst chip = {\n\t\tx: useSharedValue( 0 ),\n\t\ty: useSharedValue( 0 ),\n\t\twidth: useSharedValue( 0 ),\n\t\theight: useSharedValue( 0 ),\n\t};\n\tconst currentYPosition = useSharedValue( 0 );\n\tconst isDragging = useSharedValue( false );\n\n\tconst [\n\t\tstartScrolling,\n\t\tscrollOnDragOver,\n\t\tstopScrolling,\n\t\tdraggingScrollHandler,\n\t] = useScrollWhenDragging();\n\n\tconst scrollHandler = ( event ) => {\n\t\t'worklet';\n\t\tconst { contentOffset } = event;\n\t\tscroll.offsetY.value = contentOffset.y;\n\n\t\tdraggingScrollHandler( event );\n\t};\n\n\tconst {\n\t\tonBlockDragOverWorklet,\n\t\tonBlockDragEnd,\n\t\tonBlockDrop,\n\t\ttargetBlockIndex,\n\t} = useBlockDropZone();\n\n\t// Stop dragging blocks if the block draggable is unmounted.\n\tuseEffect( () => {\n\t\treturn () => {\n\t\t\tif ( isDragging.value ) {\n\t\t\t\tstopDraggingBlocks();\n\t\t\t}\n\t\t};\n\t}, [] );\n\n\tconst setDraggedBlockIconByClientId = ( clientId ) => {\n\t\tconst blockName = select( blockEditorStore ).getBlockName( clientId );\n\t\tconst blockIcon = getBlockType( blockName )?.icon;\n\t\tif ( blockIcon ) {\n\t\t\tsetDraggedBlockIcon( blockIcon );\n\t\t}\n\t};\n\n\tconst onStartDragging = ( { clientId, position } ) => {\n\t\tif ( clientId ) {\n\t\t\tstartDraggingBlocks( [ clientId ] );\n\t\t\tsetDraggedBlockIconByClientId( clientId );\n\t\t\trunOnUI( startScrolling )( position.y );\n\t\t\tgenerateHapticFeedback();\n\t\t} else {\n\t\t\t// We stop dragging if no block is found.\n\t\t\trunOnUI( stopDragging )();\n\t\t}\n\t};\n\n\tconst onStopDragging = ( { clientId } ) => {\n\t\tif ( clientId ) {\n\t\t\tonBlockDrop( {\n\t\t\t\t// Dropping is only allowed at root level\n\t\t\t\tsrcRootClientId: '',\n\t\t\t\tsrcClientIds: [ clientId ],\n\t\t\t\ttype: 'block',\n\t\t\t} );\n\t\t\tselectBlock( clientId );\n\t\t\tsetDraggedBlockIcon( undefined );\n\t\t}\n\t\tonBlockDragEnd();\n\t\tstopDraggingBlocks();\n\t};\n\n\tconst onChipLayout = ( { nativeEvent: { layout } } ) => {\n\t\tif ( layout.width > 0 ) {\n\t\t\tchip.width.value = layout.width;\n\t\t}\n\t\tif ( layout.height > 0 ) {\n\t\t\tchip.height.value = layout.height;\n\t\t}\n\t};\n\n\tconst startDragging = ( { x, y, id } ) => {\n\t\t'worklet';\n\t\tconst dragPosition = { x, y };\n\t\tchip.x.value = dragPosition.x;\n\t\tchip.y.value = dragPosition.y;\n\t\tcurrentYPosition.value = dragPosition.y;\n\n\t\tisDragging.value = true;\n\n\t\trunOnJS( onStartDragging )( { clientId: id, position: dragPosition } );\n\t};\n\n\tconst updateDragging = ( { x, y } ) => {\n\t\t'worklet';\n\t\tconst dragPosition = { x, y };\n\t\tchip.x.value = dragPosition.x;\n\t\tchip.y.value = dragPosition.y;\n\t\tcurrentYPosition.value = dragPosition.y;\n\n\t\tonBlockDragOverWorklet( { x, y: y + scroll.offsetY.value } );\n\n\t\t// Update scrolling velocity\n\t\tscrollOnDragOver( dragPosition.y );\n\t};\n\n\tconst stopDragging = ( { id } ) => {\n\t\t'worklet';\n\t\tisDragging.value = false;\n\n\t\tstopScrolling();\n\t\trunOnJS( onStopDragging )( { clientId: id } );\n\t};\n\n\tconst chipDynamicStyles = useAnimatedStyle( () => {\n\t\tconst chipOffset = chip.width.value / 2;\n\t\tconst translateX = ! isRTL\n\t\t\t? chip.x.value - chipOffset\n\t\t\t: -( contentWidth - ( chip.x.value + chipOffset ) );\n\n\t\treturn {\n\t\t\ttransform: [\n\t\t\t\t{\n\t\t\t\t\ttranslateX,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttranslateY:\n\t\t\t\t\t\tchip.y.value -\n\t\t\t\t\t\tchip.height.value -\n\t\t\t\t\t\tCHIP_OFFSET_TO_TOUCH_POSITION,\n\t\t\t\t},\n\t\t\t],\n\t\t};\n\t} );\n\tconst chipStyles = [\n\t\tchipDynamicStyles,\n\t\tstyles[ 'draggable-chip__wrapper' ],\n\t];\n\n\tconst exitingAnimation = ( { currentHeight, currentWidth } ) => {\n\t\t'worklet';\n\t\tconst translateX = ! isRTL ? 0 : currentWidth * -1;\n\t\tconst duration = 150;\n\t\tconst animations = {\n\t\t\ttransform: [\n\t\t\t\t{\n\t\t\t\t\ttranslateY: withTiming( currentHeight, {\n\t\t\t\t\t\tduration,\n\t\t\t\t\t} ),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttranslateX: withTiming( translateX, {\n\t\t\t\t\t\tduration,\n\t\t\t\t\t} ),\n\t\t\t\t},\n\t\t\t\t{ scale: withTiming( 0, { duration } ) },\n\t\t\t],\n\t\t};\n\t\tconst initialValues = {\n\t\t\ttransform: [ { translateY: 0 }, { translateX }, { scale: 1 } ],\n\t\t};\n\t\treturn {\n\t\t\tinitialValues,\n\t\t\tanimations,\n\t\t};\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<DroppingInsertionPoint\n\t\t\t\tscroll={ scroll }\n\t\t\t\tcurrentYPosition={ currentYPosition }\n\t\t\t\tisDragging={ isDragging }\n\t\t\t\ttargetBlockIndex={ targetBlockIndex }\n\t\t\t/>\n\t\t\t<Draggable\n\t\t\t\tonDragStart={ startDragging }\n\t\t\t\tonDragOver={ updateDragging }\n\t\t\t\tonDragEnd={ stopDragging }\n\t\t\t\ttestID=\"block-draggable-wrapper\"\n\t\t\t>\n\t\t\t\t{ children( { onScroll: scrollHandler } ) }\n\t\t\t</Draggable>\n\t\t\t<Animated.View\n\t\t\t\tonLayout={ onChipLayout }\n\t\t\t\tstyle={ chipStyles }\n\t\t\t\tpointerEvents=\"none\"\n\t\t\t>\n\t\t\t\t{ draggedBlockIcon && (\n\t\t\t\t\t<Animated.View\n\t\t\t\t\t\tentering={ ZoomInEasyDown.duration( 200 ) }\n\t\t\t\t\t\texiting={ exitingAnimation }\n\t\t\t\t\t>\n\t\t\t\t\t\t<DraggableChip icon={ draggedBlockIcon } />\n\t\t\t\t\t</Animated.View>\n\t\t\t\t) }\n\t\t\t</Animated.View>\n\t\t</>\n\t);\n};\n\nfunction useIsScreenReaderEnabled() {\n\tconst [ isScreenReaderEnabled, setIsScreenReaderEnabled ] =\n\t\tuseState( false );\n\n\tuseEffect( () => {\n\t\tlet mounted = true;\n\n\t\tconst changeListener = AccessibilityInfo.addEventListener(\n\t\t\t'screenReaderChanged',\n\t\t\t( enabled ) => setIsScreenReaderEnabled( enabled )\n\t\t);\n\n\t\tAccessibilityInfo.isScreenReaderEnabled().then(\n\t\t\t( screenReaderEnabled ) => {\n\t\t\t\tif ( mounted && screenReaderEnabled ) {\n\t\t\t\t\tsetIsScreenReaderEnabled( screenReaderEnabled );\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\n\t\treturn () => {\n\t\t\tmounted = false;\n\n\t\t\tchangeListener.remove();\n\t\t};\n\t}, [] );\n\n\treturn isScreenReaderEnabled;\n}\n\nfunction useIsEditingText() {\n\tconst [ isEditingText, setIsEditingText ] = useState( () =>\n\t\tRCTAztecView.InputState.isFocused()\n\t);\n\n\tuseEffect( () => {\n\t\tconst onFocusChangeAztec = ( { isFocused } ) => {\n\t\t\tsetIsEditingText( isFocused );\n\t\t};\n\n\t\tRCTAztecView.InputState.addFocusChangeListener( onFocusChangeAztec );\n\n\t\treturn () => {\n\t\t\tRCTAztecView.InputState.removeFocusChangeListener(\n\t\t\t\tonFocusChangeAztec\n\t\t\t);\n\t\t};\n\t}, [] );\n\n\treturn isEditingText;\n}\n\n/**\n * Block draggable component\n *\n * This component serves for animating the block when it is being dragged.\n * Hence, it should be wrapped around the rendering of a block.\n *\n * @param {Object} props Component props.\n * @param {JSX.Element} props.children Children to be rendered.\n * @param {string} props.clientId Client id of the block.\n * @param {string} [props.draggingClientId] Client id to use for dragging. If not defined, the value from `clientId` will be used.\n * @param {boolean} [props.enabled] Enables the draggable trigger.\n * @param {string} [props.testID] Id used for querying the long-press gesture handler in tests.\n *\n * @return {Function} Render function which includes the parameter `isDraggable` to determine if the block can be dragged.\n */\nconst BlockDraggable = ( {\n\tclientId,\n\tchildren,\n\tdraggingClientId,\n\tenabled = true,\n\ttestID,\n} ) => {\n\tconst wasBeingDragged = useRef( false );\n\tconst isEditingText = useIsEditingText();\n\tconst isScreenReaderEnabled = useIsScreenReaderEnabled();\n\n\tconst draggingAnimation = {\n\t\topacity: useSharedValue( 1 ),\n\t};\n\n\tconst startDraggingBlock = () => {\n\t\tdraggingAnimation.opacity.value = withTiming(\n\t\t\t0.4,\n\t\t\tBLOCK_OPACITY_ANIMATION_CONFIG\n\t\t);\n\t};\n\n\tconst stopDraggingBlock = () => {\n\t\tdraggingAnimation.opacity.value = withDelay(\n\t\t\tBLOCK_OPACITY_ANIMATION_DELAY,\n\t\t\twithTiming( 1, BLOCK_OPACITY_ANIMATION_CONFIG )\n\t\t);\n\t};\n\n\tconst { isDraggable, isBeingDragged, isBlockSelected } = useSelect(\n\t\t( _select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockRootClientId,\n\t\t\t\tgetTemplateLock,\n\t\t\t\tisBlockBeingDragged,\n\t\t\t\tgetSelectedBlockClientId,\n\t\t\t} = _select( blockEditorStore );\n\t\t\tconst rootClientId = getBlockRootClientId( clientId );\n\t\t\tconst templateLock = rootClientId\n\t\t\t\t? getTemplateLock( rootClientId )\n\t\t\t\t: null;\n\t\t\tconst selectedBlockClientId = getSelectedBlockClientId();\n\n\t\t\treturn {\n\t\t\t\tisBeingDragged: isBlockBeingDragged( clientId ),\n\t\t\t\tisDraggable: 'all' !== templateLock,\n\t\t\t\tisBlockSelected:\n\t\t\t\t\tselectedBlockClientId && selectedBlockClientId === clientId,\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tuseEffect( () => {\n\t\tif ( isBeingDragged !== wasBeingDragged.current ) {\n\t\t\tif ( isBeingDragged ) {\n\t\t\t\tstartDraggingBlock();\n\t\t\t} else {\n\t\t\t\tstopDraggingBlock();\n\t\t\t}\n\t\t}\n\t\twasBeingDragged.current = isBeingDragged;\n\t}, [ isBeingDragged ] );\n\n\tconst onLongPressDraggable = useCallback( () => {\n\t\t// Ensure that no text input is focused when starting the dragging gesture in order to prevent conflicts with text editing.\n\t\tRCTAztecView.InputState.blurCurrentFocusedElement();\n\t}, [] );\n\n\tconst animatedWrapperStyles = useAnimatedStyle( () => {\n\t\treturn {\n\t\t\topacity: draggingAnimation.opacity.value,\n\t\t};\n\t} );\n\tconst wrapperStyles = [\n\t\tanimatedWrapperStyles,\n\t\tstyles[ 'draggable-wrapper__container' ],\n\t];\n\n\tconst canDragBlock =\n\t\tenabled &&\n\t\t! isScreenReaderEnabled &&\n\t\t( ! isBlockSelected || ! isEditingText );\n\n\tif ( ! isDraggable ) {\n\t\treturn children( { isDraggable: false } );\n\t}\n\n\treturn (\n\t\t<DraggableTrigger\n\t\t\tid={ draggingClientId || clientId }\n\t\t\tenabled={ enabled && canDragBlock }\n\t\t\tminDuration={ Platform.select( {\n\t\t\t\t// On iOS, using a lower min duration than the default\n\t\t\t\t// value prevents the long-press gesture from being\n\t\t\t\t// triggered in underneath elements. This is required to\n\t\t\t\t// prevent enabling text editing when dragging is available.\n\t\t\t\tios: canDragBlock\n\t\t\t\t\t? DEFAULT_IOS_LONG_PRESS_MIN_DURATION\n\t\t\t\t\t: DEFAULT_LONG_PRESS_MIN_DURATION,\n\t\t\t\tandroid: DEFAULT_LONG_PRESS_MIN_DURATION,\n\t\t\t} ) }\n\t\t\tonLongPress={ onLongPressDraggable }\n\t\t\ttestID={ testID }\n\t\t>\n\t\t\t<Animated.View style={ wrapperStyles }>\n\t\t\t\t{ children( { isDraggable: true } ) }\n\t\t\t</Animated.View>\n\t\t</DraggableTrigger>\n\t);\n};\n\nexport { BlockDraggableWrapper };\nexport default BlockDraggable;\n"],"mappings":";;;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,2BAAA,GAAAD,OAAA;AAIA,IAAAE,sBAAA,GAAAC,uBAAA,CAAAH,OAAA;AAaA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,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IAAAyB,QAAA,GAAAvD,OAAA,CAAAvH,OAAA,GAGa4I,cAAc","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_reactNativeSafeAreaContext","_reactNativeReanimated","_interopRequireWildcard","_components","_data","_element","_blocks","_reactNativeBridge","_reactNativeAztec","_interopRequireDefault","_useScrollWhenDragging","_draggableChip","_store","_droppingInsertionPoint","_useBlockDropZone","_style","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","CHIP_OFFSET_TO_TOUCH_POSITION","BLOCK_OPACITY_ANIMATION_CONFIG","duration","BLOCK_OPACITY_ANIMATION_DELAY","DEFAULT_LONG_PRESS_MIN_DURATION","DEFAULT_IOS_LONG_PRESS_MIN_DURATION","BlockDraggableWrapper","children","isRTL","draggedBlockIcon","setDraggedBlockIcon","useState","selectBlock","startDraggingBlocks","stopDraggingBlocks","useDispatch","blockEditorStore","left","right","useSafeAreaInsets","width","useSafeAreaFrame","safeAreaOffset","contentWidth","scroll","offsetY","useSharedValue","chip","x","y","height","currentYPosition","isDragging","startScrolling","scrollOnDragOver","stopScrolling","draggingScrollHandler","useScrollWhenDragging","scrollHandler","event","contentOffset","value","onBlockDragOverWorklet","onBlockDragEnd","onBlockDrop","targetBlockIndex","useBlockDropZone","useEffect","setDraggedBlockIconByClientId","clientId","blockName","select","getBlockName","blockIcon","getBlockType","icon","onStartDragging","position","runOnUI","generateHapticFeedback","stopDragging","onStopDragging","srcRootClientId","srcClientIds","type","undefined","onChipLayout","nativeEvent","layout","startDragging","id","dragPosition","runOnJS","updateDragging","chipDynamicStyles","useAnimatedStyle","chipOffset","translateX","transform","translateY","chipStyles","styles","exitingAnimation","currentHeight","currentWidth","animations","withTiming","scale","initialValues","jsxs","Fragment","jsx","Draggable","onDragStart","onDragOver","onDragEnd","testID","onScroll","View","onLayout","style","pointerEvents","entering","ZoomInEasyDown","exiting","exports","useIsScreenReaderEnabled","isScreenReaderEnabled","setIsScreenReaderEnabled","mounted","changeListener","AccessibilityInfo","addEventListener","enabled","then","screenReaderEnabled","remove","useIsEditingText","isEditingText","setIsEditingText","RCTAztecView","InputState","isFocused","onFocusChangeAztec","addFocusChangeListener","removeFocusChangeListener","BlockDraggable","draggingClientId","wasBeingDragged","useRef","draggingAnimation","opacity","startDraggingBlock","stopDraggingBlock","withDelay","isDraggable","isBeingDragged","isBlockSelected","useSelect","_select","getBlockRootClientId","getTemplateLock","isBlockBeingDragged","getSelectedBlockClientId","rootClientId","templateLock","selectedBlockClientId","current","onLongPressDraggable","useCallback","blurCurrentFocusedElement","animatedWrapperStyles","wrapperStyles","canDragBlock","DraggableTrigger","minDuration","Platform","ios","android","onLongPress","_default"],"sources":["@wordpress/block-editor/src/components/block-draggable/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { AccessibilityInfo } from 'react-native';\nimport {\n\tuseSafeAreaInsets,\n\tuseSafeAreaFrame,\n} from 'react-native-safe-area-context';\nimport Animated, {\n\trunOnJS,\n\trunOnUI,\n\tuseAnimatedStyle,\n\tuseSharedValue,\n\twithDelay,\n\twithTiming,\n\tZoomInEasyDown,\n} from 'react-native-reanimated';\n\n/**\n * WordPress dependencies\n */\nimport { Draggable, DraggableTrigger } from '@wordpress/components';\nimport { select, useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tuseCallback,\n\tuseEffect,\n\tuseRef,\n\tuseState,\n\tPlatform,\n} from '@wordpress/element';\nimport { getBlockType } from '@wordpress/blocks';\nimport { generateHapticFeedback } from '@wordpress/react-native-bridge';\nimport RCTAztecView from '@wordpress/react-native-aztec';\n\n/**\n * Internal dependencies\n */\nimport useScrollWhenDragging from './use-scroll-when-dragging';\nimport DraggableChip from './draggable-chip';\nimport { store as blockEditorStore } from '../../store';\nimport DroppingInsertionPoint from './dropping-insertion-point';\nimport useBlockDropZone from '../use-block-drop-zone';\nimport styles from './style.scss';\n\nconst CHIP_OFFSET_TO_TOUCH_POSITION = 32;\nconst BLOCK_OPACITY_ANIMATION_CONFIG = { duration: 350 };\nconst BLOCK_OPACITY_ANIMATION_DELAY = 250;\nconst DEFAULT_LONG_PRESS_MIN_DURATION = 500;\nconst DEFAULT_IOS_LONG_PRESS_MIN_DURATION =\n\tDEFAULT_LONG_PRESS_MIN_DURATION - 50;\n\n/**\n * Block draggable wrapper component\n *\n * This component handles all the interactions for dragging blocks.\n * It relies on the block list and its context for dragging, hence it\n * should be rendered between the `BlockListProvider` component and the\n * block list rendering. It also requires listening to scroll events,\n * therefore for this purpose, it returns the `onScroll` event handler\n * that should be attached to the list that renders the blocks.\n *\n *\n * @param {Object} props Component props.\n * @param {JSX.Element} props.children Children to be rendered.\n * @param {boolean} props.isRTL Check if current locale is RTL.\n *\n * @return {Function} Render function that passes `onScroll` event handler.\n */\nconst BlockDraggableWrapper = ( { children, isRTL } ) => {\n\tconst [ draggedBlockIcon, setDraggedBlockIcon ] = useState();\n\n\tconst { selectBlock, startDraggingBlocks, stopDraggingBlocks } =\n\t\tuseDispatch( blockEditorStore );\n\n\tconst { left, right } = useSafeAreaInsets();\n\tconst { width } = useSafeAreaFrame();\n\tconst safeAreaOffset = left + right;\n\tconst contentWidth = width - safeAreaOffset;\n\n\tconst scroll = {\n\t\toffsetY: useSharedValue( 0 ),\n\t};\n\tconst chip = {\n\t\tx: useSharedValue( 0 ),\n\t\ty: useSharedValue( 0 ),\n\t\twidth: useSharedValue( 0 ),\n\t\theight: useSharedValue( 0 ),\n\t};\n\tconst currentYPosition = useSharedValue( 0 );\n\tconst isDragging = useSharedValue( false );\n\n\tconst [\n\t\tstartScrolling,\n\t\tscrollOnDragOver,\n\t\tstopScrolling,\n\t\tdraggingScrollHandler,\n\t] = useScrollWhenDragging();\n\n\tconst scrollHandler = ( event ) => {\n\t\t'worklet';\n\t\tconst { contentOffset } = event;\n\t\tscroll.offsetY.value = contentOffset.y;\n\n\t\tdraggingScrollHandler( event );\n\t};\n\n\tconst {\n\t\tonBlockDragOverWorklet,\n\t\tonBlockDragEnd,\n\t\tonBlockDrop,\n\t\ttargetBlockIndex,\n\t} = useBlockDropZone();\n\n\t// Stop dragging blocks if the block draggable is unmounted.\n\tuseEffect( () => {\n\t\treturn () => {\n\t\t\tif ( isDragging.value ) {\n\t\t\t\tstopDraggingBlocks();\n\t\t\t}\n\t\t};\n\t}, [] );\n\n\tconst setDraggedBlockIconByClientId = ( clientId ) => {\n\t\tconst blockName = select( blockEditorStore ).getBlockName( clientId );\n\t\tconst blockIcon = getBlockType( blockName )?.icon;\n\t\tif ( blockIcon ) {\n\t\t\tsetDraggedBlockIcon( blockIcon );\n\t\t}\n\t};\n\n\tconst onStartDragging = ( { clientId, position } ) => {\n\t\tif ( clientId ) {\n\t\t\tstartDraggingBlocks( [ clientId ] );\n\t\t\tsetDraggedBlockIconByClientId( clientId );\n\t\t\trunOnUI( startScrolling )( position.y );\n\t\t\tgenerateHapticFeedback();\n\t\t} else {\n\t\t\t// We stop dragging if no block is found.\n\t\t\trunOnUI( stopDragging )();\n\t\t}\n\t};\n\n\tconst onStopDragging = ( { clientId } ) => {\n\t\tif ( clientId ) {\n\t\t\tonBlockDrop( {\n\t\t\t\t// Dropping is only allowed at root level\n\t\t\t\tsrcRootClientId: '',\n\t\t\t\tsrcClientIds: [ clientId ],\n\t\t\t\ttype: 'block',\n\t\t\t} );\n\t\t\tselectBlock( clientId );\n\t\t\tsetDraggedBlockIcon( undefined );\n\t\t}\n\t\tonBlockDragEnd();\n\t\tstopDraggingBlocks();\n\t};\n\n\tconst onChipLayout = ( { nativeEvent: { layout } } ) => {\n\t\tif ( layout.width > 0 ) {\n\t\t\tchip.width.value = layout.width;\n\t\t}\n\t\tif ( layout.height > 0 ) {\n\t\t\tchip.height.value = layout.height;\n\t\t}\n\t};\n\n\tconst startDragging = ( { x, y, id } ) => {\n\t\t'worklet';\n\t\tconst dragPosition = { x, y };\n\t\tchip.x.value = dragPosition.x;\n\t\tchip.y.value = dragPosition.y;\n\t\tcurrentYPosition.value = dragPosition.y;\n\n\t\tisDragging.value = true;\n\n\t\trunOnJS( onStartDragging )( { clientId: id, position: dragPosition } );\n\t};\n\n\tconst updateDragging = ( { x, y } ) => {\n\t\t'worklet';\n\t\tconst dragPosition = { x, y };\n\t\tchip.x.value = dragPosition.x;\n\t\tchip.y.value = dragPosition.y;\n\t\tcurrentYPosition.value = dragPosition.y;\n\n\t\tonBlockDragOverWorklet( { x, y: y + scroll.offsetY.value } );\n\n\t\t// Update scrolling velocity\n\t\tscrollOnDragOver( dragPosition.y );\n\t};\n\n\tconst stopDragging = ( { id } ) => {\n\t\t'worklet';\n\t\tisDragging.value = false;\n\n\t\tstopScrolling();\n\t\trunOnJS( onStopDragging )( { clientId: id } );\n\t};\n\n\tconst chipDynamicStyles = useAnimatedStyle( () => {\n\t\tconst chipOffset = chip.width.value / 2;\n\t\tconst translateX = ! isRTL\n\t\t\t? chip.x.value - chipOffset\n\t\t\t: -( contentWidth - ( chip.x.value + chipOffset ) );\n\n\t\treturn {\n\t\t\ttransform: [\n\t\t\t\t{\n\t\t\t\t\ttranslateX,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttranslateY:\n\t\t\t\t\t\tchip.y.value -\n\t\t\t\t\t\tchip.height.value -\n\t\t\t\t\t\tCHIP_OFFSET_TO_TOUCH_POSITION,\n\t\t\t\t},\n\t\t\t],\n\t\t};\n\t} );\n\tconst chipStyles = [\n\t\tchipDynamicStyles,\n\t\tstyles[ 'draggable-chip__wrapper' ],\n\t];\n\n\tconst exitingAnimation = ( { currentHeight, currentWidth } ) => {\n\t\t'worklet';\n\t\tconst translateX = ! isRTL ? 0 : currentWidth * -1;\n\t\tconst duration = 150;\n\t\tconst animations = {\n\t\t\ttransform: [\n\t\t\t\t{\n\t\t\t\t\ttranslateY: withTiming( currentHeight, {\n\t\t\t\t\t\tduration,\n\t\t\t\t\t} ),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttranslateX: withTiming( translateX, {\n\t\t\t\t\t\tduration,\n\t\t\t\t\t} ),\n\t\t\t\t},\n\t\t\t\t{ scale: withTiming( 0, { duration } ) },\n\t\t\t],\n\t\t};\n\t\tconst initialValues = {\n\t\t\ttransform: [ { translateY: 0 }, { translateX }, { scale: 1 } ],\n\t\t};\n\t\treturn {\n\t\t\tinitialValues,\n\t\t\tanimations,\n\t\t};\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<DroppingInsertionPoint\n\t\t\t\tscroll={ scroll }\n\t\t\t\tcurrentYPosition={ currentYPosition }\n\t\t\t\tisDragging={ isDragging }\n\t\t\t\ttargetBlockIndex={ targetBlockIndex }\n\t\t\t/>\n\t\t\t<Draggable\n\t\t\t\tonDragStart={ startDragging }\n\t\t\t\tonDragOver={ updateDragging }\n\t\t\t\tonDragEnd={ stopDragging }\n\t\t\t\ttestID=\"block-draggable-wrapper\"\n\t\t\t>\n\t\t\t\t{ children( { onScroll: scrollHandler } ) }\n\t\t\t</Draggable>\n\t\t\t<Animated.View\n\t\t\t\tonLayout={ onChipLayout }\n\t\t\t\tstyle={ chipStyles }\n\t\t\t\tpointerEvents=\"none\"\n\t\t\t>\n\t\t\t\t{ draggedBlockIcon && (\n\t\t\t\t\t<Animated.View\n\t\t\t\t\t\tentering={ ZoomInEasyDown.duration( 200 ) }\n\t\t\t\t\t\texiting={ exitingAnimation }\n\t\t\t\t\t>\n\t\t\t\t\t\t<DraggableChip icon={ draggedBlockIcon } />\n\t\t\t\t\t</Animated.View>\n\t\t\t\t) }\n\t\t\t</Animated.View>\n\t\t</>\n\t);\n};\n\nfunction useIsScreenReaderEnabled() {\n\tconst [ isScreenReaderEnabled, setIsScreenReaderEnabled ] =\n\t\tuseState( false );\n\n\tuseEffect( () => {\n\t\tlet mounted = true;\n\n\t\tconst changeListener = AccessibilityInfo.addEventListener(\n\t\t\t'screenReaderChanged',\n\t\t\t( enabled ) => setIsScreenReaderEnabled( enabled )\n\t\t);\n\n\t\tAccessibilityInfo.isScreenReaderEnabled().then(\n\t\t\t( screenReaderEnabled ) => {\n\t\t\t\tif ( mounted && screenReaderEnabled ) {\n\t\t\t\t\tsetIsScreenReaderEnabled( screenReaderEnabled );\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\n\t\treturn () => {\n\t\t\tmounted = false;\n\n\t\t\tchangeListener.remove();\n\t\t};\n\t}, [] );\n\n\treturn isScreenReaderEnabled;\n}\n\nfunction useIsEditingText() {\n\tconst [ isEditingText, setIsEditingText ] = useState( () =>\n\t\tRCTAztecView.InputState.isFocused()\n\t);\n\n\tuseEffect( () => {\n\t\tconst onFocusChangeAztec = ( { isFocused } ) => {\n\t\t\tsetIsEditingText( isFocused );\n\t\t};\n\n\t\tRCTAztecView.InputState.addFocusChangeListener( onFocusChangeAztec );\n\n\t\treturn () => {\n\t\t\tRCTAztecView.InputState.removeFocusChangeListener(\n\t\t\t\tonFocusChangeAztec\n\t\t\t);\n\t\t};\n\t}, [] );\n\n\treturn isEditingText;\n}\n\n/**\n * Block draggable component\n *\n * This component serves for animating the block when it is being dragged.\n * Hence, it should be wrapped around the rendering of a block.\n *\n * @param {Object} props Component props.\n * @param {JSX.Element} props.children Children to be rendered.\n * @param {string} props.clientId Client id of the block.\n * @param {string} [props.draggingClientId] Client id to use for dragging. If not defined, the value from `clientId` will be used.\n * @param {boolean} [props.enabled] Enables the draggable trigger.\n * @param {string} [props.testID] Id used for querying the long-press gesture handler in tests.\n *\n * @return {Function} Render function which includes the parameter `isDraggable` to determine if the block can be dragged.\n */\nconst BlockDraggable = ( {\n\tclientId,\n\tchildren,\n\tdraggingClientId,\n\tenabled = true,\n\ttestID,\n} ) => {\n\tconst wasBeingDragged = useRef( false );\n\tconst isEditingText = useIsEditingText();\n\tconst isScreenReaderEnabled = useIsScreenReaderEnabled();\n\n\tconst draggingAnimation = {\n\t\topacity: useSharedValue( 1 ),\n\t};\n\n\tconst startDraggingBlock = () => {\n\t\tdraggingAnimation.opacity.value = withTiming(\n\t\t\t0.4,\n\t\t\tBLOCK_OPACITY_ANIMATION_CONFIG\n\t\t);\n\t};\n\n\tconst stopDraggingBlock = () => {\n\t\tdraggingAnimation.opacity.value = withDelay(\n\t\t\tBLOCK_OPACITY_ANIMATION_DELAY,\n\t\t\twithTiming( 1, BLOCK_OPACITY_ANIMATION_CONFIG )\n\t\t);\n\t};\n\n\tconst { isDraggable, isBeingDragged, isBlockSelected } = useSelect(\n\t\t( _select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockRootClientId,\n\t\t\t\tgetTemplateLock,\n\t\t\t\tisBlockBeingDragged,\n\t\t\t\tgetSelectedBlockClientId,\n\t\t\t} = _select( blockEditorStore );\n\t\t\tconst rootClientId = getBlockRootClientId( clientId );\n\t\t\tconst templateLock = rootClientId\n\t\t\t\t? getTemplateLock( rootClientId )\n\t\t\t\t: null;\n\t\t\tconst selectedBlockClientId = getSelectedBlockClientId();\n\n\t\t\treturn {\n\t\t\t\tisBeingDragged: isBlockBeingDragged( clientId ),\n\t\t\t\tisDraggable: 'all' !== templateLock,\n\t\t\t\tisBlockSelected:\n\t\t\t\t\tselectedBlockClientId && selectedBlockClientId === clientId,\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tuseEffect( () => {\n\t\tif ( isBeingDragged !== wasBeingDragged.current ) {\n\t\t\tif ( isBeingDragged ) {\n\t\t\t\tstartDraggingBlock();\n\t\t\t} else {\n\t\t\t\tstopDraggingBlock();\n\t\t\t}\n\t\t}\n\t\twasBeingDragged.current = isBeingDragged;\n\t}, [ isBeingDragged ] );\n\n\tconst onLongPressDraggable = useCallback( () => {\n\t\t// Ensure that no text input is focused when starting the dragging gesture in order to prevent conflicts with text editing.\n\t\tRCTAztecView.InputState.blurCurrentFocusedElement();\n\t}, [] );\n\n\tconst animatedWrapperStyles = useAnimatedStyle( () => {\n\t\treturn {\n\t\t\topacity: draggingAnimation.opacity.value,\n\t\t};\n\t} );\n\tconst wrapperStyles = [\n\t\tanimatedWrapperStyles,\n\t\tstyles[ 'draggable-wrapper__container' ],\n\t];\n\n\tconst canDragBlock =\n\t\tenabled &&\n\t\t! isScreenReaderEnabled &&\n\t\t( ! isBlockSelected || ! isEditingText );\n\n\tif ( ! isDraggable ) {\n\t\treturn children( { isDraggable: false } );\n\t}\n\n\treturn (\n\t\t<DraggableTrigger\n\t\t\tid={ draggingClientId || clientId }\n\t\t\tenabled={ enabled && canDragBlock }\n\t\t\tminDuration={ Platform.select( {\n\t\t\t\t// On iOS, using a lower min duration than the default\n\t\t\t\t// value prevents the long-press gesture from being\n\t\t\t\t// triggered in underneath elements. This is required to\n\t\t\t\t// prevent enabling text editing when dragging is available.\n\t\t\t\tios: canDragBlock\n\t\t\t\t\t? DEFAULT_IOS_LONG_PRESS_MIN_DURATION\n\t\t\t\t\t: DEFAULT_LONG_PRESS_MIN_DURATION,\n\t\t\t\tandroid: DEFAULT_LONG_PRESS_MIN_DURATION,\n\t\t\t} ) }\n\t\t\tonLongPress={ onLongPressDraggable }\n\t\t\ttestID={ testID }\n\t\t>\n\t\t\t<Animated.View style={ wrapperStyles }>\n\t\t\t\t{ children( { isDraggable: true } ) }\n\t\t\t</Animated.View>\n\t\t</DraggableTrigger>\n\t);\n};\n\nexport { BlockDraggableWrapper };\nexport default BlockDraggable;\n"],"mappings":";;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,2BAAA,GAAAD,OAAA;AAIA,IAAAE,sBAAA,GAAAC,uBAAA,CAAAH,OAAA;AAaA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AAOA,IAAAO,OAAA,GAAAP,OAAA;AACA,IAAAQ,kBAAA,GAAAR,OAAA;AACA,IAAAS,iBAAA,GAAAC,sBAAA,CAAAV,OAAA;AAKA,IAAAW,sBAAA,GAAAD,sBAAA,CAAAV,OAAA;AACA,IAAAY,cAAA,GAAAF,sBAAA,CAAAV,OAAA;AACA,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[]}
|
|
@@ -5,12 +5,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _react = require("react");
|
|
9
8
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
10
9
|
var _components = require("@wordpress/components");
|
|
11
10
|
var _blocks = require("@wordpress/blocks");
|
|
12
11
|
var _element = require("@wordpress/element");
|
|
13
12
|
var _blockContext = _interopRequireDefault(require("../block-context"));
|
|
13
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
14
|
/**
|
|
15
15
|
* External dependencies
|
|
16
16
|
*/
|
|
@@ -30,8 +30,7 @@ var _blockContext = _interopRequireDefault(require("../block-context"));
|
|
|
30
30
|
* and in order to avoid unnecessary React reconciliations of a changing object.
|
|
31
31
|
*
|
|
32
32
|
* @type {{}}
|
|
33
|
-
*/
|
|
34
|
-
const DEFAULT_BLOCK_CONTEXT = {};
|
|
33
|
+
*/const DEFAULT_BLOCK_CONTEXT = {};
|
|
35
34
|
const Edit = props => {
|
|
36
35
|
const {
|
|
37
36
|
name
|
|
@@ -45,7 +44,7 @@ const Edit = props => {
|
|
|
45
44
|
// with which a block is displayed. If `blockType` is valid, assign
|
|
46
45
|
// them preferentially as the render value for the block.
|
|
47
46
|
const Component = blockType.edit || blockType.save;
|
|
48
|
-
return (0,
|
|
47
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
|
|
49
48
|
...props
|
|
50
49
|
});
|
|
51
50
|
};
|
|
@@ -66,7 +65,7 @@ const EditWithGeneratedProps = props => {
|
|
|
66
65
|
return null;
|
|
67
66
|
}
|
|
68
67
|
if (blockType.apiVersion > 1) {
|
|
69
|
-
return (0,
|
|
68
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(EditWithFilters, {
|
|
70
69
|
...props,
|
|
71
70
|
context: context
|
|
72
71
|
});
|
|
@@ -75,7 +74,7 @@ const EditWithGeneratedProps = props => {
|
|
|
75
74
|
// Generate a class name for the block's editable form.
|
|
76
75
|
const generatedClassName = (0, _blocks.hasBlockSupport)(blockType, 'className', true) ? (0, _blocks.getBlockDefaultClassName)(name) : null;
|
|
77
76
|
const className = (0, _clsx.default)(generatedClassName, attributes.className, props.className);
|
|
78
|
-
return (0,
|
|
77
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(EditWithFilters, {
|
|
79
78
|
...props,
|
|
80
79
|
context: context,
|
|
81
80
|
className: className
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_clsx","_interopRequireDefault","require","_components","_blocks","_element","_blockContext","DEFAULT_BLOCK_CONTEXT","Edit","props","name","blockType","getBlockType","Component","edit","save","
|
|
1
|
+
{"version":3,"names":["_clsx","_interopRequireDefault","require","_components","_blocks","_element","_blockContext","_jsxRuntime","DEFAULT_BLOCK_CONTEXT","Edit","props","name","blockType","getBlockType","Component","edit","save","jsx","EditWithFilters","withFilters","EditWithGeneratedProps","attributes","blockContext","useContext","BlockContext","context","useMemo","usesContext","Object","fromEntries","entries","filter","key","includes","apiVersion","generatedClassName","hasBlockSupport","getBlockDefaultClassName","className","clsx","_default","exports","default"],"sources":["@wordpress/block-editor/src/components/block-edit/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { withFilters } from '@wordpress/components';\nimport {\n\tgetBlockDefaultClassName,\n\thasBlockSupport,\n\tgetBlockType,\n} from '@wordpress/blocks';\nimport { useContext, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BlockContext from '../block-context';\n\n/**\n * Default value used for blocks which do not define their own context needs,\n * used to guarantee that a block's `context` prop will always be an object. It\n * is assigned as a constant since it is always expected to be an empty object,\n * and in order to avoid unnecessary React reconciliations of a changing object.\n *\n * @type {{}}\n */\nconst DEFAULT_BLOCK_CONTEXT = {};\n\nconst Edit = ( props ) => {\n\tconst { name } = props;\n\tconst blockType = getBlockType( name );\n\n\tif ( ! blockType ) {\n\t\treturn null;\n\t}\n\n\t// `edit` and `save` are functions or components describing the markup\n\t// with which a block is displayed. If `blockType` is valid, assign\n\t// them preferentially as the render value for the block.\n\tconst Component = blockType.edit || blockType.save;\n\n\treturn <Component { ...props } />;\n};\n\nconst EditWithFilters = withFilters( 'editor.BlockEdit' )( Edit );\n\nconst EditWithGeneratedProps = ( props ) => {\n\tconst { attributes = {}, name } = props;\n\tconst blockType = getBlockType( name );\n\tconst blockContext = useContext( BlockContext );\n\n\t// Assign context values using the block type's declared context needs.\n\tconst context = useMemo( () => {\n\t\treturn blockType && blockType.usesContext\n\t\t\t? Object.fromEntries(\n\t\t\t\t\tObject.entries( blockContext ).filter( ( [ key ] ) =>\n\t\t\t\t\t\tblockType.usesContext.includes( key )\n\t\t\t\t\t)\n\t\t\t )\n\t\t\t: DEFAULT_BLOCK_CONTEXT;\n\t}, [ blockType, blockContext ] );\n\n\tif ( ! blockType ) {\n\t\treturn null;\n\t}\n\n\tif ( blockType.apiVersion > 1 ) {\n\t\treturn <EditWithFilters { ...props } context={ context } />;\n\t}\n\n\t// Generate a class name for the block's editable form.\n\tconst generatedClassName = hasBlockSupport( blockType, 'className', true )\n\t\t? getBlockDefaultClassName( name )\n\t\t: null;\n\tconst className = clsx(\n\t\tgeneratedClassName,\n\t\tattributes.className,\n\t\tprops.className\n\t);\n\n\treturn (\n\t\t<EditWithFilters\n\t\t\t{ ...props }\n\t\t\tcontext={ context }\n\t\t\tclassName={ className }\n\t\t/>\n\t);\n};\n\nexport default EditWithGeneratedProps;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAKA,IAAAG,QAAA,GAAAH,OAAA;AAKA,IAAAI,aAAA,GAAAL,sBAAA,CAAAC,OAAA;AAA4C,IAAAK,WAAA,GAAAL,OAAA;AAnB5C;AACA;AACA;;AA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SAAS,CAACsB,UAAU,GAAG,CAAC,EAAG;IAC/B,oBAAO,IAAA3B,WAAA,CAAAU,GAAA,EAACC,eAAe;MAAA,GAAMR,KAAK;MAAGe,OAAO,EAAGA;IAAS,CAAE,CAAC;EAC5D;;EAEA;EACA,MAAMU,kBAAkB,GAAG,IAAAC,uBAAe,EAAExB,SAAS,EAAE,WAAW,EAAE,IAAK,CAAC,GACvE,IAAAyB,gCAAwB,EAAE1B,IAAK,CAAC,GAChC,IAAI;EACP,MAAM2B,SAAS,GAAG,IAAAC,aAAI,EACrBJ,kBAAkB,EAClBd,UAAU,CAACiB,SAAS,EACpB5B,KAAK,CAAC4B,SACP,CAAC;EAED,oBACC,IAAA/B,WAAA,CAAAU,GAAA,EAACC,eAAe;IAAA,GACVR,KAAK;IACVe,OAAO,EAAGA,OAAS;IACnBa,SAAS,EAAGA;EAAW,CACvB,CAAC;AAEJ,CAAC;AAAC,IAAAE,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEatB,sBAAsB","ignoreList":[]}
|
|
@@ -5,11 +5,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = exports.Edit = void 0;
|
|
8
|
-
var _react = require("react");
|
|
9
8
|
var _components = require("@wordpress/components");
|
|
10
9
|
var _blocks = require("@wordpress/blocks");
|
|
11
10
|
var _element = require("@wordpress/element");
|
|
12
11
|
var _blockContext = _interopRequireDefault(require("../block-context"));
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
13
|
/**
|
|
14
14
|
* WordPress dependencies
|
|
15
15
|
*/
|
|
@@ -25,8 +25,7 @@ var _blockContext = _interopRequireDefault(require("../block-context"));
|
|
|
25
25
|
* and in order to avoid unnecessary React reconciliations of a changing object.
|
|
26
26
|
*
|
|
27
27
|
* @type {{}}
|
|
28
|
-
*/
|
|
29
|
-
const DEFAULT_BLOCK_CONTEXT = {};
|
|
28
|
+
*/const DEFAULT_BLOCK_CONTEXT = {};
|
|
30
29
|
const Edit = props => {
|
|
31
30
|
const {
|
|
32
31
|
name
|
|
@@ -42,7 +41,7 @@ const Edit = props => {
|
|
|
42
41
|
return null;
|
|
43
42
|
}
|
|
44
43
|
const Component = blockType.edit;
|
|
45
|
-
return (0,
|
|
44
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
|
|
46
45
|
...props,
|
|
47
46
|
context: context
|
|
48
47
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","_blocks","_element","_blockContext","_interopRequireDefault","DEFAULT_BLOCK_CONTEXT","Edit","props","name","blockType","getBlockType","blockContext","useContext","BlockContext","context","useMemo","usesContext","Object","fromEntries","entries","filter","key","includes","Component","edit","
|
|
1
|
+
{"version":3,"names":["_components","require","_blocks","_element","_blockContext","_interopRequireDefault","_jsxRuntime","DEFAULT_BLOCK_CONTEXT","Edit","props","name","blockType","getBlockType","blockContext","useContext","BlockContext","context","useMemo","usesContext","Object","fromEntries","entries","filter","key","includes","Component","edit","jsx","exports","_default","default","withFilters"],"sources":["@wordpress/block-editor/src/components/block-edit/edit.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { withFilters } from '@wordpress/components';\nimport { getBlockType } from '@wordpress/blocks';\nimport { useContext, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BlockContext from '../block-context';\n\n/**\n * Default value used for blocks which do not define their own context needs,\n * used to guarantee that a block's `context` prop will always be an object. It\n * is assigned as a constant since it is always expected to be an empty object,\n * and in order to avoid unnecessary React reconciliations of a changing object.\n *\n * @type {{}}\n */\nconst DEFAULT_BLOCK_CONTEXT = {};\n\nexport const Edit = ( props ) => {\n\tconst { name } = props;\n\tconst blockType = getBlockType( name );\n\n\tconst blockContext = useContext( BlockContext );\n\n\t// Assign context values using the block type's declared context needs.\n\tconst context = useMemo( () => {\n\t\treturn blockType && blockType.usesContext\n\t\t\t? Object.fromEntries(\n\t\t\t\t\tObject.entries( blockContext ).filter( ( [ key ] ) =>\n\t\t\t\t\t\tblockType.usesContext.includes( key )\n\t\t\t\t\t)\n\t\t\t )\n\t\t\t: DEFAULT_BLOCK_CONTEXT;\n\t}, [ blockType, blockContext ] );\n\n\tif ( ! blockType ) {\n\t\treturn null;\n\t}\n\n\tconst Component = blockType.edit;\n\n\treturn <Component { ...props } context={ context } />;\n};\n\nexport default withFilters( 'editor.BlockEdit' )( Edit );\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAKA,IAAAG,aAAA,GAAAC,sBAAA,CAAAJ,OAAA;AAA4C,IAAAK,WAAA,GAAAL,OAAA;AAV5C;AACA;AACA;;AAKA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACA,MAAMM,qBAAqB,GAAG,CAAC,CAAC;AAEzB,MAAMC,IAAI,GAAKC,KAAK,IAAM;EAChC,MAAM;IAAEC;EAAK,CAAC,GAAGD,KAAK;EACtB,MAAME,SAAS,GAAG,IAAAC,oBAAY,EAAEF,IAAK,CAAC;EAEtC,MAAMG,YAAY,GAAG,IAAAC,mBAAU,EAAEC,qBAAa,CAAC;;EAE/C;EACA,MAAMC,OAAO,GAAG,IAAAC,gBAAO,EAAE,MAAM;IAC9B,OAAON,SAAS,IAAIA,SAAS,CAACO,WAAW,GACtCC,MAAM,CAACC,WAAW,CAClBD,MAAM,CAACE,OAAO,CAAER,YAAa,CAAC,CAACS,MAAM,CAAE,CAAE,CAAEC,GAAG,CAAE,KAC/CZ,SAAS,CAACO,WAAW,CAACM,QAAQ,CAAED,GAAI,CACrC,CACA,CAAC,GACDhB,qBAAqB;EACzB,CAAC,EAAE,CAAEI,SAAS,EAAEE,YAAY,CAAG,CAAC;EAEhC,IAAK,CAAEF,SAAS,EAAG;IAClB,OAAO,IAAI;EACZ;EAEA,MAAMc,SAAS,GAAGd,SAAS,CAACe,IAAI;EAEhC,oBAAO,IAAApB,WAAA,CAAAqB,GAAA,EAACF,SAAS;IAAA,GAAMhB,KAAK;IAAGO,OAAO,EAAGA;EAAS,CAAE,CAAC;AACtD,CAAC;AAACY,OAAA,CAAApB,IAAA,GAAAA,IAAA;AAAA,IAAAqB,QAAA,GAAAD,OAAA,CAAAE,OAAA,GAEa,IAAAC,uBAAW,EAAE,kBAAmB,CAAC,CAAEvB,IAAK,CAAC","ignoreList":[]}
|
|
@@ -11,11 +11,13 @@ Object.defineProperty(exports, "useBlockEditContext", {
|
|
|
11
11
|
return _context.useBlockEditContext;
|
|
12
12
|
}
|
|
13
13
|
});
|
|
14
|
-
var _react = require("react");
|
|
15
14
|
var _element = require("@wordpress/element");
|
|
16
15
|
var _blocks = require("@wordpress/blocks");
|
|
17
16
|
var _edit = _interopRequireDefault(require("./edit"));
|
|
18
17
|
var _context = require("./context");
|
|
18
|
+
var _multipleUsageWarning = require("./multiple-usage-warning");
|
|
19
|
+
var _privateBlockContext = require("../block-list/private-block-context");
|
|
20
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
21
|
/**
|
|
20
22
|
* WordPress dependencies
|
|
21
23
|
*/
|
|
@@ -31,9 +33,7 @@ var _context = require("./context");
|
|
|
31
33
|
* but don't want to rely on the data getting passed in as a parameter.
|
|
32
34
|
*
|
|
33
35
|
* @return {Object} Block edit context
|
|
34
|
-
*/
|
|
35
|
-
|
|
36
|
-
function BlockEdit({
|
|
36
|
+
*/function BlockEdit({
|
|
37
37
|
mayDisplayControls,
|
|
38
38
|
mayDisplayParentControls,
|
|
39
39
|
blockEditingMode,
|
|
@@ -57,7 +57,10 @@ function BlockEdit({
|
|
|
57
57
|
bindings
|
|
58
58
|
} = metadata;
|
|
59
59
|
const layoutSupport = (0, _blocks.hasBlockSupport)(name, 'layout', false) || (0, _blocks.hasBlockSupport)(name, '__experimentalLayout', false);
|
|
60
|
-
|
|
60
|
+
const {
|
|
61
|
+
originalBlockClientId
|
|
62
|
+
} = (0, _element.useContext)(_privateBlockContext.PrivateBlockContext);
|
|
63
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_context.BlockEditContextProvider
|
|
61
64
|
// It is important to return the same object if props haven't
|
|
62
65
|
// changed to avoid unnecessary rerenders.
|
|
63
66
|
// See https://reactjs.org/docs/context.html#caveats.
|
|
@@ -75,9 +78,14 @@ function BlockEdit({
|
|
|
75
78
|
[_context.blockEditingModeKey]: blockEditingMode,
|
|
76
79
|
[_context.blockBindingsKey]: bindings,
|
|
77
80
|
[_context.isPreviewModeKey]: isPreviewMode
|
|
78
|
-
}), [name, isSelected, clientId, layoutSupport, layout, __unstableLayoutClassNames, mayDisplayControls, mayDisplayParentControls, blockEditingMode, bindings, isPreviewMode])
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
81
|
+
}), [name, isSelected, clientId, layoutSupport, layout, __unstableLayoutClassNames, mayDisplayControls, mayDisplayParentControls, blockEditingMode, bindings, isPreviewMode]),
|
|
82
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_edit.default, {
|
|
83
|
+
...props
|
|
84
|
+
}), originalBlockClientId && /*#__PURE__*/(0, _jsxRuntime.jsx)(_multipleUsageWarning.MultipleUsageWarning, {
|
|
85
|
+
originalBlockClientId: originalBlockClientId,
|
|
86
|
+
name: name,
|
|
87
|
+
onReplace: props.onReplace
|
|
88
|
+
})]
|
|
89
|
+
});
|
|
82
90
|
}
|
|
83
91
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_element","require","_blocks","_edit","_interopRequireDefault","_context","BlockEdit","mayDisplayControls","mayDisplayParentControls","blockEditingMode","isPreviewMode","props","name","isSelected","clientId","attributes","__unstableLayoutClassNames","layout","metadata","bindings","layoutSupport","hasBlockSupport","
|
|
1
|
+
{"version":3,"names":["_element","require","_blocks","_edit","_interopRequireDefault","_context","_multipleUsageWarning","_privateBlockContext","_jsxRuntime","BlockEdit","mayDisplayControls","mayDisplayParentControls","blockEditingMode","isPreviewMode","props","name","isSelected","clientId","attributes","__unstableLayoutClassNames","layout","metadata","bindings","layoutSupport","hasBlockSupport","originalBlockClientId","useContext","PrivateBlockContext","jsxs","BlockEditContextProvider","value","useMemo","mayDisplayControlsKey","mayDisplayParentControlsKey","blockEditingModeKey","blockBindingsKey","isPreviewModeKey","children","jsx","default","MultipleUsageWarning","onReplace"],"sources":["@wordpress/block-editor/src/components/block-edit/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo, useContext } from '@wordpress/element';\nimport { hasBlockSupport } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport Edit from './edit';\nimport {\n\tBlockEditContextProvider,\n\tuseBlockEditContext,\n\tmayDisplayControlsKey,\n\tmayDisplayParentControlsKey,\n\tblockEditingModeKey,\n\tblockBindingsKey,\n\tisPreviewModeKey,\n} from './context';\nimport { MultipleUsageWarning } from './multiple-usage-warning';\nimport { PrivateBlockContext } from '../block-list/private-block-context';\n\n/**\n * The `useBlockEditContext` hook provides information about the block this hook is being used in.\n * It returns an object with the `name`, `isSelected` state, and the `clientId` of the block.\n * It is useful if you want to create custom hooks that need access to the current blocks clientId\n * but don't want to rely on the data getting passed in as a parameter.\n *\n * @return {Object} Block edit context\n */\nexport { useBlockEditContext };\n\nexport default function BlockEdit( {\n\tmayDisplayControls,\n\tmayDisplayParentControls,\n\tblockEditingMode,\n\tisPreviewMode,\n\t// The remaining props are passed through the BlockEdit filters and are thus\n\t// public API!\n\t...props\n} ) {\n\tconst {\n\t\tname,\n\t\tisSelected,\n\t\tclientId,\n\t\tattributes = {},\n\t\t__unstableLayoutClassNames,\n\t} = props;\n\tconst { layout = null, metadata = {} } = attributes;\n\tconst { bindings } = metadata;\n\tconst layoutSupport =\n\t\thasBlockSupport( name, 'layout', false ) ||\n\t\thasBlockSupport( name, '__experimentalLayout', false );\n\tconst { originalBlockClientId } = useContext( PrivateBlockContext );\n\n\treturn (\n\t\t<BlockEditContextProvider\n\t\t\t// It is important to return the same object if props haven't\n\t\t\t// changed to avoid unnecessary rerenders.\n\t\t\t// See https://reactjs.org/docs/context.html#caveats.\n\t\t\tvalue={ useMemo(\n\t\t\t\t() => ( {\n\t\t\t\t\tname,\n\t\t\t\t\tisSelected,\n\t\t\t\t\tclientId,\n\t\t\t\t\tlayout: layoutSupport ? layout : null,\n\t\t\t\t\t__unstableLayoutClassNames,\n\t\t\t\t\t// We use symbols in favour of an __unstable prefix to avoid\n\t\t\t\t\t// usage outside of the package (this context is exposed).\n\t\t\t\t\t[ mayDisplayControlsKey ]: mayDisplayControls,\n\t\t\t\t\t[ mayDisplayParentControlsKey ]: mayDisplayParentControls,\n\t\t\t\t\t[ blockEditingModeKey ]: blockEditingMode,\n\t\t\t\t\t[ blockBindingsKey ]: bindings,\n\t\t\t\t\t[ isPreviewModeKey ]: isPreviewMode,\n\t\t\t\t} ),\n\t\t\t\t[\n\t\t\t\t\tname,\n\t\t\t\t\tisSelected,\n\t\t\t\t\tclientId,\n\t\t\t\t\tlayoutSupport,\n\t\t\t\t\tlayout,\n\t\t\t\t\t__unstableLayoutClassNames,\n\t\t\t\t\tmayDisplayControls,\n\t\t\t\t\tmayDisplayParentControls,\n\t\t\t\t\tblockEditingMode,\n\t\t\t\t\tbindings,\n\t\t\t\t\tisPreviewMode,\n\t\t\t\t]\n\t\t\t) }\n\t\t>\n\t\t\t<Edit { ...props } />\n\t\t\t{ originalBlockClientId && (\n\t\t\t\t<MultipleUsageWarning\n\t\t\t\t\toriginalBlockClientId={ originalBlockClientId }\n\t\t\t\t\tname={ name }\n\t\t\t\t\tonReplace={ props.onReplace }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</BlockEditContextProvider>\n\t);\n}\n"],"mappings":";;;;;;;;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAKA,IAAAE,KAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,I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AE,EACH,CACCE,IAAI,EACJC,UAAU,EACVC,QAAQ,EACRM,aAAa,EACbH,MAAM,EACND,0BAA0B,EAC1BT,kBAAkB,EAClBC,wBAAwB,EACxBC,gBAAgB,EAChBU,QAAQ,EACRT,aAAa,CAEf,CAAG;IAAAwB,QAAA,gBAEH,IAAA7B,WAAA,CAAA8B,GAAA,EAACnC,KAAA,CAAAoC,OAAI;MAAA,GAAMzB;IAAK,CAAI,CAAC,EACnBW,qBAAqB,iBACtB,IAAAjB,WAAA,CAAA8B,GAAA,EAAChC,qBAAA,CAAAkC,oBAAoB;MACpBf,qBAAqB,EAAGA,qBAAuB;MAC/CV,IAAI,EAAGA,IAAM;MACb0B,SAAS,EAAG3B,KAAK,CAAC2B;IAAW,CAC7B,CACD;EAAA,CACwB,CAAC;AAE7B","ignoreList":[]}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.MultipleUsageWarning = MultipleUsageWarning;
|
|
8
|
+
var _blocks = require("@wordpress/blocks");
|
|
9
|
+
var _components = require("@wordpress/components");
|
|
10
|
+
var _data = require("@wordpress/data");
|
|
11
|
+
var _i18n = require("@wordpress/i18n");
|
|
12
|
+
var _store = require("../../store");
|
|
13
|
+
var _warning = _interopRequireDefault(require("../warning"));
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
+
/**
|
|
16
|
+
* WordPress dependencies
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Internal dependencies
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
function MultipleUsageWarning({
|
|
24
|
+
originalBlockClientId,
|
|
25
|
+
name,
|
|
26
|
+
onReplace
|
|
27
|
+
}) {
|
|
28
|
+
const {
|
|
29
|
+
selectBlock
|
|
30
|
+
} = (0, _data.useDispatch)(_store.store);
|
|
31
|
+
const blockType = (0, _blocks.getBlockType)(name);
|
|
32
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_warning.default, {
|
|
33
|
+
actions: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
|
|
34
|
+
variant: "secondary",
|
|
35
|
+
onClick: () => selectBlock(originalBlockClientId),
|
|
36
|
+
children: (0, _i18n.__)('Find original')
|
|
37
|
+
}, "find-original"), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
|
|
38
|
+
variant: "secondary",
|
|
39
|
+
onClick: () => onReplace([]),
|
|
40
|
+
children: (0, _i18n.__)('Remove')
|
|
41
|
+
}, "remove")],
|
|
42
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("strong", {
|
|
43
|
+
children: [blockType?.title, ": "]
|
|
44
|
+
}), (0, _i18n.__)('This block can only be used once.')]
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=multiple-usage-warning.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_blocks","require","_components","_data","_i18n","_store","_warning","_interopRequireDefault","_jsxRuntime","MultipleUsageWarning","originalBlockClientId","name","onReplace","selectBlock","useDispatch","blockEditorStore","blockType","getBlockType","jsxs","default","actions","jsx","Button","variant","onClick","children","__","title"],"sources":["@wordpress/block-editor/src/components/block-edit/multiple-usage-warning.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockType } from '@wordpress/blocks';\nimport { Button } from '@wordpress/components';\nimport { useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport Warning from '../warning';\n\nexport function MultipleUsageWarning( {\n\toriginalBlockClientId,\n\tname,\n\tonReplace,\n} ) {\n\tconst { selectBlock } = useDispatch( blockEditorStore );\n\tconst blockType = getBlockType( name );\n\n\treturn (\n\t\t<Warning\n\t\t\tactions={ [\n\t\t\t\t<Button\n\t\t\t\t\tkey=\"find-original\"\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\tonClick={ () => selectBlock( originalBlockClientId ) }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Find original' ) }\n\t\t\t\t</Button>,\n\t\t\t\t<Button\n\t\t\t\t\tkey=\"remove\"\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\tonClick={ () => onReplace( [] ) }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Remove' ) }\n\t\t\t\t</Button>,\n\t\t\t] }\n\t\t>\n\t\t\t<strong>{ blockType?.title }: </strong>\n\t\t\t{ __( 'This block can only be used once.' ) }\n\t\t</Warning>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AAKA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAC,sBAAA,CAAAN,OAAA;AAAiC,IAAAO,WAAA,GAAAP,OAAA;AAZjC;AACA;AACA;;AAMA;AACA;AACA;;AAIO,SAASQ,oBAAoBA,CAAE;EACrCC,qBAAqB;EACrBC,IAAI;EACJC;AACD,CAAC,EAAG;EACH,MAAM;IAAEC;EAAY,CAAC,GAAG,IAAAC,iBAAW,EAAEC,YAAiB,CAAC;EACvD,MAAMC,SAAS,GAAG,IAAAC,oBAAY,EAAEN,IAAK,CAAC;EAEtC,oBACC,IAAAH,WAAA,CAAAU,IAAA,EAACZ,QAAA,CAAAa,OAAO;IACPC,OAAO,EAAG,cACT,IAAAZ,WAAA,CAAAa,GAAA,EAACnB,WAAA,CAAAoB,MAAM;MAENC,OAAO,EAAC,WAAW;MACnBC,OAAO,EAAGA,CAAA,KAAMX,WAAW,CAAEH,qBAAsB,CAAG;MAAAe,QAAA,EA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