@wordpress/block-editor 14.4.0 → 14.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/README.md +6 -2
- package/build/autocompleters/block.js.map +1 -1
- package/build/components/background-image-control/index.js +1 -1
- package/build/components/background-image-control/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-draggable/draggable-chip.js +1 -1
- package/build/components/block-draggable/draggable-chip.js.map +1 -1
- package/build/components/block-list/block-invalid-warning.native.js +1 -1
- package/build/components/block-list/block-invalid-warning.native.js.map +1 -1
- package/build/components/block-list/block-list-item.native.js.map +1 -1
- package/build/components/block-list/block.js.map +1 -1
- package/build/components/block-list/index.js +1 -0
- package/build/components/block-list/index.js.map +1 -1
- package/build/components/block-list/index.native.js.map +1 -1
- package/build/components/block-list/use-block-props/index.js.map +1 -1
- package/build/components/block-list/use-block-props/use-selected-block-event-handlers.js +14 -6
- package/build/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +1 -1
- package/build/components/block-list/zoom-out-separator.js +10 -7
- package/build/components/block-list/zoom-out-separator.js.map +1 -1
- package/build/components/block-lock/modal.js +1 -1
- package/build/components/block-lock/modal.js.map +1 -1
- package/build/components/block-mover/button.js.map +1 -1
- package/build/components/block-parent-selector/index.js +1 -1
- package/build/components/block-parent-selector/index.js.map +1 -1
- package/build/components/block-pattern-setup/index.js.map +1 -1
- package/build/components/block-patterns-list/index.js.map +1 -1
- package/build/components/block-popover/index.js +45 -2
- package/build/components/block-popover/index.js.map +1 -1
- package/build/components/block-preview/auto.js +1 -4
- package/build/components/block-preview/auto.js.map +1 -1
- package/build/components/block-preview/index.js.map +1 -1
- package/build/components/block-rename/modal.js +2 -2
- package/build/components/block-rename/modal.js.map +1 -1
- package/build/components/block-settings-menu/block-parent-selector-menu-item.js +1 -1
- package/build/components/block-settings-menu/block-parent-selector-menu-item.js.map +1 -1
- package/build/components/block-switcher/block-transformations-menu.native.js +1 -1
- package/build/components/block-switcher/block-transformations-menu.native.js.map +1 -1
- package/build/components/block-switcher/index.js +2 -1
- package/build/components/block-switcher/index.js.map +1 -1
- package/build/components/block-switcher/pattern-transformations-menu.js.map +1 -1
- package/build/components/block-switcher/use-transformed-patterns.js +1 -0
- package/build/components/block-switcher/use-transformed-patterns.js.map +1 -1
- package/build/components/block-switcher/utils.js +1 -0
- package/build/components/block-switcher/utils.js.map +1 -1
- package/build/components/block-toolbar/index.js.map +1 -1
- package/build/components/block-tools/index.js +0 -7
- 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-show-block-tools.js +7 -3
- package/build/components/block-tools/use-show-block-tools.js.map +1 -1
- package/build/components/block-tools/zoom-out-popover.js +3 -2
- package/build/components/block-tools/zoom-out-popover.js.map +1 -1
- package/build/components/block-tools/zoom-out-toolbar.js +3 -20
- package/build/components/block-tools/zoom-out-toolbar.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-transforms/index.js +3 -2
- package/build/components/block-variation-transforms/index.js.map +1 -1
- package/build/components/border-radius-control/index.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/color-style-selector/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/panel-color-gradient-settings.native.js.map +1 -1
- package/build/components/date-format-picker/index.js +1 -0
- package/build/components/date-format-picker/index.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/font-sizes/fluid-utils.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/border-panel.js.map +1 -1
- package/build/components/global-styles/color-panel.js +1 -1
- package/build/components/global-styles/color-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 +2 -1
- package/build/components/global-styles/get-global-styles-changes.js.map +1 -1
- package/build/components/global-styles/hooks.js.map +1 -1
- package/build/components/global-styles/typography-panel.js.map +1 -1
- package/build/components/global-styles/use-global-styles-context.native.js.map +1 -1
- package/build/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build/components/global-styles/utils.js.map +1 -1
- package/build/components/gradients/use-gradient.js.map +1 -1
- package/build/components/grid/grid-item-movers.js.map +1 -1
- package/build/components/grid/grid-visualizer.js.map +1 -1
- package/build/components/iframe/index.js +49 -9
- package/build/components/iframe/index.js.map +1 -1
- package/build/components/image-editor/use-save-image.js +1 -1
- package/build/components/image-editor/use-save-image.js.map +1 -1
- package/build/components/inner-blocks/use-nested-settings-update.js +15 -8
- package/build/components/inner-blocks/use-nested-settings-update.js.map +1 -1
- package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js +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 +2 -2
- package/build/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/use-pattern-categories.js +1 -1
- package/build/components/inserter/block-patterns-tab/use-pattern-categories.js.map +1 -1
- package/build/components/inserter/block-types-tab.native.js.map +1 -1
- package/build/components/inserter/category-tabs/index.js +1 -10
- package/build/components/inserter/category-tabs/index.js.map +1 -1
- package/build/components/inserter/hooks/use-block-types-state.js +1 -1
- package/build/components/inserter/hooks/use-block-types-state.js.map +1 -1
- package/build/components/inserter/hooks/use-patterns-state.js +1 -1
- package/build/components/inserter/hooks/use-patterns-state.js.map +1 -1
- package/build/components/inserter/media-tab/media-panel.js.map +1 -1
- package/build/components/inserter/media-tab/media-preview.js +1 -1
- package/build/components/inserter/media-tab/media-preview.js.map +1 -1
- 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 +5 -2
- package/build/components/inserter/menu.js.map +1 -1
- package/build/components/inserter/mobile-tab-navigation.js.map +1 -1
- package/build/components/inserter/preview-panel.js.map +1 -1
- package/build/components/inserter/quick-inserter.js +1 -1
- package/build/components/inserter/quick-inserter.js.map +1 -1
- package/build/components/inserter/search-results.js +1 -1
- package/build/components/inserter/search-results.js.map +1 -1
- package/build/components/inserter/tabs.native.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/slot.js.map +1 -1
- package/build/components/inspector-controls/slot.native.js.map +1 -1
- package/build/components/line-height-control/index.js.map +1 -1
- package/build/components/link-control/is-url-like.js.map +1 -1
- package/build/components/link-control/search-create-button.js +1 -1
- package/build/components/link-control/search-create-button.js.map +1 -1
- package/build/components/link-control/search-input.js +3 -5
- package/build/components/link-control/search-input.js.map +1 -1
- package/build/components/link-control/search-results.js +5 -15
- 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/use-rich-url-data.js.map +1 -1
- package/build/components/list-view/appender.js +1 -1
- package/build/components/list-view/appender.js.map +1 -1
- package/build/components/list-view/block-select-button.js.map +1 -1
- 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/drop-indicator.js.map +1 -1
- package/build/components/list-view/index.js.map +1 -1
- package/build/components/list-view/use-block-selection.js +2 -2
- package/build/components/list-view/use-block-selection.js.map +1 -1
- package/build/components/list-view/utils.js +1 -1
- package/build/components/list-view/utils.js.map +1 -1
- package/build/components/media-placeholder/index.native.js +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/multi-selection-inspector/index.js +2 -2
- package/build/components/multi-selection-inspector/index.js.map +1 -1
- package/build/components/observe-typing/index.js +1 -0
- package/build/components/observe-typing/index.js.map +1 -1
- package/build/components/recursion-provider/index.js +1 -0
- package/build/components/recursion-provider/index.js.map +1 -1
- package/build/components/responsive-block-control/index.js +3 -3
- package/build/components/responsive-block-control/index.js.map +1 -1
- package/build/components/responsive-block-control/label.js +1 -1
- package/build/components/responsive-block-control/label.js.map +1 -1
- package/build/components/rich-text/content.js.map +1 -1
- package/build/components/rich-text/file-paste-handler.native.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/index.js +3 -2
- package/build/components/rich-text/index.js.map +1 -1
- package/build/components/rich-text/multiline.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.native.js.map +1 -1
- package/build/components/rich-text/native/use-format-types.js +1 -0
- package/build/components/rich-text/native/use-format-types.js.map +1 -1
- package/build/components/rich-text/toolbar-button.js.map +1 -1
- package/build/components/rich-text/use-format-types.js +1 -0
- package/build/components/rich-text/use-format-types.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/spacing-input-control.js.map +1 -1
- package/build/components/spacing-sizes-control/utils.js +1 -0
- package/build/components/spacing-sizes-control/utils.js.map +1 -1
- package/build/components/tool-selector/index.js +9 -3
- package/build/components/tool-selector/index.js.map +1 -1
- package/build/components/typewriter/index.js +1 -0
- package/build/components/typewriter/index.js.map +1 -1
- package/build/components/unsupported-block-details/index.native.js.map +1 -1
- package/build/components/url-input/index.js +1 -1
- package/build/components/url-input/index.js.map +1 -1
- package/build/components/use-block-drop-zone/index.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-resize-canvas/index.js +1 -2
- package/build/components/use-resize-canvas/index.js.map +1 -1
- package/build/components/writing-flow/use-tab-nav.js +21 -5
- package/build/components/writing-flow/use-tab-nav.js.map +1 -1
- package/build/hooks/align.js.map +1 -1
- package/build/hooks/block-hooks.js +1 -1
- package/build/hooks/block-hooks.js.map +1 -1
- package/build/hooks/block-style-variation.js.map +1 -1
- package/build/hooks/duotone.js.map +1 -1
- package/build/hooks/font-family.js.map +1 -1
- package/build/hooks/gap.js.map +1 -1
- package/build/hooks/generated-class-name.js +1 -0
- package/build/hooks/generated-class-name.js.map +1 -1
- package/build/hooks/grid-visualizer.js +13 -11
- package/build/hooks/grid-visualizer.js.map +1 -1
- package/build/hooks/layout-child.js +41 -3
- package/build/hooks/layout-child.js.map +1 -1
- package/build/hooks/layout.js.map +1 -1
- package/build/hooks/position.js +1 -1
- package/build/hooks/position.js.map +1 -1
- package/build/hooks/spacing-visualizer.js.map +1 -1
- package/build/hooks/style.js.map +1 -1
- package/build/hooks/text-align.js.map +1 -1
- package/build/hooks/use-typography-props.js.map +1 -1
- package/build/hooks/use-zoom-out.js +24 -16
- package/build/hooks/use-zoom-out.js.map +1 -1
- package/build/layouts/constrained.js.map +1 -1
- package/build/layouts/flex.js.map +1 -1
- package/build/layouts/grid.js.map +1 -1
- package/build/layouts/utils.js.map +1 -1
- package/build/private-apis.js +2 -0
- package/build/private-apis.js.map +1 -1
- package/build/store/actions.js +5 -6
- package/build/store/actions.js.map +1 -1
- package/build/store/private-selectors.js.map +1 -1
- package/build/store/reducer.js +2 -18
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +22 -15
- package/build/store/selectors.js.map +1 -1
- package/build/utils/block-bindings.js +9 -6
- package/build/utils/block-bindings.js.map +1 -1
- package/build/utils/get-font-styles-and-weights.js +1 -1
- package/build/utils/get-font-styles-and-weights.js.map +1 -1
- package/build/utils/object.js +1 -0
- package/build/utils/object.js.map +1 -1
- package/build/utils/pasting.js.map +1 -1
- package/build-module/autocompleters/block.js +1 -3
- package/build-module/autocompleters/block.js.map +1 -1
- package/build-module/autocompleters/link.js +1 -3
- package/build-module/autocompleters/link.js.map +1 -1
- package/build-module/components/audio-player/index.native.js +1 -2
- package/build-module/components/audio-player/index.native.js.map +1 -1
- package/build-module/components/background-image-control/index.js +2 -3
- package/build-module/components/background-image-control/index.js.map +1 -1
- package/build-module/components/block-alignment-control/ui.js +1 -2
- package/build-module/components/block-alignment-control/ui.js.map +1 -1
- package/build-module/components/block-breadcrumb/index.js +1 -2
- package/build-module/components/block-breadcrumb/index.js.map +1 -1
- package/build-module/components/block-canvas/index.js +1 -2
- package/build-module/components/block-canvas/index.js.map +1 -1
- package/build-module/components/block-card/index.js +1 -2
- package/build-module/components/block-card/index.js.map +1 -1
- package/build-module/components/block-compare/block-view.js +1 -2
- package/build-module/components/block-compare/block-view.js.map +1 -1
- package/build-module/components/block-compare/index.js +1 -2
- package/build-module/components/block-compare/index.js.map +1 -1
- package/build-module/components/block-controls/fill.js +1 -3
- package/build-module/components/block-controls/fill.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-draggable/draggable-chip.js +2 -3
- package/build-module/components/block-draggable/draggable-chip.js.map +1 -1
- package/build-module/components/block-draggable/draggable-chip.native.js +1 -2
- package/build-module/components/block-draggable/draggable-chip.native.js.map +1 -1
- package/build-module/components/block-draggable/index.native.js +1 -3
- package/build-module/components/block-draggable/index.native.js.map +1 -1
- package/build-module/components/block-edit/index.js +1 -2
- package/build-module/components/block-edit/index.js.map +1 -1
- package/build-module/components/block-edit/multiple-usage-warning.js +1 -2
- package/build-module/components/block-edit/multiple-usage-warning.js.map +1 -1
- package/build-module/components/block-inspector/index.js +1 -3
- package/build-module/components/block-inspector/index.js.map +1 -1
- package/build-module/components/block-list/block-crash-warning.js +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 +1 -1
- package/build-module/components/block-list/block-crash-warning.native.js.map +1 -1
- package/build-module/components/block-list/block-invalid-warning.js +1 -3
- package/build-module/components/block-list/block-invalid-warning.js.map +1 -1
- package/build-module/components/block-list/block-invalid-warning.native.js +1 -1
- package/build-module/components/block-list/block-invalid-warning.native.js.map +1 -1
- package/build-module/components/block-list/block-list-item.native.js +1 -2
- package/build-module/components/block-list/block-list-item.native.js.map +1 -1
- package/build-module/components/block-list/block-selection-button.native.js +1 -2
- package/build-module/components/block-list/block-selection-button.native.js.map +1 -1
- package/build-module/components/block-list/block.js +1 -3
- package/build-module/components/block-list/block.js.map +1 -1
- package/build-module/components/block-list/block.native.js +1 -2
- package/build-module/components/block-list/block.native.js.map +1 -1
- package/build-module/components/block-list/index.js +2 -2
- package/build-module/components/block-list/index.js.map +1 -1
- package/build-module/components/block-list/index.native.js +1 -3
- package/build-module/components/block-list/index.native.js.map +1 -1
- package/build-module/components/block-list/insertion-point.native.js +1 -2
- package/build-module/components/block-list/insertion-point.native.js.map +1 -1
- package/build-module/components/block-list/use-block-props/index.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.js +14 -6
- package/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +1 -1
- package/build-module/components/block-list/zoom-out-separator.js +10 -7
- package/build-module/components/block-list/zoom-out-separator.js.map +1 -1
- package/build-module/components/block-lock/menu-item.js +1 -3
- package/build-module/components/block-lock/menu-item.js.map +1 -1
- package/build-module/components/block-lock/modal.js +2 -3
- package/build-module/components/block-lock/modal.js.map +1 -1
- package/build-module/components/block-lock/toolbar.js +1 -3
- package/build-module/components/block-lock/toolbar.js.map +1 -1
- package/build-module/components/block-media-update-progress/index.native.js +1 -2
- package/build-module/components/block-media-update-progress/index.native.js.map +1 -1
- package/build-module/components/block-mover/button.js +1 -3
- package/build-module/components/block-mover/button.js.map +1 -1
- package/build-module/components/block-mover/index.js +1 -2
- package/build-module/components/block-mover/index.js.map +1 -1
- package/build-module/components/block-mover/index.native.js +1 -2
- package/build-module/components/block-mover/index.native.js.map +1 -1
- package/build-module/components/block-navigation/dropdown.js +1 -2
- package/build-module/components/block-navigation/dropdown.js.map +1 -1
- package/build-module/components/block-parent-selector/index.js +1 -1
- package/build-module/components/block-parent-selector/index.js.map +1 -1
- package/build-module/components/block-pattern-setup/index.js +1 -3
- package/build-module/components/block-pattern-setup/index.js.map +1 -1
- package/build-module/components/block-pattern-setup/setup-toolbar.js +1 -2
- package/build-module/components/block-pattern-setup/setup-toolbar.js.map +1 -1
- package/build-module/components/block-patterns-list/index.js +1 -3
- package/build-module/components/block-patterns-list/index.js.map +1 -1
- package/build-module/components/block-patterns-paging/index.js +1 -2
- package/build-module/components/block-patterns-paging/index.js.map +1 -1
- package/build-module/components/block-popover/index.js +45 -2
- package/build-module/components/block-popover/index.js.map +1 -1
- package/build-module/components/block-preview/auto.js +2 -7
- package/build-module/components/block-preview/auto.js.map +1 -1
- package/build-module/components/block-preview/index.js +1 -2
- package/build-module/components/block-preview/index.js.map +1 -1
- package/build-module/components/block-quick-navigation/index.js +1 -2
- package/build-module/components/block-quick-navigation/index.js.map +1 -1
- package/build-module/components/block-removal-warning-modal/index.js +1 -2
- package/build-module/components/block-removal-warning-modal/index.js.map +1 -1
- package/build-module/components/block-rename/modal.js +3 -4
- package/build-module/components/block-rename/modal.js.map +1 -1
- package/build-module/components/block-rename/rename-control.js +1 -3
- package/build-module/components/block-rename/rename-control.js.map +1 -1
- package/build-module/components/block-settings/container.native.js +1 -3
- package/build-module/components/block-settings/container.native.js.map +1 -1
- package/build-module/components/block-settings-menu/block-parent-selector-menu-item.js +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 -3
- package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build-module/components/block-settings-menu-controls/index.js +1 -2
- package/build-module/components/block-settings-menu-controls/index.js.map +1 -1
- package/build-module/components/block-styles/index.js +1 -2
- package/build-module/components/block-styles/index.js.map +1 -1
- package/build-module/components/block-styles/menu-items.js +1 -2
- package/build-module/components/block-styles/menu-items.js.map +1 -1
- package/build-module/components/block-styles/preview.native.js +1 -2
- package/build-module/components/block-styles/preview.native.js.map +1 -1
- package/build-module/components/block-switcher/block-transformations-menu.js +1 -3
- package/build-module/components/block-switcher/block-transformations-menu.js.map +1 -1
- package/build-module/components/block-switcher/block-transformations-menu.native.js +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 +1 -3
- package/build-module/components/block-switcher/block-variation-transformations.js.map +1 -1
- package/build-module/components/block-switcher/index.js +3 -4
- package/build-module/components/block-switcher/index.js.map +1 -1
- package/build-module/components/block-switcher/pattern-transformations-menu.js +1 -2
- package/build-module/components/block-switcher/pattern-transformations-menu.js.map +1 -1
- package/build-module/components/block-switcher/preview-block-popover.js +1 -2
- package/build-module/components/block-switcher/preview-block-popover.js.map +1 -1
- package/build-module/components/block-switcher/use-transformed-patterns.js +1 -0
- package/build-module/components/block-switcher/use-transformed-patterns.js.map +1 -1
- package/build-module/components/block-switcher/utils.js +1 -0
- package/build-module/components/block-switcher/utils.js.map +1 -1
- package/build-module/components/block-toolbar/block-toolbar-menu.native.js +1 -2
- package/build-module/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
- package/build-module/components/block-toolbar/index.js +1 -3
- package/build-module/components/block-toolbar/index.js.map +1 -1
- package/build-module/components/block-toolbar/index.native.js +1 -3
- package/build-module/components/block-toolbar/index.native.js.map +1 -1
- package/build-module/components/block-tools/index.js +1 -9
- package/build-module/components/block-tools/index.js.map +1 -1
- package/build-module/components/block-tools/insertion-point.js +1 -2
- package/build-module/components/block-tools/insertion-point.js.map +1 -1
- package/build-module/components/block-tools/use-show-block-tools.js +7 -3
- package/build-module/components/block-tools/use-show-block-tools.js.map +1 -1
- package/build-module/components/block-tools/zoom-out-popover.js +2 -1
- package/build-module/components/block-tools/zoom-out-popover.js.map +1 -1
- package/build-module/components/block-tools/zoom-out-toolbar.js +5 -23
- package/build-module/components/block-tools/zoom-out-toolbar.js.map +1 -1
- package/build-module/components/block-types-list/index.js +1 -2
- package/build-module/components/block-types-list/index.js.map +1 -1
- package/build-module/components/block-types-list/index.native.js +1 -2
- package/build-module/components/block-types-list/index.native.js.map +1 -1
- package/build-module/components/block-variation-picker/index.js +1 -2
- package/build-module/components/block-variation-picker/index.js.map +1 -1
- package/build-module/components/block-variation-picker/index.native.js +1 -2
- package/build-module/components/block-variation-picker/index.native.js.map +1 -1
- package/build-module/components/block-variation-transforms/index.js +4 -4
- package/build-module/components/block-variation-transforms/index.js.map +1 -1
- package/build-module/components/border-radius-control/index.js +1 -3
- package/build-module/components/border-radius-control/index.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 +1 -2
- package/build-module/components/button-block-appender/index.native.js.map +1 -1
- package/build-module/components/child-layout-control/index.js +1 -3
- package/build-module/components/child-layout-control/index.js.map +1 -1
- package/build-module/components/color-style-selector/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 +1 -2
- package/build-module/components/colors-gradients/control.js.map +1 -1
- package/build-module/components/colors-gradients/dropdown.js +1 -3
- package/build-module/components/colors-gradients/dropdown.js.map +1 -1
- package/build-module/components/colors-gradients/panel-color-gradient-settings.js +1 -3
- 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 +1 -3
- package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
- package/build-module/components/contrast-checker/index.native.js +1 -2
- package/build-module/components/contrast-checker/index.native.js.map +1 -1
- package/build-module/components/convert-to-group-buttons/index.js +1 -3
- package/build-module/components/convert-to-group-buttons/index.js.map +1 -1
- package/build-module/components/convert-to-group-buttons/toolbar.js +1 -2
- package/build-module/components/convert-to-group-buttons/toolbar.js.map +1 -1
- package/build-module/components/date-format-picker/index.js +2 -2
- package/build-module/components/date-format-picker/index.js.map +1 -1
- package/build-module/components/default-block-appender/index.js +1 -2
- package/build-module/components/default-block-appender/index.js.map +1 -1
- package/build-module/components/dimensions-tool/index.js +1 -3
- package/build-module/components/dimensions-tool/index.js.map +1 -1
- package/build-module/components/dimensions-tool/width-height-tool.js +1 -3
- 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 +1 -2
- package/build-module/components/duotone-control/index.js.map +1 -1
- package/build-module/components/editor-styles/index.js +1 -3
- package/build-module/components/editor-styles/index.js.map +1 -1
- package/build-module/components/floating-toolbar/index.native.js +1 -2
- package/build-module/components/floating-toolbar/index.native.js.map +1 -1
- package/build-module/components/floating-toolbar/nav-up-icon.js +1 -2
- package/build-module/components/floating-toolbar/nav-up-icon.js.map +1 -1
- package/build-module/components/font-sizes/fluid-utils.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 +2 -2
- package/build-module/components/font-sizes/with-font-sizes.js.map +1 -1
- package/build-module/components/global-styles/advanced-panel.js +1 -2
- package/build-module/components/global-styles/advanced-panel.js.map +1 -1
- package/build-module/components/global-styles/border-panel.js +1 -2
- package/build-module/components/global-styles/border-panel.js.map +1 -1
- package/build-module/components/global-styles/color-panel.js +2 -3
- package/build-module/components/global-styles/color-panel.js.map +1 -1
- package/build-module/components/global-styles/dimensions-panel.js +1 -2
- package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
- package/build-module/components/global-styles/filters-panel.js +1 -2
- 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 +2 -1
- package/build-module/components/global-styles/get-global-styles-changes.js.map +1 -1
- package/build-module/components/global-styles/hooks.js.map +1 -1
- package/build-module/components/global-styles/image-settings-panel.js +1 -2
- package/build-module/components/global-styles/image-settings-panel.js.map +1 -1
- package/build-module/components/global-styles/shadow-panel-components.js +1 -2
- package/build-module/components/global-styles/shadow-panel-components.js.map +1 -1
- package/build-module/components/global-styles/typography-panel.js +1 -2
- package/build-module/components/global-styles/typography-panel.js.map +1 -1
- package/build-module/components/global-styles/use-global-styles-context.native.js.map +1 -1
- package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build-module/components/global-styles/utils.js.map +1 -1
- package/build-module/components/gradients/use-gradient.js.map +1 -1
- package/build-module/components/grid/grid-item-movers.js +1 -3
- package/build-module/components/grid/grid-item-movers.js.map +1 -1
- package/build-module/components/grid/grid-visualizer.js.map +1 -1
- package/build-module/components/height-control/index.js +1 -2
- package/build-module/components/height-control/index.js.map +1 -1
- package/build-module/components/iframe/index.js +50 -12
- package/build-module/components/iframe/index.js.map +1 -1
- package/build-module/components/image-editor/aspect-ratio-dropdown.js +1 -3
- package/build-module/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
- package/build-module/components/image-editor/cropper.js +1 -3
- package/build-module/components/image-editor/cropper.js.map +1 -1
- package/build-module/components/image-editor/form-controls.js +1 -3
- package/build-module/components/image-editor/form-controls.js.map +1 -1
- package/build-module/components/image-editor/index.js +1 -2
- package/build-module/components/image-editor/index.js.map +1 -1
- package/build-module/components/image-editor/use-save-image.js +1 -1
- package/build-module/components/image-editor/use-save-image.js.map +1 -1
- package/build-module/components/image-link-destinations/index.native.js +1 -3
- package/build-module/components/image-link-destinations/index.native.js.map +1 -1
- package/build-module/components/image-size-control/index.js +1 -3
- package/build-module/components/image-size-control/index.js.map +1 -1
- package/build-module/components/inner-blocks/use-nested-settings-update.js +16 -9
- 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 +1 -2
- package/build-module/components/inner-blocks/warning-max-depth-exceeded.native.js.map +1 -1
- package/build-module/components/inserter/block-patterns-explorer/index.js +1 -2
- 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 +2 -3
- 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 +3 -5
- package/build-module/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab/index.js +1 -3
- package/build-module/components/inserter/block-patterns-tab/index.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js +1 -3
- 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 +1 -3
- 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 +1 -1
- package/build-module/components/inserter/block-patterns-tab/use-pattern-categories.js.map +1 -1
- package/build-module/components/inserter/block-types-tab.js +1 -3
- 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 +3 -13
- package/build-module/components/inserter/category-tabs/index.js.map +1 -1
- package/build-module/components/inserter/hooks/use-block-types-state.js +1 -1
- package/build-module/components/inserter/hooks/use-block-types-state.js.map +1 -1
- package/build-module/components/inserter/hooks/use-patterns-state.js +1 -1
- package/build-module/components/inserter/hooks/use-patterns-state.js.map +1 -1
- package/build-module/components/inserter/index.native.js +1 -3
- package/build-module/components/inserter/index.native.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-panel.js +1 -2
- package/build-module/components/inserter/media-tab/media-panel.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-preview.js +2 -4
- package/build-module/components/inserter/media-tab/media-preview.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-tab.js +1 -3
- 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 +6 -5
- package/build-module/components/inserter/menu.js.map +1 -1
- package/build-module/components/inserter/menu.native.js +1 -3
- package/build-module/components/inserter/menu.native.js.map +1 -1
- package/build-module/components/inserter/mobile-tab-navigation.js +1 -2
- package/build-module/components/inserter/mobile-tab-navigation.js.map +1 -1
- package/build-module/components/inserter/no-results.js +1 -2
- package/build-module/components/inserter/no-results.js.map +1 -1
- package/build-module/components/inserter/no-results.native.js +1 -2
- package/build-module/components/inserter/no-results.native.js.map +1 -1
- package/build-module/components/inserter/panel.js +1 -3
- package/build-module/components/inserter/panel.js.map +1 -1
- package/build-module/components/inserter/preview-panel.js +1 -2
- package/build-module/components/inserter/preview-panel.js.map +1 -1
- package/build-module/components/inserter/quick-inserter.js +2 -3
- package/build-module/components/inserter/quick-inserter.js.map +1 -1
- package/build-module/components/inserter/search-results.js +2 -3
- package/build-module/components/inserter/search-results.js.map +1 -1
- package/build-module/components/inserter/tabs.native.js.map +1 -1
- package/build-module/components/inserter-button/index.native.js +1 -2
- package/build-module/components/inserter-button/index.native.js.map +1 -1
- package/build-module/components/inserter-list-item/index.js +1 -2
- package/build-module/components/inserter-list-item/index.js.map +1 -1
- package/build-module/components/inserter-listbox/index.js +1 -2
- package/build-module/components/inserter-listbox/index.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 +1 -3
- package/build-module/components/inspector-controls/fill.native.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/index.js +1 -2
- package/build-module/components/inspector-controls-tabs/index.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/settings-tab.js +1 -3
- package/build-module/components/inspector-controls-tabs/settings-tab.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/styles-tab.js +1 -3
- package/build-module/components/inspector-controls-tabs/styles-tab.js.map +1 -1
- package/build-module/components/inspector-popover-header/index.js +1 -2
- package/build-module/components/inspector-popover-header/index.js.map +1 -1
- package/build-module/components/line-height-control/index.js.map +1 -1
- package/build-module/components/link-control/index.js +1 -3
- 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 +1 -3
- package/build-module/components/link-control/link-preview.js.map +1 -1
- package/build-module/components/link-control/search-create-button.js +1 -1
- package/build-module/components/link-control/search-create-button.js.map +1 -1
- package/build-module/components/link-control/search-input.js +4 -7
- package/build-module/components/link-control/search-input.js.map +1 -1
- package/build-module/components/link-control/search-results.js +6 -17
- package/build-module/components/link-control/search-results.js.map +1 -1
- package/build-module/components/link-control/settings-drawer.js +1 -3
- package/build-module/components/link-control/settings-drawer.js.map +1 -1
- package/build-module/components/link-control/settings.js +1 -2
- package/build-module/components/link-control/settings.js.map +1 -1
- package/build-module/components/link-control/use-rich-url-data.js.map +1 -1
- package/build-module/components/list-view/appender.js +2 -3
- package/build-module/components/list-view/appender.js.map +1 -1
- package/build-module/components/list-view/block-contents.js +1 -3
- package/build-module/components/list-view/block-contents.js.map +1 -1
- package/build-module/components/list-view/block-select-button.js +1 -2
- package/build-module/components/list-view/block-select-button.js.map +1 -1
- package/build-module/components/list-view/block.js +1 -3
- package/build-module/components/list-view/block.js.map +1 -1
- package/build-module/components/list-view/branch.js +1 -3
- package/build-module/components/list-view/branch.js.map +1 -1
- package/build-module/components/list-view/drop-indicator.js +1 -2
- package/build-module/components/list-view/drop-indicator.js.map +1 -1
- package/build-module/components/list-view/index.js +1 -2
- package/build-module/components/list-view/index.js.map +1 -1
- package/build-module/components/list-view/use-block-selection.js +2 -2
- package/build-module/components/list-view/use-block-selection.js.map +1 -1
- package/build-module/components/list-view/utils.js +1 -1
- package/build-module/components/list-view/utils.js.map +1 -1
- package/build-module/components/media-placeholder/index.js +1 -3
- package/build-module/components/media-placeholder/index.js.map +1 -1
- package/build-module/components/media-placeholder/index.native.js +2 -4
- package/build-module/components/media-placeholder/index.native.js.map +1 -1
- package/build-module/components/media-replace-flow/index.js +1 -3
- package/build-module/components/media-replace-flow/index.js.map +1 -1
- package/build-module/components/media-upload/index.native.js +1 -3
- package/build-module/components/media-upload/index.native.js.map +1 -1
- package/build-module/components/media-upload-progress/index.native.js +1 -2
- package/build-module/components/media-upload-progress/index.native.js.map +1 -1
- package/build-module/components/multi-selection-inspector/index.js +3 -4
- package/build-module/components/multi-selection-inspector/index.js.map +1 -1
- package/build-module/components/observe-typing/index.js +1 -0
- package/build-module/components/observe-typing/index.js.map +1 -1
- package/build-module/components/provider/index.js +1 -2
- package/build-module/components/provider/index.js.map +1 -1
- package/build-module/components/publish-date-time-picker/index.js +1 -2
- package/build-module/components/publish-date-time-picker/index.js.map +1 -1
- package/build-module/components/recursion-provider/index.js +1 -0
- package/build-module/components/recursion-provider/index.js.map +1 -1
- package/build-module/components/responsive-block-control/index.js +4 -5
- package/build-module/components/responsive-block-control/index.js.map +1 -1
- package/build-module/components/responsive-block-control/label.js +2 -4
- package/build-module/components/responsive-block-control/label.js.map +1 -1
- package/build-module/components/rich-text/content.js.map +1 -1
- package/build-module/components/rich-text/event-listeners/before-input-rules.js +2 -2
- package/build-module/components/rich-text/event-listeners/before-input-rules.js.map +1 -1
- package/build-module/components/rich-text/event-listeners/delete.js +2 -2
- package/build-module/components/rich-text/event-listeners/delete.js.map +1 -1
- package/build-module/components/rich-text/event-listeners/enter.js +2 -2
- package/build-module/components/rich-text/event-listeners/enter.js.map +1 -1
- package/build-module/components/rich-text/event-listeners/firefox-compat.js +2 -2
- package/build-module/components/rich-text/event-listeners/firefox-compat.js.map +1 -1
- package/build-module/components/rich-text/event-listeners/input-events.js +2 -2
- package/build-module/components/rich-text/event-listeners/input-events.js.map +1 -1
- package/build-module/components/rich-text/event-listeners/input-rules.js +2 -2
- package/build-module/components/rich-text/event-listeners/input-rules.js.map +1 -1
- package/build-module/components/rich-text/event-listeners/insert-replacement-text.js +2 -2
- package/build-module/components/rich-text/event-listeners/insert-replacement-text.js.map +1 -1
- package/build-module/components/rich-text/event-listeners/paste-handler.js +2 -2
- package/build-module/components/rich-text/event-listeners/paste-handler.js.map +1 -1
- package/build-module/components/rich-text/event-listeners/remove-browser-shortcuts.js +2 -2
- package/build-module/components/rich-text/event-listeners/remove-browser-shortcuts.js.map +1 -1
- package/build-module/components/rich-text/event-listeners/shortcuts.js +2 -2
- package/build-module/components/rich-text/event-listeners/shortcuts.js.map +1 -1
- package/build-module/components/rich-text/event-listeners/undo-automatic-change.js +2 -2
- package/build-module/components/rich-text/event-listeners/undo-automatic-change.js.map +1 -1
- package/build-module/components/rich-text/file-paste-handler.native.js.map +1 -1
- package/build-module/components/rich-text/format-toolbar/index.js +1 -3
- package/build-module/components/rich-text/format-toolbar/index.js.map +1 -1
- package/build-module/components/rich-text/format-toolbar/index.native.js +1 -3
- package/build-module/components/rich-text/format-toolbar/index.native.js.map +1 -1
- package/build-module/components/rich-text/index.js +4 -5
- package/build-module/components/rich-text/index.js.map +1 -1
- package/build-module/components/rich-text/index.native.js +1 -3
- package/build-module/components/rich-text/index.native.js.map +1 -1
- package/build-module/components/rich-text/multiline.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 +1 -1
- package/build-module/components/rich-text/native/index.js.map +1 -1
- package/build-module/components/rich-text/native/index.native.js +1 -3
- 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 +1 -3
- 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 +1 -0
- package/build-module/components/rich-text/native/use-format-types.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 +1 -0
- package/build-module/components/rich-text/use-format-types.js.map +1 -1
- package/build-module/components/spacing-sizes-control/index.js +1 -2
- package/build-module/components/spacing-sizes-control/index.js.map +1 -1
- package/build-module/components/spacing-sizes-control/input-controls/axial.js +1 -2
- 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 +1 -2
- package/build-module/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
- package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js +1 -3
- package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
- package/build-module/components/spacing-sizes-control/utils.js +1 -0
- package/build-module/components/spacing-sizes-control/utils.js.map +1 -1
- package/build-module/components/tabbed-sidebar/index.js +1 -2
- package/build-module/components/tabbed-sidebar/index.js.map +1 -1
- package/build-module/components/tool-selector/index.js +10 -6
- package/build-module/components/tool-selector/index.js.map +1 -1
- package/build-module/components/typewriter/index.js +1 -0
- package/build-module/components/typewriter/index.js.map +1 -1
- package/build-module/components/unsupported-block-details/index.native.js +1 -2
- package/build-module/components/unsupported-block-details/index.native.js.map +1 -1
- package/build-module/components/url-input/button.js +1 -2
- package/build-module/components/url-input/button.js.map +1 -1
- package/build-module/components/url-input/index.js +2 -4
- package/build-module/components/url-input/index.js.map +1 -1
- package/build-module/components/url-popover/image-url-input-ui.js +1 -3
- package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
- package/build-module/components/url-popover/index.js +1 -2
- package/build-module/components/url-popover/index.js.map +1 -1
- package/build-module/components/url-popover/link-editor.js +1 -2
- package/build-module/components/url-popover/link-editor.js.map +1 -1
- package/build-module/components/url-popover/link-viewer.js +1 -2
- package/build-module/components/url-popover/link-viewer.js.map +1 -1
- package/build-module/components/use-block-drop-zone/index.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-resize-canvas/index.js +1 -2
- package/build-module/components/use-resize-canvas/index.js.map +1 -1
- package/build-module/components/video-player/index.native.js +1 -2
- package/build-module/components/video-player/index.native.js.map +1 -1
- package/build-module/components/warning/index.js +1 -2
- package/build-module/components/warning/index.js.map +1 -1
- package/build-module/components/warning/index.native.js +1 -2
- package/build-module/components/warning/index.native.js.map +1 -1
- package/build-module/components/writing-flow/index.js +1 -3
- package/build-module/components/writing-flow/index.js.map +1 -1
- package/build-module/components/writing-flow/use-tab-nav.js +21 -5
- package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
- package/build-module/hooks/align.js.map +1 -1
- package/build-module/hooks/anchor.js +1 -3
- package/build-module/hooks/anchor.js.map +1 -1
- package/build-module/hooks/block-bindings.js +1 -3
- package/build-module/hooks/block-bindings.js.map +1 -1
- package/build-module/hooks/block-hooks.js +2 -3
- package/build-module/hooks/block-hooks.js.map +1 -1
- package/build-module/hooks/block-style-variation.js +1 -2
- package/build-module/hooks/block-style-variation.js.map +1 -1
- package/build-module/hooks/dimensions.js +1 -3
- package/build-module/hooks/dimensions.js.map +1 -1
- package/build-module/hooks/duotone.js +1 -3
- package/build-module/hooks/duotone.js.map +1 -1
- package/build-module/hooks/font-family.js.map +1 -1
- package/build-module/hooks/gap.js.map +1 -1
- package/build-module/hooks/generated-class-name.js +1 -0
- package/build-module/hooks/generated-class-name.js.map +1 -1
- package/build-module/hooks/grid-visualizer.js +14 -14
- package/build-module/hooks/grid-visualizer.js.map +1 -1
- package/build-module/hooks/layout-child.js +42 -6
- package/build-module/hooks/layout-child.js.map +1 -1
- package/build-module/hooks/layout.js +1 -3
- package/build-module/hooks/layout.js.map +1 -1
- package/build-module/hooks/position.js +1 -1
- package/build-module/hooks/position.js.map +1 -1
- package/build-module/hooks/spacing-visualizer.js.map +1 -1
- package/build-module/hooks/style.js +1 -3
- package/build-module/hooks/style.js.map +1 -1
- package/build-module/hooks/text-align.js.map +1 -1
- package/build-module/hooks/typography.native.js +1 -2
- package/build-module/hooks/typography.native.js.map +1 -1
- package/build-module/hooks/use-bindings-attributes.js +1 -2
- package/build-module/hooks/use-bindings-attributes.js.map +1 -1
- package/build-module/hooks/use-typography-props.js.map +1 -1
- package/build-module/hooks/use-zoom-out.js +24 -17
- package/build-module/hooks/use-zoom-out.js.map +1 -1
- package/build-module/layouts/constrained.js +1 -3
- package/build-module/layouts/constrained.js.map +1 -1
- package/build-module/layouts/flex.js +1 -3
- package/build-module/layouts/flex.js.map +1 -1
- package/build-module/layouts/grid.js +1 -3
- package/build-module/layouts/grid.js.map +1 -1
- package/build-module/layouts/utils.js.map +1 -1
- package/build-module/private-apis.js +2 -0
- package/build-module/private-apis.js.map +1 -1
- package/build-module/store/actions.js +5 -6
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/private-selectors.js.map +1 -1
- package/build-module/store/reducer.js +1 -16
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +21 -12
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/utils/block-bindings.js +9 -6
- package/build-module/utils/block-bindings.js.map +1 -1
- package/build-module/utils/get-font-styles-and-weights.js +1 -1
- package/build-module/utils/get-font-styles-and-weights.js.map +1 -1
- package/build-module/utils/get-px-from-css-unit.js +1 -1
- package/build-module/utils/get-px-from-css-unit.js.map +1 -1
- package/build-module/utils/object.js +1 -0
- package/build-module/utils/object.js.map +1 -1
- package/build-module/utils/pasting.js.map +1 -1
- package/build-style/content-rtl.css +13 -26
- package/build-style/content.css +13 -26
- package/build-style/style-rtl.css +23 -41
- package/build-style/style.css +23 -41
- package/package.json +33 -33
- package/src/components/block-canvas/style.scss +0 -1
- package/src/components/block-list/content.scss +3 -2
- package/src/components/block-list/use-block-props/use-selected-block-event-handlers.js +25 -4
- package/src/components/block-list/zoom-out-separator.js +8 -6
- package/src/components/block-popover/index.js +64 -2
- package/src/components/block-preview/auto.js +1 -4
- package/src/components/block-tools/index.js +0 -11
- package/src/components/block-tools/style.scss +1 -1
- package/src/components/block-tools/use-show-block-tools.js +10 -3
- package/src/components/block-tools/zoom-out-popover.js +2 -1
- package/src/components/block-tools/zoom-out-toolbar.js +2 -23
- package/src/components/iframe/content.scss +27 -32
- package/src/components/iframe/index.js +63 -13
- package/src/components/iframe/style.scss +18 -0
- package/src/components/inner-blocks/use-nested-settings-update.js +16 -10
- package/src/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js +1 -1
- package/src/components/inserter/category-tabs/index.js +1 -11
- package/src/components/inserter/menu.js +7 -2
- package/src/components/inserter/quick-inserter.js +1 -1
- package/src/components/inserter/style.scss +1 -41
- package/src/components/link-control/search-input.js +4 -5
- package/src/components/link-control/search-results.js +2 -13
- package/src/components/link-control/test/index.js +84 -46
- package/src/components/media-replace-flow/test/index.js +1 -1
- package/src/components/responsive-block-control/style.scss +0 -1
- package/src/components/rich-text/style.scss +5 -0
- package/src/components/tool-selector/index.js +7 -2
- package/src/components/use-resize-canvas/index.js +1 -3
- package/src/components/writing-flow/use-tab-nav.js +28 -4
- package/src/hooks/grid-visualizer.js +23 -9
- package/src/hooks/layout-child.js +48 -3
- package/src/hooks/use-zoom-out.js +36 -20
- package/src/private-apis.js +2 -0
- package/src/store/actions.js +3 -2
- package/src/store/reducer.js +0 -17
- package/src/store/selectors.js +23 -12
- package/src/store/test/private-selectors.js +7 -1
- package/src/store/test/selectors.js +13 -2
- package/src/style.scss +1 -0
- package/src/utils/block-bindings.js +9 -6
- package/src/utils/test/use-block-bindings-utils.js +174 -0
|
@@ -9,39 +9,55 @@ import { useEffect, useRef } from '@wordpress/element';
|
|
|
9
9
|
*/
|
|
10
10
|
import { store as blockEditorStore } from '../store';
|
|
11
11
|
import { unlock } from '../lock-unlock';
|
|
12
|
-
|
|
13
12
|
/**
|
|
14
|
-
* A hook used to set the zoomed out
|
|
13
|
+
* A hook used to set the editor mode to zoomed out mode, invoking the hook sets the mode.
|
|
15
14
|
*
|
|
16
|
-
* @param {boolean} zoomOut If we should
|
|
15
|
+
* @param {boolean} zoomOut If we should enter into zoomOut mode or not
|
|
17
16
|
*/
|
|
18
17
|
export function useZoomOut( zoomOut = true ) {
|
|
19
|
-
const { setZoomLevel } = unlock(
|
|
20
|
-
|
|
18
|
+
const { __unstableSetEditorMode, setZoomLevel } = unlock(
|
|
19
|
+
useDispatch( blockEditorStore )
|
|
20
|
+
);
|
|
21
|
+
const { __unstableGetEditorMode } = unlock( useSelect( blockEditorStore ) );
|
|
21
22
|
|
|
22
|
-
const
|
|
23
|
+
const originalEditingModeRef = useRef( null );
|
|
24
|
+
const mode = __unstableGetEditorMode();
|
|
23
25
|
|
|
24
26
|
useEffect( () => {
|
|
25
27
|
// Only set this on mount so we know what to return to when we unmount.
|
|
26
|
-
if ( !
|
|
27
|
-
|
|
28
|
+
if ( ! originalEditingModeRef.current ) {
|
|
29
|
+
originalEditingModeRef.current = mode;
|
|
28
30
|
}
|
|
29
31
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
return () => {
|
|
33
|
+
// We need to use __unstableGetEditorMode() here and not `mode`, as mode may not update on unmount
|
|
34
|
+
if (
|
|
35
|
+
__unstableGetEditorMode() === 'zoom-out' &&
|
|
36
|
+
__unstableGetEditorMode() !== originalEditingModeRef.current
|
|
37
|
+
) {
|
|
38
|
+
__unstableSetEditorMode( originalEditingModeRef.current );
|
|
39
|
+
setZoomLevel( 100 );
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
}, [] );
|
|
43
|
+
|
|
44
|
+
// The effect opens the zoom-out view if we want it open and it's not currently in zoom-out mode.
|
|
45
|
+
useEffect( () => {
|
|
46
|
+
if ( zoomOut && mode !== 'zoom-out' ) {
|
|
47
|
+
__unstableSetEditorMode( 'zoom-out' );
|
|
32
48
|
setZoomLevel( 50 );
|
|
33
49
|
} else if (
|
|
34
50
|
! zoomOut &&
|
|
35
|
-
|
|
36
|
-
|
|
51
|
+
__unstableGetEditorMode() === 'zoom-out' &&
|
|
52
|
+
originalEditingModeRef.current !== mode
|
|
37
53
|
) {
|
|
38
|
-
|
|
54
|
+
__unstableSetEditorMode( originalEditingModeRef.current );
|
|
55
|
+
setZoomLevel( 100 );
|
|
39
56
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}, [ isZoomOut, setZoomLevel, zoomOut ] );
|
|
57
|
+
}, [
|
|
58
|
+
__unstableGetEditorMode,
|
|
59
|
+
__unstableSetEditorMode,
|
|
60
|
+
zoomOut,
|
|
61
|
+
setZoomLevel,
|
|
62
|
+
] ); // Mode is deliberately excluded from the dependencies so that the effect does not run when mode changes.
|
|
47
63
|
}
|
package/src/private-apis.js
CHANGED
|
@@ -32,6 +32,7 @@ import { usesContextKey } from './components/rich-text/format-edit';
|
|
|
32
32
|
import { ExperimentalBlockCanvas } from './components/block-canvas';
|
|
33
33
|
import { getDuotoneFilter } from './components/duotone/utils';
|
|
34
34
|
import { useFlashEditableBlocks } from './components/use-flash-editable-blocks';
|
|
35
|
+
import { useZoomOutModeExit } from './components/block-list/use-block-props/use-zoom-out-mode-exit';
|
|
35
36
|
import {
|
|
36
37
|
selectBlockPatternsKey,
|
|
37
38
|
reusableBlocksSelectKey,
|
|
@@ -78,6 +79,7 @@ lock( privateApis, {
|
|
|
78
79
|
TextAlignmentControl,
|
|
79
80
|
usesContextKey,
|
|
80
81
|
useFlashEditableBlocks,
|
|
82
|
+
useZoomOutModeExit,
|
|
81
83
|
globalStylesDataKey,
|
|
82
84
|
globalStylesLinksDataKey,
|
|
83
85
|
selectBlockPatternsKey,
|
package/src/store/actions.js
CHANGED
|
@@ -21,6 +21,7 @@ import { __, _n, sprintf } from '@wordpress/i18n';
|
|
|
21
21
|
import { store as noticesStore } from '@wordpress/notices';
|
|
22
22
|
import { create, insert, remove, toHTMLString } from '@wordpress/rich-text';
|
|
23
23
|
import deprecated from '@wordpress/deprecated';
|
|
24
|
+
import { store as preferencesStore } from '@wordpress/preferences';
|
|
24
25
|
|
|
25
26
|
/**
|
|
26
27
|
* Internal dependencies
|
|
@@ -1668,7 +1669,7 @@ export const setNavigationMode =
|
|
|
1668
1669
|
*/
|
|
1669
1670
|
export const __unstableSetEditorMode =
|
|
1670
1671
|
( mode ) =>
|
|
1671
|
-
( { dispatch, select } ) => {
|
|
1672
|
+
( { dispatch, select, registry } ) => {
|
|
1672
1673
|
// When switching to zoom-out mode, we need to select the parent section
|
|
1673
1674
|
if ( mode === 'zoom-out' ) {
|
|
1674
1675
|
const firstSelectedClientId = select.getBlockSelectionStart();
|
|
@@ -1708,7 +1709,7 @@ export const __unstableSetEditorMode =
|
|
|
1708
1709
|
}
|
|
1709
1710
|
}
|
|
1710
1711
|
|
|
1711
|
-
dispatch(
|
|
1712
|
+
registry.dispatch( preferencesStore ).set( 'core', 'editorTool', mode );
|
|
1712
1713
|
|
|
1713
1714
|
if ( mode === 'navigation' ) {
|
|
1714
1715
|
speak(
|
package/src/store/reducer.js
CHANGED
|
@@ -1786,22 +1786,6 @@ export const blockListSettings = ( state = {}, action ) => {
|
|
|
1786
1786
|
return state;
|
|
1787
1787
|
};
|
|
1788
1788
|
|
|
1789
|
-
/**
|
|
1790
|
-
* Reducer returning which mode is enabled.
|
|
1791
|
-
*
|
|
1792
|
-
* @param {string} state Current state.
|
|
1793
|
-
* @param {Object} action Dispatched action.
|
|
1794
|
-
*
|
|
1795
|
-
* @return {string} Updated state.
|
|
1796
|
-
*/
|
|
1797
|
-
export function editorMode( state = 'edit', action ) {
|
|
1798
|
-
if ( action.type === 'SET_EDITOR_MODE' ) {
|
|
1799
|
-
return action.mode;
|
|
1800
|
-
}
|
|
1801
|
-
|
|
1802
|
-
return state;
|
|
1803
|
-
}
|
|
1804
|
-
|
|
1805
1789
|
/**
|
|
1806
1790
|
* Reducer return an updated state representing the most recent block attribute
|
|
1807
1791
|
* update. The state is structured as an object where the keys represent the
|
|
@@ -2117,7 +2101,6 @@ const combinedReducers = combineReducers( {
|
|
|
2117
2101
|
preferences,
|
|
2118
2102
|
lastBlockAttributesChange,
|
|
2119
2103
|
lastFocus,
|
|
2120
|
-
editorMode,
|
|
2121
2104
|
expandedBlock,
|
|
2122
2105
|
highlightedBlock,
|
|
2123
2106
|
lastBlockInserted,
|
package/src/store/selectors.js
CHANGED
|
@@ -16,6 +16,7 @@ import { symbol } from '@wordpress/icons';
|
|
|
16
16
|
import { create, remove, toHTMLString } from '@wordpress/rich-text';
|
|
17
17
|
import deprecated from '@wordpress/deprecated';
|
|
18
18
|
import { createSelector, createRegistrySelector } from '@wordpress/data';
|
|
19
|
+
import { store as preferencesStore } from '@wordpress/preferences';
|
|
19
20
|
|
|
20
21
|
/**
|
|
21
22
|
* Internal dependencies
|
|
@@ -2384,6 +2385,21 @@ const getAllowedPatternsDependants = ( select ) => ( state, rootClientId ) => [
|
|
|
2384
2385
|
...getInsertBlockTypeDependants( state, rootClientId ),
|
|
2385
2386
|
];
|
|
2386
2387
|
|
|
2388
|
+
const patternsWithParsedBlocks = new WeakMap();
|
|
2389
|
+
function enhancePatternWithParsedBlocks( pattern ) {
|
|
2390
|
+
let enhancedPattern = patternsWithParsedBlocks.get( pattern );
|
|
2391
|
+
if ( ! enhancedPattern ) {
|
|
2392
|
+
enhancedPattern = {
|
|
2393
|
+
...pattern,
|
|
2394
|
+
get blocks() {
|
|
2395
|
+
return getParsedPattern( pattern ).blocks;
|
|
2396
|
+
},
|
|
2397
|
+
};
|
|
2398
|
+
patternsWithParsedBlocks.set( pattern, enhancedPattern );
|
|
2399
|
+
}
|
|
2400
|
+
return enhancedPattern;
|
|
2401
|
+
}
|
|
2402
|
+
|
|
2387
2403
|
/**
|
|
2388
2404
|
* Returns the list of allowed patterns for inner blocks children.
|
|
2389
2405
|
*
|
|
@@ -2405,14 +2421,7 @@ export const __experimentalGetAllowedPatterns = createRegistrySelector(
|
|
|
2405
2421
|
const { allowedBlockTypes } = getSettings( state );
|
|
2406
2422
|
const parsedPatterns = patterns
|
|
2407
2423
|
.filter( ( { inserter = true } ) => !! inserter )
|
|
2408
|
-
.map(
|
|
2409
|
-
return {
|
|
2410
|
-
...pattern,
|
|
2411
|
-
get blocks() {
|
|
2412
|
-
return getParsedPattern( pattern ).blocks;
|
|
2413
|
-
},
|
|
2414
|
-
};
|
|
2415
|
-
} );
|
|
2424
|
+
.map( enhancePatternWithParsedBlocks );
|
|
2416
2425
|
|
|
2417
2426
|
const availableParsedPatterns = parsedPatterns.filter(
|
|
2418
2427
|
( pattern ) =>
|
|
@@ -2691,7 +2700,7 @@ export function __experimentalGetLastBlockAttributeChanges( state ) {
|
|
|
2691
2700
|
* @return {boolean} Is navigation mode enabled.
|
|
2692
2701
|
*/
|
|
2693
2702
|
export function isNavigationMode( state ) {
|
|
2694
|
-
return state
|
|
2703
|
+
return __unstableGetEditorMode( state ) === 'navigation';
|
|
2695
2704
|
}
|
|
2696
2705
|
|
|
2697
2706
|
/**
|
|
@@ -2701,9 +2710,11 @@ export function isNavigationMode( state ) {
|
|
|
2701
2710
|
*
|
|
2702
2711
|
* @return {string} the editor mode.
|
|
2703
2712
|
*/
|
|
2704
|
-
export
|
|
2705
|
-
|
|
2706
|
-
|
|
2713
|
+
export const __unstableGetEditorMode = createRegistrySelector(
|
|
2714
|
+
( select ) => () => {
|
|
2715
|
+
return select( preferencesStore ).get( 'core', 'editorTool' );
|
|
2716
|
+
}
|
|
2717
|
+
);
|
|
2707
2718
|
|
|
2708
2719
|
/**
|
|
2709
2720
|
* Returns whether block moving mode is enabled.
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
isDragging,
|
|
12
12
|
getBlockStyles,
|
|
13
13
|
} from '../private-selectors';
|
|
14
|
-
import { getBlockEditingMode } from '../selectors';
|
|
14
|
+
import { getBlockEditingMode, __unstableGetEditorMode } from '../selectors';
|
|
15
15
|
|
|
16
16
|
describe( 'private selectors', () => {
|
|
17
17
|
describe( 'isBlockInterfaceHidden', () => {
|
|
@@ -125,11 +125,17 @@ describe( 'private selectors', () => {
|
|
|
125
125
|
};
|
|
126
126
|
|
|
127
127
|
const hasContentRoleAttribute = jest.fn( () => false );
|
|
128
|
+
const get = jest.fn( () => 'edit' );
|
|
128
129
|
getBlockEditingMode.registry = {
|
|
129
130
|
select: jest.fn( () => ( {
|
|
130
131
|
hasContentRoleAttribute,
|
|
131
132
|
} ) ),
|
|
132
133
|
};
|
|
134
|
+
__unstableGetEditorMode.registry = {
|
|
135
|
+
select: jest.fn( () => ( {
|
|
136
|
+
get,
|
|
137
|
+
} ) ),
|
|
138
|
+
};
|
|
133
139
|
|
|
134
140
|
it( 'should return false when top level block is not disabled', () => {
|
|
135
141
|
const state = {
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
import { RawHTML } from '@wordpress/element';
|
|
10
10
|
import { symbol } from '@wordpress/icons';
|
|
11
11
|
import { select, dispatch } from '@wordpress/data';
|
|
12
|
+
import { store as preferencesStore } from '@wordpress/preferences';
|
|
12
13
|
|
|
13
14
|
/**
|
|
14
15
|
* Internal dependencies
|
|
@@ -4470,7 +4471,6 @@ describe( 'getBlockEditingMode', () => {
|
|
|
4470
4471
|
|
|
4471
4472
|
const navigationModeStateWithRootSection = {
|
|
4472
4473
|
...baseState,
|
|
4473
|
-
editorMode: 'navigation',
|
|
4474
4474
|
settings: {
|
|
4475
4475
|
[ sectionRootClientIdKey ]: 'ef45d5fd-5234-4fd5-ac4f-c3736c7f9337', // The group is the "main" container
|
|
4476
4476
|
},
|
|
@@ -4480,12 +4480,18 @@ describe( 'getBlockEditingMode', () => {
|
|
|
4480
4480
|
|
|
4481
4481
|
const fauxPrivateAPIs = {};
|
|
4482
4482
|
|
|
4483
|
-
lock( fauxPrivateAPIs, {
|
|
4483
|
+
lock( fauxPrivateAPIs, {
|
|
4484
|
+
hasContentRoleAttribute,
|
|
4485
|
+
} );
|
|
4484
4486
|
|
|
4485
4487
|
getBlockEditingMode.registry = {
|
|
4486
4488
|
select: jest.fn( () => fauxPrivateAPIs ),
|
|
4487
4489
|
};
|
|
4488
4490
|
|
|
4491
|
+
afterEach( () => {
|
|
4492
|
+
dispatch( preferencesStore ).set( 'core', 'editorTool', undefined );
|
|
4493
|
+
} );
|
|
4494
|
+
|
|
4489
4495
|
it( 'should return default by default', () => {
|
|
4490
4496
|
expect(
|
|
4491
4497
|
getBlockEditingMode(
|
|
@@ -4610,6 +4616,7 @@ describe( 'getBlockEditingMode', () => {
|
|
|
4610
4616
|
} );
|
|
4611
4617
|
|
|
4612
4618
|
it( 'in navigation mode, the root section container is default', () => {
|
|
4619
|
+
dispatch( preferencesStore ).set( 'core', 'editorTool', 'navigation' );
|
|
4613
4620
|
expect(
|
|
4614
4621
|
getBlockEditingMode(
|
|
4615
4622
|
navigationModeStateWithRootSection,
|
|
@@ -4619,6 +4626,7 @@ describe( 'getBlockEditingMode', () => {
|
|
|
4619
4626
|
} );
|
|
4620
4627
|
|
|
4621
4628
|
it( 'in navigation mode, anything outside the section container is disabled', () => {
|
|
4629
|
+
dispatch( preferencesStore ).set( 'core', 'editorTool', 'navigation' );
|
|
4622
4630
|
expect(
|
|
4623
4631
|
getBlockEditingMode(
|
|
4624
4632
|
navigationModeStateWithRootSection,
|
|
@@ -4628,6 +4636,7 @@ describe( 'getBlockEditingMode', () => {
|
|
|
4628
4636
|
} );
|
|
4629
4637
|
|
|
4630
4638
|
it( 'in navigation mode, sections are contentOnly', () => {
|
|
4639
|
+
dispatch( preferencesStore ).set( 'core', 'editorTool', 'navigation' );
|
|
4631
4640
|
expect(
|
|
4632
4641
|
getBlockEditingMode(
|
|
4633
4642
|
navigationModeStateWithRootSection,
|
|
@@ -4643,6 +4652,7 @@ describe( 'getBlockEditingMode', () => {
|
|
|
4643
4652
|
} );
|
|
4644
4653
|
|
|
4645
4654
|
it( 'in navigation mode, blocks with content attributes within sections are contentOnly', () => {
|
|
4655
|
+
dispatch( preferencesStore ).set( 'core', 'editorTool', 'navigation' );
|
|
4646
4656
|
hasContentRoleAttribute.mockReturnValueOnce( true );
|
|
4647
4657
|
expect(
|
|
4648
4658
|
getBlockEditingMode(
|
|
@@ -4661,6 +4671,7 @@ describe( 'getBlockEditingMode', () => {
|
|
|
4661
4671
|
} );
|
|
4662
4672
|
|
|
4663
4673
|
it( 'in navigation mode, blocks without content attributes within sections are disabled', () => {
|
|
4674
|
+
dispatch( preferencesStore ).set( 'core', 'editorTool', 'navigation' );
|
|
4664
4675
|
expect(
|
|
4665
4676
|
getBlockEditingMode(
|
|
4666
4677
|
navigationModeStateWithRootSection,
|
package/src/style.scss
CHANGED
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
@import "./components/global-styles/style.scss";
|
|
31
31
|
@import "./components/grid/style.scss";
|
|
32
32
|
@import "./components/height-control/style.scss";
|
|
33
|
+
@import "./components/iframe/style.scss";
|
|
33
34
|
@import "./components/image-size-control/style.scss";
|
|
34
35
|
@import "./components/inserter-list-item/style.scss";
|
|
35
36
|
@import "./components/inspector-controls-tabs/style.scss";
|
|
@@ -32,6 +32,8 @@ function isObjectEmpty( object ) {
|
|
|
32
32
|
*
|
|
33
33
|
* @since 6.7.0 Introduced in WordPress core.
|
|
34
34
|
*
|
|
35
|
+
* @param {?string} clientId Optional block client ID. If not set, it will use the current block client ID from the context.
|
|
36
|
+
*
|
|
35
37
|
* @return {?WPBlockBindingsUtils} Object containing the block bindings utils.
|
|
36
38
|
*
|
|
37
39
|
* @example
|
|
@@ -62,8 +64,9 @@ function isObjectEmpty( object ) {
|
|
|
62
64
|
* removeAllBlockBindings();
|
|
63
65
|
* ```
|
|
64
66
|
*/
|
|
65
|
-
export function useBlockBindingsUtils() {
|
|
66
|
-
const { clientId } = useBlockEditContext();
|
|
67
|
+
export function useBlockBindingsUtils( clientId ) {
|
|
68
|
+
const { clientId: contextClientId } = useBlockEditContext();
|
|
69
|
+
const blockClientId = clientId || contextClientId;
|
|
67
70
|
const { updateBlockAttributes } = useDispatch( blockEditorStore );
|
|
68
71
|
const { getBlockAttributes } = useRegistry().select( blockEditorStore );
|
|
69
72
|
|
|
@@ -98,7 +101,7 @@ export function useBlockBindingsUtils() {
|
|
|
98
101
|
*/
|
|
99
102
|
const updateBlockBindings = ( bindings ) => {
|
|
100
103
|
const { metadata: { bindings: currentBindings, ...metadata } = {} } =
|
|
101
|
-
getBlockAttributes(
|
|
104
|
+
getBlockAttributes( blockClientId );
|
|
102
105
|
const newBindings = { ...currentBindings };
|
|
103
106
|
|
|
104
107
|
Object.entries( bindings ).forEach( ( [ attribute, binding ] ) => {
|
|
@@ -118,7 +121,7 @@ export function useBlockBindingsUtils() {
|
|
|
118
121
|
delete newMetadata.bindings;
|
|
119
122
|
}
|
|
120
123
|
|
|
121
|
-
updateBlockAttributes(
|
|
124
|
+
updateBlockAttributes( blockClientId, {
|
|
122
125
|
metadata: isObjectEmpty( newMetadata ) ? undefined : newMetadata,
|
|
123
126
|
} );
|
|
124
127
|
};
|
|
@@ -136,8 +139,8 @@ export function useBlockBindingsUtils() {
|
|
|
136
139
|
*/
|
|
137
140
|
const removeAllBlockBindings = () => {
|
|
138
141
|
const { metadata: { bindings, ...metadata } = {} } =
|
|
139
|
-
getBlockAttributes(
|
|
140
|
-
updateBlockAttributes(
|
|
142
|
+
getBlockAttributes( blockClientId );
|
|
143
|
+
updateBlockAttributes( blockClientId, {
|
|
141
144
|
metadata: isObjectEmpty( metadata ) ? undefined : metadata,
|
|
142
145
|
} );
|
|
143
146
|
};
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { renderHook } from '@testing-library/react';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* WordPress dependencies
|
|
8
|
+
*/
|
|
9
|
+
import { store as blockEditorStore } from '@wordpress/block-editor';
|
|
10
|
+
import { dispatch, select } from '@wordpress/data';
|
|
11
|
+
import {
|
|
12
|
+
createBlock,
|
|
13
|
+
getBlockTypes,
|
|
14
|
+
unregisterBlockType,
|
|
15
|
+
} from '@wordpress/blocks';
|
|
16
|
+
import { registerCoreBlocks } from '@wordpress/block-library';
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Internal dependencies
|
|
20
|
+
*/
|
|
21
|
+
import { useBlockBindingsUtils } from '../';
|
|
22
|
+
|
|
23
|
+
describe( 'useBlockBindingsUtils', () => {
|
|
24
|
+
beforeAll( () => {
|
|
25
|
+
// Register all core blocks
|
|
26
|
+
registerCoreBlocks();
|
|
27
|
+
} );
|
|
28
|
+
|
|
29
|
+
let clientId;
|
|
30
|
+
beforeEach( async () => {
|
|
31
|
+
const block = createBlock( 'core/paragraph', {
|
|
32
|
+
metadata: {
|
|
33
|
+
name: 'Block name',
|
|
34
|
+
bindings: {
|
|
35
|
+
prop1: {
|
|
36
|
+
source: 'core/post-meta',
|
|
37
|
+
args: {
|
|
38
|
+
key: 'initial_key',
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
prop2: {
|
|
42
|
+
source: 'core/post-meta',
|
|
43
|
+
args: {
|
|
44
|
+
key: 'initial_key',
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
} );
|
|
50
|
+
await dispatch( blockEditorStore ).resetBlocks( [ block ] );
|
|
51
|
+
clientId = block.clientId;
|
|
52
|
+
} );
|
|
53
|
+
|
|
54
|
+
afterAll( () => {
|
|
55
|
+
// Remove blocks after all tests.
|
|
56
|
+
dispatch( blockEditorStore ).resetBlocks( [] );
|
|
57
|
+
|
|
58
|
+
// Clean up registered blocks
|
|
59
|
+
getBlockTypes().forEach( ( block ) => {
|
|
60
|
+
unregisterBlockType( block.name );
|
|
61
|
+
} );
|
|
62
|
+
} );
|
|
63
|
+
|
|
64
|
+
it( 'should be possible to update just one connection', async () => {
|
|
65
|
+
renderHook( () => {
|
|
66
|
+
const { updateBlockBindings } = useBlockBindingsUtils( clientId );
|
|
67
|
+
updateBlockBindings( {
|
|
68
|
+
prop1: {
|
|
69
|
+
source: 'core/post-meta',
|
|
70
|
+
args: {
|
|
71
|
+
key: 'new_key',
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
} );
|
|
75
|
+
} );
|
|
76
|
+
const { metadata } =
|
|
77
|
+
await select( blockEditorStore ).getBlockAttributes( clientId );
|
|
78
|
+
expect( metadata ).toMatchObject( {
|
|
79
|
+
// Other metadata properties shouldn't change.
|
|
80
|
+
name: 'Block name',
|
|
81
|
+
bindings: {
|
|
82
|
+
prop1: {
|
|
83
|
+
source: 'core/post-meta',
|
|
84
|
+
args: {
|
|
85
|
+
key: 'new_key',
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
prop2: {
|
|
89
|
+
source: 'core/post-meta',
|
|
90
|
+
args: {
|
|
91
|
+
key: 'initial_key',
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
} );
|
|
96
|
+
} );
|
|
97
|
+
|
|
98
|
+
it( 'should be possible to update multiple connections at once', async () => {
|
|
99
|
+
renderHook( () => {
|
|
100
|
+
const { updateBlockBindings } = useBlockBindingsUtils( clientId );
|
|
101
|
+
updateBlockBindings( {
|
|
102
|
+
prop1: {
|
|
103
|
+
source: 'core/post-meta',
|
|
104
|
+
args: {
|
|
105
|
+
key: 'new_key',
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
prop2: {
|
|
109
|
+
source: 'core/post-meta',
|
|
110
|
+
args: {
|
|
111
|
+
key: 'new_key',
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
} );
|
|
115
|
+
} );
|
|
116
|
+
const { metadata } =
|
|
117
|
+
await select( blockEditorStore ).getBlockAttributes( clientId );
|
|
118
|
+
expect( metadata ).toMatchObject( {
|
|
119
|
+
// Other metadata properties shouldn't change.
|
|
120
|
+
name: 'Block name',
|
|
121
|
+
bindings: {
|
|
122
|
+
prop1: {
|
|
123
|
+
source: 'core/post-meta',
|
|
124
|
+
args: {
|
|
125
|
+
key: 'new_key',
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
prop2: {
|
|
129
|
+
source: 'core/post-meta',
|
|
130
|
+
args: {
|
|
131
|
+
key: 'new_key',
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
} );
|
|
136
|
+
} );
|
|
137
|
+
|
|
138
|
+
it( 'should be possible to remove connections', async () => {
|
|
139
|
+
renderHook( () => {
|
|
140
|
+
const { updateBlockBindings } = useBlockBindingsUtils( clientId );
|
|
141
|
+
updateBlockBindings( {
|
|
142
|
+
prop2: undefined,
|
|
143
|
+
} );
|
|
144
|
+
} );
|
|
145
|
+
const { metadata } =
|
|
146
|
+
await select( blockEditorStore ).getBlockAttributes( clientId );
|
|
147
|
+
expect( metadata ).toMatchObject( {
|
|
148
|
+
// Other metadata properties shouldn't change.
|
|
149
|
+
name: 'Block name',
|
|
150
|
+
bindings: {
|
|
151
|
+
prop1: {
|
|
152
|
+
source: 'core/post-meta',
|
|
153
|
+
args: {
|
|
154
|
+
key: 'initial_key',
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
} );
|
|
159
|
+
} );
|
|
160
|
+
|
|
161
|
+
it( 'should be possible to remove all connections', async () => {
|
|
162
|
+
renderHook( () => {
|
|
163
|
+
const { removeAllBlockBindings } =
|
|
164
|
+
useBlockBindingsUtils( clientId );
|
|
165
|
+
removeAllBlockBindings();
|
|
166
|
+
} );
|
|
167
|
+
const { metadata } =
|
|
168
|
+
await select( blockEditorStore ).getBlockAttributes( clientId );
|
|
169
|
+
expect( metadata ).toMatchObject( {
|
|
170
|
+
// Other metadata properties shouldn't change.
|
|
171
|
+
name: 'Block name',
|
|
172
|
+
} );
|
|
173
|
+
} );
|
|
174
|
+
} );
|