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

View File

@@ -16,7 +16,8 @@ import {
uploadBlobForImage,
} from '@blocksuite/affine/blocks';
import { Bound, getCommonBound } from '@blocksuite/affine/global/utils';
import { type BlockProps, DocCollection, Text } from '@blocksuite/affine/store';
import { type BlockProps, Text } from '@blocksuite/affine/store';
import * as Y from 'yjs';
import { getAIPanelWidget } from '../utils/ai-widgets';
import type { AffineNode, AIContext } from '../utils/context';
@@ -262,7 +263,7 @@ function addSurfaceRefBlock(host: EditorHost, bound: Bound, place: Place) {
const frame = host.doc.addBlock(
'affine:frame',
{
title: new Text(new DocCollection.Y.Text('Frame')),
title: new Text(new Y.Text('Frame')),
xywh: bound.serialize(),
index: LayerManager.INITIAL_INDEX,
},