chore(editor): move helper to playground (#9498)

This commit is contained in:
Saul-Mirone
2025-01-03 04:23:59 +00:00
parent a4e94ab72f
commit 0699205721
7 changed files with 16 additions and 11 deletions
-21
View File
@@ -1,21 +0,0 @@
import { AffineSchemas } from '@blocksuite/blocks/schemas';
import { DocCollection, Schema } from '@blocksuite/store';
export function createEmptyDoc() {
const schema = new Schema().register(AffineSchemas);
const collection = new DocCollection({ schema });
collection.meta.initialize();
const doc = collection.createDoc();
return {
doc,
init() {
doc.load();
const rootId = doc.addBlock('affine:page', {});
doc.addBlock('affine:surface', {}, rootId);
const noteId = doc.addBlock('affine:note', {}, rootId);
doc.addBlock('affine:paragraph', {}, noteId);
return doc;
},
};
}
-1
View File
@@ -2,7 +2,6 @@ import '@blocksuite/affine-block-surface/effects';
export * from './editors';
export * from './fragments';
export * from './helpers';
const env =
typeof globalThis !== 'undefined'