mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-24 09:52:49 +08:00
19 lines
507 B
TypeScript
19 lines
507 B
TypeScript
import { createIdentifier } from '@blocksuite/global/di';
|
|
import type { ExtensionType } from '@blocksuite/store';
|
|
|
|
export interface SidebarService {
|
|
open: (tabId?: string) => void;
|
|
close: () => void;
|
|
getTabIds: () => string[];
|
|
}
|
|
|
|
export const SidebarExtensionIdentifier = createIdentifier<SidebarService>(
|
|
'AffineSidebarExtension'
|
|
);
|
|
|
|
export const SidebarExtension = (service: SidebarService): ExtensionType => ({
|
|
setup: di => {
|
|
di.addImpl(SidebarExtensionIdentifier, () => service);
|
|
},
|
|
});
|