mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-18 02:26:21 +08:00
4ebeb530e0
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added new export paths to improve module accessibility for foundation store and view components. - Introduced new extension points for telemetry, font configuration, link preview cache, and peek view services in the view extension foundation. - **Improvements** - Enhanced flexibility by allowing optional configuration of placeholders in paragraph view extensions. - Switched to runtime schema validation for font configuration, increasing reliability. - Streamlined service registration for peek view providers. - **Refactor** - Centralized and simplified extension management by removing redundant extension files and consolidating setup logic. - Updated internal integration of telemetry, font, and peek view services for improved maintainability. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
17 lines
437 B
TypeScript
17 lines
437 B
TypeScript
import { createIdentifier } from '@blocksuite/global/di';
|
|
import type { ExtensionType } from '@blocksuite/store';
|
|
|
|
import type { PeekViewService } from './type.js';
|
|
|
|
export const PeekViewProvider = createIdentifier<PeekViewService>(
|
|
'AffinePeekViewProvider'
|
|
);
|
|
|
|
export function PeekViewExtension(service: PeekViewService): ExtensionType {
|
|
return {
|
|
setup: di => {
|
|
di.override(PeekViewProvider, () => service);
|
|
},
|
|
};
|
|
}
|