udi-yac 0.1.0

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 (102) hide show
  1. package/README.md +373 -0
  2. package/dist/app/ErrorBoundary.d.ts +18 -0
  3. package/dist/app/UDIChat.d.ts +3 -0
  4. package/dist/app/UDIChatConfig.d.ts +23 -0
  5. package/dist/app/UDIChatContext.d.ts +26 -0
  6. package/dist/app/validateConfig.d.ts +14 -0
  7. package/dist/app/validateConfig.test.d.ts +1 -0
  8. package/dist/assets/domainWorker-Cd9KoNXV.js +16 -0
  9. package/dist/ce-entry-C4ngOj0B.js +42577 -0
  10. package/dist/components/ui/badge.d.ts +7 -0
  11. package/dist/components/ui/button.d.ts +8 -0
  12. package/dist/components/ui/card.d.ts +11 -0
  13. package/dist/components/ui/checkbox.d.ts +3 -0
  14. package/dist/components/ui/dialog.d.ts +17 -0
  15. package/dist/components/ui/dropdown-menu.d.ts +29 -0
  16. package/dist/components/ui/input.d.ts +3 -0
  17. package/dist/components/ui/label.d.ts +3 -0
  18. package/dist/components/ui/scroll-area.d.ts +4 -0
  19. package/dist/components/ui/select.d.ts +15 -0
  20. package/dist/components/ui/separator.d.ts +3 -0
  21. package/dist/components/ui/slider.d.ts +3 -0
  22. package/dist/components/ui/switch.d.ts +5 -0
  23. package/dist/components/ui/tabs.d.ts +10 -0
  24. package/dist/components/ui/textarea.d.ts +3 -0
  25. package/dist/components/ui/tooltip.d.ts +6 -0
  26. package/dist/data/hubmap_2025-05-05/datapackage_udi.json +19606 -0
  27. package/dist/data/hubmap_2025-05-05/datasets.csv +6324 -0
  28. package/dist/data/hubmap_2025-05-05/datasets.tsv +6324 -0
  29. package/dist/data/hubmap_2025-05-05/donors.csv +433 -0
  30. package/dist/data/hubmap_2025-05-05/donors.tsv +433 -0
  31. package/dist/data/hubmap_2025-05-05/samples.csv +4490 -0
  32. package/dist/data/hubmap_2025-05-05/samples.tsv +4490 -0
  33. package/dist/data/hubmap_api/datapackage.json +14110 -0
  34. package/dist/data/readme.md +41 -0
  35. package/dist/favicon.svg +1 -0
  36. package/dist/features/chat/api/completions.d.ts +12 -0
  37. package/dist/features/chat/components/ApiKeyInput.d.ts +5 -0
  38. package/dist/features/chat/components/ChatHeaderBar.d.ts +19 -0
  39. package/dist/features/chat/components/ChatInput.d.ts +7 -0
  40. package/dist/features/chat/components/ChatPanel.d.ts +13 -0
  41. package/dist/features/chat/components/ClosedVisualizationsPanel.d.ts +6 -0
  42. package/dist/features/chat/components/ConversationList.d.ts +1 -0
  43. package/dist/features/chat/components/DebugToggleSection.d.ts +13 -0
  44. package/dist/features/chat/components/MessageBubble.d.ts +8 -0
  45. package/dist/features/chat/components/MessageList.d.ts +7 -0
  46. package/dist/features/chat/hooks/useChatApi.d.ts +6 -0
  47. package/dist/features/chat/hooks/useDebugExports.d.ts +11 -0
  48. package/dist/features/chat/hooks/useExamplePrompts.d.ts +7 -0
  49. package/dist/features/chat/hooks/useResetHandlers.d.ts +8 -0
  50. package/dist/features/chat/index.d.ts +9 -0
  51. package/dist/features/chat/stores/conversationStore.d.ts +10 -0
  52. package/dist/features/chat/stores/conversationStore.test.d.ts +1 -0
  53. package/dist/features/dashboard/components/DashboardCard.d.ts +9 -0
  54. package/dist/features/dashboard/components/DashboardPanel.d.ts +1 -0
  55. package/dist/features/dashboard/components/DataCounts.d.ts +1 -0
  56. package/dist/features/dashboard/components/DownloadButton.d.ts +1 -0
  57. package/dist/features/dashboard/components/FilterToolbar.d.ts +1 -0
  58. package/dist/features/dashboard/components/VizTweakComponent.d.ts +8 -0
  59. package/dist/features/dashboard/components/VizTweakComponent.types.d.ts +20 -0
  60. package/dist/features/dashboard/components/WelcomeSplash.d.ts +1 -0
  61. package/dist/features/dashboard/index.d.ts +10 -0
  62. package/dist/features/dashboard/stores/dashboardStore.d.ts +70 -0
  63. package/dist/features/dashboard/stores/dashboardStore.test.d.ts +1 -0
  64. package/dist/features/dashboard/stores/dataFiltersStore.d.ts +34 -0
  65. package/dist/features/dashboard/stores/dataFiltersStore.test.d.ts +1 -0
  66. package/dist/features/dashboard/stores/memoryBankStore.d.ts +8 -0
  67. package/dist/features/dashboard/stores/memoryBankStore.test.d.ts +1 -0
  68. package/dist/features/dashboard/stores/selectionsStore.d.ts +7 -0
  69. package/dist/features/dashboard/stores/selectionsStore.test.d.ts +1 -0
  70. package/dist/features/data-package/index.d.ts +7 -0
  71. package/dist/features/data-package/stores/dataPackageStore.d.ts +25 -0
  72. package/dist/features/data-package/stores/dataPackageStore.test.d.ts +1 -0
  73. package/dist/features/data-package/types.d.ts +27 -0
  74. package/dist/features/data-package/utils/joinDataPath.d.ts +7 -0
  75. package/dist/features/data-package/utils/joinDataPath.test.d.ts +1 -0
  76. package/dist/features/data-package/utils/structuredTextParser.d.ts +7 -0
  77. package/dist/features/data-package/utils/structuredTextParser.test.d.ts +1 -0
  78. package/dist/features/data-package/workers/domainWorker.d.ts +13 -0
  79. package/dist/features/tool-calls/components/ClarifyVariable.d.ts +6 -0
  80. package/dist/features/tool-calls/components/FilterComponent.d.ts +9 -0
  81. package/dist/features/tool-calls/components/FreeTextExplain.d.ts +2 -0
  82. package/dist/features/tool-calls/components/IntervalFilterComponent.d.ts +9 -0
  83. package/dist/features/tool-calls/components/PointFilterComponent.d.ts +8 -0
  84. package/dist/features/tool-calls/components/RebuffNotice.d.ts +7 -0
  85. package/dist/features/tool-calls/components/ToolCallRenderer.d.ts +11 -0
  86. package/dist/features/tool-calls/components/VisualizationCard.d.ts +10 -0
  87. package/dist/features/tool-calls/index.d.ts +6 -0
  88. package/dist/features/tool-calls/types.d.ts +52 -0
  89. package/dist/icons.svg +24 -0
  90. package/dist/images/yac-mascot.svg +22 -0
  91. package/dist/index.d.ts +5 -0
  92. package/dist/lib/utils.d.ts +2 -0
  93. package/dist/stores/globalStore.d.ts +6 -0
  94. package/dist/stores/globalStore.test.d.ts +1 -0
  95. package/dist/test/setup.d.ts +0 -0
  96. package/dist/types/dataPackage.d.ts +64 -0
  97. package/dist/types/messages.d.ts +24 -0
  98. package/dist/udi-yac.css +3 -0
  99. package/dist/udi-yac.js +25877 -0
  100. package/dist/utils/specMutations.d.ts +45 -0
  101. package/dist/utils/specMutations.test.d.ts +1 -0
  102. package/package.json +110 -0
