likec4 1.59.3 → 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 +108 -108
- package/__app__/src/chunks/LikeC4Styles.mjs +752 -604
- package/__app__/src/chunks/ProjectsOverview.mjs +72 -72
- package/__app__/src/chunks/es.mjs +1 -1
- package/__app__/src/chunks/hooks.mjs +94 -91
- package/__app__/src/chunks/libs/@floating-ui.mjs +3 -3
- package/__app__/src/chunks/libs/@mantine.mjs +1609 -892
- package/__app__/src/chunks/libs/@tanstack-ai.mjs +2 -2
- package/__app__/src/chunks/libs/@tanstack.mjs +4 -10
- package/__app__/src/chunks/libs/@xyflow/react.mjs +4 -4
- package/__app__/src/chunks/libs/d3.mjs +4 -9
- package/__app__/src/chunks/libs/fast-equals.mjs +61 -49
- package/__app__/src/chunks/libs/framer.mjs +6 -6
- package/__app__/src/chunks/styled-system.mjs +2578 -124
- package/__app__/src/main.mjs +21537 -20155
- package/__app__/src/style.css +1 -1
- package/config/schema.json +14 -0
- package/dist/app/render-view-client.css +1 -1
- package/dist/app/render-view-client.js +99 -105
- package/dist/chunks/filenames.mjs +6 -6
- package/dist/chunks/index.d.mts +7 -1
- package/dist/chunks/index2.d.mts +38 -21
- package/dist/chunks/libs/@chevrotain/gast.mjs +1 -1
- package/dist/chunks/libs/@chevrotain/types.d.mts +108 -0
- package/dist/chunks/libs/@logtape/logtape.mjs +4 -4
- package/dist/chunks/libs/langium.d.mts +1777 -16
- package/dist/chunks/libs/langium.mjs +4 -4
- 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/node.mjs +58 -59
- package/dist/chunks/vite-plugin.mjs +15 -12
- package/dist/cli/index.d.mts +1 -1
- package/dist/cli/index.mjs +104 -88
- package/dist/index.d.mts +3 -3
- 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 +15 -15
- package/dist/vite-plugin/internal/index.mjs +72 -27
- package/package.json +28 -28
- package/react/index.d.mts +22720 -1460
- package/react/index.mjs +30391 -25072
- package/vite-plugin-modules.d.ts +4 -2
|
@@ -1,14 +1,14 @@
|
|
|
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
|
|
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
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);
|
|
@@ -29,10 +29,10 @@ function t$3(o, s, c) {
|
|
|
29
29
|
o(t$3, "t");
|
|
30
30
|
//#endregion
|
|
31
31
|
//#region ../../node_modules/.pnpm/remeda@2.45.0/node_modules/remeda/dist/utilityEvaluators-IxVD3t2o.js
|
|
32
|
-
var
|
|
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
|
|
@@ -75,7 +75,7 @@ function r$2(o, s) {
|
|
|
75
75
|
o(r$2, "r");
|
|
76
76
|
function i$1(o, s, c) {
|
|
77
77
|
if (c.length === 0) return s.push(o), !1;
|
|
78
|
-
let l = o, u =
|
|
78
|
+
let l = o, u = M, d = !1;
|
|
79
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
80
|
if (u.hasMany ?? !1) {
|
|
81
81
|
for (let l of u.next) if (i$1(l, s, c.slice(o + 1))) return !0;
|
|
@@ -92,18 +92,18 @@ function a$1(o) {
|
|
|
92
92
|
o(a$1, "a");
|
|
93
93
|
//#endregion
|
|
94
94
|
//#region ../../node_modules/.pnpm/remeda@2.45.0/node_modules/remeda/dist/toSingle-DiQSixar.js
|
|
95
|
-
var
|
|
95
|
+
var P = /* @__PURE__ */ o((o) => Object.assign(o, { single: !0 }), "e");
|
|
96
96
|
//#endregion
|
|
97
97
|
//#region ../../node_modules/.pnpm/remeda@2.45.0/node_modules/remeda/dist/find.js
|
|
98
98
|
function r$1(...o) {
|
|
99
|
-
return t$3(i, o,
|
|
99
|
+
return t$3(i, o, P(a));
|
|
100
100
|
}
|
|
101
101
|
o(r$1, "r");
|
|
102
102
|
var i = (o, s) => o.find(s), a = (o) => (s, c, l) => o(s, c, l) ? {
|
|
103
103
|
done: !0,
|
|
104
104
|
hasNext: !0,
|
|
105
105
|
next: s
|
|
106
|
-
} :
|
|
106
|
+
} : M, e = (o) => typeof o == "function";
|
|
107
107
|
//#endregion
|
|
108
108
|
//#region ../../node_modules/.pnpm/remeda@2.45.0/node_modules/remeda/dist/map.js
|
|
109
109
|
function t(...o) {
|
|
@@ -113,7 +113,7 @@ var n = (o, s) => o.map(s), r = (o) => (s, c, l) => ({
|
|
|
113
113
|
done: !1,
|
|
114
114
|
hasNext: !0,
|
|
115
115
|
next: o(s, c, l)
|
|
116
|
-
}),
|
|
116
|
+
}), F = {
|
|
117
117
|
outline: {
|
|
118
118
|
xmlns: "http://www.w3.org/2000/svg",
|
|
119
119
|
width: 24,
|
|
@@ -136,7 +136,7 @@ var n = (o, s) => o.map(s), r = (o) => (s, c, l) => ({
|
|
|
136
136
|
}, createReactComponent = (o, s, c, l) => {
|
|
137
137
|
let u = y(({ color: c = "currentColor", size: u = 24, stroke: d = 2, title: f, className: p, children: m, ...h }, g) => v("svg", {
|
|
138
138
|
ref: g,
|
|
139
|
-
...
|
|
139
|
+
...F[o],
|
|
140
140
|
width: u,
|
|
141
141
|
height: u,
|
|
142
142
|
className: [
|
|
@@ -155,24 +155,24 @@ var n = (o, s) => o.map(s), r = (o) => (s, c, l) => ({
|
|
|
155
155
|
...Array.isArray(m) ? m : [m]
|
|
156
156
|
]));
|
|
157
157
|
return u.displayName = `${c}`, u;
|
|
158
|
-
},
|
|
158
|
+
}, I = createReactComponent("outline", "sparkles", "Sparkles", [["path", {
|
|
159
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",
|
|
160
160
|
key: "svg-0"
|
|
161
|
-
}]]),
|
|
161
|
+
}]]), L = createReactComponent("filled", "player-stop-filled", "PlayerStopFilled", [["path", {
|
|
162
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",
|
|
163
163
|
key: "svg-0"
|
|
164
164
|
}]]);
|
|
165
165
|
//#endregion
|
|
166
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
|
|
167
167
|
function useSyncedRef(o) {
|
|
168
|
-
let s =
|
|
169
|
-
return s.current = o,
|
|
168
|
+
let s = E(o);
|
|
169
|
+
return s.current = o, T(() => Object.freeze({ get current() {
|
|
170
170
|
return s.current;
|
|
171
171
|
} }), []);
|
|
172
172
|
}
|
|
173
173
|
//#endregion
|
|
174
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
|
|
175
|
+
var R = /* @__PURE__ */ o(() => {}, "noop"), z = typeof globalThis < "u" && typeof navigator < "u" && typeof document < "u", basicDepsComparator = (o, s) => {
|
|
176
176
|
if (o === s) return !0;
|
|
177
177
|
if (o.length !== s.length) return !1;
|
|
178
178
|
for (let [c, l] of o.entries()) if (l !== s[c]) return !1;
|
|
@@ -180,32 +180,32 @@ var L = /* @__PURE__ */ o(() => {}, "noop"), R = typeof globalThis < "u" && type
|
|
|
180
180
|
};
|
|
181
181
|
//#endregion
|
|
182
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 =
|
|
184
|
-
let d =
|
|
185
|
-
(d.current === void 0 ||
|
|
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);
|
|
186
186
|
}
|
|
187
187
|
//#endregion
|
|
188
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
|
|
189
189
|
function useFirstMountState() {
|
|
190
|
-
let o =
|
|
191
|
-
return
|
|
190
|
+
let o = E(!0);
|
|
191
|
+
return C(() => {
|
|
192
192
|
o.current = !1;
|
|
193
193
|
}, []), o.current;
|
|
194
194
|
}
|
|
195
195
|
//#endregion
|
|
196
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
|
|
197
|
+
var B = z ? w : C, cancelTimeout = (o) => {
|
|
198
198
|
o && clearTimeout(o);
|
|
199
199
|
};
|
|
200
200
|
function useTimeoutEffect(o, s) {
|
|
201
|
-
let c = useSyncedRef(o), l = useSyncedRef(s), u =
|
|
201
|
+
let c = useSyncedRef(o), l = useSyncedRef(s), u = E(null), d = x(() => {
|
|
202
202
|
cancelTimeout(u.current);
|
|
203
|
-
}, []), f =
|
|
203
|
+
}, []), f = x(() => {
|
|
204
204
|
l.current !== void 0 && (d(), u.current = setTimeout(() => {
|
|
205
205
|
c.current();
|
|
206
206
|
}, l.current));
|
|
207
207
|
}, []);
|
|
208
|
-
return
|
|
208
|
+
return C(() => (f(), d), [s]), [d, f];
|
|
209
209
|
}
|
|
210
210
|
//#endregion
|
|
211
211
|
//#region ../diagram/src/hooks/useUpdateEffect.ts
|
|
@@ -219,15 +219,18 @@ function useUpdateEffect(o, s, c, l) {
|
|
|
219
219
|
useCustomCompareEffect(useFirstMountState() ? noop : o, s, c ?? depsShallowEqual, l);
|
|
220
220
|
}
|
|
221
221
|
//#endregion
|
|
222
|
-
//#region ../../node_modules/.pnpm/nanostores@1.5.
|
|
223
|
-
var
|
|
224
|
-
let o;
|
|
225
|
-
for (
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
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
|
+
}
|
|
229
232
|
}
|
|
230
|
-
if (
|
|
233
|
+
if (V.length = H = 0, o) throw o;
|
|
231
234
|
}, atom = /* @__NO_SIDE_EFFECTS__ */ (o) => {
|
|
232
235
|
let s = [], c = {
|
|
233
236
|
eq: Object.is,
|
|
@@ -238,15 +241,15 @@ var B = [], V = 0, H = null, U = 4, W = globalThis.nanostoresGlobal ||= { epoch:
|
|
|
238
241
|
lc: 0,
|
|
239
242
|
listen(o) {
|
|
240
243
|
return c.lc = s.push(o), () => {
|
|
241
|
-
for (let s =
|
|
244
|
+
for (let s = H; s < V.length;) V[s] === o ? V.splice(s, W) : s += W;
|
|
242
245
|
let l = s.indexOf(o);
|
|
243
246
|
~l && (s.splice(l, 1), --c.lc || c.off());
|
|
244
247
|
};
|
|
245
248
|
},
|
|
246
249
|
notify(o, l) {
|
|
247
|
-
|
|
248
|
-
let u = !
|
|
249
|
-
for (let u of s)
|
|
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));
|
|
250
253
|
u && drainQueue();
|
|
251
254
|
},
|
|
252
255
|
off() {},
|
|
@@ -261,38 +264,38 @@ var B = [], V = 0, H = null, U = 4, W = globalThis.nanostoresGlobal ||= { epoch:
|
|
|
261
264
|
value: o
|
|
262
265
|
};
|
|
263
266
|
return c;
|
|
264
|
-
},
|
|
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) => {
|
|
265
268
|
o.events[c].reduceRight((o, s) => (s(o), o), {
|
|
266
269
|
shared: {},
|
|
267
270
|
...s
|
|
268
271
|
});
|
|
269
272
|
})), o.events[c] = o.events[c] || [], o.events[c].push(s), () => {
|
|
270
273
|
let l = o.events[c], u = l.indexOf(s);
|
|
271
|
-
l.splice(u, 1), l.length || (
|
|
272
|
-
}),
|
|
274
|
+
~u && (l.splice(u, 1), l.length || (o.events[c + J](), delete o.events[c + J]));
|
|
275
|
+
}), Y = 1e3, onMount = (o, s) => {
|
|
273
276
|
let listener = (c) => {
|
|
274
277
|
let l = s(c);
|
|
275
|
-
l && o.events[
|
|
278
|
+
l && o.events[q].push(l);
|
|
276
279
|
};
|
|
277
|
-
return on(o, listener,
|
|
280
|
+
return on(o, listener, K, (s) => {
|
|
278
281
|
let c = o.listen;
|
|
279
282
|
o.listen = (...l) => (!o.lc && !o.active && (o.active = !0, s()), c(...l));
|
|
280
283
|
let l = o.off;
|
|
281
|
-
return o.events[
|
|
284
|
+
return o.events[q] = [], o.off = () => {
|
|
282
285
|
l(), setTimeout(() => {
|
|
283
286
|
if (o.active && !o.lc) {
|
|
284
287
|
o.active = !1;
|
|
285
|
-
for (let s of o.events[
|
|
286
|
-
o.events[
|
|
288
|
+
for (let s of o.events[q]) s();
|
|
289
|
+
o.events[q] = [];
|
|
287
290
|
}
|
|
288
|
-
},
|
|
291
|
+
}, Y);
|
|
289
292
|
}, () => {
|
|
290
293
|
o.listen = c, o.off = l;
|
|
291
294
|
};
|
|
292
295
|
});
|
|
293
296
|
};
|
|
294
297
|
//#endregion
|
|
295
|
-
//#region ../../node_modules/.pnpm/nanostores@1.5.
|
|
298
|
+
//#region ../../node_modules/.pnpm/nanostores@1.5.3/node_modules/nanostores/deep-map/path.js
|
|
296
299
|
function getPath(o, s) {
|
|
297
300
|
let c = getAllKeysFromPath(s), l = o;
|
|
298
301
|
for (let o of c) {
|
|
@@ -301,19 +304,19 @@ function getPath(o, s) {
|
|
|
301
304
|
}
|
|
302
305
|
return l;
|
|
303
306
|
}
|
|
304
|
-
var
|
|
307
|
+
var X = /(.*)\[(\d+)\]/;
|
|
305
308
|
function getAllKeysFromPath(o) {
|
|
306
309
|
return o.split(".").flatMap((o) => getKeyAndIndicesFromKey(o));
|
|
307
310
|
}
|
|
308
311
|
function getKeyAndIndicesFromKey(o) {
|
|
309
|
-
if (
|
|
310
|
-
let [, s, c] = o.match(
|
|
312
|
+
if (X.test(o)) {
|
|
313
|
+
let [, s, c] = o.match(X);
|
|
311
314
|
return [...getKeyAndIndicesFromKey(s), c];
|
|
312
315
|
}
|
|
313
316
|
return [o];
|
|
314
317
|
}
|
|
315
318
|
//#endregion
|
|
316
|
-
//#region ../../node_modules/.pnpm/nanostores@1.5.
|
|
319
|
+
//#region ../../node_modules/.pnpm/nanostores@1.5.3/node_modules/nanostores/listen-keys/index.js
|
|
317
320
|
function listenKeys(o, s, c) {
|
|
318
321
|
let l = new Set(s);
|
|
319
322
|
return o.listen((o, u, d) => {
|
|
@@ -321,23 +324,23 @@ function listenKeys(o, s, c) {
|
|
|
321
324
|
});
|
|
322
325
|
}
|
|
323
326
|
//#endregion
|
|
324
|
-
//#region ../../node_modules/.pnpm/@nanostores+react@1.1.0_nanostores@1.5.
|
|
327
|
+
//#region ../../node_modules/.pnpm/@nanostores+react@1.1.0_nanostores@1.5.3_react@19.2.8/node_modules/@nanostores/react/index.js
|
|
325
328
|
var emit = (o, s) => (c) => {
|
|
326
329
|
o.current !== c && (o.current = c, s());
|
|
327
330
|
};
|
|
328
331
|
function useStore(o, { keys: s, deps: c = [o, s], ssr: l } = {}) {
|
|
329
|
-
let u =
|
|
332
|
+
let u = E();
|
|
330
333
|
u.current = o.get();
|
|
331
|
-
let d =
|
|
332
|
-
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);
|
|
333
336
|
}
|
|
334
337
|
//#endregion
|
|
335
338
|
//#region ../diagram/src/hooks/safeContext.tsx
|
|
336
|
-
var
|
|
337
|
-
|
|
338
|
-
var
|
|
339
|
+
var Z = _(null);
|
|
340
|
+
Z.displayName = "DiagramApiSafeContext";
|
|
341
|
+
var ee = Z.Provider;
|
|
339
342
|
function useDiagram() {
|
|
340
|
-
let o =
|
|
343
|
+
let o = b(Z);
|
|
341
344
|
if (o === null) throw Error("DiagramApi is not provided");
|
|
342
345
|
return o;
|
|
343
346
|
}
|
|
@@ -350,7 +353,7 @@ function createSafeContextForActor(o) {
|
|
|
350
353
|
return [(s) => o(s.context), s ?? p];
|
|
351
354
|
}
|
|
352
355
|
function useActorRef() {
|
|
353
|
-
let c =
|
|
356
|
+
let c = S(s);
|
|
354
357
|
if (c === null) throw Error(`${o}SafeContext is not provided `);
|
|
355
358
|
return c;
|
|
356
359
|
}
|
|
@@ -366,24 +369,24 @@ function createSafeContextForActor(o) {
|
|
|
366
369
|
useActorRef
|
|
367
370
|
};
|
|
368
371
|
}
|
|
369
|
-
var { ContextProvider:
|
|
370
|
-
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;
|
|
371
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);
|
|
372
375
|
let S = _ === void 0 ? 1 : _, C = v !== void 0 && v, w = y !== void 0 && y, T = b === void 0 ? "no content" : b;
|
|
373
376
|
if (x.isEmpty && w) return null;
|
|
374
377
|
let E;
|
|
375
|
-
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, {
|
|
376
379
|
component: "span",
|
|
377
380
|
fz: "xs",
|
|
378
381
|
c: "dimmed",
|
|
379
382
|
style: { userSelect: "none" },
|
|
380
383
|
children: T
|
|
381
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];
|
|
382
|
-
let D = E,
|
|
383
|
-
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({
|
|
384
387
|
uselikec4palette: C,
|
|
385
388
|
value: x.isMarkdown ? "markdown" : "plaintext"
|
|
386
|
-
}), 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];
|
|
387
390
|
let j;
|
|
388
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);
|
|
389
392
|
let M;
|
|
@@ -395,37 +398,37 @@ var { ContextProvider: ee, selectSnapshot: te, selectContext: ne, useActorSelect
|
|
|
395
398
|
...M
|
|
396
399
|
}, c[24] = g, c[25] = j, c[26] = M, c[27] = N) : N = c[27];
|
|
397
400
|
let P;
|
|
398
|
-
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, {
|
|
399
402
|
...h,
|
|
400
403
|
ref: s,
|
|
401
|
-
className:
|
|
404
|
+
className: O,
|
|
402
405
|
style: N,
|
|
403
406
|
...D
|
|
404
|
-
}), 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;
|
|
405
408
|
});
|
|
406
409
|
Q.displayName = "Markdown";
|
|
407
410
|
//#endregion
|
|
408
411
|
//#region src/context/safeCtx.ts
|
|
409
|
-
var $ = _(null),
|
|
410
|
-
let o =
|
|
412
|
+
var $ = _(null), oe = $.Provider, useLikeC4ModelAtom = () => {
|
|
413
|
+
let o = S($);
|
|
411
414
|
if (o === null) throw Error("LikeC4ModelAtom is not provided");
|
|
412
415
|
return o;
|
|
413
416
|
};
|
|
414
417
|
//#endregion
|
|
415
418
|
//#region src/hooks.ts
|
|
416
419
|
function useTransparentBackground(o) {
|
|
417
|
-
let s =
|
|
420
|
+
let s = k(3), c = o === void 0 || o, t1, l;
|
|
418
421
|
s[0] === c ? (t1 = s[1], l = s[2]) : (t1 = () => {
|
|
419
422
|
let o = document.body.parentElement;
|
|
420
|
-
if (
|
|
423
|
+
if (o && c === !0) return o.classList.add("transparent-bg"), () => {
|
|
421
424
|
o.classList.remove("transparent-bg");
|
|
422
425
|
};
|
|
423
|
-
}, 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);
|
|
424
427
|
}
|
|
425
428
|
function useLikeC4Views() {
|
|
426
|
-
let o =
|
|
429
|
+
let o = k(4), s = useLikeC4ModelAtom(), c;
|
|
427
430
|
o[0] === Symbol.for("react.memo_cache_sentinel") ? (c = [], o[0] = c) : c = o[0];
|
|
428
|
-
let [l, u] =
|
|
431
|
+
let [l, u] = D(c), t1, d;
|
|
429
432
|
return o[1] === s ? (t1 = o[2], d = o[3]) : (t1 = () => s.subscribe((o) => {
|
|
430
433
|
u((s) => {
|
|
431
434
|
let c = [...o.views()].map((o) => {
|
|
@@ -434,20 +437,20 @@ function useLikeC4Views() {
|
|
|
434
437
|
});
|
|
435
438
|
return p(s, c) ? s : c;
|
|
436
439
|
});
|
|
437
|
-
}), 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;
|
|
438
441
|
}
|
|
439
442
|
function useCurrentViewId() {
|
|
440
|
-
let o =
|
|
441
|
-
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 = {
|
|
442
445
|
select: _temp,
|
|
443
446
|
strict: !1
|
|
444
|
-
}, o[0] =
|
|
447
|
+
}, o[0] = s) : s = o[0], c(s) ?? "index";
|
|
445
448
|
}
|
|
446
449
|
function _temp(o) {
|
|
447
450
|
return o.viewId;
|
|
448
451
|
}
|
|
449
452
|
function useCurrentView() {
|
|
450
|
-
let o =
|
|
453
|
+
let o = k(13), s = useCurrentViewId(), c = useLikeC4ModelAtom(), [l, u] = D("manual"), t0;
|
|
451
454
|
o[0] === Symbol.for("react.memo_cache_sentinel") ? (t0 = () => {
|
|
452
455
|
u("manual");
|
|
453
456
|
}, o[0] = t0) : t0 = o[0];
|
|
@@ -455,7 +458,7 @@ function useCurrentView() {
|
|
|
455
458
|
o[1] === s ? d = o[2] : (d = [s], o[1] = s, o[2] = d), useUpdateEffect(t0, d);
|
|
456
459
|
let t2;
|
|
457
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];
|
|
458
|
-
let [f, p] =
|
|
461
|
+
let [f, p] = D(t2), t3, h;
|
|
459
462
|
o[6] !== c || o[7] !== l || o[8] !== s ? (t3 = () => c.subscribe((o, c) => {
|
|
460
463
|
p((c) => {
|
|
461
464
|
let u = o.findView(s);
|
|
@@ -467,18 +470,18 @@ function useCurrentView() {
|
|
|
467
470
|
c,
|
|
468
471
|
s,
|
|
469
472
|
l
|
|
470
|
-
], 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);
|
|
471
474
|
let g;
|
|
472
475
|
return o[11] === f ? g = o[12] : (g = [f, u], o[11] = f, o[12] = g), g;
|
|
473
476
|
}
|
|
474
477
|
function useCurrentProject() {
|
|
475
|
-
let o =
|
|
478
|
+
let o = k(4), c = j(), l;
|
|
476
479
|
o[0] === Symbol.for("react.memo_cache_sentinel") ? (l = { select: selectProjectIdFromContext }, o[0] = l) : l = o[0];
|
|
477
|
-
let u =
|
|
478
|
-
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;
|
|
479
482
|
}
|
|
480
483
|
function selectProjectIdFromContext(o) {
|
|
481
484
|
return o.find((o) => o.routeId === "/project/$projectId")?.params?.projectId ?? o.at(-1)?.context.projectId ?? void 0;
|
|
482
485
|
}
|
|
483
486
|
//#endregion
|
|
484
|
-
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 };
|
|
@@ -1539,7 +1539,7 @@ function useHover(e, n) {
|
|
|
1539
1539
|
function handleMouseMove() {
|
|
1540
1540
|
!T.current && !v.current && i(!0, t, "hover");
|
|
1541
1541
|
}
|
|
1542
|
-
d
|
|
1542
|
+
(!d || isMouseLikePointerType(b.current)) && (r || getRestMs(y.current) === 0 || O.current && e.movementX ** 2 + e.movementY ** 2 < 2 || (clearTimeoutIfSet(w), b.current === "touch" ? handleMouseMove() : (O.current = !0, w.current = window.setTimeout(handleMouseMove, getRestMs(y.current)))));
|
|
1543
1543
|
}
|
|
1544
1544
|
};
|
|
1545
1545
|
}, [
|
|
@@ -1625,7 +1625,7 @@ function useDelayGroup(e, t) {
|
|
|
1625
1625
|
d,
|
|
1626
1626
|
p
|
|
1627
1627
|
]), S(() => {
|
|
1628
|
-
o &&
|
|
1628
|
+
o && u !== NOOP && n && u(s);
|
|
1629
1629
|
}, [
|
|
1630
1630
|
o,
|
|
1631
1631
|
n,
|
|
@@ -1970,7 +1970,7 @@ function useFocus(e, n) {
|
|
|
1970
1970
|
let t = e.relatedTarget, n = e.nativeEvent, r = isElement(t) && t.hasAttribute(createAttribute("focus-guard")) && t.getAttribute("data-type") === "outside";
|
|
1971
1971
|
d.current = window.setTimeout(() => {
|
|
1972
1972
|
let e = activeElement(s.domReference ? s.domReference.ownerDocument : document);
|
|
1973
|
-
|
|
1973
|
+
(t || e !== s.domReference) && (contains$1(o.current.floatingContext?.refs.floating.current, e) || contains$1(s.domReference, e) || r || i(!1, n, "focus"));
|
|
1974
1974
|
});
|
|
1975
1975
|
}
|
|
1976
1976
|
}), [
|