@burdenoff/microfe-semanticfed 2026.1109.14 → 2026.1109.16

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 (111) hide show
  1. package/README.md +33 -0
  2. package/dist/index.d.ts +1 -0
  3. package/dist/index.js +2 -1
  4. package/dist/semanticfed/components/AskQuestionPanel.d.ts +0 -14
  5. package/dist/semanticfed/components/AskQuestionPanel.js +198 -160
  6. package/dist/semanticfed/components/AskQuestionPanel.js.map +1 -1
  7. package/dist/semanticfed/components/NlAssistSettings.js +4 -4
  8. package/dist/semanticfed/components/NlAssistSettings.js.map +1 -1
  9. package/dist/semanticfed/components/OnboardingChecklist.js +172 -128
  10. package/dist/semanticfed/components/OnboardingChecklist.js.map +1 -1
  11. package/dist/semanticfed/components/PageHeader.d.ts +11 -0
  12. package/dist/semanticfed/components/PageHeader.js +21 -0
  13. package/dist/semanticfed/components/PageHeader.js.map +1 -0
  14. package/dist/semanticfed/components/SavedQueryRunsPanel.js +224 -200
  15. package/dist/semanticfed/components/SavedQueryRunsPanel.js.map +1 -1
  16. package/dist/semanticfed/components/SummaryCard.d.ts +10 -0
  17. package/dist/semanticfed/components/SummaryCard.js +21 -0
  18. package/dist/semanticfed/components/SummaryCard.js.map +1 -0
  19. package/dist/semanticfed/components/TableHeaders.d.ts +16 -0
  20. package/dist/semanticfed/components/TableHeaders.js +21 -0
  21. package/dist/semanticfed/components/TableHeaders.js.map +1 -0
  22. package/dist/semanticfed/components/askConversation.d.ts +16 -0
  23. package/dist/semanticfed/components/askConversation.js +7 -0
  24. package/dist/semanticfed/components/askConversation.js.map +1 -0
  25. package/dist/semanticfed/components/lineage/LineageDetails.d.ts +15 -0
  26. package/dist/semanticfed/components/lineage/LineageDetails.js +155 -0
  27. package/dist/semanticfed/components/lineage/LineageDetails.js.map +1 -0
  28. package/dist/semanticfed/components/lineage/LineageLanes.d.ts +11 -0
  29. package/dist/semanticfed/components/lineage/LineageLanes.js +78 -0
  30. package/dist/semanticfed/components/lineage/LineageLanes.js.map +1 -0
  31. package/dist/semanticfed/components/lineage/LineageToolbar.d.ts +14 -0
  32. package/dist/semanticfed/components/lineage/LineageToolbar.js +69 -0
  33. package/dist/semanticfed/components/lineage/LineageToolbar.js.map +1 -0
  34. package/dist/semanticfed/components/lineage/LineageWarnings.d.ts +13 -0
  35. package/dist/semanticfed/components/lineage/LineageWarnings.js +43 -0
  36. package/dist/semanticfed/components/lineage/LineageWarnings.js.map +1 -0
  37. package/dist/semanticfed/components/lineage/lineageModel.d.ts +30 -0
  38. package/dist/semanticfed/components/lineage/lineageModel.js +110 -0
  39. package/dist/semanticfed/components/lineage/lineageModel.js.map +1 -0
  40. package/dist/semanticfed/components/lineage/useLineageTrace.d.ts +17 -0
  41. package/dist/semanticfed/components/lineage/useLineageTrace.js +34 -0
  42. package/dist/semanticfed/components/lineage/useLineageTrace.js.map +1 -0
  43. package/dist/semanticfed/components/queryConsole/QueryHistoryCard.d.ts +10 -0
  44. package/dist/semanticfed/components/queryConsole/QueryHistoryCard.js +47 -0
  45. package/dist/semanticfed/components/queryConsole/QueryHistoryCard.js.map +1 -0
  46. package/dist/semanticfed/components/queryConsole/SchemaBrowser.d.ts +13 -0
  47. package/dist/semanticfed/components/queryConsole/SchemaBrowser.js +89 -0
  48. package/dist/semanticfed/components/queryConsole/SchemaBrowser.js.map +1 -0
  49. package/dist/semanticfed/components/queryConsole/SqlEditorCard.d.ts +14 -0
  50. package/dist/semanticfed/components/queryConsole/SqlEditorCard.js +69 -0
  51. package/dist/semanticfed/components/queryConsole/SqlEditorCard.js.map +1 -0
  52. package/dist/semanticfed/components/queryConsole/SqlResultCard.d.ts +14 -0
  53. package/dist/semanticfed/components/queryConsole/SqlResultCard.js +71 -0
  54. package/dist/semanticfed/components/queryConsole/SqlResultCard.js.map +1 -0
  55. package/dist/semanticfed/components/queryConsole/consoleHistory.d.ts +23 -0
  56. package/dist/semanticfed/components/queryConsole/consoleHistory.js +19 -0
  57. package/dist/semanticfed/components/queryConsole/consoleHistory.js.map +1 -0
  58. package/dist/semanticfed/hooks/useLineage.d.ts +2 -1
  59. package/dist/semanticfed/hooks/useLineage.js +24 -23
  60. package/dist/semanticfed/hooks/useLineage.js.map +1 -1
  61. package/dist/semanticfed/hooks/useNlQuery.js +13 -10
  62. package/dist/semanticfed/hooks/useNlQuery.js.map +1 -1
  63. package/dist/semanticfed/hooks/useSqlConsole.d.ts +2 -1
  64. package/dist/semanticfed/hooks/useSqlConsole.js +28 -27
  65. package/dist/semanticfed/hooks/useSqlConsole.js.map +1 -1
  66. package/dist/semanticfed/pages/AgentsPage.js +119 -148
  67. package/dist/semanticfed/pages/AgentsPage.js.map +1 -1
  68. package/dist/semanticfed/pages/AuditPage.js +95 -76
  69. package/dist/semanticfed/pages/AuditPage.js.map +1 -1
  70. package/dist/semanticfed/pages/CollaborationPage.js +60 -64
  71. package/dist/semanticfed/pages/CollaborationPage.js.map +1 -1
  72. package/dist/semanticfed/pages/ConfigurationPage.js +86 -67
  73. package/dist/semanticfed/pages/ConfigurationPage.js.map +1 -1
  74. package/dist/semanticfed/pages/DashboardPage.js +1 -1
  75. package/dist/semanticfed/pages/DashboardPage.js.map +1 -1
  76. package/dist/semanticfed/pages/HelpPage.js +1 -1
  77. package/dist/semanticfed/pages/HelpPage.js.map +1 -1
  78. package/dist/semanticfed/pages/KnowledgeGraphPage.js +129 -128
  79. package/dist/semanticfed/pages/KnowledgeGraphPage.js.map +1 -1
  80. package/dist/semanticfed/pages/LineagePage.js +110 -424
  81. package/dist/semanticfed/pages/LineagePage.js.map +1 -1
  82. package/dist/semanticfed/pages/MonitoringPage.js +76 -76
  83. package/dist/semanticfed/pages/MonitoringPage.js.map +1 -1
  84. package/dist/semanticfed/pages/OntologyPage.js +71 -98
  85. package/dist/semanticfed/pages/OntologyPage.js.map +1 -1
  86. package/dist/semanticfed/pages/PerformancePage.js +2 -2
  87. package/dist/semanticfed/pages/PerformancePage.js.map +1 -1
  88. package/dist/semanticfed/pages/PoliciesPage.js +112 -141
  89. package/dist/semanticfed/pages/PoliciesPage.js.map +1 -1
  90. package/dist/semanticfed/pages/ProtocolPage.js +93 -94
  91. package/dist/semanticfed/pages/ProtocolPage.js.map +1 -1
  92. package/dist/semanticfed/pages/QueryConsolePage.js +160 -327
  93. package/dist/semanticfed/pages/QueryConsolePage.js.map +1 -1
  94. package/dist/semanticfed/pages/RegistryPage.js +94 -105
  95. package/dist/semanticfed/pages/RegistryPage.js.map +1 -1
  96. package/dist/semanticfed/pages/TechStackPage.js +1 -1
  97. package/dist/semanticfed/pages/TechStackPage.js.map +1 -1
  98. package/dist/semanticfed/pages/TopologyPage.js +68 -99
  99. package/dist/semanticfed/pages/TopologyPage.js.map +1 -1
  100. package/dist/semanticfed/pages/VisualizationPage.js +7 -7
  101. package/dist/semanticfed/pages/VisualizationPage.js.map +1 -1
  102. package/dist/semanticfed/translations/english.js +514 -0
  103. package/dist/semanticfed/translations/english.js.map +1 -0
  104. package/dist/semanticfed/translations/english.json.d.ts +513 -0
  105. package/dist/semanticfed/utils/contentKeys.d.ts +16 -0
  106. package/dist/semanticfed/utils/contentKeys.js +14 -0
  107. package/dist/semanticfed/utils/contentKeys.js.map +1 -0
  108. package/dist/semanticfed/utils/requestErrorI18n.d.ts +3 -0
  109. package/dist/semanticfed/utils/requestErrorI18n.js +15 -0
  110. package/dist/semanticfed/utils/requestErrorI18n.js.map +1 -0
  111. package/package.json +9 -3