@@ -0,0 +1,41 @@
1
+ # YAC Dataset Format Examples
2
+
3
+ YAC expects data to be in the form of multiple related tables. The information about the tables and their relationships must be recorded in a frictionless data package file.
4
+
5
+ Frictionless Data Package: https://datapackage.org/
6
+
7
+ Frictionless data packages support multiple different types of data resources. However, the only kind that YAC currently supports are Tables
8
+
9
+ Frictionless Table Schema: https://datapackage.org/standard/table-schema/
10
+
11
+ YAC expects a few additional fields. They are all prepended with `udi:` for the universal discovery interface project.
12
+
13
+ At the top level:
14
+ | Field | Description |
15
+ |-------------|----------------------------------------------------------------------------------------------------------------|
16
+ | `udi:name` | The name of the full data resource. Can be the same as `name`. |
17
+ | `udi:path` | The path of the data resources. It is assumed that all data resources are relative to this path. This can be a relative path, or a full remote URL. |
18
+
19
+ For each table resource:
20
+ | Field | Description |
21
+ |----------------------|--------------------------------------------------|
22
+ | `udi:row_count` | The number of rows in the table. |
23
+ | `udi:column_count` | The number of data columns in the table. |
24
+
25
+ For each data field:
26
+ | Field | Description |
27
+ |-------------------------|---------------------------------------------------------------------------------------------------------------------|
28
+ | `udi:cardinality` | The number of unique values in the column. |
29
+ | `udi:unique` | `true` if the value is unique for each row, `false` otherwise. |
30
+ | `udi:data_type` | One of `quantitative`, `ordinal`, or `nominal`. |
31
+ | `udi:overlapping_fields`| List of fields that are non-null on at least one row together. If all fields overlap, this should be `all`. |
32
+
33
+ This directory contains several examples that work with YAC.
34
+ | Path | Description | Tables |
35
+ |----------------------------------------------------|--------------------------------------------------------------------|--------------|
36
+ | `./penguins/datapackage.json` | The classic Palmer Penguins test dataset. | Single Table |
37
+ | `./hubmap_avr/datapackage.json` | An export from the HuBMAP Antibody Validation Report. | Single Table |
38
+ | `./hubmap_2025-05-05/datapackage_udi.json` | An export from the HuBMAP TSV APIs. | Three Tables |
39
+ | `./MetabolomicsWorkBench/C2M2_datapackage_udi.json`| A C2M2 export from the MetabolomicsWorkbench project. | 22 Tables |
40
+ | `./MoTrPAC/C2M2_datapackage_udi.json` | A C2M2 export from the MoTrPAC project. | 14 Tables |
41
+ | `./SenNet/C2M2_datapackage_udi.json` | A C2M2 export from the SenNet project. | 6 Tables |
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="48" height="46" fill="none" viewBox="0 0 48 46"><path fill="#863bff" d="M25.946 44.938c-.664.845-2.021.375-2.021-.698V33.937a2.26 2.26 0 0 0-2.262-2.262H10.287c-.92 0-1.456-1.04-.92-1.788l7.48-10.471c1.07-1.497 0-3.578-1.842-3.578H1.237c-.92 0-1.456-1.04-.92-1.788L10.013.474c.214-.297.556-.474.92-.474h28.894c.92 0 1.456 1.04.92 1.788l-7.48 10.471c-1.07 1.498 0 3.579 1.842 3.579h11.377c.943 0 1.473 1.088.89 1.83L25.947 44.94z" style="fill:#863bff;fill:color(display-p3 .5252 .23 1);fill-opacity:1"/><mask id="a" width="48" height="46" x="0" y="0" maskUnits="userSpaceOnUse" style="mask-type:alpha"><path fill="#000" d="M25.842 44.938c-.664.844-2.021.375-2.021-.698V33.937a2.26 2.26 0 0 0-2.262-2.262H10.183c-.92 0-1.456-1.04-.92-1.788l7.48-10.471c1.07-1.498 0-3.579-1.842-3.579H1.133c-.92 0-1.456-1.04-.92-1.787L9.91.473c.214-.297.556-.474.92-.474h28.894c.92 0 1.456 1.04.92 1.788l-7.48 10.471c-1.07 1.498 0 3.578 1.842 3.578h11.377c.943 0 1.473 1.088.89 1.832L25.843 44.94z" style="fill:#000;fill-opacity:1"/></mask><g mask="url(#a)"><g filter="url(#b)"><ellipse cx="5.508" cy="14.704" fill="#ede6ff" rx="5.508" ry="14.704" style="fill:#ede6ff;fill:color(display-p3 .9275 .9033 1);fill-opacity:1" transform="matrix(.00324 1 1 -.00324 -4.47 31.516)"/></g><g filter="url(#c)"><ellipse cx="10.399" cy="29.851" fill="#ede6ff" rx="10.399" ry="29.851" style="fill:#ede6ff;fill:color(display-p3 .9275 .9033 1);fill-opacity:1" transform="matrix(.00324 1 1 -.00324 -39.328 7.883)"/></g><g filter="url(#d)"><ellipse cx="5.508" cy="30.487" fill="#7e14ff" rx="5.508" ry="30.487" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(89.814 -25.913 -14.639)scale(1 -1)"/></g><g filter="url(#e)"><ellipse cx="5.508" cy="30.599" fill="#7e14ff" rx="5.508" ry="30.599" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(89.814 -32.644 -3.334)scale(1 -1)"/></g><g filter="url(#f)"><ellipse cx="5.508" cy="30.599" fill="#7e14ff" rx="5.508" ry="30.599" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="matrix(.00324 1 1 -.00324 -34.34 30.47)"/></g><g filter="url(#g)"><ellipse cx="14.072" cy="22.078" fill="#ede6ff" rx="14.072" ry="22.078" style="fill:#ede6ff;fill:color(display-p3 .9275 .9033 1);fill-opacity:1" transform="rotate(93.35 24.506 48.493)scale(-1 1)"/></g><g filter="url(#h)"><ellipse cx="3.47" cy="21.501" fill="#7e14ff" rx="3.47" ry="21.501" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(89.009 28.708 47.59)scale(-1 1)"/></g><g filter="url(#i)"><ellipse cx="3.47" cy="21.501" fill="#7e14ff" rx="3.47" ry="21.501" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(89.009 28.708 47.59)scale(-1 1)"/></g><g filter="url(#j)"><ellipse cx=".387" cy="8.972" fill="#7e14ff" rx="4.407" ry="29.108" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(39.51 .387 8.972)"/></g><g filter="url(#k)"><ellipse cx="47.523" cy="-6.092" fill="#7e14ff" rx="4.407" ry="29.108" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(37.892 47.523 -6.092)"/></g><g filter="url(#l)"><ellipse cx="41.412" cy="6.333" fill="#47bfff" rx="5.971" ry="9.665" style="fill:#47bfff;fill:color(display-p3 .2799 .748 1);fill-opacity:1" transform="rotate(37.892 41.412 6.333)"/></g><g filter="url(#m)"><ellipse cx="-1.879" cy="38.332" fill="#7e14ff" rx="4.407" ry="29.108" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(37.892 -1.88 38.332)"/></g><g filter="url(#n)"><ellipse cx="-1.879" cy="38.332" fill="#7e14ff" rx="4.407" ry="29.108" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(37.892 -1.88 38.332)"/></g><g filter="url(#o)"><ellipse cx="35.651" cy="29.907" fill="#7e14ff" rx="4.407" ry="29.108" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(37.892 35.651 29.907)"/></g><g filter="url(#p)"><ellipse cx="38.418" cy="32.4" fill="#47bfff" rx="5.971" ry="15.297" style="fill:#47bfff;fill:color(display-p3 .2799 .748 1);fill-opacity:1" transform="rotate(37.892 38.418 32.4)"/></g></g><defs><filter id="b" width="60.045" height="41.654" x="-19.77" y="16.149" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="7.659"/></filter><filter id="c" width="90.34" height="51.437" x="-54.613" y="-7.533" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="7.659"/></filter><filter id="d" width="79.355" height="29.4" x="-49.64" y="2.03" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="e" width="79.579" height="29.4" x="-45.045" y="20.029" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="f" width="79.579" height="29.4" x="-43.513" y="21.178" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="g" width="74.749" height="58.852" x="15.756" y="-17.901" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="7.659"/></filter><filter id="h" width="61.377" height="25.362" x="23.548" y="2.284" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="i" width="61.377" height="25.362" x="23.548" y="2.284" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="j" width="56.045" height="63.649" x="-27.636" y="-22.853" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="k" width="54.814" height="64.646" x="20.116" y="-38.415" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="l" width="33.541" height="35.313" x="24.641" y="-11.323" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="m" width="54.814" height="64.646" x="-29.286" y="6.009" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="n" width="54.814" height="64.646" x="-29.286" y="6.009" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="o" width="54.814" height="64.646" x="8.244" y="-2.416" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="p" width="39.409" height="43.623" x="18.713" y="10.588" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter></defs></svg>
@@ -0,0 +1,12 @@
1
+ import { Message } from '../../../types/messages';
2
+ export interface QueryConfig {
3
+ apiBaseUrl: string;
4
+ authToken?: string;
5
+ openAiKey?: string;
6
+ model?: string;
7
+ }
8
+ export interface ToolCallResponse {
9
+ name: string;
10
+ arguments: Record<string, unknown>;
11
+ }
12
+ export declare function queryLLM(config: QueryConfig, messages: Message[], dataSchema: string, dataDomains: string): Promise<ToolCallResponse[]>;
@@ -0,0 +1,5 @@
1
+ interface ApiKeyInputProps {
2
+ onSubmit: (key: string) => void;
3
+ }
4
+ export declare function ApiKeyInput({ onSubmit }: ApiKeyInputProps): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,19 @@
1
+ import { QueryConfig } from '../api/completions';
2
+ interface ChatHeaderBarProps {
3
+ config: QueryConfig;
4
+ hasApiKey: boolean;
5
+ onClearApiKey: () => void;
6
+ showDrawerToggle?: boolean;
7
+ onToggleDrawer?: () => void;
8
+ onReset: () => void;
9
+ onExampleClick: (prompt: string) => void;
10
+ isLoading: boolean;
11
+ }
12
+ /**
13
+ * Top toolbar of the chat panel: drawer toggle, title, example prompts
14
+ * dialog, API key indicator, debug export buttons, and reset button.
15
+ * Owns `debugMode` subscription so that toggling it does not re-render
16
+ * MessageList, ChatInput, or ClosedVisualizationsPanel.
17
+ */
18
+ export declare function ChatHeaderBar({ config, hasApiKey, onClearApiKey, showDrawerToggle, onToggleDrawer, onReset, onExampleClick, isLoading, }: ChatHeaderBarProps): import("react/jsx-runtime").JSX.Element;
19
+ export {};
@@ -0,0 +1,7 @@
1
+ interface ChatInputProps {
2
+ onSend: (text: string) => void;
3
+ disabled?: boolean;
4
+ placeholder?: string;
5
+ }
6
+ export declare function ChatInput({ onSend, disabled, placeholder }: ChatInputProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,13 @@
1
+ import { QueryConfig } from '../api/completions';
2
+ interface ChatPanelProps {
3
+ config: QueryConfig;
4
+ needsApiKey: boolean;
5
+ hasApiKey: boolean;
6
+ onSetApiKey: (key: string) => void;
7
+ onClearApiKey: () => void;
8
+ showDrawerToggle?: boolean;
9
+ drawerOpen?: boolean;
10
+ onToggleDrawer?: () => void;
11
+ }
12
+ export declare function ChatPanel({ config, needsApiKey, hasApiKey, onSetApiKey, onClearApiKey, showDrawerToggle, onToggleDrawer, }: ChatPanelProps): import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Renders a strip of recently-closed visualizations with per-item restore
3
+ * buttons. Subscribes to `memoryBank.closedVisualizations` in isolation so
4
+ * that closing/restoring a viz does not re-render the parent ChatPanel.
5
+ */
6
+ export declare function ClosedVisualizationsPanel(): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1 @@
1
+ export declare function ConversationList(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,13 @@
1
+ interface DebugToggleSectionProps {
2
+ showSystemPrompts: boolean;
3
+ onShowSystemPromptsChange: (value: boolean) => void;
4
+ }
5
+ /**
6
+ * Debug-mode-only toggle row for controlling the visibility of system
7
+ * messages in the transcript. Gated internally on `global.debugMode` and
8
+ * subscribes to `conversation.messages` only to detect whether system
9
+ * messages exist — both subscriptions are kept here so the parent
10
+ * ChatPanel does not re-render when debug mode toggles or messages change.
11
+ */
12
+ export declare function DebugToggleSection({ showSystemPrompts, onShowSystemPromptsChange, }: DebugToggleSectionProps): import("react/jsx-runtime").JSX.Element | null;
13
+ export {};
@@ -0,0 +1,8 @@
1
+ import { Message } from '../../../types/messages';
2
+ interface MessageBubbleProps {
3
+ message: Message;
4
+ messageIndex: number;
5
+ onSelectSuggestion?: (suggestion: string) => void;
6
+ }
7
+ export declare function MessageBubble({ message, messageIndex, onSelectSuggestion }: MessageBubbleProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,7 @@
1
+ interface MessageListProps {
2
+ isLoading: boolean;
3
+ showSystemPrompts?: boolean;
4
+ onSelectSuggestion?: (suggestion: string) => void;
5
+ }
6
+ export declare function MessageList({ isLoading, showSystemPrompts, onSelectSuggestion, }: MessageListProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,6 @@
1
+ import { QueryConfig } from '../api/completions';
2
+ export declare function useChatApi(config: QueryConfig): {
3
+ sendMessage: (text: string) => Promise<void>;
4
+ isLoading: boolean;
5
+ error: string | null;
6
+ };
@@ -0,0 +1,11 @@
1
+ import { QueryConfig } from '../api/completions';
2
+ /**
3
+ * Bundles the debug-mode export buttons: save conversation, export test case,
4
+ * download data domains, download data schema.
5
+ */
6
+ export declare function useDebugExports(config: QueryConfig): {
7
+ handleSaveConversation: () => void;
8
+ handleExportTestCase: () => void;
9
+ handleDownloadDataDomains: () => void;
10
+ handleDownloadDataSchema: () => void;
11
+ };
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Fetches example prompts from the UDI agent's /v1/yac/examples endpoint.
3
+ * Returns an empty list until the fetch resolves or if the endpoint is unavailable.
4
+ */
5
+ export declare function useExamplePrompts(apiBaseUrl: string | undefined): {
6
+ examplePrompts: string[];
7
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Bundles the "reset everything" action — clears the active conversation,
3
+ * all pinned visualizations, selections, the closed-viz memory bank, and
4
+ * all cross-chart filters.
5
+ */
6
+ export declare function useResetHandlers(): {
7
+ handleReset: () => void;
8
+ };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Public API of the `chat` feature. Cross-feature and app-layer imports must
3
+ * go through this barrel (enforced by eslint-plugin-project-structure's
4
+ * independent-modules rule); intra-feature imports should use relative paths.
5
+ */
6
+ export { ChatPanel } from './components/ChatPanel';
7
+ export { ConversationList } from './components/ConversationList';
8
+ export { createConversationStore, type ConversationState } from './stores/conversationStore';
9
+ export type { QueryConfig } from './api/completions';
@@ -0,0 +1,10 @@
1
+ import { Message } from '../../../types/messages';
2
+ export interface ConversationState {
3
+ messages: Message[];
4
+ addMessage: (message: Message) => void;
5
+ newConversation: () => void;
6
+ getMessagesFormattedForLLM: () => Message[];
7
+ loadConversation: (messages: Message[]) => void;
8
+ exportConversation: () => string;
9
+ }
10
+ export declare function createConversationStore(): import('zustand').StoreApi<ConversationState>;
@@ -0,0 +1,9 @@
1
+ import { DataSelections } from 'udi-toolkit/react';
2
+ import { PinnedVisualization } from '../stores/dashboardStore';
3
+ interface DashboardCardProps {
4
+ vizKey: string;
5
+ viz: PinnedVisualization;
6
+ selections: DataSelections;
7
+ }
8
+ export declare function DashboardCard({ vizKey, viz, selections }: DashboardCardProps): import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1 @@
1
+ export declare function DashboardPanel(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function DataCounts(): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1 @@
1
+ export declare function DownloadButton(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function FilterToolbar(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { UDIGrammar } from 'udi-toolkit/react';
2
+ interface VizTweakComponentProps {
3
+ spec: UDIGrammar;
4
+ messageIndex: number;
5
+ toolCallIndex: number;
6
+ }
7
+ export declare function VizTweakComponent({ spec, messageIndex, toolCallIndex }: VizTweakComponentProps): import("react/jsx-runtime").JSX.Element | null;
8
+ export {};
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Narrow structural shapes used by VizTweakComponent when walking a
3
+ * UDIGrammar spec's representation layers. These deliberately mirror a
4
+ * subset of the grammar's layer/mapping types so the component can
5
+ * introspect without depending on the full upstream type graph.
6
+ */
7
+ export interface TweakableParam {
8
+ field: string;
9
+ encoding: string;
10
+ options: string[];
11
+ }
12
+ export interface MappingLike {
13
+ field?: string;
14
+ encoding?: string;
15
+ type?: string;
16
+ }
17
+ export interface LayerLike {
18
+ mark?: string;
19
+ mapping?: MappingLike | MappingLike[];
20
+ }
@@ -0,0 +1 @@
1
+ export declare function WelcomeSplash(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Public API of the `dashboard` feature. Cross-feature and app-layer imports
3
+ * must go through this barrel; intra-feature imports use relative paths.
4
+ */
5
+ export { DashboardPanel } from './components/DashboardPanel';
6
+ export { VizTweakComponent } from './components/VizTweakComponent';
7
+ export { createDashboardStore, extractAllUdiSpecsFromMessage, type DashboardState, type PinnedVisualization, } from './stores/dashboardStore';
8
+ export { createDataFiltersStore, extractFilterSpecFromMessage, messageFilterKeyWithToolCall, messageFilterKey, type DataFiltersState, type DataSelection, type DataSelections, } from './stores/dataFiltersStore';
9
+ export { createSelectionsStore, type SelectionsState } from './stores/selectionsStore';
10
+ export { createMemoryBankStore, type MemoryBankState } from './stores/memoryBankStore';
@@ -0,0 +1,70 @@
1
+ import { StoreApi } from 'zustand/vanilla';
2
+ import { UDIGrammar } from 'udi-toolkit/react';
3
+ import { Message } from '../../../types/messages';
4
+ import { DataFiltersState } from './dataFiltersStore';
5
+ import { DataPackageState } from '../../data-package';
6
+ import { MemoryBankState } from './memoryBankStore';
7
+ export interface PinnedVisualization {
8
+ index: number;
9
+ toolCallIndex: number;
10
+ spec: UDIGrammar;
11
+ interactiveSpec: UDIGrammar;
12
+ userPrompt: string;
13
+ title?: string;
14
+ uuid: string;
15
+ }
16
+ export interface ExtractedSpec {
17
+ spec: object;
18
+ toolCallIndex: number;
19
+ title?: string;
20
+ }
21
+ export interface DashboardState {
22
+ pinnedVisualizations: Map<string, PinnedVisualization>;
23
+ filterAllNullValues: boolean;
24
+ expandedVisualizations: Set<string>;
25
+ tableViewKeys: Set<string>;
26
+ hoveredVisualizationIndex: string | null;
27
+ pinKey: (messageIndex: number, toolCallIndex: number) => string;
28
+ pinVisualization: (index: number, toolCallIndex: number, spec: UDIGrammar, userPrompt: string, sourceFields: Record<string, string[]> | null, title?: string) => void;
29
+ pinVisualizationBatch: (items: Array<{
30
+ index: number;
31
+ toolCallIndex: number;
32
+ spec: UDIGrammar;
33
+ userPrompt: string;
34
+ sourceFields: Record<string, string[]> | null;
35
+ title?: string;
36
+ }>) => void;
37
+ unpinVisualization: (key: string, memoryBankStore?: StoreApi<MemoryBankState>) => void;
38
+ restoreFromMemoryBank: (key: string, memoryBankStore: StoreApi<MemoryBankState>) => void;
39
+ isPinned: (key: string) => boolean;
40
+ clearAllVisualizations: () => void;
41
+ setFilterAllNullValues: (value: boolean) => void;
42
+ toggleExpanded: (key: string) => void;
43
+ isExpanded: (key: string) => boolean;
44
+ toggleTableView: (key: string) => void;
45
+ isTableView: (key: string) => boolean;
46
+ setHoveredVisualizationIndex: (key: string | null) => void;
47
+ isHovered: (key: string) => boolean;
48
+ updateSpecFilters: (dataFiltersStore: StoreApi<DataFiltersState>, dataPackageStore: StoreApi<DataPackageState>) => void;
49
+ getNamedFilters: (filterIdList: string[], currentSourceName: string, dataFiltersStore: StoreApi<DataFiltersState>, dataPackageStore: StoreApi<DataPackageState>) => object[];
50
+ getFilterIds: (dataFiltersStore: StoreApi<DataFiltersState>) => string[];
51
+ updatePinnedVisualizationSpec: (key: string, newSpec: UDIGrammar, sourceFields: Record<string, string[]> | null) => void;
52
+ }
53
+ interface InteractiveSpec extends UDIGrammar {
54
+ config?: {
55
+ hideActions?: boolean;
56
+ };
57
+ }
58
+ export declare function injectInteractivity(spec: UDIGrammar, id: string, sourceFields: Record<string, string[]> | null): InteractiveSpec;
59
+ export declare function createDashboardStore(): StoreApi<DashboardState>;
60
+ export declare function normalizeToolCalls(message: Message): {
61
+ originalIndex: number;
62
+ name: string;
63
+ arguments: import('../../../types/messages').Arguments;
64
+ }[];
65
+ export declare function parseSpecFromToolCall(toolCall: {
66
+ name: string;
67
+ arguments: Record<string, unknown>;
68
+ }): object | null;
69
+ export declare function extractAllUdiSpecsFromMessage(message: Message): ExtractedSpec[];
70
+ export {};
@@ -0,0 +1,34 @@
1
+ import { DataSelection, DataSelections } from 'udi-toolkit/react';
2
+ import { Message } from '../../../types/messages';
3
+ import { FilterDataArgs } from '../../tool-calls';
4
+ export type { DataSelection, DataSelections };
5
+ export interface ExtractedFilter {
6
+ args: FilterDataArgs;
7
+ toolCallIndex: number;
8
+ }
9
+ interface ValidateFilterFn {
10
+ isValidIntervalFilter: (entity: string, field: string) => {
11
+ isValid: string;
12
+ };
13
+ isValidPointFilter: (entity: string, field: string, values: unknown[]) => {
14
+ isValid: string;
15
+ };
16
+ }
17
+ export interface DataFiltersState {
18
+ dataSelections: DataSelections;
19
+ internalDataSelections: DataSelections;
20
+ getValidDataSelections: (validate: ValidateFilterFn) => DataSelections;
21
+ syncFiltersFromMessages: (messages: Message[], validate: ValidateFilterFn) => void;
22
+ syncSelectionsBackToMessages: (messages: Message[]) => void;
23
+ updateInternalDataSelections: (newFilters: DataSelections) => void;
24
+ clearFilter: (key: string) => void;
25
+ resetFilters: () => void;
26
+ setDataSelection: (key: string, selection: DataSelection) => void;
27
+ }
28
+ export declare function messageFilterKeyWithToolCall(messageIndex: number, toolCallIndex: number, message?: Message): string;
29
+ export declare function messageFilterKey(messageIndex: number, message?: Message): string;
30
+ export declare function containsFilterCall(message: Message): boolean;
31
+ export declare function extractAllFilterSpecsFromMessage(message: Message): ExtractedFilter[];
32
+ export declare function extractFilterSpecFromMessage(message: Message): FilterDataArgs | null;
33
+ export declare function generateFilterMessage(key: string, selection: DataSelection): Message | null;
34
+ export declare function createDataFiltersStore(): import('zustand').StoreApi<DataFiltersState>;
@@ -0,0 +1,8 @@
1
+ import { PinnedVisualization } from './dashboardStore';
2
+ export interface MemoryBankState {
3
+ closedVisualizations: Map<string, PinnedVisualization>;
4
+ addToMemoryBank: (key: string, viz: PinnedVisualization) => void;
5
+ removeFromMemoryBank: (key: string) => void;
6
+ clearMemoryBank: () => void;
7
+ }
8
+ export declare function createMemoryBankStore(): import('zustand').StoreApi<MemoryBankState>;
@@ -0,0 +1,7 @@
1
+ import { DataSelections } from 'udi-toolkit/react';
2
+ export interface SelectionsState {
3
+ selections: DataSelections;
4
+ updateSelections: (newSelections: DataSelections) => void;
5
+ clearSelections: () => void;
6
+ }
7
+ export declare function createSelectionsStore(): import('zustand').StoreApi<SelectionsState>;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Public API of the `data-package` feature. Cross-feature and app-layer imports
3
+ * must go through this barrel; intra-feature imports use relative paths.
4
+ */
5
+ export { createDataPackageStore, type DataPackageState, type LoadingPhase, } from './stores/dataPackageStore';
6
+ export { joinDataPath } from './utils/joinDataPath';
7
+ export { evaluateStructuredText, hasStructuredReferences } from './utils/structuredTextParser';
@@ -0,0 +1,25 @@
1
+ import { DataFieldDomain, DataPackage, ValidStatus, EntityRelationship, ExportRowSet } from '../../../types/dataPackage';
2
+ export type LoadingPhase = 'idle' | 'fetching' | 'domains' | 'ready' | 'error';
3
+ export interface DataPackageState {
4
+ dataPackage: DataPackage | null;
5
+ dataFieldDomains: DataFieldDomain[];
6
+ loadingPhase: LoadingPhase;
7
+ error: string | null;
8
+ sourceFields: Record<string, string[]> | null;
9
+ quantitativeSourceFields: Record<string, string[]> | null;
10
+ categoricalSourceFields: Record<string, string[]> | null;
11
+ entityNames: string[];
12
+ dataPackageString: string;
13
+ dataDomainsString: string;
14
+ /** Maps entity names to canonical data URLs (from udi:path + resource.path). */
15
+ sourceResolver: Record<string, string>;
16
+ filteredData: Map<string, ExportRowSet>;
17
+ fetchDataPackage: (path: string, fetchOptions?: RequestInit) => Promise<void>;
18
+ setDataPackage: (dataPackage: DataPackage, precomputedDomains?: DataFieldDomain[], fetchOptions?: RequestInit) => Promise<void>;
19
+ getDomainForField: (entity: string, field: string) => DataFieldDomain | undefined;
20
+ isValidIntervalFilter: (entity: string, field: string) => ValidStatus;
21
+ isValidPointFilter: (entity: string, field: string, values: unknown[]) => ValidStatus;
22
+ getEntityRelationship: (originSource: string, targetSource: string) => EntityRelationship | null;
23
+ setFilteredData: (entity: string, data: ExportRowSet) => void;
24
+ }
25
+ export declare function createDataPackageStore(): import('zustand').StoreApi<DataPackageState>;
@@ -0,0 +1,27 @@
1
+ import { DataFieldDomain } from '../../types/dataPackage';
2
+ export interface ResourceInput {
3
+ entityName: string;
4
+ /** Pre-fetched CSV/TSV text content. */
5
+ csvText: string;
6
+ delimiter: string;
7
+ fieldDescriptions: Record<string, string>;
8
+ }
9
+ export interface ComputeDomainsRequest {
10
+ type: 'compute';
11
+ resources: ResourceInput[];
12
+ }
13
+ export interface EntityDomainsResult {
14
+ type: 'entity-domains';
15
+ entityName: string;
16
+ domains: DataFieldDomain[];
17
+ }
18
+ export interface DoneResult {
19
+ type: 'done';
20
+ }
21
+ export interface ErrorResult {
22
+ type: 'error';
23
+ entityName: string;
24
+ message: string;
25
+ }
26
+ export type WorkerMessage = ComputeDomainsRequest;
27
+ export type WorkerResponse = EntityDomainsResult | DoneResult | ErrorResult;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Join a base path (udi:path) with a resource path, handling:
3
+ * - Base with or without trailing slash
4
+ * - Resource with or without leading slash
5
+ * - HTTP(S) URLs and local relative paths
6
+ */
7
+ export declare function joinDataPath(basePath: string, resourcePath: string): string;
@@ -0,0 +1,7 @@
1
+ import { DataPackageState } from '..';
2
+ export interface StructuredTextSegment {
3
+ type: 'text' | 'value';
4
+ content: string;
5
+ }
6
+ export declare function evaluateStructuredText(text: string, store: DataPackageState): StructuredTextSegment[];
7
+ export declare function hasStructuredReferences(text: string): boolean;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Web Worker for computing data field domains from pre-fetched CSV/TSV text.
3
+ *
4
+ * The main thread fetches the CSV text (priming the browser HTTP cache for
5
+ * UDIVis to reuse) and sends it here for the expensive parsing + domain
6
+ * computation, keeping the main thread responsive.
7
+ *
8
+ * Message protocol:
9
+ * Main → Worker: ComputeDomainsRequest (one message with pre-fetched text)
10
+ * Worker → Main: EntityDomainsResult (one per resource, streamed)
11
+ * Worker → Main: DoneResult | ErrorResult (termination)
12
+ */
13
+ export {};
@@ -0,0 +1,6 @@
1
+ import { ClarifyVariableArgs } from '../types';
2
+ interface ClarifyVariableProps extends ClarifyVariableArgs {
3
+ onSelectSuggestion?: (value: string) => void;
4
+ }
5
+ export declare function ClarifyVariable({ message, ambiguous_variables, onSelectSuggestion, }: ClarifyVariableProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,9 @@
1
+ import { Message } from '../../../types/messages';
2
+ interface FilterComponentProps {
3
+ message: Message;
4
+ messageIndex: number;
5
+ toolCallIndex?: number;
6
+ tweakable?: boolean;
7
+ }
8
+ export declare function FilterComponent({ message, messageIndex, toolCallIndex, tweakable, }: FilterComponentProps): import("react/jsx-runtime").JSX.Element | null;
9
+ export {};
@@ -0,0 +1,2 @@
1
+ import { FreeTextExplainArgs } from '../types';
2
+ export declare function FreeTextExplain({ text, has_structured_elements }: FreeTextExplainArgs): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { DataSelection } from '../../dashboard';
2
+ interface IntervalFilterComponentProps {
3
+ dataSelection: DataSelection;
4
+ fieldIndex: number;
5
+ tweakable: boolean;
6
+ filterKey: string;
7
+ }
8
+ export declare function IntervalFilterComponent({ dataSelection, fieldIndex, tweakable, filterKey, }: IntervalFilterComponentProps): import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,8 @@
1
+ import { DataSelection } from '../../dashboard';
2
+ interface PointFilterComponentProps {
3
+ dataSelection: DataSelection;
4
+ tweakable: boolean;
5
+ filterKey: string;
6
+ }
7
+ export declare function PointFilterComponent({ dataSelection, tweakable, filterKey, }: PointFilterComponentProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,7 @@
1
+ interface RebuffNoticeProps {
2
+ message: string;
3
+ suggestions: string[];
4
+ onSelectSuggestion?: (suggestion: string) => void;
5
+ }
6
+ export declare function RebuffNotice({ message, suggestions, onSelectSuggestion }: RebuffNoticeProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};