likec4 1.58.0 → 1.59.1

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 (64) 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 +23331 -10467
  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/ufo.mjs +1 -1
  40. package/dist/chunks/libs/unstorage.d.mts +1 -0
  41. package/dist/chunks/libs/which.mjs +1 -1
  42. package/dist/chunks/libs/zod.d.mts +48 -36
  43. package/dist/chunks/libs/zod.mjs +4 -4
  44. package/dist/chunks/logger.mjs +1 -0
  45. package/dist/chunks/node.mjs +57 -66
  46. package/dist/chunks/rolldown-runtime.mjs +1 -1
  47. package/dist/chunks/sequence-view.mjs +1 -1
  48. package/dist/chunks/vite-plugin.mjs +43 -43
  49. package/dist/cli/index.mjs +159 -157
  50. package/dist/index.d.mts +2 -3
  51. package/dist/index.mjs +1 -1
  52. package/dist/model/index.d.mts +5 -4
  53. package/dist/vite-plugin/index.d.mts +6 -9
  54. package/dist/vite-plugin/internal/index.d.mts +15 -10
  55. package/package.json +38 -38
  56. package/react/index.d.mts +761 -111
  57. package/react/index.mjs +13997 -10234
  58. package/__app__/src/chunks/DiagramActorProvider.mjs +0 -7638
  59. package/__app__/src/chunks/Markdown.mjs +0 -146
  60. package/__app__/src/chunks/NavigationPanel.mjs +0 -61
  61. package/__app__/src/chunks/adhoc-editor.mjs +0 -3386
  62. package/__app__/src/chunks/libs/@dagrejs/dagre.mjs +0 -1894
  63. package/__app__/src/chunks/libs/@tabler/icons-react.mjs +0 -252
  64. package/__app__/src/chunks/libs/remeda.mjs +0 -642
