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 CHANGED
@@ -1,4 +1,4 @@
1
- import { elements as d } from "x-runtime-lib";
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")(), T = f.Symbol, bt = Object.prototype, Dt = bt.hasOwnProperty, Ft = bt.toString, A = T ? T.toStringTag : void 0;
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, A), r = t[A];
64
+ var e = Dt.call(t, w), r = t[w];
65
65
  try {
66
- t[A] = void 0;
66
+ t[w] = void 0;
67
67
  var n = !0;
68
68
  } catch {
69
69
  }
70
- var i = Ft.call(t);
71
- return n && (e ? t[A] = r : delete t[A]), i;
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 = T ? T.toStringTag : void 0;
78
- function x(t) {
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 C(t) {
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 = x(t);
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 j(t) {
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, Qt = Object.prototype, kt = Zt.toString, te = Qt.hasOwnProperty, ee = RegExp(
118
- "^" + kt.call(te).replace(Yt, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
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(j(t));
124
+ return e.test(y(t));
125
125
  }
126
126
  function ne(t, e) {
127
127
  return t?.[e];
128
128
  }
129
- function v(t, e) {
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 = v(f, "WeakMap"), X = Object.create, oe = /* @__PURE__ */ (function() {
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 = v(Object, "defineProperty");
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 C(t) && x(t) == ye;
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 C(t) && je.call(t, "callee") && !ve.call(t, "callee");
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, Q = me ? f.Buffer : void 0, $e = Q ? Q.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]", a = {};
208
- a[Ge] = a[Le] = a[Ne] = a[Re] = a[Ve] = a[He] = a[Ke] = a[We] = a[qe] = !0;
209
- a[we] = a[Ae] = a[Be] = a[Oe] = a[ze] = a[Se] = a[Pe] = a[xe] = a[Ce] = a[Ee] = a[Ie] = a[Me] = a[De] = a[Fe] = a[Ue] = !1;
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 C(t) && yt(t.length) && !!a[x(t)];
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, O = mt && typeof module == "object" && module && !module.nodeType && module, Ye = O && O.exports === mt, U = Ye && gt.process, m = (function() {
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 = O && O.require && O.require("util").types;
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
- })(), k = m && m.isTypedArray, Je = k ? R(k) : Xe, Ze = Object.prototype, Qe = Ze.hasOwnProperty;
225
- function ke(t, e) {
226
- var r = N(t), n = !r && _e(t), i = !r && !n && Tt(t), s = !r && !n && !i && Je(t), c = r || n || i || s, _ = c ? he(t.length, String) : [], g = _.length;
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
- Qe.call(t, u) && !(c && // Safari 9 has enumerable `arguments.length` in strict mode.
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
- i && (u == "offset" || u == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
231
- s && (u == "buffer" || u == "byteLength" || u == "byteOffset") || // Skip index properties.
232
- ce(u, g))) && _.push(u);
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) ? ke(t) : nr(t);
250
+ return be(t) ? Qe(t) : nr(t);
251
251
  }
252
- var S = v(Object, "create");
252
+ var O = j(Object, "create");
253
253
  function ar() {
254
- this.__data__ = S ? S(null) : {}, this.size = 0;
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 (S) {
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 S ? e[t] !== void 0 : lr.call(e, t);
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] = S && e === void 0 ? br : e, this;
277
+ return this.size += this.has(t) ? 0 : 1, r[t] = O && e === void 0 ? br : e, this;
278
278
  }
279
- function y(t) {
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
- y.prototype.clear = ar;
287
- y.prototype.delete = ir;
288
- y.prototype.get = fr;
289
- y.prototype.has = gr;
290
- y.prototype.set = dr;
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 P = v(f, "Map");
331
+ var S = j(f, "Map");
332
332
  function $r() {
333
333
  this.size = 0, this.__data__ = {
334
- hash: new y(),
335
- map: new (P || l)(),
336
- string: new y()
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 $(t) {
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
- $.prototype.clear = $r;
369
- $.prototype.delete = Ar;
370
- $.prototype.get = Or;
371
- $.prototype.has = Sr;
372
- $.prototype.set = Pr;
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, i = t.length; ++r < n; )
375
- t[i + r] = e[r];
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 (!P || n.length < Fr - 1)
397
+ if (!S || n.length < Fr - 1)
398
398
  return n.push([t, e]), this.size = ++r.size, this;
399
- r = this.__data__ = new $(n);
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 w(t) {
403
+ function $(t) {
404
404
  var e = this.__data__ = new l(t);
405
405
  this.size = e.size;
406
406
  }
407
- w.prototype.clear = Er;
408
- w.prototype.delete = Ir;
409
- w.prototype.get = Mr;
410
- w.prototype.has = Dr;
411
- w.prototype.set = Ur;
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, i = 0, s = []; ++r < n; ) {
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) && (s[i++] = c);
420
+ e(c, r, t) && (a[o++] = c);
421
421
  }
422
- return s;
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 = v(f, "DataView"), G = v(f, "Promise"), L = v(f, "Set"), nt = "[object Map]", Wr = "[object Object]", ot = "[object Promise]", at = "[object Set]", it = "[object WeakMap]", st = "[object DataView]", qr = j(z), Xr = j(P), Yr = j(G), Jr = j(L), Zr = j(B), p = x;
440
- (z && p(new z(new ArrayBuffer(1))) != st || P && p(new P()) != nt || G && p(G.resolve()) != ot || L && p(new L()) != at || B && p(new B()) != it) && (p = function(t) {
441
- var e = x(t), r = e == Wr ? t.constructor : void 0, n = r ? j(r) : "";
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 Qr = Object.prototype, kr = Qr.hasOwnProperty;
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" && kr.call(t, "index") && (r.index = t.index, r.input = t.input), r;
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 = T ? T.prototype : void 0, ft = ut ? ut.valueOf : void 0;
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 C(t) && p(t) == Pn;
523
+ return x(t) && p(t) == Pn;
524
524
  }
525
- var pt = m && m.isMap, Cn = pt ? R(pt) : xn, En = "[object Set]";
525
+ var pt = T && T.isMap, Cn = pt ? R(pt) : xn, En = "[object Set]";
526
526
  function In(t) {
527
- return C(t) && p(t) == En;
527
+ return x(t) && p(t) == En;
528
528
  }
529
- var lt = m && m.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]", Qn = "[object Int32Array]", kn = "[object Uint8Array]", to = "[object Uint8ClampedArray]", eo = "[object Uint16Array]", ro = "[object Uint32Array]", o = {};
530
- o[At] = o[Dn] = o[Wn] = o[qn] = o[Fn] = o[Un] = o[Xn] = o[Yn] = o[Jn] = o[Zn] = o[Qn] = o[Gn] = o[Ln] = o[St] = o[Nn] = o[Rn] = o[Vn] = o[Hn] = o[kn] = o[to] = o[eo] = o[ro] = !0;
531
- o[Bn] = o[Ot] = o[Kn] = !1;
532
- function E(t, e, r, n, i, s) {
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 _ = N(t);
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 && !i)
545
+ if (g == St || g == At || u && !o)
546
546
  c = u ? {} : Sn(t);
547
547
  else {
548
- if (!o[g])
549
- return i ? t : {};
548
+ if (!i[g])
549
+ return o ? t : {};
550
550
  c = On(t, g);
551
551
  }
552
552
  }
553
- s || (s = new w());
554
- var H = s.get(t);
553
+ a || (a = new $());
554
+ var H = a.get(t);
555
555
  if (H)
556
556
  return H;
557
- s.set(t, c), Mn(t) ? t.forEach(function(b) {
558
- c.add(E(b, e, r, b, t, s));
559
- }) : Cn(t) && t.forEach(function(b, h) {
560
- c.set(h, E(b, e, r, h, t, s));
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 = _ ? void 0 : Pt(t);
563
- return ae(K || t, function(b, h) {
564
- K && (h = b, b = t[h]), le(c, h, E(b, e, r, h, t, s));
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 E(t, no | oo);
569
+ return C(t, no | oo);
570
570
  }
571
571
  function io(t) {
572
- const e = [], r = (n, i, s) => {
573
- if (i !== "" && (i += "."), i += n.key, s = ao(s), s.push(n.name), !n.ui && !n.array)
574
- n.children.forEach((c) => r(c, i, s));
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: i,
580
- names: s,
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 d) {
593
- const r = {}, n = d[e];
594
- for (const i in n.props)
595
- r[i] = io(n.props[i]);
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 t = {};
602
- for (const e in d) {
603
- const r = d[e];
604
- r.methods.length > 0 && (t[e] = r.methods);
605
- }
606
- return t;
607
- }
608
- function uo(t) {
609
- const e = [];
610
- for (const r of t)
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
- key: r.key,
613
- name: r.name,
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 fo() {
630
- const t = {};
631
- for (const e in d) {
632
- const r = d[e];
633
- for (const n in r.props)
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 t;
626
+ return e;
640
627
  }
641
- function po() {
628
+ function fo() {
642
629
  const t = {};
643
- for (const e in d) {
644
- const r = d[e];
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 lo() {
650
- const t = so(), e = co(), r = fo(), n = po();
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
- methods: e,
654
- events: r,
655
- slots: n
670
+ propEvents: e,
671
+ slots: r,
672
+ slotProps: n,
673
+ slotMethods: o
656
674
  };
657
675
  }
658
- const bo = (function() {
676
+ const ho = (function() {
659
677
  return window.globalState || (window.globalState = {
660
- runtime: lo(),
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
- bo as globalState,
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
- lo as initRuntime
691
+ go as initRuntime
674
692
  };
@@ -1,29 +1,52 @@
1
- import { ZEvent, ZMethod, ZProp, ZSlot } from 'x-runtime-lib';
2
- export type Prop = {
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
- export type Props = {
7
+ type Props = {
8
8
  [key: string]: {
9
9
  [tag: string]: Prop[];
10
10
  };
11
11
  };
12
- export type Methods = {
13
- [key: string]: ZMethod[];
12
+ type PropEvent = {
13
+ keys: string;
14
+ names: string[];
15
+ params: {
16
+ key: string;
17
+ name: string;
18
+ }[];
14
19
  };
15
- export type Events = {
20
+ type PropEvents = {
16
21
  [key: string]: {
17
- [tag: string]: ZEvent[];
22
+ [tag: string]: PropEvent[];
18
23
  };
19
24
  };
20
- export type Slots = {
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
- methods: Methods;
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.12",
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.36"
28
+ "x-runtime-lib": "^0.7.38"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@eslint/js": "^9.34.0",