@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 +1,7 @@
|
|
|
1
|
-
{"version":3,"names":["_element","require","_compose","calculateScale","frameSize","containerWidth","maxContainerWidth","scaleContainerWidth","Math","min","computeScrollHeightNext","transitionFrom","transitionTo","scaleValue","prevScale","scrollHeight","prevScrollHeight","computeScrollTopNext","containerHeight","prevContainerHeight","prevFrameSize","scrollTop","prevScrollTop","scrollTopNext","maxScrollTop","round","max","getAnimationKeyframes","translate","scale","paddingTop","paddingBottom","useScaleCanvas","iframeDocument","contentResizeListener","height","contentHeight","useResizeObserver","containerResizeListener","width","initialContainerWidthRef","useRef","isZoomedOut","prefersReducedMotion","useReducedMotion","isAutoScaled","startAnimationRef","animationRef","useEffect","current","transitionFromRef","transitionToRef","startZoomOutAnimation","useCallback","documentElement","style","setProperty","classList","add","animate","easing","duration","finishZoomOutAnimation","remove","removeProperty","previousIsZoomedOut","trigger","reverse","tempTransitionFrom","tempTransitionTo","clientHeight","onfinish"],"sources":["@wordpress/block-editor/src/components/iframe/use-scale-canvas.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect, useRef, useCallback } from '@wordpress/element';\nimport { useReducedMotion, useResizeObserver } from '@wordpress/compose';\n\n/**\n * @typedef {Object} TransitionState\n * @property {number} scaleValue Scale of the canvas.\n * @property {number} frameSize Size of the frame/offset around the canvas.\n * @property {number} containerHeight containerHeight of the iframe.\n * @property {number} scrollTop ScrollTop of the iframe.\n * @property {number} scrollHeight ScrollHeight of the iframe.\n */\n\n/**\n * Calculate the scale of the canvas.\n *\n * @param {Object} options Object of options\n * @param {number} options.frameSize Size of the frame/offset around the canvas\n * @param {number} options.containerWidth Actual width of the canvas container\n * @param {number} options.maxContainerWidth Maximum width of the container to use for the scale calculation. This locks the canvas to a maximum width when zooming out.\n * @param {number} options.scaleContainerWidth Width the of the container wrapping the canvas container\n * @return {number} Scale value between 0 and/or equal to 1\n */\nfunction calculateScale( {\n\tframeSize,\n\tcontainerWidth,\n\tmaxContainerWidth,\n\tscaleContainerWidth,\n} ) {\n\treturn (\n\t\t( Math.min( containerWidth, maxContainerWidth ) - frameSize * 2 ) /\n\t\tscaleContainerWidth\n\t);\n}\n\n/**\n * Compute the next scrollHeight based on the transition states.\n *\n * @param {TransitionState} transitionFrom Starting point of the transition\n * @param {TransitionState} transitionTo Ending state of the transition\n * @return {number} Next scrollHeight based on scale and frame value changes.\n */\nfunction computeScrollHeightNext( transitionFrom, transitionTo ) {\n\tconst { scaleValue: prevScale, scrollHeight: prevScrollHeight } =\n\t\ttransitionFrom;\n\tconst { frameSize, scaleValue } = transitionTo;\n\n\treturn prevScrollHeight * ( scaleValue / prevScale ) + frameSize * 2;\n}\n\n/**\n * Compute the next scrollTop position after scaling the iframe content.\n *\n * @param {TransitionState} transitionFrom Starting point of the transition\n * @param {TransitionState} transitionTo Ending state of the transition\n * @return {number} Next scrollTop position after scaling the iframe content.\n */\nfunction computeScrollTopNext( transitionFrom, transitionTo ) {\n\tconst {\n\t\tcontainerHeight: prevContainerHeight,\n\t\tframeSize: prevFrameSize,\n\t\tscaleValue: prevScale,\n\t\tscrollTop: prevScrollTop,\n\t} = transitionFrom;\n\tconst { containerHeight, frameSize, scaleValue, scrollHeight } =\n\t\ttransitionTo;\n\t// Step 0: Start with the current scrollTop.\n\tlet scrollTopNext = prevScrollTop;\n\t// Step 1: Undo the effects of the previous scale and frame around the\n\t// midpoint of the visible area.\n\tscrollTopNext =\n\t\t( scrollTopNext + prevContainerHeight / 2 - prevFrameSize ) /\n\t\t\tprevScale -\n\t\tprevContainerHeight / 2;\n\n\t// Step 2: Apply the new scale and frame around the midpoint of the\n\t// visible area.\n\tscrollTopNext =\n\t\t( scrollTopNext + containerHeight / 2 ) * scaleValue +\n\t\tframeSize -\n\t\tcontainerHeight / 2;\n\n\t// Step 3: Handle an edge case so that you scroll to the top of the\n\t// iframe if the top of the iframe content is visible in the container.\n\t// The same edge case for the bottom is skipped because changing content\n\t// makes calculating it impossible.\n\tscrollTopNext = prevScrollTop <= prevFrameSize ? 0 : scrollTopNext;\n\n\t// This is the scrollTop value if you are scrolled to the bottom of the\n\t// iframe. We can't just let the browser handle it because we need to\n\t// animate the scaling.\n\tconst maxScrollTop = scrollHeight - containerHeight;\n\n\t// Step 4: Clamp the scrollTopNext between the minimum and maximum\n\t// possible scrollTop positions. Round the value to avoid subpixel\n\t// truncation by the browser which sometimes causes a 1px error.\n\treturn Math.round(\n\t\tMath.min( Math.max( 0, scrollTopNext ), Math.max( 0, maxScrollTop ) )\n\t);\n}\n\n/**\n * Generate the keyframes to use for the zoom out animation.\n *\n * @param {TransitionState} transitionFrom Starting transition state.\n * @param {TransitionState} transitionTo Ending transition state.\n * @return {Object[]} An array of keyframes to use for the animation.\n */\nfunction getAnimationKeyframes( transitionFrom, transitionTo ) {\n\tconst {\n\t\tscaleValue: prevScale,\n\t\tframeSize: prevFrameSize,\n\t\tscrollTop,\n\t} = transitionFrom;\n\tconst { scaleValue, frameSize, scrollTop: scrollTopNext } = transitionTo;\n\n\treturn [\n\t\t{\n\t\t\ttranslate: `0 0`,\n\t\t\tscale: prevScale,\n\t\t\tpaddingTop: `${ prevFrameSize / prevScale }px`,\n\t\t\tpaddingBottom: `${ prevFrameSize / prevScale }px`,\n\t\t},\n\t\t{\n\t\t\ttranslate: `0 ${ scrollTop - scrollTopNext }px`,\n\t\t\tscale: scaleValue,\n\t\t\tpaddingTop: `${ frameSize / scaleValue }px`,\n\t\t\tpaddingBottom: `${ frameSize / scaleValue }px`,\n\t\t},\n\t];\n}\n\n/**\n * @typedef {Object} ScaleCanvasResult\n * @property {boolean} isZoomedOut A boolean indicating if the canvas is zoomed out.\n * @property {number} scaleContainerWidth The width of the container used to calculate the scale.\n * @property {Object} contentResizeListener A resize observer for the content.\n * @property {Object} containerResizeListener A resize observer for the container.\n */\n\n/**\n * Handles scaling the canvas for the zoom out mode and animating between\n * the states.\n *\n * @param {Object} options Object of options.\n * @param {number} options.frameSize Size of the frame around the content.\n * @param {Document} options.iframeDocument Document of the iframe.\n * @param {number} options.maxContainerWidth Max width of the canvas to use as the starting scale point. Defaults to 750.\n * @param {number|string} options.scale Scale of the canvas. Can be an decimal between 0 and 1, 1, or 'auto-scaled'.\n * @return {ScaleCanvasResult} Properties of the result.\n */\nexport function useScaleCanvas( {\n\tframeSize,\n\tiframeDocument,\n\tmaxContainerWidth = 750,\n\tscale,\n} ) {\n\tconst [ contentResizeListener, { height: contentHeight } ] =\n\t\tuseResizeObserver();\n\tconst [\n\t\tcontainerResizeListener,\n\t\t{ width: containerWidth, height: containerHeight },\n\t] = useResizeObserver();\n\n\tconst initialContainerWidthRef = useRef( 0 );\n\tconst isZoomedOut = scale !== 1;\n\tconst prefersReducedMotion = useReducedMotion();\n\tconst isAutoScaled = scale === 'auto-scaled';\n\t// Track if the animation should start when the useEffect runs.\n\tconst startAnimationRef = useRef( false );\n\t// Track the animation so we know if we have an animation running,\n\t// and can cancel it, reverse it, call a finish event, etc.\n\tconst animationRef = useRef( null );\n\n\tuseEffect( () => {\n\t\tif ( ! isZoomedOut ) {\n\t\t\tinitialContainerWidthRef.current = containerWidth;\n\t\t}\n\t}, [ containerWidth, isZoomedOut ] );\n\n\tconst scaleContainerWidth = Math.max(\n\t\tinitialContainerWidthRef.current,\n\t\tcontainerWidth\n\t);\n\n\tconst scaleValue = isAutoScaled\n\t\t? calculateScale( {\n\t\t\t\tframeSize,\n\t\t\t\tcontainerWidth,\n\t\t\t\tmaxContainerWidth,\n\t\t\t\tscaleContainerWidth,\n\t\t } )\n\t\t: scale;\n\n\t/**\n\t * The starting transition state for the zoom out animation.\n\t * @type {import('react').RefObject<TransitionState>}\n\t */\n\tconst transitionFromRef = useRef( {\n\t\tscaleValue,\n\t\tframeSize,\n\t\tcontainerHeight: 0,\n\t\tscrollTop: 0,\n\t\tscrollHeight: 0,\n\t} );\n\n\t/**\n\t * The ending transition state for the zoom out animation.\n\t * @type {import('react').RefObject<TransitionState>}\n\t */\n\tconst transitionToRef = useRef( {\n\t\tscaleValue,\n\t\tframeSize,\n\t\tcontainerHeight: 0,\n\t\tscrollTop: 0,\n\t\tscrollHeight: 0,\n\t} );\n\n\t/**\n\t * Start the zoom out animation. This sets the necessary CSS variables\n\t * for animating the canvas and returns the Animation object.\n\t *\n\t * @return {Animation} The animation object for the zoom out animation.\n\t */\n\tconst startZoomOutAnimation = useCallback( () => {\n\t\tconst { scrollTop } = transitionFromRef.current;\n\t\tconst { scrollTop: scrollTopNext } = transitionToRef.current;\n\n\t\tiframeDocument.documentElement.style.setProperty(\n\t\t\t'--wp-block-editor-iframe-zoom-out-scroll-top',\n\t\t\t`${ scrollTop }px`\n\t\t);\n\n\t\tiframeDocument.documentElement.style.setProperty(\n\t\t\t'--wp-block-editor-iframe-zoom-out-scroll-top-next',\n\t\t\t`${ scrollTopNext }px`\n\t\t);\n\n\t\t// If the container has a scrolllbar, force a scrollbar to prevent the content from shifting while animating.\n\t\tiframeDocument.documentElement.style.setProperty(\n\t\t\t'--wp-block-editor-iframe-zoom-out-overflow-behavior',\n\t\t\ttransitionFromRef.current.scrollHeight ===\n\t\t\t\ttransitionFromRef.current.containerHeight\n\t\t\t\t? 'auto'\n\t\t\t\t: 'scroll'\n\t\t);\n\n\t\tiframeDocument.documentElement.classList.add( 'zoom-out-animation' );\n\n\t\treturn iframeDocument.documentElement.animate(\n\t\t\tgetAnimationKeyframes(\n\t\t\t\ttransitionFromRef.current,\n\t\t\t\ttransitionToRef.current\n\t\t\t),\n\t\t\t{\n\t\t\t\teasing: 'cubic-bezier(0.46, 0.03, 0.52, 0.96)',\n\t\t\t\tduration: 400,\n\t\t\t}\n\t\t);\n\t}, [ iframeDocument ] );\n\n\t/**\n\t * Callback when the zoom out animation is finished.\n\t * - Cleans up animations refs.\n\t * - Adds final CSS vars for scale and frame size to preserve the state.\n\t * - Removes the 'zoom-out-animation' class (which has the fixed positioning).\n\t * - Sets the final scroll position after the canvas is no longer in fixed position.\n\t * - Removes CSS vars related to the animation.\n\t * - Sets the transitionFrom to the transitionTo state to be ready for the next animation.\n\t */\n\tconst finishZoomOutAnimation = useCallback( () => {\n\t\tstartAnimationRef.current = false;\n\t\tanimationRef.current = null;\n\n\t\t// Add our final scale and frame size now that the animation is done.\n\t\tiframeDocument.documentElement.style.setProperty(\n\t\t\t'--wp-block-editor-iframe-zoom-out-scale',\n\t\t\ttransitionToRef.current.scaleValue\n\t\t);\n\t\tiframeDocument.documentElement.style.setProperty(\n\t\t\t'--wp-block-editor-iframe-zoom-out-frame-size',\n\t\t\t`${ transitionToRef.current.frameSize }px`\n\t\t);\n\n\t\tiframeDocument.documentElement.classList.remove( 'zoom-out-animation' );\n\n\t\t// Set the final scroll position that was just animated to.\n\t\t// Disable reason: Eslint isn't smart enough to know that this is a\n\t\t// DOM element. https://github.com/facebook/react/issues/31483\n\t\t// eslint-disable-next-line react-compiler/react-compiler\n\t\tiframeDocument.documentElement.scrollTop =\n\t\t\ttransitionToRef.current.scrollTop;\n\n\t\tiframeDocument.documentElement.style.removeProperty(\n\t\t\t'--wp-block-editor-iframe-zoom-out-scroll-top'\n\t\t);\n\t\tiframeDocument.documentElement.style.removeProperty(\n\t\t\t'--wp-block-editor-iframe-zoom-out-scroll-top-next'\n\t\t);\n\t\tiframeDocument.documentElement.style.removeProperty(\n\t\t\t'--wp-block-editor-iframe-zoom-out-overflow-behavior'\n\t\t);\n\n\t\t// Update previous values.\n\t\ttransitionFromRef.current = transitionToRef.current;\n\t}, [ iframeDocument ] );\n\n\tconst previousIsZoomedOut = useRef( false );\n\n\t/**\n\t * Runs when zoom out mode is toggled, and sets the startAnimation flag\n\t * so the animation will start when the next useEffect runs. We _only_\n\t * want to animate when the zoom out mode is toggled, not when the scale\n\t * changes due to the container resizing.\n\t */\n\tuseEffect( () => {\n\t\tconst trigger =\n\t\t\tiframeDocument && previousIsZoomedOut.current !== isZoomedOut;\n\n\t\tpreviousIsZoomedOut.current = isZoomedOut;\n\n\t\tif ( ! trigger ) {\n\t\t\treturn;\n\t\t}\n\n\t\tstartAnimationRef.current = true;\n\n\t\tif ( ! isZoomedOut ) {\n\t\t\treturn;\n\t\t}\n\n\t\tiframeDocument.documentElement.classList.add( 'is-zoomed-out' );\n\t\treturn () => {\n\t\t\tiframeDocument.documentElement.classList.remove( 'is-zoomed-out' );\n\t\t};\n\t}, [ iframeDocument, isZoomedOut ] );\n\n\t/**\n\t * This handles:\n\t * 1. Setting the correct scale and vars of the canvas when zoomed out\n\t * 2. If zoom out mode has been toggled, runs the animation of zooming in/out\n\t */\n\tuseEffect( () => {\n\t\tif ( ! iframeDocument ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// We need to update the appropriate scale to exit from. If sidebars have been opened since setting the\n\t\t// original scale, we will snap to a much smaller scale due to the scale container immediately changing sizes when exiting.\n\t\tif ( isAutoScaled && transitionFromRef.current.scaleValue !== 1 ) {\n\t\t\t// We use containerWidth as the divisor, as scaleContainerWidth will always match the containerWidth when\n\t\t\t// exiting.\n\t\t\ttransitionFromRef.current.scaleValue = calculateScale( {\n\t\t\t\tframeSize: transitionFromRef.current.frameSize,\n\t\t\t\tcontainerWidth,\n\t\t\t\tmaxContainerWidth,\n\t\t\t\tscaleContainerWidth: containerWidth,\n\t\t\t} );\n\t\t}\n\n\t\tif ( scaleValue < 1 ) {\n\t\t\t// If we are not going to animate the transition, set the scale and frame size directly.\n\t\t\t// If we are animating, these values will be set when the animation is finished.\n\t\t\t// Example: Opening sidebars that reduce the scale of the canvas, but we don't want to\n\t\t\t// animate the transition.\n\t\t\tif ( ! startAnimationRef.current ) {\n\t\t\t\tiframeDocument.documentElement.style.setProperty(\n\t\t\t\t\t'--wp-block-editor-iframe-zoom-out-scale',\n\t\t\t\t\tscaleValue\n\t\t\t\t);\n\t\t\t\tiframeDocument.documentElement.style.setProperty(\n\t\t\t\t\t'--wp-block-editor-iframe-zoom-out-frame-size',\n\t\t\t\t\t`${ frameSize }px`\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tiframeDocument.documentElement.style.setProperty(\n\t\t\t\t'--wp-block-editor-iframe-zoom-out-content-height',\n\t\t\t\t`${ contentHeight }px`\n\t\t\t);\n\n\t\t\tiframeDocument.documentElement.style.setProperty(\n\t\t\t\t'--wp-block-editor-iframe-zoom-out-inner-height',\n\t\t\t\t`${ containerHeight }px`\n\t\t\t);\n\n\t\t\tiframeDocument.documentElement.style.setProperty(\n\t\t\t\t'--wp-block-editor-iframe-zoom-out-container-width',\n\t\t\t\t`${ containerWidth }px`\n\t\t\t);\n\t\t\tiframeDocument.documentElement.style.setProperty(\n\t\t\t\t'--wp-block-editor-iframe-zoom-out-scale-container-width',\n\t\t\t\t`${ scaleContainerWidth }px`\n\t\t\t);\n\t\t}\n\n\t\t/**\n\t\t * Handle the zoom out animation:\n\t\t *\n\t\t * - Get the current scrollTop position.\n\t\t * - Calculate where the same scroll position is after scaling.\n\t\t * - Apply fixed positioning to the canvas with a transform offset\n\t\t * to keep the canvas centered.\n\t\t * - Animate the scale and padding to the new scale and frame size.\n\t\t * - After the animation is complete, remove the fixed positioning\n\t\t * and set the scroll position that keeps everything centered.\n\t\t */\n\t\tif ( startAnimationRef.current ) {\n\t\t\t// Don't allow a new transition to start again unless it was started by the zoom out mode changing.\n\t\t\tstartAnimationRef.current = false;\n\n\t\t\t/**\n\t\t\t * If we already have an animation running, reverse it.\n\t\t\t */\n\t\t\tif ( animationRef.current ) {\n\t\t\t\tanimationRef.current.reverse();\n\t\t\t\t// Swap the transition to/from refs so that we set the correct values when\n\t\t\t\t// finishZoomOutAnimation runs.\n\t\t\t\tconst tempTransitionFrom = transitionFromRef.current;\n\t\t\t\tconst tempTransitionTo = transitionToRef.current;\n\t\t\t\ttransitionFromRef.current = tempTransitionTo;\n\t\t\t\ttransitionToRef.current = tempTransitionFrom;\n\t\t\t} else {\n\t\t\t\t/**\n\t\t\t\t * Start a new zoom animation.\n\t\t\t\t */\n\n\t\t\t\t// We can't trust the set value from contentHeight, as it was measured\n\t\t\t\t// before the zoom out mode was changed. After zoom out mode is changed,\n\t\t\t\t// appenders may appear or disappear, so we need to get the height from\n\t\t\t\t// the iframe at this point when we're about to animate the zoom out.\n\t\t\t\t// The iframe scrollTop, scrollHeight, and clientHeight will all be\n\t\t\t\t// the most accurate.\n\t\t\t\ttransitionFromRef.current.scrollTop =\n\t\t\t\t\tiframeDocument.documentElement.scrollTop;\n\t\t\t\ttransitionFromRef.current.scrollHeight =\n\t\t\t\t\tiframeDocument.documentElement.scrollHeight;\n\t\t\t\t// Use containerHeight, as it's the previous container height before the zoom out animation starts.\n\t\t\t\ttransitionFromRef.current.containerHeight = containerHeight;\n\n\t\t\t\ttransitionToRef.current = {\n\t\t\t\t\tscaleValue,\n\t\t\t\t\tframeSize,\n\t\t\t\t\tcontainerHeight:\n\t\t\t\t\t\tiframeDocument.documentElement.clientHeight, // use clientHeight to get the actual height of the new container after zoom state changes have rendered, as it will be the most up-to-date.\n\t\t\t\t};\n\n\t\t\t\ttransitionToRef.current.scrollHeight = computeScrollHeightNext(\n\t\t\t\t\ttransitionFromRef.current,\n\t\t\t\t\ttransitionToRef.current\n\t\t\t\t);\n\t\t\t\ttransitionToRef.current.scrollTop = computeScrollTopNext(\n\t\t\t\t\ttransitionFromRef.current,\n\t\t\t\t\ttransitionToRef.current\n\t\t\t\t);\n\n\t\t\t\tanimationRef.current = startZoomOutAnimation();\n\n\t\t\t\t// If the user prefers reduced motion, finish the animation immediately and set the final state.\n\t\t\t\tif ( prefersReducedMotion ) {\n\t\t\t\t\tfinishZoomOutAnimation();\n\t\t\t\t} else {\n\t\t\t\t\tanimationRef.current.onfinish = finishZoomOutAnimation;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}, [\n\t\tstartZoomOutAnimation,\n\t\tfinishZoomOutAnimation,\n\t\tprefersReducedMotion,\n\t\tisAutoScaled,\n\t\tscaleValue,\n\t\tframeSize,\n\t\tiframeDocument,\n\t\tcontentHeight,\n\t\tcontainerWidth,\n\t\tcontainerHeight,\n\t\tmaxContainerWidth,\n\t\tscaleContainerWidth,\n\t] );\n\n\treturn {\n\t\tisZoomedOut,\n\t\tscaleContainerWidth,\n\t\tcontentResizeListener,\n\t\tcontainerResizeListener,\n\t};\n}\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAJA;AACA;AACA;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASE,cAAcA,CAAE;EACxBC,SAAS;EACTC,cAAc;EACdC,iBAAiB;EACjBC;AACD,CAAC,EAAG;EACH,OACC,CAAEC,IAAI,CAACC,GAAG,CAAEJ,cAAc,EAAEC,iBAAkB,CAAC,GAAGF,SAAS,GAAG,CAAC,IAC/DG,mBAAmB;AAErB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASG,uBAAuBA,CAAEC,cAAc,EAA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ACA;QACA;QACA;QACA;QACAlB,iBAAiB,CAACD,OAAO,CAAC5B,SAAS,GAClCY,cAAc,CAACqB,eAAe,CAACjC,SAAS;QACzC6B,iBAAiB,CAACD,OAAO,CAAClC,YAAY,GACrCkB,cAAc,CAACqB,eAAe,CAACvC,YAAY;QAC5C;QACAmC,iBAAiB,CAACD,OAAO,CAAC/B,eAAe,GAAGA,eAAe;QAE3DiC,eAAe,CAACF,OAAO,GAAG;UACzBpC,UAAU;UACVT,SAAS;UACTc,eAAe,EACde,cAAc,CAACqB,eAAe,CAACgB,YAAY,CAAE;QAC/C,CAAC;QAEDnB,eAAe,CAACF,OAAO,CAAClC,YAAY,GAAGL,uBAAuB,CAC7DwC,iBAAiB,CAACD,OAAO,EACzBE,eAAe,CAACF,OACjB,CAAC;QACDE,eAAe,CAACF,OAAO,CAAC5B,SAAS,GAAGJ,oBAAoB,CACvDiC,iBAAiB,CAACD,OAAO,EACzBE,eAAe,CAACF,OACjB,CAAC;QAEDF,YAAY,CAACE,OAAO,GAAGG,qBAAqB,CAAC,CAAC;;QAE9C;QACA,IAAKT,oBAAoB,EAAG;UAC3BmB,sBAAsB,CAAC,CAAC;QACzB,CAAC,MAAM;UACNf,YAAY,CAACE,OAAO,CAACsB,QAAQ,GAAGT,sBAAsB;QACvD;MACD;IACD;EACD,CAAC,EAAE,CACFV,qBAAqB,EACrBU,sBAAsB,EACtBnB,oBAAoB,EACpBE,YAAY,EACZhC,UAAU,EACVT,SAAS,EACT6B,cAAc,EACdG,aAAa,EACb/B,cAAc,EACda,eAAe,EACfZ,iBAAiB,EACjBC,mBAAmB,CAClB,CAAC;EAEH,OAAO;IACNmC,WAAW;IACXnC,mBAAmB;IACnB2B,qBAAqB;IACrBI;EACD,CAAC;AACF","ignoreList":[]}
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/iframe/use-scale-canvas.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useEffect, useRef, useCallback } from '@wordpress/element';\nimport { useReducedMotion, useResizeObserver } from '@wordpress/compose';\n\n/**\n * @typedef {Object} TransitionState\n * @property {number} scaleValue Scale of the canvas.\n * @property {number} frameSize Size of the frame/offset around the canvas.\n * @property {number} containerHeight containerHeight of the iframe.\n * @property {number} scrollTop ScrollTop of the iframe.\n * @property {number} scrollHeight ScrollHeight of the iframe.\n */\n\n/**\n * Calculate the scale of the canvas.\n *\n * @param {Object} options Object of options\n * @param {number} options.frameSize Size of the frame/offset around the canvas\n * @param {number} options.containerWidth Actual width of the canvas container\n * @param {number} options.maxContainerWidth Maximum width of the container to use for the scale calculation. This locks the canvas to a maximum width when zooming out.\n * @param {number} options.scaleContainerWidth Width the of the container wrapping the canvas container\n * @return {number} Scale value between 0 and/or equal to 1\n */\nfunction calculateScale( {\n\tframeSize,\n\tcontainerWidth,\n\tmaxContainerWidth,\n\tscaleContainerWidth,\n} ) {\n\treturn (\n\t\t( Math.min( containerWidth, maxContainerWidth ) - frameSize * 2 ) /\n\t\tscaleContainerWidth\n\t);\n}\n\n/**\n * Compute the next scrollHeight based on the transition states.\n *\n * @param {TransitionState} transitionFrom Starting point of the transition\n * @param {TransitionState} transitionTo Ending state of the transition\n * @return {number} Next scrollHeight based on scale and frame value changes.\n */\nfunction computeScrollHeightNext( transitionFrom, transitionTo ) {\n\tconst { scaleValue: prevScale, scrollHeight: prevScrollHeight } =\n\t\ttransitionFrom;\n\tconst { frameSize, scaleValue } = transitionTo;\n\n\treturn prevScrollHeight * ( scaleValue / prevScale ) + frameSize * 2;\n}\n\n/**\n * Compute the next scrollTop position after scaling the iframe content.\n *\n * @param {TransitionState} transitionFrom Starting point of the transition\n * @param {TransitionState} transitionTo Ending state of the transition\n * @return {number} Next scrollTop position after scaling the iframe content.\n */\nfunction computeScrollTopNext( transitionFrom, transitionTo ) {\n\tconst {\n\t\tcontainerHeight: prevContainerHeight,\n\t\tframeSize: prevFrameSize,\n\t\tscaleValue: prevScale,\n\t\tscrollTop: prevScrollTop,\n\t} = transitionFrom;\n\tconst { containerHeight, frameSize, scaleValue, scrollHeight } =\n\t\ttransitionTo;\n\t// Step 0: Start with the current scrollTop.\n\tlet scrollTopNext = prevScrollTop;\n\t// Step 1: Undo the effects of the previous scale and frame around the\n\t// midpoint of the visible area.\n\tscrollTopNext =\n\t\t( scrollTopNext + prevContainerHeight / 2 - prevFrameSize ) /\n\t\t\tprevScale -\n\t\tprevContainerHeight / 2;\n\n\t// Step 2: Apply the new scale and frame around the midpoint of the\n\t// visible area.\n\tscrollTopNext =\n\t\t( scrollTopNext + containerHeight / 2 ) * scaleValue +\n\t\tframeSize -\n\t\tcontainerHeight / 2;\n\n\t// Step 3: Handle an edge case so that you scroll to the top of the\n\t// iframe if the top of the iframe content is visible in the container.\n\t// The same edge case for the bottom is skipped because changing content\n\t// makes calculating it impossible.\n\tscrollTopNext = prevScrollTop <= prevFrameSize ? 0 : scrollTopNext;\n\n\t// This is the scrollTop value if you are scrolled to the bottom of the\n\t// iframe. We can't just let the browser handle it because we need to\n\t// animate the scaling.\n\tconst maxScrollTop = scrollHeight - containerHeight;\n\n\t// Step 4: Clamp the scrollTopNext between the minimum and maximum\n\t// possible scrollTop positions. Round the value to avoid subpixel\n\t// truncation by the browser which sometimes causes a 1px error.\n\treturn Math.round(\n\t\tMath.min( Math.max( 0, scrollTopNext ), Math.max( 0, maxScrollTop ) )\n\t);\n}\n\n/**\n * Generate the keyframes to use for the zoom out animation.\n *\n * @param {TransitionState} transitionFrom Starting transition state.\n * @param {TransitionState} transitionTo Ending transition state.\n * @return {Object[]} An array of keyframes to use for the animation.\n */\nfunction getAnimationKeyframes( transitionFrom, transitionTo ) {\n\tconst {\n\t\tscaleValue: prevScale,\n\t\tframeSize: prevFrameSize,\n\t\tscrollTop,\n\t} = transitionFrom;\n\tconst { scaleValue, frameSize, scrollTop: scrollTopNext } = transitionTo;\n\n\treturn [\n\t\t{\n\t\t\ttranslate: `0 0`,\n\t\t\tscale: prevScale,\n\t\t\tpaddingTop: `${ prevFrameSize / prevScale }px`,\n\t\t\tpaddingBottom: `${ prevFrameSize / prevScale }px`,\n\t\t},\n\t\t{\n\t\t\ttranslate: `0 ${ scrollTop - scrollTopNext }px`,\n\t\t\tscale: scaleValue,\n\t\t\tpaddingTop: `${ frameSize / scaleValue }px`,\n\t\t\tpaddingBottom: `${ frameSize / scaleValue }px`,\n\t\t},\n\t];\n}\n\n/**\n * @typedef {Object} ScaleCanvasResult\n * @property {boolean} isZoomedOut A boolean indicating if the canvas is zoomed out.\n * @property {number} scaleContainerWidth The width of the container used to calculate the scale.\n * @property {Object} contentResizeListener A resize observer for the content.\n * @property {Object} containerResizeListener A resize observer for the container.\n */\n\n/**\n * Handles scaling the canvas for the zoom out mode and animating between\n * the states.\n *\n * @param {Object} options Object of options.\n * @param {number} options.frameSize Size of the frame around the content.\n * @param {Document} options.iframeDocument Document of the iframe.\n * @param {number} options.maxContainerWidth Max width of the canvas to use as the starting scale point. Defaults to 750.\n * @param {number|string} options.scale Scale of the canvas. Can be an decimal between 0 and 1, 1, or 'auto-scaled'.\n * @return {ScaleCanvasResult} Properties of the result.\n */\nexport function useScaleCanvas( {\n\tframeSize,\n\tiframeDocument,\n\tmaxContainerWidth = 750,\n\tscale,\n} ) {\n\tconst [ contentResizeListener, { height: contentHeight } ] =\n\t\tuseResizeObserver();\n\tconst [\n\t\tcontainerResizeListener,\n\t\t{ width: containerWidth, height: containerHeight },\n\t] = useResizeObserver();\n\n\tconst initialContainerWidthRef = useRef( 0 );\n\tconst isZoomedOut = scale !== 1;\n\tconst prefersReducedMotion = useReducedMotion();\n\tconst isAutoScaled = scale === 'auto-scaled';\n\t// Track if the animation should start when the useEffect runs.\n\tconst startAnimationRef = useRef( false );\n\t// Track the animation so we know if we have an animation running,\n\t// and can cancel it, reverse it, call a finish event, etc.\n\tconst animationRef = useRef( null );\n\n\tuseEffect( () => {\n\t\tif ( ! isZoomedOut ) {\n\t\t\tinitialContainerWidthRef.current = containerWidth;\n\t\t}\n\t}, [ containerWidth, isZoomedOut ] );\n\n\tconst scaleContainerWidth = Math.max(\n\t\tinitialContainerWidthRef.current,\n\t\tcontainerWidth\n\t);\n\n\tconst scaleValue = isAutoScaled\n\t\t? calculateScale( {\n\t\t\t\tframeSize,\n\t\t\t\tcontainerWidth,\n\t\t\t\tmaxContainerWidth,\n\t\t\t\tscaleContainerWidth,\n\t\t } )\n\t\t: scale;\n\n\t/**\n\t * The starting transition state for the zoom out animation.\n\t * @type {import('react').RefObject<TransitionState>}\n\t */\n\tconst transitionFromRef = useRef( {\n\t\tscaleValue,\n\t\tframeSize,\n\t\tcontainerHeight: 0,\n\t\tscrollTop: 0,\n\t\tscrollHeight: 0,\n\t} );\n\n\t/**\n\t * The ending transition state for the zoom out animation.\n\t * @type {import('react').RefObject<TransitionState>}\n\t */\n\tconst transitionToRef = useRef( {\n\t\tscaleValue,\n\t\tframeSize,\n\t\tcontainerHeight: 0,\n\t\tscrollTop: 0,\n\t\tscrollHeight: 0,\n\t} );\n\n\t/**\n\t * Start the zoom out animation. This sets the necessary CSS variables\n\t * for animating the canvas and returns the Animation object.\n\t *\n\t * @return {Animation} The animation object for the zoom out animation.\n\t */\n\tconst startZoomOutAnimation = useCallback( () => {\n\t\tconst { scrollTop } = transitionFromRef.current;\n\t\tconst { scrollTop: scrollTopNext } = transitionToRef.current;\n\n\t\tiframeDocument.documentElement.style.setProperty(\n\t\t\t'--wp-block-editor-iframe-zoom-out-scroll-top',\n\t\t\t`${ scrollTop }px`\n\t\t);\n\n\t\tiframeDocument.documentElement.style.setProperty(\n\t\t\t'--wp-block-editor-iframe-zoom-out-scroll-top-next',\n\t\t\t`${ scrollTopNext }px`\n\t\t);\n\n\t\t// If the container has a scrolllbar, force a scrollbar to prevent the content from shifting while animating.\n\t\tiframeDocument.documentElement.style.setProperty(\n\t\t\t'--wp-block-editor-iframe-zoom-out-overflow-behavior',\n\t\t\ttransitionFromRef.current.scrollHeight ===\n\t\t\t\ttransitionFromRef.current.containerHeight\n\t\t\t\t? 'auto'\n\t\t\t\t: 'scroll'\n\t\t);\n\n\t\tiframeDocument.documentElement.classList.add( 'zoom-out-animation' );\n\n\t\treturn iframeDocument.documentElement.animate(\n\t\t\tgetAnimationKeyframes(\n\t\t\t\ttransitionFromRef.current,\n\t\t\t\ttransitionToRef.current\n\t\t\t),\n\t\t\t{\n\t\t\t\teasing: 'cubic-bezier(0.46, 0.03, 0.52, 0.96)',\n\t\t\t\tduration: 400,\n\t\t\t}\n\t\t);\n\t}, [ iframeDocument ] );\n\n\t/**\n\t * Callback when the zoom out animation is finished.\n\t * - Cleans up animations refs.\n\t * - Adds final CSS vars for scale and frame size to preserve the state.\n\t * - Removes the 'zoom-out-animation' class (which has the fixed positioning).\n\t * - Sets the final scroll position after the canvas is no longer in fixed position.\n\t * - Removes CSS vars related to the animation.\n\t * - Sets the transitionFrom to the transitionTo state to be ready for the next animation.\n\t */\n\tconst finishZoomOutAnimation = useCallback( () => {\n\t\tstartAnimationRef.current = false;\n\t\tanimationRef.current = null;\n\n\t\t// Add our final scale and frame size now that the animation is done.\n\t\tiframeDocument.documentElement.style.setProperty(\n\t\t\t'--wp-block-editor-iframe-zoom-out-scale',\n\t\t\ttransitionToRef.current.scaleValue\n\t\t);\n\t\tiframeDocument.documentElement.style.setProperty(\n\t\t\t'--wp-block-editor-iframe-zoom-out-frame-size',\n\t\t\t`${ transitionToRef.current.frameSize }px`\n\t\t);\n\n\t\tiframeDocument.documentElement.classList.remove( 'zoom-out-animation' );\n\n\t\t// Set the final scroll position that was just animated to.\n\t\t// Disable reason: Eslint isn't smart enough to know that this is a\n\t\t// DOM element. https://github.com/facebook/react/issues/31483\n\t\t// eslint-disable-next-line react-compiler/react-compiler\n\t\tiframeDocument.documentElement.scrollTop =\n\t\t\ttransitionToRef.current.scrollTop;\n\n\t\tiframeDocument.documentElement.style.removeProperty(\n\t\t\t'--wp-block-editor-iframe-zoom-out-scroll-top'\n\t\t);\n\t\tiframeDocument.documentElement.style.removeProperty(\n\t\t\t'--wp-block-editor-iframe-zoom-out-scroll-top-next'\n\t\t);\n\t\tiframeDocument.documentElement.style.removeProperty(\n\t\t\t'--wp-block-editor-iframe-zoom-out-overflow-behavior'\n\t\t);\n\n\t\t// Update previous values.\n\t\ttransitionFromRef.current = transitionToRef.current;\n\t}, [ iframeDocument ] );\n\n\tconst previousIsZoomedOut = useRef( false );\n\n\t/**\n\t * Runs when zoom out mode is toggled, and sets the startAnimation flag\n\t * so the animation will start when the next useEffect runs. We _only_\n\t * want to animate when the zoom out mode is toggled, not when the scale\n\t * changes due to the container resizing.\n\t */\n\tuseEffect( () => {\n\t\tconst trigger =\n\t\t\tiframeDocument && previousIsZoomedOut.current !== isZoomedOut;\n\n\t\tpreviousIsZoomedOut.current = isZoomedOut;\n\n\t\tif ( ! trigger ) {\n\t\t\treturn;\n\t\t}\n\n\t\tstartAnimationRef.current = true;\n\n\t\tif ( ! isZoomedOut ) {\n\t\t\treturn;\n\t\t}\n\n\t\tiframeDocument.documentElement.classList.add( 'is-zoomed-out' );\n\t\treturn () => {\n\t\t\tiframeDocument.documentElement.classList.remove( 'is-zoomed-out' );\n\t\t};\n\t}, [ iframeDocument, isZoomedOut ] );\n\n\t/**\n\t * This handles:\n\t * 1. Setting the correct scale and vars of the canvas when zoomed out\n\t * 2. If zoom out mode has been toggled, runs the animation of zooming in/out\n\t */\n\tuseEffect( () => {\n\t\tif ( ! iframeDocument ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// We need to update the appropriate scale to exit from. If sidebars have been opened since setting the\n\t\t// original scale, we will snap to a much smaller scale due to the scale container immediately changing sizes when exiting.\n\t\tif ( isAutoScaled && transitionFromRef.current.scaleValue !== 1 ) {\n\t\t\t// We use containerWidth as the divisor, as scaleContainerWidth will always match the containerWidth when\n\t\t\t// exiting.\n\t\t\ttransitionFromRef.current.scaleValue = calculateScale( {\n\t\t\t\tframeSize: transitionFromRef.current.frameSize,\n\t\t\t\tcontainerWidth,\n\t\t\t\tmaxContainerWidth,\n\t\t\t\tscaleContainerWidth: containerWidth,\n\t\t\t} );\n\t\t}\n\n\t\tif ( scaleValue < 1 ) {\n\t\t\t// If we are not going to animate the transition, set the scale and frame size directly.\n\t\t\t// If we are animating, these values will be set when the animation is finished.\n\t\t\t// Example: Opening sidebars that reduce the scale of the canvas, but we don't want to\n\t\t\t// animate the transition.\n\t\t\tif ( ! startAnimationRef.current ) {\n\t\t\t\tiframeDocument.documentElement.style.setProperty(\n\t\t\t\t\t'--wp-block-editor-iframe-zoom-out-scale',\n\t\t\t\t\tscaleValue\n\t\t\t\t);\n\t\t\t\tiframeDocument.documentElement.style.setProperty(\n\t\t\t\t\t'--wp-block-editor-iframe-zoom-out-frame-size',\n\t\t\t\t\t`${ frameSize }px`\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tiframeDocument.documentElement.style.setProperty(\n\t\t\t\t'--wp-block-editor-iframe-zoom-out-content-height',\n\t\t\t\t`${ contentHeight }px`\n\t\t\t);\n\n\t\t\tiframeDocument.documentElement.style.setProperty(\n\t\t\t\t'--wp-block-editor-iframe-zoom-out-inner-height',\n\t\t\t\t`${ containerHeight }px`\n\t\t\t);\n\n\t\t\tiframeDocument.documentElement.style.setProperty(\n\t\t\t\t'--wp-block-editor-iframe-zoom-out-container-width',\n\t\t\t\t`${ containerWidth }px`\n\t\t\t);\n\t\t\tiframeDocument.documentElement.style.setProperty(\n\t\t\t\t'--wp-block-editor-iframe-zoom-out-scale-container-width',\n\t\t\t\t`${ scaleContainerWidth }px`\n\t\t\t);\n\t\t}\n\n\t\t/**\n\t\t * Handle the zoom out animation:\n\t\t *\n\t\t * - Get the current scrollTop position.\n\t\t * - Calculate where the same scroll position is after scaling.\n\t\t * - Apply fixed positioning to the canvas with a transform offset\n\t\t * to keep the canvas centered.\n\t\t * - Animate the scale and padding to the new scale and frame size.\n\t\t * - After the animation is complete, remove the fixed positioning\n\t\t * and set the scroll position that keeps everything centered.\n\t\t */\n\t\tif ( startAnimationRef.current ) {\n\t\t\t// Don't allow a new transition to start again unless it was started by the zoom out mode changing.\n\t\t\tstartAnimationRef.current = false;\n\n\t\t\t/**\n\t\t\t * If we already have an animation running, reverse it.\n\t\t\t */\n\t\t\tif ( animationRef.current ) {\n\t\t\t\tanimationRef.current.reverse();\n\t\t\t\t// Swap the transition to/from refs so that we set the correct values when\n\t\t\t\t// finishZoomOutAnimation runs.\n\t\t\t\tconst tempTransitionFrom = transitionFromRef.current;\n\t\t\t\tconst tempTransitionTo = transitionToRef.current;\n\t\t\t\ttransitionFromRef.current = tempTransitionTo;\n\t\t\t\ttransitionToRef.current = tempTransitionFrom;\n\t\t\t} else {\n\t\t\t\t/**\n\t\t\t\t * Start a new zoom animation.\n\t\t\t\t */\n\n\t\t\t\t// We can't trust the set value from contentHeight, as it was measured\n\t\t\t\t// before the zoom out mode was changed. After zoom out mode is changed,\n\t\t\t\t// appenders may appear or disappear, so we need to get the height from\n\t\t\t\t// the iframe at this point when we're about to animate the zoom out.\n\t\t\t\t// The iframe scrollTop, scrollHeight, and clientHeight will all be\n\t\t\t\t// the most accurate.\n\t\t\t\ttransitionFromRef.current.scrollTop =\n\t\t\t\t\tiframeDocument.documentElement.scrollTop;\n\t\t\t\ttransitionFromRef.current.scrollHeight =\n\t\t\t\t\tiframeDocument.documentElement.scrollHeight;\n\t\t\t\t// Use containerHeight, as it's the previous container height before the zoom out animation starts.\n\t\t\t\ttransitionFromRef.current.containerHeight = containerHeight;\n\n\t\t\t\ttransitionToRef.current = {\n\t\t\t\t\tscaleValue,\n\t\t\t\t\tframeSize,\n\t\t\t\t\tcontainerHeight:\n\t\t\t\t\t\tiframeDocument.documentElement.clientHeight, // use clientHeight to get the actual height of the new container after zoom state changes have rendered, as it will be the most up-to-date.\n\t\t\t\t};\n\n\t\t\t\ttransitionToRef.current.scrollHeight = computeScrollHeightNext(\n\t\t\t\t\ttransitionFromRef.current,\n\t\t\t\t\ttransitionToRef.current\n\t\t\t\t);\n\t\t\t\ttransitionToRef.current.scrollTop = computeScrollTopNext(\n\t\t\t\t\ttransitionFromRef.current,\n\t\t\t\t\ttransitionToRef.current\n\t\t\t\t);\n\n\t\t\t\tanimationRef.current = startZoomOutAnimation();\n\n\t\t\t\t// If the user prefers reduced motion, finish the animation immediately and set the final state.\n\t\t\t\tif ( prefersReducedMotion ) {\n\t\t\t\t\tfinishZoomOutAnimation();\n\t\t\t\t} else {\n\t\t\t\t\tanimationRef.current.onfinish = finishZoomOutAnimation;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}, [\n\t\tstartZoomOutAnimation,\n\t\tfinishZoomOutAnimation,\n\t\tprefersReducedMotion,\n\t\tisAutoScaled,\n\t\tscaleValue,\n\t\tframeSize,\n\t\tiframeDocument,\n\t\tcontentHeight,\n\t\tcontainerWidth,\n\t\tcontainerHeight,\n\t\tmaxContainerWidth,\n\t\tscaleContainerWidth,\n\t] );\n\n\treturn {\n\t\tisZoomedOut,\n\t\tscaleContainerWidth,\n\t\tcontentResizeListener,\n\t\tcontainerResizeListener,\n\t};\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAA+C;AAC/C,qBAAoD;AAqBpD,SAAS,eAAgB;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GAAI;AACH,UACG,KAAK,IAAK,gBAAgB,iBAAkB,IAAI,YAAY,KAC9D;AAEF;AASA,SAAS,wBAAyB,gBAAgB,cAAe;AAChE,QAAM,EAAE,YAAY,WAAW,cAAc,iBAAiB,IAC7D;AACD,QAAM,EAAE,WAAW,WAAW,IAAI;AAElC,SAAO,oBAAqB,aAAa,aAAc,YAAY;AACpE;AASA,SAAS,qBAAsB,gBAAgB,cAAe;AAC7D,QAAM;AAAA,IACL,iBAAiB;AAAA,IACjB,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,WAAW;AAAA,EACZ,IAAI;AACJ,QAAM,EAAE,iBAAiB,WAA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AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD,CAAE;AAEF,SAAO;AAAA,IACN;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AACD;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,25 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.
|
|
4
|
-
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var aspect_ratio_dropdown_exports = {};
|
|
20
|
+
__export(aspect_ratio_dropdown_exports, {
|
|
21
|
+
default: () => AspectRatioDropdown,
|
|
22
|
+
ratioToNumber: () => ratioToNumber
|
|
5
23
|
});
|
|
6
|
-
exports
|
|
7
|
-
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
-
/**
|
|
16
|
-
* WordPress dependencies
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Internal dependencies
|
|
21
|
-
*/
|
|
22
|
-
|
|
24
|
+
module.exports = __toCommonJS(aspect_ratio_dropdown_exports);
|
|
25
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
26
|
+
var import_icons = require("@wordpress/icons");
|
|
27
|
+
var import_components = require("@wordpress/components");
|
|
28
|
+
var import_i18n = require("@wordpress/i18n");
|
|
29
|
+
var import_use_settings = require("../use-settings");
|
|
30
|
+
var import_constants = require("./constants");
|
|
31
|
+
var import_context = require("./context");
|
|
23
32
|
function AspectRatioGroup({
|
|
24
33
|
aspectRatios,
|
|
25
34
|
isDisabled,
|
|
@@ -27,109 +36,114 @@ function AspectRatioGroup({
|
|
|
27
36
|
onClick,
|
|
28
37
|
value
|
|
29
38
|
}) {
|
|
30
|
-
return
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
name,
|
|
34
|
-
slug,
|
|
35
|
-
ratio
|
|
36
|
-
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.MenuItem, {
|
|
39
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.MenuGroup, { label, children: aspectRatios.map(({ name, slug, ratio }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
40
|
+
import_components.MenuItem,
|
|
41
|
+
{
|
|
37
42
|
disabled: isDisabled,
|
|
38
43
|
onClick: () => {
|
|
39
44
|
onClick(ratio);
|
|
40
45
|
},
|
|
41
46
|
role: "menuitemradio",
|
|
42
47
|
isSelected: ratio === value,
|
|
43
|
-
icon: ratio === value ?
|
|
48
|
+
icon: ratio === value ? import_icons.check : void 0,
|
|
44
49
|
children: name
|
|
45
|
-
},
|
|
46
|
-
|
|
50
|
+
},
|
|
51
|
+
slug
|
|
52
|
+
)) });
|
|
47
53
|
}
|
|
48
54
|
function ratioToNumber(str) {
|
|
49
|
-
|
|
50
|
-
// https://css-tricks.com/almanac/properties/a/aspect-ratio/#aa-it-can-take-two-values
|
|
51
|
-
const [a, b, ...rest] = str.split('/').map(Number);
|
|
55
|
+
const [a, b, ...rest] = str.split("/").map(Number);
|
|
52
56
|
if (a <= 0 || b <= 0 || Number.isNaN(a) || Number.isNaN(b) || rest.length) {
|
|
53
57
|
return NaN;
|
|
54
58
|
}
|
|
55
59
|
return b ? a / b : a;
|
|
56
60
|
}
|
|
57
|
-
function presetRatioAsNumber({
|
|
58
|
-
ratio,
|
|
59
|
-
...rest
|
|
60
|
-
}) {
|
|
61
|
+
function presetRatioAsNumber({ ratio, ...rest }) {
|
|
61
62
|
return {
|
|
62
63
|
ratio: ratioToNumber(ratio),
|
|
63
64
|
...rest
|
|
64
65
|
};
|
|
65
66
|
}
|
|
66
|
-
function AspectRatioDropdown({
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
67
|
+
function AspectRatioDropdown({ toggleProps }) {
|
|
68
|
+
const { isInProgress, aspect, setAspect, defaultAspect } = (0, import_context.useImageEditingContext)();
|
|
69
|
+
const [defaultRatios, themeRatios, showDefaultRatios] = (0, import_use_settings.useSettings)(
|
|
70
|
+
"dimensions.aspectRatios.default",
|
|
71
|
+
"dimensions.aspectRatios.theme",
|
|
72
|
+
"dimensions.defaultAspectRatios"
|
|
73
|
+
);
|
|
74
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
75
|
+
import_components.DropdownMenu,
|
|
76
|
+
{
|
|
77
|
+
icon: import_icons.aspectRatio,
|
|
78
|
+
label: (0, import_i18n.__)("Aspect Ratio"),
|
|
79
|
+
popoverProps: import_constants.POPOVER_PROPS,
|
|
80
|
+
toggleProps,
|
|
81
|
+
children: ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
82
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
83
|
+
AspectRatioGroup,
|
|
84
|
+
{
|
|
85
|
+
isDisabled: isInProgress,
|
|
86
|
+
onClick: (newAspect) => {
|
|
87
|
+
setAspect(newAspect);
|
|
88
|
+
onClose();
|
|
89
|
+
},
|
|
90
|
+
value: aspect,
|
|
91
|
+
aspectRatios: [
|
|
92
|
+
// All ratios should be mirrored in AspectRatioTool in @wordpress/block-editor.
|
|
93
|
+
{
|
|
94
|
+
slug: "original",
|
|
95
|
+
name: (0, import_i18n.__)("Original"),
|
|
96
|
+
ratio: defaultAspect
|
|
97
|
+
},
|
|
98
|
+
...showDefaultRatios ? defaultRatios.map(presetRatioAsNumber).filter(({ ratio }) => ratio === 1) : []
|
|
99
|
+
]
|
|
100
|
+
}
|
|
101
|
+
),
|
|
102
|
+
themeRatios?.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
103
|
+
AspectRatioGroup,
|
|
104
|
+
{
|
|
105
|
+
label: (0, import_i18n.__)("Theme"),
|
|
106
|
+
isDisabled: isInProgress,
|
|
107
|
+
onClick: (newAspect) => {
|
|
108
|
+
setAspect(newAspect);
|
|
109
|
+
onClose();
|
|
110
|
+
},
|
|
111
|
+
value: aspect,
|
|
112
|
+
aspectRatios: themeRatios
|
|
113
|
+
}
|
|
114
|
+
),
|
|
115
|
+
showDefaultRatios && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
116
|
+
AspectRatioGroup,
|
|
117
|
+
{
|
|
118
|
+
label: (0, import_i18n.__)("Landscape"),
|
|
119
|
+
isDisabled: isInProgress,
|
|
120
|
+
onClick: (newAspect) => {
|
|
121
|
+
setAspect(newAspect);
|
|
122
|
+
onClose();
|
|
123
|
+
},
|
|
124
|
+
value: aspect,
|
|
125
|
+
aspectRatios: defaultRatios.map(presetRatioAsNumber).filter(({ ratio }) => ratio > 1)
|
|
126
|
+
}
|
|
127
|
+
),
|
|
128
|
+
showDefaultRatios && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
129
|
+
AspectRatioGroup,
|
|
130
|
+
{
|
|
131
|
+
label: (0, import_i18n.__)("Portrait"),
|
|
132
|
+
isDisabled: isInProgress,
|
|
133
|
+
onClick: (newAspect) => {
|
|
134
|
+
setAspect(newAspect);
|
|
135
|
+
onClose();
|
|
136
|
+
},
|
|
137
|
+
value: aspect,
|
|
138
|
+
aspectRatios: defaultRatios.map(presetRatioAsNumber).filter(({ ratio }) => ratio < 1)
|
|
139
|
+
}
|
|
140
|
+
)
|
|
141
|
+
] })
|
|
142
|
+
}
|
|
143
|
+
);
|
|
134
144
|
}
|
|
135
|
-
|
|
145
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
146
|
+
0 && (module.exports = {
|
|
147
|
+
ratioToNumber
|
|
148
|
+
});
|
|
149
|
+
//# sourceMappingURL=aspect-ratio-dropdown.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/image-editor/aspect-ratio-dropdown.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { check, aspectRatio as aspectRatioIcon } from '@wordpress/icons';\nimport { DropdownMenu, MenuGroup, MenuItem } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { useSettings } from '../use-settings';\nimport { POPOVER_PROPS } from './constants';\nimport { useImageEditingContext } from './context';\n\nfunction AspectRatioGroup( {\n\taspectRatios,\n\tisDisabled,\n\tlabel,\n\tonClick,\n\tvalue,\n} ) {\n\treturn (\n\t\t<MenuGroup label={ label }>\n\t\t\t{ aspectRatios.map( ( { name, slug, ratio } ) => (\n\t\t\t\t<MenuItem\n\t\t\t\t\tkey={ slug }\n\t\t\t\t\tdisabled={ isDisabled }\n\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\tonClick( ratio );\n\t\t\t\t\t} }\n\t\t\t\t\trole=\"menuitemradio\"\n\t\t\t\t\tisSelected={ ratio === value }\n\t\t\t\t\ticon={ ratio === value ? check : undefined }\n\t\t\t\t>\n\t\t\t\t\t{ name }\n\t\t\t\t</MenuItem>\n\t\t\t) ) }\n\t\t</MenuGroup>\n\t);\n}\n\nexport function ratioToNumber( str ) {\n\t// TODO: support two-value aspect ratio?\n\t// https://css-tricks.com/almanac/properties/a/aspect-ratio/#aa-it-can-take-two-values\n\tconst [ a, b, ...rest ] = str.split( '/' ).map( Number );\n\tif (\n\t\ta <= 0 ||\n\t\tb <= 0 ||\n\t\tNumber.isNaN( a ) ||\n\t\tNumber.isNaN( b ) ||\n\t\trest.length\n\t) {\n\t\treturn NaN;\n\t}\n\treturn b ? a / b : a;\n}\n\nfunction presetRatioAsNumber( { ratio, ...rest } ) {\n\treturn {\n\t\tratio: ratioToNumber( ratio ),\n\t\t...rest,\n\t};\n}\n\nexport default function AspectRatioDropdown( { toggleProps } ) {\n\tconst { isInProgress, aspect, setAspect, defaultAspect } =\n\t\tuseImageEditingContext();\n\n\tconst [ defaultRatios, themeRatios, showDefaultRatios ] = useSettings(\n\t\t'dimensions.aspectRatios.default',\n\t\t'dimensions.aspectRatios.theme',\n\t\t'dimensions.defaultAspectRatios'\n\t);\n\n\treturn (\n\t\t<DropdownMenu\n\t\t\ticon={ aspectRatioIcon }\n\t\t\tlabel={ __( 'Aspect Ratio' ) }\n\t\t\tpopoverProps={ POPOVER_PROPS }\n\t\t\ttoggleProps={ toggleProps }\n\t\t>\n\t\t\t{ ( { onClose } ) => (\n\t\t\t\t<>\n\t\t\t\t\t<AspectRatioGroup\n\t\t\t\t\t\tisDisabled={ isInProgress }\n\t\t\t\t\t\tonClick={ ( newAspect ) => {\n\t\t\t\t\t\t\tsetAspect( newAspect );\n\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tvalue={ aspect }\n\t\t\t\t\t\taspectRatios={ [\n\t\t\t\t\t\t\t// All ratios should be mirrored in AspectRatioTool in @wordpress/block-editor.\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tslug: 'original',\n\t\t\t\t\t\t\t\tname: __( 'Original' ),\n\t\t\t\t\t\t\t\tratio: defaultAspect,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t...( showDefaultRatios\n\t\t\t\t\t\t\t\t? defaultRatios\n\t\t\t\t\t\t\t\t\t\t.map( presetRatioAsNumber )\n\t\t\t\t\t\t\t\t\t\t.filter( ( { ratio } ) => ratio === 1 )\n\t\t\t\t\t\t\t\t: [] ),\n\t\t\t\t\t\t] }\n\t\t\t\t\t/>\n\t\t\t\t\t{ themeRatios?.length > 0 && (\n\t\t\t\t\t\t<AspectRatioGroup\n\t\t\t\t\t\t\tlabel={ __( 'Theme' ) }\n\t\t\t\t\t\t\tisDisabled={ isInProgress }\n\t\t\t\t\t\t\tonClick={ ( newAspect ) => {\n\t\t\t\t\t\t\t\tsetAspect( newAspect );\n\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tvalue={ aspect }\n\t\t\t\t\t\t\taspectRatios={ themeRatios }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showDefaultRatios && (\n\t\t\t\t\t\t<AspectRatioGroup\n\t\t\t\t\t\t\tlabel={ __( 'Landscape' ) }\n\t\t\t\t\t\t\tisDisabled={ isInProgress }\n\t\t\t\t\t\t\tonClick={ ( newAspect ) => {\n\t\t\t\t\t\t\t\tsetAspect( newAspect );\n\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tvalue={ aspect }\n\t\t\t\t\t\t\taspectRatios={ defaultRatios\n\t\t\t\t\t\t\t\t.map( presetRatioAsNumber )\n\t\t\t\t\t\t\t\t.filter( ( { ratio } ) => ratio > 1 ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showDefaultRatios && (\n\t\t\t\t\t\t<AspectRatioGroup\n\t\t\t\t\t\t\tlabel={ __( 'Portrait' ) }\n\t\t\t\t\t\t\tisDisabled={ isInProgress }\n\t\t\t\t\t\t\tonClick={ ( newAspect ) => {\n\t\t\t\t\t\t\t\tsetAspect( newAspect );\n\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tvalue={ aspect }\n\t\t\t\t\t\t\taspectRatios={ defaultRatios\n\t\t\t\t\t\t\t\t.map( presetRatioAsNumber )\n\t\t\t\t\t\t\t\t.filter( ( { ratio } ) => ratio < 1 ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</>\n\t\t\t) }\n\t\t</DropdownMenu>\n\t);\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAwBI;AArBJ,mBAAsD;AACtD,wBAAkD;AAClD,kBAAmB;AAKnB,0B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
2
|
-
|
|
3
|
-
Object.
|
|
4
|
-
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var constants_exports = {};
|
|
20
|
+
__export(constants_exports, {
|
|
21
|
+
MAX_ZOOM: () => MAX_ZOOM,
|
|
22
|
+
MIN_ZOOM: () => MIN_ZOOM,
|
|
23
|
+
POPOVER_PROPS: () => POPOVER_PROPS
|
|
5
24
|
});
|
|
6
|
-
|
|
7
|
-
const MIN_ZOOM =
|
|
8
|
-
const MAX_ZOOM =
|
|
9
|
-
const POPOVER_PROPS =
|
|
10
|
-
placement:
|
|
25
|
+
module.exports = __toCommonJS(constants_exports);
|
|
26
|
+
const MIN_ZOOM = 100;
|
|
27
|
+
const MAX_ZOOM = 300;
|
|
28
|
+
const POPOVER_PROPS = {
|
|
29
|
+
placement: "bottom-start"
|
|
11
30
|
};
|
|
12
|
-
|
|
31
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
32
|
+
0 && (module.exports = {
|
|
33
|
+
MAX_ZOOM,
|
|
34
|
+
MIN_ZOOM,
|
|
35
|
+
POPOVER_PROPS
|
|
36
|
+
});
|
|
37
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/image-editor/constants.js"],
|
|
4
|
+
"sourcesContent": ["export const MIN_ZOOM = 100;\nexport const MAX_ZOOM = 300;\nexport const POPOVER_PROPS = {\n\tplacement: 'bottom-start',\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,WAAW;AACjB,MAAM,WAAW;AACjB,MAAM,gBAAgB;AAAA,EAC5B,WAAW;AACZ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,27 +1,44 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
Object.
|
|
5
|
-
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var context_exports = {};
|
|
30
|
+
__export(context_exports, {
|
|
31
|
+
default: () => ImageEditingProvider,
|
|
32
|
+
useImageEditingContext: () => useImageEditingContext
|
|
6
33
|
});
|
|
7
|
-
exports
|
|
8
|
-
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Internal dependencies
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
const ImageEditingContext = (0, _element.createContext)({});
|
|
22
|
-
ImageEditingContext.displayName = 'ImageEditingContext';
|
|
23
|
-
const useImageEditingContext = () => (0, _element.useContext)(ImageEditingContext);
|
|
24
|
-
exports.useImageEditingContext = useImageEditingContext;
|
|
34
|
+
module.exports = __toCommonJS(context_exports);
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var import_element = require("@wordpress/element");
|
|
37
|
+
var import_use_save_image = __toESM(require("./use-save-image"));
|
|
38
|
+
var import_use_transform_image = __toESM(require("./use-transform-image"));
|
|
39
|
+
const ImageEditingContext = (0, import_element.createContext)({});
|
|
40
|
+
ImageEditingContext.displayName = "ImageEditingContext";
|
|
41
|
+
const useImageEditingContext = () => (0, import_element.useContext)(ImageEditingContext);
|
|
25
42
|
function ImageEditingProvider({
|
|
26
43
|
id,
|
|
27
44
|
url,
|
|
@@ -31,25 +48,29 @@ function ImageEditingProvider({
|
|
|
31
48
|
onSaveImage,
|
|
32
49
|
children
|
|
33
50
|
}) {
|
|
34
|
-
const transformImage = (0,
|
|
51
|
+
const transformImage = (0, import_use_transform_image.default)({
|
|
35
52
|
url,
|
|
36
53
|
naturalWidth,
|
|
37
54
|
naturalHeight
|
|
38
55
|
});
|
|
39
|
-
const saveImage = (0,
|
|
56
|
+
const saveImage = (0, import_use_save_image.default)({
|
|
40
57
|
id,
|
|
41
58
|
url,
|
|
42
59
|
onSaveImage,
|
|
43
60
|
onFinishEditing,
|
|
44
61
|
...transformImage
|
|
45
62
|
});
|
|
46
|
-
const providerValue = (0,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
});
|
|
63
|
+
const providerValue = (0, import_element.useMemo)(
|
|
64
|
+
() => ({
|
|
65
|
+
...transformImage,
|
|
66
|
+
...saveImage
|
|
67
|
+
}),
|
|
68
|
+
[transformImage, saveImage]
|
|
69
|
+
);
|
|
70
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ImageEditingContext.Provider, { value: providerValue, children });
|
|
54
71
|
}
|
|
55
|
-
|
|
72
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
73
|
+
0 && (module.exports = {
|
|
74
|
+
useImageEditingContext
|
|
75
|
+
});
|
|
76
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/image-editor/context.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { createContext, useContext, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport useSaveImage from './use-save-image';\nimport useTransformImage from './use-transform-image';\n\nconst ImageEditingContext = createContext( {} );\nImageEditingContext.displayName = 'ImageEditingContext';\n\nexport const useImageEditingContext = () => useContext( ImageEditingContext );\n\nexport default function ImageEditingProvider( {\n\tid,\n\turl,\n\tnaturalWidth,\n\tnaturalHeight,\n\tonFinishEditing,\n\tonSaveImage,\n\tchildren,\n} ) {\n\tconst transformImage = useTransformImage( {\n\t\turl,\n\t\tnaturalWidth,\n\t\tnaturalHeight,\n\t} );\n\n\tconst saveImage = useSaveImage( {\n\t\tid,\n\t\turl,\n\t\tonSaveImage,\n\t\tonFinishEditing,\n\t\t...transformImage,\n\t} );\n\n\tconst providerValue = useMemo(\n\t\t() => ( {\n\t\t\t...transformImage,\n\t\t\t...saveImage,\n\t\t} ),\n\t\t[ transformImage, saveImage ]\n\t);\n\n\treturn (\n\t\t<ImageEditingContext.Provider value={ providerValue }>\n\t\t\t{ children }\n\t\t</ImageEditingContext.Provider>\n\t);\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAgDE;AA7CF,qBAAmD;AAKnD,4BAAyB;AACzB,iCAA8B;AAE9B,MAAM,0BAAsB,8BAAe,CAAC,CAAE;AAC9C,oBAAoB,cAAc;AAE3B,MAAM,yBAAyB,UAAM,2BAAY,mBAAoB;AAE7D,SAAR,qBAAuC;AAAA,EAC7C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GAAI;AACH,QAAM,qBAAiB,2BAAAA,SAAmB;AAAA,IACzC;AAAA,IACA;AAAA,IACA;AAAA,EACD,CAAE;AAEF,QAAM,gBAAY,sBAAAC,SAAc;AAAA,IAC/B;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACJ,CAAE;AAEF,QAAM,oBAAgB;AAAA,IACrB,OAAQ;AAAA,MACP,GAAG;AAAA,MACH,GAAG;AAAA,IACJ;AAAA,IACA,CAAE,gBAAgB,SAAU;AAAA,EAC7B;AAEA,SACC,4CAAC,oBAAoB,UAApB,EAA6B,OAAQ,eACnC,UACH;AAEF;",
|
|
6
|
+
"names": ["useTransformImage", "useSaveImage"]
|
|
7
|
+
}
|