instaui 0.1.3__py3-none-any.whl → 0.1.4__py3-none-any.whl

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.
Files changed (58) hide show
  1. instaui/components/content.py +4 -4
  2. instaui/components/element.py +56 -12
  3. instaui/components/highlight_code/code.js +63 -0
  4. instaui/components/highlight_code/code.py +117 -0
  5. instaui/components/highlight_code/static/core.min.js +307 -0
  6. instaui/components/highlight_code/static/languages/css.min.js +31 -0
  7. instaui/components/highlight_code/static/languages/javascript.min.js +81 -0
  8. instaui/components/highlight_code/static/languages/json.min.js +8 -0
  9. instaui/components/highlight_code/static/languages/python-repl.min.js +5 -0
  10. instaui/components/highlight_code/static/languages/python.min.js +42 -0
  11. instaui/components/highlight_code/static/languages/shell.min.js +5 -0
  12. instaui/components/highlight_code/static/styles/default.min.css +9 -0
  13. instaui/components/highlight_code/static/styles/github-dark-dimmed.min.css +9 -0
  14. instaui/components/highlight_code/static/styles/github-dark.min.css +10 -0
  15. instaui/components/highlight_code/static/styles/github.min.css +10 -0
  16. instaui/components/html/__init__.py +2 -0
  17. instaui/components/html/select.py +6 -7
  18. instaui/components/html/textarea.py +28 -0
  19. instaui/components/markdown/markdown.js +33 -0
  20. instaui/components/markdown/markdown.py +41 -0
  21. instaui/components/markdown/static/github-markdown.css +12 -0
  22. instaui/components/markdown/static/marked.esm.js +2580 -0
  23. instaui/components/vfor.py +1 -1
  24. instaui/daisyui/__init__.py +20 -0
  25. instaui/daisyui/_index.py +15 -0
  26. instaui/daisyui/button.py +38 -0
  27. instaui/daisyui/checkbox.py +17 -0
  28. instaui/daisyui/static/daisyui.css +1 -0
  29. instaui/daisyui/static/themes.css +1 -0
  30. instaui/dependencies/component_dependency.py +11 -5
  31. instaui/fastapi_server/dependency_router.py +4 -3
  32. instaui/fastapi_server/resource.py +12 -16
  33. instaui/fastapi_server/server.py +30 -12
  34. instaui/html_tools.py +4 -0
  35. instaui/inject.py +3 -3
  36. instaui/runtime/_app.py +6 -1
  37. instaui/runtime/resource.py +3 -0
  38. instaui/spa_router/_functions.py +1 -1
  39. instaui/spa_router/_route_model.py +1 -1
  40. instaui/static/insta-ui.css +1 -1
  41. instaui/static/insta-ui.esm-browser.prod.js +106 -111
  42. instaui/static/insta-ui.js.map +1 -1
  43. instaui/systems/module_system.py +30 -0
  44. instaui/template/zero_template.py +18 -17
  45. instaui/ui/__build_init.py +73 -0
  46. instaui/ui/__init__.py +68 -58
  47. instaui/ui/__init__.pyi +129 -0
  48. instaui/ui/events.py +1 -1
  49. instaui/ui_functions/server.py +3 -1
  50. instaui/zero/func.py +12 -11
  51. instaui/zero/scope.py +89 -1
  52. {instaui-0.1.3.dist-info → instaui-0.1.4.dist-info}/METADATA +1 -1
  53. {instaui-0.1.3.dist-info → instaui-0.1.4.dist-info}/RECORD +55 -31
  54. instaui/static/insta-ui.iife.js +0 -29
  55. instaui/static/insta-ui.iife.js.map +0 -1
  56. instaui/zero/test.html +0 -44
  57. {instaui-0.1.3.dist-info → instaui-0.1.4.dist-info}/LICENSE +0 -0
  58. {instaui-0.1.3.dist-info → instaui-0.1.4.dist-info}/WHEEL +0 -0
