x-block-lib 0.4.28 → 0.4.29

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.
Files changed (31) hide show
  1. package/dist/{blockly-nx44b3kf.js → blockly-fzxzwly0.js} +23 -22
  2. package/dist/core/blocks/compute/callFuncInternal/v1/index.d.ts +1 -0
  3. package/dist/core/blocks/compute/computeDebugTrace/v1/index.d.ts +1 -0
  4. package/dist/core/blocks/compute/funcEntry/v1/index.d.ts +1 -0
  5. package/dist/core/blocks/compute/index.d.ts +4 -0
  6. package/dist/core/blocks/compute/setFuncOutput/v1/index.d.ts +1 -0
  7. package/dist/core/blocks/index.d.ts +1 -0
  8. package/dist/core/category/data/v1/index.d.ts +7 -0
  9. package/dist/core/category/flow/v1/index.d.ts +7 -0
  10. package/dist/core/category/func/v1/index.d.ts +7 -0
  11. package/dist/core/category/index.d.ts +3 -0
  12. package/dist/core/category/interface/v1/index.d.ts +2 -1
  13. package/dist/core/category/procedure/v1/index.d.ts +2 -1
  14. package/dist/core/category/ui/v1/index.d.ts +2 -1
  15. package/dist/core/category/variable/v1/index.d.ts +1 -1
  16. package/dist/core/locale/msg/en.d.ts +6 -0
  17. package/dist/core/locale/msg/zhHans.d.ts +6 -0
  18. package/dist/core/utils/app/element.d.ts +1 -1
  19. package/dist/core/utils/app/node.d.ts +1 -1
  20. package/dist/core/utils/common/index.d.ts +0 -1
  21. package/dist/core/utils/common/state.d.ts +63 -23
  22. package/dist/core/utils/compute/func.d.ts +15 -0
  23. package/dist/core/utils/data/index.d.ts +11 -8
  24. package/dist/{i18n-en-gc42vrme.js → i18n-en-n4vh7fbw.js} +4 -0
  25. package/dist/{i18n-zhHans-lr11azyl.js → i18n-zhHans-idmyovro.js} +4 -0
  26. package/dist/index.d.ts +1 -0
  27. package/dist/index.js +3459 -2479
  28. package/dist/{msg-en-kge4l75d.js → msg-en-g3j3bnkv.js} +7 -4
  29. package/dist/{msg-zhHans-hfznrf5k.js → msg-zhHans-jpsfx4co.js} +8 -1
  30. package/dist/state/index.d.ts +148 -0
  31. package/package.json +1 -1
