@wordpress/block-editor 14.5.0 → 14.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/README.md +0 -8
- package/build/autocompleters/block.js +13 -5
- package/build/autocompleters/block.js.map +1 -1
- package/build/components/block-canvas/index.js +10 -0
- package/build/components/block-canvas/index.js.map +1 -1
- package/build/components/block-card/index.js +2 -2
- package/build/components/block-card/index.js.map +1 -1
- package/build/components/block-full-height-alignment-control/index.js +1 -1
- package/build/components/block-full-height-alignment-control/index.js.map +1 -1
- package/build/components/block-list/block.js +15 -29
- package/build/components/block-list/block.js.map +1 -1
- package/build/components/block-list/block.native.js +1 -7
- package/build/components/block-list/block.native.js.map +1 -1
- package/build/components/block-list/index.js +5 -5
- package/build/components/block-list/index.js.map +1 -1
- package/build/components/block-list/use-block-props/index.js +1 -2
- package/build/components/block-list/use-block-props/index.js.map +1 -1
- package/build/components/block-list/use-block-props/use-focus-first-element.js +4 -3
- package/build/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
- package/build/components/block-list/use-block-props/use-selected-block-event-handlers.js +3 -6
- package/build/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +1 -1
- package/build/components/block-list/use-in-between-inserter.js +1 -1
- package/build/components/block-list/use-in-between-inserter.js.map +1 -1
- package/build/components/block-patterns-list/index.js +23 -26
- package/build/components/block-patterns-list/index.js.map +1 -1
- package/build/components/block-patterns-paging/index.js +1 -1
- package/build/components/block-patterns-paging/index.js.map +1 -1
- package/build/components/block-popover/index.js +3 -46
- package/build/components/block-popover/index.js.map +1 -1
- package/build/components/block-preview/async.js +51 -0
- package/build/components/block-preview/async.js.map +1 -0
- package/build/components/block-preview/index.js +6 -3
- package/build/components/block-preview/index.js.map +1 -1
- package/build/components/block-settings-menu/block-settings-dropdown.js +5 -0
- package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build/components/block-settings-menu/index.js +4 -3
- package/build/components/block-settings-menu/index.js.map +1 -1
- package/build/components/block-toolbar/change-design.js +119 -0
- package/build/components/block-toolbar/change-design.js.map +1 -0
- package/build/components/block-toolbar/index.js +19 -7
- package/build/components/block-toolbar/index.js.map +1 -1
- package/build/components/block-tools/index.js +16 -19
- package/build/components/block-tools/index.js.map +1 -1
- package/build/components/block-tools/insertion-point.js +4 -3
- package/build/components/block-tools/insertion-point.js.map +1 -1
- package/build/components/block-tools/use-block-toolbar-popover-props.js +1 -1
- package/build/components/block-tools/use-block-toolbar-popover-props.js.map +1 -1
- package/build/components/block-tools/use-show-block-tools.js +7 -10
- package/build/components/block-tools/use-show-block-tools.js.map +1 -1
- package/build/components/block-tools/zoom-out-mode-inserters.js +20 -29
- package/build/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
- package/build/components/block-variation-transforms/index.js +2 -2
- package/build/components/block-variation-transforms/index.js.map +1 -1
- package/build/components/block-vertical-alignment-control/ui.js +6 -10
- package/build/components/block-vertical-alignment-control/ui.js.map +1 -1
- package/build/components/border-radius-control/linked-button.js +7 -10
- package/build/components/border-radius-control/linked-button.js.map +1 -1
- package/build/components/collab/block-comment-icon-slot.js +18 -0
- package/build/components/collab/block-comment-icon-slot.js.map +1 -0
- package/build/components/collab/block-comment-icon-toolbar-slot.js +18 -0
- package/build/components/collab/block-comment-icon-toolbar-slot.js.map +1 -0
- package/build/components/colors-gradients/use-multiple-origin-colors-and-gradients.js +7 -1
- package/build/components/colors-gradients/use-multiple-origin-colors-and-gradients.js.map +1 -1
- package/build/components/convert-to-group-buttons/toolbar.js +4 -4
- package/build/components/convert-to-group-buttons/toolbar.js.map +1 -1
- package/build/components/global-styles/color-panel.js +1 -4
- package/build/components/global-styles/color-panel.js.map +1 -1
- package/build/components/global-styles/dimensions-panel.js +26 -14
- package/build/components/global-styles/dimensions-panel.js.map +1 -1
- package/build/components/global-styles/use-global-styles-context.native.js +6 -0
- package/build/components/global-styles/use-global-styles-context.native.js.map +1 -1
- package/build/components/iframe/get-compatibility-styles.js +4 -4
- package/build/components/iframe/get-compatibility-styles.js.map +1 -1
- package/build/components/iframe/index.js +33 -22
- package/build/components/iframe/index.js.map +1 -1
- package/build/components/image-size-control/index.js +61 -20
- package/build/components/image-size-control/index.js.map +1 -1
- package/build/components/inner-blocks/index.js +9 -5
- package/build/components/inner-blocks/index.js.map +1 -1
- package/build/components/inserter/block-patterns-explorer/pattern-list.js +2 -2
- package/build/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/index.js +1 -2
- package/build/components/inserter/block-patterns-tab/index.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/pattern-category-previews.js +5 -3
- package/build/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/patterns-filter.js +1 -1
- package/build/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/use-pattern-categories.js +3 -0
- package/build/components/inserter/block-patterns-tab/use-pattern-categories.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/utils.js +5 -1
- package/build/components/inserter/block-patterns-tab/utils.js.map +1 -1
- package/build/components/inserter/category-tabs/index.js +15 -2
- package/build/components/inserter/category-tabs/index.js.map +1 -1
- package/build/components/inserter/hooks/use-block-types-state.js +1 -1
- package/build/components/inserter/hooks/use-block-types-state.js.map +1 -1
- package/build/components/inserter/hooks/use-patterns-paging.js +0 -5
- package/build/components/inserter/hooks/use-patterns-paging.js.map +1 -1
- package/build/components/inserter/menu.js +4 -2
- package/build/components/inserter/menu.js.map +1 -1
- package/build/components/inserter/search-results.js +0 -2
- package/build/components/inserter/search-results.js.map +1 -1
- package/build/components/inserter-button/index.native.js +1 -1
- package/build/components/inserter-button/index.native.js.map +1 -1
- package/build/components/inspector-controls-tabs/index.js +0 -2
- package/build/components/inspector-controls-tabs/index.js.map +1 -1
- package/build/components/inspector-controls-tabs/utils.js +3 -6
- package/build/components/inspector-controls-tabs/utils.js.map +1 -1
- package/build/components/link-control/link-preview.js +12 -9
- package/build/components/link-control/link-preview.js.map +1 -1
- package/build/components/list-view/appender.js +4 -3
- package/build/components/list-view/appender.js.map +1 -1
- package/build/components/list-view/branch.js +6 -5
- package/build/components/list-view/branch.js.map +1 -1
- package/build/components/list-view/index.js +1 -2
- package/build/components/list-view/index.js.map +1 -1
- package/build/components/media-placeholder/index.js +4 -4
- package/build/components/media-placeholder/index.js.map +1 -1
- package/build/components/provider/index.js +1 -1
- package/build/components/provider/index.js.map +1 -1
- package/build/components/rich-text/event-listeners/index.js +3 -1
- package/build/components/rich-text/event-listeners/index.js.map +1 -1
- package/build/components/rich-text/index.js +1 -1
- package/build/components/rich-text/index.js.map +1 -1
- package/build/components/rich-text/index.native.js +2 -6
- package/build/components/rich-text/index.native.js.map +1 -1
- package/build/components/spacing-sizes-control/index.js +2 -2
- package/build/components/spacing-sizes-control/index.js.map +1 -1
- package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js +3 -3
- package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
- package/build/components/spacing-sizes-control/linked-button.js +1 -5
- package/build/components/spacing-sizes-control/linked-button.js.map +1 -1
- package/build/components/tabbed-sidebar/index.js +1 -1
- package/build/components/tabbed-sidebar/index.js.map +1 -1
- package/build/components/tool-selector/index.js +1 -4
- package/build/components/tool-selector/index.js.map +1 -1
- package/build/components/url-input/index.js +4 -2
- package/build/components/url-input/index.js.map +1 -1
- package/build/components/use-block-commands/index.js +6 -7
- package/build/components/use-block-commands/index.js.map +1 -1
- package/build/components/use-block-drop-zone/index.js +5 -5
- 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-moving-animation/index.js +1 -3
- package/build/components/use-moving-animation/index.js.map +1 -1
- package/build/components/use-settings/index.js +1 -3
- package/build/components/use-settings/index.js.map +1 -1
- package/build/components/writing-flow/index.js +5 -3
- package/build/components/writing-flow/index.js.map +1 -1
- package/build/components/writing-flow/use-tab-nav.js +2 -3
- package/build/components/writing-flow/use-tab-nav.js.map +1 -1
- package/build/hooks/block-bindings.js +19 -8
- package/build/hooks/block-bindings.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 +2 -2
- package/build/hooks/duotone.js.map +1 -1
- package/build/hooks/font-family.js +1 -1
- package/build/hooks/font-family.js.map +1 -1
- package/build/hooks/style.js +4 -1
- package/build/hooks/style.js.map +1 -1
- package/build/hooks/supports.js +6 -6
- package/build/hooks/supports.js.map +1 -1
- package/build/hooks/typography.js +5 -5
- package/build/hooks/typography.js.map +1 -1
- package/build/hooks/use-zoom-out.js +13 -22
- package/build/hooks/use-zoom-out.js.map +1 -1
- package/build/hooks/utils.js +2 -2
- package/build/hooks/utils.js.map +1 -1
- package/build/index.js +0 -7
- package/build/index.js.map +1 -1
- package/build/lock-unlock.js.map +1 -1
- package/build/private-apis.js +6 -3
- package/build/private-apis.js.map +1 -1
- package/build/store/actions.js +2 -33
- package/build/store/actions.js.map +1 -1
- package/build/store/defaults.js +1 -1
- package/build/store/defaults.js.map +1 -1
- package/build/store/private-actions.js +57 -8
- package/build/store/private-actions.js.map +1 -1
- package/build/store/private-selectors.js +10 -22
- package/build/store/private-selectors.js.map +1 -1
- package/build/store/reducer.js +16 -6
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +53 -15
- package/build/store/selectors.js.map +1 -1
- package/build/store/utils.js +5 -4
- package/build/store/utils.js.map +1 -1
- package/build/utils/dom.js +37 -17
- package/build/utils/dom.js.map +1 -1
- package/build/utils/get-font-styles-and-weights.js +1 -1
- package/build/utils/get-font-styles-and-weights.js.map +1 -1
- package/build/utils/transform-styles/index.js +4 -3
- package/build/utils/transform-styles/index.js.map +1 -1
- package/build-module/autocompleters/block.js +14 -6
- package/build-module/autocompleters/block.js.map +1 -1
- package/build-module/components/block-canvas/index.js +11 -1
- package/build-module/components/block-canvas/index.js.map +1 -1
- package/build-module/components/block-card/index.js +3 -3
- package/build-module/components/block-card/index.js.map +1 -1
- package/build-module/components/block-full-height-alignment-control/index.js +1 -1
- package/build-module/components/block-full-height-alignment-control/index.js.map +1 -1
- package/build-module/components/block-list/block.js +16 -28
- package/build-module/components/block-list/block.js.map +1 -1
- package/build-module/components/block-list/block.native.js +1 -7
- package/build-module/components/block-list/block.native.js.map +1 -1
- package/build-module/components/block-list/index.js +5 -5
- package/build-module/components/block-list/index.js.map +1 -1
- package/build-module/components/block-list/use-block-props/index.js +1 -2
- package/build-module/components/block-list/use-block-props/index.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-focus-first-element.js +4 -3
- package/build-module/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.js +3 -6
- package/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +1 -1
- package/build-module/components/block-list/use-in-between-inserter.js +1 -1
- package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
- package/build-module/components/block-patterns-list/index.js +23 -26
- package/build-module/components/block-patterns-list/index.js.map +1 -1
- package/build-module/components/block-patterns-paging/index.js +1 -1
- package/build-module/components/block-patterns-paging/index.js.map +1 -1
- package/build-module/components/block-popover/index.js +4 -47
- package/build-module/components/block-popover/index.js.map +1 -1
- package/build-module/components/block-preview/async.js +44 -0
- package/build-module/components/block-preview/async.js.map +1 -0
- package/build-module/components/block-preview/index.js +6 -3
- package/build-module/components/block-preview/index.js.map +1 -1
- package/build-module/components/block-settings-menu/block-settings-dropdown.js +5 -0
- package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build-module/components/block-settings-menu/index.js +5 -4
- package/build-module/components/block-settings-menu/index.js.map +1 -1
- package/build-module/components/block-toolbar/change-design.js +111 -0
- package/build-module/components/block-toolbar/change-design.js.map +1 -0
- package/build-module/components/block-toolbar/index.js +19 -7
- package/build-module/components/block-toolbar/index.js.map +1 -1
- package/build-module/components/block-tools/index.js +17 -20
- package/build-module/components/block-tools/index.js.map +1 -1
- package/build-module/components/block-tools/insertion-point.js +4 -3
- package/build-module/components/block-tools/insertion-point.js.map +1 -1
- package/build-module/components/block-tools/use-block-toolbar-popover-props.js +2 -2
- package/build-module/components/block-tools/use-block-toolbar-popover-props.js.map +1 -1
- package/build-module/components/block-tools/use-show-block-tools.js +7 -10
- package/build-module/components/block-tools/use-show-block-tools.js.map +1 -1
- package/build-module/components/block-tools/zoom-out-mode-inserters.js +20 -29
- package/build-module/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
- package/build-module/components/block-variation-transforms/index.js +2 -2
- package/build-module/components/block-variation-transforms/index.js.map +1 -1
- package/build-module/components/block-vertical-alignment-control/ui.js +6 -10
- package/build-module/components/block-vertical-alignment-control/ui.js.map +1 -1
- package/build-module/components/border-radius-control/linked-button.js +8 -11
- package/build-module/components/border-radius-control/linked-button.js.map +1 -1
- package/build-module/components/collab/block-comment-icon-slot.js +11 -0
- package/build-module/components/collab/block-comment-icon-slot.js.map +1 -0
- package/build-module/components/collab/block-comment-icon-toolbar-slot.js +11 -0
- package/build-module/components/collab/block-comment-icon-toolbar-slot.js.map +1 -0
- package/build-module/components/colors-gradients/use-multiple-origin-colors-and-gradients.js +7 -1
- package/build-module/components/colors-gradients/use-multiple-origin-colors-and-gradients.js.map +1 -1
- package/build-module/components/convert-to-group-buttons/toolbar.js +4 -4
- package/build-module/components/convert-to-group-buttons/toolbar.js.map +1 -1
- package/build-module/components/global-styles/color-panel.js +2 -5
- package/build-module/components/global-styles/color-panel.js.map +1 -1
- package/build-module/components/global-styles/dimensions-panel.js +26 -14
- package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
- package/build-module/components/global-styles/use-global-styles-context.native.js +6 -0
- package/build-module/components/global-styles/use-global-styles-context.native.js.map +1 -1
- package/build-module/components/iframe/get-compatibility-styles.js +4 -4
- package/build-module/components/iframe/get-compatibility-styles.js.map +1 -1
- package/build-module/components/iframe/index.js +33 -22
- package/build-module/components/iframe/index.js.map +1 -1
- package/build-module/components/image-size-control/index.js +62 -21
- package/build-module/components/image-size-control/index.js.map +1 -1
- package/build-module/components/inner-blocks/index.js +9 -5
- package/build-module/components/inner-blocks/index.js.map +1 -1
- package/build-module/components/inserter/block-patterns-explorer/pattern-list.js +2 -2
- 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 -2
- 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 +6 -4
- package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab/patterns-filter.js +1 -1
- package/build-module/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab/use-pattern-categories.js +4 -1
- package/build-module/components/inserter/block-patterns-tab/use-pattern-categories.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab/utils.js +4 -0
- package/build-module/components/inserter/block-patterns-tab/utils.js.map +1 -1
- package/build-module/components/inserter/category-tabs/index.js +15 -2
- package/build-module/components/inserter/category-tabs/index.js.map +1 -1
- package/build-module/components/inserter/hooks/use-block-types-state.js +1 -1
- package/build-module/components/inserter/hooks/use-block-types-state.js.map +1 -1
- package/build-module/components/inserter/hooks/use-patterns-paging.js +1 -6
- package/build-module/components/inserter/hooks/use-patterns-paging.js.map +1 -1
- package/build-module/components/inserter/menu.js +5 -3
- package/build-module/components/inserter/menu.js.map +1 -1
- package/build-module/components/inserter/search-results.js +0 -2
- package/build-module/components/inserter/search-results.js.map +1 -1
- package/build-module/components/inserter-button/index.native.js +1 -1
- package/build-module/components/inserter-button/index.native.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/index.js +0 -2
- package/build-module/components/inspector-controls-tabs/index.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/utils.js +3 -6
- package/build-module/components/inspector-controls-tabs/utils.js.map +1 -1
- package/build-module/components/link-control/link-preview.js +13 -10
- package/build-module/components/link-control/link-preview.js.map +1 -1
- package/build-module/components/list-view/appender.js +4 -3
- package/build-module/components/list-view/appender.js.map +1 -1
- package/build-module/components/list-view/branch.js +7 -6
- package/build-module/components/list-view/branch.js.map +1 -1
- package/build-module/components/list-view/index.js +1 -2
- package/build-module/components/list-view/index.js.map +1 -1
- package/build-module/components/media-placeholder/index.js +4 -4
- package/build-module/components/media-placeholder/index.js.map +1 -1
- package/build-module/components/provider/index.js +1 -1
- package/build-module/components/provider/index.js.map +1 -1
- package/build-module/components/rich-text/event-listeners/index.js +4 -2
- package/build-module/components/rich-text/event-listeners/index.js.map +1 -1
- package/build-module/components/rich-text/index.js +1 -1
- package/build-module/components/rich-text/index.js.map +1 -1
- package/build-module/components/rich-text/index.native.js +2 -6
- package/build-module/components/rich-text/index.native.js.map +1 -1
- package/build-module/components/spacing-sizes-control/index.js +3 -3
- package/build-module/components/spacing-sizes-control/index.js.map +1 -1
- package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js +4 -4
- package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
- package/build-module/components/spacing-sizes-control/linked-button.js +2 -6
- package/build-module/components/spacing-sizes-control/linked-button.js.map +1 -1
- package/build-module/components/tabbed-sidebar/index.js +1 -1
- package/build-module/components/tabbed-sidebar/index.js.map +1 -1
- package/build-module/components/tool-selector/index.js +1 -4
- package/build-module/components/tool-selector/index.js.map +1 -1
- package/build-module/components/url-input/index.js +4 -2
- package/build-module/components/url-input/index.js.map +1 -1
- package/build-module/components/use-block-commands/index.js +5 -5
- package/build-module/components/use-block-commands/index.js.map +1 -1
- package/build-module/components/use-block-drop-zone/index.js +5 -5
- 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-moving-animation/index.js +1 -3
- package/build-module/components/use-moving-animation/index.js.map +1 -1
- package/build-module/components/use-settings/index.js +1 -3
- package/build-module/components/use-settings/index.js.map +1 -1
- package/build-module/components/writing-flow/index.js +5 -3
- package/build-module/components/writing-flow/index.js.map +1 -1
- package/build-module/components/writing-flow/use-tab-nav.js +2 -3
- package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
- package/build-module/hooks/block-bindings.js +20 -9
- package/build-module/hooks/block-bindings.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 +2 -2
- package/build-module/hooks/duotone.js.map +1 -1
- package/build-module/hooks/font-family.js +1 -1
- package/build-module/hooks/font-family.js.map +1 -1
- package/build-module/hooks/style.js +4 -1
- package/build-module/hooks/style.js.map +1 -1
- package/build-module/hooks/supports.js +6 -6
- package/build-module/hooks/supports.js.map +1 -1
- package/build-module/hooks/typography.js +5 -5
- package/build-module/hooks/typography.js.map +1 -1
- package/build-module/hooks/use-zoom-out.js +15 -23
- package/build-module/hooks/use-zoom-out.js.map +1 -1
- package/build-module/hooks/utils.js +2 -2
- package/build-module/hooks/utils.js.map +1 -1
- package/build-module/index.js +1 -1
- package/build-module/index.js.map +1 -1
- package/build-module/lock-unlock.js.map +1 -1
- package/build-module/private-apis.js +7 -5
- package/build-module/private-apis.js.map +1 -1
- package/build-module/store/actions.js +2 -33
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/defaults.js +1 -1
- package/build-module/store/defaults.js.map +1 -1
- package/build-module/store/private-actions.js +54 -7
- package/build-module/store/private-actions.js.map +1 -1
- package/build-module/store/private-selectors.js +10 -21
- package/build-module/store/private-selectors.js.map +1 -1
- package/build-module/store/reducer.js +16 -6
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +54 -16
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/store/utils.js +3 -3
- package/build-module/store/utils.js.map +1 -1
- package/build-module/utils/dom.js +35 -16
- package/build-module/utils/dom.js.map +1 -1
- package/build-module/utils/get-font-styles-and-weights.js +2 -2
- package/build-module/utils/get-font-styles-and-weights.js.map +1 -1
- package/build-module/utils/transform-styles/index.js +3 -2
- package/build-module/utils/transform-styles/index.js.map +1 -1
- package/build-style/content-rtl.css +16 -10
- package/build-style/content.css +16 -10
- package/build-style/style-rtl.css +47 -25
- package/build-style/style.css +47 -25
- package/build-types/utils/dom.d.ts +7 -9
- package/build-types/utils/dom.d.ts.map +1 -1
- package/package.json +34 -32
- package/src/autocompleters/block.js +16 -7
- package/src/components/block-canvas/index.js +17 -1
- package/src/components/block-canvas/style.scss +3 -1
- package/src/components/block-card/index.js +3 -3
- package/src/components/block-full-height-alignment-control/index.js +1 -1
- package/src/components/block-inspector/style.scss +2 -7
- package/src/components/block-list/block.js +29 -50
- package/src/components/block-list/block.native.js +0 -4
- package/src/components/block-list/content.scss +1 -1
- package/src/components/block-list/index.js +4 -4
- package/src/components/block-list/use-block-props/index.js +0 -2
- package/src/components/block-list/use-block-props/use-focus-first-element.js +5 -3
- package/src/components/block-list/use-block-props/use-selected-block-event-handlers.js +7 -20
- package/src/components/block-list/use-in-between-inserter.js +1 -1
- package/src/components/block-patterns-list/README.md +8 -8
- package/src/components/block-patterns-list/index.js +35 -51
- package/src/components/block-patterns-list/stories/fixtures.js +834 -0
- package/src/components/block-patterns-list/stories/index.story.js +64 -0
- package/src/components/block-patterns-list/style.scss +2 -0
- package/src/components/block-patterns-paging/index.js +1 -1
- package/src/components/block-popover/index.js +4 -66
- package/src/components/block-preview/async.js +43 -0
- package/src/components/block-preview/index.js +8 -3
- package/src/components/block-settings-menu/block-settings-dropdown.js +4 -0
- package/src/components/block-settings-menu/index.js +3 -0
- package/src/components/block-toolbar/change-design.js +127 -0
- package/src/components/block-toolbar/index.js +25 -8
- package/src/components/block-toolbar/style.scss +16 -0
- package/src/components/block-tools/index.js +30 -27
- package/src/components/block-tools/insertion-point.js +4 -3
- package/src/components/block-tools/style.scss +12 -20
- package/src/components/block-tools/use-block-toolbar-popover-props.js +2 -2
- package/src/components/block-tools/use-show-block-tools.js +3 -14
- package/src/components/block-tools/zoom-out-mode-inserters.js +25 -40
- package/src/components/block-variation-transforms/index.js +2 -2
- package/src/components/block-vertical-alignment-control/ui.js +11 -15
- package/src/components/border-radius-control/linked-button.js +9 -11
- package/src/components/collab/block-comment-icon-slot.js +12 -0
- package/src/components/collab/block-comment-icon-toolbar-slot.js +12 -0
- package/src/components/colors-gradients/use-multiple-origin-colors-and-gradients.js +7 -1
- package/src/components/convert-to-group-buttons/toolbar.js +4 -4
- package/src/components/default-block-appender/content.scss +13 -19
- package/src/components/global-styles/color-panel.js +2 -10
- package/src/components/global-styles/dimensions-panel.js +22 -16
- package/src/components/global-styles/test/use-global-styles-context.native.js +1 -0
- package/src/components/global-styles/use-global-styles-context.native.js +6 -0
- package/src/components/iframe/content.scss +4 -9
- package/src/components/iframe/get-compatibility-styles.js +4 -9
- package/src/components/iframe/index.js +48 -34
- package/src/components/iframe/style.scss +2 -3
- package/src/components/image-size-control/index.js +74 -43
- package/src/components/image-size-control/test/index.js +5 -63
- package/src/components/inner-blocks/index.js +12 -6
- package/src/components/inserter/block-patterns-explorer/pattern-list.js +3 -6
- package/src/components/inserter/block-patterns-tab/index.js +0 -1
- package/src/components/inserter/block-patterns-tab/pattern-category-previews.js +10 -4
- package/src/components/inserter/block-patterns-tab/patterns-filter.js +1 -1
- package/src/components/inserter/block-patterns-tab/use-pattern-categories.js +8 -0
- package/src/components/inserter/block-patterns-tab/utils.js +5 -0
- package/src/components/inserter/category-tabs/index.js +16 -2
- package/src/components/inserter/hooks/use-block-types-state.js +6 -1
- package/src/components/inserter/hooks/use-patterns-paging.js +1 -6
- package/src/components/inserter/menu.js +6 -4
- package/src/components/inserter/search-results.js +0 -6
- package/src/components/inserter/style.scss +13 -0
- package/src/components/inserter-button/index.native.js +1 -1
- package/src/components/inspector-controls-tabs/index.js +1 -6
- package/src/components/inspector-controls-tabs/utils.js +0 -3
- package/src/components/link-control/link-preview.js +15 -8
- package/src/components/link-control/test/index.js +63 -24
- package/src/components/list-view/appender.js +5 -6
- package/src/components/list-view/branch.js +8 -6
- package/src/components/list-view/index.js +1 -2
- package/src/components/media-placeholder/index.js +4 -4
- package/src/components/provider/index.js +1 -3
- package/src/components/provider/test/experimental-provider.js +43 -1
- package/src/components/rich-text/event-listeners/index.js +4 -2
- package/src/components/rich-text/index.js +8 -1
- package/src/components/rich-text/index.native.js +0 -2
- package/src/components/spacing-sizes-control/index.js +3 -3
- package/src/components/spacing-sizes-control/input-controls/spacing-input-control.js +4 -4
- package/src/components/spacing-sizes-control/linked-button.js +2 -12
- package/src/components/tabbed-sidebar/index.js +1 -1
- package/src/components/tabbed-sidebar/style.scss +1 -1
- package/src/components/tool-selector/index.js +1 -5
- package/src/components/url-input/index.js +4 -5
- package/src/components/use-block-commands/index.js +245 -234
- package/src/components/use-block-drop-zone/index.js +5 -5
- package/src/components/use-block-drop-zone/index.native.js +0 -1
- package/src/components/use-moving-animation/index.js +0 -1
- package/src/components/use-settings/index.js +0 -1
- package/src/components/writing-flow/index.js +5 -3
- package/src/components/writing-flow/use-tab-nav.js +1 -2
- package/src/hooks/block-bindings.js +48 -31
- package/src/hooks/contrast-checker.js +0 -1
- package/src/hooks/duotone.js +2 -2
- package/src/hooks/font-family.js +1 -1
- package/src/hooks/style.js +7 -3
- package/src/hooks/supports.js +6 -6
- package/src/hooks/typography.js +5 -5
- package/src/hooks/use-zoom-out.js +14 -34
- package/src/hooks/utils.js +7 -2
- package/src/index.js +0 -1
- package/src/private-apis.js +6 -3
- package/src/store/actions.js +3 -52
- package/src/store/defaults.js +2 -1
- package/src/store/private-actions.js +71 -8
- package/src/store/private-selectors.js +14 -25
- package/src/store/reducer.js +25 -11
- package/src/store/selectors.js +116 -53
- package/src/store/test/actions.js +41 -0
- package/src/store/test/private-selectors.js +5 -0
- package/src/store/test/reducer.js +23 -0
- package/src/store/utils.js +12 -11
- package/src/utils/dom.js +42 -17
- package/src/utils/get-font-styles-and-weights.js +2 -2
- package/src/utils/test/dom.js +224 -0
- package/src/utils/transform-styles/index.js +3 -2
- package/tsconfig.json +1 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/build/components/block-list/use-block-props/use-zoom-out-mode-exit.js +0 -57
- package/build/components/block-list/use-block-props/use-zoom-out-mode-exit.js.map +0 -1
- package/build/components/block-toolbar/shuffle.js +0 -110
- package/build/components/block-toolbar/shuffle.js.map +0 -1
- package/build/components/block-tools/zoom-out-popover.js +0 -58
- package/build/components/block-tools/zoom-out-popover.js.map +0 -1
- package/build/components/block-tools/zoom-out-toolbar.js +0 -132
- package/build/components/block-tools/zoom-out-toolbar.js.map +0 -1
- package/build/components/block-vertical-alignment-control/icons.js +0 -48
- package/build/components/block-vertical-alignment-control/icons.js.map +0 -1
- package/build-module/components/block-list/use-block-props/use-zoom-out-mode-exit.js +0 -51
- package/build-module/components/block-list/use-block-props/use-zoom-out-mode-exit.js.map +0 -1
- package/build-module/components/block-toolbar/shuffle.js +0 -103
- package/build-module/components/block-toolbar/shuffle.js.map +0 -1
- package/build-module/components/block-tools/zoom-out-popover.js +0 -49
- package/build-module/components/block-tools/zoom-out-popover.js.map +0 -1
- package/build-module/components/block-tools/zoom-out-toolbar.js +0 -124
- package/build-module/components/block-tools/zoom-out-toolbar.js.map +0 -1
- package/build-module/components/block-vertical-alignment-control/icons.js +0 -41
- package/build-module/components/block-vertical-alignment-control/icons.js.map +0 -1
- package/src/components/block-list/use-block-props/use-zoom-out-mode-exit.js +0 -65
- package/src/components/block-toolbar/shuffle.js +0 -111
- package/src/components/block-tools/zoom-out-popover.js +0 -47
- package/src/components/block-tools/zoom-out-toolbar.js +0 -135
- package/src/components/block-vertical-alignment-control/icons.js +0 -34
- /package/src/{lock-unlock.js → lock-unlock.ts} +0 -0
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = ZoomOutToolbar;
|
|
8
|
-
var _icons = require("@wordpress/icons");
|
|
9
|
-
var _components = require("@wordpress/components");
|
|
10
|
-
var _data = require("@wordpress/data");
|
|
11
|
-
var _blocks = require("@wordpress/blocks");
|
|
12
|
-
var _i18n = require("@wordpress/i18n");
|
|
13
|
-
var _store = require("../../store");
|
|
14
|
-
var _blockDraggable = _interopRequireDefault(require("../block-draggable"));
|
|
15
|
-
var _blockMover = _interopRequireDefault(require("../block-mover"));
|
|
16
|
-
var _shuffle = _interopRequireDefault(require("../block-toolbar/shuffle"));
|
|
17
|
-
var _navigableToolbar = _interopRequireDefault(require("../navigable-toolbar"));
|
|
18
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
|
-
/**
|
|
20
|
-
* WordPress dependencies
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Internal dependencies
|
|
25
|
-
*/
|
|
26
|
-
|
|
27
|
-
function ZoomOutToolbar({
|
|
28
|
-
clientId,
|
|
29
|
-
__unstableContentRef
|
|
30
|
-
}) {
|
|
31
|
-
const selected = (0, _data.useSelect)(select => {
|
|
32
|
-
const {
|
|
33
|
-
getBlock,
|
|
34
|
-
getNextBlockClientId,
|
|
35
|
-
getPreviousBlockClientId,
|
|
36
|
-
canRemoveBlock,
|
|
37
|
-
canMoveBlock,
|
|
38
|
-
getSettings
|
|
39
|
-
} = select(_store.store);
|
|
40
|
-
const {
|
|
41
|
-
__experimentalSetIsInserterOpened: setIsInserterOpened
|
|
42
|
-
} = getSettings();
|
|
43
|
-
const {
|
|
44
|
-
getBlockType
|
|
45
|
-
} = select(_blocks.store);
|
|
46
|
-
const {
|
|
47
|
-
name
|
|
48
|
-
} = getBlock(clientId);
|
|
49
|
-
const blockType = getBlockType(name);
|
|
50
|
-
const isBlockTemplatePart = blockType?.name === 'core/template-part';
|
|
51
|
-
let isNextBlockTemplatePart = false;
|
|
52
|
-
const nextClientId = getNextBlockClientId();
|
|
53
|
-
if (nextClientId) {
|
|
54
|
-
const {
|
|
55
|
-
name: nextName
|
|
56
|
-
} = getBlock(nextClientId);
|
|
57
|
-
const nextBlockType = getBlockType(nextName);
|
|
58
|
-
isNextBlockTemplatePart = nextBlockType?.name === 'core/template-part';
|
|
59
|
-
}
|
|
60
|
-
let isPrevBlockTemplatePart = false;
|
|
61
|
-
const prevClientId = getPreviousBlockClientId();
|
|
62
|
-
if (prevClientId) {
|
|
63
|
-
const {
|
|
64
|
-
name: prevName
|
|
65
|
-
} = getBlock(prevClientId);
|
|
66
|
-
const prevBlockType = getBlockType(prevName);
|
|
67
|
-
isPrevBlockTemplatePart = prevBlockType?.name === 'core/template-part';
|
|
68
|
-
}
|
|
69
|
-
return {
|
|
70
|
-
isBlockTemplatePart,
|
|
71
|
-
isNextBlockTemplatePart,
|
|
72
|
-
isPrevBlockTemplatePart,
|
|
73
|
-
canRemove: canRemoveBlock(clientId),
|
|
74
|
-
canMove: canMoveBlock(clientId),
|
|
75
|
-
setIsInserterOpened
|
|
76
|
-
};
|
|
77
|
-
}, [clientId]);
|
|
78
|
-
const {
|
|
79
|
-
isBlockTemplatePart,
|
|
80
|
-
isNextBlockTemplatePart,
|
|
81
|
-
isPrevBlockTemplatePart,
|
|
82
|
-
canRemove,
|
|
83
|
-
canMove
|
|
84
|
-
} = selected;
|
|
85
|
-
const {
|
|
86
|
-
removeBlock
|
|
87
|
-
} = (0, _data.useDispatch)(_store.store);
|
|
88
|
-
const showBlockDraggable = canMove && !isBlockTemplatePart;
|
|
89
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_navigableToolbar.default, {
|
|
90
|
-
className: "zoom-out-toolbar"
|
|
91
|
-
/* translators: accessibility text for the block toolbar */,
|
|
92
|
-
"aria-label": (0, _i18n.__)('Block tools')
|
|
93
|
-
// The variant is applied as "toolbar" when undefined, which is the black border style of the dropdown from the toolbar popover.
|
|
94
|
-
,
|
|
95
|
-
variant: "unstyled",
|
|
96
|
-
orientation: "vertical",
|
|
97
|
-
children: [showBlockDraggable && /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockDraggable.default, {
|
|
98
|
-
clientIds: [clientId],
|
|
99
|
-
children: draggableProps => /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
|
|
100
|
-
icon: _icons.dragHandle,
|
|
101
|
-
className: "block-selection-button_drag-handle zoom-out-toolbar-button",
|
|
102
|
-
label: (0, _i18n.__)('Drag'),
|
|
103
|
-
iconSize: 24,
|
|
104
|
-
size: "compact"
|
|
105
|
-
// Should not be able to tab to drag handle as this
|
|
106
|
-
// button can only be used with a pointer device.
|
|
107
|
-
,
|
|
108
|
-
tabIndex: "-1",
|
|
109
|
-
...draggableProps
|
|
110
|
-
})
|
|
111
|
-
}), !isBlockTemplatePart && /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockMover.default, {
|
|
112
|
-
clientIds: [clientId],
|
|
113
|
-
hideDragHandle: true,
|
|
114
|
-
isBlockMoverUpButtonDisabled: isPrevBlockTemplatePart,
|
|
115
|
-
isBlockMoverDownButtonDisabled: isNextBlockTemplatePart,
|
|
116
|
-
iconSize: 24,
|
|
117
|
-
size: "compact"
|
|
118
|
-
}), canMove && canRemove && /*#__PURE__*/(0, _jsxRuntime.jsx)(_shuffle.default, {
|
|
119
|
-
clientId: clientId,
|
|
120
|
-
as: _components.ToolbarButton
|
|
121
|
-
}), canRemove && !isBlockTemplatePart && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.ToolbarButton, {
|
|
122
|
-
className: "zoom-out-toolbar-button",
|
|
123
|
-
icon: _icons.trash,
|
|
124
|
-
label: (0, _i18n.__)('Delete'),
|
|
125
|
-
onClick: () => {
|
|
126
|
-
removeBlock(clientId);
|
|
127
|
-
__unstableContentRef.current?.focus();
|
|
128
|
-
}
|
|
129
|
-
})]
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
//# sourceMappingURL=zoom-out-toolbar.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_icons","require","_components","_data","_blocks","_i18n","_store","_blockDraggable","_interopRequireDefault","_blockMover","_shuffle","_navigableToolbar","_jsxRuntime","ZoomOutToolbar","clientId","__unstableContentRef","selected","useSelect","select","getBlock","getNextBlockClientId","getPreviousBlockClientId","canRemoveBlock","canMoveBlock","getSettings","blockEditorStore","__experimentalSetIsInserterOpened","setIsInserterOpened","getBlockType","blocksStore","name","blockType","isBlockTemplatePart","isNextBlockTemplatePart","nextClientId","nextName","nextBlockType","isPrevBlockTemplatePart","prevClientId","prevName","prevBlockType","canRemove","canMove","removeBlock","useDispatch","showBlockDraggable","jsxs","default","className","__","variant","orientation","children","jsx","clientIds","draggableProps","Button","icon","dragHandle","label","iconSize","size","tabIndex","hideDragHandle","isBlockMoverUpButtonDisabled","isBlockMoverDownButtonDisabled","as","ToolbarButton","trash","onClick","current","focus"],"sources":["@wordpress/block-editor/src/components/block-tools/zoom-out-toolbar.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { dragHandle, trash } from '@wordpress/icons';\nimport { Button, ToolbarButton } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport BlockDraggable from '../block-draggable';\nimport BlockMover from '../block-mover';\nimport Shuffle from '../block-toolbar/shuffle';\nimport NavigableToolbar from '../navigable-toolbar';\n\nexport default function ZoomOutToolbar( { clientId, __unstableContentRef } ) {\n\tconst selected = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlock,\n\t\t\t\tgetNextBlockClientId,\n\t\t\t\tgetPreviousBlockClientId,\n\t\t\t\tcanRemoveBlock,\n\t\t\t\tcanMoveBlock,\n\t\t\t\tgetSettings,\n\t\t\t} = select( blockEditorStore );\n\n\t\t\tconst { __experimentalSetIsInserterOpened: setIsInserterOpened } =\n\t\t\t\tgetSettings();\n\n\t\t\tconst { getBlockType } = select( blocksStore );\n\t\t\tconst { name } = getBlock( clientId );\n\t\t\tconst blockType = getBlockType( name );\n\t\t\tconst isBlockTemplatePart =\n\t\t\t\tblockType?.name === 'core/template-part';\n\n\t\t\tlet isNextBlockTemplatePart = false;\n\t\t\tconst nextClientId = getNextBlockClientId();\n\t\t\tif ( nextClientId ) {\n\t\t\t\tconst { name: nextName } = getBlock( nextClientId );\n\t\t\t\tconst nextBlockType = getBlockType( nextName );\n\t\t\t\tisNextBlockTemplatePart =\n\t\t\t\t\tnextBlockType?.name === 'core/template-part';\n\t\t\t}\n\n\t\t\tlet isPrevBlockTemplatePart = false;\n\t\t\tconst prevClientId = getPreviousBlockClientId();\n\t\t\tif ( prevClientId ) {\n\t\t\t\tconst { name: prevName } = getBlock( prevClientId );\n\t\t\t\tconst prevBlockType = getBlockType( prevName );\n\t\t\t\tisPrevBlockTemplatePart =\n\t\t\t\t\tprevBlockType?.name === 'core/template-part';\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tisBlockTemplatePart,\n\t\t\t\tisNextBlockTemplatePart,\n\t\t\t\tisPrevBlockTemplatePart,\n\t\t\t\tcanRemove: canRemoveBlock( clientId ),\n\t\t\t\tcanMove: canMoveBlock( clientId ),\n\t\t\t\tsetIsInserterOpened,\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst {\n\t\tisBlockTemplatePart,\n\t\tisNextBlockTemplatePart,\n\t\tisPrevBlockTemplatePart,\n\t\tcanRemove,\n\t\tcanMove,\n\t} = selected;\n\n\tconst { removeBlock } = useDispatch( blockEditorStore );\n\n\tconst showBlockDraggable = canMove && ! isBlockTemplatePart;\n\n\treturn (\n\t\t<NavigableToolbar\n\t\t\tclassName=\"zoom-out-toolbar\"\n\t\t\t/* translators: accessibility text for the block toolbar */\n\t\t\taria-label={ __( 'Block tools' ) }\n\t\t\t// The variant is applied as \"toolbar\" when undefined, which is the black border style of the dropdown from the toolbar popover.\n\t\t\tvariant=\"unstyled\"\n\t\t\torientation=\"vertical\"\n\t\t>\n\t\t\t{ showBlockDraggable && (\n\t\t\t\t<BlockDraggable clientIds={ [ clientId ] }>\n\t\t\t\t\t{ ( draggableProps ) => (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\ticon={ dragHandle }\n\t\t\t\t\t\t\tclassName=\"block-selection-button_drag-handle zoom-out-toolbar-button\"\n\t\t\t\t\t\t\tlabel={ __( 'Drag' ) }\n\t\t\t\t\t\t\ticonSize={ 24 }\n\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\t// Should not be able to tab to drag handle as this\n\t\t\t\t\t\t\t// button can only be used with a pointer device.\n\t\t\t\t\t\t\ttabIndex=\"-1\"\n\t\t\t\t\t\t\t{ ...draggableProps }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</BlockDraggable>\n\t\t\t) }\n\t\t\t{ ! isBlockTemplatePart && (\n\t\t\t\t<BlockMover\n\t\t\t\t\tclientIds={ [ clientId ] }\n\t\t\t\t\thideDragHandle\n\t\t\t\t\tisBlockMoverUpButtonDisabled={ isPrevBlockTemplatePart }\n\t\t\t\t\tisBlockMoverDownButtonDisabled={ isNextBlockTemplatePart }\n\t\t\t\t\ticonSize={ 24 }\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ canMove && canRemove && (\n\t\t\t\t<Shuffle clientId={ clientId } as={ ToolbarButton } />\n\t\t\t) }\n\n\t\t\t{ canRemove && ! isBlockTemplatePart && (\n\t\t\t\t<ToolbarButton\n\t\t\t\t\tclassName=\"zoom-out-toolbar-button\"\n\t\t\t\t\ticon={ trash }\n\t\t\t\t\tlabel={ __( 'Delete' ) }\n\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\tremoveBlock( clientId );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use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.spaceBetween = exports.alignTop = exports.alignStretch = exports.alignCenter = exports.alignBottom = void 0;
|
|
7
|
-
var _components = require("@wordpress/components");
|
|
8
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
-
/**
|
|
10
|
-
* WordPress dependencies
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
const alignBottom = exports.alignBottom = /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.SVG, {
|
|
14
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
15
|
-
viewBox: "0 0 24 24",
|
|
16
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Path, {
|
|
17
|
-
d: "M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"
|
|
18
|
-
})
|
|
19
|
-
});
|
|
20
|
-
const alignCenter = exports.alignCenter = /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.SVG, {
|
|
21
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
22
|
-
viewBox: "0 0 24 24",
|
|
23
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Path, {
|
|
24
|
-
d: "M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"
|
|
25
|
-
})
|
|
26
|
-
});
|
|
27
|
-
const alignTop = exports.alignTop = /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.SVG, {
|
|
28
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
29
|
-
viewBox: "0 0 24 24",
|
|
30
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Path, {
|
|
31
|
-
d: "M9 20h6V9H9v11zM4 4v1.5h16V4H4z"
|
|
32
|
-
})
|
|
33
|
-
});
|
|
34
|
-
const alignStretch = exports.alignStretch = /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.SVG, {
|
|
35
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
36
|
-
viewBox: "0 0 24 24",
|
|
37
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Path, {
|
|
38
|
-
d: "M4 4L20 4L20 5.5L4 5.5L4 4ZM10 7L14 7L14 17L10 17L10 7ZM20 18.5L4 18.5L4 20L20 20L20 18.5Z"
|
|
39
|
-
})
|
|
40
|
-
});
|
|
41
|
-
const spaceBetween = exports.spaceBetween = /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.SVG, {
|
|
42
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
43
|
-
viewBox: "0 0 24 24",
|
|
44
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Path, {
|
|
45
|
-
d: "M7 4H17V8L7 8V4ZM7 16L17 16V20L7 20V16ZM20 11.25H4V12.75H20V11.25Z"
|
|
46
|
-
})
|
|
47
|
-
});
|
|
48
|
-
//# sourceMappingURL=icons.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","_jsxRuntime","alignBottom","exports","jsx","SVG","xmlns","viewBox","children","Path","d","alignCenter","alignTop","alignStretch","spaceBetween"],"sources":["@wordpress/block-editor/src/components/block-vertical-alignment-control/icons.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/components';\n\nexport const alignBottom = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z\" />\n\t</SVG>\n);\n\nexport const alignCenter = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z\" />\n\t</SVG>\n);\n\nexport const alignTop = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M9 20h6V9H9v11zM4 4v1.5h16V4H4z\" />\n\t</SVG>\n);\n\nexport const alignStretch = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M4 4L20 4L20 5.5L4 5.5L4 4ZM10 7L14 7L14 17L10 17L10 7ZM20 18.5L4 18.5L4 20L20 20L20 18.5Z\" />\n\t</SVG>\n);\n\nexport const spaceBetween = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M7 4H17V8L7 8V4ZM7 16L17 16V20L7 20V16ZM20 11.25H4V12.75H20V11.25Z\" />\n\t</SVG>\n);\n"],"mappings":";;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAAkD,IAAAC,WAAA,GAAAD,OAAA;AAHlD;AACA;AACA;;AAGO,MAAME,WAAW,GAAAC,OAAA,CAAAD,WAAA,gBACvB,IAAAD,WAAA,CAAAG,GAAA,EAACL,WAAA,CAAAM,GAAG;EAACC,KAAK,EAAC,4BAA4B;EAACC,OAAO,EAAC,WAAW;EAAAC,QAAA,eAC1D,IAAAP,WAAA,CAAAG,GAAA,EAACL,WAAA,CAAAU,IAAI;IAACC,CAAC,EAAC;EAAsC,CAAE;AAAC,CAC7C,CACL;AAEM,MAAMC,WAAW,GAAAR,OAAA,CAAAQ,WAAA,gBACvB,IAAAV,WAAA,CAAAG,GAAA,EAACL,WAAA,CAAAM,GAAG;EAACC,KAAK,EAAC,4BAA4B;EAACC,OAAO,EAAC,WAAW;EAAAC,QAAA,eAC1D,IAAAP,WAAA,CAAAG,GAAA,EAACL,WAAA,CAAAU,IAAI;IAACC,CAAC,EAAC;EAAsC,CAAE;AAAC,CAC7C,CACL;AAEM,MAAME,QAAQ,GAAAT,OAAA,CAAAS,QAAA,gBACpB,IAAAX,WAAA,CAAAG,GAAA,EAACL,WAAA,CAAAM,GAAG;EAACC,KAAK,EAAC,4BAA4B;EAACC,OAAO,EAAC,WAAW;EAAAC,QAAA,eAC1D,IAAAP,WAAA,CAAAG,GAAA,EAACL,WAAA,CAAAU,IAAI;IAACC,CAAC,EAAC;EAAiC,CAAE;AAAC,CACxC,CACL;AAEM,MAAMG,YAAY,GAAAV,OAAA,CAAAU,YAAA,gBACxB,IAAAZ,WAAA,CAAAG,GAAA,EAACL,WAAA,CAAAM,GAAG;EAACC,KAAK,EAAC,4BAA4B;EAACC,OAAO,EAAC,WAAW;EAAAC,QAAA,eAC1D,IAAAP,WAAA,CAAAG,GAAA,EAACL,WAAA,CAAAU,IAAI;IAACC,CAAC,EAAC;EAA4F,CAAE;AAAC,CACnG,CACL;AAEM,MAAMI,YAAY,GAAAX,OAAA,CAAAW,YAAA,gBACxB,IAAAb,WAAA,CAAAG,GAAA,EAACL,WAAA,CAAAM,GAAG;EAACC,KAAK,EAAC,4BAA4B;EAACC,OAAO,EAAC,WAAW;EAAAC,QAAA,eAC1D,IAAAP,WAAA,CAAAG,GAAA,EAACL,WAAA,CAAAU,IAAI;IAACC,CAAC,EAAC;EAAoE,CAAE;AAAC,CAC3E,CACL","ignoreList":[]}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { useSelect, useDispatch } from '@wordpress/data';
|
|
5
|
-
import { useRefEffect } from '@wordpress/compose';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Internal dependencies
|
|
9
|
-
*/
|
|
10
|
-
import { store as blockEditorStore } from '../../../store';
|
|
11
|
-
import { unlock } from '../../../lock-unlock';
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Allows Zoom Out mode to be exited by double clicking in the selected block.
|
|
15
|
-
*/
|
|
16
|
-
export function useZoomOutModeExit() {
|
|
17
|
-
const {
|
|
18
|
-
getSettings,
|
|
19
|
-
isZoomOut,
|
|
20
|
-
__unstableGetEditorMode
|
|
21
|
-
} = unlock(useSelect(blockEditorStore));
|
|
22
|
-
const {
|
|
23
|
-
__unstableSetEditorMode,
|
|
24
|
-
resetZoomLevel
|
|
25
|
-
} = unlock(useDispatch(blockEditorStore));
|
|
26
|
-
return useRefEffect(node => {
|
|
27
|
-
function onDoubleClick(event) {
|
|
28
|
-
// In "compose" mode.
|
|
29
|
-
const composeMode = __unstableGetEditorMode() === 'zoom-out' && isZoomOut();
|
|
30
|
-
if (!composeMode) {
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
if (!event.defaultPrevented) {
|
|
34
|
-
event.preventDefault();
|
|
35
|
-
const {
|
|
36
|
-
__experimentalSetIsInserterOpened
|
|
37
|
-
} = getSettings();
|
|
38
|
-
if (typeof __experimentalSetIsInserterOpened === 'function') {
|
|
39
|
-
__experimentalSetIsInserterOpened(false);
|
|
40
|
-
}
|
|
41
|
-
__unstableSetEditorMode('edit');
|
|
42
|
-
resetZoomLevel();
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
node.addEventListener('dblclick', onDoubleClick);
|
|
46
|
-
return () => {
|
|
47
|
-
node.removeEventListener('dblclick', onDoubleClick);
|
|
48
|
-
};
|
|
49
|
-
}, [getSettings, __unstableSetEditorMode, __unstableGetEditorMode, isZoomOut, resetZoomLevel]);
|
|
50
|
-
}
|
|
51
|
-
//# sourceMappingURL=use-zoom-out-mode-exit.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["useSelect","useDispatch","useRefEffect","store","blockEditorStore","unlock","useZoomOutModeExit","getSettings","isZoomOut","__unstableGetEditorMode","__unstableSetEditorMode","resetZoomLevel","node","onDoubleClick","event","composeMode","defaultPrevented","preventDefault","__experimentalSetIsInserterOpened","addEventListener","removeEventListener"],"sources":["@wordpress/block-editor/src/components/block-list/use-block-props/use-zoom-out-mode-exit.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useRefEffect } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../../store';\nimport { unlock } from '../../../lock-unlock';\n\n/**\n * Allows Zoom Out mode to be exited by double clicking in the selected block.\n */\nexport function useZoomOutModeExit() {\n\tconst { getSettings, isZoomOut, __unstableGetEditorMode } = unlock(\n\t\tuseSelect( blockEditorStore )\n\t);\n\n\tconst { __unstableSetEditorMode, resetZoomLevel } = unlock(\n\t\tuseDispatch( blockEditorStore )\n\t);\n\n\treturn useRefEffect(\n\t\t( node ) => {\n\t\t\tfunction onDoubleClick( event ) {\n\t\t\t\t// In \"compose\" mode.\n\t\t\t\tconst composeMode =\n\t\t\t\t\t__unstableGetEditorMode() === 'zoom-out' && isZoomOut();\n\n\t\t\t\tif ( ! composeMode ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( ! event.defaultPrevented ) {\n\t\t\t\t\tevent.preventDefault();\n\n\t\t\t\t\tconst { __experimentalSetIsInserterOpened } = getSettings();\n\n\t\t\t\t\tif (\n\t\t\t\t\t\ttypeof __experimentalSetIsInserterOpened === 'function'\n\t\t\t\t\t) {\n\t\t\t\t\t\t__experimentalSetIsInserterOpened( false );\n\t\t\t\t\t}\n\t\t\t\t\t__unstableSetEditorMode( 'edit' );\n\t\t\t\t\tresetZoomLevel();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tnode.addEventListener( 'dblclick', onDoubleClick );\n\n\t\t\treturn () => {\n\t\t\t\tnode.removeEventListener( 'dblclick', onDoubleClick );\n\t\t\t};\n\t\t},\n\t\t[\n\t\t\tgetSettings,\n\t\t\t__unstableSetEditorMode,\n\t\t\t__unstableGetEditorMode,\n\t\t\tisZoomOut,\n\t\t\tresetZoomLevel,\n\t\t]\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,YAAY,QAAQ,oBAAoB;;AAEjD;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,gBAAgB;AAC1D,SAASC,MAAM,QAAQ,sBAAsB;;AAE7C;AACA;AACA;AACA,OAAO,SAASC,kBAAkBA,CAAA,EAAG;EACpC,MAAM;IAAEC,WAAW;IAAEC,SAAS;IAAEC;EAAwB,CAAC,GAAGJ,MAAM,CACjEL,SAAS,CAAEI,gBAAiB,CAC7B,CAAC;EAED,MAAM;IAAEM,uBAAuB;IAAEC;EAAe,CAAC,GAAGN,MAAM,CACzDJ,WAAW,CAAEG,gBAAiB,CAC/B,CAAC;EAED,OAAOF,YAAY,CAChBU,IAAI,IAAM;IACX,SAASC,aAAaA,CAAEC,KAAK,EAAG;MAC/B;MACA,MAAMC,WAAW,GAChBN,uBAAuB,CAAC,CAAC,KAAK,UAAU,IAAID,SAAS,CAAC,CAAC;MAExD,IAAK,CAAEO,WAAW,EAAG;QACpB;MACD;MAEA,IAAK,CAAED,KAAK,CAACE,gBAAgB,EAAG;QAC/BF,KAAK,CAACG,cAAc,CAAC,CAAC;QAEtB,MAAM;UAAEC;QAAkC,CAAC,GAAGX,WAAW,CAAC,CAAC;QAE3D,IACC,OAAOW,iCAAiC,KAAK,UAAU,EACtD;UACDA,iCAAiC,CAAE,KAAM,CAAC;QAC3C;QACAR,uBAAuB,CAAE,MAAO,CAAC;QACjCC,cAAc,CAAC,CAAC;MACjB;IACD;IAEAC,IAAI,CAACO,gBAAgB,CAAE,UAAU,EAAEN,aAAc,CAAC;IAElD,OAAO,MAAM;MACZD,IAAI,CAACQ,mBAAmB,CAAE,UAAU,EAAEP,aAAc,CAAC;IACtD,CAAC;EACF,CAAC,EACD,CACCN,WAAW,EACXG,uBAAuB,EACvBD,uBAAuB,EACvBD,SAAS,EACTG,cAAc,CAEhB,CAAC;AACF","ignoreList":[]}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { shuffle } from '@wordpress/icons';
|
|
5
|
-
import { ToolbarButton, ToolbarGroup } from '@wordpress/components';
|
|
6
|
-
import { __ } from '@wordpress/i18n';
|
|
7
|
-
import { useMemo } from '@wordpress/element';
|
|
8
|
-
import { useSelect, useDispatch } from '@wordpress/data';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Internal dependencies
|
|
12
|
-
*/
|
|
13
|
-
import { store as blockEditorStore } from '../../store';
|
|
14
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
-
const EMPTY_ARRAY = [];
|
|
16
|
-
function Container(props) {
|
|
17
|
-
return /*#__PURE__*/_jsx(ToolbarGroup, {
|
|
18
|
-
children: /*#__PURE__*/_jsx(ToolbarButton, {
|
|
19
|
-
...props
|
|
20
|
-
})
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
export default function Shuffle({
|
|
24
|
-
clientId,
|
|
25
|
-
as = Container
|
|
26
|
-
}) {
|
|
27
|
-
const {
|
|
28
|
-
categories,
|
|
29
|
-
patterns,
|
|
30
|
-
patternName
|
|
31
|
-
} = useSelect(select => {
|
|
32
|
-
const {
|
|
33
|
-
getBlockAttributes,
|
|
34
|
-
getBlockRootClientId,
|
|
35
|
-
__experimentalGetAllowedPatterns
|
|
36
|
-
} = select(blockEditorStore);
|
|
37
|
-
const attributes = getBlockAttributes(clientId);
|
|
38
|
-
const _categories = attributes?.metadata?.categories || EMPTY_ARRAY;
|
|
39
|
-
const _patternName = attributes?.metadata?.patternName;
|
|
40
|
-
const rootBlock = getBlockRootClientId(clientId);
|
|
41
|
-
|
|
42
|
-
// Calling `__experimentalGetAllowedPatterns` is expensive.
|
|
43
|
-
// Checking if the block can be shuffled prevents unnecessary selector calls.
|
|
44
|
-
// See: https://github.com/WordPress/gutenberg/pull/64736.
|
|
45
|
-
const _patterns = _categories.length > 0 ? __experimentalGetAllowedPatterns(rootBlock) : EMPTY_ARRAY;
|
|
46
|
-
return {
|
|
47
|
-
categories: _categories,
|
|
48
|
-
patterns: _patterns,
|
|
49
|
-
patternName: _patternName
|
|
50
|
-
};
|
|
51
|
-
}, [clientId]);
|
|
52
|
-
const {
|
|
53
|
-
replaceBlocks
|
|
54
|
-
} = useDispatch(blockEditorStore);
|
|
55
|
-
const sameCategoryPatternsWithSingleWrapper = useMemo(() => {
|
|
56
|
-
if (categories.length === 0 || !patterns || patterns.length === 0) {
|
|
57
|
-
return EMPTY_ARRAY;
|
|
58
|
-
}
|
|
59
|
-
return patterns.filter(pattern => {
|
|
60
|
-
const isCorePattern = pattern.source === 'core' || pattern.source?.startsWith('pattern-directory') && pattern.source !== 'pattern-directory/theme';
|
|
61
|
-
return (
|
|
62
|
-
// Check if the pattern has only one top level block,
|
|
63
|
-
// otherwise we may shuffle to pattern that will not allow to continue shuffling.
|
|
64
|
-
pattern.blocks.length === 1 &&
|
|
65
|
-
// We exclude the core patterns and pattern directory patterns that are not theme patterns.
|
|
66
|
-
!isCorePattern && pattern.categories?.some(category => {
|
|
67
|
-
return categories.includes(category);
|
|
68
|
-
}) && (
|
|
69
|
-
// Check if the pattern is not a synced pattern.
|
|
70
|
-
pattern.syncStatus === 'unsynced' || !pattern.id)
|
|
71
|
-
);
|
|
72
|
-
});
|
|
73
|
-
}, [categories, patterns]);
|
|
74
|
-
if (sameCategoryPatternsWithSingleWrapper.length < 2) {
|
|
75
|
-
return null;
|
|
76
|
-
}
|
|
77
|
-
function getNextPattern() {
|
|
78
|
-
const numberOfPatterns = sameCategoryPatternsWithSingleWrapper.length;
|
|
79
|
-
const patternIndex = sameCategoryPatternsWithSingleWrapper.findIndex(({
|
|
80
|
-
name
|
|
81
|
-
}) => name === patternName);
|
|
82
|
-
const nextPatternIndex = patternIndex + 1 < numberOfPatterns ? patternIndex + 1 : 0;
|
|
83
|
-
return sameCategoryPatternsWithSingleWrapper[nextPatternIndex];
|
|
84
|
-
}
|
|
85
|
-
const ComponentToUse = as;
|
|
86
|
-
return /*#__PURE__*/_jsx(ComponentToUse, {
|
|
87
|
-
label: __('Shuffle'),
|
|
88
|
-
icon: shuffle,
|
|
89
|
-
className: "block-editor-block-toolbar-shuffle",
|
|
90
|
-
onClick: () => {
|
|
91
|
-
const nextPattern = getNextPattern();
|
|
92
|
-
nextPattern.blocks[0].attributes = {
|
|
93
|
-
...nextPattern.blocks[0].attributes,
|
|
94
|
-
metadata: {
|
|
95
|
-
...nextPattern.blocks[0].attributes.metadata,
|
|
96
|
-
categories
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
replaceBlocks(clientId, nextPattern.blocks);
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
//# sourceMappingURL=shuffle.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["shuffle","ToolbarButton","ToolbarGroup","__","useMemo","useSelect","useDispatch","store","blockEditorStore","jsx","_jsx","EMPTY_ARRAY","Container","props","children","Shuffle","clientId","as","categories","patterns","patternName","select","getBlockAttributes","getBlockRootClientId","__experimentalGetAllowedPatterns","attributes","_categories","metadata","_patternName","rootBlock","_patterns","length","replaceBlocks","sameCategoryPatternsWithSingleWrapper","filter","pattern","isCorePattern","source","startsWith","blocks","some","category","includes","syncStatus","id","getNextPattern","numberOfPatterns","patternIndex","findIndex","name","nextPatternIndex","ComponentToUse","label","icon","className","onClick","nextPattern"],"sources":["@wordpress/block-editor/src/components/block-toolbar/shuffle.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { shuffle } from '@wordpress/icons';\nimport { ToolbarButton, ToolbarGroup } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useMemo } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\nconst EMPTY_ARRAY = [];\n\nfunction Container( props ) {\n\treturn (\n\t\t<ToolbarGroup>\n\t\t\t<ToolbarButton { ...props } />\n\t\t</ToolbarGroup>\n\t);\n}\n\nexport default function Shuffle( { clientId, as = Container } ) {\n\tconst { categories, patterns, patternName } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockAttributes,\n\t\t\t\tgetBlockRootClientId,\n\t\t\t\t__experimentalGetAllowedPatterns,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst attributes = getBlockAttributes( clientId );\n\t\t\tconst _categories = attributes?.metadata?.categories || EMPTY_ARRAY;\n\t\t\tconst _patternName = attributes?.metadata?.patternName;\n\t\t\tconst rootBlock = getBlockRootClientId( clientId );\n\n\t\t\t// Calling `__experimentalGetAllowedPatterns` is expensive.\n\t\t\t// Checking if the block can be shuffled prevents unnecessary selector calls.\n\t\t\t// See: https://github.com/WordPress/gutenberg/pull/64736.\n\t\t\tconst _patterns =\n\t\t\t\t_categories.length > 0\n\t\t\t\t\t? __experimentalGetAllowedPatterns( rootBlock )\n\t\t\t\t\t: EMPTY_ARRAY;\n\t\t\treturn {\n\t\t\t\tcategories: _categories,\n\t\t\t\tpatterns: _patterns,\n\t\t\t\tpatternName: _patternName,\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\tconst { replaceBlocks } = useDispatch( blockEditorStore );\n\tconst sameCategoryPatternsWithSingleWrapper = useMemo( () => {\n\t\tif ( categories.length === 0 || ! patterns || patterns.length === 0 ) {\n\t\t\treturn EMPTY_ARRAY;\n\t\t}\n\t\treturn patterns.filter( ( pattern ) => {\n\t\t\tconst isCorePattern =\n\t\t\t\tpattern.source === 'core' ||\n\t\t\t\t( pattern.source?.startsWith( 'pattern-directory' ) &&\n\t\t\t\t\tpattern.source !== 'pattern-directory/theme' );\n\t\t\treturn (\n\t\t\t\t// Check if the pattern has only one top level block,\n\t\t\t\t// otherwise we may shuffle to pattern that will not allow to continue shuffling.\n\t\t\t\tpattern.blocks.length === 1 &&\n\t\t\t\t// We exclude the core patterns and pattern directory patterns that are not theme patterns.\n\t\t\t\t! isCorePattern &&\n\t\t\t\tpattern.categories?.some( ( category ) => {\n\t\t\t\t\treturn categories.includes( category );\n\t\t\t\t} ) &&\n\t\t\t\t// Check if the pattern is not a synced pattern.\n\t\t\t\t( pattern.syncStatus === 'unsynced' || ! pattern.id )\n\t\t\t);\n\t\t} );\n\t}, [ categories, patterns ] );\n\n\tif ( sameCategoryPatternsWithSingleWrapper.length < 2 ) {\n\t\treturn null;\n\t}\n\n\tfunction getNextPattern() {\n\t\tconst numberOfPatterns = sameCategoryPatternsWithSingleWrapper.length;\n\t\tconst patternIndex = sameCategoryPatternsWithSingleWrapper.findIndex(\n\t\t\t( { name } ) => name === patternName\n\t\t);\n\t\tconst nextPatternIndex =\n\t\t\tpatternIndex + 1 < numberOfPatterns ? patternIndex + 1 : 0;\n\t\treturn sameCategoryPatternsWithSingleWrapper[ nextPatternIndex ];\n\t}\n\n\tconst ComponentToUse = as;\n\treturn (\n\t\t<ComponentToUse\n\t\t\tlabel={ __( 'Shuffle' ) }\n\t\t\ticon={ shuffle }\n\t\t\tclassName=\"block-editor-block-toolbar-shuffle\"\n\t\t\tonClick={ () => {\n\t\t\t\tconst nextPattern = getNextPattern();\n\t\t\t\tnextPattern.blocks[ 0 ].attributes = {\n\t\t\t\t\t...nextPattern.blocks[ 0 ].attributes,\n\t\t\t\t\tmetadata: {\n\t\t\t\t\t\t...nextPattern.blocks[ 0 ].attributes.metadata,\n\t\t\t\t\t\tcategories,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t\treplaceBlocks( clientId, nextPattern.blocks );\n\t\t\t} }\n\t\t/>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAO,QAAQ,kBAAkB;AAC1C,SAASC,aAAa,EAAEC,YAAY,QAAQ,uBAAuB;AACnE,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;;AAExD;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAExD,MAAMC,WAAW,GAAG,EAAE;AAEtB,SAASC,SAASA,CAAEC,KA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d,UAAU,GAAG;QACpC,GAAG+B,WAAW,CAACjB,MAAM,CAAE,CAAC,CAAE,CAACd,UAAU;QACrCE,QAAQ,EAAE;UACT,GAAG6B,WAAW,CAACjB,MAAM,CAAE,CAAC,CAAE,CAACd,UAAU,CAACE,QAAQ;UAC9CT;QACD;MACD,CAAC;MACDc,aAAa,CAAEhB,QAAQ,EAAEwC,WAAW,CAACjB,MAAO,CAAC;IAC9C;EAAG,CACH,CAAC;AAEJ","ignoreList":[]}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
|
-
import clsx from 'clsx';
|
|
5
|
-
/**
|
|
6
|
-
* Internal dependencies
|
|
7
|
-
*/
|
|
8
|
-
import { PrivateBlockPopover as BlockPopover } from '../block-popover';
|
|
9
|
-
import useBlockToolbarPopoverProps from './use-block-toolbar-popover-props';
|
|
10
|
-
import useSelectedBlockToolProps from './use-selected-block-tool-props';
|
|
11
|
-
import ZoomOutToolbar from './zoom-out-toolbar';
|
|
12
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
export default function ZoomOutPopover({
|
|
14
|
-
clientId,
|
|
15
|
-
__unstableContentRef
|
|
16
|
-
}) {
|
|
17
|
-
const {
|
|
18
|
-
capturingClientId,
|
|
19
|
-
isInsertionPointVisible,
|
|
20
|
-
lastClientId
|
|
21
|
-
} = useSelectedBlockToolProps(clientId);
|
|
22
|
-
const popoverProps = useBlockToolbarPopoverProps({
|
|
23
|
-
contentElement: __unstableContentRef?.current,
|
|
24
|
-
clientId
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
// Override some of the popover props for the zoom-out toolbar.
|
|
28
|
-
const props = {
|
|
29
|
-
...popoverProps,
|
|
30
|
-
placement: 'left-start',
|
|
31
|
-
flip: false,
|
|
32
|
-
shift: true
|
|
33
|
-
};
|
|
34
|
-
return /*#__PURE__*/_jsx(BlockPopover, {
|
|
35
|
-
__unstableContentRef: __unstableContentRef,
|
|
36
|
-
clientId: capturingClientId || clientId,
|
|
37
|
-
bottomClientId: lastClientId,
|
|
38
|
-
className: clsx('zoom-out-toolbar-popover', {
|
|
39
|
-
'is-insertion-point-visible': isInsertionPointVisible
|
|
40
|
-
}),
|
|
41
|
-
resize: false,
|
|
42
|
-
...props,
|
|
43
|
-
children: /*#__PURE__*/_jsx(ZoomOutToolbar, {
|
|
44
|
-
__unstableContentRef: __unstableContentRef,
|
|
45
|
-
clientId: clientId
|
|
46
|
-
})
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
//# sourceMappingURL=zoom-out-popover.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["clsx","PrivateBlockPopover","BlockPopover","useBlockToolbarPopoverProps","useSelectedBlockToolProps","ZoomOutToolbar","jsx","_jsx","ZoomOutPopover","clientId","__unstableContentRef","capturingClientId","isInsertionPointVisible","lastClientId","popoverProps","contentElement","current","props","placement","flip","shift","bottomClientId","className","resize","children"],"sources":["@wordpress/block-editor/src/components/block-tools/zoom-out-popover.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * Internal dependencies\n */\nimport { PrivateBlockPopover as BlockPopover } from '../block-popover';\nimport useBlockToolbarPopoverProps from './use-block-toolbar-popover-props';\nimport useSelectedBlockToolProps from './use-selected-block-tool-props';\nimport ZoomOutToolbar from './zoom-out-toolbar';\n\nexport default function ZoomOutPopover( { clientId, __unstableContentRef } ) {\n\tconst { capturingClientId, isInsertionPointVisible, lastClientId } =\n\t\tuseSelectedBlockToolProps( clientId );\n\n\tconst popoverProps = useBlockToolbarPopoverProps( {\n\t\tcontentElement: __unstableContentRef?.current,\n\t\tclientId,\n\t} );\n\n\t// Override some of the popover props for the zoom-out toolbar.\n\tconst props = {\n\t\t...popoverProps,\n\t\tplacement: 'left-start',\n\t\tflip: false,\n\t\tshift: true,\n\t};\n\n\treturn (\n\t\t<BlockPopover\n\t\t\t__unstableContentRef={ __unstableContentRef }\n\t\t\tclientId={ capturingClientId || clientId }\n\t\t\tbottomClientId={ lastClientId }\n\t\t\tclassName={ clsx( 'zoom-out-toolbar-popover', {\n\t\t\t\t'is-insertion-point-visible': isInsertionPointVisible,\n\t\t\t} ) }\n\t\t\tresize={ false }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t<ZoomOutToolbar\n\t\t\t\t__unstableContentRef={ __unstableContentRef }\n\t\t\t\tclientId={ clientId }\n\t\t\t/>\n\t\t</BlockPopover>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;AACvB;AACA;AACA;AACA,SAASC,mBAAmB,IAAIC,YAAY,QAAQ,kBAAkB;AACtE,OAAOC,2BAA2B,MAAM,mCAAmC;AAC3E,OAAOC,yBAAyB,MAAM,iCAAiC;AACvE,OAAOC,cAAc,MAAM,oBAAoB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEhD,eAAe,SAASC,cAAcA,CAAE;EAAEC,QAAQ;EAAEC;AAAqB,CAAC,EAAG;EAC5E,MAAM;IAAEC,iBAAiB;IAAEC,uBAAuB;IAAEC;EAAa,CAAC,GACjET,yBAAyB,CAAEK,QAAS,CAAC;EAEtC,MAAMK,YAAY,GAAGX,2BAA2B,CAAE;IACjDY,cAAc,EAAEL,oBAAoB,EAAEM,OAAO;IAC7CP;EACD,CAAE,CAAC;;EAEH;EACA,MAAMQ,KAAK,GAAG;IACb,GAAGH,YAAY;IACfI,SAAS,EAAE,YAAY;IACvBC,IAAI,EAAE,KAAK;IACXC,KAAK,EAAE;EACR,CAAC;EAED,oBACCb,IAAA,CAACL,YAAY;IACZQ,oBAAoB,EAAGA,oBAAsB;IAC7CD,QAAQ,EAAGE,iBAAiB,IAAIF,QAAU;IAC1CY,cAAc,EAAGR,YAAc;IAC/BS,SAAS,EAAGtB,IAAI,CAAE,0BAA0B,EAAE;MAC7C,4BAA4B,EAAEY;IAC/B,CAAE,CAAG;IACLW,MAAM,EAAG,KAAO;IAAA,GACXN,KAAK;IAAAO,QAAA,eAEVjB,IAAA,CAACF,cAAc;MACdK,oBAAoB,EAAGA,oBAAsB;MAC7CD,QAAQ,EAAGA;IAAU,CACrB;EAAC,CACW,CAAC;AAEjB","ignoreList":[]}
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { dragHandle, trash } from '@wordpress/icons';
|
|
5
|
-
import { Button, ToolbarButton } from '@wordpress/components';
|
|
6
|
-
import { useSelect, useDispatch } from '@wordpress/data';
|
|
7
|
-
import { store as blocksStore } from '@wordpress/blocks';
|
|
8
|
-
import { __ } from '@wordpress/i18n';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Internal dependencies
|
|
12
|
-
*/
|
|
13
|
-
import { store as blockEditorStore } from '../../store';
|
|
14
|
-
import BlockDraggable from '../block-draggable';
|
|
15
|
-
import BlockMover from '../block-mover';
|
|
16
|
-
import Shuffle from '../block-toolbar/shuffle';
|
|
17
|
-
import NavigableToolbar from '../navigable-toolbar';
|
|
18
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
|
-
export default function ZoomOutToolbar({
|
|
20
|
-
clientId,
|
|
21
|
-
__unstableContentRef
|
|
22
|
-
}) {
|
|
23
|
-
const selected = useSelect(select => {
|
|
24
|
-
const {
|
|
25
|
-
getBlock,
|
|
26
|
-
getNextBlockClientId,
|
|
27
|
-
getPreviousBlockClientId,
|
|
28
|
-
canRemoveBlock,
|
|
29
|
-
canMoveBlock,
|
|
30
|
-
getSettings
|
|
31
|
-
} = select(blockEditorStore);
|
|
32
|
-
const {
|
|
33
|
-
__experimentalSetIsInserterOpened: setIsInserterOpened
|
|
34
|
-
} = getSettings();
|
|
35
|
-
const {
|
|
36
|
-
getBlockType
|
|
37
|
-
} = select(blocksStore);
|
|
38
|
-
const {
|
|
39
|
-
name
|
|
40
|
-
} = getBlock(clientId);
|
|
41
|
-
const blockType = getBlockType(name);
|
|
42
|
-
const isBlockTemplatePart = blockType?.name === 'core/template-part';
|
|
43
|
-
let isNextBlockTemplatePart = false;
|
|
44
|
-
const nextClientId = getNextBlockClientId();
|
|
45
|
-
if (nextClientId) {
|
|
46
|
-
const {
|
|
47
|
-
name: nextName
|
|
48
|
-
} = getBlock(nextClientId);
|
|
49
|
-
const nextBlockType = getBlockType(nextName);
|
|
50
|
-
isNextBlockTemplatePart = nextBlockType?.name === 'core/template-part';
|
|
51
|
-
}
|
|
52
|
-
let isPrevBlockTemplatePart = false;
|
|
53
|
-
const prevClientId = getPreviousBlockClientId();
|
|
54
|
-
if (prevClientId) {
|
|
55
|
-
const {
|
|
56
|
-
name: prevName
|
|
57
|
-
} = getBlock(prevClientId);
|
|
58
|
-
const prevBlockType = getBlockType(prevName);
|
|
59
|
-
isPrevBlockTemplatePart = prevBlockType?.name === 'core/template-part';
|
|
60
|
-
}
|
|
61
|
-
return {
|
|
62
|
-
isBlockTemplatePart,
|
|
63
|
-
isNextBlockTemplatePart,
|
|
64
|
-
isPrevBlockTemplatePart,
|
|
65
|
-
canRemove: canRemoveBlock(clientId),
|
|
66
|
-
canMove: canMoveBlock(clientId),
|
|
67
|
-
setIsInserterOpened
|
|
68
|
-
};
|
|
69
|
-
}, [clientId]);
|
|
70
|
-
const {
|
|
71
|
-
isBlockTemplatePart,
|
|
72
|
-
isNextBlockTemplatePart,
|
|
73
|
-
isPrevBlockTemplatePart,
|
|
74
|
-
canRemove,
|
|
75
|
-
canMove
|
|
76
|
-
} = selected;
|
|
77
|
-
const {
|
|
78
|
-
removeBlock
|
|
79
|
-
} = useDispatch(blockEditorStore);
|
|
80
|
-
const showBlockDraggable = canMove && !isBlockTemplatePart;
|
|
81
|
-
return /*#__PURE__*/_jsxs(NavigableToolbar, {
|
|
82
|
-
className: "zoom-out-toolbar"
|
|
83
|
-
/* translators: accessibility text for the block toolbar */,
|
|
84
|
-
"aria-label": __('Block tools')
|
|
85
|
-
// The variant is applied as "toolbar" when undefined, which is the black border style of the dropdown from the toolbar popover.
|
|
86
|
-
,
|
|
87
|
-
variant: "unstyled",
|
|
88
|
-
orientation: "vertical",
|
|
89
|
-
children: [showBlockDraggable && /*#__PURE__*/_jsx(BlockDraggable, {
|
|
90
|
-
clientIds: [clientId],
|
|
91
|
-
children: draggableProps => /*#__PURE__*/_jsx(Button, {
|
|
92
|
-
icon: dragHandle,
|
|
93
|
-
className: "block-selection-button_drag-handle zoom-out-toolbar-button",
|
|
94
|
-
label: __('Drag'),
|
|
95
|
-
iconSize: 24,
|
|
96
|
-
size: "compact"
|
|
97
|
-
// Should not be able to tab to drag handle as this
|
|
98
|
-
// button can only be used with a pointer device.
|
|
99
|
-
,
|
|
100
|
-
tabIndex: "-1",
|
|
101
|
-
...draggableProps
|
|
102
|
-
})
|
|
103
|
-
}), !isBlockTemplatePart && /*#__PURE__*/_jsx(BlockMover, {
|
|
104
|
-
clientIds: [clientId],
|
|
105
|
-
hideDragHandle: true,
|
|
106
|
-
isBlockMoverUpButtonDisabled: isPrevBlockTemplatePart,
|
|
107
|
-
isBlockMoverDownButtonDisabled: isNextBlockTemplatePart,
|
|
108
|
-
iconSize: 24,
|
|
109
|
-
size: "compact"
|
|
110
|
-
}), canMove && canRemove && /*#__PURE__*/_jsx(Shuffle, {
|
|
111
|
-
clientId: clientId,
|
|
112
|
-
as: ToolbarButton
|
|
113
|
-
}), canRemove && !isBlockTemplatePart && /*#__PURE__*/_jsx(ToolbarButton, {
|
|
114
|
-
className: "zoom-out-toolbar-button",
|
|
115
|
-
icon: trash,
|
|
116
|
-
label: __('Delete'),
|
|
117
|
-
onClick: () => {
|
|
118
|
-
removeBlock(clientId);
|
|
119
|
-
__unstableContentRef.current?.focus();
|
|
120
|
-
}
|
|
121
|
-
})]
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
//# sourceMappingURL=zoom-out-toolbar.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["dragHandle","trash","Button","ToolbarButton","useSelect","useDispatch","store","blocksStore","__","blockEditorStore","BlockDraggable","BlockMover","Shuffle","NavigableToolbar","jsx","_jsx","jsxs","_jsxs","ZoomOutToolbar","clientId","__unstableContentRef","selected","select","getBlock","getNextBlockClientId","getPreviousBlockClientId","canRemoveBlock","canMoveBlock","getSettings","__experimentalSetIsInserterOpened","setIsInserterOpened","getBlockType","name","blockType","isBlockTemplatePart","isNextBlockTemplatePart","nextClientId","nextName","nextBlockType","isPrevBlockTemplatePart","prevClientId","prevName","prevBlockType","canRemove","canMove","removeBlock","showBlockDraggable","className","variant","orientation","children","clientIds","draggableProps","icon","label","iconSize","size","tabIndex","hideDragHandle","isBlockMoverUpButtonDisabled","isBlockMoverDownButtonDisabled","as","onClick","current","focus"],"sources":["@wordpress/block-editor/src/components/block-tools/zoom-out-toolbar.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { dragHandle, trash } from '@wordpress/icons';\nimport { Button, ToolbarButton } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport BlockDraggable from '../block-draggable';\nimport BlockMover from '../block-mover';\nimport Shuffle from '../block-toolbar/shuffle';\nimport NavigableToolbar from '../navigable-toolbar';\n\nexport default function ZoomOutToolbar( { clientId, __unstableContentRef } ) {\n\tconst selected = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlock,\n\t\t\t\tgetNextBlockClientId,\n\t\t\t\tgetPreviousBlockClientId,\n\t\t\t\tcanRemoveBlock,\n\t\t\t\tcanMoveBlock,\n\t\t\t\tgetSettings,\n\t\t\t} = select( blockEditorStore );\n\n\t\t\tconst { __experimentalSetIsInserterOpened: setIsInserterOpened } =\n\t\t\t\tgetSettings();\n\n\t\t\tconst { getBlockType } = select( blocksStore );\n\t\t\tconst { name } = getBlock( clientId );\n\t\t\tconst blockType = getBlockType( name );\n\t\t\tconst isBlockTemplatePart =\n\t\t\t\tblockType?.name === 'core/template-part';\n\n\t\t\tlet isNextBlockTemplatePart = false;\n\t\t\tconst nextClientId = getNextBlockClientId();\n\t\t\tif ( nextClientId ) {\n\t\t\t\tconst { name: nextName } = getBlock( nextClientId );\n\t\t\t\tconst nextBlockType = getBlockType( nextName );\n\t\t\t\tisNextBlockTemplatePart =\n\t\t\t\t\tnextBlockType?.name === 'core/template-part';\n\t\t\t}\n\n\t\t\tlet isPrevBlockTemplatePart = false;\n\t\t\tconst prevClientId = getPreviousBlockClientId();\n\t\t\tif ( prevClientId ) {\n\t\t\t\tconst { name: prevName } = getBlock( prevClientId );\n\t\t\t\tconst prevBlockType = getBlockType( prevName );\n\t\t\t\tisPrevBlockTemplatePart =\n\t\t\t\t\tprevBlockType?.name === 'core/template-part';\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tisBlockTemplatePart,\n\t\t\t\tisNextBlockTemplatePart,\n\t\t\t\tisPrevBlockTemplatePart,\n\t\t\t\tcanRemove: canRemoveBlock( clientId ),\n\t\t\t\tcanMove: canMoveBlock( clientId ),\n\t\t\t\tsetIsInserterOpened,\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst {\n\t\tisBlockTemplatePart,\n\t\tisNextBlockTemplatePart,\n\t\tisPrevBlockTemplatePart,\n\t\tcanRemove,\n\t\tcanMove,\n\t} = selected;\n\n\tconst { removeBlock } = useDispatch( blockEditorStore );\n\n\tconst showBlockDraggable = canMove && ! isBlockTemplatePart;\n\n\treturn (\n\t\t<NavigableToolbar\n\t\t\tclassName=\"zoom-out-toolbar\"\n\t\t\t/* translators: accessibility text for the block toolbar */\n\t\t\taria-label={ __( 'Block tools' ) }\n\t\t\t// The variant is applied as \"toolbar\" when undefined, which is the black border style of the dropdown from the toolbar popover.\n\t\t\tvariant=\"unstyled\"\n\t\t\torientation=\"vertical\"\n\t\t>\n\t\t\t{ showBlockDraggable && (\n\t\t\t\t<BlockDraggable clientIds={ [ clientId ] }>\n\t\t\t\t\t{ ( draggableProps ) => (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\ticon={ dragHandle }\n\t\t\t\t\t\t\tclassName=\"block-selection-button_drag-handle zoom-out-toolbar-button\"\n\t\t\t\t\t\t\tlabel={ __( 'Drag' ) }\n\t\t\t\t\t\t\ticonSize={ 24 }\n\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\t// Should not be able to tab to drag handle as this\n\t\t\t\t\t\t\t// button can only be used with a pointer device.\n\t\t\t\t\t\t\ttabIndex=\"-1\"\n\t\t\t\t\t\t\t{ ...draggableProps }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</BlockDraggable>\n\t\t\t) }\n\t\t\t{ ! isBlockTemplatePart && (\n\t\t\t\t<BlockMover\n\t\t\t\t\tclientIds={ [ clientId ] }\n\t\t\t\t\thideDragHandle\n\t\t\t\t\tisBlockMoverUpButtonDisabled={ isPrevBlockTemplatePart }\n\t\t\t\t\tisBlockMoverDownButtonDisabled={ isNextBlockTemplatePart }\n\t\t\t\t\ticonSize={ 24 }\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ canMove && canRemove && (\n\t\t\t\t<Shuffle clientId={ clientId } as={ ToolbarButton } />\n\t\t\t) }\n\n\t\t\t{ canRemove && ! isBlockTemplatePart && (\n\t\t\t\t<ToolbarButton\n\t\t\t\t\tclassName=\"zoom-out-toolbar-button\"\n\t\t\t\t\ticon={ trash }\n\t\t\t\t\tlabel={ __( 'Delete' ) }\n\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\tremoveBlock( clientId );\n\t\t\t\t\t\t__unstableContentRef.current?.focus();\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</NavigableToolbar>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA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DAA4D;QACtEO,KAAK,EAAG9C,EAAE,CAAE,MAAO,CAAG;QACtB+C,QAAQ,EAAG,EAAI;QACfC,IAAI,EAAC;QACL;QACA;QAAA;QACAC,QAAQ,EAAC,IAAI;QAAA,GACRL;MAAc,CACnB;IACD,CACc,CAChB,EACC,CAAElB,mBAAmB,iBACtBnB,IAAA,CAACJ,UAAU;MACVwC,SAAS,EAAG,CAAEhC,QAAQ,CAAI;MAC1BuC,cAAc;MACdC,4BAA4B,EAAGpB,uBAAyB;MACxDqB,8BAA8B,EAAGzB,uBAAyB;MAC1DoB,QAAQ,EAAG,EAAI;MACfC,IAAI,EAAC;IAAS,CACd,CACD,EACCZ,OAAO,IAAID,SAAS,iBACrB5B,IAAA,CAACH,OAAO;MAACO,QAAQ,EAAGA,QAAU;MAAC0C,EAAE,EAAG1D;IAAe,CAAE,CACrD,EAECwC,SAAS,IAAI,CAAET,mBAAmB,iBACnCnB,IAAA,CAACZ,aAAa;MACb4C,SAAS,EAAC,yBAAyB;MACnCM,IAAI,EAAGpD,KAAO;MACdqD,KAAK,EAAG9C,EAAE,CAAE,QAAS,CAAG;MACxBsD,OAAO,EAAGA,CAAA,KAAM;QACfjB,WAAW,CAAE1B,QAAS,CAAC;QACvBC,oBAAoB,CAAC2C,OAAO,EAAEC,KAAK,CAAC,CAAC;MACtC;IAAG,CACH,CACD;EAAA,CACgB,CAAC;AAErB","ignoreList":[]}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { Path, SVG } from '@wordpress/components';
|
|
5
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
-
export const alignBottom = /*#__PURE__*/_jsx(SVG, {
|
|
7
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
8
|
-
viewBox: "0 0 24 24",
|
|
9
|
-
children: /*#__PURE__*/_jsx(Path, {
|
|
10
|
-
d: "M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"
|
|
11
|
-
})
|
|
12
|
-
});
|
|
13
|
-
export const alignCenter = /*#__PURE__*/_jsx(SVG, {
|
|
14
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
15
|
-
viewBox: "0 0 24 24",
|
|
16
|
-
children: /*#__PURE__*/_jsx(Path, {
|
|
17
|
-
d: "M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"
|
|
18
|
-
})
|
|
19
|
-
});
|
|
20
|
-
export const alignTop = /*#__PURE__*/_jsx(SVG, {
|
|
21
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
22
|
-
viewBox: "0 0 24 24",
|
|
23
|
-
children: /*#__PURE__*/_jsx(Path, {
|
|
24
|
-
d: "M9 20h6V9H9v11zM4 4v1.5h16V4H4z"
|
|
25
|
-
})
|
|
26
|
-
});
|
|
27
|
-
export const alignStretch = /*#__PURE__*/_jsx(SVG, {
|
|
28
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
29
|
-
viewBox: "0 0 24 24",
|
|
30
|
-
children: /*#__PURE__*/_jsx(Path, {
|
|
31
|
-
d: "M4 4L20 4L20 5.5L4 5.5L4 4ZM10 7L14 7L14 17L10 17L10 7ZM20 18.5L4 18.5L4 20L20 20L20 18.5Z"
|
|
32
|
-
})
|
|
33
|
-
});
|
|
34
|
-
export const spaceBetween = /*#__PURE__*/_jsx(SVG, {
|
|
35
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
36
|
-
viewBox: "0 0 24 24",
|
|
37
|
-
children: /*#__PURE__*/_jsx(Path, {
|
|
38
|
-
d: "M7 4H17V8L7 8V4ZM7 16L17 16V20L7 20V16ZM20 11.25H4V12.75H20V11.25Z"
|
|
39
|
-
})
|
|
40
|
-
});
|
|
41
|
-
//# sourceMappingURL=icons.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["Path","SVG","jsx","_jsx","alignBottom","xmlns","viewBox","children","d","alignCenter","alignTop","alignStretch","spaceBetween"],"sources":["@wordpress/block-editor/src/components/block-vertical-alignment-control/icons.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/components';\n\nexport const alignBottom = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z\" />\n\t</SVG>\n);\n\nexport const alignCenter = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z\" />\n\t</SVG>\n);\n\nexport const alignTop = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M9 20h6V9H9v11zM4 4v1.5h16V4H4z\" />\n\t</SVG>\n);\n\nexport const alignStretch = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M4 4L20 4L20 5.5L4 5.5L4 4ZM10 7L14 7L14 17L10 17L10 7ZM20 18.5L4 18.5L4 20L20 20L20 18.5Z\" />\n\t</SVG>\n);\n\nexport const spaceBetween = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M7 4H17V8L7 8V4ZM7 16L17 16V20L7 20V16ZM20 11.25H4V12.75H20V11.25Z\" />\n\t</SVG>\n);\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,IAAI,EAAEC,GAAG,QAAQ,uBAAuB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAElD,OAAO,MAAMC,WAAW,gBACvBD,IAAA,CAACF,GAAG;EAACI,KAAK,EAAC,4BAA4B;EAACC,OAAO,EAAC,WAAW;EAAAC,QAAA,eAC1DJ,IAAA,CAACH,IAAI;IAACQ,CAAC,EAAC;EAAsC,CAAE;AAAC,CAC7C,CACL;AAED,OAAO,MAAMC,WAAW,gBACv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