mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 21:27:20 +00:00
chore: merge blocksuite source code (#9213)
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
// import { PageRootBlockComponent } from '../page/page-root-block.js';
|
||||
import { BlockComponent } from '@blocksuite/block-std';
|
||||
import { css, html } from 'lit';
|
||||
|
||||
export class PreviewRootBlockComponent extends BlockComponent {
|
||||
static override styles = css`
|
||||
affine-preview-root {
|
||||
display: block;
|
||||
}
|
||||
`;
|
||||
|
||||
override renderBlock() {
|
||||
return html`<div class="affine-preview-root">
|
||||
${this.host.renderChildren(this.model)}
|
||||
</div>`;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
import {
|
||||
BlockViewExtension,
|
||||
type ExtensionType,
|
||||
FlavourExtension,
|
||||
} from '@blocksuite/block-std';
|
||||
import { literal } from 'lit/static-html.js';
|
||||
|
||||
import { PageRootService } from '../page/page-root-service.js';
|
||||
|
||||
export const PreviewPageSpec: ExtensionType[] = [
|
||||
FlavourExtension('affine:page'),
|
||||
PageRootService,
|
||||
BlockViewExtension('affine:page', literal`affine-preview-root`),
|
||||
];
|
||||
Reference in New Issue
Block a user