@visactor/vrender-core
Version:
```typescript import { xxx } from '@visactor/vrender-core'; ```
27 lines (26 loc) • 1.84 kB
TypeScript
import type { IGlobal, IGraphicPicker } from '../interface';
import type { IApp } from './types';
import type { ServiceIdentifier } from '../common/explicit-binding';
import type { ILegacyBindingContext } from '../legacy/binding-context';
export type TRuntimeContributionModuleRegistry = (bind: ILegacyBindingContext['bind'], unbind: (serviceIdentifier: ServiceIdentifier) => void, isBound: ILegacyBindingContext['isBound'], rebind: ILegacyBindingContext['rebind']) => void;
export type TRuntimeContributionModule = ((context: ILegacyBindingContext) => void) | {
registry: TRuntimeContributionModuleRegistry;
};
export type TRuntimeContributionInstallTarget = 'graphic-renderer' | 'draw-contribution' | {
picker: ServiceIdentifier<IGraphicPicker>;
};
export interface IRuntimeContributionModuleInstallOptions {
app?: IApp;
legacy?: boolean;
targets?: TRuntimeContributionInstallTarget[];
}
export declare function getRuntimeInstallerBindingContext(): ILegacyBindingContext;
export declare function refreshRuntimeInstallerContributions(): void;
export declare function getRuntimeInstallerGlobal(): IGlobal;
export declare function configureRuntimeApplicationForApp(app: IApp): void;
export { RUNTIME_INSTALLER_STATE_SYMBOL, getRuntimeInstallerState } from './runtime-installer-state';
export type { IRuntimeInstallerState } from './runtime-installer-state';
export declare function installRuntimeGraphicRenderersToApp(app: IApp): void;
export declare function installRuntimeDrawContributionsToApp(app: IApp): void;
export declare function installRuntimePickersToApp<T extends IGraphicPicker>(app: IApp, serviceIdentifier: ServiceIdentifier<T>): void;
export declare function installRuntimeContributionModule(module: TRuntimeContributionModule, { app, legacy, targets }?: IRuntimeContributionModuleInstallOptions): void;