@@ -2,7 +2,7 @@ var Mn = Object.defineProperty;
2
2
  var Fn = (e, t, n) => t in e ? Mn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var M = (e, t, n) => Fn(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  import * as Bn from "vue";
5
- import { unref as B, watch as K, nextTick as Ve, isRef as Ut, shallowRef as Q, ref as J, watchEffect as Gt, computed as W, readonly as Wn, provide as Pe, inject as te, customRef as ct, toValue as H, shallowReactive as Ln, defineComponent as F, reactive as Un, h as A, getCurrentInstance as Kt, toRaw as Gn, normalizeStyle as Kn, normalizeClass as qe, toDisplayString as Ht, onUnmounted as Ce, Fragment as Ae, vModelDynamic as Hn, vShow as qn, resolveDynamicComponent as ut, normalizeProps as zn, withDirectives as Jn, onErrorCaptured as Qn, openBlock as he, createElementBlock as be, createElementVNode as Yn, createVNode as Xn, withCtx as Zn, renderList as er, createBlock as tr, TransitionGroup as qt, KeepAlive as nr } from "vue";
5
+ import { unref as B, watch as K, nextTick as Ve, isRef as Ut, shallowRef as Q, ref as J, watchEffect as Gt, computed as W, readonly as Wn, provide as Pe, inject as te, customRef as ct, toValue as H, shallowReactive as Ln, defineComponent as F, reactive as Un, h as $, getCurrentInstance as Kt, toRaw as Gn, normalizeStyle as Kn, normalizeClass as qe, toDisplayString as Ht, onUnmounted as Ce, Fragment as $e, vModelDynamic as Hn, vShow as qn, resolveDynamicComponent as ut, normalizeProps as zn, withDirectives as Jn, onErrorCaptured as Qn, openBlock as he, createElementBlock as be, createElementVNode as Yn, createVNode as Xn, withCtx as Zn, renderList as er, createBlock as tr, TransitionGroup as qt, KeepAlive as nr } from "vue";
6
6
  let zt, ze, Je;
7
7
  function rr(e) {
8
8
  zt = e.queryPath, ze = e.pathParams, Je = e.queryParams;
@@ -161,8 +161,8 @@ function Ze(e, t = !1) {
161
161
  const O = [new Promise((V) => {
162
162
  y = K(
163
163
  [e, a],
164
- ([$, x]) => {
165
- t !== ($ === x) && (y ? y() : Ve(() => y == null ? void 0 : y()), V($));
164
+ ([A, x]) => {
165
+ t !== (A === x) && (y ? y() : Ve(() => y == null ? void 0 : y()), V(A));
166
166
  },
167
167
  {
168
168
  flush: d,
@@ -467,20 +467,20 @@ function en() {
467
467
  getRef: t
468
468
  };
469
469
  }
470
- const $e = ye(() => []);
470
+ const Ae = ye(() => []);
471
471
  function Er(e) {
472
- const t = $e.getOrDefault(e);
472
+ const t = Ae.getOrDefault(e);
473
473
  return t.push(Q({})), t.length - 1;
474
474
  }
475
475
  function wr(e, t, n) {
476
- $e.get(e)[t].value = n;
476
+ Ae.get(e)[t].value = n;
477
477
  }
478
478
  function _r(e) {
479
- $e.delete(e);
479
+ Ae.delete(e);
480
480
  }
481
481
  function Rr() {
482
482
  const e = /* @__PURE__ */ new Map();
483
- for (const [n, r] of $e) {
483
+ for (const [n, r] of Ae) {
484
484
  const o = r[r.length - 1];
485
485
  e.set(n, o);
486
486
  }
@@ -574,7 +574,7 @@ function Sr(e, t, n, r) {
574
574
  }
575
575
  let s;
576
576
  if (n)
577
- s = new Ar(
577
+ s = new $r(
578
578
  o,
579
579
  t
580
580
  );
@@ -638,7 +638,7 @@ class Cr {
638
638
  }));
639
639
  }
640
640
  }
641
- class Ar {
641
+ class $r {
642
642
  constructor(t, n) {
643
643
  M(this, "_isDictSource");
644
644
  this.snapshot = t, this.binding = n;
@@ -694,7 +694,7 @@ class Ar {
694
694
  }));
695
695
  }
696
696
  }
697
- function $r(e, t, n = !1) {
697
+ function Ar(e, t, n = !1) {
698
698
  return n && (e = `$computed(${e})`, t = { ...t, $computed: W }), G(e, t);
699
699
  }
700
700
  function _t(e, t, n) {
@@ -1479,20 +1479,20 @@ function No(e, t) {
1479
1479
  return r.get(a);
1480
1480
  }
1481
1481
  function s(a, f, d) {
1482
- const p = !d, v = At(a);
1483
- b.NODE_ENV !== "production" && $o(v, f), v.aliasOf = d && d.record;
1482
+ const p = !d, v = $t(a);
1483
+ b.NODE_ENV !== "production" && Ao(v, f), v.aliasOf = d && d.record;
1484
1484
  const g = Tt(t, a), y = [v];
1485
1485
  if ("alias" in a) {
1486
1486
  const V = typeof a.alias == "string" ? [a.alias] : a.alias;
1487
- for (const $ of V)
1487
+ for (const A of V)
1488
1488
  y.push(
1489
1489
  // we need to normalize again to ensure the `mods` property
1490
1490
  // being non enumerable
1491
- At(I({}, v, {
1491
+ $t(I({}, v, {
1492
1492
  // this allows us to hold a copy of the `components` option
1493
1493
  // so that async components cache is hold on the original record
1494
1494
  components: d ? d.record.components : v.components,
1495
- path: $,
1495
+ path: A,
1496
1496
  // we might be the child of an alias
1497
1497
  aliasOf: d ? d.record : v
1498
1498
  // the aliases are always of the same kind as the original since they
@@ -1502,15 +1502,15 @@ function No(e, t) {
1502
1502
  }
1503
1503
  let _, O;
1504
1504
  for (const V of y) {
1505
- const { path: $ } = V;
1506
- if (f && $[0] !== "/") {
1505
+ const { path: A } = V;
1506
+ if (f && A[0] !== "/") {
1507
1507
  const x = f.record.path, U = x[x.length - 1] === "/" ? "" : "/";
1508
- V.path = f.record.path + ($ && U + $);
1508
+ V.path = f.record.path + (A && U + A);
1509
1509
  }
1510
1510
  if (b.NODE_ENV !== "production" && V.path === "*")
1511
1511
  throw new Error(`Catch all routes ("*") must now be defined using a param with a custom regexp.
1512
1512
  See more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-routes.`);
1513
- if (_ = ko(V, f, g), b.NODE_ENV !== "production" && f && $[0] === "/" && jo(_, f), d ? (d.alias.push(_), b.NODE_ENV !== "production" && Ao(d, _)) : (O = O || _, O !== _ && O.alias.push(_), p && a.name && !$t(_) && (b.NODE_ENV !== "production" && To(a, f), i(a.name))), On(_) && l(_), v.children) {
1513
+ if (_ = ko(V, f, g), b.NODE_ENV !== "production" && f && A[0] === "/" && jo(_, f), d ? (d.alias.push(_), b.NODE_ENV !== "production" && $o(d, _)) : (O = O || _, O !== _ && O.alias.push(_), p && a.name && !At(_) && (b.NODE_ENV !== "production" && To(a, f), i(a.name))), On(_) && l(_), v.children) {
1514
1514
  const x = v.children;
1515
1515
  for (let U = 0; U < x.length; U++)
1516
1516
  s(x[U], _, d && d.children[U]);
@@ -1535,7 +1535,7 @@ See more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-
1535
1535
  }
1536
1536
  function l(a) {
1537
1537
  const f = xo(a, n);
1538
- n.splice(f, 0, a), a.record.name && !$t(a) && r.set(a.record.name, a);
1538
+ n.splice(f, 0, a), a.record.name && !At(a) && r.set(a.record.name, a);
1539
1539
  }
1540
1540
  function h(a, f) {
1541
1541
  let d, p = {}, v, g;
@@ -1545,7 +1545,7 @@ See more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-
1545
1545
  location: a
1546
1546
  });
1547
1547
  if (b.NODE_ENV !== "production") {
1548
- const O = Object.keys(a.params || {}).filter((V) => !d.keys.find(($) => $.name === V));
1548
+ const O = Object.keys(a.params || {}).filter((V) => !d.keys.find((A) => A.name === V));
1549
1549
  O.length && S(`Discarded invalid param(s) "${O.join('", "')}" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`);
1550
1550
  }
1551
1551
  g = d.record.name, p = I(
@@ -1601,7 +1601,7 @@ function Ct(e, t) {
1601
1601
  r in e && (n[r] = e[r]);
1602
1602
  return n;
1603
1603
  }
1604
- function At(e) {
1604
+ function $t(e) {
1605
1605
  const t = {
1606
1606
  path: e.path,
1607
1607
  redirect: e.redirect,
@@ -1632,7 +1632,7 @@ function Io(e) {
1632
1632
  t[r] = typeof n == "object" ? n[r] : n;
1633
1633
  return t;
1634
1634
  }
1635
- function $t(e) {
1635
+ function At(e) {
1636
1636
  for (; e; ) {
1637
1637
  if (e.record.aliasOf)
1638
1638
  return !0;
@@ -1652,7 +1652,7 @@ function Tt(e, t) {
1652
1652
  function st(e, t) {
1653
1653
  return e.name === t.name && e.optional === t.optional && e.repeatable === t.repeatable;
1654
1654
  }
1655
- function Ao(e, t) {
1655
+ function $o(e, t) {
1656
1656
  for (const n of e.keys)
1657
1657
  if (!n.optional && !t.keys.find(st.bind(null, n)))
1658
1658
  return S(`Alias "${t.record.path}" and the original record: "${e.record.path}" must have the exact same param named "${n.name}"`);
@@ -1660,7 +1660,7 @@ function Ao(e, t) {
1660
1660
  if (!n.optional && !e.keys.find(st.bind(null, n)))
1661
1661
  return S(`Alias "${t.record.path}" and the original record: "${e.record.path}" must have the exact same param named "${n.name}"`);
1662
1662
  }
1663
- function $o(e, t) {
1663
+ function Ao(e, t) {
1664
1664
  t && t.record.name && !e.name && !e.path && S(`The route named "${String(t.record.name)}" has a child without a name and an empty path. Using that name won't render the empty path child so you probably want to move the name to the child instead. If this is intentional, add a name to the child route to remove the warning.`);
1665
1665
  }
1666
1666
  function To(e, t) {
@@ -1910,7 +1910,7 @@ const Uo = /* @__PURE__ */ F({
1910
1910
  }));
1911
1911
  return () => {
1912
1912
  const s = t.default && Lo(t.default(n));
1913
- return e.custom ? s : A("a", {
1913
+ return e.custom ? s : $("a", {
1914
1914
  "aria-current": n.isExactActive ? e.ariaCurrentValue : null,
1915
1915
  href: n.href,
1916
1916
  // this would override user added attrs but Vue will still add
@@ -1979,7 +1979,7 @@ const Ft = (e, t, n) => e ?? t ?? n, qo = /* @__PURE__ */ F({
1979
1979
  const h = o.value, u = e.name, a = c.value, f = a && a.components[u];
1980
1980
  if (!f)
1981
1981
  return Bt(n.default, { Component: f, route: h });
1982
- const d = a.props[u], p = d ? d === !0 ? h.params : typeof d == "function" ? d(h) : d : null, g = A(f, I({}, p, t, {
1982
+ const d = a.props[u], p = d ? d === !0 ? h.params : typeof d == "function" ? d(h) : d : null, g = $(f, I({}, p, t, {
1983
1983
  onVnodeUnmounted: (y) => {
1984
1984
  y.component.isUnmounted && (a.instances[u] = null);
1985
1985
  },
@@ -2382,7 +2382,7 @@ function as(e) {
2382
2382
  function V(m) {
2383
2383
  return U(m);
2384
2384
  }
2385
- function $(m) {
2385
+ function A(m) {
2386
2386
  return V(I(_(m), { replace: !0 }));
2387
2387
  }
2388
2388
  function x(m) {
@@ -2618,7 +2618,7 @@ ${JSON.stringify(R, null, 2)}
2618
2618
  resolve: y,
2619
2619
  options: e,
2620
2620
  push: V,
2621
- replace: $,
2621
+ replace: A,
2622
2622
  go: We,
2623
2623
  back: () => We(-1),
2624
2624
  forward: () => We(1),
@@ -2685,7 +2685,7 @@ function Y(e) {
2685
2685
  return r.getVForIndex(p.fid);
2686
2686
  if (N.isJs(p)) {
2687
2687
  const { code: v, bind: g } = p, y = Te(g, (_) => u(_));
2688
- return $r(v, y)();
2688
+ return Ar(v, y)();
2689
2689
  }
2690
2690
  if (N.isSlotProp(p))
2691
2691
  return n.getPropsValue(p);
@@ -2768,22 +2768,22 @@ function Y(e) {
2768
2768
  if (y[O] === 1)
2769
2769
  return;
2770
2770
  if (N.isVar(_)) {
2771
- const $ = h(_);
2772
- $.value = g[O];
2771
+ const A = h(_);
2772
+ A.value = g[O];
2773
2773
  return;
2774
2774
  }
2775
2775
  if (N.isRouterAction(_)) {
2776
- const $ = g[O], x = s[$.fn];
2777
- x(...$.args);
2776
+ const A = g[O], x = s[A.fn];
2777
+ x(...A.args);
2778
2778
  return;
2779
2779
  }
2780
2780
  if (N.isElementRef(_)) {
2781
- const $ = o.getRef(_).value, x = g[O];
2782
- $[x.method](...x.args);
2781
+ const A = o.getRef(_).value, x = g[O];
2782
+ A[x.method](...x.args);
2783
2783
  return;
2784
2784
  }
2785
2785
  if (N.isJsOutput(_)) {
2786
- const $ = g[O], x = G($);
2786
+ const A = g[O], x = G(A);
2787
2787
  typeof x == "function" && x();
2788
2788
  return;
2789
2789
  }
@@ -3223,7 +3223,7 @@ function Ns(e, { slots: t }) {
3223
3223
  Object.fromEntries(
3224
3224
  r.map((i) => [i, s[i]])
3225
3225
  )
3226
- ), A(Ae, null, t.default());
3226
+ ), $($e, null, t.default());
3227
3227
  };
3228
3228
  }
3229
3229
  const Is = F(Ns, {
@@ -3238,26 +3238,26 @@ function Cs(e, t) {
3238
3238
  return (l) => {
3239
3239
  if (i.scope) {
3240
3240
  const h = () => i.props ? Wt(i.props, l, c) : ge(c);
3241
- return A(_e, { scope: i.scope }, h);
3241
+ return $(_e, { scope: i.scope }, h);
3242
3242
  }
3243
3243
  return i.props ? Wt(i.props, l, c) : ge(c);
3244
3244
  };
3245
3245
  } });
3246
3246
  }
3247
3247
  function Wt(e, t, n) {
3248
- return A(
3248
+ return $(
3249
3249
  Is,
3250
3250
  { propsInfo: e, propsValue: t },
3251
3251
  () => ge(n)
3252
3252
  );
3253
3253
  }
3254
3254
  function ge(e) {
3255
- const t = (e ?? []).map((n) => A(X, {
3255
+ const t = (e ?? []).map((n) => $(X, {
3256
3256
  component: n
3257
3257
  }));
3258
3258
  return t.length <= 0 ? null : t;
3259
3259
  }
3260
- function As(e, t) {
3260
+ function $s(e, t) {
3261
3261
  const n = {}, r = [];
3262
3262
  return (e || []).forEach((o) => {
3263
3263
  const { sys: s, name: i, arg: c, value: l, mf: h } = o;
@@ -3280,17 +3280,17 @@ function As(e, t) {
3280
3280
  directiveArray: r
3281
3281
  };
3282
3282
  }
3283
- function $s(e, t) {
3283
+ function As(e, t) {
3284
3284
  const { eRef: n } = e;
3285
3285
  return n === void 0 ? {} : { ref: t.getRef(n) };
3286
3286
  }
3287
3287
  function Ts(e) {
3288
3288
  const t = Y(), n = en();
3289
3289
  return () => {
3290
- const { tag: r } = e.component, o = N.IsBinding(r) ? t.getObjectToValue(r) : r, s = ut(o), i = typeof s == "string", c = Ps(e.component, t), { styles: l, hasStyle: h } = Ss(e.component, t), u = _s(e.component.events ?? {}, t), a = Cs(e.component, i), f = Vs(e.component, t), { newProps: d, directiveArray: p } = As(
3290
+ const { tag: r } = e.component, o = N.IsBinding(r) ? t.getObjectToValue(r) : r, s = ut(o), i = typeof s == "string", c = Ps(e.component, t), { styles: l, hasStyle: h } = Ss(e.component, t), u = _s(e.component.events ?? {}, t), a = Cs(e.component, i), f = Vs(e.component, t), { newProps: d, directiveArray: p } = $s(
3291
3291
  e.component.dir,
3292
3292
  t
3293
- ), v = $s(
3293
+ ), v = As(
3294
3294
  e.component,
3295
3295
  n
3296
3296
  ), g = zn({
@@ -3300,7 +3300,7 @@ function Ts(e) {
3300
3300
  ...v
3301
3301
  }) || {};
3302
3302
  h && (g.style = l), c && (g.class = c);
3303
- const y = A(s, { ...g }, a);
3303
+ const y = $(s, { ...g }, a);
3304
3304
  return p.length > 0 ? Jn(
3305
3305
  // @ts-ignore
3306
3306
  y,
@@ -3311,7 +3311,7 @@ function Ts(e) {
3311
3311
  const X = F(Ts, {
3312
3312
  props: ["component"]
3313
3313
  });
3314
- function An(e, t) {
3314
+ function $n(e, t) {
3315
3315
  var n, r;
3316
3316
  if (e) {
3317
3317
  e.vars && e.vars.forEach((i) => {
@@ -3327,17 +3327,17 @@ function An(e, t) {
3327
3327
  }
3328
3328
  function js(e, { slots: t }) {
3329
3329
  const { scope: n } = e;
3330
- return An(n), () => A(Ae, null, t.default());
3330
+ return $n(n), () => $($e, null, t.default());
3331
3331
  }
3332
3332
  const _e = F(js, {
3333
3333
  props: ["scope"]
3334
3334
  }), xs = F(
3335
3335
  (e) => {
3336
3336
  const { scope: t, items: n, vforInfo: r } = e;
3337
- return Or(r), An(t, r.key), n.length === 1 ? () => A(X, {
3337
+ return Or(r), $n(t, r.key), n.length === 1 ? () => $(X, {
3338
3338
  component: n[0]
3339
3339
  }) : () => n.map(
3340
- (s) => A(X, {
3340
+ (s) => $(X, {
3341
3341
  component: s
3342
3342
  })
3343
3343
  );
@@ -3394,32 +3394,27 @@ const Fs = { class: "app-box" }, Bs = {
3394
3394
  scope: B(o).scope
3395
3395
  }, {
3396
3396
  default: Zn(() => [
3397
- (he(!0), be(Ae, null, er(B(o).items, (c) => (he(), tr(B(X), { component: c }, null, 8, ["component"]))), 256))
3397
+ (he(!0), be($e, null, er(B(o).items, (c) => (he(), tr(B(X), { component: c }, null, 8, ["component"]))), 256))
3398
3398
  ]),
3399
3399
  _: 1
3400
3400
  }, 8, ["scope"])
3401
3401
  ], 2))
3402
3402
  ]));
3403
3403
  }
3404
- }), Ls = (e, t) => {
3405
- const n = e.__vccOpts || e;
3406
- for (const [r, o] of t)
3407
- n[r] = o;
3408
- return n;
3409
- }, Us = /* @__PURE__ */ Ls(Ws, [["__scopeId", "data-v-687dcc1a"]]);
3410
- function Gs(e) {
3404
+ });
3405
+ function Ls(e) {
3411
3406
  const { on: t, scope: n, items: r } = e, o = Y();
3412
3407
  return () => {
3413
3408
  const s = o.getObjectToValue(t);
3414
- return A(_e, { scope: n }, () => s ? r.map(
3415
- (c) => A(X, { component: c })
3409
+ return $(_e, { scope: n }, () => s ? r.map(
3410
+ (c) => $(X, { component: c })
3416
3411
  ) : void 0);
3417
3412
  };
3418
3413
  }
3419
- const Ks = F(Gs, {
3414
+ const Us = F(Ls, {
3420
3415
  props: ["on", "scope", "items"]
3421
3416
  });
3422
- function Hs(e) {
3417
+ function Gs(e) {
3423
3418
  const { start: t = 0, end: n, step: r = 1 } = e;
3424
3419
  let o = [];
3425
3420
  if (r > 0)
@@ -3430,14 +3425,14 @@ function Hs(e) {
3430
3425
  o.push(s);
3431
3426
  return o;
3432
3427
  }
3433
- function qs(e) {
3428
+ function Ks(e) {
3434
3429
  const { array: t, bArray: n, items: r, fkey: o, fid: s, scope: i, num: c, tsGroup: l = {} } = e, h = t === void 0, u = c !== void 0, a = h ? n : t, f = Y();
3435
3430
  Sr(s, a, h, u);
3436
- const p = Xs(o ?? "index");
3431
+ const p = Qs(o ?? "index");
3437
3432
  return Ce(() => {
3438
3433
  mr(i.id);
3439
3434
  }), () => {
3440
- const v = Js(
3435
+ const v = qs(
3441
3436
  u,
3442
3437
  h,
3443
3438
  a,
@@ -3445,7 +3440,7 @@ function qs(e) {
3445
3440
  c
3446
3441
  ), g = Vr(s), y = v.map((_, O) => {
3447
3442
  const V = p(_, O);
3448
- return g.add(V), Pr(s, V, O), A(xs, {
3443
+ return g.add(V), Pr(s, V, O), $(xs, {
3449
3444
  scope: e.scope,
3450
3445
  items: r,
3451
3446
  vforInfo: {
@@ -3455,59 +3450,59 @@ function qs(e) {
3455
3450
  key: V
3456
3451
  });
3457
3452
  });
3458
- return g.removeUnusedKeys(), l && Object.keys(l).length > 0 ? A(qt, l, {
3453
+ return g.removeUnusedKeys(), l && Object.keys(l).length > 0 ? $(qt, l, {
3459
3454
  default: () => y
3460
3455
  }) : y;
3461
3456
  };
3462
3457
  }
3463
- const zs = F(qs, {
3458
+ const Hs = F(Ks, {
3464
3459
  props: ["array", "items", "fid", "bArray", "scope", "num", "fkey", "tsGroup"]
3465
3460
  });
3466
- function Js(e, t, n, r, o) {
3461
+ function qs(e, t, n, r, o) {
3467
3462
  if (e) {
3468
3463
  let i = 0;
3469
- return typeof o == "number" ? i = o : i = r.getObjectToValue(o) ?? 0, Hs({
3464
+ return typeof o == "number" ? i = o : i = r.getObjectToValue(o) ?? 0, Gs({
3470
3465
  end: Math.max(0, i)
3471
3466
  });
3472
3467
  }
3473
3468
  const s = t ? r.getObjectToValue(n) || [] : n;
3474
3469
  return typeof s == "object" ? Object.values(s) : s;
3475
3470
  }
3476
- const Qs = (e) => e, Ys = (e, t) => t;
3477
- function Xs(e) {
3471
+ const zs = (e) => e, Js = (e, t) => t;
3472
+ function Qs(e) {
3478
3473
  const t = cr(e);
3479
- return typeof t == "function" ? t : e === "item" ? Qs : Ys;
3474
+ return typeof t == "function" ? t : e === "item" ? zs : Js;
3480
3475
  }
3481
- function Zs(e) {
3476
+ function Ys(e) {
3482
3477
  return e.map((n) => {
3483
3478
  if (n.tag)
3484
- return A(X, { component: n });
3485
- const r = ut($n);
3486
- return A(r, {
3479
+ return $(X, { component: n });
3480
+ const r = ut(An);
3481
+ return $(r, {
3487
3482
  scope: n
3488
3483
  });
3489
3484
  });
3490
3485
  }
3491
- const $n = F(
3486
+ const An = F(
3492
3487
  (e) => {
3493
3488
  const t = e.scope;
3494
- return () => Zs(t.items ?? []);
3489
+ return () => Ys(t.items ?? []);
3495
3490
  },
3496
3491
  {
3497
3492
  props: ["scope"]
3498
3493
  }
3499
3494
  );
3500
- function ei(e) {
3495
+ function Xs(e) {
3501
3496
  return e.map((t) => {
3502
3497
  if (t.tag)
3503
- return A(X, { component: t });
3504
- const n = ut($n);
3505
- return A(n, {
3498
+ return $(X, { component: t });
3499
+ const n = ut(An);
3500
+ return $(n, {
3506
3501
  scope: t
3507
3502
  });
3508
3503
  });
3509
3504
  }
3510
- const ti = F(
3505
+ const Zs = F(
3511
3506
  (e) => {
3512
3507
  const { scope: t, on: n, items: r } = e, o = Q(r), s = Qt(t), i = Y();
3513
3508
  return Ie.createDynamicWatchRefresh(n, i, async () => {
@@ -3515,7 +3510,7 @@ const ti = F(
3515
3510
  return o.value = c, l;
3516
3511
  }), Ce(() => {
3517
3512
  Zt(t.id, s);
3518
- }), () => ei(o.value);
3513
+ }), () => Xs(o.value);
3519
3514
  },
3520
3515
  {
3521
3516
  props: ["sid", "url", "hKey", "on", "bind", "items", "scope"]
@@ -3562,23 +3557,23 @@ var Ie;
3562
3557
  }
3563
3558
  e.fetchRemote = n;
3564
3559
  })(Ie || (Ie = {}));
3565
- function ni(e) {
3560
+ function ei(e) {
3566
3561
  const { scope: t, items: n } = e;
3567
3562
  return () => {
3568
- const r = n.map((o) => A(X, { component: o }));
3569
- return A(_e, { scope: t }, () => r);
3563
+ const r = n.map((o) => $(X, { component: o }));
3564
+ return $(_e, { scope: t }, () => r);
3570
3565
  };
3571
3566
  }
3572
- const Lt = F(ni, {
3567
+ const Lt = F(ei, {
3573
3568
  props: ["scope", "items"]
3574
3569
  });
3575
- function ri(e) {
3570
+ function ti(e) {
3576
3571
  const { on: t, case: n, default: r } = e, o = Y();
3577
3572
  return () => {
3578
3573
  const s = o.getObjectToValue(t), i = n.map((c) => {
3579
3574
  const { value: l, items: h, scope: u } = c.props;
3580
3575
  if (s === l)
3581
- return A(Lt, {
3576
+ return $(Lt, {
3582
3577
  scope: u,
3583
3578
  items: h,
3584
3579
  key: ["case", l].join("-")
@@ -3586,17 +3581,17 @@ function ri(e) {
3586
3581
  }).filter((c) => c);
3587
3582
  if (r && !i.length) {
3588
3583
  const { items: c, scope: l } = r.props;
3589
- i.push(A(Lt, { scope: l, items: c, key: "default" }));
3584
+ i.push($(Lt, { scope: l, items: c, key: "default" }));
3590
3585
  }
3591
- return A(Ae, i);
3586
+ return $($e, i);
3592
3587
  };
3593
3588
  }
3594
- const oi = F(ri, {
3589
+ const ni = F(ti, {
3595
3590
  props: ["case", "on", "default"]
3596
3591
  });
3597
- function si(e, { slots: t }) {
3592
+ function ri(e, { slots: t }) {
3598
3593
  const { name: n = "fade", tag: r } = e;
3599
- return () => A(
3594
+ return () => $(
3600
3595
  qt,
3601
3596
  { name: n, tag: r },
3602
3597
  {
@@ -3604,17 +3599,17 @@ function si(e, { slots: t }) {
3604
3599
  }
3605
3600
  );
3606
3601
  }
3607
- const ii = F(si, {
3602
+ const oi = F(ri, {
3608
3603
  props: ["name", "tag"]
3609
3604
  });
3610
- function ai(e) {
3605
+ function si(e) {
3611
3606
  const { content: t, r: n = 0 } = e, r = Y(), o = n === 1 ? () => r.getObjectToValue(t) : () => t;
3612
3607
  return () => Ht(o());
3613
3608
  }
3614
- const ci = F(ai, {
3609
+ const ii = F(si, {
3615
3610
  props: ["content", "r"]
3616
3611
  });
3617
- function ui(e) {
3612
+ function ai(e) {
3618
3613
  if (!e.router)
3619
3614
  throw new Error("Router config is not provided.");
3620
3615
  const { routes: t, kAlive: n = !1 } = e.router;
@@ -3627,7 +3622,7 @@ function Tn(e, t) {
3627
3622
  const { server: n = !1, vueItem: r, scope: o } = e, s = () => {
3628
3623
  if (n)
3629
3624
  throw new Error("Server-side rendering is not supported yet.");
3630
- return Promise.resolve(li(r, o, t));
3625
+ return Promise.resolve(ci(r, o, t));
3631
3626
  }, i = (l = r.children) == null ? void 0 : l.map(
3632
3627
  (h) => Tn(h, t)
3633
3628
  ), c = {
@@ -3637,27 +3632,27 @@ function Tn(e, t) {
3637
3632
  };
3638
3633
  return r.component.length === 0 && delete c.component, i === void 0 && delete c.children, c;
3639
3634
  }
3640
- function li(e, t, n) {
3641
- const { path: r, component: o } = e, s = A(
3635
+ function ci(e, t, n) {
3636
+ const { path: r, component: o } = e, s = $(
3642
3637
  _e,
3643
3638
  { scope: t, key: r },
3644
- () => o.map((c) => A(X, { component: c }))
3639
+ () => o.map((c) => $(X, { component: c }))
3645
3640
  );
3646
- return n ? A(nr, null, () => s) : s;
3641
+ return n ? $(nr, null, () => s) : s;
3647
3642
  }
3648
- function fi(e, t) {
3643
+ function ui(e, t) {
3649
3644
  const { mode: n = "hash" } = t.router, r = n === "hash" ? vo() : n === "memory" ? go() : wn();
3650
3645
  e.use(
3651
3646
  as({
3652
3647
  history: r,
3653
- routes: ui(t)
3648
+ routes: ai(t)
3654
3649
  })
3655
3650
  );
3656
3651
  }
3657
- function pi(e, t) {
3658
- e.component("insta-ui", Us), e.component("vif", Ks), e.component("vfor", zs), e.component("match", oi), e.component("refresh", ti), e.component("ts-group", ii), e.component("content", ci), t.router && fi(e, t);
3652
+ function hi(e, t) {
3653
+ e.component("insta-ui", Ws), e.component("vif", Us), e.component("vfor", Hs), e.component("match", ni), e.component("refresh", Zs), e.component("ts-group", oi), e.component("content", ii), t.router && ui(e, t);
3659
3654
  }
3660
3655
  export {
3661
- pi as default
3656
+ hi as default
3662
3657
  };
3663
3658
  //# sourceMappingURL=insta-ui.js.map