x-block-lib 0.4.28 → 0.4.30

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 (33) hide show
  1. package/dist/blockly-du5wkcdc.js +15891 -0
  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/compute/space.d.ts +1 -1
  24. package/dist/core/utils/data/index.d.ts +11 -8
  25. package/dist/{i18n-en-gc42vrme.js → i18n-en-n4vh7fbw.js} +4 -0
  26. package/dist/{i18n-zhHans-lr11azyl.js → i18n-zhHans-idmyovro.js} +4 -0
  27. package/dist/index.d.ts +1 -0
  28. package/dist/index.js +3453 -2479
  29. package/dist/{msg-en-kge4l75d.js → msg-en-g3j3bnkv.js} +7 -4
  30. package/dist/{msg-zhHans-hfznrf5k.js → msg-zhHans-jpsfx4co.js} +8 -1
  31. package/dist/state/index.d.ts +147 -0
  32. package/package.json +1 -1
  33. package/dist/blockly-nx44b3kf.js +0 -15892
@@ -0,0 +1 @@
1
+ export {};
@@ -1 +1,5 @@
1
1
  import './callFunc/v1';
2
+ import './callFuncInternal/v1';
3
+ import './computeDebugTrace/v1';
4
+ import './funcEntry/v1';
5
+ import './setFuncOutput/v1';
@@ -1,5 +1,6 @@
1
1
  import './color';
2
2
  import './common';
3
+ import './compute';
3
4
  import './list';
4
5
  import './logic';
5
6
  import './loop';
@@ -0,0 +1,7 @@
1
+ import * as Blockly from 'blockly/core';
2
+ declare function callback(): Blockly.utils.toolbox.FlyoutDefinition;
3
+ export declare const dataCategoryV1: {
4
+ name: string;
5
+ callback: typeof callback;
6
+ };
7
+ export {};
@@ -0,0 +1,7 @@
1
+ import * as Blockly from 'blockly/core';
2
+ declare function callback(): Blockly.utils.toolbox.FlyoutDefinition;
3
+ export declare const flowCategoryV1: {
4
+ name: string;
5
+ callback: typeof callback;
6
+ };
7
+ export {};
@@ -0,0 +1,7 @@
1
+ import * as Blockly from 'blockly/core';
2
+ declare function callback(): Blockly.utils.toolbox.FlyoutDefinition;
3
+ export declare const funcCategoryV1: {
4
+ name: string;
5
+ callback: typeof callback;
6
+ };
7
+ export {};
@@ -1,3 +1,6 @@
1
+ export * from './data/v1';
2
+ export * from './flow/v1';
3
+ export * from './func/v1';
1
4
  export * from './interface/v1';
2
5
  export * from './procedure/v1';
3
6
  export * from './ui/v1';
