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
@@ -15846,14 +15846,15 @@ const bm = /* @__PURE__ */ gg(_m), {
15846
15846
  javascriptGenerator: Qb
15847
15847
  } = bm;
15848
15848
  export {
15849
- Xb as A,
15849
+ Sb as A,
15850
15850
  Cm as B,
15851
15851
  xm as C,
15852
15852
  Gm as D,
15853
15853
  Vm as E,
15854
- qm as F,
15854
+ jm as F,
15855
15855
  i_ as G,
15856
- Vb as H,
15856
+ Xb as H,
15857
+ Vb as I,
15857
15858
  m_ as M,
15858
15859
  b_ as N,
15859
15860
  qb as O,
@@ -15865,28 +15866,28 @@ export {
15865
15866
  nb as X,
15866
15867
  Rb as a,
15867
15868
  Wm as b,
15868
- Xm as c,
15869
+ qm as c,
15869
15870
  bb as d,
15870
- Z_ as e,
15871
- fb as f,
15872
- Cb as g,
15873
- R_ as h,
15871
+ Xm as e,
15872
+ Z_ as f,
15873
+ fb as g,
15874
+ Cb as h,
15874
15875
  Ib as i,
15875
15876
  Qb as j,
15876
- kb as k,
15877
- Ab as l,
15878
- Nb as m,
15879
- Db as n,
15880
- Mm as o,
15881
- $b as p,
15882
- vm as q,
15883
- Bm as r,
15877
+ R_ as k,
15878
+ kb as l,
15879
+ Ab as m,
15880
+ Nb as n,
15881
+ Db as o,
15882
+ Mm as p,
15883
+ $b as q,
15884
+ vm as r,
15884
15885
  Wb as s,
15885
- zm as t,
15886
+ Bm as t,
15886
15887
  Kb as u,
15887
- ub as v,
15888
- Tb as w,
15889
- M_ as x,
15890
- gb as y,
15891
- Sb as z
15888
+ zm as v,
15889
+ ub as w,
15890
+ Tb as x,
15891
+ M_ as y,
15892
+ gb as z
15892
15893
  };
@@ -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 {};
@@ -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';