@burdenoff/microfe-semanticfed 2026.1109.13 → 2026.1109.15

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.
Files changed (82) hide show
  1. package/dist/semanticfed/components/AskQuestionPanel.d.ts +0 -14
  2. package/dist/semanticfed/components/AskQuestionPanel.js +198 -160
  3. package/dist/semanticfed/components/AskQuestionPanel.js.map +1 -1
  4. package/dist/semanticfed/components/OnboardingChecklist.js +172 -128
  5. package/dist/semanticfed/components/OnboardingChecklist.js.map +1 -1
  6. package/dist/semanticfed/components/PageHeader.d.ts +11 -0
  7. package/dist/semanticfed/components/PageHeader.js +21 -0
  8. package/dist/semanticfed/components/PageHeader.js.map +1 -0
  9. package/dist/semanticfed/components/SavedQueryRunsPanel.js +217 -193
  10. package/dist/semanticfed/components/SavedQueryRunsPanel.js.map +1 -1
  11. package/dist/semanticfed/components/SummaryCard.d.ts +10 -0
  12. package/dist/semanticfed/components/SummaryCard.js +21 -0
  13. package/dist/semanticfed/components/SummaryCard.js.map +1 -0
  14. package/dist/semanticfed/components/TableHeaders.d.ts +16 -0
  15. package/dist/semanticfed/components/TableHeaders.js +21 -0
  16. package/dist/semanticfed/components/TableHeaders.js.map +1 -0
  17. package/dist/semanticfed/components/askConversation.d.ts +16 -0
  18. package/dist/semanticfed/components/askConversation.js +7 -0
  19. package/dist/semanticfed/components/askConversation.js.map +1 -0
  20. package/dist/semanticfed/components/lineage/LineageDetails.d.ts +14 -0
  21. package/dist/semanticfed/components/lineage/LineageDetails.js +151 -0
  22. package/dist/semanticfed/components/lineage/LineageDetails.js.map +1 -0
  23. package/dist/semanticfed/components/lineage/LineageLanes.d.ts +11 -0
  24. package/dist/semanticfed/components/lineage/LineageLanes.js +78 -0
  25. package/dist/semanticfed/components/lineage/LineageLanes.js.map +1 -0
  26. package/dist/semanticfed/components/lineage/LineageToolbar.d.ts +14 -0
  27. package/dist/semanticfed/components/lineage/LineageToolbar.js +69 -0
  28. package/dist/semanticfed/components/lineage/LineageToolbar.js.map +1 -0
  29. package/dist/semanticfed/components/lineage/LineageWarnings.d.ts +13 -0
  30. package/dist/semanticfed/components/lineage/LineageWarnings.js +43 -0
  31. package/dist/semanticfed/components/lineage/LineageWarnings.js.map +1 -0
  32. package/dist/semanticfed/components/lineage/lineageModel.d.ts +26 -0
  33. package/dist/semanticfed/components/lineage/lineageModel.js +104 -0
  34. package/dist/semanticfed/components/lineage/lineageModel.js.map +1 -0
  35. package/dist/semanticfed/components/lineage/useLineageTrace.d.ts +17 -0
  36. package/dist/semanticfed/components/lineage/useLineageTrace.js +34 -0
  37. package/dist/semanticfed/components/lineage/useLineageTrace.js.map +1 -0
  38. package/dist/semanticfed/components/queryConsole/QueryHistoryCard.d.ts +10 -0
  39. package/dist/semanticfed/components/queryConsole/QueryHistoryCard.js +47 -0
  40. package/dist/semanticfed/components/queryConsole/QueryHistoryCard.js.map +1 -0
  41. package/dist/semanticfed/components/queryConsole/SchemaBrowser.d.ts +13 -0
  42. package/dist/semanticfed/components/queryConsole/SchemaBrowser.js +89 -0
  43. package/dist/semanticfed/components/queryConsole/SchemaBrowser.js.map +1 -0
  44. package/dist/semanticfed/components/queryConsole/SqlEditorCard.d.ts +14 -0
  45. package/dist/semanticfed/components/queryConsole/SqlEditorCard.js +69 -0
  46. package/dist/semanticfed/components/queryConsole/SqlEditorCard.js.map +1 -0
  47. package/dist/semanticfed/components/queryConsole/SqlResultCard.d.ts +14 -0
  48. package/dist/semanticfed/components/queryConsole/SqlResultCard.js +71 -0
  49. package/dist/semanticfed/components/queryConsole/SqlResultCard.js.map +1 -0
  50. package/dist/semanticfed/components/queryConsole/consoleHistory.d.ts +23 -0
  51. package/dist/semanticfed/components/queryConsole/consoleHistory.js +19 -0
  52. package/dist/semanticfed/components/queryConsole/consoleHistory.js.map +1 -0
  53. package/dist/semanticfed/hooks/useNlQuery.js +13 -10
  54. package/dist/semanticfed/hooks/useNlQuery.js.map +1 -1
  55. package/dist/semanticfed/pages/AgentsPage.js +113 -142
  56. package/dist/semanticfed/pages/AgentsPage.js.map +1 -1
  57. package/dist/semanticfed/pages/AuditPage.js +94 -75
  58. package/dist/semanticfed/pages/AuditPage.js.map +1 -1
  59. package/dist/semanticfed/pages/CollaborationPage.js +60 -64
  60. package/dist/semanticfed/pages/CollaborationPage.js.map +1 -1
  61. package/dist/semanticfed/pages/ConfigurationPage.js +82 -63
  62. package/dist/semanticfed/pages/ConfigurationPage.js.map +1 -1
  63. package/dist/semanticfed/pages/KnowledgeGraphPage.js +120 -119
  64. package/dist/semanticfed/pages/KnowledgeGraphPage.js.map +1 -1
  65. package/dist/semanticfed/pages/LineagePage.js +108 -424
  66. package/dist/semanticfed/pages/LineagePage.js.map +1 -1
  67. package/dist/semanticfed/pages/OntologyPage.js +70 -97
  68. package/dist/semanticfed/pages/OntologyPage.js.map +1 -1
  69. package/dist/semanticfed/pages/PoliciesPage.js +104 -133
  70. package/dist/semanticfed/pages/PoliciesPage.js.map +1 -1
  71. package/dist/semanticfed/pages/ProtocolPage.js +70 -74
  72. package/dist/semanticfed/pages/ProtocolPage.js.map +1 -1
  73. package/dist/semanticfed/pages/QueryConsolePage.js +160 -327
  74. package/dist/semanticfed/pages/QueryConsolePage.js.map +1 -1
  75. package/dist/semanticfed/pages/RegistryPage.js +90 -101
  76. package/dist/semanticfed/pages/RegistryPage.js.map +1 -1
  77. package/dist/semanticfed/pages/TopologyPage.js +68 -99
  78. package/dist/semanticfed/pages/TopologyPage.js.map +1 -1
  79. package/dist/semanticfed/utils/contentKeys.d.ts +16 -0
  80. package/dist/semanticfed/utils/contentKeys.js +14 -0
  81. package/dist/semanticfed/utils/contentKeys.js.map +1 -0
  82. package/package.json +2 -2
