mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-02 01:49:51 +08:00
feat(editor): add editor store (#9584)
This commit is contained in:
@@ -12,7 +12,7 @@ import {
|
||||
DisposableGroup,
|
||||
WithDisposable,
|
||||
} from '@blocksuite/global/utils';
|
||||
import { type Blocks, type Query } from '@blocksuite/store';
|
||||
import { type Blocks, type Query, Store } from '@blocksuite/store';
|
||||
import { css, html, nothing, type PropertyValues } from 'lit';
|
||||
import { property, query, state } from 'lit/decorators.js';
|
||||
import { styleMap } from 'lit/directives/style-map.js';
|
||||
@@ -155,6 +155,7 @@ export class FramePreview extends WithDisposable(ShadowlessElement) {
|
||||
private _renderSurfaceContent() {
|
||||
if (!this._previewDoc || !this.frame) return nothing;
|
||||
const { width, height } = this.frameViewportWH;
|
||||
const store = new Store({ blocks: this._previewDoc });
|
||||
|
||||
const _previewSpec = this._previewSpec.value;
|
||||
return html`<div
|
||||
@@ -172,7 +173,7 @@ export class FramePreview extends WithDisposable(ShadowlessElement) {
|
||||
})}
|
||||
>
|
||||
${new BlockStdScope({
|
||||
doc: this._previewDoc,
|
||||
store,
|
||||
extensions: _previewSpec,
|
||||
}).render()}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user