|
1 | 1 | import { CellSelection } from "prosemirror-tables";
|
2 | 2 | import type { BlockNoteEditor } from "../editor/BlockNoteEditor.js";
|
3 |
| -import { |
4 |
| - BlockConfig, |
5 |
| - BlockSchema, |
6 |
| - PropSchema, |
7 |
| - PropSpec, |
8 |
| - StyleSchema, |
9 |
| -} from "../schema/index.js"; |
10 |
| -import { |
11 |
| - Block, |
12 |
| - DefaultInlineContentSchema, |
13 |
| - defaultInlineContentSchema, |
14 |
| -} from "./defaultBlocks.js"; |
| 3 | +import { BlockConfig, PropSchema, PropSpec } from "../schema/index.js"; |
| 4 | +import { Block } from "./defaultBlocks.js"; |
15 | 5 | import { Selection } from "prosemirror-state";
|
16 | 6 |
|
17 | 7 | export function editorHasBlockWithType<
|
@@ -174,27 +164,6 @@ export function blockHasType<
|
174 | 164 | );
|
175 | 165 | }
|
176 | 166 |
|
177 |
| -// TODO: Only used once in the emoji picker - is it even needed? If so, should |
178 |
| -// be changed to be like the block type guards. |
179 |
| -export function checkDefaultInlineContentTypeInSchema< |
180 |
| - InlineContentType extends keyof DefaultInlineContentSchema, |
181 |
| - B extends BlockSchema, |
182 |
| - S extends StyleSchema, |
183 |
| ->( |
184 |
| - inlineContentType: InlineContentType, |
185 |
| - editor: BlockNoteEditor<B, any, S>, |
186 |
| -): editor is BlockNoteEditor< |
187 |
| - B, |
188 |
| - { [K in InlineContentType]: DefaultInlineContentSchema[InlineContentType] }, |
189 |
| - S |
190 |
| -> { |
191 |
| - return ( |
192 |
| - inlineContentType in editor.schema.inlineContentSchema && |
193 |
| - editor.schema.inlineContentSchema[inlineContentType] === |
194 |
| - defaultInlineContentSchema[inlineContentType] |
195 |
| - ); |
196 |
| -} |
197 |
| - |
198 | 167 | export function isTableCellSelection(
|
199 | 168 | selection: Selection,
|
200 | 169 | ): selection is CellSelection {
|
|
0 commit comments