@tecture/web 0.1.0 → 0.1.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.
- package/CHANGELOG.md +9 -0
- package/dist-lib/App.js +790 -361
- package/dist-lib/App.js.map +1 -1
- package/dist-lib/architecture/OnboardingDemos.d.ts +4 -0
- package/dist-lib/architecture/OnboardingWizard.d.ts +8 -0
- package/dist-lib/architecture/useOnboarding.d.ts +14 -0
- package/dist-lib/style.css +1 -1
- package/package.json +1 -1
package/dist-lib/App.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsxs as r, jsx as e, Fragment as H } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo as
|
|
3
|
-
import { Position as
|
|
4
|
-
import
|
|
5
|
-
import { buildSourceUrl as
|
|
6
|
-
import
|
|
7
|
-
import { createPortal as
|
|
8
|
-
const
|
|
2
|
+
import { useMemo as F, createContext as se, memo as we, useContext as P, useCallback as C, useState as L, useEffect as B, useRef as V, useId as Ne, isValidElement as Ce } from "react";
|
|
3
|
+
import { Position as k, useNodeId as ce, useStore as de, NodeResizer as Le, Handle as X, Panel as Me, useInternalNode as Z, getSmoothStepPath as Be, EdgeLabelRenderer as Se, MarkerType as We, ReactFlowProvider as De, useNodesState as ze, useEdgesState as Ae, useReactFlow as Ee, ReactFlow as Fe, Background as He, BackgroundVariant as Pe, Controls as Te, MiniMap as Ie } from "@xyflow/react";
|
|
4
|
+
import je from "elkjs/lib/elk.bundled.js";
|
|
5
|
+
import { buildSourceUrl as Re, isDeepDivable as q, buildDeepDivePrompt as $e } from "@tecture/shared";
|
|
6
|
+
import Ge from "markdown-to-jsx";
|
|
7
|
+
import { createPortal as Ve } from "react-dom";
|
|
8
|
+
const I = {
|
|
9
9
|
backgrounds: [
|
|
10
10
|
{ token: "--bg-deep", value: "#0a0f1a", label: "Deep" },
|
|
11
11
|
{ token: "--bg-surface", value: "#0f1628", label: "Surface" },
|
|
@@ -28,7 +28,7 @@ const F = {
|
|
|
28
28
|
{ token: "--accent-amber-hover", value: "#fbbf24", label: "Amber Hover" },
|
|
29
29
|
{ token: "--accent-emerald", value: "#34d399", label: "Emerald" }
|
|
30
30
|
]
|
|
31
|
-
},
|
|
31
|
+
}, Oe = [
|
|
32
32
|
{ type: "System", accent: "#94a3b8", bg: "#1e293b" },
|
|
33
33
|
{ type: "Service", accent: "#818cf8", bg: "#1e1b4b" },
|
|
34
34
|
{ type: "Database", accent: "#34d399", bg: "#022c22" },
|
|
@@ -39,7 +39,7 @@ const F = {
|
|
|
39
39
|
{ type: "Storage", accent: "#2dd4bf", bg: "#042f2e" },
|
|
40
40
|
{ type: "External", accent: "#a1a1aa", bg: "#1c1c1e" }
|
|
41
41
|
];
|
|
42
|
-
function
|
|
42
|
+
function E({ number: t, children: a }) {
|
|
43
43
|
return /* @__PURE__ */ r("div", { className: "mb-10", children: [
|
|
44
44
|
/* @__PURE__ */ e("div", { className: "blueprint-annotation animate-fade-up", children: t }),
|
|
45
45
|
/* @__PURE__ */ e(
|
|
@@ -52,7 +52,7 @@ function A({ number: t, children: a }) {
|
|
|
52
52
|
)
|
|
53
53
|
] });
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function Q({ token: t, value: a, label: o }) {
|
|
56
56
|
return /* @__PURE__ */ r("div", { className: "group relative", children: [
|
|
57
57
|
/* @__PURE__ */ e(
|
|
58
58
|
"div",
|
|
@@ -68,7 +68,7 @@ function q({ token: t, value: a, label: o }) {
|
|
|
68
68
|
] })
|
|
69
69
|
] });
|
|
70
70
|
}
|
|
71
|
-
function
|
|
71
|
+
function _e() {
|
|
72
72
|
return /* @__PURE__ */ r("div", { className: "blueprint-grid animate-grid-reveal min-h-screen relative", children: [
|
|
73
73
|
/* @__PURE__ */ r(
|
|
74
74
|
"svg",
|
|
@@ -153,19 +153,19 @@ function Ve() {
|
|
|
153
153
|
)
|
|
154
154
|
] }),
|
|
155
155
|
/* @__PURE__ */ r("section", { className: "mx-auto max-w-5xl px-6 py-16", children: [
|
|
156
|
-
/* @__PURE__ */ e(
|
|
156
|
+
/* @__PURE__ */ e(E, { number: "Section 01", children: "Color Palette" }),
|
|
157
157
|
/* @__PURE__ */ r("div", { className: "space-y-12", children: [
|
|
158
158
|
/* @__PURE__ */ r("div", { children: [
|
|
159
159
|
/* @__PURE__ */ e("h3", { className: "mb-4 text-xs font-semibold uppercase tracking-wider", style: { color: "var(--text-muted)" }, children: "Backgrounds" }),
|
|
160
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-3 gap-4", children:
|
|
160
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-3 gap-4", children: I.backgrounds.map((t) => /* @__PURE__ */ e(Q, { ...t }, t.token)) })
|
|
161
161
|
] }),
|
|
162
162
|
/* @__PURE__ */ r("div", { children: [
|
|
163
163
|
/* @__PURE__ */ e("h3", { className: "mb-4 text-xs font-semibold uppercase tracking-wider", style: { color: "var(--text-muted)" }, children: "Borders" }),
|
|
164
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-3 gap-4", children:
|
|
164
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-3 gap-4", children: I.borders.map((t) => /* @__PURE__ */ e(Q, { ...t }, t.token)) })
|
|
165
165
|
] }),
|
|
166
166
|
/* @__PURE__ */ r("div", { children: [
|
|
167
167
|
/* @__PURE__ */ e("h3", { className: "mb-4 text-xs font-semibold uppercase tracking-wider", style: { color: "var(--text-muted)" }, children: "Text" }),
|
|
168
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-3 gap-4", children:
|
|
168
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-3 gap-4", children: I.text.map((t) => /* @__PURE__ */ r("div", { className: "group", children: [
|
|
169
169
|
/* @__PURE__ */ e(
|
|
170
170
|
"div",
|
|
171
171
|
{
|
|
@@ -183,7 +183,7 @@ function Ve() {
|
|
|
183
183
|
] }),
|
|
184
184
|
/* @__PURE__ */ r("div", { children: [
|
|
185
185
|
/* @__PURE__ */ e("h3", { className: "mb-4 text-xs font-semibold uppercase tracking-wider", style: { color: "var(--text-muted)" }, children: "Accents" }),
|
|
186
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-5 gap-4", children:
|
|
186
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-5 gap-4", children: I.accents.map((t) => /* @__PURE__ */ r("div", { className: "group", children: [
|
|
187
187
|
/* @__PURE__ */ e(
|
|
188
188
|
"div",
|
|
189
189
|
{
|
|
@@ -205,7 +205,7 @@ function Ve() {
|
|
|
205
205
|
] }),
|
|
206
206
|
/* @__PURE__ */ r("div", { children: [
|
|
207
207
|
/* @__PURE__ */ e("h3", { className: "mb-4 text-xs font-semibold uppercase tracking-wider", style: { color: "var(--text-muted)" }, children: "Diagram Node Types" }),
|
|
208
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-3 gap-3 sm:grid-cols-5", children:
|
|
208
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-3 gap-3 sm:grid-cols-5", children: Oe.map((t) => /* @__PURE__ */ r(
|
|
209
209
|
"div",
|
|
210
210
|
{
|
|
211
211
|
className: "border p-3",
|
|
@@ -222,7 +222,7 @@ function Ve() {
|
|
|
222
222
|
] })
|
|
223
223
|
] }),
|
|
224
224
|
/* @__PURE__ */ r("section", { className: "mx-auto max-w-5xl px-6 py-16", children: [
|
|
225
|
-
/* @__PURE__ */ e(
|
|
225
|
+
/* @__PURE__ */ e(E, { number: "Section 02", children: "Typography" }),
|
|
226
226
|
/* @__PURE__ */ r("div", { className: "space-y-12", children: [
|
|
227
227
|
/* @__PURE__ */ e("div", { className: "grid grid-cols-1 gap-6 sm:grid-cols-2", children: [
|
|
228
228
|
{
|
|
@@ -378,7 +378,7 @@ function Ve() {
|
|
|
378
378
|
] })
|
|
379
379
|
] }),
|
|
380
380
|
/* @__PURE__ */ r("section", { className: "mx-auto max-w-5xl px-6 py-16", children: [
|
|
381
|
-
/* @__PURE__ */ e(
|
|
381
|
+
/* @__PURE__ */ e(E, { number: "Section 03", children: "Components" }),
|
|
382
382
|
/* @__PURE__ */ r("div", { className: "space-y-16", children: [
|
|
383
383
|
/* @__PURE__ */ r("div", { children: [
|
|
384
384
|
/* @__PURE__ */ e("h3", { className: "mb-6 text-xs font-semibold uppercase tracking-wider", style: { color: "var(--text-muted)" }, children: "Buttons" }),
|
|
@@ -675,7 +675,7 @@ function Ve() {
|
|
|
675
675
|
] })
|
|
676
676
|
] }),
|
|
677
677
|
/* @__PURE__ */ r("section", { className: "mx-auto max-w-5xl px-6 py-16", children: [
|
|
678
|
-
/* @__PURE__ */ e(
|
|
678
|
+
/* @__PURE__ */ e(E, { number: "Section 04", children: "Animation & Motion" }),
|
|
679
679
|
/* @__PURE__ */ r("div", { className: "space-y-8", children: [
|
|
680
680
|
/* @__PURE__ */ e(
|
|
681
681
|
"div",
|
|
@@ -776,7 +776,7 @@ function Ve() {
|
|
|
776
776
|
] })
|
|
777
777
|
] }),
|
|
778
778
|
/* @__PURE__ */ r("section", { className: "mx-auto max-w-5xl px-6 py-16", children: [
|
|
779
|
-
/* @__PURE__ */ e(
|
|
779
|
+
/* @__PURE__ */ e(E, { number: "Section 05", children: "Layout & Spacing" }),
|
|
780
780
|
/* @__PURE__ */ r("div", { className: "space-y-10", children: [
|
|
781
781
|
/* @__PURE__ */ r("div", { children: [
|
|
782
782
|
/* @__PURE__ */ e("h3", { className: "mb-4 text-xs font-semibold uppercase tracking-wider", style: { color: "var(--text-muted)" }, children: "Container Widths" }),
|
|
@@ -880,7 +880,7 @@ function Ve() {
|
|
|
880
880
|
] })
|
|
881
881
|
] }),
|
|
882
882
|
/* @__PURE__ */ r("section", { className: "mx-auto max-w-5xl px-6 py-16", children: [
|
|
883
|
-
/* @__PURE__ */ e(
|
|
883
|
+
/* @__PURE__ */ e(E, { number: "Section 06", children: "Blueprint Decorations" }),
|
|
884
884
|
/* @__PURE__ */ r(
|
|
885
885
|
"div",
|
|
886
886
|
{
|
|
@@ -951,7 +951,7 @@ function Ve() {
|
|
|
951
951
|
)
|
|
952
952
|
] }),
|
|
953
953
|
/* @__PURE__ */ r("section", { className: "mx-auto max-w-5xl px-6 py-16", children: [
|
|
954
|
-
/* @__PURE__ */ e(
|
|
954
|
+
/* @__PURE__ */ e(E, { number: "Section 07", children: "Usage Guidelines" }),
|
|
955
955
|
/* @__PURE__ */ e("div", { className: "grid grid-cols-1 gap-6 sm:grid-cols-2", children: [
|
|
956
956
|
{
|
|
957
957
|
title: "Landing pages",
|
|
@@ -1040,7 +1040,7 @@ function Ve() {
|
|
|
1040
1040
|
) })
|
|
1041
1041
|
] });
|
|
1042
1042
|
}
|
|
1043
|
-
const
|
|
1043
|
+
const Ue = {
|
|
1044
1044
|
system: {
|
|
1045
1045
|
label: "System",
|
|
1046
1046
|
bg: "#0d1320",
|
|
@@ -1182,7 +1182,7 @@ const Oe = {
|
|
|
1182
1182
|
],
|
|
1183
1183
|
accentGlow: "rgba(161,161,170,0.08)"
|
|
1184
1184
|
}
|
|
1185
|
-
},
|
|
1185
|
+
}, J = {
|
|
1186
1186
|
label: "Component",
|
|
1187
1187
|
bg: "#0a0f1a",
|
|
1188
1188
|
bgHover: "#0f1628",
|
|
@@ -1195,59 +1195,59 @@ const Oe = {
|
|
|
1195
1195
|
],
|
|
1196
1196
|
accentGlow: "rgba(100,116,139,0.08)"
|
|
1197
1197
|
};
|
|
1198
|
-
function
|
|
1199
|
-
return t ?
|
|
1198
|
+
function _(t) {
|
|
1199
|
+
return t ? Ue[t] ?? J : J;
|
|
1200
1200
|
}
|
|
1201
|
-
function
|
|
1201
|
+
function j(t) {
|
|
1202
1202
|
var a, o;
|
|
1203
1203
|
return {
|
|
1204
1204
|
x: t.internals.positionAbsolute.x + (((a = t.measured) == null ? void 0 : a.width) ?? 0) / 2,
|
|
1205
1205
|
y: t.internals.positionAbsolute.y + (((o = t.measured) == null ? void 0 : o.height) ?? 0) / 2
|
|
1206
1206
|
};
|
|
1207
1207
|
}
|
|
1208
|
-
function
|
|
1209
|
-
const o =
|
|
1210
|
-
return l > i ? o.x > n.x ?
|
|
1208
|
+
function Ye(t, a) {
|
|
1209
|
+
const o = j(t), n = j(a), l = Math.abs(o.x - n.x), i = Math.abs(o.y - n.y);
|
|
1210
|
+
return l > i ? o.x > n.x ? k.Left : k.Right : o.y > n.y ? k.Top : k.Bottom;
|
|
1211
1211
|
}
|
|
1212
|
-
function
|
|
1213
|
-
const n =
|
|
1212
|
+
function ee(t, a, o) {
|
|
1213
|
+
const n = j(t), l = j(a), i = Math.abs(n.x - l.x), s = Math.abs(n.y - l.y);
|
|
1214
1214
|
let c;
|
|
1215
|
-
i > s ? c = n.x > l.x ?
|
|
1216
|
-
const [
|
|
1217
|
-
return [
|
|
1215
|
+
i > s ? c = n.x > l.x ? k.Left : k.Right : c = n.y > l.y ? k.Top : k.Bottom;
|
|
1216
|
+
const [h, d] = Ke(t, c, o);
|
|
1217
|
+
return [h, d, c];
|
|
1218
1218
|
}
|
|
1219
|
-
function
|
|
1220
|
-
var d,
|
|
1221
|
-
const n = (d = t.internals.handleBounds) == null ? void 0 : d[o], l = n == null ? void 0 : n.find((
|
|
1219
|
+
function Ke(t, a, o) {
|
|
1220
|
+
var d, u, g;
|
|
1221
|
+
const n = (d = t.internals.handleBounds) == null ? void 0 : d[o], l = n == null ? void 0 : n.find((b) => b.position === a);
|
|
1222
1222
|
if (!l)
|
|
1223
1223
|
return [
|
|
1224
|
-
t.internals.positionAbsolute.x + (((
|
|
1224
|
+
t.internals.positionAbsolute.x + (((u = t.measured) == null ? void 0 : u.width) ?? 0) / 2,
|
|
1225
1225
|
t.internals.positionAbsolute.y + (((g = t.measured) == null ? void 0 : g.height) ?? 0) / 2
|
|
1226
1226
|
];
|
|
1227
1227
|
let i = l.width / 2, s = l.height / 2;
|
|
1228
1228
|
switch (a) {
|
|
1229
|
-
case
|
|
1229
|
+
case k.Left:
|
|
1230
1230
|
i = 0;
|
|
1231
1231
|
break;
|
|
1232
|
-
case
|
|
1232
|
+
case k.Right:
|
|
1233
1233
|
i = l.width;
|
|
1234
1234
|
break;
|
|
1235
|
-
case
|
|
1235
|
+
case k.Top:
|
|
1236
1236
|
s = 0;
|
|
1237
1237
|
break;
|
|
1238
|
-
case
|
|
1238
|
+
case k.Bottom:
|
|
1239
1239
|
s = l.height;
|
|
1240
1240
|
break;
|
|
1241
1241
|
}
|
|
1242
|
-
const c = t.internals.positionAbsolute.x + l.x + i,
|
|
1243
|
-
return [c,
|
|
1242
|
+
const c = t.internals.positionAbsolute.x + l.x + i, h = t.internals.positionAbsolute.y + l.y + s;
|
|
1243
|
+
return [c, h];
|
|
1244
1244
|
}
|
|
1245
|
-
function
|
|
1246
|
-
const [o, n, l] =
|
|
1245
|
+
function Xe(t, a) {
|
|
1246
|
+
const [o, n, l] = ee(t, a, "source"), [i, s, c] = ee(a, t, "target");
|
|
1247
1247
|
return { sx: o, sy: n, tx: i, ty: s, sourcePos: l, targetPos: c };
|
|
1248
1248
|
}
|
|
1249
|
-
function
|
|
1250
|
-
const t =
|
|
1249
|
+
function Ze() {
|
|
1250
|
+
const t = ce(), a = de((o) => {
|
|
1251
1251
|
if (!t) return /* @__PURE__ */ new Set();
|
|
1252
1252
|
const n = o.nodeLookup.get(t);
|
|
1253
1253
|
if (!n) return /* @__PURE__ */ new Set();
|
|
@@ -1256,24 +1256,24 @@ function Xe() {
|
|
|
1256
1256
|
let s = null;
|
|
1257
1257
|
if (i.source === t ? s = i.target : i.target === t && (s = i.source), !s) continue;
|
|
1258
1258
|
const c = o.nodeLookup.get(s);
|
|
1259
|
-
c && l.add(
|
|
1259
|
+
c && l.add(Ye(n, c));
|
|
1260
1260
|
}
|
|
1261
1261
|
return l;
|
|
1262
1262
|
});
|
|
1263
|
-
return
|
|
1263
|
+
return F(() => a, [a]);
|
|
1264
1264
|
}
|
|
1265
|
-
const
|
|
1266
|
-
{ position:
|
|
1267
|
-
{ position:
|
|
1268
|
-
{ position:
|
|
1269
|
-
{ position:
|
|
1265
|
+
const me = se(null), ue = [
|
|
1266
|
+
{ position: k.Top, prefix: "top" },
|
|
1267
|
+
{ position: k.Bottom, prefix: "bottom" },
|
|
1268
|
+
{ position: k.Left, prefix: "left" },
|
|
1269
|
+
{ position: k.Right, prefix: "right" }
|
|
1270
1270
|
];
|
|
1271
|
-
function
|
|
1272
|
-
const o = t, n =
|
|
1271
|
+
function qe({ data: t, selected: a }) {
|
|
1272
|
+
const o = t, n = _(o.nodeType), l = Ze(), i = (s) => {
|
|
1273
1273
|
s.stopPropagation(), o.subDiagramId && (window.location.hash = `#/diagram/${o.subDiagramId}`);
|
|
1274
1274
|
};
|
|
1275
1275
|
return o.isContainer || o.hasChildren ? /* @__PURE__ */ e(
|
|
1276
|
-
|
|
1276
|
+
Je,
|
|
1277
1277
|
{
|
|
1278
1278
|
d: o,
|
|
1279
1279
|
style: n,
|
|
@@ -1294,16 +1294,16 @@ function Ke({ data: t, selected: a }) {
|
|
|
1294
1294
|
"--tw-ring-color": o.hasSubDiagram ? n.accent : void 0
|
|
1295
1295
|
},
|
|
1296
1296
|
children: [
|
|
1297
|
-
/* @__PURE__ */ e(
|
|
1298
|
-
|
|
1299
|
-
const
|
|
1297
|
+
/* @__PURE__ */ e(he, { accent: n.accent }),
|
|
1298
|
+
ue.map(({ position: s, prefix: c }) => {
|
|
1299
|
+
const h = l.has(s);
|
|
1300
1300
|
return /* @__PURE__ */ e(
|
|
1301
|
-
|
|
1301
|
+
pe,
|
|
1302
1302
|
{
|
|
1303
1303
|
position: s,
|
|
1304
1304
|
prefix: c,
|
|
1305
1305
|
style: n,
|
|
1306
|
-
isActive:
|
|
1306
|
+
isActive: h
|
|
1307
1307
|
},
|
|
1308
1308
|
c
|
|
1309
1309
|
);
|
|
@@ -1365,7 +1365,7 @@ function Ke({ data: t, selected: a }) {
|
|
|
1365
1365
|
},
|
|
1366
1366
|
children: [
|
|
1367
1367
|
/* @__PURE__ */ e("span", { children: "Drill down" }),
|
|
1368
|
-
/* @__PURE__ */ e(
|
|
1368
|
+
/* @__PURE__ */ e(ge, {})
|
|
1369
1369
|
]
|
|
1370
1370
|
}
|
|
1371
1371
|
)
|
|
@@ -1373,26 +1373,26 @@ function Ke({ data: t, selected: a }) {
|
|
|
1373
1373
|
}
|
|
1374
1374
|
);
|
|
1375
1375
|
}
|
|
1376
|
-
const
|
|
1377
|
-
function
|
|
1378
|
-
const i =
|
|
1376
|
+
const te = 16, Qe = 48;
|
|
1377
|
+
function Je({ d: t, style: a, selected: o, activeSides: n, onDrillDown: l }) {
|
|
1378
|
+
const i = ce(), s = P(me), c = C(() => {
|
|
1379
1379
|
s == null || s.notifyLayoutChanged();
|
|
1380
|
-
}, [s]),
|
|
1381
|
-
|
|
1380
|
+
}, [s]), h = de(
|
|
1381
|
+
C(
|
|
1382
1382
|
(d) => {
|
|
1383
|
-
var f, x, w
|
|
1384
|
-
let
|
|
1385
|
-
if (!i) return { minWidth:
|
|
1383
|
+
var b, f, x, w;
|
|
1384
|
+
let u = 200, g = Qe + 40;
|
|
1385
|
+
if (!i) return { minWidth: u, minHeight: g };
|
|
1386
1386
|
for (const m of d.nodeLookup.values()) {
|
|
1387
1387
|
if (m.parentId !== i) continue;
|
|
1388
|
-
const p = ((
|
|
1389
|
-
N >
|
|
1388
|
+
const p = ((b = m.measured) == null ? void 0 : b.width) ?? 220, v = ((f = m.measured) == null ? void 0 : f.height) ?? 80, N = (((x = m.position) == null ? void 0 : x.x) ?? 0) + p + te, y = (((w = m.position) == null ? void 0 : w.y) ?? 0) + v + te;
|
|
1389
|
+
N > u && (u = N), y > g && (g = y);
|
|
1390
1390
|
}
|
|
1391
|
-
return { minWidth:
|
|
1391
|
+
return { minWidth: u, minHeight: g };
|
|
1392
1392
|
},
|
|
1393
1393
|
[i]
|
|
1394
1394
|
),
|
|
1395
|
-
(d,
|
|
1395
|
+
(d, u) => d.minWidth === u.minWidth && d.minHeight === u.minHeight
|
|
1396
1396
|
);
|
|
1397
1397
|
return /* @__PURE__ */ r(
|
|
1398
1398
|
"div",
|
|
@@ -1409,11 +1409,11 @@ function qe({ d: t, style: a, selected: o, activeSides: n, onDrillDown: l }) {
|
|
|
1409
1409
|
},
|
|
1410
1410
|
children: [
|
|
1411
1411
|
/* @__PURE__ */ e(
|
|
1412
|
-
|
|
1412
|
+
Le,
|
|
1413
1413
|
{
|
|
1414
1414
|
isVisible: o,
|
|
1415
|
-
minWidth:
|
|
1416
|
-
minHeight:
|
|
1415
|
+
minWidth: h.minWidth,
|
|
1416
|
+
minHeight: h.minHeight,
|
|
1417
1417
|
onResizeEnd: c,
|
|
1418
1418
|
lineStyle: {
|
|
1419
1419
|
borderColor: `${a.accent}55`,
|
|
@@ -1429,18 +1429,18 @@ function qe({ d: t, style: a, selected: o, activeSides: n, onDrillDown: l }) {
|
|
|
1429
1429
|
}
|
|
1430
1430
|
}
|
|
1431
1431
|
),
|
|
1432
|
-
/* @__PURE__ */ e(
|
|
1433
|
-
|
|
1432
|
+
/* @__PURE__ */ e(he, { accent: a.accent }),
|
|
1433
|
+
ue.map(({ position: d, prefix: u }) => {
|
|
1434
1434
|
const g = n.has(d);
|
|
1435
1435
|
return /* @__PURE__ */ e(
|
|
1436
|
-
|
|
1436
|
+
pe,
|
|
1437
1437
|
{
|
|
1438
1438
|
position: d,
|
|
1439
|
-
prefix:
|
|
1439
|
+
prefix: u,
|
|
1440
1440
|
style: a,
|
|
1441
1441
|
isActive: g
|
|
1442
1442
|
},
|
|
1443
|
-
|
|
1443
|
+
u
|
|
1444
1444
|
);
|
|
1445
1445
|
}),
|
|
1446
1446
|
/* @__PURE__ */ r(
|
|
@@ -1463,7 +1463,7 @@ function qe({ d: t, style: a, selected: o, activeSides: n, onDrillDown: l }) {
|
|
|
1463
1463
|
strokeLinecap: "round",
|
|
1464
1464
|
strokeLinejoin: "round",
|
|
1465
1465
|
className: "shrink-0",
|
|
1466
|
-
children: a.iconPaths.map((d,
|
|
1466
|
+
children: a.iconPaths.map((d, u) => /* @__PURE__ */ e(
|
|
1467
1467
|
"path",
|
|
1468
1468
|
{
|
|
1469
1469
|
d: d.d,
|
|
@@ -1472,7 +1472,7 @@ function qe({ d: t, style: a, selected: o, activeSides: n, onDrillDown: l }) {
|
|
|
1472
1472
|
strokeWidth: d.strokeWidth ?? 0,
|
|
1473
1473
|
opacity: d.opacity ?? 1
|
|
1474
1474
|
},
|
|
1475
|
-
|
|
1475
|
+
u
|
|
1476
1476
|
))
|
|
1477
1477
|
}
|
|
1478
1478
|
),
|
|
@@ -1511,7 +1511,7 @@ function qe({ d: t, style: a, selected: o, activeSides: n, onDrillDown: l }) {
|
|
|
1511
1511
|
},
|
|
1512
1512
|
children: [
|
|
1513
1513
|
/* @__PURE__ */ e("span", { children: "Drill down" }),
|
|
1514
|
-
/* @__PURE__ */ e(
|
|
1514
|
+
/* @__PURE__ */ e(ge, {})
|
|
1515
1515
|
]
|
|
1516
1516
|
}
|
|
1517
1517
|
)
|
|
@@ -1522,7 +1522,7 @@ function qe({ d: t, style: a, selected: o, activeSides: n, onDrillDown: l }) {
|
|
|
1522
1522
|
}
|
|
1523
1523
|
);
|
|
1524
1524
|
}
|
|
1525
|
-
function
|
|
1525
|
+
function he({ accent: t }) {
|
|
1526
1526
|
return /* @__PURE__ */ r(H, { children: [
|
|
1527
1527
|
/* @__PURE__ */ e(
|
|
1528
1528
|
"svg",
|
|
@@ -1564,7 +1564,7 @@ function ue({ accent: t }) {
|
|
|
1564
1564
|
)
|
|
1565
1565
|
] });
|
|
1566
1566
|
}
|
|
1567
|
-
function
|
|
1567
|
+
function pe({
|
|
1568
1568
|
position: t,
|
|
1569
1569
|
prefix: a,
|
|
1570
1570
|
style: o,
|
|
@@ -1603,7 +1603,7 @@ function he({
|
|
|
1603
1603
|
)
|
|
1604
1604
|
] });
|
|
1605
1605
|
}
|
|
1606
|
-
function
|
|
1606
|
+
function ge() {
|
|
1607
1607
|
return /* @__PURE__ */ e(
|
|
1608
1608
|
"svg",
|
|
1609
1609
|
{
|
|
@@ -1619,33 +1619,33 @@ function pe() {
|
|
|
1619
1619
|
}
|
|
1620
1620
|
);
|
|
1621
1621
|
}
|
|
1622
|
-
const
|
|
1622
|
+
const et = we(qe), tt = {
|
|
1623
1623
|
calls: { color: "#818cf8", dashed: !1, animated: !1, label: "Calls" },
|
|
1624
1624
|
"data-flow": { color: "#34d399", dashed: !1, animated: !0, label: "Data Flow" },
|
|
1625
1625
|
publishes: { color: "#fbbf24", dashed: !0, animated: !1, label: "Publishes" },
|
|
1626
1626
|
subscribes: { color: "#fbbf24", dashed: !0, animated: !1, label: "Subscribes" },
|
|
1627
1627
|
reads: { color: "#34d399", dashed: !1, animated: !1, label: "Reads" },
|
|
1628
1628
|
writes: { color: "#fb923c", dashed: !1, animated: !1, label: "Writes" }
|
|
1629
|
-
},
|
|
1629
|
+
}, re = {
|
|
1630
1630
|
color: "#22d3ee",
|
|
1631
1631
|
dashed: !1,
|
|
1632
1632
|
animated: !1,
|
|
1633
1633
|
label: "Connection"
|
|
1634
1634
|
};
|
|
1635
|
-
function
|
|
1636
|
-
return t ?
|
|
1635
|
+
function fe(t) {
|
|
1636
|
+
return t ? tt[t] ?? re : re;
|
|
1637
1637
|
}
|
|
1638
|
-
function
|
|
1639
|
-
const [a, o] =
|
|
1640
|
-
var c,
|
|
1638
|
+
function rt({ diagram: t }) {
|
|
1639
|
+
const [a, o] = L(!1), { nodeTypes: n, edgeTypes: l } = F(() => {
|
|
1640
|
+
var c, h;
|
|
1641
1641
|
const i = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set();
|
|
1642
1642
|
for (const d of t.nodes)
|
|
1643
1643
|
typeof ((c = d.meta) == null ? void 0 : c.type) == "string" && i.add(d.meta.type);
|
|
1644
1644
|
for (const d of t.edges)
|
|
1645
|
-
typeof ((
|
|
1645
|
+
typeof ((h = d.meta) == null ? void 0 : h.type) == "string" && s.add(d.meta.type);
|
|
1646
1646
|
return { nodeTypes: [...i].sort(), edgeTypes: [...s].sort() };
|
|
1647
1647
|
}, [t]);
|
|
1648
|
-
return n.length === 0 && l.length === 0 ? null : /* @__PURE__ */ e(
|
|
1648
|
+
return n.length === 0 && l.length === 0 ? null : /* @__PURE__ */ e(Me, { position: "top-right", className: "!m-3", children: /* @__PURE__ */ r(
|
|
1649
1649
|
"div",
|
|
1650
1650
|
{
|
|
1651
1651
|
className: "flex flex-col border shadow-lg backdrop-blur-md",
|
|
@@ -1665,9 +1665,9 @@ function et({ diagram: t }) {
|
|
|
1665
1665
|
style: { color: "var(--text-muted, #94a3b8)" },
|
|
1666
1666
|
"aria-expanded": a,
|
|
1667
1667
|
children: [
|
|
1668
|
-
/* @__PURE__ */ e(
|
|
1668
|
+
/* @__PURE__ */ e(lt, {}),
|
|
1669
1669
|
/* @__PURE__ */ e("span", { children: "Legend" }),
|
|
1670
|
-
/* @__PURE__ */ e(
|
|
1670
|
+
/* @__PURE__ */ e(it, { open: a })
|
|
1671
1671
|
]
|
|
1672
1672
|
}
|
|
1673
1673
|
),
|
|
@@ -1677,8 +1677,8 @@ function et({ diagram: t }) {
|
|
|
1677
1677
|
className: "flex flex-col gap-3 border-t px-3 py-2.5",
|
|
1678
1678
|
style: { borderColor: "#1e2d4a", minWidth: 180 },
|
|
1679
1679
|
children: [
|
|
1680
|
-
n.length > 0 && /* @__PURE__ */ e(
|
|
1681
|
-
l.length > 0 && /* @__PURE__ */ e(
|
|
1680
|
+
n.length > 0 && /* @__PURE__ */ e(ae, { title: "Nodes", children: n.map((i) => /* @__PURE__ */ e(at, { type: i, style: _(i) }, i)) }),
|
|
1681
|
+
l.length > 0 && /* @__PURE__ */ e(ae, { title: "Edges", children: l.map((i) => /* @__PURE__ */ e(ot, { style: fe(i) }, i)) })
|
|
1682
1682
|
]
|
|
1683
1683
|
}
|
|
1684
1684
|
)
|
|
@@ -1686,7 +1686,7 @@ function et({ diagram: t }) {
|
|
|
1686
1686
|
}
|
|
1687
1687
|
) });
|
|
1688
1688
|
}
|
|
1689
|
-
function
|
|
1689
|
+
function ae({
|
|
1690
1690
|
title: t,
|
|
1691
1691
|
children: a
|
|
1692
1692
|
}) {
|
|
@@ -1702,14 +1702,14 @@ function re({
|
|
|
1702
1702
|
/* @__PURE__ */ e("div", { className: "flex flex-col gap-1", children: a })
|
|
1703
1703
|
] });
|
|
1704
1704
|
}
|
|
1705
|
-
function
|
|
1705
|
+
function at({ type: t, style: a }) {
|
|
1706
1706
|
return /* @__PURE__ */ r("div", { className: "flex items-center gap-2 text-[11px]", children: [
|
|
1707
1707
|
/* @__PURE__ */ e(
|
|
1708
1708
|
"span",
|
|
1709
1709
|
{
|
|
1710
1710
|
className: "flex h-6 w-6 shrink-0 items-center justify-center border",
|
|
1711
1711
|
style: { background: a.bg, borderColor: a.border },
|
|
1712
|
-
children: /* @__PURE__ */ e("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", children: a.iconPaths.map((o, n) => /* @__PURE__ */ e(
|
|
1712
|
+
children: /* @__PURE__ */ e("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", children: a.iconPaths.map((o, n) => /* @__PURE__ */ e(nt, { p: o }, n)) })
|
|
1713
1713
|
}
|
|
1714
1714
|
),
|
|
1715
1715
|
/* @__PURE__ */ e("span", { style: { color: a.accent }, children: a.label }),
|
|
@@ -1723,7 +1723,7 @@ function tt({ type: t, style: a }) {
|
|
|
1723
1723
|
)
|
|
1724
1724
|
] });
|
|
1725
1725
|
}
|
|
1726
|
-
function
|
|
1726
|
+
function ot({ style: t }) {
|
|
1727
1727
|
const a = t.dashed ? "4 3" : void 0;
|
|
1728
1728
|
return /* @__PURE__ */ r("div", { className: "flex items-center gap-2 text-[11px]", children: [
|
|
1729
1729
|
/* @__PURE__ */ r("svg", { width: "28", height: "10", className: "shrink-0", children: [
|
|
@@ -1760,7 +1760,7 @@ function rt({ style: t }) {
|
|
|
1760
1760
|
/* @__PURE__ */ e("span", { style: { color: t.color }, children: t.label })
|
|
1761
1761
|
] });
|
|
1762
1762
|
}
|
|
1763
|
-
function
|
|
1763
|
+
function nt({ p: t }) {
|
|
1764
1764
|
return /* @__PURE__ */ e(
|
|
1765
1765
|
"path",
|
|
1766
1766
|
{
|
|
@@ -1774,7 +1774,7 @@ function at({ p: t }) {
|
|
|
1774
1774
|
}
|
|
1775
1775
|
);
|
|
1776
1776
|
}
|
|
1777
|
-
function
|
|
1777
|
+
function lt() {
|
|
1778
1778
|
return /* @__PURE__ */ r("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", children: [
|
|
1779
1779
|
/* @__PURE__ */ e("rect", { x: "3", y: "4", width: "7", height: "7", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
1780
1780
|
/* @__PURE__ */ e("rect", { x: "14", y: "4", width: "7", height: "7", stroke: "currentColor", strokeWidth: "1.5", opacity: "0.6" }),
|
|
@@ -1782,7 +1782,7 @@ function ot() {
|
|
|
1782
1782
|
/* @__PURE__ */ e("rect", { x: "14", y: "14", width: "7", height: "7", stroke: "currentColor", strokeWidth: "1.5", opacity: "0.15" })
|
|
1783
1783
|
] });
|
|
1784
1784
|
}
|
|
1785
|
-
function
|
|
1785
|
+
function it({ open: t }) {
|
|
1786
1786
|
return /* @__PURE__ */ e(
|
|
1787
1787
|
"svg",
|
|
1788
1788
|
{
|
|
@@ -1802,7 +1802,7 @@ function nt({ open: t }) {
|
|
|
1802
1802
|
}
|
|
1803
1803
|
);
|
|
1804
1804
|
}
|
|
1805
|
-
function
|
|
1805
|
+
function st({
|
|
1806
1806
|
id: t,
|
|
1807
1807
|
source: a,
|
|
1808
1808
|
target: o,
|
|
@@ -1811,21 +1811,21 @@ function lt({
|
|
|
1811
1811
|
label: i,
|
|
1812
1812
|
labelStyle: s,
|
|
1813
1813
|
labelBgStyle: c,
|
|
1814
|
-
labelBgPadding:
|
|
1814
|
+
labelBgPadding: h,
|
|
1815
1815
|
labelBgBorderRadius: d,
|
|
1816
|
-
animated:
|
|
1816
|
+
animated: u
|
|
1817
1817
|
}) {
|
|
1818
|
-
const g =
|
|
1819
|
-
if (!g || !
|
|
1820
|
-
const { sx:
|
|
1818
|
+
const g = Z(a), b = Z(o);
|
|
1819
|
+
if (!g || !b) return null;
|
|
1820
|
+
const { sx: f, sy: x, tx: w, ty: m, sourcePos: p, targetPos: v } = Xe(
|
|
1821
1821
|
g,
|
|
1822
|
-
|
|
1823
|
-
), [N,
|
|
1824
|
-
sourceX:
|
|
1825
|
-
sourceY:
|
|
1822
|
+
b
|
|
1823
|
+
), [N, y, M] = Be({
|
|
1824
|
+
sourceX: f,
|
|
1825
|
+
sourceY: x,
|
|
1826
1826
|
sourcePosition: p,
|
|
1827
|
-
targetPosition:
|
|
1828
|
-
targetX:
|
|
1827
|
+
targetPosition: v,
|
|
1828
|
+
targetX: w,
|
|
1829
1829
|
targetY: m,
|
|
1830
1830
|
borderRadius: 8
|
|
1831
1831
|
});
|
|
@@ -1834,23 +1834,23 @@ function lt({
|
|
|
1834
1834
|
"path",
|
|
1835
1835
|
{
|
|
1836
1836
|
id: t,
|
|
1837
|
-
className: `react-flow__edge-path${
|
|
1837
|
+
className: `react-flow__edge-path${u ? " react-flow__edge-path--animated" : ""}`,
|
|
1838
1838
|
d: N,
|
|
1839
1839
|
markerEnd: n,
|
|
1840
1840
|
style: l
|
|
1841
1841
|
}
|
|
1842
1842
|
),
|
|
1843
|
-
i && /* @__PURE__ */ e(
|
|
1843
|
+
i && /* @__PURE__ */ e(Se, { children: /* @__PURE__ */ e(
|
|
1844
1844
|
"div",
|
|
1845
1845
|
{
|
|
1846
1846
|
style: {
|
|
1847
1847
|
position: "absolute",
|
|
1848
|
-
transform: `translate(-50%, -50%) translate(${
|
|
1848
|
+
transform: `translate(-50%, -50%) translate(${y}px, ${M}px)`,
|
|
1849
1849
|
pointerEvents: "all",
|
|
1850
1850
|
...c ? {
|
|
1851
|
-
background:
|
|
1851
|
+
background: ct(c),
|
|
1852
1852
|
borderRadius: d ?? 4,
|
|
1853
|
-
padding:
|
|
1853
|
+
padding: h ? `${h[1]}px ${h[0]}px` : "4px 6px"
|
|
1854
1854
|
} : {}
|
|
1855
1855
|
},
|
|
1856
1856
|
children: /* @__PURE__ */ e("span", { style: s, children: i })
|
|
@@ -1858,24 +1858,24 @@ function lt({
|
|
|
1858
1858
|
) })
|
|
1859
1859
|
] });
|
|
1860
1860
|
}
|
|
1861
|
-
function
|
|
1861
|
+
function ct(t) {
|
|
1862
1862
|
const a = t, o = a.fill ?? "#0a0f1a", n = a.fillOpacity ?? 1;
|
|
1863
1863
|
if (n >= 1) return o;
|
|
1864
1864
|
const l = o.replace("#", "");
|
|
1865
1865
|
if (l.length !== 3 && l.length !== 6) return o;
|
|
1866
|
-
const i = l.length === 3 ? l.split("").map((d) => d + d).join("") : l, s = parseInt(i.slice(0, 2), 16), c = parseInt(i.slice(2, 4), 16),
|
|
1867
|
-
return `rgba(${s}, ${c}, ${
|
|
1866
|
+
const i = l.length === 3 ? l.split("").map((d) => d + d).join("") : l, s = parseInt(i.slice(0, 2), 16), c = parseInt(i.slice(2, 4), 16), h = parseInt(i.slice(4, 6), 16);
|
|
1867
|
+
return `rgba(${s}, ${c}, ${h}, ${n})`;
|
|
1868
1868
|
}
|
|
1869
|
-
function
|
|
1869
|
+
function dt(t) {
|
|
1870
1870
|
const a = new Set(t.nodes.map((n) => n.id)), o = /* @__PURE__ */ new Map();
|
|
1871
1871
|
for (const n of t.nodes)
|
|
1872
1872
|
n.parentId && a.has(n.parentId) && o.set(n.parentId, (o.get(n.parentId) ?? 0) + 1);
|
|
1873
1873
|
return {
|
|
1874
|
-
nodes: t.nodes.map((n) =>
|
|
1875
|
-
edges: t.edges.filter((n) => a.has(n.source) && a.has(n.target)).map(
|
|
1874
|
+
nodes: t.nodes.map((n) => mt(n, o.has(n.id))),
|
|
1875
|
+
edges: t.edges.filter((n) => a.has(n.source) && a.has(n.target)).map(ut)
|
|
1876
1876
|
};
|
|
1877
1877
|
}
|
|
1878
|
-
function
|
|
1878
|
+
function mt(t, a) {
|
|
1879
1879
|
var i, s, c;
|
|
1880
1880
|
const o = !!((i = t.meta) != null && i.isContainer) || a, n = {
|
|
1881
1881
|
label: t.label,
|
|
@@ -1893,9 +1893,9 @@ function ct(t, a) {
|
|
|
1893
1893
|
};
|
|
1894
1894
|
return t.parentId && (l.parentId = t.parentId, l.extent = "parent"), l;
|
|
1895
1895
|
}
|
|
1896
|
-
function
|
|
1896
|
+
function ut(t) {
|
|
1897
1897
|
var n;
|
|
1898
|
-
const a =
|
|
1898
|
+
const a = fe((n = t.meta) == null ? void 0 : n.type), o = { strokeWidth: 1.5, stroke: a.color };
|
|
1899
1899
|
return a.dashed && (o.strokeDasharray = "5 5"), {
|
|
1900
1900
|
id: t.id,
|
|
1901
1901
|
source: t.source,
|
|
@@ -1905,7 +1905,7 @@ function dt(t) {
|
|
|
1905
1905
|
animated: a.animated,
|
|
1906
1906
|
style: o,
|
|
1907
1907
|
markerEnd: {
|
|
1908
|
-
type:
|
|
1908
|
+
type: We.ArrowClosed,
|
|
1909
1909
|
width: 16,
|
|
1910
1910
|
height: 16,
|
|
1911
1911
|
color: a.color
|
|
@@ -1925,29 +1925,29 @@ function dt(t) {
|
|
|
1925
1925
|
labelBgBorderRadius: 4
|
|
1926
1926
|
};
|
|
1927
1927
|
}
|
|
1928
|
-
const
|
|
1929
|
-
function
|
|
1928
|
+
const ht = new je(), oe = 220, ne = 80, pt = "[top=48,left=16,bottom=16,right=16]";
|
|
1929
|
+
function gt(t) {
|
|
1930
1930
|
return t === "LR" ? "RIGHT" : "DOWN";
|
|
1931
1931
|
}
|
|
1932
|
-
async function
|
|
1932
|
+
async function ft(t, a, o, n) {
|
|
1933
1933
|
if (t.length === 0) return t;
|
|
1934
1934
|
const l = /* @__PURE__ */ new Map();
|
|
1935
1935
|
for (const m of t) {
|
|
1936
|
-
const p = m.parentId ?? void 0,
|
|
1937
|
-
|
|
1936
|
+
const p = m.parentId ?? void 0, v = l.get(p) ?? [];
|
|
1937
|
+
v.push(m), l.set(p, v);
|
|
1938
1938
|
}
|
|
1939
1939
|
const i = (m) => {
|
|
1940
1940
|
var p;
|
|
1941
1941
|
return (((p = l.get(m)) == null ? void 0 : p.length) ?? 0) > 0;
|
|
1942
1942
|
}, s = (m) => i(m.id) ? {
|
|
1943
1943
|
id: m.id,
|
|
1944
|
-
layoutOptions: { "elk.padding":
|
|
1944
|
+
layoutOptions: { "elk.padding": pt },
|
|
1945
1945
|
children: (l.get(m.id) ?? []).map(s)
|
|
1946
|
-
} : { id: m.id, width:
|
|
1946
|
+
} : { id: m.id, width: oe, height: ne }, c = l.get(void 0) ?? [], h = {
|
|
1947
1947
|
id: "root",
|
|
1948
1948
|
layoutOptions: {
|
|
1949
1949
|
"elk.algorithm": "layered",
|
|
1950
|
-
"elk.direction":
|
|
1950
|
+
"elk.direction": gt(o),
|
|
1951
1951
|
"elk.edgeRouting": "ORTHOGONAL",
|
|
1952
1952
|
"elk.spacing.nodeNode": "80",
|
|
1953
1953
|
"elk.layered.spacing.nodeNodeBetweenLayers": "120",
|
|
@@ -1960,38 +1960,38 @@ async function pt(t, a, o, n) {
|
|
|
1960
1960
|
sources: [m.source],
|
|
1961
1961
|
targets: [m.target]
|
|
1962
1962
|
}))
|
|
1963
|
-
}, d = await
|
|
1964
|
-
m.id !== "root" && (
|
|
1965
|
-
width: m.width ??
|
|
1966
|
-
height: m.height ??
|
|
1963
|
+
}, d = await ht.layout(h), u = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map(), b = (m) => {
|
|
1964
|
+
m.id !== "root" && (u.set(m.id, { x: m.x ?? 0, y: m.y ?? 0 }), i(m.id) && g.set(m.id, {
|
|
1965
|
+
width: m.width ?? oe,
|
|
1966
|
+
height: m.height ?? ne
|
|
1967
1967
|
}));
|
|
1968
|
-
for (const p of m.children ?? [])
|
|
1968
|
+
for (const p of m.children ?? []) b(p);
|
|
1969
1969
|
};
|
|
1970
|
-
|
|
1971
|
-
const
|
|
1972
|
-
if (
|
|
1973
|
-
|
|
1974
|
-
const p = n == null ? void 0 : n.nodes[m.id],
|
|
1975
|
-
|
|
1976
|
-
for (const
|
|
1970
|
+
b(d);
|
|
1971
|
+
const f = /* @__PURE__ */ new Set(), x = [], w = (m) => {
|
|
1972
|
+
if (f.has(m.id)) return;
|
|
1973
|
+
f.add(m.id);
|
|
1974
|
+
const p = n == null ? void 0 : n.nodes[m.id], v = p ? { x: p.x, y: p.y } : u.get(m.id) ?? { x: 0, y: 0 }, N = { ...m, position: v }, y = g.get(m.id), M = (p == null ? void 0 : p.width) ?? (y == null ? void 0 : y.width), D = (p == null ? void 0 : p.height) ?? (y == null ? void 0 : y.height);
|
|
1975
|
+
M !== void 0 && D !== void 0 && (N.style = { ...m.style ?? {}, width: M, height: D }), x.push(N);
|
|
1976
|
+
for (const $ of l.get(m.id) ?? []) w($);
|
|
1977
1977
|
};
|
|
1978
|
-
for (const m of c)
|
|
1979
|
-
for (const m of t)
|
|
1980
|
-
return
|
|
1978
|
+
for (const m of c) w(m);
|
|
1979
|
+
for (const m of t) f.has(m.id) || w(m);
|
|
1980
|
+
return x;
|
|
1981
1981
|
}
|
|
1982
|
-
const
|
|
1982
|
+
const bt = {
|
|
1983
1983
|
summary: "Reading manifest",
|
|
1984
1984
|
diagrams: "Loading diagrams",
|
|
1985
1985
|
descriptions: "Loading node details"
|
|
1986
|
-
},
|
|
1987
|
-
function
|
|
1988
|
-
const [a, o] =
|
|
1986
|
+
}, xt = 150;
|
|
1987
|
+
function vt({ state: t }) {
|
|
1988
|
+
const [a, o] = L(!1);
|
|
1989
1989
|
return B(() => {
|
|
1990
1990
|
if (t.status === "error") {
|
|
1991
1991
|
o(!0);
|
|
1992
1992
|
return;
|
|
1993
1993
|
}
|
|
1994
|
-
const n = setTimeout(() => o(!0),
|
|
1994
|
+
const n = setTimeout(() => o(!0), xt);
|
|
1995
1995
|
return () => clearTimeout(n);
|
|
1996
1996
|
}, [t.status]), a ? /* @__PURE__ */ e(
|
|
1997
1997
|
"div",
|
|
@@ -2008,7 +2008,7 @@ function xt({ state: t }) {
|
|
|
2008
2008
|
borderColor: "var(--border-default)",
|
|
2009
2009
|
backgroundColor: "rgba(10, 15, 26, 0.85)"
|
|
2010
2010
|
},
|
|
2011
|
-
children: t.status === "error" ? /* @__PURE__ */ e(
|
|
2011
|
+
children: t.status === "error" ? /* @__PURE__ */ e(kt, { message: t.message }) : /* @__PURE__ */ e(yt, { state: t })
|
|
2012
2012
|
}
|
|
2013
2013
|
)
|
|
2014
2014
|
}
|
|
@@ -2021,7 +2021,7 @@ function xt({ state: t }) {
|
|
|
2021
2021
|
}
|
|
2022
2022
|
);
|
|
2023
2023
|
}
|
|
2024
|
-
function
|
|
2024
|
+
function yt({
|
|
2025
2025
|
state: t
|
|
2026
2026
|
}) {
|
|
2027
2027
|
const { phase: a, done: o, total: n, archName: l } = t, i = n > 0 ? Math.min(1, o / n) : 0, s = a !== "summary";
|
|
@@ -2048,7 +2048,7 @@ function bt({
|
|
|
2048
2048
|
className: "mt-5 flex items-center justify-between text-[10px] tracking-[0.2em] uppercase",
|
|
2049
2049
|
style: { color: "var(--text-secondary)", fontFamily: "var(--font-mono)" },
|
|
2050
2050
|
children: [
|
|
2051
|
-
/* @__PURE__ */ e("span", { children:
|
|
2051
|
+
/* @__PURE__ */ e("span", { children: bt[a] }),
|
|
2052
2052
|
s && /* @__PURE__ */ r("span", { style: { color: "var(--text-muted)" }, children: [
|
|
2053
2053
|
o,
|
|
2054
2054
|
" / ",
|
|
@@ -2086,7 +2086,7 @@ function bt({
|
|
|
2086
2086
|
)
|
|
2087
2087
|
] });
|
|
2088
2088
|
}
|
|
2089
|
-
function
|
|
2089
|
+
function kt({ message: t }) {
|
|
2090
2090
|
return /* @__PURE__ */ r(H, { children: [
|
|
2091
2091
|
/* @__PURE__ */ e(
|
|
2092
2092
|
"div",
|
|
@@ -2129,8 +2129,8 @@ function vt({ message: t }) {
|
|
|
2129
2129
|
)
|
|
2130
2130
|
] });
|
|
2131
2131
|
}
|
|
2132
|
-
const T =
|
|
2133
|
-
function
|
|
2132
|
+
const T = se(null);
|
|
2133
|
+
function U() {
|
|
2134
2134
|
const t = P(T);
|
|
2135
2135
|
if (!t)
|
|
2136
2136
|
throw new Error(
|
|
@@ -2138,7 +2138,7 @@ function _() {
|
|
|
2138
2138
|
);
|
|
2139
2139
|
return t.bundle;
|
|
2140
2140
|
}
|
|
2141
|
-
function
|
|
2141
|
+
function wt() {
|
|
2142
2142
|
const t = P(T);
|
|
2143
2143
|
if (!t)
|
|
2144
2144
|
throw new Error(
|
|
@@ -2146,7 +2146,7 @@ function yt() {
|
|
|
2146
2146
|
);
|
|
2147
2147
|
return t.saveLayout;
|
|
2148
2148
|
}
|
|
2149
|
-
function
|
|
2149
|
+
function Nt() {
|
|
2150
2150
|
const t = P(T);
|
|
2151
2151
|
if (!t)
|
|
2152
2152
|
throw new Error(
|
|
@@ -2154,7 +2154,7 @@ function kt() {
|
|
|
2154
2154
|
);
|
|
2155
2155
|
return t.openInEditor;
|
|
2156
2156
|
}
|
|
2157
|
-
function
|
|
2157
|
+
function Ct() {
|
|
2158
2158
|
const t = P(T);
|
|
2159
2159
|
if (!t)
|
|
2160
2160
|
throw new Error(
|
|
@@ -2162,57 +2162,57 @@ function Nt() {
|
|
|
2162
2162
|
);
|
|
2163
2163
|
return t.reportUsage;
|
|
2164
2164
|
}
|
|
2165
|
-
function
|
|
2165
|
+
function Lt({
|
|
2166
2166
|
dataSource: t,
|
|
2167
2167
|
children: a,
|
|
2168
2168
|
reloadKey: o
|
|
2169
2169
|
}) {
|
|
2170
|
-
const [n, l] =
|
|
2170
|
+
const [n, l] = L({
|
|
2171
2171
|
status: "loading",
|
|
2172
2172
|
phase: "summary",
|
|
2173
2173
|
done: 0,
|
|
2174
2174
|
total: 1
|
|
2175
2175
|
});
|
|
2176
2176
|
B(() => {
|
|
2177
|
-
let
|
|
2178
|
-
return l({ status: "loading", phase: "summary", done: 0, total: 1 }),
|
|
2177
|
+
let u = !1;
|
|
2178
|
+
return l({ status: "loading", phase: "summary", done: 0, total: 1 }), Mt({
|
|
2179
2179
|
dataSource: t,
|
|
2180
2180
|
onState: (g) => {
|
|
2181
|
-
|
|
2181
|
+
u || l(g);
|
|
2182
2182
|
},
|
|
2183
|
-
isCancelled: () =>
|
|
2183
|
+
isCancelled: () => u
|
|
2184
2184
|
}), () => {
|
|
2185
|
-
|
|
2185
|
+
u = !0;
|
|
2186
2186
|
};
|
|
2187
2187
|
}, [t, o]);
|
|
2188
|
-
const i =
|
|
2189
|
-
async (
|
|
2190
|
-
const
|
|
2191
|
-
l((
|
|
2188
|
+
const i = C(
|
|
2189
|
+
async (u, g) => {
|
|
2190
|
+
const b = await t.saveLayout(u, g);
|
|
2191
|
+
l((f) => f.status !== "ready" ? f : {
|
|
2192
2192
|
status: "ready",
|
|
2193
2193
|
bundle: {
|
|
2194
|
-
...
|
|
2195
|
-
layouts: { ...
|
|
2194
|
+
...f.bundle,
|
|
2195
|
+
layouts: { ...f.bundle.layouts, [u]: b }
|
|
2196
2196
|
}
|
|
2197
2197
|
});
|
|
2198
2198
|
},
|
|
2199
2199
|
[t]
|
|
2200
|
-
), s =
|
|
2201
|
-
() => t.openInEditor ? (
|
|
2200
|
+
), s = F(
|
|
2201
|
+
() => t.openInEditor ? (u) => {
|
|
2202
2202
|
var g;
|
|
2203
|
-
return (g = t.openInEditor) == null ? void 0 : g.call(t,
|
|
2203
|
+
return (g = t.openInEditor) == null ? void 0 : g.call(t, u);
|
|
2204
2204
|
} : void 0,
|
|
2205
2205
|
[t]
|
|
2206
|
-
), c =
|
|
2207
|
-
(
|
|
2208
|
-
var
|
|
2209
|
-
(
|
|
2206
|
+
), c = C(
|
|
2207
|
+
(u, g) => {
|
|
2208
|
+
var b;
|
|
2209
|
+
(b = t.reportUsage) == null || b.call(t, u, g);
|
|
2210
2210
|
},
|
|
2211
2211
|
[t]
|
|
2212
|
-
),
|
|
2213
|
-
return n.status !== "ready" ? /* @__PURE__ */ e(
|
|
2212
|
+
), h = n.status === "ready" ? n.bundle : null, d = F(() => h ? { bundle: h, saveLayout: i, openInEditor: s, reportUsage: c } : null, [h, i, s, c]);
|
|
2213
|
+
return n.status !== "ready" ? /* @__PURE__ */ e(vt, { state: n }) : d ? /* @__PURE__ */ e(T.Provider, { value: d, children: a }) : null;
|
|
2214
2214
|
}
|
|
2215
|
-
async function
|
|
2215
|
+
async function Mt({
|
|
2216
2216
|
dataSource: t,
|
|
2217
2217
|
onState: a,
|
|
2218
2218
|
isCancelled: o
|
|
@@ -2239,48 +2239,48 @@ async function Ct({
|
|
|
2239
2239
|
total: s,
|
|
2240
2240
|
archName: n.name
|
|
2241
2241
|
});
|
|
2242
|
-
},
|
|
2242
|
+
}, h = await Promise.all(
|
|
2243
2243
|
l.map(async (p) => {
|
|
2244
|
-
const
|
|
2245
|
-
|
|
2244
|
+
const v = t.loadDiagram(p).then((D) => (o() || c(), D)), N = t.loadLayout(p).then((D) => (o() || c(), D)), [y, M] = await Promise.all([
|
|
2245
|
+
v,
|
|
2246
2246
|
N
|
|
2247
2247
|
]);
|
|
2248
|
-
return { slug: p, diagram:
|
|
2248
|
+
return { slug: p, diagram: y, layout: M };
|
|
2249
2249
|
})
|
|
2250
2250
|
);
|
|
2251
2251
|
if (o()) return;
|
|
2252
|
-
const d = {},
|
|
2253
|
-
for (const { slug: p, diagram:
|
|
2254
|
-
d[p] =
|
|
2255
|
-
for (const
|
|
2252
|
+
const d = {}, u = {}, g = /* @__PURE__ */ new Set();
|
|
2253
|
+
for (const { slug: p, diagram: v, layout: N } of h) {
|
|
2254
|
+
d[p] = v, u[p] = N;
|
|
2255
|
+
for (const y of v.nodes ?? []) g.add(y.id);
|
|
2256
2256
|
}
|
|
2257
|
-
const
|
|
2258
|
-
let
|
|
2257
|
+
const b = [...g];
|
|
2258
|
+
let f = 0;
|
|
2259
2259
|
a({
|
|
2260
2260
|
status: "loading",
|
|
2261
2261
|
phase: "descriptions",
|
|
2262
2262
|
done: 0,
|
|
2263
|
-
total:
|
|
2263
|
+
total: b.length,
|
|
2264
2264
|
archName: n.name
|
|
2265
2265
|
});
|
|
2266
|
-
const
|
|
2267
|
-
|
|
2266
|
+
const x = () => {
|
|
2267
|
+
f += 1, a({
|
|
2268
2268
|
status: "loading",
|
|
2269
2269
|
phase: "descriptions",
|
|
2270
|
-
done:
|
|
2271
|
-
total:
|
|
2270
|
+
done: f,
|
|
2271
|
+
total: b.length,
|
|
2272
2272
|
archName: n.name
|
|
2273
2273
|
});
|
|
2274
|
-
},
|
|
2274
|
+
}, w = {}, m = /* @__PURE__ */ new Set();
|
|
2275
2275
|
if (await Promise.all(
|
|
2276
|
-
|
|
2276
|
+
b.map(async (p) => {
|
|
2277
2277
|
try {
|
|
2278
|
-
const
|
|
2279
|
-
|
|
2278
|
+
const v = await t.loadNodeDetail(p);
|
|
2279
|
+
w[p] = v;
|
|
2280
2280
|
} catch {
|
|
2281
2281
|
m.add(p);
|
|
2282
2282
|
} finally {
|
|
2283
|
-
o() ||
|
|
2283
|
+
o() || x();
|
|
2284
2284
|
}
|
|
2285
2285
|
})
|
|
2286
2286
|
), o()) return;
|
|
@@ -2289,8 +2289,8 @@ async function Ct({
|
|
|
2289
2289
|
bundle: {
|
|
2290
2290
|
summary: n,
|
|
2291
2291
|
diagrams: d,
|
|
2292
|
-
layouts:
|
|
2293
|
-
nodes:
|
|
2292
|
+
layouts: u,
|
|
2293
|
+
nodes: w,
|
|
2294
2294
|
missingDescriptions: m
|
|
2295
2295
|
}
|
|
2296
2296
|
});
|
|
@@ -2300,91 +2300,91 @@ async function Ct({
|
|
|
2300
2300
|
a({ status: "error", message: l });
|
|
2301
2301
|
}
|
|
2302
2302
|
}
|
|
2303
|
-
const
|
|
2304
|
-
function
|
|
2305
|
-
return /* @__PURE__ */ e(
|
|
2303
|
+
const Bt = { architecture: et }, St = { floating: st };
|
|
2304
|
+
function Wt(t) {
|
|
2305
|
+
return /* @__PURE__ */ e(De, { children: /* @__PURE__ */ e(At, { ...t }) });
|
|
2306
2306
|
}
|
|
2307
|
-
const
|
|
2307
|
+
const Dt = (t) => ({
|
|
2308
2308
|
version: 1,
|
|
2309
2309
|
diagramId: t,
|
|
2310
2310
|
updatedAt: "",
|
|
2311
2311
|
nodes: {}
|
|
2312
2312
|
});
|
|
2313
|
-
function
|
|
2313
|
+
function zt(t) {
|
|
2314
2314
|
var o, n, l, i;
|
|
2315
2315
|
const a = {};
|
|
2316
2316
|
for (const s of t) {
|
|
2317
2317
|
const c = {
|
|
2318
2318
|
x: ((o = s.position) == null ? void 0 : o.x) ?? 0,
|
|
2319
2319
|
y: ((n = s.position) == null ? void 0 : n.y) ?? 0
|
|
2320
|
-
},
|
|
2321
|
-
typeof
|
|
2320
|
+
}, h = s.width ?? ((l = s.style) == null ? void 0 : l.width), d = s.height ?? ((i = s.style) == null ? void 0 : i.height);
|
|
2321
|
+
typeof h == "number" && Number.isFinite(h) && (c.width = h), typeof d == "number" && Number.isFinite(d) && (c.height = d), a[s.id] = c;
|
|
2322
2322
|
}
|
|
2323
2323
|
return a;
|
|
2324
2324
|
}
|
|
2325
|
-
function
|
|
2326
|
-
const n =
|
|
2327
|
-
|
|
2328
|
-
const N =
|
|
2325
|
+
function At({ diagramId: t, onSelectNode: a, onDrillIn: o }) {
|
|
2326
|
+
const n = U(), l = wt(), i = n.diagrams[t], [s, c, h] = ze([]), [d, u, g] = Ae([]), [b, f] = L(!1), [x, w] = L(null), { getNodes: m } = Ee(), p = V(null), v = V(t);
|
|
2327
|
+
v.current = t;
|
|
2328
|
+
const N = V(n);
|
|
2329
2329
|
N.current = n, B(() => {
|
|
2330
|
-
var
|
|
2330
|
+
var K;
|
|
2331
2331
|
let S = !1;
|
|
2332
|
-
|
|
2333
|
-
const
|
|
2334
|
-
if (!
|
|
2335
|
-
return
|
|
2332
|
+
f(!1), w(null), a(null);
|
|
2333
|
+
const z = N.current, A = z.diagrams[t];
|
|
2334
|
+
if (!A)
|
|
2335
|
+
return w(`Diagram "${t}" was not loaded`), c([]), u([]), () => {
|
|
2336
2336
|
S = !0;
|
|
2337
2337
|
};
|
|
2338
|
-
const
|
|
2339
|
-
return
|
|
2340
|
-
S || (c(
|
|
2341
|
-
}).catch((
|
|
2342
|
-
S ||
|
|
2338
|
+
const ye = z.layouts[t] ?? Dt(t), { nodes: ke, edges: Y } = dt(A);
|
|
2339
|
+
return ft(ke, Y, (K = A.meta) == null ? void 0 : K.direction, ye).then((G) => {
|
|
2340
|
+
S || (c(G), u(Y), requestAnimationFrame(() => !S && f(!0)));
|
|
2341
|
+
}).catch((G) => {
|
|
2342
|
+
S || w(G.message);
|
|
2343
2343
|
}), () => {
|
|
2344
2344
|
S = !0, p.current && (clearTimeout(p.current), p.current = null);
|
|
2345
2345
|
};
|
|
2346
|
-
}, [t, a,
|
|
2347
|
-
const
|
|
2348
|
-
const S =
|
|
2349
|
-
nodes:
|
|
2346
|
+
}, [t, a, u, c]);
|
|
2347
|
+
const y = C(() => {
|
|
2348
|
+
const S = v.current, z = {
|
|
2349
|
+
nodes: zt(m())
|
|
2350
2350
|
};
|
|
2351
|
-
l(S,
|
|
2352
|
-
console.warn("[tecture] failed to persist layout",
|
|
2351
|
+
l(S, z).catch((A) => {
|
|
2352
|
+
console.warn("[tecture] failed to persist layout", A);
|
|
2353
2353
|
});
|
|
2354
|
-
}, [m, l]),
|
|
2354
|
+
}, [m, l]), M = C(() => {
|
|
2355
2355
|
p.current && clearTimeout(p.current), p.current = setTimeout(() => {
|
|
2356
|
-
p.current = null,
|
|
2356
|
+
p.current = null, y();
|
|
2357
2357
|
}, 150);
|
|
2358
|
-
}, [
|
|
2359
|
-
() => ({ notifyLayoutChanged:
|
|
2360
|
-
[
|
|
2361
|
-
),
|
|
2362
|
-
|
|
2363
|
-
}, [
|
|
2364
|
-
() => (S,
|
|
2365
|
-
a(
|
|
2358
|
+
}, [y]), D = F(
|
|
2359
|
+
() => ({ notifyLayoutChanged: M }),
|
|
2360
|
+
[M]
|
|
2361
|
+
), $ = C(() => {
|
|
2362
|
+
M();
|
|
2363
|
+
}, [M]), xe = F(
|
|
2364
|
+
() => (S, z) => {
|
|
2365
|
+
a(z.id);
|
|
2366
2366
|
},
|
|
2367
2367
|
[a]
|
|
2368
|
-
),
|
|
2369
|
-
() => (S,
|
|
2370
|
-
const
|
|
2371
|
-
|
|
2368
|
+
), ve = F(
|
|
2369
|
+
() => (S, z) => {
|
|
2370
|
+
const A = z.data;
|
|
2371
|
+
A.subDiagramId && o(A.subDiagramId);
|
|
2372
2372
|
},
|
|
2373
2373
|
[o]
|
|
2374
2374
|
);
|
|
2375
|
-
return /* @__PURE__ */ e(
|
|
2375
|
+
return /* @__PURE__ */ e(me.Provider, { value: D, children: /* @__PURE__ */ r("div", { className: "relative h-full w-full", children: [
|
|
2376
2376
|
/* @__PURE__ */ r(
|
|
2377
|
-
|
|
2377
|
+
Fe,
|
|
2378
2378
|
{
|
|
2379
2379
|
nodes: s,
|
|
2380
2380
|
edges: d,
|
|
2381
|
-
nodeTypes:
|
|
2382
|
-
edgeTypes:
|
|
2383
|
-
onNodesChange:
|
|
2381
|
+
nodeTypes: Bt,
|
|
2382
|
+
edgeTypes: St,
|
|
2383
|
+
onNodesChange: h,
|
|
2384
2384
|
onEdgesChange: g,
|
|
2385
|
-
onNodeClick:
|
|
2386
|
-
onNodeDoubleClick:
|
|
2387
|
-
onNodeDragStop:
|
|
2385
|
+
onNodeClick: xe,
|
|
2386
|
+
onNodeDoubleClick: ve,
|
|
2387
|
+
onNodeDragStop: $,
|
|
2388
2388
|
onPaneClick: () => a(null),
|
|
2389
2389
|
fitView: !0,
|
|
2390
2390
|
fitViewOptions: { padding: 0.2 },
|
|
@@ -2393,23 +2393,23 @@ function Dt({ diagramId: t, onSelectNode: a, onDrillIn: o }) {
|
|
|
2393
2393
|
minZoom: 0.1,
|
|
2394
2394
|
maxZoom: 2,
|
|
2395
2395
|
style: {
|
|
2396
|
-
opacity:
|
|
2396
|
+
opacity: b ? 1 : 0,
|
|
2397
2397
|
transition: "opacity 0.2s ease-in"
|
|
2398
2398
|
},
|
|
2399
2399
|
children: [
|
|
2400
2400
|
/* @__PURE__ */ e(
|
|
2401
|
-
|
|
2401
|
+
He,
|
|
2402
2402
|
{
|
|
2403
|
-
variant:
|
|
2403
|
+
variant: Pe.Lines,
|
|
2404
2404
|
gap: 20,
|
|
2405
2405
|
size: 1,
|
|
2406
2406
|
color: "rgba(34, 78, 130, 0.12)"
|
|
2407
2407
|
}
|
|
2408
2408
|
),
|
|
2409
|
-
/* @__PURE__ */ e(
|
|
2410
|
-
i && /* @__PURE__ */ e(
|
|
2409
|
+
/* @__PURE__ */ e(Te, { showInteractive: !1, position: "bottom-right" }),
|
|
2410
|
+
i && /* @__PURE__ */ e(rt, { diagram: i }),
|
|
2411
2411
|
/* @__PURE__ */ e(
|
|
2412
|
-
|
|
2412
|
+
Ie,
|
|
2413
2413
|
{
|
|
2414
2414
|
position: "bottom-left",
|
|
2415
2415
|
pannable: !0,
|
|
@@ -2422,10 +2422,10 @@ function Dt({ diagramId: t, onSelectNode: a, onDrillIn: o }) {
|
|
|
2422
2422
|
]
|
|
2423
2423
|
}
|
|
2424
2424
|
),
|
|
2425
|
-
|
|
2425
|
+
x && /* @__PURE__ */ e(Et, { label: `Error: ${x}` })
|
|
2426
2426
|
] }) });
|
|
2427
2427
|
}
|
|
2428
|
-
function
|
|
2428
|
+
function Et({ label: t }) {
|
|
2429
2429
|
return /* @__PURE__ */ e(
|
|
2430
2430
|
"div",
|
|
2431
2431
|
{
|
|
@@ -2438,13 +2438,13 @@ function zt({ label: t }) {
|
|
|
2438
2438
|
}
|
|
2439
2439
|
);
|
|
2440
2440
|
}
|
|
2441
|
-
function
|
|
2441
|
+
function Ft({
|
|
2442
2442
|
summary: t,
|
|
2443
2443
|
currentDiagramId: a,
|
|
2444
2444
|
onSelect: o,
|
|
2445
2445
|
onGoHome: n
|
|
2446
2446
|
}) {
|
|
2447
|
-
const [l, i] =
|
|
2447
|
+
const [l, i] = L(!0), s = t != null && a === t.topDiagram;
|
|
2448
2448
|
return /* @__PURE__ */ e("div", { className: "absolute top-3 left-3 z-10 w-64", children: /* @__PURE__ */ r(
|
|
2449
2449
|
"div",
|
|
2450
2450
|
{
|
|
@@ -2576,7 +2576,7 @@ function At({
|
|
|
2576
2576
|
),
|
|
2577
2577
|
l && /* @__PURE__ */ r("ul", { className: "max-h-[60vh] overflow-y-auto py-1", children: [
|
|
2578
2578
|
t == null ? void 0 : t.diagrams.map((c) => /* @__PURE__ */ e(
|
|
2579
|
-
|
|
2579
|
+
Ht,
|
|
2580
2580
|
{
|
|
2581
2581
|
diagram: c,
|
|
2582
2582
|
active: c.slug === a,
|
|
@@ -2601,7 +2601,7 @@ function At({
|
|
|
2601
2601
|
}
|
|
2602
2602
|
) });
|
|
2603
2603
|
}
|
|
2604
|
-
function
|
|
2604
|
+
function Ht({
|
|
2605
2605
|
diagram: t,
|
|
2606
2606
|
active: a,
|
|
2607
2607
|
isTop: o,
|
|
@@ -2677,10 +2677,10 @@ function Et({
|
|
|
2677
2677
|
}
|
|
2678
2678
|
) });
|
|
2679
2679
|
}
|
|
2680
|
-
let
|
|
2681
|
-
async function
|
|
2680
|
+
let le = !1;
|
|
2681
|
+
async function Pt() {
|
|
2682
2682
|
const a = (await import("mermaid")).default;
|
|
2683
|
-
return
|
|
2683
|
+
return le || (a.initialize({
|
|
2684
2684
|
startOnLoad: !1,
|
|
2685
2685
|
theme: "dark",
|
|
2686
2686
|
securityLevel: "strict",
|
|
@@ -2715,21 +2715,21 @@ async function Ht() {
|
|
|
2715
2715
|
noteBorderColor: "#854d0e",
|
|
2716
2716
|
noteTextColor: "#fef3c7"
|
|
2717
2717
|
}
|
|
2718
|
-
}),
|
|
2718
|
+
}), le = !0), a;
|
|
2719
2719
|
}
|
|
2720
|
-
function
|
|
2721
|
-
const [a, o] =
|
|
2720
|
+
function Tt({ chart: t }) {
|
|
2721
|
+
const [a, o] = L({ status: "loading" }), [n, l] = L(!1), s = `mermaid-${Ne().replace(/:/g, "")}`;
|
|
2722
2722
|
return B(() => {
|
|
2723
2723
|
let c = !1;
|
|
2724
2724
|
return o({ status: "loading" }), (async () => {
|
|
2725
2725
|
try {
|
|
2726
|
-
const
|
|
2727
|
-
await
|
|
2728
|
-
const { svg: d } = await
|
|
2726
|
+
const h = await Pt();
|
|
2727
|
+
await h.parse(t);
|
|
2728
|
+
const { svg: d } = await h.render(s, t);
|
|
2729
2729
|
c || o({ status: "ready", svg: d });
|
|
2730
|
-
} catch (
|
|
2730
|
+
} catch (h) {
|
|
2731
2731
|
if (c) return;
|
|
2732
|
-
const d =
|
|
2732
|
+
const d = h instanceof Error ? h.message : "Failed to render diagram";
|
|
2733
2733
|
o({ status: "error", message: d });
|
|
2734
2734
|
}
|
|
2735
2735
|
})(), () => {
|
|
@@ -2809,10 +2809,10 @@ function Pt({ chart: t }) {
|
|
|
2809
2809
|
}
|
|
2810
2810
|
)
|
|
2811
2811
|
] }),
|
|
2812
|
-
n && /* @__PURE__ */ e(
|
|
2812
|
+
n && /* @__PURE__ */ e(It, { svg: a.svg, onClose: () => l(!1) })
|
|
2813
2813
|
] });
|
|
2814
2814
|
}
|
|
2815
|
-
function
|
|
2815
|
+
function It({
|
|
2816
2816
|
svg: t,
|
|
2817
2817
|
onClose: a
|
|
2818
2818
|
}) {
|
|
@@ -2825,7 +2825,7 @@ function Tt({
|
|
|
2825
2825
|
return document.body.style.overflow = "hidden", () => {
|
|
2826
2826
|
document.removeEventListener("keydown", o), document.body.style.overflow = n;
|
|
2827
2827
|
};
|
|
2828
|
-
}, [a]),
|
|
2828
|
+
}, [a]), Ve(
|
|
2829
2829
|
/* @__PURE__ */ e(
|
|
2830
2830
|
"div",
|
|
2831
2831
|
{
|
|
@@ -2933,22 +2933,22 @@ function Tt({
|
|
|
2933
2933
|
document.body
|
|
2934
2934
|
);
|
|
2935
2935
|
}
|
|
2936
|
-
function
|
|
2936
|
+
function jt({ source: t }) {
|
|
2937
2937
|
return /* @__PURE__ */ e("div", { className: "prose-markdown", children: /* @__PURE__ */ e(
|
|
2938
|
-
|
|
2938
|
+
Ge,
|
|
2939
2939
|
{
|
|
2940
2940
|
options: {
|
|
2941
2941
|
forceBlock: !0,
|
|
2942
2942
|
overrides: {
|
|
2943
|
-
pre: { component:
|
|
2944
|
-
a: { component:
|
|
2943
|
+
pre: { component: $t },
|
|
2944
|
+
a: { component: Rt }
|
|
2945
2945
|
}
|
|
2946
2946
|
},
|
|
2947
2947
|
children: t
|
|
2948
2948
|
}
|
|
2949
2949
|
) });
|
|
2950
2950
|
}
|
|
2951
|
-
function
|
|
2951
|
+
function Rt({
|
|
2952
2952
|
href: t,
|
|
2953
2953
|
children: a,
|
|
2954
2954
|
...o
|
|
@@ -2964,13 +2964,13 @@ function It({
|
|
|
2964
2964
|
}
|
|
2965
2965
|
);
|
|
2966
2966
|
}
|
|
2967
|
-
function
|
|
2968
|
-
const a =
|
|
2969
|
-
return a !== null ? /* @__PURE__ */ e(
|
|
2967
|
+
function $t({ children: t }) {
|
|
2968
|
+
const a = Gt(t);
|
|
2969
|
+
return a !== null ? /* @__PURE__ */ e(Tt, { chart: a }) : /* @__PURE__ */ e("pre", { children: t });
|
|
2970
2970
|
}
|
|
2971
|
-
function
|
|
2971
|
+
function Gt(t) {
|
|
2972
2972
|
const a = Array.isArray(t) && t.length === 1 ? t[0] : t;
|
|
2973
|
-
if (!
|
|
2973
|
+
if (!Ce(a)) return null;
|
|
2974
2974
|
const o = a;
|
|
2975
2975
|
if (o.type !== "code") return null;
|
|
2976
2976
|
const n = o.props.className ?? "";
|
|
@@ -2978,9 +2978,9 @@ function jt(t) {
|
|
|
2978
2978
|
const i = o.props.children;
|
|
2979
2979
|
return typeof i == "string" ? i : Array.isArray(i) ? i.map((s) => String(s ?? "")).join("") : String(i ?? "");
|
|
2980
2980
|
}
|
|
2981
|
-
function
|
|
2982
|
-
var d,
|
|
2983
|
-
const o =
|
|
2981
|
+
function Vt({ nodeId: t, onClose: a }) {
|
|
2982
|
+
var d, u;
|
|
2983
|
+
const o = U(), n = Nt(), l = o.nodes[t], i = o.missingDescriptions.has(t), s = _((d = l == null ? void 0 : l.meta) == null ? void 0 : d.type), c = l == null ? void 0 : l.path, h = n ? void 0 : c ? Re(o.summary.source, o.summary.sourceHost, c) : void 0;
|
|
2984
2984
|
return /* @__PURE__ */ r(
|
|
2985
2985
|
"aside",
|
|
2986
2986
|
{
|
|
@@ -3015,7 +3015,7 @@ function $t({ nodeId: t, onClose: a }) {
|
|
|
3015
3015
|
children: (l == null ? void 0 : l.label) ?? t
|
|
3016
3016
|
}
|
|
3017
3017
|
),
|
|
3018
|
-
(
|
|
3018
|
+
(u = l == null ? void 0 : l.meta) != null && u.technology ? /* @__PURE__ */ e(
|
|
3019
3019
|
"div",
|
|
3020
3020
|
{
|
|
3021
3021
|
className: "mt-0.5 text-xs",
|
|
@@ -3023,20 +3023,20 @@ function $t({ nodeId: t, onClose: a }) {
|
|
|
3023
3023
|
children: String(l.meta.technology)
|
|
3024
3024
|
}
|
|
3025
3025
|
) : null,
|
|
3026
|
-
c || l &&
|
|
3026
|
+
c || l && q(l) ? /* @__PURE__ */ r("div", { className: "mt-1.5 flex w-full items-center gap-x-3", children: [
|
|
3027
3027
|
c ? /* @__PURE__ */ e(
|
|
3028
|
-
|
|
3028
|
+
Ot,
|
|
3029
3029
|
{
|
|
3030
3030
|
path: c,
|
|
3031
3031
|
accent: s.accent,
|
|
3032
3032
|
onOpenInEditor: n ? () => n(c) : void 0,
|
|
3033
|
-
sourceUrl:
|
|
3033
|
+
sourceUrl: h
|
|
3034
3034
|
}
|
|
3035
3035
|
) : null,
|
|
3036
|
-
l &&
|
|
3037
|
-
|
|
3036
|
+
l && q(l) ? /* @__PURE__ */ e(
|
|
3037
|
+
_t,
|
|
3038
3038
|
{
|
|
3039
|
-
prompt:
|
|
3039
|
+
prompt: $e(l),
|
|
3040
3040
|
accent: s.accent,
|
|
3041
3041
|
className: "ml-auto"
|
|
3042
3042
|
}
|
|
@@ -3080,14 +3080,14 @@ function $t({ nodeId: t, onClose: a }) {
|
|
|
3080
3080
|
/* @__PURE__ */ r("div", { className: "min-h-0 flex-1 overflow-y-auto px-5 py-4", children: [
|
|
3081
3081
|
!l && /* @__PURE__ */ e("div", { className: "text-xs", style: { color: "var(--text-muted)" }, children: "No details available for this node." }),
|
|
3082
3082
|
l && i && /* @__PURE__ */ e("div", { className: "text-xs", style: { color: "var(--text-muted)" }, children: "Description not available." }),
|
|
3083
|
-
l && !i && (l.description ? /* @__PURE__ */ e(
|
|
3083
|
+
l && !i && (l.description ? /* @__PURE__ */ e(jt, { source: l.description }) : /* @__PURE__ */ e("div", { className: "text-xs", style: { color: "var(--text-muted)" }, children: "No description provided." }))
|
|
3084
3084
|
] })
|
|
3085
3085
|
]
|
|
3086
3086
|
}
|
|
3087
3087
|
);
|
|
3088
3088
|
}
|
|
3089
3089
|
const R = "inline-flex items-center gap-1.5 text-xs transition-opacity hover:opacity-80";
|
|
3090
|
-
function
|
|
3090
|
+
function O(t) {
|
|
3091
3091
|
return {
|
|
3092
3092
|
color: t,
|
|
3093
3093
|
fontFamily: "var(--font-mono)",
|
|
@@ -3097,7 +3097,7 @@ function V(t) {
|
|
|
3097
3097
|
cursor: "pointer"
|
|
3098
3098
|
};
|
|
3099
3099
|
}
|
|
3100
|
-
function
|
|
3100
|
+
function Ot({
|
|
3101
3101
|
path: t,
|
|
3102
3102
|
accent: a,
|
|
3103
3103
|
onOpenInEditor: o,
|
|
@@ -3126,7 +3126,7 @@ function Gt({
|
|
|
3126
3126
|
{
|
|
3127
3127
|
type: "button",
|
|
3128
3128
|
className: R,
|
|
3129
|
-
style:
|
|
3129
|
+
style: O(a),
|
|
3130
3130
|
onClick: o,
|
|
3131
3131
|
title: t,
|
|
3132
3132
|
children: [
|
|
@@ -3138,7 +3138,7 @@ function Gt({
|
|
|
3138
3138
|
"a",
|
|
3139
3139
|
{
|
|
3140
3140
|
className: R,
|
|
3141
|
-
style:
|
|
3141
|
+
style: O(a),
|
|
3142
3142
|
href: n,
|
|
3143
3143
|
target: "_blank",
|
|
3144
3144
|
rel: "noreferrer",
|
|
@@ -3150,13 +3150,13 @@ function Gt({
|
|
|
3150
3150
|
}
|
|
3151
3151
|
) : null;
|
|
3152
3152
|
}
|
|
3153
|
-
function
|
|
3153
|
+
function _t({
|
|
3154
3154
|
prompt: t,
|
|
3155
3155
|
accent: a,
|
|
3156
3156
|
className: o
|
|
3157
3157
|
}) {
|
|
3158
|
-
const [n, l] =
|
|
3159
|
-
|
|
3158
|
+
const [n, l] = L(!1), i = C(() => {
|
|
3159
|
+
Ut(t).then((s) => {
|
|
3160
3160
|
s && (l(!0), window.setTimeout(() => l(!1), 1500));
|
|
3161
3161
|
});
|
|
3162
3162
|
}, [t]);
|
|
@@ -3165,7 +3165,7 @@ function Vt({
|
|
|
3165
3165
|
{
|
|
3166
3166
|
type: "button",
|
|
3167
3167
|
className: o ? `${R} ${o}` : R,
|
|
3168
|
-
style:
|
|
3168
|
+
style: O(a),
|
|
3169
3169
|
onClick: i,
|
|
3170
3170
|
title: "Copy a prompt to enrich this component's description with a coding agent",
|
|
3171
3171
|
children: [
|
|
@@ -3204,7 +3204,7 @@ function Vt({
|
|
|
3204
3204
|
}
|
|
3205
3205
|
);
|
|
3206
3206
|
}
|
|
3207
|
-
async function
|
|
3207
|
+
async function Ut(t) {
|
|
3208
3208
|
var a;
|
|
3209
3209
|
try {
|
|
3210
3210
|
if ((a = navigator.clipboard) != null && a.writeText)
|
|
@@ -3220,8 +3220,8 @@ async function Ot(t) {
|
|
|
3220
3220
|
return !1;
|
|
3221
3221
|
}
|
|
3222
3222
|
}
|
|
3223
|
-
function
|
|
3224
|
-
const [t, a] =
|
|
3223
|
+
function Yt() {
|
|
3224
|
+
const [t, a] = L(!0);
|
|
3225
3225
|
return B(() => {
|
|
3226
3226
|
const o = setTimeout(() => a(!1), 3500);
|
|
3227
3227
|
return () => clearTimeout(o);
|
|
@@ -3241,27 +3241,408 @@ function _t() {
|
|
|
3241
3241
|
}
|
|
3242
3242
|
) : null;
|
|
3243
3243
|
}
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3244
|
+
function be({ className: t }) {
|
|
3245
|
+
return /* @__PURE__ */ e("svg", { className: `ob-cursor ${t}`, viewBox: "0 0 24 24", "aria-hidden": !0, children: /* @__PURE__ */ e(
|
|
3246
|
+
"path",
|
|
3247
|
+
{
|
|
3248
|
+
d: "M5 3 L5 19 L9.6 14.8 L12.4 21 L15 19.8 L12.2 13.9 L18 13.9 Z",
|
|
3249
|
+
fill: "#e2e8f0",
|
|
3250
|
+
stroke: "#0a0f1a",
|
|
3251
|
+
strokeWidth: "1.2",
|
|
3252
|
+
strokeLinejoin: "round"
|
|
3253
|
+
}
|
|
3254
|
+
) });
|
|
3255
|
+
}
|
|
3256
|
+
function W({
|
|
3257
|
+
label: t,
|
|
3258
|
+
style: a,
|
|
3259
|
+
className: o = "",
|
|
3260
|
+
children: n
|
|
3261
|
+
}) {
|
|
3262
|
+
return /* @__PURE__ */ r("div", { className: `ob-box ${o}`, style: a, children: [
|
|
3263
|
+
/* @__PURE__ */ e("span", { className: "ob-box-icon" }),
|
|
3264
|
+
/* @__PURE__ */ e("span", { children: t }),
|
|
3265
|
+
n
|
|
3266
|
+
] });
|
|
3267
|
+
}
|
|
3268
|
+
function Kt() {
|
|
3269
|
+
return /* @__PURE__ */ r("div", { className: "ob-stage blueprint-grid", children: [
|
|
3270
|
+
/* @__PURE__ */ e(
|
|
3271
|
+
W,
|
|
3272
|
+
{
|
|
3273
|
+
label: "Service",
|
|
3274
|
+
className: "ob-click-target",
|
|
3275
|
+
style: { left: "6%", top: "20%", width: "34%", height: "30%" }
|
|
3276
|
+
}
|
|
3277
|
+
),
|
|
3278
|
+
/* @__PURE__ */ e(
|
|
3279
|
+
W,
|
|
3280
|
+
{
|
|
3281
|
+
label: "Database",
|
|
3282
|
+
style: { left: "6%", top: "58%", width: "34%", height: "30%" }
|
|
3283
|
+
}
|
|
3284
|
+
),
|
|
3285
|
+
/* @__PURE__ */ e(
|
|
3286
|
+
"span",
|
|
3287
|
+
{
|
|
3288
|
+
className: "ob-ripple ob-click-ripple",
|
|
3289
|
+
style: { left: "23%", top: "35%" }
|
|
3290
|
+
}
|
|
3291
|
+
),
|
|
3292
|
+
/* @__PURE__ */ r("div", { className: "ob-click-panel ob-click-slide", children: [
|
|
3293
|
+
/* @__PURE__ */ e("div", { className: "ob-line accent", style: { width: "68%" } }),
|
|
3294
|
+
/* @__PURE__ */ e("div", { className: "ob-line", style: { width: "100%" } }),
|
|
3295
|
+
/* @__PURE__ */ e("div", { className: "ob-line", style: { width: "90%" } }),
|
|
3296
|
+
/* @__PURE__ */ e("div", { className: "ob-line", style: { width: "58%" } }),
|
|
3297
|
+
/* @__PURE__ */ e("div", { className: "ob-line", style: { width: "82%" } })
|
|
3298
|
+
] }),
|
|
3299
|
+
/* @__PURE__ */ e(be, { className: "ob-click-cursor" })
|
|
3300
|
+
] });
|
|
3301
|
+
}
|
|
3302
|
+
function Xt() {
|
|
3303
|
+
return /* @__PURE__ */ e(
|
|
3304
|
+
"svg",
|
|
3305
|
+
{
|
|
3306
|
+
width: "9",
|
|
3307
|
+
height: "9",
|
|
3308
|
+
viewBox: "0 0 24 24",
|
|
3309
|
+
fill: "none",
|
|
3310
|
+
stroke: "currentColor",
|
|
3311
|
+
strokeWidth: "3",
|
|
3312
|
+
strokeLinecap: "round",
|
|
3313
|
+
strokeLinejoin: "round",
|
|
3314
|
+
"aria-hidden": !0,
|
|
3315
|
+
children: /* @__PURE__ */ e("polyline", { points: "6 9 12 15 18 9" })
|
|
3316
|
+
}
|
|
3317
|
+
);
|
|
3318
|
+
}
|
|
3319
|
+
function Zt() {
|
|
3320
|
+
return /* @__PURE__ */ r("div", { className: "ob-stage blueprint-grid", children: [
|
|
3321
|
+
/* @__PURE__ */ r("div", { className: "ob-level-1", children: [
|
|
3322
|
+
/* @__PURE__ */ e(
|
|
3323
|
+
W,
|
|
3324
|
+
{
|
|
3325
|
+
label: "User",
|
|
3326
|
+
style: { left: "34%", top: "3%", width: "24%", height: "20%" }
|
|
3327
|
+
}
|
|
3328
|
+
),
|
|
3329
|
+
/* @__PURE__ */ e(
|
|
3330
|
+
W,
|
|
3331
|
+
{
|
|
3332
|
+
label: "Files",
|
|
3333
|
+
style: { left: "64%", top: "40%", width: "24%", height: "24%" }
|
|
3334
|
+
}
|
|
3335
|
+
),
|
|
3336
|
+
/* @__PURE__ */ e(
|
|
3337
|
+
W,
|
|
3338
|
+
{
|
|
3339
|
+
label: "Service",
|
|
3340
|
+
style: { left: "28%", top: "33%", width: "30%", height: "42%" },
|
|
3341
|
+
children: /* @__PURE__ */ r("span", { className: "ob-pill ob-drill-pill", children: [
|
|
3342
|
+
"Drill down",
|
|
3343
|
+
/* @__PURE__ */ e(Xt, {})
|
|
3344
|
+
] })
|
|
3345
|
+
}
|
|
3346
|
+
)
|
|
3347
|
+
] }),
|
|
3348
|
+
/* @__PURE__ */ r("div", { className: "ob-level-2", children: [
|
|
3349
|
+
/* @__PURE__ */ e(
|
|
3350
|
+
W,
|
|
3351
|
+
{
|
|
3352
|
+
label: "API",
|
|
3353
|
+
style: { left: "8%", top: "14%", width: "24%", height: "26%" }
|
|
3354
|
+
}
|
|
3355
|
+
),
|
|
3356
|
+
/* @__PURE__ */ e(
|
|
3357
|
+
W,
|
|
3358
|
+
{
|
|
3359
|
+
label: "Router",
|
|
3360
|
+
style: { left: "40%", top: "8%", width: "24%", height: "26%" }
|
|
3361
|
+
}
|
|
3362
|
+
),
|
|
3363
|
+
/* @__PURE__ */ e(
|
|
3364
|
+
W,
|
|
3365
|
+
{
|
|
3366
|
+
label: "Store",
|
|
3367
|
+
style: { left: "20%", top: "56%", width: "24%", height: "26%" }
|
|
3368
|
+
}
|
|
3369
|
+
),
|
|
3370
|
+
/* @__PURE__ */ e(
|
|
3371
|
+
W,
|
|
3372
|
+
{
|
|
3373
|
+
label: "Worker",
|
|
3374
|
+
style: { left: "54%", top: "52%", width: "28%", height: "28%" }
|
|
3375
|
+
}
|
|
3376
|
+
)
|
|
3377
|
+
] }),
|
|
3378
|
+
/* @__PURE__ */ e(
|
|
3379
|
+
"span",
|
|
3380
|
+
{
|
|
3381
|
+
className: "ob-ripple ob-drill-ripple",
|
|
3382
|
+
style: { left: "43%", top: "64%" }
|
|
3383
|
+
}
|
|
3384
|
+
),
|
|
3385
|
+
/* @__PURE__ */ e(be, { className: "ob-drill-cursor" })
|
|
3386
|
+
] });
|
|
3387
|
+
}
|
|
3388
|
+
function qt({
|
|
3389
|
+
open: t,
|
|
3390
|
+
onClose: a,
|
|
3391
|
+
architectureName: o,
|
|
3392
|
+
architectureDescription: n
|
|
3393
|
+
}) {
|
|
3394
|
+
var b;
|
|
3395
|
+
const [l, i] = L(0);
|
|
3396
|
+
B(() => {
|
|
3397
|
+
t && i(0);
|
|
3398
|
+
}, [t]);
|
|
3399
|
+
const s = (b = (n ?? "").split(/\n\s*\n/)[0]) == null ? void 0 : b.trim(), c = [
|
|
3400
|
+
{
|
|
3401
|
+
eyebrow: "Architecture",
|
|
3402
|
+
title: o,
|
|
3403
|
+
blurb: s || "An interactive map of this system — its components and how they connect.",
|
|
3404
|
+
media: /* @__PURE__ */ e(Qt, { name: o })
|
|
3405
|
+
},
|
|
3406
|
+
{
|
|
3407
|
+
eyebrow: "Tip · 1 of 2",
|
|
3408
|
+
title: "Click a component",
|
|
3409
|
+
blurb: "Click any box to open its details — the technology it uses, its source files, and a full description.",
|
|
3410
|
+
media: /* @__PURE__ */ e(Kt, {})
|
|
3411
|
+
},
|
|
3412
|
+
{
|
|
3413
|
+
eyebrow: "Tip · 2 of 2",
|
|
3414
|
+
title: "Drill down for more",
|
|
3415
|
+
blurb: "Boxes with a “Drill down” button go deeper — double-click one to open its sub-diagram and explore the next level.",
|
|
3416
|
+
media: /* @__PURE__ */ e(Zt, {})
|
|
3417
|
+
}
|
|
3418
|
+
], h = c.length - 1, d = C(() => {
|
|
3419
|
+
i((f) => f >= c.length - 1 ? (a(), f) : f + 1);
|
|
3420
|
+
}, [c.length, a]), u = C(() => i((f) => Math.max(0, f - 1)), []);
|
|
3421
|
+
B(() => {
|
|
3422
|
+
if (!t) return;
|
|
3423
|
+
const f = (x) => {
|
|
3424
|
+
x.key === "Escape" ? a() : x.key === "ArrowRight" ? d() : x.key === "ArrowLeft" && u();
|
|
3425
|
+
};
|
|
3426
|
+
return window.addEventListener("keydown", f), () => window.removeEventListener("keydown", f);
|
|
3427
|
+
}, [t, a, d, u]);
|
|
3428
|
+
const g = c[l] ?? c[0];
|
|
3429
|
+
return !t || !g ? null : /* @__PURE__ */ e(
|
|
3430
|
+
"div",
|
|
3431
|
+
{
|
|
3432
|
+
className: "absolute inset-0 z-50 flex items-center justify-center",
|
|
3433
|
+
style: { backgroundColor: "rgba(5, 8, 15, 0.72)" },
|
|
3434
|
+
onClick: a,
|
|
3435
|
+
role: "dialog",
|
|
3436
|
+
"aria-modal": "true",
|
|
3437
|
+
"aria-labelledby": "onboarding-title",
|
|
3438
|
+
children: /* @__PURE__ */ r(
|
|
3439
|
+
"div",
|
|
3440
|
+
{
|
|
3441
|
+
className: "animate-fade-up flex w-[min(640px,calc(100vw-32px))] flex-col border shadow-lg backdrop-blur-md",
|
|
3442
|
+
style: {
|
|
3443
|
+
borderColor: "var(--border-default)",
|
|
3444
|
+
backgroundColor: "rgba(10, 15, 26, 0.94)"
|
|
3445
|
+
},
|
|
3446
|
+
onClick: (f) => f.stopPropagation(),
|
|
3447
|
+
children: [
|
|
3448
|
+
/* @__PURE__ */ r(
|
|
3449
|
+
"div",
|
|
3450
|
+
{
|
|
3451
|
+
className: "flex items-start justify-between border-b px-6 py-4",
|
|
3452
|
+
style: { borderColor: "var(--border-default)" },
|
|
3453
|
+
children: [
|
|
3454
|
+
/* @__PURE__ */ r("div", { className: "min-w-0", children: [
|
|
3455
|
+
/* @__PURE__ */ e(
|
|
3456
|
+
"div",
|
|
3457
|
+
{
|
|
3458
|
+
className: "text-[9px] tracking-[0.32em] uppercase",
|
|
3459
|
+
style: {
|
|
3460
|
+
color: "var(--text-muted)",
|
|
3461
|
+
fontFamily: "var(--font-mono)"
|
|
3462
|
+
},
|
|
3463
|
+
children: g.eyebrow
|
|
3464
|
+
}
|
|
3465
|
+
),
|
|
3466
|
+
/* @__PURE__ */ e(
|
|
3467
|
+
"div",
|
|
3468
|
+
{
|
|
3469
|
+
id: "onboarding-title",
|
|
3470
|
+
className: "mt-1 truncate text-[18px] leading-tight font-semibold tracking-tight",
|
|
3471
|
+
style: {
|
|
3472
|
+
color: "var(--text-primary)",
|
|
3473
|
+
fontFamily: "var(--font-sans)"
|
|
3474
|
+
},
|
|
3475
|
+
children: g.title
|
|
3476
|
+
}
|
|
3477
|
+
)
|
|
3478
|
+
] }),
|
|
3479
|
+
/* @__PURE__ */ e(
|
|
3480
|
+
"button",
|
|
3481
|
+
{
|
|
3482
|
+
type: "button",
|
|
3483
|
+
onClick: a,
|
|
3484
|
+
"aria-label": "Skip tour",
|
|
3485
|
+
className: "ml-4 flex h-7 w-7 shrink-0 items-center justify-center border transition-colors hover:text-white",
|
|
3486
|
+
style: {
|
|
3487
|
+
borderColor: "var(--border-default)",
|
|
3488
|
+
color: "var(--text-muted)",
|
|
3489
|
+
backgroundColor: "transparent"
|
|
3490
|
+
},
|
|
3491
|
+
children: /* @__PURE__ */ r(
|
|
3492
|
+
"svg",
|
|
3493
|
+
{
|
|
3494
|
+
width: "12",
|
|
3495
|
+
height: "12",
|
|
3496
|
+
viewBox: "0 0 24 24",
|
|
3497
|
+
fill: "none",
|
|
3498
|
+
stroke: "currentColor",
|
|
3499
|
+
strokeWidth: "2.5",
|
|
3500
|
+
strokeLinecap: "round",
|
|
3501
|
+
strokeLinejoin: "round",
|
|
3502
|
+
children: [
|
|
3503
|
+
/* @__PURE__ */ e("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
3504
|
+
/* @__PURE__ */ e("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
3505
|
+
]
|
|
3506
|
+
}
|
|
3507
|
+
)
|
|
3508
|
+
}
|
|
3509
|
+
)
|
|
3510
|
+
]
|
|
3511
|
+
}
|
|
3512
|
+
),
|
|
3513
|
+
/* @__PURE__ */ e(
|
|
3514
|
+
"div",
|
|
3515
|
+
{
|
|
3516
|
+
className: "border-b",
|
|
3517
|
+
style: {
|
|
3518
|
+
borderColor: "var(--border-default)",
|
|
3519
|
+
backgroundColor: "var(--bg-deep)"
|
|
3520
|
+
},
|
|
3521
|
+
children: g.media
|
|
3522
|
+
}
|
|
3523
|
+
),
|
|
3524
|
+
/* @__PURE__ */ e(
|
|
3525
|
+
"p",
|
|
3526
|
+
{
|
|
3527
|
+
className: "px-6 py-4 text-[13px] leading-relaxed",
|
|
3528
|
+
style: {
|
|
3529
|
+
color: "var(--text-secondary)",
|
|
3530
|
+
fontFamily: "var(--font-sans)"
|
|
3531
|
+
},
|
|
3532
|
+
children: g.blurb
|
|
3533
|
+
}
|
|
3534
|
+
),
|
|
3535
|
+
/* @__PURE__ */ r(
|
|
3536
|
+
"div",
|
|
3537
|
+
{
|
|
3538
|
+
className: "flex items-center justify-between border-t px-6 py-4",
|
|
3539
|
+
style: { borderColor: "var(--border-default)" },
|
|
3540
|
+
children: [
|
|
3541
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: c.map((f, x) => /* @__PURE__ */ e(
|
|
3542
|
+
"span",
|
|
3543
|
+
{
|
|
3544
|
+
className: "h-1.5 rounded-full transition-all",
|
|
3545
|
+
style: {
|
|
3546
|
+
width: x === l ? "18px" : "6px",
|
|
3547
|
+
backgroundColor: x === l ? "var(--accent-cyan)" : "var(--border-default)"
|
|
3548
|
+
}
|
|
3549
|
+
},
|
|
3550
|
+
f.title
|
|
3551
|
+
)) }),
|
|
3552
|
+
/* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
|
|
3553
|
+
l > 0 && /* @__PURE__ */ e(
|
|
3554
|
+
"button",
|
|
3555
|
+
{
|
|
3556
|
+
type: "button",
|
|
3557
|
+
onClick: u,
|
|
3558
|
+
className: "border px-3 py-1.5 text-[10px] tracking-[0.2em] uppercase transition-colors hover:text-white",
|
|
3559
|
+
style: {
|
|
3560
|
+
borderColor: "var(--border-default)",
|
|
3561
|
+
color: "var(--text-muted)",
|
|
3562
|
+
fontFamily: "var(--font-mono)",
|
|
3563
|
+
backgroundColor: "transparent"
|
|
3564
|
+
},
|
|
3565
|
+
children: "Back"
|
|
3566
|
+
}
|
|
3567
|
+
),
|
|
3568
|
+
/* @__PURE__ */ e(
|
|
3569
|
+
"button",
|
|
3570
|
+
{
|
|
3571
|
+
type: "button",
|
|
3572
|
+
onClick: d,
|
|
3573
|
+
className: "border px-4 py-1.5 text-[10px] tracking-[0.2em] uppercase transition-colors hover:text-white",
|
|
3574
|
+
style: {
|
|
3575
|
+
borderColor: "var(--accent-cyan)",
|
|
3576
|
+
color: "var(--accent-cyan)",
|
|
3577
|
+
fontFamily: "var(--font-mono)",
|
|
3578
|
+
backgroundColor: "transparent"
|
|
3579
|
+
},
|
|
3580
|
+
children: l === h ? "Got it" : "Next"
|
|
3581
|
+
}
|
|
3582
|
+
)
|
|
3583
|
+
] })
|
|
3584
|
+
]
|
|
3585
|
+
}
|
|
3586
|
+
)
|
|
3587
|
+
]
|
|
3588
|
+
}
|
|
3589
|
+
)
|
|
3590
|
+
}
|
|
3591
|
+
);
|
|
3592
|
+
}
|
|
3593
|
+
function Qt({ name: t }) {
|
|
3594
|
+
return /* @__PURE__ */ r("div", { className: "ob-stage blueprint-grid flex flex-col items-center justify-center text-center", children: [
|
|
3595
|
+
/* @__PURE__ */ e(
|
|
3596
|
+
"div",
|
|
3597
|
+
{
|
|
3598
|
+
className: "text-[9px] tracking-[0.4em] uppercase",
|
|
3599
|
+
style: { color: "var(--accent-cyan)", fontFamily: "var(--font-mono)" },
|
|
3600
|
+
children: "Architecture"
|
|
3601
|
+
}
|
|
3602
|
+
),
|
|
3603
|
+
/* @__PURE__ */ e(
|
|
3604
|
+
"div",
|
|
3605
|
+
{
|
|
3606
|
+
className: "mt-2 px-6 text-[26px] leading-tight",
|
|
3607
|
+
style: { color: "var(--text-primary)", fontFamily: "var(--font-display)" },
|
|
3608
|
+
children: t
|
|
3609
|
+
}
|
|
3610
|
+
),
|
|
3611
|
+
/* @__PURE__ */ e(
|
|
3612
|
+
"div",
|
|
3613
|
+
{
|
|
3614
|
+
className: "mt-3 text-[10px] tracking-[0.18em] uppercase",
|
|
3615
|
+
style: { color: "var(--text-muted)", fontFamily: "var(--font-mono)" },
|
|
3616
|
+
children: "Interactive architecture diagrams"
|
|
3617
|
+
}
|
|
3618
|
+
)
|
|
3619
|
+
] });
|
|
3620
|
+
}
|
|
3621
|
+
function Jt() {
|
|
3622
|
+
const [t, a] = L(!0), o = C(() => a(!0), []), n = C(() => a(!1), []);
|
|
3623
|
+
return { open: t, openWizard: o, closeWizard: n };
|
|
3624
|
+
}
|
|
3625
|
+
let ie = null;
|
|
3626
|
+
function er({ diagramId: t, showDiagramList: a = !0 }) {
|
|
3627
|
+
const o = U(), n = Ct(), [l, i] = L(null), s = Jt();
|
|
3247
3628
|
B(() => {
|
|
3248
3629
|
t || (window.location.hash = `#/diagram/${o.summary.topDiagram}`);
|
|
3249
3630
|
}, [t, o.summary.topDiagram]), B(() => {
|
|
3250
|
-
var
|
|
3251
|
-
if (!t || t ===
|
|
3252
|
-
|
|
3253
|
-
const
|
|
3254
|
-
(
|
|
3255
|
-
)) == null ? void 0 :
|
|
3256
|
-
n("diagram.viewed", typeof
|
|
3631
|
+
var u;
|
|
3632
|
+
if (!t || t === ie) return;
|
|
3633
|
+
ie = t;
|
|
3634
|
+
const d = (u = o.summary.diagrams.find(
|
|
3635
|
+
(g) => g.slug === t
|
|
3636
|
+
)) == null ? void 0 : u.level;
|
|
3637
|
+
n("diagram.viewed", typeof d == "number" ? { level: d } : {});
|
|
3257
3638
|
}, [t, o.summary.diagrams, n]);
|
|
3258
|
-
const
|
|
3259
|
-
(
|
|
3260
|
-
i(
|
|
3639
|
+
const c = C(
|
|
3640
|
+
(d) => {
|
|
3641
|
+
i(d), d && n("node.inspected");
|
|
3261
3642
|
},
|
|
3262
3643
|
[n]
|
|
3263
|
-
),
|
|
3264
|
-
i(null), window.location.hash = `#/diagram/${
|
|
3644
|
+
), h = C((d) => {
|
|
3645
|
+
i(null), window.location.hash = `#/diagram/${d}`;
|
|
3265
3646
|
}, []);
|
|
3266
3647
|
return /* @__PURE__ */ r(
|
|
3267
3648
|
"div",
|
|
@@ -3270,37 +3651,85 @@ function Ut({ diagramId: t, showDiagramList: a = !0 }) {
|
|
|
3270
3651
|
style: { backgroundColor: "var(--bg-deep)" },
|
|
3271
3652
|
children: [
|
|
3272
3653
|
t ? /* @__PURE__ */ e(
|
|
3273
|
-
|
|
3654
|
+
Wt,
|
|
3274
3655
|
{
|
|
3275
3656
|
diagramId: t,
|
|
3276
|
-
onSelectNode:
|
|
3277
|
-
onDrillIn:
|
|
3657
|
+
onSelectNode: c,
|
|
3658
|
+
onDrillIn: h
|
|
3278
3659
|
},
|
|
3279
3660
|
t
|
|
3280
|
-
) : /* @__PURE__ */ e(
|
|
3661
|
+
) : /* @__PURE__ */ e(rr, { message: "Opening top diagram…" }),
|
|
3281
3662
|
a && /* @__PURE__ */ e(
|
|
3282
|
-
|
|
3663
|
+
Ft,
|
|
3283
3664
|
{
|
|
3284
3665
|
summary: o.summary,
|
|
3285
3666
|
currentDiagramId: t,
|
|
3286
|
-
onSelect:
|
|
3287
|
-
onGoHome: () =>
|
|
3667
|
+
onSelect: h,
|
|
3668
|
+
onGoHome: () => h(o.summary.topDiagram)
|
|
3288
3669
|
}
|
|
3289
3670
|
),
|
|
3290
|
-
/* @__PURE__ */ e(
|
|
3671
|
+
/* @__PURE__ */ e(Yt, {}),
|
|
3291
3672
|
l && /* @__PURE__ */ e(
|
|
3292
|
-
|
|
3673
|
+
Vt,
|
|
3293
3674
|
{
|
|
3294
3675
|
nodeId: l,
|
|
3295
3676
|
onClose: () => i(null)
|
|
3296
3677
|
},
|
|
3297
3678
|
l
|
|
3679
|
+
),
|
|
3680
|
+
/* @__PURE__ */ e(tr, { onClick: s.openWizard }),
|
|
3681
|
+
/* @__PURE__ */ e(
|
|
3682
|
+
qt,
|
|
3683
|
+
{
|
|
3684
|
+
open: s.open,
|
|
3685
|
+
onClose: s.closeWizard,
|
|
3686
|
+
architectureName: o.summary.name,
|
|
3687
|
+
architectureDescription: o.summary.description
|
|
3688
|
+
}
|
|
3298
3689
|
)
|
|
3299
3690
|
]
|
|
3300
3691
|
}
|
|
3301
3692
|
);
|
|
3302
3693
|
}
|
|
3303
|
-
function
|
|
3694
|
+
function tr({ onClick: t }) {
|
|
3695
|
+
return /* @__PURE__ */ e(
|
|
3696
|
+
"button",
|
|
3697
|
+
{
|
|
3698
|
+
type: "button",
|
|
3699
|
+
onClick: t,
|
|
3700
|
+
"aria-label": "Show getting started tour",
|
|
3701
|
+
title: "Getting started",
|
|
3702
|
+
className: "absolute right-4 z-10 flex h-8 w-8 items-center justify-center border shadow-lg backdrop-blur-md transition-colors hover:text-white",
|
|
3703
|
+
style: {
|
|
3704
|
+
// Sit just above the @xyflow Controls cluster (bottom-right) so the
|
|
3705
|
+
// help affordance reads as part of the canvas controls.
|
|
3706
|
+
bottom: "132px",
|
|
3707
|
+
borderColor: "var(--border-default)",
|
|
3708
|
+
backgroundColor: "rgba(10, 15, 26, 0.85)",
|
|
3709
|
+
color: "var(--text-muted)"
|
|
3710
|
+
},
|
|
3711
|
+
children: /* @__PURE__ */ r(
|
|
3712
|
+
"svg",
|
|
3713
|
+
{
|
|
3714
|
+
width: "16",
|
|
3715
|
+
height: "16",
|
|
3716
|
+
viewBox: "0 0 24 24",
|
|
3717
|
+
fill: "none",
|
|
3718
|
+
stroke: "currentColor",
|
|
3719
|
+
strokeWidth: "2",
|
|
3720
|
+
strokeLinecap: "round",
|
|
3721
|
+
strokeLinejoin: "round",
|
|
3722
|
+
children: [
|
|
3723
|
+
/* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "10" }),
|
|
3724
|
+
/* @__PURE__ */ e("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
|
|
3725
|
+
/* @__PURE__ */ e("line", { x1: "12", y1: "17", x2: "12.01", y2: "17" })
|
|
3726
|
+
]
|
|
3727
|
+
}
|
|
3728
|
+
)
|
|
3729
|
+
}
|
|
3730
|
+
);
|
|
3731
|
+
}
|
|
3732
|
+
function rr({ message: t }) {
|
|
3304
3733
|
return /* @__PURE__ */ e(
|
|
3305
3734
|
"div",
|
|
3306
3735
|
{
|
|
@@ -3313,22 +3742,22 @@ function Yt({ message: t }) {
|
|
|
3313
3742
|
}
|
|
3314
3743
|
);
|
|
3315
3744
|
}
|
|
3316
|
-
function
|
|
3317
|
-
const [t, a] =
|
|
3745
|
+
function ar() {
|
|
3746
|
+
const [t, a] = L(() => window.location.hash);
|
|
3318
3747
|
return B(() => {
|
|
3319
3748
|
const o = () => a(window.location.hash);
|
|
3320
3749
|
return window.addEventListener("hashchange", o), () => window.removeEventListener("hashchange", o);
|
|
3321
3750
|
}, []), t;
|
|
3322
3751
|
}
|
|
3323
|
-
function
|
|
3752
|
+
function or(t) {
|
|
3324
3753
|
if (t === "#/style-guide") return { view: "style-guide", diagramId: null };
|
|
3325
3754
|
const a = t.match(/^#\/diagram\/([^/?#]+)/);
|
|
3326
3755
|
return a ? { view: "architecture", diagramId: decodeURIComponent(a[1]) } : { view: "architecture", diagramId: null };
|
|
3327
3756
|
}
|
|
3328
|
-
function
|
|
3329
|
-
const n =
|
|
3330
|
-
return l.view === "style-guide" ? /* @__PURE__ */ e(
|
|
3331
|
-
|
|
3757
|
+
function ur({ dataSource: t, reloadKey: a, showDiagramList: o = !0 }) {
|
|
3758
|
+
const n = ar(), l = or(n);
|
|
3759
|
+
return l.view === "style-guide" ? /* @__PURE__ */ e(_e, {}) : /* @__PURE__ */ e(Lt, { dataSource: t, reloadKey: a, children: /* @__PURE__ */ e(
|
|
3760
|
+
er,
|
|
3332
3761
|
{
|
|
3333
3762
|
diagramId: l.diagramId,
|
|
3334
3763
|
showDiagramList: o
|
|
@@ -3336,6 +3765,6 @@ function ar({ dataSource: t, reloadKey: a, showDiagramList: o = !0 }) {
|
|
|
3336
3765
|
) });
|
|
3337
3766
|
}
|
|
3338
3767
|
export {
|
|
3339
|
-
|
|
3768
|
+
ur as App
|
|
3340
3769
|
};
|
|
3341
3770
|
//# sourceMappingURL=App.js.map
|