diff --git a/packages/block-editor/src/components/block-types-list/index.native.js b/packages/block-editor/src/components/block-types-list/index.native.js index 450e45220436e..1d32103773fb3 100644 --- a/packages/block-editor/src/components/block-types-list/index.native.js +++ b/packages/block-editor/src/components/block-types-list/index.native.js @@ -15,7 +15,7 @@ import { * WordPress dependencies */ import { useState, useEffect } from '@wordpress/element'; -import { BottomSheet, Gradient, InserterButton } from '@wordpress/components'; +import { BottomSheet, Gradient } from '@wordpress/components'; import { usePreferredColorScheme, usePreferredColorSchemeStyle, @@ -25,6 +25,7 @@ import { * Internal dependencies */ import styles from './style.scss'; +import InserterButton from '../inserter-button'; const MIN_COL_NUM = 3; diff --git a/packages/block-editor/src/components/block-variation-picker/index.native.js b/packages/block-editor/src/components/block-variation-picker/index.native.js index b60c7a414d22d..e117bda7c93df 100644 --- a/packages/block-editor/src/components/block-variation-picker/index.native.js +++ b/packages/block-editor/src/components/block-variation-picker/index.native.js @@ -20,7 +20,6 @@ import { PanelBody, BottomSheet, FooterMessageControl, - InserterButton, } from '@wordpress/components'; import { Icon, close } from '@wordpress/icons'; @@ -29,6 +28,7 @@ import { Icon, close } from '@wordpress/icons'; */ import styles from './style.scss'; import { store as blockEditorStore } from '../../store'; +import InserterButton from '../inserter-button'; const hitSlop = { top: 22, bottom: 22, left: 22, right: 22 }; diff --git a/packages/block-editor/src/components/index.native.js b/packages/block-editor/src/components/index.native.js index de134f1b5e3bc..45451908a3447 100644 --- a/packages/block-editor/src/components/index.native.js +++ b/packages/block-editor/src/components/index.native.js @@ -90,6 +90,7 @@ export { default as BlockStyles } from './block-styles'; export { default as DefaultBlockAppender } from './default-block-appender'; export { default as __unstableEditorStyles } from './editor-styles'; export { default as Inserter } from './inserter'; +export { default as InserterButton } from './inserter-button'; export { useBlockProps } from './block-list/use-block-props'; export { default as FloatingToolbar } from './floating-toolbar'; diff --git a/packages/components/src/mobile/inserter-button/README.md b/packages/block-editor/src/components/inserter-button/README.md similarity index 100% rename from packages/components/src/mobile/inserter-button/README.md rename to packages/block-editor/src/components/inserter-button/README.md diff --git a/packages/components/src/mobile/inserter-button/index.native.js b/packages/block-editor/src/components/inserter-button/index.native.js similarity index 98% rename from packages/components/src/mobile/inserter-button/index.native.js rename to packages/block-editor/src/components/inserter-button/index.native.js index 91d8a3b449f18..7df5d450d1e62 100644 --- a/packages/components/src/mobile/inserter-button/index.native.js +++ b/packages/block-editor/src/components/inserter-button/index.native.js @@ -10,11 +10,11 @@ import { Component } from '@wordpress/element'; import { Icon } from '@wordpress/components'; import { withPreferredColorScheme } from '@wordpress/compose'; import { __, sprintf } from '@wordpress/i18n'; -import { BlockIcon } from '@wordpress/block-editor'; /** * Internal dependencies */ +import { BlockIcon } from '../block-icon'; import styles from './style.scss'; import sparkles from './sparkles'; class MenuItem extends Component { diff --git a/packages/components/src/mobile/inserter-button/sparkles.js b/packages/block-editor/src/components/inserter-button/sparkles.js similarity index 95% rename from packages/components/src/mobile/inserter-button/sparkles.js rename to packages/block-editor/src/components/inserter-button/sparkles.js index 663824e11a1d6..1b893f30bbfd5 100644 --- a/packages/components/src/mobile/inserter-button/sparkles.js +++ b/packages/block-editor/src/components/inserter-button/sparkles.js @@ -1,7 +1,7 @@ /** * WordPress dependencies */ -import { SVG, Path } from '@wordpress/primitives'; +import { SVG, Path } from '@wordpress/components'; const sparkles = ( diff --git a/packages/components/src/mobile/inserter-button/style.native.scss b/packages/block-editor/src/components/inserter-button/style.native.scss similarity index 100% rename from packages/components/src/mobile/inserter-button/style.native.scss rename to packages/block-editor/src/components/inserter-button/style.native.scss diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index 08082f99a00b9..9bc93e3dd4044 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -5,6 +5,7 @@ ### Enhancements - `Button`: Add focus rings to focusable disabled buttons ([#56383](https://github.com/WordPress/gutenberg/pull/56383)). +- `InserterButton`: Move mobile InserterButton from components package to block-editor package ([#56494](https://github.com/WordPress/gutenberg/pull/56494)) ### Bug Fix diff --git a/packages/components/src/index.native.js b/packages/components/src/index.native.js index f88399fbee287..6c793499102e1 100644 --- a/packages/components/src/index.native.js +++ b/packages/components/src/index.native.js @@ -110,7 +110,6 @@ export { default as ImageLinkDestinationsScreen } from './mobile/link-settings/i export { default as SegmentedControl } from './mobile/segmented-control'; export { default as Image, IMAGE_DEFAULT_FOCAL_POINT } from './mobile/image'; export { default as ImageEditingButton } from './mobile/image/image-editing-button'; -export { default as InserterButton } from './mobile/inserter-button'; export { setClipboard, getClipboard } from './mobile/clipboard'; export { default as AudioPlayer } from './mobile/audio-player'; export { default as Badge } from './mobile/badge'; diff --git a/packages/react-native-editor/CHANGELOG.md b/packages/react-native-editor/CHANGELOG.md index 4e509a232b3e5..31429cb873c7c 100644 --- a/packages/react-native-editor/CHANGELOG.md +++ b/packages/react-native-editor/CHANGELOG.md @@ -10,6 +10,7 @@ For each user feature we should also add a importance categorization label to i --> ## Unreleased +- [*] [internal] Move InserterButton from components package to block-editor package [#56494] - [***] Fix issue when backspacing in an empty Paragraph block [#56496] ## 1.109.0