@compass-framework/plugin 1.3.4 → 1.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@types/BasePlugin.d.ts +3 -2
- package/@types/BasePluginManager.d.ts +7 -5
- package/@types/PluginSetup.ts +5 -0
- package/index.d.ts +1 -0
- package/package.json +4 -2
package/@types/BasePlugin.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Environment } from "./PluginRuntime";
|
|
2
|
+
import { PluginSetup } from "./PluginSetup";
|
|
2
3
|
import { PluginIdentifier } from "./PluginIdentifier";
|
|
3
4
|
|
|
4
|
-
export declare abstract class BasePlugin<
|
|
5
|
-
public abstract onCreated(
|
|
5
|
+
export declare abstract class BasePlugin<Setup extends PluginSetup> {
|
|
6
|
+
public abstract onCreated(setup: Setup): Promise<PluginIdentifier>;
|
|
6
7
|
|
|
7
8
|
public abstract onMounted(env: Environment): Promise<void>;
|
|
8
9
|
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
+
import { ViewGroup } from "@compass-framework/core";
|
|
2
|
+
import { PluginSetup } from "./PluginSetup";
|
|
1
3
|
import { BasePlugin } from "./BasePlugin";
|
|
2
4
|
import { Environment } from "./PluginRuntime";
|
|
3
5
|
|
|
4
|
-
export declare abstract class BasePluginManager<
|
|
5
|
-
protected constructor();
|
|
6
|
+
export declare abstract class BasePluginManager<Setup extends PluginSetup> {
|
|
7
|
+
protected constructor(container: ViewGroup);
|
|
6
8
|
|
|
7
|
-
public
|
|
9
|
+
public installPlugin(plugin: BasePlugin<Setup>): Promise<void>;
|
|
8
10
|
|
|
9
|
-
public
|
|
11
|
+
public unInstallPlugin(plugin: BasePlugin<Setup>): void;
|
|
10
12
|
|
|
11
|
-
public
|
|
13
|
+
public abstract getPluginSetup(): Setup;
|
|
12
14
|
|
|
13
15
|
public getEnvironment(): Environment;
|
|
14
16
|
}
|
package/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@compass-framework/plugin",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.6",
|
|
4
4
|
"description": "@compass-framework/plugin public api",
|
|
5
5
|
"types": "./index.d.ts",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -10,5 +10,7 @@
|
|
|
10
10
|
"publishConfig": {
|
|
11
11
|
"access": "public"
|
|
12
12
|
},
|
|
13
|
-
"
|
|
13
|
+
"devDependencies": {
|
|
14
|
+
"@compass-framework/core": "1.2.48"
|
|
15
|
+
}
|
|
14
16
|
}
|