refactor(editor): should not rely on doc collection type (#9501)

This commit is contained in:
Saul-Mirone
2025-01-03 06:30:27 +00:00
parent cb5d7eaabc
commit 897c7d4284
55 changed files with 200 additions and 158 deletions

View File

@@ -8,7 +8,7 @@ import {
} from '@blocksuite/affine-components/icons';
import { openFileOrFiles } from '@blocksuite/affine-shared/utils';
import { WithDisposable } from '@blocksuite/global/utils';
import type { DocCollection } from '@blocksuite/store';
import type { Workspace } from '@blocksuite/store';
import { html, LitElement, type PropertyValues } from 'lit';
import { query, state } from 'lit/decorators.js';
@@ -30,7 +30,7 @@ export class ImportDoc extends WithDisposable(LitElement) {
static override styles = styles;
constructor(
private readonly collection: DocCollection,
private readonly collection: Workspace,
private readonly onSuccess?: OnSuccessHandler,
private readonly onFail?: OnFailHandler,
private readonly abortController = new AbortController()

View File

@@ -1,4 +1,4 @@
import type { DocCollection } from '@blocksuite/store';
import type { Workspace } from '@blocksuite/store';
import {
ImportDoc,
@@ -13,7 +13,7 @@ export function showImportModal({
container = document.body,
abortController = new AbortController(),
}: {
collection: DocCollection;
collection: Workspace;
onSuccess?: OnSuccessHandler;
onFail?: OnFailHandler;
multiple?: boolean;