@wordpress/block-editor 17.0.0 → 17.1.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 +45 -0
- package/build/autocompleters/block.cjs +1 -1
- package/build/autocompleters/block.cjs.map +1 -1
- package/build/components/alignment-control/index.cjs +1 -1
- package/build/components/alignment-control/index.cjs.map +1 -1
- package/build/components/alignment-control/ui.cjs +1 -1
- package/build/components/alignment-control/ui.cjs.map +1 -1
- package/build/components/autocomplete/index.cjs +1 -1
- package/build/components/autocomplete/index.cjs.map +1 -1
- package/build/components/background-image-control/index.cjs +19 -2
- package/build/components/background-image-control/index.cjs.map +3 -3
- package/build/components/block-alignment-control/index.cjs +1 -1
- package/build/components/block-alignment-control/index.cjs.map +1 -1
- package/build/components/block-alignment-control/ui.cjs +1 -1
- package/build/components/block-alignment-control/ui.cjs.map +1 -1
- package/build/components/block-alignment-matrix-control/index.cjs +1 -1
- package/build/components/block-alignment-matrix-control/index.cjs.map +1 -1
- package/build/components/block-allowed-blocks/allowed-blocks-control.cjs +1 -1
- package/build/components/block-allowed-blocks/allowed-blocks-control.cjs.map +1 -1
- package/build/components/block-allowed-blocks/modal.cjs +3 -2
- package/build/components/block-allowed-blocks/modal.cjs.map +4 -4
- package/build/components/block-bindings/attribute-control.cjs +1 -1
- package/build/components/block-bindings/attribute-control.cjs.map +1 -1
- package/build/components/block-bindings/source-fields-list.cjs +1 -1
- package/build/components/block-bindings/source-fields-list.cjs.map +1 -1
- package/build/components/block-breadcrumb/index.cjs +1 -1
- package/build/components/block-breadcrumb/index.cjs.map +1 -1
- package/build/components/block-canvas/index.cjs +1 -1
- package/build/components/block-canvas/index.cjs.map +1 -1
- package/build/components/block-card/index.cjs +1 -1
- package/build/components/block-card/index.cjs.map +1 -1
- package/build/components/block-compare/block-view.cjs +1 -1
- package/build/components/block-compare/block-view.cjs.map +1 -1
- package/build/components/block-compare/index.cjs +1 -1
- package/build/components/block-compare/index.cjs.map +1 -1
- package/build/components/block-context/index.cjs +1 -1
- package/build/components/block-context/index.cjs.map +1 -1
- package/build/components/block-controls/fill.cjs +1 -1
- package/build/components/block-controls/fill.cjs.map +1 -1
- package/build/components/block-controls/index.cjs +1 -1
- package/build/components/block-controls/index.cjs.map +1 -1
- package/build/components/block-controls/slot.cjs +1 -1
- package/build/components/block-controls/slot.cjs.map +1 -1
- package/build/components/block-draggable/draggable-chip.cjs +1 -1
- package/build/components/block-draggable/draggable-chip.cjs.map +1 -1
- package/build/components/block-draggable/index.cjs +1 -1
- package/build/components/block-draggable/index.cjs.map +1 -1
- package/build/components/block-edit/edit.cjs +1 -1
- package/build/components/block-edit/edit.cjs.map +2 -2
- package/build/components/block-edit/index.cjs +1 -1
- package/build/components/block-edit/index.cjs.map +1 -1
- package/build/components/block-edit/multiple-usage-warning.cjs +1 -1
- package/build/components/block-edit/multiple-usage-warning.cjs.map +1 -1
- package/build/components/block-edit-visually-button/index.cjs +1 -1
- package/build/components/block-edit-visually-button/index.cjs.map +1 -1
- package/build/components/block-full-height-alignment-control/index.cjs +1 -1
- package/build/components/block-full-height-alignment-control/index.cjs.map +1 -1
- package/build/components/block-heading-level-dropdown/heading-level-icon.cjs +1 -1
- package/build/components/block-heading-level-dropdown/heading-level-icon.cjs.map +1 -1
- package/build/components/block-heading-level-dropdown/index.cjs +1 -1
- package/build/components/block-heading-level-dropdown/index.cjs.map +1 -1
- package/build/components/block-icon/index.cjs +1 -1
- package/build/components/block-icon/index.cjs.map +1 -1
- package/build/components/block-inspector/edit-contents.cjs +1 -1
- package/build/components/block-inspector/edit-contents.cjs.map +1 -1
- package/build/components/block-inspector/index.cjs +8 -16
- package/build/components/block-inspector/index.cjs.map +3 -3
- package/build/components/block-keyboard-shortcuts/index.cjs +1 -1
- package/build/components/block-keyboard-shortcuts/index.cjs.map +1 -1
- package/build/components/block-list/block-crash-warning.cjs +1 -1
- package/build/components/block-list/block-crash-warning.cjs.map +1 -1
- package/build/components/block-list/block-html.cjs +1 -1
- package/build/components/block-list/block-html.cjs.map +1 -1
- package/build/components/block-list/block-invalid-warning.cjs +1 -1
- package/build/components/block-list/block-invalid-warning.cjs.map +1 -1
- package/build/components/block-list/block.cjs +1 -1
- package/build/components/block-list/block.cjs.map +1 -1
- package/build/components/block-list/index.cjs +1 -1
- package/build/components/block-list/index.cjs.map +1 -1
- package/build/components/block-list/layout.cjs +1 -1
- package/build/components/block-list/layout.cjs.map +1 -1
- package/build/components/block-list/subdirectory-icon.cjs +1 -1
- package/build/components/block-list/subdirectory-icon.cjs.map +1 -1
- package/build/components/block-list/use-block-props/use-is-hovered.cjs +17 -4
- package/build/components/block-list/use-block-props/use-is-hovered.cjs.map +2 -2
- package/build/components/block-list/zoom-out-separator.cjs +1 -1
- package/build/components/block-list/zoom-out-separator.cjs.map +1 -1
- package/build/components/block-list-appender/index.cjs +1 -1
- package/build/components/block-list-appender/index.cjs.map +1 -1
- package/build/components/block-lock/menu-item.cjs +1 -1
- package/build/components/block-lock/menu-item.cjs.map +1 -1
- package/build/components/block-lock/modal.cjs +1 -1
- package/build/components/block-lock/modal.cjs.map +1 -1
- package/build/components/block-lock/toolbar.cjs +1 -1
- package/build/components/block-lock/toolbar.cjs.map +1 -1
- package/build/components/block-manager/category.cjs +1 -1
- package/build/components/block-manager/category.cjs.map +1 -1
- package/build/components/block-manager/checklist.cjs +1 -1
- package/build/components/block-manager/checklist.cjs.map +1 -1
- package/build/components/block-manager/index.cjs +1 -1
- package/build/components/block-manager/index.cjs.map +1 -1
- package/build/components/block-mover/button.cjs +1 -1
- package/build/components/block-mover/button.cjs.map +1 -1
- package/build/components/block-mover/index.cjs +1 -1
- package/build/components/block-mover/index.cjs.map +1 -1
- package/build/components/block-navigation/dropdown.cjs +1 -1
- package/build/components/block-navigation/dropdown.cjs.map +1 -1
- package/build/components/block-parent-selector/index.cjs +1 -1
- package/build/components/block-parent-selector/index.cjs.map +1 -1
- package/build/components/block-pattern-setup/index.cjs +1 -1
- package/build/components/block-pattern-setup/index.cjs.map +1 -1
- package/build/components/block-pattern-setup/setup-toolbar.cjs +1 -1
- package/build/components/block-pattern-setup/setup-toolbar.cjs.map +1 -1
- package/build/components/block-patterns-list/index.cjs +1 -1
- package/build/components/block-patterns-list/index.cjs.map +1 -1
- package/build/components/block-patterns-paging/index.cjs +1 -1
- package/build/components/block-patterns-paging/index.cjs.map +1 -1
- package/build/components/block-popover/cover.cjs +1 -1
- package/build/components/block-popover/cover.cjs.map +1 -1
- package/build/components/block-popover/drop-zone.cjs +1 -1
- package/build/components/block-popover/drop-zone.cjs.map +1 -1
- package/build/components/block-popover/inbetween.cjs +1 -1
- package/build/components/block-popover/inbetween.cjs.map +1 -1
- package/build/components/block-popover/index.cjs +1 -1
- package/build/components/block-popover/index.cjs.map +1 -1
- package/build/components/block-preview/auto.cjs +1 -1
- package/build/components/block-preview/auto.cjs.map +1 -1
- package/build/components/block-preview/index.cjs +2 -3
- package/build/components/block-preview/index.cjs.map +3 -3
- package/build/components/block-quick-navigation/index.cjs +1 -1
- package/build/components/block-quick-navigation/index.cjs.map +1 -1
- package/build/components/block-removal-warning-modal/index.cjs +1 -1
- package/build/components/block-removal-warning-modal/index.cjs.map +1 -1
- package/build/components/block-rename/modal.cjs +1 -1
- package/build/components/block-rename/modal.cjs.map +1 -1
- package/build/components/block-rename/rename-control.cjs +1 -1
- package/build/components/block-rename/rename-control.cjs.map +1 -1
- package/build/components/block-selection-clearer/index.cjs +1 -1
- package/build/components/block-selection-clearer/index.cjs.map +1 -1
- package/build/components/block-settings-menu/block-html-convert-button.cjs +1 -1
- package/build/components/block-settings-menu/block-html-convert-button.cjs.map +1 -1
- package/build/components/block-settings-menu/block-mode-toggle.cjs +1 -1
- package/build/components/block-settings-menu/block-mode-toggle.cjs.map +1 -1
- package/build/components/block-settings-menu/block-parent-selector-menu-item.cjs +1 -1
- package/build/components/block-settings-menu/block-parent-selector-menu-item.cjs.map +1 -1
- package/build/components/block-settings-menu/block-settings-dropdown.cjs +1 -1
- package/build/components/block-settings-menu/block-settings-dropdown.cjs.map +1 -1
- package/build/components/block-settings-menu/index.cjs +1 -1
- package/build/components/block-settings-menu/index.cjs.map +1 -1
- package/build/components/block-settings-menu-controls/index.cjs +1 -1
- package/build/components/block-settings-menu-controls/index.cjs.map +1 -1
- package/build/components/block-styles/index.cjs +1 -1
- package/build/components/block-styles/index.cjs.map +1 -1
- package/build/components/block-styles/menu-items.cjs +1 -1
- package/build/components/block-styles/menu-items.cjs.map +1 -1
- package/build/components/block-switcher/block-styles-menu.cjs +1 -1
- package/build/components/block-switcher/block-styles-menu.cjs.map +1 -1
- package/build/components/block-switcher/block-transformations-menu.cjs +1 -1
- package/build/components/block-switcher/block-transformations-menu.cjs.map +1 -1
- package/build/components/block-switcher/block-variation-transformations.cjs +1 -1
- package/build/components/block-switcher/block-variation-transformations.cjs.map +1 -1
- package/build/components/block-switcher/index.cjs +3 -2
- package/build/components/block-switcher/index.cjs.map +4 -4
- package/build/components/block-switcher/pattern-transformations-menu.cjs +1 -1
- package/build/components/block-switcher/pattern-transformations-menu.cjs.map +1 -1
- package/build/components/block-switcher/preview-block-popover.cjs +1 -1
- package/build/components/block-switcher/preview-block-popover.cjs.map +1 -1
- package/build/components/block-toolbar/block-styles-dropdown.cjs +1 -1
- package/build/components/block-toolbar/block-styles-dropdown.cjs.map +1 -1
- package/build/components/block-toolbar/block-toolbar-icon.cjs +1 -1
- package/build/components/block-toolbar/block-toolbar-icon.cjs.map +1 -1
- package/build/components/block-toolbar/change-design.cjs +1 -1
- package/build/components/block-toolbar/change-design.cjs.map +1 -1
- package/build/components/block-toolbar/edit-section-button.cjs +1 -1
- package/build/components/block-toolbar/edit-section-button.cjs.map +1 -1
- package/build/components/block-toolbar/index.cjs +1 -1
- package/build/components/block-toolbar/index.cjs.map +1 -1
- package/build/components/block-toolbar/pattern-overrides-dropdown.cjs +3 -2
- package/build/components/block-toolbar/pattern-overrides-dropdown.cjs.map +4 -4
- package/build/components/block-toolbar/switch-section-style.cjs +1 -1
- package/build/components/block-toolbar/switch-section-style.cjs.map +1 -1
- package/build/components/block-tools/block-toolbar-popover.cjs +1 -1
- package/build/components/block-tools/block-toolbar-popover.cjs.map +1 -1
- package/build/components/block-tools/empty-block-inserter.cjs +1 -1
- package/build/components/block-tools/empty-block-inserter.cjs.map +1 -1
- package/build/components/block-tools/index.cjs +1 -1
- package/build/components/block-tools/index.cjs.map +1 -1
- package/build/components/block-tools/insertion-point.cjs +1 -1
- package/build/components/block-tools/insertion-point.cjs.map +1 -1
- package/build/components/block-tools/zoom-out-mode-inserter-button.cjs +1 -1
- package/build/components/block-tools/zoom-out-mode-inserter-button.cjs.map +1 -1
- package/build/components/block-tools/zoom-out-mode-inserters.cjs +1 -1
- package/build/components/block-tools/zoom-out-mode-inserters.cjs.map +1 -1
- package/build/components/block-types-list/index.cjs +1 -1
- package/build/components/block-types-list/index.cjs.map +1 -1
- package/build/components/block-variation-picker/index.cjs +1 -1
- package/build/components/block-variation-picker/index.cjs.map +1 -1
- package/build/components/block-variation-transforms/index.cjs +1 -1
- package/build/components/block-variation-transforms/index.cjs.map +1 -1
- package/build/components/block-vertical-alignment-control/index.cjs +1 -1
- package/build/components/block-vertical-alignment-control/index.cjs.map +1 -1
- package/build/components/block-vertical-alignment-control/ui.cjs +1 -1
- package/build/components/block-vertical-alignment-control/ui.cjs.map +1 -1
- package/build/components/block-visibility/constants.cjs.map +1 -1
- package/build/components/block-visibility/modal.cjs +1 -1
- package/build/components/block-visibility/modal.cjs.map +1 -1
- package/build/components/block-visibility/viewport-menu-item.cjs +1 -1
- package/build/components/block-visibility/viewport-menu-item.cjs.map +1 -1
- package/build/components/block-visibility/viewport-toolbar.cjs +1 -1
- package/build/components/block-visibility/viewport-toolbar.cjs.map +1 -1
- package/build/components/block-visibility/viewport-visibility-info.cjs +1 -1
- package/build/components/block-visibility/viewport-visibility-info.cjs.map +1 -1
- package/build/components/border-radius-control/index.cjs +1 -1
- package/build/components/border-radius-control/index.cjs.map +1 -1
- package/build/components/border-radius-control/linked-button.cjs +1 -1
- package/build/components/border-radius-control/linked-button.cjs.map +1 -1
- package/build/components/button-block-appender/index.cjs +1 -1
- package/build/components/button-block-appender/index.cjs.map +1 -1
- package/build/components/child-layout-control/index.cjs +1 -1
- package/build/components/child-layout-control/index.cjs.map +1 -1
- package/build/components/color-palette/control.cjs +1 -1
- package/build/components/color-palette/control.cjs.map +1 -1
- package/build/components/color-palette/with-color-context.cjs +1 -1
- package/build/components/color-palette/with-color-context.cjs.map +1 -1
- package/build/components/color-style-selector/index.cjs +1 -1
- package/build/components/color-style-selector/index.cjs.map +1 -1
- package/build/components/colors/with-colors.cjs +1 -1
- package/build/components/colors/with-colors.cjs.map +1 -1
- package/build/components/colors-gradients/control.cjs +1 -1
- package/build/components/colors-gradients/control.cjs.map +1 -1
- package/build/components/colors-gradients/dropdown.cjs +1 -1
- package/build/components/colors-gradients/dropdown.cjs.map +1 -1
- package/build/components/colors-gradients/panel-color-gradient-settings.cjs +1 -1
- package/build/components/colors-gradients/panel-color-gradient-settings.cjs.map +1 -1
- package/build/components/contrast-checker/index.cjs +1 -1
- package/build/components/contrast-checker/index.cjs.map +1 -1
- package/build/components/convert-to-group-buttons/index.cjs +1 -1
- package/build/components/convert-to-group-buttons/index.cjs.map +1 -1
- package/build/components/convert-to-group-buttons/toolbar.cjs +1 -1
- package/build/components/convert-to-group-buttons/toolbar.cjs.map +1 -1
- package/build/components/copy-handler/index.cjs +1 -1
- package/build/components/copy-handler/index.cjs.map +1 -1
- package/build/components/date-format-picker/index.cjs +1 -1
- package/build/components/date-format-picker/index.cjs.map +1 -1
- package/build/components/default-block-appender/index.cjs +1 -1
- package/build/components/default-block-appender/index.cjs.map +1 -1
- package/build/components/dimension-control/index.cjs +1 -1
- package/build/components/dimension-control/index.cjs.map +1 -1
- package/build/components/dimensions-tool/aspect-ratio-tool.cjs +1 -1
- package/build/components/dimensions-tool/aspect-ratio-tool.cjs.map +1 -1
- package/build/components/dimensions-tool/index.cjs +1 -1
- package/build/components/dimensions-tool/index.cjs.map +1 -1
- package/build/components/dimensions-tool/scale-tool.cjs +1 -1
- package/build/components/dimensions-tool/scale-tool.cjs.map +1 -1
- package/build/components/dimensions-tool/width-height-tool.cjs +1 -1
- package/build/components/dimensions-tool/width-height-tool.cjs.map +1 -1
- package/build/components/duotone-control/index.cjs +1 -1
- package/build/components/duotone-control/index.cjs.map +1 -1
- package/build/components/editable-text/index.cjs +1 -1
- package/build/components/editable-text/index.cjs.map +1 -1
- package/build/components/editor-styles/index.cjs +1 -1
- package/build/components/editor-styles/index.cjs.map +1 -1
- package/build/components/fit-text-size-warning/index.cjs +1 -1
- package/build/components/fit-text-size-warning/index.cjs.map +1 -1
- package/build/components/font-appearance-control/index.cjs +1 -1
- package/build/components/font-appearance-control/index.cjs.map +1 -1
- package/build/components/font-family/index.cjs +1 -1
- package/build/components/font-family/index.cjs.map +1 -1
- package/build/components/font-sizes/font-size-picker.cjs +1 -1
- package/build/components/font-sizes/font-size-picker.cjs.map +1 -1
- package/build/components/font-sizes/with-font-sizes.cjs +1 -1
- package/build/components/font-sizes/with-font-sizes.cjs.map +1 -1
- package/build/components/global-styles/advanced-panel.cjs +1 -1
- package/build/components/global-styles/advanced-panel.cjs.map +1 -1
- package/build/components/global-styles/background-panel.cjs +1 -1
- package/build/components/global-styles/background-panel.cjs.map +2 -2
- package/build/components/global-styles/border-panel.cjs +20 -43
- package/build/components/global-styles/border-panel.cjs.map +3 -3
- package/build/components/global-styles/color-gradient-dropdown-item.cjs +1 -1
- package/build/components/global-styles/color-gradient-dropdown-item.cjs.map +1 -1
- package/build/components/global-styles/color-panel.cjs +1 -1
- package/build/components/global-styles/color-panel.cjs.map +1 -1
- package/build/components/global-styles/dimensions-panel.cjs +1 -1
- package/build/components/global-styles/dimensions-panel.cjs.map +1 -1
- package/build/components/global-styles/filters-panel.cjs +1 -1
- package/build/components/global-styles/filters-panel.cjs.map +1 -1
- package/build/components/global-styles/image-settings-panel.cjs +1 -1
- package/build/components/global-styles/image-settings-panel.cjs.map +2 -2
- package/build/components/global-styles/inheritance/index.cjs +1 -1
- package/build/components/global-styles/inheritance/index.cjs.map +1 -1
- package/build/components/global-styles/shadow-panel-components.cjs +1 -1
- package/build/components/global-styles/shadow-panel-components.cjs.map +1 -1
- package/build/components/global-styles/state-control-badges.cjs +1 -1
- package/build/components/global-styles/state-control-badges.cjs.map +1 -1
- package/build/components/global-styles/state-control.cjs +1 -1
- package/build/components/global-styles/state-control.cjs.map +1 -1
- package/build/components/global-styles/typography-panel.cjs +1 -1
- package/build/components/global-styles/typography-panel.cjs.map +1 -1
- package/build/components/grid/grid-item-movers.cjs +1 -1
- package/build/components/grid/grid-item-movers.cjs.map +1 -1
- package/build/components/grid/grid-item-resizer.cjs +1 -1
- package/build/components/grid/grid-item-resizer.cjs.map +1 -1
- package/build/components/grid/grid-visualizer.cjs +1 -1
- package/build/components/grid/grid-visualizer.cjs.map +1 -1
- package/build/components/height-control/index.cjs +1 -1
- package/build/components/height-control/index.cjs.map +1 -1
- package/build/components/html-element-control/index.cjs +1 -1
- package/build/components/html-element-control/index.cjs.map +1 -1
- package/build/components/iframe/index.cjs +1 -1
- package/build/components/iframe/index.cjs.map +2 -2
- package/build/components/image-editor/aspect-ratio-dropdown.cjs +1 -1
- package/build/components/image-editor/aspect-ratio-dropdown.cjs.map +1 -1
- package/build/components/image-editor/context.cjs +1 -1
- package/build/components/image-editor/context.cjs.map +1 -1
- package/build/components/image-editor/cropper.cjs +1 -1
- package/build/components/image-editor/cropper.cjs.map +1 -1
- package/build/components/image-editor/form-controls.cjs +1 -1
- package/build/components/image-editor/form-controls.cjs.map +1 -1
- package/build/components/image-editor/index.cjs +1 -1
- package/build/components/image-editor/index.cjs.map +1 -1
- package/build/components/image-editor/rotation-button.cjs +1 -1
- package/build/components/image-editor/rotation-button.cjs.map +1 -1
- package/build/components/image-editor/zoom-dropdown.cjs +1 -1
- package/build/components/image-editor/zoom-dropdown.cjs.map +1 -1
- package/build/components/image-size-control/index.cjs +1 -1
- package/build/components/image-size-control/index.cjs.map +1 -1
- package/build/components/inner-blocks/button-block-appender.cjs +1 -1
- package/build/components/inner-blocks/button-block-appender.cjs.map +1 -1
- package/build/components/inner-blocks/default-block-appender.cjs +1 -1
- package/build/components/inner-blocks/default-block-appender.cjs.map +1 -1
- package/build/components/inner-blocks/index.cjs +1 -1
- package/build/components/inner-blocks/index.cjs.map +1 -1
- package/build/components/inner-content/index.cjs +1 -1
- package/build/components/inner-content/index.cjs.map +1 -1
- package/build/components/inserter/block-patterns-explorer/index.cjs +1 -1
- package/build/components/inserter/block-patterns-explorer/index.cjs.map +1 -1
- package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.cjs +1 -1
- package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.cjs.map +1 -1
- package/build/components/inserter/block-patterns-explorer/pattern-list.cjs +1 -1
- package/build/components/inserter/block-patterns-explorer/pattern-list.cjs.map +1 -1
- package/build/components/inserter/block-patterns-tab/index.cjs +1 -1
- package/build/components/inserter/block-patterns-tab/index.cjs.map +1 -1
- package/build/components/inserter/block-patterns-tab/pattern-category-previews.cjs +1 -1
- package/build/components/inserter/block-patterns-tab/pattern-category-previews.cjs.map +1 -1
- package/build/components/inserter/block-patterns-tab/patterns-filter.cjs +1 -1
- package/build/components/inserter/block-patterns-tab/patterns-filter.cjs.map +1 -1
- package/build/components/inserter/block-types-tab.cjs +1 -1
- package/build/components/inserter/block-types-tab.cjs.map +1 -1
- package/build/components/inserter/category-tabs/index.cjs +1 -1
- package/build/components/inserter/category-tabs/index.cjs.map +1 -1
- package/build/components/inserter/hooks/use-patterns-paging.cjs.map +1 -1
- package/build/components/inserter/index.cjs +1 -1
- package/build/components/inserter/index.cjs.map +1 -1
- package/build/components/inserter/library.cjs +1 -1
- package/build/components/inserter/library.cjs.map +1 -1
- package/build/components/inserter/media-tab/media-list.cjs +1 -1
- package/build/components/inserter/media-tab/media-list.cjs.map +1 -1
- package/build/components/inserter/media-tab/media-panel.cjs +1 -1
- package/build/components/inserter/media-tab/media-panel.cjs.map +1 -1
- package/build/components/inserter/media-tab/media-preview.cjs +1 -1
- package/build/components/inserter/media-tab/media-preview.cjs.map +1 -1
- package/build/components/inserter/media-tab/media-tab.cjs +1 -1
- package/build/components/inserter/media-tab/media-tab.cjs.map +1 -1
- package/build/components/inserter/media-tab/utils.cjs +1 -1
- package/build/components/inserter/media-tab/utils.cjs.map +1 -1
- package/build/components/inserter/menu.cjs +2 -2
- package/build/components/inserter/menu.cjs.map +3 -3
- package/build/components/inserter/mobile-tab-navigation.cjs +1 -1
- package/build/components/inserter/mobile-tab-navigation.cjs.map +1 -1
- package/build/components/inserter/no-results.cjs +1 -1
- package/build/components/inserter/no-results.cjs.map +1 -1
- package/build/components/inserter/panel.cjs +1 -1
- package/build/components/inserter/panel.cjs.map +1 -1
- package/build/components/inserter/preview-panel.cjs +1 -1
- package/build/components/inserter/preview-panel.cjs.map +1 -1
- package/build/components/inserter/quick-inserter.cjs +1 -1
- package/build/components/inserter/quick-inserter.cjs.map +1 -1
- package/build/components/inserter/search-results.cjs +1 -1
- package/build/components/inserter/search-results.cjs.map +1 -1
- package/build/components/inserter/tips.cjs +1 -1
- package/build/components/inserter/tips.cjs.map +1 -1
- package/build/components/inserter-draggable-blocks/index.cjs +1 -1
- package/build/components/inserter-draggable-blocks/index.cjs.map +2 -2
- package/build/components/inserter-list-item/index.cjs +1 -1
- package/build/components/inserter-list-item/index.cjs.map +1 -1
- package/build/components/inserter-listbox/group.cjs +1 -1
- package/build/components/inserter-listbox/group.cjs.map +1 -1
- package/build/components/inserter-listbox/index.cjs +1 -1
- package/build/components/inserter-listbox/index.cjs.map +1 -1
- package/build/components/inserter-listbox/item.cjs +1 -1
- package/build/components/inserter-listbox/item.cjs.map +1 -1
- package/build/components/inserter-listbox/row.cjs +1 -1
- package/build/components/inserter-listbox/row.cjs.map +1 -1
- package/build/components/inspector-controls/block-support-slot-container.cjs +1 -1
- package/build/components/inspector-controls/block-support-slot-container.cjs.map +1 -1
- package/build/components/inspector-controls/block-support-tools-panel.cjs +1 -1
- package/build/components/inspector-controls/block-support-tools-panel.cjs.map +1 -1
- package/build/components/inspector-controls/fill.cjs +1 -1
- package/build/components/inspector-controls/fill.cjs.map +1 -1
- package/build/components/inspector-controls/groups.cjs +3 -1
- package/build/components/inspector-controls/groups.cjs.map +2 -2
- package/build/components/inspector-controls/index.cjs +1 -1
- package/build/components/inspector-controls/index.cjs.map +1 -1
- package/build/components/inspector-controls/last-item.cjs +1 -1
- package/build/components/inspector-controls/last-item.cjs.map +1 -1
- package/build/components/inspector-controls/list-view-content-popover.cjs +1 -1
- package/build/components/inspector-controls/list-view-content-popover.cjs.map +1 -1
- package/build/components/inspector-controls/slot.cjs +1 -1
- package/build/components/inspector-controls/slot.cjs.map +1 -1
- package/build/components/inspector-controls-tabs/advanced-controls-panel.cjs +1 -1
- package/build/components/inspector-controls-tabs/advanced-controls-panel.cjs.map +1 -1
- package/build/components/inspector-controls-tabs/content-tab.cjs +3 -4
- package/build/components/inspector-controls-tabs/content-tab.cjs.map +3 -3
- package/build/components/inspector-controls-tabs/index.cjs +1 -1
- package/build/components/inspector-controls-tabs/index.cjs.map +1 -1
- package/build/components/inspector-controls-tabs/position-controls-panel.cjs +1 -1
- package/build/components/inspector-controls-tabs/position-controls-panel.cjs.map +1 -1
- package/build/components/inspector-controls-tabs/settings-tab.cjs +1 -1
- package/build/components/inspector-controls-tabs/settings-tab.cjs.map +1 -1
- package/build/components/inspector-controls-tabs/styles-tab.cjs +2 -4
- package/build/components/inspector-controls-tabs/styles-tab.cjs.map +3 -3
- package/build/components/inspector-controls-tabs/use-inspector-controls-tabs.cjs +1 -2
- package/build/components/inspector-controls-tabs/use-inspector-controls-tabs.cjs.map +2 -2
- package/build/components/inspector-popover-header/index.cjs +6 -5
- package/build/components/inspector-popover-header/index.cjs.map +4 -4
- package/build/components/justify-content-control/index.cjs +1 -1
- package/build/components/justify-content-control/index.cjs.map +1 -1
- package/build/components/justify-content-control/ui.cjs +1 -1
- package/build/components/justify-content-control/ui.cjs.map +1 -1
- package/build/components/letter-spacing-control/index.cjs +1 -1
- package/build/components/letter-spacing-control/index.cjs.map +1 -1
- package/build/components/line-height-control/index.cjs +1 -1
- package/build/components/line-height-control/index.cjs.map +1 -1
- package/build/components/link-control/index.cjs +1 -1
- package/build/components/link-control/index.cjs.map +3 -3
- package/build/components/link-control/link-preview.cjs +1 -1
- package/build/components/link-control/link-preview.cjs.map +1 -1
- package/build/components/link-control/search-create-button.cjs +1 -1
- package/build/components/link-control/search-create-button.cjs.map +1 -1
- package/build/components/link-control/search-input.cjs +1 -1
- package/build/components/link-control/search-input.cjs.map +2 -2
- package/build/components/link-control/search-item.cjs +1 -1
- package/build/components/link-control/search-item.cjs.map +1 -1
- package/build/components/link-control/search-results.cjs +1 -1
- package/build/components/link-control/search-results.cjs.map +1 -1
- package/build/components/link-control/settings-drawer.cjs +1 -1
- package/build/components/link-control/settings-drawer.cjs.map +1 -1
- package/build/components/link-control/settings.cjs +1 -1
- package/build/components/link-control/settings.cjs.map +1 -1
- package/build/components/link-picker/link-picker.cjs +1 -1
- package/build/components/link-picker/link-picker.cjs.map +1 -1
- package/build/components/link-picker/link-preview.cjs +1 -1
- package/build/components/link-picker/link-preview.cjs.map +1 -1
- package/build/components/list-view/appender.cjs +1 -1
- package/build/components/list-view/appender.cjs.map +1 -1
- package/build/components/list-view/aria-referenced-text.cjs +1 -1
- package/build/components/list-view/aria-referenced-text.cjs.map +1 -1
- package/build/components/list-view/block-contents.cjs +1 -1
- package/build/components/list-view/block-contents.cjs.map +1 -1
- package/build/components/list-view/block-select-button.cjs +10 -2
- package/build/components/list-view/block-select-button.cjs.map +3 -3
- package/build/components/list-view/block.cjs +3 -2
- package/build/components/list-view/block.cjs.map +3 -3
- package/build/components/list-view/branch.cjs +1 -1
- package/build/components/list-view/branch.cjs.map +1 -1
- package/build/components/list-view/drop-indicator.cjs +1 -1
- package/build/components/list-view/drop-indicator.cjs.map +1 -1
- package/build/components/list-view/expander.cjs +1 -1
- package/build/components/list-view/expander.cjs.map +1 -1
- package/build/components/list-view/index.cjs +1 -1
- package/build/components/list-view/index.cjs.map +1 -1
- package/build/components/list-view/leaf.cjs +1 -1
- package/build/components/list-view/leaf.cjs.map +1 -1
- package/build/components/list-view/use-list-view-drop-zone.cjs.map +1 -1
- package/build/components/media-placeholder/index.cjs +1 -1
- package/build/components/media-placeholder/index.cjs.map +1 -1
- package/build/components/media-replace-flow/index.cjs +5 -2
- package/build/components/media-replace-flow/index.cjs.map +3 -3
- package/build/components/multi-selection-inspector/index.cjs +1 -1
- package/build/components/multi-selection-inspector/index.cjs.map +1 -1
- package/build/components/navigable-toolbar/index.cjs +4 -1
- package/build/components/navigable-toolbar/index.cjs.map +3 -3
- package/build/components/observe-typing/index.cjs +1 -1
- package/build/components/observe-typing/index.cjs.map +1 -1
- package/build/components/panel-color-settings/index.cjs +1 -1
- package/build/components/panel-color-settings/index.cjs.map +1 -1
- package/build/components/plain-text/index.cjs +1 -1
- package/build/components/plain-text/index.cjs.map +1 -1
- package/build/components/preset-input-control/custom-value-controls.cjs +1 -1
- package/build/components/preset-input-control/custom-value-controls.cjs.map +1 -1
- package/build/components/preset-input-control/index.cjs +1 -1
- package/build/components/preset-input-control/index.cjs.map +1 -1
- package/build/components/provider/block-refs-provider.cjs +1 -1
- package/build/components/provider/block-refs-provider.cjs.map +1 -1
- package/build/components/provider/index.cjs +21 -4
- package/build/components/provider/index.cjs.map +3 -3
- package/build/components/provider/with-registry-provider.cjs +1 -1
- package/build/components/provider/with-registry-provider.cjs.map +1 -1
- package/build/components/publish-date-time-picker/index.cjs +1 -1
- package/build/components/publish-date-time-picker/index.cjs.map +1 -1
- package/build/components/recursion-provider/index.cjs +1 -1
- package/build/components/recursion-provider/index.cjs.map +1 -1
- package/build/components/resizable-box-popover/index.cjs +1 -1
- package/build/components/resizable-box-popover/index.cjs.map +1 -1
- package/build/components/resolution-tool/index.cjs +1 -1
- package/build/components/resolution-tool/index.cjs.map +1 -1
- package/build/components/responsive-block-control/index.cjs +1 -1
- package/build/components/responsive-block-control/index.cjs.map +1 -1
- package/build/components/responsive-block-control/label.cjs +1 -1
- package/build/components/responsive-block-control/label.cjs.map +1 -1
- package/build/components/rich-text/content.cjs +1 -1
- package/build/components/rich-text/content.cjs.map +1 -1
- package/build/components/rich-text/event-listeners/enter.cjs +23 -11
- package/build/components/rich-text/event-listeners/enter.cjs.map +2 -2
- package/build/components/rich-text/event-listeners/index.cjs +0 -2
- package/build/components/rich-text/event-listeners/index.cjs.map +3 -3
- package/build/components/rich-text/event-listeners/input-rules.cjs +4 -2
- package/build/components/rich-text/event-listeners/input-rules.cjs.map +2 -2
- package/build/components/rich-text/format-edit.cjs +1 -1
- package/build/components/rich-text/format-edit.cjs.map +1 -1
- package/build/components/rich-text/format-toolbar/index.cjs +1 -1
- package/build/components/rich-text/format-toolbar/index.cjs.map +1 -1
- package/build/components/rich-text/format-toolbar-container.cjs +1 -1
- package/build/components/rich-text/format-toolbar-container.cjs.map +1 -1
- package/build/components/rich-text/get-rich-text-values.cjs +1 -1
- package/build/components/rich-text/get-rich-text-values.cjs.map +1 -1
- package/build/components/rich-text/index.cjs +1 -1
- package/build/components/rich-text/index.cjs.map +1 -1
- package/build/components/rich-text/multiline.cjs +1 -1
- package/build/components/rich-text/multiline.cjs.map +1 -1
- package/build/components/rich-text/toolbar-button.cjs +1 -1
- package/build/components/rich-text/toolbar-button.cjs.map +1 -1
- package/build/components/rich-text/utils.cjs +1 -1
- package/build/components/rich-text/utils.cjs.map +1 -1
- package/build/components/rich-text/with-deprecations.cjs +1 -1
- package/build/components/rich-text/with-deprecations.cjs.map +1 -1
- package/build/components/skip-to-selected-block/index.cjs +1 -1
- package/build/components/skip-to-selected-block/index.cjs.map +1 -1
- package/build/components/spacing-sizes-control/index.cjs +1 -1
- package/build/components/spacing-sizes-control/index.cjs.map +1 -1
- package/build/components/spacing-sizes-control/input-controls/axial.cjs +1 -1
- package/build/components/spacing-sizes-control/input-controls/axial.cjs.map +1 -1
- package/build/components/spacing-sizes-control/input-controls/separated.cjs +1 -1
- package/build/components/spacing-sizes-control/input-controls/separated.cjs.map +1 -1
- package/build/components/spacing-sizes-control/input-controls/single.cjs +1 -1
- package/build/components/spacing-sizes-control/input-controls/single.cjs.map +1 -1
- package/build/components/spacing-sizes-control/input-controls/spacing-input-control.cjs +1 -1
- package/build/components/spacing-sizes-control/input-controls/spacing-input-control.cjs.map +1 -1
- package/build/components/spacing-sizes-control/linked-button.cjs +1 -1
- package/build/components/spacing-sizes-control/linked-button.cjs.map +1 -1
- package/build/components/tabbed-sidebar/index.cjs +1 -1
- package/build/components/tabbed-sidebar/index.cjs.map +1 -1
- package/build/components/text-alignment-control/index.cjs +1 -1
- package/build/components/text-alignment-control/index.cjs.map +1 -1
- package/build/components/text-decoration-control/index.cjs +1 -1
- package/build/components/text-decoration-control/index.cjs.map +1 -1
- package/build/components/text-indent-control/index.cjs +1 -1
- package/build/components/text-indent-control/index.cjs.map +1 -1
- package/build/components/text-transform-control/index.cjs +1 -1
- package/build/components/text-transform-control/index.cjs.map +1 -1
- package/build/components/typewriter/index.cjs +1 -1
- package/build/components/typewriter/index.cjs.map +1 -1
- package/build/components/unit-control/index.cjs +1 -1
- package/build/components/unit-control/index.cjs.map +1 -1
- package/build/components/url-input/button.cjs +1 -1
- package/build/components/url-input/button.cjs.map +1 -1
- package/build/components/url-input/index.cjs +1 -1
- package/build/components/url-input/index.cjs.map +1 -1
- package/build/components/url-popover/image-url-input-ui.cjs +1 -1
- package/build/components/url-popover/image-url-input-ui.cjs.map +1 -1
- package/build/components/url-popover/index.cjs +1 -1
- package/build/components/url-popover/index.cjs.map +1 -1
- package/build/components/url-popover/link-editor.cjs +1 -1
- package/build/components/url-popover/link-editor.cjs.map +1 -1
- package/build/components/url-popover/link-viewer-url.cjs +1 -1
- package/build/components/url-popover/link-viewer-url.cjs.map +1 -1
- package/build/components/url-popover/link-viewer.cjs +1 -1
- package/build/components/url-popover/link-viewer.cjs.map +1 -1
- package/build/components/use-block-drop-zone/index.cjs.map +1 -1
- package/build/components/warning/index.cjs +1 -1
- package/build/components/warning/index.cjs.map +1 -1
- package/build/components/writing-flow/index.cjs +6 -1
- package/build/components/writing-flow/index.cjs.map +4 -4
- package/build/components/writing-flow/use-arrow-nav.cjs.map +1 -1
- package/build/components/writing-flow/use-input.cjs +12 -2
- package/build/components/writing-flow/use-input.cjs.map +2 -2
- package/build/components/writing-flow/use-tab-nav.cjs +85 -42
- package/build/components/writing-flow/use-tab-nav.cjs.map +4 -4
- package/build/components/{rich-text/event-listeners/undo-automatic-change.cjs → writing-flow/use-undo-automatic-change.cjs} +18 -15
- package/build/components/writing-flow/use-undo-automatic-change.cjs.map +7 -0
- package/build/components/writing-mode-control/index.cjs +1 -1
- package/build/components/writing-mode-control/index.cjs.map +1 -1
- package/build/hooks/align.cjs +1 -1
- package/build/hooks/align.cjs.map +1 -1
- package/build/hooks/allowed-blocks.cjs +1 -1
- package/build/hooks/allowed-blocks.cjs.map +1 -1
- package/build/hooks/anchor.cjs +1 -1
- package/build/hooks/anchor.cjs.map +1 -1
- package/build/hooks/auto-inspector-controls.cjs +1 -1
- package/build/hooks/auto-inspector-controls.cjs.map +1 -1
- package/build/hooks/background.cjs +1 -1
- package/build/hooks/background.cjs.map +1 -1
- package/build/hooks/block-bindings.cjs +1 -1
- package/build/hooks/block-bindings.cjs.map +1 -1
- package/build/hooks/block-hooks.cjs +1 -1
- package/build/hooks/block-hooks.cjs.map +1 -1
- package/build/hooks/block-style-variation.cjs +1 -1
- package/build/hooks/block-style-variation.cjs.map +1 -1
- package/build/hooks/border.cjs +3 -47
- package/build/hooks/border.cjs.map +3 -3
- package/build/hooks/custom-class-name.cjs +1 -1
- package/build/hooks/custom-class-name.cjs.map +1 -1
- package/build/hooks/custom-css.cjs +1 -1
- package/build/hooks/custom-css.cjs.map +1 -1
- package/build/hooks/dimensions.cjs +1 -1
- package/build/hooks/dimensions.cjs.map +1 -1
- package/build/hooks/duotone.cjs +1 -1
- package/build/hooks/duotone.cjs.map +1 -1
- package/build/hooks/elements.cjs +1 -1
- package/build/hooks/elements.cjs.map +1 -1
- package/build/hooks/fit-text.cjs +1 -1
- package/build/hooks/fit-text.cjs.map +1 -1
- package/build/hooks/font-size.cjs +1 -1
- package/build/hooks/font-size.cjs.map +1 -1
- package/build/hooks/generate-fields-from-attributes.cjs.map +1 -1
- package/build/hooks/grid-visualizer.cjs +1 -1
- package/build/hooks/grid-visualizer.cjs.map +2 -2
- package/build/hooks/index.cjs +0 -2
- package/build/hooks/index.cjs.map +3 -3
- package/build/hooks/layout-child.cjs +1 -1
- package/build/hooks/layout-child.cjs.map +1 -1
- package/build/hooks/layout.cjs +1 -1
- package/build/hooks/layout.cjs.map +1 -1
- package/build/hooks/line-height.cjs +1 -1
- package/build/hooks/line-height.cjs.map +1 -1
- package/build/hooks/list-view.cjs +1 -1
- package/build/hooks/list-view.cjs.map +1 -1
- package/build/hooks/position.cjs +2 -2
- package/build/hooks/position.cjs.map +3 -3
- package/build/hooks/spacing-visualizer.cjs +1 -1
- package/build/hooks/spacing-visualizer.cjs.map +1 -1
- package/build/hooks/states.cjs +1 -1
- package/build/hooks/states.cjs.map +1 -1
- package/build/hooks/style.cjs +3 -3
- package/build/hooks/style.cjs.map +3 -3
- package/build/hooks/text-align.cjs +1 -1
- package/build/hooks/text-align.cjs.map +1 -1
- package/build/hooks/typography.cjs +1 -1
- package/build/hooks/typography.cjs.map +1 -1
- package/build/hooks/utils.cjs +1 -1
- package/build/hooks/utils.cjs.map +1 -1
- package/build/layouts/constrained.cjs +1 -1
- package/build/layouts/constrained.cjs.map +1 -1
- package/build/layouts/flex.cjs +4 -1
- package/build/layouts/flex.cjs.map +3 -3
- package/build/layouts/grid.cjs +1 -1
- package/build/layouts/grid.cjs.map +1 -1
- package/build/store/actions.cjs +12 -9
- package/build/store/actions.cjs.map +3 -3
- package/build-module/autocompleters/block.mjs +1 -1
- package/build-module/autocompleters/block.mjs.map +1 -1
- package/build-module/components/alignment-control/index.mjs +1 -1
- package/build-module/components/alignment-control/index.mjs.map +1 -1
- package/build-module/components/alignment-control/ui.mjs +1 -1
- package/build-module/components/alignment-control/ui.mjs.map +1 -1
- package/build-module/components/autocomplete/index.mjs +1 -1
- package/build-module/components/autocomplete/index.mjs.map +1 -1
- package/build-module/components/background-image-control/index.mjs +19 -2
- package/build-module/components/background-image-control/index.mjs.map +3 -3
- package/build-module/components/block-alignment-control/index.mjs +1 -1
- package/build-module/components/block-alignment-control/index.mjs.map +1 -1
- package/build-module/components/block-alignment-control/ui.mjs +1 -1
- package/build-module/components/block-alignment-control/ui.mjs.map +1 -1
- package/build-module/components/block-alignment-matrix-control/index.mjs +1 -1
- package/build-module/components/block-alignment-matrix-control/index.mjs.map +1 -1
- package/build-module/components/block-allowed-blocks/allowed-blocks-control.mjs +1 -1
- package/build-module/components/block-allowed-blocks/allowed-blocks-control.mjs.map +1 -1
- package/build-module/components/block-allowed-blocks/modal.mjs +3 -3
- package/build-module/components/block-allowed-blocks/modal.mjs.map +3 -3
- package/build-module/components/block-bindings/attribute-control.mjs +1 -1
- package/build-module/components/block-bindings/attribute-control.mjs.map +1 -1
- package/build-module/components/block-bindings/source-fields-list.mjs +1 -1
- package/build-module/components/block-bindings/source-fields-list.mjs.map +1 -1
- package/build-module/components/block-breadcrumb/index.mjs +1 -1
- package/build-module/components/block-breadcrumb/index.mjs.map +1 -1
- package/build-module/components/block-canvas/index.mjs +1 -1
- package/build-module/components/block-canvas/index.mjs.map +1 -1
- package/build-module/components/block-card/index.mjs +1 -1
- package/build-module/components/block-card/index.mjs.map +1 -1
- package/build-module/components/block-compare/block-view.mjs +1 -1
- package/build-module/components/block-compare/block-view.mjs.map +1 -1
- package/build-module/components/block-compare/index.mjs +1 -1
- package/build-module/components/block-compare/index.mjs.map +1 -1
- package/build-module/components/block-context/index.mjs +1 -1
- package/build-module/components/block-context/index.mjs.map +1 -1
- package/build-module/components/block-controls/fill.mjs +1 -1
- package/build-module/components/block-controls/fill.mjs.map +1 -1
- package/build-module/components/block-controls/index.mjs +1 -1
- package/build-module/components/block-controls/index.mjs.map +1 -1
- package/build-module/components/block-controls/slot.mjs +1 -1
- package/build-module/components/block-controls/slot.mjs.map +1 -1
- package/build-module/components/block-draggable/draggable-chip.mjs +1 -1
- package/build-module/components/block-draggable/draggable-chip.mjs.map +1 -1
- package/build-module/components/block-draggable/index.mjs +1 -1
- package/build-module/components/block-draggable/index.mjs.map +1 -1
- package/build-module/components/block-edit/edit.mjs +1 -1
- package/build-module/components/block-edit/edit.mjs.map +2 -2
- package/build-module/components/block-edit/index.mjs +1 -1
- package/build-module/components/block-edit/index.mjs.map +1 -1
- package/build-module/components/block-edit/multiple-usage-warning.mjs +1 -1
- package/build-module/components/block-edit/multiple-usage-warning.mjs.map +1 -1
- package/build-module/components/block-edit-visually-button/index.mjs +1 -1
- package/build-module/components/block-edit-visually-button/index.mjs.map +1 -1
- package/build-module/components/block-full-height-alignment-control/index.mjs +1 -1
- package/build-module/components/block-full-height-alignment-control/index.mjs.map +1 -1
- package/build-module/components/block-heading-level-dropdown/heading-level-icon.mjs +1 -1
- package/build-module/components/block-heading-level-dropdown/heading-level-icon.mjs.map +1 -1
- package/build-module/components/block-heading-level-dropdown/index.mjs +1 -1
- package/build-module/components/block-heading-level-dropdown/index.mjs.map +1 -1
- package/build-module/components/block-icon/index.mjs +1 -1
- package/build-module/components/block-icon/index.mjs.map +1 -1
- package/build-module/components/block-inspector/edit-contents.mjs +1 -1
- package/build-module/components/block-inspector/edit-contents.mjs.map +1 -1
- package/build-module/components/block-inspector/index.mjs +8 -16
- package/build-module/components/block-inspector/index.mjs.map +3 -3
- package/build-module/components/block-keyboard-shortcuts/index.mjs +1 -1
- package/build-module/components/block-keyboard-shortcuts/index.mjs.map +1 -1
- package/build-module/components/block-list/block-crash-warning.mjs +1 -1
- package/build-module/components/block-list/block-crash-warning.mjs.map +1 -1
- package/build-module/components/block-list/block-html.mjs +1 -1
- package/build-module/components/block-list/block-html.mjs.map +1 -1
- package/build-module/components/block-list/block-invalid-warning.mjs +1 -1
- package/build-module/components/block-list/block-invalid-warning.mjs.map +1 -1
- package/build-module/components/block-list/block.mjs +1 -1
- package/build-module/components/block-list/block.mjs.map +1 -1
- package/build-module/components/block-list/index.mjs +1 -1
- package/build-module/components/block-list/index.mjs.map +1 -1
- package/build-module/components/block-list/layout.mjs +1 -1
- package/build-module/components/block-list/layout.mjs.map +1 -1
- package/build-module/components/block-list/subdirectory-icon.mjs +1 -1
- package/build-module/components/block-list/subdirectory-icon.mjs.map +1 -1
- package/build-module/components/block-list/use-block-props/use-is-hovered.mjs +17 -4
- package/build-module/components/block-list/use-block-props/use-is-hovered.mjs.map +2 -2
- package/build-module/components/block-list/zoom-out-separator.mjs +1 -1
- package/build-module/components/block-list/zoom-out-separator.mjs.map +1 -1
- package/build-module/components/block-list-appender/index.mjs +1 -1
- package/build-module/components/block-list-appender/index.mjs.map +1 -1
- package/build-module/components/block-lock/menu-item.mjs +1 -1
- package/build-module/components/block-lock/menu-item.mjs.map +1 -1
- package/build-module/components/block-lock/modal.mjs +1 -1
- package/build-module/components/block-lock/modal.mjs.map +1 -1
- package/build-module/components/block-lock/toolbar.mjs +1 -1
- package/build-module/components/block-lock/toolbar.mjs.map +1 -1
- package/build-module/components/block-manager/category.mjs +1 -1
- package/build-module/components/block-manager/category.mjs.map +1 -1
- package/build-module/components/block-manager/checklist.mjs +1 -1
- package/build-module/components/block-manager/checklist.mjs.map +1 -1
- package/build-module/components/block-manager/index.mjs +1 -1
- package/build-module/components/block-manager/index.mjs.map +1 -1
- package/build-module/components/block-mover/button.mjs +1 -1
- package/build-module/components/block-mover/button.mjs.map +1 -1
- package/build-module/components/block-mover/index.mjs +1 -1
- package/build-module/components/block-mover/index.mjs.map +1 -1
- package/build-module/components/block-navigation/dropdown.mjs +1 -1
- package/build-module/components/block-navigation/dropdown.mjs.map +1 -1
- package/build-module/components/block-parent-selector/index.mjs +1 -1
- package/build-module/components/block-parent-selector/index.mjs.map +1 -1
- package/build-module/components/block-pattern-setup/index.mjs +1 -1
- package/build-module/components/block-pattern-setup/index.mjs.map +1 -1
- package/build-module/components/block-pattern-setup/setup-toolbar.mjs +1 -1
- package/build-module/components/block-pattern-setup/setup-toolbar.mjs.map +1 -1
- package/build-module/components/block-patterns-list/index.mjs +1 -1
- package/build-module/components/block-patterns-list/index.mjs.map +1 -1
- package/build-module/components/block-patterns-paging/index.mjs +1 -1
- package/build-module/components/block-patterns-paging/index.mjs.map +1 -1
- package/build-module/components/block-popover/cover.mjs +1 -1
- package/build-module/components/block-popover/cover.mjs.map +1 -1
- package/build-module/components/block-popover/drop-zone.mjs +1 -1
- package/build-module/components/block-popover/drop-zone.mjs.map +1 -1
- package/build-module/components/block-popover/inbetween.mjs +1 -1
- package/build-module/components/block-popover/inbetween.mjs.map +1 -1
- package/build-module/components/block-popover/index.mjs +1 -1
- package/build-module/components/block-popover/index.mjs.map +1 -1
- package/build-module/components/block-preview/auto.mjs +1 -1
- package/build-module/components/block-preview/auto.mjs.map +1 -1
- package/build-module/components/block-preview/index.mjs +2 -3
- package/build-module/components/block-preview/index.mjs.map +3 -3
- package/build-module/components/block-quick-navigation/index.mjs +1 -1
- package/build-module/components/block-quick-navigation/index.mjs.map +1 -1
- package/build-module/components/block-removal-warning-modal/index.mjs +1 -1
- package/build-module/components/block-removal-warning-modal/index.mjs.map +1 -1
- package/build-module/components/block-rename/modal.mjs +1 -1
- package/build-module/components/block-rename/modal.mjs.map +1 -1
- package/build-module/components/block-rename/rename-control.mjs +1 -1
- package/build-module/components/block-rename/rename-control.mjs.map +1 -1
- package/build-module/components/block-selection-clearer/index.mjs +1 -1
- package/build-module/components/block-selection-clearer/index.mjs.map +1 -1
- package/build-module/components/block-settings-menu/block-html-convert-button.mjs +1 -1
- package/build-module/components/block-settings-menu/block-html-convert-button.mjs.map +1 -1
- package/build-module/components/block-settings-menu/block-mode-toggle.mjs +1 -1
- package/build-module/components/block-settings-menu/block-mode-toggle.mjs.map +1 -1
- package/build-module/components/block-settings-menu/block-parent-selector-menu-item.mjs +1 -1
- package/build-module/components/block-settings-menu/block-parent-selector-menu-item.mjs.map +1 -1
- package/build-module/components/block-settings-menu/block-settings-dropdown.mjs +1 -1
- package/build-module/components/block-settings-menu/block-settings-dropdown.mjs.map +1 -1
- package/build-module/components/block-settings-menu/index.mjs +1 -1
- package/build-module/components/block-settings-menu/index.mjs.map +1 -1
- package/build-module/components/block-settings-menu-controls/index.mjs +1 -1
- package/build-module/components/block-settings-menu-controls/index.mjs.map +1 -1
- package/build-module/components/block-styles/index.mjs +1 -1
- package/build-module/components/block-styles/index.mjs.map +1 -1
- package/build-module/components/block-styles/menu-items.mjs +1 -1
- package/build-module/components/block-styles/menu-items.mjs.map +1 -1
- package/build-module/components/block-switcher/block-styles-menu.mjs +1 -1
- package/build-module/components/block-switcher/block-styles-menu.mjs.map +1 -1
- package/build-module/components/block-switcher/block-transformations-menu.mjs +1 -1
- package/build-module/components/block-switcher/block-transformations-menu.mjs.map +1 -1
- package/build-module/components/block-switcher/block-variation-transformations.mjs +1 -1
- package/build-module/components/block-switcher/block-variation-transformations.mjs.map +1 -1
- package/build-module/components/block-switcher/index.mjs +3 -3
- package/build-module/components/block-switcher/index.mjs.map +3 -3
- package/build-module/components/block-switcher/pattern-transformations-menu.mjs +1 -1
- package/build-module/components/block-switcher/pattern-transformations-menu.mjs.map +1 -1
- package/build-module/components/block-switcher/preview-block-popover.mjs +1 -1
- package/build-module/components/block-switcher/preview-block-popover.mjs.map +1 -1
- package/build-module/components/block-toolbar/block-styles-dropdown.mjs +1 -1
- package/build-module/components/block-toolbar/block-styles-dropdown.mjs.map +1 -1
- package/build-module/components/block-toolbar/block-toolbar-icon.mjs +1 -1
- package/build-module/components/block-toolbar/block-toolbar-icon.mjs.map +1 -1
- package/build-module/components/block-toolbar/change-design.mjs +1 -1
- package/build-module/components/block-toolbar/change-design.mjs.map +1 -1
- package/build-module/components/block-toolbar/edit-section-button.mjs +1 -1
- package/build-module/components/block-toolbar/edit-section-button.mjs.map +1 -1
- package/build-module/components/block-toolbar/index.mjs +1 -1
- package/build-module/components/block-toolbar/index.mjs.map +1 -1
- package/build-module/components/block-toolbar/pattern-overrides-dropdown.mjs +4 -7
- package/build-module/components/block-toolbar/pattern-overrides-dropdown.mjs.map +3 -3
- package/build-module/components/block-toolbar/switch-section-style.mjs +1 -1
- package/build-module/components/block-toolbar/switch-section-style.mjs.map +1 -1
- package/build-module/components/block-tools/block-toolbar-popover.mjs +1 -1
- package/build-module/components/block-tools/block-toolbar-popover.mjs.map +1 -1
- package/build-module/components/block-tools/empty-block-inserter.mjs +1 -1
- package/build-module/components/block-tools/empty-block-inserter.mjs.map +1 -1
- package/build-module/components/block-tools/index.mjs +1 -1
- package/build-module/components/block-tools/index.mjs.map +1 -1
- package/build-module/components/block-tools/insertion-point.mjs +1 -1
- package/build-module/components/block-tools/insertion-point.mjs.map +1 -1
- package/build-module/components/block-tools/zoom-out-mode-inserter-button.mjs +1 -1
- package/build-module/components/block-tools/zoom-out-mode-inserter-button.mjs.map +1 -1
- package/build-module/components/block-tools/zoom-out-mode-inserters.mjs +1 -1
- package/build-module/components/block-tools/zoom-out-mode-inserters.mjs.map +1 -1
- package/build-module/components/block-types-list/index.mjs +1 -1
- package/build-module/components/block-types-list/index.mjs.map +1 -1
- package/build-module/components/block-variation-picker/index.mjs +1 -1
- package/build-module/components/block-variation-picker/index.mjs.map +1 -1
- package/build-module/components/block-variation-transforms/index.mjs +1 -1
- package/build-module/components/block-variation-transforms/index.mjs.map +1 -1
- package/build-module/components/block-vertical-alignment-control/index.mjs +1 -1
- package/build-module/components/block-vertical-alignment-control/index.mjs.map +1 -1
- package/build-module/components/block-vertical-alignment-control/ui.mjs +1 -1
- package/build-module/components/block-vertical-alignment-control/ui.mjs.map +1 -1
- package/build-module/components/block-visibility/constants.mjs.map +1 -1
- package/build-module/components/block-visibility/modal.mjs +1 -1
- package/build-module/components/block-visibility/modal.mjs.map +1 -1
- package/build-module/components/block-visibility/viewport-menu-item.mjs +1 -1
- package/build-module/components/block-visibility/viewport-menu-item.mjs.map +1 -1
- package/build-module/components/block-visibility/viewport-toolbar.mjs +1 -1
- package/build-module/components/block-visibility/viewport-toolbar.mjs.map +1 -1
- package/build-module/components/block-visibility/viewport-visibility-info.mjs +1 -1
- package/build-module/components/block-visibility/viewport-visibility-info.mjs.map +1 -1
- package/build-module/components/border-radius-control/index.mjs +1 -1
- package/build-module/components/border-radius-control/index.mjs.map +1 -1
- package/build-module/components/border-radius-control/linked-button.mjs +1 -1
- package/build-module/components/border-radius-control/linked-button.mjs.map +1 -1
- package/build-module/components/button-block-appender/index.mjs +1 -1
- package/build-module/components/button-block-appender/index.mjs.map +1 -1
- package/build-module/components/child-layout-control/index.mjs +1 -1
- package/build-module/components/child-layout-control/index.mjs.map +1 -1
- package/build-module/components/color-palette/control.mjs +1 -1
- package/build-module/components/color-palette/control.mjs.map +1 -1
- package/build-module/components/color-palette/with-color-context.mjs +1 -1
- package/build-module/components/color-palette/with-color-context.mjs.map +1 -1
- package/build-module/components/color-style-selector/index.mjs +1 -1
- package/build-module/components/color-style-selector/index.mjs.map +1 -1
- package/build-module/components/colors/with-colors.mjs +1 -1
- package/build-module/components/colors/with-colors.mjs.map +1 -1
- package/build-module/components/colors-gradients/control.mjs +1 -1
- package/build-module/components/colors-gradients/control.mjs.map +1 -1
- package/build-module/components/colors-gradients/dropdown.mjs +1 -1
- package/build-module/components/colors-gradients/dropdown.mjs.map +1 -1
- package/build-module/components/colors-gradients/panel-color-gradient-settings.mjs +1 -1
- package/build-module/components/colors-gradients/panel-color-gradient-settings.mjs.map +1 -1
- package/build-module/components/contrast-checker/index.mjs +1 -1
- package/build-module/components/contrast-checker/index.mjs.map +1 -1
- package/build-module/components/convert-to-group-buttons/index.mjs +1 -1
- package/build-module/components/convert-to-group-buttons/index.mjs.map +1 -1
- package/build-module/components/convert-to-group-buttons/toolbar.mjs +1 -1
- package/build-module/components/convert-to-group-buttons/toolbar.mjs.map +1 -1
- package/build-module/components/copy-handler/index.mjs +1 -1
- package/build-module/components/copy-handler/index.mjs.map +1 -1
- package/build-module/components/date-format-picker/index.mjs +1 -1
- package/build-module/components/date-format-picker/index.mjs.map +1 -1
- package/build-module/components/default-block-appender/index.mjs +1 -1
- package/build-module/components/default-block-appender/index.mjs.map +1 -1
- package/build-module/components/dimension-control/index.mjs +1 -1
- package/build-module/components/dimension-control/index.mjs.map +1 -1
- package/build-module/components/dimensions-tool/aspect-ratio-tool.mjs +1 -1
- package/build-module/components/dimensions-tool/aspect-ratio-tool.mjs.map +1 -1
- package/build-module/components/dimensions-tool/index.mjs +1 -1
- package/build-module/components/dimensions-tool/index.mjs.map +1 -1
- package/build-module/components/dimensions-tool/scale-tool.mjs +1 -1
- package/build-module/components/dimensions-tool/scale-tool.mjs.map +1 -1
- package/build-module/components/dimensions-tool/width-height-tool.mjs +1 -1
- package/build-module/components/dimensions-tool/width-height-tool.mjs.map +1 -1
- package/build-module/components/duotone-control/index.mjs +1 -1
- package/build-module/components/duotone-control/index.mjs.map +1 -1
- package/build-module/components/editable-text/index.mjs +1 -1
- package/build-module/components/editable-text/index.mjs.map +1 -1
- package/build-module/components/editor-styles/index.mjs +1 -1
- package/build-module/components/editor-styles/index.mjs.map +1 -1
- package/build-module/components/fit-text-size-warning/index.mjs +1 -1
- package/build-module/components/fit-text-size-warning/index.mjs.map +1 -1
- package/build-module/components/font-appearance-control/index.mjs +1 -1
- package/build-module/components/font-appearance-control/index.mjs.map +1 -1
- package/build-module/components/font-family/index.mjs +1 -1
- package/build-module/components/font-family/index.mjs.map +1 -1
- package/build-module/components/font-sizes/font-size-picker.mjs +1 -1
- package/build-module/components/font-sizes/font-size-picker.mjs.map +1 -1
- package/build-module/components/font-sizes/with-font-sizes.mjs +1 -1
- package/build-module/components/font-sizes/with-font-sizes.mjs.map +1 -1
- package/build-module/components/global-styles/advanced-panel.mjs +1 -1
- package/build-module/components/global-styles/advanced-panel.mjs.map +1 -1
- package/build-module/components/global-styles/background-panel.mjs +1 -1
- package/build-module/components/global-styles/background-panel.mjs.map +2 -2
- package/build-module/components/global-styles/border-panel.mjs +20 -43
- package/build-module/components/global-styles/border-panel.mjs.map +3 -3
- package/build-module/components/global-styles/color-gradient-dropdown-item.mjs +1 -1
- package/build-module/components/global-styles/color-gradient-dropdown-item.mjs.map +1 -1
- package/build-module/components/global-styles/color-panel.mjs +1 -1
- package/build-module/components/global-styles/color-panel.mjs.map +1 -1
- package/build-module/components/global-styles/dimensions-panel.mjs +1 -1
- package/build-module/components/global-styles/dimensions-panel.mjs.map +1 -1
- package/build-module/components/global-styles/filters-panel.mjs +1 -1
- package/build-module/components/global-styles/filters-panel.mjs.map +1 -1
- package/build-module/components/global-styles/image-settings-panel.mjs +1 -1
- package/build-module/components/global-styles/image-settings-panel.mjs.map +2 -2
- package/build-module/components/global-styles/inheritance/index.mjs +1 -1
- package/build-module/components/global-styles/inheritance/index.mjs.map +1 -1
- package/build-module/components/global-styles/shadow-panel-components.mjs +1 -1
- package/build-module/components/global-styles/shadow-panel-components.mjs.map +1 -1
- package/build-module/components/global-styles/state-control-badges.mjs +1 -1
- package/build-module/components/global-styles/state-control-badges.mjs.map +1 -1
- package/build-module/components/global-styles/state-control.mjs +1 -1
- package/build-module/components/global-styles/state-control.mjs.map +1 -1
- package/build-module/components/global-styles/typography-panel.mjs +1 -1
- package/build-module/components/global-styles/typography-panel.mjs.map +1 -1
- package/build-module/components/grid/grid-item-movers.mjs +1 -1
- package/build-module/components/grid/grid-item-movers.mjs.map +1 -1
- package/build-module/components/grid/grid-item-resizer.mjs +1 -1
- package/build-module/components/grid/grid-item-resizer.mjs.map +1 -1
- package/build-module/components/grid/grid-visualizer.mjs +1 -1
- package/build-module/components/grid/grid-visualizer.mjs.map +1 -1
- package/build-module/components/height-control/index.mjs +1 -1
- package/build-module/components/height-control/index.mjs.map +1 -1
- package/build-module/components/html-element-control/index.mjs +1 -1
- package/build-module/components/html-element-control/index.mjs.map +1 -1
- package/build-module/components/iframe/index.mjs +1 -1
- package/build-module/components/iframe/index.mjs.map +2 -2
- package/build-module/components/image-editor/aspect-ratio-dropdown.mjs +1 -1
- package/build-module/components/image-editor/aspect-ratio-dropdown.mjs.map +1 -1
- package/build-module/components/image-editor/context.mjs +1 -1
- package/build-module/components/image-editor/context.mjs.map +1 -1
- package/build-module/components/image-editor/cropper.mjs +1 -1
- package/build-module/components/image-editor/cropper.mjs.map +1 -1
- package/build-module/components/image-editor/form-controls.mjs +1 -1
- package/build-module/components/image-editor/form-controls.mjs.map +1 -1
- package/build-module/components/image-editor/index.mjs +1 -1
- package/build-module/components/image-editor/index.mjs.map +1 -1
- package/build-module/components/image-editor/rotation-button.mjs +1 -1
- package/build-module/components/image-editor/rotation-button.mjs.map +1 -1
- package/build-module/components/image-editor/zoom-dropdown.mjs +1 -1
- package/build-module/components/image-editor/zoom-dropdown.mjs.map +1 -1
- package/build-module/components/image-size-control/index.mjs +1 -1
- package/build-module/components/image-size-control/index.mjs.map +1 -1
- package/build-module/components/inner-blocks/button-block-appender.mjs +1 -1
- package/build-module/components/inner-blocks/button-block-appender.mjs.map +1 -1
- package/build-module/components/inner-blocks/default-block-appender.mjs +1 -1
- package/build-module/components/inner-blocks/default-block-appender.mjs.map +1 -1
- package/build-module/components/inner-blocks/index.mjs +1 -1
- package/build-module/components/inner-blocks/index.mjs.map +1 -1
- package/build-module/components/inner-content/index.mjs +1 -1
- package/build-module/components/inner-content/index.mjs.map +1 -1
- package/build-module/components/inserter/block-patterns-explorer/index.mjs +1 -1
- package/build-module/components/inserter/block-patterns-explorer/index.mjs.map +1 -1
- package/build-module/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.mjs +1 -1
- package/build-module/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.mjs.map +1 -1
- package/build-module/components/inserter/block-patterns-explorer/pattern-list.mjs +1 -1
- package/build-module/components/inserter/block-patterns-explorer/pattern-list.mjs.map +1 -1
- package/build-module/components/inserter/block-patterns-tab/index.mjs +1 -1
- package/build-module/components/inserter/block-patterns-tab/index.mjs.map +1 -1
- package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.mjs +1 -1
- package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.mjs.map +1 -1
- package/build-module/components/inserter/block-patterns-tab/patterns-filter.mjs +1 -1
- package/build-module/components/inserter/block-patterns-tab/patterns-filter.mjs.map +1 -1
- package/build-module/components/inserter/block-types-tab.mjs +1 -1
- package/build-module/components/inserter/block-types-tab.mjs.map +1 -1
- package/build-module/components/inserter/category-tabs/index.mjs +1 -1
- package/build-module/components/inserter/category-tabs/index.mjs.map +1 -1
- package/build-module/components/inserter/hooks/use-patterns-paging.mjs.map +1 -1
- package/build-module/components/inserter/index.mjs +1 -1
- package/build-module/components/inserter/index.mjs.map +1 -1
- package/build-module/components/inserter/library.mjs +1 -1
- package/build-module/components/inserter/library.mjs.map +1 -1
- package/build-module/components/inserter/media-tab/media-list.mjs +1 -1
- package/build-module/components/inserter/media-tab/media-list.mjs.map +1 -1
- package/build-module/components/inserter/media-tab/media-panel.mjs +1 -1
- package/build-module/components/inserter/media-tab/media-panel.mjs.map +1 -1
- package/build-module/components/inserter/media-tab/media-preview.mjs +1 -1
- package/build-module/components/inserter/media-tab/media-preview.mjs.map +1 -1
- package/build-module/components/inserter/media-tab/media-tab.mjs +1 -1
- package/build-module/components/inserter/media-tab/media-tab.mjs.map +1 -1
- package/build-module/components/inserter/media-tab/utils.mjs +1 -1
- package/build-module/components/inserter/media-tab/utils.mjs.map +1 -1
- package/build-module/components/inserter/menu.mjs +2 -2
- package/build-module/components/inserter/menu.mjs.map +3 -3
- package/build-module/components/inserter/mobile-tab-navigation.mjs +1 -1
- package/build-module/components/inserter/mobile-tab-navigation.mjs.map +1 -1
- package/build-module/components/inserter/no-results.mjs +1 -1
- package/build-module/components/inserter/no-results.mjs.map +1 -1
- package/build-module/components/inserter/panel.mjs +1 -1
- package/build-module/components/inserter/panel.mjs.map +1 -1
- package/build-module/components/inserter/preview-panel.mjs +1 -1
- package/build-module/components/inserter/preview-panel.mjs.map +1 -1
- package/build-module/components/inserter/quick-inserter.mjs +1 -1
- package/build-module/components/inserter/quick-inserter.mjs.map +1 -1
- package/build-module/components/inserter/search-results.mjs +1 -1
- package/build-module/components/inserter/search-results.mjs.map +1 -1
- package/build-module/components/inserter/tips.mjs +1 -1
- package/build-module/components/inserter/tips.mjs.map +1 -1
- package/build-module/components/inserter-draggable-blocks/index.mjs +1 -1
- package/build-module/components/inserter-draggable-blocks/index.mjs.map +2 -2
- package/build-module/components/inserter-list-item/index.mjs +1 -1
- package/build-module/components/inserter-list-item/index.mjs.map +1 -1
- package/build-module/components/inserter-listbox/group.mjs +1 -1
- package/build-module/components/inserter-listbox/group.mjs.map +1 -1
- package/build-module/components/inserter-listbox/index.mjs +1 -1
- package/build-module/components/inserter-listbox/index.mjs.map +1 -1
- package/build-module/components/inserter-listbox/item.mjs +1 -1
- package/build-module/components/inserter-listbox/item.mjs.map +1 -1
- package/build-module/components/inserter-listbox/row.mjs +1 -1
- package/build-module/components/inserter-listbox/row.mjs.map +1 -1
- package/build-module/components/inspector-controls/block-support-slot-container.mjs +1 -1
- package/build-module/components/inspector-controls/block-support-slot-container.mjs.map +1 -1
- package/build-module/components/inspector-controls/block-support-tools-panel.mjs +1 -1
- package/build-module/components/inspector-controls/block-support-tools-panel.mjs.map +1 -1
- package/build-module/components/inspector-controls/fill.mjs +1 -1
- package/build-module/components/inspector-controls/fill.mjs.map +1 -1
- package/build-module/components/inspector-controls/groups.mjs +3 -1
- package/build-module/components/inspector-controls/groups.mjs.map +2 -2
- package/build-module/components/inspector-controls/index.mjs +1 -1
- package/build-module/components/inspector-controls/index.mjs.map +1 -1
- package/build-module/components/inspector-controls/last-item.mjs +1 -1
- package/build-module/components/inspector-controls/last-item.mjs.map +1 -1
- package/build-module/components/inspector-controls/list-view-content-popover.mjs +1 -1
- package/build-module/components/inspector-controls/list-view-content-popover.mjs.map +1 -1
- package/build-module/components/inspector-controls/slot.mjs +1 -1
- package/build-module/components/inspector-controls/slot.mjs.map +1 -1
- package/build-module/components/inspector-controls-tabs/advanced-controls-panel.mjs +1 -1
- package/build-module/components/inspector-controls-tabs/advanced-controls-panel.mjs.map +1 -1
- package/build-module/components/inspector-controls-tabs/content-tab.mjs +4 -5
- package/build-module/components/inspector-controls-tabs/content-tab.mjs.map +3 -3
- package/build-module/components/inspector-controls-tabs/index.mjs +1 -1
- package/build-module/components/inspector-controls-tabs/index.mjs.map +1 -1
- package/build-module/components/inspector-controls-tabs/position-controls-panel.mjs +1 -1
- package/build-module/components/inspector-controls-tabs/position-controls-panel.mjs.map +1 -1
- package/build-module/components/inspector-controls-tabs/settings-tab.mjs +1 -1
- package/build-module/components/inspector-controls-tabs/settings-tab.mjs.map +1 -1
- package/build-module/components/inspector-controls-tabs/styles-tab.mjs +2 -4
- package/build-module/components/inspector-controls-tabs/styles-tab.mjs.map +3 -3
- package/build-module/components/inspector-controls-tabs/use-inspector-controls-tabs.mjs +1 -2
- package/build-module/components/inspector-controls-tabs/use-inspector-controls-tabs.mjs.map +2 -2
- package/build-module/components/inspector-popover-header/index.mjs +7 -8
- package/build-module/components/inspector-popover-header/index.mjs.map +3 -3
- package/build-module/components/justify-content-control/index.mjs +1 -1
- package/build-module/components/justify-content-control/index.mjs.map +1 -1
- package/build-module/components/justify-content-control/ui.mjs +1 -1
- package/build-module/components/justify-content-control/ui.mjs.map +1 -1
- package/build-module/components/letter-spacing-control/index.mjs +1 -1
- package/build-module/components/letter-spacing-control/index.mjs.map +1 -1
- package/build-module/components/line-height-control/index.mjs +1 -1
- package/build-module/components/line-height-control/index.mjs.map +1 -1
- package/build-module/components/link-control/index.mjs +1 -1
- package/build-module/components/link-control/index.mjs.map +3 -3
- package/build-module/components/link-control/link-preview.mjs +1 -1
- package/build-module/components/link-control/link-preview.mjs.map +1 -1
- package/build-module/components/link-control/search-create-button.mjs +1 -1
- package/build-module/components/link-control/search-create-button.mjs.map +1 -1
- package/build-module/components/link-control/search-input.mjs +1 -1
- package/build-module/components/link-control/search-input.mjs.map +2 -2
- package/build-module/components/link-control/search-item.mjs +1 -1
- package/build-module/components/link-control/search-item.mjs.map +1 -1
- package/build-module/components/link-control/search-results.mjs +1 -1
- package/build-module/components/link-control/search-results.mjs.map +1 -1
- package/build-module/components/link-control/settings-drawer.mjs +1 -1
- package/build-module/components/link-control/settings-drawer.mjs.map +1 -1
- package/build-module/components/link-control/settings.mjs +1 -1
- package/build-module/components/link-control/settings.mjs.map +1 -1
- package/build-module/components/link-picker/link-picker.mjs +1 -1
- package/build-module/components/link-picker/link-picker.mjs.map +1 -1
- package/build-module/components/link-picker/link-preview.mjs +1 -1
- package/build-module/components/link-picker/link-preview.mjs.map +1 -1
- package/build-module/components/list-view/appender.mjs +1 -1
- package/build-module/components/list-view/appender.mjs.map +1 -1
- package/build-module/components/list-view/aria-referenced-text.mjs +1 -1
- package/build-module/components/list-view/aria-referenced-text.mjs.map +1 -1
- package/build-module/components/list-view/block-contents.mjs +1 -1
- package/build-module/components/list-view/block-contents.mjs.map +1 -1
- package/build-module/components/list-view/block-select-button.mjs +10 -2
- package/build-module/components/list-view/block-select-button.mjs.map +3 -3
- package/build-module/components/list-view/block.mjs +3 -2
- package/build-module/components/list-view/block.mjs.map +3 -3
- package/build-module/components/list-view/branch.mjs +1 -1
- package/build-module/components/list-view/branch.mjs.map +1 -1
- package/build-module/components/list-view/drop-indicator.mjs +1 -1
- package/build-module/components/list-view/drop-indicator.mjs.map +1 -1
- package/build-module/components/list-view/expander.mjs +1 -1
- package/build-module/components/list-view/expander.mjs.map +1 -1
- package/build-module/components/list-view/index.mjs +1 -1
- package/build-module/components/list-view/index.mjs.map +1 -1
- package/build-module/components/list-view/leaf.mjs +1 -1
- package/build-module/components/list-view/leaf.mjs.map +1 -1
- package/build-module/components/list-view/use-list-view-drop-zone.mjs.map +1 -1
- package/build-module/components/media-placeholder/index.mjs +1 -1
- package/build-module/components/media-placeholder/index.mjs.map +1 -1
- package/build-module/components/media-replace-flow/index.mjs +5 -2
- package/build-module/components/media-replace-flow/index.mjs.map +3 -3
- package/build-module/components/multi-selection-inspector/index.mjs +1 -1
- package/build-module/components/multi-selection-inspector/index.mjs.map +1 -1
- package/build-module/components/navigable-toolbar/index.mjs +4 -1
- package/build-module/components/navigable-toolbar/index.mjs.map +3 -3
- package/build-module/components/observe-typing/index.mjs +1 -1
- package/build-module/components/observe-typing/index.mjs.map +1 -1
- package/build-module/components/panel-color-settings/index.mjs +1 -1
- package/build-module/components/panel-color-settings/index.mjs.map +1 -1
- package/build-module/components/plain-text/index.mjs +1 -1
- package/build-module/components/plain-text/index.mjs.map +1 -1
- package/build-module/components/preset-input-control/custom-value-controls.mjs +1 -1
- package/build-module/components/preset-input-control/custom-value-controls.mjs.map +1 -1
- package/build-module/components/preset-input-control/index.mjs +1 -1
- package/build-module/components/preset-input-control/index.mjs.map +1 -1
- package/build-module/components/provider/block-refs-provider.mjs +1 -1
- package/build-module/components/provider/block-refs-provider.mjs.map +1 -1
- package/build-module/components/provider/index.mjs +21 -4
- package/build-module/components/provider/index.mjs.map +3 -3
- package/build-module/components/provider/with-registry-provider.mjs +1 -1
- package/build-module/components/provider/with-registry-provider.mjs.map +1 -1
- package/build-module/components/publish-date-time-picker/index.mjs +1 -1
- package/build-module/components/publish-date-time-picker/index.mjs.map +1 -1
- package/build-module/components/recursion-provider/index.mjs +1 -1
- package/build-module/components/recursion-provider/index.mjs.map +1 -1
- package/build-module/components/resizable-box-popover/index.mjs +1 -1
- package/build-module/components/resizable-box-popover/index.mjs.map +1 -1
- package/build-module/components/resolution-tool/index.mjs +1 -1
- package/build-module/components/resolution-tool/index.mjs.map +1 -1
- package/build-module/components/responsive-block-control/index.mjs +1 -1
- package/build-module/components/responsive-block-control/index.mjs.map +1 -1
- package/build-module/components/responsive-block-control/label.mjs +1 -1
- package/build-module/components/responsive-block-control/label.mjs.map +1 -1
- package/build-module/components/rich-text/content.mjs +1 -1
- package/build-module/components/rich-text/content.mjs.map +1 -1
- package/build-module/components/rich-text/event-listeners/enter.mjs +23 -11
- package/build-module/components/rich-text/event-listeners/enter.mjs.map +2 -2
- package/build-module/components/rich-text/event-listeners/index.mjs +0 -2
- package/build-module/components/rich-text/event-listeners/index.mjs.map +2 -2
- package/build-module/components/rich-text/event-listeners/input-rules.mjs +4 -2
- package/build-module/components/rich-text/event-listeners/input-rules.mjs.map +2 -2
- package/build-module/components/rich-text/format-edit.mjs +1 -1
- package/build-module/components/rich-text/format-edit.mjs.map +1 -1
- package/build-module/components/rich-text/format-toolbar/index.mjs +1 -1
- package/build-module/components/rich-text/format-toolbar/index.mjs.map +1 -1
- package/build-module/components/rich-text/format-toolbar-container.mjs +1 -1
- package/build-module/components/rich-text/format-toolbar-container.mjs.map +1 -1
- package/build-module/components/rich-text/get-rich-text-values.mjs +1 -1
- package/build-module/components/rich-text/get-rich-text-values.mjs.map +1 -1
- package/build-module/components/rich-text/index.mjs +1 -1
- package/build-module/components/rich-text/index.mjs.map +1 -1
- package/build-module/components/rich-text/multiline.mjs +1 -1
- package/build-module/components/rich-text/multiline.mjs.map +1 -1
- package/build-module/components/rich-text/toolbar-button.mjs +1 -1
- package/build-module/components/rich-text/toolbar-button.mjs.map +1 -1
- package/build-module/components/rich-text/utils.mjs +1 -1
- package/build-module/components/rich-text/utils.mjs.map +1 -1
- package/build-module/components/rich-text/with-deprecations.mjs +1 -1
- package/build-module/components/rich-text/with-deprecations.mjs.map +1 -1
- package/build-module/components/skip-to-selected-block/index.mjs +1 -1
- package/build-module/components/skip-to-selected-block/index.mjs.map +1 -1
- package/build-module/components/spacing-sizes-control/index.mjs +1 -1
- package/build-module/components/spacing-sizes-control/index.mjs.map +1 -1
- package/build-module/components/spacing-sizes-control/input-controls/axial.mjs +1 -1
- package/build-module/components/spacing-sizes-control/input-controls/axial.mjs.map +1 -1
- package/build-module/components/spacing-sizes-control/input-controls/separated.mjs +1 -1
- package/build-module/components/spacing-sizes-control/input-controls/separated.mjs.map +1 -1
- package/build-module/components/spacing-sizes-control/input-controls/single.mjs +1 -1
- package/build-module/components/spacing-sizes-control/input-controls/single.mjs.map +1 -1
- package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.mjs +1 -1
- package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.mjs.map +1 -1
- package/build-module/components/spacing-sizes-control/linked-button.mjs +1 -1
- package/build-module/components/spacing-sizes-control/linked-button.mjs.map +1 -1
- package/build-module/components/tabbed-sidebar/index.mjs +1 -1
- package/build-module/components/tabbed-sidebar/index.mjs.map +1 -1
- package/build-module/components/text-alignment-control/index.mjs +1 -1
- package/build-module/components/text-alignment-control/index.mjs.map +1 -1
- package/build-module/components/text-decoration-control/index.mjs +1 -1
- package/build-module/components/text-decoration-control/index.mjs.map +1 -1
- package/build-module/components/text-indent-control/index.mjs +1 -1
- package/build-module/components/text-indent-control/index.mjs.map +1 -1
- package/build-module/components/text-transform-control/index.mjs +1 -1
- package/build-module/components/text-transform-control/index.mjs.map +1 -1
- package/build-module/components/typewriter/index.mjs +1 -1
- package/build-module/components/typewriter/index.mjs.map +1 -1
- package/build-module/components/unit-control/index.mjs +1 -1
- package/build-module/components/unit-control/index.mjs.map +1 -1
- package/build-module/components/url-input/button.mjs +1 -1
- package/build-module/components/url-input/button.mjs.map +1 -1
- package/build-module/components/url-input/index.mjs +1 -1
- package/build-module/components/url-input/index.mjs.map +1 -1
- package/build-module/components/url-popover/image-url-input-ui.mjs +1 -1
- package/build-module/components/url-popover/image-url-input-ui.mjs.map +1 -1
- package/build-module/components/url-popover/index.mjs +1 -1
- package/build-module/components/url-popover/index.mjs.map +1 -1
- package/build-module/components/url-popover/link-editor.mjs +1 -1
- package/build-module/components/url-popover/link-editor.mjs.map +1 -1
- package/build-module/components/url-popover/link-viewer-url.mjs +1 -1
- package/build-module/components/url-popover/link-viewer-url.mjs.map +1 -1
- package/build-module/components/url-popover/link-viewer.mjs +1 -1
- package/build-module/components/url-popover/link-viewer.mjs.map +1 -1
- package/build-module/components/use-block-drop-zone/index.mjs.map +1 -1
- package/build-module/components/warning/index.mjs +1 -1
- package/build-module/components/warning/index.mjs.map +1 -1
- package/build-module/components/writing-flow/index.mjs +6 -1
- package/build-module/components/writing-flow/index.mjs.map +3 -3
- package/build-module/components/writing-flow/use-arrow-nav.mjs.map +1 -1
- package/build-module/components/writing-flow/use-input.mjs +12 -2
- package/build-module/components/writing-flow/use-input.mjs.map +2 -2
- package/build-module/components/writing-flow/use-tab-nav.mjs +87 -44
- package/build-module/components/writing-flow/use-tab-nav.mjs.map +4 -4
- package/build-module/components/writing-flow/use-undo-automatic-change.mjs +36 -0
- package/build-module/components/writing-flow/use-undo-automatic-change.mjs.map +7 -0
- package/build-module/components/writing-mode-control/index.mjs +1 -1
- package/build-module/components/writing-mode-control/index.mjs.map +1 -1
- package/build-module/hooks/align.mjs +1 -1
- package/build-module/hooks/align.mjs.map +1 -1
- package/build-module/hooks/allowed-blocks.mjs +1 -1
- package/build-module/hooks/allowed-blocks.mjs.map +1 -1
- package/build-module/hooks/anchor.mjs +1 -1
- package/build-module/hooks/anchor.mjs.map +1 -1
- package/build-module/hooks/auto-inspector-controls.mjs +1 -1
- package/build-module/hooks/auto-inspector-controls.mjs.map +1 -1
- package/build-module/hooks/background.mjs +1 -1
- package/build-module/hooks/background.mjs.map +1 -1
- package/build-module/hooks/block-bindings.mjs +1 -1
- package/build-module/hooks/block-bindings.mjs.map +1 -1
- package/build-module/hooks/block-hooks.mjs +1 -1
- package/build-module/hooks/block-hooks.mjs.map +1 -1
- package/build-module/hooks/block-style-variation.mjs +1 -1
- package/build-module/hooks/block-style-variation.mjs.map +1 -1
- package/build-module/hooks/border.mjs +2 -46
- package/build-module/hooks/border.mjs.map +3 -3
- package/build-module/hooks/custom-class-name.mjs +1 -1
- package/build-module/hooks/custom-class-name.mjs.map +1 -1
- package/build-module/hooks/custom-css.mjs +1 -1
- package/build-module/hooks/custom-css.mjs.map +1 -1
- package/build-module/hooks/dimensions.mjs +1 -1
- package/build-module/hooks/dimensions.mjs.map +1 -1
- package/build-module/hooks/duotone.mjs +1 -1
- package/build-module/hooks/duotone.mjs.map +1 -1
- package/build-module/hooks/elements.mjs +1 -1
- package/build-module/hooks/elements.mjs.map +1 -1
- package/build-module/hooks/fit-text.mjs +1 -1
- package/build-module/hooks/fit-text.mjs.map +1 -1
- package/build-module/hooks/font-size.mjs +1 -1
- package/build-module/hooks/font-size.mjs.map +1 -1
- package/build-module/hooks/generate-fields-from-attributes.mjs.map +1 -1
- package/build-module/hooks/grid-visualizer.mjs +1 -1
- package/build-module/hooks/grid-visualizer.mjs.map +2 -2
- package/build-module/hooks/index.mjs +0 -2
- package/build-module/hooks/index.mjs.map +2 -2
- package/build-module/hooks/layout-child.mjs +1 -1
- package/build-module/hooks/layout-child.mjs.map +1 -1
- package/build-module/hooks/layout.mjs +1 -1
- package/build-module/hooks/layout.mjs.map +1 -1
- package/build-module/hooks/line-height.mjs +1 -1
- package/build-module/hooks/line-height.mjs.map +1 -1
- package/build-module/hooks/list-view.mjs +1 -1
- package/build-module/hooks/list-view.mjs.map +1 -1
- package/build-module/hooks/position.mjs +2 -2
- package/build-module/hooks/position.mjs.map +3 -3
- package/build-module/hooks/spacing-visualizer.mjs +1 -1
- package/build-module/hooks/spacing-visualizer.mjs.map +1 -1
- package/build-module/hooks/states.mjs +1 -1
- package/build-module/hooks/states.mjs.map +1 -1
- package/build-module/hooks/style.mjs +4 -3
- package/build-module/hooks/style.mjs.map +3 -3
- package/build-module/hooks/text-align.mjs +1 -1
- package/build-module/hooks/text-align.mjs.map +1 -1
- package/build-module/hooks/typography.mjs +1 -1
- package/build-module/hooks/typography.mjs.map +1 -1
- package/build-module/hooks/utils.mjs +1 -1
- package/build-module/hooks/utils.mjs.map +1 -1
- package/build-module/layouts/constrained.mjs +1 -1
- package/build-module/layouts/constrained.mjs.map +1 -1
- package/build-module/layouts/flex.mjs +4 -1
- package/build-module/layouts/flex.mjs.map +3 -3
- package/build-module/layouts/grid.mjs +1 -1
- package/build-module/layouts/grid.mjs.map +1 -1
- package/build-module/store/actions.mjs +12 -9
- package/build-module/store/actions.mjs.map +2 -2
- package/build-style/content-rtl.css +14 -19
- package/build-style/content.css +14 -19
- package/build-style/style-rtl.css +100 -233
- package/build-style/style.css +100 -233
- package/build-types/components/block-context/index.d.ts.map +1 -1
- package/build-types/components/block-visibility/constants.d.ts +1 -1
- package/package.json +42 -44
- package/src/autocompleters/test/block.js +1 -0
- package/src/components/alignment-control/test/__snapshots__/{index.js.snap → index.jsdom.test.jsx.snap} +34 -16
- package/src/components/alignment-control/test/{index.js → index.jsdom.test.jsx} +2 -1
- package/src/components/background-image-control/README.md +1 -1
- package/src/components/background-image-control/{index.js → index.jsx} +32 -1
- package/src/components/background-image-control/style.scss +5 -3
- package/src/components/background-image-control/test/{index.js → index.jsdom.test.js} +1 -0
- package/src/components/block-alignment-control/test/__snapshots__/{index.js.snap → index.jsdom.test.jsx.snap} +68 -13
- package/src/components/block-alignment-control/test/{index.js → index.jsdom.test.jsx} +2 -1
- package/src/components/block-allowed-blocks/{modal.js → modal.jsx} +3 -3
- package/src/components/block-bindings/test/{use-block-bindings-utils.js → use-block-bindings-utils.jsdom.test.js} +2 -1
- package/src/components/block-breadcrumb/test/__snapshots__/{index.js.snap → index.jsdom.test.jsx.snap} +2 -2
- package/src/components/block-breadcrumb/test/{index.js → index.jsdom.test.jsx} +1 -0
- package/src/components/block-compare/test/__snapshots__/{block-view.js.snap → block-view.jsdom.test.jsx.snap} +2 -2
- package/src/components/block-compare/test/{block-view.js → block-view.jsdom.test.jsx} +1 -0
- package/src/components/block-controls/test/{index.js → index.jsdom.test.jsx} +1 -0
- package/src/components/block-edit/{edit.js → edit.jsx} +1 -1
- package/src/components/block-edit/test/{edit.js → edit.jsdom.test.jsx} +1 -0
- package/src/components/block-icon/content.scss +0 -6
- package/src/components/block-icon/style.scss +0 -6
- package/src/components/block-icon/test/__snapshots__/{index.js.snap → index.jsdom.test.jsx.snap} +6 -2
- package/src/components/block-inspector/{index.js → index.jsx} +8 -13
- package/src/components/block-list/content.scss +4 -1
- package/src/components/block-list/use-block-props/use-is-hovered.js +24 -5
- package/src/components/block-manager/style.scss +2 -0
- package/src/components/block-mover/test/mover-description.js +1 -0
- package/src/components/block-preview/{index.js → index.jsx} +1 -2
- package/src/components/block-preview/test/{index.js → index.jsdom.test.jsx} +10 -6
- package/src/components/block-selection-clearer/test/{index.js → index.jsdom.test.jsx} +24 -19
- package/src/components/block-settings-menu/test/{block-mode-toggle.js → block-mode-toggle.jsdom.test.jsx} +5 -1
- package/src/components/block-styles/test/utils.js +1 -0
- package/src/components/block-switcher/{index.js → index.jsx} +3 -3
- package/src/components/block-switcher/test/{index.js → index.jsdom.test.jsx} +8 -4
- package/src/components/block-switcher/test/use-transformed.patterns.js +1 -0
- package/src/components/block-switcher/test/utils.js +1 -0
- package/src/components/block-title/test/{index.js → index.jsdom.test.jsx} +7 -3
- package/src/components/block-toolbar/{pattern-overrides-dropdown.js → pattern-overrides-dropdown.jsx} +3 -6
- package/src/components/block-toolbar/style.scss +1 -1
- package/src/components/block-toolbar/test/{block-toolbar-icon.js → block-toolbar-icon.jsdom.test.jsx} +25 -21
- package/src/components/block-variation-picker/content.scss +5 -3
- package/src/components/block-vertical-alignment-control/test/__snapshots__/{index.js.snap → index.jsdom.test.jsx.snap} +55 -11
- package/src/components/block-vertical-alignment-control/test/{index.js → index.jsdom.test.jsx} +2 -1
- package/src/components/block-visibility/constants.ts +1 -1
- package/src/components/block-visibility/test/{use-block-visibility.js → use-block-visibility.jsdom.test.js} +6 -5
- package/src/components/block-visibility/test/utils.js +2 -1
- package/src/components/border-radius-control/test/{index.js → index.jsdom.test.jsx} +8 -1
- package/src/components/border-radius-control/test/utils.js +1 -0
- package/src/components/button-block-appender/content.scss +1 -1
- package/src/components/child-layout-control/test/{index.js → index.jsdom.test.jsx} +18 -15
- package/src/components/color-palette/test/{control.js → control.jsdom.test.jsx} +15 -4
- package/src/components/colors/test/utils.js +1 -0
- package/src/components/colors/test/{with-colors.js → with-colors.jsdom.test.jsx} +4 -3
- package/src/components/colors-gradients/test/{control.js → control.jsdom.test.jsx} +8 -3
- package/src/components/contrast-checker/test/{index.js → index.jsdom.test.jsx} +2 -1
- package/src/components/default-block-appender/test/__snapshots__/{index.js.snap → index.jsdom.test.jsx.snap} +4 -4
- package/src/components/default-block-appender/test/{index.js → index.jsdom.test.jsx} +8 -7
- package/src/components/dimensions-tool/test/{index.js → index.jsdom.test.jsx} +27 -22
- package/src/components/dimensions-tool/test/utils.js +1 -0
- package/src/components/duotone-control/test/{index.js → index.jsdom.test.jsx} +6 -3
- package/src/components/font-sizes/test/fluid-utils.js +1 -0
- package/src/components/font-sizes/test/utils.js +1 -0
- package/src/components/global-styles/{background-panel.js → background-panel.jsx} +2 -2
- package/src/components/global-styles/{border-panel.js → border-panel.jsx} +17 -40
- package/src/components/global-styles/{image-settings-panel.js → image-settings-panel.jsx} +1 -1
- package/src/components/global-styles/inheritance/test/{index.js → index.jsdom.test.jsx} +5 -2
- package/src/components/global-styles/test/{background-panel.js → background-panel.jsdom.test.jsx} +11 -6
- package/src/components/global-styles/test/{border-panel.js → border-panel.jsdom.test.jsx} +113 -13
- package/src/components/global-styles/test/{color-panel.js → color-panel.jsdom.test.jsx} +5 -0
- package/src/components/global-styles/test/{dimensions-panel.js → dimensions-panel.jsdom.test.jsx} +14 -14
- package/src/components/global-styles/test/{filters-panel.js → filters-panel.jsdom.test.jsx} +7 -4
- package/src/components/global-styles/test/{inherited-value-context-core.js → inherited-value-context-core.jsdom.test.js} +11 -10
- package/src/components/global-styles/test/{inherited-value-context.js → inherited-value-context.jsdom.test.jsx} +19 -18
- package/src/components/global-styles/test/{state-control-badges.js → state-control-badges.jsdom.test.jsx} +3 -2
- package/src/components/global-styles/test/{typography-panel-core.js → typography-panel-core.jsdom.test.jsx} +5 -2
- package/src/components/global-styles/test/{typography-panel.js → typography-panel.jsdom.test.jsx} +18 -13
- package/src/components/global-styles/test/typography-utils.js +1 -0
- package/src/components/global-styles/test/utils.js +1 -0
- package/src/components/grid/style.scss +0 -10
- package/src/components/iframe/{index.js → index.jsx} +3 -3
- package/src/components/image-editor/test/index.js +1 -0
- package/src/components/image-size-control/test/{index.js → index.jsdom.test.jsx} +8 -3
- package/src/components/inner-blocks/test/__snapshots__/index.jsdom.test.jsx.snap +15 -0
- package/src/components/inner-blocks/test/{index.js → index.jsdom.test.jsx} +2 -0
- package/src/components/inner-content/test/{index.js → index.jsdom.test.jsx} +1 -0
- package/src/components/inserter/hooks/use-patterns-paging.js +1 -1
- package/src/components/inserter/media-tab/test/{hooks.js → hooks.jsdom.test.js} +12 -11
- package/src/components/inserter/media-tab/test/{media-panel.js → media-panel.jsdom.test.jsx} +15 -12
- package/src/components/inserter/{menu.js → menu.jsx} +1 -1
- package/src/components/inserter/style.scss +2 -6
- package/src/components/inserter/test/get-appender-label.js +12 -11
- package/src/components/inserter/test/search-items.js +1 -0
- package/src/components/inserter-draggable-blocks/{index.js → index.jsx} +1 -1
- package/src/components/inserter-list-item/style.scss +1 -0
- package/src/components/inspector-controls/groups.js +2 -0
- package/src/components/inspector-controls-tabs/{content-tab.js → content-tab.jsx} +7 -14
- package/src/components/inspector-controls-tabs/{styles-tab.js → styles-tab.jsx} +1 -4
- package/src/components/inspector-controls-tabs/use-inspector-controls-tabs.js +1 -8
- package/src/components/inspector-popover-header/{index.js → index.jsx} +6 -7
- package/src/components/line-height-control/test/{index.js → index.jsdom.test.jsx} +3 -0
- package/src/components/link-control/{index.js → index.jsx} +3 -0
- package/src/components/link-control/{search-input.js → search-input.jsx} +1 -1
- package/src/components/link-control/style.scss +1 -1
- package/src/components/link-control/test/{index.js → index.jsdom.test.jsx} +52 -42
- package/src/components/link-control/test/is-url-like.js +1 -0
- package/src/components/link-control/test/{url-normalization.test.js → url-normalization.jsdom.test.jsx} +21 -20
- package/src/components/link-picker/test/{index.js → index.jsdom.test.jsx} +31 -30
- package/src/components/list-view/{block-select-button.js → block-select-button.jsx} +6 -1
- package/src/components/list-view/{block.js → block.jsx} +6 -4
- package/src/components/list-view/style.scss +55 -35
- package/src/components/list-view/test/use-list-view-drop-zone.js +1 -0
- package/src/components/list-view/test/utils.js +1 -0
- package/src/components/list-view/use-list-view-drop-zone.js +1 -1
- package/src/components/media-placeholder/test/get-computed-accept-attribute.js +1 -0
- package/src/components/media-placeholder/test/{index.js → index.jsdom.test.jsx} +8 -2
- package/src/components/media-replace-flow/{index.js → index.jsx} +6 -1
- package/src/components/media-replace-flow/test/{index.js → index.jsdom.test.jsx} +3 -0
- package/src/components/navigable-toolbar/{index.js → index.jsx} +4 -0
- package/src/components/navigable-toolbar/test/index.browser.test.js +50 -0
- package/src/components/panel-color-settings/test/{index.js → index.jsdom.test.jsx} +3 -0
- package/src/components/preset-input-control/test/{index.js → index.jsdom.test.jsx} +8 -2
- package/src/components/preset-input-control/test/utils.js +1 -0
- package/src/components/provider/{index.js → index.jsx} +38 -0
- package/src/components/provider/test/{experimental-provider.js → experimental-provider.jsdom.test.jsx} +3 -2
- package/src/components/provider/test/{use-block-sync.js → use-block-sync.jsdom.test.jsx} +45 -44
- package/src/components/recursion-provider/test/{index.js → index.jsdom.test.jsx} +1 -0
- package/src/components/responsive-block-control/style.scss +1 -0
- package/src/components/responsive-block-control/test/{index.js → index.jsdom.test.jsx} +6 -3
- package/src/components/rich-text/content.scss +6 -0
- package/src/components/rich-text/event-listeners/enter.js +29 -14
- package/src/components/rich-text/event-listeners/index.js +0 -2
- package/src/components/rich-text/event-listeners/input-rules.js +7 -2
- package/src/components/spacing-sizes-control/test/{index.js → index.jsdom.test.jsx} +23 -20
- package/src/components/spacing-sizes-control/test/utils.js +1 -0
- package/src/components/url-input/test/{button.js → button.jsdom.test.jsx} +4 -1
- package/src/components/url-input/test/fixtures/validated-input-control-deprecation.js +2 -0
- package/src/components/url-input/test/{index.js → index.jsdom.test.jsx} +23 -13
- package/src/components/use-block-display-information/test/{index.js → index.jsdom.test.jsx} +14 -10
- package/src/components/use-block-drop-zone/index.js +2 -2
- package/src/components/use-block-drop-zone/test/index.js +1 -0
- package/src/components/use-on-block-drop/test/index.js +28 -31
- package/src/components/warning/test/__snapshots__/{index.js.snap → index.jsdom.test.jsx.snap} +2 -2
- package/src/components/warning/test/{index.js → index.jsdom.test.jsx} +1 -0
- package/src/components/writing-flow/{index.js → index.jsx} +5 -0
- package/src/components/writing-flow/style.scss +48 -0
- package/src/components/writing-flow/test/{index.js → index.jsdom.test.js} +1 -0
- package/src/components/writing-flow/use-arrow-nav.js +2 -2
- package/src/components/writing-flow/use-input.js +29 -2
- package/src/components/writing-flow/{use-tab-nav.js → use-tab-nav.jsx} +155 -70
- package/src/components/writing-flow/use-undo-automatic-change.js +40 -0
- package/src/elements/test/{index.js → index.jsdom.test.js} +1 -0
- package/src/hooks/block-hooks.scss +0 -9
- package/src/hooks/{border.js → border.jsx} +0 -53
- package/src/hooks/generate-fields-from-attributes.js +1 -1
- package/src/hooks/{grid-visualizer.js → grid-visualizer.jsx} +1 -1
- package/src/hooks/index.js +0 -2
- package/src/hooks/{position.js → position.jsx} +1 -1
- package/src/hooks/{style.js → style.jsx} +3 -2
- package/src/hooks/test/{align.js → align.jsdom.test.jsx} +1 -0
- package/src/hooks/test/allowed-blocks.js +1 -0
- package/src/hooks/test/{anchor.js → anchor.jsdom.test.js} +1 -0
- package/src/hooks/test/{auto-inspector-controls.js → auto-inspector-controls.jsdom.test.js} +1 -0
- package/src/hooks/test/{background.js → background.jsdom.test.jsx} +5 -2
- package/src/hooks/test/{block-style-state.js → block-style-state.jsdom.test.js} +4 -3
- package/src/hooks/test/{cross-origin-isolation.js → cross-origin-isolation.jsdom.test.js} +18 -25
- package/src/hooks/test/{custom-class-name.js → custom-class-name.jsdom.test.jsx} +1 -0
- package/src/hooks/test/{dimensions.js → dimensions.jsdom.test.js} +1 -0
- package/src/hooks/test/{duotone.js → duotone.jsdom.test.js} +1 -0
- package/src/hooks/test/{font-size.js → font-size.jsdom.test.js} +1 -0
- package/src/hooks/test/gap.js +1 -0
- package/src/hooks/test/generate-fields-from-attributes.js +1 -0
- package/src/hooks/test/generated-class-name.js +1 -0
- package/src/hooks/test/{inherited-value-wiring.js → inherited-value-wiring.jsdom.test.jsx} +49 -51
- package/src/hooks/test/{layout-child.js → layout-child.jsdom.test.js} +1 -0
- package/src/hooks/test/{layout.js → layout.jsdom.test.js} +1 -0
- package/src/hooks/test/metadata.js +1 -0
- package/src/hooks/test/preset-round-trip.js +2 -0
- package/src/hooks/test/{settings.js → settings.jsx} +1 -0
- package/src/hooks/test/state-utils.js +1 -0
- package/src/hooks/test/{style.js → style.jsdom.test.jsx} +1 -0
- package/src/hooks/test/{text-align.js → text-align.jsdom.test.jsx} +1 -0
- package/src/hooks/test/{use-typography-props.js → use-typography-props.jsdom.test.js} +1 -0
- package/src/hooks/test/{utils.js → utils.jsdom.test.js} +1 -0
- package/src/layouts/{flex.js → flex.jsx} +7 -0
- package/src/layouts/test/{constrained.js → constrained.jsdom.test.jsx} +6 -3
- package/src/layouts/test/{flex.js → flex.jsdom.test.jsx} +52 -2
- package/src/layouts/test/{flow.js → flow.jsdom.test.js} +1 -0
- package/src/layouts/test/{grid.js → grid.jsdom.test.jsx} +5 -2
- package/src/layouts/test/utils.js +1 -0
- package/src/store/actions.js +14 -12
- package/src/store/test/{actions.js → actions.jsdom.test.js} +50 -49
- package/src/store/test/array.js +1 -0
- package/src/store/test/get-block-settings.js +1 -0
- package/src/store/test/performance.js +2 -1
- package/src/store/test/private-actions.js +1 -0
- package/src/store/test/private-selectors.js +13 -3
- package/src/store/test/reducer.js +37 -8
- package/src/store/test/{registry-selectors.js → registry-selectors.jsdom.test.js} +9 -0
- package/src/store/test/{selectors.js → selectors.jsdom.test.jsx} +13 -3
- package/src/style.scss +1 -1
- package/src/utils/test/block-bindings.js +1 -0
- package/src/utils/test/color-values.js +1 -0
- package/src/utils/test/{dom.js → dom.jsdom.test.jsx} +38 -43
- package/src/utils/test/format-font-style.js +1 -0
- package/src/utils/test/format-font-weight.js +1 -0
- package/src/utils/test/get-font-styles-and-weights.js +1 -0
- package/src/utils/test/math.js +1 -0
- package/src/utils/test/object.js +1 -0
- package/src/utils/test/pasting.js +1 -0
- package/src/utils/test/selection.js +1 -0
- package/src/utils/test/sorting.js +1 -0
- package/src/utils/test/transform-styles.js +2 -1
- package/build/components/rich-text/event-listeners/undo-automatic-change.cjs.map +0 -7
- package/build/hooks/block-fields/fields-dropdown-menu.cjs +0 -67
- package/build/hooks/block-fields/fields-dropdown-menu.cjs.map +0 -7
- package/build/hooks/block-fields/index.cjs +0 -238
- package/build/hooks/block-fields/index.cjs.map +0 -7
- package/build/hooks/block-fields/link/index.cjs +0 -174
- package/build/hooks/block-fields/link/index.cjs.map +0 -7
- package/build/hooks/block-fields/media/index.cjs +0 -262
- package/build/hooks/block-fields/media/index.cjs.map +0 -7
- package/build/hooks/block-fields/rich-text/index.cjs +0 -146
- package/build/hooks/block-fields/rich-text/index.cjs.map +0 -7
- package/build/hooks/block-fields/use-inspector-popover-placement.cjs +0 -41
- package/build/hooks/block-fields/use-inspector-popover-placement.cjs.map +0 -7
- package/build-module/components/rich-text/event-listeners/undo-automatic-change.mjs +0 -33
- package/build-module/components/rich-text/event-listeners/undo-automatic-change.mjs.map +0 -7
- package/build-module/hooks/block-fields/fields-dropdown-menu.mjs +0 -46
- package/build-module/hooks/block-fields/fields-dropdown-menu.mjs.map +0 -7
- package/build-module/hooks/block-fields/index.mjs +0 -210
- package/build-module/hooks/block-fields/index.mjs.map +0 -7
- package/build-module/hooks/block-fields/link/index.mjs +0 -141
- package/build-module/hooks/block-fields/link/index.mjs.map +0 -7
- package/build-module/hooks/block-fields/media/index.mjs +0 -241
- package/build-module/hooks/block-fields/media/index.mjs.map +0 -7
- package/build-module/hooks/block-fields/rich-text/index.mjs +0 -115
- package/build-module/hooks/block-fields/rich-text/index.mjs.map +0 -7
- package/build-module/hooks/block-fields/use-inspector-popover-placement.mjs +0 -16
- package/build-module/hooks/block-fields/use-inspector-popover-placement.mjs.map +0 -7
- package/src/components/color-palette/test/__snapshots__/control.js.snap +0 -143
- package/src/components/inner-blocks/test/__snapshots__/index.js.snap +0 -15
- package/src/components/rich-text/event-listeners/undo-automatic-change.js +0 -39
- package/src/hooks/block-fields/fields-dropdown-menu.js +0 -47
- package/src/hooks/block-fields/index.js +0 -302
- package/src/hooks/block-fields/link/index.js +0 -155
- package/src/hooks/block-fields/link/styles.scss +0 -18
- package/src/hooks/block-fields/media/index.js +0 -269
- package/src/hooks/block-fields/media/styles.scss +0 -77
- package/src/hooks/block-fields/rich-text/index.js +0 -123
- package/src/hooks/block-fields/rich-text/styles.scss +0 -24
- package/src/hooks/block-fields/styles.scss +0 -33
- package/src/hooks/block-fields/use-inspector-popover-placement.js +0 -16
- /package/src/autocompleters/{block.js → block.jsx} +0 -0
- /package/src/components/alignment-control/{index.js → index.jsx} +0 -0
- /package/src/components/alignment-control/{ui.js → ui.jsx} +0 -0
- /package/src/components/autocomplete/{index.js → index.jsx} +0 -0
- /package/src/components/block-alignment-control/{index.js → index.jsx} +0 -0
- /package/src/components/block-alignment-control/{ui.js → ui.jsx} +0 -0
- /package/src/components/block-alignment-matrix-control/{index.js → index.jsx} +0 -0
- /package/src/components/block-allowed-blocks/{allowed-blocks-control.js → allowed-blocks-control.jsx} +0 -0
- /package/src/components/block-bindings/{attribute-control.js → attribute-control.jsx} +0 -0
- /package/src/components/block-bindings/{source-fields-list.js → source-fields-list.jsx} +0 -0
- /package/src/components/block-breadcrumb/{index.js → index.jsx} +0 -0
- /package/src/components/block-canvas/{index.js → index.jsx} +0 -0
- /package/src/components/block-card/{index.js → index.jsx} +0 -0
- /package/src/components/block-compare/{block-view.js → block-view.jsx} +0 -0
- /package/src/components/block-compare/{index.js → index.jsx} +0 -0
- /package/src/components/block-context/{index.js → index.jsx} +0 -0
- /package/src/components/block-controls/{fill.js → fill.jsx} +0 -0
- /package/src/components/block-controls/{index.js → index.jsx} +0 -0
- /package/src/components/block-controls/{slot.js → slot.jsx} +0 -0
- /package/src/components/block-draggable/{draggable-chip.js → draggable-chip.jsx} +0 -0
- /package/src/components/block-draggable/{index.js → index.jsx} +0 -0
- /package/src/components/block-edit/{index.js → index.jsx} +0 -0
- /package/src/components/block-edit/{multiple-usage-warning.js → multiple-usage-warning.jsx} +0 -0
- /package/src/components/block-edit-visually-button/{index.js → index.jsx} +0 -0
- /package/src/components/block-full-height-alignment-control/{index.js → index.jsx} +0 -0
- /package/src/components/block-heading-level-dropdown/{heading-level-icon.js → heading-level-icon.jsx} +0 -0
- /package/src/components/block-heading-level-dropdown/{index.js → index.jsx} +0 -0
- /package/src/components/block-icon/{index.js → index.jsx} +0 -0
- /package/src/components/block-icon/test/{index.js → index.jsdom.test.jsx} +0 -0
- /package/src/components/block-inspector/{edit-contents.js → edit-contents.jsx} +0 -0
- /package/src/components/block-keyboard-shortcuts/{index.js → index.jsx} +0 -0
- /package/src/components/block-list/{block-crash-warning.js → block-crash-warning.jsx} +0 -0
- /package/src/components/block-list/{block-html.js → block-html.jsx} +0 -0
- /package/src/components/block-list/{block-invalid-warning.js → block-invalid-warning.jsx} +0 -0
- /package/src/components/block-list/{block.js → block.jsx} +0 -0
- /package/src/components/block-list/{index.js → index.jsx} +0 -0
- /package/src/components/block-list/{layout.js → layout.jsx} +0 -0
- /package/src/components/block-list/{subdirectory-icon.js → subdirectory-icon.jsx} +0 -0
- /package/src/components/block-list/{zoom-out-separator.js → zoom-out-separator.jsx} +0 -0
- /package/src/components/block-list-appender/{index.js → index.jsx} +0 -0
- /package/src/components/block-lock/{menu-item.js → menu-item.jsx} +0 -0
- /package/src/components/block-lock/{modal.js → modal.jsx} +0 -0
- /package/src/components/block-lock/{toolbar.js → toolbar.jsx} +0 -0
- /package/src/components/block-manager/{category.js → category.jsx} +0 -0
- /package/src/components/block-manager/{checklist.js → checklist.jsx} +0 -0
- /package/src/components/block-manager/{index.js → index.jsx} +0 -0
- /package/src/components/block-mover/{button.js → button.jsx} +0 -0
- /package/src/components/block-mover/{index.js → index.jsx} +0 -0
- /package/src/components/block-navigation/{dropdown.js → dropdown.jsx} +0 -0
- /package/src/components/block-parent-selector/{index.js → index.jsx} +0 -0
- /package/src/components/block-pattern-setup/{index.js → index.jsx} +0 -0
- /package/src/components/block-pattern-setup/{setup-toolbar.js → setup-toolbar.jsx} +0 -0
- /package/src/components/block-patterns-list/{index.js → index.jsx} +0 -0
- /package/src/components/block-patterns-paging/{index.js → index.jsx} +0 -0
- /package/src/components/block-popover/{cover.js → cover.jsx} +0 -0
- /package/src/components/block-popover/{drop-zone.js → drop-zone.jsx} +0 -0
- /package/src/components/block-popover/{inbetween.js → inbetween.jsx} +0 -0
- /package/src/components/block-popover/{index.js → index.jsx} +0 -0
- /package/src/components/block-preview/{auto.js → auto.jsx} +0 -0
- /package/src/components/block-quick-navigation/{index.js → index.jsx} +0 -0
- /package/src/components/block-removal-warning-modal/{index.js → index.jsx} +0 -0
- /package/src/components/block-rename/{modal.js → modal.jsx} +0 -0
- /package/src/components/block-rename/{rename-control.js → rename-control.jsx} +0 -0
- /package/src/components/block-selection-clearer/{index.js → index.jsx} +0 -0
- /package/src/components/block-settings-menu/{block-html-convert-button.js → block-html-convert-button.jsx} +0 -0
- /package/src/components/block-settings-menu/{block-mode-toggle.js → block-mode-toggle.jsx} +0 -0
- /package/src/components/block-settings-menu/{block-parent-selector-menu-item.js → block-parent-selector-menu-item.jsx} +0 -0
- /package/src/components/block-settings-menu/{block-settings-dropdown.js → block-settings-dropdown.jsx} +0 -0
- /package/src/components/block-settings-menu/{index.js → index.jsx} +0 -0
- /package/src/components/block-settings-menu-controls/{index.js → index.jsx} +0 -0
- /package/src/components/block-styles/{index.js → index.jsx} +0 -0
- /package/src/components/block-styles/{menu-items.js → menu-items.jsx} +0 -0
- /package/src/components/block-switcher/{block-styles-menu.js → block-styles-menu.jsx} +0 -0
- /package/src/components/block-switcher/{block-transformations-menu.js → block-transformations-menu.jsx} +0 -0
- /package/src/components/block-switcher/{block-variation-transformations.js → block-variation-transformations.jsx} +0 -0
- /package/src/components/block-switcher/{pattern-transformations-menu.js → pattern-transformations-menu.jsx} +0 -0
- /package/src/components/block-switcher/{preview-block-popover.js → preview-block-popover.jsx} +0 -0
- /package/src/components/block-toolbar/{block-styles-dropdown.js → block-styles-dropdown.jsx} +0 -0
- /package/src/components/block-toolbar/{block-toolbar-icon.js → block-toolbar-icon.jsx} +0 -0
- /package/src/components/block-toolbar/{change-design.js → change-design.jsx} +0 -0
- /package/src/components/block-toolbar/{edit-section-button.js → edit-section-button.jsx} +0 -0
- /package/src/components/block-toolbar/{index.js → index.jsx} +0 -0
- /package/src/components/block-toolbar/{switch-section-style.js → switch-section-style.jsx} +0 -0
- /package/src/components/block-tools/{block-toolbar-popover.js → block-toolbar-popover.jsx} +0 -0
- /package/src/components/block-tools/{empty-block-inserter.js → empty-block-inserter.jsx} +0 -0
- /package/src/components/block-tools/{index.js → index.jsx} +0 -0
- /package/src/components/block-tools/{insertion-point.js → insertion-point.jsx} +0 -0
- /package/src/components/block-tools/{zoom-out-mode-inserter-button.js → zoom-out-mode-inserter-button.jsx} +0 -0
- /package/src/components/block-tools/{zoom-out-mode-inserters.js → zoom-out-mode-inserters.jsx} +0 -0
- /package/src/components/block-types-list/{index.js → index.jsx} +0 -0
- /package/src/components/block-variation-picker/{index.js → index.jsx} +0 -0
- /package/src/components/block-variation-transforms/{index.js → index.jsx} +0 -0
- /package/src/components/block-vertical-alignment-control/{index.js → index.jsx} +0 -0
- /package/src/components/block-vertical-alignment-control/{ui.js → ui.jsx} +0 -0
- /package/src/components/block-visibility/{modal.js → modal.jsx} +0 -0
- /package/src/components/block-visibility/{viewport-menu-item.js → viewport-menu-item.jsx} +0 -0
- /package/src/components/block-visibility/{viewport-toolbar.js → viewport-toolbar.jsx} +0 -0
- /package/src/components/block-visibility/{viewport-visibility-info.js → viewport-visibility-info.jsx} +0 -0
- /package/src/components/border-radius-control/{index.js → index.jsx} +0 -0
- /package/src/components/border-radius-control/{linked-button.js → linked-button.jsx} +0 -0
- /package/src/components/button-block-appender/{index.js → index.jsx} +0 -0
- /package/src/components/child-layout-control/{index.js → index.jsx} +0 -0
- /package/src/components/color-palette/{control.js → control.jsx} +0 -0
- /package/src/components/color-palette/{with-color-context.js → with-color-context.jsx} +0 -0
- /package/src/components/color-style-selector/{index.js → index.jsx} +0 -0
- /package/src/components/colors/{with-colors.js → with-colors.jsx} +0 -0
- /package/src/components/colors-gradients/{control.js → control.jsx} +0 -0
- /package/src/components/colors-gradients/{dropdown.js → dropdown.jsx} +0 -0
- /package/src/components/colors-gradients/{panel-color-gradient-settings.js → panel-color-gradient-settings.jsx} +0 -0
- /package/src/components/contrast-checker/{index.js → index.jsx} +0 -0
- /package/src/components/convert-to-group-buttons/{index.js → index.jsx} +0 -0
- /package/src/components/convert-to-group-buttons/{toolbar.js → toolbar.jsx} +0 -0
- /package/src/components/copy-handler/{index.js → index.jsx} +0 -0
- /package/src/components/date-format-picker/{index.js → index.jsx} +0 -0
- /package/src/components/default-block-appender/{index.js → index.jsx} +0 -0
- /package/src/components/dimension-control/{index.js → index.jsx} +0 -0
- /package/src/components/dimensions-tool/{aspect-ratio-tool.js → aspect-ratio-tool.jsx} +0 -0
- /package/src/components/dimensions-tool/{index.js → index.jsx} +0 -0
- /package/src/components/dimensions-tool/{scale-tool.js → scale-tool.jsx} +0 -0
- /package/src/components/dimensions-tool/{width-height-tool.js → width-height-tool.jsx} +0 -0
- /package/src/components/duotone-control/{index.js → index.jsx} +0 -0
- /package/src/components/editable-text/{index.js → index.jsx} +0 -0
- /package/src/components/editor-styles/{index.js → index.jsx} +0 -0
- /package/src/components/fit-text-size-warning/{index.js → index.jsx} +0 -0
- /package/src/components/font-appearance-control/{index.js → index.jsx} +0 -0
- /package/src/components/font-family/{index.js → index.jsx} +0 -0
- /package/src/components/font-sizes/{font-size-picker.js → font-size-picker.jsx} +0 -0
- /package/src/components/font-sizes/{with-font-sizes.js → with-font-sizes.jsx} +0 -0
- /package/src/components/global-styles/{advanced-panel.js → advanced-panel.jsx} +0 -0
- /package/src/components/global-styles/{color-gradient-dropdown-item.js → color-gradient-dropdown-item.jsx} +0 -0
- /package/src/components/global-styles/{color-panel.js → color-panel.jsx} +0 -0
- /package/src/components/global-styles/{dimensions-panel.js → dimensions-panel.jsx} +0 -0
- /package/src/components/global-styles/{filters-panel.js → filters-panel.jsx} +0 -0
- /package/src/components/global-styles/inheritance/{index.js → index.jsx} +0 -0
- /package/src/components/global-styles/{shadow-panel-components.js → shadow-panel-components.jsx} +0 -0
- /package/src/components/global-styles/{state-control-badges.js → state-control-badges.jsx} +0 -0
- /package/src/components/global-styles/{state-control.js → state-control.jsx} +0 -0
- /package/src/components/global-styles/{typography-panel.js → typography-panel.jsx} +0 -0
- /package/src/components/grid/{grid-item-movers.js → grid-item-movers.jsx} +0 -0
- /package/src/components/grid/{grid-item-resizer.js → grid-item-resizer.jsx} +0 -0
- /package/src/components/grid/{grid-visualizer.js → grid-visualizer.jsx} +0 -0
- /package/src/components/height-control/{index.js → index.jsx} +0 -0
- /package/src/components/html-element-control/{index.js → index.jsx} +0 -0
- /package/src/components/image-editor/{aspect-ratio-dropdown.js → aspect-ratio-dropdown.jsx} +0 -0
- /package/src/components/image-editor/{context.js → context.jsx} +0 -0
- /package/src/components/image-editor/{cropper.js → cropper.jsx} +0 -0
- /package/src/components/image-editor/{form-controls.js → form-controls.jsx} +0 -0
- /package/src/components/image-editor/{index.js → index.jsx} +0 -0
- /package/src/components/image-editor/{rotation-button.js → rotation-button.jsx} +0 -0
- /package/src/components/image-editor/{zoom-dropdown.js → zoom-dropdown.jsx} +0 -0
- /package/src/components/image-size-control/{index.js → index.jsx} +0 -0
- /package/src/components/inner-blocks/{button-block-appender.js → button-block-appender.jsx} +0 -0
- /package/src/components/inner-blocks/{default-block-appender.js → default-block-appender.jsx} +0 -0
- /package/src/components/inner-blocks/{index.js → index.jsx} +0 -0
- /package/src/components/inner-content/{index.js → index.jsx} +0 -0
- /package/src/components/inserter/block-patterns-explorer/{index.js → index.jsx} +0 -0
- /package/src/components/inserter/block-patterns-explorer/{pattern-explorer-sidebar.js → pattern-explorer-sidebar.jsx} +0 -0
- /package/src/components/inserter/block-patterns-explorer/{pattern-list.js → pattern-list.jsx} +0 -0
- /package/src/components/inserter/block-patterns-tab/{index.js → index.jsx} +0 -0
- /package/src/components/inserter/block-patterns-tab/{pattern-category-previews.js → pattern-category-previews.jsx} +0 -0
- /package/src/components/inserter/block-patterns-tab/{patterns-filter.js → patterns-filter.jsx} +0 -0
- /package/src/components/inserter/{block-types-tab.js → block-types-tab.jsx} +0 -0
- /package/src/components/inserter/category-tabs/{index.js → index.jsx} +0 -0
- /package/src/components/inserter/{index.js → index.jsx} +0 -0
- /package/src/components/inserter/{library.js → library.jsx} +0 -0
- /package/src/components/inserter/media-tab/{media-list.js → media-list.jsx} +0 -0
- /package/src/components/inserter/media-tab/{media-panel.js → media-panel.jsx} +0 -0
- /package/src/components/inserter/media-tab/{media-preview.js → media-preview.jsx} +0 -0
- /package/src/components/inserter/media-tab/{media-tab.js → media-tab.jsx} +0 -0
- /package/src/components/inserter/media-tab/{utils.js → utils.jsx} +0 -0
- /package/src/components/inserter/{mobile-tab-navigation.js → mobile-tab-navigation.jsx} +0 -0
- /package/src/components/inserter/{no-results.js → no-results.jsx} +0 -0
- /package/src/components/inserter/{panel.js → panel.jsx} +0 -0
- /package/src/components/inserter/{preview-panel.js → preview-panel.jsx} +0 -0
- /package/src/components/inserter/{quick-inserter.js → quick-inserter.jsx} +0 -0
- /package/src/components/inserter/{search-results.js → search-results.jsx} +0 -0
- /package/src/components/inserter/{tips.js → tips.jsx} +0 -0
- /package/src/components/inserter-list-item/{index.js → index.jsx} +0 -0
- /package/src/components/inserter-listbox/{group.js → group.jsx} +0 -0
- /package/src/components/inserter-listbox/{index.js → index.jsx} +0 -0
- /package/src/components/inserter-listbox/{item.js → item.jsx} +0 -0
- /package/src/components/inserter-listbox/{row.js → row.jsx} +0 -0
- /package/src/components/inspector-controls/{block-support-slot-container.js → block-support-slot-container.jsx} +0 -0
- /package/src/components/inspector-controls/{block-support-tools-panel.js → block-support-tools-panel.jsx} +0 -0
- /package/src/components/inspector-controls/{fill.js → fill.jsx} +0 -0
- /package/src/components/inspector-controls/{index.js → index.jsx} +0 -0
- /package/src/components/inspector-controls/{last-item.js → last-item.jsx} +0 -0
- /package/src/components/inspector-controls/{list-view-content-popover.js → list-view-content-popover.jsx} +0 -0
- /package/src/components/inspector-controls/{slot.js → slot.jsx} +0 -0
- /package/src/components/inspector-controls-tabs/{advanced-controls-panel.js → advanced-controls-panel.jsx} +0 -0
- /package/src/components/inspector-controls-tabs/{index.js → index.jsx} +0 -0
- /package/src/components/inspector-controls-tabs/{position-controls-panel.js → position-controls-panel.jsx} +0 -0
- /package/src/components/inspector-controls-tabs/{settings-tab.js → settings-tab.jsx} +0 -0
- /package/src/components/justify-content-control/{index.js → index.jsx} +0 -0
- /package/src/components/justify-content-control/{ui.js → ui.jsx} +0 -0
- /package/src/components/letter-spacing-control/{index.js → index.jsx} +0 -0
- /package/src/components/line-height-control/{index.js → index.jsx} +0 -0
- /package/src/components/link-control/{link-preview.js → link-preview.jsx} +0 -0
- /package/src/components/link-control/{search-create-button.js → search-create-button.jsx} +0 -0
- /package/src/components/link-control/{search-item.js → search-item.jsx} +0 -0
- /package/src/components/link-control/{search-results.js → search-results.jsx} +0 -0
- /package/src/components/link-control/{settings-drawer.js → settings-drawer.jsx} +0 -0
- /package/src/components/link-control/{settings.js → settings.jsx} +0 -0
- /package/src/components/link-picker/{link-picker.js → link-picker.jsx} +0 -0
- /package/src/components/link-picker/{link-preview.js → link-preview.jsx} +0 -0
- /package/src/components/list-view/{appender.js → appender.jsx} +0 -0
- /package/src/components/list-view/{aria-referenced-text.js → aria-referenced-text.jsx} +0 -0
- /package/src/components/list-view/{block-contents.js → block-contents.jsx} +0 -0
- /package/src/components/list-view/{branch.js → branch.jsx} +0 -0
- /package/src/components/list-view/{drop-indicator.js → drop-indicator.jsx} +0 -0
- /package/src/components/list-view/{expander.js → expander.jsx} +0 -0
- /package/src/components/list-view/{index.js → index.jsx} +0 -0
- /package/src/components/list-view/{leaf.js → leaf.jsx} +0 -0
- /package/src/components/media-placeholder/{index.js → index.jsx} +0 -0
- /package/src/components/multi-selection-inspector/{index.js → index.jsx} +0 -0
- /package/src/components/observe-typing/{index.js → index.jsx} +0 -0
- /package/src/components/panel-color-settings/{index.js → index.jsx} +0 -0
- /package/src/components/plain-text/{index.js → index.jsx} +0 -0
- /package/src/components/preset-input-control/{custom-value-controls.js → custom-value-controls.jsx} +0 -0
- /package/src/components/preset-input-control/{index.js → index.jsx} +0 -0
- /package/src/components/provider/{block-refs-provider.js → block-refs-provider.jsx} +0 -0
- /package/src/components/provider/{with-registry-provider.js → with-registry-provider.jsx} +0 -0
- /package/src/components/publish-date-time-picker/{index.js → index.jsx} +0 -0
- /package/src/components/recursion-provider/{index.js → index.jsx} +0 -0
- /package/src/components/resizable-box-popover/{index.js → index.jsx} +0 -0
- /package/src/components/resolution-tool/{index.js → index.jsx} +0 -0
- /package/src/components/responsive-block-control/{index.js → index.jsx} +0 -0
- /package/src/components/responsive-block-control/{label.js → label.jsx} +0 -0
- /package/src/components/rich-text/{content.js → content.jsx} +0 -0
- /package/src/components/rich-text/{format-edit.js → format-edit.jsx} +0 -0
- /package/src/components/rich-text/format-toolbar/{index.js → index.jsx} +0 -0
- /package/src/components/rich-text/{format-toolbar-container.js → format-toolbar-container.jsx} +0 -0
- /package/src/components/rich-text/{get-rich-text-values.js → get-rich-text-values.jsx} +0 -0
- /package/src/components/rich-text/{index.js → index.jsx} +0 -0
- /package/src/components/rich-text/{multiline.js → multiline.jsx} +0 -0
- /package/src/components/rich-text/{toolbar-button.js → toolbar-button.jsx} +0 -0
- /package/src/components/rich-text/{utils.js → utils.jsx} +0 -0
- /package/src/components/rich-text/{with-deprecations.js → with-deprecations.jsx} +0 -0
- /package/src/components/skip-to-selected-block/{index.js → index.jsx} +0 -0
- /package/src/components/spacing-sizes-control/{index.js → index.jsx} +0 -0
- /package/src/components/spacing-sizes-control/input-controls/{axial.js → axial.jsx} +0 -0
- /package/src/components/spacing-sizes-control/input-controls/{separated.js → separated.jsx} +0 -0
- /package/src/components/spacing-sizes-control/input-controls/{single.js → single.jsx} +0 -0
- /package/src/components/spacing-sizes-control/input-controls/{spacing-input-control.js → spacing-input-control.jsx} +0 -0
- /package/src/components/spacing-sizes-control/{linked-button.js → linked-button.jsx} +0 -0
- /package/src/components/tabbed-sidebar/{index.js → index.jsx} +0 -0
- /package/src/components/text-alignment-control/{index.js → index.jsx} +0 -0
- /package/src/components/text-decoration-control/{index.js → index.jsx} +0 -0
- /package/src/components/text-indent-control/{index.js → index.jsx} +0 -0
- /package/src/components/text-transform-control/{index.js → index.jsx} +0 -0
- /package/src/components/typewriter/{index.js → index.jsx} +0 -0
- /package/src/components/unit-control/{index.js → index.jsx} +0 -0
- /package/src/components/url-input/{button.js → button.jsx} +0 -0
- /package/src/components/url-input/{index.js → index.jsx} +0 -0
- /package/src/components/url-popover/{image-url-input-ui.js → image-url-input-ui.jsx} +0 -0
- /package/src/components/url-popover/{index.js → index.jsx} +0 -0
- /package/src/components/url-popover/{link-editor.js → link-editor.jsx} +0 -0
- /package/src/components/url-popover/{link-viewer-url.js → link-viewer-url.jsx} +0 -0
- /package/src/components/url-popover/{link-viewer.js → link-viewer.jsx} +0 -0
- /package/src/components/warning/{index.js → index.jsx} +0 -0
- /package/src/components/writing-mode-control/{index.js → index.jsx} +0 -0
- /package/src/hooks/{align.js → align.jsx} +0 -0
- /package/src/hooks/{allowed-blocks.js → allowed-blocks.jsx} +0 -0
- /package/src/hooks/{anchor.js → anchor.jsx} +0 -0
- /package/src/hooks/{auto-inspector-controls.js → auto-inspector-controls.jsx} +0 -0
- /package/src/hooks/{background.js → background.jsx} +0 -0
- /package/src/hooks/{block-bindings.js → block-bindings.jsx} +0 -0
- /package/src/hooks/{block-hooks.js → block-hooks.jsx} +0 -0
- /package/src/hooks/{block-style-variation.js → block-style-variation.jsx} +0 -0
- /package/src/hooks/{custom-class-name.js → custom-class-name.jsx} +0 -0
- /package/src/hooks/{custom-css.js → custom-css.jsx} +0 -0
- /package/src/hooks/{dimensions.js → dimensions.jsx} +0 -0
- /package/src/hooks/{duotone.js → duotone.jsx} +0 -0
- /package/src/hooks/{elements.js → elements.jsx} +0 -0
- /package/src/hooks/{fit-text.js → fit-text.jsx} +0 -0
- /package/src/hooks/{font-size.js → font-size.jsx} +0 -0
- /package/src/hooks/{layout-child.js → layout-child.jsx} +0 -0
- /package/src/hooks/{layout.js → layout.jsx} +0 -0
- /package/src/hooks/{line-height.js → line-height.jsx} +0 -0
- /package/src/hooks/{list-view.js → list-view.jsx} +0 -0
- /package/src/hooks/{spacing-visualizer.js → spacing-visualizer.jsx} +0 -0
- /package/src/hooks/{states.js → states.jsx} +0 -0
- /package/src/hooks/{text-align.js → text-align.jsx} +0 -0
- /package/src/hooks/{typography.js → typography.jsx} +0 -0
- /package/src/hooks/{utils.js → utils.jsx} +0 -0
- /package/src/layouts/{constrained.js → constrained.jsx} +0 -0
- /package/src/layouts/{grid.js → grid.jsx} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/hooks/list-view.
|
|
3
|
+
"sources": ["../../src/hooks/list-view.jsx"],
|
|
4
4
|
"sourcesContent": ["import { __ } from '@wordpress/i18n';\nimport { PanelBody } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { hasBlockSupport, getBlockType } from '@wordpress/blocks';\nimport { useContext } from '@wordpress/element';\nimport { store as blockEditorStore } from '../store';\nimport { PrivateListView } from '../components/list-view';\nimport InspectorControls from '../components/inspector-controls/fill';\nimport { PrivateBlockContext } from '../components/block-list/private-block-context';\nimport useListViewPanelState from '../components/use-list-view-panel-state';\nimport { unlock } from '../lock-unlock';\n\nexport const LIST_VIEW_SUPPORT_KEY = 'listView';\n\n/**\n * Check if the block has list view support.\n *\n * @param {string|Object} nameOrType Block name or block type object.\n * @return {boolean} Whether the block has list view support.\n */\nexport function hasListViewSupport( nameOrType ) {\n\treturn hasBlockSupport( nameOrType, LIST_VIEW_SUPPORT_KEY );\n}\n\n/**\n * Inspector controls panel for list view.\n *\n * @param {Object} props Component props.\n * @param {string} props.clientId Block client ID.\n * @param {string} props.name Block name.\n * @return {Element|null} List view inspector controls or null.\n */\nexport function ListViewPanel( { clientId, name } ) {\n\tconst { isSelectionWithinCurrentSection } =\n\t\tuseContext( PrivateBlockContext );\n\n\tconst { isOpened, expandRevision, handleToggle } =\n\t\tuseListViewPanelState( clientId );\n\n\t// eslint-disable-next-line @wordpress/no-unused-vars-before-return\n\tconst { openListViewContentPanel } = unlock(\n\t\tuseDispatch( blockEditorStore )\n\t);\n\n\tconst { isEnabled, hasChildren, isNestedListView } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockCount,\n\t\t\t\tgetBlockParents,\n\t\t\t\tshouldRenderBlockListView,\n\t\t\t} = unlock( select( blockEditorStore ) );\n\n\t\t\t// Avoid showing List Views for both parent and child blocks that have support.\n\t\t\t// In this situation the parent will show the child in its list already.\n\t\t\t// Search parents to see if there's one that also has support, and if so skip rendering.\n\t\t\t// This matches closely the logic in the `BlockCard` component.\n\t\t\tconst parents = getBlockParents( clientId, false );\n\t\t\tconst _isNestedListView = parents.find( ( parentId ) =>\n\t\t\t\tshouldRenderBlockListView( parentId )\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\tisEnabled: shouldRenderBlockListView( clientId ),\n\t\t\t\thasChildren: !! getBlockCount( clientId ),\n\t\t\t\tisNestedListView: _isNestedListView,\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst blockType = getBlockType( name );\n\tconst title = blockType?.title || name;\n\n\tif ( ! isEnabled || isNestedListView ) {\n\t\treturn null;\n\t}\n\n\tconst showBlockTitle = isSelectionWithinCurrentSection;\n\n\treturn (\n\t\t<InspectorControls group=\"list\">\n\t\t\t<PanelBody\n\t\t\t\ttitle={ showBlockTitle ? title : undefined }\n\t\t\t\topened={ isOpened }\n\t\t\t\tonToggle={ handleToggle }\n\t\t\t>\n\t\t\t\t{ ! hasChildren && (\n\t\t\t\t\t<p className=\"block-editor-block-inspector__no-blocks\">\n\t\t\t\t\t\t{ __( 'No items yet.' ) }\n\t\t\t\t\t</p>\n\t\t\t\t) }\n\t\t\t\t<PrivateListView\n\t\t\t\t\tkey={ `${ clientId }-${ expandRevision }` }\n\t\t\t\t\trootClientId={ clientId }\n\t\t\t\t\tisExpanded\n\t\t\t\t\tdescription={ title }\n\t\t\t\t\tshowAppender\n\t\t\t\t\tonSelect={ openListViewContentPanel }\n\t\t\t\t/>\n\t\t\t</PanelBody>\n\t\t</InspectorControls>\n\t);\n}\n\n/**\n * Export block support definition.\n */\nexport default {\n\tedit: ListViewPanel,\n\thasSupport: hasListViewSupport,\n\tattributeKeys: [],\n\tsupportsPatternEditing: true,\n};\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAmB;AACnB,wBAA0B;AAC1B,kBAAuC;AACvC,oBAA8C;AAC9C,qBAA2B;AAC3B,mBAA0C;AAC1C,uBAAgC;AAChC,kBAA8B;AAC9B,mCAAoC;AACpC,uCAAkC;AAClC,yBAAuB;AAuEpB;AArEI,IAAM,wBAAwB;AAQ9B,SAAS,mBAAoB,YAAa;AAChD,aAAO,+BAAiB,YAAY,qBAAsB;AAC3D;AAUO,SAAS,cAAe,EAAE,UAAU,KAAK,GAAI;AACnD,QAAM,EAAE,gCAAgC,QACvC,2BAAY,gDAAoB;AAEjC,QAAM,EAAE,UAAU,gBAAgB,aAAa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"names": ["useListViewPanelState", "blockEditorStore", "InspectorControls"]
|
package/build/hooks/position.cjs
CHANGED
|
@@ -27,7 +27,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
|
|
30
|
-
// packages/block-editor/src/hooks/position.
|
|
30
|
+
// packages/block-editor/src/hooks/position.jsx
|
|
31
31
|
var position_exports = {};
|
|
32
32
|
__export(position_exports, {
|
|
33
33
|
PositionPanelPure: () => PositionPanelPure,
|
|
@@ -196,6 +196,7 @@ function PositionPanelPure({
|
|
|
196
196
|
label: (0, import_i18n.__)("Position"),
|
|
197
197
|
hideLabelFromVision: true,
|
|
198
198
|
description: stickyHelpText,
|
|
199
|
+
popupWidth: "anchor",
|
|
199
200
|
items: options,
|
|
200
201
|
value: selectedOption,
|
|
201
202
|
onValueChange: (selectedItem) => {
|
|
@@ -208,7 +209,6 @@ function PositionPanelPure({
|
|
|
208
209
|
{
|
|
209
210
|
value: option,
|
|
210
211
|
label: option.label,
|
|
211
|
-
className: "block-editor-hooks__position-control-item",
|
|
212
212
|
"aria-describedby": hintId,
|
|
213
213
|
children: [
|
|
214
214
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: option.label }),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/hooks/position.
|
|
4
|
-
"sourcesContent": ["import clsx from 'clsx';\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { getBlockSupport, hasBlockSupport } from '@wordpress/blocks';\nimport { useInstanceId } from '@wordpress/compose';\nimport { useSelect } from '@wordpress/data';\nimport { useId, useMemo } from '@wordpress/element';\n// eslint-disable-next-line @wordpress/use-recommended-components -- Use the portal-based popup to avoid inspector clipping.\nimport { SelectControl } from '@wordpress/ui';\nimport { useSettings } from '../components/use-settings';\nimport InspectorControls from '../components/inspector-controls';\nimport useBlockDisplayInformation from '../components/use-block-display-information';\nimport { cleanEmptyObject, useStyleOverride } from './utils';\nimport { store as blockEditorStore } from '../store';\n\nconst POSITION_SUPPORT_KEY = 'position';\n\nconst DEFAULT_OPTION = {\n\tkey: 'default',\n\tvalue: '',\n\tlabel: __( 'Default' ),\n};\n\nconst STICKY_OPTION = {\n\tkey: 'sticky',\n\tvalue: 'sticky',\n\tlabel: _x( 'Sticky', 'Name for the value of the CSS position property' ),\n\thint: __(\n\t\t'The block will stick to the top of the window instead of scrolling.'\n\t),\n};\n\nconst FIXED_OPTION = {\n\tkey: 'fixed',\n\tvalue: 'fixed',\n\tlabel: _x( 'Fixed', 'Name for the value of the CSS position property' ),\n\thint: __( 'The block will not move when the page is scrolled.' ),\n};\n\nconst POSITION_SIDES = [ 'top', 'right', 'bottom', 'left' ];\nconst VALID_POSITION_TYPES = [ 'sticky', 'fixed' ];\n\n/**\n * Get calculated position CSS.\n *\n * @param {Object} props Component props.\n * @param {string} props.selector Selector to use.\n * @param {Object} props.style Style object.\n * @return {string} The generated CSS rules.\n */\nexport function getPositionCSS( { selector, style } ) {\n\tlet output = '';\n\n\tconst { type: positionType } = style?.position || {};\n\n\tif ( ! VALID_POSITION_TYPES.includes( positionType ) ) {\n\t\treturn output;\n\t}\n\n\toutput += `${ selector } {`;\n\toutput += `position: ${ positionType };`;\n\n\tPOSITION_SIDES.forEach( ( side ) => {\n\t\tif ( style?.position?.[ side ] !== undefined ) {\n\t\t\toutput += `${ side }: ${ style.position[ side ] };`;\n\t\t}\n\t} );\n\n\tif ( positionType === 'sticky' || positionType === 'fixed' ) {\n\t\t// TODO: Replace hard-coded z-index value with a z-index preset approach in theme.json.\n\t\toutput += `z-index: 10`;\n\t}\n\toutput += `}`;\n\n\treturn output;\n}\n\n/**\n * Determines if there is sticky position support.\n *\n * @param {string|Object} blockType Block name or Block Type object.\n *\n * @return {boolean} Whether there is support.\n */\nexport function hasStickyPositionSupport( blockType ) {\n\tconst support = getBlockSupport( blockType, POSITION_SUPPORT_KEY );\n\treturn !! ( true === support || support?.sticky );\n}\n\n/**\n * Determines if there is fixed position support.\n *\n * @param {string|Object} blockType Block name or Block Type object.\n *\n * @return {boolean} Whether there is support.\n */\nexport function hasFixedPositionSupport( blockType ) {\n\tconst support = getBlockSupport( blockType, POSITION_SUPPORT_KEY );\n\treturn !! ( true === support || support?.fixed );\n}\n\n/**\n * Determines if there is position support.\n *\n * @param {string|Object} blockType Block name or Block Type object.\n *\n * @return {boolean} Whether there is support.\n */\nexport function hasPositionSupport( blockType ) {\n\tconst support = getBlockSupport( blockType, POSITION_SUPPORT_KEY );\n\treturn !! support;\n}\n\n/**\n * Checks if there is a current value in the position block support attributes.\n *\n * @param {Object} props Block props.\n * @return {boolean} Whether or not the block has a position value set.\n */\nexport function hasPositionValue( props ) {\n\treturn props.attributes.style?.position?.type !== undefined;\n}\n\n/**\n * Checks if the block is currently set to a sticky or fixed position.\n * This check is helpful for determining how to position block toolbars or other elements.\n *\n * @param {Object} attributes Block attributes.\n * @return {boolean} Whether or not the block is set to a sticky or fixed position.\n */\nexport function hasStickyOrFixedPositionValue( attributes ) {\n\tconst positionType = attributes?.style?.position?.type;\n\treturn positionType === 'sticky' || positionType === 'fixed';\n}\n\n/**\n * Resets the position block support attributes. This can be used when disabling\n * the position support controls for a block via a `ToolsPanel`.\n *\n * @param {Object} props Block props.\n * @param {Object} props.attributes Block's attributes.\n * @param {Object} props.setAttributes Function to set block's attributes.\n */\nexport function resetPosition( { attributes = {}, setAttributes } ) {\n\tconst { style = {} } = attributes;\n\n\tsetAttributes( {\n\t\tstyle: cleanEmptyObject( {\n\t\t\t...style,\n\t\t\tposition: {\n\t\t\t\t...style?.position,\n\t\t\t\ttype: undefined,\n\t\t\t\ttop: undefined,\n\t\t\t\tright: undefined,\n\t\t\t\tbottom: undefined,\n\t\t\t\tleft: undefined,\n\t\t\t},\n\t\t} ),\n\t} );\n}\n\n/**\n * Custom hook that checks if position settings have been disabled.\n *\n * @param {string} name The name of the block.\n *\n * @return {boolean} Whether padding setting is disabled.\n */\nexport function useIsPositionDisabled( { name: blockName } = {} ) {\n\tconst [ allowFixed, allowSticky ] = useSettings(\n\t\t'position.fixed',\n\t\t'position.sticky'\n\t);\n\tconst isDisabled = ! allowFixed && ! allowSticky;\n\n\treturn ! hasPositionSupport( blockName ) || isDisabled;\n}\n\n/*\n * Position controls rendered in an inspector control panel.\n *\n * @param {Object} props\n *\n * @return {Element} Position panel.\n */\nexport function PositionPanelPure( {\n\tstyle = {},\n\tclientId,\n\tname: blockName,\n\tsetAttributes,\n} ) {\n\tconst allowFixed = hasFixedPositionSupport( blockName );\n\tconst allowSticky = hasStickyPositionSupport( blockName );\n\tconst value = style?.position?.type;\n\n\tconst { firstParentClientId } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockParents } = select( blockEditorStore );\n\t\t\tconst parents = getBlockParents( clientId );\n\t\t\treturn { firstParentClientId: parents[ parents.length - 1 ] };\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst blockInformation = useBlockDisplayInformation( firstParentClientId );\n\tconst stickyHelpText =\n\t\tallowSticky && value === STICKY_OPTION.value && blockInformation\n\t\t\t? sprintf(\n\t\t\t\t\t/* translators: %s: the name of the parent block. */\n\t\t\t\t\t__(\n\t\t\t\t\t\t'The block will stick to the scrollable area of the parent %s block.'\n\t\t\t\t\t),\n\t\t\t\t\tblockInformation.title\n\t\t\t )\n\t\t\t: null;\n\n\tconst options = useMemo( () => {\n\t\tconst availableOptions = [ DEFAULT_OPTION ];\n\t\t// Display options if they are allowed, or if a block already has a valid value set.\n\t\t// This allows for a block to be switched off from a position type that is not allowed.\n\t\tif ( allowSticky || value === STICKY_OPTION.value ) {\n\t\t\tavailableOptions.push( STICKY_OPTION );\n\t\t}\n\t\tif ( allowFixed || value === FIXED_OPTION.value ) {\n\t\t\tavailableOptions.push( FIXED_OPTION );\n\t\t}\n\t\treturn availableOptions;\n\t}, [ allowFixed, allowSticky, value ] );\n\n\tconst onChangeType = ( next ) => {\n\t\t// For now, use a hard-coded `0px` value for the position.\n\t\t// `0px` is preferred over `0` as it can be used in `calc()` functions.\n\t\t// In the future, it could be useful to allow for an offset value.\n\t\tconst placementValue = '0px';\n\n\t\tconst newStyle = {\n\t\t\t...style,\n\t\t\tposition: {\n\t\t\t\t...style?.position,\n\t\t\t\ttype: next,\n\t\t\t\ttop:\n\t\t\t\t\tnext === 'sticky' || next === 'fixed'\n\t\t\t\t\t\t? placementValue\n\t\t\t\t\t\t: undefined,\n\t\t\t},\n\t\t};\n\n\t\tsetAttributes( {\n\t\t\tstyle: cleanEmptyObject( newStyle ),\n\t\t} );\n\t};\n\n\tconst selectedOption = value\n\t\t? options.find( ( option ) => option.value === value ) || DEFAULT_OPTION\n\t\t: DEFAULT_OPTION;\n\tconst hintIdPrefix = useId();\n\n\t// Only display position controls if there is at least one option to choose from.\n\treturn options.length > 1 ? (\n\t\t<InspectorControls group=\"position\">\n\t\t\t<SelectControl\n\t\t\t\tlabel={ __( 'Position' ) }\n\t\t\t\thideLabelFromVision\n\t\t\t\tdescription={ stickyHelpText }\n\t\t\t\titems={ options }\n\t\t\t\tvalue={ selectedOption }\n\t\t\t\tonValueChange={ ( selectedItem ) => {\n\t\t\t\t\tonChangeType( selectedItem.value );\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ options.map( ( option ) => {\n\t\t\t\t\tconst hintId = option.hint\n\t\t\t\t\t\t? `${ hintIdPrefix }-${ option.key }`\n\t\t\t\t\t\t: undefined;\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<SelectControl.Item\n\t\t\t\t\t\t\tkey={ option.key }\n\t\t\t\t\t\t\tvalue={ option }\n\t\t\t\t\t\t\tlabel={ option.label }\n\t\t\t\t\t\t\tclassName=\"block-editor-hooks__position-control-item\"\n\t\t\t\t\t\t\taria-describedby={ hintId }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<div>{ option.label }</div>\n\t\t\t\t\t\t\t{ option.hint && (\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tid={ hintId }\n\t\t\t\t\t\t\t\t\tclassName=\"block-editor-hooks__position-control-item-hint\"\n\t\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ option.hint }\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</SelectControl.Item>\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\t\t\t</SelectControl>\n\t\t</InspectorControls>\n\t) : null;\n}\n\nexport default {\n\tedit: function Edit( props ) {\n\t\tconst isPositionDisabled = useIsPositionDisabled( props );\n\t\tif ( isPositionDisabled ) {\n\t\t\treturn null;\n\t\t}\n\t\treturn <PositionPanelPure { ...props } />;\n\t},\n\tuseBlockProps,\n\tattributeKeys: [ 'style' ],\n\thasSupport( name ) {\n\t\treturn hasBlockSupport( name, POSITION_SUPPORT_KEY );\n\t},\n};\n\n// Used for generating the instance ID\nconst POSITION_BLOCK_PROPS_REFERENCE = {};\n\nfunction useBlockProps( { name, style } ) {\n\tconst hasPositionBlockSupport = hasBlockSupport(\n\t\tname,\n\t\tPOSITION_SUPPORT_KEY\n\t);\n\tconst isPositionDisabled = useIsPositionDisabled( { name } );\n\tconst allowPositionStyles = hasPositionBlockSupport && ! isPositionDisabled;\n\n\tconst id = useInstanceId( POSITION_BLOCK_PROPS_REFERENCE );\n\n\t// Higher specificity to override defaults in editor UI.\n\tconst positionSelector = `.wp-container-${ id }.wp-container-${ id }`;\n\n\t// Get CSS string for the current position values.\n\tlet css;\n\tif ( allowPositionStyles ) {\n\t\tcss =\n\t\t\tgetPositionCSS( {\n\t\t\t\tselector: positionSelector,\n\t\t\t\tstyle,\n\t\t\t} ) || '';\n\t}\n\n\t// Attach a `wp-container-` id-based class name.\n\tconst className = clsx( {\n\t\t[ `wp-container-${ id }` ]: allowPositionStyles && !! css, // Only attach a container class if there is generated CSS to be attached.\n\t\t[ `is-position-${ style?.position?.type }` ]:\n\t\t\tallowPositionStyles && !! css && !! style?.position?.type,\n\t} );\n\n\tuseStyleOverride( { css } );\n\n\treturn { className };\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,kBAAgC;AAChC,oBAAiD;AACjD,qBAA8B;AAC9B,kBAA0B;AAC1B,qBAA+B;AAE/B,gBAA8B;AAC9B,0BAA4B;AAC5B,gCAA8B;AAC9B,2CAAuC;AACvC,mBAAmD;AACnD,mBAA0C;
|
|
3
|
+
"sources": ["../../src/hooks/position.jsx"],
|
|
4
|
+
"sourcesContent": ["import clsx from 'clsx';\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { getBlockSupport, hasBlockSupport } from '@wordpress/blocks';\nimport { useInstanceId } from '@wordpress/compose';\nimport { useSelect } from '@wordpress/data';\nimport { useId, useMemo } from '@wordpress/element';\n// eslint-disable-next-line @wordpress/use-recommended-components -- Use the portal-based popup to avoid inspector clipping.\nimport { SelectControl } from '@wordpress/ui';\nimport { useSettings } from '../components/use-settings';\nimport InspectorControls from '../components/inspector-controls';\nimport useBlockDisplayInformation from '../components/use-block-display-information';\nimport { cleanEmptyObject, useStyleOverride } from './utils';\nimport { store as blockEditorStore } from '../store';\n\nconst POSITION_SUPPORT_KEY = 'position';\n\nconst DEFAULT_OPTION = {\n\tkey: 'default',\n\tvalue: '',\n\tlabel: __( 'Default' ),\n};\n\nconst STICKY_OPTION = {\n\tkey: 'sticky',\n\tvalue: 'sticky',\n\tlabel: _x( 'Sticky', 'Name for the value of the CSS position property' ),\n\thint: __(\n\t\t'The block will stick to the top of the window instead of scrolling.'\n\t),\n};\n\nconst FIXED_OPTION = {\n\tkey: 'fixed',\n\tvalue: 'fixed',\n\tlabel: _x( 'Fixed', 'Name for the value of the CSS position property' ),\n\thint: __( 'The block will not move when the page is scrolled.' ),\n};\n\nconst POSITION_SIDES = [ 'top', 'right', 'bottom', 'left' ];\nconst VALID_POSITION_TYPES = [ 'sticky', 'fixed' ];\n\n/**\n * Get calculated position CSS.\n *\n * @param {Object} props Component props.\n * @param {string} props.selector Selector to use.\n * @param {Object} props.style Style object.\n * @return {string} The generated CSS rules.\n */\nexport function getPositionCSS( { selector, style } ) {\n\tlet output = '';\n\n\tconst { type: positionType } = style?.position || {};\n\n\tif ( ! VALID_POSITION_TYPES.includes( positionType ) ) {\n\t\treturn output;\n\t}\n\n\toutput += `${ selector } {`;\n\toutput += `position: ${ positionType };`;\n\n\tPOSITION_SIDES.forEach( ( side ) => {\n\t\tif ( style?.position?.[ side ] !== undefined ) {\n\t\t\toutput += `${ side }: ${ style.position[ side ] };`;\n\t\t}\n\t} );\n\n\tif ( positionType === 'sticky' || positionType === 'fixed' ) {\n\t\t// TODO: Replace hard-coded z-index value with a z-index preset approach in theme.json.\n\t\toutput += `z-index: 10`;\n\t}\n\toutput += `}`;\n\n\treturn output;\n}\n\n/**\n * Determines if there is sticky position support.\n *\n * @param {string|Object} blockType Block name or Block Type object.\n *\n * @return {boolean} Whether there is support.\n */\nexport function hasStickyPositionSupport( blockType ) {\n\tconst support = getBlockSupport( blockType, POSITION_SUPPORT_KEY );\n\treturn !! ( true === support || support?.sticky );\n}\n\n/**\n * Determines if there is fixed position support.\n *\n * @param {string|Object} blockType Block name or Block Type object.\n *\n * @return {boolean} Whether there is support.\n */\nexport function hasFixedPositionSupport( blockType ) {\n\tconst support = getBlockSupport( blockType, POSITION_SUPPORT_KEY );\n\treturn !! ( true === support || support?.fixed );\n}\n\n/**\n * Determines if there is position support.\n *\n * @param {string|Object} blockType Block name or Block Type object.\n *\n * @return {boolean} Whether there is support.\n */\nexport function hasPositionSupport( blockType ) {\n\tconst support = getBlockSupport( blockType, POSITION_SUPPORT_KEY );\n\treturn !! support;\n}\n\n/**\n * Checks if there is a current value in the position block support attributes.\n *\n * @param {Object} props Block props.\n * @return {boolean} Whether or not the block has a position value set.\n */\nexport function hasPositionValue( props ) {\n\treturn props.attributes.style?.position?.type !== undefined;\n}\n\n/**\n * Checks if the block is currently set to a sticky or fixed position.\n * This check is helpful for determining how to position block toolbars or other elements.\n *\n * @param {Object} attributes Block attributes.\n * @return {boolean} Whether or not the block is set to a sticky or fixed position.\n */\nexport function hasStickyOrFixedPositionValue( attributes ) {\n\tconst positionType = attributes?.style?.position?.type;\n\treturn positionType === 'sticky' || positionType === 'fixed';\n}\n\n/**\n * Resets the position block support attributes. This can be used when disabling\n * the position support controls for a block via a `ToolsPanel`.\n *\n * @param {Object} props Block props.\n * @param {Object} props.attributes Block's attributes.\n * @param {Object} props.setAttributes Function to set block's attributes.\n */\nexport function resetPosition( { attributes = {}, setAttributes } ) {\n\tconst { style = {} } = attributes;\n\n\tsetAttributes( {\n\t\tstyle: cleanEmptyObject( {\n\t\t\t...style,\n\t\t\tposition: {\n\t\t\t\t...style?.position,\n\t\t\t\ttype: undefined,\n\t\t\t\ttop: undefined,\n\t\t\t\tright: undefined,\n\t\t\t\tbottom: undefined,\n\t\t\t\tleft: undefined,\n\t\t\t},\n\t\t} ),\n\t} );\n}\n\n/**\n * Custom hook that checks if position settings have been disabled.\n *\n * @param {string} name The name of the block.\n *\n * @return {boolean} Whether padding setting is disabled.\n */\nexport function useIsPositionDisabled( { name: blockName } = {} ) {\n\tconst [ allowFixed, allowSticky ] = useSettings(\n\t\t'position.fixed',\n\t\t'position.sticky'\n\t);\n\tconst isDisabled = ! allowFixed && ! allowSticky;\n\n\treturn ! hasPositionSupport( blockName ) || isDisabled;\n}\n\n/*\n * Position controls rendered in an inspector control panel.\n *\n * @param {Object} props\n *\n * @return {Element} Position panel.\n */\nexport function PositionPanelPure( {\n\tstyle = {},\n\tclientId,\n\tname: blockName,\n\tsetAttributes,\n} ) {\n\tconst allowFixed = hasFixedPositionSupport( blockName );\n\tconst allowSticky = hasStickyPositionSupport( blockName );\n\tconst value = style?.position?.type;\n\n\tconst { firstParentClientId } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockParents } = select( blockEditorStore );\n\t\t\tconst parents = getBlockParents( clientId );\n\t\t\treturn { firstParentClientId: parents[ parents.length - 1 ] };\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst blockInformation = useBlockDisplayInformation( firstParentClientId );\n\tconst stickyHelpText =\n\t\tallowSticky && value === STICKY_OPTION.value && blockInformation\n\t\t\t? sprintf(\n\t\t\t\t\t/* translators: %s: the name of the parent block. */\n\t\t\t\t\t__(\n\t\t\t\t\t\t'The block will stick to the scrollable area of the parent %s block.'\n\t\t\t\t\t),\n\t\t\t\t\tblockInformation.title\n\t\t\t )\n\t\t\t: null;\n\n\tconst options = useMemo( () => {\n\t\tconst availableOptions = [ DEFAULT_OPTION ];\n\t\t// Display options if they are allowed, or if a block already has a valid value set.\n\t\t// This allows for a block to be switched off from a position type that is not allowed.\n\t\tif ( allowSticky || value === STICKY_OPTION.value ) {\n\t\t\tavailableOptions.push( STICKY_OPTION );\n\t\t}\n\t\tif ( allowFixed || value === FIXED_OPTION.value ) {\n\t\t\tavailableOptions.push( FIXED_OPTION );\n\t\t}\n\t\treturn availableOptions;\n\t}, [ allowFixed, allowSticky, value ] );\n\n\tconst onChangeType = ( next ) => {\n\t\t// For now, use a hard-coded `0px` value for the position.\n\t\t// `0px` is preferred over `0` as it can be used in `calc()` functions.\n\t\t// In the future, it could be useful to allow for an offset value.\n\t\tconst placementValue = '0px';\n\n\t\tconst newStyle = {\n\t\t\t...style,\n\t\t\tposition: {\n\t\t\t\t...style?.position,\n\t\t\t\ttype: next,\n\t\t\t\ttop:\n\t\t\t\t\tnext === 'sticky' || next === 'fixed'\n\t\t\t\t\t\t? placementValue\n\t\t\t\t\t\t: undefined,\n\t\t\t},\n\t\t};\n\n\t\tsetAttributes( {\n\t\t\tstyle: cleanEmptyObject( newStyle ),\n\t\t} );\n\t};\n\n\tconst selectedOption = value\n\t\t? options.find( ( option ) => option.value === value ) || DEFAULT_OPTION\n\t\t: DEFAULT_OPTION;\n\tconst hintIdPrefix = useId();\n\n\t// Only display position controls if there is at least one option to choose from.\n\treturn options.length > 1 ? (\n\t\t<InspectorControls group=\"position\">\n\t\t\t<SelectControl\n\t\t\t\tlabel={ __( 'Position' ) }\n\t\t\t\thideLabelFromVision\n\t\t\t\tdescription={ stickyHelpText }\n\t\t\t\tpopupWidth=\"anchor\"\n\t\t\t\titems={ options }\n\t\t\t\tvalue={ selectedOption }\n\t\t\t\tonValueChange={ ( selectedItem ) => {\n\t\t\t\t\tonChangeType( selectedItem.value );\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ options.map( ( option ) => {\n\t\t\t\t\tconst hintId = option.hint\n\t\t\t\t\t\t? `${ hintIdPrefix }-${ option.key }`\n\t\t\t\t\t\t: undefined;\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<SelectControl.Item\n\t\t\t\t\t\t\tkey={ option.key }\n\t\t\t\t\t\t\tvalue={ option }\n\t\t\t\t\t\t\tlabel={ option.label }\n\t\t\t\t\t\t\taria-describedby={ hintId }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<div>{ option.label }</div>\n\t\t\t\t\t\t\t{ option.hint && (\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tid={ hintId }\n\t\t\t\t\t\t\t\t\tclassName=\"block-editor-hooks__position-control-item-hint\"\n\t\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ option.hint }\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</SelectControl.Item>\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\t\t\t</SelectControl>\n\t\t</InspectorControls>\n\t) : null;\n}\n\nexport default {\n\tedit: function Edit( props ) {\n\t\tconst isPositionDisabled = useIsPositionDisabled( props );\n\t\tif ( isPositionDisabled ) {\n\t\t\treturn null;\n\t\t}\n\t\treturn <PositionPanelPure { ...props } />;\n\t},\n\tuseBlockProps,\n\tattributeKeys: [ 'style' ],\n\thasSupport( name ) {\n\t\treturn hasBlockSupport( name, POSITION_SUPPORT_KEY );\n\t},\n};\n\n// Used for generating the instance ID\nconst POSITION_BLOCK_PROPS_REFERENCE = {};\n\nfunction useBlockProps( { name, style } ) {\n\tconst hasPositionBlockSupport = hasBlockSupport(\n\t\tname,\n\t\tPOSITION_SUPPORT_KEY\n\t);\n\tconst isPositionDisabled = useIsPositionDisabled( { name } );\n\tconst allowPositionStyles = hasPositionBlockSupport && ! isPositionDisabled;\n\n\tconst id = useInstanceId( POSITION_BLOCK_PROPS_REFERENCE );\n\n\t// Higher specificity to override defaults in editor UI.\n\tconst positionSelector = `.wp-container-${ id }.wp-container-${ id }`;\n\n\t// Get CSS string for the current position values.\n\tlet css;\n\tif ( allowPositionStyles ) {\n\t\tcss =\n\t\t\tgetPositionCSS( {\n\t\t\t\tselector: positionSelector,\n\t\t\t\tstyle,\n\t\t\t} ) || '';\n\t}\n\n\t// Attach a `wp-container-` id-based class name.\n\tconst className = clsx( {\n\t\t[ `wp-container-${ id }` ]: allowPositionStyles && !! css, // Only attach a container class if there is generated CSS to be attached.\n\t\t[ `is-position-${ style?.position?.type }` ]:\n\t\t\tallowPositionStyles && !! css && !! style?.position?.type,\n\t} );\n\n\tuseStyleOverride( { css } );\n\n\treturn { className };\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,kBAAgC;AAChC,oBAAiD;AACjD,qBAA8B;AAC9B,kBAA0B;AAC1B,qBAA+B;AAE/B,gBAA8B;AAC9B,0BAA4B;AAC5B,gCAA8B;AAC9B,2CAAuC;AACvC,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AU,IAAK,EAAG,GAC1C,uBAAuB,CAAC,CAAE,OAAO,CAAC,CAAE,OAAO,UAAU;AAAA,EACvD,CAAE;AAEF,qCAAkB,EAAE,IAAI,CAAE;AAE1B,SAAO,EAAE,UAAU;AACpB;",
|
|
6
6
|
"names": ["blockEditorStore", "useBlockDisplayInformation", "InspectorControls", "clsx"]
|
|
7
7
|
}
|
|
@@ -27,7 +27,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
|
|
30
|
-
// packages/block-editor/src/hooks/spacing-visualizer.
|
|
30
|
+
// packages/block-editor/src/hooks/spacing-visualizer.jsx
|
|
31
31
|
var spacing_visualizer_exports = {};
|
|
32
32
|
__export(spacing_visualizer_exports, {
|
|
33
33
|
MarginVisualizer: () => MarginVisualizer,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/hooks/spacing-visualizer.
|
|
3
|
+
"sources": ["../../src/hooks/spacing-visualizer.jsx"],
|
|
4
4
|
"sourcesContent": ["import { useState, useRef, useEffect, useReducer } from '@wordpress/element';\nimport { isShallowEqual } from '@wordpress/is-shallow-equal';\nimport BlockPopoverCover from '../components/block-popover/cover';\nimport { useBlockElement } from '../components/block-list/use-block-props/use-block-refs';\n\nfunction SpacingVisualizer( { clientId, value, computeStyle, forceShow } ) {\n\tconst blockElement = useBlockElement( clientId );\n\tconst [ style, updateStyle ] = useReducer( () =>\n\t\tcomputeStyle( blockElement )\n\t);\n\n\t// Force style computation when forceShow becomes true (e.g., when hovering control)\n\t// to ensure visualizer displays correct dimensions on first render.\n\tuseEffect( () => {\n\t\tif ( blockElement && forceShow ) {\n\t\t\tupdateStyle();\n\t\t}\n\t}, [ blockElement, forceShow ] );\n\n\t// It's not sufficient to read the block's computed style when `value` changes because\n\t// the effect would run before the block’s style has updated. Thus observing mutations\n\t// to the block’s attributes is used to trigger updates to the visualizer’s styles.\n\tuseEffect( () => {\n\t\tif ( ! blockElement ) {\n\t\t\treturn;\n\t\t}\n\t\tconst observer = new window.MutationObserver( updateStyle );\n\t\tobserver.observe( blockElement, {\n\t\t\tattributes: true,\n\t\t\tattributeFilter: [ 'style', 'class' ],\n\t\t} );\n\t\treturn () => {\n\t\t\tobserver.disconnect();\n\t\t};\n\t}, [ blockElement ] );\n\n\tconst previousValueRef = useRef( value );\n\tconst [ isActive, setIsActive ] = useState( false );\n\n\tuseEffect( () => {\n\t\tif ( isShallowEqual( value, previousValueRef.current ) || forceShow ) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetIsActive( true );\n\t\tpreviousValueRef.current = value;\n\n\t\tconst timeout = setTimeout( () => {\n\t\t\tsetIsActive( false );\n\t\t}, 400 );\n\n\t\treturn () => {\n\t\t\tsetIsActive( false );\n\t\t\tclearTimeout( timeout );\n\t\t};\n\t}, [ value, forceShow ] );\n\n\tif ( ! isActive && ! forceShow ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<BlockPopoverCover\n\t\t\tclientId={ clientId }\n\t\t\t__unstablePopoverSlot=\"block-toolbar\"\n\t\t>\n\t\t\t<div className=\"block-editor__spacing-visualizer\" style={ style } />\n\t\t</BlockPopoverCover>\n\t);\n}\n\nfunction getComputedCSS( element, property ) {\n\treturn element.ownerDocument.defaultView\n\t\t.getComputedStyle( element )\n\t\t.getPropertyValue( property );\n}\n\nexport function MarginVisualizer( { clientId, value, forceShow } ) {\n\treturn (\n\t\t<SpacingVisualizer\n\t\t\tclientId={ clientId }\n\t\t\tvalue={ value?.spacing?.margin }\n\t\t\tcomputeStyle={ ( blockElement ) => {\n\t\t\t\tconst top = getComputedCSS( blockElement, 'margin-top' );\n\t\t\t\tconst right = getComputedCSS( blockElement, 'margin-right' );\n\t\t\t\tconst bottom = getComputedCSS( blockElement, 'margin-bottom' );\n\t\t\t\tconst left = getComputedCSS( blockElement, 'margin-left' );\n\t\t\t\treturn {\n\t\t\t\t\tborderTopWidth: top,\n\t\t\t\t\tborderRightWidth: right,\n\t\t\t\t\tborderBottomWidth: bottom,\n\t\t\t\t\tborderLeftWidth: left,\n\t\t\t\t\ttop: top ? `-${ top }` : 0,\n\t\t\t\t\tright: right ? `-${ right }` : 0,\n\t\t\t\t\tbottom: bottom ? `-${ bottom }` : 0,\n\t\t\t\t\tleft: left ? `-${ left }` : 0,\n\t\t\t\t};\n\t\t\t} }\n\t\t\tforceShow={ forceShow }\n\t\t/>\n\t);\n}\n\nexport function PaddingVisualizer( { clientId, value, forceShow } ) {\n\treturn (\n\t\t<SpacingVisualizer\n\t\t\tclientId={ clientId }\n\t\t\tvalue={ value?.spacing?.padding }\n\t\t\tcomputeStyle={ ( blockElement ) => ( {\n\t\t\t\tborderTopWidth: getComputedCSS( blockElement, 'padding-top' ),\n\t\t\t\tborderRightWidth: getComputedCSS(\n\t\t\t\t\tblockElement,\n\t\t\t\t\t'padding-right'\n\t\t\t\t),\n\t\t\t\tborderBottomWidth: getComputedCSS(\n\t\t\t\t\tblockElement,\n\t\t\t\t\t'padding-bottom'\n\t\t\t\t),\n\t\t\t\tborderLeftWidth: getComputedCSS( blockElement, 'padding-left' ),\n\t\t\t} ) }\n\t\t\tforceShow={ forceShow }\n\t\t/>\n\t);\n}\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAwD;AACxD,8BAA+B;AAC/B,mBAA8B;AAC9B,4BAAgC;AA+D7B;AA7DH,SAAS,kBAAmB,EAAE,UAAU,OAAO,cAAc,UAAU,GAAI;AAC1E,QAAM,mBAAe,uCAAiB,QAAS;AAC/C,QAAM,CAAE,OAAO,WAAY,QAAI;AAAA,IAAY,MAC1C,aAAc,YAAa;AAAA,EAC5B;AAIA,gCAAW,MAAM;AAChB,QAAK,gBAAgB,WAAY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,MAAM,eAAgB,cAAc,YAAa;AACvD,cAAM,QAAQ,eAAgB,cAAc,cAAe;AAC3D,cAAM,SAAS,eAAgB,cAAc,eAAgB;AAC7D,cAAM,OAAO,eAAgB,cAAc,aAAc;AACzD,eAAO;AAAA,UACN,gBAAgB;AAAA,UAChB,kBAAkB;AAAA,UAClB,mBAAmB;AAAA,UACnB,iBAAiB;AAAA,UACjB,KAAK,MAAM,IAAK,GAAI,KAAK;AAAA,UACzB,OAAO,QAAQ,IAAK,KAAM,KAAK;AAAA,UAC/B,QAAQ,SAAS,IAAK,MAAO,KAAK;AAAA,UAClC,MAAM,OAAO,IAAK,IAAK,KAAK;AAAA,QAC7B;AAAA,MACD;AAAA,MACA;AAAA;AAAA,EACD;AAEF;AAEO,SAAS,kBAAmB,EAAE,UAAU,OAAO,UAAU,GAAI;AACnE,SACC;AAAA,IAAC;AAAA;AAAA,MACA;AAAA,MACA,OAAQ,OAAO,SAAS;AAAA,MACxB,cAAe,CAAE,kBAAoB;AAAA,QACpC,gBAAgB,eAAgB,cAAc,aAAc;AAAA,QAC5D,kBAAkB;AAAA,UACjB;AAAA,UACA;AAAA,QACD;AAAA,QACA,mBAAmB;AAAA,UAClB;AAAA,UACA;AAAA,QACD;AAAA,QACA,iBAAiB,eAAgB,cAAc,cAAe;AAAA,MAC/D;AAAA,MACA;AAAA;AAAA,EACD;AAEF;",
|
|
6
6
|
"names": ["BlockPopoverCover"]
|
package/build/hooks/states.cjs
CHANGED
|
@@ -27,7 +27,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
|
|
30
|
-
// packages/block-editor/src/hooks/states.
|
|
30
|
+
// packages/block-editor/src/hooks/states.jsx
|
|
31
31
|
var states_exports = {};
|
|
32
32
|
__export(states_exports, {
|
|
33
33
|
BlockStateBadges: () => BlockStateBadges,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/hooks/states.
|
|
3
|
+
"sources": ["../../src/hooks/states.jsx"],
|
|
4
4
|
"sourcesContent": ["import { useMemo } from '@wordpress/element';\nimport { privateApis as globalStylesEnginePrivateApis } from '@wordpress/global-styles-engine';\nimport { __, _x } from '@wordpress/i18n';\nimport StateControl from '../components/global-styles/state-control';\nimport StateControlBadges from '../components/global-styles/state-control-badges';\nimport { useToolsPanelDropdownMenuProps } from '../components/global-styles/utils';\nimport { useSettings } from '../components/use-settings';\nimport { unlock } from '../lock-unlock';\n\nconst { getViewportBreakpoints } = unlock( globalStylesEnginePrivateApis );\n\nexport const PSEUDO_STATE_LABELS = {\n\t':hover': _x( 'Hover', 'Name for the CSS pseudo-class selector' ),\n\t':focus': _x( 'Focus', 'Name for the CSS pseudo-class selector' ),\n\t':focus-visible': _x(\n\t\t'Focus-visible',\n\t\t'Name for the CSS pseudo-class selector'\n\t),\n\t':active': _x( 'Active', 'Name for the CSS pseudo-class selector' ),\n};\n\nexport const RESPONSIVE_STATE_LABELS = {\n\t'@tablet': __( 'Tablet' ),\n\t'@mobile': __( 'Mobile' ),\n};\n\n// Viewport states are selected globally via the editor's device preview.\nfunction getDeviceStateOptions( viewportSettings ) {\n\tconst breakpoints = getViewportBreakpoints( viewportSettings );\n\n\treturn Object.entries( RESPONSIVE_STATE_LABELS )\n\t\t.filter(\n\t\t\t( [ value ] ) =>\n\t\t\t\t( value !== '@tablet' || breakpoints.tablet !== undefined ) &&\n\t\t\t\t( value !== '@mobile' || breakpoints.mobile !== undefined )\n\t\t)\n\t\t.map( ( [ value, label ] ) => ( {\n\t\t\tvalue,\n\t\t\tlabel,\n\t\t} ) );\n}\n\n// Keep in sync with WP_Theme_JSON_Gutenberg::VALID_BLOCK_PSEUDO_SELECTORS\n// and packages/global-styles-engine/src/core/render.tsx.\nexport const VALID_BLOCK_PSEUDO_STATES = {\n\t'core/button': [ ':hover', ':focus', ':focus-visible', ':active' ],\n\t'core/navigation-link': [ ':hover', ':focus', ':focus-visible', ':active' ],\n};\n\nfunction getPseudoStateOptions( name ) {\n\tconst validStates = VALID_BLOCK_PSEUDO_STATES[ name ] ?? [];\n\n\treturn validStates\n\t\t.filter( ( state ) => PSEUDO_STATE_LABELS[ state ] )\n\t\t.map( ( state ) => ( {\n\t\t\tvalue: state,\n\t\t\tlabel: PSEUDO_STATE_LABELS[ state ],\n\t\t} ) );\n}\n\nconst DEFAULT_STATE_VALUE = 'default';\nconst EMPTY_STATE_OPTIONS = [];\n\n/**\n * Renders a pseudo-state selector in the block card header.\n *\n * Viewport states are selected globally via the editor's device preview\n * (Responsive editing), so only pseudo-states are exposed here.\n *\n * @param {Object} props Component props.\n * @param {string} props.name Block name.\n * @param {Object} props.value Currently selected style-state value.\n * @param {Function} props.onChange Callback when style-state selection changes.\n * @return {Element|null} State control component, or null if not applicable.\n */\nexport function BlockStatesControl( { name, value, onChange } ) {\n\tconst pseudoStateOptions = useMemo(\n\t\t() => getPseudoStateOptions( name ),\n\t\t[ name ]\n\t);\n\tconst dropdownMenuProps = useToolsPanelDropdownMenuProps();\n\n\tif ( ! pseudoStateOptions.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<StateControl\n\t\t\tpseudoStates={ pseudoStateOptions }\n\t\t\tpseudoStateValue={ value?.pseudo ?? DEFAULT_STATE_VALUE }\n\t\t\tonChangePseudoState={ ( pseudo ) => onChange( { pseudo } ) }\n\t\t\tpopoverProps={ dropdownMenuProps.popoverProps }\n\t\t\tshowText={ false }\n\t\t/>\n\t);\n}\n\n/**\n * Renders badges for the active style states of a block.\n *\n * @param {Object} props Component props.\n * @param {string} props.name Block name.\n * @param {Object} props.value Currently selected style-state value.\n * @param {boolean} props.isResponsiveEditing Whether Responsive editing is enabled.\n * @return {Element|null} Badges component, or null if there is nothing to show.\n */\nexport function BlockStateBadges( { name, value, isResponsiveEditing } ) {\n\tconst pseudoStateOptions = useMemo(\n\t\t() => getPseudoStateOptions( name ),\n\t\t[ name ]\n\t);\n\tconst [ viewportSettings ] = useSettings( 'viewport' );\n\tconst deviceStateOptions = useMemo(\n\t\t() => getDeviceStateOptions( viewportSettings ),\n\t\t[ viewportSettings ]\n\t);\n\n\tif ( ! pseudoStateOptions.length && ! isResponsiveEditing ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<StateControlBadges\n\t\t\tviewportStates={\n\t\t\t\tisResponsiveEditing ? deviceStateOptions : EMPTY_STATE_OPTIONS\n\t\t\t}\n\t\t\tpseudoStates={ pseudoStateOptions }\n\t\t\tviewportValue={ value?.viewport ?? DEFAULT_STATE_VALUE }\n\t\t\tpseudoStateValue={ value?.pseudo ?? DEFAULT_STATE_VALUE }\n\t\t/>\n\t);\n}\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAwB;AACxB,kCAA6D;AAC7D,kBAAuB;AACvB,2BAAyB;AACzB,kCAA+B;AAC/B,mBAA+C;AAC/C,0BAA4B;AAC5B,yBAAuB;AAgFrB;AA9EF,IAAM,EAAE,uBAAuB,QAAI,2BAAQ,4BAAAA,WAA8B;AAElE,IAAM,sBAAsB;AAAA,EAClC,cAAU,gBAAI,SAAS,wCAAyC;AAAA,EAChE,cAAU,gBAAI,SAAS,wCAAyC;AAAA,EAChE,sBAAkB;AAAA,IACjB;AAAA,IACA;AAAA,EACD;AAAA,EACA,eAAW,gBAAI,UAAU,wCAAyC;AACnE;AAEO,IAAM,0BAA0B;AAAA,EACtC,eAAW,gBAAI,QAAS;AAAA,EACxB,eAAW,gBAAI,QAAS;AACzB;AAGA,SAAS,sBAAuB,kBAAmB;AAClD,QAAM,cAAc,uBAAwB,gBAAiB;AAE7D,SAAO,OAAO,QAAS,uBAAwB,EAC7C;AAAA,IACA,CAAE,CAAE,KAAM,OACP,UAAU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AiB;AAAA,IAC9C,CAAE,gBAAiB;AAAA,EACpB;AAEA,MAAK,CAAE,mBAAmB,UAAU,CAAE,qBAAsB;AAC3D,WAAO;AAAA,EACR;AAEA,SACC;AAAA,IAAC,4BAAAC;AAAA,IAAA;AAAA,MACA,gBACC,sBAAsB,qBAAqB;AAAA,MAE5C,cAAe;AAAA,MACf,eAAgB,OAAO,YAAY;AAAA,MACnC,kBAAmB,OAAO,UAAU;AAAA;AAAA,EACrC;AAEF;",
|
|
6
6
|
"names": ["globalStylesEnginePrivateApis", "StateControl", "StateControlBadges"]
|
package/build/hooks/style.cjs
CHANGED
|
@@ -17,7 +17,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
|
|
20
|
-
// packages/block-editor/src/hooks/style.
|
|
20
|
+
// packages/block-editor/src/hooks/style.jsx
|
|
21
21
|
var style_exports = {};
|
|
22
22
|
__export(style_exports, {
|
|
23
23
|
addSaveProps: () => addSaveProps,
|
|
@@ -574,7 +574,7 @@ function getElementCSSRules(blockElementStyles, blockName, baseSelector) {
|
|
|
574
574
|
});
|
|
575
575
|
return rules.length > 0 ? rules.join("") : void 0;
|
|
576
576
|
}
|
|
577
|
-
function useBlockProps({ name, style }) {
|
|
577
|
+
function useBlockProps({ clientId, name, style }) {
|
|
578
578
|
const blockElementsContainerIdentifier = (0, import_compose.useInstanceId)(
|
|
579
579
|
STYLE_BLOCK_PROPS_REFERENCE,
|
|
580
580
|
"wp-elements"
|
|
@@ -611,7 +611,7 @@ function useBlockProps({ name, style }) {
|
|
|
611
611
|
style,
|
|
612
612
|
viewportSettings
|
|
613
613
|
]);
|
|
614
|
-
(0, import_utils.
|
|
614
|
+
(0, import_utils.usePrivateStyleOverride)({ css: styles, clientId });
|
|
615
615
|
return addSaveProps(
|
|
616
616
|
{ className: blockElementsContainerIdentifier },
|
|
617
617
|
name,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/hooks/style.
|
|
4
|
-
"sourcesContent": ["import { useMemo } from '@wordpress/element';\nimport { addFilter } from '@wordpress/hooks';\nimport { useSelect } from '@wordpress/data';\nimport {\n\tmergeGlobalStyles,\n\tprivateApis as globalStylesEnginePrivateApis,\n} from '@wordpress/global-styles-engine';\nimport {\n\tgetBlockSupport,\n\tgetBlockType,\n\thasBlockSupport,\n\t__EXPERIMENTAL_ELEMENTS as ELEMENTS,\n} from '@wordpress/blocks';\nimport { useInstanceId } from '@wordpress/compose';\nimport {\n\tgetCSSRules,\n\tcompileCSS,\n\tgetCSSValueFromRawStyle,\n} from '@wordpress/style-engine';\nimport { BACKGROUND_SUPPORT_KEY, BackgroundImagePanel } from './background';\nimport { BORDER_SUPPORT_KEY, BorderPanel, SHADOW_SUPPORT_KEY } from './border';\nimport { COLOR_SUPPORT_KEY } from './color';\nimport { ElementsEdit } from './elements';\nimport {\n\tTypographyPanel,\n\tTYPOGRAPHY_SUPPORT_KEY,\n\tTYPOGRAPHY_SUPPORT_KEYS,\n} from './typography';\nimport {\n\tDIMENSIONS_SUPPORT_KEY,\n\tSPACING_SUPPORT_KEY,\n\tDimensionsPanel,\n\tisExplicitAspectRatio,\n} from './dimensions';\nimport {\n\tcleanEmptyObject,\n\tshouldSkipSerialization,\n\tuseStyleOverride,\n\tuseBlockSettings,\n} from './utils';\nimport {\n\tBlockStyleStateProvider,\n\tDEFAULT_BLOCK_STYLE_STATE,\n\tgetStyleForState,\n\thasViewportBlockStyleState,\n\thasPseudoBlockStyleState,\n} from './block-style-state';\nimport { VALID_BLOCK_PSEUDO_STATES } from './states';\nimport { buildScopedBlockSelector } from './state-utils';\nimport { scopeSelector } from '../components/global-styles/utils';\nimport { useBlockEditingMode } from '../components/block-editing-mode';\nimport { useSettings } from '../components/use-settings';\nimport { store as blockEditorStore } from '../store';\nimport { globalStylesDataKey } from '../store/private-keys';\nimport { unlock } from '../lock-unlock';\n\nconst { getResponsiveMediaQueries } = unlock( globalStylesEnginePrivateApis );\n\nconst BORDER_SIDES = [ 'Top', 'Right', 'Bottom', 'Left' ];\n\nconst styleSupportKeys = [\n\t...TYPOGRAPHY_SUPPORT_KEYS,\n\tBORDER_SUPPORT_KEY,\n\tCOLOR_SUPPORT_KEY,\n\tDIMENSIONS_SUPPORT_KEY,\n\tBACKGROUND_SUPPORT_KEY,\n\tSPACING_SUPPORT_KEY,\n\tSHADOW_SUPPORT_KEY,\n];\n\nconst hasStyleSupport = ( nameOrType ) =>\n\tstyleSupportKeys.some( ( key ) => hasBlockSupport( nameOrType, key ) );\n\n/**\n * Returns the inline styles to add depending on the style object\n *\n * @param {Object} styles Styles configuration.\n *\n * @return {Object} Flattened CSS variables declaration.\n */\nexport function getInlineStyles( styles = {} ) {\n\tconst output = {};\n\t// The goal is to move everything to server side generated engine styles\n\t// This is temporary as we absorb more and more styles into the engine.\n\tgetCSSRules( styles ).forEach( ( rule ) => {\n\t\toutput[ rule.key ] = rule.value;\n\t} );\n\n\treturn output;\n}\n\n/**\n * Returns fallback border styles for visible state border styles.\n *\n * State styles are emitted as stylesheet rules rather than inline styles, so\n * they cannot rely on the block-library inline-style attribute fallback rules.\n *\n * @param {Object} stateStyles State style object.\n * @return {Object|undefined} Style object containing fallback border styles.\n */\nfunction getStateFallbackBorderStyles( stateStyles ) {\n\tconst border = stateStyles?.border;\n\tif ( ! border ) {\n\t\treturn undefined;\n\t}\n\n\tconst hasBorderStyle = !! border.style;\n\tconst hasBorderColor = !! border.color;\n\tconst hasBorderWidth = !! border.width;\n\tconst fallbackBorder = {};\n\n\tif ( ! hasBorderStyle && ( hasBorderColor || hasBorderWidth ) ) {\n\t\tfallbackBorder.style = 'solid';\n\t}\n\n\tBORDER_SIDES.forEach( ( side ) => {\n\t\tconst sideKey = side.toLowerCase();\n\t\tconst sideBorder = border[ sideKey ];\n\t\tconst hasSideStyle = !! sideBorder?.style;\n\t\tconst hasSideColor = !! sideBorder?.color;\n\t\tconst hasSideWidth = !! sideBorder?.width;\n\n\t\tif (\n\t\t\t! hasBorderStyle &&\n\t\t\t! hasSideStyle &&\n\t\t\t( hasSideColor || hasSideWidth )\n\t\t) {\n\t\t\tfallbackBorder[ sideKey ] = { style: 'solid' };\n\t\t}\n\t} );\n\n\treturn cleanEmptyObject( { border: cleanEmptyObject( fallbackBorder ) } );\n}\n\n/**\n * Returns background reset CSS for a state that sets a solid background color.\n *\n * When a state sets `color.background` (a solid color) without also setting a\n * gradient (`color.gradient` or `background.gradient`), any gradient applied to\n * the default state via an inline `background` shorthand or `background-image`\n * declaration must be explicitly cleared. Without this, the gradient image layer\n * remains visible even though the solid hover color wins `background-color`.\n *\n * @param {Object} stateStyles State style object.\n * @param {string} selector CSS selector for the generated style.\n * @return {string|undefined} CSS string with background-image reset, or undefined.\n */\nfunction getStateBackgroundResetCSS( stateStyles, selector ) {\n\tconst hasSolidBackground = !! stateStyles?.color?.background;\n\n\tif ( ! hasSolidBackground ) {\n\t\treturn undefined;\n\t}\n\n\tconst hasColorGradient = !! stateStyles?.color?.gradient;\n\tconst hasBackgroundGradient =\n\t\t!! stateStyles?.background?.gradient ||\n\t\t!! stateStyles?.background?.backgroundImage;\n\n\tif ( hasColorGradient || hasBackgroundGradient ) {\n\t\treturn undefined;\n\t}\n\n\tconst declaration = 'background-image: unset !important';\n\treturn selector\n\t\t? `${ selector } { ${ declaration }; }`\n\t\t: `${ declaration };`;\n}\n\n/**\n * Returns fallback dimension styles that keep state styles aligned with the\n * default dimensions block-support output.\n *\n * @param {Object} stateStyles State style object.\n * @return {Object|undefined} Style object containing fallback dimension styles.\n */\nfunction getStateFallbackDimensionStyles( stateStyles ) {\n\tconst dimensions = stateStyles?.dimensions;\n\tif ( ! dimensions ) {\n\t\treturn undefined;\n\t}\n\n\tif ( isExplicitAspectRatio( dimensions.aspectRatio ) ) {\n\t\treturn {\n\t\t\tdimensions: {\n\t\t\t\tminHeight: 'unset',\n\t\t\t\theight: 'unset',\n\t\t\t},\n\t\t};\n\t}\n\n\tif ( dimensions.minHeight || dimensions.height ) {\n\t\treturn {\n\t\t\tdimensions: {\n\t\t\t\taspectRatio: 'unset',\n\t\t\t},\n\t\t};\n\t}\n}\n\n/**\n * Returns CSS for text alignment in a block instance state style object.\n *\n * Text alignment is not generated by the style engine because base block\n * alignment is serialized as a class name. State styles need a declaration\n * instead so viewport and pseudo-state values can override the default class.\n *\n * @param {Object} stateStyles State style object.\n * @param {string} selector CSS selector for the generated style.\n * @return {string|undefined} CSS string with the text alignment declaration.\n */\nfunction getStateTextAlignCSS( stateStyles, selector ) {\n\tconst textAlign = stateStyles?.typography?.textAlign;\n\n\tif ( typeof textAlign !== 'string' || ! textAlign ) {\n\t\treturn undefined;\n\t}\n\n\tconst declaration = `text-align: ${ getCSSValueFromRawStyle(\n\t\ttextAlign\n\t) } !important`;\n\treturn selector\n\t\t? `${ selector } { ${ declaration }; }`\n\t\t: `${ declaration };`;\n}\n\n/**\n * Generates CSS for a block instance state style object.\n *\n * State declarations need to win over preset utility classes, but fallback\n * border styles should not become important because they must not override\n * explicitly authored default border styles.\n *\n * @param {Object} stateStyles State style object.\n * @param {string} selector CSS selector for the generated style.\n * @return {string} Generated stylesheet.\n */\nexport function getStateStylesCSS( stateStyles, selector ) {\n\tconst fallbackDimensionStyles =\n\t\tgetStateFallbackDimensionStyles( stateStyles );\n\tconst stylesWithDimensionFallbacks = fallbackDimensionStyles\n\t\t? mergeStyleObjects( stateStyles, fallbackDimensionStyles )\n\t\t: stateStyles;\n\tconst css = compileCSS( stylesWithDimensionFallbacks, { selector } );\n\tconst importantCSS = css ? css.replace( /;/g, ' !important;' ) : undefined;\n\tconst fallbackBorderStyles = getStateFallbackBorderStyles( stateStyles );\n\tconst fallbackCSS = fallbackBorderStyles\n\t\t? compileCSS( fallbackBorderStyles, { selector } )\n\t\t: undefined;\n\tconst textAlignCSS = getStateTextAlignCSS( stateStyles, selector );\n\tconst backgroundResetCSS = getStateBackgroundResetCSS(\n\t\tstateStyles,\n\t\tselector\n\t);\n\n\treturn [ importantCSS, textAlignCSS, fallbackCSS, backgroundResetCSS ]\n\t\t.filter( Boolean )\n\t\t.join( '\\n' );\n}\n\nfunction isPlainObject( value ) {\n\treturn !! value && typeof value === 'object' && ! Array.isArray( value );\n}\n\nfunction mergeStyleObjects( target = {}, source = {} ) {\n\tconst merged = { ...target };\n\n\tObject.entries( source ).forEach( ( [ key, value ] ) => {\n\t\tmerged[ key ] =\n\t\t\tisPlainObject( value ) && isPlainObject( merged[ key ] )\n\t\t\t\t? mergeStyleObjects( merged[ key ], value )\n\t\t\t\t: value;\n\t} );\n\n\treturn merged;\n}\n\nfunction addStyleGroup( groups, selector, style ) {\n\tconst key = selector || '';\n\tconst existing = groups.get( key ) || { selector, style: {} };\n\n\tgroups.set( key, {\n\t\tselector,\n\t\tstyle: mergeStyleObjects( existing.style, style ),\n\t} );\n}\n\nfunction getStateStyleGroups( stateStyles, name ) {\n\tconst blockSelectors = getBlockType( name )?.selectors || {};\n\tconst groups = new Map();\n\n\tObject.entries( stateStyles || {} ).forEach(\n\t\t( [ feature, featureStyles ] ) => {\n\t\t\tconst featureSelectors = blockSelectors[ feature ];\n\n\t\t\tif ( typeof featureSelectors === 'string' ) {\n\t\t\t\taddStyleGroup( groups, featureSelectors, {\n\t\t\t\t\t[ feature ]: featureStyles,\n\t\t\t\t} );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tisPlainObject( featureSelectors ) &&\n\t\t\t\tisPlainObject( featureStyles )\n\t\t\t) {\n\t\t\t\tconst remainingStyles = { ...featureStyles };\n\n\t\t\t\tObject.entries( featureSelectors ).forEach(\n\t\t\t\t\t( [ subfeature, subfeatureSelector ] ) => {\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tsubfeature === 'root' ||\n\t\t\t\t\t\t\ttypeof subfeatureSelector !== 'string' ||\n\t\t\t\t\t\t\t! Object.hasOwn( featureStyles, subfeature )\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\taddStyleGroup( groups, subfeatureSelector, {\n\t\t\t\t\t\t\t[ feature ]: {\n\t\t\t\t\t\t\t\t[ subfeature ]: featureStyles[ subfeature ],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tdelete remainingStyles[ subfeature ];\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\tif ( Object.keys( remainingStyles ).length ) {\n\t\t\t\t\taddStyleGroup(\n\t\t\t\t\t\tgroups,\n\t\t\t\t\t\tfeatureSelectors.root || blockSelectors.root,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t[ feature ]: remainingStyles,\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\taddStyleGroup( groups, blockSelectors.root, {\n\t\t\t\t[ feature ]: featureStyles,\n\t\t\t} );\n\t\t}\n\t);\n\n\treturn Array.from( groups.values() );\n}\n\n/**\n * Generates CSS for block instance state styles, honoring feature selectors.\n *\n * @param {Object} stateStyles State style object.\n * @param {Object} options Generation options.\n * @param {string} options.name Block name.\n * @param {string} options.baseSelector Block-instance scoping selector.\n * @param {string=} options.state Optional pseudo-state, e.g. \":hover\".\n * @return {string|undefined} Generated stylesheet.\n */\nexport function getBlockStateStylesCSS( stateStyles, options ) {\n\tconst { name, baseSelector, state = '' } = options;\n\tconst rules = getStateStyleGroups( stateStyles, name )\n\t\t.map( ( { selector: blockSelector, style } ) =>\n\t\t\tgetStateStylesCSS(\n\t\t\t\tstyle,\n\t\t\t\tbuildScopedBlockSelector( baseSelector, blockSelector, state )\n\t\t\t)\n\t\t)\n\t\t.filter( Boolean );\n\n\treturn rules.length ? rules.join( '\\n' ) : undefined;\n}\n\n/**\n * Returns a style object with nested state/element keys removed.\n *\n * Viewport state objects can contain root declarations alongside nested\n * `elements` and pseudo-state styles. Only root declarations should be passed\n * to the style engine for the viewport root selector.\n *\n * @param {Object} stateStyles Style object for a selected state.\n * @param {string[]} nestedKeys Keys to remove from the root style object.\n * @return {Object|undefined} Root-only style object.\n */\nfunction getRootStateStyles( stateStyles, nestedKeys ) {\n\tif ( ! stateStyles ) {\n\t\treturn stateStyles;\n\t}\n\n\tconst rootStyles = { ...stateStyles };\n\tnestedKeys.forEach( ( key ) => {\n\t\tdelete rootStyles[ key ];\n\t} );\n\treturn rootStyles;\n}\n\n/**\n * Generates CSS rules for supported pseudo-state styles.\n *\n * @param {Object} style Block style object containing pseudo-state styles.\n * @param {string} name Block name.\n * @param {string} baseSelector Base selector used to scope generated CSS.\n * @return {string[]} Generated CSS rule strings.\n */\nfunction getPseudoStateCSSRules( style, name, baseSelector ) {\n\tconst validPseudoStates = VALID_BLOCK_PSEUDO_STATES[ name ];\n\tif ( ! validPseudoStates ) {\n\t\treturn [];\n\t}\n\n\tconst cssRules = [];\n\tvalidPseudoStates.forEach( ( pseudoState ) => {\n\t\tconst stateStyles = style?.[ pseudoState ];\n\t\tif ( stateStyles ) {\n\t\t\tconst css = getBlockStateStylesCSS( stateStyles, {\n\t\t\t\tname,\n\t\t\t\tbaseSelector,\n\t\t\t\tstate: pseudoState,\n\t\t\t} );\n\t\t\tif ( css ) {\n\t\t\t\tcssRules.push( css );\n\t\t\t}\n\t\t}\n\t} );\n\treturn cssRules;\n}\n\n/**\n * Generates CSS rules for responsive block instance style states.\n *\n * Each responsive state can contain root styles, element styles, and nested\n * pseudo-state styles. Generated rules are wrapped in the matching breakpoint\n * media query.\n *\n * @param {Object} style Block style object containing responsive states.\n * @param {string} name Block name.\n * @param {string} baseSelector Base selector used to scope generated CSS.\n * @param {Object} viewportSettings Viewport breakpoint settings.\n * @return {string[]} Generated CSS rule strings.\n */\nexport function getResponsiveStateCSSRules(\n\tstyle,\n\tname,\n\tbaseSelector,\n\tviewportSettings\n) {\n\tconst cssRules = [];\n\tconst validPseudoStates = VALID_BLOCK_PSEUDO_STATES[ name ] ?? [];\n\tconst nestedStateKeys = [ 'elements', ...validPseudoStates ];\n\tconst responsiveMediaQueries =\n\t\tgetResponsiveMediaQueries( viewportSettings );\n\n\tObject.entries( responsiveMediaQueries ).forEach(\n\t\t( [ viewport, mediaQuery ] ) => {\n\t\t\tconst viewportStyles = getStyleForState( style, {\n\t\t\t\tviewport,\n\t\t\t\tpseudo: DEFAULT_BLOCK_STYLE_STATE.pseudo,\n\t\t\t} );\n\t\t\tif ( ! viewportStyles ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst viewportCSSRules = [];\n\t\t\tconst rootCSS = getBlockStateStylesCSS(\n\t\t\t\tgetRootStateStyles( viewportStyles, nestedStateKeys ),\n\t\t\t\t{\n\t\t\t\t\tname,\n\t\t\t\t\tbaseSelector,\n\t\t\t\t}\n\t\t\t);\n\t\t\tif ( rootCSS ) {\n\t\t\t\tviewportCSSRules.push( rootCSS );\n\t\t\t}\n\n\t\t\tconst elementCSS = getElementCSSRules(\n\t\t\t\tviewportStyles.elements,\n\t\t\t\tname,\n\t\t\t\tbaseSelector\n\t\t\t);\n\t\t\tif ( elementCSS ) {\n\t\t\t\tviewportCSSRules.push( elementCSS );\n\t\t\t}\n\n\t\t\tviewportCSSRules.push(\n\t\t\t\t...getPseudoStateCSSRules( viewportStyles, name, baseSelector )\n\t\t\t);\n\n\t\t\tif ( viewportCSSRules.length ) {\n\t\t\t\tcssRules.push(\n\t\t\t\t\t`${ mediaQuery }{${ viewportCSSRules.join( '' ) }}`\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t);\n\n\treturn cssRules;\n}\n\n/**\n * Returns the style value used to force-preview a selected state on canvas.\n *\n * Responsive pseudo states inherit from their default-viewport pseudo state.\n * For example, selecting `@mobile + :hover` should preview styles from\n * `:hover`, with `@mobile.:hover` values layered on top when present.\n *\n * @param {Object} style Block style object.\n * @param {Object} selectedState Selected block style state.\n * @return {Object|undefined} Style value for the canvas preview.\n */\nexport function getCanvasStateStyleValue( style, selectedState ) {\n\tconst stateValue = getStyleForState( style, selectedState );\n\tif ( ! hasViewportBlockStyleState( selectedState ) ) {\n\t\treturn stateValue;\n\t}\n\n\tconst defaultViewportState = {\n\t\t...selectedState,\n\t\tviewport: DEFAULT_BLOCK_STYLE_STATE.viewport,\n\t};\n\tconst defaultViewportStateValue = getStyleForState(\n\t\tstyle,\n\t\tdefaultViewportState\n\t);\n\n\tif ( defaultViewportStateValue && stateValue ) {\n\t\treturn mergeGlobalStyles( defaultViewportStateValue, stateValue );\n\t}\n\treturn stateValue || defaultViewportStateValue;\n}\n\n/**\n * Filters registered block settings, extending attributes to include `style` attribute.\n *\n * @param {Object} settings Original block settings.\n *\n * @return {Object} Filtered block settings.\n */\nfunction addAttribute( settings ) {\n\tif (\n\t\t! hasStyleSupport( settings ) &&\n\t\t! hasBlockSupport( settings, 'customCSS', true )\n\t) {\n\t\treturn settings;\n\t}\n\n\t// Allow blocks to specify their own attribute definition with default values if needed.\n\tif ( ! settings.attributes.style ) {\n\t\tObject.assign( settings.attributes, {\n\t\t\tstyle: {\n\t\t\t\ttype: 'object',\n\t\t\t},\n\t\t} );\n\t}\n\n\treturn settings;\n}\n\n/**\n * A dictionary of paths to flag skipping block support serialization as the key,\n * with values providing the style paths to be omitted from serialization.\n *\n * @constant\n * @type {Record<string, string[]>}\n */\nconst skipSerializationPathsEdit = {\n\t[ `${ BORDER_SUPPORT_KEY }.__experimentalSkipSerialization` ]: [ 'border' ],\n\t[ `${ COLOR_SUPPORT_KEY }.__experimentalSkipSerialization` ]: [\n\t\tCOLOR_SUPPORT_KEY,\n\t],\n\t[ `${ TYPOGRAPHY_SUPPORT_KEY }.__experimentalSkipSerialization` ]: [\n\t\tTYPOGRAPHY_SUPPORT_KEY,\n\t],\n\t[ `${ DIMENSIONS_SUPPORT_KEY }.__experimentalSkipSerialization` ]: [\n\t\tDIMENSIONS_SUPPORT_KEY,\n\t],\n\t[ `${ SPACING_SUPPORT_KEY }.__experimentalSkipSerialization` ]: [\n\t\tSPACING_SUPPORT_KEY,\n\t],\n\t[ `${ SHADOW_SUPPORT_KEY }.__experimentalSkipSerialization` ]: [\n\t\tSHADOW_SUPPORT_KEY,\n\t],\n};\n\n/**\n * A dictionary of paths to flag skipping block support serialization as the key,\n * with values providing the style paths to be omitted from serialization.\n *\n * Extends the Edit skip paths to enable skipping additional paths in just\n * the Save component. This allows a block support to be serialized within the\n * editor, while using an alternate approach, such as server-side rendering, when\n * the support is saved.\n *\n * @constant\n * @type {Record<string, string[]>}\n */\nconst skipSerializationPathsSave = {\n\t...skipSerializationPathsEdit,\n\t[ `${ DIMENSIONS_SUPPORT_KEY }.aspectRatio` ]: [\n\t\t`${ DIMENSIONS_SUPPORT_KEY }.aspectRatio`,\n\t], // Skip serialization of aspect ratio in save mode.\n\t[ `${ BACKGROUND_SUPPORT_KEY }` ]: [ BACKGROUND_SUPPORT_KEY ], // Skip serialization of background support in save mode.\n};\n\nconst skipSerializationPathsSaveChecks = {\n\t[ `${ DIMENSIONS_SUPPORT_KEY }.aspectRatio` ]: true,\n\t[ `${ BACKGROUND_SUPPORT_KEY }` ]: true,\n};\n\n/**\n * A dictionary used to normalize feature names between support flags, style\n * object properties and __experimentSkipSerialization configuration arrays.\n *\n * This allows not having to provide a migration for a support flag and possible\n * backwards compatibility bridges, while still achieving consistency between\n * the support flag and the skip serialization array.\n *\n * @constant\n * @type {Record<string, string>}\n */\nconst renamedFeatures = { gradients: 'gradient' };\n\n/**\n * A utility function used to remove one or more paths from a style object.\n * Works in a way similar to Lodash's `omit()`. See unit tests and examples below.\n *\n * It supports a single string path:\n *\n * ```\n * omitStyle( { color: 'red' }, 'color' ); // {}\n * ```\n *\n * or an array of paths:\n *\n * ```\n * omitStyle( { color: 'red', background: '#fff' }, [ 'color', 'background' ] ); // {}\n * ```\n *\n * It also allows you to specify paths at multiple levels in a string.\n *\n * ```\n * omitStyle( { typography: { textDecoration: 'underline' } }, 'typography.textDecoration' ); // {}\n * ```\n *\n * You can remove multiple paths at the same time:\n *\n * ```\n * omitStyle(\n * \t\t{\n * \t\t\ttypography: {\n * \t\t\t\ttextDecoration: 'underline',\n * \t\t\t\ttextTransform: 'uppercase',\n * \t\t\t}\n *\t\t},\n *\t\t[\n * \t\t\t'typography.textDecoration',\n * \t\t\t'typography.textTransform',\n *\t\t]\n * );\n * // {}\n * ```\n *\n * You can also specify nested paths as arrays:\n *\n * ```\n * omitStyle(\n * \t\t{\n * \t\t\ttypography: {\n * \t\t\t\ttextDecoration: 'underline',\n * \t\t\t\ttextTransform: 'uppercase',\n * \t\t\t}\n *\t\t},\n *\t\t[\n * \t\t\t[ 'typography', 'textDecoration' ],\n * \t\t\t[ 'typography', 'textTransform' ],\n *\t\t]\n * );\n * // {}\n * ```\n *\n * With regards to nesting of styles, infinite depth is supported:\n *\n * ```\n * omitStyle(\n * \t\t{\n * \t\t\tborder: {\n * \t\t\t\tradius: {\n * \t\t\t\t\ttopLeft: '10px',\n * \t\t\t\t\ttopRight: '0.5rem',\n * \t\t\t\t}\n * \t\t\t}\n *\t\t},\n *\t\t[\n * \t\t\t[ 'border', 'radius', 'topRight' ],\n *\t\t]\n * );\n * // { border: { radius: { topLeft: '10px' } } }\n * ```\n *\n * The third argument, `preserveReference`, defines how to treat the input style object.\n * It is mostly necessary to properly handle mutation when recursively handling the style object.\n * Defaulting to `false`, this will always create a new object, avoiding to mutate `style`.\n * However, when recursing, we change that value to `true` in order to work with a single copy\n * of the original style object.\n *\n * @see https://lodash.com/docs/4.17.15#omit\n *\n * @param {Object} style Styles object.\n * @param {Array|string} paths Paths to remove.\n * @param {boolean} preserveReference True to mutate the `style` object, false otherwise.\n * @return {Object} Styles object with the specified paths removed.\n */\nexport function omitStyle( style, paths, preserveReference = false ) {\n\tif ( ! style ) {\n\t\treturn style;\n\t}\n\n\tlet newStyle = style;\n\tif ( ! preserveReference ) {\n\t\tnewStyle = JSON.parse( JSON.stringify( style ) );\n\t}\n\n\tif ( ! Array.isArray( paths ) ) {\n\t\tpaths = [ paths ];\n\t}\n\n\tpaths.forEach( ( path ) => {\n\t\tif ( ! Array.isArray( path ) ) {\n\t\t\tpath = path.split( '.' );\n\t\t}\n\n\t\tif ( path.length > 1 ) {\n\t\t\tconst [ firstSubpath, ...restPath ] = path;\n\t\t\tomitStyle( newStyle[ firstSubpath ], [ restPath ], true );\n\t\t} else if ( path.length === 1 ) {\n\t\t\tdelete newStyle[ path[ 0 ] ];\n\t\t}\n\t} );\n\n\treturn newStyle;\n}\n\n/**\n * Override props assigned to save component to inject the CSS variables definition.\n *\n * @param {Object} props Additional props applied to save element.\n * @param {Object|string} blockNameOrType Block type.\n * @param {Object} attributes Block attributes.\n * @param {?Record<string, string[]>} skipPaths An object of keys and paths to skip serialization.\n *\n * @return {Object} Filtered props applied to save element.\n */\nexport function addSaveProps(\n\tprops,\n\tblockNameOrType,\n\tattributes,\n\tskipPaths = skipSerializationPathsSave\n) {\n\tif ( ! hasStyleSupport( blockNameOrType ) ) {\n\t\treturn props;\n\t}\n\n\tlet { style } = attributes;\n\tObject.entries( skipPaths ).forEach( ( [ indicator, path ] ) => {\n\t\tconst skipSerialization =\n\t\t\tskipSerializationPathsSaveChecks[ indicator ] ||\n\t\t\tgetBlockSupport( blockNameOrType, indicator );\n\n\t\tif ( skipSerialization === true ) {\n\t\t\tstyle = omitStyle( style, path );\n\t\t}\n\n\t\tif ( Array.isArray( skipSerialization ) ) {\n\t\t\tskipSerialization.forEach( ( featureName ) => {\n\t\t\t\tconst feature = renamedFeatures[ featureName ] || featureName;\n\t\t\t\tstyle = omitStyle( style, [ [ ...path, feature ] ] );\n\t\t\t} );\n\t\t}\n\t} );\n\n\tprops.style = {\n\t\t...getInlineStyles( style ),\n\t\t...props.style,\n\t};\n\n\treturn props;\n}\n\nfunction BlockStyleControls( {\n\tclientId,\n\tname,\n\tsetAttributes,\n\tstyle,\n\t__unstableParentLayout,\n} ) {\n\tconst settings = useBlockSettings( name, __unstableParentLayout );\n\tconst blockEditingMode = useBlockEditingMode();\n\tconst { globalBlockStyles, selectedState, showStateOnCanvas } = useSelect(\n\t\t( select ) => {\n\t\t\tconst blockEditorSelect = select( blockEditorStore );\n\t\t\tconst {\n\t\t\t\tgetSelectedBlockStyleState,\n\t\t\t\tisSelectedBlockStyleStateShownOnCanvas,\n\t\t\t} = unlock( blockEditorSelect );\n\t\t\tconst editorSettings = blockEditorSelect.getSettings();\n\t\t\treturn {\n\t\t\t\tglobalBlockStyles:\n\t\t\t\t\teditorSettings?.[ globalStylesDataKey ]?.blocks?.[ name ],\n\t\t\t\tselectedState: getSelectedBlockStyleState( clientId ),\n\t\t\t\tshowStateOnCanvas:\n\t\t\t\t\tisSelectedBlockStyleStateShownOnCanvas( clientId ),\n\t\t\t};\n\t\t},\n\t\t[ clientId, name ]\n\t);\n\tconst isPseudoSelectorState = hasPseudoBlockStyleState( selectedState );\n\n\t// Inject state styles onto the editor canvas so the selected state is\n\t// visible while editing. Scoped to this block instance via data-block so\n\t// other blocks of the same type are not affected. Must be called before\n\t// any early returns because it is a hook.\n\tconst canvasStateCSS = useMemo( () => {\n\t\tif ( ! showStateOnCanvas || ! isPseudoSelectorState ) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst globalStateValue = getCanvasStateStyleValue(\n\t\t\tglobalBlockStyles,\n\t\t\tselectedState\n\t\t);\n\t\tconst instanceStateValue = getCanvasStateStyleValue(\n\t\t\tstyle,\n\t\t\tselectedState\n\t\t);\n\t\tlet stateValue;\n\n\t\tif ( globalStateValue && instanceStateValue ) {\n\t\t\tstateValue = mergeGlobalStyles(\n\t\t\t\tglobalStateValue,\n\t\t\t\tinstanceStateValue\n\t\t\t);\n\t\t} else if ( instanceStateValue ) {\n\t\t\tstateValue = instanceStateValue;\n\t\t} else if ( globalStateValue ) {\n\t\t\tstateValue = globalStateValue;\n\t\t} else {\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn getBlockStateStylesCSS( stateValue, {\n\t\t\tname,\n\t\t\tbaseSelector: `[data-block=\"${ clientId }\"]`,\n\t\t} );\n\t}, [\n\t\tshowStateOnCanvas,\n\t\tisPseudoSelectorState,\n\t\tglobalBlockStyles,\n\t\tstyle,\n\t\tselectedState,\n\t\tclientId,\n\t\tname,\n\t] );\n\tuseStyleOverride( { css: canvasStateCSS } );\n\n\tif ( blockEditingMode !== 'default' ) {\n\t\treturn null;\n\t}\n\n\tconst panelSettings = {\n\t\t...settings,\n\t\ttypography: {\n\t\t\t...settings.typography,\n\t\t\t// The text alignment UI for individual blocks is rendered in\n\t\t\t// the block toolbar, so disable it here.\n\t\t\ttextAlign: false,\n\t\t},\n\t};\n\n\tconst passedProps = {\n\t\tclientId,\n\t\tname,\n\t\tsetAttributes,\n\t\tsettings: panelSettings,\n\t};\n\n\treturn (\n\t\t<BlockStyleStateProvider value={ selectedState }>\n\t\t\t<ElementsEdit { ...passedProps } />\n\t\t\t<BackgroundImagePanel { ...passedProps } />\n\t\t\t<TypographyPanel { ...passedProps } />\n\t\t\t<BorderPanel { ...passedProps } />\n\t\t\t<DimensionsPanel { ...passedProps } />\n\t\t</BlockStyleStateProvider>\n\t);\n}\n\nexport default {\n\tedit: BlockStyleControls,\n\thasSupport: hasStyleSupport,\n\taddSaveProps,\n\tattributeKeys: [ 'style' ],\n\tuseBlockProps,\n};\n\n// Defines which element types are supported, including their hover styles or\n// any other elements that have been included under a single element type\n// e.g. heading and h1-h6.\nconst elementTypes = [\n\t{ elementType: 'button' },\n\t{ elementType: 'link', pseudo: [ ':hover' ] },\n\t{\n\t\telementType: 'heading',\n\t\telements: [ 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' ],\n\t},\n];\n\n// Used for generating the instance ID\nconst STYLE_BLOCK_PROPS_REFERENCE = {};\n\n/**\n * Generates CSS rules for block element styles (buttons, links, headings, etc.).\n *\n * Iterates over supported element types and compiles their styles, including\n * pseudo-selectors (e.g. :hover) and related sub-elements (e.g. h1-h6 for headings),\n * into scoped CSS rule strings.\n *\n * @param {Object} blockElementStyles The block's `style.elements` object.\n * @param {string} blockName The block name, used for skip-serialization checks.\n * @param {string} baseSelector The base CSS selector to scope rules under.\n * @return {string|undefined} Concatenated CSS rules string, or undefined if none.\n */\nfunction getElementCSSRules( blockElementStyles, blockName, baseSelector ) {\n\tif ( ! blockElementStyles ) {\n\t\treturn;\n\t}\n\n\tconst rules = [];\n\n\telementTypes.forEach( ( { elementType, pseudo, elements } ) => {\n\t\tconst skipSerialization = shouldSkipSerialization(\n\t\t\tblockName,\n\t\t\tCOLOR_SUPPORT_KEY,\n\t\t\telementType\n\t\t);\n\n\t\tif ( skipSerialization ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst elementStyles = blockElementStyles?.[ elementType ];\n\n\t\t// Process primary element type styles.\n\t\tif ( elementStyles ) {\n\t\t\tconst selector = scopeSelector(\n\t\t\t\tbaseSelector,\n\t\t\t\tELEMENTS[ elementType ]\n\t\t\t);\n\n\t\t\trules.push( compileCSS( elementStyles, { selector } ) );\n\n\t\t\t// Process any interactive states for the element type.\n\t\t\tif ( pseudo ) {\n\t\t\t\tpseudo.forEach( ( pseudoSelector ) => {\n\t\t\t\t\tif ( elementStyles[ pseudoSelector ] ) {\n\t\t\t\t\t\trules.push(\n\t\t\t\t\t\t\tcompileCSS( elementStyles[ pseudoSelector ], {\n\t\t\t\t\t\t\t\tselector: scopeSelector(\n\t\t\t\t\t\t\t\t\tbaseSelector,\n\t\t\t\t\t\t\t\t\t`${ ELEMENTS[ elementType ] }${ pseudoSelector }`\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\n\t\t// Process related elements e.g. h1-h6 for headings\n\t\tif ( elements ) {\n\t\t\telements.forEach( ( element ) => {\n\t\t\t\tif ( blockElementStyles[ element ] ) {\n\t\t\t\t\trules.push(\n\t\t\t\t\t\tcompileCSS( blockElementStyles[ element ], {\n\t\t\t\t\t\t\tselector: scopeSelector(\n\t\t\t\t\t\t\t\tbaseSelector,\n\t\t\t\t\t\t\t\tELEMENTS[ element ]\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t} )\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t} );\n\n\treturn rules.length > 0 ? rules.join( '' ) : undefined;\n}\n\nfunction useBlockProps( { name, style } ) {\n\tconst blockElementsContainerIdentifier = useInstanceId(\n\t\tSTYLE_BLOCK_PROPS_REFERENCE,\n\t\t'wp-elements'\n\t);\n\n\tconst baseElementSelector = `.${ blockElementsContainerIdentifier }`;\n\tconst blockElementStyles = style?.elements;\n\tconst [ viewportSettings ] = useSettings( 'viewport' );\n\n\tconst styles = useMemo( () => {\n\t\tconst cssRules = [];\n\n\t\tconst elementCSS = getElementCSSRules(\n\t\t\tblockElementStyles,\n\t\t\tname,\n\t\t\tbaseElementSelector\n\t\t);\n\t\tif ( elementCSS ) {\n\t\t\tcssRules.push( elementCSS );\n\t\t}\n\n\t\tcssRules.push(\n\t\t\t...getPseudoStateCSSRules( style, name, baseElementSelector )\n\t\t);\n\n\t\tcssRules.push(\n\t\t\t...getResponsiveStateCSSRules(\n\t\t\t\tstyle,\n\t\t\t\tname,\n\t\t\t\tbaseElementSelector,\n\t\t\t\tviewportSettings\n\t\t\t)\n\t\t);\n\n\t\treturn cssRules.length > 0 ? cssRules.join( '' ) : undefined;\n\t}, [\n\t\tbaseElementSelector,\n\t\tblockElementStyles,\n\t\tname,\n\t\tstyle,\n\t\tviewportSettings,\n\t] );\n\n\tuseStyleOverride( { css: styles } );\n\n\treturn addSaveProps(\n\t\t{ className: blockElementsContainerIdentifier },\n\t\tname,\n\t\t{ style },\n\t\tskipSerializationPathsEdit\n\t);\n}\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/style/addAttribute',\n\taddAttribute\n);\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;A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EAAE,MAAM;AAAA,IACR;AAAA,EACD;AACD;AAAA,IAEA;AAAA,EACC;AAAA,EACA;AAAA,EACA;AACD;",
|
|
3
|
+
"sources": ["../../src/hooks/style.jsx"],
|
|
4
|
+
"sourcesContent": ["import { useMemo } from '@wordpress/element';\nimport { addFilter } from '@wordpress/hooks';\nimport { useSelect } from '@wordpress/data';\nimport {\n\tmergeGlobalStyles,\n\tprivateApis as globalStylesEnginePrivateApis,\n} from '@wordpress/global-styles-engine';\nimport {\n\tgetBlockSupport,\n\tgetBlockType,\n\thasBlockSupport,\n\t__EXPERIMENTAL_ELEMENTS as ELEMENTS,\n} from '@wordpress/blocks';\nimport { useInstanceId } from '@wordpress/compose';\nimport {\n\tgetCSSRules,\n\tcompileCSS,\n\tgetCSSValueFromRawStyle,\n} from '@wordpress/style-engine';\nimport { BACKGROUND_SUPPORT_KEY, BackgroundImagePanel } from './background';\nimport { BORDER_SUPPORT_KEY, BorderPanel, SHADOW_SUPPORT_KEY } from './border';\nimport { COLOR_SUPPORT_KEY } from './color';\nimport { ElementsEdit } from './elements';\nimport {\n\tTypographyPanel,\n\tTYPOGRAPHY_SUPPORT_KEY,\n\tTYPOGRAPHY_SUPPORT_KEYS,\n} from './typography';\nimport {\n\tDIMENSIONS_SUPPORT_KEY,\n\tSPACING_SUPPORT_KEY,\n\tDimensionsPanel,\n\tisExplicitAspectRatio,\n} from './dimensions';\nimport {\n\tcleanEmptyObject,\n\tshouldSkipSerialization,\n\tuseStyleOverride,\n\tusePrivateStyleOverride,\n\tuseBlockSettings,\n} from './utils';\nimport {\n\tBlockStyleStateProvider,\n\tDEFAULT_BLOCK_STYLE_STATE,\n\tgetStyleForState,\n\thasViewportBlockStyleState,\n\thasPseudoBlockStyleState,\n} from './block-style-state';\nimport { VALID_BLOCK_PSEUDO_STATES } from './states';\nimport { buildScopedBlockSelector } from './state-utils';\nimport { scopeSelector } from '../components/global-styles/utils';\nimport { useBlockEditingMode } from '../components/block-editing-mode';\nimport { useSettings } from '../components/use-settings';\nimport { store as blockEditorStore } from '../store';\nimport { globalStylesDataKey } from '../store/private-keys';\nimport { unlock } from '../lock-unlock';\n\nconst { getResponsiveMediaQueries } = unlock( globalStylesEnginePrivateApis );\n\nconst BORDER_SIDES = [ 'Top', 'Right', 'Bottom', 'Left' ];\n\nconst styleSupportKeys = [\n\t...TYPOGRAPHY_SUPPORT_KEYS,\n\tBORDER_SUPPORT_KEY,\n\tCOLOR_SUPPORT_KEY,\n\tDIMENSIONS_SUPPORT_KEY,\n\tBACKGROUND_SUPPORT_KEY,\n\tSPACING_SUPPORT_KEY,\n\tSHADOW_SUPPORT_KEY,\n];\n\nconst hasStyleSupport = ( nameOrType ) =>\n\tstyleSupportKeys.some( ( key ) => hasBlockSupport( nameOrType, key ) );\n\n/**\n * Returns the inline styles to add depending on the style object\n *\n * @param {Object} styles Styles configuration.\n *\n * @return {Object} Flattened CSS variables declaration.\n */\nexport function getInlineStyles( styles = {} ) {\n\tconst output = {};\n\t// The goal is to move everything to server side generated engine styles\n\t// This is temporary as we absorb more and more styles into the engine.\n\tgetCSSRules( styles ).forEach( ( rule ) => {\n\t\toutput[ rule.key ] = rule.value;\n\t} );\n\n\treturn output;\n}\n\n/**\n * Returns fallback border styles for visible state border styles.\n *\n * State styles are emitted as stylesheet rules rather than inline styles, so\n * they cannot rely on the block-library inline-style attribute fallback rules.\n *\n * @param {Object} stateStyles State style object.\n * @return {Object|undefined} Style object containing fallback border styles.\n */\nfunction getStateFallbackBorderStyles( stateStyles ) {\n\tconst border = stateStyles?.border;\n\tif ( ! border ) {\n\t\treturn undefined;\n\t}\n\n\tconst hasBorderStyle = !! border.style;\n\tconst hasBorderColor = !! border.color;\n\tconst hasBorderWidth = !! border.width;\n\tconst fallbackBorder = {};\n\n\tif ( ! hasBorderStyle && ( hasBorderColor || hasBorderWidth ) ) {\n\t\tfallbackBorder.style = 'solid';\n\t}\n\n\tBORDER_SIDES.forEach( ( side ) => {\n\t\tconst sideKey = side.toLowerCase();\n\t\tconst sideBorder = border[ sideKey ];\n\t\tconst hasSideStyle = !! sideBorder?.style;\n\t\tconst hasSideColor = !! sideBorder?.color;\n\t\tconst hasSideWidth = !! sideBorder?.width;\n\n\t\tif (\n\t\t\t! hasBorderStyle &&\n\t\t\t! hasSideStyle &&\n\t\t\t( hasSideColor || hasSideWidth )\n\t\t) {\n\t\t\tfallbackBorder[ sideKey ] = { style: 'solid' };\n\t\t}\n\t} );\n\n\treturn cleanEmptyObject( { border: cleanEmptyObject( fallbackBorder ) } );\n}\n\n/**\n * Returns background reset CSS for a state that sets a solid background color.\n *\n * When a state sets `color.background` (a solid color) without also setting a\n * gradient (`color.gradient` or `background.gradient`), any gradient applied to\n * the default state via an inline `background` shorthand or `background-image`\n * declaration must be explicitly cleared. Without this, the gradient image layer\n * remains visible even though the solid hover color wins `background-color`.\n *\n * @param {Object} stateStyles State style object.\n * @param {string} selector CSS selector for the generated style.\n * @return {string|undefined} CSS string with background-image reset, or undefined.\n */\nfunction getStateBackgroundResetCSS( stateStyles, selector ) {\n\tconst hasSolidBackground = !! stateStyles?.color?.background;\n\n\tif ( ! hasSolidBackground ) {\n\t\treturn undefined;\n\t}\n\n\tconst hasColorGradient = !! stateStyles?.color?.gradient;\n\tconst hasBackgroundGradient =\n\t\t!! stateStyles?.background?.gradient ||\n\t\t!! stateStyles?.background?.backgroundImage;\n\n\tif ( hasColorGradient || hasBackgroundGradient ) {\n\t\treturn undefined;\n\t}\n\n\tconst declaration = 'background-image: unset !important';\n\treturn selector\n\t\t? `${ selector } { ${ declaration }; }`\n\t\t: `${ declaration };`;\n}\n\n/**\n * Returns fallback dimension styles that keep state styles aligned with the\n * default dimensions block-support output.\n *\n * @param {Object} stateStyles State style object.\n * @return {Object|undefined} Style object containing fallback dimension styles.\n */\nfunction getStateFallbackDimensionStyles( stateStyles ) {\n\tconst dimensions = stateStyles?.dimensions;\n\tif ( ! dimensions ) {\n\t\treturn undefined;\n\t}\n\n\tif ( isExplicitAspectRatio( dimensions.aspectRatio ) ) {\n\t\treturn {\n\t\t\tdimensions: {\n\t\t\t\tminHeight: 'unset',\n\t\t\t\theight: 'unset',\n\t\t\t},\n\t\t};\n\t}\n\n\tif ( dimensions.minHeight || dimensions.height ) {\n\t\treturn {\n\t\t\tdimensions: {\n\t\t\t\taspectRatio: 'unset',\n\t\t\t},\n\t\t};\n\t}\n}\n\n/**\n * Returns CSS for text alignment in a block instance state style object.\n *\n * Text alignment is not generated by the style engine because base block\n * alignment is serialized as a class name. State styles need a declaration\n * instead so viewport and pseudo-state values can override the default class.\n *\n * @param {Object} stateStyles State style object.\n * @param {string} selector CSS selector for the generated style.\n * @return {string|undefined} CSS string with the text alignment declaration.\n */\nfunction getStateTextAlignCSS( stateStyles, selector ) {\n\tconst textAlign = stateStyles?.typography?.textAlign;\n\n\tif ( typeof textAlign !== 'string' || ! textAlign ) {\n\t\treturn undefined;\n\t}\n\n\tconst declaration = `text-align: ${ getCSSValueFromRawStyle(\n\t\ttextAlign\n\t) } !important`;\n\treturn selector\n\t\t? `${ selector } { ${ declaration }; }`\n\t\t: `${ declaration };`;\n}\n\n/**\n * Generates CSS for a block instance state style object.\n *\n * State declarations need to win over preset utility classes, but fallback\n * border styles should not become important because they must not override\n * explicitly authored default border styles.\n *\n * @param {Object} stateStyles State style object.\n * @param {string} selector CSS selector for the generated style.\n * @return {string} Generated stylesheet.\n */\nexport function getStateStylesCSS( stateStyles, selector ) {\n\tconst fallbackDimensionStyles =\n\t\tgetStateFallbackDimensionStyles( stateStyles );\n\tconst stylesWithDimensionFallbacks = fallbackDimensionStyles\n\t\t? mergeStyleObjects( stateStyles, fallbackDimensionStyles )\n\t\t: stateStyles;\n\tconst css = compileCSS( stylesWithDimensionFallbacks, { selector } );\n\tconst importantCSS = css ? css.replace( /;/g, ' !important;' ) : undefined;\n\tconst fallbackBorderStyles = getStateFallbackBorderStyles( stateStyles );\n\tconst fallbackCSS = fallbackBorderStyles\n\t\t? compileCSS( fallbackBorderStyles, { selector } )\n\t\t: undefined;\n\tconst textAlignCSS = getStateTextAlignCSS( stateStyles, selector );\n\tconst backgroundResetCSS = getStateBackgroundResetCSS(\n\t\tstateStyles,\n\t\tselector\n\t);\n\n\treturn [ importantCSS, textAlignCSS, fallbackCSS, backgroundResetCSS ]\n\t\t.filter( Boolean )\n\t\t.join( '\\n' );\n}\n\nfunction isPlainObject( value ) {\n\treturn !! value && typeof value === 'object' && ! Array.isArray( value );\n}\n\nfunction mergeStyleObjects( target = {}, source = {} ) {\n\tconst merged = { ...target };\n\n\tObject.entries( source ).forEach( ( [ key, value ] ) => {\n\t\tmerged[ key ] =\n\t\t\tisPlainObject( value ) && isPlainObject( merged[ key ] )\n\t\t\t\t? mergeStyleObjects( merged[ key ], value )\n\t\t\t\t: value;\n\t} );\n\n\treturn merged;\n}\n\nfunction addStyleGroup( groups, selector, style ) {\n\tconst key = selector || '';\n\tconst existing = groups.get( key ) || { selector, style: {} };\n\n\tgroups.set( key, {\n\t\tselector,\n\t\tstyle: mergeStyleObjects( existing.style, style ),\n\t} );\n}\n\nfunction getStateStyleGroups( stateStyles, name ) {\n\tconst blockSelectors = getBlockType( name )?.selectors || {};\n\tconst groups = new Map();\n\n\tObject.entries( stateStyles || {} ).forEach(\n\t\t( [ feature, featureStyles ] ) => {\n\t\t\tconst featureSelectors = blockSelectors[ feature ];\n\n\t\t\tif ( typeof featureSelectors === 'string' ) {\n\t\t\t\taddStyleGroup( groups, featureSelectors, {\n\t\t\t\t\t[ feature ]: featureStyles,\n\t\t\t\t} );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tisPlainObject( featureSelectors ) &&\n\t\t\t\tisPlainObject( featureStyles )\n\t\t\t) {\n\t\t\t\tconst remainingStyles = { ...featureStyles };\n\n\t\t\t\tObject.entries( featureSelectors ).forEach(\n\t\t\t\t\t( [ subfeature, subfeatureSelector ] ) => {\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tsubfeature === 'root' ||\n\t\t\t\t\t\t\ttypeof subfeatureSelector !== 'string' ||\n\t\t\t\t\t\t\t! Object.hasOwn( featureStyles, subfeature )\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\taddStyleGroup( groups, subfeatureSelector, {\n\t\t\t\t\t\t\t[ feature ]: {\n\t\t\t\t\t\t\t\t[ subfeature ]: featureStyles[ subfeature ],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tdelete remainingStyles[ subfeature ];\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\tif ( Object.keys( remainingStyles ).length ) {\n\t\t\t\t\taddStyleGroup(\n\t\t\t\t\t\tgroups,\n\t\t\t\t\t\tfeatureSelectors.root || blockSelectors.root,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t[ feature ]: remainingStyles,\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\taddStyleGroup( groups, blockSelectors.root, {\n\t\t\t\t[ feature ]: featureStyles,\n\t\t\t} );\n\t\t}\n\t);\n\n\treturn Array.from( groups.values() );\n}\n\n/**\n * Generates CSS for block instance state styles, honoring feature selectors.\n *\n * @param {Object} stateStyles State style object.\n * @param {Object} options Generation options.\n * @param {string} options.name Block name.\n * @param {string} options.baseSelector Block-instance scoping selector.\n * @param {string=} options.state Optional pseudo-state, e.g. \":hover\".\n * @return {string|undefined} Generated stylesheet.\n */\nexport function getBlockStateStylesCSS( stateStyles, options ) {\n\tconst { name, baseSelector, state = '' } = options;\n\tconst rules = getStateStyleGroups( stateStyles, name )\n\t\t.map( ( { selector: blockSelector, style } ) =>\n\t\t\tgetStateStylesCSS(\n\t\t\t\tstyle,\n\t\t\t\tbuildScopedBlockSelector( baseSelector, blockSelector, state )\n\t\t\t)\n\t\t)\n\t\t.filter( Boolean );\n\n\treturn rules.length ? rules.join( '\\n' ) : undefined;\n}\n\n/**\n * Returns a style object with nested state/element keys removed.\n *\n * Viewport state objects can contain root declarations alongside nested\n * `elements` and pseudo-state styles. Only root declarations should be passed\n * to the style engine for the viewport root selector.\n *\n * @param {Object} stateStyles Style object for a selected state.\n * @param {string[]} nestedKeys Keys to remove from the root style object.\n * @return {Object|undefined} Root-only style object.\n */\nfunction getRootStateStyles( stateStyles, nestedKeys ) {\n\tif ( ! stateStyles ) {\n\t\treturn stateStyles;\n\t}\n\n\tconst rootStyles = { ...stateStyles };\n\tnestedKeys.forEach( ( key ) => {\n\t\tdelete rootStyles[ key ];\n\t} );\n\treturn rootStyles;\n}\n\n/**\n * Generates CSS rules for supported pseudo-state styles.\n *\n * @param {Object} style Block style object containing pseudo-state styles.\n * @param {string} name Block name.\n * @param {string} baseSelector Base selector used to scope generated CSS.\n * @return {string[]} Generated CSS rule strings.\n */\nfunction getPseudoStateCSSRules( style, name, baseSelector ) {\n\tconst validPseudoStates = VALID_BLOCK_PSEUDO_STATES[ name ];\n\tif ( ! validPseudoStates ) {\n\t\treturn [];\n\t}\n\n\tconst cssRules = [];\n\tvalidPseudoStates.forEach( ( pseudoState ) => {\n\t\tconst stateStyles = style?.[ pseudoState ];\n\t\tif ( stateStyles ) {\n\t\t\tconst css = getBlockStateStylesCSS( stateStyles, {\n\t\t\t\tname,\n\t\t\t\tbaseSelector,\n\t\t\t\tstate: pseudoState,\n\t\t\t} );\n\t\t\tif ( css ) {\n\t\t\t\tcssRules.push( css );\n\t\t\t}\n\t\t}\n\t} );\n\treturn cssRules;\n}\n\n/**\n * Generates CSS rules for responsive block instance style states.\n *\n * Each responsive state can contain root styles, element styles, and nested\n * pseudo-state styles. Generated rules are wrapped in the matching breakpoint\n * media query.\n *\n * @param {Object} style Block style object containing responsive states.\n * @param {string} name Block name.\n * @param {string} baseSelector Base selector used to scope generated CSS.\n * @param {Object} viewportSettings Viewport breakpoint settings.\n * @return {string[]} Generated CSS rule strings.\n */\nexport function getResponsiveStateCSSRules(\n\tstyle,\n\tname,\n\tbaseSelector,\n\tviewportSettings\n) {\n\tconst cssRules = [];\n\tconst validPseudoStates = VALID_BLOCK_PSEUDO_STATES[ name ] ?? [];\n\tconst nestedStateKeys = [ 'elements', ...validPseudoStates ];\n\tconst responsiveMediaQueries =\n\t\tgetResponsiveMediaQueries( viewportSettings );\n\n\tObject.entries( responsiveMediaQueries ).forEach(\n\t\t( [ viewport, mediaQuery ] ) => {\n\t\t\tconst viewportStyles = getStyleForState( style, {\n\t\t\t\tviewport,\n\t\t\t\tpseudo: DEFAULT_BLOCK_STYLE_STATE.pseudo,\n\t\t\t} );\n\t\t\tif ( ! viewportStyles ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst viewportCSSRules = [];\n\t\t\tconst rootCSS = getBlockStateStylesCSS(\n\t\t\t\tgetRootStateStyles( viewportStyles, nestedStateKeys ),\n\t\t\t\t{\n\t\t\t\t\tname,\n\t\t\t\t\tbaseSelector,\n\t\t\t\t}\n\t\t\t);\n\t\t\tif ( rootCSS ) {\n\t\t\t\tviewportCSSRules.push( rootCSS );\n\t\t\t}\n\n\t\t\tconst elementCSS = getElementCSSRules(\n\t\t\t\tviewportStyles.elements,\n\t\t\t\tname,\n\t\t\t\tbaseSelector\n\t\t\t);\n\t\t\tif ( elementCSS ) {\n\t\t\t\tviewportCSSRules.push( elementCSS );\n\t\t\t}\n\n\t\t\tviewportCSSRules.push(\n\t\t\t\t...getPseudoStateCSSRules( viewportStyles, name, baseSelector )\n\t\t\t);\n\n\t\t\tif ( viewportCSSRules.length ) {\n\t\t\t\tcssRules.push(\n\t\t\t\t\t`${ mediaQuery }{${ viewportCSSRules.join( '' ) }}`\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t);\n\n\treturn cssRules;\n}\n\n/**\n * Returns the style value used to force-preview a selected state on canvas.\n *\n * Responsive pseudo states inherit from their default-viewport pseudo state.\n * For example, selecting `@mobile + :hover` should preview styles from\n * `:hover`, with `@mobile.:hover` values layered on top when present.\n *\n * @param {Object} style Block style object.\n * @param {Object} selectedState Selected block style state.\n * @return {Object|undefined} Style value for the canvas preview.\n */\nexport function getCanvasStateStyleValue( style, selectedState ) {\n\tconst stateValue = getStyleForState( style, selectedState );\n\tif ( ! hasViewportBlockStyleState( selectedState ) ) {\n\t\treturn stateValue;\n\t}\n\n\tconst defaultViewportState = {\n\t\t...selectedState,\n\t\tviewport: DEFAULT_BLOCK_STYLE_STATE.viewport,\n\t};\n\tconst defaultViewportStateValue = getStyleForState(\n\t\tstyle,\n\t\tdefaultViewportState\n\t);\n\n\tif ( defaultViewportStateValue && stateValue ) {\n\t\treturn mergeGlobalStyles( defaultViewportStateValue, stateValue );\n\t}\n\treturn stateValue || defaultViewportStateValue;\n}\n\n/**\n * Filters registered block settings, extending attributes to include `style` attribute.\n *\n * @param {Object} settings Original block settings.\n *\n * @return {Object} Filtered block settings.\n */\nfunction addAttribute( settings ) {\n\tif (\n\t\t! hasStyleSupport( settings ) &&\n\t\t! hasBlockSupport( settings, 'customCSS', true )\n\t) {\n\t\treturn settings;\n\t}\n\n\t// Allow blocks to specify their own attribute definition with default values if needed.\n\tif ( ! settings.attributes.style ) {\n\t\tObject.assign( settings.attributes, {\n\t\t\tstyle: {\n\t\t\t\ttype: 'object',\n\t\t\t},\n\t\t} );\n\t}\n\n\treturn settings;\n}\n\n/**\n * A dictionary of paths to flag skipping block support serialization as the key,\n * with values providing the style paths to be omitted from serialization.\n *\n * @constant\n * @type {Record<string, string[]>}\n */\nconst skipSerializationPathsEdit = {\n\t[ `${ BORDER_SUPPORT_KEY }.__experimentalSkipSerialization` ]: [ 'border' ],\n\t[ `${ COLOR_SUPPORT_KEY }.__experimentalSkipSerialization` ]: [\n\t\tCOLOR_SUPPORT_KEY,\n\t],\n\t[ `${ TYPOGRAPHY_SUPPORT_KEY }.__experimentalSkipSerialization` ]: [\n\t\tTYPOGRAPHY_SUPPORT_KEY,\n\t],\n\t[ `${ DIMENSIONS_SUPPORT_KEY }.__experimentalSkipSerialization` ]: [\n\t\tDIMENSIONS_SUPPORT_KEY,\n\t],\n\t[ `${ SPACING_SUPPORT_KEY }.__experimentalSkipSerialization` ]: [\n\t\tSPACING_SUPPORT_KEY,\n\t],\n\t[ `${ SHADOW_SUPPORT_KEY }.__experimentalSkipSerialization` ]: [\n\t\tSHADOW_SUPPORT_KEY,\n\t],\n};\n\n/**\n * A dictionary of paths to flag skipping block support serialization as the key,\n * with values providing the style paths to be omitted from serialization.\n *\n * Extends the Edit skip paths to enable skipping additional paths in just\n * the Save component. This allows a block support to be serialized within the\n * editor, while using an alternate approach, such as server-side rendering, when\n * the support is saved.\n *\n * @constant\n * @type {Record<string, string[]>}\n */\nconst skipSerializationPathsSave = {\n\t...skipSerializationPathsEdit,\n\t[ `${ DIMENSIONS_SUPPORT_KEY }.aspectRatio` ]: [\n\t\t`${ DIMENSIONS_SUPPORT_KEY }.aspectRatio`,\n\t], // Skip serialization of aspect ratio in save mode.\n\t[ `${ BACKGROUND_SUPPORT_KEY }` ]: [ BACKGROUND_SUPPORT_KEY ], // Skip serialization of background support in save mode.\n};\n\nconst skipSerializationPathsSaveChecks = {\n\t[ `${ DIMENSIONS_SUPPORT_KEY }.aspectRatio` ]: true,\n\t[ `${ BACKGROUND_SUPPORT_KEY }` ]: true,\n};\n\n/**\n * A dictionary used to normalize feature names between support flags, style\n * object properties and __experimentSkipSerialization configuration arrays.\n *\n * This allows not having to provide a migration for a support flag and possible\n * backwards compatibility bridges, while still achieving consistency between\n * the support flag and the skip serialization array.\n *\n * @constant\n * @type {Record<string, string>}\n */\nconst renamedFeatures = { gradients: 'gradient' };\n\n/**\n * A utility function used to remove one or more paths from a style object.\n * Works in a way similar to Lodash's `omit()`. See unit tests and examples below.\n *\n * It supports a single string path:\n *\n * ```\n * omitStyle( { color: 'red' }, 'color' ); // {}\n * ```\n *\n * or an array of paths:\n *\n * ```\n * omitStyle( { color: 'red', background: '#fff' }, [ 'color', 'background' ] ); // {}\n * ```\n *\n * It also allows you to specify paths at multiple levels in a string.\n *\n * ```\n * omitStyle( { typography: { textDecoration: 'underline' } }, 'typography.textDecoration' ); // {}\n * ```\n *\n * You can remove multiple paths at the same time:\n *\n * ```\n * omitStyle(\n * \t\t{\n * \t\t\ttypography: {\n * \t\t\t\ttextDecoration: 'underline',\n * \t\t\t\ttextTransform: 'uppercase',\n * \t\t\t}\n *\t\t},\n *\t\t[\n * \t\t\t'typography.textDecoration',\n * \t\t\t'typography.textTransform',\n *\t\t]\n * );\n * // {}\n * ```\n *\n * You can also specify nested paths as arrays:\n *\n * ```\n * omitStyle(\n * \t\t{\n * \t\t\ttypography: {\n * \t\t\t\ttextDecoration: 'underline',\n * \t\t\t\ttextTransform: 'uppercase',\n * \t\t\t}\n *\t\t},\n *\t\t[\n * \t\t\t[ 'typography', 'textDecoration' ],\n * \t\t\t[ 'typography', 'textTransform' ],\n *\t\t]\n * );\n * // {}\n * ```\n *\n * With regards to nesting of styles, infinite depth is supported:\n *\n * ```\n * omitStyle(\n * \t\t{\n * \t\t\tborder: {\n * \t\t\t\tradius: {\n * \t\t\t\t\ttopLeft: '10px',\n * \t\t\t\t\ttopRight: '0.5rem',\n * \t\t\t\t}\n * \t\t\t}\n *\t\t},\n *\t\t[\n * \t\t\t[ 'border', 'radius', 'topRight' ],\n *\t\t]\n * );\n * // { border: { radius: { topLeft: '10px' } } }\n * ```\n *\n * The third argument, `preserveReference`, defines how to treat the input style object.\n * It is mostly necessary to properly handle mutation when recursively handling the style object.\n * Defaulting to `false`, this will always create a new object, avoiding to mutate `style`.\n * However, when recursing, we change that value to `true` in order to work with a single copy\n * of the original style object.\n *\n * @see https://lodash.com/docs/4.17.15#omit\n *\n * @param {Object} style Styles object.\n * @param {Array|string} paths Paths to remove.\n * @param {boolean} preserveReference True to mutate the `style` object, false otherwise.\n * @return {Object} Styles object with the specified paths removed.\n */\nexport function omitStyle( style, paths, preserveReference = false ) {\n\tif ( ! style ) {\n\t\treturn style;\n\t}\n\n\tlet newStyle = style;\n\tif ( ! preserveReference ) {\n\t\tnewStyle = JSON.parse( JSON.stringify( style ) );\n\t}\n\n\tif ( ! Array.isArray( paths ) ) {\n\t\tpaths = [ paths ];\n\t}\n\n\tpaths.forEach( ( path ) => {\n\t\tif ( ! Array.isArray( path ) ) {\n\t\t\tpath = path.split( '.' );\n\t\t}\n\n\t\tif ( path.length > 1 ) {\n\t\t\tconst [ firstSubpath, ...restPath ] = path;\n\t\t\tomitStyle( newStyle[ firstSubpath ], [ restPath ], true );\n\t\t} else if ( path.length === 1 ) {\n\t\t\tdelete newStyle[ path[ 0 ] ];\n\t\t}\n\t} );\n\n\treturn newStyle;\n}\n\n/**\n * Override props assigned to save component to inject the CSS variables definition.\n *\n * @param {Object} props Additional props applied to save element.\n * @param {Object|string} blockNameOrType Block type.\n * @param {Object} attributes Block attributes.\n * @param {?Record<string, string[]>} skipPaths An object of keys and paths to skip serialization.\n *\n * @return {Object} Filtered props applied to save element.\n */\nexport function addSaveProps(\n\tprops,\n\tblockNameOrType,\n\tattributes,\n\tskipPaths = skipSerializationPathsSave\n) {\n\tif ( ! hasStyleSupport( blockNameOrType ) ) {\n\t\treturn props;\n\t}\n\n\tlet { style } = attributes;\n\tObject.entries( skipPaths ).forEach( ( [ indicator, path ] ) => {\n\t\tconst skipSerialization =\n\t\t\tskipSerializationPathsSaveChecks[ indicator ] ||\n\t\t\tgetBlockSupport( blockNameOrType, indicator );\n\n\t\tif ( skipSerialization === true ) {\n\t\t\tstyle = omitStyle( style, path );\n\t\t}\n\n\t\tif ( Array.isArray( skipSerialization ) ) {\n\t\t\tskipSerialization.forEach( ( featureName ) => {\n\t\t\t\tconst feature = renamedFeatures[ featureName ] || featureName;\n\t\t\t\tstyle = omitStyle( style, [ [ ...path, feature ] ] );\n\t\t\t} );\n\t\t}\n\t} );\n\n\tprops.style = {\n\t\t...getInlineStyles( style ),\n\t\t...props.style,\n\t};\n\n\treturn props;\n}\n\nfunction BlockStyleControls( {\n\tclientId,\n\tname,\n\tsetAttributes,\n\tstyle,\n\t__unstableParentLayout,\n} ) {\n\tconst settings = useBlockSettings( name, __unstableParentLayout );\n\tconst blockEditingMode = useBlockEditingMode();\n\tconst { globalBlockStyles, selectedState, showStateOnCanvas } = useSelect(\n\t\t( select ) => {\n\t\t\tconst blockEditorSelect = select( blockEditorStore );\n\t\t\tconst {\n\t\t\t\tgetSelectedBlockStyleState,\n\t\t\t\tisSelectedBlockStyleStateShownOnCanvas,\n\t\t\t} = unlock( blockEditorSelect );\n\t\t\tconst editorSettings = blockEditorSelect.getSettings();\n\t\t\treturn {\n\t\t\t\tglobalBlockStyles:\n\t\t\t\t\teditorSettings?.[ globalStylesDataKey ]?.blocks?.[ name ],\n\t\t\t\tselectedState: getSelectedBlockStyleState( clientId ),\n\t\t\t\tshowStateOnCanvas:\n\t\t\t\t\tisSelectedBlockStyleStateShownOnCanvas( clientId ),\n\t\t\t};\n\t\t},\n\t\t[ clientId, name ]\n\t);\n\tconst isPseudoSelectorState = hasPseudoBlockStyleState( selectedState );\n\n\t// Inject state styles onto the editor canvas so the selected state is\n\t// visible while editing. Scoped to this block instance via data-block so\n\t// other blocks of the same type are not affected. Must be called before\n\t// any early returns because it is a hook.\n\tconst canvasStateCSS = useMemo( () => {\n\t\tif ( ! showStateOnCanvas || ! isPseudoSelectorState ) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst globalStateValue = getCanvasStateStyleValue(\n\t\t\tglobalBlockStyles,\n\t\t\tselectedState\n\t\t);\n\t\tconst instanceStateValue = getCanvasStateStyleValue(\n\t\t\tstyle,\n\t\t\tselectedState\n\t\t);\n\t\tlet stateValue;\n\n\t\tif ( globalStateValue && instanceStateValue ) {\n\t\t\tstateValue = mergeGlobalStyles(\n\t\t\t\tglobalStateValue,\n\t\t\t\tinstanceStateValue\n\t\t\t);\n\t\t} else if ( instanceStateValue ) {\n\t\t\tstateValue = instanceStateValue;\n\t\t} else if ( globalStateValue ) {\n\t\t\tstateValue = globalStateValue;\n\t\t} else {\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn getBlockStateStylesCSS( stateValue, {\n\t\t\tname,\n\t\t\tbaseSelector: `[data-block=\"${ clientId }\"]`,\n\t\t} );\n\t}, [\n\t\tshowStateOnCanvas,\n\t\tisPseudoSelectorState,\n\t\tglobalBlockStyles,\n\t\tstyle,\n\t\tselectedState,\n\t\tclientId,\n\t\tname,\n\t] );\n\tuseStyleOverride( { css: canvasStateCSS } );\n\n\tif ( blockEditingMode !== 'default' ) {\n\t\treturn null;\n\t}\n\n\tconst panelSettings = {\n\t\t...settings,\n\t\ttypography: {\n\t\t\t...settings.typography,\n\t\t\t// The text alignment UI for individual blocks is rendered in\n\t\t\t// the block toolbar, so disable it here.\n\t\t\ttextAlign: false,\n\t\t},\n\t};\n\n\tconst passedProps = {\n\t\tclientId,\n\t\tname,\n\t\tsetAttributes,\n\t\tsettings: panelSettings,\n\t};\n\n\treturn (\n\t\t<BlockStyleStateProvider value={ selectedState }>\n\t\t\t<ElementsEdit { ...passedProps } />\n\t\t\t<BackgroundImagePanel { ...passedProps } />\n\t\t\t<TypographyPanel { ...passedProps } />\n\t\t\t<BorderPanel { ...passedProps } />\n\t\t\t<DimensionsPanel { ...passedProps } />\n\t\t</BlockStyleStateProvider>\n\t);\n}\n\nexport default {\n\tedit: BlockStyleControls,\n\thasSupport: hasStyleSupport,\n\taddSaveProps,\n\tattributeKeys: [ 'style' ],\n\tuseBlockProps,\n};\n\n// Defines which element types are supported, including their hover styles or\n// any other elements that have been included under a single element type\n// e.g. heading and h1-h6.\nconst elementTypes = [\n\t{ elementType: 'button' },\n\t{ elementType: 'link', pseudo: [ ':hover' ] },\n\t{\n\t\telementType: 'heading',\n\t\telements: [ 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' ],\n\t},\n];\n\n// Used for generating the instance ID\nconst STYLE_BLOCK_PROPS_REFERENCE = {};\n\n/**\n * Generates CSS rules for block element styles (buttons, links, headings, etc.).\n *\n * Iterates over supported element types and compiles their styles, including\n * pseudo-selectors (e.g. :hover) and related sub-elements (e.g. h1-h6 for headings),\n * into scoped CSS rule strings.\n *\n * @param {Object} blockElementStyles The block's `style.elements` object.\n * @param {string} blockName The block name, used for skip-serialization checks.\n * @param {string} baseSelector The base CSS selector to scope rules under.\n * @return {string|undefined} Concatenated CSS rules string, or undefined if none.\n */\nfunction getElementCSSRules( blockElementStyles, blockName, baseSelector ) {\n\tif ( ! blockElementStyles ) {\n\t\treturn;\n\t}\n\n\tconst rules = [];\n\n\telementTypes.forEach( ( { elementType, pseudo, elements } ) => {\n\t\tconst skipSerialization = shouldSkipSerialization(\n\t\t\tblockName,\n\t\t\tCOLOR_SUPPORT_KEY,\n\t\t\telementType\n\t\t);\n\n\t\tif ( skipSerialization ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst elementStyles = blockElementStyles?.[ elementType ];\n\n\t\t// Process primary element type styles.\n\t\tif ( elementStyles ) {\n\t\t\tconst selector = scopeSelector(\n\t\t\t\tbaseSelector,\n\t\t\t\tELEMENTS[ elementType ]\n\t\t\t);\n\n\t\t\trules.push( compileCSS( elementStyles, { selector } ) );\n\n\t\t\t// Process any interactive states for the element type.\n\t\t\tif ( pseudo ) {\n\t\t\t\tpseudo.forEach( ( pseudoSelector ) => {\n\t\t\t\t\tif ( elementStyles[ pseudoSelector ] ) {\n\t\t\t\t\t\trules.push(\n\t\t\t\t\t\t\tcompileCSS( elementStyles[ pseudoSelector ], {\n\t\t\t\t\t\t\t\tselector: scopeSelector(\n\t\t\t\t\t\t\t\t\tbaseSelector,\n\t\t\t\t\t\t\t\t\t`${ ELEMENTS[ elementType ] }${ pseudoSelector }`\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\n\t\t// Process related elements e.g. h1-h6 for headings\n\t\tif ( elements ) {\n\t\t\telements.forEach( ( element ) => {\n\t\t\t\tif ( blockElementStyles[ element ] ) {\n\t\t\t\t\trules.push(\n\t\t\t\t\t\tcompileCSS( blockElementStyles[ element ], {\n\t\t\t\t\t\t\tselector: scopeSelector(\n\t\t\t\t\t\t\t\tbaseSelector,\n\t\t\t\t\t\t\t\tELEMENTS[ element ]\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t} )\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t} );\n\n\treturn rules.length > 0 ? rules.join( '' ) : undefined;\n}\n\nfunction useBlockProps( { clientId, name, style } ) {\n\tconst blockElementsContainerIdentifier = useInstanceId(\n\t\tSTYLE_BLOCK_PROPS_REFERENCE,\n\t\t'wp-elements'\n\t);\n\n\tconst baseElementSelector = `.${ blockElementsContainerIdentifier }`;\n\tconst blockElementStyles = style?.elements;\n\tconst [ viewportSettings ] = useSettings( 'viewport' );\n\n\tconst styles = useMemo( () => {\n\t\tconst cssRules = [];\n\n\t\tconst elementCSS = getElementCSSRules(\n\t\t\tblockElementStyles,\n\t\t\tname,\n\t\t\tbaseElementSelector\n\t\t);\n\t\tif ( elementCSS ) {\n\t\t\tcssRules.push( elementCSS );\n\t\t}\n\n\t\tcssRules.push(\n\t\t\t...getPseudoStateCSSRules( style, name, baseElementSelector )\n\t\t);\n\n\t\tcssRules.push(\n\t\t\t...getResponsiveStateCSSRules(\n\t\t\t\tstyle,\n\t\t\t\tname,\n\t\t\t\tbaseElementSelector,\n\t\t\t\tviewportSettings\n\t\t\t)\n\t\t);\n\n\t\treturn cssRules.length > 0 ? cssRules.join( '' ) : undefined;\n\t}, [\n\t\tbaseElementSelector,\n\t\tblockElementStyles,\n\t\tname,\n\t\tstyle,\n\t\tviewportSettings,\n\t] );\n\n\tusePrivateStyleOverride( { css: styles, clientId } );\n\n\treturn addSaveProps(\n\t\t{ className: blockElementsContainerIdentifier },\n\t\tname,\n\t\t{ style },\n\t\tskipSerializationPathsEdit\n\t);\n}\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/style/addAttribute',\n\taddAttribute\n);\n"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AQ,SAAS,CAAE;AAEnD,SAAO;AAAA,IACN,EAAE,WAAW,iCAAiC;AAAA,IAC9C;AAAA,IACA,EAAE,MAAM;AAAA,IACR;AAAA,EACD;AACD;AAAA,IAEA;AAAA,EACC;AAAA,EACA;AAAA,EACA;AACD;",
|
|
6
6
|
"names": ["import_utils", "globalStylesEnginePrivateApis", "blockEditorStore", "ELEMENTS"]
|
|
7
7
|
}
|
|
@@ -27,7 +27,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
|
|
30
|
-
// packages/block-editor/src/hooks/text-align.
|
|
30
|
+
// packages/block-editor/src/hooks/text-align.jsx
|
|
31
31
|
var text_align_exports = {};
|
|
32
32
|
__export(text_align_exports, {
|
|
33
33
|
TEXT_ALIGN_SUPPORT_KEY: () => TEXT_ALIGN_SUPPORT_KEY,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/hooks/text-align.
|
|
3
|
+
"sources": ["../../src/hooks/text-align.jsx"],
|
|
4
4
|
"sourcesContent": ["import clsx from 'clsx';\nimport { __ } from '@wordpress/i18n';\nimport { getBlockSupport, hasBlockSupport } from '@wordpress/blocks';\nimport { alignLeft, alignRight, alignCenter } from '@wordpress/icons';\nimport { useSelect } from '@wordpress/data';\nimport { AlignmentControl, BlockControls } from '../components';\nimport { useBlockEditingMode } from '../components/block-editing-mode';\nimport {\n\tgetStyleForState,\n\thasViewportBlockStyleState,\n\tsetStyleForState,\n} from './block-style-state';\nimport { shouldSkipSerialization, useBlockSettings } from './utils';\nimport { TYPOGRAPHY_SUPPORT_KEY } from './typography';\nimport { store as blockEditorStore } from '../store';\nimport { unlock } from '../lock-unlock';\n\nexport const TEXT_ALIGN_SUPPORT_KEY = 'typography.textAlign';\n\nconst TEXT_ALIGNMENT_OPTIONS = [\n\t{\n\t\ticon: alignLeft,\n\t\ttitle: __( 'Align text left' ),\n\t\talign: 'left',\n\t},\n\t{\n\t\ticon: alignCenter,\n\t\ttitle: __( 'Align text center' ),\n\t\talign: 'center',\n\t},\n\t{\n\t\ticon: alignRight,\n\t\ttitle: __( 'Align text right' ),\n\t\talign: 'right',\n\t},\n];\n\nconst VALID_TEXT_ALIGNMENTS = [ 'left', 'center', 'right' ];\nconst NO_TEXT_ALIGNMENTS = [];\n\n/**\n * Returns the valid text alignments.\n * Takes into consideration the text aligns supported by a block.\n * Exported just for testing purposes, not exported outside the module.\n *\n * @param {?boolean|string[]} blockTextAlign Text aligns supported by the block.\n *\n * @return {string[]} Valid text alignments.\n */\nexport function getValidTextAlignments( blockTextAlign ) {\n\tif ( Array.isArray( blockTextAlign ) ) {\n\t\treturn VALID_TEXT_ALIGNMENTS.filter( ( textAlign ) =>\n\t\t\tblockTextAlign.includes( textAlign )\n\t\t);\n\t}\n\n\treturn blockTextAlign === true ? VALID_TEXT_ALIGNMENTS : NO_TEXT_ALIGNMENTS;\n}\n\nexport function getTextAlignControlGroup( isResponsiveEditing, selectedState ) {\n\treturn isResponsiveEditing && hasViewportBlockStyleState( selectedState )\n\t\t? 'style-state'\n\t\t: 'block';\n}\n\nfunction BlockEditTextAlignmentToolbarControlsPure( {\n\tclientId,\n\tstyle,\n\tname: blockName,\n\tsetAttributes,\n} ) {\n\tconst settings = useBlockSettings( blockName );\n\tconst hasTextAlignControl = settings?.typography?.textAlign;\n\tconst blockEditingMode = useBlockEditingMode();\n\tconst { selectedState, isResponsiveEditing } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetSelectedBlockStyleState,\n\t\t\t\tisResponsiveEditing: getIsResponsiveEditing,\n\t\t\t} = unlock( select( blockEditorStore ) );\n\t\t\treturn {\n\t\t\t\tselectedState: getSelectedBlockStyleState( clientId ),\n\t\t\t\tisResponsiveEditing: getIsResponsiveEditing(),\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tif ( ! hasTextAlignControl || blockEditingMode !== 'default' ) {\n\t\treturn null;\n\t}\n\n\tconst validTextAlignments = getValidTextAlignments(\n\t\tgetBlockSupport( blockName, TEXT_ALIGN_SUPPORT_KEY )\n\t);\n\tif ( ! validTextAlignments.length ) {\n\t\treturn null;\n\t}\n\n\tconst textAlignmentControls = TEXT_ALIGNMENT_OPTIONS.filter( ( control ) =>\n\t\tvalidTextAlignments.includes( control.align )\n\t);\n\tconst stateStyle = getStyleForState( style, selectedState );\n\tconst controlsGroup = getTextAlignControlGroup(\n\t\tisResponsiveEditing,\n\t\tselectedState\n\t);\n\n\tconst onChange = ( newTextAlignValue ) => {\n\t\tconst newStateStyle = {\n\t\t\t...stateStyle,\n\t\t\ttypography: {\n\t\t\t\t...stateStyle?.typography,\n\t\t\t\ttextAlign: newTextAlignValue,\n\t\t\t},\n\t\t};\n\n\t\tsetAttributes( {\n\t\t\tstyle: setStyleForState( style, selectedState, newStateStyle ),\n\t\t} );\n\t};\n\n\treturn (\n\t\t<BlockControls group={ controlsGroup }>\n\t\t\t<AlignmentControl\n\t\t\t\tvalue={ stateStyle?.typography?.textAlign }\n\t\t\t\tonChange={ onChange }\n\t\t\t\talignmentControls={ textAlignmentControls }\n\t\t\t/>\n\t\t</BlockControls>\n\t);\n}\n\nexport default {\n\tedit: BlockEditTextAlignmentToolbarControlsPure,\n\tuseBlockProps,\n\taddSaveProps: addAssignedTextAlign,\n\tattributeKeys: [ 'style' ],\n\thasSupport( name ) {\n\t\treturn hasBlockSupport( name, TEXT_ALIGN_SUPPORT_KEY, false );\n\t},\n};\n\nfunction useBlockProps( { name, style } ) {\n\tif ( ! style?.typography?.textAlign ) {\n\t\treturn null;\n\t}\n\n\tconst validTextAlignments = getValidTextAlignments(\n\t\tgetBlockSupport( name, TEXT_ALIGN_SUPPORT_KEY )\n\t);\n\n\tif ( ! validTextAlignments.length ) {\n\t\treturn null;\n\t}\n\n\tif (\n\t\tshouldSkipSerialization( name, TYPOGRAPHY_SUPPORT_KEY, 'textAlign' )\n\t) {\n\t\treturn null;\n\t}\n\n\tconst textAlign = style.typography.textAlign;\n\n\tconst className = clsx( {\n\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t} );\n\treturn { className };\n}\n\n/**\n * Override props assigned to save component to inject text alignment class\n * name if block supports it.\n *\n * @param {Object} props Additional props applied to save element.\n * @param {Object} blockType Block type.\n * @param {Object} attributes Block attributes.\n *\n * @return {Object} Filtered props applied to save element.\n */\nexport function addAssignedTextAlign( props, blockType, attributes ) {\n\tif ( ! attributes?.style?.typography?.textAlign ) {\n\t\treturn props;\n\t}\n\n\tconst { textAlign } = attributes.style.typography;\n\tconst blockTextAlign = getBlockSupport( blockType, TEXT_ALIGN_SUPPORT_KEY );\n\tconst isTextAlignValid =\n\t\tgetValidTextAlignments( blockTextAlign ).includes( textAlign );\n\tif (\n\t\tisTextAlignValid &&\n\t\t! shouldSkipSerialization(\n\t\t\tblockType,\n\t\t\tTYPOGRAPHY_SUPPORT_KEY,\n\t\t\t'textAlign'\n\t\t)\n\t) {\n\t\tprops.className = clsx(\n\t\t\t`has-text-align-${ textAlign }`,\n\t\t\tprops.className\n\t\t);\n\t}\n\treturn props;\n}\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,kBAAmB;AACnB,oBAAiD;AACjD,mBAAmD;AACnD,kBAA0B;AAC1B,wBAAgD;AAChD,gCAAoC;AACpC,+BAIO;AACP,mBAA0D;AAC1D,wBAAuC;AACvC,mBAA0C;AAC1C,yBAAuB;AA6GpB;AA3GI,IAAM,yBAAyB;AAEtC,IAAM,yBAAyB;AAAA,EAC9B;AAAA,IACC,MAAM;AAAA,IACN,WAAO,gBAAI,iBAAkB;AAAA,IAC7B,OAAO;AAAA,EACR;AAAA,EACA;AA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AY;AACjD,WAAO;AAAA,EACR;AAEA,QAAM,EAAE,UAAU,IAAI,WAAW,MAAM;AACvC,QAAM,qBAAiB,+BAAiB,WAAW,sBAAuB;AAC1E,QAAM,mBACL,uBAAwB,cAAe,EAAE,SAAU,SAAU;AAC9D,MACC,oBACA,KAAE;AAAA,IACD;AAAA,IACA;AAAA,IACA;AAAA,EACD,GACC;AACD,UAAM,gBAAY,YAAAA;AAAA,MACjB,kBAAmB,SAAU;AAAA,MAC7B,MAAM;AAAA,IACP;AAAA,EACD;AACA,SAAO;AACR;",
|
|
6
6
|
"names": ["blockEditorStore", "clsx"]
|
|
@@ -27,7 +27,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
|
|
30
|
-
// packages/block-editor/src/hooks/typography.
|
|
30
|
+
// packages/block-editor/src/hooks/typography.jsx
|
|
31
31
|
var typography_exports = {};
|
|
32
32
|
__export(typography_exports, {
|
|
33
33
|
TYPOGRAPHY_SUPPORT_KEY: () => TYPOGRAPHY_SUPPORT_KEY,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/hooks/typography.
|
|
3
|
+
"sources": ["../../src/hooks/typography.jsx"],
|
|
4
4
|
"sourcesContent": ["import { getBlockSupport, hasBlockSupport } from '@wordpress/blocks';\nimport { useMemo, useCallback } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport InspectorControls from '../components/inspector-controls';\nimport {\n\tdefault as StylesTypographyPanel,\n\tuseHasTypographyPanel,\n} from '../components/global-styles/typography-panel';\nimport { useResolvedStyle } from '../components/global-styles/inherited-value-context';\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 { TEXT_ALIGN_SUPPORT_KEY } from './text-align';\nimport { FIT_TEXT_SUPPORT_KEY } from './fit-text';\nimport { cleanEmptyObject } from './utils';\nimport { extractPresetSlug } from '../utils/color-values';\nimport { store as blockEditorStore } from '../store';\nimport {\n\tgetStyleForState,\n\tisDefaultBlockStyleState,\n\tsetStyleForState,\n\tuseBlockStyleState,\n} from './block-style-state';\nimport useBlockColorContrastWarning from './contrast-checker';\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_INDENT_SUPPORT_KEY = 'typography.textIndent';\nconst TEXT_COLUMNS_SUPPORT_KEY = 'typography.textColumns';\nconst FONT_STYLE_SUPPORT_KEY = 'typography.__experimentalFontStyle';\nconst FONT_WEIGHT_SUPPORT_KEY = 'typography.__experimentalFontWeight';\nconst WRITING_MODE_SUPPORT_KEY = 'typography.__experimentalWritingMode';\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_ALIGN_SUPPORT_KEY,\n\tTEXT_COLUMNS_SUPPORT_KEY,\n\tTEXT_DECORATION_SUPPORT_KEY,\n\tTEXT_INDENT_SUPPORT_KEY,\n\tWRITING_MODE_SUPPORT_KEY,\n\tTEXT_TRANSFORM_SUPPORT_KEY,\n\tLETTER_SPACING_SUPPORT_KEY,\n\tFIT_TEXT_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 textColorValue = style?.color?.text;\n\tconst fontSizeSlug =\n\t\ttypeof fontSizeValue === 'string' &&\n\t\tfontSizeValue?.startsWith( 'var:preset|font-size|' )\n\t\t\t? fontSizeValue.substring( 'var:preset|font-size|'.length )\n\t\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\tconst textColorSlug = extractPresetSlug( textColorValue, 'color' );\n\tupdatedStyle.typography = {\n\t\t...omit( updatedStyle.typography, [ 'fontFamily' ] ),\n\t\tfontSize: fontSizeSlug ? undefined : fontSizeValue,\n\t};\n\tupdatedStyle.color = {\n\t\t...updatedStyle.color,\n\t\ttext: textColorSlug ? undefined : textColorValue,\n\t};\n\treturn {\n\t\tstyle: cleanEmptyObject( updatedStyle ),\n\t\tfontFamily: fontFamilySlug,\n\t\tfontSize: fontSizeSlug,\n\t\ttextColor: textColorSlug,\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\tcolor: {\n\t\t\t...attributes.style?.color,\n\t\t\ttext: attributes.textColor\n\t\t\t\t? 'var:preset|color|' + attributes.textColor\n\t\t\t\t: attributes.style?.color?.text,\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\tsetAttributes,\n\tsettings,\n\t// Allows rendering outside the `typography` inspector group (e.g. section\n\t// blocks direct-render this panel because their support fills are gated\n\t// off by editing mode). Defaults to the slot-based wrapper.\n\tasWrapper,\n} ) {\n\tconst selectedState = useBlockStyleState();\n\tconst isEnabled = useHasTypographyPanel( settings );\n\n\tconst { style, fontFamily, fontSize, fitText, textColor, className } =\n\t\tuseSelect(\n\t\t\t( select ) => {\n\t\t\t\t// Early return to avoid subscription when disabled.\n\t\t\t\tif ( ! isEnabled ) {\n\t\t\t\t\treturn {};\n\t\t\t\t}\n\t\t\t\tconst {\n\t\t\t\t\tstyle: _style,\n\t\t\t\t\tfontFamily: _fontFamily,\n\t\t\t\t\tfontSize: _fontSize,\n\t\t\t\t\tfitText: _fitText,\n\t\t\t\t\ttextColor: _textColor,\n\t\t\t\t\tclassName: _className,\n\t\t\t\t} = select( blockEditorStore ).getBlockAttributes( clientId ) ||\n\t\t\t\t{};\n\t\t\t\treturn {\n\t\t\t\t\tstyle: _style,\n\t\t\t\t\tfontFamily: _fontFamily,\n\t\t\t\t\tfontSize: _fontSize,\n\t\t\t\t\tfitText: _fitText,\n\t\t\t\t\ttextColor: _textColor,\n\t\t\t\t\tclassName: _className,\n\t\t\t\t};\n\t\t\t},\n\t\t\t[ clientId, isEnabled ]\n\t\t);\n\n\tconst isStateSelected = ! isDefaultBlockStyleState( selectedState );\n\n\tconst { value: inheritedValue } = useResolvedStyle(\n\t\tname,\n\t\tclassName,\n\t\tselectedState\n\t);\n\n\tconst value = useMemo( () => {\n\t\tif ( isStateSelected ) {\n\t\t\treturn getStyleForState( style, selectedState );\n\t\t}\n\t\treturn attributesToStyle( { style, fontFamily, fontSize, textColor } );\n\t}, [\n\t\tisStateSelected,\n\t\tselectedState,\n\t\tstyle,\n\t\tfontSize,\n\t\tfontFamily,\n\t\ttextColor,\n\t] );\n\n\tconst onChange = isStateSelected\n\t\t? ( newStyle ) => {\n\t\t\t\tsetAttributes( {\n\t\t\t\t\tstyle: setStyleForState( style, selectedState, newStyle ),\n\t\t\t\t} );\n\t\t }\n\t\t: ( newStyle ) => {\n\t\t\t\tconst newAttributes = styleToAttributes( newStyle );\n\n\t\t\t\t// If setting a font size and fitText is currently enabled, disable it.\n\t\t\t\tconst hasFontSize =\n\t\t\t\t\tnewAttributes.fontSize ||\n\t\t\t\t\tnewAttributes.style?.typography?.fontSize;\n\t\t\t\tif ( hasFontSize && fitText ) {\n\t\t\t\t\tnewAttributes.fitText = undefined;\n\t\t\t\t}\n\n\t\t\t\tsetAttributes( newAttributes );\n\t\t };\n\n\t// Link color failures are reported by the Elements panel, which owns the\n\t// link color selection.\n\tconst enableContrastChecking =\n\t\t! value?.color?.gradient &&\n\t\t!! value?.color?.text &&\n\t\tsettings?.color?.text &&\n\t\tfalse !== getBlockSupport( name, [ 'color', 'enableContrastChecker' ] );\n\n\tconst contrastWarning = useBlockColorContrastWarning( {\n\t\tclientId,\n\t\tname,\n\t\tenabled: !! enableContrastChecking,\n\t\tcheckLinkColor: false,\n\t\tmessageOverride: __(\n\t\t\t'This color has poor contrast against the background. Consider increasing contrast.'\n\t\t),\n\t} );\n\n\tif ( ! isEnabled ) {\n\t\treturn null;\n\t}\n\n\tconst typographyDefaultControls = getBlockSupport( name, [\n\t\tTYPOGRAPHY_SUPPORT_KEY,\n\t\t'__experimentalDefaultControls',\n\t] );\n\tconst colorDefaultControls = getBlockSupport( name, [\n\t\t'color',\n\t\t'__experimentalDefaultControls',\n\t] );\n\tconst defaultControls = {\n\t\t...typographyDefaultControls,\n\t\ttextColor: colorDefaultControls?.text,\n\t};\n\n\tconst Wrapper = asWrapper || TypographyInspectorControl;\n\n\treturn (\n\t\t<StylesTypographyPanel\n\t\t\tas={ Wrapper }\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\tcontrastWarning={ contrastWarning }\n\t\t\tinheritedValue={ inheritedValue }\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"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAiD;AACjD,qBAAqC;AACrC,kBAA0B;AAC1B,kBAAmB;AACnB,gCAA8B;AAC9B,8BAGO;AACP,qCAAiC;AACjC,yBAAwC;AACxC,yBAAwC;AACxC,uBAAsC;AACtC,wBAAuC;AACvC,sBAAqC;AACrC,mBAAiC;AACjC,0BAAkC;AAClC,mBAA0C;AAC1C,+BAKO;AACP,8BAAyC;AAoGvC;AAlGF,SAAS,KAAM,QAAQ,MAAO;AAC7B,SAAO,OAAO;AAAA,IACb,OAAO,QAAS,MAAO,EAAE,OAAQ,CAAE,CAAE,GAAI,MAAO,CAAE,KAAK,SAAU,GAAI,CAAE;AAAA,EACxE;AACD;AAEA,IAAM,6BAA6B;AACnC,IAAM,6BAA6B;AACnC,IAAM,8BAA8B;AACpC,IAAM,0BAA0B;AAChC,IAAM,2BAA2B;AACjC,IAAM,yBAAyB;AAC/B,IAAM,0BAA0B;AAChC,IAAM,2BAA2B;AAC1B,IA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AAK;AAAA,MACL,SAAU;AAAA,MACV;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,EACD;AAEF;AAEO,IAAM,uBAAuB,CAAE,cAAe;AACpD,SAAO,wBAAwB;AAAA,IAAM,CAAE,YACtC,+BAAiB,WAAW,GAAI;AAAA,EACjC;AACD;",
|
|
6
6
|
"names": ["InspectorControls", "blockEditorStore", "useBlockColorContrastWarning", "StylesTypographyPanel"]
|
package/build/hooks/utils.cjs
CHANGED
|
@@ -27,7 +27,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
|
|
30
|
-
// packages/block-editor/src/hooks/utils.
|
|
30
|
+
// packages/block-editor/src/hooks/utils.jsx
|
|
31
31
|
var utils_exports = {};
|
|
32
32
|
__export(utils_exports, {
|
|
33
33
|
cleanEmptyObject: () => cleanEmptyObject,
|