refactor(editor): remove block models global type (#10086)

This commit is contained in:
Saul-Mirone
2025-02-11 11:00:57 +00:00
parent a725df6ebe
commit 39eb8625d6
157 changed files with 402 additions and 621 deletions
@@ -9,7 +9,7 @@ import { ThemeProvider } from '@blocksuite/affine-shared/services';
import {
getClosestBlockComponentByPoint,
handleNativeRangeAtPoint,
matchFlavours,
matchModels,
stopPropagation,
} from '@blocksuite/affine-shared/utils';
import {
@@ -100,10 +100,10 @@ export class EdgelessNoteBackground extends SignalWatcher(
if (
(!nearestModel.text ||
!matchFlavours(nearestModel, [ParagraphBlockModel, ListBlockModel])) &&
!matchModels(nearestModel, [ParagraphBlockModel, ListBlockModel])) &&
(!siblingModel ||
!siblingModel.text ||
!matchFlavours(siblingModel, [ParagraphBlockModel, ListBlockModel]))
!matchModels(siblingModel, [ParagraphBlockModel, ListBlockModel]))
) {
const [pId] = this.doc.addSiblingBlocks(
nearestModel,