@wordpress/block-editor 15.5.0 → 15.5.1-next.47f435fc9.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/README.md +0 -4
- package/build/autocompleters/block.js +117 -87
- package/build/autocompleters/block.js.map +7 -1
- package/build/autocompleters/link.js +58 -48
- package/build/autocompleters/link.js.map +7 -1
- package/build/components/alignment-control/index.js +44 -28
- package/build/components/alignment-control/index.js.map +7 -1
- package/build/components/alignment-control/ui.js +72 -54
- package/build/components/alignment-control/ui.js.map +7 -1
- package/build/components/autocomplete/index.js +64 -62
- package/build/components/autocomplete/index.js.map +7 -1
- package/build/components/background-image-control/index.js +494 -452
- package/build/components/background-image-control/index.js.map +7 -1
- package/build/components/block-actions/index.js +76 -62
- package/build/components/block-actions/index.js.map +7 -1
- package/build/components/block-alignment-control/constants.js +44 -25
- package/build/components/block-alignment-control/constants.js.map +7 -1
- package/build/components/block-alignment-control/index.js +44 -28
- package/build/components/block-alignment-control/index.js.map +7 -1
- package/build/components/block-alignment-control/ui.js +75 -71
- package/build/components/block-alignment-control/ui.js.map +7 -1
- package/build/components/block-alignment-control/use-available-alignments.js +60 -54
- package/build/components/block-alignment-control/use-available-alignments.js.map +7 -1
- package/build/components/block-alignment-matrix-control/index.js +66 -82
- package/build/components/block-alignment-matrix-control/index.js.map +7 -1
- package/build/components/block-allowed-blocks/allowed-blocks-control.js +99 -0
- package/build/components/block-allowed-blocks/allowed-blocks-control.js.map +7 -0
- package/build/components/block-allowed-blocks/index.js +42 -0
- package/build/components/block-allowed-blocks/index.js.map +7 -0
- package/build/components/block-allowed-blocks/modal.js +124 -0
- package/build/components/block-allowed-blocks/modal.js.map +7 -0
- package/build/components/block-breadcrumb/index.js +125 -103
- package/build/components/block-breadcrumb/index.js.map +7 -1
- package/build/components/block-canvas/index.js +121 -123
- package/build/components/block-canvas/index.js.map +7 -1
- package/build/components/block-card/index.js +92 -121
- package/build/components/block-card/index.js.map +7 -1
- package/build/components/block-compare/block-view.js +38 -35
- package/build/components/block-compare/block-view.js.map +7 -1
- package/build/components/block-compare/index.js +73 -60
- package/build/components/block-compare/index.js.map +7 -1
- package/build/components/block-content-overlay/index.js +31 -21
- package/build/components/block-content-overlay/index.js.map +7 -1
- package/build/components/block-context/index.js +39 -46
- package/build/components/block-context/index.js.map +7 -1
- package/build/components/block-controls/fill.js +51 -40
- package/build/components/block-controls/fill.js.map +7 -1
- package/build/components/block-controls/groups.js +29 -16
- package/build/components/block-controls/groups.js.map +7 -1
- package/build/components/block-controls/hook.js +39 -21
- package/build/components/block-controls/hook.js.map +7 -1
- package/build/components/block-controls/index.js +47 -29
- package/build/components/block-controls/index.js.map +7 -1
- package/build/components/block-controls/slot.js +58 -51
- package/build/components/block-controls/slot.js.map +7 -1
- package/build/components/block-draggable/draggable-chip.js +59 -44
- package/build/components/block-draggable/draggable-chip.js.map +7 -1
- package/build/components/block-draggable/index.js +165 -146
- package/build/components/block-draggable/index.js.map +7 -1
- package/build/components/block-draggable/use-scroll-when-dragging.js +58 -47
- package/build/components/block-draggable/use-scroll-when-dragging.js.map +7 -1
- package/build/components/block-edit/context.js +52 -30
- package/build/components/block-edit/context.js.map +7 -1
- package/build/components/block-edit/edit.js +236 -194
- package/build/components/block-edit/edit.js.map +7 -1
- package/build/components/block-edit/index.js +93 -72
- package/build/components/block-edit/index.js.map +7 -1
- package/build/components/block-edit/multiple-usage-warning.js +79 -41
- package/build/components/block-edit/multiple-usage-warning.js.map +7 -1
- package/build/components/block-edit-visually-button/index.js +40 -32
- package/build/components/block-edit-visually-button/index.js.map +7 -1
- package/build/components/block-editing-mode/index.js +42 -64
- package/build/components/block-editing-mode/index.js.map +7 -1
- package/build/components/block-full-height-alignment-control/index.js +38 -22
- package/build/components/block-full-height-alignment-control/index.js.map +7 -1
- package/build/components/block-heading-level-dropdown/heading-level-icon.js +35 -42
- package/build/components/block-heading-level-dropdown/heading-level-icon.js.map +7 -1
- package/build/components/block-heading-level-dropdown/index.js +64 -65
- package/build/components/block-heading-level-dropdown/index.js.map +7 -1
- package/build/components/block-icon/index.js +52 -43
- package/build/components/block-icon/index.js.map +7 -1
- package/build/components/block-inspector/edit-contents-button.js +53 -48
- package/build/components/block-inspector/edit-contents-button.js.map +7 -1
- package/build/components/block-inspector/index.js +237 -200
- package/build/components/block-inspector/index.js.map +7 -1
- package/build/components/block-inspector/useBlockInspectorAnimationSettings.js +44 -38
- package/build/components/block-inspector/useBlockInspectorAnimationSettings.js.map +7 -1
- package/build/components/block-list/block-crash-boundary.js +25 -12
- package/build/components/block-list/block-crash-boundary.js.map +7 -1
- package/build/components/block-list/block-crash-warning.js +37 -23
- package/build/components/block-list/block-crash-warning.js.map +7 -1
- package/build/components/block-list/block-html.js +65 -49
- package/build/components/block-list/block-html.js.map +7 -1
- package/build/components/block-list/block-invalid-warning.js +152 -106
- package/build/components/block-list/block-invalid-warning.js.map +7 -1
- package/build/components/block-list/block.js +356 -421
- package/build/components/block-list/block.js.map +7 -1
- package/build/components/block-list/index.js +210 -178
- package/build/components/block-list/index.js.map +7 -1
- package/build/components/block-list/layout.js +46 -48
- package/build/components/block-list/layout.js.map +7 -1
- package/build/components/block-list/private-block-context.js +29 -12
- package/build/components/block-list/private-block-context.js.map +7 -1
- package/build/components/block-list/subdirectory-icon.js +43 -26
- package/build/components/block-list/subdirectory-icon.js.map +7 -1
- package/build/components/block-list/use-block-props/index.js +118 -149
- package/build/components/block-list/use-block-props/index.js.map +7 -1
- package/build/components/block-list/use-block-props/use-block-refs.js +49 -59
- package/build/components/block-list/use-block-props/use-block-refs.js.map +7 -1
- package/build/components/block-list/use-block-props/use-firefox-draggable-compatibility.js +42 -47
- package/build/components/block-list/use-block-props/use-firefox-draggable-compatibility.js.map +7 -1
- package/build/components/block-list/use-block-props/use-focus-first-element.js +47 -62
- package/build/components/block-list/use-block-props/use-focus-first-element.js.map +7 -1
- package/build/components/block-list/use-block-props/use-focus-handler.js +54 -65
- package/build/components/block-list/use-block-props/use-focus-handler.js.map +7 -1
- package/build/components/block-list/use-block-props/use-intersection-observer.js +41 -25
- package/build/components/block-list/use-block-props/use-intersection-observer.js.map +7 -1
- package/build/components/block-list/use-block-props/use-is-hovered.js +37 -24
- package/build/components/block-list/use-block-props/use-is-hovered.js.map +7 -1
- package/build/components/block-list/use-block-props/use-scroll-into-view.js +54 -40
- package/build/components/block-list/use-block-props/use-scroll-into-view.js.map +7 -1
- package/build/components/block-list/use-block-props/use-selected-block-event-handlers.js +205 -173
- package/build/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +7 -1
- package/build/components/block-list/use-in-between-inserter.js +122 -113
- package/build/components/block-list/use-in-between-inserter.js.map +7 -1
- package/build/components/block-list/zoom-out-separator.js +85 -80
- package/build/components/block-list/zoom-out-separator.js.map +7 -1
- package/build/components/block-list-appender/index.js +79 -86
- package/build/components/block-list-appender/index.js.map +7 -1
- package/build/components/block-lock/index.js +44 -31
- package/build/components/block-lock/index.js.map +7 -1
- package/build/components/block-lock/menu-item.js +59 -42
- package/build/components/block-lock/menu-item.js.map +7 -1
- package/build/components/block-lock/modal.js +233 -183
- package/build/components/block-lock/modal.js.map +7 -1
- package/build/components/block-lock/toolbar.js +59 -51
- package/build/components/block-lock/toolbar.js.map +7 -1
- package/build/components/block-lock/use-block-lock.js +48 -43
- package/build/components/block-lock/use-block-lock.js.map +7 -1
- package/build/components/block-manager/category.js +111 -65
- package/build/components/block-manager/category.js.map +7 -1
- package/build/components/block-manager/checklist.js +55 -36
- package/build/components/block-manager/checklist.js.map +7 -1
- package/build/components/block-manager/index.js +123 -91
- package/build/components/block-manager/index.js.map +7 -1
- package/build/components/block-mover/button.js +155 -133
- package/build/components/block-mover/button.js.map +7 -1
- package/build/components/block-mover/index.js +111 -95
- package/build/components/block-mover/index.js.map +7 -1
- package/build/components/block-mover/mover-description.js +243 -169
- package/build/components/block-mover/mover-description.js.map +7 -1
- package/build/components/block-navigation/dropdown.js +86 -72
- package/build/components/block-navigation/dropdown.js.map +7 -1
- package/build/components/block-parent-selector/index.js +73 -59
- package/build/components/block-parent-selector/index.js.map +7 -1
- package/build/components/block-pattern-setup/constants.js +29 -8
- package/build/components/block-pattern-setup/constants.js.map +7 -1
- package/build/components/block-pattern-setup/index.js +175 -147
- package/build/components/block-pattern-setup/index.js.map +7 -1
- package/build/components/block-pattern-setup/setup-toolbar.js +94 -73
- package/build/components/block-pattern-setup/setup-toolbar.js.map +7 -1
- package/build/components/block-pattern-setup/use-patterns-setup.js +42 -28
- package/build/components/block-pattern-setup/use-patterns-setup.js.map +7 -1
- package/build/components/block-patterns-list/index.js +189 -164
- package/build/components/block-patterns-list/index.js.map +7 -1
- package/build/components/block-patterns-paging/index.js +119 -84
- package/build/components/block-patterns-paging/index.js.map +7 -1
- package/build/components/block-popover/cover.js +54 -45
- package/build/components/block-popover/cover.js.map +7 -1
- package/build/components/block-popover/drop-zone.js +64 -54
- package/build/components/block-popover/drop-zone.js.map +7 -1
- package/build/components/block-popover/inbetween.js +127 -133
- package/build/components/block-popover/inbetween.js.map +7 -1
- package/build/components/block-popover/index.js +113 -91
- package/build/components/block-popover/index.js.map +7 -1
- package/build/components/block-popover/use-popover-scroll.js +48 -53
- package/build/components/block-popover/use-popover-scroll.js.map +7 -1
- package/build/components/block-preview/async.js +33 -35
- package/build/components/block-preview/async.js.map +7 -1
- package/build/components/block-preview/auto.js +114 -103
- package/build/components/block-preview/auto.js.map +7 -1
- package/build/components/block-preview/index.js +136 -116
- package/build/components/block-preview/index.js.map +7 -1
- package/build/components/block-quick-navigation/index.js +82 -76
- package/build/components/block-quick-navigation/index.js.map +7 -1
- package/build/components/block-removal-warning-modal/index.js +76 -55
- package/build/components/block-removal-warning-modal/index.js.map +7 -1
- package/build/components/block-rename/index.js +41 -24
- package/build/components/block-rename/index.js.map +7 -1
- package/build/components/block-rename/is-empty-string.js +22 -5
- package/build/components/block-rename/is-empty-string.js.map +7 -1
- package/build/components/block-rename/modal.js +135 -103
- package/build/components/block-rename/modal.js.map +7 -1
- package/build/components/block-rename/rename-control.js +59 -36
- package/build/components/block-rename/rename-control.js.map +7 -1
- package/build/components/block-rename/use-block-rename.js +24 -11
- package/build/components/block-rename/use-block-rename.js.map +7 -1
- package/build/components/block-selection-clearer/index.js +53 -57
- package/build/components/block-selection-clearer/index.js.map +7 -1
- package/build/components/block-settings-menu/block-html-convert-button.js +46 -34
- package/build/components/block-settings-menu/block-html-convert-button.js.map +7 -1
- package/build/components/block-settings-menu/block-mode-toggle.js +56 -53
- package/build/components/block-settings-menu/block-mode-toggle.js.map +7 -1
- package/build/components/block-settings-menu/block-parent-selector-menu-item.js +59 -42
- package/build/components/block-settings-menu/block-parent-selector-menu-item.js.map +7 -1
- package/build/components/block-settings-menu/block-settings-dropdown.js +287 -233
- package/build/components/block-settings-menu/block-settings-dropdown.js.map +7 -1
- package/build/components/block-settings-menu/block-settings-menu-first-item.js +27 -15
- package/build/components/block-settings-menu/block-settings-menu-first-item.js.map +7 -1
- package/build/components/block-settings-menu/index.js +53 -32
- package/build/components/block-settings-menu/index.js.map +7 -1
- package/build/components/block-settings-menu-controls/index.js +129 -107
- package/build/components/block-settings-menu-controls/index.js.map +7 -1
- package/build/components/block-styles/index.js +99 -75
- package/build/components/block-styles/index.js.map +7 -1
- package/build/components/block-styles/menu-items.js +60 -43
- package/build/components/block-styles/menu-items.js.map +7 -1
- package/build/components/block-styles/preview-panel.js +42 -26
- package/build/components/block-styles/preview-panel.js.map +7 -1
- package/build/components/block-styles/use-styles-for-block.js +53 -70
- package/build/components/block-styles/use-styles-for-block.js.map +7 -1
- package/build/components/block-styles/utils.js +61 -66
- package/build/components/block-styles/utils.js.map +7 -1
- package/build/components/block-switcher/block-styles-menu.js +46 -33
- package/build/components/block-switcher/block-styles-menu.js.map +7 -1
- package/build/components/block-switcher/block-transformations-menu.js +137 -126
- package/build/components/block-switcher/block-transformations-menu.js.map +7 -1
- package/build/components/block-switcher/block-variation-transformations.js +113 -85
- package/build/components/block-switcher/block-variation-transformations.js.map +7 -1
- package/build/components/block-switcher/index.js +247 -208
- package/build/components/block-switcher/index.js.map +7 -1
- package/build/components/block-switcher/pattern-transformations-menu.js +129 -99
- package/build/components/block-switcher/pattern-transformations-menu.js.map +7 -1
- package/build/components/block-switcher/preview-block-popover.js +48 -38
- package/build/components/block-switcher/preview-block-popover.js.map +7 -1
- package/build/components/block-switcher/use-transformed-patterns.js +62 -80
- package/build/components/block-switcher/use-transformed-patterns.js.map +7 -1
- package/build/components/block-switcher/utils.js +37 -45
- package/build/components/block-switcher/utils.js.map +7 -1
- package/build/components/block-title/index.js +35 -38
- package/build/components/block-title/index.js.map +7 -1
- package/build/components/block-title/use-block-display-title.js +48 -60
- package/build/components/block-title/use-block-display-title.js.map +7 -1
- package/build/components/block-toolbar/block-name-context.js +26 -13
- package/build/components/block-toolbar/block-name-context.js.map +7 -1
- package/build/components/block-toolbar/block-toolbar-last-item.js +27 -15
- package/build/components/block-toolbar/block-toolbar-last-item.js.map +7 -1
- package/build/components/block-toolbar/change-design.js +104 -92
- package/build/components/block-toolbar/change-design.js.map +7 -1
- package/build/components/block-toolbar/index.js +203 -186
- package/build/components/block-toolbar/index.js.map +7 -1
- package/build/components/block-toolbar/switch-section-style.js +111 -88
- package/build/components/block-toolbar/switch-section-style.js.map +7 -1
- package/build/components/block-toolbar/use-has-block-toolbar.js +33 -33
- package/build/components/block-toolbar/use-has-block-toolbar.js.map +7 -1
- package/build/components/block-toolbar/utils.js +63 -79
- package/build/components/block-toolbar/utils.js.map +7 -1
- package/build/components/block-tools/block-toolbar-popover.js +75 -72
- package/build/components/block-tools/block-toolbar-popover.js.map +7 -1
- package/build/components/block-tools/empty-block-inserter.js +64 -40
- package/build/components/block-tools/empty-block-inserter.js.map +7 -1
- package/build/components/block-tools/index.js +168 -119
- package/build/components/block-tools/index.js.map +7 -1
- package/build/components/block-tools/insertion-point.js +174 -159
- package/build/components/block-tools/insertion-point.js.map +7 -1
- package/build/components/block-tools/use-block-toolbar-popover-props.js +74 -101
- package/build/components/block-tools/use-block-toolbar-popover-props.js.map +7 -1
- package/build/components/block-tools/use-selected-block-tool-props.js +58 -51
- package/build/components/block-tools/use-selected-block-tool-props.js.map +7 -1
- package/build/components/block-tools/use-show-block-tools.js +34 -31
- package/build/components/block-tools/use-show-block-tools.js.map +7 -1
- package/build/components/block-tools/zoom-out-mode-inserter-button.js +56 -31
- package/build/components/block-tools/zoom-out-mode-inserter-button.js.map +7 -1
- package/build/components/block-tools/zoom-out-mode-inserters.js +71 -54
- package/build/components/block-tools/zoom-out-mode-inserters.js.map +7 -1
- package/build/components/block-types-list/index.js +57 -35
- package/build/components/block-types-list/index.js.map +7 -1
- package/build/components/block-variation-picker/index.js +86 -58
- package/build/components/block-variation-picker/index.js.map +7 -1
- package/build/components/block-variation-transforms/index.js +155 -140
- package/build/components/block-variation-transforms/index.js.map +7 -1
- package/build/components/block-vertical-alignment-control/index.js +44 -28
- package/build/components/block-vertical-alignment-control/index.js.map +7 -1
- package/build/components/block-vertical-alignment-control/ui.js +62 -49
- package/build/components/block-vertical-alignment-control/ui.js.map +7 -1
- package/build/components/block-visibility/index.js +38 -17
- package/build/components/block-visibility/index.js.map +7 -1
- package/build/components/block-visibility/menu-item.js +99 -44
- package/build/components/block-visibility/menu-item.js.map +7 -1
- package/build/components/block-visibility/toolbar.js +75 -73
- package/build/components/block-visibility/toolbar.js.map +7 -1
- package/build/components/border-radius-control/constants.js +61 -32
- package/build/components/border-radius-control/constants.js.map +7 -1
- package/build/components/border-radius-control/index.js +106 -97
- package/build/components/border-radius-control/index.js.map +7 -1
- package/build/components/border-radius-control/linked-button.js +39 -26
- package/build/components/border-radius-control/linked-button.js.map +7 -1
- package/build/components/border-radius-control/single-input-control.js +171 -139
- package/build/components/border-radius-control/single-input-control.js.map +7 -1
- package/build/components/border-radius-control/utils.js +87 -181
- package/build/components/border-radius-control/utils.js.map +7 -1
- package/build/components/button-block-appender/index.js +105 -90
- package/build/components/button-block-appender/index.js.map +7 -1
- package/build/components/child-layout-control/index.js +317 -272
- package/build/components/child-layout-control/index.js.map +7 -1
- package/build/components/collab/block-comment-icon-slot.js +25 -12
- package/build/components/collab/block-comment-icon-slot.js.map +7 -1
- package/build/components/collab/block-comment-icon-toolbar-slot.js +27 -12
- package/build/components/collab/block-comment-icon-toolbar-slot.js.map +7 -1
- package/build/components/color-palette/control.js +44 -19
- package/build/components/color-palette/control.js.map +7 -1
- package/build/components/color-palette/index.js +35 -15
- package/build/components/color-palette/index.js.map +7 -1
- package/build/components/color-palette/with-color-context.js +58 -30
- package/build/components/color-palette/with-color-context.js.map +7 -1
- package/build/components/color-style-selector/index.js +72 -90
- package/build/components/color-style-selector/index.js.map +7 -1
- package/build/components/colors/index.js +44 -36
- package/build/components/colors/index.js.map +7 -1
- package/build/components/colors/utils.js +57 -81
- package/build/components/colors/utils.js.map +7 -1
- package/build/components/colors/with-colors.js +155 -192
- package/build/components/colors/with-colors.js.map +7 -1
- package/build/components/colors-gradients/control.js +140 -117
- package/build/components/colors-gradients/control.js.map +7 -1
- package/build/components/colors-gradients/dropdown.js +153 -159
- package/build/components/colors-gradients/dropdown.js.map +7 -1
- package/build/components/colors-gradients/panel-color-gradient-settings.js +120 -83
- package/build/components/colors-gradients/panel-color-gradient-settings.js.map +7 -1
- package/build/components/colors-gradients/use-multiple-origin-colors-and-gradients.js +92 -41
- package/build/components/colors-gradients/use-multiple-origin-colors-and-gradients.js.map +7 -1
- package/build/components/content-lock/index.js +26 -10
- package/build/components/content-lock/index.js.map +7 -1
- package/build/components/content-lock/modify-content-lock-menu-item.js +61 -57
- package/build/components/content-lock/modify-content-lock-menu-item.js.map +7 -1
- package/build/components/contrast-checker/index.js +87 -73
- package/build/components/contrast-checker/index.js.map +7 -1
- package/build/components/convert-to-group-buttons/index.js +86 -60
- package/build/components/convert-to-group-buttons/index.js.map +7 -1
- package/build/components/convert-to-group-buttons/toolbar.js +104 -102
- package/build/components/convert-to-group-buttons/toolbar.js.map +7 -1
- package/build/components/convert-to-group-buttons/use-convert-to-group-button-props.js +49 -61
- package/build/components/convert-to-group-buttons/use-convert-to-group-button-props.js.map +7 -1
- package/build/components/copy-handler/index.js +50 -40
- package/build/components/copy-handler/index.js.map +7 -1
- package/build/components/date-format-picker/index.js +136 -110
- package/build/components/date-format-picker/index.js.map +7 -1
- package/build/components/default-block-appender/index.js +110 -98
- package/build/components/default-block-appender/index.js.map +7 -1
- package/build/components/dimensions-tool/aspect-ratio-tool.js +76 -73
- package/build/components/dimensions-tool/aspect-ratio-tool.js.map +7 -1
- package/build/components/dimensions-tool/index.js +136 -190
- package/build/components/dimensions-tool/index.js.map +7 -1
- package/build/components/dimensions-tool/scale-tool.js +88 -93
- package/build/components/dimensions-tool/scale-tool.js.map +7 -1
- package/build/components/dimensions-tool/width-height-tool.js +93 -107
- package/build/components/dimensions-tool/width-height-tool.js.map +7 -1
- package/build/components/duotone/utils.js +40 -58
- package/build/components/duotone/utils.js.map +7 -1
- package/build/components/duotone-control/index.js +82 -69
- package/build/components/duotone-control/index.js.map +7 -1
- package/build/components/editable-text/index.js +40 -37
- package/build/components/editable-text/index.js.map +7 -1
- package/build/components/editor-styles/index.js +113 -100
- package/build/components/editor-styles/index.js.map +7 -1
- package/build/components/floating-toolbar/nav-up-icon.js +48 -29
- package/build/components/floating-toolbar/nav-up-icon.js.map +7 -1
- package/build/components/font-appearance-control/index.js +100 -118
- package/build/components/font-appearance-control/index.js.map +7 -1
- package/build/components/font-family/index.js +84 -66
- package/build/components/font-family/index.js.map +7 -1
- package/build/components/font-sizes/fluid-utils.js +81 -164
- package/build/components/font-sizes/fluid-utils.js.map +7 -1
- package/build/components/font-sizes/font-size-picker.js +38 -27
- package/build/components/font-sizes/font-size-picker.js.map +7 -1
- package/build/components/font-sizes/index.js +48 -43
- package/build/components/font-sizes/index.js.map +7 -1
- package/build/components/font-sizes/utils.js +37 -57
- package/build/components/font-sizes/utils.js.map +7 -1
- package/build/components/font-sizes/with-font-sizes.js +144 -119
- package/build/components/font-sizes/with-font-sizes.js.map +7 -1
- package/build/components/global-styles/advanced-panel.js +64 -51
- package/build/components/global-styles/advanced-panel.js.map +7 -1
- package/build/components/global-styles/background-panel.js +97 -88
- package/build/components/global-styles/background-panel.js.map +7 -1
- package/build/components/global-styles/border-panel.js +188 -156
- package/build/components/global-styles/border-panel.js.map +7 -1
- package/build/components/global-styles/color-panel.js +521 -401
- package/build/components/global-styles/color-panel.js.map +7 -1
- package/build/components/global-styles/context.js +36 -14
- package/build/components/global-styles/context.js.map +7 -1
- package/build/components/global-styles/dimensions-panel.js +427 -360
- package/build/components/global-styles/dimensions-panel.js.map +7 -1
- package/build/components/global-styles/filters-panel.js +153 -142
- package/build/components/global-styles/filters-panel.js.map +7 -1
- package/build/components/global-styles/get-block-css-selector.js +44 -79
- package/build/components/global-styles/get-block-css-selector.js.map +7 -1
- package/build/components/global-styles/get-global-styles-changes.js +152 -168
- package/build/components/global-styles/get-global-styles-changes.js.map +7 -1
- package/build/components/global-styles/hooks.js +259 -144
- package/build/components/global-styles/hooks.js.map +7 -1
- package/build/components/global-styles/image-settings-panel.js +62 -51
- package/build/components/global-styles/image-settings-panel.js.map +7 -1
- package/build/components/global-styles/index.js +107 -196
- package/build/components/global-styles/index.js.map +7 -1
- package/build/components/global-styles/shadow-panel-components.js +175 -164
- package/build/components/global-styles/shadow-panel-components.js.map +7 -1
- package/build/components/global-styles/typography-panel.js +421 -288
- package/build/components/global-styles/typography-panel.js.map +7 -1
- package/build/components/global-styles/typography-utils.js +92 -179
- package/build/components/global-styles/typography-utils.js.map +7 -1
- package/build/components/global-styles/use-global-styles-output.js +695 -761
- package/build/components/global-styles/use-global-styles-output.js.map +7 -1
- package/build/components/global-styles/utils.js +302 -358
- package/build/components/global-styles/utils.js.map +7 -1
- package/build/components/gradients/index.js +21 -15
- package/build/components/gradients/index.js.map +7 -1
- package/build/components/gradients/use-gradient.js +97 -83
- package/build/components/gradients/use-gradient.js.map +7 -1
- package/build/components/gradients/with-gradient.js +31 -20
- package/build/components/gradients/with-gradient.js.map +7 -1
- package/build/components/grid/grid-item-movers.js +160 -103
- package/build/components/grid/grid-item-movers.js.map +7 -1
- package/build/components/grid/grid-item-resizer.js +144 -108
- package/build/components/grid/grid-item-resizer.js.map +7 -1
- package/build/components/grid/grid-visualizer.js +279 -205
- package/build/components/grid/grid-visualizer.js.map +7 -1
- package/build/components/grid/index.js +34 -30
- package/build/components/grid/index.js.map +7 -1
- package/build/components/grid/use-get-number-of-blocks-before-cell.js +30 -24
- package/build/components/grid/use-get-number-of-blocks-before-cell.js.map +7 -1
- package/build/components/grid/use-grid-layout-sync.js +124 -118
- package/build/components/grid/use-grid-layout-sync.js.map +7 -1
- package/build/components/grid/utils.js +101 -80
- package/build/components/grid/utils.js.map +7 -1
- package/build/components/height-control/index.js +132 -196
- package/build/components/height-control/index.js.map +7 -1
- package/build/components/html-element-control/index.js +76 -91
- package/build/components/html-element-control/index.js.map +7 -1
- package/build/components/html-element-control/messages.js +58 -24
- package/build/components/html-element-control/messages.js.map +7 -1
- package/build/components/iframe/get-compatibility-styles.js +89 -87
- package/build/components/iframe/get-compatibility-styles.js.map +7 -1
- package/build/components/iframe/index.js +192 -214
- package/build/components/iframe/index.js.map +7 -1
- package/build/components/iframe/use-scale-canvas.js +164 -272
- package/build/components/iframe/use-scale-canvas.js.map +7 -1
- package/build/components/image-editor/aspect-ratio-dropdown.js +120 -106
- package/build/components/image-editor/aspect-ratio-dropdown.js.map +7 -1
- package/build/components/image-editor/constants.js +34 -9
- package/build/components/image-editor/constants.js.map +7 -1
- package/build/components/image-editor/context.js +54 -33
- package/build/components/image-editor/context.js.map +7 -1
- package/build/components/image-editor/cropper.js +85 -59
- package/build/components/image-editor/cropper.js.map +7 -1
- package/build/components/image-editor/form-controls.js +31 -32
- package/build/components/image-editor/form-controls.js.map +7 -1
- package/build/components/image-editor/index.js +73 -49
- package/build/components/image-editor/index.js.map +7 -1
- package/build/components/image-editor/rotation-button.js +37 -28
- package/build/components/image-editor/rotation-button.js.map +7 -1
- package/build/components/image-editor/use-save-image.js +98 -72
- package/build/components/image-editor/use-save-image.js.map +7 -1
- package/build/components/image-editor/use-transform-image.js +70 -45
- package/build/components/image-editor/use-transform-image.js.map +7 -1
- package/build/components/image-editor/zoom-dropdown.js +58 -50
- package/build/components/image-editor/zoom-dropdown.js.map +7 -1
- package/build/components/image-size-control/index.js +115 -102
- package/build/components/image-size-control/index.js.map +7 -1
- package/build/components/image-size-control/use-dimension-handler.js +40 -34
- package/build/components/image-size-control/use-dimension-handler.js.map +7 -1
- package/build/components/index.js +408 -1075
- package/build/components/index.js.map +7 -1
- package/build/components/inner-blocks/button-block-appender.js +49 -30
- package/build/components/inner-blocks/button-block-appender.js.map +7 -1
- package/build/components/inner-blocks/default-block-appender.js +37 -19
- package/build/components/inner-blocks/default-block-appender.js.map +7 -1
- package/build/components/inner-blocks/index.js +167 -190
- package/build/components/inner-blocks/index.js.map +7 -1
- package/build/components/inner-blocks/use-block-context.js +49 -37
- package/build/components/inner-blocks/use-block-context.js.map +7 -1
- package/build/components/inner-blocks/use-inner-block-template-sync.js +69 -73
- package/build/components/inner-blocks/use-inner-block-template-sync.js.map +7 -1
- package/build/components/inner-blocks/use-nested-settings-update.js +82 -107
- package/build/components/inner-blocks/use-nested-settings-update.js.map +7 -1
- package/build/components/inserter/block-patterns-explorer/index.js +78 -59
- package/build/components/inserter/block-patterns-explorer/index.js.map +7 -1
- package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js +63 -49
- package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js.map +7 -1
- package/build/components/inserter/block-patterns-explorer/pattern-list.js +137 -85
- package/build/components/inserter/block-patterns-explorer/pattern-list.js.map +7 -1
- package/build/components/inserter/block-patterns-tab/index.js +89 -62
- package/build/components/inserter/block-patterns-tab/index.js.map +7 -1
- package/build/components/inserter/block-patterns-tab/pattern-category-previews.js +184 -114
- package/build/components/inserter/block-patterns-tab/pattern-category-previews.js.map +7 -1
- package/build/components/inserter/block-patterns-tab/patterns-filter.js +144 -104
- package/build/components/inserter/block-patterns-tab/patterns-filter.js.map +7 -1
- package/build/components/inserter/block-patterns-tab/use-pattern-categories.js +89 -38
- package/build/components/inserter/block-patterns-tab/use-pattern-categories.js.map +7 -1
- package/build/components/inserter/block-patterns-tab/utils.js +57 -42
- package/build/components/inserter/block-patterns-tab/utils.js.map +7 -1
- package/build/components/inserter/block-types-tab.js +173 -140
- package/build/components/inserter/block-types-tab.js.map +7 -1
- package/build/components/inserter/category-tabs/index.js +90 -71
- package/build/components/inserter/category-tabs/index.js.map +7 -1
- package/build/components/inserter/hooks/use-block-types-state.js +92 -68
- package/build/components/inserter/hooks/use-block-types-state.js.map +7 -1
- package/build/components/inserter/hooks/use-insertion-point.js +160 -127
- package/build/components/inserter/hooks/use-insertion-point.js.map +7 -1
- package/build/components/inserter/hooks/use-patterns-paging.js +47 -35
- package/build/components/inserter/hooks/use-patterns-paging.js.map +7 -1
- package/build/components/inserter/hooks/use-patterns-state.js +111 -84
- package/build/components/inserter/hooks/use-patterns-state.js.map +7 -1
- package/build/components/inserter/index.js +230 -237
- package/build/components/inserter/index.js.map +7 -1
- package/build/components/inserter/library.js +73 -53
- package/build/components/inserter/library.js.map +7 -1
- package/build/components/inserter/media-tab/hooks.js +88 -86
- package/build/components/inserter/media-tab/hooks.js.map +7 -1
- package/build/components/inserter/media-tab/index.js +41 -24
- package/build/components/inserter/media-tab/index.js.map +7 -1
- package/build/components/inserter/media-tab/media-list.js +45 -29
- package/build/components/inserter/media-tab/media-list.js.map +7 -1
- package/build/components/inserter/media-tab/media-panel.js +72 -52
- package/build/components/inserter/media-tab/media-panel.js.map +7 -1
- package/build/components/inserter/media-tab/media-preview.js +266 -238
- package/build/components/inserter/media-tab/media-preview.js.map +7 -1
- package/build/components/inserter/media-tab/media-tab.js +108 -84
- package/build/components/inserter/media-tab/media-tab.js.map +7 -1
- package/build/components/inserter/media-tab/utils.js +47 -45
- package/build/components/inserter/media-tab/utils.js.map +7 -1
- package/build/components/inserter/menu.js +317 -221
- package/build/components/inserter/menu.js.map +7 -1
- package/build/components/inserter/mobile-tab-navigation.js +82 -76
- package/build/components/inserter/mobile-tab-navigation.js.map +7 -1
- package/build/components/inserter/no-results.js +26 -18
- package/build/components/inserter/no-results.js.map +7 -1
- package/build/components/inserter/panel.js +33 -31
- package/build/components/inserter/panel.js.map +7 -1
- package/build/components/inserter/preview-panel.js +71 -64
- package/build/components/inserter/preview-panel.js.map +7 -1
- package/build/components/inserter/quick-inserter.js +114 -88
- package/build/components/inserter/quick-inserter.js.map +7 -1
- package/build/components/inserter/search-items.js +90 -114
- package/build/components/inserter/search-items.js.map +7 -1
- package/build/components/inserter/search-results.js +171 -115
- package/build/components/inserter/search-results.js.map +7 -1
- package/build/components/inserter/tips.js +55 -28
- package/build/components/inserter/tips.js.map +7 -1
- package/build/components/inserter-button/sparkles.js +30 -19
- package/build/components/inserter-button/sparkles.js.map +7 -1
- package/build/components/inserter-draggable-blocks/index.js +87 -75
- package/build/components/inserter-draggable-blocks/index.js.map +7 -1
- package/build/components/inserter-list-item/index.js +135 -100
- package/build/components/inserter-list-item/index.js.map +7 -1
- package/build/components/inserter-listbox/context.js +26 -13
- package/build/components/inserter-listbox/context.js.map +7 -1
- package/build/components/inserter-listbox/group.js +52 -32
- package/build/components/inserter-listbox/group.js.map +7 -1
- package/build/components/inserter-listbox/index.js +59 -52
- package/build/components/inserter-listbox/index.js.map +7 -1
- package/build/components/inserter-listbox/item.js +47 -47
- package/build/components/inserter-listbox/item.js.map +7 -1
- package/build/components/inserter-listbox/row.js +27 -18
- package/build/components/inserter-listbox/row.js.map +7 -1
- package/build/components/inserter-menu-extension/index.js +27 -15
- package/build/components/inserter-menu-extension/index.js.map +7 -1
- package/build/components/inspector-controls/block-support-slot-container.js +37 -28
- package/build/components/inspector-controls/block-support-slot-container.js.map +7 -1
- package/build/components/inspector-controls/block-support-tools-panel.js +74 -65
- package/build/components/inspector-controls/block-support-tools-panel.js.map +7 -1
- package/build/components/inspector-controls/fill.js +71 -74
- package/build/components/inspector-controls/fill.js.map +7 -1
- package/build/components/inspector-controls/groups.js +51 -24
- package/build/components/inspector-controls/groups.js.map +7 -1
- package/build/components/inspector-controls/index.js +48 -34
- package/build/components/inspector-controls/index.js.map +7 -1
- package/build/components/inspector-controls/slot.js +60 -46
- package/build/components/inspector-controls/slot.js.map +7 -1
- package/build/components/inspector-controls-tabs/advanced-controls-panel.js +56 -30
- package/build/components/inspector-controls-tabs/advanced-controls-panel.js.map +7 -1
- package/build/components/inspector-controls-tabs/content-tab.js +39 -28
- package/build/components/inspector-controls-tabs/content-tab.js.map +7 -1
- package/build/components/inspector-controls-tabs/index.js +86 -97
- package/build/components/inspector-controls-tabs/index.js.map +7 -1
- package/build/components/inspector-controls-tabs/position-controls-panel.js +90 -73
- package/build/components/inspector-controls-tabs/position-controls-panel.js.map +7 -1
- package/build/components/inspector-controls-tabs/settings-tab.js +43 -24
- package/build/components/inspector-controls-tabs/settings-tab.js.map +7 -1
- package/build/components/inspector-controls-tabs/styles-tab.js +83 -56
- package/build/components/inspector-controls-tabs/styles-tab.js.map +7 -1
- package/build/components/inspector-controls-tabs/use-inspector-controls-tabs.js +67 -51
- package/build/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +7 -1
- package/build/components/inspector-controls-tabs/use-is-list-view-tab-disabled.js +30 -11
- package/build/components/inspector-controls-tabs/use-is-list-view-tab-disabled.js.map +7 -1
- package/build/components/inspector-controls-tabs/utils.js +54 -31
- package/build/components/inspector-controls-tabs/utils.js.map +7 -1
- package/build/components/inspector-popover-header/index.js +64 -46
- package/build/components/inspector-popover-header/index.js.map +7 -1
- package/build/components/justify-content-control/index.js +44 -28
- package/build/components/justify-content-control/index.js.map +7 -1
- package/build/components/justify-content-control/ui.js +86 -67
- package/build/components/justify-content-control/ui.js.map +7 -1
- package/build/components/keyboard-shortcuts/index.js +136 -107
- package/build/components/keyboard-shortcuts/index.js.map +7 -1
- package/build/components/letter-spacing-control/index.js +65 -55
- package/build/components/letter-spacing-control/index.js.map +7 -1
- package/build/components/line-height-control/index.js +75 -84
- package/build/components/line-height-control/index.js.map +7 -1
- package/build/components/line-height-control/utils.js +39 -33
- package/build/components/line-height-control/utils.js.map +7 -1
- package/build/components/link-control/constants.js +56 -23
- package/build/components/link-control/constants.js.map +7 -1
- package/build/components/link-control/index.js +336 -323
- package/build/components/link-control/index.js.map +7 -1
- package/build/components/link-control/is-url-like.js +31 -42
- package/build/components/link-control/is-url-like.js.map +7 -1
- package/build/components/link-control/link-preview.js +147 -140
- package/build/components/link-control/link-preview.js.map +7 -1
- package/build/components/link-control/search-create-button.js +53 -29
- package/build/components/link-control/search-create-button.js.map +7 -1
- package/build/components/link-control/search-input.js +154 -140
- package/build/components/link-control/search-input.js.map +7 -1
- package/build/components/link-control/search-item.js +108 -93
- package/build/components/link-control/search-item.js.map +7 -1
- package/build/components/link-control/search-results.js +100 -73
- package/build/components/link-control/search-results.js.map +7 -1
- package/build/components/link-control/settings-drawer.js +56 -51
- package/build/components/link-control/settings-drawer.js.map +7 -1
- package/build/components/link-control/settings.js +66 -35
- package/build/components/link-control/settings.js.map +7 -1
- package/build/components/link-control/use-create-page.js +44 -42
- package/build/components/link-control/use-create-page.js.map +7 -1
- package/build/components/link-control/use-internal-value.js +56 -35
- package/build/components/link-control/use-internal-value.js.map +7 -1
- package/build/components/link-control/use-rich-url-data.js +38 -38
- package/build/components/link-control/use-rich-url-data.js.map +7 -1
- package/build/components/link-control/use-search-handler.js +97 -87
- package/build/components/link-control/use-search-handler.js.map +7 -1
- package/build/components/link-control/viewer-slot.js +34 -17
- package/build/components/link-control/viewer-slot.js.map +7 -1
- package/build/components/list-view/appender.js +118 -98
- package/build/components/list-view/appender.js.map +7 -1
- package/build/components/list-view/aria-referenced-text.js +28 -32
- package/build/components/list-view/aria-referenced-text.js.map +7 -1
- package/build/components/list-view/block-contents.js +93 -78
- package/build/components/list-view/block-contents.js.map +7 -1
- package/build/components/list-view/block-select-button.js +146 -145
- package/build/components/list-view/block-select-button.js.map +7 -1
- package/build/components/list-view/block.js +386 -386
- package/build/components/list-view/block.js.map +7 -1
- package/build/components/list-view/branch.js +154 -147
- package/build/components/list-view/branch.js.map +7 -1
- package/build/components/list-view/context.js +32 -14
- package/build/components/list-view/context.js.map +7 -1
- package/build/components/list-view/drop-indicator.js +168 -172
- package/build/components/list-view/drop-indicator.js.map +7 -1
- package/build/components/list-view/expander.js +36 -27
- package/build/components/list-view/expander.js.map +7 -1
- package/build/components/list-view/index.js +279 -270
- package/build/components/list-view/index.js.map +7 -1
- package/build/components/list-view/leaf.js +74 -55
- package/build/components/list-view/leaf.js.map +7 -1
- package/build/components/list-view/use-block-selection.js +116 -108
- package/build/components/list-view/use-block-selection.js.map +7 -1
- package/build/components/list-view/use-clipboard-handler.js +71 -78
- package/build/components/list-view/use-clipboard-handler.js.map +7 -1
- package/build/components/list-view/use-list-view-block-indexes.js +26 -13
- package/build/components/list-view/use-list-view-block-indexes.js.map +7 -1
- package/build/components/list-view/use-list-view-client-ids.js +41 -32
- package/build/components/list-view/use-list-view-client-ids.js.map +7 -1
- package/build/components/list-view/use-list-view-collapse-items.js +32 -33
- package/build/components/list-view/use-list-view-collapse-items.js.map +7 -1
- package/build/components/list-view/use-list-view-drop-zone.js +189 -303
- package/build/components/list-view/use-list-view-drop-zone.js.map +7 -1
- package/build/components/list-view/use-list-view-expand-selected-item.js +46 -38
- package/build/components/list-view/use-list-view-expand-selected-item.js.map +7 -1
- package/build/components/list-view/use-list-view-images.js +44 -64
- package/build/components/list-view/use-list-view-images.js.map +7 -1
- package/build/components/list-view/use-list-view-scroll-into-view.js +27 -26
- package/build/components/list-view/use-list-view-scroll-into-view.js.map +7 -1
- package/build/components/list-view/utils.js +72 -120
- package/build/components/list-view/utils.js.map +7 -1
- package/build/components/media-placeholder/index.js +352 -298
- package/build/components/media-placeholder/index.js.map +7 -1
- package/build/components/media-replace-flow/index.js +181 -160
- package/build/components/media-replace-flow/index.js.map +7 -1
- package/build/components/media-upload/check.js +33 -29
- package/build/components/media-upload/check.js.map +7 -1
- package/build/components/media-upload/index.js +24 -22
- package/build/components/media-upload/index.js.map +7 -1
- package/build/components/media-upload-progress/constants.js +42 -11
- package/build/components/media-upload-progress/constants.js.map +7 -1
- package/build/components/multi-selection-inspector/index.js +59 -35
- package/build/components/multi-selection-inspector/index.js.map +7 -1
- package/build/components/navigable-toolbar/index.js +98 -103
- package/build/components/navigable-toolbar/index.js.map +7 -1
- package/build/components/observe-typing/index.js +142 -211
- package/build/components/observe-typing/index.js.map +7 -1
- package/build/components/panel-color-settings/index.js +47 -29
- package/build/components/panel-color-settings/index.js.map +7 -1
- package/build/components/plain-text/index.js +50 -79
- package/build/components/plain-text/index.js.map +7 -1
- package/build/components/preview-options/index.js +35 -13
- package/build/components/preview-options/index.js.map +7 -1
- package/build/components/provider/block-refs-provider.js +36 -27
- package/build/components/provider/block-refs-provider.js.map +7 -1
- package/build/components/provider/index.js +111 -97
- package/build/components/provider/index.js.map +7 -1
- package/build/components/provider/use-block-sync.js +57 -153
- package/build/components/provider/use-block-sync.js.map +7 -1
- package/build/components/provider/use-media-upload-settings.js +33 -24
- package/build/components/provider/use-media-upload-settings.js.map +7 -1
- package/build/components/provider/with-registry-provider.js +47 -43
- package/build/components/provider/with-registry-provider.js.map +7 -1
- package/build/components/publish-date-time-picker/index.js +76 -48
- package/build/components/publish-date-time-picker/index.js.map +7 -1
- package/build/components/recursion-provider/index.js +68 -93
- package/build/components/recursion-provider/index.js.map +7 -1
- package/build/components/resizable-box-popover/index.js +44 -25
- package/build/components/resizable-box-popover/index.js.map +7 -1
- package/build/components/resolution-tool/index.js +67 -43
- package/build/components/resolution-tool/index.js.map +7 -1
- package/build/components/responsive-block-control/index.js +114 -72
- package/build/components/responsive-block-control/index.js.map +7 -1
- package/build/components/responsive-block-control/label.js +40 -26
- package/build/components/responsive-block-control/label.js.map +7 -1
- package/build/components/rich-text/content.js +56 -48
- package/build/components/rich-text/content.js.map +7 -1
- package/build/components/rich-text/event-listeners/before-input-rules.js +45 -61
- package/build/components/rich-text/event-listeners/before-input-rules.js.map +7 -1
- package/build/components/rich-text/event-listeners/delete.js +34 -39
- package/build/components/rich-text/event-listeners/delete.js.map +7 -1
- package/build/components/rich-text/event-listeners/enter.js +43 -46
- package/build/components/rich-text/event-listeners/enter.js.map +7 -1
- package/build/components/rich-text/event-listeners/firefox-compat.js +31 -24
- package/build/components/rich-text/event-listeners/firefox-compat.js.map +7 -1
- package/build/components/rich-text/event-listeners/index.js +80 -40
- package/build/components/rich-text/event-listeners/index.js.map +7 -1
- package/build/components/rich-text/event-listeners/input-events.js +26 -12
- package/build/components/rich-text/event-listeners/input-events.js.map +7 -1
- package/build/components/rich-text/event-listeners/input-rules.js +68 -74
- package/build/components/rich-text/event-listeners/input-rules.js.map +7 -1
- package/build/components/rich-text/event-listeners/insert-replacement-text.js +29 -24
- package/build/components/rich-text/event-listeners/insert-replacement-text.js.map +7 -1
- package/build/components/rich-text/event-listeners/paste-handler.js +59 -72
- package/build/components/rich-text/event-listeners/paste-handler.js.map +7 -1
- package/build/components/rich-text/event-listeners/remove-browser-shortcuts.js +27 -18
- package/build/components/rich-text/event-listeners/remove-browser-shortcuts.js.map +7 -1
- package/build/components/rich-text/event-listeners/shortcuts.js +26 -12
- package/build/components/rich-text/event-listeners/shortcuts.js.map +7 -1
- package/build/components/rich-text/event-listeners/undo-automatic-change.js +32 -31
- package/build/components/rich-text/event-listeners/undo-automatic-change.js.map +7 -1
- package/build/components/rich-text/format-edit.js +72 -57
- package/build/components/rich-text/format-edit.js.map +7 -1
- package/build/components/rich-text/format-toolbar/index.js +79 -61
- package/build/components/rich-text/format-toolbar/index.js.map +7 -1
- package/build/components/rich-text/format-toolbar-container.js +61 -52
- package/build/components/rich-text/format-toolbar-container.js.map +7 -1
- package/build/components/rich-text/get-rich-text-values.js +75 -54
- package/build/components/rich-text/get-rich-text-values.js.map +7 -1
- package/build/components/rich-text/index.js +340 -342
- package/build/components/rich-text/index.js.map +7 -1
- package/build/components/rich-text/input-event.js +32 -22
- package/build/components/rich-text/input-event.js.map +7 -1
- package/build/components/rich-text/multiline.js +104 -76
- package/build/components/rich-text/multiline.js.map +7 -1
- package/build/components/rich-text/native/format-edit.js +44 -30
- package/build/components/rich-text/native/format-edit.js.map +7 -1
- package/build/components/rich-text/native/index.js +24 -7
- package/build/components/rich-text/native/index.js.map +7 -1
- package/build/components/rich-text/native/use-format-types.js +89 -63
- package/build/components/rich-text/native/use-format-types.js.map +7 -1
- package/build/components/rich-text/prevent-event-discovery.js +31 -17
- package/build/components/rich-text/prevent-event-discovery.js.map +7 -1
- package/build/components/rich-text/shortcut.js +34 -25
- package/build/components/rich-text/shortcut.js.map +7 -1
- package/build/components/rich-text/toolbar-button.js +32 -21
- package/build/components/rich-text/toolbar-button.js.map +7 -1
- package/build/components/rich-text/use-format-types.js +127 -90
- package/build/components/rich-text/use-format-types.js.map +7 -1
- package/build/components/rich-text/use-mark-persistent.js +34 -32
- package/build/components/rich-text/use-mark-persistent.js.map +7 -1
- package/build/components/rich-text/utils.js +46 -45
- package/build/components/rich-text/utils.js.map +7 -1
- package/build/components/rich-text/with-deprecations.js +64 -37
- package/build/components/rich-text/with-deprecations.js.map +7 -1
- package/build/components/selection-scroll-into-view/index.js +40 -20
- package/build/components/selection-scroll-into-view/index.js.map +7 -1
- package/build/components/skip-to-selected-block/index.js +46 -33
- package/build/components/skip-to-selected-block/index.js.map +7 -1
- package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js +56 -39
- package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +7 -1
- package/build/components/spacing-sizes-control/index.js +91 -113
- package/build/components/spacing-sizes-control/index.js.map +7 -1
- package/build/components/spacing-sizes-control/input-controls/axial.js +61 -38
- package/build/components/spacing-sizes-control/input-controls/axial.js.map +7 -1
- package/build/components/spacing-sizes-control/input-controls/separated.js +57 -32
- package/build/components/spacing-sizes-control/input-controls/separated.js.map +7 -1
- package/build/components/spacing-sizes-control/input-controls/single.js +56 -29
- package/build/components/spacing-sizes-control/input-controls/single.js.map +7 -1
- package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js +239 -276
- package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +7 -1
- package/build/components/spacing-sizes-control/linked-button.js +38 -25
- package/build/components/spacing-sizes-control/linked-button.js.map +7 -1
- package/build/components/spacing-sizes-control/utils.js +112 -180
- package/build/components/spacing-sizes-control/utils.js.map +7 -1
- package/build/components/tabbed-sidebar/index.js +77 -99
- package/build/components/tabbed-sidebar/index.js.map +7 -1
- package/build/components/text-alignment-control/index.js +95 -69
- package/build/components/text-alignment-control/index.js.map +7 -1
- package/build/components/text-decoration-control/index.js +82 -61
- package/build/components/text-decoration-control/index.js.map +7 -1
- package/build/components/text-transform-control/index.js +88 -70
- package/build/components/text-transform-control/index.js.map +7 -1
- package/build/components/typewriter/index.js +173 -211
- package/build/components/typewriter/index.js.map +7 -1
- package/build/components/unit-control/index.js +30 -27
- package/build/components/unit-control/index.js.map +7 -1
- package/build/components/url-input/button.js +93 -74
- package/build/components/url-input/button.js.map +7 -1
- package/build/components/url-input/index.js +211 -247
- package/build/components/url-input/index.js.map +7 -1
- package/build/components/url-popover/image-url-input-ui.js +253 -202
- package/build/components/url-popover/image-url-input-ui.js.map +7 -1
- package/build/components/url-popover/index.js +113 -101
- package/build/components/url-popover/index.js.map +7 -1
- package/build/components/url-popover/link-editor.js +67 -38
- package/build/components/url-popover/link-editor.js.map +7 -1
- package/build/components/url-popover/link-viewer-url.js +43 -32
- package/build/components/url-popover/link-viewer-url.js.map +7 -1
- package/build/components/url-popover/link-viewer.js +67 -38
- package/build/components/url-popover/link-viewer.js.map +7 -1
- package/build/components/use-block-commands/index.js +181 -151
- package/build/components/use-block-commands/index.js.map +7 -1
- package/build/components/use-block-display-information/index.js +74 -105
- package/build/components/use-block-display-information/index.js.map +7 -1
- package/build/components/use-block-drop-zone/index.js +303 -313
- package/build/components/use-block-drop-zone/index.js.map +7 -1
- package/build/components/use-flash-editable-blocks/index.js +66 -52
- package/build/components/use-flash-editable-blocks/index.js.map +7 -1
- package/build/components/use-moving-animation/index.js +66 -111
- package/build/components/use-moving-animation/index.js.map +7 -1
- package/build/components/use-on-block-drop/index.js +201 -180
- package/build/components/use-on-block-drop/index.js.map +7 -1
- package/build/components/use-on-block-drop/types.js +16 -5
- package/build/components/use-on-block-drop/types.js.map +7 -1
- package/build/components/use-paste-styles/index.js +144 -142
- package/build/components/use-paste-styles/index.js.map +7 -1
- package/build/components/use-resize-canvas/index.js +38 -32
- package/build/components/use-resize-canvas/index.js.map +7 -1
- package/build/components/use-settings/index.js +55 -57
- package/build/components/use-settings/index.js.map +7 -1
- package/build/components/warning/index.js +73 -65
- package/build/components/warning/index.js.map +7 -1
- package/build/components/writing-flow/index.js +111 -72
- package/build/components/writing-flow/index.js.map +7 -1
- package/build/components/writing-flow/use-arrow-nav.js +115 -153
- package/build/components/writing-flow/use-arrow-nav.js.map +7 -1
- package/build/components/writing-flow/use-click-selection.js +55 -55
- package/build/components/writing-flow/use-click-selection.js.map +7 -1
- package/build/components/writing-flow/use-clipboard-handler.js +83 -87
- package/build/components/writing-flow/use-clipboard-handler.js.map +7 -1
- package/build/components/writing-flow/use-drag-selection.js +99 -149
- package/build/components/writing-flow/use-drag-selection.js.map +7 -1
- package/build/components/writing-flow/use-input.js +72 -62
- package/build/components/writing-flow/use-input.js.map +7 -1
- package/build/components/writing-flow/use-multi-selection.js +57 -61
- package/build/components/writing-flow/use-multi-selection.js.map +7 -1
- package/build/components/writing-flow/use-select-all.js +39 -37
- package/build/components/writing-flow/use-select-all.js.map +7 -1
- package/build/components/writing-flow/use-selection-observer.js +136 -188
- package/build/components/writing-flow/use-selection-observer.js.map +7 -1
- package/build/components/writing-flow/use-tab-nav.js +97 -147
- package/build/components/writing-flow/use-tab-nav.js.map +7 -1
- package/build/components/writing-flow/utils.js +59 -71
- package/build/components/writing-flow/utils.js.map +7 -1
- package/build/components/writing-mode-control/index.js +75 -62
- package/build/components/writing-mode-control/index.js.map +7 -1
- package/build/elements/index.js +30 -10
- package/build/elements/index.js.map +7 -1
- package/build/hooks/align.js +102 -133
- package/build/hooks/align.js.map +7 -1
- package/build/hooks/allowed-blocks.js +84 -0
- package/build/hooks/allowed-blocks.js.map +7 -0
- package/build/hooks/anchor.js +81 -88
- package/build/hooks/anchor.js.map +7 -1
- package/build/hooks/aria-label.js +43 -43
- package/build/hooks/aria-label.js.map +7 -1
- package/build/hooks/background.js +112 -112
- package/build/hooks/background.js.map +7 -1
- package/build/hooks/block-bindings.js +394 -253
- package/build/hooks/block-bindings.js.map +7 -1
- package/build/hooks/block-hooks.js +171 -163
- package/build/hooks/block-hooks.js.map +7 -1
- package/build/hooks/block-renaming.js +41 -32
- package/build/hooks/block-renaming.js.map +7 -1
- package/build/hooks/block-style-variation.js +152 -180
- package/build/hooks/block-style-variation.js.map +7 -1
- package/build/hooks/border.js +183 -254
- package/build/hooks/border.js.map +7 -1
- package/build/hooks/color.js +216 -195
- package/build/hooks/color.js.map +7 -1
- package/build/hooks/compat.js +10 -13
- package/build/hooks/compat.js.map +7 -1
- package/build/hooks/content-lock-ui.js +51 -58
- package/build/hooks/content-lock-ui.js.map +7 -1
- package/build/hooks/contrast-checker.js +67 -46
- package/build/hooks/contrast-checker.js.map +7 -1
- package/build/hooks/custom-class-name.js +84 -87
- package/build/hooks/custom-class-name.js.map +7 -1
- package/build/hooks/dimensions.js +153 -141
- package/build/hooks/dimensions.js.map +7 -1
- package/build/hooks/duotone.js +173 -194
- package/build/hooks/duotone.js.map +7 -1
- package/build/hooks/fit-text.js +206 -0
- package/build/hooks/fit-text.js.map +7 -0
- package/build/hooks/font-family.js +70 -78
- package/build/hooks/font-family.js.map +7 -1
- package/build/hooks/font-size.js +134 -127
- package/build/hooks/font-size.js.map +7 -1
- package/build/hooks/gap.js +33 -31
- package/build/hooks/gap.js.map +7 -1
- package/build/hooks/generated-class-name.js +42 -32
- package/build/hooks/generated-class-name.js.map +7 -1
- package/build/hooks/grid-visualizer.js +51 -60
- package/build/hooks/grid-visualizer.js.map +7 -1
- package/build/hooks/index.js +157 -147
- package/build/hooks/index.js.map +7 -1
- package/build/hooks/layout-child.js +128 -141
- package/build/hooks/layout-child.js.map +7 -1
- package/build/hooks/layout.js +260 -295
- package/build/hooks/layout.js.map +7 -1
- package/build/hooks/line-height.js +61 -55
- package/build/hooks/line-height.js.map +7 -1
- package/build/hooks/lock.js +30 -23
- package/build/hooks/lock.js.map +7 -1
- package/build/hooks/metadata.js +34 -23
- package/build/hooks/metadata.js.map +7 -1
- package/build/hooks/position.js +169 -240
- package/build/hooks/position.js.map +7 -1
- package/build/hooks/settings.js +10 -13
- package/build/hooks/settings.js.map +7 -1
- package/build/hooks/spacing-visualizer.js +108 -88
- package/build/hooks/spacing-visualizer.js.map +7 -1
- package/build/hooks/style.js +157 -281
- package/build/hooks/style.js.map +7 -1
- package/build/hooks/supports.js +145 -288
- package/build/hooks/supports.js.map +7 -1
- package/build/hooks/text-align.js +110 -101
- package/build/hooks/text-align.js.map +7 -1
- package/build/hooks/typography.js +139 -107
- package/build/hooks/typography.js.map +7 -1
- package/build/hooks/use-border-props.js +47 -52
- package/build/hooks/use-border-props.js.map +7 -1
- package/build/hooks/use-cached-truthy.js +29 -18
- package/build/hooks/use-cached-truthy.js.map +7 -1
- package/build/hooks/use-color-props.js +101 -89
- package/build/hooks/use-color-props.js.map +7 -1
- package/build/hooks/use-shadow-props.js +29 -25
- package/build/hooks/use-shadow-props.js.map +7 -1
- package/build/hooks/use-spacing-props.js +29 -30
- package/build/hooks/use-spacing-props.js.map +7 -1
- package/build/hooks/use-typography-props.js +55 -51
- package/build/hooks/use-typography-props.js.map +7 -1
- package/build/hooks/use-zoom-out.js +40 -56
- package/build/hooks/use-zoom-out.js.map +7 -1
- package/build/hooks/utils.js +421 -251
- package/build/hooks/utils.js.map +7 -1
- package/build/index.js +65 -150
- package/build/index.js.map +7 -1
- package/build/layouts/constrained.js +211 -211
- package/build/layouts/constrained.js.map +7 -1
- package/build/layouts/definitions.js +188 -144
- package/build/layouts/definitions.js.map +7 -1
- package/build/layouts/flex.js +250 -239
- package/build/layouts/flex.js.map +7 -1
- package/build/layouts/flow.js +59 -61
- package/build/layouts/flow.js.map +7 -1
- package/build/layouts/grid.js +247 -249
- package/build/layouts/grid.js.map +7 -1
- package/build/layouts/index.js +45 -31
- package/build/layouts/index.js.map +7 -1
- package/build/layouts/utils.js +51 -70
- package/build/layouts/utils.js.map +7 -1
- package/build/lock-unlock.js +31 -14
- package/build/lock-unlock.js.map +7 -1
- package/build/private-apis.js +119 -97
- package/build/private-apis.js.map +7 -1
- package/build/store/actions.js +620 -1283
- package/build/store/actions.js.map +7 -1
- package/build/store/array.js +38 -28
- package/build/store/array.js.map +7 -1
- package/build/store/constants.js +27 -6
- package/build/store/constants.js.map +7 -1
- package/build/store/defaults.js +191 -202
- package/build/store/defaults.js.map +7 -1
- package/build/store/get-block-settings.js +105 -96
- package/build/store/get-block-settings.js.map +7 -1
- package/build/store/index.js +56 -56
- package/build/store/index.js.map +7 -1
- package/build/store/private-actions.js +158 -323
- package/build/store/private-actions.js.map +7 -1
- package/build/store/private-keys.js +45 -12
- package/build/store/private-keys.js.map +7 -1
- package/build/store/private-selectors.js +298 -468
- package/build/store/private-selectors.js.map +7 -1
- package/build/store/reducer.js +1142 -1819
- package/build/store/reducer.js.map +7 -1
- package/build/store/selectors.js +1191 -2198
- package/build/store/selectors.js.map +7 -1
- package/build/store/utils.js +87 -54
- package/build/store/utils.js.map +7 -1
- package/build/utils/block-bindings.js +46 -179
- package/build/utils/block-bindings.js.map +7 -1
- package/build/utils/dom.js +58 -105
- package/build/utils/dom.js.map +7 -1
- package/build/utils/fit-text-frontend.js +41 -0
- package/build/utils/fit-text-frontend.js.map +7 -0
- package/build/utils/fit-text-utils.js +63 -0
- package/build/utils/fit-text-utils.js.map +7 -0
- package/build/utils/format-font-style.js +35 -27
- package/build/utils/format-font-style.js.map +7 -1
- package/build/utils/format-font-weight.js +51 -43
- package/build/utils/format-font-weight.js.map +7 -1
- package/build/utils/get-editor-region.js +27 -25
- package/build/utils/get-editor-region.js.map +7 -1
- package/build/utils/get-font-styles-and-weights.js +113 -107
- package/build/utils/get-font-styles-and-weights.js.map +7 -1
- package/build/utils/get-px-from-css-unit.js +23 -14
- package/build/utils/get-px-from-css-unit.js.map +7 -1
- package/build/utils/index.js +41 -24
- package/build/utils/index.js.map +7 -1
- package/build/utils/math.js +40 -82
- package/build/utils/math.js.map +7 -1
- package/build/utils/object.js +37 -57
- package/build/utils/object.js.map +7 -1
- package/build/utils/order-inserter-block-items.js +27 -22
- package/build/utils/order-inserter-block-items.js.map +7 -1
- package/build/utils/pasting.js +41 -85
- package/build/utils/pasting.js.map +7 -1
- package/build/utils/selection.js +35 -29
- package/build/utils/selection.js.map +7 -1
- package/build/utils/sorting.js +32 -33
- package/build/utils/sorting.js.map +7 -1
- package/build/utils/transform-styles/index.js +101 -145
- package/build/utils/transform-styles/index.js.map +7 -1
- package/build/utils/use-notify-copy.js +81 -55
- package/build/utils/use-notify-copy.js.map +7 -1
- package/build-module/autocompleters/block.js +92 -79
- package/build-module/autocompleters/block.js.map +7 -1
- package/build-module/autocompleters/link.js +29 -41
- package/build-module/autocompleters/link.js.map +7 -1
- package/build-module/components/alignment-control/index.js +11 -21
- package/build-module/components/alignment-control/index.js.map +7 -1
- package/build-module/components/alignment-control/ui.js +52 -47
- package/build-module/components/alignment-control/ui.js.map +7 -1
- package/build-module/components/autocomplete/index.js +31 -53
- package/build-module/components/autocomplete/index.js.map +7 -1
- package/build-module/components/background-image-control/index.js +471 -432
- package/build-module/components/background-image-control/index.js.map +7 -1
- package/build-module/components/block-actions/index.js +51 -55
- package/build-module/components/block-actions/index.js.map +7 -1
- package/build-module/components/block-alignment-control/constants.js +22 -14
- package/build-module/components/block-alignment-control/constants.js.map +7 -1
- package/build-module/components/block-alignment-control/index.js +11 -21
- package/build-module/components/block-alignment-control/index.js.map +7 -1
- package/build-module/components/block-alignment-control/ui.js +47 -60
- package/build-module/components/block-alignment-control/ui.js.map +7 -1
- package/build-module/components/block-alignment-control/use-available-alignments.js +41 -48
- package/build-module/components/block-alignment-control/use-available-alignments.js.map +7 -1
- package/build-module/components/block-alignment-matrix-control/index.js +52 -77
- package/build-module/components/block-alignment-matrix-control/index.js.map +7 -1
- package/build-module/components/block-allowed-blocks/allowed-blocks-control.js +69 -0
- package/build-module/components/block-allowed-blocks/allowed-blocks-control.js.map +7 -0
- package/build-module/components/block-allowed-blocks/index.js +7 -0
- package/build-module/components/block-allowed-blocks/index.js.map +7 -0
- package/build-module/components/block-allowed-blocks/modal.js +101 -0
- package/build-module/components/block-allowed-blocks/modal.js.map +7 -0
- package/build-module/components/block-breadcrumb/index.js +94 -96
- package/build-module/components/block-breadcrumb/index.js.map +7 -1
- package/build-module/components/block-canvas/index.js +85 -113
- package/build-module/components/block-canvas/index.js.map +7 -1
- package/build-module/components/block-card/index.js +67 -115
- package/build-module/components/block-card/index.js.map +7 -1
- package/build-module/components/block-compare/block-view.js +21 -31
- package/build-module/components/block-compare/block-view.js.map +7 -1
- package/build-module/components/block-compare/index.js +44 -52
- package/build-module/components/block-compare/index.js.map +7 -1
- package/build-module/components/block-content-overlay/index.js +14 -17
- package/build-module/components/block-content-overlay/index.js.map +7 -1
- package/build-module/components/block-context/index.js +15 -40
- package/build-module/components/block-context/index.js.map +7 -1
- package/build-module/components/block-controls/fill.js +27 -35
- package/build-module/components/block-controls/fill.js.map +7 -1
- package/build-module/components/block-controls/groups.js +11 -11
- package/build-module/components/block-controls/groups.js.map +7 -1
- package/build-module/components/block-controls/hook.js +11 -11
- package/build-module/components/block-controls/hook.js.map +7 -1
- package/build-module/components/block-controls/index.js +13 -20
- package/build-module/components/block-controls/index.js.map +7 -1
- package/build-module/components/block-controls/slot.js +31 -41
- package/build-module/components/block-controls/slot.js.map +7 -1
- package/build-module/components/block-draggable/draggable-chip.js +32 -39
- package/build-module/components/block-draggable/draggable-chip.js.map +7 -1
- package/build-module/components/block-draggable/index.js +131 -134
- package/build-module/components/block-draggable/index.js.map +7 -1
- package/build-module/components/block-draggable/use-scroll-when-dragging.js +36 -38
- package/build-module/components/block-draggable/use-scroll-when-dragging.js.map +7 -1
- package/build-module/components/block-edit/context.js +22 -24
- package/build-module/components/block-edit/context.js.map +7 -1
- package/build-module/components/block-edit/edit.js +211 -185
- package/build-module/components/block-edit/edit.js.map +7 -1
- package/build-module/components/block-edit/index.js +70 -64
- package/build-module/components/block-edit/index.js.map +7 -1
- package/build-module/components/block-edit/multiple-usage-warning.js +47 -35
- package/build-module/components/block-edit/multiple-usage-warning.js.map +7 -1
- package/build-module/components/block-edit-visually-button/index.js +22 -27
- package/build-module/components/block-edit-visually-button/index.js.map +7 -1
- package/build-module/components/block-editing-mode/index.js +21 -58
- package/build-module/components/block-editing-mode/index.js.map +7 -1
- package/build-module/components/block-full-height-alignment-control/index.js +20 -17
- package/build-module/components/block-full-height-alignment-control/index.js.map +7 -1
- package/build-module/components/block-heading-level-dropdown/heading-level-icon.js +17 -31
- package/build-module/components/block-heading-level-dropdown/heading-level-icon.js.map +7 -1
- package/build-module/components/block-heading-level-dropdown/index.js +37 -60
- package/build-module/components/block-heading-level-dropdown/index.js.map +7 -1
- package/build-module/components/block-icon/index.js +23 -36
- package/build-module/components/block-icon/index.js.map +7 -1
- package/build-module/components/block-inspector/edit-contents-button.js +35 -43
- package/build-module/components/block-inspector/edit-contents-button.js.map +7 -1
- package/build-module/components/block-inspector/index.js +208 -189
- package/build-module/components/block-inspector/index.js.map +7 -1
- package/build-module/components/block-inspector/useBlockInspectorAnimationSettings.js +27 -34
- package/build-module/components/block-inspector/useBlockInspectorAnimationSettings.js.map +7 -1
- package/build-module/components/block-list/block-crash-boundary.js +6 -6
- package/build-module/components/block-list/block-crash-boundary.js.map +7 -1
- package/build-module/components/block-list/block-crash-warning.js +9 -16
- package/build-module/components/block-list/block-crash-warning.js.map +7 -1
- package/build-module/components/block-list/block-html.js +38 -38
- package/build-module/components/block-list/block-html.js.map +7 -1
- package/build-module/components/block-list/block-invalid-warning.js +123 -99
- package/build-module/components/block-list/block-invalid-warning.js.map +7 -1
- package/build-module/components/block-list/block.js +325 -401
- package/build-module/components/block-list/block.js.map +7 -1
- package/build-module/components/block-list/index.js +187 -167
- package/build-module/components/block-list/index.js.map +7 -1
- package/build-module/components/block-list/layout.js +19 -38
- package/build-module/components/block-list/layout.js.map +7 -1
- package/build-module/components/block-list/private-block-context.js +7 -7
- package/build-module/components/block-list/private-block-context.js.map +7 -1
- package/build-module/components/block-list/subdirectory-icon.js +25 -21
- package/build-module/components/block-list/subdirectory-icon.js.map +7 -1
- package/build-module/components/block-list/use-block-props/index.js +84 -139
- package/build-module/components/block-list/use-block-props/index.js.map +7 -1
- package/build-module/components/block-list/use-block-props/use-block-refs.js +26 -54
- package/build-module/components/block-list/use-block-props/use-block-refs.js.map +7 -1
- package/build-module/components/block-list/use-block-props/use-firefox-draggable-compatibility.js +21 -43
- package/build-module/components/block-list/use-block-props/use-firefox-draggable-compatibility.js.map +7 -1
- package/build-module/components/block-list/use-block-props/use-focus-first-element.js +23 -51
- package/build-module/components/block-list/use-block-props/use-focus-first-element.js.map +7 -1
- package/build-module/components/block-list/use-block-props/use-focus-handler.js +33 -62
- package/build-module/components/block-list/use-block-props/use-focus-handler.js.map +7 -1
- package/build-module/components/block-list/use-block-props/use-intersection-observer.js +19 -20
- package/build-module/components/block-list/use-block-props/use-intersection-observer.js.map +7 -1
- package/build-module/components/block-list/use-block-props/use-is-hovered.js +16 -20
- package/build-module/components/block-list/use-block-props/use-is-hovered.js.map +7 -1
- package/build-module/components/block-list/use-block-props/use-scroll-into-view.js +31 -34
- package/build-module/components/block-list/use-block-props/use-scroll-into-view.js.map +7 -1
- package/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.js +182 -167
- package/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +7 -1
- package/build-module/components/block-list/use-in-between-inserter.js +99 -107
- package/build-module/components/block-list/use-in-between-inserter.js.map +7 -1
- package/build-module/components/block-list/zoom-out-separator.js +54 -72
- package/build-module/components/block-list/zoom-out-separator.js.map +7 -1
- package/build-module/components/block-list-appender/index.js +52 -81
- package/build-module/components/block-list-appender/index.js.map +7 -1
- package/build-module/components/block-lock/index.js +11 -5
- package/build-module/components/block-lock/index.js.map +7 -1
- package/build-module/components/block-lock/menu-item.js +31 -36
- package/build-module/components/block-lock/menu-item.js.map +7 -1
- package/build-module/components/block-lock/modal.js +211 -176
- package/build-module/components/block-lock/modal.js.map +7 -1
- package/build-module/components/block-lock/toolbar.js +28 -42
- package/build-module/components/block-lock/toolbar.js.map +7 -1
- package/build-module/components/block-lock/use-block-lock.js +31 -40
- package/build-module/components/block-lock/use-block-lock.js.map +7 -1
- package/build-module/components/block-manager/category.js +82 -58
- package/build-module/components/block-manager/category.js.map +7 -1
- package/build-module/components/block-manager/checklist.js +27 -30
- package/build-module/components/block-manager/checklist.js.map +7 -1
- package/build-module/components/block-manager/index.js +95 -83
- package/build-module/components/block-manager/index.js.map +7 -1
- package/build-module/components/block-mover/button.js +124 -124
- package/build-module/components/block-mover/button.js.map +7 -1
- package/build-module/components/block-mover/index.js +83 -90
- package/build-module/components/block-mover/index.js.map +7 -1
- package/build-module/components/block-mover/mover-description.js +191 -134
- package/build-module/components/block-mover/mover-description.js.map +7 -1
- package/build-module/components/block-navigation/dropdown.js +58 -66
- package/build-module/components/block-navigation/dropdown.js.map +7 -1
- package/build-module/components/block-parent-selector/index.js +41 -51
- package/build-module/components/block-parent-selector/index.js.map +7 -1
- package/build-module/components/block-pattern-setup/constants.js +7 -4
- package/build-module/components/block-pattern-setup/constants.js.map +7 -1
- package/build-module/components/block-pattern-setup/index.js +142 -136
- package/build-module/components/block-pattern-setup/index.js.map +7 -1
- package/build-module/components/block-pattern-setup/setup-toolbar.js +80 -67
- package/build-module/components/block-pattern-setup/setup-toolbar.js.map +7 -1
- package/build-module/components/block-pattern-setup/use-patterns-setup.js +24 -23
- package/build-module/components/block-pattern-setup/use-patterns-setup.js.map +7 -1
- package/build-module/components/block-patterns-list/index.js +160 -152
- package/build-module/components/block-patterns-list/index.js.map +7 -1
- package/build-module/components/block-patterns-paging/index.js +107 -80
- package/build-module/components/block-patterns-paging/index.js.map +7 -1
- package/build-module/components/block-popover/cover.js +31 -35
- package/build-module/components/block-popover/cover.js.map +7 -1
- package/build-module/components/block-popover/drop-zone.js +35 -47
- package/build-module/components/block-popover/drop-zone.js.map +7 -1
- package/build-module/components/block-popover/inbetween.js +90 -118
- package/build-module/components/block-popover/inbetween.js.map +7 -1
- package/build-module/components/block-popover/index.js +84 -83
- package/build-module/components/block-popover/index.js.map +7 -1
- package/build-module/components/block-popover/use-popover-scroll.js +30 -48
- package/build-module/components/block-popover/use-popover-scroll.js.map +7 -1
- package/build-module/components/block-preview/async.js +7 -26
- package/build-module/components/block-preview/async.js.map +7 -1
- package/build-module/components/block-preview/auto.js +84 -96
- package/build-module/components/block-preview/auto.js.map +7 -1
- package/build-module/components/block-preview/index.js +100 -106
- package/build-module/components/block-preview/index.js.map +7 -1
- package/build-module/components/block-quick-navigation/index.js +59 -68
- package/build-module/components/block-quick-navigation/index.js.map +7 -1
- package/build-module/components/block-removal-warning-modal/index.js +56 -48
- package/build-module/components/block-removal-warning-modal/index.js.map +7 -1
- package/build-module/components/block-rename/index.js +9 -4
- package/build-module/components/block-rename/index.js.map +7 -1
- package/build-module/components/block-rename/is-empty-string.js +5 -2
- package/build-module/components/block-rename/is-empty-string.js.map +7 -1
- package/build-module/components/block-rename/modal.js +110 -94
- package/build-module/components/block-rename/modal.js.map +7 -1
- package/build-module/components/block-rename/rename-control.js +30 -29
- package/build-module/components/block-rename/rename-control.js.map +7 -1
- package/build-module/components/block-rename/use-block-rename.js +7 -7
- package/build-module/components/block-rename/use-block-rename.js.map +7 -1
- package/build-module/components/block-selection-clearer/index.js +33 -54
- package/build-module/components/block-selection-clearer/index.js.map +7 -1
- package/build-module/components/block-settings-menu/block-html-convert-button.js +28 -29
- package/build-module/components/block-settings-menu/block-html-convert-button.js.map +7 -1
- package/build-module/components/block-settings-menu/block-mode-toggle.js +38 -48
- package/build-module/components/block-settings-menu/block-mode-toggle.js.map +7 -1
- package/build-module/components/block-settings-menu/block-parent-selector-menu-item.js +30 -35
- package/build-module/components/block-settings-menu/block-parent-selector-menu-item.js.map +7 -1
- package/build-module/components/block-settings-menu/block-settings-dropdown.js +259 -226
- package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +7 -1
- package/build-module/components/block-settings-menu/block-settings-menu-first-item.js +9 -10
- package/build-module/components/block-settings-menu/block-settings-menu-first-item.js.map +7 -1
- package/build-module/components/block-settings-menu/index.js +21 -25
- package/build-module/components/block-settings-menu/index.js.map +7 -1
- package/build-module/components/block-settings-menu-controls/index.js +107 -100
- package/build-module/components/block-settings-menu-controls/index.js.map +7 -1
- package/build-module/components/block-styles/index.js +72 -66
- package/build-module/components/block-styles/index.js.map +7 -1
- package/build-module/components/block-styles/menu-items.js +31 -36
- package/build-module/components/block-styles/menu-items.js.map +7 -1
- package/build-module/components/block-styles/preview-panel.js +12 -18
- package/build-module/components/block-styles/preview-panel.js.map +7 -1
- package/build-module/components/block-styles/use-styles-for-block.js +35 -61
- package/build-module/components/block-styles/use-styles-for-block.js.map +7 -1
- package/build-module/components/block-styles/utils.js +28 -60
- package/build-module/components/block-styles/utils.js.map +7 -1
- package/build-module/components/block-switcher/block-styles-menu.js +18 -27
- package/build-module/components/block-switcher/block-styles-menu.js.map +7 -1
- package/build-module/components/block-switcher/block-transformations-menu.js +109 -119
- package/build-module/components/block-switcher/block-transformations-menu.js.map +7 -1
- package/build-module/components/block-switcher/block-variation-transformations.js +83 -76
- package/build-module/components/block-switcher/block-variation-transformations.js.map +7 -1
- package/build-module/components/block-switcher/index.js +223 -197
- package/build-module/components/block-switcher/index.js.map +7 -1
- package/build-module/components/block-switcher/pattern-transformations-menu.js +105 -91
- package/build-module/components/block-switcher/pattern-transformations-menu.js.map +7 -1
- package/build-module/components/block-switcher/preview-block-popover.js +20 -32
- package/build-module/components/block-switcher/preview-block-popover.js.map +7 -1
- package/build-module/components/block-switcher/use-transformed-patterns.js +41 -76
- package/build-module/components/block-switcher/use-transformed-patterns.js.map +7 -1
- package/build-module/components/block-switcher/utils.js +15 -40
- package/build-module/components/block-switcher/utils.js.map +7 -1
- package/build-module/components/block-title/index.js +7 -34
- package/build-module/components/block-title/index.js.map +7 -1
- package/build-module/components/block-title/use-block-display-title.js +34 -57
- package/build-module/components/block-title/use-block-display-title.js.map +7 -1
- package/build-module/components/block-toolbar/block-name-context.js +8 -8
- package/build-module/components/block-toolbar/block-name-context.js.map +7 -1
- package/build-module/components/block-toolbar/block-toolbar-last-item.js +9 -10
- package/build-module/components/block-toolbar/block-toolbar-last-item.js.map +7 -1
- package/build-module/components/block-toolbar/change-design.js +79 -84
- package/build-module/components/block-toolbar/change-design.js.map +7 -1
- package/build-module/components/block-toolbar/index.js +169 -173
- package/build-module/components/block-toolbar/index.js.map +7 -1
- package/build-module/components/block-toolbar/switch-section-style.js +89 -82
- package/build-module/components/block-toolbar/switch-section-style.js.map +7 -1
- package/build-module/components/block-toolbar/use-has-block-toolbar.js +11 -28
- package/build-module/components/block-toolbar/use-has-block-toolbar.js.map +7 -1
- package/build-module/components/block-toolbar/utils.js +38 -71
- package/build-module/components/block-toolbar/utils.js.map +7 -1
- package/build-module/components/block-tools/block-toolbar-popover.js +43 -60
- package/build-module/components/block-tools/block-toolbar-popover.js.map +7 -1
- package/build-module/components/block-tools/empty-block-inserter.js +35 -33
- package/build-module/components/block-tools/empty-block-inserter.js.map +7 -1
- package/build-module/components/block-tools/index.js +139 -103
- package/build-module/components/block-tools/index.js.map +7 -1
- package/build-module/components/block-tools/insertion-point.js +144 -149
- package/build-module/components/block-tools/insertion-point.js.map +7 -1
- package/build-module/components/block-tools/use-block-toolbar-popover-props.js +55 -90
- package/build-module/components/block-tools/use-block-toolbar-popover-props.js.map +7 -1
- package/build-module/components/block-tools/use-selected-block-tool-props.js +41 -48
- package/build-module/components/block-tools/use-selected-block-tool-props.js.map +7 -1
- package/build-module/components/block-tools/use-show-block-tools.js +12 -27
- package/build-module/components/block-tools/use-show-block-tools.js.map +7 -1
- package/build-module/components/block-tools/zoom-out-mode-inserter-button.js +28 -25
- package/build-module/components/block-tools/zoom-out-mode-inserter-button.js.map +7 -1
- package/build-module/components/block-tools/zoom-out-mode-inserters.js +40 -45
- package/build-module/components/block-tools/zoom-out-mode-inserters.js.map +7 -1
- package/build-module/components/block-types-list/index.js +28 -28
- package/build-module/components/block-types-list/index.js.map +7 -1
- package/build-module/components/block-variation-picker/index.js +57 -51
- package/build-module/components/block-variation-picker/index.js.map +7 -1
- package/build-module/components/block-variation-transforms/index.js +134 -133
- package/build-module/components/block-variation-transforms/index.js.map +7 -1
- package/build-module/components/block-vertical-alignment-control/index.js +11 -21
- package/build-module/components/block-vertical-alignment-control/index.js.map +7 -1
- package/build-module/components/block-vertical-alignment-control/ui.js +44 -38
- package/build-module/components/block-vertical-alignment-control/ui.js.map +7 -1
- package/build-module/components/block-visibility/index.js +7 -3
- package/build-module/components/block-visibility/index.js.map +7 -1
- package/build-module/components/block-visibility/menu-item.js +81 -39
- package/build-module/components/block-visibility/menu-item.js.map +7 -1
- package/build-module/components/block-visibility/toolbar.js +55 -66
- package/build-module/components/block-visibility/toolbar.js.map +7 -1
- package/build-module/components/border-radius-control/constants.js +34 -22
- package/build-module/components/border-radius-control/constants.js.map +7 -1
- package/build-module/components/border-radius-control/index.js +81 -84
- package/build-module/components/border-radius-control/index.js.map +7 -1
- package/build-module/components/border-radius-control/linked-button.js +21 -21
- package/build-module/components/border-radius-control/linked-button.js.map +7 -1
- package/build-module/components/border-radius-control/single-input-control.js +168 -126
- package/build-module/components/border-radius-control/single-input-control.js.map +7 -1
- package/build-module/components/border-radius-control/utils.js +66 -178
- package/build-module/components/border-radius-control/utils.js.map +7 -1
- package/build-module/components/button-block-appender/index.js +72 -83
- package/build-module/components/button-block-appender/index.js.map +7 -1
- package/build-module/components/child-layout-control/index.js +305 -266
- package/build-module/components/child-layout-control/index.js.map +7 -1
- package/build-module/components/collab/block-comment-icon-slot.js +7 -7
- package/build-module/components/collab/block-comment-icon-slot.js.map +7 -1
- package/build-module/components/collab/block-comment-icon-toolbar-slot.js +9 -7
- package/build-module/components/collab/block-comment-icon-toolbar-slot.js.map +7 -1
- package/build-module/components/color-palette/control.js +17 -14
- package/build-module/components/color-palette/control.js.map +7 -1
- package/build-module/components/color-palette/index.js +7 -11
- package/build-module/components/color-palette/index.js.map +7 -1
- package/build-module/components/color-palette/with-color-context.js +40 -27
- package/build-module/components/color-palette/with-color-context.js.map +7 -1
- package/build-module/components/color-style-selector/index.js +48 -82
- package/build-module/components/color-style-selector/index.js.map +7 -1
- package/build-module/components/colors/index.js +14 -3
- package/build-module/components/colors/index.js.map +7 -1
- package/build-module/components/colors/utils.js +24 -73
- package/build-module/components/colors/utils.js.map +7 -1
- package/build-module/components/colors/with-colors.js +140 -188
- package/build-module/components/colors/with-colors.js.map +7 -1
- package/build-module/components/colors-gradients/control.js +118 -111
- package/build-module/components/colors-gradients/control.js.map +7 -1
- package/build-module/components/colors-gradients/dropdown.js +134 -155
- package/build-module/components/colors-gradients/dropdown.js.map +7 -1
- package/build-module/components/colors-gradients/panel-color-gradient-settings.js +90 -75
- package/build-module/components/colors-gradients/panel-color-gradient-settings.js.map +7 -1
- package/build-module/components/colors-gradients/use-multiple-origin-colors-and-gradients.js +73 -36
- package/build-module/components/colors-gradients/use-multiple-origin-colors-and-gradients.js.map +7 -1
- package/build-module/components/content-lock/index.js +5 -2
- package/build-module/components/content-lock/index.js.map +7 -1
- package/build-module/components/content-lock/modify-content-lock-menu-item.js +38 -51
- package/build-module/components/content-lock/modify-content-lock-menu-item.js.map +7 -1
- package/build-module/components/contrast-checker/index.js +54 -62
- package/build-module/components/contrast-checker/index.js.map +7 -1
- package/build-module/components/convert-to-group-buttons/index.js +53 -44
- package/build-module/components/convert-to-group-buttons/index.js.map +7 -1
- package/build-module/components/convert-to-group-buttons/toolbar.js +86 -97
- package/build-module/components/convert-to-group-buttons/toolbar.js.map +7 -1
- package/build-module/components/convert-to-group-buttons/use-convert-to-group-button-props.js +32 -58
- package/build-module/components/convert-to-group-buttons/use-convert-to-group-button-props.js.map +7 -1
- package/build-module/components/copy-handler/index.js +19 -34
- package/build-module/components/copy-handler/index.js.map +7 -1
- package/build-module/components/date-format-picker/index.js +126 -107
- package/build-module/components/date-format-picker/index.js.map +7 -1
- package/build-module/components/default-block-appender/index.js +78 -92
- package/build-module/components/default-block-appender/index.js.map +7 -1
- package/build-module/components/dimensions-tool/aspect-ratio-tool.js +61 -69
- package/build-module/components/dimensions-tool/aspect-ratio-tool.js.map +7 -1
- package/build-module/components/dimensions-tool/index.js +105 -183
- package/build-module/components/dimensions-tool/index.js.map +7 -1
- package/build-module/components/dimensions-tool/scale-tool.js +74 -90
- package/build-module/components/dimensions-tool/scale-tool.js.map +7 -1
- package/build-module/components/dimensions-tool/width-height-tool.js +69 -106
- package/build-module/components/dimensions-tool/width-height-tool.js.map +7 -1
- package/build-module/components/duotone/utils.js +18 -54
- package/build-module/components/duotone/utils.js.map +7 -1
- package/build-module/components/duotone-control/index.js +71 -64
- package/build-module/components/duotone-control/index.js.map +7 -1
- package/build-module/components/editable-text/index.js +11 -30
- package/build-module/components/editable-text/index.js.map +7 -1
- package/build-module/components/editor-styles/index.js +83 -92
- package/build-module/components/editor-styles/index.js.map +7 -1
- package/build-module/components/floating-toolbar/nav-up-icon.js +30 -24
- package/build-module/components/floating-toolbar/nav-up-icon.js.map +7 -1
- package/build-module/components/font-appearance-control/index.js +68 -110
- package/build-module/components/font-appearance-control/index.js.map +7 -1
- package/build-module/components/font-family/index.js +57 -61
- package/build-module/components/font-family/index.js.map +7 -1
- package/build-module/components/font-sizes/fluid-utils.js +60 -161
- package/build-module/components/font-sizes/fluid-utils.js.map +7 -1
- package/build-module/components/font-sizes/font-size-picker.js +20 -22
- package/build-module/components/font-sizes/font-size-picker.js.map +7 -1
- package/build-module/components/font-sizes/index.js +17 -5
- package/build-module/components/font-sizes/index.js.map +7 -1
- package/build-module/components/font-sizes/utils.js +16 -52
- package/build-module/components/font-sizes/utils.js.map +7 -1
- package/build-module/components/font-sizes/with-font-sizes.js +126 -113
- package/build-module/components/font-sizes/with-font-sizes.js.map +7 -1
- package/build-module/components/global-styles/advanced-panel.js +40 -45
- package/build-module/components/global-styles/advanced-panel.js.map +7 -1
- package/build-module/components/global-styles/background-panel.js +69 -81
- package/build-module/components/global-styles/background-panel.js.map +7 -1
- package/build-module/components/global-styles/border-panel.js +157 -143
- package/build-module/components/global-styles/border-panel.js.map +7 -1
- package/build-module/components/global-styles/color-panel.js +491 -384
- package/build-module/components/global-styles/color-panel.js.map +7 -1
- package/build-module/components/global-styles/context.js +13 -9
- package/build-module/components/global-styles/context.js.map +7 -1
- package/build-module/components/global-styles/dimensions-panel.js +400 -351
- package/build-module/components/global-styles/dimensions-panel.js.map +7 -1
- package/build-module/components/global-styles/filters-panel.js +136 -136
- package/build-module/components/global-styles/filters-panel.js.map +7 -1
- package/build-module/components/global-styles/get-block-css-selector.js +20 -73
- package/build-module/components/global-styles/get-block-css-selector.js.map +7 -1
- package/build-module/components/global-styles/get-global-styles-changes.js +122 -163
- package/build-module/components/global-styles/get-global-styles-changes.js.map +7 -1
- package/build-module/components/global-styles/hooks.js +214 -124
- package/build-module/components/global-styles/hooks.js.map +7 -1
- package/build-module/components/global-styles/image-settings-panel.js +45 -46
- package/build-module/components/global-styles/image-settings-panel.js.map +7 -1
- package/build-module/components/global-styles/index.js +73 -15
- package/build-module/components/global-styles/index.js.map +7 -1
- package/build-module/components/global-styles/shadow-panel-components.js +147 -154
- package/build-module/components/global-styles/shadow-panel-components.js.map +7 -1
- package/build-module/components/global-styles/typography-panel.js +395 -279
- package/build-module/components/global-styles/typography-panel.js.map +7 -1
- package/build-module/components/global-styles/typography-utils.js +73 -175
- package/build-module/components/global-styles/typography-utils.js.map +7 -1
- package/build-module/components/global-styles/use-global-styles-output.js +667 -733
- package/build-module/components/global-styles/use-global-styles-output.js.map +7 -1
- package/build-module/components/global-styles/utils.js +264 -351
- package/build-module/components/global-styles/utils.js.map +7 -1
- package/build-module/components/gradients/index.js +2 -2
- package/build-module/components/gradients/index.js.map +7 -1
- package/build-module/components/gradients/use-gradient.js +76 -79
- package/build-module/components/gradients/use-gradient.js.map +7 -1
- package/build-module/components/gradients/with-gradient.js +9 -14
- package/build-module/components/gradients/with-gradient.js.map +7 -1
- package/build-module/components/grid/grid-item-movers.js +135 -95
- package/build-module/components/grid/grid-item-movers.js.map +7 -1
- package/build-module/components/grid/grid-item-resizer.js +109 -99
- package/build-module/components/grid/grid-item-resizer.js.map +7 -1
- package/build-module/components/grid/grid-visualizer.js +238 -190
- package/build-module/components/grid/grid-visualizer.js.map +7 -1
- package/build-module/components/grid/index.js +11 -5
- package/build-module/components/grid/index.js.map +7 -1
- package/build-module/components/grid/use-get-number-of-blocks-before-cell.js +9 -20
- package/build-module/components/grid/use-get-number-of-blocks-before-cell.js.map +7 -1
- package/build-module/components/grid/use-grid-layout-sync.js +98 -109
- package/build-module/components/grid/use-grid-layout-sync.js.map +7 -1
- package/build-module/components/grid/utils.js +79 -75
- package/build-module/components/grid/utils.js.map +7 -1
- package/build-module/components/height-control/index.js +122 -190
- package/build-module/components/height-control/index.js.map +7 -1
- package/build-module/components/html-element-control/index.js +62 -88
- package/build-module/components/html-element-control/index.js.map +7 -1
- package/build-module/components/html-element-control/messages.js +36 -20
- package/build-module/components/html-element-control/messages.js.map +7 -1
- package/build-module/components/iframe/get-compatibility-styles.js +68 -84
- package/build-module/components/iframe/get-compatibility-styles.js.map +7 -1
- package/build-module/components/iframe/index.js +161 -199
- package/build-module/components/iframe/index.js.map +7 -1
- package/build-module/components/iframe/use-scale-canvas.js +131 -257
- package/build-module/components/iframe/use-scale-canvas.js.map +7 -1
- package/build-module/components/image-editor/aspect-ratio-dropdown.js +99 -101
- package/build-module/components/image-editor/aspect-ratio-dropdown.js.map +7 -1
- package/build-module/components/image-editor/constants.js +10 -5
- package/build-module/components/image-editor/constants.js.map +7 -1
- package/build-module/components/image-editor/context.js +20 -23
- package/build-module/components/image-editor/context.js.map +7 -1
- package/build-module/components/image-editor/cropper.js +57 -53
- package/build-module/components/image-editor/cropper.js.map +7 -1
- package/build-module/components/image-editor/form-controls.js +14 -28
- package/build-module/components/image-editor/form-controls.js.map +7 -1
- package/build-module/components/image-editor/index.js +46 -44
- package/build-module/components/image-editor/index.js.map +7 -1
- package/build-module/components/image-editor/rotation-button.js +20 -25
- package/build-module/components/image-editor/rotation-button.js.map +7 -1
- package/build-module/components/image-editor/use-save-image.js +76 -63
- package/build-module/components/image-editor/use-save-image.js.map +7 -1
- package/build-module/components/image-editor/use-transform-image.js +47 -35
- package/build-module/components/image-editor/use-transform-image.js.map +7 -1
- package/build-module/components/image-editor/zoom-dropdown.js +46 -46
- package/build-module/components/image-editor/zoom-dropdown.js.map +7 -1
- package/build-module/components/image-size-control/index.js +95 -97
- package/build-module/components/image-size-control/index.js.map +7 -1
- package/build-module/components/image-size-control/use-dimension-handler.js +21 -28
- package/build-module/components/image-size-control/use-dimension-handler.js.map +7 -1
- package/build-module/components/index.js +293 -125
- package/build-module/components/index.js.map +7 -1
- package/build-module/components/inner-blocks/button-block-appender.js +22 -25
- package/build-module/components/inner-blocks/button-block-appender.js.map +7 -1
- package/build-module/components/inner-blocks/default-block-appender.js +10 -14
- package/build-module/components/inner-blocks/default-block-appender.js.map +7 -1
- package/build-module/components/inner-blocks/index.js +131 -175
- package/build-module/components/inner-blocks/index.js.map +7 -1
- package/build-module/components/inner-blocks/use-block-context.js +32 -34
- package/build-module/components/inner-blocks/use-block-context.js.map +7 -1
- package/build-module/components/inner-blocks/use-inner-block-template-sync.js +37 -64
- package/build-module/components/inner-blocks/use-inner-block-template-sync.js.map +7 -1
- package/build-module/components/inner-blocks/use-nested-settings-update.js +51 -99
- package/build-module/components/inner-blocks/use-nested-settings-update.js.map +7 -1
- package/build-module/components/inserter/block-patterns-explorer/index.js +49 -52
- package/build-module/components/inserter/block-patterns-explorer/index.js.map +7 -1
- package/build-module/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js +45 -44
- package/build-module/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js.map +7 -1
- package/build-module/components/inserter/block-patterns-explorer/pattern-list.js +105 -70
- package/build-module/components/inserter/block-patterns-explorer/pattern-list.js.map +7 -1
- package/build-module/components/inserter/block-patterns-tab/index.js +59 -54
- package/build-module/components/inserter/block-patterns-tab/index.js.map +7 -1
- package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js +169 -107
- package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js.map +7 -1
- package/build-module/components/inserter/block-patterns-tab/patterns-filter.js +132 -98
- package/build-module/components/inserter/block-patterns-tab/patterns-filter.js.map +7 -1
- package/build-module/components/inserter/block-patterns-tab/use-pattern-categories.js +58 -27
- package/build-module/components/inserter/block-patterns-tab/use-pattern-categories.js.map +7 -1
- package/build-module/components/inserter/block-patterns-tab/utils.js +31 -37
- package/build-module/components/inserter/block-patterns-tab/utils.js.map +7 -1
- package/build-module/components/inserter/block-types-tab.js +135 -127
- package/build-module/components/inserter/block-types-tab.js.map +7 -1
- package/build-module/components/inserter/category-tabs/index.js +72 -63
- package/build-module/components/inserter/category-tabs/index.js.map +7 -1
- package/build-module/components/inserter/hooks/use-block-types-state.js +80 -64
- package/build-module/components/inserter/hooks/use-block-types-state.js.map +7 -1
- package/build-module/components/inserter/hooks/use-insertion-point.js +137 -117
- package/build-module/components/inserter/hooks/use-insertion-point.js.map +7 -1
- package/build-module/components/inserter/hooks/use-patterns-paging.js +25 -26
- package/build-module/components/inserter/hooks/use-patterns-paging.js.map +7 -1
- package/build-module/components/inserter/hooks/use-patterns-state.js +92 -79
- package/build-module/components/inserter/hooks/use-patterns-state.js.map +7 -1
- package/build-module/components/inserter/index.js +199 -228
- package/build-module/components/inserter/index.js.map +7 -1
- package/build-module/components/inserter/library.js +51 -48
- package/build-module/components/inserter/library.js.map +7 -1
- package/build-module/components/inserter/media-tab/hooks.js +61 -77
- package/build-module/components/inserter/media-tab/hooks.js.map +7 -1
- package/build-module/components/inserter/media-tab/index.js +9 -4
- package/build-module/components/inserter/media-tab/index.js.map +7 -1
- package/build-module/components/inserter/media-tab/media-list.js +27 -24
- package/build-module/components/inserter/media-tab/media-list.js.map +7 -1
- package/build-module/components/inserter/media-tab/media-panel.js +39 -45
- package/build-module/components/inserter/media-tab/media-panel.js.map +7 -1
- package/build-module/components/inserter/media-tab/media-preview.js +241 -227
- package/build-module/components/inserter/media-tab/media-preview.js.map +7 -1
- package/build-module/components/inserter/media-tab/media-tab.js +79 -77
- package/build-module/components/inserter/media-tab/media-tab.js.map +7 -1
- package/build-module/components/inserter/media-tab/utils.js +25 -40
- package/build-module/components/inserter/media-tab/utils.js.map +7 -1
- package/build-module/components/inserter/menu.js +279 -202
- package/build-module/components/inserter/menu.js.map +7 -1
- package/build-module/components/inserter/mobile-tab-navigation.js +74 -71
- package/build-module/components/inserter/mobile-tab-navigation.js.map +7 -1
- package/build-module/components/inserter/no-results.js +8 -13
- package/build-module/components/inserter/no-results.js.map +7 -1
- package/build-module/components/inserter/panel.js +15 -26
- package/build-module/components/inserter/panel.js.map +7 -1
- package/build-module/components/inserter/preview-panel.js +43 -54
- package/build-module/components/inserter/preview-panel.js.map +7 -1
- package/build-module/components/inserter/quick-inserter.js +85 -81
- package/build-module/components/inserter/quick-inserter.js.map +7 -1
- package/build-module/components/inserter/search-items.js +53 -102
- package/build-module/components/inserter/search-items.js.map +7 -1
- package/build-module/components/inserter/search-results.js +136 -102
- package/build-module/components/inserter/search-results.js.map +7 -1
- package/build-module/components/inserter/tips.js +36 -22
- package/build-module/components/inserter/tips.js.map +7 -1
- package/build-module/components/inserter-button/sparkles.js +12 -14
- package/build-module/components/inserter-button/sparkles.js.map +7 -1
- package/build-module/components/inserter-draggable-blocks/index.js +58 -68
- package/build-module/components/inserter-draggable-blocks/index.js.map +7 -1
- package/build-module/components/inserter-list-item/index.js +111 -93
- package/build-module/components/inserter-list-item/index.js.map +7 -1
- package/build-module/components/inserter-listbox/context.js +7 -7
- package/build-module/components/inserter-listbox/context.js.map +7 -1
- package/build-module/components/inserter-listbox/group.js +32 -25
- package/build-module/components/inserter-listbox/group.js.map +7 -1
- package/build-module/components/inserter-listbox/index.js +26 -31
- package/build-module/components/inserter-listbox/index.js.map +7 -1
- package/build-module/components/inserter-listbox/item.js +29 -42
- package/build-module/components/inserter-listbox/item.js.map +7 -1
- package/build-module/components/inserter-listbox/row.js +9 -13
- package/build-module/components/inserter-listbox/row.js.map +7 -1
- package/build-module/components/inserter-menu-extension/index.js +9 -10
- package/build-module/components/inserter-menu-extension/index.js.map +7 -1
- package/build-module/components/inspector-controls/block-support-slot-container.js +19 -23
- package/build-module/components/inspector-controls/block-support-slot-container.js.map +7 -1
- package/build-module/components/inspector-controls/block-support-tools-panel.js +54 -58
- package/build-module/components/inspector-controls/block-support-tools-panel.js.map +7 -1
- package/build-module/components/inspector-controls/fill.js +46 -65
- package/build-module/components/inspector-controls/fill.js.map +7 -1
- package/build-module/components/inspector-controls/groups.js +29 -19
- package/build-module/components/inspector-controls/groups.js.map +7 -1
- package/build-module/components/inspector-controls/index.js +14 -25
- package/build-module/components/inspector-controls/index.js.map +7 -1
- package/build-module/components/inspector-controls/slot.js +31 -39
- package/build-module/components/inspector-controls/slot.js.map +7 -1
- package/build-module/components/inspector-controls-tabs/advanced-controls-panel.js +33 -22
- package/build-module/components/inspector-controls-tabs/advanced-controls-panel.js.map +7 -1
- package/build-module/components/inspector-controls-tabs/content-tab.js +11 -22
- package/build-module/components/inspector-controls-tabs/content-tab.js.map +7 -1
- package/build-module/components/inspector-controls-tabs/index.js +62 -91
- package/build-module/components/inspector-controls-tabs/index.js.map +7 -1
- package/build-module/components/inspector-controls-tabs/position-controls-panel.js +64 -65
- package/build-module/components/inspector-controls-tabs/position-controls-panel.js.map +7 -1
- package/build-module/components/inspector-controls-tabs/settings-tab.js +15 -18
- package/build-module/components/inspector-controls-tabs/settings-tab.js.map +7 -1
- package/build-module/components/inspector-controls-tabs/styles-tab.js +55 -50
- package/build-module/components/inspector-controls-tabs/styles-tab.js.map +7 -1
- package/build-module/components/inspector-controls-tabs/use-inspector-controls-tabs.js +32 -38
- package/build-module/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +7 -1
- package/build-module/components/inspector-controls-tabs/use-is-list-view-tab-disabled.js +8 -6
- package/build-module/components/inspector-controls-tabs/use-is-list-view-tab-disabled.js.map +7 -1
- package/build-module/components/inspector-controls-tabs/utils.js +25 -22
- package/build-module/components/inspector-controls-tabs/utils.js.map +7 -1
- package/build-module/components/inspector-popover-header/index.js +54 -42
- package/build-module/components/inspector-popover-header/index.js.map +7 -1
- package/build-module/components/justify-content-control/index.js +11 -21
- package/build-module/components/justify-content-control/index.js.map +7 -1
- package/build-module/components/justify-content-control/ui.js +69 -57
- package/build-module/components/justify-content-control/ui.js.map +7 -1
- package/build-module/components/keyboard-shortcuts/index.js +117 -101
- package/build-module/components/keyboard-shortcuts/index.js.map +7 -1
- package/build-module/components/letter-spacing-control/index.js +39 -50
- package/build-module/components/letter-spacing-control/index.js.map +7 -1
- package/build-module/components/line-height-control/index.js +44 -69
- package/build-module/components/line-height-control/index.js.map +7 -1
- package/build-module/components/line-height-control/utils.js +14 -29
- package/build-module/components/line-height-control/utils.js.map +7 -1
- package/build-module/components/link-control/constants.js +28 -19
- package/build-module/components/link-control/constants.js.map +7 -1
- package/build-module/components/link-control/index.js +297 -305
- package/build-module/components/link-control/index.js.map +7 -1
- package/build-module/components/link-control/is-url-like.js +12 -37
- package/build-module/components/link-control/is-url-like.js.map +7 -1
- package/build-module/components/link-control/link-preview.js +128 -134
- package/build-module/components/link-control/link-preview.js.map +7 -1
- package/build-module/components/link-control/search-create-button.js +32 -24
- package/build-module/components/link-control/search-create-button.js.map +7 -1
- package/build-module/components/link-control/search-input.js +122 -134
- package/build-module/components/link-control/search-input.js.map +7 -1
- package/build-module/components/link-control/search-item.js +78 -78
- package/build-module/components/link-control/search-item.js.map +7 -1
- package/build-module/components/link-control/search-results.js +67 -65
- package/build-module/components/link-control/search-results.js.map +7 -1
- package/build-module/components/link-control/settings-drawer.js +40 -44
- package/build-module/components/link-control/settings-drawer.js.map +7 -1
- package/build-module/components/link-control/settings.js +48 -30
- package/build-module/components/link-control/settings.js.map +7 -1
- package/build-module/components/link-control/use-create-page.js +23 -34
- package/build-module/components/link-control/use-create-page.js.map +7 -1
- package/build-module/components/link-control/use-internal-value.js +26 -27
- package/build-module/components/link-control/use-internal-value.js.map +7 -1
- package/build-module/components/link-control/use-rich-url-data.js +18 -31
- package/build-module/components/link-control/use-rich-url-data.js.map +7 -1
- package/build-module/components/link-control/use-search-handler.js +66 -74
- package/build-module/components/link-control/use-search-handler.js.map +7 -1
- package/build-module/components/link-control/viewer-slot.js +11 -11
- package/build-module/components/link-control/viewer-slot.js.map +7 -1
- package/build-module/components/list-view/appender.js +87 -93
- package/build-module/components/list-view/appender.js.map +7 -1
- package/build-module/components/list-view/aria-referenced-text.js +8 -27
- package/build-module/components/list-view/aria-referenced-text.js.map +7 -1
- package/build-module/components/list-view/block-contents.js +65 -72
- package/build-module/components/list-view/block-contents.js.map +7 -1
- package/build-module/components/list-view/block-select-button.js +119 -136
- package/build-module/components/list-view/block-select-button.js.map +7 -1
- package/build-module/components/list-view/block.js +358 -360
- package/build-module/components/list-view/block.js.map +7 -1
- package/build-module/components/list-view/branch.js +125 -139
- package/build-module/components/list-view/branch.js.map +7 -1
- package/build-module/components/list-view/context.js +9 -8
- package/build-module/components/list-view/context.js.map +7 -1
- package/build-module/components/list-view/drop-indicator.js +135 -157
- package/build-module/components/list-view/drop-indicator.js.map +7 -1
- package/build-module/components/list-view/expander.js +18 -22
- package/build-module/components/list-view/expander.js.map +7 -1
- package/build-module/components/list-view/index.js +249 -252
- package/build-module/components/list-view/index.js.map +7 -1
- package/build-module/components/list-view/leaf.js +45 -48
- package/build-module/components/list-view/leaf.js.map +7 -1
- package/build-module/components/list-view/use-block-selection.js +98 -103
- package/build-module/components/list-view/use-block-selection.js.map +7 -1
- package/build-module/components/list-view/use-clipboard-handler.js +48 -69
- package/build-module/components/list-view/use-clipboard-handler.js.map +7 -1
- package/build-module/components/list-view/use-list-view-block-indexes.js +8 -8
- package/build-module/components/list-view/use-list-view-block-indexes.js.map +7 -1
- package/build-module/components/list-view/use-list-view-client-ids.js +23 -28
- package/build-module/components/list-view/use-list-view-client-ids.js.map +7 -1
- package/build-module/components/list-view/use-list-view-collapse-items.js +13 -27
- package/build-module/components/list-view/use-list-view-collapse-items.js.map +7 -1
- package/build-module/components/list-view/use-list-view-drop-zone.js +157 -290
- package/build-module/components/list-view/use-list-view-drop-zone.js.map +7 -1
- package/build-module/components/list-view/use-list-view-expand-selected-item.js +27 -32
- package/build-module/components/list-view/use-list-view-expand-selected-item.js.map +7 -1
- package/build-module/components/list-view/use-list-view-images.js +25 -59
- package/build-module/components/list-view/use-list-view-images.js.map +7 -1
- package/build-module/components/list-view/use-list-view-scroll-into-view.js +8 -20
- package/build-module/components/list-view/use-list-view-scroll-into-view.js.map +7 -1
- package/build-module/components/list-view/utils.js +48 -111
- package/build-module/components/list-view/utils.js.map +7 -1
- package/build-module/components/media-placeholder/index.js +326 -289
- package/build-module/components/media-placeholder/index.js.map +7 -1
- package/build-module/components/media-replace-flow/index.js +162 -152
- package/build-module/components/media-replace-flow/index.js.map +7 -1
- package/build-module/components/media-upload/check.js +11 -23
- package/build-module/components/media-upload/check.js.map +7 -1
- package/build-module/components/media-upload/index.js +6 -18
- package/build-module/components/media-upload/index.js.map +7 -1
- package/build-module/components/media-upload-progress/constants.js +15 -7
- package/build-module/components/media-upload-progress/constants.js.map +7 -1
- package/build-module/components/multi-selection-inspector/index.js +32 -30
- package/build-module/components/multi-selection-inspector/index.js.map +7 -1
- package/build-module/components/navigable-toolbar/index.js +65 -86
- package/build-module/components/navigable-toolbar/index.js.map +7 -1
- package/build-module/components/observe-typing/index.js +129 -207
- package/build-module/components/observe-typing/index.js.map +7 -1
- package/build-module/components/panel-color-settings/index.js +19 -23
- package/build-module/components/panel-color-settings/index.js.map +7 -1
- package/build-module/components/plain-text/index.js +22 -75
- package/build-module/components/plain-text/index.js.map +7 -1
- package/build-module/components/preview-options/index.js +8 -8
- package/build-module/components/preview-options/index.js.map +7 -1
- package/build-module/components/provider/block-refs-provider.js +13 -21
- package/build-module/components/provider/block-refs-provider.js.map +7 -1
- package/build-module/components/provider/index.js +80 -91
- package/build-module/components/provider/index.js.map +7 -1
- package/build-module/components/provider/use-block-sync.js +27 -136
- package/build-module/components/provider/use-block-sync.js.map +7 -1
- package/build-module/components/provider/use-media-upload-settings.js +15 -20
- package/build-module/components/provider/use-media-upload-settings.js.map +7 -1
- package/build-module/components/provider/with-registry-provider.js +27 -36
- package/build-module/components/provider/with-registry-provider.js.map +7 -1
- package/build-module/components/publish-date-time-picker/index.js +42 -39
- package/build-module/components/publish-date-time-picker/index.js.map +7 -1
- package/build-module/components/recursion-provider/index.js +31 -81
- package/build-module/components/recursion-provider/index.js.map +7 -1
- package/build-module/components/resizable-box-popover/index.js +17 -20
- package/build-module/components/resizable-box-popover/index.js.map +7 -1
- package/build-module/components/resolution-tool/index.js +53 -39
- package/build-module/components/resolution-tool/index.js.map +7 -1
- package/build-module/components/responsive-block-control/index.js +86 -66
- package/build-module/components/responsive-block-control/index.js.map +7 -1
- package/build-module/components/responsive-block-control/label.js +22 -21
- package/build-module/components/responsive-block-control/label.js.map +7 -1
- package/build-module/components/rich-text/content.js +22 -40
- package/build-module/components/rich-text/content.js.map +7 -1
- package/build-module/components/rich-text/event-listeners/before-input-rules.js +23 -52
- package/build-module/components/rich-text/event-listeners/before-input-rules.js.map +7 -1
- package/build-module/components/rich-text/event-listeners/delete.js +13 -31
- package/build-module/components/rich-text/event-listeners/delete.js.map +7 -1
- package/build-module/components/rich-text/event-listeners/enter.js +22 -38
- package/build-module/components/rich-text/event-listeners/enter.js.map +7 -1
- package/build-module/components/rich-text/event-listeners/firefox-compat.js +12 -18
- package/build-module/components/rich-text/event-listeners/firefox-compat.js.map +7 -1
- package/build-module/components/rich-text/event-listeners/index.js +47 -33
- package/build-module/components/rich-text/event-listeners/index.js.map +7 -1
- package/build-module/components/rich-text/event-listeners/input-events.js +8 -7
- package/build-module/components/rich-text/event-listeners/input-events.js.map +7 -1
- package/build-module/components/rich-text/event-listeners/input-rules.js +46 -64
- package/build-module/components/rich-text/event-listeners/input-rules.js.map +7 -1
- package/build-module/components/rich-text/event-listeners/insert-replacement-text.js +10 -19
- package/build-module/components/rich-text/event-listeners/insert-replacement-text.js.map +7 -1
- package/build-module/components/rich-text/event-listeners/paste-handler.js +36 -65
- package/build-module/components/rich-text/event-listeners/paste-handler.js.map +7 -1
- package/build-module/components/rich-text/event-listeners/remove-browser-shortcuts.js +9 -14
- package/build-module/components/rich-text/event-listeners/remove-browser-shortcuts.js.map +7 -1
- package/build-module/components/rich-text/event-listeners/shortcuts.js +8 -7
- package/build-module/components/rich-text/event-listeners/shortcuts.js.map +7 -1
- package/build-module/components/rich-text/event-listeners/undo-automatic-change.js +13 -26
- package/build-module/components/rich-text/event-listeners/undo-automatic-change.js.map +7 -1
- package/build-module/components/rich-text/format-edit.js +36 -46
- package/build-module/components/rich-text/format-edit.js.map +7 -1
- package/build-module/components/rich-text/format-toolbar/index.js +51 -55
- package/build-module/components/rich-text/format-toolbar/index.js.map +7 -1
- package/build-module/components/rich-text/format-toolbar-container.js +33 -46
- package/build-module/components/rich-text/format-toolbar-container.js.map +7 -1
- package/build-module/components/rich-text/get-rich-text-values.js +37 -43
- package/build-module/components/rich-text/get-rich-text-values.js.map +7 -1
- package/build-module/components/rich-text/index.js +298 -303
- package/build-module/components/rich-text/index.js.map +7 -1
- package/build-module/components/rich-text/input-event.js +7 -14
- package/build-module/components/rich-text/input-event.js.map +7 -1
- package/build-module/components/rich-text/multiline.js +74 -68
- package/build-module/components/rich-text/multiline.js.map +7 -1
- package/build-module/components/rich-text/native/format-edit.js +25 -24
- package/build-module/components/rich-text/native/format-edit.js.map +7 -1
- package/build-module/components/rich-text/native/index.js +6 -2
- package/build-module/components/rich-text/native/index.js.map +7 -1
- package/build-module/components/rich-text/native/use-format-types.js +64 -55
- package/build-module/components/rich-text/native/use-format-types.js.map +7 -1
- package/build-module/components/rich-text/prevent-event-discovery.js +9 -12
- package/build-module/components/rich-text/prevent-event-discovery.js.map +7 -1
- package/build-module/components/rich-text/shortcut.js +8 -16
- package/build-module/components/rich-text/shortcut.js.map +7 -1
- package/build-module/components/rich-text/toolbar-button.js +10 -16
- package/build-module/components/rich-text/toolbar-button.js.map +7 -1
- package/build-module/components/rich-text/use-format-types.js +102 -82
- package/build-module/components/rich-text/use-format-types.js.map +7 -1
- package/build-module/components/rich-text/use-mark-persistent.js +10 -25
- package/build-module/components/rich-text/use-mark-persistent.js.map +7 -1
- package/build-module/components/rich-text/utils.js +24 -40
- package/build-module/components/rich-text/utils.js.map +7 -1
- package/build-module/components/rich-text/with-deprecations.js +30 -29
- package/build-module/components/rich-text/with-deprecations.js.map +7 -1
- package/build-module/components/selection-scroll-into-view/index.js +9 -16
- package/build-module/components/selection-scroll-into-view/index.js.map +7 -1
- package/build-module/components/skip-to-selected-block/index.js +26 -28
- package/build-module/components/skip-to-selected-block/index.js.map +7 -1
- package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.js +38 -34
- package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +7 -1
- package/build-module/components/spacing-sizes-control/index.js +65 -101
- package/build-module/components/spacing-sizes-control/index.js.map +7 -1
- package/build-module/components/spacing-sizes-control/input-controls/axial.js +37 -31
- package/build-module/components/spacing-sizes-control/input-controls/axial.js.map +7 -1
- package/build-module/components/spacing-sizes-control/input-controls/separated.js +33 -25
- package/build-module/components/spacing-sizes-control/input-controls/separated.js.map +7 -1
- package/build-module/components/spacing-sizes-control/input-controls/single.js +29 -24
- package/build-module/components/spacing-sizes-control/input-controls/single.js.map +7 -1
- package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js +230 -263
- package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +7 -1
- package/build-module/components/spacing-sizes-control/linked-button.js +20 -20
- package/build-module/components/spacing-sizes-control/linked-button.js.map +7 -1
- package/build-module/components/spacing-sizes-control/utils.js +85 -167
- package/build-module/components/spacing-sizes-control/utils.js.map +7 -1
- package/build-module/components/tabbed-sidebar/index.js +62 -94
- package/build-module/components/tabbed-sidebar/index.js.map +7 -1
- package/build-module/components/text-alignment-control/index.js +76 -64
- package/build-module/components/text-alignment-control/index.js.map +7 -1
- package/build-module/components/text-decoration-control/index.js +58 -56
- package/build-module/components/text-decoration-control/index.js.map +7 -1
- package/build-module/components/text-transform-control/index.js +68 -64
- package/build-module/components/text-transform-control/index.js.map +7 -1
- package/build-module/components/typewriter/index.js +152 -206
- package/build-module/components/typewriter/index.js.map +7 -1
- package/build-module/components/unit-control/index.js +14 -21
- package/build-module/components/unit-control/index.js.map +7 -1
- package/build-module/components/url-input/button.js +68 -70
- package/build-module/components/url-input/button.js.map +7 -1
- package/build-module/components/url-input/index.js +191 -239
- package/build-module/components/url-input/index.js.map +7 -1
- package/build-module/components/url-popover/image-url-input-ui.js +232 -186
- package/build-module/components/url-popover/image-url-input-ui.js.map +7 -1
- package/build-module/components/url-popover/index.js +87 -93
- package/build-module/components/url-popover/index.js.map +7 -1
- package/build-module/components/url-popover/link-editor.js +40 -33
- package/build-module/components/url-popover/link-editor.js.map +7 -1
- package/build-module/components/url-popover/link-viewer-url.js +15 -26
- package/build-module/components/url-popover/link-viewer-url.js.map +7 -1
- package/build-module/components/url-popover/link-viewer.js +40 -33
- package/build-module/components/url-popover/link-viewer.js.map +7 -1
- package/build-module/components/use-block-commands/index.js +151 -133
- package/build-module/components/use-block-commands/index.js.map +7 -1
- package/build-module/components/use-block-display-information/index.js +62 -102
- package/build-module/components/use-block-display-information/index.js.map +7 -1
- package/build-module/components/use-block-drop-zone/index.js +277 -301
- package/build-module/components/use-block-drop-zone/index.js.map +7 -1
- package/build-module/components/use-flash-editable-blocks/index.js +45 -48
- package/build-module/components/use-flash-editable-blocks/index.js.map +7 -1
- package/build-module/components/use-moving-animation/index.js +43 -102
- package/build-module/components/use-moving-animation/index.js.map +7 -1
- package/build-module/components/use-on-block-drop/index.js +184 -173
- package/build-module/components/use-on-block-drop/index.js.map +7 -1
- package/build-module/components/use-on-block-drop/types.js +1 -2
- package/build-module/components/use-on-block-drop/types.js.map +7 -1
- package/build-module/components/use-paste-styles/index.js +127 -127
- package/build-module/components/use-paste-styles/index.js.map +7 -1
- package/build-module/components/use-resize-canvas/index.js +19 -27
- package/build-module/components/use-resize-canvas/index.js.map +7 -1
- package/build-module/components/use-settings/index.js +24 -53
- package/build-module/components/use-settings/index.js.map +7 -1
- package/build-module/components/warning/index.js +45 -59
- package/build-module/components/warning/index.js.map +7 -1
- package/build-module/components/writing-flow/index.js +79 -65
- package/build-module/components/writing-flow/index.js.map +7 -1
- package/build-module/components/writing-flow/use-arrow-nav.js +89 -136
- package/build-module/components/writing-flow/use-arrow-nav.js.map +7 -1
- package/build-module/components/writing-flow/use-click-selection.js +38 -51
- package/build-module/components/writing-flow/use-click-selection.js.map +7 -1
- package/build-module/components/writing-flow/use-clipboard-handler.js +68 -76
- package/build-module/components/writing-flow/use-clipboard-handler.js.map +7 -1
- package/build-module/components/writing-flow/use-drag-selection.js +81 -145
- package/build-module/components/writing-flow/use-drag-selection.js.map +7 -1
- package/build-module/components/writing-flow/use-input.js +54 -52
- package/build-module/components/writing-flow/use-input.js.map +7 -1
- package/build-module/components/writing-flow/use-multi-selection.js +38 -55
- package/build-module/components/writing-flow/use-multi-selection.js.map +7 -1
- package/build-module/components/writing-flow/use-select-all.js +20 -31
- package/build-module/components/writing-flow/use-select-all.js.map +7 -1
- package/build-module/components/writing-flow/use-selection-observer.js +118 -184
- package/build-module/components/writing-flow/use-selection-observer.js.map +7 -1
- package/build-module/components/writing-flow/use-tab-nav.js +68 -131
- package/build-module/components/writing-flow/use-tab-nav.js.map +7 -1
- package/build-module/components/writing-flow/utils.js +40 -62
- package/build-module/components/writing-flow/utils.js.map +7 -1
- package/build-module/components/writing-mode-control/index.js +50 -56
- package/build-module/components/writing-mode-control/index.js.map +7 -1
- package/build-module/elements/index.js +8 -5
- package/build-module/elements/index.js.map +7 -1
- package/build-module/hooks/align.js +71 -125
- package/build-module/hooks/align.js.map +7 -1
- package/build-module/hooks/allowed-blocks.js +50 -0
- package/build-module/hooks/allowed-blocks.js.map +7 -0
- package/build-module/hooks/anchor.js +58 -84
- package/build-module/hooks/anchor.js.map +7 -1
- package/build-module/hooks/aria-label.js +22 -39
- package/build-module/hooks/aria-label.js.map +7 -1
- package/build-module/hooks/background.js +80 -100
- package/build-module/hooks/background.js.map +7 -1
- package/build-module/hooks/block-bindings.js +370 -245
- package/build-module/hooks/block-bindings.js.map +7 -1
- package/build-module/hooks/block-hooks.js +153 -158
- package/build-module/hooks/block-hooks.js.map +7 -1
- package/build-module/hooks/block-renaming.js +20 -29
- package/build-module/hooks/block-renaming.js.map +7 -1
- package/build-module/hooks/block-style-variation.js +127 -167
- package/build-module/hooks/block-style-variation.js.map +7 -1
- package/build-module/hooks/border.js +143 -231
- package/build-module/hooks/border.js.map +7 -1
- package/build-module/hooks/color.js +182 -174
- package/build-module/hooks/color.js.map +7 -1
- package/build-module/hooks/compat.js +10 -11
- package/build-module/hooks/compat.js.map +7 -1
- package/build-module/hooks/content-lock-ui.js +32 -53
- package/build-module/hooks/content-lock-ui.js.map +7 -1
- package/build-module/hooks/contrast-checker.js +36 -37
- package/build-module/hooks/contrast-checker.js.map +7 -1
- package/build-module/hooks/custom-class-name.js +52 -82
- package/build-module/hooks/custom-class-name.js.map +7 -1
- package/build-module/hooks/dimensions.js +113 -126
- package/build-module/hooks/dimensions.js.map +7 -1
- package/build-module/hooks/duotone.js +148 -178
- package/build-module/hooks/duotone.js.map +7 -1
- package/build-module/hooks/fit-text.js +174 -0
- package/build-module/hooks/fit-text.js.map +7 -0
- package/build-module/hooks/font-family.js +33 -68
- package/build-module/hooks/font-family.js.map +7 -1
- package/build-module/hooks/font-size.js +102 -111
- package/build-module/hooks/font-size.js.map +7 -1
- package/build-module/hooks/gap.js +9 -25
- package/build-module/hooks/gap.js.map +7 -1
- package/build-module/hooks/generated-class-name.js +20 -28
- package/build-module/hooks/generated-class-name.js.map +7 -1
- package/build-module/hooks/grid-visualizer.js +50 -57
- package/build-module/hooks/grid-visualizer.js.map +7 -1
- package/build-module/hooks/index.js +113 -48
- package/build-module/hooks/index.js.map +7 -1
- package/build-module/hooks/layout-child.js +109 -132
- package/build-module/hooks/layout-child.js.map +7 -1
- package/build-module/hooks/layout.js +229 -283
- package/build-module/hooks/layout.js.map +7 -1
- package/build-module/hooks/line-height.js +27 -47
- package/build-module/hooks/line-height.js.map +7 -1
- package/build-module/hooks/lock.js +9 -20
- package/build-module/hooks/lock.js.map +7 -1
- package/build-module/hooks/metadata.js +13 -19
- package/build-module/hooks/metadata.js.map +7 -1
- package/build-module/hooks/position.js +123 -221
- package/build-module/hooks/position.js.map +7 -1
- package/build-module/hooks/settings.js +10 -11
- package/build-module/hooks/settings.js.map +7 -1
- package/build-module/hooks/spacing-visualizer.js +69 -75
- package/build-module/hooks/spacing-visualizer.js.map +7 -1
- package/build-module/hooks/style.js +145 -271
- package/build-module/hooks/style.js.map +7 -1
- package/build-module/hooks/supports.js +95 -253
- package/build-module/hooks/supports.js.map +7 -1
- package/build-module/hooks/text-align.js +77 -89
- package/build-module/hooks/text-align.js.map +7 -1
- package/build-module/hooks/typography.js +105 -94
- package/build-module/hooks/typography.js.map +7 -1
- package/build-module/hooks/use-border-props.js +14 -46
- package/build-module/hooks/use-border-props.js.map +7 -1
- package/build-module/hooks/use-cached-truthy.js +6 -13
- package/build-module/hooks/use-cached-truthy.js.map +7 -1
- package/build-module/hooks/use-color-props.js +74 -83
- package/build-module/hooks/use-color-props.js.map +7 -1
- package/build-module/hooks/use-shadow-props.js +8 -22
- package/build-module/hooks/use-shadow-props.js.map +7 -1
- package/build-module/hooks/use-spacing-props.js +8 -27
- package/build-module/hooks/use-spacing-props.js.map +7 -1
- package/build-module/hooks/use-typography-props.js +24 -46
- package/build-module/hooks/use-typography-props.js.map +7 -1
- package/build-module/hooks/use-zoom-out.js +15 -49
- package/build-module/hooks/use-zoom-out.js.map +7 -1
- package/build-module/hooks/utils.js +384 -235
- package/build-module/hooks/utils.js.map +7 -1
- package/build-module/index.js +38 -12
- package/build-module/index.js.map +7 -1
- package/build-module/layouts/constrained.js +200 -201
- package/build-module/layouts/constrained.js.map +7 -1
- package/build-module/layouts/definitions.js +166 -140
- package/build-module/layouts/definitions.js.map +7 -1
- package/build-module/layouts/flex.js +246 -231
- package/build-module/layouts/flex.js.map +7 -1
- package/build-module/layouts/flow.js +36 -53
- package/build-module/layouts/flow.js.map +7 -1
- package/build-module/layouts/grid.js +237 -243
- package/build-module/layouts/grid.js.map +7 -1
- package/build-module/layouts/index.js +12 -24
- package/build-module/layouts/index.js.map +7 -1
- package/build-module/layouts/utils.js +28 -65
- package/build-module/layouts/utils.js.map +7 -1
- package/build-module/lock-unlock.js +8 -7
- package/build-module/lock-unlock.js.map +7 -1
- package/build-module/private-apis.js +63 -44
- package/build-module/private-apis.js.map +7 -1
- package/build-module/store/actions.js +536 -1191
- package/build-module/store/actions.js.map +7 -1
- package/build-module/store/array.js +17 -25
- package/build-module/store/array.js.map +7 -1
- package/build-module/store/constants.js +5 -2
- package/build-module/store/constants.js.map +7 -1
- package/build-module/store/defaults.js +168 -197
- package/build-module/store/defaults.js.map +7 -1
- package/build-module/store/get-block-settings.js +83 -88
- package/build-module/store/get-block-settings.js.map +7 -1
- package/build-module/store/index.js +17 -43
- package/build-module/store/index.js.map +7 -1
- package/build-module/store/private-actions.js +121 -310
- package/build-module/store/private-actions.js.map +7 -1
- package/build-module/store/private-keys.js +17 -8
- package/build-module/store/private-keys.js.map +7 -1
- package/build-module/store/private-selectors.js +282 -442
- package/build-module/store/private-selectors.js.map +7 -1
- package/build-module/store/reducer.js +1102 -1801
- package/build-module/store/reducer.js.map +7 -1
- package/build-module/store/selectors.js +1135 -2151
- package/build-module/store/selectors.js.map +7 -1
- package/build-module/store/utils.js +60 -42
- package/build-module/store/utils.js.map +7 -1
- package/build-module/utils/block-bindings.js +25 -175
- package/build-module/utils/block-bindings.js.map +7 -1
- package/build-module/utils/dom.js +36 -101
- package/build-module/utils/dom.js.map +7 -1
- package/build-module/utils/fit-text-frontend.js +40 -0
- package/build-module/utils/fit-text-frontend.js.map +7 -0
- package/build-module/utils/fit-text-utils.js +39 -0
- package/build-module/utils/fit-text-utils.js.map +7 -0
- package/build-module/utils/format-font-style.js +14 -24
- package/build-module/utils/format-font-style.js.map +7 -1
- package/build-module/utils/format-font-weight.js +30 -40
- package/build-module/utils/format-font-weight.js.map +7 -1
- package/build-module/utils/get-editor-region.js +10 -22
- package/build-module/utils/get-editor-region.js.map +7 -1
- package/build-module/utils/get-font-styles-and-weights.js +90 -101
- package/build-module/utils/get-font-styles-and-weights.js.map +7 -1
- package/build-module/utils/get-px-from-css-unit.js +5 -9
- package/build-module/utils/get-px-from-css-unit.js.map +7 -1
- package/build-module/utils/index.js +9 -4
- package/build-module/utils/index.js.map +7 -1
- package/build-module/utils/math.js +18 -78
- package/build-module/utils/math.js.map +7 -1
- package/build-module/utils/object.js +16 -53
- package/build-module/utils/object.js.map +7 -1
- package/build-module/utils/order-inserter-block-items.js +6 -18
- package/build-module/utils/order-inserter-block-items.js.map +7 -1
- package/build-module/utils/pasting.js +17 -79
- package/build-module/utils/pasting.js.map +7 -1
- package/build-module/utils/selection.js +13 -25
- package/build-module/utils/selection.js.map +7 -1
- package/build-module/utils/sorting.js +10 -29
- package/build-module/utils/sorting.js.map +7 -1
- package/build-module/utils/transform-styles/index.js +72 -136
- package/build-module/utils/transform-styles/index.js.map +7 -1
- package/build-module/utils/use-notify-copy.js +58 -49
- package/build-module/utils/use-notify-copy.js.map +7 -1
- package/build-style/content-rtl.css +64 -192
- package/build-style/content.css +64 -192
- package/build-style/default-editor-styles-rtl.css +3 -197
- package/build-style/default-editor-styles.css +3 -197
- package/build-style/style-rtl.css +140 -290
- package/build-style/style.css +140 -290
- package/package.json +56 -36
- package/src/autocompleters/style.scss +2 -0
- package/src/components/background-image-control/style.scss +4 -0
- package/src/components/block-allowed-blocks/allowed-blocks-control.js +80 -0
- package/src/components/block-allowed-blocks/index.js +2 -0
- package/src/components/block-allowed-blocks/modal.js +100 -0
- package/src/components/block-allowed-blocks/style.scss +27 -0
- package/src/components/block-breadcrumb/style.scss +3 -0
- package/src/components/block-canvas/style.scss +8 -1
- package/src/components/block-card/index.js +37 -30
- package/src/components/block-card/style.scss +3 -0
- package/src/components/block-compare/style.scss +4 -0
- package/src/components/block-draggable/content.scss +3 -2
- package/src/components/block-draggable/style.scss +3 -0
- package/src/components/block-icon/content.scss +7 -0
- package/src/components/block-icon/style.scss +7 -0
- package/src/components/block-inspector/index.js +27 -3
- package/src/components/block-inspector/style.scss +3 -0
- package/src/components/block-list/content.scss +19 -9
- package/src/components/block-list/index.js +11 -6
- package/src/components/block-list/use-block-props/use-selected-block-event-handlers.js +132 -34
- package/src/components/block-list-appender/content.scss +2 -0
- package/src/components/block-lock/style.scss +4 -0
- package/src/components/block-manager/index.js +32 -28
- package/src/components/block-manager/style.scss +4 -26
- package/src/components/block-mover/style.scss +3 -0
- package/src/components/block-navigation/style.scss +3 -0
- package/src/components/block-pattern-setup/style.scss +5 -0
- package/src/components/block-patterns-list/style.scss +3 -0
- package/src/components/block-patterns-paging/style.scss +3 -0
- package/src/components/block-popover/style.scss +2 -0
- package/src/components/block-rename/modal.js +3 -2
- package/src/components/block-rename/style.scss +2 -0
- package/src/components/block-settings-menu/block-settings-dropdown.js +7 -9
- package/src/components/block-styles/style.scss +5 -0
- package/src/components/block-switcher/style.scss +3 -0
- package/src/components/block-toolbar/index.js +2 -14
- package/src/components/block-toolbar/style.scss +5 -1
- package/src/components/block-tools/index.js +46 -1
- package/src/components/block-tools/style.scss +4 -45
- package/src/components/block-tools/use-show-block-tools.js +1 -8
- package/src/components/block-variation-picker/content.scss +3 -0
- package/src/components/block-variation-transforms/style.scss +3 -0
- package/src/components/block-visibility/menu-item.js +45 -2
- package/src/components/border-radius-control/style.scss +2 -0
- package/src/components/button-block-appender/content.scss +3 -0
- package/src/components/color-palette/test/__snapshots__/control.js.snap +1 -1
- package/src/components/colors-gradients/style.scss +4 -0
- package/src/components/date-format-picker/style.scss +3 -0
- package/src/components/default-block-appender/content.scss +4 -0
- package/src/components/duotone-control/style.scss +4 -0
- package/src/components/font-appearance-control/style.scss +2 -0
- package/src/components/font-family/style.scss +2 -0
- package/src/components/global-styles/color-panel.js +2 -0
- package/src/components/global-styles/get-global-styles-changes.js +2 -0
- package/src/components/global-styles/style.scss +3 -0
- package/src/components/grid/style.scss +5 -0
- package/src/components/iframe/content.scss +8 -1
- package/src/components/iframe/style.scss +7 -0
- package/src/components/index.js +0 -1
- package/src/components/inserter/style.scss +6 -5
- package/src/components/inserter-list-item/style.scss +2 -0
- package/src/components/inspector-controls/groups.js +5 -0
- package/src/components/inspector-controls-tabs/advanced-controls-panel.js +7 -1
- package/src/components/inspector-popover-header/style.scss +2 -0
- package/src/components/keyboard-shortcuts/index.js +10 -0
- package/src/components/link-control/index.js +118 -16
- package/src/components/link-control/link-preview.js +9 -2
- package/src/components/link-control/search-input.js +3 -1
- package/src/components/link-control/settings.js +38 -11
- package/src/components/link-control/style.scss +20 -3
- package/src/components/link-control/test/index.js +511 -1
- package/src/components/list-view/block.js +32 -0
- package/src/components/list-view/style.scss +5 -0
- package/src/components/media-placeholder/style.scss +2 -0
- package/src/components/media-replace-flow/style.scss +3 -0
- package/src/components/multi-selection-inspector/style.scss +2 -0
- package/src/components/responsive-block-control/style.scss +3 -0
- package/src/components/rich-text/content.scss +2 -0
- package/src/components/rich-text/index.js +18 -17
- package/src/components/rich-text/style.scss +3 -0
- package/src/components/skip-to-selected-block/style.scss +2 -0
- package/src/components/spacing-sizes-control/style.scss +2 -0
- package/src/components/tabbed-sidebar/style.scss +3 -0
- package/src/components/url-input/index.js +8 -4
- package/src/components/url-input/style.scss +4 -0
- package/src/components/url-popover/link-viewer.js +2 -2
- package/src/components/url-popover/style.scss +3 -0
- package/src/components/use-block-commands/index.js +40 -0
- package/src/components/warning/content.scss +4 -0
- package/src/content.scss +16 -14
- package/src/default-editor-styles.scss +1 -0
- package/src/hooks/allowed-blocks.js +74 -0
- package/src/hooks/block-bindings.js +399 -200
- package/src/hooks/block-hooks.scss +3 -0
- package/src/hooks/color.scss +2 -0
- package/src/hooks/fit-text.js +268 -0
- package/src/hooks/index.js +6 -0
- package/src/hooks/layout.scss +3 -0
- package/src/hooks/typography.js +2 -0
- package/src/private-apis.js +6 -1
- package/src/store/actions.js +2 -15
- package/src/store/private-actions.js +15 -0
- package/src/store/private-selectors.js +13 -14
- package/src/store/reducer.js +81 -265
- package/src/store/selectors.js +2 -44
- package/src/store/test/private-selectors.js +2 -9
- package/src/store/test/reducer.js +1 -345
- package/src/store/test/selectors.js +3 -1
- package/src/store/utils.js +11 -12
- package/src/style.scss +64 -62
- package/src/utils/fit-text-frontend.js +84 -0
- package/src/utils/fit-text-utils.js +75 -0
- package/build/components/audio-player/audio-url-parser.native.js +0 -24
- package/build/components/audio-player/audio-url-parser.native.js.map +0 -1
- package/build/components/audio-player/index.native.js +0 -174
- package/build/components/audio-player/index.native.js.map +0 -1
- package/build/components/block-alignment-control/ui.native.js +0 -80
- package/build/components/block-alignment-control/ui.native.js.map +0 -1
- package/build/components/block-caption/index.native.js +0 -95
- package/build/components/block-caption/index.native.js.map +0 -1
- package/build/components/block-controls/slot.native.js +0 -46
- package/build/components/block-controls/slot.native.js.map +0 -1
- package/build/components/block-draggable/draggable-chip.native.js +0 -58
- package/build/components/block-draggable/draggable-chip.native.js.map +0 -1
- package/build/components/block-draggable/dropping-insertion-point.native.js +0 -134
- package/build/components/block-draggable/dropping-insertion-point.native.js.map +0 -1
- package/build/components/block-draggable/index.native.js +0 -432
- package/build/components/block-draggable/index.native.js.map +0 -1
- package/build/components/block-draggable/use-scroll-when-dragging.native.js +0 -118
- package/build/components/block-draggable/use-scroll-when-dragging.native.js.map +0 -1
- package/build/components/block-edit/edit.native.js +0 -51
- package/build/components/block-edit/edit.native.js.map +0 -1
- package/build/components/block-heading-level-dropdown/index.native.js +0 -68
- package/build/components/block-heading-level-dropdown/index.native.js.map +0 -1
- package/build/components/block-icon/index.native.js +0 -56
- package/build/components/block-icon/index.native.js.map +0 -1
- package/build/components/block-list/block-crash-boundary.native.js +0 -49
- package/build/components/block-list/block-crash-boundary.native.js.map +0 -1
- package/build/components/block-list/block-crash-warning.native.js +0 -24
- package/build/components/block-list/block-crash-warning.native.js.map +0 -1
- package/build/components/block-list/block-invalid-warning.native.js +0 -79
- package/build/components/block-list/block-invalid-warning.native.js.map +0 -1
- package/build/components/block-list/block-list-context.native.js +0 -170
- package/build/components/block-list/block-list-context.native.js.map +0 -1
- package/build/components/block-list/block-list-item-cell.native.js +0 -74
- package/build/components/block-list/block-list-item-cell.native.js.map +0 -1
- package/build/components/block-list/block-list-item.native.js +0 -191
- package/build/components/block-list/block-list-item.native.js.map +0 -1
- package/build/components/block-list/block-outline.native.js +0 -61
- package/build/components/block-list/block-outline.native.js.map +0 -1
- package/build/components/block-list/block-selection-button.native.js +0 -98
- package/build/components/block-list/block-selection-button.native.js.map +0 -1
- package/build/components/block-list/block.native.js +0 -538
- package/build/components/block-list/block.native.js.map +0 -1
- package/build/components/block-list/grid-item.native.js +0 -63
- package/build/components/block-list/grid-item.native.js.map +0 -1
- package/build/components/block-list/index.native.js +0 -351
- package/build/components/block-list/index.native.js.map +0 -1
- package/build/components/block-list/insertion-point.native.js +0 -45
- package/build/components/block-list/insertion-point.native.js.map +0 -1
- package/build/components/block-list/use-block-props/index.native.js +0 -24
- package/build/components/block-list/use-block-props/index.native.js.map +0 -1
- package/build/components/block-list/use-scroll-upon-insertion.native.js +0 -40
- package/build/components/block-list/use-scroll-upon-insertion.native.js.map +0 -1
- package/build/components/block-list-appender/index.native.js +0 -69
- package/build/components/block-list-appender/index.native.js.map +0 -1
- package/build/components/block-media-update-progress/index.native.js +0 -287
- package/build/components/block-media-update-progress/index.native.js.map +0 -1
- package/build/components/block-mover/index.native.js +0 -173
- package/build/components/block-mover/index.native.js.map +0 -1
- package/build/components/block-mover/mover-description.native.js +0 -130
- package/build/components/block-mover/mover-description.native.js.map +0 -1
- package/build/components/block-settings/button.native.js +0 -44
- package/build/components/block-settings/button.native.js.map +0 -1
- package/build/components/block-settings/container.native.js +0 -84
- package/build/components/block-settings/container.native.js.map +0 -1
- package/build/components/block-settings/index.native.js +0 -29
- package/build/components/block-settings/index.native.js.map +0 -1
- package/build/components/block-styles/index.native.js +0 -89
- package/build/components/block-styles/index.native.js.map +0 -1
- package/build/components/block-styles/preview.native.js +0 -96
- package/build/components/block-styles/preview.native.js.map +0 -1
- package/build/components/block-switcher/block-transformations-menu.native.js +0 -79
- package/build/components/block-switcher/block-transformations-menu.native.js.map +0 -1
- package/build/components/block-toolbar/block-toolbar-menu.native.js +0 -378
- package/build/components/block-toolbar/block-toolbar-menu.native.js.map +0 -1
- package/build/components/block-toolbar/index.native.js +0 -108
- package/build/components/block-toolbar/index.native.js.map +0 -1
- package/build/components/block-types-list/index.native.js +0 -141
- package/build/components/block-types-list/index.native.js.map +0 -1
- package/build/components/block-variation-picker/index.native.js +0 -91
- package/build/components/block-variation-picker/index.native.js.map +0 -1
- package/build/components/button-block-appender/index.native.js +0 -82
- package/build/components/button-block-appender/index.native.js.map +0 -1
- package/build/components/caption/index.native.js +0 -62
- package/build/components/caption/index.native.js.map +0 -1
- package/build/components/colors-gradients/panel-color-gradient-settings.native.js +0 -62
- package/build/components/colors-gradients/panel-color-gradient-settings.native.js.map +0 -1
- package/build/components/contrast-checker/index.native.js +0 -91
- package/build/components/contrast-checker/index.native.js.map +0 -1
- package/build/components/convert-to-group-buttons/index.native.js +0 -82
- package/build/components/convert-to-group-buttons/index.native.js.map +0 -1
- package/build/components/default-block-appender/index.native.js +0 -113
- package/build/components/default-block-appender/index.native.js.map +0 -1
- package/build/components/floating-toolbar/index.native.js +0 -126
- package/build/components/floating-toolbar/index.native.js.map +0 -1
- package/build/components/font-sizes/index.native.js +0 -40
- package/build/components/font-sizes/index.native.js.map +0 -1
- package/build/components/global-styles/color-panel.native.js +0 -146
- package/build/components/global-styles/color-panel.native.js.map +0 -1
- package/build/components/global-styles/use-global-styles-context.native.js +0 -456
- package/build/components/global-styles/use-global-styles-context.native.js.map +0 -1
- package/build/components/gradients/index.native.js +0 -28
- package/build/components/gradients/index.native.js.map +0 -1
- package/build/components/image-link-destinations/index.native.js +0 -127
- package/build/components/image-link-destinations/index.native.js.map +0 -1
- package/build/components/index.native.js +0 -657
- package/build/components/index.native.js.map +0 -1
- package/build/components/inner-blocks/constants.native.js +0 -12
- package/build/components/inner-blocks/constants.native.js.map +0 -1
- package/build/components/inner-blocks/index.native.js +0 -208
- package/build/components/inner-blocks/index.native.js.map +0 -1
- package/build/components/inner-blocks/warning-max-depth-exceeded.native.js +0 -95
- package/build/components/inner-blocks/warning-max-depth-exceeded.native.js.map +0 -1
- package/build/components/inserter/block-types-tab.native.js +0 -72
- package/build/components/inserter/block-types-tab.native.js.map +0 -1
- package/build/components/inserter/hooks/use-block-type-impressions.native.js +0 -62
- package/build/components/inserter/hooks/use-block-type-impressions.native.js.map +0 -1
- package/build/components/inserter/hooks/use-clipboard-block.native.js +0 -51
- package/build/components/inserter/hooks/use-clipboard-block.native.js.map +0 -1
- package/build/components/inserter/index.native.js +0 -369
- package/build/components/inserter/index.native.js.map +0 -1
- package/build/components/inserter/menu.native.js +0 -189
- package/build/components/inserter/menu.native.js.map +0 -1
- package/build/components/inserter/no-results.native.js +0 -49
- package/build/components/inserter/no-results.native.js.map +0 -1
- package/build/components/inserter/reusable-blocks-tab.native.js +0 -57
- package/build/components/inserter/reusable-blocks-tab.native.js.map +0 -1
- package/build/components/inserter/search-results.native.js +0 -71
- package/build/components/inserter/search-results.native.js.map +0 -1
- package/build/components/inserter/tabs.native.js +0 -140
- package/build/components/inserter/tabs.native.js.map +0 -1
- package/build/components/inserter/utils.native.js +0 -56
- package/build/components/inserter/utils.native.js.map +0 -1
- package/build/components/inserter-button/index.native.js +0 -92
- package/build/components/inserter-button/index.native.js.map +0 -1
- package/build/components/inspector-controls/fill.native.js +0 -63
- package/build/components/inspector-controls/fill.native.js.map +0 -1
- package/build/components/inspector-controls/slot.native.js +0 -42
- package/build/components/inspector-controls/slot.native.js.map +0 -1
- package/build/components/inspector-controls-tabs/advanced-controls-panel.native.js +0 -38
- package/build/components/inspector-controls-tabs/advanced-controls-panel.native.js.map +0 -1
- package/build/components/line-height-control/index.native.js +0 -40
- package/build/components/line-height-control/index.native.js.map +0 -1
- package/build/components/media-placeholder/index.native.js +0 -200
- package/build/components/media-placeholder/index.native.js.map +0 -1
- package/build/components/media-replace-flow/index.native.js +0 -21
- package/build/components/media-replace-flow/index.native.js.map +0 -1
- package/build/components/media-upload/constants.native.js +0 -20
- package/build/components/media-upload/constants.native.js.map +0 -1
- package/build/components/media-upload/index.native.js +0 -294
- package/build/components/media-upload/index.native.js.map +0 -1
- package/build/components/media-upload-progress/index.native.js +0 -203
- package/build/components/media-upload-progress/index.native.js.map +0 -1
- package/build/components/plain-text/index.native.js +0 -157
- package/build/components/plain-text/index.native.js.map +0 -1
- package/build/components/provider/index.native.js +0 -42
- package/build/components/provider/index.native.js.map +0 -1
- package/build/components/rich-text/embed-handler-picker.native.js +0 -54
- package/build/components/rich-text/embed-handler-picker.native.js.map +0 -1
- package/build/components/rich-text/file-paste-handler.native.js +0 -10
- package/build/components/rich-text/file-paste-handler.native.js.map +0 -1
- package/build/components/rich-text/format-toolbar/index.native.js +0 -23
- package/build/components/rich-text/format-toolbar/index.native.js.map +0 -1
- package/build/components/rich-text/format-toolbar-container.native.js +0 -23
- package/build/components/rich-text/format-toolbar-container.native.js.map +0 -1
- package/build/components/rich-text/index.native.js +0 -601
- package/build/components/rich-text/index.native.js.map +0 -1
- package/build/components/rich-text/input-event.native.js +0 -18
- package/build/components/rich-text/input-event.native.js.map +0 -1
- package/build/components/rich-text/native/get-format-colors.native.js +0 -39
- package/build/components/rich-text/native/get-format-colors.native.js.map +0 -1
- package/build/components/rich-text/native/index.native.js +0 -1184
- package/build/components/rich-text/native/index.native.js.map +0 -1
- package/build/components/rich-text/native/toolbar-button-with-options.native.js +0 -60
- package/build/components/rich-text/native/toolbar-button-with-options.native.js.map +0 -1
- package/build/components/rich-text/remove-browser-shortcuts.native.js +0 -9
- package/build/components/rich-text/remove-browser-shortcuts.native.js.map +0 -1
- package/build/components/rich-text/shortcut.native.js +0 -18
- package/build/components/rich-text/shortcut.native.js.map +0 -1
- package/build/components/tool-selector/index.js +0 -90
- package/build/components/tool-selector/index.js.map +0 -1
- package/build/components/ungroup-button/index.native.js +0 -77
- package/build/components/ungroup-button/index.native.js.map +0 -1
- package/build/components/unsupported-block-details/index.native.js +0 -129
- package/build/components/unsupported-block-details/index.native.js.map +0 -1
- package/build/components/url-input/index.native.js +0 -39
- package/build/components/url-input/index.native.js.map +0 -1
- package/build/components/use-block-drop-zone/index.native.js +0 -192
- package/build/components/use-block-drop-zone/index.native.js.map +0 -1
- package/build/components/use-on-block-drop/index.native.js +0 -89
- package/build/components/use-on-block-drop/index.native.js.map +0 -1
- package/build/components/use-unsupported-block-editor/index.native.js +0 -57
- package/build/components/use-unsupported-block-editor/index.native.js.map +0 -1
- package/build/components/video-player/gridicon-play.native.js +0 -20
- package/build/components/video-player/gridicon-play.native.js.map +0 -1
- package/build/components/video-player/index.native.js +0 -135
- package/build/components/video-player/index.native.js.map +0 -1
- package/build/components/warning/index.native.js +0 -63
- package/build/components/warning/index.native.js.map +0 -1
- package/build/hooks/align.native.js +0 -56
- package/build/hooks/align.native.js.map +0 -1
- package/build/hooks/custom-class-name.native.js +0 -66
- package/build/hooks/custom-class-name.native.js.map +0 -1
- package/build/hooks/index.native.js +0 -85
- package/build/hooks/index.native.js.map +0 -1
- package/build/hooks/layout.native.js +0 -20
- package/build/hooks/layout.native.js.map +0 -1
- package/build/hooks/typography.native.js +0 -76
- package/build/hooks/typography.native.js.map +0 -1
- package/build/hooks/use-editor-wrapper-styles.native.js +0 -227
- package/build/hooks/use-editor-wrapper-styles.native.js.map +0 -1
- package/build/index.native.js +0 -28
- package/build/index.native.js.map +0 -1
- package/build/private-apis.native.js +0 -31
- package/build/private-apis.native.js.map +0 -1
- package/build/store/defaults.native.js +0 -31
- package/build/store/defaults.native.js.map +0 -1
- package/build-module/components/audio-player/audio-url-parser.native.js +0 -16
- package/build-module/components/audio-player/audio-url-parser.native.js.map +0 -1
- package/build-module/components/audio-player/index.native.js +0 -166
- package/build-module/components/audio-player/index.native.js.map +0 -1
- package/build-module/components/block-alignment-control/ui.native.js +0 -72
- package/build-module/components/block-alignment-control/ui.native.js.map +0 -1
- package/build-module/components/block-caption/index.native.js +0 -87
- package/build-module/components/block-caption/index.native.js.map +0 -1
- package/build-module/components/block-controls/slot.native.js +0 -38
- package/build-module/components/block-controls/slot.native.js.map +0 -1
- package/build-module/components/block-draggable/draggable-chip.native.js +0 -50
- package/build-module/components/block-draggable/draggable-chip.native.js.map +0 -1
- package/build-module/components/block-draggable/dropping-insertion-point.native.js +0 -126
- package/build-module/components/block-draggable/dropping-insertion-point.native.js.map +0 -1
- package/build-module/components/block-draggable/index.native.js +0 -422
- package/build-module/components/block-draggable/index.native.js.map +0 -1
- package/build-module/components/block-draggable/use-scroll-when-dragging.native.js +0 -111
- package/build-module/components/block-draggable/use-scroll-when-dragging.native.js.map +0 -1
- package/build-module/components/block-edit/edit.native.js +0 -44
- package/build-module/components/block-edit/edit.native.js.map +0 -1
- package/build-module/components/block-heading-level-dropdown/index.native.js +0 -60
- package/build-module/components/block-heading-level-dropdown/index.native.js.map +0 -1
- package/build-module/components/block-icon/index.native.js +0 -47
- package/build-module/components/block-icon/index.native.js.map +0 -1
- package/build-module/components/block-list/block-crash-boundary.native.js +0 -42
- package/build-module/components/block-list/block-crash-boundary.native.js.map +0 -1
- package/build-module/components/block-list/block-crash-warning.native.js +0 -15
- package/build-module/components/block-list/block-crash-warning.native.js.map +0 -1
- package/build-module/components/block-list/block-invalid-warning.native.js +0 -71
- package/build-module/components/block-list/block-invalid-warning.native.js.map +0 -1
- package/build-module/components/block-list/block-list-context.native.js +0 -160
- package/build-module/components/block-list/block-list-context.native.js.map +0 -1
- package/build-module/components/block-list/block-list-item-cell.native.js +0 -67
- package/build-module/components/block-list/block-list-item-cell.native.js.map +0 -1
- package/build-module/components/block-list/block-list-item.native.js +0 -185
- package/build-module/components/block-list/block-list-item.native.js.map +0 -1
- package/build-module/components/block-list/block-outline.native.js +0 -53
- package/build-module/components/block-list/block-outline.native.js.map +0 -1
- package/build-module/components/block-list/block-selection-button.native.js +0 -90
- package/build-module/components/block-list/block-selection-button.native.js.map +0 -1
- package/build-module/components/block-list/block.native.js +0 -530
- package/build-module/components/block-list/block.native.js.map +0 -1
- package/build-module/components/block-list/grid-item.native.js +0 -55
- package/build-module/components/block-list/grid-item.native.js.map +0 -1
- package/build-module/components/block-list/index.native.js +0 -343
- package/build-module/components/block-list/index.native.js.map +0 -1
- package/build-module/components/block-list/insertion-point.native.js +0 -37
- package/build-module/components/block-list/insertion-point.native.js.map +0 -1
- package/build-module/components/block-list/use-block-props/index.native.js +0 -17
- package/build-module/components/block-list/use-block-props/index.native.js.map +0 -1
- package/build-module/components/block-list/use-scroll-upon-insertion.native.js +0 -33
- package/build-module/components/block-list/use-scroll-upon-insertion.native.js.map +0 -1
- package/build-module/components/block-list-appender/index.native.js +0 -61
- package/build-module/components/block-list-appender/index.native.js.map +0 -1
- package/build-module/components/block-media-update-progress/index.native.js +0 -278
- package/build-module/components/block-media-update-progress/index.native.js.map +0 -1
- package/build-module/components/block-mover/index.native.js +0 -165
- package/build-module/components/block-mover/index.native.js.map +0 -1
- package/build-module/components/block-mover/mover-description.native.js +0 -122
- package/build-module/components/block-mover/mover-description.native.js.map +0 -1
- package/build-module/components/block-settings/button.native.js +0 -37
- package/build-module/components/block-settings/button.native.js.map +0 -1
- package/build-module/components/block-settings/container.native.js +0 -75
- package/build-module/components/block-settings/container.native.js.map +0 -1
- package/build-module/components/block-settings/index.native.js +0 -3
- package/build-module/components/block-settings/index.native.js.map +0 -1
- package/build-module/components/block-styles/index.native.js +0 -81
- package/build-module/components/block-styles/index.native.js.map +0 -1
- package/build-module/components/block-styles/preview.native.js +0 -88
- package/build-module/components/block-styles/preview.native.js.map +0 -1
- package/build-module/components/block-switcher/block-transformations-menu.native.js +0 -72
- package/build-module/components/block-switcher/block-transformations-menu.native.js.map +0 -1
- package/build-module/components/block-toolbar/block-toolbar-menu.native.js +0 -369
- package/build-module/components/block-toolbar/block-toolbar-menu.native.js.map +0 -1
- package/build-module/components/block-toolbar/index.native.js +0 -100
- package/build-module/components/block-toolbar/index.native.js.map +0 -1
- package/build-module/components/block-types-list/index.native.js +0 -133
- package/build-module/components/block-types-list/index.native.js.map +0 -1
- package/build-module/components/block-variation-picker/index.native.js +0 -83
- package/build-module/components/block-variation-picker/index.native.js.map +0 -1
- package/build-module/components/button-block-appender/index.native.js +0 -74
- package/build-module/components/button-block-appender/index.native.js.map +0 -1
- package/build-module/components/caption/index.native.js +0 -55
- package/build-module/components/caption/index.native.js.map +0 -1
- package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js +0 -55
- package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js.map +0 -1
- package/build-module/components/contrast-checker/index.native.js +0 -82
- package/build-module/components/contrast-checker/index.native.js.map +0 -1
- package/build-module/components/convert-to-group-buttons/index.native.js +0 -69
- package/build-module/components/convert-to-group-buttons/index.native.js.map +0 -1
- package/build-module/components/default-block-appender/index.native.js +0 -104
- package/build-module/components/default-block-appender/index.native.js.map +0 -1
- package/build-module/components/floating-toolbar/index.native.js +0 -118
- package/build-module/components/floating-toolbar/index.native.js.map +0 -1
- package/build-module/components/font-sizes/index.native.js +0 -4
- package/build-module/components/font-sizes/index.native.js.map +0 -1
- package/build-module/components/global-styles/color-panel.native.js +0 -133
- package/build-module/components/global-styles/color-panel.native.js.map +0 -1
- package/build-module/components/global-styles/use-global-styles-context.native.js +0 -437
- package/build-module/components/global-styles/use-global-styles-context.native.js.map +0 -1
- package/build-module/components/gradients/index.native.js +0 -3
- package/build-module/components/gradients/index.native.js.map +0 -1
- package/build-module/components/image-link-destinations/index.native.js +0 -119
- package/build-module/components/image-link-destinations/index.native.js.map +0 -1
- package/build-module/components/index.native.js +0 -58
- package/build-module/components/index.native.js.map +0 -1
- package/build-module/components/inner-blocks/constants.native.js +0 -6
- package/build-module/components/inner-blocks/constants.native.js.map +0 -1
- package/build-module/components/inner-blocks/index.native.js +0 -200
- package/build-module/components/inner-blocks/index.native.js.map +0 -1
- package/build-module/components/inner-blocks/warning-max-depth-exceeded.native.js +0 -87
- package/build-module/components/inner-blocks/warning-max-depth-exceeded.native.js.map +0 -1
- package/build-module/components/inserter/block-types-tab.native.js +0 -64
- package/build-module/components/inserter/block-types-tab.native.js.map +0 -1
- package/build-module/components/inserter/hooks/use-block-type-impressions.native.js +0 -55
- package/build-module/components/inserter/hooks/use-block-type-impressions.native.js.map +0 -1
- package/build-module/components/inserter/hooks/use-clipboard-block.native.js +0 -44
- package/build-module/components/inserter/hooks/use-clipboard-block.native.js.map +0 -1
- package/build-module/components/inserter/index.native.js +0 -360
- package/build-module/components/inserter/index.native.js.map +0 -1
- package/build-module/components/inserter/menu.native.js +0 -181
- package/build-module/components/inserter/menu.native.js.map +0 -1
- package/build-module/components/inserter/no-results.native.js +0 -41
- package/build-module/components/inserter/no-results.native.js.map +0 -1
- package/build-module/components/inserter/reusable-blocks-tab.native.js +0 -49
- package/build-module/components/inserter/reusable-blocks-tab.native.js.map +0 -1
- package/build-module/components/inserter/search-results.native.js +0 -63
- package/build-module/components/inserter/search-results.native.js.map +0 -1
- package/build-module/components/inserter/tabs.native.js +0 -132
- package/build-module/components/inserter/tabs.native.js.map +0 -1
- package/build-module/components/inserter/utils.native.js +0 -48
- package/build-module/components/inserter/utils.native.js.map +0 -1
- package/build-module/components/inserter-button/index.native.js +0 -84
- package/build-module/components/inserter-button/index.native.js.map +0 -1
- package/build-module/components/inspector-controls/fill.native.js +0 -55
- package/build-module/components/inspector-controls/fill.native.js.map +0 -1
- package/build-module/components/inspector-controls/slot.native.js +0 -34
- package/build-module/components/inspector-controls/slot.native.js.map +0 -1
- package/build-module/components/inspector-controls-tabs/advanced-controls-panel.native.js +0 -30
- package/build-module/components/inspector-controls-tabs/advanced-controls-panel.native.js.map +0 -1
- package/build-module/components/line-height-control/index.native.js +0 -32
- package/build-module/components/line-height-control/index.native.js.map +0 -1
- package/build-module/components/media-placeholder/index.native.js +0 -192
- package/build-module/components/media-placeholder/index.native.js.map +0 -1
- package/build-module/components/media-replace-flow/index.native.js +0 -15
- package/build-module/components/media-replace-flow/index.native.js.map +0 -1
- package/build-module/components/media-upload/constants.native.js +0 -13
- package/build-module/components/media-upload/constants.native.js.map +0 -1
- package/build-module/components/media-upload/index.native.js +0 -285
- package/build-module/components/media-upload/index.native.js.map +0 -1
- package/build-module/components/media-upload-progress/index.native.js +0 -194
- package/build-module/components/media-upload-progress/index.native.js.map +0 -1
- package/build-module/components/plain-text/index.native.js +0 -148
- package/build-module/components/plain-text/index.native.js.map +0 -1
- package/build-module/components/provider/index.native.js +0 -37
- package/build-module/components/provider/index.native.js.map +0 -1
- package/build-module/components/rich-text/embed-handler-picker.native.js +0 -47
- package/build-module/components/rich-text/embed-handler-picker.native.js.map +0 -1
- package/build-module/components/rich-text/file-paste-handler.native.js +0 -4
- package/build-module/components/rich-text/file-paste-handler.native.js.map +0 -1
- package/build-module/components/rich-text/format-toolbar/index.native.js +0 -17
- package/build-module/components/rich-text/format-toolbar/index.native.js.map +0 -1
- package/build-module/components/rich-text/format-toolbar-container.native.js +0 -15
- package/build-module/components/rich-text/format-toolbar-container.native.js.map +0 -1
- package/build-module/components/rich-text/index.native.js +0 -573
- package/build-module/components/rich-text/index.native.js.map +0 -1
- package/build-module/components/rich-text/input-event.native.js +0 -10
- package/build-module/components/rich-text/input-event.native.js.map +0 -1
- package/build-module/components/rich-text/native/get-format-colors.native.js +0 -32
- package/build-module/components/rich-text/native/get-format-colors.native.js.map +0 -1
- package/build-module/components/rich-text/native/index.native.js +0 -1176
- package/build-module/components/rich-text/native/index.native.js.map +0 -1
- package/build-module/components/rich-text/native/toolbar-button-with-options.native.js +0 -55
- package/build-module/components/rich-text/native/toolbar-button-with-options.native.js.map +0 -1
- package/build-module/components/rich-text/remove-browser-shortcuts.native.js +0 -2
- package/build-module/components/rich-text/remove-browser-shortcuts.native.js.map +0 -1
- package/build-module/components/rich-text/shortcut.native.js +0 -10
- package/build-module/components/rich-text/shortcut.native.js.map +0 -1
- package/build-module/components/tool-selector/index.js +0 -83
- package/build-module/components/tool-selector/index.js.map +0 -1
- package/build-module/components/ungroup-button/index.native.js +0 -69
- package/build-module/components/ungroup-button/index.native.js.map +0 -1
- package/build-module/components/unsupported-block-details/index.native.js +0 -121
- package/build-module/components/unsupported-block-details/index.native.js.map +0 -1
- package/build-module/components/url-input/index.native.js +0 -32
- package/build-module/components/url-input/index.native.js.map +0 -1
- package/build-module/components/use-block-drop-zone/index.native.js +0 -183
- package/build-module/components/use-block-drop-zone/index.native.js.map +0 -1
- package/build-module/components/use-on-block-drop/index.native.js +0 -82
- package/build-module/components/use-on-block-drop/index.native.js.map +0 -1
- package/build-module/components/use-unsupported-block-editor/index.native.js +0 -51
- package/build-module/components/use-unsupported-block-editor/index.native.js.map +0 -1
- package/build-module/components/video-player/gridicon-play.native.js +0 -14
- package/build-module/components/video-player/gridicon-play.native.js.map +0 -1
- package/build-module/components/video-player/index.native.js +0 -128
- package/build-module/components/video-player/index.native.js.map +0 -1
- package/build-module/components/warning/index.native.js +0 -55
- package/build-module/components/warning/index.native.js.map +0 -1
- package/build-module/hooks/align.native.js +0 -32
- package/build-module/hooks/align.native.js.map +0 -1
- package/build-module/hooks/custom-class-name.native.js +0 -57
- package/build-module/hooks/custom-class-name.native.js.map +0 -1
- package/build-module/hooks/index.native.js +0 -24
- package/build-module/hooks/index.native.js.map +0 -1
- package/build-module/hooks/layout.native.js +0 -18
- package/build-module/hooks/layout.native.js.map +0 -1
- package/build-module/hooks/typography.native.js +0 -68
- package/build-module/hooks/typography.native.js.map +0 -1
- package/build-module/hooks/use-editor-wrapper-styles.native.js +0 -219
- package/build-module/hooks/use-editor-wrapper-styles.native.js.map +0 -1
- package/build-module/index.native.js +0 -6
- package/build-module/index.native.js.map +0 -1
- package/build-module/private-apis.native.js +0 -22
- package/build-module/private-apis.native.js.map +0 -1
- package/build-module/store/defaults.native.js +0 -19
- package/build-module/store/defaults.native.js.map +0 -1
- package/src/components/tool-selector/index.js +0 -107
- package/src/components/tool-selector/style.scss +0 -15
|
@@ -1,222 +1,100 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}) => {
|
|
32
|
-
dispatch({
|
|
33
|
-
type: 'RESET_BLOCKS',
|
|
34
|
-
blocks
|
|
35
|
-
});
|
|
1
|
+
import {
|
|
2
|
+
cloneBlock,
|
|
3
|
+
__experimentalCloneSanitizedBlock,
|
|
4
|
+
createBlock,
|
|
5
|
+
doBlocksMatchTemplate,
|
|
6
|
+
getBlockType,
|
|
7
|
+
getDefaultBlockName,
|
|
8
|
+
hasBlockSupport,
|
|
9
|
+
switchToBlockType,
|
|
10
|
+
synchronizeBlocksWithTemplate,
|
|
11
|
+
getBlockSupport,
|
|
12
|
+
isUnmodifiedDefaultBlock,
|
|
13
|
+
isUnmodifiedBlock
|
|
14
|
+
} from "@wordpress/blocks";
|
|
15
|
+
import { speak } from "@wordpress/a11y";
|
|
16
|
+
import { __, _n, sprintf } from "@wordpress/i18n";
|
|
17
|
+
import { store as noticesStore } from "@wordpress/notices";
|
|
18
|
+
import { create, insert, remove, toHTMLString } from "@wordpress/rich-text";
|
|
19
|
+
import deprecated from "@wordpress/deprecated";
|
|
20
|
+
import { store as preferencesStore } from "@wordpress/preferences";
|
|
21
|
+
import {
|
|
22
|
+
retrieveSelectedAttribute,
|
|
23
|
+
findRichTextAttributeKey,
|
|
24
|
+
START_OF_SELECTED_AREA
|
|
25
|
+
} from "../utils/selection";
|
|
26
|
+
import {
|
|
27
|
+
__experimentalUpdateSettings,
|
|
28
|
+
privateRemoveBlocks
|
|
29
|
+
} from "./private-actions";
|
|
30
|
+
const castArray = (maybeArray) => Array.isArray(maybeArray) ? maybeArray : [maybeArray];
|
|
31
|
+
const resetBlocks = (blocks) => ({ dispatch }) => {
|
|
32
|
+
dispatch({ type: "RESET_BLOCKS", blocks });
|
|
36
33
|
dispatch(validateBlocksToTemplate(blocks));
|
|
37
34
|
};
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Block validity is a function of blocks state (at the point of a
|
|
41
|
-
* reset) and the template setting. As a compromise to its placement
|
|
42
|
-
* across distinct parts of state, it is implemented here as a side
|
|
43
|
-
* effect of the block reset action.
|
|
44
|
-
*
|
|
45
|
-
* @param {Array} blocks Array of blocks.
|
|
46
|
-
*/
|
|
47
|
-
export const validateBlocksToTemplate = blocks => ({
|
|
48
|
-
select,
|
|
49
|
-
dispatch
|
|
50
|
-
}) => {
|
|
35
|
+
const validateBlocksToTemplate = (blocks) => ({ select, dispatch }) => {
|
|
51
36
|
const template = select.getTemplate();
|
|
52
37
|
const templateLock = select.getTemplateLock();
|
|
53
|
-
|
|
54
|
-
// Unlocked templates are considered always valid because they act
|
|
55
|
-
// as default values only.
|
|
56
|
-
const isBlocksValidToTemplate = !template || templateLock !== 'all' || doBlocksMatchTemplate(blocks, template);
|
|
57
|
-
|
|
58
|
-
// Update if validity has changed.
|
|
38
|
+
const isBlocksValidToTemplate = !template || templateLock !== "all" || doBlocksMatchTemplate(blocks, template);
|
|
59
39
|
const isValidTemplate = select.isValidTemplate();
|
|
60
40
|
if (isBlocksValidToTemplate !== isValidTemplate) {
|
|
61
41
|
dispatch.setTemplateValidity(isBlocksValidToTemplate);
|
|
62
42
|
return isBlocksValidToTemplate;
|
|
63
43
|
}
|
|
64
44
|
};
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* A block selection object.
|
|
68
|
-
*
|
|
69
|
-
* @typedef {Object} WPBlockSelection
|
|
70
|
-
*
|
|
71
|
-
* @property {string} clientId A block client ID.
|
|
72
|
-
* @property {string} attributeKey A block attribute key.
|
|
73
|
-
* @property {number} offset An attribute value offset, based on the rich
|
|
74
|
-
* text value. See `wp.richText.create`.
|
|
75
|
-
*/
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* A selection object.
|
|
79
|
-
*
|
|
80
|
-
* @typedef {Object} WPSelection
|
|
81
|
-
*
|
|
82
|
-
* @property {WPBlockSelection} start The selection start.
|
|
83
|
-
* @property {WPBlockSelection} end The selection end.
|
|
84
|
-
*/
|
|
85
|
-
|
|
86
|
-
/* eslint-disable jsdoc/valid-types */
|
|
87
|
-
/**
|
|
88
|
-
* Returns an action object used in signalling that selection state should be
|
|
89
|
-
* reset to the specified selection.
|
|
90
|
-
*
|
|
91
|
-
* @param {WPBlockSelection} selectionStart The selection start.
|
|
92
|
-
* @param {WPBlockSelection} selectionEnd The selection end.
|
|
93
|
-
* @param {0|-1|null} initialPosition Initial block position.
|
|
94
|
-
*
|
|
95
|
-
* @return {Object} Action object.
|
|
96
|
-
*/
|
|
97
|
-
export function resetSelection(selectionStart, selectionEnd, initialPosition) {
|
|
98
|
-
/* eslint-enable jsdoc/valid-types */
|
|
45
|
+
function resetSelection(selectionStart, selectionEnd, initialPosition) {
|
|
99
46
|
return {
|
|
100
|
-
type:
|
|
47
|
+
type: "RESET_SELECTION",
|
|
101
48
|
selectionStart,
|
|
102
49
|
selectionEnd,
|
|
103
50
|
initialPosition
|
|
104
51
|
};
|
|
105
52
|
}
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* Returns an action object used in signalling that blocks have been received.
|
|
109
|
-
* Unlike resetBlocks, these should be appended to the existing known set, not
|
|
110
|
-
* replacing.
|
|
111
|
-
*
|
|
112
|
-
* @deprecated
|
|
113
|
-
*
|
|
114
|
-
* @param {Object[]} blocks Array of block objects.
|
|
115
|
-
*
|
|
116
|
-
* @return {Object} Action object.
|
|
117
|
-
*/
|
|
118
|
-
export function receiveBlocks(blocks) {
|
|
53
|
+
function receiveBlocks(blocks) {
|
|
119
54
|
deprecated('wp.data.dispatch( "core/block-editor" ).receiveBlocks', {
|
|
120
|
-
since:
|
|
121
|
-
alternative:
|
|
55
|
+
since: "5.9",
|
|
56
|
+
alternative: "resetBlocks or insertBlocks"
|
|
122
57
|
});
|
|
123
58
|
return {
|
|
124
|
-
type:
|
|
59
|
+
type: "RECEIVE_BLOCKS",
|
|
125
60
|
blocks
|
|
126
61
|
};
|
|
127
62
|
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
*
|
|
132
|
-
* @param {string|string[]} clientIds Block client IDs.
|
|
133
|
-
* @param {Object} attributes Block attributes to be merged. Should be keyed by clientIds if `options.uniqueByBlock` is true.
|
|
134
|
-
* @param {Object} options Updating options.
|
|
135
|
-
* @param {boolean} [options.uniqueByBlock=false] Whether each block in clientIds array has a unique set of attributes.
|
|
136
|
-
* @return {Object} Action object.
|
|
137
|
-
*/
|
|
138
|
-
export function updateBlockAttributes(clientIds, attributes, options = {
|
|
139
|
-
uniqueByBlock: false
|
|
140
|
-
}) {
|
|
141
|
-
if (typeof options === 'boolean') {
|
|
142
|
-
options = {
|
|
143
|
-
uniqueByBlock: options
|
|
144
|
-
};
|
|
63
|
+
function updateBlockAttributes(clientIds, attributes, options = { uniqueByBlock: false }) {
|
|
64
|
+
if (typeof options === "boolean") {
|
|
65
|
+
options = { uniqueByBlock: options };
|
|
145
66
|
}
|
|
146
67
|
return {
|
|
147
|
-
type:
|
|
68
|
+
type: "UPDATE_BLOCK_ATTRIBUTES",
|
|
148
69
|
clientIds: castArray(clientIds),
|
|
149
70
|
attributes,
|
|
150
71
|
options
|
|
151
72
|
};
|
|
152
73
|
}
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
* Action that updates the block with the specified client ID.
|
|
156
|
-
*
|
|
157
|
-
* @param {string} clientId Block client ID.
|
|
158
|
-
* @param {Object} updates Block attributes to be merged.
|
|
159
|
-
*
|
|
160
|
-
* @return {Object} Action object.
|
|
161
|
-
*/
|
|
162
|
-
export function updateBlock(clientId, updates) {
|
|
74
|
+
function updateBlock(clientId, updates) {
|
|
163
75
|
return {
|
|
164
|
-
type:
|
|
76
|
+
type: "UPDATE_BLOCK",
|
|
165
77
|
clientId,
|
|
166
78
|
updates
|
|
167
79
|
};
|
|
168
80
|
}
|
|
169
|
-
|
|
170
|
-
/* eslint-disable jsdoc/valid-types */
|
|
171
|
-
/**
|
|
172
|
-
* Returns an action object used in signalling that the block with the
|
|
173
|
-
* specified client ID has been selected, optionally accepting a position
|
|
174
|
-
* value reflecting its selection directionality. An initialPosition of -1
|
|
175
|
-
* reflects a reverse selection.
|
|
176
|
-
*
|
|
177
|
-
* @param {string} clientId Block client ID.
|
|
178
|
-
* @param {0|-1|null} initialPosition Optional initial position. Pass as -1 to
|
|
179
|
-
* reflect reverse selection.
|
|
180
|
-
*
|
|
181
|
-
* @return {Object} Action object.
|
|
182
|
-
*/
|
|
183
|
-
export function selectBlock(clientId, initialPosition = 0) {
|
|
184
|
-
/* eslint-enable jsdoc/valid-types */
|
|
81
|
+
function selectBlock(clientId, initialPosition = 0) {
|
|
185
82
|
return {
|
|
186
|
-
type:
|
|
83
|
+
type: "SELECT_BLOCK",
|
|
187
84
|
initialPosition,
|
|
188
85
|
clientId
|
|
189
86
|
};
|
|
190
87
|
}
|
|
191
|
-
|
|
192
|
-
/**
|
|
193
|
-
* Returns an action object used in signalling that the block with the
|
|
194
|
-
* specified client ID has been hovered.
|
|
195
|
-
*
|
|
196
|
-
* @deprecated
|
|
197
|
-
*/
|
|
198
|
-
export function hoverBlock() {
|
|
88
|
+
function hoverBlock() {
|
|
199
89
|
deprecated('wp.data.dispatch( "core/block-editor" ).hoverBlock', {
|
|
200
|
-
since:
|
|
201
|
-
version:
|
|
90
|
+
since: "6.9",
|
|
91
|
+
version: "7.1"
|
|
202
92
|
});
|
|
203
93
|
return {
|
|
204
|
-
type:
|
|
94
|
+
type: "DO_NOTHING"
|
|
205
95
|
};
|
|
206
96
|
}
|
|
207
|
-
|
|
208
|
-
/**
|
|
209
|
-
* Yields action objects used in signalling that the block preceding the given
|
|
210
|
-
* clientId (or optionally, its first parent from bottom to top)
|
|
211
|
-
* should be selected.
|
|
212
|
-
*
|
|
213
|
-
* @param {string} clientId Block client ID.
|
|
214
|
-
* @param {boolean} fallbackToParent If true, select the first parent if there is no previous block.
|
|
215
|
-
*/
|
|
216
|
-
export const selectPreviousBlock = (clientId, fallbackToParent = false) => ({
|
|
217
|
-
select,
|
|
218
|
-
dispatch
|
|
219
|
-
}) => {
|
|
97
|
+
const selectPreviousBlock = (clientId, fallbackToParent = false) => ({ select, dispatch }) => {
|
|
220
98
|
const previousBlockClientId = select.getPreviousBlockClientId(clientId);
|
|
221
99
|
if (previousBlockClientId) {
|
|
222
100
|
dispatch.selectBlock(previousBlockClientId, -1);
|
|
@@ -227,134 +105,72 @@ export const selectPreviousBlock = (clientId, fallbackToParent = false) => ({
|
|
|
227
105
|
}
|
|
228
106
|
}
|
|
229
107
|
};
|
|
230
|
-
|
|
231
|
-
/**
|
|
232
|
-
* Yields action objects used in signalling that the block following the given
|
|
233
|
-
* clientId should be selected.
|
|
234
|
-
*
|
|
235
|
-
* @param {string} clientId Block client ID.
|
|
236
|
-
*/
|
|
237
|
-
export const selectNextBlock = clientId => ({
|
|
238
|
-
select,
|
|
239
|
-
dispatch
|
|
240
|
-
}) => {
|
|
108
|
+
const selectNextBlock = (clientId) => ({ select, dispatch }) => {
|
|
241
109
|
const nextBlockClientId = select.getNextBlockClientId(clientId);
|
|
242
110
|
if (nextBlockClientId) {
|
|
243
111
|
dispatch.selectBlock(nextBlockClientId);
|
|
244
112
|
}
|
|
245
113
|
};
|
|
246
|
-
|
|
247
|
-
/**
|
|
248
|
-
* Action that starts block multi-selection.
|
|
249
|
-
*
|
|
250
|
-
* @return {Object} Action object.
|
|
251
|
-
*/
|
|
252
|
-
export function startMultiSelect() {
|
|
114
|
+
function startMultiSelect() {
|
|
253
115
|
return {
|
|
254
|
-
type:
|
|
116
|
+
type: "START_MULTI_SELECT"
|
|
255
117
|
};
|
|
256
118
|
}
|
|
257
|
-
|
|
258
|
-
/**
|
|
259
|
-
* Action that stops block multi-selection.
|
|
260
|
-
*
|
|
261
|
-
* @return {Object} Action object.
|
|
262
|
-
*/
|
|
263
|
-
export function stopMultiSelect() {
|
|
119
|
+
function stopMultiSelect() {
|
|
264
120
|
return {
|
|
265
|
-
type:
|
|
121
|
+
type: "STOP_MULTI_SELECT"
|
|
266
122
|
};
|
|
267
123
|
}
|
|
268
|
-
|
|
269
|
-
/**
|
|
270
|
-
* Action that changes block multi-selection.
|
|
271
|
-
*
|
|
272
|
-
* @param {string} start First block of the multi selection.
|
|
273
|
-
* @param {string} end Last block of the multiselection.
|
|
274
|
-
* @param {number|null} __experimentalInitialPosition Optional initial position. Pass as null to skip focus within editor canvas.
|
|
275
|
-
*/
|
|
276
|
-
export const multiSelect = (start, end, __experimentalInitialPosition = 0) => ({
|
|
277
|
-
select,
|
|
278
|
-
dispatch
|
|
279
|
-
}) => {
|
|
124
|
+
const multiSelect = (start, end, __experimentalInitialPosition = 0) => ({ select, dispatch }) => {
|
|
280
125
|
const startBlockRootClientId = select.getBlockRootClientId(start);
|
|
281
126
|
const endBlockRootClientId = select.getBlockRootClientId(end);
|
|
282
|
-
|
|
283
|
-
// Only allow block multi-selections at the same level.
|
|
284
127
|
if (startBlockRootClientId !== endBlockRootClientId) {
|
|
285
128
|
return;
|
|
286
129
|
}
|
|
287
130
|
dispatch({
|
|
288
|
-
type:
|
|
131
|
+
type: "MULTI_SELECT",
|
|
289
132
|
start,
|
|
290
133
|
end,
|
|
291
134
|
initialPosition: __experimentalInitialPosition
|
|
292
135
|
});
|
|
293
136
|
const blockCount = select.getSelectedBlockCount();
|
|
294
|
-
speak(
|
|
295
|
-
|
|
137
|
+
speak(
|
|
138
|
+
sprintf(
|
|
139
|
+
/* translators: %s: number of selected blocks */
|
|
140
|
+
_n("%s block selected.", "%s blocks selected.", blockCount),
|
|
141
|
+
blockCount
|
|
142
|
+
),
|
|
143
|
+
"assertive"
|
|
144
|
+
);
|
|
296
145
|
};
|
|
297
|
-
|
|
298
|
-
/**
|
|
299
|
-
* Action that clears the block selection.
|
|
300
|
-
*
|
|
301
|
-
* @return {Object} Action object.
|
|
302
|
-
*/
|
|
303
|
-
export function clearSelectedBlock() {
|
|
146
|
+
function clearSelectedBlock() {
|
|
304
147
|
return {
|
|
305
|
-
type:
|
|
148
|
+
type: "CLEAR_SELECTED_BLOCK"
|
|
306
149
|
};
|
|
307
150
|
}
|
|
308
|
-
|
|
309
|
-
/**
|
|
310
|
-
* Action that enables or disables block selection.
|
|
311
|
-
*
|
|
312
|
-
* @param {boolean} [isSelectionEnabled=true] Whether block selection should
|
|
313
|
-
* be enabled.
|
|
314
|
-
*
|
|
315
|
-
* @return {Object} Action object.
|
|
316
|
-
*/
|
|
317
|
-
export function toggleSelection(isSelectionEnabled = true) {
|
|
151
|
+
function toggleSelection(isSelectionEnabled = true) {
|
|
318
152
|
return {
|
|
319
|
-
type:
|
|
153
|
+
type: "TOGGLE_SELECTION",
|
|
320
154
|
isSelectionEnabled
|
|
321
155
|
};
|
|
322
156
|
}
|
|
323
|
-
|
|
324
|
-
/* eslint-disable jsdoc/valid-types */
|
|
325
|
-
/**
|
|
326
|
-
* Action that replaces given blocks with one or more replacement blocks.
|
|
327
|
-
*
|
|
328
|
-
* @param {(string|string[])} clientIds Block client ID(s) to replace.
|
|
329
|
-
* @param {(Object|Object[])} blocks Replacement block(s).
|
|
330
|
-
* @param {number} indexToSelect Index of replacement block to select.
|
|
331
|
-
* @param {0|-1|null} initialPosition Index of caret after in the selected block after the operation.
|
|
332
|
-
* @param {?Object} meta Optional Meta values to be passed to the action object.
|
|
333
|
-
*
|
|
334
|
-
* @return {Object} Action object.
|
|
335
|
-
*/
|
|
336
|
-
export const replaceBlocks = (clientIds, blocks, indexToSelect, initialPosition = 0, meta) => ({
|
|
337
|
-
select,
|
|
338
|
-
dispatch,
|
|
339
|
-
registry
|
|
340
|
-
}) => {
|
|
341
|
-
/* eslint-enable jsdoc/valid-types */
|
|
157
|
+
const replaceBlocks = (clientIds, blocks, indexToSelect, initialPosition = 0, meta) => ({ select, dispatch, registry }) => {
|
|
342
158
|
clientIds = castArray(clientIds);
|
|
343
159
|
blocks = castArray(blocks);
|
|
344
160
|
const rootClientId = select.getBlockRootClientId(clientIds[0]);
|
|
345
|
-
// Replace is valid if the new blocks can be inserted in the root block.
|
|
346
161
|
for (let index = 0; index < blocks.length; index++) {
|
|
347
162
|
const block = blocks[index];
|
|
348
|
-
const canInsertBlock = select.canInsertBlockType(
|
|
163
|
+
const canInsertBlock = select.canInsertBlockType(
|
|
164
|
+
block.name,
|
|
165
|
+
rootClientId
|
|
166
|
+
);
|
|
349
167
|
if (!canInsertBlock) {
|
|
350
168
|
return;
|
|
351
169
|
}
|
|
352
170
|
}
|
|
353
|
-
// We're batching these two actions because an extra `undo/redo` step can
|
|
354
|
-
// be created, based on whether we insert a default block or not.
|
|
355
171
|
registry.batch(() => {
|
|
356
172
|
dispatch({
|
|
357
|
-
type:
|
|
173
|
+
type: "REPLACE_BLOCKS",
|
|
358
174
|
clientIds,
|
|
359
175
|
blocks,
|
|
360
176
|
time: Date.now(),
|
|
@@ -362,164 +178,91 @@ export const replaceBlocks = (clientIds, blocks, indexToSelect, initialPosition
|
|
|
362
178
|
initialPosition,
|
|
363
179
|
meta
|
|
364
180
|
});
|
|
365
|
-
// To avoid a focus loss when removing the last block, assure there is
|
|
366
|
-
// always a default block if the last of the blocks have been removed.
|
|
367
181
|
dispatch.ensureDefaultBlock();
|
|
368
182
|
});
|
|
369
183
|
};
|
|
370
|
-
|
|
371
|
-
/**
|
|
372
|
-
* Action that replaces a single block with one or more replacement blocks.
|
|
373
|
-
*
|
|
374
|
-
* @param {(string|string[])} clientId Block client ID to replace.
|
|
375
|
-
* @param {(Object|Object[])} block Replacement block(s).
|
|
376
|
-
*
|
|
377
|
-
* @return {Object} Action object.
|
|
378
|
-
*/
|
|
379
|
-
export function replaceBlock(clientId, block) {
|
|
184
|
+
function replaceBlock(clientId, block) {
|
|
380
185
|
return replaceBlocks(clientId, block);
|
|
381
186
|
}
|
|
382
|
-
|
|
383
|
-
/**
|
|
384
|
-
* Higher-order action creator which, given the action type to dispatch creates
|
|
385
|
-
* an action creator for managing block movement.
|
|
386
|
-
*
|
|
387
|
-
* @param {string} type Action type to dispatch.
|
|
388
|
-
*
|
|
389
|
-
* @return {Function} Action creator.
|
|
390
|
-
*/
|
|
391
|
-
const createOnMove = type => (clientIds, rootClientId) => ({
|
|
392
|
-
select,
|
|
393
|
-
dispatch
|
|
394
|
-
}) => {
|
|
395
|
-
// If one of the blocks is locked or the parent is locked, we cannot move any block.
|
|
187
|
+
const createOnMove = (type) => (clientIds, rootClientId) => ({ select, dispatch }) => {
|
|
396
188
|
const canMoveBlocks = select.canMoveBlocks(clientIds);
|
|
397
189
|
if (!canMoveBlocks) {
|
|
398
190
|
return;
|
|
399
191
|
}
|
|
400
|
-
dispatch({
|
|
401
|
-
type,
|
|
402
|
-
clientIds: castArray(clientIds),
|
|
403
|
-
rootClientId
|
|
404
|
-
});
|
|
192
|
+
dispatch({ type, clientIds: castArray(clientIds), rootClientId });
|
|
405
193
|
};
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
/**
|
|
410
|
-
* Action that moves given blocks to a new position.
|
|
411
|
-
*
|
|
412
|
-
* @param {?string} clientIds The client IDs of the blocks.
|
|
413
|
-
* @param {?string} fromRootClientId Root client ID source.
|
|
414
|
-
* @param {?string} toRootClientId Root client ID destination.
|
|
415
|
-
* @param {number} index The index to move the blocks to.
|
|
416
|
-
*/
|
|
417
|
-
export const moveBlocksToPosition = (clientIds, fromRootClientId = '', toRootClientId = '', index) => ({
|
|
418
|
-
select,
|
|
419
|
-
dispatch
|
|
420
|
-
}) => {
|
|
194
|
+
const moveBlocksDown = createOnMove("MOVE_BLOCKS_DOWN");
|
|
195
|
+
const moveBlocksUp = createOnMove("MOVE_BLOCKS_UP");
|
|
196
|
+
const moveBlocksToPosition = (clientIds, fromRootClientId = "", toRootClientId = "", index) => ({ select, dispatch }) => {
|
|
421
197
|
const canMoveBlocks = select.canMoveBlocks(clientIds);
|
|
422
|
-
|
|
423
|
-
// If one of the blocks is locked or the parent is locked, we cannot move any block.
|
|
424
198
|
if (!canMoveBlocks) {
|
|
425
199
|
return;
|
|
426
200
|
}
|
|
427
|
-
|
|
428
|
-
// If moving inside the same root block the move is always possible.
|
|
429
201
|
if (fromRootClientId !== toRootClientId) {
|
|
430
202
|
const canRemoveBlocks = select.canRemoveBlocks(clientIds);
|
|
431
|
-
|
|
432
|
-
// If we're moving to another block, it means we're deleting blocks from
|
|
433
|
-
// the original block, so we need to check if removing is possible.
|
|
434
203
|
if (!canRemoveBlocks) {
|
|
435
204
|
return;
|
|
436
205
|
}
|
|
437
|
-
const canInsertBlocks = select.canInsertBlocks(
|
|
438
|
-
|
|
439
|
-
|
|
206
|
+
const canInsertBlocks = select.canInsertBlocks(
|
|
207
|
+
clientIds,
|
|
208
|
+
toRootClientId
|
|
209
|
+
);
|
|
440
210
|
if (!canInsertBlocks) {
|
|
441
211
|
return;
|
|
442
212
|
}
|
|
443
213
|
}
|
|
444
214
|
dispatch({
|
|
445
|
-
type:
|
|
215
|
+
type: "MOVE_BLOCKS_TO_POSITION",
|
|
446
216
|
fromRootClientId,
|
|
447
217
|
toRootClientId,
|
|
448
218
|
clientIds,
|
|
449
219
|
index
|
|
450
220
|
});
|
|
451
221
|
};
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
* @param {number} index The index to move the block to.
|
|
460
|
-
*/
|
|
461
|
-
export function moveBlockToPosition(clientId, fromRootClientId = '', toRootClientId = '', index) {
|
|
462
|
-
return moveBlocksToPosition([clientId], fromRootClientId, toRootClientId, index);
|
|
222
|
+
function moveBlockToPosition(clientId, fromRootClientId = "", toRootClientId = "", index) {
|
|
223
|
+
return moveBlocksToPosition(
|
|
224
|
+
[clientId],
|
|
225
|
+
fromRootClientId,
|
|
226
|
+
toRootClientId,
|
|
227
|
+
index
|
|
228
|
+
);
|
|
463
229
|
}
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
* @param {?string} rootClientId Optional root client ID of block list on which to insert.
|
|
474
|
-
* @param {?boolean} updateSelection If true block selection will be updated. If false, block selection will not change. Defaults to true.
|
|
475
|
-
* @param {?Object} meta Optional Meta values to be passed to the action object.
|
|
476
|
-
*
|
|
477
|
-
* @return {Object} Action object.
|
|
478
|
-
*/
|
|
479
|
-
export function insertBlock(block, index, rootClientId, updateSelection, meta) {
|
|
480
|
-
return insertBlocks([block], index, rootClientId, updateSelection, 0, meta);
|
|
230
|
+
function insertBlock(block, index, rootClientId, updateSelection, meta) {
|
|
231
|
+
return insertBlocks(
|
|
232
|
+
[block],
|
|
233
|
+
index,
|
|
234
|
+
rootClientId,
|
|
235
|
+
updateSelection,
|
|
236
|
+
0,
|
|
237
|
+
meta
|
|
238
|
+
);
|
|
481
239
|
}
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
/**
|
|
485
|
-
* Action that inserts an array of blocks, optionally at a specific index respective a root block list.
|
|
486
|
-
*
|
|
487
|
-
* Only allowed blocks are inserted. The action may fail silently for blocks that are not allowed or if
|
|
488
|
-
* a templateLock is active on the block list.
|
|
489
|
-
*
|
|
490
|
-
* @param {Object[]} blocks Block objects to insert.
|
|
491
|
-
* @param {?number} index Index at which block should be inserted.
|
|
492
|
-
* @param {?string} rootClientId Optional root client ID of block list on which to insert.
|
|
493
|
-
* @param {?boolean} updateSelection If true block selection will be updated. If false, block selection will not change. Defaults to true.
|
|
494
|
-
* @param {0|-1|null} initialPosition Initial focus position. Setting it to null prevent focusing the inserted block.
|
|
495
|
-
* @param {?Object} meta Optional Meta values to be passed to the action object.
|
|
496
|
-
*
|
|
497
|
-
* @return {Object} Action object.
|
|
498
|
-
*/
|
|
499
|
-
export const insertBlocks = (blocks, index, rootClientId, updateSelection = true, initialPosition = 0, meta) => ({
|
|
500
|
-
select,
|
|
501
|
-
dispatch
|
|
502
|
-
}) => {
|
|
503
|
-
/* eslint-enable jsdoc/valid-types */
|
|
504
|
-
if (initialPosition !== null && typeof initialPosition === 'object') {
|
|
240
|
+
const insertBlocks = (blocks, index, rootClientId, updateSelection = true, initialPosition = 0, meta) => ({ select, dispatch }) => {
|
|
241
|
+
if (initialPosition !== null && typeof initialPosition === "object") {
|
|
505
242
|
meta = initialPosition;
|
|
506
243
|
initialPosition = 0;
|
|
507
|
-
deprecated(
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
244
|
+
deprecated(
|
|
245
|
+
"meta argument in wp.data.dispatch('core/block-editor')",
|
|
246
|
+
{
|
|
247
|
+
since: "5.8",
|
|
248
|
+
hint: "The meta argument is now the 6th argument of the function"
|
|
249
|
+
}
|
|
250
|
+
);
|
|
511
251
|
}
|
|
512
252
|
blocks = castArray(blocks);
|
|
513
253
|
const allowedBlocks = [];
|
|
514
254
|
for (const block of blocks) {
|
|
515
|
-
const isValid = select.canInsertBlockType(
|
|
255
|
+
const isValid = select.canInsertBlockType(
|
|
256
|
+
block.name,
|
|
257
|
+
rootClientId
|
|
258
|
+
);
|
|
516
259
|
if (isValid) {
|
|
517
260
|
allowedBlocks.push(block);
|
|
518
261
|
}
|
|
519
262
|
}
|
|
520
263
|
if (allowedBlocks.length) {
|
|
521
264
|
dispatch({
|
|
522
|
-
type:
|
|
265
|
+
type: "INSERT_BLOCKS",
|
|
523
266
|
blocks: allowedBlocks,
|
|
524
267
|
index,
|
|
525
268
|
rootClientId,
|
|
@@ -530,28 +273,10 @@ export const insertBlocks = (blocks, index, rootClientId, updateSelection = true
|
|
|
530
273
|
});
|
|
531
274
|
}
|
|
532
275
|
};
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
* Action that shows the insertion point.
|
|
536
|
-
*
|
|
537
|
-
* @param {?string} rootClientId Optional root client ID of block list on
|
|
538
|
-
* which to insert.
|
|
539
|
-
* @param {?number} index Index at which block should be inserted.
|
|
540
|
-
* @param {?Object} __unstableOptions Additional options.
|
|
541
|
-
* @property {boolean} __unstableWithInserter Whether or not to show an inserter button.
|
|
542
|
-
* @property {WPDropOperation} operation The operation to perform when applied,
|
|
543
|
-
* either 'insert' or 'replace' for now.
|
|
544
|
-
*
|
|
545
|
-
* @return {Object} Action object.
|
|
546
|
-
*/
|
|
547
|
-
export function showInsertionPoint(rootClientId, index, __unstableOptions = {}) {
|
|
548
|
-
const {
|
|
549
|
-
__unstableWithInserter,
|
|
550
|
-
operation,
|
|
551
|
-
nearestSide
|
|
552
|
-
} = __unstableOptions;
|
|
276
|
+
function showInsertionPoint(rootClientId, index, __unstableOptions = {}) {
|
|
277
|
+
const { __unstableWithInserter, operation, nearestSide } = __unstableOptions;
|
|
553
278
|
return {
|
|
554
|
-
type:
|
|
279
|
+
type: "SHOW_INSERTION_POINT",
|
|
555
280
|
rootClientId,
|
|
556
281
|
index,
|
|
557
282
|
__unstableWithInserter,
|
|
@@ -559,86 +284,51 @@ export function showInsertionPoint(rootClientId, index, __unstableOptions = {})
|
|
|
559
284
|
nearestSide
|
|
560
285
|
};
|
|
561
286
|
}
|
|
562
|
-
|
|
563
|
-
* Action that hides the insertion point.
|
|
564
|
-
*/
|
|
565
|
-
export const hideInsertionPoint = () => ({
|
|
566
|
-
select,
|
|
567
|
-
dispatch
|
|
568
|
-
}) => {
|
|
287
|
+
const hideInsertionPoint = () => ({ select, dispatch }) => {
|
|
569
288
|
if (!select.isBlockInsertionPointVisible()) {
|
|
570
289
|
return;
|
|
571
290
|
}
|
|
572
291
|
dispatch({
|
|
573
|
-
type:
|
|
292
|
+
type: "HIDE_INSERTION_POINT"
|
|
574
293
|
});
|
|
575
294
|
};
|
|
576
|
-
|
|
577
|
-
/**
|
|
578
|
-
* Action that resets the template validity.
|
|
579
|
-
*
|
|
580
|
-
* @param {boolean} isValid template validity flag.
|
|
581
|
-
*
|
|
582
|
-
* @return {Object} Action object.
|
|
583
|
-
*/
|
|
584
|
-
export function setTemplateValidity(isValid) {
|
|
295
|
+
function setTemplateValidity(isValid) {
|
|
585
296
|
return {
|
|
586
|
-
type:
|
|
297
|
+
type: "SET_TEMPLATE_VALIDITY",
|
|
587
298
|
isValid
|
|
588
299
|
};
|
|
589
300
|
}
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
* Action that synchronizes the template with the list of blocks.
|
|
593
|
-
*
|
|
594
|
-
* @return {Object} Action object.
|
|
595
|
-
*/
|
|
596
|
-
export const synchronizeTemplate = () => ({
|
|
597
|
-
select,
|
|
598
|
-
dispatch
|
|
599
|
-
}) => {
|
|
600
|
-
dispatch({
|
|
601
|
-
type: 'SYNCHRONIZE_TEMPLATE'
|
|
602
|
-
});
|
|
301
|
+
const synchronizeTemplate = () => ({ select, dispatch }) => {
|
|
302
|
+
dispatch({ type: "SYNCHRONIZE_TEMPLATE" });
|
|
603
303
|
const blocks = select.getBlocks();
|
|
604
304
|
const template = select.getTemplate();
|
|
605
|
-
const updatedBlockList = synchronizeBlocksWithTemplate(
|
|
305
|
+
const updatedBlockList = synchronizeBlocksWithTemplate(
|
|
306
|
+
blocks,
|
|
307
|
+
template
|
|
308
|
+
);
|
|
606
309
|
dispatch.resetBlocks(updatedBlockList);
|
|
607
310
|
};
|
|
608
|
-
|
|
609
|
-
/**
|
|
610
|
-
* Delete the current selection.
|
|
611
|
-
*
|
|
612
|
-
* @param {boolean} isForward
|
|
613
|
-
*/
|
|
614
|
-
export const __unstableDeleteSelection = isForward => ({
|
|
615
|
-
registry,
|
|
616
|
-
select,
|
|
617
|
-
dispatch
|
|
618
|
-
}) => {
|
|
311
|
+
const __unstableDeleteSelection = (isForward) => ({ registry, select, dispatch }) => {
|
|
619
312
|
const selectionAnchor = select.getSelectionStart();
|
|
620
313
|
const selectionFocus = select.getSelectionEnd();
|
|
621
314
|
if (selectionAnchor.clientId === selectionFocus.clientId) {
|
|
622
315
|
return;
|
|
623
316
|
}
|
|
624
|
-
|
|
625
|
-
// It's not mergeable if there's no rich text selection.
|
|
626
|
-
if (!selectionAnchor.attributeKey || !selectionFocus.attributeKey || typeof selectionAnchor.offset === 'undefined' || typeof selectionFocus.offset === 'undefined') {
|
|
317
|
+
if (!selectionAnchor.attributeKey || !selectionFocus.attributeKey || typeof selectionAnchor.offset === "undefined" || typeof selectionFocus.offset === "undefined") {
|
|
627
318
|
return false;
|
|
628
319
|
}
|
|
629
|
-
const anchorRootClientId = select.getBlockRootClientId(
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
320
|
+
const anchorRootClientId = select.getBlockRootClientId(
|
|
321
|
+
selectionAnchor.clientId
|
|
322
|
+
);
|
|
323
|
+
const focusRootClientId = select.getBlockRootClientId(
|
|
324
|
+
selectionFocus.clientId
|
|
325
|
+
);
|
|
634
326
|
if (anchorRootClientId !== focusRootClientId) {
|
|
635
327
|
return;
|
|
636
328
|
}
|
|
637
329
|
const blockOrder = select.getBlockOrder(anchorRootClientId);
|
|
638
330
|
const anchorIndex = blockOrder.indexOf(selectionAnchor.clientId);
|
|
639
331
|
const focusIndex = blockOrder.indexOf(selectionFocus.clientId);
|
|
640
|
-
|
|
641
|
-
// Reassign selection start and end based on order.
|
|
642
332
|
let selectionStart, selectionEnd;
|
|
643
333
|
if (anchorIndex > focusIndex) {
|
|
644
334
|
selectionStart = selectionFocus;
|
|
@@ -659,96 +349,86 @@ export const __unstableDeleteSelection = isForward => ({
|
|
|
659
349
|
const blockB = select.getBlock(selectionB.clientId);
|
|
660
350
|
const htmlA = blockA.attributes[selectionA.attributeKey];
|
|
661
351
|
const htmlB = blockB.attributes[selectionB.attributeKey];
|
|
662
|
-
let valueA = create({
|
|
663
|
-
|
|
664
|
-
});
|
|
665
|
-
let valueB = create({
|
|
666
|
-
html: htmlB
|
|
667
|
-
});
|
|
352
|
+
let valueA = create({ html: htmlA });
|
|
353
|
+
let valueB = create({ html: htmlB });
|
|
668
354
|
valueA = remove(valueA, selectionA.offset, valueA.text.length);
|
|
669
355
|
valueB = insert(valueB, START_OF_SELECTED_AREA, 0, selectionB.offset);
|
|
670
|
-
|
|
671
|
-
// Clone the blocks so we don't manipulate the original.
|
|
672
356
|
const cloneA = cloneBlock(blockA, {
|
|
673
|
-
[selectionA.attributeKey]: toHTMLString({
|
|
674
|
-
value: valueA
|
|
675
|
-
})
|
|
357
|
+
[selectionA.attributeKey]: toHTMLString({ value: valueA })
|
|
676
358
|
});
|
|
677
359
|
const cloneB = cloneBlock(blockB, {
|
|
678
|
-
[selectionB.attributeKey]: toHTMLString({
|
|
679
|
-
value: valueB
|
|
680
|
-
})
|
|
360
|
+
[selectionB.attributeKey]: toHTMLString({ value: valueB })
|
|
681
361
|
});
|
|
682
362
|
const followingBlock = isForward ? cloneA : cloneB;
|
|
683
|
-
|
|
684
|
-
// We can only merge blocks with similar types
|
|
685
|
-
// thus, we transform the block to merge first
|
|
686
363
|
const blocksWithTheSameType = blockA.name === blockB.name ? [followingBlock] : switchToBlockType(followingBlock, targetBlockType.name);
|
|
687
|
-
|
|
688
|
-
// If the block types can not match, do nothing
|
|
689
364
|
if (!blocksWithTheSameType || !blocksWithTheSameType.length) {
|
|
690
365
|
return;
|
|
691
366
|
}
|
|
692
367
|
let updatedAttributes;
|
|
693
368
|
if (isForward) {
|
|
694
369
|
const blockToMerge = blocksWithTheSameType.pop();
|
|
695
|
-
updatedAttributes = targetBlockType.merge(
|
|
370
|
+
updatedAttributes = targetBlockType.merge(
|
|
371
|
+
blockToMerge.attributes,
|
|
372
|
+
cloneB.attributes
|
|
373
|
+
);
|
|
696
374
|
} else {
|
|
697
375
|
const blockToMerge = blocksWithTheSameType.shift();
|
|
698
|
-
updatedAttributes = targetBlockType.merge(
|
|
376
|
+
updatedAttributes = targetBlockType.merge(
|
|
377
|
+
cloneA.attributes,
|
|
378
|
+
blockToMerge.attributes
|
|
379
|
+
);
|
|
699
380
|
}
|
|
700
381
|
const newAttributeKey = retrieveSelectedAttribute(updatedAttributes);
|
|
701
382
|
const convertedHtml = updatedAttributes[newAttributeKey];
|
|
702
|
-
const convertedValue = create({
|
|
703
|
-
html: convertedHtml
|
|
704
|
-
});
|
|
383
|
+
const convertedValue = create({ html: convertedHtml });
|
|
705
384
|
const newOffset = convertedValue.text.indexOf(START_OF_SELECTED_AREA);
|
|
706
385
|
const newValue = remove(convertedValue, newOffset, newOffset + 1);
|
|
707
|
-
const newHtml = toHTMLString({
|
|
708
|
-
value: newValue
|
|
709
|
-
});
|
|
386
|
+
const newHtml = toHTMLString({ value: newValue });
|
|
710
387
|
updatedAttributes[newAttributeKey] = newHtml;
|
|
711
388
|
const selectedBlockClientIds = select.getSelectedBlockClientIds();
|
|
712
|
-
const replacement = [
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
...targetBlock
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
389
|
+
const replacement = [
|
|
390
|
+
...isForward ? blocksWithTheSameType : [],
|
|
391
|
+
{
|
|
392
|
+
// Preserve the original client ID.
|
|
393
|
+
...targetBlock,
|
|
394
|
+
attributes: {
|
|
395
|
+
...targetBlock.attributes,
|
|
396
|
+
...updatedAttributes
|
|
397
|
+
}
|
|
398
|
+
},
|
|
399
|
+
...isForward ? [] : blocksWithTheSameType
|
|
400
|
+
];
|
|
720
401
|
registry.batch(() => {
|
|
721
|
-
dispatch.selectionChange(
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
402
|
+
dispatch.selectionChange(
|
|
403
|
+
targetBlock.clientId,
|
|
404
|
+
newAttributeKey,
|
|
405
|
+
newOffset,
|
|
406
|
+
newOffset
|
|
407
|
+
);
|
|
408
|
+
dispatch.replaceBlocks(
|
|
409
|
+
selectedBlockClientIds,
|
|
410
|
+
replacement,
|
|
411
|
+
0,
|
|
412
|
+
// If we don't pass the `indexToSelect` it will default to the last block.
|
|
413
|
+
select.getSelectedBlocksInitialCaretPosition()
|
|
414
|
+
);
|
|
725
415
|
});
|
|
726
416
|
};
|
|
727
|
-
|
|
728
|
-
/**
|
|
729
|
-
* Split the current selection.
|
|
730
|
-
* @param {?Array} blocks
|
|
731
|
-
*/
|
|
732
|
-
export const __unstableSplitSelection = (blocks = []) => ({
|
|
733
|
-
registry,
|
|
734
|
-
select,
|
|
735
|
-
dispatch
|
|
736
|
-
}) => {
|
|
417
|
+
const __unstableSplitSelection = (blocks = []) => ({ registry, select, dispatch }) => {
|
|
737
418
|
const selectionAnchor = select.getSelectionStart();
|
|
738
419
|
const selectionFocus = select.getSelectionEnd();
|
|
739
|
-
const anchorRootClientId = select.getBlockRootClientId(
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
420
|
+
const anchorRootClientId = select.getBlockRootClientId(
|
|
421
|
+
selectionAnchor.clientId
|
|
422
|
+
);
|
|
423
|
+
const focusRootClientId = select.getBlockRootClientId(
|
|
424
|
+
selectionFocus.clientId
|
|
425
|
+
);
|
|
744
426
|
if (anchorRootClientId !== focusRootClientId) {
|
|
745
427
|
return;
|
|
746
428
|
}
|
|
747
429
|
const blockOrder = select.getBlockOrder(anchorRootClientId);
|
|
748
430
|
const anchorIndex = blockOrder.indexOf(selectionAnchor.clientId);
|
|
749
431
|
const focusIndex = blockOrder.indexOf(selectionFocus.clientId);
|
|
750
|
-
|
|
751
|
-
// Reassign selection start and end based on order.
|
|
752
432
|
let selectionStart, selectionEnd;
|
|
753
433
|
if (anchorIndex > focusIndex) {
|
|
754
434
|
selectionStart = selectionFocus;
|
|
@@ -763,69 +443,77 @@ export const __unstableSplitSelection = (blocks = []) => ({
|
|
|
763
443
|
const blockB = select.getBlock(selectionB.clientId);
|
|
764
444
|
const blockAType = getBlockType(blockA.name);
|
|
765
445
|
const blockBType = getBlockType(blockB.name);
|
|
766
|
-
const attributeKeyA = typeof selectionA.attributeKey ===
|
|
767
|
-
const attributeKeyB = typeof selectionB.attributeKey ===
|
|
768
|
-
const blockAttributes = select.getBlockAttributes(
|
|
446
|
+
const attributeKeyA = typeof selectionA.attributeKey === "string" ? selectionA.attributeKey : findRichTextAttributeKey(blockAType);
|
|
447
|
+
const attributeKeyB = typeof selectionB.attributeKey === "string" ? selectionB.attributeKey : findRichTextAttributeKey(blockBType);
|
|
448
|
+
const blockAttributes = select.getBlockAttributes(
|
|
449
|
+
selectionA.clientId
|
|
450
|
+
);
|
|
769
451
|
const bindings = blockAttributes?.metadata?.bindings;
|
|
770
|
-
|
|
771
|
-
// If the attribute is bound, don't split the selection and insert a new block instead.
|
|
772
452
|
if (bindings?.[attributeKeyA]) {
|
|
773
|
-
// Show warning if user tries to insert a block into another block with bindings.
|
|
774
453
|
if (blocks.length) {
|
|
775
|
-
const {
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
454
|
+
const { createWarningNotice } = registry.dispatch(noticesStore);
|
|
455
|
+
createWarningNotice(
|
|
456
|
+
__(
|
|
457
|
+
"Blocks can't be inserted into other blocks with bindings"
|
|
458
|
+
),
|
|
459
|
+
{
|
|
460
|
+
type: "snackbar"
|
|
461
|
+
}
|
|
462
|
+
);
|
|
781
463
|
return;
|
|
782
464
|
}
|
|
783
465
|
dispatch.insertAfterBlock(selectionA.clientId);
|
|
784
466
|
return;
|
|
785
467
|
}
|
|
786
|
-
|
|
787
|
-
// Can't split if the selection is not set.
|
|
788
|
-
if (!attributeKeyA || !attributeKeyB || typeof selectionAnchor.offset === 'undefined' || typeof selectionFocus.offset === 'undefined') {
|
|
468
|
+
if (!attributeKeyA || !attributeKeyB || typeof selectionAnchor.offset === "undefined" || typeof selectionFocus.offset === "undefined") {
|
|
789
469
|
return;
|
|
790
470
|
}
|
|
791
|
-
|
|
792
|
-
// We can do some short-circuiting if the selection is collapsed.
|
|
793
471
|
if (selectionA.clientId === selectionB.clientId && attributeKeyA === attributeKeyB && selectionA.offset === selectionB.offset) {
|
|
794
|
-
// If an unmodified default block is selected, replace it. We don't
|
|
795
|
-
// want to be converting into a default block.
|
|
796
472
|
if (blocks.length) {
|
|
797
473
|
if (isUnmodifiedDefaultBlock(blockA)) {
|
|
798
|
-
dispatch.replaceBlocks(
|
|
474
|
+
dispatch.replaceBlocks(
|
|
475
|
+
[selectionA.clientId],
|
|
476
|
+
blocks,
|
|
477
|
+
blocks.length - 1,
|
|
478
|
+
-1
|
|
479
|
+
);
|
|
799
480
|
return;
|
|
800
481
|
}
|
|
801
|
-
}
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
482
|
+
} else if (!select.getBlockOrder(selectionA.clientId).length) {
|
|
483
|
+
let createEmpty2 = function() {
|
|
484
|
+
const defaultBlockName2 = getDefaultBlockName();
|
|
485
|
+
return select.canInsertBlockType(
|
|
486
|
+
defaultBlockName2,
|
|
487
|
+
anchorRootClientId
|
|
488
|
+
) ? createBlock(defaultBlockName2) : createBlock(
|
|
489
|
+
select.getBlockName(selectionA.clientId)
|
|
490
|
+
);
|
|
491
|
+
};
|
|
492
|
+
var createEmpty = createEmpty2;
|
|
810
493
|
const length = blockAttributes[attributeKeyA].length;
|
|
811
494
|
if (selectionA.offset === 0 && length) {
|
|
812
|
-
dispatch.insertBlocks(
|
|
495
|
+
dispatch.insertBlocks(
|
|
496
|
+
[createEmpty2()],
|
|
497
|
+
select.getBlockIndex(selectionA.clientId),
|
|
498
|
+
anchorRootClientId,
|
|
499
|
+
false
|
|
500
|
+
);
|
|
813
501
|
return;
|
|
814
502
|
}
|
|
815
503
|
if (selectionA.offset === length) {
|
|
816
|
-
dispatch.insertBlocks(
|
|
504
|
+
dispatch.insertBlocks(
|
|
505
|
+
[createEmpty2()],
|
|
506
|
+
select.getBlockIndex(selectionA.clientId) + 1,
|
|
507
|
+
anchorRootClientId
|
|
508
|
+
);
|
|
817
509
|
return;
|
|
818
510
|
}
|
|
819
511
|
}
|
|
820
512
|
}
|
|
821
513
|
const htmlA = blockA.attributes[attributeKeyA];
|
|
822
514
|
const htmlB = blockB.attributes[attributeKeyB];
|
|
823
|
-
let valueA = create({
|
|
824
|
-
|
|
825
|
-
});
|
|
826
|
-
let valueB = create({
|
|
827
|
-
html: htmlB
|
|
828
|
-
});
|
|
515
|
+
let valueA = create({ html: htmlA });
|
|
516
|
+
let valueB = create({ html: htmlB });
|
|
829
517
|
valueA = remove(valueA, selectionA.offset, valueA.text.length);
|
|
830
518
|
valueB = remove(valueB, 0, selectionB.offset);
|
|
831
519
|
let head = {
|
|
@@ -836,9 +524,7 @@ export const __unstableSplitSelection = (blocks = []) => ({
|
|
|
836
524
|
innerBlocks: blockA.clientId === blockB.clientId ? [] : blockA.innerBlocks,
|
|
837
525
|
attributes: {
|
|
838
526
|
...blockA.attributes,
|
|
839
|
-
[attributeKeyA]: toHTMLString({
|
|
840
|
-
value: valueA
|
|
841
|
-
})
|
|
527
|
+
[attributeKeyA]: toHTMLString({ value: valueA })
|
|
842
528
|
}
|
|
843
529
|
};
|
|
844
530
|
let tail = {
|
|
@@ -847,29 +533,25 @@ export const __unstableSplitSelection = (blocks = []) => ({
|
|
|
847
533
|
clientId: blockA.clientId === blockB.clientId ? createBlock(blockB.name).clientId : blockB.clientId,
|
|
848
534
|
attributes: {
|
|
849
535
|
...blockB.attributes,
|
|
850
|
-
[attributeKeyB]: toHTMLString({
|
|
851
|
-
value: valueB
|
|
852
|
-
})
|
|
536
|
+
[attributeKeyB]: toHTMLString({ value: valueB })
|
|
853
537
|
}
|
|
854
538
|
};
|
|
855
|
-
|
|
856
|
-
// When splitting a block, attempt to convert the tail block to the
|
|
857
|
-
// default block type. For example, when splitting a heading block, the
|
|
858
|
-
// tail block will be converted to a paragraph block. Note that for
|
|
859
|
-
// blocks such as a list item and button, this will be skipped because
|
|
860
|
-
// the default block type cannot be inserted.
|
|
861
539
|
const defaultBlockName = getDefaultBlockName();
|
|
862
540
|
if (
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
541
|
+
// A block is only split when the selection is within the same
|
|
542
|
+
// block.
|
|
543
|
+
blockA.clientId === blockB.clientId && defaultBlockName && tail.name !== defaultBlockName && select.canInsertBlockType(defaultBlockName, anchorRootClientId)
|
|
544
|
+
) {
|
|
866
545
|
const switched = switchToBlockType(tail, defaultBlockName);
|
|
867
546
|
if (switched?.length === 1) {
|
|
868
547
|
tail = switched[0];
|
|
869
548
|
}
|
|
870
549
|
}
|
|
871
550
|
if (!blocks.length) {
|
|
872
|
-
dispatch.replaceBlocks(select.getSelectedBlockClientIds(), [
|
|
551
|
+
dispatch.replaceBlocks(select.getSelectedBlockClientIds(), [
|
|
552
|
+
head,
|
|
553
|
+
tail
|
|
554
|
+
]);
|
|
873
555
|
return;
|
|
874
556
|
}
|
|
875
557
|
let selection;
|
|
@@ -891,9 +573,7 @@ export const __unstableSplitSelection = (blocks = []) => ({
|
|
|
891
573
|
selection = {
|
|
892
574
|
clientId: head.clientId,
|
|
893
575
|
attributeKey: attributeKeyA,
|
|
894
|
-
offset: create({
|
|
895
|
-
html: head.attributes[attributeKeyA]
|
|
896
|
-
}).text.length
|
|
576
|
+
offset: create({ html: head.attributes[attributeKeyA] }).text.length
|
|
897
577
|
};
|
|
898
578
|
clonedBlocks.unshift(...firstBlocks);
|
|
899
579
|
} else {
|
|
@@ -936,82 +616,75 @@ export const __unstableSplitSelection = (blocks = []) => ({
|
|
|
936
616
|
output.push(tail);
|
|
937
617
|
}
|
|
938
618
|
registry.batch(() => {
|
|
939
|
-
dispatch.replaceBlocks(
|
|
619
|
+
dispatch.replaceBlocks(
|
|
620
|
+
select.getSelectedBlockClientIds(),
|
|
621
|
+
output,
|
|
622
|
+
output.length - 1,
|
|
623
|
+
0
|
|
624
|
+
);
|
|
940
625
|
if (selection) {
|
|
941
|
-
dispatch.selectionChange(
|
|
626
|
+
dispatch.selectionChange(
|
|
627
|
+
selection.clientId,
|
|
628
|
+
selection.attributeKey,
|
|
629
|
+
selection.offset,
|
|
630
|
+
selection.offset
|
|
631
|
+
);
|
|
942
632
|
}
|
|
943
633
|
});
|
|
944
634
|
};
|
|
945
|
-
|
|
946
|
-
/**
|
|
947
|
-
* Expand the selection to cover the entire blocks, removing partial selection.
|
|
948
|
-
*/
|
|
949
|
-
export const __unstableExpandSelection = () => ({
|
|
950
|
-
select,
|
|
951
|
-
dispatch
|
|
952
|
-
}) => {
|
|
635
|
+
const __unstableExpandSelection = () => ({ select, dispatch }) => {
|
|
953
636
|
const selectionAnchor = select.getSelectionStart();
|
|
954
637
|
const selectionFocus = select.getSelectionEnd();
|
|
955
638
|
dispatch.selectionChange({
|
|
956
|
-
start: {
|
|
957
|
-
|
|
958
|
-
},
|
|
959
|
-
end: {
|
|
960
|
-
clientId: selectionFocus.clientId
|
|
961
|
-
}
|
|
639
|
+
start: { clientId: selectionAnchor.clientId },
|
|
640
|
+
end: { clientId: selectionFocus.clientId }
|
|
962
641
|
});
|
|
963
642
|
};
|
|
964
|
-
|
|
965
|
-
/**
|
|
966
|
-
* Action that merges two blocks.
|
|
967
|
-
*
|
|
968
|
-
* @param {string} firstBlockClientId Client ID of the first block to merge.
|
|
969
|
-
* @param {string} secondBlockClientId Client ID of the second block to merge.
|
|
970
|
-
*/
|
|
971
|
-
export const mergeBlocks = (firstBlockClientId, secondBlockClientId) => ({
|
|
972
|
-
registry,
|
|
973
|
-
select,
|
|
974
|
-
dispatch
|
|
975
|
-
}) => {
|
|
643
|
+
const mergeBlocks = (firstBlockClientId, secondBlockClientId) => ({ registry, select, dispatch }) => {
|
|
976
644
|
const clientIdA = firstBlockClientId;
|
|
977
645
|
const clientIdB = secondBlockClientId;
|
|
978
646
|
const blockA = select.getBlock(clientIdA);
|
|
979
647
|
const blockAType = getBlockType(blockA.name);
|
|
980
|
-
if (!blockAType || select.getBlockEditingMode(clientIdA) ===
|
|
648
|
+
if (!blockAType || select.getBlockEditingMode(clientIdA) === "disabled" || select.getBlockEditingMode(clientIdB) === "disabled") {
|
|
981
649
|
return;
|
|
982
650
|
}
|
|
983
651
|
const blockB = select.getBlock(clientIdB);
|
|
984
|
-
if (!blockAType.merge && getBlockSupport(blockA.name,
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
if (
|
|
652
|
+
if (!blockAType.merge && getBlockSupport(blockA.name, "__experimentalOnMerge")) {
|
|
653
|
+
const blocksWithTheSameType2 = switchToBlockType(
|
|
654
|
+
blockB,
|
|
655
|
+
blockAType.name
|
|
656
|
+
);
|
|
657
|
+
if (blocksWithTheSameType2?.length !== 1) {
|
|
990
658
|
dispatch.selectBlock(blockA.clientId);
|
|
991
659
|
return;
|
|
992
660
|
}
|
|
993
|
-
const [blockWithSameType] =
|
|
661
|
+
const [blockWithSameType] = blocksWithTheSameType2;
|
|
994
662
|
if (blockWithSameType.innerBlocks.length < 1) {
|
|
995
663
|
dispatch.selectBlock(blockA.clientId);
|
|
996
664
|
return;
|
|
997
665
|
}
|
|
998
666
|
registry.batch(() => {
|
|
999
|
-
dispatch.insertBlocks(
|
|
667
|
+
dispatch.insertBlocks(
|
|
668
|
+
blockWithSameType.innerBlocks,
|
|
669
|
+
void 0,
|
|
670
|
+
clientIdA
|
|
671
|
+
);
|
|
1000
672
|
dispatch.removeBlock(clientIdB);
|
|
1001
|
-
dispatch.selectBlock(
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
// same attributes. This is useful when merging a paragraph into
|
|
1005
|
-
// a list, and the next block is also a list. If we don't merge,
|
|
1006
|
-
// it looks like one list, but it's actually two lists. The same
|
|
1007
|
-
// applies to other blocks such as a group with the same
|
|
1008
|
-
// attributes.
|
|
673
|
+
dispatch.selectBlock(
|
|
674
|
+
blockWithSameType.innerBlocks[0].clientId
|
|
675
|
+
);
|
|
1009
676
|
const nextBlockClientId = select.getNextBlockClientId(clientIdA);
|
|
1010
677
|
if (nextBlockClientId && select.getBlockName(clientIdA) === select.getBlockName(nextBlockClientId)) {
|
|
1011
678
|
const rootAttributes = select.getBlockAttributes(clientIdA);
|
|
1012
679
|
const previousRootAttributes = select.getBlockAttributes(nextBlockClientId);
|
|
1013
|
-
if (Object.keys(rootAttributes).every(
|
|
1014
|
-
|
|
680
|
+
if (Object.keys(rootAttributes).every(
|
|
681
|
+
(key) => rootAttributes[key] === previousRootAttributes[key]
|
|
682
|
+
)) {
|
|
683
|
+
dispatch.moveBlocksToPosition(
|
|
684
|
+
select.getBlockOrder(nextBlockClientId),
|
|
685
|
+
nextBlockClientId,
|
|
686
|
+
clientIdA
|
|
687
|
+
);
|
|
1015
688
|
dispatch.removeBlock(nextBlockClientId, false);
|
|
1016
689
|
}
|
|
1017
690
|
}
|
|
@@ -1019,134 +692,113 @@ export const mergeBlocks = (firstBlockClientId, secondBlockClientId) => ({
|
|
|
1019
692
|
return;
|
|
1020
693
|
}
|
|
1021
694
|
if (isUnmodifiedDefaultBlock(blockA)) {
|
|
1022
|
-
dispatch.removeBlock(
|
|
695
|
+
dispatch.removeBlock(
|
|
696
|
+
clientIdA,
|
|
697
|
+
select.isBlockSelected(clientIdA)
|
|
698
|
+
);
|
|
1023
699
|
return;
|
|
1024
700
|
}
|
|
1025
701
|
if (isUnmodifiedDefaultBlock(blockB)) {
|
|
1026
|
-
dispatch.removeBlock(
|
|
702
|
+
dispatch.removeBlock(
|
|
703
|
+
clientIdB,
|
|
704
|
+
select.isBlockSelected(clientIdB)
|
|
705
|
+
);
|
|
1027
706
|
return;
|
|
1028
707
|
}
|
|
1029
708
|
if (!blockAType.merge) {
|
|
1030
|
-
if (isUnmodifiedBlock(blockB,
|
|
1031
|
-
dispatch.removeBlock(
|
|
709
|
+
if (isUnmodifiedBlock(blockB, "content")) {
|
|
710
|
+
dispatch.removeBlock(
|
|
711
|
+
clientIdB,
|
|
712
|
+
select.isBlockSelected(clientIdB)
|
|
713
|
+
);
|
|
1032
714
|
} else {
|
|
1033
715
|
dispatch.selectBlock(blockA.clientId);
|
|
1034
716
|
}
|
|
1035
717
|
return;
|
|
1036
718
|
}
|
|
1037
719
|
const blockBType = getBlockType(blockB.name);
|
|
1038
|
-
const {
|
|
1039
|
-
clientId,
|
|
1040
|
-
attributeKey,
|
|
1041
|
-
offset
|
|
1042
|
-
} = select.getSelectionStart();
|
|
720
|
+
const { clientId, attributeKey, offset } = select.getSelectionStart();
|
|
1043
721
|
const selectedBlockType = clientId === clientIdA ? blockAType : blockBType;
|
|
1044
722
|
const attributeDefinition = selectedBlockType.attributes[attributeKey];
|
|
1045
|
-
const canRestoreTextSelection = (clientId === clientIdA || clientId === clientIdB) && attributeKey !==
|
|
1046
|
-
// We cannot restore text selection if the RichText identifier
|
|
723
|
+
const canRestoreTextSelection = (clientId === clientIdA || clientId === clientIdB) && attributeKey !== void 0 && offset !== void 0 && // We cannot restore text selection if the RichText identifier
|
|
1047
724
|
// is not a defined block attribute key. This can be the case if the
|
|
1048
725
|
// fallback instance ID is used to store selection (and no RichText
|
|
1049
726
|
// identifier is set), or when the identifier is wrong.
|
|
1050
727
|
!!attributeDefinition;
|
|
1051
728
|
if (!attributeDefinition) {
|
|
1052
|
-
if (typeof attributeKey ===
|
|
1053
|
-
window.console.error(
|
|
729
|
+
if (typeof attributeKey === "number") {
|
|
730
|
+
window.console.error(
|
|
731
|
+
`RichText needs an identifier prop that is the block attribute key of the attribute it controls. Its type is expected to be a string, but was ${typeof attributeKey}`
|
|
732
|
+
);
|
|
1054
733
|
} else {
|
|
1055
|
-
window.console.error(
|
|
734
|
+
window.console.error(
|
|
735
|
+
"The RichText identifier prop does not match any attributes defined by the block."
|
|
736
|
+
);
|
|
1056
737
|
}
|
|
1057
738
|
}
|
|
1058
|
-
|
|
1059
|
-
// Clone the blocks so we don't insert the character in a "live" block.
|
|
1060
739
|
const cloneA = cloneBlock(blockA);
|
|
1061
740
|
const cloneB = cloneBlock(blockB);
|
|
1062
741
|
if (canRestoreTextSelection) {
|
|
1063
742
|
const selectedBlock = clientId === clientIdA ? cloneA : cloneB;
|
|
1064
743
|
const html = selectedBlock.attributes[attributeKey];
|
|
1065
|
-
const value = insert(
|
|
1066
|
-
html
|
|
1067
|
-
|
|
744
|
+
const value = insert(
|
|
745
|
+
create({ html }),
|
|
746
|
+
START_OF_SELECTED_AREA,
|
|
747
|
+
offset,
|
|
748
|
+
offset
|
|
749
|
+
);
|
|
1068
750
|
selectedBlock.attributes[attributeKey] = toHTMLString({
|
|
1069
751
|
value
|
|
1070
752
|
});
|
|
1071
753
|
}
|
|
1072
|
-
|
|
1073
|
-
// We can only merge blocks with similar types
|
|
1074
|
-
// thus, we transform the block to merge first.
|
|
1075
754
|
const blocksWithTheSameType = blockA.name === blockB.name ? [cloneB] : switchToBlockType(cloneB, blockA.name);
|
|
1076
|
-
|
|
1077
|
-
// If the block types can not match, do nothing.
|
|
1078
755
|
if (!blocksWithTheSameType || !blocksWithTheSameType.length) {
|
|
1079
756
|
return;
|
|
1080
757
|
}
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
758
|
+
const updatedAttributes = blockAType.merge(
|
|
759
|
+
cloneA.attributes,
|
|
760
|
+
blocksWithTheSameType[0].attributes
|
|
761
|
+
);
|
|
1084
762
|
if (canRestoreTextSelection) {
|
|
1085
763
|
const newAttributeKey = retrieveSelectedAttribute(updatedAttributes);
|
|
1086
764
|
const convertedHtml = updatedAttributes[newAttributeKey];
|
|
1087
|
-
const convertedValue = create({
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
765
|
+
const convertedValue = create({ html: convertedHtml });
|
|
766
|
+
const newOffset = convertedValue.text.indexOf(
|
|
767
|
+
START_OF_SELECTED_AREA
|
|
768
|
+
);
|
|
1091
769
|
const newValue = remove(convertedValue, newOffset, newOffset + 1);
|
|
1092
|
-
const newHtml = toHTMLString({
|
|
1093
|
-
value: newValue
|
|
1094
|
-
});
|
|
770
|
+
const newHtml = toHTMLString({ value: newValue });
|
|
1095
771
|
updatedAttributes[newAttributeKey] = newHtml;
|
|
1096
|
-
dispatch.selectionChange(
|
|
772
|
+
dispatch.selectionChange(
|
|
773
|
+
blockA.clientId,
|
|
774
|
+
newAttributeKey,
|
|
775
|
+
newOffset,
|
|
776
|
+
newOffset
|
|
777
|
+
);
|
|
1097
778
|
}
|
|
1098
|
-
dispatch.replaceBlocks(
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
779
|
+
dispatch.replaceBlocks(
|
|
780
|
+
[blockA.clientId, blockB.clientId],
|
|
781
|
+
[
|
|
782
|
+
{
|
|
783
|
+
...blockA,
|
|
784
|
+
attributes: {
|
|
785
|
+
...blockA.attributes,
|
|
786
|
+
...updatedAttributes
|
|
787
|
+
}
|
|
788
|
+
},
|
|
789
|
+
...blocksWithTheSameType.slice(1)
|
|
790
|
+
],
|
|
791
|
+
0
|
|
792
|
+
// If we don't pass the `indexToSelect` it will default to the last block.
|
|
1105
793
|
);
|
|
1106
794
|
};
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
* Yields action objects used in signalling that the blocks corresponding to
|
|
1110
|
-
* the set of specified client IDs are to be removed.
|
|
1111
|
-
*
|
|
1112
|
-
* @param {string|string[]} clientIds Client IDs of blocks to remove.
|
|
1113
|
-
* @param {boolean} selectPrevious True if the previous block
|
|
1114
|
-
* or the immediate parent
|
|
1115
|
-
* (if no previous block exists)
|
|
1116
|
-
* should be selected
|
|
1117
|
-
* when a block is removed.
|
|
1118
|
-
*/
|
|
1119
|
-
export const removeBlocks = (clientIds, selectPrevious = true) => privateRemoveBlocks(clientIds, selectPrevious);
|
|
1120
|
-
|
|
1121
|
-
/**
|
|
1122
|
-
* Returns an action object used in signalling that the block with the
|
|
1123
|
-
* specified client ID is to be removed.
|
|
1124
|
-
*
|
|
1125
|
-
* @param {string} clientId Client ID of block to remove.
|
|
1126
|
-
* @param {boolean} selectPrevious True if the previous block should be
|
|
1127
|
-
* selected when a block is removed.
|
|
1128
|
-
*
|
|
1129
|
-
* @return {Object} Action object.
|
|
1130
|
-
*/
|
|
1131
|
-
export function removeBlock(clientId, selectPrevious) {
|
|
795
|
+
const removeBlocks = (clientIds, selectPrevious = true) => privateRemoveBlocks(clientIds, selectPrevious);
|
|
796
|
+
function removeBlock(clientId, selectPrevious) {
|
|
1132
797
|
return removeBlocks([clientId], selectPrevious);
|
|
1133
798
|
}
|
|
1134
|
-
|
|
1135
|
-
/* eslint-disable jsdoc/valid-types */
|
|
1136
|
-
/**
|
|
1137
|
-
* Returns an action object used in signalling that the inner blocks with the
|
|
1138
|
-
* specified client ID should be replaced.
|
|
1139
|
-
*
|
|
1140
|
-
* @param {string} rootClientId Client ID of the block whose InnerBlocks will re replaced.
|
|
1141
|
-
* @param {Object[]} blocks Block objects to insert as new InnerBlocks
|
|
1142
|
-
* @param {?boolean} updateSelection If true block selection will be updated. If false, block selection will not change. Defaults to false.
|
|
1143
|
-
* @param {0|-1|null} initialPosition Initial block position.
|
|
1144
|
-
* @return {Object} Action object.
|
|
1145
|
-
*/
|
|
1146
|
-
export function replaceInnerBlocks(rootClientId, blocks, updateSelection = false, initialPosition = 0) {
|
|
1147
|
-
/* eslint-enable jsdoc/valid-types */
|
|
799
|
+
function replaceInnerBlocks(rootClientId, blocks, updateSelection = false, initialPosition = 0) {
|
|
1148
800
|
return {
|
|
1149
|
-
type:
|
|
801
|
+
type: "REPLACE_INNER_BLOCKS",
|
|
1150
802
|
rootClientId,
|
|
1151
803
|
blocks,
|
|
1152
804
|
updateSelection,
|
|
@@ -1154,141 +806,64 @@ export function replaceInnerBlocks(rootClientId, blocks, updateSelection = false
|
|
|
1154
806
|
time: Date.now()
|
|
1155
807
|
};
|
|
1156
808
|
}
|
|
1157
|
-
|
|
1158
|
-
/**
|
|
1159
|
-
* Returns an action object used to toggle the block editing mode between
|
|
1160
|
-
* visual and HTML modes.
|
|
1161
|
-
*
|
|
1162
|
-
* @param {string} clientId Block client ID.
|
|
1163
|
-
*
|
|
1164
|
-
* @return {Object} Action object.
|
|
1165
|
-
*/
|
|
1166
|
-
export function toggleBlockMode(clientId) {
|
|
809
|
+
function toggleBlockMode(clientId) {
|
|
1167
810
|
return {
|
|
1168
|
-
type:
|
|
811
|
+
type: "TOGGLE_BLOCK_MODE",
|
|
1169
812
|
clientId
|
|
1170
813
|
};
|
|
1171
814
|
}
|
|
1172
|
-
|
|
1173
|
-
/**
|
|
1174
|
-
* Returns an action object used in signalling that the user has begun to type.
|
|
1175
|
-
*
|
|
1176
|
-
* @return {Object} Action object.
|
|
1177
|
-
*/
|
|
1178
|
-
export function startTyping() {
|
|
815
|
+
function startTyping() {
|
|
1179
816
|
return {
|
|
1180
|
-
type:
|
|
817
|
+
type: "START_TYPING"
|
|
1181
818
|
};
|
|
1182
819
|
}
|
|
1183
|
-
|
|
1184
|
-
/**
|
|
1185
|
-
* Returns an action object used in signalling that the user has stopped typing.
|
|
1186
|
-
*
|
|
1187
|
-
* @return {Object} Action object.
|
|
1188
|
-
*/
|
|
1189
|
-
export function stopTyping() {
|
|
820
|
+
function stopTyping() {
|
|
1190
821
|
return {
|
|
1191
|
-
type:
|
|
822
|
+
type: "STOP_TYPING"
|
|
1192
823
|
};
|
|
1193
824
|
}
|
|
1194
|
-
|
|
1195
|
-
/**
|
|
1196
|
-
* Returns an action object used in signalling that the user has begun to drag blocks.
|
|
1197
|
-
*
|
|
1198
|
-
* @param {string[]} clientIds An array of client ids being dragged
|
|
1199
|
-
*
|
|
1200
|
-
* @return {Object} Action object.
|
|
1201
|
-
*/
|
|
1202
|
-
export function startDraggingBlocks(clientIds = []) {
|
|
825
|
+
function startDraggingBlocks(clientIds = []) {
|
|
1203
826
|
return {
|
|
1204
|
-
type:
|
|
827
|
+
type: "START_DRAGGING_BLOCKS",
|
|
1205
828
|
clientIds
|
|
1206
829
|
};
|
|
1207
830
|
}
|
|
1208
|
-
|
|
1209
|
-
/**
|
|
1210
|
-
* Returns an action object used in signalling that the user has stopped dragging blocks.
|
|
1211
|
-
*
|
|
1212
|
-
* @return {Object} Action object.
|
|
1213
|
-
*/
|
|
1214
|
-
export function stopDraggingBlocks() {
|
|
831
|
+
function stopDraggingBlocks() {
|
|
1215
832
|
return {
|
|
1216
|
-
type:
|
|
833
|
+
type: "STOP_DRAGGING_BLOCKS"
|
|
1217
834
|
};
|
|
1218
835
|
}
|
|
1219
|
-
|
|
1220
|
-
/**
|
|
1221
|
-
* Returns an action object used in signalling that the caret has entered formatted text.
|
|
1222
|
-
*
|
|
1223
|
-
* @deprecated
|
|
1224
|
-
*
|
|
1225
|
-
* @return {Object} Action object.
|
|
1226
|
-
*/
|
|
1227
|
-
export function enterFormattedText() {
|
|
836
|
+
function enterFormattedText() {
|
|
1228
837
|
deprecated('wp.data.dispatch( "core/block-editor" ).enterFormattedText', {
|
|
1229
|
-
since:
|
|
1230
|
-
version:
|
|
838
|
+
since: "6.1",
|
|
839
|
+
version: "6.3"
|
|
1231
840
|
});
|
|
1232
841
|
return {
|
|
1233
|
-
type:
|
|
842
|
+
type: "DO_NOTHING"
|
|
1234
843
|
};
|
|
1235
844
|
}
|
|
1236
|
-
|
|
1237
|
-
/**
|
|
1238
|
-
* Returns an action object used in signalling that the user caret has exited formatted text.
|
|
1239
|
-
*
|
|
1240
|
-
* @deprecated
|
|
1241
|
-
*
|
|
1242
|
-
* @return {Object} Action object.
|
|
1243
|
-
*/
|
|
1244
|
-
export function exitFormattedText() {
|
|
845
|
+
function exitFormattedText() {
|
|
1245
846
|
deprecated('wp.data.dispatch( "core/block-editor" ).exitFormattedText', {
|
|
1246
|
-
since:
|
|
1247
|
-
version:
|
|
847
|
+
since: "6.1",
|
|
848
|
+
version: "6.3"
|
|
1248
849
|
});
|
|
1249
850
|
return {
|
|
1250
|
-
type:
|
|
851
|
+
type: "DO_NOTHING"
|
|
1251
852
|
};
|
|
1252
853
|
}
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
* Action that changes the position of the user caret.
|
|
1256
|
-
*
|
|
1257
|
-
* @param {string|WPSelection} clientId The selected block client ID.
|
|
1258
|
-
* @param {string} attributeKey The selected block attribute key.
|
|
1259
|
-
* @param {number} startOffset The start offset.
|
|
1260
|
-
* @param {number} endOffset The end offset.
|
|
1261
|
-
*
|
|
1262
|
-
* @return {Object} Action object.
|
|
1263
|
-
*/
|
|
1264
|
-
export function selectionChange(clientId, attributeKey, startOffset, endOffset) {
|
|
1265
|
-
if (typeof clientId === 'string') {
|
|
854
|
+
function selectionChange(clientId, attributeKey, startOffset, endOffset) {
|
|
855
|
+
if (typeof clientId === "string") {
|
|
1266
856
|
return {
|
|
1267
|
-
type:
|
|
857
|
+
type: "SELECTION_CHANGE",
|
|
1268
858
|
clientId,
|
|
1269
859
|
attributeKey,
|
|
1270
860
|
startOffset,
|
|
1271
861
|
endOffset
|
|
1272
862
|
};
|
|
1273
863
|
}
|
|
1274
|
-
return {
|
|
1275
|
-
type: 'SELECTION_CHANGE',
|
|
1276
|
-
...clientId
|
|
1277
|
-
};
|
|
864
|
+
return { type: "SELECTION_CHANGE", ...clientId };
|
|
1278
865
|
}
|
|
1279
|
-
|
|
1280
|
-
/**
|
|
1281
|
-
* Action that adds a new block of the default type to the block list.
|
|
1282
|
-
*
|
|
1283
|
-
* @param {?Object} attributes Optional attributes of the block to assign.
|
|
1284
|
-
* @param {?string} rootClientId Optional root client ID of block list on which
|
|
1285
|
-
* to append.
|
|
1286
|
-
* @param {?number} index Optional index where to insert the default block.
|
|
1287
|
-
*/
|
|
1288
|
-
export const insertDefaultBlock = (attributes, rootClientId, index) => ({
|
|
1289
|
-
dispatch
|
|
1290
|
-
}) => {
|
|
1291
|
-
// Abort if there is no default block type (if it has been unregistered).
|
|
866
|
+
const insertDefaultBlock = (attributes, rootClientId, index) => ({ dispatch }) => {
|
|
1292
867
|
const defaultBlockName = getDefaultBlockName();
|
|
1293
868
|
if (!defaultBlockName) {
|
|
1294
869
|
return;
|
|
@@ -1296,195 +871,95 @@ export const insertDefaultBlock = (attributes, rootClientId, index) => ({
|
|
|
1296
871
|
const block = createBlock(defaultBlockName, attributes);
|
|
1297
872
|
return dispatch.insertBlock(block, index, rootClientId);
|
|
1298
873
|
};
|
|
1299
|
-
|
|
1300
|
-
/**
|
|
1301
|
-
* @typedef {Object< string, Object >} SettingsByClientId
|
|
1302
|
-
*/
|
|
1303
|
-
|
|
1304
|
-
/**
|
|
1305
|
-
* Action that changes the nested settings of the given block(s).
|
|
1306
|
-
*
|
|
1307
|
-
* @param {string | SettingsByClientId} clientId Client ID of the block whose
|
|
1308
|
-
* nested setting are being
|
|
1309
|
-
* received, or object of settings
|
|
1310
|
-
* by client ID.
|
|
1311
|
-
* @param {Object} settings Object with the new settings
|
|
1312
|
-
* for the nested block.
|
|
1313
|
-
*
|
|
1314
|
-
* @return {Object} Action object
|
|
1315
|
-
*/
|
|
1316
|
-
export function updateBlockListSettings(clientId, settings) {
|
|
874
|
+
function updateBlockListSettings(clientId, settings) {
|
|
1317
875
|
return {
|
|
1318
|
-
type:
|
|
876
|
+
type: "UPDATE_BLOCK_LIST_SETTINGS",
|
|
1319
877
|
clientId,
|
|
1320
878
|
settings
|
|
1321
879
|
};
|
|
1322
880
|
}
|
|
1323
|
-
|
|
1324
|
-
/**
|
|
1325
|
-
* Action that updates the block editor settings.
|
|
1326
|
-
*
|
|
1327
|
-
* @param {Object} settings Updated settings
|
|
1328
|
-
*
|
|
1329
|
-
* @return {Object} Action object
|
|
1330
|
-
*/
|
|
1331
|
-
export function updateSettings(settings) {
|
|
881
|
+
function updateSettings(settings) {
|
|
1332
882
|
return __experimentalUpdateSettings(settings, {
|
|
1333
883
|
stripExperimentalSettings: true
|
|
1334
884
|
});
|
|
1335
885
|
}
|
|
1336
|
-
|
|
1337
|
-
/**
|
|
1338
|
-
* Action that signals that a temporary reusable block has been saved
|
|
1339
|
-
* in order to switch its temporary id with the real id.
|
|
1340
|
-
*
|
|
1341
|
-
* @param {string} id Reusable block's id.
|
|
1342
|
-
* @param {string} updatedId Updated block's id.
|
|
1343
|
-
*
|
|
1344
|
-
* @return {Object} Action object.
|
|
1345
|
-
*/
|
|
1346
|
-
export function __unstableSaveReusableBlock(id, updatedId) {
|
|
886
|
+
function __unstableSaveReusableBlock(id, updatedId) {
|
|
1347
887
|
return {
|
|
1348
|
-
type:
|
|
888
|
+
type: "SAVE_REUSABLE_BLOCK_SUCCESS",
|
|
1349
889
|
id,
|
|
1350
890
|
updatedId
|
|
1351
891
|
};
|
|
1352
892
|
}
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
* Action that marks the last block change explicitly as persistent.
|
|
1356
|
-
*
|
|
1357
|
-
* @return {Object} Action object.
|
|
1358
|
-
*/
|
|
1359
|
-
export function __unstableMarkLastChangeAsPersistent() {
|
|
1360
|
-
return {
|
|
1361
|
-
type: 'MARK_LAST_CHANGE_AS_PERSISTENT'
|
|
1362
|
-
};
|
|
893
|
+
function __unstableMarkLastChangeAsPersistent() {
|
|
894
|
+
return { type: "MARK_LAST_CHANGE_AS_PERSISTENT" };
|
|
1363
895
|
}
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
* Action that signals that the next block change should be marked explicitly as not persistent.
|
|
1367
|
-
*
|
|
1368
|
-
* @return {Object} Action object.
|
|
1369
|
-
*/
|
|
1370
|
-
export function __unstableMarkNextChangeAsNotPersistent() {
|
|
1371
|
-
return {
|
|
1372
|
-
type: 'MARK_NEXT_CHANGE_AS_NOT_PERSISTENT'
|
|
1373
|
-
};
|
|
896
|
+
function __unstableMarkNextChangeAsNotPersistent() {
|
|
897
|
+
return { type: "MARK_NEXT_CHANGE_AS_NOT_PERSISTENT" };
|
|
1374
898
|
}
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
* performed by the user, and can be undone using the `Escape` and `Backspace` keys.
|
|
1379
|
-
* This action must be called after the change was made, and any actions that are a
|
|
1380
|
-
* consequence of it, so it is recommended to be called at the next idle period to ensure all
|
|
1381
|
-
* selection changes have been recorded.
|
|
1382
|
-
*/
|
|
1383
|
-
export const __unstableMarkAutomaticChange = () => ({
|
|
1384
|
-
dispatch
|
|
1385
|
-
}) => {
|
|
1386
|
-
dispatch({
|
|
1387
|
-
type: 'MARK_AUTOMATIC_CHANGE'
|
|
1388
|
-
});
|
|
1389
|
-
const {
|
|
1390
|
-
requestIdleCallback = cb => setTimeout(cb, 100)
|
|
1391
|
-
} = window;
|
|
899
|
+
const __unstableMarkAutomaticChange = () => ({ dispatch }) => {
|
|
900
|
+
dispatch({ type: "MARK_AUTOMATIC_CHANGE" });
|
|
901
|
+
const { requestIdleCallback = (cb) => setTimeout(cb, 100) } = window;
|
|
1392
902
|
requestIdleCallback(() => {
|
|
1393
|
-
dispatch({
|
|
1394
|
-
type: 'MARK_AUTOMATIC_CHANGE_FINAL'
|
|
1395
|
-
});
|
|
903
|
+
dispatch({ type: "MARK_AUTOMATIC_CHANGE_FINAL" });
|
|
1396
904
|
});
|
|
1397
905
|
};
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
export const setNavigationMode = (isNavigationMode = true) => ({
|
|
1405
|
-
dispatch
|
|
1406
|
-
}) => {
|
|
1407
|
-
dispatch.__unstableSetEditorMode(isNavigationMode ? 'navigation' : 'edit');
|
|
1408
|
-
};
|
|
1409
|
-
|
|
1410
|
-
/**
|
|
1411
|
-
* Action that sets the editor mode
|
|
1412
|
-
*
|
|
1413
|
-
* @param {string} mode Editor mode
|
|
1414
|
-
*/
|
|
1415
|
-
export const __unstableSetEditorMode = mode => ({
|
|
1416
|
-
registry
|
|
1417
|
-
}) => {
|
|
1418
|
-
registry.dispatch(preferencesStore).set('core', 'editorTool', mode);
|
|
1419
|
-
if (mode === 'navigation') {
|
|
1420
|
-
speak(__('You are currently in Write mode.'));
|
|
1421
|
-
} else if (mode === 'edit') {
|
|
1422
|
-
speak(__('You are currently in Design mode.'));
|
|
906
|
+
const __unstableSetEditorMode = (mode) => ({ registry }) => {
|
|
907
|
+
registry.dispatch(preferencesStore).set("core", "editorTool", mode);
|
|
908
|
+
if (mode === "navigation") {
|
|
909
|
+
speak(__("You are currently in Write mode."));
|
|
910
|
+
} else if (mode === "edit") {
|
|
911
|
+
speak(__("You are currently in Design mode."));
|
|
1423
912
|
}
|
|
1424
913
|
};
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
export function setBlockMovingClientId() {
|
|
1434
|
-
deprecated('wp.data.dispatch( "core/block-editor" ).setBlockMovingClientId', {
|
|
1435
|
-
since: '6.7',
|
|
1436
|
-
hint: 'Block moving mode feature has been removed'
|
|
1437
|
-
});
|
|
914
|
+
function setBlockMovingClientId() {
|
|
915
|
+
deprecated(
|
|
916
|
+
'wp.data.dispatch( "core/block-editor" ).setBlockMovingClientId',
|
|
917
|
+
{
|
|
918
|
+
since: "6.7",
|
|
919
|
+
hint: "Block moving mode feature has been removed"
|
|
920
|
+
}
|
|
921
|
+
);
|
|
1438
922
|
return {
|
|
1439
|
-
type:
|
|
923
|
+
type: "DO_NOTHING"
|
|
1440
924
|
};
|
|
1441
925
|
}
|
|
1442
|
-
|
|
1443
|
-
/**
|
|
1444
|
-
* Action that duplicates a list of blocks.
|
|
1445
|
-
*
|
|
1446
|
-
* @param {string[]} clientIds
|
|
1447
|
-
* @param {boolean} updateSelection
|
|
1448
|
-
*/
|
|
1449
|
-
export const duplicateBlocks = (clientIds, updateSelection = true) => ({
|
|
1450
|
-
select,
|
|
1451
|
-
dispatch
|
|
1452
|
-
}) => {
|
|
926
|
+
const duplicateBlocks = (clientIds, updateSelection = true) => ({ select, dispatch }) => {
|
|
1453
927
|
if (!clientIds || !clientIds.length) {
|
|
1454
928
|
return;
|
|
1455
929
|
}
|
|
1456
|
-
|
|
1457
|
-
// Return early if blocks don't exist.
|
|
1458
930
|
const blocks = select.getBlocksByClientId(clientIds);
|
|
1459
|
-
if (blocks.some(block => !block)) {
|
|
931
|
+
if (blocks.some((block) => !block)) {
|
|
1460
932
|
return;
|
|
1461
933
|
}
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
934
|
+
const blockNames = blocks.map((block) => block.name);
|
|
935
|
+
if (blockNames.some(
|
|
936
|
+
(blockName) => !hasBlockSupport(blockName, "multiple", true)
|
|
937
|
+
)) {
|
|
1466
938
|
return;
|
|
1467
939
|
}
|
|
1468
940
|
const rootClientId = select.getBlockRootClientId(clientIds[0]);
|
|
1469
941
|
const clientIdsArray = castArray(clientIds);
|
|
1470
|
-
const lastSelectedIndex = select.getBlockIndex(
|
|
1471
|
-
|
|
1472
|
-
|
|
942
|
+
const lastSelectedIndex = select.getBlockIndex(
|
|
943
|
+
clientIdsArray[clientIdsArray.length - 1]
|
|
944
|
+
);
|
|
945
|
+
const clonedBlocks = blocks.map(
|
|
946
|
+
(block) => __experimentalCloneSanitizedBlock(block)
|
|
947
|
+
);
|
|
948
|
+
dispatch.insertBlocks(
|
|
949
|
+
clonedBlocks,
|
|
950
|
+
lastSelectedIndex + 1,
|
|
951
|
+
rootClientId,
|
|
952
|
+
updateSelection
|
|
953
|
+
);
|
|
1473
954
|
if (clonedBlocks.length > 1 && updateSelection) {
|
|
1474
|
-
dispatch.multiSelect(
|
|
955
|
+
dispatch.multiSelect(
|
|
956
|
+
clonedBlocks[0].clientId,
|
|
957
|
+
clonedBlocks[clonedBlocks.length - 1].clientId
|
|
958
|
+
);
|
|
1475
959
|
}
|
|
1476
|
-
return clonedBlocks.map(block => block.clientId);
|
|
960
|
+
return clonedBlocks.map((block) => block.clientId);
|
|
1477
961
|
};
|
|
1478
|
-
|
|
1479
|
-
/**
|
|
1480
|
-
* Action that inserts a default block before a given block.
|
|
1481
|
-
*
|
|
1482
|
-
* @param {string} clientId
|
|
1483
|
-
*/
|
|
1484
|
-
export const insertBeforeBlock = clientId => ({
|
|
1485
|
-
select,
|
|
1486
|
-
dispatch
|
|
1487
|
-
}) => {
|
|
962
|
+
const insertBeforeBlock = (clientId) => ({ select, dispatch }) => {
|
|
1488
963
|
if (!clientId) {
|
|
1489
964
|
return;
|
|
1490
965
|
}
|
|
@@ -1501,7 +976,7 @@ export const insertBeforeBlock = clientId => ({
|
|
|
1501
976
|
const copiedAttributes = {};
|
|
1502
977
|
if (directInsertBlock.attributesToCopy) {
|
|
1503
978
|
const attributes = select.getBlockAttributes(clientId);
|
|
1504
|
-
directInsertBlock.attributesToCopy.forEach(key => {
|
|
979
|
+
directInsertBlock.attributesToCopy.forEach((key) => {
|
|
1505
980
|
if (attributes[key]) {
|
|
1506
981
|
copiedAttributes[key] = attributes[key];
|
|
1507
982
|
}
|
|
@@ -1513,16 +988,7 @@ export const insertBeforeBlock = clientId => ({
|
|
|
1513
988
|
});
|
|
1514
989
|
return dispatch.insertBlock(block, blockIndex, rootClientId);
|
|
1515
990
|
};
|
|
1516
|
-
|
|
1517
|
-
/**
|
|
1518
|
-
* Action that inserts a default block after a given block.
|
|
1519
|
-
*
|
|
1520
|
-
* @param {string} clientId
|
|
1521
|
-
*/
|
|
1522
|
-
export const insertAfterBlock = clientId => ({
|
|
1523
|
-
select,
|
|
1524
|
-
dispatch
|
|
1525
|
-
}) => {
|
|
991
|
+
const insertAfterBlock = (clientId) => ({ select, dispatch }) => {
|
|
1526
992
|
if (!clientId) {
|
|
1527
993
|
return;
|
|
1528
994
|
}
|
|
@@ -1534,12 +1000,16 @@ export const insertAfterBlock = clientId => ({
|
|
|
1534
1000
|
const blockIndex = select.getBlockIndex(clientId);
|
|
1535
1001
|
const directInsertBlock = rootClientId ? select.getDirectInsertBlock(rootClientId) : null;
|
|
1536
1002
|
if (!directInsertBlock) {
|
|
1537
|
-
return dispatch.insertDefaultBlock(
|
|
1003
|
+
return dispatch.insertDefaultBlock(
|
|
1004
|
+
{},
|
|
1005
|
+
rootClientId,
|
|
1006
|
+
blockIndex + 1
|
|
1007
|
+
);
|
|
1538
1008
|
}
|
|
1539
1009
|
const copiedAttributes = {};
|
|
1540
1010
|
if (directInsertBlock.attributesToCopy) {
|
|
1541
1011
|
const attributes = select.getBlockAttributes(clientId);
|
|
1542
|
-
directInsertBlock.attributesToCopy.forEach(key => {
|
|
1012
|
+
directInsertBlock.attributesToCopy.forEach((key) => {
|
|
1543
1013
|
if (attributes[key]) {
|
|
1544
1014
|
copiedAttributes[key] = attributes[key];
|
|
1545
1015
|
}
|
|
@@ -1551,289 +1021,164 @@ export const insertAfterBlock = clientId => ({
|
|
|
1551
1021
|
});
|
|
1552
1022
|
return dispatch.insertBlock(block, blockIndex + 1, rootClientId);
|
|
1553
1023
|
};
|
|
1554
|
-
|
|
1555
|
-
/**
|
|
1556
|
-
* Action that toggles the highlighted block state.
|
|
1557
|
-
*
|
|
1558
|
-
* @param {string} clientId The block's clientId.
|
|
1559
|
-
* @param {boolean} isHighlighted The highlight state.
|
|
1560
|
-
*/
|
|
1561
|
-
export function toggleBlockHighlight(clientId, isHighlighted) {
|
|
1024
|
+
function toggleBlockHighlight(clientId, isHighlighted) {
|
|
1562
1025
|
return {
|
|
1563
|
-
type:
|
|
1026
|
+
type: "TOGGLE_BLOCK_HIGHLIGHT",
|
|
1564
1027
|
clientId,
|
|
1565
1028
|
isHighlighted
|
|
1566
1029
|
};
|
|
1567
1030
|
}
|
|
1568
|
-
|
|
1569
|
-
/**
|
|
1570
|
-
* Action that "flashes" the block with a given `clientId` by rhythmically highlighting it.
|
|
1571
|
-
*
|
|
1572
|
-
* @param {string} clientId Target block client ID.
|
|
1573
|
-
* @param {number} timeout Duration in milliseconds to keep the highlight. Defaults to 150ms.
|
|
1574
|
-
*/
|
|
1575
|
-
export const flashBlock = (clientId, timeout = 150) => async ({
|
|
1576
|
-
dispatch
|
|
1577
|
-
}) => {
|
|
1031
|
+
const flashBlock = (clientId, timeout = 150) => async ({ dispatch }) => {
|
|
1578
1032
|
dispatch(toggleBlockHighlight(clientId, true));
|
|
1579
|
-
await new Promise(resolve => setTimeout(resolve, timeout));
|
|
1033
|
+
await new Promise((resolve) => setTimeout(resolve, timeout));
|
|
1580
1034
|
dispatch(toggleBlockHighlight(clientId, false));
|
|
1581
1035
|
};
|
|
1582
|
-
|
|
1583
|
-
/**
|
|
1584
|
-
* Action that sets whether a block has controlled inner blocks.
|
|
1585
|
-
*
|
|
1586
|
-
* @param {string} clientId The block's clientId.
|
|
1587
|
-
* @param {boolean} hasControlledInnerBlocks True if the block's inner blocks are controlled.
|
|
1588
|
-
*/
|
|
1589
|
-
export function setHasControlledInnerBlocks(clientId, hasControlledInnerBlocks) {
|
|
1036
|
+
function setHasControlledInnerBlocks(clientId, hasControlledInnerBlocks) {
|
|
1590
1037
|
return {
|
|
1591
|
-
type:
|
|
1038
|
+
type: "SET_HAS_CONTROLLED_INNER_BLOCKS",
|
|
1592
1039
|
hasControlledInnerBlocks,
|
|
1593
1040
|
clientId
|
|
1594
1041
|
};
|
|
1595
1042
|
}
|
|
1596
|
-
|
|
1597
|
-
/**
|
|
1598
|
-
* Action that sets whether given blocks are visible on the canvas.
|
|
1599
|
-
*
|
|
1600
|
-
* @param {Record<string,boolean>} updates For each block's clientId, its new visibility setting.
|
|
1601
|
-
*/
|
|
1602
|
-
export function setBlockVisibility(updates) {
|
|
1043
|
+
function setBlockVisibility(updates) {
|
|
1603
1044
|
return {
|
|
1604
|
-
type:
|
|
1045
|
+
type: "SET_BLOCK_VISIBILITY",
|
|
1605
1046
|
updates
|
|
1606
1047
|
};
|
|
1607
1048
|
}
|
|
1608
|
-
|
|
1609
|
-
/**
|
|
1610
|
-
* Action that sets whether a block is being temporarily edited as blocks.
|
|
1611
|
-
*
|
|
1612
|
-
* DO-NOT-USE in production.
|
|
1613
|
-
* This action is created for internal/experimental only usage and may be
|
|
1614
|
-
* removed anytime without any warning, causing breakage on any plugin or theme invoking it.
|
|
1615
|
-
*
|
|
1616
|
-
* @param {?string} temporarilyEditingAsBlocks The block's clientId being temporarily edited as blocks.
|
|
1617
|
-
* @param {?string} focusModeToRevert The focus mode to revert after temporarily edit as blocks finishes.
|
|
1618
|
-
*/
|
|
1619
|
-
export function __unstableSetTemporarilyEditingAsBlocks(temporarilyEditingAsBlocks, focusModeToRevert) {
|
|
1049
|
+
function __unstableSetTemporarilyEditingAsBlocks(temporarilyEditingAsBlocks, focusModeToRevert) {
|
|
1620
1050
|
return {
|
|
1621
|
-
type:
|
|
1051
|
+
type: "SET_TEMPORARILY_EDITING_AS_BLOCKS",
|
|
1622
1052
|
temporarilyEditingAsBlocks,
|
|
1623
1053
|
focusModeToRevert
|
|
1624
1054
|
};
|
|
1625
1055
|
}
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
* @property {number} per_page How many items to fetch per page.
|
|
1632
|
-
* @property {string} search The search term to use for filtering the results.
|
|
1633
|
-
*/
|
|
1634
|
-
|
|
1635
|
-
/**
|
|
1636
|
-
* Interface for inserter media responses. Any media resource should
|
|
1637
|
-
* map their response to this interface, in order to create the core
|
|
1638
|
-
* WordPress media blocks (image, video, audio).
|
|
1639
|
-
*
|
|
1640
|
-
* @typedef {Object} InserterMediaItem
|
|
1641
|
-
* @property {string} title The title of the media item.
|
|
1642
|
-
* @property {string} url The source url of the media item.
|
|
1643
|
-
* @property {string} [previewUrl] The preview source url of the media item to display in the media list.
|
|
1644
|
-
* @property {number} [id] The WordPress id of the media item.
|
|
1645
|
-
* @property {number|string} [sourceId] The id of the media item from external source.
|
|
1646
|
-
* @property {string} [alt] The alt text of the media item.
|
|
1647
|
-
* @property {string} [caption] The caption of the media item.
|
|
1648
|
-
*/
|
|
1649
|
-
|
|
1650
|
-
/**
|
|
1651
|
-
* Registers a new inserter media category. Once registered, the media category is
|
|
1652
|
-
* available in the inserter's media tab.
|
|
1653
|
-
*
|
|
1654
|
-
* The following interfaces are used:
|
|
1655
|
-
*
|
|
1656
|
-
* _Type Definition_
|
|
1657
|
-
*
|
|
1658
|
-
* - _InserterMediaRequest_ `Object`: Interface for inserter media requests.
|
|
1659
|
-
*
|
|
1660
|
-
* _Properties_
|
|
1661
|
-
*
|
|
1662
|
-
* - _per_page_ `number`: How many items to fetch per page.
|
|
1663
|
-
* - _search_ `string`: The search term to use for filtering the results.
|
|
1664
|
-
*
|
|
1665
|
-
* _Type Definition_
|
|
1666
|
-
*
|
|
1667
|
-
* - _InserterMediaItem_ `Object`: Interface for inserter media responses. Any media resource should
|
|
1668
|
-
* map their response to this interface, in order to create the core
|
|
1669
|
-
* WordPress media blocks (image, video, audio).
|
|
1670
|
-
*
|
|
1671
|
-
* _Properties_
|
|
1672
|
-
*
|
|
1673
|
-
* - _title_ `string`: The title of the media item.
|
|
1674
|
-
* - _url_ `string: The source url of the media item.
|
|
1675
|
-
* - _previewUrl_ `[string]`: The preview source url of the media item to display in the media list.
|
|
1676
|
-
* - _id_ `[number]`: The WordPress id of the media item.
|
|
1677
|
-
* - _sourceId_ `[number|string]`: The id of the media item from external source.
|
|
1678
|
-
* - _alt_ `[string]`: The alt text of the media item.
|
|
1679
|
-
* - _caption_ `[string]`: The caption of the media item.
|
|
1680
|
-
*
|
|
1681
|
-
* @param {InserterMediaCategory} category The inserter media category to register.
|
|
1682
|
-
*
|
|
1683
|
-
* @example
|
|
1684
|
-
* ```js
|
|
1685
|
-
*
|
|
1686
|
-
* wp.data.dispatch('core/block-editor').registerInserterMediaCategory( {
|
|
1687
|
-
* name: 'openverse',
|
|
1688
|
-
* labels: {
|
|
1689
|
-
* name: 'Openverse',
|
|
1690
|
-
* search_items: 'Search Openverse',
|
|
1691
|
-
* },
|
|
1692
|
-
* mediaType: 'image',
|
|
1693
|
-
* async fetch( query = {} ) {
|
|
1694
|
-
* const defaultArgs = {
|
|
1695
|
-
* mature: false,
|
|
1696
|
-
* excluded_source: 'flickr,inaturalist,wikimedia',
|
|
1697
|
-
* license: 'pdm,cc0',
|
|
1698
|
-
* };
|
|
1699
|
-
* const finalQuery = { ...query, ...defaultArgs };
|
|
1700
|
-
* // Sometimes you might need to map the supported request params according to `InserterMediaRequest`.
|
|
1701
|
-
* // interface. In this example the `search` query param is named `q`.
|
|
1702
|
-
* const mapFromInserterMediaRequest = {
|
|
1703
|
-
* per_page: 'page_size',
|
|
1704
|
-
* search: 'q',
|
|
1705
|
-
* };
|
|
1706
|
-
* const url = new URL( 'https://api.openverse.org/v1/images/' );
|
|
1707
|
-
* Object.entries( finalQuery ).forEach( ( [ key, value ] ) => {
|
|
1708
|
-
* const queryKey = mapFromInserterMediaRequest[ key ] || key;
|
|
1709
|
-
* url.searchParams.set( queryKey, value );
|
|
1710
|
-
* } );
|
|
1711
|
-
* const response = await window.fetch( url, {
|
|
1712
|
-
* headers: {
|
|
1713
|
-
* 'User-Agent': 'WordPress/inserter-media-fetch',
|
|
1714
|
-
* },
|
|
1715
|
-
* } );
|
|
1716
|
-
* const jsonResponse = await response.json();
|
|
1717
|
-
* const results = jsonResponse.results;
|
|
1718
|
-
* return results.map( ( result ) => ( {
|
|
1719
|
-
* ...result,
|
|
1720
|
-
* // If your response result includes an `id` prop that you want to access later, it should
|
|
1721
|
-
* // be mapped to `InserterMediaItem`'s `sourceId` prop. This can be useful if you provide
|
|
1722
|
-
* // a report URL getter.
|
|
1723
|
-
* // Additionally you should always clear the `id` value of your response results because
|
|
1724
|
-
* // it is used to identify WordPress media items.
|
|
1725
|
-
* sourceId: result.id,
|
|
1726
|
-
* id: undefined,
|
|
1727
|
-
* caption: result.caption,
|
|
1728
|
-
* previewUrl: result.thumbnail,
|
|
1729
|
-
* } ) );
|
|
1730
|
-
* },
|
|
1731
|
-
* getReportUrl: ( { sourceId } ) =>
|
|
1732
|
-
* `https://wordpress.org/openverse/image/${ sourceId }/report/`,
|
|
1733
|
-
* isExternalResource: true,
|
|
1734
|
-
* } );
|
|
1735
|
-
* ```
|
|
1736
|
-
*
|
|
1737
|
-
* @typedef {Object} InserterMediaCategory Interface for inserter media category.
|
|
1738
|
-
* @property {string} name The name of the media category, that should be unique among all media categories.
|
|
1739
|
-
* @property {Object} labels Labels for the media category.
|
|
1740
|
-
* @property {string} labels.name General name of the media category. It's used in the inserter media items list.
|
|
1741
|
-
* @property {string} [labels.search_items='Search'] Label for searching items. Default is ‘Search Posts’ / ‘Search Pages’.
|
|
1742
|
-
* @property {('image'|'audio'|'video')} mediaType The media type of the media category.
|
|
1743
|
-
* @property {(InserterMediaRequest) => Promise<InserterMediaItem[]>} fetch The function to fetch media items for the category.
|
|
1744
|
-
* @property {(InserterMediaItem) => string} [getReportUrl] If the media category supports reporting media items, this function should return
|
|
1745
|
-
* the report url for the media item. It accepts the `InserterMediaItem` as an argument.
|
|
1746
|
-
* @property {boolean} [isExternalResource] If the media category is an external resource, this should be set to true.
|
|
1747
|
-
* This is used to avoid making a request to the external resource when the user
|
|
1748
|
-
*/
|
|
1749
|
-
export const registerInserterMediaCategory = category => ({
|
|
1750
|
-
select,
|
|
1751
|
-
dispatch
|
|
1752
|
-
}) => {
|
|
1753
|
-
if (!category || typeof category !== 'object') {
|
|
1754
|
-
console.error('Category should be an `InserterMediaCategory` object.');
|
|
1056
|
+
const registerInserterMediaCategory = (category) => ({ select, dispatch }) => {
|
|
1057
|
+
if (!category || typeof category !== "object") {
|
|
1058
|
+
console.error(
|
|
1059
|
+
"Category should be an `InserterMediaCategory` object."
|
|
1060
|
+
);
|
|
1755
1061
|
return;
|
|
1756
1062
|
}
|
|
1757
1063
|
if (!category.name) {
|
|
1758
|
-
console.error(
|
|
1064
|
+
console.error(
|
|
1065
|
+
"Category should have a `name` that should be unique among all media categories."
|
|
1066
|
+
);
|
|
1759
1067
|
return;
|
|
1760
1068
|
}
|
|
1761
1069
|
if (!category.labels?.name) {
|
|
1762
|
-
console.error(
|
|
1070
|
+
console.error("Category should have a `labels.name`.");
|
|
1763
1071
|
return;
|
|
1764
1072
|
}
|
|
1765
|
-
if (![
|
|
1766
|
-
console.error(
|
|
1073
|
+
if (!["image", "audio", "video"].includes(category.mediaType)) {
|
|
1074
|
+
console.error(
|
|
1075
|
+
"Category should have `mediaType` property that is one of `image|audio|video`."
|
|
1076
|
+
);
|
|
1767
1077
|
return;
|
|
1768
1078
|
}
|
|
1769
|
-
if (!category.fetch || typeof category.fetch !==
|
|
1770
|
-
console.error(
|
|
1079
|
+
if (!category.fetch || typeof category.fetch !== "function") {
|
|
1080
|
+
console.error(
|
|
1081
|
+
"Category should have a `fetch` function defined with the following signature `(InserterMediaRequest) => Promise<InserterMediaItem[]>`."
|
|
1082
|
+
);
|
|
1771
1083
|
return;
|
|
1772
1084
|
}
|
|
1773
1085
|
const registeredInserterMediaCategories = select.getRegisteredInserterMediaCategories();
|
|
1774
|
-
if (registeredInserterMediaCategories.some(
|
|
1775
|
-
name
|
|
1776
|
-
|
|
1777
|
-
console.error(
|
|
1086
|
+
if (registeredInserterMediaCategories.some(
|
|
1087
|
+
({ name }) => name === category.name
|
|
1088
|
+
)) {
|
|
1089
|
+
console.error(
|
|
1090
|
+
`A category is already registered with the same name: "${category.name}".`
|
|
1091
|
+
);
|
|
1778
1092
|
return;
|
|
1779
1093
|
}
|
|
1780
|
-
if (registeredInserterMediaCategories.some(
|
|
1781
|
-
labels: {
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1094
|
+
if (registeredInserterMediaCategories.some(
|
|
1095
|
+
({ labels: { name } = {} }) => name === category.labels?.name
|
|
1096
|
+
)) {
|
|
1097
|
+
console.error(
|
|
1098
|
+
`A category is already registered with the same labels.name: "${category.labels.name}".`
|
|
1099
|
+
);
|
|
1786
1100
|
return;
|
|
1787
1101
|
}
|
|
1788
|
-
// `inserterMediaCategories` is a private block editor setting, which means it cannot
|
|
1789
|
-
// be updated through the public `updateSettings` action. We preserve this setting as
|
|
1790
|
-
// private, so extenders can only add new inserter media categories and don't have any
|
|
1791
|
-
// control over the core media categories.
|
|
1792
1102
|
dispatch({
|
|
1793
|
-
type:
|
|
1794
|
-
category: {
|
|
1795
|
-
...category,
|
|
1796
|
-
isExternalResource: true
|
|
1797
|
-
}
|
|
1103
|
+
type: "REGISTER_INSERTER_MEDIA_CATEGORY",
|
|
1104
|
+
category: { ...category, isExternalResource: true }
|
|
1798
1105
|
});
|
|
1799
1106
|
};
|
|
1800
|
-
|
|
1801
|
-
/**
|
|
1802
|
-
* @typedef {import('../components/block-editing-mode').BlockEditingMode} BlockEditingMode
|
|
1803
|
-
*/
|
|
1804
|
-
|
|
1805
|
-
/**
|
|
1806
|
-
* Sets the block editing mode for a given block.
|
|
1807
|
-
*
|
|
1808
|
-
* @see useBlockEditingMode
|
|
1809
|
-
*
|
|
1810
|
-
* @param {string} clientId The block client ID, or `''` for the root container.
|
|
1811
|
-
* @param {BlockEditingMode} mode The block editing mode. One of `'disabled'`,
|
|
1812
|
-
* `'contentOnly'`, or `'default'`.
|
|
1813
|
-
*
|
|
1814
|
-
* @return {Object} Action object.
|
|
1815
|
-
*/
|
|
1816
|
-
export function setBlockEditingMode(clientId = '', mode) {
|
|
1107
|
+
function setBlockEditingMode(clientId = "", mode) {
|
|
1817
1108
|
return {
|
|
1818
|
-
type:
|
|
1109
|
+
type: "SET_BLOCK_EDITING_MODE",
|
|
1819
1110
|
clientId,
|
|
1820
1111
|
mode
|
|
1821
1112
|
};
|
|
1822
1113
|
}
|
|
1823
|
-
|
|
1824
|
-
/**
|
|
1825
|
-
* Clears the block editing mode for a given block.
|
|
1826
|
-
*
|
|
1827
|
-
* @see useBlockEditingMode
|
|
1828
|
-
*
|
|
1829
|
-
* @param {string} clientId The block client ID, or `''` for the root container.
|
|
1830
|
-
*
|
|
1831
|
-
* @return {Object} Action object.
|
|
1832
|
-
*/
|
|
1833
|
-
export function unsetBlockEditingMode(clientId = '') {
|
|
1114
|
+
function unsetBlockEditingMode(clientId = "") {
|
|
1834
1115
|
return {
|
|
1835
|
-
type:
|
|
1116
|
+
type: "UNSET_BLOCK_EDITING_MODE",
|
|
1836
1117
|
clientId
|
|
1837
1118
|
};
|
|
1838
1119
|
}
|
|
1839
|
-
|
|
1120
|
+
export {
|
|
1121
|
+
__unstableDeleteSelection,
|
|
1122
|
+
__unstableExpandSelection,
|
|
1123
|
+
__unstableMarkAutomaticChange,
|
|
1124
|
+
__unstableMarkLastChangeAsPersistent,
|
|
1125
|
+
__unstableMarkNextChangeAsNotPersistent,
|
|
1126
|
+
__unstableSaveReusableBlock,
|
|
1127
|
+
__unstableSetEditorMode,
|
|
1128
|
+
__unstableSetTemporarilyEditingAsBlocks,
|
|
1129
|
+
__unstableSplitSelection,
|
|
1130
|
+
clearSelectedBlock,
|
|
1131
|
+
duplicateBlocks,
|
|
1132
|
+
enterFormattedText,
|
|
1133
|
+
exitFormattedText,
|
|
1134
|
+
flashBlock,
|
|
1135
|
+
hideInsertionPoint,
|
|
1136
|
+
hoverBlock,
|
|
1137
|
+
insertAfterBlock,
|
|
1138
|
+
insertBeforeBlock,
|
|
1139
|
+
insertBlock,
|
|
1140
|
+
insertBlocks,
|
|
1141
|
+
insertDefaultBlock,
|
|
1142
|
+
mergeBlocks,
|
|
1143
|
+
moveBlockToPosition,
|
|
1144
|
+
moveBlocksDown,
|
|
1145
|
+
moveBlocksToPosition,
|
|
1146
|
+
moveBlocksUp,
|
|
1147
|
+
multiSelect,
|
|
1148
|
+
receiveBlocks,
|
|
1149
|
+
registerInserterMediaCategory,
|
|
1150
|
+
removeBlock,
|
|
1151
|
+
removeBlocks,
|
|
1152
|
+
replaceBlock,
|
|
1153
|
+
replaceBlocks,
|
|
1154
|
+
replaceInnerBlocks,
|
|
1155
|
+
resetBlocks,
|
|
1156
|
+
resetSelection,
|
|
1157
|
+
selectBlock,
|
|
1158
|
+
selectNextBlock,
|
|
1159
|
+
selectPreviousBlock,
|
|
1160
|
+
selectionChange,
|
|
1161
|
+
setBlockEditingMode,
|
|
1162
|
+
setBlockMovingClientId,
|
|
1163
|
+
setBlockVisibility,
|
|
1164
|
+
setHasControlledInnerBlocks,
|
|
1165
|
+
setTemplateValidity,
|
|
1166
|
+
showInsertionPoint,
|
|
1167
|
+
startDraggingBlocks,
|
|
1168
|
+
startMultiSelect,
|
|
1169
|
+
startTyping,
|
|
1170
|
+
stopDraggingBlocks,
|
|
1171
|
+
stopMultiSelect,
|
|
1172
|
+
stopTyping,
|
|
1173
|
+
synchronizeTemplate,
|
|
1174
|
+
toggleBlockHighlight,
|
|
1175
|
+
toggleBlockMode,
|
|
1176
|
+
toggleSelection,
|
|
1177
|
+
unsetBlockEditingMode,
|
|
1178
|
+
updateBlock,
|
|
1179
|
+
updateBlockAttributes,
|
|
1180
|
+
updateBlockListSettings,
|
|
1181
|
+
updateSettings,
|
|
1182
|
+
validateBlocksToTemplate
|
|
1183
|
+
};
|
|
1184
|
+
//# sourceMappingURL=actions.js.map
|