@@ -1,440 +1,126 @@
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 { useI18n as f } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
11
+ import { AlertTriangle as p, GitBranch as m, Loader2 as h } from "lucide-react";
12
+ import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
13
+ import { Badge as y, Card as b, CardContent as x } from "@burdenoff/fe-libs/ui";
9
14
  // 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;
15
+ function S({ graph: e, tx: t }) {
16
+ let n = u(() => {
17
+ let t = {};
18
+ for (let n of e?.nodes ?? []) t[n.kind] = (t[n.kind] ?? 0) + 1;
19
+ return t;
20
+ }, [e]);
21
+ return /* @__PURE__ */ v("div", {
22
+ className: "flex flex-wrap items-center justify-between gap-3",
23
+ "data-tour": "semanticfed-lineage-header",
24
+ children: [/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("h1", {
25
+ className: "text-2xl font-semibold",
26
+ children: t("semanticfed.lineage.title", "Lineage")
27
+ }), /* @__PURE__ */ _("p", {
28
+ className: "text-sm text-muted-foreground",
29
+ 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.")
30
+ })] }), /* @__PURE__ */ _("div", {
31
+ className: "flex flex-wrap gap-2",
32
+ "data-testid": "lineage-counts",
33
+ children: Object.keys(a).filter((e) => n[e]).map((e) => {
34
+ let r = i[e];
35
+ return /* @__PURE__ */ v(y, {
36
+ variant: "outline",
37
+ className: "gap-1",
38
+ children: [
39
+ /* @__PURE__ */ _(r, { className: "h-3 w-3" }),
40
+ n[e],
41
+ " ",
42
+ o(t, e)
43
+ ]
44
+ }, e);
45
+ })
46
+ })]
47
+ });
100
48
  }
