@wordpress/block-editor 11.2.0 → 11.3.1
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 +5 -0
- package/README.md +28 -4
- package/build/components/alignment-control/ui.js +1 -1
- package/build/components/alignment-control/ui.js.map +1 -1
- package/build/components/autocomplete/index.js +2 -7
- package/build/components/autocomplete/index.js.map +1 -1
- package/build/components/block-actions/index.js +7 -2
- package/build/components/block-actions/index.js.map +1 -1
- package/build/components/block-alignment-matrix-control/index.js +2 -2
- package/build/components/block-alignment-matrix-control/index.js.map +1 -1
- package/build/components/block-card/index.js +2 -4
- package/build/components/block-card/index.js.map +1 -1
- package/build/components/block-edit/index.js +8 -0
- package/build/components/block-edit/index.js.map +1 -1
- package/build/components/block-inspector/index.js +15 -14
- package/build/components/block-inspector/index.js.map +1 -1
- package/build/components/block-list/use-in-between-inserter.js +5 -0
- package/build/components/block-list/use-in-between-inserter.js.map +1 -1
- package/build/components/block-lock/modal.js +0 -1
- package/build/components/block-lock/modal.js.map +1 -1
- package/build/components/block-mover/mover-description.js +2 -2
- package/build/components/block-mover/mover-description.js.map +1 -1
- package/build/components/block-navigation/dropdown.js +3 -1
- package/build/components/block-navigation/dropdown.js.map +1 -1
- package/build/components/block-pattern-setup/index.js +1 -1
- package/build/components/block-pattern-setup/index.js.map +1 -1
- package/build/components/block-pattern-setup/use-patterns-setup.js +2 -2
- package/build/components/block-pattern-setup/use-patterns-setup.js.map +1 -1
- package/build/components/block-patterns-list/index.js +31 -3
- package/build/components/block-patterns-list/index.js.map +1 -1
- package/build/components/block-preview/auto.js +9 -11
- package/build/components/block-preview/auto.js.map +1 -1
- package/build/components/block-preview/index.js +32 -8
- package/build/components/block-preview/index.js.map +1 -1
- package/build/components/block-selection-clearer/index.js +1 -1
- package/build/components/block-selection-clearer/index.js.map +1 -1
- package/build/components/block-settings/container.native.js +7 -33
- package/build/components/block-settings/container.native.js.map +1 -1
- package/build/components/block-settings-menu/block-settings-dropdown.js +12 -6
- package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build/components/block-settings-menu-controls/index.js +2 -8
- package/build/components/block-settings-menu-controls/index.js.map +1 -1
- package/build/components/block-switcher/utils.js +1 -1
- package/build/components/block-switcher/utils.js.map +1 -1
- package/build/components/block-tools/selected-block-popover.js +55 -47
- package/build/components/block-tools/selected-block-popover.js.map +1 -1
- package/build/components/block-vertical-alignment-control/icons.js +15 -1
- package/build/components/block-vertical-alignment-control/icons.js.map +1 -1
- package/build/components/block-vertical-alignment-control/ui.js +9 -4
- package/build/components/block-vertical-alignment-control/ui.js.map +1 -1
- package/build/components/color-style-selector/index.js +3 -1
- package/build/components/color-style-selector/index.js.map +1 -1
- package/build/components/date-format-picker/index.js +3 -4
- package/build/components/date-format-picker/index.js.map +1 -1
- package/build/components/font-family/index.js +1 -7
- package/build/components/font-family/index.js.map +1 -1
- package/build/components/font-sizes/fluid-utils.js +1 -1
- package/build/components/font-sizes/fluid-utils.js.map +1 -1
- package/build/components/font-sizes/utils.js +1 -1
- package/build/components/font-sizes/utils.js.map +1 -1
- package/build/components/global-styles/context.js +22 -0
- package/build/components/global-styles/context.js.map +1 -0
- package/build/components/global-styles/hooks.js +142 -0
- package/build/components/global-styles/hooks.js.map +1 -0
- package/build/components/global-styles/index.js +42 -0
- package/build/components/global-styles/index.js.map +1 -0
- package/build/components/global-styles/typography-utils.js +92 -0
- package/build/components/global-styles/typography-utils.js.map +1 -0
- package/build/components/global-styles/use-global-styles-output.js +974 -0
- package/build/components/global-styles/use-global-styles-output.js.map +1 -0
- package/build/components/global-styles/utils.js +340 -0
- package/build/components/global-styles/utils.js.map +1 -0
- package/build/components/height-control/index.js +13 -1
- package/build/components/height-control/index.js.map +1 -1
- package/build/components/iframe/index.js +5 -3
- package/build/components/iframe/index.js.map +1 -1
- package/build/components/image-editor/constants.js +1 -1
- package/build/components/image-editor/constants.js.map +1 -1
- package/build/components/image-editor/context.js +1 -2
- package/build/components/image-editor/context.js.map +1 -1
- package/build/components/image-editor/cropper.js +3 -1
- package/build/components/image-editor/cropper.js.map +1 -1
- package/build/components/image-editor/index.js +13 -9
- package/build/components/image-editor/index.js.map +1 -1
- package/build/components/image-editor/use-transform-image.js +11 -35
- package/build/components/image-editor/use-transform-image.js.map +1 -1
- package/build/components/image-size-control/index.js +1 -7
- package/build/components/image-size-control/index.js.map +1 -1
- package/build/components/index.js +8 -24
- package/build/components/index.js.map +1 -1
- package/build/components/inner-blocks/index.js +22 -32
- package/build/components/inner-blocks/index.js.map +1 -1
- package/build/components/inner-blocks/index.native.js +8 -23
- package/build/components/inner-blocks/index.native.js.map +1 -1
- package/build/components/inner-blocks/use-block-context.js +53 -0
- package/build/components/inner-blocks/use-block-context.js.map +1 -0
- package/build/components/inserter/block-patterns-explorer/explorer.js +0 -1
- package/build/components/inserter/block-patterns-explorer/explorer.js.map +1 -1
- package/build/components/inserter/block-patterns-tab.js +9 -2
- package/build/components/inserter/block-patterns-tab.js.map +1 -1
- package/build/components/inserter/block-types-tab.js +2 -2
- package/build/components/inserter/block-types-tab.js.map +1 -1
- package/build/components/inserter/hooks/use-patterns-state.js +1 -7
- package/build/components/inserter/hooks/use-patterns-state.js.map +1 -1
- package/build/components/inserter/index.js +5 -4
- package/build/components/inserter/index.js.map +1 -1
- package/build/components/inserter/media-tab/hooks.js +142 -56
- package/build/components/inserter/media-tab/hooks.js.map +1 -1
- package/build/components/inserter/media-tab/media-list.js +74 -21
- package/build/components/inserter/media-tab/media-list.js.map +1 -1
- package/build/components/inserter/media-tab/media-panel.js +11 -13
- package/build/components/inserter/media-tab/media-panel.js.map +1 -1
- package/build/components/inserter/media-tab/media-tab.js +6 -3
- package/build/components/inserter/media-tab/media-tab.js.map +1 -1
- package/build/components/inserter/media-tab/utils.js +26 -15
- package/build/components/inserter/media-tab/utils.js.map +1 -1
- package/build/components/inserter/menu.js +4 -0
- package/build/components/inserter/menu.js.map +1 -1
- package/build/components/inserter/preview-panel.js +5 -3
- package/build/components/inserter/preview-panel.js.map +1 -1
- package/build/components/inserter/search-results.js +2 -7
- package/build/components/inserter/search-results.js.map +1 -1
- package/build/components/inserter-list-item/index.js +1 -9
- package/build/components/inserter-list-item/index.js.map +1 -1
- package/build/components/inspector-controls/fill.js +15 -2
- package/build/components/inspector-controls/fill.js.map +1 -1
- package/build/components/inspector-controls/fill.native.js +14 -1
- package/build/components/inspector-controls/fill.native.js.map +1 -1
- package/build/components/inspector-controls/groups.js +4 -0
- package/build/components/inspector-controls/groups.js.map +1 -1
- package/build/components/inspector-controls/index.js +2 -2
- package/build/components/inspector-controls/index.js.map +1 -1
- package/build/components/inspector-controls/slot.js +14 -1
- package/build/components/inspector-controls/slot.js.map +1 -1
- package/build/components/inspector-controls/slot.native.js +14 -1
- package/build/components/inspector-controls/slot.native.js.map +1 -1
- package/build/components/inspector-controls-tabs/advanced-controls-panel.js +1 -1
- package/build/components/inspector-controls-tabs/advanced-controls-panel.js.map +1 -1
- package/build/components/inspector-controls-tabs/index.js +2 -2
- package/build/components/inspector-controls-tabs/index.js.map +1 -1
- package/build/components/inspector-controls-tabs/position-controls-panel.js +1 -1
- package/build/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
- package/build/components/inspector-controls-tabs/styles-tab.js +6 -4
- package/build/components/inspector-controls-tabs/styles-tab.js.map +1 -1
- package/build/components/inspector-controls-tabs/use-inspector-controls-tabs.js +17 -12
- package/build/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +1 -1
- package/build/components/justify-content-control/ui.js +8 -1
- package/build/components/justify-content-control/ui.js.map +1 -1
- package/build/components/link-control/index.js +45 -17
- package/build/components/link-control/index.js.map +1 -1
- package/build/components/list-view/block.js +1 -1
- package/build/components/list-view/block.js.map +1 -1
- package/build/components/list-view/use-list-view-drop-zone.js +1 -1
- package/build/components/list-view/use-list-view-drop-zone.js.map +1 -1
- package/build/components/media-upload/index.native.js +4 -1
- package/build/components/media-upload/index.native.js.map +1 -1
- package/build/components/off-canvas-editor/appender.js +50 -3
- package/build/components/off-canvas-editor/appender.js.map +1 -1
- package/build/components/off-canvas-editor/block-contents.js +3 -1
- package/build/components/off-canvas-editor/block-contents.js.map +1 -1
- package/build/components/off-canvas-editor/block-select-button.js +10 -4
- package/build/components/off-canvas-editor/block-select-button.js.map +1 -1
- package/build/components/off-canvas-editor/block.js +6 -27
- package/build/components/off-canvas-editor/block.js.map +1 -1
- package/build/components/off-canvas-editor/branch.js +25 -10
- package/build/components/off-canvas-editor/branch.js.map +1 -1
- package/build/components/off-canvas-editor/index.js +27 -20
- package/build/components/off-canvas-editor/index.js.map +1 -1
- package/build/components/off-canvas-editor/link-ui.js +2 -2
- package/build/components/off-canvas-editor/link-ui.js.map +1 -1
- package/build/components/off-canvas-editor/use-list-view-drop-zone.js +1 -1
- package/build/components/off-canvas-editor/use-list-view-drop-zone.js.map +1 -1
- package/build/components/provider/index.js +21 -9
- package/build/components/provider/index.js.map +1 -1
- package/build/components/provider/index.native.js +5 -6
- package/build/components/provider/index.native.js.map +1 -1
- package/build/components/rich-text/use-before-input-rules.js +11 -3
- package/build/components/rich-text/use-before-input-rules.js.map +1 -1
- package/build/components/rich-text/utils.js +1 -1
- package/build/components/rich-text/utils.js.map +1 -1
- package/build/components/spacing-sizes-control/utils.js +2 -8
- package/build/components/spacing-sizes-control/utils.js.map +1 -1
- package/build/components/tool-selector/index.js +3 -1
- package/build/components/tool-selector/index.js.map +1 -1
- package/build/components/url-popover/image-url-input-ui.js +7 -8
- package/build/components/url-popover/image-url-input-ui.js.map +1 -1
- package/build/components/use-block-display-information/index.js +1 -1
- package/build/components/use-block-display-information/index.js.map +1 -1
- package/build/experiments.js +45 -0
- package/build/experiments.js.map +1 -0
- package/build/experiments.native.js +40 -0
- package/build/experiments.native.js.map +1 -0
- package/build/hooks/anchor.js +2 -1
- package/build/hooks/anchor.js.map +1 -1
- package/build/hooks/border.js +1 -1
- package/build/hooks/border.js.map +1 -1
- package/build/hooks/child-layout.js +5 -1
- package/build/hooks/child-layout.js.map +1 -1
- package/build/hooks/color-panel.js +1 -1
- package/build/hooks/color-panel.js.map +1 -1
- package/build/hooks/color.js +3 -3
- package/build/hooks/color.js.map +1 -1
- package/build/hooks/custom-class-name.js +2 -1
- package/build/hooks/custom-class-name.js.map +1 -1
- package/build/hooks/dimensions.js +7 -5
- package/build/hooks/dimensions.js.map +1 -1
- package/build/hooks/margin.js +1 -0
- package/build/hooks/margin.js.map +1 -1
- package/build/hooks/padding.js +1 -0
- package/build/hooks/padding.js.map +1 -1
- package/build/hooks/position.js +39 -17
- package/build/hooks/position.js.map +1 -1
- package/build/hooks/typography.js +1 -1
- package/build/hooks/typography.js.map +1 -1
- package/build/hooks/use-color-props.js +3 -3
- package/build/hooks/use-color-props.js.map +1 -1
- package/build/hooks/utils.js +69 -3
- package/build/hooks/utils.js.map +1 -1
- package/build/index.js +10 -1
- package/build/index.js.map +1 -1
- package/build/layouts/constrained.js +3 -0
- package/build/layouts/constrained.js.map +1 -1
- package/build/layouts/flex.js +59 -9
- package/build/layouts/flex.js.map +1 -1
- package/build/layouts/flow.js +0 -18
- package/build/layouts/flow.js.map +1 -1
- package/build/store/actions.js +3 -30
- package/build/store/actions.js.map +1 -1
- package/build/store/defaults.js +5 -2
- package/build/store/defaults.js.map +1 -1
- package/build/store/index.js +11 -2
- package/build/store/index.js.map +1 -1
- package/build/store/private-actions.js +78 -0
- package/build/store/private-actions.js.map +1 -0
- package/build/store/private-selectors.js +32 -0
- package/build/store/private-selectors.js.map +1 -0
- package/build/store/reducer.js +1 -1
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +60 -48
- package/build/store/selectors.js.map +1 -1
- package/build/utils/block-variation-transforms.js +1 -1
- package/build/utils/block-variation-transforms.js.map +1 -1
- package/build/utils/parse-css-unit-to-px.js +1 -1
- package/build/utils/parse-css-unit-to-px.js.map +1 -1
- package/build/utils/transform-styles/index.js +1 -7
- package/build/utils/transform-styles/index.js.map +1 -1
- package/build-module/components/alignment-control/ui.js +1 -1
- package/build-module/components/alignment-control/ui.js.map +1 -1
- package/build-module/components/autocomplete/index.js +2 -6
- package/build-module/components/autocomplete/index.js.map +1 -1
- package/build-module/components/block-actions/index.js +7 -2
- package/build-module/components/block-actions/index.js.map +1 -1
- package/build-module/components/block-alignment-matrix-control/index.js +2 -2
- package/build-module/components/block-alignment-matrix-control/index.js.map +1 -1
- package/build-module/components/block-card/index.js +2 -4
- package/build-module/components/block-card/index.js.map +1 -1
- package/build-module/components/block-edit/index.js +7 -0
- package/build-module/components/block-edit/index.js.map +1 -1
- package/build-module/components/block-inspector/index.js +15 -14
- package/build-module/components/block-inspector/index.js.map +1 -1
- package/build-module/components/block-list/use-in-between-inserter.js +5 -0
- package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
- package/build-module/components/block-lock/modal.js +0 -1
- package/build-module/components/block-lock/modal.js.map +1 -1
- package/build-module/components/block-mover/mover-description.js +2 -2
- package/build-module/components/block-mover/mover-description.js.map +1 -1
- package/build-module/components/block-navigation/dropdown.js +3 -1
- package/build-module/components/block-navigation/dropdown.js.map +1 -1
- package/build-module/components/block-pattern-setup/index.js +1 -1
- package/build-module/components/block-pattern-setup/index.js.map +1 -1
- package/build-module/components/block-pattern-setup/use-patterns-setup.js +2 -2
- package/build-module/components/block-pattern-setup/use-patterns-setup.js.map +1 -1
- package/build-module/components/block-patterns-list/index.js +32 -3
- package/build-module/components/block-patterns-list/index.js.map +1 -1
- package/build-module/components/block-preview/auto.js +9 -11
- package/build-module/components/block-preview/auto.js.map +1 -1
- package/build-module/components/block-preview/index.js +31 -8
- package/build-module/components/block-preview/index.js.map +1 -1
- package/build-module/components/block-selection-clearer/index.js +1 -1
- package/build-module/components/block-selection-clearer/index.js.map +1 -1
- package/build-module/components/block-settings/container.native.js +6 -30
- package/build-module/components/block-settings/container.native.js.map +1 -1
- package/build-module/components/block-settings-menu/block-settings-dropdown.js +12 -6
- package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build-module/components/block-settings-menu-controls/index.js +2 -7
- package/build-module/components/block-settings-menu-controls/index.js.map +1 -1
- package/build-module/components/block-switcher/utils.js +1 -1
- package/build-module/components/block-switcher/utils.js.map +1 -1
- package/build-module/components/block-tools/selected-block-popover.js +55 -48
- package/build-module/components/block-tools/selected-block-popover.js.map +1 -1
- package/build-module/components/block-vertical-alignment-control/icons.js +12 -0
- package/build-module/components/block-vertical-alignment-control/icons.js.map +1 -1
- package/build-module/components/block-vertical-alignment-control/ui.js +10 -5
- package/build-module/components/block-vertical-alignment-control/ui.js.map +1 -1
- package/build-module/components/color-style-selector/index.js +3 -1
- package/build-module/components/color-style-selector/index.js.map +1 -1
- package/build-module/components/date-format-picker/index.js +4 -5
- package/build-module/components/date-format-picker/index.js.map +1 -1
- package/build-module/components/font-family/index.js +1 -6
- package/build-module/components/font-family/index.js.map +1 -1
- package/build-module/components/font-sizes/fluid-utils.js +1 -1
- package/build-module/components/font-sizes/fluid-utils.js.map +1 -1
- package/build-module/components/font-sizes/utils.js +1 -1
- package/build-module/components/font-sizes/utils.js.map +1 -1
- package/build-module/components/global-styles/context.js +12 -0
- package/build-module/components/global-styles/context.js.map +1 -0
- package/build-module/components/global-styles/hooks.js +121 -0
- package/build-module/components/global-styles/hooks.js.map +1 -0
- package/build-module/components/global-styles/index.js +4 -0
- package/build-module/components/global-styles/index.js.map +1 -0
- package/build-module/components/global-styles/typography-utils.js +84 -0
- package/build-module/components/global-styles/typography-utils.js.map +1 -0
- package/build-module/components/global-styles/use-global-styles-output.js +930 -0
- package/build-module/components/global-styles/use-global-styles-output.js.map +1 -0
- package/build-module/components/global-styles/utils.js +321 -0
- package/build-module/components/global-styles/utils.js.map +1 -0
- package/build-module/components/height-control/index.js +14 -1
- package/build-module/components/height-control/index.js.map +1 -1
- package/build-module/components/iframe/index.js +6 -4
- package/build-module/components/iframe/index.js.map +1 -1
- package/build-module/components/image-editor/constants.js +1 -1
- package/build-module/components/image-editor/constants.js.map +1 -1
- package/build-module/components/image-editor/context.js +1 -2
- package/build-module/components/image-editor/context.js.map +1 -1
- package/build-module/components/image-editor/cropper.js +3 -1
- package/build-module/components/image-editor/cropper.js.map +1 -1
- package/build-module/components/image-editor/index.js +13 -3
- package/build-module/components/image-editor/index.js.map +1 -1
- package/build-module/components/image-editor/use-transform-image.js +12 -37
- package/build-module/components/image-editor/use-transform-image.js.map +1 -1
- package/build-module/components/image-size-control/index.js +1 -6
- package/build-module/components/image-size-control/index.js.map +1 -1
- package/build-module/components/index.js +2 -3
- package/build-module/components/index.js.map +1 -1
- package/build-module/components/inner-blocks/index.js +21 -32
- package/build-module/components/inner-blocks/index.js.map +1 -1
- package/build-module/components/inner-blocks/index.native.js +9 -22
- package/build-module/components/inner-blocks/index.native.js.map +1 -1
- package/build-module/components/inner-blocks/use-block-context.js +43 -0
- package/build-module/components/inner-blocks/use-block-context.js.map +1 -0
- package/build-module/components/inserter/block-patterns-explorer/explorer.js +0 -1
- package/build-module/components/inserter/block-patterns-explorer/explorer.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab.js +9 -2
- package/build-module/components/inserter/block-patterns-tab.js.map +1 -1
- package/build-module/components/inserter/block-types-tab.js +3 -3
- package/build-module/components/inserter/block-types-tab.js.map +1 -1
- package/build-module/components/inserter/hooks/use-patterns-state.js +1 -6
- package/build-module/components/inserter/hooks/use-patterns-state.js.map +1 -1
- package/build-module/components/inserter/index.js +5 -4
- package/build-module/components/inserter/index.js.map +1 -1
- package/build-module/components/inserter/media-tab/hooks.js +145 -56
- package/build-module/components/inserter/media-tab/hooks.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-list.js +74 -24
- package/build-module/components/inserter/media-tab/media-list.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-panel.js +14 -14
- package/build-module/components/inserter/media-tab/media-panel.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-tab.js +7 -4
- package/build-module/components/inserter/media-tab/media-tab.js.map +1 -1
- package/build-module/components/inserter/media-tab/utils.js +27 -15
- package/build-module/components/inserter/media-tab/utils.js.map +1 -1
- package/build-module/components/inserter/menu.js +4 -0
- package/build-module/components/inserter/menu.js.map +1 -1
- package/build-module/components/inserter/preview-panel.js +5 -3
- package/build-module/components/inserter/preview-panel.js.map +1 -1
- package/build-module/components/inserter/search-results.js +2 -6
- package/build-module/components/inserter/search-results.js.map +1 -1
- package/build-module/components/inserter-list-item/index.js +1 -9
- package/build-module/components/inserter-list-item/index.js.map +1 -1
- package/build-module/components/inspector-controls/fill.js +14 -2
- package/build-module/components/inspector-controls/fill.js.map +1 -1
- package/build-module/components/inspector-controls/fill.native.js +13 -1
- package/build-module/components/inspector-controls/fill.native.js.map +1 -1
- package/build-module/components/inspector-controls/groups.js +4 -0
- package/build-module/components/inspector-controls/groups.js.map +1 -1
- package/build-module/components/inspector-controls/index.js +2 -2
- package/build-module/components/inspector-controls/index.js.map +1 -1
- package/build-module/components/inspector-controls/slot.js +13 -1
- package/build-module/components/inspector-controls/slot.js.map +1 -1
- package/build-module/components/inspector-controls/slot.native.js +13 -1
- package/build-module/components/inspector-controls/slot.native.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/advanced-controls-panel.js +1 -1
- package/build-module/components/inspector-controls-tabs/advanced-controls-panel.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/index.js +2 -2
- package/build-module/components/inspector-controls-tabs/index.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/position-controls-panel.js +1 -1
- package/build-module/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/styles-tab.js +6 -4
- package/build-module/components/inspector-controls-tabs/styles-tab.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/use-inspector-controls-tabs.js +17 -12
- package/build-module/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +1 -1
- package/build-module/components/justify-content-control/ui.js +9 -2
- package/build-module/components/justify-content-control/ui.js.map +1 -1
- package/build-module/components/link-control/index.js +45 -16
- package/build-module/components/link-control/index.js.map +1 -1
- package/build-module/components/list-view/block.js +1 -1
- package/build-module/components/list-view/block.js.map +1 -1
- package/build-module/components/list-view/use-list-view-drop-zone.js +1 -1
- package/build-module/components/list-view/use-list-view-drop-zone.js.map +1 -1
- package/build-module/components/media-upload/index.native.js +4 -1
- package/build-module/components/media-upload/index.native.js.map +1 -1
- package/build-module/components/off-canvas-editor/appender.js +47 -4
- package/build-module/components/off-canvas-editor/appender.js.map +1 -1
- package/build-module/components/off-canvas-editor/block-contents.js +2 -1
- package/build-module/components/off-canvas-editor/block-contents.js.map +1 -1
- package/build-module/components/off-canvas-editor/block-select-button.js +9 -4
- package/build-module/components/off-canvas-editor/block-select-button.js.map +1 -1
- package/build-module/components/off-canvas-editor/block.js +6 -25
- package/build-module/components/off-canvas-editor/block.js.map +1 -1
- package/build-module/components/off-canvas-editor/branch.js +23 -11
- package/build-module/components/off-canvas-editor/branch.js.map +1 -1
- package/build-module/components/off-canvas-editor/index.js +27 -19
- package/build-module/components/off-canvas-editor/index.js.map +1 -1
- package/build-module/components/off-canvas-editor/link-ui.js +2 -2
- package/build-module/components/off-canvas-editor/link-ui.js.map +1 -1
- package/build-module/components/off-canvas-editor/use-list-view-drop-zone.js +1 -1
- package/build-module/components/off-canvas-editor/use-list-view-drop-zone.js.map +1 -1
- package/build-module/components/provider/index.js +16 -9
- package/build-module/components/provider/index.js.map +1 -1
- package/build-module/components/provider/index.native.js +4 -4
- package/build-module/components/provider/index.native.js.map +1 -1
- package/build-module/components/rich-text/use-before-input-rules.js +10 -2
- package/build-module/components/rich-text/use-before-input-rules.js.map +1 -1
- package/build-module/components/rich-text/utils.js +1 -1
- package/build-module/components/rich-text/utils.js.map +1 -1
- package/build-module/components/spacing-sizes-control/utils.js +2 -7
- package/build-module/components/spacing-sizes-control/utils.js.map +1 -1
- package/build-module/components/tool-selector/index.js +3 -1
- package/build-module/components/tool-selector/index.js.map +1 -1
- package/build-module/components/url-popover/image-url-input-ui.js +8 -8
- package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
- package/build-module/components/use-block-display-information/index.js +1 -1
- package/build-module/components/use-block-display-information/index.js.map +1 -1
- package/build-module/experiments.js +25 -0
- package/build-module/experiments.js.map +1 -0
- package/build-module/experiments.native.js +23 -0
- package/build-module/experiments.native.js.map +1 -0
- package/build-module/hooks/anchor.js +2 -1
- package/build-module/hooks/anchor.js.map +1 -1
- package/build-module/hooks/border.js +1 -1
- package/build-module/hooks/border.js.map +1 -1
- package/build-module/hooks/child-layout.js +5 -1
- package/build-module/hooks/child-layout.js.map +1 -1
- package/build-module/hooks/color-panel.js +1 -1
- package/build-module/hooks/color-panel.js.map +1 -1
- package/build-module/hooks/color.js +3 -3
- package/build-module/hooks/color.js.map +1 -1
- package/build-module/hooks/custom-class-name.js +2 -1
- package/build-module/hooks/custom-class-name.js.map +1 -1
- package/build-module/hooks/dimensions.js +6 -5
- package/build-module/hooks/dimensions.js.map +1 -1
- package/build-module/hooks/margin.js +1 -0
- package/build-module/hooks/margin.js.map +1 -1
- package/build-module/hooks/padding.js +1 -0
- package/build-module/hooks/padding.js.map +1 -1
- package/build-module/hooks/position.js +36 -16
- package/build-module/hooks/position.js.map +1 -1
- package/build-module/hooks/typography.js +1 -1
- package/build-module/hooks/typography.js.map +1 -1
- package/build-module/hooks/use-color-props.js +3 -3
- package/build-module/hooks/use-color-props.js.map +1 -1
- package/build-module/hooks/utils.js +70 -4
- package/build-module/hooks/utils.js.map +1 -1
- package/build-module/index.js +1 -0
- package/build-module/index.js.map +1 -1
- package/build-module/layouts/constrained.js +3 -0
- package/build-module/layouts/constrained.js.map +1 -1
- package/build-module/layouts/flex.js +60 -10
- package/build-module/layouts/flex.js.map +1 -1
- package/build-module/layouts/flow.js +0 -18
- package/build-module/layouts/flow.js.map +1 -1
- package/build-module/store/actions.js +2 -26
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/defaults.js +5 -2
- package/build-module/store/defaults.js.map +1 -1
- package/build-module/store/index.js +8 -2
- package/build-module/store/index.js.map +1 -1
- package/build-module/store/private-actions.js +66 -0
- package/build-module/store/private-actions.js.map +1 -0
- package/build-module/store/private-selectors.js +23 -0
- package/build-module/store/private-selectors.js.map +1 -0
- package/build-module/store/reducer.js +1 -1
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +48 -37
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/utils/block-variation-transforms.js +1 -1
- package/build-module/utils/block-variation-transforms.js.map +1 -1
- package/build-module/utils/parse-css-unit-to-px.js +1 -1
- package/build-module/utils/parse-css-unit-to-px.js.map +1 -1
- package/build-module/utils/transform-styles/index.js +1 -6
- package/build-module/utils/transform-styles/index.js.map +1 -1
- package/build-style/content-rtl.css +283 -3
- package/build-style/content.css +283 -3
- package/build-style/style-rtl.css +105 -221
- package/build-style/style.css +105 -221
- package/package.json +30 -29
- package/src/components/alignment-control/test/__snapshots__/index.js.snap +3 -3
- package/src/components/alignment-control/test/index.js +5 -15
- package/src/components/alignment-control/ui.js +1 -1
- package/src/components/autocomplete/index.js +3 -6
- package/src/components/block-actions/index.js +9 -0
- package/src/components/block-alignment-control/test/index.js +3 -11
- package/src/components/block-alignment-matrix-control/index.js +1 -2
- package/src/components/block-card/index.js +1 -4
- package/src/components/block-content-overlay/content.scss +4 -4
- package/src/components/block-edit/index.js +15 -1
- package/src/components/block-icon/content.scss +31 -0
- package/src/components/block-inspector/index.js +13 -17
- package/src/components/block-list/use-in-between-inserter.js +5 -0
- package/src/components/block-lock/modal.js +0 -1
- package/src/components/block-mover/mover-description.js +2 -2
- package/src/components/block-mover/stories/index.js +3 -3
- package/src/components/block-navigation/dropdown.js +1 -1
- package/src/components/block-pattern-setup/index.js +1 -4
- package/src/components/block-pattern-setup/use-patterns-setup.js +2 -5
- package/src/components/block-patterns-list/index.js +29 -3
- package/src/components/block-preview/README.md +9 -9
- package/src/components/block-preview/auto.js +9 -11
- package/src/components/block-preview/content.scss +23 -0
- package/src/components/block-preview/index.js +40 -10
- package/src/components/block-preview/style.scss +0 -23
- package/src/components/block-selection-clearer/index.js +1 -1
- package/src/components/block-selection-clearer/test/index.js +6 -6
- package/src/components/block-settings/container.native.js +7 -26
- package/src/components/block-settings-menu/block-settings-dropdown.js +13 -5
- package/src/components/block-settings-menu-controls/index.js +2 -10
- package/src/components/block-switcher/test/index.js +43 -44
- package/src/components/block-switcher/utils.js +1 -1
- package/src/components/block-tools/selected-block-popover.js +77 -80
- package/src/components/block-tools/style.scss +0 -1
- package/src/components/block-variation-picker/{style.scss → content.scss} +0 -0
- package/src/components/block-vertical-alignment-control/icons.js +12 -0
- package/src/components/block-vertical-alignment-control/test/index.js +3 -11
- package/src/components/block-vertical-alignment-control/ui.js +16 -6
- package/src/components/color-style-selector/index.js +1 -1
- package/src/components/colors/test/with-colors.js +2 -8
- package/src/components/date-format-picker/index.js +23 -24
- package/src/components/date-format-picker/style.scss +0 -6
- package/src/components/default-block-appender/content.scss +18 -0
- package/src/components/default-block-appender/test/index.js +2 -8
- package/src/components/font-family/index.js +1 -6
- package/src/components/font-sizes/fluid-utils.js +1 -1
- package/src/components/font-sizes/utils.js +1 -1
- package/src/components/global-styles/README.md +77 -0
- package/src/components/global-styles/context.js +15 -0
- package/src/components/global-styles/hooks.js +145 -0
- package/src/components/global-styles/index.js +7 -0
- package/src/components/global-styles/test/typography-utils.js +393 -0
- package/src/components/global-styles/test/use-global-styles-output.js +814 -0
- package/src/components/global-styles/test/utils.js +206 -0
- package/src/components/global-styles/typography-utils.js +87 -0
- package/src/components/global-styles/use-global-styles-output.js +1088 -0
- package/src/components/global-styles/utils.js +373 -0
- package/src/components/height-control/README.md +55 -0
- package/src/components/height-control/index.js +13 -1
- package/src/components/iframe/index.js +8 -2
- package/src/components/image-editor/constants.js +1 -1
- package/src/components/image-editor/context.js +5 -9
- package/src/components/image-editor/cropper.js +3 -1
- package/src/components/image-editor/index.js +13 -4
- package/src/components/image-editor/use-transform-image.js +14 -55
- package/src/components/image-size-control/index.js +1 -6
- package/src/components/index.js +2 -6
- package/src/components/inner-blocks/index.js +29 -33
- package/src/components/inner-blocks/index.native.js +27 -47
- package/src/components/inner-blocks/use-block-context.js +47 -0
- package/src/components/inserter/block-patterns-explorer/explorer.js +0 -1
- package/src/components/inserter/block-patterns-tab.js +9 -1
- package/src/components/inserter/block-types-tab.js +3 -4
- package/src/components/inserter/hooks/use-patterns-state.js +1 -6
- package/src/components/inserter/index.js +3 -4
- package/src/components/inserter/media-tab/hooks.js +167 -65
- package/src/components/inserter/media-tab/media-list.js +94 -26
- package/src/components/inserter/media-tab/media-panel.js +9 -20
- package/src/components/inserter/media-tab/media-tab.js +12 -4
- package/src/components/inserter/media-tab/utils.js +20 -10
- package/src/components/inserter/menu.js +8 -0
- package/src/components/inserter/preview-panel.js +4 -2
- package/src/components/inserter/search-results.js +2 -6
- package/src/components/inserter/stories/index.js +9 -9
- package/src/components/inserter/style.scss +58 -11
- package/src/components/inserter-list-item/index.js +0 -7
- package/src/components/inspector-controls/README.md +3 -7
- package/src/components/inspector-controls/fill.js +15 -1
- package/src/components/inspector-controls/fill.native.js +14 -1
- package/src/components/inspector-controls/groups.js +3 -0
- package/src/components/inspector-controls/index.js +2 -6
- package/src/components/inspector-controls/slot.js +14 -1
- package/src/components/inspector-controls/slot.native.js +14 -1
- package/src/components/inspector-controls-tabs/advanced-controls-panel.js +1 -1
- package/src/components/inspector-controls-tabs/index.js +2 -4
- package/src/components/inspector-controls-tabs/position-controls-panel.js +1 -1
- package/src/components/inspector-controls-tabs/styles-tab.js +5 -7
- package/src/components/inspector-controls-tabs/use-inspector-controls-tabs.js +21 -10
- package/src/components/justify-content-control/ui.js +9 -0
- package/src/components/link-control/index.js +59 -23
- package/src/components/link-control/style.scss +7 -24
- package/src/components/link-control/test/index.js +134 -5
- package/src/components/list-view/block.js +1 -1
- package/src/components/list-view/use-list-view-drop-zone.js +1 -1
- package/src/components/media-replace-flow/test/index.js +4 -12
- package/src/components/media-upload/index.native.js +2 -2
- package/src/components/off-canvas-editor/README.md +2 -2
- package/src/components/off-canvas-editor/appender.js +93 -37
- package/src/components/off-canvas-editor/block-contents.js +2 -1
- package/src/components/off-canvas-editor/block-select-button.js +12 -1
- package/src/components/off-canvas-editor/block.js +3 -42
- package/src/components/off-canvas-editor/branch.js +32 -5
- package/src/components/off-canvas-editor/index.js +20 -20
- package/src/components/off-canvas-editor/link-ui.js +2 -2
- package/src/components/off-canvas-editor/style.scss +5 -1
- package/src/components/off-canvas-editor/use-list-view-drop-zone.js +1 -1
- package/src/components/provider/index.js +33 -14
- package/src/components/provider/index.native.js +4 -3
- package/src/components/provider/test/experimental-provider.js +94 -0
- package/src/components/provider/test/use-block-sync.js +10 -0
- package/src/components/responsive-block-control/test/index.js +1 -5
- package/src/components/rich-text/use-before-input-rules.js +10 -2
- package/src/components/rich-text/utils.js +1 -1
- package/src/components/spacing-sizes-control/utils.js +2 -7
- package/src/components/tool-selector/index.js +1 -1
- package/src/components/url-input/test/button.js +24 -24
- package/src/components/url-popover/image-url-input-ui.js +7 -8
- package/src/components/url-popover/style.scss +0 -10
- package/src/components/use-block-display-information/index.js +1 -1
- package/src/components/warning/{style.scss → content.scss} +0 -0
- package/src/components/warning/test/index.js +1 -5
- package/src/content.scss +7 -0
- package/src/experiments.js +27 -0
- package/src/experiments.native.js +25 -0
- package/src/hooks/anchor.js +2 -1
- package/src/hooks/border.js +1 -1
- package/src/hooks/child-layout.js +6 -1
- package/src/hooks/color-panel.js +1 -1
- package/src/hooks/color.js +3 -3
- package/src/hooks/custom-class-name.js +2 -1
- package/src/hooks/dimensions.js +6 -6
- package/src/hooks/layout.scss +4 -0
- package/src/hooks/margin.js +1 -0
- package/src/hooks/padding.js +1 -0
- package/src/hooks/position.js +56 -36
- package/src/hooks/test/align.native.js +1 -1
- package/src/hooks/test/utils.js +104 -0
- package/src/hooks/typography.js +1 -1
- package/src/hooks/use-color-props.js +3 -3
- package/src/hooks/utils.js +68 -2
- package/src/index.js +1 -0
- package/src/layouts/constrained.js +3 -0
- package/src/layouts/flex.js +66 -14
- package/src/layouts/flow.js +0 -9
- package/src/store/actions.js +2 -26
- package/src/store/defaults.js +7 -2
- package/src/store/index.js +8 -2
- package/src/store/private-actions.js +65 -0
- package/src/store/private-selectors.js +20 -0
- package/src/store/reducer.js +1 -1
- package/src/store/selectors.js +103 -62
- package/src/store/test/actions.js +0 -18
- package/src/store/test/private-actions.js +22 -0
- package/src/store/test/private-selectors.js +52 -0
- package/src/store/test/selectors.js +52 -54
- package/src/style.scss +3 -5
- package/src/utils/block-variation-transforms.js +1 -1
- package/src/utils/parse-css-unit-to-px.js +3 -1
- package/src/utils/test/parse-css-unit-to-px.js +16 -24
- package/src/utils/transform-styles/index.js +1 -6
- package/build/components/inner-blocks/get-block-context.js +0 -45
- package/build/components/inner-blocks/get-block-context.js.map +0 -1
- package/build/components/off-canvas-editor/block-edit-button.js +0 -50
- package/build/components/off-canvas-editor/block-edit-button.js.map +0 -1
- package/build-module/components/inner-blocks/get-block-context.js +0 -37
- package/build-module/components/inner-blocks/get-block-context.js.map +0 -1
- package/build-module/components/off-canvas-editor/block-edit-button.js +0 -35
- package/build-module/components/off-canvas-editor/block-edit-button.js.map +0 -1
- package/src/components/inner-blocks/get-block-context.js +0 -39
- package/src/components/off-canvas-editor/block-edit-button.js +0 -27
package/src/store/selectors.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { map } from 'lodash';
|
|
5
4
|
import createSelector from 'rememo';
|
|
6
5
|
|
|
7
6
|
/**
|
|
@@ -202,7 +201,7 @@ export const __unstableGetClientIdWithClientIdsTree = createSelector(
|
|
|
202
201
|
*/
|
|
203
202
|
export const __unstableGetClientIdsTree = createSelector(
|
|
204
203
|
( state, rootClientId = '' ) =>
|
|
205
|
-
|
|
204
|
+
getBlockOrder( state, rootClientId ).map( ( clientId ) =>
|
|
206
205
|
__unstableGetClientIdWithClientIdsTree( state, clientId )
|
|
207
206
|
),
|
|
208
207
|
( state ) => [ state.blocks.order ]
|
|
@@ -314,17 +313,32 @@ export const __experimentalGetGlobalBlocksByName = createSelector(
|
|
|
314
313
|
*/
|
|
315
314
|
export const getBlocksByClientId = createSelector(
|
|
316
315
|
( state, clientIds ) =>
|
|
317
|
-
map(
|
|
318
|
-
Array.isArray( clientIds ) ? clientIds : [ clientIds ],
|
|
316
|
+
( Array.isArray( clientIds ) ? clientIds : [ clientIds ] ).map(
|
|
319
317
|
( clientId ) => getBlock( state, clientId )
|
|
320
318
|
),
|
|
321
319
|
( state, clientIds ) =>
|
|
322
|
-
map(
|
|
323
|
-
Array.isArray( clientIds ) ? clientIds : [ clientIds ],
|
|
320
|
+
( Array.isArray( clientIds ) ? clientIds : [ clientIds ] ).map(
|
|
324
321
|
( clientId ) => state.blocks.tree.get( clientId )
|
|
325
322
|
)
|
|
326
323
|
);
|
|
327
324
|
|
|
325
|
+
/**
|
|
326
|
+
* Given an array of block client IDs, returns the corresponding array of block
|
|
327
|
+
* names.
|
|
328
|
+
*
|
|
329
|
+
* @param {Object} state Editor state.
|
|
330
|
+
* @param {string[]} clientIds Client IDs for which block names are to be returned.
|
|
331
|
+
*
|
|
332
|
+
* @return {string[]} Block names.
|
|
333
|
+
*/
|
|
334
|
+
export const getBlockNamesByClientId = createSelector(
|
|
335
|
+
( state, clientIds ) =>
|
|
336
|
+
getBlocksByClientId( state, clientIds )
|
|
337
|
+
.filter( Boolean )
|
|
338
|
+
.map( ( block ) => block.name ),
|
|
339
|
+
( state, clientIds ) => getBlocksByClientId( state, clientIds )
|
|
340
|
+
);
|
|
341
|
+
|
|
328
342
|
/**
|
|
329
343
|
* Returns the number of blocks currently present in the post.
|
|
330
344
|
*
|
|
@@ -507,18 +521,18 @@ export const getBlockParents = createSelector(
|
|
|
507
521
|
export const getBlockParentsByBlockName = createSelector(
|
|
508
522
|
( state, clientId, blockName, ascending = false ) => {
|
|
509
523
|
const parents = getBlockParents( state, clientId, ascending );
|
|
510
|
-
return
|
|
511
|
-
map(
|
|
524
|
+
return parents
|
|
525
|
+
.map( ( id ) => ( {
|
|
512
526
|
id,
|
|
513
527
|
name: getBlockName( state, id ),
|
|
514
|
-
} ) )
|
|
528
|
+
} ) )
|
|
529
|
+
.filter( ( { name } ) => {
|
|
515
530
|
if ( Array.isArray( blockName ) ) {
|
|
516
531
|
return blockName.includes( name );
|
|
517
532
|
}
|
|
518
533
|
return name === blockName;
|
|
519
|
-
} )
|
|
520
|
-
( { id } ) => id
|
|
521
|
-
);
|
|
534
|
+
} )
|
|
535
|
+
.map( ( { id } ) => id );
|
|
522
536
|
},
|
|
523
537
|
( state ) => [ state.blocks.parents ]
|
|
524
538
|
);
|
|
@@ -1265,17 +1279,6 @@ export function isTyping( state ) {
|
|
|
1265
1279
|
return state.isTyping;
|
|
1266
1280
|
}
|
|
1267
1281
|
|
|
1268
|
-
/**
|
|
1269
|
-
* Returns true if the the block interface should be hidden, or false otherwise.
|
|
1270
|
-
*
|
|
1271
|
-
* @param {Object} state Global application state.
|
|
1272
|
-
*
|
|
1273
|
-
* @return {boolean} Whether the block toolbar is hidden.
|
|
1274
|
-
*/
|
|
1275
|
-
export function __experimentalIsBlockInterfaceHidden( state ) {
|
|
1276
|
-
return state.isBlockInterfaceHidden;
|
|
1277
|
-
}
|
|
1278
|
-
|
|
1279
1282
|
/**
|
|
1280
1283
|
* Returns true if the user is dragging blocks, or false otherwise.
|
|
1281
1284
|
*
|
|
@@ -1364,28 +1367,36 @@ export function isCaretWithinFormattedText() {
|
|
|
1364
1367
|
*
|
|
1365
1368
|
* @return {Object} Insertion point object with `rootClientId`, `index`.
|
|
1366
1369
|
*/
|
|
1367
|
-
export
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1370
|
+
export const getBlockInsertionPoint = createSelector(
|
|
1371
|
+
( state ) => {
|
|
1372
|
+
let rootClientId, index;
|
|
1373
|
+
|
|
1374
|
+
const {
|
|
1375
|
+
insertionPoint,
|
|
1376
|
+
selection: { selectionEnd },
|
|
1377
|
+
} = state;
|
|
1378
|
+
if ( insertionPoint !== null ) {
|
|
1379
|
+
return insertionPoint;
|
|
1380
|
+
}
|
|
1377
1381
|
|
|
1378
|
-
|
|
1382
|
+
const { clientId } = selectionEnd;
|
|
1379
1383
|
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1384
|
+
if ( clientId ) {
|
|
1385
|
+
rootClientId = getBlockRootClientId( state, clientId ) || undefined;
|
|
1386
|
+
index = getBlockIndex( state, selectionEnd.clientId ) + 1;
|
|
1387
|
+
} else {
|
|
1388
|
+
index = getBlockOrder( state ).length;
|
|
1389
|
+
}
|
|
1386
1390
|
|
|
1387
|
-
|
|
1388
|
-
}
|
|
1391
|
+
return { rootClientId, index };
|
|
1392
|
+
},
|
|
1393
|
+
( state ) => [
|
|
1394
|
+
state.insertionPoint,
|
|
1395
|
+
state.selection.selectionEnd.clientId,
|
|
1396
|
+
state.blocks.parents,
|
|
1397
|
+
state.blocks.order,
|
|
1398
|
+
]
|
|
1399
|
+
);
|
|
1389
1400
|
|
|
1390
1401
|
/**
|
|
1391
1402
|
* Returns true if we should show the block insertion point.
|
|
@@ -1660,7 +1671,7 @@ export function canRemoveBlocks( state, clientIds, rootClientId = null ) {
|
|
|
1660
1671
|
* @param {string} clientId The block client Id.
|
|
1661
1672
|
* @param {?string} rootClientId Optional root client ID of block list.
|
|
1662
1673
|
*
|
|
1663
|
-
* @return {boolean} Whether the given block is allowed to be moved.
|
|
1674
|
+
* @return {boolean | undefined} Whether the given block is allowed to be moved.
|
|
1664
1675
|
*/
|
|
1665
1676
|
export function canMoveBlock( state, clientId, rootClientId = null ) {
|
|
1666
1677
|
const attributes = getBlockAttributes( state, clientId );
|
|
@@ -2144,14 +2155,14 @@ export const hasInserterItems = createSelector(
|
|
|
2144
2155
|
);
|
|
2145
2156
|
|
|
2146
2157
|
/**
|
|
2147
|
-
* Returns the list of allowed inserter blocks for inner blocks children
|
|
2158
|
+
* Returns the list of allowed inserter blocks for inner blocks children.
|
|
2148
2159
|
*
|
|
2149
2160
|
* @param {Object} state Editor state.
|
|
2150
2161
|
* @param {?string} rootClientId Optional root client ID of block list.
|
|
2151
2162
|
*
|
|
2152
2163
|
* @return {Array?} The list of allowed block types.
|
|
2153
2164
|
*/
|
|
2154
|
-
export const
|
|
2165
|
+
export const getAllowedBlocks = createSelector(
|
|
2155
2166
|
( state, rootClientId = null ) => {
|
|
2156
2167
|
if ( ! rootClientId ) {
|
|
2157
2168
|
return;
|
|
@@ -2170,6 +2181,24 @@ export const __experimentalGetAllowedBlocks = createSelector(
|
|
|
2170
2181
|
]
|
|
2171
2182
|
);
|
|
2172
2183
|
|
|
2184
|
+
export const __experimentalGetAllowedBlocks = createSelector(
|
|
2185
|
+
( state, rootClientId = null ) => {
|
|
2186
|
+
deprecated(
|
|
2187
|
+
'wp.data.select( "core/block-editor" ).__experimentalGetAllowedBlocks',
|
|
2188
|
+
{
|
|
2189
|
+
alternative:
|
|
2190
|
+
'wp.data.select( "core/block-editor" ).getAllowedBlocks',
|
|
2191
|
+
since: '6.2',
|
|
2192
|
+
version: '6.4',
|
|
2193
|
+
}
|
|
2194
|
+
);
|
|
2195
|
+
return getAllowedBlocks( state, rootClientId );
|
|
2196
|
+
},
|
|
2197
|
+
( state, rootClientId ) => [
|
|
2198
|
+
...getAllowedBlocks.getDependants( state, rootClientId ),
|
|
2199
|
+
]
|
|
2200
|
+
);
|
|
2201
|
+
|
|
2173
2202
|
/**
|
|
2174
2203
|
* Returns the block to be directly inserted by the block appender.
|
|
2175
2204
|
*
|
|
@@ -2313,7 +2342,7 @@ export const __experimentalGetAllowedPatterns = createSelector(
|
|
|
2313
2342
|
*
|
|
2314
2343
|
* @return {Array} The list of matched block patterns based on declared `blockTypes` and block name.
|
|
2315
2344
|
*/
|
|
2316
|
-
export const
|
|
2345
|
+
export const getPatternsByBlockTypes = createSelector(
|
|
2317
2346
|
( state, blockNames, rootClientId = null ) => {
|
|
2318
2347
|
if ( ! blockNames ) return EMPTY_ARRAY;
|
|
2319
2348
|
const patterns = __experimentalGetAllowedPatterns(
|
|
@@ -2323,11 +2352,36 @@ export const __experimentalGetPatternsByBlockTypes = createSelector(
|
|
|
2323
2352
|
const normalizedBlockNames = Array.isArray( blockNames )
|
|
2324
2353
|
? blockNames
|
|
2325
2354
|
: [ blockNames ];
|
|
2326
|
-
|
|
2355
|
+
const filteredPatterns = patterns.filter( ( pattern ) =>
|
|
2327
2356
|
pattern?.blockTypes?.some?.( ( blockName ) =>
|
|
2328
2357
|
normalizedBlockNames.includes( blockName )
|
|
2329
2358
|
)
|
|
2330
2359
|
);
|
|
2360
|
+
if ( filteredPatterns.length === 0 ) {
|
|
2361
|
+
return EMPTY_ARRAY;
|
|
2362
|
+
}
|
|
2363
|
+
return filteredPatterns;
|
|
2364
|
+
},
|
|
2365
|
+
( state, blockNames, rootClientId ) => [
|
|
2366
|
+
...__experimentalGetAllowedPatterns.getDependants(
|
|
2367
|
+
state,
|
|
2368
|
+
rootClientId
|
|
2369
|
+
),
|
|
2370
|
+
]
|
|
2371
|
+
);
|
|
2372
|
+
|
|
2373
|
+
export const __experimentalGetPatternsByBlockTypes = createSelector(
|
|
2374
|
+
( state, blockNames, rootClientId = null ) => {
|
|
2375
|
+
deprecated(
|
|
2376
|
+
'wp.data.select( "core/block-editor" ).__experimentalGetPatternsByBlockTypes',
|
|
2377
|
+
{
|
|
2378
|
+
alternative:
|
|
2379
|
+
'wp.data.select( "core/block-editor" ).getPatternsByBlockTypes',
|
|
2380
|
+
since: '6.2',
|
|
2381
|
+
version: '6.4',
|
|
2382
|
+
}
|
|
2383
|
+
);
|
|
2384
|
+
return getPatternsByBlockTypes( state, blockNames, rootClientId );
|
|
2331
2385
|
},
|
|
2332
2386
|
( state, blockNames, rootClientId ) => [
|
|
2333
2387
|
...__experimentalGetAllowedPatterns.getDependants(
|
|
@@ -2384,17 +2438,14 @@ export const __experimentalGetPatternTransformItems = createSelector(
|
|
|
2384
2438
|
* block pattern's blocks and try to find matches from the selected blocks.
|
|
2385
2439
|
* Now this happens in the consumer to avoid heavy operations in the selector.
|
|
2386
2440
|
*/
|
|
2387
|
-
return
|
|
2441
|
+
return getPatternsByBlockTypes(
|
|
2388
2442
|
state,
|
|
2389
2443
|
selectedBlockNames,
|
|
2390
2444
|
rootClientId
|
|
2391
2445
|
);
|
|
2392
2446
|
},
|
|
2393
2447
|
( state, blocks, rootClientId ) => [
|
|
2394
|
-
...
|
|
2395
|
-
state,
|
|
2396
|
-
rootClientId
|
|
2397
|
-
),
|
|
2448
|
+
...getPatternsByBlockTypes.getDependants( state, rootClientId ),
|
|
2398
2449
|
]
|
|
2399
2450
|
);
|
|
2400
2451
|
|
|
@@ -2652,16 +2703,6 @@ export function wasBlockJustInserted( state, clientId, source ) {
|
|
|
2652
2703
|
);
|
|
2653
2704
|
}
|
|
2654
2705
|
|
|
2655
|
-
/**
|
|
2656
|
-
* Gets the client ids of the last inserted blocks.
|
|
2657
|
-
*
|
|
2658
|
-
* @param {Object} state Global application state.
|
|
2659
|
-
* @return {Array|undefined} Client Ids of the last inserted block(s).
|
|
2660
|
-
*/
|
|
2661
|
-
export function getLastInsertedBlocksClientIds( state ) {
|
|
2662
|
-
return state?.lastBlockInserted?.clientIds;
|
|
2663
|
-
}
|
|
2664
|
-
|
|
2665
2706
|
/**
|
|
2666
2707
|
* Tells if the block is visible on the canvas or not.
|
|
2667
2708
|
*
|
|
@@ -27,7 +27,6 @@ const noop = () => {};
|
|
|
27
27
|
|
|
28
28
|
const {
|
|
29
29
|
clearSelectedBlock,
|
|
30
|
-
__experimentalHideBlockInterface: hideBlockInterface,
|
|
31
30
|
insertBlock,
|
|
32
31
|
insertBlocks,
|
|
33
32
|
mergeBlocks,
|
|
@@ -40,7 +39,6 @@ const {
|
|
|
40
39
|
replaceInnerBlocks,
|
|
41
40
|
resetBlocks,
|
|
42
41
|
selectBlock,
|
|
43
|
-
__experimentalShowBlockInterface: showBlockInterface,
|
|
44
42
|
showInsertionPoint,
|
|
45
43
|
startMultiSelect,
|
|
46
44
|
startTyping,
|
|
@@ -777,22 +775,6 @@ describe( 'actions', () => {
|
|
|
777
775
|
} );
|
|
778
776
|
} );
|
|
779
777
|
|
|
780
|
-
describe( 'hideBlockInterface', () => {
|
|
781
|
-
it( 'should return the HIDE_BLOCK_INTERFACE action', () => {
|
|
782
|
-
expect( hideBlockInterface() ).toEqual( {
|
|
783
|
-
type: 'HIDE_BLOCK_INTERFACE',
|
|
784
|
-
} );
|
|
785
|
-
} );
|
|
786
|
-
} );
|
|
787
|
-
|
|
788
|
-
describe( 'showBlockInterface', () => {
|
|
789
|
-
it( 'should return the SHOW_BLOCK_INTERFACE action', () => {
|
|
790
|
-
expect( showBlockInterface() ).toEqual( {
|
|
791
|
-
type: 'SHOW_BLOCK_INTERFACE',
|
|
792
|
-
} );
|
|
793
|
-
} );
|
|
794
|
-
} );
|
|
795
|
-
|
|
796
778
|
describe( 'startTyping', () => {
|
|
797
779
|
it( 'should return the START_TYPING action', () => {
|
|
798
780
|
expect( startTyping() ).toEqual( {
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { hideBlockInterface, showBlockInterface } from '../private-actions';
|
|
5
|
+
|
|
6
|
+
describe( 'private actions', () => {
|
|
7
|
+
describe( 'hideBlockInterface', () => {
|
|
8
|
+
it( 'should return the HIDE_BLOCK_INTERFACE action', () => {
|
|
9
|
+
expect( hideBlockInterface() ).toEqual( {
|
|
10
|
+
type: 'HIDE_BLOCK_INTERFACE',
|
|
11
|
+
} );
|
|
12
|
+
} );
|
|
13
|
+
} );
|
|
14
|
+
|
|
15
|
+
describe( 'showBlockInterface', () => {
|
|
16
|
+
it( 'should return the SHOW_BLOCK_INTERFACE action', () => {
|
|
17
|
+
expect( showBlockInterface() ).toEqual( {
|
|
18
|
+
type: 'SHOW_BLOCK_INTERFACE',
|
|
19
|
+
} );
|
|
20
|
+
} );
|
|
21
|
+
} );
|
|
22
|
+
} );
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal dependencies
|
|
3
|
+
*/
|
|
4
|
+
import {
|
|
5
|
+
isBlockInterfaceHidden,
|
|
6
|
+
getLastInsertedBlocksClientIds,
|
|
7
|
+
} from '../private-selectors';
|
|
8
|
+
|
|
9
|
+
describe( 'private selectors', () => {
|
|
10
|
+
describe( 'isBlockInterfaceHidden', () => {
|
|
11
|
+
it( 'should return the true if toggled true in state', () => {
|
|
12
|
+
const state = {
|
|
13
|
+
isBlockInterfaceHidden: true,
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
expect( isBlockInterfaceHidden( state ) ).toBe( true );
|
|
17
|
+
} );
|
|
18
|
+
|
|
19
|
+
it( 'should return false if toggled false in state', () => {
|
|
20
|
+
const state = {
|
|
21
|
+
isBlockInterfaceHidden: false,
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
expect( isBlockInterfaceHidden( state ) ).toBe( false );
|
|
25
|
+
} );
|
|
26
|
+
} );
|
|
27
|
+
|
|
28
|
+
describe( 'getLastInsertedBlocksClientIds', () => {
|
|
29
|
+
it( 'should return undefined if no blocks have been inserted', () => {
|
|
30
|
+
const state = {
|
|
31
|
+
lastBlockInserted: {},
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
expect( getLastInsertedBlocksClientIds( state ) ).toEqual(
|
|
35
|
+
undefined
|
|
36
|
+
);
|
|
37
|
+
} );
|
|
38
|
+
|
|
39
|
+
it( 'should return clientIds if blocks have been inserted', () => {
|
|
40
|
+
const state = {
|
|
41
|
+
lastBlockInserted: {
|
|
42
|
+
clientIds: [ '123456', '78910' ],
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
expect( getLastInsertedBlocksClientIds( state ) ).toEqual( [
|
|
47
|
+
'123456',
|
|
48
|
+
'78910',
|
|
49
|
+
] );
|
|
50
|
+
} );
|
|
51
|
+
} );
|
|
52
|
+
} );
|
|
@@ -44,7 +44,6 @@ const {
|
|
|
44
44
|
isBlockMultiSelected,
|
|
45
45
|
isFirstMultiSelectedBlock,
|
|
46
46
|
getBlockMode,
|
|
47
|
-
__experimentalIsBlockInterfaceHidden: isBlockInterfaceHidden,
|
|
48
47
|
isTyping,
|
|
49
48
|
isDraggingBlocks,
|
|
50
49
|
getDraggedBlockClientIds,
|
|
@@ -67,13 +66,12 @@ const {
|
|
|
67
66
|
__experimentalGetActiveBlockIdByBlockNames: getActiveBlockIdByBlockNames,
|
|
68
67
|
__experimentalGetAllowedPatterns,
|
|
69
68
|
__experimentalGetParsedPattern,
|
|
70
|
-
|
|
69
|
+
getPatternsByBlockTypes,
|
|
71
70
|
__unstableGetClientIdWithClientIdsTree,
|
|
72
71
|
__unstableGetClientIdsTree,
|
|
73
72
|
__experimentalGetPatternTransformItems,
|
|
74
73
|
wasBlockJustInserted,
|
|
75
74
|
__experimentalGetGlobalBlocksByName,
|
|
76
|
-
getLastInsertedBlocksClientIds,
|
|
77
75
|
} = selectors;
|
|
78
76
|
|
|
79
77
|
describe( 'selectors', () => {
|
|
@@ -2259,24 +2257,6 @@ describe( 'selectors', () => {
|
|
|
2259
2257
|
} );
|
|
2260
2258
|
} );
|
|
2261
2259
|
|
|
2262
|
-
describe( 'isBlockInterfaceHidden', () => {
|
|
2263
|
-
it( 'should return the true if toggled true in state', () => {
|
|
2264
|
-
const state = {
|
|
2265
|
-
isBlockInterfaceHidden: true,
|
|
2266
|
-
};
|
|
2267
|
-
|
|
2268
|
-
expect( isBlockInterfaceHidden( state ) ).toBe( true );
|
|
2269
|
-
} );
|
|
2270
|
-
|
|
2271
|
-
it( 'should return false if toggled false in state', () => {
|
|
2272
|
-
const state = {
|
|
2273
|
-
isBlockInterfaceHidden: false,
|
|
2274
|
-
};
|
|
2275
|
-
|
|
2276
|
-
expect( isBlockInterfaceHidden( state ) ).toBe( false );
|
|
2277
|
-
} );
|
|
2278
|
-
} );
|
|
2279
|
-
|
|
2280
2260
|
describe( 'isTyping', () => {
|
|
2281
2261
|
it( 'should return the isTyping flag if the block is selected', () => {
|
|
2282
2262
|
const state = {
|
|
@@ -2493,6 +2473,44 @@ describe( 'selectors', () => {
|
|
|
2493
2473
|
} );
|
|
2494
2474
|
} );
|
|
2495
2475
|
|
|
2476
|
+
it( 'should cache and return the same object if state has not changed', () => {
|
|
2477
|
+
const state = {
|
|
2478
|
+
selection: {
|
|
2479
|
+
selectionStart: { clientId: 'clientId1' },
|
|
2480
|
+
selectionEnd: { clientId: 'clientId1' },
|
|
2481
|
+
},
|
|
2482
|
+
blocks: {
|
|
2483
|
+
byClientId: new Map(
|
|
2484
|
+
Object.entries( {
|
|
2485
|
+
clientId1: { clientId: 'clientId1' },
|
|
2486
|
+
} )
|
|
2487
|
+
),
|
|
2488
|
+
attributes: new Map(
|
|
2489
|
+
Object.entries( {
|
|
2490
|
+
clientId1: {},
|
|
2491
|
+
} )
|
|
2492
|
+
),
|
|
2493
|
+
order: new Map(
|
|
2494
|
+
Object.entries( {
|
|
2495
|
+
'': [ 'clientId1' ],
|
|
2496
|
+
clientId1: [],
|
|
2497
|
+
} )
|
|
2498
|
+
),
|
|
2499
|
+
parents: new Map(
|
|
2500
|
+
Object.entries( {
|
|
2501
|
+
clientId1: '',
|
|
2502
|
+
} )
|
|
2503
|
+
),
|
|
2504
|
+
},
|
|
2505
|
+
insertionPoint: null,
|
|
2506
|
+
};
|
|
2507
|
+
|
|
2508
|
+
const insertionPoint1 = getBlockInsertionPoint( state );
|
|
2509
|
+
const insertionPoint2 = getBlockInsertionPoint( state );
|
|
2510
|
+
|
|
2511
|
+
expect( insertionPoint1 ).toBe( insertionPoint2 );
|
|
2512
|
+
} );
|
|
2513
|
+
|
|
2496
2514
|
it( 'should return an object for the nested selected block', () => {
|
|
2497
2515
|
const state = {
|
|
2498
2516
|
selection: {
|
|
@@ -4223,7 +4241,7 @@ describe( 'selectors', () => {
|
|
|
4223
4241
|
);
|
|
4224
4242
|
} );
|
|
4225
4243
|
} );
|
|
4226
|
-
describe( '
|
|
4244
|
+
describe( 'getPatternsByBlockTypes', () => {
|
|
4227
4245
|
const state = {
|
|
4228
4246
|
blocks: {
|
|
4229
4247
|
byClientId: new Map(
|
|
@@ -4263,22 +4281,25 @@ describe( 'selectors', () => {
|
|
|
4263
4281
|
},
|
|
4264
4282
|
};
|
|
4265
4283
|
it( 'should return empty array if no block name is provided', () => {
|
|
4266
|
-
expect(
|
|
4267
|
-
[]
|
|
4268
|
-
);
|
|
4284
|
+
expect( getPatternsByBlockTypes( state ) ).toEqual( [] );
|
|
4269
4285
|
} );
|
|
4270
|
-
it( '
|
|
4271
|
-
const patterns =
|
|
4286
|
+
it( 'should return empty array if no match is found', () => {
|
|
4287
|
+
const patterns = getPatternsByBlockTypes(
|
|
4272
4288
|
state,
|
|
4273
4289
|
'test/block-not-exists'
|
|
4274
4290
|
);
|
|
4275
4291
|
expect( patterns ).toEqual( [] );
|
|
4276
4292
|
} );
|
|
4277
|
-
it( 'should return
|
|
4278
|
-
const
|
|
4293
|
+
it( 'should return the same empty array in both empty array cases', () => {
|
|
4294
|
+
const patterns1 = getPatternsByBlockTypes( state );
|
|
4295
|
+
const patterns2 = getPatternsByBlockTypes(
|
|
4279
4296
|
state,
|
|
4280
|
-
'test/block-
|
|
4297
|
+
'test/block-not-exists'
|
|
4281
4298
|
);
|
|
4299
|
+
expect( patterns1 ).toBe( patterns2 );
|
|
4300
|
+
} );
|
|
4301
|
+
it( 'should return proper results when there are matched block patterns', () => {
|
|
4302
|
+
const patterns = getPatternsByBlockTypes( state, 'test/block-a' );
|
|
4282
4303
|
expect( patterns ).toHaveLength( 2 );
|
|
4283
4304
|
expect( patterns ).toEqual(
|
|
4284
4305
|
expect.arrayContaining( [
|
|
@@ -4288,7 +4309,7 @@ describe( 'selectors', () => {
|
|
|
4288
4309
|
);
|
|
4289
4310
|
} );
|
|
4290
4311
|
it( 'should return proper result with matched patterns and allowed blocks from rootClientId', () => {
|
|
4291
|
-
const patterns =
|
|
4312
|
+
const patterns = getPatternsByBlockTypes(
|
|
4292
4313
|
state,
|
|
4293
4314
|
'test/block-a',
|
|
4294
4315
|
'block1'
|
|
@@ -4666,26 +4687,3 @@ describe( '__unstableGetClientIdsTree', () => {
|
|
|
4666
4687
|
] );
|
|
4667
4688
|
} );
|
|
4668
4689
|
} );
|
|
4669
|
-
|
|
4670
|
-
describe( 'getLastInsertedBlocksClientIds', () => {
|
|
4671
|
-
it( 'should return undefined if no blocks have been inserted', () => {
|
|
4672
|
-
const state = {
|
|
4673
|
-
lastBlockInserted: {},
|
|
4674
|
-
};
|
|
4675
|
-
|
|
4676
|
-
expect( getLastInsertedBlocksClientIds( state ) ).toEqual( undefined );
|
|
4677
|
-
} );
|
|
4678
|
-
|
|
4679
|
-
it( 'should return clientIds if blocks have been inserted', () => {
|
|
4680
|
-
const state = {
|
|
4681
|
-
lastBlockInserted: {
|
|
4682
|
-
clientIds: [ '123456', '78910' ],
|
|
4683
|
-
},
|
|
4684
|
-
};
|
|
4685
|
-
|
|
4686
|
-
expect( getLastInsertedBlocksClientIds( state ) ).toEqual( [
|
|
4687
|
-
'123456',
|
|
4688
|
-
'78910',
|
|
4689
|
-
] );
|
|
4690
|
-
} );
|
|
4691
|
-
} );
|
package/src/style.scss
CHANGED
|
@@ -18,7 +18,6 @@
|
|
|
18
18
|
@import "./components/block-styles/style.scss";
|
|
19
19
|
@import "./components/block-switcher/style.scss";
|
|
20
20
|
@import "./components/block-types-list/style.scss";
|
|
21
|
-
@import "./components/block-variation-picker/style.scss";
|
|
22
21
|
@import "./components/block-pattern-setup/style.scss";
|
|
23
22
|
@import "./components/block-variation-transforms/style.scss";
|
|
24
23
|
@import "./components/border-radius-control/style.scss";
|
|
@@ -45,15 +44,14 @@
|
|
|
45
44
|
@import "./components/tool-selector/style.scss";
|
|
46
45
|
@import "./components/url-input/style.scss";
|
|
47
46
|
@import "./components/url-popover/style.scss";
|
|
48
|
-
@import "./components/warning/style.scss";
|
|
49
47
|
@import "./hooks/anchor.scss";
|
|
50
|
-
@import "./hooks/layout.scss";
|
|
51
48
|
@import "./hooks/border.scss";
|
|
49
|
+
@import "./hooks/color.scss";
|
|
52
50
|
@import "./hooks/dimensions.scss";
|
|
51
|
+
@import "./hooks/layout.scss";
|
|
52
|
+
@import "./hooks/padding.scss";
|
|
53
53
|
@import "./hooks/position.scss";
|
|
54
54
|
@import "./hooks/typography.scss";
|
|
55
|
-
@import "./hooks/color.scss";
|
|
56
|
-
@import "./hooks/padding.scss";
|
|
57
55
|
|
|
58
56
|
@import "./components/block-toolbar/style.scss";
|
|
59
57
|
@import "./components/inserter/style.scss";
|
|
@@ -22,7 +22,7 @@ function matchesAttributes( blockAttributes, variation ) {
|
|
|
22
22
|
*
|
|
23
23
|
* @param {Object} blockAttributes - The block attributes to try to find a match.
|
|
24
24
|
* @param {WPBlockVariation[]} variations - A list of block variations to test for a match.
|
|
25
|
-
* @return {
|
|
25
|
+
* @return {WPBlockVariation | undefined} - If a match is found returns it. If not or more than one matches are found returns `undefined`.
|
|
26
26
|
*/
|
|
27
27
|
export const __experimentalGetMatchingVariation = (
|
|
28
28
|
blockAttributes,
|
|
@@ -117,7 +117,9 @@ function isMathExpression( cssUnit ) {
|
|
|
117
117
|
function evalMathExpression( cssUnit ) {
|
|
118
118
|
let errorFound = false;
|
|
119
119
|
// Convert every part of the expression to px values.
|
|
120
|
-
const cssUnitsBits = cssUnit
|
|
120
|
+
const cssUnitsBits = cssUnit
|
|
121
|
+
.split( /(?!^-)[+*\/-](\s?-)?/g )
|
|
122
|
+
.filter( Boolean );
|
|
121
123
|
for ( const unit of cssUnitsBits ) {
|
|
122
124
|
// Standardize the unit to px and extract the value.
|
|
123
125
|
const parsedUnit = parseUnit( getPxFromCssUnit( unit ) );
|