Skip to content

Commit 7c6c758

Browse files
authored
Merge branch 'develop' into feat/0228
2 parents 9ab2934 + 53ada7b commit 7c6c758

File tree

273 files changed

+5952
-2530
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

273 files changed

+5952
-2530
lines changed

.eslintrc.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ module.exports = {
1919
'no-await-in-loop': 0,
2020
'no-plusplus': 0,
2121
'@typescript-eslint/no-parameter-properties': 0,
22-
'@typescript-eslint/no-unused-vars': 1,
22+
'no-restricted-exports': ['error'],
2323
'no-multi-assign': 1,
2424
'no-dupe-class-members': 1,
2525
'react/no-deprecated': 1,
@@ -50,7 +50,8 @@ module.exports = {
5050
'comma-dangle': ['error', 'always-multiline'],
5151
'@typescript-eslint/member-ordering': [
5252
'error',
53-
{ default: ['signature', 'field', 'constructor', 'method'] },
53+
{ default: ['signature', 'field', 'constructor', 'method'] }
5454
],
55+
'no-unused-vars': ['error', { "destructuredArrayIgnorePattern": "^_" }]
5556
},
5657
};

.github/workflows/cov packages.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,26 @@ jobs:
7171
working-directory: packages/react-simulator-renderer
7272
test-script: npm test -- --jest-ci --jest-json --jest-coverage --jest-testLocationInResults --jest-outputFile=report.json
7373
package-manager: yarn
74+
annotations: none
75+
76+
cov-utils:
77+
runs-on: ubuntu-latest
78+
# skip fork's PR, otherwise it fails while making a comment
79+
if: ${{ github.event.pull_request.head.repo.full_name == 'alibaba/lowcode-engine' }}
80+
steps:
81+
- name: checkout
82+
uses: actions/checkout@v2
83+
84+
- uses: actions/setup-node@v2
85+
with:
86+
node-version: '14'
87+
88+
- name: install
89+
run: npm i && npm run setup:skip-build
90+
91+
- uses: ArtiomTr/jest-coverage-report-action@v2
92+
with:
93+
working-directory: packages/utils
94+
test-script: npm test
95+
package-manager: yarn
7496
annotations: none