@@ -1,145 +1,458 @@
1
- import "./rolldown-runtime.mjs";
2
- import { a as e, f as t } from "./libs/@tanstack.mjs";
3
- import { c as n, o as r, u as i } from "./Markdown.mjs";
4
- import { n as a, t as o } from "./libs/fast-equals.mjs";
5
- import { createContext as s, useCallback as c, useContext as l, useEffect as u, useLayoutEffect as d, useRef as f, useState as p } from "react";
6
- import { c as m } from "react/compiler-runtime";
7
- import { useLikeC4Projects as h } from "likec4:projects";
1
+ import { i as o } from "./rolldown-runtime.mjs";
2
+ import { d as s, i as c } from "./libs/@tanstack.mjs";
3
+ import { st as l } from "./libs/@mantine.mjs";
4
+ import { E as u, M as d, o as f } from "./styled-system.mjs";
5
+ import { n as p, t as m } from "./libs/fast-equals.mjs";
6
+ import { b as h } from "./libs/framer.mjs";
7
+ import { n as g } from "./libs/@xstate/react.mjs";
8
+ import { createContext as _, createElement as v, forwardRef as y, useCallback as b, useContext as x, useEffect as S, useLayoutEffect as C, useMemo as w, useRef as T, useState as E, useSyncExternalStore as D } from "react";
9
+ import { c as O } from "react/compiler-runtime";
10
+ import { jsx as k } from "react/jsx-runtime";
11
+ import { useLikeC4Projects as A } from "likec4:projects";
12
+ //#region ../../node_modules/.pnpm/remeda@2.37.0/node_modules/remeda/dist/lazyDataLastImpl-DtF3cihj.js
13
+ function e$2(o, s, c) {
14
+ let r = (c) => o(c, ...s);
15
+ return c === void 0 ? r : Object.assign(r, {
16
+ lazy: c,
17
+ lazyArgs: s
18
+ });
19
+ }
20
+ o(e$2, "e");
21
+ //#endregion
22
+ //#region ../../node_modules/.pnpm/remeda@2.37.0/node_modules/remeda/dist/purry.js
23
+ function t$3(o, s, c) {
24
+ let l = o.length - s.length;
25
+ if (l === 0) return o(...s);
26
+ if (l === 1) return e$2(o, s, c);
27
+ throw Error("Wrong number of arguments");
28
+ }
29
+ o(t$3, "t");
30
+ //#endregion
31
+ //#region ../../node_modules/.pnpm/remeda@2.37.0/node_modules/remeda/dist/utilityEvaluators-Cb8x6-JZ.js
32
+ var j = {
33
+ done: !1,
34
+ hasNext: !1
35
+ }, M = /* @__PURE__ */ o((o) => ({
36
+ hasNext: !0,
37
+ next: o,
38
+ done: !1
39
+ }), "r");
40
+ //#endregion
41
+ //#region ../../node_modules/.pnpm/remeda@2.37.0/node_modules/remeda/dist/pipe.js
42
+ function t$1(o, ...s) {
43
+ let c = o, l = s.map((o) => "lazy" in o ? r$2(o) : void 0), u = 0;
44
+ for (; u < s.length;) {
45
+ if (l[u] === void 0 || !i$1(c)) {
46
+ let o = s[u];
47
+ c = o(c), u += 1;
48
+ continue;
49
+ }
50
+ let o = [];
51
+ for (let c = u; c < s.length; c++) {
52
+ let s = l[c];
53
+ if (s === void 0 || (o.push(s), s.isSingle)) break;
54
+ }
55
+ let d = [];
56
+ for (let s of c) if (n$1(s, d, o)) break;
57
+ let { isSingle: f } = o.at(-1);
58
+ c = f ? d[0] : d, u += o.length;
59
+ }
60
+ return c;
61
+ }
62
+ o(t$1, "t");
63
+ function n$1(o, s, c) {
64
+ if (c.length === 0) return s.push(o), !1;
65
+ let l = o, u = j, d = !1;
66
+ for (let [o, f] of c.entries()) {
67
+ let { index: p, items: m } = f;
68
+ if (m.push(l), u = f(l, p, m), f.index += 1, u.hasNext) {
69
+ if (u.hasMany ?? !1) {
70
+ for (let l of u.next) if (n$1(l, s, c.slice(o + 1))) return !0;
71
+ return d;
72
+ }
73
+ l = u.next;
74
+ }
75
+ if (!u.hasNext) break;
76
+ u.done && (d = !0);
77
+ }
78
+ return u.hasNext && s.push(l), d;
79
+ }
80
+ o(n$1, "n");
81
+ function r$2(o) {
82
+ let { lazy: s, lazyArgs: c } = o, l = s(...c);
83
+ return Object.assign(l, {
84
+ isSingle: s.single ?? !1,
85
+ index: 0,
86
+ items: []
87
+ });
88
+ }
89
+ o(r$2, "r");
90
+ function i$1(o) {
91
+ return typeof o == "string" || typeof o == "object" && !!o && Symbol.iterator in o;
92
+ }
93
+ o(i$1, "i");
94
+ //#endregion
95
+ //#region ../../node_modules/.pnpm/remeda@2.37.0/node_modules/remeda/dist/toSingle-1Si1O88f.js
96
+ var N = /* @__PURE__ */ o((o) => Object.assign(o, { single: !0 }), "e");
97
+ //#endregion
98
+ //#region ../../node_modules/.pnpm/remeda@2.37.0/node_modules/remeda/dist/find.js
99
+ function r$1(...o) {
100
+ return t$3(i, o, N(a));
101
+ }
102
+ o(r$1, "r");
103
+ var i = (o, s) => o.find(s), a = (o) => (s, c, l) => o(s, c, l) ? {
104
+ done: !0,
105
+ hasNext: !0,
106
+ next: s
107
+ } : j, e = (o) => typeof o == "function";
108
+ //#endregion
109
+ //#region ../../node_modules/.pnpm/remeda@2.37.0/node_modules/remeda/dist/map.js
110
+ function t(...o) {
111
+ return t$3(n, o, r);
112
+ }
113
+ var n = (o, s) => o.map(s), r = (o) => (s, c, l) => ({
114
+ done: !1,
115
+ hasNext: !0,
116
+ next: o(s, c, l)
117
+ }), P = {
118
+ outline: {
119
+ xmlns: "http://www.w3.org/2000/svg",
120
+ width: 24,
121
+ height: 24,
122
+ viewBox: "0 0 24 24",
123
+ fill: "none",
124
+ stroke: "currentColor",
125
+ strokeWidth: 2,
126
+ strokeLinecap: "round",
127
+ strokeLinejoin: "round"
128
+ },
129
+ filled: {
130
+ xmlns: "http://www.w3.org/2000/svg",
131
+ width: 24,
132
+ height: 24,
133
+ viewBox: "0 0 24 24",
134
+ fill: "currentColor",
135
+ stroke: "none"
136
+ }
137
+ }, createReactComponent = (o, s, c, l) => {
138
+ let u = y(({ color: c = "currentColor", size: u = 24, stroke: d = 2, title: f, className: p, children: m, ...h }, g) => v("svg", {
139
+ ref: g,
140
+ ...P[o],
141
+ width: u,
142
+ height: u,
143
+ className: [
144
+ "tabler-icon",
145
+ `tabler-icon-${s}`,
146
+ p
147
+ ].join(" "),
148
+ ...o === "filled" ? { fill: c } : {
149
+ strokeWidth: d,
150
+ stroke: c
151
+ },
152
+ ...h
153
+ }, [
154
+ f && v("title", { key: "svg-title" }, f),
155
+ ...l.map(([o, s]) => v(o, s)),
156
+ ...Array.isArray(m) ? m : [m]
157
+ ]));
158
+ return u.displayName = `${c}`, u;
159
+ }, F = createReactComponent("outline", "sparkles", "Sparkles", [["path", {
160
+ d: "M16 18a2 2 0 0 1 2 2a2 2 0 0 1 2 -2a2 2 0 0 1 -2 -2a2 2 0 0 1 -2 2m0 -12a2 2 0 0 1 2 2a2 2 0 0 1 2 -2a2 2 0 0 1 -2 -2a2 2 0 0 1 -2 2m-7 12a6 6 0 0 1 6 -6a6 6 0 0 1 -6 -6a6 6 0 0 1 -6 6a6 6 0 0 1 6 6",
161
+ key: "svg-0"
162
+ }]]), I = createReactComponent("filled", "player-stop-filled", "PlayerStopFilled", [["path", {
163
+ d: "M17 4h-10a3 3 0 0 0 -3 3v10a3 3 0 0 0 3 3h10a3 3 0 0 0 3 -3v-10a3 3 0 0 0 -3 -3z",
164
+ key: "svg-0"
165
+ }]]);
166
+ //#endregion
167
+ //#region ../../node_modules/.pnpm/@react-hookz+web@25.2.0_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@react-hookz/web/dist/useSyncedRef/index.js
168
+ function useSyncedRef(o) {
169
+ let s = T(o);
170
+ return s.current = o, w(() => Object.freeze({ get current() {
171
+ return s.current;
172
+ } }), []);
173
+ }
174
+ //#endregion
175
+ //#region ../../node_modules/.pnpm/@react-hookz+web@25.2.0_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@react-hookz/web/dist/util/const.js
176
+ var L = /* @__PURE__ */ o(() => {}, "noop"), R = typeof globalThis < "u" && typeof navigator < "u" && typeof document < "u", basicDepsComparator = (o, s) => {
177
+ if (o === s) return !0;
178
+ if (o.length !== s.length) return !1;
179
+ for (let [c, l] of o.entries()) if (l !== s[c]) return !1;
180
+ return !0;
181
+ };
182
+ //#endregion
183
+ //#region ../../node_modules/.pnpm/@react-hookz+web@25.2.0_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@react-hookz/web/dist/useCustomCompareEffect/index.js
184
+ function useCustomCompareEffect(o, s, c = basicDepsComparator, l = S, ...u) {
185
+ let d = T(void 0);
186
+ (d.current === void 0 || R && !c(d.current, s)) && (d.current = s), l(o, d.current, ...u);
187
+ }
188
+ //#endregion
189
+ //#region ../../node_modules/.pnpm/@react-hookz+web@25.2.0_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@react-hookz/web/dist/useFirstMountState/index.js
190
+ function useFirstMountState() {
191
+ let o = T(!0);
192
+ return S(() => {
193
+ o.current = !1;
194
+ }, []), o.current;
195
+ }
196
+ //#endregion
8
197
  //#region ../../node_modules/.pnpm/@react-hookz+web@25.2.0_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@react-hookz/web/dist/useIsomorphicLayoutEffect/index.js
