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

@@ -28,6 +28,7 @@ import {
useParams,
useSearchParams,
} from 'react-router-dom';
import * as _Y from 'yjs';
import { AffineErrorBoundary } from '../../../components/affine/affine-error-boundary';
import { WorkbenchRoot } from '../../../modules/workbench';
@@ -46,11 +47,15 @@ declare global {
var exportWorkspaceSnapshot: (docs?: string[]) => Promise<void>;
// oxlint-disable-next-line no-var
var importWorkspaceSnapshot: () => Promise<void>;
// oxlint-disable-next-line no-var
var Y: typeof _Y;
interface WindowEventMap {
'affine:workspace:change': CustomEvent<{ id: string }>;
}
}
globalThis.Y = _Y;
export const Component = (): ReactElement => {
const {
workspacesService,