@burdenoff/microfe-cosmicintersection 2026.830.2 → 2026.1030.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/CosmicIntersectionRoutes.d.ts +1 -1
- package/dist/cosmicintersection/CosmicIntersectionRoutes.d.ts.map +1 -1
- package/dist/cosmicintersection/api/cosmicApi.d.ts +48 -48
- package/dist/cosmicintersection/api/cosmicApi.d.ts.map +1 -1
- package/dist/cosmicintersection/components/ActionMenu.d.ts +1 -1
- package/dist/cosmicintersection/components/ActionMenu.d.ts.map +1 -1
- package/dist/cosmicintersection/components/ActivityFeedPanel.d.ts +1 -1
- package/dist/cosmicintersection/components/ActivityFeedPanel.d.ts.map +1 -1
- package/dist/cosmicintersection/components/DiscussionPanel.d.ts +1 -1
- package/dist/cosmicintersection/components/DiscussionPanel.d.ts.map +1 -1
- package/dist/cosmicintersection/components/EmptyState.d.ts +1 -1
- package/dist/cosmicintersection/components/EmptyState.d.ts.map +1 -1
- package/dist/cosmicintersection/components/EntityFormShell.d.ts +1 -1
- package/dist/cosmicintersection/components/EntityFormShell.d.ts.map +1 -1
- package/dist/cosmicintersection/components/EntityTagsField.d.ts +1 -1
- package/dist/cosmicintersection/components/EntityTagsField.d.ts.map +1 -1
- package/dist/cosmicintersection/components/ErrorState.d.ts +1 -1
- package/dist/cosmicintersection/components/ErrorState.d.ts.map +1 -1
- package/dist/cosmicintersection/components/FacetPanel.d.ts +1 -1
- package/dist/cosmicintersection/components/FacetPanel.d.ts.map +1 -1
- package/dist/cosmicintersection/components/FileUploadField.d.ts +2 -2
- package/dist/cosmicintersection/components/FileUploadField.d.ts.map +1 -1
- package/dist/cosmicintersection/components/FileUploadField.js +1 -0
- package/dist/cosmicintersection/components/FileUploadField.js.map +1 -1
- package/dist/cosmicintersection/components/LineageGraph.d.ts +1 -1
- package/dist/cosmicintersection/components/LineageGraph.d.ts.map +1 -1
- package/dist/cosmicintersection/components/LoadingState.d.ts +1 -1
- package/dist/cosmicintersection/components/LoadingState.d.ts.map +1 -1
- package/dist/cosmicintersection/components/PageLayout.d.ts +1 -1
- package/dist/cosmicintersection/components/PageLayout.d.ts.map +1 -1
- package/dist/cosmicintersection/components/Pagination.d.ts +1 -1
- package/dist/cosmicintersection/components/Pagination.d.ts.map +1 -1
- package/dist/cosmicintersection/components/ResultsChart.d.ts +1 -1
- package/dist/cosmicintersection/components/ResultsChart.d.ts.map +1 -1
- package/dist/cosmicintersection/components/SafeLink.d.ts +1 -1
- package/dist/cosmicintersection/components/SafeLink.d.ts.map +1 -1
- package/dist/cosmicintersection/components/StatusBadge.d.ts +1 -1
- package/dist/cosmicintersection/components/StatusBadge.d.ts.map +1 -1
- package/dist/cosmicintersection/components/StepDAG.d.ts +1 -1
- package/dist/cosmicintersection/components/StepDAG.d.ts.map +1 -1
- package/dist/cosmicintersection/context/CosmicIntersectionContext.d.ts +1 -1
- package/dist/cosmicintersection/context/CosmicIntersectionContext.d.ts.map +1 -1
- package/dist/cosmicintersection/lib/useSelectedRecord.d.ts +20 -0
- package/dist/cosmicintersection/lib/useSelectedRecord.d.ts.map +1 -0
- package/dist/cosmicintersection/lib/useSelectedRecord.js +19 -0
- package/dist/cosmicintersection/lib/useSelectedRecord.js.map +1 -0
- package/dist/cosmicintersection/pages/access/AccessPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/access/AccessPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/access/AccessPage.js +239 -226
- package/dist/cosmicintersection/pages/access/AccessPage.js.map +1 -1
- package/dist/cosmicintersection/pages/analyses/AnalysesPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/analyses/AnalysesPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/analyses/AnalysesPage.js +196 -195
- package/dist/cosmicintersection/pages/analyses/AnalysesPage.js.map +1 -1
- package/dist/cosmicintersection/pages/collections/CollectionDetailPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/collections/CollectionDetailPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/collections/CollectionFormPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/collections/CollectionFormPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/collections/CollectionsPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/collections/CollectionsPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/dashboard/DashboardPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/dashboard/DashboardPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.js +188 -175
- package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.js.map +1 -1
- package/dist/cosmicintersection/pages/datasets/DatasetFormPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/datasets/DatasetFormPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/datasets/DatasetsPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/datasets/DatasetsPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/discovery/DiscoveryPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/discovery/DiscoveryPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/lineage/LineagePage.d.ts +1 -1
- package/dist/cosmicintersection/pages/lineage/LineagePage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/notebooks/NotebookDetailPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/notebooks/NotebookDetailPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/notebooks/NotebookFormPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/notebooks/NotebookFormPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/notebooks/NotebooksPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/notebooks/NotebooksPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/pipelines/PipelineDetailPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/pipelines/PipelineDetailPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/pipelines/PipelineFormPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/pipelines/PipelineFormPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/pipelines/PipelinesPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/pipelines/PipelinesPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/releases/ReleaseFormPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/releases/ReleaseFormPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/releases/ReleasesPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/releases/ReleasesPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/releases/ReleasesPage.js +202 -201
- package/dist/cosmicintersection/pages/releases/ReleasesPage.js.map +1 -1
- package/dist/cosmicintersection/pages/runs/RunDetailPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/runs/RunDetailPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/runs/RunsPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/runs/RunsPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/sources/SourceDetailPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/sources/SourceDetailPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/sources/SourceFormPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/sources/SourceFormPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/sources/SourcesPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/sources/SourcesPage.d.ts.map +1 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +96 -17
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -1
- package/dist/utils/pageContext.d.ts +33 -7
- package/dist/utils/pageContext.d.ts.map +1 -1
- package/dist/utils/pageContext.js +75 -33
- package/dist/utils/pageContext.js.map +1 -1
- package/package.json +6 -6
|
@@ -3,26 +3,52 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Captures the user's current browser context (route, entity, viewport) to be
|
|
5
5
|
* sent alongside every assistant prompt so the agent can reason about "this
|
|
6
|
-
* dataset", "
|
|
6
|
+
* dataset", "this run", "this grant", "this column" without asking which one.
|
|
7
|
+
*
|
|
8
|
+
* The entity types below are part of a contract with the assistant's
|
|
9
|
+
* CosmicIntersection guide (`algoshred/ai-assistant`
|
|
10
|
+
* `context/api-calls/products/cosmicintersection.md`, "Page context"), which
|
|
11
|
+
* names the read for each one. Add a type here and there together.
|
|
12
|
+
*
|
|
13
|
+
* Routes come from `src/cosmicintersection/CosmicIntersectionRoutes.tsx`,
|
|
14
|
+
* mounted at `/cosmicintersection/*` by cosmicintersection-app. Records that
|
|
15
|
+
* have no detail route of their own (releases, analyses, access grants, a
|
|
16
|
+
* dataset's schema fields) are focused through a search parameter that the
|
|
17
|
+
* page keeps in sync (`src/cosmicintersection/lib/useSelectedRecord.ts`).
|
|
7
18
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
19
|
+
export declare const COSMIC_ENTITY_TYPES: readonly ["COSMIC_DATASET", "COSMIC_SCHEMA_FIELD", "COSMIC_SOURCE", "COSMIC_COLLECTION", "COSMIC_PIPELINE", "COSMIC_RUN", "COSMIC_NOTEBOOK", "COSMIC_ANALYSIS", "COSMIC_RELEASE", "COSMIC_GRANT"];
|
|
20
|
+
export type CosmicEntityType = (typeof COSMIC_ENTITY_TYPES)[number];
|
|
21
|
+
export interface ConversationContextShape {
|
|
22
|
+
entityType?: CosmicEntityType;
|
|
10
23
|
entityId?: string;
|
|
11
24
|
activeTab?: string;
|
|
12
|
-
|
|
25
|
+
/** Route pattern with ids replaced by `:param`, e.g. `cosmicintersection/runs/:id`. */
|
|
26
|
+
routePattern: string;
|
|
13
27
|
}
|
|
14
|
-
|
|
28
|
+
/**
|
|
29
|
+
* A `type` alias, not an `interface`: fe-libs' `PageContext` carries an index
|
|
30
|
+
* signature, which TypeScript grants a type alias implicitly and an interface
|
|
31
|
+
* never, so an interface here would not be assignable to the transport seam.
|
|
32
|
+
*/
|
|
33
|
+
export type PageContext = {
|
|
15
34
|
currentUrl: string;
|
|
16
35
|
currentPage: string;
|
|
17
36
|
entityType?: string;
|
|
18
37
|
entityId?: string;
|
|
38
|
+
activeTab?: string;
|
|
19
39
|
platform: string;
|
|
20
40
|
version: string;
|
|
21
41
|
viewportSize: string;
|
|
22
42
|
userAgent: string;
|
|
23
43
|
timestamp: string;
|
|
24
|
-
}
|
|
44
|
+
};
|
|
25
45
|
export declare function gatherPageContext(): PageContext;
|
|
46
|
+
/**
|
|
47
|
+
* Resolve the record the user is looking at from the URL.
|
|
48
|
+
*
|
|
49
|
+
* Every detail route (including its `/edit` form) yields an `entityType` and
|
|
50
|
+
* `entityId`; a list page yields only `activeTab` (the section name, or the
|
|
51
|
+
* `?tab=` parameter when a page sets one).
|
|
52
|
+
*/
|
|
26
53
|
export declare function resolveCosmicIntersectionConversationContext(pathname: string, search: string): ConversationContextShape;
|
|
27
|
-
export {};
|
|
28
54
|
//# sourceMappingURL=pageContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pageContext.d.ts","sourceRoot":"","sources":["../../src/utils/pageContext.ts"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"pageContext.d.ts","sourceRoot":"","sources":["../../src/utils/pageContext.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;GAiBG;AAEH,eAAO,MAAM,mBAAmB,mMAWtB,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpE,MAAM,WAAW,wBAAwB;IACvC,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uFAAuF;IACvF,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG;IAExB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AA6BF,wBAAgB,iBAAiB,IAAI,WAAW,CAkB/C;AAED;;;;;;GAMG;AACH,wBAAgB,4CAA4C,CAC1D,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,GACb,wBAAwB,CAgF1B"}
|
|
@@ -1,11 +1,31 @@
|
|
|
1
1
|
//#region src/utils/pageContext.ts
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
var e = "cosmicintersection", t = {
|
|
3
|
+
datasets: "COSMIC_DATASET",
|
|
4
|
+
sources: "COSMIC_SOURCE",
|
|
5
|
+
collections: "COSMIC_COLLECTION",
|
|
6
|
+
pipelines: "COSMIC_PIPELINE",
|
|
7
|
+
runs: "COSMIC_RUN",
|
|
8
|
+
notebooks: "COSMIC_NOTEBOOK"
|
|
9
|
+
}, n = {
|
|
10
|
+
releases: "COSMIC_RELEASE",
|
|
11
|
+
analyses: "COSMIC_ANALYSIS",
|
|
12
|
+
access: "COSMIC_GRANT"
|
|
13
|
+
}, r = new Set([
|
|
14
|
+
"create",
|
|
15
|
+
"edit",
|
|
16
|
+
"new"
|
|
17
|
+
]);
|
|
18
|
+
function i(e) {
|
|
19
|
+
return e?.trim() || void 0;
|
|
20
|
+
}
|
|
21
|
+
function a() {
|
|
22
|
+
let e = o(window.location.pathname, window.location.search);
|
|
4
23
|
return {
|
|
5
|
-
currentUrl:
|
|
6
|
-
currentPage:
|
|
7
|
-
entityType:
|
|
8
|
-
entityId:
|
|
24
|
+
currentUrl: window.location.href,
|
|
25
|
+
currentPage: e.routePattern,
|
|
26
|
+
entityType: e.entityType,
|
|
27
|
+
entityId: e.entityId,
|
|
28
|
+
activeTab: e.activeTab,
|
|
9
29
|
platform: "cosmicintersection",
|
|
10
30
|
version: "2026.709.1",
|
|
11
31
|
viewportSize: `${window.innerWidth}x${window.innerHeight}`,
|
|
@@ -13,38 +33,60 @@ function e() {
|
|
|
13
33
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
14
34
|
};
|
|
15
35
|
}
|
|
16
|
-
function
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
[
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
entityType:
|
|
34
|
-
entityId:
|
|
35
|
-
|
|
36
|
+
function o(a, o) {
|
|
37
|
+
let s = new URLSearchParams(o), c = a.split("/").filter(Boolean).map((e) => decodeURIComponent(e));
|
|
38
|
+
if (c[0] !== e) return { routePattern: c.join("/") || "home" };
|
|
39
|
+
let l = c[1], u = c[2], d = i(s.get("tab"));
|
|
40
|
+
if (!l) return {
|
|
41
|
+
routePattern: e,
|
|
42
|
+
...d ? { activeTab: d } : {}
|
|
43
|
+
};
|
|
44
|
+
let f = t[l];
|
|
45
|
+
if (f && u && !r.has(u)) {
|
|
46
|
+
let t = c[3] === "edit", n = `${e}/${l}/:id${t ? "/edit" : ""}`, r = i(s.get("field"));
|
|
47
|
+
return f === "COSMIC_DATASET" && r && !t ? {
|
|
48
|
+
entityType: "COSMIC_SCHEMA_FIELD",
|
|
49
|
+
entityId: r,
|
|
50
|
+
activeTab: "schema",
|
|
51
|
+
routePattern: n
|
|
52
|
+
} : {
|
|
53
|
+
entityType: f,
|
|
54
|
+
entityId: u,
|
|
55
|
+
...d ? { activeTab: d } : {},
|
|
56
|
+
routePattern: n
|
|
36
57
|
};
|
|
37
58
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
59
|
+
if (l === "lineage" && u) return {
|
|
60
|
+
entityType: "COSMIC_DATASET",
|
|
61
|
+
entityId: u,
|
|
62
|
+
activeTab: "lineage",
|
|
63
|
+
routePattern: `${e}/lineage/:datasetId`
|
|
64
|
+
};
|
|
65
|
+
let p = n[l], m = i(s.get("id"));
|
|
66
|
+
if (p && !u && m) return {
|
|
67
|
+
entityType: p,
|
|
68
|
+
entityId: m,
|
|
69
|
+
activeTab: l,
|
|
70
|
+
routePattern: `${e}/${l}`
|
|
71
|
+
};
|
|
72
|
+
let h = i(s.get("datasetId"));
|
|
73
|
+
if (l === "access" && !u && h) return {
|
|
74
|
+
entityType: "COSMIC_DATASET",
|
|
75
|
+
entityId: h,
|
|
76
|
+
activeTab: "access",
|
|
77
|
+
routePattern: `${e}/access`
|
|
78
|
+
};
|
|
79
|
+
let g = [
|
|
80
|
+
e,
|
|
81
|
+
l,
|
|
82
|
+
...u ? [u] : []
|
|
83
|
+
].join("/");
|
|
42
84
|
return {
|
|
43
|
-
activeTab:
|
|
44
|
-
|
|
85
|
+
activeTab: d ?? u ?? l,
|
|
86
|
+
routePattern: g
|
|
45
87
|
};
|
|
46
88
|
}
|
|
47
89
|
//#endregion
|
|
48
|
-
export {
|
|
90
|
+
export { a as gatherPageContext };
|
|
49
91
|
|
|
50
92
|
//# sourceMappingURL=pageContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pageContext.js","names":[],"sources":["../../src/utils/pageContext.ts"],"sourcesContent":["/// <reference types=\"vite/client\" />\n\n/**\n * Page context gathering for the CosmicIntersection AI assistant.\n *\n * Captures the user's current browser context (route, entity, viewport) to be\n * sent alongside every assistant prompt so the agent can reason about \"this\n * dataset\", \"the
|
|
1
|
+
{"version":3,"file":"pageContext.js","names":[],"sources":["../../src/utils/pageContext.ts"],"sourcesContent":["/// <reference types=\"vite/client\" />\n\n/**\n * Page context gathering for the CosmicIntersection AI assistant.\n *\n * Captures the user's current browser context (route, entity, viewport) to be\n * sent alongside every assistant prompt so the agent can reason about \"this\n * dataset\", \"this run\", \"this grant\", \"this column\" without asking which one.\n *\n * The entity types below are part of a contract with the assistant's\n * CosmicIntersection guide (`algoshred/ai-assistant`\n * `context/api-calls/products/cosmicintersection.md`, \"Page context\"), which\n * names the read for each one. Add a type here and there together.\n *\n * Routes come from `src/cosmicintersection/CosmicIntersectionRoutes.tsx`,\n * mounted at `/cosmicintersection/*` by cosmicintersection-app. Records that\n * have no detail route of their own (releases, analyses, access grants, a\n * dataset's schema fields) are focused through a search parameter that the\n * page keeps in sync (`src/cosmicintersection/lib/useSelectedRecord.ts`).\n */\n\nexport const COSMIC_ENTITY_TYPES = [\n 'COSMIC_DATASET',\n 'COSMIC_SCHEMA_FIELD',\n 'COSMIC_SOURCE',\n 'COSMIC_COLLECTION',\n 'COSMIC_PIPELINE',\n 'COSMIC_RUN',\n 'COSMIC_NOTEBOOK',\n 'COSMIC_ANALYSIS',\n 'COSMIC_RELEASE',\n 'COSMIC_GRANT',\n] as const;\n\nexport type CosmicEntityType = (typeof COSMIC_ENTITY_TYPES)[number];\n\nexport interface ConversationContextShape {\n entityType?: CosmicEntityType;\n entityId?: string;\n activeTab?: string;\n /** Route pattern with ids replaced by `:param`, e.g. `cosmicintersection/runs/:id`. */\n routePattern: string;\n}\n\n/**\n * A `type` alias, not an `interface`: fe-libs' `PageContext` carries an index\n * signature, which TypeScript grants a type alias implicitly and an interface\n * never, so an interface here would not be assignable to the transport seam.\n */\nexport type PageContext = {\n // `currentUrl` (not `activeUrl`) is the key the agent's allow-list forwards.\n currentUrl: string;\n currentPage: string;\n entityType?: string;\n entityId?: string;\n activeTab?: string;\n platform: string;\n version: string;\n viewportSize: string;\n userAgent: string;\n timestamp: string;\n};\n\nconst ROOT = 'cosmicintersection';\n\n/** Path segments under `/cosmicintersection/<section>/:id` that are a detail route. */\nconst DETAIL_SECTIONS: Record<string, CosmicEntityType> = {\n datasets: 'COSMIC_DATASET',\n sources: 'COSMIC_SOURCE',\n collections: 'COSMIC_COLLECTION',\n pipelines: 'COSMIC_PIPELINE',\n runs: 'COSMIC_RUN',\n notebooks: 'COSMIC_NOTEBOOK',\n};\n\n/** List pages whose focused record is the `?id=` search parameter. */\nconst FOCUS_SECTIONS: Record<string, CosmicEntityType> = {\n releases: 'COSMIC_RELEASE',\n analyses: 'COSMIC_ANALYSIS',\n access: 'COSMIC_GRANT',\n};\n\n/** Literal child segments that are pages, never ids (`datasets/create`). */\nconst RESERVED_SEGMENTS = new Set(['create', 'edit', 'new']);\n\nfunction nonEmpty(value: string | null | undefined): string | undefined {\n const trimmed = value?.trim();\n return trimmed ? trimmed : undefined;\n}\n\nexport function gatherPageContext(): PageContext {\n const entity = resolveCosmicIntersectionConversationContext(\n window.location.pathname,\n window.location.search\n );\n\n return {\n currentUrl: window.location.href,\n currentPage: entity.routePattern,\n entityType: entity.entityType,\n entityId: entity.entityId,\n activeTab: entity.activeTab,\n platform: 'cosmicintersection',\n version: import.meta.env.VITE_APP_VERSION ?? '2026.709.1',\n viewportSize: `${window.innerWidth}x${window.innerHeight}`,\n userAgent: navigator.userAgent,\n timestamp: new Date().toISOString(),\n };\n}\n\n/**\n * Resolve the record the user is looking at from the URL.\n *\n * Every detail route (including its `/edit` form) yields an `entityType` and\n * `entityId`; a list page yields only `activeTab` (the section name, or the\n * `?tab=` parameter when a page sets one).\n */\nexport function resolveCosmicIntersectionConversationContext(\n pathname: string,\n search: string\n): ConversationContextShape {\n const params = new URLSearchParams(search);\n const segments = pathname\n .split('/')\n .filter(Boolean)\n .map((segment) => decodeURIComponent(segment));\n\n if (segments[0] !== ROOT) {\n return { routePattern: segments.join('/') || 'home' };\n }\n\n const section = segments[1];\n const child = segments[2];\n const tab = nonEmpty(params.get('tab'));\n\n if (!section) {\n return { routePattern: ROOT, ...(tab ? { activeTab: tab } : {}) };\n }\n\n // Detail routes: /<section>/:id and /<section>/:id/edit.\n const detailType = DETAIL_SECTIONS[section];\n if (detailType && child && !RESERVED_SEGMENTS.has(child)) {\n const isEdit = segments[3] === 'edit';\n const routePattern = `${ROOT}/${section}/:id${isEdit ? '/edit' : ''}`;\n\n // A dataset's schema field the user focused (`?field=<id>`).\n const fieldId = nonEmpty(params.get('field'));\n if (detailType === 'COSMIC_DATASET' && fieldId && !isEdit) {\n return {\n entityType: 'COSMIC_SCHEMA_FIELD',\n entityId: fieldId,\n activeTab: 'schema',\n routePattern,\n };\n }\n\n return {\n entityType: detailType,\n entityId: child,\n ...(tab ? { activeTab: tab } : {}),\n routePattern,\n };\n }\n\n // Lineage of one dataset: /lineage/:datasetId.\n if (section === 'lineage' && child) {\n return {\n entityType: 'COSMIC_DATASET',\n entityId: child,\n activeTab: 'lineage',\n routePattern: `${ROOT}/lineage/:datasetId`,\n };\n }\n\n // List pages that focus a record through `?id=`.\n const focusType = FOCUS_SECTIONS[section];\n const focusedId = nonEmpty(params.get('id'));\n if (focusType && !child && focusedId) {\n return {\n entityType: focusType,\n entityId: focusedId,\n activeTab: section,\n routePattern: `${ROOT}/${section}`,\n };\n }\n\n // The access page filtered to one dataset: that dataset is \"this\".\n const datasetId = nonEmpty(params.get('datasetId'));\n if (section === 'access' && !child && datasetId) {\n return {\n entityType: 'COSMIC_DATASET',\n entityId: datasetId,\n activeTab: 'access',\n routePattern: `${ROOT}/access`,\n };\n }\n\n // List, discovery and create pages: no record, just where the user is.\n const routePattern = [ROOT, section, ...(child ? [child] : [])].join('/');\n return { activeTab: tab ?? child ?? section, routePattern };\n}\n"],"mappings":";AA+DA,IAAM,IAAO,sBAGP,IAAoD;CACxD,UAAU;CACV,SAAS;CACT,aAAa;CACb,WAAW;CACX,MAAM;CACN,WAAW;AACb,GAGM,IAAmD;CACvD,UAAU;CACV,UAAU;CACV,QAAQ;AACV,GAGM,IAAoB,IAAI,IAAI;CAAC;CAAU;CAAQ;AAAK,CAAC;AAE3D,SAAS,EAAS,GAAsD;CAEtE,OADgB,GAAO,KAAK,KACD,KAAA;AAC7B;AAEA,SAAgB,IAAiC;CAC/C,IAAM,IAAS,EACb,OAAO,SAAS,UAChB,OAAO,SAAS,MAClB;CAEA,OAAO;EACL,YAAY,OAAO,SAAS;EAC5B,aAAa,EAAO;EACpB,YAAY,EAAO;EACnB,UAAU,EAAO;EACjB,WAAW,EAAO;EAClB,UAAU;EACV,SAA6C;EAC7C,cAAc,GAAG,OAAO,WAAW,GAAG,OAAO;EAC7C,WAAW,UAAU;EACrB,4BAAW,IAAI,KAAK,GAAE,YAAY;CACpC;AACF;AASA,SAAgB,EACd,GACA,GAC0B;CAC1B,IAAM,IAAS,IAAI,gBAAgB,CAAM,GACnC,IAAW,EACd,MAAM,GAAG,EACT,OAAO,OAAO,EACd,KAAK,MAAY,mBAAmB,CAAO,CAAC;CAE/C,IAAI,EAAS,OAAO,GAClB,OAAO,EAAE,cAAc,EAAS,KAAK,GAAG,KAAK,OAAO;CAGtD,IAAM,IAAU,EAAS,IACnB,IAAQ,EAAS,IACjB,IAAM,EAAS,EAAO,IAAI,KAAK,CAAC;CAEtC,IAAI,CAAC,GACH,OAAO;EAAE,cAAc;EAAM,GAAI,IAAM,EAAE,WAAW,EAAI,IAAI,CAAC;CAAG;CAIlE,IAAM,IAAa,EAAgB;CACnC,IAAI,KAAc,KAAS,CAAC,EAAkB,IAAI,CAAK,GAAG;EACxD,IAAM,IAAS,EAAS,OAAO,QACzB,IAAe,GAAG,EAAK,GAAG,EAAQ,MAAM,IAAS,UAAU,MAG3D,IAAU,EAAS,EAAO,IAAI,OAAO,CAAC;EAU5C,OATI,MAAe,oBAAoB,KAAW,CAAC,IAC1C;GACL,YAAY;GACZ,UAAU;GACV,WAAW;GACX;EACF,IAGK;GACL,YAAY;GACZ,UAAU;GACV,GAAI,IAAM,EAAE,WAAW,EAAI,IAAI,CAAC;GAChC;EACF;CACF;CAGA,IAAI,MAAY,aAAa,GAC3B,OAAO;EACL,YAAY;EACZ,UAAU;EACV,WAAW;EACX,cAAc,GAAG,EAAK;CACxB;CAIF,IAAM,IAAY,EAAe,IAC3B,IAAY,EAAS,EAAO,IAAI,IAAI,CAAC;CAC3C,IAAI,KAAa,CAAC,KAAS,GACzB,OAAO;EACL,YAAY;EACZ,UAAU;EACV,WAAW;EACX,cAAc,GAAG,EAAK,GAAG;CAC3B;CAIF,IAAM,IAAY,EAAS,EAAO,IAAI,WAAW,CAAC;CAClD,IAAI,MAAY,YAAY,CAAC,KAAS,GACpC,OAAO;EACL,YAAY;EACZ,UAAU;EACV,WAAW;EACX,cAAc,GAAG,EAAK;CACxB;CAIF,IAAM,IAAe;EAAC;EAAM;EAAS,GAAI,IAAQ,CAAC,CAAK,IAAI,CAAC;CAAE,EAAE,KAAK,GAAG;CACxE,OAAO;EAAE,WAAW,KAAO,KAAS;EAAS;CAAa;AAC5D"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@burdenoff/microfe-cosmicintersection",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.1030.1",
|
|
4
4
|
"description": "Burdenoff CosmicIntersection Microfrontend",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
"clsx": "^2.1.1",
|
|
52
52
|
"graphql": "^16.10.0",
|
|
53
53
|
"lucide-react": "^0.468.0",
|
|
54
|
-
"react": "^19.
|
|
55
|
-
"react-dom": "^19.
|
|
54
|
+
"react": "^19.2.7",
|
|
55
|
+
"react-dom": "^19.2.7",
|
|
56
56
|
"react-router": "^8.3.0",
|
|
57
57
|
"sonner": "^2.0.7",
|
|
58
58
|
"tailwind-merge": "^3.4.0",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"eslint-plugin-react-refresh": "^0.4.26",
|
|
87
87
|
"lefthook": "^2.1.1",
|
|
88
88
|
"postcss": "^8.4.49",
|
|
89
|
-
"prettier": "
|
|
89
|
+
"prettier": "3.9.9",
|
|
90
90
|
"storybook": "^8.6.0",
|
|
91
91
|
"tailwindcss": "^4.0.0",
|
|
92
92
|
"typescript": "^5.9.0",
|
|
@@ -96,8 +96,8 @@
|
|
|
96
96
|
},
|
|
97
97
|
"peerDependencies": {
|
|
98
98
|
"@apollo/client": "^4.0.11",
|
|
99
|
-
"react": "^19.
|
|
100
|
-
"react-dom": "^19.
|
|
99
|
+
"react": "^19.2.7",
|
|
100
|
+
"react-dom": "^19.2.7",
|
|
101
101
|
"zustand": "^5.0.0"
|
|
102
102
|
},
|
|
103
103
|
"publishConfig": {
|