@wordpress/block-editor 12.2.0 → 12.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/build/autocompleters/block.js +1 -3
- package/build/autocompleters/block.js.map +1 -1
- package/build/components/alignment-control/ui.js +9 -11
- package/build/components/alignment-control/ui.js.map +1 -1
- package/build/components/autocomplete/index.js +3 -4
- package/build/components/autocomplete/index.js.map +1 -1
- package/build/components/block-actions/index.js +8 -12
- package/build/components/block-actions/index.js.map +1 -1
- package/build/components/block-alignment-control/ui.js +17 -21
- package/build/components/block-alignment-control/ui.js.map +1 -1
- package/build/components/block-alignment-control/ui.native.js +14 -17
- package/build/components/block-alignment-control/ui.native.js.map +1 -1
- package/build/components/block-alignment-control/use-available-alignments.js +5 -10
- package/build/components/block-alignment-control/use-available-alignments.js.map +1 -1
- package/build/components/block-alignment-matrix-control/index.js +4 -6
- package/build/components/block-alignment-matrix-control/index.js.map +1 -1
- package/build/components/block-breadcrumb/index.js +3 -4
- package/build/components/block-breadcrumb/index.js.map +1 -1
- package/build/components/block-caption/index.native.js +30 -35
- package/build/components/block-caption/index.native.js.map +1 -1
- package/build/components/block-card/index.js +7 -9
- package/build/components/block-card/index.js.map +1 -1
- package/build/components/block-compare/block-view.js +8 -9
- package/build/components/block-compare/block-view.js.map +1 -1
- package/build/components/block-compare/index.js +7 -9
- package/build/components/block-compare/index.js.map +1 -1
- package/build/components/block-context/index.js +4 -5
- package/build/components/block-context/index.js.map +1 -1
- package/build/components/block-controls/fill.js +15 -22
- package/build/components/block-controls/fill.js.map +1 -1
- package/build/components/block-controls/hook.js +1 -3
- package/build/components/block-controls/hook.js.map +1 -1
- package/build/components/block-controls/slot.js +28 -18
- package/build/components/block-controls/slot.js.map +1 -1
- package/build/components/block-controls/slot.native.js +7 -17
- package/build/components/block-controls/slot.native.js.map +1 -1
- package/build/components/block-draggable/draggable-chip.js +5 -6
- package/build/components/block-draggable/draggable-chip.js.map +1 -1
- package/build/components/block-draggable/draggable-chip.native.js +3 -4
- package/build/components/block-draggable/draggable-chip.native.js.map +1 -1
- package/build/components/block-draggable/dropping-insertion-point.native.js +6 -7
- package/build/components/block-draggable/dropping-insertion-point.native.js.map +1 -1
- package/build/components/block-draggable/index.js +15 -16
- package/build/components/block-draggable/index.js.map +1 -1
- package/build/components/block-draggable/index.native.js +43 -58
- package/build/components/block-draggable/index.native.js.map +1 -1
- package/build/components/block-edit/edit.js +1 -4
- package/build/components/block-edit/edit.js.map +1 -1
- package/build/components/block-edit/edit.native.js +1 -4
- package/build/components/block-edit/edit.native.js.map +1 -1
- package/build/components/block-edit-visually-button/index.js +3 -4
- package/build/components/block-edit-visually-button/index.js.map +1 -1
- package/build/components/block-full-height-alignment-control/index.js +6 -7
- package/build/components/block-full-height-alignment-control/index.js.map +1 -1
- package/build/components/block-icon/index.js +7 -11
- package/build/components/block-icon/index.js.map +1 -1
- package/build/components/block-icon/index.native.js +9 -13
- package/build/components/block-icon/index.native.js.map +1 -1
- package/build/components/block-inspector/index.js +36 -46
- package/build/components/block-inspector/index.js.map +1 -1
- package/build/components/block-inspector/useBlockInspectorAnimationSettings.js +2 -2
- package/build/components/block-inspector/useBlockInspectorAnimationSettings.js.map +1 -1
- package/build/components/block-list/block-html.js +3 -4
- package/build/components/block-list/block-html.js.map +1 -1
- package/build/components/block-list/block-invalid-warning.js +3 -4
- package/build/components/block-list/block-invalid-warning.js.map +1 -1
- package/build/components/block-list/block-invalid-warning.native.js +10 -15
- package/build/components/block-list/block-invalid-warning.native.js.map +1 -1
- package/build/components/block-list/block-list-context.native.js +5 -11
- package/build/components/block-list/block-list-context.native.js.map +1 -1
- package/build/components/block-list/block-list-item-cell.native.js +5 -6
- package/build/components/block-list/block-list-item-cell.native.js.map +1 -1
- package/build/components/block-list/block-list-item.native.js +17 -18
- package/build/components/block-list/block-list-item.native.js.map +1 -1
- package/build/components/block-list/block-outline.native.js +8 -9
- package/build/components/block-list/block-outline.native.js.map +1 -1
- package/build/components/block-list/block-selection-button.native.js +10 -12
- package/build/components/block-list/block-selection-button.native.js.map +1 -1
- package/build/components/block-list/block.js +39 -46
- package/build/components/block-list/block.js.map +1 -1
- package/build/components/block-list/block.native.js +55 -68
- package/build/components/block-list/block.native.js.map +1 -1
- package/build/components/block-list/index.js +12 -15
- package/build/components/block-list/index.js.map +1 -1
- package/build/components/block-list/index.native.js +77 -86
- package/build/components/block-list/index.native.js.map +1 -1
- package/build/components/block-list/insertion-point.native.js +4 -5
- package/build/components/block-list/insertion-point.native.js.map +1 -1
- package/build/components/block-list/layout.js +6 -9
- package/build/components/block-list/layout.js.map +1 -1
- package/build/components/block-list/subdirectory-icon.js +10 -13
- package/build/components/block-list/subdirectory-icon.js.map +1 -1
- package/build/components/block-list/use-block-props/index.js +15 -11
- package/build/components/block-list/use-block-props/index.js.map +1 -1
- package/build/components/block-list/use-block-props/index.native.js +1 -2
- package/build/components/block-list/use-block-props/index.native.js.map +1 -1
- package/build/components/block-list/use-block-props/use-block-custom-class-name.js +2 -2
- 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 +1 -1
- package/build/components/block-list/use-block-props/use-block-default-class-name.js.map +1 -1
- package/build/components/block-list/use-in-between-inserter.js +1 -3
- package/build/components/block-list/use-in-between-inserter.js.map +1 -1
- package/build/components/block-list-appender/index.js +16 -15
- package/build/components/block-list-appender/index.js.map +1 -1
- package/build/components/block-list-appender/index.native.js +9 -11
- package/build/components/block-list-appender/index.native.js.map +1 -1
- package/build/components/block-lock/menu-item.js +3 -4
- package/build/components/block-lock/menu-item.js.map +1 -1
- package/build/components/block-lock/modal.js +6 -9
- package/build/components/block-lock/modal.js.map +1 -1
- package/build/components/block-lock/toolbar.js +4 -10
- package/build/components/block-lock/toolbar.js.map +1 -1
- package/build/components/block-mobile-toolbar/block-actions-menu.native.js +49 -67
- package/build/components/block-mobile-toolbar/block-actions-menu.native.js.map +1 -1
- package/build/components/block-mobile-toolbar/index.native.js +26 -34
- package/build/components/block-mobile-toolbar/index.native.js.map +1 -1
- package/build/components/block-mover/button.js +6 -7
- package/build/components/block-mover/button.js.map +1 -1
- package/build/components/block-mover/index.js +5 -8
- package/build/components/block-mover/index.js.map +1 -1
- package/build/components/block-mover/index.native.js +23 -46
- package/build/components/block-mover/index.native.js.map +1 -1
- package/build/components/block-mover/mover-description.native.js +7 -10
- package/build/components/block-mover/mover-description.native.js.map +1 -1
- package/build/components/block-navigation/dropdown.js +20 -25
- package/build/components/block-navigation/dropdown.js.map +1 -1
- package/build/components/block-parent-selector/index.js +2 -2
- package/build/components/block-parent-selector/index.js.map +1 -1
- package/build/components/block-pattern-setup/index.js +27 -31
- package/build/components/block-pattern-setup/index.js.map +1 -1
- package/build/components/block-pattern-setup/setup-toolbar.js +35 -42
- package/build/components/block-pattern-setup/setup-toolbar.js.map +1 -1
- package/build/components/block-patterns-list/index.js +74 -81
- package/build/components/block-patterns-list/index.js.map +1 -1
- package/build/components/block-popover/drop-zone.js +4 -5
- package/build/components/block-popover/drop-zone.js.map +1 -1
- package/build/components/block-popover/inbetween.js +10 -15
- package/build/components/block-popover/inbetween.js.map +1 -1
- package/build/components/block-popover/index.js +14 -15
- package/build/components/block-popover/index.js.map +1 -1
- package/build/components/block-preview/auto.js +6 -8
- package/build/components/block-preview/auto.js.map +1 -1
- package/build/components/block-preview/index.js +15 -18
- package/build/components/block-preview/index.js.map +1 -1
- package/build/components/block-settings/button.native.js +7 -10
- package/build/components/block-settings/button.native.js.map +1 -1
- package/build/components/block-settings-menu/block-convert-button.js +5 -7
- package/build/components/block-settings-menu/block-convert-button.js.map +1 -1
- package/build/components/block-settings-menu/block-html-convert-button.js +10 -14
- package/build/components/block-settings-menu/block-html-convert-button.js.map +1 -1
- package/build/components/block-settings-menu/block-mode-toggle.js +19 -25
- package/build/components/block-settings-menu/block-mode-toggle.js.map +1 -1
- package/build/components/block-settings-menu/block-settings-dropdown.js +132 -111
- package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build/components/block-settings-menu/index.js +4 -5
- package/build/components/block-settings-menu/index.js.map +1 -1
- package/build/components/block-settings-menu-controls/index.js +14 -16
- package/build/components/block-settings-menu-controls/index.js.map +1 -1
- package/build/components/block-styles/index.js +6 -7
- package/build/components/block-styles/index.js.map +1 -1
- package/build/components/block-styles/index.native.js +5 -7
- package/build/components/block-styles/index.native.js.map +1 -1
- package/build/components/block-styles/menu-items.js +4 -5
- package/build/components/block-styles/menu-items.js.map +1 -1
- package/build/components/block-styles/preview-panel.js +7 -10
- package/build/components/block-styles/preview-panel.js.map +1 -1
- package/build/components/block-styles/preview.native.js +6 -7
- package/build/components/block-styles/preview.native.js.map +1 -1
- package/build/components/block-styles/use-styles-for-block.js +7 -9
- package/build/components/block-styles/use-styles-for-block.js.map +1 -1
- package/build/components/block-styles/utils.js +4 -7
- package/build/components/block-styles/utils.js.map +1 -1
- package/build/components/block-switcher/block-styles-menu.js +4 -5
- package/build/components/block-switcher/block-styles-menu.js.map +1 -1
- package/build/components/block-switcher/block-transformations-menu.js +24 -29
- package/build/components/block-switcher/block-transformations-menu.js.map +1 -1
- package/build/components/block-switcher/block-transformations-menu.native.js +9 -10
- package/build/components/block-switcher/block-transformations-menu.native.js.map +1 -1
- package/build/components/block-switcher/block-variation-transformations.js +21 -30
- package/build/components/block-switcher/block-variation-transformations.js.map +1 -1
- package/build/components/block-switcher/index.js +47 -60
- package/build/components/block-switcher/index.js.map +1 -1
- package/build/components/block-switcher/pattern-transformations-menu.js +18 -22
- package/build/components/block-switcher/pattern-transformations-menu.js.map +1 -1
- package/build/components/block-switcher/preview-block-popover.js +3 -4
- package/build/components/block-switcher/preview-block-popover.js.map +1 -1
- package/build/components/block-switcher/utils.js +2 -3
- package/build/components/block-switcher/utils.js.map +1 -1
- package/build/components/block-title/index.js +5 -6
- package/build/components/block-title/index.js.map +1 -1
- package/build/components/block-title/use-block-display-title.js +5 -6
- package/build/components/block-title/use-block-display-title.js.map +1 -1
- package/build/components/block-toolbar/index.js +4 -5
- package/build/components/block-toolbar/index.js.map +1 -1
- package/build/components/block-toolbar/utils.js +14 -16
- package/build/components/block-toolbar/utils.js.map +1 -1
- package/build/components/block-tools/back-compat.js +3 -4
- package/build/components/block-tools/back-compat.js.map +1 -1
- package/build/components/block-tools/block-contextual-toolbar.js +5 -6
- package/build/components/block-tools/block-contextual-toolbar.js.map +1 -1
- package/build/components/block-tools/block-selection-button.js +6 -9
- package/build/components/block-tools/block-selection-button.js.map +1 -1
- package/build/components/block-tools/index.js +6 -7
- package/build/components/block-tools/index.js.map +1 -1
- package/build/components/block-tools/insertion-point.js +7 -10
- package/build/components/block-tools/insertion-point.js.map +1 -1
- package/build/components/block-tools/selected-block-popover.js +19 -20
- package/build/components/block-tools/selected-block-popover.js.map +1 -1
- package/build/components/block-tools/use-block-toolbar-popover-props.js +9 -14
- 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 -4
- package/build/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
- package/build/components/block-types-list/index.js +8 -9
- package/build/components/block-types-list/index.js.map +1 -1
- package/build/components/block-types-list/index.native.js +22 -27
- package/build/components/block-types-list/index.native.js.map +1 -1
- package/build/components/block-variation-picker/index.js +8 -9
- package/build/components/block-variation-picker/index.js.map +1 -1
- package/build/components/block-variation-picker/index.native.js +7 -9
- package/build/components/block-variation-picker/index.native.js.map +1 -1
- package/build/components/block-variation-transforms/index.js +30 -41
- package/build/components/block-variation-transforms/index.js.map +1 -1
- package/build/components/block-vertical-alignment-control/ui.js +7 -9
- package/build/components/block-vertical-alignment-control/ui.js.map +1 -1
- package/build/components/border-radius-control/all-input-control.js +7 -8
- package/build/components/border-radius-control/all-input-control.js.map +1 -1
- package/build/components/border-radius-control/index.js +9 -10
- package/build/components/border-radius-control/index.js.map +1 -1
- package/build/components/border-radius-control/input-controls.js +8 -11
- package/build/components/border-radius-control/input-controls.js.map +1 -1
- package/build/components/border-radius-control/linked-button.js +4 -5
- package/build/components/border-radius-control/linked-button.js.map +1 -1
- package/build/components/border-radius-control/utils.js +3 -7
- package/build/components/border-radius-control/utils.js.map +1 -1
- package/build/components/button-block-appender/index.js +13 -15
- package/build/components/button-block-appender/index.js.map +1 -1
- package/build/components/button-block-appender/index.native.js +25 -29
- package/build/components/button-block-appender/index.native.js.map +1 -1
- package/build/components/caption/index.native.js +40 -43
- package/build/components/caption/index.native.js.map +1 -1
- package/build/components/child-layout-control/index.js +5 -6
- package/build/components/child-layout-control/index.js.map +1 -1
- package/build/components/color-palette/control.js +5 -6
- package/build/components/color-palette/control.js.map +1 -1
- package/build/components/color-palette/with-color-context.js +1 -7
- package/build/components/color-palette/with-color-context.js.map +1 -1
- package/build/components/color-style-selector/index.js +28 -35
- package/build/components/color-style-selector/index.js.map +1 -1
- package/build/components/colors/utils.js +5 -8
- package/build/components/colors/utils.js.map +1 -1
- package/build/components/colors/with-colors.js +9 -24
- package/build/components/colors/with-colors.js.map +1 -1
- package/build/components/colors-gradients/control.js +19 -22
- package/build/components/colors-gradients/control.js.map +1 -1
- package/build/components/colors-gradients/dropdown.js +32 -39
- package/build/components/colors-gradients/dropdown.js.map +1 -1
- package/build/components/colors-gradients/panel-color-gradient-settings.js +20 -25
- package/build/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
- package/build/components/colors-gradients/panel-color-gradient-settings.native.js +27 -31
- package/build/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
- package/build/components/contrast-checker/index.js +12 -13
- package/build/components/contrast-checker/index.js.map +1 -1
- package/build/components/contrast-checker/index.native.js +16 -18
- package/build/components/contrast-checker/index.native.js.map +1 -1
- package/build/components/convert-to-group-buttons/index.js +9 -10
- package/build/components/convert-to-group-buttons/index.js.map +1 -1
- package/build/components/convert-to-group-buttons/index.native.js +6 -7
- package/build/components/convert-to-group-buttons/index.native.js.map +1 -1
- package/build/components/convert-to-group-buttons/toolbar.js +6 -12
- 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 -6
- package/build/components/convert-to-group-buttons/use-convert-to-group-button-props.js.map +1 -1
- package/build/components/copy-handler/index.js +4 -7
- package/build/components/copy-handler/index.js.map +1 -1
- package/build/components/date-format-picker/index.js +12 -16
- package/build/components/date-format-picker/index.js.map +1 -1
- package/build/components/default-block-appender/index.js +7 -9
- package/build/components/default-block-appender/index.js.map +1 -1
- package/build/components/default-block-appender/index.native.js +8 -10
- package/build/components/default-block-appender/index.native.js.map +1 -1
- package/build/components/default-style-picker/index.js +14 -22
- package/build/components/default-style-picker/index.js.map +1 -1
- package/build/components/duotone/components.js +14 -18
- package/build/components/duotone/components.js.map +1 -1
- package/build/components/duotone/utils.js +1 -2
- package/build/components/duotone/utils.js.map +1 -1
- package/build/components/duotone-control/index.js +12 -15
- package/build/components/duotone-control/index.js.map +1 -1
- package/build/components/editable-text/index.js +5 -6
- package/build/components/editable-text/index.js.map +1 -1
- package/build/components/editor-styles/index.js +4 -5
- package/build/components/editor-styles/index.js.map +1 -1
- package/build/components/floating-toolbar/index.native.js +7 -8
- package/build/components/floating-toolbar/index.native.js.map +1 -1
- package/build/components/font-appearance-control/index.js +19 -26
- package/build/components/font-appearance-control/index.js.map +1 -1
- package/build/components/font-family/index.js +10 -12
- package/build/components/font-family/index.js.map +1 -1
- package/build/components/font-sizes/fluid-utils.js +17 -21
- package/build/components/font-sizes/fluid-utils.js.map +1 -1
- package/build/components/font-sizes/utils.js +6 -12
- package/build/components/font-sizes/utils.js.map +1 -1
- package/build/components/font-sizes/with-font-sizes.js +11 -30
- package/build/components/font-sizes/with-font-sizes.js.map +1 -1
- package/build/components/global-styles/advanced-panel.js +7 -10
- package/build/components/global-styles/advanced-panel.js.map +1 -1
- package/build/components/global-styles/border-panel.js +45 -78
- package/build/components/global-styles/border-panel.js.map +1 -1
- package/build/components/global-styles/color-panel.js +104 -147
- package/build/components/global-styles/color-panel.js.map +1 -1
- package/build/components/global-styles/color-panel.native.js +25 -42
- package/build/components/global-styles/color-panel.native.js.map +1 -1
- package/build/components/global-styles/dimensions-panel.js +78 -109
- package/build/components/global-styles/dimensions-panel.js.map +1 -1
- package/build/components/global-styles/effects-panel.js +58 -72
- package/build/components/global-styles/effects-panel.js.map +1 -1
- package/build/components/global-styles/filters-panel.js +53 -71
- package/build/components/global-styles/filters-panel.js.map +1 -1
- package/build/components/global-styles/get-block-css-selector.js +4 -7
- package/build/components/global-styles/get-block-css-selector.js.map +1 -1
- package/build/components/global-styles/hooks.js +22 -37
- package/build/components/global-styles/hooks.js.map +1 -1
- package/build/components/global-styles/typography-panel.js +69 -125
- package/build/components/global-styles/typography-panel.js.map +1 -1
- package/build/components/global-styles/typography-utils.js +49 -26
- package/build/components/global-styles/typography-utils.js.map +1 -1
- package/build/components/global-styles/use-global-styles-output.js +140 -235
- package/build/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build/components/global-styles/utils.js +11 -27
- package/build/components/global-styles/utils.js.map +1 -1
- package/build/components/gradients/use-gradient.js +6 -7
- package/build/components/gradients/use-gradient.js.map +1 -1
- package/build/components/height-control/index.js +9 -10
- package/build/components/height-control/index.js.map +1 -1
- package/build/components/iframe/index.js +50 -85
- package/build/components/iframe/index.js.map +1 -1
- package/build/components/iframe/use-compatibility-styles.js +29 -20
- package/build/components/iframe/use-compatibility-styles.js.map +1 -1
- package/build/components/image-editor/aspect-ratio-dropdown.js +83 -91
- package/build/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
- package/build/components/image-editor/context.js +9 -10
- package/build/components/image-editor/context.js.map +1 -1
- package/build/components/image-editor/cropper.js +11 -12
- package/build/components/image-editor/cropper.js.map +1 -1
- package/build/components/image-editor/index.js +12 -13
- package/build/components/image-editor/index.js.map +1 -1
- package/build/components/image-editor/use-save-image.js +11 -12
- package/build/components/image-editor/use-save-image.js.map +1 -1
- package/build/components/image-editor/use-transform-image.js +5 -6
- package/build/components/image-editor/use-transform-image.js.map +1 -1
- package/build/components/image-editor/zoom-dropdown.js +10 -13
- package/build/components/image-editor/zoom-dropdown.js.map +1 -1
- package/build/components/image-size-control/index.js +12 -13
- package/build/components/image-size-control/index.js.map +1 -1
- package/build/components/inner-blocks/button-block-appender.js +7 -8
- package/build/components/inner-blocks/button-block-appender.js.map +1 -1
- package/build/components/inner-blocks/default-block-appender.js +6 -8
- package/build/components/inner-blocks/default-block-appender.js.map +1 -1
- package/build/components/inner-blocks/index.js +2 -6
- package/build/components/inner-blocks/index.js.map +1 -1
- package/build/components/inner-blocks/index.native.js +1 -3
- package/build/components/inner-blocks/index.native.js.map +1 -1
- package/build/components/inner-blocks/use-block-context.js +1 -4
- package/build/components/inner-blocks/use-block-context.js.map +1 -1
- package/build/components/inner-blocks/use-nested-settings-update.js +2 -4
- package/build/components/inner-blocks/use-nested-settings-update.js.map +1 -1
- package/build/components/inserter/block-patterns-explorer/explorer.js +9 -11
- package/build/components/inserter/block-patterns-explorer/explorer.js.map +1 -1
- package/build/components/inserter/block-patterns-explorer/patterns-list.js +11 -18
- package/build/components/inserter/block-patterns-explorer/patterns-list.js.map +1 -1
- package/build/components/inserter/block-patterns-explorer/sidebar.js +20 -24
- package/build/components/inserter/block-patterns-explorer/sidebar.js.map +1 -1
- package/build/components/inserter/block-patterns-tab.js +29 -40
- package/build/components/inserter/block-patterns-tab.js.map +1 -1
- package/build/components/inserter/block-types-tab.js +7 -9
- package/build/components/inserter/block-types-tab.js.map +1 -1
- package/build/components/inserter/block-types-tab.native.js +8 -9
- package/build/components/inserter/block-types-tab.native.js.map +1 -1
- package/build/components/inserter/hooks/use-block-type-impressions.native.js +3 -5
- package/build/components/inserter/hooks/use-block-type-impressions.native.js.map +1 -1
- package/build/components/inserter/hooks/use-block-types-state.js +5 -6
- package/build/components/inserter/hooks/use-block-types-state.js.map +1 -1
- package/build/components/inserter/hooks/use-clipboard-block.native.js +2 -2
- package/build/components/inserter/hooks/use-clipboard-block.native.js.map +1 -1
- package/build/components/inserter/hooks/use-debounced-input.js +1 -2
- package/build/components/inserter/hooks/use-debounced-input.js.map +1 -1
- package/build/components/inserter/hooks/use-insertion-point.js +10 -12
- package/build/components/inserter/hooks/use-insertion-point.js.map +1 -1
- package/build/components/inserter/index.js +37 -51
- package/build/components/inserter/index.js.map +1 -1
- package/build/components/inserter/index.native.js +24 -31
- package/build/components/inserter/index.native.js.map +1 -1
- package/build/components/inserter/library.js +11 -12
- package/build/components/inserter/library.js.map +1 -1
- package/build/components/inserter/media-tab/hooks.js +2 -5
- package/build/components/inserter/media-tab/hooks.js.map +1 -1
- package/build/components/inserter/media-tab/media-list.js +6 -7
- package/build/components/inserter/media-tab/media-list.js.map +1 -1
- package/build/components/inserter/media-tab/media-panel.js +12 -14
- package/build/components/inserter/media-tab/media-panel.js.map +1 -1
- package/build/components/inserter/media-tab/media-preview.js +47 -58
- package/build/components/inserter/media-tab/media-preview.js.map +1 -1
- package/build/components/inserter/media-tab/media-tab.js +24 -28
- package/build/components/inserter/media-tab/media-tab.js.map +1 -1
- package/build/components/inserter/media-tab/utils.js +3 -5
- package/build/components/inserter/media-tab/utils.js.map +1 -1
- package/build/components/inserter/menu.js +15 -19
- package/build/components/inserter/menu.js.map +1 -1
- package/build/components/inserter/menu.native.js +27 -31
- package/build/components/inserter/menu.native.js.map +1 -1
- package/build/components/inserter/mobile-tab-navigation.js +7 -9
- package/build/components/inserter/mobile-tab-navigation.js.map +1 -1
- package/build/components/inserter/panel.js +5 -6
- package/build/components/inserter/panel.js.map +1 -1
- package/build/components/inserter/preview-panel.js +4 -5
- package/build/components/inserter/preview-panel.js.map +1 -1
- package/build/components/inserter/quick-inserter.js +8 -9
- package/build/components/inserter/quick-inserter.js.map +1 -1
- package/build/components/inserter/reusable-blocks-tab.js +13 -18
- package/build/components/inserter/reusable-blocks-tab.js.map +1 -1
- package/build/components/inserter/reusable-blocks-tab.native.js +5 -6
- package/build/components/inserter/reusable-blocks-tab.native.js.map +1 -1
- package/build/components/inserter/search-items.js +12 -40
- package/build/components/inserter/search-items.js.map +1 -1
- package/build/components/inserter/search-results.js +17 -18
- package/build/components/inserter/search-results.js.map +1 -1
- package/build/components/inserter/search-results.native.js +11 -12
- package/build/components/inserter/search-results.native.js.map +1 -1
- package/build/components/inserter/tabs.js +8 -9
- package/build/components/inserter/tabs.js.map +1 -1
- package/build/components/inserter/tabs.native.js +37 -55
- package/build/components/inserter/tabs.native.js.map +1 -1
- package/build/components/inserter/utils.native.js +13 -17
- package/build/components/inserter/utils.native.js.map +1 -1
- package/build/components/inserter-draggable-blocks/index.js +11 -13
- package/build/components/inserter-draggable-blocks/index.js.map +1 -1
- package/build/components/inserter-list-item/index.js +68 -72
- package/build/components/inserter-list-item/index.js.map +1 -1
- package/build/components/inserter-listbox/index.js +3 -4
- package/build/components/inserter-listbox/index.js.map +1 -1
- package/build/components/inserter-listbox/item.js +6 -7
- package/build/components/inserter-listbox/item.js.map +1 -1
- package/build/components/inspector-controls/block-support-slot-container.js +4 -5
- package/build/components/inspector-controls/block-support-slot-container.js.map +1 -1
- package/build/components/inspector-controls/block-support-tools-panel.js +6 -8
- package/build/components/inspector-controls/block-support-tools-panel.js.map +1 -1
- package/build/components/inspector-controls/fill.js +13 -24
- package/build/components/inspector-controls/fill.js.map +1 -1
- package/build/components/inspector-controls/fill.native.js +7 -11
- package/build/components/inspector-controls/fill.native.js.map +1 -1
- package/build/components/inspector-controls/slot.js +9 -13
- package/build/components/inspector-controls/slot.js.map +1 -1
- package/build/components/inspector-controls/slot.native.js +6 -10
- package/build/components/inspector-controls/slot.native.js.map +1 -1
- package/build/components/inspector-controls-tabs/index.js +6 -7
- package/build/components/inspector-controls-tabs/index.js.map +1 -1
- package/build/components/inspector-controls-tabs/position-controls-panel.js +3 -8
- package/build/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
- package/build/components/inspector-controls-tabs/settings-tab-hint.js +1 -1
- package/build/components/inspector-controls-tabs/settings-tab-hint.js.map +1 -1
- package/build/components/inspector-controls-tabs/settings-tab.js +3 -6
- package/build/components/inspector-controls-tabs/settings-tab.js.map +1 -1
- package/build/components/inspector-controls-tabs/styles-tab.js +5 -6
- package/build/components/inspector-controls-tabs/styles-tab.js.map +1 -1
- package/build/components/inspector-controls-tabs/use-inspector-controls-tabs.js +1 -3
- package/build/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +1 -1
- package/build/components/inspector-popover-header/index.js +18 -22
- package/build/components/inspector-popover-header/index.js.map +1 -1
- package/build/components/justify-content-control/ui.js +8 -10
- package/build/components/justify-content-control/ui.js.map +1 -1
- package/build/components/letter-spacing-control/index.js +6 -7
- package/build/components/letter-spacing-control/index.js.map +1 -1
- package/build/components/line-height-control/index.js +13 -18
- package/build/components/line-height-control/index.js.map +1 -1
- package/build/components/line-height-control/index.native.js +4 -5
- package/build/components/line-height-control/index.native.js.map +1 -1
- package/build/components/link-control/index.js +84 -63
- package/build/components/link-control/index.js.map +1 -1
- package/build/components/link-control/is-url-like.js +32 -2
- package/build/components/link-control/is-url-like.js.map +1 -1
- package/build/components/link-control/link-preview.js +24 -27
- package/build/components/link-control/link-preview.js.map +1 -1
- package/build/components/link-control/search-create-button.js +7 -9
- package/build/components/link-control/search-create-button.js.map +1 -1
- package/build/components/link-control/search-input.js +22 -27
- package/build/components/link-control/search-input.js.map +1 -1
- package/build/components/link-control/search-item.js +13 -15
- package/build/components/link-control/search-item.js.map +1 -1
- package/build/components/link-control/search-results.js +22 -28
- package/build/components/link-control/search-results.js.map +1 -1
- package/build/components/link-control/settings-drawer.js +6 -35
- package/build/components/link-control/settings-drawer.js.map +1 -1
- package/build/components/link-control/settings.js +6 -8
- package/build/components/link-control/settings.js.map +1 -1
- package/build/components/link-control/use-internal-value.js +54 -0
- package/build/components/link-control/use-internal-value.js.map +1 -0
- package/build/components/link-control/use-rich-url-data.js +1 -1
- package/build/components/link-control/use-rich-url-data.js.map +1 -1
- package/build/components/link-control/use-search-handler.js +10 -23
- package/build/components/link-control/use-search-handler.js.map +1 -1
- package/build/components/list-view/appender.js +12 -12
- package/build/components/list-view/appender.js.map +1 -1
- package/build/components/list-view/aria-referenced-text.js +44 -0
- package/build/components/list-view/aria-referenced-text.js.map +1 -0
- package/build/components/list-view/block-contents.js +38 -38
- package/build/components/list-view/block-contents.js.map +1 -1
- package/build/components/list-view/block-select-button.js +67 -21
- package/build/components/list-view/block-select-button.js.map +1 -1
- package/build/components/list-view/block.js +119 -101
- package/build/components/list-view/block.js.map +1 -1
- package/build/components/list-view/branch.js +5 -5
- package/build/components/list-view/branch.js.map +1 -1
- package/build/components/list-view/drop-indicator.js +4 -5
- package/build/components/list-view/drop-indicator.js.map +1 -1
- package/build/components/list-view/expander.js +3 -4
- package/build/components/list-view/expander.js.map +1 -1
- package/build/components/list-view/index.js +46 -43
- package/build/components/list-view/index.js.map +1 -1
- package/build/components/list-view/leaf.js +10 -11
- package/build/components/list-view/leaf.js.map +1 -1
- package/build/components/list-view/use-block-selection.js +4 -6
- package/build/components/list-view/use-block-selection.js.map +1 -1
- package/build/components/list-view/use-list-view-client-ids.js +9 -12
- 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 +25 -13
- 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 +4 -5
- package/build/components/list-view/use-list-view-expand-selected-item.js.map +1 -1
- package/build/components/list-view/use-list-view-scroll-into-view.js +5 -6
- package/build/components/list-view/use-list-view-scroll-into-view.js.map +1 -1
- package/build/components/media-placeholder/index.js +71 -92
- package/build/components/media-placeholder/index.js.map +1 -1
- package/build/components/media-placeholder/index.native.js +5 -6
- package/build/components/media-placeholder/index.native.js.map +1 -1
- package/build/components/media-replace-flow/index.js +94 -107
- package/build/components/media-replace-flow/index.js.map +1 -1
- package/build/components/media-upload/check.js +4 -5
- package/build/components/media-upload/check.js.map +1 -1
- package/build/components/media-upload/index.native.js +1 -1
- package/build/components/media-upload/index.native.js.map +1 -1
- package/build/components/multi-selection-inspector/index.js +3 -4
- package/build/components/multi-selection-inspector/index.js.map +1 -1
- package/build/components/navigable-toolbar/index.js +16 -15
- package/build/components/navigable-toolbar/index.js.map +1 -1
- package/build/components/observe-typing/index.js +3 -4
- package/build/components/observe-typing/index.js.map +1 -1
- package/build/components/panel-color-settings/index.js +4 -5
- package/build/components/panel-color-settings/index.js.map +1 -1
- package/build/components/plain-text/index.js +4 -6
- package/build/components/plain-text/index.js.map +1 -1
- package/build/components/plain-text/index.native.js +8 -14
- package/build/components/plain-text/index.native.js.map +1 -1
- package/build/components/preview-options/index.js +8 -9
- package/build/components/preview-options/index.js.map +1 -1
- package/build/components/provider/block-refs-provider.js +3 -4
- package/build/components/provider/block-refs-provider.js.map +1 -1
- package/build/components/provider/use-block-sync.js +7 -8
- package/build/components/provider/use-block-sync.js.map +1 -1
- package/build/components/provider/with-registry-provider.js +5 -7
- package/build/components/provider/with-registry-provider.js.map +1 -1
- package/build/components/publish-date-time-picker/index.js +6 -7
- package/build/components/publish-date-time-picker/index.js.map +1 -1
- package/build/components/recursion-provider/index.js +7 -11
- package/build/components/recursion-provider/index.js.map +1 -1
- package/build/components/resizable-box-popover/index.js +5 -6
- package/build/components/resizable-box-popover/index.js.map +1 -1
- package/build/components/responsive-block-control/label.js +5 -6
- package/build/components/responsive-block-control/label.js.map +1 -1
- package/build/components/rich-text/embed-handler-picker.native.js +6 -10
- package/build/components/rich-text/embed-handler-picker.native.js.map +1 -1
- package/build/components/rich-text/format-edit.js +7 -8
- package/build/components/rich-text/format-edit.js.map +1 -1
- package/build/components/rich-text/format-toolbar/index.js +9 -18
- package/build/components/rich-text/format-toolbar/index.js.map +1 -1
- package/build/components/rich-text/format-toolbar-container.js +13 -16
- package/build/components/rich-text/format-toolbar-container.js.map +1 -1
- package/build/components/rich-text/index.js +43 -47
- package/build/components/rich-text/index.js.map +1 -1
- package/build/components/rich-text/index.native.js +130 -157
- package/build/components/rich-text/index.native.js.map +1 -1
- package/build/components/rich-text/input-event.js +4 -5
- package/build/components/rich-text/input-event.js.map +1 -1
- package/build/components/rich-text/shortcut.js +5 -6
- package/build/components/rich-text/shortcut.js.map +1 -1
- package/build/components/rich-text/split-value.js +8 -10
- package/build/components/rich-text/split-value.js.map +1 -1
- package/build/components/rich-text/toolbar-button.js +6 -7
- package/build/components/rich-text/toolbar-button.js.map +1 -1
- package/build/components/rich-text/use-before-input-rules.js +1 -4
- package/build/components/rich-text/use-before-input-rules.js.map +1 -1
- package/build/components/rich-text/use-enter.js +3 -6
- package/build/components/rich-text/use-enter.js.map +1 -1
- package/build/components/rich-text/use-firefox-compat.js +32 -1
- package/build/components/rich-text/use-firefox-compat.js.map +1 -1
- package/build/components/rich-text/use-format-types.js +11 -17
- package/build/components/rich-text/use-format-types.js.map +1 -1
- package/build/components/rich-text/use-input-rules.js +9 -15
- package/build/components/rich-text/use-input-rules.js.map +1 -1
- package/build/components/rich-text/use-mark-persistent.js +4 -5
- package/build/components/rich-text/use-mark-persistent.js.map +1 -1
- package/build/components/rich-text/use-paste-handler.js +5 -7
- package/build/components/rich-text/use-paste-handler.js.map +1 -1
- package/build/components/rich-text/utils.js +5 -7
- package/build/components/rich-text/utils.js.map +1 -1
- package/build/components/skip-to-selected-block/index.js +3 -4
- package/build/components/skip-to-selected-block/index.js.map +1 -1
- package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js +38 -0
- package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -0
- package/build/components/spacing-sizes-control/index.js +60 -62
- package/build/components/spacing-sizes-control/index.js.map +1 -1
- package/build/components/spacing-sizes-control/{axial-input-controls.js → input-controls/axial.js} +21 -22
- package/build/components/spacing-sizes-control/input-controls/axial.js.map +1 -0
- package/build/components/spacing-sizes-control/{input-controls.js → input-controls/separated.js} +22 -22
- package/build/components/spacing-sizes-control/input-controls/separated.js.map +1 -0
- package/build/components/spacing-sizes-control/input-controls/single.js +51 -0
- package/build/components/spacing-sizes-control/input-controls/single.js.map +1 -0
- package/build/components/spacing-sizes-control/{spacing-input-control.js → input-controls/spacing-input-control.js} +51 -69
- package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -0
- package/build/components/spacing-sizes-control/sides-dropdown/index.js +84 -0
- package/build/components/spacing-sizes-control/sides-dropdown/index.js.map +1 -0
- package/build/components/spacing-sizes-control/utils.js +213 -31
- package/build/components/spacing-sizes-control/utils.js.map +1 -1
- package/build/components/text-decoration-control/index.js +5 -6
- package/build/components/text-decoration-control/index.js.map +1 -1
- package/build/components/text-transform-control/index.js +5 -6
- package/build/components/text-transform-control/index.js.map +1 -1
- package/build/components/tool-selector/index.js +13 -16
- package/build/components/tool-selector/index.js.map +1 -1
- package/build/components/typewriter/index.js +6 -9
- package/build/components/typewriter/index.js.map +1 -1
- package/build/components/ungroup-button/index.native.js +11 -16
- package/build/components/ungroup-button/index.native.js.map +1 -1
- package/build/components/unit-control/index.js +4 -5
- package/build/components/unit-control/index.js.map +1 -1
- package/build/components/url-input/index.js +15 -26
- package/build/components/url-input/index.js.map +1 -1
- package/build/components/url-input/index.native.js +6 -8
- package/build/components/url-input/index.native.js.map +1 -1
- package/build/components/url-popover/image-url-input-ui.js +12 -15
- package/build/components/url-popover/image-url-input-ui.js.map +1 -1
- package/build/components/url-popover/index.js +12 -14
- package/build/components/url-popover/index.js.map +1 -1
- package/build/components/url-popover/link-editor.js +7 -8
- package/build/components/url-popover/link-editor.js.map +1 -1
- package/build/components/url-popover/link-viewer-url.js +5 -6
- package/build/components/url-popover/link-viewer-url.js.map +1 -1
- package/build/components/url-popover/link-viewer.js +8 -9
- package/build/components/url-popover/link-viewer.js.map +1 -1
- package/build/components/use-block-display-information/index.js +2 -2
- package/build/components/use-block-display-information/index.js.map +1 -1
- package/build/components/use-block-drop-zone/index.js +16 -23
- package/build/components/use-block-drop-zone/index.js.map +1 -1
- package/build/components/use-block-drop-zone/index.native.js +8 -11
- package/build/components/use-block-drop-zone/index.native.js.map +1 -1
- package/build/components/use-moving-animation/index.js +9 -12
- package/build/components/use-moving-animation/index.js.map +1 -1
- package/build/components/use-on-block-drop/index.js +2 -6
- package/build/components/use-on-block-drop/index.js.map +1 -1
- package/build/components/use-on-block-drop/index.native.js +8 -10
- package/build/components/use-on-block-drop/index.native.js.map +1 -1
- package/build/components/use-paste-styles/index.js +2 -6
- package/build/components/use-paste-styles/index.js.map +1 -1
- package/build/components/warning/index.js +6 -7
- package/build/components/warning/index.js.map +1 -1
- package/build/components/warning/index.native.js +9 -10
- package/build/components/warning/index.native.js.map +1 -1
- package/build/components/writing-flow/index.js +4 -5
- package/build/components/writing-flow/index.js.map +1 -1
- package/build/components/writing-flow/use-drag-selection.js +4 -6
- package/build/components/writing-flow/use-drag-selection.js.map +1 -1
- package/build/components/writing-flow/use-tab-nav.js +9 -6
- package/build/components/writing-flow/use-tab-nav.js.map +1 -1
- package/build/hooks/align.js +7 -14
- package/build/hooks/align.js.map +1 -1
- package/build/hooks/anchor.js +6 -3
- package/build/hooks/anchor.js.map +1 -1
- package/build/hooks/aria-label.js +1 -3
- package/build/hooks/aria-label.js.map +1 -1
- package/build/hooks/behaviors.js +91 -58
- package/build/hooks/behaviors.js.map +1 -1
- package/build/hooks/border.js +25 -38
- package/build/hooks/border.js.map +1 -1
- package/build/hooks/color.js +22 -37
- package/build/hooks/color.js.map +1 -1
- package/build/hooks/content-lock-ui.js +26 -30
- package/build/hooks/content-lock-ui.js.map +1 -1
- package/build/hooks/contrast-checker.js +4 -7
- package/build/hooks/contrast-checker.js.map +1 -1
- package/build/hooks/custom-class-name.js +5 -4
- package/build/hooks/custom-class-name.js.map +1 -1
- package/build/hooks/dimensions.js +6 -9
- package/build/hooks/dimensions.js.map +1 -1
- package/build/hooks/duotone.js +32 -44
- package/build/hooks/duotone.js.map +1 -1
- package/build/hooks/font-family.js +5 -6
- package/build/hooks/font-family.js.map +1 -1
- package/build/hooks/font-size.js +14 -21
- package/build/hooks/font-size.js.map +1 -1
- package/build/hooks/gap.js +5 -6
- package/build/hooks/gap.js.map +1 -1
- package/build/hooks/layout.js +42 -59
- package/build/hooks/layout.js.map +1 -1
- package/build/hooks/line-height.js +5 -8
- package/build/hooks/line-height.js.map +1 -1
- package/build/hooks/lock.js +2 -2
- package/build/hooks/lock.js.map +1 -1
- package/build/hooks/margin.js +6 -9
- package/build/hooks/margin.js.map +1 -1
- package/build/hooks/metadata-name.js +4 -5
- package/build/hooks/metadata-name.js.map +1 -1
- package/build/hooks/metadata.js +3 -7
- package/build/hooks/metadata.js.map +1 -1
- package/build/hooks/padding.js +6 -9
- package/build/hooks/padding.js.map +1 -1
- package/build/hooks/position.js +26 -40
- package/build/hooks/position.js.map +1 -1
- package/build/hooks/settings.js +1 -3
- package/build/hooks/settings.js.map +1 -1
- package/build/hooks/style.js +12 -19
- package/build/hooks/style.js.map +1 -1
- package/build/hooks/supports.js +3 -5
- package/build/hooks/supports.js.map +1 -1
- package/build/hooks/typography.js +18 -27
- package/build/hooks/typography.js.map +1 -1
- package/build/hooks/typography.native.js +1 -2
- package/build/hooks/typography.native.js.map +1 -1
- package/build/hooks/use-border-props.js +1 -3
- package/build/hooks/use-border-props.js.map +1 -1
- package/build/hooks/use-color-props.js +6 -8
- package/build/hooks/use-color-props.js.map +1 -1
- package/build/hooks/use-editor-wrapper-styles.native.js +34 -39
- package/build/hooks/use-editor-wrapper-styles.native.js.map +1 -1
- package/build/hooks/use-spacing-props.js +1 -1
- package/build/hooks/use-spacing-props.js.map +1 -1
- package/build/hooks/use-typography-props.js +8 -12
- package/build/hooks/use-typography-props.js.map +1 -1
- package/build/hooks/utils.js +6 -18
- package/build/hooks/utils.js.map +1 -1
- package/build/layouts/constrained.js +22 -27
- package/build/layouts/constrained.js.map +1 -1
- package/build/layouts/flex.js +43 -54
- package/build/layouts/flex.js.map +1 -1
- package/build/layouts/flow.js +10 -13
- package/build/layouts/flow.js.map +1 -1
- package/build/layouts/grid.js +45 -25
- package/build/layouts/grid.js.map +1 -1
- package/build/layouts/index.js +1 -2
- package/build/layouts/index.js.map +1 -1
- package/build/layouts/utils.js +3 -9
- package/build/layouts/utils.js.map +1 -1
- package/build/store/actions.js +251 -334
- package/build/store/actions.js.map +1 -1
- package/build/store/array.js +1 -2
- package/build/store/array.js.map +1 -1
- package/build/store/private-actions.js +3 -7
- package/build/store/private-actions.js.map +1 -1
- package/build/store/private-selectors.js +41 -24
- package/build/store/private-selectors.js.map +1 -1
- package/build/store/reducer.js +67 -169
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +145 -215
- package/build/store/selectors.js.map +1 -1
- package/build/utils/block-variation-transforms.js +4 -7
- package/build/utils/block-variation-transforms.js.map +1 -1
- package/build/utils/math.js +1 -2
- package/build/utils/math.js.map +1 -1
- package/build/utils/object.js +1 -4
- package/build/utils/object.js.map +1 -1
- package/build/utils/order-inserter-block-items.js +5 -7
- package/build/utils/order-inserter-block-items.js.map +1 -1
- package/build/utils/parse-css-unit-to-px.js +3 -6
- package/build/utils/parse-css-unit-to-px.js.map +1 -1
- package/build/utils/pasting.js +5 -8
- package/build/utils/pasting.js.map +1 -1
- package/build/utils/pre-parse-patterns.js +1 -1
- package/build/utils/pre-parse-patterns.js.map +1 -1
- package/build/utils/sorting.js +1 -2
- package/build/utils/sorting.js.map +1 -1
- package/build/utils/transform-styles/index.js +5 -7
- package/build/utils/transform-styles/index.js.map +1 -1
- package/build/utils/transform-styles/transforms/wrap.js +28 -31
- package/build/utils/transform-styles/transforms/wrap.js.map +1 -1
- package/build-module/autocompleters/block.js +1 -3
- package/build-module/autocompleters/block.js.map +1 -1
- package/build-module/components/alignment-control/ui.js +9 -11
- package/build-module/components/alignment-control/ui.js.map +1 -1
- package/build-module/components/autocomplete/index.js +3 -4
- package/build-module/components/autocomplete/index.js.map +1 -1
- package/build-module/components/block-actions/index.js +8 -12
- package/build-module/components/block-actions/index.js.map +1 -1
- package/build-module/components/block-alignment-control/ui.js +17 -21
- package/build-module/components/block-alignment-control/ui.js.map +1 -1
- package/build-module/components/block-alignment-control/ui.native.js +14 -17
- package/build-module/components/block-alignment-control/ui.native.js.map +1 -1
- package/build-module/components/block-alignment-control/use-available-alignments.js +5 -10
- package/build-module/components/block-alignment-control/use-available-alignments.js.map +1 -1
- package/build-module/components/block-alignment-matrix-control/index.js +4 -6
- package/build-module/components/block-alignment-matrix-control/index.js.map +1 -1
- package/build-module/components/block-breadcrumb/index.js +3 -4
- package/build-module/components/block-breadcrumb/index.js.map +1 -1
- package/build-module/components/block-caption/index.native.js +29 -34
- package/build-module/components/block-caption/index.native.js.map +1 -1
- package/build-module/components/block-card/index.js +7 -9
- package/build-module/components/block-card/index.js.map +1 -1
- package/build-module/components/block-compare/block-view.js +8 -9
- package/build-module/components/block-compare/block-view.js.map +1 -1
- package/build-module/components/block-compare/index.js +7 -9
- package/build-module/components/block-compare/index.js.map +1 -1
- package/build-module/components/block-context/index.js +4 -5
- package/build-module/components/block-context/index.js.map +1 -1
- package/build-module/components/block-controls/fill.js +17 -23
- package/build-module/components/block-controls/fill.js.map +1 -1
- package/build-module/components/block-controls/hook.js +1 -3
- package/build-module/components/block-controls/hook.js.map +1 -1
- package/build-module/components/block-controls/slot.js +29 -21
- package/build-module/components/block-controls/slot.js.map +1 -1
- package/build-module/components/block-controls/slot.native.js +8 -18
- package/build-module/components/block-controls/slot.native.js.map +1 -1
- package/build-module/components/block-draggable/draggable-chip.js +5 -7
- 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 +6 -7
- package/build-module/components/block-draggable/dropping-insertion-point.native.js.map +1 -1
- package/build-module/components/block-draggable/index.js +16 -17
- package/build-module/components/block-draggable/index.js.map +1 -1
- package/build-module/components/block-draggable/index.native.js +43 -58
- package/build-module/components/block-draggable/index.native.js.map +1 -1
- package/build-module/components/block-edit/edit.js +1 -4
- package/build-module/components/block-edit/edit.js.map +1 -1
- package/build-module/components/block-edit/edit.native.js +1 -4
- package/build-module/components/block-edit/edit.native.js.map +1 -1
- package/build-module/components/block-edit-visually-button/index.js +3 -4
- package/build-module/components/block-edit-visually-button/index.js.map +1 -1
- package/build-module/components/block-full-height-alignment-control/index.js +6 -7
- package/build-module/components/block-full-height-alignment-control/index.js.map +1 -1
- package/build-module/components/block-icon/index.js +7 -11
- package/build-module/components/block-icon/index.js.map +1 -1
- package/build-module/components/block-icon/index.native.js +9 -13
- package/build-module/components/block-icon/index.native.js.map +1 -1
- package/build-module/components/block-inspector/index.js +36 -46
- package/build-module/components/block-inspector/index.js.map +1 -1
- package/build-module/components/block-inspector/useBlockInspectorAnimationSettings.js +2 -2
- package/build-module/components/block-inspector/useBlockInspectorAnimationSettings.js.map +1 -1
- package/build-module/components/block-list/block-html.js +3 -4
- package/build-module/components/block-list/block-html.js.map +1 -1
- package/build-module/components/block-list/block-invalid-warning.js +3 -4
- package/build-module/components/block-list/block-invalid-warning.js.map +1 -1
- package/build-module/components/block-list/block-invalid-warning.native.js +10 -15
- package/build-module/components/block-list/block-invalid-warning.native.js.map +1 -1
- package/build-module/components/block-list/block-list-context.native.js +5 -11
- 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 +5 -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 +17 -18
- package/build-module/components/block-list/block-list-item.native.js.map +1 -1
- package/build-module/components/block-list/block-outline.native.js +8 -9
- package/build-module/components/block-list/block-outline.native.js.map +1 -1
- package/build-module/components/block-list/block-selection-button.native.js +10 -12
- package/build-module/components/block-list/block-selection-button.native.js.map +1 -1
- package/build-module/components/block-list/block.js +39 -46
- package/build-module/components/block-list/block.js.map +1 -1
- package/build-module/components/block-list/block.native.js +55 -68
- package/build-module/components/block-list/block.native.js.map +1 -1
- package/build-module/components/block-list/index.js +12 -15
- package/build-module/components/block-list/index.js.map +1 -1
- package/build-module/components/block-list/index.native.js +77 -86
- package/build-module/components/block-list/index.native.js.map +1 -1
- package/build-module/components/block-list/insertion-point.native.js +4 -5
- package/build-module/components/block-list/insertion-point.native.js.map +1 -1
- package/build-module/components/block-list/layout.js +6 -9
- package/build-module/components/block-list/layout.js.map +1 -1
- package/build-module/components/block-list/subdirectory-icon.js +10 -13
- package/build-module/components/block-list/subdirectory-icon.js.map +1 -1
- package/build-module/components/block-list/use-block-props/index.js +14 -11
- package/build-module/components/block-list/use-block-props/index.js.map +1 -1
- package/build-module/components/block-list/use-block-props/index.native.js +1 -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-custom-class-name.js +2 -2
- 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 +1 -1
- 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-in-between-inserter.js +1 -3
- package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
- package/build-module/components/block-list-appender/index.js +15 -15
- package/build-module/components/block-list-appender/index.js.map +1 -1
- package/build-module/components/block-list-appender/index.native.js +9 -11
- package/build-module/components/block-list-appender/index.native.js.map +1 -1
- package/build-module/components/block-lock/menu-item.js +3 -4
- package/build-module/components/block-lock/menu-item.js.map +1 -1
- package/build-module/components/block-lock/modal.js +6 -9
- package/build-module/components/block-lock/modal.js.map +1 -1
- package/build-module/components/block-lock/toolbar.js +5 -10
- package/build-module/components/block-lock/toolbar.js.map +1 -1
- package/build-module/components/block-mobile-toolbar/block-actions-menu.native.js +49 -67
- package/build-module/components/block-mobile-toolbar/block-actions-menu.native.js.map +1 -1
- package/build-module/components/block-mobile-toolbar/index.native.js +26 -34
- package/build-module/components/block-mobile-toolbar/index.native.js.map +1 -1
- package/build-module/components/block-mover/button.js +6 -7
- package/build-module/components/block-mover/button.js.map +1 -1
- package/build-module/components/block-mover/index.js +5 -8
- package/build-module/components/block-mover/index.js.map +1 -1
- package/build-module/components/block-mover/index.native.js +23 -46
- package/build-module/components/block-mover/index.native.js.map +1 -1
- package/build-module/components/block-mover/mover-description.native.js +7 -10
- package/build-module/components/block-mover/mover-description.native.js.map +1 -1
- package/build-module/components/block-navigation/dropdown.js +20 -25
- package/build-module/components/block-navigation/dropdown.js.map +1 -1
- package/build-module/components/block-parent-selector/index.js +2 -2
- package/build-module/components/block-parent-selector/index.js.map +1 -1
- package/build-module/components/block-pattern-setup/index.js +27 -31
- package/build-module/components/block-pattern-setup/index.js.map +1 -1
- package/build-module/components/block-pattern-setup/setup-toolbar.js +35 -42
- package/build-module/components/block-pattern-setup/setup-toolbar.js.map +1 -1
- package/build-module/components/block-patterns-list/index.js +71 -78
- package/build-module/components/block-patterns-list/index.js.map +1 -1
- package/build-module/components/block-popover/drop-zone.js +4 -5
- package/build-module/components/block-popover/drop-zone.js.map +1 -1
- package/build-module/components/block-popover/inbetween.js +10 -15
- package/build-module/components/block-popover/inbetween.js.map +1 -1
- package/build-module/components/block-popover/index.js +14 -15
- package/build-module/components/block-popover/index.js.map +1 -1
- package/build-module/components/block-preview/auto.js +6 -8
- package/build-module/components/block-preview/auto.js.map +1 -1
- package/build-module/components/block-preview/index.js +15 -18
- package/build-module/components/block-preview/index.js.map +1 -1
- package/build-module/components/block-settings/button.native.js +7 -10
- package/build-module/components/block-settings/button.native.js.map +1 -1
- package/build-module/components/block-settings-menu/block-convert-button.js +5 -7
- 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 +10 -14
- 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 +19 -25
- 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 +135 -113
- package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build-module/components/block-settings-menu/index.js +4 -5
- package/build-module/components/block-settings-menu/index.js.map +1 -1
- package/build-module/components/block-settings-menu-controls/index.js +14 -16
- package/build-module/components/block-settings-menu-controls/index.js.map +1 -1
- package/build-module/components/block-styles/index.js +6 -7
- package/build-module/components/block-styles/index.js.map +1 -1
- package/build-module/components/block-styles/index.native.js +5 -7
- package/build-module/components/block-styles/index.native.js.map +1 -1
- package/build-module/components/block-styles/menu-items.js +4 -5
- package/build-module/components/block-styles/menu-items.js.map +1 -1
- package/build-module/components/block-styles/preview-panel.js +7 -10
- package/build-module/components/block-styles/preview-panel.js.map +1 -1
- package/build-module/components/block-styles/preview.native.js +6 -7
- package/build-module/components/block-styles/preview.native.js.map +1 -1
- package/build-module/components/block-styles/use-styles-for-block.js +7 -9
- package/build-module/components/block-styles/use-styles-for-block.js.map +1 -1
- package/build-module/components/block-styles/utils.js +4 -7
- package/build-module/components/block-styles/utils.js.map +1 -1
- package/build-module/components/block-switcher/block-styles-menu.js +4 -5
- package/build-module/components/block-switcher/block-styles-menu.js.map +1 -1
- package/build-module/components/block-switcher/block-transformations-menu.js +24 -29
- package/build-module/components/block-switcher/block-transformations-menu.js.map +1 -1
- package/build-module/components/block-switcher/block-transformations-menu.native.js +9 -10
- package/build-module/components/block-switcher/block-transformations-menu.native.js.map +1 -1
- package/build-module/components/block-switcher/block-variation-transformations.js +21 -30
- package/build-module/components/block-switcher/block-variation-transformations.js.map +1 -1
- package/build-module/components/block-switcher/index.js +47 -60
- package/build-module/components/block-switcher/index.js.map +1 -1
- package/build-module/components/block-switcher/pattern-transformations-menu.js +18 -22
- package/build-module/components/block-switcher/pattern-transformations-menu.js.map +1 -1
- package/build-module/components/block-switcher/preview-block-popover.js +3 -4
- package/build-module/components/block-switcher/preview-block-popover.js.map +1 -1
- package/build-module/components/block-switcher/utils.js +2 -3
- package/build-module/components/block-switcher/utils.js.map +1 -1
- package/build-module/components/block-title/index.js +5 -6
- package/build-module/components/block-title/index.js.map +1 -1
- package/build-module/components/block-title/use-block-display-title.js +5 -6
- package/build-module/components/block-title/use-block-display-title.js.map +1 -1
- package/build-module/components/block-toolbar/index.js +4 -5
- package/build-module/components/block-toolbar/index.js.map +1 -1
- package/build-module/components/block-toolbar/utils.js +14 -16
- 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 +5 -6
- package/build-module/components/block-tools/block-contextual-toolbar.js.map +1 -1
- package/build-module/components/block-tools/block-selection-button.js +6 -9
- package/build-module/components/block-tools/block-selection-button.js.map +1 -1
- package/build-module/components/block-tools/index.js +6 -7
- package/build-module/components/block-tools/index.js.map +1 -1
- package/build-module/components/block-tools/insertion-point.js +7 -10
- package/build-module/components/block-tools/insertion-point.js.map +1 -1
- package/build-module/components/block-tools/selected-block-popover.js +19 -20
- 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 +9 -14
- 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 -4
- package/build-module/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
- package/build-module/components/block-types-list/index.js +8 -9
- package/build-module/components/block-types-list/index.js.map +1 -1
- package/build-module/components/block-types-list/index.native.js +22 -27
- package/build-module/components/block-types-list/index.native.js.map +1 -1
- package/build-module/components/block-variation-picker/index.js +8 -9
- package/build-module/components/block-variation-picker/index.js.map +1 -1
- package/build-module/components/block-variation-picker/index.native.js +7 -9
- package/build-module/components/block-variation-picker/index.native.js.map +1 -1
- package/build-module/components/block-variation-transforms/index.js +30 -41
- package/build-module/components/block-variation-transforms/index.js.map +1 -1
- package/build-module/components/block-vertical-alignment-control/ui.js +7 -9
- package/build-module/components/block-vertical-alignment-control/ui.js.map +1 -1
- package/build-module/components/border-radius-control/all-input-control.js +7 -8
- package/build-module/components/border-radius-control/all-input-control.js.map +1 -1
- package/build-module/components/border-radius-control/index.js +9 -10
- package/build-module/components/border-radius-control/index.js.map +1 -1
- package/build-module/components/border-radius-control/input-controls.js +8 -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 -5
- package/build-module/components/border-radius-control/linked-button.js.map +1 -1
- package/build-module/components/border-radius-control/utils.js +3 -7
- package/build-module/components/border-radius-control/utils.js.map +1 -1
- package/build-module/components/button-block-appender/index.js +13 -15
- package/build-module/components/button-block-appender/index.js.map +1 -1
- package/build-module/components/button-block-appender/index.native.js +25 -29
- package/build-module/components/button-block-appender/index.native.js.map +1 -1
- package/build-module/components/caption/index.native.js +40 -43
- package/build-module/components/caption/index.native.js.map +1 -1
- package/build-module/components/child-layout-control/index.js +5 -6
- package/build-module/components/child-layout-control/index.js.map +1 -1
- package/build-module/components/color-palette/control.js +5 -6
- package/build-module/components/color-palette/control.js.map +1 -1
- package/build-module/components/color-palette/with-color-context.js +1 -6
- package/build-module/components/color-palette/with-color-context.js.map +1 -1
- package/build-module/components/color-style-selector/index.js +28 -35
- package/build-module/components/color-style-selector/index.js.map +1 -1
- package/build-module/components/colors/utils.js +5 -8
- package/build-module/components/colors/utils.js.map +1 -1
- package/build-module/components/colors/with-colors.js +9 -24
- package/build-module/components/colors/with-colors.js.map +1 -1
- package/build-module/components/colors-gradients/control.js +19 -21
- package/build-module/components/colors-gradients/control.js.map +1 -1
- package/build-module/components/colors-gradients/dropdown.js +32 -39
- package/build-module/components/colors-gradients/dropdown.js.map +1 -1
- package/build-module/components/colors-gradients/panel-color-gradient-settings.js +20 -24
- 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 +27 -31
- package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
- package/build-module/components/contrast-checker/index.js +12 -13
- package/build-module/components/contrast-checker/index.js.map +1 -1
- package/build-module/components/contrast-checker/index.native.js +16 -18
- package/build-module/components/contrast-checker/index.native.js.map +1 -1
- package/build-module/components/convert-to-group-buttons/index.js +9 -10
- package/build-module/components/convert-to-group-buttons/index.js.map +1 -1
- package/build-module/components/convert-to-group-buttons/index.native.js +6 -7
- package/build-module/components/convert-to-group-buttons/index.native.js.map +1 -1
- package/build-module/components/convert-to-group-buttons/toolbar.js +6 -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 +4 -6
- 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 +4 -7
- package/build-module/components/copy-handler/index.js.map +1 -1
- package/build-module/components/date-format-picker/index.js +12 -16
- 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 +8 -10
- package/build-module/components/default-block-appender/index.native.js.map +1 -1
- package/build-module/components/default-style-picker/index.js +14 -22
- package/build-module/components/default-style-picker/index.js.map +1 -1
- package/build-module/components/duotone/components.js +14 -18
- package/build-module/components/duotone/components.js.map +1 -1
- package/build-module/components/duotone/utils.js +1 -2
- package/build-module/components/duotone/utils.js.map +1 -1
- package/build-module/components/duotone-control/index.js +12 -15
- package/build-module/components/duotone-control/index.js.map +1 -1
- package/build-module/components/editable-text/index.js +5 -6
- package/build-module/components/editable-text/index.js.map +1 -1
- package/build-module/components/editor-styles/index.js +4 -5
- package/build-module/components/editor-styles/index.js.map +1 -1
- package/build-module/components/floating-toolbar/index.native.js +7 -8
- package/build-module/components/floating-toolbar/index.native.js.map +1 -1
- package/build-module/components/font-appearance-control/index.js +19 -26
- package/build-module/components/font-appearance-control/index.js.map +1 -1
- package/build-module/components/font-family/index.js +10 -12
- package/build-module/components/font-family/index.js.map +1 -1
- package/build-module/components/font-sizes/fluid-utils.js +17 -21
- package/build-module/components/font-sizes/fluid-utils.js.map +1 -1
- package/build-module/components/font-sizes/utils.js +6 -12
- package/build-module/components/font-sizes/utils.js.map +1 -1
- package/build-module/components/font-sizes/with-font-sizes.js +11 -30
- package/build-module/components/font-sizes/with-font-sizes.js.map +1 -1
- package/build-module/components/global-styles/advanced-panel.js +7 -10
- package/build-module/components/global-styles/advanced-panel.js.map +1 -1
- package/build-module/components/global-styles/border-panel.js +45 -78
- package/build-module/components/global-styles/border-panel.js.map +1 -1
- package/build-module/components/global-styles/color-panel.js +104 -147
- package/build-module/components/global-styles/color-panel.js.map +1 -1
- package/build-module/components/global-styles/color-panel.native.js +25 -42
- package/build-module/components/global-styles/color-panel.native.js.map +1 -1
- package/build-module/components/global-styles/dimensions-panel.js +78 -109
- package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
- package/build-module/components/global-styles/effects-panel.js +58 -72
- package/build-module/components/global-styles/effects-panel.js.map +1 -1
- package/build-module/components/global-styles/filters-panel.js +53 -71
- package/build-module/components/global-styles/filters-panel.js.map +1 -1
- package/build-module/components/global-styles/get-block-css-selector.js +5 -8
- package/build-module/components/global-styles/get-block-css-selector.js.map +1 -1
- package/build-module/components/global-styles/hooks.js +22 -37
- package/build-module/components/global-styles/hooks.js.map +1 -1
- package/build-module/components/global-styles/typography-panel.js +69 -125
- package/build-module/components/global-styles/typography-panel.js.map +1 -1
- package/build-module/components/global-styles/typography-utils.js +48 -26
- package/build-module/components/global-styles/typography-utils.js.map +1 -1
- package/build-module/components/global-styles/use-global-styles-output.js +142 -237
- package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build-module/components/global-styles/utils.js +12 -28
- package/build-module/components/global-styles/utils.js.map +1 -1
- package/build-module/components/gradients/use-gradient.js +6 -7
- package/build-module/components/gradients/use-gradient.js.map +1 -1
- package/build-module/components/height-control/index.js +9 -10
- package/build-module/components/height-control/index.js.map +1 -1
- package/build-module/components/iframe/index.js +51 -86
- package/build-module/components/iframe/index.js.map +1 -1
- package/build-module/components/iframe/use-compatibility-styles.js +29 -20
- package/build-module/components/iframe/use-compatibility-styles.js.map +1 -1
- package/build-module/components/image-editor/aspect-ratio-dropdown.js +83 -91
- package/build-module/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
- package/build-module/components/image-editor/context.js +9 -10
- package/build-module/components/image-editor/context.js.map +1 -1
- package/build-module/components/image-editor/cropper.js +11 -12
- package/build-module/components/image-editor/cropper.js.map +1 -1
- package/build-module/components/image-editor/index.js +12 -13
- package/build-module/components/image-editor/index.js.map +1 -1
- package/build-module/components/image-editor/use-save-image.js +11 -12
- package/build-module/components/image-editor/use-save-image.js.map +1 -1
- package/build-module/components/image-editor/use-transform-image.js +5 -6
- package/build-module/components/image-editor/use-transform-image.js.map +1 -1
- package/build-module/components/image-editor/zoom-dropdown.js +10 -13
- package/build-module/components/image-editor/zoom-dropdown.js.map +1 -1
- package/build-module/components/image-size-control/index.js +12 -13
- package/build-module/components/image-size-control/index.js.map +1 -1
- package/build-module/components/inner-blocks/button-block-appender.js +7 -8
- package/build-module/components/inner-blocks/button-block-appender.js.map +1 -1
- package/build-module/components/inner-blocks/default-block-appender.js +6 -8
- package/build-module/components/inner-blocks/default-block-appender.js.map +1 -1
- package/build-module/components/inner-blocks/index.js +2 -6
- package/build-module/components/inner-blocks/index.js.map +1 -1
- package/build-module/components/inner-blocks/index.native.js +1 -3
- package/build-module/components/inner-blocks/index.native.js.map +1 -1
- package/build-module/components/inner-blocks/use-block-context.js +1 -4
- package/build-module/components/inner-blocks/use-block-context.js.map +1 -1
- package/build-module/components/inner-blocks/use-nested-settings-update.js +2 -4
- package/build-module/components/inner-blocks/use-nested-settings-update.js.map +1 -1
- package/build-module/components/inserter/block-patterns-explorer/explorer.js +9 -11
- package/build-module/components/inserter/block-patterns-explorer/explorer.js.map +1 -1
- package/build-module/components/inserter/block-patterns-explorer/patterns-list.js +11 -18
- package/build-module/components/inserter/block-patterns-explorer/patterns-list.js.map +1 -1
- package/build-module/components/inserter/block-patterns-explorer/sidebar.js +20 -24
- package/build-module/components/inserter/block-patterns-explorer/sidebar.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab.js +29 -40
- package/build-module/components/inserter/block-patterns-tab.js.map +1 -1
- package/build-module/components/inserter/block-types-tab.js +7 -9
- package/build-module/components/inserter/block-types-tab.js.map +1 -1
- package/build-module/components/inserter/block-types-tab.native.js +8 -9
- 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 +3 -5
- 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 +5 -6
- 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 +2 -2
- package/build-module/components/inserter/hooks/use-clipboard-block.native.js.map +1 -1
- package/build-module/components/inserter/hooks/use-debounced-input.js +1 -2
- package/build-module/components/inserter/hooks/use-debounced-input.js.map +1 -1
- package/build-module/components/inserter/hooks/use-insertion-point.js +10 -12
- package/build-module/components/inserter/hooks/use-insertion-point.js.map +1 -1
- package/build-module/components/inserter/index.js +37 -51
- package/build-module/components/inserter/index.js.map +1 -1
- package/build-module/components/inserter/index.native.js +24 -31
- package/build-module/components/inserter/index.native.js.map +1 -1
- package/build-module/components/inserter/library.js +11 -12
- package/build-module/components/inserter/library.js.map +1 -1
- package/build-module/components/inserter/media-tab/hooks.js +2 -5
- package/build-module/components/inserter/media-tab/hooks.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-list.js +6 -7
- package/build-module/components/inserter/media-tab/media-list.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-panel.js +12 -14
- package/build-module/components/inserter/media-tab/media-panel.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-preview.js +47 -58
- package/build-module/components/inserter/media-tab/media-preview.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-tab.js +24 -28
- package/build-module/components/inserter/media-tab/media-tab.js.map +1 -1
- package/build-module/components/inserter/media-tab/utils.js +3 -5
- package/build-module/components/inserter/media-tab/utils.js.map +1 -1
- package/build-module/components/inserter/menu.js +15 -19
- package/build-module/components/inserter/menu.js.map +1 -1
- package/build-module/components/inserter/menu.native.js +27 -31
- package/build-module/components/inserter/menu.native.js.map +1 -1
- package/build-module/components/inserter/mobile-tab-navigation.js +7 -9
- package/build-module/components/inserter/mobile-tab-navigation.js.map +1 -1
- package/build-module/components/inserter/panel.js +5 -6
- package/build-module/components/inserter/panel.js.map +1 -1
- package/build-module/components/inserter/preview-panel.js +4 -5
- package/build-module/components/inserter/preview-panel.js.map +1 -1
- package/build-module/components/inserter/quick-inserter.js +8 -9
- package/build-module/components/inserter/quick-inserter.js.map +1 -1
- package/build-module/components/inserter/reusable-blocks-tab.js +13 -18
- package/build-module/components/inserter/reusable-blocks-tab.js.map +1 -1
- package/build-module/components/inserter/reusable-blocks-tab.native.js +5 -6
- package/build-module/components/inserter/reusable-blocks-tab.native.js.map +1 -1
- package/build-module/components/inserter/search-items.js +12 -40
- package/build-module/components/inserter/search-items.js.map +1 -1
- package/build-module/components/inserter/search-results.js +17 -18
- package/build-module/components/inserter/search-results.js.map +1 -1
- package/build-module/components/inserter/search-results.native.js +11 -12
- package/build-module/components/inserter/search-results.native.js.map +1 -1
- package/build-module/components/inserter/tabs.js +8 -9
- package/build-module/components/inserter/tabs.js.map +1 -1
- package/build-module/components/inserter/tabs.native.js +37 -55
- package/build-module/components/inserter/tabs.native.js.map +1 -1
- package/build-module/components/inserter/utils.native.js +13 -17
- package/build-module/components/inserter/utils.native.js.map +1 -1
- package/build-module/components/inserter-draggable-blocks/index.js +11 -13
- package/build-module/components/inserter-draggable-blocks/index.js.map +1 -1
- package/build-module/components/inserter-list-item/index.js +65 -69
- package/build-module/components/inserter-list-item/index.js.map +1 -1
- package/build-module/components/inserter-listbox/index.js +3 -4
- package/build-module/components/inserter-listbox/index.js.map +1 -1
- package/build-module/components/inserter-listbox/item.js +6 -7
- package/build-module/components/inserter-listbox/item.js.map +1 -1
- package/build-module/components/inspector-controls/block-support-slot-container.js +4 -5
- 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 +6 -8
- package/build-module/components/inspector-controls/block-support-tools-panel.js.map +1 -1
- package/build-module/components/inspector-controls/fill.js +13 -23
- package/build-module/components/inspector-controls/fill.js.map +1 -1
- package/build-module/components/inspector-controls/fill.native.js +7 -11
- package/build-module/components/inspector-controls/fill.native.js.map +1 -1
- package/build-module/components/inspector-controls/slot.js +9 -13
- package/build-module/components/inspector-controls/slot.js.map +1 -1
- package/build-module/components/inspector-controls/slot.native.js +6 -10
- package/build-module/components/inspector-controls/slot.native.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/index.js +6 -7
- 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 +1 -1
- package/build-module/components/inspector-controls-tabs/settings-tab-hint.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/settings-tab.js +3 -6
- package/build-module/components/inspector-controls-tabs/settings-tab.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/styles-tab.js +5 -6
- 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 +1 -3
- package/build-module/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +1 -1
- package/build-module/components/inspector-popover-header/index.js +18 -22
- package/build-module/components/inspector-popover-header/index.js.map +1 -1
- package/build-module/components/justify-content-control/ui.js +8 -10
- package/build-module/components/justify-content-control/ui.js.map +1 -1
- package/build-module/components/letter-spacing-control/index.js +6 -7
- package/build-module/components/letter-spacing-control/index.js.map +1 -1
- package/build-module/components/line-height-control/index.js +13 -18
- package/build-module/components/line-height-control/index.js.map +1 -1
- package/build-module/components/line-height-control/index.native.js +4 -5
- package/build-module/components/line-height-control/index.native.js.map +1 -1
- package/build-module/components/link-control/index.js +83 -64
- package/build-module/components/link-control/index.js.map +1 -1
- package/build-module/components/link-control/is-url-like.js +32 -3
- package/build-module/components/link-control/is-url-like.js.map +1 -1
- package/build-module/components/link-control/link-preview.js +24 -27
- package/build-module/components/link-control/link-preview.js.map +1 -1
- package/build-module/components/link-control/search-create-button.js +7 -9
- package/build-module/components/link-control/search-create-button.js.map +1 -1
- package/build-module/components/link-control/search-input.js +22 -27
- package/build-module/components/link-control/search-input.js.map +1 -1
- package/build-module/components/link-control/search-item.js +13 -15
- package/build-module/components/link-control/search-item.js.map +1 -1
- package/build-module/components/link-control/search-results.js +21 -27
- package/build-module/components/link-control/search-results.js.map +1 -1
- package/build-module/components/link-control/settings-drawer.js +7 -33
- package/build-module/components/link-control/settings-drawer.js.map +1 -1
- package/build-module/components/link-control/settings.js +7 -9
- package/build-module/components/link-control/settings.js.map +1 -1
- package/build-module/components/link-control/use-internal-value.js +46 -0
- package/build-module/components/link-control/use-internal-value.js.map +1 -0
- package/build-module/components/link-control/use-rich-url-data.js +1 -1
- 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 -23
- package/build-module/components/link-control/use-search-handler.js.map +1 -1
- package/build-module/components/list-view/appender.js +11 -12
- package/build-module/components/list-view/appender.js.map +1 -1
- package/build-module/components/list-view/aria-referenced-text.js +35 -0
- package/build-module/components/list-view/aria-referenced-text.js.map +1 -0
- package/build-module/components/list-view/block-contents.js +38 -38
- package/build-module/components/list-view/block-contents.js.map +1 -1
- package/build-module/components/list-view/block-select-button.js +65 -22
- package/build-module/components/list-view/block-select-button.js.map +1 -1
- package/build-module/components/list-view/block.js +117 -101
- package/build-module/components/list-view/block.js.map +1 -1
- package/build-module/components/list-view/branch.js +5 -5
- package/build-module/components/list-view/branch.js.map +1 -1
- package/build-module/components/list-view/drop-indicator.js +4 -5
- package/build-module/components/list-view/drop-indicator.js.map +1 -1
- package/build-module/components/list-view/expander.js +3 -4
- package/build-module/components/list-view/expander.js.map +1 -1
- package/build-module/components/list-view/index.js +46 -43
- package/build-module/components/list-view/index.js.map +1 -1
- package/build-module/components/list-view/leaf.js +10 -11
- package/build-module/components/list-view/leaf.js.map +1 -1
- package/build-module/components/list-view/use-block-selection.js +4 -6
- 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 +9 -12
- 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 +25 -13
- 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 +4 -5
- 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-scroll-into-view.js +5 -6
- package/build-module/components/list-view/use-list-view-scroll-into-view.js.map +1 -1
- package/build-module/components/media-placeholder/index.js +71 -92
- package/build-module/components/media-placeholder/index.js.map +1 -1
- package/build-module/components/media-placeholder/index.native.js +5 -6
- package/build-module/components/media-placeholder/index.native.js.map +1 -1
- package/build-module/components/media-replace-flow/index.js +94 -107
- package/build-module/components/media-replace-flow/index.js.map +1 -1
- package/build-module/components/media-upload/check.js +4 -5
- package/build-module/components/media-upload/check.js.map +1 -1
- package/build-module/components/media-upload/index.native.js +1 -1
- package/build-module/components/media-upload/index.native.js.map +1 -1
- package/build-module/components/multi-selection-inspector/index.js +3 -4
- package/build-module/components/multi-selection-inspector/index.js.map +1 -1
- package/build-module/components/navigable-toolbar/index.js +16 -15
- package/build-module/components/navigable-toolbar/index.js.map +1 -1
- package/build-module/components/observe-typing/index.js +3 -4
- package/build-module/components/observe-typing/index.js.map +1 -1
- package/build-module/components/panel-color-settings/index.js +4 -5
- package/build-module/components/panel-color-settings/index.js.map +1 -1
- package/build-module/components/plain-text/index.js +4 -6
- package/build-module/components/plain-text/index.js.map +1 -1
- package/build-module/components/plain-text/index.native.js +8 -14
- package/build-module/components/plain-text/index.native.js.map +1 -1
- package/build-module/components/preview-options/index.js +8 -9
- package/build-module/components/preview-options/index.js.map +1 -1
- package/build-module/components/provider/block-refs-provider.js +3 -4
- package/build-module/components/provider/block-refs-provider.js.map +1 -1
- package/build-module/components/provider/use-block-sync.js +7 -8
- package/build-module/components/provider/use-block-sync.js.map +1 -1
- package/build-module/components/provider/with-registry-provider.js +5 -7
- package/build-module/components/provider/with-registry-provider.js.map +1 -1
- package/build-module/components/publish-date-time-picker/index.js +6 -7
- package/build-module/components/publish-date-time-picker/index.js.map +1 -1
- package/build-module/components/recursion-provider/index.js +7 -11
- package/build-module/components/recursion-provider/index.js.map +1 -1
- package/build-module/components/resizable-box-popover/index.js +5 -6
- package/build-module/components/resizable-box-popover/index.js.map +1 -1
- package/build-module/components/responsive-block-control/label.js +5 -6
- package/build-module/components/responsive-block-control/label.js.map +1 -1
- package/build-module/components/rich-text/embed-handler-picker.native.js +6 -10
- package/build-module/components/rich-text/embed-handler-picker.native.js.map +1 -1
- package/build-module/components/rich-text/format-edit.js +7 -8
- package/build-module/components/rich-text/format-edit.js.map +1 -1
- package/build-module/components/rich-text/format-toolbar/index.js +9 -18
- package/build-module/components/rich-text/format-toolbar/index.js.map +1 -1
- package/build-module/components/rich-text/format-toolbar-container.js +13 -16
- package/build-module/components/rich-text/format-toolbar-container.js.map +1 -1
- package/build-module/components/rich-text/index.js +43 -47
- package/build-module/components/rich-text/index.js.map +1 -1
- package/build-module/components/rich-text/index.native.js +130 -157
- package/build-module/components/rich-text/index.native.js.map +1 -1
- package/build-module/components/rich-text/input-event.js +4 -5
- package/build-module/components/rich-text/input-event.js.map +1 -1
- package/build-module/components/rich-text/shortcut.js +5 -6
- package/build-module/components/rich-text/shortcut.js.map +1 -1
- package/build-module/components/rich-text/split-value.js +8 -10
- package/build-module/components/rich-text/split-value.js.map +1 -1
- package/build-module/components/rich-text/toolbar-button.js +6 -7
- package/build-module/components/rich-text/toolbar-button.js.map +1 -1
- package/build-module/components/rich-text/use-before-input-rules.js +1 -4
- package/build-module/components/rich-text/use-before-input-rules.js.map +1 -1
- package/build-module/components/rich-text/use-enter.js +3 -6
- package/build-module/components/rich-text/use-enter.js.map +1 -1
- package/build-module/components/rich-text/use-firefox-compat.js +29 -1
- package/build-module/components/rich-text/use-firefox-compat.js.map +1 -1
- package/build-module/components/rich-text/use-format-types.js +11 -17
- package/build-module/components/rich-text/use-format-types.js.map +1 -1
- package/build-module/components/rich-text/use-input-rules.js +9 -15
- package/build-module/components/rich-text/use-input-rules.js.map +1 -1
- package/build-module/components/rich-text/use-mark-persistent.js +4 -5
- package/build-module/components/rich-text/use-mark-persistent.js.map +1 -1
- package/build-module/components/rich-text/use-paste-handler.js +5 -7
- package/build-module/components/rich-text/use-paste-handler.js.map +1 -1
- package/build-module/components/rich-text/utils.js +5 -7
- package/build-module/components/rich-text/utils.js.map +1 -1
- package/build-module/components/skip-to-selected-block/index.js +3 -4
- package/build-module/components/skip-to-selected-block/index.js.map +1 -1
- package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.js +27 -0
- package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -0
- package/build-module/components/spacing-sizes-control/index.js +62 -63
- package/build-module/components/spacing-sizes-control/index.js.map +1 -1
- package/build-module/components/spacing-sizes-control/{axial-input-controls.js → input-controls/axial.js} +21 -22
- package/build-module/components/spacing-sizes-control/input-controls/axial.js.map +1 -0
- package/build-module/components/spacing-sizes-control/{input-controls.js → input-controls/separated.js} +21 -21
- package/build-module/components/spacing-sizes-control/input-controls/separated.js.map +1 -0
- package/build-module/components/spacing-sizes-control/input-controls/single.js +40 -0
- package/build-module/components/spacing-sizes-control/input-controls/single.js.map +1 -0
- package/build-module/components/spacing-sizes-control/{spacing-input-control.js → input-controls/spacing-input-control.js} +53 -70
- package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -0
- package/build-module/components/spacing-sizes-control/sides-dropdown/index.js +73 -0
- package/build-module/components/spacing-sizes-control/sides-dropdown/index.js.map +1 -0
- package/build-module/components/spacing-sizes-control/utils.js +196 -25
- package/build-module/components/spacing-sizes-control/utils.js.map +1 -1
- package/build-module/components/text-decoration-control/index.js +5 -6
- package/build-module/components/text-decoration-control/index.js.map +1 -1
- package/build-module/components/text-transform-control/index.js +5 -6
- package/build-module/components/text-transform-control/index.js.map +1 -1
- package/build-module/components/tool-selector/index.js +13 -16
- package/build-module/components/tool-selector/index.js.map +1 -1
- package/build-module/components/typewriter/index.js +6 -9
- package/build-module/components/typewriter/index.js.map +1 -1
- package/build-module/components/ungroup-button/index.native.js +11 -14
- package/build-module/components/ungroup-button/index.native.js.map +1 -1
- package/build-module/components/unit-control/index.js +4 -5
- package/build-module/components/unit-control/index.js.map +1 -1
- package/build-module/components/url-input/index.js +15 -26
- package/build-module/components/url-input/index.js.map +1 -1
- package/build-module/components/url-input/index.native.js +6 -8
- package/build-module/components/url-input/index.native.js.map +1 -1
- package/build-module/components/url-popover/image-url-input-ui.js +12 -15
- package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
- package/build-module/components/url-popover/index.js +12 -14
- package/build-module/components/url-popover/index.js.map +1 -1
- package/build-module/components/url-popover/link-editor.js +7 -8
- package/build-module/components/url-popover/link-editor.js.map +1 -1
- package/build-module/components/url-popover/link-viewer-url.js +5 -6
- package/build-module/components/url-popover/link-viewer-url.js.map +1 -1
- package/build-module/components/url-popover/link-viewer.js +8 -9
- package/build-module/components/url-popover/link-viewer.js.map +1 -1
- package/build-module/components/use-block-display-information/index.js +2 -2
- package/build-module/components/use-block-display-information/index.js.map +1 -1
- package/build-module/components/use-block-drop-zone/index.js +16 -23
- package/build-module/components/use-block-drop-zone/index.js.map +1 -1
- package/build-module/components/use-block-drop-zone/index.native.js +8 -11
- package/build-module/components/use-block-drop-zone/index.native.js.map +1 -1
- package/build-module/components/use-moving-animation/index.js +9 -12
- package/build-module/components/use-moving-animation/index.js.map +1 -1
- package/build-module/components/use-on-block-drop/index.js +2 -6
- package/build-module/components/use-on-block-drop/index.js.map +1 -1
- package/build-module/components/use-on-block-drop/index.native.js +8 -10
- package/build-module/components/use-on-block-drop/index.native.js.map +1 -1
- package/build-module/components/use-paste-styles/index.js +2 -6
- package/build-module/components/use-paste-styles/index.js.map +1 -1
- package/build-module/components/warning/index.js +6 -7
- package/build-module/components/warning/index.js.map +1 -1
- package/build-module/components/warning/index.native.js +9 -10
- package/build-module/components/warning/index.native.js.map +1 -1
- package/build-module/components/writing-flow/index.js +4 -5
- package/build-module/components/writing-flow/index.js.map +1 -1
- package/build-module/components/writing-flow/use-drag-selection.js +4 -6
- package/build-module/components/writing-flow/use-drag-selection.js.map +1 -1
- package/build-module/components/writing-flow/use-tab-nav.js +9 -6
- package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
- package/build-module/hooks/align.js +7 -14
- package/build-module/hooks/align.js.map +1 -1
- package/build-module/hooks/anchor.js +5 -3
- package/build-module/hooks/anchor.js.map +1 -1
- package/build-module/hooks/aria-label.js +1 -3
- package/build-module/hooks/aria-label.js.map +1 -1
- package/build-module/hooks/behaviors.js +90 -58
- package/build-module/hooks/behaviors.js.map +1 -1
- package/build-module/hooks/border.js +25 -38
- package/build-module/hooks/border.js.map +1 -1
- package/build-module/hooks/color.js +22 -37
- package/build-module/hooks/color.js.map +1 -1
- package/build-module/hooks/content-lock-ui.js +23 -27
- package/build-module/hooks/content-lock-ui.js.map +1 -1
- package/build-module/hooks/contrast-checker.js +4 -7
- package/build-module/hooks/contrast-checker.js.map +1 -1
- package/build-module/hooks/custom-class-name.js +4 -4
- package/build-module/hooks/custom-class-name.js.map +1 -1
- package/build-module/hooks/dimensions.js +6 -9
- package/build-module/hooks/dimensions.js.map +1 -1
- package/build-module/hooks/duotone.js +32 -44
- package/build-module/hooks/duotone.js.map +1 -1
- package/build-module/hooks/font-family.js +5 -6
- package/build-module/hooks/font-family.js.map +1 -1
- package/build-module/hooks/font-size.js +14 -21
- package/build-module/hooks/font-size.js.map +1 -1
- package/build-module/hooks/gap.js +5 -6
- package/build-module/hooks/gap.js.map +1 -1
- package/build-module/hooks/layout.js +42 -59
- package/build-module/hooks/layout.js.map +1 -1
- package/build-module/hooks/line-height.js +5 -8
- package/build-module/hooks/line-height.js.map +1 -1
- package/build-module/hooks/lock.js +2 -2
- package/build-module/hooks/lock.js.map +1 -1
- package/build-module/hooks/margin.js +6 -9
- package/build-module/hooks/margin.js.map +1 -1
- package/build-module/hooks/metadata-name.js +4 -5
- 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 +6 -9
- package/build-module/hooks/padding.js.map +1 -1
- package/build-module/hooks/position.js +26 -40
- package/build-module/hooks/position.js.map +1 -1
- package/build-module/hooks/settings.js +1 -3
- package/build-module/hooks/settings.js.map +1 -1
- package/build-module/hooks/style.js +11 -19
- package/build-module/hooks/style.js.map +1 -1
- package/build-module/hooks/supports.js +3 -5
- package/build-module/hooks/supports.js.map +1 -1
- package/build-module/hooks/typography.js +18 -27
- package/build-module/hooks/typography.js.map +1 -1
- package/build-module/hooks/typography.native.js +1 -2
- package/build-module/hooks/typography.native.js.map +1 -1
- package/build-module/hooks/use-border-props.js +1 -3
- package/build-module/hooks/use-border-props.js.map +1 -1
- package/build-module/hooks/use-color-props.js +6 -8
- package/build-module/hooks/use-color-props.js.map +1 -1
- package/build-module/hooks/use-editor-wrapper-styles.native.js +34 -39
- package/build-module/hooks/use-editor-wrapper-styles.native.js.map +1 -1
- package/build-module/hooks/use-spacing-props.js +1 -1
- package/build-module/hooks/use-spacing-props.js.map +1 -1
- package/build-module/hooks/use-typography-props.js +8 -12
- package/build-module/hooks/use-typography-props.js.map +1 -1
- package/build-module/hooks/utils.js +7 -19
- package/build-module/hooks/utils.js.map +1 -1
- package/build-module/layouts/constrained.js +22 -27
- package/build-module/layouts/constrained.js.map +1 -1
- package/build-module/layouts/flex.js +43 -54
- package/build-module/layouts/flex.js.map +1 -1
- package/build-module/layouts/flow.js +10 -13
- package/build-module/layouts/flow.js.map +1 -1
- package/build-module/layouts/grid.js +45 -25
- package/build-module/layouts/grid.js.map +1 -1
- package/build-module/layouts/index.js +1 -2
- package/build-module/layouts/index.js.map +1 -1
- package/build-module/layouts/utils.js +3 -9
- package/build-module/layouts/utils.js.map +1 -1
- package/build-module/store/actions.js +253 -336
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/array.js +1 -2
- package/build-module/store/array.js.map +1 -1
- package/build-module/store/private-actions.js +3 -7
- package/build-module/store/private-actions.js.map +1 -1
- package/build-module/store/private-selectors.js +40 -25
- package/build-module/store/private-selectors.js.map +1 -1
- package/build-module/store/reducer.js +67 -169
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +144 -215
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/utils/block-variation-transforms.js +4 -7
- package/build-module/utils/block-variation-transforms.js.map +1 -1
- package/build-module/utils/math.js +1 -2
- package/build-module/utils/math.js.map +1 -1
- package/build-module/utils/object.js +1 -4
- package/build-module/utils/object.js.map +1 -1
- package/build-module/utils/order-inserter-block-items.js +5 -7
- package/build-module/utils/order-inserter-block-items.js.map +1 -1
- package/build-module/utils/parse-css-unit-to-px.js +3 -6
- package/build-module/utils/parse-css-unit-to-px.js.map +1 -1
- package/build-module/utils/pasting.js +5 -8
- package/build-module/utils/pasting.js.map +1 -1
- package/build-module/utils/pre-parse-patterns.js +1 -1
- package/build-module/utils/pre-parse-patterns.js.map +1 -1
- package/build-module/utils/sorting.js +1 -2
- package/build-module/utils/sorting.js.map +1 -1
- package/build-module/utils/transform-styles/index.js +5 -7
- package/build-module/utils/transform-styles/index.js.map +1 -1
- package/build-module/utils/transform-styles/transforms/wrap.js +25 -28
- package/build-module/utils/transform-styles/transforms/wrap.js.map +1 -1
- package/build-style/content-rtl.css +7 -10
- package/build-style/content.css +7 -10
- package/build-style/style-rtl.css +35 -101
- package/build-style/style.css +35 -101
- package/package.json +31 -31
- package/src/components/block-controls/fill.js +15 -17
- package/src/components/block-controls/slot.js +21 -18
- package/src/components/block-controls/slot.native.js +3 -8
- package/src/components/block-draggable/index.js +2 -1
- package/src/components/block-edit/test/edit.js +1 -1
- package/src/components/block-inspector/index.js +1 -0
- package/src/components/block-list/content.scss +8 -12
- package/src/components/block-list/use-block-props/index.js +6 -1
- package/src/components/block-list-appender/index.js +4 -1
- package/src/components/block-lock/toolbar.js +2 -8
- package/src/components/block-settings-menu/block-settings-dropdown.js +81 -41
- package/src/components/block-tools/selected-block-popover.js +6 -0
- package/src/components/color-palette/test/__snapshots__/control.js.snap +66 -50
- package/src/components/color-palette/with-color-context.js +2 -6
- package/src/components/colors-gradients/control.js +3 -3
- package/src/components/colors-gradients/panel-color-gradient-settings.js +4 -5
- package/src/components/global-styles/dimensions-panel.js +14 -5
- package/src/components/global-styles/get-block-css-selector.js +2 -2
- package/src/components/global-styles/test/typography-utils.js +139 -1
- package/src/components/global-styles/typography-utils.js +53 -28
- package/src/components/global-styles/use-global-styles-output.js +18 -8
- package/src/components/global-styles/utils.js +9 -3
- package/src/components/iframe/index.js +46 -68
- package/src/components/iframe/use-compatibility-styles.js +34 -18
- package/src/components/inspector-controls/README.md +1 -1
- package/src/components/inspector-controls/fill.js +2 -6
- package/src/components/inspector-controls-tabs/index.js +0 -1
- package/src/components/inspector-controls-tabs/use-inspector-controls-tabs.js +0 -1
- package/src/components/link-control/index.js +71 -33
- package/src/components/link-control/is-url-like.js +40 -3
- package/src/components/link-control/search-results.js +4 -14
- package/src/components/link-control/settings-drawer.js +2 -37
- package/src/components/link-control/settings.js +2 -2
- package/src/components/link-control/style.scss +5 -6
- package/src/components/link-control/test/index.js +169 -61
- package/src/components/link-control/test/is-url-like.js +66 -0
- package/src/components/link-control/use-internal-value.js +60 -0
- package/src/components/link-control/use-search-handler.js +10 -27
- package/src/components/list-view/appender.js +3 -5
- package/src/components/list-view/aria-referenced-text.js +30 -0
- package/src/components/list-view/block-contents.js +9 -8
- package/src/components/list-view/block-select-button.js +59 -1
- package/src/components/list-view/block.js +40 -10
- package/src/components/list-view/index.js +29 -19
- package/src/components/list-view/style.scss +0 -5
- package/src/components/list-view/test/use-list-view-drop-zone.js +38 -1
- package/src/components/list-view/use-block-selection.js +2 -2
- package/src/components/list-view/use-list-view-drop-zone.js +22 -4
- package/src/components/media-replace-flow/test/index.js +1 -1
- package/src/components/navigable-toolbar/index.js +7 -5
- package/src/components/rich-text/index.js +1 -1
- package/src/components/rich-text/use-firefox-compat.js +27 -1
- package/src/components/spacing-sizes-control/hooks/use-spacing-sizes.js +26 -0
- package/src/components/spacing-sizes-control/index.js +85 -71
- package/src/components/spacing-sizes-control/{axial-input-controls.js → input-controls/axial.js} +14 -13
- package/src/components/spacing-sizes-control/{input-controls.js → input-controls/separated.js} +15 -14
- package/src/components/spacing-sizes-control/input-controls/single.js +40 -0
- package/src/components/spacing-sizes-control/{spacing-input-control.js → input-controls/spacing-input-control.js} +55 -80
- package/src/components/spacing-sizes-control/sides-dropdown/index.js +91 -0
- package/src/components/spacing-sizes-control/style.scss +28 -100
- package/src/components/spacing-sizes-control/test/utils.js +233 -4
- package/src/components/spacing-sizes-control/utils.js +203 -20
- package/src/components/ungroup-button/index.native.js +2 -2
- package/src/components/writing-flow/use-tab-nav.js +14 -3
- package/src/hooks/anchor.js +3 -1
- package/src/hooks/behaviors.js +116 -60
- package/src/hooks/custom-class-name.js +23 -19
- package/src/hooks/layout.js +4 -1
- package/src/hooks/style.js +3 -1
- package/src/hooks/utils.js +8 -7
- package/src/layouts/grid.js +29 -3
- package/src/store/private-selectors.js +54 -32
- package/src/store/reducer.js +6 -8
- package/src/store/selectors.js +31 -20
- package/src/store/test/private-selectors.js +237 -62
- package/src/store/test/reducer.js +0 -7
- package/src/store/test/selectors.js +99 -0
- package/build/components/link-control/use-internal-input-value.js +0 -27
- package/build/components/link-control/use-internal-input-value.js.map +0 -1
- package/build/components/spacing-sizes-control/all-input-control.js +0 -57
- package/build/components/spacing-sizes-control/all-input-control.js.map +0 -1
- package/build/components/spacing-sizes-control/axial-input-controls.js.map +0 -1
- package/build/components/spacing-sizes-control/input-controls.js.map +0 -1
- package/build/components/spacing-sizes-control/linked-button.js +0 -37
- package/build/components/spacing-sizes-control/linked-button.js.map +0 -1
- package/build/components/spacing-sizes-control/spacing-input-control.js.map +0 -1
- package/build/components/ungroup-button/icon.js +0 -31
- package/build/components/ungroup-button/icon.js.map +0 -1
- package/build-module/components/link-control/use-internal-input-value.js +0 -19
- package/build-module/components/link-control/use-internal-input-value.js.map +0 -1
- package/build-module/components/spacing-sizes-control/all-input-control.js +0 -45
- package/build-module/components/spacing-sizes-control/all-input-control.js.map +0 -1
- package/build-module/components/spacing-sizes-control/axial-input-controls.js.map +0 -1
- package/build-module/components/spacing-sizes-control/input-controls.js.map +0 -1
- package/build-module/components/spacing-sizes-control/linked-button.js +0 -27
- package/build-module/components/spacing-sizes-control/linked-button.js.map +0 -1
- package/build-module/components/spacing-sizes-control/spacing-input-control.js.map +0 -1
- package/build-module/components/ungroup-button/icon.js +0 -22
- package/build-module/components/ungroup-button/icon.js.map +0 -1
- package/src/components/link-control/use-internal-input-value.js +0 -23
- package/src/components/spacing-sizes-control/all-input-control.js +0 -44
- package/src/components/spacing-sizes-control/linked-button.js +0 -24
- package/src/components/ungroup-button/icon.js +0 -26
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-editor/src/hooks/supports.js"],"names":["getBlockSupport","hasBlockSupport","Platform","ALIGN_SUPPORT_KEY","ALIGN_WIDE_SUPPORT_KEY","BORDER_SUPPORT_KEY","COLOR_SUPPORT_KEY","CUSTOM_CLASS_NAME_SUPPORT_KEY","FONT_FAMILY_SUPPORT_KEY","FONT_SIZE_SUPPORT_KEY","LINE_HEIGHT_SUPPORT_KEY","FONT_STYLE_SUPPORT_KEY","FONT_WEIGHT_SUPPORT_KEY","TEXT_COLUMNS_SUPPORT_KEY","TEXT_DECORATION_SUPPORT_KEY","TEXT_TRANSFORM_SUPPORT_KEY","LETTER_SPACING_SUPPORT_KEY","LAYOUT_SUPPORT_KEY","TYPOGRAPHY_SUPPORT_KEYS","SPACING_SUPPORT_KEY","styleSupportKeys","hasAlignSupport","nameOrType","getAlignSupport","hasAlignWideSupport","getAlignWideSupport","hasBorderSupport","feature","OS","support","color","radius","width","style","getBorderSupport","hasColorSupport","colorSupport","link","gradient","background","text","hasLinkColorSupport","hasGradientSupport","gradients","hasBackgroundColorSupport","hasTextColorSupport","getColorSupport","hasCustomClassNameSupport","getCustomClassNameSupport","hasFontFamilySupport","getFontFamilySupport","hasFontSizeSupport","getFontSizeSupport","hasLayoutSupport","getLayoutSupport","hasStyleSupport","some","key"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,eAAT,EAA0BC,eAA1B,QAAiD,mBAAjD;AACA,SAASC,QAAT,QAAyB,oBAAzB;AAEA,MAAMC,iBAAiB,GAAG,OAA1B;AACA,MAAMC,sBAAsB,GAAG,WAA/B;AACA,MAAMC,kBAAkB,GAAG,sBAA3B;AACA,MAAMC,iBAAiB,GAAG,OAA1B;AACA,MAAMC,6BAA6B,GAAG,iBAAtC;AACA,MAAMC,uBAAuB,GAAG,qCAAhC;AACA,MAAMC,qBAAqB,GAAG,qBAA9B;AACA,MAAMC,uBAAuB,GAAG,uBAAhC;AACA;AACA;AACA;;AACA,MAAMC,sBAAsB,GAAG,oCAA/B;AACA;AACA;AACA;;AACA,MAAMC,uBAAuB,GAAG,qCAAhC;AACA;AACA;AACA;AACA;;AACA,MAAMC,wBAAwB,GAAG,wBAAjC;AACA;AACA;AACA;AACA;;AACA,MAAMC,2BAA2B,GAAG,yCAApC;AACA;AACA;AACA;AACA;;AACA,MAAMC,0BAA0B,GAAG,wCAAnC;AACA;AACA;AACA;AACA;;AACA,MAAMC,0BAA0B,GAAG,wCAAnC;AACA,MAAMC,kBAAkB,GAAG,sBAA3B;AACA,MAAMC,uBAAuB,GAAG,CAC/BR,uBAD+B,EAE/BD,qBAF+B,EAG/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,uBAAd,CADT;AAGP;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAM2C,kBAAkB,GAAK7B,UAAF,IACjCrB,eAAe,CAAEqB,UAAF,EAAcb,qBAAd,CADT;AAGP;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAM2C,kBAAkB,GAAK9B,UAAF,IACjCtB,eAAe,CAAEsB,UAAF,EAAcb,qBAAd,CADT;AAGP;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAM4C,gBAAgB,GAAK/B,UAAF,IAC/BrB,eAAe,CAAEqB,UAAF,EAAcL,kBAAd,CADT;AAGP;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMqC,gBAAgB,GAAKhC,UAAF,IAC/BtB,eAAe,CAAEsB,UAAF,EAAcL,kBAAd,CADT;AAGP;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMsC,eAAe,GAAKjC,UAAF,IAC9BF,gBAAgB,CAACoC,IAAjB,CAAyBC,GAAF,IAAWxD,eAAe,CAAEqB,UAAF,EAAcmC,GAAd,CAAjD,CADM","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockSupport, hasBlockSupport } from '@wordpress/blocks';\nimport { Platform } from '@wordpress/element';\n\nconst ALIGN_SUPPORT_KEY = 'align';\nconst ALIGN_WIDE_SUPPORT_KEY = 'alignWide';\nconst BORDER_SUPPORT_KEY = '__experimentalBorder';\nconst COLOR_SUPPORT_KEY = 'color';\nconst CUSTOM_CLASS_NAME_SUPPORT_KEY = 'customClassName';\nconst FONT_FAMILY_SUPPORT_KEY = 'typography.__experimentalFontFamily';\nconst FONT_SIZE_SUPPORT_KEY = 'typography.fontSize';\nconst LINE_HEIGHT_SUPPORT_KEY = 'typography.lineHeight';\n/**\n * Key within block settings' support array indicating support for font style.\n */\nconst FONT_STYLE_SUPPORT_KEY = 'typography.__experimentalFontStyle';\n/**\n * Key within block settings' support array indicating support for font weight.\n */\nconst FONT_WEIGHT_SUPPORT_KEY = 'typography.__experimentalFontWeight';\n/**\n * Key within block settings' supports array indicating support for text\n * columns e.g. settings found in `block.json`.\n */\nconst TEXT_COLUMNS_SUPPORT_KEY = 'typography.textColumns';\n/**\n * Key within block settings' supports array indicating support for text\n * decorations e.g. settings found in `block.json`.\n */\nconst TEXT_DECORATION_SUPPORT_KEY = 'typography.__experimentalTextDecoration';\n/**\n * Key within block settings' supports array indicating support for text\n * transforms e.g. settings found in `block.json`.\n */\nconst TEXT_TRANSFORM_SUPPORT_KEY = 'typography.__experimentalTextTransform';\n/**\n * Key within block settings' supports array indicating support for letter-spacing\n * e.g. settings found in `block.json`.\n */\nconst LETTER_SPACING_SUPPORT_KEY = 'typography.__experimentalLetterSpacing';\nconst LAYOUT_SUPPORT_KEY = '__experimentalLayout';\nconst TYPOGRAPHY_SUPPORT_KEYS = [\n\tLINE_HEIGHT_SUPPORT_KEY,\n\tFONT_SIZE_SUPPORT_KEY,\n\tFONT_STYLE_SUPPORT_KEY,\n\tFONT_WEIGHT_SUPPORT_KEY,\n\tFONT_FAMILY_SUPPORT_KEY,\n\tTEXT_COLUMNS_SUPPORT_KEY,\n\tTEXT_DECORATION_SUPPORT_KEY,\n\tTEXT_TRANSFORM_SUPPORT_KEY,\n\tLETTER_SPACING_SUPPORT_KEY,\n];\nconst SPACING_SUPPORT_KEY = 'spacing';\nconst styleSupportKeys = [\n\t...TYPOGRAPHY_SUPPORT_KEYS,\n\tBORDER_SUPPORT_KEY,\n\tCOLOR_SUPPORT_KEY,\n\tSPACING_SUPPORT_KEY,\n];\n\n/**\n * Returns true if the block defines support for align.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasAlignSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, ALIGN_SUPPORT_KEY );\n\n/**\n * Returns the block support value for align, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getAlignSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, ALIGN_SUPPORT_KEY );\n\n/**\n * Returns true if the block defines support for align wide.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasAlignWideSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, ALIGN_WIDE_SUPPORT_KEY );\n\n/**\n * Returns the block support value for align wide, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getAlignWideSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, ALIGN_WIDE_SUPPORT_KEY );\n\n/**\n * Determine whether there is block support for border properties.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @param {string} feature Border feature to check support for.\n *\n * @return {boolean} Whether there is support.\n */\nexport function hasBorderSupport( nameOrType, feature = 'any' ) {\n\tif ( Platform.OS !== 'web' ) {\n\t\treturn false;\n\t}\n\n\tconst support = getBlockSupport( nameOrType, BORDER_SUPPORT_KEY );\n\n\tif ( support === true ) {\n\t\treturn true;\n\t}\n\n\tif ( feature === 'any' ) {\n\t\treturn !! (\n\t\t\tsupport?.color ||\n\t\t\tsupport?.radius ||\n\t\t\tsupport?.width ||\n\t\t\tsupport?.style\n\t\t);\n\t}\n\n\treturn !! support?.[ feature ];\n}\n\n/**\n * Get block support for border properties.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @param {string} feature Border feature to get.\n *\n * @return {unknown} The block support.\n */\nexport const getBorderSupport = ( nameOrType, feature ) =>\n\tgetBlockSupport( nameOrType, [ BORDER_SUPPORT_KEY, feature ] );\n\n/**\n * Returns true if the block defines support for color.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasColorSupport = ( nameOrType ) => {\n\tconst colorSupport = getBlockSupport( nameOrType, COLOR_SUPPORT_KEY );\n\treturn (\n\t\tcolorSupport &&\n\t\t( colorSupport.link === true ||\n\t\t\tcolorSupport.gradient === true ||\n\t\t\tcolorSupport.background !== false ||\n\t\t\tcolorSupport.text !== false )\n\t);\n};\n\n/**\n * Returns true if the block defines support for link color.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasLinkColorSupport = ( nameOrType ) => {\n\tif ( Platform.OS !== 'web' ) {\n\t\treturn false;\n\t}\n\n\tconst colorSupport = getBlockSupport( nameOrType, COLOR_SUPPORT_KEY );\n\n\treturn (\n\t\tcolorSupport !== null &&\n\t\ttypeof colorSupport === 'object' &&\n\t\t!! colorSupport.link\n\t);\n};\n\n/**\n * Returns true if the block defines support for gradient color.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasGradientSupport = ( nameOrType ) => {\n\tconst colorSupport = getBlockSupport( nameOrType, COLOR_SUPPORT_KEY );\n\n\treturn (\n\t\tcolorSupport !== null &&\n\t\ttypeof colorSupport === 'object' &&\n\t\t!! colorSupport.gradients\n\t);\n};\n\n/**\n * Returns true if the block defines support for background color.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasBackgroundColorSupport = ( nameOrType ) => {\n\tconst colorSupport = getBlockSupport( nameOrType, COLOR_SUPPORT_KEY );\n\n\treturn colorSupport && colorSupport.background !== false;\n};\n\n/**\n * Returns true if the block defines support for background color.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasTextColorSupport = ( nameOrType ) => {\n\tconst colorSupport = getBlockSupport( nameOrType, COLOR_SUPPORT_KEY );\n\n\treturn colorSupport && colorSupport.text !== false;\n};\n\n/**\n * Get block support for color properties.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @param {string} feature Color feature to get.\n *\n * @return {unknown} The block support.\n */\nexport const getColorSupport = ( nameOrType, feature ) =>\n\tgetBlockSupport( nameOrType, [ COLOR_SUPPORT_KEY, feature ] );\n\n/**\n * Returns true if the block defines support for custom class name.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasCustomClassNameSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, CUSTOM_CLASS_NAME_SUPPORT_KEY, true );\n\n/**\n * Returns the block support value for custom class name, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getCustomClassNameSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, CUSTOM_CLASS_NAME_SUPPORT_KEY, true );\n\n/**\n * Returns true if the block defines support for font family.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasFontFamilySupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, FONT_FAMILY_SUPPORT_KEY );\n\n/**\n * Returns the block support value for font family, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getFontFamilySupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, FONT_FAMILY_SUPPORT_KEY );\n\n/**\n * Returns true if the block defines support for font size.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasFontSizeSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, FONT_SIZE_SUPPORT_KEY );\n\n/**\n * Returns the block support value for font size, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getFontSizeSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, FONT_SIZE_SUPPORT_KEY );\n\n/**\n * Returns true if the block defines support for layout.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasLayoutSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, LAYOUT_SUPPORT_KEY );\n\n/**\n * Returns the block support value for layout, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getLayoutSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, LAYOUT_SUPPORT_KEY );\n\n/**\n * Returns true if the block defines support for style.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasStyleSupport = ( nameOrType ) =>\n\tstyleSupportKeys.some( ( key ) => hasBlockSupport( nameOrType, key ) );\n"]}
|
|
1
|
+
{"version":3,"sources":["@wordpress/block-editor/src/hooks/supports.js"],"names":["getBlockSupport","hasBlockSupport","Platform","ALIGN_SUPPORT_KEY","ALIGN_WIDE_SUPPORT_KEY","BORDER_SUPPORT_KEY","COLOR_SUPPORT_KEY","CUSTOM_CLASS_NAME_SUPPORT_KEY","FONT_FAMILY_SUPPORT_KEY","FONT_SIZE_SUPPORT_KEY","LINE_HEIGHT_SUPPORT_KEY","FONT_STYLE_SUPPORT_KEY","FONT_WEIGHT_SUPPORT_KEY","TEXT_COLUMNS_SUPPORT_KEY","TEXT_DECORATION_SUPPORT_KEY","TEXT_TRANSFORM_SUPPORT_KEY","LETTER_SPACING_SUPPORT_KEY","LAYOUT_SUPPORT_KEY","TYPOGRAPHY_SUPPORT_KEYS","SPACING_SUPPORT_KEY","styleSupportKeys","hasAlignSupport","nameOrType","getAlignSupport","hasAlignWideSupport","getAlignWideSupport","hasBorderSupport","feature","OS","support","color","radius","width","style","getBorderSupport","hasColorSupport","colorSupport","link","gradient","background","text","hasLinkColorSupport","hasGradientSupport","gradients","hasBackgroundColorSupport","hasTextColorSupport","getColorSupport","hasCustomClassNameSupport","getCustomClassNameSupport","hasFontFamilySupport","getFontFamilySupport","hasFontSizeSupport","getFontSizeSupport","hasLayoutSupport","getLayoutSupport","hasStyleSupport","some","key"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,eAAT,EAA0BC,eAA1B,QAAiD,mBAAjD;AACA,SAASC,QAAT,QAAyB,oBAAzB;AAEA,MAAMC,iBAAiB,GAAG,OAA1B;AACA,MAAMC,sBAAsB,GAAG,WAA/B;AACA,M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ACA,OAAO,MAAMoB,yBAAyB,GAAKzB,UAAF,IACxCrB,eAAe,CAAEqB,UAAF,EAAcf,6BAAd,EAA6C,IAA7C,CADT;AAGP;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMyC,yBAAyB,GAAK1B,UAAF,IACxCtB,eAAe,CAAEsB,UAAF,EAAcf,6BAAd,EAA6C,IAA7C,CADT;AAGP;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAM0C,oBAAoB,GAAK3B,UAAF,IACnCrB,eAAe,CAAEqB,UAAF,EAAcd,uBAAd,CADT;AAGP;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAM0C,oBAAoB,GAAK5B,UAAF,IACnCtB,eAAe,CAAEsB,UAAF,EAAcd,uBAAd,CADT;AAGP;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAM2C,kBAAkB,GAAK7B,UAAF,IACjCrB,eAAe,CAAEqB,UAAF,EAAcb,qBAAd,CADT;AAGP;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAM2C,kBAAkB,GAAK9B,UAAF,IACjCtB,eAAe,CAAEsB,UAAF,EAAcb,qBAAd,CADT;AAGP;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAM4C,gBAAgB,GAAK/B,UAAF,IAC/BrB,eAAe,CAAEqB,UAAF,EAAcL,kBAAd,CADT;AAGP;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMqC,gBAAgB,GAAKhC,UAAF,IAC/BtB,eAAe,CAAEsB,UAAF,EAAcL,kBAAd,CADT;AAGP;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMsC,eAAe,GAAKjC,UAAF,IAC9BF,gBAAgB,CAACoC,IAAjB,CAAyBC,GAAF,IAAWxD,eAAe,CAAEqB,UAAF,EAAcmC,GAAd,CAAjD,CADM","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockSupport, hasBlockSupport } from '@wordpress/blocks';\nimport { Platform } from '@wordpress/element';\n\nconst ALIGN_SUPPORT_KEY = 'align';\nconst ALIGN_WIDE_SUPPORT_KEY = 'alignWide';\nconst BORDER_SUPPORT_KEY = '__experimentalBorder';\nconst COLOR_SUPPORT_KEY = 'color';\nconst CUSTOM_CLASS_NAME_SUPPORT_KEY = 'customClassName';\nconst FONT_FAMILY_SUPPORT_KEY = 'typography.__experimentalFontFamily';\nconst FONT_SIZE_SUPPORT_KEY = 'typography.fontSize';\nconst LINE_HEIGHT_SUPPORT_KEY = 'typography.lineHeight';\n/**\n * Key within block settings' support array indicating support for font style.\n */\nconst FONT_STYLE_SUPPORT_KEY = 'typography.__experimentalFontStyle';\n/**\n * Key within block settings' support array indicating support for font weight.\n */\nconst FONT_WEIGHT_SUPPORT_KEY = 'typography.__experimentalFontWeight';\n/**\n * Key within block settings' supports array indicating support for text\n * columns e.g. settings found in `block.json`.\n */\nconst TEXT_COLUMNS_SUPPORT_KEY = 'typography.textColumns';\n/**\n * Key within block settings' supports array indicating support for text\n * decorations e.g. settings found in `block.json`.\n */\nconst TEXT_DECORATION_SUPPORT_KEY = 'typography.__experimentalTextDecoration';\n/**\n * Key within block settings' supports array indicating support for text\n * transforms e.g. settings found in `block.json`.\n */\nconst TEXT_TRANSFORM_SUPPORT_KEY = 'typography.__experimentalTextTransform';\n/**\n * Key within block settings' supports array indicating support for letter-spacing\n * e.g. settings found in `block.json`.\n */\nconst LETTER_SPACING_SUPPORT_KEY = 'typography.__experimentalLetterSpacing';\nconst LAYOUT_SUPPORT_KEY = '__experimentalLayout';\nconst TYPOGRAPHY_SUPPORT_KEYS = [\n\tLINE_HEIGHT_SUPPORT_KEY,\n\tFONT_SIZE_SUPPORT_KEY,\n\tFONT_STYLE_SUPPORT_KEY,\n\tFONT_WEIGHT_SUPPORT_KEY,\n\tFONT_FAMILY_SUPPORT_KEY,\n\tTEXT_COLUMNS_SUPPORT_KEY,\n\tTEXT_DECORATION_SUPPORT_KEY,\n\tTEXT_TRANSFORM_SUPPORT_KEY,\n\tLETTER_SPACING_SUPPORT_KEY,\n];\nconst SPACING_SUPPORT_KEY = 'spacing';\nconst styleSupportKeys = [\n\t...TYPOGRAPHY_SUPPORT_KEYS,\n\tBORDER_SUPPORT_KEY,\n\tCOLOR_SUPPORT_KEY,\n\tSPACING_SUPPORT_KEY,\n];\n\n/**\n * Returns true if the block defines support for align.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasAlignSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, ALIGN_SUPPORT_KEY );\n\n/**\n * Returns the block support value for align, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getAlignSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, ALIGN_SUPPORT_KEY );\n\n/**\n * Returns true if the block defines support for align wide.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasAlignWideSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, ALIGN_WIDE_SUPPORT_KEY );\n\n/**\n * Returns the block support value for align wide, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getAlignWideSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, ALIGN_WIDE_SUPPORT_KEY );\n\n/**\n * Determine whether there is block support for border properties.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @param {string} feature Border feature to check support for.\n *\n * @return {boolean} Whether there is support.\n */\nexport function hasBorderSupport( nameOrType, feature = 'any' ) {\n\tif ( Platform.OS !== 'web' ) {\n\t\treturn false;\n\t}\n\n\tconst support = getBlockSupport( nameOrType, BORDER_SUPPORT_KEY );\n\n\tif ( support === true ) {\n\t\treturn true;\n\t}\n\n\tif ( feature === 'any' ) {\n\t\treturn !! (\n\t\t\tsupport?.color ||\n\t\t\tsupport?.radius ||\n\t\t\tsupport?.width ||\n\t\t\tsupport?.style\n\t\t);\n\t}\n\n\treturn !! support?.[ feature ];\n}\n\n/**\n * Get block support for border properties.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @param {string} feature Border feature to get.\n *\n * @return {unknown} The block support.\n */\nexport const getBorderSupport = ( nameOrType, feature ) =>\n\tgetBlockSupport( nameOrType, [ BORDER_SUPPORT_KEY, feature ] );\n\n/**\n * Returns true if the block defines support for color.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasColorSupport = ( nameOrType ) => {\n\tconst colorSupport = getBlockSupport( nameOrType, COLOR_SUPPORT_KEY );\n\treturn (\n\t\tcolorSupport &&\n\t\t( colorSupport.link === true ||\n\t\t\tcolorSupport.gradient === true ||\n\t\t\tcolorSupport.background !== false ||\n\t\t\tcolorSupport.text !== false )\n\t);\n};\n\n/**\n * Returns true if the block defines support for link color.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasLinkColorSupport = ( nameOrType ) => {\n\tif ( Platform.OS !== 'web' ) {\n\t\treturn false;\n\t}\n\n\tconst colorSupport = getBlockSupport( nameOrType, COLOR_SUPPORT_KEY );\n\n\treturn (\n\t\tcolorSupport !== null &&\n\t\ttypeof colorSupport === 'object' &&\n\t\t!! colorSupport.link\n\t);\n};\n\n/**\n * Returns true if the block defines support for gradient color.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasGradientSupport = ( nameOrType ) => {\n\tconst colorSupport = getBlockSupport( nameOrType, COLOR_SUPPORT_KEY );\n\n\treturn (\n\t\tcolorSupport !== null &&\n\t\ttypeof colorSupport === 'object' &&\n\t\t!! colorSupport.gradients\n\t);\n};\n\n/**\n * Returns true if the block defines support for background color.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasBackgroundColorSupport = ( nameOrType ) => {\n\tconst colorSupport = getBlockSupport( nameOrType, COLOR_SUPPORT_KEY );\n\n\treturn colorSupport && colorSupport.background !== false;\n};\n\n/**\n * Returns true if the block defines support for background color.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasTextColorSupport = ( nameOrType ) => {\n\tconst colorSupport = getBlockSupport( nameOrType, COLOR_SUPPORT_KEY );\n\n\treturn colorSupport && colorSupport.text !== false;\n};\n\n/**\n * Get block support for color properties.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @param {string} feature Color feature to get.\n *\n * @return {unknown} The block support.\n */\nexport const getColorSupport = ( nameOrType, feature ) =>\n\tgetBlockSupport( nameOrType, [ COLOR_SUPPORT_KEY, feature ] );\n\n/**\n * Returns true if the block defines support for custom class name.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasCustomClassNameSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, CUSTOM_CLASS_NAME_SUPPORT_KEY, true );\n\n/**\n * Returns the block support value for custom class name, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getCustomClassNameSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, CUSTOM_CLASS_NAME_SUPPORT_KEY, true );\n\n/**\n * Returns true if the block defines support for font family.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasFontFamilySupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, FONT_FAMILY_SUPPORT_KEY );\n\n/**\n * Returns the block support value for font family, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getFontFamilySupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, FONT_FAMILY_SUPPORT_KEY );\n\n/**\n * Returns true if the block defines support for font size.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasFontSizeSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, FONT_SIZE_SUPPORT_KEY );\n\n/**\n * Returns the block support value for font size, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getFontSizeSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, FONT_SIZE_SUPPORT_KEY );\n\n/**\n * Returns true if the block defines support for layout.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasLayoutSupport = ( nameOrType ) =>\n\thasBlockSupport( nameOrType, LAYOUT_SUPPORT_KEY );\n\n/**\n * Returns the block support value for layout, if defined.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {unknown} The block support value.\n */\nexport const getLayoutSupport = ( nameOrType ) =>\n\tgetBlockSupport( nameOrType, LAYOUT_SUPPORT_KEY );\n\n/**\n * Returns true if the block defines support for style.\n *\n * @param {string|Object} nameOrType Block name or type object.\n * @return {boolean} Whether the block supports the feature.\n */\nexport const hasStyleSupport = ( nameOrType ) =>\n\tstyleSupportKeys.some( ( key ) => hasBlockSupport( nameOrType, key ) );\n"]}
|
|
@@ -17,10 +17,7 @@ import { FONT_SIZE_SUPPORT_KEY } from './font-size';
|
|
|
17
17
|
import { cleanEmptyObject, useBlockSettings } from './utils';
|
|
18
18
|
|
|
19
19
|
function omit(object, keys) {
|
|
20
|
-
return Object.fromEntries(Object.entries(object).filter(
|
|
21
|
-
let [key] = _ref;
|
|
22
|
-
return !keys.includes(key);
|
|
23
|
-
}));
|
|
20
|
+
return Object.fromEntries(Object.entries(object).filter(([key]) => !keys.includes(key)));
|
|
24
21
|
}
|
|
25
22
|
|
|
26
23
|
const LETTER_SPACING_SUPPORT_KEY = 'typography.__experimentalLetterSpacing';
|
|
@@ -33,14 +30,12 @@ export const TYPOGRAPHY_SUPPORT_KEY = 'typography';
|
|
|
33
30
|
export const TYPOGRAPHY_SUPPORT_KEYS = [LINE_HEIGHT_SUPPORT_KEY, FONT_SIZE_SUPPORT_KEY, FONT_STYLE_SUPPORT_KEY, FONT_WEIGHT_SUPPORT_KEY, FONT_FAMILY_SUPPORT_KEY, TEXT_COLUMNS_SUPPORT_KEY, TEXT_DECORATION_SUPPORT_KEY, TEXT_TRANSFORM_SUPPORT_KEY, LETTER_SPACING_SUPPORT_KEY];
|
|
34
31
|
|
|
35
32
|
function styleToAttributes(style) {
|
|
36
|
-
var _style$typography, _style$typography2;
|
|
37
|
-
|
|
38
33
|
const updatedStyle = { ...omit(style, ['fontFamily'])
|
|
39
34
|
};
|
|
40
|
-
const fontSizeValue = style
|
|
41
|
-
const fontFamilyValue = style
|
|
42
|
-
const fontSizeSlug = fontSizeValue
|
|
43
|
-
const fontFamilySlug = fontFamilyValue
|
|
35
|
+
const fontSizeValue = style?.typography?.fontSize;
|
|
36
|
+
const fontFamilyValue = style?.typography?.fontFamily;
|
|
37
|
+
const fontSizeSlug = fontSizeValue?.startsWith('var:preset|font-size|') ? fontSizeValue.substring('var:preset|font-size|'.length) : undefined;
|
|
38
|
+
const fontFamilySlug = fontFamilyValue?.startsWith('var:preset|font-family|') ? fontFamilyValue.substring('var:preset|font-family|'.length) : undefined;
|
|
44
39
|
updatedStyle.typography = { ...omit(updatedStyle.typography, ['fontFamily']),
|
|
45
40
|
fontSize: fontSizeSlug ? undefined : fontSizeValue
|
|
46
41
|
};
|
|
@@ -52,21 +47,18 @@ function styleToAttributes(style) {
|
|
|
52
47
|
}
|
|
53
48
|
|
|
54
49
|
function attributesToStyle(attributes) {
|
|
55
|
-
var _attributes$style, _attributes$style2, _attributes$style2$ty;
|
|
56
|
-
|
|
57
50
|
return { ...attributes.style,
|
|
58
|
-
typography: { ...
|
|
51
|
+
typography: { ...attributes.style?.typography,
|
|
59
52
|
fontFamily: attributes.fontFamily ? 'var:preset|font-family|' + attributes.fontFamily : undefined,
|
|
60
|
-
fontSize: attributes.fontSize ? 'var:preset|font-size|' + attributes.fontSize :
|
|
53
|
+
fontSize: attributes.fontSize ? 'var:preset|font-size|' + attributes.fontSize : attributes.style?.typography?.fontSize
|
|
61
54
|
}
|
|
62
55
|
};
|
|
63
56
|
}
|
|
64
57
|
|
|
65
|
-
function TypographyInspectorControl(
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
} = _ref2;
|
|
58
|
+
function TypographyInspectorControl({
|
|
59
|
+
children,
|
|
60
|
+
resetAllFilter
|
|
61
|
+
}) {
|
|
70
62
|
const attributesResetAllFilter = useCallback(attributes => {
|
|
71
63
|
const existingStyle = attributesToStyle(attributes);
|
|
72
64
|
const updatedStyle = resetAllFilter(existingStyle);
|
|
@@ -80,14 +72,13 @@ function TypographyInspectorControl(_ref2) {
|
|
|
80
72
|
}, children);
|
|
81
73
|
}
|
|
82
74
|
|
|
83
|
-
export function TypographyPanel(
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
} = _ref3;
|
|
75
|
+
export function TypographyPanel({
|
|
76
|
+
clientId,
|
|
77
|
+
name,
|
|
78
|
+
attributes,
|
|
79
|
+
setAttributes,
|
|
80
|
+
__unstableParentLayout
|
|
81
|
+
}) {
|
|
91
82
|
const settings = useBlockSettings(name, __unstableParentLayout);
|
|
92
83
|
const isEnabled = useHasTypographyPanel(settings);
|
|
93
84
|
const value = useMemo(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-editor/src/hooks/typography.js"],"names":["getBlockSupport","hasBlockSupport","useMemo","useCallback","InspectorControls","default","StylesTypographyPanel","useHasTypographyPanel","LINE_HEIGHT_SUPPORT_KEY","FONT_FAMILY_SUPPORT_KEY","FONT_SIZE_SUPPORT_KEY","cleanEmptyObject","useBlockSettings","omit","object","keys","Object","fromEntries","entries","filter","key","includes","LETTER_SPACING_SUPPORT_KEY","TEXT_TRANSFORM_SUPPORT_KEY","TEXT_DECORATION_SUPPORT_KEY","TEXT_COLUMNS_SUPPORT_KEY","FONT_STYLE_SUPPORT_KEY","FONT_WEIGHT_SUPPORT_KEY","TYPOGRAPHY_SUPPORT_KEY","TYPOGRAPHY_SUPPORT_KEYS","styleToAttributes","style","updatedStyle","fontSizeValue","typography","fontSize","fontFamilyValue","fontFamily","fontSizeSlug","startsWith","substring","length","undefined","fontFamilySlug","attributesToStyle","attributes","TypographyInspectorControl","children","resetAllFilter","attributesResetAllFilter","existingStyle","TypographyPanel","clientId","name","setAttributes","__unstableParentLayout","settings","isEnabled","value","onChange","newStyle","defaultControls","hasTypographySupport","blockName","some"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,eAAT,EAA0BC,eAA1B,QAAiD,mBAAjD;AACA,SAASC,OAAT,EAAkBC,WAAlB,QAAqC,oBAArC;AAEA;AACA;AACA;;AACA,OAAOC,iBAAP,MAA8B,kCAA9B;AACA,SACCC,OAAO,IAAIC,qBADZ,EAECC,qBAFD,QAGO,8CAHP;AAKA,SAASC,uBAAT,QAAwC,eAAxC;AACA,SAASC,uBAAT,QAAwC,eAAxC;AACA,SAASC,qBAAT,QAAsC,aAAtC;AACA,SAASC,gBAAT,EAA2BC,gBAA3B,QAAmD,SAAnD;;AAEA,SAASC,IAAT,CAAeC,MAAf,EAAuBC,IAAvB,EAA8B;AAC7B,SAAOC,MAAM,CAACC,WAAP,CACND,MAAM,CAACE,OAAP,CAAgBJ,MAAhB,EAAyBK,MAAzB,CAAiC
|
|
1
|
+
{"version":3,"sources":["@wordpress/block-editor/src/hooks/typography.js"],"names":["getBlockSupport","hasBlockSupport","useMemo","useCallback","InspectorControls","default","StylesTypographyPanel","useHasTypographyPanel","LINE_HEIGHT_SUPPORT_KEY","FONT_FAMILY_SUPPORT_KEY","FONT_SIZE_SUPPORT_KEY","cleanEmptyObject","useBlockSettings","omit","object","keys","Object","fromEntries","entries","filter","key","includes","LETTER_SPACING_SUPPORT_KEY","TEXT_TRANSFORM_SUPPORT_KEY","TEXT_DECORATION_SUPPORT_KEY","TEXT_COLUMNS_SUPPORT_KEY","FONT_STYLE_SUPPORT_KEY","FONT_WEIGHT_SUPPORT_KEY","TYPOGRAPHY_SUPPORT_KEY","TYPOGRAPHY_SUPPORT_KEYS","styleToAttributes","style","updatedStyle","fontSizeValue","typography","fontSize","fontFamilyValue","fontFamily","fontSizeSlug","startsWith","substring","length","undefined","fontFamilySlug","attributesToStyle","attributes","TypographyInspectorControl","children","resetAllFilter","attributesResetAllFilter","existingStyle","TypographyPanel","clientId","name","setAttributes","__unstableParentLayout","settings","isEnabled","value","onChange","newStyle","defaultControls","hasTypographySupport","blockName","some"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,eAAT,EAA0BC,eAA1B,QAAiD,mBAAjD;AACA,SAASC,OAAT,EAAkBC,WAAlB,QAAqC,oBAArC;AAEA;AACA;AACA;;AACA,OAAOC,iBAAP,MAA8B,kCAA9B;AACA,SACCC,OAAO,IAAIC,qBADZ,EAECC,qBAFD,QAGO,8CAHP;AAKA,SAASC,uBAAT,QAAwC,eAAxC;AACA,SAASC,uBAAT,QAAwC,eAAxC;AACA,SAASC,qBAAT,QAAsC,aAAtC;AACA,SAASC,gBAAT,EAA2BC,gBAA3B,QAAmD,SAAnD;;AAEA,SAASC,IAAT,CAAeC,MAAf,EAAuBC,IAAvB,EAA8B;AAC7B,SAAOC,MAAM,CAACC,WAAP,CACND,MAAM,CAACE,OAAP,CAAgBJ,MAAhB,EAAyBK,MAAzB,CAAiC,CAAE,CAAEC,GAAF,CAAF,KAAe,CAAEL,IAAI,CAACM,QAAL,CAAeD,GAAf,CAAlD,CADM,CAAP;AAGA;;AAED,MAAME,0BAA0B,GAAG,wCAAnC;AACA,MAAMC,0BAA0B,GAAG,wCAAnC;AACA,MAAMC,2BAA2B,GAAG,yCAApC;AACA,MAAMC,wBAAwB,GAAG,wBAAjC;AACA,MAAMC,sBAAsB,GAAG,oCAA/B;AACA,MAAMC,uBAAuB,GAAG,qCAAhC;AACA,OAAO,MAAMC,sBAAsB,GAAG,YAA/B;AACP,OAAO,M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KAAb,EAAoBc,UAAU,CAACV,QAA/B,EAAyCU,UAAU,CAACR,UAApD,CANkB,CAArB;;AAQA,QAAMsB,QAAQ,GAAKC,QAAF,IAAgB;AAChCN,IAAAA,aAAa,CAAExB,iBAAiB,CAAE8B,QAAF,CAAnB,CAAb;AACA,GAFD;;AAIA,MAAK,CAAEH,SAAP,EAAmB;AAClB,WAAO,IAAP;AACA;;AAED,QAAMI,eAAe,GAAG7D,eAAe,CAAEqD,IAAF,EAAQ,CAC9CzB,sBAD8C,EAE9C,+BAF8C,CAAR,CAAvC;AAKA,SACC,cAAC,qBAAD;AACC,IAAA,EAAE,EAAGkB,0BADN;AAEC,IAAA,OAAO,EAAGM,QAFX;AAGC,IAAA,QAAQ,EAAGI,QAHZ;AAIC,IAAA,KAAK,EAAGE,KAJT;AAKC,IAAA,QAAQ,EAAGC,QALZ;AAMC,IAAA,eAAe,EAAGE;AANnB,IADD;AAUA;AAED,OAAO,MAAMC,oBAAoB,GAAKC,SAAF,IAAiB;AACpD,SAAOlC,uBAAuB,CAACmC,IAAxB,CAAgC5C,GAAF,IACpCnB,eAAe,CAAE8D,SAAF,EAAa3C,GAAb,CADT,CAAP;AAGA,CAJM","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockSupport, hasBlockSupport } from '@wordpress/blocks';\nimport { useMemo, useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport InspectorControls from '../components/inspector-controls';\nimport {\n\tdefault as StylesTypographyPanel,\n\tuseHasTypographyPanel,\n} from '../components/global-styles/typography-panel';\n\nimport { LINE_HEIGHT_SUPPORT_KEY } from './line-height';\nimport { FONT_FAMILY_SUPPORT_KEY } from './font-family';\nimport { FONT_SIZE_SUPPORT_KEY } from './font-size';\nimport { cleanEmptyObject, useBlockSettings } from './utils';\n\nfunction omit( object, keys ) {\n\treturn Object.fromEntries(\n\t\tObject.entries( object ).filter( ( [ key ] ) => ! keys.includes( key ) )\n\t);\n}\n\nconst LETTER_SPACING_SUPPORT_KEY = 'typography.__experimentalLetterSpacing';\nconst TEXT_TRANSFORM_SUPPORT_KEY = 'typography.__experimentalTextTransform';\nconst TEXT_DECORATION_SUPPORT_KEY = 'typography.__experimentalTextDecoration';\nconst TEXT_COLUMNS_SUPPORT_KEY = 'typography.textColumns';\nconst FONT_STYLE_SUPPORT_KEY = 'typography.__experimentalFontStyle';\nconst FONT_WEIGHT_SUPPORT_KEY = 'typography.__experimentalFontWeight';\nexport const TYPOGRAPHY_SUPPORT_KEY = 'typography';\nexport const TYPOGRAPHY_SUPPORT_KEYS = [\n\tLINE_HEIGHT_SUPPORT_KEY,\n\tFONT_SIZE_SUPPORT_KEY,\n\tFONT_STYLE_SUPPORT_KEY,\n\tFONT_WEIGHT_SUPPORT_KEY,\n\tFONT_FAMILY_SUPPORT_KEY,\n\tTEXT_COLUMNS_SUPPORT_KEY,\n\tTEXT_DECORATION_SUPPORT_KEY,\n\tTEXT_TRANSFORM_SUPPORT_KEY,\n\tLETTER_SPACING_SUPPORT_KEY,\n];\n\nfunction styleToAttributes( style ) {\n\tconst updatedStyle = { ...omit( style, [ 'fontFamily' ] ) };\n\tconst fontSizeValue = style?.typography?.fontSize;\n\tconst fontFamilyValue = style?.typography?.fontFamily;\n\tconst fontSizeSlug = fontSizeValue?.startsWith( 'var:preset|font-size|' )\n\t\t? fontSizeValue.substring( 'var:preset|font-size|'.length )\n\t\t: undefined;\n\tconst fontFamilySlug = fontFamilyValue?.startsWith(\n\t\t'var:preset|font-family|'\n\t)\n\t\t? fontFamilyValue.substring( 'var:preset|font-family|'.length )\n\t\t: undefined;\n\tupdatedStyle.typography = {\n\t\t...omit( updatedStyle.typography, [ 'fontFamily' ] ),\n\t\tfontSize: fontSizeSlug ? undefined : fontSizeValue,\n\t};\n\treturn {\n\t\tstyle: cleanEmptyObject( updatedStyle ),\n\t\tfontFamily: fontFamilySlug,\n\t\tfontSize: fontSizeSlug,\n\t};\n}\n\nfunction attributesToStyle( attributes ) {\n\treturn {\n\t\t...attributes.style,\n\t\ttypography: {\n\t\t\t...attributes.style?.typography,\n\t\t\tfontFamily: attributes.fontFamily\n\t\t\t\t? 'var:preset|font-family|' + attributes.fontFamily\n\t\t\t\t: undefined,\n\t\t\tfontSize: attributes.fontSize\n\t\t\t\t? 'var:preset|font-size|' + attributes.fontSize\n\t\t\t\t: attributes.style?.typography?.fontSize,\n\t\t},\n\t};\n}\n\nfunction TypographyInspectorControl( { children, resetAllFilter } ) {\n\tconst attributesResetAllFilter = useCallback(\n\t\t( attributes ) => {\n\t\t\tconst existingStyle = attributesToStyle( attributes );\n\t\t\tconst updatedStyle = resetAllFilter( existingStyle );\n\t\t\treturn {\n\t\t\t\t...attributes,\n\t\t\t\t...styleToAttributes( updatedStyle ),\n\t\t\t};\n\t\t},\n\t\t[ resetAllFilter ]\n\t);\n\n\treturn (\n\t\t<InspectorControls\n\t\t\tgroup=\"typography\"\n\t\t\tresetAllFilter={ attributesResetAllFilter }\n\t\t>\n\t\t\t{ children }\n\t\t</InspectorControls>\n\t);\n}\n\nexport function TypographyPanel( {\n\tclientId,\n\tname,\n\tattributes,\n\tsetAttributes,\n\t__unstableParentLayout,\n} ) {\n\tconst settings = useBlockSettings( name, __unstableParentLayout );\n\tconst isEnabled = useHasTypographyPanel( settings );\n\tconst value = useMemo( () => {\n\t\treturn attributesToStyle( {\n\t\t\tstyle: attributes.style,\n\t\t\tfontFamily: attributes.fontFamily,\n\t\t\tfontSize: attributes.fontSize,\n\t\t} );\n\t}, [ attributes.style, attributes.fontSize, attributes.fontFamily ] );\n\n\tconst onChange = ( newStyle ) => {\n\t\tsetAttributes( styleToAttributes( newStyle ) );\n\t};\n\n\tif ( ! isEnabled ) {\n\t\treturn null;\n\t}\n\n\tconst defaultControls = getBlockSupport( name, [\n\t\tTYPOGRAPHY_SUPPORT_KEY,\n\t\t'__experimentalDefaultControls',\n\t] );\n\n\treturn (\n\t\t<StylesTypographyPanel\n\t\t\tas={ TypographyInspectorControl }\n\t\t\tpanelId={ clientId }\n\t\t\tsettings={ settings }\n\t\t\tvalue={ value }\n\t\t\tonChange={ onChange }\n\t\t\tdefaultControls={ defaultControls }\n\t\t/>\n\t);\n}\n\nexport const hasTypographySupport = ( blockName ) => {\n\treturn TYPOGRAPHY_SUPPORT_KEYS.some( ( key ) =>\n\t\thasBlockSupport( blockName, key )\n\t);\n};\n"]}
|
|
@@ -32,8 +32,7 @@ const hasTypographySupport = blockName => {
|
|
|
32
32
|
return TYPOGRAPHY_SUPPORT_KEYS.some(key => hasBlockSupport(blockName, key));
|
|
33
33
|
};
|
|
34
34
|
|
|
35
|
-
function useIsTypographyDisabled() {
|
|
36
|
-
let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
35
|
+
function useIsTypographyDisabled(props = {}) {
|
|
37
36
|
const configs = [useIsFontSizeDisabled(props), useIsLineHeightDisabled(props)];
|
|
38
37
|
return configs.filter(Boolean).length === configs.length;
|
|
39
38
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-editor/src/hooks/typography.native.js"],"names":["hasBlockSupport","PanelBody","__","InspectorControls","LINE_HEIGHT_SUPPORT_KEY","LineHeightEdit","useIsLineHeightDisabled","FONT_SIZE_SUPPORT_KEY","FontSizeEdit","useIsFontSizeDisabled","TYPOGRAPHY_SUPPORT_KEY","TYPOGRAPHY_SUPPORT_KEYS","TypographyPanel","props","isDisabled","useIsTypographyDisabled","isSupported","hasTypographySupport","name","blockName","some","key","configs","filter","Boolean","length"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,eAAT,QAAgC,mBAAhC;AACA;AACA;AACA;;AACA,SAASC,SAAT,QAA0B,uBAA1B;AACA,SAASC,EAAT,QAAmB,iBAAnB;AAEA;AACA;AACA;;AACA,OAAOC,iBAAP,MAA8B,kCAA9B;AAEA,SACCC,uBADD,EAECC,cAFD,EAGCC,uBAHD,QAIO,eAJP;AAKA,SACCC,qBADD,EAECC,YAFD,EAGCC,qBAHD,QAIO,aAJP;AAMA,OAAO,MAAMC,sBAAsB,GAAG,YAA/B;AACP,OAAO,MAAMC,uBAAuB,GAAG,CACtCP,uBADsC,EAEtCG,qBAFsC,CAAhC;AAKP,OAAO,SAASK,eAAT,CAA0BC,KAA1B,EAAkC;AACxC,QAAMC,UAAU,GAAGC,uBAAuB,CAAEF,KAAF,CAA1C;AACA,QAAMG,WAAW,GAAGC,oBAAoB,CAAEJ,KAAK,CAACK,IAAR,CAAxC;AAEA,MAAKJ,UAAU,IAAI,CAAEE,WAArB,EAAmC,OAAO,IAAP;AAEnC,SACC,cAAC,iBAAD,QACC,cAAC,SAAD;AAAW,IAAA,KAAK,EAAGd,EAAE,CAAE,YAAF;AAArB,KACC,cAAC,YAAD,EAAmBW,KAAnB,CADD,EAEC,cAAC,cAAD,EAAqBA,KAArB,CAFD,CADD,CADD;AAQA;;AAED,MAAMI,oBAAoB,GAAKE,SAAF,IAAiB;AAC7C,SAAOR,uBAAuB,CAACS,IAAxB,CAAgCC,GAAF,IACpCrB,eAAe,CAAEmB,SAAF,EAAaE,GAAb,CADT,CAAP;AAGA,CAJD;;AAMA,SAASN,uBAAT,
|
|
1
|
+
{"version":3,"sources":["@wordpress/block-editor/src/hooks/typography.native.js"],"names":["hasBlockSupport","PanelBody","__","InspectorControls","LINE_HEIGHT_SUPPORT_KEY","LineHeightEdit","useIsLineHeightDisabled","FONT_SIZE_SUPPORT_KEY","FontSizeEdit","useIsFontSizeDisabled","TYPOGRAPHY_SUPPORT_KEY","TYPOGRAPHY_SUPPORT_KEYS","TypographyPanel","props","isDisabled","useIsTypographyDisabled","isSupported","hasTypographySupport","name","blockName","some","key","configs","filter","Boolean","length"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,eAAT,QAAgC,mBAAhC;AACA;AACA;AACA;;AACA,SAASC,SAAT,QAA0B,uBAA1B;AACA,SAASC,EAAT,QAAmB,iBAAnB;AAEA;AACA;AACA;;AACA,OAAOC,iBAAP,MAA8B,kCAA9B;AAEA,SACCC,uBADD,EAECC,cAFD,EAGCC,uBAHD,QAIO,eAJP;AAKA,SACCC,qBADD,EAECC,YAFD,EAGCC,qBAHD,QAIO,aAJP;AAMA,OAAO,MAAMC,sBAAsB,GAAG,YAA/B;AACP,OAAO,MAAMC,uBAAuB,GAAG,CACtCP,uBADsC,EAEtCG,qBAFsC,CAAhC;AAKP,OAAO,SAASK,eAAT,CAA0BC,KAA1B,EAAkC;AACxC,QAAMC,UAAU,GAAGC,uBAAuB,CAAEF,KAAF,CAA1C;AACA,QAAMG,WAAW,GAAGC,oBAAoB,CAAEJ,KAAK,CAACK,IAAR,CAAxC;AAEA,MAAKJ,UAAU,IAAI,CAAEE,WAArB,EAAmC,OAAO,IAAP;AAEnC,SACC,cAAC,iBAAD,QACC,cAAC,SAAD;AAAW,IAAA,KAAK,EAAGd,EAAE,CAAE,YAAF;AAArB,KACC,cAAC,YAAD,EAAmBW,KAAnB,CADD,EAEC,cAAC,cAAD,EAAqBA,KAArB,CAFD,CADD,CADD;AAQA;;AAED,MAAMI,oBAAoB,GAAKE,SAAF,IAAiB;AAC7C,SAAOR,uBAAuB,CAACS,IAAxB,CAAgCC,GAAF,IACpCrB,eAAe,CAAEmB,SAAF,EAAaE,GAAb,CADT,CAAP;AAGA,CAJD;;AAMA,SAASN,uBAAT,CAAkCF,KAAK,GAAG,EAA1C,EAA+C;AAC9C,QAAMS,OAAO,GAAG,CACfb,qBAAqB,CAAEI,KAAF,CADN,EAEfP,uBAAuB,CAAEO,KAAF,CAFR,CAAhB;AAKA,SAAOS,OAAO,CAACC,MAAR,CAAgBC,OAAhB,EAA0BC,MAA1B,KAAqCH,OAAO,CAACG,MAApD;AACA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { hasBlockSupport } from '@wordpress/blocks';\n/**\n * External dependencies\n */\nimport { PanelBody } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport InspectorControls from '../components/inspector-controls';\n\nimport {\n\tLINE_HEIGHT_SUPPORT_KEY,\n\tLineHeightEdit,\n\tuseIsLineHeightDisabled,\n} from './line-height';\nimport {\n\tFONT_SIZE_SUPPORT_KEY,\n\tFontSizeEdit,\n\tuseIsFontSizeDisabled,\n} from './font-size';\n\nexport const TYPOGRAPHY_SUPPORT_KEY = 'typography';\nexport const TYPOGRAPHY_SUPPORT_KEYS = [\n\tLINE_HEIGHT_SUPPORT_KEY,\n\tFONT_SIZE_SUPPORT_KEY,\n];\n\nexport function TypographyPanel( props ) {\n\tconst isDisabled = useIsTypographyDisabled( props );\n\tconst isSupported = hasTypographySupport( props.name );\n\n\tif ( isDisabled || ! isSupported ) return null;\n\n\treturn (\n\t\t<InspectorControls>\n\t\t\t<PanelBody title={ __( 'Typography' ) }>\n\t\t\t\t<FontSizeEdit { ...props } />\n\t\t\t\t<LineHeightEdit { ...props } />\n\t\t\t</PanelBody>\n\t\t</InspectorControls>\n\t);\n}\n\nconst hasTypographySupport = ( blockName ) => {\n\treturn TYPOGRAPHY_SUPPORT_KEYS.some( ( key ) =>\n\t\thasBlockSupport( blockName, key )\n\t);\n};\n\nfunction useIsTypographyDisabled( props = {} ) {\n\tconst configs = [\n\t\tuseIsFontSizeDisabled( props ),\n\t\tuseIsLineHeightDisabled( props ),\n\t];\n\n\treturn configs.filter( Boolean ).length === configs.length;\n}\n"]}
|
|
@@ -16,9 +16,7 @@ import useMultipleOriginColorsAndGradients from '../components/colors-gradients/
|
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
export function getBorderClassesAndStyles(attributes) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const border = ((_attributes$style = attributes.style) === null || _attributes$style === void 0 ? void 0 : _attributes$style.border) || {};
|
|
19
|
+
const border = attributes.style?.border || {};
|
|
22
20
|
const className = getBorderClasses(attributes);
|
|
23
21
|
return {
|
|
24
22
|
className: className || undefined,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-editor/src/hooks/use-border-props.js"],"names":["getInlineStyles","getBorderClasses","getMultiOriginColor","useMultipleOriginColorsAndGradients","getBorderClassesAndStyles","attributes","border","style","className","undefined","useBorderProps","colors","borderProps","borderColor","borderColorObject","namedColor","color"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,eAAT,QAAgC,SAAhC;AACA,SAASC,gBAAT,EAA2BC,mBAA3B,QAAsD,UAAtD;AACA,OAAOC,mCAAP,MAAgD,yEAAhD,C,CAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,yBAAT,CAAoCC,UAApC,EAAiD;
|
|
1
|
+
{"version":3,"sources":["@wordpress/block-editor/src/hooks/use-border-props.js"],"names":["getInlineStyles","getBorderClasses","getMultiOriginColor","useMultipleOriginColorsAndGradients","getBorderClassesAndStyles","attributes","border","style","className","undefined","useBorderProps","colors","borderProps","borderColor","borderColorObject","namedColor","color"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,eAAT,QAAgC,SAAhC;AACA,SAASC,gBAAT,EAA2BC,mBAA3B,QAAsD,UAAtD;AACA,OAAOC,mCAAP,MAAgD,yEAAhD,C,CAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,yBAAT,CAAoCC,UAApC,EAAiD;AACvD,QAAMC,MAAM,GAAGD,UAAU,CAACE,KAAX,EAAkBD,MAAlB,IAA4B,EAA3C;AACA,QAAME,SAAS,GAAGP,gBAAgB,CAAEI,UAAF,CAAlC;AAEA,SAAO;AACNG,IAAAA,SAAS,EAAEA,SAAS,IAAIC,SADlB;AAENF,IAAAA,KAAK,EAAEP,eAAe,CAAE;AAAEM,MAAAA;AAAF,KAAF;AAFhB,GAAP;AAIA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASI,cAAT,CAAyBL,UAAzB,EAAsC;AAC5C,QAAM;AAAEM,IAAAA;AAAF,MAAaR,mCAAmC,EAAtD;AACA,QAAMS,WAAW,GAAGR,yBAAyB,CAAEC,UAAF,CAA7C;AACA,QAAM;AAAEQ,IAAAA;AAAF,MAAkBR,UAAxB,CAH4C,CAK5C;AACA;;AACA,MAAKQ,WAAL,EAAmB;AAClB,UAAMC,iBAAiB,GAAGZ,mBAAmB,CAAE;AAC9CS,MAAAA,MAD8C;AAE9CI,MAAAA,UAAU,EAAEF;AAFkC,KAAF,CAA7C;AAKAD,IAAAA,WAAW,CAACL,KAAZ,CAAkBM,WAAlB,GAAgCC,iBAAiB,CAACE,KAAlD;AACA;;AAED,SAAOJ,WAAP;AACA","sourcesContent":["/**\n * Internal dependencies\n */\nimport { getInlineStyles } from './style';\nimport { getBorderClasses, getMultiOriginColor } from './border';\nimport useMultipleOriginColorsAndGradients from '../components/colors-gradients/use-multiple-origin-colors-and-gradients';\n\n// This utility is intended to assist where the serialization of the border\n// block support is being skipped for a block but the border related CSS classes\n// & styles still need to be generated so they can be applied to inner elements.\n\n/**\n * Provides the CSS class names and inline styles for a block's border support\n * attributes.\n *\n * @param {Object} attributes Block attributes.\n * @return {Object} Border block support derived CSS classes & styles.\n */\nexport function getBorderClassesAndStyles( attributes ) {\n\tconst border = attributes.style?.border || {};\n\tconst className = getBorderClasses( attributes );\n\n\treturn {\n\t\tclassName: className || undefined,\n\t\tstyle: getInlineStyles( { border } ),\n\t};\n}\n\n/**\n * Derives the border related props for a block from its border block support\n * attributes.\n *\n * Inline styles are forced for named colors to ensure these selections are\n * reflected when themes do not load their color stylesheets in the editor.\n *\n * @param {Object} attributes Block attributes.\n *\n * @return {Object} ClassName & style props from border block support.\n */\nexport function useBorderProps( attributes ) {\n\tconst { colors } = useMultipleOriginColorsAndGradients();\n\tconst borderProps = getBorderClassesAndStyles( attributes );\n\tconst { borderColor } = attributes;\n\n\t// Force inline styles to apply named border colors when themes do not load\n\t// their color stylesheets in the editor.\n\tif ( borderColor ) {\n\t\tconst borderColorObject = getMultiOriginColor( {\n\t\t\tcolors,\n\t\t\tnamedColor: borderColor,\n\t\t} );\n\n\t\tborderProps.style.borderColor = borderColorObject.color;\n\t}\n\n\treturn borderProps;\n}\n"]}
|
|
@@ -31,8 +31,6 @@ import useSetting from '../components/use-setting'; // The code in this file has
|
|
|
31
31
|
*/
|
|
32
32
|
|
|
33
33
|
export function getColorClassesAndStyles(attributes) {
|
|
34
|
-
var _style$color, _style$color2, _style$color3, _style$color4, _style$elements, _style$elements$link;
|
|
35
|
-
|
|
36
34
|
const {
|
|
37
35
|
backgroundColor,
|
|
38
36
|
textColor,
|
|
@@ -45,17 +43,17 @@ export function getColorClassesAndStyles(attributes) {
|
|
|
45
43
|
|
|
46
44
|
const gradientClass = __experimentalGetGradientClass(gradient);
|
|
47
45
|
|
|
48
|
-
const hasGradient = gradientClass ||
|
|
46
|
+
const hasGradient = gradientClass || style?.color?.gradient; // Determine color CSS class name list.
|
|
49
47
|
|
|
50
48
|
const className = classnames(textClass, gradientClass, {
|
|
51
49
|
// Don't apply the background class if there's a gradient.
|
|
52
50
|
[backgroundClass]: !hasGradient && !!backgroundClass,
|
|
53
|
-
'has-text-color': textColor ||
|
|
54
|
-
'has-background': backgroundColor ||
|
|
55
|
-
'has-link-color': style
|
|
51
|
+
'has-text-color': textColor || style?.color?.text,
|
|
52
|
+
'has-background': backgroundColor || style?.color?.background || gradient || style?.color?.gradient,
|
|
53
|
+
'has-link-color': style?.elements?.link?.color
|
|
56
54
|
}); // Collect inline styles for colors.
|
|
57
55
|
|
|
58
|
-
const colorStyles =
|
|
56
|
+
const colorStyles = style?.color || {};
|
|
59
57
|
const styleProp = getInlineStyles({
|
|
60
58
|
color: colorStyles
|
|
61
59
|
});
|
|
@@ -91,7 +89,7 @@ export function useColorProps(attributes) {
|
|
|
91
89
|
const defaultPalette = useSetting('color.palette.default');
|
|
92
90
|
const gradientsPerOrigin = useSetting('color.gradients') || EMPTY_OBJECT;
|
|
93
91
|
const colors = useMemo(() => [...(userPalette || []), ...(themePalette || []), ...(defaultPalette || [])], [userPalette, themePalette, defaultPalette]);
|
|
94
|
-
const gradients = useMemo(() => [...(
|
|
92
|
+
const gradients = useMemo(() => [...(gradientsPerOrigin?.custom || []), ...(gradientsPerOrigin?.theme || []), ...(gradientsPerOrigin?.default || [])], [gradientsPerOrigin]);
|
|
95
93
|
const colorProps = getColorClassesAndStyles(attributes); // Force inline styles to apply colors when themes do not load their color
|
|
96
94
|
// stylesheets in the editor.
|
|
97
95
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-editor/src/hooks/use-color-props.js"],"names":["classnames","useMemo","getInlineStyles","getColorClassName","getColorObjectByAttributeValues","__experimentalGetGradientClass","getGradientValueBySlug","useSetting","getColorClassesAndStyles","attributes","backgroundColor","textColor","gradient","style","backgroundClass","textClass","gradientClass","hasGradient","color","className","text","background","elements","link","colorStyles","styleProp","undefined","EMPTY_OBJECT","useColorProps","userPalette","themePalette","defaultPalette","gradientsPerOrigin","colors","gradients","custom","theme","default","colorProps","backgroundColorObject","textColorObject"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SAASC,OAAT,QAAwB,oBAAxB;AAEA;AACA;AACA;;AACA,SAASC,eAAT,QAAgC,SAAhC;AACA,SACCC,iBADD,EAECC,+BAFD,QAGO,sBAHP;AAIA,SACCC,8BADD,EAECC,sBAFD,QAGO,yBAHP;AAIA,OAAOC,UAAP,MAAuB,2BAAvB,C,CAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,wBAAT,CAAmCC,UAAnC,EAAgD;
|
|
1
|
+
{"version":3,"sources":["@wordpress/block-editor/src/hooks/use-color-props.js"],"names":["classnames","useMemo","getInlineStyles","getColorClassName","getColorObjectByAttributeValues","__experimentalGetGradientClass","getGradientValueBySlug","useSetting","getColorClassesAndStyles","attributes","backgroundColor","textColor","gradient","style","backgroundClass","textClass","gradientClass","hasGradient","color","className","text","background","elements","link","colorStyles","styleProp","undefined","EMPTY_OBJECT","useColorProps","userPalette","themePalette","defaultPalette","gradientsPerOrigin","colors","gradients","custom","theme","default","colorProps","backgroundColorObject","textColorObject"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SAASC,OAAT,QAAwB,oBAAxB;AAEA;AACA;AACA;;AACA,SAASC,eAAT,QAAgC,SAAhC;AACA,SACCC,iBADD,EAECC,+BAFD,QAGO,sBAHP;AAIA,SACCC,8BADD,EAECC,sBAFD,QAGO,yBAHP;AAIA,OAAOC,UAAP,MAAuB,2BAAvB,C,CAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,wBAAT,CAAmCC,UAAnC,EAAgD;AACtD,QAAM;AAAEC,IAAAA,eAAF;AAAmBC,IAAAA,SAAnB;AAA8BC,IAAAA,QAA9B;AAAwCC,IAAAA;AAAxC,MAAkDJ,UAAxD,CADsD,CAGtD;;AACA,QAAMK,eAAe,GAAGX,iBAAiB,CACxC,kBADwC,EAExCO,eAFwC,CAAzC;AAIA,QAAMK,SAAS,GAAGZ,iBAAiB,CAAE,OAAF,EAAWQ,SAAX,CAAnC;;AAEA,QAAMK,aAAa,GAAGX,8BAA8B,CAAEO,QAAF,CAApD;;AACA,QAAMK,WAAW,GAAGD,aAAa,IAAIH,KAAK,EAAEK,KAAP,EAAcN,QAAnD,CAXsD,CAatD;;AACA,QAAMO,SAAS,GAAGnB,UAAU,CAAEe,SAAF,EAAaC,aAAb,EAA4B;AACvD;AACA,KAAEF,eAAF,GAAqB,CAAEG,WAAF,IAAiB,CAAC,CAAEH,eAFc;AAGvD,sBAAkBH,SAAS,IAAIE,KAAK,EAAEK,KAAP,EAAcE,IAHU;AAIvD,sBACCV,eAAe,IACfG,KAAK,EAAEK,KAAP,EAAcG,UADd,IAEAT,QAFA,IAGAC,KAAK,E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AGL,IAAKJ,kBAAkB,EAAEK,OAApB,IAA+B,EAApC,CAHK,CADkB,EAMxB,CAAEL,kBAAF,CANwB,CAAzB;AASA,QAAMM,UAAU,GAAG9B,wBAAwB,CAAEC,UAAF,CAA3C,CA3B2C,CA6B3C;AACA;;AACA,MAAKC,eAAL,EAAuB;AACtB,UAAM6B,qBAAqB,GAAGnC,+BAA+B,CAC5D6B,MAD4D,EAE5DvB,eAF4D,CAA7D;AAKA4B,IAAAA,UAAU,CAACzB,KAAX,CAAiBH,eAAjB,GAAmC6B,qBAAqB,CAACrB,KAAzD;AACA;;AAED,MAAKN,QAAL,EAAgB;AACf0B,IAAAA,UAAU,CAACzB,KAAX,CAAiBQ,UAAjB,GAA8Bf,sBAAsB,CACnD4B,SADmD,EAEnDtB,QAFmD,CAApD;AAIA;;AAED,MAAKD,SAAL,EAAiB;AAChB,UAAM6B,eAAe,GAAGpC,+BAA+B,CACtD6B,MADsD,EAEtDtB,SAFsD,CAAvD;AAKA2B,IAAAA,UAAU,CAACzB,KAAX,CAAiBK,KAAjB,GAAyBsB,eAAe,CAACtB,KAAzC;AACA;;AAED,SAAOoB,UAAP;AACA","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { getInlineStyles } from './style';\nimport {\n\tgetColorClassName,\n\tgetColorObjectByAttributeValues,\n} from '../components/colors';\nimport {\n\t__experimentalGetGradientClass,\n\tgetGradientValueBySlug,\n} from '../components/gradients';\nimport useSetting from '../components/use-setting';\n\n// The code in this file has largely been lifted from the color block support\n// hook.\n//\n// This utility is intended to assist where the serialization of the colors\n// block support is being skipped for a block but the color related CSS classes\n// & styles still need to be generated so they can be applied to inner elements.\n\n/**\n * Provides the CSS class names and inline styles for a block's color support\n * attributes.\n *\n * @param {Object} attributes Block attributes.\n *\n * @return {Object} Color block support derived CSS classes & styles.\n */\nexport function getColorClassesAndStyles( attributes ) {\n\tconst { backgroundColor, textColor, gradient, style } = attributes;\n\n\t// Collect color CSS classes.\n\tconst backgroundClass = getColorClassName(\n\t\t'background-color',\n\t\tbackgroundColor\n\t);\n\tconst textClass = getColorClassName( 'color', textColor );\n\n\tconst gradientClass = __experimentalGetGradientClass( gradient );\n\tconst hasGradient = gradientClass || style?.color?.gradient;\n\n\t// Determine color CSS class name list.\n\tconst className = classnames( textClass, gradientClass, {\n\t\t// Don't apply the background class if there's a gradient.\n\t\t[ backgroundClass ]: ! hasGradient && !! backgroundClass,\n\t\t'has-text-color': textColor || style?.color?.text,\n\t\t'has-background':\n\t\t\tbackgroundColor ||\n\t\t\tstyle?.color?.background ||\n\t\t\tgradient ||\n\t\t\tstyle?.color?.gradient,\n\t\t'has-link-color': style?.elements?.link?.color,\n\t} );\n\n\t// Collect inline styles for colors.\n\tconst colorStyles = style?.color || {};\n\tconst styleProp = getInlineStyles( { color: colorStyles } );\n\n\treturn {\n\t\tclassName: className || undefined,\n\t\tstyle: styleProp,\n\t};\n}\n\nconst EMPTY_OBJECT = {};\n\n/**\n * Determines the color related props for a block derived from its color block\n * support attributes.\n *\n * Inline styles are forced for named colors to ensure these selections are\n * reflected when themes do not load their color stylesheets in the editor.\n *\n * @param {Object} attributes Block attributes.\n *\n * @return {Object} ClassName & style props from colors block support.\n */\nexport function useColorProps( attributes ) {\n\tconst { backgroundColor, textColor, gradient } = attributes;\n\n\t// Some color settings have a special handling for deprecated flags in `useSetting`,\n\t// so we can't unwrap them by doing const { ... } = useSetting('color')\n\t// until https://github.com/WordPress/gutenberg/issues/37094 is fixed.\n\tconst userPalette = useSetting( 'color.palette.custom' );\n\tconst themePalette = useSetting( 'color.palette.theme' );\n\tconst defaultPalette = useSetting( 'color.palette.default' );\n\tconst gradientsPerOrigin = useSetting( 'color.gradients' ) || EMPTY_OBJECT;\n\tconst colors = useMemo(\n\t\t() => [\n\t\t\t...( userPalette || [] ),\n\t\t\t...( themePalette || [] ),\n\t\t\t...( defaultPalette || [] ),\n\t\t],\n\t\t[ userPalette, themePalette, defaultPalette ]\n\t);\n\tconst gradients = useMemo(\n\t\t() => [\n\t\t\t...( gradientsPerOrigin?.custom || [] ),\n\t\t\t...( gradientsPerOrigin?.theme || [] ),\n\t\t\t...( gradientsPerOrigin?.default || [] ),\n\t\t],\n\t\t[ gradientsPerOrigin ]\n\t);\n\n\tconst colorProps = getColorClassesAndStyles( attributes );\n\n\t// Force inline styles to apply colors when themes do not load their color\n\t// stylesheets in the editor.\n\tif ( backgroundColor ) {\n\t\tconst backgroundColorObject = getColorObjectByAttributeValues(\n\t\t\tcolors,\n\t\t\tbackgroundColor\n\t\t);\n\n\t\tcolorProps.style.backgroundColor = backgroundColorObject.color;\n\t}\n\n\tif ( gradient ) {\n\t\tcolorProps.style.background = getGradientValueBySlug(\n\t\t\tgradients,\n\t\t\tgradient\n\t\t);\n\t}\n\n\tif ( textColor ) {\n\t\tconst textColorObject = getColorObjectByAttributeValues(\n\t\t\tcolors,\n\t\t\ttextColor\n\t\t);\n\n\t\tcolorProps.style.color = textColorObject.color;\n\t}\n\n\treturn colorProps;\n}\n"]}
|
|
@@ -30,13 +30,11 @@ const BLOCK_DEFAULT_MARGIN = 16;
|
|
|
30
30
|
* @return {Object} An object containing the styles for the wide width alignment.
|
|
31
31
|
*/
|
|
32
32
|
|
|
33
|
-
function getWideWidthStyles(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
39
|
-
|
|
33
|
+
function getWideWidthStyles({
|
|
34
|
+
align,
|
|
35
|
+
isLandscape,
|
|
36
|
+
width
|
|
37
|
+
} = {}) {
|
|
40
38
|
if (align !== WIDE_ALIGNMENTS.alignments.wide) {
|
|
41
39
|
return {};
|
|
42
40
|
}
|
|
@@ -75,13 +73,12 @@ function getWideWidthStyles() {
|
|
|
75
73
|
*/
|
|
76
74
|
|
|
77
75
|
|
|
78
|
-
function getFullWidthStyles(
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
76
|
+
function getFullWidthStyles({
|
|
77
|
+
align,
|
|
78
|
+
blockName,
|
|
79
|
+
hasParents,
|
|
80
|
+
parentBlockName
|
|
81
|
+
} = {}) {
|
|
85
82
|
const {
|
|
86
83
|
isContainerRelated,
|
|
87
84
|
isFullWidth
|
|
@@ -113,18 +110,17 @@ function getFullWidthStyles() {
|
|
|
113
110
|
*/
|
|
114
111
|
|
|
115
112
|
|
|
116
|
-
function getBlockMargin(
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
113
|
+
function getBlockMargin({
|
|
114
|
+
align,
|
|
115
|
+
blockName,
|
|
116
|
+
blockWidth,
|
|
117
|
+
hasParents,
|
|
118
|
+
marginHorizontal,
|
|
119
|
+
parentBlockAlignment,
|
|
120
|
+
parentBlockName,
|
|
121
|
+
parentWidth,
|
|
122
|
+
width
|
|
123
|
+
} = {}) {
|
|
128
124
|
const {
|
|
129
125
|
isContainerRelated,
|
|
130
126
|
isWider,
|
|
@@ -180,19 +176,18 @@ function getBlockMargin() {
|
|
|
180
176
|
*/
|
|
181
177
|
|
|
182
178
|
|
|
183
|
-
export function useEditorWrapperStyles(
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
179
|
+
export function useEditorWrapperStyles({
|
|
180
|
+
align,
|
|
181
|
+
blockName,
|
|
182
|
+
blockWidth,
|
|
183
|
+
contentResizeMode,
|
|
184
|
+
hasParents,
|
|
185
|
+
marginHorizontal,
|
|
186
|
+
parentBlockAlignment,
|
|
187
|
+
parentBlockName,
|
|
188
|
+
parentWidth,
|
|
189
|
+
reversed = false
|
|
190
|
+
} = {}) {
|
|
196
191
|
const {
|
|
197
192
|
width,
|
|
198
193
|
height
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-editor/src/hooks/use-editor-wrapper-styles.native.js"],"names":["useWindowDimensions","useMemo","ALIGNMENT_BREAKPOINTS","WIDE_ALIGNMENTS","alignmentHelpers","styles","ALIGNMENT_MAX_WIDTH","full","wide","wideMedium","wideLandscape","BLOCK_DEFAULT_MARGIN","getWideWidthStyles","align","isLandscape","width","alignments","large","maxWidth","small","medium","getFullWidthStyles","blockName","hasParents","parentBlockName","isContainerRelated","isFullWidth","fullWidthStyles","paddingHorizontal","getBlockMargin","blockWidth","marginHorizontal","parentBlockAlignment","parentWidth","isWider","isWideWidth","isScreenWidthEqual","useEditorWrapperStyles","contentResizeMode","reversed","height","blockMargin","wrapperStyles","canvasStyles","flex","alignmentStyles"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,mBAAT,QAAoC,cAApC;AAEA;AACA;AACA;;AACA,SAASC,OAAT,QAAwB,oBAAxB;AACA,SACCC,qBADD,EAECC,eAFD,EAGCC,gBAHD,QAIO,uBAJP;AAMA;AACA;AACA;;AACA,OAAOC,MAAP,MAAmB,kCAAnB;AAEA,MAAMC,mBAAmB,GAAG;AAC3BC,EAAAA,IAAI,EAAE,MADqB;AAE3BC,EAAAA,IAAI,EAAE,IAFqB;AAG3BC,EAAAA,UAAU,EAAE,GAHe;AAI3BC,EAAAA,aAAa,EAAE;AAJY,CAA5B;AAOA,MAAMC,oBAAoB,GAAG,EAA7B;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASC,kBAAT,GAAkE;AAAA,MAArC;A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AArB;AACA;;AAED,UAAMwC,eAAe,GAAG,EACvB,GAAGjC,kBAAkB,CAAE;AAAEC,QAAAA,KAAF;AAASC,QAAAA,WAAT;AAAsBC,QAAAA;AAAtB,OAAF,CADE;AAEvB,SAAGM,kBAAkB,CAAE;AACtBR,QAAAA,KADsB;AAEtBS,QAAAA,SAFsB;AAGtBC,QAAAA,UAHsB;AAItBC,QAAAA;AAJsB,OAAF;AAFE,KAAxB;AAUA,WAAO,CAAEmB,YAAF,EAAgBE,eAAhB,CAAP;AACA,GAvB4B,EAuB1B,CACFhC,KADE,EAEFS,SAFE,EAGFC,UAHE,EAIFC,eAJE,EAKFV,WALE,EAMFC,KANE,EAOFuB,iBAPE,EAQFC,QARE,CAvB0B,CAA7B;AAkCA,SAAO,CAAEG,aAAF,EAAiBD,WAAjB,CAAP;AACA","sourcesContent":["/**\n * External dependencies\n */\nimport { useWindowDimensions } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport {\n\tALIGNMENT_BREAKPOINTS,\n\tWIDE_ALIGNMENTS,\n\talignmentHelpers,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport styles from './use-editor-wrapper-styles.scss';\n\nconst ALIGNMENT_MAX_WIDTH = {\n\tfull: '100%',\n\twide: 1054,\n\twideMedium: 770,\n\twideLandscape: 662,\n};\n\nconst BLOCK_DEFAULT_MARGIN = 16;\n\n/**\n * Get the styles for the wide width alignment.\n *\n * @param {Object} [options] The options for the helper.\n * @param {string} options.align The alignment value.\n * @param {boolean} options.isLandscape Whether the screen is in landscape mode.\n * @param {number} options.width The width of the screen.\n * @return {Object} An object containing the styles for the wide width alignment.\n */\nfunction getWideWidthStyles( { align, isLandscape, width } = {} ) {\n\tif ( align !== WIDE_ALIGNMENTS.alignments.wide ) {\n\t\treturn {};\n\t}\n\n\tif ( isLandscape && width < ALIGNMENT_BREAKPOINTS.large ) {\n\t\treturn { maxWidth: ALIGNMENT_MAX_WIDTH.wideLandscape };\n\t}\n\n\tif ( width <= ALIGNMENT_BREAKPOINTS.small ) {\n\t\treturn { maxWidth: width };\n\t}\n\n\tif (\n\t\twidth >= ALIGNMENT_BREAKPOINTS.medium &&\n\t\twidth < ALIGNMENT_BREAKPOINTS.wide\n\t) {\n\t\treturn { maxWidth: ALIGNMENT_MAX_WIDTH.wideMedium };\n\t}\n\n\treturn { maxWidth: ALIGNMENT_MAX_WIDTH.wide };\n}\n\n/**\n * Get the styles for the full width alignment.\n *\n * @param {Object} [options] The options for the helper.\n * @param {string} options.align The alignment value.\n * @param {string} options.blockName The name of the block.\n * @param {boolean} options.hasParents Whether the block has parents.\n * @param {string} options.parentBlockName The name of the parent block.\n * @return {Object} An object containing the styles for the full width alignment.\n */\nfunction getFullWidthStyles( {\n\talign,\n\tblockName,\n\thasParents,\n\tparentBlockName,\n} = {} ) {\n\tconst { isContainerRelated, isFullWidth } = alignmentHelpers;\n\tconst fullWidthStyles = isFullWidth( align )\n\t\t? { maxWidth: ALIGNMENT_MAX_WIDTH.full }\n\t\t: {};\n\n\tif (\n\t\t! align &&\n\t\thasParents &&\n\t\t! isContainerRelated( parentBlockName ) &&\n\t\tisContainerRelated( blockName )\n\t) {\n\t\tfullWidthStyles.paddingHorizontal = BLOCK_DEFAULT_MARGIN;\n\t}\n\n\treturn fullWidthStyles;\n}\n\n/**\n * Get the block margin based on various conditions.\n *\n * @param {Object} [options] The options for the helper.\n * @param {string} options.align The alignment value.\n * @param {string} options.blockName The name of the block.\n * @param {number} options.blockWidth The width of the block.\n * @param {boolean} options.hasParents Whether the block has parents.\n * @param {number} options.marginHorizontal Default horizontal margin.\n * @param {string} options.parentBlockAlignment The alignment of the parent block.\n * @param {string} options.parentBlockName The name of the parent block.\n * @param {number} options.parentWidth The width of the parent block.\n * @param {number} options.width The width of the screen.\n * @return {number} The calculated block margin.\n */\nfunction getBlockMargin( {\n\talign,\n\tblockName,\n\tblockWidth,\n\thasParents,\n\tmarginHorizontal,\n\tparentBlockAlignment,\n\tparentBlockName,\n\tparentWidth,\n\twidth,\n} = {} ) {\n\tconst { isContainerRelated, isWider, isWideWidth, isFullWidth } =\n\t\talignmentHelpers;\n\n\tif ( isFullWidth( align ) ) {\n\t\tif ( ! hasParents ) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn marginHorizontal;\n\t}\n\n\tif ( isWideWidth( align ) ) {\n\t\treturn marginHorizontal;\n\t}\n\n\tif (\n\t\tisFullWidth( parentBlockAlignment ) &&\n\t\t! isWider( blockWidth, 'medium' )\n\t) {\n\t\tif ( isContainerRelated( blockName ) || isWider( width, 'mobile' ) ) {\n\t\t\treturn marginHorizontal;\n\t\t}\n\t\treturn marginHorizontal * 2;\n\t}\n\n\tif (\n\t\tisContainerRelated( parentBlockName ) &&\n\t\t! isContainerRelated( blockName )\n\t) {\n\t\tconst isScreenWidthEqual = parentWidth === width;\n\t\tif ( isScreenWidthEqual || isWider( width, 'mobile' ) ) {\n\t\t\treturn marginHorizontal;\n\t\t}\n\t}\n\n\treturn marginHorizontal;\n}\n\n/**\n * Custom hook to get the styles and margin for the editor wrapper.\n *\n * @param {Object} [props] The props for the hook.\n * @param {string} props.align The alignment value.\n * @param {string} props.blockName The name of the block.\n * @param {number} props.blockWidth The width of the block.\n * @param {string} props.contentResizeMode The content resize mode.\n * @param {boolean} props.hasParents Whether the block has parents.\n * @param {number} props.marginHorizontal Default horizontal margin.\n * @param {string} props.parentBlockAlignment The alignment of the parent block.\n * @param {string} props.parentBlockName The name of the parent block.\n * @param {number} props.parentWidth The width of the parent block.\n * @param {boolean} [props.reversed=false] Whether the flex direction should be reversed.\n * @return {[Array, number]} An array containing the wrapper styles and block margin.\n */\nexport function useEditorWrapperStyles( {\n\talign,\n\tblockName,\n\tblockWidth,\n\tcontentResizeMode,\n\thasParents,\n\tmarginHorizontal,\n\tparentBlockAlignment,\n\tparentBlockName,\n\tparentWidth,\n\treversed = false,\n} = {} ) {\n\tconst { width, height } = useWindowDimensions();\n\tconst isLandscape = width >= height;\n\n\tconst blockMargin = useMemo(\n\t\t() =>\n\t\t\tgetBlockMargin( {\n\t\t\t\talign,\n\t\t\t\tblockName,\n\t\t\t\tblockWidth,\n\t\t\t\thasParents,\n\t\t\t\tmarginHorizontal,\n\t\t\t\tparentBlockAlignment,\n\t\t\t\tparentBlockName,\n\t\t\t\tparentWidth,\n\t\t\t\twidth,\n\t\t\t} ),\n\t\t[\n\t\t\talign,\n\t\t\tblockName,\n\t\t\tblockWidth,\n\t\t\thasParents,\n\t\t\tmarginHorizontal,\n\t\t\tparentBlockAlignment,\n\t\t\tparentBlockName,\n\t\t\tparentWidth,\n\t\t\twidth,\n\t\t]\n\t);\n\n\tconst wrapperStyles = useMemo( () => {\n\t\tlet canvasStyles;\n\n\t\tif ( contentResizeMode === 'stretch' ) {\n\t\t\t// For these cases, no width constraints should be added.\n\t\t\tcanvasStyles = { flex: 1 };\n\t\t} else if ( reversed ) {\n\t\t\tcanvasStyles = styles[ 'use-editor-wrapper-styles--reversed' ];\n\t\t} else {\n\t\t\tcanvasStyles = styles[ 'use-editor-wrapper-styles' ];\n\t\t}\n\n\t\tconst alignmentStyles = {\n\t\t\t...getWideWidthStyles( { align, isLandscape, width } ),\n\t\t\t...getFullWidthStyles( {\n\t\t\t\talign,\n\t\t\t\tblockName,\n\t\t\t\thasParents,\n\t\t\t\tparentBlockName,\n\t\t\t} ),\n\t\t};\n\n\t\treturn [ canvasStyles, alignmentStyles ];\n\t}, [\n\t\talign,\n\t\tblockName,\n\t\thasParents,\n\t\tparentBlockName,\n\t\tisLandscape,\n\t\twidth,\n\t\tcontentResizeMode,\n\t\treversed,\n\t] );\n\n\treturn [ wrapperStyles, blockMargin ];\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["@wordpress/block-editor/src/hooks/use-editor-wrapper-styles.native.js"],"names":["useWindowDimensions","useMemo","ALIGNMENT_BREAKPOINTS","WIDE_ALIGNMENTS","alignmentHelpers","styles","ALIGNMENT_MAX_WIDTH","full","wide","wideMedium","wideLandscape","BLOCK_DEFAULT_MARGIN","getWideWidthStyles","align","isLandscape","width","alignments","large","maxWidth","small","medium","getFullWidthStyles","blockName","hasParents","parentBlockName","isContainerRelated","isFullWidth","fullWidthStyles","paddingHorizontal","getBlockMargin","blockWidth","marginHorizontal","parentBlockAlignment","parentWidth","isWider","isWideWidth","isScreenWidthEqual","useEditorWrapperStyles","contentResizeMode","reversed","height","blockMargin","wrapperStyles","canvasStyles","flex","alignmentStyles"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,mBAAT,QAAoC,cAApC;AAEA;AACA;AACA;;AACA,SAASC,OAAT,QAAwB,oBAAxB;AACA,SACCC,qBADD,EAECC,eAFD,EAGCC,gBAHD,QAIO,uBAJP;AAMA;AACA;AACA;;AACA,OAAOC,MAAP,MAAmB,kCAAnB;AAEA,MAAMC,mBAAmB,GAAG;AAC3BC,EAAAA,IAAI,EAAE,MADqB;AAE3BC,EAAAA,IAAI,EAAE,IAFqB;AAG3BC,EAAAA,UAAU,EAAE,GAHe;AAI3BC,EAAAA,aAAa,EAAE;AAJY,CAA5B;AAOA,MAAMC,oBAAoB,GAAG,EAA7B;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASC,kBAAT,CAA6B;AAAEC,EAAAA,KAAF;AAASC,EAAAA,WAAT;AAAsBC,EAAAA;AAAtB,IAAgC,EAA7D,EAAkE;AACjE,MAAKF,KAAK,KAAKV,eAAe,CAACa,UAAhB,CAA2BR,IAA1C,EAAiD;AAChD,WAAO,EAAP;AACA;;AAED,MAAKM,WAAW,IAAIC,KAAK,GAAGb,qBAAqB,CAACe,KAAlD,EAA0D;AACzD,WAAO;AAAEC,MAAAA,QAAQ,EAAEZ,mBAAmB,CAACI;AAAhC,KAAP;AACA;;AAED,MAAKK,KAAK,IAAIb,qBAAqB,CAACiB,KAApC,EAA4C;AAC3C,WAAO;AAAED,MAAAA,QAAQ,EAAEH;AAAZ,KAAP;AACA;;AAED,MACCA,KAAK,IA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EAAiBD,WAAjB,CAAP;AACA","sourcesContent":["/**\n * External dependencies\n */\nimport { useWindowDimensions } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport {\n\tALIGNMENT_BREAKPOINTS,\n\tWIDE_ALIGNMENTS,\n\talignmentHelpers,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport styles from './use-editor-wrapper-styles.scss';\n\nconst ALIGNMENT_MAX_WIDTH = {\n\tfull: '100%',\n\twide: 1054,\n\twideMedium: 770,\n\twideLandscape: 662,\n};\n\nconst BLOCK_DEFAULT_MARGIN = 16;\n\n/**\n * Get the styles for the wide width alignment.\n *\n * @param {Object} [options] The options for the helper.\n * @param {string} options.align The alignment value.\n * @param {boolean} options.isLandscape Whether the screen is in landscape mode.\n * @param {number} options.width The width of the screen.\n * @return {Object} An object containing the styles for the wide width alignment.\n */\nfunction getWideWidthStyles( { align, isLandscape, width } = {} ) {\n\tif ( align !== WIDE_ALIGNMENTS.alignments.wide ) {\n\t\treturn {};\n\t}\n\n\tif ( isLandscape && width < ALIGNMENT_BREAKPOINTS.large ) {\n\t\treturn { maxWidth: ALIGNMENT_MAX_WIDTH.wideLandscape };\n\t}\n\n\tif ( width <= ALIGNMENT_BREAKPOINTS.small ) {\n\t\treturn { maxWidth: width };\n\t}\n\n\tif (\n\t\twidth >= ALIGNMENT_BREAKPOINTS.medium &&\n\t\twidth < ALIGNMENT_BREAKPOINTS.wide\n\t) {\n\t\treturn { maxWidth: ALIGNMENT_MAX_WIDTH.wideMedium };\n\t}\n\n\treturn { maxWidth: ALIGNMENT_MAX_WIDTH.wide };\n}\n\n/**\n * Get the styles for the full width alignment.\n *\n * @param {Object} [options] The options for the helper.\n * @param {string} options.align The alignment value.\n * @param {string} options.blockName The name of the block.\n * @param {boolean} options.hasParents Whether the block has parents.\n * @param {string} options.parentBlockName The name of the parent block.\n * @return {Object} An object containing the styles for the full width alignment.\n */\nfunction getFullWidthStyles( {\n\talign,\n\tblockName,\n\thasParents,\n\tparentBlockName,\n} = {} ) {\n\tconst { isContainerRelated, isFullWidth } = alignmentHelpers;\n\tconst fullWidthStyles = isFullWidth( align )\n\t\t? { maxWidth: ALIGNMENT_MAX_WIDTH.full }\n\t\t: {};\n\n\tif (\n\t\t! align &&\n\t\thasParents &&\n\t\t! isContainerRelated( parentBlockName ) &&\n\t\tisContainerRelated( blockName )\n\t) {\n\t\tfullWidthStyles.paddingHorizontal = BLOCK_DEFAULT_MARGIN;\n\t}\n\n\treturn fullWidthStyles;\n}\n\n/**\n * Get the block margin based on various conditions.\n *\n * @param {Object} [options] The options for the helper.\n * @param {string} options.align The alignment value.\n * @param {string} options.blockName The name of the block.\n * @param {number} options.blockWidth The width of the block.\n * @param {boolean} options.hasParents Whether the block has parents.\n * @param {number} options.marginHorizontal Default horizontal margin.\n * @param {string} options.parentBlockAlignment The alignment of the parent block.\n * @param {string} options.parentBlockName The name of the parent block.\n * @param {number} options.parentWidth The width of the parent block.\n * @param {number} options.width The width of the screen.\n * @return {number} The calculated block margin.\n */\nfunction getBlockMargin( {\n\talign,\n\tblockName,\n\tblockWidth,\n\thasParents,\n\tmarginHorizontal,\n\tparentBlockAlignment,\n\tparentBlockName,\n\tparentWidth,\n\twidth,\n} = {} ) {\n\tconst { isContainerRelated, isWider, isWideWidth, isFullWidth } =\n\t\talignmentHelpers;\n\n\tif ( isFullWidth( align ) ) {\n\t\tif ( ! hasParents ) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn marginHorizontal;\n\t}\n\n\tif ( isWideWidth( align ) ) {\n\t\treturn marginHorizontal;\n\t}\n\n\tif (\n\t\tisFullWidth( parentBlockAlignment ) &&\n\t\t! isWider( blockWidth, 'medium' )\n\t) {\n\t\tif ( isContainerRelated( blockName ) || isWider( width, 'mobile' ) ) {\n\t\t\treturn marginHorizontal;\n\t\t}\n\t\treturn marginHorizontal * 2;\n\t}\n\n\tif (\n\t\tisContainerRelated( parentBlockName ) &&\n\t\t! isContainerRelated( blockName )\n\t) {\n\t\tconst isScreenWidthEqual = parentWidth === width;\n\t\tif ( isScreenWidthEqual || isWider( width, 'mobile' ) ) {\n\t\t\treturn marginHorizontal;\n\t\t}\n\t}\n\n\treturn marginHorizontal;\n}\n\n/**\n * Custom hook to get the styles and margin for the editor wrapper.\n *\n * @param {Object} [props] The props for the hook.\n * @param {string} props.align The alignment value.\n * @param {string} props.blockName The name of the block.\n * @param {number} props.blockWidth The width of the block.\n * @param {string} props.contentResizeMode The content resize mode.\n * @param {boolean} props.hasParents Whether the block has parents.\n * @param {number} props.marginHorizontal Default horizontal margin.\n * @param {string} props.parentBlockAlignment The alignment of the parent block.\n * @param {string} props.parentBlockName The name of the parent block.\n * @param {number} props.parentWidth The width of the parent block.\n * @param {boolean} [props.reversed=false] Whether the flex direction should be reversed.\n * @return {[Array, number]} An array containing the wrapper styles and block margin.\n */\nexport function useEditorWrapperStyles( {\n\talign,\n\tblockName,\n\tblockWidth,\n\tcontentResizeMode,\n\thasParents,\n\tmarginHorizontal,\n\tparentBlockAlignment,\n\tparentBlockName,\n\tparentWidth,\n\treversed = false,\n} = {} ) {\n\tconst { width, height } = useWindowDimensions();\n\tconst isLandscape = width >= height;\n\n\tconst blockMargin = useMemo(\n\t\t() =>\n\t\t\tgetBlockMargin( {\n\t\t\t\talign,\n\t\t\t\tblockName,\n\t\t\t\tblockWidth,\n\t\t\t\thasParents,\n\t\t\t\tmarginHorizontal,\n\t\t\t\tparentBlockAlignment,\n\t\t\t\tparentBlockName,\n\t\t\t\tparentWidth,\n\t\t\t\twidth,\n\t\t\t} ),\n\t\t[\n\t\t\talign,\n\t\t\tblockName,\n\t\t\tblockWidth,\n\t\t\thasParents,\n\t\t\tmarginHorizontal,\n\t\t\tparentBlockAlignment,\n\t\t\tparentBlockName,\n\t\t\tparentWidth,\n\t\t\twidth,\n\t\t]\n\t);\n\n\tconst wrapperStyles = useMemo( () => {\n\t\tlet canvasStyles;\n\n\t\tif ( contentResizeMode === 'stretch' ) {\n\t\t\t// For these cases, no width constraints should be added.\n\t\t\tcanvasStyles = { flex: 1 };\n\t\t} else if ( reversed ) {\n\t\t\tcanvasStyles = styles[ 'use-editor-wrapper-styles--reversed' ];\n\t\t} else {\n\t\t\tcanvasStyles = styles[ 'use-editor-wrapper-styles' ];\n\t\t}\n\n\t\tconst alignmentStyles = {\n\t\t\t...getWideWidthStyles( { align, isLandscape, width } ),\n\t\t\t...getFullWidthStyles( {\n\t\t\t\talign,\n\t\t\t\tblockName,\n\t\t\t\thasParents,\n\t\t\t\tparentBlockName,\n\t\t\t} ),\n\t\t};\n\n\t\treturn [ canvasStyles, alignmentStyles ];\n\t}, [\n\t\talign,\n\t\tblockName,\n\t\thasParents,\n\t\tparentBlockName,\n\t\tisLandscape,\n\t\twidth,\n\t\tcontentResizeMode,\n\t\treversed,\n\t] );\n\n\treturn [ wrapperStyles, blockMargin ];\n}\n"]}
|
|
@@ -19,7 +19,7 @@ export function getSpacingClassesAndStyles(attributes) {
|
|
|
19
19
|
style
|
|
20
20
|
} = attributes; // Collect inline styles for spacing.
|
|
21
21
|
|
|
22
|
-
const spacingStyles =
|
|
22
|
+
const spacingStyles = style?.spacing || {};
|
|
23
23
|
const styleProp = getInlineStyles({
|
|
24
24
|
spacing: spacingStyles
|
|
25
25
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-editor/src/hooks/use-spacing-props.js"],"names":["getInlineStyles","getSpacingClassesAndStyles","attributes","style","spacingStyles","spacing","styleProp"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,eAAT,QAAgC,SAAhC,C,CAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,0BAAT,CAAqCC,UAArC,EAAkD;AACxD,QAAM;AAAEC,IAAAA;AAAF,MAAYD,UAAlB,CADwD,CAGxD;;AACA,QAAME,aAAa,
|
|
1
|
+
{"version":3,"sources":["@wordpress/block-editor/src/hooks/use-spacing-props.js"],"names":["getInlineStyles","getSpacingClassesAndStyles","attributes","style","spacingStyles","spacing","styleProp"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,eAAT,QAAgC,SAAhC,C,CAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,0BAAT,CAAqCC,UAArC,EAAkD;AACxD,QAAM;AAAEC,IAAAA;AAAF,MAAYD,UAAlB,CADwD,CAGxD;;AACA,QAAME,aAAa,GAAGD,KAAK,EAAEE,OAAP,IAAkB,EAAxC;AACA,QAAMC,SAAS,GAAGN,eAAe,CAAE;AAAEK,IAAAA,OAAO,EAAED;AAAX,GAAF,CAAjC;AAEA,SAAO;AACND,IAAAA,KAAK,EAAEG;AADD,GAAP;AAGA","sourcesContent":["/**\n * Internal dependencies\n */\nimport { getInlineStyles } from './style';\n\n// This utility is intended to assist where the serialization of the spacing\n// block support is being skipped for a block but the spacing related CSS\n// styles still need to be generated so they can be applied to inner elements.\n\n/**\n * Provides the CSS class names and inline styles for a block's spacing support\n * attributes.\n *\n * @param {Object} attributes Block attributes.\n *\n * @return {Object} Spacing block support derived CSS classes & styles.\n */\nexport function getSpacingClassesAndStyles( attributes ) {\n\tconst { style } = attributes;\n\n\t// Collect inline styles for spacing.\n\tconst spacingStyles = style?.spacing || {};\n\tconst styleProp = getInlineStyles( { spacing: spacingStyles } );\n\n\treturn {\n\t\tstyle: styleProp,\n\t};\n}\n"]}
|
|
@@ -27,19 +27,15 @@ import { getComputedFluidTypographyValue } from '../components/font-sizes/fluid-
|
|
|
27
27
|
*/
|
|
28
28
|
|
|
29
29
|
export function getTypographyClassesAndStyles(attributes, settings) {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
let typographyStyles = (attributes === null || attributes === void 0 ? void 0 : (_attributes$style = attributes.style) === null || _attributes$style === void 0 ? void 0 : _attributes$style.typography) || {};
|
|
33
|
-
const fluidTypographySettings = settings === null || settings === void 0 ? void 0 : (_settings$typography = settings.typography) === null || _settings$typography === void 0 ? void 0 : _settings$typography.fluid;
|
|
30
|
+
let typographyStyles = attributes?.style?.typography || {};
|
|
31
|
+
const fluidTypographySettings = settings?.typography?.fluid;
|
|
34
32
|
|
|
35
33
|
if (!!fluidTypographySettings && (true === fluidTypographySettings || Object.keys(fluidTypographySettings).length !== 0)) {
|
|
36
|
-
var _attributes$style2, _attributes$style2$ty, _settings$layout, _attributes$style3, _attributes$style3$ty;
|
|
37
|
-
|
|
38
34
|
const newFontSize = getComputedFluidTypographyValue({
|
|
39
|
-
fontSize: attributes
|
|
40
|
-
minimumFontSizeLimit: fluidTypographySettings
|
|
41
|
-
maximumViewPortWidth: settings
|
|
42
|
-
}) ||
|
|
35
|
+
fontSize: attributes?.style?.typography?.fontSize,
|
|
36
|
+
minimumFontSizeLimit: fluidTypographySettings?.minFontSize,
|
|
37
|
+
maximumViewPortWidth: settings?.layout?.wideSize
|
|
38
|
+
}) || attributes?.style?.typography?.fontSize;
|
|
43
39
|
typographyStyles = { ...typographyStyles,
|
|
44
40
|
fontSize: newFontSize
|
|
45
41
|
};
|
|
@@ -48,8 +44,8 @@ export function getTypographyClassesAndStyles(attributes, settings) {
|
|
|
48
44
|
const style = getInlineStyles({
|
|
49
45
|
typography: typographyStyles
|
|
50
46
|
});
|
|
51
|
-
const fontFamilyClassName = !!
|
|
52
|
-
const className = classnames(fontFamilyClassName, getFontSizeClass(attributes
|
|
47
|
+
const fontFamilyClassName = !!attributes?.fontFamily ? `has-${kebabCase(attributes.fontFamily)}-font-family` : '';
|
|
48
|
+
const className = classnames(fontFamilyClassName, getFontSizeClass(attributes?.fontSize));
|
|
53
49
|
return {
|
|
54
50
|
className,
|
|
55
51
|
style
|