mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-18 18:46:19 +08:00
refactor(editor): rename doc to blocks (#9510)
This commit is contained in:
+7
-3
@@ -5,7 +5,7 @@ import { DocModeProvider } from '@blocksuite/affine-shared/services';
|
||||
import { getBlockProps } from '@blocksuite/affine-shared/utils';
|
||||
import type { EditorHost } from '@blocksuite/block-std';
|
||||
import { GfxBlockElementModel } from '@blocksuite/block-std/gfx';
|
||||
import { type BlockModel, type Doc } from '@blocksuite/store';
|
||||
import { type BlockModel, type Blocks } from '@blocksuite/store';
|
||||
|
||||
import {
|
||||
getElementProps,
|
||||
@@ -14,7 +14,11 @@ import {
|
||||
} from '../../../edgeless/utils/clone-utils.js';
|
||||
import { isFrameBlock, isNoteBlock } from '../../../edgeless/utils/query.js';
|
||||
|
||||
function addBlocksToDoc(targetDoc: Doc, model: BlockModel, parentId: string) {
|
||||
function addBlocksToDoc(
|
||||
targetDoc: Blocks,
|
||||
model: BlockModel,
|
||||
parentId: string
|
||||
) {
|
||||
// Add current block to linked doc
|
||||
const blockProps = getBlockProps(model);
|
||||
const newModelId = targetDoc.addBlock(
|
||||
@@ -32,7 +36,7 @@ function addBlocksToDoc(targetDoc: Doc, model: BlockModel, parentId: string) {
|
||||
}
|
||||
|
||||
export function createLinkedDocFromNote(
|
||||
doc: Doc,
|
||||
doc: Blocks,
|
||||
note: NoteBlockModel,
|
||||
docTitle?: string
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user