@wordpress/block-editor 12.7.0 → 12.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/README.md +42 -0
- package/build/autocompleters/block.js +3 -22
- package/build/autocompleters/block.js.map +1 -1
- package/build/autocompleters/link.js +3 -14
- package/build/autocompleters/link.js.map +1 -1
- package/build/components/alignment-control/index.js +6 -10
- package/build/components/alignment-control/index.js.map +1 -1
- package/build/components/alignment-control/ui.js +3 -11
- package/build/components/alignment-control/ui.js.map +1 -1
- package/build/components/autocomplete/index.js +8 -22
- package/build/components/autocomplete/index.js.map +1 -1
- package/build/components/block-actions/index.js +3 -26
- package/build/components/block-actions/index.js.map +1 -1
- package/build/components/block-alignment-control/constants.js +1 -3
- package/build/components/block-alignment-control/constants.js.map +1 -1
- package/build/components/block-alignment-control/index.js +6 -10
- package/build/components/block-alignment-control/index.js.map +1 -1
- package/build/components/block-alignment-control/ui.js +7 -16
- package/build/components/block-alignment-control/ui.js.map +1 -1
- package/build/components/block-alignment-control/ui.native.js +5 -13
- package/build/components/block-alignment-control/ui.native.js.map +1 -1
- package/build/components/block-alignment-control/use-available-alignments.js +10 -18
- package/build/components/block-alignment-control/use-available-alignments.js.map +1 -1
- package/build/components/block-alignment-matrix-control/index.js +1 -8
- package/build/components/block-alignment-matrix-control/index.js.map +1 -1
- package/build/components/block-breadcrumb/index.js +2 -15
- package/build/components/block-breadcrumb/index.js.map +1 -1
- package/build/components/block-caption/index.native.js +7 -16
- package/build/components/block-caption/index.native.js.map +1 -1
- package/build/components/block-card/index.js +5 -17
- package/build/components/block-card/index.js.map +1 -1
- package/build/components/block-compare/block-view.js +1 -4
- package/build/components/block-compare/block-view.js.map +1 -1
- package/build/components/block-compare/index.js +4 -12
- package/build/components/block-compare/index.js.map +1 -1
- package/build/components/block-content-overlay/index.js +1 -3
- package/build/components/block-content-overlay/index.js.map +1 -1
- package/build/components/block-context/index.js +3 -5
- package/build/components/block-context/index.js.map +1 -1
- package/build/components/block-controls/fill.js +3 -8
- package/build/components/block-controls/fill.js.map +1 -1
- package/build/components/block-controls/groups.js +1 -2
- package/build/components/block-controls/groups.js.map +1 -1
- package/build/components/block-controls/hook.js +1 -11
- package/build/components/block-controls/hook.js.map +1 -1
- package/build/components/block-controls/index.js +3 -9
- package/build/components/block-controls/index.js.map +1 -1
- package/build/components/block-controls/slot.js +3 -14
- package/build/components/block-controls/slot.js.map +1 -1
- package/build/components/block-controls/slot.native.js +5 -12
- package/build/components/block-controls/slot.native.js.map +1 -1
- package/build/components/block-controls/use-has-block-controls.js +43 -0
- package/build/components/block-controls/use-has-block-controls.js.map +1 -0
- package/build/components/block-draggable/draggable-chip.js +2 -9
- package/build/components/block-draggable/draggable-chip.js.map +1 -1
- package/build/components/block-draggable/draggable-chip.native.js +2 -9
- package/build/components/block-draggable/draggable-chip.native.js.map +1 -1
- package/build/components/block-draggable/dropping-insertion-point.native.js +2 -23
- package/build/components/block-draggable/dropping-insertion-point.native.js.map +1 -1
- package/build/components/block-draggable/index.js +3 -15
- package/build/components/block-draggable/index.js.map +1 -1
- package/build/components/block-draggable/index.native.js +7 -56
- package/build/components/block-draggable/index.native.js.map +1 -1
- package/build/components/block-draggable/use-scroll-when-dragging.js +9 -13
- package/build/components/block-draggable/use-scroll-when-dragging.js.map +1 -1
- package/build/components/block-draggable/use-scroll-when-dragging.native.js +2 -14
- package/build/components/block-draggable/use-scroll-when-dragging.native.js.map +1 -1
- package/build/components/block-edit/context.js +1 -3
- package/build/components/block-edit/context.js.map +1 -1
- package/build/components/block-edit/edit.js +13 -23
- package/build/components/block-edit/edit.js.map +1 -1
- package/build/components/block-edit/edit.native.js +4 -14
- package/build/components/block-edit/edit.native.js.map +1 -1
- package/build/components/block-edit/index.js +5 -8
- package/build/components/block-edit/index.js.map +1 -1
- package/build/components/block-edit-visually-button/index.js +1 -8
- package/build/components/block-edit-visually-button/index.js.map +1 -1
- package/build/components/block-editing-mode/index.js +2 -11
- package/build/components/block-editing-mode/index.js.map +1 -1
- package/build/components/block-full-height-alignment-control/index.js +1 -6
- package/build/components/block-full-height-alignment-control/index.js.map +1 -1
- package/build/components/block-heading-level-dropdown/heading-level-icon.js +2 -6
- package/build/components/block-heading-level-dropdown/heading-level-icon.js.map +1 -1
- package/build/components/block-heading-level-dropdown/index.js +4 -10
- package/build/components/block-heading-level-dropdown/index.js.map +1 -1
- package/build/components/block-heading-level-dropdown/index.native.js +2 -8
- package/build/components/block-heading-level-dropdown/index.native.js.map +1 -1
- package/build/components/block-icon/index.js +2 -10
- package/build/components/block-icon/index.js.map +1 -1
- package/build/components/block-icon/index.native.js +1 -10
- package/build/components/block-icon/index.native.js.map +1 -1
- package/build/components/block-info-slot-fill/index.js +5 -13
- package/build/components/block-info-slot-fill/index.js.map +1 -1
- package/build/components/block-inspector/index.js +11 -46
- package/build/components/block-inspector/index.js.map +1 -1
- package/build/components/block-inspector/useBlockInspectorAnimationSettings.js +7 -10
- package/build/components/block-inspector/useBlockInspectorAnimationSettings.js.map +1 -1
- package/build/components/block-list/block-crash-boundary.js +1 -7
- package/build/components/block-list/block-crash-boundary.js.map +1 -1
- package/build/components/block-list/block-crash-warning.js +1 -7
- package/build/components/block-list/block-crash-warning.js.map +1 -1
- package/build/components/block-list/block-html.js +7 -15
- package/build/components/block-list/block-html.js.map +1 -1
- package/build/components/block-list/block-invalid-warning.js +3 -16
- package/build/components/block-list/block-invalid-warning.js.map +1 -1
- package/build/components/block-list/block-invalid-warning.native.js +4 -16
- package/build/components/block-list/block-invalid-warning.native.js.map +1 -1
- package/build/components/block-list/block-list-block-context.js +1 -2
- package/build/components/block-list/block-list-block-context.js.map +1 -1
- package/build/components/block-list/block-list-context.native.js +10 -25
- package/build/components/block-list/block-list-context.native.js.map +1 -1
- package/build/components/block-list/block-list-item-cell.native.js +1 -8
- package/build/components/block-list/block-list-item-cell.native.js.map +1 -1
- package/build/components/block-list/block-list-item.native.js +5 -18
- package/build/components/block-list/block-list-item.native.js.map +1 -1
- package/build/components/block-list/block-outline.native.js +2 -9
- package/build/components/block-list/block-outline.native.js.map +1 -1
- package/build/components/block-list/block-selection-button.native.js +2 -21
- package/build/components/block-list/block-selection-button.native.js.map +1 -1
- package/build/components/block-list/block.js +38 -81
- package/build/components/block-list/block.js.map +1 -1
- package/build/components/block-list/block.native.js +40 -71
- package/build/components/block-list/block.native.js.map +1 -1
- package/build/components/block-list/grid-item.native.js +1 -6
- package/build/components/block-list/grid-item.native.js.map +1 -1
- package/build/components/block-list/index.js +9 -28
- package/build/components/block-list/index.js.map +1 -1
- package/build/components/block-list/index.native.js +18 -49
- package/build/components/block-list/index.native.js.map +1 -1
- package/build/components/block-list/insertion-point.native.js +1 -9
- package/build/components/block-list/insertion-point.native.js.map +1 -1
- package/build/components/block-list/layout.js +3 -13
- package/build/components/block-list/layout.js.map +1 -1
- package/build/components/block-list/subdirectory-icon.js +3 -6
- package/build/components/block-list/subdirectory-icon.js.map +1 -1
- package/build/components/block-list/use-block-props/index.js +10 -35
- package/build/components/block-list/use-block-props/index.js.map +1 -1
- package/build/components/block-list/use-block-props/index.native.js +5 -5
- package/build/components/block-list/use-block-props/index.native.js.map +1 -1
- package/build/components/block-list/use-block-props/use-block-class-names.js +2 -8
- package/build/components/block-list/use-block-props/use-block-class-names.js.map +1 -1
- package/build/components/block-list/use-block-props/use-block-custom-class-name.js +0 -8
- package/build/components/block-list/use-block-props/use-block-custom-class-name.js.map +1 -1
- package/build/components/block-list/use-block-props/use-block-default-class-name.js +0 -6
- package/build/components/block-list/use-block-props/use-block-default-class-name.js.map +1 -1
- package/build/components/block-list/use-block-props/use-block-moving-mode-class-names.js +3 -10
- package/build/components/block-list/use-block-props/use-block-moving-mode-class-names.js.map +1 -1
- package/build/components/block-list/use-block-props/use-block-refs.js +9 -18
- package/build/components/block-list/use-block-props/use-block-refs.js.map +1 -1
- package/build/components/block-list/use-block-props/use-focus-first-element.js +13 -27
- package/build/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
- package/build/components/block-list/use-block-props/use-focus-handler.js +6 -14
- package/build/components/block-list/use-block-props/use-focus-handler.js.map +1 -1
- package/build/components/block-list/use-block-props/use-intersection-observer.js +1 -4
- package/build/components/block-list/use-block-props/use-intersection-observer.js.map +1 -1
- package/build/components/block-list/use-block-props/use-is-hovered.js +4 -8
- package/build/components/block-list/use-block-props/use-is-hovered.js.map +1 -1
- package/build/components/block-list/use-block-props/use-nav-mode-exit.js +2 -6
- package/build/components/block-list/use-block-props/use-nav-mode-exit.js.map +1 -1
- package/build/components/block-list/use-block-props/use-selected-block-event-handlers.js +2 -15
- package/build/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +1 -1
- package/build/components/block-list/use-in-between-inserter.js +15 -37
- package/build/components/block-list/use-in-between-inserter.js.map +1 -1
- package/build/components/block-list-appender/index.js +12 -32
- package/build/components/block-list-appender/index.js.map +1 -1
- package/build/components/block-list-appender/index.native.js +1 -14
- package/build/components/block-list-appender/index.native.js.map +1 -1
- package/build/components/block-lock/index.js +0 -5
- package/build/components/block-lock/index.js.map +1 -1
- package/build/components/block-lock/menu-item.js +1 -10
- package/build/components/block-lock/menu-item.js.map +1 -1
- package/build/components/block-lock/modal.js +10 -22
- package/build/components/block-lock/modal.js.map +1 -1
- package/build/components/block-lock/toolbar.js +6 -16
- package/build/components/block-lock/toolbar.js.map +1 -1
- package/build/components/block-lock/use-block-lock.js +0 -3
- package/build/components/block-lock/use-block-lock.js.map +1 -1
- package/build/components/block-media-update-progress/index.native.js +9 -64
- package/build/components/block-media-update-progress/index.native.js.map +1 -1
- package/build/components/block-mover/button.js +1 -23
- package/build/components/block-mover/button.js.map +1 -1
- package/build/components/block-mover/index.js +4 -18
- package/build/components/block-mover/index.js.map +1 -1
- package/build/components/block-mover/index.native.js +3 -21
- package/build/components/block-mover/index.native.js.map +1 -1
- package/build/components/block-mover/mover-description.js +41 -63
- package/build/components/block-mover/mover-description.js.map +1 -1
- package/build/components/block-mover/mover-description.native.js +1 -20
- package/build/components/block-mover/mover-description.native.js.map +1 -1
- package/build/components/block-navigation/dropdown.js +6 -17
- package/build/components/block-navigation/dropdown.js.map +1 -1
- package/build/components/block-parent-selector/index.js +5 -22
- package/build/components/block-parent-selector/index.js.map +1 -1
- package/build/components/block-pattern-setup/constants.js.map +1 -1
- package/build/components/block-pattern-setup/index.js +3 -23
- package/build/components/block-pattern-setup/index.js.map +1 -1
- package/build/components/block-pattern-setup/setup-toolbar.js +1 -9
- package/build/components/block-pattern-setup/setup-toolbar.js.map +1 -1
- package/build/components/block-pattern-setup/use-patterns-setup.js +1 -6
- package/build/components/block-pattern-setup/use-patterns-setup.js.map +1 -1
- package/build/components/block-patterns-list/index.js +3 -17
- package/build/components/block-patterns-list/index.js.map +1 -1
- package/build/components/block-popover/drop-zone.js +1 -12
- package/build/components/block-popover/drop-zone.js.map +1 -1
- package/build/components/block-popover/inbetween.js +16 -33
- package/build/components/block-popover/inbetween.js.map +1 -1
- package/build/components/block-popover/index.js +15 -26
- package/build/components/block-popover/index.js.map +1 -1
- package/build/components/block-popover/use-popover-scroll.js +2 -7
- package/build/components/block-popover/use-popover-scroll.js.map +1 -1
- package/build/components/block-preview/auto.js +9 -18
- package/build/components/block-preview/auto.js.map +1 -1
- package/build/components/block-preview/index.js +8 -24
- package/build/components/block-preview/index.js.map +1 -1
- package/build/components/block-quick-navigation/index.js +2 -13
- package/build/components/block-quick-navigation/index.js.map +1 -1
- package/build/components/block-removal-warning-modal/index.js +5 -15
- package/build/components/block-removal-warning-modal/index.js.map +1 -1
- package/build/components/block-selection-clearer/index.js +2 -11
- package/build/components/block-selection-clearer/index.js.map +1 -1
- package/build/components/block-settings/button.native.js +3 -10
- package/build/components/block-settings/button.native.js.map +1 -1
- package/build/components/block-settings/container.native.js +3 -9
- package/build/components/block-settings/container.native.js.map +1 -1
- package/build/components/block-settings/index.native.js +0 -5
- package/build/components/block-settings/index.native.js.map +1 -1
- package/build/components/block-settings-menu/block-convert-button.js +1 -5
- package/build/components/block-settings-menu/block-convert-button.js.map +1 -1
- package/build/components/block-settings-menu/block-html-convert-button.js +0 -9
- package/build/components/block-settings-menu/block-html-convert-button.js.map +1 -1
- package/build/components/block-settings-menu/block-mode-toggle.js +1 -13
- package/build/components/block-settings-menu/block-mode-toggle.js.map +1 -1
- package/build/components/block-settings-menu/block-settings-dropdown.js +14 -37
- package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build/components/block-settings-menu/block-settings-menu-first-item.js +1 -2
- package/build/components/block-settings-menu/block-settings-menu-first-item.js.map +1 -1
- package/build/components/block-settings-menu/index.js +1 -6
- package/build/components/block-settings-menu/index.js.map +1 -1
- package/build/components/block-settings-menu-controls/index.js +13 -22
- package/build/components/block-settings-menu-controls/index.js.map +1 -1
- package/build/components/block-styles/index.js +2 -20
- package/build/components/block-styles/index.js.map +1 -1
- package/build/components/block-styles/index.native.js +1 -17
- package/build/components/block-styles/index.native.js.map +1 -1
- package/build/components/block-styles/menu-items.js +1 -9
- package/build/components/block-styles/menu-items.js.map +1 -1
- package/build/components/block-styles/preview-panel.js +5 -8
- package/build/components/block-styles/preview-panel.js.map +1 -1
- package/build/components/block-styles/preview.native.js +3 -19
- package/build/components/block-styles/preview.native.js.map +1 -1
- package/build/components/block-styles/use-styles-for-block.js +1 -15
- package/build/components/block-styles/use-styles-for-block.js.map +1 -1
- package/build/components/block-styles/utils.js +3 -16
- package/build/components/block-styles/utils.js.map +1 -1
- package/build/components/block-switcher/block-styles-menu.js +1 -6
- package/build/components/block-switcher/block-styles-menu.js.map +1 -1
- package/build/components/block-switcher/block-transformations-menu.js +4 -18
- package/build/components/block-switcher/block-transformations-menu.js.map +1 -1
- package/build/components/block-switcher/block-transformations-menu.native.js +4 -18
- package/build/components/block-switcher/block-transformations-menu.native.js.map +1 -1
- package/build/components/block-switcher/block-variation-transformations.js +3 -16
- package/build/components/block-switcher/block-variation-transformations.js.map +1 -1
- package/build/components/block-switcher/index.js +12 -43
- package/build/components/block-switcher/index.js.map +1 -1
- package/build/components/block-switcher/pattern-transformations-menu.js +3 -14
- package/build/components/block-switcher/pattern-transformations-menu.js.map +1 -1
- package/build/components/block-switcher/preview-block-popover.js +1 -6
- package/build/components/block-switcher/preview-block-popover.js.map +1 -1
- package/build/components/block-switcher/use-transformed-patterns.js +12 -27
- package/build/components/block-switcher/use-transformed-patterns.js.map +1 -1
- package/build/components/block-switcher/utils.js +5 -10
- package/build/components/block-switcher/utils.js.map +1 -1
- package/build/components/block-title/index.js +0 -3
- package/build/components/block-title/index.js.map +1 -1
- package/build/components/block-title/use-block-display-title.js +2 -15
- package/build/components/block-title/use-block-display-title.js.map +1 -1
- package/build/components/block-toolbar/block-name-context.js +1 -3
- package/build/components/block-toolbar/block-name-context.js.map +1 -1
- package/build/components/block-toolbar/block-toolbar-last-item.js +1 -2
- package/build/components/block-toolbar/block-toolbar-last-item.js.map +1 -1
- package/build/components/block-toolbar/block-toolbar-menu.native.js +24 -43
- package/build/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
- package/build/components/block-toolbar/index.js +6 -30
- package/build/components/block-toolbar/index.js.map +1 -1
- package/build/components/block-toolbar/index.native.js +1 -15
- package/build/components/block-toolbar/index.native.js.map +1 -1
- package/build/components/block-toolbar/utils.js +4 -25
- package/build/components/block-toolbar/utils.js.map +1 -1
- package/build/components/block-tools/back-compat.js +3 -11
- package/build/components/block-tools/back-compat.js.map +1 -1
- package/build/components/block-tools/block-contextual-toolbar.js +51 -26
- package/build/components/block-tools/block-contextual-toolbar.js.map +1 -1
- package/build/components/block-tools/block-selection-button.js +8 -43
- package/build/components/block-tools/block-selection-button.js.map +1 -1
- package/build/components/block-tools/index.js +9 -32
- package/build/components/block-tools/index.js.map +1 -1
- package/build/components/block-tools/insertion-point.js +8 -30
- package/build/components/block-tools/insertion-point.js.map +1 -1
- package/build/components/block-tools/selected-block-popover.js +12 -35
- package/build/components/block-tools/selected-block-popover.js.map +1 -1
- package/build/components/block-tools/use-block-toolbar-popover-props.js +35 -36
- package/build/components/block-tools/use-block-toolbar-popover-props.js.map +1 -1
- package/build/components/block-tools/zoom-out-mode-inserters.js +3 -12
- package/build/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
- package/build/components/block-types-list/index.js +1 -10
- package/build/components/block-types-list/index.js.map +1 -1
- package/build/components/block-types-list/index.native.js +3 -22
- package/build/components/block-types-list/index.native.js.map +1 -1
- package/build/components/block-variation-picker/index.js +1 -8
- package/build/components/block-variation-picker/index.js.map +1 -1
- package/build/components/block-variation-picker/index.native.js +1 -16
- package/build/components/block-variation-picker/index.native.js.map +1 -1
- package/build/components/block-variation-transforms/index.js +8 -22
- package/build/components/block-variation-transforms/index.js.map +1 -1
- package/build/components/block-vertical-alignment-control/icons.js +1 -3
- package/build/components/block-vertical-alignment-control/icons.js.map +1 -1
- package/build/components/block-vertical-alignment-control/index.js +6 -10
- package/build/components/block-vertical-alignment-control/index.js.map +1 -1
- package/build/components/block-vertical-alignment-control/ui.js +4 -10
- package/build/components/block-vertical-alignment-control/ui.js.map +1 -1
- package/build/components/border-radius-control/all-input-control.js +8 -13
- package/build/components/border-radius-control/all-input-control.js.map +1 -1
- package/build/components/border-radius-control/index.js +5 -16
- package/build/components/border-radius-control/index.js.map +1 -1
- package/build/components/border-radius-control/input-controls.js +14 -15
- package/build/components/border-radius-control/input-controls.js.map +1 -1
- package/build/components/border-radius-control/linked-button.js +5 -7
- package/build/components/border-radius-control/linked-button.js.map +1 -1
- package/build/components/border-radius-control/utils.js +9 -17
- package/build/components/border-radius-control/utils.js.map +1 -1
- package/build/components/button-block-appender/index.js +5 -19
- package/build/components/button-block-appender/index.js.map +1 -1
- package/build/components/button-block-appender/index.native.js +4 -13
- package/build/components/button-block-appender/index.native.js.map +1 -1
- package/build/components/caption/index.native.js +1 -7
- package/build/components/caption/index.native.js.map +1 -1
- package/build/components/child-layout-control/index.js +8 -13
- package/build/components/child-layout-control/index.js.map +1 -1
- package/build/components/color-palette/control.js +3 -5
- package/build/components/color-palette/control.js.map +1 -1
- package/build/components/color-palette/index.js +0 -6
- package/build/components/color-palette/index.js.map +1 -1
- package/build/components/color-palette/with-color-context.js +2 -8
- package/build/components/color-palette/with-color-context.js.map +1 -1
- package/build/components/color-style-selector/index.js +3 -14
- package/build/components/color-style-selector/index.js.map +1 -1
- package/build/components/colors/index.js +0 -4
- package/build/components/colors/index.js.map +1 -1
- package/build/components/colors/utils.js +5 -20
- package/build/components/colors/utils.js.map +1 -1
- package/build/components/colors/with-colors.js +15 -30
- package/build/components/colors/with-colors.js.map +1 -1
- package/build/components/colors-gradients/control.js +7 -19
- package/build/components/colors-gradients/control.js.map +1 -1
- package/build/components/colors-gradients/dropdown.js +15 -21
- package/build/components/colors-gradients/dropdown.js.map +1 -1
- package/build/components/colors-gradients/panel-color-gradient-settings.js +7 -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 +1 -5
- package/build/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
- package/build/components/colors-gradients/use-multiple-origin-colors-and-gradients.js +0 -13
- package/build/components/colors-gradients/use-multiple-origin-colors-and-gradients.js.map +1 -1
- package/build/components/contrast-checker/index.js +20 -31
- package/build/components/contrast-checker/index.js.map +1 -1
- package/build/components/contrast-checker/index.native.js +4 -21
- package/build/components/contrast-checker/index.native.js.map +1 -1
- package/build/components/convert-to-group-buttons/index.js +1 -18
- package/build/components/convert-to-group-buttons/index.js.map +1 -1
- package/build/components/convert-to-group-buttons/index.native.js +5 -17
- package/build/components/convert-to-group-buttons/index.native.js.map +1 -1
- package/build/components/convert-to-group-buttons/toolbar.js +3 -19
- package/build/components/convert-to-group-buttons/toolbar.js.map +1 -1
- package/build/components/convert-to-group-buttons/use-convert-to-group-button-props.js +4 -7
- package/build/components/convert-to-group-buttons/use-convert-to-group-button-props.js.map +1 -1
- package/build/components/copy-handler/index.js +24 -53
- package/build/components/copy-handler/index.js.map +1 -1
- package/build/components/date-format-picker/index.js +2 -8
- package/build/components/date-format-picker/index.js.map +1 -1
- package/build/components/default-block-appender/index.js +4 -18
- package/build/components/default-block-appender/index.js.map +1 -1
- package/build/components/default-block-appender/index.native.js +14 -21
- package/build/components/default-block-appender/index.native.js.map +1 -1
- package/build/components/default-style-picker/index.js +4 -12
- package/build/components/default-style-picker/index.js.map +1 -1
- package/build/components/dimensions-tool/aspect-ratio-tool.js +1 -6
- package/build/components/dimensions-tool/aspect-ratio-tool.js.map +1 -1
- package/build/components/dimensions-tool/index.js +37 -36
- package/build/components/dimensions-tool/index.js.map +1 -1
- package/build/components/dimensions-tool/scale-tool.js +1 -5
- package/build/components/dimensions-tool/scale-tool.js.map +1 -1
- package/build/components/dimensions-tool/width-height-tool.js +5 -15
- package/build/components/dimensions-tool/width-height-tool.js.map +1 -1
- package/build/components/duotone/components.js +5 -11
- package/build/components/duotone/components.js.map +1 -1
- package/build/components/duotone/index.js +0 -2
- package/build/components/duotone/index.js.map +1 -1
- package/build/components/duotone/utils.js +0 -2
- package/build/components/duotone/utils.js.map +1 -1
- package/build/components/duotone-control/index.js +1 -10
- package/build/components/duotone-control/index.js.map +1 -1
- package/build/components/editable-text/index.js +4 -8
- package/build/components/editable-text/index.js.map +1 -1
- package/build/components/editor-styles/index.js +3 -15
- package/build/components/editor-styles/index.js.map +1 -1
- package/build/components/floating-toolbar/index.native.js +3 -18
- package/build/components/floating-toolbar/index.native.js.map +1 -1
- package/build/components/floating-toolbar/nav-up-icon.js +1 -5
- package/build/components/floating-toolbar/nav-up-icon.js.map +1 -1
- package/build/components/font-appearance-control/index.js +25 -30
- package/build/components/font-appearance-control/index.js.map +1 -1
- package/build/components/font-family/index.js +1 -9
- package/build/components/font-family/index.js.map +1 -1
- package/build/components/font-sizes/fluid-utils.js +41 -40
- package/build/components/font-sizes/fluid-utils.js.map +1 -1
- package/build/components/font-sizes/font-size-picker.js +4 -8
- package/build/components/font-sizes/font-size-picker.js.map +1 -1
- package/build/components/font-sizes/index.js +0 -5
- package/build/components/font-sizes/index.js.map +1 -1
- package/build/components/font-sizes/index.native.js +0 -4
- package/build/components/font-sizes/index.native.js.map +1 -1
- package/build/components/font-sizes/utils.js +2 -12
- package/build/components/font-sizes/utils.js.map +1 -1
- package/build/components/font-sizes/with-font-sizes.js +15 -27
- package/build/components/font-sizes/with-font-sizes.js.map +1 -1
- package/build/components/global-styles/advanced-panel.js +3 -14
- package/build/components/global-styles/advanced-panel.js.map +1 -1
- package/build/components/global-styles/behaviors-panel.js +3 -5
- package/build/components/global-styles/behaviors-panel.js.map +1 -1
- package/build/components/global-styles/border-panel.js +22 -43
- package/build/components/global-styles/border-panel.js.map +1 -1
- package/build/components/global-styles/color-panel.js +30 -69
- package/build/components/global-styles/color-panel.js.map +1 -1
- package/build/components/global-styles/color-panel.native.js +5 -19
- package/build/components/global-styles/color-panel.native.js.map +1 -1
- package/build/components/global-styles/context.js +1 -2
- package/build/components/global-styles/context.js.map +1 -1
- package/build/components/global-styles/dimensions-panel.js +33 -92
- package/build/components/global-styles/dimensions-panel.js.map +1 -1
- package/build/components/global-styles/effects-panel.js +7 -27
- package/build/components/global-styles/effects-panel.js.map +1 -1
- package/build/components/global-styles/filters-panel.js +9 -25
- package/build/components/global-styles/filters-panel.js.map +1 -1
- package/build/components/global-styles/get-block-css-selector.js +33 -31
- package/build/components/global-styles/get-block-css-selector.js.map +1 -1
- package/build/components/global-styles/hooks.js +41 -90
- package/build/components/global-styles/hooks.js.map +1 -1
- package/build/components/global-styles/index.js +0 -16
- package/build/components/global-styles/index.js.map +1 -1
- package/build/components/global-styles/typography-panel.js +25 -87
- package/build/components/global-styles/typography-panel.js.map +1 -1
- package/build/components/global-styles/typography-utils.js +6 -14
- package/build/components/global-styles/typography-utils.js.map +1 -1
- package/build/components/global-styles/use-global-styles-output.js +96 -190
- package/build/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build/components/global-styles/utils.js +11 -48
- package/build/components/global-styles/utils.js.map +1 -1
- package/build/components/gradients/index.js +0 -2
- package/build/components/gradients/index.js.map +1 -1
- package/build/components/gradients/index.native.js +0 -4
- package/build/components/gradients/index.native.js.map +1 -1
- package/build/components/gradients/use-gradient.js +3 -21
- package/build/components/gradients/use-gradient.js.map +1 -1
- package/build/components/gradients/with-gradient.js +3 -5
- package/build/components/gradients/with-gradient.js.map +1 -1
- package/build/components/height-control/index.js +2 -12
- package/build/components/height-control/index.js.map +1 -1
- package/build/components/iframe/index.js +23 -46
- package/build/components/iframe/index.js.map +1 -1
- package/build/components/iframe/use-compatibility-styles.js +8 -20
- package/build/components/iframe/use-compatibility-styles.js.map +1 -1
- package/build/components/image-editor/aspect-ratio-dropdown.js +3 -9
- package/build/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
- package/build/components/image-editor/constants.js.map +1 -1
- package/build/components/image-editor/context.js +3 -9
- package/build/components/image-editor/context.js.map +1 -1
- package/build/components/image-editor/cropper.js +3 -11
- package/build/components/image-editor/cropper.js.map +1 -1
- package/build/components/image-editor/form-controls.js +1 -5
- package/build/components/image-editor/form-controls.js.map +1 -1
- package/build/components/image-editor/index.js +1 -11
- package/build/components/image-editor/index.js.map +1 -1
- package/build/components/image-editor/rotation-button.js +1 -6
- package/build/components/image-editor/rotation-button.js.map +1 -1
- package/build/components/image-editor/use-save-image.js +5 -15
- package/build/components/image-editor/use-save-image.js.map +1 -1
- package/build/components/image-editor/use-transform-image.js +1 -12
- package/build/components/image-editor/use-transform-image.js.map +1 -1
- package/build/components/image-editor/zoom-dropdown.js +1 -7
- package/build/components/image-editor/zoom-dropdown.js.map +1 -1
- package/build/components/image-size-control/index.js +1 -9
- package/build/components/image-size-control/index.js.map +1 -1
- package/build/components/image-size-control/use-dimension-handler.js +7 -14
- package/build/components/image-size-control/use-dimension-handler.js.map +1 -1
- package/build/components/index.js +25 -115
- package/build/components/index.js.map +1 -1
- package/build/components/index.native.js +0 -53
- package/build/components/index.native.js.map +1 -1
- package/build/components/inner-blocks/button-block-appender.js +1 -9
- package/build/components/inner-blocks/button-block-appender.js.map +1 -1
- package/build/components/inner-blocks/default-block-appender.js +1 -11
- package/build/components/inner-blocks/default-block-appender.js.map +1 -1
- package/build/components/inner-blocks/index.js +22 -38
- package/build/components/inner-blocks/index.js.map +1 -1
- package/build/components/inner-blocks/index.native.js +18 -31
- package/build/components/inner-blocks/index.native.js.map +1 -1
- package/build/components/inner-blocks/use-block-context.js +0 -9
- package/build/components/inner-blocks/use-block-context.js.map +1 -1
- package/build/components/inner-blocks/use-inner-block-template-sync.js +10 -18
- package/build/components/inner-blocks/use-inner-block-template-sync.js.map +1 -1
- package/build/components/inner-blocks/use-nested-settings-update.js +18 -27
- package/build/components/inner-blocks/use-nested-settings-update.js.map +1 -1
- package/build/components/inner-blocks/with-client-id.js +3 -5
- package/build/components/inner-blocks/with-client-id.js.map +1 -1
- package/build/components/inserter/block-patterns-explorer/explorer.js +3 -10
- package/build/components/inserter/block-patterns-explorer/explorer.js.map +1 -1
- package/build/components/inserter/block-patterns-explorer/patterns-list.js +5 -24
- package/build/components/inserter/block-patterns-explorer/patterns-list.js.map +1 -1
- package/build/components/inserter/block-patterns-explorer/sidebar.js +1 -7
- package/build/components/inserter/block-patterns-explorer/sidebar.js.map +1 -1
- package/build/components/inserter/block-patterns-tab.js +12 -33
- package/build/components/inserter/block-patterns-tab.js.map +1 -1
- package/build/components/inserter/block-types-tab.js +9 -25
- package/build/components/inserter/block-types-tab.js.map +1 -1
- package/build/components/inserter/block-types-tab.native.js +1 -14
- package/build/components/inserter/block-types-tab.native.js.map +1 -1
- package/build/components/inserter/hooks/use-block-type-impressions.native.js +9 -12
- package/build/components/inserter/hooks/use-block-type-impressions.native.js.map +1 -1
- package/build/components/inserter/hooks/use-block-types-state.js +0 -6
- package/build/components/inserter/hooks/use-block-types-state.js.map +1 -1
- package/build/components/inserter/hooks/use-clipboard-block.native.js +1 -7
- package/build/components/inserter/hooks/use-clipboard-block.native.js.map +1 -1
- package/build/components/inserter/hooks/use-debounced-input.js +1 -3
- package/build/components/inserter/hooks/use-debounced-input.js.map +1 -1
- package/build/components/inserter/hooks/use-insertion-point.js +2 -15
- package/build/components/inserter/hooks/use-insertion-point.js.map +1 -1
- package/build/components/inserter/hooks/use-patterns-state.js +4 -12
- package/build/components/inserter/hooks/use-patterns-state.js.map +1 -1
- package/build/components/inserter/index.js +29 -66
- package/build/components/inserter/index.js.map +1 -1
- package/build/components/inserter/index.native.js +23 -71
- package/build/components/inserter/index.native.js.map +1 -1
- package/build/components/inserter/library.js +1 -11
- package/build/components/inserter/library.js.map +1 -1
- package/build/components/inserter/media-tab/hooks.js +12 -27
- package/build/components/inserter/media-tab/hooks.js.map +1 -1
- package/build/components/inserter/media-tab/index.js +0 -4
- package/build/components/inserter/media-tab/index.js.map +1 -1
- package/build/components/inserter/media-tab/media-list.js +3 -7
- package/build/components/inserter/media-tab/media-list.js.map +1 -1
- package/build/components/inserter/media-tab/media-panel.js +1 -13
- package/build/components/inserter/media-tab/media-panel.js.map +1 -1
- package/build/components/inserter/media-tab/media-preview.js +10 -35
- package/build/components/inserter/media-tab/media-preview.js.map +1 -1
- package/build/components/inserter/media-tab/media-tab.js +3 -18
- package/build/components/inserter/media-tab/media-tab.js.map +1 -1
- package/build/components/inserter/media-tab/utils.js +2 -6
- package/build/components/inserter/media-tab/utils.js.map +1 -1
- package/build/components/inserter/menu.js +2 -22
- package/build/components/inserter/menu.js.map +1 -1
- package/build/components/inserter/menu.native.js +5 -24
- package/build/components/inserter/menu.native.js.map +1 -1
- package/build/components/inserter/mobile-tab-navigation.js +3 -7
- package/build/components/inserter/mobile-tab-navigation.js.map +1 -1
- package/build/components/inserter/no-results.js +1 -5
- package/build/components/inserter/no-results.js.map +1 -1
- package/build/components/inserter/no-results.native.js +1 -8
- package/build/components/inserter/no-results.native.js.map +1 -1
- package/build/components/inserter/panel.js +1 -4
- package/build/components/inserter/panel.js.map +1 -1
- package/build/components/inserter/preview-panel.js +14 -15
- package/build/components/inserter/preview-panel.js.map +1 -1
- package/build/components/inserter/quick-inserter.js +4 -18
- package/build/components/inserter/quick-inserter.js.map +1 -1
- package/build/components/inserter/reusable-block-rename-hint.js +2 -16
- package/build/components/inserter/reusable-block-rename-hint.js.map +1 -1
- package/build/components/inserter/reusable-blocks-tab.js +3 -17
- package/build/components/inserter/reusable-blocks-tab.js.map +1 -1
- package/build/components/inserter/reusable-blocks-tab.native.js +1 -9
- package/build/components/inserter/reusable-blocks-tab.native.js.map +1 -1
- package/build/components/inserter/search-items.js +21 -41
- package/build/components/inserter/search-items.js.map +1 -1
- package/build/components/inserter/search-results.js +6 -37
- package/build/components/inserter/search-results.js.map +1 -1
- package/build/components/inserter/search-results.native.js +1 -15
- package/build/components/inserter/search-results.native.js.map +1 -1
- package/build/components/inserter/tabs.js +1 -17
- package/build/components/inserter/tabs.js.map +1 -1
- package/build/components/inserter/tabs.native.js +5 -20
- package/build/components/inserter/tabs.native.js.map +1 -1
- package/build/components/inserter/tips.js +3 -7
- package/build/components/inserter/tips.js.map +1 -1
- package/build/components/inserter/utils.native.js +2 -9
- package/build/components/inserter/utils.native.js.map +1 -1
- package/build/components/inserter-draggable-blocks/index.js +1 -8
- package/build/components/inserter-draggable-blocks/index.js.map +1 -1
- package/build/components/inserter-list-item/index.js +1 -16
- package/build/components/inserter-list-item/index.js.map +1 -1
- package/build/components/inserter-listbox/context.js +1 -2
- package/build/components/inserter-listbox/context.js.map +1 -1
- package/build/components/inserter-listbox/group.js +1 -7
- package/build/components/inserter-listbox/group.js.map +1 -1
- package/build/components/inserter-listbox/index.js +1 -9
- package/build/components/inserter-listbox/index.js.map +1 -1
- package/build/components/inserter-listbox/item.js +9 -14
- package/build/components/inserter-listbox/item.js.map +1 -1
- package/build/components/inserter-listbox/row.js +1 -7
- package/build/components/inserter-listbox/row.js.map +1 -1
- package/build/components/inserter-menu-extension/index.js +1 -2
- package/build/components/inserter-menu-extension/index.js.map +1 -1
- package/build/components/inspector-controls/block-support-slot-container.js +3 -4
- package/build/components/inspector-controls/block-support-slot-container.js.map +1 -1
- package/build/components/inspector-controls/block-support-tools-panel.js +7 -9
- package/build/components/inspector-controls/block-support-tools-panel.js.map +1 -1
- package/build/components/inspector-controls/fill.js +4 -16
- package/build/components/inspector-controls/fill.js.map +1 -1
- package/build/components/inspector-controls/fill.native.js +3 -15
- package/build/components/inspector-controls/fill.native.js.map +1 -1
- package/build/components/inspector-controls/groups.js +1 -2
- package/build/components/inspector-controls/groups.js.map +1 -1
- package/build/components/inspector-controls/index.js +8 -12
- package/build/components/inspector-controls/index.js.map +1 -1
- package/build/components/inspector-controls/slot.js +5 -16
- package/build/components/inspector-controls/slot.js.map +1 -1
- package/build/components/inspector-controls/slot.native.js +3 -10
- package/build/components/inspector-controls/slot.native.js.map +1 -1
- package/build/components/inspector-controls-tabs/advanced-controls-panel.js +1 -10
- package/build/components/inspector-controls-tabs/advanced-controls-panel.js.map +1 -1
- package/build/components/inspector-controls-tabs/index.js +1 -11
- package/build/components/inspector-controls-tabs/index.js.map +1 -1
- package/build/components/inspector-controls-tabs/position-controls-panel.js +3 -14
- package/build/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
- package/build/components/inspector-controls-tabs/settings-tab-hint.js +1 -13
- package/build/components/inspector-controls-tabs/settings-tab-hint.js.map +1 -1
- package/build/components/inspector-controls-tabs/settings-tab.js +1 -8
- package/build/components/inspector-controls-tabs/settings-tab.js.map +1 -1
- package/build/components/inspector-controls-tabs/styles-tab.js +1 -10
- package/build/components/inspector-controls-tabs/styles-tab.js.map +1 -1
- package/build/components/inspector-controls-tabs/use-inspector-controls-tabs.js +14 -24
- package/build/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +1 -1
- package/build/components/inspector-controls-tabs/use-is-list-view-tab-disabled.js +0 -2
- package/build/components/inspector-controls-tabs/use-is-list-view-tab-disabled.js.map +1 -1
- package/build/components/inspector-controls-tabs/utils.js +1 -3
- package/build/components/inspector-controls-tabs/utils.js.map +1 -1
- package/build/components/inspector-popover-header/index.js +1 -5
- package/build/components/inspector-popover-header/index.js.map +1 -1
- package/build/components/justify-content-control/index.js +6 -10
- package/build/components/justify-content-control/index.js.map +1 -1
- package/build/components/justify-content-control/ui.js +1 -8
- package/build/components/justify-content-control/ui.js.map +1 -1
- package/build/components/keyboard-shortcuts/index.js +10 -7
- package/build/components/keyboard-shortcuts/index.js.map +1 -1
- package/build/components/letter-spacing-control/index.js +2 -7
- package/build/components/letter-spacing-control/index.js.map +1 -1
- package/build/components/line-height-control/index.js +21 -37
- package/build/components/line-height-control/index.js.map +1 -1
- package/build/components/line-height-control/index.native.js +5 -7
- package/build/components/line-height-control/index.native.js.map +1 -1
- package/build/components/line-height-control/utils.js +10 -6
- package/build/components/line-height-control/utils.js.map +1 -1
- package/build/components/link-control/constants.js +1 -2
- package/build/components/link-control/constants.js.map +1 -1
- package/build/components/link-control/index.js +42 -56
- package/build/components/link-control/index.js.map +1 -1
- package/build/components/link-control/is-url-like.js +4 -8
- package/build/components/link-control/is-url-like.js.map +1 -1
- package/build/components/link-control/link-preview.js +10 -18
- package/build/components/link-control/link-preview.js.map +1 -1
- package/build/components/link-control/search-create-button.js +4 -12
- package/build/components/link-control/search-create-button.js.map +1 -1
- package/build/components/link-control/search-input.js +15 -28
- package/build/components/link-control/search-input.js.map +1 -1
- package/build/components/link-control/search-item.js +7 -19
- package/build/components/link-control/search-item.js.map +1 -1
- package/build/components/link-control/search-results.js +13 -22
- package/build/components/link-control/search-results.js.map +1 -1
- package/build/components/link-control/settings-drawer.js +1 -7
- package/build/components/link-control/settings-drawer.js.map +1 -1
- package/build/components/link-control/settings.js +3 -9
- package/build/components/link-control/settings.js.map +1 -1
- package/build/components/link-control/use-create-page.js +5 -12
- package/build/components/link-control/use-create-page.js.map +1 -1
- package/build/components/link-control/use-internal-value.js +9 -12
- package/build/components/link-control/use-internal-value.js.map +1 -1
- package/build/components/link-control/use-rich-url-data.js +9 -14
- package/build/components/link-control/use-rich-url-data.js.map +1 -1
- package/build/components/link-control/use-search-handler.js +10 -24
- package/build/components/link-control/use-search-handler.js.map +1 -1
- package/build/components/link-control/viewer-slot.js +1 -2
- package/build/components/link-control/viewer-slot.js.map +1 -1
- package/build/components/list-view/appender.js +4 -18
- package/build/components/list-view/appender.js.map +1 -1
- package/build/components/list-view/aria-referenced-text.js +0 -2
- package/build/components/list-view/aria-referenced-text.js.map +1 -1
- package/build/components/list-view/block-contents.js +4 -11
- package/build/components/list-view/block-contents.js.map +1 -1
- package/build/components/list-view/block-select-button.js +31 -32
- package/build/components/list-view/block-select-button.js.map +1 -1
- package/build/components/list-view/block.js +24 -46
- package/build/components/list-view/block.js.map +1 -1
- package/build/components/list-view/branch.js +7 -37
- package/build/components/list-view/branch.js.map +1 -1
- package/build/components/list-view/context.js +1 -4
- package/build/components/list-view/context.js.map +1 -1
- package/build/components/list-view/drop-indicator.js +35 -47
- package/build/components/list-view/drop-indicator.js.map +1 -1
- package/build/components/list-view/expander.js +3 -5
- package/build/components/list-view/expander.js.map +1 -1
- package/build/components/list-view/index.js +18 -39
- package/build/components/list-view/index.js.map +1 -1
- package/build/components/list-view/leaf.js +1 -8
- package/build/components/list-view/leaf.js.map +1 -1
- package/build/components/list-view/use-block-selection.js +15 -30
- package/build/components/list-view/use-block-selection.js.map +1 -1
- package/build/components/list-view/use-list-view-client-ids.js +1 -4
- package/build/components/list-view/use-list-view-client-ids.js.map +1 -1
- package/build/components/list-view/use-list-view-drop-zone.js +33 -63
- package/build/components/list-view/use-list-view-drop-zone.js.map +1 -1
- package/build/components/list-view/use-list-view-expand-selected-item.js +5 -7
- package/build/components/list-view/use-list-view-expand-selected-item.js.map +1 -1
- package/build/components/list-view/use-list-view-images.js +84 -0
- package/build/components/list-view/use-list-view-images.js.map +1 -0
- package/build/components/list-view/use-list-view-scroll-into-view.js +6 -8
- package/build/components/list-view/use-list-view-scroll-into-view.js.map +1 -1
- package/build/components/list-view/utils.js +4 -10
- package/build/components/list-view/utils.js.map +1 -1
- package/build/components/media-placeholder/index.js +11 -71
- package/build/components/media-placeholder/index.js.map +1 -1
- package/build/components/media-placeholder/index.native.js +7 -30
- package/build/components/media-placeholder/index.native.js.map +1 -1
- package/build/components/media-replace-flow/index.js +8 -39
- package/build/components/media-replace-flow/index.js.map +1 -1
- package/build/components/media-replace-flow/index.native.js +1 -4
- package/build/components/media-replace-flow/index.native.js.map +1 -1
- package/build/components/media-upload/check.js +2 -5
- package/build/components/media-upload/check.js.map +1 -1
- package/build/components/media-upload/index.js +1 -5
- package/build/components/media-upload/index.js.map +1 -1
- package/build/components/media-upload/index.native.js +18 -43
- package/build/components/media-upload/index.native.js.map +1 -1
- package/build/components/media-upload-progress/index.native.js +3 -33
- package/build/components/media-upload-progress/index.native.js.map +1 -1
- package/build/components/multi-selection-inspector/index.js +3 -16
- package/build/components/multi-selection-inspector/index.js.map +1 -1
- package/build/components/navigable-toolbar/index.js +10 -32
- package/build/components/navigable-toolbar/index.js.map +1 -1
- package/build/components/observe-typing/index.js +24 -43
- package/build/components/observe-typing/index.js.map +1 -1
- package/build/components/panel-color-settings/index.js +3 -7
- package/build/components/panel-color-settings/index.js.map +1 -1
- package/build/components/plain-text/index.js +0 -7
- package/build/components/plain-text/index.js.map +1 -1
- package/build/components/plain-text/index.native.js +7 -27
- package/build/components/plain-text/index.native.js.map +1 -1
- package/build/components/preview-options/index.js +1 -8
- package/build/components/preview-options/index.js.map +1 -1
- package/build/components/provider/block-refs-provider.js +1 -3
- package/build/components/provider/block-refs-provider.js.map +1 -1
- package/build/components/provider/index.js +7 -14
- package/build/components/provider/index.js.map +1 -1
- package/build/components/provider/index.native.js +3 -9
- package/build/components/provider/index.native.js.map +1 -1
- package/build/components/provider/use-block-sync.js +23 -41
- package/build/components/provider/use-block-sync.js.map +1 -1
- package/build/components/provider/with-registry-provider.js +1 -9
- package/build/components/provider/with-registry-provider.js.map +1 -1
- package/build/components/publish-date-time-picker/index.js +1 -9
- package/build/components/publish-date-time-picker/index.js.map +1 -1
- package/build/components/recursion-provider/index.js +6 -9
- package/build/components/recursion-provider/index.js.map +1 -1
- package/build/components/resizable-box-popover/index.js +3 -6
- package/build/components/resizable-box-popover/index.js.map +1 -1
- package/build/components/resolution-tool/index.js +1 -5
- package/build/components/resolution-tool/index.js.map +1 -1
- package/build/components/responsive-block-control/index.js +3 -16
- package/build/components/responsive-block-control/index.js.map +1 -1
- package/build/components/responsive-block-control/label.js +2 -7
- package/build/components/responsive-block-control/label.js.map +1 -1
- package/build/components/rich-text/content.js +3 -13
- package/build/components/rich-text/content.js.map +1 -1
- package/build/components/rich-text/embed-handler-picker.native.js +1 -7
- package/build/components/rich-text/embed-handler-picker.native.js.map +1 -1
- package/build/components/rich-text/file-paste-handler.native.js +0 -1
- package/build/components/rich-text/file-paste-handler.native.js.map +1 -1
- package/build/components/rich-text/format-edit.js +3 -10
- package/build/components/rich-text/format-edit.js.map +1 -1
- package/build/components/rich-text/format-toolbar/index.js +4 -14
- package/build/components/rich-text/format-toolbar/index.js.map +1 -1
- package/build/components/rich-text/format-toolbar/index.native.js +1 -4
- package/build/components/rich-text/format-toolbar/index.native.js.map +1 -1
- package/build/components/rich-text/format-toolbar-container.js +4 -22
- package/build/components/rich-text/format-toolbar-container.js.map +1 -1
- package/build/components/rich-text/format-toolbar-container.native.js +1 -6
- package/build/components/rich-text/format-toolbar-container.native.js.map +1 -1
- package/build/components/rich-text/get-rich-text-values.js +2 -21
- package/build/components/rich-text/get-rich-text-values.js.map +1 -1
- package/build/components/rich-text/index.js +18 -68
- package/build/components/rich-text/index.js.map +1 -1
- package/build/components/rich-text/index.native.js +48 -94
- package/build/components/rich-text/index.native.js.map +1 -1
- package/build/components/rich-text/input-event.js +1 -4
- package/build/components/rich-text/input-event.js.map +1 -1
- package/build/components/rich-text/input-event.native.js +1 -4
- package/build/components/rich-text/input-event.native.js.map +1 -1
- package/build/components/rich-text/prevent-event-discovery.js +1 -6
- package/build/components/rich-text/prevent-event-discovery.js.map +1 -1
- package/build/components/rich-text/remove-browser-shortcuts.native.js +0 -2
- package/build/components/rich-text/remove-browser-shortcuts.native.js.map +1 -1
- package/build/components/rich-text/shortcut.js +1 -5
- package/build/components/rich-text/shortcut.js.map +1 -1
- package/build/components/rich-text/shortcut.native.js +1 -4
- package/build/components/rich-text/shortcut.native.js.map +1 -1
- package/build/components/rich-text/split-value.js +18 -17
- package/build/components/rich-text/split-value.js.map +1 -1
- package/build/components/rich-text/toolbar-button.js +3 -8
- package/build/components/rich-text/toolbar-button.js.map +1 -1
- package/build/components/rich-text/use-before-input-rules.js +5 -22
- package/build/components/rich-text/use-before-input-rules.js.map +1 -1
- package/build/components/rich-text/use-delete.js +6 -15
- package/build/components/rich-text/use-delete.js.map +1 -1
- package/build/components/rich-text/use-enter.js +3 -18
- package/build/components/rich-text/use-enter.js.map +1 -1
- package/build/components/rich-text/use-firefox-compat.js +5 -41
- package/build/components/rich-text/use-firefox-compat.js.map +1 -1
- package/build/components/rich-text/use-format-types.js +10 -23
- package/build/components/rich-text/use-format-types.js.map +1 -1
- package/build/components/rich-text/use-input-events.js +1 -3
- package/build/components/rich-text/use-input-events.js.map +1 -1
- package/build/components/rich-text/use-input-rules.js +10 -35
- package/build/components/rich-text/use-input-rules.js.map +1 -1
- package/build/components/rich-text/use-insert-replacement-text.js +0 -5
- package/build/components/rich-text/use-insert-replacement-text.js.map +1 -1
- package/build/components/rich-text/use-mark-persistent.js +6 -9
- package/build/components/rich-text/use-mark-persistent.js.map +1 -1
- package/build/components/rich-text/use-paste-handler.js +24 -71
- package/build/components/rich-text/use-paste-handler.js.map +1 -1
- package/build/components/rich-text/use-remove-browser-shortcuts.js +0 -4
- package/build/components/rich-text/use-remove-browser-shortcuts.js.map +1 -1
- package/build/components/rich-text/use-shortcuts.js +1 -3
- package/build/components/rich-text/use-shortcuts.js.map +1 -1
- package/build/components/rich-text/use-undo-automatic-change.js +1 -13
- package/build/components/rich-text/use-undo-automatic-change.js.map +1 -1
- package/build/components/rich-text/utils.js +3 -15
- package/build/components/rich-text/utils.js.map +1 -1
- package/build/components/selection-scroll-into-view/index.js +0 -3
- package/build/components/selection-scroll-into-view/index.js.map +1 -1
- package/build/components/skip-to-selected-block/index.js +2 -12
- package/build/components/skip-to-selected-block/index.js.map +1 -1
- package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js +1 -6
- package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
- package/build/components/spacing-sizes-control/index.js +13 -23
- package/build/components/spacing-sizes-control/index.js.map +1 -1
- package/build/components/spacing-sizes-control/input-controls/axial.js +7 -14
- package/build/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
- package/build/components/spacing-sizes-control/input-controls/separated.js +3 -8
- package/build/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
- package/build/components/spacing-sizes-control/input-controls/single.js +3 -7
- 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 +6 -29
- 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 +1 -7
- package/build/components/spacing-sizes-control/sides-dropdown/index.js.map +1 -1
- package/build/components/spacing-sizes-control/utils.js +34 -66
- package/build/components/spacing-sizes-control/utils.js.map +1 -1
- package/build/components/text-decoration-control/index.js +2 -8
- package/build/components/text-decoration-control/index.js.map +1 -1
- package/build/components/text-transform-control/index.js +2 -8
- package/build/components/text-transform-control/index.js.map +1 -1
- package/build/components/tool-selector/index.js +4 -13
- package/build/components/tool-selector/index.js.map +1 -1
- package/build/components/typewriter/index.js +30 -52
- package/build/components/typewriter/index.js.map +1 -1
- package/build/components/ungroup-button/index.native.js +1 -16
- package/build/components/ungroup-button/index.native.js.map +1 -1
- package/build/components/unit-control/index.js +1 -5
- package/build/components/unit-control/index.js.map +1 -1
- package/build/components/url-input/button.js +2 -13
- package/build/components/url-input/button.js.map +1 -1
- package/build/components/url-input/index.js +38 -91
- package/build/components/url-input/index.js.map +1 -1
- package/build/components/url-input/index.native.js +1 -4
- package/build/components/url-input/index.native.js.map +1 -1
- package/build/components/url-popover/image-url-input-ui.js +3 -36
- package/build/components/url-popover/image-url-input-ui.js.map +1 -1
- package/build/components/url-popover/index.js +5 -20
- package/build/components/url-popover/index.js.map +1 -1
- package/build/components/url-popover/link-editor.js +1 -8
- package/build/components/url-popover/link-editor.js.map +1 -1
- package/build/components/url-popover/link-viewer-url.js +1 -8
- package/build/components/url-popover/link-viewer-url.js.map +1 -1
- package/build/components/url-popover/link-viewer.js +1 -8
- package/build/components/url-popover/link-viewer.js.map +1 -1
- package/build/components/use-block-commands/index.js +247 -0
- package/build/components/use-block-commands/index.js.map +1 -0
- package/build/components/use-block-display-information/index.js +1 -9
- package/build/components/use-block-display-information/index.js.map +1 -1
- package/build/components/use-block-drop-zone/index.js +12 -29
- package/build/components/use-block-drop-zone/index.js.map +1 -1
- package/build/components/use-block-drop-zone/index.native.js +12 -24
- package/build/components/use-block-drop-zone/index.native.js.map +1 -1
- package/build/components/use-display-block-controls/index.js +1 -7
- package/build/components/use-display-block-controls/index.js.map +1 -1
- package/build/components/use-display-block-controls/index.native.js +1 -7
- package/build/components/use-display-block-controls/index.native.js.map +1 -1
- package/build/components/use-moving-animation/index.js +4 -20
- package/build/components/use-moving-animation/index.js.map +1 -1
- package/build/components/use-on-block-drop/index.js +19 -38
- package/build/components/use-on-block-drop/index.js.map +1 -1
- package/build/components/use-on-block-drop/index.native.js +11 -15
- package/build/components/use-on-block-drop/index.native.js.map +1 -1
- package/build/components/use-on-block-drop/types.js.map +1 -1
- package/build/components/use-paste-styles/index.js +10 -27
- package/build/components/use-paste-styles/index.js.map +1 -1
- package/build/components/use-resize-canvas/index.js +0 -14
- package/build/components/use-resize-canvas/index.js.map +1 -1
- package/build/components/use-setting/index.js +17 -39
- package/build/components/use-setting/index.js.map +1 -1
- package/build/components/video-player/gridicon-play.native.js +0 -4
- package/build/components/video-player/gridicon-play.native.js.map +1 -1
- package/build/components/video-player/index.native.js +9 -24
- package/build/components/video-player/index.native.js.map +1 -1
- package/build/components/warning/index.js +2 -9
- package/build/components/warning/index.js.map +1 -1
- package/build/components/warning/index.native.js +1 -10
- package/build/components/warning/index.native.js.map +1 -1
- package/build/components/writing-flow/index.js +4 -23
- package/build/components/writing-flow/index.js.map +1 -1
- package/build/components/writing-flow/use-arrow-nav.js +35 -60
- package/build/components/writing-flow/use-arrow-nav.js.map +1 -1
- package/build/components/writing-flow/use-click-selection.js +3 -10
- package/build/components/writing-flow/use-click-selection.js.map +1 -1
- package/build/components/writing-flow/use-drag-selection.js +25 -31
- package/build/components/writing-flow/use-drag-selection.js.map +1 -1
- package/build/components/writing-flow/use-input.js +6 -21
- package/build/components/writing-flow/use-input.js.map +1 -1
- package/build/components/writing-flow/use-multi-selection.js +10 -16
- package/build/components/writing-flow/use-multi-selection.js.map +1 -1
- package/build/components/writing-flow/use-select-all.js +4 -14
- package/build/components/writing-flow/use-select-all.js.map +1 -1
- package/build/components/writing-flow/use-selection-observer.js +18 -47
- package/build/components/writing-flow/use-selection-observer.js.map +1 -1
- package/build/components/writing-flow/use-tab-nav.js +28 -44
- package/build/components/writing-flow/use-tab-nav.js.map +1 -1
- package/build/components/writing-mode-control/index.js +2 -8
- package/build/components/writing-mode-control/index.js.map +1 -1
- package/build/elements/index.js +0 -2
- package/build/elements/index.js.map +1 -1
- package/build/hooks/align.js +22 -46
- package/build/hooks/align.js.map +1 -1
- package/build/hooks/align.native.js +5 -9
- package/build/hooks/align.native.js.map +1 -1
- package/build/hooks/anchor.js +9 -24
- package/build/hooks/anchor.js.map +1 -1
- package/build/hooks/aria-label.js +5 -11
- package/build/hooks/aria-label.js.map +1 -1
- package/build/hooks/behaviors.js +12 -23
- package/build/hooks/behaviors.js.map +1 -1
- package/build/hooks/border.js +45 -79
- package/build/hooks/border.js.map +1 -1
- package/build/hooks/color.js +31 -69
- package/build/hooks/color.js.map +1 -1
- package/build/hooks/compat.js +1 -5
- package/build/hooks/compat.js.map +1 -1
- package/build/hooks/content-lock-ui.js +5 -19
- package/build/hooks/content-lock-ui.js.map +1 -1
- package/build/hooks/contrast-checker.js +4 -13
- package/build/hooks/contrast-checker.js.map +1 -1
- package/build/hooks/custom-class-name.js +21 -37
- package/build/hooks/custom-class-name.js.map +1 -1
- package/build/hooks/custom-class-name.native.js +3 -11
- package/build/hooks/custom-class-name.native.js.map +1 -1
- package/build/hooks/custom-fields.js +115 -0
- package/build/hooks/custom-fields.js.map +1 -0
- package/build/hooks/dimensions.js +6 -23
- package/build/hooks/dimensions.js.map +1 -1
- package/build/hooks/duotone.js +42 -64
- package/build/hooks/duotone.js.map +1 -1
- package/build/hooks/font-family.js +9 -29
- package/build/hooks/font-family.js.map +1 -1
- package/build/hooks/font-size.js +36 -62
- package/build/hooks/font-size.js.map +1 -1
- package/build/hooks/gap.js +1 -7
- package/build/hooks/gap.js.map +1 -1
- package/build/hooks/generated-class-name.js +1 -5
- package/build/hooks/generated-class-name.js.map +1 -1
- package/build/hooks/index.js +1 -27
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/index.native.js +0 -14
- package/build/hooks/index.native.js.map +1 -1
- package/build/hooks/layout.js +45 -72
- package/build/hooks/layout.js.map +1 -1
- package/build/hooks/layout.native.js +4 -4
- package/build/hooks/layout.native.js.map +1 -1
- package/build/hooks/line-height.js +7 -15
- package/build/hooks/line-height.js.map +1 -1
- package/build/hooks/lock.js +4 -8
- package/build/hooks/lock.js.map +1 -1
- package/build/hooks/margin.js +1 -13
- package/build/hooks/margin.js.map +1 -1
- package/build/hooks/metadata-name.js +4 -8
- package/build/hooks/metadata-name.js.map +1 -1
- package/build/hooks/metadata.js +4 -14
- package/build/hooks/metadata.js.map +1 -1
- package/build/hooks/padding.js +1 -13
- package/build/hooks/padding.js.map +1 -1
- package/build/hooks/position.js +35 -61
- package/build/hooks/position.js.map +1 -1
- package/build/hooks/settings.js +5 -8
- package/build/hooks/settings.js.map +1 -1
- package/build/hooks/style.js +29 -61
- package/build/hooks/style.js.map +1 -1
- package/build/hooks/supports.js +23 -76
- package/build/hooks/supports.js.map +1 -1
- package/build/hooks/typography.js +11 -27
- package/build/hooks/typography.js.map +1 -1
- package/build/hooks/typography.native.js +5 -14
- package/build/hooks/typography.native.js.map +1 -1
- package/build/hooks/use-border-props.js +5 -10
- package/build/hooks/use-border-props.js.map +1 -1
- package/build/hooks/use-cached-truthy.js +0 -2
- package/build/hooks/use-cached-truthy.js.map +1 -1
- package/build/hooks/use-color-props.js +14 -20
- package/build/hooks/use-color-props.js.map +1 -1
- package/build/hooks/use-editor-wrapper-styles.native.js +7 -30
- package/build/hooks/use-editor-wrapper-styles.native.js.map +1 -1
- package/build/hooks/use-spacing-props.js +3 -3
- package/build/hooks/use-spacing-props.js.map +1 -1
- package/build/hooks/use-typography-props.js +2 -9
- package/build/hooks/use-typography-props.js.map +1 -1
- package/build/hooks/utils.js +10 -26
- package/build/hooks/utils.js.map +1 -1
- package/build/index.js +0 -10
- package/build/index.js.map +1 -1
- package/build/index.native.js +0 -3
- package/build/index.native.js.map +1 -1
- package/build/layouts/constrained.js +13 -37
- package/build/layouts/constrained.js.map +1 -1
- package/build/layouts/definitions.js.map +1 -1
- package/build/layouts/flex.js +16 -48
- package/build/layouts/flex.js.map +1 -1
- package/build/layouts/flow.js +7 -23
- package/build/layouts/flow.js.map +1 -1
- package/build/layouts/grid.js +18 -32
- package/build/layouts/grid.js.map +1 -1
- package/build/layouts/index.js +3 -9
- package/build/layouts/index.js.map +1 -1
- package/build/layouts/utils.js +3 -12
- package/build/layouts/utils.js.map +1 -1
- package/build/lock-unlock.js +1 -2
- package/build/lock-unlock.js.map +1 -1
- package/build/private-apis.js +2 -27
- package/build/private-apis.js.map +1 -1
- package/build/private-apis.native.js +2 -8
- package/build/private-apis.native.js.map +1 -1
- package/build/store/actions.js +187 -285
- package/build/store/actions.js.map +1 -1
- package/build/store/array.js +1 -3
- package/build/store/array.js.map +1 -1
- package/build/store/constants.js.map +1 -1
- package/build/store/defaults.js +2 -3
- package/build/store/defaults.js.map +1 -1
- package/build/store/defaults.native.js +3 -3
- package/build/store/defaults.native.js.map +1 -1
- package/build/store/index.js +11 -19
- package/build/store/index.js.map +1 -1
- package/build/store/private-actions.js +26 -91
- package/build/store/private-actions.js.map +1 -1
- package/build/store/private-selectors.js +8 -90
- package/build/store/private-selectors.js.map +1 -1
- package/build/store/reducer.js +161 -358
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +255 -453
- package/build/store/selectors.js.map +1 -1
- package/build/store/utils.js +0 -1
- package/build/store/utils.js.map +1 -1
- package/build/utils/block-variation-transforms.js +2 -5
- package/build/utils/block-variation-transforms.js.map +1 -1
- package/build/utils/dom.js +4 -12
- package/build/utils/dom.js.map +1 -1
- package/build/utils/index.js +0 -5
- package/build/utils/index.js.map +1 -1
- package/build/utils/math.js +5 -10
- package/build/utils/math.js.map +1 -1
- package/build/utils/object.js +14 -25
- package/build/utils/object.js.map +1 -1
- package/build/utils/order-inserter-block-items.js +2 -5
- package/build/utils/order-inserter-block-items.js.map +1 -1
- package/build/utils/parse-css-unit-to-px.js +14 -66
- package/build/utils/parse-css-unit-to-px.js.map +1 -1
- package/build/utils/pasting.js +9 -15
- package/build/utils/pasting.js.map +1 -1
- package/build/utils/pre-parse-patterns.js +1 -16
- package/build/utils/pre-parse-patterns.js.map +1 -1
- package/build/utils/selection.js +1 -4
- package/build/utils/selection.js.map +1 -1
- package/build/utils/sorting.js +3 -8
- package/build/utils/sorting.js.map +1 -1
- package/build/utils/transform-styles/ast/index.js +0 -3
- package/build/utils/transform-styles/ast/index.js.map +1 -1
- package/build/utils/transform-styles/ast/parse.js +95 -137
- package/build/utils/transform-styles/ast/parse.js.map +1 -1
- package/build/utils/transform-styles/ast/stringify/compiler.js +3 -9
- package/build/utils/transform-styles/ast/stringify/compiler.js.map +1 -1
- package/build/utils/transform-styles/ast/stringify/compress.js +25 -27
- package/build/utils/transform-styles/ast/stringify/compress.js.map +1 -1
- package/build/utils/transform-styles/ast/stringify/identity.js +28 -33
- package/build/utils/transform-styles/ast/stringify/identity.js.map +1 -1
- package/build/utils/transform-styles/ast/stringify/index.js +1 -4
- package/build/utils/transform-styles/ast/stringify/index.js.map +1 -1
- package/build/utils/transform-styles/index.js +0 -11
- package/build/utils/transform-styles/index.js.map +1 -1
- package/build/utils/transform-styles/transforms/url-rewrite.js +12 -25
- package/build/utils/transform-styles/transforms/url-rewrite.js.map +1 -1
- package/build/utils/transform-styles/transforms/wrap.js +7 -9
- package/build/utils/transform-styles/transforms/wrap.js.map +1 -1
- package/build/utils/transform-styles/traverse.js +1 -8
- package/build/utils/transform-styles/traverse.js.map +1 -1
- package/build/utils/use-should-contextual-toolbar-show.js +0 -9
- package/build/utils/use-should-contextual-toolbar-show.js.map +1 -1
- package/build-module/autocompleters/block.js +3 -13
- package/build-module/autocompleters/block.js.map +1 -1
- package/build-module/autocompleters/link.js +2 -8
- package/build-module/autocompleters/link.js.map +1 -1
- package/build-module/components/alignment-control/index.js +5 -7
- package/build-module/components/alignment-control/index.js.map +1 -1
- package/build-module/components/alignment-control/ui.js +2 -7
- package/build-module/components/alignment-control/ui.js.map +1 -1
- package/build-module/components/autocomplete/index.js +10 -15
- package/build-module/components/autocomplete/index.js.map +1 -1
- package/build-module/components/block-actions/index.js +3 -20
- package/build-module/components/block-actions/index.js.map +1 -1
- package/build-module/components/block-alignment-control/constants.js.map +1 -1
- package/build-module/components/block-alignment-control/index.js +5 -7
- package/build-module/components/block-alignment-control/index.js.map +1 -1
- package/build-module/components/block-alignment-control/ui.js +8 -12
- package/build-module/components/block-alignment-control/ui.js.map +1 -1
- package/build-module/components/block-alignment-control/ui.native.js +5 -9
- package/build-module/components/block-alignment-control/ui.native.js.map +1 -1
- package/build-module/components/block-alignment-control/use-available-alignments.js +10 -13
- package/build-module/components/block-alignment-control/use-available-alignments.js.map +1 -1
- package/build-module/components/block-alignment-matrix-control/index.js +0 -5
- package/build-module/components/block-alignment-matrix-control/index.js.map +1 -1
- package/build-module/components/block-breadcrumb/index.js +4 -9
- package/build-module/components/block-breadcrumb/index.js.map +1 -1
- package/build-module/components/block-caption/index.native.js +8 -9
- package/build-module/components/block-caption/index.native.js.map +1 -1
- package/build-module/components/block-card/index.js +6 -10
- package/build-module/components/block-card/index.js.map +1 -1
- package/build-module/components/block-compare/block-view.js +0 -1
- package/build-module/components/block-compare/block-view.js.map +1 -1
- package/build-module/components/block-compare/index.js +6 -10
- package/build-module/components/block-compare/index.js.map +1 -1
- package/build-module/components/block-content-overlay/index.js +1 -1
- package/build-module/components/block-content-overlay/index.js.map +1 -1
- package/build-module/components/block-context/index.js +4 -4
- package/build-module/components/block-context/index.js.map +1 -1
- package/build-module/components/block-controls/fill.js +3 -5
- package/build-module/components/block-controls/fill.js.map +1 -1
- package/build-module/components/block-controls/groups.js.map +1 -1
- package/build-module/components/block-controls/hook.js +1 -4
- package/build-module/components/block-controls/hook.js.map +1 -1
- package/build-module/components/block-controls/index.js +2 -4
- package/build-module/components/block-controls/index.js.map +1 -1
- package/build-module/components/block-controls/slot.js +3 -8
- package/build-module/components/block-controls/slot.js.map +1 -1
- package/build-module/components/block-controls/slot.native.js +5 -8
- package/build-module/components/block-controls/slot.native.js.map +1 -1
- package/build-module/components/block-controls/use-has-block-controls.js +34 -0
- package/build-module/components/block-controls/use-has-block-controls.js.map +1 -0
- package/build-module/components/block-draggable/draggable-chip.js +2 -5
- package/build-module/components/block-draggable/draggable-chip.js.map +1 -1
- package/build-module/components/block-draggable/draggable-chip.native.js +3 -4
- package/build-module/components/block-draggable/draggable-chip.native.js.map +1 -1
- package/build-module/components/block-draggable/dropping-insertion-point.native.js +5 -15
- package/build-module/components/block-draggable/dropping-insertion-point.native.js.map +1 -1
- package/build-module/components/block-draggable/index.js +3 -9
- package/build-module/components/block-draggable/index.js.map +1 -1
- package/build-module/components/block-draggable/index.native.js +8 -34
- package/build-module/components/block-draggable/index.native.js.map +1 -1
- package/build-module/components/block-draggable/use-scroll-when-dragging.js +8 -10
- package/build-module/components/block-draggable/use-scroll-when-dragging.js.map +1 -1
- package/build-module/components/block-draggable/use-scroll-when-dragging.native.js +2 -11
- package/build-module/components/block-draggable/use-scroll-when-dragging.native.js.map +1 -1
- package/build-module/components/block-edit/context.js +1 -1
- package/build-module/components/block-edit/context.js.map +1 -1
- package/build-module/components/block-edit/edit.js +16 -20
- package/build-module/components/block-edit/edit.js.map +1 -1
- package/build-module/components/block-edit/edit.native.js +6 -7
- package/build-module/components/block-edit/edit.native.js.map +1 -1
- package/build-module/components/block-edit/index.js +5 -5
- package/build-module/components/block-edit/index.js.map +1 -1
- package/build-module/components/block-edit-visually-button/index.js +1 -4
- package/build-module/components/block-edit-visually-button/index.js.map +1 -1
- package/build-module/components/block-editing-mode/index.js +4 -7
- package/build-module/components/block-editing-mode/index.js.map +1 -1
- package/build-module/components/block-full-height-alignment-control/index.js +0 -3
- 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 -6
- package/build-module/components/block-heading-level-dropdown/index.js.map +1 -1
- package/build-module/components/block-heading-level-dropdown/index.native.js +2 -4
- package/build-module/components/block-heading-level-dropdown/index.native.js.map +1 -1
- package/build-module/components/block-icon/index.js +2 -6
- package/build-module/components/block-icon/index.js.map +1 -1
- package/build-module/components/block-icon/index.native.js +2 -4
- package/build-module/components/block-icon/index.native.js.map +1 -1
- package/build-module/components/block-info-slot-fill/index.js +5 -9
- package/build-module/components/block-info-slot-fill/index.js.map +1 -1
- package/build-module/components/block-inspector/index.js +11 -25
- package/build-module/components/block-inspector/index.js.map +1 -1
- package/build-module/components/block-inspector/useBlockInspectorAnimationSettings.js +7 -8
- package/build-module/components/block-inspector/useBlockInspectorAnimationSettings.js.map +1 -1
- package/build-module/components/block-list/block-crash-boundary.js +0 -6
- package/build-module/components/block-list/block-crash-boundary.js.map +1 -1
- package/build-module/components/block-list/block-crash-warning.js +1 -2
- package/build-module/components/block-list/block-crash-warning.js.map +1 -1
- package/build-module/components/block-list/block-html.js +8 -12
- package/build-module/components/block-list/block-html.js.map +1 -1
- package/build-module/components/block-list/block-invalid-warning.js +3 -9
- package/build-module/components/block-list/block-invalid-warning.js.map +1 -1
- package/build-module/components/block-list/block-invalid-warning.native.js +5 -10
- package/build-module/components/block-list/block-invalid-warning.native.js.map +1 -1
- package/build-module/components/block-list/block-list-block-context.js.map +1 -1
- package/build-module/components/block-list/block-list-context.native.js +11 -21
- package/build-module/components/block-list/block-list-context.native.js.map +1 -1
- package/build-module/components/block-list/block-list-item-cell.native.js +2 -6
- 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 +8 -12
- package/build-module/components/block-list/block-list-item.native.js.map +1 -1
- package/build-module/components/block-list/block-outline.native.js +4 -7
- package/build-module/components/block-list/block-outline.native.js.map +1 -1
- package/build-module/components/block-list/block-selection-button.native.js +3 -10
- package/build-module/components/block-list/block-selection-button.native.js.map +1 -1
- package/build-module/components/block-list/block.js +41 -64
- package/build-module/components/block-list/block.js.map +1 -1
- package/build-module/components/block-list/block.native.js +41 -57
- package/build-module/components/block-list/block.native.js.map +1 -1
- package/build-module/components/block-list/grid-item.native.js +1 -4
- package/build-module/components/block-list/grid-item.native.js.map +1 -1
- package/build-module/components/block-list/index.js +10 -15
- package/build-module/components/block-list/index.js.map +1 -1
- package/build-module/components/block-list/index.native.js +21 -39
- package/build-module/components/block-list/index.native.js.map +1 -1
- package/build-module/components/block-list/insertion-point.native.js +2 -5
- package/build-module/components/block-list/insertion-point.native.js.map +1 -1
- package/build-module/components/block-list/layout.js +3 -8
- package/build-module/components/block-list/layout.js.map +1 -1
- package/build-module/components/block-list/subdirectory-icon.js +2 -4
- package/build-module/components/block-list/subdirectory-icon.js.map +1 -1
- package/build-module/components/block-list/use-block-props/index.js +13 -11
- package/build-module/components/block-list/use-block-props/index.js.map +1 -1
- package/build-module/components/block-list/use-block-props/index.native.js +4 -2
- package/build-module/components/block-list/use-block-props/index.native.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-block-class-names.js +5 -5
- package/build-module/components/block-list/use-block-props/use-block-class-names.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-block-custom-class-name.js +2 -6
- package/build-module/components/block-list/use-block-props/use-block-custom-class-name.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-block-default-class-name.js +2 -4
- package/build-module/components/block-list/use-block-props/use-block-default-class-name.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-block-moving-mode-class-names.js +6 -8
- package/build-module/components/block-list/use-block-props/use-block-moving-mode-class-names.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-block-refs.js +11 -16
- package/build-module/components/block-list/use-block-props/use-block-refs.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-focus-first-element.js +15 -21
- package/build-module/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-focus-handler.js +8 -11
- package/build-module/components/block-list/use-block-props/use-focus-handler.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-intersection-observer.js +1 -1
- package/build-module/components/block-list/use-block-props/use-intersection-observer.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-is-hovered.js +4 -6
- package/build-module/components/block-list/use-block-props/use-is-hovered.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-nav-mode-exit.js +4 -4
- package/build-module/components/block-list/use-block-props/use-nav-mode-exit.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.js +4 -11
- package/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +1 -1
- package/build-module/components/block-list/use-in-between-inserter.js +15 -30
- package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
- package/build-module/components/block-list-appender/index.js +13 -26
- package/build-module/components/block-list-appender/index.js.map +1 -1
- package/build-module/components/block-list-appender/index.native.js +1 -9
- package/build-module/components/block-list-appender/index.native.js.map +1 -1
- package/build-module/components/block-lock/index.js.map +1 -1
- package/build-module/components/block-lock/menu-item.js +1 -4
- package/build-module/components/block-lock/menu-item.js.map +1 -1
- package/build-module/components/block-lock/modal.js +12 -13
- package/build-module/components/block-lock/modal.js.map +1 -1
- package/build-module/components/block-lock/toolbar.js +6 -9
- package/build-module/components/block-lock/toolbar.js.map +1 -1
- package/build-module/components/block-lock/use-block-lock.js +2 -2
- package/build-module/components/block-lock/use-block-lock.js.map +1 -1
- package/build-module/components/block-media-update-progress/index.native.js +10 -59
- package/build-module/components/block-media-update-progress/index.native.js.map +1 -1
- package/build-module/components/block-mover/button.js +2 -15
- package/build-module/components/block-mover/button.js.map +1 -1
- package/build-module/components/block-mover/index.js +5 -11
- package/build-module/components/block-mover/index.js.map +1 -1
- package/build-module/components/block-mover/index.native.js +4 -11
- package/build-module/components/block-mover/index.native.js.map +1 -1
- package/build-module/components/block-mover/mover-description.js +40 -61
- package/build-module/components/block-mover/mover-description.js.map +1 -1
- package/build-module/components/block-mover/mover-description.native.js +0 -16
- package/build-module/components/block-mover/mover-description.native.js.map +1 -1
- package/build-module/components/block-navigation/dropdown.js +7 -10
- package/build-module/components/block-navigation/dropdown.js.map +1 -1
- package/build-module/components/block-parent-selector/index.js +7 -13
- package/build-module/components/block-parent-selector/index.js.map +1 -1
- package/build-module/components/block-pattern-setup/constants.js.map +1 -1
- package/build-module/components/block-pattern-setup/index.js +3 -13
- package/build-module/components/block-pattern-setup/index.js.map +1 -1
- package/build-module/components/block-pattern-setup/setup-toolbar.js +1 -6
- package/build-module/components/block-pattern-setup/setup-toolbar.js.map +1 -1
- package/build-module/components/block-pattern-setup/use-patterns-setup.js +1 -5
- package/build-module/components/block-pattern-setup/use-patterns-setup.js.map +1 -1
- package/build-module/components/block-patterns-list/index.js +3 -12
- package/build-module/components/block-patterns-list/index.js.map +1 -1
- package/build-module/components/block-popover/drop-zone.js +1 -6
- package/build-module/components/block-popover/drop-zone.js.map +1 -1
- package/build-module/components/block-popover/inbetween.js +17 -25
- package/build-module/components/block-popover/inbetween.js.map +1 -1
- package/build-module/components/block-popover/index.js +16 -20
- package/build-module/components/block-popover/index.js.map +1 -1
- package/build-module/components/block-popover/use-popover-scroll.js +3 -6
- package/build-module/components/block-popover/use-popover-scroll.js.map +1 -1
- package/build-module/components/block-preview/auto.js +11 -11
- package/build-module/components/block-preview/auto.js.map +1 -1
- package/build-module/components/block-preview/index.js +10 -13
- package/build-module/components/block-preview/index.js.map +1 -1
- package/build-module/components/block-quick-navigation/index.js +2 -7
- package/build-module/components/block-quick-navigation/index.js.map +1 -1
- package/build-module/components/block-removal-warning-modal/index.js +5 -10
- package/build-module/components/block-removal-warning-modal/index.js.map +1 -1
- package/build-module/components/block-selection-clearer/index.js +4 -8
- package/build-module/components/block-selection-clearer/index.js.map +1 -1
- package/build-module/components/block-settings/button.native.js +2 -5
- package/build-module/components/block-settings/button.native.js.map +1 -1
- package/build-module/components/block-settings/container.native.js +3 -3
- package/build-module/components/block-settings/container.native.js.map +1 -1
- package/build-module/components/block-settings/index.native.js.map +1 -1
- package/build-module/components/block-settings-menu/block-convert-button.js +0 -3
- package/build-module/components/block-settings-menu/block-convert-button.js.map +1 -1
- package/build-module/components/block-settings-menu/block-html-convert-button.js +1 -1
- package/build-module/components/block-settings-menu/block-html-convert-button.js.map +1 -1
- package/build-module/components/block-settings-menu/block-mode-toggle.js +1 -6
- package/build-module/components/block-settings-menu/block-mode-toggle.js.map +1 -1
- package/build-module/components/block-settings-menu/block-settings-dropdown.js +14 -23
- package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build-module/components/block-settings-menu/block-settings-menu-first-item.js.map +1 -1
- package/build-module/components/block-settings-menu/index.js +1 -2
- package/build-module/components/block-settings-menu/index.js.map +1 -1
- package/build-module/components/block-settings-menu-controls/index.js +13 -13
- package/build-module/components/block-settings-menu-controls/index.js.map +1 -1
- package/build-module/components/block-styles/index.js +4 -15
- package/build-module/components/block-styles/index.js.map +1 -1
- package/build-module/components/block-styles/index.native.js +2 -10
- package/build-module/components/block-styles/index.native.js.map +1 -1
- package/build-module/components/block-styles/menu-items.js +1 -6
- package/build-module/components/block-styles/menu-items.js.map +1 -1
- package/build-module/components/block-styles/preview-panel.js +5 -4
- package/build-module/components/block-styles/preview-panel.js.map +1 -1
- package/build-module/components/block-styles/preview.native.js +4 -12
- package/build-module/components/block-styles/preview.native.js.map +1 -1
- package/build-module/components/block-styles/use-styles-for-block.js +3 -11
- package/build-module/components/block-styles/use-styles-for-block.js.map +1 -1
- package/build-module/components/block-styles/utils.js +4 -10
- package/build-module/components/block-styles/utils.js.map +1 -1
- package/build-module/components/block-switcher/block-styles-menu.js +1 -2
- package/build-module/components/block-switcher/block-styles-menu.js.map +1 -1
- package/build-module/components/block-switcher/block-transformations-menu.js +6 -12
- package/build-module/components/block-switcher/block-transformations-menu.js.map +1 -1
- package/build-module/components/block-switcher/block-transformations-menu.native.js +5 -13
- package/build-module/components/block-switcher/block-transformations-menu.native.js.map +1 -1
- package/build-module/components/block-switcher/block-variation-transformations.js +3 -8
- package/build-module/components/block-switcher/block-variation-transformations.js.map +1 -1
- package/build-module/components/block-switcher/index.js +12 -26
- package/build-module/components/block-switcher/index.js.map +1 -1
- package/build-module/components/block-switcher/pattern-transformations-menu.js +3 -8
- package/build-module/components/block-switcher/pattern-transformations-menu.js.map +1 -1
- package/build-module/components/block-switcher/preview-block-popover.js +1 -2
- package/build-module/components/block-switcher/preview-block-popover.js.map +1 -1
- package/build-module/components/block-switcher/use-transformed-patterns.js +14 -21
- package/build-module/components/block-switcher/use-transformed-patterns.js.map +1 -1
- package/build-module/components/block-switcher/utils.js +6 -6
- package/build-module/components/block-switcher/utils.js.map +1 -1
- package/build-module/components/block-title/index.js +2 -1
- package/build-module/components/block-title/index.js.map +1 -1
- package/build-module/components/block-title/use-block-display-title.js +4 -11
- package/build-module/components/block-title/use-block-display-title.js.map +1 -1
- package/build-module/components/block-toolbar/block-name-context.js +0 -2
- package/build-module/components/block-toolbar/block-name-context.js.map +1 -1
- package/build-module/components/block-toolbar/block-toolbar-last-item.js.map +1 -1
- package/build-module/components/block-toolbar/block-toolbar-menu.native.js +26 -31
- package/build-module/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
- package/build-module/components/block-toolbar/index.js +7 -13
- package/build-module/components/block-toolbar/index.js.map +1 -1
- package/build-module/components/block-toolbar/index.native.js +1 -6
- package/build-module/components/block-toolbar/index.native.js.map +1 -1
- package/build-module/components/block-toolbar/utils.js +4 -22
- package/build-module/components/block-toolbar/utils.js.map +1 -1
- package/build-module/components/block-tools/back-compat.js +3 -4
- package/build-module/components/block-tools/back-compat.js.map +1 -1
- package/build-module/components/block-tools/block-contextual-toolbar.js +52 -16
- package/build-module/components/block-tools/block-contextual-toolbar.js.map +1 -1
- package/build-module/components/block-tools/block-selection-button.js +11 -30
- package/build-module/components/block-tools/block-selection-button.js.map +1 -1
- package/build-module/components/block-tools/index.js +9 -20
- package/build-module/components/block-tools/index.js.map +1 -1
- package/build-module/components/block-tools/insertion-point.js +9 -22
- package/build-module/components/block-tools/insertion-point.js.map +1 -1
- package/build-module/components/block-tools/selected-block-popover.js +13 -25
- package/build-module/components/block-tools/selected-block-popover.js.map +1 -1
- package/build-module/components/block-tools/use-block-toolbar-popover-props.js +35 -29
- package/build-module/components/block-tools/use-block-toolbar-popover-props.js.map +1 -1
- package/build-module/components/block-tools/zoom-out-mode-inserters.js +3 -8
- package/build-module/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
- package/build-module/components/block-types-list/index.js +1 -7
- package/build-module/components/block-types-list/index.js.map +1 -1
- package/build-module/components/block-types-list/index.native.js +4 -14
- package/build-module/components/block-types-list/index.native.js.map +1 -1
- package/build-module/components/block-variation-picker/index.js +1 -4
- package/build-module/components/block-variation-picker/index.js.map +1 -1
- package/build-module/components/block-variation-picker/index.native.js +2 -7
- package/build-module/components/block-variation-picker/index.native.js.map +1 -1
- package/build-module/components/block-variation-transforms/index.js +8 -15
- package/build-module/components/block-variation-transforms/index.js.map +1 -1
- package/build-module/components/block-vertical-alignment-control/icons.js +0 -1
- package/build-module/components/block-vertical-alignment-control/icons.js.map +1 -1
- package/build-module/components/block-vertical-alignment-control/index.js +5 -7
- package/build-module/components/block-vertical-alignment-control/index.js.map +1 -1
- package/build-module/components/block-vertical-alignment-control/ui.js +4 -7
- package/build-module/components/block-vertical-alignment-control/ui.js.map +1 -1
- package/build-module/components/border-radius-control/all-input-control.js +8 -10
- package/build-module/components/border-radius-control/all-input-control.js.map +1 -1
- package/build-module/components/border-radius-control/index.js +5 -8
- package/build-module/components/border-radius-control/index.js.map +1 -1
- package/build-module/components/border-radius-control/input-controls.js +13 -11
- package/build-module/components/border-radius-control/input-controls.js.map +1 -1
- package/build-module/components/border-radius-control/linked-button.js +4 -3
- package/build-module/components/border-radius-control/linked-button.js.map +1 -1
- package/build-module/components/border-radius-control/utils.js +10 -12
- package/build-module/components/border-radius-control/utils.js.map +1 -1
- package/build-module/components/button-block-appender/index.js +6 -12
- package/build-module/components/button-block-appender/index.js.map +1 -1
- package/build-module/components/button-block-appender/index.native.js +5 -7
- package/build-module/components/button-block-appender/index.native.js.map +1 -1
- package/build-module/components/caption/index.native.js +1 -4
- package/build-module/components/caption/index.native.js.map +1 -1
- package/build-module/components/child-layout-control/index.js +7 -10
- 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/index.js +1 -1
- package/build-module/components/color-palette/index.js.map +1 -1
- package/build-module/components/color-palette/with-color-context.js +3 -3
- package/build-module/components/color-palette/with-color-context.js.map +1 -1
- package/build-module/components/color-style-selector/index.js +2 -9
- package/build-module/components/color-style-selector/index.js.map +1 -1
- package/build-module/components/colors/index.js.map +1 -1
- package/build-module/components/colors/utils.js +5 -10
- package/build-module/components/colors/utils.js.map +1 -1
- package/build-module/components/colors/with-colors.js +17 -25
- package/build-module/components/colors/with-colors.js.map +1 -1
- package/build-module/components/colors-gradients/control.js +8 -15
- package/build-module/components/colors-gradients/control.js.map +1 -1
- package/build-module/components/colors-gradients/dropdown.js +18 -19
- package/build-module/components/colors-gradients/dropdown.js.map +1 -1
- package/build-module/components/colors-gradients/panel-color-gradient-settings.js +8 -12
- 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 +2 -3
- package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
- package/build-module/components/colors-gradients/use-multiple-origin-colors-and-gradients.js +2 -10
- package/build-module/components/colors-gradients/use-multiple-origin-colors-and-gradients.js.map +1 -1
- package/build-module/components/contrast-checker/index.js +20 -24
- package/build-module/components/contrast-checker/index.js.map +1 -1
- package/build-module/components/contrast-checker/index.native.js +4 -12
- package/build-module/components/contrast-checker/index.native.js.map +1 -1
- package/build-module/components/convert-to-group-buttons/index.js +1 -12
- package/build-module/components/convert-to-group-buttons/index.js.map +1 -1
- package/build-module/components/convert-to-group-buttons/index.native.js +5 -12
- package/build-module/components/convert-to-group-buttons/index.native.js.map +1 -1
- package/build-module/components/convert-to-group-buttons/toolbar.js +3 -12
- package/build-module/components/convert-to-group-buttons/toolbar.js.map +1 -1
- package/build-module/components/convert-to-group-buttons/use-convert-to-group-button-props.js +6 -5
- package/build-module/components/convert-to-group-buttons/use-convert-to-group-button-props.js.map +1 -1
- package/build-module/components/copy-handler/index.js +24 -44
- package/build-module/components/copy-handler/index.js.map +1 -1
- package/build-module/components/date-format-picker/index.js +4 -6
- package/build-module/components/date-format-picker/index.js.map +1 -1
- package/build-module/components/default-block-appender/index.js +7 -9
- package/build-module/components/default-block-appender/index.js.map +1 -1
- package/build-module/components/default-block-appender/index.native.js +16 -10
- package/build-module/components/default-block-appender/index.native.js.map +1 -1
- package/build-module/components/default-style-picker/index.js +4 -6
- package/build-module/components/default-style-picker/index.js.map +1 -1
- package/build-module/components/dimensions-tool/aspect-ratio-tool.js +2 -2
- package/build-module/components/dimensions-tool/aspect-ratio-tool.js.map +1 -1
- package/build-module/components/dimensions-tool/index.js +39 -33
- package/build-module/components/dimensions-tool/index.js.map +1 -1
- package/build-module/components/dimensions-tool/scale-tool.js +2 -3
- package/build-module/components/dimensions-tool/scale-tool.js.map +1 -1
- package/build-module/components/dimensions-tool/width-height-tool.js +5 -12
- package/build-module/components/dimensions-tool/width-height-tool.js.map +1 -1
- package/build-module/components/duotone/components.js +7 -7
- package/build-module/components/duotone/components.js.map +1 -1
- package/build-module/components/duotone/index.js.map +1 -1
- package/build-module/components/duotone/utils.js +1 -1
- package/build-module/components/duotone/utils.js.map +1 -1
- package/build-module/components/duotone-control/index.js +0 -6
- package/build-module/components/duotone-control/index.js.map +1 -1
- package/build-module/components/editable-text/index.js +4 -6
- package/build-module/components/editable-text/index.js.map +1 -1
- package/build-module/components/editor-styles/index.js +4 -10
- package/build-module/components/editor-styles/index.js.map +1 -1
- package/build-module/components/floating-toolbar/index.native.js +4 -8
- package/build-module/components/floating-toolbar/index.native.js.map +1 -1
- package/build-module/components/floating-toolbar/nav-up-icon.js +0 -3
- package/build-module/components/floating-toolbar/nav-up-icon.js.map +1 -1
- package/build-module/components/font-appearance-control/index.js +24 -27
- package/build-module/components/font-appearance-control/index.js.map +1 -1
- package/build-module/components/font-family/index.js +1 -5
- package/build-module/components/font-family/index.js.map +1 -1
- package/build-module/components/font-sizes/fluid-utils.js +41 -37
- package/build-module/components/font-sizes/fluid-utils.js.map +1 -1
- package/build-module/components/font-sizes/font-size-picker.js +4 -6
- package/build-module/components/font-sizes/font-size-picker.js.map +1 -1
- package/build-module/components/font-sizes/index.js.map +1 -1
- package/build-module/components/font-sizes/index.native.js.map +1 -1
- package/build-module/components/font-sizes/utils.js +3 -8
- package/build-module/components/font-sizes/utils.js.map +1 -1
- package/build-module/components/font-sizes/with-font-sizes.js +15 -22
- package/build-module/components/font-sizes/with-font-sizes.js.map +1 -1
- package/build-module/components/global-styles/advanced-panel.js +3 -9
- package/build-module/components/global-styles/advanced-panel.js.map +1 -1
- package/build-module/components/global-styles/behaviors-panel.js +2 -2
- package/build-module/components/global-styles/behaviors-panel.js.map +1 -1
- package/build-module/components/global-styles/border-panel.js +22 -36
- package/build-module/components/global-styles/border-panel.js.map +1 -1
- package/build-module/components/global-styles/color-panel.js +31 -56
- package/build-module/components/global-styles/color-panel.js.map +1 -1
- package/build-module/components/global-styles/color-panel.native.js +5 -8
- package/build-module/components/global-styles/color-panel.native.js.map +1 -1
- package/build-module/components/global-styles/context.js.map +1 -1
- package/build-module/components/global-styles/dimensions-panel.js +34 -80
- package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
- package/build-module/components/global-styles/effects-panel.js +8 -20
- package/build-module/components/global-styles/effects-panel.js.map +1 -1
- package/build-module/components/global-styles/filters-panel.js +10 -20
- package/build-module/components/global-styles/filters-panel.js.map +1 -1
- package/build-module/components/global-styles/get-block-css-selector.js +34 -29
- package/build-module/components/global-styles/get-block-css-selector.js.map +1 -1
- package/build-module/components/global-styles/hooks.js +42 -72
- package/build-module/components/global-styles/hooks.js.map +1 -1
- package/build-module/components/global-styles/index.js.map +1 -1
- package/build-module/components/global-styles/typography-panel.js +25 -73
- package/build-module/components/global-styles/typography-panel.js.map +1 -1
- package/build-module/components/global-styles/typography-utils.js +8 -14
- package/build-module/components/global-styles/typography-utils.js.map +1 -1
- package/build-module/components/global-styles/use-global-styles-output.js +99 -163
- package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build-module/components/global-styles/utils.js +13 -43
- package/build-module/components/global-styles/utils.js.map +1 -1
- package/build-module/components/gradients/index.js.map +1 -1
- package/build-module/components/gradients/index.native.js.map +1 -1
- package/build-module/components/gradients/use-gradient.js +3 -11
- package/build-module/components/gradients/use-gradient.js.map +1 -1
- package/build-module/components/gradients/with-gradient.js +2 -3
- package/build-module/components/gradients/with-gradient.js.map +1 -1
- package/build-module/components/height-control/index.js +2 -8
- package/build-module/components/height-control/index.js.map +1 -1
- package/build-module/components/iframe/index.js +26 -37
- package/build-module/components/iframe/index.js.map +1 -1
- package/build-module/components/iframe/use-compatibility-styles.js +9 -19
- package/build-module/components/iframe/use-compatibility-styles.js.map +1 -1
- package/build-module/components/image-editor/aspect-ratio-dropdown.js +3 -5
- package/build-module/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
- package/build-module/components/image-editor/constants.js.map +1 -1
- package/build-module/components/image-editor/context.js +3 -3
- package/build-module/components/image-editor/context.js.map +1 -1
- package/build-module/components/image-editor/cropper.js +4 -6
- package/build-module/components/image-editor/cropper.js.map +1 -1
- package/build-module/components/image-editor/form-controls.js +1 -2
- package/build-module/components/image-editor/form-controls.js.map +1 -1
- package/build-module/components/image-editor/index.js +1 -2
- 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/use-save-image.js +4 -7
- package/build-module/components/image-editor/use-save-image.js.map +1 -1
- package/build-module/components/image-editor/use-transform-image.js +0 -9
- package/build-module/components/image-editor/use-transform-image.js.map +1 -1
- package/build-module/components/image-editor/zoom-dropdown.js +1 -2
- package/build-module/components/image-editor/zoom-dropdown.js.map +1 -1
- package/build-module/components/image-size-control/index.js +1 -4
- package/build-module/components/image-size-control/index.js.map +1 -1
- package/build-module/components/image-size-control/use-dimension-handler.js +6 -12
- package/build-module/components/image-size-control/use-dimension-handler.js.map +1 -1
- package/build-module/components/index.js +11 -1
- package/build-module/components/index.js.map +1 -1
- package/build-module/components/index.native.js +4 -3
- package/build-module/components/index.native.js.map +1 -1
- package/build-module/components/inner-blocks/button-block-appender.js +1 -2
- package/build-module/components/inner-blocks/button-block-appender.js.map +1 -1
- package/build-module/components/inner-blocks/default-block-appender.js +1 -2
- package/build-module/components/inner-blocks/default-block-appender.js.map +1 -1
- package/build-module/components/inner-blocks/index.js +23 -21
- package/build-module/components/inner-blocks/index.js.map +1 -1
- package/build-module/components/inner-blocks/index.native.js +21 -20
- package/build-module/components/inner-blocks/index.native.js.map +1 -1
- package/build-module/components/inner-blocks/use-block-context.js +2 -7
- package/build-module/components/inner-blocks/use-block-context.js.map +1 -1
- package/build-module/components/inner-blocks/use-inner-block-template-sync.js +13 -14
- package/build-module/components/inner-blocks/use-inner-block-template-sync.js.map +1 -1
- package/build-module/components/inner-blocks/use-nested-settings-update.js +19 -21
- package/build-module/components/inner-blocks/use-nested-settings-update.js.map +1 -1
- package/build-module/components/inner-blocks/with-client-id.js +3 -3
- package/build-module/components/inner-blocks/with-client-id.js.map +1 -1
- package/build-module/components/inserter/block-patterns-explorer/explorer.js +3 -6
- package/build-module/components/inserter/block-patterns-explorer/explorer.js.map +1 -1
- package/build-module/components/inserter/block-patterns-explorer/patterns-list.js +5 -13
- package/build-module/components/inserter/block-patterns-explorer/patterns-list.js.map +1 -1
- package/build-module/components/inserter/block-patterns-explorer/sidebar.js +0 -5
- package/build-module/components/inserter/block-patterns-explorer/sidebar.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab.js +12 -22
- package/build-module/components/inserter/block-patterns-tab.js.map +1 -1
- package/build-module/components/inserter/block-types-tab.js +9 -16
- package/build-module/components/inserter/block-types-tab.js.map +1 -1
- package/build-module/components/inserter/block-types-tab.native.js +1 -8
- package/build-module/components/inserter/block-types-tab.native.js.map +1 -1
- package/build-module/components/inserter/hooks/use-block-type-impressions.native.js +9 -10
- package/build-module/components/inserter/hooks/use-block-type-impressions.native.js.map +1 -1
- package/build-module/components/inserter/hooks/use-block-types-state.js +2 -3
- package/build-module/components/inserter/hooks/use-block-types-state.js.map +1 -1
- package/build-module/components/inserter/hooks/use-clipboard-block.native.js +1 -3
- package/build-module/components/inserter/hooks/use-clipboard-block.native.js.map +1 -1
- package/build-module/components/inserter/hooks/use-debounced-input.js.map +1 -1
- package/build-module/components/inserter/hooks/use-insertion-point.js +4 -10
- package/build-module/components/inserter/hooks/use-insertion-point.js.map +1 -1
- package/build-module/components/inserter/hooks/use-patterns-state.js +4 -6
- package/build-module/components/inserter/hooks/use-patterns-state.js.map +1 -1
- package/build-module/components/inserter/index.js +30 -56
- package/build-module/components/inserter/index.js.map +1 -1
- package/build-module/components/inserter/index.native.js +24 -56
- package/build-module/components/inserter/index.native.js.map +1 -1
- package/build-module/components/inserter/library.js +1 -7
- package/build-module/components/inserter/library.js.map +1 -1
- package/build-module/components/inserter/media-tab/hooks.js +14 -25
- package/build-module/components/inserter/media-tab/hooks.js.map +1 -1
- package/build-module/components/inserter/media-tab/index.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-list.js +3 -5
- package/build-module/components/inserter/media-tab/media-list.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-panel.js +1 -4
- package/build-module/components/inserter/media-tab/media-panel.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-preview.js +11 -24
- package/build-module/components/inserter/media-tab/media-preview.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-tab.js +4 -7
- package/build-module/components/inserter/media-tab/media-tab.js.map +1 -1
- package/build-module/components/inserter/media-tab/utils.js +1 -4
- package/build-module/components/inserter/media-tab/utils.js.map +1 -1
- package/build-module/components/inserter/menu.js +3 -5
- package/build-module/components/inserter/menu.js.map +1 -1
- package/build-module/components/inserter/menu.native.js +6 -15
- package/build-module/components/inserter/menu.native.js.map +1 -1
- package/build-module/components/inserter/mobile-tab-navigation.js +2 -4
- package/build-module/components/inserter/mobile-tab-navigation.js.map +1 -1
- package/build-module/components/inserter/no-results.js +0 -3
- package/build-module/components/inserter/no-results.js.map +1 -1
- package/build-module/components/inserter/no-results.native.js +2 -5
- package/build-module/components/inserter/no-results.native.js.map +1 -1
- package/build-module/components/inserter/panel.js +0 -3
- package/build-module/components/inserter/panel.js.map +1 -1
- package/build-module/components/inserter/preview-panel.js +15 -11
- package/build-module/components/inserter/preview-panel.js.map +1 -1
- package/build-module/components/inserter/quick-inserter.js +5 -8
- package/build-module/components/inserter/quick-inserter.js.map +1 -1
- package/build-module/components/inserter/reusable-block-rename-hint.js +1 -7
- package/build-module/components/inserter/reusable-block-rename-hint.js.map +1 -1
- package/build-module/components/inserter/reusable-blocks-tab.js +3 -8
- package/build-module/components/inserter/reusable-blocks-tab.js.map +1 -1
- package/build-module/components/inserter/reusable-blocks-tab.native.js +1 -4
- package/build-module/components/inserter/reusable-blocks-tab.native.js.map +1 -1
- package/build-module/components/inserter/search-items.js +22 -33
- package/build-module/components/inserter/search-items.js.map +1 -1
- package/build-module/components/inserter/search-results.js +6 -18
- package/build-module/components/inserter/search-results.js.map +1 -1
- package/build-module/components/inserter/search-results.native.js +1 -7
- package/build-module/components/inserter/search-results.native.js.map +1 -1
- package/build-module/components/inserter/tabs.js +0 -13
- package/build-module/components/inserter/tabs.js.map +1 -1
- package/build-module/components/inserter/tabs.native.js +6 -13
- package/build-module/components/inserter/tabs.native.js.map +1 -1
- package/build-module/components/inserter/tips.js +2 -4
- package/build-module/components/inserter/tips.js.map +1 -1
- package/build-module/components/inserter/utils.native.js +2 -6
- package/build-module/components/inserter/utils.native.js.map +1 -1
- package/build-module/components/inserter-draggable-blocks/index.js +0 -4
- package/build-module/components/inserter-draggable-blocks/index.js.map +1 -1
- package/build-module/components/inserter-list-item/index.js +2 -9
- package/build-module/components/inserter-list-item/index.js.map +1 -1
- package/build-module/components/inserter-listbox/context.js.map +1 -1
- package/build-module/components/inserter-listbox/group.js +0 -4
- package/build-module/components/inserter-listbox/group.js.map +1 -1
- package/build-module/components/inserter-listbox/index.js +1 -4
- package/build-module/components/inserter-listbox/index.js.map +1 -1
- package/build-module/components/inserter-listbox/item.js +9 -11
- package/build-module/components/inserter-listbox/item.js.map +1 -1
- package/build-module/components/inserter-listbox/row.js +1 -4
- package/build-module/components/inserter-listbox/row.js.map +1 -1
- package/build-module/components/inserter-menu-extension/index.js.map +1 -1
- package/build-module/components/inspector-controls/block-support-slot-container.js +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 +7 -5
- package/build-module/components/inspector-controls/block-support-tools-panel.js.map +1 -1
- package/build-module/components/inspector-controls/fill.js +4 -10
- package/build-module/components/inspector-controls/fill.js.map +1 -1
- package/build-module/components/inspector-controls/fill.native.js +4 -8
- package/build-module/components/inspector-controls/fill.native.js.map +1 -1
- package/build-module/components/inspector-controls/groups.js.map +1 -1
- package/build-module/components/inspector-controls/index.js +7 -7
- package/build-module/components/inspector-controls/index.js.map +1 -1
- package/build-module/components/inspector-controls/slot.js +5 -9
- package/build-module/components/inspector-controls/slot.js.map +1 -1
- package/build-module/components/inspector-controls/slot.native.js +3 -6
- package/build-module/components/inspector-controls/slot.native.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/advanced-controls-panel.js +1 -6
- package/build-module/components/inspector-controls-tabs/advanced-controls-panel.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/index.js +1 -4
- package/build-module/components/inspector-controls-tabs/index.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/position-controls-panel.js +3 -8
- 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 +0 -4
- package/build-module/components/inspector-controls-tabs/settings-tab-hint.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/settings-tab.js +0 -3
- package/build-module/components/inspector-controls-tabs/settings-tab.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/styles-tab.js +1 -4
- package/build-module/components/inspector-controls-tabs/styles-tab.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/use-inspector-controls-tabs.js +14 -16
- package/build-module/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/use-is-list-view-tab-disabled.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/utils.js.map +1 -1
- package/build-module/components/inspector-popover-header/index.js +0 -1
- package/build-module/components/inspector-popover-header/index.js.map +1 -1
- package/build-module/components/justify-content-control/index.js +5 -7
- package/build-module/components/justify-content-control/index.js.map +1 -1
- package/build-module/components/justify-content-control/ui.js +0 -4
- package/build-module/components/justify-content-control/ui.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/index.js +9 -3
- package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
- package/build-module/components/letter-spacing-control/index.js +4 -4
- package/build-module/components/letter-spacing-control/index.js.map +1 -1
- package/build-module/components/line-height-control/index.js +22 -34
- package/build-module/components/line-height-control/index.js.map +1 -1
- package/build-module/components/line-height-control/index.native.js +4 -4
- package/build-module/components/line-height-control/index.native.js.map +1 -1
- package/build-module/components/line-height-control/utils.js +7 -3
- package/build-module/components/line-height-control/utils.js.map +1 -1
- package/build-module/components/link-control/constants.js +3 -2
- package/build-module/components/link-control/constants.js.map +1 -1
- package/build-module/components/link-control/index.js +44 -40
- package/build-module/components/link-control/index.js.map +1 -1
- package/build-module/components/link-control/is-url-like.js +5 -6
- package/build-module/components/link-control/is-url-like.js.map +1 -1
- package/build-module/components/link-control/link-preview.js +11 -10
- package/build-module/components/link-control/link-preview.js.map +1 -1
- package/build-module/components/link-control/search-create-button.js +3 -7
- package/build-module/components/link-control/search-create-button.js.map +1 -1
- package/build-module/components/link-control/search-input.js +18 -23
- package/build-module/components/link-control/search-input.js.map +1 -1
- package/build-module/components/link-control/search-item.js +6 -12
- package/build-module/components/link-control/search-item.js.map +1 -1
- package/build-module/components/link-control/search-results.js +14 -14
- package/build-module/components/link-control/search-results.js.map +1 -1
- package/build-module/components/link-control/settings-drawer.js +0 -3
- package/build-module/components/link-control/settings-drawer.js.map +1 -1
- package/build-module/components/link-control/settings.js +2 -7
- package/build-module/components/link-control/settings.js.map +1 -1
- package/build-module/components/link-control/use-create-page.js +4 -8
- package/build-module/components/link-control/use-create-page.js.map +1 -1
- package/build-module/components/link-control/use-internal-value.js +8 -10
- package/build-module/components/link-control/use-internal-value.js.map +1 -1
- package/build-module/components/link-control/use-rich-url-data.js +9 -12
- package/build-module/components/link-control/use-rich-url-data.js.map +1 -1
- package/build-module/components/link-control/use-search-handler.js +10 -14
- package/build-module/components/link-control/use-search-handler.js.map +1 -1
- package/build-module/components/link-control/viewer-slot.js.map +1 -1
- package/build-module/components/list-view/appender.js +4 -8
- package/build-module/components/list-view/appender.js.map +1 -1
- package/build-module/components/list-view/aria-referenced-text.js +1 -2
- package/build-module/components/list-view/aria-referenced-text.js.map +1 -1
- package/build-module/components/list-view/block-contents.js +5 -5
- package/build-module/components/list-view/block-contents.js.map +1 -1
- package/build-module/components/list-view/block-select-button.js +32 -19
- package/build-module/components/list-view/block-select-button.js.map +1 -1
- package/build-module/components/list-view/block.js +25 -29
- package/build-module/components/list-view/block.js.map +1 -1
- package/build-module/components/list-view/branch.js +9 -28
- package/build-module/components/list-view/branch.js.map +1 -1
- package/build-module/components/list-view/context.js.map +1 -1
- package/build-module/components/list-view/drop-indicator.js +34 -43
- package/build-module/components/list-view/drop-indicator.js.map +1 -1
- package/build-module/components/list-view/expander.js +2 -2
- package/build-module/components/list-view/expander.js.map +1 -1
- package/build-module/components/list-view/index.js +18 -22
- package/build-module/components/list-view/index.js.map +1 -1
- package/build-module/components/list-view/leaf.js +2 -3
- package/build-module/components/list-view/leaf.js.map +1 -1
- package/build-module/components/list-view/use-block-selection.js +15 -22
- package/build-module/components/list-view/use-block-selection.js.map +1 -1
- package/build-module/components/list-view/use-list-view-client-ids.js +2 -1
- package/build-module/components/list-view/use-list-view-client-ids.js.map +1 -1
- package/build-module/components/list-view/use-list-view-drop-zone.js +35 -54
- package/build-module/components/list-view/use-list-view-drop-zone.js.map +1 -1
- package/build-module/components/list-view/use-list-view-expand-selected-item.js +5 -4
- package/build-module/components/list-view/use-list-view-expand-selected-item.js.map +1 -1
- package/build-module/components/list-view/use-list-view-images.js +78 -0
- package/build-module/components/list-view/use-list-view-images.js.map +1 -0
- package/build-module/components/list-view/use-list-view-scroll-into-view.js +5 -5
- package/build-module/components/list-view/use-list-view-scroll-into-view.js.map +1 -1
- package/build-module/components/list-view/utils.js +3 -4
- package/build-module/components/list-view/utils.js.map +1 -1
- package/build-module/components/media-placeholder/index.js +12 -59
- package/build-module/components/media-placeholder/index.js.map +1 -1
- package/build-module/components/media-placeholder/index.native.js +9 -24
- package/build-module/components/media-placeholder/index.native.js.map +1 -1
- package/build-module/components/media-replace-flow/index.js +9 -25
- package/build-module/components/media-replace-flow/index.js.map +1 -1
- package/build-module/components/media-replace-flow/index.native.js +3 -4
- package/build-module/components/media-replace-flow/index.native.js.map +1 -1
- package/build-module/components/media-upload/check.js +2 -2
- package/build-module/components/media-upload/check.js.map +1 -1
- package/build-module/components/media-upload/index.js +2 -3
- package/build-module/components/media-upload/index.js.map +1 -1
- package/build-module/components/media-upload/index.native.js +18 -29
- package/build-module/components/media-upload/index.native.js.map +1 -1
- package/build-module/components/media-upload-progress/index.native.js +4 -27
- package/build-module/components/media-upload-progress/index.native.js.map +1 -1
- package/build-module/components/multi-selection-inspector/index.js +3 -8
- package/build-module/components/multi-selection-inspector/index.js.map +1 -1
- package/build-module/components/navigable-toolbar/index.js +9 -26
- package/build-module/components/navigable-toolbar/index.js.map +1 -1
- package/build-module/components/observe-typing/index.js +26 -38
- package/build-module/components/observe-typing/index.js.map +1 -1
- package/build-module/components/panel-color-settings/index.js +2 -5
- package/build-module/components/panel-color-settings/index.js.map +1 -1
- package/build-module/components/plain-text/index.js +3 -5
- package/build-module/components/plain-text/index.js.map +1 -1
- package/build-module/components/plain-text/index.native.js +8 -22
- package/build-module/components/plain-text/index.native.js.map +1 -1
- package/build-module/components/preview-options/index.js +1 -2
- package/build-module/components/preview-options/index.js.map +1 -1
- package/build-module/components/provider/block-refs-provider.js +0 -1
- package/build-module/components/provider/block-refs-provider.js.map +1 -1
- package/build-module/components/provider/index.js +8 -5
- 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 +23 -38
- package/build-module/components/provider/use-block-sync.js.map +1 -1
- package/build-module/components/provider/with-registry-provider.js +1 -5
- package/build-module/components/provider/with-registry-provider.js.map +1 -1
- package/build-module/components/publish-date-time-picker/index.js +1 -4
- package/build-module/components/publish-date-time-picker/index.js.map +1 -1
- package/build-module/components/recursion-provider/index.js +6 -7
- package/build-module/components/recursion-provider/index.js.map +1 -1
- package/build-module/components/resizable-box-popover/index.js +3 -3
- package/build-module/components/resizable-box-popover/index.js.map +1 -1
- package/build-module/components/resolution-tool/index.js +0 -1
- package/build-module/components/resolution-tool/index.js.map +1 -1
- package/build-module/components/responsive-block-control/index.js +4 -14
- package/build-module/components/responsive-block-control/index.js.map +1 -1
- package/build-module/components/responsive-block-control/label.js +1 -3
- package/build-module/components/responsive-block-control/label.js.map +1 -1
- package/build-module/components/rich-text/content.js +3 -8
- package/build-module/components/rich-text/content.js.map +1 -1
- package/build-module/components/rich-text/embed-handler-picker.native.js +0 -3
- package/build-module/components/rich-text/embed-handler-picker.native.js.map +1 -1
- package/build-module/components/rich-text/file-paste-handler.native.js.map +1 -1
- package/build-module/components/rich-text/format-edit.js +3 -7
- package/build-module/components/rich-text/format-edit.js.map +1 -1
- package/build-module/components/rich-text/format-toolbar/index.js +5 -9
- package/build-module/components/rich-text/format-toolbar/index.js.map +1 -1
- package/build-module/components/rich-text/format-toolbar/index.native.js +1 -3
- package/build-module/components/rich-text/format-toolbar/index.native.js.map +1 -1
- package/build-module/components/rich-text/format-toolbar-container.js +4 -14
- package/build-module/components/rich-text/format-toolbar-container.js.map +1 -1
- package/build-module/components/rich-text/format-toolbar-container.native.js +0 -3
- 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 +4 -18
- package/build-module/components/rich-text/get-rich-text-values.js.map +1 -1
- package/build-module/components/rich-text/index.js +19 -37
- package/build-module/components/rich-text/index.js.map +1 -1
- package/build-module/components/rich-text/index.native.js +49 -76
- package/build-module/components/rich-text/index.native.js.map +1 -1
- package/build-module/components/rich-text/input-event.js +1 -2
- package/build-module/components/rich-text/input-event.js.map +1 -1
- package/build-module/components/rich-text/input-event.native.js +0 -1
- package/build-module/components/rich-text/input-event.native.js.map +1 -1
- package/build-module/components/rich-text/prevent-event-discovery.js +0 -4
- package/build-module/components/rich-text/prevent-event-discovery.js.map +1 -1
- package/build-module/components/rich-text/remove-browser-shortcuts.native.js.map +1 -1
- package/build-module/components/rich-text/shortcut.js +1 -2
- package/build-module/components/rich-text/shortcut.js.map +1 -1
- package/build-module/components/rich-text/shortcut.native.js +0 -1
- package/build-module/components/rich-text/shortcut.native.js.map +1 -1
- package/build-module/components/rich-text/split-value.js +19 -16
- package/build-module/components/rich-text/split-value.js.map +1 -1
- package/build-module/components/rich-text/toolbar-button.js +2 -5
- package/build-module/components/rich-text/toolbar-button.js.map +1 -1
- package/build-module/components/rich-text/use-before-input-rules.js +7 -16
- package/build-module/components/rich-text/use-before-input-rules.js.map +1 -1
- package/build-module/components/rich-text/use-delete.js +5 -10
- package/build-module/components/rich-text/use-delete.js.map +1 -1
- package/build-module/components/rich-text/use-enter.js +3 -10
- package/build-module/components/rich-text/use-enter.js.map +1 -1
- package/build-module/components/rich-text/use-firefox-compat.js +5 -35
- package/build-module/components/rich-text/use-firefox-compat.js.map +1 -1
- package/build-module/components/rich-text/use-format-types.js +9 -20
- package/build-module/components/rich-text/use-format-types.js.map +1 -1
- package/build-module/components/rich-text/use-input-events.js +0 -1
- package/build-module/components/rich-text/use-input-events.js.map +1 -1
- package/build-module/components/rich-text/use-input-rules.js +10 -28
- package/build-module/components/rich-text/use-input-rules.js.map +1 -1
- package/build-module/components/rich-text/use-insert-replacement-text.js +2 -3
- package/build-module/components/rich-text/use-insert-replacement-text.js.map +1 -1
- package/build-module/components/rich-text/use-mark-persistent.js +6 -6
- package/build-module/components/rich-text/use-mark-persistent.js.map +1 -1
- package/build-module/components/rich-text/use-paste-handler.js +26 -62
- package/build-module/components/rich-text/use-paste-handler.js.map +1 -1
- package/build-module/components/rich-text/use-remove-browser-shortcuts.js +1 -2
- package/build-module/components/rich-text/use-remove-browser-shortcuts.js.map +1 -1
- package/build-module/components/rich-text/use-shortcuts.js +0 -1
- package/build-module/components/rich-text/use-shortcuts.js.map +1 -1
- package/build-module/components/rich-text/use-undo-automatic-change.js +1 -9
- package/build-module/components/rich-text/use-undo-automatic-change.js.map +1 -1
- package/build-module/components/rich-text/utils.js +2 -6
- package/build-module/components/rich-text/utils.js.map +1 -1
- package/build-module/components/selection-scroll-into-view/index.js +1 -1
- package/build-module/components/selection-scroll-into-view/index.js.map +1 -1
- package/build-module/components/skip-to-selected-block/index.js +2 -7
- 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 +1 -3
- package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
- package/build-module/components/spacing-sizes-control/index.js +13 -14
- package/build-module/components/spacing-sizes-control/index.js.map +1 -1
- package/build-module/components/spacing-sizes-control/input-controls/axial.js +6 -9
- 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 +2 -4
- 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 -3
- 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 +6 -19
- 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 +1 -3
- package/build-module/components/spacing-sizes-control/sides-dropdown/index.js.map +1 -1
- package/build-module/components/spacing-sizes-control/utils.js +33 -50
- package/build-module/components/spacing-sizes-control/utils.js.map +1 -1
- package/build-module/components/text-decoration-control/index.js +2 -3
- package/build-module/components/text-decoration-control/index.js.map +1 -1
- package/build-module/components/text-transform-control/index.js +2 -3
- package/build-module/components/text-transform-control/index.js.map +1 -1
- package/build-module/components/tool-selector/index.js +4 -7
- package/build-module/components/tool-selector/index.js.map +1 -1
- package/build-module/components/typewriter/index.js +30 -46
- package/build-module/components/typewriter/index.js.map +1 -1
- package/build-module/components/ungroup-button/index.native.js +1 -7
- package/build-module/components/ungroup-button/index.native.js.map +1 -1
- package/build-module/components/unit-control/index.js +1 -2
- package/build-module/components/unit-control/index.js.map +1 -1
- package/build-module/components/url-input/button.js +2 -9
- package/build-module/components/url-input/button.js.map +1 -1
- package/build-module/components/url-input/index.js +41 -81
- package/build-module/components/url-input/index.js.map +1 -1
- package/build-module/components/url-input/index.native.js +1 -2
- package/build-module/components/url-input/index.native.js.map +1 -1
- package/build-module/components/url-popover/image-url-input-ui.js +3 -31
- package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
- package/build-module/components/url-popover/index.js +5 -12
- package/build-module/components/url-popover/index.js.map +1 -1
- package/build-module/components/url-popover/link-editor.js +2 -3
- package/build-module/components/url-popover/link-editor.js.map +1 -1
- package/build-module/components/url-popover/link-viewer-url.js +1 -4
- package/build-module/components/url-popover/link-viewer-url.js.map +1 -1
- package/build-module/components/url-popover/link-viewer.js +2 -3
- package/build-module/components/url-popover/link-viewer.js.map +1 -1
- package/build-module/components/use-block-commands/index.js +238 -0
- package/build-module/components/use-block-commands/index.js.map +1 -0
- package/build-module/components/use-block-display-information/index.js +3 -6
- package/build-module/components/use-block-display-information/index.js.map +1 -1
- package/build-module/components/use-block-drop-zone/index.js +14 -19
- package/build-module/components/use-block-drop-zone/index.js.map +1 -1
- package/build-module/components/use-block-drop-zone/index.native.js +13 -16
- package/build-module/components/use-block-drop-zone/index.native.js.map +1 -1
- package/build-module/components/use-display-block-controls/index.js +1 -4
- package/build-module/components/use-display-block-controls/index.js.map +1 -1
- package/build-module/components/use-display-block-controls/index.native.js +1 -3
- package/build-module/components/use-display-block-controls/index.native.js.map +1 -1
- package/build-module/components/use-moving-animation/index.js +6 -17
- package/build-module/components/use-moving-animation/index.js.map +1 -1
- package/build-module/components/use-on-block-drop/index.js +21 -30
- package/build-module/components/use-on-block-drop/index.js.map +1 -1
- package/build-module/components/use-on-block-drop/index.native.js +13 -12
- package/build-module/components/use-on-block-drop/index.native.js.map +1 -1
- package/build-module/components/use-on-block-drop/types.js.map +1 -1
- package/build-module/components/use-paste-styles/index.js +12 -21
- package/build-module/components/use-paste-styles/index.js.map +1 -1
- package/build-module/components/use-resize-canvas/index.js +1 -13
- package/build-module/components/use-resize-canvas/index.js.map +1 -1
- package/build-module/components/use-setting/index.js +17 -33
- package/build-module/components/use-setting/index.js.map +1 -1
- package/build-module/components/video-player/gridicon-play.native.js +0 -1
- package/build-module/components/video-player/gridicon-play.native.js.map +1 -1
- package/build-module/components/video-player/index.native.js +12 -17
- package/build-module/components/video-player/index.native.js.map +1 -1
- package/build-module/components/warning/index.js +2 -5
- package/build-module/components/warning/index.js.map +1 -1
- package/build-module/components/warning/index.native.js +2 -5
- package/build-module/components/warning/index.native.js.map +1 -1
- package/build-module/components/writing-flow/index.js +5 -9
- package/build-module/components/writing-flow/index.js.map +1 -1
- package/build-module/components/writing-flow/use-arrow-nav.js +37 -53
- package/build-module/components/writing-flow/use-arrow-nav.js.map +1 -1
- package/build-module/components/writing-flow/use-click-selection.js +3 -6
- package/build-module/components/writing-flow/use-click-selection.js.map +1 -1
- package/build-module/components/writing-flow/use-drag-selection.js +27 -29
- package/build-module/components/writing-flow/use-drag-selection.js.map +1 -1
- package/build-module/components/writing-flow/use-input.js +8 -17
- package/build-module/components/writing-flow/use-input.js.map +1 -1
- package/build-module/components/writing-flow/use-multi-selection.js +10 -14
- package/build-module/components/writing-flow/use-multi-selection.js.map +1 -1
- package/build-module/components/writing-flow/use-select-all.js +4 -9
- package/build-module/components/writing-flow/use-select-all.js.map +1 -1
- package/build-module/components/writing-flow/use-selection-observer.js +20 -44
- package/build-module/components/writing-flow/use-selection-observer.js.map +1 -1
- package/build-module/components/writing-flow/use-tab-nav.js +28 -34
- package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
- package/build-module/components/writing-mode-control/index.js +2 -3
- package/build-module/components/writing-mode-control/index.js.map +1 -1
- package/build-module/elements/index.js.map +1 -1
- package/build-module/hooks/align.js +25 -36
- package/build-module/hooks/align.js.map +1 -1
- package/build-module/hooks/align.native.js +6 -4
- package/build-module/hooks/align.native.js.map +1 -1
- package/build-module/hooks/anchor.js +11 -15
- package/build-module/hooks/anchor.js.map +1 -1
- package/build-module/hooks/aria-label.js +4 -6
- package/build-module/hooks/aria-label.js.map +1 -1
- package/build-module/hooks/behaviors.js +12 -16
- package/build-module/hooks/behaviors.js.map +1 -1
- package/build-module/hooks/border.js +46 -64
- package/build-module/hooks/border.js.map +1 -1
- package/build-module/hooks/color.js +32 -52
- package/build-module/hooks/color.js.map +1 -1
- package/build-module/hooks/compat.js +0 -4
- package/build-module/hooks/compat.js.map +1 -1
- package/build-module/hooks/content-lock-ui.js +5 -13
- package/build-module/hooks/content-lock-ui.js.map +1 -1
- package/build-module/hooks/contrast-checker.js +4 -11
- package/build-module/hooks/contrast-checker.js.map +1 -1
- package/build-module/hooks/custom-class-name.js +24 -26
- package/build-module/hooks/custom-class-name.js.map +1 -1
- package/build-module/hooks/custom-class-name.native.js +5 -6
- package/build-module/hooks/custom-class-name.native.js.map +1 -1
- package/build-module/hooks/custom-fields.js +113 -0
- package/build-module/hooks/custom-fields.js.map +1 -0
- package/build-module/hooks/dimensions.js +6 -11
- package/build-module/hooks/dimensions.js.map +1 -1
- package/build-module/hooks/duotone.js +43 -49
- package/build-module/hooks/duotone.js.map +1 -1
- package/build-module/hooks/font-family.js +9 -20
- package/build-module/hooks/font-family.js.map +1 -1
- package/build-module/hooks/font-size.js +36 -47
- package/build-module/hooks/font-size.js.map +1 -1
- package/build-module/hooks/gap.js +2 -5
- package/build-module/hooks/gap.js.map +1 -1
- package/build-module/hooks/generated-class-name.js +2 -2
- package/build-module/hooks/generated-class-name.js.map +1 -1
- package/build-module/hooks/index.js +1 -0
- package/build-module/hooks/index.js.map +1 -1
- package/build-module/hooks/index.native.js.map +1 -1
- package/build-module/hooks/layout.js +46 -54
- package/build-module/hooks/layout.js.map +1 -1
- package/build-module/hooks/layout.native.js +5 -3
- package/build-module/hooks/layout.native.js.map +1 -1
- package/build-module/hooks/line-height.js +7 -8
- package/build-module/hooks/line-height.js.map +1 -1
- package/build-module/hooks/lock.js +5 -6
- package/build-module/hooks/lock.js.map +1 -1
- package/build-module/hooks/margin.js +1 -10
- package/build-module/hooks/margin.js.map +1 -1
- package/build-module/hooks/metadata-name.js +5 -6
- package/build-module/hooks/metadata-name.js.map +1 -1
- package/build-module/hooks/metadata.js +3 -7
- package/build-module/hooks/metadata.js.map +1 -1
- package/build-module/hooks/padding.js +1 -10
- package/build-module/hooks/padding.js.map +1 -1
- package/build-module/hooks/position.js +36 -38
- package/build-module/hooks/position.js.map +1 -1
- package/build-module/hooks/settings.js +4 -7
- package/build-module/hooks/settings.js.map +1 -1
- package/build-module/hooks/style.js +30 -44
- package/build-module/hooks/style.js.map +1 -1
- package/build-module/hooks/supports.js +22 -33
- package/build-module/hooks/supports.js.map +1 -1
- package/build-module/hooks/typography.js +11 -16
- package/build-module/hooks/typography.js.map +1 -1
- package/build-module/hooks/typography.native.js +5 -7
- package/build-module/hooks/typography.native.js.map +1 -1
- package/build-module/hooks/use-border-props.js +7 -6
- package/build-module/hooks/use-border-props.js.map +1 -1
- package/build-module/hooks/use-cached-truthy.js +1 -1
- package/build-module/hooks/use-cached-truthy.js.map +1 -1
- package/build-module/hooks/use-color-props.js +18 -17
- package/build-module/hooks/use-color-props.js.map +1 -1
- package/build-module/hooks/use-editor-wrapper-styles.native.js +8 -26
- package/build-module/hooks/use-editor-wrapper-styles.native.js.map +1 -1
- package/build-module/hooks/use-spacing-props.js +5 -3
- package/build-module/hooks/use-spacing-props.js.map +1 -1
- package/build-module/hooks/use-typography-props.js +4 -4
- package/build-module/hooks/use-typography-props.js.map +1 -1
- package/build-module/hooks/utils.js +12 -18
- package/build-module/hooks/utils.js.map +1 -1
- package/build-module/index.js.map +1 -1
- package/build-module/index.native.js.map +1 -1
- package/build-module/layouts/constrained.js +14 -26
- package/build-module/layouts/constrained.js.map +1 -1
- package/build-module/layouts/definitions.js.map +1 -1
- package/build-module/layouts/flex.js +18 -41
- package/build-module/layouts/flex.js.map +1 -1
- package/build-module/layouts/flow.js +8 -17
- package/build-module/layouts/flow.js.map +1 -1
- package/build-module/layouts/grid.js +20 -25
- package/build-module/layouts/grid.js.map +1 -1
- package/build-module/layouts/index.js +2 -2
- package/build-module/layouts/index.js.map +1 -1
- package/build-module/layouts/utils.js +5 -9
- package/build-module/layouts/utils.js.map +1 -1
- package/build-module/lock-unlock.js.map +1 -1
- package/build-module/private-apis.js +3 -4
- package/build-module/private-apis.js.map +1 -1
- package/build-module/private-apis.native.js +3 -2
- package/build-module/private-apis.native.js.map +1 -1
- package/build-module/store/actions.js +188 -196
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/array.js +1 -1
- package/build-module/store/array.js.map +1 -1
- package/build-module/store/constants.js.map +1 -1
- package/build-module/store/defaults.js +1 -1
- package/build-module/store/defaults.js.map +1 -1
- package/build-module/store/defaults.native.js +2 -1
- package/build-module/store/defaults.native.js.map +1 -1
- package/build-module/store/index.js +13 -9
- package/build-module/store/index.js.map +1 -1
- package/build-module/store/private-actions.js +25 -78
- package/build-module/store/private-actions.js.map +1 -1
- package/build-module/store/private-selectors.js +6 -76
- package/build-module/store/private-selectors.js.map +1 -1
- package/build-module/store/reducer.js +161 -328
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +253 -331
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/store/utils.js.map +1 -1
- package/build-module/utils/block-variation-transforms.js +2 -3
- package/build-module/utils/block-variation-transforms.js.map +1 -1
- package/build-module/utils/dom.js +4 -10
- package/build-module/utils/dom.js.map +1 -1
- package/build-module/utils/index.js.map +1 -1
- package/build-module/utils/math.js +5 -7
- package/build-module/utils/math.js.map +1 -1
- package/build-module/utils/object.js +15 -21
- package/build-module/utils/object.js.map +1 -1
- package/build-module/utils/order-inserter-block-items.js +2 -3
- package/build-module/utils/order-inserter-block-items.js.map +1 -1
- package/build-module/utils/parse-css-unit-to-px.js +14 -64
- package/build-module/utils/parse-css-unit-to-px.js.map +1 -1
- package/build-module/utils/pasting.js +8 -12
- package/build-module/utils/pasting.js.map +1 -1
- package/build-module/utils/pre-parse-patterns.js +1 -14
- package/build-module/utils/pre-parse-patterns.js.map +1 -1
- package/build-module/utils/selection.js +1 -2
- package/build-module/utils/selection.js.map +1 -1
- package/build-module/utils/sorting.js +3 -7
- package/build-module/utils/sorting.js.map +1 -1
- package/build-module/utils/transform-styles/ast/index.js +1 -0
- package/build-module/utils/transform-styles/ast/index.js.map +1 -1
- package/build-module/utils/transform-styles/ast/parse.js +95 -134
- package/build-module/utils/transform-styles/ast/parse.js.map +1 -1
- package/build-module/utils/transform-styles/ast/stringify/compiler.js +5 -6
- package/build-module/utils/transform-styles/ast/stringify/compiler.js.map +1 -1
- package/build-module/utils/transform-styles/ast/stringify/compress.js +28 -19
- package/build-module/utils/transform-styles/ast/stringify/compress.js.map +1 -1
- package/build-module/utils/transform-styles/ast/stringify/identity.js +32 -23
- package/build-module/utils/transform-styles/ast/stringify/identity.js.map +1 -1
- package/build-module/utils/transform-styles/ast/stringify/index.js +1 -0
- package/build-module/utils/transform-styles/ast/stringify/index.js.map +1 -1
- package/build-module/utils/transform-styles/index.js +2 -7
- package/build-module/utils/transform-styles/index.js.map +1 -1
- package/build-module/utils/transform-styles/transforms/url-rewrite.js +12 -24
- package/build-module/utils/transform-styles/transforms/url-rewrite.js.map +1 -1
- package/build-module/utils/transform-styles/transforms/wrap.js +7 -8
- package/build-module/utils/transform-styles/transforms/wrap.js.map +1 -1
- package/build-module/utils/transform-styles/traverse.js +1 -4
- package/build-module/utils/transform-styles/traverse.js.map +1 -1
- package/build-module/utils/use-should-contextual-toolbar-show.js +2 -5
- package/build-module/utils/use-should-contextual-toolbar-show.js.map +1 -1
- package/build-style/style-rtl.css +52 -6
- package/build-style/style.css +52 -6
- package/package.json +33 -32
- package/src/components/block-caption/README.md +109 -0
- package/src/components/block-controls/use-has-block-controls.js +35 -0
- package/src/components/block-editing-mode/index.js +3 -7
- package/src/components/block-inspector/index.js +1 -2
- package/src/components/block-list/block-outline.native.js +2 -2
- package/src/components/block-list/block.js +1 -2
- package/src/components/block-list/index.native.js +14 -14
- package/src/components/block-list/test/block-invalid-warning.native.js +7 -0
- package/src/components/block-list/use-in-between-inserter.js +1 -2
- package/src/components/block-list-appender/index.js +1 -2
- package/src/components/block-parent-selector/index.js +1 -2
- package/src/components/block-preview/index.js +0 -1
- package/src/components/block-toolbar/index.js +1 -2
- package/src/components/block-toolbar/style.scss +10 -0
- package/src/components/block-tools/block-contextual-toolbar.js +87 -9
- package/src/components/block-tools/style.scss +34 -10
- package/src/components/copy-handler/index.js +1 -0
- package/src/components/default-block-appender/index.native.js +13 -11
- package/src/components/dimensions-tool/index.js +1 -1
- package/src/components/global-styles/test/typography-utils.js +55 -0
- package/src/components/global-styles/typography-utils.js +12 -3
- package/src/components/global-styles/use-global-styles-output.js +1 -2
- package/src/components/iframe/index.js +1 -0
- package/src/components/index.js +7 -0
- package/src/components/inserter/hooks/use-patterns-state.js +1 -1
- package/src/components/inserter/menu.js +1 -0
- package/src/components/inserter/preview-panel.js +15 -11
- package/src/components/inserter/search-results.js +2 -1
- package/src/components/inserter/stories/{index.js → index.story.js} +4 -4
- package/src/components/inserter/test/search-items.js +4 -1
- package/src/components/keyboard-shortcuts/index.js +10 -0
- package/src/components/line-height-control/index.js +14 -11
- package/src/components/line-height-control/test/index.js +7 -5
- package/src/components/line-height-control/utils.js +6 -1
- package/src/components/link-control/index.js +27 -7
- package/src/components/link-control/link-preview.js +4 -0
- package/src/components/link-control/style.scss +9 -0
- package/src/components/link-control/test/index.js +63 -4
- package/src/components/list-view/block-select-button.js +19 -0
- package/src/components/list-view/block.js +1 -4
- package/src/components/list-view/style.scss +25 -0
- package/src/components/list-view/use-list-view-images.js +79 -0
- package/src/components/rich-text/index.js +8 -1
- package/src/components/rich-text/use-firefox-compat.js +1 -27
- package/src/components/rich-text/use-format-types.js +3 -3
- package/src/components/rich-text/use-paste-handler.js +4 -23
- package/src/components/use-block-commands/index.js +284 -0
- package/src/components/use-block-drop-zone/index.js +1 -2
- package/src/components/use-setting/README.md +39 -0
- package/src/components/writing-flow/use-drag-selection.js +5 -1
- package/src/hooks/custom-fields.js +139 -0
- package/src/hooks/index.js +1 -0
- package/src/hooks/layout.js +13 -4
- package/src/private-apis.js +0 -2
- package/src/store/actions.js +49 -2
- package/src/store/private-actions.js +0 -39
- package/src/store/private-selectors.js +1 -67
- package/src/store/selectors.js +64 -2
- package/src/store/test/actions.js +28 -0
- package/src/store/test/private-actions.js +0 -28
- package/src/store/test/private-selectors.js +88 -261
- package/src/store/test/selectors.js +203 -1
- package/src/utils/transform-styles/ast/parse.js +31 -0
- package/src/utils/transform-styles/ast/stringify/compress.js +13 -0
- package/src/utils/transform-styles/ast/stringify/identity.js +13 -0
- package/src/utils/transform-styles/transforms/test/__snapshots__/wrap.js.snap +8 -0
- package/src/utils/transform-styles/transforms/test/wrap.js +11 -0
- package/tsconfig.tsbuildinfo +1 -1
- /package/src/components/block-draggable/stories/{index.js → index.story.js} +0 -0
- /package/src/components/block-mover/stories/{index.js → index.story.js} +0 -0
- /package/src/components/dimensions-tool/stories/{aspect-ratio-tool.js → aspect-ratio-tool.story.js} +0 -0
- /package/src/components/dimensions-tool/stories/{index.js → index.story.js} +0 -0
- /package/src/components/dimensions-tool/stories/{scale-tool.js → scale-tool.story.js} +0 -0
- /package/src/components/dimensions-tool/stories/{width-height-tool.js → width-height-tool.story.js} +0 -0
- /package/src/components/height-control/stories/{index.js → index.story.js} +0 -0
- /package/src/components/line-height-control/stories/{index.js → index.story.js} +0 -0
- /package/src/components/resolution-tool/stories/{index.js → index.story.js} +0 -0
- /package/src/components/text-decoration-control/stories/{index.js → index.story.js} +0 -0
- /package/src/components/text-transform-control/stories/{index.js → index.story.js} +0 -0
- /package/src/components/url-popover/stories/{index.js → index.story.js} +0 -0
|
@@ -6,12 +6,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.getComputedFluidTypographyValue = getComputedFluidTypographyValue;
|
|
7
7
|
exports.getTypographyValueAndUnit = getTypographyValueAndUnit;
|
|
8
8
|
exports.roundToPrecision = roundToPrecision;
|
|
9
|
-
|
|
10
9
|
/**
|
|
11
10
|
* The fluid utilities must match the backend equivalent.
|
|
12
11
|
* See: gutenberg_get_typography_font_size_value() in lib/block-supports/typography.php
|
|
13
12
|
* ---------------------------------------------------------------
|
|
14
13
|
*/
|
|
14
|
+
|
|
15
15
|
// Defaults.
|
|
16
16
|
const DEFAULT_MAXIMUM_VIEWPORT_WIDTH = '1600px';
|
|
17
17
|
const DEFAULT_MINIMUM_VIEWPORT_WIDTH = '320px';
|
|
@@ -19,6 +19,7 @@ const DEFAULT_SCALE_FACTOR = 1;
|
|
|
19
19
|
const DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MIN = 0.25;
|
|
20
20
|
const DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MAX = 0.75;
|
|
21
21
|
const DEFAULT_MINIMUM_FONT_SIZE_LIMIT = '14px';
|
|
22
|
+
|
|
22
23
|
/**
|
|
23
24
|
* Computes a fluid font-size value that uses clamp(). A minimum and maximum
|
|
24
25
|
* font size OR a single font size can be specified.
|
|
@@ -49,7 +50,6 @@ const DEFAULT_MINIMUM_FONT_SIZE_LIMIT = '14px';
|
|
|
49
50
|
*
|
|
50
51
|
* @return {string|null} A font-size value using clamp().
|
|
51
52
|
*/
|
|
52
|
-
|
|
53
53
|
function getComputedFluidTypographyValue({
|
|
54
54
|
minimumFontSize,
|
|
55
55
|
maximumFontSize,
|
|
@@ -61,24 +61,26 @@ function getComputedFluidTypographyValue({
|
|
|
61
61
|
}) {
|
|
62
62
|
// Validate incoming settings and set defaults.
|
|
63
63
|
minimumFontSizeLimit = !!getTypographyValueAndUnit(minimumFontSizeLimit) ? minimumFontSizeLimit : DEFAULT_MINIMUM_FONT_SIZE_LIMIT;
|
|
64
|
+
|
|
64
65
|
/*
|
|
65
66
|
* Calculates missing minimumFontSize and maximumFontSize from
|
|
66
67
|
* defaultFontSize if provided.
|
|
67
68
|
*/
|
|
68
|
-
|
|
69
69
|
if (fontSize) {
|
|
70
70
|
// Parses default font size.
|
|
71
|
-
const fontSizeParsed = getTypographyValueAndUnit(fontSize);
|
|
71
|
+
const fontSizeParsed = getTypographyValueAndUnit(fontSize);
|
|
72
72
|
|
|
73
|
+
// Protect against invalid units.
|
|
73
74
|
if (!fontSizeParsed?.unit) {
|
|
74
75
|
return null;
|
|
75
|
-
}
|
|
76
|
-
|
|
76
|
+
}
|
|
77
77
|
|
|
78
|
+
// Parses the minimum font size limit, so we can perform checks using it.
|
|
78
79
|
const minimumFontSizeLimitParsed = getTypographyValueAndUnit(minimumFontSizeLimit, {
|
|
79
80
|
coerceTo: fontSizeParsed.unit
|
|
80
|
-
});
|
|
81
|
+
});
|
|
81
82
|
|
|
83
|
+
// Don't enforce minimum font size if a font size has explicitly set a min and max value.
|
|
82
84
|
if (!!minimumFontSizeLimitParsed?.value && !minimumFontSize && !maximumFontSize) {
|
|
83
85
|
/*
|
|
84
86
|
* If a minimum size was not passed to this function
|
|
@@ -88,71 +90,77 @@ function getComputedFluidTypographyValue({
|
|
|
88
90
|
if (fontSizeParsed?.value <= minimumFontSizeLimitParsed?.value) {
|
|
89
91
|
return null;
|
|
90
92
|
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
+
}
|
|
93
94
|
|
|
95
|
+
// If no fluid max font size is available use the incoming value.
|
|
94
96
|
if (!maximumFontSize) {
|
|
95
97
|
maximumFontSize = `${fontSizeParsed.value}${fontSizeParsed.unit}`;
|
|
96
98
|
}
|
|
99
|
+
|
|
97
100
|
/*
|
|
98
101
|
* If no minimumFontSize is provided, create one using
|
|
99
102
|
* the given font size multiplied by the min font size scale factor.
|
|
100
103
|
*/
|
|
101
|
-
|
|
102
|
-
|
|
103
104
|
if (!minimumFontSize) {
|
|
104
105
|
const fontSizeValueInPx = fontSizeParsed.unit === 'px' ? fontSizeParsed.value : fontSizeParsed.value * 16;
|
|
106
|
+
|
|
105
107
|
/*
|
|
106
108
|
* The scale factor is a multiplier that affects how quickly the curve will move towards the minimum,
|
|
107
109
|
* that is, how quickly the size factor reaches 0 given increasing font size values.
|
|
108
110
|
* For a - b * log2(), lower values of b will make the curve move towards the minimum faster.
|
|
109
111
|
* The scale factor is constrained between min and max values.
|
|
110
112
|
*/
|
|
113
|
+
const minimumFontSizeFactor = Math.min(Math.max(1 - 0.075 * Math.log2(fontSizeValueInPx), DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MIN), DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MAX);
|
|
111
114
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
const calculatedMinimumFontSize = roundToPrecision(fontSizeParsed.value * minimumFontSizeFactor, 3); // Only use calculated min font size if it's > $minimum_font_size_limit value.
|
|
115
|
+
// Calculates the minimum font size.
|
|
116
|
+
const calculatedMinimumFontSize = roundToPrecision(fontSizeParsed.value * minimumFontSizeFactor, 3);
|
|
115
117
|
|
|
118
|
+
// Only use calculated min font size if it's > $minimum_font_size_limit value.
|
|
116
119
|
if (!!minimumFontSizeLimitParsed?.value && calculatedMinimumFontSize < minimumFontSizeLimitParsed?.value) {
|
|
117
120
|
minimumFontSize = `${minimumFontSizeLimitParsed.value}${minimumFontSizeLimitParsed.unit}`;
|
|
118
121
|
} else {
|
|
119
122
|
minimumFontSize = `${calculatedMinimumFontSize}${fontSizeParsed.unit}`;
|
|
120
123
|
}
|
|
121
124
|
}
|
|
122
|
-
}
|
|
125
|
+
}
|
|
123
126
|
|
|
127
|
+
// Grab the minimum font size and normalize it in order to use the value for calculations.
|
|
128
|
+
const minimumFontSizeParsed = getTypographyValueAndUnit(minimumFontSize);
|
|
124
129
|
|
|
125
|
-
|
|
130
|
+
// We get a 'preferred' unit to keep units consistent when calculating,
|
|
126
131
|
// otherwise the result will not be accurate.
|
|
132
|
+
const fontSizeUnit = minimumFontSizeParsed?.unit || 'rem';
|
|
127
133
|
|
|
128
|
-
|
|
129
|
-
|
|
134
|
+
// Grabs the maximum font size and normalize it in order to use the value for calculations.
|
|
130
135
|
const maximumFontSizeParsed = getTypographyValueAndUnit(maximumFontSize, {
|
|
131
136
|
coerceTo: fontSizeUnit
|
|
132
|
-
});
|
|
137
|
+
});
|
|
133
138
|
|
|
139
|
+
// Checks for mandatory min and max sizes, and protects against unsupported units.
|
|
134
140
|
if (!minimumFontSizeParsed || !maximumFontSizeParsed) {
|
|
135
141
|
return null;
|
|
136
|
-
}
|
|
137
|
-
|
|
142
|
+
}
|
|
138
143
|
|
|
144
|
+
// Uses rem for accessible fluid target font scaling.
|
|
139
145
|
const minimumFontSizeRem = getTypographyValueAndUnit(minimumFontSize, {
|
|
140
146
|
coerceTo: 'rem'
|
|
141
|
-
});
|
|
147
|
+
});
|
|
142
148
|
|
|
149
|
+
// Viewport widths defined for fluid typography. Normalize units
|
|
143
150
|
const maximumViewportWidthParsed = getTypographyValueAndUnit(maximumViewportWidth, {
|
|
144
151
|
coerceTo: fontSizeUnit
|
|
145
152
|
});
|
|
146
153
|
const minimumViewportWidthParsed = getTypographyValueAndUnit(minimumViewportWidth, {
|
|
147
154
|
coerceTo: fontSizeUnit
|
|
148
|
-
});
|
|
155
|
+
});
|
|
149
156
|
|
|
157
|
+
// Protect against unsupported units.
|
|
150
158
|
if (!maximumViewportWidthParsed || !minimumViewportWidthParsed || !minimumFontSizeRem) {
|
|
151
159
|
return null;
|
|
152
|
-
}
|
|
153
|
-
// Borrowed from https://websemantics.uk/tools/responsive-font-calculator/.
|
|
154
|
-
|
|
160
|
+
}
|
|
155
161
|
|
|
162
|
+
// Build CSS rule.
|
|
163
|
+
// Borrowed from https://websemantics.uk/tools/responsive-font-calculator/.
|
|
156
164
|
const minViewportWidthOffsetValue = roundToPrecision(minimumViewportWidthParsed.value / 100, 3);
|
|
157
165
|
const viewportWidthOffset = roundToPrecision(minViewportWidthOffsetValue, 3) + fontSizeUnit;
|
|
158
166
|
const linearFactor = 100 * ((maximumFontSizeParsed.value - minimumFontSizeParsed.value) / (maximumViewportWidthParsed.value - minimumViewportWidthParsed.value));
|
|
@@ -160,6 +168,7 @@ function getComputedFluidTypographyValue({
|
|
|
160
168
|
const fluidTargetFontSize = `${minimumFontSizeRem.value}${minimumFontSizeRem.unit} + ((1vw - ${viewportWidthOffset}) * ${linearFactorScaled})`;
|
|
161
169
|
return `clamp(${minimumFontSize}, ${fluidTargetFontSize}, ${maximumFontSize})`;
|
|
162
170
|
}
|
|
171
|
+
|
|
163
172
|
/**
|
|
164
173
|
* Internal method that checks a string for a unit and value and returns an array consisting of `'value'` and `'unit'`, e.g., [ '42', 'rem' ].
|
|
165
174
|
* A raw font size of `value + unit` is expected. If the value is an integer, it will convert to `value + 'px'`.
|
|
@@ -169,18 +178,15 @@ function getComputedFluidTypographyValue({
|
|
|
169
178
|
*
|
|
170
179
|
* @return {{ unit: string, value: number }|null} An object consisting of `'value'` and `'unit'` properties.
|
|
171
180
|
*/
|
|
172
|
-
|
|
173
|
-
|
|
174
181
|
function getTypographyValueAndUnit(rawValue, options = {}) {
|
|
175
182
|
if (typeof rawValue !== 'string' && typeof rawValue !== 'number') {
|
|
176
183
|
return null;
|
|
177
|
-
}
|
|
178
|
-
|
|
184
|
+
}
|
|
179
185
|
|
|
186
|
+
// Converts numeric values to pixel values by default.
|
|
180
187
|
if (isFinite(rawValue)) {
|
|
181
188
|
rawValue = `${rawValue}px`;
|
|
182
189
|
}
|
|
183
|
-
|
|
184
190
|
const {
|
|
185
191
|
coerceTo,
|
|
186
192
|
rootSizeValue,
|
|
@@ -194,40 +200,37 @@ function getTypographyValueAndUnit(rawValue, options = {}) {
|
|
|
194
200
|
};
|
|
195
201
|
const acceptableUnitsGroup = acceptableUnits?.join('|');
|
|
196
202
|
const regexUnits = new RegExp(`^(\\d*\\.?\\d+)(${acceptableUnitsGroup}){1,1}$`);
|
|
197
|
-
const matches = rawValue.match(regexUnits);
|
|
203
|
+
const matches = rawValue.match(regexUnits);
|
|
198
204
|
|
|
205
|
+
// We need a number value and a unit.
|
|
199
206
|
if (!matches || matches.length < 3) {
|
|
200
207
|
return null;
|
|
201
208
|
}
|
|
202
|
-
|
|
203
209
|
let [, value, unit] = matches;
|
|
204
210
|
let returnValue = parseFloat(value);
|
|
205
|
-
|
|
206
211
|
if ('px' === coerceTo && ('em' === unit || 'rem' === unit)) {
|
|
207
212
|
returnValue = returnValue * rootSizeValue;
|
|
208
213
|
unit = coerceTo;
|
|
209
214
|
}
|
|
210
|
-
|
|
211
215
|
if ('px' === unit && ('em' === coerceTo || 'rem' === coerceTo)) {
|
|
212
216
|
returnValue = returnValue / rootSizeValue;
|
|
213
217
|
unit = coerceTo;
|
|
214
218
|
}
|
|
219
|
+
|
|
215
220
|
/*
|
|
216
221
|
* No calculation is required if swapping between em and rem yet,
|
|
217
222
|
* since we assume a root size value. Later we might like to differentiate between
|
|
218
223
|
* :root font size (rem) and parent element font size (em) relativity.
|
|
219
224
|
*/
|
|
220
|
-
|
|
221
|
-
|
|
222
225
|
if (('em' === coerceTo || 'rem' === coerceTo) && ('em' === unit || 'rem' === unit)) {
|
|
223
226
|
unit = coerceTo;
|
|
224
227
|
}
|
|
225
|
-
|
|
226
228
|
return {
|
|
227
229
|
value: roundToPrecision(returnValue, 3),
|
|
228
230
|
unit
|
|
229
231
|
};
|
|
230
232
|
}
|
|
233
|
+
|
|
231
234
|
/**
|
|
232
235
|
* Returns a value rounded to defined precision.
|
|
233
236
|
* Returns `undefined` if the value is not a valid finite number.
|
|
@@ -237,8 +240,6 @@ function getTypographyValueAndUnit(rawValue, options = {}) {
|
|
|
237
240
|
*
|
|
238
241
|
* @return {number|undefined} Value rounded to standard precision.
|
|
239
242
|
*/
|
|
240
|
-
|
|
241
|
-
|
|
242
243
|
function roundToPrecision(value, digits = 3) {
|
|
243
244
|
const base = Math.pow(10, digits);
|
|
244
245
|
return Number.isFinite(value) ? parseFloat(Math.round(value * base) / base) : undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-editor/src/components/font-sizes/fluid-utils.js"],"names":["DEFAULT_MAXIMUM_VIEWPORT_WIDTH","DEFAULT_MINIMUM_VIEWPORT_WIDTH","DEFAULT_SCALE_FACTOR","DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MIN","DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MAX","DEFAULT_MINIMUM_FONT_SIZE_LIMIT","getComputedFluidTypographyValue","minimumFontSize","maximumFontSize","fontSize","minimumViewportWidth","maximumViewportWidth","scaleFactor","minimumFontSizeLimit","getTypographyValueAndUnit","fontSizeParsed","unit","minimumFontSizeLimitParsed","coerceTo","value","fontSizeValueInPx","minimumFontSizeFactor","Math","min","max","log2","calculatedMinimumFontSize","roundToPrecision","minimumFontSizeParsed","fontSizeUnit","maximumFontSizeParsed","minimumFontSizeRem","maximumViewportWidthParsed","minimumViewportWidthParsed","minViewportWidthOffsetValue","viewportWidthOffset","linearFactor","linearFactorScaled","fluidTargetFontSize","rawValue","options","isFinite","rootSizeValue","acceptableUnits","acceptableUnitsGroup","join","regexUnits","RegExp","matches","match","length","returnValue","parseFloat","digits","base","pow","Number","round","undefined"],"mappings":"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","sourcesContent":["/**\n * The fluid utilities must match the backend equivalent.\n * See: gutenberg_get_typography_font_size_value() in lib/block-supports/typography.php\n * ---------------------------------------------------------------\n */\n\n// Defaults.\nconst DEFAULT_MAXIMUM_VIEWPORT_WIDTH = '1600px';\nconst DEFAULT_MINIMUM_VIEWPORT_WIDTH = '320px';\nconst DEFAULT_SCALE_FACTOR = 1;\nconst DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MIN = 0.25;\nconst DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MAX = 0.75;\nconst DEFAULT_MINIMUM_FONT_SIZE_LIMIT = '14px';\n\n/**\n * Computes a fluid font-size value that uses clamp(). A minimum and maximum\n * font size OR a single font size can be specified.\n *\n * If a single font size is specified, it is scaled up and down using a logarithmic scale.\n *\n * @example\n * ```js\n * // Calculate fluid font-size value from a minimum and maximum value.\n * const fontSize = getComputedFluidTypographyValue( {\n * minimumFontSize: '20px',\n * maximumFontSize: '45px'\n * } );\n * // Calculate fluid font-size value from a single font size.\n * const fontSize = getComputedFluidTypographyValue( {\n * fontSize: '30px',\n * } );\n * ```\n *\n * @param {Object} args\n * @param {?string} args.minimumViewportWidth Minimum viewport size from which type will have fluidity. Optional if fontSize is specified.\n * @param {?string} args.maximumViewportWidth Maximum size up to which type will have fluidity. Optional if fontSize is specified.\n * @param {string|number} [args.fontSize] Size to derive maximumFontSize and minimumFontSize from, if necessary. Optional if minimumFontSize and maximumFontSize are specified.\n * @param {?string} args.maximumFontSize Maximum font size for any clamp() calculation. Optional.\n * @param {?string} args.minimumFontSize Minimum font size for any clamp() calculation. Optional.\n * @param {?number} args.scaleFactor A scale factor to determine how fast a font scales within boundaries. Optional.\n * @param {?string} args.minimumFontSizeLimit The smallest a calculated font size may be. Optional.\n *\n * @return {string|null} A font-size value using clamp().\n */\nexport function getComputedFluidTypographyValue( {\n\tminimumFontSize,\n\tmaximumFontSize,\n\tfontSize,\n\tminimumViewportWidth = DEFAULT_MINIMUM_VIEWPORT_WIDTH,\n\tmaximumViewportWidth = DEFAULT_MAXIMUM_VIEWPORT_WIDTH,\n\tscaleFactor = DEFAULT_SCALE_FACTOR,\n\tminimumFontSizeLimit,\n} ) {\n\t// Validate incoming settings and set defaults.\n\tminimumFontSizeLimit = !! getTypographyValueAndUnit( minimumFontSizeLimit )\n\t\t? minimumFontSizeLimit\n\t\t: DEFAULT_MINIMUM_FONT_SIZE_LIMIT;\n\n\t/*\n\t * Calculates missing minimumFontSize and maximumFontSize from\n\t * defaultFontSize if provided.\n\t */\n\tif ( fontSize ) {\n\t\t// Parses default font size.\n\t\tconst fontSizeParsed = getTypographyValueAndUnit( fontSize );\n\n\t\t// Protect against invalid units.\n\t\tif ( ! fontSizeParsed?.unit ) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// Parses the minimum font size limit, so we can perform checks using it.\n\t\tconst minimumFontSizeLimitParsed = getTypographyValueAndUnit(\n\t\t\tminimumFontSizeLimit,\n\t\t\t{\n\t\t\t\tcoerceTo: fontSizeParsed.unit,\n\t\t\t}\n\t\t);\n\n\t\t// Don't enforce minimum font size if a font size has explicitly set a min and max value.\n\t\tif (\n\t\t\t!! minimumFontSizeLimitParsed?.value &&\n\t\t\t! minimumFontSize &&\n\t\t\t! maximumFontSize\n\t\t) {\n\t\t\t/*\n\t\t\t * If a minimum size was not passed to this function\n\t\t\t * and the user-defined font size is lower than $minimum_font_size_limit,\n\t\t\t * do not calculate a fluid value.\n\t\t\t */\n\t\t\tif ( fontSizeParsed?.value <= minimumFontSizeLimitParsed?.value ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\n\t\t// If no fluid max font size is available use the incoming value.\n\t\tif ( ! maximumFontSize ) {\n\t\t\tmaximumFontSize = `${ fontSizeParsed.value }${ fontSizeParsed.unit }`;\n\t\t}\n\n\t\t/*\n\t\t * If no minimumFontSize is provided, create one using\n\t\t * the given font size multiplied by the min font size scale factor.\n\t\t */\n\t\tif ( ! minimumFontSize ) {\n\t\t\tconst fontSizeValueInPx =\n\t\t\t\tfontSizeParsed.unit === 'px'\n\t\t\t\t\t? fontSizeParsed.value\n\t\t\t\t\t: fontSizeParsed.value * 16;\n\n\t\t\t/*\n\t\t\t * The scale factor is a multiplier that affects how quickly the curve will move towards the minimum,\n\t\t\t * that is, how quickly the size factor reaches 0 given increasing font size values.\n\t\t\t * For a - b * log2(), lower values of b will make the curve move towards the minimum faster.\n\t\t\t * The scale factor is constrained between min and max values.\n\t\t\t */\n\t\t\tconst minimumFontSizeFactor = Math.min(\n\t\t\t\tMath.max(\n\t\t\t\t\t1 - 0.075 * Math.log2( fontSizeValueInPx ),\n\t\t\t\t\tDEFAULT_MINIMUM_FONT_SIZE_FACTOR_MIN\n\t\t\t\t),\n\t\t\t\tDEFAULT_MINIMUM_FONT_SIZE_FACTOR_MAX\n\t\t\t);\n\n\t\t\t// Calculates the minimum font size.\n\t\t\tconst calculatedMinimumFontSize = roundToPrecision(\n\t\t\t\tfontSizeParsed.value * minimumFontSizeFactor,\n\t\t\t\t3\n\t\t\t);\n\n\t\t\t// Only use calculated min font size if it's > $minimum_font_size_limit value.\n\t\t\tif (\n\t\t\t\t!! minimumFontSizeLimitParsed?.value &&\n\t\t\t\tcalculatedMinimumFontSize < minimumFontSizeLimitParsed?.value\n\t\t\t) {\n\t\t\t\tminimumFontSize = `${ minimumFontSizeLimitParsed.value }${ minimumFontSizeLimitParsed.unit }`;\n\t\t\t} else {\n\t\t\t\tminimumFontSize = `${ calculatedMinimumFontSize }${ fontSizeParsed.unit }`;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Grab the minimum font size and normalize it in order to use the value for calculations.\n\tconst minimumFontSizeParsed = getTypographyValueAndUnit( minimumFontSize );\n\n\t// We get a 'preferred' unit to keep units consistent when calculating,\n\t// otherwise the result will not be accurate.\n\tconst fontSizeUnit = minimumFontSizeParsed?.unit || 'rem';\n\n\t// Grabs the maximum font size and normalize it in order to use the value for calculations.\n\tconst maximumFontSizeParsed = getTypographyValueAndUnit( maximumFontSize, {\n\t\tcoerceTo: fontSizeUnit,\n\t} );\n\n\t// Checks for mandatory min and max sizes, and protects against unsupported units.\n\tif ( ! minimumFontSizeParsed || ! maximumFontSizeParsed ) {\n\t\treturn null;\n\t}\n\n\t// Uses rem for accessible fluid target font scaling.\n\tconst minimumFontSizeRem = getTypographyValueAndUnit( minimumFontSize, {\n\t\tcoerceTo: 'rem',\n\t} );\n\n\t// Viewport widths defined for fluid typography. Normalize units\n\tconst maximumViewportWidthParsed = getTypographyValueAndUnit(\n\t\tmaximumViewportWidth,\n\t\t{ coerceTo: fontSizeUnit }\n\t);\n\tconst minimumViewportWidthParsed = getTypographyValueAndUnit(\n\t\tminimumViewportWidth,\n\t\t{ coerceTo: fontSizeUnit }\n\t);\n\n\t// Protect against unsupported units.\n\tif (\n\t\t! maximumViewportWidthParsed ||\n\t\t! minimumViewportWidthParsed ||\n\t\t! minimumFontSizeRem\n\t) {\n\t\treturn null;\n\t}\n\n\t// Build CSS rule.\n\t// Borrowed from https://websemantics.uk/tools/responsive-font-calculator/.\n\tconst minViewportWidthOffsetValue = roundToPrecision(\n\t\tminimumViewportWidthParsed.value / 100,\n\t\t3\n\t);\n\n\tconst viewportWidthOffset =\n\t\troundToPrecision( minViewportWidthOffsetValue, 3 ) + fontSizeUnit;\n\tconst linearFactor =\n\t\t100 *\n\t\t( ( maximumFontSizeParsed.value - minimumFontSizeParsed.value ) /\n\t\t\t( maximumViewportWidthParsed.value -\n\t\t\t\tminimumViewportWidthParsed.value ) );\n\tconst linearFactorScaled = roundToPrecision(\n\t\t( linearFactor || 1 ) * scaleFactor,\n\t\t3\n\t);\n\tconst fluidTargetFontSize = `${ minimumFontSizeRem.value }${ minimumFontSizeRem.unit } + ((1vw - ${ viewportWidthOffset }) * ${ linearFactorScaled })`;\n\n\treturn `clamp(${ minimumFontSize }, ${ fluidTargetFontSize }, ${ maximumFontSize })`;\n}\n\n/**\n * Internal method that checks a string for a unit and value and returns an array consisting of `'value'` and `'unit'`, e.g., [ '42', 'rem' ].\n * A raw font size of `value + unit` is expected. If the value is an integer, it will convert to `value + 'px'`.\n *\n * @param {string|number} rawValue Raw size value from theme.json.\n * @param {Object|undefined} options Calculation options.\n *\n * @return {{ unit: string, value: number }|null} An object consisting of `'value'` and `'unit'` properties.\n */\nexport function getTypographyValueAndUnit( rawValue, options = {} ) {\n\tif ( typeof rawValue !== 'string' && typeof rawValue !== 'number' ) {\n\t\treturn null;\n\t}\n\n\t// Converts numeric values to pixel values by default.\n\tif ( isFinite( rawValue ) ) {\n\t\trawValue = `${ rawValue }px`;\n\t}\n\n\tconst { coerceTo, rootSizeValue, acceptableUnits } = {\n\t\tcoerceTo: '',\n\t\t// Default browser font size. Later we could inject some JS to compute this `getComputedStyle( document.querySelector( \"html\" ) ).fontSize`.\n\t\trootSizeValue: 16,\n\t\tacceptableUnits: [ 'rem', 'px', 'em' ],\n\t\t...options,\n\t};\n\n\tconst acceptableUnitsGroup = acceptableUnits?.join( '|' );\n\tconst regexUnits = new RegExp(\n\t\t`^(\\\\d*\\\\.?\\\\d+)(${ acceptableUnitsGroup }){1,1}$`\n\t);\n\n\tconst matches = rawValue.match( regexUnits );\n\n\t// We need a number value and a unit.\n\tif ( ! matches || matches.length < 3 ) {\n\t\treturn null;\n\t}\n\n\tlet [ , value, unit ] = matches;\n\n\tlet returnValue = parseFloat( value );\n\n\tif ( 'px' === coerceTo && ( 'em' === unit || 'rem' === unit ) ) {\n\t\treturnValue = returnValue * rootSizeValue;\n\t\tunit = coerceTo;\n\t}\n\n\tif ( 'px' === unit && ( 'em' === coerceTo || 'rem' === coerceTo ) ) {\n\t\treturnValue = returnValue / rootSizeValue;\n\t\tunit = coerceTo;\n\t}\n\n\t/*\n\t * No calculation is required if swapping between em and rem yet,\n\t * since we assume a root size value. Later we might like to differentiate between\n\t * :root font size (rem) and parent element font size (em) relativity.\n\t */\n\tif (\n\t\t( 'em' === coerceTo || 'rem' === coerceTo ) &&\n\t\t( 'em' === unit || 'rem' === unit )\n\t) {\n\t\tunit = coerceTo;\n\t}\n\n\treturn {\n\t\tvalue: roundToPrecision( returnValue, 3 ),\n\t\tunit,\n\t};\n}\n\n/**\n * Returns a value rounded to defined precision.\n * Returns `undefined` if the value is not a valid finite number.\n *\n * @param {number} value Raw value.\n * @param {number} digits The number of digits to appear after the decimal point\n *\n * @return {number|undefined} Value rounded to standard precision.\n */\nexport function roundToPrecision( value, digits = 3 ) {\n\tconst base = Math.pow( 10, digits );\n\treturn Number.isFinite( value )\n\t\t? parseFloat( Math.round( value * base ) / base )\n\t\t: undefined;\n}\n"]}
|
|
1
|
+
{"version":3,"names":["DEFAULT_MAXIMUM_VIEWPORT_WIDTH","DEFAULT_MINIMUM_VIEWPORT_WIDTH","DEFAULT_SCALE_FACTOR","DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MIN","DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MAX","DEFAULT_MINIMUM_FONT_SIZE_LIMIT","getComputedFluidTypographyValue","minimumFontSize","maximumFontSize","fontSize","minimumViewportWidth","maximumViewportWidth","scaleFactor","minimumFontSizeLimit","getTypographyValueAndUnit","fontSizeParsed","unit","minimumFontSizeLimitParsed","coerceTo","value","fontSizeValueInPx","minimumFontSizeFactor","Math","min","max","log2","calculatedMinimumFontSize","roundToPrecision","minimumFontSizeParsed","fontSizeUnit","maximumFontSizeParsed","minimumFontSizeRem","maximumViewportWidthParsed","minimumViewportWidthParsed","minViewportWidthOffsetValue","viewportWidthOffset","linearFactor","linearFactorScaled","fluidTargetFontSize","rawValue","options","isFinite","rootSizeValue","acceptableUnits","acceptableUnitsGroup","join","regexUnits","RegExp","matches","match","length","returnValue","parseFloat","digits","base","pow","Number","round","undefined"],"sources":["@wordpress/block-editor/src/components/font-sizes/fluid-utils.js"],"sourcesContent":["/**\n * The fluid utilities must match the backend equivalent.\n * See: gutenberg_get_typography_font_size_value() in lib/block-supports/typography.php\n * ---------------------------------------------------------------\n */\n\n// Defaults.\nconst DEFAULT_MAXIMUM_VIEWPORT_WIDTH = '1600px';\nconst DEFAULT_MINIMUM_VIEWPORT_WIDTH = '320px';\nconst DEFAULT_SCALE_FACTOR = 1;\nconst DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MIN = 0.25;\nconst DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MAX = 0.75;\nconst DEFAULT_MINIMUM_FONT_SIZE_LIMIT = '14px';\n\n/**\n * Computes a fluid font-size value that uses clamp(). A minimum and maximum\n * font size OR a single font size can be specified.\n *\n * If a single font size is specified, it is scaled up and down using a logarithmic scale.\n *\n * @example\n * ```js\n * // Calculate fluid font-size value from a minimum and maximum value.\n * const fontSize = getComputedFluidTypographyValue( {\n * minimumFontSize: '20px',\n * maximumFontSize: '45px'\n * } );\n * // Calculate fluid font-size value from a single font size.\n * const fontSize = getComputedFluidTypographyValue( {\n * fontSize: '30px',\n * } );\n * ```\n *\n * @param {Object} args\n * @param {?string} args.minimumViewportWidth Minimum viewport size from which type will have fluidity. Optional if fontSize is specified.\n * @param {?string} args.maximumViewportWidth Maximum size up to which type will have fluidity. Optional if fontSize is specified.\n * @param {string|number} [args.fontSize] Size to derive maximumFontSize and minimumFontSize from, if necessary. Optional if minimumFontSize and maximumFontSize are specified.\n * @param {?string} args.maximumFontSize Maximum font size for any clamp() calculation. Optional.\n * @param {?string} args.minimumFontSize Minimum font size for any clamp() calculation. Optional.\n * @param {?number} args.scaleFactor A scale factor to determine how fast a font scales within boundaries. Optional.\n * @param {?string} args.minimumFontSizeLimit The smallest a calculated font size may be. Optional.\n *\n * @return {string|null} A font-size value using clamp().\n */\nexport function getComputedFluidTypographyValue( {\n\tminimumFontSize,\n\tmaximumFontSize,\n\tfontSize,\n\tminimumViewportWidth = DEFAULT_MINIMUM_VIEWPORT_WIDTH,\n\tmaximumViewportWidth = DEFAULT_MAXIMUM_VIEWPORT_WIDTH,\n\tscaleFactor = DEFAULT_SCALE_FACTOR,\n\tminimumFontSizeLimit,\n} ) {\n\t// Validate incoming settings and set defaults.\n\tminimumFontSizeLimit = !! getTypographyValueAndUnit( minimumFontSizeLimit )\n\t\t? minimumFontSizeLimit\n\t\t: DEFAULT_MINIMUM_FONT_SIZE_LIMIT;\n\n\t/*\n\t * Calculates missing minimumFontSize and maximumFontSize from\n\t * defaultFontSize if provided.\n\t */\n\tif ( fontSize ) {\n\t\t// Parses default font size.\n\t\tconst fontSizeParsed = getTypographyValueAndUnit( fontSize );\n\n\t\t// Protect against invalid units.\n\t\tif ( ! fontSizeParsed?.unit ) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// Parses the minimum font size limit, so we can perform checks using it.\n\t\tconst minimumFontSizeLimitParsed = getTypographyValueAndUnit(\n\t\t\tminimumFontSizeLimit,\n\t\t\t{\n\t\t\t\tcoerceTo: fontSizeParsed.unit,\n\t\t\t}\n\t\t);\n\n\t\t// Don't enforce minimum font size if a font size has explicitly set a min and max value.\n\t\tif (\n\t\t\t!! minimumFontSizeLimitParsed?.value &&\n\t\t\t! minimumFontSize &&\n\t\t\t! maximumFontSize\n\t\t) {\n\t\t\t/*\n\t\t\t * If a minimum size was not passed to this function\n\t\t\t * and the user-defined font size is lower than $minimum_font_size_limit,\n\t\t\t * do not calculate a fluid value.\n\t\t\t */\n\t\t\tif ( fontSizeParsed?.value <= minimumFontSizeLimitParsed?.value ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\n\t\t// If no fluid max font size is available use the incoming value.\n\t\tif ( ! maximumFontSize ) {\n\t\t\tmaximumFontSize = `${ fontSizeParsed.value }${ fontSizeParsed.unit }`;\n\t\t}\n\n\t\t/*\n\t\t * If no minimumFontSize is provided, create one using\n\t\t * the given font size multiplied by the min font size scale factor.\n\t\t */\n\t\tif ( ! minimumFontSize ) {\n\t\t\tconst fontSizeValueInPx =\n\t\t\t\tfontSizeParsed.unit === 'px'\n\t\t\t\t\t? fontSizeParsed.value\n\t\t\t\t\t: fontSizeParsed.value * 16;\n\n\t\t\t/*\n\t\t\t * The scale factor is a multiplier that affects how quickly the curve will move towards the minimum,\n\t\t\t * that is, how quickly the size factor reaches 0 given increasing font size values.\n\t\t\t * For a - b * log2(), lower values of b will make the curve move towards the minimum faster.\n\t\t\t * The scale factor is constrained between min and max values.\n\t\t\t */\n\t\t\tconst minimumFontSizeFactor = Math.min(\n\t\t\t\tMath.max(\n\t\t\t\t\t1 - 0.075 * Math.log2( fontSizeValueInPx ),\n\t\t\t\t\tDEFAULT_MINIMUM_FONT_SIZE_FACTOR_MIN\n\t\t\t\t),\n\t\t\t\tDEFAULT_MINIMUM_FONT_SIZE_FACTOR_MAX\n\t\t\t);\n\n\t\t\t// Calculates the minimum font size.\n\t\t\tconst calculatedMinimumFontSize = roundToPrecision(\n\t\t\t\tfontSizeParsed.value * minimumFontSizeFactor,\n\t\t\t\t3\n\t\t\t);\n\n\t\t\t// Only use calculated min font size if it's > $minimum_font_size_limit value.\n\t\t\tif (\n\t\t\t\t!! minimumFontSizeLimitParsed?.value &&\n\t\t\t\tcalculatedMinimumFontSize < minimumFontSizeLimitParsed?.value\n\t\t\t) {\n\t\t\t\tminimumFontSize = `${ minimumFontSizeLimitParsed.value }${ minimumFontSizeLimitParsed.unit }`;\n\t\t\t} else {\n\t\t\t\tminimumFontSize = `${ calculatedMinimumFontSize }${ fontSizeParsed.unit }`;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Grab the minimum font size and normalize it in order to use the value for calculations.\n\tconst minimumFontSizeParsed = getTypographyValueAndUnit( minimumFontSize );\n\n\t// We get a 'preferred' unit to keep units consistent when calculating,\n\t// otherwise the result will not be accurate.\n\tconst fontSizeUnit = minimumFontSizeParsed?.unit || 'rem';\n\n\t// Grabs the maximum font size and normalize it in order to use the value for calculations.\n\tconst maximumFontSizeParsed = getTypographyValueAndUnit( maximumFontSize, {\n\t\tcoerceTo: fontSizeUnit,\n\t} );\n\n\t// Checks for mandatory min and max sizes, and protects against unsupported units.\n\tif ( ! minimumFontSizeParsed || ! maximumFontSizeParsed ) {\n\t\treturn null;\n\t}\n\n\t// Uses rem for accessible fluid target font scaling.\n\tconst minimumFontSizeRem = getTypographyValueAndUnit( minimumFontSize, {\n\t\tcoerceTo: 'rem',\n\t} );\n\n\t// Viewport widths defined for fluid typography. Normalize units\n\tconst maximumViewportWidthParsed = getTypographyValueAndUnit(\n\t\tmaximumViewportWidth,\n\t\t{ coerceTo: fontSizeUnit }\n\t);\n\tconst minimumViewportWidthParsed = getTypographyValueAndUnit(\n\t\tminimumViewportWidth,\n\t\t{ coerceTo: fontSizeUnit }\n\t);\n\n\t// Protect against unsupported units.\n\tif (\n\t\t! maximumViewportWidthParsed ||\n\t\t! minimumViewportWidthParsed ||\n\t\t! minimumFontSizeRem\n\t) {\n\t\treturn null;\n\t}\n\n\t// Build CSS rule.\n\t// Borrowed from https://websemantics.uk/tools/responsive-font-calculator/.\n\tconst minViewportWidthOffsetValue = roundToPrecision(\n\t\tminimumViewportWidthParsed.value / 100,\n\t\t3\n\t);\n\n\tconst viewportWidthOffset =\n\t\troundToPrecision( minViewportWidthOffsetValue, 3 ) + fontSizeUnit;\n\tconst linearFactor =\n\t\t100 *\n\t\t( ( maximumFontSizeParsed.value - minimumFontSizeParsed.value ) /\n\t\t\t( maximumViewportWidthParsed.value -\n\t\t\t\tminimumViewportWidthParsed.value ) );\n\tconst linearFactorScaled = roundToPrecision(\n\t\t( linearFactor || 1 ) * scaleFactor,\n\t\t3\n\t);\n\tconst fluidTargetFontSize = `${ minimumFontSizeRem.value }${ minimumFontSizeRem.unit } + ((1vw - ${ viewportWidthOffset }) * ${ linearFactorScaled })`;\n\n\treturn `clamp(${ minimumFontSize }, ${ fluidTargetFontSize }, ${ maximumFontSize })`;\n}\n\n/**\n * Internal method that checks a string for a unit and value and returns an array consisting of `'value'` and `'unit'`, e.g., [ '42', 'rem' ].\n * A raw font size of `value + unit` is expected. If the value is an integer, it will convert to `value + 'px'`.\n *\n * @param {string|number} rawValue Raw size value from theme.json.\n * @param {Object|undefined} options Calculation options.\n *\n * @return {{ unit: string, value: number }|null} An object consisting of `'value'` and `'unit'` properties.\n */\nexport function getTypographyValueAndUnit( rawValue, options = {} ) {\n\tif ( typeof rawValue !== 'string' && typeof rawValue !== 'number' ) {\n\t\treturn null;\n\t}\n\n\t// Converts numeric values to pixel values by default.\n\tif ( isFinite( rawValue ) ) {\n\t\trawValue = `${ rawValue }px`;\n\t}\n\n\tconst { coerceTo, rootSizeValue, acceptableUnits } = {\n\t\tcoerceTo: '',\n\t\t// Default browser font size. Later we could inject some JS to compute this `getComputedStyle( document.querySelector( \"html\" ) ).fontSize`.\n\t\trootSizeValue: 16,\n\t\tacceptableUnits: [ 'rem', 'px', 'em' ],\n\t\t...options,\n\t};\n\n\tconst acceptableUnitsGroup = acceptableUnits?.join( '|' );\n\tconst regexUnits = new RegExp(\n\t\t`^(\\\\d*\\\\.?\\\\d+)(${ acceptableUnitsGroup }){1,1}$`\n\t);\n\n\tconst matches = rawValue.match( regexUnits );\n\n\t// We need a number value and a unit.\n\tif ( ! matches || matches.length < 3 ) {\n\t\treturn null;\n\t}\n\n\tlet [ , value, unit ] = matches;\n\n\tlet returnValue = parseFloat( value );\n\n\tif ( 'px' === coerceTo && ( 'em' === unit || 'rem' === unit ) ) {\n\t\treturnValue = returnValue * rootSizeValue;\n\t\tunit = coerceTo;\n\t}\n\n\tif ( 'px' === unit && ( 'em' === coerceTo || 'rem' === coerceTo ) ) {\n\t\treturnValue = returnValue / rootSizeValue;\n\t\tunit = coerceTo;\n\t}\n\n\t/*\n\t * No calculation is required if swapping between em and rem yet,\n\t * since we assume a root size value. Later we might like to differentiate between\n\t * :root font size (rem) and parent element font size (em) relativity.\n\t */\n\tif (\n\t\t( 'em' === coerceTo || 'rem' === coerceTo ) &&\n\t\t( 'em' === unit || 'rem' === unit )\n\t) {\n\t\tunit = coerceTo;\n\t}\n\n\treturn {\n\t\tvalue: roundToPrecision( returnValue, 3 ),\n\t\tunit,\n\t};\n}\n\n/**\n * Returns a value rounded to defined precision.\n * Returns `undefined` if the value is not a valid finite number.\n *\n * @param {number} value Raw value.\n * @param {number} digits The number of digits to appear after the decimal point\n *\n * @return {number|undefined} Value rounded to standard precision.\n */\nexport function roundToPrecision( value, digits = 3 ) {\n\tconst base = Math.pow( 10, digits );\n\treturn Number.isFinite( value )\n\t\t? parseFloat( Math.round( value * base ) / base )\n\t\t: undefined;\n}\n"],"mappings":";;;;;;;;AAAA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAMA,8BAA8B,GAAG,QAAQ;AAC/C,MAAMC,8BAA8B,GAAG,OAAO;AAC9C,MAAMC,oBAAoB,GAAG,CAAC;AAC9B,MAAMC,oCAAoC,GAAG,IAAI;AACjD,MAAMC,oCAAoC,GAAG,IAAI;AACjD,MAAMC,+BAA+B,GAAG,MAAM;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,+BAA+BA,CAAE;EAChDC,eAAe;EACfC,eAAe;EACfC,QAAQ;EACRC,oBAAoB,GAAGT,8BAA8B;EACrDU,oBAAoB,GAAGX,8BAA8B;EACrDY,WAAW,GAAGV,oBAAoB;EAClCW;AACD,CAAC,EAAG;EACH;EACAA,oBAAoB,GAAG,CAAC,CAAEC,yBAAyB,CAAED,oBAAqB,CAAC,GACxEA,oBAAoB,GACpBR,+BAA+B;;EAElC;AACD;AACA;AACA;EACC,IAAKI,QAAQ,EAAG;IACf;IACA,MAAMM,cAAc,GAAGD,yBAAyB,CAAEL,QAAS,CAAC;;IAE5D;IACA,IAAK,CAAEM,cAAc,EAAEC,IAAI,EAAG;MAC7B,OAAO,IAAI;IACZ;;IAEA;IACA,MAAMC,0BAA0B,GAAGH,yBAAyB,CAC3DD,oBAAoB,EACpB;MACCK,QAAQ,EAAEH,cAAc,CAACC;IAC1B,CACD,CAAC;;IAED;IACA,IACC,CAAC,CAAEC,0BAA0B,EAAEE,KAAK,IACpC,CAAEZ,eAAe,IACjB,CAAEC,eAAe,EAChB;MACD;AACH;AACA;AACA;AACA;MACG,IAAKO,cAAc,EAAEI,KAAK,IAAIF,0BAA0B,EAAEE,KAAK,EAAG;QACjE,OAAO,IAAI;MACZ;IACD;;IAEA;IACA,IAAK,CAAEX,eAAe,EAAG;MACxBA,eAAe,GAAI,GAAGO,cAAc,CAACI,KAAO,GAAGJ,cAAc,CAACC,IAAM,EAAC;IACtE;;IAEA;AACF;AACA;AACA;IACE,IAAK,CAAET,eAAe,EAAG;MACxB,MAAMa,iBAAiB,GACtBL,cAAc,CAACC,IAAI,KAAK,IAAI,GACzBD,cAAc,CAACI,KAAK,GACpBJ,cAAc,CAACI,KAAK,GAAG,EAAE;;MAE7B;AACH;AACA;AACA;AACA;AACA;MACG,MAAME,qBAAqB,GAAGC,IAAI,CAACC,GAAG,CACrCD,IAAI,CAACE,GAAG,CACP,CAAC,GAAG,KAAK,GAAGF,IAAI,CAACG,IAAI,CAAEL,iBAAkB,CAAC,EAC1CjB,oCACD,CAAC,EACDC,oCACD,CAAC;;MAED;MACA,MAAMsB,yBAAyB,GAAGC,gBAAgB,CACjDZ,cAAc,CAACI,KAAK,GAAGE,qBAAqB,EAC5C,CACD,CAAC;;MAED;MACA,IACC,CAAC,CAAEJ,0BAA0B,EAAEE,KAAK,IACpCO,yBAAyB,GAAGT,0BAA0B,EAAEE,KAAK,EAC5D;QACDZ,eAAe,GAAI,GAAGU,0BAA0B,CAACE,KAAO,GAAGF,0BAA0B,CAACD,IAAM,EAAC;MAC9F,CAAC,MAAM;QACNT,eAAe,GAAI,GAAGmB,yBAA2B,GAAGX,cAAc,CAACC,IAAM,EAAC;MAC3E;IACD;EACD;;EAEA;EACA,MAAMY,qBAAqB,GAAGd,yBAAyB,CAAEP,eAAgB,CAAC;;EAE1E;EACA;EACA,MAAMsB,YAAY,GAAGD,qBAAqB,EAAEZ,IAAI,IAAI,KAAK;;EAEzD;EACA,MAAMc,qBAAqB,GAAGhB,yBAAyB,CAAEN,eAAe,EAAE;IACzEU,QAAQ,EAAEW;EACX,CAAE,CAAC;;EAEH;EACA,IAAK,CAAED,qBAAqB,IAAI,CAAEE,qBAAqB,EAAG;IACzD,OAAO,IAAI;EACZ;;EAEA;EACA,MAAMC,kBAAkB,GAAGjB,yBAAyB,CAAEP,eAAe,EAAE;IACtEW,QAAQ,EAAE;EACX,CAAE,CAAC;;EAEH;EACA,MAAMc,0BAA0B,GAAGlB,yBAAyB,CAC3DH,oBAAoB,EACpB;IAAEO,QAAQ,EAAEW;EAAa,CAC1B,CAAC;EACD,MAAMI,0BAA0B,GAAGnB,yBAAyB,CAC3DJ,oBAAoB,EACpB;IAAEQ,QAAQ,EAAEW;EAAa,CAC1B,CAAC;;EAED;EACA,IACC,CAAEG,0BAA0B,IAC5B,CAAEC,0BAA0B,IAC5B,CAAEF,kBAAkB,EACnB;IACD,OAAO,IAAI;EACZ;;EAEA;EACA;EACA,MAAMG,2BAA2B,GAAGP,gBAAgB,CACnDM,0BAA0B,CAACd,KAAK,GAAG,GAAG,EACtC,CACD,CAAC;EAED,MAAMgB,mBAAmB,GACxBR,gBAAgB,CAAEO,2BAA2B,EAAE,CAAE,CAAC,GAAGL,YAAY;EAClE,MAAMO,YAAY,GACjB,GAAG,IACD,CAAEN,qBAAqB,CAACX,KAAK,GAAGS,qBAAqB,CAACT,KAAK,KAC1Da,0BAA0B,CAACb,KAAK,GACjCc,0BAA0B,CAACd,KAAK,CAAE,CAAE;EACvC,MAAMkB,kBAAkB,GAAGV,gBAAgB,CAC1C,CAAES,YAAY,IAAI,CAAC,IAAKxB,WAAW,EACnC,CACD,CAAC;EACD,MAAM0B,mBAAmB,GAAI,GAAGP,kBAAkB,CAACZ,KAAO,GAAGY,kBAAkB,CAACf,IAAM,cAAcmB,mBAAqB,OAAOE,kBAAoB,GAAE;EAEtJ,OAAQ,SAAS9B,eAAiB,KAAK+B,mBAAqB,KAAK9B,eAAiB,GAAE;AACrF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASM,yBAAyBA,CAAEyB,QAAQ,EAAEC,OAAO,GAAG,CAAC,CAAC,EAAG;EACnE,IAAK,OAAOD,QAAQ,KAAK,QAAQ,IAAI,OAAOA,QAAQ,KAAK,QAAQ,EAAG;IACnE,OAAO,IAAI;EACZ;;EAEA;EACA,IAAKE,QAAQ,CAAEF,QAAS,CAAC,EAAG;IAC3BA,QAAQ,GAAI,GAAGA,QAAU,IAAG;EAC7B;EAEA,MAAM;IAAErB,QAAQ;IAAEwB,aAAa;IAAEC;EAAgB,CAAC,GAAG;IACpDzB,QAAQ,EAAE,EAAE;IACZ;IACAwB,aAAa,EAAE,EAAE;IACjBC,eAAe,EAAE,CAAE,KAAK,EAAE,IAAI,EAAE,IAAI,CAAE;IACtC,GAAGH;EACJ,CAAC;EAED,MAAMI,oBAAoB,GAAGD,eAAe,EAAEE,IAAI,CAAE,GAAI,CAAC;EACzD,MAAMC,UAAU,GAAG,IAAIC,MAAM,CAC3B,mBAAmBH,oBAAsB,SAC3C,CAAC;EAED,MAAMI,OAAO,GAAGT,QAAQ,CAACU,KAAK,CAAEH,UAAW,CAAC;;EAE5C;EACA,IAAK,CAAEE,OAAO,IAAIA,OAAO,CAACE,MAAM,GAAG,CAAC,EAAG;IACtC,OAAO,IAAI;EACZ;EAEA,IAAI,GAAI/B,KAAK,EAAEH,IAAI,CAAE,GAAGgC,OAAO;EAE/B,IAAIG,WAAW,GAAGC,UAAU,CAAEjC,KAAM,CAAC;EAErC,IAAK,IAAI,KAAKD,QAAQ,KAAM,IAAI,KAAKF,IAAI,IAAI,KAAK,KAAKA,IAAI,CAAE,EAAG;IAC/DmC,WAAW,GAAGA,WAAW,GAAGT,aAAa;IACzC1B,IAAI,GAAGE,QAAQ;EAChB;EAEA,IAAK,IAAI,KAAKF,IAAI,KAAM,IAAI,KAAKE,QAAQ,IAAI,KAAK,KAAKA,QAAQ,CAAE,EAAG;IACnEiC,WAAW,GAAGA,WAAW,GAAGT,aAAa;IACzC1B,IAAI,GAAGE,QAAQ;EAChB;;EAEA;AACD;AACA;AACA;AACA;EACC,IACC,CAAE,IAAI,KAAKA,QAAQ,IAAI,KAAK,KAAKA,QAAQ,MACvC,IAAI,KAAKF,IAAI,IAAI,KAAK,KAAKA,IAAI,CAAE,EAClC;IACDA,IAAI,GAAGE,QAAQ;EAChB;EAEA,OAAO;IACNC,KAAK,EAAEQ,gBAAgB,CAAEwB,WAAW,EAAE,CAAE,CAAC;IACzCnC;EACD,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASW,gBAAgBA,CAAER,KAAK,EAAEkC,MAAM,GAAG,CAAC,EAAG;EACrD,MAAMC,IAAI,GAAGhC,IAAI,CAACiC,GAAG,CAAE,EAAE,EAAEF,MAAO,CAAC;EACnC,OAAOG,MAAM,CAACf,QAAQ,CAAEtB,KAAM,CAAC,GAC5BiC,UAAU,CAAE9B,IAAI,CAACmC,KAAK,CAAEtC,KAAK,GAAGmC,IAAK,CAAC,GAAGA,IAAK,CAAC,GAC/CI,SAAS;AACb"}
|
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = void 0;
|
|
9
|
-
|
|
10
8
|
var _element = require("@wordpress/element");
|
|
11
|
-
|
|
12
9
|
var _components = require("@wordpress/components");
|
|
13
|
-
|
|
14
10
|
var _useSetting = _interopRequireDefault(require("../use-setting"));
|
|
15
|
-
|
|
16
11
|
/**
|
|
17
12
|
* WordPress dependencies
|
|
18
13
|
*/
|
|
@@ -20,19 +15,20 @@ var _useSetting = _interopRequireDefault(require("../use-setting"));
|
|
|
20
15
|
/**
|
|
21
16
|
* Internal dependencies
|
|
22
17
|
*/
|
|
18
|
+
|
|
23
19
|
function FontSizePicker(props) {
|
|
24
20
|
const fontSizes = (0, _useSetting.default)('typography.fontSizes');
|
|
25
21
|
const disableCustomFontSizes = !(0, _useSetting.default)('typography.customFontSize');
|
|
26
|
-
return (0, _element.createElement)(_components.FontSizePicker, {
|
|
22
|
+
return (0, _element.createElement)(_components.FontSizePicker, {
|
|
23
|
+
...props,
|
|
27
24
|
fontSizes: fontSizes,
|
|
28
25
|
disableCustomFontSizes: disableCustomFontSizes
|
|
29
26
|
});
|
|
30
27
|
}
|
|
28
|
+
|
|
31
29
|
/**
|
|
32
30
|
* @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/font-sizes/README.md
|
|
33
31
|
*/
|
|
34
|
-
|
|
35
|
-
|
|
36
32
|
var _default = FontSizePicker;
|
|
37
33
|
exports.default = _default;
|
|
38
34
|
//# sourceMappingURL=font-size-picker.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["_components","require","_useSetting","_interopRequireDefault","FontSizePicker","props","fontSizes","useSetting","disableCustomFontSizes","_element","createElement","_default","exports","default"],"sources":["@wordpress/block-editor/src/components/font-sizes/font-size-picker.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { FontSizePicker as BaseFontSizePicker } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport useSetting from '../use-setting';\n\nfunction FontSizePicker( props ) {\n\tconst fontSizes = useSetting( 'typography.fontSizes' );\n\tconst disableCustomFontSizes = ! useSetting( 'typography.customFontSize' );\n\n\treturn (\n\t\t<BaseFontSizePicker\n\t\t\t{ ...props }\n\t\t\tfontSizes={ fontSizes }\n\t\t\tdisableCustomFontSizes={ disableCustomFontSizes }\n\t\t/>\n\t);\n}\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/font-sizes/README.md\n */\nexport default FontSizePicker;\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAGA,SAASG,cAAcA,CAAEC,KAAK,EAAG;EAChC,MAAMC,SAAS,GAAG,IAAAC,mBAAU,EAAE,sBAAuB,CAAC;EACtD,MAAMC,sBAAsB,GAAG,CAAE,IAAAD,mBAAU,EAAE,2BAA4B,CAAC;EAE1E,OACC,IAAAE,QAAA,CAAAC,aAAA,EAACV,WAAA,CAAAI,cAAkB;IAAA,GACbC,KAAK;IACVC,SAAS,EAAGA,SAAW;IACvBE,sBAAsB,EAAGA;EAAwB,CACjD,CAAC;AAEJ;;AAEA;AACA;AACA;AAFA,IAAAG,QAAA,GAGeP,cAAc;AAAAQ,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
@@ -41,12 +40,8 @@ Object.defineProperty(exports, "withFontSizes", {
|
|
|
41
40
|
return _withFontSizes.default;
|
|
42
41
|
}
|
|
43
42
|
});
|
|
44
|
-
|
|
45
43
|
var _utils = require("./utils");
|
|
46
|
-
|
|
47
44
|
var _fluidUtils = require("./fluid-utils");
|
|
48
|
-
|
|
49
45
|
var _fontSizePicker = _interopRequireDefault(require("./font-size-picker"));
|
|
50
|
-
|
|
51
46
|
var _withFontSizes = _interopRequireDefault(require("./with-font-sizes"));
|
|
52
47
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-editor/src/components/font-sizes/index.js"],"
|
|
1
|
+
{"version":3,"names":["_utils","require","_fluidUtils","_fontSizePicker","_interopRequireDefault","_withFontSizes"],"sources":["@wordpress/block-editor/src/components/font-sizes/index.js"],"sourcesContent":["export {\n\tgetFontSize,\n\tgetFontSizeClass,\n\tgetFontSizeObjectByValue,\n} from './utils';\nexport { getComputedFluidTypographyValue } from './fluid-utils';\nexport { default as FontSizePicker } from './font-size-picker';\nexport { default as withFontSizes } from './with-font-sizes';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,cAAA,GAAAD,sBAAA,CAAAH,OAAA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
@@ -35,10 +34,7 @@ Object.defineProperty(exports, "withFontSizes", {
|
|
|
35
34
|
return _withFontSizes.default;
|
|
36
35
|
}
|
|
37
36
|
});
|
|
38
|
-
|
|
39
37
|
var _utils = require("./utils");
|
|
40
|
-
|
|
41
38
|
var _fontSizePicker = _interopRequireDefault(require("./font-size-picker"));
|
|
42
|
-
|
|
43
39
|
var _withFontSizes = _interopRequireDefault(require("./with-font-sizes"));
|
|
44
40
|
//# sourceMappingURL=index.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-editor/src/components/font-sizes/index.native.js"],"
|
|
1
|
+
{"version":3,"names":["_utils","require","_fontSizePicker","_interopRequireDefault","_withFontSizes"],"sources":["@wordpress/block-editor/src/components/font-sizes/index.native.js"],"sourcesContent":["export {\n\tgetFontSize,\n\tgetFontSizeClass,\n\tgetFontSizeObjectByValue,\n} from './utils';\nexport { default as FontSizePicker } from './font-size-picker';\nexport { default as withFontSizes } from './with-font-sizes';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAKA,IAAAC,eAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,cAAA,GAAAD,sBAAA,CAAAF,OAAA"}
|
|
@@ -6,9 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.getFontSize = void 0;
|
|
7
7
|
exports.getFontSizeClass = getFontSizeClass;
|
|
8
8
|
exports.getFontSizeObjectByValue = getFontSizeObjectByValue;
|
|
9
|
-
|
|
10
9
|
var _object = require("../../utils/object");
|
|
11
|
-
|
|
12
10
|
/**
|
|
13
11
|
* Internal dependencies
|
|
14
12
|
*/
|
|
@@ -29,16 +27,15 @@ const getFontSize = (fontSizes, fontSizeAttribute, customFontSizeAttribute) => {
|
|
|
29
27
|
const fontSizeObject = fontSizes?.find(({
|
|
30
28
|
slug
|
|
31
29
|
}) => slug === fontSizeAttribute);
|
|
32
|
-
|
|
33
30
|
if (fontSizeObject) {
|
|
34
31
|
return fontSizeObject;
|
|
35
32
|
}
|
|
36
33
|
}
|
|
37
|
-
|
|
38
34
|
return {
|
|
39
35
|
size: customFontSizeAttribute
|
|
40
36
|
};
|
|
41
37
|
};
|
|
38
|
+
|
|
42
39
|
/**
|
|
43
40
|
* Returns the corresponding font size object for a given value.
|
|
44
41
|
*
|
|
@@ -47,23 +44,19 @@ const getFontSize = (fontSizes, fontSizeAttribute, customFontSizeAttribute) => {
|
|
|
47
44
|
*
|
|
48
45
|
* @return {Object} Font size object.
|
|
49
46
|
*/
|
|
50
|
-
|
|
51
|
-
|
|
52
47
|
exports.getFontSize = getFontSize;
|
|
53
|
-
|
|
54
48
|
function getFontSizeObjectByValue(fontSizes, value) {
|
|
55
49
|
const fontSizeObject = fontSizes?.find(({
|
|
56
50
|
size
|
|
57
51
|
}) => size === value);
|
|
58
|
-
|
|
59
52
|
if (fontSizeObject) {
|
|
60
53
|
return fontSizeObject;
|
|
61
54
|
}
|
|
62
|
-
|
|
63
55
|
return {
|
|
64
56
|
size: value
|
|
65
57
|
};
|
|
66
58
|
}
|
|
59
|
+
|
|
67
60
|
/**
|
|
68
61
|
* Returns a class based on fontSizeName.
|
|
69
62
|
*
|
|
@@ -72,13 +65,10 @@ function getFontSizeObjectByValue(fontSizes, value) {
|
|
|
72
65
|
* @return {string | undefined} String with the class corresponding to the fontSize passed.
|
|
73
66
|
* The class is generated by appending 'has-' followed by fontSizeSlug in kebabCase and ending with '-font-size'.
|
|
74
67
|
*/
|
|
75
|
-
|
|
76
|
-
|
|
77
68
|
function getFontSizeClass(fontSizeSlug) {
|
|
78
69
|
if (!fontSizeSlug) {
|
|
79
70
|
return;
|
|
80
71
|
}
|
|
81
|
-
|
|
82
72
|
return `has-${(0, _object.kebabCase)(fontSizeSlug)}-font-size`;
|
|
83
73
|
}
|
|
84
74
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["_object","require","getFontSize","fontSizes","fontSizeAttribute","customFontSizeAttribute","fontSizeObject","find","slug","size","exports","getFontSizeObjectByValue","value","getFontSizeClass","fontSizeSlug","kebabCase"],"sources":["@wordpress/block-editor/src/components/font-sizes/utils.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { kebabCase } from '../../utils/object';\n\n/**\n * Returns the font size object based on an array of named font sizes and the namedFontSize and customFontSize values.\n * \tIf namedFontSize is undefined or not found in fontSizes an object with just the size value based on customFontSize is returned.\n *\n * @param {Array} fontSizes Array of font size objects containing at least the \"name\" and \"size\" values as properties.\n * @param {?string} fontSizeAttribute Content of the font size attribute (slug).\n * @param {?number} customFontSizeAttribute Contents of the custom font size attribute (value).\n *\n * @return {?Object} If fontSizeAttribute is set and an equal slug is found in fontSizes it returns the font size object for that slug.\n * \t\t\t\t\t Otherwise, an object with just the size value based on customFontSize is returned.\n */\nexport const getFontSize = (\n\tfontSizes,\n\tfontSizeAttribute,\n\tcustomFontSizeAttribute\n) => {\n\tif ( fontSizeAttribute ) {\n\t\tconst fontSizeObject = fontSizes?.find(\n\t\t\t( { slug } ) => slug === fontSizeAttribute\n\t\t);\n\t\tif ( fontSizeObject ) {\n\t\t\treturn fontSizeObject;\n\t\t}\n\t}\n\treturn {\n\t\tsize: customFontSizeAttribute,\n\t};\n};\n\n/**\n * Returns the corresponding font size object for a given value.\n *\n * @param {Array} fontSizes Array of font size objects.\n * @param {number} value Font size value.\n *\n * @return {Object} Font size object.\n */\nexport function getFontSizeObjectByValue( fontSizes, value ) {\n\tconst fontSizeObject = fontSizes?.find( ( { size } ) => size === value );\n\tif ( fontSizeObject ) {\n\t\treturn fontSizeObject;\n\t}\n\n\treturn {\n\t\tsize: value,\n\t};\n}\n\n/**\n * Returns a class based on fontSizeName.\n *\n * @param {string} fontSizeSlug Slug of the fontSize.\n *\n * @return {string | undefined} String with the class corresponding to the fontSize passed.\n * The class is generated by appending 'has-' followed by fontSizeSlug in kebabCase and ending with '-font-size'.\n */\nexport function getFontSizeClass( fontSizeSlug ) {\n\tif ( ! fontSizeSlug ) {\n\t\treturn;\n\t}\n\n\treturn `has-${ kebabCase( fontSizeSlug ) }-font-size`;\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,WAAW,GAAGA,CAC1BC,SAAS,EACTC,iBAAiB,EACjBC,uBAAuB,KACnB;EACJ,IAAKD,iBAAiB,EAAG;IACxB,MAAME,cAAc,GAAGH,SAAS,EAAEI,IAAI,CACrC,CAAE;MAAEC;IAAK,CAAC,KAAMA,IAAI,KAAKJ,iBAC1B,CAAC;IACD,IAAKE,cAAc,EAAG;MACrB,OAAOA,cAAc;IACtB;EACD;EACA,OAAO;IACNG,IAAI,EAAEJ;EACP,CAAC;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAPAK,OAAA,CAAAR,WAAA,GAAAA,WAAA;AAQO,SAASS,wBAAwBA,CAAER,SAAS,EAAES,KAAK,EAAG;EAC5D,MAAMN,cAAc,GAAGH,SAAS,EAAEI,IAAI,CAAE,CAAE;IAAEE;EAAK,CAAC,KAAMA,IAAI,KAAKG,KAAM,CAAC;EACxE,IAAKN,cAAc,EAAG;IACrB,OAAOA,cAAc;EACtB;EAEA,OAAO;IACNG,IAAI,EAAEG;EACP,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,gBAAgBA,CAAEC,YAAY,EAAG;EAChD,IAAK,CAAEA,YAAY,EAAG;IACrB;EACD;EAEA,OAAQ,OAAO,IAAAC,iBAAS,EAAED,YAAa,CAAG,YAAW;AACtD"}
|
|
@@ -1,20 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = void 0;
|
|
9
|
-
|
|
10
8
|
var _element = require("@wordpress/element");
|
|
11
|
-
|
|
12
9
|
var _compose = require("@wordpress/compose");
|
|
13
|
-
|
|
14
10
|
var _utils = require("./utils");
|
|
15
|
-
|
|
16
11
|
var _useSetting = _interopRequireDefault(require("../use-setting"));
|
|
17
|
-
|
|
18
12
|
/**
|
|
19
13
|
* WordPress dependencies
|
|
20
14
|
*/
|
|
@@ -22,7 +16,9 @@ var _useSetting = _interopRequireDefault(require("../use-setting"));
|
|
|
22
16
|
/**
|
|
23
17
|
* Internal dependencies
|
|
24
18
|
*/
|
|
19
|
+
|
|
25
20
|
const DEFAULT_FONT_SIZES = [];
|
|
21
|
+
|
|
26
22
|
/**
|
|
27
23
|
* Capitalizes the first letter in a string.
|
|
28
24
|
*
|
|
@@ -30,8 +26,8 @@ const DEFAULT_FONT_SIZES = [];
|
|
|
30
26
|
*
|
|
31
27
|
* @return {string} Capitalized string.
|
|
32
28
|
*/
|
|
33
|
-
|
|
34
29
|
const upperFirst = ([firstLetter, ...rest]) => firstLetter.toUpperCase() + rest.join('');
|
|
30
|
+
|
|
35
31
|
/**
|
|
36
32
|
* Higher-order component, which handles font size logic for class generation,
|
|
37
33
|
* font size value retrieval, and font size change handling.
|
|
@@ -42,8 +38,6 @@ const upperFirst = ([firstLetter, ...rest]) => firstLetter.toUpperCase() + rest.
|
|
|
42
38
|
*
|
|
43
39
|
* @return {Function} Higher-order component.
|
|
44
40
|
*/
|
|
45
|
-
|
|
46
|
-
|
|
47
41
|
var _default = (...fontSizeNames) => {
|
|
48
42
|
/*
|
|
49
43
|
* Computes an object whose key is the font size attribute name as passed in the array,
|
|
@@ -56,7 +50,8 @@ var _default = (...fontSizeNames) => {
|
|
|
56
50
|
}, {});
|
|
57
51
|
return (0, _compose.createHigherOrderComponent)((0, _compose.compose)([(0, _compose.createHigherOrderComponent)(WrappedComponent => props => {
|
|
58
52
|
const fontSizes = (0, _useSetting.default)('typography.fontSizes') || DEFAULT_FONT_SIZES;
|
|
59
|
-
return (0, _element.createElement)(WrappedComponent, {
|
|
53
|
+
return (0, _element.createElement)(WrappedComponent, {
|
|
54
|
+
...props,
|
|
60
55
|
fontSizes: fontSizes
|
|
61
56
|
});
|
|
62
57
|
}, 'withFontSizes'), WrappedComponent => {
|
|
@@ -66,7 +61,6 @@ var _default = (...fontSizeNames) => {
|
|
|
66
61
|
this.setters = this.createSetters();
|
|
67
62
|
this.state = {};
|
|
68
63
|
}
|
|
69
|
-
|
|
70
64
|
createSetters() {
|
|
71
65
|
return Object.entries(fontSizeAttributeNames).reduce((settersAccumulator, [fontSizeAttributeName, customFontSizeAttributeName]) => {
|
|
72
66
|
const upperFirstFontSizeAttributeName = upperFirst(fontSizeAttributeName);
|
|
@@ -74,7 +68,6 @@ var _default = (...fontSizeNames) => {
|
|
|
74
68
|
return settersAccumulator;
|
|
75
69
|
}, {});
|
|
76
70
|
}
|
|
77
|
-
|
|
78
71
|
createSetFontSize(fontSizeAttributeName, customFontSizeAttributeName) {
|
|
79
72
|
return fontSizeValue => {
|
|
80
73
|
const fontSizeObject = this.props.fontSizes?.find(({
|
|
@@ -86,7 +79,6 @@ var _default = (...fontSizeNames) => {
|
|
|
86
79
|
});
|
|
87
80
|
};
|
|
88
81
|
}
|
|
89
|
-
|
|
90
82
|
static getDerivedStateFromProps({
|
|
91
83
|
attributes,
|
|
92
84
|
fontSizes
|
|
@@ -96,44 +88,40 @@ var _default = (...fontSizeNames) => {
|
|
|
96
88
|
// If new font size is name compare with the previous slug.
|
|
97
89
|
if (attributes[fontSizeAttributeName]) {
|
|
98
90
|
return attributes[fontSizeAttributeName] !== previousState[fontSizeAttributeName].slug;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
|
|
91
|
+
}
|
|
92
|
+
// If font size is not named, update when the font size value changes.
|
|
102
93
|
return previousState[fontSizeAttributeName].size !== attributes[customFontSizeAttributeName];
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
|
|
94
|
+
}
|
|
95
|
+
// In this case we need to build the font size object.
|
|
106
96
|
return true;
|
|
107
97
|
};
|
|
108
|
-
|
|
109
98
|
if (!Object.values(fontSizeAttributeNames).some(didAttributesChange)) {
|
|
110
99
|
return null;
|
|
111
100
|
}
|
|
112
|
-
|
|
113
101
|
const newState = Object.entries(fontSizeAttributeNames).filter(([key, value]) => didAttributesChange(value, key)).reduce((newStateAccumulator, [fontSizeAttributeName, customFontSizeAttributeName]) => {
|
|
114
102
|
const fontSizeAttributeValue = attributes[fontSizeAttributeName];
|
|
115
103
|
const fontSizeObject = (0, _utils.getFontSize)(fontSizes, fontSizeAttributeValue, attributes[customFontSizeAttributeName]);
|
|
116
|
-
newStateAccumulator[fontSizeAttributeName] = {
|
|
104
|
+
newStateAccumulator[fontSizeAttributeName] = {
|
|
105
|
+
...fontSizeObject,
|
|
117
106
|
class: (0, _utils.getFontSizeClass)(fontSizeAttributeValue)
|
|
118
107
|
};
|
|
119
108
|
return newStateAccumulator;
|
|
120
109
|
}, {});
|
|
121
|
-
return {
|
|
110
|
+
return {
|
|
111
|
+
...previousState,
|
|
122
112
|
...newState
|
|
123
113
|
};
|
|
124
114
|
}
|
|
125
|
-
|
|
126
115
|
render() {
|
|
127
|
-
return (0, _element.createElement)(WrappedComponent, {
|
|
116
|
+
return (0, _element.createElement)(WrappedComponent, {
|
|
117
|
+
...this.props,
|
|
128
118
|
fontSizes: undefined,
|
|
129
119
|
...this.state,
|
|
130
120
|
...this.setters
|
|
131
121
|
});
|
|
132
122
|
}
|
|
133
|
-
|
|
134
123
|
};
|
|
135
124
|
}]), 'withFontSizes');
|
|
136
125
|
};
|
|
137
|
-
|
|
138
126
|
exports.default = _default;
|
|
139
127
|
//# sourceMappingURL=with-font-sizes.js.map
|