-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.ts
More file actions
45 lines (43 loc) · 1.11 KB
/
Copy pathindex.ts
File metadata and controls
45 lines (43 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// @ts-types="npm:@types/react@^19"
import type React from "react";
type ComponentType = React.ComponentType<any>;
export interface Omni {
registerMDXComponent(name: string, component: ComponentType): void;
getMDXComponent(name: string): ComponentType | undefined;
getAllMDXComponents(): Map<string, ComponentType>;
}
export interface ProjectConfig {
id: string;
path: string;
name?: string;
}
export interface PluginManifest {
id: string;
name: string;
version: string;
minAppVersion: string;
author: string;
authorUrl?: string;
fundingUrl?: string;
description: string;
mdxComponents: string[];
}
export interface InstalledPlugin {
manifest: PluginManifest;
path: string;
}
export type BrokenPlugin = {
manifest: PluginManifest | null;
path: string;
issues?: string[];
};
export abstract class IOmniPlugin {
protected readonly omni: Omni;
protected readonly project: ProjectConfig;
protected readonly manifest: PluginManifest;
constructor(omni: Omni, project: ProjectConfig, manifest: PluginManifest) {
this.omni = omni;
this.manifest = manifest;
this.project = project;
}
}