aboutsummaryrefslogtreecommitdiff
path: root/src/core/model.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/model.ts')
-rw-r--r--src/core/model.ts16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/core/model.ts b/src/core/model.ts
new file mode 100644
index 0000000..f250839
--- /dev/null
+++ b/src/core/model.ts
@@ -0,0 +1,16 @@
+import type { I18n, MessageKey } from '../i18n';
+
+export interface ModelContext {
+ i18n: I18n;
+}
+
+export interface ModelInstance {
+ /** Release animation frames, GPU resources, observers, and event listeners. */
+ dispose(): void;
+}
+
+export interface ModelDefinition {
+ id: string;
+ titleKey: MessageKey;
+ mount(host: HTMLElement, context: ModelContext): ModelInstance | Promise<ModelInstance>;
+}