mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-09 05:05:52 +08:00
chore: merge blocksuite source code (#9213)
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import type { ReferenceParams } from '@blocksuite/affine-model';
|
||||
import type { ExtensionType } from '@blocksuite/block-std';
|
||||
import { createIdentifier } from '@blocksuite/global/di';
|
||||
|
||||
export interface ParseDocUrlService {
|
||||
parseDocUrl: (
|
||||
url: string
|
||||
) => ({ docId: string } & ReferenceParams) | undefined;
|
||||
}
|
||||
|
||||
export const ParseDocUrlProvider =
|
||||
createIdentifier<ParseDocUrlService>('ParseDocUrlService');
|
||||
|
||||
export function ParseDocUrlExtension(
|
||||
parseDocUrlService: ParseDocUrlService
|
||||
): ExtensionType {
|
||||
return {
|
||||
setup: di => {
|
||||
di.addImpl(ParseDocUrlProvider, parseDocUrlService);
|
||||
},
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user