@wordpress/block-editor 15.20.0 → 15.21.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/build/components/block-compare/index.cjs +2 -2
- package/build/components/block-compare/index.cjs.map +2 -2
- package/build/components/block-list/use-block-props/index.cjs +1 -1
- package/build/components/block-list/use-block-props/index.cjs.map +2 -2
- package/build/components/block-patterns-list/index.cjs +1 -1
- package/build/components/block-patterns-list/index.cjs.map +2 -2
- package/build/components/block-switcher/block-transformations-menu.cjs +16 -15
- package/build/components/block-switcher/block-transformations-menu.cjs.map +2 -2
- package/build/components/block-switcher/index.cjs +4 -4
- package/build/components/block-switcher/index.cjs.map +2 -2
- package/build/components/child-layout-control/index.cjs +10 -5
- package/build/components/child-layout-control/index.cjs.map +2 -2
- package/build/components/global-styles/advanced-panel.cjs +23 -15
- package/build/components/global-styles/advanced-panel.cjs.map +2 -2
- package/build/components/global-styles/background-panel.cjs +2 -2
- package/build/components/global-styles/background-panel.cjs.map +2 -2
- package/build/components/global-styles/border-panel.cjs +2 -0
- package/build/components/global-styles/border-panel.cjs.map +2 -2
- package/build/components/global-styles/dimensions-panel.cjs +5 -4
- package/build/components/global-styles/dimensions-panel.cjs.map +2 -2
- package/build/components/iframe/index.cjs +3 -0
- package/build/components/iframe/index.cjs.map +2 -2
- package/build/components/inner-blocks/use-inner-block-template-sync.cjs +3 -1
- package/build/components/inner-blocks/use-inner-block-template-sync.cjs.map +2 -2
- package/build/components/inserter/hooks/use-patterns-state.cjs +1 -1
- package/build/components/inserter/hooks/use-patterns-state.cjs.map +2 -2
- package/build/components/inserter/index.cjs +179 -220
- package/build/components/inserter/index.cjs.map +3 -3
- package/build/components/inserter/media-tab/utils.cjs +1 -1
- package/build/components/inserter/media-tab/utils.cjs.map +2 -2
- package/build/components/inserter/search-results.cjs +1 -1
- package/build/components/inserter/search-results.cjs.map +2 -2
- package/build/components/list-view/block-select-button.cjs +10 -12
- package/build/components/list-view/block-select-button.cjs.map +2 -2
- package/build/components/list-view/block.cjs +2 -1
- package/build/components/list-view/block.cjs.map +2 -2
- package/build/components/provider/use-block-sync.cjs +11 -2
- package/build/components/provider/use-block-sync.cjs.map +2 -2
- package/build/components/rich-text/event-listeners/before-input-rules.cjs +4 -4
- package/build/components/rich-text/event-listeners/before-input-rules.cjs.map +3 -3
- package/build/components/rich-text/event-listeners/delete.cjs +4 -4
- package/build/components/rich-text/event-listeners/delete.cjs.map +3 -3
- package/build/components/rich-text/event-listeners/enter.cjs +7 -2
- package/build/components/rich-text/event-listeners/enter.cjs.map +2 -2
- package/build/components/rich-text/event-listeners/input-events.cjs +4 -4
- package/build/components/rich-text/event-listeners/input-events.cjs.map +3 -3
- package/build/components/rich-text/event-listeners/input-rules.cjs +17 -4
- package/build/components/rich-text/event-listeners/input-rules.cjs.map +3 -3
- package/build/components/rich-text/event-listeners/insert-replacement-text.cjs +4 -4
- package/build/components/rich-text/event-listeners/insert-replacement-text.cjs.map +3 -3
- package/build/components/rich-text/event-listeners/remove-browser-shortcuts.cjs +4 -4
- package/build/components/rich-text/event-listeners/remove-browser-shortcuts.cjs.map +3 -3
- package/build/components/rich-text/event-listeners/shortcuts.cjs +4 -4
- package/build/components/rich-text/event-listeners/shortcuts.cjs.map +3 -3
- package/build/components/rich-text/event-listeners/undo-automatic-change.cjs +4 -4
- package/build/components/rich-text/event-listeners/undo-automatic-change.cjs.map +3 -3
- package/build/components/rich-text/index.cjs +1 -23
- package/build/components/rich-text/index.cjs.map +2 -2
- package/build/components/use-block-commands/index.cjs +5 -5
- package/build/components/use-block-commands/index.cjs.map +2 -2
- package/build/hooks/anchor.cjs +11 -15
- package/build/hooks/anchor.cjs.map +2 -2
- package/build/hooks/border.cjs +0 -3
- package/build/hooks/border.cjs.map +2 -2
- package/build/hooks/color.cjs +1 -4
- package/build/hooks/color.cjs.map +2 -2
- package/build/hooks/dimensions.cjs +0 -3
- package/build/hooks/dimensions.cjs.map +2 -2
- package/build/hooks/fit-text.cjs +11 -0
- package/build/hooks/fit-text.cjs.map +2 -2
- package/build/hooks/position.cjs +19 -22
- package/build/hooks/position.cjs.map +2 -2
- package/build/hooks/supports.cjs +0 -7
- package/build/hooks/supports.cjs.map +2 -2
- package/build/store/actions.cjs +7 -3
- package/build/store/actions.cjs.map +2 -2
- package/build/store/private-actions.cjs +1 -2
- package/build/store/private-actions.cjs.map +2 -2
- package/build/store/private-selectors.cjs +29 -0
- package/build/store/private-selectors.cjs.map +2 -2
- package/build/store/reducer.cjs +14 -6
- package/build/store/reducer.cjs.map +2 -2
- package/build/store/selectors.cjs +60 -41
- package/build/store/selectors.cjs.map +2 -2
- package/build-module/components/block-compare/index.mjs +1 -1
- package/build-module/components/block-compare/index.mjs.map +2 -2
- package/build-module/components/block-list/use-block-props/index.mjs +1 -1
- package/build-module/components/block-list/use-block-props/index.mjs.map +2 -2
- package/build-module/components/block-patterns-list/index.mjs +1 -1
- package/build-module/components/block-patterns-list/index.mjs.map +2 -2
- package/build-module/components/block-switcher/block-transformations-menu.mjs +16 -15
- package/build-module/components/block-switcher/block-transformations-menu.mjs.map +2 -2
- package/build-module/components/block-switcher/index.mjs +4 -4
- package/build-module/components/block-switcher/index.mjs.map +2 -2
- package/build-module/components/child-layout-control/index.mjs +10 -5
- package/build-module/components/child-layout-control/index.mjs.map +2 -2
- package/build-module/components/global-styles/advanced-panel.mjs +23 -15
- package/build-module/components/global-styles/advanced-panel.mjs.map +2 -2
- package/build-module/components/global-styles/background-panel.mjs +3 -3
- package/build-module/components/global-styles/background-panel.mjs.map +2 -2
- package/build-module/components/global-styles/border-panel.mjs +2 -0
- package/build-module/components/global-styles/border-panel.mjs.map +2 -2
- package/build-module/components/global-styles/dimensions-panel.mjs +9 -6
- package/build-module/components/global-styles/dimensions-panel.mjs.map +2 -2
- package/build-module/components/iframe/index.mjs +3 -0
- package/build-module/components/iframe/index.mjs.map +2 -2
- package/build-module/components/inner-blocks/use-inner-block-template-sync.mjs +3 -1
- package/build-module/components/inner-blocks/use-inner-block-template-sync.mjs.map +2 -2
- package/build-module/components/inserter/hooks/use-patterns-state.mjs +1 -1
- package/build-module/components/inserter/hooks/use-patterns-state.mjs.map +2 -2
- package/build-module/components/inserter/index.mjs +185 -222
- package/build-module/components/inserter/index.mjs.map +3 -3
- package/build-module/components/inserter/media-tab/utils.mjs +1 -1
- package/build-module/components/inserter/media-tab/utils.mjs.map +2 -2
- package/build-module/components/inserter/search-results.mjs +1 -1
- package/build-module/components/inserter/search-results.mjs.map +2 -2
- package/build-module/components/list-view/block-select-button.mjs +10 -12
- package/build-module/components/list-view/block-select-button.mjs.map +2 -2
- package/build-module/components/list-view/block.mjs +2 -1
- package/build-module/components/list-view/block.mjs.map +2 -2
- package/build-module/components/provider/use-block-sync.mjs +11 -2
- package/build-module/components/provider/use-block-sync.mjs.map +2 -2
- package/build-module/components/rich-text/event-listeners/before-input-rules.mjs +4 -4
- package/build-module/components/rich-text/event-listeners/before-input-rules.mjs.map +2 -2
- package/build-module/components/rich-text/event-listeners/delete.mjs +4 -4
- package/build-module/components/rich-text/event-listeners/delete.mjs.map +2 -2
- package/build-module/components/rich-text/event-listeners/enter.mjs +7 -2
- package/build-module/components/rich-text/event-listeners/enter.mjs.map +2 -2
- package/build-module/components/rich-text/event-listeners/input-events.mjs +4 -4
- package/build-module/components/rich-text/event-listeners/input-events.mjs.map +2 -2
- package/build-module/components/rich-text/event-listeners/input-rules.mjs +17 -4
- package/build-module/components/rich-text/event-listeners/input-rules.mjs.map +2 -2
- package/build-module/components/rich-text/event-listeners/insert-replacement-text.mjs +4 -4
- package/build-module/components/rich-text/event-listeners/insert-replacement-text.mjs.map +2 -2
- package/build-module/components/rich-text/event-listeners/remove-browser-shortcuts.mjs +4 -4
- package/build-module/components/rich-text/event-listeners/remove-browser-shortcuts.mjs.map +2 -2
- package/build-module/components/rich-text/event-listeners/shortcuts.mjs +4 -4
- package/build-module/components/rich-text/event-listeners/shortcuts.mjs.map +2 -2
- package/build-module/components/rich-text/event-listeners/undo-automatic-change.mjs +4 -4
- package/build-module/components/rich-text/event-listeners/undo-automatic-change.mjs.map +2 -2
- package/build-module/components/rich-text/index.mjs +1 -23
- package/build-module/components/rich-text/index.mjs.map +2 -2
- package/build-module/components/use-block-commands/index.mjs +5 -5
- package/build-module/components/use-block-commands/index.mjs.map +2 -2
- package/build-module/hooks/anchor.mjs +11 -15
- package/build-module/hooks/anchor.mjs.map +2 -2
- package/build-module/hooks/border.mjs +1 -4
- package/build-module/hooks/border.mjs.map +2 -2
- package/build-module/hooks/color.mjs +2 -5
- package/build-module/hooks/color.mjs.map +2 -2
- package/build-module/hooks/dimensions.mjs +1 -4
- package/build-module/hooks/dimensions.mjs.map +2 -2
- package/build-module/hooks/fit-text.mjs +11 -0
- package/build-module/hooks/fit-text.mjs.map +2 -2
- package/build-module/hooks/position.mjs +20 -23
- package/build-module/hooks/position.mjs.map +2 -2
- package/build-module/hooks/supports.mjs +0 -7
- package/build-module/hooks/supports.mjs.map +2 -2
- package/build-module/store/actions.mjs +7 -3
- package/build-module/store/actions.mjs.map +2 -2
- package/build-module/store/private-actions.mjs +1 -2
- package/build-module/store/private-actions.mjs.map +2 -2
- package/build-module/store/private-selectors.mjs +26 -0
- package/build-module/store/private-selectors.mjs.map +2 -2
- package/build-module/store/reducer.mjs +14 -6
- package/build-module/store/reducer.mjs.map +2 -2
- package/build-module/store/selectors.mjs +62 -42
- package/build-module/store/selectors.mjs.map +2 -2
- package/build-style/content-rtl.css +12 -0
- package/build-style/content.css +12 -0
- package/build-style/style-rtl.css +26 -8
- package/build-style/style.css +26 -8
- package/package.json +51 -48
- package/src/components/block-breadcrumb/README.md +2 -2
- package/src/components/block-compare/README.md +6 -6
- package/src/components/block-compare/index.js +1 -3
- package/src/components/block-list/use-block-props/index.js +1 -1
- package/src/components/block-patterns-list/index.js +1 -1
- package/src/components/block-preview/README.md +1 -1
- package/src/components/block-switcher/block-transformations-menu.js +16 -18
- package/src/components/block-switcher/index.js +4 -4
- package/src/components/block-types-list/README.md +0 -19
- package/src/components/child-layout-control/index.js +15 -8
- package/src/components/child-layout-control/test/index.js +126 -0
- package/src/components/colors/test/with-colors.js +1 -1
- package/src/components/global-styles/advanced-panel.js +5 -1
- package/src/components/global-styles/background-panel.js +3 -3
- package/src/components/global-styles/border-panel.js +2 -0
- package/src/components/global-styles/dimensions-panel.js +23 -16
- package/src/components/iframe/index.js +3 -0
- package/src/components/inner-blocks/use-inner-block-template-sync.js +3 -1
- package/src/components/inserter/hooks/use-patterns-state.js +1 -1
- package/src/components/inserter/index.js +257 -288
- package/src/components/inserter/media-tab/utils.js +1 -1
- package/src/components/inserter/search-results.js +1 -3
- package/src/components/justify-content-control/README.md +1 -1
- package/src/components/list-view/block-select-button.js +9 -13
- package/src/components/list-view/block.js +1 -0
- package/src/components/media-placeholder/README.md +1 -29
- package/src/components/media-upload/README.md +0 -19
- package/src/components/provider/test/use-block-sync.js +40 -0
- package/src/components/provider/use-block-sync.js +12 -2
- package/src/components/rich-text/event-listeners/before-input-rules.js +5 -4
- package/src/components/rich-text/event-listeners/delete.js +9 -4
- package/src/components/rich-text/event-listeners/enter.js +9 -2
- package/src/components/rich-text/event-listeners/input-events.js +13 -4
- package/src/components/rich-text/event-listeners/input-rules.js +20 -4
- package/src/components/rich-text/event-listeners/insert-replacement-text.js +9 -4
- package/src/components/rich-text/event-listeners/remove-browser-shortcuts.js +9 -4
- package/src/components/rich-text/event-listeners/shortcuts.js +13 -4
- package/src/components/rich-text/event-listeners/undo-automatic-change.js +5 -4
- package/src/components/rich-text/index.js +1 -33
- package/src/components/unit-control/README.md +1 -1
- package/src/components/url-popover/README.md +1 -1
- package/src/components/use-block-commands/index.js +5 -5
- package/src/hooks/anchor.js +9 -17
- package/src/hooks/border.js +1 -5
- package/src/hooks/color.js +1 -6
- package/src/hooks/dimensions.js +1 -5
- package/src/hooks/fit-text.js +16 -0
- package/src/hooks/position.js +23 -27
- package/src/hooks/supports.js +0 -9
- package/src/store/actions.js +13 -3
- package/src/store/private-actions.js +1 -4
- package/src/store/private-selectors.js +59 -0
- package/src/store/reducer.js +19 -7
- package/src/store/selectors.js +91 -53
- package/src/store/test/actions.js +21 -0
- package/src/store/test/private-selectors.js +53 -0
- package/src/store/test/reducer.js +46 -0
- package/src/store/test/selectors.js +77 -0
- package/build/components/media-upload-progress/constants.cjs +0 -46
- package/build/components/media-upload-progress/constants.cjs.map +0 -7
- package/build/components/rich-text/native/format-edit.cjs +0 -60
- package/build/components/rich-text/native/format-edit.cjs.map +0 -7
- package/build/components/rich-text/native/index.cjs +0 -28
- package/build/components/rich-text/native/index.cjs.map +0 -7
- package/build/components/rich-text/native/use-format-types.cjs +0 -139
- package/build/components/rich-text/native/use-format-types.cjs.map +0 -7
- package/build-module/components/media-upload-progress/constants.mjs +0 -16
- package/build-module/components/media-upload-progress/constants.mjs.map +0 -7
- package/build-module/components/rich-text/native/format-edit.mjs +0 -39
- package/build-module/components/rich-text/native/format-edit.mjs.map +0 -7
- package/build-module/components/rich-text/native/index.mjs +0 -7
- package/build-module/components/rich-text/native/index.mjs.map +0 -7
- package/build-module/components/rich-text/native/use-format-types.mjs +0 -114
- package/build-module/components/rich-text/native/use-format-types.mjs.map +0 -7
- package/src/components/audio-player/audio-url-parser.native.js +0 -20
- package/src/components/audio-player/index.native.js +0 -225
- package/src/components/audio-player/styles.native.scss +0 -114
- package/src/components/audio-player/test/audio-url-parser.native.js +0 -53
- package/src/components/block-alignment-control/test/index.native.js +0 -37
- package/src/components/block-alignment-control/ui.native.js +0 -86
- package/src/components/block-caption/README.md +0 -104
- package/src/components/block-caption/index.native.js +0 -89
- package/src/components/block-caption/styles.native.scss +0 -7
- package/src/components/block-controls/slot.native.js +0 -33
- package/src/components/block-draggable/draggable-chip.native.js +0 -49
- package/src/components/block-draggable/dropping-insertion-point.native.js +0 -181
- package/src/components/block-draggable/dropping-insertion-point.native.scss +0 -8
- package/src/components/block-draggable/index.native.js +0 -467
- package/src/components/block-draggable/style.native.scss +0 -19
- package/src/components/block-draggable/test/__snapshots__/index.native.js.snap +0 -73
- package/src/components/block-draggable/test/helpers.native.js +0 -182
- package/src/components/block-draggable/test/index.native.js +0 -419
- package/src/components/block-draggable/use-scroll-when-dragging.native.js +0 -135
- package/src/components/block-edit/edit.native.js +0 -49
- package/src/components/block-edit/test/edit.native.js +0 -65
- package/src/components/block-heading-level-dropdown/index.native.js +0 -68
- package/src/components/block-icon/index.native.js +0 -47
- package/src/components/block-icon/style.native.scss +0 -7
- package/src/components/block-list/block-crash-boundary.native.js +0 -43
- package/src/components/block-list/block-crash-warning.native.js +0 -21
- package/src/components/block-list/block-invalid-warning.native.js +0 -70
- package/src/components/block-list/block-list-context.native.js +0 -172
- package/src/components/block-list/block-list-item-cell.native.js +0 -62
- package/src/components/block-list/block-list-item.native.js +0 -209
- package/src/components/block-list/block-list-item.native.scss +0 -16
- package/src/components/block-list/block-outline.native.js +0 -77
- package/src/components/block-list/block-selection-button.native.js +0 -100
- package/src/components/block-list/block-selection-button.native.scss +0 -34
- package/src/components/block-list/block.native.js +0 -716
- package/src/components/block-list/block.native.scss +0 -62
- package/src/components/block-list/grid-item.native.js +0 -58
- package/src/components/block-list/index.native.js +0 -437
- package/src/components/block-list/insertion-point.native.js +0 -36
- package/src/components/block-list/style.native.scss +0 -117
- package/src/components/block-list/test/block-invalid-warning.native.js +0 -62
- package/src/components/block-list/test/block-list-context.native.js +0 -243
- package/src/components/block-list/test/block-outline.native.js +0 -255
- package/src/components/block-list/test/fixtures/block-list-context.native.js +0 -79
- package/src/components/block-list/test/index.native.js +0 -205
- package/src/components/block-list/use-block-props/index.native.js +0 -10
- package/src/components/block-list/use-scroll-upon-insertion.native.js +0 -52
- package/src/components/block-list-appender/index.native.js +0 -70
- package/src/components/block-list-appender/style.native.scss +0 -8
- package/src/components/block-media-update-progress/README.md +0 -100
- package/src/components/block-media-update-progress/index.native.js +0 -299
- package/src/components/block-media-update-progress/styles.native.scss +0 -9
- package/src/components/block-media-update-progress/test/index.native.js +0 -543
- package/src/components/block-mover/index.native.js +0 -193
- package/src/components/block-mover/mover-description.native.js +0 -155
- package/src/components/block-mover/test/__snapshots__/index.native.js.snap +0 -218
- package/src/components/block-mover/test/index.native.js +0 -186
- package/src/components/block-settings/button.native.js +0 -41
- package/src/components/block-settings/container.native.js +0 -91
- package/src/components/block-settings/container.native.scss +0 -4
- package/src/components/block-settings/index.native.js +0 -5
- package/src/components/block-styles/index.native.js +0 -94
- package/src/components/block-styles/preview.native.js +0 -109
- package/src/components/block-styles/style.native.scss +0 -64
- package/src/components/block-switcher/block-transformations-menu.native.js +0 -91
- package/src/components/block-toolbar/block-toolbar-menu.native.js +0 -477
- package/src/components/block-toolbar/index.native.js +0 -126
- package/src/components/block-toolbar/test/__snapshots__/block-toolbar-menu.native.js.snap +0 -125
- package/src/components/block-toolbar/test/block-toolbar-menu.native.js +0 -405
- package/src/components/block-toolbar/test/index.native.js +0 -36
- package/src/components/block-types-list/index.native.js +0 -175
- package/src/components/block-types-list/style.native.scss +0 -25
- package/src/components/block-variation-picker/index.native.js +0 -107
- package/src/components/block-variation-picker/style.native.scss +0 -32
- package/src/components/button-block-appender/index.native.js +0 -92
- package/src/components/button-block-appender/styles.native.scss +0 -43
- package/src/components/caption/README.md +0 -44
- package/src/components/caption/index.native.js +0 -61
- package/src/components/colors-gradients/panel-color-gradient-settings.native.js +0 -59
- package/src/components/contrast-checker/index.native.js +0 -113
- package/src/components/contrast-checker/style.native.scss +0 -26
- package/src/components/convert-to-group-buttons/index.native.js +0 -79
- package/src/components/default-block-appender/index.native.js +0 -113
- package/src/components/default-block-appender/style.native.scss +0 -18
- package/src/components/floating-toolbar/floatingToolbar.android.scss +0 -4
- package/src/components/floating-toolbar/floatingToolbar.ios.scss +0 -3
- package/src/components/floating-toolbar/index.native.js +0 -141
- package/src/components/floating-toolbar/styles.native.scss +0 -43
- package/src/components/font-sizes/index.native.js +0 -7
- package/src/components/global-styles/color-panel.native.js +0 -207
- package/src/components/global-styles/test/use-global-styles-context.native.js +0 -435
- package/src/components/global-styles/use-global-styles-context.native.js +0 -592
- package/src/components/gradients/index.native.js +0 -2
- package/src/components/image-link-destinations/index.native.js +0 -152
- package/src/components/image-link-destinations/style.native.scss +0 -16
- package/src/components/index.native.js +0 -108
- package/src/components/inner-blocks/constants.native.js +0 -5
- package/src/components/inner-blocks/index.native.js +0 -221
- package/src/components/inner-blocks/warning-max-depth-exceeded.native.js +0 -124
- package/src/components/inserter/block-types-tab.native.js +0 -76
- package/src/components/inserter/hooks/use-block-type-impressions.native.js +0 -47
- package/src/components/inserter/hooks/use-clipboard-block.native.js +0 -40
- package/src/components/inserter/index.native.js +0 -424
- package/src/components/inserter/menu.native.js +0 -237
- package/src/components/inserter/no-results.native.js +0 -49
- package/src/components/inserter/reusable-blocks-tab.native.js +0 -45
- package/src/components/inserter/search-results.native.js +0 -67
- package/src/components/inserter/style.native.scss +0 -83
- package/src/components/inserter/tabs.native.js +0 -152
- package/src/components/inserter/test/__snapshots__/index.native.js.snap +0 -117
- package/src/components/inserter/test/fixtures/index.native.js +0 -12
- package/src/components/inserter/test/index.native.js +0 -273
- package/src/components/inserter/test/reusable-blocks-tab.native.js +0 -62
- package/src/components/inserter/test/utils.native.js +0 -37
- package/src/components/inserter/utils.native.js +0 -46
- package/src/components/inserter-button/index.native.js +0 -108
- package/src/components/inserter-button/style.native.scss +0 -72
- package/src/components/inspector-controls/fill.native.js +0 -62
- package/src/components/inspector-controls/slot.native.js +0 -35
- package/src/components/inspector-controls-tabs/advanced-controls-panel.native.js +0 -31
- package/src/components/line-height-control/index.native.js +0 -28
- package/src/components/media-placeholder/index.native.js +0 -258
- package/src/components/media-placeholder/styles.native.scss +0 -108
- package/src/components/media-replace-flow/index.native.js +0 -12
- package/src/components/media-upload/constants.native.js +0 -14
- package/src/components/media-upload/index.native.js +0 -356
- package/src/components/media-upload/style.native.scss +0 -4
- package/src/components/media-upload/test/index.native.js +0 -172
- package/src/components/media-upload-progress/README.md +0 -100
- package/src/components/media-upload-progress/constants.js +0 -6
- package/src/components/media-upload-progress/index.native.js +0 -233
- package/src/components/media-upload-progress/styles.native.scss +0 -15
- package/src/components/media-upload-progress/test/index.native.js +0 -220
- package/src/components/plain-text/index.native.js +0 -164
- package/src/components/plain-text/style.native.scss +0 -10
- package/src/components/provider/index.native.js +0 -32
- package/src/components/rich-text/embed-handler-picker.native.js +0 -65
- package/src/components/rich-text/file-paste-handler.native.js +0 -3
- package/src/components/rich-text/format-toolbar/index.native.js +0 -21
- package/src/components/rich-text/format-toolbar-container.native.js +0 -16
- package/src/components/rich-text/index.native.js +0 -701
- package/src/components/rich-text/input-event.native.js +0 -10
- package/src/components/rich-text/native/format-edit.js +0 -44
- package/src/components/rich-text/native/get-format-colors.native.js +0 -47
- package/src/components/rich-text/native/index.js +0 -1
- package/src/components/rich-text/native/index.native.js +0 -1389
- package/src/components/rich-text/native/style.native.scss +0 -28
- package/src/components/rich-text/native/test/__snapshots__/index.native.js.snap +0 -79
- package/src/components/rich-text/native/test/index.native.js +0 -345
- package/src/components/rich-text/native/test/performance/rich-text.native.js +0 -44
- package/src/components/rich-text/native/toolbar-button-with-options.native.js +0 -61
- package/src/components/rich-text/native/use-format-types.js +0 -146
- package/src/components/rich-text/remove-browser-shortcuts.native.js +0 -1
- package/src/components/rich-text/shortcut.native.js +0 -10
- package/src/components/ungroup-button/README.md +0 -23
- package/src/components/ungroup-button/index.native.js +0 -77
- package/src/components/unsupported-block-details/index.native.js +0 -187
- package/src/components/unsupported-block-details/style.native.scss +0 -56
- package/src/components/url-input/index.native.js +0 -33
- package/src/components/use-block-drop-zone/index.native.js +0 -207
- package/src/components/use-on-block-drop/index.native.js +0 -115
- package/src/components/use-unsupported-block-editor/index.native.js +0 -59
- package/src/components/video-player/gridicon-play.native.js +0 -13
- package/src/components/video-player/index.native.js +0 -133
- package/src/components/video-player/styles.native.scss +0 -29
- package/src/components/warning/index.native.js +0 -64
- package/src/components/warning/style.native.scss +0 -47
- package/src/hooks/align.native.js +0 -49
- package/src/hooks/custom-class-name.native.js +0 -70
- package/src/hooks/index.native.js +0 -36
- package/src/hooks/layout.native.js +0 -23
- package/src/hooks/test/__snapshots__/align.native.js.snap +0 -73
- package/src/hooks/test/__snapshots__/anchor.native.js.snap +0 -7
- package/src/hooks/test/align.native.js +0 -134
- package/src/hooks/test/anchor.native.js +0 -32
- package/src/hooks/test/use-editor-wrapper-styles.native.js +0 -282
- package/src/hooks/typography.native.js +0 -60
- package/src/hooks/use-editor-wrapper-styles.native.js +0 -250
- package/src/hooks/use-editor-wrapper-styles.native.scss +0 -12
- package/src/index.native.js +0 -6
- package/src/private-apis.native.js +0 -21
- package/src/store/defaults.native.js +0 -23
|
@@ -30,25 +30,6 @@ The blocks that will be displayed in the block list.
|
|
|
30
30
|
|
|
31
31
|
- Type: `Array<Block>`
|
|
32
32
|
- Required: Yes
|
|
33
|
-
- Platform: Web | Mobile
|
|
34
|
-
|
|
35
|
-
#### name
|
|
36
|
-
|
|
37
|
-
Name of the list to be used as part of component's key.
|
|
38
|
-
|
|
39
|
-
- Type: `String`
|
|
40
|
-
- Required: Yes
|
|
41
|
-
- Platform: Mobile
|
|
42
|
-
|
|
43
|
-
#### listProps
|
|
44
|
-
|
|
45
|
-
Extra `FlatList` props for customizing the list.
|
|
46
|
-
|
|
47
|
-
On Mobile usually this component is rendered inside `BottomSheet` component, which already [generates these props](<(https://github.com/WordPress/gutenberg/blob/1ca1fe0c64dfe1a385221399fc94b0fb14f34199/packages/components/src/mobile/bottom-sheet/index.native.js#L355-L372)>) for this component.
|
|
48
|
-
|
|
49
|
-
- Type: `String`
|
|
50
|
-
- Required: No
|
|
51
|
-
- Platform: Mobile
|
|
52
33
|
|
|
53
34
|
## Related components
|
|
54
35
|
|
|
@@ -40,13 +40,14 @@ function helpText( selfStretch, parentLayout ) {
|
|
|
40
40
|
/**
|
|
41
41
|
* Form to edit the child layout value.
|
|
42
42
|
*
|
|
43
|
-
* @param {Object} props
|
|
44
|
-
* @param {Object} props.value
|
|
45
|
-
* @param {Function} props.onChange
|
|
46
|
-
* @param {Object} props.parentLayout
|
|
43
|
+
* @param {Object} props Props.
|
|
44
|
+
* @param {Object} props.value The child layout value.
|
|
45
|
+
* @param {Function} props.onChange Function to update the child layout value.
|
|
46
|
+
* @param {Object} props.parentLayout The parent layout value.
|
|
47
47
|
*
|
|
48
|
-
* @param {boolean} props.isShownByDefault
|
|
49
|
-
* @param {string} props.panelId
|
|
48
|
+
* @param {boolean} props.isShownByDefault Whether the control is shown by default.
|
|
49
|
+
* @param {string} props.panelId The panel ID.
|
|
50
|
+
* @param {boolean} props.showGridSpanDefaults Whether unset grid span controls should show default values.
|
|
50
51
|
* @return {Element} child layout edit element.
|
|
51
52
|
*/
|
|
52
53
|
export default function ChildLayoutControl( {
|
|
@@ -55,6 +56,7 @@ export default function ChildLayoutControl( {
|
|
|
55
56
|
parentLayout,
|
|
56
57
|
isShownByDefault,
|
|
57
58
|
panelId,
|
|
59
|
+
showGridSpanDefaults = true,
|
|
58
60
|
} ) {
|
|
59
61
|
const {
|
|
60
62
|
type: parentType,
|
|
@@ -80,6 +82,7 @@ export default function ChildLayoutControl( {
|
|
|
80
82
|
parentLayout={ parentLayout }
|
|
81
83
|
isShownByDefault={ isShownByDefault }
|
|
82
84
|
panelId={ panelId }
|
|
85
|
+
showGridSpanDefaults={ showGridSpanDefaults }
|
|
83
86
|
/>
|
|
84
87
|
);
|
|
85
88
|
}
|
|
@@ -206,6 +209,7 @@ function GridControls( {
|
|
|
206
209
|
parentLayout,
|
|
207
210
|
isShownByDefault,
|
|
208
211
|
panelId,
|
|
212
|
+
showGridSpanDefaults,
|
|
209
213
|
} ) {
|
|
210
214
|
const { columnStart, rowStart, columnSpan, rowSpan } = childLayout;
|
|
211
215
|
const { columnCount, rowCount } = parentLayout ?? {};
|
|
@@ -243,6 +247,9 @@ function GridControls( {
|
|
|
243
247
|
window.__experimentalEnableGridInteractivity && rowCount
|
|
244
248
|
? rowCount - ( rowStart ?? 1 ) + 1
|
|
245
249
|
: undefined;
|
|
250
|
+
const columnSpanValue =
|
|
251
|
+
columnSpan ?? ( showGridSpanDefaults ? 1 : undefined );
|
|
252
|
+
const rowSpanValue = rowSpan ?? ( showGridSpanDefaults ? 1 : undefined );
|
|
246
253
|
|
|
247
254
|
return (
|
|
248
255
|
<>
|
|
@@ -274,7 +281,7 @@ function GridControls( {
|
|
|
274
281
|
columnSpan: constrainedValue,
|
|
275
282
|
} );
|
|
276
283
|
} }
|
|
277
|
-
value={
|
|
284
|
+
value={ columnSpanValue }
|
|
278
285
|
min={ 1 }
|
|
279
286
|
max={ maxColumnSpan }
|
|
280
287
|
/>
|
|
@@ -298,7 +305,7 @@ function GridControls( {
|
|
|
298
305
|
rowSpan: constrainedValue,
|
|
299
306
|
} );
|
|
300
307
|
} }
|
|
301
|
-
value={
|
|
308
|
+
value={ rowSpanValue }
|
|
302
309
|
min={ 1 }
|
|
303
310
|
max={ maxRowSpan }
|
|
304
311
|
/>
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { render, screen } from '@testing-library/react';
|
|
5
|
+
import userEvent from '@testing-library/user-event';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* WordPress dependencies
|
|
9
|
+
*/
|
|
10
|
+
import { __experimentalToolsPanel as ToolsPanel } from '@wordpress/components';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Internal dependencies
|
|
14
|
+
*/
|
|
15
|
+
import ChildLayoutControl from '../';
|
|
16
|
+
|
|
17
|
+
jest.mock( '@wordpress/data/src/components/use-select', () =>
|
|
18
|
+
jest.fn( ( mapSelect ) => {
|
|
19
|
+
if ( typeof mapSelect === 'function' ) {
|
|
20
|
+
return mapSelect( () => ( {
|
|
21
|
+
getBlockRootClientId: () => 'root-client-id',
|
|
22
|
+
} ) );
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return {
|
|
26
|
+
getBlockAttributes: () => ( {} ),
|
|
27
|
+
getBlockOrder: () => [],
|
|
28
|
+
};
|
|
29
|
+
} )
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
jest.mock( '@wordpress/data/src/components/use-dispatch', () => ( {
|
|
33
|
+
useDispatch: () => ( {
|
|
34
|
+
__unstableMarkNextChangeAsNotPersistent: jest.fn(),
|
|
35
|
+
moveBlocksToPosition: jest.fn(),
|
|
36
|
+
} ),
|
|
37
|
+
} ) );
|
|
38
|
+
|
|
39
|
+
describe( 'ChildLayoutControl', () => {
|
|
40
|
+
const baseProps = {
|
|
41
|
+
onChange: jest.fn(),
|
|
42
|
+
parentLayout: {
|
|
43
|
+
type: 'grid',
|
|
44
|
+
},
|
|
45
|
+
isShownByDefault: true,
|
|
46
|
+
panelId: 'client-id',
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
afterEach( () => {
|
|
50
|
+
jest.clearAllMocks();
|
|
51
|
+
} );
|
|
52
|
+
|
|
53
|
+
function renderControl( props ) {
|
|
54
|
+
return render(
|
|
55
|
+
<ToolsPanel
|
|
56
|
+
label="Dimensions"
|
|
57
|
+
resetAll={ jest.fn() }
|
|
58
|
+
panelId="client-id"
|
|
59
|
+
>
|
|
60
|
+
<ChildLayoutControl { ...baseProps } { ...props } />
|
|
61
|
+
</ToolsPanel>
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
it( 'shows default grid span values for unset span controls by default', () => {
|
|
66
|
+
renderControl( { value: {} } );
|
|
67
|
+
|
|
68
|
+
expect(
|
|
69
|
+
screen.getByRole( 'spinbutton', { name: 'Column span' } )
|
|
70
|
+
).toHaveValue( 1 );
|
|
71
|
+
expect(
|
|
72
|
+
screen.getByRole( 'spinbutton', { name: 'Row span' } )
|
|
73
|
+
).toHaveValue( 1 );
|
|
74
|
+
} );
|
|
75
|
+
|
|
76
|
+
it( 'shows empty grid span values when defaults are hidden', () => {
|
|
77
|
+
renderControl( { value: {}, showGridSpanDefaults: false } );
|
|
78
|
+
|
|
79
|
+
expect(
|
|
80
|
+
screen.getByRole( 'spinbutton', { name: 'Column span' } )
|
|
81
|
+
).toHaveValue( null );
|
|
82
|
+
expect(
|
|
83
|
+
screen.getByRole( 'spinbutton', { name: 'Row span' } )
|
|
84
|
+
).toHaveValue( null );
|
|
85
|
+
} );
|
|
86
|
+
|
|
87
|
+
it( 'shows explicitly set grid span values when defaults are hidden', () => {
|
|
88
|
+
renderControl( {
|
|
89
|
+
value: {
|
|
90
|
+
columnSpan: 1,
|
|
91
|
+
rowSpan: 2,
|
|
92
|
+
},
|
|
93
|
+
showGridSpanDefaults: false,
|
|
94
|
+
} );
|
|
95
|
+
|
|
96
|
+
expect(
|
|
97
|
+
screen.getByRole( 'spinbutton', { name: 'Column span' } )
|
|
98
|
+
).toHaveValue( 1 );
|
|
99
|
+
expect(
|
|
100
|
+
screen.getByRole( 'spinbutton', { name: 'Row span' } )
|
|
101
|
+
).toHaveValue( 2 );
|
|
102
|
+
} );
|
|
103
|
+
|
|
104
|
+
it( 'sets a numeric span when entering 1 into an empty span control', async () => {
|
|
105
|
+
const user = userEvent.setup();
|
|
106
|
+
const onChange = jest.fn();
|
|
107
|
+
|
|
108
|
+
renderControl( {
|
|
109
|
+
value: {},
|
|
110
|
+
onChange,
|
|
111
|
+
showGridSpanDefaults: false,
|
|
112
|
+
} );
|
|
113
|
+
|
|
114
|
+
await user.type(
|
|
115
|
+
screen.getByRole( 'spinbutton', { name: 'Column span' } ),
|
|
116
|
+
'1'
|
|
117
|
+
);
|
|
118
|
+
|
|
119
|
+
expect( onChange ).toHaveBeenCalledWith( {
|
|
120
|
+
columnStart: undefined,
|
|
121
|
+
rowStart: undefined,
|
|
122
|
+
rowSpan: undefined,
|
|
123
|
+
columnSpan: 1,
|
|
124
|
+
} );
|
|
125
|
+
} );
|
|
126
|
+
} );
|
|
@@ -85,7 +85,11 @@ export default function AdvancedPanel( {
|
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
return (
|
|
88
|
-
<Stack
|
|
88
|
+
<Stack
|
|
89
|
+
direction="column"
|
|
90
|
+
gap="md"
|
|
91
|
+
className="block-editor-global-styles-advanced-panel"
|
|
92
|
+
>
|
|
89
93
|
{ cssError && (
|
|
90
94
|
<Notice status="error" onRemove={ () => setCSSError( null ) }>
|
|
91
95
|
{ cssError }
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
__experimentalToolsPanel as ToolsPanel,
|
|
6
6
|
__experimentalToolsPanelItem as ToolsPanelItem,
|
|
7
7
|
} from '@wordpress/components';
|
|
8
|
-
import { useCallback
|
|
8
|
+
import { useCallback } from '@wordpress/element';
|
|
9
9
|
import { __ } from '@wordpress/i18n';
|
|
10
10
|
import { getValueFromVariable } from '@wordpress/global-styles-engine';
|
|
11
11
|
|
|
@@ -31,7 +31,7 @@ const DEFAULT_CONTROLS = {
|
|
|
31
31
|
* @return {boolean} Whether site settings has activated background panel.
|
|
32
32
|
*/
|
|
33
33
|
export function useHasBackgroundControl( settings, feature ) {
|
|
34
|
-
return
|
|
34
|
+
return settings?.background?.[ feature ];
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
/**
|
|
@@ -44,7 +44,7 @@ export function useHasBackgroundControl( settings, feature ) {
|
|
|
44
44
|
*/
|
|
45
45
|
export function useHasBackgroundPanel( settings ) {
|
|
46
46
|
const { backgroundImage, gradient } = settings?.background || {};
|
|
47
|
-
return
|
|
47
|
+
return backgroundImage || gradient;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
/**
|
|
@@ -105,6 +105,7 @@ export default function BorderPanel( {
|
|
|
105
105
|
defaultControls = DEFAULT_CONTROLS,
|
|
106
106
|
} ) {
|
|
107
107
|
const colors = useColorsPerOrigin( settings );
|
|
108
|
+
const areCustomSolidsEnabled = settings?.color?.custom;
|
|
108
109
|
const decodeValue = useCallback(
|
|
109
110
|
( rawValue ) => getValueFromVariable( { settings }, '', rawValue ),
|
|
110
111
|
[ settings ]
|
|
@@ -270,6 +271,7 @@ export default function BorderPanel( {
|
|
|
270
271
|
>
|
|
271
272
|
<BorderBoxControl
|
|
272
273
|
colors={ colors }
|
|
274
|
+
disableCustomColors={ ! areCustomSolidsEnabled }
|
|
273
275
|
enableAlpha
|
|
274
276
|
enableStyle={ showBorderStyle }
|
|
275
277
|
onChange={ onBorderChange }
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
__experimentalInputControlPrefixWrapper as InputControlPrefixWrapper,
|
|
17
17
|
} from '@wordpress/components';
|
|
18
18
|
import { Icon, alignNone, stretchWide } from '@wordpress/icons';
|
|
19
|
-
import { useCallback, useState
|
|
19
|
+
import { useCallback, useState } from '@wordpress/element';
|
|
20
20
|
import { getValueFromVariable } from '@wordpress/global-styles-engine';
|
|
21
21
|
|
|
22
22
|
/**
|
|
@@ -32,6 +32,8 @@ import { setImmutably } from '../../utils/object';
|
|
|
32
32
|
import {
|
|
33
33
|
DEFAULT_BLOCK_STYLE_STATE,
|
|
34
34
|
hasPseudoBlockStyleState,
|
|
35
|
+
isDefaultBlockStyleState,
|
|
36
|
+
hasViewportBlockStyleState,
|
|
35
37
|
} from '../../hooks/block-style-state';
|
|
36
38
|
|
|
37
39
|
const AXIAL_SIDES = [ 'horizontal', 'vertical' ];
|
|
@@ -41,18 +43,17 @@ export function useHasDimensionsPanel(
|
|
|
41
43
|
styleState = DEFAULT_BLOCK_STYLE_STATE
|
|
42
44
|
) {
|
|
43
45
|
return (
|
|
44
|
-
|
|
45
|
-
(
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
hasChildLayout( settings, styleState ) )
|
|
46
|
+
hasContentSize( settings ) ||
|
|
47
|
+
hasWideSize( settings ) ||
|
|
48
|
+
hasPadding( settings ) ||
|
|
49
|
+
hasMargin( settings ) ||
|
|
50
|
+
hasGap( settings ) ||
|
|
51
|
+
hasHeight( settings ) ||
|
|
52
|
+
hasMinHeight( settings ) ||
|
|
53
|
+
hasMinWidth( settings ) ||
|
|
54
|
+
hasWidth( settings ) ||
|
|
55
|
+
hasAspectRatio( settings, styleState ) ||
|
|
56
|
+
hasChildLayout( settings, styleState )
|
|
56
57
|
);
|
|
57
58
|
}
|
|
58
59
|
|
|
@@ -92,8 +93,11 @@ function hasWidth( settings ) {
|
|
|
92
93
|
return settings?.dimensions?.width;
|
|
93
94
|
}
|
|
94
95
|
|
|
95
|
-
function hasAspectRatio( settings ) {
|
|
96
|
-
return
|
|
96
|
+
function hasAspectRatio( settings, styleState = DEFAULT_BLOCK_STYLE_STATE ) {
|
|
97
|
+
return (
|
|
98
|
+
isDefaultBlockStyleState( styleState ) &&
|
|
99
|
+
settings?.dimensions?.aspectRatio
|
|
100
|
+
);
|
|
97
101
|
}
|
|
98
102
|
|
|
99
103
|
function hasChildLayout( settings, styleState = DEFAULT_BLOCK_STYLE_STATE ) {
|
|
@@ -484,7 +488,7 @@ export default function DimensionsPanel( {
|
|
|
484
488
|
const hasWidthValue = () => !! value?.dimensions?.width;
|
|
485
489
|
|
|
486
490
|
// Aspect Ratio
|
|
487
|
-
const showAspectRatioControl = hasAspectRatio( settings );
|
|
491
|
+
const showAspectRatioControl = hasAspectRatio( settings, styleState );
|
|
488
492
|
const aspectRatioValue = decodeValue(
|
|
489
493
|
inheritedValue?.dimensions?.aspectRatio
|
|
490
494
|
);
|
|
@@ -737,6 +741,9 @@ export default function DimensionsPanel( {
|
|
|
737
741
|
onChange={ setChildLayout }
|
|
738
742
|
parentLayout={ settings?.parentLayout }
|
|
739
743
|
panelId={ panelId }
|
|
744
|
+
showGridSpanDefaults={
|
|
745
|
+
! hasViewportBlockStyleState( styleState )
|
|
746
|
+
}
|
|
740
747
|
isShownByDefault={
|
|
741
748
|
defaultControls.childLayout ??
|
|
742
749
|
DEFAULT_CONTROLS.childLayout
|
|
@@ -125,6 +125,9 @@ function getIframeSrc( resolvedAssets ) {
|
|
|
125
125
|
${ resolvedAssets.styles ?? '' }
|
|
126
126
|
${ resolvedAssets.scripts ?? '' }
|
|
127
127
|
</head>
|
|
128
|
+
<body>
|
|
129
|
+
<script>document.currentScript.parentElement.remove()</script>
|
|
130
|
+
</body>
|
|
128
131
|
</html>`;
|
|
129
132
|
|
|
130
133
|
src = URL.createObjectURL( new Blob( [ html ], { type: 'text/html' } ) );
|
|
@@ -91,7 +91,9 @@ export default function useInnerBlockTemplateSync(
|
|
|
91
91
|
);
|
|
92
92
|
|
|
93
93
|
if ( ! fastDeepEqual( nextBlocks, currentInnerBlocks ) ) {
|
|
94
|
-
__unstableMarkNextChangeAsNotPersistent(
|
|
94
|
+
__unstableMarkNextChangeAsNotPersistent( {
|
|
95
|
+
history: 'ignore',
|
|
96
|
+
} );
|
|
95
97
|
replaceInnerBlocks(
|
|
96
98
|
clientId,
|
|
97
99
|
nextBlocks,
|