CONTRIBUTOR.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,6 @@
2424
- [Ychangqing](https://github.com/Ychangqing)
2525
- [yize](https://github.com/yize)
2626
- [youluna](https://github.com/youluna)
27+
- [ibreathebsb](https://github.com/ibreathebsb)
2728

2829
如果您贡献过低代码引擎,但是没有看到您的名字,为我们的疏忽感到抱歉。欢迎您通过 PR 补充上自己的名字。

docs/config/sidebars.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ module.exports = {
3939
type: 'category',
4040
label: '扩展编辑器',
4141
collapsed: false,
42-
items: getDocsFromDir('guide/expand/editor'),
42+
items: getDocsFromDir('guide/expand/editor', [{ dir: 'guide/expand/editor/parts', label: 'Parts·造物' }]),
4343
},
4444
{
4545
type: 'category',

docs/docs/api/canvas.md

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: cavas - 画布 API
2+
title: canvas - 画布 API
33
sidebar_position: 12
44
---
55

@@ -17,32 +17,33 @@ sidebar_position: 12
1717

1818
获取拖拽操作对象的实例
1919

20-
```typescript
21-
/**
22-
* 获取拖拽操作对象的实例
23-
* get dragon instance, you can use this to obtain draging related abilities and lifecycle hooks
24-
* @since v1.1.0
25-
*/
26-
get dragon(): IPublicModelDragon | null;
27-
```
28-
关联模型 [IPublicModelDragon](./model/dragon)
20+
`@type {IPublicModelDragon | null}`
21+
22+
23+
相关类型:[IPublicModelDragon](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/model/dragon.ts)
2924

3025
### activeTracker
3126

3227
获取活动追踪器实例
3328

34-
```typescript
35-
/**
36-
* 获取活动追踪器实例
37-
* get activeTracker instance, which is a singleton running in engine.
38-
* it tracks document`s current focusing node/node[], and notify it`s subscribers that when
39-
* focusing node/node[] changed.
40-
* @since v1.1.0
41-
*/
42-
get activeTracker(): IPublicModelActiveTracker | null;
43-
```
29+
`@type {IPublicModelActiveTracker | null}`
30+
31+
相关类型:[IPublicModelActiveTracker](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/model/active-tracker.ts)
32+
33+
### isInLiveEditing
34+
35+
是否处于 LiveEditing 状态
4436

45-
## 方法签名
37+
`@type {boolean}`
38+
39+
### clipboard
40+
全局剪贴板实例
41+
42+
`@type {IPublicModelClipboard}`
43+
44+
相关类型:[IPublicModelClipboard](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/model/clipboard.ts)
45+
46+
## 方法
4647

4748
### createLocation
4849
创建一个文档插入位置对象,该对象用来描述一个即将插入的节点在文档中的位置
@@ -61,15 +62,15 @@ createLocation(locationData: IPublicTypeLocationData): IPublicModelDropLocation;
6162
```typescript
6263
/**
6364
* 创建一个滚动控制器 Scroller,赋予一个视图滚动的基本能力,
64-
* a Scroller is a controller that gives a view (IPublicModelScrollable) the ability scrolling
65+
* a Scroller is a controller that gives a view (IPublicTypeScrollable) the ability scrolling
6566
* to some cordination by api scrollTo.
6667
*
6768
* when a scroller is inited, will need to pass is a scrollable, which has a scrollTarget.
6869
* and when scrollTo(options: { left?: number; top?: number }) is called, scroller will
6970
* move scrollTarget`s top-left corner to (options.left, options.top) that passed in.
7071
* @since v1.1.0
7172
*/
72-
createScroller(scrollable: IPublicModelScrollable): IPublicModelScroller;
73+
createScroller(scrollable: IPublicTypeScrollable): IPublicModelScroller;
7374

7475
```
7576

@@ -83,4 +84,4 @@ createScroller(scrollable: IPublicModelScrollable): IPublicModelScroller;
8384
* @since v1.1.0
8485
*/
8586
createScrollTarget(shell: HTMLDivElement): IPublicModelScrollTarget;
86-
```
87+
```

docs/docs/api/common.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ sidebar_position: 11
2020
#### skeletonCabin
2121
面板扩展相关,详见下方方法签名
2222

23-
## 方法签名
23+
## 方法
2424
### utils
2525
#### isNodeSchema
2626
是否为合法的 schema 结构

docs/docs/api/config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ sidebar_position: 8
1010
## 模块简介
1111
配置模块,负责配置的读、写等操作。
1212

13-
## 方法签名
13+
## 方法
1414
### get
1515
获取指定 key 的值
1616

docs/docs/api/event.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ sidebar_position: 7
1010
## 模块简介
1111
负责事件处理 API,支持自定义监听事件、触发事件。
1212

13-
## 方法签名
13+
## 方法
1414
### on
1515
监听事件
1616

@@ -43,12 +43,13 @@ off(event: string, listener: (...args: any[]) => void): void;
4343

4444
```typescript
4545
/**
46-
* 取消监听事件
47-
* cancel a monitor from a event
46+
* 触发事件
47+
* emit a message for a event
4848
* @param event 事件名称
49-
* @param listener 事件回调
49+
* @param args 事件参数
50+
* @returns
5051
*/
51-
off(event: string, listener: (...args: any[]) => void): void;
52+
emit(event: string, ...args: any[]): void;
5253
```
5354

5455
## 使用示例

docs/docs/api/hotkey.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ sidebar_position: 5
99
## 模块简介
1010
绑定快捷键 API,可以自定义项目快捷键使用。
1111

12-
## 方法签名
12+
## 方法
1313
### bind
1414
绑定快捷键
1515

docs/docs/api/index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,7 @@ sidebar_position: 0
4444
2. 事件(events)的命名格式为:on[Will|Did]VerbNoun?,参考 [https://code.visualstudio.com/api/references/vscode-api#events](https://code.visualstudio.com/api/references/vscode-api#events)
4545
3. 基于 Disposable 模式,对于事件的绑定、快捷键的绑定函数,返回值则是解绑函数
4646
4. 对于属性的导出,统一用 .xxx 的 getter 模式,(尽量)不使用 .getXxx()
47+
48+
## experimental
49+
50+
说明此模块处于公测阶段, API 可能会发生改变.

0 commit comments

Comments
 (0)