refactor(core): move block collection to affine and implement as doc (#9514)

This commit is contained in:
Saul-Mirone committed 2025-01-04 06:28:55 +00:00
1 parent 4cb186def2
commit dcf4993265
39 files changed
+595 -192

No files matched your search

@@ -1,4 +1,5 @@
import type { Workspace } from '@blocksuite/store';
import { Text } from '@blocksuite/store';
export function createDefaultDoc(
collection: Workspace,
@@ -9,7 +10,7 @@ export function createDefaultDoc(
doc.load();
const title = options.title ?? '';
const rootId = doc.addBlock('affine:page', {
title: new doc.Text(title),
title: new Text(title),
});
collection.meta.setDocMeta(doc.id, {
title,