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
@@ -14,7 +14,7 @@ import {
type SurfaceBlockModel,
} from '@blocksuite/block-std/gfx';
import { assertType, isEqual, type IVec, last } from '@blocksuite/global/utils';
import { DocCollection } from '@blocksuite/store';
import * as Y from 'yjs';
import { fitContent } from '../../renderer/elements/shape/utils.js';
import { layout } from './layout.js';
@@ -360,7 +360,7 @@ export function createFromTree(
layoutType: LayoutType,
surface: SurfaceBlockModel
) {
const children = new DocCollection.Y.Map();
const children = new Y.Map();
const traverse = (subtree: MindmapNode, parent?: string) => {
const value: NodeDetail = {
...subtree.detail,