mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-19 02:56:23 +08:00
ad9b0303c4
To support multiple instances, this PR removes some atoms and implements them using the new DI system. removed atom - `pageSettingsAtom` - `currentPageIdAtom` - `currentModeAtom`
33 lines
1022 B
TypeScript
33 lines
1022 B
TypeScript
export * from './app-config-storage';
|
|
export * from './atom';
|
|
export * from './blocksuite';
|
|
export * from './command';
|
|
export * from './di';
|
|
export * from './initialization';
|
|
export * from './livedata';
|
|
export * from './page';
|
|
export * from './storage';
|
|
export * from './utils';
|
|
export * from './workspace';
|
|
|
|
import type { ServiceCollection } from './di';
|
|
import { CleanupService } from './lifecycle';
|
|
import { configurePageServices } from './page';
|
|
import { GlobalCache, GlobalState, MemoryMemento } from './storage';
|
|
import {
|
|
configureTestingWorkspaceServices,
|
|
configureWorkspaceServices,
|
|
} from './workspace';
|
|
|
|
export function configureInfraServices(services: ServiceCollection) {
|
|
services.add(CleanupService);
|
|
configureWorkspaceServices(services);
|
|
configurePageServices(services);
|
|
}
|
|
|
|
export function configureTestingInfraServices(services: ServiceCollection) {
|
|
configureTestingWorkspaceServices(services);
|
|
services.override(GlobalCache, MemoryMemento);
|
|
services.override(GlobalState, MemoryMemento);
|
|
}
|