likec4 1.58.0 → 1.59.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/__app__/codegen/webcomponent.mjs +14 -14
  2. package/__app__/src/chunks/AIChat.mjs +153 -156
  3. package/__app__/src/chunks/LikeC4Styles.mjs +1553 -1255
  4. package/__app__/src/chunks/ProjectsOverview.mjs +127 -130
  5. package/__app__/src/chunks/hooks.mjs +419 -106
  6. package/__app__/src/chunks/libs/@floating-ui.mjs +8 -8
  7. package/__app__/src/chunks/libs/@mantine.mjs +3039 -2135
  8. package/__app__/src/chunks/libs/@tanstack-ai.mjs +4 -4
  9. package/__app__/src/chunks/libs/@tanstack.mjs +93 -118
  10. package/__app__/src/chunks/libs/@xstate/react.mjs +30 -16
  11. package/__app__/src/chunks/libs/@xyflow/react.mjs +50 -26
  12. package/__app__/src/chunks/libs/bezier-js.mjs +11 -8
  13. package/__app__/src/chunks/libs/framer.mjs +1188 -1155
  14. package/__app__/src/chunks/libs/zod.mjs +191 -188
  15. package/__app__/src/chunks/rolldown-runtime.mjs +8 -1
  16. package/__app__/src/chunks/styled-system.mjs +23 -16
  17. package/__app__/src/main.mjs +22275 -9432
  18. package/__app__/src/style.css +1 -1
  19. package/dist/chunks/dist.mjs +10 -0
  20. package/dist/chunks/enableServer.mjs +1 -1
  21. package/dist/chunks/index.d.mts +9 -9
  22. package/dist/chunks/index2.d.mts +386 -229
  23. package/dist/chunks/libs/@chevrotain/gast.mjs +1 -1
  24. package/dist/chunks/libs/@chevrotain/regexp-to-ast.mjs +1 -1
  25. package/dist/chunks/libs/@logtape/logtape.mjs +3 -3
  26. package/dist/chunks/libs/@ts-graphviz/common.d.mts +1 -2
  27. package/dist/chunks/libs/@ts-graphviz/core.mjs +1 -1
  28. package/dist/chunks/libs/chevrotain-allstar.mjs +1 -1
  29. package/dist/chunks/libs/chevrotain.mjs +4 -4
  30. package/dist/chunks/libs/json5.mjs +1 -1
  31. package/dist/chunks/libs/langium.d.mts +2940 -2914
  32. package/dist/chunks/libs/langium.mjs +9 -9
  33. package/dist/chunks/libs/merge-error-cause.mjs +1 -1
  34. package/dist/chunks/libs/p-queue.mjs +1 -1
  35. package/dist/chunks/libs/package-manager-detector.mjs +1 -1
  36. package/dist/chunks/libs/pako.mjs +1 -1
  37. package/dist/chunks/libs/picomatch.mjs +1 -1
  38. package/dist/chunks/libs/remeda.mjs +1 -1
  39. package/dist/chunks/libs/unstorage.d.mts +1 -0
  40. package/dist/chunks/libs/which.mjs +1 -1
  41. package/dist/chunks/libs/zod.d.mts +48 -36
  42. package/dist/chunks/libs/zod.mjs +4 -4
  43. package/dist/chunks/logger.mjs +1 -0
  44. package/dist/chunks/node.mjs +57 -66
  45. package/dist/chunks/rolldown-runtime.mjs +1 -1
  46. package/dist/chunks/sequence-view.mjs +1 -1
  47. package/dist/chunks/vite-plugin.mjs +43 -43
  48. package/dist/cli/index.mjs +159 -157
  49. package/dist/index.d.mts +2 -3
  50. package/dist/index.mjs +1 -1
  51. package/dist/model/index.d.mts +5 -4
  52. package/dist/vite-plugin/index.d.mts +6 -9
  53. package/dist/vite-plugin/internal/index.d.mts +15 -10
  54. package/package.json +37 -37
  55. package/react/index.d.mts +761 -111
  56. package/react/index.mjs +13974 -10232
  57. package/__app__/src/chunks/DiagramActorProvider.mjs +0 -7638
  58. package/__app__/src/chunks/Markdown.mjs +0 -146
  59. package/__app__/src/chunks/NavigationPanel.mjs +0 -61
  60. package/__app__/src/chunks/adhoc-editor.mjs +0 -3386
  61. package/__app__/src/chunks/libs/@dagrejs/dagre.mjs +0 -1894
  62. package/__app__/src/chunks/libs/@tabler/icons-react.mjs +0 -252
  63. package/__app__/src/chunks/libs/remeda.mjs +0 -642
@@ -1554,7 +1554,7 @@ function clientTools(...e) {
1554
1554
  return e;
1555
1555
  }
1556
1556
  //#endregion
1557
- //#region ../../node_modules/.pnpm/@tanstack+ai-react@0.8.0_@tanstack+ai@0.14.0_@types+react@19.2.16_react@19.2.7/node_modules/@tanstack/ai-react/dist/esm/use-chat.js
1557
+ //#region ../../node_modules/.pnpm/@tanstack+ai-react@0.8.0_@tanstack+ai@0.14.0_@types+react@19.2.17_react@19.2.7/node_modules/@tanstack/ai-react/dist/esm/use-chat.js
1558
1558
  function useChat(e) {
1559
1559
  let t = i(), c = e.id || t, [l, u] = s(e.initialMessages || []), [d, f] = s(!1), [p, m] = s(void 0), [h, g] = s("ready"), [_, v] = s(!1), [y, b] = s("disconnected"), [x, S] = s(!1), C = o(e.initialMessages || []), w = o(!0);
1560
1560
  C.current = l;
@@ -1645,9 +1645,9 @@ function useChat(e) {
1645
1645
  }, [E])
1646
1646
  };
1647
1647
  }
1648
- new Uint8Array(128).fill(128), t(null);
1648
+ (/* @__PURE__ */ new Uint8Array(128)).fill(128), t(null);
1649
1649
  //#endregion
