@wordpress/block-editor 12.7.0 → 12.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/README.md +67 -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 +4 -15
- package/build/components/block-controls/slot.js.map +1 -1
- package/build/components/block-controls/slot.native.js +6 -13
- 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 +37 -36
- 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 +3 -7
- 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 +4 -11
- 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 +9 -17
- 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 +24 -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 +5 -17
- package/build/components/inspector-controls/fill.js.map +1 -1
- package/build/components/inspector-controls/fill.native.js +4 -16
- 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 +6 -17
- package/build/components/inspector-controls/slot.js.map +1 -1
- package/build/components/inspector-controls/slot.native.js +4 -11
- 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 +1 -5
- 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 +256 -454
- 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 +4 -9
- package/build-module/components/block-controls/slot.js.map +1 -1
- package/build-module/components/block-controls/slot.native.js +6 -9
- 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 +40 -12
- 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 +5 -5
- 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 +4 -5
- 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 +9 -10
- 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 +27 -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 +5 -11
- package/build-module/components/inspector-controls/fill.js.map +1 -1
- package/build-module/components/inspector-controls/fill.native.js +5 -9
- 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 +6 -10
- package/build-module/components/inspector-controls/slot.js.map +1 -1
- package/build-module/components/inspector-controls/slot.native.js +4 -7
- 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 +2 -3
- 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 +254 -332
- 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 -9
- package/build-style/style.css +52 -9
- 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-icon/test/index.js +2 -2
- 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-block-props/index.js +26 -0
- package/src/components/block-list/use-block-props/use-nav-mode-exit.js +1 -1
- 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-lock/menu-item.js +2 -0
- package/src/components/block-lock/toolbar.js +3 -1
- package/src/components/block-parent-selector/index.js +1 -2
- package/src/components/block-preview/index.js +0 -1
- package/src/components/block-styles/style.scss +0 -3
- 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 +2 -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/rich-text/use-remove-browser-shortcuts.js +1 -1
- 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 +65 -3
- 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
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* See: gutenberg_get_typography_font_size_value() in lib/block-supports/typography.php
|
|
4
4
|
* ---------------------------------------------------------------
|
|
5
5
|
*/
|
|
6
|
+
|
|
6
7
|
// Defaults.
|
|
7
8
|
const DEFAULT_MAXIMUM_VIEWPORT_WIDTH = '1600px';
|
|
8
9
|
const DEFAULT_MINIMUM_VIEWPORT_WIDTH = '320px';
|
|
@@ -10,6 +11,7 @@ const DEFAULT_SCALE_FACTOR = 1;
|
|
|
10
11
|
const DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MIN = 0.25;
|
|
11
12
|
const DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MAX = 0.75;
|
|
12
13
|
const DEFAULT_MINIMUM_FONT_SIZE_LIMIT = '14px';
|
|
14
|
+
|
|
13
15
|
/**
|
|
14
16
|
* Computes a fluid font-size value that uses clamp(). A minimum and maximum
|
|
15
17
|
* font size OR a single font size can be specified.
|
|
@@ -40,7 +42,6 @@ const DEFAULT_MINIMUM_FONT_SIZE_LIMIT = '14px';
|
|
|
40
42
|
*
|
|
41
43
|
* @return {string|null} A font-size value using clamp().
|
|
42
44
|
*/
|
|
43
|
-
|
|
44
45
|
export function getComputedFluidTypographyValue({
|
|
45
46
|
minimumFontSize,
|
|
46
47
|
maximumFontSize,
|
|
@@ -52,24 +53,26 @@ export function getComputedFluidTypographyValue({
|
|
|
52
53
|
}) {
|
|
53
54
|
// Validate incoming settings and set defaults.
|
|
54
55
|
minimumFontSizeLimit = !!getTypographyValueAndUnit(minimumFontSizeLimit) ? minimumFontSizeLimit : DEFAULT_MINIMUM_FONT_SIZE_LIMIT;
|
|
56
|
+
|
|
55
57
|
/*
|
|
56
58
|
* Calculates missing minimumFontSize and maximumFontSize from
|
|
57
59
|
* defaultFontSize if provided.
|
|
58
60
|
*/
|
|
59
|
-
|
|
60
61
|
if (fontSize) {
|
|
61
62
|
// Parses default font size.
|
|
62
|
-
const fontSizeParsed = getTypographyValueAndUnit(fontSize);
|
|
63
|
+
const fontSizeParsed = getTypographyValueAndUnit(fontSize);
|
|
63
64
|
|
|
65
|
+
// Protect against invalid units.
|
|
64
66
|
if (!fontSizeParsed?.unit) {
|
|
65
67
|
return null;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
+
}
|
|
68
69
|
|
|
70
|
+
// Parses the minimum font size limit, so we can perform checks using it.
|
|
69
71
|
const minimumFontSizeLimitParsed = getTypographyValueAndUnit(minimumFontSizeLimit, {
|
|
70
72
|
coerceTo: fontSizeParsed.unit
|
|
71
|
-
});
|
|
73
|
+
});
|
|
72
74
|
|
|
75
|
+
// Don't enforce minimum font size if a font size has explicitly set a min and max value.
|
|
73
76
|
if (!!minimumFontSizeLimitParsed?.value && !minimumFontSize && !maximumFontSize) {
|
|
74
77
|
/*
|
|
75
78
|
* If a minimum size was not passed to this function
|
|
@@ -79,71 +82,77 @@ export function getComputedFluidTypographyValue({
|
|
|
79
82
|
if (fontSizeParsed?.value <= minimumFontSizeLimitParsed?.value) {
|
|
80
83
|
return null;
|
|
81
84
|
}
|
|
82
|
-
}
|
|
83
|
-
|
|
85
|
+
}
|
|
84
86
|
|
|
87
|
+
// If no fluid max font size is available use the incoming value.
|
|
85
88
|
if (!maximumFontSize) {
|
|
86
89
|
maximumFontSize = `${fontSizeParsed.value}${fontSizeParsed.unit}`;
|
|
87
90
|
}
|
|
91
|
+
|
|
88
92
|
/*
|
|
89
93
|
* If no minimumFontSize is provided, create one using
|
|
90
94
|
* the given font size multiplied by the min font size scale factor.
|
|
91
95
|
*/
|
|
92
|
-
|
|
93
|
-
|
|
94
96
|
if (!minimumFontSize) {
|
|
95
97
|
const fontSizeValueInPx = fontSizeParsed.unit === 'px' ? fontSizeParsed.value : fontSizeParsed.value * 16;
|
|
98
|
+
|
|
96
99
|
/*
|
|
97
100
|
* The scale factor is a multiplier that affects how quickly the curve will move towards the minimum,
|
|
98
101
|
* that is, how quickly the size factor reaches 0 given increasing font size values.
|
|
99
102
|
* For a - b * log2(), lower values of b will make the curve move towards the minimum faster.
|
|
100
103
|
* The scale factor is constrained between min and max values.
|
|
101
104
|
*/
|
|
105
|
+
const minimumFontSizeFactor = Math.min(Math.max(1 - 0.075 * Math.log2(fontSizeValueInPx), DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MIN), DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MAX);
|
|
102
106
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
const calculatedMinimumFontSize = roundToPrecision(fontSizeParsed.value * minimumFontSizeFactor, 3); // Only use calculated min font size if it's > $minimum_font_size_limit value.
|
|
107
|
+
// Calculates the minimum font size.
|
|
108
|
+
const calculatedMinimumFontSize = roundToPrecision(fontSizeParsed.value * minimumFontSizeFactor, 3);
|
|
106
109
|
|
|
110
|
+
// Only use calculated min font size if it's > $minimum_font_size_limit value.
|
|
107
111
|
if (!!minimumFontSizeLimitParsed?.value && calculatedMinimumFontSize < minimumFontSizeLimitParsed?.value) {
|
|
108
112
|
minimumFontSize = `${minimumFontSizeLimitParsed.value}${minimumFontSizeLimitParsed.unit}`;
|
|
109
113
|
} else {
|
|
110
114
|
minimumFontSize = `${calculatedMinimumFontSize}${fontSizeParsed.unit}`;
|
|
111
115
|
}
|
|
112
116
|
}
|
|
113
|
-
}
|
|
117
|
+
}
|
|
114
118
|
|
|
119
|
+
// Grab the minimum font size and normalize it in order to use the value for calculations.
|
|
120
|
+
const minimumFontSizeParsed = getTypographyValueAndUnit(minimumFontSize);
|
|
115
121
|
|
|
116
|
-
|
|
122
|
+
// We get a 'preferred' unit to keep units consistent when calculating,
|
|
117
123
|
// otherwise the result will not be accurate.
|
|
124
|
+
const fontSizeUnit = minimumFontSizeParsed?.unit || 'rem';
|
|
118
125
|
|
|
119
|
-
|
|
120
|
-
|
|
126
|
+
// Grabs the maximum font size and normalize it in order to use the value for calculations.
|
|
121
127
|
const maximumFontSizeParsed = getTypographyValueAndUnit(maximumFontSize, {
|
|
122
128
|
coerceTo: fontSizeUnit
|
|
123
|
-
});
|
|
129
|
+
});
|
|
124
130
|
|
|
131
|
+
// Checks for mandatory min and max sizes, and protects against unsupported units.
|
|
125
132
|
if (!minimumFontSizeParsed || !maximumFontSizeParsed) {
|
|
126
133
|
return null;
|
|
127
|
-
}
|
|
128
|
-
|
|
134
|
+
}
|
|
129
135
|
|
|
136
|
+
// Uses rem for accessible fluid target font scaling.
|
|
130
137
|
const minimumFontSizeRem = getTypographyValueAndUnit(minimumFontSize, {
|
|
131
138
|
coerceTo: 'rem'
|
|
132
|
-
});
|
|
139
|
+
});
|
|
133
140
|
|
|
141
|
+
// Viewport widths defined for fluid typography. Normalize units
|
|
134
142
|
const maximumViewportWidthParsed = getTypographyValueAndUnit(maximumViewportWidth, {
|
|
135
143
|
coerceTo: fontSizeUnit
|
|
136
144
|
});
|
|
137
145
|
const minimumViewportWidthParsed = getTypographyValueAndUnit(minimumViewportWidth, {
|
|
138
146
|
coerceTo: fontSizeUnit
|
|
139
|
-
});
|
|
147
|
+
});
|
|
140
148
|
|
|
149
|
+
// Protect against unsupported units.
|
|
141
150
|
if (!maximumViewportWidthParsed || !minimumViewportWidthParsed || !minimumFontSizeRem) {
|
|
142
151
|
return null;
|
|
143
|
-
}
|
|
144
|
-
// Borrowed from https://websemantics.uk/tools/responsive-font-calculator/.
|
|
145
|
-
|
|
152
|
+
}
|
|
146
153
|
|
|
154
|
+
// Build CSS rule.
|
|
155
|
+
// Borrowed from https://websemantics.uk/tools/responsive-font-calculator/.
|
|
147
156
|
const minViewportWidthOffsetValue = roundToPrecision(minimumViewportWidthParsed.value / 100, 3);
|
|
148
157
|
const viewportWidthOffset = roundToPrecision(minViewportWidthOffsetValue, 3) + fontSizeUnit;
|
|
149
158
|
const linearFactor = 100 * ((maximumFontSizeParsed.value - minimumFontSizeParsed.value) / (maximumViewportWidthParsed.value - minimumViewportWidthParsed.value));
|
|
@@ -151,6 +160,7 @@ export function getComputedFluidTypographyValue({
|
|
|
151
160
|
const fluidTargetFontSize = `${minimumFontSizeRem.value}${minimumFontSizeRem.unit} + ((1vw - ${viewportWidthOffset}) * ${linearFactorScaled})`;
|
|
152
161
|
return `clamp(${minimumFontSize}, ${fluidTargetFontSize}, ${maximumFontSize})`;
|
|
153
162
|
}
|
|
163
|
+
|
|
154
164
|
/**
|
|
155
165
|
* Internal method that checks a string for a unit and value and returns an array consisting of `'value'` and `'unit'`, e.g., [ '42', 'rem' ].
|
|
156
166
|
* A raw font size of `value + unit` is expected. If the value is an integer, it will convert to `value + 'px'`.
|
|
@@ -160,17 +170,15 @@ export function getComputedFluidTypographyValue({
|
|
|
160
170
|
*
|
|
161
171
|
* @return {{ unit: string, value: number }|null} An object consisting of `'value'` and `'unit'` properties.
|
|
162
172
|
*/
|
|
163
|
-
|
|
164
173
|
export function getTypographyValueAndUnit(rawValue, options = {}) {
|
|
165
174
|
if (typeof rawValue !== 'string' && typeof rawValue !== 'number') {
|
|
166
175
|
return null;
|
|
167
|
-
}
|
|
168
|
-
|
|
176
|
+
}
|
|
169
177
|
|
|
178
|
+
// Converts numeric values to pixel values by default.
|
|
170
179
|
if (isFinite(rawValue)) {
|
|
171
180
|
rawValue = `${rawValue}px`;
|
|
172
181
|
}
|
|
173
|
-
|
|
174
182
|
const {
|
|
175
183
|
coerceTo,
|
|
176
184
|
rootSizeValue,
|
|
@@ -184,40 +192,37 @@ export function getTypographyValueAndUnit(rawValue, options = {}) {
|
|
|
184
192
|
};
|
|
185
193
|
const acceptableUnitsGroup = acceptableUnits?.join('|');
|
|
186
194
|
const regexUnits = new RegExp(`^(\\d*\\.?\\d+)(${acceptableUnitsGroup}){1,1}$`);
|
|
187
|
-
const matches = rawValue.match(regexUnits);
|
|
195
|
+
const matches = rawValue.match(regexUnits);
|
|
188
196
|
|
|
197
|
+
// We need a number value and a unit.
|
|
189
198
|
if (!matches || matches.length < 3) {
|
|
190
199
|
return null;
|
|
191
200
|
}
|
|
192
|
-
|
|
193
201
|
let [, value, unit] = matches;
|
|
194
202
|
let returnValue = parseFloat(value);
|
|
195
|
-
|
|
196
203
|
if ('px' === coerceTo && ('em' === unit || 'rem' === unit)) {
|
|
197
204
|
returnValue = returnValue * rootSizeValue;
|
|
198
205
|
unit = coerceTo;
|
|
199
206
|
}
|
|
200
|
-
|
|
201
207
|
if ('px' === unit && ('em' === coerceTo || 'rem' === coerceTo)) {
|
|
202
208
|
returnValue = returnValue / rootSizeValue;
|
|
203
209
|
unit = coerceTo;
|
|
204
210
|
}
|
|
211
|
+
|
|
205
212
|
/*
|
|
206
213
|
* No calculation is required if swapping between em and rem yet,
|
|
207
214
|
* since we assume a root size value. Later we might like to differentiate between
|
|
208
215
|
* :root font size (rem) and parent element font size (em) relativity.
|
|
209
216
|
*/
|
|
210
|
-
|
|
211
|
-
|
|
212
217
|
if (('em' === coerceTo || 'rem' === coerceTo) && ('em' === unit || 'rem' === unit)) {
|
|
213
218
|
unit = coerceTo;
|
|
214
219
|
}
|
|
215
|
-
|
|
216
220
|
return {
|
|
217
221
|
value: roundToPrecision(returnValue, 3),
|
|
218
222
|
unit
|
|
219
223
|
};
|
|
220
224
|
}
|
|
225
|
+
|
|
221
226
|
/**
|
|
222
227
|
* Returns a value rounded to defined precision.
|
|
223
228
|
* Returns `undefined` if the value is not a valid finite number.
|
|
@@ -227,7 +232,6 @@ export function getTypographyValueAndUnit(rawValue, options = {}) {
|
|
|
227
232
|
*
|
|
228
233
|
* @return {number|undefined} Value rounded to standard precision.
|
|
229
234
|
*/
|
|
230
|
-
|
|
231
235
|
export function roundToPrecision(value, digits = 3) {
|
|
232
236
|
const base = Math.pow(10, digits);
|
|
233
237
|
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":"AAAA;AACA;AACA;AACA;AACA;AAEA;AACA,MAAMA,8BAA8B,GAAG,QAAvC;AACA,MAAMC,8BAA8B,GAAG,OAAvC;AACA,MAAMC,oBAAoB,GAAG,CAA7B;AACA,MAAMC,oCAAoC,GAAG,IAA7C;AACA,MAAMC,oCAAoC,GAAG,IAA7C;AACA,MAAMC,+BAA+B,GAAG,MAAxC;AAEA;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;;AACA,OAAO,S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BAAgB,CAAEwB,WAAF,EAAe,CAAf,CADjB;AAENnC,IAAAA;AAFM,GAAP;AAIA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASW,gBAAT,CAA2BR,KAA3B,EAAkCkC,MAAM,GAAG,CAA3C,EAA+C;AACrD,QAAMC,IAAI,GAAGhC,IAAI,CAACiC,GAAL,CAAU,EAAV,EAAcF,MAAd,CAAb;AACA,SAAOG,MAAM,CAACf,QAAP,CAAiBtB,KAAjB,IACJiC,UAAU,CAAE9B,IAAI,CAACmC,KAAL,CAAYtC,KAAK,GAAGmC,IAApB,IAA6BA,IAA/B,CADN,GAEJI,SAFH;AAGA","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;AACA,OAAO,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,oBAAo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
4
3
|
* WordPress dependencies
|
|
5
4
|
*/
|
|
6
5
|
import { FontSizePicker as BaseFontSizePicker } from '@wordpress/components';
|
|
6
|
+
|
|
7
7
|
/**
|
|
8
8
|
* Internal dependencies
|
|
9
9
|
*/
|
|
10
|
-
|
|
11
10
|
import useSetting from '../use-setting';
|
|
12
|
-
|
|
13
11
|
function FontSizePicker(props) {
|
|
14
12
|
const fontSizes = useSetting('typography.fontSizes');
|
|
15
13
|
const disableCustomFontSizes = !useSetting('typography.customFontSize');
|
|
16
|
-
return createElement(BaseFontSizePicker, {
|
|
14
|
+
return createElement(BaseFontSizePicker, {
|
|
15
|
+
...props,
|
|
17
16
|
fontSizes: fontSizes,
|
|
18
17
|
disableCustomFontSizes: disableCustomFontSizes
|
|
19
18
|
});
|
|
20
19
|
}
|
|
20
|
+
|
|
21
21
|
/**
|
|
22
22
|
* @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/font-sizes/README.md
|
|
23
23
|
*/
|
|
24
|
-
|
|
25
|
-
|
|
26
24
|
export default FontSizePicker;
|
|
27
25
|
//# sourceMappingURL=font-size-picker.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["FontSizePicker","BaseFontSizePicker","useSetting","props","fontSizes","disableCustomFontSizes","createElement"],"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":";AAAA;AACA;AACA;AACA,SAASA,cAAc,IAAIC,kBAAkB,QAAQ,uBAAuB;;AAE5E;AACA;AACA;AACA,OAAOC,UAAU,MAAM,gBAAgB;AAEvC,SAASF,cAAcA,CAAEG,KAAK,EAAG;EAChC,MAAMC,SAAS,GAAGF,UAAU,CAAE,sBAAuB,CAAC;EACtD,MAAMG,sBAAsB,GAAG,CAAEH,UAAU,CAAE,2BAA4B,CAAC;EAE1E,OACCI,aAAA,CAACL,kBAAkB;IAAA,GACbE,KAAK;IACVC,SAAS,EAAGA,SAAW;IACvBC,sBAAsB,EAAGA;EAAwB,CACjD,CAAC;AAEJ;;AAEA;AACA;AACA;AACA,eAAeL,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["getFontSize","getFontSizeClass","getFontSizeObjectByValue","getComputedFluidTypographyValue","default","FontSizePicker","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,SACCA,WAAW,EACXC,gBAAgB,EAChBC,wBAAwB,QAClB,SAAS;AAChB,SAASC,+BAA+B,QAAQ,eAAe;AAC/D,SAASC,OAAO,IAAIC,cAAc,QAAQ,oBAAoB;AAC9D,SAASD,OAAO,IAAIE,aAAa,QAAQ,mBAAmB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["getFontSize","getFontSizeClass","getFontSizeObjectByValue","default","FontSizePicker","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,SACCA,WAAW,EACXC,gBAAgB,EAChBC,wBAAwB,QAClB,SAAS;AAChB,SAASC,OAAO,IAAIC,cAAc,QAAQ,oBAAoB;AAC9D,SAASD,OAAO,IAAIE,aAAa,QAAQ,mBAAmB"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Internal dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { kebabCase } from '../../utils/object';
|
|
5
|
+
|
|
5
6
|
/**
|
|
6
7
|
* Returns the font size object based on an array of named font sizes and the namedFontSize and customFontSize values.
|
|
7
8
|
* If namedFontSize is undefined or not found in fontSizes an object with just the size value based on customFontSize is returned.
|
|
@@ -13,22 +14,20 @@ import { kebabCase } from '../../utils/object';
|
|
|
13
14
|
* @return {?Object} If fontSizeAttribute is set and an equal slug is found in fontSizes it returns the font size object for that slug.
|
|
14
15
|
* Otherwise, an object with just the size value based on customFontSize is returned.
|
|
15
16
|
*/
|
|
16
|
-
|
|
17
17
|
export const getFontSize = (fontSizes, fontSizeAttribute, customFontSizeAttribute) => {
|
|
18
18
|
if (fontSizeAttribute) {
|
|
19
19
|
const fontSizeObject = fontSizes?.find(({
|
|
20
20
|
slug
|
|
21
21
|
}) => slug === fontSizeAttribute);
|
|
22
|
-
|
|
23
22
|
if (fontSizeObject) {
|
|
24
23
|
return fontSizeObject;
|
|
25
24
|
}
|
|
26
25
|
}
|
|
27
|
-
|
|
28
26
|
return {
|
|
29
27
|
size: customFontSizeAttribute
|
|
30
28
|
};
|
|
31
29
|
};
|
|
30
|
+
|
|
32
31
|
/**
|
|
33
32
|
* Returns the corresponding font size object for a given value.
|
|
34
33
|
*
|
|
@@ -37,20 +36,18 @@ export const getFontSize = (fontSizes, fontSizeAttribute, customFontSizeAttribut
|
|
|
37
36
|
*
|
|
38
37
|
* @return {Object} Font size object.
|
|
39
38
|
*/
|
|
40
|
-
|
|
41
39
|
export function getFontSizeObjectByValue(fontSizes, value) {
|
|
42
40
|
const fontSizeObject = fontSizes?.find(({
|
|
43
41
|
size
|
|
44
42
|
}) => size === value);
|
|
45
|
-
|
|
46
43
|
if (fontSizeObject) {
|
|
47
44
|
return fontSizeObject;
|
|
48
45
|
}
|
|
49
|
-
|
|
50
46
|
return {
|
|
51
47
|
size: value
|
|
52
48
|
};
|
|
53
49
|
}
|
|
50
|
+
|
|
54
51
|
/**
|
|
55
52
|
* Returns a class based on fontSizeName.
|
|
56
53
|
*
|
|
@@ -59,12 +56,10 @@ export function getFontSizeObjectByValue(fontSizes, value) {
|
|
|
59
56
|
* @return {string | undefined} String with the class corresponding to the fontSize passed.
|
|
60
57
|
* The class is generated by appending 'has-' followed by fontSizeSlug in kebabCase and ending with '-font-size'.
|
|
61
58
|
*/
|
|
62
|
-
|
|
63
59
|
export function getFontSizeClass(fontSizeSlug) {
|
|
64
60
|
if (!fontSizeSlug) {
|
|
65
61
|
return;
|
|
66
62
|
}
|
|
67
|
-
|
|
68
63
|
return `has-${kebabCase(fontSizeSlug)}-font-size`;
|
|
69
64
|
}
|
|
70
65
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["kebabCase","getFontSize","fontSizes","fontSizeAttribute","customFontSizeAttribute","fontSizeObject","find","slug","size","getFontSizeObjectByValue","value","getFontSizeClass","fontSizeSlug"],"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":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,oBAAoB;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,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;AACA,OAAO,SAASK,wBAAwBA,CAAEP,SAAS,EAAEQ,KAAK,EAAG;EAC5D,MAAML,cAAc,GAAGH,SAAS,EAAEI,IAAI,CAAE,CAAE;IAAEE;EAAK,CAAC,KAAMA,IAAI,KAAKE,KAAM,CAAC;EACxE,IAAKL,cAAc,EAAG;IACrB,OAAOA,cAAc;EACtB;EAEA,OAAO;IACNG,IAAI,EAAEE;EACP,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,gBAAgBA,CAAEC,YAAY,EAAG;EAChD,IAAK,CAAEA,YAAY,EAAG;IACrB;EACD;EAEA,OAAQ,OAAOZ,SAAS,CAAEY,YAAa,CAAG,YAAW;AACtD"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { createElement } from "@wordpress/element";
|
|
2
|
-
|
|
3
2
|
/**
|
|
4
3
|
* WordPress dependencies
|
|
5
4
|
*/
|
|
6
5
|
import { createHigherOrderComponent, compose } from '@wordpress/compose';
|
|
7
6
|
import { Component } from '@wordpress/element';
|
|
7
|
+
|
|
8
8
|
/**
|
|
9
9
|
* Internal dependencies
|
|
10
10
|
*/
|
|
11
|
-
|
|
12
11
|
import { getFontSize, getFontSizeClass } from './utils';
|
|
13
12
|
import useSetting from '../use-setting';
|
|
14
13
|
const DEFAULT_FONT_SIZES = [];
|
|
14
|
+
|
|
15
15
|
/**
|
|
16
16
|
* Capitalizes the first letter in a string.
|
|
17
17
|
*
|
|
@@ -19,8 +19,8 @@ const DEFAULT_FONT_SIZES = [];
|
|
|
19
19
|
*
|
|
20
20
|
* @return {string} Capitalized string.
|
|
21
21
|
*/
|
|
22
|
-
|
|
23
22
|
const upperFirst = ([firstLetter, ...rest]) => firstLetter.toUpperCase() + rest.join('');
|
|
23
|
+
|
|
24
24
|
/**
|
|
25
25
|
* Higher-order component, which handles font size logic for class generation,
|
|
26
26
|
* font size value retrieval, and font size change handling.
|
|
@@ -31,8 +31,6 @@ const upperFirst = ([firstLetter, ...rest]) => firstLetter.toUpperCase() + rest.
|
|
|
31
31
|
*
|
|
32
32
|
* @return {Function} Higher-order component.
|
|
33
33
|
*/
|
|
34
|
-
|
|
35
|
-
|
|
36
34
|
export default ((...fontSizeNames) => {
|
|
37
35
|
/*
|
|
38
36
|
* Computes an object whose key is the font size attribute name as passed in the array,
|
|
@@ -45,7 +43,8 @@ export default ((...fontSizeNames) => {
|
|
|
45
43
|
}, {});
|
|
46
44
|
return createHigherOrderComponent(compose([createHigherOrderComponent(WrappedComponent => props => {
|
|
47
45
|
const fontSizes = useSetting('typography.fontSizes') || DEFAULT_FONT_SIZES;
|
|
48
|
-
return createElement(WrappedComponent, {
|
|
46
|
+
return createElement(WrappedComponent, {
|
|
47
|
+
...props,
|
|
49
48
|
fontSizes: fontSizes
|
|
50
49
|
});
|
|
51
50
|
}, 'withFontSizes'), WrappedComponent => {
|
|
@@ -55,7 +54,6 @@ export default ((...fontSizeNames) => {
|
|
|
55
54
|
this.setters = this.createSetters();
|
|
56
55
|
this.state = {};
|
|
57
56
|
}
|
|
58
|
-
|
|
59
57
|
createSetters() {
|
|
60
58
|
return Object.entries(fontSizeAttributeNames).reduce((settersAccumulator, [fontSizeAttributeName, customFontSizeAttributeName]) => {
|
|
61
59
|
const upperFirstFontSizeAttributeName = upperFirst(fontSizeAttributeName);
|
|
@@ -63,7 +61,6 @@ export default ((...fontSizeNames) => {
|
|
|
63
61
|
return settersAccumulator;
|
|
64
62
|
}, {});
|
|
65
63
|
}
|
|
66
|
-
|
|
67
64
|
createSetFontSize(fontSizeAttributeName, customFontSizeAttributeName) {
|
|
68
65
|
return fontSizeValue => {
|
|
69
66
|
const fontSizeObject = this.props.fontSizes?.find(({
|
|
@@ -75,7 +72,6 @@ export default ((...fontSizeNames) => {
|
|
|
75
72
|
});
|
|
76
73
|
};
|
|
77
74
|
}
|
|
78
|
-
|
|
79
75
|
static getDerivedStateFromProps({
|
|
80
76
|
attributes,
|
|
81
77
|
fontSizes
|
|
@@ -85,41 +81,38 @@ export default ((...fontSizeNames) => {
|
|
|
85
81
|
// If new font size is name compare with the previous slug.
|
|
86
82
|
if (attributes[fontSizeAttributeName]) {
|
|
87
83
|
return attributes[fontSizeAttributeName] !== previousState[fontSizeAttributeName].slug;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
|
|
84
|
+
}
|
|
85
|
+
// If font size is not named, update when the font size value changes.
|
|
91
86
|
return previousState[fontSizeAttributeName].size !== attributes[customFontSizeAttributeName];
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
|
|
87
|
+
}
|
|
88
|
+
// In this case we need to build the font size object.
|
|
95
89
|
return true;
|
|
96
90
|
};
|
|
97
|
-
|
|
98
91
|
if (!Object.values(fontSizeAttributeNames).some(didAttributesChange)) {
|
|
99
92
|
return null;
|
|
100
93
|
}
|
|
101
|
-
|
|
102
94
|
const newState = Object.entries(fontSizeAttributeNames).filter(([key, value]) => didAttributesChange(value, key)).reduce((newStateAccumulator, [fontSizeAttributeName, customFontSizeAttributeName]) => {
|
|
103
95
|
const fontSizeAttributeValue = attributes[fontSizeAttributeName];
|
|
104
96
|
const fontSizeObject = getFontSize(fontSizes, fontSizeAttributeValue, attributes[customFontSizeAttributeName]);
|
|
105
|
-
newStateAccumulator[fontSizeAttributeName] = {
|
|
97
|
+
newStateAccumulator[fontSizeAttributeName] = {
|
|
98
|
+
...fontSizeObject,
|
|
106
99
|
class: getFontSizeClass(fontSizeAttributeValue)
|
|
107
100
|
};
|
|
108
101
|
return newStateAccumulator;
|
|
109
102
|
}, {});
|
|
110
|
-
return {
|
|
103
|
+
return {
|
|
104
|
+
...previousState,
|
|
111
105
|
...newState
|
|
112
106
|
};
|
|
113
107
|
}
|
|
114
|
-
|
|
115
108
|
render() {
|
|
116
|
-
return createElement(WrappedComponent, {
|
|
109
|
+
return createElement(WrappedComponent, {
|
|
110
|
+
...this.props,
|
|
117
111
|
fontSizes: undefined,
|
|
118
112
|
...this.state,
|
|
119
113
|
...this.setters
|
|
120
114
|
});
|
|
121
115
|
}
|
|
122
|
-
|
|
123
116
|
};
|
|
124
117
|
}]), 'withFontSizes');
|
|
125
118
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-editor/src/components/font-sizes/with-font-sizes.js"],"names":["createHigherOrderComponent","compose","Component","getFontSize","getFontSizeClass","useSetting","DEFAULT_FONT_SIZES","upperFirst","firstLetter","rest","toUpperCase","join","fontSizeNames","fontSizeAttributeNames","reduce","fontSizeAttributeNamesAccumulator","fontSizeAttributeName","WrappedComponent","props","fontSizes","constructor","setters","createSetters","state","Object","entries","settersAccumulator","customFontSizeAttributeName","upperFirstFontSizeAttributeName","createSetFontSize","fontSizeValue","fontSizeObject","find","size","Number","setAttributes","slug","undefined","getDerivedStateFromProps","attributes","previousState","didAttributesChange","values","some","newState","filter","key","value","newStateAccumulator","fontSizeAttributeValue","class","render"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,0BAAT,EAAqCC,OAArC,QAAoD,oBAApD;AACA,SAASC,SAAT,QAA0B,oBAA1B;AAEA;AACA;AACA;;AACA,SAASC,WAAT,EAAsBC,gBAAtB,QAA8C,SAA9C;AACA,OAAOC,UAAP,MAAuB,gBAAvB;AAEA,MAAMC,kBAAkB,GAAG,EAA3B;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,MAAMC,UAAU,GAAG,CAAE,CAAEC,WAAF,EAAe,GAAGC,IAAlB,CAAF,KAClBD,WAAW,CAACE,WAAZ,KAA4BD,IAAI,CAACE,IAAL,CAAW,EAAX,CAD7B;AAGA;AACA;AACA;AACA;AACA;AACA;A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T,CAJJ,EAMfhC,MANe,CAOf,CACCkC,mBADD,EAEC,CACChC,qBADD,EAECW,2BAFD,CAFD,KAMK;AACJ,gBAAMsB,sBAAsB,GAC3BV,UAAU,CAAEvB,qBAAF,CADX;AAEA,gBAAMe,cAAc,GAAG5B,WAAW,CACjCgB,SADiC,EAEjC8B,sBAFiC,EAGjCV,UAAU,CACTZ,2BADS,CAHuB,CAAlC;AAOAqB,UAAAA,mBAAmB,CAClBhC,qBADkB,CAAnB,GAEI,EACH,GAAGe,cADA;AAEHmB,YAAAA,KAAK,EAAE9C,gBAAgB,CACtB6C,sBADsB;AAFpB,WAFJ;AAQA,iBAAOD,mBAAP;AACA,SAhCc,EAiCf,EAjCe,CAAjB;AAoCA,eAAO,EACN,GAAGR,aADG;AAEN,aAAGI;AAFG,SAAP;AAIA;;AAEDO,MAAAA,MAAM,GAAG;AACR,eACC,cAAC,gBAAD,IAEE,GAAG,KAAKjC,KAFV;AAGEC,UAAAA,SAAS,EAAEkB,SAHb;AAIE,aAAG,KAAKd,KAJV;AAKE,aAAG,KAAKF;AALV,UADD;AAUA;;AA9I6B,KAA/B;AAgJA,GAhKO,CAAF,CADyB,EAmKhC,eAnKgC,CAAjC;AAqKA,CArLD","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createHigherOrderComponent, compose } from '@wordpress/compose';\nimport { Component } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { getFontSize, getFontSizeClass } from './utils';\nimport useSetting from '../use-setting';\n\nconst DEFAULT_FONT_SIZES = [];\n\n/**\n * Capitalizes the first letter in a string.\n *\n * @param {string} str The string whose first letter the function will capitalize.\n *\n * @return {string} Capitalized string.\n */\nconst upperFirst = ( [ firstLetter, ...rest ] ) =>\n\tfirstLetter.toUpperCase() + rest.join( '' );\n\n/**\n * Higher-order component, which handles font size logic for class generation,\n * font size value retrieval, and font size change handling.\n *\n * @param {...(Object|string)} fontSizeNames The arguments should all be strings.\n * Each string contains the font size\n * attribute name e.g: 'fontSize'.\n *\n * @return {Function} Higher-order component.\n */\nexport default ( ...fontSizeNames ) => {\n\t/*\n\t * Computes an object whose key is the font size attribute name as passed in the array,\n\t * and the value is the custom font size attribute name.\n\t * Custom font size is automatically compted by appending custom followed by the font size attribute name in with the first letter capitalized.\n\t */\n\tconst fontSizeAttributeNames = fontSizeNames.reduce(\n\t\t( fontSizeAttributeNamesAccumulator, fontSizeAttributeName ) => {\n\t\t\tfontSizeAttributeNamesAccumulator[\n\t\t\t\tfontSizeAttributeName\n\t\t\t] = `custom${ upperFirst( fontSizeAttributeName ) }`;\n\t\t\treturn fontSizeAttributeNamesAccumulator;\n\t\t},\n\t\t{}\n\t);\n\n\treturn createHigherOrderComponent(\n\t\tcompose( [\n\t\t\tcreateHigherOrderComponent(\n\t\t\t\t( WrappedComponent ) => ( props ) => {\n\t\t\t\t\tconst fontSizes =\n\t\t\t\t\t\tuseSetting( 'typography.fontSizes' ) ||\n\t\t\t\t\t\tDEFAULT_FONT_SIZES;\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<WrappedComponent\n\t\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t\t\tfontSizes={ fontSizes }\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t\t'withFontSizes'\n\t\t\t),\n\t\t\t( WrappedComponent ) => {\n\t\t\t\treturn class extends Component {\n\t\t\t\t\tconstructor( props ) {\n\t\t\t\t\t\tsuper( props );\n\n\t\t\t\t\t\tthis.setters = this.createSetters();\n\n\t\t\t\t\t\tthis.state = {};\n\t\t\t\t\t}\n\n\t\t\t\t\tcreateSetters() {\n\t\t\t\t\t\treturn Object.entries( fontSizeAttributeNames ).reduce(\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\tsettersAccumulator,\n\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\tfontSizeAttributeName,\n\t\t\t\t\t\t\t\t\tcustomFontSizeAttributeName,\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t) => {\n\t\t\t\t\t\t\t\tconst upperFirstFontSizeAttributeName =\n\t\t\t\t\t\t\t\t\tupperFirst( fontSizeAttributeName );\n\t\t\t\t\t\t\t\tsettersAccumulator[\n\t\t\t\t\t\t\t\t\t`set${ upperFirstFontSizeAttributeName }`\n\t\t\t\t\t\t\t\t] = this.createSetFontSize(\n\t\t\t\t\t\t\t\t\tfontSizeAttributeName,\n\t\t\t\t\t\t\t\t\tcustomFontSizeAttributeName\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\treturn settersAccumulator;\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{}\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\tcreateSetFontSize(\n\t\t\t\t\t\tfontSizeAttributeName,\n\t\t\t\t\t\tcustomFontSizeAttributeName\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn ( fontSizeValue ) => {\n\t\t\t\t\t\t\tconst fontSizeObject = this.props.fontSizes?.find(\n\t\t\t\t\t\t\t\t( { size } ) => size === Number( fontSizeValue )\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tthis.props.setAttributes( {\n\t\t\t\t\t\t\t\t[ fontSizeAttributeName ]:\n\t\t\t\t\t\t\t\t\tfontSizeObject && fontSizeObject.slug\n\t\t\t\t\t\t\t\t\t\t? fontSizeObject.slug\n\t\t\t\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\t\t\t\t[ customFontSizeAttributeName ]:\n\t\t\t\t\t\t\t\t\tfontSizeObject && fontSizeObject.slug\n\t\t\t\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t\t\t\t: fontSizeValue,\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\tstatic getDerivedStateFromProps(\n\t\t\t\t\t\t{ attributes, fontSizes },\n\t\t\t\t\t\tpreviousState\n\t\t\t\t\t) {\n\t\t\t\t\t\tconst didAttributesChange = (\n\t\t\t\t\t\t\tcustomFontSizeAttributeName,\n\t\t\t\t\t\t\tfontSizeAttributeName\n\t\t\t\t\t\t) => {\n\t\t\t\t\t\t\tif ( previousState[ fontSizeAttributeName ] ) {\n\t\t\t\t\t\t\t\t// If new font size is name compare with the previous slug.\n\t\t\t\t\t\t\t\tif ( attributes[ fontSizeAttributeName ] ) {\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\tattributes[ fontSizeAttributeName ] !==\n\t\t\t\t\t\t\t\t\t\tpreviousState[ fontSizeAttributeName ]\n\t\t\t\t\t\t\t\t\t\t\t.slug\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// If font size is not named, update when the font size value changes.\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\tpreviousState[ fontSizeAttributeName ]\n\t\t\t\t\t\t\t\t\t\t.size !==\n\t\t\t\t\t\t\t\t\tattributes[ customFontSizeAttributeName ]\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// In this case we need to build the font size object.\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t! Object.values( fontSizeAttributeNames ).some(\n\t\t\t\t\t\t\t\tdidAttributesChange\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst newState = Object.entries(\n\t\t\t\t\t\t\tfontSizeAttributeNames\n\t\t\t\t\t\t)\n\t\t\t\t\t\t\t.filter( ( [ key, value ] ) =>\n\t\t\t\t\t\t\t\tdidAttributesChange( value, key )\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t.reduce(\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\tnewStateAccumulator,\n\t\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t\tfontSizeAttributeName,\n\t\t\t\t\t\t\t\t\t\tcustomFontSizeAttributeName,\n\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t) => {\n\t\t\t\t\t\t\t\t\tconst fontSizeAttributeValue =\n\t\t\t\t\t\t\t\t\t\tattributes[ fontSizeAttributeName ];\n\t\t\t\t\t\t\t\t\tconst fontSizeObject = getFontSize(\n\t\t\t\t\t\t\t\t\t\tfontSizes,\n\t\t\t\t\t\t\t\t\t\tfontSizeAttributeValue,\n\t\t\t\t\t\t\t\t\t\tattributes[\n\t\t\t\t\t\t\t\t\t\t\tcustomFontSizeAttributeName\n\t\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tnewStateAccumulator[\n\t\t\t\t\t\t\t\t\t\tfontSizeAttributeName\n\t\t\t\t\t\t\t\t\t] = {\n\t\t\t\t\t\t\t\t\t\t...fontSizeObject,\n\t\t\t\t\t\t\t\t\t\tclass: getFontSizeClass(\n\t\t\t\t\t\t\t\t\t\t\tfontSizeAttributeValue\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\treturn newStateAccumulator;\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{}\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t...previousState,\n\t\t\t\t\t\t\t...newState,\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\trender() {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<WrappedComponent\n\t\t\t\t\t\t\t\t{ ...{\n\t\t\t\t\t\t\t\t\t...this.props,\n\t\t\t\t\t\t\t\t\tfontSizes: undefined,\n\t\t\t\t\t\t\t\t\t...this.state,\n\t\t\t\t\t\t\t\t\t...this.setters,\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t},\n\t\t] ),\n\t\t'withFontSizes'\n\t);\n};\n"]}
|
|
1
|
+
{"version":3,"names":["createHigherOrderComponent","compose","Component","getFontSize","getFontSizeClass","useSetting","DEFAULT_FONT_SIZES","upperFirst","firstLetter","rest","toUpperCase","join","fontSizeNames","fontSizeAttributeNames","reduce","fontSizeAttributeNamesAccumulator","fontSizeAttributeName","WrappedComponent","props","fontSizes","createElement","constructor","setters","createSetters","state","Object","entries","settersAccumulator","customFontSizeAttributeName","upperFirstFontSizeAttributeName","createSetFontSize","fontSizeValue","fontSizeObject","find","size","Number","setAttributes","slug","undefined","getDerivedStateFromProps","attributes","previousState","didAttributesChange","values","some","newState","filter","key","value","newStateAccumulator","fontSizeAttributeValue","class","render"],"sources":["@wordpress/block-editor/src/components/font-sizes/with-font-sizes.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createHigherOrderComponent, compose } from '@wordpress/compose';\nimport { Component } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { getFontSize, getFontSizeClass } from './utils';\nimport useSetting from '../use-setting';\n\nconst DEFAULT_FONT_SIZES = [];\n\n/**\n * Capitalizes the first letter in a string.\n *\n * @param {string} str The string whose first letter the function will capitalize.\n *\n * @return {string} Capitalized string.\n */\nconst upperFirst = ( [ firstLetter, ...rest ] ) =>\n\tfirstLetter.toUpperCase() + rest.join( '' );\n\n/**\n * Higher-order component, which handles font size logic for class generation,\n * font size value retrieval, and font size change handling.\n *\n * @param {...(Object|string)} fontSizeNames The arguments should all be strings.\n * Each string contains the font size\n * attribute name e.g: 'fontSize'.\n *\n * @return {Function} Higher-order component.\n */\nexport default ( ...fontSizeNames ) => {\n\t/*\n\t * Computes an object whose key is the font size attribute name as passed in the array,\n\t * and the value is the custom font size attribute name.\n\t * Custom font size is automatically compted by appending custom followed by the font size attribute name in with the first letter capitalized.\n\t */\n\tconst fontSizeAttributeNames = fontSizeNames.reduce(\n\t\t( fontSizeAttributeNamesAccumulator, fontSizeAttributeName ) => {\n\t\t\tfontSizeAttributeNamesAccumulator[\n\t\t\t\tfontSizeAttributeName\n\t\t\t] = `custom${ upperFirst( fontSizeAttributeName ) }`;\n\t\t\treturn fontSizeAttributeNamesAccumulator;\n\t\t},\n\t\t{}\n\t);\n\n\treturn createHigherOrderComponent(\n\t\tcompose( [\n\t\t\tcreateHigherOrderComponent(\n\t\t\t\t( WrappedComponent ) => ( props ) => {\n\t\t\t\t\tconst fontSizes =\n\t\t\t\t\t\tuseSetting( 'typography.fontSizes' ) ||\n\t\t\t\t\t\tDEFAULT_FONT_SIZES;\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<WrappedComponent\n\t\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t\t\tfontSizes={ fontSizes }\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t\t'withFontSizes'\n\t\t\t),\n\t\t\t( WrappedComponent ) => {\n\t\t\t\treturn class extends Component {\n\t\t\t\t\tconstructor( props ) {\n\t\t\t\t\t\tsuper( props );\n\n\t\t\t\t\t\tthis.setters = this.createSetters();\n\n\t\t\t\t\t\tthis.state = {};\n\t\t\t\t\t}\n\n\t\t\t\t\tcreateSetters() {\n\t\t\t\t\t\treturn Object.entries( fontSizeAttributeNames ).reduce(\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\tsettersAccumulator,\n\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\tfontSizeAttributeName,\n\t\t\t\t\t\t\t\t\tcustomFontSizeAttributeName,\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t) => {\n\t\t\t\t\t\t\t\tconst upperFirstFontSizeAttributeName =\n\t\t\t\t\t\t\t\t\tupperFirst( fontSizeAttributeName );\n\t\t\t\t\t\t\t\tsettersAccumulator[\n\t\t\t\t\t\t\t\t\t`set${ upperFirstFontSizeAttributeName }`\n\t\t\t\t\t\t\t\t] = this.createSetFontSize(\n\t\t\t\t\t\t\t\t\tfontSizeAttributeName,\n\t\t\t\t\t\t\t\t\tcustomFontSizeAttributeName\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\treturn settersAccumulator;\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{}\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\tcreateSetFontSize(\n\t\t\t\t\t\tfontSizeAttributeName,\n\t\t\t\t\t\tcustomFontSizeAttributeName\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn ( fontSizeValue ) => {\n\t\t\t\t\t\t\tconst fontSizeObject = this.props.fontSizes?.find(\n\t\t\t\t\t\t\t\t( { size } ) => size === Number( fontSizeValue )\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tthis.props.setAttributes( {\n\t\t\t\t\t\t\t\t[ fontSizeAttributeName ]:\n\t\t\t\t\t\t\t\t\tfontSizeObject && fontSizeObject.slug\n\t\t\t\t\t\t\t\t\t\t? fontSizeObject.slug\n\t\t\t\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\t\t\t\t[ customFontSizeAttributeName ]:\n\t\t\t\t\t\t\t\t\tfontSizeObject && fontSizeObject.slug\n\t\t\t\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t\t\t\t: fontSizeValue,\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\tstatic getDerivedStateFromProps(\n\t\t\t\t\t\t{ attributes, fontSizes },\n\t\t\t\t\t\tpreviousState\n\t\t\t\t\t) {\n\t\t\t\t\t\tconst didAttributesChange = (\n\t\t\t\t\t\t\tcustomFontSizeAttributeName,\n\t\t\t\t\t\t\tfontSizeAttributeName\n\t\t\t\t\t\t) => {\n\t\t\t\t\t\t\tif ( previousState[ fontSizeAttributeName ] ) {\n\t\t\t\t\t\t\t\t// If new font size is name compare with the previous slug.\n\t\t\t\t\t\t\t\tif ( attributes[ fontSizeAttributeName ] ) {\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\tattributes[ fontSizeAttributeName ] !==\n\t\t\t\t\t\t\t\t\t\tpreviousState[ fontSizeAttributeName ]\n\t\t\t\t\t\t\t\t\t\t\t.slug\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// If font size is not named, update when the font size value changes.\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\tpreviousState[ fontSizeAttributeName ]\n\t\t\t\t\t\t\t\t\t\t.size !==\n\t\t\t\t\t\t\t\t\tattributes[ customFontSizeAttributeName ]\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// In this case we need to build the font size object.\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t! Object.values( fontSizeAttributeNames ).some(\n\t\t\t\t\t\t\t\tdidAttributesChange\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst newState = Object.entries(\n\t\t\t\t\t\t\tfontSizeAttributeNames\n\t\t\t\t\t\t)\n\t\t\t\t\t\t\t.filter( ( [ key, value ] ) =>\n\t\t\t\t\t\t\t\tdidAttributesChange( value, key )\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t.reduce(\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\tnewStateAccumulator,\n\t\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t\tfontSizeAttributeName,\n\t\t\t\t\t\t\t\t\t\tcustomFontSizeAttributeName,\n\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t) => {\n\t\t\t\t\t\t\t\t\tconst fontSizeAttributeValue =\n\t\t\t\t\t\t\t\t\t\tattributes[ fontSizeAttributeName ];\n\t\t\t\t\t\t\t\t\tconst fontSizeObject = getFontSize(\n\t\t\t\t\t\t\t\t\t\tfontSizes,\n\t\t\t\t\t\t\t\t\t\tfontSizeAttributeValue,\n\t\t\t\t\t\t\t\t\t\tattributes[\n\t\t\t\t\t\t\t\t\t\t\tcustomFontSizeAttributeName\n\t\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tnewStateAccumulator[\n\t\t\t\t\t\t\t\t\t\tfontSizeAttributeName\n\t\t\t\t\t\t\t\t\t] = {\n\t\t\t\t\t\t\t\t\t\t...fontSizeObject,\n\t\t\t\t\t\t\t\t\t\tclass: getFontSizeClass(\n\t\t\t\t\t\t\t\t\t\t\tfontSizeAttributeValue\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\treturn newStateAccumulator;\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{}\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t...previousState,\n\t\t\t\t\t\t\t...newState,\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\trender() {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<WrappedComponent\n\t\t\t\t\t\t\t\t{ ...{\n\t\t\t\t\t\t\t\t\t...this.props,\n\t\t\t\t\t\t\t\t\tfontSizes: undefined,\n\t\t\t\t\t\t\t\t\t...this.state,\n\t\t\t\t\t\t\t\t\t...this.setters,\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t},\n\t\t] ),\n\t\t'withFontSizes'\n\t);\n};\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,0BAA0B,EAAEC,OAAO,QAAQ,oBAAoB;AACxE,SAASC,SAAS,QAAQ,oBAAoB;;AAE9C;AACA;AACA;AACA,SAASC,WAAW,EAAEC,gBAAgB,QAAQ,SAAS;AACvD,OAAOC,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