@wordpress/block-editor 15.21.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 +17 -1
- package/build/components/block-compare/index.cjs +2 -2
- package/build/components/block-compare/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/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 +1 -1
- package/build/components/global-styles/dimensions-panel.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/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 +23 -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-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/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 +2 -2
- package/build-module/components/global-styles/dimensions-panel.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/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 +21 -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 +49 -46
- 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-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/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 +12 -13
- 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/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 +42 -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/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
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { useSelect } from '@wordpress/data';
|
|
5
|
-
import { serialize } from '@wordpress/blocks';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Internal dependencies
|
|
9
|
-
*/
|
|
10
|
-
import { store as blockEditorStore } from '../../store';
|
|
11
|
-
|
|
12
|
-
// Blocks that can't be edited through the Unsupported block editor identified by their name.
|
|
13
|
-
const UBE_INCOMPATIBLE_BLOCKS = [ 'core/block' ];
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Hook that retrieves the settings to determine if the
|
|
17
|
-
* Unsupported Block Editor can be used in a specific block.
|
|
18
|
-
*
|
|
19
|
-
* @param {string} clientId Client ID of block.
|
|
20
|
-
* @return {Object} Unsupported block editor settings.
|
|
21
|
-
*/
|
|
22
|
-
export default function useUnsupportedBlockEditor( clientId ) {
|
|
23
|
-
return useSelect(
|
|
24
|
-
( select ) => {
|
|
25
|
-
const { getBlock, getSettings } = select( blockEditorStore );
|
|
26
|
-
const { capabilities } = getSettings();
|
|
27
|
-
|
|
28
|
-
const block = getBlock( clientId );
|
|
29
|
-
const blockAttributes = block?.attributes || {};
|
|
30
|
-
|
|
31
|
-
const blockDetails = {
|
|
32
|
-
blockName: block?.name,
|
|
33
|
-
blockContent: serialize( block ? [ block ] : [] ),
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
// If the block is unsupported, use the `original` attributes to identify the block's name.
|
|
37
|
-
if ( blockDetails.blockName === 'core/missing' ) {
|
|
38
|
-
blockDetails.blockName = blockAttributes.originalName;
|
|
39
|
-
blockDetails.blockContent =
|
|
40
|
-
blockDetails.blockName === 'core/freeform'
|
|
41
|
-
? blockAttributes.content
|
|
42
|
-
: block?.originalContent;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
return {
|
|
46
|
-
isUnsupportedBlockEditorSupported:
|
|
47
|
-
capabilities?.unsupportedBlockEditor === true,
|
|
48
|
-
canEnableUnsupportedBlockEditor:
|
|
49
|
-
capabilities?.canEnableUnsupportedBlockEditor === true,
|
|
50
|
-
isEditableInUnsupportedBlockEditor:
|
|
51
|
-
! UBE_INCOMPATIBLE_BLOCKS.includes(
|
|
52
|
-
blockDetails.blockName
|
|
53
|
-
),
|
|
54
|
-
...blockDetails,
|
|
55
|
-
};
|
|
56
|
-
},
|
|
57
|
-
[ clientId ]
|
|
58
|
-
);
|
|
59
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { Path, SVG } from '@wordpress/components';
|
|
5
|
-
|
|
6
|
-
export default (
|
|
7
|
-
<SVG viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
8
|
-
<Path
|
|
9
|
-
d="M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2zm-2 14.5v-9l6 4.5z"
|
|
10
|
-
fill="white"
|
|
11
|
-
/>
|
|
12
|
-
</SVG>
|
|
13
|
-
);
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { Component } from '@wordpress/element';
|
|
5
|
-
import { Icon as WCIcon } from '@wordpress/components';
|
|
6
|
-
import { __ } from '@wordpress/i18n';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* External dependencies
|
|
10
|
-
*/
|
|
11
|
-
import { View, TouchableOpacity, Platform, Linking, Alert } from 'react-native';
|
|
12
|
-
import { default as VideoPlayer } from 'react-native-video';
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Internal dependencies
|
|
16
|
-
*/
|
|
17
|
-
import styles from './styles.scss';
|
|
18
|
-
import PlayIcon from './gridicon-play';
|
|
19
|
-
|
|
20
|
-
// Default Video ratio 16:9
|
|
21
|
-
export const VIDEO_ASPECT_RATIO = 16 / 9;
|
|
22
|
-
|
|
23
|
-
class Video extends Component {
|
|
24
|
-
constructor() {
|
|
25
|
-
super( ...arguments );
|
|
26
|
-
this.isIOS = Platform.OS === 'ios';
|
|
27
|
-
this.state = {
|
|
28
|
-
isFullScreen: false,
|
|
29
|
-
videoContainerHeight: 0,
|
|
30
|
-
};
|
|
31
|
-
this.onPressPlay = this.onPressPlay.bind( this );
|
|
32
|
-
this.onVideoLayout = this.onVideoLayout.bind( this );
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
onVideoLayout( event ) {
|
|
36
|
-
const { height } = event.nativeEvent.layout;
|
|
37
|
-
if ( height !== this.state.videoContainerHeight ) {
|
|
38
|
-
this.setState( { videoContainerHeight: height } );
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
onPressPlay() {
|
|
43
|
-
if ( this.isIOS ) {
|
|
44
|
-
if ( this.player ) {
|
|
45
|
-
this.player.presentFullscreenPlayer();
|
|
46
|
-
}
|
|
47
|
-
} else {
|
|
48
|
-
const { source } = this.props;
|
|
49
|
-
if ( source && source.uri ) {
|
|
50
|
-
this.openURL( source.uri );
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
// Tries opening the URL outside of the app
|
|
56
|
-
openURL( url ) {
|
|
57
|
-
Linking.canOpenURL( url )
|
|
58
|
-
.then( ( supported ) => {
|
|
59
|
-
if ( ! supported ) {
|
|
60
|
-
Alert.alert(
|
|
61
|
-
__( 'Problem opening the video' ),
|
|
62
|
-
__(
|
|
63
|
-
'No application can handle this request. Please install a Web browser.'
|
|
64
|
-
)
|
|
65
|
-
);
|
|
66
|
-
window.console.warn(
|
|
67
|
-
'No application found that can open the video with URL: ' +
|
|
68
|
-
url
|
|
69
|
-
);
|
|
70
|
-
} else {
|
|
71
|
-
return Linking.openURL( url );
|
|
72
|
-
}
|
|
73
|
-
} )
|
|
74
|
-
.catch( ( err ) => {
|
|
75
|
-
Alert.alert(
|
|
76
|
-
__( 'Problem opening the video' ),
|
|
77
|
-
__( 'An unknown error occurred. Please try again.' )
|
|
78
|
-
);
|
|
79
|
-
window.console.error(
|
|
80
|
-
'An error occurred while opening the video URL: ' + url,
|
|
81
|
-
err
|
|
82
|
-
);
|
|
83
|
-
} );
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
render() {
|
|
87
|
-
const { isSelected, style } = this.props;
|
|
88
|
-
const { isFullScreen, videoContainerHeight } = this.state;
|
|
89
|
-
const showPlayButton = videoContainerHeight > 0;
|
|
90
|
-
|
|
91
|
-
return (
|
|
92
|
-
<View style={ styles.videoContainer }>
|
|
93
|
-
<VideoPlayer
|
|
94
|
-
{ ...this.props }
|
|
95
|
-
ref={ ( ref ) => {
|
|
96
|
-
this.player = ref;
|
|
97
|
-
} }
|
|
98
|
-
// Using built-in player controls is messing up the layout on iOS.
|
|
99
|
-
// So we are setting controls=false and adding a play button that
|
|
100
|
-
// will trigger presentFullscreenPlayer()
|
|
101
|
-
controls={ false }
|
|
102
|
-
ignoreSilentSwitch="ignore"
|
|
103
|
-
paused={ ! isFullScreen }
|
|
104
|
-
onLayout={ this.onVideoLayout }
|
|
105
|
-
onFullscreenPlayerWillPresent={ () => {
|
|
106
|
-
this.setState( { isFullScreen: true } );
|
|
107
|
-
} }
|
|
108
|
-
onFullscreenPlayerDidDismiss={ () => {
|
|
109
|
-
this.setState( { isFullScreen: false } );
|
|
110
|
-
} }
|
|
111
|
-
/>
|
|
112
|
-
{ showPlayButton && (
|
|
113
|
-
// If we add the play icon as a subview to VideoPlayer then react-native-video decides to show control buttons
|
|
114
|
-
// even if we set controls={ false }, so we are adding our play button as a sibling overlay view.
|
|
115
|
-
<TouchableOpacity
|
|
116
|
-
disabled={ ! isSelected }
|
|
117
|
-
onPress={ this.onPressPlay }
|
|
118
|
-
style={ [ style, styles.overlayContainer ] }
|
|
119
|
-
>
|
|
120
|
-
<View style={ styles.blackOverlay } />
|
|
121
|
-
<WCIcon
|
|
122
|
-
icon={ PlayIcon }
|
|
123
|
-
style={ styles.playIcon }
|
|
124
|
-
size={ styles.playIcon.size }
|
|
125
|
-
/>
|
|
126
|
-
</TouchableOpacity>
|
|
127
|
-
) }
|
|
128
|
-
</View>
|
|
129
|
-
);
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
export default Video;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
// @format
|
|
2
|
-
|
|
3
|
-
$play-icon-size: 50;
|
|
4
|
-
|
|
5
|
-
.videoContainer {
|
|
6
|
-
flex: 1;
|
|
7
|
-
justify-content: center;
|
|
8
|
-
align-items: center;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.overlayContainer {
|
|
12
|
-
justify-content: center;
|
|
13
|
-
align-items: center;
|
|
14
|
-
align-self: center;
|
|
15
|
-
position: absolute;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.blackOverlay {
|
|
19
|
-
width: 100%;
|
|
20
|
-
height: 100%;
|
|
21
|
-
background-color: $black;
|
|
22
|
-
opacity: 0.4;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.playIcon {
|
|
26
|
-
position: absolute;
|
|
27
|
-
opacity: 0.7;
|
|
28
|
-
size: 64;
|
|
29
|
-
}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { View, Text } from 'react-native';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* WordPress dependencies
|
|
8
|
-
*/
|
|
9
|
-
import { Icon as WCIcon } from '@wordpress/components';
|
|
10
|
-
import { withPreferredColorScheme } from '@wordpress/compose';
|
|
11
|
-
import { normalizeIconObject } from '@wordpress/blocks';
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Internal dependencies
|
|
15
|
-
*/
|
|
16
|
-
import styles from './style.scss';
|
|
17
|
-
|
|
18
|
-
function Warning( {
|
|
19
|
-
actions,
|
|
20
|
-
title,
|
|
21
|
-
message,
|
|
22
|
-
icon,
|
|
23
|
-
iconClass,
|
|
24
|
-
preferredColorScheme,
|
|
25
|
-
getStylesFromColorScheme,
|
|
26
|
-
containerStyle: extraContainerStyle,
|
|
27
|
-
titleStyle: extraTitleStyle,
|
|
28
|
-
messageStyle: extraMessageStyle,
|
|
29
|
-
...viewProps
|
|
30
|
-
} ) {
|
|
31
|
-
icon = icon && normalizeIconObject( icon );
|
|
32
|
-
const internalIconClass = 'warning-icon' + '-' + preferredColorScheme;
|
|
33
|
-
|
|
34
|
-
const containerStyle = [
|
|
35
|
-
getStylesFromColorScheme( styles.container, styles.containerDark ),
|
|
36
|
-
extraContainerStyle,
|
|
37
|
-
];
|
|
38
|
-
const titleStyle = [
|
|
39
|
-
getStylesFromColorScheme( styles.title, styles.titleDark ),
|
|
40
|
-
extraTitleStyle,
|
|
41
|
-
];
|
|
42
|
-
const messageStyle = [
|
|
43
|
-
getStylesFromColorScheme( styles.message, styles.messageDark ),
|
|
44
|
-
extraMessageStyle,
|
|
45
|
-
];
|
|
46
|
-
|
|
47
|
-
return (
|
|
48
|
-
<View style={ containerStyle } { ...viewProps }>
|
|
49
|
-
{ icon && (
|
|
50
|
-
<View style={ styles.icon }>
|
|
51
|
-
<WCIcon
|
|
52
|
-
className={ iconClass || internalIconClass }
|
|
53
|
-
icon={ icon && icon.src ? icon.src : icon }
|
|
54
|
-
/>
|
|
55
|
-
</View>
|
|
56
|
-
) }
|
|
57
|
-
{ title && <Text style={ titleStyle }>{ title }</Text> }
|
|
58
|
-
{ message && <Text style={ messageStyle }>{ message }</Text> }
|
|
59
|
-
{ actions }
|
|
60
|
-
</View>
|
|
61
|
-
);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export default withPreferredColorScheme( Warning );
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/** @format */
|
|
2
|
-
|
|
3
|
-
.container {
|
|
4
|
-
background-color: $gray-lighten-30;
|
|
5
|
-
padding-top: 24;
|
|
6
|
-
padding-bottom: 24;
|
|
7
|
-
padding-left: 8;
|
|
8
|
-
padding-right: 8;
|
|
9
|
-
border-top-left-radius: 4;
|
|
10
|
-
border-top-right-radius: 4;
|
|
11
|
-
border-bottom-left-radius: 4;
|
|
12
|
-
border-bottom-right-radius: 4;
|
|
13
|
-
align-items: center;
|
|
14
|
-
justify-content: center;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.containerDark {
|
|
18
|
-
background-color: $background-dark-secondary;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.icon {
|
|
22
|
-
width: 24px;
|
|
23
|
-
height: 24px;
|
|
24
|
-
margin-bottom: 4;
|
|
25
|
-
fill: $gray-dark;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.title {
|
|
29
|
-
text-align: center;
|
|
30
|
-
margin-bottom: 6;
|
|
31
|
-
font-size: 14;
|
|
32
|
-
color: $gray-dark;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.titleDark {
|
|
36
|
-
color: $white;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.message {
|
|
40
|
-
text-align: center;
|
|
41
|
-
color: $gray-text-min;
|
|
42
|
-
font-size: 12;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.messageDark {
|
|
46
|
-
color: $white;
|
|
47
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { addFilter } from '@wordpress/hooks';
|
|
5
|
-
import { hasBlockSupport } from '@wordpress/blocks';
|
|
6
|
-
import { WIDE_ALIGNMENTS } from '@wordpress/components';
|
|
7
|
-
|
|
8
|
-
const ALIGNMENTS = [ 'left', 'center', 'right' ];
|
|
9
|
-
|
|
10
|
-
export * from './align.js';
|
|
11
|
-
export { default } from './align.js';
|
|
12
|
-
|
|
13
|
-
// Used to filter out blocks that don't support wide/full alignment on mobile
|
|
14
|
-
addFilter(
|
|
15
|
-
'blocks.registerBlockType',
|
|
16
|
-
'core/react-native-editor/align',
|
|
17
|
-
( settings, name ) => {
|
|
18
|
-
if (
|
|
19
|
-
WIDE_ALIGNMENTS.excludeBlocks.includes( name ) &&
|
|
20
|
-
hasBlockSupport( settings, 'align' )
|
|
21
|
-
) {
|
|
22
|
-
const blockAlign = settings.supports.align;
|
|
23
|
-
|
|
24
|
-
settings.supports = {
|
|
25
|
-
...settings.supports,
|
|
26
|
-
align: Array.isArray( blockAlign )
|
|
27
|
-
? blockAlign.filter(
|
|
28
|
-
( alignment ) =>
|
|
29
|
-
! Object.values(
|
|
30
|
-
WIDE_ALIGNMENTS.alignments
|
|
31
|
-
).includes( alignment )
|
|
32
|
-
)
|
|
33
|
-
: blockAlign,
|
|
34
|
-
alignWide: false,
|
|
35
|
-
};
|
|
36
|
-
settings.attributes = {
|
|
37
|
-
...settings.attributes,
|
|
38
|
-
align: {
|
|
39
|
-
type: 'string',
|
|
40
|
-
// Allow for '' since it is used by the `updateAlignment` function
|
|
41
|
-
// in toolbar controls for special cases with defined default values.
|
|
42
|
-
enum: [ ...ALIGNMENTS, '' ],
|
|
43
|
-
},
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
return settings;
|
|
48
|
-
}
|
|
49
|
-
);
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
|
-
import clsx from 'clsx';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* WordPress dependencies
|
|
8
|
-
*/
|
|
9
|
-
import { addFilter } from '@wordpress/hooks';
|
|
10
|
-
import { hasBlockSupport } from '@wordpress/blocks';
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Filters registered block settings, extending attributes to include `className`.
|
|
14
|
-
*
|
|
15
|
-
* @param {Object} settings Original block settings.
|
|
16
|
-
*
|
|
17
|
-
* @return {Object} Filtered block settings.
|
|
18
|
-
*/
|
|
19
|
-
export function addAttribute( settings ) {
|
|
20
|
-
if ( hasBlockSupport( settings, 'customClassName', true ) ) {
|
|
21
|
-
// Gracefully handle if settings.attributes is undefined.
|
|
22
|
-
settings.attributes = {
|
|
23
|
-
...settings.attributes,
|
|
24
|
-
className: {
|
|
25
|
-
type: 'string',
|
|
26
|
-
},
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
return settings;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Override props assigned to save component to inject the className, if block
|
|
35
|
-
* supports customClassName. This is only applied if the block's save result is an
|
|
36
|
-
* element and not a markup string.
|
|
37
|
-
*
|
|
38
|
-
* @param {Object} extraProps Additional props applied to save element.
|
|
39
|
-
* @param {Object} blockType Block type.
|
|
40
|
-
* @param {Object} attributes Current block attributes.
|
|
41
|
-
*
|
|
42
|
-
* @return {Object} Filtered props applied to save element.
|
|
43
|
-
*/
|
|
44
|
-
export function addSaveProps( extraProps, blockType, attributes ) {
|
|
45
|
-
if (
|
|
46
|
-
hasBlockSupport( blockType, 'customClassName', true ) &&
|
|
47
|
-
attributes.className
|
|
48
|
-
) {
|
|
49
|
-
extraProps.className = clsx(
|
|
50
|
-
extraProps.className,
|
|
51
|
-
attributes.className
|
|
52
|
-
);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
return extraProps;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
addFilter(
|
|
59
|
-
'blocks.registerBlockType',
|
|
60
|
-
'core/custom-class-name/attribute',
|
|
61
|
-
addAttribute
|
|
62
|
-
);
|
|
63
|
-
|
|
64
|
-
export default {
|
|
65
|
-
addSaveProps,
|
|
66
|
-
attributeKeys: [ 'className' ],
|
|
67
|
-
hasSupport( name ) {
|
|
68
|
-
return hasBlockSupport( name, 'customClassName', true );
|
|
69
|
-
},
|
|
70
|
-
};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Internal dependencies
|
|
3
|
-
*/
|
|
4
|
-
import {
|
|
5
|
-
createBlockEditFilter,
|
|
6
|
-
createBlockListBlockFilter,
|
|
7
|
-
createBlockSaveFilter,
|
|
8
|
-
} from './utils';
|
|
9
|
-
import './compat';
|
|
10
|
-
import align from './align';
|
|
11
|
-
import anchor from './anchor';
|
|
12
|
-
import customClassName from './custom-class-name';
|
|
13
|
-
import './generated-class-name';
|
|
14
|
-
import style from './style';
|
|
15
|
-
import color from './color';
|
|
16
|
-
import fontSize from './font-size';
|
|
17
|
-
import './layout';
|
|
18
|
-
|
|
19
|
-
createBlockEditFilter( [ align, anchor, style ] );
|
|
20
|
-
createBlockListBlockFilter( [ align, style, color, fontSize ] );
|
|
21
|
-
createBlockSaveFilter( [
|
|
22
|
-
align,
|
|
23
|
-
anchor,
|
|
24
|
-
customClassName,
|
|
25
|
-
color,
|
|
26
|
-
style,
|
|
27
|
-
fontSize,
|
|
28
|
-
] );
|
|
29
|
-
|
|
30
|
-
export { getBorderClassesAndStyles, useBorderProps } from './use-border-props';
|
|
31
|
-
export { getShadowClassesAndStyles } from './use-shadow-props';
|
|
32
|
-
export { getColorClassesAndStyles, useColorProps } from './use-color-props';
|
|
33
|
-
export { getSpacingClassesAndStyles } from './use-spacing-props';
|
|
34
|
-
export { useCachedTruthy } from './use-cached-truthy';
|
|
35
|
-
export { useEditorWrapperStyles } from './use-editor-wrapper-styles';
|
|
36
|
-
export { getTypographyClassesAndStyles } from './use-typography-props';
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { removeFilter } from '@wordpress/hooks';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Internal dependencies
|
|
8
|
-
*/
|
|
9
|
-
import './layout.js';
|
|
10
|
-
|
|
11
|
-
// This filter is removed because layout styles shouldn't be added
|
|
12
|
-
// until layout types are supported in the native version.
|
|
13
|
-
removeFilter(
|
|
14
|
-
'editor.BlockListBlock',
|
|
15
|
-
'core/editor/layout/with-layout-styles'
|
|
16
|
-
);
|
|
17
|
-
|
|
18
|
-
// This filter is removed because the layout controls shouldn't be
|
|
19
|
-
// enabled until layout types are supported in the native version.
|
|
20
|
-
removeFilter(
|
|
21
|
-
'editor.BlockEdit',
|
|
22
|
-
'core/editor/layout/with-inspector-controls'
|
|
23
|
-
);
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`Align options for group block sets Full width option 1`] = `
|
|
4
|
-
"<!-- wp:group {"align":"full","layout":{"type":"constrained"}} -->
|
|
5
|
-
<div class="wp-block-group alignfull"></div>
|
|
6
|
-
<!-- /wp:group -->"
|
|
7
|
-
`;
|
|
8
|
-
|
|
9
|
-
exports[`Align options for group block sets None option 1`] = `
|
|
10
|
-
"<!-- wp:group {"layout":{"type":"constrained"}} -->
|
|
11
|
-
<div class="wp-block-group"></div>
|
|
12
|
-
<!-- /wp:group -->"
|
|
13
|
-
`;
|
|
14
|
-
|
|
15
|
-
exports[`Align options for group block sets Wide width option 1`] = `
|
|
16
|
-
"<!-- wp:group {"align":"wide","layout":{"type":"constrained"}} -->
|
|
17
|
-
<div class="wp-block-group alignwide"></div>
|
|
18
|
-
<!-- /wp:group -->"
|
|
19
|
-
`;
|
|
20
|
-
|
|
21
|
-
exports[`Align options for media block sets Align center option 1`] = `
|
|
22
|
-
"<!-- wp:image {"id":1,"sizeSlug":"large","linkDestination":"none","align":"center"} -->
|
|
23
|
-
<figure class="wp-block-image aligncenter size-large"><img src="https://test-site.files.wordpress.com/local-image-1.jpeg" alt="" class="wp-image-1"/></figure>
|
|
24
|
-
<!-- /wp:image -->"
|
|
25
|
-
`;
|
|
26
|
-
|
|
27
|
-
exports[`Align options for media block sets Align left option 1`] = `
|
|
28
|
-
"<!-- wp:image {"id":1,"sizeSlug":"large","linkDestination":"none","align":"left"} -->
|
|
29
|
-
<figure class="wp-block-image alignleft size-large"><img src="https://test-site.files.wordpress.com/local-image-1.jpeg" alt="" class="wp-image-1"/></figure>
|
|
30
|
-
<!-- /wp:image -->"
|
|
31
|
-
`;
|
|
32
|
-
|
|
33
|
-
exports[`Align options for media block sets Align right option 1`] = `
|
|
34
|
-
"<!-- wp:image {"id":1,"sizeSlug":"large","linkDestination":"none","align":"right"} -->
|
|
35
|
-
<figure class="wp-block-image alignright size-large"><img src="https://test-site.files.wordpress.com/local-image-1.jpeg" alt="" class="wp-image-1"/></figure>
|
|
36
|
-
<!-- /wp:image -->"
|
|
37
|
-
`;
|
|
38
|
-
|
|
39
|
-
exports[`Align options for media block sets Full width option 1`] = `
|
|
40
|
-
"<!-- wp:image {"id":1,"sizeSlug":"large","linkDestination":"none","align":"full"} -->
|
|
41
|
-
<figure class="wp-block-image alignfull size-large"><img src="https://test-site.files.wordpress.com/local-image-1.jpeg" alt="" class="wp-image-1"/></figure>
|
|
42
|
-
<!-- /wp:image -->"
|
|
43
|
-
`;
|
|
44
|
-
|
|
45
|
-
exports[`Align options for media block sets None option 1`] = `
|
|
46
|
-
"<!-- wp:image {"id":1,"sizeSlug":"large","linkDestination":"none"} -->
|
|
47
|
-
<figure class="wp-block-image size-large"><img src="https://test-site.files.wordpress.com/local-image-1.jpeg" alt="" class="wp-image-1"/></figure>
|
|
48
|
-
<!-- /wp:image -->"
|
|
49
|
-
`;
|
|
50
|
-
|
|
51
|
-
exports[`Align options for media block sets Wide width option 1`] = `
|
|
52
|
-
"<!-- wp:image {"id":1,"sizeSlug":"large","linkDestination":"none","align":"wide"} -->
|
|
53
|
-
<figure class="wp-block-image alignwide size-large"><img src="https://test-site.files.wordpress.com/local-image-1.jpeg" alt="" class="wp-image-1"/></figure>
|
|
54
|
-
<!-- /wp:image -->"
|
|
55
|
-
`;
|
|
56
|
-
|
|
57
|
-
exports[`Align options for text block sets Align text center option 1`] = `
|
|
58
|
-
"<!-- wp:paragraph {"align":"center"} -->
|
|
59
|
-
<p class="has-text-align-center"></p>
|
|
60
|
-
<!-- /wp:paragraph -->"
|
|
61
|
-
`;
|
|
62
|
-
|
|
63
|
-
exports[`Align options for text block sets Align text left option 1`] = `
|
|
64
|
-
"<!-- wp:paragraph {"align":"left"} -->
|
|
65
|
-
<p class="has-text-align-left"></p>
|
|
66
|
-
<!-- /wp:paragraph -->"
|
|
67
|
-
`;
|
|
68
|
-
|
|
69
|
-
exports[`Align options for text block sets Align text right option 1`] = `
|
|
70
|
-
"<!-- wp:paragraph {"align":"right"} -->
|
|
71
|
-
<p class="has-text-align-right"></p>
|
|
72
|
-
<!-- /wp:paragraph -->"
|
|
73
|
-
`;
|