@wordpress/block-editor 12.1.0 → 12.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/build/autocompleters/block.js +13 -5
- package/build/autocompleters/block.js.map +1 -1
- package/build/components/block-breadcrumb/index.js +6 -3
- package/build/components/block-breadcrumb/index.js.map +1 -1
- package/build/components/block-editing-mode/index.js +84 -0
- package/build/components/block-editing-mode/index.js.map +1 -0
- package/build/components/block-list/block-list-block-context.js +15 -0
- package/build/components/block-list/block-list-block-context.js.map +1 -0
- package/build/components/block-list/block.js +29 -37
- package/build/components/block-list/block.js.map +1 -1
- package/build/components/block-list/block.native.js +14 -22
- package/build/components/block-list/block.native.js.map +1 -1
- package/build/components/block-list/index.native.js +107 -108
- package/build/components/block-list/index.native.js.map +1 -1
- package/build/components/block-list/use-block-props/index.js +2 -2
- package/build/components/block-list/use-block-props/index.js.map +1 -1
- package/build/components/block-list/use-in-between-inserter.js +7 -5
- package/build/components/block-list/use-in-between-inserter.js.map +1 -1
- package/build/components/block-list-appender/index.js +15 -1
- package/build/components/block-list-appender/index.js.map +1 -1
- package/build/components/block-mobile-toolbar/block-actions-menu.native.js +19 -4
- package/build/components/block-mobile-toolbar/block-actions-menu.native.js.map +1 -1
- package/build/components/block-styles/preview-panel.js +1 -2
- package/build/components/block-styles/preview-panel.js.map +1 -1
- package/build/components/block-switcher/block-transformations-menu.js +8 -0
- package/build/components/block-switcher/block-transformations-menu.js.map +1 -1
- package/build/components/block-switcher/block-variation-transformations.js +125 -0
- package/build/components/block-switcher/block-variation-transformations.js.map +1 -0
- package/build/components/block-switcher/index.js +34 -12
- package/build/components/block-switcher/index.js.map +1 -1
- package/build/components/block-switcher/pattern-transformations-menu.js +3 -3
- package/build/components/block-switcher/pattern-transformations-menu.js.map +1 -1
- package/build/components/block-toolbar/index.js +9 -7
- package/build/components/block-toolbar/index.js.map +1 -1
- package/build/components/block-tools/block-contextual-toolbar.js +5 -3
- package/build/components/block-tools/block-contextual-toolbar.js.map +1 -1
- package/build/components/block-tools/insertion-point.js +11 -5
- package/build/components/block-tools/insertion-point.js.map +1 -1
- package/build/components/convert-to-group-buttons/index.js +7 -2
- package/build/components/convert-to-group-buttons/index.js.map +1 -1
- package/build/components/convert-to-group-buttons/index.native.js +87 -3
- package/build/components/convert-to-group-buttons/index.native.js.map +1 -1
- package/build/components/convert-to-group-buttons/use-convert-to-group-button-props.js +23 -37
- package/build/components/convert-to-group-buttons/use-convert-to-group-button-props.js.map +1 -1
- package/build/components/global-styles/dimensions-panel.js +3 -2
- package/build/components/global-styles/dimensions-panel.js.map +1 -1
- package/build/components/iframe/index.js +14 -7
- package/build/components/iframe/index.js.map +1 -1
- package/build/components/inner-blocks/index.js +2 -1
- package/build/components/inner-blocks/index.js.map +1 -1
- package/build/components/inner-blocks/index.native.js +7 -7
- package/build/components/inner-blocks/index.native.js.map +1 -1
- package/build/components/inner-blocks/use-nested-settings-update.js +13 -5
- package/build/components/inner-blocks/use-nested-settings-update.js.map +1 -1
- package/build/components/inserter/index.js +3 -7
- package/build/components/inserter/index.js.map +1 -1
- package/build/components/inserter/quick-inserter.js +2 -4
- package/build/components/inserter/quick-inserter.js.map +1 -1
- package/build/components/inserter/search-results.js +19 -6
- package/build/components/inserter/search-results.js.map +1 -1
- package/build/components/list-view/appender.js +6 -1
- package/build/components/list-view/appender.js.map +1 -1
- package/build/components/list-view/block-contents.js +4 -2
- package/build/components/list-view/block-contents.js.map +1 -1
- package/build/components/list-view/block.js +21 -25
- package/build/components/list-view/block.js.map +1 -1
- package/build/components/list-view/branch.js +1 -3
- package/build/components/list-view/branch.js.map +1 -1
- package/build/components/list-view/index.js +14 -7
- package/build/components/list-view/index.js.map +1 -1
- package/build/components/list-view/use-list-view-client-ids.js +27 -3
- package/build/components/list-view/use-list-view-client-ids.js.map +1 -1
- package/build/components/publish-date-time-picker/index.js +0 -2
- package/build/components/publish-date-time-picker/index.js.map +1 -1
- package/build/components/url-input/index.js +3 -0
- package/build/components/url-input/index.js.map +1 -1
- package/build/components/use-block-drop-zone/index.js +25 -15
- package/build/components/use-block-drop-zone/index.js.map +1 -1
- package/build/components/use-resize-canvas/index.js +8 -1
- package/build/components/use-resize-canvas/index.js.map +1 -1
- package/build/components/writing-flow/use-arrow-nav.js +13 -7
- package/build/components/writing-flow/use-arrow-nav.js.map +1 -1
- package/build/hooks/align.js +3 -7
- package/build/hooks/align.js.map +1 -1
- package/build/hooks/behaviors.js +115 -0
- package/build/hooks/behaviors.js.map +1 -0
- package/build/hooks/dimensions.js +0 -30
- package/build/hooks/dimensions.js.map +1 -1
- package/build/hooks/duotone.js +4 -8
- package/build/hooks/duotone.js.map +1 -1
- package/build/hooks/index.js +2 -0
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/layout.js +8 -9
- package/build/hooks/layout.js.map +1 -1
- package/build/private-apis.js +4 -7
- package/build/private-apis.js.map +1 -1
- package/build/store/private-actions.js +46 -0
- package/build/store/private-actions.js.map +1 -1
- package/build/store/private-selectors.js +88 -0
- package/build/store/private-selectors.js.map +1 -1
- package/build/store/reducer.js +36 -1
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +28 -18
- package/build/store/selectors.js.map +1 -1
- package/build/utils/order-inserter-block-items.js +41 -0
- package/build/utils/order-inserter-block-items.js.map +1 -0
- package/build-module/autocompleters/block.js +12 -5
- package/build-module/autocompleters/block.js.map +1 -1
- package/build-module/components/block-breadcrumb/index.js +5 -3
- package/build-module/components/block-breadcrumb/index.js.map +1 -1
- package/build-module/components/block-editing-mode/index.js +72 -0
- package/build-module/components/block-editing-mode/index.js.map +1 -0
- package/build-module/components/block-list/block-list-block-context.js +6 -0
- package/build-module/components/block-list/block-list-block-context.js.map +1 -0
- package/build-module/components/block-list/block.js +26 -34
- package/build-module/components/block-list/block.js.map +1 -1
- package/build-module/components/block-list/block.native.js +14 -22
- package/build-module/components/block-list/block.native.js.map +1 -1
- package/build-module/components/block-list/index.native.js +108 -110
- package/build-module/components/block-list/index.native.js.map +1 -1
- package/build-module/components/block-list/use-block-props/index.js +1 -1
- package/build-module/components/block-list/use-block-props/index.js.map +1 -1
- package/build-module/components/block-list/use-in-between-inserter.js +6 -5
- package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
- package/build-module/components/block-list-appender/index.js +15 -1
- package/build-module/components/block-list-appender/index.js.map +1 -1
- package/build-module/components/block-mobile-toolbar/block-actions-menu.native.js +18 -4
- package/build-module/components/block-mobile-toolbar/block-actions-menu.native.js.map +1 -1
- package/build-module/components/block-styles/preview-panel.js +1 -2
- package/build-module/components/block-styles/preview-panel.js.map +1 -1
- package/build-module/components/block-switcher/block-transformations-menu.js +7 -0
- package/build-module/components/block-switcher/block-transformations-menu.js.map +1 -1
- package/build-module/components/block-switcher/block-variation-transformations.js +108 -0
- package/build-module/components/block-switcher/block-variation-transformations.js.map +1 -0
- package/build-module/components/block-switcher/index.js +33 -12
- package/build-module/components/block-switcher/index.js.map +1 -1
- package/build-module/components/block-switcher/pattern-transformations-menu.js +3 -3
- package/build-module/components/block-switcher/pattern-transformations-menu.js.map +1 -1
- package/build-module/components/block-toolbar/index.js +8 -7
- package/build-module/components/block-toolbar/index.js.map +1 -1
- package/build-module/components/block-tools/block-contextual-toolbar.js +4 -3
- package/build-module/components/block-tools/block-contextual-toolbar.js.map +1 -1
- package/build-module/components/block-tools/insertion-point.js +11 -5
- package/build-module/components/block-tools/insertion-point.js.map +1 -1
- package/build-module/components/convert-to-group-buttons/index.js +7 -2
- package/build-module/components/convert-to-group-buttons/index.js.map +1 -1
- package/build-module/components/convert-to-group-buttons/index.native.js +76 -1
- package/build-module/components/convert-to-group-buttons/index.native.js.map +1 -1
- package/build-module/components/convert-to-group-buttons/use-convert-to-group-button-props.js +22 -36
- package/build-module/components/convert-to-group-buttons/use-convert-to-group-button-props.js.map +1 -1
- package/build-module/components/global-styles/dimensions-panel.js +3 -2
- package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
- package/build-module/components/iframe/index.js +15 -8
- package/build-module/components/iframe/index.js.map +1 -1
- package/build-module/components/inner-blocks/index.js +2 -1
- package/build-module/components/inner-blocks/index.js.map +1 -1
- package/build-module/components/inner-blocks/index.native.js +7 -6
- package/build-module/components/inner-blocks/index.native.js.map +1 -1
- package/build-module/components/inner-blocks/use-nested-settings-update.js +13 -5
- package/build-module/components/inner-blocks/use-nested-settings-update.js.map +1 -1
- package/build-module/components/inserter/index.js +3 -7
- package/build-module/components/inserter/index.js.map +1 -1
- package/build-module/components/inserter/quick-inserter.js +2 -4
- package/build-module/components/inserter/quick-inserter.js.map +1 -1
- package/build-module/components/inserter/search-results.js +16 -6
- package/build-module/components/inserter/search-results.js.map +1 -1
- package/build-module/components/list-view/appender.js +6 -2
- package/build-module/components/list-view/appender.js.map +1 -1
- package/build-module/components/list-view/block-contents.js +4 -2
- package/build-module/components/list-view/block-contents.js.map +1 -1
- package/build-module/components/list-view/block.js +20 -25
- package/build-module/components/list-view/block.js.map +1 -1
- package/build-module/components/list-view/branch.js +1 -3
- package/build-module/components/list-view/branch.js.map +1 -1
- package/build-module/components/list-view/index.js +15 -8
- package/build-module/components/list-view/index.js.map +1 -1
- package/build-module/components/list-view/use-list-view-client-ids.js +26 -3
- package/build-module/components/list-view/use-list-view-client-ids.js.map +1 -1
- package/build-module/components/publish-date-time-picker/index.js +0 -2
- package/build-module/components/publish-date-time-picker/index.js.map +1 -1
- package/build-module/components/url-input/index.js +3 -0
- package/build-module/components/url-input/index.js.map +1 -1
- package/build-module/components/use-block-drop-zone/index.js +25 -16
- package/build-module/components/use-block-drop-zone/index.js.map +1 -1
- package/build-module/components/use-resize-canvas/index.js +8 -1
- package/build-module/components/use-resize-canvas/index.js.map +1 -1
- package/build-module/components/writing-flow/use-arrow-nav.js +13 -7
- package/build-module/components/writing-flow/use-arrow-nav.js.map +1 -1
- package/build-module/hooks/align.js +3 -6
- package/build-module/hooks/align.js.map +1 -1
- package/build-module/hooks/behaviors.js +97 -0
- package/build-module/hooks/behaviors.js.map +1 -0
- package/build-module/hooks/dimensions.js +0 -28
- package/build-module/hooks/dimensions.js.map +1 -1
- package/build-module/hooks/duotone.js +3 -6
- package/build-module/hooks/duotone.js.map +1 -1
- package/build-module/hooks/index.js +1 -0
- package/build-module/hooks/index.js.map +1 -1
- package/build-module/hooks/layout.js +7 -9
- package/build-module/hooks/layout.js.map +1 -1
- package/build-module/private-apis.js +3 -5
- package/build-module/private-apis.js.map +1 -1
- package/build-module/store/private-actions.js +42 -0
- package/build-module/store/private-actions.js.map +1 -1
- package/build-module/store/private-selectors.js +79 -0
- package/build-module/store/private-selectors.js.map +1 -1
- package/build-module/store/reducer.js +34 -1
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +26 -17
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/utils/order-inserter-block-items.js +32 -0
- package/build-module/utils/order-inserter-block-items.js.map +1 -0
- package/build-style/content-rtl.css +32 -13
- package/build-style/content.css +32 -13
- package/build-style/default-editor-styles-rtl.css +1 -1
- package/build-style/default-editor-styles.css +1 -1
- package/build-style/style-rtl.css +19 -64
- package/build-style/style.css +20 -64
- package/package.json +32 -31
- package/src/autocompleters/block.js +15 -7
- package/src/components/block-breadcrumb/index.js +11 -3
- package/src/components/block-editing-mode/index.js +71 -0
- package/src/components/block-list/block-list-block-context.js +6 -0
- package/src/components/block-list/block.js +38 -56
- package/src/components/block-list/block.native.js +30 -41
- package/src/components/block-list/content.scss +5 -5
- package/src/components/block-list/index.native.js +164 -153
- package/src/components/block-list/test/index.native.js +2 -2
- package/src/components/block-list/use-block-props/index.js +1 -1
- package/src/components/block-list/use-in-between-inserter.js +7 -3
- package/src/components/block-list-appender/index.js +22 -4
- package/src/components/block-mobile-toolbar/block-actions-menu.native.js +23 -0
- package/src/components/block-mover/style.scss +1 -0
- package/src/components/block-styles/preview-panel.js +1 -3
- package/src/components/block-switcher/block-transformations-menu.js +12 -0
- package/src/components/block-switcher/block-variation-transformations.js +115 -0
- package/src/components/block-switcher/index.js +38 -5
- package/src/components/block-switcher/pattern-transformations-menu.js +5 -5
- package/src/components/block-switcher/style.scss +6 -5
- package/src/components/block-toolbar/index.js +10 -11
- package/src/components/block-tools/block-contextual-toolbar.js +4 -5
- package/src/components/block-tools/insertion-point.js +23 -9
- package/src/components/button-block-appender/content.scss +22 -0
- package/src/components/convert-to-group-buttons/index.js +9 -2
- package/src/components/convert-to-group-buttons/index.native.js +79 -1
- package/src/components/convert-to-group-buttons/use-convert-to-group-button-props.js +32 -38
- package/src/components/global-styles/dimensions-panel.js +3 -2
- package/src/components/global-styles/style.scss +3 -0
- package/src/components/iframe/index.js +22 -12
- package/src/components/inner-blocks/README.md +5 -0
- package/src/components/inner-blocks/index.js +2 -0
- package/src/components/inner-blocks/index.native.js +16 -6
- package/src/components/inner-blocks/use-nested-settings-update.js +20 -3
- package/src/components/inserter/index.js +1 -9
- package/src/components/inserter/quick-inserter.js +0 -2
- package/src/components/inserter/search-results.js +32 -6
- package/src/components/list-view/appender.js +3 -2
- package/src/components/list-view/block-contents.js +8 -2
- package/src/components/list-view/block.js +29 -35
- package/src/components/list-view/branch.js +1 -7
- package/src/components/list-view/index.js +17 -4
- package/src/components/list-view/style.scss +2 -5
- package/src/components/list-view/use-list-view-client-ids.js +21 -4
- package/src/components/publish-date-time-picker/index.js +0 -2
- package/src/components/url-input/README.md +6 -0
- package/src/components/url-input/index.js +1 -0
- package/src/components/use-block-drop-zone/index.js +31 -17
- package/src/components/use-resize-canvas/index.js +9 -1
- package/src/components/writing-flow/test/index.js +15 -0
- package/src/components/writing-flow/use-arrow-nav.js +17 -4
- package/src/hooks/align.js +3 -11
- package/src/hooks/behaviors.js +104 -0
- package/src/hooks/dimensions.js +0 -40
- package/src/hooks/duotone.js +3 -11
- package/src/hooks/index.js +1 -0
- package/src/hooks/layout.js +10 -18
- package/src/private-apis.js +2 -4
- package/src/store/private-actions.js +39 -0
- package/src/store/private-selectors.js +95 -0
- package/src/store/reducer.js +27 -0
- package/src/store/selectors.js +25 -15
- package/src/store/test/private-actions.js +32 -1
- package/src/store/test/private-selectors.js +158 -0
- package/src/store/test/reducer.js +48 -0
- package/src/style.scss +0 -3
- package/src/utils/order-inserter-block-items.js +26 -0
- package/build/components/block-list/block-list-compact.native.js +0 -75
- package/build/components/block-list/block-list-compact.native.js.map +0 -1
- package/build/components/off-canvas-editor/appender.js +0 -125
- package/build/components/off-canvas-editor/appender.js.map +0 -1
- package/build/components/off-canvas-editor/block-contents.js +0 -141
- package/build/components/off-canvas-editor/block-contents.js.map +0 -1
- package/build/components/off-canvas-editor/block-select-button.js +0 -126
- package/build/components/off-canvas-editor/block-select-button.js.map +0 -1
- package/build/components/off-canvas-editor/block.js +0 -297
- package/build/components/off-canvas-editor/block.js.map +0 -1
- package/build/components/off-canvas-editor/branch.js +0 -197
- package/build/components/off-canvas-editor/branch.js.map +0 -1
- package/build/components/off-canvas-editor/context.js +0 -19
- package/build/components/off-canvas-editor/context.js.map +0 -1
- package/build/components/off-canvas-editor/drop-indicator.js +0 -118
- package/build/components/off-canvas-editor/drop-indicator.js.map +0 -1
- package/build/components/off-canvas-editor/expander.js +0 -41
- package/build/components/off-canvas-editor/expander.js.map +0 -1
- package/build/components/off-canvas-editor/index.js +0 -236
- package/build/components/off-canvas-editor/index.js.map +0 -1
- package/build/components/off-canvas-editor/leaf-more-menu.js +0 -148
- package/build/components/off-canvas-editor/leaf-more-menu.js.map +0 -1
- package/build/components/off-canvas-editor/leaf.js +0 -60
- package/build/components/off-canvas-editor/leaf.js.map +0 -1
- package/build/components/off-canvas-editor/link-ui.js +0 -186
- package/build/components/off-canvas-editor/link-ui.js.map +0 -1
- package/build/components/off-canvas-editor/update-attributes.js +0 -108
- package/build/components/off-canvas-editor/update-attributes.js.map +0 -1
- package/build/components/off-canvas-editor/use-block-selection.js +0 -139
- package/build/components/off-canvas-editor/use-block-selection.js.map +0 -1
- package/build/components/off-canvas-editor/use-inserted-block.js +0 -58
- package/build/components/off-canvas-editor/use-inserted-block.js.map +0 -1
- package/build/components/off-canvas-editor/use-list-view-client-ids.js +0 -33
- package/build/components/off-canvas-editor/use-list-view-client-ids.js.map +0 -1
- package/build/components/off-canvas-editor/use-list-view-drop-zone.js +0 -235
- package/build/components/off-canvas-editor/use-list-view-drop-zone.js.map +0 -1
- package/build/components/off-canvas-editor/use-list-view-expand-selected-item.js +0 -60
- package/build/components/off-canvas-editor/use-list-view-expand-selected-item.js.map +0 -1
- package/build/components/off-canvas-editor/utils.js +0 -60
- package/build/components/off-canvas-editor/utils.js.map +0 -1
- package/build-module/components/block-list/block-list-compact.native.js +0 -60
- package/build-module/components/block-list/block-list-compact.native.js.map +0 -1
- package/build-module/components/off-canvas-editor/appender.js +0 -108
- package/build-module/components/off-canvas-editor/appender.js.map +0 -1
- package/build-module/components/off-canvas-editor/block-contents.js +0 -121
- package/build-module/components/off-canvas-editor/block-contents.js.map +0 -1
- package/build-module/components/off-canvas-editor/block-select-button.js +0 -107
- package/build-module/components/off-canvas-editor/block-select-button.js.map +0 -1
- package/build-module/components/off-canvas-editor/block.js +0 -273
- package/build-module/components/off-canvas-editor/block.js.map +0 -1
- package/build-module/components/off-canvas-editor/branch.js +0 -179
- package/build-module/components/off-canvas-editor/branch.js.map +0 -1
- package/build-module/components/off-canvas-editor/context.js +0 -7
- package/build-module/components/off-canvas-editor/context.js.map +0 -1
- package/build-module/components/off-canvas-editor/drop-indicator.js +0 -111
- package/build-module/components/off-canvas-editor/drop-indicator.js.map +0 -1
- package/build-module/components/off-canvas-editor/expander.js +0 -32
- package/build-module/components/off-canvas-editor/expander.js.map +0 -1
- package/build-module/components/off-canvas-editor/index.js +0 -213
- package/build-module/components/off-canvas-editor/index.js.map +0 -1
- package/build-module/components/off-canvas-editor/leaf-more-menu.js +0 -130
- package/build-module/components/off-canvas-editor/leaf-more-menu.js.map +0 -1
- package/build-module/components/off-canvas-editor/leaf.js +0 -45
- package/build-module/components/off-canvas-editor/leaf.js.map +0 -1
- package/build-module/components/off-canvas-editor/link-ui.js +0 -166
- package/build-module/components/off-canvas-editor/link-ui.js.map +0 -1
- package/build-module/components/off-canvas-editor/update-attributes.js +0 -97
- package/build-module/components/off-canvas-editor/update-attributes.js.map +0 -1
- package/build-module/components/off-canvas-editor/use-block-selection.js +0 -124
- package/build-module/components/off-canvas-editor/use-block-selection.js.map +0 -1
- package/build-module/components/off-canvas-editor/use-inserted-block.js +0 -47
- package/build-module/components/off-canvas-editor/use-inserted-block.js.map +0 -1
- package/build-module/components/off-canvas-editor/use-list-view-client-ids.js +0 -24
- package/build-module/components/off-canvas-editor/use-list-view-client-ids.js.map +0 -1
- package/build-module/components/off-canvas-editor/use-list-view-drop-zone.js +0 -220
- package/build-module/components/off-canvas-editor/use-list-view-drop-zone.js.map +0 -1
- package/build-module/components/off-canvas-editor/use-list-view-expand-selected-item.js +0 -50
- package/build-module/components/off-canvas-editor/use-list-view-expand-selected-item.js.map +0 -1
- package/build-module/components/off-canvas-editor/utils.js +0 -44
- package/build-module/components/off-canvas-editor/utils.js.map +0 -1
- package/src/components/block-list/block-list-compact.native.js +0 -63
- package/src/components/off-canvas-editor/README.md +0 -5
- package/src/components/off-canvas-editor/appender.js +0 -124
- package/src/components/off-canvas-editor/block-contents.js +0 -156
- package/src/components/off-canvas-editor/block-select-button.js +0 -128
- package/src/components/off-canvas-editor/block.js +0 -347
- package/src/components/off-canvas-editor/branch.js +0 -238
- package/src/components/off-canvas-editor/context.js +0 -8
- package/src/components/off-canvas-editor/drop-indicator.js +0 -126
- package/src/components/off-canvas-editor/expander.js +0 -26
- package/src/components/off-canvas-editor/index.js +0 -271
- package/src/components/off-canvas-editor/leaf-more-menu.js +0 -158
- package/src/components/off-canvas-editor/leaf.js +0 -52
- package/src/components/off-canvas-editor/link-ui.js +0 -167
- package/src/components/off-canvas-editor/style.scss +0 -34
- package/src/components/off-canvas-editor/test/use-inserted-block.js +0 -108
- package/src/components/off-canvas-editor/test/utils.js +0 -50
- package/src/components/off-canvas-editor/update-attributes.js +0 -99
- package/src/components/off-canvas-editor/use-block-selection.js +0 -169
- package/src/components/off-canvas-editor/use-inserted-block.js +0 -47
- package/src/components/off-canvas-editor/use-list-view-client-ids.js +0 -29
- package/src/components/off-canvas-editor/use-list-view-drop-zone.js +0 -260
- package/src/components/off-canvas-editor/use-list-view-expand-selected-item.js +0 -58
- package/src/components/off-canvas-editor/utils.js +0 -58
package/src/store/reducer.js
CHANGED
|
@@ -1834,6 +1834,32 @@ export function temporarilyEditingAsBlocks( state = '', action ) {
|
|
|
1834
1834
|
return state;
|
|
1835
1835
|
}
|
|
1836
1836
|
|
|
1837
|
+
/**
|
|
1838
|
+
* Reducer returning a map of block client IDs to block editing modes.
|
|
1839
|
+
*
|
|
1840
|
+
* @param {Map} state Current state.
|
|
1841
|
+
* @param {Object} action Dispatched action.
|
|
1842
|
+
*
|
|
1843
|
+
* @return {Map} Updated state.
|
|
1844
|
+
*/
|
|
1845
|
+
export function blockEditingModes( state = new Map(), action ) {
|
|
1846
|
+
switch ( action.type ) {
|
|
1847
|
+
case 'SET_BLOCK_EDITING_MODE':
|
|
1848
|
+
return new Map( state ).set( action.clientId, action.mode );
|
|
1849
|
+
case 'UNSET_BLOCK_EDITING_MODE': {
|
|
1850
|
+
const newState = new Map( state );
|
|
1851
|
+
newState.delete( action.clientId );
|
|
1852
|
+
return newState;
|
|
1853
|
+
}
|
|
1854
|
+
case 'RESET_BLOCKS': {
|
|
1855
|
+
return state.has( '' )
|
|
1856
|
+
? new Map().set( '', state.get( '' ) )
|
|
1857
|
+
: state;
|
|
1858
|
+
}
|
|
1859
|
+
}
|
|
1860
|
+
return state;
|
|
1861
|
+
}
|
|
1862
|
+
|
|
1837
1863
|
const combinedReducers = combineReducers( {
|
|
1838
1864
|
blocks,
|
|
1839
1865
|
isTyping,
|
|
@@ -1856,6 +1882,7 @@ const combinedReducers = combineReducers( {
|
|
|
1856
1882
|
lastBlockInserted,
|
|
1857
1883
|
temporarilyEditingAsBlocks,
|
|
1858
1884
|
blockVisibility,
|
|
1885
|
+
blockEditingModes,
|
|
1859
1886
|
} );
|
|
1860
1887
|
|
|
1861
1888
|
function withAutomaticChangeReset( reducer ) {
|
package/src/store/selectors.js
CHANGED
|
@@ -18,7 +18,6 @@ import {
|
|
|
18
18
|
import { Platform } from '@wordpress/element';
|
|
19
19
|
import { applyFilters } from '@wordpress/hooks';
|
|
20
20
|
import { symbol } from '@wordpress/icons';
|
|
21
|
-
import { __ } from '@wordpress/i18n';
|
|
22
21
|
import { create, remove, toHTMLString } from '@wordpress/rich-text';
|
|
23
22
|
import deprecated from '@wordpress/deprecated';
|
|
24
23
|
|
|
@@ -2101,7 +2100,6 @@ export const getInserterItems = createSelector(
|
|
|
2101
2100
|
export const getBlockTransformItems = createSelector(
|
|
2102
2101
|
( state, blocks, rootClientId = null ) => {
|
|
2103
2102
|
const normalizedBlocks = Array.isArray( blocks ) ? blocks : [ blocks ];
|
|
2104
|
-
const [ sourceBlock ] = normalizedBlocks;
|
|
2105
2103
|
const buildBlockTypeTransformItem = buildBlockTypeItem( state, {
|
|
2106
2104
|
buildScope: 'transform',
|
|
2107
2105
|
} );
|
|
@@ -2118,22 +2116,10 @@ export const getBlockTransformItems = createSelector(
|
|
|
2118
2116
|
] )
|
|
2119
2117
|
);
|
|
2120
2118
|
|
|
2121
|
-
// Consider unwraping the highest priority.
|
|
2122
|
-
itemsByName[ '*' ] = {
|
|
2123
|
-
frecency: +Infinity,
|
|
2124
|
-
id: '*',
|
|
2125
|
-
isDisabled: false,
|
|
2126
|
-
name: '*',
|
|
2127
|
-
title: __( 'Unwrap' ),
|
|
2128
|
-
icon: itemsByName[ sourceBlock?.name ]?.icon,
|
|
2129
|
-
};
|
|
2130
|
-
|
|
2131
2119
|
const possibleTransforms = getPossibleBlockTransformations(
|
|
2132
2120
|
normalizedBlocks
|
|
2133
2121
|
).reduce( ( accumulator, block ) => {
|
|
2134
|
-
if ( block
|
|
2135
|
-
accumulator.push( itemsByName[ '*' ] );
|
|
2136
|
-
} else if ( itemsByName[ block?.name ] ) {
|
|
2122
|
+
if ( itemsByName[ block?.name ] ) {
|
|
2137
2123
|
accumulator.push( itemsByName[ block.name ] );
|
|
2138
2124
|
}
|
|
2139
2125
|
return accumulator;
|
|
@@ -2504,6 +2490,30 @@ export function getSettings( state ) {
|
|
|
2504
2490
|
return state.settings;
|
|
2505
2491
|
}
|
|
2506
2492
|
|
|
2493
|
+
/**
|
|
2494
|
+
* Returns the behaviors registered with the editor.
|
|
2495
|
+
*
|
|
2496
|
+
* Behaviors are named, reusable pieces of functionality that can be
|
|
2497
|
+
* attached to blocks. They are registered with the editor using the
|
|
2498
|
+
* `theme.json` file.
|
|
2499
|
+
*
|
|
2500
|
+
* @example
|
|
2501
|
+
*
|
|
2502
|
+
* ```js
|
|
2503
|
+
* const behaviors = select( blockEditorStore ).getBehaviors();
|
|
2504
|
+
* if ( behaviors?.lightbox ) {
|
|
2505
|
+
* // Do something with the lightbox.
|
|
2506
|
+
* }
|
|
2507
|
+
*```
|
|
2508
|
+
*
|
|
2509
|
+
* @param {Object} state Editor state.
|
|
2510
|
+
*
|
|
2511
|
+
* @return {Object} The editor behaviors object.
|
|
2512
|
+
*/
|
|
2513
|
+
export function getBehaviors( state ) {
|
|
2514
|
+
return state.settings.behaviors;
|
|
2515
|
+
}
|
|
2516
|
+
|
|
2507
2517
|
/**
|
|
2508
2518
|
* Returns true if the most recent block change is be considered persistent, or
|
|
2509
2519
|
* false otherwise. A persistent change is one committed by BlockEditorProvider
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Internal dependencies
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
hideBlockInterface,
|
|
6
|
+
showBlockInterface,
|
|
7
|
+
setBlockEditingMode,
|
|
8
|
+
unsetBlockEditingMode,
|
|
9
|
+
} from '../private-actions';
|
|
5
10
|
|
|
6
11
|
describe( 'private actions', () => {
|
|
7
12
|
describe( 'hideBlockInterface', () => {
|
|
@@ -19,4 +24,30 @@ describe( 'private actions', () => {
|
|
|
19
24
|
} );
|
|
20
25
|
} );
|
|
21
26
|
} );
|
|
27
|
+
|
|
28
|
+
describe( 'setBlockEditingMode', () => {
|
|
29
|
+
it( 'should return the SET_BLOCK_EDITING_MODE action', () => {
|
|
30
|
+
expect(
|
|
31
|
+
setBlockEditingMode(
|
|
32
|
+
'14501cc2-90a6-4f52-aa36-ab6e896135d1',
|
|
33
|
+
'default'
|
|
34
|
+
)
|
|
35
|
+
).toEqual( {
|
|
36
|
+
type: 'SET_BLOCK_EDITING_MODE',
|
|
37
|
+
clientId: '14501cc2-90a6-4f52-aa36-ab6e896135d1',
|
|
38
|
+
mode: 'default',
|
|
39
|
+
} );
|
|
40
|
+
} );
|
|
41
|
+
} );
|
|
42
|
+
|
|
43
|
+
describe( 'unsetBlockEditingMode', () => {
|
|
44
|
+
it( 'should return the UNSET_BLOCK_EDITING_MODE action', () => {
|
|
45
|
+
expect(
|
|
46
|
+
unsetBlockEditingMode( '14501cc2-90a6-4f52-aa36-ab6e896135d1' )
|
|
47
|
+
).toEqual( {
|
|
48
|
+
type: 'UNSET_BLOCK_EDITING_MODE',
|
|
49
|
+
clientId: '14501cc2-90a6-4f52-aa36-ab6e896135d1',
|
|
50
|
+
} );
|
|
51
|
+
} );
|
|
52
|
+
} );
|
|
22
53
|
} );
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import {
|
|
5
5
|
isBlockInterfaceHidden,
|
|
6
6
|
getLastInsertedBlocksClientIds,
|
|
7
|
+
getBlockEditingMode,
|
|
7
8
|
} from '../private-selectors';
|
|
8
9
|
|
|
9
10
|
describe( 'private selectors', () => {
|
|
@@ -49,4 +50,161 @@ describe( 'private selectors', () => {
|
|
|
49
50
|
] );
|
|
50
51
|
} );
|
|
51
52
|
} );
|
|
53
|
+
|
|
54
|
+
describe( 'getBlockEditingMode', () => {
|
|
55
|
+
const baseState = {
|
|
56
|
+
settings: {},
|
|
57
|
+
blocks: {
|
|
58
|
+
byClientId: new Map( [
|
|
59
|
+
[ '6cf70164-9097-4460-bcbf-200560546988', {} ], // Header
|
|
60
|
+
[ 'ef45d5fd-5234-4fd5-ac4f-c3736c7f9337', {} ], // Group
|
|
61
|
+
[ 'b26fc763-417d-4f01-b81c-2ec61e14a972', {} ], // | Post Title
|
|
62
|
+
[ '9b9c5c3f-2e46-4f02-9e14-9fe9515b958f', {} ], // | Post Content
|
|
63
|
+
[ 'b3247f75-fd94-4fef-97f9-5bfd162cc416', {} ], // | | Paragraph
|
|
64
|
+
[ 'e178812d-ce5e-48c7-a945-8ae4ffcbbb7c', {} ], // | | Paragraph
|
|
65
|
+
] ),
|
|
66
|
+
parents: new Map( [
|
|
67
|
+
[ '6cf70164-9097-4460-bcbf-200560546988', '' ],
|
|
68
|
+
[ 'ef45d5fd-5234-4fd5-ac4f-c3736c7f9337', '' ],
|
|
69
|
+
[
|
|
70
|
+
'b26fc763-417d-4f01-b81c-2ec61e14a972',
|
|
71
|
+
'ef45d5fd-5234-4fd5-ac4f-c3736c7f9337',
|
|
72
|
+
],
|
|
73
|
+
[
|
|
74
|
+
'9b9c5c3f-2e46-4f02-9e14-9fe9515b958f',
|
|
75
|
+
'ef45d5fd-5234-4fd5-ac4f-c3736c7f9337',
|
|
76
|
+
],
|
|
77
|
+
[
|
|
78
|
+
'b3247f75-fd94-4fef-97f9-5bfd162cc416',
|
|
79
|
+
'9b9c5c3f-2e46-4f02-9e14-9fe9515b958f',
|
|
80
|
+
],
|
|
81
|
+
[
|
|
82
|
+
'e178812d-ce5e-48c7-a945-8ae4ffcbbb7c',
|
|
83
|
+
'9b9c5c3f-2e46-4f02-9e14-9fe9515b958f',
|
|
84
|
+
],
|
|
85
|
+
] ),
|
|
86
|
+
},
|
|
87
|
+
blockListSettings: {
|
|
88
|
+
'ef45d5fd-5234-4fd5-ac4f-c3736c7f9337': {},
|
|
89
|
+
'9b9c5c3f-2e46-4f02-9e14-9fe9515b958f': {},
|
|
90
|
+
},
|
|
91
|
+
blockEditingModes: new Map( [] ),
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
const __experimentalHasContentRoleAttribute = jest.fn( () => false );
|
|
95
|
+
getBlockEditingMode.registry = {
|
|
96
|
+
select: jest.fn( () => ( {
|
|
97
|
+
__experimentalHasContentRoleAttribute,
|
|
98
|
+
} ) ),
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
it( 'should return default by default', () => {
|
|
102
|
+
expect(
|
|
103
|
+
getBlockEditingMode(
|
|
104
|
+
baseState,
|
|
105
|
+
'b3247f75-fd94-4fef-97f9-5bfd162cc416'
|
|
106
|
+
)
|
|
107
|
+
).toBe( 'default' );
|
|
108
|
+
} );
|
|
109
|
+
|
|
110
|
+
[ 'disabled', 'contentOnly' ].forEach( ( mode ) => {
|
|
111
|
+
it( `should return ${ mode } if explicitly set`, () => {
|
|
112
|
+
const state = {
|
|
113
|
+
...baseState,
|
|
114
|
+
blockEditingModes: new Map( [
|
|
115
|
+
[ 'b3247f75-fd94-4fef-97f9-5bfd162cc416', mode ],
|
|
116
|
+
] ),
|
|
117
|
+
};
|
|
118
|
+
expect(
|
|
119
|
+
getBlockEditingMode(
|
|
120
|
+
state,
|
|
121
|
+
'b3247f75-fd94-4fef-97f9-5bfd162cc416'
|
|
122
|
+
)
|
|
123
|
+
).toBe( mode );
|
|
124
|
+
} );
|
|
125
|
+
|
|
126
|
+
it( `should return ${ mode } if explicitly set on a parent`, () => {
|
|
127
|
+
const state = {
|
|
128
|
+
...baseState,
|
|
129
|
+
blockEditingModes: new Map( [
|
|
130
|
+
[ 'ef45d5fd-5234-4fd5-ac4f-c3736c7f9337', mode ],
|
|
131
|
+
] ),
|
|
132
|
+
};
|
|
133
|
+
expect(
|
|
134
|
+
getBlockEditingMode(
|
|
135
|
+
state,
|
|
136
|
+
'b3247f75-fd94-4fef-97f9-5bfd162cc416'
|
|
137
|
+
)
|
|
138
|
+
).toBe( mode );
|
|
139
|
+
} );
|
|
140
|
+
|
|
141
|
+
it( `should return ${ mode } if overridden by a parent`, () => {
|
|
142
|
+
const state = {
|
|
143
|
+
...baseState,
|
|
144
|
+
blockEditingModes: new Map( [
|
|
145
|
+
[ '', mode ],
|
|
146
|
+
[ 'ef45d5fd-5234-4fd5-ac4f-c3736c7f9337', 'default' ],
|
|
147
|
+
[ '9b9c5c3f-2e46-4f02-9e14-9fe9515b958f', mode ],
|
|
148
|
+
] ),
|
|
149
|
+
};
|
|
150
|
+
expect(
|
|
151
|
+
getBlockEditingMode(
|
|
152
|
+
state,
|
|
153
|
+
'b3247f75-fd94-4fef-97f9-5bfd162cc416'
|
|
154
|
+
)
|
|
155
|
+
).toBe( mode );
|
|
156
|
+
} );
|
|
157
|
+
|
|
158
|
+
it( `should return ${ mode } if explicitly set on root`, () => {
|
|
159
|
+
const state = {
|
|
160
|
+
...baseState,
|
|
161
|
+
blockEditingModes: new Map( [ [ '', mode ] ] ),
|
|
162
|
+
};
|
|
163
|
+
expect(
|
|
164
|
+
getBlockEditingMode(
|
|
165
|
+
state,
|
|
166
|
+
'b3247f75-fd94-4fef-97f9-5bfd162cc416'
|
|
167
|
+
)
|
|
168
|
+
).toBe( mode );
|
|
169
|
+
} );
|
|
170
|
+
} );
|
|
171
|
+
|
|
172
|
+
it( 'should return disabled if parent is locked and the block has no content role', () => {
|
|
173
|
+
const state = {
|
|
174
|
+
...baseState,
|
|
175
|
+
blockListSettings: {
|
|
176
|
+
...baseState.blockListSettings,
|
|
177
|
+
'9b9c5c3f-2e46-4f02-9e14-9fe9515b958f': {
|
|
178
|
+
templateLock: 'contentOnly',
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
};
|
|
182
|
+
__experimentalHasContentRoleAttribute.mockReturnValueOnce( false );
|
|
183
|
+
expect(
|
|
184
|
+
getBlockEditingMode(
|
|
185
|
+
state,
|
|
186
|
+
'b3247f75-fd94-4fef-97f9-5bfd162cc416'
|
|
187
|
+
)
|
|
188
|
+
).toBe( 'disabled' );
|
|
189
|
+
} );
|
|
190
|
+
|
|
191
|
+
it( 'should return contentOnly if parent is locked and the block has a content role', () => {
|
|
192
|
+
const state = {
|
|
193
|
+
...baseState,
|
|
194
|
+
blockListSettings: {
|
|
195
|
+
...baseState.blockListSettings,
|
|
196
|
+
'9b9c5c3f-2e46-4f02-9e14-9fe9515b958f': {
|
|
197
|
+
templateLock: 'contentOnly',
|
|
198
|
+
},
|
|
199
|
+
},
|
|
200
|
+
};
|
|
201
|
+
__experimentalHasContentRoleAttribute.mockReturnValueOnce( true );
|
|
202
|
+
expect(
|
|
203
|
+
getBlockEditingMode(
|
|
204
|
+
state,
|
|
205
|
+
'b3247f75-fd94-4fef-97f9-5bfd162cc416'
|
|
206
|
+
)
|
|
207
|
+
).toBe( 'contentOnly' );
|
|
208
|
+
} );
|
|
209
|
+
} );
|
|
52
210
|
} );
|
|
@@ -32,6 +32,7 @@ import {
|
|
|
32
32
|
blockListSettings,
|
|
33
33
|
lastBlockAttributesChange,
|
|
34
34
|
lastBlockInserted,
|
|
35
|
+
blockEditingModes,
|
|
35
36
|
} from '../reducer';
|
|
36
37
|
|
|
37
38
|
const noop = () => {};
|
|
@@ -3367,4 +3368,51 @@ describe( 'state', () => {
|
|
|
3367
3368
|
expect( state ).toEqual( expectedState );
|
|
3368
3369
|
} );
|
|
3369
3370
|
} );
|
|
3371
|
+
|
|
3372
|
+
describe( 'blockEditingModes', () => {
|
|
3373
|
+
it( 'should return an empty map by default', () => {
|
|
3374
|
+
expect( blockEditingModes( undefined, {} ) ).toEqual( new Map() );
|
|
3375
|
+
} );
|
|
3376
|
+
|
|
3377
|
+
it( 'should set the editing mode for a block', () => {
|
|
3378
|
+
const state = new Map();
|
|
3379
|
+
const newState = blockEditingModes( state, {
|
|
3380
|
+
type: 'SET_BLOCK_EDITING_MODE',
|
|
3381
|
+
clientId: '14501cc2-90a6-4f52-aa36-ab6e896135d1',
|
|
3382
|
+
mode: 'default',
|
|
3383
|
+
} );
|
|
3384
|
+
expect( newState ).toEqual(
|
|
3385
|
+
new Map( [
|
|
3386
|
+
[ '14501cc2-90a6-4f52-aa36-ab6e896135d1', 'default' ],
|
|
3387
|
+
] )
|
|
3388
|
+
);
|
|
3389
|
+
} );
|
|
3390
|
+
|
|
3391
|
+
it( 'should clear the editing mode for a block', () => {
|
|
3392
|
+
const state = new Map( [
|
|
3393
|
+
[ '14501cc2-90a6-4f52-aa36-ab6e896135d1', 'default' ],
|
|
3394
|
+
] );
|
|
3395
|
+
const newState = blockEditingModes( state, {
|
|
3396
|
+
type: 'UNSET_BLOCK_EDITING_MODE',
|
|
3397
|
+
clientId: '14501cc2-90a6-4f52-aa36-ab6e896135d1',
|
|
3398
|
+
} );
|
|
3399
|
+
expect( newState ).toEqual( new Map() );
|
|
3400
|
+
} );
|
|
3401
|
+
|
|
3402
|
+
it( 'should clear editing modes when blocks are reset', () => {
|
|
3403
|
+
const state = new Map( [
|
|
3404
|
+
[ '', 'disabled' ],
|
|
3405
|
+
[ '14501cc2-90a6-4f52-aa36-ab6e896135d1', 'default' ],
|
|
3406
|
+
] );
|
|
3407
|
+
const newState = blockEditingModes( state, {
|
|
3408
|
+
type: 'RESET_BLOCKS',
|
|
3409
|
+
} );
|
|
3410
|
+
expect( newState ).toEqual(
|
|
3411
|
+
new Map( [
|
|
3412
|
+
// Root mode should be maintained.
|
|
3413
|
+
[ '', 'disabled' ],
|
|
3414
|
+
] )
|
|
3415
|
+
);
|
|
3416
|
+
} );
|
|
3417
|
+
} );
|
|
3370
3418
|
} );
|
package/src/style.scss
CHANGED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/** @typedef {import('../store/selectors').WPEditorInserterItem} WPEditorInserterItem */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Helper function to order inserter block items according to a provided array of prioritized blocks.
|
|
5
|
+
*
|
|
6
|
+
* @param {WPEditorInserterItem[]} items The array of editor inserter block items to be sorted.
|
|
7
|
+
* @param {string[]} priority The array of block names to be prioritized.
|
|
8
|
+
* @return {WPEditorInserterItem[]} The sorted array of editor inserter block items.
|
|
9
|
+
*/
|
|
10
|
+
export const orderInserterBlockItems = ( items, priority ) => {
|
|
11
|
+
if ( ! priority ) {
|
|
12
|
+
return items;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
items.sort( ( { id: aName }, { id: bName } ) => {
|
|
16
|
+
// Sort block items according to `priority`.
|
|
17
|
+
let aIndex = priority.indexOf( aName );
|
|
18
|
+
let bIndex = priority.indexOf( bName );
|
|
19
|
+
// All other block items should come after that.
|
|
20
|
+
if ( aIndex < 0 ) aIndex = priority.length;
|
|
21
|
+
if ( bIndex < 0 ) bIndex = priority.length;
|
|
22
|
+
return aIndex - bIndex;
|
|
23
|
+
} );
|
|
24
|
+
|
|
25
|
+
return items;
|
|
26
|
+
};
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
|
|
10
|
-
var _element = require("@wordpress/element");
|
|
11
|
-
|
|
12
|
-
var _reactNative = require("react-native");
|
|
13
|
-
|
|
14
|
-
var _blockEditor = require("@wordpress/block-editor");
|
|
15
|
-
|
|
16
|
-
var _data = require("@wordpress/data");
|
|
17
|
-
|
|
18
|
-
var _style = _interopRequireDefault(require("./style.scss"));
|
|
19
|
-
|
|
20
|
-
var _block = _interopRequireDefault(require("./block"));
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* External dependencies
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* WordPress dependencies
|
|
28
|
-
*/
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Internal dependencies
|
|
32
|
-
*/
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* NOTE: This is a component currently used by the List block (V2)
|
|
36
|
-
* It only passes the needed props for this block, if other blocks will use it
|
|
37
|
-
* make sure you pass other props that might be required coming from:
|
|
38
|
-
* components/inner-blocks/index.native.js
|
|
39
|
-
*/
|
|
40
|
-
function BlockListCompact(props) {
|
|
41
|
-
const {
|
|
42
|
-
marginHorizontal = _style.default.defaultBlock.marginLeft,
|
|
43
|
-
marginVertical = _style.default.defaultBlock.marginTop,
|
|
44
|
-
rootClientId
|
|
45
|
-
} = props;
|
|
46
|
-
const {
|
|
47
|
-
blockClientIds
|
|
48
|
-
} = (0, _data.useSelect)(select => {
|
|
49
|
-
const {
|
|
50
|
-
getBlockOrder
|
|
51
|
-
} = select(_blockEditor.store);
|
|
52
|
-
const blockOrder = getBlockOrder(rootClientId);
|
|
53
|
-
return {
|
|
54
|
-
blockClientIds: blockOrder
|
|
55
|
-
};
|
|
56
|
-
}, [rootClientId]);
|
|
57
|
-
const containerStyle = {
|
|
58
|
-
marginVertical: -marginVertical,
|
|
59
|
-
marginHorizontal: -marginHorizontal
|
|
60
|
-
};
|
|
61
|
-
return (0, _element.createElement)(_reactNative.View, {
|
|
62
|
-
style: containerStyle,
|
|
63
|
-
testID: "block-list-wrapper"
|
|
64
|
-
}, blockClientIds.map(currentClientId => (0, _element.createElement)(_block.default, {
|
|
65
|
-
clientId: currentClientId,
|
|
66
|
-
rootClientId: rootClientId,
|
|
67
|
-
key: currentClientId,
|
|
68
|
-
marginHorizontal: marginHorizontal,
|
|
69
|
-
marginVertical: marginVertical
|
|
70
|
-
})));
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
var _default = BlockListCompact;
|
|
74
|
-
exports.default = _default;
|
|
75
|
-
//# sourceMappingURL=block-list-compact.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-editor/src/components/block-list/block-list-compact.native.js"],"names":["BlockListCompact","props","marginHorizontal","styles","defaultBlock","marginLeft","marginVertical","marginTop","rootClientId","blockClientIds","select","getBlockOrder","blockEditorStore","blockOrder","containerStyle","map","currentClientId"],"mappings":";;;;;;;;;;;AAGA;;AAKA;;AACA;;AAKA;;AACA;;AAfA;AACA;AACA;;AAGA;AACA;AACA;;AAIA;AACA;AACA;;AAIA;AACA;AACA;AACA;AACA;AACA;AAEA,SAASA,gBAAT,CAA2BC,KAA3B,EAAmC;AAClC,QAAM;AACLC,IAAAA,gBAAgB,GAAGC,eAAOC,YAAP,CAAoBC,UADlC;AAELC,IAAAA,cAAc,GAAGH,eAAOC,YAAP,CAAoBG,SAFhC;AAGLC,IAAAA;AAHK,MAIFP,KAJJ;AAKA,QAAM;AAAEQ,IAAAA;AAAF,MAAqB,qBACxBC,MAAF,IAAc;AACb,UAAM;AAAEC,MAAAA;AAAF,QAAoBD,MAAM,CAAEE,kBAAF,CAAhC;AACA,UAAMC,UAAU,GAAGF,aAAa,CAAEH,YAAF,CAAhC;AAEA,WAAO;AACNC,MAAAA,cAAc,EAAEI;AADV,KAAP;AAGA,GARyB,EAS1B,CAAEL,YAAF,CAT0B,CAA3B;AAYA,QAAMM,cAAc,GAAG;AACtBR,IAAAA,cAAc,EAAE,CAACA,cADK;AAEtBJ,IAAAA,gBAAgB,EAAE,CAACA;AAFG,GAAvB;AAKA,SACC,4BAAC,iBAAD;AAAM,IAAA,KAAK,EAAGY,cAAd;AAA+B,IAAA,MAAM,EAAC;AAAtC,KACGL,cAAc,CAACM,GAAf,CAAsBC,eAAF,IACrB,4BAAC,cAAD;AACC,IAAA,QAAQ,EAAGA,eADZ;AAEC,IAAA,YAAY,EAAGR,YAFhB;AAGC,IAAA,GAAG,EAAGQ,eAHP;AAIC,IAAA,gBAAgB,EAAGd,gBAJpB;AAKC,IAAA,cAAc,EAAGI;AALlB,IADC,CADH,CADD;AAaA;;eAEcN,gB","sourcesContent":["/**\n * External dependencies\n */\nimport { View } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\nimport BlockListBlock from './block';\n\n/**\n * NOTE: This is a component currently used by the List block (V2)\n * It only passes the needed props for this block, if other blocks will use it\n * make sure you pass other props that might be required coming from:\n * components/inner-blocks/index.native.js\n */\n\nfunction BlockListCompact( props ) {\n\tconst {\n\t\tmarginHorizontal = styles.defaultBlock.marginLeft,\n\t\tmarginVertical = styles.defaultBlock.marginTop,\n\t\trootClientId,\n\t} = props;\n\tconst { blockClientIds } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockOrder } = select( blockEditorStore );\n\t\t\tconst blockOrder = getBlockOrder( rootClientId );\n\n\t\t\treturn {\n\t\t\t\tblockClientIds: blockOrder,\n\t\t\t};\n\t\t},\n\t\t[ rootClientId ]\n\t);\n\n\tconst containerStyle = {\n\t\tmarginVertical: -marginVertical,\n\t\tmarginHorizontal: -marginHorizontal,\n\t};\n\n\treturn (\n\t\t<View style={ containerStyle } testID=\"block-list-wrapper\">\n\t\t\t{ blockClientIds.map( ( currentClientId ) => (\n\t\t\t\t<BlockListBlock\n\t\t\t\t\tclientId={ currentClientId }\n\t\t\t\t\trootClientId={ rootClientId }\n\t\t\t\t\tkey={ currentClientId }\n\t\t\t\t\tmarginHorizontal={ marginHorizontal }\n\t\t\t\t\tmarginVertical={ marginVertical }\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</View>\n\t);\n}\n\nexport default BlockListCompact;\n"]}
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.Appender = void 0;
|
|
9
|
-
|
|
10
|
-
var _element = require("@wordpress/element");
|
|
11
|
-
|
|
12
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
-
|
|
14
|
-
var _compose = require("@wordpress/compose");
|
|
15
|
-
|
|
16
|
-
var _a11y = require("@wordpress/a11y");
|
|
17
|
-
|
|
18
|
-
var _data = require("@wordpress/data");
|
|
19
|
-
|
|
20
|
-
var _i18n = require("@wordpress/i18n");
|
|
21
|
-
|
|
22
|
-
var _store = require("../../store");
|
|
23
|
-
|
|
24
|
-
var _useBlockDisplayTitle = _interopRequireDefault(require("../block-title/use-block-display-title"));
|
|
25
|
-
|
|
26
|
-
var _inserter = require("../inserter");
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* WordPress dependencies
|
|
30
|
-
*/
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Internal dependencies
|
|
34
|
-
*/
|
|
35
|
-
const prioritizedInserterBlocks = ['core/navigation-link/page', 'core/navigation-link'];
|
|
36
|
-
const Appender = (0, _element.forwardRef)((_ref, ref) => {
|
|
37
|
-
let {
|
|
38
|
-
nestingLevel,
|
|
39
|
-
blockCount,
|
|
40
|
-
clientId,
|
|
41
|
-
...props
|
|
42
|
-
} = _ref;
|
|
43
|
-
const [insertedBlock, setInsertedBlock] = (0, _element.useState)(null);
|
|
44
|
-
const instanceId = (0, _compose.useInstanceId)(Appender);
|
|
45
|
-
const {
|
|
46
|
-
hideInserter
|
|
47
|
-
} = (0, _data.useSelect)(select => {
|
|
48
|
-
const {
|
|
49
|
-
getTemplateLock,
|
|
50
|
-
__unstableGetEditorMode
|
|
51
|
-
} = select(_store.store);
|
|
52
|
-
return {
|
|
53
|
-
hideInserter: !!getTemplateLock(clientId) || __unstableGetEditorMode() === 'zoom-out'
|
|
54
|
-
};
|
|
55
|
-
}, [clientId]);
|
|
56
|
-
const blockTitle = (0, _useBlockDisplayTitle.default)({
|
|
57
|
-
clientId,
|
|
58
|
-
context: 'list-view'
|
|
59
|
-
});
|
|
60
|
-
const insertedBlockTitle = (0, _useBlockDisplayTitle.default)({
|
|
61
|
-
clientId: insertedBlock === null || insertedBlock === void 0 ? void 0 : insertedBlock.clientId,
|
|
62
|
-
context: 'list-view'
|
|
63
|
-
});
|
|
64
|
-
(0, _element.useEffect)(() => {
|
|
65
|
-
if (!(insertedBlockTitle !== null && insertedBlockTitle !== void 0 && insertedBlockTitle.length)) {
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
(0, _a11y.speak)((0, _i18n.sprintf)( // translators: %s: name of block being inserted (i.e. Paragraph, Image, Group etc)
|
|
70
|
-
(0, _i18n.__)('%s block inserted'), insertedBlockTitle), 'assertive');
|
|
71
|
-
}, [insertedBlockTitle]);
|
|
72
|
-
const orderInitialBlockItems = (0, _element.useCallback)(items => {
|
|
73
|
-
items.sort((_ref2, _ref3) => {
|
|
74
|
-
let {
|
|
75
|
-
id: aName
|
|
76
|
-
} = _ref2;
|
|
77
|
-
let {
|
|
78
|
-
id: bName
|
|
79
|
-
} = _ref3;
|
|
80
|
-
// Sort block items according to `prioritizedInserterBlocks`.
|
|
81
|
-
let aIndex = prioritizedInserterBlocks.indexOf(aName);
|
|
82
|
-
let bIndex = prioritizedInserterBlocks.indexOf(bName); // All other block items should come after that.
|
|
83
|
-
|
|
84
|
-
if (aIndex < 0) aIndex = prioritizedInserterBlocks.length;
|
|
85
|
-
if (bIndex < 0) bIndex = prioritizedInserterBlocks.length;
|
|
86
|
-
return aIndex - bIndex;
|
|
87
|
-
});
|
|
88
|
-
return items;
|
|
89
|
-
}, []);
|
|
90
|
-
|
|
91
|
-
if (hideInserter) {
|
|
92
|
-
return null;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
const descriptionId = `off-canvas-editor-appender__${instanceId}`;
|
|
96
|
-
const description = (0, _i18n.sprintf)(
|
|
97
|
-
/* translators: 1: The name of the block. 2: The numerical position of the block. 3: The level of nesting for the block. */
|
|
98
|
-
(0, _i18n.__)('Append to %1$s block at position %2$d, Level %3$d'), blockTitle, blockCount + 1, nestingLevel);
|
|
99
|
-
return (0, _element.createElement)("div", {
|
|
100
|
-
className: "offcanvas-editor-appender"
|
|
101
|
-
}, (0, _element.createElement)(_inserter.ComposedPrivateInserter, (0, _extends2.default)({
|
|
102
|
-
ref: ref,
|
|
103
|
-
rootClientId: clientId,
|
|
104
|
-
position: "bottom right",
|
|
105
|
-
isAppender: true,
|
|
106
|
-
selectBlockOnInsert: false,
|
|
107
|
-
shouldDirectInsert: false,
|
|
108
|
-
__experimentalIsQuick: true
|
|
109
|
-
}, props, {
|
|
110
|
-
toggleProps: {
|
|
111
|
-
'aria-describedby': descriptionId
|
|
112
|
-
},
|
|
113
|
-
onSelectOrClose: maybeInsertedBlock => {
|
|
114
|
-
if (maybeInsertedBlock !== null && maybeInsertedBlock !== void 0 && maybeInsertedBlock.clientId) {
|
|
115
|
-
setInsertedBlock(maybeInsertedBlock);
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
|
-
orderInitialBlockItems: orderInitialBlockItems
|
|
119
|
-
})), (0, _element.createElement)("div", {
|
|
120
|
-
className: "offcanvas-editor-appender__description",
|
|
121
|
-
id: descriptionId
|
|
122
|
-
}, description));
|
|
123
|
-
});
|
|
124
|
-
exports.Appender = Appender;
|
|
125
|
-
//# sourceMappingURL=appender.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-editor/src/components/off-canvas-editor/appender.js"],"names":["prioritizedInserterBlocks","Appender","ref","nestingLevel","blockCount","clientId","props","insertedBlock","setInsertedBlock","instanceId","hideInserter","select","getTemplateLock","__unstableGetEditorMode","blockEditorStore","blockTitle","context","insertedBlockTitle","length","orderInitialBlockItems","items","sort","id","aName","bName","aIndex","indexOf","bIndex","descriptionId","description","maybeInsertedBlock"],"mappings":"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","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { speak } from '@wordpress/a11y';\nimport { useSelect } from '@wordpress/data';\nimport {\n\tforwardRef,\n\tuseState,\n\tuseEffect,\n\tuseCallback,\n} from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport useBlockDisplayTitle from '../block-title/use-block-display-title';\nimport { ComposedPrivateInserter as PrivateInserter } from '../inserter';\n\nconst prioritizedInserterBlocks = [\n\t'core/navigation-link/page',\n\t'core/navigation-link',\n];\n\nexport const Appender = forwardRef(\n\t( { nestingLevel, blockCount, clientId, ...props }, ref ) => {\n\t\tconst [ insertedBlock, setInsertedBlock ] = useState( null );\n\n\t\tconst instanceId = useInstanceId( Appender );\n\t\tconst { hideInserter } = useSelect(\n\t\t\t( select ) => {\n\t\t\t\tconst { getTemplateLock, __unstableGetEditorMode } =\n\t\t\t\t\tselect( blockEditorStore );\n\n\t\t\t\treturn {\n\t\t\t\t\thideInserter:\n\t\t\t\t\t\t!! getTemplateLock( clientId ) ||\n\t\t\t\t\t\t__unstableGetEditorMode() === 'zoom-out',\n\t\t\t\t};\n\t\t\t},\n\t\t\t[ clientId ]\n\t\t);\n\n\t\tconst blockTitle = useBlockDisplayTitle( {\n\t\t\tclientId,\n\t\t\tcontext: 'list-view',\n\t\t} );\n\n\t\tconst insertedBlockTitle = useBlockDisplayTitle( {\n\t\t\tclientId: insertedBlock?.clientId,\n\t\t\tcontext: 'list-view',\n\t\t} );\n\n\t\tuseEffect( () => {\n\t\t\tif ( ! insertedBlockTitle?.length ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tspeak(\n\t\t\t\tsprintf(\n\t\t\t\t\t// translators: %s: name of block being inserted (i.e. Paragraph, Image, Group etc)\n\t\t\t\t\t__( '%s block inserted' ),\n\t\t\t\t\tinsertedBlockTitle\n\t\t\t\t),\n\t\t\t\t'assertive'\n\t\t\t);\n\t\t}, [ insertedBlockTitle ] );\n\n\t\tconst orderInitialBlockItems = useCallback( ( items ) => {\n\t\t\titems.sort( ( { id: aName }, { id: bName } ) => {\n\t\t\t\t// Sort block items according to `prioritizedInserterBlocks`.\n\t\t\t\tlet aIndex = prioritizedInserterBlocks.indexOf( aName );\n\t\t\t\tlet bIndex = prioritizedInserterBlocks.indexOf( bName );\n\t\t\t\t// All other block items should come after that.\n\t\t\t\tif ( aIndex < 0 ) aIndex = prioritizedInserterBlocks.length;\n\t\t\t\tif ( bIndex < 0 ) bIndex = prioritizedInserterBlocks.length;\n\t\t\t\treturn aIndex - bIndex;\n\t\t\t} );\n\t\t\treturn items;\n\t\t}, [] );\n\n\t\tif ( hideInserter ) {\n\t\t\treturn null;\n\t\t}\n\t\tconst descriptionId = `off-canvas-editor-appender__${ instanceId }`;\n\t\tconst description = sprintf(\n\t\t\t/* translators: 1: The name of the block. 2: The numerical position of the block. 3: The level of nesting for the block. */\n\t\t\t__( 'Append to %1$s block at position %2$d, Level %3$d' ),\n\t\t\tblockTitle,\n\t\t\tblockCount + 1,\n\t\t\tnestingLevel\n\t\t);\n\n\t\treturn (\n\t\t\t<div className=\"offcanvas-editor-appender\">\n\t\t\t\t<PrivateInserter\n\t\t\t\t\tref={ ref }\n\t\t\t\t\trootClientId={ clientId }\n\t\t\t\t\tposition=\"bottom right\"\n\t\t\t\t\tisAppender\n\t\t\t\t\tselectBlockOnInsert={ false }\n\t\t\t\t\tshouldDirectInsert={ false }\n\t\t\t\t\t__experimentalIsQuick\n\t\t\t\t\t{ ...props }\n\t\t\t\t\ttoggleProps={ { 'aria-describedby': descriptionId } }\n\t\t\t\t\tonSelectOrClose={ ( maybeInsertedBlock ) => {\n\t\t\t\t\t\tif ( maybeInsertedBlock?.clientId ) {\n\t\t\t\t\t\t\tsetInsertedBlock( maybeInsertedBlock );\n\t\t\t\t\t\t}\n\t\t\t\t\t} }\n\t\t\t\t\torderInitialBlockItems={ orderInitialBlockItems }\n\t\t\t\t/>\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"offcanvas-editor-appender__description\"\n\t\t\t\t\tid={ descriptionId }\n\t\t\t\t>\n\t\t\t\t\t{ description }\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n);\n"]}
|