mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-11 18:42:56 +00:00
docs: improve comments for plugin-context
This commit is contained in:
parent
bbe438cf83
commit
16c4c96c66
@ -16,6 +16,7 @@ import {
|
||||
IPublicApiPlugins,
|
||||
IPublicTypePluginDeclaration,
|
||||
IPublicApiCanvas,
|
||||
IPublicApiWorkspace,
|
||||
} from '@alilc/lowcode-types';
|
||||
import {
|
||||
IPluginContextOptions,
|
||||
@ -24,8 +25,8 @@ import {
|
||||
} from './plugin-types';
|
||||
import { isValidPreferenceKey } from './plugin-utils';
|
||||
|
||||
|
||||
export default class PluginContext implements IPublicModelPluginContext, ILowCodePluginContextPrivate {
|
||||
export default class PluginContext implements
|
||||
IPublicModelPluginContext, ILowCodePluginContextPrivate {
|
||||
hotkey: IPublicApiHotkey;
|
||||
project: IPublicApiProject;
|
||||
skeleton: IPublicApiSkeleton;
|
||||
@ -39,6 +40,7 @@ export default class PluginContext implements IPublicModelPluginContext, ILowCod
|
||||
preference: IPluginPreferenceMananger;
|
||||
pluginEvent: IPublicApiEvent;
|
||||
canvas: IPublicApiCanvas;
|
||||
workspace: IPublicApiWorkspace;
|
||||
|
||||
constructor(
|
||||
options: IPluginContextOptions,
|
||||
|
||||
@ -10,6 +10,7 @@ import {
|
||||
IPublicApiCanvas,
|
||||
IPluginPreferenceMananger,
|
||||
IPublicApiPlugins,
|
||||
IPublicApiWorkspace,
|
||||
} from '../api';
|
||||
import { IPublicModelEngineConfig } from './';
|
||||
|
||||
@ -28,31 +29,88 @@ 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;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @deprecated please use IPublicModelPluginContext instead
|
||||
*/
|
||||
export interface ILowCodePluginContext extends IPublicModelPluginContext {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user