| 1 |
import { Token } from '@lumino/coreutils'; |
| 2 |
import { WidgetModel, WidgetView } from './widget'; |
| 3 |
/** |
| 4 |
* A runtime interface token for a widget registry. |
| 5 |
*/ |
| 6 |
export declare const IJupyterWidgetRegistry: Token<IJupyterWidgetRegistry>; |
| 7 |
/** |
| 8 |
* A registry of Jupyter Widgets. |
| 9 |
* |
| 10 |
* This is used by widget managers that support an external registry. |
| 11 |
*/ |
| 12 |
export interface IJupyterWidgetRegistry { |
| 13 |
/** |
| 14 |
* Register a widget module. |
| 15 |
*/ |
| 16 |
registerWidget(data: IWidgetRegistryData): void; |
| 17 |
} |
| 18 |
export type ExportMap = { |
| 19 |
[key: string]: typeof WidgetModel | typeof WidgetView; |
| 20 |
}; |
| 21 |
export type ExportData = ExportMap | Promise<ExportMap> | (() => ExportMap) | (() => Promise<ExportMap>); |
| 22 |
export interface IWidgetRegistryData { |
| 23 |
/** |
| 24 |
* The widget module name. |
| 25 |
*/ |
| 26 |
name: string; |
| 27 |
/** |
| 28 |
* The widget module version. |
| 29 |
*/ |
| 30 |
version: string; |
| 31 |
/** |
| 32 |
* A map of object names to widget classes provided by the module, or a |
| 33 |
* promise to such a map, or a function returning the same. |
| 34 |
*/ |
| 35 |
exports: ExportData; |
| 36 |
} |
| 37 |
//# sourceMappingURL=registry.d.ts.map |