likec4 1.57.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.
- package/__app__/codegen/react.mjs +7 -8
- package/__app__/codegen/webcomponent.mjs +78 -889
- package/__app__/src/aichat/index.mjs +8 -1
- package/__app__/src/chunks/AIChat.mjs +956 -0
- package/__app__/src/chunks/LikeC4Styles.mjs +2164 -0
- package/__app__/src/chunks/ProjectsOverview.mjs +537 -0
- package/__app__/src/chunks/es.mjs +439 -0
- package/__app__/src/chunks/hooks.mjs +458 -0
- package/__app__/src/chunks/libs/@floating-ui.mjs +2218 -0
- package/__app__/src/chunks/libs/@mantine.mjs +12974 -0
- package/__app__/src/chunks/libs/@tanstack-ai.mjs +1768 -0
- package/__app__/src/chunks/libs/@tanstack.mjs +2693 -0
- package/__app__/src/chunks/libs/@xstate/react.mjs +1996 -0
- package/__app__/src/chunks/libs/@xyflow/react.mjs +5280 -0
- package/__app__/src/chunks/libs/bezier-js.mjs +1006 -0
- package/__app__/src/chunks/libs/d3.mjs +2842 -0
- package/__app__/src/chunks/libs/fast-equals.mjs +268 -0
- package/__app__/src/chunks/libs/framer.mjs +5905 -0
- package/__app__/src/chunks/libs/zod.mjs +3173 -0
- package/__app__/src/chunks/rolldown-runtime.mjs +30 -0
- package/__app__/src/chunks/styled-system.mjs +1047 -0
- package/__app__/src/fonts.css +1 -1
- package/__app__/src/main.mjs +27659 -14
- package/__app__/src/style.css +1 -1
- package/dist/chunks/dist.mjs +10 -0
- package/dist/chunks/enableServer.mjs +1 -1
- package/dist/chunks/filenames.mjs +2 -2
- package/dist/chunks/index.d.mts +9 -9
- package/dist/chunks/index2.d.mts +2167 -867
- package/dist/chunks/libs/@chevrotain/gast.mjs +1 -1
- package/dist/chunks/libs/@chevrotain/regexp-to-ast.mjs +1 -1
- package/dist/chunks/libs/@logtape/logtape.mjs +4 -3
- package/dist/chunks/libs/@ts-graphviz/common.d.mts +1 -2
- package/dist/chunks/libs/@ts-graphviz/core.mjs +1 -1
- package/dist/chunks/libs/chevrotain-allstar.mjs +2 -2
- package/dist/chunks/libs/chevrotain.mjs +25 -25
- package/dist/chunks/libs/json5.mjs +1 -1
- package/dist/chunks/libs/langium.d.mts +2940 -2914
- package/dist/chunks/libs/langium.mjs +9 -9
- package/dist/chunks/libs/merge-error-cause.mjs +1 -1
- 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 +1 -1
- 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.d.mts +1 -0
- package/dist/chunks/libs/unstorage.mjs +1 -1
- package/dist/chunks/libs/which.mjs +1 -1
- package/dist/chunks/libs/zod.d.mts +48 -36
- package/dist/chunks/libs/zod.mjs +65 -0
- package/dist/chunks/logger.mjs +1 -0
- package/dist/chunks/node.mjs +65 -63
- package/dist/chunks/rolldown-runtime.mjs +1 -1
- package/dist/chunks/sequence-view.mjs +1 -1
- package/dist/chunks/{plugin.mjs → vite-plugin.mjs} +41 -41
- package/dist/cli/index.mjs +186 -144
- package/dist/index.d.mts +3 -4
- package/dist/index.mjs +1 -1
- package/dist/model/index.d.mts +6 -5
- package/dist/vite-plugin/index.d.mts +6 -9
- package/dist/vite-plugin/index.mjs +1 -1
- package/dist/vite-plugin/internal/index.d.mts +64 -64
- package/dist/vite-plugin/internal/index.mjs +946 -1
- package/package.json +51 -52
- package/react/index.d.mts +853 -134
- package/react/index.mjs +49718 -44030
- package/__app__/chunks/AIChat2.mjs +0 -2
- package/__app__/chunks/DiagramActorProvider.mjs +0 -10
- package/__app__/chunks/EmbedPage.mjs +0 -1
- package/__app__/chunks/ExportPage.mjs +0 -2
- package/__app__/chunks/LikeC4Diagram.mjs +0 -19
- package/__app__/chunks/LikeC4Styles.mjs +0 -48
- package/__app__/chunks/Markdown.mjs +0 -1
- package/__app__/chunks/NavigationPanel.mjs +0 -1
- package/__app__/chunks/ViewReact.mjs +0 -1
- package/__app__/chunks/adhoc-editor.mjs +0 -1
- package/__app__/chunks/aichat.mjs +0 -1
- package/__app__/chunks/box.mjs +0 -1
- package/__app__/chunks/create-style-context.mjs +0 -1
- package/__app__/chunks/css.mjs +0 -1
- package/__app__/chunks/factory.mjs +0 -1
- package/__app__/chunks/hooks.mjs +0 -1
- package/__app__/chunks/hstack.mjs +0 -1
- package/__app__/chunks/libs/@dagrejs/dagre.mjs +0 -1
- package/__app__/chunks/libs/@floating-ui/core.mjs +0 -1
- package/__app__/chunks/libs/@floating-ui/dom.mjs +0 -1
- package/__app__/chunks/libs/@floating-ui/react.mjs +0 -1
- package/__app__/chunks/libs/@mantine/core.mjs +0 -41
- package/__app__/chunks/libs/@mantine/hooks.mjs +0 -1
- package/__app__/chunks/libs/@nanostores/react.mjs +0 -1
- package/__app__/chunks/libs/@react-hookz/web.mjs +0 -1
- package/__app__/chunks/libs/@tabler/icons-react.mjs +0 -358
- package/__app__/chunks/libs/@tanstack/ai-client.mjs +0 -2
- package/__app__/chunks/libs/@tanstack/ai-react-ui.mjs +0 -1
- package/__app__/chunks/libs/@tanstack/ai-react.mjs +0 -1
- package/__app__/chunks/libs/@tanstack/ai.mjs +0 -2
- package/__app__/chunks/libs/@tanstack/history.mjs +0 -1
- package/__app__/chunks/libs/@tanstack/react-router.mjs +0 -3
- package/__app__/chunks/libs/@tanstack/router-core.mjs +0 -1
- package/__app__/chunks/libs/@xstate/react.mjs +0 -1
- package/__app__/chunks/libs/@xstate/store.mjs +0 -1
- package/__app__/chunks/libs/@xyflow/react.mjs +0 -7
- package/__app__/chunks/libs/@zag-js/anatomy.mjs +0 -1
- package/__app__/chunks/libs/@zag-js/collection.mjs +0 -1
- package/__app__/chunks/libs/@zag-js/core.mjs +0 -1
- package/__app__/chunks/libs/@zag-js/react.mjs +0 -1
- package/__app__/chunks/libs/@zag-js/tree-view.mjs +0 -1
- package/__app__/chunks/libs/bezier-js.mjs +0 -1
- package/__app__/chunks/libs/copy-anything.mjs +0 -1
- package/__app__/chunks/libs/d3-path.mjs +0 -1
- package/__app__/chunks/libs/d3-shape.mjs +0 -1
- package/__app__/chunks/libs/fast-equals.mjs +0 -1
- package/__app__/chunks/libs/framer-motion.mjs +0 -9
- package/__app__/chunks/libs/html-to-image.mjs +0 -2
- package/__app__/chunks/libs/motion-dom.mjs +0 -1
- package/__app__/chunks/libs/nanostores.mjs +0 -1
- package/__app__/chunks/libs/react-error-boundary.mjs +0 -1
- package/__app__/chunks/libs/react-resizable-panels.mjs +0 -1
- package/__app__/chunks/libs/remeda.mjs +0 -1
- package/__app__/chunks/libs/superjson.mjs +0 -1
- package/__app__/chunks/libs/zod.mjs +0 -64
- package/__app__/chunks/rolldown-runtime.mjs +0 -1
- package/__app__/chunks/styles.css.mjs +0 -1
- package/__app__/chunks/txt.mjs +0 -1
- package/__app__/chunks/useLikeC4Project.mjs +0 -1
- package/__app__/src/pages/AdHocViewEditor.mjs +0 -1
- package/__app__/src/pages/EmbedPage.mjs +0 -1
- package/__app__/src/pages/ExportPage.mjs +0 -1
- package/__app__/src/pages/ProjectsOverview.mjs +0 -1
- package/__app__/src/pages/ViewAsD2.mjs +0 -1
- package/__app__/src/pages/ViewAsDot.mjs +0 -1
- package/__app__/src/pages/ViewAsMmd.mjs +0 -1
- package/__app__/src/pages/ViewAsPuml.mjs +0 -1
- package/__app__/src/pages/ViewEditor.mjs +0 -1
- package/__app__/src/pages/ViewReact.mjs +0 -1
- package/dist/chunks/libs/@chevrotain/utils.mjs +0 -1
- package/dist/chunks/libs/@hono/mcp.mjs +0 -70
- package/dist/chunks/libs/@hono/node-server.mjs +0 -1
- package/dist/chunks/libs/@logtape/logtape.d.mts +0 -1023
- package/dist/chunks/libs/@modelcontextprotocol/sdk.mjs +0 -12
- package/dist/chunks/libs/ajv.mjs +0 -1
- package/dist/chunks/libs/ansi-align.mjs +0 -2
- package/dist/chunks/libs/ansi-regex.mjs +0 -1
- package/dist/chunks/libs/ansi-styles.mjs +0 -1
- package/dist/chunks/libs/atomically.mjs +0 -1
- package/dist/chunks/libs/boxen.mjs +0 -22
- package/dist/chunks/libs/conf.mjs +0 -1
- package/dist/chunks/libs/defu.mjs +0 -1
- package/dist/chunks/libs/destr.mjs +0 -1
- package/dist/chunks/libs/find-up-simple.mjs +0 -1
- package/dist/chunks/libs/get-port.mjs +0 -1
- package/dist/chunks/libs/hono.mjs +0 -1
- package/dist/chunks/libs/is-docker.mjs +0 -1
- package/dist/chunks/libs/is-error-instance.mjs +0 -1
- package/dist/chunks/libs/is-inside-container.mjs +0 -1
- package/dist/chunks/libs/is-plain-obj.mjs +0 -1
- package/dist/chunks/libs/isexe.mjs +0 -1
- package/dist/chunks/libs/ky.mjs +0 -3
- package/dist/chunks/libs/p-debounce.mjs +0 -1
- package/dist/chunks/libs/p-limit.mjs +0 -1
- package/dist/chunks/libs/p-timeout.mjs +0 -1
- package/dist/chunks/libs/package-up.mjs +0 -1
- package/dist/chunks/libs/parse-ms.mjs +0 -1
- package/dist/chunks/libs/safe-stringify.mjs +0 -1
- package/dist/chunks/libs/strip-indent.mjs +0 -1
- package/dist/chunks/libs/tinyrainbow.mjs +0 -1
- package/dist/chunks/libs/ts-graphviz.mjs +0 -1
- package/dist/chunks/libs/unctx.mjs +0 -1
- package/dist/chunks/libs/vscode-languageserver.mjs +0 -1
- package/dist/chunks/libs/word-wrap.mjs +0 -12
- package/dist/vite-plugin/internal/chunks/libs/@nanostores/react.mjs +0 -1
- package/dist/vite-plugin/internal/chunks/libs/birpc.mjs +0 -1
- package/dist/vite-plugin/internal/chunks/libs/fast-equals.mjs +0 -1
- package/dist/vite-plugin/internal/chunks/libs/nanostores.mjs +0 -1
- package/dist/vite-plugin/internal/chunks/libs/remeda.mjs +0 -1
- package/dist/vite-plugin/internal/chunks/rolldown-runtime.mjs +0 -1
|
@@ -0,0 +1,458 @@
|
|
|
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
|
|
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
|
|
198
|
+
var z = R ? C : S, cancelTimeout = (o) => {
|
|
199
|
+
o && clearTimeout(o);
|
|
200
|
+
};
|
|
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));
|
|
208
|
+
}, []);
|
|
209
|
+
return S(() => (f(), d), [s]), [d, f];
|
|
210
|
+
}
|
|
211
|
+
//#endregion
|
|
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), {
|
|
261
|
+
shared: {},
|
|
262
|
+
...s
|
|
263
|
+
});
|
|
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);
|
|
271
|
+
};
|
|
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] = [];
|
|
282
|
+
}
|
|
283
|
+
}, q);
|
|
284
|
+
}, () => {
|
|
285
|
+
o.listen = c, o.off = l;
|
|
286
|
+
};
|
|
287
|
+
});
|
|
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
|
+
});
|
|
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;
|
|
313
|
+
function useDiagram() {
|
|
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
|
+
};
|
|
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";
|
|
381
|
+
//#endregion
|
|
382
|
+
//#region src/context/safeCtx.ts
|
|
383
|
+
var $ = _(null), re = $.Provider, useLikeC4ModelAtom = () => {
|
|
384
|
+
let o = x($);
|
|
385
|
+
if (o === null) throw Error("LikeC4ModelAtom is not provided");
|
|
386
|
+
return o;
|
|
387
|
+
};
|
|
388
|
+
//#endregion
|
|
389
|
+
//#region src/hooks.ts
|
|
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");
|
|
396
|
+
};
|
|
397
|
+
}, l = [c], s[0] = c, s[1] = t1, s[2] = l), z(t1, l);
|
|
398
|
+
}
|
|
399
|
+
function useLikeC4Views() {
|
|
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;
|
|
408
|
+
});
|
|
409
|
+
return p(s, c) ? s : c;
|
|
410
|
+
});
|
|
411
|
+
}), d = [s], o[1] = s, o[2] = t1, o[3] = d), S(t1, d), l;
|
|
412
|
+
}
|
|
413
|
+
function useCurrentViewId() {
|
|
414
|
+
let o = O(1), c;
|
|
415
|
+
return o[0] === Symbol.for("react.memo_cache_sentinel") ? (c = {
|
|
416
|
+
select: _temp,
|
|
417
|
+
strict: !1
|
|
418
|
+
}, o[0] = c) : c = o[0], s(c) ?? "index";
|
|
419
|
+
}
|
|
420
|
+
function _temp(o) {
|
|
421
|
+
return o.viewId;
|
|
422
|
+
}
|
|
423
|
+
function useCurrentView() {
|
|
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);
|
|
430
|
+
let t2;
|
|
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;
|
|
439
|
+
});
|
|
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;
|
|
447
|
+
}
|
|
448
|
+
function useCurrentProject() {
|
|
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;
|
|
453
|
+
}
|
|
454
|
+
function selectProjectIdFromContext(o) {
|
|
455
|
+
return o.find((o) => o.routeId === "/project/$projectId")?.params?.projectId ?? o.at(-1)?.context.projectId ?? void 0;
|
|
456
|
+
}
|
|
457
|
+
//#endregion
|
|
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 };
|