101
- function I(e) {
102
- if (!e) return null;
103
- let t = new Date(e);
104
- return Number.isNaN(t.getTime()) ? null : t.toLocaleString();
49
+ function C({ pending: e, error: t, empty: n, tx: r }) {
50
+ return e ? /* @__PURE__ */ _(b, { children: /* @__PURE__ */ v(x, {
51
+ className: "flex items-center gap-3 p-6 text-sm text-muted-foreground",
52
+ children: [/* @__PURE__ */ _(h, { className: "h-5 w-5 animate-spin" }), r("semanticfed.lineage.loading", "Computing lineage…")]
53
+ }) }) : t ? /* @__PURE__ */ _(b, { children: /* @__PURE__ */ v(x, {
54
+ className: "flex items-center gap-3 p-6 text-sm text-destructive",
55
+ "data-testid": "lineage-error",
56
+ children: [/* @__PURE__ */ _(p, { className: "h-5 w-5" }), c(t, r)]
57
+ }) }) : n ? /* @__PURE__ */ _(b, { children: /* @__PURE__ */ v(x, {
58
+ className: "flex items-center gap-3 p-6 text-sm text-muted-foreground",
59
+ "data-testid": "lineage-empty",
60
+ children: [/* @__PURE__ */ _(m, { 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.")]
61
+ }) }) : null;
105
62
  }
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", {
63
+ function w() {
64
+ let i = l(), { locale: a } = f(), [c, u] = d(null), [p, m] = d("BOTH"), [h, y] = d(null), [b, x] = d(""), w = s(c, p, h), { workspace: T, graph: E, nodesById: D, selected: O } = w, k = (e) => D.get(e)?.label ?? e;
65
+ return /* @__PURE__ */ v("div", {
129
66
  className: "space-y-6 p-4 sm:p-6",
130
67
  "data-testid": "semanticfed-lineage-page",
131
68
  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
- })]
69
+ /* @__PURE__ */ _(S, {
70
+ graph: E,
71
+ tx: i
158
72
  }),
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
- })]
73
+ /* @__PURE__ */ _(C, {
74
+ pending: T.isPending,
75
+ error: T.isError ? T.error : null,
76
+ empty: T.isSuccess && (E?.nodes.length ?? 0) === 0,
77
+ tx: i
78
+ }),
79
+ /* @__PURE__ */ _(r, {
80
+ warnings: E?.warnings ?? [],
81
+ truncated: w.truncated,
82
+ nodeLabel: k,
83
+ onSelect: u,
84
+ tx: i
196
85
  }),
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", {
86
+ E && E.nodes.length > 0 && /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(n, {
87
+ search: b,
88
+ onSearchChange: x,
89
+ direction: p,
90
+ onDirectionChange: m,
91
+ depth: h,
92
+ onDepthChange: y,
93
+ hasSelection: O !== null,
94
+ onClearSelection: () => u(null),
95
+ tx: i
96
+ }), /* @__PURE__ */ v("div", {
249
97
  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
- })]
98
+ children: [/* @__PURE__ */ _(t, {
99
+ graph: E,
100
+ search: b,
101
+ selectedId: c,
102
+ highlighted: w.highlighted,
103
+ onSelect: u,
104
+ tx: i
105
+ }), /* @__PURE__ */ _(e, {
106
+ locale: a,
107
+ selected: O,
108
+ tracing: w.tracing,
109
+ traceError: w.traceError,
110
+ highlighted: w.highlighted,
111
+ edges: w.edges,
112
+ nodeLabel: k,
113
+ nodeKindLabel: (e) => {
114
+ let t = D.get(e);
115
+ return t ? o(i, t.kind) : "";
116
+ },
117
+ onSelect: u,
118
+ tx: i
378
119
  })]
379
120
  })] })
380
121
  ]
381
122
  });
382
123
  }
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 };
124
+ export { w as LineagePage };
439
125
 
440
126
  //# sourceMappingURL=LineagePage.js.map