@@ -1,440 +1,124 @@
1
- import { lineageErrorMessage as e, lineageRootFor as t, useSemRecordLineage as n, useSemWorkspaceLineage as r } from "../hooks/useLineage.js";
2
- import { cn as i } from "../utils/cn.js";
3
- import { translateWithFallback as a } from "../utils/i18n.js";
4
- import { useMemo as o, useState as s } from "react";
5
- import { AlertTriangle as c, ArrowDownRight as ee, ArrowUpLeft as te, Boxes as l, Columns3 as u, Database as d, FileCode2 as f, GitBranch as p, Hash as m, Layers as h, Loader2 as g, Plug as _, Ruler as v, Table2 as y, X as b } from "lucide-react";
6
- import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
7
- import { Badge as w, Button as T, Card as E, CardContent as D, CardHeader as O, CardTitle as k, Input as A } from "@burdenoff/fe-libs/ui";
8
- import { useI18n as ne } from "@burdenoff/fe-libs/shared/providers/shell";
1
+ import { LineageDetails as e } from "../components/lineage/LineageDetails.js";
2
+ import { LineageLanes as t } from "../components/lineage/LineageLanes.js";
3
+ import { LineageToolbar as n } from "../components/lineage/LineageToolbar.js";
4
+ import { LineageWarnings as r } from "../components/lineage/LineageWarnings.js";
5
+ import { KIND_ICON as i, KIND_LABEL as a, kindLabel as o } from "../components/lineage/lineageModel.js";
6
+ import { useLineageTrace as s } from "../components/lineage/useLineageTrace.js";
7
+ import { lineageErrorMessage as c } from "../hooks/useLineage.js";
8
+ import { useTr as l } from "../hooks/useTr.js";
9
+ import { useMemo as u, useState as d } from "react";
10
+ import { AlertTriangle as f, GitBranch as p, Loader2 as m } from "lucide-react";
11
+ import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
12
+ import { Badge as v, Card as y, CardContent as b } from "@burdenoff/fe-libs/ui";
9
13
  // src/semanticfed/pages/LineagePage.tsx
