mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-24 09:52:49 +08:00
refactor(editor): reduce dependency to doc collection (#9492)
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
"@toeverything/theme": "^1.1.3",
|
||||
"date-fns": "^4.0.0",
|
||||
"lit": "^3.2.0",
|
||||
"yjs": "^13.6.21",
|
||||
"zod": "^3.23.8"
|
||||
},
|
||||
"exports": {
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { ShadowlessElement } from '@blocksuite/block-std';
|
||||
import { assertEquals } from '@blocksuite/global/utils';
|
||||
import { DocCollection, type Text } from '@blocksuite/store';
|
||||
import { type Text } from '@blocksuite/store';
|
||||
import { css, html } from 'lit';
|
||||
import { state } from 'lit/decorators.js';
|
||||
import { createRef, ref } from 'lit/directives/ref.js';
|
||||
import * as Y from 'yjs';
|
||||
|
||||
import { t } from '../../../../core/index.js';
|
||||
import type { TableAreaSelection } from '../../types.js';
|
||||
@@ -98,7 +99,7 @@ export function fillSelectionWithFocusCellData(
|
||||
curCellText.clear();
|
||||
curCellText.applyDelta(delta);
|
||||
} else {
|
||||
const newText = new DocCollection.Y.Text();
|
||||
const newText = new Y.Text();
|
||||
newText.applyDelta(delta);
|
||||
curCell.valueSet(newText);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user