mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-22 04:26:23 +08:00
7c22b3931f
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Refactor** - Streamlined and consolidated block and inline extension exports by removing multiple block-spec and inline extension arrays from public APIs. - Reduced exported constants, types, and utility functions related to various block and embed features. - Simplified the codebase by removing deprecated type guards, adapter extensions, and redundant extension groupings. - **Chores** - Cleaned up internal APIs by deleting unused exports, imports, and outdated code, enhancing maintainability. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
21 lines
838 B
TypeScript
21 lines
838 B
TypeScript
import { EmbedSyncedDocBlockSchema } from '@blocksuite/affine-model';
|
|
import { BlockViewExtension, FlavourExtension } from '@blocksuite/std';
|
|
import type { ExtensionType } from '@blocksuite/store';
|
|
import { literal } from 'lit/static-html.js';
|
|
|
|
import { createBuiltinToolbarConfigExtension } from './configs/toolbar';
|
|
import { HeightInitializationExtension } from './init-height-extension';
|
|
|
|
const flavour = EmbedSyncedDocBlockSchema.model.flavour;
|
|
|
|
export const EmbedSyncedDocViewExtensions: ExtensionType[] = [
|
|
FlavourExtension(flavour),
|
|
BlockViewExtension(flavour, model => {
|
|
return model.parent?.flavour === 'affine:surface'
|
|
? literal`affine-embed-edgeless-synced-doc-block`
|
|
: literal`affine-embed-synced-doc-block`;
|
|
}),
|
|
createBuiltinToolbarConfigExtension(flavour),
|
|
HeightInitializationExtension,
|
|
].flat();
|