x-block-lib 0.4.29 → 0.4.31
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.
|
@@ -7,7 +7,7 @@ interface FuncInfo {
|
|
|
7
7
|
export declare function getAllFuncInfos(spaceid: string): FuncInfo[];
|
|
8
8
|
export declare function getFuncInfo(spaceid: string, id: string): FuncInfo | undefined;
|
|
9
9
|
export declare function genFuncOpts(spaceid: string): Blockly.MenuOption[];
|
|
10
|
-
export declare function
|
|
10
|
+
export declare function getActiveFunc(): {
|
|
11
11
|
id: string;
|
|
12
12
|
name: string;
|
|
13
13
|
inputs: {
|
package/dist/index.js
CHANGED
|
@@ -347,15 +347,13 @@ const Lt = function() {
|
|
|
347
347
|
},
|
|
348
348
|
compute: {
|
|
349
349
|
spaces: {},
|
|
350
|
-
|
|
351
|
-
currFunc: {
|
|
350
|
+
activeFunc: {
|
|
352
351
|
id: "",
|
|
353
352
|
name: "",
|
|
354
353
|
inputs: [],
|
|
355
354
|
outputs: []
|
|
356
355
|
},
|
|
357
|
-
|
|
358
|
-
currFlow: {
|
|
356
|
+
activeFlow: {
|
|
359
357
|
id: "",
|
|
360
358
|
name: ""
|
|
361
359
|
}
|
|
@@ -375,12 +373,8 @@ const Lt = function() {
|
|
|
375
373
|
function Ar() {
|
|
376
374
|
const { spaces: e } = Lt.compute, t = [];
|
|
377
375
|
for (const n in e) {
|
|
378
|
-
const o = e[n];
|
|
379
|
-
t.push({
|
|
380
|
-
id: o.id,
|
|
381
|
-
name: o.name,
|
|
382
|
-
sort: o.sort
|
|
383
|
-
});
|
|
376
|
+
const { id: o, name: r, sort: i } = e[n];
|
|
377
|
+
t.push({ id: o, name: r, sort: i });
|
|
384
378
|
}
|
|
385
379
|
return t.sort((n, o) => n.sort - o.sort), t;
|
|
386
380
|
}
|
|
@@ -391,19 +385,19 @@ function ba() {
|
|
|
391
385
|
}), Cr(e);
|
|
392
386
|
}
|
|
393
387
|
function Lr(e) {
|
|
394
|
-
const { spaces: t
|
|
395
|
-
if (!
|
|
388
|
+
const { spaces: t } = Lt.compute, n = t[e];
|
|
389
|
+
if (!n)
|
|
396
390
|
return [];
|
|
397
|
-
const
|
|
398
|
-
for (const
|
|
399
|
-
const
|
|
400
|
-
|
|
401
|
-
id:
|
|
402
|
-
name:
|
|
403
|
-
sort:
|
|
391
|
+
const o = [];
|
|
392
|
+
for (const r in n.funcs) {
|
|
393
|
+
const i = n.funcs[r];
|
|
394
|
+
o.push({
|
|
395
|
+
id: i.id,
|
|
396
|
+
name: i.name,
|
|
397
|
+
sort: i.sort
|
|
404
398
|
});
|
|
405
399
|
}
|
|
406
|
-
return
|
|
400
|
+
return o.sort((r, i) => r.sort - i.sort), o;
|
|
407
401
|
}
|
|
408
402
|
function Oa(e) {
|
|
409
403
|
const t = [];
|
|
@@ -412,7 +406,7 @@ function Oa(e) {
|
|
|
412
406
|
}), Cr(t);
|
|
413
407
|
}
|
|
414
408
|
function Co() {
|
|
415
|
-
return Lt.compute.
|
|
409
|
+
return Lt.compute.activeFunc;
|
|
416
410
|
}
|
|
417
411
|
const Ia = {
|
|
418
412
|
init: function() {
|
package/dist/state/index.d.ts
CHANGED
|
@@ -53,29 +53,35 @@ export type BlocklyState = {
|
|
|
53
53
|
id: string;
|
|
54
54
|
name: string;
|
|
55
55
|
sort: number;
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
56
|
+
funcs: {
|
|
57
|
+
[funcid: string]: {
|
|
58
|
+
id: string;
|
|
59
|
+
name: string;
|
|
60
|
+
sort: number;
|
|
61
|
+
dev: string;
|
|
62
|
+
prod: 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
|
+
};
|
|
67
74
|
};
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
75
|
+
flows: {
|
|
76
|
+
[flowid: string]: {
|
|
77
|
+
id: string;
|
|
78
|
+
name: string;
|
|
79
|
+
sort: number;
|
|
80
|
+
};
|
|
72
81
|
};
|
|
73
|
-
dev: string;
|
|
74
|
-
prod: string;
|
|
75
|
-
sort: number;
|
|
76
82
|
};
|
|
77
83
|
};
|
|
78
|
-
|
|
84
|
+
activeFunc: {
|
|
79
85
|
id: string;
|
|
80
86
|
name: string;
|
|
81
87
|
inputs: {
|
|
@@ -89,14 +95,7 @@ export type BlocklyState = {
|
|
|
89
95
|
type: string;
|
|
90
96
|
}[];
|
|
91
97
|
};
|
|
92
|
-
|
|
93
|
-
[flowid: string]: {
|
|
94
|
-
id: string;
|
|
95
|
-
spaceid: string;
|
|
96
|
-
name: string;
|
|
97
|
-
};
|
|
98
|
-
};
|
|
99
|
-
currFlow: {
|
|
98
|
+
activeFlow: {
|
|
100
99
|
id: string;
|
|
101
100
|
name: string;
|
|
102
101
|
};
|