1650
- //#region ../../node_modules/.pnpm/@tanstack+ai-react-ui@0.6.2_@tanstack+ai-client@0.8.0_@tanstack+ai-react@0.8.0_@tanstac_8d26c9713f9262cc53d0ebd12334c287/node_modules/@tanstack/ai-react-ui/dist/esm/thinking-part.js
1650
+ //#region ../../node_modules/.pnpm/@tanstack+ai-react-ui@0.6.2_@tanstack+ai-client@0.8.0_@tanstack+ai-react@0.8.0_@tanstac_b3b413828c62030231ee8f54b1bb33f9/node_modules/@tanstack/ai-react-ui/dist/esm/thinking-part.js
1651
1651
  function ThinkingPart({ content: e, className: t = "", isComplete: n = !1 }) {
1652
1652
  let [i, a] = s(!1);
1653
1653
  return r(() => {
@@ -1682,7 +1682,7 @@ function ThinkingPart({ content: e, className: t = "", isComplete: n = !1 }) {
1682
1682
  });
1683
1683
  }
1684
1684
  //#endregion
1685
- //#region ../../node_modules/.pnpm/@tanstack+ai-react-ui@0.6.2_@tanstack+ai-client@0.8.0_@tanstack+ai-react@0.8.0_@tanstac_8d26c9713f9262cc53d0ebd12334c287/node_modules/@tanstack/ai-react-ui/dist/esm/chat-message.js
1685
+ //#region ../../node_modules/.pnpm/@tanstack+ai-react-ui@0.6.2_@tanstack+ai-client@0.8.0_@tanstack+ai-react@0.8.0_@tanstac_b3b413828c62030231ee8f54b1bb33f9/node_modules/@tanstack/ai-react-ui/dist/esm/chat-message.js
1686
1686
  function ChatMessage({ message: e, className: t = "", userClassName: n = "", assistantClassName: r = "", textPartRenderer: i, thinkingPartRenderer: a, toolsRenderer: o, defaultToolRenderer: s, toolResultRenderer: c }) {
1687
1687
  return /* @__PURE__ */ l("div", {
1688
1688
  className: [t, e.role === "user" ? n : r].filter(Boolean).join(" ") || void 0,
@@ -5,38 +5,21 @@ import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
5
5
  import { useSyncExternalStoreWithSelector as o } from "use-sync-external-store/shim/with-selector";
6
6
  import { flushSync as s } from "react-dom";
7
7
  //#region ../../node_modules/.pnpm/tiny-invariant@1.3.3/node_modules/tiny-invariant/dist/esm/tiny-invariant.js
8
- var c = !0, l = "Invariant failed";
8
+ var c = "Invariant failed";
9
9
  function invariant(e, t) {
10
- if (!e) {
11
- if (c) throw Error(l);
12
- var n = typeof t == "function" ? t() : t, r = n ? `${l}: ${n}` : l;
13
- throw Error(r);
14
- }
15
- }
16
- //#endregion
17
- //#region ../../node_modules/.pnpm/tiny-warning@1.0.3/node_modules/tiny-warning/dist/tiny-warning.esm.js
18
- var u = !0;
19
- function warning(e, t) {
20
- if (!u) {
21
- if (e) return;
22
- var n = "Warning: " + t;
23
- typeof console < "u" && console.warn(n);
24
- try {
25
- throw Error(n);
26
- } catch {}
27
- }
10
+ if (!e) throw Error(c);
28
11
  }
29
12
  //#endregion
30
13
  //#region ../../node_modules/.pnpm/@tanstack+store@0.7.0/node_modules/@tanstack/store/dist/esm/scheduler.js
31
- var d = /* @__PURE__ */ new WeakMap(), f = /* @__PURE__ */ new WeakMap(), p = { current: [] }, m = !1, h = 0, g = /* @__PURE__ */ new Set(), _ = /* @__PURE__ */ new Map();
14
+ var l = /* @__PURE__ */ new WeakMap(), u = /* @__PURE__ */ new WeakMap(), d = { current: [] }, f = !1, p = 0, m = /* @__PURE__ */ new Set(), h = /* @__PURE__ */ new Map();
32
15
  function __flush_internals(e) {
33
- let t = Array.from(e).sort((e, t) => e instanceof v && e.options.deps.includes(t) ? 1 : t instanceof v && t.options.deps.includes(e) ? -1 : 0);
16
+ let t = Array.from(e).sort((e, t) => e instanceof g && e.options.deps.includes(t) ? 1 : t instanceof g && t.options.deps.includes(e) ? -1 : 0);
34
17
  for (let e of t) {
35
- if (p.current.includes(e)) continue;
36
- p.current.push(e), e.recompute();
37
- let t = f.get(e);
18
+ if (d.current.includes(e)) continue;
19
+ d.current.push(e), e.recompute();
20
+ let t = u.get(e);
38
21
  if (t) for (let e of t) {
39
- let t = d.get(e);
22
+ let t = l.get(e);
40
23
  t && __flush_internals(t);
41
24
  }
42
25
  }
@@ -54,31 +37,31 @@ function __notifyDerivedListeners(e) {
54
37
  }));
55
38
  }
56
39
  function __flush(e) {
57
- if (h > 0 && !_.has(e) && _.set(e, e.prevState), g.add(e), !(h > 0) && !m) try {
58
- for (m = !0; g.size > 0;) {
59
- let e = Array.from(g);
60
- g.clear();
61
- for (let t of e) t.prevState = _.get(t) ?? t.prevState, __notifyListeners(t);
40
+ if (p > 0 && !h.has(e) && h.set(e, e.prevState), m.add(e), !(p > 0) && !f) try {
41
+ for (f = !0; m.size > 0;) {
42
+ let e = Array.from(m);
43
+ m.clear();
44
+ for (let t of e) t.prevState = h.get(t) ?? t.prevState, __notifyListeners(t);
62
45
  for (let t of e) {
63
- let e = d.get(t);
64
- e && (p.current.push(t), __flush_internals(e));
46
+ let e = l.get(t);
47
+ e && (d.current.push(t), __flush_internals(e));
65
48
  }
66
49
  for (let t of e) {
67
- let e = d.get(t);
50
+ let e = l.get(t);
68
51
  if (e) for (let t of e) __notifyDerivedListeners(t);
69
52
  }
70
53
  }
71
54
  } finally {
72
- m = !1, p.current = [], _.clear();
55
+ f = !1, d.current = [], h.clear();
73
56
  }
74
57
  }
75
58
  function batch(e) {
76
- h++;
59
+ p++;
77
60
  try {
78
61
  e();
79
62
  } finally {
80
- if (h--, h === 0) {
81
- let e = Array.from(g)[0];
63
+ if (p--, p === 0) {
64
+ let e = Array.from(m)[0];
82
65
  e && __flush(e);
83
66
  }
84
67
  }
@@ -99,7 +82,7 @@ var Store = class {
99
82
  this.prevState = this.state, this.state = this.options?.updateFn ? this.options.updateFn(this.prevState)(e) : e(this.prevState), (n = (t = this.options)?.onUpdate) == null || n.call(t), __flush(this);
100
83
  }, this.prevState = e, this.state = e, this.options = t;
101
84
  }
102
- }, v = class Derived {
85
+ }, g = class Derived {
103
86
  constructor(e) {
104
87
  this.listeners = /* @__PURE__ */ new Set(), this._subscriptions = [], this.lastSeenDepValues = [], this.getDepVals = () => {
105
88
  let e = [], t = [];
@@ -145,22 +128,22 @@ var Store = class {
145
128
  registerOnGraph(e = this.options.deps) {
146
129
  for (let t of e) if (t instanceof Derived) t.registerOnGraph(), this.registerOnGraph(t.options.deps);
147
130
  else if (t instanceof Store) {
148
- let e = d.get(t);
149
- e || (e = /* @__PURE__ */ new Set(), d.set(t, e)), e.add(this);
150
- let n = f.get(this);
151
- n || (n = /* @__PURE__ */ new Set(), f.set(this, n)), n.add(t);
131
+ let e = l.get(t);
132
+ e || (e = /* @__PURE__ */ new Set(), l.set(t, e)), e.add(this);
133
+ let n = u.get(this);
134
+ n || (n = /* @__PURE__ */ new Set(), u.set(this, n)), n.add(t);
152
135
  }
153
136
  }
154
137
  unregisterFromGraph(e = this.options.deps) {
155
138
  for (let t of e) if (t instanceof Derived) this.unregisterFromGraph(t.options.deps);
156
139
  else if (t instanceof Store) {
157
- let e = d.get(t);
140
+ let e = l.get(t);
158
141
  e && e.delete(this);
159
- let n = f.get(this);
142
+ let n = u.get(this);
160
143
  n && n.delete(t);
161
144
  }
162
145
  }
163
- }, y = "__TSR_index", b = "popstate", x = "beforeunload";
146
+ }, _ = "__TSR_index", v = "popstate", y = "beforeunload";
164
147
  function createHistory(e) {
165
148
  let t = e.getLocation(), n = /* @__PURE__ */ new Set(), notify = (r) => {
166
149
  t = e.getLocation(), n.forEach((e) => e({
@@ -201,7 +184,7 @@ function createHistory(e) {
201
184
  n.delete(e);
202
185
  }),
203
186
  push: (n, r, i) => {
204
- let a = t.state[y];
187
+ let a = t.state[_];
205
188
  r = assignKeyAndIndex(a + 1, r), tryNavigation({
206
189
  task: () => {
207
190
  e.pushState(n, r), notify({ type: "PUSH" });
@@ -213,7 +196,7 @@ function createHistory(e) {
213
196
  });
214
197
  },
215
198
  replace: (n, r, i) => {
216
- let a = t.state[y];
199
+ let a = t.state[_];
217
200
  r = assignKeyAndIndex(a, r), tryNavigation({
218
201
  task: () => {
219
202
  e.replaceState(n, r), notify({ type: "REPLACE" });
@@ -254,7 +237,7 @@ function createHistory(e) {
254
237
  type: "FORWARD"
255
238
  });
256
239
  },
257
- canGoBack: () => t.state[y] !== 0,
240
+ canGoBack: () => t.state[_] !== 0,
258
241
  createHref: (t) => e.createHref(t),
259
242
  block: (t) => {
260
243
  if (!e.setBlockers) return () => {};
@@ -274,13 +257,13 @@ function assignKeyAndIndex(e, t) {
274
257
  return t ||= {}, {
275
258
  ...t,
276
259
  key: createRandomKey(),
277
- [y]: e
260
+ [_]: e
278
261
  };
279
262
  }
280
263
  function createBrowserHistory(e) {
281
264
  let t = e?.window ?? (typeof document < "u" ? window : void 0), n = t.history.pushState, r = t.history.replaceState, i = [], _getBlockers = () => i, _setBlockers = (e) => i = e, a = e?.createHref ?? ((e) => e), o = e?.parseLocation ?? (() => parseHref(`${t.location.pathname}${t.location.search}${t.location.hash}`, t.history.state));
282
265
  t.history.state?.key || t.history.replaceState({
283
- [y]: 0,
266
+ [_]: 0,
284
267
  key: createRandomKey()
285
268
  }, "");
286
269
  let s = o(), c, l = !1, u = !1, d = !1, f = !1, getLocation = () => s, p, m, flush = () => {
@@ -299,7 +282,7 @@ function createBrowserHistory(e) {
299
282
  u = !1;
300
283
  return;
301
284
  }
302
- let e = o(), n = e.state[y] - s.state[y], r = n === 1, i = n === -1, a = !r && !i || l;
285
+ let e = o(), n = e.state[_] - s.state[_], r = n === 1, i = n === -1, a = !r && !i || l;
303
286
  l = !1;
304
287
  let c = a ? "GO" : i ? "BACK" : "FORWARD", f = a ? {
305
288
  type: "GO",
@@ -353,7 +336,7 @@ function createBrowserHistory(e) {
353
336
  createHref: (e) => a(e),
354
337
  flush,
355
338
  destroy: () => {
356
- t.history.pushState = n, t.history.replaceState = r, t.removeEventListener(x, onBeforeUnload, { capture: !0 }), t.removeEventListener(b, onPushPopEvent);
339
+ t.history.pushState = n, t.history.replaceState = r, t.removeEventListener(y, onBeforeUnload, { capture: !0 }), t.removeEventListener(v, onPushPopEvent);
357
340
  },
358
341
  onBlocked: () => {
359
342
  c && s !== c && (s = c);
@@ -362,7 +345,7 @@ function createBrowserHistory(e) {
362
345
  setBlockers: _setBlockers,
363
346
  notifyOnIndexChange: !1
364
347
  });
365
- return t.addEventListener(x, onBeforeUnload, { capture: !0 }), t.addEventListener(b, onPushPopEvent), t.history.pushState = function(...e) {
348
+ return t.addEventListener(y, onBeforeUnload, { capture: !0 }), t.addEventListener(v, onPushPopEvent), t.history.pushState = function(...e) {
366
349
  let r = n.apply(t.history, e);
367
350
  return h._ignoreSubscribers || onPushPop("PUSH"), r;
368
351
  }, t.history.replaceState = function(...e) {
@@ -412,7 +395,7 @@ function parseHref(e, t) {
412
395
  hash: n > -1 ? e.substring(n) : "",
413
396
  search: r > -1 ? e.slice(r, n === -1 ? void 0 : n) : "",
414
397
  state: t || {
415
- [y]: 0,
398
+ [_]: 0,
416
399
  key: createRandomKey()
417
400
  }
418
401
  };
@@ -639,9 +622,9 @@ function isNotFound(e) {
639
622
  }
640
623
  //#endregion
641
624
  //#region ../../node_modules/.pnpm/@tanstack+router-core@1.114.25/node_modules/@tanstack/router-core/dist/esm/scroll-restoration.js
642
- var S = "tsr-scroll-restoration-v1_3", C = !1;
625
+ var b = "tsr-scroll-restoration-v1_3", x = !1;
643
626
  try {
644
- C = typeof window < "u" && typeof window.sessionStorage == "object";
627
+ x = typeof window < "u" && typeof window.sessionStorage == "object";
645
628
  } catch {}
646
629
  var throttle = (e, t) => {
647
630
  let n;
@@ -650,16 +633,16 @@ var throttle = (e, t) => {
650
633
  e(...r), n = null;
651
634
  }, t);
652
635
  };
653
- }, w = C ? {
636
+ }, S = x ? {
654
637
  state: JSON.parse(window.sessionStorage.getItem("tsr-scroll-restoration-v1_3") || "null") || {},
655
- set: (e) => (w.state = functionalUpdate(e, w.state) || w.state, window.sessionStorage.setItem(S, JSON.stringify(w.state)))
638
+ set: (e) => (S.state = functionalUpdate(e, S.state) || S.state, window.sessionStorage.setItem(b, JSON.stringify(S.state)))
656
639
  } : void 0, defaultGetScrollRestorationKey = (e) => e.state.key || e.href;
657
640
  function getCssSelector(e) {
658
641
  let t = [], n;
659
642
  for (; n = e.parentNode;) t.unshift(`${e.tagName}:nth-child(${[].indexOf.call(n.children, e) + 1})`), e = n;
660
643
  return `${t.join(" > ")}`.toLowerCase();
661
644
  }
662
- var T = !1;
645
+ var C = !1;
663
646
  function restoreScroll(e, t, n, r, i) {
664
647
  let a;
665
648
  try {
@@ -669,7 +652,7 @@ function restoreScroll(e, t, n, r, i) {
669
652
  return;
670
653
  }
671
654
  let o = t || window.history.state?.key, s = a[o];
672
- T = !0, (() => {
655
+ C = !0, (() => {
673
656
  if (r && s) {
674
657
  for (let e in s) {
675
658
  let t = s[e];
@@ -702,15 +685,15 @@ function restoreScroll(e, t, n, r, i) {
702
685
  behavior: n
703
686
  });
704
687
  });
705
- })(), T = !1;
688
+ })(), C = !1;
706
689
  }
707
690
  function setupScrollRestoration(e, t) {
708
691
  if ((t ?? e.options.scrollRestoration ?? !1) && (e.isScrollRestoring = !0), typeof document > "u" || e.isScrollRestorationSetup) return;
709
- e.isScrollRestorationSetup = !0, T = !1;
692
+ e.isScrollRestorationSetup = !0, C = !1;
710
693
  let n = e.options.getScrollRestorationKey || defaultGetScrollRestorationKey;
711
694
  window.history.scrollRestoration = "manual";
712
695
  let onScroll = (t) => {
713
- if (T || !e.isScrollRestoring) return;
696
+ if (C || !e.isScrollRestoring) return;
714
697
  let r = "";
715
698
  if (t.target === document || t.target === window) r = "window";
716
699
  else {
@@ -718,7 +701,7 @@ function setupScrollRestoration(e, t) {
718
701
  r = e ? `[data-scroll-restoration-id="${e}"]` : getCssSelector(t.target);
719
702
  }
720
703
  let i = n(e.state.location);
721
- w.set((e) => {
704
+ S.set((e) => {
722
705
  let t = e[i] = e[i] || {}, n = t[r] = t[r] || {};
723
706
  if (r === "window") n.scrollX = window.scrollX || 0, n.scrollY = window.scrollY || 0;
724
707
  else if (r) {
@@ -734,7 +717,7 @@ function setupScrollRestoration(e, t) {
734
717
  e.resetNextScroll = !0;
735
718
  return;
736
719
  }
737
- restoreScroll(S, r, e.options.scrollRestorationBehavior || void 0, e.isScrollRestoring || void 0, e.options.scrollToTopSelectors || void 0), e.isScrollRestoring && w.set((e) => (e[r] = e[r] || {}, e));
720
+ restoreScroll(b, r, e.options.scrollRestorationBehavior || void 0, e.isScrollRestoring || void 0, e.options.scrollToTopSelectors || void 0), e.isScrollRestoring && S.set((e) => (e[r] = e[r] || {}, e));
738
721
  });
739
722
  }
740
723
  //#endregion
@@ -764,7 +747,7 @@ function decode(e, t) {
764
747
  }
765
748
  //#endregion
766
749
  //#region ../../node_modules/.pnpm/@tanstack+router-core@1.114.25/node_modules/@tanstack/router-core/dist/esm/searchParams.js
767
- var E = parseSearchWith(JSON.parse), D = stringifySearchWith(JSON.stringify, JSON.parse);
750
+ var w = parseSearchWith(JSON.parse), T = stringifySearchWith(JSON.stringify, JSON.parse);
768
751
  function parseSearchWith(e) {
769
752
  return (t) => {
770
753
  t.substring(0, 1) === "?" && (t = t.substring(1));
@@ -799,7 +782,7 @@ function stringifySearchWith(e, t) {
799
782
  }
800
783
  //#endregion
801
784
  //#region ../../node_modules/.pnpm/@tanstack+router-core@1.114.25/node_modules/@tanstack/router-core/dist/esm/root.js
802
- var O = "__root__";
785
+ var E = "__root__";
803
786
  //#endregion
804
787
  //#region ../../node_modules/.pnpm/@tanstack+router-core@1.114.25/node_modules/@tanstack/router-core/dist/esm/redirect.js
805
788
  function redirect(e) {
@@ -1078,12 +1061,12 @@ var RouterCore = class {
1078
1061
  }, i = build(n);
1079
1062
  }
1080
1063
  }
1081
- let a = build(t, this.getMatchedRoutes(r, t));
1064
+ let a = this.getMatchedRoutes(r, t), o = build(t, a);
1082
1065
  if (i) {
1083
1066
  let e = this.getMatchedRoutes(i, n);
1084
- a.maskedLocation = build(n, e);
1067
+ o.maskedLocation = build(n, e);
1085
1068
  }
1086
- return a;
1069
+ return o;
1087
1070
  };
1088
1071
  return e.mask ? buildWithMatches(e, {
1089
1072
  ...pick(e, ["from"]),
@@ -1555,7 +1538,7 @@ var RouterCore = class {
1555
1538
  }, this.loadRouteChunk = (e) => (e._lazyPromise === void 0 && (e.lazyFn ? e._lazyPromise = e.lazyFn().then((t) => {
1556
1539
  let { id: n, ...r } = t.options;
1557
1540
  Object.assign(e.options, r);
1558
- }) : e._lazyPromise = Promise.resolve()), e._componentsPromise === void 0 && (e._componentsPromise = e._lazyPromise.then(() => Promise.all(k.map(async (t) => {
1541
+ }) : e._lazyPromise = Promise.resolve()), e._componentsPromise === void 0 && (e._componentsPromise = e._lazyPromise.then(() => Promise.all(D.map(async (t) => {
1559
1542
  let n = e.options[t];
1560
1543
  n?.preload && await n.preload();
1561
1544
  })))), e._componentsPromise), this.preloadRoute = async (e) => {
@@ -1621,8 +1604,8 @@ var RouterCore = class {
1621
1604
  ...e,
1622
1605
  caseSensitive: e.caseSensitive ?? !1,
1623
1606
  notFoundMode: e.notFoundMode ?? "fuzzy",
1624
- stringifySearch: e.stringifySearch ?? D,
1625
- parseSearch: e.parseSearch ?? E
1607
+ stringifySearch: e.stringifySearch ?? T,
1608
+ parseSearch: e.parseSearch ?? w
1626
1609
  }), typeof document < "u" && (window.__TSR_ROUTER__ = this);
1627
1610
  }
1628
1611
  get state() {
@@ -1640,7 +1623,7 @@ var RouterCore = class {
1640
1623
  let t = r[e];
1641
1624
  if (t.children) return t.id;
1642
1625
  }
1643
- return O;
1626
+ return E;
1644
1627
  }
1645
1628
  })(), s = r.map((e) => {
1646
1629
  let n, r = e.options.params?.parse ?? e.options.parseParams;
@@ -1800,29 +1783,29 @@ function validateSearch(e, t) {
1800
1783
  }
1801
1784
  return "parse" in e ? e.parse(t) : typeof e == "function" ? e(t) : {};
1802
1785
  }
1803
- var k = [
1786
+ var D = [
1804
1787
  "component",
1805
1788
  "errorComponent",
1806
1789
  "pendingComponent",
1807
1790
  "notFoundComponent"
1808
1791
  ];
1809
1792
  function routeNeedsPreload(e) {
1810
- for (let t of k) if (e.options[t]?.preload) return !0;
1793
+ for (let t of D) if (e.options[t]?.preload) return !0;
1811
1794
  return !1;
1812
1795
  }
1813
1796
  //#endregion
1814
1797
  //#region ../../node_modules/.pnpm/@tanstack+router-core@1.114.25/node_modules/@tanstack/router-core/dist/esm/link.js
1815
- var A = "Error preloading route! ☝️", BaseRoute = class {
1798
+ var O = "Error preloading route! ☝️", BaseRoute = class {
1816
1799
  constructor(e) {
1817
1800
  if (this.init = (e) => {
1818
1801
  var t;
1819
1802
  this.originalIndex = e.originalIndex;
1820
1803
  let n = this.options, r = !n?.path && !n?.id;
1821
- if (this.parentRoute = (t = this.options).getParentRoute?.call(t), r) this._path = O;
1804
+ if (this.parentRoute = (t = this.options).getParentRoute?.call(t), r) this._path = E;
1822
1805
  else if (!this.parentRoute) throw Error("Child Route instances must pass a 'getParentRoute: () => ParentRoute' option that returns a Route instance.");
1823
- let i = r ? O : n?.path;
1806
+ let i = r ? E : n?.path;
1824
1807
  i && i !== "/" && (i = trimPathLeft(i));
1825
- let a = n?.id || i, o = r ? O : joinPaths([this.parentRoute.id === "__root__" ? "" : this.parentRoute.id, a]);
1808
+ let a = n?.id || i, o = r ? E : joinPaths([this.parentRoute.id === "__root__" ? "" : this.parentRoute.id, a]);
1826
1809
  i === "__root__" && (i = "/"), o !== "__root__" && (o = joinPaths(["/", o]));
1827
1810
  let s = o === "__root__" ? "/" : joinPaths([this.parentRoute.fullPath, i]);
1828
1811
  this._path = i, this._id = o, this._fullPath = s, this._to = s, this._ssr = n?.ssr ?? e.defaultSsr ?? !0;
@@ -1972,15 +1955,15 @@ function shallow(e, t) {
1972
1955
  }
1973
1956
  //#endregion
1974
1957
  //#region ../../node_modules/.pnpm/@tanstack+react-router@1.114.27_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@tanstack/react-router/dist/esm/routerContext.js
1975
- var j = t.createContext(null);
1958
+ var k = t.createContext(null);
1976
1959
  function getRouterContext() {
1977
- return typeof document > "u" ? j : window.__TSR_ROUTER_CONTEXT__ ? window.__TSR_ROUTER_CONTEXT__ : (window.__TSR_ROUTER_CONTEXT__ = j, j);
1960
+ return typeof document > "u" ? k : window.__TSR_ROUTER_CONTEXT__ ? window.__TSR_ROUTER_CONTEXT__ : (window.__TSR_ROUTER_CONTEXT__ = k, k);
1978
1961
  }
1979
1962
  //#endregion
1980
1963
  //#region ../../node_modules/.pnpm/@tanstack+react-router@1.114.27_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@tanstack/react-router/dist/esm/useRouter.js
1981
1964
  function useRouter(e) {
1982
1965
  let n = t.useContext(getRouterContext());
1983
- return warning(!((e?.warn ?? !0) && !n), "useRouter must be used inside a <RouterProvider> component!"), n;
1966
+ return e?.warn, n;
1984
1967
  }
1985
1968
  //#endregion
1986
1969
  //#region ../../node_modules/.pnpm/@tanstack+react-router@1.114.27_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@tanstack/react-router/dist/esm/useRouterState.js
@@ -1999,11 +1982,11 @@ function useRouterState(e) {
1999
1982
  }
2000
1983
  //#endregion
2001
1984
  //#region ../../node_modules/.pnpm/@tanstack+react-router@1.114.27_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@tanstack/react-router/dist/esm/matchContext.js
2002
- var M = t.createContext(void 0), N = t.createContext(void 0);
1985
+ var A = t.createContext(void 0), j = t.createContext(void 0);
2003
1986
  //#endregion
2004
1987
  //#region ../../node_modules/.pnpm/@tanstack+react-router@1.114.27_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@tanstack/react-router/dist/esm/useMatch.js
2005
1988
  function useMatch(e) {
2006
- let n = t.useContext(e.from ? N : M);
1989
+ let n = t.useContext(e.from ? j : A);
2007
1990
  return useRouterState({
2008
1991
  select: (t) => {
2009
1992
  let r = t.matches.find((t) => e.from ? e.from === t.routeId : t.id === n);
@@ -2141,7 +2124,7 @@ function createFileRoute(e) {
2141
2124
  var FileRoute = class {
2142
2125
  constructor(e, t) {
2143
2126
  this.path = e, this.createRoute = (e) => {
2144
- warning(this.silent, "FileRoute is deprecated and will be removed in the next major version. Use the createFileRoute(path)(options) function instead.");
2127
+ this.silent;
2145
2128
  let t = createRoute(e);
2146
2129
  return t.isRoot = !1, t;
2147
2130
  }, this.silent = t?.silent;
@@ -2272,20 +2255,20 @@ function ScriptOnce({ children: e, log: t }) {
2272
2255
  function ScrollRestoration() {
2273
2256
  let e = useRouter(), t = (e.options.getScrollRestorationKey || defaultGetScrollRestorationKey)(e.latestLocation), n = t === defaultGetScrollRestorationKey(e.latestLocation) ? null : t;
2274
2257
  return !e.isScrollRestoring || !e.isServer ? null : /* @__PURE__ */ i(ScriptOnce, {
2275
- children: `(${restoreScroll.toString()})(${JSON.stringify(S)},${JSON.stringify(n)}, undefined, true)`,
2258
+ children: `(${restoreScroll.toString()})(${JSON.stringify(b)},${JSON.stringify(n)}, undefined, true)`,
2276
2259
  log: !1
2277
2260
  });
2278
2261
  }
2279
2262
  //#endregion
2280
2263
  //#region ../../node_modules/.pnpm/@tanstack+react-router@1.114.27_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@tanstack/react-router/dist/esm/Match.js
2281
- var P = t.memo(function MatchImpl({ matchId: e }) {
2264
+ var M = t.memo(function MatchImpl({ matchId: e }) {
2282
2265
  let n = useRouter(), o = useRouterState({ select: (t) => t.matches.find((t) => t.id === e)?.routeId });
2283
2266
  invariant(o, `Could not find routeId for matchId "${e}". Please file an issue!`);
2284
2267
  let s = n.routesById[o], c = s.options.pendingComponent ?? n.options.defaultPendingComponent, l = c ? /* @__PURE__ */ i(c, {}) : null, u = s.options.errorComponent ?? n.options.defaultErrorComponent, d = s.options.onCatch ?? n.options.defaultOnCatch, f = s.isRoot ? s.options.notFoundComponent ?? n.options.notFoundRoute?.options.component : s.options.notFoundComponent, p = (!s.isRoot || s.options.wrapInSuspense) && (s.options.wrapInSuspense ?? c ?? s.options.errorComponent?.preload) ? t.Suspense : SafeFragment, m = u ? CatchBoundary : SafeFragment, h = f ? CatchNotFound : SafeFragment, g = useRouterState({ select: (e) => e.loadedAt }), _ = useRouterState({ select: (t) => {
2285
2268
  let n = t.matches.findIndex((t) => t.id === e);
2286
2269
  return t.matches[n - 1]?.routeId;
2287
2270
  } });
2288
- return /* @__PURE__ */ a(r, { children: [/* @__PURE__ */ i(M.Provider, {
2271
+ return /* @__PURE__ */ a(r, { children: [/* @__PURE__ */ i(A.Provider, {
2289
2272
  value: e,
2290
2273
  children: /* @__PURE__ */ i(p, {
2291
2274
  fallback: l,
@@ -2294,14 +2277,14 @@ var P = t.memo(function MatchImpl({ matchId: e }) {
2294
2277
  errorComponent: u || ErrorComponent,
2295
2278
  onCatch: (t, n) => {
2296
2279
  if (isNotFound(t)) throw t;
2297
- warning(!1, `Error in route match: ${e}`), d?.(t, n);
2280
+ `${e}`, d?.(t, n);
2298
2281
  },
2299
2282
  children: /* @__PURE__ */ i(h, {
2300
2283
  fallback: (e) => {
2301
2284
  if (!f || e.routeId && e.routeId !== o || !e.routeId && !s.isRoot) throw e;
2302
2285
  return t.createElement(f, e);
2303
2286
  },
2304
- children: /* @__PURE__ */ i(F, { matchId: e })
2287
+ children: /* @__PURE__ */ i(N, { matchId: e })
2305
2288
  })
2306
2289
  })
2307
2290
  })
@@ -2319,7 +2302,7 @@ function OnRendered() {
2319
2302
  }
2320
2303
  }, e.state.resolvedLocation?.state.key);
2321
2304
  }
2322
- var F = t.memo(function MatchInnerImpl({ matchId: e }) {
2305
+ var N = t.memo(function MatchInnerImpl({ matchId: e }) {
2323
2306
  let n = useRouter(), { match: r, key: a, routeId: o } = useRouterState({
2324
2307
  select: (t) => {
2325
2308
  let r = t.matches.findIndex((t) => t.id === e), i = t.matches[r], a = i.routeId, o = (n.routesById[a].options.remountDeps ?? n.options.defaultRemountDeps)?.({
@@ -2341,7 +2324,7 @@ var F = t.memo(function MatchInnerImpl({ matchId: e }) {
2341
2324
  structuralSharing: !0
2342
2325
  }), s = n.routesById[o], c = t.useMemo(() => {
2343
2326
  let e = s.options.component ?? n.options.defaultComponent;
2344
- return e ? /* @__PURE__ */ i(e, {}, a) : /* @__PURE__ */ i(I, {});
2327
+ return e ? /* @__PURE__ */ i(e, {}, a) : /* @__PURE__ */ i(P, {});
2345
2328
  }, [
2346
2329
  a,
2347
2330
  s.options.component,
@@ -2376,8 +2359,8 @@ var F = t.memo(function MatchInnerImpl({ matchId: e }) {
2376
2359
  throw n.getMatch(r.id)?.loadPromise;
2377
2360
  }
2378
2361
  return c;
2379
- }), I = t.memo(function OutletImpl() {
2380
- let e = useRouter(), n = t.useContext(M), r = useRouterState({ select: (e) => e.matches.find((e) => e.id === n)?.routeId }), a = e.routesById[r], o = useRouterState({ select: (e) => {
2362
+ }), P = t.memo(function OutletImpl() {
2363
+ let e = useRouter(), n = t.useContext(A), r = useRouterState({ select: (e) => e.matches.find((e) => e.id === n)?.routeId }), a = e.routesById[r], o = useRouterState({ select: (e) => {
2381
2364
  let t = e.matches.find((e) => e.id === n);
2382
2365
  return invariant(t, `Could not find parent match for matchId "${n}"`), t.globalNotFound;
2383
2366
  } }), s = useRouterState({ select: (e) => {
@@ -2386,12 +2369,12 @@ var F = t.memo(function MatchInnerImpl({ matchId: e }) {
2386
2369
  } });
2387
2370
  if (o) return renderRouteNotFound(e, a, void 0);
2388
2371
  if (!s) return null;
2389
- let c = /* @__PURE__ */ i(P, { matchId: s }), l = e.options.defaultPendingComponent ? /* @__PURE__ */ i(e.options.defaultPendingComponent, {}) : null;
2372
+ let c = /* @__PURE__ */ i(M, { matchId: s }), l = e.options.defaultPendingComponent ? /* @__PURE__ */ i(e.options.defaultPendingComponent, {}) : null;
2390
2373
  return n === "__root__" ? /* @__PURE__ */ i(t.Suspense, {
2391
2374
  fallback: l,
2392
2375
  children: c
2393
2376
  }) : c;
2394
- }), L = typeof window < "u" ? t.useLayoutEffect : t.useEffect;
2377
+ }), F = typeof window < "u" ? t.useLayoutEffect : t.useEffect;
2395
2378
  function usePrevious(e) {
2396
2379
  let n = t.useRef({
2397
2380
  value: e,
@@ -2451,7 +2434,7 @@ function Transitioner() {
2451
2434
  }), () => {
2452
2435
  t();
2453
2436
  };
2454
- }, [e, e.history]), L(() => {
2437
+ }, [e, e.history]), F(() => {
2455
2438
  if (typeof window < "u" && e.clientSsr || n.current.router === e && n.current.mounted) return;
2456
2439
  n.current = {
2457
2440
  router: e,
@@ -2465,7 +2448,7 @@ function Transitioner() {
2465
2448
  }
2466
2449
  };
2467
2450
  tryLoad();
2468
- }, [e]), L(() => {
2451
+ }, [e]), F(() => {
2469
2452
  s && !r && e.emit({
2470
2453
  type: "onLoad",
2471
2454
  ...getLocationChangeInfo(e.state)
@@ -2474,7 +2457,7 @@ function Transitioner() {
2474
2457
  s,
2475
2458
  e,
2476
2459
  r
2477
- ]), L(() => {
2460
+ ]), F(() => {
2478
2461
  d && !u && e.emit({
2479
2462
  type: "onBeforeRouteMount",
2480
2463
  ...getLocationChangeInfo(e.state)
@@ -2483,7 +2466,7 @@ function Transitioner() {
2483
2466
  u,
2484
2467
  d,
2485
2468
  e
2486
- ]), L(() => {
2469
+ ]), F(() => {
2487
2470
  l && !c && (e.emit({
2488
2471
  type: "onResolved",
2489
2472
  ...getLocationChangeInfo(e.state)
@@ -2509,15 +2492,15 @@ function Matches() {
2509
2492
  }
2510
2493
  function MatchesInner() {
2511
2494
  let e = useRouterState({ select: (e) => e.matches[0]?.id }), t = useRouterState({ select: (e) => e.loadedAt });
2512
- return /* @__PURE__ */ i(M.Provider, {
2495
+ return /* @__PURE__ */ i(A.Provider, {
2513
2496
  value: e,
2514
2497
  children: /* @__PURE__ */ i(CatchBoundary, {
2515
2498
  getResetKey: () => t,
2516
2499
  errorComponent: ErrorComponent,
2517
2500
  onCatch: (e) => {
2518
- warning(!1, "The following error wasn't caught by any route! At the very least, consider setting an 'errorComponent' in your RootRoute!"), warning(!1, e.message || e.toString());
2501
+ e.message || e.toString();
2519
2502
  },
2520
- children: e ? /* @__PURE__ */ i(P, { matchId: e }) : null
2503
+ children: e ? /* @__PURE__ */ i(M, { matchId: e }) : null
2521
2504
  })
2522
2505
  });
2523
2506
  }
@@ -2533,7 +2516,7 @@ function useMatches(e) {
2533
2516
  //#endregion
2534
2517
  //#region ../../node_modules/.pnpm/@tanstack+react-router@1.114.27_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@tanstack/react-router/dist/esm/link.js
2535
2518
  function useLinkProps(e, n) {
2536
- let r = useRouter(), [i, a] = t.useState(!1), o = t.useRef(!1), c = useForwardedRef(n), { activeProps = () => ({ className: "active" }), inactiveProps = () => ({}), activeOptions: l, to: u, preload: d, preloadDelay: f, hashScrollIntoView: p, replace: m, startTransition: h, resetScroll: g, viewTransition: _, children: v, target: y, disabled: b, style: x, className: S, onClick: C, onFocus: w, onMouseEnter: T, onMouseLeave: E, onTouchStart: D, ignoreBlocker: O, ...k } = e, { params: j, search: M, hash: N, state: P, mask: F, reloadDocument: I, ...R } = k, z = t.useMemo(() => {
2519
+ let r = useRouter(), [i, a] = t.useState(!1), o = t.useRef(!1), c = useForwardedRef(n), { activeProps = () => ({ className: "active" }), inactiveProps = () => ({}), activeOptions: l, to: u, preload: d, preloadDelay: f, hashScrollIntoView: p, replace: m, startTransition: h, resetScroll: g, viewTransition: _, children: v, target: y, disabled: b, style: x, className: S, onClick: C, onFocus: w, onMouseEnter: T, onMouseLeave: E, onTouchStart: D, ignoreBlocker: k, ...A } = e, { params: j, search: M, hash: N, state: P, mask: I, reloadDocument: L, ...R } = A, z = t.useMemo(() => {
2537
2520
  try {
2538
2521
  return new URL(`${u}`), "external";
2539
2522
  } catch {}
@@ -2565,12 +2548,12 @@ function useLinkProps(e, n) {
2565
2548
  }) ? !1 : l?.includeHash ? e.location.hash === U.hash : !0;
2566
2549
  } }), q = t.useCallback(() => {
2567
2550
  r.preloadRoute(H).catch((e) => {
2568
- console.warn(e), console.warn(A);
2551
+ console.warn(e), console.warn(O);
2569
2552
  });
2570
2553
  }, [H, r]);
2571
2554
  if (useIntersectionObserver(c, t.useCallback((e) => {
2572
2555
  e?.isIntersecting && q();
2573
- }, [q]), { rootMargin: "100px" }, { disabled: !!b || W !== "viewport" }), L(() => {
2556
+ }, [q]), { rootMargin: "100px" }, { disabled: !!b || W !== "viewport" }), F(() => {
2574
2557
  o.current || !b && W === "render" && (q(), o.current = !0);
2575
2558
  }, [
2576
2559
  b,
@@ -2607,7 +2590,7 @@ function useLinkProps(e, n) {
2607
2590
  hashScrollIntoView: p,
2608
2591
  startTransition: h,
2609
2592
  viewTransition: _,
2610
- ignoreBlocker: O
2593
+ ignoreBlocker: k
2611
2594
  });
2612
2595
  }
2613
2596
  }, handleFocus = (e) => {
@@ -2665,7 +2648,7 @@ function useLinkProps(e, n) {
2665
2648
  ...i && { "data-transitioning": "transitioning" }
2666
2649
  };
2667
2650
  }
2668
- var R = t.forwardRef((e, n) => {
2651
+ var I = t.forwardRef((e, n) => {
2669
2652
  let { _asChild: r, ...i } = e, { type: a, ref: o, ...s } = useLinkProps(i, n), c = typeof i.children == "function" ? i.children({ isActive: s["data-status"] === "active" }) : i.children;
2670
2653
  return r === void 0 && delete s.disabled, t.createElement(r || "a", {
2671
2654
  ...s,
@@ -2707,12 +2690,4 @@ function RouterProvider({ router: e, ...t }) {
2707
2690
  });
2708
2691
  }
2709
2692
  //#endregion
2710
- //#region ../../node_modules/.pnpm/@tanstack+react-router@1.114.27_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@tanstack/react-router/dist/esm/useRouteContext.js
2711
- function useRouteContext(e) {
2712
- return useMatch({
2713
- ...e,
2714
- select: (t) => e.select ? e.select(t.context) : t.context
2715
- });
2716
- }
2717
- //#endregion
2718
- export { notFound as _, useMatches as a, createRootRouteWithContext as c, useSearch as d, useParams as f, isNotFound as g, redirect as h, R as i, Navigate as l, stripSearchParams as m, RouterProvider as n, I as o, useRouter as p, createRouter as r, createFileRoute as s, useRouteContext as t, useNavigate as u, createBrowserHistory as v, createHashHistory as y };
2693
+ export { createBrowserHistory as _, P as a, Navigate as c, useParams as d, useRouter as f, notFound as g, isNotFound as h, useMatches as i, useNavigate as l, redirect as m, createRouter as n, createFileRoute as o, stripSearchParams as p, I as r, createRootRouteWithContext as s, RouterProvider as t, useSearch as u, createHashHistory as v };