@@ -1,4 +1,5 @@
1
- declare function callback(): Element[];
1
+ import * as Blockly from 'blockly/core';
2
+ declare function callback(): Blockly.utils.toolbox.FlyoutDefinition;
2
3
  export declare const interfaceCategoryV1: {
3
4
  name: string;
4
5
  callback: typeof callback;
@@ -1,4 +1,5 @@
1
- declare function callback(): Element[];
1
+ import * as Blockly from 'blockly/core';
2
+ declare function callback(): Blockly.utils.toolbox.FlyoutDefinition;
2
3
  export declare const procedureCategoryV1: {
3
4
  name: string;
4
5
  callback: typeof callback;
@@ -1,4 +1,5 @@
1
- declare function callback(): Element[];
1
+ import * as Blockly from 'blockly/core';
2
+ declare function callback(): Blockly.utils.toolbox.FlyoutDefinition;
2
3
  export declare const uiCategoryV1: {
3
4
  name: string;
4
5
  callback: typeof callback;
@@ -1,5 +1,5 @@
1
1
  import * as Blockly from 'blockly/core';
2
- declare function callback(workspace: Blockly.WorkspaceSvg): Element[];
2
+ declare function callback(workspace: Blockly.WorkspaceSvg): Blockly.utils.toolbox.FlyoutDefinition;
3
3
  export declare const variableCategoryV1: {
4
4
  name: string;
5
5
  callback: typeof callback;
@@ -36,6 +36,7 @@ declare const _default: {
36
36
  CATEGORY_CALC: string;
37
37
  CATEGORY_COLOR: string;
38
38
  CATEGORY_DATA: string;
39
+ CATEGORY_FUNC: string;
39
40
  CATEGORY_INTERFACE: string;
40
41
  CATEGORY_LIST: string;
41
42
  CATEGORY_LOGIC: string;
@@ -79,6 +80,11 @@ declare const _default: {
79
80
  COLOR_V1_RGB_TITLE: string;
80
81
  COLOR_V1_RGB_TOOLTIP: string;
81
82
  COLOR_V1_RGB_HELPURL: string;
83
+ COMPUTE_DO: string;
84
+ COMPUTE_FUNC_ENTRY: string;
85
+ COMPUTE_V1_DEBUG_TRACE_TITLE: string;
86
+ COMPUTE_V1_DEBUG_TRACE_TOOLTIP: string;
87
+ COMPUTE_V1_DEBUG_TRACE_HELPURL: string;
82
88
  LIST_V1_CREATE_CONTAINER_TITLE: string;
83
89
  LIST_V1_CREATE_ITEM_TITLE: string;
84
90
  LIST_V1_CREATE_TITLE: string;
@@ -36,6 +36,7 @@ declare const _default: {
36
36
  CATEGORY_CALC: string;
37
37
  CATEGORY_COLOR: string;
38
38
  CATEGORY_DATA: string;
39
+ CATEGORY_FUNC: string;
39
40
  CATEGORY_INTERFACE: string;
40
41
  CATEGORY_LIST: string;
41
42
  CATEGORY_LOGIC: string;
@@ -79,6 +80,11 @@ declare const _default: {
79
80
  COLOR_V1_RGB_TITLE: string;
80
81
  COLOR_V1_RGB_TOOLTIP: string;
81
82
  COLOR_V1_RGB_HELPURL: string;
83
+ COMPUTE_DO: string;
84
+ COMPUTE_FUNC_ENTRY: string;
85
+ COMPUTE_V1_DEBUG_TRACE_TITLE: string;
86
+ COMPUTE_V1_DEBUG_TRACE_TOOLTIP: string;
87
+ COMPUTE_V1_DEBUG_TRACE_HELPURL: string;
82
88
  LIST_V1_CREATE_CONTAINER_TITLE: string;
83
89
  LIST_V1_CREATE_ITEM_TITLE: string;
84
90
  LIST_V1_CREATE_TITLE: string;
@@ -1,6 +1,6 @@
1
1
  import * as Blockly from 'blockly/core';
2
2
  import { ZEvent, ZMethod } from 'x-runtime-lib';
3
- import { PropInfo } from '../common';
3
+ import { PropInfo } from '../../../state';
4
4
  type Filter = 'event' | 'method';
5
5
  interface ElementInfo {
6
6
  key: string;
@@ -1,6 +1,6 @@
1
1
  import * as Blockly from 'blockly/core';
2
2
  import { ZEvent, ZMethod } from 'x-runtime-lib';
3
- import { PropInfo } from '../common';
3
+ import { PropInfo } from '../../../state';
4
4
  type Filter = 'event' | 'method';
5
5
  interface NodeInfo {
6
6
  id: string;
@@ -1,5 +1,4 @@
1
1
  import * as Blockly from 'blockly/core';
2
- export * from './state';
3
2
  export declare function ensureOpts(options: Blockly.MenuOption[]): Blockly.MenuOption[];
4
3
  export declare function genParamShadowV1(param: {
5
4
  type: 'string' | 'number' | 'boolean';
@@ -47,37 +47,59 @@ export type BlocklyState = {
47
47
  };
48
48
  };
49
49
  };
50
- resource: {
50
+ compute: {
51
51
  spaces: {
52
52
  [spaceid: string]: {
53
53
  id: string;
54
54
  name: string;
55
- dirTree: DirNode;
56
- resources: {
57
- id: string;
58
- dirid: string;
59
- name: string;
60
- }[];
61
55
  sort: number;
62
56
  };
63
57
  };
64
- };
65
- calc: {
66
- spaces: {
67
- [spaceid: string]: {
58
+ funcs: {
59
+ [funcid: string]: {
68
60
  id: string;
61
+ spaceid: string;
69
62
  name: string;
70
- funcs: {
63
+ inputs: {
71
64
  id: string;
72
65
  name: string;
73
- inputs: {}[];
74
- outputs: {}[];
75
- dev: string;
76
- prod: string;
77
- }[];
66
+ type: string;
67
+ };
68
+ outputs: {
69
+ id: string;
70
+ name: string;
71
+ type: string;
72
+ };
73
+ dev: string;
74
+ prod: string;
78
75
  sort: number;
79
76
  };
80
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
+ };
81
103
  };
82
104
  data: {
83
105
  spaces: {
@@ -87,18 +109,36 @@ export type BlocklyState = {
87
109
  sort: number;
88
110
  };
89
111
  };
90
- models: {
91
- [modelid: string]: {
112
+ tables: {
113
+ [tableid: string]: {
92
114
  id: string;
93
115
  spaceid: string;
94
116
  name: string;
95
- fields: {
117
+ columns: {
96
118
  id: string;
97
119
  name: string;
98
120
  type: string;
99
- detail: string;
100
- index: string;
101
- desc: 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;
102
142
  }[];
103
143
  sort: number;
104
144
  };
@@ -2,8 +2,23 @@ import * as Blockly from 'blockly/core';
2
2
  interface FuncInfo {
3
3
  id: string;
4
4
  name: string;
5
+ sort?: number;
5
6
  }
6
7
  export declare function getAllFuncInfos(spaceid: string): FuncInfo[];
7
8
  export declare function getFuncInfo(spaceid: string, id: string): FuncInfo | undefined;
8
9
  export declare function genFuncOpts(spaceid: string): Blockly.MenuOption[];
10
+ export declare function getCurrFunc(): {
11
+ id: string;
12
+ name: string;
13
+ inputs: {
14
+ id: string;
15
+ name: string;
16
+ type: string;
17
+ }[];
18
+ outputs: {
19
+ id: string;
20
+ name: string;
21
+ type: string;
22
+ }[];
23
+ };
9
24
  export {};
@@ -2,7 +2,7 @@ import * as Blockly from 'blockly/core';
2
2
  interface SpaceInfo {
3
3
  id: string;
4
4
  name: string;
5
- sort?: number;
5
+ sort: number;
6
6
  }
7
7
  export declare function getAllSpaceInfos(): SpaceInfo[];
8
8
  export declare function getSpaceInfo(id: string): SpaceInfo | undefined;
@@ -7,20 +7,23 @@ interface SpaceInfo {
7
7
  export declare function getAllSpaceInfos(): SpaceInfo[];
8
8
  export declare function getSpaceInfo(id: string): SpaceInfo | undefined;
9
9
  export declare function genSpaceOpts(): Blockly.MenuOption[];
10
- interface ModelInfo {
10
+ interface TableInfo {
11
11
  id: string;
12
12
  name: string;
13
- fields: {
13
+ columns: {
14
14
  id: string;
15
15
  name: string;
16
16
  type: string;
17
- detail: string;
18
- index: string;
19
- desc: string;
17
+ extend: string;
18
+ }[];
19
+ indexes: {
20
+ id: string;
21
+ columns: string[];
22
+ unique: boolean;
20
23
  }[];
21
24
  sort?: number;
22
25
  }
23
- export declare function getAllModelInfos(spaceid: string): ModelInfo[];
24
- export declare function getModelInfo(id: string): ModelInfo | undefined;
25
- export declare function genModelOpts(spaceid: string): Blockly.MenuOption[];
26
+ export declare function getAllTableInfos(spaceid: string): TableInfo[];
27
+ export declare function getTableInfo(id: string): TableInfo | undefined;
28
+ export declare function genTableOpts(spaceid: string): Blockly.MenuOption[];
26
29
  export {};
@@ -1,11 +1,15 @@
1
1
  const t = {
2
2
  "x-block-lib": {
3
+ comp: "Comp",
4
+ funcEntry: "Func Entry",
3
5
  msg: {
4
6
  cannotCleanInLockState: "Cannot clean in lock state",
5
7
  cannotArrangeInLockState: "Cannot arrange in lock state"
6
8
  },
7
9
  navigator: "Navigator",
8
10
  noOption: "No Option",
11
+ page: "Page",
12
+ procedure: "Procedure",
9
13
  temporaryBlock: "Temporary Block",
10
14
  tip: {
11
15
  hotkeyCtrlE: "Press 'Ctrl W' to navigate",
@@ -1,11 +1,15 @@
1
1
  const t = {
2
2
  "x-block-lib": {
3
+ comp: "组件",
4
+ funcEntry: "函数入口",
3
5
  msg: {
4
6
  cannotCleanInLockState: "不能在锁定状态下清理",
5
7
  cannotArrangeInLockState: "不能再锁定状态下整理"
6
8
  },
7
9
  navigator: "导航器",
8
10
  noOption: "没有选项",
11
+ page: "页面",
12
+ procedure: "程序",
9
13
  temporaryBlock: "临时块",
10
14
  tip: {
11
15
  hotkeyCtrlE: "按「Ctrl W」导航",
package/dist/index.d.ts CHANGED
@@ -4,3 +4,4 @@ declare const _default: {
4
4
  export default _default;
5
5
  export * from './components';
6
6
  export * from './i18n';
7
+ export * from './state';