@wordpress/block-editor 14.3.6 → 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 +4 -0
- package/README.md +6 -2
- package/build/autocompleters/block.js.map +1 -1
- package/build/autocompleters/link.js +2 -1
- package/build/autocompleters/link.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-actions/index.js +1 -13
- package/build/components/block-actions/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-inspector/index.js +56 -75
- package/build/components/block-inspector/index.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 +5 -16
- package/build/components/block-list/block.js.map +1 -1
- package/build/components/block-list/index.js +6 -8
- 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 +3 -8
- 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/use-in-between-inserter.js +5 -3
- package/build/components/block-list/use-in-between-inserter.js.map +1 -1
- package/build/components/block-list/zoom-out-separator.js +24 -13
- 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-navigation/dropdown.js +2 -4
- package/build/components/block-navigation/dropdown.js.map +1 -1
- package/build/components/block-parent-selector/index.js +14 -11
- 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-pattern-setup/setup-toolbar.js +10 -20
- package/build/components/block-pattern-setup/setup-toolbar.js.map +1 -1
- package/build/components/block-patterns-list/index.js.map +1 -1
- package/build/components/block-patterns-paging/index.js +11 -13
- package/build/components/block-patterns-paging/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-quick-navigation/index.js +2 -4
- package/build/components/block-quick-navigation/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-settings-menu/block-settings-dropdown.js +79 -76
- package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build/components/block-settings-menu-controls/index.js +1 -6
- package/build/components/block-settings-menu-controls/index.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 +19 -15
- 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 +16 -19
- package/build/components/block-toolbar/index.js.map +1 -1
- package/build/components/block-toolbar/use-has-block-toolbar.js +3 -5
- package/build/components/block-toolbar/use-has-block-toolbar.js.map +1 -1
- package/build/components/block-tools/index.js +8 -18
- package/build/components/block-tools/index.js.map +1 -1
- package/build/components/block-tools/insertion-point.js +1 -4
- package/build/components/block-tools/insertion-point.js.map +1 -1
- package/build/components/block-tools/use-show-block-tools.js +8 -7
- package/build/components/block-tools/use-show-block-tools.js.map +1 -1
- package/build/components/block-tools/zoom-out-mode-inserter-button.js +1 -12
- package/build/components/block-tools/zoom-out-mode-inserter-button.js.map +1 -1
- package/build/components/block-tools/zoom-out-mode-inserters.js +14 -17
- package/build/components/block-tools/zoom-out-mode-inserters.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 +5 -32
- 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 +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/dimensions-panel.js +3 -3
- 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 +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 +44 -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/index.js +1 -9
- package/build/components/inner-blocks/index.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.js +1 -1
- 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 +1 -10
- package/build/components/inserter/category-tabs/index.js.map +1 -1
- package/build/components/inserter/hooks/use-block-types-state.js +24 -5
- package/build/components/inserter/hooks/use-block-types-state.js.map +1 -1
- package/build/components/inserter/hooks/use-insertion-point.js +22 -12
- package/build/components/inserter/hooks/use-insertion-point.js.map +1 -1
- package/build/components/inserter/hooks/use-patterns-state.js +24 -11
- 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 +36 -14
- 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 +4 -4
- package/build/components/inserter/menu.js.map +1 -1
- package/build/components/inserter/mobile-tab-navigation.js +5 -5
- 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 +5 -5
- 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/index.js +1 -2
- 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/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-contents.js +1 -25
- package/build/components/list-view/block-contents.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 +13 -8
- 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-commands/index.js +0 -61
- package/build/components/use-block-commands/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/writing-flow/use-tab-nav.js +23 -30
- 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 +4 -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/layout-child.js +3 -1
- package/build/hooks/layout-child.js.map +1 -1
- package/build/hooks/layout.js.map +1 -1
- package/build/hooks/position.js +4 -3
- 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/store/actions.js +18 -20
- package/build/store/actions.js.map +1 -1
- package/build/store/private-actions.js +15 -0
- package/build/store/private-actions.js.map +1 -1
- package/build/store/private-selectors.js +104 -7
- package/build/store/private-selectors.js.map +1 -1
- package/build/store/reducer.js +24 -44
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +149 -71
- package/build/store/selectors.js.map +1 -1
- package/build/store/utils.js +4 -3
- package/build/store/utils.js.map +1 -1
- package/build/utils/block-bindings.js +2 -0
- 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 +3 -4
- 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-actions/index.js +1 -13
- package/build-module/components/block-actions/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 +57 -78
- 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 +6 -19
- 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 +7 -10
- 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 +3 -8
- 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/use-in-between-inserter.js +5 -3
- package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
- package/build-module/components/block-list/zoom-out-separator.js +24 -13
- 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 +3 -6
- package/build-module/components/block-navigation/dropdown.js.map +1 -1
- package/build-module/components/block-parent-selector/index.js +14 -11
- 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 +11 -22
- 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 +12 -15
- 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 +3 -6
- 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 +80 -79
- package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build-module/components/block-settings-menu-controls/index.js +3 -9
- 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 +20 -18
- 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 +17 -22
- 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-toolbar/use-has-block-toolbar.js +3 -5
- package/build-module/components/block-toolbar/use-has-block-toolbar.js.map +1 -1
- package/build-module/components/block-tools/index.js +9 -20
- package/build-module/components/block-tools/index.js.map +1 -1
- package/build-module/components/block-tools/insertion-point.js +2 -6
- package/build-module/components/block-tools/insertion-point.js.map +1 -1
- package/build-module/components/block-tools/use-show-block-tools.js +8 -7
- package/build-module/components/block-tools/use-show-block-tools.js.map +1 -1
- package/build-module/components/block-tools/zoom-out-mode-inserter-button.js +1 -12
- package/build-module/components/block-tools/zoom-out-mode-inserter-button.js.map +1 -1
- package/build-module/components/block-tools/zoom-out-mode-inserters.js +14 -17
- package/build-module/components/block-tools/zoom-out-mode-inserters.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 +7 -35
- 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 +2 -3
- 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 +2 -3
- 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 +45 -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/index.js +1 -9
- package/build-module/components/inner-blocks/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 +2 -4
- 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 +27 -8
- package/build-module/components/inserter/hooks/use-block-types-state.js.map +1 -1
- package/build-module/components/inserter/hooks/use-insertion-point.js +22 -12
- package/build-module/components/inserter/hooks/use-insertion-point.js.map +1 -1
- package/build-module/components/inserter/hooks/use-patterns-state.js +24 -11
- 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 +37 -17
- 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 +5 -7
- 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 +7 -8
- 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 +6 -7
- 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 +2 -5
- 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 +2 -28
- 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 +14 -11
- 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-commands/index.js +1 -62
- package/build-module/components/use-block-commands/index.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/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 +24 -31
- 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 +5 -4
- 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 +1 -3
- package/build-module/hooks/grid-visualizer.js.map +1 -1
- package/build-module/hooks/layout-child.js +5 -4
- 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 +5 -2
- 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/store/actions.js +17 -18
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/private-actions.js +14 -0
- package/build-module/store/private-actions.js.map +1 -1
- package/build-module/store/private-selectors.js +98 -7
- package/build-module/store/private-selectors.js.map +1 -1
- package/build-module/store/reducer.js +22 -41
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +150 -70
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/store/utils.js +3 -2
- package/build-module/store/utils.js.map +1 -1
- package/build-module/utils/block-bindings.js +2 -0
- 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 +22 -73
- package/build-style/content.css +22 -73
- package/build-style/default-editor-styles-rtl.css +10 -1
- package/build-style/default-editor-styles.css +10 -1
- package/build-style/style-rtl.css +48 -165
- package/build-style/style.css +48 -165
- package/package.json +33 -33
- package/src/autocompleters/link.js +2 -1
- package/src/components/block-actions/index.js +1 -13
- package/src/components/block-canvas/style.scss +0 -1
- package/src/components/block-draggable/style.scss +2 -2
- package/src/components/block-inspector/index.js +79 -95
- package/src/components/block-list/block.js +7 -25
- package/src/components/block-list/content.scss +4 -63
- package/src/components/block-list/index.js +21 -29
- package/src/components/block-list/use-block-props/index.js +2 -8
- package/src/components/block-list/use-block-props/use-selected-block-event-handlers.js +25 -4
- package/src/components/block-list/use-in-between-inserter.js +5 -2
- package/src/components/block-list/zoom-out-separator.js +32 -14
- package/src/components/block-navigation/dropdown.js +1 -2
- package/src/components/block-parent-selector/index.js +13 -10
- package/src/components/block-pattern-setup/setup-toolbar.js +5 -10
- package/src/components/block-patterns-paging/index.js +8 -7
- package/src/components/block-patterns-paging/style.scss +10 -27
- package/src/components/block-popover/index.js +64 -2
- package/src/components/block-preview/auto.js +1 -4
- package/src/components/block-quick-navigation/index.js +1 -2
- package/src/components/block-settings-menu/block-settings-dropdown.js +120 -106
- package/src/components/block-settings-menu-controls/index.js +0 -15
- package/src/components/block-switcher/index.js +37 -30
- package/src/components/block-toolbar/index.js +22 -34
- package/src/components/block-toolbar/style.scss +10 -1
- package/src/components/block-toolbar/use-has-block-toolbar.js +19 -31
- package/src/components/block-tools/index.js +7 -27
- package/src/components/block-tools/insertion-point.js +1 -4
- package/src/components/block-tools/style.scss +0 -90
- package/src/components/block-tools/use-show-block-tools.js +10 -13
- package/src/components/block-tools/zoom-out-mode-inserter-button.js +2 -17
- package/src/components/block-tools/zoom-out-mode-inserters.js +11 -19
- package/src/components/block-tools/zoom-out-popover.js +2 -1
- package/src/components/block-tools/zoom-out-toolbar.js +4 -36
- package/src/components/font-family/README.md +5 -1
- package/src/components/global-styles/border-panel.js +1 -1
- package/src/components/global-styles/dimensions-panel.js +1 -1
- package/src/components/iframe/content.scss +20 -24
- package/src/components/iframe/index.js +56 -12
- package/src/components/iframe/style.scss +6 -5
- package/src/components/inner-blocks/index.js +1 -16
- 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/block-types-tab.js +1 -1
- package/src/components/inserter/category-tabs/index.js +1 -11
- package/src/components/inserter/hooks/use-block-types-state.js +34 -14
- package/src/components/inserter/hooks/use-insertion-point.js +35 -13
- package/src/components/inserter/hooks/use-patterns-state.js +46 -9
- package/src/components/inserter/media-tab/media-preview.js +38 -12
- package/src/components/inserter/menu.js +4 -4
- package/src/components/inserter/mobile-tab-navigation.js +10 -13
- package/src/components/inserter/quick-inserter.js +6 -5
- package/src/components/inserter/style.scss +1 -69
- package/src/components/inspector-controls-tabs/style.scss +2 -6
- package/src/components/link-control/index.js +0 -1
- 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/list-view/block-contents.js +1 -28
- package/src/components/list-view/style.scss +0 -14
- 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 +15 -7
- package/src/components/tool-selector/style.scss +5 -0
- package/src/components/use-block-commands/index.js +0 -58
- package/src/components/writing-flow/use-tab-nav.js +32 -40
- package/src/content.scss +0 -1
- package/src/hooks/duotone.js +4 -1
- package/src/hooks/layout-child.js +4 -1
- package/src/hooks/position.js +4 -1
- package/src/hooks/use-zoom-out.js +36 -20
- package/src/store/actions.js +17 -15
- package/src/store/private-actions.js +14 -0
- package/src/store/private-selectors.js +120 -16
- package/src/store/reducer.js +22 -45
- package/src/store/selectors.js +218 -118
- package/src/store/test/private-actions.js +15 -0
- package/src/store/test/private-selectors.js +41 -1
- package/src/store/test/reducer.js +40 -4
- package/src/store/test/selectors.js +195 -21
- package/src/store/utils.js +4 -2
- package/src/style.scss +1 -0
- package/src/utils/block-bindings.js +2 -0
- package/build/components/block-controls/use-has-block-controls.js +0 -43
- package/build/components/block-controls/use-has-block-controls.js.map +0 -1
- package/build/components/block-list/use-block-props/use-nav-mode-exit.js +0 -54
- package/build/components/block-list/use-block-props/use-nav-mode-exit.js.map +0 -1
- package/build/components/block-tools/block-selection-button.js +0 -259
- package/build/components/block-tools/block-selection-button.js.map +0 -1
- package/build/components/block-tools/block-toolbar-breadcrumb.js +0 -57
- package/build/components/block-tools/block-toolbar-breadcrumb.js.map +0 -1
- package/build/components/inserter/tabs.js +0 -78
- package/build/components/inserter/tabs.js.map +0 -1
- package/build-module/components/block-controls/use-has-block-controls.js +0 -34
- package/build-module/components/block-controls/use-has-block-controls.js.map +0 -1
- package/build-module/components/block-list/use-block-props/use-nav-mode-exit.js +0 -48
- package/build-module/components/block-list/use-block-props/use-nav-mode-exit.js.map +0 -1
- package/build-module/components/block-tools/block-selection-button.js +0 -254
- package/build-module/components/block-tools/block-selection-button.js.map +0 -1
- package/build-module/components/block-tools/block-toolbar-breadcrumb.js +0 -49
- package/build-module/components/block-tools/block-toolbar-breadcrumb.js.map +0 -1
- package/build-module/components/inserter/tabs.js +0 -72
- package/build-module/components/inserter/tabs.js.map +0 -1
- package/src/components/block-controls/use-has-block-controls.js +0 -35
- package/src/components/block-list/use-block-props/use-nav-mode-exit.js +0 -46
- package/src/components/block-tools/block-selection-button.js +0 -302
- package/src/components/block-tools/block-toolbar-breadcrumb.js +0 -51
- package/src/components/inner-blocks/content.scss +0 -13
- package/src/components/inserter/tabs.js +0 -78
- package/src/components/inserter/test/block-types-tab.native.js +0 -67
|
@@ -122,7 +122,7 @@ function Iframe( {
|
|
|
122
122
|
}, [] );
|
|
123
123
|
const { styles = '', scripts = '' } = resolvedAssets;
|
|
124
124
|
const [ iframeDocument, setIframeDocument ] = useState();
|
|
125
|
-
const
|
|
125
|
+
const initialContainerWidth = useRef();
|
|
126
126
|
const [ bodyClasses, setBodyClasses ] = useState( [] );
|
|
127
127
|
const clearerRef = useBlockSelectionClearer();
|
|
128
128
|
const [ before, writingFlowRef, after ] = useWritingFlow();
|
|
@@ -243,7 +243,7 @@ function Iframe( {
|
|
|
243
243
|
|
|
244
244
|
useEffect( () => {
|
|
245
245
|
if ( ! isZoomedOut ) {
|
|
246
|
-
|
|
246
|
+
initialContainerWidth.current = containerWidth;
|
|
247
247
|
}
|
|
248
248
|
}, [ containerWidth, isZoomedOut ] );
|
|
249
249
|
|
|
@@ -298,14 +298,49 @@ function Iframe( {
|
|
|
298
298
|
|
|
299
299
|
useEffect( () => cleanup, [ cleanup ] );
|
|
300
300
|
|
|
301
|
+
const zoomOutAnimationClassnameRef = useRef( null );
|
|
302
|
+
const handleZoomOutAnimationClassname = () => {
|
|
303
|
+
clearTimeout( zoomOutAnimationClassnameRef.current );
|
|
304
|
+
|
|
305
|
+
iframeDocument.documentElement.classList.add( 'zoom-out-animation' );
|
|
306
|
+
|
|
307
|
+
zoomOutAnimationClassnameRef.current = setTimeout( () => {
|
|
308
|
+
iframeDocument.documentElement.classList.remove(
|
|
309
|
+
'zoom-out-animation'
|
|
310
|
+
);
|
|
311
|
+
}, 400 ); // 400ms should match the animation speed used in components/iframe/content.scss
|
|
312
|
+
};
|
|
313
|
+
|
|
314
|
+
// Toggle zoom out CSS Classes only when zoom out mode changes. We could add these into the useEffect
|
|
315
|
+
// that controls settings the CSS variables, but then we would need to do more work to ensure we're
|
|
316
|
+
// only toggling these when the zoom out mode changes, as that useEffect is also triggered by a large
|
|
317
|
+
// number of dependencies.
|
|
301
318
|
useEffect( () => {
|
|
302
319
|
if ( ! iframeDocument || ! isZoomedOut ) {
|
|
303
320
|
return;
|
|
304
321
|
}
|
|
305
322
|
|
|
323
|
+
handleZoomOutAnimationClassname();
|
|
306
324
|
iframeDocument.documentElement.classList.add( 'is-zoomed-out' );
|
|
307
325
|
|
|
326
|
+
return () => {
|
|
327
|
+
handleZoomOutAnimationClassname();
|
|
328
|
+
iframeDocument.documentElement.classList.remove( 'is-zoomed-out' );
|
|
329
|
+
};
|
|
330
|
+
}, [ iframeDocument, isZoomedOut ] );
|
|
331
|
+
|
|
332
|
+
// Calculate the scaling and CSS variables for the zoom out canvas
|
|
333
|
+
useEffect( () => {
|
|
334
|
+
if ( ! iframeDocument || ! isZoomedOut ) {
|
|
335
|
+
return;
|
|
336
|
+
}
|
|
337
|
+
|
|
308
338
|
const maxWidth = 750;
|
|
339
|
+
// Note: When we initialize the zoom out when the canvas is smaller (sidebars open),
|
|
340
|
+
// initialContainerWidth will be smaller than the full page, and reflow will happen
|
|
341
|
+
// when the canvas area becomes larger due to sidebars closing. This is a known but
|
|
342
|
+
// minor divergence for now.
|
|
343
|
+
|
|
309
344
|
// This scaling calculation has to happen within the JS because CSS calc() can
|
|
310
345
|
// only divide and multiply by a unitless value. I.e. calc( 100px / 2 ) is valid
|
|
311
346
|
// but calc( 100px / 2px ) is not.
|
|
@@ -314,7 +349,10 @@ function Iframe( {
|
|
|
314
349
|
scale === 'default'
|
|
315
350
|
? ( Math.min( containerWidth, maxWidth ) -
|
|
316
351
|
parseInt( frameSize ) * 2 ) /
|
|
317
|
-
|
|
352
|
+
Math.max(
|
|
353
|
+
initialContainerWidth.current,
|
|
354
|
+
containerWidth
|
|
355
|
+
)
|
|
318
356
|
: scale
|
|
319
357
|
);
|
|
320
358
|
|
|
@@ -336,13 +374,16 @@ function Iframe( {
|
|
|
336
374
|
`${ containerWidth }px`
|
|
337
375
|
);
|
|
338
376
|
iframeDocument.documentElement.style.setProperty(
|
|
339
|
-
'--wp-block-editor-iframe-zoom-out-
|
|
340
|
-
`${
|
|
377
|
+
'--wp-block-editor-iframe-zoom-out-outer-container-width',
|
|
378
|
+
`${ Math.max( initialContainerWidth.current, containerWidth ) }px`
|
|
341
379
|
);
|
|
342
380
|
|
|
343
|
-
|
|
344
|
-
|
|
381
|
+
// iframeDocument.documentElement.style.setProperty(
|
|
382
|
+
// '--wp-block-editor-iframe-zoom-out-outer-container-width',
|
|
383
|
+
// `${ Math.max( initialContainerWidth.current, containerWidth ) }px`
|
|
384
|
+
// );
|
|
345
385
|
|
|
386
|
+
return () => {
|
|
346
387
|
iframeDocument.documentElement.style.removeProperty(
|
|
347
388
|
'--wp-block-editor-iframe-zoom-out-scale'
|
|
348
389
|
);
|
|
@@ -359,7 +400,7 @@ function Iframe( {
|
|
|
359
400
|
'--wp-block-editor-iframe-zoom-out-container-width'
|
|
360
401
|
);
|
|
361
402
|
iframeDocument.documentElement.style.removeProperty(
|
|
362
|
-
'--wp-block-editor-iframe-zoom-out-
|
|
403
|
+
'--wp-block-editor-iframe-zoom-out-outer-container-width'
|
|
363
404
|
);
|
|
364
405
|
};
|
|
365
406
|
}, [
|
|
@@ -386,6 +427,7 @@ function Iframe( {
|
|
|
386
427
|
style={ {
|
|
387
428
|
...props.style,
|
|
388
429
|
height: props.style?.height,
|
|
430
|
+
border: 0,
|
|
389
431
|
} }
|
|
390
432
|
ref={ useMergeRefs( [ ref, setRef ] ) }
|
|
391
433
|
tabIndex={ tabIndex }
|
|
@@ -459,10 +501,12 @@ function Iframe( {
|
|
|
459
501
|
isZoomedOut && 'is-zoomed-out'
|
|
460
502
|
) }
|
|
461
503
|
style={ {
|
|
462
|
-
'--wp-block-editor-iframe-zoom-out-container-width':
|
|
463
|
-
isZoomedOut &&
|
|
464
|
-
|
|
465
|
-
|
|
504
|
+
'--wp-block-editor-iframe-zoom-out-outer-container-width':
|
|
505
|
+
isZoomedOut &&
|
|
506
|
+
`${ Math.max(
|
|
507
|
+
initialContainerWidth.current,
|
|
508
|
+
containerWidth
|
|
509
|
+
) }px`,
|
|
466
510
|
} }
|
|
467
511
|
>
|
|
468
512
|
{ iframe }
|
|
@@ -9,9 +9,10 @@
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
.block-editor-iframe__scale-container.is-zoomed-out {
|
|
12
|
-
$container-width: var(--wp-block-editor-iframe-zoom-out-container-width, 100vw);
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
//
|
|
16
|
-
|
|
12
|
+
$outer-container-width: var(--wp-block-editor-iframe-zoom-out-outer-container-width, 100vw);
|
|
13
|
+
width: $outer-container-width;
|
|
14
|
+
// Position the iframe so that it is always aligned with the right side so that
|
|
15
|
+
// the scrollbar is always visible on the right side
|
|
16
|
+
position: absolute;
|
|
17
|
+
right: 0;
|
|
17
18
|
}
|
|
@@ -195,14 +195,11 @@ export function useInnerBlocksProps( props = {}, options = {} ) {
|
|
|
195
195
|
( select ) => {
|
|
196
196
|
const {
|
|
197
197
|
getBlockName,
|
|
198
|
-
isBlockSelected,
|
|
199
|
-
hasSelectedInnerBlock,
|
|
200
198
|
__unstableGetEditorMode,
|
|
201
199
|
getTemplateLock,
|
|
202
200
|
getBlockRootClientId,
|
|
203
201
|
getBlockEditingMode,
|
|
204
202
|
getBlockSettings,
|
|
205
|
-
isDragging,
|
|
206
203
|
getSectionRootClientId,
|
|
207
204
|
} = unlock( select( blockEditorStore ) );
|
|
208
205
|
let _isDropZoneDisabled;
|
|
@@ -213,8 +210,6 @@ export function useInnerBlocksProps( props = {}, options = {} ) {
|
|
|
213
210
|
|
|
214
211
|
const { hasBlockSupport, getBlockType } = select( blocksStore );
|
|
215
212
|
const blockName = getBlockName( clientId );
|
|
216
|
-
const enableClickThrough =
|
|
217
|
-
__unstableGetEditorMode() === 'navigation';
|
|
218
213
|
const blockEditingMode = getBlockEditingMode( clientId );
|
|
219
214
|
const parentClientId = getBlockRootClientId( clientId );
|
|
220
215
|
const [ defaultLayout ] = getBlockSettings( clientId, 'layout' );
|
|
@@ -236,12 +231,6 @@ export function useInnerBlocksProps( props = {}, options = {} ) {
|
|
|
236
231
|
'__experimentalExposeControlsToChildren',
|
|
237
232
|
false
|
|
238
233
|
),
|
|
239
|
-
hasOverlay:
|
|
240
|
-
blockName !== 'core/template' &&
|
|
241
|
-
! isBlockSelected( clientId ) &&
|
|
242
|
-
! hasSelectedInnerBlock( clientId, true ) &&
|
|
243
|
-
enableClickThrough &&
|
|
244
|
-
! isDragging(),
|
|
245
234
|
name: blockName,
|
|
246
235
|
blockType: getBlockType( blockName ),
|
|
247
236
|
parentLock: getTemplateLock( parentClientId ),
|
|
@@ -254,7 +243,6 @@ export function useInnerBlocksProps( props = {}, options = {} ) {
|
|
|
254
243
|
);
|
|
255
244
|
const {
|
|
256
245
|
__experimentalCaptureToolbars,
|
|
257
|
-
hasOverlay,
|
|
258
246
|
name,
|
|
259
247
|
blockType,
|
|
260
248
|
parentLock,
|
|
@@ -299,10 +287,7 @@ export function useInnerBlocksProps( props = {}, options = {} ) {
|
|
|
299
287
|
className: clsx(
|
|
300
288
|
props.className,
|
|
301
289
|
'block-editor-block-list__layout',
|
|
302
|
-
__unstableDisableLayoutClassNames ? '' : layoutClassNames
|
|
303
|
-
{
|
|
304
|
-
'has-overlay': hasOverlay,
|
|
305
|
-
}
|
|
290
|
+
__unstableDisableLayoutClassNames ? '' : layoutClassNames
|
|
306
291
|
),
|
|
307
292
|
children: clientId ? (
|
|
308
293
|
<InnerBlocks { ...innerBlocksProps } clientId={ clientId } />
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { useLayoutEffect,
|
|
4
|
+
import { useLayoutEffect, useState } from '@wordpress/element';
|
|
5
5
|
import { useRegistry } from '@wordpress/data';
|
|
6
6
|
import deprecated from '@wordpress/deprecated';
|
|
7
7
|
import isShallowEqual from '@wordpress/is-shallow-equal';
|
|
@@ -16,12 +16,21 @@ import { getLayoutType } from '../../layouts';
|
|
|
16
16
|
|
|
17
17
|
const pendingSettingsUpdates = new WeakMap();
|
|
18
18
|
|
|
19
|
+
// Creates a memoizing caching function that remembers the last value and keeps returning it
|
|
20
|
+
// as long as the new values are shallowly equal. Helps keep dependencies stable.
|
|
21
|
+
function createShallowMemo() {
|
|
22
|
+
let value;
|
|
23
|
+
return ( newValue ) => {
|
|
24
|
+
if ( value === undefined || ! isShallowEqual( value, newValue ) ) {
|
|
25
|
+
value = newValue;
|
|
26
|
+
}
|
|
27
|
+
return value;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
19
31
|
function useShallowMemo( value ) {
|
|
20
|
-
const [
|
|
21
|
-
|
|
22
|
-
setPrevValue( value );
|
|
23
|
-
}
|
|
24
|
-
return prevValue;
|
|
32
|
+
const [ memo ] = useState( createShallowMemo );
|
|
33
|
+
return memo( value );
|
|
25
34
|
}
|
|
26
35
|
|
|
27
36
|
/**
|
|
@@ -77,10 +86,7 @@ export default function useNestedSettingsUpdate(
|
|
|
77
86
|
// otherwise if the arrays change length but the first elements are equal the comparison,
|
|
78
87
|
// does not works as expected.
|
|
79
88
|
const _allowedBlocks = useShallowMemo( allowedBlocks );
|
|
80
|
-
|
|
81
|
-
const _prioritizedInserterBlocks = useMemo(
|
|
82
|
-
() => prioritizedInserterBlocks,
|
|
83
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
89
|
+
const _prioritizedInserterBlocks = useShallowMemo(
|
|
84
90
|
prioritizedInserterBlocks
|
|
85
91
|
);
|
|
86
92
|
|
|
@@ -40,7 +40,7 @@ function PatternsExplorerSearch( { searchValue, setSearchValue } ) {
|
|
|
40
40
|
__nextHasNoMarginBottom
|
|
41
41
|
onChange={ setSearchValue }
|
|
42
42
|
value={ searchValue }
|
|
43
|
-
label={ __( 'Search
|
|
43
|
+
label={ __( 'Search' ) }
|
|
44
44
|
placeholder={ __( 'Search' ) }
|
|
45
45
|
/>
|
|
46
46
|
</div>
|
|
@@ -186,7 +186,7 @@ export function BlockTypesTab(
|
|
|
186
186
|
continue;
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
-
if ( rootClientId && item.
|
|
189
|
+
if ( rootClientId && item.isAllowedInCurrentRoot ) {
|
|
190
190
|
itemsForCurrentRoot.push( item );
|
|
191
191
|
} else {
|
|
192
192
|
itemsRemaining.push( item );
|
|
@@ -2,14 +2,10 @@
|
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { usePrevious, useReducedMotion } from '@wordpress/compose';
|
|
5
|
-
import { isRTL } from '@wordpress/i18n';
|
|
6
5
|
import {
|
|
7
|
-
__experimentalHStack as HStack,
|
|
8
|
-
FlexBlock,
|
|
9
6
|
privateApis as componentsPrivateApis,
|
|
10
7
|
__unstableMotion as motion,
|
|
11
8
|
} from '@wordpress/components';
|
|
12
|
-
import { Icon, chevronRight, chevronLeft } from '@wordpress/icons';
|
|
13
9
|
|
|
14
10
|
/**
|
|
15
11
|
* Internal dependencies
|
|
@@ -55,18 +51,12 @@ function CategoryTabs( {
|
|
|
55
51
|
<Tabs.Tab
|
|
56
52
|
key={ category.name }
|
|
57
53
|
tabId={ category.name }
|
|
58
|
-
className="block-editor-inserter__category-tab"
|
|
59
54
|
aria-label={ category.label }
|
|
60
55
|
aria-current={
|
|
61
56
|
category === selectedCategory ? 'true' : undefined
|
|
62
57
|
}
|
|
63
58
|
>
|
|
64
|
-
|
|
65
|
-
<FlexBlock>{ category.label }</FlexBlock>
|
|
66
|
-
<Icon
|
|
67
|
-
icon={ isRTL() ? chevronLeft : chevronRight }
|
|
68
|
-
/>
|
|
69
|
-
</HStack>
|
|
59
|
+
{ category.label }
|
|
70
60
|
</Tabs.Tab>
|
|
71
61
|
) ) }
|
|
72
62
|
</Tabs.TabList>
|
|
@@ -2,19 +2,23 @@
|
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
4
|
import {
|
|
5
|
+
getBlockType,
|
|
5
6
|
createBlock,
|
|
6
7
|
createBlocksFromInnerBlocksTemplate,
|
|
7
8
|
store as blocksStore,
|
|
8
9
|
parse,
|
|
9
10
|
} from '@wordpress/blocks';
|
|
10
|
-
import { useSelect } from '@wordpress/data';
|
|
11
|
+
import { useSelect, useDispatch } from '@wordpress/data';
|
|
11
12
|
import { useCallback, useMemo } from '@wordpress/element';
|
|
13
|
+
import { store as noticesStore } from '@wordpress/notices';
|
|
14
|
+
import { __, sprintf } from '@wordpress/i18n';
|
|
12
15
|
|
|
13
16
|
/**
|
|
14
17
|
* Internal dependencies
|
|
15
18
|
*/
|
|
16
19
|
import { store as blockEditorStore } from '../../../store';
|
|
17
|
-
import {
|
|
20
|
+
import { isFiltered } from '../../../store/utils';
|
|
21
|
+
import { unlock } from '../../../lock-unlock';
|
|
18
22
|
|
|
19
23
|
/**
|
|
20
24
|
* Retrieves the block types inserter state.
|
|
@@ -26,7 +30,7 @@ import { withRootClientIdOptionKey } from '../../../store/utils';
|
|
|
26
30
|
*/
|
|
27
31
|
const useBlockTypesState = ( rootClientId, onInsert, isQuick ) => {
|
|
28
32
|
const options = useMemo(
|
|
29
|
-
() => ( { [
|
|
33
|
+
() => ( { [ isFiltered ]: !! isQuick } ),
|
|
30
34
|
[ isQuick ]
|
|
31
35
|
);
|
|
32
36
|
const [ items ] = useSelect(
|
|
@@ -38,6 +42,10 @@ const useBlockTypesState = ( rootClientId, onInsert, isQuick ) => {
|
|
|
38
42
|
],
|
|
39
43
|
[ rootClientId, options ]
|
|
40
44
|
);
|
|
45
|
+
const { getClosestAllowedInsertionPoint } = unlock(
|
|
46
|
+
useSelect( blockEditorStore )
|
|
47
|
+
);
|
|
48
|
+
const { createErrorNotice } = useDispatch( noticesStore );
|
|
41
49
|
|
|
42
50
|
const [ categories, collections ] = useSelect( ( select ) => {
|
|
43
51
|
const { getCategories, getCollections } = select( blocksStore );
|
|
@@ -46,16 +54,29 @@ const useBlockTypesState = ( rootClientId, onInsert, isQuick ) => {
|
|
|
46
54
|
|
|
47
55
|
const onSelectItem = useCallback(
|
|
48
56
|
(
|
|
49
|
-
{
|
|
50
|
-
name,
|
|
51
|
-
initialAttributes,
|
|
52
|
-
innerBlocks,
|
|
53
|
-
syncStatus,
|
|
54
|
-
content,
|
|
55
|
-
rootClientId: _rootClientId,
|
|
56
|
-
},
|
|
57
|
+
{ name, initialAttributes, innerBlocks, syncStatus, content },
|
|
57
58
|
shouldFocusBlock
|
|
58
59
|
) => {
|
|
60
|
+
const destinationClientId = getClosestAllowedInsertionPoint(
|
|
61
|
+
name,
|
|
62
|
+
rootClientId
|
|
63
|
+
);
|
|
64
|
+
if ( destinationClientId === null ) {
|
|
65
|
+
const title = getBlockType( name )?.title ?? name;
|
|
66
|
+
createErrorNotice(
|
|
67
|
+
sprintf(
|
|
68
|
+
/* translators: %s: block pattern title. */
|
|
69
|
+
__( 'Block "%s" can\'t be inserted.' ),
|
|
70
|
+
title
|
|
71
|
+
),
|
|
72
|
+
{
|
|
73
|
+
type: 'snackbar',
|
|
74
|
+
id: 'inserter-notice',
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
|
|
59
80
|
const insertedBlock =
|
|
60
81
|
syncStatus === 'unsynced'
|
|
61
82
|
? parse( content, {
|
|
@@ -66,15 +87,14 @@ const useBlockTypesState = ( rootClientId, onInsert, isQuick ) => {
|
|
|
66
87
|
initialAttributes,
|
|
67
88
|
createBlocksFromInnerBlocksTemplate( innerBlocks )
|
|
68
89
|
);
|
|
69
|
-
|
|
70
90
|
onInsert(
|
|
71
91
|
insertedBlock,
|
|
72
92
|
undefined,
|
|
73
93
|
shouldFocusBlock,
|
|
74
|
-
|
|
94
|
+
destinationClientId
|
|
75
95
|
);
|
|
76
96
|
},
|
|
77
|
-
[ onInsert ]
|
|
97
|
+
[ onInsert, getClosestAllowedInsertionPoint, rootClientId ]
|
|
78
98
|
);
|
|
79
99
|
|
|
80
100
|
return [ items, categories, collections, onSelectItem ];
|
|
@@ -71,7 +71,11 @@ function useInsertionPoint( {
|
|
|
71
71
|
selectBlockOnInsert = true,
|
|
72
72
|
} ) {
|
|
73
73
|
const registry = useRegistry();
|
|
74
|
-
const {
|
|
74
|
+
const {
|
|
75
|
+
getSelectedBlock,
|
|
76
|
+
getClosestAllowedInsertionPoint,
|
|
77
|
+
isBlockInsertionPointVisible,
|
|
78
|
+
} = unlock( useSelect( blockEditorStore ) );
|
|
75
79
|
const { destinationRootClientId, destinationIndex } = useSelect(
|
|
76
80
|
( select ) => {
|
|
77
81
|
const {
|
|
@@ -79,15 +83,24 @@ function useInsertionPoint( {
|
|
|
79
83
|
getBlockRootClientId,
|
|
80
84
|
getBlockIndex,
|
|
81
85
|
getBlockOrder,
|
|
82
|
-
|
|
86
|
+
getInsertionPoint,
|
|
87
|
+
} = unlock( select( blockEditorStore ) );
|
|
83
88
|
const selectedBlockClientId = getSelectedBlockClientId();
|
|
84
|
-
|
|
85
89
|
let _destinationRootClientId = rootClientId;
|
|
86
90
|
let _destinationIndex;
|
|
91
|
+
const insertionPoint = getInsertionPoint();
|
|
87
92
|
|
|
88
93
|
if ( insertionIndex !== undefined ) {
|
|
89
94
|
// Insert into a specific index.
|
|
90
95
|
_destinationIndex = insertionIndex;
|
|
96
|
+
} else if (
|
|
97
|
+
insertionPoint &&
|
|
98
|
+
insertionPoint.hasOwnProperty( 'index' )
|
|
99
|
+
) {
|
|
100
|
+
_destinationRootClientId = insertionPoint?.rootClientId
|
|
101
|
+
? insertionPoint.rootClientId
|
|
102
|
+
: rootClientId;
|
|
103
|
+
_destinationIndex = insertionPoint.index;
|
|
91
104
|
} else if ( clientId ) {
|
|
92
105
|
// Insert after a specific client ID.
|
|
93
106
|
_destinationIndex = getBlockIndex( clientId );
|
|
@@ -193,21 +206,30 @@ function useInsertionPoint( {
|
|
|
193
206
|
|
|
194
207
|
const onToggleInsertionPoint = useCallback(
|
|
195
208
|
( item ) => {
|
|
196
|
-
if ( item
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
destinationRootClientId
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
209
|
+
if ( item && ! isBlockInsertionPointVisible() ) {
|
|
210
|
+
const allowedDestinationRootClientId =
|
|
211
|
+
getClosestAllowedInsertionPoint(
|
|
212
|
+
item.name,
|
|
213
|
+
destinationRootClientId
|
|
214
|
+
);
|
|
215
|
+
if ( allowedDestinationRootClientId !== null ) {
|
|
216
|
+
showInsertionPoint(
|
|
217
|
+
allowedDestinationRootClientId,
|
|
218
|
+
getIndex( {
|
|
219
|
+
destinationRootClientId,
|
|
220
|
+
destinationIndex,
|
|
221
|
+
rootClientId: allowedDestinationRootClientId,
|
|
222
|
+
registry,
|
|
223
|
+
} )
|
|
224
|
+
);
|
|
225
|
+
}
|
|
206
226
|
} else {
|
|
207
227
|
hideInsertionPoint();
|
|
208
228
|
}
|
|
209
229
|
},
|
|
210
230
|
[
|
|
231
|
+
getClosestAllowedInsertionPoint,
|
|
232
|
+
isBlockInsertionPointVisible,
|
|
211
233
|
showInsertionPoint,
|
|
212
234
|
hideInsertionPoint,
|
|
213
235
|
destinationRootClientId,
|
|
@@ -11,33 +11,52 @@ import { store as noticesStore } from '@wordpress/notices';
|
|
|
11
11
|
* Internal dependencies
|
|
12
12
|
*/
|
|
13
13
|
import { store as blockEditorStore } from '../../../store';
|
|
14
|
+
import { unlock } from '../../../lock-unlock';
|
|
14
15
|
import { INSERTER_PATTERN_TYPES } from '../block-patterns-tab/utils';
|
|
16
|
+
import { isFiltered } from '../../../store/utils';
|
|
15
17
|
|
|
16
18
|
/**
|
|
17
19
|
* Retrieves the block patterns inserter state.
|
|
18
20
|
*
|
|
19
21
|
* @param {Function} onInsert function called when inserter a list of blocks.
|
|
20
22
|
* @param {string=} rootClientId Insertion's root client ID.
|
|
21
|
-
*
|
|
22
23
|
* @param {string} selectedCategory The selected pattern category.
|
|
24
|
+
* @param {boolean} isQuick For the quick inserter render only allowed patterns.
|
|
25
|
+
*
|
|
23
26
|
* @return {Array} Returns the patterns state. (patterns, categories, onSelect handler)
|
|
24
27
|
*/
|
|
25
|
-
const usePatternsState = (
|
|
28
|
+
const usePatternsState = (
|
|
29
|
+
onInsert,
|
|
30
|
+
rootClientId,
|
|
31
|
+
selectedCategory,
|
|
32
|
+
isQuick
|
|
33
|
+
) => {
|
|
34
|
+
const options = useMemo(
|
|
35
|
+
() => ( { [ isFiltered ]: !! isQuick } ),
|
|
36
|
+
[ isQuick ]
|
|
37
|
+
);
|
|
26
38
|
const { patternCategories, patterns, userPatternCategories } = useSelect(
|
|
27
39
|
( select ) => {
|
|
28
|
-
const {
|
|
29
|
-
select( blockEditorStore )
|
|
40
|
+
const { getSettings, __experimentalGetAllowedPatterns } = unlock(
|
|
41
|
+
select( blockEditorStore )
|
|
42
|
+
);
|
|
30
43
|
const {
|
|
31
44
|
__experimentalUserPatternCategories,
|
|
32
45
|
__experimentalBlockPatternCategories,
|
|
33
46
|
} = getSettings();
|
|
34
47
|
return {
|
|
35
|
-
patterns: __experimentalGetAllowedPatterns(
|
|
48
|
+
patterns: __experimentalGetAllowedPatterns(
|
|
49
|
+
rootClientId,
|
|
50
|
+
options
|
|
51
|
+
),
|
|
36
52
|
userPatternCategories: __experimentalUserPatternCategories,
|
|
37
53
|
patternCategories: __experimentalBlockPatternCategories,
|
|
38
54
|
};
|
|
39
55
|
},
|
|
40
|
-
[ rootClientId ]
|
|
56
|
+
[ rootClientId, options ]
|
|
57
|
+
);
|
|
58
|
+
const { getClosestAllowedInsertionPointForPattern } = unlock(
|
|
59
|
+
useSelect( blockEditorStore )
|
|
41
60
|
);
|
|
42
61
|
|
|
43
62
|
const allCategories = useMemo( () => {
|
|
@@ -58,6 +77,15 @@ const usePatternsState = ( onInsert, rootClientId, selectedCategory ) => {
|
|
|
58
77
|
const { createSuccessNotice } = useDispatch( noticesStore );
|
|
59
78
|
const onClickPattern = useCallback(
|
|
60
79
|
( pattern, blocks ) => {
|
|
80
|
+
const destinationRootClientId = isQuick
|
|
81
|
+
? rootClientId
|
|
82
|
+
: getClosestAllowedInsertionPointForPattern(
|
|
83
|
+
pattern,
|
|
84
|
+
rootClientId
|
|
85
|
+
);
|
|
86
|
+
if ( destinationRootClientId === null ) {
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
61
89
|
const patternBlocks =
|
|
62
90
|
pattern.type === INSERTER_PATTERN_TYPES.user &&
|
|
63
91
|
pattern.syncStatus !== 'unsynced'
|
|
@@ -77,7 +105,9 @@ const usePatternsState = ( onInsert, rootClientId, selectedCategory ) => {
|
|
|
77
105
|
}
|
|
78
106
|
return clonedBlock;
|
|
79
107
|
} ),
|
|
80
|
-
pattern.name
|
|
108
|
+
pattern.name,
|
|
109
|
+
false,
|
|
110
|
+
destinationRootClientId
|
|
81
111
|
);
|
|
82
112
|
createSuccessNotice(
|
|
83
113
|
sprintf(
|
|
@@ -87,11 +117,18 @@ const usePatternsState = ( onInsert, rootClientId, selectedCategory ) => {
|
|
|
87
117
|
),
|
|
88
118
|
{
|
|
89
119
|
type: 'snackbar',
|
|
90
|
-
id: '
|
|
120
|
+
id: 'inserter-notice',
|
|
91
121
|
}
|
|
92
122
|
);
|
|
93
123
|
},
|
|
94
|
-
[
|
|
124
|
+
[
|
|
125
|
+
createSuccessNotice,
|
|
126
|
+
onInsert,
|
|
127
|
+
selectedCategory,
|
|
128
|
+
rootClientId,
|
|
129
|
+
getClosestAllowedInsertionPointForPattern,
|
|
130
|
+
isQuick,
|
|
131
|
+
]
|
|
95
132
|
);
|
|
96
133
|
|
|
97
134
|
return [ patterns, allCategories, onClickPattern ];
|