refactor(editor): rename doc to blocks (#9510)

This commit is contained in:
Saul-Mirone
2025-01-03 12:49:33 +00:00
parent 2074bda8ff
commit 4457cb7266
99 changed files with 271 additions and 256 deletions

View File

@@ -3,7 +3,7 @@ import {
getNextContinuousNumberedLists,
matchFlavours,
} from '@blocksuite/affine-shared/utils';
import type { BlockModel, Doc } from '@blocksuite/store';
import type { BlockModel, Blocks } from '@blocksuite/store';
/**
* correct target is a numbered list, which is divided into two steps:
@@ -12,7 +12,7 @@ import type { BlockModel, Doc } from '@blocksuite/store';
* 2. find continuous lists starting from the target list and keep their order continuous
*/
export function correctNumberedListsOrderToPrev(
doc: Doc,
doc: Blocks,
modelOrId: BlockModel | string,
transact = true
) {
@@ -58,7 +58,7 @@ export function correctNumberedListsOrderToPrev(
}
}
export function correctListOrder(doc: Doc, model: ListBlockModel) {
export function correctListOrder(doc: Blocks, model: ListBlockModel) {
// old numbered list has no order
if (model.type === 'numbered' && !Number.isInteger(model.order)) {
correctNumberedListsOrderToPrev(doc, model, false);