mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-22 20:41:50 +08:00
04531508cb
Closes: BS-3393 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a new "Embed Doc" block, enabling embedding and rendering of linked and synced documents within cards, including support for banners and note previews. - Added new toolbar and quick search options for inserting embedded linked and synced documents. - **Improvements** - Updated dependencies and internal references to support the new embed doc functionality across related blocks and components. - Enhanced support for edgeless environments with new clipboard and configuration options for embedded docs. - **Refactor** - Streamlined and reorganized embed-related code, moving linked and synced doc logic into a dedicated embed doc module. - Removed obsolete adapter and utility files to simplify maintenance. - **Chores** - Updated project and TypeScript configuration files to include the new embed doc module in builds and references. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
19 lines
516 B
TypeScript
19 lines
516 B
TypeScript
import {
|
|
EmbedSyncedDocBlockSchema,
|
|
type EmbedSyncedDocModel,
|
|
} from '@blocksuite/affine-model';
|
|
import { type BlockStdScope, ConfigExtensionFactory } from '@blocksuite/std';
|
|
import type { TemplateResult } from 'lit';
|
|
|
|
export type EmbedSyncedDocConfig = {
|
|
edgelessHeader: (context: {
|
|
model: EmbedSyncedDocModel;
|
|
std: BlockStdScope;
|
|
}) => TemplateResult;
|
|
};
|
|
|
|
export const EmbedSyncedDocConfigExtension =
|
|
ConfigExtensionFactory<EmbedSyncedDocConfig>(
|
|
EmbedSyncedDocBlockSchema.model.flavour
|
|
);
|