9
- var g = n ? d : u, cancelTimeout = (e) => {
10
- e && clearTimeout(e);
198
+ var z = R ? C : S, cancelTimeout = (o) => {
199
+ o && clearTimeout(o);
11
200
  };
12
- function useTimeoutEffect(e, t) {
13
- let n = i(e), r = i(t), a = f(null), o = c(() => {
14
- cancelTimeout(a.current);
15
- }, []), s = c(() => {
16
- r.current !== void 0 && (o(), a.current = setTimeout(() => {
17
- n.current();
18
- }, r.current));
201
+ function useTimeoutEffect(o, s) {
202
+ let c = useSyncedRef(o), l = useSyncedRef(s), u = T(null), d = b(() => {
203
+ cancelTimeout(u.current);
204
+ }, []), f = b(() => {
205
+ l.current !== void 0 && (d(), u.current = setTimeout(() => {
206
+ c.current();
207
+ }, l.current));
19
208
  }, []);
20
- return u(() => (s(), o), [t]), [o, s];
209
+ return S(() => (f(), d), [s]), [d, f];
21
210
  }
22
211
  //#endregion
23
- //#region ../../node_modules/.pnpm/nanostores@1.3.0/node_modules/nanostores/lifecycle/index.js
24
- var _ = 5, v = 6, y = 10, on = (e, t, n, r) => (e.events = e.events || {}, e.events[n + y] || (e.events[n + y] = r((t) => {
25
- e.events[n].reduceRight((e, t) => (t(e), e), {
212
+ //#region ../diagram/src/hooks/useUpdateEffect.ts
213
+ var noop = () => {}, depsShallowEqual = (o, s) => {
214
+ if (o === s) return !0;
215
+ if (o.length !== s.length) return !1;
216
+ for (let [c, l] of o.entries()) if (!(l === s[c] || p(l, s[c]))) return !1;
217
+ return !0;
218
+ };
219
+ function useUpdateEffect(o, s, c, l) {
220
+ useCustomCompareEffect(useFirstMountState() ? noop : o, s, c ?? depsShallowEqual, l);
221
+ }
222
+ //#endregion
223
+ //#region ../../node_modules/.pnpm/nanostores@1.3.0/node_modules/nanostores/atom/index.js
224
+ var B = [], V = 0, H = 4, U = globalThis.nanostoresGlobal ||= { epoch: 0 }, atom = /* @__NO_SIDE_EFFECTS__ */ (o) => {
225
+ let s = [], c = {
226
+ get() {
227
+ return c.lc || c.listen(() => {})(), c.value;
228
+ },
229
+ init: o,
230
+ lc: 0,
231
+ listen(o) {
232
+ return c.lc = s.push(o), () => {
233
+ for (let s = V + H; s < B.length;) B[s] === o ? B.splice(s, H) : s += H;
234
+ let l = s.indexOf(o);
235
+ ~l && (s.splice(l, 1), --c.lc || c.off());
236
+ };
237
+ },
238
+ notify(o, l) {
239
+ U.epoch++;
240
+ let u = !B.length;
241
+ for (let u of s) B.push(u, c.value, o, l);
242
+ if (u) {
243
+ for (V = 0; V < B.length; V += H) B[V](B[V + 1], B[V + 2], B[V + 3]);
244
+ B.length = 0;
245
+ }
246
+ },
247
+ off() {},
248
+ set(o) {
249
+ let s = c.value;
250
+ s !== o && (c.value = o, c.notify(s));
251
+ },
252
+ subscribe(o) {
253
+ let s = c.listen(o);
254
+ return o(c.value), s;
255
+ },
256
+ value: o
257
+ };
258
+ return c;
259
+ }, W = 5, G = 6, K = 10, on = (o, s, c, l) => (o.events = o.events || {}, o.events[c + K] || (o.events[c + K] = l((s) => {
260
+ o.events[c].reduceRight((o, s) => (s(o), o), {
26
261
  shared: {},
27
- ...t
262
+ ...s
28
263
  });
29
- })), e.events[n] = e.events[n] || [], e.events[n].push(t), () => {
30
- let r = e.events[n], i = r.indexOf(t);
31
- r.splice(i, 1), r.length || (delete e.events[n], e.events[n + y](), delete e.events[n + y]);
32
- }), b = 1e3, onMount = (e, t) => {
33
- let listener = (n) => {
34
- let r = t(n);
35
- r && e.events[v].push(r);
264
+ })), o.events[c] = o.events[c] || [], o.events[c].push(s), () => {
265
+ let l = o.events[c], u = l.indexOf(s);
266
+ l.splice(u, 1), l.length || (delete o.events[c], o.events[c + K](), delete o.events[c + K]);
267
+ }), q = 1e3, onMount = (o, s) => {
268
+ let listener = (c) => {
269
+ let l = s(c);
270
+ l && o.events[G].push(l);
36
271
  };
37
- return on(e, listener, _, (t) => {
38
- let n = e.listen;
39
- e.listen = (...r) => (!e.lc && !e.active && (e.active = !0, t()), n(...r));
40
- let r = e.off;
41
- return e.events[v] = [], e.off = () => {
42
- r(), setTimeout(() => {
43
- if (e.active && !e.lc) {
44
- e.active = !1;
45
- for (let t of e.events[v]) t();
46
- e.events[v] = [];
272
+ return on(o, listener, W, (s) => {
273
+ let c = o.listen;
274
+ o.listen = (...l) => (!o.lc && !o.active && (o.active = !0, s()), c(...l));
275
+ let l = o.off;
276
+ return o.events[G] = [], o.off = () => {
277
+ l(), setTimeout(() => {
278
+ if (o.active && !o.lc) {
279
+ o.active = !1;
280
+ for (let s of o.events[G]) s();
281
+ o.events[G] = [];
47
282
  }
48
- }, b);
283
+ }, q);
49
284
  }, () => {
50
- e.listen = n, e.off = r;
285
+ o.listen = c, o.off = l;
51
286
  };
52
287
  });
53
- }, x = s(null);
54
- x.displayName = "DiagramActorSafeContext";
55
- var S = s(null);
56
- S.displayName = "DiagramApiSafeContext";
57
- var C = x.Provider, w = S.Provider;
58
- function useDiagramActorRef() {
59
- let e = l(x);
60
- if (e === null) throw Error("DiagramActorRef is not provided");
61
- return e;
288
+ };
289
+ //#endregion
290
+ //#region ../../node_modules/.pnpm/nanostores@1.3.0/node_modules/nanostores/listen-keys/index.js
291
+ function listenKeys(o, s, c) {
292
+ let l = new Set(s).add(void 0);
293
+ return o.listen((o, s, u) => {
294
+ l.has(u) && c(o, s, u);
295
+ });
62
296
  }
297
+ //#endregion
298
+ //#region ../../node_modules/.pnpm/@nanostores+react@1.1.0_nanostores@1.3.0_react@19.2.7/node_modules/@nanostores/react/index.js
299
+ var emit = (o, s) => (c) => {
300
+ o.current !== c && (o.current = c, s());
301
+ };
302
+ function useStore(o, { keys: s, deps: c = [o, s], ssr: l } = {}) {
303
+ let u = T();
304
+ u.current = o.get();
305
+ let d = b((c) => (emit(u, c)(o.value), s?.length > 0 ? listenKeys(o, s, emit(u, c)) : o.listen(emit(u, c))), c), get = () => u.current, f = get;
306
+ return l && "init" in o && (f = l === "initial" ? () => o.init : l), D(d, get, f);
307
+ }
308
+ //#endregion
309
+ //#region ../diagram/src/hooks/safeContext.tsx
310
+ var J = _(null);
311
+ J.displayName = "DiagramApiSafeContext";
312
+ var Y = J.Provider;
63
313
  function useDiagram() {
64
- let e = l(S);
65
- if (e === null) throw Error("DiagramApi is not provided");
66
- return e;
314
+ let o = x(J);
315
+ if (o === null) throw Error("DiagramApi is not provided");
316
+ return o;
317
+ }
318
+ function createSafeContextForActor(o) {
319
+ let s = _(null);
320
+ function selectSnapshot(o, s) {
321
+ return [o, s ?? p];
322
+ }
323
+ function selectContext(o, s) {
324
+ return [(s) => o(s.context), s ?? p];
325
+ }
326
+ function useActorRef() {
327
+ let c = x(s);
328
+ if (c === null) throw Error(`${o}SafeContext is not provided `);
329
+ return c;
330
+ }
331
+ function useActorSelector(o, s) {
332
+ let c, l;
333
+ return s === void 0 ? Array.isArray(o) ? [c, l] = o : (c = o, l = p) : [c, l] = [o, s], l ??= p, h(e(c), "selector must be a function"), g(useActorRef(), c, l);
334
+ }
335
+ return {
336
+ ContextProvider: s.Provider,
337
+ selectSnapshot,
338
+ selectContext,
339
+ useActorSelector,
340
+ useActorRef
341
+ };
67
342
  }
343
+ var { ContextProvider: X, selectSnapshot: Z, selectContext: ee, useActorSelector: te, useActorRef: ne } = createSafeContextForActor("DiagramActor"), Q = y((o, s) => {
344
+ let c = O(34), p, m, h, g, _, v, y, b, x;
345
+ c[0] === o ? (p = c[1], m = c[2], h = c[3], g = c[4], _ = c[5], v = c[6], y = c[7], b = c[8], x = c[9]) : ({value: x, textScale: _, uselikec4palette: v, hideIfEmpty: y, emptyText: b, className: p, style: g, fontSize: m, ...h} = o, c[0] = o, c[1] = p, c[2] = m, c[3] = h, c[4] = g, c[5] = _, c[6] = v, c[7] = y, c[8] = b, c[9] = x);
346
+ let S = _ === void 0 ? 1 : _, C = v === void 0 ? !1 : v, w = y === void 0 ? !1 : y, T = b === void 0 ? "no content" : b;
347
+ if (x.isEmpty && w) return null;
348
+ let E;
349
+ c[10] !== T || c[11] !== x.html || c[12] !== x.isMarkdown || c[13] !== x.nonEmpty || c[14] !== x.text ? (E = x.nonEmpty ? x.isMarkdown ? { dangerouslySetInnerHTML: { __html: x.html } } : { children: /* @__PURE__ */ k("p", { children: x.text }) } : { children: /* @__PURE__ */ k(l, {
350
+ component: "span",
351
+ fz: "xs",
352
+ c: "dimmed",
353
+ style: { userSelect: "none" },
354
+ children: T
355
+ }) }, c[10] = T, c[11] = x.html, c[12] = x.isMarkdown, c[13] = x.nonEmpty, c[14] = x.text, c[15] = E) : E = c[15];
356
+ let D = E, A;
357
+ c[16] !== p || c[17] !== C || c[18] !== x.isMarkdown ? (A = d(f({
358
+ uselikec4palette: C,
359
+ value: x.isMarkdown ? "markdown" : "plaintext"
360
+ }), p), c[16] = p, c[17] = C, c[18] = x.isMarkdown, c[19] = A) : A = c[19];
361
+ let j;
362
+ c[20] === m ? j = c[21] : (j = m && { "--text-fz": `var(--font-sizes-${m}, var(--font-sizes-md))` }, c[20] = m, c[21] = j);
363
+ let M;
364
+ c[22] === S ? M = c[23] : (M = S !== 1 && { "--mantine-scale": S }, c[22] = S, c[23] = M);
365
+ let N;
366
+ c[24] !== g || c[25] !== j || c[26] !== M ? (N = {
367
+ ...g,
368
+ ...j,
369
+ ...M
370
+ }, c[24] = g, c[25] = j, c[26] = M, c[27] = N) : N = c[27];
371
+ let P;
372
+ return c[28] !== D || c[29] !== h || c[30] !== s || c[31] !== A || c[32] !== N ? (P = /* @__PURE__ */ k(u, {
373
+ ...h,
374
+ ref: s,
375
+ className: A,
376
+ style: N,
377
+ ...D
378
+ }), c[28] = D, c[29] = h, c[30] = s, c[31] = A, c[32] = N, c[33] = P) : P = c[33], P;
379
+ });
380
+ Q.displayName = "Markdown";
68
381
  //#endregion
69
382
  //#region src/context/safeCtx.ts
70
- var T = s(null), E = T.Provider, useLikeC4ModelAtom = () => {
71
- let e = l(T);
72
- if (e === null) throw Error("LikeC4ModelAtom is not provided");
73
- return e;
383
+ var $ = _(null), re = $.Provider, useLikeC4ModelAtom = () => {
384
+ let o = x($);
385
+ if (o === null) throw Error("LikeC4ModelAtom is not provided");
386
+ return o;
74
387
  };
75
388
  //#endregion
76
389
  //#region src/hooks.ts
77
- function useTransparentBackground(e) {
78
- let t = m(3), n = e === void 0 ? !0 : e, t1, r;
79
- t[0] === n ? (t1 = t[1], r = t[2]) : (t1 = () => {
80
- let e = document.body.parentElement;
81
- if (!(!e || n !== !0)) return e.classList.add("transparent-bg"), () => {
82
- e.classList.remove("transparent-bg");
390
+ function useTransparentBackground(o) {
391
+ let s = O(3), c = o === void 0 ? !0 : o, t1, l;
392
+ s[0] === c ? (t1 = s[1], l = s[2]) : (t1 = () => {
393
+ let o = document.body.parentElement;
394
+ if (!(!o || c !== !0)) return o.classList.add("transparent-bg"), () => {
395
+ o.classList.remove("transparent-bg");
83
396
  };
84
- }, r = [n], t[0] = n, t[1] = t1, t[2] = r), g(t1, r);
397
+ }, l = [c], s[0] = c, s[1] = t1, s[2] = l), z(t1, l);
85
398
  }
86
399
  function useLikeC4Views() {
87
- let e = m(4), t = useLikeC4ModelAtom(), n;
88
- e[0] === Symbol.for("react.memo_cache_sentinel") ? (n = [], e[0] = n) : n = e[0];
89
- let [r, i] = p(n), t1, s;
90
- return e[1] === t ? (t1 = e[2], s = e[3]) : (t1 = () => t.subscribe((e) => {
91
- i((t) => {
92
- let n = [...e.views()].map((e) => {
93
- let n = e.$layouted, r = t.find((t) => t.id === e.id);
94
- return r && o(n, r) ? r : n;
400
+ let o = O(4), s = useLikeC4ModelAtom(), c;
401
+ o[0] === Symbol.for("react.memo_cache_sentinel") ? (c = [], o[0] = c) : c = o[0];
402
+ let [l, u] = E(c), t1, d;
403
+ return o[1] === s ? (t1 = o[2], d = o[3]) : (t1 = () => s.subscribe((o) => {
404
+ u((s) => {
405
+ let c = [...o.views()].map((o) => {
406
+ let c = o.$layouted, l = s.find((s) => s.id === o.id);
407
+ return l && m(c, l) ? l : c;
95
408
  });
96
- return a(t, n) ? t : n;
409
+ return p(s, c) ? s : c;
97
410
  });
98
- }), s = [t], e[1] = t, e[2] = t1, e[3] = s), u(t1, s), r;
411
+ }), d = [s], o[1] = s, o[2] = t1, o[3] = d), S(t1, d), l;
99
412
  }
100
413
  function useCurrentViewId() {
101
- let e = m(1), n;
102
- return e[0] === Symbol.for("react.memo_cache_sentinel") ? (n = {
414
+ let o = O(1), c;
415
+ return o[0] === Symbol.for("react.memo_cache_sentinel") ? (c = {
103
416
  select: _temp,
104
417
  strict: !1
105
- }, e[0] = n) : n = e[0], t(n) ?? "index";
418
+ }, o[0] = c) : c = o[0], s(c) ?? "index";
106
419
  }
107
- function _temp(e) {
108
- return e.viewId;
420
+ function _temp(o) {
421
+ return o.viewId;
109
422
  }
110
423
  function useCurrentView() {
111
- let e = m(13), t = useCurrentViewId(), n = useLikeC4ModelAtom(), [i, a] = p("manual"), t0;
112
- e[0] === Symbol.for("react.memo_cache_sentinel") ? (t0 = () => {
113
- a("manual");
114
- }, e[0] = t0) : t0 = e[0];
115
- let s;
116
- e[1] === t ? s = e[2] : (s = [t], e[1] = t, e[2] = s), r(t0, s);
424
+ let o = O(13), s = useCurrentViewId(), c = useLikeC4ModelAtom(), [l, u] = E("manual"), t0;
425
+ o[0] === Symbol.for("react.memo_cache_sentinel") ? (t0 = () => {
426
+ u("manual");
427
+ }, o[0] = t0) : t0 = o[0];
428
+ let d;
429
+ o[1] === s ? d = o[2] : (d = [s], o[1] = s, o[2] = d), useUpdateEffect(t0, d);
117
430
  let t2;
118
- e[3] !== n || e[4] !== t ? (t2 = () => n.get().findView(t)?.$layouted ?? null, e[3] = n, e[4] = t, e[5] = t2) : t2 = e[5];
119
- let [c, l] = p(t2), t3, d;
120
- e[6] !== n || e[7] !== i || e[8] !== t ? (t3 = () => n.subscribe((e) => {
121
- l((n) => {
122
- let r = e.findView(t);
123
- if (!r) return null;
124
- let a = i === "auto" ? r.$view : r.$layouted;
125
- return o(n, a) ? n : a;
431
+ o[3] !== c || o[4] !== s ? (t2 = () => c.get().findView(s)?.$layouted ?? null, o[3] = c, o[4] = s, o[5] = t2) : t2 = o[5];
432
+ let [f, p] = E(t2), t3, h;
433
+ o[6] !== c || o[7] !== l || o[8] !== s ? (t3 = () => c.subscribe((o, c) => {
434
+ p((c) => {
435
+ let u = o.findView(s);
436
+ if (!u) return c?.id === s ? c : null;
437
+ let d = l === "auto" ? u.$view : u.$layouted;
438
+ return m(c, d) ? c : d;
126
439
  });
127
- }), d = [
128
- n,
129
- t,
130
- i
131
- ], e[6] = n, e[7] = i, e[8] = t, e[9] = t3, e[10] = d) : (t3 = e[9], d = e[10]), u(t3, d);
132
- let f;
133
- return e[11] === c ? f = e[12] : (f = [c, a], e[11] = c, e[12] = f), f;
440
+ }), h = [
441
+ c,
442
+ s,
443
+ l
444
+ ], o[6] = c, o[7] = l, o[8] = s, o[9] = t3, o[10] = h) : (t3 = o[9], h = o[10]), S(t3, h);
445
+ let g;
446
+ return o[11] === f ? g = o[12] : (g = [f, u], o[11] = f, o[12] = g), g;
134
447
  }
135
448
  function useCurrentProject() {
136
- let t = m(4), n = h(), r;
137
- t[0] === Symbol.for("react.memo_cache_sentinel") ? (r = { select: selectProjectIdFromContext }, t[0] = r) : r = t[0];
138
- let i = e(r), a;
139
- return t[1] !== i || t[2] !== n ? (a = i && n.find((e) => e.id === i) || n[0], t[1] = i, t[2] = n, t[3] = a) : a = t[3], a;
449
+ let o = O(4), s = A(), l;
450
+ o[0] === Symbol.for("react.memo_cache_sentinel") ? (l = { select: selectProjectIdFromContext }, o[0] = l) : l = o[0];
451
+ let u = c(l), d;
452
+ return o[1] !== u || o[2] !== s ? (d = u && s.find((o) => o.id === u) || s[0], o[1] = u, o[2] = s, o[3] = d) : d = o[3], d;
140
453
  }
141
- function selectProjectIdFromContext(e) {
142
- return e.find((e) => e.routeId === "/project/$projectId")?.params?.projectId ?? e.at(-1)?.context.projectId ?? void 0;
454
+ function selectProjectIdFromContext(o) {
455
+ return o.find((o) => o.routeId === "/project/$projectId")?.params?.projectId ?? o.at(-1)?.context.projectId ?? void 0;
143
456
  }
144
457
  //#endregion
145
- export { useTransparentBackground as a, C as c, useDiagramActorRef as d, onMount as f, useLikeC4Views as i, w as l, useCurrentView as n, E as o, useTimeoutEffect as p, useCurrentViewId as r, useLikeC4ModelAtom as s, useCurrentProject as t, useDiagram as u };
458
+ export { createReactComponent as A, useTimeoutEffect as C, useSyncedRef as D, L as E, t$1 as F, M as I, j as L, e as M, r$1 as N, I as O, N as P, t$3 as R, useUpdateEffect as S, R as T, useStore as _, useTransparentBackground as a, U as b, Q as c, createSafeContextForActor as d, ee as f, te as g, ne as h, useLikeC4Views as i, t as j, F as k, X as l, useDiagram as m, useCurrentView as n, re as o, Z as p, useCurrentViewId as r, useLikeC4ModelAtom as s, useCurrentProject as t, Y as u, onMount as v, useFirstMountState as w, depsShallowEqual as x, atom as y, e$2 as z };
@@ -106,7 +106,7 @@ var c = [
106
106
  "right",
107
107
  "bottom",
108
108
  "left"
109
- ], l = ["start", "end"], u = /* @__PURE__ */ c.reduce((e, t) => e.concat(t, t + "-" + l[0], t + "-" + l[1]), []), d = Math.min, f = Math.max, p = Math.round, m = Math.floor, createCoords = (e) => ({
109
+ ], l = ["start", "end"], u = /*#__PURE__*/ c.reduce((e, t) => e.concat(t, t + "-" + l[0], t + "-" + l[1]), []), d = Math.min, f = Math.max, p = Math.round, m = Math.floor, createCoords = (e) => ({
110
110
  x: e,
111
111
  y: e
112
112
  }), h = {
@@ -644,7 +644,7 @@ var j = /* @__PURE__ */ e(function(e) {
644
644
  return i.reference.x !== g.reference.x || i.reference.y !== g.reference.y || i.reference.width !== g.reference.width || i.reference.height !== g.reference.height ? { reset: { rects: g } } : {};
645
645
  }
646
646
  };
647
- }, "inline"), M = /* @__PURE__ */ new Set(["left", "top"]);
647
+ }, "inline"), M = /*#__PURE__*/ new Set(["left", "top"]);
648
648
  async function convertValueToCoords(e, t) {
649
649
  let { placement: n, platform: r, elements: i } = e, a = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), o = getSide(n), s = getAlignment(n), c = getSideAxis(n) === "y", l = M.has(o) ? -1 : 1, u = a && c ? -1 : 1, d = evaluate(t, e), { mainAxis: f, crossAxis: p, alignmentAxis: m } = typeof d == "number" ? {
650
650
  mainAxis: d,
@@ -795,7 +795,7 @@ function getScale(e) {
795
795
  y: s
796
796
  };
797
797
  }
798
- var te = /* @__PURE__ */ createCoords(0);
798
+ var te = /*#__PURE__*/ createCoords(0);
799
799
  function getVisualOffsets(e) {
800
800
  let t = getWindow(e);
801
801
  return !isWebKit() || !t.visualViewport ? te : {
@@ -1361,14 +1361,14 @@ function createEventEmitter() {
1361
1361
  }
1362
1362
  };
1363
1363
  }
1364
- var Z = /* @__PURE__ */ t.createContext(null), fe = /* @__PURE__ */ t.createContext(null), useFloatingParentNodeId = () => t.useContext(Z)?.id || null, useFloatingTree = () => t.useContext(fe);
1364
+ var Z = /*#__PURE__*/ t.createContext(null), fe = /*#__PURE__*/ t.createContext(null), useFloatingParentNodeId = () => t.useContext(Z)?.id || null, useFloatingTree = () => t.useContext(fe);
1365
1365
  function createAttribute(e) {
1366
1366
  return "data-floating-ui-" + e;
1367
1367
  }
1368
1368
  function clearTimeoutIfSet(e) {
1369
1369
  e.current !== -1 && (clearTimeout(e.current), e.current = -1);
1370
1370
  }
1371
- var Q = /* @__PURE__ */ createAttribute("safe-polygon");
1371
+ var Q = /*#__PURE__*/ createAttribute("safe-polygon");
1372
1372
  function getDelay(e, t, n) {
1373
1373
  if (n && !isMouseLikePointerType(n)) return 0;
1374
1374
  if (typeof e == "number") return e;
@@ -1561,7 +1561,7 @@ function useHover(e, n) {
1561
1561
  ]);
1562
1562
  return t.useMemo(() => c ? { reference: P } : {}, [c, P]);
1563
1563
  }
1564
- var NOOP = () => {}, $ = /* @__PURE__ */ t.createContext({
1564
+ var NOOP = () => {}, $ = /*#__PURE__*/ t.createContext({
1565
1565
  delay: 0,
1566
1566
  initialDelay: 0,
1567
1567
  timeoutMs: 0,
@@ -1585,7 +1585,7 @@ function FloatingDelayGroup(e) {
1585
1585
  }, []);
1586
1586
  return S(() => {
1587
1587
  o.currentId ? c.current === null ? c.current = o.currentId : o.isInstantPhase || s({ isInstantPhase: !0 }) : (o.isInstantPhase && s({ isInstantPhase: !1 }), c.current = null);
1588
- }, [o.currentId, o.isInstantPhase]), /* @__PURE__ */ r($.Provider, {
1588
+ }, [o.currentId, o.isInstantPhase]), /*#__PURE__*/ r($.Provider, {
1589
1589
  value: t.useMemo(() => ({
1590
1590
  ...o,
1591
1591
  setState: s,
@@ -2035,7 +2035,7 @@ function useInteractions(e) {
2035
2035
  s
2036
2036
  ]);
2037
2037
  }
2038
- var he = /* @__PURE__ */ new Map([
2038
+ var he = /*#__PURE__*/ new Map([
2039
2039
  ["select", "listbox"],
2040
2040
  ["combobox", "listbox"],
2041
2041
  ["label", !1]