@wordpress/block-editor 14.12.0 → 14.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/build/autocompleters/block.js +0 -1
- package/build/autocompleters/block.js.map +1 -1
- package/build/autocompleters/link.js +0 -1
- package/build/autocompleters/link.js.map +1 -1
- package/build/components/alignment-control/ui.js +0 -1
- package/build/components/alignment-control/ui.js.map +1 -1
- package/build/components/autocomplete/index.js +0 -1
- package/build/components/autocomplete/index.js.map +1 -1
- package/build/components/background-image-control/index.js +2 -6
- package/build/components/background-image-control/index.js.map +1 -1
- package/build/components/block-actions/index.js +0 -1
- package/build/components/block-actions/index.js.map +1 -1
- package/build/components/block-alignment-control/ui.js +0 -1
- package/build/components/block-alignment-control/ui.js.map +1 -1
- package/build/components/block-alignment-control/ui.native.js +0 -1
- package/build/components/block-alignment-control/ui.native.js.map +1 -1
- package/build/components/block-alignment-control/use-available-alignments.js +0 -1
- package/build/components/block-alignment-control/use-available-alignments.js.map +1 -1
- package/build/components/block-breadcrumb/index.js +0 -1
- package/build/components/block-breadcrumb/index.js.map +1 -1
- package/build/components/block-compare/index.js +0 -1
- package/build/components/block-compare/index.js.map +1 -1
- package/build/components/block-controls/fill.js +0 -1
- package/build/components/block-controls/fill.js.map +1 -1
- package/build/components/block-edit/edit.js +0 -1
- package/build/components/block-edit/edit.js.map +1 -1
- package/build/components/block-edit/edit.native.js +0 -1
- package/build/components/block-edit/edit.native.js.map +1 -1
- package/build/components/block-heading-level-dropdown/index.js +0 -1
- package/build/components/block-heading-level-dropdown/index.js.map +1 -1
- package/build/components/block-heading-level-dropdown/index.native.js +0 -1
- package/build/components/block-heading-level-dropdown/index.native.js.map +1 -1
- package/build/components/block-inspector/index.js +0 -1
- package/build/components/block-inspector/index.js.map +1 -1
- package/build/components/block-list/block-invalid-warning.js +0 -1
- package/build/components/block-list/block-invalid-warning.js.map +1 -1
- package/build/components/block-list/block-list-context.native.js +0 -1
- package/build/components/block-list/block-list-context.native.js.map +1 -1
- package/build/components/block-list/block.js +0 -1
- package/build/components/block-list/block.js.map +1 -1
- package/build/components/block-list/block.native.js +0 -1
- package/build/components/block-list/block.native.js.map +1 -1
- package/build/components/block-list/index.js +9 -6
- package/build/components/block-list/index.js.map +1 -1
- package/build/components/block-list/index.native.js +0 -1
- package/build/components/block-list/index.native.js.map +1 -1
- package/build/components/block-list/use-block-props/use-focus-first-element.js +0 -1
- package/build/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
- package/build/components/block-list/use-in-between-inserter.js +0 -1
- package/build/components/block-list/use-in-between-inserter.js.map +1 -1
- package/build/components/block-lock/modal.js +0 -1
- package/build/components/block-lock/modal.js.map +1 -1
- package/build/components/block-manager/category.js +0 -1
- package/build/components/block-manager/category.js.map +1 -1
- package/build/components/block-manager/checklist.js +0 -1
- package/build/components/block-manager/checklist.js.map +1 -1
- package/build/components/block-manager/index.js +0 -1
- package/build/components/block-manager/index.js.map +1 -1
- package/build/components/block-media-update-progress/index.native.js +0 -1
- package/build/components/block-media-update-progress/index.native.js.map +1 -1
- package/build/components/block-mover/index.native.js +0 -1
- package/build/components/block-mover/index.native.js.map +1 -1
- package/build/components/block-mover/mover-description.native.js +0 -1
- package/build/components/block-mover/mover-description.native.js.map +1 -1
- package/build/components/block-pattern-setup/index.js +0 -1
- package/build/components/block-pattern-setup/index.js.map +1 -1
- package/build/components/block-pattern-setup/use-patterns-setup.js +0 -1
- package/build/components/block-pattern-setup/use-patterns-setup.js.map +1 -1
- package/build/components/block-patterns-list/index.js +0 -1
- package/build/components/block-patterns-list/index.js.map +1 -1
- package/build/components/block-popover/use-popover-scroll.js +13 -7
- package/build/components/block-popover/use-popover-scroll.js.map +1 -1
- package/build/components/block-quick-navigation/index.js +0 -1
- package/build/components/block-quick-navigation/index.js.map +1 -1
- package/build/components/block-rename/modal.js +0 -1
- package/build/components/block-rename/modal.js.map +1 -1
- package/build/components/block-settings-menu/block-settings-dropdown.js +26 -7
- package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build/components/block-styles/index.js +0 -1
- package/build/components/block-styles/index.js.map +1 -1
- package/build/components/block-styles/index.native.js +0 -1
- package/build/components/block-styles/index.native.js.map +1 -1
- package/build/components/block-styles/menu-items.js +0 -1
- package/build/components/block-styles/menu-items.js.map +1 -1
- package/build/components/block-styles/preview.native.js +0 -1
- package/build/components/block-styles/preview.native.js.map +1 -1
- package/build/components/block-switcher/block-transformations-menu.js +0 -1
- package/build/components/block-switcher/block-transformations-menu.js.map +1 -1
- package/build/components/block-switcher/block-transformations-menu.native.js +0 -1
- package/build/components/block-switcher/block-transformations-menu.native.js.map +1 -1
- package/build/components/block-switcher/block-variation-transformations.js +0 -1
- package/build/components/block-switcher/block-variation-transformations.js.map +1 -1
- package/build/components/block-switcher/index.js +0 -1
- package/build/components/block-switcher/index.js.map +1 -1
- package/build/components/block-switcher/pattern-transformations-menu.js +0 -1
- package/build/components/block-switcher/pattern-transformations-menu.js.map +1 -1
- package/build/components/block-switcher/use-transformed-patterns.js +0 -1
- package/build/components/block-switcher/use-transformed-patterns.js.map +1 -1
- package/build/components/block-switcher/utils.js +0 -1
- package/build/components/block-switcher/utils.js.map +1 -1
- package/build/components/block-toolbar/block-toolbar-menu.native.js +0 -1
- package/build/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
- package/build/components/block-toolbar/change-design.js +0 -1
- package/build/components/block-toolbar/change-design.js.map +1 -1
- package/build/components/block-toolbar/index.js +0 -1
- package/build/components/block-toolbar/index.js.map +1 -1
- package/build/components/block-tools/block-toolbar-popover.js +3 -2
- package/build/components/block-tools/block-toolbar-popover.js.map +1 -1
- package/build/components/block-tools/use-selected-block-tool-props.js +0 -1
- package/build/components/block-tools/use-selected-block-tool-props.js.map +1 -1
- package/build/components/block-types-list/index.js +0 -1
- package/build/components/block-types-list/index.js.map +1 -1
- package/build/components/block-variation-picker/index.js +0 -1
- package/build/components/block-variation-picker/index.js.map +1 -1
- package/build/components/block-variation-picker/index.native.js +0 -1
- package/build/components/block-variation-picker/index.native.js.map +1 -1
- package/build/components/block-variation-transforms/index.js +0 -1
- package/build/components/block-variation-transforms/index.js.map +1 -1
- package/build/components/block-vertical-alignment-control/ui.js +0 -1
- package/build/components/block-vertical-alignment-control/ui.js.map +1 -1
- package/build/components/border-radius-control/index.js +0 -1
- package/build/components/border-radius-control/index.js.map +1 -1
- package/build/components/border-radius-control/input-controls.js +0 -1
- package/build/components/border-radius-control/input-controls.js.map +1 -1
- package/build/components/border-radius-control/utils.js +0 -1
- package/build/components/border-radius-control/utils.js.map +1 -1
- package/build/components/colors/utils.js +0 -1
- package/build/components/colors/utils.js.map +1 -1
- package/build/components/colors/with-colors.js +0 -1
- package/build/components/colors/with-colors.js.map +1 -1
- package/build/components/colors-gradients/dropdown.js +0 -1
- package/build/components/colors-gradients/dropdown.js.map +1 -1
- package/build/components/colors-gradients/panel-color-gradient-settings.js +0 -1
- package/build/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
- package/build/components/colors-gradients/panel-color-gradient-settings.native.js +0 -1
- package/build/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
- package/build/components/convert-to-group-buttons/toolbar.js +0 -1
- package/build/components/convert-to-group-buttons/toolbar.js.map +1 -1
- package/build/components/date-format-picker/index.js +0 -1
- package/build/components/date-format-picker/index.js.map +1 -1
- package/build/components/dimensions-tool/scale-tool.js +0 -1
- package/build/components/dimensions-tool/scale-tool.js.map +1 -1
- package/build/components/duotone/utils.js +0 -1
- package/build/components/duotone/utils.js.map +1 -1
- package/build/components/editor-styles/index.js +0 -1
- package/build/components/editor-styles/index.js.map +1 -1
- package/build/components/font-appearance-control/index.js +0 -1
- package/build/components/font-appearance-control/index.js.map +1 -1
- package/build/components/font-family/index.js +0 -1
- package/build/components/font-family/index.js.map +1 -1
- package/build/components/font-sizes/with-font-sizes.js +0 -1
- package/build/components/font-sizes/with-font-sizes.js.map +1 -1
- package/build/components/global-styles/border-panel.js +0 -1
- package/build/components/global-styles/border-panel.js.map +1 -1
- package/build/components/global-styles/color-panel.js +0 -1
- package/build/components/global-styles/color-panel.js.map +1 -1
- package/build/components/global-styles/color-panel.native.js +0 -1
- package/build/components/global-styles/color-panel.native.js.map +1 -1
- package/build/components/global-styles/dimensions-panel.js +0 -1
- package/build/components/global-styles/dimensions-panel.js.map +1 -1
- package/build/components/global-styles/filters-panel.js +42 -25
- package/build/components/global-styles/filters-panel.js.map +1 -1
- package/build/components/global-styles/get-global-styles-changes.js +0 -1
- package/build/components/global-styles/get-global-styles-changes.js.map +1 -1
- package/build/components/global-styles/shadow-panel-components.js +41 -17
- package/build/components/global-styles/shadow-panel-components.js.map +1 -1
- package/build/components/global-styles/typography-utils.js +0 -1
- package/build/components/global-styles/typography-utils.js.map +1 -1
- package/build/components/global-styles/use-global-styles-context.native.js +0 -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 +0 -1
- package/build/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build/components/global-styles/utils.js +0 -1
- package/build/components/global-styles/utils.js.map +1 -1
- package/build/components/grid/grid-visualizer.js +0 -1
- package/build/components/grid/grid-visualizer.js.map +1 -1
- package/build/components/grid/use-grid-layout-sync.js +0 -1
- package/build/components/grid/use-grid-layout-sync.js.map +1 -1
- package/build/components/grid/utils.js +0 -1
- package/build/components/grid/utils.js.map +1 -1
- package/build/components/iframe/get-compatibility-styles.js +0 -1
- package/build/components/iframe/get-compatibility-styles.js.map +1 -1
- package/build/components/iframe/index.js +9 -7
- package/build/components/iframe/index.js.map +1 -1
- package/build/components/image-editor/aspect-ratio-dropdown.js +1 -2
- package/build/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
- package/build/components/inner-blocks/index.js +2 -2
- package/build/components/inner-blocks/index.js.map +1 -1
- package/build/components/inner-blocks/index.native.js +2 -2
- package/build/components/inner-blocks/index.native.js.map +1 -1
- package/build/components/inner-blocks/use-block-context.js +0 -1
- package/build/components/inner-blocks/use-block-context.js.map +1 -1
- package/build/components/inserter/block-patterns-explorer/index.js +6 -3
- package/build/components/inserter/block-patterns-explorer/index.js.map +1 -1
- package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js +0 -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 +6 -3
- package/build/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/index.js +1 -1
- package/build/components/inserter/block-patterns-tab/index.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/pattern-category-previews.js +4 -5
- package/build/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/patterns-filter.js +2 -2
- package/build/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/use-pattern-categories.js +0 -1
- package/build/components/inserter/block-patterns-tab/use-pattern-categories.js.map +1 -1
- package/build/components/inserter/block-types-tab.js +0 -1
- package/build/components/inserter/block-types-tab.js.map +1 -1
- package/build/components/inserter/block-types-tab.native.js +0 -1
- package/build/components/inserter/block-types-tab.native.js.map +1 -1
- package/build/components/inserter/category-tabs/index.js +1 -2
- package/build/components/inserter/category-tabs/index.js.map +1 -1
- package/build/components/inserter/hooks/use-block-type-impressions.native.js +0 -1
- package/build/components/inserter/hooks/use-block-type-impressions.native.js.map +1 -1
- package/build/components/inserter/hooks/use-patterns-state.js +0 -1
- package/build/components/inserter/hooks/use-patterns-state.js.map +1 -1
- package/build/components/inserter/index.js +0 -1
- package/build/components/inserter/index.js.map +1 -1
- package/build/components/inserter/index.native.js +0 -1
- package/build/components/inserter/index.native.js.map +1 -1
- package/build/components/inserter/media-tab/hooks.js +0 -1
- package/build/components/inserter/media-tab/hooks.js.map +1 -1
- package/build/components/inserter/media-tab/media-list.js +0 -1
- package/build/components/inserter/media-tab/media-list.js.map +1 -1
- package/build/components/inserter/media-tab/media-tab.js +0 -1
- package/build/components/inserter/media-tab/media-tab.js.map +1 -1
- package/build/components/inserter/mobile-tab-navigation.js +0 -1
- package/build/components/inserter/mobile-tab-navigation.js.map +1 -1
- package/build/components/inserter/no-results.js +3 -7
- package/build/components/inserter/no-results.js.map +1 -1
- package/build/components/inserter/quick-inserter.js +2 -1
- package/build/components/inserter/quick-inserter.js.map +1 -1
- package/build/components/inserter/search-items.js +0 -1
- package/build/components/inserter/search-items.js.map +1 -1
- package/build/components/inserter/search-results.js +1 -2
- package/build/components/inserter/search-results.js.map +1 -1
- package/build/components/inserter/tabs.native.js +0 -1
- package/build/components/inserter/tabs.native.js.map +1 -1
- package/build/components/inserter/utils.native.js +0 -1
- package/build/components/inserter/utils.native.js.map +1 -1
- package/build/components/inspector-controls/block-support-tools-panel.js +0 -1
- package/build/components/inspector-controls/block-support-tools-panel.js.map +1 -1
- package/build/components/inspector-controls/fill.js +0 -1
- package/build/components/inspector-controls/fill.js.map +1 -1
- package/build/components/inspector-controls-tabs/index.js +0 -1
- package/build/components/inspector-controls-tabs/index.js.map +1 -1
- package/build/components/inspector-popover-header/index.js +0 -1
- package/build/components/inspector-popover-header/index.js.map +1 -1
- package/build/components/justify-content-control/ui.js +0 -1
- package/build/components/justify-content-control/ui.js.map +1 -1
- package/build/components/keyboard-shortcuts/index.js +28 -1
- package/build/components/keyboard-shortcuts/index.js.map +1 -1
- package/build/components/link-control/index.js +0 -1
- package/build/components/link-control/index.js.map +1 -1
- package/build/components/link-control/search-results.js +0 -1
- package/build/components/link-control/search-results.js.map +1 -1
- package/build/components/link-control/settings.js +0 -1
- package/build/components/link-control/settings.js.map +1 -1
- package/build/components/link-control/use-internal-value.js +0 -1
- package/build/components/link-control/use-internal-value.js.map +1 -1
- package/build/components/link-control/use-search-handler.js +0 -1
- package/build/components/link-control/use-search-handler.js.map +1 -1
- package/build/components/list-view/block-select-button.js +0 -1
- package/build/components/list-view/block-select-button.js.map +1 -1
- package/build/components/list-view/block.js +0 -1
- package/build/components/list-view/block.js.map +1 -1
- package/build/components/list-view/branch.js +0 -1
- package/build/components/list-view/branch.js.map +1 -1
- package/build/components/list-view/index.js +0 -1
- package/build/components/list-view/index.js.map +1 -1
- package/build/components/list-view/use-block-selection.js +0 -1
- package/build/components/list-view/use-block-selection.js.map +1 -1
- package/build/components/list-view/use-clipboard-handler.js +0 -1
- package/build/components/list-view/use-clipboard-handler.js.map +1 -1
- package/build/components/list-view/use-list-view-block-indexes.js +0 -1
- package/build/components/list-view/use-list-view-block-indexes.js.map +1 -1
- package/build/components/list-view/use-list-view-drop-zone.js +0 -1
- package/build/components/list-view/use-list-view-drop-zone.js.map +1 -1
- package/build/components/list-view/utils.js +0 -1
- package/build/components/list-view/utils.js.map +1 -1
- package/build/components/media-placeholder/index.js +2 -2
- package/build/components/media-placeholder/index.js.map +1 -1
- package/build/components/media-placeholder/index.native.js +0 -1
- package/build/components/media-placeholder/index.native.js.map +1 -1
- package/build/components/media-replace-flow/index.js +0 -1
- package/build/components/media-replace-flow/index.js.map +1 -1
- package/build/components/media-upload/index.native.js +0 -1
- package/build/components/media-upload/index.native.js.map +1 -1
- package/build/components/navigable-toolbar/index.js +0 -1
- package/build/components/navigable-toolbar/index.js.map +1 -1
- package/build/components/panel-color-settings/index.js +0 -1
- package/build/components/panel-color-settings/index.js.map +1 -1
- package/build/components/provider/use-block-sync.js +0 -1
- package/build/components/provider/use-block-sync.js.map +1 -1
- package/build/components/responsive-block-control/index.js +0 -1
- package/build/components/responsive-block-control/index.js.map +1 -1
- package/build/components/rich-text/embed-handler-picker.native.js +0 -1
- package/build/components/rich-text/embed-handler-picker.native.js.map +1 -1
- package/build/components/rich-text/event-listeners/before-input-rules.js +0 -1
- package/build/components/rich-text/event-listeners/before-input-rules.js.map +1 -1
- package/build/components/rich-text/event-listeners/delete.js +5 -3
- package/build/components/rich-text/event-listeners/delete.js.map +1 -1
- package/build/components/rich-text/event-listeners/index.js +0 -1
- package/build/components/rich-text/event-listeners/index.js.map +1 -1
- package/build/components/rich-text/event-listeners/input-rules.js +0 -1
- package/build/components/rich-text/event-listeners/input-rules.js.map +1 -1
- package/build/components/rich-text/event-listeners/paste-handler.js +0 -1
- package/build/components/rich-text/event-listeners/paste-handler.js.map +1 -1
- package/build/components/rich-text/file-paste-handler.native.js +0 -1
- package/build/components/rich-text/file-paste-handler.native.js.map +1 -1
- package/build/components/rich-text/format-edit.js +0 -1
- package/build/components/rich-text/format-edit.js.map +1 -1
- package/build/components/rich-text/format-toolbar/index.js +0 -1
- package/build/components/rich-text/format-toolbar/index.js.map +1 -1
- package/build/components/rich-text/index.js +0 -1
- package/build/components/rich-text/index.js.map +1 -1
- package/build/components/rich-text/index.native.js +0 -1
- package/build/components/rich-text/index.native.js.map +1 -1
- package/build/components/rich-text/multiline.js +0 -1
- package/build/components/rich-text/multiline.js.map +1 -1
- package/build/components/rich-text/native/format-edit.js +0 -1
- package/build/components/rich-text/native/format-edit.js.map +1 -1
- package/build/components/rich-text/native/get-format-colors.native.js +0 -1
- package/build/components/rich-text/native/get-format-colors.native.js.map +1 -1
- package/build/components/rich-text/native/index.native.js +0 -1
- package/build/components/rich-text/native/index.native.js.map +1 -1
- package/build/components/rich-text/native/toolbar-button-with-options.native.js +0 -1
- package/build/components/rich-text/native/toolbar-button-with-options.native.js.map +1 -1
- package/build/components/rich-text/native/use-format-types.js +0 -1
- package/build/components/rich-text/native/use-format-types.js.map +1 -1
- package/build/components/rich-text/use-format-types.js +0 -1
- package/build/components/rich-text/use-format-types.js.map +1 -1
- package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js +0 -1
- package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
- package/build/components/spacing-sizes-control/input-controls/axial.js +0 -1
- package/build/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
- package/build/components/spacing-sizes-control/input-controls/separated.js +0 -1
- package/build/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
- package/build/components/spacing-sizes-control/input-controls/single.js +0 -1
- package/build/components/spacing-sizes-control/input-controls/single.js.map +1 -1
- package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js +0 -1
- package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
- package/build/components/spacing-sizes-control/utils.js +0 -1
- package/build/components/spacing-sizes-control/utils.js.map +1 -1
- package/build/components/tabbed-sidebar/index.js +0 -1
- package/build/components/tabbed-sidebar/index.js.map +1 -1
- package/build/components/text-alignment-control/index.js +0 -1
- package/build/components/text-alignment-control/index.js.map +1 -1
- package/build/components/text-decoration-control/index.js +0 -1
- package/build/components/text-decoration-control/index.js.map +1 -1
- package/build/components/text-transform-control/index.js +0 -1
- package/build/components/text-transform-control/index.js.map +1 -1
- package/build/components/tool-selector/index.js +1 -1
- package/build/components/tool-selector/index.js.map +1 -1
- package/build/components/unsupported-block-details/index.native.js +0 -1
- package/build/components/unsupported-block-details/index.native.js.map +1 -1
- package/build/components/url-input/index.js +0 -1
- package/build/components/url-input/index.js.map +1 -1
- package/build/components/url-popover/image-url-input-ui.js +0 -1
- package/build/components/url-popover/image-url-input-ui.js.map +1 -1
- package/build/components/use-block-commands/index.js +0 -1
- package/build/components/use-block-commands/index.js.map +1 -1
- package/build/components/use-block-drop-zone/index.js +0 -1
- package/build/components/use-block-drop-zone/index.js.map +1 -1
- package/build/components/use-block-drop-zone/index.native.js +0 -1
- package/build/components/use-block-drop-zone/index.native.js.map +1 -1
- package/build/components/use-flash-editable-blocks/index.js +0 -1
- package/build/components/use-flash-editable-blocks/index.js.map +1 -1
- package/build/components/use-on-block-drop/index.js +0 -1
- package/build/components/use-on-block-drop/index.js.map +1 -1
- package/build/components/use-on-block-drop/index.native.js +0 -1
- package/build/components/use-on-block-drop/index.native.js.map +1 -1
- package/build/components/use-paste-styles/index.js +0 -1
- package/build/components/use-paste-styles/index.js.map +1 -1
- package/build/components/warning/index.js +0 -1
- package/build/components/warning/index.js.map +1 -1
- package/build/components/writing-flow/use-arrow-nav.js +0 -1
- package/build/components/writing-flow/use-arrow-nav.js.map +1 -1
- package/build/components/writing-flow/use-clipboard-handler.js +0 -1
- package/build/components/writing-flow/use-clipboard-handler.js.map +1 -1
- package/build/components/writing-flow/use-input.js +0 -1
- package/build/components/writing-flow/use-input.js.map +1 -1
- package/build/components/writing-flow/use-tab-nav.js +3 -1
- package/build/components/writing-flow/use-tab-nav.js.map +1 -1
- package/build/components/writing-flow/utils.js +0 -1
- package/build/components/writing-flow/utils.js.map +1 -1
- package/build/components/writing-mode-control/index.js +0 -1
- package/build/components/writing-mode-control/index.js.map +1 -1
- package/build/hooks/align.js +0 -1
- package/build/hooks/align.js.map +1 -1
- package/build/hooks/align.native.js +0 -1
- package/build/hooks/align.native.js.map +1 -1
- package/build/hooks/aria-label.js +3 -8
- package/build/hooks/aria-label.js.map +1 -1
- package/build/hooks/block-bindings.js +0 -1
- package/build/hooks/block-bindings.js.map +1 -1
- package/build/hooks/block-hooks.js +0 -1
- package/build/hooks/block-hooks.js.map +1 -1
- package/build/hooks/block-style-variation.js +0 -1
- package/build/hooks/block-style-variation.js.map +1 -1
- package/build/hooks/border.js +0 -1
- package/build/hooks/border.js.map +1 -1
- package/build/hooks/contrast-checker.js +0 -1
- package/build/hooks/contrast-checker.js.map +1 -1
- package/build/hooks/duotone.js +0 -1
- package/build/hooks/duotone.js.map +1 -1
- package/build/hooks/index.js +0 -1
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/layout.js +1 -2
- package/build/hooks/layout.js.map +1 -1
- package/build/hooks/position.js +0 -1
- package/build/hooks/position.js.map +1 -1
- package/build/hooks/style.js +0 -1
- package/build/hooks/style.js.map +1 -1
- package/build/hooks/supports.js +0 -1
- package/build/hooks/supports.js.map +1 -1
- package/build/hooks/text-align.js +0 -1
- package/build/hooks/text-align.js.map +1 -1
- package/build/hooks/typography.js +0 -1
- package/build/hooks/typography.js.map +1 -1
- package/build/hooks/use-zoom-out.js +1 -12
- package/build/hooks/use-zoom-out.js.map +1 -1
- package/build/hooks/utils.js +0 -1
- package/build/hooks/utils.js.map +1 -1
- package/build/layouts/constrained.js +0 -1
- package/build/layouts/constrained.js.map +1 -1
- package/build/layouts/flex.js +0 -1
- package/build/layouts/flex.js.map +1 -1
- package/build/layouts/flow.js +0 -1
- package/build/layouts/flow.js.map +1 -1
- package/build/layouts/index.js +0 -1
- package/build/layouts/index.js.map +1 -1
- package/build/layouts/utils.js +0 -1
- package/build/layouts/utils.js.map +1 -1
- package/build/store/actions.js +0 -1
- package/build/store/actions.js.map +1 -1
- package/build/store/get-block-settings.js +0 -1
- package/build/store/get-block-settings.js.map +1 -1
- package/build/store/private-actions.js +0 -1
- package/build/store/private-actions.js.map +1 -1
- package/build/store/private-selectors.js +0 -1
- package/build/store/private-selectors.js.map +1 -1
- package/build/store/reducer.js +0 -1
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +0 -1
- package/build/store/selectors.js.map +1 -1
- package/build/store/utils.js +0 -1
- package/build/store/utils.js.map +1 -1
- package/build/utils/block-bindings.js +0 -1
- package/build/utils/block-bindings.js.map +1 -1
- package/build/utils/get-editor-region.js +0 -1
- package/build/utils/get-editor-region.js.map +1 -1
- package/build/utils/get-font-styles-and-weights.js +0 -1
- package/build/utils/get-font-styles-and-weights.js.map +1 -1
- package/build/utils/math.js +0 -1
- package/build/utils/math.js.map +1 -1
- package/build/utils/object.js +0 -1
- package/build/utils/object.js.map +1 -1
- package/build/utils/selection.js +0 -1
- package/build/utils/selection.js.map +1 -1
- package/build/utils/transform-styles/index.js +0 -1
- package/build/utils/transform-styles/index.js.map +1 -1
- package/build-module/autocompleters/block.js +0 -1
- package/build-module/autocompleters/block.js.map +1 -1
- package/build-module/autocompleters/link.js +0 -1
- package/build-module/autocompleters/link.js.map +1 -1
- package/build-module/components/alignment-control/ui.js +0 -1
- package/build-module/components/alignment-control/ui.js.map +1 -1
- package/build-module/components/autocomplete/index.js +0 -1
- package/build-module/components/autocomplete/index.js.map +1 -1
- package/build-module/components/background-image-control/index.js +2 -6
- package/build-module/components/background-image-control/index.js.map +1 -1
- package/build-module/components/block-actions/index.js +0 -1
- package/build-module/components/block-actions/index.js.map +1 -1
- package/build-module/components/block-alignment-control/ui.js +0 -1
- package/build-module/components/block-alignment-control/ui.js.map +1 -1
- package/build-module/components/block-alignment-control/ui.native.js +0 -1
- package/build-module/components/block-alignment-control/ui.native.js.map +1 -1
- package/build-module/components/block-alignment-control/use-available-alignments.js +0 -1
- package/build-module/components/block-alignment-control/use-available-alignments.js.map +1 -1
- package/build-module/components/block-breadcrumb/index.js +0 -1
- package/build-module/components/block-breadcrumb/index.js.map +1 -1
- package/build-module/components/block-compare/index.js +0 -1
- package/build-module/components/block-compare/index.js.map +1 -1
- package/build-module/components/block-controls/fill.js +0 -1
- package/build-module/components/block-controls/fill.js.map +1 -1
- package/build-module/components/block-edit/edit.js +0 -1
- package/build-module/components/block-edit/edit.js.map +1 -1
- package/build-module/components/block-edit/edit.native.js +0 -1
- package/build-module/components/block-edit/edit.native.js.map +1 -1
- package/build-module/components/block-heading-level-dropdown/index.js +0 -1
- package/build-module/components/block-heading-level-dropdown/index.js.map +1 -1
- package/build-module/components/block-heading-level-dropdown/index.native.js +0 -1
- package/build-module/components/block-heading-level-dropdown/index.native.js.map +1 -1
- package/build-module/components/block-inspector/index.js +0 -1
- package/build-module/components/block-inspector/index.js.map +1 -1
- package/build-module/components/block-list/block-invalid-warning.js +0 -1
- package/build-module/components/block-list/block-invalid-warning.js.map +1 -1
- package/build-module/components/block-list/block-list-context.native.js +0 -1
- package/build-module/components/block-list/block-list-context.native.js.map +1 -1
- package/build-module/components/block-list/block.js +0 -1
- package/build-module/components/block-list/block.js.map +1 -1
- package/build-module/components/block-list/block.native.js +0 -1
- package/build-module/components/block-list/block.native.js.map +1 -1
- package/build-module/components/block-list/index.js +9 -6
- package/build-module/components/block-list/index.js.map +1 -1
- package/build-module/components/block-list/index.native.js +0 -1
- package/build-module/components/block-list/index.native.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-focus-first-element.js +0 -1
- package/build-module/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
- package/build-module/components/block-list/use-in-between-inserter.js +0 -1
- package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
- package/build-module/components/block-lock/modal.js +0 -1
- package/build-module/components/block-lock/modal.js.map +1 -1
- package/build-module/components/block-manager/category.js +0 -1
- package/build-module/components/block-manager/category.js.map +1 -1
- package/build-module/components/block-manager/checklist.js +0 -1
- package/build-module/components/block-manager/checklist.js.map +1 -1
- package/build-module/components/block-manager/index.js +0 -1
- package/build-module/components/block-manager/index.js.map +1 -1
- package/build-module/components/block-media-update-progress/index.native.js +0 -1
- package/build-module/components/block-media-update-progress/index.native.js.map +1 -1
- package/build-module/components/block-mover/index.native.js +0 -1
- package/build-module/components/block-mover/index.native.js.map +1 -1
- package/build-module/components/block-mover/mover-description.native.js +0 -1
- package/build-module/components/block-mover/mover-description.native.js.map +1 -1
- package/build-module/components/block-pattern-setup/index.js +0 -1
- package/build-module/components/block-pattern-setup/index.js.map +1 -1
- package/build-module/components/block-pattern-setup/use-patterns-setup.js +0 -1
- package/build-module/components/block-pattern-setup/use-patterns-setup.js.map +1 -1
- package/build-module/components/block-patterns-list/index.js +0 -1
- package/build-module/components/block-patterns-list/index.js.map +1 -1
- package/build-module/components/block-popover/use-popover-scroll.js +12 -7
- package/build-module/components/block-popover/use-popover-scroll.js.map +1 -1
- package/build-module/components/block-quick-navigation/index.js +0 -1
- package/build-module/components/block-quick-navigation/index.js.map +1 -1
- package/build-module/components/block-rename/modal.js +0 -1
- package/build-module/components/block-rename/modal.js.map +1 -1
- package/build-module/components/block-settings-menu/block-settings-dropdown.js +26 -7
- package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build-module/components/block-styles/index.js +0 -1
- package/build-module/components/block-styles/index.js.map +1 -1
- package/build-module/components/block-styles/index.native.js +0 -1
- package/build-module/components/block-styles/index.native.js.map +1 -1
- package/build-module/components/block-styles/menu-items.js +0 -1
- package/build-module/components/block-styles/menu-items.js.map +1 -1
- package/build-module/components/block-styles/preview.native.js +0 -1
- package/build-module/components/block-styles/preview.native.js.map +1 -1
- package/build-module/components/block-switcher/block-transformations-menu.js +0 -1
- package/build-module/components/block-switcher/block-transformations-menu.js.map +1 -1
- package/build-module/components/block-switcher/block-transformations-menu.native.js +0 -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 +0 -1
- package/build-module/components/block-switcher/block-variation-transformations.js.map +1 -1
- package/build-module/components/block-switcher/index.js +0 -1
- package/build-module/components/block-switcher/index.js.map +1 -1
- package/build-module/components/block-switcher/pattern-transformations-menu.js +0 -1
- package/build-module/components/block-switcher/pattern-transformations-menu.js.map +1 -1
- package/build-module/components/block-switcher/use-transformed-patterns.js +0 -1
- package/build-module/components/block-switcher/use-transformed-patterns.js.map +1 -1
- package/build-module/components/block-switcher/utils.js +0 -1
- package/build-module/components/block-switcher/utils.js.map +1 -1
- package/build-module/components/block-toolbar/block-toolbar-menu.native.js +0 -1
- package/build-module/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
- package/build-module/components/block-toolbar/change-design.js +0 -1
- package/build-module/components/block-toolbar/change-design.js.map +1 -1
- package/build-module/components/block-toolbar/index.js +0 -1
- package/build-module/components/block-toolbar/index.js.map +1 -1
- package/build-module/components/block-tools/block-toolbar-popover.js +3 -2
- package/build-module/components/block-tools/block-toolbar-popover.js.map +1 -1
- package/build-module/components/block-tools/use-selected-block-tool-props.js +0 -1
- package/build-module/components/block-tools/use-selected-block-tool-props.js.map +1 -1
- package/build-module/components/block-types-list/index.js +0 -1
- package/build-module/components/block-types-list/index.js.map +1 -1
- package/build-module/components/block-variation-picker/index.js +0 -1
- package/build-module/components/block-variation-picker/index.js.map +1 -1
- package/build-module/components/block-variation-picker/index.native.js +0 -1
- package/build-module/components/block-variation-picker/index.native.js.map +1 -1
- package/build-module/components/block-variation-transforms/index.js +0 -1
- package/build-module/components/block-variation-transforms/index.js.map +1 -1
- package/build-module/components/block-vertical-alignment-control/ui.js +0 -1
- package/build-module/components/block-vertical-alignment-control/ui.js.map +1 -1
- package/build-module/components/border-radius-control/index.js +0 -1
- package/build-module/components/border-radius-control/index.js.map +1 -1
- package/build-module/components/border-radius-control/input-controls.js +0 -1
- package/build-module/components/border-radius-control/input-controls.js.map +1 -1
- package/build-module/components/border-radius-control/utils.js +0 -1
- package/build-module/components/border-radius-control/utils.js.map +1 -1
- package/build-module/components/colors/utils.js +0 -1
- package/build-module/components/colors/utils.js.map +1 -1
- package/build-module/components/colors/with-colors.js +0 -1
- package/build-module/components/colors/with-colors.js.map +1 -1
- package/build-module/components/colors-gradients/dropdown.js +0 -1
- package/build-module/components/colors-gradients/dropdown.js.map +1 -1
- package/build-module/components/colors-gradients/panel-color-gradient-settings.js +0 -1
- package/build-module/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
- package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js +0 -1
- package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
- package/build-module/components/convert-to-group-buttons/toolbar.js +0 -1
- package/build-module/components/convert-to-group-buttons/toolbar.js.map +1 -1
- package/build-module/components/date-format-picker/index.js +0 -1
- package/build-module/components/date-format-picker/index.js.map +1 -1
- package/build-module/components/dimensions-tool/scale-tool.js +0 -1
- package/build-module/components/dimensions-tool/scale-tool.js.map +1 -1
- package/build-module/components/duotone/utils.js +0 -1
- package/build-module/components/duotone/utils.js.map +1 -1
- package/build-module/components/editor-styles/index.js +0 -1
- package/build-module/components/editor-styles/index.js.map +1 -1
- package/build-module/components/font-appearance-control/index.js +0 -1
- package/build-module/components/font-appearance-control/index.js.map +1 -1
- package/build-module/components/font-family/index.js +0 -1
- package/build-module/components/font-family/index.js.map +1 -1
- package/build-module/components/font-sizes/with-font-sizes.js +0 -1
- package/build-module/components/font-sizes/with-font-sizes.js.map +1 -1
- package/build-module/components/global-styles/border-panel.js +0 -1
- package/build-module/components/global-styles/border-panel.js.map +1 -1
- package/build-module/components/global-styles/color-panel.js +0 -1
- package/build-module/components/global-styles/color-panel.js.map +1 -1
- package/build-module/components/global-styles/color-panel.native.js +0 -1
- package/build-module/components/global-styles/color-panel.native.js.map +1 -1
- package/build-module/components/global-styles/dimensions-panel.js +0 -1
- package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
- package/build-module/components/global-styles/filters-panel.js +45 -28
- package/build-module/components/global-styles/filters-panel.js.map +1 -1
- package/build-module/components/global-styles/get-global-styles-changes.js +0 -1
- package/build-module/components/global-styles/get-global-styles-changes.js.map +1 -1
- package/build-module/components/global-styles/shadow-panel-components.js +44 -20
- package/build-module/components/global-styles/shadow-panel-components.js.map +1 -1
- package/build-module/components/global-styles/typography-utils.js +0 -1
- package/build-module/components/global-styles/typography-utils.js.map +1 -1
- package/build-module/components/global-styles/use-global-styles-context.native.js +0 -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 +0 -1
- package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build-module/components/global-styles/utils.js +0 -1
- package/build-module/components/global-styles/utils.js.map +1 -1
- package/build-module/components/grid/grid-visualizer.js +0 -1
- package/build-module/components/grid/grid-visualizer.js.map +1 -1
- package/build-module/components/grid/use-grid-layout-sync.js +0 -1
- package/build-module/components/grid/use-grid-layout-sync.js.map +1 -1
- package/build-module/components/grid/utils.js +0 -1
- package/build-module/components/grid/utils.js.map +1 -1
- package/build-module/components/iframe/get-compatibility-styles.js +0 -1
- package/build-module/components/iframe/get-compatibility-styles.js.map +1 -1
- package/build-module/components/iframe/index.js +9 -7
- package/build-module/components/iframe/index.js.map +1 -1
- package/build-module/components/image-editor/aspect-ratio-dropdown.js +1 -2
- package/build-module/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
- package/build-module/components/inner-blocks/index.js +2 -2
- package/build-module/components/inner-blocks/index.js.map +1 -1
- package/build-module/components/inner-blocks/index.native.js +2 -2
- package/build-module/components/inner-blocks/index.native.js.map +1 -1
- package/build-module/components/inner-blocks/use-block-context.js +0 -1
- package/build-module/components/inner-blocks/use-block-context.js.map +1 -1
- package/build-module/components/inserter/block-patterns-explorer/index.js +6 -3
- 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 +0 -1
- package/build-module/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js.map +1 -1
- package/build-module/components/inserter/block-patterns-explorer/pattern-list.js +6 -3
- 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 -1
- 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 +4 -5
- 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 +2 -2
- 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 +0 -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 +0 -1
- package/build-module/components/inserter/block-types-tab.js.map +1 -1
- package/build-module/components/inserter/block-types-tab.native.js +0 -1
- package/build-module/components/inserter/block-types-tab.native.js.map +1 -1
- package/build-module/components/inserter/category-tabs/index.js +1 -2
- package/build-module/components/inserter/category-tabs/index.js.map +1 -1
- package/build-module/components/inserter/hooks/use-block-type-impressions.native.js +0 -1
- package/build-module/components/inserter/hooks/use-block-type-impressions.native.js.map +1 -1
- package/build-module/components/inserter/hooks/use-patterns-state.js +0 -1
- package/build-module/components/inserter/hooks/use-patterns-state.js.map +1 -1
- package/build-module/components/inserter/index.js +0 -1
- package/build-module/components/inserter/index.js.map +1 -1
- package/build-module/components/inserter/index.native.js +0 -1
- package/build-module/components/inserter/index.native.js.map +1 -1
- package/build-module/components/inserter/media-tab/hooks.js +0 -1
- package/build-module/components/inserter/media-tab/hooks.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-list.js +0 -1
- package/build-module/components/inserter/media-tab/media-list.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-tab.js +0 -1
- package/build-module/components/inserter/media-tab/media-tab.js.map +1 -1
- package/build-module/components/inserter/mobile-tab-navigation.js +0 -1
- package/build-module/components/inserter/mobile-tab-navigation.js.map +1 -1
- package/build-module/components/inserter/no-results.js +4 -8
- package/build-module/components/inserter/no-results.js.map +1 -1
- package/build-module/components/inserter/quick-inserter.js +2 -1
- package/build-module/components/inserter/quick-inserter.js.map +1 -1
- package/build-module/components/inserter/search-items.js +0 -1
- package/build-module/components/inserter/search-items.js.map +1 -1
- package/build-module/components/inserter/search-results.js +1 -2
- package/build-module/components/inserter/search-results.js.map +1 -1
- package/build-module/components/inserter/tabs.native.js +0 -1
- package/build-module/components/inserter/tabs.native.js.map +1 -1
- package/build-module/components/inserter/utils.native.js +0 -1
- package/build-module/components/inserter/utils.native.js.map +1 -1
- package/build-module/components/inspector-controls/block-support-tools-panel.js +0 -1
- package/build-module/components/inspector-controls/block-support-tools-panel.js.map +1 -1
- package/build-module/components/inspector-controls/fill.js +0 -1
- package/build-module/components/inspector-controls/fill.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/index.js +0 -1
- package/build-module/components/inspector-controls-tabs/index.js.map +1 -1
- package/build-module/components/inspector-popover-header/index.js +0 -1
- package/build-module/components/inspector-popover-header/index.js.map +1 -1
- package/build-module/components/justify-content-control/ui.js +0 -1
- package/build-module/components/justify-content-control/ui.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/index.js +28 -1
- package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
- package/build-module/components/link-control/index.js +0 -1
- package/build-module/components/link-control/index.js.map +1 -1
- package/build-module/components/link-control/search-results.js +0 -1
- package/build-module/components/link-control/search-results.js.map +1 -1
- package/build-module/components/link-control/settings.js +0 -1
- package/build-module/components/link-control/settings.js.map +1 -1
- package/build-module/components/link-control/use-internal-value.js +0 -1
- package/build-module/components/link-control/use-internal-value.js.map +1 -1
- package/build-module/components/link-control/use-search-handler.js +0 -1
- package/build-module/components/link-control/use-search-handler.js.map +1 -1
- package/build-module/components/list-view/block-select-button.js +0 -1
- package/build-module/components/list-view/block-select-button.js.map +1 -1
- package/build-module/components/list-view/block.js +0 -1
- package/build-module/components/list-view/block.js.map +1 -1
- package/build-module/components/list-view/branch.js +0 -1
- package/build-module/components/list-view/branch.js.map +1 -1
- package/build-module/components/list-view/index.js +0 -1
- package/build-module/components/list-view/index.js.map +1 -1
- package/build-module/components/list-view/use-block-selection.js +0 -1
- package/build-module/components/list-view/use-block-selection.js.map +1 -1
- package/build-module/components/list-view/use-clipboard-handler.js +0 -1
- package/build-module/components/list-view/use-clipboard-handler.js.map +1 -1
- package/build-module/components/list-view/use-list-view-block-indexes.js +0 -1
- package/build-module/components/list-view/use-list-view-block-indexes.js.map +1 -1
- package/build-module/components/list-view/use-list-view-drop-zone.js +0 -1
- package/build-module/components/list-view/use-list-view-drop-zone.js.map +1 -1
- package/build-module/components/list-view/utils.js +0 -1
- package/build-module/components/list-view/utils.js.map +1 -1
- package/build-module/components/media-placeholder/index.js +2 -2
- package/build-module/components/media-placeholder/index.js.map +1 -1
- package/build-module/components/media-placeholder/index.native.js +0 -1
- package/build-module/components/media-placeholder/index.native.js.map +1 -1
- package/build-module/components/media-replace-flow/index.js +0 -1
- package/build-module/components/media-replace-flow/index.js.map +1 -1
- package/build-module/components/media-upload/index.native.js +0 -1
- package/build-module/components/media-upload/index.native.js.map +1 -1
- package/build-module/components/navigable-toolbar/index.js +0 -1
- package/build-module/components/navigable-toolbar/index.js.map +1 -1
- package/build-module/components/panel-color-settings/index.js +0 -1
- package/build-module/components/panel-color-settings/index.js.map +1 -1
- package/build-module/components/provider/use-block-sync.js +0 -1
- package/build-module/components/provider/use-block-sync.js.map +1 -1
- package/build-module/components/responsive-block-control/index.js +0 -1
- package/build-module/components/responsive-block-control/index.js.map +1 -1
- package/build-module/components/rich-text/embed-handler-picker.native.js +0 -1
- package/build-module/components/rich-text/embed-handler-picker.native.js.map +1 -1
- package/build-module/components/rich-text/event-listeners/before-input-rules.js +0 -1
- 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 +5 -3
- package/build-module/components/rich-text/event-listeners/delete.js.map +1 -1
- package/build-module/components/rich-text/event-listeners/index.js +0 -1
- package/build-module/components/rich-text/event-listeners/index.js.map +1 -1
- package/build-module/components/rich-text/event-listeners/input-rules.js +0 -1
- package/build-module/components/rich-text/event-listeners/input-rules.js.map +1 -1
- package/build-module/components/rich-text/event-listeners/paste-handler.js +0 -1
- package/build-module/components/rich-text/event-listeners/paste-handler.js.map +1 -1
- package/build-module/components/rich-text/file-paste-handler.native.js +0 -1
- package/build-module/components/rich-text/file-paste-handler.native.js.map +1 -1
- package/build-module/components/rich-text/format-edit.js +0 -1
- package/build-module/components/rich-text/format-edit.js.map +1 -1
- package/build-module/components/rich-text/format-toolbar/index.js +0 -1
- package/build-module/components/rich-text/format-toolbar/index.js.map +1 -1
- package/build-module/components/rich-text/index.js +0 -1
- package/build-module/components/rich-text/index.js.map +1 -1
- package/build-module/components/rich-text/index.native.js +0 -1
- package/build-module/components/rich-text/index.native.js.map +1 -1
- package/build-module/components/rich-text/multiline.js +0 -1
- package/build-module/components/rich-text/multiline.js.map +1 -1
- package/build-module/components/rich-text/native/format-edit.js +0 -1
- package/build-module/components/rich-text/native/format-edit.js.map +1 -1
- package/build-module/components/rich-text/native/get-format-colors.native.js +0 -1
- package/build-module/components/rich-text/native/get-format-colors.native.js.map +1 -1
- package/build-module/components/rich-text/native/index.native.js +0 -1
- 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 +0 -1
- package/build-module/components/rich-text/native/toolbar-button-with-options.native.js.map +1 -1
- package/build-module/components/rich-text/native/use-format-types.js +0 -1
- package/build-module/components/rich-text/native/use-format-types.js.map +1 -1
- package/build-module/components/rich-text/use-format-types.js +0 -1
- package/build-module/components/rich-text/use-format-types.js.map +1 -1
- package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.js +0 -1
- package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
- package/build-module/components/spacing-sizes-control/input-controls/axial.js +0 -1
- package/build-module/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
- package/build-module/components/spacing-sizes-control/input-controls/separated.js +0 -1
- package/build-module/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
- package/build-module/components/spacing-sizes-control/input-controls/single.js +0 -1
- package/build-module/components/spacing-sizes-control/input-controls/single.js.map +1 -1
- package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js +0 -1
- 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 +0 -1
- package/build-module/components/spacing-sizes-control/utils.js.map +1 -1
- package/build-module/components/tabbed-sidebar/index.js +0 -1
- package/build-module/components/tabbed-sidebar/index.js.map +1 -1
- package/build-module/components/text-alignment-control/index.js +0 -1
- package/build-module/components/text-alignment-control/index.js.map +1 -1
- package/build-module/components/text-decoration-control/index.js +0 -1
- package/build-module/components/text-decoration-control/index.js.map +1 -1
- package/build-module/components/text-transform-control/index.js +0 -1
- package/build-module/components/text-transform-control/index.js.map +1 -1
- package/build-module/components/tool-selector/index.js +1 -1
- package/build-module/components/tool-selector/index.js.map +1 -1
- package/build-module/components/unsupported-block-details/index.native.js +0 -1
- package/build-module/components/unsupported-block-details/index.native.js.map +1 -1
- package/build-module/components/url-input/index.js +0 -1
- package/build-module/components/url-input/index.js.map +1 -1
- package/build-module/components/url-popover/image-url-input-ui.js +0 -1
- package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
- package/build-module/components/use-block-commands/index.js +0 -1
- package/build-module/components/use-block-commands/index.js.map +1 -1
- package/build-module/components/use-block-drop-zone/index.js +0 -1
- package/build-module/components/use-block-drop-zone/index.js.map +1 -1
- package/build-module/components/use-block-drop-zone/index.native.js +0 -1
- package/build-module/components/use-block-drop-zone/index.native.js.map +1 -1
- package/build-module/components/use-flash-editable-blocks/index.js +0 -1
- package/build-module/components/use-flash-editable-blocks/index.js.map +1 -1
- package/build-module/components/use-on-block-drop/index.js +0 -1
- package/build-module/components/use-on-block-drop/index.js.map +1 -1
- package/build-module/components/use-on-block-drop/index.native.js +0 -1
- package/build-module/components/use-on-block-drop/index.native.js.map +1 -1
- package/build-module/components/use-paste-styles/index.js +0 -1
- package/build-module/components/use-paste-styles/index.js.map +1 -1
- package/build-module/components/warning/index.js +0 -1
- package/build-module/components/warning/index.js.map +1 -1
- package/build-module/components/writing-flow/use-arrow-nav.js +0 -1
- package/build-module/components/writing-flow/use-arrow-nav.js.map +1 -1
- package/build-module/components/writing-flow/use-clipboard-handler.js +0 -1
- package/build-module/components/writing-flow/use-clipboard-handler.js.map +1 -1
- package/build-module/components/writing-flow/use-input.js +0 -1
- package/build-module/components/writing-flow/use-input.js.map +1 -1
- package/build-module/components/writing-flow/use-tab-nav.js +3 -1
- package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
- package/build-module/components/writing-flow/utils.js +0 -1
- package/build-module/components/writing-flow/utils.js.map +1 -1
- package/build-module/components/writing-mode-control/index.js +0 -1
- package/build-module/components/writing-mode-control/index.js.map +1 -1
- package/build-module/hooks/align.js +0 -1
- package/build-module/hooks/align.js.map +1 -1
- package/build-module/hooks/align.native.js +0 -1
- package/build-module/hooks/align.native.js.map +1 -1
- package/build-module/hooks/aria-label.js +3 -7
- package/build-module/hooks/aria-label.js.map +1 -1
- package/build-module/hooks/block-bindings.js +0 -1
- package/build-module/hooks/block-bindings.js.map +1 -1
- package/build-module/hooks/block-hooks.js +0 -1
- package/build-module/hooks/block-hooks.js.map +1 -1
- package/build-module/hooks/block-style-variation.js +0 -1
- package/build-module/hooks/block-style-variation.js.map +1 -1
- package/build-module/hooks/border.js +0 -1
- package/build-module/hooks/border.js.map +1 -1
- package/build-module/hooks/contrast-checker.js +0 -1
- package/build-module/hooks/contrast-checker.js.map +1 -1
- package/build-module/hooks/duotone.js +0 -1
- package/build-module/hooks/duotone.js.map +1 -1
- package/build-module/hooks/index.js +0 -1
- package/build-module/hooks/index.js.map +1 -1
- package/build-module/hooks/layout.js +1 -2
- package/build-module/hooks/layout.js.map +1 -1
- package/build-module/hooks/position.js +0 -1
- package/build-module/hooks/position.js.map +1 -1
- package/build-module/hooks/style.js +0 -1
- package/build-module/hooks/style.js.map +1 -1
- package/build-module/hooks/supports.js +0 -1
- package/build-module/hooks/supports.js.map +1 -1
- package/build-module/hooks/text-align.js +0 -1
- package/build-module/hooks/text-align.js.map +1 -1
- package/build-module/hooks/typography.js +0 -1
- package/build-module/hooks/typography.js.map +1 -1
- package/build-module/hooks/use-zoom-out.js +2 -12
- package/build-module/hooks/use-zoom-out.js.map +1 -1
- package/build-module/hooks/utils.js +0 -1
- package/build-module/hooks/utils.js.map +1 -1
- package/build-module/layouts/constrained.js +0 -1
- package/build-module/layouts/constrained.js.map +1 -1
- package/build-module/layouts/flex.js +0 -1
- package/build-module/layouts/flex.js.map +1 -1
- package/build-module/layouts/flow.js +0 -1
- package/build-module/layouts/flow.js.map +1 -1
- package/build-module/layouts/index.js +0 -1
- package/build-module/layouts/index.js.map +1 -1
- package/build-module/layouts/utils.js +0 -1
- package/build-module/layouts/utils.js.map +1 -1
- package/build-module/store/actions.js +0 -1
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/get-block-settings.js +0 -1
- package/build-module/store/get-block-settings.js.map +1 -1
- package/build-module/store/private-actions.js +0 -1
- package/build-module/store/private-actions.js.map +1 -1
- package/build-module/store/private-selectors.js +0 -1
- package/build-module/store/private-selectors.js.map +1 -1
- package/build-module/store/reducer.js +0 -1
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +0 -1
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/store/utils.js +0 -1
- package/build-module/store/utils.js.map +1 -1
- package/build-module/utils/block-bindings.js +0 -1
- package/build-module/utils/block-bindings.js.map +1 -1
- package/build-module/utils/get-editor-region.js +0 -1
- package/build-module/utils/get-editor-region.js.map +1 -1
- package/build-module/utils/get-font-styles-and-weights.js +0 -1
- package/build-module/utils/get-font-styles-and-weights.js.map +1 -1
- package/build-module/utils/math.js +0 -1
- package/build-module/utils/math.js.map +1 -1
- package/build-module/utils/object.js +0 -1
- package/build-module/utils/object.js.map +1 -1
- package/build-module/utils/selection.js +0 -1
- package/build-module/utils/selection.js.map +1 -1
- package/build-module/utils/transform-styles/index.js +0 -1
- package/build-module/utils/transform-styles/index.js.map +1 -1
- package/build-style/content-rtl.css +22 -25
- package/build-style/content.css +22 -25
- package/build-style/style-rtl.css +136 -104
- package/build-style/style.css +136 -104
- package/package.json +34 -34
- package/src/components/background-image-control/index.js +1 -6
- package/src/components/block-canvas/style.scss +3 -2
- package/src/components/block-draggable/style.scss +3 -1
- package/src/components/block-list/content.scss +19 -12
- package/src/components/block-list/index.js +21 -7
- package/src/components/block-mover/style.scss +5 -4
- package/src/components/block-pattern-setup/style.scss +3 -1
- package/src/components/block-patterns-list/style.scss +3 -3
- package/src/components/block-popover/use-popover-scroll.js +13 -8
- package/src/components/block-settings-menu/block-settings-dropdown.js +26 -7
- package/src/components/block-switcher/style.scss +3 -1
- package/src/components/block-toolbar/style.scss +5 -3
- package/src/components/block-tools/block-toolbar-popover.js +4 -3
- package/src/components/block-tools/style.scss +6 -3
- package/src/components/button-block-appender/content.scss +2 -4
- package/src/components/color-palette/test/__snapshots__/control.js.snap +1 -1
- package/src/components/colors-gradients/style.scss +3 -2
- package/src/components/global-styles/filters-panel.js +48 -21
- package/src/components/global-styles/shadow-panel-components.js +44 -13
- package/src/components/global-styles/style.scss +53 -1
- package/src/components/grid/style.scss +5 -4
- package/src/components/iframe/content.scss +5 -2
- package/src/components/iframe/index.js +16 -13
- package/src/components/image-editor/aspect-ratio-dropdown.js +1 -1
- package/src/components/inner-blocks/index.js +2 -2
- package/src/components/inner-blocks/index.native.js +2 -2
- package/src/components/inserter/block-patterns-explorer/index.js +6 -4
- package/src/components/inserter/block-patterns-explorer/pattern-list.js +5 -1
- package/src/components/inserter/block-patterns-tab/index.js +1 -3
- package/src/components/inserter/block-patterns-tab/pattern-category-previews.js +4 -4
- package/src/components/inserter/block-patterns-tab/patterns-filter.js +2 -2
- package/src/components/inserter/category-tabs/index.js +1 -3
- package/src/components/inserter/no-results.js +0 -5
- package/src/components/inserter/quick-inserter.js +4 -1
- package/src/components/inserter/search-results.js +3 -1
- package/src/components/inserter/style.scss +11 -8
- package/src/components/inserter-list-item/style.scss +9 -6
- package/src/components/keyboard-shortcuts/index.js +31 -1
- package/src/components/link-control/style.scss +11 -6
- package/src/components/list-view/style.scss +34 -17
- package/src/components/media-placeholder/index.js +1 -0
- package/src/components/rich-text/event-listeners/delete.js +3 -3
- package/src/components/tool-selector/index.js +1 -1
- package/src/components/url-input/style.scss +3 -2
- package/src/components/writing-flow/use-tab-nav.js +4 -0
- package/src/hooks/aria-label.js +3 -8
- package/src/hooks/layout.js +1 -1
- package/src/hooks/use-zoom-out.js +2 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","_data","_i18n","_icons","_element","_blockTitle","_interopRequireDefault","_store","_lockUnlock","_useBlockRefs","_getEditorRegion","_jsxRuntime","BlockBreadcrumb","rootLabelText","selectBlock","clearSelectedBlock","useDispatch","blockEditorStore","clientId","parents","hasSelection","useSelect","select","getSelectionStart","getSelectedBlockClientId","getEnabledBlockParents","unlock","selectedBlockClientId","rootLabel","__","blockRef","useRef","useBlockElementRef","jsxs","className","role","children","undefined","jsx","Button","size","onClick","blockEditor","current","closest","getEditorRegion","focus","Icon","icon","chevronRightSmall","map","parentClientId","default","maximumLength","_default","exports"],"sources":["@wordpress/block-editor/src/components/block-breadcrumb/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Button } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { chevronRightSmall, Icon } from '@wordpress/icons';\nimport { useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BlockTitle from '../block-title';\nimport { store as blockEditorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport { useBlockElementRef } from '../block-list/use-block-props/use-block-refs';\nimport getEditorRegion from '../../utils/get-editor-region';\n\n/**\n * Block breadcrumb component, displaying the hierarchy of the current block selection as a breadcrumb.\n *\n * @param {Object} props Component props.\n * @param {string} props.rootLabelText Translated label for the root element of the breadcrumb trail.\n * @return {Element} Block Breadcrumb.\n */\nfunction BlockBreadcrumb( { rootLabelText } ) {\n\tconst { selectBlock, clearSelectedBlock } = useDispatch( blockEditorStore );\n\tconst { clientId, parents, hasSelection } = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetSelectionStart,\n\t\t\tgetSelectedBlockClientId,\n\t\t\tgetEnabledBlockParents,\n\t\t} = unlock( select( blockEditorStore ) );\n\t\tconst selectedBlockClientId = getSelectedBlockClientId();\n\t\treturn {\n\t\t\tparents: getEnabledBlockParents( selectedBlockClientId ),\n\t\t\tclientId: selectedBlockClientId,\n\t\t\thasSelection: !! getSelectionStart().clientId,\n\t\t};\n\t}, [] );\n\tconst rootLabel = rootLabelText || __( 'Document' );\n\n\t// We don't care about this specific ref, but this is a way\n\t// to get a ref within the editor canvas so we can focus it later.\n\tconst blockRef = useRef();\n\tuseBlockElementRef( clientId, blockRef );\n\n\t/*\n\t * Disable reason: The `list` ARIA role is redundant but\n\t * Safari+VoiceOver won't announce the list otherwise.\n\t */\n\t/* eslint-disable jsx-a11y/no-redundant-roles */\n\treturn (\n\t\t<ul\n\t\t\tclassName=\"block-editor-block-breadcrumb\"\n\t\t\trole=\"list\"\n\t\t\taria-label={ __( 'Block breadcrumb' ) }\n\t\t>\n\t\t\t<li\n\t\t\t\tclassName={\n\t\t\t\t\t! hasSelection\n\t\t\t\t\t\t? 'block-editor-block-breadcrumb__current'\n\t\t\t\t\t\t: undefined\n\t\t\t\t}\n\t\t\t\taria-current={ ! hasSelection ? 'true' : undefined }\n\t\t\t>\n\t\t\t\t{ hasSelection && (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\tclassName=\"block-editor-block-breadcrumb__button\"\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t// Find the block editor wrapper for the selected block\n\t\t\t\t\t\t\tconst blockEditor = blockRef.current?.closest(\n\t\t\t\t\t\t\t\t'.editor-styles-wrapper'\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tclearSelectedBlock();\n\n\t\t\t\t\t\t\tgetEditorRegion( blockEditor )?.focus();\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ rootLabel }\n\t\t\t\t\t</Button>\n\t\t\t\t) }\n\t\t\t\t{ ! hasSelection && rootLabel }\n\t\t\t\t{ !! clientId && (\n\t\t\t\t\t<Icon\n\t\t\t\t\t\ticon={ chevronRightSmall }\n\t\t\t\t\t\tclassName=\"block-editor-block-breadcrumb__separator\"\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</li>\n\n\t\t\t{ parents.map( ( parentClientId ) => (\n\t\t\t\t<li key={ parentClientId }>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\tclassName=\"block-editor-block-breadcrumb__button\"\n\t\t\t\t\t\tonClick={ () => selectBlock( parentClientId ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<BlockTitle\n\t\t\t\t\t\t\tclientId={ parentClientId }\n\t\t\t\t\t\t\tmaximumLength={ 35 }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Icon\n\t\t\t\t\t\ticon={ chevronRightSmall }\n\t\t\t\t\t\tclassName=\"block-editor-block-breadcrumb__separator\"\n\t\t\t\t\t/>\n\t\t\t\t</li>\n\t\t\t) ) }\n\t\t\t{ !! clientId && (\n\t\t\t\t<li\n\t\t\t\t\tclassName=\"block-editor-block-breadcrumb__current\"\n\t\t\t\t\taria-current=\"true\"\n\t\t\t\t>\n\t\t\t\t\t<BlockTitle clientId={ clientId } maximumLength={ 35 } />\n\t\t\t\t</li>\n\t\t\t) }\n\t\t</ul>\n\t\t/* eslint-enable jsx-a11y/no-redundant-roles */\n\t);\n}\n\nexport default BlockBreadcrumb;\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_components","require","_data","_i18n","_icons","_element","_blockTitle","_interopRequireDefault","_store","_lockUnlock","_useBlockRefs","_getEditorRegion","_jsxRuntime","BlockBreadcrumb","rootLabelText","selectBlock","clearSelectedBlock","useDispatch","blockEditorStore","clientId","parents","hasSelection","useSelect","select","getSelectionStart","getSelectedBlockClientId","getEnabledBlockParents","unlock","selectedBlockClientId","rootLabel","__","blockRef","useRef","useBlockElementRef","jsxs","className","role","children","undefined","jsx","Button","size","onClick","blockEditor","current","closest","getEditorRegion","focus","Icon","icon","chevronRightSmall","map","parentClientId","default","maximumLength","_default","exports"],"sources":["@wordpress/block-editor/src/components/block-breadcrumb/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Button } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { chevronRightSmall, Icon } from '@wordpress/icons';\nimport { useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BlockTitle from '../block-title';\nimport { store as blockEditorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport { useBlockElementRef } from '../block-list/use-block-props/use-block-refs';\nimport getEditorRegion from '../../utils/get-editor-region';\n\n/**\n * Block breadcrumb component, displaying the hierarchy of the current block selection as a breadcrumb.\n *\n * @param {Object} props Component props.\n * @param {string} props.rootLabelText Translated label for the root element of the breadcrumb trail.\n * @return {Element} Block Breadcrumb.\n */\nfunction BlockBreadcrumb( { rootLabelText } ) {\n\tconst { selectBlock, clearSelectedBlock } = useDispatch( blockEditorStore );\n\tconst { clientId, parents, hasSelection } = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetSelectionStart,\n\t\t\tgetSelectedBlockClientId,\n\t\t\tgetEnabledBlockParents,\n\t\t} = unlock( select( blockEditorStore ) );\n\t\tconst selectedBlockClientId = getSelectedBlockClientId();\n\t\treturn {\n\t\t\tparents: getEnabledBlockParents( selectedBlockClientId ),\n\t\t\tclientId: selectedBlockClientId,\n\t\t\thasSelection: !! getSelectionStart().clientId,\n\t\t};\n\t}, [] );\n\tconst rootLabel = rootLabelText || __( 'Document' );\n\n\t// We don't care about this specific ref, but this is a way\n\t// to get a ref within the editor canvas so we can focus it later.\n\tconst blockRef = useRef();\n\tuseBlockElementRef( clientId, blockRef );\n\n\t/*\n\t * Disable reason: The `list` ARIA role is redundant but\n\t * Safari+VoiceOver won't announce the list otherwise.\n\t */\n\t/* eslint-disable jsx-a11y/no-redundant-roles */\n\treturn (\n\t\t<ul\n\t\t\tclassName=\"block-editor-block-breadcrumb\"\n\t\t\trole=\"list\"\n\t\t\taria-label={ __( 'Block breadcrumb' ) }\n\t\t>\n\t\t\t<li\n\t\t\t\tclassName={\n\t\t\t\t\t! hasSelection\n\t\t\t\t\t\t? 'block-editor-block-breadcrumb__current'\n\t\t\t\t\t\t: undefined\n\t\t\t\t}\n\t\t\t\taria-current={ ! hasSelection ? 'true' : undefined }\n\t\t\t>\n\t\t\t\t{ hasSelection && (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\tclassName=\"block-editor-block-breadcrumb__button\"\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t// Find the block editor wrapper for the selected block\n\t\t\t\t\t\t\tconst blockEditor = blockRef.current?.closest(\n\t\t\t\t\t\t\t\t'.editor-styles-wrapper'\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tclearSelectedBlock();\n\n\t\t\t\t\t\t\tgetEditorRegion( blockEditor )?.focus();\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ rootLabel }\n\t\t\t\t\t</Button>\n\t\t\t\t) }\n\t\t\t\t{ ! hasSelection && rootLabel }\n\t\t\t\t{ !! clientId && (\n\t\t\t\t\t<Icon\n\t\t\t\t\t\ticon={ chevronRightSmall }\n\t\t\t\t\t\tclassName=\"block-editor-block-breadcrumb__separator\"\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</li>\n\n\t\t\t{ parents.map( ( parentClientId ) => (\n\t\t\t\t<li key={ parentClientId }>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\tclassName=\"block-editor-block-breadcrumb__button\"\n\t\t\t\t\t\tonClick={ () => selectBlock( parentClientId ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<BlockTitle\n\t\t\t\t\t\t\tclientId={ parentClientId }\n\t\t\t\t\t\t\tmaximumLength={ 35 }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Icon\n\t\t\t\t\t\ticon={ chevronRightSmall }\n\t\t\t\t\t\tclassName=\"block-editor-block-breadcrumb__separator\"\n\t\t\t\t\t/>\n\t\t\t\t</li>\n\t\t\t) ) }\n\t\t\t{ !! clientId && (\n\t\t\t\t<li\n\t\t\t\t\tclassName=\"block-editor-block-breadcrumb__current\"\n\t\t\t\t\taria-current=\"true\"\n\t\t\t\t>\n\t\t\t\t\t<BlockTitle clientId={ clientId } maximumLength={ 35 } />\n\t\t\t\t</li>\n\t\t\t) }\n\t\t</ul>\n\t\t/* eslint-enable jsx-a11y/no-redundant-roles */\n\t);\n}\n\nexport default BlockBreadcrumb;\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,KAAA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3BE,aAAa,EAAG;QAAI,CACpB;MAAC,CACK,CAAC,eACT,IAAA1C,WAAA,CAAA2B,GAAA,EAACnC,MAAA,CAAA4C,IAAI;QACJC,IAAI,EAAGC,wBAAmB;QAC1Bf,SAAS,EAAC;MAA0C,CACpD,CAAC;IAAA,GAdOiB,cAeN,CACH,CAAC,EACD,CAAC,CAAEjC,QAAQ,iBACZ,IAAAP,WAAA,CAAA2B,GAAA;MACCJ,SAAS,EAAC,wCAAwC;MAClD,gBAAa,MAAM;MAAAE,QAAA,eAEnB,IAAAzB,WAAA,CAAA2B,GAAA,EAACjC,WAAA,CAAA+C,OAAU;QAAClC,QAAQ,EAAGA,QAAU;QAACmC,aAAa,EAAG;MAAI,CAAE;IAAC,CACtD,CACJ;EAAA,CACE;EACJ;AAEF;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAH,OAAA,GAEcxC,eAAe","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_clsx","_interopRequireDefault","require","_character","_i18n","_blocks","_blockView","_jsxRuntime","BlockCompare","block","onKeep","onConvert","convertor","convertButtonText","getDifference","originalContent","newContent","difference","diffChars","map","item","pos","classes","clsx","added","removed","jsx","className","children","value","getConvertedContent","convertedBlock","newBlocks","Array","isArray","getSaveContent","name","attributes","innerBlocks","join","converted","jsxs","default","title","__","action","actionText","rawContent","renderedContent","_default","exports"],"sources":["@wordpress/block-editor/src/components/block-compare/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n// diff doesn't tree-shake correctly, so we import from the individual\n// module here, to avoid including too much of the library\nimport { diffChars } from 'diff/lib/diff/character';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { getSaveContent } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport BlockView from './block-view';\n\nfunction BlockCompare( {\n\tblock,\n\tonKeep,\n\tonConvert,\n\tconvertor,\n\tconvertButtonText,\n} ) {\n\tfunction getDifference( originalContent, newContent ) {\n\t\tconst difference = diffChars( originalContent, newContent );\n\n\t\treturn difference.map( ( item, pos ) => {\n\t\t\tconst classes = clsx( {\n\t\t\t\t'block-editor-block-compare__added': item.added,\n\t\t\t\t'block-editor-block-compare__removed': item.removed,\n\t\t\t} );\n\n\t\t\treturn (\n\t\t\t\t<span key={ pos } className={ classes }>\n\t\t\t\t\t{ item.value }\n\t\t\t\t</span>\n\t\t\t);\n\t\t} );\n\t}\n\n\tfunction getConvertedContent( convertedBlock ) {\n\t\t// The convertor may return an array of items or a single item.\n\t\tconst newBlocks = Array.isArray( convertedBlock )\n\t\t\t? convertedBlock\n\t\t\t: [ convertedBlock ];\n\n\t\t// Get converted block details.\n\t\tconst newContent = newBlocks.map( ( item ) =>\n\t\t\tgetSaveContent( item.name, item.attributes, item.innerBlocks )\n\t\t);\n\n\t\treturn newContent.join( '' );\n\t}\n\n\tconst converted = getConvertedContent( convertor( block ) );\n\tconst difference = getDifference( block.originalContent, converted );\n\n\treturn (\n\t\t<div className=\"block-editor-block-compare__wrapper\">\n\t\t\t<BlockView\n\t\t\t\ttitle={ __( 'Current' ) }\n\t\t\t\tclassName=\"block-editor-block-compare__current\"\n\t\t\t\taction={ onKeep }\n\t\t\t\tactionText={ __( 'Convert to HTML' ) }\n\t\t\t\trawContent={ block.originalContent }\n\t\t\t\trenderedContent={ block.originalContent }\n\t\t\t/>\n\n\t\t\t<BlockView\n\t\t\t\ttitle={ __( 'After Conversion' ) }\n\t\t\t\tclassName=\"block-editor-block-compare__converted\"\n\t\t\t\taction={ onConvert }\n\t\t\t\tactionText={ convertButtonText }\n\t\t\t\trawContent={ difference }\n\t\t\t\trenderedContent={ converted }\n\t\t\t/>\n\t\t</div>\n\t);\n}\n\nexport default BlockCompare;\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_clsx","_interopRequireDefault","require","_character","_i18n","_blocks","_blockView","_jsxRuntime","BlockCompare","block","onKeep","onConvert","convertor","convertButtonText","getDifference","originalContent","newContent","difference","diffChars","map","item","pos","classes","clsx","added","removed","jsx","className","children","value","getConvertedContent","convertedBlock","newBlocks","Array","isArray","getSaveContent","name","attributes","innerBlocks","join","converted","jsxs","default","title","__","action","actionText","rawContent","renderedContent","_default","exports"],"sources":["@wordpress/block-editor/src/components/block-compare/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n// diff doesn't tree-shake correctly, so we import from the individual\n// module here, to avoid including too much of the library\nimport { diffChars } from 'diff/lib/diff/character';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { getSaveContent } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport BlockView from './block-view';\n\nfunction BlockCompare( {\n\tblock,\n\tonKeep,\n\tonConvert,\n\tconvertor,\n\tconvertButtonText,\n} ) {\n\tfunction getDifference( originalContent, newContent ) {\n\t\tconst difference = diffChars( originalContent, newContent );\n\n\t\treturn difference.map( ( item, pos ) => {\n\t\t\tconst classes = clsx( {\n\t\t\t\t'block-editor-block-compare__added': item.added,\n\t\t\t\t'block-editor-block-compare__removed': item.removed,\n\t\t\t} );\n\n\t\t\treturn (\n\t\t\t\t<span key={ pos } className={ classes }>\n\t\t\t\t\t{ item.value }\n\t\t\t\t</span>\n\t\t\t);\n\t\t} );\n\t}\n\n\tfunction getConvertedContent( convertedBlock ) {\n\t\t// The convertor may return an array of items or a single item.\n\t\tconst newBlocks = Array.isArray( convertedBlock )\n\t\t\t? convertedBlock\n\t\t\t: [ convertedBlock ];\n\n\t\t// Get converted block details.\n\t\tconst newContent = newBlocks.map( ( item ) =>\n\t\t\tgetSaveContent( item.name, item.attributes, item.innerBlocks )\n\t\t);\n\n\t\treturn newContent.join( '' );\n\t}\n\n\tconst converted = getConvertedContent( convertor( block ) );\n\tconst difference = getDifference( block.originalContent, converted );\n\n\treturn (\n\t\t<div className=\"block-editor-block-compare__wrapper\">\n\t\t\t<BlockView\n\t\t\t\ttitle={ __( 'Current' ) }\n\t\t\t\tclassName=\"block-editor-block-compare__current\"\n\t\t\t\taction={ onKeep }\n\t\t\t\tactionText={ __( 'Convert to HTML' ) }\n\t\t\t\trawContent={ block.originalContent }\n\t\t\t\trenderedContent={ block.originalContent }\n\t\t\t/>\n\n\t\t\t<BlockView\n\t\t\t\ttitle={ __( 'After Conversion' ) }\n\t\t\t\tclassName=\"block-editor-block-compare__converted\"\n\t\t\t\taction={ onConvert }\n\t\t\t\tactionText={ convertButtonText }\n\t\t\t\trawContent={ difference }\n\t\t\t\trenderedContent={ converted }\n\t\t\t/>\n\t\t</div>\n\t);\n}\n\nexport default BlockCompare;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAGA,IAAAC,UAAA,GAAAD,OAAA;AAKA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAKA,IAAAI,UAAA,GAAAL,sBAAA,CAAAC,OAAA;AAAqC,IAAAK,WAAA,GAAAL,OAAA;AAjBrC;AACA;AACA;;AAEA;AACA;;AAGA;AACA;AACA;;AAIA;AACA;AACA;;AAGA,SAASM,YAAYA,CAAE;EACtBC,KAAK;EACLC,MAAM;EACNC,SAAS;EACTC,SAAS;EACTC;AACD,CAAC,EAAG;EACH,SAASC,aAAaA,CAAEC,eAAe,EAAEC,UAAU,EAAG;IACrD,MAAMC,UAAU,GAAG,IAAAC,oBAAS,EAAEH,eAAe,EAAEC,UAAW,CAAC;IAE3D,OAAOC,UAAU,CAACE,GAAG,CAAE,CAAEC,IAAI,EAAEC,GAAG,KAAM;MACvC,MAAMC,OAAO,GAAG,IAAAC,aAAI,EAAE;QACrB,mCAAmC,EAAEH,IAAI,CAACI,KAAK;QAC/C,qCAAqC,EAAEJ,IAAI,CAACK;MAC7C,CAAE,CAAC;MAEH,oBACC,IAAAlB,WAAA,CAAAmB,GAAA;QAAkBC,SAAS,EAAGL,OAAS;QAAAM,QAAA,EACpCR,IAAI,CAACS;MAAK,GADD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GR;IAAW,CAC7B,CAAC;EAAA,CACE,CAAC;AAER;AAAC,IAAAS,QAAA,GAAAC,OAAA,CAAAR,OAAA,GAEclC,YAAY","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","_hook","_interopRequireDefault","_jsxRuntime","BlockControlsFill","group","controls","children","__experimentalShareWithChildBlocks","Fill","useBlockControlsFill","innerMarkup","jsxs","Fragment","jsx","ToolbarGroup","__experimentalStyleProvider","document","fillProps","forwardedContext","reduce","inner","Provider","props"],"sources":["@wordpress/block-editor/src/components/block-controls/fill.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalStyleProvider as StyleProvider,\n\tToolbarGroup,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport useBlockControlsFill from './hook';\n\nexport default function BlockControlsFill( {\n\tgroup = 'default',\n\tcontrols,\n\tchildren,\n\t__experimentalShareWithChildBlocks = false,\n} ) {\n\tconst Fill = useBlockControlsFill(\n\t\tgroup,\n\t\t__experimentalShareWithChildBlocks\n\t);\n\tif ( ! Fill ) {\n\t\treturn null;\n\t}\n\n\tconst innerMarkup = (\n\t\t<>\n\t\t\t{ group === 'default' && <ToolbarGroup controls={ controls } /> }\n\t\t\t{ children }\n\t\t</>\n\t);\n\n\treturn (\n\t\t<StyleProvider document={ document }>\n\t\t\t<Fill>\n\t\t\t\t{ ( fillProps ) => {\n\t\t\t\t\t// `fillProps.forwardedContext` is an array of context provider entries, provided by slot,\n\t\t\t\t\t// that should wrap the fill markup.\n\t\t\t\t\tconst { forwardedContext = [] } = fillProps;\n\t\t\t\t\treturn forwardedContext.reduce(\n\t\t\t\t\t\t( inner, [ Provider, props ] ) => (\n\t\t\t\t\t\t\t<Provider { ...props }>{ inner }</Provider>\n\t\t\t\t\t\t),\n\t\t\t\t\t\tinnerMarkup\n\t\t\t\t\t);\n\t\t\t\t} }\n\t\t\t</Fill>\n\t\t</StyleProvider>\n\t);\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_components","require","_hook","_interopRequireDefault","_jsxRuntime","BlockControlsFill","group","controls","children","__experimentalShareWithChildBlocks","Fill","useBlockControlsFill","innerMarkup","jsxs","Fragment","jsx","ToolbarGroup","__experimentalStyleProvider","document","fillProps","forwardedContext","reduce","inner","Provider","props"],"sources":["@wordpress/block-editor/src/components/block-controls/fill.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalStyleProvider as StyleProvider,\n\tToolbarGroup,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport useBlockControlsFill from './hook';\n\nexport default function BlockControlsFill( {\n\tgroup = 'default',\n\tcontrols,\n\tchildren,\n\t__experimentalShareWithChildBlocks = false,\n} ) {\n\tconst Fill = useBlockControlsFill(\n\t\tgroup,\n\t\t__experimentalShareWithChildBlocks\n\t);\n\tif ( ! Fill ) {\n\t\treturn null;\n\t}\n\n\tconst innerMarkup = (\n\t\t<>\n\t\t\t{ group === 'default' && <ToolbarGroup controls={ controls } /> }\n\t\t\t{ children }\n\t\t</>\n\t);\n\n\treturn (\n\t\t<StyleProvider document={ document }>\n\t\t\t<Fill>\n\t\t\t\t{ ( fillProps ) => {\n\t\t\t\t\t// `fillProps.forwardedContext` is an array of context provider entries, provided by slot,\n\t\t\t\t\t// that should wrap the fill markup.\n\t\t\t\t\tconst { forwardedContext = [] } = fillProps;\n\t\t\t\t\treturn forwardedContext.reduce(\n\t\t\t\t\t\t( inner, [ Provider, props ] ) => (\n\t\t\t\t\t\t\t<Provider { ...props }>{ inner }</Provider>\n\t\t\t\t\t\t),\n\t\t\t\t\t\tinnerMarkup\n\t\t\t\t\t);\n\t\t\t\t} }\n\t\t\t</Fill>\n\t\t</StyleProvider>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAQA,IAAAC,KAAA,GAAAC,sBAAA,CAAAF,OAAA;AAA0C,IAAAG,WAAA,GAAAH,OAAA;AAX1C;AACA;AACA;;AAMA;AACA;AACA;;AAGe,SAASI,iBAAiBA,CAAE;EAC1CC,KAAK,GAAG,SAAS;EACjBC,QAAQ;EACRC,QAAQ;EACRC,kCAAkC,GAAG;AACtC,CAAC,EAAG;EACH,MAAMC,IAAI,GAAG,IAAAC,aAAoB,EAChCL,KAAK,EACLG,kCACD,CAAC;EACD,IAAK,CAAEC,IAAI,EAAG;IACb,OAAO,IAAI;EACZ;EAEA,MAAME,WAAW,gBAChB,IAAAR,WAAA,CAAAS,IAAA,EAAAT,WAAA,CAAAU,QAAA;IAAAN,QAAA,GACGF,KAAK,KAAK,SAAS,iBAAI,IAAAF,WAAA,CAAAW,GAAA,EAACf,WAAA,CAAAgB,YAAY;MAACT,QAAQ,EAAGA;IAAU,CAAE,CAAC,EAC7DC,QAAQ;EAAA,CACT,CACF;EAED,oBACC,IAAAJ,WAAA,CAAAW,GAAA,EAACf,WAAA,CAAAiB,2BAAa;IAACC,QAAQ,EAAGA,QAAU;IAAAV,QAAA,eACnC,IAAAJ,WAAA,CAAAW,GAAA,EAACL,IAAI;MAAAF,QAAA,EACAW,SAAS,IAAM;QAClB;QACA;QACA,MAAM;UAAEC,gBAAgB,GAAG;QAAG,CAAC,GAAGD,SAAS;QAC3C,OAAOC,gBAAgB,CAACC,MAAM,CAC7B,CAAEC,KAAK,EAAE,CAAEC,QAAQ,EAAEC,KAAK,CAAE,kBAC3B,IAAApB,WAAA,CAAAW,GAAA,EAACQ,QAAQ;UAAA,GAAMC,KAAK;UAAAhB,QAAA,EAAKc;QAAK,CAAY,CAC1C,EACDV,WACD,CAAC;MACF;IAAC,CACI;EAAC,CACO,CAAC;AAElB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_clsx","_interopRequireDefault","require","_blocks","_components","_data","_element","_blockContext","_isUrlLike","_blockBindings","_lockUnlock","_jsxRuntime","DEFAULT_BLOCK_CONTEXT","Edit","props","name","blockType","getBlockType","Component","edit","save","jsx","EditWithFilters","withFilters","EditWithGeneratedProps","clientId","attributes","setAttributes","registry","useRegistry","blockContext","useContext","BlockContext","registeredSources","useSelect","select","unlock","blocksStore","getAllBlockBindingsSources","blockBindings","context","hasPatternOverrides","useMemo","computedContext","usesContext","Object","fromEntries","entries","filter","key","includes","metadata","bindings","values","forEach","binding","source","replacePatternOverridesDefaultBinding","hasPatternOverridesDefaultBinding","computedAttributes","attributesFromSources","blockBindingsBySource","Map","attributeName","sourceName","args","sourceArgs","canBindAttribute","set","get","size","getValues","keys","attr","label","value","isURLLike","setBoundAttributes","useCallback","nextAttributes","batch","keptAttributes","newValue","setValues","dispatch","hasParentPattern","length","caption","href","apiVersion","generatedClassName","hasBlockSupport","getBlockDefaultClassName","className","clsx","_default","exports","default"],"sources":["@wordpress/block-editor/src/components/block-edit/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tgetBlockDefaultClassName,\n\tgetBlockType,\n\thasBlockSupport,\n\tstore as blocksStore,\n} from '@wordpress/blocks';\nimport { withFilters } from '@wordpress/components';\nimport { useRegistry, useSelect } from '@wordpress/data';\nimport { useCallback, useContext, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BlockContext from '../block-context';\nimport isURLLike from '../link-control/is-url-like';\nimport {\n\tcanBindAttribute,\n\thasPatternOverridesDefaultBinding,\n\treplacePatternOverridesDefaultBinding,\n} from '../../utils/block-bindings';\nimport { unlock } from '../../lock-unlock';\n\n/**\n * Default value used for blocks which do not define their own context needs,\n * used to guarantee that a block's `context` prop will always be an object. It\n * is assigned as a constant since it is always expected to be an empty object,\n * and in order to avoid unnecessary React reconciliations of a changing object.\n *\n * @type {{}}\n */\nconst DEFAULT_BLOCK_CONTEXT = {};\n\nconst Edit = ( props ) => {\n\tconst { name } = props;\n\tconst blockType = getBlockType( name );\n\n\tif ( ! blockType ) {\n\t\treturn null;\n\t}\n\n\t// `edit` and `save` are functions or components describing the markup\n\t// with which a block is displayed. If `blockType` is valid, assign\n\t// them preferentially as the render value for the block.\n\tconst Component = blockType.edit || blockType.save;\n\n\treturn <Component { ...props } />;\n};\n\nconst EditWithFilters = withFilters( 'editor.BlockEdit' )( Edit );\n\nconst EditWithGeneratedProps = ( props ) => {\n\tconst { name, clientId, attributes, setAttributes } = props;\n\tconst registry = useRegistry();\n\tconst blockType = getBlockType( name );\n\tconst blockContext = useContext( BlockContext );\n\tconst registeredSources = useSelect(\n\t\t( select ) =>\n\t\t\tunlock( select( blocksStore ) ).getAllBlockBindingsSources(),\n\t\t[]\n\t);\n\n\tconst { blockBindings, context, hasPatternOverrides } = useMemo( () => {\n\t\t// Assign context values using the block type's declared context needs.\n\t\tconst computedContext = blockType?.usesContext\n\t\t\t? Object.fromEntries(\n\t\t\t\t\tObject.entries( blockContext ).filter( ( [ key ] ) =>\n\t\t\t\t\t\tblockType.usesContext.includes( key )\n\t\t\t\t\t)\n\t\t\t )\n\t\t\t: DEFAULT_BLOCK_CONTEXT;\n\t\t// Add context requested by Block Bindings sources.\n\t\tif ( attributes?.metadata?.bindings ) {\n\t\t\tObject.values( attributes?.metadata?.bindings || {} ).forEach(\n\t\t\t\t( binding ) => {\n\t\t\t\t\tregisteredSources[ binding?.source ]?.usesContext?.forEach(\n\t\t\t\t\t\t( key ) => {\n\t\t\t\t\t\t\tcomputedContext[ key ] = blockContext[ key ];\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t\treturn {\n\t\t\tblockBindings: replacePatternOverridesDefaultBinding(\n\t\t\t\tname,\n\t\t\t\tattributes?.metadata?.bindings\n\t\t\t),\n\t\t\tcontext: computedContext,\n\t\t\thasPatternOverrides: hasPatternOverridesDefaultBinding(\n\t\t\t\tattributes?.metadata?.bindings\n\t\t\t),\n\t\t};\n\t}, [\n\t\tname,\n\t\tblockType?.usesContext,\n\t\tblockContext,\n\t\tattributes?.metadata?.bindings,\n\t\tregisteredSources,\n\t] );\n\n\tconst computedAttributes = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! blockBindings ) {\n\t\t\t\treturn attributes;\n\t\t\t}\n\n\t\t\tconst attributesFromSources = {};\n\t\t\tconst blockBindingsBySource = new Map();\n\n\t\t\tfor ( const [ attributeName, binding ] of Object.entries(\n\t\t\t\tblockBindings\n\t\t\t) ) {\n\t\t\t\tconst { source: sourceName, args: sourceArgs } = binding;\n\t\t\t\tconst source = registeredSources[ sourceName ];\n\t\t\t\tif ( ! source || ! canBindAttribute( name, attributeName ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tblockBindingsBySource.set( source, {\n\t\t\t\t\t...blockBindingsBySource.get( source ),\n\t\t\t\t\t[ attributeName ]: {\n\t\t\t\t\t\targs: sourceArgs,\n\t\t\t\t\t},\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tif ( blockBindingsBySource.size ) {\n\t\t\t\tfor ( const [ source, bindings ] of blockBindingsBySource ) {\n\t\t\t\t\t// Get values in batch if the source supports it.\n\t\t\t\t\tlet values = {};\n\t\t\t\t\tif ( ! source.getValues ) {\n\t\t\t\t\t\tObject.keys( bindings ).forEach( ( attr ) => {\n\t\t\t\t\t\t\t// Default to the the source label when `getValues` doesn't exist.\n\t\t\t\t\t\t\tvalues[ attr ] = source.label;\n\t\t\t\t\t\t} );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvalues = source.getValues( {\n\t\t\t\t\t\t\tselect,\n\t\t\t\t\t\t\tcontext,\n\t\t\t\t\t\t\tclientId,\n\t\t\t\t\t\t\tbindings,\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t\tfor ( const [ attributeName, value ] of Object.entries(\n\t\t\t\t\t\tvalues\n\t\t\t\t\t) ) {\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tattributeName === 'url' &&\n\t\t\t\t\t\t\t( ! value || ! isURLLike( value ) )\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t// Return null if value is not a valid URL.\n\t\t\t\t\t\t\tattributesFromSources[ attributeName ] = null;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tattributesFromSources[ attributeName ] = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\t...attributes,\n\t\t\t\t...attributesFromSources,\n\t\t\t};\n\t\t},\n\t\t[\n\t\t\tattributes,\n\t\t\tblockBindings,\n\t\t\tclientId,\n\t\t\tcontext,\n\t\t\tname,\n\t\t\tregisteredSources,\n\t\t]\n\t);\n\n\tconst setBoundAttributes = useCallback(\n\t\t( nextAttributes ) => {\n\t\t\tif ( ! blockBindings ) {\n\t\t\t\tsetAttributes( nextAttributes );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tregistry.batch( () => {\n\t\t\t\tconst keptAttributes = { ...nextAttributes };\n\t\t\t\tconst blockBindingsBySource = new Map();\n\n\t\t\t\t// Loop only over the updated attributes to avoid modifying the bound ones that haven't changed.\n\t\t\t\tfor ( const [ attributeName, newValue ] of Object.entries(\n\t\t\t\t\tkeptAttributes\n\t\t\t\t) ) {\n\t\t\t\t\tif (\n\t\t\t\t\t\t! blockBindings[ attributeName ] ||\n\t\t\t\t\t\t! canBindAttribute( name, attributeName )\n\t\t\t\t\t) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst binding = blockBindings[ attributeName ];\n\t\t\t\t\tconst source = registeredSources[ binding?.source ];\n\t\t\t\t\tif ( ! source?.setValues ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tblockBindingsBySource.set( source, {\n\t\t\t\t\t\t...blockBindingsBySource.get( source ),\n\t\t\t\t\t\t[ attributeName ]: {\n\t\t\t\t\t\t\targs: binding.args,\n\t\t\t\t\t\t\tnewValue,\n\t\t\t\t\t\t},\n\t\t\t\t\t} );\n\t\t\t\t\tdelete keptAttributes[ attributeName ];\n\t\t\t\t}\n\n\t\t\t\tif ( blockBindingsBySource.size ) {\n\t\t\t\t\tfor ( const [\n\t\t\t\t\t\tsource,\n\t\t\t\t\t\tbindings,\n\t\t\t\t\t] of blockBindingsBySource ) {\n\t\t\t\t\t\tsource.setValues( {\n\t\t\t\t\t\t\tselect: registry.select,\n\t\t\t\t\t\t\tdispatch: registry.dispatch,\n\t\t\t\t\t\t\tcontext,\n\t\t\t\t\t\t\tclientId,\n\t\t\t\t\t\t\tbindings,\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tconst hasParentPattern = !! context[ 'pattern/overrides' ];\n\n\t\t\t\tif (\n\t\t\t\t\t// Don't update non-connected attributes if the block is using pattern overrides\n\t\t\t\t\t// and the editing is happening while overriding the pattern (not editing the original).\n\t\t\t\t\t! ( hasPatternOverrides && hasParentPattern ) &&\n\t\t\t\t\tObject.keys( keptAttributes ).length\n\t\t\t\t) {\n\t\t\t\t\t// Don't update caption and href until they are supported.\n\t\t\t\t\tif ( hasPatternOverrides ) {\n\t\t\t\t\t\tdelete keptAttributes.caption;\n\t\t\t\t\t\tdelete keptAttributes.href;\n\t\t\t\t\t}\n\t\t\t\t\tsetAttributes( keptAttributes );\n\t\t\t\t}\n\t\t\t} );\n\t\t},\n\t\t[\n\t\t\tblockBindings,\n\t\t\tclientId,\n\t\t\tcontext,\n\t\t\thasPatternOverrides,\n\t\t\tsetAttributes,\n\t\t\tregisteredSources,\n\t\t\tname,\n\t\t\tregistry,\n\t\t]\n\t);\n\n\tif ( ! blockType ) {\n\t\treturn null;\n\t}\n\n\tif ( blockType.apiVersion > 1 ) {\n\t\treturn (\n\t\t\t<EditWithFilters\n\t\t\t\t{ ...props }\n\t\t\t\tattributes={ computedAttributes }\n\t\t\t\tcontext={ context }\n\t\t\t\tsetAttributes={ setBoundAttributes }\n\t\t\t/>\n\t\t);\n\t}\n\n\t// Generate a class name for the block's editable form.\n\tconst generatedClassName = hasBlockSupport( blockType, 'className', true )\n\t\t? getBlockDefaultClassName( name )\n\t\t: null;\n\tconst className = clsx(\n\t\tgeneratedClassName,\n\t\tattributes?.className,\n\t\tprops.className\n\t);\n\n\treturn (\n\t\t<EditWithFilters\n\t\t\t{ ...props }\n\t\t\tattributes={ computedAttributes }\n\t\t\tclassName={ className }\n\t\t\tcontext={ context }\n\t\t\tsetAttributes={ setBoundAttributes }\n\t\t/>\n\t);\n};\n\nexport default EditWithGeneratedProps;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,OAAA,GAAAD,OAAA;AAMA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAKA,IAAAK,aAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,UAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,cAAA,GAAAP,OAAA;AAKA,IAAAQ,WAAA,GAAAR,OAAA;AAA2C,IAAAS,WAAA,GAAAT,OAAA;AA5B3C;AACA;AACA;;AAGA;AACA;AACA;;AAWA;AACA;AACA;;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACA,MAAMU,qBAAqB,GAAG,CAAC,CAAC;AAEhC,MAAMC,IAAI,GAAKC,KAAK,IAAM;EACzB,MAAM;IAAEC;EAAK,CAAC,GAAGD,KAAK;EACtB,MAAME,SAAS,GAAG,IAAAC,oBAAY,EAAEF,IAAK,CAAC;EAEtC,IAAK,CAAEC,SAAS,EAAG;IAClB,OAAO,IAAI;EACZ;;EAEA;EACA;EACA;EACA,MAAME,SAAS,GAAGF,SAAS,CAACG,IAAI,IAAIH,SAAS,CAACI,IAAI;EAElD,oBAAO,IAAAT,WAAA,CAAAU,GAAA,EAACH,SAAS;IAAA,GAAMJ;EAAK,CAAI,CAAC;AAClC,CAAC;AAED,MAAMQ,eAAe,GAAG,IAAAC,uBAAW,EAAE,kBA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AAC;EACJ,CAAC,EACD,CACC1C,aAAa,EACbd,QAAQ,EACRe,OAAO,EACPC,mBAAmB,EACnBd,aAAa,EACbM,iBAAiB,EACjBlB,IAAI,EACJa,QAAQ,CAEV,CAAC;EAED,IAAK,CAAEZ,SAAS,EAAG;IAClB,OAAO,IAAI;EACZ;EAEA,IAAKA,SAAS,CAACyE,UAAU,GAAG,CAAC,EAAG;IAC/B,oBACC,IAAA9E,WAAA,CAAAU,GAAA,EAACC,eAAe;MAAA,GACVR,KAAK;MACVY,UAAU,EAAGiC,kBAAoB;MACjCnB,OAAO,EAAGA,OAAS;MACnBb,aAAa,EAAGkD;IAAoB,CACpC,CAAC;EAEJ;;EAEA;EACA,MAAMa,kBAAkB,GAAG,IAAAC,uBAAe,EAAE3E,SAAS,EAAE,WAAW,EAAE,IAAK,CAAC,GACvE,IAAA4E,gCAAwB,EAAE7E,IAAK,CAAC,GAChC,IAAI;EACP,MAAM8E,SAAS,GAAG,IAAAC,aAAI,EACrBJ,kBAAkB,EAClBhE,UAAU,EAAEmE,SAAS,EACrB/E,KAAK,CAAC+E,SACP,CAAC;EAED,oBACC,IAAAlF,WAAA,CAAAU,GAAA,EAACC,eAAe;IAAA,GACVR,KAAK;IACVY,UAAU,EAAGiC,kBAAoB;IACjCkC,SAAS,EAAGA,SAAW;IACvBrD,OAAO,EAAGA,OAAS;IACnBb,aAAa,EAAGkD;EAAoB,CACpC,CAAC;AAEJ,CAAC;AAAC,IAAAkB,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEazE,sBAAsB","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_clsx","_interopRequireDefault","require","_blocks","_components","_data","_element","_blockContext","_isUrlLike","_blockBindings","_lockUnlock","_jsxRuntime","DEFAULT_BLOCK_CONTEXT","Edit","props","name","blockType","getBlockType","Component","edit","save","jsx","EditWithFilters","withFilters","EditWithGeneratedProps","clientId","attributes","setAttributes","registry","useRegistry","blockContext","useContext","BlockContext","registeredSources","useSelect","select","unlock","blocksStore","getAllBlockBindingsSources","blockBindings","context","hasPatternOverrides","useMemo","computedContext","usesContext","Object","fromEntries","entries","filter","key","includes","metadata","bindings","values","forEach","binding","source","replacePatternOverridesDefaultBinding","hasPatternOverridesDefaultBinding","computedAttributes","attributesFromSources","blockBindingsBySource","Map","attributeName","sourceName","args","sourceArgs","canBindAttribute","set","get","size","getValues","keys","attr","label","value","isURLLike","setBoundAttributes","useCallback","nextAttributes","batch","keptAttributes","newValue","setValues","dispatch","hasParentPattern","length","caption","href","apiVersion","generatedClassName","hasBlockSupport","getBlockDefaultClassName","className","clsx","_default","exports","default"],"sources":["@wordpress/block-editor/src/components/block-edit/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tgetBlockDefaultClassName,\n\tgetBlockType,\n\thasBlockSupport,\n\tstore as blocksStore,\n} from '@wordpress/blocks';\nimport { withFilters } from '@wordpress/components';\nimport { useRegistry, useSelect } from '@wordpress/data';\nimport { useCallback, useContext, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BlockContext from '../block-context';\nimport isURLLike from '../link-control/is-url-like';\nimport {\n\tcanBindAttribute,\n\thasPatternOverridesDefaultBinding,\n\treplacePatternOverridesDefaultBinding,\n} from '../../utils/block-bindings';\nimport { unlock } from '../../lock-unlock';\n\n/**\n * Default value used for blocks which do not define their own context needs,\n * used to guarantee that a block's `context` prop will always be an object. It\n * is assigned as a constant since it is always expected to be an empty object,\n * and in order to avoid unnecessary React reconciliations of a changing object.\n *\n * @type {{}}\n */\nconst DEFAULT_BLOCK_CONTEXT = {};\n\nconst Edit = ( props ) => {\n\tconst { name } = props;\n\tconst blockType = getBlockType( name );\n\n\tif ( ! blockType ) {\n\t\treturn null;\n\t}\n\n\t// `edit` and `save` are functions or components describing the markup\n\t// with which a block is displayed. If `blockType` is valid, assign\n\t// them preferentially as the render value for the block.\n\tconst Component = blockType.edit || blockType.save;\n\n\treturn <Component { ...props } />;\n};\n\nconst EditWithFilters = withFilters( 'editor.BlockEdit' )( Edit );\n\nconst EditWithGeneratedProps = ( props ) => {\n\tconst { name, clientId, attributes, setAttributes } = props;\n\tconst registry = useRegistry();\n\tconst blockType = getBlockType( name );\n\tconst blockContext = useContext( BlockContext );\n\tconst registeredSources = useSelect(\n\t\t( select ) =>\n\t\t\tunlock( select( blocksStore ) ).getAllBlockBindingsSources(),\n\t\t[]\n\t);\n\n\tconst { blockBindings, context, hasPatternOverrides } = useMemo( () => {\n\t\t// Assign context values using the block type's declared context needs.\n\t\tconst computedContext = blockType?.usesContext\n\t\t\t? Object.fromEntries(\n\t\t\t\t\tObject.entries( blockContext ).filter( ( [ key ] ) =>\n\t\t\t\t\t\tblockType.usesContext.includes( key )\n\t\t\t\t\t)\n\t\t\t )\n\t\t\t: DEFAULT_BLOCK_CONTEXT;\n\t\t// Add context requested by Block Bindings sources.\n\t\tif ( attributes?.metadata?.bindings ) {\n\t\t\tObject.values( attributes?.metadata?.bindings || {} ).forEach(\n\t\t\t\t( binding ) => {\n\t\t\t\t\tregisteredSources[ binding?.source ]?.usesContext?.forEach(\n\t\t\t\t\t\t( key ) => {\n\t\t\t\t\t\t\tcomputedContext[ key ] = blockContext[ key ];\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t\treturn {\n\t\t\tblockBindings: replacePatternOverridesDefaultBinding(\n\t\t\t\tname,\n\t\t\t\tattributes?.metadata?.bindings\n\t\t\t),\n\t\t\tcontext: computedContext,\n\t\t\thasPatternOverrides: hasPatternOverridesDefaultBinding(\n\t\t\t\tattributes?.metadata?.bindings\n\t\t\t),\n\t\t};\n\t}, [\n\t\tname,\n\t\tblockType?.usesContext,\n\t\tblockContext,\n\t\tattributes?.metadata?.bindings,\n\t\tregisteredSources,\n\t] );\n\n\tconst computedAttributes = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! blockBindings ) {\n\t\t\t\treturn attributes;\n\t\t\t}\n\n\t\t\tconst attributesFromSources = {};\n\t\t\tconst blockBindingsBySource = new Map();\n\n\t\t\tfor ( const [ attributeName, binding ] of Object.entries(\n\t\t\t\tblockBindings\n\t\t\t) ) {\n\t\t\t\tconst { source: sourceName, args: sourceArgs } = binding;\n\t\t\t\tconst source = registeredSources[ sourceName ];\n\t\t\t\tif ( ! source || ! canBindAttribute( name, attributeName ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tblockBindingsBySource.set( source, {\n\t\t\t\t\t...blockBindingsBySource.get( source ),\n\t\t\t\t\t[ attributeName ]: {\n\t\t\t\t\t\targs: sourceArgs,\n\t\t\t\t\t},\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tif ( blockBindingsBySource.size ) {\n\t\t\t\tfor ( const [ source, bindings ] of blockBindingsBySource ) {\n\t\t\t\t\t// Get values in batch if the source supports it.\n\t\t\t\t\tlet values = {};\n\t\t\t\t\tif ( ! source.getValues ) {\n\t\t\t\t\t\tObject.keys( bindings ).forEach( ( attr ) => {\n\t\t\t\t\t\t\t// Default to the the source label when `getValues` doesn't exist.\n\t\t\t\t\t\t\tvalues[ attr ] = source.label;\n\t\t\t\t\t\t} );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvalues = source.getValues( {\n\t\t\t\t\t\t\tselect,\n\t\t\t\t\t\t\tcontext,\n\t\t\t\t\t\t\tclientId,\n\t\t\t\t\t\t\tbindings,\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t\tfor ( const [ attributeName, value ] of Object.entries(\n\t\t\t\t\t\tvalues\n\t\t\t\t\t) ) {\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tattributeName === 'url' &&\n\t\t\t\t\t\t\t( ! value || ! isURLLike( value ) )\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t// Return null if value is not a valid URL.\n\t\t\t\t\t\t\tattributesFromSources[ attributeName ] = null;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tattributesFromSources[ attributeName ] = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\t...attributes,\n\t\t\t\t...attributesFromSources,\n\t\t\t};\n\t\t},\n\t\t[\n\t\t\tattributes,\n\t\t\tblockBindings,\n\t\t\tclientId,\n\t\t\tcontext,\n\t\t\tname,\n\t\t\tregisteredSources,\n\t\t]\n\t);\n\n\tconst setBoundAttributes = useCallback(\n\t\t( nextAttributes ) => {\n\t\t\tif ( ! blockBindings ) {\n\t\t\t\tsetAttributes( nextAttributes );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tregistry.batch( () => {\n\t\t\t\tconst keptAttributes = { ...nextAttributes };\n\t\t\t\tconst blockBindingsBySource = new Map();\n\n\t\t\t\t// Loop only over the updated attributes to avoid modifying the bound ones that haven't changed.\n\t\t\t\tfor ( const [ attributeName, newValue ] of Object.entries(\n\t\t\t\t\tkeptAttributes\n\t\t\t\t) ) {\n\t\t\t\t\tif (\n\t\t\t\t\t\t! blockBindings[ attributeName ] ||\n\t\t\t\t\t\t! canBindAttribute( name, attributeName )\n\t\t\t\t\t) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst binding = blockBindings[ attributeName ];\n\t\t\t\t\tconst source = registeredSources[ binding?.source ];\n\t\t\t\t\tif ( ! source?.setValues ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tblockBindingsBySource.set( source, {\n\t\t\t\t\t\t...blockBindingsBySource.get( source ),\n\t\t\t\t\t\t[ attributeName ]: {\n\t\t\t\t\t\t\targs: binding.args,\n\t\t\t\t\t\t\tnewValue,\n\t\t\t\t\t\t},\n\t\t\t\t\t} );\n\t\t\t\t\tdelete keptAttributes[ attributeName ];\n\t\t\t\t}\n\n\t\t\t\tif ( blockBindingsBySource.size ) {\n\t\t\t\t\tfor ( const [\n\t\t\t\t\t\tsource,\n\t\t\t\t\t\tbindings,\n\t\t\t\t\t] of blockBindingsBySource ) {\n\t\t\t\t\t\tsource.setValues( {\n\t\t\t\t\t\t\tselect: registry.select,\n\t\t\t\t\t\t\tdispatch: registry.dispatch,\n\t\t\t\t\t\t\tcontext,\n\t\t\t\t\t\t\tclientId,\n\t\t\t\t\t\t\tbindings,\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tconst hasParentPattern = !! context[ 'pattern/overrides' ];\n\n\t\t\t\tif (\n\t\t\t\t\t// Don't update non-connected attributes if the block is using pattern overrides\n\t\t\t\t\t// and the editing is happening while overriding the pattern (not editing the original).\n\t\t\t\t\t! ( hasPatternOverrides && hasParentPattern ) &&\n\t\t\t\t\tObject.keys( keptAttributes ).length\n\t\t\t\t) {\n\t\t\t\t\t// Don't update caption and href until they are supported.\n\t\t\t\t\tif ( hasPatternOverrides ) {\n\t\t\t\t\t\tdelete keptAttributes.caption;\n\t\t\t\t\t\tdelete keptAttributes.href;\n\t\t\t\t\t}\n\t\t\t\t\tsetAttributes( keptAttributes );\n\t\t\t\t}\n\t\t\t} );\n\t\t},\n\t\t[\n\t\t\tblockBindings,\n\t\t\tclientId,\n\t\t\tcontext,\n\t\t\thasPatternOverrides,\n\t\t\tsetAttributes,\n\t\t\tregisteredSources,\n\t\t\tname,\n\t\t\tregistry,\n\t\t]\n\t);\n\n\tif ( ! blockType ) {\n\t\treturn null;\n\t}\n\n\tif ( blockType.apiVersion > 1 ) {\n\t\treturn (\n\t\t\t<EditWithFilters\n\t\t\t\t{ ...props }\n\t\t\t\tattributes={ computedAttributes }\n\t\t\t\tcontext={ context }\n\t\t\t\tsetAttributes={ setBoundAttributes }\n\t\t\t/>\n\t\t);\n\t}\n\n\t// Generate a class name for the block's editable form.\n\tconst generatedClassName = hasBlockSupport( blockType, 'className', true )\n\t\t? getBlockDefaultClassName( name )\n\t\t: null;\n\tconst className = clsx(\n\t\tgeneratedClassName,\n\t\tattributes?.className,\n\t\tprops.className\n\t);\n\n\treturn (\n\t\t<EditWithFilters\n\t\t\t{ ...props }\n\t\t\tattributes={ computedAttributes }\n\t\t\tclassName={ className }\n\t\t\tcontext={ context }\n\t\t\tsetAttributes={ setBoundAttributes }\n\t\t/>\n\t);\n};\n\nexport default EditWithGeneratedProps;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,OAAA,GAAAD,OAAA;AAMA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAKA,IAAAK,aAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,UAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,cAAA,GAAAP,OAAA;AAKA,IAAAQ,WAAA,GAAAR,OAAA;AAA2C,IAAAS,WAAA,GAAAT,OAAA;AA5B3C;AACA;AACA;;AAGA;AACA;AACA;;AAWA;AACA;AACA;;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACA,MAAMU,qBAAqB,GAAG,CAAC,CAAC;AAEhC,MAAMC,IAAI,GAAKC,KAAK,IAAM;EACzB,MAAM;IAAEC;EAAK,CAAC,GAAGD,KAAK;EACtB,MAAME,SAAS,GAAG,IAAAC,oBAAY,EAAEF,IAAK,CAAC;EAEtC,IAAK,CAAEC,SAAS,EAAG;IAClB,OAAO,IAAI;EACZ;;EAEA;EACA;EACA;EACA,MAAME,SAAS,GAAGF,SAAS,CAACG,IAAI,IAAIH,SAAS,CAACI,IAAI;EAElD,oBAAO,IAAAT,WAAA,CAAAU,GAAA,EAACH,SAAS;IAAA,GAAMJ;EAAK,CAAI,CAAC;AAClC,CAAC;AAED,MAAMQ,eAAe,GAAG,IAAAC,uBAAW,EAAE,kBAAmB,CAAC,CAAEV,IAAK,CAAC;AAEjE,MAAMW,sBAAsB,GAAKV,KAAK,IAAM;EAC3C,MAAM;IAAEC,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,iBAAiB,EACjBlB,IAAI,EACJa,QAAQ,CAEV,CAAC;EAED,IAAK,CAAEZ,SAAS,EAAG;IAClB,OAAO,IAAI;EACZ;EAEA,IAAKA,SAAS,CAACyE,UAAU,GAAG,CAAC,EAAG;IAC/B,oBACC,IAAA9E,WAAA,CAAAU,GAAA,EAACC,eAAe;MAAA,GACVR,KAAK;MACVY,UAAU,EAAGiC,kBAAoB;MACjCnB,OAAO,EAAGA,OAAS;MACnBb,aAAa,EAAGkD;IAAoB,CACpC,CAAC;EAEJ;;EAEA;EACA,MAAMa,kBAAkB,GAAG,IAAAC,uBAAe,EAAE3E,SAAS,EAAE,WAAW,EAAE,IAAK,CAAC,GACvE,IAAA4E,gCAAwB,EAAE7E,IAAK,CAAC,GAChC,IAAI;EACP,MAAM8E,SAAS,GAAG,IAAAC,aAAI,EACrBJ,kBAAkB,EAClBhE,UAAU,EAAEmE,SAAS,EACrB/E,KAAK,CAAC+E,SACP,CAAC;EAED,oBACC,IAAAlF,WAAA,CAAAU,GAAA,EAACC,eAAe;IAAA,GACVR,KAAK;IACVY,UAAU,EAAGiC,kBAAoB;IACjCkC,SAAS,EAAGA,SAAW;IACvBrD,OAAO,EAAGA,OAAS;IACnBb,aAAa,EAAGkD;EAAoB,CACpC,CAAC;AAEJ,CAAC;AAAC,IAAAkB,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEazE,sBAAsB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","_blocks","_element","_blockContext","_interopRequireDefault","_jsxRuntime","DEFAULT_BLOCK_CONTEXT","Edit","props","name","blockType","getBlockType","blockContext","useContext","BlockContext","context","useMemo","usesContext","Object","fromEntries","entries","filter","key","includes","Component","edit","jsx","exports","_default","default","withFilters"],"sources":["@wordpress/block-editor/src/components/block-edit/edit.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { withFilters } from '@wordpress/components';\nimport { getBlockType } from '@wordpress/blocks';\nimport { useContext, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BlockContext from '../block-context';\n\n/**\n * Default value used for blocks which do not define their own context needs,\n * used to guarantee that a block's `context` prop will always be an object. It\n * is assigned as a constant since it is always expected to be an empty object,\n * and in order to avoid unnecessary React reconciliations of a changing object.\n *\n * @type {{}}\n */\nconst DEFAULT_BLOCK_CONTEXT = {};\n\nexport const Edit = ( props ) => {\n\tconst { name } = props;\n\tconst blockType = getBlockType( name );\n\n\tconst blockContext = useContext( BlockContext );\n\n\t// Assign context values using the block type's declared context needs.\n\tconst context = useMemo( () => {\n\t\treturn blockType && blockType.usesContext\n\t\t\t? Object.fromEntries(\n\t\t\t\t\tObject.entries( blockContext ).filter( ( [ key ] ) =>\n\t\t\t\t\t\tblockType.usesContext.includes( key )\n\t\t\t\t\t)\n\t\t\t )\n\t\t\t: DEFAULT_BLOCK_CONTEXT;\n\t}, [ blockType, blockContext ] );\n\n\tif ( ! blockType ) {\n\t\treturn null;\n\t}\n\n\tconst Component = blockType.edit;\n\n\treturn <Component { ...props } context={ context } />;\n};\n\nexport default withFilters( 'editor.BlockEdit' )( Edit );\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_components","require","_blocks","_element","_blockContext","_interopRequireDefault","_jsxRuntime","DEFAULT_BLOCK_CONTEXT","Edit","props","name","blockType","getBlockType","blockContext","useContext","BlockContext","context","useMemo","usesContext","Object","fromEntries","entries","filter","key","includes","Component","edit","jsx","exports","_default","default","withFilters"],"sources":["@wordpress/block-editor/src/components/block-edit/edit.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { withFilters } from '@wordpress/components';\nimport { getBlockType } from '@wordpress/blocks';\nimport { useContext, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BlockContext from '../block-context';\n\n/**\n * Default value used for blocks which do not define their own context needs,\n * used to guarantee that a block's `context` prop will always be an object. It\n * is assigned as a constant since it is always expected to be an empty object,\n * and in order to avoid unnecessary React reconciliations of a changing object.\n *\n * @type {{}}\n */\nconst DEFAULT_BLOCK_CONTEXT = {};\n\nexport const Edit = ( props ) => {\n\tconst { name } = props;\n\tconst blockType = getBlockType( name );\n\n\tconst blockContext = useContext( BlockContext );\n\n\t// Assign context values using the block type's declared context needs.\n\tconst context = useMemo( () => {\n\t\treturn blockType && blockType.usesContext\n\t\t\t? Object.fromEntries(\n\t\t\t\t\tObject.entries( blockContext ).filter( ( [ key ] ) =>\n\t\t\t\t\t\tblockType.usesContext.includes( key )\n\t\t\t\t\t)\n\t\t\t )\n\t\t\t: DEFAULT_BLOCK_CONTEXT;\n\t}, [ blockType, blockContext ] );\n\n\tif ( ! blockType ) {\n\t\treturn null;\n\t}\n\n\tconst Component = blockType.edit;\n\n\treturn <Component { ...props } context={ context } />;\n};\n\nexport default withFilters( 'editor.BlockEdit' )( Edit );\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAKA,IAAAG,aAAA,GAAAC,sBAAA,CAAAJ,OAAA;AAA4C,IAAAK,WAAA,GAAAL,OAAA;AAV5C;AACA;AACA;;AAKA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACA,MAAMM,qBAAqB,GAAG,CAAC,CAAC;AAEzB,MAAMC,IAAI,GAAKC,KAAK,IAAM;EAChC,MAAM;IAAEC;EAAK,CAAC,GAAGD,KAAK;EACtB,MAAME,SAAS,GAAG,IAAAC,oBAAY,EAAEF,IAAK,CAAC;EAEtC,MAAMG,YAAY,GAAG,IAAAC,mBAAU,EAAEC,qBAAa,CAAC;;EAE/C;EACA,MAAMC,OAAO,GAAG,IAAAC,gBAAO,EAAE,MAAM;IAC9B,OAAON,SAAS,IAAIA,SAAS,CAACO,WAAW,GACtCC,MAAM,CAACC,WAAW,CAClBD,MAAM,CAACE,OAAO,CAAER,YAAa,CAAC,CAACS,MAAM,CAAE,CAAE,CAAEC,GAAG,CAAE,KAC/CZ,SAAS,CAACO,WAAW,CAACM,QAAQ,CAAED,GAAI,CACrC,CACA,CAAC,GACDhB,qBAAqB;EACzB,CAAC,EAAE,CAAEI,SAAS,EAAEE,YAAY,CAAG,CAAC;EAEhC,IAAK,CAAEF,SAAS,EAAG;IAClB,OAAO,IAAI;EACZ;EAEA,MAAMc,SAAS,GAAGd,SAAS,CAACe,IAAI;EAEhC,oBAAO,IAAApB,WAAA,CAAAqB,GAAA,EAACF,SAAS;IAAA,GAAMhB,KAAK;IAAGO,OAAO,EAAGA;EAAS,CAAE,CAAC;AACtD,CAAC;AAACY,OAAA,CAAApB,IAAA,GAAAA,IAAA;AAAA,IAAAqB,QAAA,GAAAD,OAAA,CAAAE,OAAA,GAEa,IAAAC,uBAAW,EAAE,kBAAmB,CAAC,CAAEvB,IAAK,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","_i18n","_headingLevelIcon","_interopRequireDefault","_jsxRuntime","HEADING_LEVELS","POPOVER_PROPS","className","HeadingLevelDropdown","options","value","onChange","validOptions","filter","option","includes","sort","a","b","jsx","ToolbarDropdownMenu","popoverProps","icon","default","level","label","__","controls","map","targetLevel","isActive","title","sprintf","onClick","role"],"sources":["@wordpress/block-editor/src/components/block-heading-level-dropdown/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { ToolbarDropdownMenu } from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport HeadingLevelIcon from './heading-level-icon';\n\nconst HEADING_LEVELS = [ 1, 2, 3, 4, 5, 6 ];\n\nconst POPOVER_PROPS = {\n\tclassName: 'block-library-heading-level-dropdown',\n};\n\n/** @typedef {import('react').ComponentType} ComponentType */\n\n/**\n * HeadingLevelDropdown props.\n *\n * @typedef WPHeadingLevelDropdownProps\n *\n * @property {number} value The chosen heading level.\n * @property {number[]} options An array of supported heading levels.\n * @property {()=>number} onChange Function called with\n * the selected value changes.\n */\n\n/**\n * Dropdown for selecting a heading level (1 through 6) or paragraph (0).\n *\n * @param {WPHeadingLevelDropdownProps} props Component props.\n *\n * @return {ComponentType} The toolbar.\n */\nexport default function HeadingLevelDropdown( {\n\toptions = HEADING_LEVELS,\n\tvalue,\n\tonChange,\n} ) {\n\tconst validOptions = options\n\t\t.filter(\n\t\t\t( option ) => option === 0 || HEADING_LEVELS.includes( option )\n\t\t)\n\t\t.sort( ( a, b ) => a - b ); // Sorts numerically in ascending order;\n\n\treturn (\n\t\t<ToolbarDropdownMenu\n\t\t\tpopoverProps={ POPOVER_PROPS }\n\t\t\ticon={ <HeadingLevelIcon level={ value } /> }\n\t\t\tlabel={ __( 'Change level' ) }\n\t\t\tcontrols={ validOptions.map( ( targetLevel ) => {\n\t\t\t\tconst isActive = targetLevel === value;\n\t\t\t\treturn {\n\t\t\t\t\ticon: <HeadingLevelIcon level={ targetLevel } />,\n\t\t\t\t\ttitle:\n\t\t\t\t\t\ttargetLevel === 0\n\t\t\t\t\t\t\t? __( 'Paragraph' )\n\t\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t\t// translators: %d: heading level e.g: \"1\", \"2\", \"3\"\n\t\t\t\t\t\t\t\t\t__( 'Heading %d' ),\n\t\t\t\t\t\t\t\t\ttargetLevel\n\t\t\t\t\t\t\t ),\n\t\t\t\t\tisActive,\n\t\t\t\t\tonClick() {\n\t\t\t\t\t\tonChange( targetLevel );\n\t\t\t\t\t},\n\t\t\t\t\trole: 'menuitemradio',\n\t\t\t\t};\n\t\t\t} ) }\n\t\t/>\n\t);\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_components","require","_i18n","_headingLevelIcon","_interopRequireDefault","_jsxRuntime","HEADING_LEVELS","POPOVER_PROPS","className","HeadingLevelDropdown","options","value","onChange","validOptions","filter","option","includes","sort","a","b","jsx","ToolbarDropdownMenu","popoverProps","icon","default","level","label","__","controls","map","targetLevel","isActive","title","sprintf","onClick","role"],"sources":["@wordpress/block-editor/src/components/block-heading-level-dropdown/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { ToolbarDropdownMenu } from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport HeadingLevelIcon from './heading-level-icon';\n\nconst HEADING_LEVELS = [ 1, 2, 3, 4, 5, 6 ];\n\nconst POPOVER_PROPS = {\n\tclassName: 'block-library-heading-level-dropdown',\n};\n\n/** @typedef {import('react').ComponentType} ComponentType */\n\n/**\n * HeadingLevelDropdown props.\n *\n * @typedef WPHeadingLevelDropdownProps\n *\n * @property {number} value The chosen heading level.\n * @property {number[]} options An array of supported heading levels.\n * @property {()=>number} onChange Function called with\n * the selected value changes.\n */\n\n/**\n * Dropdown for selecting a heading level (1 through 6) or paragraph (0).\n *\n * @param {WPHeadingLevelDropdownProps} props Component props.\n *\n * @return {ComponentType} The toolbar.\n */\nexport default function HeadingLevelDropdown( {\n\toptions = HEADING_LEVELS,\n\tvalue,\n\tonChange,\n} ) {\n\tconst validOptions = options\n\t\t.filter(\n\t\t\t( option ) => option === 0 || HEADING_LEVELS.includes( option )\n\t\t)\n\t\t.sort( ( a, b ) => a - b ); // Sorts numerically in ascending order;\n\n\treturn (\n\t\t<ToolbarDropdownMenu\n\t\t\tpopoverProps={ POPOVER_PROPS }\n\t\t\ticon={ <HeadingLevelIcon level={ value } /> }\n\t\t\tlabel={ __( 'Change level' ) }\n\t\t\tcontrols={ validOptions.map( ( targetLevel ) => {\n\t\t\t\tconst isActive = targetLevel === value;\n\t\t\t\treturn {\n\t\t\t\t\ticon: <HeadingLevelIcon level={ targetLevel } />,\n\t\t\t\t\ttitle:\n\t\t\t\t\t\ttargetLevel === 0\n\t\t\t\t\t\t\t? __( 'Paragraph' )\n\t\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t\t// translators: %d: heading level e.g: \"1\", \"2\", \"3\"\n\t\t\t\t\t\t\t\t\t__( 'Heading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AE,EAAE,cAAe,CAAG;IAC9BC,QAAQ,EAAGf,YAAY,CAACgB,GAAG,CAAIC,WAAW,IAAM;MAC/C,MAAMC,QAAQ,GAAGD,WAAW,KAAKnB,KAAK;MACtC,OAAO;QACNY,IAAI,eAAE,IAAAlB,WAAA,CAAAe,GAAA,EAACjB,iBAAA,CAAAqB,OAAgB;UAACC,KAAK,EAAGK;QAAa,CAAE,CAAC;QAChDE,KAAK,EACJF,WAAW,KAAK,CAAC,GACd,IAAAH,QAAE,EAAE,WAAY,CAAC,GACjB,IAAAM,aAAO;QACP;QACA,IAAAN,QAAE,EAAE,YAAa,CAAC,EAClBG,WACA,CAAC;QACLC,QAAQ;QACRG,OAAOA,CAAA,EAAG;UACTtB,QAAQ,CAAEkB,WAAY,CAAC;QACxB,CAAC;QACDK,IAAI,EAAE;MACP,CAAC;IACF,CAAE;EAAG,CACL,CAAC;AAEJ","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_i18n","require","_components","_headingLevelIcon","_interopRequireDefault","_jsxRuntime","HEADING_LEVELS","HeadingLevelDropdown","options","value","onChange","createLevelControl","targetLevel","currentLevel","onChangeCallback","isActive","icon","jsx","default","level","isPressed","title","sprintf","__","onClick","DropdownMenu","controls","map","index","label"],"sources":["@wordpress/block-editor/src/components/block-heading-level-dropdown/index.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { DropdownMenu } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport HeadingLevelIcon from './heading-level-icon';\n\nconst HEADING_LEVELS = [ 1, 2, 3, 4, 5, 6 ];\n\n/** @typedef {import('react').ComponentType} ComponentType */\n\n/**\n * HeadingLevelDropdown props.\n *\n * @typedef WPHeadingLevelDropdownProps\n *\n * @property {number} value The chosen heading level.\n * @property {number[]} options An array of supported heading levels.\n * @property {()=>number} onChange Function called with\n * the selected value changes.\n */\n\n/**\n * Dropdown for selecting a heading level (1 through 6).\n *\n * @param {WPHeadingLevelDropdownProps} props Component props.\n *\n * @return {ComponentType} The toolbar.\n */\nexport default function HeadingLevelDropdown( {\n\toptions = HEADING_LEVELS,\n\tvalue,\n\tonChange,\n} ) {\n\tconst createLevelControl = (\n\t\ttargetLevel,\n\t\tcurrentLevel,\n\t\tonChangeCallback\n\t) => {\n\t\tconst isActive = targetLevel === currentLevel;\n\t\treturn {\n\t\t\ticon: (\n\t\t\t\t<HeadingLevelIcon\n\t\t\t\t\tlevel={ targetLevel }\n\t\t\t\t\tisPressed={ isActive }\n\t\t\t\t/>\n\t\t\t),\n\t\t\t// translators: %d: heading level e.g: \"1\", \"2\", \"3\"\n\t\t\ttitle: sprintf( __( 'Heading %d' ), targetLevel ),\n\t\t\tisActive,\n\t\t\tonClick: () => onChangeCallback( targetLevel ),\n\t\t};\n\t};\n\n\treturn (\n\t\t<DropdownMenu\n\t\t\ticon={ <HeadingLevelIcon level={ value } /> }\n\t\t\tcontrols={ options.map( ( index ) =>\n\t\t\t\tcreateLevelControl( index, value, onChange )\n\t\t\t) }\n\t\t\tlabel={ __( 'Change level' ) }\n\t\t/>\n\t);\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_i18n","require","_components","_headingLevelIcon","_interopRequireDefault","_jsxRuntime","HEADING_LEVELS","HeadingLevelDropdown","options","value","onChange","createLevelControl","targetLevel","currentLevel","onChangeCallback","isActive","icon","jsx","default","level","isPressed","title","sprintf","__","onClick","DropdownMenu","controls","map","index","label"],"sources":["@wordpress/block-editor/src/components/block-heading-level-dropdown/index.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { DropdownMenu } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport HeadingLevelIcon from './heading-level-icon';\n\nconst HEADING_LEVELS = [ 1, 2, 3, 4, 5, 6 ];\n\n/** @typedef {import('react').ComponentType} ComponentType */\n\n/**\n * HeadingLevelDropdown props.\n *\n * @typedef WPHeadingLevelDropdownProps\n *\n * @property {number} value The chosen heading level.\n * @property {number[]} options An array of supported heading levels.\n * @property {()=>number} onChange Function called with\n * the selected value changes.\n */\n\n/**\n * Dropdown for selecting a heading level (1 through 6).\n *\n * @param {WPHeadingLevelDropdownProps} props Component props.\n *\n * @return {ComponentType} The toolbar.\n */\nexport default function HeadingLevelDropdown( {\n\toptions = HEADING_LEVELS,\n\tvalue,\n\tonChange,\n} ) {\n\tconst createLevelControl = (\n\t\ttargetLevel,\n\t\tcurrentLevel,\n\t\tonChangeCallback\n\t) => {\n\t\tconst isActive = targetLevel === currentLevel;\n\t\treturn {\n\t\t\ticon: (\n\t\t\t\t<HeadingLevelIcon\n\t\t\t\t\tlevel={ targetLevel }\n\t\t\t\t\tisPressed={ isActive }\n\t\t\t\t/>\n\t\t\t),\n\t\t\t// translators: %d: heading level e.g: \"1\", \"2\", \"3\"\n\t\t\ttitle: sprintf( __( 'Heading %d' ), targetLevel ),\n\t\t\tisActive,\n\t\t\tonClick: () => onChangeCallback( targetLevel ),\n\t\t};\n\t};\n\n\treturn (\n\t\t<DropdownMenu\n\t\t\ticon={ <HeadingLevelIcon level={ value } /> }\n\t\t\tcontrols={ options.map( ( index ) =>\n\t\t\t\tcreateLevelControl( index, value, onChange )\n\t\t\t) }\n\t\t\tlabel={ __( 'Change level' ) }\n\t\t/>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAKA,IAAAE,iBAAA,GAAAC,sBAAA,CAAAH,OAAA;AAAoD,IAAAI,WAAA,GAAAJ,OAAA;AATpD;AACA;AACA;;AAIA;AACA;AACA;;AAGA,MAAMK,cAAc,GAAG,CAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAE;;AAE3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASC,oBAAoBA,CAAE;EAC7CC,OAAO,GAAGF,cAAc;EACxBG,KAAK;EACLC;AACD,CAAC,EAAG;EACH,MAAMC,kBAAkB,GAAGA,CAC1BC,WAAW,EACXC,YAAY,EACZC,gBAAgB,KACZ;IACJ,MAAMC,QAAQ,GAAGH,WAAW,KAAKC,YAAY;IAC7C,OAAO;MACNG,IAAI,eACH,IAAAX,WAAA,CAAAY,GAAA,EAACd,iBAAA,CAAAe,OAAgB;QAChBC,KAAK,EAAGP,WAAa;QACrBQ,SAAS,EAAGL;MAAU,CACtB,CACD;MACD;MACAM,KAAK,EAAE,IAAAC,aAAO,EAAE,IAAAC,QAAE,EAAE,YAAa,CAAC,EAAEX,WAAY,CAAC;MACjDG,QAAQ;MACRS,OAAO,EAAEA,CAAA,KAAMV,gBAAgB,CAAEF,WAAY;IAC9C,CAAC;EACF,CAAC;EAED,oBACC,IAAAP,WAAA,CAAAY,GAAA,EAACf,WAAA,CAAAuB,YAAY;IACZT,IAAI,eAAG,IAAAX,WAAA,CAAAY,GAAA,EAACd,iBAAA,CAAAe,OAAgB;MAACC,KAAK,EAAGV;IAAO,CAAE,CAAG;IAC7CiB,QAAQ,EAAGlB,OAAO,CAACmB,GAAG,CAAIC,KAAK,IAC9BjB,kBAAkB,CAAEiB,KAAK,EAAEnB,KAAK,EAAEC,QAAS,CAC5C,CAAG;IACHmB,KAAK,EAAG,IAAAN,QAAE,EAAE,cAAe;EAAG,CAC9B,CAAC;AAEJ","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_i18n","require","_blocks","_components","_data","_skipToSelectedBlock","_interopRequireDefault","_blockCard","_multiSelectionInspector","_blockVariationTransforms","_useBlockDisplayInformation","_store","_blockStyles","_inspectorControls","_inspectorControlsTabs","_useInspectorControlsTabs","_advancedControlsPanel","_positionControlsPanel","_useBlockInspectorAnimationSettings","_blockQuickNavigation","_border","_lockUnlock","_jsxRuntime","BlockStylesPanel","clientId","jsx","PanelBody","title","__","children","default","BlockInspector","count","selectedBlockName","selectedBlockClientId","blockType","isSectionBlock","useSelect","select","getSelectedBlockClientId","getSelectedBlockCount","getBlockName","getParentSectionBlock","_isSectionBlock","unlock","blockEditorStore","_selectedBlockClientId","renderedBlockClientId","_selectedBlockName","_blockType","getBlockType","availableTabs","useInspectorControlsTabs","name","showTabs","length","blockInspectorAnimationSettings","useBlockInspectorAnimationSettings","borderPanelLabel","useBorderPanelLabel","blockName","jsxs","className","tabs","Fragment","Slot","group","label","isSelectedBlockUnregistered","getUnregisteredTypeHandlerName","BlockInspectorSingleBlockWrapper","animate","wrapper","AnimatedContainer","BlockInspectorSingleBlock","animationOrigin","enterDirection","__unstableMotion","div","x","opacity","transition","ease","duration","initial","hasBlockStyles","getBlockStyles","blocksStore","blockStyles","blockInformation","useBlockDisplayInformation","contentClientIds","getClientIdsOfDescendants","getBlockEditingMode","filter","current","isSynced","blockClientId","clientIds","_default","exports"],"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 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\nfunction BlockInspector() {\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\treturn (\n\t\t\t<span className=\"block-editor-block-inspector__no-blocks\">\n\t\t\t\t{ __( 'No block selected.' ) }\n\t\t\t</span>\n\t\t);\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{ 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":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAKA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AAKA,IAAAI,oBAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,UAAA,GAAAD,sBAAA,CAAAL,OAAA;AACA,IAAAO,wBAAA,GAAAF,sBAAA,CAAAL,OAAA;AACA,IAAAQ,yBAAA,GAAAH,sBAAA,CAAAL,OAAA;AACA,IAAAS,2BAAA,GAAAJ,sBAAA,CAAAL,OAAA;AACA,IAAAU,MAAA,GAAAV,OAAA;AACA,IAAAW,YAAA,GAAAN,sBAAA,CAAAL,OAAA;AACA,IAAAY,kBAAA,GAAAP,sBAAA,CAAAL,OAAA;AACA,IAAAa,sBAAA,GAAAR,sBAAA,CAAAL,OAAA;AACA,IAAAc,yBAAA,GAAAT,sBAAA,CAAAL,OAAA;AACA,IAAAe,sBAAA,GAAAV,sBAAA,CAAAL,OAAA;AACA,IAAAgB,sBAAA,GAAAX,sBAAA,CAAAL,OAAA;AACA,IAAAiB,mCAAA,GAAAZ,sBAAA,CAAAL,OAAA;AACA,IAAAkB,qBAAA,GAAAb,sBAAA,CAAAL,OAAA;AACA,IAAAmB,OAAA,GAAAnB,OAAA;AAEA,IAAAoB,WAAA,GAAApB,OAAA;AAA2C,IAAAqB,WAAA,GAAArB,OAAA;AA/B3C;AACA;AACA;;AAUA;AACA;AACA;;AAmBA,SAASsB,gBAAgBA,CAAE;EAAEC;AAAS,CAAC,EAAG;EACzC,oBACC,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ACmC,IAAI;UACtBC,KAAK,EAAC,YAAY;UAClBC,KAAK,EAAG,IAAAvC,QAAE,EAAE,YAAa;QAAG,CAC5B,CAAC,eACF,IAAAN,WAAA,CAAAG,GAAA,EAACZ,kBAAA,CAAAiB,OAAiB,CAACmC,IAAI;UACtBC,KAAK,EAAC,QAAQ;UACdC,KAAK,EAAGT;QAAkB,CAC1B,CAAC,eACF,IAAApC,WAAA,CAAAG,GAAA,EAACZ,kBAAA,CAAAiB,OAAiB,CAACmC,IAAI;UAACC,KAAK,EAAC;QAAQ,CAAE,CAAC,eACzC,IAAA5C,WAAA,CAAAG,GAAA,EAACR,sBAAA,CAAAa,OAAgB,IAAE,CAAC,eACpB,IAAAR,WAAA,CAAAG,GAAA,EAACZ,kBAAA,CAAAiB,OAAiB,CAACmC,IAAI;UAACC,KAAK,EAAC;QAAU,CAAE,CAAC,eAC3C,IAAA5C,WAAA,CAAAG,GAAA;UAAAI,QAAA,eACC,IAAAP,WAAA,CAAAG,GAAA,EAACT,sBAAA,CAAAc,OAAgB,IAAE;QAAC,CAChB,CAAC;MAAA,CACL,CACF;IAAA,CACA,CACF,eACD,IAAAR,WAAA,CAAAG,GAAA,EAACpB,oBAAA,CAAAyB,OAAmB,MAAK,MAAQ,CAAC;EAAA,CAC9B,CAAC;AAER,CAAC;;AAED;AACA;AACA;AAFA,IAAAqE,QAAA,GAAAC,OAAA,CAAAtE,OAAA,GAGeC,cAAc","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_i18n","require","_blocks","_components","_data","_skipToSelectedBlock","_interopRequireDefault","_blockCard","_multiSelectionInspector","_blockVariationTransforms","_useBlockDisplayInformation","_store","_blockStyles","_inspectorControls","_inspectorControlsTabs","_useInspectorControlsTabs","_advancedControlsPanel","_positionControlsPanel","_useBlockInspectorAnimationSettings","_blockQuickNavigation","_border","_lockUnlock","_jsxRuntime","BlockStylesPanel","clientId","jsx","PanelBody","title","__","children","default","BlockInspector","count","selectedBlockName","selectedBlockClientId","blockType","isSectionBlock","useSelect","select","getSelectedBlockClientId","getSelectedBlockCount","getBlockName","getParentSectionBlock","_isSectionBlock","unlock","blockEditorStore","_selectedBlockClientId","renderedBlockClientId","_selectedBlockName","_blockType","getBlockType","availableTabs","useInspectorControlsTabs","name","showTabs","length","blockInspectorAnimationSettings","useBlockInspectorAnimationSettings","borderPanelLabel","useBorderPanelLabel","blockName","jsxs","className","tabs","Fragment","Slot","group","label","isSelectedBlockUnregistered","getUnregisteredTypeHandlerName","BlockInspectorSingleBlockWrapper","animate","wrapper","AnimatedContainer","BlockInspectorSingleBlock","animationOrigin","enterDirection","__unstableMotion","div","x","opacity","transition","ease","duration","initial","hasBlockStyles","getBlockStyles","blocksStore","blockStyles","blockInformation","useBlockDisplayInformation","contentClientIds","getClientIdsOfDescendants","getBlockEditingMode","filter","current","isSynced","blockClientId","clientIds","_default","exports"],"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 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\nfunction BlockInspector() {\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\treturn (\n\t\t\t<span className=\"block-editor-block-inspector__no-blocks\">\n\t\t\t\t{ __( 'No block selected.' ) }\n\t\t\t</span>\n\t\t);\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{ 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":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAKA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AAKA,IAAAI,oBAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,UAAA,GAAAD,sBAAA,CAAAL,OAAA;AACA,IAAAO,wBAAA,GAAAF,sBAAA,CAAAL,OAAA;AACA,IAAAQ,yBAAA,GAAAH,sBAAA,CAAAL,OAAA;AACA,IAAAS,2BAAA,GAAAJ,sBAAA,CAAAL,OAAA;AACA,IAAAU,MAAA,GAAAV,OAAA;AACA,IAAAW,YAAA,GAAAN,sBAAA,CAAAL,OAAA;AACA,IAAAY,kBAAA,GAAAP,sBAAA,CAAAL,OAAA;AACA,IAAAa,sBAAA,GAAAR,sBAAA,CAAAL,OAAA;AACA,IAAAc,yBAAA,GAAAT,sBAAA,CAAAL,OAAA;AACA,IAAAe,sBAAA,GAAAV,sBAAA,CAAAL,OAAA;AACA,IAAAgB,sBAAA,GAAAX,sBAAA,CAAAL,OAAA;AACA,IAAAiB,mCAAA,GAAAZ,sBAAA,CAAAL,OAAA;AACA,IAAAkB,qBAAA,GAAAb,sBAAA,CAAAL,OAAA;AACA,IAAAmB,OAAA,GAAAnB,OAAA;AAEA,IAAAoB,WAAA,GAAApB,OAAA;AAA2C,IAAAqB,WAAA,GAAArB,OAAA;AA/B3C;AACA;AACA;;AAUA;AACA;AACA;;AAmBA,SAASsB,gBAAgBA,CAAE;EAAEC;AAAS,CAAC,EAAG;EACzC,oBACC,IAAAF,WAAA,CAAAG,GAAA,EAACtB,WAAA,CAAAuB,SAAS;IAACC,KAAK,E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E,EAAE,YAAa;QAAG,CAC5B,CAAC,eACF,IAAAN,WAAA,CAAAG,GAAA,EAACZ,kBAAA,CAAAiB,OAAiB,CAACmC,IAAI;UACtBC,KAAK,EAAC,QAAQ;UACdC,KAAK,EAAGT;QAAkB,CAC1B,CAAC,eACF,IAAApC,WAAA,CAAAG,GAAA,EAACZ,kBAAA,CAAAiB,OAAiB,CAACmC,IAAI;UAACC,KAAK,EAAC;QAAQ,CAAE,CAAC,eACzC,IAAA5C,WAAA,CAAAG,GAAA,EAACR,sBAAA,CAAAa,OAAgB,IAAE,CAAC,eACpB,IAAAR,WAAA,CAAAG,GAAA,EAACZ,kBAAA,CAAAiB,OAAiB,CAACmC,IAAI;UAACC,KAAK,EAAC;QAAU,CAAE,CAAC,eAC3C,IAAA5C,WAAA,CAAAG,GAAA;UAAAI,QAAA,eACC,IAAAP,WAAA,CAAAG,GAAA,EAACT,sBAAA,CAAAc,OAAgB,IAAE;QAAC,CAChB,CAAC;MAAA,CACL,CACF;IAAA,CACA,CACF,eACD,IAAAR,WAAA,CAAAG,GAAA,EAACpB,oBAAA,CAAAyB,OAAmB,MAAK,MAAQ,CAAC;EAAA,CAC9B,CAAC;AAER,CAAC;;AAED;AACA;AACA;AAFA,IAAAqE,QAAA,GAAAC,OAAA,CAAAtE,OAAA,GAGeC,cAAc","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_i18n","require","_components","_element","_blocks","_data","_warning","_interopRequireDefault","_blockCompare","_store","_jsxRuntime","blockToBlocks","block","rawHandler","HTML","originalContent","BlockInvalidWarning","clientId","canInsertHTMLBlock","canInsertClassicBlock","useSelect","select","canInsertBlockType","getBlock","getBlockRootClientId","blockEditorStore","rootClientId","replaceBlock","useDispatch","compare","setCompare","useState","onCompareClose","useCallback","convert","useMemo","toClassic","classicBlock","createBlock","content","toHTML","htmlBlock","toBlocks","newBlocks","toRecoveredBlock","recoveredBlock","name","attributes","innerBlocks","secondaryActions","title","_x","onClick","__","filter","Boolean","jsxs","Fragment","children","jsx","default","actions","Button","__next40pxDefaultSize","variant","Modal","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":"
|
|
1
|
+
{"version":3,"names":["_i18n","require","_components","_element","_blocks","_data","_warning","_interopRequireDefault","_blockCompare","_store","_jsxRuntime","blockToBlocks","block","rawHandler","HTML","originalContent","BlockInvalidWarning","clientId","canInsertHTMLBlock","canInsertClassicBlock","useSelect","select","canInsertBlockType","getBlock","getBlockRootClientId","blockEditorStore","rootClientId","replaceBlock","useDispatch","compare","setCompare","useState","onCompareClose","useCallback","convert","useMemo","toClassic","classicBlock","createBlock","content","toHTML","htmlBlock","toBlocks","newBlocks","toRecoveredBlock","recoveredBlock","name","attributes","innerBlocks","secondaryActions","title","_x","onClick","__","filter","Boolean","jsxs","Fragment","children","jsx","default","actions","Button","__next40pxDefaultSize","variant","Modal","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":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AAKA,IAAAK,QAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,aAAA,GAAAD,sBAAA,CAAAN,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AAAwD,IAAAS,WAAA,GAAAT,OAAA;AAdxD;AACA;AACA;;AAOA;AACA;AACA;;AAKA,MAAMU,aAAa,GAAKC,KAAK,IAC5B,IAAAC,kBAAU,EAAE;EACXC,IAAI,EAAEF,KAAK,CAACG;AACb,CAAE,CAAC;AAEW,SAASC,mBAAmBA,CAAE;EAAEC;AAAS,CAAC,EAAG;EAC3D,MAAM;IAAEL,KAAK;IAAEM,kBAAkB;IAAEC;EAAsB,CAAC,GAAG,IAAAC,eAAS,EACnEC,MAAM,IAAM;IACb,MAAM;MAAEC,kBAAkB;MAAEC,QAAQ;MAAEC;IAAqB,CAAC,GAC3DH,MAAM,CAAEI,YAAiB,CAAC;IAE3B,MAAMC,YAAY,GAAGF,oBAAoB,CAAEP,QAAS,CAAC;IAErD,OAAO;MACNL,KAAK,EAAEW,QAAQ,CAAEN,QAAS,CAAC;MAC3BC,kBAAkB,EAAEI,kBAAkB,CACrC,WAAW,EACXI,YACD,CAAC;MACDP,qBAAqB,EAAEG,kBAAkB,CACxC,eAAe,EACfI,YACD;IACD,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AAA,EAACnD,aAAA,CAAAoD,OAAY;QACZhD,KAAK,EAAGA,KAAO;QACfwD,MAAM,EAAGlC,OAAO,CAACM,MAAQ;QACzB6B,SAAS,EAAGnC,OAAO,CAACQ,QAAU;QAC9B4B,SAAS,EAAG3D,aAAe;QAC3B4D,iBAAiB,EAAG,IAAAlB,QAAE,EAAE,mBAAoB;MAAG,CAC/C;IAAC,CACI,CACP;EAAA,CACA,CAAC;AAEL","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_element","require","_sorting","DEFAULT_BLOCK_LIST_CONTEXT","exports","scrollRef","blocksLayouts","current","findBlockLayoutByClientId","getBlockLayoutsOrderedByYCoord","findBlockLayoutByPosition","updateBlocksLayouts","Context","createContext","Provider","Consumer","BlockListConsumer","BlockListProvider","data","position","Object","values","find","block","x","width","y","height","clientId","entries","reduce","acc","entry","item","innerBlocks","keys","length","deleteBlockLayoutByClientId","key","orderBy","blockData","rootClientId","shouldRemove","layoutProps","useBlockListContext","useContext"],"sources":["@wordpress/block-editor/src/components/block-list/block-list-context.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createContext, useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { orderBy } from '../../utils/sorting';\n\nexport const DEFAULT_BLOCK_LIST_CONTEXT = {\n\tscrollRef: null,\n\tblocksLayouts: { current: {} },\n\tfindBlockLayoutByClientId,\n\tgetBlockLayoutsOrderedByYCoord,\n\tfindBlockLayoutByPosition,\n\tupdateBlocksLayouts,\n};\n\nconst Context = createContext( DEFAULT_BLOCK_LIST_CONTEXT );\nconst { Provider, Consumer } = Context;\n\n/**\n * Finds a block's layout data by position.\n *\n * @param {Object} data Blocks layouts object.\n * @param {Object} position Position to use for finding the block.\n * @param {number} position.x X coordinate.\n * @param {number} position.y Y coordinate.\n *\n * @return {Object|undefined} Found block layout data that matches the provided position. If none is found, `undefined` will be returned.\n */\nfunction findBlockLayoutByPosition( data, position ) {\n\t// Only enabled for root level blocks\n\treturn Object.values( data ).find( ( block ) => {\n\t\treturn (\n\t\t\tposition.x >= block.x &&\n\t\t\tposition.x <= block.x + block.width &&\n\t\t\tposition.y >= block.y &&\n\t\t\tposition.y <= block.y + block.height\n\t\t);\n\t} );\n}\n\n/**\n * Finds a block's layout data by its client Id.\n *\n * @param {Object} data Blocks layouts object.\n * @param {string} clientId Block's clientId.\n *\n * @return {Object} Found block layout data.\n */\nfunction findBlockLayoutByClientId( data, clientId ) {\n\treturn Object.entries( data ).reduce( ( acc, entry ) => {\n\t\tconst item = entry[ 1 ];\n\t\tif ( acc ) {\n\t\t\treturn acc;\n\t\t}\n\t\tif ( item?.clientId === clientId ) {\n\t\t\treturn item;\n\t\t}\n\t\tif ( item?.innerBlocks && Object.keys( item.innerBlocks ).length > 0 ) {\n\t\t\treturn findBlockLayoutByClientId( item.innerBlocks, clientId );\n\t\t}\n\t\treturn null;\n\t}, null );\n}\n\n/**\n * Deletes the layout data of a block by its client Id.\n *\n * @param {Object} data Blocks layouts object.\n * @param {string} clientId Block's clientsId.\n *\n * @return {Object} Updated data object.\n */\nexport function deleteBlockLayoutByClientId( data, clientId ) {\n\treturn Object.keys( data ).reduce( ( acc, key ) => {\n\t\tif ( key !== clientId ) {\n\t\t\tacc[ key ] = data[ key ];\n\t\t}\n\t\tif (\n\t\t\tdata[ key ]?.innerBlocks &&\n\t\t\tObject.keys( data[ key ].innerBlocks ).length > 0\n\t\t) {\n\t\t\tif ( acc[ key ] ) {\n\t\t\t\tacc[ key ].innerBlocks = deleteBlockLayoutByClientId(\n\t\t\t\t\tdata[ key ].innerBlocks,\n\t\t\t\t\tclientId\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\treturn acc;\n\t}, {} );\n}\n\n/**\n * Orders the block's layout data by its Y coordinate.\n *\n * @param {Object} data Blocks layouts object.\n *\n * @return {Object} Blocks layouts object ordered by its Y coordinate.\n */\nfunction getBlockLayoutsOrderedByYCoord( data ) {\n\t// Only enabled for root level blocks.\n\treturn orderBy( Object.values( data ), 'y' );\n}\n\n/**\n * Updates or deletes a block's layout data in the blocksLayouts object,\n * in case of deletion, the layout data is not required.\n *\n * @param {Object} blocksLayouts Blocks layouts object.\n * @param {Object} blockData Block's layout data to add or remove to/from the blockLayouts object.\n * @param {string} blockData.clientId Block's clientId.\n * @param {?string} blockData.rootClientId Optional. Block's rootClientId.\n * @param {?boolean} blockData.shouldRemove Optional. Flag to remove it from the blocksLayout list.\n * @param {number} blockData.width Block's width.\n * @param {number} blockData.height Block's height.\n * @param {number} blockData.x Block's x coordinate (relative to the parent).\n * @param {number} blockData.y Block's y coordinate (relative to the parent).\n */\n\nfunction updateBlocksLayouts( blocksLayouts, blockData ) {\n\tconst { clientId, rootClientId, shouldRemove, ...layoutProps } = blockData;\n\n\tif ( clientId && shouldRemove ) {\n\t\tblocksLayouts.current = deleteBlockLayoutByClientId(\n\t\t\tblocksLayouts.current,\n\t\t\tclientId\n\t\t);\n\t\treturn;\n\t}\n\n\tif ( clientId && ! rootClientId ) {\n\t\tblocksLayouts.current[ clientId ] = {\n\t\t\tclientId,\n\t\t\trootClientId,\n\t\t\t...layoutProps,\n\t\t\tinnerBlocks: {\n\t\t\t\t...blocksLayouts.current[ clientId ]?.innerBlocks,\n\t\t\t},\n\t\t};\n\t} else if ( clientId && rootClientId ) {\n\t\tconst block = findBlockLayoutByClientId(\n\t\t\tblocksLayouts.current,\n\t\t\trootClientId\n\t\t);\n\n\t\tif ( block ) {\n\t\t\tblock.innerBlocks[ clientId ] = {\n\t\t\t\tclientId,\n\t\t\t\trootClientId,\n\t\t\t\t...layoutProps,\n\t\t\t\tinnerBlocks: {\n\t\t\t\t\t...block.innerBlocks[ clientId ]?.innerBlocks,\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t}\n}\n\nexport { Provider as BlockListProvider, Consumer as BlockListConsumer };\n\n/**\n * Hook that returns the block list context.\n *\n * @return {Object} Block list context\n */\nexport const useBlockListContext = () => {\n\treturn useContext( Context );\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_element","require","_sorting","DEFAULT_BLOCK_LIST_CONTEXT","exports","scrollRef","blocksLayouts","current","findBlockLayoutByClientId","getBlockLayoutsOrderedByYCoord","findBlockLayoutByPosition","updateBlocksLayouts","Context","createContext","Provider","Consumer","BlockListConsumer","BlockListProvider","data","position","Object","values","find","block","x","width","y","height","clientId","entries","reduce","acc","entry","item","innerBlocks","keys","length","deleteBlockLayoutByClientId","key","orderBy","blockData","rootClientId","shouldRemove","layoutProps","useBlockListContext","useContext"],"sources":["@wordpress/block-editor/src/components/block-list/block-list-context.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createContext, useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { orderBy } from '../../utils/sorting';\n\nexport const DEFAULT_BLOCK_LIST_CONTEXT = {\n\tscrollRef: null,\n\tblocksLayouts: { current: {} },\n\tfindBlockLayoutByClientId,\n\tgetBlockLayoutsOrderedByYCoord,\n\tfindBlockLayoutByPosition,\n\tupdateBlocksLayouts,\n};\n\nconst Context = createContext( DEFAULT_BLOCK_LIST_CONTEXT );\nconst { Provider, Consumer } = Context;\n\n/**\n * Finds a block's layout data by position.\n *\n * @param {Object} data Blocks layouts object.\n * @param {Object} position Position to use for finding the block.\n * @param {number} position.x X coordinate.\n * @param {number} position.y Y coordinate.\n *\n * @return {Object|undefined} Found block layout data that matches the provided position. If none is found, `undefined` will be returned.\n */\nfunction findBlockLayoutByPosition( data, position ) {\n\t// Only enabled for root level blocks\n\treturn Object.values( data ).find( ( block ) => {\n\t\treturn (\n\t\t\tposition.x >= block.x &&\n\t\t\tposition.x <= block.x + block.width &&\n\t\t\tposition.y >= block.y &&\n\t\t\tposition.y <= block.y + block.height\n\t\t);\n\t} );\n}\n\n/**\n * Finds a block's layout data by its client Id.\n *\n * @param {Object} data Blocks layouts object.\n * @param {string} clientId Block's clientId.\n *\n * @return {Object} Found block layout data.\n */\nfunction findBlockLayoutByClientId( data, clientId ) {\n\treturn Object.entries( data ).reduce( ( acc, entry ) => {\n\t\tconst item = entry[ 1 ];\n\t\tif ( acc ) {\n\t\t\treturn acc;\n\t\t}\n\t\tif ( item?.clientId === clientId ) {\n\t\t\treturn item;\n\t\t}\n\t\tif ( item?.innerBlocks && Object.keys( item.innerBlocks ).length > 0 ) {\n\t\t\treturn findBlockLayoutByClientId( item.innerBlocks, clientId );\n\t\t}\n\t\treturn null;\n\t}, null );\n}\n\n/**\n * Deletes the layout data of a block by its client Id.\n *\n * @param {Object} data Blocks layouts object.\n * @param {string} clientId Block's clientsId.\n *\n * @return {Object} Updated data object.\n */\nexport function deleteBlockLayoutByClientId( data, clientId ) {\n\treturn Object.keys( data ).reduce( ( acc, key ) => {\n\t\tif ( key !== clientId ) {\n\t\t\tacc[ key ] = data[ key ];\n\t\t}\n\t\tif (\n\t\t\tdata[ key ]?.innerBlocks &&\n\t\t\tObject.keys( data[ key ].innerBlocks ).length > 0\n\t\t) {\n\t\t\tif ( acc[ key ] ) {\n\t\t\t\tacc[ key ].innerBlocks = deleteBlockLayoutByClientId(\n\t\t\t\t\tdata[ key ].innerBlocks,\n\t\t\t\t\tclientId\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\treturn acc;\n\t}, {} );\n}\n\n/**\n * Orders the block's layout data by its Y coordinate.\n *\n * @param {Object} data Blocks layouts object.\n *\n * @return {Object} Blocks layouts object ordered by its Y coordinate.\n */\nfunction getBlockLayoutsOrderedByYCoord( data ) {\n\t// Only enabled for root level blocks.\n\treturn orderBy( Object.values( data ), 'y' );\n}\n\n/**\n * Updates or deletes a block's layout data in the blocksLayouts object,\n * in case of deletion, the layout data is not required.\n *\n * @param {Object} blocksLayouts Blocks layouts object.\n * @param {Object} blockData Block's layout data to add or remove to/from the blockLayouts object.\n * @param {string} blockData.clientId Block's clientId.\n * @param {?string} blockData.rootClientId Optional. Block's rootClientId.\n * @param {?boolean} blockData.shouldRemove Optional. Flag to remove it from the blocksLayout list.\n * @param {number} blockData.width Block's width.\n * @param {number} blockData.height Block's height.\n * @param {number} blockData.x Block's x coordinate (relative to the parent).\n * @param {number} blockData.y Block's y coordinate (relative to the parent).\n */\n\nfunction updateBlocksLayouts( blocksLayouts, blockData ) {\n\tconst { clientId, rootClientId, shouldRemove, ...layoutProps } = blockData;\n\n\tif ( clientId && shouldRemove ) {\n\t\tblocksLayouts.current = deleteBlockLayoutByClientId(\n\t\t\tblocksLayouts.current,\n\t\t\tclientId\n\t\t);\n\t\treturn;\n\t}\n\n\tif ( clientId && ! rootClientId ) {\n\t\tblocksLayouts.current[ clientId ] = {\n\t\t\tclientId,\n\t\t\trootClientId,\n\t\t\t...layoutProps,\n\t\t\tinnerBlocks: {\n\t\t\t\t...blocksLayouts.current[ clientId ]?.innerBlocks,\n\t\t\t},\n\t\t};\n\t} else if ( clientId && rootClientId ) {\n\t\tconst block = findBlockLayoutByClientId(\n\t\t\tblocksLayouts.current,\n\t\t\trootClientId\n\t\t);\n\n\t\tif ( block ) {\n\t\t\tblock.innerBlocks[ clientId ] = {\n\t\t\t\tclientId,\n\t\t\t\trootClientId,\n\t\t\t\t...layoutProps,\n\t\t\t\tinnerBlocks: {\n\t\t\t\t\t...block.innerBlocks[ clientId ]?.innerBlocks,\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t}\n}\n\nexport { Provider as BlockListProvider, Consumer as BlockListConsumer };\n\n/**\n * Hook that returns the block list context.\n *\n * @return {Object} Block list context\n */\nexport const useBlockListContext = () => {\n\treturn useContext( Context );\n};\n"],"mappings":";;;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAGO,MAAME,0BAA0B,GAAAC,OAAA,CAAAD,0BAAA,GAAG;EACzCE,SAAS,EAAE,IAAI;EACfC,aAAa,EAAE;IAAEC,OAAO,EAAE,CAAC;EAAE,CAAC;EAC9BC,yBAAyB;EACzBC,8BAA8B;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