refactor(editor): reduce dependency to doc collection (#9492)

This commit is contained in:
Saul-Mirone
2025-01-03 01:59:25 +00:00
parent eb15b3cb39
commit 8b6c81f76d
70 changed files with 185 additions and 210 deletions
@@ -128,7 +128,7 @@ export class DocsStore extends Store {
}
setDocMeta(id: string, meta: Partial<DocMeta>) {
this.workspaceService.workspace.docCollection.setDocMeta(id, meta);
this.workspaceService.workspace.docCollection.meta.setDocMeta(id, meta);
}
setDocPrimaryModeSetting(id: string, mode: DocMode) {
@@ -1,9 +1,10 @@
// the adapter is to bridge the workspace rootdoc & native js bindings
import type { WorkspaceService } from '@affine/core/modules/workspace';
import { createYProxy, type Y } from '@blocksuite/affine/store';
import { createYProxy } from '@blocksuite/affine/store';
import { LiveData, Service } from '@toeverything/infra';
import { defaultsDeep } from 'lodash-es';
import { Observable } from 'rxjs';
import type * as Y from 'yjs';
import type { FavoriteSupportTypeUnion } from '../../constant';
import type { FavoriteService } from '../favorite';
@@ -86,7 +86,7 @@ export class TagStore extends Store {
};
updatePageTags = (pageId: string, tags: string[]) => {
this.workspaceService.workspace.docCollection.setDocMeta(pageId, {
this.workspaceService.workspace.docCollection.meta.setDocMeta(pageId, {
tags,
});
};