@@ -38,6 +38,7 @@ const _ = {
38
38
  CATEGORY_CALC: "calc",
39
39
  CATEGORY_COLOR: "color",
40
40
  CATEGORY_DATA: "data",
41
+ CATEGORY_FUNC: "func",
41
42
  CATEGORY_INTERFACE: "inf",
42
43
  CATEGORY_LIST: "list",
43
44
  CATEGORY_LOGIC: "logic",
@@ -60,19 +61,15 @@ const _ = {
60
61
  ASSET_DO: "do",
61
62
  ASSET_NAME: "name",
62
63
  ASSET_RESULT: "result",
63
- // download asset
64
64
  ASSET_V1_DOWNLOAD_ASSET_TITLE: "download asset",
65
65
  ASSET_V1_DOWNLOAD_ASSET_TOOLTIP: "ASSET_V1_DOWNLOAD_ASSET_TOOLTIP",
66
66
  ASSET_V1_DOWNLOAD_ASSET_HELPURL: "ASSET_V1_DOWNLOAD_ASSET_HELPURL",
67
- // select asset
68
67
  ASSET_V1_SELECT_ASSET_TITLE: "select asset",
69
68
  ASSET_V1_SELECT_ASSET_TOOLTIP: "ASSET_V1_SELECT_ASSET_TOOLTIP",
70
69
  ASSET_V1_SELECT_ASSET_HELPURL: "ASSET_V1_SELECT_ASSET_HELPURL",
71
- // select dir
72
70
  ASSET_V1_SELECT_DIR_TITLE: "select directory",
73
71
  ASSET_V1_SELECT_DIR_TOOLTIP: "ASSET_V1_SELECT_DIR_TOOLTIP",
74
72
  ASSET_V1_SELECT_DIR_HELPURL: "ASSET_V1_SELECT_DIR_HELPURL",
75
- // upload asset
76
73
  ASSET_V1_UPLOAD_ASSET_TITLE: "upload asset",
77
74
  ASSET_V1_UPLOAD_ASSET_TOOLTIP: "ASSET_V1_UPLOAD_ASSET_TOOLTIP",
78
75
  ASSET_V1_UPLOAD_ASSET_HELPURL: "ASSET_V1_UPLOAD_ASSET_HELPURL",
@@ -88,6 +85,12 @@ const _ = {
88
85
  COLOR_V1_RGB_TITLE: "color red %1 green %2 blue %3",
89
86
  COLOR_V1_RGB_TOOLTIP: "COLOR_V1_RGB_TOOLTIP",
90
87
  COLOR_V1_RGB_HELPURL: "COLOR_V1_RGB_HELPURL",
88
+ // compute
89
+ COMPUTE_DO: "do",
90
+ COMPUTE_FUNC_ENTRY: "func entry",
91
+ COMPUTE_V1_DEBUG_TRACE_TITLE: "debug trace",
92
+ COMPUTE_V1_DEBUG_TRACE_TOOLTIP: "COMPUTE_V1_DEBUG_TRACE_TOOLTIP",
93
+ COMPUTE_V1_DEBUG_TRACE_HELPURL: "COMPUTE_V1_DEBUG_TRACE_HELPURL",
91
94
  // list
92
95
  LIST_V1_CREATE_CONTAINER_TITLE: "list",
93
96
  LIST_V1_CREATE_ITEM_TITLE: "item",
@@ -1,7 +1,7 @@
1
1
  const _ = {
2
2
  // blockly
3
3
  ADD_COMMENT: "添加注释",
4
- CLEAN_UP: "整理块",
4
+ CLEAN_UP: "清理块",
5
5
  COLLAPSED_WARNINGS_WARNING: "已折叠的块内包含警告。",
6
6
  COLLAPSE_ALL: "折叠所有块",
7
7
  COLLAPSE_BLOCK: "折叠块",
@@ -38,6 +38,7 @@ const _ = {
38
38
  CATEGORY_CALC: "计算",
39
39
  CATEGORY_COLOR: "颜色",
40
40
  CATEGORY_DATA: "数据",
41
+ CATEGORY_FUNC: "函数",
41
42
  CATEGORY_INTERFACE: "接口",
42
43
  CATEGORY_LIST: "列表",
43
44
  CATEGORY_LOGIC: "逻辑",
@@ -84,6 +85,12 @@ const _ = {
84
85
  COLOR_V1_RGB_TITLE: "颜色 红 %1 绿 %2 蓝 %3",
85
86
  COLOR_V1_RGB_TOOLTIP: "COLOR_V1_RGB_TOOLTIP",
86
87
  COLOR_V1_RGB_HELPURL: "COLOR_V1_RGB_HELPURL",
88
+ // compute
89
+ COMPUTE_DO: "执行",
90
+ COMPUTE_FUNC_ENTRY: "函数入口",
91
+ COMPUTE_V1_DEBUG_TRACE_TITLE: "调试追踪",
92
+ COMPUTE_V1_DEBUG_TRACE_TOOLTIP: "COMPUTE_V1_DEBUG_TRACE_TOOLTIP",
93
+ COMPUTE_V1_DEBUG_TRACE_HELPURL: "COMPUTE_V1_DEBUG_TRACE_HELPURL",
87
94
  // list
88
95
  LIST_V1_CREATE_CONTAINER_TITLE: "列表",
89
96
  LIST_V1_CREATE_ITEM_TITLE: "项目",
@@ -0,0 +1,148 @@
1
+ export interface PropInfo {
2
+ keys: string;
3
+ names: string[];
4
+ readonly?: boolean;
5
+ }
6
+ export interface DirNode {
7
+ id: string;
8
+ name: string;
9
+ children: DirNode[];
10
+ }
11
+ export type BlocklyState = {
12
+ runtime: {
13
+ finalProps: {
14
+ [elementKey: string]: {
15
+ [tag: string]: PropInfo[];
16
+ };
17
+ };
18
+ };
19
+ app: {
20
+ apps: {
21
+ [appid: string]: {
22
+ id: string;
23
+ name: string;
24
+ pages: {
25
+ id: string;
26
+ name: string;
27
+ }[];
28
+ sort: number;
29
+ };
30
+ };
31
+ view: {
32
+ type: 'page' | 'comp';
33
+ subtype: 'common';
34
+ version: string;
35
+ args?: {
36
+ id: string;
37
+ name: string;
38
+ type: string;
39
+ }[];
40
+ nodes: {
41
+ [key: string]: {
42
+ id: string;
43
+ key: string;
44
+ alias: string;
45
+ sort: number;
46
+ };
47
+ };
48
+ };
49
+ };
50
+ compute: {
51
+ spaces: {
52
+ [spaceid: string]: {
53
+ id: string;
54
+ name: string;
55
+ sort: number;
56
+ };
57
+ };
58
+ funcs: {
59
+ [funcid: string]: {
60
+ id: string;
61
+ spaceid: string;
62
+ name: string;
63
+ inputs: {
64
+ id: string;
65
+ name: string;
66
+ type: string;
67
+ };
68
+ outputs: {
69
+ id: string;
70
+ name: string;
71
+ type: string;
72
+ };
73
+ dev: string;
74
+ prod: string;
75
+ sort: number;
76
+ };
77
+ };
78
+ currFunc: {
79
+ id: string;
80
+ name: string;
81
+ inputs: {
82
+ id: string;
83
+ name: string;
84
+ type: string;
85
+ }[];
86
+ outputs: {
87
+ id: string;
88
+ name: string;
89
+ type: string;
90
+ }[];
91
+ };
92
+ flows: {
93
+ [flowid: string]: {
94
+ id: string;
95
+ spaceid: string;
96
+ name: string;
97
+ };
98
+ };
99
+ currFlow: {
100
+ id: string;
101
+ name: string;
102
+ };
103
+ };
104
+ data: {
105
+ spaces: {
106
+ [spaceid: string]: {
107
+ id: string;
108
+ name: string;
109
+ sort: number;
110
+ };
111
+ };
112
+ tables: {
113
+ [tableid: string]: {
114
+ id: string;
115
+ spaceid: string;
116
+ name: string;
117
+ columns: {
118
+ id: string;
119
+ name: string;
120
+ type: string;
121
+ extend: string;
122
+ }[];
123
+ indexes: {
124
+ id: string;
125
+ columns: string[];
126
+ unique: boolean;
127
+ }[];
128
+ sort: number;
129
+ };
130
+ };
131
+ };
132
+ resource: {
133
+ spaces: {
134
+ [spaceid: string]: {
135
+ id: string;
136
+ name: string;
137
+ dirTree: DirNode;
138
+ resources: {
139
+ id: string;
140
+ dirid: string;
141
+ name: string;
142
+ }[];
143
+ sort: number;
144
+ };
145
+ };
146
+ };
147
+ };
148
+ export declare const blocklyState: BlocklyState;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "x-block-lib",
3
3
  "private": false,
4
- "version": "0.4.28",
4
+ "version": "0.4.29",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",