@wordpress/block-editor 12.15.0 → 12.16.1-next.79a6196f.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 +2 -0
- package/LICENSE.md +1 -1
- package/README.md +12 -10
- package/build/components/block-canvas/index.js +21 -7
- 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-controls/hook.js +3 -23
- package/build/components/block-controls/hook.js.map +1 -1
- package/build/components/block-draggable/draggable-chip.js +6 -1
- package/build/components/block-draggable/draggable-chip.js.map +1 -1
- package/build/components/block-draggable/index.js +76 -6
- package/build/components/block-draggable/index.js.map +1 -1
- package/build/components/block-draggable/index.native.js +0 -6
- package/build/components/block-draggable/index.native.js.map +1 -1
- package/build/components/block-draggable/use-scroll-when-dragging.native.js +1 -1
- package/build/components/block-draggable/use-scroll-when-dragging.native.js.map +1 -1
- package/build/components/block-edit/context.js +5 -1
- package/build/components/block-edit/context.js.map +1 -1
- package/build/components/block-edit/index.js +18 -9
- package/build/components/block-edit/index.js.map +1 -1
- package/build/components/block-editing-mode/index.js +2 -3
- package/build/components/block-editing-mode/index.js.map +1 -1
- package/build/components/block-info-slot-fill/index.js +3 -4
- package/build/components/block-info-slot-fill/index.js.map +1 -1
- package/build/components/block-inspector/index.js +1 -1
- package/build/components/block-inspector/index.js.map +1 -1
- package/build/components/block-list/block-list-item-cell.native.js +1 -0
- package/build/components/block-list/block-list-item-cell.native.js.map +1 -1
- package/build/components/block-list/block.js +257 -95
- package/build/components/block-list/block.js.map +1 -1
- package/build/components/block-list/block.native.js +58 -23
- package/build/components/block-list/block.native.js.map +1 -1
- package/build/components/block-list/index.native.js +3 -5
- package/build/components/block-list/index.native.js.map +1 -1
- package/build/components/block-list/private-block-context.js +14 -0
- package/build/components/block-list/private-block-context.js.map +1 -0
- package/build/components/block-list/use-block-props/index.js +49 -69
- 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 -29
- 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-is-hovered.js +4 -14
- package/build/components/block-list/use-block-props/use-is-hovered.js.map +1 -1
- package/build/components/block-list/use-block-props/use-selected-block-event-handlers.js +4 -2
- 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 +3 -2
- package/build/components/block-list/use-in-between-inserter.js.map +1 -1
- package/build/components/block-list/use-scroll-upon-insertion.native.js +41 -0
- package/build/components/block-list/use-scroll-upon-insertion.native.js.map +1 -0
- package/build/components/block-lock/toolbar.js +21 -27
- package/build/components/block-lock/toolbar.js.map +1 -1
- package/build/components/block-mover/index.js +2 -1
- package/build/components/block-mover/index.js.map +1 -1
- package/build/components/block-patterns-list/index.js +5 -5
- package/build/components/block-patterns-list/index.js.map +1 -1
- package/build/components/block-removal-warning-modal/index.js +2 -9
- package/build/components/block-removal-warning-modal/index.js.map +1 -1
- package/build/components/block-rename/modal.js +3 -0
- package/build/components/block-rename/modal.js.map +1 -1
- package/build/components/block-settings/container.native.js +6 -4
- package/build/components/block-settings/container.native.js.map +1 -1
- package/build/components/block-styles/index.js +1 -1
- package/build/components/block-styles/index.js.map +1 -1
- package/build/components/block-styles/index.native.js +3 -2
- package/build/components/block-styles/index.native.js.map +1 -1
- package/build/components/block-switcher/index.js +4 -4
- package/build/components/block-switcher/index.js.map +1 -1
- package/build/components/block-toolbar/index.js +90 -29
- package/build/components/block-toolbar/index.js.map +1 -1
- package/build/components/block-tools/block-toolbar-breadcrumb.js +49 -0
- package/build/components/block-tools/block-toolbar-breadcrumb.js.map +1 -0
- package/build/components/block-tools/block-toolbar-popover.js +84 -0
- package/build/components/block-tools/block-toolbar-popover.js.map +1 -0
- package/build/components/block-tools/index.js +27 -24
- package/build/components/block-tools/index.js.map +1 -1
- package/build/components/block-types-list/index.native.js +4 -3
- package/build/components/block-types-list/index.native.js.map +1 -1
- package/build/components/block-variation-picker/index.native.js +2 -1
- package/build/components/block-variation-picker/index.native.js.map +1 -1
- package/build/components/block-variation-transforms/index.js +29 -2
- package/build/components/block-variation-transforms/index.js.map +1 -1
- package/build/components/border-radius-control/linked-button.js +1 -1
- package/build/components/border-radius-control/linked-button.js.map +1 -1
- package/build/components/colors/utils.js +10 -2
- package/build/components/colors/utils.js.map +1 -1
- package/build/components/colors/with-colors.js +6 -2
- package/build/components/colors/with-colors.js.map +1 -1
- package/build/components/colors-gradients/control.js +28 -17
- package/build/components/colors-gradients/control.js.map +1 -1
- package/build/components/duotone-control/index.js +1 -4
- package/build/components/duotone-control/index.js.map +1 -1
- package/build/components/font-sizes/utils.js +10 -2
- package/build/components/font-sizes/utils.js.map +1 -1
- package/build/components/global-styles/border-panel.js +2 -1
- package/build/components/global-styles/border-panel.js.map +1 -1
- package/build/components/global-styles/color-panel.js +24 -21
- package/build/components/global-styles/color-panel.js.map +1 -1
- package/build/components/global-styles/dimensions-panel.js +4 -3
- package/build/components/global-styles/dimensions-panel.js.map +1 -1
- package/build/components/global-styles/effects-panel.js +2 -1
- package/build/components/global-styles/effects-panel.js.map +1 -1
- package/build/components/global-styles/filters-panel.js +6 -3
- package/build/components/global-styles/filters-panel.js.map +1 -1
- package/build/components/global-styles/get-global-styles-changes.js +192 -0
- package/build/components/global-styles/get-global-styles-changes.js.map +1 -0
- package/build/components/global-styles/hooks.js +3 -2
- package/build/components/global-styles/hooks.js.map +1 -1
- package/build/components/global-styles/image-settings-panel.js +7 -1
- package/build/components/global-styles/image-settings-panel.js.map +1 -1
- package/build/components/global-styles/index.js +7 -0
- package/build/components/global-styles/index.js.map +1 -1
- package/build/components/global-styles/typography-panel.js +43 -36
- package/build/components/global-styles/typography-panel.js.map +1 -1
- package/build/components/global-styles/use-global-styles-output.js +22 -8
- package/build/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build/components/global-styles/utils.js +8 -1
- package/build/components/global-styles/utils.js.map +1 -1
- package/build/components/height-control/index.js +6 -2
- package/build/components/height-control/index.js.map +1 -1
- package/build/components/image-link-destinations/index.native.js +118 -0
- package/build/components/image-link-destinations/index.native.js.map +1 -0
- package/build/components/image-size-control/index.js +2 -2
- package/build/components/image-size-control/index.js.map +1 -1
- package/build/components/index.native.js +14 -5
- package/build/components/index.native.js.map +1 -1
- package/build/components/inner-blocks/index.js +61 -22
- package/build/components/inner-blocks/index.js.map +1 -1
- package/build/components/inner-blocks/index.native.js +18 -4
- package/build/components/inner-blocks/index.native.js.map +1 -1
- package/build/components/inner-blocks/use-inner-block-template-sync.js +5 -6
- package/build/components/inner-blocks/use-inner-block-template-sync.js.map +1 -1
- package/build/components/inner-blocks/use-nested-settings-update.js +5 -9
- package/build/components/inner-blocks/use-nested-settings-update.js.map +1 -1
- package/build/components/inserter/block-patterns-explorer/pattern-list.js +1 -1
- package/build/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/pattern-category-previews.js +10 -9
- package/build/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/patterns-filter.js +10 -10
- package/build/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/use-pattern-categories.js +9 -9
- package/build/components/inserter/block-patterns-tab/use-pattern-categories.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/utils.js +10 -14
- package/build/components/inserter/block-patterns-tab/utils.js.map +1 -1
- package/build/components/inserter/hooks/use-block-types-state.js +4 -14
- package/build/components/inserter/hooks/use-block-types-state.js.map +1 -1
- package/build/components/inserter/hooks/use-patterns-state.js +1 -1
- package/build/components/inserter/hooks/use-patterns-state.js.map +1 -1
- package/build/components/inserter/index.js +1 -2
- package/build/components/inserter/index.js.map +1 -1
- package/build/components/inserter/library.js +3 -7
- package/build/components/inserter/library.js.map +1 -1
- package/build/components/inserter/media-tab/media-panel.js +2 -2
- package/build/components/inserter/media-tab/media-panel.js.map +1 -1
- package/build/components/inserter/menu.js +26 -33
- package/build/components/inserter/menu.js.map +1 -1
- package/build/components/inserter/preview-panel.js +2 -2
- package/build/components/inserter/preview-panel.js.map +1 -1
- package/build/components/inserter/tabs.js +21 -21
- package/build/components/inserter/tabs.js.map +1 -1
- package/build/components/inserter-button/index.native.js +98 -0
- package/build/components/inserter-button/index.native.js.map +1 -0
- package/build/components/inserter-button/sparkles.js +23 -0
- package/build/components/inserter-button/sparkles.js.map +1 -0
- package/build/components/inserter-draggable-blocks/index.js +8 -4
- package/build/components/inserter-draggable-blocks/index.js.map +1 -1
- package/build/components/inserter-list-item/index.js +2 -4
- package/build/components/inserter-list-item/index.js.map +1 -1
- package/build/components/inspector-controls/block-support-tools-panel.js +3 -1
- package/build/components/inspector-controls/block-support-tools-panel.js.map +1 -1
- package/build/components/inspector-controls/fill.js +3 -3
- package/build/components/inspector-controls/fill.js.map +1 -1
- package/build/components/inspector-controls/fill.native.js +3 -3
- package/build/components/inspector-controls/fill.native.js.map +1 -1
- package/build/components/inspector-controls-tabs/index.js +34 -23
- package/build/components/inspector-controls-tabs/index.js.map +1 -1
- package/build/components/list-view/block-select-button.js +4 -0
- package/build/components/list-view/block-select-button.js.map +1 -1
- package/build/components/list-view/block.js +57 -3
- package/build/components/list-view/block.js.map +1 -1
- package/build/components/media-upload-progress/constants.js +19 -0
- package/build/components/media-upload-progress/constants.js.map +1 -0
- package/build/components/media-upload-progress/index.native.js +42 -17
- package/build/components/media-upload-progress/index.native.js.map +1 -1
- package/build/components/navigable-toolbar/index.js +11 -16
- package/build/components/navigable-toolbar/index.js.map +1 -1
- package/build/components/plain-text/index.native.js +8 -3
- package/build/components/plain-text/index.native.js.map +1 -1
- package/build/components/preview-options/index.js +6 -62
- package/build/components/preview-options/index.js.map +1 -1
- package/build/components/provider/index.js +3 -1
- package/build/components/provider/index.js.map +1 -1
- package/build/components/provider/use-block-sync.js +7 -1
- package/build/components/provider/use-block-sync.js.map +1 -1
- package/build/components/rich-text/content.js +26 -23
- package/build/components/rich-text/content.js.map +1 -1
- package/build/components/rich-text/get-rich-text-values.js +2 -1
- package/build/components/rich-text/get-rich-text-values.js.map +1 -1
- package/build/components/rich-text/index.js +19 -37
- package/build/components/rich-text/index.js.map +1 -1
- package/build/components/rich-text/index.native.js +9 -16
- package/build/components/rich-text/index.native.js.map +1 -1
- package/build/components/rich-text/native/get-format-colors.native.js +22 -24
- package/build/components/rich-text/native/get-format-colors.native.js.map +1 -1
- package/build/components/rich-text/native/index.native.js +22 -57
- package/build/components/rich-text/native/index.native.js.map +1 -1
- package/build/components/rich-text/use-input-rules.js +7 -3
- package/build/components/rich-text/use-input-rules.js.map +1 -1
- package/build/components/rich-text/use-mark-persistent.js +1 -1
- package/build/components/rich-text/use-mark-persistent.js.map +1 -1
- package/build/components/rich-text/with-deprecations.js +50 -0
- package/build/components/rich-text/with-deprecations.js.map +1 -0
- package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js +1 -1
- package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
- package/build/components/url-input/index.js +9 -6
- package/build/components/url-input/index.js.map +1 -1
- package/build/components/use-block-commands/index.js +14 -18
- package/build/components/use-block-commands/index.js.map +1 -1
- package/build/components/use-block-drop-zone/index.js +108 -17
- package/build/components/use-block-drop-zone/index.js.map +1 -1
- package/build/components/use-moving-animation/index.js +100 -92
- package/build/components/use-moving-animation/index.js.map +1 -1
- package/build/components/use-on-block-drop/index.js +9 -12
- package/build/components/use-on-block-drop/index.js.map +1 -1
- package/build/components/use-resize-canvas/index.js +4 -1
- package/build/components/use-resize-canvas/index.js.map +1 -1
- package/build/components/use-settings/index.js +14 -0
- package/build/components/use-settings/index.js.map +1 -1
- package/build/components/writing-flow/index.js +0 -1
- package/build/components/writing-flow/index.js.map +1 -1
- package/build/components/writing-flow/use-drag-selection.js +15 -4
- package/build/components/writing-flow/use-drag-selection.js.map +1 -1
- package/build/components/writing-flow/use-selection-observer.js +73 -27
- package/build/components/writing-flow/use-selection-observer.js.map +1 -1
- package/build/components/writing-flow/use-tab-nav.js +7 -4
- package/build/components/writing-flow/use-tab-nav.js.map +1 -1
- package/build/hooks/align.js +21 -69
- package/build/hooks/align.js.map +1 -1
- package/build/hooks/align.native.js +11 -1
- package/build/hooks/align.native.js.map +1 -1
- package/build/hooks/anchor.js +14 -30
- package/build/hooks/anchor.js.map +1 -1
- package/build/hooks/aria-label.js +9 -1
- package/build/hooks/aria-label.js.map +1 -1
- package/build/hooks/background.js +198 -36
- package/build/hooks/background.js.map +1 -1
- package/build/hooks/block-hooks.js +24 -32
- package/build/hooks/block-hooks.js.map +1 -1
- package/build/hooks/block-renaming.js +18 -22
- package/build/hooks/block-renaming.js.map +1 -1
- package/build/hooks/border.js +53 -80
- package/build/hooks/border.js.map +1 -1
- package/build/hooks/color.js +79 -90
- package/build/hooks/color.js.map +1 -1
- package/build/hooks/content-lock-ui.js +29 -29
- package/build/hooks/content-lock-ui.js.map +1 -1
- package/build/hooks/custom-class-name.js +13 -30
- package/build/hooks/custom-class-name.js.map +1 -1
- package/build/hooks/custom-class-name.native.js +9 -1
- package/build/hooks/custom-class-name.native.js.map +1 -1
- package/build/hooks/dimensions.js +13 -14
- package/build/hooks/dimensions.js.map +1 -1
- package/build/hooks/duotone.js +31 -61
- package/build/hooks/duotone.js.map +1 -1
- package/build/hooks/font-family.js +23 -28
- package/build/hooks/font-family.js.map +1 -1
- package/build/hooks/font-size.js +52 -120
- package/build/hooks/font-size.js.map +1 -1
- package/build/hooks/index.js +27 -16
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/index.native.js +15 -6
- package/build/hooks/index.native.js.map +1 -1
- package/build/hooks/layout-child.js +68 -0
- package/build/hooks/layout-child.js.map +1 -0
- package/build/hooks/layout.js +25 -104
- package/build/hooks/layout.js.map +1 -1
- package/build/hooks/padding.js +2 -2
- package/build/hooks/padding.js.map +1 -1
- package/build/hooks/position.js +40 -62
- package/build/hooks/position.js.map +1 -1
- package/build/hooks/style.js +52 -89
- package/build/hooks/style.js.map +1 -1
- package/build/hooks/typography.js +25 -10
- package/build/hooks/typography.js.map +1 -1
- package/build/hooks/typography.native.js +43 -18
- package/build/hooks/typography.native.js.map +1 -1
- package/build/hooks/use-typography-props.js +10 -2
- package/build/hooks/use-typography-props.js.map +1 -1
- package/build/hooks/utils.js +200 -10
- package/build/hooks/utils.js.map +1 -1
- package/build/private-apis.js +2 -6
- package/build/private-apis.js.map +1 -1
- package/build/private-apis.native.js +0 -2
- package/build/private-apis.native.js.map +1 -1
- package/build/store/actions.js +0 -16
- package/build/store/actions.js.map +1 -1
- package/build/store/private-actions.js +54 -0
- package/build/store/private-actions.js.map +1 -1
- package/build/store/private-selectors.js +46 -0
- package/build/store/private-selectors.js.map +1 -1
- package/build/store/reducer.js +18 -2
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +11 -73
- package/build/store/selectors.js.map +1 -1
- package/build/store/undo-ignore.js +12 -0
- package/build/store/undo-ignore.js.map +1 -0
- package/build/store/utils.js +66 -0
- package/build/store/utils.js.map +1 -0
- package/build/utils/get-px-from-css-unit.js +16 -0
- package/build/utils/get-px-from-css-unit.js.map +1 -0
- package/build/utils/index.js +2 -2
- package/build/utils/index.js.map +1 -1
- package/build/utils/object.js +38 -99
- package/build/utils/object.js.map +1 -1
- package/build/utils/selection.js +9 -1
- package/build/utils/selection.js.map +1 -1
- package/build/utils/use-can-block-toolbar-be-focused.js +46 -0
- package/build/utils/use-can-block-toolbar-be-focused.js.map +1 -0
- package/build-module/components/block-canvas/index.js +22 -8
- package/build-module/components/block-canvas/index.js.map +1 -1
- package/build-module/components/block-card/index.js +2 -2
- package/build-module/components/block-card/index.js.map +1 -1
- package/build-module/components/block-controls/hook.js +4 -24
- package/build-module/components/block-controls/hook.js.map +1 -1
- package/build-module/components/block-draggable/draggable-chip.js +6 -1
- package/build-module/components/block-draggable/draggable-chip.js.map +1 -1
- package/build-module/components/block-draggable/index.js +76 -6
- package/build-module/components/block-draggable/index.js.map +1 -1
- package/build-module/components/block-draggable/index.native.js +1 -7
- package/build-module/components/block-draggable/index.native.js.map +1 -1
- package/build-module/components/block-draggable/use-scroll-when-dragging.native.js +1 -1
- package/build-module/components/block-draggable/use-scroll-when-dragging.native.js.map +1 -1
- package/build-module/components/block-edit/context.js +2 -0
- package/build-module/components/block-edit/context.js.map +1 -1
- package/build-module/components/block-edit/index.js +19 -10
- package/build-module/components/block-edit/index.js.map +1 -1
- package/build-module/components/block-editing-mode/index.js +3 -4
- package/build-module/components/block-editing-mode/index.js.map +1 -1
- package/build-module/components/block-info-slot-fill/index.js +3 -3
- package/build-module/components/block-info-slot-fill/index.js.map +1 -1
- package/build-module/components/block-inspector/index.js +1 -1
- package/build-module/components/block-inspector/index.js.map +1 -1
- package/build-module/components/block-list/block-list-item-cell.native.js +1 -0
- package/build-module/components/block-list/block-list-item-cell.native.js.map +1 -1
- package/build-module/components/block-list/block.js +261 -99
- package/build-module/components/block-list/block.js.map +1 -1
- package/build-module/components/block-list/block.native.js +60 -25
- package/build-module/components/block-list/block.native.js.map +1 -1
- package/build-module/components/block-list/index.native.js +3 -5
- package/build-module/components/block-list/index.native.js.map +1 -1
- package/build-module/components/block-list/private-block-context.js +6 -0
- package/build-module/components/block-list/private-block-context.js.map +1 -0
- package/build-module/components/block-list/use-block-props/index.js +50 -70
- 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 -29
- 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-is-hovered.js +4 -14
- package/build-module/components/block-list/use-block-props/use-is-hovered.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.js +4 -2
- 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 +3 -2
- package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
- package/build-module/components/block-list/use-scroll-upon-insertion.native.js +33 -0
- package/build-module/components/block-list/use-scroll-upon-insertion.native.js.map +1 -0
- package/build-module/components/block-lock/toolbar.js +22 -28
- package/build-module/components/block-lock/toolbar.js.map +1 -1
- package/build-module/components/block-mover/index.js +2 -1
- package/build-module/components/block-mover/index.js.map +1 -1
- package/build-module/components/block-patterns-list/index.js +6 -6
- package/build-module/components/block-patterns-list/index.js.map +1 -1
- package/build-module/components/block-removal-warning-modal/index.js +3 -10
- package/build-module/components/block-removal-warning-modal/index.js.map +1 -1
- package/build-module/components/block-rename/modal.js +3 -0
- package/build-module/components/block-rename/modal.js.map +1 -1
- package/build-module/components/block-settings/container.native.js +4 -2
- package/build-module/components/block-settings/container.native.js.map +1 -1
- package/build-module/components/block-styles/index.js +1 -1
- package/build-module/components/block-styles/index.js.map +1 -1
- package/build-module/components/block-styles/index.native.js +3 -2
- package/build-module/components/block-styles/index.native.js.map +1 -1
- package/build-module/components/block-switcher/index.js +4 -4
- package/build-module/components/block-switcher/index.js.map +1 -1
- package/build-module/components/block-toolbar/index.js +89 -27
- package/build-module/components/block-toolbar/index.js.map +1 -1
- package/build-module/components/block-tools/block-toolbar-breadcrumb.js +41 -0
- package/build-module/components/block-tools/block-toolbar-breadcrumb.js.map +1 -0
- package/build-module/components/block-tools/block-toolbar-popover.js +74 -0
- package/build-module/components/block-tools/block-toolbar-popover.js.map +1 -0
- package/build-module/components/block-tools/index.js +27 -24
- package/build-module/components/block-tools/index.js.map +1 -1
- package/build-module/components/block-types-list/index.native.js +2 -1
- package/build-module/components/block-types-list/index.native.js.map +1 -1
- package/build-module/components/block-variation-picker/index.native.js +2 -1
- package/build-module/components/block-variation-picker/index.native.js.map +1 -1
- package/build-module/components/block-variation-transforms/index.js +30 -3
- package/build-module/components/block-variation-transforms/index.js.map +1 -1
- package/build-module/components/border-radius-control/linked-button.js +1 -1
- package/build-module/components/border-radius-control/linked-button.js.map +1 -1
- package/build-module/components/colors/utils.js +9 -1
- package/build-module/components/colors/utils.js.map +1 -1
- package/build-module/components/colors/with-colors.js +5 -1
- package/build-module/components/colors/with-colors.js.map +1 -1
- package/build-module/components/colors-gradients/control.js +29 -18
- package/build-module/components/colors-gradients/control.js.map +1 -1
- package/build-module/components/duotone-control/index.js +1 -4
- package/build-module/components/duotone-control/index.js.map +1 -1
- package/build-module/components/font-sizes/utils.js +9 -1
- package/build-module/components/font-sizes/utils.js.map +1 -1
- package/build-module/components/global-styles/border-panel.js +3 -2
- package/build-module/components/global-styles/border-panel.js.map +1 -1
- package/build-module/components/global-styles/color-panel.js +26 -23
- package/build-module/components/global-styles/color-panel.js.map +1 -1
- package/build-module/components/global-styles/dimensions-panel.js +5 -4
- package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
- package/build-module/components/global-styles/effects-panel.js +3 -2
- package/build-module/components/global-styles/effects-panel.js.map +1 -1
- package/build-module/components/global-styles/filters-panel.js +8 -5
- package/build-module/components/global-styles/filters-panel.js.map +1 -1
- package/build-module/components/global-styles/get-global-styles-changes.js +184 -0
- package/build-module/components/global-styles/get-global-styles-changes.js.map +1 -0
- package/build-module/components/global-styles/hooks.js +3 -2
- package/build-module/components/global-styles/hooks.js.map +1 -1
- package/build-module/components/global-styles/image-settings-panel.js +7 -1
- package/build-module/components/global-styles/image-settings-panel.js.map +1 -1
- package/build-module/components/global-styles/index.js +1 -0
- package/build-module/components/global-styles/index.js.map +1 -1
- package/build-module/components/global-styles/typography-panel.js +45 -38
- package/build-module/components/global-styles/typography-panel.js.map +1 -1
- package/build-module/components/global-styles/use-global-styles-output.js +15 -1
- package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build-module/components/global-styles/utils.js +7 -0
- package/build-module/components/global-styles/utils.js.map +1 -1
- package/build-module/components/height-control/index.js +6 -2
- package/build-module/components/height-control/index.js.map +1 -1
- package/build-module/components/image-link-destinations/index.native.js +109 -0
- package/build-module/components/image-link-destinations/index.native.js.map +1 -0
- package/build-module/components/image-size-control/index.js +2 -2
- package/build-module/components/image-size-control/index.js.map +1 -1
- package/build-module/components/index.native.js +3 -1
- package/build-module/components/index.native.js.map +1 -1
- package/build-module/components/inner-blocks/index.js +62 -23
- package/build-module/components/inner-blocks/index.js.map +1 -1
- package/build-module/components/inner-blocks/index.native.js +18 -4
- package/build-module/components/inner-blocks/index.native.js.map +1 -1
- package/build-module/components/inner-blocks/use-inner-block-template-sync.js +5 -6
- package/build-module/components/inner-blocks/use-inner-block-template-sync.js.map +1 -1
- package/build-module/components/inner-blocks/use-nested-settings-update.js +6 -10
- package/build-module/components/inner-blocks/use-nested-settings-update.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/pattern-category-previews.js +11 -10
- 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 +11 -11
- 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 +11 -11
- 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 +7 -11
- package/build-module/components/inserter/block-patterns-tab/utils.js.map +1 -1
- package/build-module/components/inserter/hooks/use-block-types-state.js +4 -14
- package/build-module/components/inserter/hooks/use-block-types-state.js.map +1 -1
- package/build-module/components/inserter/hooks/use-patterns-state.js +2 -2
- package/build-module/components/inserter/hooks/use-patterns-state.js.map +1 -1
- package/build-module/components/inserter/index.js +1 -2
- package/build-module/components/inserter/index.js.map +1 -1
- package/build-module/components/inserter/library.js +3 -7
- package/build-module/components/inserter/library.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-panel.js +1 -1
- package/build-module/components/inserter/media-tab/media-panel.js.map +1 -1
- package/build-module/components/inserter/menu.js +26 -33
- package/build-module/components/inserter/menu.js.map +1 -1
- package/build-module/components/inserter/preview-panel.js +2 -2
- package/build-module/components/inserter/preview-panel.js.map +1 -1
- package/build-module/components/inserter/tabs.js +22 -22
- package/build-module/components/inserter/tabs.js.map +1 -1
- package/build-module/components/inserter-button/index.native.js +89 -0
- package/build-module/components/inserter-button/index.native.js.map +1 -0
- package/build-module/components/inserter-button/sparkles.js +15 -0
- package/build-module/components/inserter-button/sparkles.js.map +1 -0
- package/build-module/components/inserter-draggable-blocks/index.js +9 -5
- package/build-module/components/inserter-draggable-blocks/index.js.map +1 -1
- package/build-module/components/inserter-list-item/index.js +2 -4
- package/build-module/components/inserter-list-item/index.js.map +1 -1
- package/build-module/components/inspector-controls/block-support-tools-panel.js +3 -1
- package/build-module/components/inspector-controls/block-support-tools-panel.js.map +1 -1
- package/build-module/components/inspector-controls/fill.js +3 -3
- package/build-module/components/inspector-controls/fill.js.map +1 -1
- package/build-module/components/inspector-controls/fill.native.js +3 -3
- package/build-module/components/inspector-controls/fill.native.js.map +1 -1
- package/build-module/components/inspector-controls-tabs/index.js +35 -24
- package/build-module/components/inspector-controls-tabs/index.js.map +1 -1
- package/build-module/components/list-view/block-select-button.js +4 -0
- package/build-module/components/list-view/block-select-button.js.map +1 -1
- package/build-module/components/list-view/block.js +58 -4
- package/build-module/components/list-view/block.js.map +1 -1
- package/build-module/components/media-upload-progress/constants.js +7 -0
- package/build-module/components/media-upload-progress/constants.js.map +1 -0
- package/build-module/components/media-upload-progress/index.native.js +37 -8
- package/build-module/components/media-upload-progress/index.native.js.map +1 -1
- package/build-module/components/navigable-toolbar/index.js +11 -16
- package/build-module/components/navigable-toolbar/index.js.map +1 -1
- package/build-module/components/plain-text/index.native.js +6 -1
- package/build-module/components/plain-text/index.native.js.map +1 -1
- package/build-module/components/preview-options/index.js +6 -62
- package/build-module/components/preview-options/index.js.map +1 -1
- package/build-module/components/provider/index.js +3 -1
- package/build-module/components/provider/index.js.map +1 -1
- package/build-module/components/provider/use-block-sync.js +7 -1
- package/build-module/components/provider/use-block-sync.js.map +1 -1
- package/build-module/components/rich-text/content.js +25 -21
- package/build-module/components/rich-text/content.js.map +1 -1
- package/build-module/components/rich-text/get-rich-text-values.js +2 -1
- package/build-module/components/rich-text/get-rich-text-values.js.map +1 -1
- package/build-module/components/rich-text/index.js +21 -39
- package/build-module/components/rich-text/index.js.map +1 -1
- package/build-module/components/rich-text/index.native.js +10 -18
- package/build-module/components/rich-text/index.native.js.map +1 -1
- package/build-module/components/rich-text/native/get-format-colors.native.js +22 -24
- package/build-module/components/rich-text/native/get-format-colors.native.js.map +1 -1
- package/build-module/components/rich-text/native/index.native.js +22 -56
- package/build-module/components/rich-text/native/index.native.js.map +1 -1
- package/build-module/components/rich-text/use-input-rules.js +7 -3
- package/build-module/components/rich-text/use-input-rules.js.map +1 -1
- package/build-module/components/rich-text/use-mark-persistent.js +1 -1
- package/build-module/components/rich-text/use-mark-persistent.js.map +1 -1
- package/build-module/components/rich-text/with-deprecations.js +42 -0
- package/build-module/components/rich-text/with-deprecations.js.map +1 -0
- package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js +1 -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 +9 -6
- package/build-module/components/url-input/index.js.map +1 -1
- package/build-module/components/use-block-commands/index.js +14 -18
- package/build-module/components/use-block-commands/index.js.map +1 -1
- package/build-module/components/use-block-drop-zone/index.js +107 -18
- package/build-module/components/use-block-drop-zone/index.js.map +1 -1
- package/build-module/components/use-moving-animation/index.js +102 -94
- package/build-module/components/use-moving-animation/index.js.map +1 -1
- package/build-module/components/use-on-block-drop/index.js +9 -12
- package/build-module/components/use-on-block-drop/index.js.map +1 -1
- package/build-module/components/use-resize-canvas/index.js +4 -1
- package/build-module/components/use-resize-canvas/index.js.map +1 -1
- package/build-module/components/use-settings/index.js +13 -1
- package/build-module/components/use-settings/index.js.map +1 -1
- package/build-module/components/writing-flow/index.js +0 -1
- package/build-module/components/writing-flow/index.js.map +1 -1
- package/build-module/components/writing-flow/use-drag-selection.js +15 -4
- package/build-module/components/writing-flow/use-drag-selection.js.map +1 -1
- package/build-module/components/writing-flow/use-selection-observer.js +73 -27
- package/build-module/components/writing-flow/use-selection-observer.js.map +1 -1
- package/build-module/components/writing-flow/use-tab-nav.js +7 -4
- package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
- package/build-module/hooks/align.js +20 -67
- package/build-module/hooks/align.js.map +1 -1
- package/build-module/hooks/align.native.js +1 -0
- package/build-module/hooks/align.native.js.map +1 -1
- package/build-module/hooks/anchor.js +12 -27
- package/build-module/hooks/anchor.js.map +1 -1
- package/build-module/hooks/aria-label.js +7 -1
- package/build-module/hooks/aria-label.js.map +1 -1
- package/build-module/hooks/background.js +197 -37
- package/build-module/hooks/background.js.map +1 -1
- package/build-module/hooks/block-hooks.js +22 -30
- package/build-module/hooks/block-hooks.js.map +1 -1
- package/build-module/hooks/block-renaming.js +17 -21
- package/build-module/hooks/block-renaming.js.map +1 -1
- package/build-module/hooks/border.js +52 -79
- package/build-module/hooks/border.js.map +1 -1
- package/build-module/hooks/color.js +78 -88
- package/build-module/hooks/color.js.map +1 -1
- package/build-module/hooks/content-lock-ui.js +27 -27
- package/build-module/hooks/content-lock-ui.js.map +1 -1
- package/build-module/hooks/custom-class-name.js +12 -28
- package/build-module/hooks/custom-class-name.js.map +1 -1
- package/build-module/hooks/custom-class-name.native.js +7 -1
- package/build-module/hooks/custom-class-name.native.js.map +1 -1
- package/build-module/hooks/dimensions.js +15 -16
- package/build-module/hooks/dimensions.js.map +1 -1
- package/build-module/hooks/duotone.js +30 -61
- package/build-module/hooks/duotone.js.map +1 -1
- package/build-module/hooks/font-family.js +20 -25
- package/build-module/hooks/font-family.js.map +1 -1
- package/build-module/hooks/font-size.js +50 -120
- package/build-module/hooks/font-size.js.map +1 -1
- package/build-module/hooks/index.js +20 -16
- package/build-module/hooks/index.js.map +1 -1
- package/build-module/hooks/index.native.js +10 -6
- package/build-module/hooks/index.native.js.map +1 -1
- package/build-module/hooks/layout-child.js +60 -0
- package/build-module/hooks/layout-child.js.map +1 -0
- package/build-module/hooks/layout.js +21 -100
- package/build-module/hooks/layout.js.map +1 -1
- package/build-module/hooks/padding.js +2 -2
- package/build-module/hooks/padding.js.map +1 -1
- package/build-module/hooks/position.js +38 -59
- package/build-module/hooks/position.js.map +1 -1
- package/build-module/hooks/style.js +52 -85
- package/build-module/hooks/style.js.map +1 -1
- package/build-module/hooks/typography.js +26 -11
- package/build-module/hooks/typography.js.map +1 -1
- package/build-module/hooks/typography.native.js +43 -17
- package/build-module/hooks/typography.native.js.map +1 -1
- package/build-module/hooks/use-typography-props.js +9 -1
- package/build-module/hooks/use-typography-props.js.map +1 -1
- package/build-module/hooks/utils.js +194 -9
- package/build-module/hooks/utils.js.map +1 -1
- package/build-module/private-apis.js +2 -6
- package/build-module/private-apis.js.map +1 -1
- package/build-module/private-apis.native.js +0 -2
- package/build-module/private-apis.native.js.map +1 -1
- package/build-module/store/actions.js +0 -15
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/private-actions.js +52 -0
- package/build-module/store/private-actions.js.map +1 -1
- package/build-module/store/private-selectors.js +44 -1
- package/build-module/store/private-selectors.js.map +1 -1
- package/build-module/store/reducer.js +18 -2
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +4 -65
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/store/undo-ignore.js +5 -0
- package/build-module/store/undo-ignore.js.map +1 -0
- package/build-module/store/utils.js +56 -0
- package/build-module/store/utils.js.map +1 -0
- package/build-module/utils/get-px-from-css-unit.js +9 -0
- package/build-module/utils/get-px-from-css-unit.js.map +1 -0
- package/build-module/utils/index.js +1 -1
- package/build-module/utils/index.js.map +1 -1
- package/build-module/utils/object.js +37 -97
- package/build-module/utils/object.js.map +1 -1
- package/build-module/utils/selection.js +9 -1
- package/build-module/utils/selection.js.map +1 -1
- package/build-module/utils/use-can-block-toolbar-be-focused.js +40 -0
- package/build-module/utils/use-can-block-toolbar-be-focused.js.map +1 -0
- package/build-style/content-rtl.css +7 -6
- package/build-style/content.css +7 -6
- package/build-style/style-rtl.css +164 -301
- package/build-style/style.css +164 -301
- package/package.json +31 -31
- package/src/components/alignment-control/README.md +0 -5
- package/src/components/block-alignment-control/README.md +0 -5
- package/src/components/block-alignment-matrix-control/README.md +0 -10
- package/src/components/block-breadcrumb/README.md +0 -5
- package/src/components/block-canvas/index.js +29 -17
- package/src/components/block-canvas/style.scss +6 -0
- package/src/components/block-caption/README.md +2 -7
- package/src/components/block-card/README.md +0 -5
- package/src/components/block-card/index.js +6 -4
- package/src/components/block-card/style.scss +7 -3
- package/src/components/block-controls/hook.js +8 -30
- package/src/components/block-controls/test/index.js +3 -3
- package/src/components/block-draggable/draggable-chip.js +11 -1
- package/src/components/block-draggable/index.js +116 -4
- package/src/components/block-draggable/index.native.js +0 -5
- package/src/components/block-draggable/style.scss +35 -0
- package/src/components/block-draggable/test/helpers.native.js +8 -7
- package/src/components/block-draggable/use-scroll-when-dragging.native.js +1 -1
- package/src/components/block-edit/context.js +3 -0
- package/src/components/block-edit/index.js +36 -10
- package/src/components/block-editing-mode/index.js +3 -3
- package/src/components/block-icon/README.md +0 -5
- package/src/components/block-info-slot-fill/index.js +6 -3
- package/src/components/block-inspector/README.md +0 -5
- package/src/components/block-inspector/index.js +3 -1
- package/src/components/block-inspector/style.scss +0 -4
- package/src/components/block-list/block-list-item-cell.native.js +5 -1
- package/src/components/block-list/block.js +309 -104
- package/src/components/block-list/block.native.js +69 -21
- package/src/components/block-list/content.scss +14 -10
- package/src/components/block-list/index.native.js +3 -5
- package/src/components/block-list/{block-list-block-context.js → private-block-context.js} +1 -1
- package/src/components/block-list/use-block-props/index.js +43 -86
- package/src/components/block-list/use-block-props/use-focus-first-element.js +1 -34
- package/src/components/block-list/use-block-props/use-is-hovered.js +2 -13
- package/src/components/block-list/use-block-props/use-selected-block-event-handlers.js +1 -5
- package/src/components/block-list/use-in-between-inserter.js +4 -1
- package/src/components/block-list/use-scroll-upon-insertion.native.js +52 -0
- package/src/components/block-lock/toolbar.js +23 -34
- package/src/components/block-mover/README.md +0 -5
- package/src/components/block-mover/index.js +1 -1
- package/src/components/block-parent-selector/README.md +0 -5
- package/src/components/block-patterns-list/README.md +0 -5
- package/src/components/block-patterns-list/index.js +9 -6
- package/src/components/block-removal-warning-modal/index.js +7 -14
- package/src/components/block-rename/modal.js +7 -1
- package/src/components/block-settings/container.native.js +3 -5
- package/src/components/block-styles/index.js +1 -1
- package/src/components/block-styles/index.native.js +4 -2
- package/src/components/block-styles/style.scss +0 -11
- package/src/components/block-switcher/index.js +49 -59
- package/src/components/block-switcher/test/__snapshots__/index.js.snap +3 -1
- package/src/components/block-toolbar/README.md +0 -5
- package/src/components/block-toolbar/index.js +179 -95
- package/src/components/block-toolbar/style.scss +50 -66
- package/src/components/block-tools/block-toolbar-breadcrumb.js +46 -0
- package/src/components/block-tools/block-toolbar-popover.js +84 -0
- package/src/components/block-tools/index.js +42 -29
- package/src/components/block-tools/style.scss +60 -172
- package/src/components/block-types-list/README.md +0 -5
- package/src/components/block-types-list/index.native.js +2 -1
- package/src/components/block-variation-picker/README.md +0 -5
- package/src/components/block-variation-picker/index.native.js +1 -1
- package/src/components/block-variation-transforms/README.md +0 -5
- package/src/components/block-variation-transforms/index.js +49 -3
- package/src/components/border-radius-control/linked-button.js +1 -1
- package/src/components/caption/README.md +0 -5
- package/src/components/color-palette/test/__snapshots__/control.js.snap +0 -1
- package/src/components/colors/utils.js +8 -1
- package/src/components/colors/with-colors.js +3 -1
- package/src/components/colors-gradients/control.js +49 -30
- package/src/components/colors-gradients/style.scss +0 -7
- package/src/components/contrast-checker/README.md +0 -4
- package/src/components/copy-handler/README.md +0 -10
- package/src/components/duotone-control/index.js +2 -5
- package/src/components/duotone-control/style.scss +1 -6
- package/src/components/font-sizes/utils.js +7 -1
- package/src/components/global-styles/border-panel.js +2 -1
- package/src/components/global-styles/color-panel.js +36 -26
- package/src/components/global-styles/dimensions-panel.js +4 -3
- package/src/components/global-styles/effects-panel.js +2 -1
- package/src/components/global-styles/filters-panel.js +6 -5
- package/src/components/global-styles/get-global-styles-changes.js +210 -0
- package/src/components/global-styles/hooks.js +5 -0
- package/src/components/global-styles/image-settings-panel.js +6 -0
- package/src/components/global-styles/index.js +1 -0
- package/src/components/global-styles/test/get-global-styles-changes.js +234 -0
- package/src/components/global-styles/typography-panel.js +60 -47
- package/src/components/global-styles/use-global-styles-output.js +9 -5
- package/src/components/global-styles/utils.js +7 -0
- package/src/components/height-control/README.md +2 -7
- package/src/components/height-control/index.js +4 -0
- package/src/components/image-link-destinations/index.native.js +152 -0
- package/src/components/image-link-destinations/style.native.scss +16 -0
- package/src/components/image-size-control/index.js +5 -2
- package/src/components/index.native.js +3 -2
- package/src/components/inner-blocks/README.md +13 -2
- package/src/components/inner-blocks/index.js +68 -29
- package/src/components/inner-blocks/index.native.js +19 -7
- package/src/components/inner-blocks/use-inner-block-template-sync.js +5 -7
- package/src/components/inner-blocks/use-nested-settings-update.js +6 -13
- package/src/components/inserter/block-patterns-explorer/pattern-list.js +2 -2
- package/src/components/inserter/block-patterns-tab/pattern-category-previews.js +15 -15
- package/src/components/inserter/block-patterns-tab/patterns-filter.js +15 -13
- package/src/components/inserter/block-patterns-tab/use-pattern-categories.js +15 -18
- package/src/components/inserter/block-patterns-tab/utils.js +11 -12
- package/src/components/inserter/hooks/use-block-types-state.js +9 -11
- package/src/components/inserter/hooks/use-patterns-state.js +2 -2
- package/src/components/inserter/index.js +0 -1
- package/src/components/inserter/library.js +2 -8
- package/src/components/inserter/media-tab/media-panel.js +1 -1
- package/src/components/inserter/menu.js +26 -36
- package/src/components/inserter/preview-panel.js +2 -2
- package/src/components/inserter/style.scss +21 -21
- package/src/components/inserter/tabs.js +34 -25
- package/src/components/inserter-button/README.md +62 -0
- package/src/components/inserter-button/index.native.js +116 -0
- package/src/components/inserter-button/sparkles.js +15 -0
- package/src/components/inserter-button/style.native.scss +72 -0
- package/src/components/inserter-draggable-blocks/index.js +18 -5
- package/src/components/inserter-list-item/index.js +6 -6
- package/src/components/inspector-controls/block-support-tools-panel.js +2 -0
- package/src/components/inspector-controls/fill.js +6 -3
- package/src/components/inspector-controls/fill.native.js +6 -3
- package/src/components/inspector-controls-tabs/index.js +39 -28
- package/src/components/inspector-controls-tabs/style.scss +3 -2
- package/src/components/letter-spacing-control/README.md +0 -5
- package/src/components/line-height-control/README.md +0 -5
- package/src/components/link-control/style.scss +1 -1
- package/src/components/link-control/test/index.js +1 -1
- package/src/components/list-view/README.md +0 -5
- package/src/components/list-view/block-select-button.js +4 -0
- package/src/components/list-view/block.js +73 -2
- package/src/components/list-view/style.scss +6 -0
- package/src/components/media-upload-progress/constants.js +6 -0
- package/src/components/media-upload-progress/index.native.js +66 -14
- package/src/components/media-upload-progress/test/index.native.js +2 -2
- package/src/components/multi-selection-inspector/README.md +0 -5
- package/src/components/navigable-toolbar/README.md +2 -0
- package/src/components/navigable-toolbar/index.js +15 -13
- package/src/components/plain-text/index.native.js +6 -1
- package/src/components/preview-options/index.js +6 -86
- package/src/components/provider/index.js +1 -1
- package/src/components/provider/test/use-block-sync.js +20 -17
- package/src/components/provider/use-block-sync.js +6 -0
- package/src/components/rich-text/content.js +27 -20
- package/src/components/rich-text/get-rich-text-values.js +6 -1
- package/src/components/rich-text/index.js +23 -52
- package/src/components/rich-text/index.native.js +8 -25
- package/src/components/rich-text/native/get-format-colors.native.js +33 -40
- package/src/components/rich-text/native/index.native.js +22 -71
- package/src/components/rich-text/native/test/__snapshots__/index.native.js.snap +3 -3
- package/src/components/rich-text/native/test/index.native.js +72 -5
- package/src/components/rich-text/use-input-rules.js +8 -3
- package/src/components/rich-text/use-mark-persistent.js +1 -2
- package/src/components/rich-text/with-deprecations.js +51 -0
- package/src/components/spacing-sizes-control/input-controls/spacing-input-control.js +1 -1
- package/src/components/text-decoration-control/README.md +40 -0
- package/src/components/text-transform-control/README.md +0 -4
- package/src/components/ungroup-button/README.md +0 -5
- package/src/components/unit-control/README.md +0 -4
- package/src/components/url-input/index.js +11 -11
- package/src/components/use-block-commands/index.js +18 -21
- package/src/components/use-block-drop-zone/index.js +181 -30
- package/src/components/use-moving-animation/index.js +107 -103
- package/src/components/use-on-block-drop/index.js +9 -24
- package/src/components/use-on-block-drop/test/index.js +12 -26
- package/src/components/use-resize-canvas/README.md +3 -7
- package/src/components/use-resize-canvas/index.js +4 -1
- package/src/components/use-settings/README.md +0 -4
- package/src/components/use-settings/index.js +15 -1
- package/src/components/writing-flow/index.js +0 -1
- package/src/components/writing-flow/use-drag-selection.js +18 -4
- package/src/components/writing-flow/use-selection-observer.js +99 -37
- package/src/components/writing-flow/use-tab-nav.js +7 -7
- package/src/hooks/align.js +16 -81
- package/src/hooks/align.native.js +1 -0
- package/src/hooks/anchor.js +14 -38
- package/src/hooks/aria-label.js +8 -5
- package/src/hooks/background.js +269 -32
- package/src/hooks/block-hooks.js +22 -51
- package/src/hooks/block-renaming.js +23 -37
- package/src/hooks/border.js +62 -124
- package/src/hooks/color.js +111 -138
- package/src/hooks/content-lock-ui.js +110 -122
- package/src/hooks/custom-class-name.js +9 -45
- package/src/hooks/custom-class-name.native.js +8 -5
- package/src/hooks/dimensions.js +14 -16
- package/src/hooks/duotone.js +70 -127
- package/src/hooks/font-family.js +14 -36
- package/src/hooks/font-size.js +67 -168
- package/src/hooks/index.js +58 -16
- package/src/hooks/index.native.js +22 -6
- package/src/hooks/layout-child.js +53 -0
- package/src/hooks/layout.js +17 -103
- package/src/hooks/padding.js +2 -2
- package/src/hooks/position.js +50 -90
- package/src/hooks/style.js +118 -193
- package/src/hooks/test/align.js +1 -178
- package/src/hooks/test/anchor.js +4 -9
- package/src/hooks/test/custom-class-name.js +3 -8
- package/src/hooks/test/style.js +4 -14
- package/src/hooks/typography.js +14 -16
- package/src/hooks/typography.native.js +31 -33
- package/src/hooks/use-typography-props.js +7 -1
- package/src/hooks/utils.js +261 -10
- package/src/private-apis.js +2 -6
- package/src/private-apis.native.js +0 -2
- package/src/store/actions.js +0 -15
- package/src/store/private-actions.js +48 -0
- package/src/store/private-selectors.js +56 -0
- package/src/store/reducer.js +20 -1
- package/src/store/selectors.js +10 -82
- package/src/store/undo-ignore.js +4 -0
- package/src/store/utils.js +74 -0
- package/src/style.scss +1 -2
- package/src/utils/get-px-from-css-unit.js +8 -0
- package/src/utils/index.js +1 -1
- package/src/utils/object.js +34 -104
- package/src/utils/selection.js +9 -2
- package/src/utils/test/object.js +1 -96
- package/src/utils/use-can-block-toolbar-be-focused.js +48 -0
- package/build/components/block-list/block-list-block-context.js +0 -14
- package/build/components/block-list/block-list-block-context.js.map +0 -1
- package/build/components/block-list/use-block-props/use-block-class-names.js +0 -67
- package/build/components/block-list/use-block-props/use-block-class-names.js.map +0 -1
- package/build/components/block-list/use-block-props/use-block-custom-class-name.js +0 -46
- package/build/components/block-list/use-block-props/use-block-custom-class-name.js.map +0 -1
- package/build/components/block-list/use-block-props/use-block-default-class-name.js +0 -37
- package/build/components/block-list/use-block-props/use-block-default-class-name.js.map +0 -1
- package/build/components/block-tools/back-compat.js +0 -45
- package/build/components/block-tools/back-compat.js.map +0 -1
- package/build/components/block-tools/block-contextual-toolbar.js +0 -91
- package/build/components/block-tools/block-contextual-toolbar.js.map +0 -1
- package/build/components/block-tools/selected-block-tools.js +0 -113
- package/build/components/block-tools/selected-block-tools.js.map +0 -1
- package/build/components/inserter/hooks/use-debounced-input.js +0 -22
- package/build/components/inserter/hooks/use-debounced-input.js.map +0 -1
- package/build/components/use-display-block-controls/index.js +0 -39
- package/build/components/use-display-block-controls/index.js.map +0 -1
- package/build/components/use-display-block-controls/index.native.js +0 -39
- package/build/components/use-display-block-controls/index.native.js.map +0 -1
- package/build/hooks/custom-fields.js +0 -120
- package/build/hooks/custom-fields.js.map +0 -1
- package/build/utils/parse-css-unit-to-px.js +0 -302
- package/build/utils/parse-css-unit-to-px.js.map +0 -1
- package/build/utils/use-should-contextual-toolbar-show.js +0 -63
- package/build/utils/use-should-contextual-toolbar-show.js.map +0 -1
- package/build-module/components/block-list/block-list-block-context.js +0 -6
- package/build-module/components/block-list/block-list-block-context.js.map +0 -1
- package/build-module/components/block-list/use-block-props/use-block-class-names.js +0 -60
- package/build-module/components/block-list/use-block-props/use-block-class-names.js.map +0 -1
- package/build-module/components/block-list/use-block-props/use-block-custom-class-name.js +0 -40
- package/build-module/components/block-list/use-block-props/use-block-custom-class-name.js.map +0 -1
- package/build-module/components/block-list/use-block-props/use-block-default-class-name.js +0 -31
- package/build-module/components/block-list/use-block-props/use-block-default-class-name.js.map +0 -1
- package/build-module/components/block-tools/back-compat.js +0 -35
- package/build-module/components/block-tools/back-compat.js.map +0 -1
- package/build-module/components/block-tools/block-contextual-toolbar.js +0 -83
- package/build-module/components/block-tools/block-contextual-toolbar.js.map +0 -1
- package/build-module/components/block-tools/selected-block-tools.js +0 -105
- package/build-module/components/block-tools/selected-block-tools.js.map +0 -1
- package/build-module/components/inserter/hooks/use-debounced-input.js +0 -15
- package/build-module/components/inserter/hooks/use-debounced-input.js.map +0 -1
- package/build-module/components/use-display-block-controls/index.js +0 -32
- package/build-module/components/use-display-block-controls/index.js.map +0 -1
- package/build-module/components/use-display-block-controls/index.native.js +0 -32
- package/build-module/components/use-display-block-controls/index.native.js.map +0 -1
- package/build-module/hooks/custom-fields.js +0 -118
- package/build-module/hooks/custom-fields.js.map +0 -1
- package/build-module/utils/parse-css-unit-to-px.js +0 -294
- package/build-module/utils/parse-css-unit-to-px.js.map +0 -1
- package/build-module/utils/use-should-contextual-toolbar-show.js +0 -57
- package/build-module/utils/use-should-contextual-toolbar-show.js.map +0 -1
- package/src/components/block-list/use-block-props/use-block-class-names.js +0 -66
- package/src/components/block-list/use-block-props/use-block-custom-class-name.js +0 -44
- package/src/components/block-list/use-block-props/use-block-default-class-name.js +0 -35
- package/src/components/block-parent-selector/style.scss +0 -11
- package/src/components/block-tools/back-compat.js +0 -35
- package/src/components/block-tools/block-contextual-toolbar.js +0 -100
- package/src/components/block-tools/selected-block-tools.js +0 -127
- package/src/components/inserter/hooks/use-debounced-input.js +0 -18
- package/src/components/preview-options/README.md +0 -94
- package/src/components/preview-options/style.scss +0 -64
- package/src/components/use-display-block-controls/index.js +0 -36
- package/src/components/use-display-block-controls/index.native.js +0 -37
- package/src/hooks/custom-fields.js +0 -142
- package/src/hooks/test/color.js +0 -112
- package/src/utils/parse-css-unit-to-px.js +0 -329
- package/src/utils/test/parse-css-unit-to-px.js +0 -172
- package/src/utils/use-should-contextual-toolbar-show.js +0 -85
|
@@ -85,178 +85,6 @@
|
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
/**
|
|
89
|
-
* Block Toolbar when contextual.
|
|
90
|
-
*/
|
|
91
|
-
|
|
92
|
-
.block-editor-block-contextual-toolbar {
|
|
93
|
-
// Block UI appearance.
|
|
94
|
-
display: inline-flex;
|
|
95
|
-
border: $border-width solid $gray-900;
|
|
96
|
-
border-radius: $radius-block-ui;
|
|
97
|
-
background-color: $white;
|
|
98
|
-
|
|
99
|
-
.block-editor-block-toolbar .components-toolbar-group,
|
|
100
|
-
.block-editor-block-toolbar .components-toolbar {
|
|
101
|
-
border-right-color: $gray-900;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
&.is-fixed {
|
|
105
|
-
overflow: hidden;
|
|
106
|
-
|
|
107
|
-
.block-editor-block-toolbar {
|
|
108
|
-
overflow: auto;
|
|
109
|
-
overflow-y: hidden;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
border-bottom: $border-width solid $gray-200;
|
|
113
|
-
border-radius: 0;
|
|
114
|
-
|
|
115
|
-
.block-editor-block-toolbar .components-toolbar-group,
|
|
116
|
-
.block-editor-block-toolbar .components-toolbar {
|
|
117
|
-
border-right-color: $gray-200;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
@include break-medium() {
|
|
122
|
-
&.is-fixed {
|
|
123
|
-
& > .block-editor-block-toolbar {
|
|
124
|
-
flex-grow: initial;
|
|
125
|
-
width: initial;
|
|
126
|
-
|
|
127
|
-
// Add a border as separator in the block toolbar.
|
|
128
|
-
&::before {
|
|
129
|
-
content: "";
|
|
130
|
-
width: $border-width;
|
|
131
|
-
height: 3 * $grid-unit;
|
|
132
|
-
margin-top: $grid-unit + $grid-unit-05;
|
|
133
|
-
margin-right: 0;
|
|
134
|
-
background-color: $gray-300;
|
|
135
|
-
position: relative;
|
|
136
|
-
left: math.div(-$grid-unit-05, 2);
|
|
137
|
-
top: -1px;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
& > .block-editor-block-toolbar__group-collapse-fixed-toolbar {
|
|
142
|
-
border: none;
|
|
143
|
-
|
|
144
|
-
.show-icon-labels & {
|
|
145
|
-
.components-button.has-icon {
|
|
146
|
-
// Hide the button icons when labels are set to display...
|
|
147
|
-
svg {
|
|
148
|
-
display: none;
|
|
149
|
-
}
|
|
150
|
-
// ... and display labels.
|
|
151
|
-
&::after {
|
|
152
|
-
content: attr(aria-label);
|
|
153
|
-
font-size: $helptext-font-size;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
// Add a border as separator in the block toolbar.
|
|
159
|
-
&::before {
|
|
160
|
-
content: "";
|
|
161
|
-
width: $border-width;
|
|
162
|
-
height: 3 * $grid-unit;
|
|
163
|
-
margin-top: $grid-unit + $grid-unit-05;
|
|
164
|
-
margin-right: $grid-unit-10;
|
|
165
|
-
background-color: $gray-300;
|
|
166
|
-
position: relative;
|
|
167
|
-
left: 0;
|
|
168
|
-
top: -1px;
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
& > .block-editor-block-toolbar__group-expand-fixed-toolbar {
|
|
173
|
-
border: none;
|
|
174
|
-
|
|
175
|
-
.show-icon-labels & {
|
|
176
|
-
width: $grid-unit-80 * 4;
|
|
177
|
-
.components-button.has-icon {
|
|
178
|
-
// Hide the button icons when labels are set to display...
|
|
179
|
-
svg {
|
|
180
|
-
display: none;
|
|
181
|
-
}
|
|
182
|
-
// ... and display labels.
|
|
183
|
-
&::after {
|
|
184
|
-
content: attr(aria-label);
|
|
185
|
-
font-size: $helptext-font-size;
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
// Add a border as separator in the block toolbar.
|
|
191
|
-
&::before {
|
|
192
|
-
content: "";
|
|
193
|
-
width: $border-width;
|
|
194
|
-
margin-top: $grid-unit + $grid-unit-05;
|
|
195
|
-
margin-bottom: $grid-unit + $grid-unit-05;
|
|
196
|
-
background-color: $gray-300;
|
|
197
|
-
position: relative;
|
|
198
|
-
left: -8px;
|
|
199
|
-
height: 3 * $grid-unit;
|
|
200
|
-
top: -1px;
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
.show-icon-labels & {
|
|
205
|
-
.block-editor-block-parent-selector .block-editor-block-parent-selector__button::after {
|
|
206
|
-
left: 0;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
.block-editor-block-toolbar__block-controls .block-editor-block-mover {
|
|
210
|
-
border-left: none;
|
|
211
|
-
&::before {
|
|
212
|
-
content: "";
|
|
213
|
-
width: $border-width;
|
|
214
|
-
margin-top: $grid-unit + $grid-unit-05;
|
|
215
|
-
margin-bottom: $grid-unit + $grid-unit-05;
|
|
216
|
-
background-color: $gray-300;
|
|
217
|
-
position: relative;
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
&.is-fixed .block-editor-block-parent-selector {
|
|
224
|
-
|
|
225
|
-
.block-editor-block-parent-selector__button {
|
|
226
|
-
position: relative;
|
|
227
|
-
top: -1px;
|
|
228
|
-
border: 0;
|
|
229
|
-
padding-right: 6px;
|
|
230
|
-
padding-left: 6px;
|
|
231
|
-
|
|
232
|
-
&::after {
|
|
233
|
-
content: "\00B7";
|
|
234
|
-
font-size: 16px;
|
|
235
|
-
line-height: $grid-unit-40 + $grid-unit-10;
|
|
236
|
-
position: absolute;
|
|
237
|
-
left: $grid-unit-40 + $grid-unit-15 + 2px;
|
|
238
|
-
bottom: $grid-unit-05;
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
&:not(.is-fixed) .block-editor-block-parent-selector {
|
|
244
|
-
position: absolute;
|
|
245
|
-
top: -$border-width;
|
|
246
|
-
left: calc(-#{$grid-unit-60} - #{$grid-unit-10} - #{$border-width});
|
|
247
|
-
|
|
248
|
-
.show-icon-labels & {
|
|
249
|
-
position: relative;
|
|
250
|
-
left: auto;
|
|
251
|
-
top: auto;
|
|
252
|
-
margin-top: -$border-width;
|
|
253
|
-
margin-left: -$border-width;
|
|
254
|
-
margin-bottom: -$border-width;
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
|
|
260
88
|
/**
|
|
261
89
|
* Block Label for Navigation/Selection Mode
|
|
262
90
|
*/
|
|
@@ -349,6 +177,7 @@
|
|
|
349
177
|
}
|
|
350
178
|
|
|
351
179
|
.components-popover.block-editor-block-list__block-popover {
|
|
180
|
+
|
|
352
181
|
// Position the block toolbar.
|
|
353
182
|
.block-editor-block-list__block-selection-button,
|
|
354
183
|
.block-editor-block-contextual-toolbar {
|
|
@@ -357,6 +186,30 @@
|
|
|
357
186
|
margin-bottom: $grid-unit-15;
|
|
358
187
|
}
|
|
359
188
|
|
|
189
|
+
.block-editor-block-contextual-toolbar {
|
|
190
|
+
border: $border-width solid $gray-900;
|
|
191
|
+
border-radius: $radius-block-ui;
|
|
192
|
+
overflow: visible; // allow the parent selector to be visible
|
|
193
|
+
position: static;
|
|
194
|
+
width: auto;
|
|
195
|
+
|
|
196
|
+
&.has-parent {
|
|
197
|
+
margin-left: calc(#{$grid-unit-60} + #{$grid-unit-10});
|
|
198
|
+
.show-icon-labels & {
|
|
199
|
+
margin-left: 0;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.block-editor-block-toolbar {
|
|
205
|
+
overflow: visible;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.block-editor-block-toolbar .components-toolbar-group,
|
|
209
|
+
.block-editor-block-toolbar .components-toolbar {
|
|
210
|
+
border-right-color: $gray-900;
|
|
211
|
+
}
|
|
212
|
+
|
|
360
213
|
// Hide the block toolbar if the insertion point is shown.
|
|
361
214
|
&.is-insertion-point-visible {
|
|
362
215
|
visibility: hidden;
|
|
@@ -368,6 +221,41 @@
|
|
|
368
221
|
// It's essential to hide the toolbar/popover so that `dragEnter` events can pass through them to the underlying elements.
|
|
369
222
|
animation: hide-during-dragging 1ms linear forwards;
|
|
370
223
|
}
|
|
224
|
+
|
|
225
|
+
.block-editor-block-parent-selector {
|
|
226
|
+
position: absolute;
|
|
227
|
+
left: calc(-#{$grid-unit-60} - #{$grid-unit-10} - #{$border-width});
|
|
228
|
+
|
|
229
|
+
&::before {
|
|
230
|
+
content: "";
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.block-editor-block-parent-selector__button {
|
|
234
|
+
border: 1px solid $gray-900;
|
|
235
|
+
padding-right: 6px;
|
|
236
|
+
padding-left: 6px;
|
|
237
|
+
background-color: $white;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
// Show Icon Label Styles
|
|
242
|
+
.show-icon-labels & {
|
|
243
|
+
|
|
244
|
+
.block-editor-block-parent-selector {
|
|
245
|
+
position: static;
|
|
246
|
+
margin-top: -$border-width;
|
|
247
|
+
margin-left: -$border-width;
|
|
248
|
+
margin-bottom: -$border-width;
|
|
249
|
+
|
|
250
|
+
.block-editor-block-parent-selector__button {
|
|
251
|
+
position: static;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
.block-editor-block-mover__move-button-container,
|
|
255
|
+
.block-editor-block-toolbar__block-controls .block-editor-block-mover {
|
|
256
|
+
border-left: 1px solid $gray-900;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
371
259
|
}
|
|
372
260
|
|
|
373
261
|
.is-dragging-components-draggable .components-tooltip {
|
|
@@ -10,11 +10,6 @@ This component is present in the block insertion tab, the reusable blocks tab an
|
|
|
10
10
|
|
|
11
11
|

|
|
12
12
|
|
|
13
|
-
## Table of contents
|
|
14
|
-
|
|
15
|
-
1. [Development guidelines](#development-guidelines)
|
|
16
|
-
2. [Related components](#related-components)
|
|
17
|
-
|
|
18
13
|
## Development guidelines
|
|
19
14
|
|
|
20
15
|
### Usage
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
* WordPress dependencies
|
|
16
16
|
*/
|
|
17
17
|
import { useState, useEffect } from '@wordpress/element';
|
|
18
|
-
import { BottomSheet, Gradient
|
|
18
|
+
import { BottomSheet, Gradient } from '@wordpress/components';
|
|
19
19
|
import {
|
|
20
20
|
usePreferredColorScheme,
|
|
21
21
|
usePreferredColorSchemeStyle,
|
|
@@ -25,6 +25,7 @@ import {
|
|
|
25
25
|
* Internal dependencies
|
|
26
26
|
*/
|
|
27
27
|
import styles from './style.scss';
|
|
28
|
+
import InserterButton from '../inserter-button';
|
|
28
29
|
|
|
29
30
|
const MIN_COL_NUM = 3;
|
|
30
31
|
|
|
@@ -10,11 +10,6 @@ This component is currently used by "Columns" and "Query Loop" blocks.
|
|
|
10
10
|
|
|
11
11
|

|
|
12
12
|
|
|
13
|
-
## Table of contents
|
|
14
|
-
|
|
15
|
-
1. [Development guidelines](#development-guidelines)
|
|
16
|
-
2. [Related components](#related-components)
|
|
17
|
-
|
|
18
13
|
## Development guidelines
|
|
19
14
|
|
|
20
15
|
### Usage
|
|
@@ -20,7 +20,6 @@ import {
|
|
|
20
20
|
PanelBody,
|
|
21
21
|
BottomSheet,
|
|
22
22
|
FooterMessageControl,
|
|
23
|
-
InserterButton,
|
|
24
23
|
} from '@wordpress/components';
|
|
25
24
|
import { Icon, close } from '@wordpress/icons';
|
|
26
25
|
|
|
@@ -29,6 +28,7 @@ import { Icon, close } from '@wordpress/icons';
|
|
|
29
28
|
*/
|
|
30
29
|
import styles from './style.scss';
|
|
31
30
|
import { store as blockEditorStore } from '../../store';
|
|
31
|
+
import InserterButton from '../inserter-button';
|
|
32
32
|
|
|
33
33
|
const hitSlop = { top: 22, bottom: 22, left: 22, right: 22 };
|
|
34
34
|
|
|
@@ -4,11 +4,6 @@ This component allows to display the selected block's variations which have the
|
|
|
4
4
|
|
|
5
5
|
By selecting such a variation an update to the selected block's attributes happen, based on the variation's attributes.
|
|
6
6
|
|
|
7
|
-
## Table of contents
|
|
8
|
-
|
|
9
|
-
1. [Development guidelines](#development-guidelines)
|
|
10
|
-
2. [Related components](#related-components)
|
|
11
|
-
|
|
12
7
|
## Development guidelines
|
|
13
8
|
|
|
14
9
|
### Usage
|
|
@@ -8,6 +8,8 @@ import {
|
|
|
8
8
|
DropdownMenu,
|
|
9
9
|
MenuGroup,
|
|
10
10
|
MenuItemsChoice,
|
|
11
|
+
__experimentalToggleGroupControl as ToggleGroupControl,
|
|
12
|
+
__experimentalToggleGroupControlOptionIcon as ToggleGroupControlOptionIcon,
|
|
11
13
|
VisuallyHidden,
|
|
12
14
|
} from '@wordpress/components';
|
|
13
15
|
import { useSelect, useDispatch } from '@wordpress/data';
|
|
@@ -95,6 +97,43 @@ function VariationsDropdown( {
|
|
|
95
97
|
);
|
|
96
98
|
}
|
|
97
99
|
|
|
100
|
+
function VariationsToggleGroupControl( {
|
|
101
|
+
className,
|
|
102
|
+
onSelectVariation,
|
|
103
|
+
selectedValue,
|
|
104
|
+
variations,
|
|
105
|
+
} ) {
|
|
106
|
+
return (
|
|
107
|
+
<div className={ className }>
|
|
108
|
+
<ToggleGroupControl
|
|
109
|
+
label={ __( 'Transform to variation' ) }
|
|
110
|
+
value={ selectedValue }
|
|
111
|
+
hideLabelFromVision
|
|
112
|
+
onChange={ onSelectVariation }
|
|
113
|
+
__next40pxDefaultSize
|
|
114
|
+
__nextHasNoMarginBottom
|
|
115
|
+
>
|
|
116
|
+
{ variations.map( ( variation ) => (
|
|
117
|
+
<ToggleGroupControlOptionIcon
|
|
118
|
+
key={ variation.name }
|
|
119
|
+
icon={ variation.icon }
|
|
120
|
+
value={ variation.name }
|
|
121
|
+
label={
|
|
122
|
+
selectedValue === variation.name
|
|
123
|
+
? variation.title
|
|
124
|
+
: sprintf(
|
|
125
|
+
/* translators: %s: Name of the block variation */
|
|
126
|
+
__( 'Transform to %s' ),
|
|
127
|
+
variation.title
|
|
128
|
+
)
|
|
129
|
+
}
|
|
130
|
+
/>
|
|
131
|
+
) ) }
|
|
132
|
+
</ToggleGroupControl>
|
|
133
|
+
</div>
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
|
|
98
137
|
function __experimentalBlockVariationTransforms( { blockClientId } ) {
|
|
99
138
|
const { updateBlockAttributes } = useDispatch( blockEditorStore );
|
|
100
139
|
const { activeBlockVariation, variations } = useSelect(
|
|
@@ -138,12 +177,19 @@ function __experimentalBlockVariationTransforms( { blockClientId } ) {
|
|
|
138
177
|
} );
|
|
139
178
|
};
|
|
140
179
|
|
|
141
|
-
const baseClass = 'block-editor-block-variation-transforms';
|
|
142
|
-
|
|
143
180
|
// Skip rendering if there are no variations
|
|
144
181
|
if ( ! variations?.length ) return null;
|
|
145
182
|
|
|
146
|
-
const
|
|
183
|
+
const baseClass = 'block-editor-block-variation-transforms';
|
|
184
|
+
|
|
185
|
+
// Show buttons if there are more than 5 variations because the ToggleGroupControl does not wrap
|
|
186
|
+
const showButtons = variations.length > 5;
|
|
187
|
+
|
|
188
|
+
const ButtonComponent = showButtons
|
|
189
|
+
? VariationsButtons
|
|
190
|
+
: VariationsToggleGroupControl;
|
|
191
|
+
|
|
192
|
+
const Component = hasUniqueIcons ? ButtonComponent : VariationsDropdown;
|
|
147
193
|
|
|
148
194
|
return (
|
|
149
195
|
<Component
|
|
@@ -13,7 +13,7 @@ export default function LinkedButton( { isLinked, ...props } ) {
|
|
|
13
13
|
<Button
|
|
14
14
|
{ ...props }
|
|
15
15
|
className="component-border-radius-control__linked-button"
|
|
16
|
-
|
|
16
|
+
size="small"
|
|
17
17
|
icon={ isLinked ? link : linkOff }
|
|
18
18
|
iconSize={ 24 }
|
|
19
19
|
aria-label={ label }
|
|
@@ -4,11 +4,6 @@ The `Caption` component renders the [caption part](https://wordpress.org/documen
|
|
|
4
4
|
|
|
5
5
|
This component encapsulates the "caption" behaviour and styles over a `<RichText>` so it can be used in other components such as the `BlockCaption` component.
|
|
6
6
|
|
|
7
|
-
## Table of contents
|
|
8
|
-
|
|
9
|
-
1. [Development guidelines](#development-guidelines)
|
|
10
|
-
2. [Related components](#related-components)
|
|
11
|
-
|
|
12
7
|
## Development guidelines
|
|
13
8
|
|
|
14
9
|
### Usage
|
|
@@ -221,7 +221,6 @@ exports[`ColorPaletteControl matches the snapshot 1`] = `
|
|
|
221
221
|
aria-selected="true"
|
|
222
222
|
class="components-button components-circular-option-picker__option"
|
|
223
223
|
data-active-item=""
|
|
224
|
-
data-command=""
|
|
225
224
|
id="components-circular-option-picker-0-0"
|
|
226
225
|
role="option"
|
|
227
226
|
style="background-color: rgb(255, 0, 0); color: rgb(255, 0, 0);"
|
|
@@ -5,10 +5,15 @@ import { colord, extend } from 'colord';
|
|
|
5
5
|
import namesPlugin from 'colord/plugins/names';
|
|
6
6
|
import a11yPlugin from 'colord/plugins/a11y';
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* WordPress dependencies
|
|
10
|
+
*/
|
|
11
|
+
import { privateApis as componentsPrivateApis } from '@wordpress/components';
|
|
12
|
+
|
|
8
13
|
/**
|
|
9
14
|
* Internal dependencies
|
|
10
15
|
*/
|
|
11
|
-
import {
|
|
16
|
+
import { unlock } from '../../lock-unlock';
|
|
12
17
|
|
|
13
18
|
extend( [ namesPlugin, a11yPlugin ] );
|
|
14
19
|
|
|
@@ -70,6 +75,8 @@ export function getColorClassName( colorContextName, colorSlug ) {
|
|
|
70
75
|
return undefined;
|
|
71
76
|
}
|
|
72
77
|
|
|
78
|
+
const { kebabCase } = unlock( componentsPrivateApis );
|
|
79
|
+
|
|
73
80
|
return `has-${ kebabCase( colorSlug ) }-${ colorContextName }`;
|
|
74
81
|
}
|
|
75
82
|
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { useMemo, Component } from '@wordpress/element';
|
|
5
5
|
import { compose, createHigherOrderComponent } from '@wordpress/compose';
|
|
6
|
+
import { privateApis as componentsPrivateApis } from '@wordpress/components';
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* Internal dependencies
|
|
@@ -14,7 +15,7 @@ import {
|
|
|
14
15
|
getMostReadableColor,
|
|
15
16
|
} from './utils';
|
|
16
17
|
import { useSettings } from '../use-settings';
|
|
17
|
-
import {
|
|
18
|
+
import { unlock } from '../../lock-unlock';
|
|
18
19
|
|
|
19
20
|
/**
|
|
20
21
|
* Capitalizes the first letter in a string.
|
|
@@ -79,6 +80,7 @@ const withEditorColorPalette = () =>
|
|
|
79
80
|
* @return {Component} The component that can be used as a HOC.
|
|
80
81
|
*/
|
|
81
82
|
function createColorHOC( colorTypes, withColorPalette ) {
|
|
83
|
+
const { kebabCase } = unlock( componentsPrivateApis );
|
|
82
84
|
const colorMap = colorTypes.reduce( ( colorObject, colorType ) => {
|
|
83
85
|
return {
|
|
84
86
|
...colorObject,
|
|
@@ -10,15 +10,16 @@ import { __ } from '@wordpress/i18n';
|
|
|
10
10
|
import {
|
|
11
11
|
BaseControl,
|
|
12
12
|
__experimentalVStack as VStack,
|
|
13
|
-
TabPanel,
|
|
14
13
|
ColorPalette,
|
|
15
14
|
GradientPicker,
|
|
15
|
+
privateApis as componentsPrivateApis,
|
|
16
16
|
} from '@wordpress/components';
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* Internal dependencies
|
|
20
20
|
*/
|
|
21
21
|
import { useSettings } from '../use-settings';
|
|
22
|
+
import { unlock } from '../../lock-unlock';
|
|
22
23
|
|
|
23
24
|
const colorsAndGradientKeys = [
|
|
24
25
|
'colors',
|
|
@@ -27,18 +28,7 @@ const colorsAndGradientKeys = [
|
|
|
27
28
|
'disableCustomGradients',
|
|
28
29
|
];
|
|
29
30
|
|
|
30
|
-
const
|
|
31
|
-
name: 'color',
|
|
32
|
-
title: __( 'Solid' ),
|
|
33
|
-
value: 'color',
|
|
34
|
-
};
|
|
35
|
-
const TAB_GRADIENT = {
|
|
36
|
-
name: 'gradient',
|
|
37
|
-
title: __( 'Gradient' ),
|
|
38
|
-
value: 'gradient',
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
const TABS_SETTINGS = [ TAB_COLOR, TAB_GRADIENT ];
|
|
31
|
+
const TAB_IDS = { color: 'color', gradient: 'gradient' };
|
|
42
32
|
|
|
43
33
|
function ColorGradientControlInner( {
|
|
44
34
|
colors,
|
|
@@ -69,7 +59,7 @@ function ColorGradientControlInner( {
|
|
|
69
59
|
}
|
|
70
60
|
|
|
71
61
|
const tabPanels = {
|
|
72
|
-
[
|
|
62
|
+
[ TAB_IDS.color ]: (
|
|
73
63
|
<ColorPalette
|
|
74
64
|
value={ colorValue }
|
|
75
65
|
onChange={
|
|
@@ -89,7 +79,7 @@ function ColorGradientControlInner( {
|
|
|
89
79
|
headingLevel={ headingLevel }
|
|
90
80
|
/>
|
|
91
81
|
),
|
|
92
|
-
[
|
|
82
|
+
[ TAB_IDS.gradient ]: (
|
|
93
83
|
<GradientPicker
|
|
94
84
|
__nextHasNoMargin
|
|
95
85
|
value={ gradientValue }
|
|
@@ -117,6 +107,11 @@ function ColorGradientControlInner( {
|
|
|
117
107
|
</div>
|
|
118
108
|
);
|
|
119
109
|
|
|
110
|
+
// Unlocking `Tabs` too early causes the `unlock` method to receive an empty
|
|
111
|
+
// object, due to circular dependencies.
|
|
112
|
+
// See https://github.com/WordPress/gutenberg/issues/52692
|
|
113
|
+
const { Tabs } = unlock( componentsPrivateApis );
|
|
114
|
+
|
|
120
115
|
return (
|
|
121
116
|
<BaseControl
|
|
122
117
|
__nextHasNoMarginBottom
|
|
@@ -137,22 +132,46 @@ function ColorGradientControlInner( {
|
|
|
137
132
|
</legend>
|
|
138
133
|
) }
|
|
139
134
|
{ canChooseAColor && canChooseAGradient && (
|
|
140
|
-
<
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
135
|
+
<div>
|
|
136
|
+
<Tabs
|
|
137
|
+
initialTabId={
|
|
138
|
+
gradientValue
|
|
139
|
+
? TAB_IDS.gradient
|
|
140
|
+
: !! canChooseAColor && TAB_IDS.color
|
|
141
|
+
}
|
|
142
|
+
>
|
|
143
|
+
<Tabs.TabList>
|
|
144
|
+
<Tabs.Tab tabId={ TAB_IDS.color }>
|
|
145
|
+
{ __( 'Solid' ) }
|
|
146
|
+
</Tabs.Tab>
|
|
147
|
+
<Tabs.Tab tabId={ TAB_IDS.gradient }>
|
|
148
|
+
{ __( 'Gradient' ) }
|
|
149
|
+
</Tabs.Tab>
|
|
150
|
+
</Tabs.TabList>
|
|
151
|
+
<Tabs.TabPanel
|
|
152
|
+
tabId={ TAB_IDS.color }
|
|
153
|
+
className={
|
|
154
|
+
'block-editor-color-gradient-control__panel'
|
|
155
|
+
}
|
|
156
|
+
focusable={ false }
|
|
157
|
+
>
|
|
158
|
+
{ tabPanels.color }
|
|
159
|
+
</Tabs.TabPanel>
|
|
160
|
+
<Tabs.TabPanel
|
|
161
|
+
tabId={ TAB_IDS.gradient }
|
|
162
|
+
className={
|
|
163
|
+
'block-editor-color-gradient-control__panel'
|
|
164
|
+
}
|
|
165
|
+
focusable={ false }
|
|
166
|
+
>
|
|
167
|
+
{ tabPanels.gradient }
|
|
168
|
+
</Tabs.TabPanel>
|
|
169
|
+
</Tabs>
|
|
170
|
+
</div>
|
|
151
171
|
) }
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
{ ! canChooseAColor &&
|
|
155
|
-
renderPanelType( TAB_GRADIENT.value ) }
|
|
172
|
+
|
|
173
|
+
{ ! canChooseAGradient && renderPanelType( TAB_IDS.color ) }
|
|
174
|
+
{ ! canChooseAColor && renderPanelType( TAB_IDS.gradient ) }
|
|
156
175
|
</VStack>
|
|
157
176
|
</fieldset>
|
|
158
177
|
</BaseControl>
|
|
@@ -15,12 +15,6 @@ $swatch-gap: 12px;
|
|
|
15
15
|
min-width: 0;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
.block-editor-color-gradient-control__tabs {
|
|
19
|
-
.block-editor-color-gradient-control__panel {
|
|
20
|
-
padding: $grid-unit-20;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
18
|
.block-editor-panel-color-gradient-settings.block-editor-panel-color-gradient-settings {
|
|
25
19
|
&,
|
|
26
20
|
& > div:not(:first-of-type) {
|
|
@@ -33,7 +27,6 @@ $swatch-gap: 12px;
|
|
|
33
27
|
.components-circular-option-picker__swatches {
|
|
34
28
|
display: grid;
|
|
35
29
|
grid-template-columns: repeat(6, $swatch-size);
|
|
36
|
-
justify-content: space-between;
|
|
37
30
|
}
|
|
38
31
|
}
|
|
39
32
|
|
|
@@ -6,10 +6,6 @@ ContrastChecker also accounts for font sizes.
|
|
|
6
6
|
|
|
7
7
|
A notice will be rendered if the color combination of text and background colors are low.
|
|
8
8
|
|
|
9
|
-
## Table of contents
|
|
10
|
-
|
|
11
|
-
1. [Development guidelines](#development-guidelines)
|
|
12
|
-
|
|
13
9
|
## Developer guidelines
|
|
14
10
|
|
|
15
11
|
### Usage
|
|
@@ -8,16 +8,6 @@ Concretely, it handles the display of success messages and takes care of copying
|
|
|
8
8
|
|
|
9
9
|

|
|
10
10
|
|
|
11
|
-
## Table of contents
|
|
12
|
-
|
|
13
|
-
- [Copy Handler](#copy-handler)
|
|
14
|
-
- [Table of contents](#table-of-contents)
|
|
15
|
-
- [Development guidelines](#development-guidelines)
|
|
16
|
-
- [Usage](#usage)
|
|
17
|
-
- [Props](#props)
|
|
18
|
-
- [`children`](#children)
|
|
19
|
-
- [Related components](#related-components)
|
|
20
|
-
|
|
21
11
|
## Development guidelines
|
|
22
12
|
|
|
23
13
|
### Usage
|
|
@@ -65,14 +65,11 @@ function DuotoneControl( {
|
|
|
65
65
|
} }
|
|
66
66
|
renderContent={ () => (
|
|
67
67
|
<MenuGroup label={ __( 'Duotone' ) }>
|
|
68
|
-
<
|
|
69
|
-
id={ descriptionId }
|
|
70
|
-
className="block-editor-duotone-control__description"
|
|
71
|
-
>
|
|
68
|
+
<p>
|
|
72
69
|
{ __(
|
|
73
70
|
'Create a two-tone color effect without losing your original image.'
|
|
74
71
|
) }
|
|
75
|
-
</
|
|
72
|
+
</p>
|
|
76
73
|
<DuotonePicker
|
|
77
74
|
aria-label={ actionLabel }
|
|
78
75
|
aria-describedby={ descriptionId }
|