@wordpress/block-editor 12.25.0 → 13.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -3
- package/README.md +7 -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-actions/index.js +4 -2
- package/build/components/block-actions/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 +34 -31
- 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 +33 -28
- 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 +25 -24
- 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 +7 -8
- 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 +8 -7
- 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 +103 -89
- 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 +110 -65
- package/build/components/block-list/block.js.map +1 -1
- package/build/components/block-list/block.native.js +65 -56
- 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 +40 -36
- 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 +6 -3
- package/build/components/block-list/use-block-props/index.js.map +1 -1
- package/build/components/block-list/use-block-props/use-scroll-into-view.js +44 -0
- package/build/components/block-list/use-block-props/use-scroll-into-view.js.map +1 -0
- package/build/components/block-list-appender/index.js +11 -10
- 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 +20 -17
- package/build/components/block-mover/button.js.map +1 -1
- package/build/components/block-mover/index.js +36 -29
- 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 +119 -88
- 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 +19 -13
- 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 +10 -9
- package/build/components/block-popover/inbetween.js.map +1 -1
- package/build/components/block-popover/index.js +28 -8
- 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 +18 -16
- 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 +99 -78
- 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 +37 -29
- package/build/components/block-settings-menu-controls/index.js.map +1 -1
- package/build/components/block-styles/index.js +44 -39
- 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 +56 -46
- 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 +63 -50
- package/build/components/block-tools/block-selection-button.js.map +1 -1
- package/build/components/block-tools/block-toolbar-breadcrumb.js +11 -10
- package/build/components/block-tools/block-toolbar-breadcrumb.js.map +1 -1
- package/build/components/block-tools/block-toolbar-popover.js +17 -16
- package/build/components/block-tools/block-toolbar-popover.js.map +1 -1
- package/build/components/block-tools/empty-block-inserter.js +15 -13
- package/build/components/block-tools/empty-block-inserter.js.map +1 -1
- package/build/components/block-tools/index.js +49 -27
- package/build/components/block-tools/index.js.map +1 -1
- package/build/components/block-tools/insertion-point.js +44 -42
- package/build/components/block-tools/insertion-point.js.map +1 -1
- package/build/components/block-tools/zoom-out-mode-inserters.js +70 -25
- 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 +32 -27
- 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 +17 -14
- 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 +54 -40
- package/build/components/colors-gradients/control.js.map +1 -1
- package/build/components/colors-gradients/dropdown.js +72 -63
- package/build/components/colors-gradients/dropdown.js.map +1 -1
- package/build/components/colors-gradients/panel-color-gradient-settings.js +23 -20
- 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 +22 -12
- 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 +34 -32
- 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 +42 -49
- 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 +189 -123
- 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 +113 -89
- 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 +184 -172
- package/build/components/global-styles/dimensions-panel.js.map +1 -1
- package/build/components/global-styles/filters-panel.js +79 -66
- package/build/components/global-styles/filters-panel.js.map +1 -1
- package/build/components/global-styles/hooks.js +14 -2
- 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 +78 -69
- 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 +114 -79
- 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 +161 -43
- package/build/components/grid-visualizer/grid-item-resizer.js.map +1 -1
- package/build/components/grid-visualizer/grid-visualizer.js +30 -19
- 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 +118 -71
- package/build/components/iframe/index.js.map +1 -1
- package/build/components/image-editor/aspect-ratio-dropdown.js +95 -74
- 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 +26 -23
- 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 +23 -14
- 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.js +8 -0
- package/build/components/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 +4 -4
- 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 +41 -37
- 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 +26 -20
- package/build/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/index.js +44 -28
- 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 +43 -32
- 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 -64
- 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 +9 -4
- package/build/components/inserter/hooks/use-block-types-state.js.map +1 -1
- package/build/components/inserter/hooks/use-insertion-point.js +44 -7
- package/build/components/inserter/hooks/use-insertion-point.js.map +1 -1
- package/build/components/inserter/hooks/use-patterns-state.js +12 -5
- package/build/components/inserter/hooks/use-patterns-state.js.map +1 -1
- package/build/components/inserter/index.js +8 -8
- 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 +22 -9
- 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 +93 -67
- 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 +138 -105
- 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 +37 -33
- 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 +34 -18
- 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 +69 -63
- 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/keyboard-shortcuts/index.js +9 -0
- package/build/components/keyboard-shortcuts/index.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 +102 -85
- package/build/components/link-control/index.js.map +1 -1
- package/build/components/link-control/link-preview.js +63 -51
- 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 +52 -48
- 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 +34 -31
- package/build/components/list-view/block-contents.js.map +1 -1
- package/build/components/list-view/block-select-button.js +60 -44
- package/build/components/list-view/block-select-button.js.map +1 -1
- package/build/components/list-view/block.js +131 -96
- 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 +39 -32
- 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 +43 -39
- package/build/components/list-view/index.js.map +1 -1
- package/build/components/list-view/leaf.js +7 -6
- package/build/components/list-view/leaf.js.map +1 -1
- package/build/components/media-placeholder/index.js +101 -81
- 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 +73 -61
- 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 +6 -7
- 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/use-block-sync.js +18 -0
- package/build/components/provider/use-block-sync.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 +31 -27
- 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/event-listeners/enter.js +33 -42
- package/build/components/rich-text/event-listeners/enter.js.map +1 -1
- package/build/components/rich-text/event-listeners/paste-handler.js +22 -42
- package/build/components/rich-text/event-listeners/paste-handler.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 +38 -34
- 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 +95 -77
- package/build/components/rich-text/index.js.map +1 -1
- package/build/components/rich-text/index.native.js +52 -48
- package/build/components/rich-text/index.native.js.map +1 -1
- package/build/components/rich-text/multiline.js +68 -40
- 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 +21 -20
- 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 +29 -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 +4 -4
- package/build/components/text-alignment-control/index.js.map +1 -1
- package/build/components/text-decoration-control/index.js +4 -4
- package/build/components/text-decoration-control/index.js.map +1 -1
- package/build/components/text-transform-control/index.js +4 -4
- 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 +29 -24
- 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 +17 -16
- package/build/components/url-popover/link-editor.js.map +1 -1
- package/build/components/url-popover/link-viewer-url.js +8 -7
- package/build/components/url-popover/link-viewer-url.js.map +1 -1
- package/build/components/url-popover/link-viewer.js +16 -15
- 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 +35 -27
- 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 +10 -7
- package/build/components/writing-flow/index.js.map +1 -1
- package/build/components/writing-flow/use-clipboard-handler.js +64 -14
- package/build/components/writing-flow/use-clipboard-handler.js.map +1 -1
- package/build/components/writing-flow/use-input.js +44 -2
- package/build/components/writing-flow/use-input.js.map +1 -1
- package/build/components/writing-flow/use-tab-nav.js +9 -4
- package/build/components/writing-flow/use-tab-nav.js.map +1 -1
- package/build/components/writing-mode-control/index.js +4 -4
- package/build/components/writing-mode-control/index.js.map +1 -1
- package/build/hooks/align.js +12 -12
- 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 +7 -6
- 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 +9 -8
- package/build/hooks/border.js.map +1 -1
- package/build/hooks/color.js +14 -12
- package/build/hooks/color.js.map +1 -1
- package/build/hooks/content-lock-ui.js +25 -40
- 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 +19 -18
- package/build/hooks/custom-class-name.js.map +1 -1
- package/build/hooks/custom-class-name.native.js +2 -2
- package/build/hooks/custom-class-name.native.js.map +1 -1
- package/build/hooks/dimensions.js +26 -23
- 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 +35 -25
- package/build/hooks/layout-child.js.map +1 -1
- package/build/hooks/layout.js +63 -57
- 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 +30 -28
- 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 +22 -21
- 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 +84 -26
- package/build/hooks/use-bindings-attributes.js.map +1 -1
- package/build/hooks/use-color-props.js +2 -2
- package/build/hooks/use-color-props.js.map +1 -1
- package/build/hooks/use-typography-props.js +6 -5
- 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 +20 -19
- 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 +152 -130
- package/build/layouts/grid.js.map +1 -1
- package/build/private-apis.js +10 -1
- package/build/private-apis.js.map +1 -1
- package/build/store/actions.js +170 -44
- 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/private-actions.js +26 -1
- package/build/store/private-actions.js.map +1 -1
- package/build/store/private-keys.js +2 -1
- package/build/store/private-keys.js.map +1 -1
- package/build/store/private-selectors.js +6 -0
- package/build/store/private-selectors.js.map +1 -1
- package/build/store/reducer.js +21 -14
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +32 -2
- 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/selection.js +8 -0
- package/build/utils/selection.js.map +1 -1
- package/build/utils/transform-styles/index.js +12 -7
- 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-actions/index.js +4 -2
- package/build-module/components/block-actions/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 +35 -31
- 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 +35 -29
- 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 +26 -24
- 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 +6 -6
- 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 +8 -7
- 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 +105 -89
- 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 +112 -64
- package/build-module/components/block-list/block.js.map +1 -1
- package/build-module/components/block-list/block.native.js +63 -53
- 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 +41 -36
- 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 +6 -3
- package/build-module/components/block-list/use-block-props/index.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-scroll-into-view.js +37 -0
- package/build-module/components/block-list/use-block-props/use-scroll-into-view.js.map +1 -0
- package/build-module/components/block-list-appender/index.js +11 -10
- 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 +22 -17
- package/build-module/components/block-mover/button.js.map +1 -1
- package/build-module/components/block-mover/index.js +37 -29
- 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 +122 -89
- 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 +19 -12
- 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 +10 -9
- package/build-module/components/block-popover/inbetween.js.map +1 -1
- package/build-module/components/block-popover/index.js +27 -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 +19 -16
- 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 +101 -78
- 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 +38 -29
- package/build-module/components/block-settings-menu-controls/index.js.map +1 -1
- package/build-module/components/block-styles/index.js +45 -39
- 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 +58 -46
- 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 +63 -48
- package/build-module/components/block-tools/block-selection-button.js.map +1 -1
- package/build-module/components/block-tools/block-toolbar-breadcrumb.js +11 -10
- package/build-module/components/block-tools/block-toolbar-breadcrumb.js.map +1 -1
- package/build-module/components/block-tools/block-toolbar-popover.js +17 -16
- package/build-module/components/block-tools/block-toolbar-popover.js.map +1 -1
- package/build-module/components/block-tools/empty-block-inserter.js +15 -13
- package/build-module/components/block-tools/empty-block-inserter.js.map +1 -1
- package/build-module/components/block-tools/index.js +50 -27
- package/build-module/components/block-tools/index.js.map +1 -1
- package/build-module/components/block-tools/insertion-point.js +45 -42
- package/build-module/components/block-tools/insertion-point.js.map +1 -1
- package/build-module/components/block-tools/zoom-out-mode-inserters.js +72 -26
- 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 +33 -27
- 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 +18 -14
- 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 +55 -40
- package/build-module/components/colors-gradients/control.js.map +1 -1
- package/build-module/components/colors-gradients/dropdown.js +74 -63
- package/build-module/components/colors-gradients/dropdown.js.map +1 -1
- package/build-module/components/colors-gradients/panel-color-gradient-settings.js +25 -20
- 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 +25 -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 +35 -32
- 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 +41 -47
- 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 +190 -123
- 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 +114 -89
- 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 +185 -172
- package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
- package/build-module/components/global-styles/filters-panel.js +80 -66
- package/build-module/components/global-styles/filters-panel.js.map +1 -1
- package/build-module/components/global-styles/hooks.js +13 -2
- 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 +78 -67
- 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 +115 -79
- 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 +161 -43
- package/build-module/components/grid-visualizer/grid-item-resizer.js.map +1 -1
- package/build-module/components/grid-visualizer/grid-visualizer.js +31 -20
- 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 +121 -72
- package/build-module/components/iframe/index.js.map +1 -1
- package/build-module/components/image-editor/aspect-ratio-dropdown.js +96 -74
- 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 +28 -23
- 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 +24 -14
- 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.js +1 -0
- package/build-module/components/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 +4 -4
- 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 +41 -37
- 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 +28 -20
- package/build-module/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab/index.js +47 -29
- 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 +45 -32
- 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 +111 -66
- 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 +9 -4
- package/build-module/components/inserter/hooks/use-block-types-state.js.map +1 -1
- package/build-module/components/inserter/hooks/use-insertion-point.js +44 -8
- package/build-module/components/inserter/hooks/use-insertion-point.js.map +1 -1
- package/build-module/components/inserter/hooks/use-patterns-state.js +12 -5
- package/build-module/components/inserter/hooks/use-patterns-state.js.map +1 -1
- package/build-module/components/inserter/index.js +8 -8
- 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 +21 -7
- 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 +95 -67
- 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 +139 -104
- 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 +38 -33
- 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 +36 -19
- 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 +70 -63
- 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/keyboard-shortcuts/index.js +9 -0
- package/build-module/components/keyboard-shortcuts/index.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 +103 -83
- package/build-module/components/link-control/index.js.map +1 -1
- package/build-module/components/link-control/link-preview.js +65 -51
- 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 +53 -48
- 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 +36 -31
- package/build-module/components/list-view/block-contents.js.map +1 -1
- package/build-module/components/list-view/block-select-button.js +61 -44
- package/build-module/components/list-view/block-select-button.js.map +1 -1
- package/build-module/components/list-view/block.js +134 -97
- 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 +40 -32
- 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 +44 -39
- package/build-module/components/list-view/index.js.map +1 -1
- package/build-module/components/list-view/leaf.js +7 -6
- package/build-module/components/list-view/leaf.js.map +1 -1
- package/build-module/components/media-placeholder/index.js +103 -81
- 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 +75 -61
- 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 +5 -5
- 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/use-block-sync.js +19 -1
- package/build-module/components/provider/use-block-sync.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 +32 -27
- 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/event-listeners/enter.js +33 -43
- package/build-module/components/rich-text/event-listeners/enter.js.map +1 -1
- package/build-module/components/rich-text/event-listeners/paste-handler.js +23 -43
- package/build-module/components/rich-text/event-listeners/paste-handler.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 +40 -34
- 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 +98 -78
- package/build-module/components/rich-text/index.js.map +1 -1
- package/build-module/components/rich-text/index.native.js +54 -48
- package/build-module/components/rich-text/index.native.js.map +1 -1
- package/build-module/components/rich-text/multiline.js +69 -41
- 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 +21 -18
- 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 +29 -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 +4 -4
- package/build-module/components/text-alignment-control/index.js.map +1 -1
- package/build-module/components/text-decoration-control/index.js +4 -4
- package/build-module/components/text-decoration-control/index.js.map +1 -1
- package/build-module/components/text-transform-control/index.js +4 -4
- 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 +30 -22
- 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 +18 -16
- package/build-module/components/url-popover/link-editor.js.map +1 -1
- package/build-module/components/url-popover/link-viewer-url.js +8 -7
- package/build-module/components/url-popover/link-viewer-url.js.map +1 -1
- package/build-module/components/url-popover/link-viewer.js +17 -15
- 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 +36 -27
- 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 +12 -7
- package/build-module/components/writing-flow/index.js.map +1 -1
- package/build-module/components/writing-flow/use-clipboard-handler.js +65 -15
- package/build-module/components/writing-flow/use-clipboard-handler.js.map +1 -1
- package/build-module/components/writing-flow/use-input.js +45 -3
- package/build-module/components/writing-flow/use-input.js.map +1 -1
- package/build-module/components/writing-flow/use-tab-nav.js +9 -4
- package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
- package/build-module/components/writing-mode-control/index.js +4 -4
- package/build-module/components/writing-mode-control/index.js.map +1 -1
- package/build-module/hooks/align.js +11 -10
- 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 +7 -6
- 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 +9 -8
- package/build-module/hooks/border.js.map +1 -1
- package/build-module/hooks/color.js +14 -12
- package/build-module/hooks/color.js.map +1 -1
- package/build-module/hooks/content-lock-ui.js +27 -40
- 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 +19 -18
- package/build-module/hooks/custom-class-name.js.map +1 -1
- package/build-module/hooks/custom-class-name.native.js +2 -2
- package/build-module/hooks/custom-class-name.native.js.map +1 -1
- package/build-module/hooks/dimensions.js +28 -23
- 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 +37 -25
- package/build-module/hooks/layout-child.js.map +1 -1
- package/build-module/hooks/layout.js +65 -57
- 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 +30 -28
- 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 +23 -22
- 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 +85 -25
- package/build-module/hooks/use-bindings-attributes.js.map +1 -1
- package/build-module/hooks/use-color-props.js +2 -2
- package/build-module/hooks/use-color-props.js.map +1 -1
- package/build-module/hooks/use-typography-props.js +5 -5
- 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 +20 -19
- 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 +154 -130
- package/build-module/layouts/grid.js.map +1 -1
- package/build-module/private-apis.js +11 -2
- package/build-module/private-apis.js.map +1 -1
- package/build-module/store/actions.js +172 -46
- 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/private-actions.js +24 -0
- package/build-module/store/private-actions.js.map +1 -1
- package/build-module/store/private-keys.js +1 -0
- package/build-module/store/private-keys.js.map +1 -1
- package/build-module/store/private-selectors.js +5 -0
- package/build-module/store/private-selectors.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 +33 -3
- 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/selection.js +7 -0
- package/build-module/utils/selection.js.map +1 -1
- package/build-module/utils/transform-styles/index.js +12 -7
- package/build-module/utils/transform-styles/index.js.map +1 -1
- package/build-style/content-rtl.css +93 -96
- package/build-style/content.css +93 -96
- package/build-style/style-rtl.css +105 -76
- package/build-style/style.css +105 -76
- package/build-types/components/block-context/index.d.ts +1 -1
- package/build-types/components/block-context/index.d.ts.map +1 -1
- package/package.json +34 -33
- 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-actions/index.js +5 -1
- package/src/components/block-alignment-control/ui.js +2 -2
- package/src/components/block-bindings-toolbar-indicator/index.js +125 -10
- package/src/components/block-bindings-toolbar-indicator/style.scss +7 -8
- package/src/components/block-canvas/style.scss +1 -5
- package/src/components/block-card/index.js +11 -7
- package/src/components/block-card/style.scss +0 -11
- package/src/components/block-compare/index.js +2 -2
- package/src/components/block-content-overlay/content.scss +4 -37
- package/src/components/block-draggable/test/helpers.native.js +8 -8
- package/src/components/block-edit/edit.js +2 -2
- package/src/components/block-edit/index.js +13 -2
- package/src/components/block-edit/multiple-usage-warning.js +46 -0
- package/src/components/block-icon/index.js +2 -2
- package/src/components/block-inspector/index.js +4 -5
- 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 +67 -21
- package/src/components/block-list/block.native.js +19 -11
- package/src/components/block-list/content.scss +46 -73
- package/src/components/block-list/index.js +2 -2
- package/src/components/block-list/use-block-props/index.js +4 -2
- package/src/components/block-list/use-block-props/use-scroll-into-view.js +38 -0
- package/src/components/block-list-appender/index.js +2 -2
- package/src/components/block-mover/button.js +2 -2
- package/src/components/block-mover/index.js +2 -2
- package/src/components/block-patterns-list/index.js +33 -5
- package/src/components/block-patterns-list/style.scss +23 -20
- package/src/components/block-popover/README.md +1 -1
- package/src/components/block-popover/cover.js +22 -7
- package/src/components/block-popover/inbetween.js +2 -2
- package/src/components/block-popover/index.js +24 -6
- package/src/components/block-preview/index.js +2 -2
- package/src/components/block-preview/style.scss +0 -26
- package/src/components/block-settings/container.native.js +2 -0
- package/src/components/block-settings-menu/block-settings-dropdown.js +14 -6
- package/src/components/block-settings-menu-controls/index.js +25 -16
- package/src/components/block-styles/index.js +2 -2
- package/src/components/block-toolbar/index.js +4 -4
- package/src/components/block-tools/block-selection-button.js +2 -2
- package/src/components/block-tools/block-toolbar-breadcrumb.js +5 -5
- package/src/components/block-tools/block-toolbar-popover.js +4 -7
- package/src/components/block-tools/empty-block-inserter.js +2 -2
- package/src/components/block-tools/index.js +30 -8
- package/src/components/block-tools/insertion-point.js +4 -4
- package/src/components/block-tools/style.scss +10 -2
- package/src/components/block-tools/zoom-out-mode-inserters.js +75 -22
- package/src/components/block-variation-picker/index.js +2 -2
- 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 -2
- package/src/components/child-layout-control/index.js +26 -14
- package/src/components/colors/utils.js +2 -2
- package/src/components/colors/with-colors.js +2 -1
- package/src/components/colors-gradients/control.js +6 -14
- package/src/components/colors-gradients/dropdown.js +2 -2
- package/src/components/colors-gradients/panel-color-gradient-settings.js +2 -2
- package/src/components/colors-gradients/test/control.js +3 -3
- package/src/components/contrast-checker/test/index.js +8 -8
- package/src/components/convert-to-group-buttons/index.js +10 -1
- package/src/components/default-block-appender/index.js +2 -2
- package/src/components/dimensions-tool/aspect-ratio-tool.js +41 -68
- package/src/components/dimensions-tool/scale-tool.js +1 -1
- package/src/components/dimensions-tool/test/index.js +10 -0
- package/src/components/dimensions-tool/width-height-tool.js +2 -2
- package/src/components/editable-text/README.md +0 -4
- package/src/components/font-sizes/utils.js +2 -1
- package/src/components/global-styles/background-panel.js +119 -49
- package/src/components/global-styles/border-panel.js +8 -5
- package/src/components/global-styles/color-panel.js +30 -25
- package/src/components/global-styles/color-panel.native.js +1 -1
- package/src/components/global-styles/dimensions-panel.js +11 -12
- package/src/components/global-styles/filters-panel.js +2 -2
- package/src/components/global-styles/hooks.js +13 -1
- package/src/components/global-styles/index.js +3 -0
- package/src/components/global-styles/shadow-panel-components.js +17 -14
- package/src/components/global-styles/test/get-global-styles-changes.js +0 -2
- 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 +13 -12
- 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 +200 -102
- package/src/components/grid-visualizer/grid-item-resizer.js +169 -40
- package/src/components/grid-visualizer/grid-visualizer.js +27 -7
- package/src/components/grid-visualizer/style.scss +2 -1
- package/src/components/height-control/index.js +1 -1
- package/src/components/iframe/content.scss +67 -0
- package/src/components/iframe/index.js +119 -39
- package/src/components/image-editor/aspect-ratio-dropdown.js +91 -59
- package/src/components/image-editor/cropper.js +2 -2
- package/src/components/image-editor/index.js +1 -1
- package/src/components/image-editor/test/index.js +22 -0
- package/src/components/index.js +1 -0
- package/src/components/index.native.js +7 -0
- package/src/components/inner-blocks/button-block-appender.js +2 -2
- package/src/components/inner-blocks/index.js +19 -17
- 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 +3 -2
- package/src/components/inserter/block-patterns-tab/index.js +17 -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 +8 -2
- package/src/components/inserter/block-patterns-tab/patterns-filter.js +3 -2
- package/src/components/inserter/block-types-tab.js +119 -79
- package/src/components/inserter/category-tabs/index.js +1 -1
- package/src/components/inserter/hooks/use-block-types-state.js +21 -5
- package/src/components/inserter/hooks/use-insertion-point.js +68 -8
- package/src/components/inserter/hooks/use-patterns-state.js +18 -5
- package/src/components/inserter/index.js +4 -5
- package/src/components/inserter/library.js +23 -7
- package/src/components/inserter/media-tab/media-preview.js +2 -2
- package/src/components/inserter/menu.js +135 -116
- package/src/components/inserter/quick-inserter.js +5 -3
- package/src/components/inserter/search-results.js +2 -1
- package/src/components/inserter/style.scss +47 -26
- package/src/components/inserter/tabs.js +29 -15
- package/src/components/inserter-list-item/index.js +3 -3
- 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/keyboard-shortcuts/index.js +12 -0
- package/src/components/line-height-control/test/index.js +16 -14
- package/src/components/link-control/index.js +12 -3
- package/src/components/link-control/link-preview.js +3 -3
- package/src/components/link-control/search-results.js +2 -2
- package/src/components/link-control/style.scss +9 -3
- package/src/components/list-view/block-contents.js +3 -3
- package/src/components/list-view/block-select-button.js +14 -3
- package/src/components/list-view/block.js +54 -30
- package/src/components/list-view/drop-indicator.js +3 -3
- package/src/components/list-view/index.js +2 -2
- package/src/components/list-view/leaf.js +2 -5
- package/src/components/media-placeholder/index.js +5 -5
- package/src/components/media-placeholder/index.native.js +2 -2
- package/src/components/media-replace-flow/index.js +2 -2
- package/src/components/media-upload-progress/index.native.js +22 -2
- package/src/components/plain-text/index.js +2 -2
- package/src/components/provider/use-block-sync.js +27 -1
- 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/responsive-block-control/index.js +2 -2
- package/src/components/rich-text/README.md +0 -8
- package/src/components/rich-text/event-listeners/enter.js +28 -48
- package/src/components/rich-text/event-listeners/paste-handler.js +21 -58
- package/src/components/rich-text/format-toolbar/index.js +2 -2
- package/src/components/rich-text/index.js +21 -8
- package/src/components/rich-text/index.native.js +2 -2
- package/src/components/rich-text/multiline.js +31 -3
- 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/segmented-text-control/index.js +2 -2
- package/src/components/spacing-sizes-control/hooks/use-spacing-sizes.js +48 -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/text-alignment-control/index.js +2 -2
- package/src/components/text-decoration-control/index.js +2 -2
- package/src/components/text-transform-control/index.js +2 -2
- package/src/components/url-input/index.js +4 -4
- package/src/components/url-popover/link-editor.js +2 -2
- package/src/components/url-popover/link-viewer-url.js +2 -2
- package/src/components/url-popover/link-viewer.js +2 -2
- package/src/components/video-player/index.native.js +1 -1
- package/src/components/warning/index.js +2 -2
- package/src/components/writing-flow/index.js +2 -2
- package/src/components/writing-flow/use-clipboard-handler.js +96 -33
- package/src/components/writing-flow/use-input.js +75 -1
- package/src/components/writing-flow/use-tab-nav.js +10 -1
- package/src/components/writing-mode-control/index.js +2 -5
- package/src/content.scss +1 -0
- package/src/hooks/align.js +2 -2
- package/src/hooks/background.js +1 -1
- 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/border.js +3 -3
- package/src/hooks/color.js +12 -19
- package/src/hooks/color.scss +1 -0
- package/src/hooks/content-lock-ui.js +16 -33
- package/src/hooks/custom-class-name.js +2 -2
- package/src/hooks/custom-class-name.native.js +2 -2
- package/src/hooks/dimensions.js +2 -2
- package/src/hooks/font-family.js +1 -1
- package/src/hooks/index.js +4 -0
- package/src/hooks/layout-child.js +34 -20
- package/src/hooks/layout.js +3 -4
- package/src/hooks/position.js +3 -3
- package/src/hooks/style.js +9 -1
- package/src/hooks/text-align.js +20 -14
- package/src/hooks/use-bindings-attributes.js +93 -18
- package/src/hooks/use-color-props.js +2 -2
- package/src/hooks/use-typography-props.js +4 -3
- package/src/hooks/use-zoom-out.js +9 -2
- package/src/hooks/utils.js +23 -6
- package/src/layouts/flex.js +2 -2
- package/src/layouts/grid.js +8 -12
- package/src/private-apis.js +10 -0
- package/src/store/actions.js +261 -73
- package/src/store/get-block-settings.js +1 -46
- package/src/store/private-actions.js +24 -0
- package/src/store/private-keys.js +1 -0
- package/src/store/private-selectors.js +15 -0
- package/src/store/reducer.js +24 -11
- package/src/store/selectors.js +65 -8
- package/src/store/utils.js +2 -0
- package/src/style.scss +1 -0
- package/src/utils/selection.js +8 -0
- package/src/utils/test/__snapshots__/transform-styles.js.snap +6 -0
- package/src/utils/test/transform-styles.js +14 -0
- package/src/utils/transform-styles/index.js +14 -9
- package/tsconfig.tsbuildinfo +1 -1
- package/build/components/rich-text/split-value.js +0 -81
- package/build/components/rich-text/split-value.js.map +0 -1
- package/build-module/components/rich-text/split-value.js +0 -75
- package/build-module/components/rich-text/split-value.js.map +0 -1
- package/src/components/rich-text/split-value.js +0 -64
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { createElement, Fragment } from "react";
|
|
2
1
|
/**
|
|
3
2
|
* WordPress dependencies
|
|
4
3
|
*/
|
|
@@ -50,6 +49,9 @@ import WidthHeightTool from './width-height-tool';
|
|
|
50
49
|
*
|
|
51
50
|
* @return {Element} The dimensions controls.
|
|
52
51
|
*/
|
|
52
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
53
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
54
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
53
55
|
function DimensionsTool({
|
|
54
56
|
panelId,
|
|
55
57
|
value = {},
|
|
@@ -81,121 +83,123 @@ function DimensionsTool({
|
|
|
81
83
|
// as a custom aspect ratio.
|
|
82
84
|
const aspectRatioValue = width && height ? 'custom' : lastAspectRatio;
|
|
83
85
|
const showScaleControl = aspectRatio || width && height;
|
|
84
|
-
return
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
86
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
87
|
+
children: [/*#__PURE__*/_jsx(AspectRatioTool, {
|
|
88
|
+
panelId: panelId,
|
|
89
|
+
options: aspectRatioOptions,
|
|
90
|
+
defaultValue: defaultAspectRatio,
|
|
91
|
+
value: aspectRatioValue,
|
|
92
|
+
onChange: nextAspectRatio => {
|
|
93
|
+
const nextValue = {
|
|
94
|
+
...value
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
// 'auto' is CSS default, so it gets treated as null.
|
|
98
|
+
nextAspectRatio = nextAspectRatio === 'auto' ? null : nextAspectRatio;
|
|
99
|
+
setLastAspectRatio(nextAspectRatio);
|
|
100
|
+
|
|
101
|
+
// Update aspectRatio.
|
|
102
|
+
if (!nextAspectRatio) {
|
|
103
|
+
delete nextValue.aspectRatio;
|
|
104
|
+
} else {
|
|
105
|
+
nextValue.aspectRatio = nextAspectRatio;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// Auto-update scale.
|
|
109
|
+
if (!nextAspectRatio) {
|
|
110
|
+
delete nextValue.scale;
|
|
111
|
+
} else if (lastScale) {
|
|
112
|
+
nextValue.scale = lastScale;
|
|
113
|
+
} else {
|
|
114
|
+
nextValue.scale = defaultScale;
|
|
115
|
+
setLastScale(defaultScale);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// Auto-update width and height.
|
|
119
|
+
if ('custom' !== nextAspectRatio && width && height) {
|
|
120
|
+
delete nextValue.height;
|
|
121
|
+
}
|
|
122
|
+
onChange(nextValue);
|
|
103
123
|
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
nextValue.aspectRatio = lastAspectRatio;
|
|
159
|
-
} else {
|
|
160
|
-
// No setting defaultAspectRatio here, because
|
|
161
|
-
// aspectRatio is optional in this scenario,
|
|
162
|
-
// unlike scale.
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
// Auto-update scale.
|
|
166
|
-
if (!lastAspectRatio && !!nextWidth !== !!nextHeight) {
|
|
167
|
-
delete nextValue.scale;
|
|
168
|
-
} else if (lastScale) {
|
|
169
|
-
nextValue.scale = lastScale;
|
|
170
|
-
} else {
|
|
171
|
-
nextValue.scale = defaultScale;
|
|
172
|
-
setLastScale(defaultScale);
|
|
124
|
+
}), /*#__PURE__*/_jsx(WidthHeightTool, {
|
|
125
|
+
panelId: panelId,
|
|
126
|
+
units: unitsOptions,
|
|
127
|
+
value: {
|
|
128
|
+
width,
|
|
129
|
+
height
|
|
130
|
+
},
|
|
131
|
+
onChange: ({
|
|
132
|
+
width: nextWidth,
|
|
133
|
+
height: nextHeight
|
|
134
|
+
}) => {
|
|
135
|
+
const nextValue = {
|
|
136
|
+
...value
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
// 'auto' is CSS default, so it gets treated as null.
|
|
140
|
+
nextWidth = nextWidth === 'auto' ? null : nextWidth;
|
|
141
|
+
nextHeight = nextHeight === 'auto' ? null : nextHeight;
|
|
142
|
+
|
|
143
|
+
// Update width.
|
|
144
|
+
if (!nextWidth) {
|
|
145
|
+
delete nextValue.width;
|
|
146
|
+
} else {
|
|
147
|
+
nextValue.width = nextWidth;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// Update height.
|
|
151
|
+
if (!nextHeight) {
|
|
152
|
+
delete nextValue.height;
|
|
153
|
+
} else {
|
|
154
|
+
nextValue.height = nextHeight;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
// Auto-update aspectRatio.
|
|
158
|
+
if (nextWidth && nextHeight) {
|
|
159
|
+
delete nextValue.aspectRatio;
|
|
160
|
+
} else if (lastAspectRatio) {
|
|
161
|
+
nextValue.aspectRatio = lastAspectRatio;
|
|
162
|
+
} else {
|
|
163
|
+
// No setting defaultAspectRatio here, because
|
|
164
|
+
// aspectRatio is optional in this scenario,
|
|
165
|
+
// unlike scale.
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// Auto-update scale.
|
|
169
|
+
if (!lastAspectRatio && !!nextWidth !== !!nextHeight) {
|
|
170
|
+
delete nextValue.scale;
|
|
171
|
+
} else if (lastScale) {
|
|
172
|
+
nextValue.scale = lastScale;
|
|
173
|
+
} else {
|
|
174
|
+
nextValue.scale = defaultScale;
|
|
175
|
+
setLastScale(defaultScale);
|
|
176
|
+
}
|
|
177
|
+
onChange(nextValue);
|
|
173
178
|
}
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
nextValue
|
|
179
|
+
}), showScaleControl && /*#__PURE__*/_jsx(ScaleTool, {
|
|
180
|
+
panelId: panelId,
|
|
181
|
+
options: scaleOptions,
|
|
182
|
+
defaultValue: defaultScale,
|
|
183
|
+
value: lastScale,
|
|
184
|
+
onChange: nextScale => {
|
|
185
|
+
const nextValue = {
|
|
186
|
+
...value
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
// 'fill' is CSS default, so it gets treated as null.
|
|
190
|
+
nextScale = nextScale === 'fill' ? null : nextScale;
|
|
191
|
+
setLastScale(nextScale);
|
|
192
|
+
|
|
193
|
+
// Update scale.
|
|
194
|
+
if (!nextScale) {
|
|
195
|
+
delete nextValue.scale;
|
|
196
|
+
} else {
|
|
197
|
+
nextValue.scale = nextScale;
|
|
198
|
+
}
|
|
199
|
+
onChange(nextValue);
|
|
195
200
|
}
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
}));
|
|
201
|
+
})]
|
|
202
|
+
});
|
|
199
203
|
}
|
|
200
204
|
export default DimensionsTool;
|
|
201
205
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useState","AspectRatioTool","ScaleTool","WidthHeightTool","DimensionsTool","panelId","value","onChange","aspectRatioOptions","defaultAspectRatio","scaleOptions","defaultScale","unitsOptions","width","undefined","height","aspectRatio","scale","lastScale","setLastScale","lastAspectRatio","setLastAspectRatio","aspectRatioValue","showScaleControl","createElement","Fragment","options","defaultValue","nextAspectRatio","nextValue","units","nextWidth","nextHeight","nextScale"],"sources":["@wordpress/block-editor/src/components/dimensions-tool/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport AspectRatioTool from './aspect-ratio-tool';\nimport ScaleTool from './scale-tool';\nimport WidthHeightTool from './width-height-tool';\n\n/**\n * @typedef {import('@wordpress/components/build-types/select-control/types').SelectControlProps} SelectControlProps\n */\n\n/**\n * @typedef {import('@wordpress/components/build-types/unit-control/types').WPUnitControlUnit} WPUnitControlUnit\n */\n\n/**\n * @typedef {Object} Dimensions\n * @property {string} [width] CSS width property.\n * @property {string} [height] CSS height property.\n * @property {string} [scale] CSS object-fit property.\n * @property {string} [aspectRatio] CSS aspect-ratio property.\n */\n\n/**\n * @callback DimensionsControlsOnChange\n * @param {Dimensions} nextValue\n * @return {void}\n */\n\n/**\n * @typedef {Object} DimensionsControlsProps\n * @property {string} [panelId] ID of the panel that contains the controls.\n * @property {Dimensions} [value] Current dimensions values.\n * @property {DimensionsControlsOnChange} [onChange] Callback to update the dimensions values.\n * @property {SelectControlProps[]} [aspectRatioOptions] Aspect ratio options.\n * @property {SelectControlProps[]} [scaleOptions] Scale options.\n * @property {WPUnitControlUnit[]} [unitsOptions] Units options.\n */\n\n/**\n * Component that renders controls to edit the dimensions of an image or container.\n *\n * @param {DimensionsControlsProps} props The component props.\n *\n * @return {Element} The dimensions controls.\n */\nfunction DimensionsTool( {\n\tpanelId,\n\tvalue = {},\n\tonChange = () => {},\n\taspectRatioOptions, // Default options handled by AspectRatioTool.\n\tdefaultAspectRatio = 'auto', // Match CSS default value for aspect-ratio.\n\tscaleOptions, // Default options handled by ScaleTool.\n\tdefaultScale = 'fill', // Match CSS default value for object-fit.\n\tunitsOptions, // Default options handled by UnitControl.\n} ) {\n\t// Coerce undefined and CSS default values to be null.\n\tconst width =\n\t\tvalue.width === undefined || value.width === 'auto'\n\t\t\t? null\n\t\t\t: value.width;\n\tconst height =\n\t\tvalue.height === undefined || value.height === 'auto'\n\t\t\t? null\n\t\t\t: value.height;\n\tconst aspectRatio =\n\t\tvalue.aspectRatio === undefined || value.aspectRatio === 'auto'\n\t\t\t? null\n\t\t\t: value.aspectRatio;\n\tconst scale =\n\t\tvalue.scale === undefined || value.scale === 'fill'\n\t\t\t? null\n\t\t\t: value.scale;\n\n\t// Keep track of state internally, so when the value is cleared by means\n\t// other than directly editing that field, it's easier to restore the\n\t// previous value.\n\tconst [ lastScale, setLastScale ] = useState( scale );\n\tconst [ lastAspectRatio, setLastAspectRatio ] = useState( aspectRatio );\n\n\t// 'custom' is not a valid value for CSS aspect-ratio, but it is used in the\n\t// dropdown to indicate that setting both the width and height is the same\n\t// as a custom aspect ratio.\n\tconst aspectRatioValue = width && height ? 'custom' : lastAspectRatio;\n\n\tconst showScaleControl = aspectRatio || ( width && height );\n\n\treturn (\n\t\t<>\n\t\t\t<AspectRatioTool\n\t\t\t\tpanelId={ panelId }\n\t\t\t\toptions={ aspectRatioOptions }\n\t\t\t\tdefaultValue={ defaultAspectRatio }\n\t\t\t\tvalue={ aspectRatioValue }\n\t\t\t\tonChange={ ( nextAspectRatio ) => {\n\t\t\t\t\tconst nextValue = { ...value };\n\n\t\t\t\t\t// 'auto' is CSS default, so it gets treated as null.\n\t\t\t\t\tnextAspectRatio =\n\t\t\t\t\t\tnextAspectRatio === 'auto' ? null : nextAspectRatio;\n\n\t\t\t\t\tsetLastAspectRatio( nextAspectRatio );\n\n\t\t\t\t\t// Update aspectRatio.\n\t\t\t\t\tif ( ! nextAspectRatio ) {\n\t\t\t\t\t\tdelete nextValue.aspectRatio;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnextValue.aspectRatio = nextAspectRatio;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Auto-update scale.\n\t\t\t\t\tif ( ! nextAspectRatio ) {\n\t\t\t\t\t\tdelete nextValue.scale;\n\t\t\t\t\t} else if ( lastScale ) {\n\t\t\t\t\t\tnextValue.scale = lastScale;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnextValue.scale = defaultScale;\n\t\t\t\t\t\tsetLastScale( defaultScale );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Auto-update width and height.\n\t\t\t\t\tif ( 'custom' !== nextAspectRatio && width && height ) {\n\t\t\t\t\t\tdelete nextValue.height;\n\t\t\t\t\t}\n\n\t\t\t\t\tonChange( nextValue );\n\t\t\t\t} }\n\t\t\t/>\n\t\t\t<WidthHeightTool\n\t\t\t\tpanelId={ panelId }\n\t\t\t\tunits={ unitsOptions }\n\t\t\t\tvalue={ { width, height } }\n\t\t\t\tonChange={ ( { width: nextWidth, height: nextHeight } ) => {\n\t\t\t\t\tconst nextValue = { ...value };\n\n\t\t\t\t\t// 'auto' is CSS default, so it gets treated as null.\n\t\t\t\t\tnextWidth = nextWidth === 'auto' ? null : nextWidth;\n\t\t\t\t\tnextHeight = nextHeight === 'auto' ? null : nextHeight;\n\n\t\t\t\t\t// Update width.\n\t\t\t\t\tif ( ! nextWidth ) {\n\t\t\t\t\t\tdelete nextValue.width;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnextValue.width = nextWidth;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Update height.\n\t\t\t\t\tif ( ! nextHeight ) {\n\t\t\t\t\t\tdelete nextValue.height;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnextValue.height = nextHeight;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Auto-update aspectRatio.\n\t\t\t\t\tif ( nextWidth && nextHeight ) {\n\t\t\t\t\t\tdelete nextValue.aspectRatio;\n\t\t\t\t\t} else if ( lastAspectRatio ) {\n\t\t\t\t\t\tnextValue.aspectRatio = lastAspectRatio;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// No setting defaultAspectRatio here, because\n\t\t\t\t\t\t// aspectRatio is optional in this scenario,\n\t\t\t\t\t\t// unlike scale.\n\t\t\t\t\t}\n\n\t\t\t\t\t// Auto-update scale.\n\t\t\t\t\tif ( ! lastAspectRatio && !! nextWidth !== !! nextHeight ) {\n\t\t\t\t\t\tdelete nextValue.scale;\n\t\t\t\t\t} else if ( lastScale ) {\n\t\t\t\t\t\tnextValue.scale = lastScale;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnextValue.scale = defaultScale;\n\t\t\t\t\t\tsetLastScale( defaultScale );\n\t\t\t\t\t}\n\n\t\t\t\t\tonChange( nextValue );\n\t\t\t\t} }\n\t\t\t/>\n\t\t\t{ showScaleControl && (\n\t\t\t\t<ScaleTool\n\t\t\t\t\tpanelId={ panelId }\n\t\t\t\t\toptions={ scaleOptions }\n\t\t\t\t\tdefaultValue={ defaultScale }\n\t\t\t\t\tvalue={ lastScale }\n\t\t\t\t\tonChange={ ( nextScale ) => {\n\t\t\t\t\t\tconst nextValue = { ...value };\n\n\t\t\t\t\t\t// 'fill' is CSS default, so it gets treated as null.\n\t\t\t\t\t\tnextScale = nextScale === 'fill' ? null : nextScale;\n\n\t\t\t\t\t\tsetLastScale( nextScale );\n\n\t\t\t\t\t\t// Update scale.\n\t\t\t\t\t\tif ( ! nextScale ) {\n\t\t\t\t\t\t\tdelete nextValue.scale;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tnextValue.scale = nextScale;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tonChange( nextValue );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default DimensionsTool;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,QAAQ,QAAQ,oBAAoB;;AAE7C;AACA;AACA;AACA,OAAOC,eAAe,MAAM,qBAAqB;AACjD,OAAOC,SAAS,MAAM,cAAc;AACpC,OAAOC,eAAe,MAAM,qBAAqB;;AAEjD;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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OAAOJ,SAAS,CAACZ,KAAK;MACvB,CAAC,MAAM;QACNY,SAAS,CAACZ,KAAK,GAAGgB,SAAS;MAC5B;MAEA1B,QAAQ,CAAEsB,SAAU,CAAC;IACtB;EAAG,CACH,CAED,CAAC;AAEL;AAEA,eAAezB,cAAc","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["useState","AspectRatioTool","ScaleTool","WidthHeightTool","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","DimensionsTool","panelId","value","onChange","aspectRatioOptions","defaultAspectRatio","scaleOptions","defaultScale","unitsOptions","width","undefined","height","aspectRatio","scale","lastScale","setLastScale","lastAspectRatio","setLastAspectRatio","aspectRatioValue","showScaleControl","children","options","defaultValue","nextAspectRatio","nextValue","units","nextWidth","nextHeight","nextScale"],"sources":["@wordpress/block-editor/src/components/dimensions-tool/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport AspectRatioTool from './aspect-ratio-tool';\nimport ScaleTool from './scale-tool';\nimport WidthHeightTool from './width-height-tool';\n\n/**\n * @typedef {import('@wordpress/components/build-types/select-control/types').SelectControlProps} SelectControlProps\n */\n\n/**\n * @typedef {import('@wordpress/components/build-types/unit-control/types').WPUnitControlUnit} WPUnitControlUnit\n */\n\n/**\n * @typedef {Object} Dimensions\n * @property {string} [width] CSS width property.\n * @property {string} [height] CSS height property.\n * @property {string} [scale] CSS object-fit property.\n * @property {string} [aspectRatio] CSS aspect-ratio property.\n */\n\n/**\n * @callback DimensionsControlsOnChange\n * @param {Dimensions} nextValue\n * @return {void}\n */\n\n/**\n * @typedef {Object} DimensionsControlsProps\n * @property {string} [panelId] ID of the panel that contains the controls.\n * @property {Dimensions} [value] Current dimensions values.\n * @property {DimensionsControlsOnChange} [onChange] Callback to update the dimensions values.\n * @property {SelectControlProps[]} [aspectRatioOptions] Aspect ratio options.\n * @property {SelectControlProps[]} [scaleOptions] Scale options.\n * @property {WPUnitControlUnit[]} [unitsOptions] Units options.\n */\n\n/**\n * Component that renders controls to edit the dimensions of an image or container.\n *\n * @param {DimensionsControlsProps} props The component props.\n *\n * @return {Element} The dimensions controls.\n */\nfunction DimensionsTool( {\n\tpanelId,\n\tvalue = {},\n\tonChange = () => {},\n\taspectRatioOptions, // Default options handled by AspectRatioTool.\n\tdefaultAspectRatio = 'auto', // Match CSS default value for aspect-ratio.\n\tscaleOptions, // Default options handled by ScaleTool.\n\tdefaultScale = 'fill', // Match CSS default value for object-fit.\n\tunitsOptions, // Default options handled by UnitControl.\n} ) {\n\t// Coerce undefined and CSS default values to be null.\n\tconst width =\n\t\tvalue.width === undefined || value.width === 'auto'\n\t\t\t? null\n\t\t\t: value.width;\n\tconst height =\n\t\tvalue.height === undefined || value.height === 'auto'\n\t\t\t? null\n\t\t\t: value.height;\n\tconst aspectRatio =\n\t\tvalue.aspectRatio === undefined || value.aspectRatio === 'auto'\n\t\t\t? null\n\t\t\t: value.aspectRatio;\n\tconst scale =\n\t\tvalue.scale === undefined || value.scale === 'fill'\n\t\t\t? null\n\t\t\t: value.scale;\n\n\t// Keep track of state internally, so when the value is cleared by means\n\t// other than directly editing that field, it's easier to restore the\n\t// previous value.\n\tconst [ lastScale, setLastScale ] = useState( scale );\n\tconst [ lastAspectRatio, setLastAspectRatio ] = useState( aspectRatio );\n\n\t// 'custom' is not a valid value for CSS aspect-ratio, but it is used in the\n\t// dropdown to indicate that setting both the width and height is the same\n\t// as a custom aspect ratio.\n\tconst aspectRatioValue = width && height ? 'custom' : lastAspectRatio;\n\n\tconst showScaleControl = aspectRatio || ( width && height );\n\n\treturn (\n\t\t<>\n\t\t\t<AspectRatioTool\n\t\t\t\tpanelId={ panelId }\n\t\t\t\toptions={ aspectRatioOptions }\n\t\t\t\tdefaultValue={ defaultAspectRatio }\n\t\t\t\tvalue={ aspectRatioValue }\n\t\t\t\tonChange={ ( nextAspectRatio ) => {\n\t\t\t\t\tconst nextValue = { ...value };\n\n\t\t\t\t\t// 'auto' is CSS default, so it gets treated as null.\n\t\t\t\t\tnextAspectRatio =\n\t\t\t\t\t\tnextAspectRatio === 'auto' ? null : nextAspectRatio;\n\n\t\t\t\t\tsetLastAspectRatio( nextAspectRatio );\n\n\t\t\t\t\t// Update aspectRatio.\n\t\t\t\t\tif ( ! nextAspectRatio ) {\n\t\t\t\t\t\tdelete nextValue.aspectRatio;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnextValue.aspectRatio = nextAspectRatio;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Auto-update scale.\n\t\t\t\t\tif ( ! nextAspectRatio ) {\n\t\t\t\t\t\tdelete nextValue.scale;\n\t\t\t\t\t} else if ( lastScale ) {\n\t\t\t\t\t\tnextValue.scale = lastScale;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnextValue.scale = defaultScale;\n\t\t\t\t\t\tsetLastScale( defaultScale );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Auto-update width and height.\n\t\t\t\t\tif ( 'custom' !== nextAspectRatio && width && height ) {\n\t\t\t\t\t\tdelete nextValue.height;\n\t\t\t\t\t}\n\n\t\t\t\t\tonChange( nextValue );\n\t\t\t\t} }\n\t\t\t/>\n\t\t\t<WidthHeightTool\n\t\t\t\tpanelId={ panelId }\n\t\t\t\tunits={ unitsOptions }\n\t\t\t\tvalue={ { width, height } }\n\t\t\t\tonChange={ ( { width: nextWidth, height: nextHeight } ) => {\n\t\t\t\t\tconst nextValue = { ...value };\n\n\t\t\t\t\t// 'auto' is CSS default, so it gets treated as null.\n\t\t\t\t\tnextWidth = nextWidth === 'auto' ? null : nextWidth;\n\t\t\t\t\tnextHeight = nextHeight === 'auto' ? null : nextHeight;\n\n\t\t\t\t\t// Update width.\n\t\t\t\t\tif ( ! nextWidth ) {\n\t\t\t\t\t\tdelete nextValue.width;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnextValue.width = nextWidth;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Update height.\n\t\t\t\t\tif ( ! nextHeight ) {\n\t\t\t\t\t\tdelete nextValue.height;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnextValue.height = nextHeight;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Auto-update aspectRatio.\n\t\t\t\t\tif ( nextWidth && nextHeight ) {\n\t\t\t\t\t\tdelete nextValue.aspectRatio;\n\t\t\t\t\t} else if ( lastAspectRatio ) {\n\t\t\t\t\t\tnextValue.aspectRatio = lastAspectRatio;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// No setting defaultAspectRatio here, because\n\t\t\t\t\t\t// aspectRatio is optional in this scenario,\n\t\t\t\t\t\t// unlike scale.\n\t\t\t\t\t}\n\n\t\t\t\t\t// Auto-update scale.\n\t\t\t\t\tif ( ! lastAspectRatio && !! nextWidth !== !! nextHeight ) {\n\t\t\t\t\t\tdelete nextValue.scale;\n\t\t\t\t\t} else if ( lastScale ) {\n\t\t\t\t\t\tnextValue.scale = lastScale;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnextValue.scale = defaultScale;\n\t\t\t\t\t\tsetLastScale( defaultScale );\n\t\t\t\t\t}\n\n\t\t\t\t\tonChange( nextValue );\n\t\t\t\t} }\n\t\t\t/>\n\t\t\t{ showScaleControl && (\n\t\t\t\t<ScaleTool\n\t\t\t\t\tpanelId={ panelId }\n\t\t\t\t\toptions={ scaleOptions }\n\t\t\t\t\tdefaultValue={ defaultScale }\n\t\t\t\t\tvalue={ lastScale }\n\t\t\t\t\tonChange={ ( nextScale ) => {\n\t\t\t\t\t\tconst nextValue = { ...value };\n\n\t\t\t\t\t\t// 'fill' is CSS default, so it gets treated as null.\n\t\t\t\t\t\tnextScale = nextScale === 'fill' ? null : nextScale;\n\n\t\t\t\t\t\tsetLastScale( nextScale );\n\n\t\t\t\t\t\t// Update scale.\n\t\t\t\t\t\tif ( ! nextScale ) {\n\t\t\t\t\t\t\tdelete nextValue.scale;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tnextValue.scale = nextScale;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tonChange( nextValue );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default DimensionsTool;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,QAAQ,QAAQ,oBAAoB;;AAE7C;AACA;AACA;AACA,OAAOC,eAAe,MAAM,qBAAqB;AACjD,OAAOC,SAAS,MAAM,cAAc;AACpC,OAAOC,eAAe,MAAM,qBAAqB;;AAEjD;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AANA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAOA,SAASC,cAAcA,CAAE;EACxBC,OAAO;EACPC,KAAK,GAAG,CAAC,CAAC;EACVC,QAAQ,GAAGA,CAAA,KAAM,CAAC,CAAC;EACnBC,kBAAkB;EAAE;EACpBC,kBAAkB,GAAG,MAAM;EAAE;EAC7BC,YAAY;EAAE;EACdC,YAAY,GAAG,MAAM;EAAE;EACvBC,YAAY,CAAE;AACf,CAAC,EAAG;EACH;EACA,MAAMC,KAAK,GACVP,KAAK,CAACO,KAAK,KAAKC,SAAS,IAAIR,KAAK,CAACO,KAAK,KAAK,MAAM,GAChD,IAAI,GACJP,KAAK,CAACO,KAAK;EACf,MAAME,MAAM,GACXT,KAAK,CAACS,MAAM,KAAKD,SAAS,IAAIR,KAAK,CAACS,MAAM,KAAK,MAAM,GAClD,IAAI,GACJT,KAAK,CAACS,MAAM;EAChB,MAAMC,WAAW,GAChBV,KAAK,CAACU,WAAW,KAAKF,SAAS,IAAIR,KAAK,CAACU,WAAW,KAAK,MAAM,GAC5D,IAAI,GACJV,KAAK,CAACU,WAAW;E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C,SAAS;QAC5B,CAAC,MAAM;UACNU,SAAS,CAACX,KAAK,GAAGN,YAAY;UAC9BQ,YAAY,CAAER,YAAa,CAAC;QAC7B;QAEAJ,QAAQ,CAAEqB,SAAU,CAAC;MACtB;IAAG,CACH,CAAC,EACAL,gBAAgB,iBACjBxB,IAAA,CAACH,SAAS;MACTS,OAAO,EAAGA,OAAS;MACnBoB,OAAO,EAAGf,YAAc;MACxBgB,YAAY,EAAGf,YAAc;MAC7BL,KAAK,EAAGY,SAAW;MACnBX,QAAQ,EAAKyB,SAAS,IAAM;QAC3B,MAAMJ,SAAS,GAAG;UAAE,GAAGtB;QAAM,CAAC;;QAE9B;QACA0B,SAAS,GAAGA,SAAS,KAAK,MAAM,GAAG,IAAI,GAAGA,SAAS;QAEnDb,YAAY,CAAEa,SAAU,CAAC;;QAEzB;QACA,IAAK,CAAEA,SAAS,EAAG;UAClB,OAAOJ,SAAS,CAACX,KAAK;QACvB,CAAC,MAAM;UACNW,SAAS,CAACX,KAAK,GAAGe,SAAS;QAC5B;QAEAzB,QAAQ,CAAEqB,SAAU,CAAC;MACtB;IAAG,CACH,CACD;EAAA,CACA,CAAC;AAEL;AAEA,eAAexB,cAAc","ignoreList":[]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { createElement } from "react";
|
|
2
1
|
/**
|
|
3
2
|
* WordPress dependencies
|
|
4
3
|
*/
|
|
@@ -19,6 +18,7 @@ import { __, _x } from '@wordpress/i18n';
|
|
|
19
18
|
*
|
|
20
19
|
* @type {SelectControlProps[]}
|
|
21
20
|
*/
|
|
21
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
22
|
const DEFAULT_SCALE_OPTIONS = [{
|
|
23
23
|
value: 'fill',
|
|
24
24
|
label: _x('Fill', 'Scale option for dimensions control'),
|
|
@@ -81,22 +81,23 @@ export default function ScaleTool({
|
|
|
81
81
|
return acc;
|
|
82
82
|
}, {});
|
|
83
83
|
}, [options]);
|
|
84
|
-
return
|
|
84
|
+
return /*#__PURE__*/_jsx(ToolsPanelItem, {
|
|
85
85
|
label: __('Scale'),
|
|
86
86
|
isShownByDefault: isShownByDefault,
|
|
87
87
|
hasValue: () => displayValue !== defaultValue,
|
|
88
88
|
onDeselect: () => onChange(defaultValue),
|
|
89
|
-
panelId: panelId
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
89
|
+
panelId: panelId,
|
|
90
|
+
children: /*#__PURE__*/_jsx(ToggleGroupControl, {
|
|
91
|
+
label: __('Scale'),
|
|
92
|
+
isBlock: true,
|
|
93
|
+
help: scaleHelp[displayValue],
|
|
94
|
+
value: displayValue,
|
|
95
|
+
onChange: onChange,
|
|
96
|
+
size: "__unstable-large",
|
|
97
|
+
children: options.map(option => /*#__PURE__*/_jsx(ToggleGroupControlOption, {
|
|
98
|
+
...option
|
|
99
|
+
}, option.value))
|
|
100
|
+
})
|
|
101
|
+
});
|
|
101
102
|
}
|
|
102
103
|
//# sourceMappingURL=scale-tool.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__experimentalToolsPanelItem","ToolsPanelItem","__experimentalToggleGroupControl","ToggleGroupControl","__experimentalToggleGroupControlOption","ToggleGroupControlOption","useMemo","__","_x","DEFAULT_SCALE_OPTIONS","value","label","help","ScaleTool","panelId","onChange","options","defaultValue","isShownByDefault","displayValue","scaleHelp","reduce","acc","option","
|
|
1
|
+
{"version":3,"names":["__experimentalToolsPanelItem","ToolsPanelItem","__experimentalToggleGroupControl","ToggleGroupControl","__experimentalToggleGroupControlOption","ToggleGroupControlOption","useMemo","__","_x","jsx","_jsx","DEFAULT_SCALE_OPTIONS","value","label","help","ScaleTool","panelId","onChange","options","defaultValue","isShownByDefault","displayValue","scaleHelp","reduce","acc","option","hasValue","onDeselect","children","isBlock","size","map"],"sources":["@wordpress/block-editor/src/components/dimensions-tool/scale-tool.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOption as ToggleGroupControlOption,\n} from '@wordpress/components';\nimport { useMemo } from '@wordpress/element';\nimport { __, _x } from '@wordpress/i18n';\n\n/**\n * @typedef {import('@wordpress/components/build-types/select-control/types').SelectControlProps} SelectControlProps\n */\n\n/**\n * The descriptions are purposely made generic as object-fit could be used for\n * any replaced element. Provide your own set of options if you need different\n * help text or labels.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/Replaced_element\n *\n * @type {SelectControlProps[]}\n */\nconst DEFAULT_SCALE_OPTIONS = [\n\t{\n\t\tvalue: 'fill',\n\t\tlabel: _x( 'Fill', 'Scale option for dimensions control' ),\n\t\thelp: __( 'Fill the space by stretching the content.' ),\n\t},\n\t{\n\t\tvalue: 'contain',\n\t\tlabel: _x( 'Contain', 'Scale option for dimensions control' ),\n\t\thelp: __( 'Fit the content to the space without clipping.' ),\n\t},\n\t{\n\t\tvalue: 'cover',\n\t\tlabel: _x( 'Cover', 'Scale option for dimensions control' ),\n\t\thelp: __( \"Fill the space by clipping what doesn't fit.\" ),\n\t},\n\t{\n\t\tvalue: 'none',\n\t\tlabel: _x( 'None', 'Scale option for dimensions control' ),\n\t\thelp: __(\n\t\t\t'Do not adjust the sizing of the content. Content that is too large will be clipped, and content that is too small will have additional padding.'\n\t\t),\n\t},\n\t{\n\t\tvalue: 'scale-down',\n\t\tlabel: _x( 'Scale down', 'Scale option for dimensions control' ),\n\t\thelp: __(\n\t\t\t'Scale down the content to fit the space if it is too big. Content that is too small will have additional padding.'\n\t\t),\n\t},\n];\n\n/**\n * @callback ScaleToolPropsOnChange\n * @param {string} nextValue New scale value.\n * @return {void}\n */\n\n/**\n * @typedef {Object} ScaleToolProps\n * @property {string} [panelId] ID of the panel that contains the controls.\n * @property {string} [value] Current scale value.\n * @property {ScaleToolPropsOnChange} [onChange] Callback to update the scale value.\n * @property {SelectControlProps[]} [options] Scale options.\n * @property {string} [defaultValue] Default scale value.\n * @property {boolean} [showControl=true] Whether to show the control.\n * @property {boolean} [isShownByDefault=true] Whether the tool panel is shown by default.\n */\n\n/**\n * A tool to select the CSS object-fit property for the image.\n *\n * @param {ScaleToolProps} props\n *\n * @return {import('react').ReactElement} The scale tool.\n */\nexport default function ScaleTool( {\n\tpanelId,\n\tvalue,\n\tonChange,\n\toptions = DEFAULT_SCALE_OPTIONS,\n\tdefaultValue = DEFAULT_SCALE_OPTIONS[ 0 ].value,\n\tisShownByDefault = true,\n} ) {\n\t// Match the CSS default so if the value is used directly in CSS it will look correct in the control.\n\tconst displayValue = value ?? 'fill';\n\n\tconst scaleHelp = useMemo( () => {\n\t\treturn options.reduce( ( acc, option ) => {\n\t\t\tacc[ option.value ] = option.help;\n\t\t\treturn acc;\n\t\t}, {} );\n\t}, [ options ] );\n\n\treturn (\n\t\t<ToolsPanelItem\n\t\t\tlabel={ __( 'Scale' ) }\n\t\t\tisShownByDefault={ isShownByDefault }\n\t\t\thasValue={ () => displayValue !== defaultValue }\n\t\t\tonDeselect={ () => onChange( defaultValue ) }\n\t\t\tpanelId={ panelId }\n\t\t>\n\t\t\t<ToggleGroupControl\n\t\t\t\tlabel={ __( 'Scale' ) }\n\t\t\t\tisBlock\n\t\t\t\thelp={ scaleHelp[ displayValue ] }\n\t\t\t\tvalue={ displayValue }\n\t\t\t\tonChange={ onChange }\n\t\t\t\tsize=\"__unstable-large\"\n\t\t\t>\n\t\t\t\t{ options.map( ( option ) => (\n\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\tkey={ option.value }\n\t\t\t\t\t\t{ ...option }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</ToggleGroupControl>\n\t\t</ToolsPanelItem>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SACCA,4BAA4B,IAAIC,cAAc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AE,CAAC,CAAE,CAACC,KAAK;EAC/CQ,gBAAgB,GAAG;AACpB,CAAC,EAAG;EACH;EACA,MAAMC,YAAY,GAAGT,KAAK,aAALA,KAAK,cAALA,KAAK,GAAI,MAAM;EAEpC,MAAMU,SAAS,GAAGhB,OAAO,CAAE,MAAM;IAChC,OAAOY,OAAO,CAACK,MAAM,CAAE,CAAEC,GAAG,EAAEC,MAAM,KAAM;MACzCD,GAAG,CAAEC,MAAM,CAACb,KAAK,CAAE,GAAGa,MAAM,CAACX,IAAI;MACjC,OAAOU,GAAG;IACX,CAAC,EAAE,CAAC,CAAE,CAAC;EACR,CAAC,EAAE,CAAEN,OAAO,CAAG,CAAC;EAEhB,oBACCR,IAAA,CAACT,cAAc;IACdY,KAAK,EAAGN,EAAE,CAAE,OAAQ,CAAG;IACvBa,gBAAgB,EAAGA,gBAAkB;IACrCM,QAAQ,EAAGA,CAAA,KAAML,YAAY,KAAKF,YAAc;IAChDQ,UAAU,EAAGA,CAAA,KAAMV,QAAQ,CAAEE,YAAa,CAAG;IAC7CH,OAAO,EAAGA,OAAS;IAAAY,QAAA,eAEnBlB,IAAA,CAACP,kBAAkB;MAClBU,KAAK,EAAGN,EAAE,CAAE,OAAQ,CAAG;MACvBsB,OAAO;MACPf,IAAI,EAAGQ,SAAS,CAAED,YAAY,CAAI;MAClCT,KAAK,EAAGS,YAAc;MACtBJ,QAAQ,EAAGA,QAAU;MACrBa,IAAI,EAAC,kBAAkB;MAAAF,QAAA,EAErBV,OAAO,CAACa,GAAG,CAAIN,MAAM,iBACtBf,IAAA,CAACL,wBAAwB;QAAA,GAEnBoB;MAAM,GADLA,MAAM,CAACb,KAEb,CACA;IAAC,CACgB;EAAC,CACN,CAAC;AAEnB","ignoreList":[]}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _styled from "@emotion/styled/base";
|
|
2
|
-
import { createElement, Fragment } from "react";
|
|
3
2
|
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
4
3
|
/**
|
|
5
4
|
* External dependencies
|
|
@@ -10,6 +9,9 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
10
9
|
*/
|
|
11
10
|
import { __experimentalToolsPanelItem as ToolsPanelItem, __experimentalUnitControl as UnitControl } from '@wordpress/components';
|
|
12
11
|
import { __ } from '@wordpress/i18n';
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
14
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
15
|
const SingleColumnToolsPanelItem = /*#__PURE__*/_styled(ToolsPanelItem, process.env.NODE_ENV === "production" ? {
|
|
14
16
|
target: "ef8pe3d0"
|
|
15
17
|
} : {
|
|
@@ -21,7 +23,7 @@ const SingleColumnToolsPanelItem = /*#__PURE__*/_styled(ToolsPanelItem, process.
|
|
|
21
23
|
} : {
|
|
22
24
|
name: "957xgf",
|
|
23
25
|
styles: "grid-column:span 1",
|
|
24
|
-
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvYmxvY2stZWRpdG9yL3NyYy9jb21wb25lbnRzL2RpbWVuc2lvbnMtdG9vbC93aWR0aC1oZWlnaHQtdG9vbC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFjMkQiLCJmaWxlIjoiQHdvcmRwcmVzcy9ibG9jay1lZGl0b3Ivc3JjL2NvbXBvbmVudHMvZGltZW5zaW9ucy10b29sL3dpZHRoLWhlaWdodC10b29sLmpzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vd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uIl19 */",
|
|
25
27
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
26
28
|
});
|
|
27
29
|
|
|
@@ -80,36 +82,40 @@ export default function WidthHeightTool({
|
|
|
80
82
|
}
|
|
81
83
|
onChange(nextValue);
|
|
82
84
|
};
|
|
83
|
-
return
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
85
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
86
|
+
children: [/*#__PURE__*/_jsx(SingleColumnToolsPanelItem, {
|
|
87
|
+
label: __('Width'),
|
|
88
|
+
isShownByDefault: isShownByDefault,
|
|
89
|
+
hasValue: () => width !== '',
|
|
90
|
+
onDeselect: onDimensionChange('width'),
|
|
91
|
+
panelId: panelId,
|
|
92
|
+
children: /*#__PURE__*/_jsx(UnitControl, {
|
|
93
|
+
label: __('Width'),
|
|
94
|
+
placeholder: __('Auto'),
|
|
95
|
+
labelPosition: "top",
|
|
96
|
+
units: units,
|
|
97
|
+
min: 0,
|
|
98
|
+
value: width,
|
|
99
|
+
onChange: onDimensionChange('width'),
|
|
100
|
+
size: "__unstable-large"
|
|
101
|
+
})
|
|
102
|
+
}), /*#__PURE__*/_jsx(SingleColumnToolsPanelItem, {
|
|
103
|
+
label: __('Height'),
|
|
104
|
+
isShownByDefault: isShownByDefault,
|
|
105
|
+
hasValue: () => height !== '',
|
|
106
|
+
onDeselect: onDimensionChange('height'),
|
|
107
|
+
panelId: panelId,
|
|
108
|
+
children: /*#__PURE__*/_jsx(UnitControl, {
|
|
109
|
+
label: __('Height'),
|
|
110
|
+
placeholder: __('Auto'),
|
|
111
|
+
labelPosition: "top",
|
|
112
|
+
units: units,
|
|
113
|
+
min: 0,
|
|
114
|
+
value: height,
|
|
115
|
+
onChange: onDimensionChange('height'),
|
|
116
|
+
size: "__unstable-large"
|
|
117
|
+
})
|
|
118
|
+
})]
|
|
119
|
+
});
|
|
114
120
|
}
|
|
115
121
|
//# sourceMappingURL=width-height-tool.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__experimentalToolsPanelItem","ToolsPanelItem","__experimentalUnitControl","UnitControl","__","SingleColumnToolsPanelItem","_styled","process","env","NODE_ENV","target","label","name","styles","map","toString","_EMOTION_STRINGIFIED_CSS_ERROR__","WidthHeightTool","panelId","value","onChange","units","isShownByDefault","_value$width","_value$height","width","height","onDimensionChange","dimension","nextDimension","nextValue","
|
|
1
|
+
{"version":3,"names":["__experimentalToolsPanelItem","ToolsPanelItem","__experimentalUnitControl","UnitControl","__","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","SingleColumnToolsPanelItem","_styled","process","env","NODE_ENV","target","label","name","styles","map","toString","_EMOTION_STRINGIFIED_CSS_ERROR__","WidthHeightTool","panelId","value","onChange","units","isShownByDefault","_value$width","_value$height","width","height","onDimensionChange","dimension","nextDimension","nextValue","children","hasValue","onDeselect","placeholder","labelPosition","min","size"],"sources":["@wordpress/block-editor/src/components/dimensions-tool/width-height-tool.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\n\n/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n\t__experimentalUnitControl as UnitControl,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\nconst SingleColumnToolsPanelItem = styled( ToolsPanelItem )`\n\tgrid-column: span 1;\n`;\n\n/**\n * @typedef {import('@wordpress/components/build-types/unit-control/types').WPUnitControlUnit} WPUnitControlUnit\n */\n\n/**\n * @typedef {Object} WidthHeightToolValue\n * @property {string} [width] Width CSS value.\n * @property {string} [height] Height CSS value.\n */\n\n/**\n * @callback WidthHeightToolOnChange\n * @param {WidthHeightToolValue} nextValue Next dimensions value.\n * @return {void}\n */\n\n/**\n * @typedef {Object} WidthHeightToolProps\n * @property {string} [panelId] ID of the panel that contains the controls.\n * @property {WidthHeightToolValue} [value] Current dimensions values.\n * @property {WidthHeightToolOnChange} [onChange] Callback to update the dimensions values.\n * @property {WPUnitControlUnit[]} [units] Units options.\n * @property {boolean} [isShownByDefault] Whether the panel is shown by default.\n */\n\n/**\n * Component that renders controls to edit the dimensions of an image or container.\n *\n * @param {WidthHeightToolProps} props The component props.\n *\n * @return {import('react').ReactElement} The width and height tool.\n */\nexport default function WidthHeightTool( {\n\tpanelId,\n\tvalue = {},\n\tonChange = () => {},\n\tunits,\n\tisShownByDefault = true,\n} ) {\n\t// null, undefined, and 'auto' all represent the default value.\n\tconst width = value.width === 'auto' ? '' : value.width ?? '';\n\tconst height = value.height === 'auto' ? '' : value.height ?? '';\n\n\tconst onDimensionChange = ( dimension ) => ( nextDimension ) => {\n\t\tconst nextValue = { ...value };\n\t\t// Empty strings or undefined may be passed and both represent removing the value.\n\t\tif ( ! nextDimension ) {\n\t\t\tdelete nextValue[ dimension ];\n\t\t} else {\n\t\t\tnextValue[ dimension ] = nextDimension;\n\t\t}\n\t\tonChange( nextValue );\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<SingleColumnToolsPanelItem\n\t\t\t\tlabel={ __( 'Width' ) }\n\t\t\t\tisShownByDefault={ isShownByDefault }\n\t\t\t\thasValue={ () => width !== '' }\n\t\t\t\tonDeselect={ onDimensionChange( 'width' ) }\n\t\t\t\tpanelId={ panelId }\n\t\t\t>\n\t\t\t\t<UnitControl\n\t\t\t\t\tlabel={ __( 'Width' ) }\n\t\t\t\t\tplaceholder={ __( 'Auto' ) }\n\t\t\t\t\tlabelPosition=\"top\"\n\t\t\t\t\tunits={ units }\n\t\t\t\t\tmin={ 0 }\n\t\t\t\t\tvalue={ width }\n\t\t\t\t\tonChange={ onDimensionChange( 'width' ) }\n\t\t\t\t\tsize=\"__unstable-large\"\n\t\t\t\t/>\n\t\t\t</SingleColumnToolsPanelItem>\n\t\t\t<SingleColumnToolsPanelItem\n\t\t\t\tlabel={ __( 'Height' ) }\n\t\t\t\tisShownByDefault={ isShownByDefault }\n\t\t\t\thasValue={ () => height !== '' }\n\t\t\t\tonDeselect={ onDimensionChange( 'height' ) }\n\t\t\t\tpanelId={ panelId }\n\t\t\t>\n\t\t\t\t<UnitControl\n\t\t\t\t\tlabel={ __( 'Height' ) }\n\t\t\t\t\tplaceholder={ __( 'Auto' ) }\n\t\t\t\t\tlabelPosition=\"top\"\n\t\t\t\t\tunits={ units }\n\t\t\t\t\tmin={ 0 }\n\t\t\t\t\tvalue={ height }\n\t\t\t\t\tonChange={ onDimensionChange( 'height' ) }\n\t\t\t\t\tsize=\"__unstable-large\"\n\t\t\t\t/>\n\t\t\t</SingleColumnToolsPanelItem>\n\t\t</>\n\t);\n}\n"],"mappings":";;AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,SACCA,4BAA4B,IAAIC,cAAc,EAC9CC,yBAAyB,IAAIC,WAAW,QAClC,uBAAuB;AAC9B,SAASC,EAAE,QAAQ,iBAAiB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAErC,MAAMC,0BAA0B,gBAAGC,OAAA,CAAQX,cAAc,EAAAY,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,CAAC,CAAC,CAAAJ,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAG,IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,GAAA;EAAAC,QAAA,EAAAC;AAAA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