@burdenoff/microfe-cosmicintersection 2026.704.2 → 2026.709.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cosmicintersection/CosmicIntersectionRoot.d.ts +15 -0
- package/dist/cosmicintersection/CosmicIntersectionRoot.d.ts.map +1 -0
- package/dist/cosmicintersection/CosmicIntersectionRoutes.d.ts +3 -0
- package/dist/cosmicintersection/CosmicIntersectionRoutes.d.ts.map +1 -0
- package/dist/cosmicintersection/CosmicIntersectionRoutes.js +39 -27
- package/dist/cosmicintersection/CosmicIntersectionRoutes.js.map +1 -1
- package/dist/cosmicintersection/api/cosmicApi.d.ts +728 -0
- package/dist/cosmicintersection/api/cosmicApi.d.ts.map +1 -0
- package/dist/cosmicintersection/api/cosmicApi.js +6 -0
- package/dist/cosmicintersection/api/cosmicApi.js.map +1 -1
- package/dist/cosmicintersection/components/ActionMenu.d.ts +41 -0
- package/dist/cosmicintersection/components/ActionMenu.d.ts.map +1 -0
- package/dist/cosmicintersection/components/ActivityFeedPanel.d.ts +10 -0
- package/dist/cosmicintersection/components/ActivityFeedPanel.d.ts.map +1 -0
- package/dist/cosmicintersection/components/DiscussionPanel.d.ts +14 -0
- package/dist/cosmicintersection/components/DiscussionPanel.d.ts.map +1 -0
- package/dist/cosmicintersection/components/DiscussionPanel.js +9 -9
- package/dist/cosmicintersection/components/EmptyState.d.ts +18 -0
- package/dist/cosmicintersection/components/EmptyState.d.ts.map +1 -0
- package/dist/cosmicintersection/components/EntityFormShell.d.ts +25 -0
- package/dist/cosmicintersection/components/EntityFormShell.d.ts.map +1 -0
- package/dist/cosmicintersection/components/EntityTagsField.d.ts +20 -0
- package/dist/cosmicintersection/components/EntityTagsField.d.ts.map +1 -0
- package/dist/cosmicintersection/components/ErrorState.d.ts +14 -0
- package/dist/cosmicintersection/components/ErrorState.d.ts.map +1 -0
- package/dist/cosmicintersection/components/FacetPanel.d.ts +21 -0
- package/dist/cosmicintersection/components/FacetPanel.d.ts.map +1 -0
- package/dist/cosmicintersection/components/FacetPanel.js +66 -0
- package/dist/cosmicintersection/components/FacetPanel.js.map +1 -0
- package/dist/cosmicintersection/components/FileUploadField.d.ts +35 -0
- package/dist/cosmicintersection/components/FileUploadField.d.ts.map +1 -0
- package/dist/cosmicintersection/components/FileUploadField.js +16 -16
- package/dist/cosmicintersection/components/LineageGraph.d.ts +59 -0
- package/dist/cosmicintersection/components/LineageGraph.d.ts.map +1 -0
- package/dist/cosmicintersection/components/LineageGraph.js +388 -0
- package/dist/cosmicintersection/components/LineageGraph.js.map +1 -0
- package/dist/cosmicintersection/components/LoadingState.d.ts +15 -0
- package/dist/cosmicintersection/components/LoadingState.d.ts.map +1 -0
- package/dist/cosmicintersection/components/PageLayout.d.ts +18 -0
- package/dist/cosmicintersection/components/PageLayout.d.ts.map +1 -0
- package/dist/cosmicintersection/components/Pagination.d.ts +32 -0
- package/dist/cosmicintersection/components/Pagination.d.ts.map +1 -0
- package/dist/cosmicintersection/components/ResultsChart.d.ts +7 -0
- package/dist/cosmicintersection/components/ResultsChart.d.ts.map +1 -0
- package/dist/cosmicintersection/components/ResultsChart.js +329 -0
- package/dist/cosmicintersection/components/ResultsChart.js.map +1 -0
- package/dist/cosmicintersection/components/SafeLink.d.ts +35 -0
- package/dist/cosmicintersection/components/SafeLink.d.ts.map +1 -0
- package/dist/cosmicintersection/components/StatusBadge.d.ts +23 -0
- package/dist/cosmicintersection/components/StatusBadge.d.ts.map +1 -0
- package/dist/cosmicintersection/components/StepDAG.d.ts +20 -0
- package/dist/cosmicintersection/components/StepDAG.d.ts.map +1 -0
- package/dist/cosmicintersection/components/StepDAG.js +104 -0
- package/dist/cosmicintersection/components/StepDAG.js.map +1 -0
- package/dist/cosmicintersection/components/index.d.ts +18 -0
- package/dist/cosmicintersection/components/index.d.ts.map +1 -0
- package/dist/cosmicintersection/context/CosmicIntersectionContext.d.ts +26 -0
- package/dist/cosmicintersection/context/CosmicIntersectionContext.d.ts.map +1 -0
- package/dist/cosmicintersection/index.d.ts +18 -0
- package/dist/cosmicintersection/index.d.ts.map +1 -0
- package/dist/cosmicintersection/lib/mutationResult.d.ts +23 -0
- package/dist/cosmicintersection/lib/mutationResult.d.ts.map +1 -0
- package/dist/cosmicintersection/lib/toast.d.ts +22 -0
- package/dist/cosmicintersection/lib/toast.d.ts.map +1 -0
- package/dist/cosmicintersection/pages/access/AccessPage.d.ts +2 -0
- package/dist/cosmicintersection/pages/access/AccessPage.d.ts.map +1 -0
- package/dist/cosmicintersection/pages/access/AccessPage.js +207 -155
- package/dist/cosmicintersection/pages/access/AccessPage.js.map +1 -1
- package/dist/cosmicintersection/pages/analyses/AnalysesPage.d.ts +2 -0
- package/dist/cosmicintersection/pages/analyses/AnalysesPage.d.ts.map +1 -0
- package/dist/cosmicintersection/pages/analyses/AnalysesPage.js +325 -165
- package/dist/cosmicintersection/pages/analyses/AnalysesPage.js.map +1 -1
- package/dist/cosmicintersection/pages/collections/CollectionDetailPage.d.ts +2 -0
- package/dist/cosmicintersection/pages/collections/CollectionDetailPage.d.ts.map +1 -0
- package/dist/cosmicintersection/pages/collections/CollectionDetailPage.js +138 -93
- package/dist/cosmicintersection/pages/collections/CollectionDetailPage.js.map +1 -1
- package/dist/cosmicintersection/pages/collections/CollectionFormPage.d.ts +2 -0
- package/dist/cosmicintersection/pages/collections/CollectionFormPage.d.ts.map +1 -0
- package/dist/cosmicintersection/pages/collections/CollectionFormPage.js.map +1 -1
- package/dist/cosmicintersection/pages/collections/CollectionsPage.d.ts +2 -0
- package/dist/cosmicintersection/pages/collections/CollectionsPage.d.ts.map +1 -0
- package/dist/cosmicintersection/pages/dashboard/DashboardPage.d.ts +2 -0
- package/dist/cosmicintersection/pages/dashboard/DashboardPage.d.ts.map +1 -0
- package/dist/cosmicintersection/pages/dashboard/DashboardPage.js +26 -15
- package/dist/cosmicintersection/pages/dashboard/DashboardPage.js.map +1 -1
- package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.d.ts +2 -0
- package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.d.ts.map +1 -0
- package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.js +345 -219
- package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.js.map +1 -1
- package/dist/cosmicintersection/pages/datasets/DatasetFormPage.d.ts +2 -0
- package/dist/cosmicintersection/pages/datasets/DatasetFormPage.d.ts.map +1 -0
- package/dist/cosmicintersection/pages/datasets/DatasetsPage.d.ts +2 -0
- package/dist/cosmicintersection/pages/datasets/DatasetsPage.d.ts.map +1 -0
- package/dist/cosmicintersection/pages/datasets/DatasetsPage.js +321 -163
- package/dist/cosmicintersection/pages/datasets/DatasetsPage.js.map +1 -1
- package/dist/cosmicintersection/pages/discovery/DiscoveryPage.d.ts +2 -0
- package/dist/cosmicintersection/pages/discovery/DiscoveryPage.d.ts.map +1 -0
- package/dist/cosmicintersection/pages/discovery/DiscoveryPage.js +358 -0
- package/dist/cosmicintersection/pages/discovery/DiscoveryPage.js.map +1 -0
- package/dist/cosmicintersection/pages/lineage/LineagePage.d.ts +2 -0
- package/dist/cosmicintersection/pages/lineage/LineagePage.d.ts.map +1 -0
- package/dist/cosmicintersection/pages/lineage/LineagePage.js +171 -0
- package/dist/cosmicintersection/pages/lineage/LineagePage.js.map +1 -0
- package/dist/cosmicintersection/pages/notebooks/NotebookDetailPage.d.ts +2 -0
- package/dist/cosmicintersection/pages/notebooks/NotebookDetailPage.d.ts.map +1 -0
- package/dist/cosmicintersection/pages/notebooks/NotebookDetailPage.js +232 -162
- package/dist/cosmicintersection/pages/notebooks/NotebookDetailPage.js.map +1 -1
- package/dist/cosmicintersection/pages/notebooks/NotebookFormPage.d.ts +2 -0
- package/dist/cosmicintersection/pages/notebooks/NotebookFormPage.d.ts.map +1 -0
- package/dist/cosmicintersection/pages/notebooks/NotebooksPage.d.ts +2 -0
- package/dist/cosmicintersection/pages/notebooks/NotebooksPage.d.ts.map +1 -0
- package/dist/cosmicintersection/pages/notebooks/NotebooksPage.js +143 -82
- package/dist/cosmicintersection/pages/notebooks/NotebooksPage.js.map +1 -1
- package/dist/cosmicintersection/pages/pipelines/PipelineDetailPage.d.ts +2 -0
- package/dist/cosmicintersection/pages/pipelines/PipelineDetailPage.d.ts.map +1 -0
- package/dist/cosmicintersection/pages/pipelines/PipelineDetailPage.js +286 -142
- package/dist/cosmicintersection/pages/pipelines/PipelineDetailPage.js.map +1 -1
- package/dist/cosmicintersection/pages/pipelines/PipelineFormPage.d.ts +2 -0
- package/dist/cosmicintersection/pages/pipelines/PipelineFormPage.d.ts.map +1 -0
- package/dist/cosmicintersection/pages/pipelines/PipelineFormPage.js +305 -103
- package/dist/cosmicintersection/pages/pipelines/PipelineFormPage.js.map +1 -1
- package/dist/cosmicintersection/pages/pipelines/PipelinesPage.d.ts +2 -0
- package/dist/cosmicintersection/pages/pipelines/PipelinesPage.d.ts.map +1 -0
- package/dist/cosmicintersection/pages/pipelines/PipelinesPage.js +183 -79
- package/dist/cosmicintersection/pages/pipelines/PipelinesPage.js.map +1 -1
- package/dist/cosmicintersection/pages/releases/ReleaseFormPage.d.ts +2 -0
- package/dist/cosmicintersection/pages/releases/ReleaseFormPage.d.ts.map +1 -0
- package/dist/cosmicintersection/pages/releases/ReleasesPage.d.ts +2 -0
- package/dist/cosmicintersection/pages/releases/ReleasesPage.d.ts.map +1 -0
- package/dist/cosmicintersection/pages/releases/ReleasesPage.js +262 -170
- package/dist/cosmicintersection/pages/releases/ReleasesPage.js.map +1 -1
- package/dist/cosmicintersection/pages/runs/RunDetailPage.d.ts +2 -0
- package/dist/cosmicintersection/pages/runs/RunDetailPage.d.ts.map +1 -0
- package/dist/cosmicintersection/pages/runs/RunDetailPage.js +179 -136
- package/dist/cosmicintersection/pages/runs/RunDetailPage.js.map +1 -1
- package/dist/cosmicintersection/pages/runs/RunsPage.d.ts +2 -0
- package/dist/cosmicintersection/pages/runs/RunsPage.d.ts.map +1 -0
- package/dist/cosmicintersection/pages/runs/RunsPage.js +124 -47
- package/dist/cosmicintersection/pages/runs/RunsPage.js.map +1 -1
- package/dist/cosmicintersection/pages/sources/SourceDetailPage.d.ts +2 -0
- package/dist/cosmicintersection/pages/sources/SourceDetailPage.d.ts.map +1 -0
- package/dist/cosmicintersection/pages/sources/SourceDetailPage.js +114 -85
- package/dist/cosmicintersection/pages/sources/SourceDetailPage.js.map +1 -1
- package/dist/cosmicintersection/pages/sources/SourceFormPage.d.ts +2 -0
- package/dist/cosmicintersection/pages/sources/SourceFormPage.d.ts.map +1 -0
- package/dist/cosmicintersection/pages/sources/SourcesPage.d.ts +2 -0
- package/dist/cosmicintersection/pages/sources/SourcesPage.d.ts.map +1 -0
- package/dist/cosmicintersection/pages/sources/SourcesPage.js +263 -152
- package/dist/cosmicintersection/pages/sources/SourcesPage.js.map +1 -1
- package/dist/cosmicintersection/types/index.d.ts +7 -0
- package/dist/cosmicintersection/types/index.d.ts.map +1 -0
- package/dist/cosmicintersection/utils/cn.d.ts +4 -0
- package/dist/cosmicintersection/utils/cn.d.ts.map +1 -0
- package/dist/cosmicintersection/utils/i18n.d.ts +15 -0
- package/dist/cosmicintersection/utils/i18n.d.ts.map +1 -0
- package/dist/cosmicintersection/utils/navigation.d.ts +2 -0
- package/dist/cosmicintersection/utils/navigation.d.ts.map +1 -0
- package/dist/dev/main.d.ts +2 -0
- package/dist/dev/main.d.ts.map +1 -0
- package/dist/generated/global-operations.d.ts +2 -0
- package/dist/generated/global-operations.d.ts.map +1 -0
- package/dist/generated/global-types.d.ts +18199 -0
- package/dist/generated/global-types.d.ts.map +1 -0
- package/dist/generated/wspace-operations.d.ts +2 -0
- package/dist/generated/wspace-operations.d.ts.map +1 -0
- package/dist/generated/wspace-types.d.ts +43046 -0
- package/dist/generated/wspace-types.d.ts.map +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -2
- package/dist/services/assistantApi.d.ts +66 -0
- package/dist/services/assistantApi.d.ts.map +1 -0
- package/dist/services/assistantApi.js +250 -0
- package/dist/services/assistantApi.js.map +1 -0
- package/dist/services/createSandboxAssistantTransport.d.ts +40 -0
- package/dist/services/createSandboxAssistantTransport.d.ts.map +1 -0
- package/dist/services/createSandboxAssistantTransport.js +120 -0
- package/dist/services/createSandboxAssistantTransport.js.map +1 -0
- package/dist/types/assistant.d.ts +48 -0
- package/dist/types/assistant.d.ts.map +1 -0
- package/dist/utils/pageContext.d.ts +28 -0
- package/dist/utils/pageContext.d.ts.map +1 -0
- package/dist/utils/pageContext.js +50 -0
- package/dist/utils/pageContext.js.map +1 -0
- package/package.json +5 -1
- package/dist/cosmicintersection/index.js +0 -1
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { cn as e } from "../utils/cn.js";
|
|
2
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
+
import { Checkbox as r } from "@burdenoff/fe-libs/ui";
|
|
4
|
+
//#region src/cosmicintersection/components/FacetPanel.tsx
|
|
5
|
+
function i({ groups: i, selected: a, onToggle: o, onClear: s, className: c }) {
|
|
6
|
+
let l = Object.values(a).reduce((e, t) => e + t.length, 0);
|
|
7
|
+
return /* @__PURE__ */ n("div", {
|
|
8
|
+
className: e("flex flex-col gap-6", c),
|
|
9
|
+
children: [/* @__PURE__ */ n("div", {
|
|
10
|
+
className: "flex items-center justify-between",
|
|
11
|
+
children: [/* @__PURE__ */ t("span", {
|
|
12
|
+
className: "text-xs font-semibold uppercase tracking-wide text-text-secondary",
|
|
13
|
+
children: "Facet"
|
|
14
|
+
}), s && l > 0 ? /* @__PURE__ */ n("button", {
|
|
15
|
+
type: "button",
|
|
16
|
+
onClick: s,
|
|
17
|
+
className: "rounded-button text-xs font-medium text-text-link transition-colors hover:text-text-primary focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border-focus",
|
|
18
|
+
children: [
|
|
19
|
+
"Clear (",
|
|
20
|
+
l,
|
|
21
|
+
")"
|
|
22
|
+
]
|
|
23
|
+
}) : null]
|
|
24
|
+
}), i.map((i) => {
|
|
25
|
+
let s = a[i.key] ?? [];
|
|
26
|
+
return /* @__PURE__ */ n("div", {
|
|
27
|
+
className: "space-y-2",
|
|
28
|
+
children: [/* @__PURE__ */ t("h3", {
|
|
29
|
+
className: "text-sm font-semibold text-text-primary",
|
|
30
|
+
children: i.label
|
|
31
|
+
}), i.options.length === 0 ? /* @__PURE__ */ t("p", {
|
|
32
|
+
className: "text-xs text-text-secondary",
|
|
33
|
+
children: "No values yet"
|
|
34
|
+
}) : /* @__PURE__ */ t("ul", {
|
|
35
|
+
className: "space-y-0.5",
|
|
36
|
+
children: i.options.map((a) => {
|
|
37
|
+
let c = s.includes(a.value), l = a.count === 0 && !c;
|
|
38
|
+
return /* @__PURE__ */ t("li", { children: /* @__PURE__ */ n("label", {
|
|
39
|
+
className: e("flex cursor-pointer items-center gap-2 rounded-button px-2 py-1.5 text-sm transition-colors hover:bg-bg-sunken", l && "cursor-not-allowed opacity-50 hover:bg-transparent"),
|
|
40
|
+
children: [
|
|
41
|
+
/* @__PURE__ */ t(r, {
|
|
42
|
+
checked: c,
|
|
43
|
+
disabled: l,
|
|
44
|
+
onCheckedChange: () => o(i.key, a.value),
|
|
45
|
+
"aria-label": `${a.label} (${a.count})`
|
|
46
|
+
}),
|
|
47
|
+
/* @__PURE__ */ t("span", {
|
|
48
|
+
className: "min-w-0 flex-1 truncate text-text-primary",
|
|
49
|
+
children: a.label
|
|
50
|
+
}),
|
|
51
|
+
/* @__PURE__ */ t("span", {
|
|
52
|
+
className: "shrink-0 tabular-nums text-xs text-text-secondary",
|
|
53
|
+
children: a.count
|
|
54
|
+
})
|
|
55
|
+
]
|
|
56
|
+
}) }, a.value);
|
|
57
|
+
})
|
|
58
|
+
})]
|
|
59
|
+
}, i.key);
|
|
60
|
+
})]
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
//#endregion
|
|
64
|
+
export { i as default };
|
|
65
|
+
|
|
66
|
+
//# sourceMappingURL=FacetPanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FacetPanel.js","names":[],"sources":["../../../src/cosmicintersection/components/FacetPanel.tsx"],"sourcesContent":["/**\n * FacetPanel — a grouped, multi-select facet filter with live result counts.\n *\n * Presentational only: the parent owns the selection state and computes the\n * per-option counts (typically by cross-filtering the current search pool). Each\n * option renders a checkbox, a label and a right-aligned tabular count. Styling is\n * token-only so it reads correctly in every theme. Zero-count options render\n * disabled + dimmed rather than disappearing, so the facet layout stays stable as\n * the user refines a search.\n *\n * Used by the DiscoveryPage (mockup 05) — Instrument / Access / Format /\n * Mission-Survey groups over the federated dataset catalog.\n */\nimport { Checkbox } from '@burdenoff/fe-libs/ui';\n\nimport { cn } from '../utils/cn';\n\nexport interface FacetOption {\n value: string;\n label: string;\n count: number;\n}\n\nexport interface FacetGroup {\n key: string;\n label: string;\n options: FacetOption[];\n}\n\nexport interface FacetPanelProps {\n groups: FacetGroup[];\n /** Selected values per group key. */\n selected: Record<string, string[]>;\n onToggle: (groupKey: string, value: string) => void;\n onClear?: () => void;\n className?: string;\n}\n\nexport function FacetPanel({ groups, selected, onToggle, onClear, className }: FacetPanelProps) {\n const totalSelected = Object.values(selected).reduce((sum, values) => sum + values.length, 0);\n\n return (\n <div className={cn('flex flex-col gap-6', className)}>\n <div className=\"flex items-center justify-between\">\n <span className=\"text-xs font-semibold uppercase tracking-wide text-text-secondary\">\n Facet\n </span>\n {onClear && totalSelected > 0 ? (\n <button\n type=\"button\"\n onClick={onClear}\n className=\"rounded-button text-xs font-medium text-text-link transition-colors hover:text-text-primary focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border-focus\"\n >\n Clear ({totalSelected})\n </button>\n ) : null}\n </div>\n\n {groups.map((group) => {\n const groupSelected = selected[group.key] ?? [];\n return (\n <div key={group.key} className=\"space-y-2\">\n <h3 className=\"text-sm font-semibold text-text-primary\">{group.label}</h3>\n {group.options.length === 0 ? (\n <p className=\"text-xs text-text-secondary\">No values yet</p>\n ) : (\n <ul className=\"space-y-0.5\">\n {group.options.map((option) => {\n const checked = groupSelected.includes(option.value);\n const disabled = option.count === 0 && !checked;\n return (\n <li key={option.value}>\n <label\n className={cn(\n 'flex cursor-pointer items-center gap-2 rounded-button px-2 py-1.5 text-sm transition-colors hover:bg-bg-sunken',\n disabled && 'cursor-not-allowed opacity-50 hover:bg-transparent'\n )}\n >\n <Checkbox\n checked={checked}\n disabled={disabled}\n onCheckedChange={() => onToggle(group.key, option.value)}\n aria-label={`${option.label} (${option.count})`}\n />\n <span className=\"min-w-0 flex-1 truncate text-text-primary\">\n {option.label}\n </span>\n <span className=\"shrink-0 tabular-nums text-xs text-text-secondary\">\n {option.count}\n </span>\n </label>\n </li>\n );\n })}\n </ul>\n )}\n </div>\n );\n })}\n </div>\n );\n}\n\nexport default FacetPanel;\n"],"mappings":";;;;AAsCA,SAAgB,EAAW,EAAE,WAAQ,aAAU,aAAU,YAAS,gBAA8B;CAC9F,IAAM,IAAgB,OAAO,OAAO,EAAS,CAAC,QAAQ,GAAK,MAAW,IAAM,EAAO,QAAQ,EAAE;AAE7F,QACE,kBAAC,OAAD;EAAK,WAAW,EAAG,uBAAuB,EAAU;YAApD,CACE,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,QAAD;IAAM,WAAU;cAAoE;IAE7E,CAAA,EACN,KAAW,IAAgB,IAC1B,kBAAC,UAAD;IACE,MAAK;IACL,SAAS;IACT,WAAU;cAHZ;KAIC;KACS;KAAc;KACf;QACP,KACA;MAEL,EAAO,KAAK,MAAU;GACrB,IAAM,IAAgB,EAAS,EAAM,QAAQ,EAAE;AAC/C,UACE,kBAAC,OAAD;IAAqB,WAAU;cAA/B,CACE,kBAAC,MAAD;KAAI,WAAU;eAA2C,EAAM;KAAW,CAAA,EACzE,EAAM,QAAQ,WAAW,IACxB,kBAAC,KAAD;KAAG,WAAU;eAA8B;KAAiB,CAAA,GAE5D,kBAAC,MAAD;KAAI,WAAU;eACX,EAAM,QAAQ,KAAK,MAAW;MAC7B,IAAM,IAAU,EAAc,SAAS,EAAO,MAAM,EAC9C,IAAW,EAAO,UAAU,KAAK,CAAC;AACxC,aACE,kBAAC,MAAD,EAAA,UACE,kBAAC,SAAD;OACE,WAAW,EACT,kHACA,KAAY,qDACb;iBAJH;QAME,kBAAC,GAAD;SACW;SACC;SACV,uBAAuB,EAAS,EAAM,KAAK,EAAO,MAAM;SACxD,cAAY,GAAG,EAAO,MAAM,IAAI,EAAO,MAAM;SAC7C,CAAA;QACF,kBAAC,QAAD;SAAM,WAAU;mBACb,EAAO;SACH,CAAA;QACP,kBAAC,QAAD;SAAM,WAAU;mBACb,EAAO;SACH,CAAA;QACD;UACL,EApBI,EAAO,MAoBX;OAEP;KACC,CAAA,CAEH;MAnCI,EAAM,IAmCV;IAER,CACE"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { useQuery } from '@apollo/client/react';
|
|
2
|
+
|
|
3
|
+
export declare const GET_FILE_DOWNLOAD_URL: import('graphql').DocumentNode;
|
|
4
|
+
interface DownloadUrlResponse {
|
|
5
|
+
getFileDownloadUrl?: string | null;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Resolve a presigned download URL for an attached File id. Skips when no id is
|
|
9
|
+
* present. Detail pages use this to render a "Download" link for a dataset/
|
|
10
|
+
* notebook/analysis artifact.
|
|
11
|
+
*/
|
|
12
|
+
export declare function useFileDownloadUrl(fileId: string | null | undefined): useQuery.Result<DownloadUrlResponse, {
|
|
13
|
+
id: string;
|
|
14
|
+
expiresIn: number;
|
|
15
|
+
}, "empty" | "complete" | "streaming", {
|
|
16
|
+
id: string;
|
|
17
|
+
expiresIn: number;
|
|
18
|
+
}>;
|
|
19
|
+
export interface FileUploadFieldProps {
|
|
20
|
+
/** Current attached wspace-files File id, if any. */
|
|
21
|
+
value?: string | null;
|
|
22
|
+
/** Called with the new File id once an upload completes, or '' when cleared. */
|
|
23
|
+
onChange: (fileId: string) => void | Promise<void>;
|
|
24
|
+
label: string;
|
|
25
|
+
hint?: string;
|
|
26
|
+
/** Optional wspace-files folder id; when omitted the file lands in the root. */
|
|
27
|
+
folderId?: string;
|
|
28
|
+
/** `accept` attribute for the file input; defaults to any file type. */
|
|
29
|
+
accept?: string;
|
|
30
|
+
disabled?: boolean;
|
|
31
|
+
className?: string;
|
|
32
|
+
}
|
|
33
|
+
export declare function FileUploadField({ value, onChange, label, hint, folderId, accept, disabled, className, }: FileUploadFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
export default FileUploadField;
|
|
35
|
+
//# sourceMappingURL=FileUploadField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileUploadField.d.ts","sourceRoot":"","sources":["../../../src/cosmicintersection/components/FileUploadField.tsx"],"names":[],"mappings":"AACA,OAAO,EAAmB,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AA6CjE,eAAO,MAAM,qBAAqB,gCAIjC,CAAC;AAaF,UAAU,mBAAmB;IAC3B,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACpC;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS;QACvB,MAAM;eAAa,MAAM;;QAAzB,MAAM;eAAa,MAAM;GAKrE;AAED,MAAM,WAAW,oBAAoB;IACnC,qDAAqD;IACrD,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,gFAAgF;IAChF,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnD,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gFAAgF;IAChF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wEAAwE;IACxE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,QAAQ,EACR,KAAK,EACL,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,QAAgB,EAChB,SAAS,GACV,EAAE,oBAAoB,2CA2JtB;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { notify as e } from "../lib/toast.js";
|
|
2
2
|
import { useId as t, useRef as n, useState as r } from "react";
|
|
3
3
|
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { gql as o } from "@apollo/client";
|
|
5
|
+
import { Download as s, FileUp as c, Loader2 as l, Paperclip as u, X as d } from "lucide-react";
|
|
6
|
+
import { Button as f } from "@burdenoff/fe-libs/ui";
|
|
7
7
|
import { useApolloClient as p, useQuery as m } from "@apollo/client/react";
|
|
8
8
|
//#region src/cosmicintersection/components/FileUploadField.tsx
|
|
9
|
-
var h =
|
|
9
|
+
var h = o`
|
|
10
10
|
mutation CosInitiateUpload($input: InitiateUploadInput!) {
|
|
11
11
|
initiateUpload(input: $input) {
|
|
12
12
|
session {
|
|
@@ -15,7 +15,7 @@ var h = f`
|
|
|
15
15
|
uploadUrl
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
-
`, g =
|
|
18
|
+
`, g = o`
|
|
19
19
|
mutation CosCompleteUpload($input: CompleteUploadInput!) {
|
|
20
20
|
completeUpload(input: $input) {
|
|
21
21
|
fileId
|
|
@@ -24,7 +24,7 @@ var h = f`
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
`, _ =
|
|
27
|
+
`, _ = o`
|
|
28
28
|
query CosGetFileDownloadUrl($id: ID!, $expiresIn: Int) {
|
|
29
29
|
getFileDownloadUrl(id: $id, expiresIn: $expiresIn)
|
|
30
30
|
}
|
|
@@ -39,8 +39,8 @@ function y(e) {
|
|
|
39
39
|
fetchPolicy: "no-cache"
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
|
-
function b({ value:
|
|
43
|
-
let w = p(), T = n(null), E = t(), [D, O] = r(!1), [k, A] = r(null), j = y(D ? null :
|
|
42
|
+
function b({ value: o, onChange: m, label: _, hint: v, folderId: b, accept: x, disabled: S = !1, className: C }) {
|
|
43
|
+
let w = p(), T = n(null), E = t(), [D, O] = r(!1), [k, A] = r(null), j = y(D ? null : o).data?.getFileDownloadUrl ?? null, M = async (t) => {
|
|
44
44
|
let n = t.target.files?.[0];
|
|
45
45
|
if (t.target.value = "", n) {
|
|
46
46
|
O(!0);
|
|
@@ -86,7 +86,7 @@ function b({ value: f, onChange: m, label: _, hint: v, folderId: b, accept: x, d
|
|
|
86
86
|
className: "flex flex-wrap items-center gap-3",
|
|
87
87
|
children: [/* @__PURE__ */ i("div", {
|
|
88
88
|
className: "flex size-12 shrink-0 items-center justify-center rounded-card border border-dashed border-border-default bg-bg-sunken text-text-secondary",
|
|
89
|
-
children: /* @__PURE__ */ i(
|
|
89
|
+
children: /* @__PURE__ */ i(u, {
|
|
90
90
|
className: "size-5",
|
|
91
91
|
"aria-hidden": "true"
|
|
92
92
|
})
|
|
@@ -94,32 +94,32 @@ function b({ value: f, onChange: m, label: _, hint: v, folderId: b, accept: x, d
|
|
|
94
94
|
className: "space-y-1",
|
|
95
95
|
children: [/* @__PURE__ */ a("div", {
|
|
96
96
|
className: "flex items-center gap-2",
|
|
97
|
-
children: [/* @__PURE__ */ a(
|
|
97
|
+
children: [/* @__PURE__ */ a(f, {
|
|
98
98
|
type: "button",
|
|
99
99
|
variant: "secondary",
|
|
100
100
|
size: "sm",
|
|
101
101
|
disabled: S || D,
|
|
102
102
|
onClick: () => T.current?.click(),
|
|
103
|
-
children: [D ? /* @__PURE__ */ i(
|
|
104
|
-
}),
|
|
103
|
+
children: [D ? /* @__PURE__ */ i(l, { className: "size-4 animate-spin" }) : /* @__PURE__ */ i(c, { className: "size-4" }), D ? "Uploading…" : o ? "Replace file" : _]
|
|
104
|
+
}), o && !D ? /* @__PURE__ */ a(f, {
|
|
105
105
|
type: "button",
|
|
106
106
|
variant: "ghost",
|
|
107
107
|
size: "sm",
|
|
108
108
|
onClick: () => void N(),
|
|
109
109
|
disabled: S,
|
|
110
|
-
children: [/* @__PURE__ */ i(
|
|
110
|
+
children: [/* @__PURE__ */ i(d, { className: "size-4" }), "Remove"]
|
|
111
111
|
}) : null]
|
|
112
|
-
}),
|
|
112
|
+
}), o ? /* @__PURE__ */ a("div", {
|
|
113
113
|
className: "flex flex-wrap items-center gap-2 text-xs text-text-secondary",
|
|
114
114
|
children: [/* @__PURE__ */ i("span", {
|
|
115
115
|
className: "max-w-[16rem] truncate",
|
|
116
|
-
children: k ?? `File ${
|
|
116
|
+
children: k ?? `File ${o}`
|
|
117
117
|
}), j ? /* @__PURE__ */ a("a", {
|
|
118
118
|
href: j,
|
|
119
119
|
target: "_blank",
|
|
120
120
|
rel: "noopener noreferrer",
|
|
121
121
|
className: "inline-flex items-center gap-1 text-text-primary underline-offset-2 hover:underline",
|
|
122
|
-
children: [/* @__PURE__ */ i(
|
|
122
|
+
children: [/* @__PURE__ */ i(s, {
|
|
123
123
|
className: "size-3.5",
|
|
124
124
|
"aria-hidden": "true"
|
|
125
125
|
}), "Download"]
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { CosAnalysis, CosCollection, CosDataset, CosNotebook, CosPipeline, CosPipelineRun, CosRelease, CosSource } from '../api/cosmicApi';
|
|
2
|
+
|
|
3
|
+
export type LineageNodeType = 'source' | 'collection' | 'dataset' | 'run' | 'notebook' | 'analysis' | 'release';
|
|
4
|
+
export interface LineageNode {
|
|
5
|
+
/** Stable, unique within a model (e.g. `ds:<uuid>`). */
|
|
6
|
+
id: string;
|
|
7
|
+
type: LineageNodeType;
|
|
8
|
+
title: string;
|
|
9
|
+
/** Overrides the default type label (e.g. "Pipeline Run #340"). */
|
|
10
|
+
typeLabel?: string;
|
|
11
|
+
/** Small third line — status, version, DOI hint (hidden in compact mode). */
|
|
12
|
+
subtitle?: string;
|
|
13
|
+
/** basePath-relative route; when set (and `onNavigate` given) the node is clickable. */
|
|
14
|
+
route?: string;
|
|
15
|
+
/** Semantic column / layer index, 0 = leftmost (upstream). */
|
|
16
|
+
column: number;
|
|
17
|
+
/** Highlight the graph root (the entity the lineage was requested for). */
|
|
18
|
+
emphasis?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface LineageEdge {
|
|
21
|
+
from: string;
|
|
22
|
+
to: string;
|
|
23
|
+
}
|
|
24
|
+
export interface LineageModel {
|
|
25
|
+
nodes: LineageNode[];
|
|
26
|
+
edges: LineageEdge[];
|
|
27
|
+
}
|
|
28
|
+
/** Data pools the builders read from — resolved maps + already-filtered lists. */
|
|
29
|
+
export interface LineageDataPools {
|
|
30
|
+
datasetsById: Map<string, CosDataset>;
|
|
31
|
+
sourcesById: Map<string, CosSource>;
|
|
32
|
+
collectionsById: Map<string, CosCollection>;
|
|
33
|
+
runs: CosPipelineRun[];
|
|
34
|
+
notebooks: CosNotebook[];
|
|
35
|
+
analyses: CosAnalysis[];
|
|
36
|
+
releases: CosRelease[];
|
|
37
|
+
pipelinesById?: Map<string, CosPipeline>;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Provenance for a single dataset: its upstream (source + collection) and its
|
|
41
|
+
* full downstream fan (runs, notebooks, analyses, releases). The dataset is the
|
|
42
|
+
* emphasised root.
|
|
43
|
+
*/
|
|
44
|
+
export declare function buildDatasetLineage(datasetId: string, pools: LineageDataPools): LineageModel;
|
|
45
|
+
/**
|
|
46
|
+
* Provenance for a release: the release plus its input datasets and notebook,
|
|
47
|
+
* each expanded UPSTREAM (source/collection for datasets; the notebook's own
|
|
48
|
+
* datasets). The release is the emphasised root.
|
|
49
|
+
*/
|
|
50
|
+
export declare function buildReleaseLineage(releaseId: string, pools: LineageDataPools): LineageModel;
|
|
51
|
+
export interface LineageGraphProps {
|
|
52
|
+
model: LineageModel;
|
|
53
|
+
mode?: 'full' | 'compact';
|
|
54
|
+
onNavigate?: (route: string) => void;
|
|
55
|
+
className?: string;
|
|
56
|
+
}
|
|
57
|
+
export declare function LineageGraph({ model, mode, onNavigate, className }: LineageGraphProps): import("react/jsx-runtime").JSX.Element | null;
|
|
58
|
+
export default LineageGraph;
|
|
59
|
+
//# sourceMappingURL=LineageGraph.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LineageGraph.d.ts","sourceRoot":"","sources":["../../../src/cosmicintersection/components/LineageGraph.tsx"],"names":[],"mappings":"AA8BA,OAAO,KAAK,EACV,WAAW,EACX,aAAa,EACb,UAAU,EACV,WAAW,EACX,WAAW,EACX,cAAc,EACd,UAAU,EACV,SAAS,EACV,MAAM,kBAAkB,CAAC;AAO1B,MAAM,MAAM,eAAe,GACvB,QAAQ,GACR,YAAY,GACZ,SAAS,GACT,KAAK,GACL,UAAU,GACV,UAAU,GACV,SAAS,CAAC;AAEd,MAAM,WAAW,WAAW;IAC1B,wDAAwD;IACxD,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,eAAe,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,mEAAmE;IACnE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wFAAwF;IACxF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8DAA8D;IAC9D,MAAM,EAAE,MAAM,CAAC;IACf,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,KAAK,EAAE,WAAW,EAAE,CAAC;CACtB;AAED,kFAAkF;AAClF,MAAM,WAAW,gBAAgB;IAC/B,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACtC,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACpC,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IAC5C,IAAI,EAAE,cAAc,EAAE,CAAC;IACvB,SAAS,EAAE,WAAW,EAAE,CAAC;IACzB,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,QAAQ,EAAE,UAAU,EAAE,CAAC;IACvB,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;CAC1C;AA+MD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,gBAAgB,GAAG,YAAY,CAS5F;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,gBAAgB,GAAG,YAAY,CAyC5F;AAsJD,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,YAAY,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,IAAa,EAAE,UAAU,EAAE,SAAS,EAAE,EAAE,iBAAiB,kDAsL9F;AAED,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,388 @@
|
|
|
1
|
+
import { cn as e } from "../utils/cn.js";
|
|
2
|
+
import { useId as t, useMemo as n } from "react";
|
|
3
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
|
+
import { Boxes as a, Cog as o, Database as s, LineChart as c, NotebookText as l, Radar as u, Tag as d } from "lucide-react";
|
|
5
|
+
//#region src/cosmicintersection/components/LineageGraph.tsx
|
|
6
|
+
var f = {
|
|
7
|
+
source: 0,
|
|
8
|
+
collection: 0,
|
|
9
|
+
dataset: 1,
|
|
10
|
+
run: 2,
|
|
11
|
+
notebook: 3,
|
|
12
|
+
analysis: 4,
|
|
13
|
+
release: 5
|
|
14
|
+
};
|
|
15
|
+
function p(e) {
|
|
16
|
+
let t = e.replace(/_/g, " ").toLowerCase();
|
|
17
|
+
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
18
|
+
}
|
|
19
|
+
var m = class {
|
|
20
|
+
nodes = /* @__PURE__ */ new Map();
|
|
21
|
+
edgeKeys = /* @__PURE__ */ new Set();
|
|
22
|
+
edges = [];
|
|
23
|
+
addNode(e) {
|
|
24
|
+
let t = this.nodes.get(e.id);
|
|
25
|
+
if (!t) {
|
|
26
|
+
this.nodes.set(e.id, e);
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
e.emphasis && !t.emphasis && this.nodes.set(e.id, {
|
|
30
|
+
...t,
|
|
31
|
+
emphasis: !0
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
link(e, t) {
|
|
35
|
+
if (e === t || !this.nodes.has(e) || !this.nodes.has(t)) return;
|
|
36
|
+
let n = `${e}»${t}`;
|
|
37
|
+
this.edgeKeys.has(n) || (this.edgeKeys.add(n), this.edges.push({
|
|
38
|
+
from: e,
|
|
39
|
+
to: t
|
|
40
|
+
}));
|
|
41
|
+
}
|
|
42
|
+
has(e) {
|
|
43
|
+
return this.nodes.has(e);
|
|
44
|
+
}
|
|
45
|
+
build() {
|
|
46
|
+
return {
|
|
47
|
+
nodes: [...this.nodes.values()],
|
|
48
|
+
edges: this.edges
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
}, h = {
|
|
52
|
+
source: (e) => `src:${e}`,
|
|
53
|
+
collection: (e) => `col:${e}`,
|
|
54
|
+
dataset: (e) => `ds:${e}`,
|
|
55
|
+
run: (e) => `run:${e}`,
|
|
56
|
+
notebook: (e) => `nb:${e}`,
|
|
57
|
+
analysis: (e) => `an:${e}`,
|
|
58
|
+
release: (e) => `rel:${e}`
|
|
59
|
+
};
|
|
60
|
+
function g(e, t, n, r) {
|
|
61
|
+
if (e.addNode({
|
|
62
|
+
id: h.dataset(t.id),
|
|
63
|
+
type: "dataset",
|
|
64
|
+
title: t.name,
|
|
65
|
+
subtitle: p(t.status),
|
|
66
|
+
route: `datasets/${t.id}`,
|
|
67
|
+
column: f.dataset,
|
|
68
|
+
emphasis: r
|
|
69
|
+
}), t.sourceId) {
|
|
70
|
+
let r = n.sourcesById.get(t.sourceId);
|
|
71
|
+
e.addNode({
|
|
72
|
+
id: h.source(t.sourceId),
|
|
73
|
+
type: "source",
|
|
74
|
+
title: r?.name ?? "Linked source",
|
|
75
|
+
subtitle: r ? p(r.type) : void 0,
|
|
76
|
+
route: `sources/${t.sourceId}`,
|
|
77
|
+
column: f.source
|
|
78
|
+
}), e.link(h.source(t.sourceId), h.dataset(t.id));
|
|
79
|
+
}
|
|
80
|
+
if (t.collectionId) {
|
|
81
|
+
let r = n.collectionsById.get(t.collectionId);
|
|
82
|
+
e.addNode({
|
|
83
|
+
id: h.collection(t.collectionId),
|
|
84
|
+
type: "collection",
|
|
85
|
+
title: r?.name ?? "Collection",
|
|
86
|
+
route: `collections/${t.collectionId}`,
|
|
87
|
+
column: f.collection
|
|
88
|
+
}), e.link(h.collection(t.collectionId), h.dataset(t.id));
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
function _(e, t, n) {
|
|
92
|
+
let r = h.dataset(t.id);
|
|
93
|
+
for (let i of n.runs) {
|
|
94
|
+
if (i.datasetId !== t.id) continue;
|
|
95
|
+
let a = i.pipelineId ? n.pipelinesById?.get(i.pipelineId)?.name : void 0;
|
|
96
|
+
e.addNode({
|
|
97
|
+
id: h.run(i.id),
|
|
98
|
+
type: "run",
|
|
99
|
+
typeLabel: `Pipeline Run #${i.runNumber}`,
|
|
100
|
+
title: a ?? `Run #${i.runNumber}`,
|
|
101
|
+
subtitle: p(i.status),
|
|
102
|
+
route: `runs/${i.id}`,
|
|
103
|
+
column: f.run
|
|
104
|
+
}), e.link(r, h.run(i.id));
|
|
105
|
+
}
|
|
106
|
+
for (let i of n.notebooks) i.datasetIds.includes(t.id) && (e.addNode({
|
|
107
|
+
id: h.notebook(i.id),
|
|
108
|
+
type: "notebook",
|
|
109
|
+
title: i.title,
|
|
110
|
+
subtitle: p(i.status),
|
|
111
|
+
route: `notebooks/${i.id}`,
|
|
112
|
+
column: f.notebook
|
|
113
|
+
}), e.link(r, h.notebook(i.id)));
|
|
114
|
+
for (let i of n.analyses) {
|
|
115
|
+
let n = i.notebookId != null && e.has(h.notebook(i.notebookId));
|
|
116
|
+
i.datasetId !== t.id && !n || (e.addNode({
|
|
117
|
+
id: h.analysis(i.id),
|
|
118
|
+
type: "analysis",
|
|
119
|
+
title: i.title,
|
|
120
|
+
subtitle: p(i.status),
|
|
121
|
+
route: "analyses",
|
|
122
|
+
column: f.analysis
|
|
123
|
+
}), n && i.notebookId != null ? e.link(h.notebook(i.notebookId), h.analysis(i.id)) : e.link(r, h.analysis(i.id)));
|
|
124
|
+
}
|
|
125
|
+
for (let i of n.releases) i.datasetIds.includes(t.id) && (v(e, i), e.link(r, h.release(i.id)), i.notebookId != null && e.has(h.notebook(i.notebookId)) && e.link(h.notebook(i.notebookId), h.release(i.id)));
|
|
126
|
+
}
|
|
127
|
+
function v(e, t, n = !1) {
|
|
128
|
+
let r = t.doi ? " · DOI" : "";
|
|
129
|
+
e.addNode({
|
|
130
|
+
id: h.release(t.id),
|
|
131
|
+
type: "release",
|
|
132
|
+
title: t.title,
|
|
133
|
+
subtitle: `v${t.version}${r}`,
|
|
134
|
+
route: "releases",
|
|
135
|
+
column: f.release,
|
|
136
|
+
emphasis: n
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
function y(e, t) {
|
|
140
|
+
let n = new m(), r = t.datasetsById.get(e);
|
|
141
|
+
return r ? (g(n, r, t, !0), _(n, r, t), n.build()) : n.build();
|
|
142
|
+
}
|
|
143
|
+
function b(e, t) {
|
|
144
|
+
let n = new m(), r = t.releases.find((t) => t.id === e);
|
|
145
|
+
if (!r) return n.build();
|
|
146
|
+
v(n, r, !0);
|
|
147
|
+
for (let e of r.datasetIds) {
|
|
148
|
+
let i = t.datasetsById.get(e);
|
|
149
|
+
i && (g(n, i, t, !1), n.link(h.dataset(i.id), h.release(r.id)));
|
|
150
|
+
}
|
|
151
|
+
if (r.notebookId != null) {
|
|
152
|
+
let e = t.notebooks.find((e) => e.id === r.notebookId);
|
|
153
|
+
n.addNode({
|
|
154
|
+
id: h.notebook(r.notebookId),
|
|
155
|
+
type: "notebook",
|
|
156
|
+
title: e?.title ?? "Notebook",
|
|
157
|
+
subtitle: e ? p(e.status) : void 0,
|
|
158
|
+
route: `notebooks/${r.notebookId}`,
|
|
159
|
+
column: f.notebook
|
|
160
|
+
}), n.link(h.notebook(r.notebookId), h.release(r.id));
|
|
161
|
+
for (let i of e?.datasetIds ?? []) {
|
|
162
|
+
let e = t.datasetsById.get(i);
|
|
163
|
+
e && (g(n, e, t, !1), n.link(h.dataset(e.id), h.notebook(r.notebookId)));
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
return n.build();
|
|
167
|
+
}
|
|
168
|
+
var x = {
|
|
169
|
+
source: {
|
|
170
|
+
label: "Source",
|
|
171
|
+
Icon: u,
|
|
172
|
+
chip: "bg-accent-blue-subtle text-accent-blue",
|
|
173
|
+
border: "border-accent-blue"
|
|
174
|
+
},
|
|
175
|
+
collection: {
|
|
176
|
+
label: "Collection",
|
|
177
|
+
Icon: a,
|
|
178
|
+
chip: "bg-accent-teal-subtle text-accent-teal",
|
|
179
|
+
border: "border-accent-teal"
|
|
180
|
+
},
|
|
181
|
+
dataset: {
|
|
182
|
+
label: "Dataset",
|
|
183
|
+
Icon: s,
|
|
184
|
+
chip: "bg-accent-indigo-subtle text-accent-indigo",
|
|
185
|
+
border: "border-accent-indigo"
|
|
186
|
+
},
|
|
187
|
+
run: {
|
|
188
|
+
label: "Pipeline Run",
|
|
189
|
+
Icon: o,
|
|
190
|
+
chip: "bg-accent-purple-subtle text-accent-purple",
|
|
191
|
+
border: "border-accent-purple"
|
|
192
|
+
},
|
|
193
|
+
notebook: {
|
|
194
|
+
label: "Notebook",
|
|
195
|
+
Icon: l,
|
|
196
|
+
chip: "bg-accent-teal-subtle text-accent-teal",
|
|
197
|
+
border: "border-accent-teal"
|
|
198
|
+
},
|
|
199
|
+
analysis: {
|
|
200
|
+
label: "Analysis",
|
|
201
|
+
Icon: c,
|
|
202
|
+
chip: "bg-accent-purple-subtle text-accent-purple",
|
|
203
|
+
border: "border-accent-purple"
|
|
204
|
+
},
|
|
205
|
+
release: {
|
|
206
|
+
label: "Release",
|
|
207
|
+
Icon: d,
|
|
208
|
+
chip: "bg-status-success-bg-subtle text-status-success-text",
|
|
209
|
+
border: "border-status-success-border"
|
|
210
|
+
}
|
|
211
|
+
}, S = {
|
|
212
|
+
full: {
|
|
213
|
+
nodeW: 190,
|
|
214
|
+
nodeH: 78,
|
|
215
|
+
colGap: 74,
|
|
216
|
+
rowGap: 30,
|
|
217
|
+
pad: 32,
|
|
218
|
+
iconSize: "size-8",
|
|
219
|
+
showSubtitle: !0
|
|
220
|
+
},
|
|
221
|
+
compact: {
|
|
222
|
+
nodeW: 150,
|
|
223
|
+
nodeH: 54,
|
|
224
|
+
colGap: 46,
|
|
225
|
+
rowGap: 18,
|
|
226
|
+
pad: 18,
|
|
227
|
+
iconSize: "size-6",
|
|
228
|
+
showSubtitle: !1
|
|
229
|
+
}
|
|
230
|
+
};
|
|
231
|
+
function C(e, t) {
|
|
232
|
+
let n = /* @__PURE__ */ new Map();
|
|
233
|
+
if (e.nodes.length === 0) return {
|
|
234
|
+
positions: n,
|
|
235
|
+
width: t.pad * 2,
|
|
236
|
+
height: t.pad * 2
|
|
237
|
+
};
|
|
238
|
+
let r = [...new Set(e.nodes.map((e) => e.column))].sort((e, t) => e - t), i = new Map(r.map((e, t) => [e, t])), a = /* @__PURE__ */ new Map();
|
|
239
|
+
for (let t of e.nodes) {
|
|
240
|
+
let e = a.get(t.column);
|
|
241
|
+
e ? e.push(t) : a.set(t.column, [t]);
|
|
242
|
+
}
|
|
243
|
+
let o = t.nodeH;
|
|
244
|
+
for (let e of a.values()) {
|
|
245
|
+
let n = e.length * t.nodeH + (e.length - 1) * t.rowGap;
|
|
246
|
+
o = Math.max(o, n);
|
|
247
|
+
}
|
|
248
|
+
for (let e of r) {
|
|
249
|
+
let r = a.get(e) ?? [], s = r.length * t.nodeH + (r.length - 1) * t.rowGap, c = t.pad + (o - s) / 2, l = t.pad + (i.get(e) ?? 0) * (t.nodeW + t.colGap);
|
|
250
|
+
r.forEach((e, r) => {
|
|
251
|
+
n.set(e.id, {
|
|
252
|
+
node: e,
|
|
253
|
+
x: l,
|
|
254
|
+
y: c + r * (t.nodeH + t.rowGap)
|
|
255
|
+
});
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
return {
|
|
259
|
+
positions: n,
|
|
260
|
+
width: t.pad * 2 + r.length * t.nodeW + (r.length - 1) * t.colGap,
|
|
261
|
+
height: t.pad * 2 + o
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
function w(e, t, n, r) {
|
|
265
|
+
let i = Math.max(24, (n - e) * .5);
|
|
266
|
+
return `M ${e} ${t} C ${e + i} ${t}, ${n - i} ${r}, ${n} ${r}`;
|
|
267
|
+
}
|
|
268
|
+
function T({ model: a, mode: o = "full", onNavigate: s, className: c }) {
|
|
269
|
+
let l = `cos-lineage-arrow-${t().replace(/:/g, "")}`, u = S[o], d = n(() => C(a, u), [a, u]), f = n(() => {
|
|
270
|
+
let e = /* @__PURE__ */ new Set(), t = [];
|
|
271
|
+
for (let n of [...a.nodes].sort((e, t) => e.column - t.column)) e.has(n.type) || (e.add(n.type), t.push(n.type));
|
|
272
|
+
return t;
|
|
273
|
+
}, [a.nodes]);
|
|
274
|
+
return a.nodes.length === 0 ? null : /* @__PURE__ */ i("div", {
|
|
275
|
+
className: e("flex flex-col gap-3", c),
|
|
276
|
+
children: [o === "full" && f.length > 0 ? /* @__PURE__ */ r("div", {
|
|
277
|
+
className: "flex flex-wrap items-center gap-x-4 gap-y-2",
|
|
278
|
+
children: f.map((t) => {
|
|
279
|
+
let n = x[t];
|
|
280
|
+
return /* @__PURE__ */ i("span", {
|
|
281
|
+
className: "inline-flex items-center gap-1.5 text-xs text-text-secondary",
|
|
282
|
+
children: [/* @__PURE__ */ r("span", {
|
|
283
|
+
className: e("flex size-5 items-center justify-center rounded-button", n.chip),
|
|
284
|
+
children: /* @__PURE__ */ r(n.Icon, {
|
|
285
|
+
className: "size-3",
|
|
286
|
+
"aria-hidden": "true"
|
|
287
|
+
})
|
|
288
|
+
}), n.label]
|
|
289
|
+
}, t);
|
|
290
|
+
})
|
|
291
|
+
}) : null, /* @__PURE__ */ r("div", {
|
|
292
|
+
className: e("overflow-x-auto rounded-card border border-border-seam bg-bg-canvas", o === "full" ? "p-1" : "p-0.5"),
|
|
293
|
+
children: /* @__PURE__ */ i("div", {
|
|
294
|
+
className: "relative",
|
|
295
|
+
style: {
|
|
296
|
+
width: d.width,
|
|
297
|
+
height: d.height,
|
|
298
|
+
minWidth: "100%",
|
|
299
|
+
backgroundImage: "radial-gradient(var(--color-border-subtle) 1px, transparent 1px)",
|
|
300
|
+
backgroundSize: o === "full" ? "20px 20px" : "16px 16px"
|
|
301
|
+
},
|
|
302
|
+
children: [/* @__PURE__ */ i("svg", {
|
|
303
|
+
className: "pointer-events-none absolute inset-0 text-border-strong",
|
|
304
|
+
width: d.width,
|
|
305
|
+
height: d.height,
|
|
306
|
+
viewBox: `0 0 ${d.width} ${d.height}`,
|
|
307
|
+
"aria-hidden": "true",
|
|
308
|
+
children: [/* @__PURE__ */ r("defs", { children: /* @__PURE__ */ r("marker", {
|
|
309
|
+
id: l,
|
|
310
|
+
viewBox: "0 0 8 8",
|
|
311
|
+
refX: "6.5",
|
|
312
|
+
refY: "4",
|
|
313
|
+
markerWidth: "6",
|
|
314
|
+
markerHeight: "6",
|
|
315
|
+
orient: "auto-start-reverse",
|
|
316
|
+
children: /* @__PURE__ */ r("path", {
|
|
317
|
+
d: "M1 1 L7 4 L1 7 z",
|
|
318
|
+
fill: "currentColor"
|
|
319
|
+
})
|
|
320
|
+
}) }), a.edges.map((e) => {
|
|
321
|
+
let t = d.positions.get(e.from), n = d.positions.get(e.to);
|
|
322
|
+
if (!t || !n) return null;
|
|
323
|
+
let i = t.x + u.nodeW, a = t.y + u.nodeH / 2, s = n.x;
|
|
324
|
+
return /* @__PURE__ */ r("path", {
|
|
325
|
+
d: w(i, a, s, n.y + u.nodeH / 2),
|
|
326
|
+
fill: "none",
|
|
327
|
+
stroke: "currentColor",
|
|
328
|
+
strokeWidth: o === "full" ? 1.5 : 1.25,
|
|
329
|
+
strokeLinecap: "round",
|
|
330
|
+
markerEnd: `url(#${l})`,
|
|
331
|
+
opacity: .7
|
|
332
|
+
}, `${e.from}»${e.to}`);
|
|
333
|
+
})]
|
|
334
|
+
}), [...d.positions.values()].map(({ node: t, x: n, y: a }) => {
|
|
335
|
+
let c = x[t.type], l = !!(t.route && s), d = /* @__PURE__ */ i("div", {
|
|
336
|
+
className: e("flex h-full w-full items-center gap-2.5 rounded-card border bg-bg-elevated px-3 shadow-sm transition-shadow", c.border, l && "group-hover:shadow-md", t.emphasis && "ring-1 ring-border-strong"),
|
|
337
|
+
children: [/* @__PURE__ */ r("span", {
|
|
338
|
+
className: e("flex shrink-0 items-center justify-center rounded-button", u.iconSize, c.chip),
|
|
339
|
+
"aria-hidden": "true",
|
|
340
|
+
children: /* @__PURE__ */ r(c.Icon, { className: o === "full" ? "size-4" : "size-3.5" })
|
|
341
|
+
}), /* @__PURE__ */ i("span", {
|
|
342
|
+
className: "flex min-w-0 flex-1 flex-col text-left",
|
|
343
|
+
children: [
|
|
344
|
+
/* @__PURE__ */ r("span", {
|
|
345
|
+
className: "truncate text-[10px] font-medium uppercase tracking-wide text-text-tertiary",
|
|
346
|
+
children: t.typeLabel ?? c.label
|
|
347
|
+
}),
|
|
348
|
+
/* @__PURE__ */ r("span", {
|
|
349
|
+
className: e("truncate font-semibold text-text-primary", o === "full" ? "text-sm" : "text-xs"),
|
|
350
|
+
children: t.title
|
|
351
|
+
}),
|
|
352
|
+
u.showSubtitle && t.subtitle ? /* @__PURE__ */ r("span", {
|
|
353
|
+
className: "truncate text-[11px] text-text-secondary",
|
|
354
|
+
children: t.subtitle
|
|
355
|
+
}) : null
|
|
356
|
+
]
|
|
357
|
+
})]
|
|
358
|
+
}), f = {
|
|
359
|
+
left: n,
|
|
360
|
+
top: a,
|
|
361
|
+
width: u.nodeW,
|
|
362
|
+
height: u.nodeH
|
|
363
|
+
};
|
|
364
|
+
if (l && t.route) {
|
|
365
|
+
let e = t.route;
|
|
366
|
+
return /* @__PURE__ */ r("button", {
|
|
367
|
+
type: "button",
|
|
368
|
+
onClick: () => s?.(e),
|
|
369
|
+
className: "group absolute rounded-card focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
|
|
370
|
+
style: f,
|
|
371
|
+
title: `${t.typeLabel ?? c.label}: ${t.title}`,
|
|
372
|
+
children: d
|
|
373
|
+
}, t.id);
|
|
374
|
+
}
|
|
375
|
+
return /* @__PURE__ */ r("div", {
|
|
376
|
+
className: "absolute",
|
|
377
|
+
style: f,
|
|
378
|
+
children: d
|
|
379
|
+
}, t.id);
|
|
380
|
+
})]
|
|
381
|
+
})
|
|
382
|
+
})]
|
|
383
|
+
});
|
|
384
|
+
}
|
|
385
|
+
//#endregion
|
|
386
|
+
export { y as buildDatasetLineage, b as buildReleaseLineage, T as default };
|
|
387
|
+
|
|
388
|
+
//# sourceMappingURL=LineageGraph.js.map
|