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
@@ -1,8 +1,12 @@
import type { BlockComponent, Command } from '@blocksuite/block-std';
import type {
BlockComponent,
BlockStdScope,
Command,
} from '@blocksuite/block-std';
import { getNextContentBlock } from '../../utils/index.js';
function getNextBlock(std: BlockSuite.Std, path: string) {
function getNextBlock(std: BlockStdScope, path: string) {
const view = std.view;
const model = std.store.getBlock(path)?.model;
if (!model) return null;
@@ -1,8 +1,12 @@
import type { BlockComponent, Command } from '@blocksuite/block-std';
import type {
BlockComponent,
BlockStdScope,
Command,
} from '@blocksuite/block-std';
import { getPrevContentBlock } from '../../utils/index.js';
function getPrevBlock(std: BlockSuite.Std, path: string) {
function getPrevBlock(std: BlockStdScope, path: string) {
const view = std.view;
const model = std.store.getBlock(path)?.model;