@burdenoff/microfe-cosmicintersection 2026.1012.1 → 2026.1030.2

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 (25) hide show
  1. package/dist/cosmicintersection/lib/assistantAwareDialog.d.ts +42 -0
  2. package/dist/cosmicintersection/lib/assistantAwareDialog.d.ts.map +1 -0
  3. package/dist/cosmicintersection/lib/assistantAwareDialog.js +12 -0
  4. package/dist/cosmicintersection/lib/assistantAwareDialog.js.map +1 -0
  5. package/dist/cosmicintersection/lib/useSelectedRecord.d.ts +20 -0
  6. package/dist/cosmicintersection/lib/useSelectedRecord.d.ts.map +1 -0
  7. package/dist/cosmicintersection/lib/useSelectedRecord.js +19 -0
  8. package/dist/cosmicintersection/lib/useSelectedRecord.js.map +1 -0
  9. package/dist/cosmicintersection/pages/access/AccessPage.d.ts.map +1 -1
  10. package/dist/cosmicintersection/pages/access/AccessPage.js +239 -226
  11. package/dist/cosmicintersection/pages/access/AccessPage.js.map +1 -1
  12. package/dist/cosmicintersection/pages/analyses/AnalysesPage.d.ts.map +1 -1
  13. package/dist/cosmicintersection/pages/analyses/AnalysesPage.js +200 -196
  14. package/dist/cosmicintersection/pages/analyses/AnalysesPage.js.map +1 -1
  15. package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.d.ts.map +1 -1
  16. package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.js +188 -175
  17. package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.js.map +1 -1
  18. package/dist/cosmicintersection/pages/releases/ReleasesPage.d.ts.map +1 -1
  19. package/dist/cosmicintersection/pages/releases/ReleasesPage.js +205 -201
  20. package/dist/cosmicintersection/pages/releases/ReleasesPage.js.map +1 -1
  21. package/dist/utils/pageContext.d.ts +33 -7
  22. package/dist/utils/pageContext.d.ts.map +1 -1
  23. package/dist/utils/pageContext.js +75 -33
  24. package/dist/utils/pageContext.js.map +1 -1
  25. package/package.json +1 -1
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Props for a record-detail dialog that the AI assistant must stay usable
3
+ * beside.
4
+ *
5
+ * Releases and analyses have no detail route: the page opens the focused
6
+ * record in a dialog and keeps its id in `?id=` (`useSelectedRecord`), which
7
+ * the assistant's page context turns into `entityType` + `entityId`. A modal
8
+ * dialog defeats that: Radix hides everything outside it from assistive
9
+ * technology, traps focus inside it and blocks pointer events on the rest of
10
+ * the page, so the assistant panel cannot be typed into while the record it
11
+ * would resolve is on screen. "Publish this release" could only be asked after
12
+ * closing the release, at which point `?id=` is gone.
13
+ *
14
+ * These detail dialogs therefore open non-modally, and a click or focus move
15
+ * into the assistant widget does not count as "outside" (which would close the
16
+ * dialog and drop the record from the page context). Every other outside
17
+ * interaction still closes the dialog, exactly as before. Form dialogs that
18
+ * collect input stay modal; this is only for read-only record views.
19
+ */
20
+ /**
21
+ * The shared fe-libs `AssistantWidget` launcher and window
22
+ * (`@burdenoff/fe-libs/shared/components`, `assistantWidget/AssistantWidget.tsx`).
23
+ * Matched by the test ids that component publishes; a widget that renders
24
+ * without them simply falls back to the ordinary close-on-outside behaviour.
25
+ */
26
+ export declare const ASSISTANT_WIDGET_SELECTOR = "[data-testid=\"assistant-widget-window\"], [data-testid=\"assistant-widget-launcher\"]";
27
+ /** True when the event started inside the assistant launcher or window. */
28
+ export declare function isAssistantWidgetEvent(event: Pick<Event, 'target'>): boolean;
29
+ /**
30
+ * Spread on `DialogContent`: ignore outside interactions that land in the
31
+ * assistant widget, so talking to the assistant keeps the record open.
32
+ */
33
+ export declare function keepOpenForAssistant(event: Pick<Event, 'target' | 'preventDefault'>): void;
34
+ /** Spread on the `Dialog` root of a record-detail dialog. */
35
+ export declare const ASSISTANT_AWARE_DIALOG_ROOT_PROPS: {
36
+ readonly modal: false;
37
+ };
38
+ /** Spread on the `DialogContent` of a record-detail dialog. */
39
+ export declare const ASSISTANT_AWARE_DIALOG_CONTENT_PROPS: {
40
+ readonly onInteractOutside: typeof keepOpenForAssistant;
41
+ };
42
+ //# sourceMappingURL=assistantAwareDialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assistantAwareDialog.d.ts","sourceRoot":"","sources":["../../../src/cosmicintersection/lib/assistantAwareDialog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,2FACgD,CAAC;AAEvF,2EAA2E;AAC3E,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,OAAO,CAG5E;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,QAAQ,GAAG,gBAAgB,CAAC,GAAG,IAAI,CAE1F;AAED,6DAA6D;AAC7D,eAAO,MAAM,iCAAiC;;CAA4B,CAAC;AAE3E,+DAA+D;AAC/D,eAAO,MAAM,oCAAoC;;CAEvC,CAAC"}
@@ -0,0 +1,12 @@
1
+ function e(e) {
2
+ let t = e.target;
3
+ return t instanceof Element && t.closest("[data-testid=\"assistant-widget-window\"], [data-testid=\"assistant-widget-launcher\"]") !== null;
4
+ }
5
+ function t(t) {
6
+ e(t) && t.preventDefault();
7
+ }
8
+ var n = { modal: !1 }, r = { onInteractOutside: t };
9
+ //#endregion
10
+ export { r as ASSISTANT_AWARE_DIALOG_CONTENT_PROPS, n as ASSISTANT_AWARE_DIALOG_ROOT_PROPS };
11
+
12
+ //# sourceMappingURL=assistantAwareDialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assistantAwareDialog.js","names":[],"sources":["../../../src/cosmicintersection/lib/assistantAwareDialog.ts"],"sourcesContent":["/**\n * Props for a record-detail dialog that the AI assistant must stay usable\n * beside.\n *\n * Releases and analyses have no detail route: the page opens the focused\n * record in a dialog and keeps its id in `?id=` (`useSelectedRecord`), which\n * the assistant's page context turns into `entityType` + `entityId`. A modal\n * dialog defeats that: Radix hides everything outside it from assistive\n * technology, traps focus inside it and blocks pointer events on the rest of\n * the page, so the assistant panel cannot be typed into while the record it\n * would resolve is on screen. \"Publish this release\" could only be asked after\n * closing the release, at which point `?id=` is gone.\n *\n * These detail dialogs therefore open non-modally, and a click or focus move\n * into the assistant widget does not count as \"outside\" (which would close the\n * dialog and drop the record from the page context). Every other outside\n * interaction still closes the dialog, exactly as before. Form dialogs that\n * collect input stay modal; this is only for read-only record views.\n */\n\n/**\n * The shared fe-libs `AssistantWidget` launcher and window\n * (`@burdenoff/fe-libs/shared/components`, `assistantWidget/AssistantWidget.tsx`).\n * Matched by the test ids that component publishes; a widget that renders\n * without them simply falls back to the ordinary close-on-outside behaviour.\n */\nexport const ASSISTANT_WIDGET_SELECTOR =\n '[data-testid=\"assistant-widget-window\"], [data-testid=\"assistant-widget-launcher\"]';\n\n/** True when the event started inside the assistant launcher or window. */\nexport function isAssistantWidgetEvent(event: Pick<Event, 'target'>): boolean {\n const target = event.target;\n return target instanceof Element && target.closest(ASSISTANT_WIDGET_SELECTOR) !== null;\n}\n\n/**\n * Spread on `DialogContent`: ignore outside interactions that land in the\n * assistant widget, so talking to the assistant keeps the record open.\n */\nexport function keepOpenForAssistant(event: Pick<Event, 'target' | 'preventDefault'>): void {\n if (isAssistantWidgetEvent(event)) event.preventDefault();\n}\n\n/** Spread on the `Dialog` root of a record-detail dialog. */\nexport const ASSISTANT_AWARE_DIALOG_ROOT_PROPS = { modal: false } as const;\n\n/** Spread on the `DialogContent` of a record-detail dialog. */\nexport const ASSISTANT_AWARE_DIALOG_CONTENT_PROPS = {\n onInteractOutside: keepOpenForAssistant,\n} as const;\n"],"mappings":"AA8BA,SAAgB,EAAuB,GAAuC;CAC5E,IAAM,IAAS,EAAM;CACrB,OAAO,aAAkB,WAAW,EAAO,QAAA,wFAAiC,MAAM;AACpF;AAMA,SAAgB,EAAqB,GAAuD;CAC1F,AAAI,EAAuB,CAAK,KAAG,EAAM,eAAe;AAC1D;AAGA,IAAa,IAAoC,EAAE,OAAO,GAAM,GAGnD,IAAuC,EAClD,mBAAmB,EACrB"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Keeps the record a list page has focused (a release, an analysis, an access
3
+ * grant, a dataset's schema field) in the URL search parameters instead of
4
+ * component state.
5
+ *
6
+ * The URL is what the AI assistant's page context reads
7
+ * (`src/utils/pageContext.ts`): `?id=<id>` on the releases, analyses and access
8
+ * pages, and `?field=<id>` on a dataset page, become `entityType` + `entityId`,
9
+ * so "publish this release", "revoke this grant" or "describe this column"
10
+ * resolve without a follow-up question. It also makes the focused record
11
+ * linkable and survives a reload.
12
+ *
13
+ * The update replaces the current history entry: focusing records one after
14
+ * another must not fill the back stack.
15
+ */
16
+ export declare function useSelectedRecord(param?: string): {
17
+ selectedId: string | null;
18
+ select: (id: string | null) => void;
19
+ };
20
+ //# sourceMappingURL=useSelectedRecord.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSelectedRecord.d.ts","sourceRoot":"","sources":["../../../src/cosmicintersection/lib/useSelectedRecord.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,SAAO,GAAG;IAC/C,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CACrC,CAwBA"}
@@ -0,0 +1,19 @@
1
+ import { useCallback as e } from "react";
2
+ import { useSearchParams as t } from "react-router";
3
+ //#region src/cosmicintersection/lib/useSelectedRecord.ts
4
+ function n(n = "id") {
5
+ let [r, i] = t();
6
+ return {
7
+ selectedId: r.get(n)?.trim() || null,
8
+ select: e((e) => {
9
+ i((t) => {
10
+ let r = new URLSearchParams(t);
11
+ return e ? r.set(n, e) : r.delete(n), r;
12
+ }, { replace: !0 });
13
+ }, [n, i])
14
+ };
15
+ }
16
+ //#endregion
17
+ export { n as useSelectedRecord };
18
+
19
+ //# sourceMappingURL=useSelectedRecord.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSelectedRecord.js","names":[],"sources":["../../../src/cosmicintersection/lib/useSelectedRecord.ts"],"sourcesContent":["import { useCallback } from 'react';\nimport { useSearchParams } from 'react-router';\n\n/**\n * Keeps the record a list page has focused (a release, an analysis, an access\n * grant, a dataset's schema field) in the URL search parameters instead of\n * component state.\n *\n * The URL is what the AI assistant's page context reads\n * (`src/utils/pageContext.ts`): `?id=<id>` on the releases, analyses and access\n * pages, and `?field=<id>` on a dataset page, become `entityType` + `entityId`,\n * so \"publish this release\", \"revoke this grant\" or \"describe this column\"\n * resolve without a follow-up question. It also makes the focused record\n * linkable and survives a reload.\n *\n * The update replaces the current history entry: focusing records one after\n * another must not fill the back stack.\n */\nexport function useSelectedRecord(param = 'id'): {\n selectedId: string | null;\n select: (id: string | null) => void;\n} {\n const [searchParams, setSearchParams] = useSearchParams();\n const raw = searchParams.get(param)?.trim();\n const selectedId = raw ? raw : null;\n\n const select = useCallback(\n (id: string | null) => {\n setSearchParams(\n (previous) => {\n const next = new URLSearchParams(previous);\n if (id) {\n next.set(param, id);\n } else {\n next.delete(param);\n }\n return next;\n },\n { replace: true }\n );\n },\n [param, setSearchParams]\n );\n\n return { selectedId, select };\n}\n"],"mappings":";;;AAkBA,SAAgB,EAAkB,IAAQ,MAGxC;CACA,IAAM,CAAC,GAAc,KAAmB,EAAgB;CAsBxD,OAAO;EAAE,YArBG,EAAa,IAAI,CAAK,GAAG,KAAK,KACX;EAoBV,QAlBN,GACZ,MAAsB;GACrB,GACG,MAAa;IACZ,IAAM,IAAO,IAAI,gBAAgB,CAAQ;IAMzC,OALI,IACF,EAAK,IAAI,GAAO,CAAE,IAElB,EAAK,OAAO,CAAK,GAEZ;GACT,GACA,EAAE,SAAS,GAAK,CAClB;EACF,GACA,CAAC,GAAO,CAAe,CAGJ;CAAO;AAC9B"}
@@ -1 +1 @@
1
- {"version":3,"file":"AccessPage.d.ts","sourceRoot":"","sources":["../../../../src/cosmicintersection/pages/access/AccessPage.tsx"],"names":[],"mappings":"AAoFA,MAAM,CAAC,OAAO,UAAU,UAAU,gCA0ejC"}
1
+ {"version":3,"file":"AccessPage.d.ts","sourceRoot":"","sources":["../../../../src/cosmicintersection/pages/access/AccessPage.tsx"],"names":[],"mappings":"AAqFA,MAAM,CAAC,OAAO,UAAU,UAAU,gCAygBjC"}