GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — docs: improve comments for plugin-context · Dicky-L/lowcode-engine@16c4c96

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • packages
    • designer/src/plugin
      • plugin-context.ts
    • types/src/shell/model
      • plugin-context.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎packages/designer/src/plugin/plugin-context.ts‎

Copy file name to clipboardExpand all lines: packages/designer/src/plugin/plugin-context.ts
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
IPublicApiPlugins,
1717
IPublicTypePluginDeclaration,
1818
IPublicApiCanvas,
19+
IPublicApiWorkspace,
1920
} from '@alilc/lowcode-types';
2021
import {
2122
IPluginContextOptions,
@@ -24,8 +25,8 @@ import {
2425
} from './plugin-types';
2526
import { isValidPreferenceKey } from './plugin-utils';
2627

27-
28-
export default class PluginContext implements IPublicModelPluginContext, ILowCodePluginContextPrivate {
28+
export default class PluginContext implements
29+
IPublicModelPluginContext, ILowCodePluginContextPrivate {
2930
hotkey: IPublicApiHotkey;
3031
project: IPublicApiProject;
3132
skeleton: IPublicApiSkeleton;
@@ -39,6 +40,7 @@ export default class PluginContext implements IPublicModelPluginContext, ILowCod
3940
preference: IPluginPreferenceMananger;
4041
pluginEvent: IPublicApiEvent;
4142
canvas: IPublicApiCanvas;
43+
workspace: IPublicApiWorkspace;
4244

4345
constructor(
4446
options: IPluginContextOptions,
Collapse file

‎packages/types/src/shell/model/plugin-context.ts‎

Copy file name to clipboardExpand all lines: packages/types/src/shell/model/plugin-context.ts
+60-2Lines changed: 60 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
IPublicApiCanvas,
1111
IPluginPreferenceMananger,
1212
IPublicApiPlugins,
13+
IPublicApiWorkspace,
1314
} from '../api';
1415
import { IPublicModelEngineConfig } from './';
1516

@@ -28,31 +29,88 @@ export interface IPublicModelPluginContext {
2829
* by using this, init options can be accessed from inside plugin
2930
*/
3031
preference: IPluginPreferenceMananger;
32+
33+
/**
34+
* skeleton API
35+
* @tutorial https://lowcode-engine.cn/site/docs/api/skeleton
36+
*/
3137
get skeleton(): IPublicApiSkeleton;
38+
39+
/**
40+
* hotkey API
41+
* @tutorial https://lowcode-engine.cn/site/docs/api/hotkey
42+
*/
3243
get hotkey(): IPublicApiHotkey;
44+
45+
/**
46+
* setter API
47+
* @tutorial https://lowcode-engine.cn/site/docs/api/setters
48+
*/
3349
get setters(): IPublicApiSetters;
50+
51+
/**
52+
* config API
53+
* @tutorial https://lowcode-engine.cn/site/docs/api/config
54+
*/
3455
get config(): IPublicModelEngineConfig;
56+
57+
/**
58+
* material API
59+
* @tutorial https://lowcode-engine.cn/site/docs/api/material
60+
*/
3561
get material(): IPublicApiMaterial;
3662

3763
/**
64+
* event API
3865
* this event works globally, can be used between plugins and engine.
66+
* @tutorial https://lowcode-engine.cn/site/docs/api/event
3967
*/
4068
get event(): IPublicApiEvent;
69+
70+
/**
71+
* project API
72+
* @tutorial https://lowcode-engine.cn/site/docs/api/project
73+
*/
4174
get project(): IPublicApiProject;
75+
76+
/**
77+
* common API
78+
* @tutorial https://lowcode-engine.cn/site/docs/api/common
79+
*/
4280
get common(): IPublicApiCommon;
81+
82+
/**
83+
* plugins API
84+
* @tutorial https://lowcode-engine.cn/site/docs/api/plugins
85+
*/
4386
get plugins(): IPublicApiPlugins;
87+
88+
/**
89+
* logger API
90+
* @tutorial https://lowcode-engine.cn/site/docs/api/logger
91+
*/
4492
get logger(): IPublicApiLogger;
4593

4694
/**
4795
* this event works within current plugin, on an emit locally.
96+
* @tutorial https://lowcode-engine.cn/site/docs/api/event
4897
*/
4998
get pluginEvent(): IPublicApiEvent;
99+
100+
/**
101+
* canvas API
102+
* @tutorial https://lowcode-engine.cn/site/docs/api/canvas
103+
*/
50104
get canvas(): IPublicApiCanvas;
105+
106+
/**
107+
* workspace API
108+
* @tutorial https://lowcode-engine.cn/site/docs/api/workspace
109+
*/
110+
get workspace(): IPublicApiWorkspace;
51111
}
52112

53113
/**
54-
*
55-
*
56114
* @deprecated please use IPublicModelPluginContext instead
57115
*/
58116
export interface ILowCodePluginContext extends IPublicModelPluginContext {

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.