@wordpress/block-editor 10.4.0 → 11.0.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 +17 -0
- package/README.md +0 -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/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-inspector/index.js +35 -33
- 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-lock/menu-item.js +1 -1
- package/build/components/block-lock/menu-item.js.map +1 -1
- package/build/components/block-lock/modal.js +16 -9
- package/build/components/block-lock/modal.js.map +1 -1
- package/build/components/block-mobile-toolbar/block-actions-menu.native.js +12 -4
- package/build/components/block-mobile-toolbar/block-actions-menu.native.js.map +1 -1
- package/build/components/block-pattern-setup/index.js +3 -2
- 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/utils.js +3 -3
- package/build/components/block-styles/utils.js.map +1 -1
- package/build/components/block-switcher/index.js +19 -4
- package/build/components/block-switcher/index.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-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 +27 -4
- package/build/components/block-tools/selected-block-popover.js.map +1 -1
- package/build/components/block-variation-picker/index.js +1 -2
- package/build/components/block-variation-picker/index.js.map +1 -1
- package/build/components/colors/with-colors.js +4 -3
- package/build/components/colors/with-colors.js.map +1 -1
- package/build/components/font-sizes/fluid-utils.js +24 -40
- package/build/components/font-sizes/fluid-utils.js.map +1 -1
- package/build/components/font-sizes/with-font-sizes.js +7 -5
- package/build/components/font-sizes/with-font-sizes.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 +11 -8
- package/build/components/iframe/index.js.map +1 -1
- 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 +18 -0
- package/build/components/index.js.map +1 -1
- package/build/components/inner-blocks/index.js +25 -9
- 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/index.js +8 -3
- 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 +103 -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 +1 -0
- package/build/components/inserter/quick-inserter.js.map +1 -1
- package/build/components/inserter/reusable-blocks-tab.js +4 -1
- package/build/components/inserter/reusable-blocks-tab.js.map +1 -1
- package/build/components/inserter/search-results.js +3 -1
- 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 +19 -34
- package/build/components/link-control/index.js.map +1 -1
- package/build/components/link-control/search-input.js +1 -2
- package/build/components/link-control/search-input.js.map +1 -1
- package/build/components/link-control/use-internal-input-value.js +26 -0
- package/build/components/link-control/use-internal-input-value.js.map +1 -0
- package/build/components/list-view/block.js +10 -5
- package/build/components/list-view/block.js.map +1 -1
- package/build/components/list-view/branch.js +22 -15
- 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 +104 -0
- package/build/components/off-canvas-editor/appender.js.map +1 -0
- package/build/components/off-canvas-editor/block-contents.js +100 -0
- package/build/components/off-canvas-editor/block-contents.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 +119 -0
- package/build/components/off-canvas-editor/block-select-button.js.map +1 -0
- package/build/components/off-canvas-editor/block.js +324 -0
- package/build/components/off-canvas-editor/block.js.map +1 -0
- package/build/components/off-canvas-editor/branch.js +179 -0
- package/build/components/off-canvas-editor/branch.js.map +1 -0
- package/build/components/off-canvas-editor/context.js +19 -0
- package/build/components/off-canvas-editor/context.js.map +1 -0
- package/build/components/off-canvas-editor/drop-indicator.js +118 -0
- package/build/components/off-canvas-editor/drop-indicator.js.map +1 -0
- package/build/components/off-canvas-editor/expander.js +41 -0
- package/build/components/off-canvas-editor/expander.js.map +1 -0
- package/build/components/off-canvas-editor/index.js +213 -0
- package/build/components/off-canvas-editor/index.js.map +1 -0
- package/build/components/off-canvas-editor/leaf.js +60 -0
- package/build/components/off-canvas-editor/leaf.js.map +1 -0
- 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-block-selection.js +139 -0
- package/build/components/off-canvas-editor/use-block-selection.js.map +1 -0
- package/build/components/off-canvas-editor/use-list-view-client-ids.js +33 -0
- package/build/components/off-canvas-editor/use-list-view-client-ids.js.map +1 -0
- package/build/components/off-canvas-editor/use-list-view-drop-zone.js +235 -0
- package/build/components/off-canvas-editor/use-list-view-drop-zone.js.map +1 -0
- package/build/components/off-canvas-editor/use-list-view-expand-selected-item.js +60 -0
- package/build/components/off-canvas-editor/use-list-view-expand-selected-item.js.map +1 -0
- package/build/components/off-canvas-editor/utils.js +60 -0
- package/build/components/off-canvas-editor/utils.js.map +1 -0
- 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-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/spacing-input-control.js +12 -3
- package/build/components/spacing-sizes-control/spacing-input-control.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/index.js +31 -2
- package/build/components/url-popover/index.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 +10 -2
- package/build/components/use-setting/index.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 +17 -1
- package/build/hooks/color-panel.js.map +1 -1
- package/build/hooks/color.js +1 -1
- package/build/hooks/color.js.map +1 -1
- package/build/hooks/content-lock-ui.js +14 -7
- package/build/hooks/content-lock-ui.js.map +1 -1
- package/build/hooks/dimensions.js +65 -16
- package/build/hooks/dimensions.js.map +1 -1
- package/build/hooks/layout.js +59 -3
- package/build/hooks/layout.js.map +1 -1
- package/build/hooks/margin.js +4 -2
- package/build/hooks/margin.js.map +1 -1
- package/build/hooks/min-height.js +139 -0
- package/build/hooks/min-height.js.map +1 -0
- package/build/hooks/padding.js +4 -2
- package/build/hooks/padding.js.map +1 -1
- package/build/hooks/style.js +3 -2
- package/build/hooks/style.js.map +1 -1
- package/build/layouts/flex.js +22 -21
- package/build/layouts/flex.js.map +1 -1
- package/build/store/actions.js +26 -0
- package/build/store/actions.js.map +1 -1
- package/build/store/reducer.js +420 -265
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +73 -49
- package/build/store/selectors.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/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-inspector/index.js +32 -30
- 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-lock/menu-item.js +2 -2
- package/build-module/components/block-lock/menu-item.js.map +1 -1
- package/build-module/components/block-lock/modal.js +17 -10
- package/build-module/components/block-lock/modal.js.map +1 -1
- package/build-module/components/block-mobile-toolbar/block-actions-menu.native.js +13 -6
- package/build-module/components/block-mobile-toolbar/block-actions-menu.native.js.map +1 -1
- package/build-module/components/block-pattern-setup/index.js +3 -2
- 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/utils.js +3 -3
- package/build-module/components/block-styles/utils.js.map +1 -1
- package/build-module/components/block-switcher/index.js +19 -4
- package/build-module/components/block-switcher/index.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-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 +27 -5
- package/build-module/components/block-tools/selected-block-popover.js.map +1 -1
- package/build-module/components/block-variation-picker/index.js +1 -2
- package/build-module/components/block-variation-picker/index.js.map +1 -1
- package/build-module/components/colors/with-colors.js +5 -4
- package/build-module/components/colors/with-colors.js.map +1 -1
- package/build-module/components/font-sizes/fluid-utils.js +24 -40
- package/build-module/components/font-sizes/fluid-utils.js.map +1 -1
- package/build-module/components/font-sizes/with-font-sizes.js +8 -6
- package/build-module/components/font-sizes/with-font-sizes.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 +11 -8
- package/build-module/components/iframe/index.js.map +1 -1
- 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 +2 -0
- package/build-module/components/index.js.map +1 -1
- package/build-module/components/inner-blocks/index.js +27 -11
- 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/index.js +8 -3
- 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 +89 -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 +1 -0
- package/build-module/components/inserter/quick-inserter.js.map +1 -1
- package/build-module/components/inserter/reusable-blocks-tab.js +3 -1
- package/build-module/components/inserter/reusable-blocks-tab.js.map +1 -1
- package/build-module/components/inserter/search-results.js +3 -2
- 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 +18 -34
- package/build-module/components/link-control/index.js.map +1 -1
- package/build-module/components/link-control/search-input.js +1 -2
- package/build-module/components/link-control/search-input.js.map +1 -1
- package/build-module/components/link-control/use-internal-input-value.js +18 -0
- package/build-module/components/link-control/use-internal-input-value.js.map +1 -0
- package/build-module/components/list-view/block.js +10 -5
- package/build-module/components/list-view/block.js.map +1 -1
- package/build-module/components/list-view/branch.js +21 -14
- 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 +89 -0
- package/build-module/components/off-canvas-editor/appender.js.map +1 -0
- package/build-module/components/off-canvas-editor/block-contents.js +85 -0
- package/build-module/components/off-canvas-editor/block-contents.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 +101 -0
- package/build-module/components/off-canvas-editor/block-select-button.js.map +1 -0
- package/build-module/components/off-canvas-editor/block.js +298 -0
- package/build-module/components/off-canvas-editor/block.js.map +1 -0
- package/build-module/components/off-canvas-editor/branch.js +164 -0
- package/build-module/components/off-canvas-editor/branch.js.map +1 -0
- package/build-module/components/off-canvas-editor/context.js +7 -0
- package/build-module/components/off-canvas-editor/context.js.map +1 -0
- package/build-module/components/off-canvas-editor/drop-indicator.js +111 -0
- package/build-module/components/off-canvas-editor/drop-indicator.js.map +1 -0
- package/build-module/components/off-canvas-editor/expander.js +32 -0
- package/build-module/components/off-canvas-editor/expander.js.map +1 -0
- package/build-module/components/off-canvas-editor/index.js +189 -0
- package/build-module/components/off-canvas-editor/index.js.map +1 -0
- package/build-module/components/off-canvas-editor/leaf.js +45 -0
- package/build-module/components/off-canvas-editor/leaf.js.map +1 -0
- 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-block-selection.js +124 -0
- package/build-module/components/off-canvas-editor/use-block-selection.js.map +1 -0
- package/build-module/components/off-canvas-editor/use-list-view-client-ids.js +24 -0
- package/build-module/components/off-canvas-editor/use-list-view-client-ids.js.map +1 -0
- package/build-module/components/off-canvas-editor/use-list-view-drop-zone.js +220 -0
- package/build-module/components/off-canvas-editor/use-list-view-drop-zone.js.map +1 -0
- package/build-module/components/off-canvas-editor/use-list-view-expand-selected-item.js +50 -0
- package/build-module/components/off-canvas-editor/use-list-view-expand-selected-item.js.map +1 -0
- package/build-module/components/off-canvas-editor/utils.js +44 -0
- package/build-module/components/off-canvas-editor/utils.js.map +1 -0
- 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-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/spacing-input-control.js +12 -3
- package/build-module/components/spacing-sizes-control/spacing-input-control.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/index.js +30 -3
- package/build-module/components/url-popover/index.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 +9 -2
- package/build-module/components/use-setting/index.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 +17 -1
- package/build-module/hooks/color-panel.js.map +1 -1
- package/build-module/hooks/color.js +1 -1
- package/build-module/hooks/color.js.map +1 -1
- package/build-module/hooks/content-lock-ui.js +16 -9
- package/build-module/hooks/content-lock-ui.js.map +1 -1
- package/build-module/hooks/dimensions.js +60 -16
- package/build-module/hooks/dimensions.js.map +1 -1
- package/build-module/hooks/layout.js +57 -2
- package/build-module/hooks/layout.js.map +1 -1
- package/build-module/hooks/margin.js +4 -2
- package/build-module/hooks/margin.js.map +1 -1
- package/build-module/hooks/min-height.js +116 -0
- package/build-module/hooks/min-height.js.map +1 -0
- package/build-module/hooks/padding.js +4 -2
- package/build-module/hooks/padding.js.map +1 -1
- package/build-module/hooks/style.js +4 -3
- package/build-module/hooks/style.js.map +1 -1
- package/build-module/layouts/flex.js +23 -22
- package/build-module/layouts/flex.js.map +1 -1
- package/build-module/store/actions.js +22 -0
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/reducer.js +415 -265
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +66 -48
- package/build-module/store/selectors.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 +14 -0
- package/build-style/default-editor-styles.css +14 -0
- package/build-style/style-rtl.css +305 -668
- package/build-style/style.css +305 -668
- package/package.json +32 -30
- package/src/autocompleters/block.js +2 -6
- package/src/autocompleters/link.js +2 -0
- package/src/components/alignment-control/README.md +1 -1
- package/src/components/alignment-control/test/index.js +4 -1
- package/src/components/block-alignment-control/test/index.js +4 -1
- package/src/components/block-alignment-control/test/index.native.js +4 -4
- 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-inspector/index.js +96 -81
- package/src/components/block-inspector/style.scss +9 -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} +11 -20
- package/src/components/block-list-appender/{style.scss → content.scss} +0 -0
- package/src/components/block-lock/menu-item.js +5 -2
- package/src/components/block-lock/modal.js +19 -36
- package/src/components/block-lock/style.scss +8 -17
- package/src/components/block-mobile-toolbar/block-actions-menu.native.js +24 -6
- package/src/components/block-mover/style.scss +0 -1
- package/src/components/block-mover/test/__snapshots__/index.native.js.snap +0 -2
- package/src/components/block-pattern-setup/index.js +2 -1
- package/src/components/block-patterns-list/index.js +47 -24
- package/src/components/block-popover/style.scss +1 -1
- 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/utils.js +3 -3
- package/src/components/block-switcher/index.js +19 -4
- package/src/components/block-switcher/test/index.js +4 -0
- package/src/components/block-toolbar/index.js +12 -5
- 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 +80 -34
- package/src/components/block-tools/style.scss +27 -5
- package/src/components/block-variation-picker/index.js +1 -4
- package/src/components/block-vertical-alignment-control/test/index.js +4 -1
- package/src/components/colors/with-colors.js +13 -23
- package/src/components/default-block-appender/{style.scss → content.scss} +1 -0
- package/src/components/font-sizes/fluid-utils.js +37 -64
- package/src/components/font-sizes/test/fluid-utils.js +5 -5
- package/src/components/font-sizes/with-font-sizes.js +14 -11
- 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 +25 -18
- package/src/components/image-editor/use-save-image.js +2 -0
- package/src/components/image-editor/zoom-dropdown.js +1 -0
- package/src/components/index.js +2 -0
- package/src/components/inner-blocks/{style.scss → content.scss} +0 -0
- package/src/components/inner-blocks/index.js +30 -10
- 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/index.js +10 -2
- package/src/components/inserter/index.native.js +1 -1
- package/src/components/inserter/media-tab/hooks.js +88 -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 +1 -0
- package/src/components/inserter/reusable-blocks-tab.js +4 -2
- package/src/components/inserter/search-results.js +3 -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 +184 -18
- package/src/components/inserter/tabs.js +12 -1
- package/src/components/inserter/test/reusable-blocks-tab.js +14 -57
- 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 +24 -39
- package/src/components/link-control/search-input.js +1 -2
- package/src/components/link-control/test/index.js +400 -582
- package/src/components/link-control/use-internal-input-value.js +22 -0
- package/src/components/list-view/block.js +7 -3
- package/src/components/list-view/branch.js +21 -14
- package/src/components/list-view/style.scss +20 -9
- package/src/components/media-placeholder/{style.scss → content.scss} +0 -0
- package/src/components/media-replace-flow/test/index.js +37 -9
- package/src/components/media-upload/test/index.native.js +2 -0
- package/src/components/off-canvas-editor/README.md +5 -0
- package/src/components/off-canvas-editor/appender.js +93 -0
- package/src/components/off-canvas-editor/block-contents.js +89 -0
- package/src/components/off-canvas-editor/block-edit-button.js +27 -0
- package/src/components/off-canvas-editor/block-select-button.js +113 -0
- package/src/components/off-canvas-editor/block.js +401 -0
- package/src/components/off-canvas-editor/branch.js +208 -0
- package/src/components/off-canvas-editor/context.js +8 -0
- package/src/components/off-canvas-editor/drop-indicator.js +126 -0
- package/src/components/off-canvas-editor/expander.js +26 -0
- package/src/components/off-canvas-editor/index.js +242 -0
- package/src/components/off-canvas-editor/leaf.js +52 -0
- package/src/components/off-canvas-editor/link-ui.js +166 -0
- package/src/components/off-canvas-editor/style.scss +26 -0
- package/src/components/off-canvas-editor/test/utils.js +50 -0
- package/src/components/off-canvas-editor/update-attributes.js +99 -0
- package/src/components/off-canvas-editor/use-block-selection.js +169 -0
- package/src/components/off-canvas-editor/use-list-view-client-ids.js +29 -0
- package/src/components/off-canvas-editor/use-list-view-drop-zone.js +260 -0
- package/src/components/off-canvas-editor/use-list-view-expand-selected-item.js +58 -0
- package/src/components/off-canvas-editor/utils.js +58 -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/test/index.js +69 -92
- package/src/components/rich-text/content.scss +42 -0
- package/src/components/rich-text/format-toolbar/index.js +6 -4
- package/src/components/rich-text/index.js +2 -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-undo-automatic-change.js +7 -1
- package/src/components/rich-text/utils.js +2 -21
- package/src/components/spacing-sizes-control/spacing-input-control.js +9 -0
- package/src/components/ungroup-button/index.native.js +6 -2
- package/src/components/url-input/index.js +57 -73
- package/src/components/url-popover/README.md +12 -3
- package/src/components/url-popover/index.js +33 -3
- package/src/components/url-popover/test/__snapshots__/index.js.snap +8 -6
- package/src/components/url-popover/test/index.js +21 -9
- package/src/components/use-block-display-information/index.js +14 -5
- package/src/components/use-setting/index.js +20 -2
- package/src/components/use-setting/test/index.js +99 -0
- package/src/content.scss +10 -0
- package/src/hooks/child-layout.js +190 -0
- package/src/hooks/color-panel.js +13 -1
- package/src/hooks/color.js +2 -0
- package/src/hooks/content-lock-ui.js +47 -35
- package/src/hooks/dimensions.js +119 -21
- package/src/hooks/layout.js +62 -3
- package/src/hooks/margin.js +4 -3
- package/src/hooks/min-height.js +104 -0
- package/src/hooks/padding.js +4 -3
- package/src/hooks/style.js +10 -2
- package/src/hooks/test/style.js +4 -0
- package/src/hooks/test/use-typography-props.js +1 -1
- package/src/layouts/flex.js +43 -38
- package/src/store/actions.js +22 -0
- package/src/store/reducer.js +480 -434
- package/src/store/selectors.js +70 -64
- package/src/store/test/actions.js +18 -0
- package/src/store/test/performance.js +71 -0
- package/src/store/test/reducer.js +662 -490
- package/src/store/test/selectors.js +1839 -1306
- package/src/style.scss +4 -7
- 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-module/components/block-preview/live.js +0 -20
- package/build-module/components/block-preview/live.js.map +0 -1
- package/src/components/block-preview/live.js +0 -19
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { addFilter, removeFilter } from '@wordpress/hooks';
|
|
5
|
+
import { useSelect } from '@wordpress/data';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Internal dependencies
|
|
9
|
+
*/
|
|
10
|
+
import useSetting from '..';
|
|
11
|
+
import * as BlockEditContext from '../../block-edit/context';
|
|
12
|
+
|
|
13
|
+
// Mock useSelect() functions used by useSetting()
|
|
14
|
+
jest.mock( '@wordpress/data/src/components/use-select' );
|
|
15
|
+
|
|
16
|
+
let selectMock = {};
|
|
17
|
+
const setupSelectMock = () => {
|
|
18
|
+
selectMock = {
|
|
19
|
+
getSettings: () => ( {} ),
|
|
20
|
+
getBlockParents: () => [],
|
|
21
|
+
getBlockName: () => '',
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
useSelect.mockImplementation( ( callback ) => callback( () => selectMock ) );
|
|
26
|
+
|
|
27
|
+
const mockSettings = ( settings ) => {
|
|
28
|
+
selectMock.getSettings = () => ( {
|
|
29
|
+
__experimentalFeatures: settings,
|
|
30
|
+
} );
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const mockCurrentBlockContext = (
|
|
34
|
+
blockContext = { name: '', isSelected: false }
|
|
35
|
+
) => {
|
|
36
|
+
jest.spyOn( BlockEditContext, 'useBlockEditContext' ).mockReturnValue(
|
|
37
|
+
blockContext
|
|
38
|
+
);
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
describe( 'useSetting', () => {
|
|
42
|
+
beforeEach( () => {
|
|
43
|
+
setupSelectMock();
|
|
44
|
+
mockCurrentBlockContext();
|
|
45
|
+
} );
|
|
46
|
+
|
|
47
|
+
it( 'uses block setting', () => {
|
|
48
|
+
mockSettings( {
|
|
49
|
+
blocks: {
|
|
50
|
+
'core/test-block': {
|
|
51
|
+
layout: {
|
|
52
|
+
contentSize: '840px',
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
} );
|
|
57
|
+
|
|
58
|
+
mockCurrentBlockContext( {
|
|
59
|
+
name: 'core/test-block',
|
|
60
|
+
} );
|
|
61
|
+
|
|
62
|
+
expect( useSetting( 'layout.contentSize' ) ).toBe( '840px' );
|
|
63
|
+
} );
|
|
64
|
+
|
|
65
|
+
it( 'uses blockEditor.useSetting.before hook override', () => {
|
|
66
|
+
mockSettings( {
|
|
67
|
+
blocks: {
|
|
68
|
+
'core/test-block': {
|
|
69
|
+
layout: {
|
|
70
|
+
contentSize: '840px',
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
} );
|
|
75
|
+
|
|
76
|
+
mockCurrentBlockContext( {
|
|
77
|
+
name: 'core/test-block',
|
|
78
|
+
} );
|
|
79
|
+
|
|
80
|
+
addFilter(
|
|
81
|
+
'blockEditor.useSetting.before',
|
|
82
|
+
'test/useSetting.before',
|
|
83
|
+
( result, path, clientId, blockName ) => {
|
|
84
|
+
if ( blockName === 'core/test-block' ) {
|
|
85
|
+
return '960px';
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
return result;
|
|
89
|
+
}
|
|
90
|
+
);
|
|
91
|
+
|
|
92
|
+
expect( useSetting( 'layout.contentSize' ) ).toBe( '960px' );
|
|
93
|
+
|
|
94
|
+
removeFilter(
|
|
95
|
+
'blockEditor.useSetting.before',
|
|
96
|
+
'test/useSetting.before'
|
|
97
|
+
);
|
|
98
|
+
} );
|
|
99
|
+
} );
|
package/src/content.scss
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
@import "./components/block-list/content.scss";
|
|
2
|
+
@import "./components/block-list-appender/content.scss";
|
|
3
|
+
@import "./components/block-content-overlay/content.scss";
|
|
4
|
+
@import "./components/block-draggable/content.scss";
|
|
5
|
+
@import "./components/block-preview/content.scss";
|
|
6
|
+
@import "./components/default-block-appender/content.scss";
|
|
7
|
+
@import "./components/inner-blocks/content.scss";
|
|
8
|
+
@import "./components/media-placeholder/content.scss";
|
|
9
|
+
@import "./components/plain-text/content.scss";
|
|
10
|
+
@import "./components/rich-text/content.scss";
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import {
|
|
5
|
+
__experimentalToggleGroupControl as ToggleGroupControl,
|
|
6
|
+
__experimentalToggleGroupControlOption as ToggleGroupControlOption,
|
|
7
|
+
__experimentalUnitControl as UnitControl,
|
|
8
|
+
} from '@wordpress/components';
|
|
9
|
+
import { __ } from '@wordpress/i18n';
|
|
10
|
+
import { useEffect } from '@wordpress/element';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Internal dependencies
|
|
14
|
+
*/
|
|
15
|
+
import useSetting from '../components/use-setting';
|
|
16
|
+
|
|
17
|
+
function helpText( selfStretch, parentLayout ) {
|
|
18
|
+
const { orientation = 'horizontal' } = parentLayout;
|
|
19
|
+
|
|
20
|
+
if ( selfStretch === 'fill' ) {
|
|
21
|
+
return __( 'Stretch to fill available space.' );
|
|
22
|
+
}
|
|
23
|
+
if ( selfStretch === 'fixed' ) {
|
|
24
|
+
if ( orientation === 'horizontal' ) {
|
|
25
|
+
return __( 'Specify a fixed width.' );
|
|
26
|
+
}
|
|
27
|
+
return __( 'Specify a fixed height.' );
|
|
28
|
+
}
|
|
29
|
+
return __( 'Fit contents.' );
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Inspector controls containing the child layout related configuration.
|
|
34
|
+
*
|
|
35
|
+
* @param {Object} props Block props.
|
|
36
|
+
* @param {Object} props.attributes Block attributes.
|
|
37
|
+
* @param {Object} props.setAttributes Function to set block attributes.
|
|
38
|
+
* @param {Object} props.__unstableParentLayout
|
|
39
|
+
*
|
|
40
|
+
* @return {WPElement} child layout edit element.
|
|
41
|
+
*/
|
|
42
|
+
export function ChildLayoutEdit( {
|
|
43
|
+
attributes,
|
|
44
|
+
setAttributes,
|
|
45
|
+
__unstableParentLayout: parentLayout,
|
|
46
|
+
} ) {
|
|
47
|
+
const { style = {} } = attributes;
|
|
48
|
+
const { layout: childLayout = {} } = style;
|
|
49
|
+
const { selfStretch, flexSize } = childLayout;
|
|
50
|
+
|
|
51
|
+
useEffect( () => {
|
|
52
|
+
if ( selfStretch === 'fixed' && ! flexSize ) {
|
|
53
|
+
setAttributes( {
|
|
54
|
+
style: {
|
|
55
|
+
...style,
|
|
56
|
+
layout: {
|
|
57
|
+
...childLayout,
|
|
58
|
+
selfStretch: 'fit',
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
} );
|
|
62
|
+
}
|
|
63
|
+
}, [] );
|
|
64
|
+
|
|
65
|
+
return (
|
|
66
|
+
<>
|
|
67
|
+
<ToggleGroupControl
|
|
68
|
+
size={ '__unstable-large' }
|
|
69
|
+
label={ childLayoutOrientation( parentLayout ) }
|
|
70
|
+
value={ selfStretch || 'fit' }
|
|
71
|
+
help={ helpText( selfStretch, parentLayout ) }
|
|
72
|
+
onChange={ ( value ) => {
|
|
73
|
+
const newFlexSize = value !== 'fixed' ? null : flexSize;
|
|
74
|
+
setAttributes( {
|
|
75
|
+
style: {
|
|
76
|
+
...style,
|
|
77
|
+
layout: {
|
|
78
|
+
...childLayout,
|
|
79
|
+
selfStretch: value,
|
|
80
|
+
flexSize: newFlexSize,
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
} );
|
|
84
|
+
} }
|
|
85
|
+
isBlock={ true }
|
|
86
|
+
>
|
|
87
|
+
<ToggleGroupControlOption
|
|
88
|
+
key={ 'fit' }
|
|
89
|
+
value={ 'fit' }
|
|
90
|
+
label={ __( 'Fit' ) }
|
|
91
|
+
/>
|
|
92
|
+
<ToggleGroupControlOption
|
|
93
|
+
key={ 'fill' }
|
|
94
|
+
value={ 'fill' }
|
|
95
|
+
label={ __( 'Fill' ) }
|
|
96
|
+
/>
|
|
97
|
+
<ToggleGroupControlOption
|
|
98
|
+
key={ 'fixed' }
|
|
99
|
+
value={ 'fixed' }
|
|
100
|
+
label={ __( 'Fixed' ) }
|
|
101
|
+
/>
|
|
102
|
+
</ToggleGroupControl>
|
|
103
|
+
{ selfStretch === 'fixed' && (
|
|
104
|
+
<UnitControl
|
|
105
|
+
size={ '__unstable-large' }
|
|
106
|
+
onChange={ ( value ) => {
|
|
107
|
+
setAttributes( {
|
|
108
|
+
style: {
|
|
109
|
+
...style,
|
|
110
|
+
layout: {
|
|
111
|
+
...childLayout,
|
|
112
|
+
flexSize: value,
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
} );
|
|
116
|
+
} }
|
|
117
|
+
value={ flexSize }
|
|
118
|
+
/>
|
|
119
|
+
) }
|
|
120
|
+
</>
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Determines if there is child layout support.
|
|
126
|
+
*
|
|
127
|
+
* @param {Object} props Block Props object.
|
|
128
|
+
* @param {Object} props.__unstableParentLayout Parent layout.
|
|
129
|
+
*
|
|
130
|
+
* @return {boolean} Whether there is support.
|
|
131
|
+
*/
|
|
132
|
+
export function hasChildLayoutSupport( {
|
|
133
|
+
__unstableParentLayout: parentLayout = {},
|
|
134
|
+
} ) {
|
|
135
|
+
const {
|
|
136
|
+
type: parentLayoutType = 'default',
|
|
137
|
+
allowSizingOnChildren = false,
|
|
138
|
+
} = parentLayout;
|
|
139
|
+
const support = parentLayoutType === 'flex' && allowSizingOnChildren;
|
|
140
|
+
|
|
141
|
+
return support;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Checks if there is a current value in the child layout attributes.
|
|
146
|
+
*
|
|
147
|
+
* @param {Object} props Block props.
|
|
148
|
+
* @return {boolean} Whether or not the block has a child layout value set.
|
|
149
|
+
*/
|
|
150
|
+
export function hasChildLayoutValue( props ) {
|
|
151
|
+
return props.attributes.style?.layout !== undefined;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Resets the child layout attribute. This can be used when disabling
|
|
156
|
+
* child layout controls for a block via a progressive discovery panel.
|
|
157
|
+
*
|
|
158
|
+
* @param {Object} props Block props.
|
|
159
|
+
* @param {Object} props.attributes Block attributes.
|
|
160
|
+
* @param {Object} props.setAttributes Function to set block attributes.
|
|
161
|
+
*/
|
|
162
|
+
export function resetChildLayout( { attributes = {}, setAttributes } ) {
|
|
163
|
+
const { style } = attributes;
|
|
164
|
+
|
|
165
|
+
setAttributes( {
|
|
166
|
+
style: {
|
|
167
|
+
...style,
|
|
168
|
+
layout: undefined,
|
|
169
|
+
},
|
|
170
|
+
} );
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Custom hook that checks if child layout settings have been disabled.
|
|
175
|
+
*
|
|
176
|
+
* @param {Object} props Block props.
|
|
177
|
+
*
|
|
178
|
+
* @return {boolean} Whether the child layout setting is disabled.
|
|
179
|
+
*/
|
|
180
|
+
export function useIsChildLayoutDisabled( props ) {
|
|
181
|
+
const isDisabled = ! useSetting( 'layout' );
|
|
182
|
+
|
|
183
|
+
return ! hasChildLayoutSupport( props ) || isDisabled;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export function childLayoutOrientation( parentLayout ) {
|
|
187
|
+
const { orientation = 'horizontal' } = parentLayout;
|
|
188
|
+
|
|
189
|
+
return orientation === 'horizontal' ? __( 'Width' ) : __( 'Height' );
|
|
190
|
+
}
|
package/src/hooks/color-panel.js
CHANGED
|
@@ -29,7 +29,19 @@ export default function ColorPanel( {
|
|
|
29
29
|
const definedColors = settings.filter( ( setting ) => setting?.colorValue );
|
|
30
30
|
|
|
31
31
|
useEffect( () => {
|
|
32
|
-
if ( ! enableContrastChecking
|
|
32
|
+
if ( ! enableContrastChecking ) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
if ( ! definedColors.length ) {
|
|
36
|
+
if ( detectedBackgroundColor ) {
|
|
37
|
+
setDetectedBackgroundColor();
|
|
38
|
+
}
|
|
39
|
+
if ( detectedColor ) {
|
|
40
|
+
setDetectedColor();
|
|
41
|
+
}
|
|
42
|
+
if ( detectedLinkColor ) {
|
|
43
|
+
setDetectedColor();
|
|
44
|
+
}
|
|
33
45
|
return;
|
|
34
46
|
}
|
|
35
47
|
|
package/src/hooks/color.js
CHANGED
|
@@ -459,6 +459,8 @@ export function ColorEdit( props ) {
|
|
|
459
459
|
Platform.OS === 'web' &&
|
|
460
460
|
! gradient &&
|
|
461
461
|
! style?.color?.gradient &&
|
|
462
|
+
hasBackgroundColor &&
|
|
463
|
+
( hasLinkColor || hasTextColor ) &&
|
|
462
464
|
// Contrast checking is enabled by default.
|
|
463
465
|
// Deactivating it requires `enableContrastChecker` to have
|
|
464
466
|
// an explicit value of `false`.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { ToolbarButton } from '@wordpress/components';
|
|
4
|
+
import { ToolbarButton, MenuItem } from '@wordpress/components';
|
|
5
5
|
import { createHigherOrderComponent } from '@wordpress/compose';
|
|
6
6
|
import { useDispatch, useSelect } from '@wordpress/data';
|
|
7
7
|
import { addFilter } from '@wordpress/hooks';
|
|
@@ -12,7 +12,7 @@ import { useEffect, useRef, useCallback } from '@wordpress/element';
|
|
|
12
12
|
* Internal dependencies
|
|
13
13
|
*/
|
|
14
14
|
import { store as blockEditorStore } from '../store';
|
|
15
|
-
import { BlockControls } from '../components';
|
|
15
|
+
import { BlockControls, BlockSettingsMenuControls } from '../components';
|
|
16
16
|
/**
|
|
17
17
|
* External dependencies
|
|
18
18
|
*/
|
|
@@ -107,39 +107,51 @@ export const withBlockControls = createHigherOrderComponent(
|
|
|
107
107
|
return (
|
|
108
108
|
<>
|
|
109
109
|
{ isEditingAsBlocks && ! isContentLocked && (
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
110
|
+
<>
|
|
111
|
+
<StopEditingAsBlocksOnOutsideSelect
|
|
112
|
+
clientId={ props.clientId }
|
|
113
|
+
stopEditingAsBlock={ stopEditingAsBlock }
|
|
114
|
+
/>
|
|
115
|
+
<BlockControls group="other">
|
|
116
|
+
<ToolbarButton
|
|
117
|
+
onClick={ () => {
|
|
118
|
+
stopEditingAsBlock();
|
|
119
|
+
} }
|
|
120
|
+
>
|
|
121
|
+
{ __( 'Done' ) }
|
|
122
|
+
</ToolbarButton>
|
|
123
|
+
</BlockControls>
|
|
124
|
+
</>
|
|
125
|
+
) }
|
|
126
|
+
{ ! isEditingAsBlocks && isContentLocked && props.isSelected && (
|
|
127
|
+
<BlockSettingsMenuControls>
|
|
128
|
+
{ ( { onClose } ) => (
|
|
129
|
+
<MenuItem
|
|
130
|
+
onClick={ () => {
|
|
131
|
+
__unstableMarkNextChangeAsNotPersistent();
|
|
132
|
+
updateBlockAttributes( props.clientId, {
|
|
133
|
+
templateLock: undefined,
|
|
134
|
+
} );
|
|
135
|
+
updateBlockListSettings( props.clientId, {
|
|
136
|
+
...getBlockListSettings(
|
|
137
|
+
props.clientId
|
|
138
|
+
),
|
|
139
|
+
templateLock: false,
|
|
140
|
+
} );
|
|
141
|
+
focusModeToRevert.current =
|
|
142
|
+
getSettings().focusMode;
|
|
143
|
+
updateSettings( { focusMode: true } );
|
|
144
|
+
__unstableSetTemporarilyEditingAsBlocks(
|
|
145
|
+
props.clientId
|
|
146
|
+
);
|
|
147
|
+
onClose();
|
|
148
|
+
} }
|
|
149
|
+
>
|
|
150
|
+
{ __( 'Modify' ) }
|
|
151
|
+
</MenuItem>
|
|
152
|
+
) }
|
|
153
|
+
</BlockSettingsMenuControls>
|
|
114
154
|
) }
|
|
115
|
-
<BlockControls group="other">
|
|
116
|
-
<ToolbarButton
|
|
117
|
-
onClick={ () => {
|
|
118
|
-
if ( isEditingAsBlocks && ! isContentLocked ) {
|
|
119
|
-
stopEditingAsBlock();
|
|
120
|
-
} else {
|
|
121
|
-
__unstableMarkNextChangeAsNotPersistent();
|
|
122
|
-
updateBlockAttributes( props.clientId, {
|
|
123
|
-
templateLock: undefined,
|
|
124
|
-
} );
|
|
125
|
-
updateBlockListSettings( props.clientId, {
|
|
126
|
-
...getBlockListSettings( props.clientId ),
|
|
127
|
-
templateLock: false,
|
|
128
|
-
} );
|
|
129
|
-
focusModeToRevert.current =
|
|
130
|
-
getSettings().focusMode;
|
|
131
|
-
updateSettings( { focusMode: true } );
|
|
132
|
-
__unstableSetTemporarilyEditingAsBlocks(
|
|
133
|
-
props.clientId
|
|
134
|
-
);
|
|
135
|
-
}
|
|
136
|
-
} }
|
|
137
|
-
>
|
|
138
|
-
{ isEditingAsBlocks && ! isContentLocked
|
|
139
|
-
? __( 'Done' )
|
|
140
|
-
: __( 'Modify' ) }
|
|
141
|
-
</ToolbarButton>
|
|
142
|
-
</BlockControls>
|
|
143
155
|
<BlockEdit
|
|
144
156
|
{ ...props }
|
|
145
157
|
className={ classnames(
|
|
@@ -156,6 +168,6 @@ export const withBlockControls = createHigherOrderComponent(
|
|
|
156
168
|
|
|
157
169
|
addFilter(
|
|
158
170
|
'editor.BlockEdit',
|
|
159
|
-
'core/
|
|
171
|
+
'core/content-lock-ui/with-block-controls',
|
|
160
172
|
withBlockControls
|
|
161
173
|
);
|
package/src/hooks/dimensions.js
CHANGED
|
@@ -6,10 +6,14 @@ import classnames from 'classnames';
|
|
|
6
6
|
/**
|
|
7
7
|
* WordPress dependencies
|
|
8
8
|
*/
|
|
9
|
-
import {
|
|
9
|
+
import {
|
|
10
|
+
__experimentalToolsPanelItem as ToolsPanelItem,
|
|
11
|
+
__experimentalVStack as VStack,
|
|
12
|
+
} from '@wordpress/components';
|
|
10
13
|
import { Platform, useState } from '@wordpress/element';
|
|
11
14
|
import { __ } from '@wordpress/i18n';
|
|
12
15
|
import { getBlockSupport } from '@wordpress/blocks';
|
|
16
|
+
import { useDispatch } from '@wordpress/data';
|
|
13
17
|
|
|
14
18
|
/**
|
|
15
19
|
* Internal dependencies
|
|
@@ -30,6 +34,13 @@ import {
|
|
|
30
34
|
resetMargin,
|
|
31
35
|
useIsMarginDisabled,
|
|
32
36
|
} from './margin';
|
|
37
|
+
import {
|
|
38
|
+
MinHeightEdit,
|
|
39
|
+
hasMinHeightSupport,
|
|
40
|
+
hasMinHeightValue,
|
|
41
|
+
resetMinHeight,
|
|
42
|
+
useIsMinHeightDisabled,
|
|
43
|
+
} from './min-height';
|
|
33
44
|
import {
|
|
34
45
|
PaddingEdit,
|
|
35
46
|
PaddingVisualizer,
|
|
@@ -38,16 +49,38 @@ import {
|
|
|
38
49
|
resetPadding,
|
|
39
50
|
useIsPaddingDisabled,
|
|
40
51
|
} from './padding';
|
|
52
|
+
import {
|
|
53
|
+
ChildLayoutEdit,
|
|
54
|
+
hasChildLayoutSupport,
|
|
55
|
+
hasChildLayoutValue,
|
|
56
|
+
resetChildLayout,
|
|
57
|
+
useIsChildLayoutDisabled,
|
|
58
|
+
childLayoutOrientation,
|
|
59
|
+
} from './child-layout';
|
|
41
60
|
import useSetting from '../components/use-setting';
|
|
61
|
+
import { store as blockEditorStore } from '../store';
|
|
42
62
|
|
|
63
|
+
export const DIMENSIONS_SUPPORT_KEY = 'dimensions';
|
|
43
64
|
export const SPACING_SUPPORT_KEY = 'spacing';
|
|
44
65
|
export const ALL_SIDES = [ 'top', 'right', 'bottom', 'left' ];
|
|
45
66
|
export const AXIAL_SIDES = [ 'vertical', 'horizontal' ];
|
|
46
67
|
|
|
47
68
|
function useVisualizerMouseOver() {
|
|
48
69
|
const [ isMouseOver, setIsMouseOver ] = useState( false );
|
|
49
|
-
const
|
|
50
|
-
|
|
70
|
+
const {
|
|
71
|
+
__experimentalHideBlockInterface: hideBlockInterface,
|
|
72
|
+
__experimentalShowBlockInterface: showBlockInterface,
|
|
73
|
+
} = useDispatch( blockEditorStore );
|
|
74
|
+
const onMouseOver = ( e ) => {
|
|
75
|
+
e.stopPropagation();
|
|
76
|
+
hideBlockInterface();
|
|
77
|
+
setIsMouseOver( true );
|
|
78
|
+
};
|
|
79
|
+
const onMouseOut = ( e ) => {
|
|
80
|
+
e.stopPropagation();
|
|
81
|
+
showBlockInterface();
|
|
82
|
+
setIsMouseOver( false );
|
|
83
|
+
};
|
|
51
84
|
return { isMouseOver, onMouseOver, onMouseOut };
|
|
52
85
|
}
|
|
53
86
|
|
|
@@ -56,14 +89,16 @@ function useVisualizerMouseOver() {
|
|
|
56
89
|
*
|
|
57
90
|
* @param {Object} props Block props.
|
|
58
91
|
*
|
|
59
|
-
* @return {WPElement} Inspector controls for spacing support features.
|
|
92
|
+
* @return {WPElement} Inspector controls for dimensions and spacing support features.
|
|
60
93
|
*/
|
|
61
94
|
export function DimensionsPanel( props ) {
|
|
62
95
|
const isGapDisabled = useIsGapDisabled( props );
|
|
63
96
|
const isPaddingDisabled = useIsPaddingDisabled( props );
|
|
64
97
|
const isMarginDisabled = useIsMarginDisabled( props );
|
|
98
|
+
const isMinHeightDisabled = useIsMinHeightDisabled( props );
|
|
99
|
+
const isChildLayoutDisabled = useIsChildLayoutDisabled( props );
|
|
65
100
|
const isDisabled = useIsDimensionsDisabled( props );
|
|
66
|
-
const isSupported = hasDimensionsSupport( props
|
|
101
|
+
const isSupported = hasDimensionsSupport( props );
|
|
67
102
|
const spacingSizes = useSetting( 'spacing.spacingSizes' );
|
|
68
103
|
const paddingMouseOver = useVisualizerMouseOver();
|
|
69
104
|
const marginMouseOver = useVisualizerMouseOver();
|
|
@@ -72,26 +107,34 @@ export function DimensionsPanel( props ) {
|
|
|
72
107
|
return null;
|
|
73
108
|
}
|
|
74
109
|
|
|
110
|
+
const defaultDimensionsControls = getBlockSupport( props.name, [
|
|
111
|
+
DIMENSIONS_SUPPORT_KEY,
|
|
112
|
+
'__experimentalDefaultControls',
|
|
113
|
+
] );
|
|
114
|
+
|
|
75
115
|
const defaultSpacingControls = getBlockSupport( props.name, [
|
|
76
116
|
SPACING_SUPPORT_KEY,
|
|
77
117
|
'__experimentalDefaultControls',
|
|
78
118
|
] );
|
|
79
119
|
|
|
80
|
-
const createResetAllFilter =
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
120
|
+
const createResetAllFilter =
|
|
121
|
+
( attribute, featureSet ) => ( newAttributes ) => ( {
|
|
122
|
+
...newAttributes,
|
|
123
|
+
style: {
|
|
124
|
+
...newAttributes.style,
|
|
125
|
+
[ featureSet ]: {
|
|
126
|
+
...newAttributes.style?.[ featureSet ],
|
|
127
|
+
[ attribute ]: undefined,
|
|
128
|
+
},
|
|
87
129
|
},
|
|
88
|
-
}
|
|
89
|
-
} );
|
|
130
|
+
} );
|
|
90
131
|
|
|
91
132
|
const spacingClassnames = classnames( {
|
|
92
133
|
'tools-panel-item-spacing': spacingSizes && spacingSizes.length > 0,
|
|
93
134
|
} );
|
|
94
135
|
|
|
136
|
+
const { __unstableParentLayout: parentLayout } = props;
|
|
137
|
+
|
|
95
138
|
return (
|
|
96
139
|
<>
|
|
97
140
|
<InspectorControls __experimentalGroup="dimensions">
|
|
@@ -101,7 +144,10 @@ export function DimensionsPanel( props ) {
|
|
|
101
144
|
hasValue={ () => hasPaddingValue( props ) }
|
|
102
145
|
label={ __( 'Padding' ) }
|
|
103
146
|
onDeselect={ () => resetPadding( props ) }
|
|
104
|
-
resetAllFilter={ createResetAllFilter(
|
|
147
|
+
resetAllFilter={ createResetAllFilter(
|
|
148
|
+
'padding',
|
|
149
|
+
'spacing'
|
|
150
|
+
) }
|
|
105
151
|
isShownByDefault={ defaultSpacingControls?.padding }
|
|
106
152
|
panelId={ props.clientId }
|
|
107
153
|
>
|
|
@@ -118,7 +164,10 @@ export function DimensionsPanel( props ) {
|
|
|
118
164
|
hasValue={ () => hasMarginValue( props ) }
|
|
119
165
|
label={ __( 'Margin' ) }
|
|
120
166
|
onDeselect={ () => resetMargin( props ) }
|
|
121
|
-
resetAllFilter={ createResetAllFilter(
|
|
167
|
+
resetAllFilter={ createResetAllFilter(
|
|
168
|
+
'margin',
|
|
169
|
+
'spacing'
|
|
170
|
+
) }
|
|
122
171
|
isShownByDefault={ defaultSpacingControls?.margin }
|
|
123
172
|
panelId={ props.clientId }
|
|
124
173
|
>
|
|
@@ -135,13 +184,50 @@ export function DimensionsPanel( props ) {
|
|
|
135
184
|
hasValue={ () => hasGapValue( props ) }
|
|
136
185
|
label={ __( 'Block spacing' ) }
|
|
137
186
|
onDeselect={ () => resetGap( props ) }
|
|
138
|
-
resetAllFilter={ createResetAllFilter(
|
|
187
|
+
resetAllFilter={ createResetAllFilter(
|
|
188
|
+
'blockGap',
|
|
189
|
+
'spacing'
|
|
190
|
+
) }
|
|
139
191
|
isShownByDefault={ defaultSpacingControls?.blockGap }
|
|
140
192
|
panelId={ props.clientId }
|
|
141
193
|
>
|
|
142
194
|
<GapEdit { ...props } />
|
|
143
195
|
</ToolsPanelItem>
|
|
144
196
|
) }
|
|
197
|
+
{ ! isMinHeightDisabled && (
|
|
198
|
+
<ToolsPanelItem
|
|
199
|
+
hasValue={ () => hasMinHeightValue( props ) }
|
|
200
|
+
label={ __( 'Min. height' ) }
|
|
201
|
+
onDeselect={ () => resetMinHeight( props ) }
|
|
202
|
+
resetAllFilter={ createResetAllFilter(
|
|
203
|
+
'minHeight',
|
|
204
|
+
'dimensions'
|
|
205
|
+
) }
|
|
206
|
+
isShownByDefault={
|
|
207
|
+
defaultDimensionsControls?.minHeight
|
|
208
|
+
}
|
|
209
|
+
panelId={ props.clientId }
|
|
210
|
+
>
|
|
211
|
+
<MinHeightEdit { ...props } />
|
|
212
|
+
</ToolsPanelItem>
|
|
213
|
+
) }
|
|
214
|
+
{ ! isChildLayoutDisabled && (
|
|
215
|
+
<VStack
|
|
216
|
+
as={ ToolsPanelItem }
|
|
217
|
+
spacing={ 2 }
|
|
218
|
+
hasValue={ () => hasChildLayoutValue( props ) }
|
|
219
|
+
label={ childLayoutOrientation( parentLayout ) }
|
|
220
|
+
onDeselect={ () => resetChildLayout( props ) }
|
|
221
|
+
resetAllFilter={ createResetAllFilter(
|
|
222
|
+
'selfStretch',
|
|
223
|
+
'layout'
|
|
224
|
+
) }
|
|
225
|
+
isShownByDefault={ false }
|
|
226
|
+
panelId={ props.clientId }
|
|
227
|
+
>
|
|
228
|
+
<ChildLayoutEdit { ...props } />
|
|
229
|
+
</VStack>
|
|
230
|
+
) }
|
|
145
231
|
</InspectorControls>
|
|
146
232
|
{ ! isPaddingDisabled && (
|
|
147
233
|
<PaddingVisualizer
|
|
@@ -162,19 +248,23 @@ export function DimensionsPanel( props ) {
|
|
|
162
248
|
/**
|
|
163
249
|
* Determine whether there is dimensions related block support.
|
|
164
250
|
*
|
|
165
|
-
* @param {
|
|
251
|
+
* @param {Object} props Block props.
|
|
166
252
|
*
|
|
167
253
|
* @return {boolean} Whether there is support.
|
|
168
254
|
*/
|
|
169
|
-
export function hasDimensionsSupport(
|
|
255
|
+
export function hasDimensionsSupport( props ) {
|
|
170
256
|
if ( Platform.OS !== 'web' ) {
|
|
171
257
|
return false;
|
|
172
258
|
}
|
|
173
259
|
|
|
260
|
+
const { name: blockName } = props;
|
|
261
|
+
|
|
174
262
|
return (
|
|
175
263
|
hasGapSupport( blockName ) ||
|
|
264
|
+
hasMinHeightSupport( blockName ) ||
|
|
176
265
|
hasPaddingSupport( blockName ) ||
|
|
177
|
-
hasMarginSupport( blockName )
|
|
266
|
+
hasMarginSupport( blockName ) ||
|
|
267
|
+
hasChildLayoutSupport( props )
|
|
178
268
|
);
|
|
179
269
|
}
|
|
180
270
|
|
|
@@ -187,10 +277,18 @@ export function hasDimensionsSupport( blockName ) {
|
|
|
187
277
|
*/
|
|
188
278
|
const useIsDimensionsDisabled = ( props = {} ) => {
|
|
189
279
|
const gapDisabled = useIsGapDisabled( props );
|
|
280
|
+
const minHeightDisabled = useIsMinHeightDisabled( props );
|
|
190
281
|
const paddingDisabled = useIsPaddingDisabled( props );
|
|
191
282
|
const marginDisabled = useIsMarginDisabled( props );
|
|
283
|
+
const childLayoutDisabled = useIsChildLayoutDisabled( props );
|
|
192
284
|
|
|
193
|
-
return
|
|
285
|
+
return (
|
|
286
|
+
gapDisabled &&
|
|
287
|
+
minHeightDisabled &&
|
|
288
|
+
paddingDisabled &&
|
|
289
|
+
marginDisabled &&
|
|
290
|
+
childLayoutDisabled
|
|
291
|
+
);
|
|
194
292
|
};
|
|
195
293
|
|
|
196
294
|
/**
|