x-state-lib 0.3.12 → 0.3.14
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/dist/index.js +170 -152
- package/dist/state/runtime.d.ts +33 -10
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { elements as
|
|
1
|
+
import { elements as E } from "x-runtime-lib";
|
|
2
2
|
function xt() {
|
|
3
3
|
return {
|
|
4
4
|
appList: [],
|
|
@@ -59,26 +59,26 @@ function It() {
|
|
|
59
59
|
spaces: []
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
|
-
var gt = typeof global == "object" && global && global.Object === Object && global, Mt = typeof self == "object" && self && self.Object === Object && self, f = gt || Mt || Function("return this")(),
|
|
62
|
+
var gt = typeof global == "object" && global && global.Object === Object && global, Mt = typeof self == "object" && self && self.Object === Object && self, f = gt || Mt || Function("return this")(), _ = f.Symbol, bt = Object.prototype, Dt = bt.hasOwnProperty, Ft = bt.toString, w = _ ? _.toStringTag : void 0;
|
|
63
63
|
function Ut(t) {
|
|
64
|
-
var e = Dt.call(t,
|
|
64
|
+
var e = Dt.call(t, w), r = t[w];
|
|
65
65
|
try {
|
|
66
|
-
t[
|
|
66
|
+
t[w] = void 0;
|
|
67
67
|
var n = !0;
|
|
68
68
|
} catch {
|
|
69
69
|
}
|
|
70
|
-
var
|
|
71
|
-
return n && (e ? t[
|
|
70
|
+
var o = Ft.call(t);
|
|
71
|
+
return n && (e ? t[w] = r : delete t[w]), o;
|
|
72
72
|
}
|
|
73
73
|
var Bt = Object.prototype, zt = Bt.toString;
|
|
74
74
|
function Gt(t) {
|
|
75
75
|
return zt.call(t);
|
|
76
76
|
}
|
|
77
|
-
var Lt = "[object Null]", Nt = "[object Undefined]", W =
|
|
78
|
-
function
|
|
77
|
+
var Lt = "[object Null]", Nt = "[object Undefined]", W = _ ? _.toStringTag : void 0;
|
|
78
|
+
function P(t) {
|
|
79
79
|
return t == null ? t === void 0 ? Nt : Lt : W && W in Object(t) ? Ut(t) : Gt(t);
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function x(t) {
|
|
82
82
|
return t != null && typeof t == "object";
|
|
83
83
|
}
|
|
84
84
|
var N = Array.isArray;
|
|
@@ -90,7 +90,7 @@ var Rt = "[object AsyncFunction]", Vt = "[object Function]", Ht = "[object Gener
|
|
|
90
90
|
function dt(t) {
|
|
91
91
|
if (!I(t))
|
|
92
92
|
return !1;
|
|
93
|
-
var e =
|
|
93
|
+
var e = P(t);
|
|
94
94
|
return e == Vt || e == Ht || e == Rt || e == Kt;
|
|
95
95
|
}
|
|
96
96
|
var F = f["__core-js_shared__"], q = (function() {
|
|
@@ -101,7 +101,7 @@ function Wt(t) {
|
|
|
101
101
|
return !!q && q in t;
|
|
102
102
|
}
|
|
103
103
|
var qt = Function.prototype, Xt = qt.toString;
|
|
104
|
-
function
|
|
104
|
+
function y(t) {
|
|
105
105
|
if (t != null) {
|
|
106
106
|
try {
|
|
107
107
|
return Xt.call(t);
|
|
@@ -114,23 +114,23 @@ function j(t) {
|
|
|
114
114
|
}
|
|
115
115
|
return "";
|
|
116
116
|
}
|
|
117
|
-
var Yt = /[\\^$.*+?()[\]{}|]/g, Jt = /^\[object .+?Constructor\]$/, Zt = Function.prototype,
|
|
118
|
-
"^" +
|
|
117
|
+
var Yt = /[\\^$.*+?()[\]{}|]/g, Jt = /^\[object .+?Constructor\]$/, Zt = Function.prototype, kt = Object.prototype, Qt = Zt.toString, te = kt.hasOwnProperty, ee = RegExp(
|
|
118
|
+
"^" + Qt.call(te).replace(Yt, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
119
119
|
);
|
|
120
120
|
function re(t) {
|
|
121
121
|
if (!I(t) || Wt(t))
|
|
122
122
|
return !1;
|
|
123
123
|
var e = dt(t) ? ee : Jt;
|
|
124
|
-
return e.test(
|
|
124
|
+
return e.test(y(t));
|
|
125
125
|
}
|
|
126
126
|
function ne(t, e) {
|
|
127
127
|
return t?.[e];
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function j(t, e) {
|
|
130
130
|
var r = ne(t, e);
|
|
131
131
|
return re(r) ? r : void 0;
|
|
132
132
|
}
|
|
133
|
-
var B =
|
|
133
|
+
var B = j(f, "WeakMap"), X = Object.create, oe = /* @__PURE__ */ (function() {
|
|
134
134
|
function t() {
|
|
135
135
|
}
|
|
136
136
|
return function(e) {
|
|
@@ -144,7 +144,7 @@ var B = v(f, "WeakMap"), X = Object.create, oe = /* @__PURE__ */ (function() {
|
|
|
144
144
|
};
|
|
145
145
|
})(), Y = (function() {
|
|
146
146
|
try {
|
|
147
|
-
var t =
|
|
147
|
+
var t = j(Object, "defineProperty");
|
|
148
148
|
return t({}, "", {}), t;
|
|
149
149
|
} catch {
|
|
150
150
|
}
|
|
@@ -194,43 +194,43 @@ function he(t, e) {
|
|
|
194
194
|
}
|
|
195
195
|
var ye = "[object Arguments]";
|
|
196
196
|
function J(t) {
|
|
197
|
-
return
|
|
197
|
+
return x(t) && P(t) == ye;
|
|
198
198
|
}
|
|
199
199
|
var vt = Object.prototype, je = vt.hasOwnProperty, ve = vt.propertyIsEnumerable, _e = J(/* @__PURE__ */ (function() {
|
|
200
200
|
return arguments;
|
|
201
201
|
})()) ? J : function(t) {
|
|
202
|
-
return
|
|
202
|
+
return x(t) && je.call(t, "callee") && !ve.call(t, "callee");
|
|
203
203
|
};
|
|
204
204
|
function Te() {
|
|
205
205
|
return !1;
|
|
206
206
|
}
|
|
207
|
-
var _t = typeof exports == "object" && exports && !exports.nodeType && exports, Z = _t && typeof module == "object" && module && !module.nodeType && module, me = Z && Z.exports === _t,
|
|
208
|
-
|
|
209
|
-
|
|
207
|
+
var _t = typeof exports == "object" && exports && !exports.nodeType && exports, Z = _t && typeof module == "object" && module && !module.nodeType && module, me = Z && Z.exports === _t, k = me ? f.Buffer : void 0, $e = k ? k.isBuffer : void 0, Tt = $e || Te, we = "[object Arguments]", Ae = "[object Array]", Oe = "[object Boolean]", Se = "[object Date]", Pe = "[object Error]", xe = "[object Function]", Ce = "[object Map]", Ee = "[object Number]", Ie = "[object Object]", Me = "[object RegExp]", De = "[object Set]", Fe = "[object String]", Ue = "[object WeakMap]", Be = "[object ArrayBuffer]", ze = "[object DataView]", Ge = "[object Float32Array]", Le = "[object Float64Array]", Ne = "[object Int8Array]", Re = "[object Int16Array]", Ve = "[object Int32Array]", He = "[object Uint8Array]", Ke = "[object Uint8ClampedArray]", We = "[object Uint16Array]", qe = "[object Uint32Array]", s = {};
|
|
208
|
+
s[Ge] = s[Le] = s[Ne] = s[Re] = s[Ve] = s[He] = s[Ke] = s[We] = s[qe] = !0;
|
|
209
|
+
s[we] = s[Ae] = s[Be] = s[Oe] = s[ze] = s[Se] = s[Pe] = s[xe] = s[Ce] = s[Ee] = s[Ie] = s[Me] = s[De] = s[Fe] = s[Ue] = !1;
|
|
210
210
|
function Xe(t) {
|
|
211
|
-
return
|
|
211
|
+
return x(t) && yt(t.length) && !!s[P(t)];
|
|
212
212
|
}
|
|
213
213
|
function R(t) {
|
|
214
214
|
return function(e) {
|
|
215
215
|
return t(e);
|
|
216
216
|
};
|
|
217
217
|
}
|
|
218
|
-
var mt = typeof exports == "object" && exports && !exports.nodeType && exports,
|
|
218
|
+
var mt = typeof exports == "object" && exports && !exports.nodeType && exports, A = mt && typeof module == "object" && module && !module.nodeType && module, Ye = A && A.exports === mt, U = Ye && gt.process, T = (function() {
|
|
219
219
|
try {
|
|
220
|
-
var t =
|
|
220
|
+
var t = A && A.require && A.require("util").types;
|
|
221
221
|
return t || U && U.binding && U.binding("util");
|
|
222
222
|
} catch {
|
|
223
223
|
}
|
|
224
|
-
})(),
|
|
225
|
-
function
|
|
226
|
-
var r = N(t), n = !r && _e(t),
|
|
224
|
+
})(), Q = T && T.isTypedArray, Je = Q ? R(Q) : Xe, Ze = Object.prototype, ke = Ze.hasOwnProperty;
|
|
225
|
+
function Qe(t, e) {
|
|
226
|
+
var r = N(t), n = !r && _e(t), o = !r && !n && Tt(t), a = !r && !n && !o && Je(t), c = r || n || o || a, v = c ? he(t.length, String) : [], g = v.length;
|
|
227
227
|
for (var u in t)
|
|
228
|
-
|
|
228
|
+
ke.call(t, u) && !(c && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
229
229
|
(u == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
ce(u, g))) &&
|
|
233
|
-
return
|
|
230
|
+
o && (u == "offset" || u == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
231
|
+
a && (u == "buffer" || u == "byteLength" || u == "byteOffset") || // Skip index properties.
|
|
232
|
+
ce(u, g))) && v.push(u);
|
|
233
|
+
return v;
|
|
234
234
|
}
|
|
235
235
|
function $t(t, e) {
|
|
236
236
|
return function(r) {
|
|
@@ -247,11 +247,11 @@ function nr(t) {
|
|
|
247
247
|
return e;
|
|
248
248
|
}
|
|
249
249
|
function or(t) {
|
|
250
|
-
return be(t) ?
|
|
250
|
+
return be(t) ? Qe(t) : nr(t);
|
|
251
251
|
}
|
|
252
|
-
var
|
|
252
|
+
var O = j(Object, "create");
|
|
253
253
|
function ar() {
|
|
254
|
-
this.__data__ =
|
|
254
|
+
this.__data__ = O ? O(null) : {}, this.size = 0;
|
|
255
255
|
}
|
|
256
256
|
function ir(t) {
|
|
257
257
|
var e = this.has(t) && delete this.__data__[t];
|
|
@@ -260,7 +260,7 @@ function ir(t) {
|
|
|
260
260
|
var sr = "__lodash_hash_undefined__", cr = Object.prototype, ur = cr.hasOwnProperty;
|
|
261
261
|
function fr(t) {
|
|
262
262
|
var e = this.__data__;
|
|
263
|
-
if (
|
|
263
|
+
if (O) {
|
|
264
264
|
var r = e[t];
|
|
265
265
|
return r === sr ? void 0 : r;
|
|
266
266
|
}
|
|
@@ -269,25 +269,25 @@ function fr(t) {
|
|
|
269
269
|
var pr = Object.prototype, lr = pr.hasOwnProperty;
|
|
270
270
|
function gr(t) {
|
|
271
271
|
var e = this.__data__;
|
|
272
|
-
return
|
|
272
|
+
return O ? e[t] !== void 0 : lr.call(e, t);
|
|
273
273
|
}
|
|
274
274
|
var br = "__lodash_hash_undefined__";
|
|
275
275
|
function dr(t, e) {
|
|
276
276
|
var r = this.__data__;
|
|
277
|
-
return this.size += this.has(t) ? 0 : 1, r[t] =
|
|
277
|
+
return this.size += this.has(t) ? 0 : 1, r[t] = O && e === void 0 ? br : e, this;
|
|
278
278
|
}
|
|
279
|
-
function
|
|
279
|
+
function h(t) {
|
|
280
280
|
var e = -1, r = t == null ? 0 : t.length;
|
|
281
281
|
for (this.clear(); ++e < r; ) {
|
|
282
282
|
var n = t[e];
|
|
283
283
|
this.set(n[0], n[1]);
|
|
284
284
|
}
|
|
285
285
|
}
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
286
|
+
h.prototype.clear = ar;
|
|
287
|
+
h.prototype.delete = ir;
|
|
288
|
+
h.prototype.get = fr;
|
|
289
|
+
h.prototype.has = gr;
|
|
290
|
+
h.prototype.set = dr;
|
|
291
291
|
function hr() {
|
|
292
292
|
this.__data__ = [], this.size = 0;
|
|
293
293
|
}
|
|
@@ -328,12 +328,12 @@ l.prototype.delete = vr;
|
|
|
328
328
|
l.prototype.get = _r;
|
|
329
329
|
l.prototype.has = Tr;
|
|
330
330
|
l.prototype.set = mr;
|
|
331
|
-
var
|
|
331
|
+
var S = j(f, "Map");
|
|
332
332
|
function $r() {
|
|
333
333
|
this.size = 0, this.__data__ = {
|
|
334
|
-
hash: new
|
|
335
|
-
map: new (
|
|
336
|
-
string: new
|
|
334
|
+
hash: new h(),
|
|
335
|
+
map: new (S || l)(),
|
|
336
|
+
string: new h()
|
|
337
337
|
};
|
|
338
338
|
}
|
|
339
339
|
function wr(t) {
|
|
@@ -358,21 +358,21 @@ function Pr(t, e) {
|
|
|
358
358
|
var r = D(this, t), n = r.size;
|
|
359
359
|
return r.set(t, e), this.size += r.size == n ? 0 : 1, this;
|
|
360
360
|
}
|
|
361
|
-
function
|
|
361
|
+
function m(t) {
|
|
362
362
|
var e = -1, r = t == null ? 0 : t.length;
|
|
363
363
|
for (this.clear(); ++e < r; ) {
|
|
364
364
|
var n = t[e];
|
|
365
365
|
this.set(n[0], n[1]);
|
|
366
366
|
}
|
|
367
367
|
}
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
368
|
+
m.prototype.clear = $r;
|
|
369
|
+
m.prototype.delete = Ar;
|
|
370
|
+
m.prototype.get = Or;
|
|
371
|
+
m.prototype.has = Sr;
|
|
372
|
+
m.prototype.set = Pr;
|
|
373
373
|
function xr(t, e) {
|
|
374
|
-
for (var r = -1, n = e.length,
|
|
375
|
-
t[
|
|
374
|
+
for (var r = -1, n = e.length, o = t.length; ++r < n; )
|
|
375
|
+
t[o + r] = e[r];
|
|
376
376
|
return t;
|
|
377
377
|
}
|
|
378
378
|
var Cr = $t(Object.getPrototypeOf, Object);
|
|
@@ -394,32 +394,32 @@ function Ur(t, e) {
|
|
|
394
394
|
var r = this.__data__;
|
|
395
395
|
if (r instanceof l) {
|
|
396
396
|
var n = r.__data__;
|
|
397
|
-
if (!
|
|
397
|
+
if (!S || n.length < Fr - 1)
|
|
398
398
|
return n.push([t, e]), this.size = ++r.size, this;
|
|
399
|
-
r = this.__data__ = new
|
|
399
|
+
r = this.__data__ = new m(n);
|
|
400
400
|
}
|
|
401
401
|
return r.set(t, e), this.size = r.size, this;
|
|
402
402
|
}
|
|
403
|
-
function
|
|
403
|
+
function $(t) {
|
|
404
404
|
var e = this.__data__ = new l(t);
|
|
405
405
|
this.size = e.size;
|
|
406
406
|
}
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
407
|
+
$.prototype.clear = Er;
|
|
408
|
+
$.prototype.delete = Ir;
|
|
409
|
+
$.prototype.get = Mr;
|
|
410
|
+
$.prototype.has = Dr;
|
|
411
|
+
$.prototype.set = Ur;
|
|
412
412
|
var wt = typeof exports == "object" && exports && !exports.nodeType && exports, tt = wt && typeof module == "object" && module && !module.nodeType && module, Br = tt && tt.exports === wt, et = Br ? f.Buffer : void 0;
|
|
413
413
|
et && et.allocUnsafe;
|
|
414
414
|
function zr(t, e) {
|
|
415
415
|
return t.slice();
|
|
416
416
|
}
|
|
417
417
|
function Gr(t, e) {
|
|
418
|
-
for (var r = -1, n = t == null ? 0 : t.length,
|
|
418
|
+
for (var r = -1, n = t == null ? 0 : t.length, o = 0, a = []; ++r < n; ) {
|
|
419
419
|
var c = t[r];
|
|
420
|
-
e(c, r, t) && (
|
|
420
|
+
e(c, r, t) && (a[o++] = c);
|
|
421
421
|
}
|
|
422
|
-
return
|
|
422
|
+
return a;
|
|
423
423
|
}
|
|
424
424
|
function Lr() {
|
|
425
425
|
return [];
|
|
@@ -436,9 +436,9 @@ function Hr(t, e, r) {
|
|
|
436
436
|
function Kr(t) {
|
|
437
437
|
return Hr(t, or, Vr);
|
|
438
438
|
}
|
|
439
|
-
var z =
|
|
440
|
-
(z && p(new z(new ArrayBuffer(1))) != st ||
|
|
441
|
-
var e =
|
|
439
|
+
var z = j(f, "DataView"), G = j(f, "Promise"), L = j(f, "Set"), nt = "[object Map]", Wr = "[object Object]", ot = "[object Promise]", at = "[object Set]", it = "[object WeakMap]", st = "[object DataView]", qr = y(z), Xr = y(S), Yr = y(G), Jr = y(L), Zr = y(B), p = P;
|
|
440
|
+
(z && p(new z(new ArrayBuffer(1))) != st || S && p(new S()) != nt || G && p(G.resolve()) != ot || L && p(new L()) != at || B && p(new B()) != it) && (p = function(t) {
|
|
441
|
+
var e = P(t), r = e == Wr ? t.constructor : void 0, n = r ? y(r) : "";
|
|
442
442
|
if (n)
|
|
443
443
|
switch (n) {
|
|
444
444
|
case qr:
|
|
@@ -454,10 +454,10 @@ var z = v(f, "DataView"), G = v(f, "Promise"), L = v(f, "Set"), nt = "[object Ma
|
|
|
454
454
|
}
|
|
455
455
|
return e;
|
|
456
456
|
});
|
|
457
|
-
var
|
|
457
|
+
var kr = Object.prototype, Qr = kr.hasOwnProperty;
|
|
458
458
|
function tn(t) {
|
|
459
459
|
var e = t.length, r = new t.constructor(e);
|
|
460
|
-
return e && typeof t[0] == "string" &&
|
|
460
|
+
return e && typeof t[0] == "string" && Qr.call(t, "index") && (r.index = t.index, r.input = t.input), r;
|
|
461
461
|
}
|
|
462
462
|
var ct = f.Uint8Array;
|
|
463
463
|
function V(t) {
|
|
@@ -473,7 +473,7 @@ function nn(t) {
|
|
|
473
473
|
var e = new t.constructor(t.source, rn.exec(t));
|
|
474
474
|
return e.lastIndex = t.lastIndex, e;
|
|
475
475
|
}
|
|
476
|
-
var ut =
|
|
476
|
+
var ut = _ ? _.prototype : void 0, ft = ut ? ut.valueOf : void 0;
|
|
477
477
|
function on(t) {
|
|
478
478
|
return ft ? Object(ft.call(t)) : {};
|
|
479
479
|
}
|
|
@@ -520,64 +520,64 @@ function Sn(t) {
|
|
|
520
520
|
}
|
|
521
521
|
var Pn = "[object Map]";
|
|
522
522
|
function xn(t) {
|
|
523
|
-
return
|
|
523
|
+
return x(t) && p(t) == Pn;
|
|
524
524
|
}
|
|
525
|
-
var pt =
|
|
525
|
+
var pt = T && T.isMap, Cn = pt ? R(pt) : xn, En = "[object Set]";
|
|
526
526
|
function In(t) {
|
|
527
|
-
return
|
|
527
|
+
return x(t) && p(t) == En;
|
|
528
528
|
}
|
|
529
|
-
var lt =
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
function
|
|
529
|
+
var lt = T && T.isSet, Mn = lt ? R(lt) : In, At = "[object Arguments]", Dn = "[object Array]", Fn = "[object Boolean]", Un = "[object Date]", Bn = "[object Error]", Ot = "[object Function]", zn = "[object GeneratorFunction]", Gn = "[object Map]", Ln = "[object Number]", St = "[object Object]", Nn = "[object RegExp]", Rn = "[object Set]", Vn = "[object String]", Hn = "[object Symbol]", Kn = "[object WeakMap]", Wn = "[object ArrayBuffer]", qn = "[object DataView]", Xn = "[object Float32Array]", Yn = "[object Float64Array]", Jn = "[object Int8Array]", Zn = "[object Int16Array]", kn = "[object Int32Array]", Qn = "[object Uint8Array]", to = "[object Uint8ClampedArray]", eo = "[object Uint16Array]", ro = "[object Uint32Array]", i = {};
|
|
530
|
+
i[At] = i[Dn] = i[Wn] = i[qn] = i[Fn] = i[Un] = i[Xn] = i[Yn] = i[Jn] = i[Zn] = i[kn] = i[Gn] = i[Ln] = i[St] = i[Nn] = i[Rn] = i[Vn] = i[Hn] = i[Qn] = i[to] = i[eo] = i[ro] = !0;
|
|
531
|
+
i[Bn] = i[Ot] = i[Kn] = !1;
|
|
532
|
+
function C(t, e, r, n, o, a) {
|
|
533
533
|
var c;
|
|
534
534
|
if (c !== void 0)
|
|
535
535
|
return c;
|
|
536
536
|
if (!I(t))
|
|
537
537
|
return t;
|
|
538
|
-
var
|
|
539
|
-
if (
|
|
538
|
+
var v = N(t);
|
|
539
|
+
if (v)
|
|
540
540
|
c = tn(t);
|
|
541
541
|
else {
|
|
542
542
|
var g = p(t), u = g == Ot || g == zn;
|
|
543
543
|
if (Tt(t))
|
|
544
544
|
return zr(t);
|
|
545
|
-
if (g == St || g == At || u && !
|
|
545
|
+
if (g == St || g == At || u && !o)
|
|
546
546
|
c = u ? {} : Sn(t);
|
|
547
547
|
else {
|
|
548
|
-
if (!
|
|
549
|
-
return
|
|
548
|
+
if (!i[g])
|
|
549
|
+
return o ? t : {};
|
|
550
550
|
c = On(t, g);
|
|
551
551
|
}
|
|
552
552
|
}
|
|
553
|
-
|
|
554
|
-
var H =
|
|
553
|
+
a || (a = new $());
|
|
554
|
+
var H = a.get(t);
|
|
555
555
|
if (H)
|
|
556
556
|
return H;
|
|
557
|
-
|
|
558
|
-
c.add(
|
|
559
|
-
}) : Cn(t) && t.forEach(function(b,
|
|
560
|
-
c.set(
|
|
557
|
+
a.set(t, c), Mn(t) ? t.forEach(function(b) {
|
|
558
|
+
c.add(C(b, e, r, b, t, a));
|
|
559
|
+
}) : Cn(t) && t.forEach(function(b, d) {
|
|
560
|
+
c.set(d, C(b, e, r, d, t, a));
|
|
561
561
|
});
|
|
562
|
-
var Pt = Kr, K =
|
|
563
|
-
return ae(K || t, function(b,
|
|
564
|
-
K && (
|
|
562
|
+
var Pt = Kr, K = v ? void 0 : Pt(t);
|
|
563
|
+
return ae(K || t, function(b, d) {
|
|
564
|
+
K && (d = b, b = t[d]), le(c, d, C(b, e, r, d, t, a));
|
|
565
565
|
}), c;
|
|
566
566
|
}
|
|
567
567
|
var no = 1, oo = 4;
|
|
568
568
|
function ao(t) {
|
|
569
|
-
return
|
|
569
|
+
return C(t, no | oo);
|
|
570
570
|
}
|
|
571
571
|
function io(t) {
|
|
572
|
-
const e = [], r = (n,
|
|
573
|
-
if (
|
|
574
|
-
n.children.forEach((c) => r(c,
|
|
572
|
+
const e = [], r = (n, o, a) => {
|
|
573
|
+
if (o !== "" && (o += "."), o += n.key, a = ao(a), a.push(n.name), !n.ui && !n.array)
|
|
574
|
+
n.children.forEach((c) => r(c, o, a));
|
|
575
575
|
else {
|
|
576
576
|
if (n.ui === "strInput" && n.static)
|
|
577
577
|
return;
|
|
578
578
|
const c = {
|
|
579
|
-
keys:
|
|
580
|
-
names:
|
|
579
|
+
keys: o,
|
|
580
|
+
names: a,
|
|
581
581
|
raw: n
|
|
582
582
|
};
|
|
583
583
|
e.push(c);
|
|
@@ -589,75 +589,93 @@ function io(t) {
|
|
|
589
589
|
}
|
|
590
590
|
function so() {
|
|
591
591
|
const t = {};
|
|
592
|
-
for (const e in
|
|
593
|
-
const r = {}, n =
|
|
594
|
-
for (const
|
|
595
|
-
r[
|
|
592
|
+
for (const e in E) {
|
|
593
|
+
const r = {}, n = E[e];
|
|
594
|
+
for (const o in n.props)
|
|
595
|
+
r[o] = io(n.props[o]);
|
|
596
596
|
t[e] = r;
|
|
597
597
|
}
|
|
598
598
|
return t;
|
|
599
599
|
}
|
|
600
|
-
function co() {
|
|
601
|
-
const
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
600
|
+
function co(t) {
|
|
601
|
+
const e = [], r = [
|
|
602
|
+
{
|
|
603
|
+
key: "oldValue",
|
|
604
|
+
name: "x-runtime-lib.oldValue"
|
|
605
|
+
},
|
|
606
|
+
{
|
|
607
|
+
key: "newValue",
|
|
608
|
+
name: "x-runtime-lib.newValue"
|
|
609
|
+
}
|
|
610
|
+
];
|
|
611
|
+
for (const { keys: n, names: o } of t)
|
|
611
612
|
e.push({
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
params:
|
|
615
|
-
{
|
|
616
|
-
key: "oldValue",
|
|
617
|
-
name: "x-runtime-lib.oldValue",
|
|
618
|
-
type: "string"
|
|
619
|
-
},
|
|
620
|
-
{
|
|
621
|
-
key: "newValue",
|
|
622
|
-
name: "x-runtime-lib.newValue",
|
|
623
|
-
type: "string"
|
|
624
|
-
}
|
|
625
|
-
]
|
|
613
|
+
keys: "propChange." + n,
|
|
614
|
+
names: ["x-runtime-lib.propChange", ...o],
|
|
615
|
+
params: r
|
|
626
616
|
});
|
|
627
617
|
return e;
|
|
628
618
|
}
|
|
629
|
-
function
|
|
630
|
-
const
|
|
631
|
-
for (const
|
|
632
|
-
const
|
|
633
|
-
for (const
|
|
634
|
-
[
|
|
635
|
-
...uo(r.props[n]),
|
|
636
|
-
...r.events
|
|
637
|
-
];
|
|
619
|
+
function uo(t) {
|
|
620
|
+
const e = {};
|
|
621
|
+
for (const r in t) {
|
|
622
|
+
const n = t[r];
|
|
623
|
+
for (const o in n.props)
|
|
624
|
+
co(n[o]);
|
|
638
625
|
}
|
|
639
|
-
return
|
|
626
|
+
return e;
|
|
640
627
|
}
|
|
641
|
-
function
|
|
628
|
+
function fo() {
|
|
642
629
|
const t = {};
|
|
643
|
-
for (const e in
|
|
644
|
-
const r =
|
|
630
|
+
for (const e in E) {
|
|
631
|
+
const r = E[e];
|
|
645
632
|
r.slots.length > 0 && (t[e] = r.slots);
|
|
646
633
|
}
|
|
647
634
|
return t;
|
|
648
635
|
}
|
|
649
|
-
function
|
|
650
|
-
const
|
|
636
|
+
function po(t) {
|
|
637
|
+
const e = {};
|
|
638
|
+
for (const r in t) {
|
|
639
|
+
const n = [];
|
|
640
|
+
for (const o of t[r])
|
|
641
|
+
for (const a of o.props)
|
|
642
|
+
n.push({
|
|
643
|
+
keys: "slotProp." + a.key,
|
|
644
|
+
names: ["x-runtime-lib.slotProp", a.name],
|
|
645
|
+
raw: a
|
|
646
|
+
});
|
|
647
|
+
n.length > 0 && (e[r] = n);
|
|
648
|
+
}
|
|
649
|
+
return e;
|
|
650
|
+
}
|
|
651
|
+
function lo(t) {
|
|
652
|
+
const e = {};
|
|
653
|
+
for (const r in t) {
|
|
654
|
+
const n = [];
|
|
655
|
+
for (const o of t[r])
|
|
656
|
+
for (const a of o.methods)
|
|
657
|
+
n.push({
|
|
658
|
+
keys: "slotMethod." + a.key,
|
|
659
|
+
names: ["x-runtime-lib.slotMethod", a.name],
|
|
660
|
+
raw: a
|
|
661
|
+
});
|
|
662
|
+
n.length > 0 && (e[r] = n);
|
|
663
|
+
}
|
|
664
|
+
return e;
|
|
665
|
+
}
|
|
666
|
+
function go() {
|
|
667
|
+
const t = so(), e = uo(t), r = fo(), n = po(r), o = lo(r);
|
|
651
668
|
return {
|
|
652
669
|
props: t,
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
670
|
+
propEvents: e,
|
|
671
|
+
slots: r,
|
|
672
|
+
slotProps: n,
|
|
673
|
+
slotMethods: o
|
|
656
674
|
};
|
|
657
675
|
}
|
|
658
|
-
const
|
|
676
|
+
const ho = (function() {
|
|
659
677
|
return window.globalState || (window.globalState = {
|
|
660
|
-
runtime:
|
|
678
|
+
runtime: go(),
|
|
661
679
|
app: xt(),
|
|
662
680
|
compute: Ct(),
|
|
663
681
|
data: Et(),
|
|
@@ -665,10 +683,10 @@ const bo = (function() {
|
|
|
665
683
|
}), window.globalState;
|
|
666
684
|
})();
|
|
667
685
|
export {
|
|
668
|
-
|
|
686
|
+
ho as globalState,
|
|
669
687
|
xt as initApp,
|
|
670
688
|
Ct as initCompute,
|
|
671
689
|
Et as initData,
|
|
672
690
|
It as initResource,
|
|
673
|
-
|
|
691
|
+
go as initRuntime
|
|
674
692
|
};
|
package/dist/state/runtime.d.ts
CHANGED
|
@@ -1,29 +1,52 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { ZProp, ZSlot, ZSlotMethod, ZSlotProp } from 'x-runtime-lib';
|
|
2
|
+
type Prop = {
|
|
3
3
|
keys: string;
|
|
4
4
|
names: string[];
|
|
5
5
|
raw: ZProp;
|
|
6
6
|
};
|
|
7
|
-
|
|
7
|
+
type Props = {
|
|
8
8
|
[key: string]: {
|
|
9
9
|
[tag: string]: Prop[];
|
|
10
10
|
};
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
type PropEvent = {
|
|
13
|
+
keys: string;
|
|
14
|
+
names: string[];
|
|
15
|
+
params: {
|
|
16
|
+
key: string;
|
|
17
|
+
name: string;
|
|
18
|
+
}[];
|
|
14
19
|
};
|
|
15
|
-
|
|
20
|
+
type PropEvents = {
|
|
16
21
|
[key: string]: {
|
|
17
|
-
[tag: string]:
|
|
22
|
+
[tag: string]: PropEvent[];
|
|
18
23
|
};
|
|
19
24
|
};
|
|
20
|
-
|
|
25
|
+
type Slots = {
|
|
21
26
|
[key: string]: ZSlot[];
|
|
22
27
|
};
|
|
28
|
+
type SlotProp = {
|
|
29
|
+
keys: string;
|
|
30
|
+
names: string[];
|
|
31
|
+
raw: ZSlotProp;
|
|
32
|
+
};
|
|
33
|
+
type SlotProps = {
|
|
34
|
+
[key: string]: SlotProp[];
|
|
35
|
+
};
|
|
36
|
+
type SlotMethod = {
|
|
37
|
+
keys: string;
|
|
38
|
+
names: string[];
|
|
39
|
+
raw: ZSlotMethod;
|
|
40
|
+
};
|
|
41
|
+
type SlotMethods = {
|
|
42
|
+
[key: string]: SlotMethod[];
|
|
43
|
+
};
|
|
23
44
|
export type Runtime = {
|
|
24
45
|
props: Props;
|
|
25
|
-
|
|
26
|
-
events: Events;
|
|
46
|
+
propEvents: PropEvents;
|
|
27
47
|
slots: Slots;
|
|
48
|
+
slotProps: SlotProps;
|
|
49
|
+
slotMethods: SlotMethods;
|
|
28
50
|
};
|
|
29
51
|
export declare function initRuntime(): Runtime;
|
|
52
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "x-state-lib",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.14",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"lodash-es": "^4.17.21",
|
|
26
26
|
"vue": "^3.5.19",
|
|
27
27
|
"vuetify": "^3.9.5",
|
|
28
|
-
"x-runtime-lib": "^0.7.
|
|
28
|
+
"x-runtime-lib": "^0.7.38"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@eslint/js": "^9.34.0",
|