x-runtime-lib 0.2.7 → 0.2.8

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,7 +1,7 @@
1
1
  var io = Object.defineProperty;
2
2
  var oo = (r, a, c) => a in r ? io(r, a, { enumerable: !0, configurable: !0, writable: !0, value: c }) : r[a] = c;
3
3
  var Bt = (r, a, c) => (oo(r, typeof a != "symbol" ? a + "" : a, c), c);
4
- import { resolveComponent as ao, openBlock as An, createBlock as In, getCurrentInstance as kn, inject as te, hasInjectionContext as so, ref as ne, watch as rr, reactive as uo, markRaw as Xe, effectScope as co, isRef as He, isReactive as nr, toRef as $t, toRaw as fo, nextTick as zt, computed as ue, getCurrentScope as lo, onScopeDispose as po, toRefs as Kr, provide as fe, readonly as Ze, defineComponent as ho, watchEffect as vo, onBeforeUnmount as yo, h as Ge } from "vue";
4
+ import { resolveComponent as ao, openBlock as An, createBlock as In, getCurrentInstance as kn, inject as te, hasInjectionContext as so, ref as ne, watch as rr, reactive as uo, markRaw as We, effectScope as co, isRef as qe, isReactive as nr, toRef as $t, toRaw as fo, nextTick as zt, computed as ue, getCurrentScope as lo, onScopeDispose as po, toRefs as Kr, provide as fe, readonly as ke, defineComponent as ho, watchEffect as vo, onBeforeUnmount as yo, h as Ye } from "vue";
5
5
  const Eo = (r, a) => {
6
6
  const c = r.__vccOpts || r;
7
7
  for (const [d, v] of a)
@@ -39,18 +39,18 @@ function Vt(r, a) {
39
39
  delete r[a];
40
40
  }
41
41
  var M = {};
42
- let We;
43
- const dt = (r) => We = r, So = M.NODE_ENV !== "production" ? Symbol("pinia") : (
42
+ let ze;
43
+ const dt = (r) => ze = r, So = M.NODE_ENV !== "production" ? Symbol("pinia") : (
44
44
  /* istanbul ignore next */
45
45
  Symbol()
46
46
  );
47
47
  function be(r) {
48
48
  return r && typeof r == "object" && Object.prototype.toString.call(r) === "[object Object]" && typeof r.toJSON != "function";
49
49
  }
50
- var ze;
50
+ var Je;
51
51
  (function(r) {
52
52
  r.direct = "direct", r.patchObject = "patch object", r.patchFunction = "patch function";
53
- })(ze || (ze = {}));
53
+ })(Je || (Je = {}));
54
54
  const ir = typeof window < "u", Gt = (M.NODE_ENV !== "production" || !1) && M.NODE_ENV !== "test" && ir;
55
55
  function Dn(r, a) {
56
56
  for (const c in a) {
@@ -58,7 +58,7 @@ function Dn(r, a) {
58
58
  if (!(c in r))
59
59
  continue;
60
60
  const v = r[c];
61
- be(v) && be(d) && !He(d) && !nr(d) ? r[c] = Dn(v, d) : r[c] = d;
61
+ be(v) && be(d) && !qe(d) && !nr(d) ? r[c] = Dn(v, d) : r[c] = d;
62
62
  }
63
63
  return r;
64
64
  }
@@ -84,7 +84,7 @@ function Jt(r, a) {
84
84
  if (!a.hasOwnProperty(c))
85
85
  continue;
86
86
  const d = a[c], v = r[c];
87
- be(v) && be(d) && r.hasOwnProperty(c) && !He(d) && !nr(d) ? r[c] = Jt(v, d) : r[c] = d;
87
+ be(v) && be(d) && r.hasOwnProperty(c) && !qe(d) && !nr(d) ? r[c] = Jt(v, d) : r[c] = d;
88
88
  }
89
89
  return r;
90
90
  }
@@ -97,7 +97,7 @@ function wo(r) {
97
97
  }
98
98
  const { assign: Q } = Object;
99
99
  function Qr(r) {
100
- return !!(He(r) && r.effect);
100
+ return !!(qe(r) && r.effect);
101
101
  }
