mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-29 08:09:52 +08:00
refactor(editor): remove block models global type (#10086)
This commit is contained in:
@@ -6,7 +6,7 @@ import type { BlockModel } from '@blocksuite/store';
|
||||
|
||||
import { BLOCK_CHILDREN_CONTAINER_PADDING_LEFT } from '../../consts/index.js';
|
||||
import { clamp } from '../math.js';
|
||||
import { matchFlavours } from '../model/checker.js';
|
||||
import { matchModels } from '../model/checker.js';
|
||||
|
||||
const ATTR_SELECTOR = `[${BLOCK_ID_ATTR}]`;
|
||||
|
||||
@@ -36,7 +36,7 @@ function hasBlockId(element: Element): element is BlockComponent {
|
||||
* Returns `true` if element is default/edgeless page or note.
|
||||
*/
|
||||
function isRootOrNoteOrSurface(element: BlockComponent) {
|
||||
return matchFlavours(element.model, [
|
||||
return matchModels(element.model, [
|
||||
RootBlockModel,
|
||||
NoteBlockModel,
|
||||
SurfaceBlockModel,
|
||||
|
||||
Reference in New Issue
Block a user