mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-19 15:26:59 +08:00
refactor(editor): reduce dependency to doc collection (#9492)
This commit is contained in:
@@ -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,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user