10
- var j = {
11
- CONNECTOR: _,
12
- DATA_SOURCE: d,
13
- TABLE: y,
14
- ENTITY: l,
15
- DIMENSION: v,
16
- METRIC: m,
17
- COLUMN: u,
18
- MODEL: h,
19
- QUERY: f
20
- }, M = {
21
- CONNECTOR: "Connector",
22
- DATA_SOURCE: "Data source",
23
- TABLE: "Table",
24
- ENTITY: "Entity",
25
- DIMENSION: "Dimension",
26
- METRIC: "Metric",
27
- COLUMN: "Column",
28
- MODEL: "Model",
29
- QUERY: "Query"
30
- }, re = [
31
- {
32
- id: "sources",
33
- label: "Sources",
34
- kinds: ["CONNECTOR", "DATA_SOURCE"]
35
- },
36
- {
37
- id: "tables",
38
- label: "Tables",
39
- kinds: ["TABLE"]
40
- },
41
- {
42
- id: "entities",
43
- label: "Entities",
44
- kinds: ["ENTITY"]
45
- },
46
- {
47
- id: "fields",
48
- label: "Fields",
49
- kinds: [
50
- "DIMENSION",
51
- "METRIC",
52
- "COLUMN"
53
- ]
54
- },
55
- {
56
- id: "models",
57
- label: "Models",
58
- kinds: ["MODEL"]
59
- },
60
- {
61
- id: "queries",
62
- label: "Queries",
63
- kinds: ["QUERY"]
64
- }
65
- ], N = {
66
- PROVIDES: "provides",
67
- HOSTS: "hosts",
68
- MAPS_TO: "maps to",
69
- DEFINES: "defines",
70
- MEMBER_OF: "member of",
71
- JOINS: "joins",
72
- SERVES: "serves",
73
- READ_BY: "read by",
74
- EXECUTED_ON: "executed on"
75
- }, ie = [
76
- "UPSTREAM",
77
- "BOTH",
78
- "DOWNSTREAM"
79
- ], P = [
80
- 1,
81
- 2,
82
- 3,
83
- 5,
84
- 10
85
- ];
86
- function F(e, t, n, r) {
87
- let i = /* @__PURE__ */ new Set([t]), a = new Set(e.nodes.filter((e) => e.kind === "MODEL").map((e) => e.id)), o = (n) => {
88
- let o = /* @__PURE__ */ new Set([t]), s = 0;
89
- for (; o.size > 0 && (r === null || s < r);) {
90
- let r = /* @__PURE__ */ new Set();
91
- for (let s of e.edges) {
92
- if (s.kind === "JOINS") continue;
93
- let [e, c] = n ? [s.from, s.to] : [s.to, s.from];
94
- e !== t && a.has(e) || o.has(e) && !i.has(c) && (i.add(c), r.add(c));
95
- }
96
- o = r, s += 1;
97
- }
98
- };
99
- return n !== "DOWNSTREAM" && o(!1), n !== "UPSTREAM" && o(!0), i;
14
+ function x({ graph: e, tx: t }) {
15
+ let n = u(() => {
16
+ let t = {};
17
+ for (let n of e?.nodes ?? []) t[n.kind] = (t[n.kind] ?? 0) + 1;
18
+ return t;
19
+ }, [e]);
20
+ return /* @__PURE__ */ _("div", {
21
+ className: "flex flex-wrap items-center justify-between gap-3",
22
+ "data-tour": "semanticfed-lineage-header",
23
+ children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("h1", {
24
+ className: "text-2xl font-semibold",
25
+ children: t("semanticfed.lineage.title", "Lineage")
26
+ }), /* @__PURE__ */ g("p", {
27
+ className: "text-sm text-muted-foreground",
28
+ children: t("semanticfed.lineage.description", "End-to-end lineage from connectors and data sources through tables, entities and fields to the models and saved queries that use them. Select anything to trace where its data comes from and what depends on it.")
29
+ })] }), /* @__PURE__ */ g("div", {
30
+ className: "flex flex-wrap gap-2",
31
+ "data-testid": "lineage-counts",
32
+ children: Object.keys(a).filter((e) => n[e]).map((e) => {
33
+ let r = i[e];
34
+ return /* @__PURE__ */ _(v, {
35
+ variant: "outline",
36
+ className: "gap-1",
37
+ children: [
38
+ /* @__PURE__ */ g(r, { className: "h-3 w-3" }),
39
+ n[e],
40
+ " ",
41
+ o(t, e)
42
+ ]
43
+ }, e);
44
+ })
45
+ })]
46
+ });
100
47
  }
