refactor(editor): playground doc collection typing migration (#9593)

This commit is contained in:
doodlewind
2025-01-09 03:07:43 +00:00
parent 5ff2254c83
commit e269cce141
19 changed files with 48 additions and 84 deletions
@@ -50,7 +50,7 @@ import { BlockSuiteError, ErrorCode } from '@blocksuite/global/exceptions';
import type { SerializedXYWH } from '@blocksuite/global/utils';
import type { DeltaInsert } from '@blocksuite/inline/types';
import { AffineEditorContainer, type CommentPanel } from '@blocksuite/presets';
import { type DocCollection, Job, Text } from '@blocksuite/store';
import { Job, Text, type Workspace } from '@blocksuite/store';
import type { SlDropdown } from '@shoelace-style/shoelace';
import { setBasePath } from '@shoelace-style/shoelace/dist/utilities/base-path.js';
import { css, html } from 'lit';
@@ -329,7 +329,9 @@ export class StarterDebugMenu extends ShadowlessElement {
private async _exportSnapshot() {
await ZipTransformer.exportDocs(
this.collection,
[...this.collection.docs.values()].map(collection => collection.getDoc())
Array.from(this.collection.docs.values()).map(collection =>
collection.getStore()
)
);
}
@@ -1019,7 +1021,7 @@ export class StarterDebugMenu extends ShadowlessElement {
accessor blockTypeDropdown!: SlDropdown;
@property({ attribute: false })
accessor collection!: DocCollection;
accessor collection!: Workspace;
@property({ attribute: false })
accessor commentPanel!: CommentPanel;