x-state-lib 0.1.0

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.
package/README.md ADDED
@@ -0,0 +1 @@
1
+ # x-state-lib
@@ -0,0 +1 @@
1
+ export * from './state';
package/dist/index.js ADDED
@@ -0,0 +1,668 @@
1
+ import { elements as k } from "x-runtime-lib";
2
+ function Wt() {
3
+ return {
4
+ apps: [],
5
+ appid: "",
6
+ type: "page",
7
+ subtype: "",
8
+ version: "",
9
+ args: [],
10
+ nodes: []
11
+ };
12
+ }
13
+ function qt() {
14
+ return {
15
+ router: null,
16
+ i18n: null
17
+ };
18
+ }
19
+ function Yt() {
20
+ return {
21
+ spaces: {},
22
+ funcs: {},
23
+ flows: {},
24
+ activeFunc: {
25
+ id: "",
26
+ name: "",
27
+ inputs: [],
28
+ outputs: []
29
+ },
30
+ activeFlow: {
31
+ id: "",
32
+ name: ""
33
+ }
34
+ };
35
+ }
36
+ function Xt() {
37
+ return {
38
+ spaces: {},
39
+ tables: {}
40
+ };
41
+ }
42
+ function Jt() {
43
+ return {
44
+ spaces: {}
45
+ };
46
+ }
47
+ var $t = typeof global == "object" && global && global.Object === Object && global, Zt = typeof self == "object" && self && self.Object === Object && self, l = $t || Zt || Function("return this")(), j = l.Symbol, mt = Object.prototype, Qt = mt.hasOwnProperty, kt = mt.toString, A = j ? j.toStringTag : void 0;
48
+ function te(t) {
49
+ var e = Qt.call(t, A), r = t[A];
50
+ try {
51
+ t[A] = void 0;
52
+ var n = !0;
53
+ } catch {
54
+ }
55
+ var s = kt.call(t);
56
+ return n && (e ? t[A] = r : delete t[A]), s;
57
+ }
58
+ var ee = Object.prototype, re = ee.toString;
59
+ function ne(t) {
60
+ return re.call(t);
61
+ }
62
+ var ae = "[object Null]", oe = "[object Undefined]", tt = j ? j.toStringTag : void 0;
63
+ function x(t) {
64
+ return t == null ? t === void 0 ? oe : ae : tt && tt in Object(t) ? te(t) : ne(t);
65
+ }
66
+ function C(t) {
67
+ return t != null && typeof t == "object";
68
+ }
69
+ var R = Array.isArray;
70
+ function I(t) {
71
+ var e = typeof t;
72
+ return t != null && (e == "object" || e == "function");
73
+ }
74
+ var ie = "[object AsyncFunction]", se = "[object Function]", ce = "[object GeneratorFunction]", ue = "[object Proxy]";
75
+ function wt(t) {
76
+ if (!I(t))
77
+ return !1;
78
+ var e = x(t);
79
+ return e == se || e == ce || e == ie || e == ue;
80
+ }
81
+ var B = l["__core-js_shared__"], et = function() {
82
+ var t = /[^.]+$/.exec(B && B.keys && B.keys.IE_PROTO || "");
83
+ return t ? "Symbol(src)_1." + t : "";
84
+ }();
85
+ function fe(t) {
86
+ return !!et && et in t;
87
+ }
88
+ var pe = Function.prototype, le = pe.toString;
89
+ function _(t) {
90
+ if (t != null) {
91
+ try {
92
+ return le.call(t);
93
+ } catch {
94
+ }
95
+ try {
96
+ return t + "";
97
+ } catch {
98
+ }
99
+ }
100
+ return "";
101
+ }
102
+ var ge = /[\\^$.*+?()[\]{}|]/g, be = /^\[object .+?Constructor\]$/, de = Function.prototype, he = Object.prototype, ye = de.toString, _e = he.hasOwnProperty, ve = RegExp(
103
+ "^" + ye.call(_e).replace(ge, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
104
+ );
105
+ function Te(t) {
106
+ if (!I(t) || fe(t))
107
+ return !1;
108
+ var e = wt(t) ? ve : be;
109
+ return e.test(_(t));
110
+ }
111
+ function je(t, e) {
112
+ return t == null ? void 0 : t[e];
113
+ }
114
+ function v(t, e) {
115
+ var r = je(t, e);
116
+ return Te(r) ? r : void 0;
117
+ }
118
+ var U = v(l, "WeakMap"), rt = Object.create, $e = /* @__PURE__ */ function() {
119
+ function t() {
120
+ }
121
+ return function(e) {
122
+ if (!I(e))
123
+ return {};
124
+ if (rt)
125
+ return rt(e);
126
+ t.prototype = e;
127
+ var r = new t();
128
+ return t.prototype = void 0, r;
129
+ };
130
+ }();
131
+ function me(t, e) {
132
+ var r = -1, n = t.length;
133
+ for (e || (e = Array(n)); ++r < n; )
134
+ e[r] = t[r];
135
+ return e;
136
+ }
137
+ var nt = function() {
138
+ try {
139
+ var t = v(Object, "defineProperty");
140
+ return t({}, "", {}), t;
141
+ } catch {
142
+ }
143
+ }();
144
+ function we(t, e) {
145
+ for (var r = -1, n = t == null ? 0 : t.length; ++r < n && e(t[r], r, t) !== !1; )
146
+ ;
147
+ return t;
148
+ }
149
+ var Ae = 9007199254740991, Oe = /^(?:0|[1-9]\d*)$/;
150
+ function Se(t, e) {
151
+ var r = typeof t;
152
+ return e = e ?? Ae, !!e && (r == "number" || r != "symbol" && Oe.test(t)) && t > -1 && t % 1 == 0 && t < e;
153
+ }
154
+ function At(t, e, r) {
155
+ e == "__proto__" && nt ? nt(t, e, {
156
+ configurable: !0,
157
+ enumerable: !0,
158
+ value: r,
159
+ writable: !0
160
+ }) : t[e] = r;
161
+ }
162
+ function Ot(t, e) {
163
+ return t === e || t !== t && e !== e;
164
+ }
165
+ var Pe = Object.prototype, xe = Pe.hasOwnProperty;
166
+ function St(t, e, r) {
167
+ var n = t[e];
168
+ (!(xe.call(t, e) && Ot(n, r)) || r === void 0 && !(e in t)) && At(t, e, r);
169
+ }
170
+ function F(t, e, r, n) {
171
+ var s = !r;
172
+ r || (r = {});
173
+ for (var c = -1, o = e.length; ++c < o; ) {
174
+ var u = e[c], f = void 0;
175
+ f === void 0 && (f = t[u]), s ? At(r, u, f) : St(r, u, f);
176
+ }
177
+ return r;
178
+ }
179
+ var Ce = 9007199254740991;
180
+ function Pt(t) {
181
+ return typeof t == "number" && t > -1 && t % 1 == 0 && t <= Ce;
182
+ }
183
+ function xt(t) {
184
+ return t != null && Pt(t.length) && !wt(t);
185
+ }
186
+ var Ie = Object.prototype;
187
+ function H(t) {
188
+ var e = t && t.constructor, r = typeof e == "function" && e.prototype || Ie;
189
+ return t === r;
190
+ }
191
+ function Ee(t, e) {
192
+ for (var r = -1, n = Array(t); ++r < t; )
193
+ n[r] = e(r);
194
+ return n;
195
+ }
196
+ var Fe = "[object Arguments]";
197
+ function at(t) {
198
+ return C(t) && x(t) == Fe;
199
+ }
200
+ var Ct = Object.prototype, Me = Ct.hasOwnProperty, De = Ct.propertyIsEnumerable, Be = at(/* @__PURE__ */ function() {
201
+ return arguments;
202
+ }()) ? at : function(t) {
203
+ return C(t) && Me.call(t, "callee") && !De.call(t, "callee");
204
+ };
205
+ function Le() {
206
+ return !1;
207
+ }
208
+ var It = typeof exports == "object" && exports && !exports.nodeType && exports, ot = It && typeof module == "object" && module && !module.nodeType && module, Ue = ot && ot.exports === It, it = Ue ? l.Buffer : void 0, ze = it ? it.isBuffer : void 0, Et = ze || Le, Ge = "[object Arguments]", Ne = "[object Array]", Re = "[object Boolean]", He = "[object Date]", Ke = "[object Error]", Ve = "[object Function]", We = "[object Map]", qe = "[object Number]", Ye = "[object Object]", Xe = "[object RegExp]", Je = "[object Set]", Ze = "[object String]", Qe = "[object WeakMap]", ke = "[object ArrayBuffer]", tr = "[object DataView]", er = "[object Float32Array]", rr = "[object Float64Array]", nr = "[object Int8Array]", ar = "[object Int16Array]", or = "[object Int32Array]", ir = "[object Uint8Array]", sr = "[object Uint8ClampedArray]", cr = "[object Uint16Array]", ur = "[object Uint32Array]", i = {};
209
+ i[er] = i[rr] = i[nr] = i[ar] = i[or] = i[ir] = i[sr] = i[cr] = i[ur] = !0;
210
+ i[Ge] = i[Ne] = i[ke] = i[Re] = i[tr] = i[He] = i[Ke] = i[Ve] = i[We] = i[qe] = i[Ye] = i[Xe] = i[Je] = i[Ze] = i[Qe] = !1;
211
+ function fr(t) {
212
+ return C(t) && Pt(t.length) && !!i[x(t)];
213
+ }
214
+ function K(t) {
215
+ return function(e) {
216
+ return t(e);
217
+ };
218
+ }
219
+ var Ft = typeof exports == "object" && exports && !exports.nodeType && exports, O = Ft && typeof module == "object" && module && !module.nodeType && module, pr = O && O.exports === Ft, L = pr && $t.process, $ = function() {
220
+ try {
221
+ var t = O && O.require && O.require("util").types;
222
+ return t || L && L.binding && L.binding("util");
223
+ } catch {
224
+ }
225
+ }(), st = $ && $.isTypedArray, lr = st ? K(st) : fr, gr = Object.prototype, br = gr.hasOwnProperty;
226
+ function Mt(t, e) {
227
+ var r = R(t), n = !r && Be(t), s = !r && !n && Et(t), c = !r && !n && !s && lr(t), o = r || n || s || c, u = o ? Ee(t.length, String) : [], f = u.length;
228
+ for (var p in t)
229
+ (e || br.call(t, p)) && !(o && // Safari 9 has enumerable `arguments.length` in strict mode.
230
+ (p == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
231
+ s && (p == "offset" || p == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
232
+ c && (p == "buffer" || p == "byteLength" || p == "byteOffset") || // Skip index properties.
233
+ Se(p, f))) && u.push(p);
234
+ return u;
235
+ }
236
+ function Dt(t, e) {
237
+ return function(r) {
238
+ return t(e(r));
239
+ };
240
+ }
241
+ var dr = Dt(Object.keys, Object), hr = Object.prototype, yr = hr.hasOwnProperty;
242
+ function _r(t) {
243
+ if (!H(t))
244
+ return dr(t);
245
+ var e = [];
246
+ for (var r in Object(t))
247
+ yr.call(t, r) && r != "constructor" && e.push(r);
248
+ return e;
249
+ }
250
+ function V(t) {
251
+ return xt(t) ? Mt(t) : _r(t);
252
+ }
253
+ function vr(t) {
254
+ var e = [];
255
+ if (t != null)
256
+ for (var r in Object(t))
257
+ e.push(r);
258
+ return e;
259
+ }
260
+ var Tr = Object.prototype, jr = Tr.hasOwnProperty;
261
+ function $r(t) {
262
+ if (!I(t))
263
+ return vr(t);
264
+ var e = H(t), r = [];
265
+ for (var n in t)
266
+ n == "constructor" && (e || !jr.call(t, n)) || r.push(n);
267
+ return r;
268
+ }
269
+ function W(t) {
270
+ return xt(t) ? Mt(t, !0) : $r(t);
271
+ }
272
+ var S = v(Object, "create");
273
+ function mr() {
274
+ this.__data__ = S ? S(null) : {}, this.size = 0;
275
+ }
276
+ function wr(t) {
277
+ var e = this.has(t) && delete this.__data__[t];
278
+ return this.size -= e ? 1 : 0, e;
279
+ }
280
+ var Ar = "__lodash_hash_undefined__", Or = Object.prototype, Sr = Or.hasOwnProperty;
281
+ function Pr(t) {
282
+ var e = this.__data__;
283
+ if (S) {
284
+ var r = e[t];
285
+ return r === Ar ? void 0 : r;
286
+ }
287
+ return Sr.call(e, t) ? e[t] : void 0;
288
+ }
289
+ var xr = Object.prototype, Cr = xr.hasOwnProperty;
290
+ function Ir(t) {
291
+ var e = this.__data__;
292
+ return S ? e[t] !== void 0 : Cr.call(e, t);
293
+ }
294
+ var Er = "__lodash_hash_undefined__";
295
+ function Fr(t, e) {
296
+ var r = this.__data__;
297
+ return this.size += this.has(t) ? 0 : 1, r[t] = S && e === void 0 ? Er : e, this;
298
+ }
299
+ function y(t) {
300
+ var e = -1, r = t == null ? 0 : t.length;
301
+ for (this.clear(); ++e < r; ) {
302
+ var n = t[e];
303
+ this.set(n[0], n[1]);
304
+ }
305
+ }
306
+ y.prototype.clear = mr;
307
+ y.prototype.delete = wr;
308
+ y.prototype.get = Pr;
309
+ y.prototype.has = Ir;
310
+ y.prototype.set = Fr;
311
+ function Mr() {
312
+ this.__data__ = [], this.size = 0;
313
+ }
314
+ function M(t, e) {
315
+ for (var r = t.length; r--; )
316
+ if (Ot(t[r][0], e))
317
+ return r;
318
+ return -1;
319
+ }
320
+ var Dr = Array.prototype, Br = Dr.splice;
321
+ function Lr(t) {
322
+ var e = this.__data__, r = M(e, t);
323
+ if (r < 0)
324
+ return !1;
325
+ var n = e.length - 1;
326
+ return r == n ? e.pop() : Br.call(e, r, 1), --this.size, !0;
327
+ }
328
+ function Ur(t) {
329
+ var e = this.__data__, r = M(e, t);
330
+ return r < 0 ? void 0 : e[r][1];
331
+ }
332
+ function zr(t) {
333
+ return M(this.__data__, t) > -1;
334
+ }
335
+ function Gr(t, e) {
336
+ var r = this.__data__, n = M(r, t);
337
+ return n < 0 ? (++this.size, r.push([t, e])) : r[n][1] = e, this;
338
+ }
339
+ function b(t) {
340
+ var e = -1, r = t == null ? 0 : t.length;
341
+ for (this.clear(); ++e < r; ) {
342
+ var n = t[e];
343
+ this.set(n[0], n[1]);
344
+ }
345
+ }
346
+ b.prototype.clear = Mr;
347
+ b.prototype.delete = Lr;
348
+ b.prototype.get = Ur;
349
+ b.prototype.has = zr;
350
+ b.prototype.set = Gr;
351
+ var P = v(l, "Map");
352
+ function Nr() {
353
+ this.size = 0, this.__data__ = {
354
+ hash: new y(),
355
+ map: new (P || b)(),
356
+ string: new y()
357
+ };
358
+ }
359
+ function Rr(t) {
360
+ var e = typeof t;
361
+ return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? t !== "__proto__" : t === null;
362
+ }
363
+ function D(t, e) {
364
+ var r = t.__data__;
365
+ return Rr(e) ? r[typeof e == "string" ? "string" : "hash"] : r.map;
366
+ }
367
+ function Hr(t) {
368
+ var e = D(this, t).delete(t);
369
+ return this.size -= e ? 1 : 0, e;
370
+ }
371
+ function Kr(t) {
372
+ return D(this, t).get(t);
373
+ }
374
+ function Vr(t) {
375
+ return D(this, t).has(t);
376
+ }
377
+ function Wr(t, e) {
378
+ var r = D(this, t), n = r.size;
379
+ return r.set(t, e), this.size += r.size == n ? 0 : 1, this;
380
+ }
381
+ function m(t) {
382
+ var e = -1, r = t == null ? 0 : t.length;
383
+ for (this.clear(); ++e < r; ) {
384
+ var n = t[e];
385
+ this.set(n[0], n[1]);
386
+ }
387
+ }
388
+ m.prototype.clear = Nr;
389
+ m.prototype.delete = Hr;
390
+ m.prototype.get = Kr;
391
+ m.prototype.has = Vr;
392
+ m.prototype.set = Wr;
393
+ function Bt(t, e) {
394
+ for (var r = -1, n = e.length, s = t.length; ++r < n; )
395
+ t[s + r] = e[r];
396
+ return t;
397
+ }
398
+ var Lt = Dt(Object.getPrototypeOf, Object);
399
+ function qr() {
400
+ this.__data__ = new b(), this.size = 0;
401
+ }
402
+ function Yr(t) {
403
+ var e = this.__data__, r = e.delete(t);
404
+ return this.size = e.size, r;
405
+ }
406
+ function Xr(t) {
407
+ return this.__data__.get(t);
408
+ }
409
+ function Jr(t) {
410
+ return this.__data__.has(t);
411
+ }
412
+ var Zr = 200;
413
+ function Qr(t, e) {
414
+ var r = this.__data__;
415
+ if (r instanceof b) {
416
+ var n = r.__data__;
417
+ if (!P || n.length < Zr - 1)
418
+ return n.push([t, e]), this.size = ++r.size, this;
419
+ r = this.__data__ = new m(n);
420
+ }
421
+ return r.set(t, e), this.size = r.size, this;
422
+ }
423
+ function w(t) {
424
+ var e = this.__data__ = new b(t);
425
+ this.size = e.size;
426
+ }
427
+ w.prototype.clear = qr;
428
+ w.prototype.delete = Yr;
429
+ w.prototype.get = Xr;
430
+ w.prototype.has = Jr;
431
+ w.prototype.set = Qr;
432
+ function kr(t, e) {
433
+ return t && F(e, V(e), t);
434
+ }
435
+ function tn(t, e) {
436
+ return t && F(e, W(e), t);
437
+ }
438
+ var Ut = typeof exports == "object" && exports && !exports.nodeType && exports, ct = Ut && typeof module == "object" && module && !module.nodeType && module, en = ct && ct.exports === Ut, ut = en ? l.Buffer : void 0, ft = ut ? ut.allocUnsafe : void 0;
439
+ function rn(t, e) {
440
+ if (e)
441
+ return t.slice();
442
+ var r = t.length, n = ft ? ft(r) : new t.constructor(r);
443
+ return t.copy(n), n;
444
+ }
445
+ function nn(t, e) {
446
+ for (var r = -1, n = t == null ? 0 : t.length, s = 0, c = []; ++r < n; ) {
447
+ var o = t[r];
448
+ e(o, r, t) && (c[s++] = o);
449
+ }
450
+ return c;
451
+ }
452
+ function zt() {
453
+ return [];
454
+ }
455
+ var an = Object.prototype, on = an.propertyIsEnumerable, pt = Object.getOwnPropertySymbols, q = pt ? function(t) {
456
+ return t == null ? [] : (t = Object(t), nn(pt(t), function(e) {
457
+ return on.call(t, e);
458
+ }));
459
+ } : zt;
460
+ function sn(t, e) {
461
+ return F(t, q(t), e);
462
+ }
463
+ var cn = Object.getOwnPropertySymbols, Gt = cn ? function(t) {
464
+ for (var e = []; t; )
465
+ Bt(e, q(t)), t = Lt(t);
466
+ return e;
467
+ } : zt;
468
+ function un(t, e) {
469
+ return F(t, Gt(t), e);
470
+ }
471
+ function Nt(t, e, r) {
472
+ var n = e(t);
473
+ return R(t) ? n : Bt(n, r(t));
474
+ }
475
+ function fn(t) {
476
+ return Nt(t, V, q);
477
+ }
478
+ function pn(t) {
479
+ return Nt(t, W, Gt);
480
+ }
481
+ var z = v(l, "DataView"), G = v(l, "Promise"), N = v(l, "Set"), lt = "[object Map]", ln = "[object Object]", gt = "[object Promise]", bt = "[object Set]", dt = "[object WeakMap]", ht = "[object DataView]", gn = _(z), bn = _(P), dn = _(G), hn = _(N), yn = _(U), g = x;
482
+ (z && g(new z(new ArrayBuffer(1))) != ht || P && g(new P()) != lt || G && g(G.resolve()) != gt || N && g(new N()) != bt || U && g(new U()) != dt) && (g = function(t) {
483
+ var e = x(t), r = e == ln ? t.constructor : void 0, n = r ? _(r) : "";
484
+ if (n)
485
+ switch (n) {
486
+ case gn:
487
+ return ht;
488
+ case bn:
489
+ return lt;
490
+ case dn:
491
+ return gt;
492
+ case hn:
493
+ return bt;
494
+ case yn:
495
+ return dt;
496
+ }
497
+ return e;
498
+ });
499
+ var _n = Object.prototype, vn = _n.hasOwnProperty;
500
+ function Tn(t) {
501
+ var e = t.length, r = new t.constructor(e);
502
+ return e && typeof t[0] == "string" && vn.call(t, "index") && (r.index = t.index, r.input = t.input), r;
503
+ }
504
+ var yt = l.Uint8Array;
505
+ function Y(t) {
506
+ var e = new t.constructor(t.byteLength);
507
+ return new yt(e).set(new yt(t)), e;
508
+ }
509
+ function jn(t, e) {
510
+ var r = e ? Y(t.buffer) : t.buffer;
511
+ return new t.constructor(r, t.byteOffset, t.byteLength);
512
+ }
513
+ var $n = /\w*$/;
514
+ function mn(t) {
515
+ var e = new t.constructor(t.source, $n.exec(t));
516
+ return e.lastIndex = t.lastIndex, e;
517
+ }
518
+ var _t = j ? j.prototype : void 0, vt = _t ? _t.valueOf : void 0;
519
+ function wn(t) {
520
+ return vt ? Object(vt.call(t)) : {};
521
+ }
522
+ function An(t, e) {
523
+ var r = e ? Y(t.buffer) : t.buffer;
524
+ return new t.constructor(r, t.byteOffset, t.length);
525
+ }
526
+ var On = "[object Boolean]", Sn = "[object Date]", Pn = "[object Map]", xn = "[object Number]", Cn = "[object RegExp]", In = "[object Set]", En = "[object String]", Fn = "[object Symbol]", Mn = "[object ArrayBuffer]", Dn = "[object DataView]", Bn = "[object Float32Array]", Ln = "[object Float64Array]", Un = "[object Int8Array]", zn = "[object Int16Array]", Gn = "[object Int32Array]", Nn = "[object Uint8Array]", Rn = "[object Uint8ClampedArray]", Hn = "[object Uint16Array]", Kn = "[object Uint32Array]";
527
+ function Vn(t, e, r) {
528
+ var n = t.constructor;
529
+ switch (e) {
530
+ case Mn:
531
+ return Y(t);
532
+ case On:
533
+ case Sn:
534
+ return new n(+t);
535
+ case Dn:
536
+ return jn(t, r);
537
+ case Bn:
538
+ case Ln:
539
+ case Un:
540
+ case zn:
541
+ case Gn:
542
+ case Nn:
543
+ case Rn:
544
+ case Hn:
545
+ case Kn:
546
+ return An(t, r);
547
+ case Pn:
548
+ return new n();
549
+ case xn:
550
+ case En:
551
+ return new n(t);
552
+ case Cn:
553
+ return mn(t);
554
+ case In:
555
+ return new n();
556
+ case Fn:
557
+ return wn(t);
558
+ }
559
+ }
560
+ function Wn(t) {
561
+ return typeof t.constructor == "function" && !H(t) ? $e(Lt(t)) : {};
562
+ }
563
+ var qn = "[object Map]";
564
+ function Yn(t) {
565
+ return C(t) && g(t) == qn;
566
+ }
567
+ var Tt = $ && $.isMap, Xn = Tt ? K(Tt) : Yn, Jn = "[object Set]";
568
+ function Zn(t) {
569
+ return C(t) && g(t) == Jn;
570
+ }
571
+ var jt = $ && $.isSet, Qn = jt ? K(jt) : Zn, kn = 1, ta = 2, ea = 4, Rt = "[object Arguments]", ra = "[object Array]", na = "[object Boolean]", aa = "[object Date]", oa = "[object Error]", Ht = "[object Function]", ia = "[object GeneratorFunction]", sa = "[object Map]", ca = "[object Number]", Kt = "[object Object]", ua = "[object RegExp]", fa = "[object Set]", pa = "[object String]", la = "[object Symbol]", ga = "[object WeakMap]", ba = "[object ArrayBuffer]", da = "[object DataView]", ha = "[object Float32Array]", ya = "[object Float64Array]", _a = "[object Int8Array]", va = "[object Int16Array]", Ta = "[object Int32Array]", ja = "[object Uint8Array]", $a = "[object Uint8ClampedArray]", ma = "[object Uint16Array]", wa = "[object Uint32Array]", a = {};
572
+ a[Rt] = a[ra] = a[ba] = a[da] = a[na] = a[aa] = a[ha] = a[ya] = a[_a] = a[va] = a[Ta] = a[sa] = a[ca] = a[Kt] = a[ua] = a[fa] = a[pa] = a[la] = a[ja] = a[$a] = a[ma] = a[wa] = !0;
573
+ a[oa] = a[Ht] = a[ga] = !1;
574
+ function E(t, e, r, n, s, c) {
575
+ var o, u = e & kn, f = e & ta, p = e & ea;
576
+ if (o !== void 0)
577
+ return o;
578
+ if (!I(t))
579
+ return t;
580
+ var X = R(t);
581
+ if (X) {
582
+ if (o = Tn(t), !u)
583
+ return me(t, o);
584
+ } else {
585
+ var T = g(t), J = T == Ht || T == ia;
586
+ if (Et(t))
587
+ return rn(t, u);
588
+ if (T == Kt || T == Rt || J && !s) {
589
+ if (o = f || J ? {} : Wn(t), !u)
590
+ return f ? un(t, tn(o, t)) : sn(t, kr(o, t));
591
+ } else {
592
+ if (!a[T])
593
+ return s ? t : {};
594
+ o = Vn(t, T, u);
595
+ }
596
+ }
597
+ c || (c = new w());
598
+ var Z = c.get(t);
599
+ if (Z)
600
+ return Z;
601
+ c.set(t, o), Qn(t) ? t.forEach(function(d) {
602
+ o.add(E(d, e, r, d, t, c));
603
+ }) : Xn(t) && t.forEach(function(d, h) {
604
+ o.set(h, E(d, e, r, h, t, c));
605
+ });
606
+ var Vt = p ? f ? pn : fn : f ? W : V, Q = X ? void 0 : Vt(t);
607
+ return we(Q || t, function(d, h) {
608
+ Q && (h = d, d = t[h]), St(o, h, E(d, e, r, h, t, c));
609
+ }), o;
610
+ }
611
+ var Aa = 1, Oa = 4;
612
+ function Sa(t) {
613
+ return E(t, Aa | Oa);
614
+ }
615
+ function Pa() {
616
+ return {
617
+ props: {}
618
+ };
619
+ }
620
+ function Ia() {
621
+ const t = {};
622
+ for (const e in k) {
623
+ const r = {}, n = k[e];
624
+ for (const s in n.props)
625
+ r[s] = xa(n.props[s]);
626
+ t[e] = r;
627
+ }
628
+ return t;
629
+ }
630
+ function xa(t) {
631
+ const e = [], r = (n, s, c) => {
632
+ if (s !== "" && (s += "."), s += n.key, c = Sa(c), c.push(n.name), !n.ui && !n.array)
633
+ n.children.forEach((o) => r(o, s, c));
634
+ else {
635
+ if (n.ui === "strInput" && n.static)
636
+ return;
637
+ const o = {
638
+ keys: s,
639
+ names: c,
640
+ raw: n
641
+ };
642
+ e.push(o);
643
+ }
644
+ };
645
+ return t.forEach((n) => {
646
+ r(n, "", []);
647
+ }), e;
648
+ }
649
+ const Ea = function() {
650
+ return window.blocklyState || (window.blocklyState = {
651
+ base: qt(),
652
+ runtime: Pa(),
653
+ app: Wt(),
654
+ compute: Yt(),
655
+ data: Xt(),
656
+ resource: Jt()
657
+ }), window.blocklyState;
658
+ }();
659
+ export {
660
+ Ea as blocklyState,
661
+ Ia as buildProps,
662
+ Wt as initApp,
663
+ qt as initBase,
664
+ Yt as initCompute,
665
+ Xt as initData,
666
+ Jt as initResource,
667
+ Pa as initRuntime
668
+ };
@@ -0,0 +1,28 @@
1
+ export type App = {
2
+ id: string;
3
+ name: string;
4
+ pages: {
5
+ id: string;
6
+ name: string;
7
+ }[];
8
+ };
9
+ export type Arg = {
10
+ id: string;
11
+ name: string;
12
+ type: string;
13
+ };
14
+ export type Node = {
15
+ id: string;
16
+ key: string;
17
+ alias: string;
18
+ };
19
+ export type App2 = {
20
+ apps: App[];
21
+ appid: '';
22
+ type: 'page' | 'comp';
23
+ subtype: string;
24
+ version: string;
25
+ args: Arg[];
26
+ nodes: Node[];
27
+ };
28
+ export declare function initApp(): App2;
@@ -0,0 +1,5 @@
1
+ export type Base = {
2
+ router: any;
3
+ i18n: any;
4
+ };
5
+ export declare function initBase(): Base;
@@ -0,0 +1,63 @@
1
+ export type ComputeSpace = {
2
+ id: string;
3
+ name: string;
4
+ sort: number;
5
+ };
6
+ export type Func = {
7
+ id: string;
8
+ spaceid: string;
9
+ name: string;
10
+ sort: number;
11
+ dev: string;
12
+ prod: 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
+ };
24
+ export type Flow = {
25
+ id: string;
26
+ spaceid: string;
27
+ name: string;
28
+ sort: number;
29
+ dev: string;
30
+ prod: string;
31
+ };
32
+ export type ActiveFunc = {
33
+ id: string;
34
+ name: string;
35
+ inputs: {
36
+ id: string;
37
+ name: string;
38
+ type: string;
39
+ }[];
40
+ outputs: {
41
+ id: string;
42
+ name: string;
43
+ type: string;
44
+ }[];
45
+ };
46
+ export type ActiveFlow = {
47
+ id: string;
48
+ name: string;
49
+ };
50
+ export type Compute = {
51
+ spaces: {
52
+ [spaceid: string]: ComputeSpace;
53
+ };
54
+ funcs: {
55
+ [funcid: string]: Func;
56
+ };
57
+ flows: {
58
+ [flowid: string]: Flow;
59
+ };
60
+ activeFunc: ActiveFunc;
61
+ activeFlow: ActiveFlow;
62
+ };
63
+ export declare function initCompute(): Compute;
@@ -0,0 +1,31 @@
1
+ export type DataSpace = {
2
+ id: string;
3
+ name: string;
4
+ sort: number;
5
+ };
6
+ export type Table = {
7
+ id: string;
8
+ spaceid: string;
9
+ name: string;
10
+ sort: number;
11
+ columns: {
12
+ id: string;
13
+ name: string;
14
+ type: string;
15
+ extend: string;
16
+ }[];
17
+ indexes: {
18
+ id: string;
19
+ columns: string[];
20
+ unique: boolean;
21
+ }[];
22
+ };
23
+ export type Data = {
24
+ spaces: {
25
+ [spaceid: string]: DataSpace;
26
+ };
27
+ tables: {
28
+ [tableid: string]: Table;
29
+ };
30
+ };
31
+ export declare function initData(): Data;
@@ -0,0 +1,7 @@
1
+ export * from './app';
2
+ export * from './base';
3
+ export * from './compute';
4
+ export * from './data';
5
+ export * from './resource';
6
+ export * from './runtime';
7
+ export * from './state';
@@ -0,0 +1,24 @@
1
+ export interface DirEntry {
2
+ id: string;
3
+ name: string;
4
+ children: DirEntry[];
5
+ }
6
+ export interface ResourceEntry {
7
+ id: string;
8
+ dirid: string;
9
+ name: string;
10
+ sort: number;
11
+ }
12
+ export type ResourceSpace = {
13
+ id: string;
14
+ name: string;
15
+ sort: number;
16
+ dirTree: DirEntry;
17
+ resources: ResourceEntry[];
18
+ };
19
+ export type Resource = {
20
+ spaces: {
21
+ [spaceid: string]: ResourceSpace;
22
+ };
23
+ };
24
+ export declare function initResource(): Resource;
@@ -0,0 +1,16 @@
1
+ import { ZProp } from 'x-runtime-lib';
2
+ export type Prop = {
3
+ keys: string;
4
+ names: string[];
5
+ raw: ZProp;
6
+ };
7
+ export type Props = {
8
+ [key: string]: {
9
+ [tag: string]: Prop[];
10
+ };
11
+ };
12
+ export type Runtime = {
13
+ props: Props;
14
+ };
15
+ export declare function initRuntime(): Runtime;
16
+ export declare function buildProps(): Props;
@@ -0,0 +1,15 @@
1
+ import { App2 } from './app';
2
+ import { Base } from './base';
3
+ import { Compute } from './compute';
4
+ import { Data } from './data';
5
+ import { Resource } from './resource';
6
+ import { Runtime } from './runtime';
7
+ export type BlocklyState = {
8
+ base: Base;
9
+ runtime: Runtime;
10
+ app: App2;
11
+ compute: Compute;
12
+ data: Data;
13
+ resource: Resource;
14
+ };
15
+ export declare const blocklyState: BlocklyState;
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "x-state-lib",
3
+ "private": false,
4
+ "version": "0.1.0",
5
+ "type": "module",
6
+ "module": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "scripts": {
12
+ "dev": "vite",
13
+ "build": "vue-tsc && vite build",
14
+ "preview": "vite preview",
15
+ "lint": "eslint --fix --ignore-pattern dist/ --ignore-pattern public/ .",
16
+ "format": "prettier --write .",
17
+ "lint-staged": "lint-staged",
18
+ "prepare": "husky"
19
+ },
20
+ "lint-staged": {
21
+ "*.{vue,js,jsx,cjs,mjs,ts,tsx,cts,mts}": "eslint --fix --ignore-pattern dist/ --ignore-pattern public/ .",
22
+ "*": "prettier --write ."
23
+ },
24
+ "dependencies": {
25
+ "lodash-es": "^4.17.21",
26
+ "vue": "^3.5.12",
27
+ "vuetify": "^3.7.3",
28
+ "x-runtime-lib": "^0.5.18"
29
+ },
30
+ "devDependencies": {
31
+ "@eslint/js": "^10.0.0",
32
+ "@types/lodash-es": "^4.17.12",
33
+ "@types/node": "^22.7.7",
34
+ "@vitejs/plugin-vue": "^5.1.4",
35
+ "eslint": "^9.13.0",
36
+ "eslint-config-prettier": "^9.1.0",
37
+ "eslint-plugin-prettier": "^5.2.1",
38
+ "eslint-plugin-vue": "^9.29.1",
39
+ "husky": "^9.1.6",
40
+ "lint-staged": "^15.2.10",
41
+ "prettier": "3.3.3",
42
+ "sass": "^1.80.3",
43
+ "typescript": "^5.6.3",
44
+ "typescript-eslint": "^8.11.0",
45
+ "vite": "^5.4.9",
46
+ "vite-plugin-css-injected-by-js": "^3.5.2",
47
+ "vite-plugin-vuetify": "^2.0.4",
48
+ "vue-tsc": "^2.1.6"
49
+ }
50
+ }