@wordpress/block-editor 10.5.0 → 11.1.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 +18 -0
- package/README.md +2 -1
- package/build/autocompleters/block.js +2 -6
- package/build/autocompleters/block.js.map +1 -1
- package/build/autocompleters/link.js +2 -0
- package/build/autocompleters/link.js.map +1 -1
- package/build/components/alignment-control/ui.js +1 -7
- package/build/components/alignment-control/ui.js.map +1 -1
- package/build/components/block-alignment-control/use-available-alignments.js +4 -3
- package/build/components/block-alignment-control/use-available-alignments.js.map +1 -1
- package/build/components/block-card/index.js +51 -3
- package/build/components/block-card/index.js.map +1 -1
- package/build/components/block-draggable/index.native.js +46 -39
- package/build/components/block-draggable/index.native.js.map +1 -1
- package/build/components/block-edit/edit.js +4 -3
- package/build/components/block-edit/edit.js.map +1 -1
- package/build/components/block-edit/edit.native.js +4 -7
- package/build/components/block-edit/edit.native.js.map +1 -1
- package/build/components/block-icon/index.js +4 -2
- package/build/components/block-icon/index.js.map +1 -1
- package/build/components/block-inspector/index.js +90 -37
- package/build/components/block-inspector/index.js.map +1 -1
- package/build/components/block-list/block-list-context.native.js +5 -8
- package/build/components/block-list/block-list-context.native.js.map +1 -1
- package/build/components/block-list/block.js +55 -24
- package/build/components/block-list/block.js.map +1 -1
- package/build/components/block-list/block.native.js +61 -28
- package/build/components/block-list/block.native.js.map +1 -1
- package/build/components/block-list-appender/index.js +46 -34
- package/build/components/block-list-appender/index.js.map +1 -1
- package/build/components/block-list-appender/index.native.js +39 -34
- package/build/components/block-list-appender/index.native.js.map +1 -1
- package/build/components/block-mobile-toolbar/block-actions-menu.native.js +30 -22
- package/build/components/block-mobile-toolbar/block-actions-menu.native.js.map +1 -1
- package/build/components/block-mobile-toolbar/index.native.js +1 -1
- package/build/components/block-mobile-toolbar/index.native.js.map +1 -1
- package/build/components/block-pattern-setup/index.js +16 -8
- package/build/components/block-pattern-setup/index.js.map +1 -1
- package/build/components/block-patterns-list/index.js +33 -11
- package/build/components/block-patterns-list/index.js.map +1 -1
- package/build/components/block-preview/auto.js +9 -3
- package/build/components/block-preview/auto.js.map +1 -1
- package/build/components/block-preview/index.js +5 -9
- package/build/components/block-preview/index.js.map +1 -1
- package/build/components/block-settings-menu/block-settings-dropdown.js +5 -2
- package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build/components/block-styles/index.native.js +1 -3
- package/build/components/block-styles/index.native.js.map +1 -1
- package/build/components/block-styles/utils.js +7 -10
- package/build/components/block-styles/utils.js.map +1 -1
- package/build/components/block-toolbar/index.js +5 -1
- package/build/components/block-toolbar/index.js.map +1 -1
- package/build/components/block-toolbar/index.native.js +6 -8
- package/build/components/block-toolbar/index.native.js.map +1 -1
- package/build/components/block-tools/insertion-point.js +8 -49
- package/build/components/block-tools/insertion-point.js.map +1 -1
- package/build/components/block-tools/selected-block-popover.js +1 -3
- package/build/components/block-tools/selected-block-popover.js.map +1 -1
- package/build/components/block-variation-picker/index.js +2 -3
- package/build/components/block-variation-picker/index.js.map +1 -1
- package/build/components/colors/utils.js +2 -6
- package/build/components/colors/utils.js.map +1 -1
- package/build/components/colors-gradients/control.js +0 -3
- package/build/components/colors-gradients/control.js.map +1 -1
- package/build/components/colors-gradients/dropdown.js +0 -2
- package/build/components/colors-gradients/dropdown.js.map +1 -1
- package/build/components/colors-gradients/panel-color-gradient-settings.js +2 -19
- package/build/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
- package/build/components/colors-gradients/use-multiple-origin-colors-and-gradients.js +4 -3
- package/build/components/colors-gradients/use-multiple-origin-colors-and-gradients.js.map +1 -1
- package/build/components/copy-handler/index.js +37 -9
- package/build/components/copy-handler/index.js.map +1 -1
- package/build/components/font-sizes/fluid-utils.js +5 -2
- package/build/components/font-sizes/fluid-utils.js.map +1 -1
- package/build/components/font-sizes/utils.js +10 -4
- package/build/components/font-sizes/utils.js.map +1 -1
- package/build/components/font-sizes/with-font-sizes.js +11 -6
- package/build/components/font-sizes/with-font-sizes.js.map +1 -1
- package/build/components/gradients/use-gradient.js +2 -8
- package/build/components/gradients/use-gradient.js.map +1 -1
- package/build/components/height-control/index.js +115 -0
- package/build/components/height-control/index.js.map +1 -0
- package/build/components/iframe/index.js +22 -101
- package/build/components/iframe/index.js.map +1 -1
- package/build/components/iframe/use-compatibility-styles.js +93 -0
- package/build/components/iframe/use-compatibility-styles.js.map +1 -0
- package/build/components/image-editor/use-save-image.js +2 -0
- package/build/components/image-editor/use-save-image.js.map +1 -1
- package/build/components/image-editor/zoom-dropdown.js +1 -0
- package/build/components/image-editor/zoom-dropdown.js.map +1 -1
- package/build/components/index.js +9 -0
- package/build/components/index.js.map +1 -1
- package/build/components/inner-blocks/index.js +25 -7
- package/build/components/inner-blocks/index.js.map +1 -1
- package/build/components/inner-blocks/use-inner-block-template-sync.js +25 -10
- package/build/components/inner-blocks/use-inner-block-template-sync.js.map +1 -1
- package/build/components/inserter/block-patterns-explorer/sidebar.js +1 -0
- package/build/components/inserter/block-patterns-explorer/sidebar.js.map +1 -1
- package/build/components/inserter/block-patterns-tab.js +25 -46
- package/build/components/inserter/block-patterns-tab.js.map +1 -1
- package/build/components/inserter/block-types-tab.js +3 -1
- package/build/components/inserter/block-types-tab.js.map +1 -1
- package/build/components/inserter/hooks/use-debounced-input.js +27 -0
- package/build/components/inserter/hooks/use-debounced-input.js.map +1 -0
- package/build/components/inserter/hooks/use-insertion-point.js +4 -3
- package/build/components/inserter/hooks/use-insertion-point.js.map +1 -1
- package/build/components/inserter/index.js +20 -6
- package/build/components/inserter/index.js.map +1 -1
- package/build/components/inserter/index.native.js +3 -4
- package/build/components/inserter/index.native.js.map +1 -1
- package/build/components/inserter/media-tab/hooks.js +106 -0
- package/build/components/inserter/media-tab/hooks.js.map +1 -0
- package/build/components/inserter/media-tab/index.js +32 -0
- package/build/components/inserter/media-tab/index.js.map +1 -0
- package/build/components/inserter/media-tab/media-list.js +100 -0
- package/build/components/inserter/media-tab/media-list.js.map +1 -0
- package/build/components/inserter/media-tab/media-panel.js +96 -0
- package/build/components/inserter/media-tab/media-panel.js.map +1 -0
- package/build/components/inserter/media-tab/media-tab.js +120 -0
- package/build/components/inserter/media-tab/media-tab.js.map +1 -0
- package/build/components/inserter/media-tab/utils.js +54 -0
- package/build/components/inserter/media-tab/utils.js.map +1 -0
- package/build/components/inserter/menu.js +35 -12
- package/build/components/inserter/menu.js.map +1 -1
- package/build/components/inserter/mobile-tab-navigation.js +70 -0
- package/build/components/inserter/mobile-tab-navigation.js.map +1 -0
- package/build/components/inserter/quick-inserter.js +7 -3
- package/build/components/inserter/quick-inserter.js.map +1 -1
- package/build/components/inserter/search-items.js +15 -14
- package/build/components/inserter/search-items.js.map +1 -1
- package/build/components/inserter/search-results.js +7 -3
- package/build/components/inserter/search-results.js.map +1 -1
- package/build/components/inserter/tabs.js +16 -2
- package/build/components/inserter/tabs.js.map +1 -1
- package/build/components/inserter-list-item/index.js +4 -1
- package/build/components/inserter-list-item/index.js.map +1 -1
- package/build/components/inspector-controls/groups.js +2 -0
- package/build/components/inspector-controls/groups.js.map +1 -1
- package/build/components/inspector-controls-tabs/advanced-controls-panel.js +46 -0
- package/build/components/inspector-controls-tabs/advanced-controls-panel.js.map +1 -0
- package/build/components/inspector-controls-tabs/index.js +71 -0
- package/build/components/inspector-controls-tabs/index.js.map +1 -0
- package/build/components/inspector-controls-tabs/settings-tab.js +28 -0
- package/build/components/inspector-controls-tabs/settings-tab.js.map +1 -0
- package/build/components/inspector-controls-tabs/styles-tab.js +61 -0
- package/build/components/inspector-controls-tabs/styles-tab.js.map +1 -0
- package/build/components/inspector-controls-tabs/use-inspector-controls-tabs.js +97 -0
- package/build/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +1 -0
- package/build/components/inspector-controls-tabs/use-is-list-view-tab-disabled.js +18 -0
- package/build/components/inspector-controls-tabs/use-is-list-view-tab-disabled.js.map +1 -0
- package/build/components/inspector-controls-tabs/utils.js +37 -0
- package/build/components/inspector-controls-tabs/utils.js.map +1 -0
- package/build/components/link-control/index.js +1 -0
- package/build/components/link-control/index.js.map +1 -1
- package/build/components/link-control/search-input.js +0 -1
- package/build/components/link-control/search-input.js.map +1 -1
- package/build/components/link-control/use-internal-input-value.js +3 -3
- package/build/components/link-control/use-internal-input-value.js.map +1 -1
- package/build/components/list-view/block-select-button.js +1 -1
- package/build/components/list-view/block-select-button.js.map +1 -1
- package/build/components/list-view/block.js +5 -2
- package/build/components/list-view/block.js.map +1 -1
- package/build/components/list-view/branch.js +13 -12
- package/build/components/list-view/branch.js.map +1 -1
- package/build/components/media-upload/index.native.js +2 -3
- package/build/components/media-upload/index.native.js.map +1 -1
- package/build/components/off-canvas-editor/appender.js +99 -0
- package/build/components/off-canvas-editor/appender.js.map +1 -0
- package/build/components/off-canvas-editor/block-edit-button.js +50 -0
- package/build/components/off-canvas-editor/block-edit-button.js.map +1 -0
- package/build/components/off-canvas-editor/block-select-button.js +3 -2
- package/build/components/off-canvas-editor/block-select-button.js.map +1 -1
- package/build/components/off-canvas-editor/block.js +82 -38
- package/build/components/off-canvas-editor/block.js.map +1 -1
- package/build/components/off-canvas-editor/branch.js +3 -5
- package/build/components/off-canvas-editor/branch.js.map +1 -1
- package/build/components/off-canvas-editor/index.js +24 -11
- package/build/components/off-canvas-editor/index.js.map +1 -1
- package/build/components/off-canvas-editor/leaf.js +1 -1
- package/build/components/off-canvas-editor/leaf.js.map +1 -1
- package/build/components/off-canvas-editor/link-ui.js +185 -0
- package/build/components/off-canvas-editor/link-ui.js.map +1 -0
- package/build/components/off-canvas-editor/update-attributes.js +108 -0
- package/build/components/off-canvas-editor/update-attributes.js.map +1 -0
- package/build/components/off-canvas-editor/use-inserted-block.js +58 -0
- package/build/components/off-canvas-editor/use-inserted-block.js.map +1 -0
- package/build/components/responsive-block-control/label.js.map +1 -1
- package/build/components/rich-text/format-edit.js +12 -10
- package/build/components/rich-text/format-edit.js.map +1 -1
- package/build/components/rich-text/format-toolbar/index.js +8 -4
- package/build/components/rich-text/format-toolbar/index.js.map +1 -1
- package/build/components/rich-text/index.js +3 -3
- package/build/components/rich-text/index.js.map +1 -1
- package/build/components/rich-text/index.native.js +0 -2
- package/build/components/rich-text/index.native.js.map +1 -1
- package/build/components/rich-text/use-insert-replacement-text.js +43 -0
- package/build/components/rich-text/use-insert-replacement-text.js.map +1 -0
- package/build/components/rich-text/use-paste-handler.js +21 -12
- package/build/components/rich-text/use-paste-handler.js.map +1 -1
- package/build/components/rich-text/use-undo-automatic-change.js +9 -1
- package/build/components/rich-text/use-undo-automatic-change.js.map +1 -1
- package/build/components/rich-text/utils.js +1 -19
- package/build/components/rich-text/utils.js.map +1 -1
- package/build/components/spacing-sizes-control/index.js +0 -1
- package/build/components/spacing-sizes-control/index.js.map +1 -1
- package/build/components/spacing-sizes-control/spacing-input-control.js +12 -3
- package/build/components/spacing-sizes-control/spacing-input-control.js.map +1 -1
- package/build/components/spacing-sizes-control/utils.js +1 -1
- package/build/components/spacing-sizes-control/utils.js.map +1 -1
- package/build/components/typewriter/index.js +1 -1
- package/build/components/typewriter/index.js.map +1 -1
- package/build/components/ungroup-button/index.native.js +4 -2
- package/build/components/ungroup-button/index.native.js.map +1 -1
- package/build/components/url-input/index.js +46 -43
- package/build/components/url-input/index.js.map +1 -1
- package/build/components/url-popover/image-url-input-ui.js +2 -2
- package/build/components/url-popover/image-url-input-ui.js.map +1 -1
- package/build/components/use-block-display-information/index.js +8 -4
- package/build/components/use-block-display-information/index.js.map +1 -1
- package/build/components/use-setting/index.js +9 -1
- package/build/components/use-setting/index.js.map +1 -1
- package/build/components/writing-flow/index.js +1 -1
- package/build/components/writing-flow/index.js.map +1 -1
- package/build/hooks/border.js +0 -1
- package/build/hooks/border.js.map +1 -1
- package/build/hooks/child-layout.js +209 -0
- package/build/hooks/child-layout.js.map +1 -0
- package/build/hooks/color-panel.js +0 -1
- package/build/hooks/color-panel.js.map +1 -1
- package/build/hooks/color.js +1 -2
- package/build/hooks/color.js.map +1 -1
- package/build/hooks/content-lock-ui.js +1 -1
- package/build/hooks/content-lock-ui.js.map +1 -1
- package/build/hooks/dimensions.js +25 -7
- package/build/hooks/dimensions.js.map +1 -1
- package/build/hooks/font-family.js +4 -4
- package/build/hooks/font-family.js.map +1 -1
- package/build/hooks/font-size.js +5 -3
- package/build/hooks/font-size.js.map +1 -1
- package/build/hooks/layout.js +57 -1
- package/build/hooks/layout.js.map +1 -1
- package/build/hooks/min-height.js +4 -10
- package/build/hooks/min-height.js.map +1 -1
- package/build/hooks/use-typography-props.js +11 -8
- package/build/hooks/use-typography-props.js.map +1 -1
- package/build/store/reducer.js +411 -274
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +58 -48
- package/build/store/selectors.js.map +1 -1
- package/build/utils/pasting.js +6 -11
- package/build/utils/pasting.js.map +1 -1
- package/build/utils/sorting.js +63 -0
- package/build/utils/sorting.js.map +1 -0
- package/build-module/autocompleters/block.js +2 -6
- package/build-module/autocompleters/block.js.map +1 -1
- package/build-module/autocompleters/link.js +2 -0
- package/build-module/autocompleters/link.js.map +1 -1
- package/build-module/components/alignment-control/ui.js +1 -6
- package/build-module/components/alignment-control/ui.js.map +1 -1
- package/build-module/components/block-alignment-control/use-available-alignments.js +4 -3
- package/build-module/components/block-alignment-control/use-available-alignments.js.map +1 -1
- package/build-module/components/block-card/index.js +45 -3
- package/build-module/components/block-card/index.js.map +1 -1
- package/build-module/components/block-draggable/index.native.js +40 -31
- package/build-module/components/block-draggable/index.native.js.map +1 -1
- package/build-module/components/block-edit/edit.js +4 -2
- package/build-module/components/block-edit/edit.js.map +1 -1
- package/build-module/components/block-edit/edit.native.js +4 -6
- package/build-module/components/block-edit/edit.native.js.map +1 -1
- package/build-module/components/block-icon/index.js +4 -2
- package/build-module/components/block-icon/index.js.map +1 -1
- package/build-module/components/block-inspector/index.js +87 -34
- package/build-module/components/block-inspector/index.js.map +1 -1
- package/build-module/components/block-list/block-list-context.native.js +5 -8
- package/build-module/components/block-list/block-list-context.native.js.map +1 -1
- package/build-module/components/block-list/block.js +55 -25
- package/build-module/components/block-list/block.js.map +1 -1
- package/build-module/components/block-list/block.native.js +61 -28
- package/build-module/components/block-list/block.native.js.map +1 -1
- package/build-module/components/block-list-appender/index.js +46 -34
- package/build-module/components/block-list-appender/index.js.map +1 -1
- package/build-module/components/block-list-appender/index.native.js +39 -32
- package/build-module/components/block-list-appender/index.native.js.map +1 -1
- package/build-module/components/block-mobile-toolbar/block-actions-menu.native.js +31 -24
- package/build-module/components/block-mobile-toolbar/block-actions-menu.native.js.map +1 -1
- package/build-module/components/block-mobile-toolbar/index.native.js +1 -1
- package/build-module/components/block-mobile-toolbar/index.native.js.map +1 -1
- package/build-module/components/block-pattern-setup/index.js +16 -8
- package/build-module/components/block-pattern-setup/index.js.map +1 -1
- package/build-module/components/block-patterns-list/index.js +35 -13
- package/build-module/components/block-patterns-list/index.js.map +1 -1
- package/build-module/components/block-preview/auto.js +9 -3
- package/build-module/components/block-preview/auto.js.map +1 -1
- package/build-module/components/block-preview/index.js +5 -8
- package/build-module/components/block-preview/index.js.map +1 -1
- package/build-module/components/block-settings-menu/block-settings-dropdown.js +5 -2
- package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build-module/components/block-styles/index.native.js +1 -2
- package/build-module/components/block-styles/index.native.js.map +1 -1
- package/build-module/components/block-styles/utils.js +7 -9
- package/build-module/components/block-styles/utils.js.map +1 -1
- package/build-module/components/block-toolbar/index.js +6 -2
- package/build-module/components/block-toolbar/index.js.map +1 -1
- package/build-module/components/block-toolbar/index.native.js +6 -8
- package/build-module/components/block-toolbar/index.native.js.map +1 -1
- package/build-module/components/block-tools/insertion-point.js +8 -49
- package/build-module/components/block-tools/insertion-point.js.map +1 -1
- package/build-module/components/block-tools/selected-block-popover.js +1 -2
- package/build-module/components/block-tools/selected-block-popover.js.map +1 -1
- package/build-module/components/block-variation-picker/index.js +2 -3
- package/build-module/components/block-variation-picker/index.js.map +1 -1
- package/build-module/components/colors/utils.js +3 -7
- package/build-module/components/colors/utils.js.map +1 -1
- package/build-module/components/colors-gradients/control.js +0 -3
- package/build-module/components/colors-gradients/control.js.map +1 -1
- package/build-module/components/colors-gradients/dropdown.js +0 -2
- package/build-module/components/colors-gradients/dropdown.js.map +1 -1
- package/build-module/components/colors-gradients/panel-color-gradient-settings.js +4 -19
- package/build-module/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
- package/build-module/components/colors-gradients/use-multiple-origin-colors-and-gradients.js +4 -2
- package/build-module/components/colors-gradients/use-multiple-origin-colors-and-gradients.js.map +1 -1
- package/build-module/components/copy-handler/index.js +38 -10
- package/build-module/components/copy-handler/index.js.map +1 -1
- package/build-module/components/font-sizes/fluid-utils.js +5 -2
- package/build-module/components/font-sizes/fluid-utils.js.map +1 -1
- package/build-module/components/font-sizes/utils.js +11 -5
- package/build-module/components/font-sizes/utils.js.map +1 -1
- package/build-module/components/font-sizes/with-font-sizes.js +12 -7
- package/build-module/components/font-sizes/with-font-sizes.js.map +1 -1
- package/build-module/components/gradients/use-gradient.js +2 -7
- package/build-module/components/gradients/use-gradient.js.map +1 -1
- package/build-module/components/height-control/index.js +103 -0
- package/build-module/components/height-control/index.js.map +1 -0
- package/build-module/components/iframe/index.js +21 -101
- package/build-module/components/iframe/index.js.map +1 -1
- package/build-module/components/iframe/use-compatibility-styles.js +85 -0
- package/build-module/components/iframe/use-compatibility-styles.js.map +1 -0
- package/build-module/components/image-editor/use-save-image.js +2 -0
- package/build-module/components/image-editor/use-save-image.js.map +1 -1
- package/build-module/components/image-editor/zoom-dropdown.js +1 -0
- package/build-module/components/image-editor/zoom-dropdown.js.map +1 -1
- package/build-module/components/index.js +1 -0
- package/build-module/components/index.js.map +1 -1
- package/build-module/components/inner-blocks/index.js +27 -9
- package/build-module/components/inner-blocks/index.js.map +1 -1
- package/build-module/components/inner-blocks/use-inner-block-template-sync.js +23 -10
- package/build-module/components/inner-blocks/use-inner-block-template-sync.js.map +1 -1
- package/build-module/components/inserter/block-patterns-explorer/sidebar.js +1 -0
- package/build-module/components/inserter/block-patterns-explorer/sidebar.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab.js +27 -49
- package/build-module/components/inserter/block-patterns-tab.js.map +1 -1
- package/build-module/components/inserter/block-types-tab.js +3 -2
- package/build-module/components/inserter/block-types-tab.js.map +1 -1
- package/build-module/components/inserter/hooks/use-debounced-input.js +18 -0
- package/build-module/components/inserter/hooks/use-debounced-input.js.map +1 -0
- package/build-module/components/inserter/hooks/use-insertion-point.js +4 -3
- package/build-module/components/inserter/hooks/use-insertion-point.js.map +1 -1
- package/build-module/components/inserter/index.js +20 -6
- package/build-module/components/inserter/index.js.map +1 -1
- package/build-module/components/inserter/index.native.js +3 -5
- package/build-module/components/inserter/index.native.js.map +1 -1
- package/build-module/components/inserter/media-tab/hooks.js +92 -0
- package/build-module/components/inserter/media-tab/hooks.js.map +1 -0
- package/build-module/components/inserter/media-tab/index.js +4 -0
- package/build-module/components/inserter/media-tab/index.js.map +1 -0
- package/build-module/components/inserter/media-tab/media-list.js +86 -0
- package/build-module/components/inserter/media-tab/media-list.js.map +1 -0
- package/build-module/components/inserter/media-tab/media-panel.js +77 -0
- package/build-module/components/inserter/media-tab/media-panel.js.map +1 -0
- package/build-module/components/inserter/media-tab/media-tab.js +100 -0
- package/build-module/components/inserter/media-tab/media-tab.js.map +1 -0
- package/build-module/components/inserter/media-tab/utils.js +45 -0
- package/build-module/components/inserter/media-tab/utils.js.map +1 -0
- package/build-module/components/inserter/menu.js +33 -12
- package/build-module/components/inserter/menu.js.map +1 -1
- package/build-module/components/inserter/mobile-tab-navigation.js +61 -0
- package/build-module/components/inserter/mobile-tab-navigation.js.map +1 -0
- package/build-module/components/inserter/quick-inserter.js +7 -3
- package/build-module/components/inserter/quick-inserter.js.map +1 -1
- package/build-module/components/inserter/search-items.js +15 -13
- package/build-module/components/inserter/search-items.js.map +1 -1
- package/build-module/components/inserter/search-results.js +7 -4
- package/build-module/components/inserter/search-results.js.map +1 -1
- package/build-module/components/inserter/tabs.js +15 -2
- package/build-module/components/inserter/tabs.js.map +1 -1
- package/build-module/components/inserter-list-item/index.js +5 -2
- package/build-module/components/inserter-list-item/index.js.map +1 -1
- package/build-module/components/inspector-controls/groups.js +2 -0
- package/build-module/components/inspector-controls/groups.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/advanced-controls-panel.js +32 -0
- package/build-module/components/inspector-controls-tabs/advanced-controls-panel.js.map +1 -0
- package/build-module/components/inspector-controls-tabs/index.js +56 -0
- package/build-module/components/inspector-controls-tabs/index.js.map +1 -0
- package/build-module/components/inspector-controls-tabs/settings-tab.js +17 -0
- package/build-module/components/inspector-controls-tabs/settings-tab.js.map +1 -0
- package/build-module/components/inspector-controls-tabs/styles-tab.js +46 -0
- package/build-module/components/inspector-controls-tabs/styles-tab.js.map +1 -0
- package/build-module/components/inspector-controls-tabs/use-inspector-controls-tabs.js +81 -0
- package/build-module/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +1 -0
- package/build-module/components/inspector-controls-tabs/use-is-list-view-tab-disabled.js +8 -0
- package/build-module/components/inspector-controls-tabs/use-is-list-view-tab-disabled.js.map +1 -0
- package/build-module/components/inspector-controls-tabs/utils.js +26 -0
- package/build-module/components/inspector-controls-tabs/utils.js.map +1 -0
- package/build-module/components/link-control/index.js +1 -0
- package/build-module/components/link-control/index.js.map +1 -1
- package/build-module/components/link-control/search-input.js +0 -1
- package/build-module/components/link-control/search-input.js.map +1 -1
- package/build-module/components/link-control/use-internal-input-value.js +3 -3
- package/build-module/components/link-control/use-internal-input-value.js.map +1 -1
- package/build-module/components/list-view/block-select-button.js +1 -1
- package/build-module/components/list-view/block-select-button.js.map +1 -1
- package/build-module/components/list-view/block.js +5 -2
- package/build-module/components/list-view/block.js.map +1 -1
- package/build-module/components/list-view/branch.js +12 -11
- package/build-module/components/list-view/branch.js.map +1 -1
- package/build-module/components/media-upload/index.native.js +2 -4
- package/build-module/components/media-upload/index.native.js.map +1 -1
- package/build-module/components/off-canvas-editor/appender.js +83 -0
- package/build-module/components/off-canvas-editor/appender.js.map +1 -0
- package/build-module/components/off-canvas-editor/block-edit-button.js +35 -0
- package/build-module/components/off-canvas-editor/block-edit-button.js.map +1 -0
- package/build-module/components/off-canvas-editor/block-select-button.js +3 -2
- package/build-module/components/off-canvas-editor/block-select-button.js.map +1 -1
- package/build-module/components/off-canvas-editor/block.js +83 -41
- package/build-module/components/off-canvas-editor/block.js.map +1 -1
- package/build-module/components/off-canvas-editor/branch.js +3 -4
- package/build-module/components/off-canvas-editor/branch.js.map +1 -1
- package/build-module/components/off-canvas-editor/index.js +24 -12
- package/build-module/components/off-canvas-editor/index.js.map +1 -1
- package/build-module/components/off-canvas-editor/leaf.js +1 -1
- package/build-module/components/off-canvas-editor/leaf.js.map +1 -1
- package/build-module/components/off-canvas-editor/link-ui.js +165 -0
- package/build-module/components/off-canvas-editor/link-ui.js.map +1 -0
- package/build-module/components/off-canvas-editor/update-attributes.js +97 -0
- package/build-module/components/off-canvas-editor/update-attributes.js.map +1 -0
- package/build-module/components/off-canvas-editor/use-inserted-block.js +47 -0
- package/build-module/components/off-canvas-editor/use-inserted-block.js.map +1 -0
- package/build-module/components/responsive-block-control/label.js +1 -2
- package/build-module/components/responsive-block-control/label.js.map +1 -1
- package/build-module/components/rich-text/format-edit.js +12 -9
- package/build-module/components/rich-text/format-edit.js.map +1 -1
- package/build-module/components/rich-text/format-toolbar/index.js +6 -2
- package/build-module/components/rich-text/format-toolbar/index.js.map +1 -1
- package/build-module/components/rich-text/index.js +2 -3
- package/build-module/components/rich-text/index.js.map +1 -1
- package/build-module/components/rich-text/index.native.js +0 -2
- package/build-module/components/rich-text/index.native.js.map +1 -1
- package/build-module/components/rich-text/use-insert-replacement-text.js +33 -0
- package/build-module/components/rich-text/use-insert-replacement-text.js.map +1 -0
- package/build-module/components/rich-text/use-paste-handler.js +22 -12
- package/build-module/components/rich-text/use-paste-handler.js.map +1 -1
- package/build-module/components/rich-text/use-undo-automatic-change.js +9 -1
- package/build-module/components/rich-text/use-undo-automatic-change.js.map +1 -1
- package/build-module/components/rich-text/utils.js +1 -16
- package/build-module/components/rich-text/utils.js.map +1 -1
- package/build-module/components/spacing-sizes-control/index.js +0 -1
- package/build-module/components/spacing-sizes-control/index.js.map +1 -1
- package/build-module/components/spacing-sizes-control/spacing-input-control.js +12 -3
- package/build-module/components/spacing-sizes-control/spacing-input-control.js.map +1 -1
- package/build-module/components/spacing-sizes-control/utils.js +1 -1
- package/build-module/components/spacing-sizes-control/utils.js.map +1 -1
- package/build-module/components/typewriter/index.js +1 -1
- package/build-module/components/typewriter/index.js.map +1 -1
- package/build-module/components/ungroup-button/index.native.js +3 -2
- package/build-module/components/ungroup-button/index.native.js.map +1 -1
- package/build-module/components/url-input/index.js +46 -43
- package/build-module/components/url-input/index.js.map +1 -1
- package/build-module/components/url-popover/image-url-input-ui.js +3 -3
- package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
- package/build-module/components/use-block-display-information/index.js +9 -5
- package/build-module/components/use-block-display-information/index.js.map +1 -1
- package/build-module/components/use-setting/index.js +8 -1
- package/build-module/components/use-setting/index.js.map +1 -1
- package/build-module/components/writing-flow/index.js +1 -1
- package/build-module/components/writing-flow/index.js.map +1 -1
- package/build-module/hooks/border.js +0 -1
- package/build-module/hooks/border.js.map +1 -1
- package/build-module/hooks/child-layout.js +189 -0
- package/build-module/hooks/child-layout.js.map +1 -0
- package/build-module/hooks/color-panel.js +0 -1
- package/build-module/hooks/color-panel.js.map +1 -1
- package/build-module/hooks/color.js +1 -2
- package/build-module/hooks/color.js.map +1 -1
- package/build-module/hooks/content-lock-ui.js +1 -1
- package/build-module/hooks/content-lock-ui.js.map +1 -1
- package/build-module/hooks/dimensions.js +25 -8
- package/build-module/hooks/dimensions.js.map +1 -1
- package/build-module/hooks/font-family.js +5 -5
- package/build-module/hooks/font-family.js.map +1 -1
- package/build-module/hooks/font-size.js +5 -3
- package/build-module/hooks/font-size.js.map +1 -1
- package/build-module/hooks/layout.js +55 -0
- package/build-module/hooks/layout.js.map +1 -1
- package/build-module/hooks/min-height.js +3 -9
- package/build-module/hooks/min-height.js.map +1 -1
- package/build-module/hooks/use-typography-props.js +11 -8
- package/build-module/hooks/use-typography-props.js.map +1 -1
- package/build-module/store/reducer.js +409 -274
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +55 -48
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/utils/pasting.js +6 -10
- package/build-module/utils/pasting.js.map +1 -1
- package/build-module/utils/sorting.js +56 -0
- package/build-module/utils/sorting.js.map +1 -0
- package/build-style/content-rtl.css +701 -0
- package/build-style/content.css +701 -0
- package/build-style/default-editor-styles-rtl.css +17 -3
- package/build-style/default-editor-styles.css +17 -3
- package/build-style/style-rtl.css +313 -665
- package/build-style/style.css +313 -665
- package/package.json +32 -30
- package/src/autocompleters/block.js +2 -6
- package/src/autocompleters/link.js +2 -0
- package/src/components/alignment-control/test/index.js +6 -1
- package/src/components/alignment-control/ui.js +1 -7
- package/src/components/block-alignment-control/test/index.js +6 -1
- package/src/components/block-alignment-control/use-available-alignments.js +4 -3
- package/src/components/block-card/index.js +46 -2
- package/src/components/block-card/style.scss +4 -0
- package/src/components/block-content-overlay/{style.scss → content.scss} +7 -1
- package/src/components/block-draggable/content.scss +20 -0
- package/src/components/block-draggable/index.native.js +54 -40
- package/src/components/block-draggable/style.scss +0 -21
- package/src/components/block-draggable/test/helpers.native.js +7 -9
- package/src/components/block-draggable/test/index.native.js +35 -45
- package/src/components/block-edit/edit.js +5 -2
- package/src/components/block-edit/edit.native.js +5 -6
- package/src/components/block-icon/index.js +4 -2
- package/src/components/block-icon/test/index.js +9 -5
- package/src/components/block-inspector/index.js +173 -85
- package/src/components/block-inspector/style.scss +16 -1
- package/src/components/block-list/block-list-context.native.js +5 -8
- package/src/components/block-list/block.js +74 -23
- package/src/components/block-list/block.native.js +78 -23
- package/src/components/block-list/{style.scss → content.scss} +1 -15
- package/src/components/block-list-appender/{style.scss → content.scss} +0 -0
- package/src/components/block-list-appender/index.js +65 -54
- package/src/components/block-list-appender/index.native.js +45 -34
- package/src/components/block-mobile-toolbar/block-actions-menu.native.js +42 -28
- package/src/components/block-mobile-toolbar/index.native.js +1 -1
- package/src/components/block-mobile-toolbar/test/__snapshots__/block-actions-menu.native.js.snap +125 -0
- package/src/components/block-mobile-toolbar/test/block-actions-menu.native.js +439 -0
- package/src/components/block-mover/test/__snapshots__/index.native.js.snap +42 -2
- package/src/components/block-mover/test/index.native.js +157 -1
- package/src/components/block-pattern-setup/index.js +17 -7
- package/src/components/block-pattern-setup/style.scss +29 -1
- package/src/components/block-patterns-list/index.js +47 -24
- package/src/components/block-preview/README.md +15 -10
- package/src/components/block-preview/auto.js +7 -1
- package/src/components/block-preview/content.scss +4 -0
- package/src/components/block-preview/index.js +7 -12
- package/src/components/block-preview/style.scss +0 -7
- package/src/components/block-preview/test/index.js +18 -35
- package/src/components/block-selection-clearer/test/index.js +12 -12
- package/src/components/block-settings-menu/block-settings-dropdown.js +32 -20
- package/src/components/block-styles/index.native.js +1 -2
- package/src/components/block-styles/utils.js +5 -7
- package/src/components/block-switcher/test/index.js +6 -1
- package/src/components/block-toolbar/index.js +12 -5
- package/src/components/block-toolbar/index.native.js +8 -11
- package/src/components/block-toolbar/style.scss +10 -0
- package/src/components/block-tools/insertion-point.js +3 -47
- package/src/components/block-tools/selected-block-popover.js +1 -3
- package/src/components/block-tools/style.scss +12 -5
- package/src/components/block-variation-picker/index.js +6 -5
- package/src/components/block-vertical-alignment-control/test/index.js +6 -1
- package/src/components/colors/test/with-colors.js +2 -0
- package/src/components/colors/utils.js +5 -3
- package/src/components/colors-gradients/control.js +0 -7
- package/src/components/colors-gradients/dropdown.js +0 -2
- package/src/components/colors-gradients/panel-color-gradient-settings.js +4 -22
- package/src/components/colors-gradients/use-multiple-origin-colors-and-gradients.js +4 -2
- package/src/components/copy-handler/index.js +53 -7
- package/src/components/default-block-appender/{style.scss → content.scss} +0 -0
- package/src/components/default-block-appender/test/index.js +2 -0
- package/src/components/font-sizes/fluid-utils.js +7 -1
- package/src/components/font-sizes/utils.js +5 -3
- package/src/components/font-sizes/with-font-sizes.js +4 -4
- package/src/components/gradients/use-gradient.js +2 -7
- package/src/components/height-control/index.js +123 -0
- package/src/components/height-control/stories/index.js +21 -0
- package/src/components/height-control/style.scss +5 -0
- package/src/components/iframe/index.js +33 -121
- package/src/components/iframe/use-compatibility-styles.js +95 -0
- package/src/components/image-editor/use-save-image.js +2 -0
- package/src/components/image-editor/zoom-dropdown.js +1 -0
- package/src/components/image-size-control/test/index.js +147 -79
- package/src/components/index.js +1 -0
- package/src/components/inner-blocks/{style.scss → content.scss} +0 -0
- package/src/components/inner-blocks/index.js +26 -7
- package/src/components/inner-blocks/use-inner-block-template-sync.js +28 -10
- package/src/components/inserter/block-patterns-explorer/sidebar.js +1 -0
- package/src/components/inserter/block-patterns-tab.js +28 -71
- package/src/components/inserter/block-types-tab.js +3 -2
- package/src/components/inserter/hooks/use-debounced-input.js +17 -0
- package/src/components/inserter/hooks/use-insertion-point.js +3 -2
- package/src/components/inserter/index.js +24 -3
- package/src/components/inserter/index.native.js +1 -1
- package/src/components/inserter/media-tab/hooks.js +89 -0
- package/src/components/inserter/media-tab/index.js +3 -0
- package/src/components/inserter/media-tab/media-list.js +93 -0
- package/src/components/inserter/media-tab/media-panel.js +83 -0
- package/src/components/inserter/media-tab/media-tab.js +135 -0
- package/src/components/inserter/media-tab/utils.js +37 -0
- package/src/components/inserter/menu.js +55 -13
- package/src/components/inserter/mobile-tab-navigation.js +85 -0
- package/src/components/inserter/quick-inserter.js +4 -0
- package/src/components/inserter/search-items.js +1 -2
- package/src/components/inserter/search-results.js +5 -2
- package/src/components/inserter/stories/index.js +1 -1
- package/src/components/inserter/stories/{fixtures.js → utils/fixtures.js} +0 -0
- package/src/components/inserter/style.scss +176 -11
- package/src/components/inserter/tabs.js +12 -1
- package/src/components/inserter-list-item/index.js +11 -1
- package/src/components/inserter-list-item/style.scss +26 -0
- package/src/components/inspector-controls/groups.js +2 -0
- package/src/components/inspector-controls-tabs/advanced-controls-panel.js +37 -0
- package/src/components/inspector-controls-tabs/index.js +62 -0
- package/src/components/inspector-controls-tabs/settings-tab.js +18 -0
- package/src/components/inspector-controls-tabs/styles-tab.js +51 -0
- package/src/components/inspector-controls-tabs/use-inspector-controls-tabs.js +89 -0
- package/src/components/inspector-controls-tabs/use-is-list-view-tab-disabled.js +9 -0
- package/src/components/inspector-controls-tabs/utils.js +28 -0
- package/src/components/line-height-control/test/index.js +5 -5
- package/src/components/link-control/README.md +1 -1
- package/src/components/link-control/index.js +1 -0
- package/src/components/link-control/search-input.js +0 -1
- package/src/components/link-control/test/index.js +204 -403
- package/src/components/link-control/use-internal-input-value.js +3 -3
- package/src/components/list-view/block-select-button.js +1 -1
- package/src/components/list-view/block.js +3 -0
- package/src/components/list-view/branch.js +10 -8
- package/src/components/list-view/style.scss +21 -16
- package/src/components/media-placeholder/{style.scss → content.scss} +0 -0
- package/src/components/media-replace-flow/test/index.js +39 -9
- package/src/components/media-upload/test/index.native.js +2 -0
- package/src/components/off-canvas-editor/appender.js +98 -0
- package/src/components/off-canvas-editor/block-edit-button.js +27 -0
- package/src/components/off-canvas-editor/block-select-button.js +6 -2
- package/src/components/off-canvas-editor/block.js +160 -77
- package/src/components/off-canvas-editor/branch.js +3 -5
- package/src/components/off-canvas-editor/index.js +68 -33
- package/src/components/off-canvas-editor/leaf.js +5 -1
- package/src/components/off-canvas-editor/link-ui.js +166 -0
- package/src/components/off-canvas-editor/style.scss +19 -386
- package/src/components/off-canvas-editor/test/use-inserted-block.js +108 -0
- package/src/components/off-canvas-editor/update-attributes.js +99 -0
- package/src/components/off-canvas-editor/use-inserted-block.js +47 -0
- package/src/components/plain-text/{style.scss → content.scss} +0 -0
- package/src/components/recursion-provider/test/index.js +27 -29
- package/src/components/responsive-block-control/label.js +2 -3
- package/src/components/responsive-block-control/test/index.js +4 -2
- package/src/components/rich-text/content.scss +42 -0
- package/src/components/rich-text/format-edit.js +6 -10
- package/src/components/rich-text/format-toolbar/index.js +6 -4
- package/src/components/rich-text/index.js +3 -2
- package/src/components/rich-text/index.native.js +0 -2
- package/src/components/rich-text/style.scss +0 -43
- package/src/components/rich-text/use-insert-replacement-text.js +31 -0
- package/src/components/rich-text/use-paste-handler.js +33 -14
- package/src/components/rich-text/use-undo-automatic-change.js +7 -1
- package/src/components/rich-text/utils.js +2 -21
- package/src/components/spacing-sizes-control/index.js +0 -1
- package/src/components/spacing-sizes-control/spacing-input-control.js +9 -0
- package/src/components/spacing-sizes-control/utils.js +1 -1
- package/src/components/typewriter/index.js +3 -1
- package/src/components/ungroup-button/index.native.js +6 -2
- package/src/components/url-input/index.js +57 -73
- package/src/components/url-input/test/button.js +2 -0
- package/src/components/url-popover/image-url-input-ui.js +5 -4
- package/src/components/url-popover/test/__snapshots__/index.js.snap +8 -6
- package/src/components/url-popover/test/index.js +37 -9
- package/src/components/use-block-display-information/index.js +14 -5
- package/src/components/use-setting/index.js +13 -1
- package/src/components/use-setting/test/index.js +99 -0
- package/src/components/warning/test/index.js +2 -0
- package/src/components/writing-flow/index.js +1 -1
- package/src/content.scss +10 -0
- package/src/hooks/border.js +0 -1
- package/src/hooks/child-layout.js +190 -0
- package/src/hooks/color-panel.js +0 -1
- package/src/hooks/color.js +0 -2
- package/src/hooks/content-lock-ui.js +1 -1
- package/src/hooks/dimensions.js +45 -7
- package/src/hooks/font-family.js +3 -5
- package/src/hooks/font-size.js +13 -4
- package/src/hooks/layout.js +60 -0
- package/src/hooks/min-height.js +2 -19
- package/src/hooks/test/use-typography-props.js +26 -0
- package/src/hooks/use-typography-props.js +15 -7
- package/src/store/reducer.js +471 -428
- package/src/store/selectors.js +57 -59
- package/src/store/test/performance.js +71 -0
- package/src/store/test/reducer.js +623 -491
- package/src/store/test/selectors.js +1820 -1306
- package/src/style.scss +4 -7
- package/src/utils/pasting.js +3 -9
- package/src/utils/sorting.js +54 -0
- package/src/utils/test/sorting.js +49 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/build/components/block-preview/live.js +0 -30
- package/build/components/block-preview/live.js.map +0 -1
- package/build/components/colors-gradients/use-common-single-multiple-selects.js +0 -21
- package/build/components/colors-gradients/use-common-single-multiple-selects.js.map +0 -1
- package/build/components/rich-text/file-paste-handler.js +0 -21
- package/build/components/rich-text/file-paste-handler.js.map +0 -1
- package/build-module/components/block-preview/live.js +0 -20
- package/build-module/components/block-preview/live.js.map +0 -1
- package/build-module/components/colors-gradients/use-common-single-multiple-selects.js +0 -11
- package/build-module/components/colors-gradients/use-common-single-multiple-selects.js.map +0 -1
- package/build-module/components/rich-text/file-paste-handler.js +0 -13
- package/build-module/components/rich-text/file-paste-handler.js.map +0 -1
- package/src/components/block-preview/live.js +0 -19
- package/src/components/colors-gradients/use-common-single-multiple-selects.js +0 -11
- package/src/components/rich-text/file-paste-handler.js +0 -13
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/block-editor",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "11.1.0",
|
|
4
4
|
"description": "Generic block editor.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -33,37 +33,39 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@babel/runtime": "^7.16.0",
|
|
35
35
|
"@react-spring/web": "^9.4.5",
|
|
36
|
-
"@wordpress/a11y": "^3.
|
|
37
|
-
"@wordpress/api-fetch": "^6.
|
|
38
|
-
"@wordpress/blob": "^3.
|
|
39
|
-
"@wordpress/blocks": "^
|
|
40
|
-
"@wordpress/components": "^
|
|
41
|
-
"@wordpress/compose": "^
|
|
42
|
-
"@wordpress/data": "^
|
|
43
|
-
"@wordpress/date": "^4.
|
|
44
|
-
"@wordpress/deprecated": "^3.
|
|
45
|
-
"@wordpress/dom": "^3.
|
|
46
|
-
"@wordpress/element": "^
|
|
47
|
-
"@wordpress/
|
|
48
|
-
"@wordpress/
|
|
49
|
-
"@wordpress/
|
|
50
|
-
"@wordpress/
|
|
51
|
-
"@wordpress/
|
|
52
|
-
"@wordpress/
|
|
53
|
-
"@wordpress/
|
|
54
|
-
"@wordpress/
|
|
55
|
-
"@wordpress/
|
|
56
|
-
"@wordpress/
|
|
57
|
-
"@wordpress/
|
|
58
|
-
"@wordpress/
|
|
59
|
-
"@wordpress/
|
|
60
|
-
"@wordpress/
|
|
61
|
-
"@wordpress/
|
|
36
|
+
"@wordpress/a11y": "^3.24.0",
|
|
37
|
+
"@wordpress/api-fetch": "^6.21.0",
|
|
38
|
+
"@wordpress/blob": "^3.24.0",
|
|
39
|
+
"@wordpress/blocks": "^12.1.0",
|
|
40
|
+
"@wordpress/components": "^23.1.0",
|
|
41
|
+
"@wordpress/compose": "^6.1.0",
|
|
42
|
+
"@wordpress/data": "^8.1.0",
|
|
43
|
+
"@wordpress/date": "^4.24.0",
|
|
44
|
+
"@wordpress/deprecated": "^3.24.0",
|
|
45
|
+
"@wordpress/dom": "^3.24.0",
|
|
46
|
+
"@wordpress/element": "^5.1.0",
|
|
47
|
+
"@wordpress/escape-html": "^2.24.0",
|
|
48
|
+
"@wordpress/hooks": "^3.24.0",
|
|
49
|
+
"@wordpress/html-entities": "^3.24.0",
|
|
50
|
+
"@wordpress/i18n": "^4.24.0",
|
|
51
|
+
"@wordpress/icons": "^9.15.0",
|
|
52
|
+
"@wordpress/is-shallow-equal": "^4.24.0",
|
|
53
|
+
"@wordpress/keyboard-shortcuts": "^4.1.0",
|
|
54
|
+
"@wordpress/keycodes": "^3.24.0",
|
|
55
|
+
"@wordpress/notices": "^3.24.0",
|
|
56
|
+
"@wordpress/rich-text": "^6.1.0",
|
|
57
|
+
"@wordpress/shortcode": "^3.24.0",
|
|
58
|
+
"@wordpress/style-engine": "^1.7.0",
|
|
59
|
+
"@wordpress/token-list": "^2.24.0",
|
|
60
|
+
"@wordpress/url": "^3.25.0",
|
|
61
|
+
"@wordpress/warning": "^2.24.0",
|
|
62
|
+
"@wordpress/wordcount": "^3.24.0",
|
|
62
63
|
"change-case": "^4.1.2",
|
|
63
64
|
"classnames": "^2.3.1",
|
|
64
65
|
"colord": "^2.7.0",
|
|
65
66
|
"diff": "^4.0.2",
|
|
66
67
|
"dom-scroll-into-view": "^1.2.1",
|
|
68
|
+
"fast-deep-equal": "^3.1.3",
|
|
67
69
|
"inherits": "^2.0.3",
|
|
68
70
|
"lodash": "^4.17.21",
|
|
69
71
|
"react-autosize-textarea": "^7.1.0",
|
|
@@ -73,11 +75,11 @@
|
|
|
73
75
|
"traverse": "^0.6.6"
|
|
74
76
|
},
|
|
75
77
|
"peerDependencies": {
|
|
76
|
-
"react": "^
|
|
77
|
-
"react-dom": "^
|
|
78
|
+
"react": "^18.0.0",
|
|
79
|
+
"react-dom": "^18.0.0"
|
|
78
80
|
},
|
|
79
81
|
"publishConfig": {
|
|
80
82
|
"access": "public"
|
|
81
83
|
},
|
|
82
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "200bee7b06b15f6fa655e25b6ab69cbd6b49a357"
|
|
83
85
|
}
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { orderBy } from 'lodash';
|
|
5
|
-
|
|
6
1
|
/**
|
|
7
2
|
* WordPress dependencies
|
|
8
3
|
*/
|
|
@@ -20,6 +15,7 @@ import { searchBlockItems } from '../components/inserter/search-items';
|
|
|
20
15
|
import useBlockTypesState from '../components/inserter/hooks/use-block-types-state';
|
|
21
16
|
import BlockIcon from '../components/block-icon';
|
|
22
17
|
import { store as blockEditorStore } from '../store';
|
|
18
|
+
import { orderBy } from '../utils/sorting';
|
|
23
19
|
|
|
24
20
|
const noop = () => {};
|
|
25
21
|
const SHOWN_BLOCK_TYPES = 9;
|
|
@@ -68,7 +64,7 @@ function createBlockCompleter() {
|
|
|
68
64
|
collections,
|
|
69
65
|
filterValue
|
|
70
66
|
)
|
|
71
|
-
: orderBy( items,
|
|
67
|
+
: orderBy( items, 'frecency', 'desc' );
|
|
72
68
|
|
|
73
69
|
return initialFilteredItems
|
|
74
70
|
.filter( ( item ) => item.name !== selectedBlockName )
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
+
// Disable Reason: Needs to be refactored.
|
|
5
|
+
// eslint-disable-next-line no-restricted-imports
|
|
4
6
|
import apiFetch from '@wordpress/api-fetch';
|
|
5
7
|
import { addQueryArgs } from '@wordpress/url';
|
|
6
8
|
import { Icon, page, post } from '@wordpress/icons';
|
|
@@ -14,6 +14,8 @@ import { alignLeft, alignCenter } from '@wordpress/icons';
|
|
|
14
14
|
*/
|
|
15
15
|
import AlignmentUI from '../ui';
|
|
16
16
|
|
|
17
|
+
jest.useFakeTimers();
|
|
18
|
+
|
|
17
19
|
describe( 'AlignmentUI', () => {
|
|
18
20
|
const alignment = 'left';
|
|
19
21
|
const onChangeSpy = jest.fn();
|
|
@@ -52,7 +54,7 @@ describe( 'AlignmentUI', () => {
|
|
|
52
54
|
advanceTimers: jest.advanceTimersByTime,
|
|
53
55
|
} );
|
|
54
56
|
|
|
55
|
-
render(
|
|
57
|
+
const { unmount } = render(
|
|
56
58
|
<AlignmentUI
|
|
57
59
|
isToolbar
|
|
58
60
|
value={ alignment }
|
|
@@ -77,6 +79,9 @@ describe( 'AlignmentUI', () => {
|
|
|
77
79
|
name: /^Align text \w+$/,
|
|
78
80
|
} )
|
|
79
81
|
).toHaveLength( 3 );
|
|
82
|
+
|
|
83
|
+
// Cancel running effects, like delayed dropdown menu popover positioning.
|
|
84
|
+
unmount();
|
|
80
85
|
} );
|
|
81
86
|
|
|
82
87
|
test( 'should call on change with undefined when a control is already active', async () => {
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { find } from 'lodash';
|
|
5
|
-
|
|
6
1
|
/**
|
|
7
2
|
* WordPress dependencies
|
|
8
3
|
*/
|
|
@@ -46,8 +41,7 @@ function AlignmentUI( {
|
|
|
46
41
|
return () => onChange( value === align ? undefined : align );
|
|
47
42
|
}
|
|
48
43
|
|
|
49
|
-
const activeAlignment = find(
|
|
50
|
-
alignmentControls,
|
|
44
|
+
const activeAlignment = alignmentControls.find(
|
|
51
45
|
( control ) => control.align === value
|
|
52
46
|
);
|
|
53
47
|
|
|
@@ -9,6 +9,8 @@ import userEvent from '@testing-library/user-event';
|
|
|
9
9
|
*/
|
|
10
10
|
import BlockAlignmentUI from '../ui';
|
|
11
11
|
|
|
12
|
+
jest.useFakeTimers();
|
|
13
|
+
|
|
12
14
|
describe( 'BlockAlignmentUI', () => {
|
|
13
15
|
const alignment = 'left';
|
|
14
16
|
const onChange = jest.fn();
|
|
@@ -47,7 +49,7 @@ describe( 'BlockAlignmentUI', () => {
|
|
|
47
49
|
advanceTimers: jest.advanceTimersByTime,
|
|
48
50
|
} );
|
|
49
51
|
|
|
50
|
-
render(
|
|
52
|
+
const { unmount } = render(
|
|
51
53
|
<BlockAlignmentUI
|
|
52
54
|
value={ alignment }
|
|
53
55
|
onChange={ onChange }
|
|
@@ -72,6 +74,9 @@ describe( 'BlockAlignmentUI', () => {
|
|
|
72
74
|
name: /^Align \w+$/,
|
|
73
75
|
} )
|
|
74
76
|
).toHaveLength( 3 );
|
|
77
|
+
|
|
78
|
+
// Cancel running effects, like delayed dropdown menu popover positioning.
|
|
79
|
+
unmount();
|
|
75
80
|
} );
|
|
76
81
|
|
|
77
82
|
test( 'should call onChange with undefined, when the control is already active', async () => {
|
|
@@ -10,6 +10,7 @@ import { useLayout } from '../block-list/layout';
|
|
|
10
10
|
import { store as blockEditorStore } from '../../store';
|
|
11
11
|
import { getLayoutType } from '../../layouts';
|
|
12
12
|
|
|
13
|
+
const EMPTY_ARRAY = [];
|
|
13
14
|
const DEFAULT_CONTROLS = [ 'none', 'left', 'center', 'right', 'wide', 'full' ];
|
|
14
15
|
const WIDE_CONTROLS = [ 'wide', 'full' ];
|
|
15
16
|
|
|
@@ -40,14 +41,14 @@ export default function useAvailableAlignments( controls = DEFAULT_CONTROLS ) {
|
|
|
40
41
|
// While we treat `none` as an alignment, we shouldn't return it if no
|
|
41
42
|
// other alignments exist.
|
|
42
43
|
if ( alignments.length === 1 && alignments[ 0 ].name === 'none' ) {
|
|
43
|
-
return
|
|
44
|
+
return EMPTY_ARRAY;
|
|
44
45
|
}
|
|
45
46
|
return alignments;
|
|
46
47
|
}
|
|
47
48
|
|
|
48
49
|
// Starting here, it's the fallback for themes not supporting the layout config.
|
|
49
50
|
if ( layoutType.name !== 'default' && layoutType.name !== 'constrained' ) {
|
|
50
|
-
return
|
|
51
|
+
return EMPTY_ARRAY;
|
|
51
52
|
}
|
|
52
53
|
const { alignments: availableAlignments = DEFAULT_CONTROLS } = layout;
|
|
53
54
|
const enabledControls = controls
|
|
@@ -66,7 +67,7 @@ export default function useAvailableAlignments( controls = DEFAULT_CONTROLS ) {
|
|
|
66
67
|
enabledControls.length === 1 &&
|
|
67
68
|
enabledControls[ 0 ].name === 'none'
|
|
68
69
|
) {
|
|
69
|
-
return
|
|
70
|
+
return EMPTY_ARRAY;
|
|
70
71
|
}
|
|
71
72
|
|
|
72
73
|
return enabledControls;
|
|
@@ -1,14 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import classnames from 'classnames';
|
|
5
|
+
|
|
1
6
|
/**
|
|
2
7
|
* WordPress dependencies
|
|
3
8
|
*/
|
|
4
9
|
import deprecated from '@wordpress/deprecated';
|
|
10
|
+
import { Button } from '@wordpress/components';
|
|
11
|
+
import { chevronLeft, chevronRight } from '@wordpress/icons';
|
|
12
|
+
import { __, isRTL } from '@wordpress/i18n';
|
|
13
|
+
import { useSelect, useDispatch } from '@wordpress/data';
|
|
5
14
|
|
|
6
15
|
/**
|
|
7
16
|
* Internal dependencies
|
|
8
17
|
*/
|
|
9
18
|
import BlockIcon from '../block-icon';
|
|
19
|
+
import { store as blockEditorStore } from '../../store';
|
|
10
20
|
|
|
11
|
-
function BlockCard( { title, icon, description, blockType } ) {
|
|
21
|
+
function BlockCard( { title, icon, description, blockType, className } ) {
|
|
12
22
|
if ( blockType ) {
|
|
13
23
|
deprecated( '`blockType` property in `BlockCard component`', {
|
|
14
24
|
since: '5.7',
|
|
@@ -16,8 +26,42 @@ function BlockCard( { title, icon, description, blockType } ) {
|
|
|
16
26
|
} );
|
|
17
27
|
( { title, icon, description } = blockType );
|
|
18
28
|
}
|
|
29
|
+
|
|
30
|
+
const isOffCanvasNavigationEditorEnabled =
|
|
31
|
+
window?.__experimentalEnableOffCanvasNavigationEditor === true;
|
|
32
|
+
|
|
33
|
+
const { parentNavBlockClientId } = useSelect( ( select ) => {
|
|
34
|
+
const { getSelectedBlockClientId, getBlockParentsByBlockName } =
|
|
35
|
+
select( blockEditorStore );
|
|
36
|
+
|
|
37
|
+
const _selectedBlockClientId = getSelectedBlockClientId();
|
|
38
|
+
|
|
39
|
+
return {
|
|
40
|
+
parentNavBlockClientId: getBlockParentsByBlockName(
|
|
41
|
+
_selectedBlockClientId,
|
|
42
|
+
'core/navigation',
|
|
43
|
+
true
|
|
44
|
+
)[ 0 ],
|
|
45
|
+
};
|
|
46
|
+
}, [] );
|
|
47
|
+
|
|
48
|
+
const { selectBlock } = useDispatch( blockEditorStore );
|
|
49
|
+
|
|
19
50
|
return (
|
|
20
|
-
<div className=
|
|
51
|
+
<div className={ classnames( 'block-editor-block-card', className ) }>
|
|
52
|
+
{ isOffCanvasNavigationEditorEnabled && parentNavBlockClientId && (
|
|
53
|
+
<Button
|
|
54
|
+
onClick={ () => selectBlock( parentNavBlockClientId ) }
|
|
55
|
+
label={ __( 'Go to parent Navigation block' ) }
|
|
56
|
+
style={
|
|
57
|
+
// TODO: This style override is also used in ToolsPanelHeader.
|
|
58
|
+
// It should be supported out-of-the-box by Button.
|
|
59
|
+
{ minWidth: 24, padding: 0 }
|
|
60
|
+
}
|
|
61
|
+
icon={ isRTL() ? chevronRight : chevronLeft }
|
|
62
|
+
isSmall
|
|
63
|
+
/>
|
|
64
|
+
) }
|
|
21
65
|
<BlockIcon icon={ icon } showColors />
|
|
22
66
|
<div className="block-editor-block-card__content">
|
|
23
67
|
<h2 className="block-editor-block-card__title">{ title }</h2>
|
|
@@ -19,10 +19,16 @@
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
&:hover:not(.is-dragging-blocks)::before {
|
|
22
|
-
background: rgba(var(--wp-admin-theme-color--rgb), 0.
|
|
22
|
+
background: rgba(var(--wp-admin-theme-color--rgb), 0.04);
|
|
23
23
|
box-shadow: 0 0 0 $border-width var(--wp-admin-theme-color) inset;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
&.is-reusable:hover:not(.is-dragging-blocks)::before,
|
|
27
|
+
&.wp-block-template-part:hover:not(.is-dragging-blocks)::before {
|
|
28
|
+
background: rgba(var(--wp-block-synced-color--rgb), 0.04);
|
|
29
|
+
box-shadow: 0 0 0 $border-width var(--wp-block-synced-color) inset;
|
|
30
|
+
}
|
|
31
|
+
|
|
26
32
|
&.is-selected:not(.is-dragging-blocks)::before {
|
|
27
33
|
box-shadow: 0 0 0 $border-width var(--wp-admin-theme-color) inset;
|
|
28
34
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// This creates a "slot" where the block you're dragging appeared.
|
|
2
|
+
// We use !important as one of the rules are meant to be overriden.
|
|
3
|
+
.block-editor-block-list__layout .is-dragging {
|
|
4
|
+
background-color: currentColor !important;
|
|
5
|
+
opacity: 0.05 !important;
|
|
6
|
+
border-radius: $radius-block-ui !important;
|
|
7
|
+
|
|
8
|
+
// Disabling pointer events during the drag event is necessary,
|
|
9
|
+
// lest the block might affect your drag operation.
|
|
10
|
+
pointer-events: none !important;
|
|
11
|
+
|
|
12
|
+
// Hide the multi selection indicator when dragging.
|
|
13
|
+
&::selection {
|
|
14
|
+
background: transparent !important;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&::after {
|
|
18
|
+
content: none !important;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -285,6 +285,58 @@ const BlockDraggableWrapper = ( { children, isRTL } ) => {
|
|
|
285
285
|
);
|
|
286
286
|
};
|
|
287
287
|
|
|
288
|
+
function useIsScreenReaderEnabled() {
|
|
289
|
+
const [ isScreenReaderEnabled, setIsScreenReaderEnabled ] =
|
|
290
|
+
useState( false );
|
|
291
|
+
|
|
292
|
+
useEffect( () => {
|
|
293
|
+
let mounted = true;
|
|
294
|
+
|
|
295
|
+
const changeListener = AccessibilityInfo.addEventListener(
|
|
296
|
+
'screenReaderChanged',
|
|
297
|
+
( enabled ) => setIsScreenReaderEnabled( enabled )
|
|
298
|
+
);
|
|
299
|
+
|
|
300
|
+
AccessibilityInfo.isScreenReaderEnabled().then(
|
|
301
|
+
( screenReaderEnabled ) => {
|
|
302
|
+
if ( mounted && screenReaderEnabled ) {
|
|
303
|
+
setIsScreenReaderEnabled( screenReaderEnabled );
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
);
|
|
307
|
+
|
|
308
|
+
return () => {
|
|
309
|
+
mounted = false;
|
|
310
|
+
|
|
311
|
+
changeListener.remove();
|
|
312
|
+
};
|
|
313
|
+
}, [] );
|
|
314
|
+
|
|
315
|
+
return isScreenReaderEnabled;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
function useIsEditingText() {
|
|
319
|
+
const [ isEditingText, setIsEditingText ] = useState( () =>
|
|
320
|
+
RCTAztecView.InputState.isFocused()
|
|
321
|
+
);
|
|
322
|
+
|
|
323
|
+
useEffect( () => {
|
|
324
|
+
const onFocusChangeAztec = ( { isFocused } ) => {
|
|
325
|
+
setIsEditingText( isFocused );
|
|
326
|
+
};
|
|
327
|
+
|
|
328
|
+
RCTAztecView.InputState.addFocusChangeListener( onFocusChangeAztec );
|
|
329
|
+
|
|
330
|
+
return () => {
|
|
331
|
+
RCTAztecView.InputState.removeFocusChangeListener(
|
|
332
|
+
onFocusChangeAztec
|
|
333
|
+
);
|
|
334
|
+
};
|
|
335
|
+
}, [] );
|
|
336
|
+
|
|
337
|
+
return isEditingText;
|
|
338
|
+
}
|
|
339
|
+
|
|
288
340
|
/**
|
|
289
341
|
* Block draggable component
|
|
290
342
|
*
|
|
@@ -308,9 +360,8 @@ const BlockDraggable = ( {
|
|
|
308
360
|
testID,
|
|
309
361
|
} ) => {
|
|
310
362
|
const wasBeingDragged = useRef( false );
|
|
311
|
-
const
|
|
312
|
-
const
|
|
313
|
-
useState( false );
|
|
363
|
+
const isEditingText = useIsEditingText();
|
|
364
|
+
const isScreenReaderEnabled = useIsScreenReaderEnabled();
|
|
314
365
|
|
|
315
366
|
const draggingAnimation = {
|
|
316
367
|
opacity: useSharedValue( 1 ),
|
|
@@ -365,43 +416,6 @@ const BlockDraggable = ( {
|
|
|
365
416
|
wasBeingDragged.current = isBeingDragged;
|
|
366
417
|
}, [ isBeingDragged ] );
|
|
367
418
|
|
|
368
|
-
const onFocusChangeAztec = useCallback( ( { isFocused } ) => {
|
|
369
|
-
setIsEditingText( isFocused );
|
|
370
|
-
}, [] );
|
|
371
|
-
|
|
372
|
-
useEffect( () => {
|
|
373
|
-
let mounted = true;
|
|
374
|
-
|
|
375
|
-
const isAnyAztecInputFocused = RCTAztecView.InputState.isFocused();
|
|
376
|
-
if ( isAnyAztecInputFocused ) {
|
|
377
|
-
setIsEditingText( isAnyAztecInputFocused );
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
RCTAztecView.InputState.addFocusChangeListener( onFocusChangeAztec );
|
|
381
|
-
|
|
382
|
-
const screenReaderChangedListener = AccessibilityInfo.addEventListener(
|
|
383
|
-
'screenReaderChanged',
|
|
384
|
-
setIsScreenReaderEnabled
|
|
385
|
-
);
|
|
386
|
-
AccessibilityInfo.isScreenReaderEnabled().then(
|
|
387
|
-
( screenReaderEnabled ) => {
|
|
388
|
-
if ( mounted ) {
|
|
389
|
-
setIsScreenReaderEnabled( screenReaderEnabled );
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
);
|
|
393
|
-
|
|
394
|
-
return () => {
|
|
395
|
-
mounted = false;
|
|
396
|
-
|
|
397
|
-
RCTAztecView.InputState.removeFocusChangeListener(
|
|
398
|
-
onFocusChangeAztec
|
|
399
|
-
);
|
|
400
|
-
|
|
401
|
-
screenReaderChangedListener.remove();
|
|
402
|
-
};
|
|
403
|
-
}, [] );
|
|
404
|
-
|
|
405
419
|
const onLongPressDraggable = useCallback( () => {
|
|
406
420
|
// Ensure that no text input is focused when starting the dragging gesture in order to prevent conflicts with text editing.
|
|
407
421
|
RCTAztecView.InputState.blurCurrentFocusedElement();
|
|
@@ -44,24 +44,3 @@
|
|
|
44
44
|
font-size: $default-font-size;
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
|
|
48
|
-
// This creates a "slot" where the block you're dragging appeared.
|
|
49
|
-
// We use !important as one of the rules are meant to be overriden.
|
|
50
|
-
.block-editor-block-list__layout .is-dragging {
|
|
51
|
-
background-color: currentColor !important;
|
|
52
|
-
opacity: 0.05 !important;
|
|
53
|
-
border-radius: $radius-block-ui !important;
|
|
54
|
-
|
|
55
|
-
// Disabling pointer events during the drag event is necessary,
|
|
56
|
-
// lest the block might affect your drag operation.
|
|
57
|
-
pointer-events: none !important;
|
|
58
|
-
|
|
59
|
-
// Hide the multi selection indicator when dragging.
|
|
60
|
-
&::selection {
|
|
61
|
-
background: transparent !important;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
&::after {
|
|
65
|
-
content: none !important;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
@@ -53,14 +53,14 @@ export const initializeWithBlocksLayouts = async ( blocks ) => {
|
|
|
53
53
|
const initialHtml = blocks.map( ( block ) => block.html ).join( '\n' );
|
|
54
54
|
|
|
55
55
|
const screen = await initializeEditor( { initialHtml } );
|
|
56
|
-
const {
|
|
56
|
+
const { getAllByLabelText } = screen;
|
|
57
57
|
|
|
58
58
|
const waitPromises = [];
|
|
59
59
|
blocks.forEach( ( block, index ) => {
|
|
60
60
|
const a11yLabel = new RegExp(
|
|
61
61
|
`${ block.name } Block\\. Row ${ index + 1 }`
|
|
62
62
|
);
|
|
63
|
-
const element =
|
|
63
|
+
const [ element ] = getAllByLabelText( a11yLabel );
|
|
64
64
|
// "onLayout" event will populate the blocks layouts data.
|
|
65
65
|
fireEvent( element, 'layout', {
|
|
66
66
|
nativeEvent: { layout: block.layout },
|
|
@@ -91,13 +91,11 @@ export const initializeWithBlocksLayouts = async ( blocks ) => {
|
|
|
91
91
|
const nestedA11yLabel = new RegExp(
|
|
92
92
|
`${ nestedBlock.name } Block\\. Row ${ nestedIndex + 1 }`
|
|
93
93
|
);
|
|
94
|
-
|
|
95
|
-
within( element ).
|
|
96
|
-
|
|
97
|
-
{
|
|
98
|
-
|
|
99
|
-
}
|
|
100
|
-
);
|
|
94
|
+
const [ nestedElement ] =
|
|
95
|
+
within( element ).getAllByLabelText( nestedA11yLabel );
|
|
96
|
+
fireEvent( nestedElement, 'layout', {
|
|
97
|
+
nativeEvent: { layout: nestedBlock.layout },
|
|
98
|
+
} );
|
|
101
99
|
} );
|
|
102
100
|
}
|
|
103
101
|
} );
|