feat(editor): merge store and blocks (#9591)

This commit is contained in:
Saul-Mirone
2025-01-08 13:01:19 +00:00
parent a0cba55a5b
commit 5842d45ab1
124 changed files with 362 additions and 414 deletions
@@ -1,5 +1,5 @@
import { SignalWatcher, WithDisposable } from '@blocksuite/global/utils';
import { type Blocks, type ExtensionType, Store } from '@blocksuite/store';
import type { ExtensionType, Store } from '@blocksuite/store';
import { html } from 'lit';
import { customElement, property } from 'lit/decorators.js';
@@ -18,9 +18,8 @@ export class TestEditorContainer extends SignalWatcher(
override connectedCallback() {
super.connectedCallback();
const store = new Store({ blocks: this.doc });
this._std = new BlockStdScope({
store,
store: this.doc,
extensions: this.specs,
});
}
@@ -32,7 +31,7 @@ export class TestEditorContainer extends SignalWatcher(
}
@property({ attribute: false })
accessor doc!: Blocks;
accessor doc!: Store;
@property({ attribute: false })
accessor specs: ExtensionType[] = [];