@wordpress/block-editor 9.2.0 → 9.3.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 +6 -0
- package/build/autocompleters/block.js +3 -1
- package/build/autocompleters/block.js.map +1 -1
- package/build/components/block-actions/index.js.map +1 -1
- package/build/components/block-alignment-control/ui.js.map +1 -1
- package/build/components/block-alignment-matrix-control/index.js +3 -7
- package/build/components/block-alignment-matrix-control/index.js.map +1 -1
- package/build/components/block-breadcrumb/index.js.map +1 -1
- package/build/components/block-content-overlay/index.js.map +1 -1
- package/build/components/block-context/index.js.map +1 -1
- package/build/components/block-controls/hook.js.map +1 -1
- package/build/components/block-draggable/index.js.map +1 -1
- package/build/components/block-draggable/index.native.js.map +1 -1
- package/build/components/block-list/block-list-item.native.js.map +1 -1
- package/build/components/block-list/block-selection-button.native.js.map +1 -1
- package/build/components/block-list/block.js.map +1 -1
- package/build/components/block-list/block.native.js.map +1 -1
- package/build/components/block-list/index.js.map +1 -1
- package/build/components/block-list/index.native.js.map +1 -1
- package/build/components/block-list/use-block-props/index.js.map +1 -1
- package/build/components/block-list/use-block-props/use-block-custom-class-name.js.map +1 -1
- package/build/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +1 -1
- package/build/components/block-list/use-in-between-inserter.js.map +1 -1
- package/build/components/block-list-appender/index.js.map +1 -1
- package/build/components/block-list-appender/index.native.js.map +1 -1
- package/build/components/block-mobile-toolbar/block-actions-menu.native.js.map +1 -1
- package/build/components/block-mover/button.js.map +1 -1
- package/build/components/block-mover/index.native.js.map +1 -1
- package/build/components/block-parent-selector/index.js.map +1 -1
- package/build/components/block-pattern-setup/index.js +1 -1
- package/build/components/block-pattern-setup/index.js.map +1 -1
- package/build/components/block-preview/auto.js.map +1 -1
- package/build/components/block-selection-clearer/index.js.map +1 -1
- package/build/components/block-settings-menu/block-mode-toggle.js +3 -7
- package/build/components/block-settings-menu/block-mode-toggle.js.map +1 -1
- package/build/components/block-settings-menu/block-settings-dropdown.js +6 -3
- package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build/components/block-styles/index.js +6 -3
- package/build/components/block-styles/index.js.map +1 -1
- package/build/components/block-styles/menu-items.js +3 -7
- package/build/components/block-styles/menu-items.js.map +1 -1
- package/build/components/block-switcher/block-transformations-menu.js.map +1 -1
- package/build/components/block-toolbar/index.native.js.map +1 -1
- package/build/components/block-toolbar/utils.js +5 -8
- package/build/components/block-toolbar/utils.js.map +1 -1
- package/build/components/block-tools/block-contextual-toolbar.js.map +1 -1
- package/build/components/block-tools/index.js.map +1 -1
- package/build/components/block-types-list/index.native.js.map +1 -1
- package/build/components/block-variation-transforms/index.js.map +1 -1
- package/build/components/color-style-selector/index.js.map +1 -1
- package/build/components/colors/with-colors.js.map +1 -1
- package/build/components/colors-gradients/dropdown.js.map +1 -1
- package/build/components/convert-to-group-buttons/toolbar.js.map +1 -1
- package/build/components/copy-handler/index.js +17 -1
- package/build/components/copy-handler/index.js.map +1 -1
- package/build/components/default-block-appender/index.js.map +1 -1
- package/build/components/default-block-appender/index.native.js.map +1 -1
- package/build/components/default-style-picker/index.js.map +1 -1
- package/build/components/font-sizes/with-font-sizes.js.map +1 -1
- package/build/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
- package/build/components/image-size-control/index.js +3 -1
- package/build/components/image-size-control/index.js.map +1 -1
- package/build/components/index.js +18 -0
- package/build/components/index.js.map +1 -1
- package/build/components/inner-blocks/use-inner-block-template-sync.js.map +1 -1
- package/build/components/inner-blocks/use-nested-settings-update.js.map +1 -1
- package/build/components/inserter/block-types-tab.native.js.map +1 -1
- package/build/components/inserter/hooks/use-block-type-impressions.native.js.map +1 -1
- package/build/components/inserter/hooks/use-insertion-point.js.map +1 -1
- package/build/components/inserter/hooks/use-patterns-state.js.map +1 -1
- package/build/components/inserter/index.js.map +1 -1
- package/build/components/inserter/index.native.js.map +1 -1
- package/build/components/inserter/library.js +3 -7
- package/build/components/inserter/library.js.map +1 -1
- package/build/components/inserter/menu.js.map +1 -1
- package/build/components/inserter/menu.native.js.map +1 -1
- package/build/components/inserter/no-results.native.js.map +1 -1
- package/build/components/inserter/quick-inserter.js.map +1 -1
- package/build/components/inserter/search-items.js +1 -1
- package/build/components/inserter/search-items.js.map +1 -1
- package/build/components/inserter/search-results.native.js.map +1 -1
- package/build/components/inspector-popover-header/index.js +56 -0
- package/build/components/inspector-popover-header/index.js.map +1 -0
- package/build/components/line-height-control/index.js.map +1 -1
- package/build/components/link-control/index.js +4 -4
- package/build/components/link-control/index.js.map +1 -1
- package/build/components/link-control/search-create-button.js +1 -3
- package/build/components/link-control/search-create-button.js.map +1 -1
- package/build/components/link-control/search-input.js +5 -3
- package/build/components/link-control/search-input.js.map +1 -1
- package/build/components/link-control/settings-drawer.js +3 -7
- package/build/components/link-control/settings-drawer.js.map +1 -1
- package/build/components/link-control/use-search-handler.js.map +1 -1
- package/build/components/list-view/block-contents.js.map +1 -1
- package/build/components/list-view/branch.js.map +1 -1
- package/build/components/list-view/index.js.map +1 -1
- package/build/components/list-view/use-block-selection.js.map +1 -1
- package/build/components/list-view/use-list-view-drop-zone.js.map +1 -1
- package/build/components/list-view/utils.js +1 -7
- package/build/components/list-view/utils.js.map +1 -1
- package/build/components/media-placeholder/index.js +4 -4
- package/build/components/media-placeholder/index.js.map +1 -1
- package/build/components/media-replace-flow/index.js +20 -5
- package/build/components/media-replace-flow/index.js.map +1 -1
- package/build/components/media-upload/index.native.js +1 -1
- package/build/components/media-upload/index.native.js.map +1 -1
- package/build/components/navigable-toolbar/index.js.map +1 -1
- package/build/components/plain-text/index.native.js.map +1 -1
- package/build/components/preview-options/index.js +4 -0
- package/build/components/preview-options/index.js.map +1 -1
- package/build/components/provider/use-block-sync.js +5 -3
- package/build/components/provider/use-block-sync.js.map +1 -1
- package/build/components/publish-date-time-picker/index.js +14 -16
- package/build/components/publish-date-time-picker/index.js.map +1 -1
- package/build/components/rich-text/embed-handler-picker.native.js +4 -8
- package/build/components/rich-text/embed-handler-picker.native.js.map +1 -1
- package/build/components/rich-text/index.js.map +1 -1
- package/build/components/rich-text/use-format-types.js.map +1 -1
- package/build/components/rich-text/use-mark-persistent.js.map +1 -1
- package/build/components/skip-to-selected-block/index.js.map +1 -1
- package/build/components/ungroup-button/index.native.js +3 -7
- package/build/components/ungroup-button/index.native.js.map +1 -1
- package/build/components/url-input/index.js +14 -3
- package/build/components/url-input/index.js.map +1 -1
- package/build/components/use-block-display-information/index.js.map +1 -1
- package/build/components/use-block-drop-zone/index.js.map +1 -1
- package/build/components/use-block-drop-zone/index.native.js.map +1 -1
- package/build/components/use-display-block-controls/index.native.js.map +1 -1
- package/build/components/use-on-block-drop/index.js.map +1 -1
- package/build/components/use-on-block-drop/index.native.js.map +1 -1
- package/build/components/use-setting/index.js.map +1 -1
- package/build/components/writing-flow/use-arrow-nav.js +12 -12
- package/build/components/writing-flow/use-arrow-nav.js.map +1 -1
- package/build/components/writing-flow/use-click-selection.js.map +1 -1
- package/build/components/writing-flow/use-drag-selection.js.map +1 -1
- package/build/components/writing-flow/use-multi-selection.js.map +1 -1
- package/build/components/writing-flow/use-select-all.js.map +1 -1
- package/build/components/writing-flow/use-selection-observer.js.map +1 -1
- package/build/components/writing-flow/use-tab-nav.js.map +1 -1
- package/build/hooks/color-panel.js.map +1 -1
- package/build/hooks/color-panel.native.js.map +1 -1
- package/build/hooks/color.js.map +1 -1
- package/build/hooks/font-family.js.map +1 -1
- package/build/hooks/gap.js.map +1 -1
- package/build/hooks/layout.js +38 -1
- package/build/hooks/layout.js.map +1 -1
- package/build/store/actions.js.map +1 -1
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +1 -1
- package/build/store/selectors.js.map +1 -1
- package/build/utils/pasting.js.map +1 -1
- package/build/utils/transform-styles/transforms/wrap.js.map +1 -1
- package/build-module/autocompleters/block.js +4 -1
- package/build-module/autocompleters/block.js.map +1 -1
- package/build-module/components/block-actions/index.js.map +1 -1
- package/build-module/components/block-alignment-control/ui.js.map +1 -1
- package/build-module/components/block-alignment-matrix-control/index.js +2 -5
- package/build-module/components/block-alignment-matrix-control/index.js.map +1 -1
- package/build-module/components/block-breadcrumb/index.js.map +1 -1
- package/build-module/components/block-content-overlay/index.js.map +1 -1
- package/build-module/components/block-context/index.js.map +1 -1
- package/build-module/components/block-controls/hook.js.map +1 -1
- package/build-module/components/block-draggable/index.js.map +1 -1
- package/build-module/components/block-draggable/index.native.js.map +1 -1
- package/build-module/components/block-list/block-list-item.native.js.map +1 -1
- package/build-module/components/block-list/block-selection-button.native.js.map +1 -1
- package/build-module/components/block-list/block.js.map +1 -1
- package/build-module/components/block-list/block.native.js.map +1 -1
- package/build-module/components/block-list/index.js.map +1 -1
- package/build-module/components/block-list/index.native.js.map +1 -1
- package/build-module/components/block-list/use-block-props/index.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-block-custom-class-name.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +1 -1
- package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
- package/build-module/components/block-list-appender/index.js.map +1 -1
- package/build-module/components/block-list-appender/index.native.js.map +1 -1
- package/build-module/components/block-mobile-toolbar/block-actions-menu.native.js.map +1 -1
- package/build-module/components/block-mover/button.js.map +1 -1
- package/build-module/components/block-mover/index.native.js.map +1 -1
- package/build-module/components/block-parent-selector/index.js.map +1 -1
- package/build-module/components/block-pattern-setup/index.js +1 -1
- package/build-module/components/block-pattern-setup/index.js.map +1 -1
- package/build-module/components/block-preview/auto.js.map +1 -1
- package/build-module/components/block-selection-clearer/index.js.map +1 -1
- package/build-module/components/block-settings-menu/block-mode-toggle.js +3 -5
- package/build-module/components/block-settings-menu/block-mode-toggle.js.map +1 -1
- package/build-module/components/block-settings-menu/block-settings-dropdown.js +9 -3
- package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
- package/build-module/components/block-styles/index.js +5 -2
- package/build-module/components/block-styles/index.js.map +1 -1
- package/build-module/components/block-styles/menu-items.js +3 -5
- package/build-module/components/block-styles/menu-items.js.map +1 -1
- package/build-module/components/block-switcher/block-transformations-menu.js.map +1 -1
- package/build-module/components/block-toolbar/index.native.js.map +1 -1
- package/build-module/components/block-toolbar/utils.js +3 -5
- package/build-module/components/block-toolbar/utils.js.map +1 -1
- package/build-module/components/block-tools/block-contextual-toolbar.js.map +1 -1
- package/build-module/components/block-tools/index.js.map +1 -1
- package/build-module/components/block-types-list/index.native.js.map +1 -1
- package/build-module/components/block-variation-transforms/index.js.map +1 -1
- package/build-module/components/color-style-selector/index.js.map +1 -1
- package/build-module/components/colors/with-colors.js.map +1 -1
- package/build-module/components/colors-gradients/dropdown.js.map +1 -1
- package/build-module/components/convert-to-group-buttons/toolbar.js.map +1 -1
- package/build-module/components/copy-handler/index.js +18 -2
- package/build-module/components/copy-handler/index.js.map +1 -1
- package/build-module/components/default-block-appender/index.js.map +1 -1
- package/build-module/components/default-block-appender/index.native.js.map +1 -1
- package/build-module/components/default-style-picker/index.js.map +1 -1
- package/build-module/components/font-sizes/with-font-sizes.js.map +1 -1
- package/build-module/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
- package/build-module/components/image-size-control/index.js +4 -1
- package/build-module/components/image-size-control/index.js.map +1 -1
- package/build-module/components/index.js +2 -0
- package/build-module/components/index.js.map +1 -1
- package/build-module/components/inner-blocks/use-inner-block-template-sync.js.map +1 -1
- package/build-module/components/inner-blocks/use-nested-settings-update.js.map +1 -1
- package/build-module/components/inserter/block-types-tab.native.js.map +1 -1
- package/build-module/components/inserter/hooks/use-block-type-impressions.native.js.map +1 -1
- package/build-module/components/inserter/hooks/use-insertion-point.js.map +1 -1
- package/build-module/components/inserter/hooks/use-patterns-state.js.map +1 -1
- package/build-module/components/inserter/index.js.map +1 -1
- package/build-module/components/inserter/index.native.js.map +1 -1
- package/build-module/components/inserter/library.js +2 -5
- package/build-module/components/inserter/library.js.map +1 -1
- package/build-module/components/inserter/menu.js.map +1 -1
- package/build-module/components/inserter/menu.native.js.map +1 -1
- package/build-module/components/inserter/no-results.native.js.map +1 -1
- package/build-module/components/inserter/quick-inserter.js.map +1 -1
- package/build-module/components/inserter/search-items.js +2 -2
- package/build-module/components/inserter/search-items.js.map +1 -1
- package/build-module/components/inserter/search-results.native.js.map +1 -1
- package/build-module/components/inspector-popover-header/index.js +46 -0
- package/build-module/components/inspector-popover-header/index.js.map +1 -0
- package/build-module/components/line-height-control/index.js.map +1 -1
- package/build-module/components/link-control/index.js +2 -1
- package/build-module/components/link-control/index.js.map +1 -1
- package/build-module/components/link-control/search-create-button.js +1 -2
- package/build-module/components/link-control/search-create-button.js.map +1 -1
- package/build-module/components/link-control/search-input.js +3 -1
- package/build-module/components/link-control/search-input.js.map +1 -1
- package/build-module/components/link-control/settings-drawer.js +2 -5
- package/build-module/components/link-control/settings-drawer.js.map +1 -1
- package/build-module/components/link-control/use-search-handler.js.map +1 -1
- package/build-module/components/list-view/block-contents.js.map +1 -1
- package/build-module/components/list-view/branch.js.map +1 -1
- package/build-module/components/list-view/index.js.map +1 -1
- package/build-module/components/list-view/use-block-selection.js.map +1 -1
- package/build-module/components/list-view/use-list-view-drop-zone.js.map +1 -1
- package/build-module/components/list-view/utils.js +1 -6
- package/build-module/components/list-view/utils.js.map +1 -1
- package/build-module/components/media-placeholder/index.js +2 -1
- package/build-module/components/media-placeholder/index.js.map +1 -1
- package/build-module/components/media-replace-flow/index.js +22 -7
- package/build-module/components/media-replace-flow/index.js.map +1 -1
- package/build-module/components/media-upload/index.native.js +1 -1
- package/build-module/components/media-upload/index.native.js.map +1 -1
- package/build-module/components/navigable-toolbar/index.js.map +1 -1
- package/build-module/components/plain-text/index.native.js.map +1 -1
- package/build-module/components/preview-options/index.js +4 -0
- package/build-module/components/preview-options/index.js.map +1 -1
- package/build-module/components/provider/use-block-sync.js +4 -1
- package/build-module/components/provider/use-block-sync.js.map +1 -1
- package/build-module/components/publish-date-time-picker/index.js +14 -16
- package/build-module/components/publish-date-time-picker/index.js.map +1 -1
- package/build-module/components/rich-text/embed-handler-picker.native.js +3 -5
- package/build-module/components/rich-text/embed-handler-picker.native.js.map +1 -1
- package/build-module/components/rich-text/index.js.map +1 -1
- package/build-module/components/rich-text/use-format-types.js.map +1 -1
- package/build-module/components/rich-text/use-mark-persistent.js.map +1 -1
- package/build-module/components/skip-to-selected-block/index.js.map +1 -1
- package/build-module/components/ungroup-button/index.native.js +3 -5
- package/build-module/components/ungroup-button/index.native.js.map +1 -1
- package/build-module/components/url-input/index.js +11 -1
- package/build-module/components/url-input/index.js.map +1 -1
- package/build-module/components/use-block-display-information/index.js.map +1 -1
- package/build-module/components/use-block-drop-zone/index.js.map +1 -1
- package/build-module/components/use-block-drop-zone/index.native.js.map +1 -1
- package/build-module/components/use-display-block-controls/index.native.js.map +1 -1
- package/build-module/components/use-on-block-drop/index.js.map +1 -1
- package/build-module/components/use-on-block-drop/index.native.js.map +1 -1
- package/build-module/components/use-setting/index.js.map +1 -1
- package/build-module/components/writing-flow/use-arrow-nav.js +12 -11
- package/build-module/components/writing-flow/use-arrow-nav.js.map +1 -1
- package/build-module/components/writing-flow/use-click-selection.js.map +1 -1
- package/build-module/components/writing-flow/use-drag-selection.js.map +1 -1
- package/build-module/components/writing-flow/use-multi-selection.js.map +1 -1
- package/build-module/components/writing-flow/use-select-all.js.map +1 -1
- package/build-module/components/writing-flow/use-selection-observer.js.map +1 -1
- package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
- package/build-module/hooks/color-panel.js.map +1 -1
- package/build-module/hooks/color-panel.native.js.map +1 -1
- package/build-module/hooks/color.js.map +1 -1
- package/build-module/hooks/font-family.js.map +1 -1
- package/build-module/hooks/gap.js.map +1 -1
- package/build-module/hooks/layout.js +39 -2
- package/build-module/hooks/layout.js.map +1 -1
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +2 -2
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/utils/pasting.js.map +1 -1
- package/build-module/utils/transform-styles/transforms/wrap.js.map +1 -1
- package/build-style/style-rtl.css +16 -23
- package/build-style/style.css +16 -23
- package/package.json +28 -28
- package/src/autocompleters/block.js +2 -1
- package/src/components/block-actions/index.js +2 -3
- package/src/components/block-alignment-control/ui.js +4 -6
- package/src/components/block-alignment-matrix-control/index.js +2 -4
- package/src/components/block-breadcrumb/index.js +2 -5
- package/src/components/block-compare/test/block-view.js +2 -1
- package/src/components/block-content-overlay/index.js +2 -5
- package/src/components/block-context/index.js +4 -4
- package/src/components/block-controls/hook.js +2 -3
- package/src/components/block-draggable/index.js +6 -13
- package/src/components/block-draggable/index.native.js +6 -14
- package/src/components/block-draggable/test/index.native.js +12 -15
- package/src/components/block-edit/test/edit.js +2 -1
- package/src/components/block-list/block-list-item.native.js +4 -12
- package/src/components/block-list/block-selection-button.native.js +2 -3
- package/src/components/block-list/block.js +8 -10
- package/src/components/block-list/block.native.js +10 -15
- package/src/components/block-list/index.js +2 -3
- package/src/components/block-list/index.native.js +12 -21
- package/src/components/block-list/test/block-list-context.native.js +8 -16
- package/src/components/block-list/use-block-props/index.js +6 -3
- package/src/components/block-list/use-block-props/use-block-custom-class-name.js +2 -3
- package/src/components/block-list/use-block-props/use-selected-block-event-handlers.js +2 -3
- package/src/components/block-list/use-in-between-inserter.js +2 -3
- package/src/components/block-list-appender/index.js +2 -5
- package/src/components/block-list-appender/index.native.js +2 -3
- package/src/components/block-mobile-toolbar/block-actions-menu.native.js +4 -6
- package/src/components/block-mover/button.js +2 -3
- package/src/components/block-mover/index.native.js +4 -6
- package/src/components/block-parent-selector/index.js +2 -3
- package/src/components/block-pattern-setup/index.js +3 -5
- package/src/components/block-preview/auto.js +4 -8
- package/src/components/block-selection-clearer/index.js +2 -3
- package/src/components/block-settings-menu/block-mode-toggle.js +4 -8
- package/src/components/block-settings-menu/block-settings-dropdown.js +9 -9
- package/src/components/block-styles/index.js +3 -1
- package/src/components/block-styles/menu-items.js +2 -5
- package/src/components/block-switcher/block-transformations-menu.js +2 -4
- package/src/components/block-toolbar/index.native.js +2 -5
- package/src/components/block-toolbar/utils.js +3 -11
- package/src/components/block-tools/block-contextual-toolbar.js +2 -5
- package/src/components/block-tools/index.js +2 -3
- package/src/components/block-types-list/index.native.js +2 -4
- package/src/components/block-variation-transforms/index.js +4 -6
- package/src/components/color-palette/test/control.js +2 -1
- package/src/components/color-style-selector/index.js +27 -28
- package/src/components/colors/test/with-colors.js +14 -14
- package/src/components/colors/with-colors.js +8 -12
- package/src/components/colors-gradients/dropdown.js +21 -16
- package/src/components/colors-gradients/test/control.js +10 -10
- package/src/components/convert-to-group-buttons/toolbar.js +2 -6
- package/src/components/copy-handler/README.md +7 -2
- package/src/components/copy-handler/index.js +26 -6
- package/src/components/default-block-appender/index.js +4 -6
- package/src/components/default-block-appender/index.native.js +4 -9
- package/src/components/default-style-picker/index.js +20 -21
- package/src/components/font-sizes/with-font-sizes.js +2 -3
- package/src/components/image-editor/aspect-ratio-dropdown.js +2 -6
- package/src/components/image-size-control/index.js +4 -7
- package/src/components/index.js +2 -0
- package/src/components/inner-blocks/use-inner-block-template-sync.js +2 -3
- package/src/components/inner-blocks/use-nested-settings-update.js +6 -9
- package/src/components/inserter/block-types-tab.native.js +2 -3
- package/src/components/inserter/hooks/use-block-type-impressions.native.js +2 -3
- package/src/components/inserter/hooks/use-insertion-point.js +3 -2
- package/src/components/inserter/hooks/use-patterns-state.js +4 -5
- package/src/components/inserter/index.js +4 -6
- package/src/components/inserter/index.native.js +6 -11
- package/src/components/inserter/library.js +2 -5
- package/src/components/inserter/menu.js +14 -19
- package/src/components/inserter/menu.native.js +8 -6
- package/src/components/inserter/no-results.native.js +2 -1
- package/src/components/inserter/quick-inserter.js +2 -3
- package/src/components/inserter/search-items.js +6 -6
- package/src/components/inserter/search-results.native.js +4 -6
- package/src/components/inspector-popover-header/README.md +76 -0
- package/src/components/inspector-popover-header/index.js +56 -0
- package/src/components/inspector-popover-header/style.scss +16 -0
- package/src/components/line-height-control/index.js +1 -2
- package/src/components/link-control/index.js +4 -4
- package/src/components/link-control/search-create-button.js +4 -2
- package/src/components/link-control/search-input.js +3 -1
- package/src/components/link-control/settings-drawer.js +2 -5
- package/src/components/link-control/test/fixtures/index.js +3 -4
- package/src/components/link-control/test/index.js +24 -36
- package/src/components/link-control/use-search-handler.js +2 -2
- package/src/components/list-view/block-contents.js +2 -4
- package/src/components/list-view/branch.js +22 -23
- package/src/components/list-view/index.js +4 -8
- package/src/components/list-view/use-block-selection.js +5 -5
- package/src/components/list-view/use-list-view-drop-zone.js +2 -1
- package/src/components/list-view/utils.js +1 -6
- package/src/components/media-placeholder/index.js +2 -1
- package/src/components/media-replace-flow/index.js +77 -46
- package/src/components/media-upload/index.native.js +1 -1
- package/src/components/navigable-toolbar/index.js +1 -2
- package/src/components/panel-color-settings/test/index.js +2 -1
- package/src/components/plain-text/index.native.js +2 -6
- package/src/components/preview-options/index.js +4 -0
- package/src/components/provider/use-block-sync.js +5 -2
- package/src/components/publish-date-time-picker/README.md +1 -1
- package/src/components/publish-date-time-picker/index.js +16 -27
- package/src/components/responsive-block-control/test/index.js +3 -2
- package/src/components/rich-text/embed-handler-picker.native.js +2 -5
- package/src/components/rich-text/index.js +7 -4
- package/src/components/rich-text/use-format-types.js +16 -16
- package/src/components/rich-text/use-mark-persistent.js +2 -3
- package/src/components/skip-to-selected-block/index.js +2 -3
- package/src/components/ungroup-button/index.native.js +4 -8
- package/src/components/url-input/index.js +21 -20
- package/src/components/use-block-display-information/index.js +4 -6
- package/src/components/use-block-drop-zone/index.js +2 -3
- package/src/components/use-block-drop-zone/index.native.js +2 -4
- package/src/components/use-block-drop-zone/test/index.js +22 -23
- package/src/components/use-display-block-controls/index.native.js +2 -3
- package/src/components/use-no-recursive-renders/test/use-no-recursive-renders.js +2 -3
- package/src/components/use-on-block-drop/index.js +2 -5
- package/src/components/use-on-block-drop/index.native.js +4 -8
- package/src/components/use-setting/index.js +8 -6
- package/src/components/writing-flow/test/index.js +22 -4
- package/src/components/writing-flow/use-arrow-nav.js +22 -10
- package/src/components/writing-flow/use-click-selection.js +2 -5
- package/src/components/writing-flow/use-drag-selection.js +6 -9
- package/src/components/writing-flow/use-multi-selection.js +2 -4
- package/src/components/writing-flow/use-select-all.js +2 -5
- package/src/components/writing-flow/use-selection-observer.js +4 -6
- package/src/components/writing-flow/use-tab-nav.js +2 -5
- package/src/hooks/color-panel.js +4 -4
- package/src/hooks/color-panel.native.js +2 -2
- package/src/hooks/color.js +2 -2
- package/src/hooks/font-family.js +4 -2
- package/src/hooks/gap.js +2 -3
- package/src/hooks/layout.js +54 -4
- package/src/hooks/test/align.js +2 -1
- package/src/hooks/test/generated-class-name.js +2 -5
- package/src/hooks/test/utils.js +2 -5
- package/src/store/actions.js +772 -728
- package/src/store/reducer.js +188 -177
- package/src/store/selectors.js +54 -54
- package/src/store/test/actions.js +2 -1
- package/src/store/test/reducer.js +3 -1
- package/src/store/test/selectors.js +17 -21
- package/src/style.scss +1 -1
- package/src/utils/pasting.js +3 -3
- package/src/utils/transform-styles/transforms/wrap.js +30 -28
- package/tsconfig.tsbuildinfo +1 -1
- package/src/components/publish-date-time-picker/style.scss +0 -20
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-editor/src/utils/pasting.js"],"names":["createBlobURL","getFilesFromDataTransfer","getPasteEventData","clipboardData","plainText","html","getData","error1","error2","files","filter","type","test","length","shouldDismissPastedFiles","map","file","join","indexOf","IMAGE_TAG","match"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,aAAT,QAA8B,iBAA9B;AACA,SAASC,wBAAT,QAAyC,gBAAzC;AAEA,OAAO,SAASC,iBAAT,OAAgD;AAAA,MAApB;AAAEC,IAAAA;AAAF,GAAoB;AACtD,MAAIC,SAAS,GAAG,EAAhB;AACA,MAAIC,IAAI,GAAG,EAAX,CAFsD,CAItD;AACA;AACA;;AACA,MAAI;AACHD,IAAAA,SAAS,GAAGD,aAAa,CAACG,OAAd,CAAuB,YAAvB,CAAZ;AACAD,IAAAA,IAAI,GAAGF,aAAa,CAACG,OAAd,CAAuB,WAAvB,CAAP;AACA,GAHD,CAGE,OAAQC,MAAR,EAAiB;AAClB,QAAI;AACHF,MAAAA,IAAI,GAAGF,aAAa,CAACG,OAAd,CAAuB,MAAvB,CAAP;AACA,KAFD,CAEE,OAAQE,MAAR,EAAiB;AAClB;AACA;AACA;AACA;AACA;AACD;;AAED,QAAMC,KAAK,GAAGR,wBAAwB,
|
|
1
|
+
{"version":3,"sources":["@wordpress/block-editor/src/utils/pasting.js"],"names":["createBlobURL","getFilesFromDataTransfer","getPasteEventData","clipboardData","plainText","html","getData","error1","error2","files","filter","type","test","length","shouldDismissPastedFiles","map","file","join","indexOf","IMAGE_TAG","match"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,aAAT,QAA8B,iBAA9B;AACA,SAASC,wBAAT,QAAyC,gBAAzC;AAEA,OAAO,SAASC,iBAAT,OAAgD;AAAA,MAApB;AAAEC,IAAAA;AAAF,GAAoB;AACtD,MAAIC,SAAS,GAAG,EAAhB;AACA,MAAIC,IAAI,GAAG,EAAX,CAFsD,CAItD;AACA;AACA;;AACA,MAAI;AACHD,IAAAA,SAAS,GAAGD,aAAa,CAACG,OAAd,CAAuB,YAAvB,CAAZ;AACAD,IAAAA,IAAI,GAAGF,aAAa,CAACG,OAAd,CAAuB,WAAvB,CAAP;AACA,GAHD,CAGE,OAAQC,MAAR,EAAiB;AAClB,QAAI;AACHF,MAAAA,IAAI,GAAGF,aAAa,CAACG,OAAd,CAAuB,MAAvB,CAAP;AACA,KAFD,CAEE,OAAQE,MAAR,EAAiB;AAClB;AACA;AACA;AACA;AACA;AACD;;AAED,QAAMC,KAAK,GAAGR,wBAAwB,CAAEE,aAAF,CAAxB,CAA0CO,MAA1C,CACb;AAAA,QAAE;AAAEC,MAAAA;AAAF,KAAF;AAAA,WAAgB,kCAAkCC,IAAlC,CAAwCD,IAAxC,CAAhB;AAAA,GADa,CAAd;;AAIA,MACCF,KAAK,CAACI,MAAN,IACA,CAAEC,wBAAwB,CAAEL,KAAF,EAASJ,IAAT,EAAeD,SAAf,CAF3B,EAGE;AACDC,IAAAA,IAAI,GAAGI,KAAK,CACVM,GADK,CACEC,IAAF,IAAa,aAAahB,aAAa,CAAEgB,IAAF,CAAU,IADjD,EAELC,IAFK,CAEC,EAFD,CAAP;AAGAb,IAAAA,SAAS,GAAG,EAAZ;AACA;;AAED,SAAO;AAAEC,IAAAA,IAAF;AAAQD,IAAAA;AAAR,GAAP;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASU,wBAAT,CAAmCL,KAAnC,EAA0CJ;AAAK;AAA/C,EAAkE;AACxE;AACA;AACA,MACCA,IAAI,IACJ,CAAAI,KAAK,SAAL,IAAAA,KAAK,WAAL,YAAAA,KAAK,CAAEI,MAAP,MAAkB,CADlB,IAEAJ,KAAK,CAAE,CAAF,CAAL,CAAWE,IAAX,CAAgBO,OAAhB,CAAyB,QAAzB,MAAwC,CAHzC,EAIE;AAAA;;AACD;AACA;AACA;AACA;AACA,UAAMC,SAAS,GAAG,aAAlB;AACA,WAAO,gBAAAd,IAAI,CAACe,KAAL,CAAYD,SAAZ,6DAAyBN,MAAzB,MAAoC,CAA3C;AACA;;AAED,SAAO,KAAP;AACA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createBlobURL } from '@wordpress/blob';\nimport { getFilesFromDataTransfer } from '@wordpress/dom';\n\nexport function getPasteEventData( { clipboardData } ) {\n\tlet plainText = '';\n\tlet html = '';\n\n\t// IE11 only supports `Text` as an argument for `getData` and will\n\t// otherwise throw an invalid argument error, so we try the standard\n\t// arguments first, then fallback to `Text` if they fail.\n\ttry {\n\t\tplainText = clipboardData.getData( 'text/plain' );\n\t\thtml = clipboardData.getData( 'text/html' );\n\t} catch ( error1 ) {\n\t\ttry {\n\t\t\thtml = clipboardData.getData( 'Text' );\n\t\t} catch ( error2 ) {\n\t\t\t// Some browsers like UC Browser paste plain text by default and\n\t\t\t// don't support clipboardData at all, so allow default\n\t\t\t// behaviour.\n\t\t\treturn;\n\t\t}\n\t}\n\n\tconst files = getFilesFromDataTransfer( clipboardData ).filter(\n\t\t( { type } ) => /^image\\/(?:jpe?g|png|gif|webp)$/.test( type )\n\t);\n\n\tif (\n\t\tfiles.length &&\n\t\t! shouldDismissPastedFiles( files, html, plainText )\n\t) {\n\t\thtml = files\n\t\t\t.map( ( file ) => `<img src=\"${ createBlobURL( file ) }\">` )\n\t\t\t.join( '' );\n\t\tplainText = '';\n\t}\n\n\treturn { html, plainText };\n}\n\n/**\n * Given a collection of DataTransfer files and HTML and plain text strings,\n * determine whether the files are to be dismissed in favor of the HTML.\n *\n * Certain office-type programs, like Microsoft Word or Apple Numbers,\n * will, upon copy, generate a screenshot of the content being copied and\n * attach it to the clipboard alongside the actual rich text that the user\n * sought to copy. In those cases, we should let Gutenberg handle the rich text\n * content and not the screenshot, since this allows Gutenberg to insert\n * meaningful blocks, like paragraphs, lists or even tables.\n *\n * @param {File[]} files File objects obtained from a paste event\n * @param {string} html HTML content obtained from a paste event\n * @return {boolean} True if the files should be dismissed\n */\nexport function shouldDismissPastedFiles( files, html /*, plainText */ ) {\n\t// The question is only relevant when there is actual HTML content and when\n\t// there is exactly one image file.\n\tif (\n\t\thtml &&\n\t\tfiles?.length === 1 &&\n\t\tfiles[ 0 ].type.indexOf( 'image/' ) === 0\n\t) {\n\t\t// A single <img> tag found in the HTML source suggests that the\n\t\t// content being pasted revolves around an image. Sometimes there are\n\t\t// other elements found, like <figure>, but we assume that the user's\n\t\t// intention is to paste the actual image file.\n\t\tconst IMAGE_TAG = /<\\s*img\\b/gi;\n\t\treturn html.match( IMAGE_TAG )?.length !== 1;\n\t}\n\n\treturn false;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-editor/src/utils/transform-styles/transforms/wrap.js"],"names":["IS_ROOT_TAG","wrap","namespace","ignore","node","updateSelector","selector","includes","trim","match","replace","type","selectors","map"],"mappings":"AAAA;AACA;AACA;AACA,MAAMA,WAAW,GAAG,uBAApB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,MAAMC,IAAI,
|
|
1
|
+
{"version":3,"sources":["@wordpress/block-editor/src/utils/transform-styles/transforms/wrap.js"],"names":["IS_ROOT_TAG","wrap","namespace","ignore","node","updateSelector","selector","includes","trim","match","replace","type","selectors","map"],"mappings":"AAAA;AACA;AACA;AACA,MAAMA,WAAW,GAAG,uBAApB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,MAAMC,IAAI,GACT,UAAEC,SAAF;AAAA,MAAaC,MAAb,uEAAsB,EAAtB;AAAA,SACEC,IAAF,IAAY;AACX;AACF;AACA;AACA;AACA;AACA;AACA;AACE,UAAMC,cAAc,GAAKC,QAAF,IAAgB;AACtC,UAAKH,MAAM,CAACI,QAAP,CAAiBD,QAAQ,CAACE,IAAT,EAAjB,CAAL,EAA0C;AACzC,eAAOF,QAAP;AACA,OAHqC,CAKtC;;;AACA;AACC,YAAK,CAAEA,QAAQ,CAACG,KAAT,CAAgBT,WAAhB,CAAP,EAAuC;AACtC,iBAAOE,SAAS,GAAG,GAAZ,GAAkBI,QAAzB;AACA;AACD,OAVqC,CAYtC;;AACA,aAAOA,QAAQ,CAACI,OAAT,CAAkB,oBAAlB,EAAwCR,SAAxC,CAAP;AACA,KAdD;;AAgBA,QAAKE,IAAI,CAACO,IAAL,KAAc,MAAnB,EAA4B;AAC3B,aAAO,EACN,GAAGP,IADG;AAENQ,QAAAA,SAAS,EAAER,IAAI,CAACQ,SAAL,CAAeC,GAAf,CAAoBR,cAApB;AAFL,OAAP;AAIA;;AAED,WAAOD,IAAP;AACA,GAjCD;AAAA,CADD;;AAoCA,eAAeH,IAAf","sourcesContent":["/**\n * @constant string IS_ROOT_TAG Regex to check if the selector is a root tag selector.\n */\nconst IS_ROOT_TAG = /^(body|html|:root).*$/;\n\n/**\n * Creates a callback to modify selectors so they only apply within a certain\n * namespace.\n *\n * @param {string} namespace Namespace to prefix selectors with.\n * @param {string[]} ignore Selectors to not prefix.\n *\n * @return {(node: Object) => Object} Callback to wrap selectors.\n */\nconst wrap =\n\t( namespace, ignore = [] ) =>\n\t( node ) => {\n\t\t/**\n\t\t * Updates selector if necessary.\n\t\t *\n\t\t * @param {string} selector Selector to modify.\n\t\t *\n\t\t * @return {string} Updated selector.\n\t\t */\n\t\tconst updateSelector = ( selector ) => {\n\t\t\tif ( ignore.includes( selector.trim() ) ) {\n\t\t\t\treturn selector;\n\t\t\t}\n\n\t\t\t// Anything other than a root tag is always prefixed.\n\t\t\t{\n\t\t\t\tif ( ! selector.match( IS_ROOT_TAG ) ) {\n\t\t\t\t\treturn namespace + ' ' + selector;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// HTML and Body elements cannot be contained within our container so lets extract their styles.\n\t\t\treturn selector.replace( /^(body|html|:root)/, namespace );\n\t\t};\n\n\t\tif ( node.type === 'rule' ) {\n\t\t\treturn {\n\t\t\t\t...node,\n\t\t\t\tselectors: node.selectors.map( updateSelector ),\n\t\t\t};\n\t\t}\n\n\t\treturn node;\n\t};\n\nexport default wrap;\n"]}
|
|
@@ -1989,6 +1989,21 @@
|
|
|
1989
1989
|
font-size: 12px;
|
|
1990
1990
|
}
|
|
1991
1991
|
|
|
1992
|
+
.block-editor-inspector-popover-header {
|
|
1993
|
+
margin-bottom: 16px;
|
|
1994
|
+
}
|
|
1995
|
+
|
|
1996
|
+
[class].block-editor-inspector-popover-header__action {
|
|
1997
|
+
height: 24px;
|
|
1998
|
+
}
|
|
1999
|
+
[class].block-editor-inspector-popover-header__action.has-icon {
|
|
2000
|
+
min-width: 24px;
|
|
2001
|
+
padding: 0;
|
|
2002
|
+
}
|
|
2003
|
+
[class].block-editor-inspector-popover-header__action:not(.has-icon) {
|
|
2004
|
+
text-decoration: underline;
|
|
2005
|
+
}
|
|
2006
|
+
|
|
1992
2007
|
.items-justified-left {
|
|
1993
2008
|
justify-content: flex-start;
|
|
1994
2009
|
}
|
|
@@ -2996,27 +3011,6 @@
|
|
|
2996
3011
|
width: 100%;
|
|
2997
3012
|
}
|
|
2998
3013
|
|
|
2999
|
-
.block-editor-publish-date-time-picker__header {
|
|
3000
|
-
margin-bottom: 1em;
|
|
3001
|
-
}
|
|
3002
|
-
|
|
3003
|
-
.block-editor-publish-date-time-picker__heading {
|
|
3004
|
-
font-size: 13px;
|
|
3005
|
-
margin: 0;
|
|
3006
|
-
}
|
|
3007
|
-
|
|
3008
|
-
.block-editor-publish-date-time-picker__reset {
|
|
3009
|
-
height: 24px;
|
|
3010
|
-
margin: 0;
|
|
3011
|
-
text-decoration: underline;
|
|
3012
|
-
}
|
|
3013
|
-
|
|
3014
|
-
[class].block-editor-publish-date-time-picker__close {
|
|
3015
|
-
height: 24px;
|
|
3016
|
-
min-width: 24px;
|
|
3017
|
-
padding: 0;
|
|
3018
|
-
}
|
|
3019
|
-
|
|
3020
3014
|
.block-editor-responsive-block-control {
|
|
3021
3015
|
margin-bottom: 28px;
|
|
3022
3016
|
border-bottom: 1px solid #ccc;
|
|
@@ -3050,8 +3044,7 @@
|
|
|
3050
3044
|
.block-editor-responsive-block-control .components-base-control__help {
|
|
3051
3045
|
border: 0;
|
|
3052
3046
|
clip: rect(1px, 1px, 1px, 1px);
|
|
3053
|
-
|
|
3054
|
-
clip-path: inset(50%);
|
|
3047
|
+
clip-path: inset(50%);
|
|
3055
3048
|
height: 1px;
|
|
3056
3049
|
margin: -1px;
|
|
3057
3050
|
overflow: hidden;
|
package/build-style/style.css
CHANGED
|
@@ -1989,6 +1989,21 @@
|
|
|
1989
1989
|
font-size: 12px;
|
|
1990
1990
|
}
|
|
1991
1991
|
|
|
1992
|
+
.block-editor-inspector-popover-header {
|
|
1993
|
+
margin-bottom: 16px;
|
|
1994
|
+
}
|
|
1995
|
+
|
|
1996
|
+
[class].block-editor-inspector-popover-header__action {
|
|
1997
|
+
height: 24px;
|
|
1998
|
+
}
|
|
1999
|
+
[class].block-editor-inspector-popover-header__action.has-icon {
|
|
2000
|
+
min-width: 24px;
|
|
2001
|
+
padding: 0;
|
|
2002
|
+
}
|
|
2003
|
+
[class].block-editor-inspector-popover-header__action:not(.has-icon) {
|
|
2004
|
+
text-decoration: underline;
|
|
2005
|
+
}
|
|
2006
|
+
|
|
1992
2007
|
.items-justified-left {
|
|
1993
2008
|
justify-content: flex-start;
|
|
1994
2009
|
}
|
|
@@ -2996,27 +3011,6 @@
|
|
|
2996
3011
|
width: 100%;
|
|
2997
3012
|
}
|
|
2998
3013
|
|
|
2999
|
-
.block-editor-publish-date-time-picker__header {
|
|
3000
|
-
margin-bottom: 1em;
|
|
3001
|
-
}
|
|
3002
|
-
|
|
3003
|
-
.block-editor-publish-date-time-picker__heading {
|
|
3004
|
-
font-size: 13px;
|
|
3005
|
-
margin: 0;
|
|
3006
|
-
}
|
|
3007
|
-
|
|
3008
|
-
.block-editor-publish-date-time-picker__reset {
|
|
3009
|
-
height: 24px;
|
|
3010
|
-
margin: 0;
|
|
3011
|
-
text-decoration: underline;
|
|
3012
|
-
}
|
|
3013
|
-
|
|
3014
|
-
[class].block-editor-publish-date-time-picker__close {
|
|
3015
|
-
height: 24px;
|
|
3016
|
-
min-width: 24px;
|
|
3017
|
-
padding: 0;
|
|
3018
|
-
}
|
|
3019
|
-
|
|
3020
3014
|
.block-editor-responsive-block-control {
|
|
3021
3015
|
margin-bottom: 28px;
|
|
3022
3016
|
border-bottom: 1px solid #ccc;
|
|
@@ -3050,8 +3044,7 @@
|
|
|
3050
3044
|
.block-editor-responsive-block-control .components-base-control__help {
|
|
3051
3045
|
border: 0;
|
|
3052
3046
|
clip: rect(1px, 1px, 1px, 1px);
|
|
3053
|
-
|
|
3054
|
-
clip-path: inset(50%);
|
|
3047
|
+
clip-path: inset(50%);
|
|
3055
3048
|
height: 1px;
|
|
3056
3049
|
margin: -1px;
|
|
3057
3050
|
overflow: hidden;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/block-editor",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.3.0",
|
|
4
4
|
"description": "Generic block editor.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -33,32 +33,32 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@babel/runtime": "^7.16.0",
|
|
35
35
|
"@react-spring/web": "^9.4.5",
|
|
36
|
-
"@wordpress/a11y": "^3.
|
|
37
|
-
"@wordpress/api-fetch": "^6.
|
|
38
|
-
"@wordpress/blob": "^3.
|
|
39
|
-
"@wordpress/blocks": "^11.
|
|
40
|
-
"@wordpress/components": "^19.
|
|
41
|
-
"@wordpress/compose": "^5.
|
|
42
|
-
"@wordpress/data": "^6.
|
|
43
|
-
"@wordpress/date": "^4.
|
|
44
|
-
"@wordpress/deprecated": "^3.
|
|
45
|
-
"@wordpress/dom": "^3.
|
|
46
|
-
"@wordpress/element": "^4.
|
|
47
|
-
"@wordpress/hooks": "^3.
|
|
48
|
-
"@wordpress/html-entities": "^3.
|
|
49
|
-
"@wordpress/i18n": "^4.
|
|
50
|
-
"@wordpress/icons": "^9.
|
|
51
|
-
"@wordpress/is-shallow-equal": "^4.
|
|
52
|
-
"@wordpress/keyboard-shortcuts": "^3.
|
|
53
|
-
"@wordpress/keycodes": "^3.
|
|
54
|
-
"@wordpress/notices": "^3.
|
|
55
|
-
"@wordpress/rich-text": "^5.
|
|
56
|
-
"@wordpress/shortcode": "^3.
|
|
57
|
-
"@wordpress/style-engine": "^0.
|
|
58
|
-
"@wordpress/token-list": "^2.
|
|
59
|
-
"@wordpress/url": "^3.
|
|
60
|
-
"@wordpress/warning": "^2.
|
|
61
|
-
"@wordpress/wordcount": "^3.
|
|
36
|
+
"@wordpress/a11y": "^3.11.0",
|
|
37
|
+
"@wordpress/api-fetch": "^6.8.0",
|
|
38
|
+
"@wordpress/blob": "^3.11.0",
|
|
39
|
+
"@wordpress/blocks": "^11.10.0",
|
|
40
|
+
"@wordpress/components": "^19.13.0",
|
|
41
|
+
"@wordpress/compose": "^5.9.0",
|
|
42
|
+
"@wordpress/data": "^6.11.0",
|
|
43
|
+
"@wordpress/date": "^4.11.0",
|
|
44
|
+
"@wordpress/deprecated": "^3.11.0",
|
|
45
|
+
"@wordpress/dom": "^3.11.0",
|
|
46
|
+
"@wordpress/element": "^4.9.0",
|
|
47
|
+
"@wordpress/hooks": "^3.11.0",
|
|
48
|
+
"@wordpress/html-entities": "^3.11.0",
|
|
49
|
+
"@wordpress/i18n": "^4.11.0",
|
|
50
|
+
"@wordpress/icons": "^9.2.0",
|
|
51
|
+
"@wordpress/is-shallow-equal": "^4.11.0",
|
|
52
|
+
"@wordpress/keyboard-shortcuts": "^3.9.0",
|
|
53
|
+
"@wordpress/keycodes": "^3.11.0",
|
|
54
|
+
"@wordpress/notices": "^3.11.0",
|
|
55
|
+
"@wordpress/rich-text": "^5.9.0",
|
|
56
|
+
"@wordpress/shortcode": "^3.11.0",
|
|
57
|
+
"@wordpress/style-engine": "^0.10.0",
|
|
58
|
+
"@wordpress/token-list": "^2.11.0",
|
|
59
|
+
"@wordpress/url": "^3.12.0",
|
|
60
|
+
"@wordpress/warning": "^2.11.0",
|
|
61
|
+
"@wordpress/wordcount": "^3.11.0",
|
|
62
62
|
"classnames": "^2.3.1",
|
|
63
63
|
"colord": "^2.7.0",
|
|
64
64
|
"diff": "^4.0.2",
|
|
@@ -77,5 +77,5 @@
|
|
|
77
77
|
"publishConfig": {
|
|
78
78
|
"access": "public"
|
|
79
79
|
},
|
|
80
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "48d5f37dfb52d2e77c8eeb662f9874cf141b8c6b"
|
|
81
81
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
4
|
+
import { orderBy } from 'lodash';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* WordPress dependencies
|
|
@@ -21,6 +21,7 @@ import useBlockTypesState from '../components/inserter/hooks/use-block-types-sta
|
|
|
21
21
|
import BlockIcon from '../components/block-icon';
|
|
22
22
|
import { store as blockEditorStore } from '../store';
|
|
23
23
|
|
|
24
|
+
const noop = () => {};
|
|
24
25
|
const SHOWN_BLOCK_TYPES = 9;
|
|
25
26
|
|
|
26
27
|
/** @typedef {import('@wordpress/components').WPCompleter} WPCompleter */
|
|
@@ -31,9 +31,8 @@ export default function BlockActions( {
|
|
|
31
31
|
canMoveBlocks,
|
|
32
32
|
canRemoveBlocks,
|
|
33
33
|
} = useSelect( blockEditorStore );
|
|
34
|
-
const { getDefaultBlockName, getGroupingBlockName } =
|
|
35
|
-
blocksStore
|
|
36
|
-
);
|
|
34
|
+
const { getDefaultBlockName, getGroupingBlockName } =
|
|
35
|
+
useSelect( blocksStore );
|
|
37
36
|
|
|
38
37
|
const blocks = getBlocksByClientId( clientIds );
|
|
39
38
|
const rootClientId = getBlockRootClientId( clientIds[ 0 ] );
|
|
@@ -76,12 +76,10 @@ function BlockAlignmentUI( {
|
|
|
76
76
|
<MenuGroup className="block-editor-block-alignment-control__menu-group">
|
|
77
77
|
{ enabledControls.map(
|
|
78
78
|
( { name: controlName, info } ) => {
|
|
79
|
-
const {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
controlName
|
|
84
|
-
];
|
|
79
|
+
const { icon, title } =
|
|
80
|
+
BLOCK_ALIGNMENTS_CONTROLS[
|
|
81
|
+
controlName
|
|
82
|
+
];
|
|
85
83
|
// If no value is provided, mark as selected the `none` option.
|
|
86
84
|
const isSelected =
|
|
87
85
|
controlName === value ||
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { noop } from 'lodash';
|
|
5
1
|
/**
|
|
6
2
|
* WordPress dependencies
|
|
7
3
|
*/
|
|
@@ -13,6 +9,8 @@ import {
|
|
|
13
9
|
__experimentalAlignmentMatrixControl as AlignmentMatrixControl,
|
|
14
10
|
} from '@wordpress/components';
|
|
15
11
|
|
|
12
|
+
const noop = () => {};
|
|
13
|
+
|
|
16
14
|
function BlockAlignmentMatrixControl( props ) {
|
|
17
15
|
const {
|
|
18
16
|
label = __( 'Change matrix alignment' ),
|
|
@@ -22,11 +22,8 @@ import { store as blockEditorStore } from '../../store';
|
|
|
22
22
|
function BlockBreadcrumb( { rootLabelText } ) {
|
|
23
23
|
const { selectBlock, clearSelectedBlock } = useDispatch( blockEditorStore );
|
|
24
24
|
const { clientId, parents, hasSelection } = useSelect( ( select ) => {
|
|
25
|
-
const {
|
|
26
|
-
|
|
27
|
-
getSelectedBlockClientId,
|
|
28
|
-
getBlockParents,
|
|
29
|
-
} = select( blockEditorStore );
|
|
25
|
+
const { getSelectionStart, getSelectedBlockClientId, getBlockParents } =
|
|
26
|
+
select( blockEditorStore );
|
|
30
27
|
const selectedBlockClientId = getSelectedBlockClientId();
|
|
31
28
|
return {
|
|
32
29
|
parents: getBlockParents( selectedBlockClientId ),
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { shallow } from 'enzyme';
|
|
5
|
-
import { noop } from 'lodash';
|
|
6
5
|
|
|
7
6
|
/**
|
|
8
7
|
* Internal dependencies
|
|
9
8
|
*/
|
|
10
9
|
import BlockView from '../block-view';
|
|
11
10
|
|
|
11
|
+
const noop = () => {};
|
|
12
|
+
|
|
12
13
|
describe( 'BlockView', () => {
|
|
13
14
|
test( 'should match snapshot', () => {
|
|
14
15
|
const wrapper = shallow(
|
|
@@ -11,11 +11,8 @@ import { store as blockEditorStore } from '../../store';
|
|
|
11
11
|
export default function useBlockOverlayActive( clientId ) {
|
|
12
12
|
return useSelect(
|
|
13
13
|
( select ) => {
|
|
14
|
-
const {
|
|
15
|
-
|
|
16
|
-
hasSelectedInnerBlock,
|
|
17
|
-
canEditBlock,
|
|
18
|
-
} = select( blockEditorStore );
|
|
14
|
+
const { isBlockSelected, hasSelectedInnerBlock, canEditBlock } =
|
|
15
|
+
select( blockEditorStore );
|
|
19
16
|
|
|
20
17
|
return (
|
|
21
18
|
! canEditBlock( clientId ) ||
|
|
@@ -25,10 +25,10 @@ const Context = createContext( {} );
|
|
|
25
25
|
*/
|
|
26
26
|
export function BlockContextProvider( { value, children } ) {
|
|
27
27
|
const context = useContext( Context );
|
|
28
|
-
const nextValue = useMemo(
|
|
29
|
-
context,
|
|
30
|
-
value
|
|
31
|
-
|
|
28
|
+
const nextValue = useMemo(
|
|
29
|
+
() => ( { ...context, ...value } ),
|
|
30
|
+
[ context, value ]
|
|
31
|
+
);
|
|
32
32
|
|
|
33
33
|
return <Context.Provider value={ nextValue } children={ children } />;
|
|
34
34
|
}
|
|
@@ -17,9 +17,8 @@ export default function useBlockControlsFill( group, shareWithChildBlocks ) {
|
|
|
17
17
|
const { clientId } = useBlockEditContext();
|
|
18
18
|
const isParentDisplayed = useSelect(
|
|
19
19
|
( select ) => {
|
|
20
|
-
const { getBlockName, hasSelectedInnerBlock } =
|
|
21
|
-
blockEditorStore
|
|
22
|
-
);
|
|
20
|
+
const { getBlockName, hasSelectedInnerBlock } =
|
|
21
|
+
select( blockEditorStore );
|
|
23
22
|
const { hasBlockSupport } = select( blocksStore );
|
|
24
23
|
return (
|
|
25
24
|
shareWithChildBlocks &&
|
|
@@ -22,11 +22,8 @@ const BlockDraggable = ( {
|
|
|
22
22
|
} ) => {
|
|
23
23
|
const { srcRootClientId, isDraggable, icon } = useSelect(
|
|
24
24
|
( select ) => {
|
|
25
|
-
const {
|
|
26
|
-
|
|
27
|
-
getBlockRootClientId,
|
|
28
|
-
getBlockName,
|
|
29
|
-
} = select( blockEditorStore );
|
|
25
|
+
const { canMoveBlocks, getBlockRootClientId, getBlockName } =
|
|
26
|
+
select( blockEditorStore );
|
|
30
27
|
const rootClientId = getBlockRootClientId( clientIds[ 0 ] );
|
|
31
28
|
const blockName = getBlockName( clientIds[ 0 ] );
|
|
32
29
|
|
|
@@ -39,15 +36,11 @@ const BlockDraggable = ( {
|
|
|
39
36
|
[ clientIds ]
|
|
40
37
|
);
|
|
41
38
|
const isDragging = useRef( false );
|
|
42
|
-
const [
|
|
43
|
-
|
|
44
|
-
scrollOnDragOver,
|
|
45
|
-
stopScrolling,
|
|
46
|
-
] = useScrollWhenDragging();
|
|
39
|
+
const [ startScrolling, scrollOnDragOver, stopScrolling ] =
|
|
40
|
+
useScrollWhenDragging();
|
|
47
41
|
|
|
48
|
-
const { startDraggingBlocks, stopDraggingBlocks } =
|
|
49
|
-
blockEditorStore
|
|
50
|
-
);
|
|
42
|
+
const { startDraggingBlocks, stopDraggingBlocks } =
|
|
43
|
+
useDispatch( blockEditorStore );
|
|
51
44
|
|
|
52
45
|
// Stop dragging blocks if the block draggable is unmounted.
|
|
53
46
|
useEffect( () => {
|
|
@@ -71,11 +71,8 @@ const DEFAULT_IOS_LONG_PRESS_MIN_DURATION =
|
|
|
71
71
|
const BlockDraggableWrapper = ( { children, isRTL } ) => {
|
|
72
72
|
const [ draggedBlockIcon, setDraggedBlockIcon ] = useState();
|
|
73
73
|
|
|
74
|
-
const {
|
|
75
|
-
|
|
76
|
-
startDraggingBlocks,
|
|
77
|
-
stopDraggingBlocks,
|
|
78
|
-
} = useDispatch( blockEditorStore );
|
|
74
|
+
const { selectBlock, startDraggingBlocks, stopDraggingBlocks } =
|
|
75
|
+
useDispatch( blockEditorStore );
|
|
79
76
|
|
|
80
77
|
const { scrollRef } = useBlockListContext();
|
|
81
78
|
const animatedScrollRef = useAnimatedRef();
|
|
@@ -112,12 +109,8 @@ const BlockDraggableWrapper = ( { children, isRTL } ) => {
|
|
|
112
109
|
draggingScrollHandler( event );
|
|
113
110
|
};
|
|
114
111
|
|
|
115
|
-
const {
|
|
116
|
-
|
|
117
|
-
onBlockDragEnd,
|
|
118
|
-
onBlockDrop,
|
|
119
|
-
targetBlockIndex,
|
|
120
|
-
} = useBlockDropZone();
|
|
112
|
+
const { onBlockDragOver, onBlockDragEnd, onBlockDrop, targetBlockIndex } =
|
|
113
|
+
useBlockDropZone();
|
|
121
114
|
|
|
122
115
|
// Stop dragging blocks if the block draggable is unmounted.
|
|
123
116
|
useEffect( () => {
|
|
@@ -316,9 +309,8 @@ const BlockDraggable = ( {
|
|
|
316
309
|
} ) => {
|
|
317
310
|
const wasBeingDragged = useRef( false );
|
|
318
311
|
const [ isEditingText, setIsEditingText ] = useState( false );
|
|
319
|
-
const [ isScreenReaderEnabled, setIsScreenReaderEnabled ] =
|
|
320
|
-
false
|
|
321
|
-
);
|
|
312
|
+
const [ isScreenReaderEnabled, setIsScreenReaderEnabled ] =
|
|
313
|
+
useState( false );
|
|
322
314
|
|
|
323
315
|
const draggingAnimation = {
|
|
324
316
|
opacity: useSharedValue( 1 ),
|
|
@@ -192,9 +192,8 @@ describe( 'BlockDraggable', () => {
|
|
|
192
192
|
const paragraphBlock = getByA11yLabel(
|
|
193
193
|
/Paragraph Block\. Row 1/
|
|
194
194
|
);
|
|
195
|
-
const spacerBlock =
|
|
196
|
-
/Spacer Block\. Row 3/
|
|
197
|
-
);
|
|
195
|
+
const spacerBlock =
|
|
196
|
+
getByA11yLabel( /Spacer Block\. Row 3/ );
|
|
198
197
|
|
|
199
198
|
// Select Paragraph block and start editing text
|
|
200
199
|
fireEvent.press( paragraphBlock );
|
|
@@ -222,9 +221,8 @@ describe( 'BlockDraggable', () => {
|
|
|
222
221
|
|
|
223
222
|
// We select the first Image block as the Gallery block
|
|
224
223
|
// also contains Image blocks.
|
|
225
|
-
const imageBlock =
|
|
226
|
-
/Image Block\. Row 2/
|
|
227
|
-
)[ 0 ];
|
|
224
|
+
const imageBlock =
|
|
225
|
+
getAllByA11yLabel( /Image Block\. Row 2/ )[ 0 ];
|
|
228
226
|
// Start dragging from block's content
|
|
229
227
|
fireLongPress( imageBlock, 'draggable-trigger-content' );
|
|
230
228
|
expect( getDraggableChip( screen ) ).toBeVisible();
|
|
@@ -246,9 +244,8 @@ describe( 'BlockDraggable', () => {
|
|
|
246
244
|
|
|
247
245
|
// We select the first Image block as the Gallery block
|
|
248
246
|
// also contains Image blocks.
|
|
249
|
-
const imageBlock =
|
|
250
|
-
/Image Block\. Row 2/
|
|
251
|
-
)[ 0 ];
|
|
247
|
+
const imageBlock =
|
|
248
|
+
getAllByA11yLabel( /Image Block\. Row 2/ )[ 0 ];
|
|
252
249
|
fireEvent.press( imageBlock );
|
|
253
250
|
|
|
254
251
|
// Start dragging from block's content
|
|
@@ -339,9 +336,10 @@ describe( 'BlockDraggable', () => {
|
|
|
339
336
|
const galleryBlock = getByA11yLabel(
|
|
340
337
|
/Gallery Block\. Row 4/
|
|
341
338
|
);
|
|
342
|
-
const galleryItem =
|
|
343
|
-
|
|
344
|
-
|
|
339
|
+
const galleryItem =
|
|
340
|
+
within( galleryBlock ).getByA11yLabel(
|
|
341
|
+
/Image Block\. Row 2/
|
|
342
|
+
);
|
|
345
343
|
fireEvent.press( galleryBlock );
|
|
346
344
|
fireEvent.press( galleryItem );
|
|
347
345
|
|
|
@@ -396,9 +394,8 @@ describe( 'BlockDraggable', () => {
|
|
|
396
394
|
'block-draggable-wrapper'
|
|
397
395
|
);
|
|
398
396
|
|
|
399
|
-
const spacerBlock =
|
|
400
|
-
/Spacer Block\. Row 3/
|
|
401
|
-
);
|
|
397
|
+
const spacerBlock =
|
|
398
|
+
getByA11yLabel( /Spacer Block\. Row 3/ );
|
|
402
399
|
await waitForStoreResolvers( () =>
|
|
403
400
|
fireEvent.press( spacerBlock )
|
|
404
401
|
);
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { shallow, mount } from 'enzyme';
|
|
5
|
-
import { noop } from 'lodash';
|
|
6
5
|
|
|
7
6
|
/**
|
|
8
7
|
* WordPress dependencies
|
|
@@ -19,6 +18,8 @@ import {
|
|
|
19
18
|
import { Edit } from '../edit';
|
|
20
19
|
import { BlockContextProvider } from '../../block-context';
|
|
21
20
|
|
|
21
|
+
const noop = () => {};
|
|
22
|
+
|
|
22
23
|
describe( 'Edit', () => {
|
|
23
24
|
afterEach( () => {
|
|
24
25
|
getBlockTypes().forEach( ( block ) => {
|
|
@@ -37,12 +37,8 @@ export class BlockListItem extends Component {
|
|
|
37
37
|
parentWidth,
|
|
38
38
|
blockWidth,
|
|
39
39
|
} = this.props;
|
|
40
|
-
const {
|
|
41
|
-
|
|
42
|
-
isWideWidth,
|
|
43
|
-
isWider,
|
|
44
|
-
isContainerRelated,
|
|
45
|
-
} = alignmentHelpers;
|
|
40
|
+
const { isFullWidth, isWideWidth, isWider, isContainerRelated } =
|
|
41
|
+
alignmentHelpers;
|
|
46
42
|
|
|
47
43
|
if ( isFullWidth( blockAlignment ) ) {
|
|
48
44
|
if ( ! hasParents ) {
|
|
@@ -83,12 +79,8 @@ export class BlockListItem extends Component {
|
|
|
83
79
|
}
|
|
84
80
|
|
|
85
81
|
getContentStyles( readableContentViewStyle ) {
|
|
86
|
-
const {
|
|
87
|
-
|
|
88
|
-
blockName,
|
|
89
|
-
hasParents,
|
|
90
|
-
parentBlockName,
|
|
91
|
-
} = this.props;
|
|
82
|
+
const { blockAlignment, blockName, hasParents, parentBlockName } =
|
|
83
|
+
this.props;
|
|
92
84
|
const { isFullWidth, isContainerRelated } = alignmentHelpers;
|
|
93
85
|
|
|
94
86
|
return [
|
|
@@ -81,9 +81,8 @@ const BlockSelectionButton = ( {
|
|
|
81
81
|
|
|
82
82
|
export default compose( [
|
|
83
83
|
withSelect( ( select, { clientId } ) => {
|
|
84
|
-
const { getBlockRootClientId, getBlockName, getSettings } =
|
|
85
|
-
blockEditorStore
|
|
86
|
-
);
|
|
84
|
+
const { getBlockRootClientId, getBlockName, getSettings } =
|
|
85
|
+
select( blockEditorStore );
|
|
87
86
|
const rootClientId = getBlockRootClientId( clientId );
|
|
88
87
|
|
|
89
88
|
if ( ! rootClientId ) {
|
|
@@ -269,10 +269,10 @@ const applyWithDispatch = withDispatch( ( dispatch, ownProps, { select } ) => {
|
|
|
269
269
|
// leaking new props to the public API (editor.BlockListBlock filter).
|
|
270
270
|
return {
|
|
271
271
|
setAttributes( newAttributes ) {
|
|
272
|
-
const { getMultiSelectedBlockClientIds } =
|
|
273
|
-
blockEditorStore
|
|
274
|
-
|
|
275
|
-
|
|
272
|
+
const { getMultiSelectedBlockClientIds } =
|
|
273
|
+
select( blockEditorStore );
|
|
274
|
+
const multiSelectedBlockClientIds =
|
|
275
|
+
getMultiSelectedBlockClientIds();
|
|
276
276
|
const { clientId } = ownProps;
|
|
277
277
|
const clientIds = multiSelectedBlockClientIds.length
|
|
278
278
|
? multiSelectedBlockClientIds
|
|
@@ -292,9 +292,8 @@ const applyWithDispatch = withDispatch( ( dispatch, ownProps, { select } ) => {
|
|
|
292
292
|
},
|
|
293
293
|
onMerge( forward ) {
|
|
294
294
|
const { clientId } = ownProps;
|
|
295
|
-
const { getPreviousBlockClientId, getNextBlockClientId } =
|
|
296
|
-
blockEditorStore
|
|
297
|
-
);
|
|
295
|
+
const { getPreviousBlockClientId, getNextBlockClientId } =
|
|
296
|
+
select( blockEditorStore );
|
|
298
297
|
|
|
299
298
|
if ( forward ) {
|
|
300
299
|
const nextBlockClientId = getNextBlockClientId( clientId );
|
|
@@ -302,9 +301,8 @@ const applyWithDispatch = withDispatch( ( dispatch, ownProps, { select } ) => {
|
|
|
302
301
|
mergeBlocks( clientId, nextBlockClientId );
|
|
303
302
|
}
|
|
304
303
|
} else {
|
|
305
|
-
const previousBlockClientId =
|
|
306
|
-
clientId
|
|
307
|
-
);
|
|
304
|
+
const previousBlockClientId =
|
|
305
|
+
getPreviousBlockClientId( clientId );
|
|
308
306
|
if ( previousBlockClientId ) {
|
|
309
307
|
mergeBlocks( previousBlockClientId, clientId );
|
|
310
308
|
}
|