likec4 1.59.2 → 1.59.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/__app__/src/chunks/AIChat.mjs +118 -123
- package/__app__/src/chunks/LikeC4Styles.mjs +828 -686
- package/__app__/src/chunks/ProjectsOverview.mjs +82 -82
- package/__app__/src/chunks/es.mjs +1 -1
- package/__app__/src/chunks/hooks.mjs +164 -135
- package/__app__/src/chunks/libs/@floating-ui.mjs +649 -335
- package/__app__/src/chunks/libs/@mantine.mjs +2934 -2040
- package/__app__/src/chunks/libs/@tanstack-ai.mjs +28 -28
- package/__app__/src/chunks/libs/@tanstack.mjs +46 -51
- package/__app__/src/chunks/libs/@xstate/react.mjs +59 -40
- package/__app__/src/chunks/libs/@xyflow/react.mjs +535 -448
- package/__app__/src/chunks/libs/bezier-js.mjs +10 -9
- package/__app__/src/chunks/libs/d3.mjs +20 -45
- package/__app__/src/chunks/libs/fast-equals.mjs +62 -50
- package/__app__/src/chunks/libs/framer.mjs +300 -279
- package/__app__/src/chunks/libs/zod.mjs +17 -14
- package/__app__/src/chunks/rolldown-runtime.mjs +2 -2
- package/__app__/src/chunks/styled-system.mjs +2580 -132
- package/__app__/src/main.mjs +24925 -23485
- package/__app__/src/style.css +1 -1
- package/config/schema.json +49 -0
- package/dist/app/render-view-client.css +1 -0
- package/dist/app/render-view-client.js +739 -0
- package/dist/chunks/enableServer.mjs +1 -1
- package/dist/chunks/filenames.mjs +7 -6
- package/dist/chunks/index.d.mts +18 -1
- package/dist/chunks/index2.d.mts +79 -26
- package/dist/chunks/libs/@chevrotain/gast.mjs +1 -1
- package/dist/chunks/libs/@chevrotain/regexp-to-ast.mjs +5 -5
- package/dist/chunks/libs/@chevrotain/types.d.mts +108 -0
- package/dist/chunks/libs/@logtape/logtape.mjs +4 -4
- package/dist/chunks/libs/@lume/kiwi.mjs +1 -1
- package/dist/chunks/libs/birpc.mjs +1 -1
- package/dist/chunks/libs/chevrotain-allstar.mjs +1 -1
- package/dist/chunks/libs/chevrotain.mjs +16 -16
- package/dist/chunks/libs/json5.mjs +3 -3
- package/dist/chunks/libs/langium.d.mts +1777 -16
- package/dist/chunks/libs/langium.mjs +11 -11
- package/dist/chunks/libs/merge-error-cause.mjs +2 -2
- package/dist/chunks/libs/p-queue.mjs +1 -1
- package/dist/chunks/libs/package-manager-detector.mjs +1 -1
- package/dist/chunks/libs/pako.mjs +2 -2
- package/dist/chunks/libs/picomatch.mjs +1 -1
- package/dist/chunks/libs/pretty-ms.mjs +1 -1
- package/dist/chunks/libs/remeda.mjs +1 -1
- package/dist/chunks/libs/ufo.mjs +1 -1
- package/dist/chunks/libs/unstorage.mjs +1 -1
- package/dist/chunks/libs/zod.d.mts +1717 -17
- package/dist/chunks/libs/zod.mjs +4 -4
- package/dist/chunks/node.mjs +68 -57
- package/dist/chunks/rolldown-runtime.mjs +1 -1
- package/dist/chunks/sequence-view.mjs +1 -1
- package/dist/chunks/vite-plugin.mjs +168 -54
- package/dist/cli/index.d.mts +1 -1
- package/dist/cli/index.mjs +291 -165
- package/dist/config/index.d.mts +7 -1
- package/dist/config/index.mjs +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +1 -1
- package/dist/model/index.d.mts +4 -4
- package/dist/vite-plugin/index.d.mts +2 -2
- package/dist/vite-plugin/internal/index.d.mts +72 -35
- package/dist/vite-plugin/internal/index.mjs +125 -44
- package/package.json +47 -47
- package/react/index.d.mts +22767 -1432
- package/react/index.mjs +38152 -32309
- package/vite-plugin-modules.d.ts +21 -1
- package/dist/chunks/dist.mjs +0 -10
- package/dist/chunks/logger.mjs +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { i as o } from "./rolldown-runtime.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { i as s, u as c } from "./libs/@tanstack.mjs";
|
|
3
|
+
import { ut as l } from "./libs/@mantine.mjs";
|
|
4
|
+
import { I as u, k as d, o as f } from "./styled-system.mjs";
|
|
5
5
|
import { n as p, t as m } from "./libs/fast-equals.mjs";
|
|
6
6
|
import { b as h } from "./libs/framer.mjs";
|
|
7
7
|
import { n as g } from "./libs/@xstate/react.mjs";
|
|
8
|
-
import { createContext as _, createElement as v, forwardRef as y,
|
|
9
|
-
import { c as
|
|
10
|
-
import { jsx as
|
|
11
|
-
import { useLikeC4Projects as
|
|
12
|
-
//#region ../../node_modules/.pnpm/remeda@2.
|
|
8
|
+
import { createContext as _, createElement as v, forwardRef as y, use as b, useCallback as x, useContext as S, useEffect as C, useLayoutEffect as w, useMemo as T, useRef as E, useState as D, useSyncExternalStore as O } from "react";
|
|
9
|
+
import { c as k } from "react/compiler-runtime";
|
|
10
|
+
import { jsx as A } from "react/jsx-runtime";
|
|
11
|
+
import { useLikeC4Projects as j } from "likec4:projects";
|
|
12
|
+
//#region ../../node_modules/.pnpm/remeda@2.45.0/node_modules/remeda/dist/lazyDataLastImpl--3B10z3s.js
|
|
13
13
|
function e$2(o, s, c) {
|
|
14
14
|
let r = (c) => o(c, ...s);
|
|
15
15
|
return c === void 0 ? r : Object.assign(r, {
|
|
@@ -19,7 +19,7 @@ function e$2(o, s, c) {
|
|
|
19
19
|
}
|
|
20
20
|
o(e$2, "e");
|
|
21
21
|
//#endregion
|
|
22
|
-
//#region ../../node_modules/.pnpm/remeda@2.
|
|
22
|
+
//#region ../../node_modules/.pnpm/remeda@2.45.0/node_modules/remeda/dist/purry.js
|
|
23
23
|
function t$3(o, s, c) {
|
|
24
24
|
let l = o.length - s.length;
|
|
25
25
|
if (l === 0) return o(...s);
|
|
@@ -28,85 +28,84 @@ function t$3(o, s, c) {
|
|
|
28
28
|
}
|
|
29
29
|
o(t$3, "t");
|
|
30
30
|
//#endregion
|
|
31
|
-
//#region ../../node_modules/.pnpm/remeda@2.
|
|
32
|
-
var
|
|
31
|
+
//#region ../../node_modules/.pnpm/remeda@2.45.0/node_modules/remeda/dist/utilityEvaluators-IxVD3t2o.js
|
|
32
|
+
var M = {
|
|
33
33
|
done: !1,
|
|
34
34
|
hasNext: !1
|
|
35
|
-
},
|
|
35
|
+
}, N = /* @__PURE__ */ o((o) => ({
|
|
36
36
|
hasNext: !0,
|
|
37
37
|
next: o,
|
|
38
38
|
done: !1
|
|
39
39
|
}), "r");
|
|
40
40
|
//#endregion
|
|
41
|
-
//#region ../../node_modules/.pnpm/remeda@2.
|
|
41
|
+
//#region ../../node_modules/.pnpm/remeda@2.45.0/node_modules/remeda/dist/pipe.js
|
|
42
42
|
function t$1(o, ...s) {
|
|
43
|
-
let c = o, l = s.map((o) => "lazy" in o ?
|
|
43
|
+
let c = o, l = s.map((o) => "lazy" in o ? {
|
|
44
|
+
lazyEvaluator: o.lazy(...o.lazyArgs),
|
|
45
|
+
isSingle: o.lazy.single ?? !1,
|
|
46
|
+
index: 0,
|
|
47
|
+
items: []
|
|
48
|
+
} : void 0), u = 0;
|
|
44
49
|
for (; u < s.length;) {
|
|
45
|
-
if (l[u] === void 0 || !
|
|
50
|
+
if (l[u] === void 0 || !a$1(c)) {
|
|
46
51
|
let o = s[u];
|
|
47
52
|
c = o(c), u += 1;
|
|
48
53
|
continue;
|
|
49
54
|
}
|
|
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);
|
|
55
|
+
let o = n$1(l, u), d = r$2(c, o), { isSingle: f } = o.at(-1);
|
|
58
56
|
c = f ? d[0] : d, u += o.length;
|
|
59
57
|
}
|
|
60
58
|
return c;
|
|
61
59
|
}
|
|
62
60
|
o(t$1, "t");
|
|
63
|
-
function n$1(o, s
|
|
64
|
-
|
|
65
|
-
let l =
|
|
66
|
-
|
|
67
|
-
|
|
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);
|
|
61
|
+
function n$1(o, s) {
|
|
62
|
+
let c = [];
|
|
63
|
+
for (let l = s; l < o.length; l++) {
|
|
64
|
+
let s = o[l];
|
|
65
|
+
if (s === void 0 || (c.push(s), s.isSingle)) break;
|
|
77
66
|
}
|
|
78
|
-
return
|
|
67
|
+
return c;
|
|
79
68
|
}
|
|
80
69
|
o(n$1, "n");
|
|
81
|
-
function r$2(o) {
|
|
82
|
-
let
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
index: 0,
|
|
86
|
-
items: []
|
|
87
|
-
});
|
|
70
|
+
function r$2(o, s) {
|
|
71
|
+
let c = [];
|
|
72
|
+
for (let l of o) if (i$1(l, c, s)) break;
|
|
73
|
+
return c;
|
|
88
74
|
}
|
|
89
75
|
o(r$2, "r");
|
|
90
|
-
function i$1(o) {
|
|
91
|
-
|
|
76
|
+
function i$1(o, s, c) {
|
|
77
|
+
if (c.length === 0) return s.push(o), !1;
|
|
78
|
+
let l = o, u = M, d = !1;
|
|
79
|
+
for (let [o, { items: f, lazyEvaluator: p }] of c.entries()) if (f.push(l), u = p(l, f.length - 1, f), u.done && (d = !0), u.hasNext) {
|
|
80
|
+
if (u.hasMany ?? !1) {
|
|
81
|
+
for (let l of u.next) if (i$1(l, s, c.slice(o + 1))) return !0;
|
|
82
|
+
return d;
|
|
83
|
+
}
|
|
84
|
+
l = u.next;
|
|
85
|
+
} else break;
|
|
86
|
+
return u.hasNext && s.push(l), d;
|
|
92
87
|
}
|
|
93
88
|
o(i$1, "i");
|
|
89
|
+
function a$1(o) {
|
|
90
|
+
return typeof o == "string" || typeof o == "object" && !!o && Symbol.iterator in o;
|
|
91
|
+
}
|
|
92
|
+
o(a$1, "a");
|
|
94
93
|
//#endregion
|
|
95
|
-
//#region ../../node_modules/.pnpm/remeda@2.
|
|
96
|
-
var
|
|
94
|
+
//#region ../../node_modules/.pnpm/remeda@2.45.0/node_modules/remeda/dist/toSingle-DiQSixar.js
|
|
95
|
+
var P = /* @__PURE__ */ o((o) => Object.assign(o, { single: !0 }), "e");
|
|
97
96
|
//#endregion
|
|
98
|
-
//#region ../../node_modules/.pnpm/remeda@2.
|
|
97
|
+
//#region ../../node_modules/.pnpm/remeda@2.45.0/node_modules/remeda/dist/find.js
|
|
99
98
|
function r$1(...o) {
|
|
100
|
-
return t$3(i, o,
|
|
99
|
+
return t$3(i, o, P(a));
|
|
101
100
|
}
|
|
102
101
|
o(r$1, "r");
|
|
103
102
|
var i = (o, s) => o.find(s), a = (o) => (s, c, l) => o(s, c, l) ? {
|
|
104
103
|
done: !0,
|
|
105
104
|
hasNext: !0,
|
|
106
105
|
next: s
|
|
107
|
-
} :
|
|
106
|
+
} : M, e = (o) => typeof o == "function";
|
|
108
107
|
//#endregion
|
|
109
|
-
//#region ../../node_modules/.pnpm/remeda@2.
|
|
108
|
+
//#region ../../node_modules/.pnpm/remeda@2.45.0/node_modules/remeda/dist/map.js
|
|
110
109
|
function t(...o) {
|
|
111
110
|
return t$3(n, o, r);
|
|
112
111
|
}
|
|
@@ -114,7 +113,7 @@ var n = (o, s) => o.map(s), r = (o) => (s, c, l) => ({
|
|
|
114
113
|
done: !1,
|
|
115
114
|
hasNext: !0,
|
|
116
115
|
next: o(s, c, l)
|
|
117
|
-
}),
|
|
116
|
+
}), F = {
|
|
118
117
|
outline: {
|
|
119
118
|
xmlns: "http://www.w3.org/2000/svg",
|
|
120
119
|
width: 24,
|
|
@@ -137,7 +136,7 @@ var n = (o, s) => o.map(s), r = (o) => (s, c, l) => ({
|
|
|
137
136
|
}, createReactComponent = (o, s, c, l) => {
|
|
138
137
|
let u = y(({ color: c = "currentColor", size: u = 24, stroke: d = 2, title: f, className: p, children: m, ...h }, g) => v("svg", {
|
|
139
138
|
ref: g,
|
|
140
|
-
...
|
|
139
|
+
...F[o],
|
|
141
140
|
width: u,
|
|
142
141
|
height: u,
|
|
143
142
|
className: [
|
|
@@ -156,57 +155,57 @@ var n = (o, s) => o.map(s), r = (o) => (s, c, l) => ({
|
|
|
156
155
|
...Array.isArray(m) ? m : [m]
|
|
157
156
|
]));
|
|
158
157
|
return u.displayName = `${c}`, u;
|
|
159
|
-
},
|
|
158
|
+
}, I = createReactComponent("outline", "sparkles", "Sparkles", [["path", {
|
|
160
159
|
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
160
|
key: "svg-0"
|
|
162
|
-
}]]),
|
|
161
|
+
}]]), L = createReactComponent("filled", "player-stop-filled", "PlayerStopFilled", [["path", {
|
|
163
162
|
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
163
|
key: "svg-0"
|
|
165
164
|
}]]);
|
|
166
165
|
//#endregion
|
|
167
|
-
//#region ../../node_modules/.pnpm/@react-hookz+web@25.2.0_react-dom@19.2.
|
|
166
|
+
//#region ../../node_modules/.pnpm/@react-hookz+web@25.2.0_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@react-hookz/web/dist/useSyncedRef/index.js
|
|
168
167
|
function useSyncedRef(o) {
|
|
169
|
-
let s =
|
|
170
|
-
return s.current = o,
|
|
168
|
+
let s = E(o);
|
|
169
|
+
return s.current = o, T(() => Object.freeze({ get current() {
|
|
171
170
|
return s.current;
|
|
172
171
|
} }), []);
|
|
173
172
|
}
|
|
174
173
|
//#endregion
|
|
175
|
-
//#region ../../node_modules/.pnpm/@react-hookz+web@25.2.0_react-dom@19.2.
|
|
176
|
-
var
|
|
174
|
+
//#region ../../node_modules/.pnpm/@react-hookz+web@25.2.0_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@react-hookz/web/dist/util/const.js
|
|
175
|
+
var R = /* @__PURE__ */ o(() => {}, "noop"), z = typeof globalThis < "u" && typeof navigator < "u" && typeof document < "u", basicDepsComparator = (o, s) => {
|
|
177
176
|
if (o === s) return !0;
|
|
178
177
|
if (o.length !== s.length) return !1;
|
|
179
178
|
for (let [c, l] of o.entries()) if (l !== s[c]) return !1;
|
|
180
179
|
return !0;
|
|
181
180
|
};
|
|
182
181
|
//#endregion
|
|
183
|
-
//#region ../../node_modules/.pnpm/@react-hookz+web@25.2.0_react-dom@19.2.
|
|
184
|
-
function useCustomCompareEffect(o, s, c = basicDepsComparator, l =
|
|
185
|
-
let d =
|
|
186
|
-
(d.current === void 0 ||
|
|
182
|
+
//#region ../../node_modules/.pnpm/@react-hookz+web@25.2.0_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@react-hookz/web/dist/useCustomCompareEffect/index.js
|
|
183
|
+
function useCustomCompareEffect(o, s, c = basicDepsComparator, l = C, ...u) {
|
|
184
|
+
let d = E(void 0);
|
|
185
|
+
(d.current === void 0 || z && !c(d.current, s)) && (d.current = s), l(o, d.current, ...u);
|
|
187
186
|
}
|
|
188
187
|
//#endregion
|
|
189
|
-
//#region ../../node_modules/.pnpm/@react-hookz+web@25.2.0_react-dom@19.2.
|
|
188
|
+
//#region ../../node_modules/.pnpm/@react-hookz+web@25.2.0_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@react-hookz/web/dist/useFirstMountState/index.js
|
|
190
189
|
function useFirstMountState() {
|
|
191
|
-
let o =
|
|
192
|
-
return
|
|
190
|
+
let o = E(!0);
|
|
191
|
+
return C(() => {
|
|
193
192
|
o.current = !1;
|
|
194
193
|
}, []), o.current;
|
|
195
194
|
}
|
|
196
195
|
//#endregion
|
|
197
|
-
//#region ../../node_modules/.pnpm/@react-hookz+web@25.2.0_react-dom@19.2.
|
|
198
|
-
var
|
|
196
|
+
//#region ../../node_modules/.pnpm/@react-hookz+web@25.2.0_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@react-hookz/web/dist/useIsomorphicLayoutEffect/index.js
|
|
197
|
+
var B = z ? w : C, cancelTimeout = (o) => {
|
|
199
198
|
o && clearTimeout(o);
|
|
200
199
|
};
|
|
201
200
|
function useTimeoutEffect(o, s) {
|
|
202
|
-
let c = useSyncedRef(o), l = useSyncedRef(s), u =
|
|
201
|
+
let c = useSyncedRef(o), l = useSyncedRef(s), u = E(null), d = x(() => {
|
|
203
202
|
cancelTimeout(u.current);
|
|
204
|
-
}, []), f =
|
|
203
|
+
}, []), f = x(() => {
|
|
205
204
|
l.current !== void 0 && (d(), u.current = setTimeout(() => {
|
|
206
205
|
c.current();
|
|
207
206
|
}, l.current));
|
|
208
207
|
}, []);
|
|
209
|
-
return
|
|
208
|
+
return C(() => (f(), d), [s]), [d, f];
|
|
210
209
|
}
|
|
211
210
|
//#endregion
|
|
212
211
|
//#region ../diagram/src/hooks/useUpdateEffect.ts
|
|
@@ -220,9 +219,21 @@ function useUpdateEffect(o, s, c, l) {
|
|
|
220
219
|
useCustomCompareEffect(useFirstMountState() ? noop : o, s, c ?? depsShallowEqual, l);
|
|
221
220
|
}
|
|
222
221
|
//#endregion
|
|
223
|
-
//#region ../../node_modules/.pnpm/nanostores@1.3
|
|
224
|
-
var
|
|
222
|
+
//#region ../../node_modules/.pnpm/nanostores@1.5.3/node_modules/nanostores/atom/index.js
|
|
223
|
+
var V = [], H = 0, U = null, W = 4, G = globalThis.nanostoresGlobal ||= { epoch: 0 }, drainQueue = () => {
|
|
224
|
+
let o, s;
|
|
225
|
+
for (; H < V.length;) {
|
|
226
|
+
s = H, H += W;
|
|
227
|
+
try {
|
|
228
|
+
V[s](V[s + 1].value, V[s + 2], V[s + 3]);
|
|
229
|
+
} catch (s) {
|
|
230
|
+
o = s;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
if (V.length = H = 0, o) throw o;
|
|
234
|
+
}, atom = /* @__NO_SIDE_EFFECTS__ */ (o) => {
|
|
225
235
|
let s = [], c = {
|
|
236
|
+
eq: Object.is,
|
|
226
237
|
get() {
|
|
227
238
|
return c.lc || c.listen(() => {})(), c.value;
|
|
228
239
|
},
|
|
@@ -230,24 +241,21 @@ var B = [], V = 0, H = 4, U = globalThis.nanostoresGlobal ||= { epoch: 0 }, atom
|
|
|
230
241
|
lc: 0,
|
|
231
242
|
listen(o) {
|
|
232
243
|
return c.lc = s.push(o), () => {
|
|
233
|
-
for (let s =
|
|
244
|
+
for (let s = H; s < V.length;) V[s] === o ? V.splice(s, W) : s += W;
|
|
234
245
|
let l = s.indexOf(o);
|
|
235
246
|
~l && (s.splice(l, 1), --c.lc || c.off());
|
|
236
247
|
};
|
|
237
248
|
},
|
|
238
249
|
notify(o, l) {
|
|
239
|
-
|
|
240
|
-
let u = !
|
|
241
|
-
for (let u of s)
|
|
242
|
-
|
|
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
|
-
}
|
|
250
|
+
G.epoch++;
|
|
251
|
+
let u = !V.length && !0;
|
|
252
|
+
for (let u of s) U?.has(u) || (U?.add(u), V.push(u, c, o, l));
|
|
253
|
+
u && drainQueue();
|
|
246
254
|
},
|
|
247
255
|
off() {},
|
|
248
256
|
set(o) {
|
|
249
257
|
let s = c.value;
|
|
250
|
-
s
|
|
258
|
+
c.eq(s, o) || (c.value = o, c.notify(s));
|
|
251
259
|
},
|
|
252
260
|
subscribe(o) {
|
|
253
261
|
let s = c.listen(o);
|
|
@@ -256,62 +264,83 @@ var B = [], V = 0, H = 4, U = globalThis.nanostoresGlobal ||= { epoch: 0 }, atom
|
|
|
256
264
|
value: o
|
|
257
265
|
};
|
|
258
266
|
return c;
|
|
259
|
-
},
|
|
267
|
+
}, K = 5, q = 6, J = 10, on = (o, s, c, l) => (o.events = o.events || {}, o.events[c + J] || (o.events[c + J] = l((s) => {
|
|
260
268
|
o.events[c].reduceRight((o, s) => (s(o), o), {
|
|
261
269
|
shared: {},
|
|
262
270
|
...s
|
|
263
271
|
});
|
|
264
272
|
})), o.events[c] = o.events[c] || [], o.events[c].push(s), () => {
|
|
265
273
|
let l = o.events[c], u = l.indexOf(s);
|
|
266
|
-
l.splice(u, 1), l.length || (
|
|
267
|
-
}),
|
|
274
|
+
~u && (l.splice(u, 1), l.length || (o.events[c + J](), delete o.events[c + J]));
|
|
275
|
+
}), Y = 1e3, onMount = (o, s) => {
|
|
268
276
|
let listener = (c) => {
|
|
269
277
|
let l = s(c);
|
|
270
|
-
l && o.events[
|
|
278
|
+
l && o.events[q].push(l);
|
|
271
279
|
};
|
|
272
|
-
return on(o, listener,
|
|
280
|
+
return on(o, listener, K, (s) => {
|
|
273
281
|
let c = o.listen;
|
|
274
282
|
o.listen = (...l) => (!o.lc && !o.active && (o.active = !0, s()), c(...l));
|
|
275
283
|
let l = o.off;
|
|
276
|
-
return o.events[
|
|
284
|
+
return o.events[q] = [], o.off = () => {
|
|
277
285
|
l(), setTimeout(() => {
|
|
278
286
|
if (o.active && !o.lc) {
|
|
279
287
|
o.active = !1;
|
|
280
|
-
for (let s of o.events[
|
|
281
|
-
o.events[
|
|
288
|
+
for (let s of o.events[q]) s();
|
|
289
|
+
o.events[q] = [];
|
|
282
290
|
}
|
|
283
|
-
},
|
|
291
|
+
}, Y);
|
|
284
292
|
}, () => {
|
|
285
293
|
o.listen = c, o.off = l;
|
|
286
294
|
};
|
|
287
295
|
});
|
|
288
296
|
};
|
|
289
297
|
//#endregion
|
|
290
|
-
//#region ../../node_modules/.pnpm/nanostores@1.3
|
|
298
|
+
//#region ../../node_modules/.pnpm/nanostores@1.5.3/node_modules/nanostores/deep-map/path.js
|
|
299
|
+
function getPath(o, s) {
|
|
300
|
+
let c = getAllKeysFromPath(s), l = o;
|
|
301
|
+
for (let o of c) {
|
|
302
|
+
if (l == null) return;
|
|
303
|
+
l = l[o];
|
|
304
|
+
}
|
|
305
|
+
return l;
|
|
306
|
+
}
|
|
307
|
+
var X = /(.*)\[(\d+)\]/;
|
|
308
|
+
function getAllKeysFromPath(o) {
|
|
309
|
+
return o.split(".").flatMap((o) => getKeyAndIndicesFromKey(o));
|
|
310
|
+
}
|
|
311
|
+
function getKeyAndIndicesFromKey(o) {
|
|
312
|
+
if (X.test(o)) {
|
|
313
|
+
let [, s, c] = o.match(X);
|
|
314
|
+
return [...getKeyAndIndicesFromKey(s), c];
|
|
315
|
+
}
|
|
316
|
+
return [o];
|
|
317
|
+
}
|
|
318
|
+
//#endregion
|
|
319
|
+
//#region ../../node_modules/.pnpm/nanostores@1.5.3/node_modules/nanostores/listen-keys/index.js
|
|
291
320
|
function listenKeys(o, s, c) {
|
|
292
|
-
let l = new Set(s)
|
|
293
|
-
return o.listen((o,
|
|
294
|
-
l.has(
|
|
321
|
+
let l = new Set(s);
|
|
322
|
+
return o.listen((o, u, d) => {
|
|
323
|
+
(d === void 0 ? s.some((s) => u === void 0 || o[s] !== u[s] || getPath(o, s) !== getPath(u, s)) : l.has(d) || l.has(d.split(/\.|\[/)[0])) && c(o, u, d);
|
|
295
324
|
});
|
|
296
325
|
}
|
|
297
326
|
//#endregion
|
|
298
|
-
//#region ../../node_modules/.pnpm/@nanostores+react@1.1.0_nanostores@1.
|
|
327
|
+
//#region ../../node_modules/.pnpm/@nanostores+react@1.1.0_nanostores@1.5.3_react@19.2.8/node_modules/@nanostores/react/index.js
|
|
299
328
|
var emit = (o, s) => (c) => {
|
|
300
329
|
o.current !== c && (o.current = c, s());
|
|
301
330
|
};
|
|
302
331
|
function useStore(o, { keys: s, deps: c = [o, s], ssr: l } = {}) {
|
|
303
|
-
let u =
|
|
332
|
+
let u = E();
|
|
304
333
|
u.current = o.get();
|
|
305
|
-
let d =
|
|
306
|
-
return l && "init" in o && (f = l === "initial" ? () => o.init : l),
|
|
334
|
+
let d = x((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;
|
|
335
|
+
return l && "init" in o && (f = l === "initial" ? () => o.init : l), O(d, get, f);
|
|
307
336
|
}
|
|
308
337
|
//#endregion
|
|
309
338
|
//#region ../diagram/src/hooks/safeContext.tsx
|
|
310
|
-
var
|
|
311
|
-
|
|
312
|
-
var
|
|
339
|
+
var Z = _(null);
|
|
340
|
+
Z.displayName = "DiagramApiSafeContext";
|
|
341
|
+
var ee = Z.Provider;
|
|
313
342
|
function useDiagram() {
|
|
314
|
-
let o =
|
|
343
|
+
let o = b(Z);
|
|
315
344
|
if (o === null) throw Error("DiagramApi is not provided");
|
|
316
345
|
return o;
|
|
317
346
|
}
|
|
@@ -324,7 +353,7 @@ function createSafeContextForActor(o) {
|
|
|
324
353
|
return [(s) => o(s.context), s ?? p];
|
|
325
354
|
}
|
|
326
355
|
function useActorRef() {
|
|
327
|
-
let c =
|
|
356
|
+
let c = S(s);
|
|
328
357
|
if (c === null) throw Error(`${o}SafeContext is not provided `);
|
|
329
358
|
return c;
|
|
330
359
|
}
|
|
@@ -340,24 +369,24 @@ function createSafeContextForActor(o) {
|
|
|
340
369
|
useActorRef
|
|
341
370
|
};
|
|
342
371
|
}
|
|
343
|
-
var { ContextProvider:
|
|
344
|
-
let c =
|
|
372
|
+
var { ContextProvider: te, selectSnapshot: ne, selectContext: re, useActorSelector: ie, useActorRef: ae } = createSafeContextForActor("DiagramActor"), Q = y((o, s) => {
|
|
373
|
+
let c = k(34), p, m, h, g, _, v, y, b, x;
|
|
345
374
|
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
|
|
375
|
+
let S = _ === void 0 ? 1 : _, C = v !== void 0 && v, w = y !== void 0 && y, T = b === void 0 ? "no content" : b;
|
|
347
376
|
if (x.isEmpty && w) return null;
|
|
348
377
|
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__ */
|
|
378
|
+
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__ */ A("p", { children: x.text }) } : { children: /* @__PURE__ */ A(l, {
|
|
350
379
|
component: "span",
|
|
351
380
|
fz: "xs",
|
|
352
381
|
c: "dimmed",
|
|
353
382
|
style: { userSelect: "none" },
|
|
354
383
|
children: T
|
|
355
384
|
}) }, 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,
|
|
357
|
-
c[16] !== p || c[17] !== C || c[18] !== x.isMarkdown ? (
|
|
385
|
+
let D = E, O;
|
|
386
|
+
c[16] !== p || c[17] !== C || c[18] !== x.isMarkdown ? (O = u(f({
|
|
358
387
|
uselikec4palette: C,
|
|
359
388
|
value: x.isMarkdown ? "markdown" : "plaintext"
|
|
360
|
-
}), p), c[16] = p, c[17] = C, c[18] = x.isMarkdown, c[19] =
|
|
389
|
+
}), p), c[16] = p, c[17] = C, c[18] = x.isMarkdown, c[19] = O) : O = c[19];
|
|
361
390
|
let j;
|
|
362
391
|
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
392
|
let M;
|
|
@@ -369,37 +398,37 @@ var { ContextProvider: X, selectSnapshot: Z, selectContext: ee, useActorSelector
|
|
|
369
398
|
...M
|
|
370
399
|
}, c[24] = g, c[25] = j, c[26] = M, c[27] = N) : N = c[27];
|
|
371
400
|
let P;
|
|
372
|
-
return c[28] !== D || c[29] !== h || c[30] !== s || c[31] !==
|
|
401
|
+
return c[28] !== D || c[29] !== h || c[30] !== s || c[31] !== O || c[32] !== N ? (P = /* @__PURE__ */ A(d, {
|
|
373
402
|
...h,
|
|
374
403
|
ref: s,
|
|
375
|
-
className:
|
|
404
|
+
className: O,
|
|
376
405
|
style: N,
|
|
377
406
|
...D
|
|
378
|
-
}), c[28] = D, c[29] = h, c[30] = s, c[31] =
|
|
407
|
+
}), c[28] = D, c[29] = h, c[30] = s, c[31] = O, c[32] = N, c[33] = P) : P = c[33], P;
|
|
379
408
|
});
|
|
380
409
|
Q.displayName = "Markdown";
|
|
381
410
|
//#endregion
|
|
382
411
|
//#region src/context/safeCtx.ts
|
|
383
|
-
var $ = _(null),
|
|
384
|
-
let o =
|
|
412
|
+
var $ = _(null), oe = $.Provider, useLikeC4ModelAtom = () => {
|
|
413
|
+
let o = S($);
|
|
385
414
|
if (o === null) throw Error("LikeC4ModelAtom is not provided");
|
|
386
415
|
return o;
|
|
387
416
|
};
|
|
388
417
|
//#endregion
|
|
389
418
|
//#region src/hooks.ts
|
|
390
419
|
function useTransparentBackground(o) {
|
|
391
|
-
let s =
|
|
420
|
+
let s = k(3), c = o === void 0 || o, t1, l;
|
|
392
421
|
s[0] === c ? (t1 = s[1], l = s[2]) : (t1 = () => {
|
|
393
422
|
let o = document.body.parentElement;
|
|
394
|
-
if (
|
|
423
|
+
if (o && c === !0) return o.classList.add("transparent-bg"), () => {
|
|
395
424
|
o.classList.remove("transparent-bg");
|
|
396
425
|
};
|
|
397
|
-
}, l = [c], s[0] = c, s[1] = t1, s[2] = l),
|
|
426
|
+
}, l = [c], s[0] = c, s[1] = t1, s[2] = l), B(t1, l);
|
|
398
427
|
}
|
|
399
428
|
function useLikeC4Views() {
|
|
400
|
-
let o =
|
|
429
|
+
let o = k(4), s = useLikeC4ModelAtom(), c;
|
|
401
430
|
o[0] === Symbol.for("react.memo_cache_sentinel") ? (c = [], o[0] = c) : c = o[0];
|
|
402
|
-
let [l, u] =
|
|
431
|
+
let [l, u] = D(c), t1, d;
|
|
403
432
|
return o[1] === s ? (t1 = o[2], d = o[3]) : (t1 = () => s.subscribe((o) => {
|
|
404
433
|
u((s) => {
|
|
405
434
|
let c = [...o.views()].map((o) => {
|
|
@@ -408,20 +437,20 @@ function useLikeC4Views() {
|
|
|
408
437
|
});
|
|
409
438
|
return p(s, c) ? s : c;
|
|
410
439
|
});
|
|
411
|
-
}), d = [s], o[1] = s, o[2] = t1, o[3] = d),
|
|
440
|
+
}), d = [s], o[1] = s, o[2] = t1, o[3] = d), C(t1, d), l;
|
|
412
441
|
}
|
|
413
442
|
function useCurrentViewId() {
|
|
414
|
-
let o =
|
|
415
|
-
return o[0] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
443
|
+
let o = k(1), s;
|
|
444
|
+
return o[0] === Symbol.for("react.memo_cache_sentinel") ? (s = {
|
|
416
445
|
select: _temp,
|
|
417
446
|
strict: !1
|
|
418
|
-
}, o[0] =
|
|
447
|
+
}, o[0] = s) : s = o[0], c(s) ?? "index";
|
|
419
448
|
}
|
|
420
449
|
function _temp(o) {
|
|
421
450
|
return o.viewId;
|
|
422
451
|
}
|
|
423
452
|
function useCurrentView() {
|
|
424
|
-
let o =
|
|
453
|
+
let o = k(13), s = useCurrentViewId(), c = useLikeC4ModelAtom(), [l, u] = D("manual"), t0;
|
|
425
454
|
o[0] === Symbol.for("react.memo_cache_sentinel") ? (t0 = () => {
|
|
426
455
|
u("manual");
|
|
427
456
|
}, o[0] = t0) : t0 = o[0];
|
|
@@ -429,7 +458,7 @@ function useCurrentView() {
|
|
|
429
458
|
o[1] === s ? d = o[2] : (d = [s], o[1] = s, o[2] = d), useUpdateEffect(t0, d);
|
|
430
459
|
let t2;
|
|
431
460
|
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] =
|
|
461
|
+
let [f, p] = D(t2), t3, h;
|
|
433
462
|
o[6] !== c || o[7] !== l || o[8] !== s ? (t3 = () => c.subscribe((o, c) => {
|
|
434
463
|
p((c) => {
|
|
435
464
|
let u = o.findView(s);
|
|
@@ -441,18 +470,18 @@ function useCurrentView() {
|
|
|
441
470
|
c,
|
|
442
471
|
s,
|
|
443
472
|
l
|
|
444
|
-
], o[6] = c, o[7] = l, o[8] = s, o[9] = t3, o[10] = h) : (t3 = o[9], h = o[10]),
|
|
473
|
+
], o[6] = c, o[7] = l, o[8] = s, o[9] = t3, o[10] = h) : (t3 = o[9], h = o[10]), C(t3, h);
|
|
445
474
|
let g;
|
|
446
475
|
return o[11] === f ? g = o[12] : (g = [f, u], o[11] = f, o[12] = g), g;
|
|
447
476
|
}
|
|
448
477
|
function useCurrentProject() {
|
|
449
|
-
let o =
|
|
478
|
+
let o = k(4), c = j(), l;
|
|
450
479
|
o[0] === Symbol.for("react.memo_cache_sentinel") ? (l = { select: selectProjectIdFromContext }, o[0] = l) : l = o[0];
|
|
451
|
-
let u =
|
|
452
|
-
return o[1] !== u || o[2] !==
|
|
480
|
+
let u = s(l), d;
|
|
481
|
+
return o[1] !== u || o[2] !== c ? (d = u && c.find((o) => o.id === u) || c[0], o[1] = u, o[2] = c, o[3] = d) : d = o[3], d;
|
|
453
482
|
}
|
|
454
483
|
function selectProjectIdFromContext(o) {
|
|
455
484
|
return o.find((o) => o.routeId === "/project/$projectId")?.params?.projectId ?? o.at(-1)?.context.projectId ?? void 0;
|
|
456
485
|
}
|
|
457
486
|
//#endregion
|
|
458
|
-
export { createReactComponent as A, useTimeoutEffect as C, useSyncedRef as D,
|
|
487
|
+
export { createReactComponent as A, useTimeoutEffect as C, useSyncedRef as D, R as E, t$1 as F, N as I, M as L, e as M, r$1 as N, L as O, P, t$3 as R, useUpdateEffect as S, z as T, useStore as _, useTransparentBackground as a, G as b, Q as c, createSafeContextForActor as d, re as f, ie as g, ae as h, useLikeC4Views as i, t as j, I as k, te as l, useDiagram as m, useCurrentView as n, oe as o, ne as p, useCurrentViewId as r, useLikeC4ModelAtom as s, useCurrentProject as t, ee as u, onMount as v, useFirstMountState as w, depsShallowEqual as x, atom as y, e$2 as z };
|