chore: bump version (#3567)

This commit is contained in:
Alex Yang
2023-08-04 16:55:28 -07:00
committed by GitHub
parent ea76936508
commit bbf5f0efe0
31 changed files with 410 additions and 379 deletions
+7 -3
View File
@@ -6,6 +6,7 @@ import type { DocProviderCreator, StoreOptions } from '@blocksuite/store';
import {
createIndexeddbStorage,
Generator,
Schema,
Workspace,
} from '@blocksuite/store';
import { INTERNAL_BLOCKSUITE_HASH_MAP } from '@toeverything/infra/__internal__/workspace';
@@ -44,6 +45,10 @@ type SubdocEvent = {
const docUpdateCallbackWeakMap = new WeakMap<Doc, UpdateCallback>();
const schema = new Schema();
schema.register(AffineSchemas).register(__unstableSchemas);
const createMonitor = (doc: Doc) => {
const onUpdate: UpdateCallback = (_, origin) => {
if (process.env.NODE_ENV === 'development') {
@@ -118,9 +123,8 @@ export function getOrCreateWorkspace(
providerCreators: typeof window === 'undefined' ? [] : providerCreators,
blobStorages: blobStorages,
idGenerator,
})
.register(AffineSchemas)
.register(__unstableSchemas);
schema,
});
createMonitor(workspace.doc);
setEditorFlags(workspace);
INTERNAL_BLOCKSUITE_HASH_MAP.set(id, workspace);