@wordpress/block-editor 14.5.0 → 14.7.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/README.md +0 -8
- package/build/autocompleters/block.js +13 -5
- package/build/autocompleters/block.js.map +1 -1
- package/build/components/block-canvas/index.js +10 -0
- package/build/components/block-canvas/index.js.map +1 -1
- package/build/components/block-card/index.js +2 -2
- package/build/components/block-card/index.js.map +1 -1
- package/build/components/block-full-height-alignment-control/index.js +1 -1
- package/build/components/block-full-height-alignment-control/index.js.map +1 -1
- package/build/components/block-list/block.js +15 -29
- package/build/components/block-list/block.js.map +1 -1
- package/build/components/block-list/block.native.js +1 -7
- package/build/components/block-list/block.native.js.map +1 -1
- package/build/components/block-list/index.js +5 -5
- package/build/components/block-list/index.js.map +1 -1
- package/build/components/block-list/use-block-props/index.js +1 -2
- package/build/components/block-list/use-block-props/index.js.map +1 -1
- package/build/components/block-list/use-block-props/use-focus-first-element.js +4 -3
- package/build/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
- package/build/components/block-list/use-block-props/use-selected-block-event-handlers.js +3 -6
- package/build/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +1 -1
- package/build/components/block-list/use-in-between-inserter.js +1 -1
- package/build/components/block-list/use-in-between-inserter.js.map +1 -1
- package/build/components/block-patterns-list/index.js +23 -26
- package/build/components/block-patterns-list/index.js.map +1 -1
- package/build/components/block-patterns-paging/index.js +1 -1
- package/build/components/block-patterns-paging/index.js.map +1 -1
- package/build/components/block-popover/index.js +3 -46
- package/build/components/block-popover/index.js.map +1 -1
- package/build/components/block-preview/async.js +51 -0
- package/build/components/block-preview/async.js.map +1 -0
- package/build/components/block-preview/index.js +6 -3
- package/build/components/block-preview/index.js.map +1 -1
- package/build/components/block-settings-menu/block-settings-dropdown.js +5 -0
- package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build/components/block-settings-menu/index.js +4 -3
- package/build/components/block-settings-menu/index.js.map +1 -1
- package/build/components/block-toolbar/change-design.js +119 -0
- package/build/components/block-toolbar/change-design.js.map +1 -0
- package/build/components/block-toolbar/index.js +19 -7
- package/build/components/block-toolbar/index.js.map +1 -1
- package/build/components/block-tools/index.js +16 -19
- package/build/components/block-tools/index.js.map +1 -1
- package/build/components/block-tools/insertion-point.js +4 -3
- package/build/components/block-tools/insertion-point.js.map +1 -1
- package/build/components/block-tools/use-block-toolbar-popover-props.js +1 -1
- package/build/components/block-tools/use-block-toolbar-popover-props.js.map +1 -1
- package/build/components/block-tools/use-show-block-tools.js +7 -10
- package/build/components/block-tools/use-show-block-tools.js.map +1 -1
- package/build/components/block-tools/zoom-out-mode-inserters.js +20 -29
- package/build/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
- package/build/components/block-variation-transforms/index.js +2 -2
- package/build/components/block-variation-transforms/index.js.map +1 -1
- package/build/components/block-vertical-alignment-control/ui.js +6 -10
- package/build/components/block-vertical-alignment-control/ui.js.map +1 -1
- package/build/components/border-radius-control/linked-button.js +7 -10
- package/build/components/border-radius-control/linked-button.js.map +1 -1
- package/build/components/collab/block-comment-icon-slot.js +18 -0
- package/build/components/collab/block-comment-icon-slot.js.map +1 -0
- package/build/components/collab/block-comment-icon-toolbar-slot.js +18 -0
- package/build/components/collab/block-comment-icon-toolbar-slot.js.map +1 -0
- package/build/components/colors-gradients/use-multiple-origin-colors-and-gradients.js +7 -1
- package/build/components/colors-gradients/use-multiple-origin-colors-and-gradients.js.map +1 -1
- package/build/components/convert-to-group-buttons/toolbar.js +4 -4
- package/build/components/convert-to-group-buttons/toolbar.js.map +1 -1
- package/build/components/global-styles/color-panel.js +1 -4
- package/build/components/global-styles/color-panel.js.map +1 -1
- package/build/components/global-styles/dimensions-panel.js +26 -14
- package/build/components/global-styles/dimensions-panel.js.map +1 -1
- package/build/components/global-styles/use-global-styles-context.native.js +6 -0
- package/build/components/global-styles/use-global-styles-context.native.js.map +1 -1
- package/build/components/iframe/get-compatibility-styles.js +4 -4
- package/build/components/iframe/get-compatibility-styles.js.map +1 -1
- package/build/components/iframe/index.js +33 -22
- package/build/components/iframe/index.js.map +1 -1
- package/build/components/image-size-control/index.js +61 -20
- package/build/components/image-size-control/index.js.map +1 -1
- package/build/components/inner-blocks/index.js +9 -5
- package/build/components/inner-blocks/index.js.map +1 -1
- package/build/components/inserter/block-patterns-explorer/pattern-list.js +2 -2
- package/build/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/index.js +1 -2
- package/build/components/inserter/block-patterns-tab/index.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/pattern-category-previews.js +5 -3
- package/build/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/patterns-filter.js +1 -1
- package/build/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/use-pattern-categories.js +3 -0
- package/build/components/inserter/block-patterns-tab/use-pattern-categories.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/utils.js +5 -1
- package/build/components/inserter/block-patterns-tab/utils.js.map +1 -1
- package/build/components/inserter/category-tabs/index.js +15 -2
- package/build/components/inserter/category-tabs/index.js.map +1 -1
- package/build/components/inserter/hooks/use-block-types-state.js +1 -1
- package/build/components/inserter/hooks/use-block-types-state.js.map +1 -1
- package/build/components/inserter/hooks/use-patterns-paging.js +0 -5
- package/build/components/inserter/hooks/use-patterns-paging.js.map +1 -1
- package/build/components/inserter/menu.js +4 -2
- package/build/components/inserter/menu.js.map +1 -1
- package/build/components/inserter/search-results.js +0 -2
- package/build/components/inserter/search-results.js.map +1 -1
- package/build/components/inserter-button/index.native.js +1 -1
- package/build/components/inserter-button/index.native.js.map +1 -1
- package/build/components/inspector-controls-tabs/index.js +0 -2
- package/build/components/inspector-controls-tabs/index.js.map +1 -1
- package/build/components/inspector-controls-tabs/utils.js +3 -6
- package/build/components/inspector-controls-tabs/utils.js.map +1 -1
- package/build/components/link-control/link-preview.js +12 -9
- package/build/components/link-control/link-preview.js.map +1 -1
- package/build/components/list-view/appender.js +4 -3
- package/build/components/list-view/appender.js.map +1 -1
- package/build/components/list-view/branch.js +6 -5
- package/build/components/list-view/branch.js.map +1 -1
- package/build/components/list-view/index.js +1 -2
- package/build/components/list-view/index.js.map +1 -1
- package/build/components/media-placeholder/index.js +4 -4
- package/build/components/media-placeholder/index.js.map +1 -1
- package/build/components/provider/index.js +1 -1
- package/build/components/provider/index.js.map +1 -1
- package/build/components/rich-text/event-listeners/index.js +3 -1
- package/build/components/rich-text/event-listeners/index.js.map +1 -1
- package/build/components/rich-text/index.js +1 -1
- package/build/components/rich-text/index.js.map +1 -1
- package/build/components/rich-text/index.native.js +2 -6
- package/build/components/rich-text/index.native.js.map +1 -1
- package/build/components/spacing-sizes-control/index.js +2 -2
- package/build/components/spacing-sizes-control/index.js.map +1 -1
- package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js +3 -3
- package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
- package/build/components/spacing-sizes-control/linked-button.js +1 -5
- package/build/components/spacing-sizes-control/linked-button.js.map +1 -1
- package/build/components/tabbed-sidebar/index.js +1 -1
- package/build/components/tabbed-sidebar/index.js.map +1 -1
- package/build/components/tool-selector/index.js +1 -4
- package/build/components/tool-selector/index.js.map +1 -1
- package/build/components/url-input/index.js +4 -2
- package/build/components/url-input/index.js.map +1 -1
- package/build/components/use-block-commands/index.js +6 -7
- package/build/components/use-block-commands/index.js.map +1 -1
- package/build/components/use-block-drop-zone/index.js +5 -5
- package/build/components/use-block-drop-zone/index.js.map +1 -1
- package/build/components/use-block-drop-zone/index.native.js +0 -1
- package/build/components/use-block-drop-zone/index.native.js.map +1 -1
- package/build/components/use-moving-animation/index.js +1 -3
- package/build/components/use-moving-animation/index.js.map +1 -1
- package/build/components/use-settings/index.js +1 -3
- package/build/components/use-settings/index.js.map +1 -1
- package/build/components/writing-flow/index.js +5 -3
- package/build/components/writing-flow/index.js.map +1 -1
- package/build/components/writing-flow/use-tab-nav.js +2 -3
- package/build/components/writing-flow/use-tab-nav.js.map +1 -1
- package/build/hooks/block-bindings.js +19 -8
- package/build/hooks/block-bindings.js.map +1 -1
- package/build/hooks/contrast-checker.js +0 -1
- package/build/hooks/contrast-checker.js.map +1 -1
- package/build/hooks/duotone.js +2 -2
- package/build/hooks/duotone.js.map +1 -1
- package/build/hooks/font-family.js +1 -1
- package/build/hooks/font-family.js.map +1 -1
- package/build/hooks/style.js +4 -1
- package/build/hooks/style.js.map +1 -1
- package/build/hooks/supports.js +6 -6
- package/build/hooks/supports.js.map +1 -1
- package/build/hooks/typography.js +5 -5
- package/build/hooks/typography.js.map +1 -1
- package/build/hooks/use-zoom-out.js +13 -22
- package/build/hooks/use-zoom-out.js.map +1 -1
- package/build/hooks/utils.js +2 -2
- package/build/hooks/utils.js.map +1 -1
- package/build/index.js +0 -7
- package/build/index.js.map +1 -1
- package/build/lock-unlock.js.map +1 -1
- package/build/private-apis.js +6 -3
- package/build/private-apis.js.map +1 -1
- package/build/store/actions.js +2 -33
- package/build/store/actions.js.map +1 -1
- package/build/store/defaults.js +1 -1
- package/build/store/defaults.js.map +1 -1
- package/build/store/private-actions.js +57 -8
- package/build/store/private-actions.js.map +1 -1
- package/build/store/private-selectors.js +10 -22
- package/build/store/private-selectors.js.map +1 -1
- package/build/store/reducer.js +16 -6
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +53 -15
- package/build/store/selectors.js.map +1 -1
- package/build/store/utils.js +5 -4
- package/build/store/utils.js.map +1 -1
- package/build/utils/dom.js +37 -17
- package/build/utils/dom.js.map +1 -1
- package/build/utils/get-font-styles-and-weights.js +1 -1
- package/build/utils/get-font-styles-and-weights.js.map +1 -1
- package/build/utils/transform-styles/index.js +4 -3
- package/build/utils/transform-styles/index.js.map +1 -1
- package/build-module/autocompleters/block.js +14 -6
- package/build-module/autocompleters/block.js.map +1 -1
- package/build-module/components/block-canvas/index.js +11 -1
- package/build-module/components/block-canvas/index.js.map +1 -1
- package/build-module/components/block-card/index.js +3 -3
- package/build-module/components/block-card/index.js.map +1 -1
- package/build-module/components/block-full-height-alignment-control/index.js +1 -1
- package/build-module/components/block-full-height-alignment-control/index.js.map +1 -1
- package/build-module/components/block-list/block.js +16 -28
- package/build-module/components/block-list/block.js.map +1 -1
- package/build-module/components/block-list/block.native.js +1 -7
- package/build-module/components/block-list/block.native.js.map +1 -1
- package/build-module/components/block-list/index.js +5 -5
- package/build-module/components/block-list/index.js.map +1 -1
- package/build-module/components/block-list/use-block-props/index.js +1 -2
- package/build-module/components/block-list/use-block-props/index.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-focus-first-element.js +4 -3
- package/build-module/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.js +3 -6
- package/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +1 -1
- package/build-module/components/block-list/use-in-between-inserter.js +1 -1
- package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
- package/build-module/components/block-patterns-list/index.js +23 -26
- package/build-module/components/block-patterns-list/index.js.map +1 -1
- package/build-module/components/block-patterns-paging/index.js +1 -1
- package/build-module/components/block-patterns-paging/index.js.map +1 -1
- package/build-module/components/block-popover/index.js +4 -47
- package/build-module/components/block-popover/index.js.map +1 -1
- package/build-module/components/block-preview/async.js +44 -0
- package/build-module/components/block-preview/async.js.map +1 -0
- package/build-module/components/block-preview/index.js +6 -3
- package/build-module/components/block-preview/index.js.map +1 -1
- package/build-module/components/block-settings-menu/block-settings-dropdown.js +5 -0
- package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build-module/components/block-settings-menu/index.js +5 -4
- package/build-module/components/block-settings-menu/index.js.map +1 -1
- package/build-module/components/block-toolbar/change-design.js +111 -0
- package/build-module/components/block-toolbar/change-design.js.map +1 -0
- package/build-module/components/block-toolbar/index.js +19 -7
- package/build-module/components/block-toolbar/index.js.map +1 -1
- package/build-module/components/block-tools/index.js +17 -20
- package/build-module/components/block-tools/index.js.map +1 -1
- package/build-module/components/block-tools/insertion-point.js +4 -3
- package/build-module/components/block-tools/insertion-point.js.map +1 -1
- package/build-module/components/block-tools/use-block-toolbar-popover-props.js +2 -2
- package/build-module/components/block-tools/use-block-toolbar-popover-props.js.map +1 -1
- package/build-module/components/block-tools/use-show-block-tools.js +7 -10
- package/build-module/components/block-tools/use-show-block-tools.js.map +1 -1
- package/build-module/components/block-tools/zoom-out-mode-inserters.js +20 -29
- package/build-module/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
- package/build-module/components/block-variation-transforms/index.js +2 -2
- package/build-module/components/block-variation-transforms/index.js.map +1 -1
- package/build-module/components/block-vertical-alignment-control/ui.js +6 -10
- package/build-module/components/block-vertical-alignment-control/ui.js.map +1 -1
- package/build-module/components/border-radius-control/linked-button.js +8 -11
- package/build-module/components/border-radius-control/linked-button.js.map +1 -1
- package/build-module/components/collab/block-comment-icon-slot.js +11 -0
- package/build-module/components/collab/block-comment-icon-slot.js.map +1 -0
- package/build-module/components/collab/block-comment-icon-toolbar-slot.js +11 -0
- package/build-module/components/collab/block-comment-icon-toolbar-slot.js.map +1 -0
- package/build-module/components/colors-gradients/use-multiple-origin-colors-and-gradients.js +7 -1
- package/build-module/components/colors-gradients/use-multiple-origin-colors-and-gradients.js.map +1 -1
- package/build-module/components/convert-to-group-buttons/toolbar.js +4 -4
- package/build-module/components/convert-to-group-buttons/toolbar.js.map +1 -1
- package/build-module/components/global-styles/color-panel.js +2 -5
- package/build-module/components/global-styles/color-panel.js.map +1 -1
- package/build-module/components/global-styles/dimensions-panel.js +26 -14
- package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
- package/build-module/components/global-styles/use-global-styles-context.native.js +6 -0
- package/build-module/components/global-styles/use-global-styles-context.native.js.map +1 -1
- package/build-module/components/iframe/get-compatibility-styles.js +4 -4
- package/build-module/components/iframe/get-compatibility-styles.js.map +1 -1
- package/build-module/components/iframe/index.js +33 -22
- package/build-module/components/iframe/index.js.map +1 -1
- package/build-module/components/image-size-control/index.js +62 -21
- package/build-module/components/image-size-control/index.js.map +1 -1
- package/build-module/components/inner-blocks/index.js +9 -5
- package/build-module/components/inner-blocks/index.js.map +1 -1
- package/build-module/components/inserter/block-patterns-explorer/pattern-list.js +2 -2
- package/build-module/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab/index.js +1 -2
- package/build-module/components/inserter/block-patterns-tab/index.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js +6 -4
- package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab/patterns-filter.js +1 -1
- package/build-module/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab/use-pattern-categories.js +4 -1
- package/build-module/components/inserter/block-patterns-tab/use-pattern-categories.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab/utils.js +4 -0
- package/build-module/components/inserter/block-patterns-tab/utils.js.map +1 -1
- package/build-module/components/inserter/category-tabs/index.js +15 -2
- package/build-module/components/inserter/category-tabs/index.js.map +1 -1
- package/build-module/components/inserter/hooks/use-block-types-state.js +1 -1
- package/build-module/components/inserter/hooks/use-block-types-state.js.map +1 -1
- package/build-module/components/inserter/hooks/use-patterns-paging.js +1 -6
- package/build-module/components/inserter/hooks/use-patterns-paging.js.map +1 -1
- package/build-module/components/inserter/menu.js +5 -3
- package/build-module/components/inserter/menu.js.map +1 -1
- package/build-module/components/inserter/search-results.js +0 -2
- package/build-module/components/inserter/search-results.js.map +1 -1
- package/build-module/components/inserter-button/index.native.js +1 -1
- package/build-module/components/inserter-button/index.native.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/index.js +0 -2
- package/build-module/components/inspector-controls-tabs/index.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/utils.js +3 -6
- package/build-module/components/inspector-controls-tabs/utils.js.map +1 -1
- package/build-module/components/link-control/link-preview.js +13 -10
- package/build-module/components/link-control/link-preview.js.map +1 -1
- package/build-module/components/list-view/appender.js +4 -3
- package/build-module/components/list-view/appender.js.map +1 -1
- package/build-module/components/list-view/branch.js +7 -6
- package/build-module/components/list-view/branch.js.map +1 -1
- package/build-module/components/list-view/index.js +1 -2
- package/build-module/components/list-view/index.js.map +1 -1
- package/build-module/components/media-placeholder/index.js +4 -4
- package/build-module/components/media-placeholder/index.js.map +1 -1
- package/build-module/components/provider/index.js +1 -1
- package/build-module/components/provider/index.js.map +1 -1
- package/build-module/components/rich-text/event-listeners/index.js +4 -2
- package/build-module/components/rich-text/event-listeners/index.js.map +1 -1
- package/build-module/components/rich-text/index.js +1 -1
- package/build-module/components/rich-text/index.js.map +1 -1
- package/build-module/components/rich-text/index.native.js +2 -6
- package/build-module/components/rich-text/index.native.js.map +1 -1
- package/build-module/components/spacing-sizes-control/index.js +3 -3
- package/build-module/components/spacing-sizes-control/index.js.map +1 -1
- package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js +4 -4
- package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
- package/build-module/components/spacing-sizes-control/linked-button.js +2 -6
- package/build-module/components/spacing-sizes-control/linked-button.js.map +1 -1
- package/build-module/components/tabbed-sidebar/index.js +1 -1
- package/build-module/components/tabbed-sidebar/index.js.map +1 -1
- package/build-module/components/tool-selector/index.js +1 -4
- package/build-module/components/tool-selector/index.js.map +1 -1
- package/build-module/components/url-input/index.js +4 -2
- package/build-module/components/url-input/index.js.map +1 -1
- package/build-module/components/use-block-commands/index.js +5 -5
- package/build-module/components/use-block-commands/index.js.map +1 -1
- package/build-module/components/use-block-drop-zone/index.js +5 -5
- package/build-module/components/use-block-drop-zone/index.js.map +1 -1
- package/build-module/components/use-block-drop-zone/index.native.js +0 -1
- package/build-module/components/use-block-drop-zone/index.native.js.map +1 -1
- package/build-module/components/use-moving-animation/index.js +1 -3
- package/build-module/components/use-moving-animation/index.js.map +1 -1
- package/build-module/components/use-settings/index.js +1 -3
- package/build-module/components/use-settings/index.js.map +1 -1
- package/build-module/components/writing-flow/index.js +5 -3
- package/build-module/components/writing-flow/index.js.map +1 -1
- package/build-module/components/writing-flow/use-tab-nav.js +2 -3
- package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
- package/build-module/hooks/block-bindings.js +20 -9
- package/build-module/hooks/block-bindings.js.map +1 -1
- package/build-module/hooks/contrast-checker.js +0 -1
- package/build-module/hooks/contrast-checker.js.map +1 -1
- package/build-module/hooks/duotone.js +2 -2
- package/build-module/hooks/duotone.js.map +1 -1
- package/build-module/hooks/font-family.js +1 -1
- package/build-module/hooks/font-family.js.map +1 -1
- package/build-module/hooks/style.js +4 -1
- package/build-module/hooks/style.js.map +1 -1
- package/build-module/hooks/supports.js +6 -6
- package/build-module/hooks/supports.js.map +1 -1
- package/build-module/hooks/typography.js +5 -5
- package/build-module/hooks/typography.js.map +1 -1
- package/build-module/hooks/use-zoom-out.js +15 -23
- package/build-module/hooks/use-zoom-out.js.map +1 -1
- package/build-module/hooks/utils.js +2 -2
- package/build-module/hooks/utils.js.map +1 -1
- package/build-module/index.js +1 -1
- package/build-module/index.js.map +1 -1
- package/build-module/lock-unlock.js.map +1 -1
- package/build-module/private-apis.js +7 -5
- package/build-module/private-apis.js.map +1 -1
- package/build-module/store/actions.js +2 -33
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/defaults.js +1 -1
- package/build-module/store/defaults.js.map +1 -1
- package/build-module/store/private-actions.js +54 -7
- package/build-module/store/private-actions.js.map +1 -1
- package/build-module/store/private-selectors.js +10 -21
- package/build-module/store/private-selectors.js.map +1 -1
- package/build-module/store/reducer.js +16 -6
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +54 -16
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/store/utils.js +3 -3
- package/build-module/store/utils.js.map +1 -1
- package/build-module/utils/dom.js +35 -16
- package/build-module/utils/dom.js.map +1 -1
- package/build-module/utils/get-font-styles-and-weights.js +2 -2
- package/build-module/utils/get-font-styles-and-weights.js.map +1 -1
- package/build-module/utils/transform-styles/index.js +3 -2
- package/build-module/utils/transform-styles/index.js.map +1 -1
- package/build-style/content-rtl.css +16 -10
- package/build-style/content.css +16 -10
- package/build-style/style-rtl.css +47 -25
- package/build-style/style.css +47 -25
- package/build-types/utils/dom.d.ts +7 -9
- package/build-types/utils/dom.d.ts.map +1 -1
- package/package.json +34 -32
- package/src/autocompleters/block.js +16 -7
- package/src/components/block-canvas/index.js +17 -1
- package/src/components/block-canvas/style.scss +3 -1
- package/src/components/block-card/index.js +3 -3
- package/src/components/block-full-height-alignment-control/index.js +1 -1
- package/src/components/block-inspector/style.scss +2 -7
- package/src/components/block-list/block.js +29 -50
- package/src/components/block-list/block.native.js +0 -4
- package/src/components/block-list/content.scss +1 -1
- package/src/components/block-list/index.js +4 -4
- package/src/components/block-list/use-block-props/index.js +0 -2
- package/src/components/block-list/use-block-props/use-focus-first-element.js +5 -3
- package/src/components/block-list/use-block-props/use-selected-block-event-handlers.js +7 -20
- package/src/components/block-list/use-in-between-inserter.js +1 -1
- package/src/components/block-patterns-list/README.md +8 -8
- package/src/components/block-patterns-list/index.js +35 -51
- package/src/components/block-patterns-list/stories/fixtures.js +834 -0
- package/src/components/block-patterns-list/stories/index.story.js +64 -0
- package/src/components/block-patterns-list/style.scss +2 -0
- package/src/components/block-patterns-paging/index.js +1 -1
- package/src/components/block-popover/index.js +4 -66
- package/src/components/block-preview/async.js +43 -0
- package/src/components/block-preview/index.js +8 -3
- package/src/components/block-settings-menu/block-settings-dropdown.js +4 -0
- package/src/components/block-settings-menu/index.js +3 -0
- package/src/components/block-toolbar/change-design.js +127 -0
- package/src/components/block-toolbar/index.js +25 -8
- package/src/components/block-toolbar/style.scss +16 -0
- package/src/components/block-tools/index.js +30 -27
- package/src/components/block-tools/insertion-point.js +4 -3
- package/src/components/block-tools/style.scss +12 -20
- package/src/components/block-tools/use-block-toolbar-popover-props.js +2 -2
- package/src/components/block-tools/use-show-block-tools.js +3 -14
- package/src/components/block-tools/zoom-out-mode-inserters.js +25 -40
- package/src/components/block-variation-transforms/index.js +2 -2
- package/src/components/block-vertical-alignment-control/ui.js +11 -15
- package/src/components/border-radius-control/linked-button.js +9 -11
- package/src/components/collab/block-comment-icon-slot.js +12 -0
- package/src/components/collab/block-comment-icon-toolbar-slot.js +12 -0
- package/src/components/colors-gradients/use-multiple-origin-colors-and-gradients.js +7 -1
- package/src/components/convert-to-group-buttons/toolbar.js +4 -4
- package/src/components/default-block-appender/content.scss +13 -19
- package/src/components/global-styles/color-panel.js +2 -10
- package/src/components/global-styles/dimensions-panel.js +22 -16
- package/src/components/global-styles/test/use-global-styles-context.native.js +1 -0
- package/src/components/global-styles/use-global-styles-context.native.js +6 -0
- package/src/components/iframe/content.scss +4 -9
- package/src/components/iframe/get-compatibility-styles.js +4 -9
- package/src/components/iframe/index.js +48 -34
- package/src/components/iframe/style.scss +2 -3
- package/src/components/image-size-control/index.js +74 -43
- package/src/components/image-size-control/test/index.js +5 -63
- package/src/components/inner-blocks/index.js +12 -6
- package/src/components/inserter/block-patterns-explorer/pattern-list.js +3 -6
- package/src/components/inserter/block-patterns-tab/index.js +0 -1
- package/src/components/inserter/block-patterns-tab/pattern-category-previews.js +10 -4
- package/src/components/inserter/block-patterns-tab/patterns-filter.js +1 -1
- package/src/components/inserter/block-patterns-tab/use-pattern-categories.js +8 -0
- package/src/components/inserter/block-patterns-tab/utils.js +5 -0
- package/src/components/inserter/category-tabs/index.js +16 -2
- package/src/components/inserter/hooks/use-block-types-state.js +6 -1
- package/src/components/inserter/hooks/use-patterns-paging.js +1 -6
- package/src/components/inserter/menu.js +6 -4
- package/src/components/inserter/search-results.js +0 -6
- package/src/components/inserter/style.scss +13 -0
- package/src/components/inserter-button/index.native.js +1 -1
- package/src/components/inspector-controls-tabs/index.js +1 -6
- package/src/components/inspector-controls-tabs/utils.js +0 -3
- package/src/components/link-control/link-preview.js +15 -8
- package/src/components/link-control/test/index.js +63 -24
- package/src/components/list-view/appender.js +5 -6
- package/src/components/list-view/branch.js +8 -6
- package/src/components/list-view/index.js +1 -2
- package/src/components/media-placeholder/index.js +4 -4
- package/src/components/provider/index.js +1 -3
- package/src/components/provider/test/experimental-provider.js +43 -1
- package/src/components/rich-text/event-listeners/index.js +4 -2
- package/src/components/rich-text/index.js +8 -1
- package/src/components/rich-text/index.native.js +0 -2
- package/src/components/spacing-sizes-control/index.js +3 -3
- package/src/components/spacing-sizes-control/input-controls/spacing-input-control.js +4 -4
- package/src/components/spacing-sizes-control/linked-button.js +2 -12
- package/src/components/tabbed-sidebar/index.js +1 -1
- package/src/components/tabbed-sidebar/style.scss +1 -1
- package/src/components/tool-selector/index.js +1 -5
- package/src/components/url-input/index.js +4 -5
- package/src/components/use-block-commands/index.js +245 -234
- package/src/components/use-block-drop-zone/index.js +5 -5
- package/src/components/use-block-drop-zone/index.native.js +0 -1
- package/src/components/use-moving-animation/index.js +0 -1
- package/src/components/use-settings/index.js +0 -1
- package/src/components/writing-flow/index.js +5 -3
- package/src/components/writing-flow/use-tab-nav.js +1 -2
- package/src/hooks/block-bindings.js +48 -31
- package/src/hooks/contrast-checker.js +0 -1
- package/src/hooks/duotone.js +2 -2
- package/src/hooks/font-family.js +1 -1
- package/src/hooks/style.js +7 -3
- package/src/hooks/supports.js +6 -6
- package/src/hooks/typography.js +5 -5
- package/src/hooks/use-zoom-out.js +14 -34
- package/src/hooks/utils.js +7 -2
- package/src/index.js +0 -1
- package/src/private-apis.js +6 -3
- package/src/store/actions.js +3 -52
- package/src/store/defaults.js +2 -1
- package/src/store/private-actions.js +71 -8
- package/src/store/private-selectors.js +14 -25
- package/src/store/reducer.js +25 -11
- package/src/store/selectors.js +116 -53
- package/src/store/test/actions.js +41 -0
- package/src/store/test/private-selectors.js +5 -0
- package/src/store/test/reducer.js +23 -0
- package/src/store/utils.js +12 -11
- package/src/utils/dom.js +42 -17
- package/src/utils/get-font-styles-and-weights.js +2 -2
- package/src/utils/test/dom.js +224 -0
- package/src/utils/transform-styles/index.js +3 -2
- package/tsconfig.json +1 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/build/components/block-list/use-block-props/use-zoom-out-mode-exit.js +0 -57
- package/build/components/block-list/use-block-props/use-zoom-out-mode-exit.js.map +0 -1
- package/build/components/block-toolbar/shuffle.js +0 -110
- package/build/components/block-toolbar/shuffle.js.map +0 -1
- package/build/components/block-tools/zoom-out-popover.js +0 -58
- package/build/components/block-tools/zoom-out-popover.js.map +0 -1
- package/build/components/block-tools/zoom-out-toolbar.js +0 -132
- package/build/components/block-tools/zoom-out-toolbar.js.map +0 -1
- package/build/components/block-vertical-alignment-control/icons.js +0 -48
- package/build/components/block-vertical-alignment-control/icons.js.map +0 -1
- package/build-module/components/block-list/use-block-props/use-zoom-out-mode-exit.js +0 -51
- package/build-module/components/block-list/use-block-props/use-zoom-out-mode-exit.js.map +0 -1
- package/build-module/components/block-toolbar/shuffle.js +0 -103
- package/build-module/components/block-toolbar/shuffle.js.map +0 -1
- package/build-module/components/block-tools/zoom-out-popover.js +0 -49
- package/build-module/components/block-tools/zoom-out-popover.js.map +0 -1
- package/build-module/components/block-tools/zoom-out-toolbar.js +0 -124
- package/build-module/components/block-tools/zoom-out-toolbar.js.map +0 -1
- package/build-module/components/block-vertical-alignment-control/icons.js +0 -41
- package/build-module/components/block-vertical-alignment-control/icons.js.map +0 -1
- package/src/components/block-list/use-block-props/use-zoom-out-mode-exit.js +0 -65
- package/src/components/block-toolbar/shuffle.js +0 -111
- package/src/components/block-tools/zoom-out-popover.js +0 -47
- package/src/components/block-tools/zoom-out-toolbar.js +0 -135
- package/src/components/block-vertical-alignment-control/icons.js +0 -34
- /package/src/{lock-unlock.js → lock-unlock.ts} +0 -0
|
@@ -18,6 +18,7 @@ import Inserter from '../inserter';
|
|
|
18
18
|
import { store as blockEditorStore } from '../../store';
|
|
19
19
|
import BlockPopoverInbetween from '../block-popover/inbetween';
|
|
20
20
|
import BlockDropZonePopover from '../block-popover/drop-zone';
|
|
21
|
+
import { unlock } from '../../lock-unlock';
|
|
21
22
|
|
|
22
23
|
export const InsertionPointOpenRef = createContext();
|
|
23
24
|
|
|
@@ -47,8 +48,8 @@ function InbetweenInsertionPointPopover( {
|
|
|
47
48
|
getPreviousBlockClientId,
|
|
48
49
|
getNextBlockClientId,
|
|
49
50
|
getSettings,
|
|
50
|
-
|
|
51
|
-
} = select( blockEditorStore );
|
|
51
|
+
isZoomOut,
|
|
52
|
+
} = unlock( select( blockEditorStore ) );
|
|
52
53
|
const insertionPoint = getBlockInsertionPoint();
|
|
53
54
|
const order = getBlockOrder( insertionPoint.rootClientId );
|
|
54
55
|
|
|
@@ -78,7 +79,7 @@ function InbetweenInsertionPointPopover( {
|
|
|
78
79
|
rootClientId: insertionPoint.rootClientId,
|
|
79
80
|
isDistractionFree: settings.isDistractionFree,
|
|
80
81
|
isInserterShown: insertionPoint?.__unstableWithInserter,
|
|
81
|
-
isZoomOutMode:
|
|
82
|
+
isZoomOutMode: isZoomOut(),
|
|
82
83
|
};
|
|
83
84
|
}, [] );
|
|
84
85
|
const { getBlockEditingMode } = useSelect( blockEditorStore );
|
|
@@ -57,6 +57,18 @@
|
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
+
// The black plus that shows up on the right side of an empty paragraph block.
|
|
61
|
+
.block-editor-block-list__empty-block-inserter.block-editor-block-list__empty-block-inserter {
|
|
62
|
+
position: absolute;
|
|
63
|
+
top: 0;
|
|
64
|
+
right: 0;
|
|
65
|
+
line-height: 0;
|
|
66
|
+
|
|
67
|
+
&:disabled {
|
|
68
|
+
display: none;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
60
72
|
// Sibling inserter / "inbetweenserter".
|
|
61
73
|
.block-editor-block-list__empty-block-inserter,
|
|
62
74
|
.block-editor-block-list__insertion-point-inserter {
|
|
@@ -187,23 +199,3 @@
|
|
|
187
199
|
top: 50%;
|
|
188
200
|
left: 50%;
|
|
189
201
|
}
|
|
190
|
-
|
|
191
|
-
.zoom-out-toolbar {
|
|
192
|
-
|
|
193
|
-
.block-editor-block-mover-button.block-editor-block-mover-button:focus-visible::before,
|
|
194
|
-
.zoom-out-toolbar-button:focus::before,
|
|
195
|
-
.block-editor-block-toolbar-shuffle:focus::before,
|
|
196
|
-
.block-selection-button_drag-handle:focus::before {
|
|
197
|
-
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
.block-editor-block-mover {
|
|
201
|
-
background: none;
|
|
202
|
-
border: none;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
// Make the spacing consistent between controls.
|
|
206
|
-
.zoom-out-toolbar-button {
|
|
207
|
-
height: $button-size-next-default-40px;
|
|
208
|
-
}
|
|
209
|
-
}
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
import { store as blockEditorStore } from '../../store';
|
|
18
18
|
import { useBlockElement } from '../block-list/use-block-props/use-block-refs';
|
|
19
19
|
import { hasStickyOrFixedPositionValue } from '../../hooks/position';
|
|
20
|
-
import {
|
|
20
|
+
import { getElementBounds } from '../../utils/dom';
|
|
21
21
|
|
|
22
22
|
const COMMON_PROPS = {
|
|
23
23
|
placement: 'top-start',
|
|
@@ -68,7 +68,7 @@ function getProps(
|
|
|
68
68
|
// Get how far the content area has been scrolled.
|
|
69
69
|
const scrollTop = scrollContainer?.scrollTop || 0;
|
|
70
70
|
|
|
71
|
-
const blockRect =
|
|
71
|
+
const blockRect = getElementBounds( selectedBlockElement );
|
|
72
72
|
const contentRect = contentElement.getBoundingClientRect();
|
|
73
73
|
|
|
74
74
|
// Get the vertical position of top of the visible content area.
|
|
@@ -25,8 +25,6 @@ export function useShowBlockTools() {
|
|
|
25
25
|
getSettings,
|
|
26
26
|
__unstableGetEditorMode,
|
|
27
27
|
isTyping,
|
|
28
|
-
getBlockOrder,
|
|
29
|
-
getSectionRootClientId,
|
|
30
28
|
} = unlock( select( blockEditorStore ) );
|
|
31
29
|
|
|
32
30
|
const clientId =
|
|
@@ -42,19 +40,11 @@ export function useShowBlockTools() {
|
|
|
42
40
|
const _showEmptyBlockSideInserter =
|
|
43
41
|
clientId &&
|
|
44
42
|
! isTyping() &&
|
|
45
|
-
|
|
43
|
+
// Hide the block inserter on the navigation mode.
|
|
44
|
+
// See https://github.com/WordPress/gutenberg/pull/66636#discussion_r1824728483.
|
|
45
|
+
editorMode !== 'navigation' &&
|
|
46
46
|
isEmptyDefaultBlock;
|
|
47
|
-
const isZoomOut = editorMode === 'zoom-out';
|
|
48
|
-
const isSectionSelected = getBlockOrder(
|
|
49
|
-
getSectionRootClientId()
|
|
50
|
-
).includes( clientId );
|
|
51
|
-
const _showZoomOutToolbar =
|
|
52
|
-
clientId &&
|
|
53
|
-
isZoomOut &&
|
|
54
|
-
! _showEmptyBlockSideInserter &&
|
|
55
|
-
isSectionSelected;
|
|
56
47
|
const _showBlockToolbarPopover =
|
|
57
|
-
! _showZoomOutToolbar &&
|
|
58
48
|
! getSettings().hasFixedToolbar &&
|
|
59
49
|
! _showEmptyBlockSideInserter &&
|
|
60
50
|
hasSelectedBlock &&
|
|
@@ -63,7 +53,6 @@ export function useShowBlockTools() {
|
|
|
63
53
|
return {
|
|
64
54
|
showEmptyBlockSideInserter: _showEmptyBlockSideInserter,
|
|
65
55
|
showBlockToolbarPopover: _showBlockToolbarPopover,
|
|
66
|
-
showZoomOutToolbar: _showZoomOutToolbar,
|
|
67
56
|
};
|
|
68
57
|
}, [] );
|
|
69
58
|
}
|
|
@@ -16,30 +16,24 @@ function ZoomOutModeInserters() {
|
|
|
16
16
|
const [ isReady, setIsReady ] = useState( false );
|
|
17
17
|
const {
|
|
18
18
|
hasSelection,
|
|
19
|
-
insertionPoint,
|
|
20
19
|
blockOrder,
|
|
21
|
-
blockInsertionPointVisible,
|
|
22
20
|
setInserterIsOpened,
|
|
23
21
|
sectionRootClientId,
|
|
24
22
|
selectedBlockClientId,
|
|
25
23
|
} = useSelect( ( select ) => {
|
|
26
24
|
const {
|
|
27
25
|
getSettings,
|
|
28
|
-
getInsertionPoint,
|
|
29
26
|
getBlockOrder,
|
|
30
27
|
getSelectionStart,
|
|
31
28
|
getSelectedBlockClientId,
|
|
32
29
|
getSectionRootClientId,
|
|
33
|
-
isBlockInsertionPointVisible,
|
|
34
30
|
} = unlock( select( blockEditorStore ) );
|
|
35
31
|
|
|
36
32
|
const root = getSectionRootClientId();
|
|
37
33
|
|
|
38
34
|
return {
|
|
39
35
|
hasSelection: !! getSelectionStart().clientId,
|
|
40
|
-
insertionPoint: getInsertionPoint(),
|
|
41
36
|
blockOrder: getBlockOrder( root ),
|
|
42
|
-
blockInsertionPointVisible: isBlockInsertionPointVisible(),
|
|
43
37
|
sectionRootClientId: root,
|
|
44
38
|
setInserterIsOpened:
|
|
45
39
|
getSettings().__experimentalSetIsInserterOpened,
|
|
@@ -64,41 +58,32 @@ function ZoomOutModeInserters() {
|
|
|
64
58
|
return null;
|
|
65
59
|
}
|
|
66
60
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
61
|
+
const previousClientId = selectedBlockClientId;
|
|
62
|
+
const index = blockOrder.findIndex(
|
|
63
|
+
( clientId ) => selectedBlockClientId === clientId
|
|
64
|
+
);
|
|
65
|
+
const nextClientId = blockOrder[ index + 1 ];
|
|
70
66
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
category: 'all',
|
|
92
|
-
} );
|
|
93
|
-
showInsertionPoint( sectionRootClientId, index, {
|
|
94
|
-
operation: 'insert',
|
|
95
|
-
} );
|
|
96
|
-
} }
|
|
97
|
-
/>
|
|
98
|
-
) }
|
|
99
|
-
</BlockPopoverInbetween>
|
|
100
|
-
);
|
|
101
|
-
} );
|
|
67
|
+
return (
|
|
68
|
+
<BlockPopoverInbetween
|
|
69
|
+
previousClientId={ previousClientId }
|
|
70
|
+
nextClientId={ nextClientId }
|
|
71
|
+
>
|
|
72
|
+
<ZoomOutModeInserterButton
|
|
73
|
+
onClick={ () => {
|
|
74
|
+
setInserterIsOpened( {
|
|
75
|
+
rootClientId: sectionRootClientId,
|
|
76
|
+
insertionIndex: index + 1,
|
|
77
|
+
tab: 'patterns',
|
|
78
|
+
category: 'all',
|
|
79
|
+
} );
|
|
80
|
+
showInsertionPoint( sectionRootClientId, index + 1, {
|
|
81
|
+
operation: 'insert',
|
|
82
|
+
} );
|
|
83
|
+
} }
|
|
84
|
+
/>
|
|
85
|
+
</BlockPopoverInbetween>
|
|
86
|
+
);
|
|
102
87
|
}
|
|
103
88
|
|
|
104
89
|
export default ZoomOutModeInserters;
|
|
@@ -45,7 +45,7 @@ function VariationsButtons( {
|
|
|
45
45
|
selectedValue === variation.name
|
|
46
46
|
? variation.title
|
|
47
47
|
: sprintf(
|
|
48
|
-
/* translators: %s:
|
|
48
|
+
/* translators: %s: Block or block variation name. */
|
|
49
49
|
__( 'Transform to %s' ),
|
|
50
50
|
variation.title
|
|
51
51
|
)
|
|
@@ -127,7 +127,7 @@ function VariationsToggleGroupControl( {
|
|
|
127
127
|
selectedValue === variation.name
|
|
128
128
|
? variation.title
|
|
129
129
|
: sprintf(
|
|
130
|
-
/* translators: %s:
|
|
130
|
+
/* translators: %s: Block or block variation name. */
|
|
131
131
|
__( 'Transform to %s' ),
|
|
132
132
|
variation.title
|
|
133
133
|
)
|
|
@@ -3,37 +3,33 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { _x } from '@wordpress/i18n';
|
|
5
5
|
import { ToolbarGroup, ToolbarDropdownMenu } from '@wordpress/components';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Internal dependencies
|
|
9
|
-
*/
|
|
10
6
|
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
} from '
|
|
7
|
+
justifyTop,
|
|
8
|
+
justifyCenterVertical,
|
|
9
|
+
justifyBottom,
|
|
10
|
+
justifyStretchVertical,
|
|
11
|
+
justifySpaceBetweenVertical,
|
|
12
|
+
} from '@wordpress/icons';
|
|
17
13
|
|
|
18
14
|
const BLOCK_ALIGNMENTS_CONTROLS = {
|
|
19
15
|
top: {
|
|
20
|
-
icon:
|
|
16
|
+
icon: justifyTop,
|
|
21
17
|
title: _x( 'Align top', 'Block vertical alignment setting' ),
|
|
22
18
|
},
|
|
23
19
|
center: {
|
|
24
|
-
icon:
|
|
20
|
+
icon: justifyCenterVertical,
|
|
25
21
|
title: _x( 'Align middle', 'Block vertical alignment setting' ),
|
|
26
22
|
},
|
|
27
23
|
bottom: {
|
|
28
|
-
icon:
|
|
24
|
+
icon: justifyBottom,
|
|
29
25
|
title: _x( 'Align bottom', 'Block vertical alignment setting' ),
|
|
30
26
|
},
|
|
31
27
|
stretch: {
|
|
32
|
-
icon:
|
|
28
|
+
icon: justifyStretchVertical,
|
|
33
29
|
title: _x( 'Stretch to fill', 'Block vertical alignment setting' ),
|
|
34
30
|
},
|
|
35
31
|
'space-between': {
|
|
36
|
-
icon:
|
|
32
|
+
icon: justifySpaceBetweenVertical,
|
|
37
33
|
title: _x( 'Space between', 'Block vertical alignment setting' ),
|
|
38
34
|
},
|
|
39
35
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { Button
|
|
4
|
+
import { Button } from '@wordpress/components';
|
|
5
5
|
import { link, linkOff } from '@wordpress/icons';
|
|
6
6
|
import { __ } from '@wordpress/i18n';
|
|
7
7
|
|
|
@@ -9,15 +9,13 @@ export default function LinkedButton( { isLinked, ...props } ) {
|
|
|
9
9
|
const label = isLinked ? __( 'Unlink radii' ) : __( 'Link radii' );
|
|
10
10
|
|
|
11
11
|
return (
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
/>
|
|
21
|
-
</Tooltip>
|
|
12
|
+
<Button
|
|
13
|
+
{ ...props }
|
|
14
|
+
className="component-border-radius-control__linked-button"
|
|
15
|
+
size="small"
|
|
16
|
+
icon={ isLinked ? link : linkOff }
|
|
17
|
+
iconSize={ 24 }
|
|
18
|
+
label={ label }
|
|
19
|
+
/>
|
|
22
20
|
);
|
|
23
21
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { createSlotFill } from '@wordpress/components';
|
|
5
|
+
|
|
6
|
+
const { Fill: __unstableCommentIconFill, Slot } = createSlotFill(
|
|
7
|
+
'__unstableCommentIconFill'
|
|
8
|
+
);
|
|
9
|
+
|
|
10
|
+
__unstableCommentIconFill.Slot = Slot;
|
|
11
|
+
|
|
12
|
+
export default __unstableCommentIconFill;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { createSlotFill } from '@wordpress/components';
|
|
5
|
+
|
|
6
|
+
const { Fill: __unstableCommentIconToolbarFill, Slot } = createSlotFill(
|
|
7
|
+
'__unstableCommentIconToolbarFill'
|
|
8
|
+
);
|
|
9
|
+
|
|
10
|
+
__unstableCommentIconToolbarFill.Slot = Slot;
|
|
11
|
+
|
|
12
|
+
export default __unstableCommentIconToolbarFill;
|
|
@@ -55,6 +55,7 @@ export default function useMultipleOriginColorsAndGradients() {
|
|
|
55
55
|
'Theme',
|
|
56
56
|
'Indicates this palette comes from the theme.'
|
|
57
57
|
),
|
|
58
|
+
slug: 'theme',
|
|
58
59
|
colors: themeColors,
|
|
59
60
|
} );
|
|
60
61
|
}
|
|
@@ -68,6 +69,7 @@ export default function useMultipleOriginColorsAndGradients() {
|
|
|
68
69
|
'Default',
|
|
69
70
|
'Indicates this palette comes from WordPress.'
|
|
70
71
|
),
|
|
72
|
+
slug: 'default',
|
|
71
73
|
colors: defaultColors,
|
|
72
74
|
} );
|
|
73
75
|
}
|
|
@@ -75,8 +77,9 @@ export default function useMultipleOriginColorsAndGradients() {
|
|
|
75
77
|
result.push( {
|
|
76
78
|
name: _x(
|
|
77
79
|
'Custom',
|
|
78
|
-
'Indicates this palette
|
|
80
|
+
'Indicates this palette is created by the user.'
|
|
79
81
|
),
|
|
82
|
+
slug: 'custom',
|
|
80
83
|
colors: customColors,
|
|
81
84
|
} );
|
|
82
85
|
}
|
|
@@ -96,6 +99,7 @@ export default function useMultipleOriginColorsAndGradients() {
|
|
|
96
99
|
'Theme',
|
|
97
100
|
'Indicates this palette comes from the theme.'
|
|
98
101
|
),
|
|
102
|
+
slug: 'theme',
|
|
99
103
|
gradients: themeGradients,
|
|
100
104
|
} );
|
|
101
105
|
}
|
|
@@ -109,6 +113,7 @@ export default function useMultipleOriginColorsAndGradients() {
|
|
|
109
113
|
'Default',
|
|
110
114
|
'Indicates this palette comes from WordPress.'
|
|
111
115
|
),
|
|
116
|
+
slug: 'default',
|
|
112
117
|
gradients: defaultGradients,
|
|
113
118
|
} );
|
|
114
119
|
}
|
|
@@ -118,6 +123,7 @@ export default function useMultipleOriginColorsAndGradients() {
|
|
|
118
123
|
'Custom',
|
|
119
124
|
'Indicates this palette is created by the user.'
|
|
120
125
|
),
|
|
126
|
+
slug: 'custom',
|
|
121
127
|
gradients: customGradients,
|
|
122
128
|
} );
|
|
123
129
|
}
|
|
@@ -85,27 +85,27 @@ function BlockGroupToolbar() {
|
|
|
85
85
|
<ToolbarGroup>
|
|
86
86
|
<ToolbarButton
|
|
87
87
|
icon={ group }
|
|
88
|
-
label={ _x( 'Group', '
|
|
88
|
+
label={ _x( 'Group', 'action: convert blocks to group' ) }
|
|
89
89
|
onClick={ onConvertToGroup }
|
|
90
90
|
/>
|
|
91
91
|
{ canInsertRow && (
|
|
92
92
|
<ToolbarButton
|
|
93
93
|
icon={ row }
|
|
94
|
-
label={ _x( 'Row', '
|
|
94
|
+
label={ _x( 'Row', 'action: convert blocks to row' ) }
|
|
95
95
|
onClick={ onConvertToRow }
|
|
96
96
|
/>
|
|
97
97
|
) }
|
|
98
98
|
{ canInsertStack && (
|
|
99
99
|
<ToolbarButton
|
|
100
100
|
icon={ stack }
|
|
101
|
-
label={ _x( 'Stack', '
|
|
101
|
+
label={ _x( 'Stack', 'action: convert blocks to stack' ) }
|
|
102
102
|
onClick={ onConvertToStack }
|
|
103
103
|
/>
|
|
104
104
|
) }
|
|
105
105
|
{ canInsertGrid && (
|
|
106
106
|
<ToolbarButton
|
|
107
107
|
icon={ grid }
|
|
108
|
-
label={ _x( 'Grid', '
|
|
108
|
+
label={ _x( 'Grid', 'action: convert blocks to grid' ) }
|
|
109
109
|
onClick={ onConvertToGrid }
|
|
110
110
|
/>
|
|
111
111
|
) }
|
|
@@ -24,20 +24,11 @@
|
|
|
24
24
|
.block-editor-default-block-appender__content {
|
|
25
25
|
// Set the opacity of the initial block appender to the same as placeholder text in an empty Paragraph block.
|
|
26
26
|
opacity: 0.62;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
// In "constrained" layout containers, the first and last paragraphs have their margins zeroed out.
|
|
30
|
-
// In the case of this appender, it needs to apply those same rules to avoid layout shifts.
|
|
31
|
-
// Such shifts happen when the bottom margin of the Title block has been set to less than the default 1em margin of paragraphs.
|
|
32
|
-
:where(body .is-layout-constrained) &,
|
|
33
|
-
:where(.wp-site-blocks) & {
|
|
34
|
-
> :first-child {
|
|
35
|
-
margin-block-start: 0;
|
|
36
|
-
margin-block-end: 0;
|
|
37
|
-
}
|
|
38
27
|
|
|
39
|
-
//
|
|
40
|
-
// This
|
|
28
|
+
// The following prevents user agent styles from applying margins to the appender's inner paragraph.
|
|
29
|
+
// This in turn prevents layout shift due to layout styles removing margins from first and last children.
|
|
30
|
+
margin-block-start: 0;
|
|
31
|
+
margin-block-end: 0;
|
|
41
32
|
}
|
|
42
33
|
|
|
43
34
|
// Dropzone.
|
|
@@ -62,9 +53,7 @@
|
|
|
62
53
|
}
|
|
63
54
|
}
|
|
64
55
|
|
|
65
|
-
// The
|
|
66
|
-
// that exists only on empty documents.
|
|
67
|
-
.block-editor-block-list__empty-block-inserter.block-editor-block-list__empty-block-inserter,
|
|
56
|
+
// The initial appender that exists only on empty documents.
|
|
68
57
|
.block-editor-default-block-appender .block-editor-inserter {
|
|
69
58
|
position: absolute;
|
|
70
59
|
top: 0;
|
|
@@ -76,10 +65,11 @@
|
|
|
76
65
|
}
|
|
77
66
|
}
|
|
78
67
|
|
|
79
|
-
|
|
80
68
|
/**
|
|
81
|
-
* Fixed position appender.
|
|
82
|
-
*
|
|
69
|
+
* Fixed position appender (right bottom corner).
|
|
70
|
+
*
|
|
71
|
+
* These styles apply to all in-canvas inserters. All in-canvas inserters always
|
|
72
|
+
* exist within a block.
|
|
83
73
|
*/
|
|
84
74
|
|
|
85
75
|
.block-editor-block-list__block .block-list-appender {
|
|
@@ -96,6 +86,10 @@
|
|
|
96
86
|
line-height: 0;
|
|
97
87
|
}
|
|
98
88
|
|
|
89
|
+
.block-editor-inserter:disabled {
|
|
90
|
+
display: none;
|
|
91
|
+
}
|
|
92
|
+
|
|
99
93
|
.block-editor-default-block-appender {
|
|
100
94
|
height: $button-size-small;
|
|
101
95
|
}
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
privateApis as componentsPrivateApis,
|
|
21
21
|
} from '@wordpress/components';
|
|
22
22
|
import { useCallback } from '@wordpress/element';
|
|
23
|
-
import { __
|
|
23
|
+
import { __ } from '@wordpress/i18n';
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* Internal dependencies
|
|
@@ -167,10 +167,7 @@ const LabeledColorIndicators = ( { indicators, label } ) => (
|
|
|
167
167
|
</Flex>
|
|
168
168
|
) ) }
|
|
169
169
|
</ZStack>
|
|
170
|
-
<FlexItem
|
|
171
|
-
className="block-editor-panel-color-gradient-settings__color-name"
|
|
172
|
-
title={ label }
|
|
173
|
-
>
|
|
170
|
+
<FlexItem className="block-editor-panel-color-gradient-settings__color-name">
|
|
174
171
|
{ label }
|
|
175
172
|
</FlexItem>
|
|
176
173
|
</HStack>
|
|
@@ -231,11 +228,6 @@ function ColorPanelDropdown( {
|
|
|
231
228
|
{ 'is-open': isOpen }
|
|
232
229
|
),
|
|
233
230
|
'aria-expanded': isOpen,
|
|
234
|
-
'aria-label': sprintf(
|
|
235
|
-
/* translators: %s is the type of color property, e.g., "background" */
|
|
236
|
-
__( 'Color %s styles' ),
|
|
237
|
-
label
|
|
238
|
-
),
|
|
239
231
|
};
|
|
240
232
|
|
|
241
233
|
return (
|
|
@@ -147,24 +147,30 @@ function splitStyleValue( value ) {
|
|
|
147
147
|
return value;
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
-
function splitGapValue( value ) {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
// If the value is a string, treat it as a single side (top) for the spacing controls.
|
|
154
|
-
return {
|
|
155
|
-
top: value,
|
|
156
|
-
};
|
|
150
|
+
function splitGapValue( value, isAxialGap ) {
|
|
151
|
+
if ( ! value ) {
|
|
152
|
+
return value;
|
|
157
153
|
}
|
|
158
154
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
155
|
+
// Check for shorthand value (a string value).
|
|
156
|
+
if ( typeof value === 'string' ) {
|
|
157
|
+
/*
|
|
158
|
+
* Map the string value to appropriate sides for the spacing control depending
|
|
159
|
+
* on whether the current block has axial gap support or not.
|
|
160
|
+
*
|
|
161
|
+
* Note: The axial value pairs must match for the spacing control to display
|
|
162
|
+
* the appropriate horizontal/vertical sliders.
|
|
163
|
+
*/
|
|
164
|
+
return isAxialGap
|
|
165
|
+
? { top: value, right: value, bottom: value, left: value }
|
|
166
|
+
: { top: value };
|
|
165
167
|
}
|
|
166
168
|
|
|
167
|
-
return
|
|
169
|
+
return {
|
|
170
|
+
...value,
|
|
171
|
+
right: value?.left,
|
|
172
|
+
bottom: value?.top,
|
|
173
|
+
};
|
|
168
174
|
}
|
|
169
175
|
|
|
170
176
|
function DimensionsToolsPanel( {
|
|
@@ -325,13 +331,13 @@ export default function DimensionsPanel( {
|
|
|
325
331
|
|
|
326
332
|
// Block Gap
|
|
327
333
|
const showGapControl = useHasGap( settings );
|
|
328
|
-
const gapValue = decodeValue( inheritedValue?.spacing?.blockGap );
|
|
329
|
-
const gapValues = splitGapValue( gapValue );
|
|
330
334
|
const gapSides = Array.isArray( settings?.spacing?.blockGap )
|
|
331
335
|
? settings?.spacing?.blockGap
|
|
332
336
|
: settings?.spacing?.blockGap?.sides;
|
|
333
337
|
const isAxialGap =
|
|
334
338
|
gapSides && gapSides.some( ( side ) => AXIAL_SIDES.includes( side ) );
|
|
339
|
+
const gapValue = decodeValue( inheritedValue?.spacing?.blockGap );
|
|
340
|
+
const gapValues = splitGapValue( gapValue, isAxialGap );
|
|
335
341
|
const setGapValue = ( newGapValue ) => {
|
|
336
342
|
onChange(
|
|
337
343
|
setImmutably( value, [ 'spacing', 'blockGap' ], newGapValue )
|
|
@@ -410,6 +410,9 @@ export function getColorsAndGradients(
|
|
|
410
410
|
return {
|
|
411
411
|
__experimentalGlobalStylesBaseStyles: null,
|
|
412
412
|
__experimentalFeatures: {
|
|
413
|
+
// Set an empty object to avoid errors from shared web components relying
|
|
414
|
+
// upon block settings. E.g., the Gallery block.
|
|
415
|
+
blocks: {},
|
|
413
416
|
color: {
|
|
414
417
|
...( ! features?.color
|
|
415
418
|
? {
|
|
@@ -455,6 +458,9 @@ export function getGlobalStyles( rawStyles, rawFeatures ) {
|
|
|
455
458
|
|
|
456
459
|
return {
|
|
457
460
|
__experimentalFeatures: {
|
|
461
|
+
// Set an empty object to avoid errors from shared web components relying
|
|
462
|
+
// upon block settings. E.g., the Gallery block.
|
|
463
|
+
blocks: {},
|
|
458
464
|
color: {
|
|
459
465
|
palette: colors?.palette,
|
|
460
466
|
gradients,
|
|
@@ -1,24 +1,19 @@
|
|
|
1
1
|
.block-editor-iframe__body {
|
|
2
2
|
position: relative;
|
|
3
|
-
border: 0.01px solid transparent;
|
|
4
3
|
}
|
|
5
4
|
|
|
6
5
|
.block-editor-iframe__html {
|
|
7
6
|
transform-origin: top center;
|
|
8
|
-
// 400ms should match the animation speed used in iframe/index.js
|
|
9
|
-
$zoomOutAnimation: all 400ms cubic-bezier(0.46, 0.03, 0.52, 0.96);
|
|
10
|
-
|
|
11
7
|
// We don't want to animate the transform of the translateX because it is used
|
|
12
8
|
// to "center" the canvas. Leaving it on causes the canvas to slide around in
|
|
13
9
|
// odd ways.
|
|
14
|
-
|
|
15
|
-
@include reduce-motion("transition");
|
|
10
|
+
@include editor-canvas-resize-animation(transform 0s, scale 0s, padding 0s);
|
|
16
11
|
|
|
17
12
|
&.zoom-out-animation {
|
|
18
13
|
// we only want to animate the scaling when entering zoom out. When sidebars
|
|
19
14
|
// are toggled, the resizing of the iframe handles scaling the canvas as well,
|
|
20
15
|
// and the doubled animations cause very odd animations.
|
|
21
|
-
|
|
16
|
+
@include editor-canvas-resize-animation(transform 0s);
|
|
22
17
|
}
|
|
23
18
|
}
|
|
24
19
|
|
|
@@ -27,10 +22,10 @@
|
|
|
27
22
|
$frame-size: var(--wp-block-editor-iframe-zoom-out-frame-size);
|
|
28
23
|
$inner-height: var(--wp-block-editor-iframe-zoom-out-inner-height);
|
|
29
24
|
$content-height: var(--wp-block-editor-iframe-zoom-out-content-height);
|
|
30
|
-
$
|
|
25
|
+
$scale-container-width: var(--wp-block-editor-iframe-zoom-out-scale-container-width);
|
|
31
26
|
$container-width: var(--wp-block-editor-iframe-zoom-out-container-width, 100vw);
|
|
32
27
|
// Apply an X translation to center the scaled content within the available space.
|
|
33
|
-
transform: translateX(calc((
|
|
28
|
+
transform: translateX(calc((#{$scale-container-width} - #{$container-width}) / 2 / #{$scale}));
|
|
34
29
|
scale: #{$scale};
|
|
35
30
|
background-color: $gray-300;
|
|
36
31
|
|