@wordpress/block-editor 12.23.0 → 12.25.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 +4 -0
- package/README.md +5 -1
- package/build/autocompleters/block.js.map +1 -1
- package/build/autocompleters/link.js.map +1 -1
- package/build/components/alignment-control/index.js.map +1 -1
- package/build/components/alignment-control/ui.js +3 -1
- package/build/components/alignment-control/ui.js.map +1 -1
- package/build/components/autocomplete/index.js.map +1 -1
- package/build/components/block-actions/index.js.map +1 -1
- package/build/components/block-alignment-control/constants.js.map +1 -1
- package/build/components/block-alignment-control/index.js.map +1 -1
- package/build/components/block-alignment-control/ui.js.map +1 -1
- package/build/components/block-alignment-control/ui.native.js.map +1 -1
- package/build/components/block-alignment-control/use-available-alignments.js.map +1 -1
- package/build/components/block-alignment-matrix-control/index.js.map +1 -1
- package/build/components/block-bindings-toolbar-indicator/index.js.map +1 -1
- package/build/components/block-breadcrumb/index.js.map +1 -1
- package/build/components/block-canvas/index.js.map +1 -1
- package/build/components/block-caption/index.native.js.map +1 -1
- package/build/components/block-card/index.js.map +1 -1
- package/build/components/block-compare/block-view.js.map +1 -1
- package/build/components/block-compare/index.js.map +1 -1
- package/build/components/block-content-overlay/index.js.map +1 -1
- package/build/components/block-context/index.js.map +1 -1
- package/build/components/block-controls/fill.js.map +1 -1
- package/build/components/block-controls/groups.js.map +1 -1
- package/build/components/block-controls/hook.js.map +1 -1
- package/build/components/block-controls/index.js.map +1 -1
- package/build/components/block-controls/slot.js.map +1 -1
- package/build/components/block-controls/slot.native.js.map +1 -1
- package/build/components/block-controls/use-has-block-controls.js.map +1 -1
- package/build/components/block-draggable/draggable-chip.js.map +1 -1
- package/build/components/block-draggable/draggable-chip.native.js.map +1 -1
- package/build/components/block-draggable/dropping-insertion-point.native.js +1 -1
- package/build/components/block-draggable/dropping-insertion-point.native.js.map +1 -1
- package/build/components/block-draggable/index.js.map +1 -1
- package/build/components/block-draggable/index.native.js +1 -1
- package/build/components/block-draggable/index.native.js.map +1 -1
- package/build/components/block-draggable/use-scroll-when-dragging.js.map +1 -1
- package/build/components/block-draggable/use-scroll-when-dragging.native.js.map +1 -1
- package/build/components/block-edit/context.js +2 -1
- package/build/components/block-edit/context.js.map +1 -1
- package/build/components/block-edit/edit.js.map +1 -1
- package/build/components/block-edit/edit.native.js.map +1 -1
- package/build/components/block-edit/index.js +4 -2
- package/build/components/block-edit/index.js.map +1 -1
- package/build/components/block-edit-visually-button/index.js.map +1 -1
- package/build/components/block-editing-mode/index.js.map +1 -1
- package/build/components/block-full-height-alignment-control/index.js.map +1 -1
- package/build/components/block-heading-level-dropdown/heading-level-icon.js.map +1 -1
- package/build/components/block-heading-level-dropdown/index.js.map +1 -1
- package/build/components/block-heading-level-dropdown/index.native.js.map +1 -1
- package/build/components/block-icon/index.js.map +1 -1
- package/build/components/block-icon/index.native.js.map +1 -1
- package/build/components/block-info-slot-fill/index.js.map +1 -1
- package/build/components/block-inspector/index.js +5 -4
- package/build/components/block-inspector/index.js.map +1 -1
- package/build/components/block-inspector/useBlockInspectorAnimationSettings.js.map +1 -1
- package/build/components/block-list/block-crash-boundary.js.map +1 -1
- package/build/components/block-list/block-crash-boundary.native.js.map +1 -1
- package/build/components/block-list/block-crash-warning.js.map +1 -1
- package/build/components/block-list/block-crash-warning.native.js.map +1 -1
- package/build/components/block-list/block-html.js.map +1 -1
- package/build/components/block-list/block-invalid-warning.js.map +1 -1
- package/build/components/block-list/block-invalid-warning.native.js.map +1 -1
- package/build/components/block-list/block-list-context.native.js.map +1 -1
- package/build/components/block-list/block-list-item-cell.native.js.map +1 -1
- package/build/components/block-list/block-list-item.native.js.map +1 -1
- package/build/components/block-list/block-outline.native.js.map +1 -1
- package/build/components/block-list/block-selection-button.native.js.map +1 -1
- package/build/components/block-list/block.js +44 -35
- package/build/components/block-list/block.js.map +1 -1
- package/build/components/block-list/block.native.js +2 -2
- package/build/components/block-list/block.native.js.map +1 -1
- package/build/components/block-list/grid-item.native.js.map +1 -1
- package/build/components/block-list/index.js +18 -6
- package/build/components/block-list/index.js.map +1 -1
- package/build/components/block-list/index.native.js +1 -9
- package/build/components/block-list/index.native.js.map +1 -1
- package/build/components/block-list/insertion-point.native.js.map +1 -1
- package/build/components/block-list/layout.js.map +1 -1
- package/build/components/block-list/private-block-context.js.map +1 -1
- package/build/components/block-list/subdirectory-icon.js.map +1 -1
- package/build/components/block-list/use-block-props/index.js +8 -7
- package/build/components/block-list/use-block-props/index.js.map +1 -1
- package/build/components/block-list/use-block-props/index.native.js.map +1 -1
- package/build/components/block-list/use-block-props/use-block-refs.js +17 -46
- package/build/components/block-list/use-block-props/use-block-refs.js.map +1 -1
- package/build/components/block-list/use-block-props/use-focus-first-element.js +3 -2
- package/build/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
- package/build/components/block-list/use-block-props/use-focus-handler.js.map +1 -1
- package/build/components/block-list/use-block-props/use-intersection-observer.js.map +1 -1
- package/build/components/block-list/use-block-props/use-is-hovered.js +10 -14
- package/build/components/block-list/use-block-props/use-is-hovered.js.map +1 -1
- package/build/components/block-list/use-block-props/use-nav-mode-exit.js.map +1 -1
- package/build/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +1 -1
- package/build/components/block-list/use-in-between-inserter.js.map +1 -1
- package/build/components/block-list/use-scroll-upon-insertion.native.js.map +1 -1
- package/build/components/block-list-appender/index.js.map +1 -1
- package/build/components/block-list-appender/index.native.js.map +1 -1
- package/build/components/block-lock/index.js.map +1 -1
- package/build/components/block-lock/menu-item.js.map +1 -1
- package/build/components/block-lock/modal.js.map +1 -1
- package/build/components/block-lock/toolbar.js.map +1 -1
- package/build/components/block-lock/use-block-lock.js.map +1 -1
- package/build/components/block-media-update-progress/index.native.js.map +1 -1
- package/build/components/block-mover/button.js.map +1 -1
- package/build/components/block-mover/index.js.map +1 -1
- package/build/components/block-mover/index.native.js +3 -1
- package/build/components/block-mover/index.native.js.map +1 -1
- package/build/components/block-mover/mover-description.js.map +1 -1
- package/build/components/block-mover/mover-description.native.js.map +1 -1
- package/build/components/block-navigation/dropdown.js.map +1 -1
- package/build/components/block-parent-selector/index.js.map +1 -1
- package/build/components/block-pattern-setup/constants.js.map +1 -1
- package/build/components/block-pattern-setup/index.js.map +1 -1
- package/build/components/block-pattern-setup/setup-toolbar.js.map +1 -1
- package/build/components/block-pattern-setup/use-patterns-setup.js.map +1 -1
- package/build/components/block-patterns-list/index.js.map +1 -1
- package/build/components/block-patterns-paging/index.js +8 -4
- package/build/components/block-patterns-paging/index.js.map +1 -1
- package/build/components/block-popover/cover.js.map +1 -1
- package/build/components/block-popover/drop-zone.js.map +1 -1
- package/build/components/block-popover/inbetween.js.map +1 -1
- package/build/components/block-popover/index.js.map +1 -1
- package/build/components/block-popover/use-popover-scroll.js.map +1 -1
- package/build/components/block-preview/auto.js.map +1 -1
- package/build/components/block-preview/index.js.map +1 -1
- package/build/components/block-quick-navigation/index.js.map +1 -1
- package/build/components/block-removal-warning-modal/index.js.map +1 -1
- package/build/components/block-rename/index.js.map +1 -1
- package/build/components/block-rename/is-empty-string.js.map +1 -1
- package/build/components/block-rename/modal.js +13 -9
- package/build/components/block-rename/modal.js.map +1 -1
- package/build/components/block-rename/rename-control.js +3 -1
- package/build/components/block-rename/rename-control.js.map +1 -1
- package/build/components/block-rename/use-block-rename.js.map +1 -1
- package/build/components/block-selection-clearer/index.js.map +1 -1
- package/build/components/block-settings/button.native.js.map +1 -1
- package/build/components/block-settings/container.native.js.map +1 -1
- package/build/components/block-settings/index.native.js +1 -1
- package/build/components/block-settings/index.native.js.map +1 -1
- package/build/components/block-settings-menu/block-html-convert-button.js.map +1 -1
- package/build/components/block-settings-menu/block-mode-toggle.js.map +1 -1
- package/build/components/block-settings-menu/block-parent-selector-menu-item.js.map +1 -1
- package/build/components/block-settings-menu/block-settings-dropdown.js +0 -25
- package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build/components/block-settings-menu/block-settings-menu-first-item.js.map +1 -1
- package/build/components/block-settings-menu/index.js.map +1 -1
- package/build/components/block-settings-menu-controls/index.js.map +1 -1
- package/build/components/block-styles/index.js.map +1 -1
- package/build/components/block-styles/index.native.js.map +1 -1
- package/build/components/block-styles/menu-items.js.map +1 -1
- package/build/components/block-styles/preview-panel.js.map +1 -1
- package/build/components/block-styles/preview.native.js.map +1 -1
- package/build/components/block-styles/use-styles-for-block.js.map +1 -1
- package/build/components/block-styles/utils.js.map +1 -1
- package/build/components/block-switcher/block-styles-menu.js.map +1 -1
- package/build/components/block-switcher/block-transformations-menu.js.map +1 -1
- package/build/components/block-switcher/block-transformations-menu.native.js.map +1 -1
- package/build/components/block-switcher/block-variation-transformations.js.map +1 -1
- package/build/components/block-switcher/index.js.map +1 -1
- package/build/components/block-switcher/pattern-transformations-menu.js +3 -1
- package/build/components/block-switcher/pattern-transformations-menu.js.map +1 -1
- package/build/components/block-switcher/preview-block-popover.js.map +1 -1
- package/build/components/block-switcher/use-transformed-patterns.js +6 -2
- package/build/components/block-switcher/use-transformed-patterns.js.map +1 -1
- package/build/components/block-switcher/utils.js +15 -5
- package/build/components/block-switcher/utils.js.map +1 -1
- package/build/components/block-title/index.js.map +1 -1
- package/build/components/block-title/use-block-display-title.js.map +1 -1
- package/build/components/block-toolbar/block-name-context.js.map +1 -1
- package/build/components/block-toolbar/block-toolbar-last-item.js.map +1 -1
- package/build/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
- package/build/components/block-toolbar/index.js +1 -1
- package/build/components/block-toolbar/index.js.map +1 -1
- package/build/components/block-toolbar/index.native.js.map +1 -1
- package/build/components/block-toolbar/shuffle.js.map +1 -1
- package/build/components/block-toolbar/use-has-block-toolbar.js +20 -12
- package/build/components/block-toolbar/use-has-block-toolbar.js.map +1 -1
- package/build/components/block-toolbar/utils.js.map +1 -1
- package/build/components/block-tools/block-selection-button.js +16 -12
- package/build/components/block-tools/block-selection-button.js.map +1 -1
- package/build/components/block-tools/block-toolbar-breadcrumb.js.map +1 -1
- package/build/components/block-tools/block-toolbar-popover.js.map +1 -1
- package/build/components/block-tools/empty-block-inserter.js.map +1 -1
- package/build/components/block-tools/index.js +4 -2
- package/build/components/block-tools/index.js.map +1 -1
- package/build/components/block-tools/insertion-point.js.map +1 -1
- package/build/components/block-tools/use-block-toolbar-popover-props.js.map +1 -1
- package/build/components/block-tools/use-selected-block-tool-props.js.map +1 -1
- package/build/components/block-tools/use-show-block-tools.js +9 -18
- package/build/components/block-tools/use-show-block-tools.js.map +1 -1
- package/build/components/block-tools/zoom-out-mode-inserters.js +5 -1
- package/build/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
- package/build/components/block-types-list/index.js.map +1 -1
- package/build/components/block-types-list/index.native.js.map +1 -1
- package/build/components/block-variation-picker/index.js +3 -2
- package/build/components/block-variation-picker/index.js.map +1 -1
- package/build/components/block-variation-picker/index.native.js.map +1 -1
- package/build/components/block-variation-transforms/index.js +7 -2
- package/build/components/block-variation-transforms/index.js.map +1 -1
- package/build/components/block-vertical-alignment-control/icons.js.map +1 -1
- package/build/components/block-vertical-alignment-control/index.js.map +1 -1
- package/build/components/block-vertical-alignment-control/ui.js.map +1 -1
- package/build/components/border-radius-control/all-input-control.js.map +1 -1
- package/build/components/border-radius-control/index.js.map +1 -1
- package/build/components/border-radius-control/input-controls.js.map +1 -1
- package/build/components/border-radius-control/linked-button.js.map +1 -1
- package/build/components/border-radius-control/utils.js.map +1 -1
- package/build/components/button-block-appender/index.js.map +1 -1
- package/build/components/button-block-appender/index.native.js +11 -1
- package/build/components/button-block-appender/index.native.js.map +1 -1
- package/build/components/caption/index.native.js.map +1 -1
- package/build/components/child-layout-control/index.js.map +1 -1
- package/build/components/color-palette/control.js.map +1 -1
- package/build/components/color-palette/index.js.map +1 -1
- package/build/components/color-palette/with-color-context.js.map +1 -1
- package/build/components/color-style-selector/index.js.map +1 -1
- package/build/components/colors/index.js +1 -1
- package/build/components/colors/index.js.map +1 -1
- package/build/components/colors/utils.js.map +1 -1
- package/build/components/colors/with-colors.js.map +1 -1
- package/build/components/colors-gradients/control.js.map +1 -1
- package/build/components/colors-gradients/dropdown.js.map +1 -1
- package/build/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
- package/build/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
- package/build/components/colors-gradients/use-multiple-origin-colors-and-gradients.js.map +1 -1
- package/build/components/contrast-checker/index.js.map +1 -1
- package/build/components/contrast-checker/index.native.js.map +1 -1
- package/build/components/convert-to-group-buttons/index.js.map +1 -1
- package/build/components/convert-to-group-buttons/index.native.js.map +1 -1
- package/build/components/convert-to-group-buttons/toolbar.js.map +1 -1
- package/build/components/convert-to-group-buttons/use-convert-to-group-button-props.js.map +1 -1
- package/build/components/copy-handler/index.js.map +1 -1
- package/build/components/date-format-picker/index.js.map +1 -1
- package/build/components/default-block-appender/index.js.map +1 -1
- package/build/components/default-block-appender/index.native.js.map +1 -1
- package/build/components/dimensions-tool/aspect-ratio-tool.js.map +1 -1
- package/build/components/dimensions-tool/index.js.map +1 -1
- package/build/components/dimensions-tool/scale-tool.js.map +1 -1
- package/build/components/dimensions-tool/width-height-tool.js +6 -2
- package/build/components/dimensions-tool/width-height-tool.js.map +1 -1
- package/build/components/duotone/utils.js.map +1 -1
- package/build/components/duotone-control/index.js.map +1 -1
- package/build/components/editable-text/index.js.map +1 -1
- package/build/components/editor-styles/index.js +2 -1
- package/build/components/editor-styles/index.js.map +1 -1
- package/build/components/floating-toolbar/index.native.js +9 -5
- package/build/components/floating-toolbar/index.native.js.map +1 -1
- package/build/components/floating-toolbar/nav-up-icon.js.map +1 -1
- package/build/components/font-appearance-control/index.js.map +1 -1
- package/build/components/font-family/index.js.map +1 -1
- package/build/components/font-sizes/fluid-utils.js.map +1 -1
- package/build/components/font-sizes/font-size-picker.js.map +1 -1
- package/build/components/font-sizes/index.js.map +1 -1
- package/build/components/font-sizes/index.native.js.map +1 -1
- package/build/components/font-sizes/utils.js.map +1 -1
- package/build/components/font-sizes/with-font-sizes.js.map +1 -1
- package/build/components/global-styles/advanced-panel.js.map +1 -1
- package/build/components/global-styles/background-panel.js +20 -17
- package/build/components/global-styles/background-panel.js.map +1 -1
- package/build/components/global-styles/border-panel.js.map +1 -1
- package/build/components/global-styles/color-panel.js +3 -1
- package/build/components/global-styles/color-panel.js.map +1 -1
- package/build/components/global-styles/color-panel.native.js.map +1 -1
- package/build/components/global-styles/context.js.map +1 -1
- package/build/components/global-styles/dimensions-panel.js +16 -0
- package/build/components/global-styles/dimensions-panel.js.map +1 -1
- package/build/components/global-styles/filters-panel.js.map +1 -1
- package/build/components/global-styles/get-block-css-selector.js.map +1 -1
- package/build/components/global-styles/get-global-styles-changes.js.map +1 -1
- package/build/components/global-styles/hooks.js +3 -2
- package/build/components/global-styles/hooks.js.map +1 -1
- package/build/components/global-styles/image-settings-panel.js.map +1 -1
- package/build/components/global-styles/index.js +1 -1
- package/build/components/global-styles/index.js.map +1 -1
- package/build/components/global-styles/shadow-panel-components.js.map +1 -1
- package/build/components/global-styles/typography-panel.js +23 -23
- package/build/components/global-styles/typography-panel.js.map +1 -1
- package/build/components/global-styles/typography-utils.js.map +1 -1
- package/build/components/global-styles/use-global-styles-output.js +153 -136
- package/build/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build/components/global-styles/utils.js +45 -0
- package/build/components/global-styles/utils.js.map +1 -1
- package/build/components/gradients/index.js.map +1 -1
- package/build/components/gradients/index.native.js.map +1 -1
- package/build/components/gradients/use-gradient.js.map +1 -1
- package/build/components/gradients/with-gradient.js.map +1 -1
- package/build/components/grid-visualizer/grid-item-resizer.js.map +1 -1
- package/build/components/grid-visualizer/grid-visualizer.js.map +1 -1
- package/build/components/grid-visualizer/index.js.map +1 -1
- package/build/components/grid-visualizer/utils.js.map +1 -1
- package/build/components/height-control/index.js.map +1 -1
- package/build/components/iframe/get-compatibility-styles.js.map +1 -1
- package/build/components/iframe/index.js +12 -13
- package/build/components/iframe/index.js.map +1 -1
- package/build/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
- package/build/components/image-editor/constants.js.map +1 -1
- package/build/components/image-editor/context.js.map +1 -1
- package/build/components/image-editor/cropper.js +6 -2
- package/build/components/image-editor/cropper.js.map +1 -1
- package/build/components/image-editor/form-controls.js.map +1 -1
- package/build/components/image-editor/index.js +0 -2
- package/build/components/image-editor/index.js.map +1 -1
- package/build/components/image-editor/rotation-button.js.map +1 -1
- package/build/components/image-editor/use-save-image.js.map +1 -1
- package/build/components/image-editor/use-transform-image.js.map +1 -1
- package/build/components/image-editor/zoom-dropdown.js.map +1 -1
- package/build/components/image-link-destinations/index.native.js.map +1 -1
- package/build/components/image-size-control/index.js.map +1 -1
- package/build/components/image-size-control/use-dimension-handler.js.map +1 -1
- package/build/components/index.js +1 -1
- package/build/components/index.js.map +1 -1
- package/build/components/index.native.js +1 -1
- package/build/components/index.native.js.map +1 -1
- package/build/components/inner-blocks/button-block-appender.js.map +1 -1
- package/build/components/inner-blocks/constants.native.js.map +1 -1
- package/build/components/inner-blocks/default-block-appender.js.map +1 -1
- package/build/components/inner-blocks/index.js +16 -2
- package/build/components/inner-blocks/index.js.map +1 -1
- package/build/components/inner-blocks/index.native.js.map +1 -1
- package/build/components/inner-blocks/use-block-context.js.map +1 -1
- package/build/components/inner-blocks/use-inner-block-template-sync.js.map +1 -1
- package/build/components/inner-blocks/use-nested-settings-update.js.map +1 -1
- package/build/components/inner-blocks/warning-max-depth-exceeded.native.js.map +1 -1
- package/build/components/inner-blocks/with-client-id.js.map +1 -1
- package/build/components/inserter/block-patterns-explorer/index.js.map +1 -1
- package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js.map +1 -1
- package/build/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/index.js +19 -25
- package/build/components/inserter/block-patterns-tab/index.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +2 -24
- package/build/components/inserter/block-patterns-tab/pattern-category-preview-panel.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/pattern-category-previews.js +1 -3
- package/build/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/use-pattern-categories.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/utils.js.map +1 -1
- package/build/components/inserter/block-types-tab.js +4 -0
- package/build/components/inserter/block-types-tab.js.map +1 -1
- package/build/components/inserter/block-types-tab.native.js.map +1 -1
- package/build/components/inserter/category-tabs/index.js +56 -0
- package/build/components/inserter/category-tabs/index.js.map +1 -0
- package/build/components/inserter/hooks/use-block-type-impressions.native.js.map +1 -1
- package/build/components/inserter/hooks/use-block-types-state.js.map +1 -1
- package/build/components/inserter/hooks/use-clipboard-block.native.js.map +1 -1
- package/build/components/inserter/hooks/use-insertion-point.js.map +1 -1
- package/build/components/inserter/hooks/use-patterns-paging.js.map +1 -1
- package/build/components/inserter/hooks/use-patterns-state.js.map +1 -1
- package/build/components/inserter/index.js.map +1 -1
- package/build/components/inserter/index.native.js.map +1 -1
- package/build/components/inserter/library.js.map +1 -1
- package/build/components/inserter/media-tab/hooks.js.map +1 -1
- package/build/components/inserter/media-tab/index.js +2 -2
- package/build/components/inserter/media-tab/index.js.map +1 -1
- package/build/components/inserter/media-tab/media-list.js.map +1 -1
- package/build/components/inserter/media-tab/media-panel.js +0 -25
- package/build/components/inserter/media-tab/media-panel.js.map +1 -1
- package/build/components/inserter/media-tab/media-preview.js +13 -3
- package/build/components/inserter/media-tab/media-preview.js.map +1 -1
- package/build/components/inserter/media-tab/media-tab.js +15 -29
- package/build/components/inserter/media-tab/media-tab.js.map +1 -1
- package/build/components/inserter/media-tab/utils.js.map +1 -1
- package/build/components/inserter/menu.js +73 -77
- package/build/components/inserter/menu.js.map +1 -1
- package/build/components/inserter/menu.native.js.map +1 -1
- package/build/components/inserter/mobile-tab-navigation.js.map +1 -1
- package/build/components/inserter/no-results.js.map +1 -1
- package/build/components/inserter/no-results.native.js.map +1 -1
- package/build/components/inserter/panel.js.map +1 -1
- package/build/components/inserter/preview-panel.js.map +1 -1
- package/build/components/inserter/quick-inserter.js.map +1 -1
- package/build/components/inserter/reusable-block-rename-hint.js.map +1 -1
- package/build/components/inserter/reusable-blocks-tab.native.js.map +1 -1
- package/build/components/inserter/search-items.js.map +1 -1
- package/build/components/inserter/search-results.js.map +1 -1
- package/build/components/inserter/search-results.native.js.map +1 -1
- package/build/components/inserter/tabs.js +13 -9
- package/build/components/inserter/tabs.js.map +1 -1
- package/build/components/inserter/tabs.native.js.map +1 -1
- package/build/components/inserter/tips.js.map +1 -1
- package/build/components/inserter/utils.native.js.map +1 -1
- package/build/components/inserter-button/index.native.js.map +1 -1
- package/build/components/inserter-button/sparkles.js.map +1 -1
- package/build/components/inserter-draggable-blocks/index.js.map +1 -1
- package/build/components/inserter-list-item/index.js.map +1 -1
- package/build/components/inserter-listbox/context.js.map +1 -1
- package/build/components/inserter-listbox/group.js.map +1 -1
- package/build/components/inserter-listbox/index.js.map +1 -1
- package/build/components/inserter-listbox/item.js.map +1 -1
- package/build/components/inserter-listbox/row.js.map +1 -1
- package/build/components/inserter-menu-extension/index.js.map +1 -1
- package/build/components/inspector-controls/block-support-slot-container.js.map +1 -1
- package/build/components/inspector-controls/block-support-tools-panel.js.map +1 -1
- package/build/components/inspector-controls/fill.js.map +1 -1
- package/build/components/inspector-controls/fill.native.js.map +1 -1
- package/build/components/inspector-controls/groups.js.map +1 -1
- package/build/components/inspector-controls/index.js.map +1 -1
- package/build/components/inspector-controls/slot.js.map +1 -1
- package/build/components/inspector-controls/slot.native.js.map +1 -1
- package/build/components/inspector-controls-tabs/advanced-controls-panel.js +1 -1
- package/build/components/inspector-controls-tabs/advanced-controls-panel.js.map +1 -1
- package/build/components/inspector-controls-tabs/advanced-controls-panel.native.js.map +1 -1
- package/build/components/inspector-controls-tabs/index.js.map +1 -1
- package/build/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
- package/build/components/inspector-controls-tabs/settings-tab-hint.js.map +1 -1
- package/build/components/inspector-controls-tabs/settings-tab.js.map +1 -1
- package/build/components/inspector-controls-tabs/styles-tab.js +1 -1
- package/build/components/inspector-controls-tabs/styles-tab.js.map +1 -1
- package/build/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +1 -1
- package/build/components/inspector-controls-tabs/use-is-list-view-tab-disabled.js.map +1 -1
- package/build/components/inspector-controls-tabs/utils.js.map +1 -1
- package/build/components/inspector-popover-header/index.js.map +1 -1
- package/build/components/justify-content-control/index.js.map +1 -1
- package/build/components/justify-content-control/ui.js.map +1 -1
- package/build/components/keyboard-shortcuts/index.js.map +1 -1
- package/build/components/letter-spacing-control/index.js.map +1 -1
- package/build/components/line-height-control/index.js +6 -2
- package/build/components/line-height-control/index.js.map +1 -1
- package/build/components/line-height-control/index.native.js.map +1 -1
- package/build/components/line-height-control/utils.js.map +1 -1
- package/build/components/link-control/constants.js.map +1 -1
- package/build/components/link-control/index.js.map +1 -1
- package/build/components/link-control/is-url-like.js.map +1 -1
- package/build/components/link-control/link-preview.js.map +1 -1
- package/build/components/link-control/search-create-button.js.map +1 -1
- package/build/components/link-control/search-input.js.map +1 -1
- package/build/components/link-control/search-item.js +9 -3
- package/build/components/link-control/search-item.js.map +1 -1
- package/build/components/link-control/search-results.js.map +1 -1
- package/build/components/link-control/settings-drawer.js.map +1 -1
- package/build/components/link-control/settings.js.map +1 -1
- package/build/components/link-control/use-create-page.js.map +1 -1
- package/build/components/link-control/use-internal-value.js.map +1 -1
- package/build/components/link-control/use-rich-url-data.js.map +1 -1
- package/build/components/link-control/use-search-handler.js.map +1 -1
- package/build/components/link-control/viewer-slot.js.map +1 -1
- package/build/components/list-view/appender.js.map +1 -1
- package/build/components/list-view/aria-referenced-text.js.map +1 -1
- package/build/components/list-view/block-contents.js.map +1 -1
- package/build/components/list-view/block-select-button.js +5 -142
- package/build/components/list-view/block-select-button.js.map +1 -1
- package/build/components/list-view/block.js +166 -14
- package/build/components/list-view/block.js.map +1 -1
- package/build/components/list-view/branch.js.map +1 -1
- package/build/components/list-view/context.js.map +1 -1
- package/build/components/list-view/drop-indicator.js.map +1 -1
- package/build/components/list-view/expander.js.map +1 -1
- package/build/components/list-view/index.js +1 -1
- package/build/components/list-view/index.js.map +1 -1
- package/build/components/list-view/leaf.js.map +1 -1
- package/build/components/list-view/use-block-selection.js.map +1 -1
- package/build/components/list-view/use-clipboard-handler.js.map +1 -1
- package/build/components/list-view/use-list-view-block-indexes.js.map +1 -1
- package/build/components/list-view/use-list-view-client-ids.js.map +1 -1
- package/build/components/list-view/use-list-view-collapse-items.js.map +1 -1
- package/build/components/list-view/use-list-view-drop-zone.js +6 -1
- package/build/components/list-view/use-list-view-drop-zone.js.map +1 -1
- package/build/components/list-view/use-list-view-expand-selected-item.js.map +1 -1
- package/build/components/list-view/use-list-view-images.js.map +1 -1
- package/build/components/list-view/use-list-view-scroll-into-view.js.map +1 -1
- package/build/components/list-view/utils.js +3 -1
- package/build/components/list-view/utils.js.map +1 -1
- package/build/components/media-placeholder/index.js +3 -3
- package/build/components/media-placeholder/index.js.map +1 -1
- package/build/components/media-placeholder/index.native.js.map +1 -1
- package/build/components/media-replace-flow/index.js.map +1 -1
- package/build/components/media-replace-flow/index.native.js.map +1 -1
- package/build/components/media-upload/check.js.map +1 -1
- package/build/components/media-upload/constants.native.js.map +1 -1
- package/build/components/media-upload/index.js.map +1 -1
- package/build/components/media-upload/index.native.js.map +1 -1
- package/build/components/media-upload-progress/constants.js.map +1 -1
- package/build/components/media-upload-progress/index.native.js.map +1 -1
- package/build/components/multi-selection-inspector/index.js.map +1 -1
- package/build/components/navigable-toolbar/index.js +3 -1
- package/build/components/navigable-toolbar/index.js.map +1 -1
- package/build/components/observe-typing/index.js.map +1 -1
- package/build/components/panel-color-settings/index.js.map +1 -1
- package/build/components/plain-text/index.js.map +1 -1
- package/build/components/plain-text/index.native.js.map +1 -1
- package/build/components/preview-options/index.js.map +1 -1
- package/build/components/provider/block-refs-provider.js +3 -4
- package/build/components/provider/block-refs-provider.js.map +1 -1
- package/build/components/provider/index.js.map +1 -1
- package/build/components/provider/index.native.js.map +1 -1
- package/build/components/provider/use-block-sync.js +3 -12
- package/build/components/provider/use-block-sync.js.map +1 -1
- package/build/components/provider/with-registry-provider.js.map +1 -1
- package/build/components/publish-date-time-picker/index.js.map +1 -1
- package/build/components/recursion-provider/index.js +2 -2
- package/build/components/recursion-provider/index.js.map +1 -1
- package/build/components/resizable-box-popover/index.js.map +1 -1
- package/build/components/resolution-tool/index.js.map +1 -1
- package/build/components/responsive-block-control/index.js.map +1 -1
- package/build/components/responsive-block-control/label.js.map +1 -1
- package/build/components/rich-text/content.js +26 -19
- package/build/components/rich-text/content.js.map +1 -1
- package/build/components/rich-text/embed-handler-picker.native.js.map +1 -1
- package/build/components/rich-text/event-listeners/before-input-rules.js +93 -0
- package/build/components/rich-text/event-listeners/before-input-rules.js.map +1 -0
- package/build/components/rich-text/event-listeners/delete.js +58 -0
- package/build/components/rich-text/event-listeners/delete.js.map +1 -0
- package/build/components/rich-text/event-listeners/enter.js +98 -0
- package/build/components/rich-text/event-listeners/enter.js.map +1 -0
- package/build/components/rich-text/event-listeners/firefox-compat.js +36 -0
- package/build/components/rich-text/event-listeners/firefox-compat.js.map +1 -0
- package/build/components/rich-text/event-listeners/index.js +44 -0
- package/build/components/rich-text/event-listeners/index.js.map +1 -0
- package/build/components/rich-text/event-listeners/input-events.js +22 -0
- package/build/components/rich-text/event-listeners/input-events.js.map +1 -0
- package/build/components/rich-text/event-listeners/input-rules.js +135 -0
- package/build/components/rich-text/event-listeners/input-rules.js.map +1 -0
- package/build/components/rich-text/event-listeners/insert-replacement-text.js +33 -0
- package/build/components/rich-text/event-listeners/insert-replacement-text.js.map +1 -0
- package/build/components/rich-text/event-listeners/paste-handler.js +146 -0
- package/build/components/rich-text/event-listeners/paste-handler.js.map +1 -0
- package/build/components/rich-text/event-listeners/remove-browser-shortcuts.js +27 -0
- package/build/components/rich-text/event-listeners/remove-browser-shortcuts.js.map +1 -0
- package/build/components/rich-text/event-listeners/shortcuts.js +22 -0
- package/build/components/rich-text/event-listeners/shortcuts.js.map +1 -0
- package/build/components/rich-text/event-listeners/undo-automatic-change.js +51 -0
- package/build/components/rich-text/event-listeners/undo-automatic-change.js.map +1 -0
- package/build/components/rich-text/file-paste-handler.native.js.map +1 -1
- package/build/components/rich-text/format-edit.js.map +1 -1
- package/build/components/rich-text/format-toolbar/index.js.map +1 -1
- package/build/components/rich-text/format-toolbar/index.native.js.map +1 -1
- package/build/components/rich-text/format-toolbar-container.js.map +1 -1
- package/build/components/rich-text/format-toolbar-container.native.js.map +1 -1
- package/build/components/rich-text/get-rich-text-values.js.map +1 -1
- package/build/components/rich-text/index.js +51 -31
- package/build/components/rich-text/index.js.map +1 -1
- package/build/components/rich-text/index.native.js +16 -4
- package/build/components/rich-text/index.native.js.map +1 -1
- package/build/components/rich-text/input-event.js.map +1 -1
- package/build/components/rich-text/input-event.native.js.map +1 -1
- package/build/components/rich-text/multiline.js +6 -2
- package/build/components/rich-text/multiline.js.map +1 -1
- package/build/components/rich-text/native/format-edit.js.map +1 -1
- package/build/components/rich-text/native/get-format-colors.native.js.map +1 -1
- package/build/components/rich-text/native/index.js.map +1 -1
- package/build/components/rich-text/native/index.native.js +12 -0
- package/build/components/rich-text/native/index.native.js.map +1 -1
- package/build/components/rich-text/native/toolbar-button-with-options.native.js.map +1 -1
- package/build/components/rich-text/native/use-format-types.js.map +1 -1
- package/build/components/rich-text/prevent-event-discovery.js.map +1 -1
- package/build/components/rich-text/remove-browser-shortcuts.native.js.map +1 -1
- package/build/components/rich-text/shortcut.js.map +1 -1
- package/build/components/rich-text/shortcut.native.js.map +1 -1
- package/build/components/rich-text/split-value.js.map +1 -1
- package/build/components/rich-text/toolbar-button.js.map +1 -1
- package/build/components/rich-text/use-format-types.js +8 -4
- package/build/components/rich-text/use-format-types.js.map +1 -1
- package/build/components/rich-text/use-mark-persistent.js.map +1 -1
- package/build/components/rich-text/utils.js.map +1 -1
- package/build/components/rich-text/with-deprecations.js.map +1 -1
- package/build/components/segmented-text-control/index.js +62 -0
- package/build/components/segmented-text-control/index.js.map +1 -0
- package/build/components/selection-scroll-into-view/index.js.map +1 -1
- package/build/components/skip-to-selected-block/index.js.map +1 -1
- package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
- package/build/components/spacing-sizes-control/index.js.map +1 -1
- package/build/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
- package/build/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
- package/build/components/spacing-sizes-control/input-controls/single.js.map +1 -1
- package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js +16 -2
- package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
- package/build/components/spacing-sizes-control/sides-dropdown/index.js.map +1 -1
- package/build/components/spacing-sizes-control/utils.js.map +1 -1
- package/build/components/text-alignment-control/index.js +76 -0
- package/build/components/text-alignment-control/index.js.map +1 -0
- package/build/components/text-decoration-control/index.js +21 -25
- package/build/components/text-decoration-control/index.js.map +1 -1
- package/build/components/text-transform-control/index.js +18 -22
- package/build/components/text-transform-control/index.js.map +1 -1
- package/build/components/tool-selector/index.js.map +1 -1
- package/build/components/typewriter/index.js.map +1 -1
- package/build/components/ungroup-button/index.native.js.map +1 -1
- package/build/components/unit-control/index.js.map +1 -1
- package/build/components/unsupported-block-details/index.native.js.map +1 -1
- package/build/components/url-input/button.js.map +1 -1
- package/build/components/url-input/index.js.map +1 -1
- package/build/components/url-input/index.native.js.map +1 -1
- package/build/components/url-popover/image-url-input-ui.js.map +1 -1
- package/build/components/url-popover/index.js.map +1 -1
- package/build/components/url-popover/link-editor.js.map +1 -1
- package/build/components/url-popover/link-viewer-url.js.map +1 -1
- package/build/components/url-popover/link-viewer.js.map +1 -1
- package/build/components/use-block-commands/index.js +20 -2
- package/build/components/use-block-commands/index.js.map +1 -1
- package/build/components/use-block-display-information/index.js +9 -3
- package/build/components/use-block-display-information/index.js.map +1 -1
- package/build/components/use-block-drop-zone/index.js.map +1 -1
- package/build/components/use-block-drop-zone/index.native.js.map +1 -1
- package/build/components/use-flash-editable-blocks/index.js.map +1 -1
- package/build/components/use-moving-animation/index.js.map +1 -1
- package/build/components/use-on-block-drop/index.js +3 -1
- package/build/components/use-on-block-drop/index.js.map +1 -1
- package/build/components/use-on-block-drop/index.native.js.map +1 -1
- package/build/components/use-on-block-drop/types.js.map +1 -1
- package/build/components/use-paste-styles/index.js +1 -0
- package/build/components/use-paste-styles/index.js.map +1 -1
- package/build/components/use-resize-canvas/index.js.map +1 -1
- package/build/components/use-settings/index.js.map +1 -1
- package/build/components/use-unsupported-block-editor/index.native.js.map +1 -1
- package/build/components/video-player/gridicon-play.native.js.map +1 -1
- package/build/components/video-player/index.native.js.map +1 -1
- package/build/components/warning/index.js.map +1 -1
- package/build/components/warning/index.native.js.map +1 -1
- package/build/components/writing-flow/index.js.map +1 -1
- package/build/components/writing-flow/use-arrow-nav.js.map +1 -1
- package/build/components/writing-flow/use-click-selection.js.map +1 -1
- package/build/components/writing-flow/use-clipboard-handler.js.map +1 -1
- package/build/components/writing-flow/use-drag-selection.js +3 -1
- package/build/components/writing-flow/use-drag-selection.js.map +1 -1
- package/build/components/writing-flow/use-input.js.map +1 -1
- package/build/components/writing-flow/use-multi-selection.js.map +1 -1
- package/build/components/writing-flow/use-select-all.js.map +1 -1
- package/build/components/writing-flow/use-selection-observer.js.map +1 -1
- package/build/components/writing-flow/use-tab-nav.js +3 -1
- package/build/components/writing-flow/use-tab-nav.js.map +1 -1
- package/build/components/writing-flow/utils.js.map +1 -1
- package/build/components/writing-mode-control/index.js +16 -20
- package/build/components/writing-mode-control/index.js.map +1 -1
- package/build/elements/index.js.map +1 -1
- package/build/hooks/align.js.map +1 -1
- package/build/hooks/align.native.js +1 -1
- package/build/hooks/align.native.js.map +1 -1
- package/build/hooks/anchor.js.map +1 -1
- package/build/hooks/aria-label.js.map +1 -1
- package/build/hooks/background.js +3 -3
- package/build/hooks/background.js.map +1 -1
- package/build/hooks/block-hooks.js.map +1 -1
- package/build/hooks/block-renaming.js +0 -37
- package/build/hooks/block-renaming.js.map +1 -1
- package/build/hooks/border.js.map +1 -1
- package/build/hooks/color.js +1 -1
- package/build/hooks/color.js.map +1 -1
- package/build/hooks/compat.js.map +1 -1
- package/build/hooks/content-lock-ui.js +5 -5
- package/build/hooks/content-lock-ui.js.map +1 -1
- package/build/hooks/contrast-checker.js.map +1 -1
- package/build/hooks/custom-class-name.js.map +1 -1
- package/build/hooks/custom-class-name.native.js.map +1 -1
- package/build/hooks/dimensions.js.map +1 -1
- package/build/hooks/duotone.js +3 -1
- package/build/hooks/duotone.js.map +1 -1
- package/build/hooks/font-family.js.map +1 -1
- package/build/hooks/font-size.js.map +1 -1
- package/build/hooks/gap.js.map +1 -1
- package/build/hooks/generated-class-name.js.map +1 -1
- package/build/hooks/index.js +6 -5
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/index.native.js.map +1 -1
- package/build/hooks/layout-child.js.map +1 -1
- package/build/hooks/layout.js +38 -19
- package/build/hooks/layout.js.map +1 -1
- package/build/hooks/layout.native.js.map +1 -1
- package/build/hooks/line-height.js.map +1 -1
- package/build/hooks/lock.js.map +1 -1
- package/build/hooks/metadata.js.map +1 -1
- package/build/hooks/position.js.map +1 -1
- package/build/hooks/settings.js.map +1 -1
- package/build/hooks/spacing-visualizer.js.map +1 -1
- package/build/hooks/style.js.map +1 -1
- package/build/hooks/supports.js +27 -4
- package/build/hooks/supports.js.map +1 -1
- package/build/hooks/text-align.js +156 -0
- package/build/hooks/text-align.js.map +1 -0
- package/build/hooks/typography.js +3 -2
- package/build/hooks/typography.js.map +1 -1
- package/build/hooks/typography.native.js.map +1 -1
- package/build/hooks/use-bindings-attributes.js +66 -129
- package/build/hooks/use-bindings-attributes.js.map +1 -1
- package/build/hooks/use-border-props.js.map +1 -1
- package/build/hooks/use-cached-truthy.js.map +1 -1
- package/build/hooks/use-color-props.js.map +1 -1
- package/build/hooks/use-editor-wrapper-styles.native.js.map +1 -1
- package/build/hooks/use-shadow-props.js.map +1 -1
- package/build/hooks/use-spacing-props.js.map +1 -1
- package/build/hooks/use-typography-props.js +2 -1
- package/build/hooks/use-typography-props.js.map +1 -1
- package/build/hooks/use-zoom-out.js +22 -15
- package/build/hooks/use-zoom-out.js.map +1 -1
- package/build/hooks/utils.js +37 -8
- package/build/hooks/utils.js.map +1 -1
- package/build/index.js.map +1 -1
- package/build/index.native.js.map +1 -1
- package/build/layouts/constrained.js.map +1 -1
- package/build/layouts/definitions.js +8 -6
- package/build/layouts/definitions.js.map +1 -1
- package/build/layouts/flex.js.map +1 -1
- package/build/layouts/flow.js.map +1 -1
- package/build/layouts/grid.js +52 -9
- package/build/layouts/grid.js.map +1 -1
- package/build/layouts/index.js.map +1 -1
- package/build/layouts/utils.js.map +1 -1
- package/build/lock-unlock.js.map +1 -1
- package/build/private-apis.js +5 -3
- package/build/private-apis.js.map +1 -1
- package/build/private-apis.native.js +1 -1
- package/build/private-apis.native.js.map +1 -1
- package/build/store/actions.js +47 -9
- package/build/store/actions.js.map +1 -1
- package/build/store/array.js.map +1 -1
- package/build/store/constants.js.map +1 -1
- package/build/store/defaults.js.map +1 -1
- package/build/store/defaults.native.js.map +1 -1
- package/build/store/get-block-settings.js.map +1 -1
- package/build/store/index.js +1 -1
- package/build/store/index.js.map +1 -1
- package/build/store/private-actions.js +5 -2
- package/build/store/private-actions.js.map +1 -1
- package/build/store/private-keys.js.map +1 -1
- package/build/store/private-selectors.js +121 -44
- package/build/store/private-selectors.js.map +1 -1
- package/build/store/reducer.js +11 -8
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +143 -88
- package/build/store/selectors.js.map +1 -1
- package/build/store/undo-ignore.js.map +1 -1
- package/build/store/utils.js.map +1 -1
- package/build/utils/dom.js.map +1 -1
- package/build/utils/get-px-from-css-unit.js.map +1 -1
- package/build/utils/index.js.map +1 -1
- package/build/utils/math.js.map +1 -1
- package/build/utils/object.js +17 -0
- package/build/utils/object.js.map +1 -1
- package/build/utils/order-inserter-block-items.js +6 -2
- package/build/utils/order-inserter-block-items.js.map +1 -1
- package/build/utils/pasting.js +6 -2
- package/build/utils/pasting.js.map +1 -1
- package/build/utils/selection.js.map +1 -1
- package/build/utils/sorting.js.map +1 -1
- package/build/utils/transform-styles/index.js +1 -1
- package/build/utils/transform-styles/index.js.map +1 -1
- package/build/utils/use-notify-copy.js.map +1 -1
- package/build-module/autocompleters/block.js.map +1 -1
- package/build-module/autocompleters/link.js.map +1 -1
- package/build-module/components/alignment-control/index.js.map +1 -1
- package/build-module/components/alignment-control/ui.js +3 -1
- package/build-module/components/alignment-control/ui.js.map +1 -1
- package/build-module/components/autocomplete/index.js.map +1 -1
- package/build-module/components/block-actions/index.js.map +1 -1
- package/build-module/components/block-alignment-control/constants.js.map +1 -1
- package/build-module/components/block-alignment-control/index.js.map +1 -1
- package/build-module/components/block-alignment-control/ui.js.map +1 -1
- package/build-module/components/block-alignment-control/ui.native.js.map +1 -1
- package/build-module/components/block-alignment-control/use-available-alignments.js.map +1 -1
- package/build-module/components/block-alignment-matrix-control/index.js.map +1 -1
- package/build-module/components/block-bindings-toolbar-indicator/index.js.map +1 -1
- package/build-module/components/block-breadcrumb/index.js.map +1 -1
- package/build-module/components/block-canvas/index.js.map +1 -1
- package/build-module/components/block-caption/index.native.js.map +1 -1
- package/build-module/components/block-card/index.js.map +1 -1
- package/build-module/components/block-compare/block-view.js.map +1 -1
- package/build-module/components/block-compare/index.js.map +1 -1
- package/build-module/components/block-content-overlay/index.js.map +1 -1
- package/build-module/components/block-context/index.js.map +1 -1
- package/build-module/components/block-controls/fill.js.map +1 -1
- package/build-module/components/block-controls/groups.js.map +1 -1
- package/build-module/components/block-controls/hook.js.map +1 -1
- package/build-module/components/block-controls/index.js.map +1 -1
- package/build-module/components/block-controls/slot.js.map +1 -1
- package/build-module/components/block-controls/slot.native.js.map +1 -1
- package/build-module/components/block-controls/use-has-block-controls.js.map +1 -1
- package/build-module/components/block-draggable/draggable-chip.js.map +1 -1
- package/build-module/components/block-draggable/draggable-chip.native.js.map +1 -1
- package/build-module/components/block-draggable/dropping-insertion-point.native.js.map +1 -1
- package/build-module/components/block-draggable/index.js.map +1 -1
- package/build-module/components/block-draggable/index.native.js.map +1 -1
- package/build-module/components/block-draggable/use-scroll-when-dragging.js.map +1 -1
- package/build-module/components/block-draggable/use-scroll-when-dragging.native.js.map +1 -1
- package/build-module/components/block-edit/context.js +1 -0
- package/build-module/components/block-edit/context.js.map +1 -1
- package/build-module/components/block-edit/edit.js.map +1 -1
- package/build-module/components/block-edit/edit.native.js.map +1 -1
- package/build-module/components/block-edit/index.js +5 -3
- package/build-module/components/block-edit/index.js.map +1 -1
- package/build-module/components/block-edit-visually-button/index.js.map +1 -1
- package/build-module/components/block-editing-mode/index.js.map +1 -1
- package/build-module/components/block-full-height-alignment-control/index.js.map +1 -1
- package/build-module/components/block-heading-level-dropdown/heading-level-icon.js.map +1 -1
- package/build-module/components/block-heading-level-dropdown/index.js.map +1 -1
- package/build-module/components/block-heading-level-dropdown/index.native.js.map +1 -1
- package/build-module/components/block-icon/index.js.map +1 -1
- package/build-module/components/block-icon/index.native.js.map +1 -1
- package/build-module/components/block-info-slot-fill/index.js.map +1 -1
- package/build-module/components/block-inspector/index.js +5 -4
- package/build-module/components/block-inspector/index.js.map +1 -1
- package/build-module/components/block-inspector/useBlockInspectorAnimationSettings.js.map +1 -1
- package/build-module/components/block-list/block-crash-boundary.js.map +1 -1
- package/build-module/components/block-list/block-crash-boundary.native.js.map +1 -1
- package/build-module/components/block-list/block-crash-warning.js.map +1 -1
- package/build-module/components/block-list/block-crash-warning.native.js.map +1 -1
- package/build-module/components/block-list/block-html.js.map +1 -1
- package/build-module/components/block-list/block-invalid-warning.js.map +1 -1
- package/build-module/components/block-list/block-invalid-warning.native.js.map +1 -1
- package/build-module/components/block-list/block-list-context.native.js.map +1 -1
- package/build-module/components/block-list/block-list-item-cell.native.js.map +1 -1
- package/build-module/components/block-list/block-list-item.native.js.map +1 -1
- package/build-module/components/block-list/block-outline.native.js.map +1 -1
- package/build-module/components/block-list/block-selection-button.native.js.map +1 -1
- package/build-module/components/block-list/block.js +44 -35
- package/build-module/components/block-list/block.js.map +1 -1
- package/build-module/components/block-list/block.native.js +2 -2
- package/build-module/components/block-list/block.native.js.map +1 -1
- package/build-module/components/block-list/grid-item.native.js.map +1 -1
- package/build-module/components/block-list/index.js +18 -6
- package/build-module/components/block-list/index.js.map +1 -1
- package/build-module/components/block-list/index.native.js +1 -9
- package/build-module/components/block-list/index.native.js.map +1 -1
- package/build-module/components/block-list/insertion-point.native.js.map +1 -1
- package/build-module/components/block-list/layout.js.map +1 -1
- package/build-module/components/block-list/private-block-context.js.map +1 -1
- package/build-module/components/block-list/subdirectory-icon.js.map +1 -1
- package/build-module/components/block-list/use-block-props/index.js +8 -7
- package/build-module/components/block-list/use-block-props/index.js.map +1 -1
- package/build-module/components/block-list/use-block-props/index.native.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-block-refs.js +19 -48
- package/build-module/components/block-list/use-block-props/use-block-refs.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-focus-first-element.js +3 -2
- package/build-module/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-focus-handler.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-intersection-observer.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-is-hovered.js +10 -14
- package/build-module/components/block-list/use-block-props/use-is-hovered.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-nav-mode-exit.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +1 -1
- package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
- package/build-module/components/block-list/use-scroll-upon-insertion.native.js.map +1 -1
- package/build-module/components/block-list-appender/index.js.map +1 -1
- package/build-module/components/block-list-appender/index.native.js.map +1 -1
- package/build-module/components/block-lock/index.js.map +1 -1
- package/build-module/components/block-lock/menu-item.js.map +1 -1
- package/build-module/components/block-lock/modal.js.map +1 -1
- package/build-module/components/block-lock/toolbar.js.map +1 -1
- package/build-module/components/block-lock/use-block-lock.js.map +1 -1
- package/build-module/components/block-media-update-progress/index.native.js.map +1 -1
- package/build-module/components/block-mover/button.js.map +1 -1
- package/build-module/components/block-mover/index.js.map +1 -1
- package/build-module/components/block-mover/index.native.js +3 -1
- package/build-module/components/block-mover/index.native.js.map +1 -1
- package/build-module/components/block-mover/mover-description.js.map +1 -1
- package/build-module/components/block-mover/mover-description.native.js.map +1 -1
- package/build-module/components/block-navigation/dropdown.js.map +1 -1
- package/build-module/components/block-parent-selector/index.js.map +1 -1
- package/build-module/components/block-pattern-setup/constants.js.map +1 -1
- package/build-module/components/block-pattern-setup/index.js.map +1 -1
- package/build-module/components/block-pattern-setup/setup-toolbar.js.map +1 -1
- package/build-module/components/block-pattern-setup/use-patterns-setup.js.map +1 -1
- package/build-module/components/block-patterns-list/index.js.map +1 -1
- package/build-module/components/block-patterns-paging/index.js +8 -4
- package/build-module/components/block-patterns-paging/index.js.map +1 -1
- package/build-module/components/block-popover/cover.js.map +1 -1
- package/build-module/components/block-popover/drop-zone.js.map +1 -1
- package/build-module/components/block-popover/inbetween.js.map +1 -1
- package/build-module/components/block-popover/index.js.map +1 -1
- package/build-module/components/block-popover/use-popover-scroll.js.map +1 -1
- package/build-module/components/block-preview/auto.js.map +1 -1
- package/build-module/components/block-preview/index.js.map +1 -1
- package/build-module/components/block-quick-navigation/index.js.map +1 -1
- package/build-module/components/block-removal-warning-modal/index.js.map +1 -1
- package/build-module/components/block-rename/index.js.map +1 -1
- package/build-module/components/block-rename/is-empty-string.js.map +1 -1
- package/build-module/components/block-rename/modal.js +14 -10
- package/build-module/components/block-rename/modal.js.map +1 -1
- package/build-module/components/block-rename/rename-control.js +3 -1
- package/build-module/components/block-rename/rename-control.js.map +1 -1
- package/build-module/components/block-rename/use-block-rename.js.map +1 -1
- package/build-module/components/block-selection-clearer/index.js.map +1 -1
- package/build-module/components/block-settings/button.native.js.map +1 -1
- package/build-module/components/block-settings/container.native.js.map +1 -1
- package/build-module/components/block-settings/index.native.js.map +1 -1
- package/build-module/components/block-settings-menu/block-html-convert-button.js.map +1 -1
- package/build-module/components/block-settings-menu/block-mode-toggle.js.map +1 -1
- package/build-module/components/block-settings-menu/block-parent-selector-menu-item.js.map +1 -1
- package/build-module/components/block-settings-menu/block-settings-dropdown.js +1 -26
- package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build-module/components/block-settings-menu/block-settings-menu-first-item.js.map +1 -1
- package/build-module/components/block-settings-menu/index.js.map +1 -1
- package/build-module/components/block-settings-menu-controls/index.js.map +1 -1
- package/build-module/components/block-styles/index.js.map +1 -1
- package/build-module/components/block-styles/index.native.js.map +1 -1
- package/build-module/components/block-styles/menu-items.js.map +1 -1
- package/build-module/components/block-styles/preview-panel.js.map +1 -1
- package/build-module/components/block-styles/preview.native.js.map +1 -1
- package/build-module/components/block-styles/use-styles-for-block.js.map +1 -1
- package/build-module/components/block-styles/utils.js.map +1 -1
- package/build-module/components/block-switcher/block-styles-menu.js.map +1 -1
- package/build-module/components/block-switcher/block-transformations-menu.js.map +1 -1
- package/build-module/components/block-switcher/block-transformations-menu.native.js.map +1 -1
- package/build-module/components/block-switcher/block-variation-transformations.js.map +1 -1
- package/build-module/components/block-switcher/index.js.map +1 -1
- package/build-module/components/block-switcher/pattern-transformations-menu.js +3 -1
- package/build-module/components/block-switcher/pattern-transformations-menu.js.map +1 -1
- package/build-module/components/block-switcher/preview-block-popover.js.map +1 -1
- package/build-module/components/block-switcher/use-transformed-patterns.js +6 -2
- package/build-module/components/block-switcher/use-transformed-patterns.js.map +1 -1
- package/build-module/components/block-switcher/utils.js +15 -5
- package/build-module/components/block-switcher/utils.js.map +1 -1
- package/build-module/components/block-title/index.js.map +1 -1
- package/build-module/components/block-title/use-block-display-title.js.map +1 -1
- package/build-module/components/block-toolbar/block-name-context.js.map +1 -1
- package/build-module/components/block-toolbar/block-toolbar-last-item.js.map +1 -1
- package/build-module/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
- package/build-module/components/block-toolbar/index.js +1 -1
- package/build-module/components/block-toolbar/index.js.map +1 -1
- package/build-module/components/block-toolbar/index.native.js.map +1 -1
- package/build-module/components/block-toolbar/shuffle.js.map +1 -1
- package/build-module/components/block-toolbar/use-has-block-toolbar.js +20 -12
- package/build-module/components/block-toolbar/use-has-block-toolbar.js.map +1 -1
- package/build-module/components/block-toolbar/utils.js.map +1 -1
- package/build-module/components/block-tools/block-selection-button.js +16 -12
- package/build-module/components/block-tools/block-selection-button.js.map +1 -1
- package/build-module/components/block-tools/block-toolbar-breadcrumb.js.map +1 -1
- package/build-module/components/block-tools/block-toolbar-popover.js.map +1 -1
- package/build-module/components/block-tools/empty-block-inserter.js.map +1 -1
- package/build-module/components/block-tools/index.js +3 -1
- package/build-module/components/block-tools/index.js.map +1 -1
- package/build-module/components/block-tools/insertion-point.js.map +1 -1
- package/build-module/components/block-tools/use-block-toolbar-popover-props.js.map +1 -1
- package/build-module/components/block-tools/use-selected-block-tool-props.js.map +1 -1
- package/build-module/components/block-tools/use-show-block-tools.js +9 -18
- package/build-module/components/block-tools/use-show-block-tools.js.map +1 -1
- package/build-module/components/block-tools/zoom-out-mode-inserters.js +5 -1
- package/build-module/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
- package/build-module/components/block-types-list/index.js.map +1 -1
- package/build-module/components/block-types-list/index.native.js.map +1 -1
- package/build-module/components/block-variation-picker/index.js +3 -2
- package/build-module/components/block-variation-picker/index.js.map +1 -1
- package/build-module/components/block-variation-picker/index.native.js.map +1 -1
- package/build-module/components/block-variation-transforms/index.js +7 -2
- package/build-module/components/block-variation-transforms/index.js.map +1 -1
- package/build-module/components/block-vertical-alignment-control/icons.js.map +1 -1
- package/build-module/components/block-vertical-alignment-control/index.js.map +1 -1
- package/build-module/components/block-vertical-alignment-control/ui.js.map +1 -1
- package/build-module/components/border-radius-control/all-input-control.js.map +1 -1
- package/build-module/components/border-radius-control/index.js.map +1 -1
- package/build-module/components/border-radius-control/input-controls.js.map +1 -1
- package/build-module/components/border-radius-control/linked-button.js.map +1 -1
- package/build-module/components/border-radius-control/utils.js.map +1 -1
- package/build-module/components/button-block-appender/index.js.map +1 -1
- package/build-module/components/button-block-appender/index.native.js +11 -1
- package/build-module/components/button-block-appender/index.native.js.map +1 -1
- package/build-module/components/caption/index.native.js.map +1 -1
- package/build-module/components/child-layout-control/index.js.map +1 -1
- package/build-module/components/color-palette/control.js.map +1 -1
- package/build-module/components/color-palette/index.js.map +1 -1
- package/build-module/components/color-palette/with-color-context.js.map +1 -1
- package/build-module/components/color-style-selector/index.js.map +1 -1
- package/build-module/components/colors/index.js.map +1 -1
- package/build-module/components/colors/utils.js.map +1 -1
- package/build-module/components/colors/with-colors.js.map +1 -1
- package/build-module/components/colors-gradients/control.js.map +1 -1
- package/build-module/components/colors-gradients/dropdown.js.map +1 -1
- package/build-module/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
- package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
- package/build-module/components/colors-gradients/use-multiple-origin-colors-and-gradients.js.map +1 -1
- package/build-module/components/contrast-checker/index.js.map +1 -1
- package/build-module/components/contrast-checker/index.native.js.map +1 -1
- package/build-module/components/convert-to-group-buttons/index.js.map +1 -1
- package/build-module/components/convert-to-group-buttons/index.native.js.map +1 -1
- package/build-module/components/convert-to-group-buttons/toolbar.js.map +1 -1
- package/build-module/components/convert-to-group-buttons/use-convert-to-group-button-props.js.map +1 -1
- package/build-module/components/copy-handler/index.js.map +1 -1
- package/build-module/components/date-format-picker/index.js.map +1 -1
- package/build-module/components/default-block-appender/index.js.map +1 -1
- package/build-module/components/default-block-appender/index.native.js.map +1 -1
- package/build-module/components/dimensions-tool/aspect-ratio-tool.js.map +1 -1
- package/build-module/components/dimensions-tool/index.js.map +1 -1
- package/build-module/components/dimensions-tool/scale-tool.js.map +1 -1
- package/build-module/components/dimensions-tool/width-height-tool.js.map +1 -1
- package/build-module/components/duotone/utils.js.map +1 -1
- package/build-module/components/duotone-control/index.js.map +1 -1
- package/build-module/components/editable-text/index.js.map +1 -1
- package/build-module/components/editor-styles/index.js +3 -2
- package/build-module/components/editor-styles/index.js.map +1 -1
- package/build-module/components/floating-toolbar/index.native.js +9 -5
- package/build-module/components/floating-toolbar/index.native.js.map +1 -1
- package/build-module/components/floating-toolbar/nav-up-icon.js.map +1 -1
- package/build-module/components/font-appearance-control/index.js.map +1 -1
- package/build-module/components/font-family/index.js.map +1 -1
- package/build-module/components/font-sizes/fluid-utils.js.map +1 -1
- package/build-module/components/font-sizes/font-size-picker.js.map +1 -1
- package/build-module/components/font-sizes/index.js.map +1 -1
- package/build-module/components/font-sizes/index.native.js.map +1 -1
- package/build-module/components/font-sizes/utils.js.map +1 -1
- package/build-module/components/font-sizes/with-font-sizes.js.map +1 -1
- package/build-module/components/global-styles/advanced-panel.js.map +1 -1
- package/build-module/components/global-styles/background-panel.js +20 -17
- package/build-module/components/global-styles/background-panel.js.map +1 -1
- package/build-module/components/global-styles/border-panel.js.map +1 -1
- package/build-module/components/global-styles/color-panel.js +3 -1
- package/build-module/components/global-styles/color-panel.js.map +1 -1
- package/build-module/components/global-styles/color-panel.native.js.map +1 -1
- package/build-module/components/global-styles/context.js.map +1 -1
- package/build-module/components/global-styles/dimensions-panel.js +17 -1
- package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
- package/build-module/components/global-styles/filters-panel.js.map +1 -1
- package/build-module/components/global-styles/get-block-css-selector.js.map +1 -1
- package/build-module/components/global-styles/get-global-styles-changes.js.map +1 -1
- package/build-module/components/global-styles/hooks.js +3 -2
- package/build-module/components/global-styles/hooks.js.map +1 -1
- package/build-module/components/global-styles/image-settings-panel.js.map +1 -1
- package/build-module/components/global-styles/index.js.map +1 -1
- package/build-module/components/global-styles/shadow-panel-components.js.map +1 -1
- package/build-module/components/global-styles/typography-panel.js +24 -24
- package/build-module/components/global-styles/typography-panel.js.map +1 -1
- package/build-module/components/global-styles/typography-utils.js.map +1 -1
- package/build-module/components/global-styles/use-global-styles-output.js +153 -136
- package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build-module/components/global-styles/utils.js +44 -0
- package/build-module/components/global-styles/utils.js.map +1 -1
- package/build-module/components/gradients/index.js.map +1 -1
- package/build-module/components/gradients/index.native.js.map +1 -1
- package/build-module/components/gradients/use-gradient.js.map +1 -1
- package/build-module/components/gradients/with-gradient.js.map +1 -1
- package/build-module/components/grid-visualizer/grid-item-resizer.js.map +1 -1
- package/build-module/components/grid-visualizer/grid-visualizer.js.map +1 -1
- package/build-module/components/grid-visualizer/index.js.map +1 -1
- package/build-module/components/grid-visualizer/utils.js.map +1 -1
- package/build-module/components/height-control/index.js.map +1 -1
- package/build-module/components/iframe/get-compatibility-styles.js.map +1 -1
- package/build-module/components/iframe/index.js +12 -13
- package/build-module/components/iframe/index.js.map +1 -1
- package/build-module/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
- package/build-module/components/image-editor/constants.js.map +1 -1
- package/build-module/components/image-editor/context.js.map +1 -1
- package/build-module/components/image-editor/cropper.js +7 -3
- package/build-module/components/image-editor/cropper.js.map +1 -1
- package/build-module/components/image-editor/form-controls.js.map +1 -1
- package/build-module/components/image-editor/index.js +0 -2
- package/build-module/components/image-editor/index.js.map +1 -1
- package/build-module/components/image-editor/rotation-button.js.map +1 -1
- package/build-module/components/image-editor/use-save-image.js.map +1 -1
- package/build-module/components/image-editor/use-transform-image.js.map +1 -1
- package/build-module/components/image-editor/zoom-dropdown.js.map +1 -1
- package/build-module/components/image-link-destinations/index.native.js.map +1 -1
- package/build-module/components/image-size-control/index.js.map +1 -1
- package/build-module/components/image-size-control/use-dimension-handler.js.map +1 -1
- package/build-module/components/index.js.map +1 -1
- package/build-module/components/index.native.js.map +1 -1
- package/build-module/components/inner-blocks/button-block-appender.js.map +1 -1
- package/build-module/components/inner-blocks/constants.native.js.map +1 -1
- package/build-module/components/inner-blocks/default-block-appender.js.map +1 -1
- package/build-module/components/inner-blocks/index.js +16 -2
- package/build-module/components/inner-blocks/index.js.map +1 -1
- package/build-module/components/inner-blocks/index.native.js.map +1 -1
- package/build-module/components/inner-blocks/use-block-context.js.map +1 -1
- package/build-module/components/inner-blocks/use-inner-block-template-sync.js.map +1 -1
- package/build-module/components/inner-blocks/use-nested-settings-update.js.map +1 -1
- package/build-module/components/inner-blocks/warning-max-depth-exceeded.native.js.map +1 -1
- package/build-module/components/inner-blocks/with-client-id.js.map +1 -1
- package/build-module/components/inserter/block-patterns-explorer/index.js.map +1 -1
- package/build-module/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js.map +1 -1
- package/build-module/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab/index.js +20 -26
- package/build-module/components/inserter/block-patterns-tab/index.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +2 -24
- package/build-module/components/inserter/block-patterns-tab/pattern-category-preview-panel.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js +2 -4
- package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab/use-pattern-categories.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab/utils.js.map +1 -1
- package/build-module/components/inserter/block-types-tab.js +4 -0
- package/build-module/components/inserter/block-types-tab.js.map +1 -1
- package/build-module/components/inserter/block-types-tab.native.js.map +1 -1
- package/build-module/components/inserter/category-tabs/index.js +49 -0
- package/build-module/components/inserter/category-tabs/index.js.map +1 -0
- package/build-module/components/inserter/hooks/use-block-type-impressions.native.js.map +1 -1
- package/build-module/components/inserter/hooks/use-block-types-state.js.map +1 -1
- package/build-module/components/inserter/hooks/use-clipboard-block.native.js.map +1 -1
- package/build-module/components/inserter/hooks/use-insertion-point.js.map +1 -1
- package/build-module/components/inserter/hooks/use-patterns-paging.js.map +1 -1
- package/build-module/components/inserter/hooks/use-patterns-state.js.map +1 -1
- package/build-module/components/inserter/index.js.map +1 -1
- package/build-module/components/inserter/index.native.js.map +1 -1
- package/build-module/components/inserter/library.js.map +1 -1
- package/build-module/components/inserter/media-tab/hooks.js.map +1 -1
- package/build-module/components/inserter/media-tab/index.js +1 -1
- package/build-module/components/inserter/media-tab/index.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-list.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-panel.js +0 -24
- package/build-module/components/inserter/media-tab/media-panel.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-preview.js +13 -3
- package/build-module/components/inserter/media-tab/media-preview.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-tab.js +17 -31
- package/build-module/components/inserter/media-tab/media-tab.js.map +1 -1
- package/build-module/components/inserter/media-tab/utils.js.map +1 -1
- package/build-module/components/inserter/menu.js +75 -79
- package/build-module/components/inserter/menu.js.map +1 -1
- package/build-module/components/inserter/menu.native.js.map +1 -1
- package/build-module/components/inserter/mobile-tab-navigation.js.map +1 -1
- package/build-module/components/inserter/no-results.js.map +1 -1
- package/build-module/components/inserter/no-results.native.js.map +1 -1
- package/build-module/components/inserter/panel.js.map +1 -1
- package/build-module/components/inserter/preview-panel.js.map +1 -1
- package/build-module/components/inserter/quick-inserter.js.map +1 -1
- package/build-module/components/inserter/reusable-block-rename-hint.js.map +1 -1
- package/build-module/components/inserter/reusable-blocks-tab.native.js.map +1 -1
- package/build-module/components/inserter/search-items.js.map +1 -1
- package/build-module/components/inserter/search-results.js.map +1 -1
- package/build-module/components/inserter/search-results.native.js.map +1 -1
- package/build-module/components/inserter/tabs.js +13 -9
- package/build-module/components/inserter/tabs.js.map +1 -1
- package/build-module/components/inserter/tabs.native.js.map +1 -1
- package/build-module/components/inserter/tips.js.map +1 -1
- package/build-module/components/inserter/utils.native.js.map +1 -1
- package/build-module/components/inserter-button/index.native.js.map +1 -1
- package/build-module/components/inserter-button/sparkles.js.map +1 -1
- package/build-module/components/inserter-draggable-blocks/index.js.map +1 -1
- package/build-module/components/inserter-list-item/index.js.map +1 -1
- package/build-module/components/inserter-listbox/context.js.map +1 -1
- package/build-module/components/inserter-listbox/group.js.map +1 -1
- package/build-module/components/inserter-listbox/index.js.map +1 -1
- package/build-module/components/inserter-listbox/item.js.map +1 -1
- package/build-module/components/inserter-listbox/row.js.map +1 -1
- package/build-module/components/inserter-menu-extension/index.js.map +1 -1
- package/build-module/components/inspector-controls/block-support-slot-container.js.map +1 -1
- package/build-module/components/inspector-controls/block-support-tools-panel.js.map +1 -1
- package/build-module/components/inspector-controls/fill.js.map +1 -1
- package/build-module/components/inspector-controls/fill.native.js.map +1 -1
- package/build-module/components/inspector-controls/groups.js.map +1 -1
- package/build-module/components/inspector-controls/index.js.map +1 -1
- package/build-module/components/inspector-controls/slot.js.map +1 -1
- package/build-module/components/inspector-controls/slot.native.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/advanced-controls-panel.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/advanced-controls-panel.native.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/index.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/settings-tab-hint.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/settings-tab.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/styles-tab.js +1 -1
- package/build-module/components/inspector-controls-tabs/styles-tab.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/use-is-list-view-tab-disabled.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/utils.js.map +1 -1
- package/build-module/components/inspector-popover-header/index.js.map +1 -1
- package/build-module/components/justify-content-control/index.js.map +1 -1
- package/build-module/components/justify-content-control/ui.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
- package/build-module/components/letter-spacing-control/index.js.map +1 -1
- package/build-module/components/line-height-control/index.js +6 -2
- package/build-module/components/line-height-control/index.js.map +1 -1
- package/build-module/components/line-height-control/index.native.js.map +1 -1
- package/build-module/components/line-height-control/utils.js.map +1 -1
- package/build-module/components/link-control/constants.js.map +1 -1
- package/build-module/components/link-control/index.js.map +1 -1
- package/build-module/components/link-control/is-url-like.js.map +1 -1
- package/build-module/components/link-control/link-preview.js.map +1 -1
- package/build-module/components/link-control/search-create-button.js.map +1 -1
- package/build-module/components/link-control/search-input.js.map +1 -1
- package/build-module/components/link-control/search-item.js +9 -3
- package/build-module/components/link-control/search-item.js.map +1 -1
- package/build-module/components/link-control/search-results.js.map +1 -1
- package/build-module/components/link-control/settings-drawer.js.map +1 -1
- package/build-module/components/link-control/settings.js.map +1 -1
- package/build-module/components/link-control/use-create-page.js.map +1 -1
- package/build-module/components/link-control/use-internal-value.js.map +1 -1
- package/build-module/components/link-control/use-rich-url-data.js.map +1 -1
- package/build-module/components/link-control/use-search-handler.js.map +1 -1
- package/build-module/components/link-control/viewer-slot.js.map +1 -1
- package/build-module/components/list-view/appender.js.map +1 -1
- package/build-module/components/list-view/aria-referenced-text.js.map +1 -1
- package/build-module/components/list-view/block-contents.js.map +1 -1
- package/build-module/components/list-view/block-select-button.js +7 -144
- package/build-module/components/list-view/block-select-button.js.map +1 -1
- package/build-module/components/list-view/block.js +167 -15
- package/build-module/components/list-view/block.js.map +1 -1
- package/build-module/components/list-view/branch.js.map +1 -1
- package/build-module/components/list-view/context.js.map +1 -1
- package/build-module/components/list-view/drop-indicator.js.map +1 -1
- package/build-module/components/list-view/expander.js.map +1 -1
- package/build-module/components/list-view/index.js +1 -1
- package/build-module/components/list-view/index.js.map +1 -1
- package/build-module/components/list-view/leaf.js.map +1 -1
- package/build-module/components/list-view/use-block-selection.js.map +1 -1
- package/build-module/components/list-view/use-clipboard-handler.js.map +1 -1
- package/build-module/components/list-view/use-list-view-block-indexes.js.map +1 -1
- package/build-module/components/list-view/use-list-view-client-ids.js.map +1 -1
- package/build-module/components/list-view/use-list-view-collapse-items.js.map +1 -1
- package/build-module/components/list-view/use-list-view-drop-zone.js +6 -1
- package/build-module/components/list-view/use-list-view-drop-zone.js.map +1 -1
- package/build-module/components/list-view/use-list-view-expand-selected-item.js.map +1 -1
- package/build-module/components/list-view/use-list-view-images.js.map +1 -1
- package/build-module/components/list-view/use-list-view-scroll-into-view.js.map +1 -1
- package/build-module/components/list-view/utils.js +3 -1
- package/build-module/components/list-view/utils.js.map +1 -1
- package/build-module/components/media-placeholder/index.js +3 -3
- package/build-module/components/media-placeholder/index.js.map +1 -1
- package/build-module/components/media-placeholder/index.native.js.map +1 -1
- package/build-module/components/media-replace-flow/index.js.map +1 -1
- package/build-module/components/media-replace-flow/index.native.js.map +1 -1
- package/build-module/components/media-upload/check.js.map +1 -1
- package/build-module/components/media-upload/constants.native.js.map +1 -1
- package/build-module/components/media-upload/index.js.map +1 -1
- package/build-module/components/media-upload/index.native.js.map +1 -1
- package/build-module/components/media-upload-progress/constants.js.map +1 -1
- package/build-module/components/media-upload-progress/index.native.js.map +1 -1
- package/build-module/components/multi-selection-inspector/index.js.map +1 -1
- package/build-module/components/navigable-toolbar/index.js +3 -1
- package/build-module/components/navigable-toolbar/index.js.map +1 -1
- package/build-module/components/observe-typing/index.js.map +1 -1
- package/build-module/components/panel-color-settings/index.js.map +1 -1
- package/build-module/components/plain-text/index.js.map +1 -1
- package/build-module/components/plain-text/index.native.js.map +1 -1
- package/build-module/components/preview-options/index.js.map +1 -1
- package/build-module/components/provider/block-refs-provider.js +3 -4
- package/build-module/components/provider/block-refs-provider.js.map +1 -1
- package/build-module/components/provider/index.js.map +1 -1
- package/build-module/components/provider/index.native.js.map +1 -1
- package/build-module/components/provider/use-block-sync.js +4 -13
- package/build-module/components/provider/use-block-sync.js.map +1 -1
- package/build-module/components/provider/with-registry-provider.js.map +1 -1
- package/build-module/components/publish-date-time-picker/index.js.map +1 -1
- package/build-module/components/recursion-provider/index.js +2 -2
- package/build-module/components/recursion-provider/index.js.map +1 -1
- package/build-module/components/resizable-box-popover/index.js.map +1 -1
- package/build-module/components/resolution-tool/index.js.map +1 -1
- package/build-module/components/responsive-block-control/index.js.map +1 -1
- package/build-module/components/responsive-block-control/label.js.map +1 -1
- package/build-module/components/rich-text/content.js +25 -19
- package/build-module/components/rich-text/content.js.map +1 -1
- package/build-module/components/rich-text/embed-handler-picker.native.js.map +1 -1
- package/build-module/components/rich-text/event-listeners/before-input-rules.js +86 -0
- package/build-module/components/rich-text/event-listeners/before-input-rules.js.map +1 -0
- package/build-module/components/rich-text/event-listeners/delete.js +51 -0
- package/build-module/components/rich-text/event-listeners/delete.js.map +1 -0
- package/build-module/components/rich-text/event-listeners/enter.js +92 -0
- package/build-module/components/rich-text/event-listeners/enter.js.map +1 -0
- package/build-module/components/rich-text/event-listeners/firefox-compat.js +29 -0
- package/build-module/components/rich-text/event-listeners/firefox-compat.js.map +1 -0
- package/build-module/components/rich-text/event-listeners/index.js +36 -0
- package/build-module/components/rich-text/event-listeners/index.js.map +1 -0
- package/build-module/components/rich-text/event-listeners/input-events.js +15 -0
- package/build-module/components/rich-text/event-listeners/input-events.js.map +1 -0
- package/build-module/components/rich-text/event-listeners/input-rules.js +127 -0
- package/build-module/components/rich-text/event-listeners/input-rules.js.map +1 -0
- package/build-module/components/rich-text/event-listeners/insert-replacement-text.js +27 -0
- package/build-module/components/rich-text/event-listeners/insert-replacement-text.js.map +1 -0
- package/build-module/components/rich-text/event-listeners/paste-handler.js +142 -0
- package/build-module/components/rich-text/event-listeners/paste-handler.js.map +1 -0
- package/build-module/components/rich-text/event-listeners/remove-browser-shortcuts.js +21 -0
- package/build-module/components/rich-text/event-listeners/remove-browser-shortcuts.js.map +1 -0
- package/build-module/components/rich-text/event-listeners/shortcuts.js +15 -0
- package/build-module/components/rich-text/event-listeners/shortcuts.js.map +1 -0
- package/build-module/components/rich-text/event-listeners/undo-automatic-change.js +45 -0
- package/build-module/components/rich-text/event-listeners/undo-automatic-change.js.map +1 -0
- package/build-module/components/rich-text/file-paste-handler.native.js.map +1 -1
- package/build-module/components/rich-text/format-edit.js.map +1 -1
- package/build-module/components/rich-text/format-toolbar/index.js.map +1 -1
- package/build-module/components/rich-text/format-toolbar/index.native.js.map +1 -1
- package/build-module/components/rich-text/format-toolbar-container.js.map +1 -1
- package/build-module/components/rich-text/format-toolbar-container.native.js.map +1 -1
- package/build-module/components/rich-text/get-rich-text-values.js.map +1 -1
- package/build-module/components/rich-text/index.js +54 -34
- package/build-module/components/rich-text/index.js.map +1 -1
- package/build-module/components/rich-text/index.native.js +16 -4
- package/build-module/components/rich-text/index.native.js.map +1 -1
- package/build-module/components/rich-text/input-event.js.map +1 -1
- package/build-module/components/rich-text/input-event.native.js.map +1 -1
- package/build-module/components/rich-text/multiline.js +6 -2
- package/build-module/components/rich-text/multiline.js.map +1 -1
- package/build-module/components/rich-text/native/format-edit.js.map +1 -1
- package/build-module/components/rich-text/native/get-format-colors.native.js.map +1 -1
- package/build-module/components/rich-text/native/index.js.map +1 -1
- package/build-module/components/rich-text/native/index.native.js +12 -0
- package/build-module/components/rich-text/native/index.native.js.map +1 -1
- package/build-module/components/rich-text/native/toolbar-button-with-options.native.js.map +1 -1
- package/build-module/components/rich-text/native/use-format-types.js.map +1 -1
- package/build-module/components/rich-text/prevent-event-discovery.js.map +1 -1
- package/build-module/components/rich-text/remove-browser-shortcuts.native.js.map +1 -1
- package/build-module/components/rich-text/shortcut.js.map +1 -1
- package/build-module/components/rich-text/shortcut.native.js.map +1 -1
- package/build-module/components/rich-text/split-value.js.map +1 -1
- package/build-module/components/rich-text/toolbar-button.js.map +1 -1
- package/build-module/components/rich-text/use-format-types.js +8 -4
- package/build-module/components/rich-text/use-format-types.js.map +1 -1
- package/build-module/components/rich-text/use-mark-persistent.js.map +1 -1
- package/build-module/components/rich-text/utils.js.map +1 -1
- package/build-module/components/rich-text/with-deprecations.js.map +1 -1
- package/build-module/components/segmented-text-control/index.js +55 -0
- package/build-module/components/segmented-text-control/index.js.map +1 -0
- package/build-module/components/selection-scroll-into-view/index.js.map +1 -1
- package/build-module/components/skip-to-selected-block/index.js.map +1 -1
- package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
- package/build-module/components/spacing-sizes-control/index.js.map +1 -1
- package/build-module/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
- package/build-module/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
- package/build-module/components/spacing-sizes-control/input-controls/single.js.map +1 -1
- package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js +16 -2
- package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
- package/build-module/components/spacing-sizes-control/sides-dropdown/index.js.map +1 -1
- package/build-module/components/spacing-sizes-control/utils.js.map +1 -1
- package/build-module/components/text-alignment-control/index.js +68 -0
- package/build-module/components/text-alignment-control/index.js.map +1 -0
- package/build-module/components/text-decoration-control/index.js +21 -25
- package/build-module/components/text-decoration-control/index.js.map +1 -1
- package/build-module/components/text-transform-control/index.js +18 -22
- package/build-module/components/text-transform-control/index.js.map +1 -1
- package/build-module/components/tool-selector/index.js.map +1 -1
- package/build-module/components/typewriter/index.js.map +1 -1
- package/build-module/components/ungroup-button/index.native.js.map +1 -1
- package/build-module/components/unit-control/index.js.map +1 -1
- package/build-module/components/unsupported-block-details/index.native.js.map +1 -1
- package/build-module/components/url-input/button.js.map +1 -1
- package/build-module/components/url-input/index.js.map +1 -1
- package/build-module/components/url-input/index.native.js.map +1 -1
- package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
- package/build-module/components/url-popover/index.js.map +1 -1
- package/build-module/components/url-popover/link-editor.js.map +1 -1
- package/build-module/components/url-popover/link-viewer-url.js.map +1 -1
- package/build-module/components/url-popover/link-viewer.js.map +1 -1
- package/build-module/components/use-block-commands/index.js +20 -2
- package/build-module/components/use-block-commands/index.js.map +1 -1
- package/build-module/components/use-block-display-information/index.js +9 -3
- package/build-module/components/use-block-display-information/index.js.map +1 -1
- package/build-module/components/use-block-drop-zone/index.js.map +1 -1
- package/build-module/components/use-block-drop-zone/index.native.js.map +1 -1
- package/build-module/components/use-flash-editable-blocks/index.js.map +1 -1
- package/build-module/components/use-moving-animation/index.js.map +1 -1
- package/build-module/components/use-on-block-drop/index.js +3 -1
- package/build-module/components/use-on-block-drop/index.js.map +1 -1
- package/build-module/components/use-on-block-drop/index.native.js.map +1 -1
- package/build-module/components/use-on-block-drop/types.js.map +1 -1
- package/build-module/components/use-paste-styles/index.js +2 -1
- package/build-module/components/use-paste-styles/index.js.map +1 -1
- package/build-module/components/use-resize-canvas/index.js.map +1 -1
- package/build-module/components/use-settings/index.js.map +1 -1
- package/build-module/components/use-unsupported-block-editor/index.native.js.map +1 -1
- package/build-module/components/video-player/gridicon-play.native.js.map +1 -1
- package/build-module/components/video-player/index.native.js.map +1 -1
- package/build-module/components/warning/index.js.map +1 -1
- package/build-module/components/warning/index.native.js.map +1 -1
- package/build-module/components/writing-flow/index.js.map +1 -1
- package/build-module/components/writing-flow/use-arrow-nav.js.map +1 -1
- package/build-module/components/writing-flow/use-click-selection.js.map +1 -1
- package/build-module/components/writing-flow/use-clipboard-handler.js.map +1 -1
- package/build-module/components/writing-flow/use-drag-selection.js +3 -1
- package/build-module/components/writing-flow/use-drag-selection.js.map +1 -1
- package/build-module/components/writing-flow/use-input.js.map +1 -1
- package/build-module/components/writing-flow/use-multi-selection.js.map +1 -1
- package/build-module/components/writing-flow/use-select-all.js.map +1 -1
- package/build-module/components/writing-flow/use-selection-observer.js.map +1 -1
- package/build-module/components/writing-flow/use-tab-nav.js +3 -1
- package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
- package/build-module/components/writing-flow/utils.js.map +1 -1
- package/build-module/components/writing-mode-control/index.js +16 -20
- package/build-module/components/writing-mode-control/index.js.map +1 -1
- package/build-module/elements/index.js.map +1 -1
- package/build-module/hooks/align.js.map +1 -1
- package/build-module/hooks/align.native.js.map +1 -1
- package/build-module/hooks/anchor.js.map +1 -1
- package/build-module/hooks/aria-label.js.map +1 -1
- package/build-module/hooks/background.js +2 -2
- package/build-module/hooks/background.js.map +1 -1
- package/build-module/hooks/block-hooks.js.map +1 -1
- package/build-module/hooks/block-renaming.js +0 -36
- package/build-module/hooks/block-renaming.js.map +1 -1
- package/build-module/hooks/border.js.map +1 -1
- package/build-module/hooks/color.js.map +1 -1
- package/build-module/hooks/compat.js.map +1 -1
- package/build-module/hooks/content-lock-ui.js +5 -5
- package/build-module/hooks/content-lock-ui.js.map +1 -1
- package/build-module/hooks/contrast-checker.js.map +1 -1
- package/build-module/hooks/custom-class-name.js.map +1 -1
- package/build-module/hooks/custom-class-name.native.js.map +1 -1
- package/build-module/hooks/dimensions.js.map +1 -1
- package/build-module/hooks/duotone.js +3 -1
- package/build-module/hooks/duotone.js.map +1 -1
- package/build-module/hooks/font-family.js.map +1 -1
- package/build-module/hooks/font-size.js.map +1 -1
- package/build-module/hooks/gap.js.map +1 -1
- package/build-module/hooks/generated-class-name.js.map +1 -1
- package/build-module/hooks/index.js +5 -4
- package/build-module/hooks/index.js.map +1 -1
- package/build-module/hooks/index.native.js.map +1 -1
- package/build-module/hooks/layout-child.js.map +1 -1
- package/build-module/hooks/layout.js +38 -19
- package/build-module/hooks/layout.js.map +1 -1
- package/build-module/hooks/layout.native.js.map +1 -1
- package/build-module/hooks/line-height.js.map +1 -1
- package/build-module/hooks/lock.js.map +1 -1
- package/build-module/hooks/metadata.js.map +1 -1
- package/build-module/hooks/position.js.map +1 -1
- package/build-module/hooks/settings.js.map +1 -1
- package/build-module/hooks/spacing-visualizer.js.map +1 -1
- package/build-module/hooks/style.js.map +1 -1
- package/build-module/hooks/supports.js +22 -1
- package/build-module/hooks/supports.js.map +1 -1
- package/build-module/hooks/text-align.js +145 -0
- package/build-module/hooks/text-align.js.map +1 -0
- package/build-module/hooks/typography.js +2 -1
- package/build-module/hooks/typography.js.map +1 -1
- package/build-module/hooks/typography.native.js.map +1 -1
- package/build-module/hooks/use-bindings-attributes.js +68 -132
- package/build-module/hooks/use-bindings-attributes.js.map +1 -1
- package/build-module/hooks/use-border-props.js.map +1 -1
- package/build-module/hooks/use-cached-truthy.js.map +1 -1
- package/build-module/hooks/use-color-props.js.map +1 -1
- package/build-module/hooks/use-editor-wrapper-styles.native.js.map +1 -1
- package/build-module/hooks/use-shadow-props.js.map +1 -1
- package/build-module/hooks/use-spacing-props.js.map +1 -1
- package/build-module/hooks/use-typography-props.js +2 -1
- package/build-module/hooks/use-typography-props.js.map +1 -1
- package/build-module/hooks/use-zoom-out.js +23 -16
- package/build-module/hooks/use-zoom-out.js.map +1 -1
- package/build-module/hooks/utils.js +38 -9
- package/build-module/hooks/utils.js.map +1 -1
- package/build-module/index.js.map +1 -1
- package/build-module/index.native.js.map +1 -1
- package/build-module/layouts/constrained.js.map +1 -1
- package/build-module/layouts/definitions.js +8 -6
- package/build-module/layouts/definitions.js.map +1 -1
- package/build-module/layouts/flex.js.map +1 -1
- package/build-module/layouts/flow.js.map +1 -1
- package/build-module/layouts/grid.js +52 -9
- package/build-module/layouts/grid.js.map +1 -1
- package/build-module/layouts/index.js.map +1 -1
- package/build-module/layouts/utils.js.map +1 -1
- package/build-module/lock-unlock.js.map +1 -1
- package/build-module/private-apis.js +4 -2
- package/build-module/private-apis.js.map +1 -1
- package/build-module/private-apis.native.js.map +1 -1
- package/build-module/store/actions.js +47 -9
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/array.js.map +1 -1
- package/build-module/store/constants.js.map +1 -1
- package/build-module/store/defaults.js.map +1 -1
- package/build-module/store/defaults.native.js.map +1 -1
- package/build-module/store/get-block-settings.js.map +1 -1
- package/build-module/store/index.js.map +1 -1
- package/build-module/store/private-actions.js +5 -2
- package/build-module/store/private-actions.js.map +1 -1
- package/build-module/store/private-keys.js.map +1 -1
- package/build-module/store/private-selectors.js +113 -37
- package/build-module/store/private-selectors.js.map +1 -1
- package/build-module/store/reducer.js +11 -8
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +116 -62
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/store/undo-ignore.js.map +1 -1
- package/build-module/store/utils.js.map +1 -1
- package/build-module/utils/dom.js.map +1 -1
- package/build-module/utils/get-px-from-css-unit.js.map +1 -1
- package/build-module/utils/index.js.map +1 -1
- package/build-module/utils/math.js.map +1 -1
- package/build-module/utils/object.js +16 -0
- package/build-module/utils/object.js.map +1 -1
- package/build-module/utils/order-inserter-block-items.js +6 -2
- package/build-module/utils/order-inserter-block-items.js.map +1 -1
- package/build-module/utils/pasting.js +6 -2
- package/build-module/utils/pasting.js.map +1 -1
- package/build-module/utils/selection.js.map +1 -1
- package/build-module/utils/sorting.js.map +1 -1
- package/build-module/utils/transform-styles/index.js.map +1 -1
- package/build-module/utils/use-notify-copy.js.map +1 -1
- package/build-style/content-rtl.css +77 -86
- package/build-style/content.css +77 -86
- package/build-style/default-editor-styles-rtl.css +1 -1
- package/build-style/default-editor-styles.css +1 -1
- package/build-style/style-rtl.css +158 -242
- package/build-style/style.css +158 -242
- package/package.json +32 -33
- package/src/components/alignment-control/ui.js +3 -1
- package/src/components/block-bindings-toolbar-indicator/style.scss +2 -5
- package/src/components/block-canvas/style.scss +1 -3
- package/src/components/block-draggable/test/helpers.native.js +8 -8
- package/src/components/block-edit/context.js +1 -0
- package/src/components/block-edit/index.js +4 -0
- package/src/components/block-inspector/index.js +7 -6
- package/src/components/block-list/block.js +47 -35
- package/src/components/block-list/block.native.js +3 -2
- package/src/components/block-list/content.scss +46 -20
- package/src/components/block-list/index.js +26 -10
- package/src/components/block-list/index.native.js +1 -6
- package/src/components/block-list/use-block-props/index.js +17 -5
- package/src/components/block-list/use-block-props/use-block-refs.js +17 -57
- package/src/components/block-list/use-block-props/use-focus-first-element.js +7 -3
- package/src/components/block-list/use-block-props/use-is-hovered.js +11 -16
- package/src/components/block-mover/index.native.js +3 -1
- package/src/components/block-patterns-list/style.scss +1 -3
- package/src/components/block-patterns-paging/index.js +4 -0
- package/src/components/block-preview/style.scss +13 -15
- package/src/components/block-rename/modal.js +17 -13
- package/src/components/block-rename/rename-control.js +8 -1
- package/src/components/block-settings-menu/block-settings-dropdown.js +1 -51
- package/src/components/block-switcher/pattern-transformations-menu.js +3 -1
- package/src/components/block-switcher/use-transformed-patterns.js +6 -2
- package/src/components/block-switcher/utils.js +14 -5
- package/src/components/block-toolbar/index.js +26 -22
- package/src/components/block-toolbar/style.scss +8 -11
- package/src/components/block-toolbar/use-has-block-toolbar.js +26 -19
- package/src/components/block-tools/block-selection-button.js +55 -43
- package/src/components/block-tools/index.js +3 -1
- package/src/components/block-tools/use-show-block-tools.js +36 -51
- package/src/components/block-tools/zoom-out-mode-inserters.js +5 -1
- package/src/components/block-variation-picker/content.scss +22 -72
- package/src/components/block-variation-picker/index.js +3 -2
- package/src/components/block-variation-transforms/index.js +6 -2
- package/src/components/button-block-appender/index.native.js +16 -1
- package/src/components/default-block-appender/content.scss +1 -1
- package/src/components/editor-styles/index.js +4 -2
- package/src/components/floating-toolbar/index.native.js +5 -2
- package/src/components/global-styles/background-panel.js +31 -29
- package/src/components/global-styles/color-panel.js +3 -1
- package/src/components/global-styles/dimensions-panel.js +18 -1
- package/src/components/global-styles/hooks.js +2 -0
- package/src/components/global-styles/style.scss +2 -8
- package/src/components/global-styles/test/use-global-styles-output.js +8 -17
- package/src/components/global-styles/test/utils.js +21 -0
- package/src/components/global-styles/typography-panel.js +27 -23
- package/src/components/global-styles/use-global-styles-output.js +216 -192
- package/src/components/global-styles/utils.js +55 -0
- package/src/components/iframe/index.js +20 -27
- package/src/components/image-editor/cropper.js +11 -2
- package/src/components/image-editor/index.js +0 -2
- package/src/components/inner-blocks/index.js +14 -1
- package/src/components/inserter/block-patterns-tab/index.js +32 -68
- package/src/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +9 -36
- package/src/components/inserter/block-patterns-tab/pattern-category-previews.js +2 -2
- package/src/components/inserter/block-types-tab.js +5 -0
- package/src/components/inserter/category-tabs/index.js +74 -0
- package/src/components/inserter/media-tab/index.js +1 -1
- package/src/components/inserter/media-tab/media-panel.js +0 -22
- package/src/components/inserter/media-tab/media-preview.js +15 -7
- package/src/components/inserter/media-tab/media-tab.js +44 -83
- package/src/components/inserter/menu.js +155 -122
- package/src/components/inserter/style.scss +161 -217
- package/src/components/inserter/tabs.js +12 -15
- package/src/components/inspector-controls-tabs/styles-tab.js +1 -1
- package/src/components/line-height-control/index.js +6 -2
- package/src/components/link-control/search-item.js +9 -3
- package/src/components/link-control/style.scss +10 -2
- package/src/components/link-control/test/index.js +1 -1
- package/src/components/list-view/block-select-button.js +73 -237
- package/src/components/list-view/block.js +218 -28
- package/src/components/list-view/index.js +1 -1
- package/src/components/list-view/style.scss +20 -28
- package/src/components/list-view/use-list-view-drop-zone.js +6 -1
- package/src/components/list-view/utils.js +3 -1
- package/src/components/media-placeholder/content.scss +0 -11
- package/src/components/media-placeholder/index.js +3 -3
- package/src/components/navigable-toolbar/index.js +3 -1
- package/src/components/provider/block-refs-provider.js +3 -8
- package/src/components/provider/test/use-block-sync.js +7 -0
- package/src/components/provider/use-block-sync.js +3 -20
- package/src/components/recursion-provider/index.js +2 -2
- package/src/components/rich-text/README.md +4 -0
- package/src/components/rich-text/content.js +26 -19
- package/src/components/rich-text/event-listeners/before-input-rules.js +92 -0
- package/src/components/rich-text/event-listeners/delete.js +53 -0
- package/src/components/rich-text/event-listeners/enter.js +104 -0
- package/src/components/rich-text/event-listeners/firefox-compat.js +31 -0
- package/src/components/rich-text/event-listeners/index.js +56 -0
- package/src/components/rich-text/event-listeners/input-events.js +13 -0
- package/src/components/rich-text/event-listeners/input-rules.js +146 -0
- package/src/components/rich-text/event-listeners/insert-replacement-text.js +28 -0
- package/src/components/rich-text/event-listeners/paste-handler.js +169 -0
- package/src/components/rich-text/event-listeners/remove-browser-shortcuts.js +24 -0
- package/src/components/rich-text/event-listeners/shortcuts.js +13 -0
- package/src/components/rich-text/event-listeners/undo-automatic-change.js +45 -0
- package/src/components/rich-text/index.js +53 -36
- package/src/components/rich-text/index.native.js +14 -1
- package/src/components/rich-text/multiline.js +6 -2
- package/src/components/rich-text/native/index.native.js +11 -0
- package/src/components/rich-text/use-format-types.js +6 -2
- package/src/components/segmented-text-control/index.js +63 -0
- package/src/components/{writing-mode-control → segmented-text-control}/style.scss +2 -5
- package/src/components/spacing-sizes-control/input-controls/spacing-input-control.js +16 -1
- package/src/components/text-alignment-control/index.js +91 -0
- package/src/components/text-alignment-control/stories/index.story.js +39 -0
- package/src/components/text-decoration-control/index.js +20 -33
- package/src/components/text-transform-control/index.js +17 -30
- package/src/components/use-block-commands/index.js +46 -28
- package/src/components/use-block-display-information/index.js +9 -3
- package/src/components/use-on-block-drop/index.js +3 -1
- package/src/components/use-paste-styles/index.js +2 -0
- package/src/components/writing-flow/use-drag-selection.js +3 -1
- package/src/components/writing-flow/use-tab-nav.js +3 -1
- package/src/components/writing-mode-control/index.js +15 -28
- package/src/hooks/background.js +2 -2
- package/src/hooks/block-renaming.js +0 -33
- package/src/hooks/content-lock-ui.js +5 -7
- package/src/hooks/duotone.js +3 -1
- package/src/hooks/index.js +5 -2
- package/src/hooks/layout.js +57 -25
- package/src/hooks/supports.js +24 -0
- package/src/hooks/test/text-align.js +114 -0
- package/src/hooks/test/use-typography-props.js +3 -1
- package/src/hooks/text-align.js +178 -0
- package/src/hooks/typography.js +2 -0
- package/src/hooks/use-bindings-attributes.js +90 -161
- package/src/hooks/use-typography-props.js +4 -1
- package/src/hooks/use-zoom-out.js +25 -15
- package/src/hooks/utils.js +57 -5
- package/src/layouts/definitions.js +6 -6
- package/src/layouts/grid.js +106 -47
- package/src/private-apis.js +4 -2
- package/src/store/actions.js +52 -12
- package/src/store/private-actions.js +6 -3
- package/src/store/private-selectors.js +155 -39
- package/src/store/reducer.js +13 -23
- package/src/store/selectors.js +162 -93
- package/src/style.scss +1 -2
- package/src/utils/object.js +16 -0
- package/src/utils/order-inserter-block-items.js +6 -2
- package/src/utils/pasting.js +6 -2
- package/tsconfig.tsbuildinfo +1 -1
- package/build/components/block-list/use-block-props/use-block-moving-mode-class-names.js +0 -54
- package/build/components/block-list/use-block-props/use-block-moving-mode-class-names.js.map +0 -1
- package/build/components/rich-text/use-before-input-rules.js +0 -98
- package/build/components/rich-text/use-before-input-rules.js.map +0 -1
- package/build/components/rich-text/use-delete.js +0 -64
- package/build/components/rich-text/use-delete.js.map +0 -1
- package/build/components/rich-text/use-enter.js +0 -109
- package/build/components/rich-text/use-enter.js.map +0 -1
- package/build/components/rich-text/use-firefox-compat.js +0 -44
- package/build/components/rich-text/use-firefox-compat.js.map +0 -1
- package/build/components/rich-text/use-input-events.js +0 -25
- package/build/components/rich-text/use-input-events.js.map +0 -1
- package/build/components/rich-text/use-input-rules.js +0 -139
- package/build/components/rich-text/use-input-rules.js.map +0 -1
- package/build/components/rich-text/use-insert-replacement-text.js +0 -38
- package/build/components/rich-text/use-insert-replacement-text.js.map +0 -1
- package/build/components/rich-text/use-paste-handler.js +0 -158
- package/build/components/rich-text/use-paste-handler.js.map +0 -1
- package/build/components/rich-text/use-remove-browser-shortcuts.js +0 -32
- package/build/components/rich-text/use-remove-browser-shortcuts.js.map +0 -1
- package/build/components/rich-text/use-shortcuts.js +0 -25
- package/build/components/rich-text/use-shortcuts.js.map +0 -1
- package/build/components/rich-text/use-undo-automatic-change.js +0 -53
- package/build/components/rich-text/use-undo-automatic-change.js.map +0 -1
- package/build-module/components/block-list/use-block-props/use-block-moving-mode-class-names.js +0 -47
- package/build-module/components/block-list/use-block-props/use-block-moving-mode-class-names.js.map +0 -1
- package/build-module/components/rich-text/use-before-input-rules.js +0 -92
- package/build-module/components/rich-text/use-before-input-rules.js.map +0 -1
- package/build-module/components/rich-text/use-delete.js +0 -57
- package/build-module/components/rich-text/use-delete.js.map +0 -1
- package/build-module/components/rich-text/use-enter.js +0 -102
- package/build-module/components/rich-text/use-enter.js.map +0 -1
- package/build-module/components/rich-text/use-firefox-compat.js +0 -37
- package/build-module/components/rich-text/use-firefox-compat.js.map +0 -1
- package/build-module/components/rich-text/use-input-events.js +0 -18
- package/build-module/components/rich-text/use-input-events.js.map +0 -1
- package/build-module/components/rich-text/use-input-rules.js +0 -132
- package/build-module/components/rich-text/use-input-rules.js.map +0 -1
- package/build-module/components/rich-text/use-insert-replacement-text.js +0 -32
- package/build-module/components/rich-text/use-insert-replacement-text.js.map +0 -1
- package/build-module/components/rich-text/use-paste-handler.js +0 -152
- package/build-module/components/rich-text/use-paste-handler.js.map +0 -1
- package/build-module/components/rich-text/use-remove-browser-shortcuts.js +0 -26
- package/build-module/components/rich-text/use-remove-browser-shortcuts.js.map +0 -1
- package/build-module/components/rich-text/use-shortcuts.js +0 -18
- package/build-module/components/rich-text/use-shortcuts.js.map +0 -1
- package/build-module/components/rich-text/use-undo-automatic-change.js +0 -46
- package/build-module/components/rich-text/use-undo-automatic-change.js.map +0 -1
- package/src/components/block-list/use-block-props/use-block-moving-mode-class-names.js +0 -55
- package/src/components/rich-text/use-before-input-rules.js +0 -99
- package/src/components/rich-text/use-delete.js +0 -59
- package/src/components/rich-text/use-enter.js +0 -110
- package/src/components/rich-text/use-firefox-compat.js +0 -39
- package/src/components/rich-text/use-input-events.js +0 -19
- package/src/components/rich-text/use-input-rules.js +0 -150
- package/src/components/rich-text/use-insert-replacement-text.js +0 -31
- package/src/components/rich-text/use-paste-handler.js +0 -180
- package/src/components/rich-text/use-remove-browser-shortcuts.js +0 -29
- package/src/components/rich-text/use-shortcuts.js +0 -19
- package/src/components/rich-text/use-undo-automatic-change.js +0 -50
- package/src/components/text-decoration-control/style.scss +0 -18
- package/src/components/text-transform-control/style.scss +0 -18
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_classnames","_interopRequireDefault","require","_compose","_hooks","_blocks","_data","_components","_i18n","_store","_components2","_useSettings","_layouts","_blockEditingMode","_definitions","_utils","_lockUnlock","layoutBlockSupportKey","hasLayoutBlockSupport","blockName","hasBlockSupport","useLayoutClasses","blockAttributes","kebabCase","unlock","componentsPrivateApis","rootPaddingAlignment","useSelect","select","getSettings","blockEditorStore","__experimentalFeatures","useRootPaddingAwareAlignments","layout","default","defaultBlockLayout","getBlockSupport","usedLayout","inherit","contentSize","wideSize","type","layoutClassnames","LAYOUT_DEFINITIONS","className","baseClassName","splitBlockName","split","fullBlockName","pop","join","compoundClassName","push","orientation","justifyContent","flexWrap","useLayoutStyles","selector","style","fullLayoutType","getLayoutType","blockGapSupport","useSettings","hasBlockGapSupport","getLayoutStyle","LayoutPanelPure","setAttributes","name","clientId","settings","useBlockSettings","layoutSettings","themeSupportsLayout","supportsLayout","blockEditingMode","useBlockEditingMode","layoutBlockSupport","blockSupportAndThemeSettings","allowSwitching","allowEditing","allowInheriting","blockSupportAndLayout","defaultType","blockLayoutType","showInheritToggle","layoutType","constrainedType","displayControlsForLegacyLayouts","hasContentSizeOrLegacySettings","onChangeType","newType","onChangeLayout","newLayout","_react","createElement","Fragment","InspectorControls","PanelBody","title","__","ToggleControl","__nextHasNoMarginBottom","label","checked","onChange","help","LayoutTypeSwitcher","inspectorControls","toolBarControls","_default","exports","shareWithChildBlocks","edit","attributeKeys","hasSupport","ButtonGroup","getLayoutTypes","map","Button","key","isPressed","onClick","addAttribute","_settings$attributes$","attributes","BlockWithLayoutStyles","block","BlockListBlock","props","id","useInstanceId","layoutClasses","selectorPrefix","css","layoutClassNames","classnames","useStyleOverride","__unstableLayoutClassNames","withLayoutStyles","createHigherOrderComponent","blockSupportsLayout","shouldRenderLayoutStyles","disableLayoutStyles","addFilter"],"sources":["@wordpress/block-editor/src/hooks/layout.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { createHigherOrderComponent, useInstanceId } from '@wordpress/compose';\nimport { addFilter } from '@wordpress/hooks';\nimport { getBlockSupport, hasBlockSupport } from '@wordpress/blocks';\nimport { useSelect } from '@wordpress/data';\nimport {\n\tButton,\n\tButtonGroup,\n\tToggleControl,\n\tPanelBody,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../store';\nimport { InspectorControls } from '../components';\nimport { useSettings } from '../components/use-settings';\nimport { getLayoutType, getLayoutTypes } from '../layouts';\nimport { useBlockEditingMode } from '../components/block-editing-mode';\nimport { LAYOUT_DEFINITIONS } from '../layouts/definitions';\nimport { useBlockSettings, useStyleOverride } from './utils';\nimport { unlock } from '../lock-unlock';\n\nconst layoutBlockSupportKey = 'layout';\n\nfunction hasLayoutBlockSupport( blockName ) {\n\treturn (\n\t\thasBlockSupport( blockName, 'layout' ) ||\n\t\thasBlockSupport( blockName, '__experimentalLayout' )\n\t);\n}\n\n/**\n * Generates the utility classnames for the given block's layout attributes.\n *\n * @param { Object } blockAttributes Block attributes.\n * @param { string } blockName Block name.\n *\n * @return { Array } Array of CSS classname strings.\n */\nexport function useLayoutClasses( blockAttributes = {}, blockName = '' ) {\n\tconst { kebabCase } = unlock( componentsPrivateApis );\n\tconst rootPaddingAlignment = useSelect( ( select ) => {\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\treturn getSettings().__experimentalFeatures\n\t\t\t?.useRootPaddingAwareAlignments;\n\t}, [] );\n\tconst { layout } = blockAttributes;\n\n\tconst { default: defaultBlockLayout } =\n\t\tgetBlockSupport( blockName, layoutBlockSupportKey ) || {};\n\tconst usedLayout =\n\t\tlayout?.inherit || layout?.contentSize || layout?.wideSize\n\t\t\t? { ...layout, type: 'constrained' }\n\t\t\t: layout || defaultBlockLayout || {};\n\n\tconst layoutClassnames = [];\n\n\tif ( LAYOUT_DEFINITIONS[ usedLayout?.type || 'default' ]?.className ) {\n\t\tconst baseClassName =\n\t\t\tLAYOUT_DEFINITIONS[ usedLayout?.type || 'default' ]?.className;\n\t\tconst splitBlockName = blockName.split( '/' );\n\t\tconst fullBlockName =\n\t\t\tsplitBlockName[ 0 ] === 'core'\n\t\t\t\t? splitBlockName.pop()\n\t\t\t\t: splitBlockName.join( '-' );\n\t\tconst compoundClassName = `wp-block-${ fullBlockName }-${ baseClassName }`;\n\t\tlayoutClassnames.push( baseClassName, compoundClassName );\n\t}\n\n\tif (\n\t\t( usedLayout?.inherit ||\n\t\t\tusedLayout?.contentSize ||\n\t\t\tusedLayout?.type === 'constrained' ) &&\n\t\trootPaddingAlignment\n\t) {\n\t\tlayoutClassnames.push( 'has-global-padding' );\n\t}\n\n\tif ( usedLayout?.orientation ) {\n\t\tlayoutClassnames.push( `is-${ kebabCase( usedLayout.orientation ) }` );\n\t}\n\n\tif ( usedLayout?.justifyContent ) {\n\t\tlayoutClassnames.push(\n\t\t\t`is-content-justification-${ kebabCase(\n\t\t\t\tusedLayout.justifyContent\n\t\t\t) }`\n\t\t);\n\t}\n\n\tif ( usedLayout?.flexWrap && usedLayout.flexWrap === 'nowrap' ) {\n\t\tlayoutClassnames.push( 'is-nowrap' );\n\t}\n\n\treturn layoutClassnames;\n}\n\n/**\n * Generates a CSS rule with the given block's layout styles.\n *\n * @param { Object } blockAttributes Block attributes.\n * @param { string } blockName Block name.\n * @param { string } selector A selector to use in generating the CSS rule.\n *\n * @return { string } CSS rule.\n */\nexport function useLayoutStyles( blockAttributes = {}, blockName, selector ) {\n\tconst { layout = {}, style = {} } = blockAttributes;\n\t// Update type for blocks using legacy layouts.\n\tconst usedLayout =\n\t\tlayout?.inherit || layout?.contentSize || layout?.wideSize\n\t\t\t? { ...layout, type: 'constrained' }\n\t\t\t: layout || {};\n\tconst fullLayoutType = getLayoutType( usedLayout?.type || 'default' );\n\tconst [ blockGapSupport ] = useSettings( 'spacing.blockGap' );\n\tconst hasBlockGapSupport = blockGapSupport !== null;\n\treturn fullLayoutType?.getLayoutStyle?.( {\n\t\tblockName,\n\t\tselector,\n\t\tlayout,\n\t\tstyle,\n\t\thasBlockGapSupport,\n\t} );\n}\n\nfunction LayoutPanelPure( {\n\tlayout,\n\tsetAttributes,\n\tname: blockName,\n\tclientId,\n} ) {\n\tconst settings = useBlockSettings( blockName );\n\t// Block settings come from theme.json under settings.[blockName].\n\tconst { layout: layoutSettings } = settings;\n\tconst { themeSupportsLayout } = useSelect( ( select ) => {\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\treturn {\n\t\t\tthemeSupportsLayout: getSettings().supportsLayout,\n\t\t};\n\t}, [] );\n\tconst blockEditingMode = useBlockEditingMode();\n\n\tif ( blockEditingMode !== 'default' ) {\n\t\treturn null;\n\t}\n\n\t// Layout block support comes from the block's block.json.\n\tconst layoutBlockSupport = getBlockSupport(\n\t\tblockName,\n\t\tlayoutBlockSupportKey,\n\t\t{}\n\t);\n\tconst blockSupportAndThemeSettings = {\n\t\t...layoutSettings,\n\t\t...layoutBlockSupport,\n\t};\n\tconst {\n\t\tallowSwitching,\n\t\tallowEditing = true,\n\t\tallowInheriting = true,\n\t\tdefault: defaultBlockLayout,\n\t} = blockSupportAndThemeSettings;\n\n\tif ( ! allowEditing ) {\n\t\treturn null;\n\t}\n\n\t/*\n\t * Try to find the layout type from either the\n\t * block's layout settings or any saved layout config.\n\t */\n\tconst blockSupportAndLayout = {\n\t\t...layoutBlockSupport,\n\t\t...layout,\n\t};\n\tconst { type, default: { type: defaultType = 'default' } = {} } =\n\t\tblockSupportAndLayout;\n\tconst blockLayoutType = type || defaultType;\n\n\t// Only show the inherit toggle if it's supported,\n\t// and either the default / flow or the constrained layout type is in use, as the toggle switches from one to the other.\n\tconst showInheritToggle = !! (\n\t\tallowInheriting &&\n\t\t( ! blockLayoutType ||\n\t\t\tblockLayoutType === 'default' ||\n\t\t\tblockLayoutType === 'constrained' ||\n\t\t\tblockSupportAndLayout.inherit )\n\t);\n\n\tconst usedLayout = layout || defaultBlockLayout || {};\n\tconst { inherit = false, contentSize = null } = usedLayout;\n\t/**\n\t * `themeSupportsLayout` is only relevant to the `default/flow` or\n\t * `constrained` layouts and it should not be taken into account when other\n\t * `layout` types are used.\n\t */\n\tif (\n\t\t( blockLayoutType === 'default' ||\n\t\t\tblockLayoutType === 'constrained' ) &&\n\t\t! themeSupportsLayout\n\t) {\n\t\treturn null;\n\t}\n\tconst layoutType = getLayoutType( blockLayoutType );\n\tconst constrainedType = getLayoutType( 'constrained' );\n\tconst displayControlsForLegacyLayouts =\n\t\t! usedLayout.type && ( contentSize || inherit );\n\tconst hasContentSizeOrLegacySettings = !! inherit || !! contentSize;\n\n\tconst onChangeType = ( newType ) =>\n\t\tsetAttributes( { layout: { type: newType } } );\n\tconst onChangeLayout = ( newLayout ) =>\n\t\tsetAttributes( { layout: newLayout } );\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody title={ __( 'Layout' ) }>\n\t\t\t\t\t{ showInheritToggle && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tclassName=\"block-editor-hooks__toggle-control\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Inner blocks use content width' ) }\n\t\t\t\t\t\t\t\tchecked={\n\t\t\t\t\t\t\t\t\tlayoutType?.name === 'constrained' ||\n\t\t\t\t\t\t\t\t\thasContentSizeOrLegacySettings\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonChange={ () =>\n\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\tlayout: {\n\t\t\t\t\t\t\t\t\t\t\ttype:\n\t\t\t\t\t\t\t\t\t\t\t\tlayoutType?.name ===\n\t\t\t\t\t\t\t\t\t\t\t\t\t'constrained' ||\n\t\t\t\t\t\t\t\t\t\t\t\thasContentSizeOrLegacySettings\n\t\t\t\t\t\t\t\t\t\t\t\t\t? 'default'\n\t\t\t\t\t\t\t\t\t\t\t\t\t: 'constrained',\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\thelp={\n\t\t\t\t\t\t\t\t\tlayoutType?.name === 'constrained' ||\n\t\t\t\t\t\t\t\t\thasContentSizeOrLegacySettings\n\t\t\t\t\t\t\t\t\t\t? __(\n\t\t\t\t\t\t\t\t\t\t\t\t'Nested blocks use content width with options for full and wide widths.'\n\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t: __(\n\t\t\t\t\t\t\t\t\t\t\t\t'Nested blocks will fill the width of this container. Toggle to constrain.'\n\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\n\t\t\t\t\t{ ! inherit && allowSwitching && (\n\t\t\t\t\t\t<LayoutTypeSwitcher\n\t\t\t\t\t\t\ttype={ blockLayoutType }\n\t\t\t\t\t\t\tonChange={ onChangeType }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\n\t\t\t\t\t{ layoutType && layoutType.name !== 'default' && (\n\t\t\t\t\t\t<layoutType.inspectorControls\n\t\t\t\t\t\t\tlayout={ usedLayout }\n\t\t\t\t\t\t\tonChange={ onChangeLayout }\n\t\t\t\t\t\t\tlayoutBlockSupport={ blockSupportAndThemeSettings }\n\t\t\t\t\t\t\tname={ blockName }\n\t\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ constrainedType && displayControlsForLegacyLayouts && (\n\t\t\t\t\t\t<constrainedType.inspectorControls\n\t\t\t\t\t\t\tlayout={ usedLayout }\n\t\t\t\t\t\t\tonChange={ onChangeLayout }\n\t\t\t\t\t\t\tlayoutBlockSupport={ blockSupportAndThemeSettings }\n\t\t\t\t\t\t\tname={ blockName }\n\t\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</PanelBody>\n\t\t\t</InspectorControls>\n\t\t\t{ ! inherit && layoutType && (\n\t\t\t\t<layoutType.toolBarControls\n\t\t\t\t\tlayout={ usedLayout }\n\t\t\t\t\tonChange={ onChangeLayout }\n\t\t\t\t\tlayoutBlockSupport={ layoutBlockSupport }\n\t\t\t\t\tname={ blockName }\n\t\t\t\t\tclientId={ clientId }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default {\n\tshareWithChildBlocks: true,\n\tedit: LayoutPanelPure,\n\tattributeKeys: [ 'layout' ],\n\thasSupport( name ) {\n\t\treturn hasLayoutBlockSupport( name );\n\t},\n};\n\nfunction LayoutTypeSwitcher( { type, onChange } ) {\n\treturn (\n\t\t<ButtonGroup>\n\t\t\t{ getLayoutTypes().map( ( { name, label } ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tkey={ name }\n\t\t\t\t\t\tisPressed={ type === name }\n\t\t\t\t\t\tonClick={ () => onChange( name ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ label }\n\t\t\t\t\t</Button>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</ButtonGroup>\n\t);\n}\n\n/**\n * Filters registered block settings, extending attributes to include `layout`.\n *\n * @param {Object} settings Original block settings.\n *\n * @return {Object} Filtered block settings.\n */\nexport function addAttribute( settings ) {\n\tif ( 'type' in ( settings.attributes?.layout ?? {} ) ) {\n\t\treturn settings;\n\t}\n\tif ( hasLayoutBlockSupport( settings ) ) {\n\t\tsettings.attributes = {\n\t\t\t...settings.attributes,\n\t\t\tlayout: {\n\t\t\t\ttype: 'object',\n\t\t\t},\n\t\t};\n\t}\n\n\treturn settings;\n}\n\nfunction BlockWithLayoutStyles( { block: BlockListBlock, props } ) {\n\tconst { name, attributes } = props;\n\tconst id = useInstanceId( BlockListBlock );\n\tconst { layout } = attributes;\n\tconst { default: defaultBlockLayout } =\n\t\tgetBlockSupport( name, layoutBlockSupportKey ) || {};\n\tconst usedLayout =\n\t\tlayout?.inherit || layout?.contentSize || layout?.wideSize\n\t\t\t? { ...layout, type: 'constrained' }\n\t\t\t: layout || defaultBlockLayout || {};\n\tconst layoutClasses = useLayoutClasses( attributes, name );\n\n\tconst { kebabCase } = unlock( componentsPrivateApis );\n\tconst selectorPrefix = `wp-container-${ kebabCase( name ) }-is-layout-`;\n\t// Higher specificity to override defaults from theme.json.\n\tconst selector = `.${ selectorPrefix }${ id }.${ selectorPrefix }${ id }`;\n\tconst [ blockGapSupport ] = useSettings( 'spacing.blockGap' );\n\tconst hasBlockGapSupport = blockGapSupport !== null;\n\n\t// Get CSS string for the current layout type.\n\t// The CSS and `style` element is only output if it is not empty.\n\tconst fullLayoutType = getLayoutType( usedLayout?.type || 'default' );\n\tconst css = fullLayoutType?.getLayoutStyle?.( {\n\t\tblockName: name,\n\t\tselector,\n\t\tlayout: usedLayout,\n\t\tstyle: attributes?.style,\n\t\thasBlockGapSupport,\n\t} );\n\n\t// Attach a `wp-container-` id-based class name as well as a layout class name such as `is-layout-flex`.\n\tconst layoutClassNames = classnames(\n\t\t{\n\t\t\t[ `${ selectorPrefix }${ id }` ]: !! css, // Only attach a container class if there is generated CSS to be attached.\n\t\t},\n\t\tlayoutClasses\n\t);\n\n\tuseStyleOverride( { css } );\n\n\treturn (\n\t\t<BlockListBlock\n\t\t\t{ ...props }\n\t\t\t__unstableLayoutClassNames={ layoutClassNames }\n\t\t/>\n\t);\n}\n\n/**\n * Override the default block element to add the layout styles.\n *\n * @param {Function} BlockListBlock Original component.\n *\n * @return {Function} Wrapped component.\n */\nexport const withLayoutStyles = createHigherOrderComponent(\n\t( BlockListBlock ) => ( props ) => {\n\t\tconst blockSupportsLayout = hasLayoutBlockSupport( props.name );\n\t\tconst shouldRenderLayoutStyles = useSelect(\n\t\t\t( select ) => {\n\t\t\t\t// The callback returns early to avoid block editor subscription.\n\t\t\t\tif ( ! blockSupportsLayout ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\treturn ! select( blockEditorStore ).getSettings()\n\t\t\t\t\t.disableLayoutStyles;\n\t\t\t},\n\t\t\t[ blockSupportsLayout ]\n\t\t);\n\n\t\tif ( ! shouldRenderLayoutStyles ) {\n\t\t\treturn <BlockListBlock { ...props } />;\n\t\t}\n\n\t\treturn (\n\t\t\t<BlockWithLayoutStyles block={ BlockListBlock } props={ props } />\n\t\t);\n\t},\n\t'withLayoutStyles'\n);\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/layout/addAttribute',\n\taddAttribute\n);\naddFilter(\n\t'editor.BlockListBlock',\n\t'core/editor/layout/with-layout-styles',\n\twithLayoutStyles\n);\n"],"mappings":";;;;;;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AAOA,IAAAM,KAAA,GAAAN,OAAA;AAKA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,YAAA,GAAAR,OAAA;AACA,IAAAS,YAAA,GAAAT,OAAA;AACA,IAAAU,QAAA,GAAAV,OAAA;AACA,IAAAW,iBAAA,GAAAX,OAAA;AACA,IAAAY,YAAA,GAAAZ,OAAA;AACA,IAAAa,MAAA,GAAAb,OAAA;AACA,IAAAc,WAAA,GAAAd,OAAA;AA/BA;AACA;AACA;;AAGA;AACA;AACA;;AAcA;AACA;AACA;;AAUA,MAAMe,qBAAqB,GAAG,QAAQ;AAEtC,SAASC,qBAAqBA,CAAEC,SAAS,EAAG;EAC3C,OACC,IAAAC,uBAAe,EAAED,SAAS,EAAE,QAAS,CAAC,IACtC,IAAAC,uBAAe,EAAED,SAAS,EAAE,sBAAuB,CAAC;AAEtD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,gBAAgBA,CAAEC,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AAW,CAAC,CAAC,CAC/CiH,mBAAmB;EACtB,CAAC,EACD,CAAEF,mBAAmB,CACtB,CAAC;EAED,IAAK,CAAEC,wBAAwB,EAAG;IACjC,OAAO,IAAAhD,MAAA,CAAAC,aAAA,EAACiC,cAAc;MAAA,GAAMC;IAAK,CAAI,CAAC;EACvC;EAEA,OACC,IAAAnC,MAAA,CAAAC,aAAA,EAAC+B,qBAAqB;IAACC,KAAK,EAAGC,cAAgB;IAACC,KAAK,EAAGA;EAAO,CAAE,CAAC;AAEpE,CAAC,EACD,kBACD,CAAC;AAED,IAAAe,gBAAS,EACR,0BAA0B,EAC1B,0BAA0B,EAC1BrB,YACD,CAAC;AACD,IAAAqB,gBAAS,EACR,uBAAuB,EACvB,uCAAuC,EACvCL,gBACD,CAAC"}
|
|
1
|
+
{"version":3,"names":["_classnames","_interopRequireDefault","require","_compose","_hooks","_blocks","_data","_components","_i18n","_store","_components2","_useSettings","_layouts","_blockEditingMode","_definitions","_utils","_lockUnlock","layoutBlockSupportKey","hasLayoutBlockSupport","blockName","hasBlockSupport","useLayoutClasses","blockAttributes","kebabCase","unlock","componentsPrivateApis","layout","default","defaultBlockLayout","getBlockSupport","usedLayout","inherit","contentSize","wideSize","type","layoutClassnames","LAYOUT_DEFINITIONS","className","baseClassName","splitBlockName","split","fullBlockName","pop","join","compoundClassName","push","hasGlobalPadding","useSelect","select","blockEditorStore","getSettings","__experimentalFeatures","useRootPaddingAwareAlignments","orientation","justifyContent","flexWrap","useLayoutStyles","selector","style","fullLayoutType","getLayoutType","blockGapSupport","useSettings","hasBlockGapSupport","getLayoutStyle","LayoutPanelPure","setAttributes","name","clientId","settings","useBlockSettings","layoutSettings","themeSupportsLayout","supportsLayout","blockEditingMode","useBlockEditingMode","layoutBlockSupport","blockSupportAndThemeSettings","allowSwitching","allowEditing","allowInheriting","blockSupportAndLayout","defaultType","blockLayoutType","showInheritToggle","layoutType","constrainedType","displayControlsForLegacyLayouts","hasContentSizeOrLegacySettings","onChangeType","newType","onChangeLayout","newLayout","_react","createElement","Fragment","InspectorControls","PanelBody","title","__","ToggleControl","__nextHasNoMarginBottom","label","checked","onChange","help","LayoutTypeSwitcher","inspectorControls","toolBarControls","_default","exports","shareWithChildBlocks","edit","attributeKeys","hasSupport","ButtonGroup","getLayoutTypes","map","Button","key","isPressed","onClick","addAttribute","_settings$attributes$","attributes","BlockWithLayoutStyles","block","BlockListBlock","props","layoutClasses","id","useInstanceId","selectorPrefix","css","layoutClassNames","classnames","useStyleOverride","__unstableLayoutClassNames","withLayoutStyles","createHigherOrderComponent","blockSupportsLayout","extraProps","getBlockSettings","disableLayoutStyles","undefined","addFilter"],"sources":["@wordpress/block-editor/src/hooks/layout.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { createHigherOrderComponent, useInstanceId } from '@wordpress/compose';\nimport { addFilter } from '@wordpress/hooks';\nimport { getBlockSupport, hasBlockSupport } from '@wordpress/blocks';\nimport { useSelect } from '@wordpress/data';\nimport {\n\tButton,\n\tButtonGroup,\n\tToggleControl,\n\tPanelBody,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../store';\nimport { InspectorControls } from '../components';\nimport { useSettings } from '../components/use-settings';\nimport { getLayoutType, getLayoutTypes } from '../layouts';\nimport { useBlockEditingMode } from '../components/block-editing-mode';\nimport { LAYOUT_DEFINITIONS } from '../layouts/definitions';\nimport { useBlockSettings, useStyleOverride } from './utils';\nimport { unlock } from '../lock-unlock';\n\nconst layoutBlockSupportKey = 'layout';\n\nfunction hasLayoutBlockSupport( blockName ) {\n\treturn (\n\t\thasBlockSupport( blockName, 'layout' ) ||\n\t\thasBlockSupport( blockName, '__experimentalLayout' )\n\t);\n}\n\n/**\n * Generates the utility classnames for the given block's layout attributes.\n *\n * @param { Object } blockAttributes Block attributes.\n * @param { string } blockName Block name.\n *\n * @return { Array } Array of CSS classname strings.\n */\nexport function useLayoutClasses( blockAttributes = {}, blockName = '' ) {\n\tconst { kebabCase } = unlock( componentsPrivateApis );\n\tconst { layout } = blockAttributes;\n\tconst { default: defaultBlockLayout } =\n\t\tgetBlockSupport( blockName, layoutBlockSupportKey ) || {};\n\tconst usedLayout =\n\t\tlayout?.inherit || layout?.contentSize || layout?.wideSize\n\t\t\t? { ...layout, type: 'constrained' }\n\t\t\t: layout || defaultBlockLayout || {};\n\n\tconst layoutClassnames = [];\n\n\tif ( LAYOUT_DEFINITIONS[ usedLayout?.type || 'default' ]?.className ) {\n\t\tconst baseClassName =\n\t\t\tLAYOUT_DEFINITIONS[ usedLayout?.type || 'default' ]?.className;\n\t\tconst splitBlockName = blockName.split( '/' );\n\t\tconst fullBlockName =\n\t\t\tsplitBlockName[ 0 ] === 'core'\n\t\t\t\t? splitBlockName.pop()\n\t\t\t\t: splitBlockName.join( '-' );\n\t\tconst compoundClassName = `wp-block-${ fullBlockName }-${ baseClassName }`;\n\t\tlayoutClassnames.push( baseClassName, compoundClassName );\n\t}\n\n\tconst hasGlobalPadding = useSelect(\n\t\t( select ) => {\n\t\t\treturn (\n\t\t\t\t( usedLayout?.inherit ||\n\t\t\t\t\tusedLayout?.contentSize ||\n\t\t\t\t\tusedLayout?.type === 'constrained' ) &&\n\t\t\t\tselect( blockEditorStore ).getSettings().__experimentalFeatures\n\t\t\t\t\t?.useRootPaddingAwareAlignments\n\t\t\t);\n\t\t},\n\t\t[ usedLayout?.contentSize, usedLayout?.inherit, usedLayout?.type ]\n\t);\n\n\tif ( hasGlobalPadding ) {\n\t\tlayoutClassnames.push( 'has-global-padding' );\n\t}\n\n\tif ( usedLayout?.orientation ) {\n\t\tlayoutClassnames.push( `is-${ kebabCase( usedLayout.orientation ) }` );\n\t}\n\n\tif ( usedLayout?.justifyContent ) {\n\t\tlayoutClassnames.push(\n\t\t\t`is-content-justification-${ kebabCase(\n\t\t\t\tusedLayout.justifyContent\n\t\t\t) }`\n\t\t);\n\t}\n\n\tif ( usedLayout?.flexWrap && usedLayout.flexWrap === 'nowrap' ) {\n\t\tlayoutClassnames.push( 'is-nowrap' );\n\t}\n\n\treturn layoutClassnames;\n}\n\n/**\n * Generates a CSS rule with the given block's layout styles.\n *\n * @param { Object } blockAttributes Block attributes.\n * @param { string } blockName Block name.\n * @param { string } selector A selector to use in generating the CSS rule.\n *\n * @return { string } CSS rule.\n */\nexport function useLayoutStyles( blockAttributes = {}, blockName, selector ) {\n\tconst { layout = {}, style = {} } = blockAttributes;\n\t// Update type for blocks using legacy layouts.\n\tconst usedLayout =\n\t\tlayout?.inherit || layout?.contentSize || layout?.wideSize\n\t\t\t? { ...layout, type: 'constrained' }\n\t\t\t: layout || {};\n\tconst fullLayoutType = getLayoutType( usedLayout?.type || 'default' );\n\tconst [ blockGapSupport ] = useSettings( 'spacing.blockGap' );\n\tconst hasBlockGapSupport = blockGapSupport !== null;\n\treturn fullLayoutType?.getLayoutStyle?.( {\n\t\tblockName,\n\t\tselector,\n\t\tlayout,\n\t\tstyle,\n\t\thasBlockGapSupport,\n\t} );\n}\n\nfunction LayoutPanelPure( {\n\tlayout,\n\tsetAttributes,\n\tname: blockName,\n\tclientId,\n} ) {\n\tconst settings = useBlockSettings( blockName );\n\t// Block settings come from theme.json under settings.[blockName].\n\tconst { layout: layoutSettings } = settings;\n\tconst { themeSupportsLayout } = useSelect( ( select ) => {\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\treturn {\n\t\t\tthemeSupportsLayout: getSettings().supportsLayout,\n\t\t};\n\t}, [] );\n\tconst blockEditingMode = useBlockEditingMode();\n\n\tif ( blockEditingMode !== 'default' ) {\n\t\treturn null;\n\t}\n\n\t// Layout block support comes from the block's block.json.\n\tconst layoutBlockSupport = getBlockSupport(\n\t\tblockName,\n\t\tlayoutBlockSupportKey,\n\t\t{}\n\t);\n\tconst blockSupportAndThemeSettings = {\n\t\t...layoutSettings,\n\t\t...layoutBlockSupport,\n\t};\n\tconst {\n\t\tallowSwitching,\n\t\tallowEditing = true,\n\t\tallowInheriting = true,\n\t\tdefault: defaultBlockLayout,\n\t} = blockSupportAndThemeSettings;\n\n\tif ( ! allowEditing ) {\n\t\treturn null;\n\t}\n\n\t/*\n\t * Try to find the layout type from either the\n\t * block's layout settings or any saved layout config.\n\t */\n\tconst blockSupportAndLayout = {\n\t\t...layoutBlockSupport,\n\t\t...layout,\n\t};\n\tconst { type, default: { type: defaultType = 'default' } = {} } =\n\t\tblockSupportAndLayout;\n\tconst blockLayoutType = type || defaultType;\n\n\t// Only show the inherit toggle if it's supported,\n\t// and either the default / flow or the constrained layout type is in use, as the toggle switches from one to the other.\n\tconst showInheritToggle = !! (\n\t\tallowInheriting &&\n\t\t( ! blockLayoutType ||\n\t\t\tblockLayoutType === 'default' ||\n\t\t\tblockLayoutType === 'constrained' ||\n\t\t\tblockSupportAndLayout.inherit )\n\t);\n\n\tconst usedLayout = layout || defaultBlockLayout || {};\n\tconst { inherit = false, contentSize = null } = usedLayout;\n\t/**\n\t * `themeSupportsLayout` is only relevant to the `default/flow` or\n\t * `constrained` layouts and it should not be taken into account when other\n\t * `layout` types are used.\n\t */\n\tif (\n\t\t( blockLayoutType === 'default' ||\n\t\t\tblockLayoutType === 'constrained' ) &&\n\t\t! themeSupportsLayout\n\t) {\n\t\treturn null;\n\t}\n\tconst layoutType = getLayoutType( blockLayoutType );\n\tconst constrainedType = getLayoutType( 'constrained' );\n\tconst displayControlsForLegacyLayouts =\n\t\t! usedLayout.type && ( contentSize || inherit );\n\tconst hasContentSizeOrLegacySettings = !! inherit || !! contentSize;\n\n\tconst onChangeType = ( newType ) =>\n\t\tsetAttributes( { layout: { type: newType } } );\n\tconst onChangeLayout = ( newLayout ) =>\n\t\tsetAttributes( { layout: newLayout } );\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody title={ __( 'Layout' ) }>\n\t\t\t\t\t{ showInheritToggle && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tclassName=\"block-editor-hooks__toggle-control\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Inner blocks use content width' ) }\n\t\t\t\t\t\t\t\tchecked={\n\t\t\t\t\t\t\t\t\tlayoutType?.name === 'constrained' ||\n\t\t\t\t\t\t\t\t\thasContentSizeOrLegacySettings\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonChange={ () =>\n\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\tlayout: {\n\t\t\t\t\t\t\t\t\t\t\ttype:\n\t\t\t\t\t\t\t\t\t\t\t\tlayoutType?.name ===\n\t\t\t\t\t\t\t\t\t\t\t\t\t'constrained' ||\n\t\t\t\t\t\t\t\t\t\t\t\thasContentSizeOrLegacySettings\n\t\t\t\t\t\t\t\t\t\t\t\t\t? 'default'\n\t\t\t\t\t\t\t\t\t\t\t\t\t: 'constrained',\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\thelp={\n\t\t\t\t\t\t\t\t\tlayoutType?.name === 'constrained' ||\n\t\t\t\t\t\t\t\t\thasContentSizeOrLegacySettings\n\t\t\t\t\t\t\t\t\t\t? __(\n\t\t\t\t\t\t\t\t\t\t\t\t'Nested blocks use content width with options for full and wide widths.'\n\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t: __(\n\t\t\t\t\t\t\t\t\t\t\t\t'Nested blocks will fill the width of this container. Toggle to constrain.'\n\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\n\t\t\t\t\t{ ! inherit && allowSwitching && (\n\t\t\t\t\t\t<LayoutTypeSwitcher\n\t\t\t\t\t\t\ttype={ blockLayoutType }\n\t\t\t\t\t\t\tonChange={ onChangeType }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\n\t\t\t\t\t{ layoutType && layoutType.name !== 'default' && (\n\t\t\t\t\t\t<layoutType.inspectorControls\n\t\t\t\t\t\t\tlayout={ usedLayout }\n\t\t\t\t\t\t\tonChange={ onChangeLayout }\n\t\t\t\t\t\t\tlayoutBlockSupport={ blockSupportAndThemeSettings }\n\t\t\t\t\t\t\tname={ blockName }\n\t\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ constrainedType && displayControlsForLegacyLayouts && (\n\t\t\t\t\t\t<constrainedType.inspectorControls\n\t\t\t\t\t\t\tlayout={ usedLayout }\n\t\t\t\t\t\t\tonChange={ onChangeLayout }\n\t\t\t\t\t\t\tlayoutBlockSupport={ blockSupportAndThemeSettings }\n\t\t\t\t\t\t\tname={ blockName }\n\t\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</PanelBody>\n\t\t\t</InspectorControls>\n\t\t\t{ ! inherit && layoutType && (\n\t\t\t\t<layoutType.toolBarControls\n\t\t\t\t\tlayout={ usedLayout }\n\t\t\t\t\tonChange={ onChangeLayout }\n\t\t\t\t\tlayoutBlockSupport={ layoutBlockSupport }\n\t\t\t\t\tname={ blockName }\n\t\t\t\t\tclientId={ clientId }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default {\n\tshareWithChildBlocks: true,\n\tedit: LayoutPanelPure,\n\tattributeKeys: [ 'layout' ],\n\thasSupport( name ) {\n\t\treturn hasLayoutBlockSupport( name );\n\t},\n};\n\nfunction LayoutTypeSwitcher( { type, onChange } ) {\n\treturn (\n\t\t<ButtonGroup>\n\t\t\t{ getLayoutTypes().map( ( { name, label } ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tkey={ name }\n\t\t\t\t\t\tisPressed={ type === name }\n\t\t\t\t\t\tonClick={ () => onChange( name ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ label }\n\t\t\t\t\t</Button>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</ButtonGroup>\n\t);\n}\n\n/**\n * Filters registered block settings, extending attributes to include `layout`.\n *\n * @param {Object} settings Original block settings.\n *\n * @return {Object} Filtered block settings.\n */\nexport function addAttribute( settings ) {\n\tif ( 'type' in ( settings.attributes?.layout ?? {} ) ) {\n\t\treturn settings;\n\t}\n\tif ( hasLayoutBlockSupport( settings ) ) {\n\t\tsettings.attributes = {\n\t\t\t...settings.attributes,\n\t\t\tlayout: {\n\t\t\t\ttype: 'object',\n\t\t\t},\n\t\t};\n\t}\n\n\treturn settings;\n}\n\nfunction BlockWithLayoutStyles( {\n\tblock: BlockListBlock,\n\tprops,\n\tblockGapSupport,\n\tlayoutClasses,\n} ) {\n\tconst { name, attributes } = props;\n\tconst id = useInstanceId( BlockListBlock );\n\tconst { layout } = attributes;\n\tconst { default: defaultBlockLayout } =\n\t\tgetBlockSupport( name, layoutBlockSupportKey ) || {};\n\tconst usedLayout =\n\t\tlayout?.inherit || layout?.contentSize || layout?.wideSize\n\t\t\t? { ...layout, type: 'constrained' }\n\t\t\t: layout || defaultBlockLayout || {};\n\n\tconst { kebabCase } = unlock( componentsPrivateApis );\n\tconst selectorPrefix = `wp-container-${ kebabCase( name ) }-is-layout-`;\n\t// Higher specificity to override defaults from theme.json.\n\tconst selector = `.${ selectorPrefix }${ id }`;\n\tconst hasBlockGapSupport = blockGapSupport !== null;\n\n\t// Get CSS string for the current layout type.\n\t// The CSS and `style` element is only output if it is not empty.\n\tconst fullLayoutType = getLayoutType( usedLayout?.type || 'default' );\n\tconst css = fullLayoutType?.getLayoutStyle?.( {\n\t\tblockName: name,\n\t\tselector,\n\t\tlayout: usedLayout,\n\t\tstyle: attributes?.style,\n\t\thasBlockGapSupport,\n\t} );\n\n\t// Attach a `wp-container-` id-based class name as well as a layout class name such as `is-layout-flex`.\n\tconst layoutClassNames = classnames(\n\t\t{\n\t\t\t[ `${ selectorPrefix }${ id }` ]: !! css, // Only attach a container class if there is generated CSS to be attached.\n\t\t},\n\t\tlayoutClasses\n\t);\n\n\tuseStyleOverride( { css } );\n\n\treturn (\n\t\t<BlockListBlock\n\t\t\t{ ...props }\n\t\t\t__unstableLayoutClassNames={ layoutClassNames }\n\t\t/>\n\t);\n}\n\n/**\n * Override the default block element to add the layout styles.\n *\n * @param {Function} BlockListBlock Original component.\n *\n * @return {Function} Wrapped component.\n */\nexport const withLayoutStyles = createHigherOrderComponent(\n\t( BlockListBlock ) => ( props ) => {\n\t\tconst { clientId, name, attributes } = props;\n\t\tconst blockSupportsLayout = hasLayoutBlockSupport( name );\n\t\tconst layoutClasses = useLayoutClasses( attributes, name );\n\t\tconst extraProps = useSelect(\n\t\t\t( select ) => {\n\t\t\t\t// The callback returns early to avoid block editor subscription.\n\t\t\t\tif ( ! blockSupportsLayout ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst { getSettings, getBlockSettings } = unlock(\n\t\t\t\t\tselect( blockEditorStore )\n\t\t\t\t);\n\t\t\t\tconst { disableLayoutStyles } = getSettings();\n\n\t\t\t\tif ( disableLayoutStyles ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst [ blockGapSupport ] = getBlockSettings(\n\t\t\t\t\tclientId,\n\t\t\t\t\t'spacing.blockGap'\n\t\t\t\t);\n\n\t\t\t\treturn { blockGapSupport };\n\t\t\t},\n\t\t\t[ blockSupportsLayout, clientId ]\n\t\t);\n\n\t\tif ( ! extraProps ) {\n\t\t\treturn (\n\t\t\t\t<BlockListBlock\n\t\t\t\t\t{ ...props }\n\t\t\t\t\t__unstableLayoutClassNames={\n\t\t\t\t\t\tblockSupportsLayout ? layoutClasses : undefined\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<BlockWithLayoutStyles\n\t\t\t\tblock={ BlockListBlock }\n\t\t\t\tprops={ props }\n\t\t\t\tlayoutClasses={ layoutClasses }\n\t\t\t\t{ ...extraProps }\n\t\t\t/>\n\t\t);\n\t},\n\t'withLayoutStyles'\n);\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/layout/addAttribute',\n\taddAttribute\n);\naddFilter(\n\t'editor.BlockListBlock',\n\t'core/editor/layout/with-layout-styles',\n\twithLayoutStyles\n);\n"],"mappings":";;;;;;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AAOA,IAAAM,KAAA,GAAAN,OAAA;AAKA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,YAAA,GAAAR,OAAA;AACA,IAAAS,YAAA,GAAAT,OAAA;AACA,IAAAU,QAAA,GAAAV,OAAA;AACA,IAAAW,iBAAA,GAAAX,OAAA;AACA,IAAAY,YAAA,GAAAZ,OAAA;AACA,IAAAa,MAAA,GAAAb,OAAA;AACA,IAAAc,WAAA,GAAAd,OAAA;AA/BA;AACA;AACA;;AAGA;AACA;AACA;;AAcA;AACA;AACA;;AAUA,MAAMe,qBAAqB,GAAG,QAAQ;AAEtC,SAASC,qBAAqBA,CAAEC,SAAS,EAAG;EAC3C,OACC,IAAAC,uBAAe,EAAED,SAAS,EAAE,QAAS,CAAC,IACtC,IAAAC,uBAAe,EAAED,SAAS,EAAE,sBAAuB,CAAC;AAEtD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,gBAAgBA,CAAEC,eAAe,GAAG,CAAC,CAAC,EAAEH,SAAS,GAAG,EAAE,EAAG;EACxE,MAAM;IAAEI;EAAU,CAAC,GAAG,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oB,CAAC,GAAG7F,WAAW,CAAC,CAAC;IAE7C,IAAK6F,mBAAmB,EAAG;MAC1B;IACD;IAEA,MAAM,CAAElF,eAAe,CAAE,GAAGiF,gBAAgB,CAC3C1E,QAAQ,EACR,kBACD,CAAC;IAED,OAAO;MAAEP;IAAgB,CAAC;EAC3B,CAAC,EACD,CAAE+E,mBAAmB,EAAExE,QAAQ,CAChC,CAAC;EAED,IAAK,CAAEyE,UAAU,EAAG;IACnB,OACC,IAAAhD,MAAA,CAAAC,aAAA,EAACiC,cAAc;MAAA,GACTC,KAAK;MACVS,0BAA0B,EACzBG,mBAAmB,GAAGX,aAAa,GAAGe;IACtC,CACD,CAAC;EAEJ;EAEA,OACC,IAAAnD,MAAA,CAAAC,aAAA,EAAC+B,qBAAqB;IACrBC,KAAK,EAAGC,cAAgB;IACxBC,KAAK,EAAGA,KAAO;IACfC,aAAa,EAAGA,aAAe;IAAA,GAC1BY;EAAU,CACf,CAAC;AAEJ,CAAC,EACD,kBACD,CAAC;AAED,IAAAI,gBAAS,EACR,0BAA0B,EAC1B,0BAA0B,EAC1BvB,YACD,CAAC;AACD,IAAAuB,gBAAS,EACR,uBAAuB,EACvB,uCAAuC,EACvCP,gBACD,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_hooks","require","removeFilter"],"sources":["@wordpress/block-editor/src/hooks/layout.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { removeFilter } from '@wordpress/hooks';\n\n/**\n * Internal dependencies\n */\nimport './layout.js';\n\n// This filter is removed because layout styles shouldn't be added\n// until layout types are supported in the native version.\nremoveFilter(\n\t'editor.BlockListBlock',\n\t'core/editor/layout/with-layout-styles'\n);\n\n// This filter is removed because the layout controls shouldn't be\n// enabled until layout types are supported in the native version.\nremoveFilter(\n\t'editor.BlockEdit',\n\t'core/editor/layout/with-inspector-controls'\n);\n"],"mappings":";;AAGA,IAAAA,MAAA,GAAAC,OAAA;AAKAA,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA,IAAAC,mBAAY,EACX,uBAAuB,EACvB,uCACD,CAAC;;AAED;AACA;AACA,IAAAA,mBAAY,EACX,kBAAkB,EAClB,4CACD,CAAC"}
|
|
1
|
+
{"version":3,"names":["_hooks","require","removeFilter"],"sources":["@wordpress/block-editor/src/hooks/layout.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { removeFilter } from '@wordpress/hooks';\n\n/**\n * Internal dependencies\n */\nimport './layout.js';\n\n// This filter is removed because layout styles shouldn't be added\n// until layout types are supported in the native version.\nremoveFilter(\n\t'editor.BlockListBlock',\n\t'core/editor/layout/with-layout-styles'\n);\n\n// This filter is removed because the layout controls shouldn't be\n// enabled until layout types are supported in the native version.\nremoveFilter(\n\t'editor.BlockEdit',\n\t'core/editor/layout/with-inspector-controls'\n);\n"],"mappings":";;AAGA,IAAAA,MAAA,GAAAC,OAAA;AAKAA,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA,IAAAC,mBAAY,EACX,uBAAuB,EACvB,uCACD,CAAC;;AAED;AACA;AACA,IAAAA,mBAAY,EACX,kBAAkB,EAClB,4CACD,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_blocks","require","_lineHeightControl","_interopRequireDefault","_utils","_useSettings","LINE_HEIGHT_SUPPORT_KEY","exports","LineHeightEdit","props","attributes","style","setAttributes","onChange","newLineHeightValue","newStyle","typography","lineHeight","cleanEmptyObject","_react","createElement","default","__unstableInputWidth","__nextHasNoMarginBottom","value","size","useIsLineHeightDisabled","name","blockName","isEnabled","useSettings","hasBlockSupport"],"sources":["@wordpress/block-editor/src/hooks/line-height.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { hasBlockSupport } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport LineHeightControl from '../components/line-height-control';\nimport { cleanEmptyObject } from './utils';\nimport { useSettings } from '../components/use-settings';\n\nexport const LINE_HEIGHT_SUPPORT_KEY = 'typography.lineHeight';\n\n/**\n * Inspector control panel containing the line height related configuration\n *\n * @param {Object} props\n *\n * @return {Element} Line height edit element.\n */\nexport function LineHeightEdit( props ) {\n\tconst {\n\t\tattributes: { style },\n\t\tsetAttributes,\n\t} = props;\n\n\tconst onChange = ( newLineHeightValue ) => {\n\t\tconst newStyle = {\n\t\t\t...style,\n\t\t\ttypography: {\n\t\t\t\t...style?.typography,\n\t\t\t\tlineHeight: newLineHeightValue,\n\t\t\t},\n\t\t};\n\n\t\tsetAttributes( { style: cleanEmptyObject( newStyle ) } );\n\t};\n\treturn (\n\t\t<LineHeightControl\n\t\t\t__unstableInputWidth=\"100%\"\n\t\t\t__nextHasNoMarginBottom\n\t\t\tvalue={ style?.typography?.lineHeight }\n\t\t\tonChange={ onChange }\n\t\t\tsize=\"__unstable-large\"\n\t\t/>\n\t);\n}\n\n/**\n * Custom hook that checks if line-height settings have been disabled.\n *\n * @param {string} name The name of the block.\n * @return {boolean} Whether setting is disabled.\n */\nexport function useIsLineHeightDisabled( { name: blockName } = {} ) {\n\tconst [ isEnabled ] = useSettings( 'typography.lineHeight' );\n\n\treturn (\n\t\t! isEnabled || ! hasBlockSupport( blockName, LINE_HEIGHT_SUPPORT_KEY )\n\t);\n}\n"],"mappings":";;;;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AAKA,IAAAC,kBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAVA;AACA;AACA;;AAGA;AACA;AACA;;AAKO,MAAMK,uBAAuB,GAAAC,OAAA,CAAAD,uBAAA,GAAG,uBAAuB;;AAE9D;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,cAAcA,CAAEC,KAAK,EAAG;EACvC,MAAM;IACLC,UAAU,EAAE;MAAEC;IAAM,CAAC;IACrBC;EACD,CAAC,GAAGH,KAAK;EAET,MAAMI,QAAQ,GAAKC,kBAAkB,IAAM;IAC1C,MAAMC,QAAQ,GAAG;MAChB,GAAGJ,KAAK;MACRK,UAAU,EAAE;QACX,GAAGL,KAAK,EAAEK,UAAU;QACpBC,UAAU,EAAEH;MACb;IACD,CAAC;IAEDF,aAAa,CAAE;MAAED,KAAK,EAAE,IAAAO,uBAAgB,EAAEH,QAAS;IAAE,CAAE,CAAC;EACzD,CAAC;EACD,OACC,IAAAI,MAAA,CAAAC,aAAA,EAAClB,kBAAA,CAAAmB,OAAiB;IACjBC,oBAAoB,EAAC,MAAM;IAC3BC,uBAAuB;IACvBC,KAAK,EAAGb,KAAK,EAAEK,UAAU,EAAEC,UAAY;IACvCJ,QAAQ,EAAGA,QAAU;IACrBY,IAAI,EAAC;EAAkB,CACvB,CAAC;AAEJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,uBAAuBA,CAAE;EAAEC,IAAI,EAAEC;AAAU,CAAC,GAAG,CAAC,CAAC,EAAG;EACnE,MAAM,CAAEC,SAAS,CAAE,GAAG,IAAAC,wBAAW,EAAE,uBAAwB,CAAC;EAE5D,OACC,CAAED,SAAS,IAAI,CAAE,IAAAE,uBAAe,EAAEH,SAAS,EAAEtB,uBAAwB,CAAC;AAExE"}
|
|
1
|
+
{"version":3,"names":["_blocks","require","_lineHeightControl","_interopRequireDefault","_utils","_useSettings","LINE_HEIGHT_SUPPORT_KEY","exports","LineHeightEdit","props","attributes","style","setAttributes","onChange","newLineHeightValue","newStyle","typography","lineHeight","cleanEmptyObject","_react","createElement","default","__unstableInputWidth","__nextHasNoMarginBottom","value","size","useIsLineHeightDisabled","name","blockName","isEnabled","useSettings","hasBlockSupport"],"sources":["@wordpress/block-editor/src/hooks/line-height.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { hasBlockSupport } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport LineHeightControl from '../components/line-height-control';\nimport { cleanEmptyObject } from './utils';\nimport { useSettings } from '../components/use-settings';\n\nexport const LINE_HEIGHT_SUPPORT_KEY = 'typography.lineHeight';\n\n/**\n * Inspector control panel containing the line height related configuration\n *\n * @param {Object} props\n *\n * @return {Element} Line height edit element.\n */\nexport function LineHeightEdit( props ) {\n\tconst {\n\t\tattributes: { style },\n\t\tsetAttributes,\n\t} = props;\n\n\tconst onChange = ( newLineHeightValue ) => {\n\t\tconst newStyle = {\n\t\t\t...style,\n\t\t\ttypography: {\n\t\t\t\t...style?.typography,\n\t\t\t\tlineHeight: newLineHeightValue,\n\t\t\t},\n\t\t};\n\n\t\tsetAttributes( { style: cleanEmptyObject( newStyle ) } );\n\t};\n\treturn (\n\t\t<LineHeightControl\n\t\t\t__unstableInputWidth=\"100%\"\n\t\t\t__nextHasNoMarginBottom\n\t\t\tvalue={ style?.typography?.lineHeight }\n\t\t\tonChange={ onChange }\n\t\t\tsize=\"__unstable-large\"\n\t\t/>\n\t);\n}\n\n/**\n * Custom hook that checks if line-height settings have been disabled.\n *\n * @param {string} name The name of the block.\n * @return {boolean} Whether setting is disabled.\n */\nexport function useIsLineHeightDisabled( { name: blockName } = {} ) {\n\tconst [ isEnabled ] = useSettings( 'typography.lineHeight' );\n\n\treturn (\n\t\t! isEnabled || ! hasBlockSupport( blockName, LINE_HEIGHT_SUPPORT_KEY )\n\t);\n}\n"],"mappings":";;;;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AAKA,IAAAC,kBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAVA;AACA;AACA;;AAGA;AACA;AACA;;AAKO,MAAMK,uBAAuB,GAAAC,OAAA,CAAAD,uBAAA,GAAG,uBAAuB;;AAE9D;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,cAAcA,CAAEC,KAAK,EAAG;EACvC,MAAM;IACLC,UAAU,EAAE;MAAEC;IAAM,CAAC;IACrBC;EACD,CAAC,GAAGH,KAAK;EAET,MAAMI,QAAQ,GAAKC,kBAAkB,IAAM;IAC1C,MAAMC,QAAQ,GAAG;MAChB,GAAGJ,KAAK;MACRK,UAAU,EAAE;QACX,GAAGL,KAAK,EAAEK,UAAU;QACpBC,UAAU,EAAEH;MACb;IACD,CAAC;IAEDF,aAAa,CAAE;MAAED,KAAK,EAAE,IAAAO,uBAAgB,EAAEH,QAAS;IAAE,CAAE,CAAC;EACzD,CAAC;EACD,OACC,IAAAI,MAAA,CAAAC,aAAA,EAAClB,kBAAA,CAAAmB,OAAiB;IACjBC,oBAAoB,EAAC,MAAM;IAC3BC,uBAAuB;IACvBC,KAAK,EAAGb,KAAK,EAAEK,UAAU,EAAEC,UAAY;IACvCJ,QAAQ,EAAGA,QAAU;IACrBY,IAAI,EAAC;EAAkB,CACvB,CAAC;AAEJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,uBAAuBA,CAAE;EAAEC,IAAI,EAAEC;AAAU,CAAC,GAAG,CAAC,CAAC,EAAG;EACnE,MAAM,CAAEC,SAAS,CAAE,GAAG,IAAAC,wBAAW,EAAE,uBAAwB,CAAC;EAE5D,OACC,CAAED,SAAS,IAAI,CAAE,IAAAE,uBAAe,EAAEH,SAAS,EAAEtB,uBAAwB,CAAC;AAExE","ignoreList":[]}
|
package/build/hooks/lock.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_hooks","require","addAttribute","settings","_settings$attributes$","attributes","lock","type","addFilter"],"sources":["@wordpress/block-editor/src/hooks/lock.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { addFilter } from '@wordpress/hooks';\n\n/**\n * Filters registered block settings, extending attributes to include `lock`.\n *\n * @param {Object} settings Original block settings.\n *\n * @return {Object} Filtered block settings.\n */\nexport function addAttribute( settings ) {\n\t// Allow blocks to specify their own attribute definition with default values if needed.\n\tif ( 'type' in ( settings.attributes?.lock ?? {} ) ) {\n\t\treturn settings;\n\t}\n\t// Gracefully handle if settings.attributes is undefined.\n\tsettings.attributes = {\n\t\t...settings.attributes,\n\t\tlock: {\n\t\t\ttype: 'object',\n\t\t},\n\t};\n\n\treturn settings;\n}\n\naddFilter( 'blocks.registerBlockType', 'core/lock/addAttribute', addAttribute );\n"],"mappings":";;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,YAAYA,CAAEC,QAAQ,EAAG;EAAA,IAAAC,qBAAA;EACxC;EACA,IAAK,MAAM,MAAAA,qBAAA,GAAMD,QAAQ,CAACE,UAAU,EAAEC,IAAI,cAAAF,qBAAA,cAAAA,qBAAA,GAAI,CAAC,CAAC,CAAE,EAAG;IACpD,OAAOD,QAAQ;EAChB;EACA;EACAA,QAAQ,CAACE,UAAU,GAAG;IACrB,GAAGF,QAAQ,CAACE,UAAU;IACtBC,IAAI,EAAE;MACLC,IAAI,EAAE;IACP;EACD,CAAC;EAED,OAAOJ,QAAQ;AAChB;AAEA,IAAAK,gBAAS,EAAE,0BAA0B,EAAE,wBAAwB,EAAEN,YAAa,CAAC"}
|
|
1
|
+
{"version":3,"names":["_hooks","require","addAttribute","settings","_settings$attributes$","attributes","lock","type","addFilter"],"sources":["@wordpress/block-editor/src/hooks/lock.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { addFilter } from '@wordpress/hooks';\n\n/**\n * Filters registered block settings, extending attributes to include `lock`.\n *\n * @param {Object} settings Original block settings.\n *\n * @return {Object} Filtered block settings.\n */\nexport function addAttribute( settings ) {\n\t// Allow blocks to specify their own attribute definition with default values if needed.\n\tif ( 'type' in ( settings.attributes?.lock ?? {} ) ) {\n\t\treturn settings;\n\t}\n\t// Gracefully handle if settings.attributes is undefined.\n\tsettings.attributes = {\n\t\t...settings.attributes,\n\t\tlock: {\n\t\t\ttype: 'object',\n\t\t},\n\t};\n\n\treturn settings;\n}\n\naddFilter( 'blocks.registerBlockType', 'core/lock/addAttribute', addAttribute );\n"],"mappings":";;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,YAAYA,CAAEC,QAAQ,EAAG;EAAA,IAAAC,qBAAA;EACxC;EACA,IAAK,MAAM,MAAAA,qBAAA,GAAMD,QAAQ,CAACE,UAAU,EAAEC,IAAI,cAAAF,qBAAA,cAAAA,qBAAA,GAAI,CAAC,CAAC,CAAE,EAAG;IACpD,OAAOD,QAAQ;EAChB;EACA;EACAA,QAAQ,CAACE,UAAU,GAAG;IACrB,GAAGF,QAAQ,CAACE,UAAU;IACtBC,IAAI,EAAE;MACLC,IAAI,EAAE;IACP;EACD,CAAC;EAED,OAAOJ,QAAQ;AAChB;AAEA,IAAAK,gBAAS,EAAE,0BAA0B,EAAE,wBAAwB,EAAEN,YAAa,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_hooks","require","META_ATTRIBUTE_NAME","addMetaAttribute","blockTypeSettings","attributes","type","addFilter"],"sources":["@wordpress/block-editor/src/hooks/metadata.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { addFilter } from '@wordpress/hooks';\nconst META_ATTRIBUTE_NAME = 'metadata';\n\n/**\n * Filters registered block settings, extending attributes to include `metadata`.\n *\n * see: https://github.com/WordPress/gutenberg/pull/40393/files#r864632012\n *\n * @param {Object} blockTypeSettings Original block settings.\n * @return {Object} Filtered block settings.\n */\nexport function addMetaAttribute( blockTypeSettings ) {\n\t// Allow blocks to specify their own attribute definition with default values if needed.\n\tif ( blockTypeSettings?.attributes?.[ META_ATTRIBUTE_NAME ]?.type ) {\n\t\treturn blockTypeSettings;\n\t}\n\n\tblockTypeSettings.attributes = {\n\t\t...blockTypeSettings.attributes,\n\t\t[ META_ATTRIBUTE_NAME ]: {\n\t\t\ttype: 'object',\n\t\t},\n\t};\n\n\treturn blockTypeSettings;\n}\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/metadata/addMetaAttribute',\n\taddMetaAttribute\n);\n"],"mappings":";;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAEA,MAAMC,mBAAmB,GAAG,UAAU;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,gBAAgBA,CAAEC,iBAAiB,EAAG;EACrD;EACA,IAAKA,iBAAiB,EAAEC,UAAU,GAAIH,mBAAmB,CAAE,EAAEI,IAAI,EAAG;IACnE,OAAOF,iBAAiB;EACzB;EAEAA,iBAAiB,CAACC,UAAU,GAAG;IAC9B,GAAGD,iBAAiB,CAACC,UAAU;IAC/B,CAAEH,mBAAmB,GAAI;MACxBI,IAAI,EAAE;IACP;EACD,CAAC;EAED,OAAOF,iBAAiB;AACzB;AAEA,IAAAG,gBAAS,EACR,0BAA0B,EAC1B,gCAAgC,EAChCJ,gBACD,CAAC"}
|
|
1
|
+
{"version":3,"names":["_hooks","require","META_ATTRIBUTE_NAME","addMetaAttribute","blockTypeSettings","attributes","type","addFilter"],"sources":["@wordpress/block-editor/src/hooks/metadata.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { addFilter } from '@wordpress/hooks';\nconst META_ATTRIBUTE_NAME = 'metadata';\n\n/**\n * Filters registered block settings, extending attributes to include `metadata`.\n *\n * see: https://github.com/WordPress/gutenberg/pull/40393/files#r864632012\n *\n * @param {Object} blockTypeSettings Original block settings.\n * @return {Object} Filtered block settings.\n */\nexport function addMetaAttribute( blockTypeSettings ) {\n\t// Allow blocks to specify their own attribute definition with default values if needed.\n\tif ( blockTypeSettings?.attributes?.[ META_ATTRIBUTE_NAME ]?.type ) {\n\t\treturn blockTypeSettings;\n\t}\n\n\tblockTypeSettings.attributes = {\n\t\t...blockTypeSettings.attributes,\n\t\t[ META_ATTRIBUTE_NAME ]: {\n\t\t\ttype: 'object',\n\t\t},\n\t};\n\n\treturn blockTypeSettings;\n}\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/metadata/addMetaAttribute',\n\taddMetaAttribute\n);\n"],"mappings":";;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAEA,MAAMC,mBAAmB,GAAG,UAAU;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,gBAAgBA,CAAEC,iBAAiB,EAAG;EACrD;EACA,IAAKA,iBAAiB,EAAEC,UAAU,GAAIH,mBAAmB,CAAE,EAAEI,IAAI,EAAG;IACnE,OAAOF,iBAAiB;EACzB;EAEAA,iBAAiB,CAACC,UAAU,GAAG;IAC9B,GAAGD,iBAAiB,CAACC,UAAU;IAC/B,CAAEH,mBAAmB,GAAI;MACxBI,IAAI,EAAE;IACP;EACD,CAAC;EAED,OAAOF,iBAAiB;AACzB;AAEA,IAAAG,gBAAS,EACR,0BAA0B,EAC1B,gCAAgC,EAChCJ,gBACD,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_classnames","_interopRequireDefault","require","_i18n","_blocks","_components","_compose","_data","_element","_useSettings","_inspectorControls","_useBlockDisplayInformation","_utils","_lockUnlock","_store","CustomSelectControl","unlock","componentsPrivateApis","POSITION_SUPPORT_KEY","OPTION_CLASSNAME","DEFAULT_OPTION","key","value","name","__","className","STICKY_OPTION","_x","__experimentalHint","FIXED_OPTION","POSITION_SIDES","VALID_POSITION_TYPES","getPositionCSS","selector","style","output","type","positionType","position","includes","forEach","side","undefined","hasStickyPositionSupport","blockType","support","getBlockSupport","sticky","hasFixedPositionSupport","fixed","hasPositionSupport","hasPositionValue","props","attributes","hasStickyOrFixedPositionValue","resetPosition","setAttributes","cleanEmptyObject","top","right","bottom","left","useIsPositionDisabled","blockName","allowFixed","allowSticky","useSettings","isDisabled","PositionPanelPure","clientId","firstParentClientId","useSelect","select","getBlockParents","blockEditorStore","parents","length","blockInformation","useBlockDisplayInformation","stickyHelpText","sprintf","title","options","useMemo","availableOptions","push","onChangeType","next","placementValue","newStyle","selectedOption","find","option","Platform","web","_react","createElement","default","group","BaseControl","__nextHasNoMarginBottom","help","__next40pxDefaultSize","label","hideLabelFromVision","describedBy","__experimentalShowSelectedHint","onChange","selectedItem","size","native","_default","exports","edit","Edit","isPositionDisabled","useBlockProps","attributeKeys","hasSupport","hasBlockSupport","hasPositionBlockSupport","allowPositionStyles","id","useInstanceId","positionSelector","css","classnames","useStyleOverride"],"sources":["@wordpress/block-editor/src/hooks/position.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { getBlockSupport, hasBlockSupport } from '@wordpress/blocks';\nimport {\n\tBaseControl,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport { useInstanceId } from '@wordpress/compose';\nimport { useSelect } from '@wordpress/data';\nimport { useMemo, Platform } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\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 { unlock } from '../lock-unlock';\nimport { store as blockEditorStore } from '../store';\n\nconst { CustomSelectControl } = unlock( componentsPrivateApis );\n\nconst POSITION_SUPPORT_KEY = 'position';\n\nconst OPTION_CLASSNAME =\n\t'block-editor-hooks__position-selection__select-control__option';\n\nconst DEFAULT_OPTION = {\n\tkey: 'default',\n\tvalue: '',\n\tname: __( 'Default' ),\n\tclassName: OPTION_CLASSNAME,\n};\n\nconst STICKY_OPTION = {\n\tkey: 'sticky',\n\tvalue: 'sticky',\n\tname: _x( 'Sticky', 'Name for the value of the CSS position property' ),\n\tclassName: OPTION_CLASSNAME,\n\t__experimentalHint: __(\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\tname: _x( 'Fixed', 'Name for the value of the CSS position property' ),\n\tclassName: OPTION_CLASSNAME,\n\t__experimentalHint: __(\n\t\t'The block will not move when the page is scrolled.'\n\t),\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\n\t// Only display position controls if there is at least one option to choose from.\n\treturn Platform.select( {\n\t\tweb:\n\t\t\toptions.length > 1 ? (\n\t\t\t\t<InspectorControls group=\"position\">\n\t\t\t\t\t<BaseControl\n\t\t\t\t\t\tclassName=\"block-editor-hooks__position-selection\"\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\thelp={ stickyHelpText }\n\t\t\t\t\t>\n\t\t\t\t\t\t<CustomSelectControl\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tclassName=\"block-editor-hooks__position-selection__select-control\"\n\t\t\t\t\t\t\tlabel={ __( 'Position' ) }\n\t\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\t\tdescribedBy={ sprintf(\n\t\t\t\t\t\t\t\t// translators: %s: Currently selected position.\n\t\t\t\t\t\t\t\t__( 'Currently selected position: %s' ),\n\t\t\t\t\t\t\t\tselectedOption.name\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\toptions={ options }\n\t\t\t\t\t\t\tvalue={ selectedOption }\n\t\t\t\t\t\t\t__experimentalShowSelectedHint\n\t\t\t\t\t\t\tonChange={ ( { selectedItem } ) => {\n\t\t\t\t\t\t\t\tonChangeType( selectedItem.value );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tsize={ '__unstable-large' }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</BaseControl>\n\t\t\t\t</InspectorControls>\n\t\t\t) : null,\n\t\tnative: null,\n\t} );\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\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( useBlockProps );\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 = classnames( {\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"],"mappings":";;;;;;;;;;;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AAIA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AAKA,IAAAO,YAAA,GAAAP,OAAA;AACA,IAAAQ,kBAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,2BAAA,GAAAV,sBAAA,CAAAC,OAAA;AACA,IAAAU,MAAA,GAAAV,OAAA;AACA,IAAAW,WAAA,GAAAX,OAAA;AACA,IAAAY,MAAA,GAAAZ,OAAA;AA1B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,CAAE;MACfC,QAAQ,EAAE2F,gBAAgB;MAC1B1F;IACD,CAAE,CAAC,IAAI,EAAE;EACX;;EAEA;EACA,MAAMT,SAAS,GAAG,IAAAqG,mBAAU,EAAE;IAC7B,CAAG,gBAAgBJ,EAAI,EAAC,GAAID,mBAAmB,IAAI,CAAC,CAAEI,GAAG;IAAE;IAC3D,CAAG,eAAe3F,KAAK,EAAEI,QAAQ,EAAEF,IAAM,EAAC,GACzCqF,mBAAmB,IAAI,CAAC,CAAEI,GAAG,IAAI,CAAC,CAAE3F,KAAK,EAAEI,QAAQ,EAAEF;EACvD,CAAE,CAAC;EAEH,IAAA2F,uBAAgB,EAAE;IAAEF;EAAI,CAAE,CAAC;EAE3B,OAAO;IAAEpG;EAAU,CAAC;AACrB"}
|
|
1
|
+
{"version":3,"names":["_classnames","_interopRequireDefault","require","_i18n","_blocks","_components","_compose","_data","_element","_useSettings","_inspectorControls","_useBlockDisplayInformation","_utils","_lockUnlock","_store","CustomSelectControl","unlock","componentsPrivateApis","POSITION_SUPPORT_KEY","OPTION_CLASSNAME","DEFAULT_OPTION","key","value","name","__","className","STICKY_OPTION","_x","__experimentalHint","FIXED_OPTION","POSITION_SIDES","VALID_POSITION_TYPES","getPositionCSS","selector","style","output","type","positionType","position","includes","forEach","side","undefined","hasStickyPositionSupport","blockType","support","getBlockSupport","sticky","hasFixedPositionSupport","fixed","hasPositionSupport","hasPositionValue","props","attributes","hasStickyOrFixedPositionValue","resetPosition","setAttributes","cleanEmptyObject","top","right","bottom","left","useIsPositionDisabled","blockName","allowFixed","allowSticky","useSettings","isDisabled","PositionPanelPure","clientId","firstParentClientId","useSelect","select","getBlockParents","blockEditorStore","parents","length","blockInformation","useBlockDisplayInformation","stickyHelpText","sprintf","title","options","useMemo","availableOptions","push","onChangeType","next","placementValue","newStyle","selectedOption","find","option","Platform","web","_react","createElement","default","group","BaseControl","__nextHasNoMarginBottom","help","__next40pxDefaultSize","label","hideLabelFromVision","describedBy","__experimentalShowSelectedHint","onChange","selectedItem","size","native","_default","exports","edit","Edit","isPositionDisabled","useBlockProps","attributeKeys","hasSupport","hasBlockSupport","hasPositionBlockSupport","allowPositionStyles","id","useInstanceId","positionSelector","css","classnames","useStyleOverride"],"sources":["@wordpress/block-editor/src/hooks/position.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { getBlockSupport, hasBlockSupport } from '@wordpress/blocks';\nimport {\n\tBaseControl,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport { useInstanceId } from '@wordpress/compose';\nimport { useSelect } from '@wordpress/data';\nimport { useMemo, Platform } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\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 { unlock } from '../lock-unlock';\nimport { store as blockEditorStore } from '../store';\n\nconst { CustomSelectControl } = unlock( componentsPrivateApis );\n\nconst POSITION_SUPPORT_KEY = 'position';\n\nconst OPTION_CLASSNAME =\n\t'block-editor-hooks__position-selection__select-control__option';\n\nconst DEFAULT_OPTION = {\n\tkey: 'default',\n\tvalue: '',\n\tname: __( 'Default' ),\n\tclassName: OPTION_CLASSNAME,\n};\n\nconst STICKY_OPTION = {\n\tkey: 'sticky',\n\tvalue: 'sticky',\n\tname: _x( 'Sticky', 'Name for the value of the CSS position property' ),\n\tclassName: OPTION_CLASSNAME,\n\t__experimentalHint: __(\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\tname: _x( 'Fixed', 'Name for the value of the CSS position property' ),\n\tclassName: OPTION_CLASSNAME,\n\t__experimentalHint: __(\n\t\t'The block will not move when the page is scrolled.'\n\t),\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\n\t// Only display position controls if there is at least one option to choose from.\n\treturn Platform.select( {\n\t\tweb:\n\t\t\toptions.length > 1 ? (\n\t\t\t\t<InspectorControls group=\"position\">\n\t\t\t\t\t<BaseControl\n\t\t\t\t\t\tclassName=\"block-editor-hooks__position-selection\"\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\thelp={ stickyHelpText }\n\t\t\t\t\t>\n\t\t\t\t\t\t<CustomSelectControl\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tclassName=\"block-editor-hooks__position-selection__select-control\"\n\t\t\t\t\t\t\tlabel={ __( 'Position' ) }\n\t\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\t\tdescribedBy={ sprintf(\n\t\t\t\t\t\t\t\t// translators: %s: Currently selected position.\n\t\t\t\t\t\t\t\t__( 'Currently selected position: %s' ),\n\t\t\t\t\t\t\t\tselectedOption.name\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\toptions={ options }\n\t\t\t\t\t\t\tvalue={ selectedOption }\n\t\t\t\t\t\t\t__experimentalShowSelectedHint\n\t\t\t\t\t\t\tonChange={ ( { selectedItem } ) => {\n\t\t\t\t\t\t\t\tonChangeType( selectedItem.value );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tsize={ '__unstable-large' }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</BaseControl>\n\t\t\t\t</InspectorControls>\n\t\t\t) : null,\n\t\tnative: null,\n\t} );\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\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( useBlockProps );\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 = classnames( {\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"],"mappings":";;;;;;;;;;;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AAIA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AAKA,IAAAO,YAAA,GAAAP,OAAA;AACA,IAAAQ,kBAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,2BAAA,GAAAV,sBAAA,CAAAC,OAAA;AACA,IAAAU,MAAA,GAAAV,OAAA;AACA,IAAAW,WAAA,GAAAX,OAAA;AACA,IAAAY,MAAA,GAAAZ,OAAA;AA1BA;AACA;AACA;;AAGA;AACA;AACA;;AAWA;AACA;AACA;;AAQA,MAAM;EAAEa;AAAoB,CAAC,GAAG,IAAAC,kBAAM,EAAEC,uBAAsB,CAAC;AAE/D,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AAE;IAC7B,CAAG,gBAAgBJ,EAAI,EAAC,GAAID,mBAAmB,IAAI,CAAC,CAAEI,GAAG;IAAE;IAC3D,CAAG,eAAe3F,KAAK,EAAEI,QAAQ,EAAEF,IAAM,EAAC,GACzCqF,mBAAmB,IAAI,CAAC,CAAEI,GAAG,IAAI,CAAC,CAAE3F,KAAK,EAAEI,QAAQ,EAAEF;EACvD,CAAE,CAAC;EAEH,IAAA2F,uBAAgB,EAAE;IAAEF;EAAI,CAAE,CAAC;EAE3B,OAAO;IAAEpG;EAAU,CAAC;AACrB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_hooks","require","_blocks","hasSettingsSupport","blockType","hasBlockSupport","addAttribute","settings","attributes","type","addFilter"],"sources":["@wordpress/block-editor/src/hooks/settings.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { addFilter } from '@wordpress/hooks';\nimport { hasBlockSupport } from '@wordpress/blocks';\n\nconst hasSettingsSupport = ( blockType ) =>\n\thasBlockSupport( blockType, '__experimentalSettings', false );\n\nfunction addAttribute( settings ) {\n\tif ( ! hasSettingsSupport( settings ) ) {\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?.settings ) {\n\t\tsettings.attributes = {\n\t\t\t...settings.attributes,\n\t\t\tsettings: {\n\t\t\t\ttype: 'object',\n\t\t\t},\n\t\t};\n\t}\n\n\treturn settings;\n}\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/settings/addAttribute',\n\taddAttribute\n);\n"],"mappings":";;AAGA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAJA;AACA;AACA;;AAIA,MAAME,kBAAkB,GAAKC,SAAS,IACrC,IAAAC,uBAAe,EAAED,SAAS,EAAE,wBAAwB,EAAE,KAAM,CAAC;AAE9D,SAASE,YAAYA,CAAEC,QAAQ,EAAG;EACjC,IAAK,CAAEJ,kBAAkB,CAAEI,QAAS,CAAC,EAAG;IACvC,OAAOA,QAAQ;EAChB;;EAEA;EACA,IAAK,CAAEA,QAAQ,EAAEC,UAAU,EAAED,QAAQ,EAAG;IACvCA,QAAQ,CAACC,UAAU,GAAG;MACrB,GAAGD,QAAQ,CAACC,UAAU;MACtBD,QAAQ,EAAE;QACTE,IAAI,EAAE;MACP;IACD,CAAC;EACF;EAEA,OAAOF,QAAQ;AAChB;AAEA,IAAAG,gBAAS,EACR,0BAA0B,EAC1B,4BAA4B,EAC5BJ,YACD,CAAC"}
|
|
1
|
+
{"version":3,"names":["_hooks","require","_blocks","hasSettingsSupport","blockType","hasBlockSupport","addAttribute","settings","attributes","type","addFilter"],"sources":["@wordpress/block-editor/src/hooks/settings.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { addFilter } from '@wordpress/hooks';\nimport { hasBlockSupport } from '@wordpress/blocks';\n\nconst hasSettingsSupport = ( blockType ) =>\n\thasBlockSupport( blockType, '__experimentalSettings', false );\n\nfunction addAttribute( settings ) {\n\tif ( ! hasSettingsSupport( settings ) ) {\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?.settings ) {\n\t\tsettings.attributes = {\n\t\t\t...settings.attributes,\n\t\t\tsettings: {\n\t\t\t\ttype: 'object',\n\t\t\t},\n\t\t};\n\t}\n\n\treturn settings;\n}\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/settings/addAttribute',\n\taddAttribute\n);\n"],"mappings":";;AAGA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAJA;AACA;AACA;;AAIA,MAAME,kBAAkB,GAAKC,SAAS,IACrC,IAAAC,uBAAe,EAAED,SAAS,EAAE,wBAAwB,EAAE,KAAM,CAAC;AAE9D,SAASE,YAAYA,CAAEC,QAAQ,EAAG;EACjC,IAAK,CAAEJ,kBAAkB,CAAEI,QAAS,CAAC,EAAG;IACvC,OAAOA,QAAQ;EAChB;;EAEA;EACA,IAAK,CAAEA,QAAQ,EAAEC,UAAU,EAAED,QAAQ,EAAG;IACvCA,QAAQ,CAACC,UAAU,GAAG;MACrB,GAAGD,QAAQ,CAACC,UAAU;MACtBD,QAAQ,EAAE;QACTE,IAAI,EAAE;MACP;IACD,CAAC;EACF;EAEA,OAAOF,QAAQ;AAChB;AAEA,IAAAG,gBAAS,EACR,0BAA0B,EAC1B,4BAA4B,EAC5BJ,YACD,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_element","require","_isShallowEqual","_interopRequireDefault","_cover","_useBlockRefs","SpacingVisualizer","clientId","value","computeStyle","forceShow","blockElement","useBlockElement","style","updateStyle","useReducer","useLayoutEffect","window","requestAnimationFrame","previousValue","useRef","isActive","setIsActive","useState","useEffect","isShallowEqual","current","timeout","setTimeout","clearTimeout","_react","createElement","default","__unstablePopoverSlot","className","getComputedCSS","element","property","ownerDocument","defaultView","getComputedStyle","getPropertyValue","MarginVisualizer","spacing","margin","top","right","bottom","left","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","PaddingVisualizer","padding"],"sources":["@wordpress/block-editor/src/hooks/spacing-visualizer.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tuseState,\n\tuseRef,\n\tuseLayoutEffect,\n\tuseEffect,\n\tuseReducer,\n} from '@wordpress/element';\nimport isShallowEqual from '@wordpress/is-shallow-equal';\n\n/**\n * Internal dependencies\n */\nimport BlockPopoverCover from '../components/block-popover/cover';\nimport { __unstableUseBlockElement as 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\tuseLayoutEffect( () => {\n\t\tif ( ! blockElement ) {\n\t\t\treturn;\n\t\t}\n\t\t// It's not sufficient to read the computed spacing value when value.spacing changes as\n\t\t// useEffect may run before the browser recomputes CSS. We therefore combine\n\t\t// useLayoutEffect and two rAF calls to ensure that we read the spacing after the current\n\t\t// paint but before the next paint.\n\t\t// See https://github.com/WordPress/gutenberg/pull/59227.\n\t\twindow.requestAnimationFrame( () =>\n\t\t\twindow.requestAnimationFrame( updateStyle )\n\t\t);\n\t}, [ blockElement, value ] );\n\n\tconst previousValue = useRef( value );\n\tconst [ isActive, setIsActive ] = useState( false );\n\n\tuseEffect( () => {\n\t\tif ( isShallowEqual( value, previousValue.current ) || forceShow ) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetIsActive( true );\n\t\tpreviousValue.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"],"mappings":";;;;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AAOA,IAAAC,eAAA,GAAAC,sBAAA,CAAAF,OAAA;AAKA,IAAAG,MAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AAhBA;AACA;AACA;;AAUA;AACA;AACA;;AAIA,SAASK,iBAAiBA,CAAE;EAAEC,QAAQ;EAAEC,KAAK;EAAEC,YAAY;EAAEC;AAAU,CAAC,EAAG;EAC1E,MAAMC,YAAY,GAAG,IAAAC,uCAAe,EAAEL,QAAS,CAAC;EAChD,MAAM,CAAEM,KAAK,EAAEC,WAAW,CAAE,GAAG,IAAAC,mBAAU,EAAE,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AA,CAAAC,aAAA,EAACzB,iBAAiB;IACjBC,QAAQ,EAAGA,QAAU;IACrBC,KAAK,EAAGA,KAAK,EAAEmC,OAAO,EAAEW,OAAS;IACjC7C,YAAY,EAAKE,YAAY,KAAQ;MACpCsC,cAAc,EAAEd,cAAc,CAAExB,YAAY,EAAE,aAAc,CAAC;MAC7DuC,gBAAgB,EAAEf,cAAc,CAC/BxB,YAAY,EACZ,eACD,CAAC;MACDwC,iBAAiB,EAAEhB,cAAc,CAChCxB,YAAY,EACZ,gBACD,CAAC;MACDyC,eAAe,EAAEjB,cAAc,CAAExB,YAAY,EAAE,cAAe;IAC/D,CAAC,CAAI;IACLD,SAAS,EAAGA;EAAW,CACvB,CAAC;AAEJ"}
|
|
1
|
+
{"version":3,"names":["_element","require","_isShallowEqual","_interopRequireDefault","_cover","_useBlockRefs","SpacingVisualizer","clientId","value","computeStyle","forceShow","blockElement","useBlockElement","style","updateStyle","useReducer","useLayoutEffect","window","requestAnimationFrame","previousValue","useRef","isActive","setIsActive","useState","useEffect","isShallowEqual","current","timeout","setTimeout","clearTimeout","_react","createElement","default","__unstablePopoverSlot","className","getComputedCSS","element","property","ownerDocument","defaultView","getComputedStyle","getPropertyValue","MarginVisualizer","spacing","margin","top","right","bottom","left","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","PaddingVisualizer","padding"],"sources":["@wordpress/block-editor/src/hooks/spacing-visualizer.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tuseState,\n\tuseRef,\n\tuseLayoutEffect,\n\tuseEffect,\n\tuseReducer,\n} from '@wordpress/element';\nimport isShallowEqual from '@wordpress/is-shallow-equal';\n\n/**\n * Internal dependencies\n */\nimport BlockPopoverCover from '../components/block-popover/cover';\nimport { __unstableUseBlockElement as 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\tuseLayoutEffect( () => {\n\t\tif ( ! blockElement ) {\n\t\t\treturn;\n\t\t}\n\t\t// It's not sufficient to read the computed spacing value when value.spacing changes as\n\t\t// useEffect may run before the browser recomputes CSS. We therefore combine\n\t\t// useLayoutEffect and two rAF calls to ensure that we read the spacing after the current\n\t\t// paint but before the next paint.\n\t\t// See https://github.com/WordPress/gutenberg/pull/59227.\n\t\twindow.requestAnimationFrame( () =>\n\t\t\twindow.requestAnimationFrame( updateStyle )\n\t\t);\n\t}, [ blockElement, value ] );\n\n\tconst previousValue = useRef( value );\n\tconst [ isActive, setIsActive ] = useState( false );\n\n\tuseEffect( () => {\n\t\tif ( isShallowEqual( value, previousValue.current ) || forceShow ) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetIsActive( true );\n\t\tpreviousValue.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"],"mappings":";;;;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AAOA,IAAAC,eAAA,GAAAC,sBAAA,CAAAF,OAAA;AAKA,IAAAG,MAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AAhBA;AACA;AACA;;AAUA;AACA;AACA;;AAIA,SAASK,iBAAiBA,CAAE;EAAEC,QAAQ;EAAEC,KAAK;EAAEC,YAAY;EAAEC;AAAU,CAAC,EAAG;EAC1E,MAAMC,Y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C;AAEJ;AAEO,SAAS2C,iBAAiBA,CAAE;EAAE9C,QAAQ;EAAEC,KAAK;EAAEE;AAAU,CAAC,EAAG;EACnE,OACC,IAAAoB,MAAA,CAAAC,aAAA,EAACzB,iBAAiB;IACjBC,QAAQ,EAAGA,QAAU;IACrBC,KAAK,EAAGA,KAAK,EAAEmC,OAAO,EAAEW,OAAS;IACjC7C,YAAY,EAAKE,YAAY,KAAQ;MACpCsC,cAAc,EAAEd,cAAc,CAAExB,YAAY,EAAE,aAAc,CAAC;MAC7DuC,gBAAgB,EAAEf,cAAc,CAC/BxB,YAAY,EACZ,eACD,CAAC;MACDwC,iBAAiB,EAAEhB,cAAc,CAChCxB,YAAY,EACZ,gBACD,CAAC;MACDyC,eAAe,EAAEjB,cAAc,CAAExB,YAAY,EAAE,cAAe;IAC/D,CAAC,CAAI;IACLD,SAAS,EAAGA;EAAW,CACvB,CAAC;AAEJ","ignoreList":[]}
|
package/build/hooks/style.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_element","require","_hooks","_blocks","_compose","_styleEngine","_background","_border","_color","_typography","_dimensions","_utils","_utils2","_blockEditingMode","styleSupportKeys","TYPOGRAPHY_SUPPORT_KEYS","BORDER_SUPPORT_KEY","COLOR_SUPPORT_KEY","DIMENSIONS_SUPPORT_KEY","BACKGROUND_SUPPORT_KEY","SPACING_SUPPORT_KEY","SHADOW_SUPPORT_KEY","hasStyleSupport","nameOrType","some","key","hasBlockSupport","getInlineStyles","styles","output","getCSSRules","forEach","rule","value","addAttribute","settings","attributes","style","Object","assign","type","skipSerializationPathsEdit","TYPOGRAPHY_SUPPORT_KEY","skipSerializationPathsSave","skipSerializationPathsSaveChecks","renamedFeatures","gradients","omitStyle","paths","preserveReference","newStyle","JSON","parse","stringify","Array","isArray","path","split","length","firstSubpath","restPath","addSaveProps","props","blockNameOrType","skipPaths","entries","indicator","skipSerialization","getBlockSupport","featureName","feature","BlockStyleControls","clientId","name","setAttributes","__unstableParentLayout","useBlockSettings","blockEditingMode","useBlockEditingMode","passedProps","_react","createElement","Fragment","ColorEdit","BackgroundImagePanel","TypographyPanel","BorderPanel","DimensionsPanel","_default","exports","default","edit","hasSupport","attributeKeys","useBlockProps","elementTypes","elementType","pseudo","elements","blockElementsContainerIdentifier","useInstanceId","baseElementSelector","blockElementStyles","useMemo","elementCSSRules","shouldSkipSerialization","elementStyles","selector","scopeSelector","ELEMENTS","push","compileCSS","pseudoSelector","element","join","undefined","useStyleOverride","css","className","addFilter"],"sources":["@wordpress/block-editor/src/hooks/style.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { addFilter } from '@wordpress/hooks';\nimport {\n\tgetBlockSupport,\n\thasBlockSupport,\n\t__EXPERIMENTAL_ELEMENTS as ELEMENTS,\n} from '@wordpress/blocks';\nimport { useInstanceId } from '@wordpress/compose';\nimport { getCSSRules, compileCSS } from '@wordpress/style-engine';\n\n/**\n * Internal dependencies\n */\nimport { BACKGROUND_SUPPORT_KEY, BackgroundImagePanel } from './background';\nimport { BORDER_SUPPORT_KEY, BorderPanel, SHADOW_SUPPORT_KEY } from './border';\nimport { COLOR_SUPPORT_KEY, ColorEdit } from './color';\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} from './dimensions';\nimport {\n\tshouldSkipSerialization,\n\tuseStyleOverride,\n\tuseBlockSettings,\n} from './utils';\nimport { scopeSelector } from '../components/global-styles/utils';\nimport { useBlockEditingMode } from '../components/block-editing-mode';\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 * 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 ( ! hasStyleSupport( settings ) ) {\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\t__unstableParentLayout,\n} ) {\n\tconst settings = useBlockSettings( name, __unstableParentLayout );\n\tconst blockEditingMode = useBlockEditingMode();\n\tconst passedProps = {\n\t\tclientId,\n\t\tname,\n\t\tsetAttributes,\n\t\tsettings,\n\t};\n\tif ( blockEditingMode !== 'default' ) {\n\t\treturn null;\n\t}\n\treturn (\n\t\t<>\n\t\t\t<ColorEdit { ...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</>\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\nfunction useBlockProps( { name, style } ) {\n\tconst blockElementsContainerIdentifier = `wp-elements-${ useInstanceId(\n\t\tuseBlockProps\n\t) }`;\n\n\t// The .editor-styles-wrapper selector is required on elements styles. As it is\n\t// added to all other editor styles, not providing it causes reset and global\n\t// styles to override element styles because of higher specificity.\n\tconst baseElementSelector = `.editor-styles-wrapper .${ blockElementsContainerIdentifier }`;\n\tconst blockElementStyles = style?.elements;\n\n\tconst styles = useMemo( () => {\n\t\tif ( ! blockElementStyles ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst elementCSSRules = [];\n\n\t\telementTypes.forEach( ( { elementType, pseudo, elements } ) => {\n\t\t\tconst skipSerialization = shouldSkipSerialization(\n\t\t\t\tname,\n\t\t\t\tCOLOR_SUPPORT_KEY,\n\t\t\t\telementType\n\t\t\t);\n\n\t\t\tif ( skipSerialization ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst elementStyles = blockElementStyles?.[ elementType ];\n\n\t\t\t// Process primary element type styles.\n\t\t\tif ( elementStyles ) {\n\t\t\t\tconst selector = scopeSelector(\n\t\t\t\t\tbaseElementSelector,\n\t\t\t\t\tELEMENTS[ elementType ]\n\t\t\t\t);\n\n\t\t\t\telementCSSRules.push(\n\t\t\t\t\tcompileCSS( elementStyles, { selector } )\n\t\t\t\t);\n\n\t\t\t\t// Process any interactive states for the element type.\n\t\t\t\tif ( pseudo ) {\n\t\t\t\t\tpseudo.forEach( ( pseudoSelector ) => {\n\t\t\t\t\t\tif ( elementStyles[ pseudoSelector ] ) {\n\t\t\t\t\t\t\telementCSSRules.push(\n\t\t\t\t\t\t\t\tcompileCSS( elementStyles[ pseudoSelector ], {\n\t\t\t\t\t\t\t\t\tselector: scopeSelector(\n\t\t\t\t\t\t\t\t\t\tbaseElementSelector,\n\t\t\t\t\t\t\t\t\t\t`${ ELEMENTS[ elementType ] }${ pseudoSelector }`\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Process related elements e.g. h1-h6 for headings\n\t\t\tif ( elements ) {\n\t\t\t\telements.forEach( ( element ) => {\n\t\t\t\t\tif ( blockElementStyles[ element ] ) {\n\t\t\t\t\t\telementCSSRules.push(\n\t\t\t\t\t\t\tcompileCSS( blockElementStyles[ element ], {\n\t\t\t\t\t\t\t\tselector: scopeSelector(\n\t\t\t\t\t\t\t\t\tbaseElementSelector,\n\t\t\t\t\t\t\t\t\tELEMENTS[ element ]\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\treturn elementCSSRules.length > 0\n\t\t\t? elementCSSRules.join( '' )\n\t\t\t: undefined;\n\t}, [ baseElementSelector, blockElementStyles, name ] );\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"],"mappings":";;;;;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAKA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAKA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,WAAA,GAAAR,OAAA;AAKA,IAAAS,WAAA,GAAAT,OAAA;AAKA,IAAAU,MAAA,GAAAV,OAAA;AAKA,IAAAW,OAAA,GAAAX,OAAA;AACA,IAAAY,iBAAA,GAAAZ,OAAA;AAnCA;AACA;AACA;;AAWA;AACA;AACA;;AAsBA,MAAMa,gBAAgB,GAAG,CACxB,GAAGC,mCAAuB,EAC1BC,0BAAkB,EAClBC,wBAAiB,EACjBC,kCAAsB,EACtBC,kCAAsB,EACtBC,+BAAmB,EACnBC,0BAAkB,CAClB;AAED,MAAMC,eAAe,GAAKC,UAAU,IACnCT,gBAAgB,CAACU,IAAI,CAAIC,GAAG,IAAM,IAAAC,uBAAe,EAAEH,UAAU,EAAEE,GAAI,CAAE,CAAC;;AAEvE;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,eAAeA,CAAEC,MAAM,GAAG,CAAC,CAAC,EAAG;EAC9C,MAAMC,MAAM,GAAG,CAAC,CAAC;EACjB;EACA;EACA,IAAAC,wBAAW,EAAEF,MAAO,CAAC,CAACG,OAAO,CAAIC,IAAI,IAAM;IAC1CH,MAAM,CAAEG,IAAI,CAACP,GAAG,CAAE,GAAGO,IAAI,CAACC,KAAK;EAChC,CAAE,CAAC;EAEH,OAAOJ,MAAM;AACd;;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM0B,eAAe,GAAG;EAAEC,SAAS,EAAE;AAAW,CAAC;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,SAASA,CAAEV,KAAK,EAAEW,KAAK,EAAEC,iBAAiB,GAAG,KAAK,EAAG;EACpE,IAAK,CAAEZ,KAAK,EAAG;IACd,OAAOA,KAAK;EACb;EAEA,IAAIa,QAAQ,GAAGb,KAAK;EACpB,IAAK,CAAEY,iBAAiB,EAAG;IAC1BC,QAAQ,GAAGC,IAAI,CAACC,KAAK,CAAED,IAAI,CAACE,SAAS,CAAEhB,KAAM,CAAE,CAAC;EACjD;EAEA,IAAK,CAAEiB,KAAK,CAACC,OAAO,CAAEP,KAAM,CAAC,EAAG;IAC/BA,KAAK,GAAG,CAAEA,KAAK,CAAE;EAClB;EAEAA,KAAK,CAACjB,OAAO,CAAIyB,IAAI,IAAM;IAC1B,IAAK,CAAEF,KAAK,CAACC,OAAO,CAAEC,IAAK,CAAC,EAAG;MAC9BA,IAAI,GAAGA,IAAI,CAACC,KAAK,CAAE,GAAI,CAAC;IACzB;IAEA,IAAKD,IAAI,CAACE,MAAM,GAAG,CAAC,EAAG;MACtB,MAAM,CAAEC,YAAY,EAAE,GAAGC,QAAQ,CAAE,GAAGJ,IAAI;MAC1CT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CAAEM,cAAc,CAAE,EAAG;cACtCR,eAAe,CAACM,IAAI,CACnB,IAAAC,uBAAU,EAAEL,aAAa,CAAEM,cAAc,CAAE,EAAE;gBAC5CL,QAAQ,EAAE,IAAAC,qBAAa,EACtBP,mBAAmB,EAClB,GAAGQ,+BAAQ,CAAEb,WAAW,CAAI,GAAGgB,cAAgB,EACjD;cACD,CAAE,CACH,CAAC;YACF;UACD,CAAE,CAAC;QACJ;MACD;;MAEA;MACA,IAAKd,QAAQ,EAAG;QACfA,QAAQ,CAACnE,OAAO,CAAIkF,OAAO,IAAM;UAChC,IAAKX,kBAAkB,CAAEW,OAAO,CAAE,EAAG;YACpCT,eAAe,CAACM,IAAI,CACnB,IAAAC,uBAAU,EAAET,kBAAkB,CAAEW,OAAO,CAAE,EAAE;cAC1CN,QAAQ,EAAE,IAAAC,qBAAa,EACtBP,mBAAmB,EACnBQ,+BAAQ,CAAEI,OAAO,CAClB;YACD,CAAE,CACH,CAAC;UACF;QACD,CAAE,CAAC;MACJ;IACD,CAAE,CAAC;IAEH,OAAOT,eAAe,CAAC9C,MAAM,GAAG,CAAC,GAC9B8C,eAAe,CAACU,IAAI,CAAE,EAAG,CAAC,GAC1BC,SAAS;EACb,CAAC,EAAE,CAAEd,mBAAmB,EAAEC,kBAAkB,EAAE7B,IAAI,CAAG,CAAC;EAEtD,IAAA2C,uBAAgB,EAAE;IAAEC,GAAG,EAAEzF;EAAO,CAAE,CAAC;EAEnC,OAAOiC,YAAY,CAClB;IAAEyD,SAAS,EAAEnB;EAAiC,CAAC,EAC/C1B,IAAI,EACJ;IAAEpC;EAAM,CAAC,EACTI,0BACD,CAAC;AACF;AAEA,IAAA8E,gBAAS,EACR,0BAA0B,EAC1B,yBAAyB,EACzBrF,YACD,CAAC"}
|
|
1
|
+
{"version":3,"names":["_element","require","_hooks","_blocks","_compose","_styleEngine","_background","_border","_color","_typography","_dimensions","_utils","_utils2","_blockEditingMode","styleSupportKeys","TYPOGRAPHY_SUPPORT_KEYS","BORDER_SUPPORT_KEY","COLOR_SUPPORT_KEY","DIMENSIONS_SUPPORT_KEY","BACKGROUND_SUPPORT_KEY","SPACING_SUPPORT_KEY","SHADOW_SUPPORT_KEY","hasStyleSupport","nameOrType","some","key","hasBlockSupport","getInlineStyles","styles","output","getCSSRules","forEach","rule","value","addAttribute","settings","attributes","style","Object","assign","type","skipSerializationPathsEdit","TYPOGRAPHY_SUPPORT_KEY","skipSerializationPathsSave","skipSerializationPathsSaveChecks","renamedFeatures","gradients","omitStyle","paths","preserveReference","newStyle","JSON","parse","stringify","Array","isArray","path","split","length","firstSubpath","restPath","addSaveProps","props","blockNameOrType","skipPaths","entries","indicator","skipSerialization","getBlockSupport","featureName","feature","BlockStyleControls","clientId","name","setAttributes","__unstableParentLayout","useBlockSettings","blockEditingMode","useBlockEditingMode","passedProps","_react","createElement","Fragment","ColorEdit","BackgroundImagePanel","TypographyPanel","BorderPanel","DimensionsPanel","_default","exports","default","edit","hasSupport","attributeKeys","useBlockProps","elementTypes","elementType","pseudo","elements","blockElementsContainerIdentifier","useInstanceId","baseElementSelector","blockElementStyles","useMemo","elementCSSRules","shouldSkipSerialization","elementStyles","selector","scopeSelector","ELEMENTS","push","compileCSS","pseudoSelector","element","join","undefined","useStyleOverride","css","className","addFilter"],"sources":["@wordpress/block-editor/src/hooks/style.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { addFilter } from '@wordpress/hooks';\nimport {\n\tgetBlockSupport,\n\thasBlockSupport,\n\t__EXPERIMENTAL_ELEMENTS as ELEMENTS,\n} from '@wordpress/blocks';\nimport { useInstanceId } from '@wordpress/compose';\nimport { getCSSRules, compileCSS } from '@wordpress/style-engine';\n\n/**\n * Internal dependencies\n */\nimport { BACKGROUND_SUPPORT_KEY, BackgroundImagePanel } from './background';\nimport { BORDER_SUPPORT_KEY, BorderPanel, SHADOW_SUPPORT_KEY } from './border';\nimport { COLOR_SUPPORT_KEY, ColorEdit } from './color';\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} from './dimensions';\nimport {\n\tshouldSkipSerialization,\n\tuseStyleOverride,\n\tuseBlockSettings,\n} from './utils';\nimport { scopeSelector } from '../components/global-styles/utils';\nimport { useBlockEditingMode } from '../components/block-editing-mode';\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 * 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 ( ! hasStyleSupport( settings ) ) {\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\t__unstableParentLayout,\n} ) {\n\tconst settings = useBlockSettings( name, __unstableParentLayout );\n\tconst blockEditingMode = useBlockEditingMode();\n\tconst passedProps = {\n\t\tclientId,\n\t\tname,\n\t\tsetAttributes,\n\t\tsettings,\n\t};\n\tif ( blockEditingMode !== 'default' ) {\n\t\treturn null;\n\t}\n\treturn (\n\t\t<>\n\t\t\t<ColorEdit { ...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</>\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\nfunction useBlockProps( { name, style } ) {\n\tconst blockElementsContainerIdentifier = `wp-elements-${ useInstanceId(\n\t\tuseBlockProps\n\t) }`;\n\n\t// The .editor-styles-wrapper selector is required on elements styles. As it is\n\t// added to all other editor styles, not providing it causes reset and global\n\t// styles to override element styles because of higher specificity.\n\tconst baseElementSelector = `.editor-styles-wrapper .${ blockElementsContainerIdentifier }`;\n\tconst blockElementStyles = style?.elements;\n\n\tconst styles = useMemo( () => {\n\t\tif ( ! blockElementStyles ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst elementCSSRules = [];\n\n\t\telementTypes.forEach( ( { elementType, pseudo, elements } ) => {\n\t\t\tconst skipSerialization = shouldSkipSerialization(\n\t\t\t\tname,\n\t\t\t\tCOLOR_SUPPORT_KEY,\n\t\t\t\telementType\n\t\t\t);\n\n\t\t\tif ( skipSerialization ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst elementStyles = blockElementStyles?.[ elementType ];\n\n\t\t\t// Process primary element type styles.\n\t\t\tif ( elementStyles ) {\n\t\t\t\tconst selector = scopeSelector(\n\t\t\t\t\tbaseElementSelector,\n\t\t\t\t\tELEMENTS[ elementType ]\n\t\t\t\t);\n\n\t\t\t\telementCSSRules.push(\n\t\t\t\t\tcompileCSS( elementStyles, { selector } )\n\t\t\t\t);\n\n\t\t\t\t// Process any interactive states for the element type.\n\t\t\t\tif ( pseudo ) {\n\t\t\t\t\tpseudo.forEach( ( pseudoSelector ) => {\n\t\t\t\t\t\tif ( elementStyles[ pseudoSelector ] ) {\n\t\t\t\t\t\t\telementCSSRules.push(\n\t\t\t\t\t\t\t\tcompileCSS( elementStyles[ pseudoSelector ], {\n\t\t\t\t\t\t\t\t\tselector: scopeSelector(\n\t\t\t\t\t\t\t\t\t\tbaseElementSelector,\n\t\t\t\t\t\t\t\t\t\t`${ ELEMENTS[ elementType ] }${ pseudoSelector }`\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Process related elements e.g. h1-h6 for headings\n\t\t\tif ( elements ) {\n\t\t\t\telements.forEach( ( element ) => {\n\t\t\t\t\tif ( blockElementStyles[ element ] ) {\n\t\t\t\t\t\telementCSSRules.push(\n\t\t\t\t\t\t\tcompileCSS( blockElementStyles[ element ], {\n\t\t\t\t\t\t\t\tselector: scopeSelector(\n\t\t\t\t\t\t\t\t\tbaseElementSelector,\n\t\t\t\t\t\t\t\t\tELEMENTS[ element ]\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\treturn elementCSSRules.length > 0\n\t\t\t? elementCSSRules.join( '' )\n\t\t\t: undefined;\n\t}, [ baseElementSelector, blockElementStyles, name ] );\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"],"mappings":";;;;;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAKA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAKA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,WAAA,GAAAR,OAAA;AAKA,IAAAS,WAAA,GAAAT,OAAA;AAKA,IAAAU,MAAA,GAAAV,OAAA;AAKA,IAAAW,OAAA,GAAAX,OAAA;AACA,IAAAY,iBAAA,GAAAZ,OAAA;AAnCA;AACA;AACA;;AAWA;AACA;AACA;;AAsBA,MAAMa,gBAAgB,GAAG,CACxB,GAAGC,mCAAuB,EAC1BC,0BAAkB,EAClBC,wBAAiB,EACjBC,kCAAsB,EACtBC,kCAAsB,EACtBC,+BAAmB,EACnBC,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AGC,0BAAoB,kCAAiC,GAAI,CAC9DA,0BAAkB;AAEpB,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMsB,0BAA0B,GAAG;EAClC,GAAGF,0BAA0B;EAC7B,CAAG,GAAGvB,kCAAwB,cAAa,GAAI,CAC7C,GAAGA,kCAAwB,cAAa,CACzC;EAAE;EACH,CAAG,GAAGC,kCAAwB,EAAC,GAAI,CAAEA,kCAAsB,CAAE,CAAE;AAChE,CAAC;AAED,MAAMyB,gCAAgC,GAAG;EACxC,CAAG,GAAG1B,kCAAwB,cAAa,GAAI,IAAI;EACnD,CAAG,GAAGC,kCAAwB,EAAC,GAAI;AACpC,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM0B,eAAe,GAAG;EAAEC,SAAS,EAAE;AAAW,CAAC;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,SAASA,CAAEV,KAAK,EAAEW,KAAK,EAAEC,iBAAiB,GAAG,KAAK,EAAG;EACpE,IAAK,CAAEZ,KAAK,EAAG;IACd,OAAOA,KAAK;EACb;EAEA,IAAIa,QAAQ,GAAGb,KAAK;EACpB,IAAK,CAAEY,iBAAiB,EAAG;IAC1BC,QAAQ,GAAGC,IAAI,CA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AC,EAAE,CAAEd,mBAAmB,EAAEC,kBAAkB,EAAE7B,IAAI,CAAG,CAAC;EAEtD,IAAA2C,uBAAgB,EAAE;IAAEC,GAAG,EAAEzF;EAAO,CAAE,CAAC;EAEnC,OAAOiC,YAAY,CAClB;IAAEyD,SAAS,EAAEnB;EAAiC,CAAC,EAC/C1B,IAAI,EACJ;IAAEpC;EAAM,CAAC,EACTI,0BACD,CAAC;AACF;AAEA,IAAA8E,gBAAS,EACR,0BAA0B,EAC1B,yBAAyB,EACzBrF,YACD,CAAC","ignoreList":[]}
|
package/build/hooks/supports.js
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.hasBackgroundColorSupport = exports.hasAlignWideSupport = exports.hasAlignSupport = exports.getLayoutSupport = exports.getFontSizeSupport = exports.getFontFamilySupport = exports.getCustomClassNameSupport = exports.getColorSupport = exports.getBorderSupport = exports.getAlignWideSupport = exports.getAlignSupport = void 0;
|
|
6
|
+
exports.hasBackgroundColorSupport = exports.hasAlignWideSupport = exports.hasAlignSupport = exports.getTextAlignSupport = exports.getLayoutSupport = exports.getFontSizeSupport = exports.getFontFamilySupport = exports.getCustomClassNameSupport = exports.getColorSupport = exports.getBorderSupport = exports.getAlignWideSupport = exports.getAlignSupport = void 0;
|
|
7
7
|
exports.hasBorderSupport = hasBorderSupport;
|
|
8
|
-
exports.hasTextColorSupport = exports.hasStyleSupport = exports.hasLinkColorSupport = exports.hasLayoutSupport = exports.hasGradientSupport = exports.hasFontSizeSupport = exports.hasFontFamilySupport = exports.hasCustomClassNameSupport = exports.hasColorSupport = void 0;
|
|
8
|
+
exports.hasTextColorSupport = exports.hasTextAlignSupport = exports.hasStyleSupport = exports.hasLinkColorSupport = exports.hasLayoutSupport = exports.hasGradientSupport = exports.hasFontSizeSupport = exports.hasFontFamilySupport = exports.hasCustomClassNameSupport = exports.hasColorSupport = void 0;
|
|
9
9
|
var _blocks = require("@wordpress/blocks");
|
|
10
10
|
var _element = require("@wordpress/element");
|
|
11
11
|
/**
|
|
@@ -28,6 +28,11 @@ const FONT_STYLE_SUPPORT_KEY = 'typography.__experimentalFontStyle';
|
|
|
28
28
|
* Key within block settings' support array indicating support for font weight.
|
|
29
29
|
*/
|
|
30
30
|
const FONT_WEIGHT_SUPPORT_KEY = 'typography.__experimentalFontWeight';
|
|
31
|
+
/**
|
|
32
|
+
* Key within block settings' supports array indicating support for text
|
|
33
|
+
* align e.g. settings found in `block.json`.
|
|
34
|
+
*/
|
|
35
|
+
const TEXT_ALIGN_SUPPORT_KEY = 'typography.textAlign';
|
|
31
36
|
/**
|
|
32
37
|
* Key within block settings' supports array indicating support for text
|
|
33
38
|
* columns e.g. settings found in `block.json`.
|
|
@@ -55,7 +60,7 @@ const TEXT_TRANSFORM_SUPPORT_KEY = 'typography.__experimentalTextTransform';
|
|
|
55
60
|
*/
|
|
56
61
|
const LETTER_SPACING_SUPPORT_KEY = 'typography.__experimentalLetterSpacing';
|
|
57
62
|
const LAYOUT_SUPPORT_KEY = 'layout';
|
|
58
|
-
const TYPOGRAPHY_SUPPORT_KEYS = [LINE_HEIGHT_SUPPORT_KEY, FONT_SIZE_SUPPORT_KEY, FONT_STYLE_SUPPORT_KEY, FONT_WEIGHT_SUPPORT_KEY, FONT_FAMILY_SUPPORT_KEY, TEXT_COLUMNS_SUPPORT_KEY, TEXT_DECORATION_SUPPORT_KEY, TEXT_TRANSFORM_SUPPORT_KEY, WRITING_MODE_SUPPORT_KEY, LETTER_SPACING_SUPPORT_KEY];
|
|
63
|
+
const TYPOGRAPHY_SUPPORT_KEYS = [LINE_HEIGHT_SUPPORT_KEY, FONT_SIZE_SUPPORT_KEY, FONT_STYLE_SUPPORT_KEY, FONT_WEIGHT_SUPPORT_KEY, FONT_FAMILY_SUPPORT_KEY, TEXT_ALIGN_SUPPORT_KEY, TEXT_COLUMNS_SUPPORT_KEY, TEXT_DECORATION_SUPPORT_KEY, TEXT_TRANSFORM_SUPPORT_KEY, WRITING_MODE_SUPPORT_KEY, LETTER_SPACING_SUPPORT_KEY];
|
|
59
64
|
const EFFECTS_SUPPORT_KEYS = ['shadow'];
|
|
60
65
|
const SPACING_SUPPORT_KEY = 'spacing';
|
|
61
66
|
const styleSupportKeys = [...EFFECTS_SUPPORT_KEYS, ...TYPOGRAPHY_SUPPORT_KEYS, BORDER_SUPPORT_KEY, COLOR_SUPPORT_KEY, SPACING_SUPPORT_KEY];
|
|
@@ -180,12 +185,30 @@ const hasBackgroundColorSupport = nameOrType => {
|
|
|
180
185
|
};
|
|
181
186
|
|
|
182
187
|
/**
|
|
183
|
-
* Returns true if the block defines support for
|
|
188
|
+
* Returns true if the block defines support for text-align.
|
|
184
189
|
*
|
|
185
190
|
* @param {string|Object} nameOrType Block name or type object.
|
|
186
191
|
* @return {boolean} Whether the block supports the feature.
|
|
187
192
|
*/
|
|
188
193
|
exports.hasBackgroundColorSupport = hasBackgroundColorSupport;
|
|
194
|
+
const hasTextAlignSupport = nameOrType => (0, _blocks.hasBlockSupport)(nameOrType, TEXT_ALIGN_SUPPORT_KEY);
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Returns the block support value for text-align, if defined.
|
|
198
|
+
*
|
|
199
|
+
* @param {string|Object} nameOrType Block name or type object.
|
|
200
|
+
* @return {unknown} The block support value.
|
|
201
|
+
*/
|
|
202
|
+
exports.hasTextAlignSupport = hasTextAlignSupport;
|
|
203
|
+
const getTextAlignSupport = nameOrType => (0, _blocks.getBlockSupport)(nameOrType, TEXT_ALIGN_SUPPORT_KEY);
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Returns true if the block defines support for background color.
|
|
207
|
+
*
|
|
208
|
+
* @param {string|Object} nameOrType Block name or type object.
|
|
209
|
+
* @return {boolean} Whether the block supports the feature.
|
|
210
|
+
*/
|
|
211
|
+
exports.getTextAlignSupport = getTextAlignSupport;
|
|
189
212
|
const hasTextColorSupport = nameOrType => {
|
|
190
213
|
const colorSupport = (0, _blocks.getBlockSupport)(nameOrType, COLOR_SUPPORT_KEY);
|
|
191
214
|
return colorSupport && colorSupport.text !== false;
|