@wordpress/block-editor 12.19.5 → 12.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/build/components/block-canvas/index.js +2 -0
- package/build/components/block-canvas/index.js.map +1 -1
- package/build/components/block-heading-level-dropdown/index.js +14 -17
- package/build/components/block-heading-level-dropdown/index.js.map +1 -1
- package/build/components/block-inspector/index.js +0 -3
- package/build/components/block-inspector/index.js.map +1 -1
- package/build/components/block-list/block-invalid-warning.native.js.map +1 -1
- package/build/components/block-list/block-list-item.native.js +1 -1
- package/build/components/block-list/block-list-item.native.js.map +1 -1
- package/build/components/block-list/block-outline.native.js +23 -7
- package/build/components/block-list/block-outline.native.js.map +1 -1
- package/build/components/block-list/block-selection-button.native.js.map +1 -1
- package/build/components/block-list/block.native.js +0 -3
- package/build/components/block-list/block.native.js.map +1 -1
- package/build/components/block-list/index.js +9 -9
- package/build/components/block-list/index.js.map +1 -1
- package/build/components/block-mover/index.native.js.map +1 -1
- package/build/components/block-popover/cover.js +68 -0
- package/build/components/block-popover/cover.js.map +1 -0
- package/build/components/block-popover/drop-zone.js +2 -3
- package/build/components/block-popover/drop-zone.js.map +1 -1
- package/build/components/block-popover/index.js +1 -19
- package/build/components/block-popover/index.js.map +1 -1
- package/build/components/block-preview/index.js +2 -1
- package/build/components/block-preview/index.js.map +1 -1
- package/build/components/block-removal-warning-modal/index.js +2 -4
- package/build/components/block-removal-warning-modal/index.js.map +1 -1
- package/build/components/block-rename/modal.js.map +1 -1
- package/build/components/block-settings-menu/block-parent-selector-menu-item.js +54 -0
- package/build/components/block-settings-menu/block-parent-selector-menu-item.js.map +1 -0
- package/build/components/block-settings-menu/block-settings-dropdown.js +9 -37
- package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build/components/block-switcher/block-transformations-menu.native.js.map +1 -1
- package/build/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
- package/build/components/block-toolbar/index.js +7 -5
- package/build/components/block-toolbar/index.js.map +1 -1
- package/build/components/block-toolbar/shuffle.js +89 -0
- package/build/components/block-toolbar/shuffle.js.map +1 -0
- package/build/components/block-toolbar/use-has-block-toolbar.js +43 -0
- package/build/components/block-toolbar/use-has-block-toolbar.js.map +1 -0
- package/build/components/block-tools/block-selection-button.js +5 -1
- package/build/components/block-tools/block-selection-button.js.map +1 -1
- package/build/components/block-tools/empty-block-inserter.js +2 -5
- package/build/components/block-tools/empty-block-inserter.js.map +1 -1
- package/build/components/block-tools/index.js +9 -26
- package/build/components/block-tools/index.js.map +1 -1
- package/build/components/block-tools/use-show-block-tools.js +60 -0
- package/build/components/block-tools/use-show-block-tools.js.map +1 -0
- package/build/components/caption/index.native.js.map +1 -1
- package/build/components/child-layout-control/index.js +37 -5
- package/build/components/child-layout-control/index.js.map +1 -1
- package/build/components/color-palette/control.js.map +1 -1
- package/build/components/colors-gradients/control.js +1 -1
- package/build/components/colors-gradients/control.js.map +1 -1
- package/build/components/date-format-picker/index.js +0 -1
- package/build/components/date-format-picker/index.js.map +1 -1
- package/build/components/font-appearance-control/index.js +1 -2
- package/build/components/font-appearance-control/index.js.map +1 -1
- package/build/components/global-styles/border-panel.js.map +1 -1
- package/build/components/global-styles/color-panel.js +1 -1
- package/build/components/global-styles/color-panel.js.map +1 -1
- package/build/components/global-styles/dimensions-panel.js +30 -19
- package/build/components/global-styles/dimensions-panel.js.map +1 -1
- package/build/components/global-styles/image-settings-panel.js.map +1 -1
- package/build/components/global-styles/typography-utils.js +7 -5
- package/build/components/global-styles/typography-utils.js.map +1 -1
- package/build/components/global-styles/use-global-styles-output.js +15 -15
- package/build/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build/components/global-styles/utils.js +1 -1
- package/build/components/global-styles/utils.js.map +1 -1
- package/build/components/grid-visualizer/grid-item-resizer.js +77 -0
- package/build/components/grid-visualizer/grid-item-resizer.js.map +1 -0
- package/build/components/grid-visualizer/grid-visualizer.js +81 -0
- package/build/components/grid-visualizer/grid-visualizer.js.map +1 -0
- package/build/components/grid-visualizer/index.js +20 -0
- package/build/components/grid-visualizer/index.js.map +1 -0
- package/build/components/grid-visualizer/utils.js +10 -0
- package/build/components/grid-visualizer/utils.js.map +1 -0
- package/build/components/iframe/index.js +61 -16
- package/build/components/iframe/index.js.map +1 -1
- package/build/components/index.native.js +7 -0
- package/build/components/index.native.js.map +1 -1
- package/build/components/inner-blocks/use-nested-settings-update.js +8 -2
- package/build/components/inner-blocks/use-nested-settings-update.js.map +1 -1
- package/build/components/inserter/media-tab/media-preview.js.map +1 -1
- package/build/components/inserter/menu.js +9 -3
- package/build/components/inserter/menu.js.map +1 -1
- package/build/components/inserter/menu.native.js.map +1 -1
- package/build/components/inserter/mobile-tab-navigation.js +1 -1
- package/build/components/inserter/mobile-tab-navigation.js.map +1 -1
- package/build/components/inserter/search-results.js +3 -2
- package/build/components/inserter/search-results.js.map +1 -1
- package/build/components/inserter/tabs.js +2 -1
- package/build/components/inserter/tabs.js.map +1 -1
- package/build/components/inspector-controls/block-support-tools-panel.js.map +1 -1
- package/build/components/inspector-controls-tabs/index.js +1 -1
- package/build/components/inspector-controls-tabs/index.js.map +1 -1
- package/build/components/inspector-controls-tabs/styles-tab.js +0 -4
- package/build/components/inspector-controls-tabs/styles-tab.js.map +1 -1
- package/build/components/link-control/search-input.js.map +1 -1
- package/build/components/list-view/branch.js.map +1 -1
- package/build/components/list-view/drop-indicator.js.map +1 -1
- package/build/components/list-view/index.js.map +1 -1
- package/build/components/observe-typing/index.js +5 -10
- package/build/components/observe-typing/index.js.map +1 -1
- package/build/components/panel-color-settings/index.js.map +1 -1
- package/build/components/provider/index.js.map +1 -1
- package/build/components/resizable-box-popover/index.js +3 -5
- package/build/components/resizable-box-popover/index.js.map +1 -1
- package/build/components/responsive-block-control/index.js +1 -1
- package/build/components/responsive-block-control/index.js.map +1 -1
- package/build/components/rich-text/format-toolbar-container.js +1 -31
- package/build/components/rich-text/format-toolbar-container.js.map +1 -1
- package/build/components/rich-text/index.js +1 -2
- package/build/components/rich-text/index.js.map +1 -1
- package/build/components/skip-to-selected-block/index.js +7 -14
- package/build/components/skip-to-selected-block/index.js.map +1 -1
- package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js +0 -1
- package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
- package/build/components/url-input/index.js +5 -8
- package/build/components/url-input/index.js.map +1 -1
- package/build/hooks/background.js.map +1 -1
- package/build/hooks/block-hooks.js.map +1 -1
- package/build/hooks/dimensions.js +3 -4
- package/build/hooks/dimensions.js.map +1 -1
- package/build/hooks/font-size.js +6 -7
- package/build/hooks/font-size.js.map +1 -1
- package/build/hooks/index.js +1 -1
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/layout-child.js +89 -1
- package/build/hooks/layout-child.js.map +1 -1
- package/build/hooks/layout.js +11 -4
- package/build/hooks/layout.js.map +1 -1
- package/build/hooks/line-height.js.map +1 -1
- package/build/hooks/position.js +0 -1
- package/build/hooks/position.js.map +1 -1
- package/build/hooks/spacing-visualizer.js +115 -0
- package/build/hooks/spacing-visualizer.js.map +1 -0
- package/build/hooks/use-typography-props.js +1 -2
- package/build/hooks/use-typography-props.js.map +1 -1
- package/build/layouts/grid.js +111 -14
- package/build/layouts/grid.js.map +1 -1
- package/build/private-apis.js +2 -2
- package/build/private-apis.js.map +1 -1
- package/build/store/actions.js +4 -36
- package/build/store/actions.js.map +1 -1
- package/build/store/private-actions.js +29 -45
- package/build/store/private-actions.js.map +1 -1
- package/build/store/reducer.js +2 -4
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +27 -15
- package/build/store/selectors.js.map +1 -1
- package/build/utils/calculate-scale.js +17 -0
- package/build/utils/calculate-scale.js.map +1 -0
- package/build-module/components/block-canvas/index.js +2 -0
- package/build-module/components/block-canvas/index.js.map +1 -1
- package/build-module/components/block-heading-level-dropdown/index.js +14 -17
- package/build-module/components/block-heading-level-dropdown/index.js.map +1 -1
- package/build-module/components/block-inspector/index.js +1 -4
- package/build-module/components/block-inspector/index.js.map +1 -1
- package/build-module/components/block-list/block-invalid-warning.native.js.map +1 -1
- package/build-module/components/block-list/block-list-item.native.js +1 -1
- package/build-module/components/block-list/block-list-item.native.js.map +1 -1
- package/build-module/components/block-list/block-outline.native.js +23 -7
- package/build-module/components/block-list/block-outline.native.js.map +1 -1
- package/build-module/components/block-list/block-selection-button.native.js.map +1 -1
- package/build-module/components/block-list/block.native.js +0 -3
- package/build-module/components/block-list/block.native.js.map +1 -1
- package/build-module/components/block-list/index.js +9 -9
- package/build-module/components/block-list/index.js.map +1 -1
- package/build-module/components/block-mover/index.native.js.map +1 -1
- package/build-module/components/block-popover/cover.js +60 -0
- package/build-module/components/block-popover/cover.js.map +1 -0
- package/build-module/components/block-popover/drop-zone.js +2 -3
- package/build-module/components/block-popover/drop-zone.js.map +1 -1
- package/build-module/components/block-popover/index.js +1 -19
- package/build-module/components/block-popover/index.js.map +1 -1
- package/build-module/components/block-preview/index.js +2 -1
- package/build-module/components/block-preview/index.js.map +1 -1
- package/build-module/components/block-removal-warning-modal/index.js +3 -5
- package/build-module/components/block-removal-warning-modal/index.js.map +1 -1
- package/build-module/components/block-rename/modal.js.map +1 -1
- package/build-module/components/block-settings-menu/block-parent-selector-menu-item.js +46 -0
- package/build-module/components/block-settings-menu/block-parent-selector-menu-item.js.map +1 -0
- package/build-module/components/block-settings-menu/block-settings-dropdown.js +12 -40
- package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build-module/components/block-switcher/block-transformations-menu.native.js.map +1 -1
- package/build-module/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
- package/build-module/components/block-toolbar/index.js +7 -6
- package/build-module/components/block-toolbar/index.js.map +1 -1
- package/build-module/components/block-toolbar/shuffle.js +82 -0
- package/build-module/components/block-toolbar/shuffle.js.map +1 -0
- package/build-module/components/block-toolbar/use-has-block-toolbar.js +36 -0
- package/build-module/components/block-toolbar/use-has-block-toolbar.js.map +1 -0
- package/build-module/components/block-tools/block-selection-button.js +5 -1
- package/build-module/components/block-tools/block-selection-button.js.map +1 -1
- package/build-module/components/block-tools/empty-block-inserter.js +2 -5
- package/build-module/components/block-tools/empty-block-inserter.js.map +1 -1
- package/build-module/components/block-tools/index.js +9 -26
- package/build-module/components/block-tools/index.js.map +1 -1
- package/build-module/components/block-tools/use-show-block-tools.js +54 -0
- package/build-module/components/block-tools/use-show-block-tools.js.map +1 -0
- package/build-module/components/caption/index.native.js.map +1 -1
- package/build-module/components/child-layout-control/index.js +38 -6
- package/build-module/components/child-layout-control/index.js.map +1 -1
- package/build-module/components/color-palette/control.js.map +1 -1
- package/build-module/components/colors-gradients/control.js +1 -1
- package/build-module/components/colors-gradients/control.js.map +1 -1
- package/build-module/components/date-format-picker/index.js +0 -1
- package/build-module/components/date-format-picker/index.js.map +1 -1
- package/build-module/components/font-appearance-control/index.js +1 -2
- package/build-module/components/font-appearance-control/index.js.map +1 -1
- package/build-module/components/global-styles/border-panel.js.map +1 -1
- package/build-module/components/global-styles/color-panel.js +1 -1
- package/build-module/components/global-styles/color-panel.js.map +1 -1
- package/build-module/components/global-styles/dimensions-panel.js +30 -19
- package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
- package/build-module/components/global-styles/image-settings-panel.js.map +1 -1
- package/build-module/components/global-styles/typography-utils.js +7 -5
- package/build-module/components/global-styles/typography-utils.js.map +1 -1
- package/build-module/components/global-styles/use-global-styles-output.js +16 -16
- package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build-module/components/global-styles/utils.js +2 -2
- package/build-module/components/global-styles/utils.js.map +1 -1
- package/build-module/components/grid-visualizer/grid-item-resizer.js +69 -0
- package/build-module/components/grid-visualizer/grid-item-resizer.js.map +1 -0
- package/build-module/components/grid-visualizer/grid-visualizer.js +73 -0
- package/build-module/components/grid-visualizer/grid-visualizer.js.map +1 -0
- package/build-module/components/grid-visualizer/index.js +3 -0
- package/build-module/components/grid-visualizer/index.js.map +1 -0
- package/build-module/components/grid-visualizer/utils.js +4 -0
- package/build-module/components/grid-visualizer/utils.js.map +1 -0
- package/build-module/components/iframe/index.js +61 -16
- package/build-module/components/iframe/index.js.map +1 -1
- package/build-module/components/index.native.js +1 -1
- package/build-module/components/index.native.js.map +1 -1
- package/build-module/components/inner-blocks/use-nested-settings-update.js +8 -2
- package/build-module/components/inner-blocks/use-nested-settings-update.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-preview.js.map +1 -1
- package/build-module/components/inserter/menu.js +9 -3
- package/build-module/components/inserter/menu.js.map +1 -1
- package/build-module/components/inserter/menu.native.js.map +1 -1
- package/build-module/components/inserter/mobile-tab-navigation.js +1 -1
- package/build-module/components/inserter/mobile-tab-navigation.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 +2 -1
- package/build-module/components/inserter/tabs.js.map +1 -1
- package/build-module/components/inspector-controls/block-support-tools-panel.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/index.js +1 -1
- package/build-module/components/inspector-controls-tabs/index.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/styles-tab.js +0 -4
- package/build-module/components/inspector-controls-tabs/styles-tab.js.map +1 -1
- package/build-module/components/link-control/search-input.js.map +1 -1
- package/build-module/components/list-view/branch.js.map +1 -1
- package/build-module/components/list-view/drop-indicator.js.map +1 -1
- package/build-module/components/list-view/index.js.map +1 -1
- package/build-module/components/observe-typing/index.js +5 -10
- package/build-module/components/observe-typing/index.js.map +1 -1
- package/build-module/components/panel-color-settings/index.js.map +1 -1
- package/build-module/components/provider/index.js.map +1 -1
- package/build-module/components/resizable-box-popover/index.js +3 -5
- package/build-module/components/resizable-box-popover/index.js.map +1 -1
- package/build-module/components/responsive-block-control/index.js +1 -1
- package/build-module/components/responsive-block-control/index.js.map +1 -1
- package/build-module/components/rich-text/format-toolbar-container.js +1 -31
- package/build-module/components/rich-text/format-toolbar-container.js.map +1 -1
- package/build-module/components/rich-text/index.js +1 -2
- package/build-module/components/rich-text/index.js.map +1 -1
- package/build-module/components/skip-to-selected-block/index.js +8 -14
- package/build-module/components/skip-to-selected-block/index.js.map +1 -1
- package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js +0 -1
- package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
- package/build-module/components/url-input/index.js +5 -8
- package/build-module/components/url-input/index.js.map +1 -1
- package/build-module/hooks/background.js.map +1 -1
- package/build-module/hooks/block-hooks.js.map +1 -1
- package/build-module/hooks/dimensions.js +1 -2
- package/build-module/hooks/dimensions.js.map +1 -1
- package/build-module/hooks/font-size.js +7 -8
- package/build-module/hooks/font-size.js.map +1 -1
- package/build-module/hooks/index.js +1 -1
- package/build-module/hooks/index.js.map +1 -1
- package/build-module/hooks/layout-child.js +89 -1
- package/build-module/hooks/layout-child.js.map +1 -1
- package/build-module/hooks/layout.js +11 -4
- package/build-module/hooks/layout.js.map +1 -1
- package/build-module/hooks/line-height.js.map +1 -1
- package/build-module/hooks/position.js +0 -1
- package/build-module/hooks/position.js.map +1 -1
- package/build-module/hooks/spacing-visualizer.js +106 -0
- package/build-module/hooks/spacing-visualizer.js.map +1 -0
- package/build-module/hooks/use-typography-props.js +2 -3
- package/build-module/hooks/use-typography-props.js.map +1 -1
- package/build-module/layouts/grid.js +113 -16
- package/build-module/layouts/grid.js.map +1 -1
- package/build-module/private-apis.js +2 -2
- package/build-module/private-apis.js.map +1 -1
- package/build-module/store/actions.js +4 -36
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/private-actions.js +29 -45
- package/build-module/store/private-actions.js.map +1 -1
- package/build-module/store/reducer.js +2 -4
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +23 -13
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/utils/calculate-scale.js +11 -0
- package/build-module/utils/calculate-scale.js.map +1 -0
- package/build-style/content-rtl.css +7 -2
- package/build-style/content.css +7 -2
- package/build-style/style-rtl.css +55 -25
- package/build-style/style.css +55 -25
- package/package.json +31 -32
- package/src/components/block-canvas/index.js +2 -0
- package/src/components/block-draggable/test/index.native.js +2 -2
- package/src/components/block-heading-level-dropdown/index.js +17 -25
- package/src/components/block-inspector/index.js +0 -11
- package/src/components/block-list/block-invalid-warning.native.js +1 -1
- package/src/components/block-list/block-list-item.native.js +1 -1
- package/src/components/block-list/block-outline.native.js +36 -21
- package/src/components/block-list/block-selection-button.native.js +1 -3
- package/src/components/block-list/block.native.js +0 -3
- package/src/components/block-list/content.scss +5 -1
- package/src/components/block-list/index.js +55 -55
- package/src/components/block-list/test/block-outline.native.js +255 -0
- package/src/components/block-mover/index.native.js +1 -1
- package/src/components/block-popover/cover.js +63 -0
- package/src/components/block-popover/drop-zone.js +3 -4
- package/src/components/block-popover/index.js +1 -28
- package/src/components/block-preview/index.js +3 -1
- package/src/components/block-removal-warning-modal/index.js +5 -19
- package/src/components/block-rename/modal.js +1 -1
- package/src/components/block-settings-menu/block-parent-selector-menu-item.js +50 -0
- package/src/components/block-settings-menu/block-settings-dropdown.js +9 -50
- package/src/components/block-styles/style.scss +0 -4
- package/src/components/block-switcher/block-transformations-menu.native.js +1 -1
- package/src/components/block-toolbar/block-toolbar-menu.native.js +2 -2
- package/src/components/block-toolbar/index.js +5 -11
- package/src/components/block-toolbar/shuffle.js +93 -0
- package/src/components/block-toolbar/use-has-block-toolbar.js +49 -0
- package/src/components/block-tools/block-selection-button.js +4 -0
- package/src/components/block-tools/empty-block-inserter.js +3 -6
- package/src/components/block-tools/index.js +13 -36
- package/src/components/block-tools/use-show-block-tools.js +73 -0
- package/src/components/caption/index.native.js +1 -1
- package/src/components/child-layout-control/index.js +85 -44
- package/src/components/color-palette/control.js +1 -1
- package/src/components/colors-gradients/control.js +1 -1
- package/src/components/colors-gradients/test/control.js +2 -2
- package/src/components/contrast-checker/test/index.js +10 -10
- package/src/components/date-format-picker/index.js +0 -1
- package/src/components/default-block-appender/content.scss +5 -2
- package/src/components/font-appearance-control/index.js +0 -1
- package/src/components/global-styles/border-panel.js +2 -2
- package/src/components/global-styles/color-panel.js +1 -1
- package/src/components/global-styles/dimensions-panel.js +36 -24
- package/src/components/global-styles/image-settings-panel.js +1 -1
- package/src/components/global-styles/test/typography-utils.js +231 -81
- package/src/components/global-styles/test/use-global-styles-output.js +3 -2
- package/src/components/global-styles/typography-utils.js +10 -7
- package/src/components/global-styles/use-global-styles-output.js +14 -16
- package/src/components/global-styles/utils.js +2 -8
- package/src/components/grid-visualizer/grid-item-resizer.js +100 -0
- package/src/components/grid-visualizer/grid-visualizer.js +81 -0
- package/src/components/grid-visualizer/index.js +2 -0
- package/src/components/grid-visualizer/style.scss +33 -0
- package/src/components/grid-visualizer/utils.js +5 -0
- package/src/components/iframe/index.js +78 -31
- package/src/components/index.native.js +1 -0
- package/src/components/inner-blocks/use-nested-settings-update.js +12 -2
- package/src/components/inserter/media-tab/media-preview.js +1 -1
- package/src/components/inserter/menu.js +10 -4
- package/src/components/inserter/menu.native.js +3 -3
- package/src/components/inserter/mobile-tab-navigation.js +1 -1
- package/src/components/inserter/search-results.js +2 -1
- package/src/components/inserter/style.scss +10 -0
- package/src/components/inserter/tabs.js +2 -1
- package/src/components/inspector-controls/block-support-tools-panel.js +2 -2
- package/src/components/inspector-controls-tabs/index.js +1 -1
- package/src/components/inspector-controls-tabs/styles-tab.js +0 -7
- package/src/components/line-height-control/test/index.js +1 -1
- package/src/components/link-control/search-input.js +1 -1
- package/src/components/list-view/branch.js +1 -1
- package/src/components/list-view/drop-indicator.js +1 -1
- package/src/components/list-view/index.js +1 -1
- package/src/components/observe-typing/index.js +7 -10
- package/src/components/panel-color-settings/index.js +1 -1
- package/src/components/panel-color-settings/test/index.js +3 -3
- package/src/components/provider/index.js +1 -4
- package/src/components/resizable-box-popover/index.js +4 -6
- package/src/components/responsive-block-control/README.md +4 -4
- package/src/components/responsive-block-control/index.js +1 -1
- package/src/components/responsive-block-control/test/index.js +5 -5
- package/src/components/rich-text/format-toolbar-container.js +1 -48
- package/src/components/rich-text/index.js +1 -2
- package/src/components/skip-to-selected-block/index.js +10 -13
- package/src/components/spacing-sizes-control/input-controls/spacing-input-control.js +4 -5
- package/src/components/url-input/index.js +6 -15
- package/src/hooks/anchor.scss +1 -1
- package/src/hooks/background.js +1 -1
- package/src/hooks/block-hooks.js +1 -1
- package/src/hooks/dimensions.js +1 -2
- package/src/hooks/font-size.js +7 -12
- package/src/hooks/index.js +1 -0
- package/src/hooks/layout-child.js +91 -1
- package/src/hooks/layout.js +12 -1
- package/src/hooks/line-height.js +1 -1
- package/src/hooks/position.js +0 -1
- package/src/hooks/spacing-visualizer.js +126 -0
- package/src/hooks/{padding.scss → spacing.scss} +1 -1
- package/src/hooks/use-typography-props.js +2 -8
- package/src/layouts/grid.js +137 -53
- package/src/layouts/test/grid.js +16 -2
- package/src/private-apis.js +2 -2
- package/src/store/actions.js +4 -42
- package/src/store/private-actions.js +34 -69
- package/src/store/reducer.js +2 -8
- package/src/store/selectors.js +41 -46
- package/src/store/test/actions.js +0 -105
- package/src/style.scss +2 -2
- package/src/utils/calculate-scale.js +20 -0
- package/build/components/default-style-picker/index.js +0 -70
- package/build/components/default-style-picker/index.js.map +0 -1
- package/build/hooks/margin.js +0 -86
- package/build/hooks/margin.js.map +0 -1
- package/build/hooks/padding.js +0 -78
- package/build/hooks/padding.js.map +0 -1
- package/build/utils/use-can-block-toolbar-be-focused.js +0 -46
- package/build/utils/use-can-block-toolbar-be-focused.js.map +0 -1
- package/build-module/components/default-style-picker/index.js +0 -63
- package/build-module/components/default-style-picker/index.js.map +0 -1
- package/build-module/hooks/margin.js +0 -78
- package/build-module/hooks/margin.js.map +0 -1
- package/build-module/hooks/padding.js +0 -70
- package/build-module/hooks/padding.js.map +0 -1
- package/build-module/utils/use-can-block-toolbar-be-focused.js +0 -40
- package/build-module/utils/use-can-block-toolbar-be-focused.js.map +0 -1
- package/src/components/block-settings-menu/style.scss +0 -3
- package/src/components/default-style-picker/index.js +0 -70
- package/src/hooks/margin.js +0 -91
- package/src/hooks/padding.js +0 -82
- package/src/utils/use-can-block-toolbar-be-focused.js +0 -48
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const clamp = (lowerlimit, width, upperlimit) => {
|
|
2
|
+
if (width < lowerlimit) return lowerlimit;
|
|
3
|
+
if (width > upperlimit) return upperlimit;
|
|
4
|
+
return width;
|
|
5
|
+
};
|
|
6
|
+
export default function calculateScale(scaleConfig, width) {
|
|
7
|
+
const scaleSlope = (scaleConfig.maxScale - scaleConfig.minScale) / (scaleConfig.maxWidth - scaleConfig.minWidth);
|
|
8
|
+
const scaleIntercept = scaleConfig.minScale - scaleSlope * scaleConfig.minWidth;
|
|
9
|
+
return clamp(scaleConfig.maxScale, scaleSlope * width + scaleIntercept, scaleConfig.minScale);
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=calculate-scale.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["clamp","lowerlimit","width","upperlimit","calculateScale","scaleConfig","scaleSlope","maxScale","minScale","maxWidth","minWidth","scaleIntercept"],"sources":["@wordpress/block-editor/src/utils/calculate-scale.js"],"sourcesContent":["const clamp = ( lowerlimit, width, upperlimit ) => {\n\tif ( width < lowerlimit ) return lowerlimit;\n\tif ( width > upperlimit ) return upperlimit;\n\treturn width;\n};\n\nexport default function calculateScale( scaleConfig, width ) {\n\tconst scaleSlope =\n\t\t( scaleConfig.maxScale - scaleConfig.minScale ) /\n\t\t( scaleConfig.maxWidth - scaleConfig.minWidth );\n\n\tconst scaleIntercept =\n\t\tscaleConfig.minScale - scaleSlope * scaleConfig.minWidth;\n\n\treturn clamp(\n\t\tscaleConfig.maxScale,\n\t\tscaleSlope * width + scaleIntercept,\n\t\tscaleConfig.minScale\n\t);\n}\n"],"mappings":"AAAA,MAAMA,KAAK,GAAGA,CAAEC,UAAU,EAAEC,KAAK,EAAEC,UAAU,KAAM;EAClD,IAAKD,KAAK,GAAGD,UAAU,EAAG,OAAOA,UAAU;EAC3C,IAAKC,KAAK,GAAGC,UAAU,EAAG,OAAOA,UAAU;EAC3C,OAAOD,KAAK;AACb,CAAC;AAED,eAAe,SAASE,cAAcA,CAAEC,WAAW,EAAEH,KAAK,EAAG;EAC5D,MAAMI,UAAU,GACf,CAAED,WAAW,CAACE,QAAQ,GAAGF,WAAW,CAACG,QAAQ,KAC3CH,WAAW,CAACI,QAAQ,GAAGJ,WAAW,CAACK,QAAQ,CAAE;EAEhD,MAAMC,cAAc,GACnBN,WAAW,CAACG,QAAQ,GAAGF,UAAU,GAAGD,WAAW,CAACK,QAAQ;EAEzD,OAAOV,KAAK,CACXK,WAAW,CAACE,QAAQ,EACpBD,UAAU,GAAGJ,KAAK,GAAGS,cAAc,EACnCN,WAAW,CAACG,QACb,CAAC;AACF"}
|
|
@@ -482,11 +482,15 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
|
|
|
482
482
|
margin-bottom: auto;
|
|
483
483
|
}
|
|
484
484
|
|
|
485
|
-
.block-editor-
|
|
485
|
+
.block-editor-iframe__html {
|
|
486
486
|
transition: all 0.3s;
|
|
487
487
|
transform-origin: top center;
|
|
488
488
|
}
|
|
489
489
|
|
|
490
|
+
.block-editor-iframe__html[style*=scale] {
|
|
491
|
+
background-color: #ddd;
|
|
492
|
+
}
|
|
493
|
+
|
|
490
494
|
.is-vertical .block-list-appender {
|
|
491
495
|
width: 24px;
|
|
492
496
|
margin-left: auto;
|
|
@@ -734,8 +738,9 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
|
|
|
734
738
|
.block-editor-default-block-appender .block-editor-default-block-appender__content {
|
|
735
739
|
opacity: 0.62;
|
|
736
740
|
}
|
|
737
|
-
:where(body .is-layout-constrained) .block-editor-default-block-appender > :first-child:first-child {
|
|
741
|
+
:where(body .is-layout-constrained) .block-editor-default-block-appender > :first-child:first-child, :where(.wp-site-blocks) .block-editor-default-block-appender > :first-child:first-child {
|
|
738
742
|
margin-block-start: 0;
|
|
743
|
+
margin-block-end: 0;
|
|
739
744
|
}
|
|
740
745
|
.block-editor-default-block-appender .components-drop-zone__content-icon {
|
|
741
746
|
display: none;
|
package/build-style/content.css
CHANGED
|
@@ -482,11 +482,15 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
|
|
|
482
482
|
margin-bottom: auto;
|
|
483
483
|
}
|
|
484
484
|
|
|
485
|
-
.block-editor-
|
|
485
|
+
.block-editor-iframe__html {
|
|
486
486
|
transition: all 0.3s;
|
|
487
487
|
transform-origin: top center;
|
|
488
488
|
}
|
|
489
489
|
|
|
490
|
+
.block-editor-iframe__html[style*=scale] {
|
|
491
|
+
background-color: #ddd;
|
|
492
|
+
}
|
|
493
|
+
|
|
490
494
|
.is-vertical .block-list-appender {
|
|
491
495
|
width: 24px;
|
|
492
496
|
margin-right: auto;
|
|
@@ -734,8 +738,9 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
|
|
|
734
738
|
.block-editor-default-block-appender .block-editor-default-block-appender__content {
|
|
735
739
|
opacity: 0.62;
|
|
736
740
|
}
|
|
737
|
-
:where(body .is-layout-constrained) .block-editor-default-block-appender > :first-child:first-child {
|
|
741
|
+
:where(body .is-layout-constrained) .block-editor-default-block-appender > :first-child:first-child, :where(.wp-site-blocks) .block-editor-default-block-appender > :first-child:first-child {
|
|
738
742
|
margin-block-start: 0;
|
|
743
|
+
margin-block-end: 0;
|
|
739
744
|
}
|
|
740
745
|
.block-editor-default-block-appender .components-drop-zone__content-icon {
|
|
741
746
|
display: none;
|
|
@@ -797,7 +797,7 @@ iframe[name=editor-canvas].has-editor-padding {
|
|
|
797
797
|
outline: none;
|
|
798
798
|
}
|
|
799
799
|
.components-button.block-editor-block-mover-button:focus-visible::before {
|
|
800
|
-
box-shadow: inset 0 0 0 1px
|
|
800
|
+
box-shadow: inset 0 0 0 1px #fff, 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
801
801
|
outline: 2px solid transparent;
|
|
802
802
|
}
|
|
803
803
|
|
|
@@ -972,14 +972,6 @@ iframe[name=editor-canvas].has-editor-padding {
|
|
|
972
972
|
z-index: 1000001;
|
|
973
973
|
}
|
|
974
974
|
|
|
975
|
-
.block-editor-block-settings-menu__popover .components-dropdown-menu__menu {
|
|
976
|
-
padding: 0;
|
|
977
|
-
}
|
|
978
|
-
|
|
979
|
-
.block-editor-block-styles + .default-style-picker__default-switcher {
|
|
980
|
-
margin-top: 16px;
|
|
981
|
-
}
|
|
982
|
-
|
|
983
975
|
.block-editor-block-styles__preview-panel {
|
|
984
976
|
display: none;
|
|
985
977
|
z-index: 90;
|
|
@@ -1017,7 +1009,7 @@ iframe[name=editor-canvas].has-editor-padding {
|
|
|
1017
1009
|
color: #fff;
|
|
1018
1010
|
}
|
|
1019
1011
|
.block-editor-block-styles__variants button.components-button.block-editor-block-styles__item:focus, .block-editor-block-styles__variants button.components-button.block-editor-block-styles__item.is-active:focus {
|
|
1020
|
-
box-shadow: inset 0 0 0 1px
|
|
1012
|
+
box-shadow: inset 0 0 0 1px #fff, 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
1021
1013
|
outline: 2px solid transparent;
|
|
1022
1014
|
}
|
|
1023
1015
|
.block-editor-block-styles__variants .block-editor-block-styles__item-text {
|
|
@@ -1619,6 +1611,37 @@ iframe[name=editor-canvas].has-editor-padding {
|
|
|
1619
1611
|
direction: ltr;
|
|
1620
1612
|
}
|
|
1621
1613
|
|
|
1614
|
+
.block-editor-grid-visualizer {
|
|
1615
|
+
z-index: 30 !important;
|
|
1616
|
+
}
|
|
1617
|
+
|
|
1618
|
+
.block-editor-grid-visualizer .components-popover__content * {
|
|
1619
|
+
pointer-events: none !important;
|
|
1620
|
+
}
|
|
1621
|
+
|
|
1622
|
+
.block-editor-grid-visualizer__grid {
|
|
1623
|
+
display: grid;
|
|
1624
|
+
}
|
|
1625
|
+
|
|
1626
|
+
.block-editor-grid-visualizer__item {
|
|
1627
|
+
border: 1px dashed #ddd;
|
|
1628
|
+
}
|
|
1629
|
+
|
|
1630
|
+
.block-editor-grid-item-resizer {
|
|
1631
|
+
z-index: 30 !important;
|
|
1632
|
+
}
|
|
1633
|
+
|
|
1634
|
+
.block-editor-grid-item-resizer .components-popover__content * {
|
|
1635
|
+
pointer-events: none !important;
|
|
1636
|
+
}
|
|
1637
|
+
|
|
1638
|
+
.block-editor-grid-item-resizer__box {
|
|
1639
|
+
border: 1px solid var(--wp-admin-theme-color);
|
|
1640
|
+
}
|
|
1641
|
+
.block-editor-grid-item-resizer__box .components-resizable-box__handle {
|
|
1642
|
+
pointer-events: all !important;
|
|
1643
|
+
}
|
|
1644
|
+
|
|
1622
1645
|
.block-editor-height-control {
|
|
1623
1646
|
border: 0;
|
|
1624
1647
|
margin: 0;
|
|
@@ -2044,7 +2067,7 @@ iframe[name=editor-canvas].has-editor-padding {
|
|
|
2044
2067
|
box-shadow: none;
|
|
2045
2068
|
}
|
|
2046
2069
|
.block-editor-link-control__search-item .block-editor-link-control__search-item-title:focus-visible {
|
|
2047
|
-
box-shadow: inset 0 0 0 1px
|
|
2070
|
+
box-shadow: inset 0 0 0 1px #fff, 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
2048
2071
|
outline: 2px solid transparent;
|
|
2049
2072
|
text-decoration: none;
|
|
2050
2073
|
}
|
|
@@ -3198,7 +3221,7 @@ iframe[name=editor-canvas].has-editor-padding {
|
|
|
3198
3221
|
}
|
|
3199
3222
|
|
|
3200
3223
|
.html-anchor-control .components-external-link {
|
|
3201
|
-
display: block;
|
|
3224
|
+
display: inline-block;
|
|
3202
3225
|
margin-top: 8px;
|
|
3203
3226
|
}
|
|
3204
3227
|
|
|
@@ -3364,19 +3387,6 @@ iframe[name=editor-canvas].has-editor-padding {
|
|
|
3364
3387
|
margin-bottom: 16px;
|
|
3365
3388
|
}
|
|
3366
3389
|
|
|
3367
|
-
.block-editor__padding-visualizer {
|
|
3368
|
-
position: absolute;
|
|
3369
|
-
top: 0;
|
|
3370
|
-
bottom: 0;
|
|
3371
|
-
right: 0;
|
|
3372
|
-
left: 0;
|
|
3373
|
-
opacity: 0.5;
|
|
3374
|
-
border-color: var(--wp-admin-theme-color);
|
|
3375
|
-
border-style: solid;
|
|
3376
|
-
pointer-events: none;
|
|
3377
|
-
box-sizing: border-box;
|
|
3378
|
-
}
|
|
3379
|
-
|
|
3380
3390
|
.block-editor-hooks__position-selection__select-control .components-custom-select-control__hint {
|
|
3381
3391
|
display: none;
|
|
3382
3392
|
}
|
|
@@ -3391,6 +3401,19 @@ iframe[name=editor-canvas].has-editor-padding {
|
|
|
3391
3401
|
text-align: right;
|
|
3392
3402
|
}
|
|
3393
3403
|
|
|
3404
|
+
.block-editor__spacing-visualizer {
|
|
3405
|
+
position: absolute;
|
|
3406
|
+
top: 0;
|
|
3407
|
+
bottom: 0;
|
|
3408
|
+
right: 0;
|
|
3409
|
+
left: 0;
|
|
3410
|
+
opacity: 0.5;
|
|
3411
|
+
border-color: var(--wp-admin-theme-color);
|
|
3412
|
+
border-style: solid;
|
|
3413
|
+
pointer-events: none;
|
|
3414
|
+
box-sizing: border-box;
|
|
3415
|
+
}
|
|
3416
|
+
|
|
3394
3417
|
.typography-block-support-panel .single-column {
|
|
3395
3418
|
grid-column: span 1;
|
|
3396
3419
|
}
|
|
@@ -4307,6 +4330,13 @@ iframe[name=editor-canvas].has-editor-padding {
|
|
|
4307
4330
|
height: 40px;
|
|
4308
4331
|
}
|
|
4309
4332
|
|
|
4333
|
+
.is-zoom-out .block-editor-inserter__menu {
|
|
4334
|
+
display: flex;
|
|
4335
|
+
}
|
|
4336
|
+
.is-zoom-out .block-editor-inserter__patterns-category-dialog {
|
|
4337
|
+
position: static;
|
|
4338
|
+
}
|
|
4339
|
+
|
|
4310
4340
|
.spacing-sizes-control .spacing-sizes-control__custom-value-input,
|
|
4311
4341
|
.spacing-sizes-control .spacing-sizes-control__label {
|
|
4312
4342
|
margin-bottom: 0;
|
package/build-style/style.css
CHANGED
|
@@ -797,7 +797,7 @@ iframe[name=editor-canvas].has-editor-padding {
|
|
|
797
797
|
outline: none;
|
|
798
798
|
}
|
|
799
799
|
.components-button.block-editor-block-mover-button:focus-visible::before {
|
|
800
|
-
box-shadow: inset 0 0 0 1px
|
|
800
|
+
box-shadow: inset 0 0 0 1px #fff, 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
801
801
|
outline: 2px solid transparent;
|
|
802
802
|
}
|
|
803
803
|
|
|
@@ -972,14 +972,6 @@ iframe[name=editor-canvas].has-editor-padding {
|
|
|
972
972
|
z-index: 1000001;
|
|
973
973
|
}
|
|
974
974
|
|
|
975
|
-
.block-editor-block-settings-menu__popover .components-dropdown-menu__menu {
|
|
976
|
-
padding: 0;
|
|
977
|
-
}
|
|
978
|
-
|
|
979
|
-
.block-editor-block-styles + .default-style-picker__default-switcher {
|
|
980
|
-
margin-top: 16px;
|
|
981
|
-
}
|
|
982
|
-
|
|
983
975
|
.block-editor-block-styles__preview-panel {
|
|
984
976
|
display: none;
|
|
985
977
|
z-index: 90;
|
|
@@ -1017,7 +1009,7 @@ iframe[name=editor-canvas].has-editor-padding {
|
|
|
1017
1009
|
color: #fff;
|
|
1018
1010
|
}
|
|
1019
1011
|
.block-editor-block-styles__variants button.components-button.block-editor-block-styles__item:focus, .block-editor-block-styles__variants button.components-button.block-editor-block-styles__item.is-active:focus {
|
|
1020
|
-
box-shadow: inset 0 0 0 1px
|
|
1012
|
+
box-shadow: inset 0 0 0 1px #fff, 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
1021
1013
|
outline: 2px solid transparent;
|
|
1022
1014
|
}
|
|
1023
1015
|
.block-editor-block-styles__variants .block-editor-block-styles__item-text {
|
|
@@ -1620,6 +1612,37 @@ iframe[name=editor-canvas].has-editor-padding {
|
|
|
1620
1612
|
direction: ltr;
|
|
1621
1613
|
}
|
|
1622
1614
|
|
|
1615
|
+
.block-editor-grid-visualizer {
|
|
1616
|
+
z-index: 30 !important;
|
|
1617
|
+
}
|
|
1618
|
+
|
|
1619
|
+
.block-editor-grid-visualizer .components-popover__content * {
|
|
1620
|
+
pointer-events: none !important;
|
|
1621
|
+
}
|
|
1622
|
+
|
|
1623
|
+
.block-editor-grid-visualizer__grid {
|
|
1624
|
+
display: grid;
|
|
1625
|
+
}
|
|
1626
|
+
|
|
1627
|
+
.block-editor-grid-visualizer__item {
|
|
1628
|
+
border: 1px dashed #ddd;
|
|
1629
|
+
}
|
|
1630
|
+
|
|
1631
|
+
.block-editor-grid-item-resizer {
|
|
1632
|
+
z-index: 30 !important;
|
|
1633
|
+
}
|
|
1634
|
+
|
|
1635
|
+
.block-editor-grid-item-resizer .components-popover__content * {
|
|
1636
|
+
pointer-events: none !important;
|
|
1637
|
+
}
|
|
1638
|
+
|
|
1639
|
+
.block-editor-grid-item-resizer__box {
|
|
1640
|
+
border: 1px solid var(--wp-admin-theme-color);
|
|
1641
|
+
}
|
|
1642
|
+
.block-editor-grid-item-resizer__box .components-resizable-box__handle {
|
|
1643
|
+
pointer-events: all !important;
|
|
1644
|
+
}
|
|
1645
|
+
|
|
1623
1646
|
.block-editor-height-control {
|
|
1624
1647
|
border: 0;
|
|
1625
1648
|
margin: 0;
|
|
@@ -2045,7 +2068,7 @@ iframe[name=editor-canvas].has-editor-padding {
|
|
|
2045
2068
|
box-shadow: none;
|
|
2046
2069
|
}
|
|
2047
2070
|
.block-editor-link-control__search-item .block-editor-link-control__search-item-title:focus-visible {
|
|
2048
|
-
box-shadow: inset 0 0 0 1px
|
|
2071
|
+
box-shadow: inset 0 0 0 1px #fff, 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
2049
2072
|
outline: 2px solid transparent;
|
|
2050
2073
|
text-decoration: none;
|
|
2051
2074
|
}
|
|
@@ -3199,7 +3222,7 @@ iframe[name=editor-canvas].has-editor-padding {
|
|
|
3199
3222
|
}
|
|
3200
3223
|
|
|
3201
3224
|
.html-anchor-control .components-external-link {
|
|
3202
|
-
display: block;
|
|
3225
|
+
display: inline-block;
|
|
3203
3226
|
margin-top: 8px;
|
|
3204
3227
|
}
|
|
3205
3228
|
|
|
@@ -3365,19 +3388,6 @@ iframe[name=editor-canvas].has-editor-padding {
|
|
|
3365
3388
|
margin-bottom: 16px;
|
|
3366
3389
|
}
|
|
3367
3390
|
|
|
3368
|
-
.block-editor__padding-visualizer {
|
|
3369
|
-
position: absolute;
|
|
3370
|
-
top: 0;
|
|
3371
|
-
bottom: 0;
|
|
3372
|
-
left: 0;
|
|
3373
|
-
right: 0;
|
|
3374
|
-
opacity: 0.5;
|
|
3375
|
-
border-color: var(--wp-admin-theme-color);
|
|
3376
|
-
border-style: solid;
|
|
3377
|
-
pointer-events: none;
|
|
3378
|
-
box-sizing: border-box;
|
|
3379
|
-
}
|
|
3380
|
-
|
|
3381
3391
|
.block-editor-hooks__position-selection__select-control .components-custom-select-control__hint {
|
|
3382
3392
|
display: none;
|
|
3383
3393
|
}
|
|
@@ -3392,6 +3402,19 @@ iframe[name=editor-canvas].has-editor-padding {
|
|
|
3392
3402
|
text-align: left;
|
|
3393
3403
|
}
|
|
3394
3404
|
|
|
3405
|
+
.block-editor__spacing-visualizer {
|
|
3406
|
+
position: absolute;
|
|
3407
|
+
top: 0;
|
|
3408
|
+
bottom: 0;
|
|
3409
|
+
left: 0;
|
|
3410
|
+
right: 0;
|
|
3411
|
+
opacity: 0.5;
|
|
3412
|
+
border-color: var(--wp-admin-theme-color);
|
|
3413
|
+
border-style: solid;
|
|
3414
|
+
pointer-events: none;
|
|
3415
|
+
box-sizing: border-box;
|
|
3416
|
+
}
|
|
3417
|
+
|
|
3395
3418
|
.typography-block-support-panel .single-column {
|
|
3396
3419
|
grid-column: span 1;
|
|
3397
3420
|
}
|
|
@@ -4308,6 +4331,13 @@ iframe[name=editor-canvas].has-editor-padding {
|
|
|
4308
4331
|
height: 40px;
|
|
4309
4332
|
}
|
|
4310
4333
|
|
|
4334
|
+
.is-zoom-out .block-editor-inserter__menu {
|
|
4335
|
+
display: flex;
|
|
4336
|
+
}
|
|
4337
|
+
.is-zoom-out .block-editor-inserter__patterns-category-dialog {
|
|
4338
|
+
position: static;
|
|
4339
|
+
}
|
|
4340
|
+
|
|
4311
4341
|
.spacing-sizes-control .spacing-sizes-control__custom-value-input,
|
|
4312
4342
|
.spacing-sizes-control .spacing-sizes-control__label {
|
|
4313
4343
|
margin-bottom: 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/block-editor",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.21.0",
|
|
4
4
|
"description": "Generic block editor.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -35,41 +35,40 @@
|
|
|
35
35
|
"@emotion/react": "^11.7.1",
|
|
36
36
|
"@emotion/styled": "^11.6.0",
|
|
37
37
|
"@react-spring/web": "^9.4.5",
|
|
38
|
-
"@wordpress/a11y": "^3.
|
|
39
|
-
"@wordpress/api-fetch": "^6.
|
|
40
|
-
"@wordpress/blob": "^3.
|
|
41
|
-
"@wordpress/blocks": "^12.
|
|
42
|
-
"@wordpress/commands": "^0.
|
|
43
|
-
"@wordpress/components": "^
|
|
44
|
-
"@wordpress/compose": "^6.
|
|
45
|
-
"@wordpress/data": "^9.
|
|
46
|
-
"@wordpress/date": "^4.
|
|
47
|
-
"@wordpress/deprecated": "^3.
|
|
48
|
-
"@wordpress/dom": "^3.
|
|
49
|
-
"@wordpress/element": "^5.
|
|
50
|
-
"@wordpress/escape-html": "^2.
|
|
51
|
-
"@wordpress/hooks": "^3.
|
|
52
|
-
"@wordpress/html-entities": "^3.
|
|
53
|
-
"@wordpress/i18n": "^4.
|
|
54
|
-
"@wordpress/icons": "^9.
|
|
55
|
-
"@wordpress/is-shallow-equal": "^4.
|
|
56
|
-
"@wordpress/keyboard-shortcuts": "^4.
|
|
57
|
-
"@wordpress/keycodes": "^3.
|
|
58
|
-
"@wordpress/notices": "^4.
|
|
59
|
-
"@wordpress/preferences": "^3.
|
|
60
|
-
"@wordpress/private-apis": "^0.
|
|
61
|
-
"@wordpress/rich-text": "^6.
|
|
62
|
-
"@wordpress/style-engine": "^1.
|
|
63
|
-
"@wordpress/token-list": "^2.
|
|
64
|
-
"@wordpress/url": "^3.
|
|
65
|
-
"@wordpress/warning": "^2.
|
|
66
|
-
"@wordpress/wordcount": "^3.
|
|
38
|
+
"@wordpress/a11y": "^3.53.0",
|
|
39
|
+
"@wordpress/api-fetch": "^6.50.0",
|
|
40
|
+
"@wordpress/blob": "^3.53.0",
|
|
41
|
+
"@wordpress/blocks": "^12.30.0",
|
|
42
|
+
"@wordpress/commands": "^0.24.0",
|
|
43
|
+
"@wordpress/components": "^27.1.0",
|
|
44
|
+
"@wordpress/compose": "^6.30.0",
|
|
45
|
+
"@wordpress/data": "^9.23.0",
|
|
46
|
+
"@wordpress/date": "^4.53.0",
|
|
47
|
+
"@wordpress/deprecated": "^3.53.0",
|
|
48
|
+
"@wordpress/dom": "^3.53.0",
|
|
49
|
+
"@wordpress/element": "^5.30.0",
|
|
50
|
+
"@wordpress/escape-html": "^2.53.0",
|
|
51
|
+
"@wordpress/hooks": "^3.53.0",
|
|
52
|
+
"@wordpress/html-entities": "^3.53.0",
|
|
53
|
+
"@wordpress/i18n": "^4.53.0",
|
|
54
|
+
"@wordpress/icons": "^9.44.0",
|
|
55
|
+
"@wordpress/is-shallow-equal": "^4.53.0",
|
|
56
|
+
"@wordpress/keyboard-shortcuts": "^4.30.0",
|
|
57
|
+
"@wordpress/keycodes": "^3.53.0",
|
|
58
|
+
"@wordpress/notices": "^4.21.0",
|
|
59
|
+
"@wordpress/preferences": "^3.30.0",
|
|
60
|
+
"@wordpress/private-apis": "^0.35.0",
|
|
61
|
+
"@wordpress/rich-text": "^6.30.0",
|
|
62
|
+
"@wordpress/style-engine": "^1.36.0",
|
|
63
|
+
"@wordpress/token-list": "^2.53.0",
|
|
64
|
+
"@wordpress/url": "^3.54.0",
|
|
65
|
+
"@wordpress/warning": "^2.53.0",
|
|
66
|
+
"@wordpress/wordcount": "^3.53.0",
|
|
67
67
|
"change-case": "^4.1.2",
|
|
68
68
|
"classnames": "^2.3.1",
|
|
69
69
|
"colord": "^2.7.0",
|
|
70
70
|
"deepmerge": "^4.3.0",
|
|
71
71
|
"diff": "^4.0.2",
|
|
72
|
-
"dom-scroll-into-view": "^1.2.1",
|
|
73
72
|
"fast-deep-equal": "^3.1.3",
|
|
74
73
|
"memize": "^2.1.0",
|
|
75
74
|
"postcss": "^8.4.21",
|
|
@@ -87,5 +86,5 @@
|
|
|
87
86
|
"publishConfig": {
|
|
88
87
|
"access": "public"
|
|
89
88
|
},
|
|
90
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "ac3c3e465a083081a86a4da6ee6fb817b41e5130"
|
|
91
90
|
}
|
|
@@ -14,6 +14,7 @@ import Iframe from '../iframe';
|
|
|
14
14
|
import WritingFlow from '../writing-flow';
|
|
15
15
|
import { useMouseMoveTypingReset } from '../observe-typing';
|
|
16
16
|
import { useBlockSelectionClearer } from '../block-selection-clearer';
|
|
17
|
+
import { useBlockCommands } from '../use-block-commands';
|
|
17
18
|
|
|
18
19
|
export function ExperimentalBlockCanvas( {
|
|
19
20
|
shouldIframe = true,
|
|
@@ -23,6 +24,7 @@ export function ExperimentalBlockCanvas( {
|
|
|
23
24
|
contentRef: contentRefProp,
|
|
24
25
|
iframeProps,
|
|
25
26
|
} ) {
|
|
27
|
+
useBlockCommands();
|
|
26
28
|
const resetTypingRef = useMouseMoveTypingReset();
|
|
27
29
|
const clearerRef = useBlockSelectionClearer();
|
|
28
30
|
const localRef = useRef();
|
|
@@ -382,7 +382,7 @@ describe( 'BlockDraggable', () => {
|
|
|
382
382
|
// activate the gesture. Since this not available in tests, the library
|
|
383
383
|
// displays a warning message.
|
|
384
384
|
expect( console ).toHaveWarnedWith(
|
|
385
|
-
'[Reanimated]
|
|
385
|
+
'[Reanimated] setGestureState() cannot be used with Jest.'
|
|
386
386
|
);
|
|
387
387
|
expect( getEditorHtml() ).toMatchSnapshot(
|
|
388
388
|
'Paragraph block moved from first to second position'
|
|
@@ -410,7 +410,7 @@ describe( 'BlockDraggable', () => {
|
|
|
410
410
|
// activate the gesture. Since this not available in tests, the library
|
|
411
411
|
// displays a warning message.
|
|
412
412
|
expect( console ).toHaveWarnedWith(
|
|
413
|
-
'[Reanimated]
|
|
413
|
+
'[Reanimated] setGestureState() cannot be used with Jest.'
|
|
414
414
|
);
|
|
415
415
|
expect( getEditorHtml() ).toMatchSnapshot(
|
|
416
416
|
'Spacer block moved from third to first position'
|
|
@@ -46,31 +46,23 @@ export default function HeadingLevelDropdown( {
|
|
|
46
46
|
icon={ <HeadingLevelIcon level={ value } /> }
|
|
47
47
|
label={ __( 'Change level' ) }
|
|
48
48
|
controls={ options.map( ( targetLevel ) => {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
),
|
|
67
|
-
isActive,
|
|
68
|
-
onClick() {
|
|
69
|
-
onChange( targetLevel );
|
|
70
|
-
},
|
|
71
|
-
role: 'menuitemradio',
|
|
72
|
-
};
|
|
73
|
-
}
|
|
49
|
+
const isActive = targetLevel === value;
|
|
50
|
+
return {
|
|
51
|
+
icon: <HeadingLevelIcon level={ targetLevel } />,
|
|
52
|
+
title:
|
|
53
|
+
targetLevel === 0
|
|
54
|
+
? __( 'Paragraph' )
|
|
55
|
+
: sprintf(
|
|
56
|
+
// translators: %s: heading level e.g: "1", "2", "3"
|
|
57
|
+
__( 'Heading %d' ),
|
|
58
|
+
targetLevel
|
|
59
|
+
),
|
|
60
|
+
isActive,
|
|
61
|
+
onClick() {
|
|
62
|
+
onChange( targetLevel );
|
|
63
|
+
},
|
|
64
|
+
role: 'menuitemradio',
|
|
65
|
+
};
|
|
74
66
|
} ) }
|
|
75
67
|
/>
|
|
76
68
|
);
|
|
@@ -5,7 +5,6 @@ import { __ } from '@wordpress/i18n';
|
|
|
5
5
|
import {
|
|
6
6
|
getBlockType,
|
|
7
7
|
getUnregisteredTypeHandlerName,
|
|
8
|
-
hasBlockSupport,
|
|
9
8
|
store as blocksStore,
|
|
10
9
|
} from '@wordpress/blocks';
|
|
11
10
|
import { PanelBody, __unstableMotion as motion } from '@wordpress/components';
|
|
@@ -21,7 +20,6 @@ import BlockVariationTransforms from '../block-variation-transforms';
|
|
|
21
20
|
import useBlockDisplayInformation from '../use-block-display-information';
|
|
22
21
|
import { store as blockEditorStore } from '../../store';
|
|
23
22
|
import BlockStyles from '../block-styles';
|
|
24
|
-
import DefaultStylePicker from '../default-style-picker';
|
|
25
23
|
import { default as InspectorControls } from '../inspector-controls';
|
|
26
24
|
import { default as InspectorControlsTabs } from '../inspector-controls-tabs';
|
|
27
25
|
import useInspectorControlsTabs from '../inspector-controls-tabs/use-inspector-controls-tabs';
|
|
@@ -277,15 +275,6 @@ const BlockInspectorSingleBlock = ( { clientId, blockName } ) => {
|
|
|
277
275
|
<div>
|
|
278
276
|
<PanelBody title={ __( 'Styles' ) }>
|
|
279
277
|
<BlockStyles clientId={ clientId } />
|
|
280
|
-
{ hasBlockSupport(
|
|
281
|
-
blockName,
|
|
282
|
-
'defaultStylePicker',
|
|
283
|
-
true
|
|
284
|
-
) && (
|
|
285
|
-
<DefaultStylePicker
|
|
286
|
-
blockName={ blockName }
|
|
287
|
-
/>
|
|
288
|
-
) }
|
|
289
278
|
</PanelBody>
|
|
290
279
|
</div>
|
|
291
280
|
) }
|
|
@@ -98,7 +98,7 @@ function BlockListItemContent( {
|
|
|
98
98
|
const name = getBlockName( clientId );
|
|
99
99
|
const parentName = getBlockName( rootClientId );
|
|
100
100
|
const { align } = getBlockAttributes( clientId ) || {};
|
|
101
|
-
const {
|
|
101
|
+
const { textAlign: parentBlockAlign } =
|
|
102
102
|
getBlockAttributes( rootClientId ) || {};
|
|
103
103
|
|
|
104
104
|
return {
|
|
@@ -14,16 +14,11 @@ import { usePreferredColorSchemeStyle } from '@wordpress/compose';
|
|
|
14
14
|
import styles from './block.scss';
|
|
15
15
|
|
|
16
16
|
const TEXT_BLOCKS_WITH_OUTLINE = [ 'core/missing', 'core/freeform' ];
|
|
17
|
+
const DESIGN_BLOCKS_WITHOUT_OUTLINE = [ 'core/button', 'core/spacer' ];
|
|
18
|
+
const MEDIA_BLOCKS_WITH_OUTLINE = [ 'core/audio', 'core/file' ];
|
|
17
19
|
|
|
18
|
-
function BlockOutline( {
|
|
19
|
-
blockCategory,
|
|
20
|
-
hasInnerBlocks,
|
|
21
|
-
isRootList,
|
|
22
|
-
isSelected,
|
|
23
|
-
name,
|
|
24
|
-
} ) {
|
|
20
|
+
function BlockOutline( { blockCategory, hasInnerBlocks, isSelected, name } ) {
|
|
25
21
|
const textBlockWithOutline = TEXT_BLOCKS_WITH_OUTLINE.includes( name );
|
|
26
|
-
const socialBlockWithOutline = name.includes( 'core/social-link' );
|
|
27
22
|
|
|
28
23
|
const hasBlockTextCategory =
|
|
29
24
|
blockCategory === 'text' && ! textBlockWithOutline;
|
|
@@ -44,19 +39,39 @@ function BlockOutline( {
|
|
|
44
39
|
hasBlockTextCategory && styles.solidBorderTextContent,
|
|
45
40
|
];
|
|
46
41
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
42
|
+
if ( ! isSelected ) {
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
let shouldShowOutline = true;
|
|
47
|
+
if ( hasBlockTextCategory && ! hasInnerBlocks ) {
|
|
48
|
+
shouldShowOutline = false;
|
|
49
|
+
} else if (
|
|
50
|
+
blockCategory === 'media' &&
|
|
51
|
+
! hasInnerBlocks &&
|
|
52
|
+
! MEDIA_BLOCKS_WITH_OUTLINE.includes( name )
|
|
53
|
+
) {
|
|
54
|
+
shouldShowOutline = false;
|
|
55
|
+
} else if ( blockCategory === 'media' && name === 'core/cover' ) {
|
|
56
|
+
shouldShowOutline = false;
|
|
57
|
+
} else if (
|
|
58
|
+
blockCategory === 'design' &&
|
|
59
|
+
DESIGN_BLOCKS_WITHOUT_OUTLINE.includes( name )
|
|
60
|
+
) {
|
|
61
|
+
shouldShowOutline = false;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
if ( shouldShowOutline ) {
|
|
65
|
+
return (
|
|
66
|
+
<View
|
|
67
|
+
pointerEvents="box-none"
|
|
68
|
+
style={ styleSolidBorder }
|
|
69
|
+
testID="block-outline"
|
|
70
|
+
/>
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return null;
|
|
60
75
|
}
|
|
61
76
|
|
|
62
77
|
export default BlockOutline;
|
|
@@ -40,9 +40,7 @@ const BlockSelectionButton = ( {
|
|
|
40
40
|
onPress={ () => {
|
|
41
41
|
/* Open BottomSheet with markup. */
|
|
42
42
|
} }
|
|
43
|
-
disabled
|
|
44
|
-
true
|
|
45
|
-
} /* Disable temporarily since onPress function is empty. */
|
|
43
|
+
disabled /* Disable temporarily since onPress function is empty. */
|
|
46
44
|
>
|
|
47
45
|
{ rootClientId &&
|
|
48
46
|
rootBlockIcon && [
|