@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["View","dragHandle","usePreferredColorSchemeStyle","BlockIcon","styles","jsx","_jsx","jsxs","_jsxs","shadowStyle","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation","BlockDraggableChip","icon","containerStyle","style","testID","children"],"sources":["@wordpress/block-editor/src/components/block-draggable/draggable-chip.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { View } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { dragHandle } from '@wordpress/icons';\nimport { usePreferredColorSchemeStyle } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BlockIcon from '../block-icon';\nimport styles from './style.scss';\n\nconst shadowStyle = {\n\tshadowColor: '#000',\n\tshadowOffset: {\n\t\twidth: 0,\n\t\theight: 2,\n\t},\n\tshadowOpacity: 0.25,\n\tshadowRadius: 3.84,\n\n\televation: 5,\n};\n\n/**\n * Block draggable chip component\n *\n * @param {Object} props Component props.\n * @param {Object} [props.icon] Block icon.\n * @return {JSX.Element} Chip component.\n */\nexport default function BlockDraggableChip( { icon } ) {\n\tconst containerStyle = usePreferredColorSchemeStyle(\n\t\tstyles[ 'draggable-chip__container' ],\n\t\tstyles[ 'draggable-chip__container--dark' ]\n\t);\n\n\treturn (\n\t\t<View style={ [ containerStyle, shadowStyle ] } testID=\"draggable-chip\">\n\t\t\t<BlockIcon icon={ dragHandle } />\n\t\t\t{ icon && <BlockIcon icon={ icon } /> }\n\t\t</View>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,IAAI,QAAQ,cAAc;;AAEnC;AACA;AACA;AACA,SAASC,UAAU,QAAQ,kBAAkB;AAC7C,SAASC,4BAA4B,QAAQ,oBAAoB;;AAEjE;AACA;AACA;AACA,OAAOC,SAAS,MAAM,eAAe;AACrC,OAAOC,MAAM,MAAM,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA
|
|
1
|
+
{"version":3,"names":["View","dragHandle","usePreferredColorSchemeStyle","BlockIcon","styles","jsx","_jsx","jsxs","_jsxs","shadowStyle","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation","BlockDraggableChip","icon","containerStyle","style","testID","children"],"sources":["@wordpress/block-editor/src/components/block-draggable/draggable-chip.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { View } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { dragHandle } from '@wordpress/icons';\nimport { usePreferredColorSchemeStyle } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BlockIcon from '../block-icon';\nimport styles from './style.scss';\n\nconst shadowStyle = {\n\tshadowColor: '#000',\n\tshadowOffset: {\n\t\twidth: 0,\n\t\theight: 2,\n\t},\n\tshadowOpacity: 0.25,\n\tshadowRadius: 3.84,\n\n\televation: 5,\n};\n\n/**\n * Block draggable chip component\n *\n * @param {Object} props Component props.\n * @param {Object} [props.icon] Block icon.\n * @return {JSX.Element} Chip component.\n */\nexport default function BlockDraggableChip( { icon } ) {\n\tconst containerStyle = usePreferredColorSchemeStyle(\n\t\tstyles[ 'draggable-chip__container' ],\n\t\tstyles[ 'draggable-chip__container--dark' ]\n\t);\n\n\treturn (\n\t\t<View style={ [ containerStyle, shadowStyle ] } testID=\"draggable-chip\">\n\t\t\t<BlockIcon icon={ dragHandle } />\n\t\t\t{ icon && <BlockIcon icon={ icon } /> }\n\t\t</View>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,IAAI,QAAQ,cAAc;;AAEnC;AACA;AACA;AACA,SAASC,UAAU,QAAQ,kBAAkB;AAC7C,SAASC,4BAA4B,QAAQ,oBAAoB;;AAEjE;AACA;AACA;AACA,OAAOC,SAAS,MAAM,eAAe;AACrC,OAAOC,MAAM,MAAM,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAElC,MAAMC,WAAW,GAAG;EACnBC,WAAW,EAAE,MAAM;EACnBC,YAAY,EAAE;IACbC,KAAK,EAAE,CAAC;IACRC,MAAM,EAAE;EACT,CAAC;EACDC,aAAa,EAAE,IAAI;EACnBC,YAAY,EAAE,IAAI;EAElBC,SAAS,EAAE;AACZ,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,kBAAkBA,CAAE;EAAEC;AAAK,CAAC,EAAG;EACtD,MAAMC,cAAc,GAAGjB,4BAA4B,CAClDE,MAAM,CAAE,2BAA2B,CAAE,EACrCA,MAAM,CAAE,iCAAiC,CAC1C,CAAC;EAED,oBACCI,KAAA,CAACR,IAAI;IAACoB,KAAK,EAAG,CAAED,cAAc,EAAEV,WAAW,CAAI;IAACY,MAAM,EAAC,gBAAgB;IAAAC,QAAA,gBACtEhB,IAAA,CAACH,SAAS;MAACe,IAAI,EAAGjB;IAAY,CAAE,CAAC,EAC/BiB,IAAI,iBAAIZ,IAAA,CAACH,SAAS;MAACe,IAAI,EAAGA;IAAM,CAAE,CAAC;EAAA,CAChC,CAAC;AAET","ignoreList":[]}
|
|
@@ -24,9 +24,7 @@ import { store as blockEditorStore } from '../../store';
|
|
|
24
24
|
import DroppingInsertionPoint from './dropping-insertion-point';
|
|
25
25
|
import useBlockDropZone from '../use-block-drop-zone';
|
|
26
26
|
import styles from './style.scss';
|
|
27
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
28
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
29
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
27
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
30
28
|
const CHIP_OFFSET_TO_TOUCH_POSITION = 32;
|
|
31
29
|
const BLOCK_OPACITY_ANIMATION_CONFIG = {
|
|
32
30
|
duration: 350
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["AccessibilityInfo","useSafeAreaInsets","useSafeAreaFrame","Animated","runOnJS","runOnUI","useAnimatedStyle","useSharedValue","withDelay","withTiming","ZoomInEasyDown","Draggable","DraggableTrigger","select","useSelect","useDispatch","useCallback","useEffect","useRef","useState","Platform","getBlockType","generateHapticFeedback","RCTAztecView","useScrollWhenDragging","DraggableChip","store","blockEditorStore","DroppingInsertionPoint","useBlockDropZone","styles","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","CHIP_OFFSET_TO_TOUCH_POSITION","BLOCK_OPACITY_ANIMATION_CONFIG","duration","BLOCK_OPACITY_ANIMATION_DELAY","DEFAULT_LONG_PRESS_MIN_DURATION","DEFAULT_IOS_LONG_PRESS_MIN_DURATION","BlockDraggableWrapper","children","isRTL","draggedBlockIcon","setDraggedBlockIcon","selectBlock","startDraggingBlocks","stopDraggingBlocks","left","right","width","safeAreaOffset","contentWidth","scroll","offsetY","chip","x","y","height","currentYPosition","isDragging","startScrolling","scrollOnDragOver","stopScrolling","draggingScrollHandler","scrollHandler","event","contentOffset","value","onBlockDragOverWorklet","onBlockDragEnd","onBlockDrop","targetBlockIndex","setDraggedBlockIconByClientId","clientId","blockName","getBlockName","blockIcon","icon","onStartDragging","position","stopDragging","onStopDragging","srcRootClientId","srcClientIds","type","undefined","onChipLayout","nativeEvent","layout","startDragging","id","dragPosition","updateDragging","chipDynamicStyles","chipOffset","translateX","transform","translateY","chipStyles","exitingAnimation","currentHeight","currentWidth","animations","scale","initialValues","onDragStart","onDragOver","onDragEnd","testID","onScroll","View","onLayout","style","pointerEvents","entering","exiting","useIsScreenReaderEnabled","isScreenReaderEnabled","setIsScreenReaderEnabled","mounted","changeListener","addEventListener","enabled","then","screenReaderEnabled","remove","useIsEditingText","isEditingText","setIsEditingText","InputState","isFocused","onFocusChangeAztec","addFocusChangeListener","removeFocusChangeListener","BlockDraggable","draggingClientId","wasBeingDragged","draggingAnimation","opacity","startDraggingBlock","stopDraggingBlock","isDraggable","isBeingDragged","isBlockSelected","_select","getBlockRootClientId","getTemplateLock","isBlockBeingDragged","getSelectedBlockClientId","rootClientId","templateLock","selectedBlockClientId","current","onLongPressDraggable","blurCurrentFocusedElement","animatedWrapperStyles","wrapperStyles","canDragBlock","minDuration","ios","android","onLongPress"],"sources":["@wordpress/block-editor/src/components/block-draggable/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { AccessibilityInfo } from 'react-native';\nimport {\n\tuseSafeAreaInsets,\n\tuseSafeAreaFrame,\n} from 'react-native-safe-area-context';\nimport Animated, {\n\trunOnJS,\n\trunOnUI,\n\tuseAnimatedStyle,\n\tuseSharedValue,\n\twithDelay,\n\twithTiming,\n\tZoomInEasyDown,\n} from 'react-native-reanimated';\n\n/**\n * WordPress dependencies\n */\nimport { Draggable, DraggableTrigger } from '@wordpress/components';\nimport { select, useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tuseCallback,\n\tuseEffect,\n\tuseRef,\n\tuseState,\n\tPlatform,\n} from '@wordpress/element';\nimport { getBlockType } from '@wordpress/blocks';\nimport { generateHapticFeedback } from '@wordpress/react-native-bridge';\nimport RCTAztecView from '@wordpress/react-native-aztec';\n\n/**\n * Internal dependencies\n */\nimport useScrollWhenDragging from './use-scroll-when-dragging';\nimport DraggableChip from './draggable-chip';\nimport { store as blockEditorStore } from '../../store';\nimport DroppingInsertionPoint from './dropping-insertion-point';\nimport useBlockDropZone from '../use-block-drop-zone';\nimport styles from './style.scss';\n\nconst CHIP_OFFSET_TO_TOUCH_POSITION = 32;\nconst BLOCK_OPACITY_ANIMATION_CONFIG = { duration: 350 };\nconst BLOCK_OPACITY_ANIMATION_DELAY = 250;\nconst DEFAULT_LONG_PRESS_MIN_DURATION = 500;\nconst DEFAULT_IOS_LONG_PRESS_MIN_DURATION =\n\tDEFAULT_LONG_PRESS_MIN_DURATION - 50;\n\n/**\n * Block draggable wrapper component\n *\n * This component handles all the interactions for dragging blocks.\n * It relies on the block list and its context for dragging, hence it\n * should be rendered between the `BlockListProvider` component and the\n * block list rendering. It also requires listening to scroll events,\n * therefore for this purpose, it returns the `onScroll` event handler\n * that should be attached to the list that renders the blocks.\n *\n *\n * @param {Object} props Component props.\n * @param {JSX.Element} props.children Children to be rendered.\n * @param {boolean} props.isRTL Check if current locale is RTL.\n *\n * @return {Function} Render function that passes `onScroll` event handler.\n */\nconst BlockDraggableWrapper = ( { children, isRTL } ) => {\n\tconst [ draggedBlockIcon, setDraggedBlockIcon ] = useState();\n\n\tconst { selectBlock, startDraggingBlocks, stopDraggingBlocks } =\n\t\tuseDispatch( blockEditorStore );\n\n\tconst { left, right } = useSafeAreaInsets();\n\tconst { width } = useSafeAreaFrame();\n\tconst safeAreaOffset = left + right;\n\tconst contentWidth = width - safeAreaOffset;\n\n\tconst scroll = {\n\t\toffsetY: useSharedValue( 0 ),\n\t};\n\tconst chip = {\n\t\tx: useSharedValue( 0 ),\n\t\ty: useSharedValue( 0 ),\n\t\twidth: useSharedValue( 0 ),\n\t\theight: useSharedValue( 0 ),\n\t};\n\tconst currentYPosition = useSharedValue( 0 );\n\tconst isDragging = useSharedValue( false );\n\n\tconst [\n\t\tstartScrolling,\n\t\tscrollOnDragOver,\n\t\tstopScrolling,\n\t\tdraggingScrollHandler,\n\t] = useScrollWhenDragging();\n\n\tconst scrollHandler = ( event ) => {\n\t\t'worklet';\n\t\tconst { contentOffset } = event;\n\t\tscroll.offsetY.value = contentOffset.y;\n\n\t\tdraggingScrollHandler( event );\n\t};\n\n\tconst {\n\t\tonBlockDragOverWorklet,\n\t\tonBlockDragEnd,\n\t\tonBlockDrop,\n\t\ttargetBlockIndex,\n\t} = useBlockDropZone();\n\n\t// Stop dragging blocks if the block draggable is unmounted.\n\tuseEffect( () => {\n\t\treturn () => {\n\t\t\tif ( isDragging.value ) {\n\t\t\t\tstopDraggingBlocks();\n\t\t\t}\n\t\t};\n\t}, [] );\n\n\tconst setDraggedBlockIconByClientId = ( clientId ) => {\n\t\tconst blockName = select( blockEditorStore ).getBlockName( clientId );\n\t\tconst blockIcon = getBlockType( blockName )?.icon;\n\t\tif ( blockIcon ) {\n\t\t\tsetDraggedBlockIcon( blockIcon );\n\t\t}\n\t};\n\n\tconst onStartDragging = ( { clientId, position } ) => {\n\t\tif ( clientId ) {\n\t\t\tstartDraggingBlocks( [ clientId ] );\n\t\t\tsetDraggedBlockIconByClientId( clientId );\n\t\t\trunOnUI( startScrolling )( position.y );\n\t\t\tgenerateHapticFeedback();\n\t\t} else {\n\t\t\t// We stop dragging if no block is found.\n\t\t\trunOnUI( stopDragging )();\n\t\t}\n\t};\n\n\tconst onStopDragging = ( { clientId } ) => {\n\t\tif ( clientId ) {\n\t\t\tonBlockDrop( {\n\t\t\t\t// Dropping is only allowed at root level\n\t\t\t\tsrcRootClientId: '',\n\t\t\t\tsrcClientIds: [ clientId ],\n\t\t\t\ttype: 'block',\n\t\t\t} );\n\t\t\tselectBlock( clientId );\n\t\t\tsetDraggedBlockIcon( undefined );\n\t\t}\n\t\tonBlockDragEnd();\n\t\tstopDraggingBlocks();\n\t};\n\n\tconst onChipLayout = ( { nativeEvent: { layout } } ) => {\n\t\tif ( layout.width > 0 ) {\n\t\t\tchip.width.value = layout.width;\n\t\t}\n\t\tif ( layout.height > 0 ) {\n\t\t\tchip.height.value = layout.height;\n\t\t}\n\t};\n\n\tconst startDragging = ( { x, y, id } ) => {\n\t\t'worklet';\n\t\tconst dragPosition = { x, y };\n\t\tchip.x.value = dragPosition.x;\n\t\tchip.y.value = dragPosition.y;\n\t\tcurrentYPosition.value = dragPosition.y;\n\n\t\tisDragging.value = true;\n\n\t\trunOnJS( onStartDragging )( { clientId: id, position: dragPosition } );\n\t};\n\n\tconst updateDragging = ( { x, y } ) => {\n\t\t'worklet';\n\t\tconst dragPosition = { x, y };\n\t\tchip.x.value = dragPosition.x;\n\t\tchip.y.value = dragPosition.y;\n\t\tcurrentYPosition.value = dragPosition.y;\n\n\t\tonBlockDragOverWorklet( { x, y: y + scroll.offsetY.value } );\n\n\t\t// Update scrolling velocity\n\t\tscrollOnDragOver( dragPosition.y );\n\t};\n\n\tconst stopDragging = ( { id } ) => {\n\t\t'worklet';\n\t\tisDragging.value = false;\n\n\t\tstopScrolling();\n\t\trunOnJS( onStopDragging )( { clientId: id } );\n\t};\n\n\tconst chipDynamicStyles = useAnimatedStyle( () => {\n\t\tconst chipOffset = chip.width.value / 2;\n\t\tconst translateX = ! isRTL\n\t\t\t? chip.x.value - chipOffset\n\t\t\t: -( contentWidth - ( chip.x.value + chipOffset ) );\n\n\t\treturn {\n\t\t\ttransform: [\n\t\t\t\t{\n\t\t\t\t\ttranslateX,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttranslateY:\n\t\t\t\t\t\tchip.y.value -\n\t\t\t\t\t\tchip.height.value -\n\t\t\t\t\t\tCHIP_OFFSET_TO_TOUCH_POSITION,\n\t\t\t\t},\n\t\t\t],\n\t\t};\n\t} );\n\tconst chipStyles = [\n\t\tchipDynamicStyles,\n\t\tstyles[ 'draggable-chip__wrapper' ],\n\t];\n\n\tconst exitingAnimation = ( { currentHeight, currentWidth } ) => {\n\t\t'worklet';\n\t\tconst translateX = ! isRTL ? 0 : currentWidth * -1;\n\t\tconst duration = 150;\n\t\tconst animations = {\n\t\t\ttransform: [\n\t\t\t\t{\n\t\t\t\t\ttranslateY: withTiming( currentHeight, {\n\t\t\t\t\t\tduration,\n\t\t\t\t\t} ),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttranslateX: withTiming( translateX, {\n\t\t\t\t\t\tduration,\n\t\t\t\t\t} ),\n\t\t\t\t},\n\t\t\t\t{ scale: withTiming( 0, { duration } ) },\n\t\t\t],\n\t\t};\n\t\tconst initialValues = {\n\t\t\ttransform: [ { translateY: 0 }, { translateX }, { scale: 1 } ],\n\t\t};\n\t\treturn {\n\t\t\tinitialValues,\n\t\t\tanimations,\n\t\t};\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<DroppingInsertionPoint\n\t\t\t\tscroll={ scroll }\n\t\t\t\tcurrentYPosition={ currentYPosition }\n\t\t\t\tisDragging={ isDragging }\n\t\t\t\ttargetBlockIndex={ targetBlockIndex }\n\t\t\t/>\n\t\t\t<Draggable\n\t\t\t\tonDragStart={ startDragging }\n\t\t\t\tonDragOver={ updateDragging }\n\t\t\t\tonDragEnd={ stopDragging }\n\t\t\t\ttestID=\"block-draggable-wrapper\"\n\t\t\t>\n\t\t\t\t{ children( { onScroll: scrollHandler } ) }\n\t\t\t</Draggable>\n\t\t\t<Animated.View\n\t\t\t\tonLayout={ onChipLayout }\n\t\t\t\tstyle={ chipStyles }\n\t\t\t\tpointerEvents=\"none\"\n\t\t\t>\n\t\t\t\t{ draggedBlockIcon && (\n\t\t\t\t\t<Animated.View\n\t\t\t\t\t\tentering={ ZoomInEasyDown.duration( 200 ) }\n\t\t\t\t\t\texiting={ exitingAnimation }\n\t\t\t\t\t>\n\t\t\t\t\t\t<DraggableChip icon={ draggedBlockIcon } />\n\t\t\t\t\t</Animated.View>\n\t\t\t\t) }\n\t\t\t</Animated.View>\n\t\t</>\n\t);\n};\n\nfunction useIsScreenReaderEnabled() {\n\tconst [ isScreenReaderEnabled, setIsScreenReaderEnabled ] =\n\t\tuseState( false );\n\n\tuseEffect( () => {\n\t\tlet mounted = true;\n\n\t\tconst changeListener = AccessibilityInfo.addEventListener(\n\t\t\t'screenReaderChanged',\n\t\t\t( enabled ) => setIsScreenReaderEnabled( enabled )\n\t\t);\n\n\t\tAccessibilityInfo.isScreenReaderEnabled().then(\n\t\t\t( screenReaderEnabled ) => {\n\t\t\t\tif ( mounted && screenReaderEnabled ) {\n\t\t\t\t\tsetIsScreenReaderEnabled( screenReaderEnabled );\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\n\t\treturn () => {\n\t\t\tmounted = false;\n\n\t\t\tchangeListener.remove();\n\t\t};\n\t}, [] );\n\n\treturn isScreenReaderEnabled;\n}\n\nfunction useIsEditingText() {\n\tconst [ isEditingText, setIsEditingText ] = useState( () =>\n\t\tRCTAztecView.InputState.isFocused()\n\t);\n\n\tuseEffect( () => {\n\t\tconst onFocusChangeAztec = ( { isFocused } ) => {\n\t\t\tsetIsEditingText( isFocused );\n\t\t};\n\n\t\tRCTAztecView.InputState.addFocusChangeListener( onFocusChangeAztec );\n\n\t\treturn () => {\n\t\t\tRCTAztecView.InputState.removeFocusChangeListener(\n\t\t\t\tonFocusChangeAztec\n\t\t\t);\n\t\t};\n\t}, [] );\n\n\treturn isEditingText;\n}\n\n/**\n * Block draggable component\n *\n * This component serves for animating the block when it is being dragged.\n * Hence, it should be wrapped around the rendering of a block.\n *\n * @param {Object} props Component props.\n * @param {JSX.Element} props.children Children to be rendered.\n * @param {string} props.clientId Client id of the block.\n * @param {string} [props.draggingClientId] Client id to use for dragging. If not defined, the value from `clientId` will be used.\n * @param {boolean} [props.enabled] Enables the draggable trigger.\n * @param {string} [props.testID] Id used for querying the long-press gesture handler in tests.\n *\n * @return {Function} Render function which includes the parameter `isDraggable` to determine if the block can be dragged.\n */\nconst BlockDraggable = ( {\n\tclientId,\n\tchildren,\n\tdraggingClientId,\n\tenabled = true,\n\ttestID,\n} ) => {\n\tconst wasBeingDragged = useRef( false );\n\tconst isEditingText = useIsEditingText();\n\tconst isScreenReaderEnabled = useIsScreenReaderEnabled();\n\n\tconst draggingAnimation = {\n\t\topacity: useSharedValue( 1 ),\n\t};\n\n\tconst startDraggingBlock = () => {\n\t\tdraggingAnimation.opacity.value = withTiming(\n\t\t\t0.4,\n\t\t\tBLOCK_OPACITY_ANIMATION_CONFIG\n\t\t);\n\t};\n\n\tconst stopDraggingBlock = () => {\n\t\tdraggingAnimation.opacity.value = withDelay(\n\t\t\tBLOCK_OPACITY_ANIMATION_DELAY,\n\t\t\twithTiming( 1, BLOCK_OPACITY_ANIMATION_CONFIG )\n\t\t);\n\t};\n\n\tconst { isDraggable, isBeingDragged, isBlockSelected } = useSelect(\n\t\t( _select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockRootClientId,\n\t\t\t\tgetTemplateLock,\n\t\t\t\tisBlockBeingDragged,\n\t\t\t\tgetSelectedBlockClientId,\n\t\t\t} = _select( blockEditorStore );\n\t\t\tconst rootClientId = getBlockRootClientId( clientId );\n\t\t\tconst templateLock = rootClientId\n\t\t\t\t? getTemplateLock( rootClientId )\n\t\t\t\t: null;\n\t\t\tconst selectedBlockClientId = getSelectedBlockClientId();\n\n\t\t\treturn {\n\t\t\t\tisBeingDragged: isBlockBeingDragged( clientId ),\n\t\t\t\tisDraggable: 'all' !== templateLock,\n\t\t\t\tisBlockSelected:\n\t\t\t\t\tselectedBlockClientId && selectedBlockClientId === clientId,\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tuseEffect( () => {\n\t\tif ( isBeingDragged !== wasBeingDragged.current ) {\n\t\t\tif ( isBeingDragged ) {\n\t\t\t\tstartDraggingBlock();\n\t\t\t} else {\n\t\t\t\tstopDraggingBlock();\n\t\t\t}\n\t\t}\n\t\twasBeingDragged.current = isBeingDragged;\n\t}, [ isBeingDragged ] );\n\n\tconst onLongPressDraggable = useCallback( () => {\n\t\t// Ensure that no text input is focused when starting the dragging gesture in order to prevent conflicts with text editing.\n\t\tRCTAztecView.InputState.blurCurrentFocusedElement();\n\t}, [] );\n\n\tconst animatedWrapperStyles = useAnimatedStyle( () => {\n\t\treturn {\n\t\t\topacity: draggingAnimation.opacity.value,\n\t\t};\n\t} );\n\tconst wrapperStyles = [\n\t\tanimatedWrapperStyles,\n\t\tstyles[ 'draggable-wrapper__container' ],\n\t];\n\n\tconst canDragBlock =\n\t\tenabled &&\n\t\t! isScreenReaderEnabled &&\n\t\t( ! isBlockSelected || ! isEditingText );\n\n\tif ( ! isDraggable ) {\n\t\treturn children( { isDraggable: false } );\n\t}\n\n\treturn (\n\t\t<DraggableTrigger\n\t\t\tid={ draggingClientId || clientId }\n\t\t\tenabled={ enabled && canDragBlock }\n\t\t\tminDuration={ Platform.select( {\n\t\t\t\t// On iOS, using a lower min duration than the default\n\t\t\t\t// value prevents the long-press gesture from being\n\t\t\t\t// triggered in underneath elements. This is required to\n\t\t\t\t// prevent enabling text editing when dragging is available.\n\t\t\t\tios: canDragBlock\n\t\t\t\t\t? DEFAULT_IOS_LONG_PRESS_MIN_DURATION\n\t\t\t\t\t: DEFAULT_LONG_PRESS_MIN_DURATION,\n\t\t\t\tandroid: DEFAULT_LONG_PRESS_MIN_DURATION,\n\t\t\t} ) }\n\t\t\tonLongPress={ onLongPressDraggable }\n\t\t\ttestID={ testID }\n\t\t>\n\t\t\t<Animated.View style={ wrapperStyles }>\n\t\t\t\t{ children( { isDraggable: true } ) }\n\t\t\t</Animated.View>\n\t\t</DraggableTrigger>\n\t);\n};\n\nexport { BlockDraggableWrapper };\nexport default BlockDraggable;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,iBAAiB,QAAQ,cAAc;AAChD,SACCC,iBAAiB,EACjBC,gBAAgB,QACV,gCAAgC;AACvC,OAAOC,QAAQ,IACdC,OAAO,EACPC,OAAO,EACPC,gBAAgB,EAChBC,cAAc,EACdC,SAAS,EACTC,UAAU,EACVC,cAAc,QACR,yBAAyB;;AAEhC;AACA;AACA;AACA,SAASC,SAAS,EAAEC,gBAAgB,QAAQ,uBAAuB;AACnE,SAASC,MAAM,EAAEC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AAChE,SACCC,WAAW,EACXC,SAAS,EACTC,MAAM,EACNC,QAAQ,EACRC,QAAQ,QACF,oBAAoB;AAC3B,SAASC,YAAY,QAAQ,mBAAmB;AAChD,SAASC,sBAAsB,QAAQ,gCAAgC;AACvE,OAAOC,YAAY,MAAM,+BAA+B;;AAExD;AACA;AACA;AACA,OAAOC,qBAAqB,MAAM,4BAA4B;AAC9D,OAAOC,aAAa,MAAM,kBAAkB;AAC5C,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,OAAOC,sBAAsB,MAAM,4BAA4B;AAC/D,OAAOC,gBAAgB,MAAM,wBAAwB;AACrD,OAAOC,MAAM,MAAM,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAElC,MAAMC,6BAA6B,GAAG,EAAE;AACxC,MAAMC,8BAA8B,GAAG;EAAEC,QAAQ,EAAE;AAAI,CAAC;AACxD,MAAMC,6BAA6B,GAAG,GAAG;AACzC,MAAMC,+BAA+B,GAAG,GAAG;AAC3C,MAAMC,mCAAmC,GACxCD,+BAA+B,GAAG,EAAE;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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AAW,EAAGR,oBAAsB;IACpC7C,MAAM,EAAGA,MAAQ;IAAApE,QAAA,eAEjBZ,IAAA,CAAC7B,QAAQ,CAAC+G,IAAI;MAACE,KAAK,EAAG4C,aAAe;MAAApH,QAAA,EACnCA,QAAQ,CAAE;QAAEqG,WAAW,EAAE;MAAK,CAAE;IAAC,CACrB;EAAC,CACC,CAAC;AAErB,CAAC;AAED,SAAStG,qBAAqB;AAC9B,eAAe+F,cAAc","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["AccessibilityInfo","useSafeAreaInsets","useSafeAreaFrame","Animated","runOnJS","runOnUI","useAnimatedStyle","useSharedValue","withDelay","withTiming","ZoomInEasyDown","Draggable","DraggableTrigger","select","useSelect","useDispatch","useCallback","useEffect","useRef","useState","Platform","getBlockType","generateHapticFeedback","RCTAztecView","useScrollWhenDragging","DraggableChip","store","blockEditorStore","DroppingInsertionPoint","useBlockDropZone","styles","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","CHIP_OFFSET_TO_TOUCH_POSITION","BLOCK_OPACITY_ANIMATION_CONFIG","duration","BLOCK_OPACITY_ANIMATION_DELAY","DEFAULT_LONG_PRESS_MIN_DURATION","DEFAULT_IOS_LONG_PRESS_MIN_DURATION","BlockDraggableWrapper","children","isRTL","draggedBlockIcon","setDraggedBlockIcon","selectBlock","startDraggingBlocks","stopDraggingBlocks","left","right","width","safeAreaOffset","contentWidth","scroll","offsetY","chip","x","y","height","currentYPosition","isDragging","startScrolling","scrollOnDragOver","stopScrolling","draggingScrollHandler","scrollHandler","event","contentOffset","value","onBlockDragOverWorklet","onBlockDragEnd","onBlockDrop","targetBlockIndex","setDraggedBlockIconByClientId","clientId","blockName","getBlockName","blockIcon","icon","onStartDragging","position","stopDragging","onStopDragging","srcRootClientId","srcClientIds","type","undefined","onChipLayout","nativeEvent","layout","startDragging","id","dragPosition","updateDragging","chipDynamicStyles","chipOffset","translateX","transform","translateY","chipStyles","exitingAnimation","currentHeight","currentWidth","animations","scale","initialValues","onDragStart","onDragOver","onDragEnd","testID","onScroll","View","onLayout","style","pointerEvents","entering","exiting","useIsScreenReaderEnabled","isScreenReaderEnabled","setIsScreenReaderEnabled","mounted","changeListener","addEventListener","enabled","then","screenReaderEnabled","remove","useIsEditingText","isEditingText","setIsEditingText","InputState","isFocused","onFocusChangeAztec","addFocusChangeListener","removeFocusChangeListener","BlockDraggable","draggingClientId","wasBeingDragged","draggingAnimation","opacity","startDraggingBlock","stopDraggingBlock","isDraggable","isBeingDragged","isBlockSelected","_select","getBlockRootClientId","getTemplateLock","isBlockBeingDragged","getSelectedBlockClientId","rootClientId","templateLock","selectedBlockClientId","current","onLongPressDraggable","blurCurrentFocusedElement","animatedWrapperStyles","wrapperStyles","canDragBlock","minDuration","ios","android","onLongPress"],"sources":["@wordpress/block-editor/src/components/block-draggable/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { AccessibilityInfo } from 'react-native';\nimport {\n\tuseSafeAreaInsets,\n\tuseSafeAreaFrame,\n} from 'react-native-safe-area-context';\nimport Animated, {\n\trunOnJS,\n\trunOnUI,\n\tuseAnimatedStyle,\n\tuseSharedValue,\n\twithDelay,\n\twithTiming,\n\tZoomInEasyDown,\n} from 'react-native-reanimated';\n\n/**\n * WordPress dependencies\n */\nimport { Draggable, DraggableTrigger } from '@wordpress/components';\nimport { select, useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tuseCallback,\n\tuseEffect,\n\tuseRef,\n\tuseState,\n\tPlatform,\n} from '@wordpress/element';\nimport { getBlockType } from '@wordpress/blocks';\nimport { generateHapticFeedback } from '@wordpress/react-native-bridge';\nimport RCTAztecView from '@wordpress/react-native-aztec';\n\n/**\n * Internal dependencies\n */\nimport useScrollWhenDragging from './use-scroll-when-dragging';\nimport DraggableChip from './draggable-chip';\nimport { store as blockEditorStore } from '../../store';\nimport DroppingInsertionPoint from './dropping-insertion-point';\nimport useBlockDropZone from '../use-block-drop-zone';\nimport styles from './style.scss';\n\nconst CHIP_OFFSET_TO_TOUCH_POSITION = 32;\nconst BLOCK_OPACITY_ANIMATION_CONFIG = { duration: 350 };\nconst BLOCK_OPACITY_ANIMATION_DELAY = 250;\nconst DEFAULT_LONG_PRESS_MIN_DURATION = 500;\nconst DEFAULT_IOS_LONG_PRESS_MIN_DURATION =\n\tDEFAULT_LONG_PRESS_MIN_DURATION - 50;\n\n/**\n * Block draggable wrapper component\n *\n * This component handles all the interactions for dragging blocks.\n * It relies on the block list and its context for dragging, hence it\n * should be rendered between the `BlockListProvider` component and the\n * block list rendering. It also requires listening to scroll events,\n * therefore for this purpose, it returns the `onScroll` event handler\n * that should be attached to the list that renders the blocks.\n *\n *\n * @param {Object} props Component props.\n * @param {JSX.Element} props.children Children to be rendered.\n * @param {boolean} props.isRTL Check if current locale is RTL.\n *\n * @return {Function} Render function that passes `onScroll` event handler.\n */\nconst BlockDraggableWrapper = ( { children, isRTL } ) => {\n\tconst [ draggedBlockIcon, setDraggedBlockIcon ] = useState();\n\n\tconst { selectBlock, startDraggingBlocks, stopDraggingBlocks } =\n\t\tuseDispatch( blockEditorStore );\n\n\tconst { left, right } = useSafeAreaInsets();\n\tconst { width } = useSafeAreaFrame();\n\tconst safeAreaOffset = left + right;\n\tconst contentWidth = width - safeAreaOffset;\n\n\tconst scroll = {\n\t\toffsetY: useSharedValue( 0 ),\n\t};\n\tconst chip = {\n\t\tx: useSharedValue( 0 ),\n\t\ty: useSharedValue( 0 ),\n\t\twidth: useSharedValue( 0 ),\n\t\theight: useSharedValue( 0 ),\n\t};\n\tconst currentYPosition = useSharedValue( 0 );\n\tconst isDragging = useSharedValue( false );\n\n\tconst [\n\t\tstartScrolling,\n\t\tscrollOnDragOver,\n\t\tstopScrolling,\n\t\tdraggingScrollHandler,\n\t] = useScrollWhenDragging();\n\n\tconst scrollHandler = ( event ) => {\n\t\t'worklet';\n\t\tconst { contentOffset } = event;\n\t\tscroll.offsetY.value = contentOffset.y;\n\n\t\tdraggingScrollHandler( event );\n\t};\n\n\tconst {\n\t\tonBlockDragOverWorklet,\n\t\tonBlockDragEnd,\n\t\tonBlockDrop,\n\t\ttargetBlockIndex,\n\t} = useBlockDropZone();\n\n\t// Stop dragging blocks if the block draggable is unmounted.\n\tuseEffect( () => {\n\t\treturn () => {\n\t\t\tif ( isDragging.value ) {\n\t\t\t\tstopDraggingBlocks();\n\t\t\t}\n\t\t};\n\t}, [] );\n\n\tconst setDraggedBlockIconByClientId = ( clientId ) => {\n\t\tconst blockName = select( blockEditorStore ).getBlockName( clientId );\n\t\tconst blockIcon = getBlockType( blockName )?.icon;\n\t\tif ( blockIcon ) {\n\t\t\tsetDraggedBlockIcon( blockIcon );\n\t\t}\n\t};\n\n\tconst onStartDragging = ( { clientId, position } ) => {\n\t\tif ( clientId ) {\n\t\t\tstartDraggingBlocks( [ clientId ] );\n\t\t\tsetDraggedBlockIconByClientId( clientId );\n\t\t\trunOnUI( startScrolling )( position.y );\n\t\t\tgenerateHapticFeedback();\n\t\t} else {\n\t\t\t// We stop dragging if no block is found.\n\t\t\trunOnUI( stopDragging )();\n\t\t}\n\t};\n\n\tconst onStopDragging = ( { clientId } ) => {\n\t\tif ( clientId ) {\n\t\t\tonBlockDrop( {\n\t\t\t\t// Dropping is only allowed at root level\n\t\t\t\tsrcRootClientId: '',\n\t\t\t\tsrcClientIds: [ clientId ],\n\t\t\t\ttype: 'block',\n\t\t\t} );\n\t\t\tselectBlock( clientId );\n\t\t\tsetDraggedBlockIcon( undefined );\n\t\t}\n\t\tonBlockDragEnd();\n\t\tstopDraggingBlocks();\n\t};\n\n\tconst onChipLayout = ( { nativeEvent: { layout } } ) => {\n\t\tif ( layout.width > 0 ) {\n\t\t\tchip.width.value = layout.width;\n\t\t}\n\t\tif ( layout.height > 0 ) {\n\t\t\tchip.height.value = layout.height;\n\t\t}\n\t};\n\n\tconst startDragging = ( { x, y, id } ) => {\n\t\t'worklet';\n\t\tconst dragPosition = { x, y };\n\t\tchip.x.value = dragPosition.x;\n\t\tchip.y.value = dragPosition.y;\n\t\tcurrentYPosition.value = dragPosition.y;\n\n\t\tisDragging.value = true;\n\n\t\trunOnJS( onStartDragging )( { clientId: id, position: dragPosition } );\n\t};\n\n\tconst updateDragging = ( { x, y } ) => {\n\t\t'worklet';\n\t\tconst dragPosition = { x, y };\n\t\tchip.x.value = dragPosition.x;\n\t\tchip.y.value = dragPosition.y;\n\t\tcurrentYPosition.value = dragPosition.y;\n\n\t\tonBlockDragOverWorklet( { x, y: y + scroll.offsetY.value } );\n\n\t\t// Update scrolling velocity\n\t\tscrollOnDragOver( dragPosition.y );\n\t};\n\n\tconst stopDragging = ( { id } ) => {\n\t\t'worklet';\n\t\tisDragging.value = false;\n\n\t\tstopScrolling();\n\t\trunOnJS( onStopDragging )( { clientId: id } );\n\t};\n\n\tconst chipDynamicStyles = useAnimatedStyle( () => {\n\t\tconst chipOffset = chip.width.value / 2;\n\t\tconst translateX = ! isRTL\n\t\t\t? chip.x.value - chipOffset\n\t\t\t: -( contentWidth - ( chip.x.value + chipOffset ) );\n\n\t\treturn {\n\t\t\ttransform: [\n\t\t\t\t{\n\t\t\t\t\ttranslateX,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttranslateY:\n\t\t\t\t\t\tchip.y.value -\n\t\t\t\t\t\tchip.height.value -\n\t\t\t\t\t\tCHIP_OFFSET_TO_TOUCH_POSITION,\n\t\t\t\t},\n\t\t\t],\n\t\t};\n\t} );\n\tconst chipStyles = [\n\t\tchipDynamicStyles,\n\t\tstyles[ 'draggable-chip__wrapper' ],\n\t];\n\n\tconst exitingAnimation = ( { currentHeight, currentWidth } ) => {\n\t\t'worklet';\n\t\tconst translateX = ! isRTL ? 0 : currentWidth * -1;\n\t\tconst duration = 150;\n\t\tconst animations = {\n\t\t\ttransform: [\n\t\t\t\t{\n\t\t\t\t\ttranslateY: withTiming( currentHeight, {\n\t\t\t\t\t\tduration,\n\t\t\t\t\t} ),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttranslateX: withTiming( translateX, {\n\t\t\t\t\t\tduration,\n\t\t\t\t\t} ),\n\t\t\t\t},\n\t\t\t\t{ scale: withTiming( 0, { duration } ) },\n\t\t\t],\n\t\t};\n\t\tconst initialValues = {\n\t\t\ttransform: [ { translateY: 0 }, { translateX }, { scale: 1 } ],\n\t\t};\n\t\treturn {\n\t\t\tinitialValues,\n\t\t\tanimations,\n\t\t};\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<DroppingInsertionPoint\n\t\t\t\tscroll={ scroll }\n\t\t\t\tcurrentYPosition={ currentYPosition }\n\t\t\t\tisDragging={ isDragging }\n\t\t\t\ttargetBlockIndex={ targetBlockIndex }\n\t\t\t/>\n\t\t\t<Draggable\n\t\t\t\tonDragStart={ startDragging }\n\t\t\t\tonDragOver={ updateDragging }\n\t\t\t\tonDragEnd={ stopDragging }\n\t\t\t\ttestID=\"block-draggable-wrapper\"\n\t\t\t>\n\t\t\t\t{ children( { onScroll: scrollHandler } ) }\n\t\t\t</Draggable>\n\t\t\t<Animated.View\n\t\t\t\tonLayout={ onChipLayout }\n\t\t\t\tstyle={ chipStyles }\n\t\t\t\tpointerEvents=\"none\"\n\t\t\t>\n\t\t\t\t{ draggedBlockIcon && (\n\t\t\t\t\t<Animated.View\n\t\t\t\t\t\tentering={ ZoomInEasyDown.duration( 200 ) }\n\t\t\t\t\t\texiting={ exitingAnimation }\n\t\t\t\t\t>\n\t\t\t\t\t\t<DraggableChip icon={ draggedBlockIcon } />\n\t\t\t\t\t</Animated.View>\n\t\t\t\t) }\n\t\t\t</Animated.View>\n\t\t</>\n\t);\n};\n\nfunction useIsScreenReaderEnabled() {\n\tconst [ isScreenReaderEnabled, setIsScreenReaderEnabled ] =\n\t\tuseState( false );\n\n\tuseEffect( () => {\n\t\tlet mounted = true;\n\n\t\tconst changeListener = AccessibilityInfo.addEventListener(\n\t\t\t'screenReaderChanged',\n\t\t\t( enabled ) => setIsScreenReaderEnabled( enabled )\n\t\t);\n\n\t\tAccessibilityInfo.isScreenReaderEnabled().then(\n\t\t\t( screenReaderEnabled ) => {\n\t\t\t\tif ( mounted && screenReaderEnabled ) {\n\t\t\t\t\tsetIsScreenReaderEnabled( screenReaderEnabled );\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\n\t\treturn () => {\n\t\t\tmounted = false;\n\n\t\t\tchangeListener.remove();\n\t\t};\n\t}, [] );\n\n\treturn isScreenReaderEnabled;\n}\n\nfunction useIsEditingText() {\n\tconst [ isEditingText, setIsEditingText ] = useState( () =>\n\t\tRCTAztecView.InputState.isFocused()\n\t);\n\n\tuseEffect( () => {\n\t\tconst onFocusChangeAztec = ( { isFocused } ) => {\n\t\t\tsetIsEditingText( isFocused );\n\t\t};\n\n\t\tRCTAztecView.InputState.addFocusChangeListener( onFocusChangeAztec );\n\n\t\treturn () => {\n\t\t\tRCTAztecView.InputState.removeFocusChangeListener(\n\t\t\t\tonFocusChangeAztec\n\t\t\t);\n\t\t};\n\t}, [] );\n\n\treturn isEditingText;\n}\n\n/**\n * Block draggable component\n *\n * This component serves for animating the block when it is being dragged.\n * Hence, it should be wrapped around the rendering of a block.\n *\n * @param {Object} props Component props.\n * @param {JSX.Element} props.children Children to be rendered.\n * @param {string} props.clientId Client id of the block.\n * @param {string} [props.draggingClientId] Client id to use for dragging. If not defined, the value from `clientId` will be used.\n * @param {boolean} [props.enabled] Enables the draggable trigger.\n * @param {string} [props.testID] Id used for querying the long-press gesture handler in tests.\n *\n * @return {Function} Render function which includes the parameter `isDraggable` to determine if the block can be dragged.\n */\nconst BlockDraggable = ( {\n\tclientId,\n\tchildren,\n\tdraggingClientId,\n\tenabled = true,\n\ttestID,\n} ) => {\n\tconst wasBeingDragged = useRef( false );\n\tconst isEditingText = useIsEditingText();\n\tconst isScreenReaderEnabled = useIsScreenReaderEnabled();\n\n\tconst draggingAnimation = {\n\t\topacity: useSharedValue( 1 ),\n\t};\n\n\tconst startDraggingBlock = () => {\n\t\tdraggingAnimation.opacity.value = withTiming(\n\t\t\t0.4,\n\t\t\tBLOCK_OPACITY_ANIMATION_CONFIG\n\t\t);\n\t};\n\n\tconst stopDraggingBlock = () => {\n\t\tdraggingAnimation.opacity.value = withDelay(\n\t\t\tBLOCK_OPACITY_ANIMATION_DELAY,\n\t\t\twithTiming( 1, BLOCK_OPACITY_ANIMATION_CONFIG )\n\t\t);\n\t};\n\n\tconst { isDraggable, isBeingDragged, isBlockSelected } = useSelect(\n\t\t( _select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockRootClientId,\n\t\t\t\tgetTemplateLock,\n\t\t\t\tisBlockBeingDragged,\n\t\t\t\tgetSelectedBlockClientId,\n\t\t\t} = _select( blockEditorStore );\n\t\t\tconst rootClientId = getBlockRootClientId( clientId );\n\t\t\tconst templateLock = rootClientId\n\t\t\t\t? getTemplateLock( rootClientId )\n\t\t\t\t: null;\n\t\t\tconst selectedBlockClientId = getSelectedBlockClientId();\n\n\t\t\treturn {\n\t\t\t\tisBeingDragged: isBlockBeingDragged( clientId ),\n\t\t\t\tisDraggable: 'all' !== templateLock,\n\t\t\t\tisBlockSelected:\n\t\t\t\t\tselectedBlockClientId && selectedBlockClientId === clientId,\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tuseEffect( () => {\n\t\tif ( isBeingDragged !== wasBeingDragged.current ) {\n\t\t\tif ( isBeingDragged ) {\n\t\t\t\tstartDraggingBlock();\n\t\t\t} else {\n\t\t\t\tstopDraggingBlock();\n\t\t\t}\n\t\t}\n\t\twasBeingDragged.current = isBeingDragged;\n\t}, [ isBeingDragged ] );\n\n\tconst onLongPressDraggable = useCallback( () => {\n\t\t// Ensure that no text input is focused when starting the dragging gesture in order to prevent conflicts with text editing.\n\t\tRCTAztecView.InputState.blurCurrentFocusedElement();\n\t}, [] );\n\n\tconst animatedWrapperStyles = useAnimatedStyle( () => {\n\t\treturn {\n\t\t\topacity: draggingAnimation.opacity.value,\n\t\t};\n\t} );\n\tconst wrapperStyles = [\n\t\tanimatedWrapperStyles,\n\t\tstyles[ 'draggable-wrapper__container' ],\n\t];\n\n\tconst canDragBlock =\n\t\tenabled &&\n\t\t! isScreenReaderEnabled &&\n\t\t( ! isBlockSelected || ! isEditingText );\n\n\tif ( ! isDraggable ) {\n\t\treturn children( { isDraggable: false } );\n\t}\n\n\treturn (\n\t\t<DraggableTrigger\n\t\t\tid={ draggingClientId || clientId }\n\t\t\tenabled={ enabled && canDragBlock }\n\t\t\tminDuration={ Platform.select( {\n\t\t\t\t// On iOS, using a lower min duration than the default\n\t\t\t\t// value prevents the long-press gesture from being\n\t\t\t\t// triggered in underneath elements. This is required to\n\t\t\t\t// prevent enabling text editing when dragging is available.\n\t\t\t\tios: canDragBlock\n\t\t\t\t\t? DEFAULT_IOS_LONG_PRESS_MIN_DURATION\n\t\t\t\t\t: DEFAULT_LONG_PRESS_MIN_DURATION,\n\t\t\t\tandroid: DEFAULT_LONG_PRESS_MIN_DURATION,\n\t\t\t} ) }\n\t\t\tonLongPress={ onLongPressDraggable }\n\t\t\ttestID={ testID }\n\t\t>\n\t\t\t<Animated.View style={ wrapperStyles }>\n\t\t\t\t{ children( { isDraggable: true } ) }\n\t\t\t</Animated.View>\n\t\t</DraggableTrigger>\n\t);\n};\n\nexport { BlockDraggableWrapper };\nexport default BlockDraggable;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,iBAAiB,QAAQ,cAAc;AAChD,SACCC,iBAAiB,EACjBC,gBAAgB,QACV,gCAAgC;AACvC,OAAOC,QAAQ,IACdC,OAAO,EACPC,OAAO,EACPC,gBAAgB,EAChBC,cAAc,EACdC,SAAS,EACTC,UAAU,EACVC,cAAc,QACR,yBAAyB;;AAEhC;AACA;AACA;AACA,SAASC,SAAS,EAAEC,gBAAgB,QAAQ,uBAAuB;AACnE,SAASC,MAAM,EAAEC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AAChE,SACCC,WAAW,EACXC,SAAS,EACTC,MAAM,EACNC,QAAQ,EACRC,QAAQ,QACF,oBAAoB;AAC3B,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AE,MAAM;IACrD,OAAO;MACNwI,OAAO,EAAED,iBAAiB,CAACC,OAAO,CAACvE;IACpC,CAAC;EACF,CAAE,CAAC;EACH,MAAMyF,aAAa,GAAG,CACrBD,qBAAqB,EACrBjI,MAAM,CAAE,8BAA8B,CAAE,CACxC;EAED,MAAMmI,YAAY,GACjBnC,OAAO,IACP,CAAEL,qBAAqB,KACrB,CAAE0B,eAAe,IAAI,CAAEhB,aAAa,CAAE;EAEzC,IAAK,CAAEc,WAAW,EAAG;IACpB,OAAOrG,QAAQ,CAAE;MAAEqG,WAAW,EAAE;IAAM,CAAE,CAAC;EAC1C;EAEA,oBACCjH,IAAA,CAACpB,gBAAgB;IAChBkF,EAAE,EAAG6C,gBAAgB,IAAI9D,QAAU;IACnCiD,OAAO,EAAGA,OAAO,IAAImC,YAAc;IACnCC,WAAW,EAAG9I,QAAQ,CAACP,MAAM,CAAE;MAC9B;MACA;MACA;MACA;MACAsJ,GAAG,EAAEF,YAAY,GACdvH,mCAAmC,GACnCD,+BAA+B;MAClC2H,OAAO,EAAE3H;IACV,CAAE,CAAG;IACL4H,WAAW,EAAGR,oBAAsB;IACpC7C,MAAM,EAAGA,MAAQ;IAAApE,QAAA,eAEjBZ,IAAA,CAAC7B,QAAQ,CAAC+G,IAAI;MAACE,KAAK,EAAG4C,aAAe;MAAApH,QAAA,EACnCA,QAAQ,CAAE;QAAEqG,WAAW,EAAE;MAAK,CAAE;IAAC,CACrB;EAAC,CACC,CAAC;AAErB,CAAC;AAED,SAAStG,qBAAqB;AAC9B,eAAe+F,cAAc","ignoreList":[]}
|
|
@@ -20,8 +20,7 @@ import { PrivateBlockContext } from '../block-list/private-block-context';
|
|
|
20
20
|
*
|
|
21
21
|
* @return {Object} Block edit context
|
|
22
22
|
*/
|
|
23
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
23
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
25
24
|
export { useBlockEditContext };
|
|
26
25
|
export default function BlockEdit({
|
|
27
26
|
mayDisplayControls,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useMemo","useContext","hasBlockSupport","Edit","BlockEditContextProvider","useBlockEditContext","mayDisplayControlsKey","mayDisplayParentControlsKey","blockEditingModeKey","blockBindingsKey","isPreviewModeKey","MultipleUsageWarning","PrivateBlockContext","jsx","_jsx","jsxs","_jsxs","BlockEdit","mayDisplayControls","mayDisplayParentControls","blockEditingMode","isPreviewMode","props","name","isSelected","clientId","attributes","__unstableLayoutClassNames","layout","metadata","bindings","layoutSupport","originalBlockClientId","value","children","onReplace"],"sources":["@wordpress/block-editor/src/components/block-edit/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo, useContext } from '@wordpress/element';\nimport { hasBlockSupport } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport Edit from './edit';\nimport {\n\tBlockEditContextProvider,\n\tuseBlockEditContext,\n\tmayDisplayControlsKey,\n\tmayDisplayParentControlsKey,\n\tblockEditingModeKey,\n\tblockBindingsKey,\n\tisPreviewModeKey,\n} from './context';\nimport { MultipleUsageWarning } from './multiple-usage-warning';\nimport { PrivateBlockContext } from '../block-list/private-block-context';\n\n/**\n * The `useBlockEditContext` hook provides information about the block this hook is being used in.\n * It returns an object with the `name`, `isSelected` state, and the `clientId` of the block.\n * It is useful if you want to create custom hooks that need access to the current blocks clientId\n * but don't want to rely on the data getting passed in as a parameter.\n *\n * @return {Object} Block edit context\n */\nexport { useBlockEditContext };\n\nexport default function BlockEdit( {\n\tmayDisplayControls,\n\tmayDisplayParentControls,\n\tblockEditingMode,\n\tisPreviewMode,\n\t// The remaining props are passed through the BlockEdit filters and are thus\n\t// public API!\n\t...props\n} ) {\n\tconst {\n\t\tname,\n\t\tisSelected,\n\t\tclientId,\n\t\tattributes = {},\n\t\t__unstableLayoutClassNames,\n\t} = props;\n\tconst { layout = null, metadata = {} } = attributes;\n\tconst { bindings } = metadata;\n\tconst layoutSupport =\n\t\thasBlockSupport( name, 'layout', false ) ||\n\t\thasBlockSupport( name, '__experimentalLayout', false );\n\tconst { originalBlockClientId } = useContext( PrivateBlockContext );\n\n\treturn (\n\t\t<BlockEditContextProvider\n\t\t\t// It is important to return the same object if props haven't\n\t\t\t// changed to avoid unnecessary rerenders.\n\t\t\t// See https://reactjs.org/docs/context.html#caveats.\n\t\t\tvalue={ useMemo(\n\t\t\t\t() => ( {\n\t\t\t\t\tname,\n\t\t\t\t\tisSelected,\n\t\t\t\t\tclientId,\n\t\t\t\t\tlayout: layoutSupport ? layout : null,\n\t\t\t\t\t__unstableLayoutClassNames,\n\t\t\t\t\t// We use symbols in favour of an __unstable prefix to avoid\n\t\t\t\t\t// usage outside of the package (this context is exposed).\n\t\t\t\t\t[ mayDisplayControlsKey ]: mayDisplayControls,\n\t\t\t\t\t[ mayDisplayParentControlsKey ]: mayDisplayParentControls,\n\t\t\t\t\t[ blockEditingModeKey ]: blockEditingMode,\n\t\t\t\t\t[ blockBindingsKey ]: bindings,\n\t\t\t\t\t[ isPreviewModeKey ]: isPreviewMode,\n\t\t\t\t} ),\n\t\t\t\t[\n\t\t\t\t\tname,\n\t\t\t\t\tisSelected,\n\t\t\t\t\tclientId,\n\t\t\t\t\tlayoutSupport,\n\t\t\t\t\tlayout,\n\t\t\t\t\t__unstableLayoutClassNames,\n\t\t\t\t\tmayDisplayControls,\n\t\t\t\t\tmayDisplayParentControls,\n\t\t\t\t\tblockEditingMode,\n\t\t\t\t\tbindings,\n\t\t\t\t\tisPreviewMode,\n\t\t\t\t]\n\t\t\t) }\n\t\t>\n\t\t\t<Edit { ...props } />\n\t\t\t{ originalBlockClientId && (\n\t\t\t\t<MultipleUsageWarning\n\t\t\t\t\toriginalBlockClientId={ originalBlockClientId }\n\t\t\t\t\tname={ name }\n\t\t\t\t\tonReplace={ props.onReplace }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</BlockEditContextProvider>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAO,EAAEC,UAAU,QAAQ,oBAAoB;AACxD,SAASC,eAAe,QAAQ,mBAAmB;;AAEnD;AACA;AACA;AACA,OAAOC,IAAI,MAAM,QAAQ;AACzB,SACCC,wBAAwB,EACxBC,mBAAmB,EACnBC,qBAAqB,EACrBC,2BAA2B,EAC3BC,mBAAmB,EACnBC,gBAAgB,EAChBC,gBAAgB,QACV,WAAW;AAClB,SAASC,oBAAoB,QAAQ,0BAA0B;AAC/D,SAASC,mBAAmB,QAAQ,qCAAqC;;AAEzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAPA,SAAAC,GAAA,IAAAC,IAAA
|
|
1
|
+
{"version":3,"names":["useMemo","useContext","hasBlockSupport","Edit","BlockEditContextProvider","useBlockEditContext","mayDisplayControlsKey","mayDisplayParentControlsKey","blockEditingModeKey","blockBindingsKey","isPreviewModeKey","MultipleUsageWarning","PrivateBlockContext","jsx","_jsx","jsxs","_jsxs","BlockEdit","mayDisplayControls","mayDisplayParentControls","blockEditingMode","isPreviewMode","props","name","isSelected","clientId","attributes","__unstableLayoutClassNames","layout","metadata","bindings","layoutSupport","originalBlockClientId","value","children","onReplace"],"sources":["@wordpress/block-editor/src/components/block-edit/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo, useContext } from '@wordpress/element';\nimport { hasBlockSupport } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport Edit from './edit';\nimport {\n\tBlockEditContextProvider,\n\tuseBlockEditContext,\n\tmayDisplayControlsKey,\n\tmayDisplayParentControlsKey,\n\tblockEditingModeKey,\n\tblockBindingsKey,\n\tisPreviewModeKey,\n} from './context';\nimport { MultipleUsageWarning } from './multiple-usage-warning';\nimport { PrivateBlockContext } from '../block-list/private-block-context';\n\n/**\n * The `useBlockEditContext` hook provides information about the block this hook is being used in.\n * It returns an object with the `name`, `isSelected` state, and the `clientId` of the block.\n * It is useful if you want to create custom hooks that need access to the current blocks clientId\n * but don't want to rely on the data getting passed in as a parameter.\n *\n * @return {Object} Block edit context\n */\nexport { useBlockEditContext };\n\nexport default function BlockEdit( {\n\tmayDisplayControls,\n\tmayDisplayParentControls,\n\tblockEditingMode,\n\tisPreviewMode,\n\t// The remaining props are passed through the BlockEdit filters and are thus\n\t// public API!\n\t...props\n} ) {\n\tconst {\n\t\tname,\n\t\tisSelected,\n\t\tclientId,\n\t\tattributes = {},\n\t\t__unstableLayoutClassNames,\n\t} = props;\n\tconst { layout = null, metadata = {} } = attributes;\n\tconst { bindings } = metadata;\n\tconst layoutSupport =\n\t\thasBlockSupport( name, 'layout', false ) ||\n\t\thasBlockSupport( name, '__experimentalLayout', false );\n\tconst { originalBlockClientId } = useContext( PrivateBlockContext );\n\n\treturn (\n\t\t<BlockEditContextProvider\n\t\t\t// It is important to return the same object if props haven't\n\t\t\t// changed to avoid unnecessary rerenders.\n\t\t\t// See https://reactjs.org/docs/context.html#caveats.\n\t\t\tvalue={ useMemo(\n\t\t\t\t() => ( {\n\t\t\t\t\tname,\n\t\t\t\t\tisSelected,\n\t\t\t\t\tclientId,\n\t\t\t\t\tlayout: layoutSupport ? layout : null,\n\t\t\t\t\t__unstableLayoutClassNames,\n\t\t\t\t\t// We use symbols in favour of an __unstable prefix to avoid\n\t\t\t\t\t// usage outside of the package (this context is exposed).\n\t\t\t\t\t[ mayDisplayControlsKey ]: mayDisplayControls,\n\t\t\t\t\t[ mayDisplayParentControlsKey ]: mayDisplayParentControls,\n\t\t\t\t\t[ blockEditingModeKey ]: blockEditingMode,\n\t\t\t\t\t[ blockBindingsKey ]: bindings,\n\t\t\t\t\t[ isPreviewModeKey ]: isPreviewMode,\n\t\t\t\t} ),\n\t\t\t\t[\n\t\t\t\t\tname,\n\t\t\t\t\tisSelected,\n\t\t\t\t\tclientId,\n\t\t\t\t\tlayoutSupport,\n\t\t\t\t\tlayout,\n\t\t\t\t\t__unstableLayoutClassNames,\n\t\t\t\t\tmayDisplayControls,\n\t\t\t\t\tmayDisplayParentControls,\n\t\t\t\t\tblockEditingMode,\n\t\t\t\t\tbindings,\n\t\t\t\t\tisPreviewMode,\n\t\t\t\t]\n\t\t\t) }\n\t\t>\n\t\t\t<Edit { ...props } />\n\t\t\t{ originalBlockClientId && (\n\t\t\t\t<MultipleUsageWarning\n\t\t\t\t\toriginalBlockClientId={ originalBlockClientId }\n\t\t\t\t\tname={ name }\n\t\t\t\t\tonReplace={ props.onReplace }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</BlockEditContextProvider>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAO,EAAEC,UAAU,QAAQ,oBAAoB;AACxD,SAASC,eAAe,QAAQ,mBAAmB;;AAEnD;AACA;AACA;AACA,OAAOC,IAAI,MAAM,QAAQ;AACzB,SACCC,wBAAwB,EACxBC,mBAAmB,EACnBC,qBAAqB,EACrBC,2BAA2B,EAC3BC,mBAAmB,EACnBC,gBAAgB,EAChBC,gBAAgB,QACV,WAAW;AAClB,SAASC,oBAAoB,QAAQ,0BAA0B;AAC/D,SAASC,mBAAmB,QAAQ,qCAAqC;;AAEzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAPA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAQA,SAASX,mBAAmB;AAE5B,eAAe,SAASY,SAASA,CAAE;EAClCC,kBAAkB;EAClBC,wBAAwB;EACxBC,gBAAgB;EAChBC,aAAa;EACb;EACA;EACA,GAAGC;AACJ,CAAC,EAAG;EACH,MAAM;IACLC,IAAI;IACJC,UAAU;IACVC,QAAQ;IACRC,UAAU,GAAG,CAAC,CAAC;IACfC;EACD,CAAC,GAAGL,KAAK;EACT,MAAM;IAAEM,MAAM,GAAG,IAAI;IAAEC,QAAQ,GAAG,CAAC;EAAE,CAAC,GAAGH,UAAU;EACnD,MAAM;IAAEI;EAAS,CAAC,GAAGD,QAAQ;EAC7B,MAAME,aAAa,GAClB7B,eAAe,CAAEqB,IAAI,EAAE,QAAQ,EAAE,KAAM,CAAC,IACxCrB,eAAe,CAAEqB,IAAI,EAAE,sBAAsB,EAAE,KAAM,CAAC;EACvD,MAAM;IAAES;EAAsB,CAAC,GAAG/B,UAAU,CAAEW,mBAAoB,CAAC;EAEnE,oBACCI,KAAA,CAACZ;EACA;EACA;EACA;EAAA;IACA6B,KAAK,EAAGjC,OAAO,CACd,OAAQ;MACPuB,IAAI;MACJC,UAAU;MACVC,QAAQ;MACRG,MAAM,EAAEG,aAAa,GAAGH,MAAM,GAAG,IAAI;MACrCD,0BAA0B;MAC1B;MACA;MACA,CAAErB,qBAAqB,GAAIY,kBAAkB;MAC7C,CAAEX,2BAA2B,GAAIY,wBAAwB;MACzD,CAAEX,mBAAmB,GAAIY,gBAAgB;MACzC,CAAEX,gBAAgB,GAAIqB,QAAQ;MAC9B,CAAEpB,gBAAgB,GAAIW;IACvB,CAAC,CAAE,EACH,CACCE,IAAI,EACJC,UAAU,EACVC,QAAQ,EACRM,aAAa,EACbH,MAAM,EACND,0BAA0B,EAC1BT,kBAAkB,EAClBC,wBAAwB,EACxBC,gBAAgB,EAChBU,QAAQ,EACRT,aAAa,CAEf,CAAG;IAAAa,QAAA,gBAEHpB,IAAA,CAACX,IAAI;MAAA,GAAMmB;IAAK,CAAI,CAAC,EACnBU,qBAAqB,iBACtBlB,IAAA,CAACH,oBAAoB;MACpBqB,qBAAqB,EAAGA,qBAAuB;MAC/CT,IAAI,EAAGA,IAAM;MACbY,SAAS,EAAGb,KAAK,CAACa;IAAW,CAC7B,CACD;EAAA,CACwB,CAAC;AAE7B","ignoreList":[]}
|
|
@@ -11,8 +11,7 @@ import { __ } from '@wordpress/i18n';
|
|
|
11
11
|
*/
|
|
12
12
|
import { store as blockEditorStore } from '../../store';
|
|
13
13
|
import Warning from '../warning';
|
|
14
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
15
|
export function MultipleUsageWarning({
|
|
17
16
|
originalBlockClientId,
|
|
18
17
|
name,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getBlockType","Button","useDispatch","__","store","blockEditorStore","Warning","jsx","_jsx","jsxs","_jsxs","MultipleUsageWarning","originalBlockClientId","name","onReplace","selectBlock","blockType","actions","__next40pxDefaultSize","variant","onClick","children","title"],"sources":["@wordpress/block-editor/src/components/block-edit/multiple-usage-warning.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockType } from '@wordpress/blocks';\nimport { Button } from '@wordpress/components';\nimport { useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport Warning from '../warning';\n\nexport function MultipleUsageWarning( {\n\toriginalBlockClientId,\n\tname,\n\tonReplace,\n} ) {\n\tconst { selectBlock } = useDispatch( blockEditorStore );\n\tconst blockType = getBlockType( name );\n\n\treturn (\n\t\t<Warning\n\t\t\tactions={ [\n\t\t\t\t<Button\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tkey=\"find-original\"\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\tonClick={ () => selectBlock( originalBlockClientId ) }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Find original' ) }\n\t\t\t\t</Button>,\n\t\t\t\t<Button\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tkey=\"remove\"\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\tonClick={ () => onReplace( [] ) }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Remove' ) }\n\t\t\t\t</Button>,\n\t\t\t] }\n\t\t>\n\t\t\t<strong>{ blockType?.title }: </strong>\n\t\t\t{ __( 'This block can only be used once.' ) }\n\t\t</Warning>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,YAAY,QAAQ,mBAAmB;AAChD,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,WAAW,QAAQ,iBAAiB;AAC7C,SAASC,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,OAAOC,OAAO,MAAM,YAAY;AAAC,SAAAC,GAAA,IAAAC,IAAA
|
|
1
|
+
{"version":3,"names":["getBlockType","Button","useDispatch","__","store","blockEditorStore","Warning","jsx","_jsx","jsxs","_jsxs","MultipleUsageWarning","originalBlockClientId","name","onReplace","selectBlock","blockType","actions","__next40pxDefaultSize","variant","onClick","children","title"],"sources":["@wordpress/block-editor/src/components/block-edit/multiple-usage-warning.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockType } from '@wordpress/blocks';\nimport { Button } from '@wordpress/components';\nimport { useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport Warning from '../warning';\n\nexport function MultipleUsageWarning( {\n\toriginalBlockClientId,\n\tname,\n\tonReplace,\n} ) {\n\tconst { selectBlock } = useDispatch( blockEditorStore );\n\tconst blockType = getBlockType( name );\n\n\treturn (\n\t\t<Warning\n\t\t\tactions={ [\n\t\t\t\t<Button\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tkey=\"find-original\"\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\tonClick={ () => selectBlock( originalBlockClientId ) }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Find original' ) }\n\t\t\t\t</Button>,\n\t\t\t\t<Button\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tkey=\"remove\"\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\tonClick={ () => onReplace( [] ) }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Remove' ) }\n\t\t\t\t</Button>,\n\t\t\t] }\n\t\t>\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26,7 @@ import BlockInfo from '../block-info-slot-fill';
|
|
|
26
26
|
import BlockQuickNavigation from '../block-quick-navigation';
|
|
27
27
|
import { useBorderPanelLabel } from '../../hooks/border';
|
|
28
28
|
import { unlock } from '../../lock-unlock';
|
|
29
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
30
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
31
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
29
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
32
30
|
function BlockStylesPanel({
|
|
33
31
|
clientId
|
|
34
32
|
}) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__","getBlockType","getUnregisteredTypeHandlerName","store","blocksStore","PanelBody","__unstableMotion","motion","useSelect","SkipToSelectedBlock","BlockCard","MultiSelectionInspector","BlockVariationTransforms","useBlockDisplayInformation","blockEditorStore","BlockStyles","default","InspectorControls","InspectorControlsTabs","useInspectorControlsTabs","AdvancedControls","PositionControls","useBlockInspectorAnimationSettings","BlockInfo","BlockQuickNavigation","useBorderPanelLabel","unlock","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","BlockStylesPanel","clientId","title","children","BlockInspector","showNoBlockSelectedMessage","count","selectedBlockName","selectedBlockClientId","blockType","isSectionBlock","select","getSelectedBlockClientId","getSelectedBlockCount","getBlockName","getParentSectionBlock","_isSectionBlock","_selectedBlockClientId","renderedBlockClientId","_selectedBlockName","_blockType","availableTabs","name","showTabs","length","blockInspectorAnimationSettings","borderPanelLabel","blockName","className","tabs","Slot","group","label","isSelectedBlockUnregistered","BlockInspectorSingleBlockWrapper","animate","wrapper","AnimatedContainer","BlockInspectorSingleBlock","animationOrigin","enterDirection","div","x","opacity","transition","ease","duration","initial","hasBlockStyles","getBlockStyles","blockStyles","blockInformation","contentClientIds","getClientIdsOfDescendants","getBlockEditingMode","filter","current","isSynced","blockClientId","clientIds"],"sources":["@wordpress/block-editor/src/components/block-inspector/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tgetBlockType,\n\tgetUnregisteredTypeHandlerName,\n\tstore as blocksStore,\n} from '@wordpress/blocks';\nimport { PanelBody, __unstableMotion as motion } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport SkipToSelectedBlock from '../skip-to-selected-block';\nimport BlockCard from '../block-card';\nimport MultiSelectionInspector from '../multi-selection-inspector';\nimport BlockVariationTransforms from '../block-variation-transforms';\nimport useBlockDisplayInformation from '../use-block-display-information';\nimport { store as blockEditorStore } from '../../store';\nimport BlockStyles from '../block-styles';\nimport { default as InspectorControls } from '../inspector-controls';\nimport { default as InspectorControlsTabs } from '../inspector-controls-tabs';\nimport useInspectorControlsTabs from '../inspector-controls-tabs/use-inspector-controls-tabs';\nimport AdvancedControls from '../inspector-controls-tabs/advanced-controls-panel';\nimport PositionControls from '../inspector-controls-tabs/position-controls-panel';\nimport useBlockInspectorAnimationSettings from './useBlockInspectorAnimationSettings';\nimport BlockInfo from '../block-info-slot-fill';\nimport BlockQuickNavigation from '../block-quick-navigation';\nimport { useBorderPanelLabel } from '../../hooks/border';\n\nimport { unlock } from '../../lock-unlock';\n\nfunction BlockStylesPanel( { clientId } ) {\n\treturn (\n\t\t<PanelBody title={ __( 'Styles' ) }>\n\t\t\t<BlockStyles clientId={ clientId } />\n\t\t</PanelBody>\n\t);\n}\n\nconst BlockInspector = ( { showNoBlockSelectedMessage = true } ) => {\n\tconst {\n\t\tcount,\n\t\tselectedBlockName,\n\t\tselectedBlockClientId,\n\t\tblockType,\n\t\tisSectionBlock,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetSelectedBlockClientId,\n\t\t\tgetSelectedBlockCount,\n\t\t\tgetBlockName,\n\t\t\tgetParentSectionBlock,\n\t\t\tisSectionBlock: _isSectionBlock,\n\t\t} = unlock( select( blockEditorStore ) );\n\t\tconst _selectedBlockClientId = getSelectedBlockClientId();\n\t\tconst renderedBlockClientId =\n\t\t\tgetParentSectionBlock( _selectedBlockClientId ) ||\n\t\t\tgetSelectedBlockClientId();\n\t\tconst _selectedBlockName =\n\t\t\trenderedBlockClientId && getBlockName( renderedBlockClientId );\n\t\tconst _blockType =\n\t\t\t_selectedBlockName && getBlockType( _selectedBlockName );\n\n\t\treturn {\n\t\t\tcount: getSelectedBlockCount(),\n\t\t\tselectedBlockClientId: renderedBlockClientId,\n\t\t\tselectedBlockName: _selectedBlockName,\n\t\t\tblockType: _blockType,\n\t\t\tisSectionBlock: _isSectionBlock( renderedBlockClientId ),\n\t\t};\n\t}, [] );\n\n\tconst availableTabs = useInspectorControlsTabs( blockType?.name );\n\tconst showTabs = availableTabs?.length > 1;\n\n\t// The block inspector animation settings will be completely\n\t// removed in the future to create an API which allows the block\n\t// inspector to transition between what it\n\t// displays based on the relationship between the selected block\n\t// and its parent, and only enable it if the parent is controlling\n\t// its children blocks.\n\tconst blockInspectorAnimationSettings =\n\t\tuseBlockInspectorAnimationSettings( blockType );\n\n\tconst borderPanelLabel = useBorderPanelLabel( {\n\t\tblockName: selectedBlockName,\n\t} );\n\n\tif ( count > 1 && ! isSectionBlock ) {\n\t\treturn (\n\t\t\t<div className=\"block-editor-block-inspector\">\n\t\t\t\t<MultiSelectionInspector />\n\t\t\t\t{ showTabs ? (\n\t\t\t\t\t<InspectorControlsTabs tabs={ availableTabs } />\n\t\t\t\t) : (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<InspectorControls.Slot />\n\t\t\t\t\t\t<InspectorControls.Slot\n\t\t\t\t\t\t\tgroup=\"color\"\n\t\t\t\t\t\t\tlabel={ __( 'Color' ) }\n\t\t\t\t\t\t\tclassName=\"color-block-support-panel__inner-wrapper\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<InspectorControls.Slot\n\t\t\t\t\t\t\tgroup=\"background\"\n\t\t\t\t\t\t\tlabel={ __( 'Background image' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<InspectorControls.Slot\n\t\t\t\t\t\t\tgroup=\"typography\"\n\t\t\t\t\t\t\tlabel={ __( 'Typography' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<InspectorControls.Slot\n\t\t\t\t\t\t\tgroup=\"dimensions\"\n\t\t\t\t\t\t\tlabel={ __( 'Dimensions' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<InspectorControls.Slot\n\t\t\t\t\t\t\tgroup=\"border\"\n\t\t\t\t\t\t\tlabel={ borderPanelLabel }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<InspectorControls.Slot group=\"styles\" />\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t);\n\t}\n\n\tconst isSelectedBlockUnregistered =\n\t\tselectedBlockName === getUnregisteredTypeHandlerName();\n\n\t/*\n\t * If the selected block is of an unregistered type, avoid showing it as an actual selection\n\t * because we want the user to focus on the unregistered block warning, not block settings.\n\t */\n\tif (\n\t\t! blockType ||\n\t\t! selectedBlockClientId ||\n\t\tisSelectedBlockUnregistered\n\t) {\n\t\tif ( showNoBlockSelectedMessage ) {\n\t\t\treturn (\n\t\t\t\t<span className=\"block-editor-block-inspector__no-blocks\">\n\t\t\t\t\t{ __( 'No block selected.' ) }\n\t\t\t\t</span>\n\t\t\t);\n\t\t}\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<BlockInspectorSingleBlockWrapper\n\t\t\tanimate={ blockInspectorAnimationSettings }\n\t\t\twrapper={ ( children ) => (\n\t\t\t\t<AnimatedContainer\n\t\t\t\t\tblockInspectorAnimationSettings={\n\t\t\t\t\t\tblockInspectorAnimationSettings\n\t\t\t\t\t}\n\t\t\t\t\tselectedBlockClientId={ selectedBlockClientId }\n\t\t\t\t>\n\t\t\t\t\t{ children }\n\t\t\t\t</AnimatedContainer>\n\t\t\t) }\n\t\t>\n\t\t\t<BlockInspectorSingleBlock\n\t\t\t\tclientId={ selectedBlockClientId }\n\t\t\t\tblockName={ blockType.name }\n\t\t\t\tisSectionBlock={ isSectionBlock }\n\t\t\t/>\n\t\t</BlockInspectorSingleBlockWrapper>\n\t);\n};\n\nconst BlockInspectorSingleBlockWrapper = ( { animate, wrapper, children } ) => {\n\treturn animate ? wrapper( children ) : children;\n};\n\nconst AnimatedContainer = ( {\n\tblockInspectorAnimationSettings,\n\tselectedBlockClientId,\n\tchildren,\n} ) => {\n\tconst animationOrigin =\n\t\tblockInspectorAnimationSettings &&\n\t\tblockInspectorAnimationSettings.enterDirection === 'leftToRight'\n\t\t\t? -50\n\t\t\t: 50;\n\n\treturn (\n\t\t<motion.div\n\t\t\tanimate={ {\n\t\t\t\tx: 0,\n\t\t\t\topacity: 1,\n\t\t\t\ttransition: {\n\t\t\t\t\tease: 'easeInOut',\n\t\t\t\t\tduration: 0.14,\n\t\t\t\t},\n\t\t\t} }\n\t\t\tinitial={ {\n\t\t\t\tx: animationOrigin,\n\t\t\t\topacity: 0,\n\t\t\t} }\n\t\t\tkey={ selectedBlockClientId }\n\t\t>\n\t\t\t{ children }\n\t\t</motion.div>\n\t);\n};\n\nconst BlockInspectorSingleBlock = ( {\n\tclientId,\n\tblockName,\n\tisSectionBlock,\n} ) => {\n\tconst availableTabs = useInspectorControlsTabs( blockName );\n\tconst showTabs = ! isSectionBlock && availableTabs?.length > 1;\n\n\tconst hasBlockStyles = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockStyles } = select( blocksStore );\n\t\t\tconst blockStyles = getBlockStyles( blockName );\n\t\t\treturn blockStyles && blockStyles.length > 0;\n\t\t},\n\t\t[ blockName ]\n\t);\n\tconst blockInformation = useBlockDisplayInformation( clientId );\n\tconst borderPanelLabel = useBorderPanelLabel( { blockName } );\n\tconst contentClientIds = useSelect(\n\t\t( select ) => {\n\t\t\t// Avoid unnecessary subscription.\n\t\t\tif ( ! isSectionBlock ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst {\n\t\t\t\tgetClientIdsOfDescendants,\n\t\t\t\tgetBlockName,\n\t\t\t\tgetBlockEditingMode,\n\t\t\t} = select( blockEditorStore );\n\t\t\treturn getClientIdsOfDescendants( clientId ).filter(\n\t\t\t\t( current ) =>\n\t\t\t\t\tgetBlockName( current ) !== 'core/list-item' &&\n\t\t\t\t\tgetBlockEditingMode( current ) === 'contentOnly'\n\t\t\t);\n\t\t},\n\t\t[ isSectionBlock, clientId ]\n\t);\n\n\treturn (\n\t\t<div className=\"block-editor-block-inspector\">\n\t\t\t<BlockCard\n\t\t\t\t{ ...blockInformation }\n\t\t\t\tclassName={ blockInformation.isSynced && 'is-synced' }\n\t\t\t/>\n\t\t\t<BlockVariationTransforms blockClientId={ clientId } />\n\t\t\t<BlockInfo.Slot />\n\t\t\t{ showTabs && (\n\t\t\t\t<InspectorControlsTabs\n\t\t\t\t\thasBlockStyles={ hasBlockStyles }\n\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\tblockName={ blockName }\n\t\t\t\t\ttabs={ availableTabs }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ ! showTabs && (\n\t\t\t\t<>\n\t\t\t\t\t{ hasBlockStyles && (\n\t\t\t\t\t\t<BlockStylesPanel clientId={ clientId } />\n\t\t\t\t\t) }\n\n\t\t\t\t\t{ contentClientIds && contentClientIds?.length > 0 && (\n\t\t\t\t\t\t<PanelBody title={ __( 'Content' ) }>\n\t\t\t\t\t\t\t<BlockQuickNavigation\n\t\t\t\t\t\t\t\tclientIds={ contentClientIds }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</PanelBody>\n\t\t\t\t\t) }\n\n\t\t\t\t\t{ ! isSectionBlock && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<InspectorControls.Slot />\n\t\t\t\t\t\t\t<InspectorControls.Slot group=\"list\" />\n\t\t\t\t\t\t\t<InspectorControls.Slot\n\t\t\t\t\t\t\t\tgroup=\"color\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Color' ) }\n\t\t\t\t\t\t\t\tclassName=\"color-block-support-panel__inner-wrapper\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<InspectorControls.Slot\n\t\t\t\t\t\t\t\tgroup=\"background\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Background image' ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<InspectorControls.Slot\n\t\t\t\t\t\t\t\tgroup=\"typography\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Typography' ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<InspectorControls.Slot\n\t\t\t\t\t\t\t\tgroup=\"dimensions\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Dimensions' ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<InspectorControls.Slot\n\t\t\t\t\t\t\t\tgroup=\"border\"\n\t\t\t\t\t\t\t\tlabel={ borderPanelLabel }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<InspectorControls.Slot group=\"styles\" />\n\t\t\t\t\t\t\t<PositionControls />\n\t\t\t\t\t\t\t<InspectorControls.Slot group=\"bindings\" />\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t<AdvancedControls />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\t\t\t\t</>\n\t\t\t) }\n\t\t\t<SkipToSelectedBlock key=\"back\" />\n\t\t</div>\n\t);\n};\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-inspector/README.md\n */\nexport default BlockInspector;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SACCC,YAAY,EACZC,8BAA8B,EAC9BC,KAAK,IAAIC,WAAW,QACd,mBAAmB;AAC1B,SAASC,SAAS,EAAEC,gBAAgB,IAAIC,MAAM,QAAQ,uBAAuB;AAC7E,SAASC,SAAS,QAAQ,iBAAiB;;AAE3C;AACA;AAC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UACdC,KAAK,EAAGN;QAAkB,CAC1B,CAAC,eACF/B,IAAA,CAACX,iBAAiB,CAAC8C,IAAI;UAACC,KAAK,EAAC;QAAQ,CAAE,CAAC,eACzCpC,IAAA,CAACP,gBAAgB,IAAE,CAAC,eACpBO,IAAA,CAACX,iBAAiB,CAAC8C,IAAI;UAACC,KAAK,EAAC;QAAU,CAAE,CAAC,eAC3CpC,IAAA;UAAAQ,QAAA,eACCR,IAAA,CAACR,gBAAgB,IAAE;QAAC,CAChB,CAAC;MAAA,CACL,CACF;IAAA,CACA,CACF,eACDQ,IAAA,CAACnB,mBAAmB,MAAK,MAAQ,CAAC;EAAA,CAC9B,CAAC;AAER,CAAC;;AAED;AACA;AACA;AACA,eAAe4B,cAAc","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["__","getBlockType","getUnregisteredTypeHandlerName","store","blocksStore","PanelBody","__unstableMotion","motion","useSelect","SkipToSelectedBlock","BlockCard","MultiSelectionInspector","BlockVariationTransforms","useBlockDisplayInformation","blockEditorStore","BlockStyles","default","InspectorControls","InspectorControlsTabs","useInspectorControlsTabs","AdvancedControls","PositionControls","useBlockInspectorAnimationSettings","BlockInfo","BlockQuickNavigation","useBorderPanelLabel","unlock","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","BlockStylesPanel","clientId","title","children","BlockInspector","showNoBlockSelectedMessage","count","selectedBlockName","selectedBlockClientId","blockType","isSectionBlock","select","getSelectedBlockClientId","getSelectedBlockCount","getBlockName","getParentSectionBlock","_isSectionBlock","_selectedBlockClientId","renderedBlockClientId","_selectedBlockName","_blockType","availableTabs","name","showTabs","length","blockInspectorAnimationSettings","borderPanelLabel","blockName","className","tabs","Slot","group","label","isSelectedBlockUnregistered","BlockInspectorSingleBlockWrapper","animate","wrapper","AnimatedContainer","BlockInspectorSingleBlock","animationOrigin","enterDirection","div","x","opacity","transition","ease","duration","initial","hasBlockStyles","getBlockStyles","blockStyles","blockInformation","contentClientIds","getClientIdsOfDescendants","getBlockEditingMode","filter","current","isSynced","blockClientId","clientIds"],"sources":["@wordpress/block-editor/src/components/block-inspector/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tgetBlockType,\n\tgetUnregisteredTypeHandlerName,\n\tstore as blocksStore,\n} from '@wordpress/blocks';\nimport { PanelBody, __unstableMotion as motion } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport SkipToSelectedBlock from '../skip-to-selected-block';\nimport BlockCard from '../block-card';\nimport MultiSelectionInspector from '../multi-selection-inspector';\nimport BlockVariationTransforms from '../block-variation-transforms';\nimport useBlockDisplayInformation from '../use-block-display-information';\nimport { store as blockEditorStore } from '../../store';\nimport BlockStyles from '../block-styles';\nimport { default as InspectorControls } from '../inspector-controls';\nimport { default as InspectorControlsTabs } from '../inspector-controls-tabs';\nimport useInspectorControlsTabs from '../inspector-controls-tabs/use-inspector-controls-tabs';\nimport AdvancedControls from '../inspector-controls-tabs/advanced-controls-panel';\nimport PositionControls from '../inspector-controls-tabs/position-controls-panel';\nimport useBlockInspectorAnimationSettings from './useBlockInspectorAnimationSettings';\nimport BlockInfo from '../block-info-slot-fill';\nimport BlockQuickNavigation from '../block-quick-navigation';\nimport { useBorderPanelLabel } from '../../hooks/border';\n\nimport { unlock } from '../../lock-unlock';\n\nfunction BlockStylesPanel( { clientId } ) {\n\treturn (\n\t\t<PanelBody title={ __( 'Styles' ) }>\n\t\t\t<BlockStyles clientId={ clientId } />\n\t\t</PanelBody>\n\t);\n}\n\nconst BlockInspector = ( { showNoBlockSelectedMessage = true } ) => {\n\tconst {\n\t\tcount,\n\t\tselectedBlockName,\n\t\tselectedBlockClientId,\n\t\tblockType,\n\t\tisSectionBlock,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetSelectedBlockClientId,\n\t\t\tgetSelectedBlockCount,\n\t\t\tgetBlockName,\n\t\t\tgetParentSectionBlock,\n\t\t\tisSectionBlock: _isSectionBlock,\n\t\t} = unlock( select( blockEditorStore ) );\n\t\tconst _selectedBlockClientId = getSelectedBlockClientId();\n\t\tconst renderedBlockClientId =\n\t\t\tgetParentSectionBlock( _selectedBlockClientId ) ||\n\t\t\tgetSelectedBlockClientId();\n\t\tconst _selectedBlockName =\n\t\t\trenderedBlockClientId && getBlockName( renderedBlockClientId );\n\t\tconst _blockType =\n\t\t\t_selectedBlockName && getBlockType( _selectedBlockName );\n\n\t\treturn {\n\t\t\tcount: getSelectedBlockCount(),\n\t\t\tselectedBlockClientId: renderedBlockClientId,\n\t\t\tselectedBlockName: _selectedBlockName,\n\t\t\tblockType: _blockType,\n\t\t\tisSectionBlock: _isSectionBlock( renderedBlockClientId ),\n\t\t};\n\t}, [] );\n\n\tconst availableTabs = useInspectorControlsTabs( blockType?.name );\n\tconst showTabs = availableTabs?.length > 1;\n\n\t// The block inspector animation settings will be completely\n\t// removed in the future to create an API which allows the block\n\t// inspector to transition between what it\n\t// displays based on the relationship between the selected block\n\t// and its parent, and only enable it if the parent is controlling\n\t// its children blocks.\n\tconst blockInspectorAnimationSettings =\n\t\tuseBlockInspectorAnimationSettings( blockType );\n\n\tconst borderPanelLabel = useBorderPanelLabel( {\n\t\tblockName: selectedBlockName,\n\t} );\n\n\tif ( count > 1 && ! isSectionBlock ) {\n\t\treturn (\n\t\t\t<div className=\"block-editor-block-inspector\">\n\t\t\t\t<MultiSelectionInspector />\n\t\t\t\t{ showTabs ? (\n\t\t\t\t\t<InspectorControlsTabs tabs={ availableTabs } />\n\t\t\t\t) : (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<InspectorControls.Slot />\n\t\t\t\t\t\t<InspectorControls.Slot\n\t\t\t\t\t\t\tgroup=\"color\"\n\t\t\t\t\t\t\tlabel={ __( 'Color' ) }\n\t\t\t\t\t\t\tclassName=\"color-block-support-panel__inner-wrapper\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<InspectorControls.Slot\n\t\t\t\t\t\t\tgroup=\"background\"\n\t\t\t\t\t\t\tlabel={ __( 'Background image' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<InspectorControls.Slot\n\t\t\t\t\t\t\tgroup=\"typography\"\n\t\t\t\t\t\t\tlabel={ __( 'Typography' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<InspectorControls.Slot\n\t\t\t\t\t\t\tgroup=\"dimensions\"\n\t\t\t\t\t\t\tlabel={ __( 'Dimensions' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<InspectorControls.Slot\n\t\t\t\t\t\t\tgroup=\"border\"\n\t\t\t\t\t\t\tlabel={ borderPanelLabel }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<InspectorControls.Slot group=\"styles\" />\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t);\n\t}\n\n\tconst isSelectedBlockUnregistered =\n\t\tselectedBlockName === getUnregisteredTypeHandlerName();\n\n\t/*\n\t * If the selected block is of an unregistered type, avoid showing it as an actual selection\n\t * because we want the user to focus on the unregistered block warning, not block settings.\n\t */\n\tif (\n\t\t! blockType ||\n\t\t! selectedBlockClientId ||\n\t\tisSelectedBlockUnregistered\n\t) {\n\t\tif ( showNoBlockSelectedMessage ) {\n\t\t\treturn (\n\t\t\t\t<span className=\"block-editor-block-inspector__no-blocks\">\n\t\t\t\t\t{ __( 'No block selected.' ) }\n\t\t\t\t</span>\n\t\t\t);\n\t\t}\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<BlockInspectorSingleBlockWrapper\n\t\t\tanimate={ blockInspectorAnimationSettings }\n\t\t\twrapper={ ( children ) => (\n\t\t\t\t<AnimatedContainer\n\t\t\t\t\tblockInspectorAnimationSettings={\n\t\t\t\t\t\tblockInspectorAnimationSettings\n\t\t\t\t\t}\n\t\t\t\t\tselectedBlockClientId={ selectedBlockClientId }\n\t\t\t\t>\n\t\t\t\t\t{ children }\n\t\t\t\t</AnimatedContainer>\n\t\t\t) }\n\t\t>\n\t\t\t<BlockInspectorSingleBlock\n\t\t\t\tclientId={ selectedBlockClientId }\n\t\t\t\tblockName={ blockType.name }\n\t\t\t\tisSectionBlock={ isSectionBlock }\n\t\t\t/>\n\t\t</BlockInspectorSingleBlockWrapper>\n\t);\n};\n\nconst BlockInspectorSingleBlockWrapper = ( { animate, wrapper, children } ) => {\n\treturn animate ? wrapper( children ) : children;\n};\n\nconst AnimatedContainer = ( {\n\tblockInspectorAnimationSettings,\n\tselectedBlockClientId,\n\tchildren,\n} ) => {\n\tconst animationOrigin =\n\t\tblockInspectorAnimationSettings &&\n\t\tblockInspectorAnimationSettings.enterDirection === 'leftToRight'\n\t\t\t? -50\n\t\t\t: 50;\n\n\treturn (\n\t\t<motion.div\n\t\t\tanimate={ {\n\t\t\t\tx: 0,\n\t\t\t\topacity: 1,\n\t\t\t\ttransition: {\n\t\t\t\t\tease: 'easeInOut',\n\t\t\t\t\tduration: 0.14,\n\t\t\t\t},\n\t\t\t} }\n\t\t\tinitial={ {\n\t\t\t\tx: animationOrigin,\n\t\t\t\topacity: 0,\n\t\t\t} }\n\t\t\tkey={ selectedBlockClientId }\n\t\t>\n\t\t\t{ children }\n\t\t</motion.div>\n\t);\n};\n\nconst BlockInspectorSingleBlock = ( {\n\tclientId,\n\tblockName,\n\tisSectionBlock,\n} ) => {\n\tconst availableTabs = useInspectorControlsTabs( blockName );\n\tconst showTabs = ! isSectionBlock && availableTabs?.length > 1;\n\n\tconst hasBlockStyles = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockStyles } = select( blocksStore );\n\t\t\tconst blockStyles = getBlockStyles( blockName );\n\t\t\treturn blockStyles && blockStyles.length > 0;\n\t\t},\n\t\t[ blockName ]\n\t);\n\tconst blockInformation = useBlockDisplayInformation( clientId );\n\tconst borderPanelLabel = useBorderPanelLabel( { blockName } );\n\tconst contentClientIds = useSelect(\n\t\t( select ) => {\n\t\t\t// Avoid unnecessary subscription.\n\t\t\tif ( ! isSectionBlock ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst {\n\t\t\t\tgetClientIdsOfDescendants,\n\t\t\t\tgetBlockName,\n\t\t\t\tgetBlockEditingMode,\n\t\t\t} = select( blockEditorStore );\n\t\t\treturn getClientIdsOfDescendants( clientId ).filter(\n\t\t\t\t( current ) =>\n\t\t\t\t\tgetBlockName( current ) !== 'core/list-item' &&\n\t\t\t\t\tgetBlockEditingMode( current ) === 'contentOnly'\n\t\t\t);\n\t\t},\n\t\t[ isSectionBlock, clientId ]\n\t);\n\n\treturn (\n\t\t<div className=\"block-editor-block-inspector\">\n\t\t\t<BlockCard\n\t\t\t\t{ ...blockInformation }\n\t\t\t\tclassName={ blockInformation.isSynced && 'is-synced' }\n\t\t\t/>\n\t\t\t<BlockVariationTransforms blockClientId={ clientId } />\n\t\t\t<BlockInfo.Slot />\n\t\t\t{ showTabs && (\n\t\t\t\t<InspectorControlsTabs\n\t\t\t\t\thasBlockStyles={ hasBlockStyles }\n\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\tblockName={ blockName }\n\t\t\t\t\ttabs={ availableTabs }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ ! showTabs && (\n\t\t\t\t<>\n\t\t\t\t\t{ hasBlockStyles && (\n\t\t\t\t\t\t<BlockStylesPanel clientId={ clientId } />\n\t\t\t\t\t) }\n\n\t\t\t\t\t{ contentClientIds && contentClientIds?.length > 0 && (\n\t\t\t\t\t\t<PanelBody title={ __( 'Content' ) }>\n\t\t\t\t\t\t\t<BlockQuickNavigation\n\t\t\t\t\t\t\t\tclientIds={ contentClientIds }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</PanelBody>\n\t\t\t\t\t) }\n\n\t\t\t\t\t{ ! isSectionBlock && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<InspectorControls.Slot />\n\t\t\t\t\t\t\t<InspectorControls.Slot group=\"list\" />\n\t\t\t\t\t\t\t<InspectorControls.Slot\n\t\t\t\t\t\t\t\tgroup=\"color\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Color' ) }\n\t\t\t\t\t\t\t\tclassName=\"color-block-support-panel__inner-wrapper\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<InspectorControls.Slot\n\t\t\t\t\t\t\t\tgroup=\"background\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Background image' ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<InspectorControls.Slot\n\t\t\t\t\t\t\t\tgroup=\"typography\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Typography' ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<InspectorControls.Slot\n\t\t\t\t\t\t\t\tgroup=\"dimensions\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Dimensions' ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<InspectorControls.Slot\n\t\t\t\t\t\t\t\tgroup=\"border\"\n\t\t\t\t\t\t\t\tlabel={ borderPanelLabel }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<InspectorControls.Slot group=\"styles\" />\n\t\t\t\t\t\t\t<PositionControls />\n\t\t\t\t\t\t\t<InspectorControls.Slot group=\"bindings\" />\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t<AdvancedControls />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\t\t\t\t</>\n\t\t\t) }\n\t\t\t<SkipToSelectedBlock key=\"back\" />\n\t\t</div>\n\t);\n};\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-inspector/README.md\n */\nexport default BlockInspector;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SACCC,YAAY,EACZC,8BAA8B,EAC9BC,KAAK,IAAIC,WAAW,QACd,mBAAmB;AAC1B,SAASC,SAAS,EAAEC,gBAAgB,IAAIC,MAAM,QAAQ,uBAAuB;AAC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C,IAAI;UACtBC,KAAK,EAAC,QAAQ;UACdC,KAAK,EAAGN;QAAkB,CAC1B,CAAC,eACF/B,IAAA,CAACX,iBAAiB,CAAC8C,IAAI;UAACC,KAAK,EAAC;QAAQ,CAAE,CAAC,eACzCpC,IAAA,CAACP,gBAAgB,IAAE,CAAC,eACpBO,IAAA,CAACX,iBAAiB,CAAC8C,IAAI;UAACC,KAAK,EAAC;QAAU,CAAE,CAAC,eAC3CpC,IAAA;UAAAQ,QAAA,eACCR,IAAA,CAACR,gBAAgB,IAAE;QAAC,CAChB,CAAC;MAAA,CACL,CACF;IAAA,CACA,CACF,eACDQ,IAAA,CAACnB,mBAAmB,MAAK,MAAQ,CAAC;EAAA,CAC9B,CAAC;AAER,CAAC;;AAED;AACA;AACA;AACA,eAAe4B,cAAc","ignoreList":[]}
|
|
@@ -12,5 +12,5 @@ const warning = /*#__PURE__*/_jsx(Warning, {
|
|
|
12
12
|
className: "block-editor-block-list__block-crash-warning",
|
|
13
13
|
children: __('This block has encountered an error and cannot be previewed.')
|
|
14
14
|
});
|
|
15
|
-
export default (
|
|
15
|
+
export default () => warning;
|
|
16
16
|
//# sourceMappingURL=block-crash-warning.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__","Warning","jsx","_jsx","warning","className","children"],"sources":["@wordpress/block-editor/src/components/block-list/block-crash-warning.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport Warning from '../warning';\n\nconst warning = (\n\t<Warning className=\"block-editor-block-list__block-crash-warning\">\n\t\t{ __( 'This block has encountered an error and cannot be previewed.' ) }\n\t</Warning>\n);\n\nexport default () => warning;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,OAAOC,OAAO,MAAM,YAAY;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEjC,MAAMC,OAAO,gBACZD,IAAA,CAACF,OAAO;EAACI,SAAS,EAAC,8CAA8C;EAAAC,QAAA,EAC9DN,EAAE,CAAE,8DAA+D;AAAC,CAC9D,CACT;AAED,
|
|
1
|
+
{"version":3,"names":["__","Warning","jsx","_jsx","warning","className","children"],"sources":["@wordpress/block-editor/src/components/block-list/block-crash-warning.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport Warning from '../warning';\n\nconst warning = (\n\t<Warning className=\"block-editor-block-list__block-crash-warning\">\n\t\t{ __( 'This block has encountered an error and cannot be previewed.' ) }\n\t</Warning>\n);\n\nexport default () => warning;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,OAAOC,OAAO,MAAM,YAAY;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEjC,MAAMC,OAAO,gBACZD,IAAA,CAACF,OAAO;EAACI,SAAS,EAAC,8CAA8C;EAAAC,QAAA,EAC9DN,EAAE,CAAE,8DAA+D;AAAC,CAC9D,CACT;AAED,eAAe,MAAMI,OAAO","ignoreList":[]}
|
|
@@ -11,5 +11,5 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
11
11
|
const warning = /*#__PURE__*/_jsx(Warning, {
|
|
12
12
|
message: __('This block has encountered an error and cannot be previewed.')
|
|
13
13
|
});
|
|
14
|
-
export default (
|
|
14
|
+
export default () => warning;
|
|
15
15
|
//# sourceMappingURL=block-crash-warning.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__","Warning","jsx","_jsx","warning","message"],"sources":["@wordpress/block-editor/src/components/block-list/block-crash-warning.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport Warning from '../warning';\n\nconst warning = (\n\t<Warning\n\t\tmessage={ __(\n\t\t\t'This block has encountered an error and cannot be previewed.'\n\t\t) }\n\t/>\n);\n\nexport default () => warning;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,OAAOC,OAAO,MAAM,YAAY;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEjC,MAAMC,OAAO,gBACZD,IAAA,CAACF,OAAO;EACPI,OAAO,EAAGL,EAAE,CACX,8DACD;AAAG,CACH,CACD;AAED,
|
|
1
|
+
{"version":3,"names":["__","Warning","jsx","_jsx","warning","message"],"sources":["@wordpress/block-editor/src/components/block-list/block-crash-warning.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport Warning from '../warning';\n\nconst warning = (\n\t<Warning\n\t\tmessage={ __(\n\t\t\t'This block has encountered an error and cannot be previewed.'\n\t\t) }\n\t/>\n);\n\nexport default () => warning;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,OAAOC,OAAO,MAAM,YAAY;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEjC,MAAMC,OAAO,gBACZD,IAAA,CAACF,OAAO;EACPI,OAAO,EAAGL,EAAE,CACX,8DACD;AAAG,CACH,CACD;AAED,eAAe,MAAMI,OAAO","ignoreList":[]}
|
|
@@ -13,9 +13,7 @@ import { useDispatch, useSelect } from '@wordpress/data';
|
|
|
13
13
|
import Warning from '../warning';
|
|
14
14
|
import BlockCompare from '../block-compare';
|
|
15
15
|
import { store as blockEditorStore } from '../../store';
|
|
16
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
18
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
17
|
const blockToBlocks = block => rawHandler({
|
|
20
18
|
HTML: block.originalContent
|
|
21
19
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__","_x","Button","Modal","useState","useCallback","useMemo","createBlock","rawHandler","useDispatch","useSelect","Warning","BlockCompare","store","blockEditorStore","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","blockToBlocks","block","HTML","originalContent","BlockInvalidWarning","clientId","canInsertHTMLBlock","canInsertClassicBlock","select","canInsertBlockType","getBlock","getBlockRootClientId","rootClientId","replaceBlock","compare","setCompare","onCompareClose","convert","toClassic","classicBlock","content","toHTML","htmlBlock","toBlocks","newBlocks","toRecoveredBlock","recoveredBlock","name","attributes","innerBlocks","secondaryActions","title","onClick","filter","Boolean","children","actions","__next40pxDefaultSize","variant","onRequestClose","className","onKeep","onConvert","convertor","convertButtonText"],"sources":["@wordpress/block-editor/src/components/block-list/block-invalid-warning.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport { Button, Modal } from '@wordpress/components';\nimport { useState, useCallback, useMemo } from '@wordpress/element';\nimport { createBlock, rawHandler } from '@wordpress/blocks';\nimport { useDispatch, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport Warning from '../warning';\nimport BlockCompare from '../block-compare';\nimport { store as blockEditorStore } from '../../store';\n\nconst blockToBlocks = ( block ) =>\n\trawHandler( {\n\t\tHTML: block.originalContent,\n\t} );\n\nexport default function BlockInvalidWarning( { clientId } ) {\n\tconst { block, canInsertHTMLBlock, canInsertClassicBlock } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { canInsertBlockType, getBlock, getBlockRootClientId } =\n\t\t\t\tselect( blockEditorStore );\n\n\t\t\tconst rootClientId = getBlockRootClientId( clientId );\n\n\t\t\treturn {\n\t\t\t\tblock: getBlock( clientId ),\n\t\t\t\tcanInsertHTMLBlock: canInsertBlockType(\n\t\t\t\t\t'core/html',\n\t\t\t\t\trootClientId\n\t\t\t\t),\n\t\t\t\tcanInsertClassicBlock: canInsertBlockType(\n\t\t\t\t\t'core/freeform',\n\t\t\t\t\trootClientId\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\tconst { replaceBlock } = useDispatch( blockEditorStore );\n\n\tconst [ compare, setCompare ] = useState( false );\n\tconst onCompareClose = useCallback( () => setCompare( false ), [] );\n\n\tconst convert = useMemo(\n\t\t() => ( {\n\t\t\ttoClassic() {\n\t\t\t\tconst classicBlock = createBlock( 'core/freeform', {\n\t\t\t\t\tcontent: block.originalContent,\n\t\t\t\t} );\n\t\t\t\treturn replaceBlock( block.clientId, classicBlock );\n\t\t\t},\n\t\t\ttoHTML() {\n\t\t\t\tconst htmlBlock = createBlock( 'core/html', {\n\t\t\t\t\tcontent: block.originalContent,\n\t\t\t\t} );\n\t\t\t\treturn replaceBlock( block.clientId, htmlBlock );\n\t\t\t},\n\t\t\ttoBlocks() {\n\t\t\t\tconst newBlocks = blockToBlocks( block );\n\t\t\t\treturn replaceBlock( block.clientId, newBlocks );\n\t\t\t},\n\t\t\ttoRecoveredBlock() {\n\t\t\t\tconst recoveredBlock = createBlock(\n\t\t\t\t\tblock.name,\n\t\t\t\t\tblock.attributes,\n\t\t\t\t\tblock.innerBlocks\n\t\t\t\t);\n\t\t\t\treturn replaceBlock( block.clientId, recoveredBlock );\n\t\t\t},\n\t\t} ),\n\t\t[ block, replaceBlock ]\n\t);\n\n\tconst secondaryActions = useMemo(\n\t\t() =>\n\t\t\t[\n\t\t\t\t{\n\t\t\t\t\t// translators: Button to fix block content\n\t\t\t\t\ttitle: _x( 'Resolve', 'imperative verb' ),\n\t\t\t\t\tonClick: () => setCompare( true ),\n\t\t\t\t},\n\t\t\t\tcanInsertHTMLBlock && {\n\t\t\t\t\ttitle: __( 'Convert to HTML' ),\n\t\t\t\t\tonClick: convert.toHTML,\n\t\t\t\t},\n\t\t\t\tcanInsertClassicBlock && {\n\t\t\t\t\ttitle: __( 'Convert to Classic Block' ),\n\t\t\t\t\tonClick: convert.toClassic,\n\t\t\t\t},\n\t\t\t].filter( Boolean ),\n\t\t[ canInsertHTMLBlock, canInsertClassicBlock, convert ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<Warning\n\t\t\t\tactions={ [\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tkey=\"recover\"\n\t\t\t\t\t\tonClick={ convert.toRecoveredBlock }\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Attempt recovery' ) }\n\t\t\t\t\t</Button>,\n\t\t\t\t] }\n\t\t\t\tsecondaryActions={ secondaryActions }\n\t\t\t>\n\t\t\t\t{ __( 'Block contains unexpected or invalid content.' ) }\n\t\t\t</Warning>\n\t\t\t{ compare && (\n\t\t\t\t<Modal\n\t\t\t\t\ttitle={\n\t\t\t\t\t\t// translators: Dialog title to fix block content\n\t\t\t\t\t\t__( 'Resolve Block' )\n\t\t\t\t\t}\n\t\t\t\t\tonRequestClose={ onCompareClose }\n\t\t\t\t\tclassName=\"block-editor-block-compare\"\n\t\t\t\t>\n\t\t\t\t\t<BlockCompare\n\t\t\t\t\t\tblock={ block }\n\t\t\t\t\t\tonKeep={ convert.toHTML }\n\t\t\t\t\t\tonConvert={ convert.toBlocks }\n\t\t\t\t\t\tconvertor={ blockToBlocks }\n\t\t\t\t\t\tconvertButtonText={ __( 'Convert to Blocks' ) }\n\t\t\t\t\t/>\n\t\t\t\t</Modal>\n\t\t\t) }\n\t\t</>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,EAAE,QAAQ,iBAAiB;AACxC,SAASC,MAAM,EAAEC,KAAK,QAAQ,uBAAuB;AACrD,SAASC,QAAQ,EAAEC,WAAW,EAAEC,OAAO,QAAQ,oBAAoB;AACnE,SAASC,WAAW,EAAEC,UAAU,QAAQ,mBAAmB;AAC3D,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;;AAExD;AACA;AACA;AACA,OAAOC,OAAO,MAAM,YAAY;AAChC,OAAOC,YAAY,MAAM,kBAAkB;AAC3C,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA
|
|
1
|
+
{"version":3,"names":["__","_x","Button","Modal","useState","useCallback","useMemo","createBlock","rawHandler","useDispatch","useSelect","Warning","BlockCompare","store","blockEditorStore","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","blockToBlocks","block","HTML","originalContent","BlockInvalidWarning","clientId","canInsertHTMLBlock","canInsertClassicBlock","select","canInsertBlockType","getBlock","getBlockRootClientId","rootClientId","replaceBlock","compare","setCompare","onCompareClose","convert","toClassic","classicBlock","content","toHTML","htmlBlock","toBlocks","newBlocks","toRecoveredBlock","recoveredBlock","name","attributes","innerBlocks","secondaryActions","title","onClick","filter","Boolean","children","actions","__next40pxDefaultSize","variant","onRequestClose","className","onKeep","onConvert","convertor","convertButtonText"],"sources":["@wordpress/block-editor/src/components/block-list/block-invalid-warning.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport { Button, Modal } from '@wordpress/components';\nimport { useState, useCallback, useMemo } from '@wordpress/element';\nimport { createBlock, rawHandler } from '@wordpress/blocks';\nimport { useDispatch, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport Warning from '../warning';\nimport BlockCompare from '../block-compare';\nimport { store as blockEditorStore } from '../../store';\n\nconst blockToBlocks = ( block ) =>\n\trawHandler( {\n\t\tHTML: block.originalContent,\n\t} );\n\nexport default function BlockInvalidWarning( { clientId } ) {\n\tconst { block, canInsertHTMLBlock, canInsertClassicBlock } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { canInsertBlockType, getBlock, getBlockRootClientId } =\n\t\t\t\tselect( blockEditorStore );\n\n\t\t\tconst rootClientId = getBlockRootClientId( clientId );\n\n\t\t\treturn {\n\t\t\t\tblock: getBlock( clientId ),\n\t\t\t\tcanInsertHTMLBlock: canInsertBlockType(\n\t\t\t\t\t'core/html',\n\t\t\t\t\trootClientId\n\t\t\t\t),\n\t\t\t\tcanInsertClassicBlock: canInsertBlockType(\n\t\t\t\t\t'core/freeform',\n\t\t\t\t\trootClientId\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\tconst { replaceBlock } = useDispatch( blockEditorStore );\n\n\tconst [ compare, setCompare ] = useState( false );\n\tconst onCompareClose = useCallback( () => setCompare( false ), [] );\n\n\tconst convert = useMemo(\n\t\t() => ( {\n\t\t\ttoClassic() {\n\t\t\t\tconst classicBlock = createBlock( 'core/freeform', {\n\t\t\t\t\tcontent: block.originalContent,\n\t\t\t\t} );\n\t\t\t\treturn replaceBlock( block.clientId, classicBlock );\n\t\t\t},\n\t\t\ttoHTML() {\n\t\t\t\tconst htmlBlock = createBlock( 'core/html', {\n\t\t\t\t\tcontent: block.originalContent,\n\t\t\t\t} );\n\t\t\t\treturn replaceBlock( block.clientId, htmlBlock );\n\t\t\t},\n\t\t\ttoBlocks() {\n\t\t\t\tconst newBlocks = blockToBlocks( block );\n\t\t\t\treturn replaceBlock( block.clientId, newBlocks );\n\t\t\t},\n\t\t\ttoRecoveredBlock() {\n\t\t\t\tconst recoveredBlock = createBlock(\n\t\t\t\t\tblock.name,\n\t\t\t\t\tblock.attributes,\n\t\t\t\t\tblock.innerBlocks\n\t\t\t\t);\n\t\t\t\treturn replaceBlock( block.clientId, recoveredBlock );\n\t\t\t},\n\t\t} ),\n\t\t[ block, replaceBlock ]\n\t);\n\n\tconst secondaryActions = useMemo(\n\t\t() =>\n\t\t\t[\n\t\t\t\t{\n\t\t\t\t\t// translators: Button to fix block content\n\t\t\t\t\ttitle: _x( 'Resolve', 'imperative verb' ),\n\t\t\t\t\tonClick: () => setCompare( true ),\n\t\t\t\t},\n\t\t\t\tcanInsertHTMLBlock && {\n\t\t\t\t\ttitle: __( 'Convert to HTML' ),\n\t\t\t\t\tonClick: convert.toHTML,\n\t\t\t\t},\n\t\t\t\tcanInsertClassicBlock && {\n\t\t\t\t\ttitle: __( 'Convert to Classic Block' ),\n\t\t\t\t\tonClick: convert.toClassic,\n\t\t\t\t},\n\t\t\t].filter( Boolean ),\n\t\t[ canInsertHTMLBlock, canInsertClassicBlock, convert ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<Warning\n\t\t\t\tactions={ [\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tkey=\"recover\"\n\t\t\t\t\t\tonClick={ convert.toRecoveredBlock }\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Attempt recovery' ) }\n\t\t\t\t\t</Button>,\n\t\t\t\t] }\n\t\t\t\tsecondaryActions={ secondaryActions }\n\t\t\t>\n\t\t\t\t{ __( 'Block contains unexpected or invalid content.' ) }\n\t\t\t</Warning>\n\t\t\t{ compare && (\n\t\t\t\t<Modal\n\t\t\t\t\ttitle={\n\t\t\t\t\t\t// translators: Dialog title to fix block content\n\t\t\t\t\t\t__( 'Resolve Block' )\n\t\t\t\t\t}\n\t\t\t\t\tonRequestClose={ onCompareClose }\n\t\t\t\t\tclassName=\"block-editor-block-compare\"\n\t\t\t\t>\n\t\t\t\t\t<BlockCompare\n\t\t\t\t\t\tblock={ block }\n\t\t\t\t\t\tonKeep={ convert.toHTML }\n\t\t\t\t\t\tonConvert={ convert.toBlocks }\n\t\t\t\t\t\tconvertor={ blockToBlocks }\n\t\t\t\t\t\tconvertButtonText={ __( 'Convert to Blocks' ) }\n\t\t\t\t\t/>\n\t\t\t\t</Modal>\n\t\t\t) }\n\t\t</>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,EAAE,QAAQ,iBAAiB;AACxC,SAASC,MAAM,EAAEC,KAAK,QAAQ,uBAAuB;AACrD,SAASC,QAAQ,EAAEC,WAAW,EAAEC,OAAO,QAAQ,oB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ACvCqD,OAAO,EAAEf,OAAO,CAACC;EAClB,CAAC,CACD,CAACe,MAAM,CAAEC,OAAQ,CAAC,EACpB,CAAE5B,kBAAkB,EAAEC,qBAAqB,EAAEU,OAAO,CACrD,CAAC;EAED,oBACClB,KAAA,CAAAF,SAAA;IAAAsC,QAAA,gBACCxC,IAAA,CAACL,OAAO;MACP8C,OAAO,EAAG,cACTzC,IAAA,CAACd,MAAM;QACNwD,qBAAqB;QAErBL,OAAO,EAAGf,OAAO,CAACQ,gBAAkB;QACpCa,OAAO,EAAC,SAAS;QAAAH,QAAA,EAEfxD,EAAE,CAAE,kBAAmB;MAAC,GAJtB,SAKG,CAAC,CACP;MACHmD,gBAAgB,EAAGA,gBAAkB;MAAAK,QAAA,EAEnCxD,EAAE,CAAE,+CAAgD;IAAC,CAC/C,CAAC,EACRmC,OAAO,iBACRnB,IAAA,CAACb,KAAK;MACLiD,KAAK;MACJ;MACApD,EAAE,CAAE,eAAgB,CACpB;MACD4D,cAAc,EAAGvB,cAAgB;MACjCwB,SAAS,EAAC,4BAA4B;MAAAL,QAAA,eAEtCxC,IAAA,CAACJ,YAAY;QACZU,KAAK,EAAGA,KAAO;QACfwC,MAAM,EAAGxB,OAAO,CAACI,MAAQ;QACzBqB,SAAS,EAAGzB,OAAO,CAACM,QAAU;QAC9BoB,SAAS,EAAG3C,aAAe;QAC3B4C,iBAAiB,EAAGjE,EAAE,CAAE,mBAAoB;MAAG,CAC/C;IAAC,CACI,CACP;EAAA,CACA,CAAC;AAEL","ignoreList":[]}
|
|
@@ -41,7 +41,7 @@ export default function BlockInvalidWarning({
|
|
|
41
41
|
blockTitle,
|
|
42
42
|
icon
|
|
43
43
|
} = useSelect(selector, [clientId]);
|
|
44
|
-
const accessibilityLabel = sprintf(
|
|
44
|
+
const accessibilityLabel = sprintf(/* translators: accessibility text for blocks with invalid content. %d: localized block title */
|
|
45
45
|
__('%s block. This block has invalid content'), blockTitle);
|
|
46
46
|
const {
|
|
47
47
|
replaceBlock
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["TouchableWithoutFeedback","__","sprintf","useSelect","useDispatch","createBlock","getBlockType","Warning","store","blockEditorStore","jsx","_jsx","BlockInvalidWarning","clientId","selector","select","getBlock","block","name","blockType","title","blockIcon","icon","blockTitle","accessibilityLabel","replaceBlock","recoverBlock","attributes","innerBlocks","attemptBlockRecovery","onPress","accessible","accessibilityRole","children","message"],"sources":["@wordpress/block-editor/src/components/block-list/block-invalid-warning.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { TouchableWithoutFeedback } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { createBlock, getBlockType } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport Warning from '../warning';\nimport { store as blockEditorStore } from '../../store';\n\nexport default function BlockInvalidWarning( { clientId } ) {\n\tconst selector = ( select ) => {\n\t\tconst { getBlock } = select( blockEditorStore );\n\t\tconst block = getBlock( clientId );\n\t\tconst { name } = block || {};\n\n\t\tconst blockType = getBlockType( name || 'core/missing' );\n\t\tconst title = blockType?.title;\n\t\tconst blockIcon = blockType?.icon;\n\n\t\treturn {\n\t\t\tblock,\n\t\t\tblockTitle: title,\n\t\t\ticon: blockIcon,\n\t\t};\n\t};\n\n\tconst { block, blockTitle, icon } = useSelect( selector, [ clientId ] );\n\n\tconst accessibilityLabel = sprintf(\n\t\t/* translators: accessibility text for blocks with invalid content. %d: localized block title */\n\t\t__( '%s block. This block has invalid content' ),\n\t\tblockTitle\n\t);\n\n\tconst { replaceBlock } = useDispatch( blockEditorStore );\n\n\tconst recoverBlock = ( { name, attributes, innerBlocks } ) =>\n\t\tcreateBlock( name, attributes, innerBlocks );\n\n\tconst attemptBlockRecovery = () => {\n\t\treplaceBlock( block.clientId, recoverBlock( block ) );\n\t};\n\n\treturn (\n\t\t<TouchableWithoutFeedback\n\t\t\tonPress={ attemptBlockRecovery }\n\t\t\taccessible\n\t\t\taccessibilityRole=\"button\"\n\t\t>\n\t\t\t<Warning\n\t\t\t\ttitle={ blockTitle }\n\t\t\t\t// eslint-disable-next-line @wordpress/i18n-no-collapsible-whitespace\n\t\t\t\tmessage={ __(\n\t\t\t\t\t'Problem displaying block. \\nTap to attempt block recovery.'\n\t\t\t\t) }\n\t\t\t\ticon={ icon }\n\t\t\t\taccessibilityLabel={ accessibilityLabel }\n\t\t\t/>\n\t\t</TouchableWithoutFeedback>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,wBAAwB,QAAQ,cAAc;;AAEvD;AACA;AACA;AACA,SAASC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,WAAW,EAAEC,YAAY,QAAQ,mBAAmB;;AAE7D;AACA;AACA;AACA,OAAOC,OAAO,MAAM,YAAY;AAChC,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAExD,eAAe,SAASC,mBAAmBA,CAAE;EAAEC;AAAS,CAAC,EAAG;EAC3D,MAAMC,QAAQ,GAAKC,MAAM,IAAM;IAC9B,MAAM;MAAEC;IAAS,CAAC,GAAGD,MAAM,CAAEN,gBAAiB,CAAC;IAC/C,MAAMQ,KAAK,GAAGD,QAAQ,CAAEH,QAAS,CAAC;IAClC,MAAM;MAAEK;IAAK,CAAC,GAAGD,KAAK,IAAI,CAAC,CAAC;IAE5B,MAAME,SAAS,GAAGb,YAAY,CAAEY,IAAI,IAAI,cAAe,CAAC;IACxD,MAAME,KAAK,GAAGD,SAAS,EAAEC,KAAK;IAC9B,MAAMC,SAAS,GAAGF,SAAS,EAAEG,IAAI;IAEjC,OAAO;MACNL,KAAK;MACLM,UAAU,EAAEH,KAAK;MACjBE,IAAI,EAAED;IACP,CAAC;EACF,CAAC;EAED,MAAM;IAAEJ,KAAK;IAAEM,UAAU;IAAED;EAAK,CAAC,GAAGnB,SAAS,CAAEW,QAAQ,EAAE,CAAED,QAAQ,CAAG,CAAC;EAEvE,MAAMW,kBAAkB,GAAGtB,OAAO,
|
|
1
|
+
{"version":3,"names":["TouchableWithoutFeedback","__","sprintf","useSelect","useDispatch","createBlock","getBlockType","Warning","store","blockEditorStore","jsx","_jsx","BlockInvalidWarning","clientId","selector","select","getBlock","block","name","blockType","title","blockIcon","icon","blockTitle","accessibilityLabel","replaceBlock","recoverBlock","attributes","innerBlocks","attemptBlockRecovery","onPress","accessible","accessibilityRole","children","message"],"sources":["@wordpress/block-editor/src/components/block-list/block-invalid-warning.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { TouchableWithoutFeedback } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { createBlock, getBlockType } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport Warning from '../warning';\nimport { store as blockEditorStore } from '../../store';\n\nexport default function BlockInvalidWarning( { clientId } ) {\n\tconst selector = ( select ) => {\n\t\tconst { getBlock } = select( blockEditorStore );\n\t\tconst block = getBlock( clientId );\n\t\tconst { name } = block || {};\n\n\t\tconst blockType = getBlockType( name || 'core/missing' );\n\t\tconst title = blockType?.title;\n\t\tconst blockIcon = blockType?.icon;\n\n\t\treturn {\n\t\t\tblock,\n\t\t\tblockTitle: title,\n\t\t\ticon: blockIcon,\n\t\t};\n\t};\n\n\tconst { block, blockTitle, icon } = useSelect( selector, [ clientId ] );\n\n\tconst accessibilityLabel = sprintf(\n\t\t/* translators: accessibility text for blocks with invalid content. %d: localized block title */\n\t\t__( '%s block. This block has invalid content' ),\n\t\tblockTitle\n\t);\n\n\tconst { replaceBlock } = useDispatch( blockEditorStore );\n\n\tconst recoverBlock = ( { name, attributes, innerBlocks } ) =>\n\t\tcreateBlock( name, attributes, innerBlocks );\n\n\tconst attemptBlockRecovery = () => {\n\t\treplaceBlock( block.clientId, recoverBlock( block ) );\n\t};\n\n\treturn (\n\t\t<TouchableWithoutFeedback\n\t\t\tonPress={ attemptBlockRecovery }\n\t\t\taccessible\n\t\t\taccessibilityRole=\"button\"\n\t\t>\n\t\t\t<Warning\n\t\t\t\ttitle={ blockTitle }\n\t\t\t\t// eslint-disable-next-line @wordpress/i18n-no-collapsible-whitespace\n\t\t\t\tmessage={ __(\n\t\t\t\t\t'Problem displaying block. \\nTap to attempt block recovery.'\n\t\t\t\t) }\n\t\t\t\ticon={ icon }\n\t\t\t\taccessibilityLabel={ accessibilityLabel }\n\t\t\t/>\n\t\t</TouchableWithoutFeedback>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,wBAAwB,QAAQ,cAAc;;AAEvD;AACA;AACA;AACA,SAASC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,WAAW,EAAEC,YAAY,QAAQ,mBAAmB;;AAE7D;AACA;AACA;AACA,OAAOC,OAAO,MAAM,YAAY;AAChC,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAExD,eAAe,SAASC,mBAAmBA,CAAE;EAAEC;AAAS,CAAC,EAAG;EAC3D,MAAMC,QAAQ,GAAKC,MAAM,IAAM;IAC9B,MAAM;MAAEC;IAAS,CAAC,GAAGD,MAAM,CAAEN,gBAAiB,CAAC;IAC/C,MAAMQ,KAAK,GAAGD,QAAQ,CAAEH,QAAS,CAAC;IAClC,MAAM;MAAEK;IAAK,CAAC,GAAGD,KAAK,IAAI,CAAC,CAAC;IAE5B,MAAME,SAAS,GAAGb,YAAY,CAAEY,IAAI,IAAI,cAAe,CAAC;IACxD,MAAME,KAAK,GAAGD,SAAS,EAAEC,KAAK;IAC9B,MAAMC,SAAS,GAAGF,SAAS,EAAEG,IAAI;IAEjC,OAAO;MACNL,KAAK;MACLM,UAAU,EAAEH,KAAK;MACjBE,IAAI,EAAED;IACP,CAAC;EACF,CAAC;EAED,MAAM;IAAEJ,KAAK;IAAEM,UAAU;IAAED;EAAK,CAAC,GAAGnB,SAAS,CAAEW,QAAQ,EAAE,CAAED,QAAQ,CAAG,CAAC;EAEvE,MAAMW,kBAAkB,GAAGtB,OAAO,CACjC;EACAD,EAAE,CAAE,0CAA2C,CAAC,EAChDsB,UACD,CAAC;EAED,MAAM;IAAEE;EAAa,CAAC,GAAGrB,WAAW,CAAEK,gBAAiB,CAAC;EAExD,MAAMiB,YAAY,GAAGA,CAAE;IAAER,IAAI;IAAES,UAAU;IAAEC;EAAY,CAAC,KACvDvB,WAAW,CAAEa,IAAI,EAAES,UAAU,EAAEC,WAAY,CAAC;EAE7C,MAAMC,oBAAoB,GAAGA,CAAA,KAAM;IAClCJ,YAAY,CAAER,KAAK,CAACJ,QAAQ,EAAEa,YAAY,CAAET,KAAM,CAAE,CAAC;EACtD,CAAC;EAED,oBACCN,IAAA,CAACX,wBAAwB;IACxB8B,OAAO,EAAGD,oBAAsB;IAChCE,UAAU;IACVC,iBAAiB,EAAC,QAAQ;IAAAC,QAAA,eAE1BtB,IAAA,CAACJ,OAAO;MACPa,KAAK,EAAGG;MACR;MAAA;MACAW,OAAO,EAAGjC,EAAE,CACX,4DACD,CAAG;MACHqB,IAAI,EAAGA,IAAM;MACbE,kBAAkB,EAAGA;IAAoB,CACzC;EAAC,CACuB,CAAC;AAE7B","ignoreList":[]}
|
|
@@ -37,8 +37,7 @@ import { useEditorWrapperStyles } from '../../hooks/use-editor-wrapper-styles';
|
|
|
37
37
|
*
|
|
38
38
|
* @return {Component} The rendered block list item content.
|
|
39
39
|
*/
|
|
40
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
41
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
40
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
42
41
|
function BlockListItemContent({
|
|
43
42
|
blockWidth,
|
|
44
43
|
clientId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["View","useSelect","Block","Grid","BlockInsertionPoint","store","blockEditorStore","useEditorWrapperStyles","jsx","_jsx","jsxs","_jsxs","BlockListItemContent","blockWidth","clientId","contentResizeMode","contentStyle","index","isStackedHorizontally","marginHorizontal","marginVertical","onAddBlock","onDeleteBlock","parentWidth","rootClientId","shouldShowInnerBlockAppender","blockAlignment","blockName","hasParents","parentBlockAlignment","parentBlockName","shouldShowInsertionPointAfter","shouldShowInsertionPointBefore","select","getBlockAttributes","getBlockInsertionPoint","getBlockName","getBlockOrder","isBlockInsertionPointVisible","blockClientIds","insertionPoint","insertionPointVisibleInCurrentRoot","isListEmpty","length","isInsertionPointBeforeBlock","isInsertionPointAtEnd","isBlockLastInList","showInsertionPointBefore","showInsertionPointAfter","blockHasParents","name","parentName","align","textAlign","parentBlockAlign","wrapperStyles","margin","shouldShowBlockInsertionPointAfter","style","children","testID","BlockListItem","props","isGridItem","numOfColumns","tileCount","tileIndex","restProps","maxWidth"],"sources":["@wordpress/block-editor/src/components/block-list/block-list-item.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { View } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport Block from './block';\nimport Grid from './grid-item';\nimport BlockInsertionPoint from './insertion-point';\nimport { store as blockEditorStore } from '../../store';\nimport { useEditorWrapperStyles } from '../../hooks/use-editor-wrapper-styles';\n\n/**\n * BlockListItemContent component. Renders a block with an optional insertion point.\n *\n * @param {Object} props Component properties.\n * @param {number} props.blockWidth The width of the block.\n * @param {string} props.clientId The block client ID.\n * @param {string} props.contentResizeMode The content resize mode, e.g \"stretch\".\n * @param {Object} props.contentStyle Styles for the block content\n * @param {Object} props.index Block item index\n * @param {boolean} props.isStackedHorizontally Whether the block is stacked horizontally.\n * @param {number} props.marginHorizontal The horizontal margin.\n * @param {number} props.marginVertical The vertical margin.\n * @param {Function} props.onAddBlock On add block callback.\n * @param {Function} props.onDeleteBlock On delete block callback.\n * @param {number} props.parentWidth The width of the parent block.\n * @param {string} props.rootClientId The root client ID.\n * @param {Function} props.shouldShowInnerBlockAppender Whether to show the inner block appender.\n *\n * @return {Component} The rendered block list item content.\n */\nfunction BlockListItemContent( {\n\tblockWidth,\n\tclientId,\n\tcontentResizeMode,\n\tcontentStyle,\n\tindex,\n\tisStackedHorizontally,\n\tmarginHorizontal,\n\tmarginVertical,\n\tonAddBlock,\n\tonDeleteBlock,\n\tparentWidth,\n\trootClientId,\n\tshouldShowInnerBlockAppender,\n} ) {\n\tconst {\n\t\tblockAlignment,\n\t\tblockName,\n\t\thasParents,\n\t\tparentBlockAlignment,\n\t\tparentBlockName,\n\t\tshouldShowInsertionPointAfter,\n\t\tshouldShowInsertionPointBefore,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockAttributes,\n\t\t\t\tgetBlockInsertionPoint,\n\t\t\t\tgetBlockName,\n\t\t\t\tgetBlockOrder,\n\t\t\t\tisBlockInsertionPointVisible,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst blockClientIds = getBlockOrder( rootClientId );\n\t\t\tconst insertionPoint = getBlockInsertionPoint();\n\n\t\t\tconst insertionPointVisibleInCurrentRoot =\n\t\t\t\t! isStackedHorizontally &&\n\t\t\t\tisBlockInsertionPointVisible() &&\n\t\t\t\tinsertionPoint.rootClientId === rootClientId;\n\n\t\t\tconst isListEmpty = blockClientIds.length === 0;\n\t\t\tconst isInsertionPointBeforeBlock =\n\t\t\t\tblockClientIds[ insertionPoint.index ] === clientId;\n\t\t\tconst isInsertionPointAtEnd =\n\t\t\t\tblockClientIds.length === insertionPoint.index;\n\t\t\tconst isBlockLastInList =\n\t\t\t\tblockClientIds[ insertionPoint.index - 1 ] === clientId;\n\n\t\t\tconst showInsertionPointBefore =\n\t\t\t\tinsertionPointVisibleInCurrentRoot &&\n\t\t\t\t( isListEmpty || isInsertionPointBeforeBlock );\n\n\t\t\tconst showInsertionPointAfter =\n\t\t\t\tinsertionPointVisibleInCurrentRoot &&\n\t\t\t\tisInsertionPointAtEnd &&\n\t\t\t\tisBlockLastInList;\n\n\t\t\tconst blockHasParents = !! rootClientId;\n\t\t\tconst name = getBlockName( clientId );\n\t\t\tconst parentName = getBlockName( rootClientId );\n\t\t\tconst { align } = getBlockAttributes( clientId ) || {};\n\t\t\tconst { textAlign: parentBlockAlign } =\n\t\t\t\tgetBlockAttributes( rootClientId ) || {};\n\n\t\t\treturn {\n\t\t\t\tblockAlignment: align,\n\t\t\t\tblockName: name,\n\t\t\t\thasParents: blockHasParents,\n\t\t\t\tparentBlockAlignment: parentBlockAlign,\n\t\t\t\tparentBlockName: parentName,\n\t\t\t\tshouldShowInsertionPointAfter: showInsertionPointAfter,\n\t\t\t\tshouldShowInsertionPointBefore: showInsertionPointBefore,\n\t\t\t};\n\t\t},\n\t\t[ isStackedHorizontally, rootClientId, clientId ]\n\t);\n\n\tconst [ wrapperStyles, margin ] = useEditorWrapperStyles( {\n\t\talign: blockAlignment,\n\t\tblockName,\n\t\tblockWidth,\n\t\tcontentResizeMode,\n\t\thasParents,\n\t\tmarginHorizontal,\n\t\tparentBlockAlignment,\n\t\tparentBlockName,\n\t\tparentWidth,\n\t} );\n\n\tconst shouldShowBlockInsertionPointAfter =\n\t\t! shouldShowInnerBlockAppender() && shouldShowInsertionPointAfter;\n\n\treturn (\n\t\t<View style={ wrapperStyles }>\n\t\t\t{ shouldShowInsertionPointBefore && (\n\t\t\t\t<BlockInsertionPoint\n\t\t\t\t\ttestID={ `block-insertion-point-before-row-${ index + 1 }` }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t<Block\n\t\t\t\tblockWidth={ blockWidth }\n\t\t\t\tclientId={ clientId }\n\t\t\t\tcontentStyle={ contentStyle }\n\t\t\t\tisStackedHorizontally={ isStackedHorizontally }\n\t\t\t\tmarginHorizontal={ margin }\n\t\t\t\tmarginVertical={ marginVertical }\n\t\t\t\tonAddBlock={ onAddBlock }\n\t\t\t\tparentBlockAlignment={ parentBlockAlignment }\n\t\t\t\tonDeleteBlock={ onDeleteBlock }\n\t\t\t\tparentWidth={ parentWidth }\n\t\t\t\trootClientId={ rootClientId }\n\t\t\t/>\n\t\t\t{ shouldShowBlockInsertionPointAfter && (\n\t\t\t\t<BlockInsertionPoint\n\t\t\t\t\ttestID={ `block-insertion-point-after-row-${ index + 1 }` }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</View>\n\t);\n}\n\n/**\n * BlockListItem component. Renders a block list item either as a grid item or as a standalone item.\n *\n * @param {Object} props Component properties.\n * @param {boolean} props.isGridItem Whether the block is a grid item.\n * @param {number} props.numOfColumns The number of columns for grid layout.\n * @param {number} props.parentWidth The width of the parent block.\n * @param {number} props.tileCount The total number of tiles in the grid.\n * @param {number} props.tileIndex The index of the current tile in the grid.\n * @param {number} props.blockWidth The width of the block.\n * @param {string} props.clientId The block client ID.\n * @param {string} props.contentResizeMode The content resize mode, e.g \"stretch\".\n * @param {Object} props.contentStyle Styles for the block content\n * @param {Object} props.index Block item index\n * @param {boolean} props.isStackedHorizontally Whether the block is stacked horizontally.\n * @param {number} props.marginHorizontal The horizontal margin.\n * @param {number} props.marginVertical The vertical margin.\n * @param {Function} props.onAddBlock On add block callback.\n * @param {Function} props.onDeleteBlock On delete block callback.\n * @param {string} props.rootClientId The root client ID.\n * @param {Function} props.shouldShowInnerBlockAppender Whether to show the inner block appender.\n *\n * @return {Component|null} The rendered block list item or null if the block width is not provided.\n */\nfunction BlockListItem( props ) {\n\tconst { isGridItem, numOfColumns, tileCount, tileIndex, ...restProps } =\n\t\tprops;\n\n\tif ( ! props?.blockWidth ) {\n\t\treturn null;\n\t}\n\n\tif ( isGridItem ) {\n\t\treturn (\n\t\t\t<Grid\n\t\t\t\tmaxWidth={ props?.parentWidth }\n\t\t\t\tnumOfColumns={ numOfColumns }\n\t\t\t\ttileCount={ tileCount }\n\t\t\t\tindex={ tileIndex }\n\t\t\t>\n\t\t\t\t<BlockListItemContent { ...restProps } />\n\t\t\t</Grid>\n\t\t);\n\t}\n\n\treturn <BlockListItemContent { ...restProps } />;\n}\n\nexport default BlockListItem;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,IAAI,QAAQ,cAAc;;AAEnC;AACA;AACA;AACA,SAASC,SAAS,QAAQ,iBAAiB;;AAE3C;AACA;AACA;AACA,OAAOC,KAAK,MAAM,SAAS;AAC3B,OAAOC,IAAI,MAAM,aAAa;AAC9B,OAAOC,mBAAmB,MAAM,mBAAmB;AACnD,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,SAASC,sBAAsB,QAAQ,uCAAuC;;AAE9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAnBA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAoBA,SAASC,oBAAoBA,CAAE;EAC9BC,UAAU;EACVC,QAAQ;EACRC,iBAAiB;EACjBC,YAAY;EACZC,KAAK;EACLC,qBAAqB;EACrBC,gBAAgB;EAChBC,cAAc;EACdC,UAAU;EACVC,aAAa;EACbC,WAAW;EACXC,YAAY;EACZC;AACD,CAAC,EAAG;EACH,MAAM;IACLC,cAAc;IACdC,SAAS;IACTC,UAAU;IACVC,oBAAoB;IACpBC,eAAe;IACfC,6BAA6B;IAC7BC;EACD,CAAC,GAAG/B,SAAS,CACVgC,MAAM,IAAM;IACb,MAAM;MACLC,kBAAkB;MAClBC,sBAAsB;MACtBC,YAAY;MACZC,aAAa;MACbC;IACD,CAAC,GAAGL,MAAM,CAAE3B,gBAAiB,CAAC;IAC9B,MAAMiC,cAAc,GAAGF,aAAa,CAAEb,YAAa,CAAC;IACpD,MAAMgB,cAAc,GAAGL,sBAAsB,CAAC,CAAC;IAE/C,MAAMM,kCAAkC,GACv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AAG;IAC1B,OAAO,IAAI;EACZ;EAEA,IAAKkD,UAAU,EAAG;IACjB,oBACCtD,IAAA,CAACN,IAAI;MACJiE,QAAQ,EAAGN,KAAK,EAAEvC,WAAa;MAC/ByC,YAAY,EAAGA,YAAc;MAC7BC,SAAS,EAAGA,SAAW;MACvBhD,KAAK,EAAGiD,SAAW;MAAAP,QAAA,eAEnBlD,IAAA,CAACG,oBAAoB;QAAA,GAAMuD;MAAS,CAAI;IAAC,CACpC,CAAC;EAET;EAEA,oBAAO1D,IAAA,CAACG,oBAAoB;IAAA,GAAMuD;EAAS,CAAI,CAAC;AACjD;AAEA,eAAeN,aAAa","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["View","useSelect","Block","Grid","BlockInsertionPoint","store","blockEditorStore","useEditorWrapperStyles","jsx","_jsx","jsxs","_jsxs","BlockListItemContent","blockWidth","clientId","contentResizeMode","contentStyle","index","isStackedHorizontally","marginHorizontal","marginVertical","onAddBlock","onDeleteBlock","parentWidth","rootClientId","shouldShowInnerBlockAppender","blockAlignment","blockName","hasParents","parentBlockAlignment","parentBlockName","shouldShowInsertionPointAfter","shouldShowInsertionPointBefore","select","getBlockAttributes","getBlockInsertionPoint","getBlockName","getBlockOrder","isBlockInsertionPointVisible","blockClientIds","insertionPoint","insertionPointVisibleInCurrentRoot","isListEmpty","length","isInsertionPointBeforeBlock","isInsertionPointAtEnd","isBlockLastInList","showInsertionPointBefore","showInsertionPointAfter","blockHasParents","name","parentName","align","textAlign","parentBlockAlign","wrapperStyles","margin","shouldShowBlockInsertionPointAfter","style","children","testID","BlockListItem","props","isGridItem","numOfColumns","tileCount","tileIndex","restProps","maxWidth"],"sources":["@wordpress/block-editor/src/components/block-list/block-list-item.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { View } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport Block from './block';\nimport Grid from './grid-item';\nimport BlockInsertionPoint from './insertion-point';\nimport { store as blockEditorStore } from '../../store';\nimport { useEditorWrapperStyles } from '../../hooks/use-editor-wrapper-styles';\n\n/**\n * BlockListItemContent component. Renders a block with an optional insertion point.\n *\n * @param {Object} props Component properties.\n * @param {number} props.blockWidth The width of the block.\n * @param {string} props.clientId The block client ID.\n * @param {string} props.contentResizeMode The content resize mode, e.g \"stretch\".\n * @param {Object} props.contentStyle Styles for the block content\n * @param {Object} props.index Block item index\n * @param {boolean} props.isStackedHorizontally Whether the block is stacked horizontally.\n * @param {number} props.marginHorizontal The horizontal margin.\n * @param {number} props.marginVertical The vertical margin.\n * @param {Function} props.onAddBlock On add block callback.\n * @param {Function} props.onDeleteBlock On delete block callback.\n * @param {number} props.parentWidth The width of the parent block.\n * @param {string} props.rootClientId The root client ID.\n * @param {Function} props.shouldShowInnerBlockAppender Whether to show the inner block appender.\n *\n * @return {Component} The rendered block list item content.\n */\nfunction BlockListItemContent( {\n\tblockWidth,\n\tclientId,\n\tcontentResizeMode,\n\tcontentStyle,\n\tindex,\n\tisStackedHorizontally,\n\tmarginHorizontal,\n\tmarginVertical,\n\tonAddBlock,\n\tonDeleteBlock,\n\tparentWidth,\n\trootClientId,\n\tshouldShowInnerBlockAppender,\n} ) {\n\tconst {\n\t\tblockAlignment,\n\t\tblockName,\n\t\thasParents,\n\t\tparentBlockAlignment,\n\t\tparentBlockName,\n\t\tshouldShowInsertionPointAfter,\n\t\tshouldShowInsertionPointBefore,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockAttributes,\n\t\t\t\tgetBlockInsertionPoint,\n\t\t\t\tgetBlockName,\n\t\t\t\tgetBlockOrder,\n\t\t\t\tisBlockInsertionPointVisible,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst blockClientIds = getBlockOrder( rootClientId );\n\t\t\tconst insertionPoint = getBlockInsertionPoint();\n\n\t\t\tconst insertionPointVisibleInCurrentRoot =\n\t\t\t\t! isStackedHorizontally &&\n\t\t\t\tisBlockInsertionPointVisible() &&\n\t\t\t\tinsertionPoint.rootClientId === rootClientId;\n\n\t\t\tconst isListEmpty = blockClientIds.length === 0;\n\t\t\tconst isInsertionPointBeforeBlock =\n\t\t\t\tblockClientIds[ insertionPoint.index ] === clientId;\n\t\t\tconst isInsertionPointAtEnd =\n\t\t\t\tblockClientIds.length === insertionPoint.index;\n\t\t\tconst isBlockLastInList =\n\t\t\t\tblockClientIds[ insertionPoint.index - 1 ] === clientId;\n\n\t\t\tconst showInsertionPointBefore =\n\t\t\t\tinsertionPointVisibleInCurrentRoot &&\n\t\t\t\t( isListEmpty || isInsertionPointBeforeBlock );\n\n\t\t\tconst showInsertionPointAfter =\n\t\t\t\tinsertionPointVisibleInCurrentRoot &&\n\t\t\t\tisInsertionPointAtEnd &&\n\t\t\t\tisBlockLastInList;\n\n\t\t\tconst blockHasParents = !! rootClientId;\n\t\t\tconst name = getBlockName( clientId );\n\t\t\tconst parentName = getBlockName( rootClientId );\n\t\t\tconst { align } = getBlockAttributes( clientId ) || {};\n\t\t\tconst { textAlign: parentBlockAlign } =\n\t\t\t\tgetBlockAttributes( rootClientId ) || {};\n\n\t\t\treturn {\n\t\t\t\tblockAlignment: align,\n\t\t\t\tblockName: name,\n\t\t\t\thasParents: blockHasParents,\n\t\t\t\tparentBlockAlignment: parentBlockAlign,\n\t\t\t\tparentBlockName: parentName,\n\t\t\t\tshouldShowInsertionPointAfter: showInsertionPointAfter,\n\t\t\t\tshouldShowInsertionPointBefore: showInsertionPointBefore,\n\t\t\t};\n\t\t},\n\t\t[ isStackedHorizontally, rootClientId, clientId ]\n\t);\n\n\tconst [ wrapperStyles, margin ] = useEditorWrapperStyles( {\n\t\talign: blockAlignment,\n\t\tblockName,\n\t\tblockWidth,\n\t\tcontentResizeMode,\n\t\thasParents,\n\t\tmarginHorizontal,\n\t\tparentBlockAlignment,\n\t\tparentBlockName,\n\t\tparentWidth,\n\t} );\n\n\tconst shouldShowBlockInsertionPointAfter =\n\t\t! shouldShowInnerBlockAppender() && shouldShowInsertionPointAfter;\n\n\treturn (\n\t\t<View style={ wrapperStyles }>\n\t\t\t{ shouldShowInsertionPointBefore && (\n\t\t\t\t<BlockInsertionPoint\n\t\t\t\t\ttestID={ `block-insertion-point-before-row-${ index + 1 }` }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t<Block\n\t\t\t\tblockWidth={ blockWidth }\n\t\t\t\tclientId={ clientId }\n\t\t\t\tcontentStyle={ contentStyle }\n\t\t\t\tisStackedHorizontally={ isStackedHorizontally }\n\t\t\t\tmarginHorizontal={ margin }\n\t\t\t\tmarginVertical={ marginVertical }\n\t\t\t\tonAddBlock={ onAddBlock }\n\t\t\t\tparentBlockAlignment={ parentBlockAlignment }\n\t\t\t\tonDeleteBlock={ onDeleteBlock }\n\t\t\t\tparentWidth={ parentWidth }\n\t\t\t\trootClientId={ rootClientId }\n\t\t\t/>\n\t\t\t{ shouldShowBlockInsertionPointAfter && (\n\t\t\t\t<BlockInsertionPoint\n\t\t\t\t\ttestID={ `block-insertion-point-after-row-${ index + 1 }` }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</View>\n\t);\n}\n\n/**\n * BlockListItem component. Renders a block list item either as a grid item or as a standalone item.\n *\n * @param {Object} props Component properties.\n * @param {boolean} props.isGridItem Whether the block is a grid item.\n * @param {number} props.numOfColumns The number of columns for grid layout.\n * @param {number} props.parentWidth The width of the parent block.\n * @param {number} props.tileCount The total number of tiles in the grid.\n * @param {number} props.tileIndex The index of the current tile in the grid.\n * @param {number} props.blockWidth The width of the block.\n * @param {string} props.clientId The block client ID.\n * @param {string} props.contentResizeMode The content resize mode, e.g \"stretch\".\n * @param {Object} props.contentStyle Styles for the block content\n * @param {Object} props.index Block item index\n * @param {boolean} props.isStackedHorizontally Whether the block is stacked horizontally.\n * @param {number} props.marginHorizontal The horizontal margin.\n * @param {number} props.marginVertical The vertical margin.\n * @param {Function} props.onAddBlock On add block callback.\n * @param {Function} props.onDeleteBlock On delete block callback.\n * @param {string} props.rootClientId The root client ID.\n * @param {Function} props.shouldShowInnerBlockAppender Whether to show the inner block appender.\n *\n * @return {Component|null} The rendered block list item or null if the block width is not provided.\n */\nfunction BlockListItem( props ) {\n\tconst { isGridItem, numOfColumns, tileCount, tileIndex, ...restProps } =\n\t\tprops;\n\n\tif ( ! props?.blockWidth ) {\n\t\treturn null;\n\t}\n\n\tif ( isGridItem ) {\n\t\treturn (\n\t\t\t<Grid\n\t\t\t\tmaxWidth={ props?.parentWidth }\n\t\t\t\tnumOfColumns={ numOfColumns }\n\t\t\t\ttileCount={ tileCount }\n\t\t\t\tindex={ tileIndex }\n\t\t\t>\n\t\t\t\t<BlockListItemContent { ...restProps } />\n\t\t\t</Grid>\n\t\t);\n\t}\n\n\treturn <BlockListItemContent { ...restProps } />;\n}\n\nexport default BlockListItem;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,IAAI,QAAQ,cAAc;;AAEnC;AACA;AACA;AACA,SAASC,SAAS,QAAQ,iBAAiB;;AAE3C;AACA;AACA;AACA,OAAOC,KAAK,MAAM,SAAS;AAC3B,OAAOC,IAAI,MAAM,aAAa;AAC9B,OAAOC,mBAAmB,MAAM,mBAAmB;AACnD,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,SAASC,sBAAsB,QAAQ,uCAAuC;;AAE9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAnBA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAoBA,SAASC,oBAAoBA,CAAE;EAC9BC,UAAU;EACVC,QAAQ;EACRC,iBAAiB;EACjBC,YAAY;EACZC,KAAK;EACLC,qBAAqB;EACrBC,gBAAgB;EAChBC,cAAc;EACdC,UAAU;EACVC,aAAa;EACbC,WAAW;EACXC,YAAY;EACZC;AACD,CAAC,EAAG;EACH,MAAM;IACLC,cAAc;IACdC,SAAS;I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AAG,CAAC;IAAK,CAC3D,CACD;EAAA,CACI,CAAC;AAET;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS4C,aAAaA,CAAEC,KAAK,EAAG;EAC/B,MAAM;IAAEC,UAAU;IAAEC,YAAY;IAAEC,SAAS;IAAEC,SAAS;IAAE,GAAGC;EAAU,CAAC,GACrEL,KAAK;EAEN,IAAK,CAAEA,KAAK,EAAEjD,UAAU,EAAG;IAC1B,OAAO,IAAI;EACZ;EAEA,IAAKkD,UAAU,EAAG;IACjB,oBACCtD,IAAA,CAACN,IAAI;MACJiE,QAAQ,EAAGN,KAAK,EAAEvC,WAAa;MAC/ByC,YAAY,EAAGA,YAAc;MAC7BC,SAAS,EAAGA,SAAW;MACvBhD,KAAK,EAAGiD,SAAW;MAAAP,QAAA,eAEnBlD,IAAA,CAACG,oBAAoB;QAAA,GAAMuD;MAAS,CAAI;IAAC,CACpC,CAAC;EAET;EAEA,oBAAO1D,IAAA,CAACG,oBAAoB;IAAA,GAAMuD;EAAS,CAAI,CAAC;AACjD;AAEA,eAAeN,aAAa","ignoreList":[]}
|
|
@@ -20,8 +20,7 @@ import useBlockDisplayInformation from '../use-block-display-information';
|
|
|
20
20
|
import SubdirectorSVG from './subdirectory-icon';
|
|
21
21
|
import { store as blockEditorStore } from '../../store';
|
|
22
22
|
import styles from './block-selection-button.scss';
|
|
23
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
23
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
25
24
|
const BlockSelectionButton = ({
|
|
26
25
|
clientId,
|
|
27
26
|
rootClientId,
|