@tecture/web 0.1.0 → 0.2.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/dist-lib/App.js CHANGED
@@ -1,11 +1,11 @@
1
- import { jsxs as r, jsx as e, Fragment as H } from "react/jsx-runtime";
2
- import { useMemo as E, createContext as ie, memo as ye, useContext as P, useCallback as M, useState as C, useEffect as B, useRef as G, useId as ke, isValidElement as Ne } from "react";
3
- import { Position as y, useNodeId as se, useStore as ce, NodeResizer as we, Handle as X, Panel as Ce, useInternalNode as K, getSmoothStepPath as Le, EdgeLabelRenderer as Me, MarkerType as Se, ReactFlowProvider as Be, useNodesState as We, useEdgesState as De, useReactFlow as ze, ReactFlow as Ae, Background as Ee, BackgroundVariant as He, Controls as Pe, MiniMap as Te } from "@xyflow/react";
4
- import Fe from "elkjs/lib/elk.bundled.js";
5
- import { buildSourceUrl as Ie, isDeepDivable as Z, buildDeepDivePrompt as Re } from "@tecture/shared";
6
- import je from "markdown-to-jsx";
7
- import { createPortal as $e } from "react-dom";
8
- const F = {
1
+ import { jsxs as r, jsx as e, Fragment as T } from "react/jsx-runtime";
2
+ import { useMemo as A, createContext as de, memo as Ne, useContext as j, useCallback as C, useState as w, useEffect as S, useRef as U, useId as Ce, isValidElement as Le } from "react";
3
+ import { Position as k, useNodeId as me, useStore as ue, NodeResizer as Me, Handle as q, Panel as Se, useInternalNode as Q, getSmoothStepPath as Be, EdgeLabelRenderer as De, MarkerType as We, ReactFlowProvider as ze, useNodesState as Ee, useEdgesState as Ae, useReactFlow as Fe, ReactFlow as Ie, Background as Pe, BackgroundVariant as He, Controls as Te, MiniMap as je } from "@xyflow/react";
4
+ import Re from "elkjs/lib/elk.bundled.js";
5
+ import { driftForNode as $e, buildSourceUrl as Oe, isDeepDivable as J, buildDeepDivePrompt as Ge } from "@tecture/shared";
6
+ import Ve from "markdown-to-jsx";
7
+ import { createPortal as _e } from "react-dom";
8
+ const $ = {
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
- }, Ge = [
31
+ }, Ue = [
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 A({ number: t, children: a }) {
42
+ function F({ 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 q({ token: t, value: a, label: o }) {
55
+ function ee({ 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 Ve() {
71
+ function Ke() {
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(A, { number: "Section 01", children: "Color Palette" }),
156
+ /* @__PURE__ */ e(F, { 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: F.backgrounds.map((t) => /* @__PURE__ */ e(q, { ...t }, t.token)) })
160
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-3 gap-4", children: $.backgrounds.map((t) => /* @__PURE__ */ e(ee, { ...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: F.borders.map((t) => /* @__PURE__ */ e(q, { ...t }, t.token)) })
164
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-3 gap-4", children: $.borders.map((t) => /* @__PURE__ */ e(ee, { ...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: F.text.map((t) => /* @__PURE__ */ r("div", { className: "group", children: [
168
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-3 gap-4", children: $.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: F.accents.map((t) => /* @__PURE__ */ r("div", { className: "group", children: [
186
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-5 gap-4", children: $.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: Ge.map((t) => /* @__PURE__ */ r(
208
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-3 gap-3 sm:grid-cols-5", children: Ue.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(A, { number: "Section 02", children: "Typography" }),
225
+ /* @__PURE__ */ e(F, { 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(A, { number: "Section 03", children: "Components" }),
381
+ /* @__PURE__ */ e(F, { 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(A, { number: "Section 04", children: "Animation & Motion" }),
678
+ /* @__PURE__ */ e(F, { 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(A, { number: "Section 05", children: "Layout & Spacing" }),
779
+ /* @__PURE__ */ e(F, { 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(A, { number: "Section 06", children: "Blueprint Decorations" }),
883
+ /* @__PURE__ */ e(F, { 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(A, { number: "Section 07", children: "Usage Guidelines" }),
954
+ /* @__PURE__ */ e(F, { 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 Oe = {
1043
+ const Ye = {
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
- }, Q = {
1185
+ }, te = {
1186
1186
  label: "Component",
1187
1187
  bg: "#0a0f1a",
1188
1188
  bgHover: "#0f1628",
@@ -1195,91 +1195,91 @@ const Oe = {
1195
1195
  ],
1196
1196
  accentGlow: "rgba(100,116,139,0.08)"
1197
1197
  };
1198
- function O(t) {
1199
- return t ? Oe[t] ?? Q : Q;
1198
+ function Y(t) {
1199
+ return t ? Ye[t] ?? te : te;
1200
1200
  }
1201
- function I(t) {
1201
+ function O(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 _e(t, a) {
1209
- const o = I(t), n = I(a), l = Math.abs(o.x - n.x), i = Math.abs(o.y - n.y);
1210
- return l > i ? o.x > n.x ? y.Left : y.Right : o.y > n.y ? y.Top : y.Bottom;
1208
+ function Xe(t, a) {
1209
+ const o = O(t), n = O(a), l = Math.abs(o.x - n.x), s = Math.abs(o.y - n.y);
1210
+ return l > s ? o.x > n.x ? k.Left : k.Right : o.y > n.y ? k.Top : k.Bottom;
1211
1211
  }
1212
- function J(t, a, o) {
1213
- const n = I(t), l = I(a), i = Math.abs(n.x - l.x), s = Math.abs(n.y - l.y);
1212
+ function re(t, a, o) {
1213
+ const n = O(t), l = O(a), s = Math.abs(n.x - l.x), i = Math.abs(n.y - l.y);
1214
1214
  let c;
1215
- i > s ? c = n.x > l.x ? y.Left : y.Right : c = n.y > l.y ? y.Top : y.Bottom;
1216
- const [u, d] = Ue(t, c, o);
1217
- return [u, d, c];
1215
+ s > i ? c = n.x > l.x ? k.Left : k.Right : c = n.y > l.y ? k.Top : k.Bottom;
1216
+ const [m, d] = Ze(t, c, o);
1217
+ return [m, d, c];
1218
1218
  }
1219
- function Ue(t, a, o) {
1220
- var d, h, g;
1221
- const n = (d = t.internals.handleBounds) == null ? void 0 : d[o], l = n == null ? void 0 : n.find((f) => f.position === a);
1219
+ function Ze(t, a, o) {
1220
+ var d, h, p;
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
1224
  t.internals.positionAbsolute.x + (((h = t.measured) == null ? void 0 : h.width) ?? 0) / 2,
1225
- t.internals.positionAbsolute.y + (((g = t.measured) == null ? void 0 : g.height) ?? 0) / 2
1225
+ t.internals.positionAbsolute.y + (((p = t.measured) == null ? void 0 : p.height) ?? 0) / 2
1226
1226
  ];
1227
- let i = l.width / 2, s = l.height / 2;
1227
+ let s = l.width / 2, i = l.height / 2;
1228
1228
  switch (a) {
1229
- case y.Left:
1230
- i = 0;
1229
+ case k.Left:
1230
+ s = 0;
1231
1231
  break;
1232
- case y.Right:
1233
- i = l.width;
1232
+ case k.Right:
1233
+ s = l.width;
1234
1234
  break;
1235
- case y.Top:
1236
- s = 0;
1235
+ case k.Top:
1236
+ i = 0;
1237
1237
  break;
1238
- case y.Bottom:
1239
- s = l.height;
1238
+ case k.Bottom:
1239
+ i = l.height;
1240
1240
  break;
1241
1241
  }
1242
- const c = t.internals.positionAbsolute.x + l.x + i, u = t.internals.positionAbsolute.y + l.y + s;
1243
- return [c, u];
1242
+ const c = t.internals.positionAbsolute.x + l.x + s, m = t.internals.positionAbsolute.y + l.y + i;
1243
+ return [c, m];
1244
1244
  }
1245
- function Ye(t, a) {
1246
- const [o, n, l] = J(t, a, "source"), [i, s, c] = J(a, t, "target");
1247
- return { sx: o, sy: n, tx: i, ty: s, sourcePos: l, targetPos: c };
1245
+ function qe(t, a) {
1246
+ const [o, n, l] = re(t, a, "source"), [s, i, c] = re(a, t, "target");
1247
+ return { sx: o, sy: n, tx: s, ty: i, sourcePos: l, targetPos: c };
1248
1248
  }
1249
- function Xe() {
1250
- const t = se(), a = ce((o) => {
1249
+ function Qe() {
1250
+ const t = me(), a = ue((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();
1254
1254
  const l = /* @__PURE__ */ new Set();
1255
- for (const i of o.edges) {
1256
- let s = null;
1257
- if (i.source === t ? s = i.target : i.target === t && (s = i.source), !s) continue;
1258
- const c = o.nodeLookup.get(s);
1259
- c && l.add(_e(n, c));
1255
+ for (const s of o.edges) {
1256
+ let i = null;
1257
+ if (s.source === t ? i = s.target : s.target === t && (i = s.source), !i) continue;
1258
+ const c = o.nodeLookup.get(i);
1259
+ c && l.add(Xe(n, c));
1260
1260
  }
1261
1261
  return l;
1262
1262
  });
1263
- return E(() => a, [a]);
1263
+ return A(() => a, [a]);
1264
1264
  }
1265
- const de = ie(null), me = [
1266
- { position: y.Top, prefix: "top" },
1267
- { position: y.Bottom, prefix: "bottom" },
1268
- { position: y.Left, prefix: "left" },
1269
- { position: y.Right, prefix: "right" }
1265
+ const he = de(null), pe = [
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 Ke({ data: t, selected: a }) {
1272
- const o = t, n = O(o.nodeType), l = Xe(), i = (s) => {
1273
- s.stopPropagation(), o.subDiagramId && (window.location.hash = `#/diagram/${o.subDiagramId}`);
1271
+ function Je({ data: t, selected: a }) {
1272
+ const o = t, n = Y(o.nodeType), l = Qe(), s = (i) => {
1273
+ i.stopPropagation(), o.subDiagramId && (window.location.hash = `#/diagram/${o.subDiagramId}`);
1274
1274
  };
1275
1275
  return o.isContainer || o.hasChildren ? /* @__PURE__ */ e(
1276
- qe,
1276
+ tt,
1277
1277
  {
1278
1278
  d: o,
1279
1279
  style: n,
1280
1280
  selected: a ?? !1,
1281
1281
  activeSides: l,
1282
- onDrillDown: i
1282
+ onDrillDown: s
1283
1283
  }
1284
1284
  ) : /* @__PURE__ */ r(
1285
1285
  "div",
@@ -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(ue, { accent: n.accent }),
1298
- me.map(({ position: s, prefix: c }) => {
1299
- const u = l.has(s);
1297
+ /* @__PURE__ */ e(fe, { accent: n.accent }),
1298
+ pe.map(({ position: i, prefix: c }) => {
1299
+ const m = l.has(i);
1300
1300
  return /* @__PURE__ */ e(
1301
- he,
1301
+ ge,
1302
1302
  {
1303
- position: s,
1303
+ position: i,
1304
1304
  prefix: c,
1305
1305
  style: n,
1306
- isActive: u
1306
+ isActive: m
1307
1307
  },
1308
1308
  c
1309
1309
  );
@@ -1318,14 +1318,14 @@ function Ke({ data: t, selected: a }) {
1318
1318
  strokeLinecap: "round",
1319
1319
  strokeLinejoin: "round",
1320
1320
  className: "shrink-0",
1321
- children: n.iconPaths.map((s, c) => /* @__PURE__ */ e(
1321
+ children: n.iconPaths.map((i, c) => /* @__PURE__ */ e(
1322
1322
  "path",
1323
1323
  {
1324
- d: s.d,
1325
- fill: s.fill ?? "none",
1326
- stroke: s.stroke ?? "none",
1327
- strokeWidth: s.strokeWidth ?? 0,
1328
- opacity: s.opacity ?? 1
1324
+ d: i.d,
1325
+ fill: i.fill ?? "none",
1326
+ stroke: i.stroke ?? "none",
1327
+ strokeWidth: i.strokeWidth ?? 0,
1328
+ opacity: i.opacity ?? 1
1329
1329
  },
1330
1330
  c
1331
1331
  ))
@@ -1354,7 +1354,7 @@ function Ke({ data: t, selected: a }) {
1354
1354
  o.hasSubDiagram && /* @__PURE__ */ r(
1355
1355
  "div",
1356
1356
  {
1357
- onClick: i,
1357
+ onClick: s,
1358
1358
  className: "mx-auto mt-2 flex w-fit cursor-pointer items-center gap-1 px-2.5 py-0.5 text-[10px] font-medium transition-opacity hover:opacity-80",
1359
1359
  style: {
1360
1360
  background: `${n.accent}10`,
@@ -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(pe, {})
1368
+ /* @__PURE__ */ e(be, {})
1369
1369
  ]
1370
1370
  }
1371
1371
  )
@@ -1373,24 +1373,24 @@ function Ke({ data: t, selected: a }) {
1373
1373
  }
1374
1374
  );
1375
1375
  }
1376
- const ee = 16, Ze = 48;
1377
- function qe({ d: t, style: a, selected: o, activeSides: n, onDrillDown: l }) {
1378
- const i = se(), s = P(de), c = M(() => {
1379
- s == null || s.notifyLayoutChanged();
1380
- }, [s]), u = ce(
1381
- M(
1376
+ const ae = 16, et = 48;
1377
+ function tt({ d: t, style: a, selected: o, activeSides: n, onDrillDown: l }) {
1378
+ const s = me(), i = j(he), c = C(() => {
1379
+ i == null || i.notifyLayoutChanged();
1380
+ }, [i]), m = ue(
1381
+ C(
1382
1382
  (d) => {
1383
- var f, x, w, k;
1384
- let h = 200, g = Ze + 40;
1385
- if (!i) return { minWidth: h, minHeight: g };
1386
- for (const m of d.nodeLookup.values()) {
1387
- if (m.parentId !== i) continue;
1388
- const p = ((f = m.measured) == null ? void 0 : f.width) ?? 220, b = ((x = m.measured) == null ? void 0 : x.height) ?? 80, N = (((w = m.position) == null ? void 0 : w.x) ?? 0) + p + ee, v = (((k = m.position) == null ? void 0 : k.y) ?? 0) + b + ee;
1389
- N > h && (h = N), v > g && (g = v);
1383
+ var b, f, y, N;
1384
+ let h = 200, p = et + 40;
1385
+ if (!s) return { minWidth: h, minHeight: p };
1386
+ for (const u of d.nodeLookup.values()) {
1387
+ if (u.parentId !== s) continue;
1388
+ const g = ((b = u.measured) == null ? void 0 : b.width) ?? 220, L = ((f = u.measured) == null ? void 0 : f.height) ?? 80, x = (((y = u.position) == null ? void 0 : y.x) ?? 0) + g + ae, v = (((N = u.position) == null ? void 0 : N.y) ?? 0) + L + ae;
1389
+ x > h && (h = x), v > p && (p = v);
1390
1390
  }
1391
- return { minWidth: h, minHeight: g };
1391
+ return { minWidth: h, minHeight: p };
1392
1392
  },
1393
- [i]
1393
+ [s]
1394
1394
  ),
1395
1395
  (d, h) => d.minWidth === h.minWidth && d.minHeight === h.minHeight
1396
1396
  );
@@ -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
- we,
1412
+ Me,
1413
1413
  {
1414
1414
  isVisible: o,
1415
- minWidth: u.minWidth,
1416
- minHeight: u.minHeight,
1415
+ minWidth: m.minWidth,
1416
+ minHeight: m.minHeight,
1417
1417
  onResizeEnd: c,
1418
1418
  lineStyle: {
1419
1419
  borderColor: `${a.accent}55`,
@@ -1429,16 +1429,16 @@ function qe({ d: t, style: a, selected: o, activeSides: n, onDrillDown: l }) {
1429
1429
  }
1430
1430
  }
1431
1431
  ),
1432
- /* @__PURE__ */ e(ue, { accent: a.accent }),
1433
- me.map(({ position: d, prefix: h }) => {
1434
- const g = n.has(d);
1432
+ /* @__PURE__ */ e(fe, { accent: a.accent }),
1433
+ pe.map(({ position: d, prefix: h }) => {
1434
+ const p = n.has(d);
1435
1435
  return /* @__PURE__ */ e(
1436
- he,
1436
+ ge,
1437
1437
  {
1438
1438
  position: d,
1439
1439
  prefix: h,
1440
1440
  style: a,
1441
- isActive: g
1441
+ isActive: p
1442
1442
  },
1443
1443
  h
1444
1444
  );
@@ -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(pe, {})
1514
+ /* @__PURE__ */ e(be, {})
1515
1515
  ]
1516
1516
  }
1517
1517
  )
@@ -1522,8 +1522,8 @@ function qe({ d: t, style: a, selected: o, activeSides: n, onDrillDown: l }) {
1522
1522
  }
1523
1523
  );
1524
1524
  }
1525
- function ue({ accent: t }) {
1526
- return /* @__PURE__ */ r(H, { children: [
1525
+ function fe({ accent: t }) {
1526
+ return /* @__PURE__ */ r(T, { children: [
1527
1527
  /* @__PURE__ */ e(
1528
1528
  "svg",
1529
1529
  {
@@ -1564,7 +1564,7 @@ function ue({ accent: t }) {
1564
1564
  )
1565
1565
  ] });
1566
1566
  }
1567
- function he({
1567
+ function ge({
1568
1568
  position: t,
1569
1569
  prefix: a,
1570
1570
  style: o,
@@ -1582,7 +1582,7 @@ function he({
1582
1582
  };
1583
1583
  return /* @__PURE__ */ r("span", { children: [
1584
1584
  /* @__PURE__ */ e(
1585
- X,
1585
+ q,
1586
1586
  {
1587
1587
  type: "source",
1588
1588
  position: t,
@@ -1592,7 +1592,7 @@ function he({
1592
1592
  }
1593
1593
  ),
1594
1594
  /* @__PURE__ */ e(
1595
- X,
1595
+ q,
1596
1596
  {
1597
1597
  type: "target",
1598
1598
  position: t,
@@ -1603,7 +1603,7 @@ function he({
1603
1603
  )
1604
1604
  ] });
1605
1605
  }
1606
- function pe() {
1606
+ function be() {
1607
1607
  return /* @__PURE__ */ e(
1608
1608
  "svg",
1609
1609
  {
@@ -1619,33 +1619,33 @@ function pe() {
1619
1619
  }
1620
1620
  );
1621
1621
  }
1622
- const Qe = ye(Ke), Je = {
1622
+ const rt = Ne(Je), at = {
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
- }, te = {
1629
+ }, oe = {
1630
1630
  color: "#22d3ee",
1631
1631
  dashed: !1,
1632
1632
  animated: !1,
1633
1633
  label: "Connection"
1634
1634
  };
1635
- function ge(t) {
1636
- return t ? Je[t] ?? te : te;
1635
+ function xe(t) {
1636
+ return t ? at[t] ?? oe : oe;
1637
1637
  }
1638
- function et({ diagram: t }) {
1639
- const [a, o] = C(!1), { nodeTypes: n, edgeTypes: l } = E(() => {
1640
- var c, u;
1641
- const i = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set();
1638
+ function ot({ diagram: t }) {
1639
+ const [a, o] = w(!1), { nodeTypes: n, edgeTypes: l } = A(() => {
1640
+ var c, m;
1641
+ const s = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set();
1642
1642
  for (const d of t.nodes)
1643
- typeof ((c = d.meta) == null ? void 0 : c.type) == "string" && i.add(d.meta.type);
1643
+ typeof ((c = d.meta) == null ? void 0 : c.type) == "string" && s.add(d.meta.type);
1644
1644
  for (const d of t.edges)
1645
- typeof ((u = d.meta) == null ? void 0 : u.type) == "string" && s.add(d.meta.type);
1646
- return { nodeTypes: [...i].sort(), edgeTypes: [...s].sort() };
1645
+ typeof ((m = d.meta) == null ? void 0 : m.type) == "string" && i.add(d.meta.type);
1646
+ return { nodeTypes: [...s].sort(), edgeTypes: [...i].sort() };
1647
1647
  }, [t]);
1648
- return n.length === 0 && l.length === 0 ? null : /* @__PURE__ */ e(Ce, { position: "top-right", className: "!m-3", children: /* @__PURE__ */ r(
1648
+ return n.length === 0 && l.length === 0 ? null : /* @__PURE__ */ e(Se, { 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",
@@ -1660,14 +1660,14 @@ function et({ diagram: t }) {
1660
1660
  "button",
1661
1661
  {
1662
1662
  type: "button",
1663
- onClick: () => o((i) => !i),
1663
+ onClick: () => o((s) => !s),
1664
1664
  className: "flex items-center gap-2 px-3 py-1.5 text-[10px] tracking-[0.2em] uppercase transition-colors hover:text-white",
1665
1665
  style: { color: "var(--text-muted, #94a3b8)" },
1666
1666
  "aria-expanded": a,
1667
1667
  children: [
1668
- /* @__PURE__ */ e(ot, {}),
1668
+ /* @__PURE__ */ e(st, {}),
1669
1669
  /* @__PURE__ */ e("span", { children: "Legend" }),
1670
- /* @__PURE__ */ e(nt, { open: a })
1670
+ /* @__PURE__ */ e(ct, { 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(re, { title: "Nodes", children: n.map((i) => /* @__PURE__ */ e(tt, { type: i, style: O(i) }, i)) }),
1681
- l.length > 0 && /* @__PURE__ */ e(re, { title: "Edges", children: l.map((i) => /* @__PURE__ */ e(rt, { style: ge(i) }, i)) })
1680
+ n.length > 0 && /* @__PURE__ */ e(ne, { title: "Nodes", children: n.map((s) => /* @__PURE__ */ e(nt, { type: s, style: Y(s) }, s)) }),
1681
+ l.length > 0 && /* @__PURE__ */ e(ne, { title: "Edges", children: l.map((s) => /* @__PURE__ */ e(lt, { style: xe(s) }, s)) })
1682
1682
  ]
1683
1683
  }
1684
1684
  )
@@ -1686,7 +1686,7 @@ function et({ diagram: t }) {
1686
1686
  }
1687
1687
  ) });
1688
1688
  }
1689
- function re({
1689
+ function ne({
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 tt({ type: t, style: a }) {
1705
+ function nt({ 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(at, { p: o }, n)) })
1712
+ children: /* @__PURE__ */ e("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", children: a.iconPaths.map((o, n) => /* @__PURE__ */ e(it, { 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 rt({ style: t }) {
1726
+ function lt({ 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 at({ p: t }) {
1763
+ function it({ 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 ot() {
1777
+ function st() {
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 nt({ open: t }) {
1785
+ function ct({ open: t }) {
1786
1786
  return /* @__PURE__ */ e(
1787
1787
  "svg",
1788
1788
  {
@@ -1802,84 +1802,84 @@ function nt({ open: t }) {
1802
1802
  }
1803
1803
  );
1804
1804
  }
1805
- function lt({
1805
+ function dt({
1806
1806
  id: t,
1807
1807
  source: a,
1808
1808
  target: o,
1809
1809
  markerEnd: n,
1810
1810
  style: l,
1811
- label: i,
1812
- labelStyle: s,
1811
+ label: s,
1812
+ labelStyle: i,
1813
1813
  labelBgStyle: c,
1814
- labelBgPadding: u,
1814
+ labelBgPadding: m,
1815
1815
  labelBgBorderRadius: d,
1816
1816
  animated: h
1817
1817
  }) {
1818
- const g = K(a), f = K(o);
1819
- if (!g || !f) return null;
1820
- const { sx: x, sy: w, tx: k, ty: m, sourcePos: p, targetPos: b } = Ye(
1821
- g,
1822
- f
1823
- ), [N, v, L] = Le({
1824
- sourceX: x,
1825
- sourceY: w,
1826
- sourcePosition: p,
1827
- targetPosition: b,
1828
- targetX: k,
1829
- targetY: m,
1818
+ const p = Q(a), b = Q(o);
1819
+ if (!p || !b) return null;
1820
+ const { sx: f, sy: y, tx: N, ty: u, sourcePos: g, targetPos: L } = qe(
1821
+ p,
1822
+ b
1823
+ ), [x, v, M] = Be({
1824
+ sourceX: f,
1825
+ sourceY: y,
1826
+ sourcePosition: g,
1827
+ targetPosition: L,
1828
+ targetX: N,
1829
+ targetY: u,
1830
1830
  borderRadius: 8
1831
1831
  });
1832
- return /* @__PURE__ */ r(H, { children: [
1832
+ return /* @__PURE__ */ r(T, { children: [
1833
1833
  /* @__PURE__ */ e(
1834
1834
  "path",
1835
1835
  {
1836
1836
  id: t,
1837
1837
  className: `react-flow__edge-path${h ? " react-flow__edge-path--animated" : ""}`,
1838
- d: N,
1838
+ d: x,
1839
1839
  markerEnd: n,
1840
1840
  style: l
1841
1841
  }
1842
1842
  ),
1843
- i && /* @__PURE__ */ e(Me, { children: /* @__PURE__ */ e(
1843
+ s && /* @__PURE__ */ e(De, { children: /* @__PURE__ */ e(
1844
1844
  "div",
1845
1845
  {
1846
1846
  style: {
1847
1847
  position: "absolute",
1848
- transform: `translate(-50%, -50%) translate(${v}px, ${L}px)`,
1848
+ transform: `translate(-50%, -50%) translate(${v}px, ${M}px)`,
1849
1849
  pointerEvents: "all",
1850
1850
  ...c ? {
1851
- background: it(c),
1851
+ background: mt(c),
1852
1852
  borderRadius: d ?? 4,
1853
- padding: u ? `${u[1]}px ${u[0]}px` : "4px 6px"
1853
+ padding: m ? `${m[1]}px ${m[0]}px` : "4px 6px"
1854
1854
  } : {}
1855
1855
  },
1856
- children: /* @__PURE__ */ e("span", { style: s, children: i })
1856
+ children: /* @__PURE__ */ e("span", { style: i, children: s })
1857
1857
  }
1858
1858
  ) })
1859
1859
  ] });
1860
1860
  }
1861
- function it(t) {
1861
+ function mt(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), u = parseInt(i.slice(4, 6), 16);
1867
- return `rgba(${s}, ${c}, ${u}, ${n})`;
1866
+ const s = l.length === 3 ? l.split("").map((d) => d + d).join("") : l, i = parseInt(s.slice(0, 2), 16), c = parseInt(s.slice(2, 4), 16), m = parseInt(s.slice(4, 6), 16);
1867
+ return `rgba(${i}, ${c}, ${m}, ${n})`;
1868
1868
  }
1869
- function st(t) {
1869
+ function ut(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) => ct(n, o.has(n.id))),
1875
- edges: t.edges.filter((n) => a.has(n.source) && a.has(n.target)).map(dt)
1874
+ nodes: t.nodes.map((n) => ht(n, o.has(n.id))),
1875
+ edges: t.edges.filter((n) => a.has(n.source) && a.has(n.target)).map(pt)
1876
1876
  };
1877
1877
  }
1878
- function ct(t, a) {
1879
- var i, s, c;
1880
- const o = !!((i = t.meta) != null && i.isContainer) || a, n = {
1878
+ function ht(t, a) {
1879
+ var s, i, c;
1880
+ const o = !!((s = t.meta) != null && s.isContainer) || a, n = {
1881
1881
  label: t.label,
1882
- nodeType: (s = t.meta) == null ? void 0 : s.type,
1882
+ nodeType: (i = t.meta) == null ? void 0 : i.type,
1883
1883
  technology: typeof ((c = t.meta) == null ? void 0 : c.technology) == "string" ? t.meta.technology : void 0,
1884
1884
  hasSubDiagram: !!t.subDiagramId,
1885
1885
  subDiagramId: t.subDiagramId ?? void 0,
@@ -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 dt(t) {
1896
+ function pt(t) {
1897
1897
  var n;
1898
- const a = ge((n = t.meta) == null ? void 0 : n.type), o = { strokeWidth: 1.5, stroke: a.color };
1898
+ const a = xe((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: Se.ArrowClosed,
1908
+ type: We.ArrowClosed,
1909
1909
  width: 16,
1910
1910
  height: 16,
1911
1911
  color: a.color
@@ -1925,73 +1925,73 @@ function dt(t) {
1925
1925
  labelBgBorderRadius: 4
1926
1926
  };
1927
1927
  }
1928
- const mt = new Fe(), ae = 220, oe = 80, ut = "[top=48,left=16,bottom=16,right=16]";
1929
- function ht(t) {
1928
+ const ft = new Re(), le = 220, ie = 80, gt = "[top=48,left=16,bottom=16,right=16]";
1929
+ function bt(t) {
1930
1930
  return t === "LR" ? "RIGHT" : "DOWN";
1931
1931
  }
1932
- async function pt(t, a, o, n) {
1932
+ async function xt(t, a, o, n) {
1933
1933
  if (t.length === 0) return t;
1934
1934
  const l = /* @__PURE__ */ new Map();
1935
- for (const m of t) {
1936
- const p = m.parentId ?? void 0, b = l.get(p) ?? [];
1937
- b.push(m), l.set(p, b);
1935
+ for (const u of t) {
1936
+ const g = u.parentId ?? void 0, L = l.get(g) ?? [];
1937
+ L.push(u), l.set(g, L);
1938
1938
  }
1939
- const i = (m) => {
1940
- var p;
1941
- return (((p = l.get(m)) == null ? void 0 : p.length) ?? 0) > 0;
1942
- }, s = (m) => i(m.id) ? {
1943
- id: m.id,
1944
- layoutOptions: { "elk.padding": ut },
1945
- children: (l.get(m.id) ?? []).map(s)
1946
- } : { id: m.id, width: ae, height: oe }, c = l.get(void 0) ?? [], u = {
1939
+ const s = (u) => {
1940
+ var g;
1941
+ return (((g = l.get(u)) == null ? void 0 : g.length) ?? 0) > 0;
1942
+ }, i = (u) => s(u.id) ? {
1943
+ id: u.id,
1944
+ layoutOptions: { "elk.padding": gt },
1945
+ children: (l.get(u.id) ?? []).map(i)
1946
+ } : { id: u.id, width: le, height: ie }, c = l.get(void 0) ?? [], m = {
1947
1947
  id: "root",
1948
1948
  layoutOptions: {
1949
1949
  "elk.algorithm": "layered",
1950
- "elk.direction": ht(o),
1950
+ "elk.direction": bt(o),
1951
1951
  "elk.edgeRouting": "ORTHOGONAL",
1952
1952
  "elk.spacing.nodeNode": "80",
1953
1953
  "elk.layered.spacing.nodeNodeBetweenLayers": "120",
1954
1954
  "elk.layered.crossingMinimization.strategy": "LAYER_SWEEP",
1955
1955
  "elk.hierarchyHandling": "INCLUDE_CHILDREN"
1956
1956
  },
1957
- children: c.map(s),
1958
- edges: a.map((m) => ({
1959
- id: m.id,
1960
- sources: [m.source],
1961
- targets: [m.target]
1957
+ children: c.map(i),
1958
+ edges: a.map((u) => ({
1959
+ id: u.id,
1960
+ sources: [u.source],
1961
+ targets: [u.target]
1962
1962
  }))
1963
- }, d = await mt.layout(u), h = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map(), f = (m) => {
1964
- m.id !== "root" && (h.set(m.id, { x: m.x ?? 0, y: m.y ?? 0 }), i(m.id) && g.set(m.id, {
1965
- width: m.width ?? ae,
1966
- height: m.height ?? oe
1963
+ }, d = await ft.layout(m), h = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map(), b = (u) => {
1964
+ u.id !== "root" && (h.set(u.id, { x: u.x ?? 0, y: u.y ?? 0 }), s(u.id) && p.set(u.id, {
1965
+ width: u.width ?? le,
1966
+ height: u.height ?? ie
1967
1967
  }));
1968
- for (const p of m.children ?? []) f(p);
1968
+ for (const g of u.children ?? []) b(g);
1969
1969
  };
1970
- f(d);
1971
- const x = /* @__PURE__ */ new Set(), w = [], k = (m) => {
1972
- if (x.has(m.id)) return;
1973
- x.add(m.id);
1974
- const p = n == null ? void 0 : n.nodes[m.id], b = p ? { x: p.x, y: p.y } : h.get(m.id) ?? { x: 0, y: 0 }, N = { ...m, position: b }, v = g.get(m.id), L = (p == null ? void 0 : p.width) ?? (v == null ? void 0 : v.width), W = (p == null ? void 0 : p.height) ?? (v == null ? void 0 : v.height);
1975
- L !== void 0 && W !== void 0 && (N.style = { ...m.style ?? {}, width: L, height: W }), w.push(N);
1976
- for (const j of l.get(m.id) ?? []) k(j);
1970
+ b(d);
1971
+ const f = /* @__PURE__ */ new Set(), y = [], N = (u) => {
1972
+ if (f.has(u.id)) return;
1973
+ f.add(u.id);
1974
+ const g = n == null ? void 0 : n.nodes[u.id], L = g ? { x: g.x, y: g.y } : h.get(u.id) ?? { x: 0, y: 0 }, x = { ...u, position: L }, v = p.get(u.id), M = (g == null ? void 0 : g.width) ?? (v == null ? void 0 : v.width), W = (g == null ? void 0 : g.height) ?? (v == null ? void 0 : v.height);
1975
+ M !== void 0 && W !== void 0 && (x.style = { ...u.style ?? {}, width: M, height: W }), y.push(x);
1976
+ for (const I of l.get(u.id) ?? []) N(I);
1977
1977
  };
1978
- for (const m of c) k(m);
1979
- for (const m of t) x.has(m.id) || k(m);
1980
- return w;
1978
+ for (const u of c) N(u);
1979
+ for (const u of t) f.has(u.id) || N(u);
1980
+ return y;
1981
1981
  }
1982
- const gt = {
1982
+ const vt = {
1983
1983
  summary: "Reading manifest",
1984
1984
  diagrams: "Loading diagrams",
1985
1985
  descriptions: "Loading node details"
1986
- }, ft = 150;
1987
- function xt({ state: t }) {
1988
- const [a, o] = C(!1);
1989
- return B(() => {
1986
+ }, yt = 150;
1987
+ function kt({ state: t }) {
1988
+ const [a, o] = w(!1);
1989
+ return S(() => {
1990
1990
  if (t.status === "error") {
1991
1991
  o(!0);
1992
1992
  return;
1993
1993
  }
1994
- const n = setTimeout(() => o(!0), ft);
1994
+ const n = setTimeout(() => o(!0), yt);
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(vt, { message: t.message }) : /* @__PURE__ */ e(bt, { state: t })
2011
+ children: t.status === "error" ? /* @__PURE__ */ e(Nt, { message: t.message }) : /* @__PURE__ */ e(wt, { state: t })
2012
2012
  }
2013
2013
  )
2014
2014
  }
@@ -2021,11 +2021,11 @@ function xt({ state: t }) {
2021
2021
  }
2022
2022
  );
2023
2023
  }
2024
- function bt({
2024
+ function wt({
2025
2025
  state: t
2026
2026
  }) {
2027
- const { phase: a, done: o, total: n, archName: l } = t, i = n > 0 ? Math.min(1, o / n) : 0, s = a !== "summary";
2028
- return /* @__PURE__ */ r(H, { children: [
2027
+ const { phase: a, done: o, total: n, archName: l } = t, s = n > 0 ? Math.min(1, o / n) : 0, i = a !== "summary";
2028
+ return /* @__PURE__ */ r(T, { children: [
2029
2029
  /* @__PURE__ */ e(
2030
2030
  "div",
2031
2031
  {
@@ -2048,8 +2048,8 @@ 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: gt[a] }),
2052
- s && /* @__PURE__ */ r("span", { style: { color: "var(--text-muted)" }, children: [
2051
+ /* @__PURE__ */ e("span", { children: vt[a] }),
2052
+ i && /* @__PURE__ */ r("span", { style: { color: "var(--text-muted)" }, children: [
2053
2053
  o,
2054
2054
  " / ",
2055
2055
  n
@@ -2076,7 +2076,7 @@ function bt({
2076
2076
  {
2077
2077
  className: "h-full",
2078
2078
  style: {
2079
- width: `${i * 100}%`,
2079
+ width: `${s * 100}%`,
2080
2080
  backgroundColor: "var(--accent-cyan)",
2081
2081
  transition: "width 200ms ease-out"
2082
2082
  }
@@ -2086,8 +2086,8 @@ function bt({
2086
2086
  )
2087
2087
  ] });
2088
2088
  }
2089
- function vt({ message: t }) {
2090
- return /* @__PURE__ */ r(H, { children: [
2089
+ function Nt({ message: t }) {
2090
+ return /* @__PURE__ */ r(T, { children: [
2091
2091
  /* @__PURE__ */ e(
2092
2092
  "div",
2093
2093
  {
@@ -2129,169 +2129,172 @@ function vt({ message: t }) {
2129
2129
  )
2130
2130
  ] });
2131
2131
  }
2132
- const T = ie(null);
2133
- function _() {
2134
- const t = P(T);
2132
+ const R = de(null);
2133
+ function V() {
2134
+ const t = j(R);
2135
2135
  if (!t)
2136
2136
  throw new Error(
2137
2137
  "useArchitectureBundle must be used inside ArchitectureBundleProvider"
2138
2138
  );
2139
2139
  return t.bundle;
2140
2140
  }
2141
- function yt() {
2142
- const t = P(T);
2141
+ function Ct() {
2142
+ const t = j(R);
2143
2143
  if (!t)
2144
2144
  throw new Error(
2145
2145
  "useSaveLayout must be used inside ArchitectureBundleProvider"
2146
2146
  );
2147
2147
  return t.saveLayout;
2148
2148
  }
2149
- function kt() {
2150
- const t = P(T);
2149
+ function Lt() {
2150
+ const t = j(R);
2151
2151
  if (!t)
2152
2152
  throw new Error(
2153
2153
  "useOpenInEditor must be used inside ArchitectureBundleProvider"
2154
2154
  );
2155
2155
  return t.openInEditor;
2156
2156
  }
2157
- function Nt() {
2158
- const t = P(T);
2157
+ function Mt() {
2158
+ const t = j(R);
2159
2159
  if (!t)
2160
2160
  throw new Error(
2161
2161
  "useReportUsage must be used inside ArchitectureBundleProvider"
2162
2162
  );
2163
2163
  return t.reportUsage;
2164
2164
  }
2165
- function wt({
2165
+ function St({
2166
2166
  dataSource: t,
2167
2167
  children: a,
2168
2168
  reloadKey: o
2169
2169
  }) {
2170
- const [n, l] = C({
2170
+ const [n, l] = w({
2171
2171
  status: "loading",
2172
2172
  phase: "summary",
2173
2173
  done: 0,
2174
2174
  total: 1
2175
2175
  });
2176
- B(() => {
2176
+ S(() => {
2177
2177
  let h = !1;
2178
- return l({ status: "loading", phase: "summary", done: 0, total: 1 }), Ct({
2178
+ return l({ status: "loading", phase: "summary", done: 0, total: 1 }), Bt({
2179
2179
  dataSource: t,
2180
- onState: (g) => {
2181
- h || l(g);
2180
+ onState: (p) => {
2181
+ h || l(p);
2182
2182
  },
2183
2183
  isCancelled: () => h
2184
2184
  }), () => {
2185
2185
  h = !0;
2186
2186
  };
2187
2187
  }, [t, o]);
2188
- const i = M(
2189
- async (h, g) => {
2190
- const f = await t.saveLayout(h, g);
2191
- l((x) => x.status !== "ready" ? x : {
2188
+ const s = C(
2189
+ async (h, p) => {
2190
+ const b = await t.saveLayout(h, p);
2191
+ l((f) => f.status !== "ready" ? f : {
2192
2192
  status: "ready",
2193
2193
  bundle: {
2194
- ...x.bundle,
2195
- layouts: { ...x.bundle.layouts, [h]: f }
2194
+ ...f.bundle,
2195
+ layouts: { ...f.bundle.layouts, [h]: b }
2196
2196
  }
2197
2197
  });
2198
2198
  },
2199
2199
  [t]
2200
- ), s = E(
2200
+ ), i = A(
2201
2201
  () => t.openInEditor ? (h) => {
2202
- var g;
2203
- return (g = t.openInEditor) == null ? void 0 : g.call(t, h);
2202
+ var p;
2203
+ return (p = t.openInEditor) == null ? void 0 : p.call(t, h);
2204
2204
  } : void 0,
2205
2205
  [t]
2206
- ), c = M(
2207
- (h, g) => {
2208
- var f;
2209
- (f = t.reportUsage) == null || f.call(t, h, g);
2206
+ ), c = C(
2207
+ (h, p) => {
2208
+ var b;
2209
+ (b = t.reportUsage) == null || b.call(t, h, p);
2210
2210
  },
2211
2211
  [t]
2212
- ), u = n.status === "ready" ? n.bundle : null, d = E(() => u ? { bundle: u, saveLayout: i, openInEditor: s, reportUsage: c } : null, [u, i, s, c]);
2213
- return n.status !== "ready" ? /* @__PURE__ */ e(xt, { state: n }) : d ? /* @__PURE__ */ e(T.Provider, { value: d, children: a }) : null;
2212
+ ), m = n.status === "ready" ? n.bundle : null, d = A(() => m ? { bundle: m, saveLayout: s, openInEditor: i, reportUsage: c } : null, [m, s, i, c]);
2213
+ return n.status !== "ready" ? /* @__PURE__ */ e(kt, { state: n }) : d ? /* @__PURE__ */ e(R.Provider, { value: d, children: a }) : null;
2214
2214
  }
2215
- async function Ct({
2215
+ async function Bt({
2216
2216
  dataSource: t,
2217
2217
  onState: a,
2218
2218
  isCancelled: o
2219
2219
  }) {
2220
2220
  try {
2221
2221
  a({ status: "loading", phase: "summary", done: 0, total: 1 });
2222
- const n = await t.loadSummary();
2222
+ const n = t.loadDrift ? t.loadDrift().catch(() => null) : Promise.resolve(null), l = await t.loadSummary();
2223
2223
  if (o()) return;
2224
- const l = n.diagrams.map((p) => p.slug);
2224
+ const s = l.diagrams.map((x) => x.slug);
2225
2225
  let i = 0;
2226
- const s = l.length * 2;
2226
+ const c = s.length * 2;
2227
2227
  a({
2228
2228
  status: "loading",
2229
2229
  phase: "diagrams",
2230
2230
  done: 0,
2231
- total: s,
2232
- archName: n.name
2231
+ total: c,
2232
+ archName: l.name
2233
2233
  });
2234
- const c = () => {
2234
+ const m = () => {
2235
2235
  i += 1, a({
2236
2236
  status: "loading",
2237
2237
  phase: "diagrams",
2238
2238
  done: i,
2239
- total: s,
2240
- archName: n.name
2239
+ total: c,
2240
+ archName: l.name
2241
2241
  });
2242
- }, u = await Promise.all(
2243
- l.map(async (p) => {
2244
- const b = t.loadDiagram(p).then((W) => (o() || c(), W)), N = t.loadLayout(p).then((W) => (o() || c(), W)), [v, L] = await Promise.all([
2245
- b,
2246
- N
2242
+ }, d = await Promise.all(
2243
+ s.map(async (x) => {
2244
+ const v = t.loadDiagram(x).then((P) => (o() || m(), P)), M = t.loadLayout(x).then((P) => (o() || m(), P)), [W, I] = await Promise.all([
2245
+ v,
2246
+ M
2247
2247
  ]);
2248
- return { slug: p, diagram: v, layout: L };
2248
+ return { slug: x, diagram: W, layout: I };
2249
2249
  })
2250
2250
  );
2251
2251
  if (o()) return;
2252
- const d = {}, h = {}, g = /* @__PURE__ */ new Set();
2253
- for (const { slug: p, diagram: b, layout: N } of u) {
2254
- d[p] = b, h[p] = N;
2255
- for (const v of b.nodes ?? []) g.add(v.id);
2252
+ const h = {}, p = {}, b = /* @__PURE__ */ new Set();
2253
+ for (const { slug: x, diagram: v, layout: M } of d) {
2254
+ h[x] = v, p[x] = M;
2255
+ for (const W of v.nodes ?? []) b.add(W.id);
2256
2256
  }
2257
- const f = [...g];
2258
- let x = 0;
2257
+ const f = [...b];
2258
+ let y = 0;
2259
2259
  a({
2260
2260
  status: "loading",
2261
2261
  phase: "descriptions",
2262
2262
  done: 0,
2263
2263
  total: f.length,
2264
- archName: n.name
2264
+ archName: l.name
2265
2265
  });
2266
- const w = () => {
2267
- x += 1, a({
2266
+ const N = () => {
2267
+ y += 1, a({
2268
2268
  status: "loading",
2269
2269
  phase: "descriptions",
2270
- done: x,
2270
+ done: y,
2271
2271
  total: f.length,
2272
- archName: n.name
2272
+ archName: l.name
2273
2273
  });
2274
- }, k = {}, m = /* @__PURE__ */ new Set();
2274
+ }, u = {}, g = /* @__PURE__ */ new Set();
2275
2275
  if (await Promise.all(
2276
- f.map(async (p) => {
2276
+ f.map(async (x) => {
2277
2277
  try {
2278
- const b = await t.loadNodeDetail(p);
2279
- k[p] = b;
2278
+ const v = await t.loadNodeDetail(x);
2279
+ u[x] = v;
2280
2280
  } catch {
2281
- m.add(p);
2281
+ g.add(x);
2282
2282
  } finally {
2283
- o() || w();
2283
+ o() || N();
2284
2284
  }
2285
2285
  })
2286
2286
  ), o()) return;
2287
+ const L = await n;
2288
+ if (o()) return;
2287
2289
  a({
2288
2290
  status: "ready",
2289
2291
  bundle: {
2290
- summary: n,
2291
- diagrams: d,
2292
- layouts: h,
2293
- nodes: k,
2294
- missingDescriptions: m
2292
+ summary: l,
2293
+ diagrams: h,
2294
+ layouts: p,
2295
+ nodes: u,
2296
+ missingDescriptions: g,
2297
+ drift: L
2295
2298
  }
2296
2299
  });
2297
2300
  } catch (n) {
@@ -2300,91 +2303,91 @@ async function Ct({
2300
2303
  a({ status: "error", message: l });
2301
2304
  }
2302
2305
  }
2303
- const Lt = { architecture: Qe }, Mt = { floating: lt };
2304
- function St(t) {
2305
- return /* @__PURE__ */ e(Be, { children: /* @__PURE__ */ e(Dt, { ...t }) });
2306
+ const Dt = { architecture: rt }, Wt = { floating: dt };
2307
+ function zt(t) {
2308
+ return /* @__PURE__ */ e(ze, { children: /* @__PURE__ */ e(Ft, { ...t }) });
2306
2309
  }
2307
- const Bt = (t) => ({
2310
+ const Et = (t) => ({
2308
2311
  version: 1,
2309
2312
  diagramId: t,
2310
2313
  updatedAt: "",
2311
2314
  nodes: {}
2312
2315
  });
2313
- function Wt(t) {
2314
- var o, n, l, i;
2316
+ function At(t) {
2317
+ var o, n, l, s;
2315
2318
  const a = {};
2316
- for (const s of t) {
2319
+ for (const i of t) {
2317
2320
  const c = {
2318
- x: ((o = s.position) == null ? void 0 : o.x) ?? 0,
2319
- y: ((n = s.position) == null ? void 0 : n.y) ?? 0
2320
- }, u = s.width ?? ((l = s.style) == null ? void 0 : l.width), d = s.height ?? ((i = s.style) == null ? void 0 : i.height);
2321
- typeof u == "number" && Number.isFinite(u) && (c.width = u), typeof d == "number" && Number.isFinite(d) && (c.height = d), a[s.id] = c;
2321
+ x: ((o = i.position) == null ? void 0 : o.x) ?? 0,
2322
+ y: ((n = i.position) == null ? void 0 : n.y) ?? 0
2323
+ }, m = i.width ?? ((l = i.style) == null ? void 0 : l.width), d = i.height ?? ((s = i.style) == null ? void 0 : s.height);
2324
+ typeof m == "number" && Number.isFinite(m) && (c.width = m), typeof d == "number" && Number.isFinite(d) && (c.height = d), a[i.id] = c;
2322
2325
  }
2323
2326
  return a;
2324
2327
  }
2325
- function Dt({ diagramId: t, onSelectNode: a, onDrillIn: o }) {
2326
- const n = _(), l = yt(), i = n.diagrams[t], [s, c, u] = We([]), [d, h, g] = De([]), [f, x] = C(!1), [w, k] = C(null), { getNodes: m } = ze(), p = G(null), b = G(t);
2327
- b.current = t;
2328
- const N = G(n);
2329
- N.current = n, B(() => {
2330
- var Y;
2331
- let S = !1;
2332
- x(!1), k(null), a(null);
2333
- const D = N.current, z = D.diagrams[t];
2334
- if (!z)
2335
- return k(`Diagram "${t}" was not loaded`), c([]), h([]), () => {
2336
- S = !0;
2328
+ function Ft({ diagramId: t, onSelectNode: a, onDrillIn: o }) {
2329
+ const n = V(), l = Ct(), s = n.diagrams[t], [i, c, m] = Ee([]), [d, h, p] = Ae([]), [b, f] = w(!1), [y, N] = w(null), { getNodes: u } = Fe(), g = U(null), L = U(t);
2330
+ L.current = t;
2331
+ const x = U(n);
2332
+ x.current = n, S(() => {
2333
+ var Z;
2334
+ let B = !1;
2335
+ f(!1), N(null), a(null);
2336
+ const z = x.current, E = z.diagrams[t];
2337
+ if (!E)
2338
+ return N(`Diagram "${t}" was not loaded`), c([]), h([]), () => {
2339
+ B = !0;
2337
2340
  };
2338
- const be = D.layouts[t] ?? Bt(t), { nodes: ve, edges: U } = st(z);
2339
- return pt(ve, U, (Y = z.meta) == null ? void 0 : Y.direction, be).then(($) => {
2340
- S || (c($), h(U), requestAnimationFrame(() => !S && x(!0)));
2341
- }).catch(($) => {
2342
- S || k($.message);
2341
+ const ke = z.layouts[t] ?? Et(t), { nodes: we, edges: X } = ut(E);
2342
+ return xt(we, X, (Z = E.meta) == null ? void 0 : Z.direction, ke).then((_) => {
2343
+ B || (c(_), h(X), requestAnimationFrame(() => !B && f(!0)));
2344
+ }).catch((_) => {
2345
+ B || N(_.message);
2343
2346
  }), () => {
2344
- S = !0, p.current && (clearTimeout(p.current), p.current = null);
2347
+ B = !0, g.current && (clearTimeout(g.current), g.current = null);
2345
2348
  };
2346
2349
  }, [t, a, h, c]);
2347
- const v = M(() => {
2348
- const S = b.current, D = {
2349
- nodes: Wt(m())
2350
+ const v = C(() => {
2351
+ const B = L.current, z = {
2352
+ nodes: At(u())
2350
2353
  };
2351
- l(S, D).catch((z) => {
2352
- console.warn("[tecture] failed to persist layout", z);
2354
+ l(B, z).catch((E) => {
2355
+ console.warn("[tecture] failed to persist layout", E);
2353
2356
  });
2354
- }, [m, l]), L = M(() => {
2355
- p.current && clearTimeout(p.current), p.current = setTimeout(() => {
2356
- p.current = null, v();
2357
+ }, [u, l]), M = C(() => {
2358
+ g.current && clearTimeout(g.current), g.current = setTimeout(() => {
2359
+ g.current = null, v();
2357
2360
  }, 150);
2358
- }, [v]), W = E(
2359
- () => ({ notifyLayoutChanged: L }),
2360
- [L]
2361
- ), j = M(() => {
2362
- L();
2363
- }, [L]), fe = E(
2364
- () => (S, D) => {
2365
- a(D.id);
2361
+ }, [v]), W = A(
2362
+ () => ({ notifyLayoutChanged: M }),
2363
+ [M]
2364
+ ), I = C(() => {
2365
+ M();
2366
+ }, [M]), P = A(
2367
+ () => (B, z) => {
2368
+ a(z.id);
2366
2369
  },
2367
2370
  [a]
2368
- ), xe = E(
2369
- () => (S, D) => {
2370
- const z = D.data;
2371
- z.subDiagramId && o(z.subDiagramId);
2371
+ ), ye = A(
2372
+ () => (B, z) => {
2373
+ const E = z.data;
2374
+ E.subDiagramId && o(E.subDiagramId);
2372
2375
  },
2373
2376
  [o]
2374
2377
  );
2375
- return /* @__PURE__ */ e(de.Provider, { value: W, children: /* @__PURE__ */ r("div", { className: "relative h-full w-full", children: [
2378
+ return /* @__PURE__ */ e(he.Provider, { value: W, children: /* @__PURE__ */ r("div", { className: "relative h-full w-full", children: [
2376
2379
  /* @__PURE__ */ r(
2377
- Ae,
2380
+ Ie,
2378
2381
  {
2379
- nodes: s,
2382
+ nodes: i,
2380
2383
  edges: d,
2381
- nodeTypes: Lt,
2382
- edgeTypes: Mt,
2383
- onNodesChange: u,
2384
- onEdgesChange: g,
2385
- onNodeClick: fe,
2386
- onNodeDoubleClick: xe,
2387
- onNodeDragStop: j,
2384
+ nodeTypes: Dt,
2385
+ edgeTypes: Wt,
2386
+ onNodesChange: m,
2387
+ onEdgesChange: p,
2388
+ onNodeClick: P,
2389
+ onNodeDoubleClick: ye,
2390
+ onNodeDragStop: I,
2388
2391
  onPaneClick: () => a(null),
2389
2392
  fitView: !0,
2390
2393
  fitViewOptions: { padding: 0.2 },
@@ -2393,12 +2396,12 @@ function Dt({ diagramId: t, onSelectNode: a, onDrillIn: o }) {
2393
2396
  minZoom: 0.1,
2394
2397
  maxZoom: 2,
2395
2398
  style: {
2396
- opacity: f ? 1 : 0,
2399
+ opacity: b ? 1 : 0,
2397
2400
  transition: "opacity 0.2s ease-in"
2398
2401
  },
2399
2402
  children: [
2400
2403
  /* @__PURE__ */ e(
2401
- Ee,
2404
+ Pe,
2402
2405
  {
2403
2406
  variant: He.Lines,
2404
2407
  gap: 20,
@@ -2406,10 +2409,10 @@ function Dt({ diagramId: t, onSelectNode: a, onDrillIn: o }) {
2406
2409
  color: "rgba(34, 78, 130, 0.12)"
2407
2410
  }
2408
2411
  ),
2409
- /* @__PURE__ */ e(Pe, { showInteractive: !1, position: "bottom-right" }),
2410
- i && /* @__PURE__ */ e(et, { diagram: i }),
2412
+ /* @__PURE__ */ e(Te, { showInteractive: !1, position: "bottom-right" }),
2413
+ s && /* @__PURE__ */ e(ot, { diagram: s }),
2411
2414
  /* @__PURE__ */ e(
2412
- Te,
2415
+ je,
2413
2416
  {
2414
2417
  position: "bottom-left",
2415
2418
  pannable: !0,
@@ -2422,10 +2425,10 @@ function Dt({ diagramId: t, onSelectNode: a, onDrillIn: o }) {
2422
2425
  ]
2423
2426
  }
2424
2427
  ),
2425
- w && /* @__PURE__ */ e(zt, { label: `Error: ${w}` })
2428
+ y && /* @__PURE__ */ e(It, { label: `Error: ${y}` })
2426
2429
  ] }) });
2427
2430
  }
2428
- function zt({ label: t }) {
2431
+ function It({ label: t }) {
2429
2432
  return /* @__PURE__ */ e(
2430
2433
  "div",
2431
2434
  {
@@ -2438,13 +2441,13 @@ function zt({ label: t }) {
2438
2441
  }
2439
2442
  );
2440
2443
  }
2441
- function At({
2444
+ function Pt({
2442
2445
  summary: t,
2443
2446
  currentDiagramId: a,
2444
2447
  onSelect: o,
2445
2448
  onGoHome: n
2446
2449
  }) {
2447
- const [l, i] = C(!0), s = t != null && a === t.topDiagram;
2450
+ const [l, s] = w(!0), i = t != null && a === t.topDiagram;
2448
2451
  return /* @__PURE__ */ e("div", { className: "absolute top-3 left-3 z-10 w-64", children: /* @__PURE__ */ r(
2449
2452
  "div",
2450
2453
  {
@@ -2459,16 +2462,16 @@ function At({
2459
2462
  {
2460
2463
  type: "button",
2461
2464
  onClick: n,
2462
- disabled: s,
2465
+ disabled: i,
2463
2466
  className: "group flex w-full flex-col items-start gap-1 px-3 pt-2.5 pb-3 text-left transition-colors disabled:cursor-default",
2464
2467
  style: {
2465
2468
  background: "transparent",
2466
2469
  border: "none",
2467
2470
  borderBottom: "1px solid var(--border-default)",
2468
- cursor: s ? "default" : "pointer"
2471
+ cursor: i ? "default" : "pointer"
2469
2472
  },
2470
- title: s ? void 0 : "Return to entry diagram",
2471
- "aria-label": s ? "Architecture title block" : "Return to entry diagram",
2473
+ title: i ? void 0 : "Return to entry diagram",
2474
+ "aria-label": i ? "Architecture title block" : "Return to entry diagram",
2472
2475
  children: [
2473
2476
  /* @__PURE__ */ r("div", { className: "flex w-full items-center justify-between", children: [
2474
2477
  /* @__PURE__ */ e(
@@ -2482,7 +2485,7 @@ function At({
2482
2485
  children: "Architecture"
2483
2486
  }
2484
2487
  ),
2485
- !s && /* @__PURE__ */ r(
2488
+ !i && /* @__PURE__ */ r(
2486
2489
  "span",
2487
2490
  {
2488
2491
  className: "flex items-center gap-1 text-[9px] tracking-[0.2em] uppercase opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100",
@@ -2532,7 +2535,7 @@ function At({
2532
2535
  "button",
2533
2536
  {
2534
2537
  type: "button",
2535
- onClick: () => i((c) => !c),
2538
+ onClick: () => s((c) => !c),
2536
2539
  className: "flex w-full items-center justify-between px-3 py-2 transition-colors hover:text-white",
2537
2540
  style: {
2538
2541
  color: "var(--text-muted)",
@@ -2576,7 +2579,7 @@ function At({
2576
2579
  ),
2577
2580
  l && /* @__PURE__ */ r("ul", { className: "max-h-[60vh] overflow-y-auto py-1", children: [
2578
2581
  t == null ? void 0 : t.diagrams.map((c) => /* @__PURE__ */ e(
2579
- Et,
2582
+ Ht,
2580
2583
  {
2581
2584
  diagram: c,
2582
2585
  active: c.slug === a,
@@ -2601,7 +2604,7 @@ function At({
2601
2604
  }
2602
2605
  ) });
2603
2606
  }
2604
- function Et({
2607
+ function Ht({
2605
2608
  diagram: t,
2606
2609
  active: a,
2607
2610
  isTop: o,
@@ -2677,10 +2680,184 @@ function Et({
2677
2680
  }
2678
2681
  ) });
2679
2682
  }
2680
- let ne = !1;
2681
- async function Ht() {
2683
+ const H = {
2684
+ error: "#f87171",
2685
+ warn: "#fbbf24",
2686
+ info: "#38bdf8"
2687
+ }, Tt = {
2688
+ "missing-path": "Missing paths",
2689
+ "unverified-edge": "Unverified edges",
2690
+ "undeclared-dependency": "Undeclared dependencies",
2691
+ "unmapped-external": "Unmapped externals",
2692
+ "skipped-node": "Skipped nodes",
2693
+ "skipped-edge": "Skipped edges"
2694
+ }, jt = [
2695
+ "missing-path",
2696
+ "unverified-edge",
2697
+ "undeclared-dependency",
2698
+ "unmapped-external",
2699
+ "skipped-node",
2700
+ "skipped-edge"
2701
+ ];
2702
+ function Rt(t) {
2703
+ return t.summary.errors > 0 ? H.error : t.summary.warns > 0 ? H.warn : H.info;
2704
+ }
2705
+ function $t() {
2706
+ const t = V(), [a, o] = w(!1), n = t.drift, l = A(() => {
2707
+ if (!n) return [];
2708
+ const i = /* @__PURE__ */ new Map();
2709
+ for (const c of n.findings) {
2710
+ const m = i.get(c.kind) ?? [];
2711
+ m.push(c), i.set(c.kind, m);
2712
+ }
2713
+ return jt.filter((c) => i.has(c)).map((c) => ({
2714
+ kind: c,
2715
+ findings: i.get(c) ?? []
2716
+ }));
2717
+ }, [n]);
2718
+ if (!n || n.findings.length === 0) return null;
2719
+ const s = Rt(n);
2720
+ return /* @__PURE__ */ r(
2721
+ "div",
2722
+ {
2723
+ className: "absolute top-3 left-1/2 z-10 flex -translate-x-1/2 flex-col items-center",
2724
+ style: { fontFamily: "var(--font-mono)" },
2725
+ children: [
2726
+ /* @__PURE__ */ r(
2727
+ "button",
2728
+ {
2729
+ type: "button",
2730
+ onClick: () => o((i) => !i),
2731
+ "aria-expanded": a,
2732
+ className: "flex items-center gap-2 border px-3 py-1.5 text-[10px] tracking-[0.2em] uppercase shadow-lg backdrop-blur-md transition-colors hover:text-white",
2733
+ style: {
2734
+ backgroundColor: "rgba(10, 15, 26, 0.85)",
2735
+ borderColor: "var(--border-default)",
2736
+ color: s
2737
+ },
2738
+ title: "Code-vs-architecture drift findings from the evidence script",
2739
+ children: [
2740
+ /* @__PURE__ */ e(
2741
+ "span",
2742
+ {
2743
+ className: "inline-block h-1.5 w-1.5 rounded-full",
2744
+ style: { backgroundColor: s }
2745
+ }
2746
+ ),
2747
+ /* @__PURE__ */ r("span", { children: [
2748
+ "Drift: ",
2749
+ n.findings.length
2750
+ ] })
2751
+ ]
2752
+ }
2753
+ ),
2754
+ a && /* @__PURE__ */ r(
2755
+ "div",
2756
+ {
2757
+ className: "mt-2 flex flex-col overflow-y-auto border shadow-lg backdrop-blur-md",
2758
+ style: {
2759
+ width: "min(560px, calc(100vw - 24px))",
2760
+ maxHeight: "min(480px, calc(100vh - 96px))",
2761
+ backgroundColor: "rgba(10, 15, 26, 0.9)",
2762
+ borderColor: "var(--border-default)"
2763
+ },
2764
+ children: [
2765
+ /* @__PURE__ */ r(
2766
+ "div",
2767
+ {
2768
+ className: "flex items-center justify-between border-b px-4 py-2 text-[10px]",
2769
+ style: {
2770
+ borderColor: "var(--border-default)",
2771
+ color: "var(--text-muted)"
2772
+ },
2773
+ children: [
2774
+ /* @__PURE__ */ r("span", { children: [
2775
+ "generated ",
2776
+ Gt(n.generatedAt),
2777
+ " · codegraph schema v",
2778
+ n.codegraphSchemaVersion
2779
+ ] }),
2780
+ /* @__PURE__ */ r("span", { children: [
2781
+ n.summary.errors,
2782
+ " err / ",
2783
+ n.summary.warns,
2784
+ " warn /",
2785
+ " ",
2786
+ n.summary.infos,
2787
+ " info"
2788
+ ] })
2789
+ ]
2790
+ }
2791
+ ),
2792
+ n.staleIndex && /* @__PURE__ */ r(
2793
+ "div",
2794
+ {
2795
+ className: "border-b px-4 py-2 text-[11px]",
2796
+ style: {
2797
+ borderColor: "var(--border-default)",
2798
+ color: H.warn
2799
+ },
2800
+ children: [
2801
+ "Index may be stale — files changed after the last CodeGraph sync. Run ",
2802
+ /* @__PURE__ */ e("code", { children: "codegraph sync" }),
2803
+ " and re-run the evidence script."
2804
+ ]
2805
+ }
2806
+ ),
2807
+ /* @__PURE__ */ e("div", { className: "flex flex-col gap-3 px-4 py-3", children: l.map(({ kind: i, findings: c }) => /* @__PURE__ */ r("div", { className: "flex flex-col gap-1.5", children: [
2808
+ /* @__PURE__ */ r(
2809
+ "div",
2810
+ {
2811
+ className: "text-[9px] tracking-[0.25em] uppercase",
2812
+ style: { color: "var(--text-muted)" },
2813
+ children: [
2814
+ Tt[i],
2815
+ " (",
2816
+ c.length,
2817
+ ")"
2818
+ ]
2819
+ }
2820
+ ),
2821
+ c.map((m, d) => /* @__PURE__ */ e(Ot, { finding: m }, `${i}-${d}`))
2822
+ ] }, i)) })
2823
+ ]
2824
+ }
2825
+ )
2826
+ ]
2827
+ }
2828
+ );
2829
+ }
2830
+ function Ot({ finding: t }) {
2831
+ var n, l;
2832
+ const a = H[t.severity], o = t.nodeId ?? (t.edge ? `${t.edge.sourceId} → ${t.edge.targetId}` : (n = t.evidence) == null ? void 0 : n.package);
2833
+ return /* @__PURE__ */ r("div", { className: "flex items-start gap-2 text-[11px] leading-snug", children: [
2834
+ /* @__PURE__ */ e(
2835
+ "span",
2836
+ {
2837
+ className: "mt-1 inline-block h-1.5 w-1.5 shrink-0 rounded-full",
2838
+ style: { backgroundColor: a },
2839
+ title: t.severity
2840
+ }
2841
+ ),
2842
+ /* @__PURE__ */ r("span", { style: { color: "var(--text-primary, #e2e8f0)" }, children: [
2843
+ o ? /* @__PURE__ */ e("span", { className: "mr-1.5", style: { color: a }, children: o }) : null,
2844
+ t.message,
2845
+ (l = t.evidence) != null && l.edgeKinds ? /* @__PURE__ */ r("span", { className: "ml-1.5", style: { color: "var(--text-muted)" }, children: [
2846
+ "(",
2847
+ Object.entries(t.evidence.edgeKinds).map(([s, i]) => `${s}:${i}`).join(", "),
2848
+ ")"
2849
+ ] }) : null
2850
+ ] })
2851
+ ] });
2852
+ }
2853
+ function Gt(t) {
2854
+ const a = Date.parse(t);
2855
+ return Number.isNaN(a) ? t : new Date(a).toLocaleString();
2856
+ }
2857
+ let se = !1;
2858
+ async function Vt() {
2682
2859
  const a = (await import("mermaid")).default;
2683
- return ne || (a.initialize({
2860
+ return se || (a.initialize({
2684
2861
  startOnLoad: !1,
2685
2862
  theme: "dark",
2686
2863
  securityLevel: "strict",
@@ -2715,27 +2892,27 @@ async function Ht() {
2715
2892
  noteBorderColor: "#854d0e",
2716
2893
  noteTextColor: "#fef3c7"
2717
2894
  }
2718
- }), ne = !0), a;
2895
+ }), se = !0), a;
2719
2896
  }
2720
- function Pt({ chart: t }) {
2721
- const [a, o] = C({ status: "loading" }), [n, l] = C(!1), s = `mermaid-${ke().replace(/:/g, "")}`;
2722
- return B(() => {
2897
+ function _t({ chart: t }) {
2898
+ const [a, o] = w({ status: "loading" }), [n, l] = w(!1), i = `mermaid-${Ce().replace(/:/g, "")}`;
2899
+ return S(() => {
2723
2900
  let c = !1;
2724
2901
  return o({ status: "loading" }), (async () => {
2725
2902
  try {
2726
- const u = await Ht();
2727
- await u.parse(t);
2728
- const { svg: d } = await u.render(s, t);
2903
+ const m = await Vt();
2904
+ await m.parse(t);
2905
+ const { svg: d } = await m.render(i, t);
2729
2906
  c || o({ status: "ready", svg: d });
2730
- } catch (u) {
2907
+ } catch (m) {
2731
2908
  if (c) return;
2732
- const d = u instanceof Error ? u.message : "Failed to render diagram";
2909
+ const d = m instanceof Error ? m.message : "Failed to render diagram";
2733
2910
  o({ status: "error", message: d });
2734
2911
  }
2735
2912
  })(), () => {
2736
2913
  c = !0;
2737
2914
  };
2738
- }, [t, s]), a.status === "loading" ? /* @__PURE__ */ e(
2915
+ }, [t, i]), a.status === "loading" ? /* @__PURE__ */ e(
2739
2916
  "div",
2740
2917
  {
2741
2918
  className: "mermaid-block",
@@ -2763,7 +2940,7 @@ function Pt({ chart: t }) {
2763
2940
  }
2764
2941
  ),
2765
2942
  /* @__PURE__ */ e("pre", { style: { margin: 0 }, children: /* @__PURE__ */ e("code", { className: "lang-mermaid", children: t }) })
2766
- ] }) : /* @__PURE__ */ r(H, { children: [
2943
+ ] }) : /* @__PURE__ */ r(T, { children: [
2767
2944
  /* @__PURE__ */ r("div", { className: "mermaid-block group relative", children: [
2768
2945
  /* @__PURE__ */ e(
2769
2946
  "button",
@@ -2809,14 +2986,14 @@ function Pt({ chart: t }) {
2809
2986
  }
2810
2987
  )
2811
2988
  ] }),
2812
- n && /* @__PURE__ */ e(Tt, { svg: a.svg, onClose: () => l(!1) })
2989
+ n && /* @__PURE__ */ e(Ut, { svg: a.svg, onClose: () => l(!1) })
2813
2990
  ] });
2814
2991
  }
2815
- function Tt({
2992
+ function Ut({
2816
2993
  svg: t,
2817
2994
  onClose: a
2818
2995
  }) {
2819
- return B(() => {
2996
+ return S(() => {
2820
2997
  const o = (l) => {
2821
2998
  l.key === "Escape" && a();
2822
2999
  };
@@ -2825,7 +3002,7 @@ function Tt({
2825
3002
  return document.body.style.overflow = "hidden", () => {
2826
3003
  document.removeEventListener("keydown", o), document.body.style.overflow = n;
2827
3004
  };
2828
- }, [a]), $e(
3005
+ }, [a]), _e(
2829
3006
  /* @__PURE__ */ e(
2830
3007
  "div",
2831
3008
  {
@@ -2933,22 +3110,22 @@ function Tt({
2933
3110
  document.body
2934
3111
  );
2935
3112
  }
2936
- function Ft({ source: t }) {
3113
+ function Kt({ source: t }) {
2937
3114
  return /* @__PURE__ */ e("div", { className: "prose-markdown", children: /* @__PURE__ */ e(
2938
- je,
3115
+ Ve,
2939
3116
  {
2940
3117
  options: {
2941
3118
  forceBlock: !0,
2942
3119
  overrides: {
2943
- pre: { component: Rt },
2944
- a: { component: It }
3120
+ pre: { component: Xt },
3121
+ a: { component: Yt }
2945
3122
  }
2946
3123
  },
2947
3124
  children: t
2948
3125
  }
2949
3126
  ) });
2950
3127
  }
2951
- function It({
3128
+ function Yt({
2952
3129
  href: t,
2953
3130
  children: a,
2954
3131
  ...o
@@ -2964,23 +3141,23 @@ function It({
2964
3141
  }
2965
3142
  );
2966
3143
  }
2967
- function Rt({ children: t }) {
2968
- const a = jt(t);
2969
- return a !== null ? /* @__PURE__ */ e(Pt, { chart: a }) : /* @__PURE__ */ e("pre", { children: t });
3144
+ function Xt({ children: t }) {
3145
+ const a = Zt(t);
3146
+ return a !== null ? /* @__PURE__ */ e(_t, { chart: a }) : /* @__PURE__ */ e("pre", { children: t });
2970
3147
  }
2971
- function jt(t) {
3148
+ function Zt(t) {
2972
3149
  const a = Array.isArray(t) && t.length === 1 ? t[0] : t;
2973
- if (!Ne(a)) return null;
3150
+ if (!Le(a)) return null;
2974
3151
  const o = a;
2975
3152
  if (o.type !== "code") return null;
2976
3153
  const n = o.props.className ?? "";
2977
3154
  if (!(n === "lang-mermaid" || n === "language-mermaid" || n.split(/\s+/).includes("lang-mermaid") || n.split(/\s+/).includes("language-mermaid"))) return null;
2978
- const i = o.props.children;
2979
- return typeof i == "string" ? i : Array.isArray(i) ? i.map((s) => String(s ?? "")).join("") : String(i ?? "");
3155
+ const s = o.props.children;
3156
+ return typeof s == "string" ? s : Array.isArray(s) ? s.map((i) => String(i ?? "")).join("") : String(s ?? "");
2980
3157
  }
2981
- function $t({ nodeId: t, onClose: a }) {
2982
- var d, h;
2983
- const o = _(), n = kt(), l = o.nodes[t], i = o.missingDescriptions.has(t), s = O((d = l == null ? void 0 : l.meta) == null ? void 0 : d.type), c = l == null ? void 0 : l.path, u = n ? void 0 : c ? Ie(o.summary.source, o.summary.sourceHost, c) : void 0;
3158
+ function qt({ nodeId: t, onClose: a }) {
3159
+ var h, p;
3160
+ const o = V(), n = Lt(), l = o.nodes[t], s = o.missingDescriptions.has(t), i = o.drift && l ? $e(o.drift, l.diagramId, t) : [], c = Y((h = l == null ? void 0 : l.meta) == null ? void 0 : h.type), m = l == null ? void 0 : l.path, d = n ? void 0 : m ? Oe(o.summary.source, o.summary.sourceHost, m) : void 0;
2984
3161
  return /* @__PURE__ */ r(
2985
3162
  "aside",
2986
3163
  {
@@ -3003,8 +3180,8 @@ function $t({ nodeId: t, onClose: a }) {
3003
3180
  "div",
3004
3181
  {
3005
3182
  className: "blueprint-annotation mb-1",
3006
- style: { color: s.accent },
3007
- children: s.label
3183
+ style: { color: c.accent },
3184
+ children: c.label
3008
3185
  }
3009
3186
  ),
3010
3187
  /* @__PURE__ */ e(
@@ -3015,7 +3192,7 @@ function $t({ nodeId: t, onClose: a }) {
3015
3192
  children: (l == null ? void 0 : l.label) ?? t
3016
3193
  }
3017
3194
  ),
3018
- (h = l == null ? void 0 : l.meta) != null && h.technology ? /* @__PURE__ */ e(
3195
+ (p = l == null ? void 0 : l.meta) != null && p.technology ? /* @__PURE__ */ e(
3019
3196
  "div",
3020
3197
  {
3021
3198
  className: "mt-0.5 text-xs",
@@ -3023,21 +3200,21 @@ function $t({ nodeId: t, onClose: a }) {
3023
3200
  children: String(l.meta.technology)
3024
3201
  }
3025
3202
  ) : null,
3026
- c || l && Z(l) ? /* @__PURE__ */ r("div", { className: "mt-1.5 flex w-full items-center gap-x-3", children: [
3027
- c ? /* @__PURE__ */ e(
3028
- Gt,
3203
+ m || l && J(l) ? /* @__PURE__ */ r("div", { className: "mt-1.5 flex w-full items-center gap-x-3", children: [
3204
+ m ? /* @__PURE__ */ e(
3205
+ er,
3029
3206
  {
3030
- path: c,
3031
- accent: s.accent,
3032
- onOpenInEditor: n ? () => n(c) : void 0,
3033
- sourceUrl: u
3207
+ path: m,
3208
+ accent: c.accent,
3209
+ onOpenInEditor: n ? () => n(m) : void 0,
3210
+ sourceUrl: d
3034
3211
  }
3035
3212
  ) : null,
3036
- l && Z(l) ? /* @__PURE__ */ e(
3037
- Vt,
3213
+ l && J(l) ? /* @__PURE__ */ e(
3214
+ tr,
3038
3215
  {
3039
- prompt: Re(l),
3040
- accent: s.accent,
3216
+ prompt: Ge(l),
3217
+ accent: c.accent,
3041
3218
  className: "ml-auto"
3042
3219
  }
3043
3220
  ) : null
@@ -3079,15 +3256,65 @@ function $t({ nodeId: t, onClose: a }) {
3079
3256
  ),
3080
3257
  /* @__PURE__ */ r("div", { className: "min-h-0 flex-1 overflow-y-auto px-5 py-4", children: [
3081
3258
  !l && /* @__PURE__ */ e("div", { className: "text-xs", style: { color: "var(--text-muted)" }, children: "No details available for this node." }),
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(Ft, { source: l.description }) : /* @__PURE__ */ e("div", { className: "text-xs", style: { color: "var(--text-muted)" }, children: "No description provided." }))
3259
+ l && s && /* @__PURE__ */ e("div", { className: "text-xs", style: { color: "var(--text-muted)" }, children: "Description not available." }),
3260
+ l && !s && (l.description ? /* @__PURE__ */ e(Kt, { source: l.description }) : /* @__PURE__ */ e("div", { className: "text-xs", style: { color: "var(--text-muted)" }, children: "No description provided." })),
3261
+ i.length > 0 && /* @__PURE__ */ e(Jt, { findings: i })
3084
3262
  ] })
3085
3263
  ]
3086
3264
  }
3087
3265
  );
3088
3266
  }
3089
- const R = "inline-flex items-center gap-1.5 text-xs transition-opacity hover:opacity-80";
3090
- function V(t) {
3267
+ const Qt = {
3268
+ error: "#f87171",
3269
+ warn: "#fbbf24",
3270
+ info: "#38bdf8"
3271
+ };
3272
+ function Jt({ findings: t }) {
3273
+ return /* @__PURE__ */ r(
3274
+ "div",
3275
+ {
3276
+ className: "mt-4 border-t pt-3",
3277
+ style: { borderColor: "var(--border-default)" },
3278
+ children: [
3279
+ /* @__PURE__ */ r(
3280
+ "div",
3281
+ {
3282
+ className: "mb-2 text-[9px] tracking-[0.25em] uppercase",
3283
+ style: { color: "var(--text-muted)", fontFamily: "var(--font-mono)" },
3284
+ children: [
3285
+ "Evidence (",
3286
+ t.length,
3287
+ ")"
3288
+ ]
3289
+ }
3290
+ ),
3291
+ /* @__PURE__ */ e("div", { className: "flex flex-col gap-1.5", children: t.map((a, o) => /* @__PURE__ */ r(
3292
+ "div",
3293
+ {
3294
+ className: "flex items-start gap-2 text-[11px] leading-snug",
3295
+ style: { fontFamily: "var(--font-mono)" },
3296
+ children: [
3297
+ /* @__PURE__ */ e(
3298
+ "span",
3299
+ {
3300
+ className: "mt-1 inline-block h-1.5 w-1.5 shrink-0 rounded-full",
3301
+ style: {
3302
+ backgroundColor: Qt[a.severity]
3303
+ },
3304
+ title: a.severity
3305
+ }
3306
+ ),
3307
+ /* @__PURE__ */ e("span", { style: { color: "var(--text-primary, #e2e8f0)" }, children: a.message })
3308
+ ]
3309
+ },
3310
+ o
3311
+ )) })
3312
+ ]
3313
+ }
3314
+ );
3315
+ }
3316
+ const G = "inline-flex items-center gap-1.5 text-xs transition-opacity hover:opacity-80";
3317
+ function K(t) {
3091
3318
  return {
3092
3319
  color: t,
3093
3320
  fontFamily: "var(--font-mono)",
@@ -3097,13 +3324,13 @@ function V(t) {
3097
3324
  cursor: "pointer"
3098
3325
  };
3099
3326
  }
3100
- function Gt({
3327
+ function er({
3101
3328
  path: t,
3102
3329
  accent: a,
3103
3330
  onOpenInEditor: o,
3104
3331
  sourceUrl: n
3105
3332
  }) {
3106
- const l = t.endsWith("/"), i = /* @__PURE__ */ r(
3333
+ const l = t.endsWith("/"), s = /* @__PURE__ */ r(
3107
3334
  "svg",
3108
3335
  {
3109
3336
  width: "11",
@@ -3125,48 +3352,48 @@ function Gt({
3125
3352
  "button",
3126
3353
  {
3127
3354
  type: "button",
3128
- className: R,
3129
- style: V(a),
3355
+ className: G,
3356
+ style: K(a),
3130
3357
  onClick: o,
3131
3358
  title: t,
3132
3359
  children: [
3133
- i,
3360
+ s,
3134
3361
  /* @__PURE__ */ e("span", { children: l ? "Open folder" : "Open file" })
3135
3362
  ]
3136
3363
  }
3137
3364
  ) : n ? /* @__PURE__ */ r(
3138
3365
  "a",
3139
3366
  {
3140
- className: R,
3141
- style: V(a),
3367
+ className: G,
3368
+ style: K(a),
3142
3369
  href: n,
3143
3370
  target: "_blank",
3144
3371
  rel: "noreferrer",
3145
3372
  title: t,
3146
3373
  children: [
3147
- i,
3374
+ s,
3148
3375
  /* @__PURE__ */ e("span", { children: l ? "View folder" : "View file" })
3149
3376
  ]
3150
3377
  }
3151
3378
  ) : null;
3152
3379
  }
3153
- function Vt({
3380
+ function tr({
3154
3381
  prompt: t,
3155
3382
  accent: a,
3156
3383
  className: o
3157
3384
  }) {
3158
- const [n, l] = C(!1), i = M(() => {
3159
- Ot(t).then((s) => {
3160
- s && (l(!0), window.setTimeout(() => l(!1), 1500));
3385
+ const [n, l] = w(!1), s = C(() => {
3386
+ rr(t).then((i) => {
3387
+ i && (l(!0), window.setTimeout(() => l(!1), 1500));
3161
3388
  });
3162
3389
  }, [t]);
3163
3390
  return /* @__PURE__ */ r(
3164
3391
  "button",
3165
3392
  {
3166
3393
  type: "button",
3167
- className: o ? `${R} ${o}` : R,
3168
- style: V(a),
3169
- onClick: i,
3394
+ className: o ? `${G} ${o}` : G,
3395
+ style: K(a),
3396
+ onClick: s,
3170
3397
  title: "Copy a prompt to enrich this component's description with a coding agent",
3171
3398
  children: [
3172
3399
  n ? /* @__PURE__ */ e(
@@ -3204,7 +3431,7 @@ function Vt({
3204
3431
  }
3205
3432
  );
3206
3433
  }
3207
- async function Ot(t) {
3434
+ async function rr(t) {
3208
3435
  var a;
3209
3436
  try {
3210
3437
  if ((a = navigator.clipboard) != null && a.writeText)
@@ -3220,9 +3447,9 @@ async function Ot(t) {
3220
3447
  return !1;
3221
3448
  }
3222
3449
  }
3223
- function _t() {
3224
- const [t, a] = C(!0);
3225
- return B(() => {
3450
+ function ar() {
3451
+ const [t, a] = w(!0);
3452
+ return S(() => {
3226
3453
  const o = setTimeout(() => a(!1), 3500);
3227
3454
  return () => clearTimeout(o);
3228
3455
  }, []), t ? /* @__PURE__ */ e(
@@ -3241,27 +3468,408 @@ function _t() {
3241
3468
  }
3242
3469
  ) : null;
3243
3470
  }
3244
- let le = null;
3245
- function Ut({ diagramId: t, showDiagramList: a = !0 }) {
3246
- const o = _(), n = Nt(), [l, i] = C(null);
3247
- B(() => {
3471
+ function ve({ className: t }) {
3472
+ return /* @__PURE__ */ e("svg", { className: `ob-cursor ${t}`, viewBox: "0 0 24 24", "aria-hidden": !0, children: /* @__PURE__ */ e(
3473
+ "path",
3474
+ {
3475
+ d: "M5 3 L5 19 L9.6 14.8 L12.4 21 L15 19.8 L12.2 13.9 L18 13.9 Z",
3476
+ fill: "#e2e8f0",
3477
+ stroke: "#0a0f1a",
3478
+ strokeWidth: "1.2",
3479
+ strokeLinejoin: "round"
3480
+ }
3481
+ ) });
3482
+ }
3483
+ function D({
3484
+ label: t,
3485
+ style: a,
3486
+ className: o = "",
3487
+ children: n
3488
+ }) {
3489
+ return /* @__PURE__ */ r("div", { className: `ob-box ${o}`, style: a, children: [
3490
+ /* @__PURE__ */ e("span", { className: "ob-box-icon" }),
3491
+ /* @__PURE__ */ e("span", { children: t }),
3492
+ n
3493
+ ] });
3494
+ }
3495
+ function or() {
3496
+ return /* @__PURE__ */ r("div", { className: "ob-stage blueprint-grid", children: [
3497
+ /* @__PURE__ */ e(
3498
+ D,
3499
+ {
3500
+ label: "Service",
3501
+ className: "ob-click-target",
3502
+ style: { left: "6%", top: "20%", width: "34%", height: "30%" }
3503
+ }
3504
+ ),
3505
+ /* @__PURE__ */ e(
3506
+ D,
3507
+ {
3508
+ label: "Database",
3509
+ style: { left: "6%", top: "58%", width: "34%", height: "30%" }
3510
+ }
3511
+ ),
3512
+ /* @__PURE__ */ e(
3513
+ "span",
3514
+ {
3515
+ className: "ob-ripple ob-click-ripple",
3516
+ style: { left: "23%", top: "35%" }
3517
+ }
3518
+ ),
3519
+ /* @__PURE__ */ r("div", { className: "ob-click-panel ob-click-slide", children: [
3520
+ /* @__PURE__ */ e("div", { className: "ob-line accent", style: { width: "68%" } }),
3521
+ /* @__PURE__ */ e("div", { className: "ob-line", style: { width: "100%" } }),
3522
+ /* @__PURE__ */ e("div", { className: "ob-line", style: { width: "90%" } }),
3523
+ /* @__PURE__ */ e("div", { className: "ob-line", style: { width: "58%" } }),
3524
+ /* @__PURE__ */ e("div", { className: "ob-line", style: { width: "82%" } })
3525
+ ] }),
3526
+ /* @__PURE__ */ e(ve, { className: "ob-click-cursor" })
3527
+ ] });
3528
+ }
3529
+ function nr() {
3530
+ return /* @__PURE__ */ e(
3531
+ "svg",
3532
+ {
3533
+ width: "9",
3534
+ height: "9",
3535
+ viewBox: "0 0 24 24",
3536
+ fill: "none",
3537
+ stroke: "currentColor",
3538
+ strokeWidth: "3",
3539
+ strokeLinecap: "round",
3540
+ strokeLinejoin: "round",
3541
+ "aria-hidden": !0,
3542
+ children: /* @__PURE__ */ e("polyline", { points: "6 9 12 15 18 9" })
3543
+ }
3544
+ );
3545
+ }
3546
+ function lr() {
3547
+ return /* @__PURE__ */ r("div", { className: "ob-stage blueprint-grid", children: [
3548
+ /* @__PURE__ */ r("div", { className: "ob-level-1", children: [
3549
+ /* @__PURE__ */ e(
3550
+ D,
3551
+ {
3552
+ label: "User",
3553
+ style: { left: "34%", top: "3%", width: "24%", height: "20%" }
3554
+ }
3555
+ ),
3556
+ /* @__PURE__ */ e(
3557
+ D,
3558
+ {
3559
+ label: "Files",
3560
+ style: { left: "64%", top: "40%", width: "24%", height: "24%" }
3561
+ }
3562
+ ),
3563
+ /* @__PURE__ */ e(
3564
+ D,
3565
+ {
3566
+ label: "Service",
3567
+ style: { left: "28%", top: "33%", width: "30%", height: "42%" },
3568
+ children: /* @__PURE__ */ r("span", { className: "ob-pill ob-drill-pill", children: [
3569
+ "Drill down",
3570
+ /* @__PURE__ */ e(nr, {})
3571
+ ] })
3572
+ }
3573
+ )
3574
+ ] }),
3575
+ /* @__PURE__ */ r("div", { className: "ob-level-2", children: [
3576
+ /* @__PURE__ */ e(
3577
+ D,
3578
+ {
3579
+ label: "API",
3580
+ style: { left: "8%", top: "14%", width: "24%", height: "26%" }
3581
+ }
3582
+ ),
3583
+ /* @__PURE__ */ e(
3584
+ D,
3585
+ {
3586
+ label: "Router",
3587
+ style: { left: "40%", top: "8%", width: "24%", height: "26%" }
3588
+ }
3589
+ ),
3590
+ /* @__PURE__ */ e(
3591
+ D,
3592
+ {
3593
+ label: "Store",
3594
+ style: { left: "20%", top: "56%", width: "24%", height: "26%" }
3595
+ }
3596
+ ),
3597
+ /* @__PURE__ */ e(
3598
+ D,
3599
+ {
3600
+ label: "Worker",
3601
+ style: { left: "54%", top: "52%", width: "28%", height: "28%" }
3602
+ }
3603
+ )
3604
+ ] }),
3605
+ /* @__PURE__ */ e(
3606
+ "span",
3607
+ {
3608
+ className: "ob-ripple ob-drill-ripple",
3609
+ style: { left: "43%", top: "64%" }
3610
+ }
3611
+ ),
3612
+ /* @__PURE__ */ e(ve, { className: "ob-drill-cursor" })
3613
+ ] });
3614
+ }
3615
+ function ir({
3616
+ open: t,
3617
+ onClose: a,
3618
+ architectureName: o,
3619
+ architectureDescription: n
3620
+ }) {
3621
+ var b;
3622
+ const [l, s] = w(0);
3623
+ S(() => {
3624
+ t && s(0);
3625
+ }, [t]);
3626
+ const i = (b = (n ?? "").split(/\n\s*\n/)[0]) == null ? void 0 : b.trim(), c = [
3627
+ {
3628
+ eyebrow: "Architecture",
3629
+ title: o,
3630
+ blurb: i || "An interactive map of this system — its components and how they connect.",
3631
+ media: /* @__PURE__ */ e(sr, { name: o })
3632
+ },
3633
+ {
3634
+ eyebrow: "Tip · 1 of 2",
3635
+ title: "Click a component",
3636
+ blurb: "Click any box to open its details — the technology it uses, its source files, and a full description.",
3637
+ media: /* @__PURE__ */ e(or, {})
3638
+ },
3639
+ {
3640
+ eyebrow: "Tip · 2 of 2",
3641
+ title: "Drill down for more",
3642
+ blurb: "Boxes with a “Drill down” button go deeper — double-click one to open its sub-diagram and explore the next level.",
3643
+ media: /* @__PURE__ */ e(lr, {})
3644
+ }
3645
+ ], m = c.length - 1, d = C(() => {
3646
+ s((f) => f >= c.length - 1 ? (a(), f) : f + 1);
3647
+ }, [c.length, a]), h = C(() => s((f) => Math.max(0, f - 1)), []);
3648
+ S(() => {
3649
+ if (!t) return;
3650
+ const f = (y) => {
3651
+ y.key === "Escape" ? a() : y.key === "ArrowRight" ? d() : y.key === "ArrowLeft" && h();
3652
+ };
3653
+ return window.addEventListener("keydown", f), () => window.removeEventListener("keydown", f);
3654
+ }, [t, a, d, h]);
3655
+ const p = c[l] ?? c[0];
3656
+ return !t || !p ? null : /* @__PURE__ */ e(
3657
+ "div",
3658
+ {
3659
+ className: "absolute inset-0 z-50 flex items-center justify-center",
3660
+ style: { backgroundColor: "rgba(5, 8, 15, 0.72)" },
3661
+ onClick: a,
3662
+ role: "dialog",
3663
+ "aria-modal": "true",
3664
+ "aria-labelledby": "onboarding-title",
3665
+ children: /* @__PURE__ */ r(
3666
+ "div",
3667
+ {
3668
+ className: "animate-fade-up flex w-[min(640px,calc(100vw-32px))] flex-col border shadow-lg backdrop-blur-md",
3669
+ style: {
3670
+ borderColor: "var(--border-default)",
3671
+ backgroundColor: "rgba(10, 15, 26, 0.94)"
3672
+ },
3673
+ onClick: (f) => f.stopPropagation(),
3674
+ children: [
3675
+ /* @__PURE__ */ r(
3676
+ "div",
3677
+ {
3678
+ className: "flex items-start justify-between border-b px-6 py-4",
3679
+ style: { borderColor: "var(--border-default)" },
3680
+ children: [
3681
+ /* @__PURE__ */ r("div", { className: "min-w-0", children: [
3682
+ /* @__PURE__ */ e(
3683
+ "div",
3684
+ {
3685
+ className: "text-[9px] tracking-[0.32em] uppercase",
3686
+ style: {
3687
+ color: "var(--text-muted)",
3688
+ fontFamily: "var(--font-mono)"
3689
+ },
3690
+ children: p.eyebrow
3691
+ }
3692
+ ),
3693
+ /* @__PURE__ */ e(
3694
+ "div",
3695
+ {
3696
+ id: "onboarding-title",
3697
+ className: "mt-1 truncate text-[18px] leading-tight font-semibold tracking-tight",
3698
+ style: {
3699
+ color: "var(--text-primary)",
3700
+ fontFamily: "var(--font-sans)"
3701
+ },
3702
+ children: p.title
3703
+ }
3704
+ )
3705
+ ] }),
3706
+ /* @__PURE__ */ e(
3707
+ "button",
3708
+ {
3709
+ type: "button",
3710
+ onClick: a,
3711
+ "aria-label": "Skip tour",
3712
+ className: "ml-4 flex h-7 w-7 shrink-0 items-center justify-center border transition-colors hover:text-white",
3713
+ style: {
3714
+ borderColor: "var(--border-default)",
3715
+ color: "var(--text-muted)",
3716
+ backgroundColor: "transparent"
3717
+ },
3718
+ children: /* @__PURE__ */ r(
3719
+ "svg",
3720
+ {
3721
+ width: "12",
3722
+ height: "12",
3723
+ viewBox: "0 0 24 24",
3724
+ fill: "none",
3725
+ stroke: "currentColor",
3726
+ strokeWidth: "2.5",
3727
+ strokeLinecap: "round",
3728
+ strokeLinejoin: "round",
3729
+ children: [
3730
+ /* @__PURE__ */ e("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
3731
+ /* @__PURE__ */ e("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
3732
+ ]
3733
+ }
3734
+ )
3735
+ }
3736
+ )
3737
+ ]
3738
+ }
3739
+ ),
3740
+ /* @__PURE__ */ e(
3741
+ "div",
3742
+ {
3743
+ className: "border-b",
3744
+ style: {
3745
+ borderColor: "var(--border-default)",
3746
+ backgroundColor: "var(--bg-deep)"
3747
+ },
3748
+ children: p.media
3749
+ }
3750
+ ),
3751
+ /* @__PURE__ */ e(
3752
+ "p",
3753
+ {
3754
+ className: "px-6 py-4 text-[13px] leading-relaxed",
3755
+ style: {
3756
+ color: "var(--text-secondary)",
3757
+ fontFamily: "var(--font-sans)"
3758
+ },
3759
+ children: p.blurb
3760
+ }
3761
+ ),
3762
+ /* @__PURE__ */ r(
3763
+ "div",
3764
+ {
3765
+ className: "flex items-center justify-between border-t px-6 py-4",
3766
+ style: { borderColor: "var(--border-default)" },
3767
+ children: [
3768
+ /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: c.map((f, y) => /* @__PURE__ */ e(
3769
+ "span",
3770
+ {
3771
+ className: "h-1.5 rounded-full transition-all",
3772
+ style: {
3773
+ width: y === l ? "18px" : "6px",
3774
+ backgroundColor: y === l ? "var(--accent-cyan)" : "var(--border-default)"
3775
+ }
3776
+ },
3777
+ f.title
3778
+ )) }),
3779
+ /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
3780
+ l > 0 && /* @__PURE__ */ e(
3781
+ "button",
3782
+ {
3783
+ type: "button",
3784
+ onClick: h,
3785
+ className: "border px-3 py-1.5 text-[10px] tracking-[0.2em] uppercase transition-colors hover:text-white",
3786
+ style: {
3787
+ borderColor: "var(--border-default)",
3788
+ color: "var(--text-muted)",
3789
+ fontFamily: "var(--font-mono)",
3790
+ backgroundColor: "transparent"
3791
+ },
3792
+ children: "Back"
3793
+ }
3794
+ ),
3795
+ /* @__PURE__ */ e(
3796
+ "button",
3797
+ {
3798
+ type: "button",
3799
+ onClick: d,
3800
+ className: "border px-4 py-1.5 text-[10px] tracking-[0.2em] uppercase transition-colors hover:text-white",
3801
+ style: {
3802
+ borderColor: "var(--accent-cyan)",
3803
+ color: "var(--accent-cyan)",
3804
+ fontFamily: "var(--font-mono)",
3805
+ backgroundColor: "transparent"
3806
+ },
3807
+ children: l === m ? "Got it" : "Next"
3808
+ }
3809
+ )
3810
+ ] })
3811
+ ]
3812
+ }
3813
+ )
3814
+ ]
3815
+ }
3816
+ )
3817
+ }
3818
+ );
3819
+ }
3820
+ function sr({ name: t }) {
3821
+ return /* @__PURE__ */ r("div", { className: "ob-stage blueprint-grid flex flex-col items-center justify-center text-center", children: [
3822
+ /* @__PURE__ */ e(
3823
+ "div",
3824
+ {
3825
+ className: "text-[9px] tracking-[0.4em] uppercase",
3826
+ style: { color: "var(--accent-cyan)", fontFamily: "var(--font-mono)" },
3827
+ children: "Architecture"
3828
+ }
3829
+ ),
3830
+ /* @__PURE__ */ e(
3831
+ "div",
3832
+ {
3833
+ className: "mt-2 px-6 text-[26px] leading-tight",
3834
+ style: { color: "var(--text-primary)", fontFamily: "var(--font-display)" },
3835
+ children: t
3836
+ }
3837
+ ),
3838
+ /* @__PURE__ */ e(
3839
+ "div",
3840
+ {
3841
+ className: "mt-3 text-[10px] tracking-[0.18em] uppercase",
3842
+ style: { color: "var(--text-muted)", fontFamily: "var(--font-mono)" },
3843
+ children: "Interactive architecture diagrams"
3844
+ }
3845
+ )
3846
+ ] });
3847
+ }
3848
+ function cr() {
3849
+ const [t, a] = w(!0), o = C(() => a(!0), []), n = C(() => a(!1), []);
3850
+ return { open: t, openWizard: o, closeWizard: n };
3851
+ }
3852
+ let ce = null;
3853
+ function dr({ diagramId: t, showDiagramList: a = !0 }) {
3854
+ const o = V(), n = Mt(), [l, s] = w(null), i = cr();
3855
+ S(() => {
3248
3856
  t || (window.location.hash = `#/diagram/${o.summary.topDiagram}`);
3249
- }, [t, o.summary.topDiagram]), B(() => {
3250
- var d;
3251
- if (!t || t === le) return;
3252
- le = t;
3253
- const u = (d = o.summary.diagrams.find(
3254
- (h) => h.slug === t
3255
- )) == null ? void 0 : d.level;
3256
- n("diagram.viewed", typeof u == "number" ? { level: u } : {});
3857
+ }, [t, o.summary.topDiagram]), S(() => {
3858
+ var h;
3859
+ if (!t || t === ce) return;
3860
+ ce = t;
3861
+ const d = (h = o.summary.diagrams.find(
3862
+ (p) => p.slug === t
3863
+ )) == null ? void 0 : h.level;
3864
+ n("diagram.viewed", typeof d == "number" ? { level: d } : {});
3257
3865
  }, [t, o.summary.diagrams, n]);
3258
- const s = M(
3259
- (u) => {
3260
- i(u), u && n("node.inspected");
3866
+ const c = C(
3867
+ (d) => {
3868
+ s(d), d && n("node.inspected");
3261
3869
  },
3262
3870
  [n]
3263
- ), c = M((u) => {
3264
- i(null), window.location.hash = `#/diagram/${u}`;
3871
+ ), m = C((d) => {
3872
+ s(null), window.location.hash = `#/diagram/${d}`;
3265
3873
  }, []);
3266
3874
  return /* @__PURE__ */ r(
3267
3875
  "div",
@@ -3270,37 +3878,86 @@ function Ut({ diagramId: t, showDiagramList: a = !0 }) {
3270
3878
  style: { backgroundColor: "var(--bg-deep)" },
3271
3879
  children: [
3272
3880
  t ? /* @__PURE__ */ e(
3273
- St,
3881
+ zt,
3274
3882
  {
3275
3883
  diagramId: t,
3276
- onSelectNode: s,
3277
- onDrillIn: c
3884
+ onSelectNode: c,
3885
+ onDrillIn: m
3278
3886
  },
3279
3887
  t
3280
- ) : /* @__PURE__ */ e(Yt, { message: "Opening top diagram…" }),
3888
+ ) : /* @__PURE__ */ e(ur, { message: "Opening top diagram…" }),
3281
3889
  a && /* @__PURE__ */ e(
3282
- At,
3890
+ Pt,
3283
3891
  {
3284
3892
  summary: o.summary,
3285
3893
  currentDiagramId: t,
3286
- onSelect: c,
3287
- onGoHome: () => c(o.summary.topDiagram)
3894
+ onSelect: m,
3895
+ onGoHome: () => m(o.summary.topDiagram)
3288
3896
  }
3289
3897
  ),
3290
- /* @__PURE__ */ e(_t, {}),
3898
+ /* @__PURE__ */ e(ar, {}),
3899
+ /* @__PURE__ */ e($t, {}),
3291
3900
  l && /* @__PURE__ */ e(
3292
- $t,
3901
+ qt,
3293
3902
  {
3294
3903
  nodeId: l,
3295
- onClose: () => i(null)
3904
+ onClose: () => s(null)
3296
3905
  },
3297
3906
  l
3907
+ ),
3908
+ /* @__PURE__ */ e(mr, { onClick: i.openWizard }),
3909
+ /* @__PURE__ */ e(
3910
+ ir,
3911
+ {
3912
+ open: i.open,
3913
+ onClose: i.closeWizard,
3914
+ architectureName: o.summary.name,
3915
+ architectureDescription: o.summary.description
3916
+ }
3298
3917
  )
3299
3918
  ]
3300
3919
  }
3301
3920
  );
3302
3921
  }
3303
- function Yt({ message: t }) {
3922
+ function mr({ onClick: t }) {
3923
+ return /* @__PURE__ */ e(
3924
+ "button",
3925
+ {
3926
+ type: "button",
3927
+ onClick: t,
3928
+ "aria-label": "Show getting started tour",
3929
+ title: "Getting started",
3930
+ 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",
3931
+ style: {
3932
+ // Sit just above the @xyflow Controls cluster (bottom-right) so the
3933
+ // help affordance reads as part of the canvas controls.
3934
+ bottom: "132px",
3935
+ borderColor: "var(--border-default)",
3936
+ backgroundColor: "rgba(10, 15, 26, 0.85)",
3937
+ color: "var(--text-muted)"
3938
+ },
3939
+ children: /* @__PURE__ */ r(
3940
+ "svg",
3941
+ {
3942
+ width: "16",
3943
+ height: "16",
3944
+ viewBox: "0 0 24 24",
3945
+ fill: "none",
3946
+ stroke: "currentColor",
3947
+ strokeWidth: "2",
3948
+ strokeLinecap: "round",
3949
+ strokeLinejoin: "round",
3950
+ children: [
3951
+ /* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "10" }),
3952
+ /* @__PURE__ */ e("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
3953
+ /* @__PURE__ */ e("line", { x1: "12", y1: "17", x2: "12.01", y2: "17" })
3954
+ ]
3955
+ }
3956
+ )
3957
+ }
3958
+ );
3959
+ }
3960
+ function ur({ message: t }) {
3304
3961
  return /* @__PURE__ */ e(
3305
3962
  "div",
3306
3963
  {
@@ -3313,22 +3970,22 @@ function Yt({ message: t }) {
3313
3970
  }
3314
3971
  );
3315
3972
  }
3316
- function Xt() {
3317
- const [t, a] = C(() => window.location.hash);
3318
- return B(() => {
3973
+ function hr() {
3974
+ const [t, a] = w(() => window.location.hash);
3975
+ return S(() => {
3319
3976
  const o = () => a(window.location.hash);
3320
3977
  return window.addEventListener("hashchange", o), () => window.removeEventListener("hashchange", o);
3321
3978
  }, []), t;
3322
3979
  }
3323
- function Kt(t) {
3980
+ function pr(t) {
3324
3981
  if (t === "#/style-guide") return { view: "style-guide", diagramId: null };
3325
3982
  const a = t.match(/^#\/diagram\/([^/?#]+)/);
3326
3983
  return a ? { view: "architecture", diagramId: decodeURIComponent(a[1]) } : { view: "architecture", diagramId: null };
3327
3984
  }
3328
- function ar({ dataSource: t, reloadKey: a, showDiagramList: o = !0 }) {
3329
- const n = Xt(), l = Kt(n);
3330
- return l.view === "style-guide" ? /* @__PURE__ */ e(Ve, {}) : /* @__PURE__ */ e(wt, { dataSource: t, reloadKey: a, children: /* @__PURE__ */ e(
3331
- Ut,
3985
+ function wr({ dataSource: t, reloadKey: a, showDiagramList: o = !0 }) {
3986
+ const n = hr(), l = pr(n);
3987
+ return l.view === "style-guide" ? /* @__PURE__ */ e(Ke, {}) : /* @__PURE__ */ e(St, { dataSource: t, reloadKey: a, children: /* @__PURE__ */ e(
3988
+ dr,
3332
3989
  {
3333
3990
  diagramId: l.diagramId,
3334
3991
  showDiagramList: o
@@ -3336,6 +3993,6 @@ function ar({ dataSource: t, reloadKey: a, showDiagramList: o = !0 }) {
3336
3993
  ) });
3337
3994
  }
3338
3995
  export {
3339
- ar as App
3996
+ wr as App
3340
3997
  };
3341
3998
  //# sourceMappingURL=App.js.map