forked from alibaba/lowcode-engine
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathplugin-context.ts
More file actions
131 lines (109 loc) · 2.92 KB
/
plugin-context.ts
File metadata and controls
131 lines (109 loc) · 2.92 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
import {
IPublicApiSkeleton,
IPublicApiHotkey,
IPublicApiSetters,
IPublicApiMaterial,
IPublicApiEvent,
IPublicApiProject,
IPublicApiCommon,
IPublicApiLogger,
IPublicApiCanvas,
IPluginPreferenceMananger,
IPublicApiPlugins,
IPublicApiWorkspace,
IPublicApiCommonUI,
IPublicApiCommand,
} from '../api';
import { IPublicEnumPluginRegisterLevel } from '../enum';
import { IPublicModelEngineConfig, IPublicModelWindow } from './';
export interface IPublicModelPluginContext {
/**
* 可通过该对象读取插件初始化配置
* by using this, init options can be accessed from inside plugin
*/
preference: IPluginPreferenceMananger;
/**
* skeleton API
* @tutorial https://lowcode-engine.cn/site/docs/api/skeleton
*/
get skeleton(): IPublicApiSkeleton;
/**
* hotkey API
* @tutorial https://lowcode-engine.cn/site/docs/api/hotkey
*/
get hotkey(): IPublicApiHotkey;
/**
* setter API
* @tutorial https://lowcode-engine.cn/site/docs/api/setters
*/
get setters(): IPublicApiSetters;
/**
* config API
* @tutorial https://lowcode-engine.cn/site/docs/api/config
*/
get config(): IPublicModelEngineConfig;
/**
* material API
* @tutorial https://lowcode-engine.cn/site/docs/api/material
*/
get material(): IPublicApiMaterial;
/**
* event API
* this event works globally, can be used between plugins and engine.
* @tutorial https://lowcode-engine.cn/site/docs/api/event
*/
get event(): IPublicApiEvent;
/**
* project API
* @tutorial https://lowcode-engine.cn/site/docs/api/project
*/
get project(): IPublicApiProject;
/**
* common API
* @tutorial https://lowcode-engine.cn/site/docs/api/common
*/
get common(): IPublicApiCommon;
/**
* plugins API
* @tutorial https://lowcode-engine.cn/site/docs/api/plugins
*/
get plugins(): IPublicApiPlugins;
/**
* logger API
* @tutorial https://lowcode-engine.cn/site/docs/api/logger
*/
get logger(): IPublicApiLogger;
/**
* this event works within current plugin, on an emit locally.
* @tutorial https://lowcode-engine.cn/site/docs/api/event
*/
get pluginEvent(): IPublicApiEvent;
/**
* canvas API
* @tutorial https://lowcode-engine.cn/site/docs/api/canvas
*/
get canvas(): IPublicApiCanvas;
/**
* workspace API
* @tutorial https://lowcode-engine.cn/site/docs/api/workspace
*/
get workspace(): IPublicApiWorkspace;
/**
* commonUI API
* @tutorial https://lowcode-engine.cn/site/docs/api/commonUI
*/
get commonUI(): IPublicApiCommonUI;
get command(): IPublicApiCommand;
/**
* 插件注册层级
* @since v1.1.7
*/
get registerLevel(): IPublicEnumPluginRegisterLevel;
get isPluginRegisteredInWorkspace(): boolean;
get editorWindow(): IPublicModelWindow;
}
/**
* @deprecated please use IPublicModelPluginContext instead
*/
export interface ILowCodePluginContext extends IPublicModelPluginContext {
}