@wordpress/block-editor 14.5.0 → 14.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/README.md +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 +1 -1
- 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-paging/index.js +1 -1
- package/build/components/block-patterns-paging/index.js.map +1 -1
- package/build/components/block-popover/index.js +2 -45
- package/build/components/block-popover/index.js.map +1 -1
- package/build/components/block-preview/index.js +2 -2
- 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 +122 -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 +4 -10
- 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-show-block-tools.js +3 -9
- 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/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/index.js +17 -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-tab/pattern-category-previews.js +2 -2
- 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/category-tabs/index.js +15 -2
- package/build/components/inserter/category-tabs/index.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-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/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.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/tool-selector/index.js +1 -4
- package/build/components/tool-selector/index.js.map +1 -1
- package/build/components/url-input/index.js +1 -1
- package/build/components/url-input/index.js.map +1 -1
- package/build/components/use-block-commands/index.js +1 -1
- 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/style.js +4 -1
- package/build/hooks/style.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/index.js +0 -7
- package/build/index.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 +9 -21
- 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 +44 -7
- package/build/store/selectors.js.map +1 -1
- package/build/utils/dom.js +16 -1
- 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 +1 -1
- 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-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 +2 -45
- package/build-module/components/block-popover/index.js.map +1 -1
- package/build-module/components/block-preview/index.js +2 -2
- 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 +114 -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 +4 -10
- 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-show-block-tools.js +3 -9
- 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/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/index.js +17 -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-tab/pattern-category-previews.js +2 -2
- 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/category-tabs/index.js +15 -2
- package/build-module/components/inserter/category-tabs/index.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-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/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.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/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 +1 -1
- package/build-module/components/url-input/index.js.map +1 -1
- package/build-module/components/use-block-commands/index.js +1 -1
- 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/style.js +4 -1
- package/build-module/hooks/style.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/index.js +1 -1
- package/build-module/index.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 +9 -20
- 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 +45 -8
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/utils/dom.js +16 -1
- 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 +9 -4
- package/build-style/content.css +9 -4
- package/build-style/style-rtl.css +33 -22
- package/build-style/style.css +33 -22
- package/build-types/utils/dom.d.ts.map +1 -1
- package/package.json +33 -32
- package/src/autocompleters/block.js +16 -7
- package/src/components/block-canvas/index.js +17 -1
- package/src/components/block-canvas/style.scss +2 -0
- 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 +0 -6
- package/src/components/block-list/block.js +1 -2
- 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/stories/fixtures.js +834 -0
- package/src/components/block-patterns-list/stories/index.story.js +81 -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 +0 -62
- package/src/components/block-preview/index.js +2 -2
- 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 +133 -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 +4 -17
- package/src/components/block-tools/insertion-point.js +4 -3
- package/src/components/block-tools/style.scss +0 -20
- package/src/components/block-tools/use-show-block-tools.js +0 -13
- 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/global-styles/color-panel.js +2 -10
- 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/index.js +31 -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-tab/pattern-category-previews.js +2 -3
- package/src/components/inserter/block-patterns-tab/patterns-filter.js +1 -1
- package/src/components/inserter/category-tabs/index.js +16 -2
- package/src/components/inserter/menu.js +6 -4
- 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/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.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/tool-selector/index.js +1 -5
- package/src/components/url-input/index.js +1 -1
- package/src/components/use-block-commands/index.js +1 -1
- 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/style.js +7 -3
- package/src/hooks/use-zoom-out.js +14 -34
- 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 +9 -19
- package/src/store/reducer.js +25 -11
- package/src/store/selectors.js +59 -8
- package/src/store/test/actions.js +41 -0
- package/src/store/test/reducer.js +23 -0
- package/src/utils/dom.js +22 -2
- package/src/utils/get-font-styles-and-weights.js +2 -2
- package/src/utils/transform-styles/index.js +3 -2
- 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/store/selectors.js
CHANGED
|
@@ -41,6 +41,7 @@ import {
|
|
|
41
41
|
getSectionRootClientId,
|
|
42
42
|
isSectionBlock,
|
|
43
43
|
getParentSectionBlock,
|
|
44
|
+
isZoomOut,
|
|
44
45
|
} from './private-selectors';
|
|
45
46
|
|
|
46
47
|
/**
|
|
@@ -541,6 +542,39 @@ export function getSelectedBlockClientId( state ) {
|
|
|
541
542
|
*
|
|
542
543
|
* @param {Object} state Global application state.
|
|
543
544
|
*
|
|
545
|
+
* @example
|
|
546
|
+
*
|
|
547
|
+
*```js
|
|
548
|
+
* import { select } from '@wordpress/data'
|
|
549
|
+
* import { store as blockEditorStore } from '@wordpress/block-editor'
|
|
550
|
+
*
|
|
551
|
+
* // Set initial active block client ID
|
|
552
|
+
* let activeBlockClientId = null
|
|
553
|
+
*
|
|
554
|
+
* const getActiveBlockData = () => {
|
|
555
|
+
* const activeBlock = select(blockEditorStore).getSelectedBlock()
|
|
556
|
+
*
|
|
557
|
+
* if (activeBlock && activeBlock.clientId !== activeBlockClientId) {
|
|
558
|
+
* activeBlockClientId = activeBlock.clientId
|
|
559
|
+
*
|
|
560
|
+
* // Get active block name and attributes
|
|
561
|
+
* const activeBlockName = activeBlock.name
|
|
562
|
+
* const activeBlockAttributes = activeBlock.attributes
|
|
563
|
+
*
|
|
564
|
+
* // Log active block name and attributes
|
|
565
|
+
* console.log(activeBlockName, activeBlockAttributes)
|
|
566
|
+
* }
|
|
567
|
+
* }
|
|
568
|
+
*
|
|
569
|
+
* // Subscribe to changes in the editor
|
|
570
|
+
* // wp.data.subscribe(() => {
|
|
571
|
+
* // getActiveBlockData()
|
|
572
|
+
* // })
|
|
573
|
+
*
|
|
574
|
+
* // Update active block data on click
|
|
575
|
+
* // onclick="getActiveBlockData()"
|
|
576
|
+
*```
|
|
577
|
+
*
|
|
544
578
|
* @return {?Object} Selected block.
|
|
545
579
|
*/
|
|
546
580
|
export function getSelectedBlock( state ) {
|
|
@@ -1552,12 +1586,18 @@ export function getTemplateLock( state, rootClientId ) {
|
|
|
1552
1586
|
* @param {string|Object} blockNameOrType The block type object, e.g., the response
|
|
1553
1587
|
* from the block directory; or a string name of
|
|
1554
1588
|
* an installed block type, e.g.' core/paragraph'.
|
|
1589
|
+
* @param {Set} checkedBlocks Set of block names that have already been checked.
|
|
1555
1590
|
*
|
|
1556
1591
|
* @return {boolean} Whether the given block type is allowed to be inserted.
|
|
1557
1592
|
*/
|
|
1558
|
-
const isBlockVisibleInTheInserter = (
|
|
1593
|
+
const isBlockVisibleInTheInserter = (
|
|
1594
|
+
state,
|
|
1595
|
+
blockNameOrType,
|
|
1596
|
+
checkedBlocks = new Set()
|
|
1597
|
+
) => {
|
|
1559
1598
|
let blockType;
|
|
1560
1599
|
let blockName;
|
|
1600
|
+
|
|
1561
1601
|
if ( blockNameOrType && 'object' === typeof blockNameOrType ) {
|
|
1562
1602
|
blockType = blockNameOrType;
|
|
1563
1603
|
blockName = blockNameOrType.name;
|
|
@@ -1565,6 +1605,7 @@ const isBlockVisibleInTheInserter = ( state, blockNameOrType ) => {
|
|
|
1565
1605
|
blockType = getBlockType( blockNameOrType );
|
|
1566
1606
|
blockName = blockNameOrType;
|
|
1567
1607
|
}
|
|
1608
|
+
|
|
1568
1609
|
if ( ! blockType ) {
|
|
1569
1610
|
return false;
|
|
1570
1611
|
}
|
|
@@ -1580,17 +1621,29 @@ const isBlockVisibleInTheInserter = ( state, blockNameOrType ) => {
|
|
|
1580
1621
|
return false;
|
|
1581
1622
|
}
|
|
1582
1623
|
|
|
1624
|
+
if ( checkedBlocks.has( blockName ) ) {
|
|
1625
|
+
return false;
|
|
1626
|
+
}
|
|
1627
|
+
|
|
1628
|
+
checkedBlocks.add( blockName );
|
|
1629
|
+
|
|
1583
1630
|
// If parent blocks are not visible, child blocks should be hidden too.
|
|
1584
|
-
if (
|
|
1631
|
+
if ( Array.isArray( blockType.parent ) ) {
|
|
1585
1632
|
return blockType.parent.some(
|
|
1586
1633
|
( name ) =>
|
|
1587
|
-
|
|
1634
|
+
( blockName !== name &&
|
|
1635
|
+
isBlockVisibleInTheInserter(
|
|
1636
|
+
state,
|
|
1637
|
+
name,
|
|
1638
|
+
checkedBlocks
|
|
1639
|
+
) ) ||
|
|
1588
1640
|
// Exception for blocks with post-content parent,
|
|
1589
1641
|
// the root level is often consider as "core/post-content".
|
|
1590
1642
|
// This exception should only apply to the post editor ideally though.
|
|
1591
1643
|
name === 'core/post-content'
|
|
1592
1644
|
);
|
|
1593
1645
|
}
|
|
1646
|
+
|
|
1594
1647
|
return true;
|
|
1595
1648
|
};
|
|
1596
1649
|
|
|
@@ -2884,10 +2937,8 @@ export function __unstableHasActiveBlockOverlayActive( state, clientId ) {
|
|
|
2884
2937
|
return true;
|
|
2885
2938
|
}
|
|
2886
2939
|
|
|
2887
|
-
const editorMode = __unstableGetEditorMode( state );
|
|
2888
|
-
|
|
2889
2940
|
// In zoom-out mode, the block overlay is always active for section level blocks.
|
|
2890
|
-
if (
|
|
2941
|
+
if ( isZoomOut( state ) ) {
|
|
2891
2942
|
const sectionRootClientId = getSectionRootClientId( state );
|
|
2892
2943
|
if ( sectionRootClientId ) {
|
|
2893
2944
|
const sectionClientIds = getBlockOrder(
|
|
@@ -2986,8 +3037,7 @@ export const getBlockEditingMode = createRegistrySelector(
|
|
|
2986
3037
|
// In zoom-out mode, override the behavior set by
|
|
2987
3038
|
// __unstableSetBlockEditingMode to only allow editing the top-level
|
|
2988
3039
|
// sections.
|
|
2989
|
-
|
|
2990
|
-
if ( editorMode === 'zoom-out' ) {
|
|
3040
|
+
if ( isZoomOut( state ) ) {
|
|
2991
3041
|
const sectionRootClientId = getSectionRootClientId( state );
|
|
2992
3042
|
|
|
2993
3043
|
if ( clientId === '' /* ROOT_CONTAINER_CLIENT_ID */ ) {
|
|
@@ -3009,6 +3059,7 @@ export const getBlockEditingMode = createRegistrySelector(
|
|
|
3009
3059
|
return 'disabled';
|
|
3010
3060
|
}
|
|
3011
3061
|
|
|
3062
|
+
const editorMode = __unstableGetEditorMode( state );
|
|
3012
3063
|
if ( editorMode === 'navigation' ) {
|
|
3013
3064
|
const sectionRootClientId = getSectionRootClientId( state );
|
|
3014
3065
|
|
|
@@ -1125,6 +1125,47 @@ describe( 'actions', () => {
|
|
|
1125
1125
|
} );
|
|
1126
1126
|
} );
|
|
1127
1127
|
|
|
1128
|
+
describe( 'updateSettings', () => {
|
|
1129
|
+
it( 'warns when setting the deprecated __unstableIsPreviewMode property and sets the stable property instead', () => {
|
|
1130
|
+
const consoleWarn = jest
|
|
1131
|
+
.spyOn( global.console, 'warn' )
|
|
1132
|
+
.mockImplementation();
|
|
1133
|
+
|
|
1134
|
+
const store = createRegistry().registerStore(
|
|
1135
|
+
blockEditorStoreName,
|
|
1136
|
+
{
|
|
1137
|
+
actions,
|
|
1138
|
+
selectors,
|
|
1139
|
+
reducer,
|
|
1140
|
+
}
|
|
1141
|
+
);
|
|
1142
|
+
|
|
1143
|
+
store.dispatch(
|
|
1144
|
+
updateSettings( {
|
|
1145
|
+
__unstableIsPreviewMode: true,
|
|
1146
|
+
} )
|
|
1147
|
+
);
|
|
1148
|
+
|
|
1149
|
+
expect( consoleWarn ).toHaveBeenCalledWith(
|
|
1150
|
+
"__unstableIsPreviewMode argument in wp.data.dispatch('core/block-editor').updateSettings is deprecated since version 6.8. Please use isPreviewMode instead."
|
|
1151
|
+
);
|
|
1152
|
+
|
|
1153
|
+
consoleWarn.mockClear();
|
|
1154
|
+
|
|
1155
|
+
expect( store.getState().settings.__unstableIsPreviewMode ).toBe(
|
|
1156
|
+
true
|
|
1157
|
+
);
|
|
1158
|
+
|
|
1159
|
+
expect( store.getState().settings.isPreviewMode ).toBe( true );
|
|
1160
|
+
|
|
1161
|
+
expect( consoleWarn ).toHaveBeenCalledWith(
|
|
1162
|
+
'__unstableIsPreviewMode is deprecated since version 6.8. Please use isPreviewMode instead.'
|
|
1163
|
+
);
|
|
1164
|
+
|
|
1165
|
+
consoleWarn.mockRestore();
|
|
1166
|
+
} );
|
|
1167
|
+
} );
|
|
1168
|
+
|
|
1128
1169
|
describe( 'registerInserterMediaCategory', () => {
|
|
1129
1170
|
describe( 'should log errors when invalid', () => {
|
|
1130
1171
|
it( 'valid object', () => {
|
|
@@ -32,6 +32,7 @@ import {
|
|
|
32
32
|
insertionPoint,
|
|
33
33
|
template,
|
|
34
34
|
blockListSettings,
|
|
35
|
+
settings,
|
|
35
36
|
lastBlockAttributesChange,
|
|
36
37
|
lastBlockInserted,
|
|
37
38
|
blockEditingModes,
|
|
@@ -3070,6 +3071,28 @@ describe( 'state', () => {
|
|
|
3070
3071
|
} );
|
|
3071
3072
|
} );
|
|
3072
3073
|
|
|
3074
|
+
describe( 'settings', () => {
|
|
3075
|
+
it( 'should warn about __unstableIsPreviewMode deprecation', () => {
|
|
3076
|
+
const consoleWarn = jest
|
|
3077
|
+
.spyOn( global.console, 'warn' )
|
|
3078
|
+
.mockImplementation();
|
|
3079
|
+
|
|
3080
|
+
const settingsObject = settings( undefined, {
|
|
3081
|
+
type: 'UPDATE_SETTINGS',
|
|
3082
|
+
reset: true,
|
|
3083
|
+
} );
|
|
3084
|
+
|
|
3085
|
+
expect( settingsObject.__unstableIsPreviewMode ).toBeDefined();
|
|
3086
|
+
expect( settingsObject.isPreviewMode ).toBeDefined();
|
|
3087
|
+
|
|
3088
|
+
expect( consoleWarn ).toHaveBeenCalledWith(
|
|
3089
|
+
'__unstableIsPreviewMode is deprecated since version 6.8. Please use isPreviewMode instead.'
|
|
3090
|
+
);
|
|
3091
|
+
|
|
3092
|
+
consoleWarn.mockRestore();
|
|
3093
|
+
} );
|
|
3094
|
+
} );
|
|
3095
|
+
|
|
3073
3096
|
describe( 'blockListSettings', () => {
|
|
3074
3097
|
it( 'should add new settings', () => {
|
|
3075
3098
|
const original = deepFreeze( {} );
|
package/src/utils/dom.js
CHANGED
|
@@ -118,6 +118,22 @@ function isElementVisible( element ) {
|
|
|
118
118
|
return true;
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
+
/**
|
|
122
|
+
* Checks if the element is scrollable.
|
|
123
|
+
*
|
|
124
|
+
* @param {Element} element Element.
|
|
125
|
+
* @return {boolean} True if the element is scrollable.
|
|
126
|
+
*/
|
|
127
|
+
function isScrollable( element ) {
|
|
128
|
+
const style = window.getComputedStyle( element );
|
|
129
|
+
return (
|
|
130
|
+
style.overflowX === 'auto' ||
|
|
131
|
+
style.overflowX === 'scroll' ||
|
|
132
|
+
style.overflowY === 'auto' ||
|
|
133
|
+
style.overflowY === 'scroll'
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
|
|
121
137
|
/**
|
|
122
138
|
* Returns the rect of the element including all visible nested elements.
|
|
123
139
|
*
|
|
@@ -136,19 +152,23 @@ function isElementVisible( element ) {
|
|
|
136
152
|
*/
|
|
137
153
|
export function getVisibleElementBounds( element ) {
|
|
138
154
|
const viewport = element.ownerDocument.defaultView;
|
|
155
|
+
|
|
139
156
|
if ( ! viewport ) {
|
|
140
157
|
return new window.DOMRectReadOnly();
|
|
141
158
|
}
|
|
142
159
|
|
|
143
160
|
let bounds = element.getBoundingClientRect();
|
|
144
|
-
|
|
145
161
|
const stack = [ element ];
|
|
146
162
|
let currentElement;
|
|
147
163
|
|
|
148
164
|
while ( ( currentElement = stack.pop() ) ) {
|
|
149
165
|
for ( const child of currentElement.children ) {
|
|
150
166
|
if ( isElementVisible( child ) ) {
|
|
151
|
-
|
|
167
|
+
let childBounds = child.getBoundingClientRect();
|
|
168
|
+
// If the parent is scrollable, use parent's scrollable bounds.
|
|
169
|
+
if ( isScrollable( currentElement ) ) {
|
|
170
|
+
childBounds = currentElement.getBoundingClientRect();
|
|
171
|
+
}
|
|
152
172
|
bounds = rectUnion( bounds, childBounds );
|
|
153
173
|
stack.push( child );
|
|
154
174
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { _x,
|
|
4
|
+
import { _x, sprintf } from '@wordpress/i18n';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Internal dependencies
|
|
@@ -173,7 +173,7 @@ export function getFontStylesAndWeights( fontFamilyFaces ) {
|
|
|
173
173
|
? weightName
|
|
174
174
|
: sprintf(
|
|
175
175
|
/* translators: 1: Font weight name. 2: Font style name. */
|
|
176
|
-
|
|
176
|
+
_x( '%1$s %2$s', 'font' ),
|
|
177
177
|
weightName,
|
|
178
178
|
styleName
|
|
179
179
|
);
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
4
|
import * as parsel from 'parsel-js';
|
|
5
|
-
import
|
|
5
|
+
import Processor from 'postcss/lib/processor';
|
|
6
|
+
import CssSyntaxError from 'postcss/lib/css-syntax-error';
|
|
6
7
|
import prefixSelector from 'postcss-prefix-selector';
|
|
7
8
|
import rebaseUrl from 'postcss-urlrebase';
|
|
8
9
|
|
|
@@ -100,7 +101,7 @@ function transformStyle(
|
|
|
100
101
|
wrapperSelector,
|
|
101
102
|
];
|
|
102
103
|
|
|
103
|
-
return
|
|
104
|
+
return new Processor(
|
|
104
105
|
[
|
|
105
106
|
wrapperSelector &&
|
|
106
107
|
prefixSelector( {
|
package/tsconfig.tsbuildinfo
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.es2022.d.ts","../../node_modules/typescript/lib/lib.es2023.d.ts","../../node_modules/typescript/lib/lib.esnext.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../node_modules/typescript/lib/lib.es2023.array.d.ts","../../node_modules/typescript/lib/lib.es2023.collection.d.ts","../../node_modules/typescript/lib/lib.es2023.intl.d.ts","../../node_modules/typescript/lib/lib.esnext.array.d.ts","../../node_modules/typescript/lib/lib.esnext.collection.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../node_modules/typescript/lib/lib.esnext.string.d.ts","../../node_modules/typescript/lib/lib.esnext.promise.d.ts","../../node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../node_modules/typescript/lib/lib.esnext.object.d.ts","../../node_modules/typescript/lib/lib.esnext.regexp.d.ts","../../node_modules/typescript/lib/lib.decorators.d.ts","../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../node_modules/@types/react/global.d.ts","../../node_modules/csstype/index.d.ts","../../node_modules/@types/prop-types/index.d.ts","../../node_modules/@types/react/index.d.ts","../element/build-types/create-interpolate-element.d.ts","../element/build-types/react.d.ts","../../node_modules/@types/react-dom/index.d.ts","../../node_modules/@types/react-dom/client.d.ts","../element/build-types/react-platform.d.ts","../element/build-types/utils.d.ts","../element/build-types/platform.d.ts","../element/build-types/serialize.d.ts","../element/build-types/raw-html.d.ts","../element/build-types/index.d.ts","./src/components/block-context/index.js","./src/utils/dom.js"],"fileInfos":[{"version":"44e584d4f6444f58791784f1d530875970993129442a847597db702a073ca68c","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","17edc026abf73c5c2dd508652d63f68ec4efd9d4856e3469890d27598209feb5",{"version":"4af6b0c727b7a2896463d512fafd23634229adf69ac7c00e2ae15a09cb084fad","affectsGlobalScope":true},{"version":"9c00a480825408b6a24c63c1b71362232927247595d7c97659bc24dc68ae0757","affectsGlobalScope":true},{"version":"6920e1448680767498a0b77c6a00a8e77d14d62c3da8967b171f1ddffa3c18e4","affectsGlobalScope":true},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"bc47685641087c015972a3f072480889f0d6c65515f12bd85222f49a98952ed7","affectsGlobalScope":true},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true},{"version":"ea011c76963fb15ef1cdd7ce6a6808b46322c527de2077b6cfdf23ae6f5f9ec7","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true},{"version":"bb42a7797d996412ecdc5b2787720de477103a0b2e53058569069a0e2bae6c7e","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"b541a838a13f9234aba650a825393ffc2292dc0fc87681a5d81ef0c96d281e7a","affectsGlobalScope":true},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true},{"version":"ae37d6ccd1560b0203ab88d46987393adaaa78c919e51acf32fb82c86502e98c","affectsGlobalScope":true},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"5e07ed3809d48205d5b985642a59f2eba47c402374a7cf8006b686f79efadcbd","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"479553e3779be7d4f68e9f40cdb82d038e5ef7592010100410723ceced22a0f7","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true},{"version":"d3d7b04b45033f57351c8434f60b6be1ea71a2dfec2d0a0c3c83badbb0e3e693","affectsGlobalScope":true},{"version":"956d27abdea9652e8368ce029bb1e0b9174e9678a273529f426df4b3d90abd60","affectsGlobalScope":true},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true},{"version":"e6633e05da3ff36e6da2ec170d0d03ccf33de50ca4dc6f5aeecb572cedd162fb","affectsGlobalScope":true},{"version":"d8670852241d4c6e03f2b89d67497a4bbefe29ecaa5a444e2c11a9b05e6fccc6","affectsGlobalScope":true},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true},{"version":"caccc56c72713969e1cfe5c3d44e5bab151544d9d2b373d7dbe5a1e4166652be","affectsGlobalScope":true},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true},{"version":"08a58483392df5fcc1db57d782e87734f77ae9eab42516028acbfe46f29a3ef7","affectsGlobalScope":true},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true},{"version":"0b11f3ca66aa33124202c80b70cd203219c3d4460cfc165e0707aa9ec710fc53","affectsGlobalScope":true},{"version":"6a3f5a0129cc80cf439ab71164334d649b47059a4f5afca90282362407d0c87f","affectsGlobalScope":true},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true},{"version":"15b98a533864d324e5f57cd3cfc0579b231df58c1c0f6063ea0fcb13c3c74ff9","affectsGlobalScope":true},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","affectsGlobalScope":true},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","affectsGlobalScope":true},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},{"version":"55461596dc873b866911ef4e640fae4c39da7ac1fbc7ef5e649cb2f2fb42c349","affectsGlobalScope":true},"4c68749a564a6facdf675416d75789ee5a557afda8960e0803cf6711fa569288","f7b46d22a307739c145e5fddf537818038fdfffd580d79ed717f4d4d37249380",{"version":"8ca4709dbd22a34bcc1ebf93e1877645bdb02ebd3f3d9a211a299a8db2ee4ba1","affectsGlobalScope":true},"4c506b14512049dfe6f4ceb172b13c6af03663f85ba61fc57efbe6c2e7be9f44","4405cd67ec5f7f748fd793be0ce5842fa0808955b8e37518c011abfa5ab63ba5","adb17fea4d847e1267ae1241fa1ac3917c7e332999ebdab388a24d82d4f58240","05321b823dd3781d0b6aac8700bfdc0c9181d56479fe52ba6a40c9196fd661a8","472c14cdec534a465e866b6e1feee2d4e0d89c15fdc33ba80ff034fa0e80f3c1","4d807d55c784b72f71c092c34c84d09b95c29500c30252538fd5cf9a0a788c0e","df43a3968118d4b16618d7a0ac8ba89337fcce3c39e39984087ac34bf0cf250c","4714d89e7ea47b8f79a4d448a11674b2a724f93ab03cfa6879dafbab0f0c5a15","cb9a03b327570c1eae5c82a48604ef697ad1a6264ed0490743a3449de61a4fff","af88a0b0f808a6721401550621bfe67c46c6fd55000305058e7c73600d119a9b",{"version":"0a41b61ddcb640fa2a07cb7a04ecddf540b8199f70d3cf5f2d8903be722529eb","signature":"3dd80666c91b4c1ddb04cbf93038f90420af9bc18d7978acb4b9d7a302238f19"},{"version":"053d5d92994900db287f79816c0d58251f4f0718ba9a9d454a8545ea25f3d72d","signature":"f6104a0c5a67150c41196a7cc40a44078eabbbc89d0bb46470f3773679395241"}],"root":[88,89],"options":{"allowJs":true,"allowSyntheticDefaultImports":true,"checkJs":true,"composite":true,"declaration":true,"declarationDir":"./build-types","declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":false,"jsx":1,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"rootDir":"./src","skipDefaultLibCheck":true,"strict":true,"target":99},"fileIdsList":[[77],[74,75,76],[77,87],[78,79,82,83,84,85,86],[80,81]],"referencedMap":[[81,1],[80,1],[77,2],[88,3],[78,1],[87,4],[86,1],[82,5],[79,1],[85,1]],"latestChangedDtsFile":"./build-types/utils/dom.d.ts"},"version":"5.5.3"}
|
|
1
|
+
{"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.es2022.d.ts","../../node_modules/typescript/lib/lib.es2023.d.ts","../../node_modules/typescript/lib/lib.esnext.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../node_modules/typescript/lib/lib.es2023.array.d.ts","../../node_modules/typescript/lib/lib.es2023.collection.d.ts","../../node_modules/typescript/lib/lib.es2023.intl.d.ts","../../node_modules/typescript/lib/lib.esnext.array.d.ts","../../node_modules/typescript/lib/lib.esnext.collection.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../node_modules/typescript/lib/lib.esnext.string.d.ts","../../node_modules/typescript/lib/lib.esnext.promise.d.ts","../../node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../node_modules/typescript/lib/lib.esnext.object.d.ts","../../node_modules/typescript/lib/lib.esnext.regexp.d.ts","../../node_modules/typescript/lib/lib.decorators.d.ts","../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../node_modules/@types/react/global.d.ts","../../node_modules/csstype/index.d.ts","../../node_modules/@types/prop-types/index.d.ts","../../node_modules/@types/react/index.d.ts","../element/build-types/create-interpolate-element.d.ts","../element/build-types/react.d.ts","../../node_modules/@types/react-dom/index.d.ts","../../node_modules/@types/react-dom/client.d.ts","../element/build-types/react-platform.d.ts","../element/build-types/utils.d.ts","../element/build-types/platform.d.ts","../element/build-types/serialize.d.ts","../element/build-types/raw-html.d.ts","../element/build-types/index.d.ts","./src/components/block-context/index.js","./src/utils/dom.js"],"fileInfos":[{"version":"44e584d4f6444f58791784f1d530875970993129442a847597db702a073ca68c","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","17edc026abf73c5c2dd508652d63f68ec4efd9d4856e3469890d27598209feb5",{"version":"4af6b0c727b7a2896463d512fafd23634229adf69ac7c00e2ae15a09cb084fad","affectsGlobalScope":true},{"version":"9c00a480825408b6a24c63c1b71362232927247595d7c97659bc24dc68ae0757","affectsGlobalScope":true},{"version":"6920e1448680767498a0b77c6a00a8e77d14d62c3da8967b171f1ddffa3c18e4","affectsGlobalScope":true},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"bc47685641087c015972a3f072480889f0d6c65515f12bd85222f49a98952ed7","affectsGlobalScope":true},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true},{"version":"ea011c76963fb15ef1cdd7ce6a6808b46322c527de2077b6cfdf23ae6f5f9ec7","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true},{"version":"bb42a7797d996412ecdc5b2787720de477103a0b2e53058569069a0e2bae6c7e","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"b541a838a13f9234aba650a825393ffc2292dc0fc87681a5d81ef0c96d281e7a","affectsGlobalScope":true},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true},{"version":"ae37d6ccd1560b0203ab88d46987393adaaa78c919e51acf32fb82c86502e98c","affectsGlobalScope":true},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"5e07ed3809d48205d5b985642a59f2eba47c402374a7cf8006b686f79efadcbd","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"479553e3779be7d4f68e9f40cdb82d038e5ef7592010100410723ceced22a0f7","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true},{"version":"d3d7b04b45033f57351c8434f60b6be1ea71a2dfec2d0a0c3c83badbb0e3e693","affectsGlobalScope":true},{"version":"956d27abdea9652e8368ce029bb1e0b9174e9678a273529f426df4b3d90abd60","affectsGlobalScope":true},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true},{"version":"e6633e05da3ff36e6da2ec170d0d03ccf33de50ca4dc6f5aeecb572cedd162fb","affectsGlobalScope":true},{"version":"d8670852241d4c6e03f2b89d67497a4bbefe29ecaa5a444e2c11a9b05e6fccc6","affectsGlobalScope":true},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true},{"version":"caccc56c72713969e1cfe5c3d44e5bab151544d9d2b373d7dbe5a1e4166652be","affectsGlobalScope":true},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true},{"version":"08a58483392df5fcc1db57d782e87734f77ae9eab42516028acbfe46f29a3ef7","affectsGlobalScope":true},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true},{"version":"0b11f3ca66aa33124202c80b70cd203219c3d4460cfc165e0707aa9ec710fc53","affectsGlobalScope":true},{"version":"6a3f5a0129cc80cf439ab71164334d649b47059a4f5afca90282362407d0c87f","affectsGlobalScope":true},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true},{"version":"15b98a533864d324e5f57cd3cfc0579b231df58c1c0f6063ea0fcb13c3c74ff9","affectsGlobalScope":true},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","affectsGlobalScope":true},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","affectsGlobalScope":true},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},{"version":"55461596dc873b866911ef4e640fae4c39da7ac1fbc7ef5e649cb2f2fb42c349","affectsGlobalScope":true},"4c68749a564a6facdf675416d75789ee5a557afda8960e0803cf6711fa569288","f7b46d22a307739c145e5fddf537818038fdfffd580d79ed717f4d4d37249380",{"version":"8ca4709dbd22a34bcc1ebf93e1877645bdb02ebd3f3d9a211a299a8db2ee4ba1","affectsGlobalScope":true},"4c506b14512049dfe6f4ceb172b13c6af03663f85ba61fc57efbe6c2e7be9f44","4405cd67ec5f7f748fd793be0ce5842fa0808955b8e37518c011abfa5ab63ba5","adb17fea4d847e1267ae1241fa1ac3917c7e332999ebdab388a24d82d4f58240","05321b823dd3781d0b6aac8700bfdc0c9181d56479fe52ba6a40c9196fd661a8","472c14cdec534a465e866b6e1feee2d4e0d89c15fdc33ba80ff034fa0e80f3c1","4d807d55c784b72f71c092c34c84d09b95c29500c30252538fd5cf9a0a788c0e","df43a3968118d4b16618d7a0ac8ba89337fcce3c39e39984087ac34bf0cf250c","4714d89e7ea47b8f79a4d448a11674b2a724f93ab03cfa6879dafbab0f0c5a15","cb9a03b327570c1eae5c82a48604ef697ad1a6264ed0490743a3449de61a4fff","af88a0b0f808a6721401550621bfe67c46c6fd55000305058e7c73600d119a9b",{"version":"0a41b61ddcb640fa2a07cb7a04ecddf540b8199f70d3cf5f2d8903be722529eb","signature":"3dd80666c91b4c1ddb04cbf93038f90420af9bc18d7978acb4b9d7a302238f19"},{"version":"f531fb882daf97b248456e8f3d645c7dd6d6cfba9da6bf725bf54da02d21ae52","signature":"f6104a0c5a67150c41196a7cc40a44078eabbbc89d0bb46470f3773679395241"}],"root":[88,89],"options":{"allowJs":true,"allowSyntheticDefaultImports":true,"checkJs":true,"composite":true,"declaration":true,"declarationDir":"./build-types","declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":false,"jsx":1,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"rootDir":"./src","skipDefaultLibCheck":true,"strict":true,"target":99},"fileIdsList":[[77],[74,75,76],[77,87],[78,79,82,83,84,85,86],[80,81]],"referencedMap":[[81,1],[80,1],[77,2],[88,3],[78,1],[87,4],[86,1],[82,5],[79,1],[85,1]],"latestChangedDtsFile":"./build-types/utils/dom.d.ts"},"version":"5.5.3"}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.useZoomOutModeExit = useZoomOutModeExit;
|
|
7
|
-
var _data = require("@wordpress/data");
|
|
8
|
-
var _compose = require("@wordpress/compose");
|
|
9
|
-
var _store = require("../../../store");
|
|
10
|
-
var _lockUnlock = require("../../../lock-unlock");
|
|
11
|
-
/**
|
|
12
|
-
* WordPress dependencies
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Internal dependencies
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Allows Zoom Out mode to be exited by double clicking in the selected block.
|
|
21
|
-
*/
|
|
22
|
-
function useZoomOutModeExit() {
|
|
23
|
-
const {
|
|
24
|
-
getSettings,
|
|
25
|
-
isZoomOut,
|
|
26
|
-
__unstableGetEditorMode
|
|
27
|
-
} = (0, _lockUnlock.unlock)((0, _data.useSelect)(_store.store));
|
|
28
|
-
const {
|
|
29
|
-
__unstableSetEditorMode,
|
|
30
|
-
resetZoomLevel
|
|
31
|
-
} = (0, _lockUnlock.unlock)((0, _data.useDispatch)(_store.store));
|
|
32
|
-
return (0, _compose.useRefEffect)(node => {
|
|
33
|
-
function onDoubleClick(event) {
|
|
34
|
-
// In "compose" mode.
|
|
35
|
-
const composeMode = __unstableGetEditorMode() === 'zoom-out' && isZoomOut();
|
|
36
|
-
if (!composeMode) {
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
if (!event.defaultPrevented) {
|
|
40
|
-
event.preventDefault();
|
|
41
|
-
const {
|
|
42
|
-
__experimentalSetIsInserterOpened
|
|
43
|
-
} = getSettings();
|
|
44
|
-
if (typeof __experimentalSetIsInserterOpened === 'function') {
|
|
45
|
-
__experimentalSetIsInserterOpened(false);
|
|
46
|
-
}
|
|
47
|
-
__unstableSetEditorMode('edit');
|
|
48
|
-
resetZoomLevel();
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
node.addEventListener('dblclick', onDoubleClick);
|
|
52
|
-
return () => {
|
|
53
|
-
node.removeEventListener('dblclick', onDoubleClick);
|
|
54
|
-
};
|
|
55
|
-
}, [getSettings, __unstableSetEditorMode, __unstableGetEditorMode, isZoomOut, resetZoomLevel]);
|
|
56
|
-
}
|
|
57
|
-
//# sourceMappingURL=use-zoom-out-mode-exit.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_data","require","_compose","_store","_lockUnlock","useZoomOutModeExit","getSettings","isZoomOut","__unstableGetEditorMode","unlock","useSelect","blockEditorStore","__unstableSetEditorMode","resetZoomLevel","useDispatch","useRefEffect","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":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAKA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AAVA;AACA;AACA;;AAIA;AACA;AACA;;AAIA;AACA;AACA;AACO,SAASI,kBAAkBA,CAAA,EAAG;EACpC,MAAM;IAAEC,WAAW;IAAEC,SAAS;IAAEC;EAAwB,CAAC,GAAG,IAAAC,kBAAM,EACjE,IAAAC,eAAS,EAAEC,YAAiB,CAC7B,CAAC;EAED,MAAM;IAAEC,uBAAuB;IAAEC;EAAe,CAAC,GAAG,IAAAJ,kBAAM,EACzD,IAAAK,iBAAW,EAAEH,YAAiB,CAC/B,CAAC;EAED,OAAO,IAAAI,qBAAY,EAChBC,IAAI,IAAM;IACX,SAASC,aAAaA,CAAEC,KAAK,EAAG;MAC/B;MACA,MAAMC,WAAW,GAChBX,uBAAuB,CAAC,CAAC,KAAK,UAAU,IAAID,SAAS,CAAC,CAAC;MAExD,IAAK,CAAEY,WAAW,EAAG;QACpB;MACD;MAEA,IAAK,CAAED,KAAK,CAACE,gBAAgB,EAAG;QAC/BF,KAAK,CAACG,cAAc,CAAC,CAAC;QAEtB,MAAM;UAAEC;QAAkC,CAAC,GAAGhB,WAAW,CAAC,CAAC;QAE3D,IACC,OAAOgB,iCAAiC,KAAK,UAAU,EACtD;UACDA,iCAAiC,CAAE,KAAM,CAAC;QAC3C;QACAV,uBAAuB,CAAE,MAAO,CAAC;QACjCC,cAAc,CAAC,CAAC;MACjB;IACD;IAEAG,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,CACCX,WAAW,EACXM,uBAAuB,EACvBJ,uBAAuB,EACvBD,SAAS,EACTM,cAAc,CAEhB,CAAC;AACF","ignoreList":[]}
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = Shuffle;
|
|
7
|
-
var _icons = require("@wordpress/icons");
|
|
8
|
-
var _components = require("@wordpress/components");
|
|
9
|
-
var _i18n = require("@wordpress/i18n");
|
|
10
|
-
var _element = require("@wordpress/element");
|
|
11
|
-
var _data = require("@wordpress/data");
|
|
12
|
-
var _store = require("../../store");
|
|
13
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
-
/**
|
|
15
|
-
* WordPress dependencies
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Internal dependencies
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
const EMPTY_ARRAY = [];
|
|
23
|
-
function Container(props) {
|
|
24
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.ToolbarGroup, {
|
|
25
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.ToolbarButton, {
|
|
26
|
-
...props
|
|
27
|
-
})
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
function Shuffle({
|
|
31
|
-
clientId,
|
|
32
|
-
as = Container
|
|
33
|
-
}) {
|
|
34
|
-
const {
|
|
35
|
-
categories,
|
|
36
|
-
patterns,
|
|
37
|
-
patternName
|
|
38
|
-
} = (0, _data.useSelect)(select => {
|
|
39
|
-
const {
|
|
40
|
-
getBlockAttributes,
|
|
41
|
-
getBlockRootClientId,
|
|
42
|
-
__experimentalGetAllowedPatterns
|
|
43
|
-
} = select(_store.store);
|
|
44
|
-
const attributes = getBlockAttributes(clientId);
|
|
45
|
-
const _categories = attributes?.metadata?.categories || EMPTY_ARRAY;
|
|
46
|
-
const _patternName = attributes?.metadata?.patternName;
|
|
47
|
-
const rootBlock = getBlockRootClientId(clientId);
|
|
48
|
-
|
|
49
|
-
// Calling `__experimentalGetAllowedPatterns` is expensive.
|
|
50
|
-
// Checking if the block can be shuffled prevents unnecessary selector calls.
|
|
51
|
-
// See: https://github.com/WordPress/gutenberg/pull/64736.
|
|
52
|
-
const _patterns = _categories.length > 0 ? __experimentalGetAllowedPatterns(rootBlock) : EMPTY_ARRAY;
|
|
53
|
-
return {
|
|
54
|
-
categories: _categories,
|
|
55
|
-
patterns: _patterns,
|
|
56
|
-
patternName: _patternName
|
|
57
|
-
};
|
|
58
|
-
}, [clientId]);
|
|
59
|
-
const {
|
|
60
|
-
replaceBlocks
|
|
61
|
-
} = (0, _data.useDispatch)(_store.store);
|
|
62
|
-
const sameCategoryPatternsWithSingleWrapper = (0, _element.useMemo)(() => {
|
|
63
|
-
if (categories.length === 0 || !patterns || patterns.length === 0) {
|
|
64
|
-
return EMPTY_ARRAY;
|
|
65
|
-
}
|
|
66
|
-
return patterns.filter(pattern => {
|
|
67
|
-
const isCorePattern = pattern.source === 'core' || pattern.source?.startsWith('pattern-directory') && pattern.source !== 'pattern-directory/theme';
|
|
68
|
-
return (
|
|
69
|
-
// Check if the pattern has only one top level block,
|
|
70
|
-
// otherwise we may shuffle to pattern that will not allow to continue shuffling.
|
|
71
|
-
pattern.blocks.length === 1 &&
|
|
72
|
-
// We exclude the core patterns and pattern directory patterns that are not theme patterns.
|
|
73
|
-
!isCorePattern && pattern.categories?.some(category => {
|
|
74
|
-
return categories.includes(category);
|
|
75
|
-
}) && (
|
|
76
|
-
// Check if the pattern is not a synced pattern.
|
|
77
|
-
pattern.syncStatus === 'unsynced' || !pattern.id)
|
|
78
|
-
);
|
|
79
|
-
});
|
|
80
|
-
}, [categories, patterns]);
|
|
81
|
-
if (sameCategoryPatternsWithSingleWrapper.length < 2) {
|
|
82
|
-
return null;
|
|
83
|
-
}
|
|
84
|
-
function getNextPattern() {
|
|
85
|
-
const numberOfPatterns = sameCategoryPatternsWithSingleWrapper.length;
|
|
86
|
-
const patternIndex = sameCategoryPatternsWithSingleWrapper.findIndex(({
|
|
87
|
-
name
|
|
88
|
-
}) => name === patternName);
|
|
89
|
-
const nextPatternIndex = patternIndex + 1 < numberOfPatterns ? patternIndex + 1 : 0;
|
|
90
|
-
return sameCategoryPatternsWithSingleWrapper[nextPatternIndex];
|
|
91
|
-
}
|
|
92
|
-
const ComponentToUse = as;
|
|
93
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(ComponentToUse, {
|
|
94
|
-
label: (0, _i18n.__)('Shuffle'),
|
|
95
|
-
icon: _icons.shuffle,
|
|
96
|
-
className: "block-editor-block-toolbar-shuffle",
|
|
97
|
-
onClick: () => {
|
|
98
|
-
const nextPattern = getNextPattern();
|
|
99
|
-
nextPattern.blocks[0].attributes = {
|
|
100
|
-
...nextPattern.blocks[0].attributes,
|
|
101
|
-
metadata: {
|
|
102
|
-
...nextPattern.blocks[0].attributes.metadata,
|
|
103
|
-
categories
|
|
104
|
-
}
|
|
105
|
-
};
|
|
106
|
-
replaceBlocks(clientId, nextPattern.blocks);
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
//# sourceMappingURL=shuffle.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_icons","require","_components","_i18n","_element","_data","_store","_jsxRuntime","EMPTY_ARRAY","Container","props","jsx","ToolbarGroup","children","ToolbarButton","Shuffle","clientId","as","categories","patterns","patternName","useSelect","select","getBlockAttributes","getBlockRootClientId","__experimentalGetAllowedPatterns","blockEditorStore","attributes","_categories","metadata","_patternName","rootBlock","_patterns","length","replaceBlocks","useDispatch","sameCategoryPatternsWithSingleWrapper","useMemo","filter","pattern","isCorePattern","source","startsWith","blocks","some","category","includes","syncStatus","id","getNextPattern","numberOfPatterns","patternIndex","findIndex","name","nextPatternIndex","ComponentToUse","label","__","icon","shuffle","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":";;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AAKA,IAAAK,MAAA,GAAAL,OAAA;AAAwD,IAAAM,WAAA,GAAAN,OAAA;AAZxD;AACA;AACA;;AAOA;AACA;AACA;;AAGA,MAAMO,WAAW,GAAG,EAAE;AAEtB,SAASC,SAASA,CAAEC,KAAK,EAAG;EAC3B,oBACC,IAAAH,WAAA,CAAAI,GAAA,EAACT,WAAA,CAAAU,YAAY;IAAAC,QAAA,eACZ,IAAAN,WAAA,CAAAI,GAAA,EAACT,WAAA,CAAAY,aAAa;MAAA,GAAMJ;IAAK,CAAI;EAAC,CACjB,CAAC;AAEjB;AAEe,SAASK,OAAOA,CAAE;EAAEC,QAAQ;EAAEC,EAAE,GAAGR;AAAU,CAAC,EAAG;EAC/D,MAAM;IAAES,UAAU;IAAEC,QAAQ;IAAEC;EAAY,CAAC,GAAG,IAAAC,eAAS,EACpDC,MAAM,IAAM;IACb,MAAM;MACLC,kBAAkB;MAClBC,oBAAoB;MACpBC;IACD,CAAC,GAAGH,MAAM,CAAEI,YAAiB,CAAC;IAC9B,MAAMC,UAAU,GAAGJ,kBAAkB,CAAEP,QAAS,CAAC;IACjD,MAAMY,WAAW,GAAGD,UAAU,EAAEE,QAAQ,EAAEX,UAAU,IAAIV,WAAW;IACnE,MAAMsB,YAAY,GAAGH,UAAU,EAAEE,QAAQ,EAAET,WAAW;IACtD,MAAMW,SAAS,GAAGP,oBAAoB,CAAER,QAAS,CAAC;;IAElD;IACA;IACA;IACA,MAAMgB,SAAS,GACdJ,WAAW,CAACK,MAAM,GAAG,CAAC,GACnBR,gCAAgC,CAAEM,SAAU,CAAC,GAC7CvB,WAAW;IACf,OAAO;MACNU,UAAU,EAAEU,WAAW;MACvBT,QAAQ,EAAEa,SAAS;MACnBZ,WAAW,EAAEU;IACd,CAAC;EACF,CAAC,EACD,CAAEd,QAAQ,CACX,CAAC;EACD,MAAM;IAAEkB;EAAc,CAAC,GAAG,IAAAC,iBAAW,EAAET,YAAiB,CAAC;EACzD,MAAMU,qCAAqC,GAAG,IAAAC,gBAAO,EAAE,MAAM;IAC5D,IAAKnB,UAAU,CAACe,MAAM,KAAK,CAAC,IAAI,CAAEd,QAAQ,IAAIA,QAAQ,CAACc,MAAM,KAAK,CAAC,EAAG;MACrE,OAAOzB,WAAW;IACnB;IACA,OAAOW,QAAQ,CAACmB,MAAM,CAAIC,OAAO,IAAM;MACtC,MAAMC,aAAa,GAClBD,OAAO,CAACE,MAAM,KAAK,MAAM,IACvBF,OAAO,CAACE,MAAM,EAAEC,UAAU,CAAE,mBAAoB,CAAC,IAClDH,OAAO,CAACE,MAAM,KAAK,yBAA2B;MAChD;QACC;QACA;QACAF,OAAO,CAACI,MAAM,CAACV,MAAM,KAAK,CAAC;QAC3B;QACA,CAAEO,aAAa,IACfD,OAAO,CAACrB,UAAU,EAAE0B,IAAI,CAAIC,QAAQ,IAAM;UACzC,OAAO3B,UAAU,CAAC4B,QAAQ,CAAED,QAAS,CAAC;QACvC,CAAE,CAAC;QACH;QACEN,OAAO,CAACQ,UAAU,KAAK,UAAU,IAAI,CAAER,OAAO,CAACS,EAAE;MAAE;IAEvD,CAAE,CAAC;EACJ,CAAC,EAAE,CAAE9B,UAAU,EAAEC,QAAQ,CAAG,CAAC;EAE7B,IAAKiB,qCAAqC,CAACH,MAAM,GAAG,CAAC,EAAG;IACvD,OAAO,IAAI;EACZ;EAEA,SAASgB,cAAcA,CAAA,EAAG;IACzB,MAAMC,gBAAgB,GAAGd,qCAAqC,CAACH,MAAM;IACrE,MAAMkB,YAAY,GAAGf,qCAAqC,CAACgB,SAAS,CACnE,CAAE;MAAEC;IAAK,CAAC,KAAMA,IAAI,KAAKjC,WAC1B,CAAC;IACD,MAAMkC,gBAAgB,GACrBH,YAAY,GAAG,CAAC,GAAGD,gBAAgB,GAAGC,YAAY,GAAG,CAAC,GAAG,CAAC;IAC3D,OAAOf,qCAAqC,CAAEkB,gBAAgB,CAAE;EACjE;EAEA,MAAMC,cAAc,GAAGtC,EAAE;EACzB,oBACC,IAAAV,WAAA,CAAAI,GAAA,EAAC4C,cAAc;IACdC,KAAK,EAAG,IAAAC,QAAE,EAAE,SAAU,CAAG;IACzBC,IAAI,EAAGC,cAAS;IAChBC,SAAS,EAAC,oCAAoC;IAC9CC,OAAO,EAAGA,CAAA,KAAM;MACf,MAAMC,WAAW,GAAGb,cAAc,CAAC,CAAC;MACpCa,WAAW,CAACnB,MAAM,CAAE,CAAC,CAAE,CAAChB,UAAU,GAAG;QACpC,GAAGmC,WAAW,CAACnB,MAAM,CAAE,CAAC,CAAE,CAAChB,UAAU;QACrCE,QAAQ,EAAE;UACT,GAAGiC,WAAW,CAACnB,MAAM,CAAE,CAAC,CAAE,CAAChB,UAAU,CAACE,QAAQ;UAC9CX;QACD;MACD,CAAC;MACDgB,aAAa,CAAElB,QAAQ,EAAE8C,WAAW,CAACnB,MAAO,CAAC;IAC9C;EAAG,CACH,CAAC;AAEJ","ignoreList":[]}
|
|
@@ -1,58 +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 = ZoomOutPopover;
|
|
8
|
-
var _clsx = _interopRequireDefault(require("clsx"));
|
|
9
|
-
var _blockPopover = require("../block-popover");
|
|
10
|
-
var _useBlockToolbarPopoverProps = _interopRequireDefault(require("./use-block-toolbar-popover-props"));
|
|
11
|
-
var _useSelectedBlockToolProps = _interopRequireDefault(require("./use-selected-block-tool-props"));
|
|
12
|
-
var _zoomOutToolbar = _interopRequireDefault(require("./zoom-out-toolbar"));
|
|
13
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
-
/**
|
|
15
|
-
* External dependencies
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Internal dependencies
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
function ZoomOutPopover({
|
|
23
|
-
clientId,
|
|
24
|
-
__unstableContentRef
|
|
25
|
-
}) {
|
|
26
|
-
const {
|
|
27
|
-
capturingClientId,
|
|
28
|
-
isInsertionPointVisible,
|
|
29
|
-
lastClientId
|
|
30
|
-
} = (0, _useSelectedBlockToolProps.default)(clientId);
|
|
31
|
-
const popoverProps = (0, _useBlockToolbarPopoverProps.default)({
|
|
32
|
-
contentElement: __unstableContentRef?.current,
|
|
33
|
-
clientId
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
// Override some of the popover props for the zoom-out toolbar.
|
|
37
|
-
const props = {
|
|
38
|
-
...popoverProps,
|
|
39
|
-
placement: 'left-start',
|
|
40
|
-
flip: false,
|
|
41
|
-
shift: true
|
|
42
|
-
};
|
|
43
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockPopover.PrivateBlockPopover, {
|
|
44
|
-
__unstableContentRef: __unstableContentRef,
|
|
45
|
-
clientId: capturingClientId || clientId,
|
|
46
|
-
bottomClientId: lastClientId,
|
|
47
|
-
className: (0, _clsx.default)('zoom-out-toolbar-popover', {
|
|
48
|
-
'is-insertion-point-visible': isInsertionPointVisible
|
|
49
|
-
}),
|
|
50
|
-
resize: false,
|
|
51
|
-
...props,
|
|
52
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_zoomOutToolbar.default, {
|
|
53
|
-
__unstableContentRef: __unstableContentRef,
|
|
54
|
-
clientId: clientId
|
|
55
|
-
})
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
//# sourceMappingURL=zoom-out-popover.js.map
|