101
- function I(e) {
102
- if (!e) return null;
103
- let t = new Date(e);
104
- return Number.isNaN(t.getTime()) ? null : t.toLocaleString();
48
+ function S({ pending: e, error: t, empty: n, tx: r }) {
49
+ return e ? /* @__PURE__ */ g(y, { children: /* @__PURE__ */ _(b, {
50
+ className: "flex items-center gap-3 p-6 text-sm text-muted-foreground",
51
+ children: [/* @__PURE__ */ g(m, { className: "h-5 w-5 animate-spin" }), r("semanticfed.lineage.loading", "Computing lineage…")]
52
+ }) }) : t ? /* @__PURE__ */ g(y, { children: /* @__PURE__ */ _(b, {
53
+ className: "flex items-center gap-3 p-6 text-sm text-destructive",
54
+ "data-testid": "lineage-error",
55
+ children: [/* @__PURE__ */ g(f, { className: "h-5 w-5" }), c(t)]
56
+ }) }) : n ? /* @__PURE__ */ g(y, { children: /* @__PURE__ */ _(b, {
57
+ className: "flex items-center gap-3 p-6 text-sm text-muted-foreground",
58
+ "data-testid": "lineage-empty",
59
+ children: [/* @__PURE__ */ g(p, { className: "h-5 w-5" }), r("semanticfed.lineage.empty", "No lineage yet. Connect a data source and model an entity on it; lineage appears here as soon as records exist.")]
60
+ }) }) : null;
105
61
  }
106
- function L() {
107
- let { t: l } = ne(), u = (e, t, n) => a(l, e, t, n), d = r(), [f, m] = s(null), [h, _] = s("BOTH"), [v, y] = s(null), [N, I] = s(""), L = d.data, z = o(() => new Map((L?.nodes ?? []).map((e) => [e.id, e])), [L]), B = f ? z.get(f) ?? null : null, V = B ? t(B) : null, H = n(V, h, v), U = o(() => !L || !B ? null : V ? H.data ? new Set(H.data.nodes.map((e) => e.id)) : null : F(L, B.id, h, v), [
108
- L,
109
- B,
110
- V,
111
- H.data,
112
- h,
113
- v
114
- ]), W = o(() => B ? V ? H.data?.edges ?? [] : !L || !U ? [] : L.edges.filter((e) => U.has(e.from) && U.has(e.to)) : [], [
115
- B,
116
- V,
117
- H.data,
118
- L,
119
- U
120
- ]), G = N.trim().toLowerCase(), K = (e) => G === "" || e.label.toLowerCase().includes(G) || (e.detail ?? "").toLowerCase().includes(G), q = o(() => {
121
- let e = {};
122
- for (let t of L?.nodes ?? []) e[t.kind] = (e[t.kind] ?? 0) + 1;
123
- return e;
124
- }, [L]), J = B ? W.filter((e) => e.to === B.id) : [], Y = B ? W.filter((e) => e.from === B.id) : [], X = (e) => z.get(e)?.label ?? e, Z = (e) => {
125
- let t = z.get(e);
126
- return t ? u(`semanticfed.lineage.kinds.${t.kind}`, M[t.kind]) : "";
127
- }, ae = d.isSuccess && (L?.nodes.length ?? 0) === 0, Q = [...L?.warnings ?? []], $ = !!(L?.truncated || H.data?.truncated);
128
- return /* @__PURE__ */ C("div", {
62
+ function C() {
63
+ let i = l(), [a, c] = d(null), [u, f] = d("BOTH"), [p, m] = d(null), [v, y] = d(""), b = s(a, u, p), { workspace: C, graph: w, nodesById: T, selected: E } = b, D = (e) => T.get(e)?.label ?? e;
64
+ return /* @__PURE__ */ _("div", {
129
65
  className: "space-y-6 p-4 sm:p-6",
130
66
  "data-testid": "semanticfed-lineage-page",
131
67
  children: [
132
- /* @__PURE__ */ C("div", {
133
- className: "flex flex-wrap items-center justify-between gap-3",
134
- "data-tour": "semanticfed-lineage-header",
135
- children: [/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("h1", {
136
- className: "text-2xl font-semibold",
137
- children: u("semanticfed.lineage.title", "Lineage")
138
- }), /* @__PURE__ */ S("p", {
139
- className: "text-sm text-muted-foreground",
140
- children: u("semanticfed.lineage.description", "End-to-end lineage from connectors and data sources through tables, entities and fields to the models and saved queries that use them. Select anything to trace where its data comes from and what depends on it.")
141
- })] }), /* @__PURE__ */ S("div", {
142
- className: "flex flex-wrap gap-2",
143
- "data-testid": "lineage-counts",
144
- children: Object.keys(M).filter((e) => q[e]).map((e) => {
145
- let t = j[e];
146
- return /* @__PURE__ */ C(w, {
147
- variant: "outline",
148
- className: "gap-1",
149
- children: [
150
- /* @__PURE__ */ S(t, { className: "h-3 w-3" }),
151
- q[e],
152
- " ",
153
- u(`semanticfed.lineage.kinds.${e}`, M[e])
154
- ]
155
- }, e);
156
- })
157
- })]
68
+ /* @__PURE__ */ g(x, {
69
+ graph: w,
70
+ tx: i
158
71
  }),
159
- d.isPending && /* @__PURE__ */ S(E, { children: /* @__PURE__ */ C(D, {
160
- className: "flex items-center gap-3 p-6 text-sm text-muted-foreground",
161
- children: [/* @__PURE__ */ S(g, { className: "h-5 w-5 animate-spin" }), u("semanticfed.lineage.loading", "Computing lineage…")]
162
- }) }),
163
- d.isError && /* @__PURE__ */ S(E, { children: /* @__PURE__ */ C(D, {
164
- className: "flex items-center gap-3 p-6 text-sm text-destructive",
165
- "data-testid": "lineage-error",
166
- children: [/* @__PURE__ */ S(c, { className: "h-5 w-5" }), e(d.error)]
167
- }) }),
168
- ae && /* @__PURE__ */ S(E, { children: /* @__PURE__ */ C(D, {
169
- className: "flex items-center gap-3 p-6 text-sm text-muted-foreground",
170
- "data-testid": "lineage-empty",
171
- children: [/* @__PURE__ */ S(p, { className: "h-5 w-5" }), u("semanticfed.lineage.empty", "No lineage yet. Connect a data source and model an entity on it; lineage appears here as soon as records exist.")]
172
- }) }),
173
- (Q.length > 0 || $) && /* @__PURE__ */ C(E, {
174
- "data-testid": "lineage-warnings",
175
- children: [/* @__PURE__ */ S(O, {
176
- className: "pb-2",
177
- children: /* @__PURE__ */ C(k, {
178
- className: "flex items-center gap-2 text-base",
179
- children: [/* @__PURE__ */ S(c, { className: "h-4 w-4 text-destructive" }), u("semanticfed.lineage.warnings.title", "Lineage warnings")]
180
- })
181
- }), /* @__PURE__ */ C(D, {
182
- className: "space-y-1 text-sm",
183
- children: [$ && /* @__PURE__ */ S("p", {
184
- className: "text-muted-foreground",
185
- children: u("semanticfed.lineage.warnings.truncated", "This workspace is larger than one lineage pass reads, so the graph is partial.")
186
- }), Q.slice(0, 20).map((e, t) => /* @__PURE__ */ C("button", {
187
- type: "button",
188
- className: "block text-left text-muted-foreground hover:text-foreground",
189
- onClick: () => e.nodeId && m(e.nodeId),
190
- children: [e.nodeId ? /* @__PURE__ */ C("span", {
191
- className: "font-medium",
192
- children: [X(e.nodeId), ": "]
193
- }) : null, e.message]
194
- }, `${e.nodeId ?? "graph"}-${t}`))]
195
- })]
72
+ /* @__PURE__ */ g(S, {
73
+ pending: C.isPending,
74
+ error: C.isError ? C.error : null,
75
+ empty: C.isSuccess && (w?.nodes.length ?? 0) === 0,
76
+ tx: i
77
+ }),
78
+ /* @__PURE__ */ g(r, {
79
+ warnings: w?.warnings ?? [],
80
+ truncated: b.truncated,
81
+ nodeLabel: D,
82
+ onSelect: c,
83
+ tx: i
196
84
  }),
197
- L && L.nodes.length > 0 && /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ C("div", {
198
- className: "flex flex-wrap items-center gap-2",
199
- children: [
200
- /* @__PURE__ */ S(A, {
201
- "aria-label": u("semanticfed.lineage.search", "Filter nodes"),
202
- placeholder: u("semanticfed.lineage.search", "Filter nodes"),
203
- value: N,
204
- onChange: (e) => I(e.target.value),
205
- className: "w-full sm:w-64",
206
- "data-testid": "lineage-search"
207
- }),
208
- /* @__PURE__ */ S("div", {
209
- className: "flex rounded-md border",
210
- role: "group",
211
- "aria-label": u("semanticfed.lineage.direction", "Direction"),
212
- children: ie.map((e) => /* @__PURE__ */ S(T, {
213
- type: "button",
214
- size: "sm",
215
- variant: h === e ? "default" : "ghost",
216
- onClick: () => _(e),
217
- "aria-pressed": h === e,
218
- "data-testid": `lineage-direction-${e}`,
219
- children: e === "UPSTREAM" ? u("semanticfed.lineage.upstream", "Upstream") : e === "DOWNSTREAM" ? u("semanticfed.lineage.downstream", "Downstream") : u("semanticfed.lineage.both", "Both")
220
- }, e))
221
- }),
222
- /* @__PURE__ */ C("label", {
223
- className: "flex items-center gap-2 text-sm text-muted-foreground",
224
- children: [u("semanticfed.lineage.depth", "Depth"), /* @__PURE__ */ C("select", {
225
- className: "rounded border bg-background p-1.5 text-sm text-foreground",
226
- value: v ?? "",
227
- onChange: (e) => y(e.target.value ? Number(e.target.value) : null),
228
- "data-testid": "lineage-depth",
229
- children: [/* @__PURE__ */ S("option", {
230
- value: "",
231
- children: u("semanticfed.lineage.depthAll", "All")
232
- }), P.map((e) => /* @__PURE__ */ S("option", {
233
- value: e,
234
- children: e
235
- }, e))]
236
- })]
237
- }),
238
- B && /* @__PURE__ */ C(T, {
239
- type: "button",
240
- size: "sm",
241
- variant: "outline",
242
- onClick: () => m(null),
243
- className: "gap-1",
244
- "data-testid": "lineage-clear",
245
- children: [/* @__PURE__ */ S(b, { className: "h-3 w-3" }), u("semanticfed.lineage.clear", "Clear selection")]
246
- })
247
- ]
248
- }), /* @__PURE__ */ C("div", {
85
+ w && w.nodes.length > 0 && /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(n, {
86
+ search: v,
87
+ onSearchChange: y,
88
+ direction: u,
89
+ onDirectionChange: f,
90
+ depth: p,
91
+ onDepthChange: m,
92
+ hasSelection: E !== null,
93
+ onClearSelection: () => c(null),
94
+ tx: i
95
+ }), /* @__PURE__ */ _("div", {
249
96
  className: "grid gap-4 xl:grid-cols-[minmax(0,1fr)_22rem]",
250
- children: [/* @__PURE__ */ S("div", {
251
- className: "min-w-0 overflow-x-auto",
252
- children: /* @__PURE__ */ S("div", {
253
- className: "grid min-w-0 grid-cols-1 gap-3 md:min-w-[60rem] md:grid-cols-6",
254
- "data-testid": "lineage-lanes",
255
- children: re.map((e) => {
256
- let t = L.nodes.filter((t) => e.kinds.includes(t.kind) && K(t));
257
- return /* @__PURE__ */ C("section", {
258
- className: "min-w-0 space-y-2",
259
- "data-testid": `lineage-lane-${e.id}`,
260
- children: [
261
- /* @__PURE__ */ C("h2", {
262
- className: "text-xs font-semibold uppercase tracking-wide text-muted-foreground",
263
- children: [
264
- u(`semanticfed.lineage.lanes.${e.id}`, e.label),
265
- " ",
266
- /* @__PURE__ */ C("span", {
267
- className: "font-normal",
268
- children: [
269
- "(",
270
- t.length,
271
- ")"
272
- ]
273
- })
274
- ]
275
- }),
276
- t.length === 0 && /* @__PURE__ */ S("p", {
277
- className: "text-xs text-muted-foreground",
278
- children: "—"
279
- }),
280
- t.map((e) => {
281
- let t = j[e.kind], n = e.id === f, r = U?.has(e.id) ?? !1, a = U !== null && !r;
282
- return /* @__PURE__ */ C("button", {
283
- type: "button",
284
- onClick: () => m(n ? null : e.id),
285
- "aria-pressed": n,
286
- title: e.detail ?? e.label,
287
- "data-testid": "lineage-node",
288
- "data-node-id": e.id,
289
- "data-node-kind": e.kind,
290
- "data-in-lineage": r ? "true" : "false",
291
- className: i("w-full rounded-md border bg-card p-2 text-left text-sm transition-colors hover:bg-accent", n && "border-primary ring-2 ring-primary", r && !n && "border-primary bg-accent", a && "opacity-40"),
292
- children: [/* @__PURE__ */ C("span", {
293
- className: "flex items-center gap-1.5 font-medium",
294
- children: [/* @__PURE__ */ S(t, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }), /* @__PURE__ */ S("span", {
295
- className: "truncate",
296
- children: e.label
297
- })]
298
- }), (e.detail || e.status) && /* @__PURE__ */ S("span", {
299
- className: "mt-0.5 block truncate text-xs text-muted-foreground",
300
- children: [e.status, e.detail].filter(Boolean).join(" · ")
301
- })]
302
- }, e.id);
303
- })
304
- ]
305
- }, e.id);
306
- })
307
- })
308
- }), /* @__PURE__ */ C(E, {
309
- className: "min-w-0 self-start",
310
- "data-testid": "lineage-details",
311
- children: [/* @__PURE__ */ S(O, {
312
- className: "pb-3",
313
- children: /* @__PURE__ */ C(k, {
314
- className: "flex items-center gap-2 text-base",
315
- children: [/* @__PURE__ */ S(p, { className: "h-4 w-4" }), B ? B.label : u("semanticfed.lineage.details.title", "Lineage details")]
316
- })
317
- }), /* @__PURE__ */ C(D, {
318
- className: "space-y-4 text-sm",
319
- children: [!B && /* @__PURE__ */ S("p", {
320
- className: "text-muted-foreground",
321
- children: u("semanticfed.lineage.details.hint", "Select a source, table, entity, field, model or query to trace its lineage.")
322
- }), B && /* @__PURE__ */ C(x, { children: [
323
- /* @__PURE__ */ C("div", {
324
- className: "space-y-1",
325
- children: [
326
- /* @__PURE__ */ S(w, {
327
- variant: "outline",
328
- children: u(`semanticfed.lineage.kinds.${B.kind}`, M[B.kind])
329
- }),
330
- B.detail && /* @__PURE__ */ S("p", {
331
- className: "break-words font-mono text-xs text-muted-foreground",
332
- children: B.detail
333
- }),
334
- B.status && /* @__PURE__ */ S("p", {
335
- className: "text-xs text-muted-foreground",
336
- children: B.status
337
- })
338
- ]
339
- }),
340
- V && H.isPending && /* @__PURE__ */ C("p", {
341
- className: "flex items-center gap-2 text-muted-foreground",
342
- children: [/* @__PURE__ */ S(g, { className: "h-4 w-4 animate-spin" }), u("semanticfed.lineage.tracing", "Tracing lineage…")]
343
- }),
344
- V && H.isError && /* @__PURE__ */ S("p", {
345
- className: "text-destructive",
346
- "data-testid": "lineage-record-error",
347
- children: e(H.error)
348
- }),
349
- U && /* @__PURE__ */ S("p", {
350
- className: "text-muted-foreground",
351
- "data-testid": "lineage-reach",
352
- children: u("semanticfed.lineage.details.reach", "{{count}} nodes in this lineage", { count: Math.max(U.size - 1, 0) })
353
- }),
354
- /* @__PURE__ */ S(R, {
355
- title: u("semanticfed.lineage.details.upstream", "Comes from"),
356
- icon: te,
357
- edges: J,
358
- otherEnd: (e) => e.from,
359
- nodeLabel: X,
360
- nodeKindLabel: Z,
361
- onSelect: m,
362
- emptyText: u("semanticfed.lineage.details.noUpstream", "Nothing upstream"),
363
- testId: "lineage-upstream"
364
- }),
365
- /* @__PURE__ */ S(R, {
366
- title: u("semanticfed.lineage.details.downstream", "Feeds into"),
367
- icon: ee,
368
- edges: Y,
369
- otherEnd: (e) => e.to,
370
- nodeLabel: X,
371
- nodeKindLabel: Z,
372
- onSelect: m,
373
- emptyText: u("semanticfed.lineage.details.noDownstream", "Nothing downstream"),
374
- testId: "lineage-downstream"
375
- })
376
- ] })]
377
- })]
97
+ children: [/* @__PURE__ */ g(t, {
98
+ graph: w,
99
+ search: v,
100
+ selectedId: a,
101
+ highlighted: b.highlighted,
102
+ onSelect: c,
103
+ tx: i
104
+ }), /* @__PURE__ */ g(e, {
105
+ selected: E,
106
+ tracing: b.tracing,
107
+ traceError: b.traceError,
108
+ highlighted: b.highlighted,
109
+ edges: b.edges,
110
+ nodeLabel: D,
111
+ nodeKindLabel: (e) => {
112
+ let t = T.get(e);
113
+ return t ? o(i, t.kind) : "";
114
+ },
115
+ onSelect: c,
116
+ tx: i
378
117
  })]
379
118
  })] })
380
119
  ]
381
120
  });
382
121
  }
383
- function R({ title: e, icon: t, edges: n, otherEnd: r, nodeLabel: i, nodeKindLabel: a, onSelect: o, emptyText: s, testId: c }) {
384
- return /* @__PURE__ */ C("div", {
385
- className: "space-y-2",
386
- "data-testid": c,
387
- children: [
388
- /* @__PURE__ */ C("h3", {
389
- className: "flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wide text-muted-foreground",
390
- children: [
391
- /* @__PURE__ */ S(t, { className: "h-3.5 w-3.5" }),
392
- e,
393
- " (",
394
- n.length,
395
- ")"
396
- ]
397
- }),
398
- n.length === 0 && /* @__PURE__ */ S("p", {
399
- className: "text-xs text-muted-foreground",
400
- children: s
401
- }),
402
- /* @__PURE__ */ S("ul", {
403
- className: "space-y-1.5",
404
- children: n.map((e) => {
405
- let t = r(e), n = I(e.observedAt);
406
- return /* @__PURE__ */ C("li", {
407
- className: "rounded border p-2",
408
- children: [
409
- /* @__PURE__ */ S("button", {
410
- type: "button",
411
- className: "font-medium hover:underline",
412
- onClick: () => o(t),
413
- children: i(t)
414
- }),
415
- /* @__PURE__ */ C("span", {
416
- className: "ml-1 text-xs text-muted-foreground",
417
- children: [
418
- a(t),
419
- " · ",
420
- N[e.kind]
421
- ]
422
- }),
423
- e.detail && /* @__PURE__ */ S("p", {
424
- className: "mt-0.5 break-words font-mono text-xs text-muted-foreground",
425
- children: e.detail
426
- }),
427
- n && /* @__PURE__ */ S("p", {
428
- className: "mt-0.5 text-xs text-muted-foreground",
429
- children: n
430
- })
431
- ]
432
- }, e.id);
433
- })
434
- })
435
- ]
436
- });
437
- }
438
- export { L as LineagePage };
122
+ export { C as LineagePage };
439
123
 
440
124
  //# sourceMappingURL=LineagePage.js.map