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

@@ -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": {

View File

@@ -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);
}