102
102
  function en(r, a, c, d) {
103
103
  const { state: v, actions: b, getters: m } = a, S = c.state.value[r];
@@ -108,7 +108,7 @@ function en(r, a, c, d) {
108
108
  // use ref() to unwrap refs inside state TODO: check if this is still necessary
109
109
  Kr(ne(v ? v() : {}).value)
110
110
  ) : Kr(c.state.value[r]);
111
- return Q(t, b, Object.keys(m || {}).reduce((e, i) => (M.NODE_ENV !== "production" && i in t && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${i}" in store "${r}".`), e[i] = Xe(ue(() => {
111
+ return Q(t, b, Object.keys(m || {}).reduce((e, i) => (M.NODE_ENV !== "production" && i in t && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${i}" in store "${r}".`), e[i] = We(ue(() => {
112
112
  dt(c);
113
113
  const s = c._s.get(r);
114
114
  return m[i].call(s, s);
@@ -136,11 +136,11 @@ function Ht(r, a, c = {}, d, v, b) {
136
136
  function p(w) {
137
137
  let N;
138
138
  n = t = !1, M.NODE_ENV !== "production" && (s = []), typeof w == "function" ? (w(d.state.value[r]), N = {
139
- type: ze.patchFunction,
139
+ type: Je.patchFunction,
140
140
  storeId: r,
141
141
  events: s
142
142
  }) : (Jt(d.state.value[r], w), N = {
143
- type: ze.patchObject,
143
+ type: Je.patchObject,
144
144
  payload: w,
145
145
  storeId: r,
146
146
  events: s
@@ -190,7 +190,7 @@ function Ht(r, a, c = {}, d, v, b) {
190
190
  return ve instanceof Promise ? ve.then((H) => (Ce(X, H), H)).catch((H) => (Ce(U, H), Promise.reject(H))) : (Ce(X, ve), ve);
191
191
  };
192
192
  }
193
- const O = /* @__PURE__ */ Xe({
193
+ const O = /* @__PURE__ */ We({
194
194
  actions: {},
195
195
  getters: {},
196
196
  state: [],
@@ -206,7 +206,7 @@ function Ht(r, a, c = {}, d, v, b) {
206
206
  const F = Zr(e, w, N.detached, () => X()), X = m.run(() => rr(() => d.state.value[r], (U) => {
207
207
  (N.flush === "sync" ? t : n) && w({
208
208
  storeId: r,
209
- type: ze.direct,
209
+ type: Je.direct,
210
210
  events: s
211
211
  }, U);
212
212
  }, Q({}, T, N)));
@@ -216,7 +216,7 @@ function Ht(r, a, c = {}, d, v, b) {
216
216
  }, R = uo(M.NODE_ENV !== "production" || Gt ? Q(
217
217
  {
218
218
  _hmrPayload: O,
219
- _customProperties: Xe(/* @__PURE__ */ new Set())
219
+ _customProperties: We(/* @__PURE__ */ new Set())
220
220
  // devtools custom properties
221
221
  },
222
222
  C
@@ -227,8 +227,8 @@ function Ht(r, a, c = {}, d, v, b) {
227
227
  const V = (d._a && d._a.runWithContext || To)(() => d._e.run(() => (m = co()).run(a)));
228
228
  for (const w in V) {
229
229
  const N = V[w];
230
- if (He(N) && !Qr(N) || nr(N))
231
- M.NODE_ENV !== "production" && v ? pt(f.value, w, $t(V, w)) : b || (u && wo(N) && (He(N) ? N.value = u[w] : Jt(N, u[w])), d.state.value[r][w] = N), M.NODE_ENV !== "production" && O.state.push(w);
230
+ if (qe(N) && !Qr(N) || nr(N))
231
+ M.NODE_ENV !== "production" && v ? pt(f.value, w, $t(V, w)) : b || (u && wo(N) && (qe(N) ? N.value = u[w] : Jt(N, u[w])), d.state.value[r][w] = N), M.NODE_ENV !== "production" && O.state.push(w);
232
232
  else if (typeof N == "function") {
233
233
  const F = M.NODE_ENV !== "production" && v ? N : P(w, N);
234
234
  V[w] = F, M.NODE_ENV !== "production" && (O.actions[w] = N), S.actions[w] = N;
@@ -237,7 +237,7 @@ function Ht(r, a, c = {}, d, v, b) {
237
237
  // @ts-expect-error
238
238
  c.getters[w]
239
239
  ) : N, ir && (V._getters || // @ts-expect-error: same
240
- (V._getters = Xe([]))).push(w));
240
+ (V._getters = We([]))).push(w));
241
241
  }
242
242
  if (Q(R, V), Q(fo(R), V), Object.defineProperty(R, "$state", {
243
243
  get: () => M.NODE_ENV !== "production" && v ? f.value : d.state.value[r],
@@ -248,7 +248,7 @@ function Ht(r, a, c = {}, d, v, b) {
248
248
  Q(N, w);
249
249
  });
250
250
  }
251
- }), M.NODE_ENV !== "production" && (R._hotUpdate = Xe((w) => {
251
+ }), M.NODE_ENV !== "production" && (R._hotUpdate = We((w) => {
252
252
  R._hotUpdating = !0, w._hmrPayload.state.forEach((N) => {
253
253
  if (N in R.$state) {
254
254
  const F = w.$state[N], X = R.$state[N];
@@ -318,11 +318,11 @@ function Ln(r, a, c) {
318
318
  const n = so();
319
319
  if (S = // in test mode, ignore the argument provided as we can always retrieve a
320
320
  // pinia instance with getActivePinia()
321
- (M.NODE_ENV === "test" && We && We._testing ? null : S) || (n ? te(So, null) : null), S && dt(S), M.NODE_ENV !== "production" && !We)
321
+ (M.NODE_ENV === "test" && ze && ze._testing ? null : S) || (n ? te(So, null) : null), S && dt(S), M.NODE_ENV !== "production" && !ze)
322
322
  throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
323
323
  See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
324
324
  This will fail in production.`);
325
- S = We, S._s.has(d) || (b ? Ht(d, a, v, S) : en(d, v, S), M.NODE_ENV !== "production" && (m._pinia = S));
325
+ S = ze, S._s.has(d) || (b ? Ht(d, a, v, S) : en(d, v, S), M.NODE_ENV !== "production" && (m._pinia = S));
326
326
  const t = S._s.get(d);
327
327
  if (M.NODE_ENV !== "production" && T) {
328
328
  const e = "__hot:" + d, i = b ? Ht(e, a, v, S, !0) : en(e, Q({}, v), S, !0);
@@ -729,16 +729,16 @@ const Lo = /* @__PURE__ */ new Set([
729
729
  globality_v1: Vo,
730
730
  ref_v1: Xo
731
731
  };
732
- var Gn = typeof global == "object" && global && global.Object === Object && global, Wo = typeof self == "object" && self && self.Object === Object && self, ie = Gn || Wo || Function("return this")(), Ae = ie.Symbol, Yn = Object.prototype, zo = Yn.hasOwnProperty, Jo = Yn.toString, Ye = Ae ? Ae.toStringTag : void 0;
732
+ var Gn = typeof global == "object" && global && global.Object === Object && global, Wo = typeof self == "object" && self && self.Object === Object && self, ie = Gn || Wo || Function("return this")(), Ae = ie.Symbol, Yn = Object.prototype, zo = Yn.hasOwnProperty, Jo = Yn.toString, Xe = Ae ? Ae.toStringTag : void 0;
733
733
  function Ho(r) {
734
- var a = zo.call(r, Ye), c = r[Ye];
734
+ var a = zo.call(r, Xe), c = r[Xe];
735
735
  try {
736
- r[Ye] = void 0;
736
+ r[Xe] = void 0;
737
737
  var d = !0;
738
738
  } catch {
739
739
  }
740
740
  var v = Jo.call(r);
741
- return d && (a ? r[Ye] = c : delete r[Ye]), v;
741
+ return d && (a ? r[Xe] = c : delete r[Xe]), v;
742
742
  }
743
743
  var qo = Object.prototype, Ko = qo.toString;
744
744
  function Zo(r) {
@@ -901,9 +901,9 @@ function sr(r) {
901
901
  return r(a);
902
902
  };
903
903
  }
904
- var ei = typeof exports == "object" && exports && !exports.nodeType && exports, Je = ei && typeof module == "object" && module && !module.nodeType && module, as = Je && Je.exports === ei, Wt = as && Gn.process, Ie = function() {
904
+ var ei = typeof exports == "object" && exports && !exports.nodeType && exports, He = ei && typeof module == "object" && module && !module.nodeType && module, as = He && He.exports === ei, Wt = as && Gn.process, Ie = function() {
905
905
  try {
906
- var r = Je && Je.require && Je.require("util").types;
906
+ var r = He && He.require && He.require("util").types;
907
907
  return r || Wt && Wt.binding && Wt.binding("util");
908
908
  } catch {
909
909
  }
@@ -954,9 +954,9 @@ function Es(r) {
954
954
  function cr(r) {
955
955
  return qn(r) ? ti(r, !0) : Es(r);
956
956
  }
957
- var qe = Oe(Object, "create");
957
+ var Ke = Oe(Object, "create");
958
958
  function gs() {
959
- this.__data__ = qe ? qe(null) : {}, this.size = 0;
959
+ this.__data__ = Ke ? Ke(null) : {}, this.size = 0;
960
960
  }
961
961
  function _s(r) {
962
962
  var a = this.has(r) && delete this.__data__[r];
@@ -965,7 +965,7 @@ function _s(r) {
965
965
  var bs = "__lodash_hash_undefined__", ms = Object.prototype, Rs = ms.hasOwnProperty;
966
966
  function Os(r) {
967
967
  var a = this.__data__;
968
- if (qe) {
968
+ if (Ke) {
969
969
  var c = a[r];
970
970
  return c === bs ? void 0 : c;
971
971
  }
@@ -974,12 +974,12 @@ function Os(r) {
974
974
  var Ns = Object.prototype, Ss = Ns.hasOwnProperty;
975
975
  function Ts(r) {
976
976
  var a = this.__data__;
977
- return qe ? a[r] !== void 0 : Ss.call(a, r);
977
+ return Ke ? a[r] !== void 0 : Ss.call(a, r);
978
978
  }
979
979
  var Ps = "__lodash_hash_undefined__";
980
980
  function ws(r, a) {
981
981
  var c = this.__data__;
982
- return this.size += this.has(r) ? 0 : 1, c[r] = qe && a === void 0 ? Ps : a, this;
982
+ return this.size += this.has(r) ? 0 : 1, c[r] = Ke && a === void 0 ? Ps : a, this;
983
983
  }
984
984
  function me(r) {
985
985
  var a = -1, c = r == null ? 0 : r.length;
@@ -1033,11 +1033,11 @@ le.prototype.delete = Is;
1033
1033
  le.prototype.get = ks;
1034
1034
  le.prototype.has = Ds;
1035
1035
  le.prototype.set = js;
1036
- var Ke = Oe(ie, "Map");
1036
+ var Ze = Oe(ie, "Map");
1037
1037
  function Ls() {
1038
1038
  this.size = 0, this.__data__ = {
1039
1039
  hash: new me(),
1040
- map: new (Ke || le)(),
1040
+ map: new (Ze || le)(),
1041
1041
  string: new me()
1042
1042
  };
1043
1043
  }
@@ -1063,18 +1063,18 @@ function $s(r, a) {
1063
1063
  var c = Et(this, r), d = c.size;
1064
1064
  return c.set(r, a), this.size += c.size == d ? 0 : 1, this;
1065
1065
  }
1066
- function ke(r) {
1066
+ function De(r) {
1067
1067
  var a = -1, c = r == null ? 0 : r.length;
1068
1068
  for (this.clear(); ++a < c; ) {
1069
1069
  var d = r[a];
1070
1070
  this.set(d[0], d[1]);
1071
1071
  }
1072
1072
  }
1073
- ke.prototype.clear = Ls;
1074
- ke.prototype.delete = Us;
1075
- ke.prototype.get = Ms;
1076
- ke.prototype.has = Bs;
1077
- ke.prototype.set = $s;
1073
+ De.prototype.clear = Ls;
1074
+ De.prototype.delete = Us;
1075
+ De.prototype.get = Ms;
1076
+ De.prototype.has = Bs;
1077
+ De.prototype.set = $s;
1078
1078
  function ni(r, a) {
1079
1079
  for (var c = -1, d = a.length, v = r.length; ++c < d; )
1080
1080
  r[v + c] = a[c];
@@ -1099,21 +1099,21 @@ function zs(r, a) {
1099
1099
  var c = this.__data__;
1100
1100
  if (c instanceof le) {
1101
1101
  var d = c.__data__;
1102
- if (!Ke || d.length < Ws - 1)
1102
+ if (!Ze || d.length < Ws - 1)
1103
1103
  return d.push([r, a]), this.size = ++c.size, this;
1104
- c = this.__data__ = new ke(d);
1104
+ c = this.__data__ = new De(d);
1105
1105
  }
1106
1106
  return c.set(r, a), this.size = c.size, this;
1107
1107
  }
1108
- function De(r) {
1108
+ function je(r) {
1109
1109
  var a = this.__data__ = new le(r);
1110
1110
  this.size = a.size;
1111
1111
  }
1112
- De.prototype.clear = Vs;
1113
- De.prototype.delete = Gs;
1114
- De.prototype.get = Ys;
1115
- De.prototype.has = Xs;
1116
- De.prototype.set = zs;
1112
+ je.prototype.clear = Vs;
1113
+ je.prototype.delete = Gs;
1114
+ je.prototype.get = Ys;
1115
+ je.prototype.has = Xs;
1116
+ je.prototype.set = zs;
1117
1117
  function Js(r, a) {
1118
1118
  return r && vt(a, ur(a), r);
1119
1119
  }
@@ -1163,8 +1163,8 @@ function iu(r) {
1163
1163
  function ou(r) {
1164
1164
  return ui(r, cr, si);
1165
1165
  }
1166
- var Zt = Oe(ie, "DataView"), Qt = Oe(ie, "Promise"), er = Oe(ie, "Set"), gn = "[object Map]", au = "[object Object]", _n = "[object Promise]", bn = "[object Set]", mn = "[object WeakMap]", Rn = "[object DataView]", su = Re(Zt), uu = Re(Ke), cu = Re(Qt), fu = Re(er), lu = Re(Kt), ce = Qe;
1167
- (Zt && ce(new Zt(new ArrayBuffer(1))) != Rn || Ke && ce(new Ke()) != gn || Qt && ce(Qt.resolve()) != _n || er && ce(new er()) != bn || Kt && ce(new Kt()) != mn) && (ce = function(r) {
1166
+ var Zt = Oe(ie, "DataView"), Qt = Oe(ie, "Promise"), er = Oe(ie, "Set"), gn = "[object Map]", au = "[object Object]", _n = "[object Promise]", bn = "[object Set]", mn = "[object WeakMap]", Rn = "[object DataView]", su = Re(Zt), uu = Re(Ze), cu = Re(Qt), fu = Re(er), lu = Re(Kt), ce = Qe;
1167
+ (Zt && ce(new Zt(new ArrayBuffer(1))) != Rn || Ze && ce(new Ze()) != gn || Qt && ce(Qt.resolve()) != _n || er && ce(new er()) != bn || Kt && ce(new Kt()) != mn) && (ce = function(r) {
1168
1168
  var a = Qe(r), c = a == au ? r.constructor : void 0, d = c ? Re(c) : "";
1169
1169
  if (d)
1170
1170
  switch (d) {
@@ -1279,7 +1279,7 @@ function ht(r, a, c, d, v, b) {
1279
1279
  m = Mu(r, e, S);
1280
1280
  }
1281
1281
  }
1282
- b = new De();
1282
+ b = new je();
1283
1283
  var s = b.get(r);
1284
1284
  if (s)
1285
1285
  return s;
@@ -1408,7 +1408,7 @@ function tf(r) {
1408
1408
  }
1409
1409
  const pi = Symbol(), hi = Symbol(), di = Symbol(), vi = Symbol(), yi = Symbol(), Ei = Symbol(), gi = Symbol(), _i = Symbol(), bi = Symbol();
1410
1410
  function rf(r) {
1411
- fe(pi, Ze(r));
1411
+ fe(pi, ke(r));
1412
1412
  }
1413
1413
  function Oc() {
1414
1414
  return te(pi);
@@ -1426,13 +1426,13 @@ function Sc() {
1426
1426
  return te(di);
1427
1427
  }
1428
1428
  function af(r) {
1429
- fe(vi, Ze(r));
1429
+ fe(vi, ke(r));
1430
1430
  }
1431
1431
  function Tc() {
1432
1432
  return te(vi);
1433
1433
  }
1434
1434
  function sf(r) {
1435
- fe(yi, Ze(r));
1435
+ fe(yi, ke(r));
1436
1436
  }
1437
1437
  function uf() {
1438
1438
  return te(yi);
@@ -1444,19 +1444,19 @@ function Pc() {
1444
1444
  return te(Ei);
1445
1445
  }
1446
1446
  function ff(r) {
1447
- fe(gi, Ze(r));
1447
+ fe(gi, ke(r));
1448
1448
  }
1449
1449
  function wc() {
1450
1450
  return te(gi);
1451
1451
  }
1452
1452
  function lf(r) {
1453
- fe(_i, Ze(r));
1453
+ fe(_i, ke(r));
1454
1454
  }
1455
1455
  function Cc() {
1456
1456
  return te(_i);
1457
1457
  }
1458
1458
  function xc(r) {
1459
- fe(bi, r);
1459
+ fe(bi, ke(r));
1460
1460
  }
1461
1461
  function pf() {
1462
1462
  return te(bi);
@@ -4676,7 +4676,7 @@ const jc = {}, Lc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
4676
4676
  typeof: { keyword: "typeof", prefix: !0, beforeExpr: !0 },
4677
4677
  void: { keyword: "void", prefix: !0, beforeExpr: !0 },
4678
4678
  delete: { keyword: "delete", prefix: !0, beforeExpr: !0 }
4679
- }, Tt = { type: "[", beforeExpr: !0 }, Pt = { type: "]" }, je = { type: "{", beforeExpr: !0 }, Se = { type: "}" }, oe = { type: "(", beforeExpr: !0 }, re = { type: ")" }, pe = { type: ",", beforeExpr: !0 }, ae = { type: ";", beforeExpr: !0 }, Le = { type: ":", beforeExpr: !0 }, Ar = { type: "." }, Ir = { type: "?", beforeExpr: !0 }, kr = { binop: 10, beforeExpr: !0 }, Dr = { isAssign: !0, beforeExpr: !0 }, ye = { isAssign: !0, beforeExpr: !0 }, Oi = { postfix: !0, prefix: !0, isUpdate: !0 }, jr = { prefix: !0, beforeExpr: !0 }, Lr = { binop: 1, beforeExpr: !0 }, Fr = { binop: 2, beforeExpr: !0 }, Ni = { binop: 3, beforeExpr: !0 }, Si = { binop: 4, beforeExpr: !0 }, Ti = { binop: 5, beforeExpr: !0 }, Pi = { binop: 6, beforeExpr: !0 }, wi = { binop: 7, beforeExpr: !0 }, Ci = { binop: 8, beforeExpr: !0 }, xi = { binop: 9, prefix: !0, beforeExpr: !0 }, Ai = { binop: 10, beforeExpr: !0 };
4679
+ }, Tt = { type: "[", beforeExpr: !0 }, Pt = { type: "]" }, Le = { type: "{", beforeExpr: !0 }, Se = { type: "}" }, oe = { type: "(", beforeExpr: !0 }, re = { type: ")" }, pe = { type: ",", beforeExpr: !0 }, ae = { type: ";", beforeExpr: !0 }, Fe = { type: ":", beforeExpr: !0 }, Ar = { type: "." }, Ir = { type: "?", beforeExpr: !0 }, kr = { binop: 10, beforeExpr: !0 }, Dr = { isAssign: !0, beforeExpr: !0 }, ye = { isAssign: !0, beforeExpr: !0 }, Oi = { postfix: !0, prefix: !0, isUpdate: !0 }, jr = { prefix: !0, beforeExpr: !0 }, Lr = { binop: 1, beforeExpr: !0 }, Fr = { binop: 2, beforeExpr: !0 }, Ni = { binop: 3, beforeExpr: !0 }, Si = { binop: 4, beforeExpr: !0 }, Ti = { binop: 5, beforeExpr: !0 }, Pi = { binop: 6, beforeExpr: !0 }, wi = { binop: 7, beforeExpr: !0 }, Ci = { binop: 8, beforeExpr: !0 }, xi = { binop: 9, prefix: !0, beforeExpr: !0 }, Ai = { binop: 10, beforeExpr: !0 };
4680
4680
  function nt(l) {
4681
4681
  for (var h = l.split(" "), y = /* @__PURE__ */ Object.create(null), g = 0; g < h.length; g++)
4682
4682
  y[h[g]] = !0;
@@ -4693,10 +4693,10 @@ const jc = {}, Lc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
4693
4693
  this.line = L, this.column = o - V;
4694
4694
  }
4695
4695
  function Fi() {
4696
- L = 1, o = V = 0, R = !0, Fe();
4696
+ L = 1, o = V = 0, R = !0, Ue();
4697
4697
  }
4698
4698
  function z(l, h) {
4699
- E = o, n.locations && (P = new Ee()), O = l, Fe(), C = h, R = l.beforeExpr;
4699
+ E = o, n.locations && (P = new Ee()), O = l, Ue(), C = h, R = l.beforeExpr;
4700
4700
  }
4701
4701
  function Ui() {
4702
4702
  var l = n.onComment && n.locations && new Ee(), h = o, y = t.indexOf("*/", o += 2);
@@ -4726,7 +4726,7 @@ const jc = {}, Lc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
4726
4726
  n.locations && new Ee()
4727
4727
  );
4728
4728
  }
4729
- function Fe() {
4729
+ function Ue() {
4730
4730
  for (; o < e; ) {
4731
4731
  var l = t.charCodeAt(o);
4732
4732
  if (l === 32)
@@ -4779,7 +4779,7 @@ const jc = {}, Lc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
4779
4779
  var h = t.charCodeAt(o + 1);
4780
4780
  if (h === l) {
4781
4781
  if (h === 45 && t.charCodeAt(o + 2) === 62 && ot.test(t.slice(N, o))) {
4782
- o += 3, wt(), Fe(), Te();
4782
+ o += 3, wt(), Ue(), Te();
4783
4783
  return;
4784
4784
  }
4785
4785
  J(Oi, 2);
@@ -4793,7 +4793,7 @@ const jc = {}, Lc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
4793
4793
  return;
4794
4794
  }
4795
4795
  if (h === 33 && l === 60 && t.charCodeAt(o + 2) === 45 && t.charCodeAt(o + 3) === 45) {
4796
- o += 4, wt(), Fe(), Te();
4796
+ o += 4, wt(), Ue(), Te();
4797
4797
  return;
4798
4798
  }
4799
4799
  h === 61 && (y = t.charCodeAt(o + 2) === 61 ? 3 : 2), J(wi, y);
@@ -4819,11 +4819,11 @@ const jc = {}, Lc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
4819
4819
  case 93:
4820
4820
  return ++o, z(Pt);
4821
4821
  case 123:
4822
- return ++o, z(je);
4822
+ return ++o, z(Le);
4823
4823
  case 125:
4824
4824
  return ++o, z(Se);
4825
4825
  case 58:
4826
- return ++o, z(Le);
4826
+ return ++o, z(Fe);
4827
4827
  case 63:
4828
4828
  return ++o, z(Ir);
4829
4829
  case 48:
@@ -4915,7 +4915,7 @@ const jc = {}, Lc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
4915
4915
  }
4916
4916
  z(pr, D);
4917
4917
  }
4918
- function Ue(l, h) {
4918
+ function Me(l, h) {
4919
4919
  for (var y = o, g = 0, I = h === void 0 ? 1 / 0 : h, x = 0; x < I; ++x) {
4920
4920
  var D = t.charCodeAt(o), G;
4921
4921
  if (D >= 97 ? G = D - 97 + 10 : D >= 65 ? G = D - 65 + 10 : D >= 48 && D <= 57 ? G = D - 48 : G = 1 / 0, G >= l)
@@ -4926,14 +4926,14 @@ const jc = {}, Lc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
4926
4926
  }
4927
4927
  function Ji() {
4928
4928
  o += 2;
4929
- var l = Ue(16);
4929
+ var l = Me(16);
4930
4930
  l === null && k(p + 2, "Expected hexadecimal number"), st(t.charCodeAt(o)) && k(o, "Identifier directly after number"), z(H, l);
4931
4931
  }
4932
4932
  function Gr(l) {
4933
4933
  var h = o, y = !1, g = t.charCodeAt(o) === 48;
4934
- !l && Ue(10) === null && k(h, "Invalid number"), t.charCodeAt(o) === 46 && (++o, Ue(10), y = !0);
4934
+ !l && Me(10) === null && k(h, "Invalid number"), t.charCodeAt(o) === 46 && (++o, Me(10), y = !0);
4935
4935
  var I = t.charCodeAt(o);
4936
- (I === 69 || I === 101) && (I = t.charCodeAt(++o), (I === 43 || I === 45) && ++o, Ue(10) === null && k(h, "Invalid number"), y = !0), st(t.charCodeAt(o)) && k(o, "Identifier directly after number");
4936
+ (I === 69 || I === 101) && (I = t.charCodeAt(++o), (I === 43 || I === 45) && ++o, Me(10) === null && k(h, "Invalid number"), y = !0), st(t.charCodeAt(o)) && k(o, "Identifier directly after number");
4937
4937
  var x = t.slice(h, o), D;
4938
4938
  y ? D = parseFloat(x) : !g || x.length === 1 ? D = parseInt(x, 10) : /[89]/.test(x) || Z ? k(h, "Invalid number") : D = parseInt(x, 8), z(H, D);
4939
4939
  }
@@ -5000,7 +5000,7 @@ const jc = {}, Lc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
5000
5000
  }
5001
5001
  }
5002
5002
  function ut(l) {
5003
- var h = Ue(16, l);
5003
+ var h = Me(16, l);
5004
5004
  return h === null && k(p, "Bad character escape sequence"), /** @type {number} */
5005
5005
  h;
5006
5006
  }
@@ -5033,7 +5033,7 @@ const jc = {}, Lc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
5033
5033
  for (; o < V; )
5034
5034
  V = t.lastIndexOf(`
5035
5035
  `, V - 2) + 1, --L;
5036
- Fe(), Te();
5036
+ Ue(), Te();
5037
5037
  }
5038
5038
  function Wr() {
5039
5039
  this.type = null, this.start = p, this.end = null;
@@ -5101,7 +5101,7 @@ const jc = {}, Lc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
5101
5101
  case vr:
5102
5102
  return j(), ge(), A(h, "DebuggerStatement");
5103
5103
  case Er:
5104
- return j(), U.push(At), h.body = ee(), U.pop(), W(St), h.test = Me(), ge(), A(h, "DoWhileStatement");
5104
+ return j(), U.push(At), h.body = ee(), U.pop(), W(St), h.test = Be(), ge(), A(h, "DoWhileStatement");
5105
5105
  case br:
5106
5106
  if (j(), U.push(At), W(oe), O === ae)
5107
5107
  return It(h, null);
@@ -5114,39 +5114,39 @@ const jc = {}, Lc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
5114
5114
  case Rt:
5115
5115
  return j(), Ft(h, !0);
5116
5116
  case mr:
5117
- return j(), h.test = Me(), h.consequent = ee(), h.alternate = Y(gr) ? ee() : null, A(h, "IfStatement");
5117
+ return j(), h.test = Be(), h.consequent = ee(), h.alternate = Y(gr) ? ee() : null, A(h, "IfStatement");
5118
5118
  case Rr:
5119
5119
  return !X && !n.allowReturnOutsideFunction && k(p, "'return' outside of function"), j(), Y(ae) || ct() ? h.argument = null : (h.argument = K(), ge()), A(h, "ReturnStatement");
5120
5120
  case Ot:
5121
- j(), h.discriminant = Me(), h.cases = [], W(je), U.push(Ki);
5121
+ j(), h.discriminant = Be(), h.cases = [], W(Le), U.push(Ki);
5122
5122
  for (var D, G; O !== Se; )
5123
5123
  if (O === mt || O === yr) {
5124
- var Ve = O === mt;
5125
- D && A(D, "SwitchCase"), h.cases.push(D = q()), D.consequent = [], j(), Ve ? D.test = K() : (G && k(w, "Multiple default clauses"), G = !0, D.test = null), W(Le);
5124
+ var Ge = O === mt;
5125
+ D && A(D, "SwitchCase"), h.cases.push(D = q()), D.consequent = [], j(), Ge ? D.test = K() : (G && k(w, "Multiple default clauses"), G = !0, D.test = null), W(Fe);
5126
5126
  } else
5127
5127
  D || se(), D.consequent.push(ee());
5128
5128
  return D && A(D, "SwitchCase"), j(), U.pop(), A(h, "SwitchStatement");
5129
5129
  case Or:
5130
5130
  return j(), ot.test(t.slice(N, p)) && k(N, "Illegal newline after throw"), h.argument = K(), ge(), A(h, "ThrowStatement");
5131
5131
  case Nr:
5132
- if (j(), h.block = Be(), h.handler = null, O === hr) {
5132
+ if (j(), h.block = $e(), h.handler = null, O === hr) {
5133
5133
  var we = q();
5134
- j(), W(oe), we.param = de(), Z && it(we.param.name) && k(we.param.start, "Binding " + we.param.name + " in strict mode"), W(re), we.body = Be(), h.handler = A(we, "CatchClause");
5134
+ j(), W(oe), we.param = de(), Z && it(we.param.name) && k(we.param.start, "Binding " + we.param.name + " in strict mode"), W(re), we.body = $e(), h.handler = A(we, "CatchClause");
5135
5135
  }
5136
- return h.finalizer = Y(_r) ? Be() : null, !h.handler && !h.finalizer && k(h.start, "Missing catch or finally clause"), A(h, "TryStatement");
5136
+ return h.finalizer = Y(_r) ? $e() : null, !h.handler && !h.finalizer && k(h.start, "Missing catch or finally clause"), A(h, "TryStatement");
5137
5137
  case Nt:
5138
5138
  return j(), Hr(h), ge(), A(h, "VariableDeclaration");
5139
5139
  case St:
5140
- return j(), h.test = Me(), U.push(At), h.body = ee(), U.pop(), A(h, "WhileStatement");
5140
+ return j(), h.test = Be(), U.push(At), h.body = ee(), U.pop(), A(h, "WhileStatement");
5141
5141
  case Sr:
5142
- return Z && k(p, "'with' in strict mode"), j(), h.object = Me(), h.body = ee(), A(h, "WithStatement");
5143
- case je:
5144
- return Be();
5142
+ return Z && k(p, "'with' in strict mode"), j(), h.object = Be(), h.body = ee(), A(h, "WithStatement");
5143
+ case Le:
5144
+ return $e();
5145
5145
  case ae:
5146
5146
  return j(), A(h, "EmptyStatement");
5147
5147
  default:
5148
5148
  var Mt = C, lt = K();
5149
- if (l === Ne && lt.type === "Identifier" && Y(Le)) {
5149
+ if (l === Ne && lt.type === "Identifier" && Y(Fe)) {
5150
5150
  for (var g = 0; g < U.length; ++g)
5151
5151
  U[g].name === Mt && k(lt.start, "Label '" + Mt + "' is already declared");
5152
5152
  var no = O.isLoop ? "loop" : O === Ot ? "switch" : null;
@@ -5155,14 +5155,14 @@ const jc = {}, Lc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
5155
5155
  return h.expression = lt, ge(), A(h, "ExpressionStatement");
5156
5156
  }
5157
5157
  }
5158
- function Me() {
5158
+ function Be() {
5159
5159
  W(oe);
5160
5160
  var l = K();
5161
5161
  return W(re), l;
5162
5162
  }
5163
- function Be(l) {
5163
+ function $e(l) {
5164
5164
  var h = q(), y = !0, g = !1, I;
5165
- for (h.body = [], W(je); !Y(Se); ) {
5165
+ for (h.body = [], W(Le); !Y(Se); ) {
5166
5166
  var x = ee();
5167
5167
  h.body.push(x), y && l && xt(x) && (I = g, Ct(g = !0)), y = !1;
5168
5168
  }
@@ -5203,7 +5203,7 @@ const jc = {}, Lc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
5203
5203
  var h = Qi(l);
5204
5204
  if (Y(Ir)) {
5205
5205
  var y = he(h);
5206
- return y.test = h, y.consequent = K(!0), W(Le), y.alternate = K(!0, l), A(y, "ConditionalExpression");
5206
+ return y.test = h, y.consequent = K(!0), W(Fe), y.alternate = K(!0, l), A(y, "ConditionalExpression");
5207
5207
  }
5208
5208
  return h;
5209
5209
  }
@@ -5234,11 +5234,11 @@ const jc = {}, Lc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
5234
5234
  return y;
5235
5235
  }
5236
5236
  function eo() {
5237
- return $e(Lt());
5237
+ return Ve(Lt());
5238
5238
  }
5239
- function $e(l, h) {
5239
+ function Ve(l, h) {
5240
5240
  var y;
5241
- return Y(Ar) ? (y = he(l), y.object = l, y.property = de(!0), y.computed = !1, $e(A(y, "MemberExpression"), h)) : Y(Tt) ? (y = he(l), y.object = l, y.property = K(), y.computed = !0, W(Pt), $e(A(y, "MemberExpression"), h)) : !h && Y(oe) ? (y = he(l), y.callee = l, y.arguments = Ut(re, !1), $e(A(y, "CallExpression"), h)) : l;
5241
+ return Y(Ar) ? (y = he(l), y.object = l, y.property = de(!0), y.computed = !1, Ve(A(y, "MemberExpression"), h)) : Y(Tt) ? (y = he(l), y.object = l, y.property = K(), y.computed = !0, W(Pt), Ve(A(y, "MemberExpression"), h)) : !h && Y(oe) ? (y = he(l), y.callee = l, y.arguments = Ut(re, !1), Ve(A(y, "CallExpression"), h)) : l;
5242
5242
  }
5243
5243
  function Lt() {
5244
5244
  var l;
@@ -5262,7 +5262,7 @@ const jc = {}, Lc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
5262
5262
  return g.start = y, g.end = E, n.locations && (g.loc.start = h, g.loc.end = P), n.ranges && (g.range = [y, E]), W(re), g;
5263
5263
  case Tt:
5264
5264
  return l = q(), j(), l.elements = Ut(Pt, !0, !0), A(l, "ArrayExpression");
5265
- case je:
5265
+ case Le:
5266
5266
  return ro();
5267
5267
  case Rt:
5268
5268
  return l = q(), j(), Ft(l, !1);
@@ -5273,7 +5273,7 @@ const jc = {}, Lc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
5273
5273
  }
5274
5274
  function to() {
5275
5275
  var l = q();
5276
- return j(), l.callee = $e(Lt(), !0), l.arguments = Y(oe) ? Ut(re, !1) : ve, A(l, "NewExpression");
5276
+ return j(), l.callee = Ve(Lt(), !0), l.arguments = Y(oe) ? Ut(re, !1) : ve, A(l, "NewExpression");
5277
5277
  }
5278
5278
  function ro() {
5279
5279
  var l = q(), h = !0, y = !1;
@@ -5283,12 +5283,12 @@ const jc = {}, Lc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
5283
5283
  else if (W(pe), n.allowTrailingCommas && Y(Se))
5284
5284
  break;
5285
5285
  var g = { key: qr() }, I = !1, x;
5286
- if (Y(Le) ? (g.value = K(!0), x = g.kind = "init") : g.key.type === "Identifier" && (g.key.name === "get" || g.key.name === "set") ? (I = y = !0, x = g.kind = g.key.name, g.key = qr(), O !== oe && se(), g.value = Ft(q(), !1)) : se(), g.key.type === "Identifier" && (Z || y))
5286
+ if (Y(Fe) ? (g.value = K(!0), x = g.kind = "init") : g.key.type === "Identifier" && (g.key.name === "get" || g.key.name === "set") ? (I = y = !0, x = g.kind = g.key.name, g.key = qr(), O !== oe && se(), g.value = Ft(q(), !1)) : se(), g.key.type === "Identifier" && (Z || y))
5287
5287
  for (var D = 0; D < l.properties.length; ++D) {
5288
5288
  var G = l.properties[D];
5289
5289
  if (G.key.name === g.key.name) {
5290
- var Ve = x === G.kind || I && G.kind === "init" || x === "init" && (G.kind === "get" || G.kind === "set");
5291
- Ve && !Z && x === "init" && G.kind === "init" && (Ve = !1), Ve && k(g.key.start, "Redefinition of property");
5290
+ var Ge = x === G.kind || I && G.kind === "init" || x === "init" && (G.kind === "get" || G.kind === "set");
5291
+ Ge && !Z && x === "init" && G.kind === "init" && (Ge = !1), Ge && k(g.key.start, "Redefinition of property");
5292
5292
  }
5293
5293
  }
5294
5294
  l.properties.push(g);
@@ -5304,7 +5304,7 @@ const jc = {}, Lc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
5304
5304
  for (W(oe); !Y(re); )
5305
5305
  y ? y = !1 : W(pe), l.params.push(de());
5306
5306
  var g = X, I = U;
5307
- if (X = !0, U = [], l.body = Be(!0), X = g, U = I, Z || l.body.body.length && xt(l.body.body[0]))
5307
+ if (X = !0, U = [], l.body = $e(!0), X = g, U = I, Z || l.body.body.length && xt(l.body.body[0]))
5308
5308
  for (var x = l.id ? -1 : 0; x < l.params.length; ++x) {
5309
5309
  var D = x < 0 ? l.id : l.params[x];
5310
5310
  if ((Ur(D.name) || it(D.name)) && k(D.start, "Defining '" + D.name + "' in strict mode"), x >= 0)
@@ -5657,7 +5657,7 @@ const Jc = /* @__PURE__ */ ho({
5657
5657
  });
5658
5658
  const { applySize: n } = Ac(a), t = ue(() => {
5659
5659
  const o = {};
5660
- switch (b.value.type) {
5660
+ switch (b.type) {
5661
5661
  case "common":
5662
5662
  n(o);
5663
5663
  break;
@@ -5680,7 +5680,7 @@ const Jc = /* @__PURE__ */ ho({
5680
5680
  return o.ref ? p = s(o) : p = u(o), p;
5681
5681
  }
5682
5682
  function s(o) {
5683
- return Ge("z-ref-v1", {
5683
+ return Ye("z-ref-v1", {
5684
5684
  props: {
5685
5685
  refContext: {
5686
5686
  parent: a.refContext,
@@ -5696,7 +5696,7 @@ const Jc = /* @__PURE__ */ ho({
5696
5696
  const E = qt[o.key];
5697
5697
  return E ? ((_ = o.children) == null || _.forEach((P) => {
5698
5698
  i(P);
5699
- }), p = Ge(E.comp, {
5699
+ }), p = Ye(E.comp, {
5700
5700
  props: {
5701
5701
  node: o
5702
5702
  }
@@ -5705,7 +5705,7 @@ const Jc = /* @__PURE__ */ ho({
5705
5705
  const f = () => {
5706
5706
  const o = [];
5707
5707
  if (e())
5708
- o.push(Ge("div", c.global.t("circularRef")));
5708
+ o.push(Ye("div", c.global.t("circularRef")));
5709
5709
  else if (S.value) {
5710
5710
  const p = S.value.data.type;
5711
5711
  p === "common" ? S.value.data.view.nodes.forEach((E) => {
@@ -5713,8 +5713,8 @@ const Jc = /* @__PURE__ */ ho({
5713
5713
  o.push(_);
5714
5714
  }) : console.assert(!1, `invalid data type dataType=${p}`);
5715
5715
  } else
5716
- o.push(Ge("div", c.global.t("compNotAvail")));
5717
- return Ge("div", { style: t.value }, o);
5716
+ o.push(Ye("div", c.global.t("compNotAvail")));
5717
+ return Ye("div", { style: t.value }, o);
5718
5718
  };
5719
5719
  return (o, p) => (An(), In(f));
5720
5720
  }
@@ -1,5 +1,5 @@
1
1
  /// <reference path="../../src/global.d.ts" />
2
- import { Ref, ShallowReactive } from 'vue';
2
+ import { Ref } from 'vue';
3
3
  import { Env, Mode, Type, Data, Depends } from '../types';
4
4
  import Interpreter from 'js-interpreter';
5
5
  interface I18n {
@@ -23,10 +23,10 @@ export declare function provideDark(dark: Ref<boolean>): void;
23
23
  export declare function injectDark(): Ref<boolean>;
24
24
  export declare function provideType(type: Type): void;
25
25
  export declare function injectType(): Type;
26
- export declare function provideData(data: Ref<Data>): void;
27
- export declare function injectData(): Ref<Data>;
28
- export declare function provideDepends(depends: ShallowReactive<Depends>): void;
29
- export declare function injectDepends(): ShallowReactive<Depends>;
26
+ export declare function provideData(data: Data): void;
27
+ export declare function injectData(): Data;
28
+ export declare function provideDepends(depends: Depends): void;
29
+ export declare function injectDepends(): Depends;
30
30
  export declare function provideInterpreter(interpreter: Ref<Interpreter | undefined>): void;
31
31
  export declare function injectInterpreter(): Ref<Interpreter | undefined>;
32
32
  export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "x-runtime-lib",
3
3
  "private": false,
4
- "version": "0.2.7",
4
+ "version": "0.2.8",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",