udi-yac 0.1.6 → 0.2.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 (130) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +25 -0
  3. package/dist/ce-entry-CLKEbGj8.js +88727 -0
  4. package/dist/data/hubmap_snapshot/datapackage.json +13513 -0
  5. package/dist/data/hubmap_snapshot/datasets.tsv +6324 -0
  6. package/dist/data/hubmap_snapshot/donors.tsv +433 -0
  7. package/dist/data/hubmap_snapshot/samples.tsv +4490 -0
  8. package/dist/favicon.svg +22 -1
  9. package/dist/index.d.ts +1 -6
  10. package/dist/rolldown-runtime-CWhphoD1.js +23 -0
  11. package/dist/{app → src/app}/ErrorBoundary.d.ts +2 -1
  12. package/dist/{app → src/app}/UDIChat.d.ts +1 -1
  13. package/dist/{app → src/app}/UDIChatConfig.d.ts +11 -2
  14. package/dist/{app → src/app}/UDIChatContext.d.ts +15 -18
  15. package/dist/src/app/snapshotRegistry.d.ts +19 -0
  16. package/dist/{app → src/app}/validateConfig.d.ts +1 -1
  17. package/dist/{components → src/components}/MarkdownText.d.ts +1 -1
  18. package/dist/{components → src/components}/ui/accordion.d.ts +4 -4
  19. package/dist/{components → src/components}/ui/card.d.ts +7 -7
  20. package/dist/{components → src/components}/ui/checkbox.d.ts +1 -1
  21. package/dist/{components → src/components}/ui/dialog.d.ts +9 -9
  22. package/dist/{components → src/components}/ui/dropdown-menu.d.ts +13 -13
  23. package/dist/{components → src/components}/ui/input.d.ts +1 -1
  24. package/dist/{components → src/components}/ui/label.d.ts +1 -1
  25. package/dist/src/components/ui/popover.d.ts +9 -0
  26. package/dist/{components → src/components}/ui/scroll-area.d.ts +2 -2
  27. package/dist/{components → src/components}/ui/select.d.ts +8 -8
  28. package/dist/{components → src/components}/ui/separator.d.ts +1 -1
  29. package/dist/{components → src/components}/ui/slider.d.ts +2 -1
  30. package/dist/{components → src/components}/ui/switch.d.ts +1 -1
  31. package/dist/{components → src/components}/ui/tabs.d.ts +4 -4
  32. package/dist/{components → src/components}/ui/textarea.d.ts +1 -1
  33. package/dist/{components → src/components}/ui/tooltip.d.ts +3 -3
  34. package/dist/src/features/chat/api/completions.d.ts +27 -0
  35. package/dist/{features → src/features}/chat/components/ApiKeyInput.d.ts +1 -1
  36. package/dist/{features → src/features}/chat/components/ChatHeaderBar.d.ts +2 -1
  37. package/dist/{features → src/features}/chat/components/ChatInput.d.ts +1 -1
  38. package/dist/{features → src/features}/chat/components/ChatPanel.d.ts +1 -1
  39. package/dist/{features → src/features}/chat/components/ClosedVisualizationsPanel.d.ts +1 -1
  40. package/dist/src/features/chat/components/ConversationList.d.ts +1 -0
  41. package/dist/{features → src/features}/chat/components/DebugToggleSection.d.ts +1 -1
  42. package/dist/{features → src/features}/chat/components/InlineExamplePrompts.d.ts +1 -1
  43. package/dist/{features → src/features}/chat/components/MemoryBankButton.d.ts +1 -1
  44. package/dist/{features → src/features}/chat/components/MessageBubble.d.ts +2 -2
  45. package/dist/{features → src/features}/chat/components/MessageList.d.ts +1 -1
  46. package/dist/src/features/chat/components/SessionStatusDialog.d.ts +13 -0
  47. package/dist/{features → src/features}/chat/hooks/useChatApi.d.ts +2 -0
  48. package/dist/{features → src/features}/chat/hooks/useMessageListScroll.d.ts +1 -1
  49. package/dist/src/features/chat/stores/conversationStore.d.ts +34 -0
  50. package/dist/{features → src/features}/dashboard/components/DashboardCard.d.ts +1 -1
  51. package/dist/src/features/dashboard/components/DashboardGrid.d.ts +6 -0
  52. package/dist/src/features/dashboard/components/DashboardPanel.d.ts +1 -0
  53. package/dist/src/features/dashboard/components/DataCounts.d.ts +1 -0
  54. package/dist/src/features/dashboard/components/DownloadButton.d.ts +1 -0
  55. package/dist/src/features/dashboard/components/FilterToolbar.d.ts +1 -0
  56. package/dist/src/features/dashboard/components/GridSettingsButton.d.ts +1 -0
  57. package/dist/src/features/dashboard/components/ScrollAffordances.d.ts +15 -0
  58. package/dist/src/features/dashboard/components/SessionImportExportButton.d.ts +1 -0
  59. package/dist/{features → src/features}/dashboard/components/VizTweakComponent.d.ts +1 -1
  60. package/dist/src/features/dashboard/components/WelcomeSplash.d.ts +1 -0
  61. package/dist/src/features/dashboard/hooks/useLayoutPersistence.d.ts +1 -0
  62. package/dist/{features → src/features}/dashboard/index.d.ts +0 -1
  63. package/dist/{features → src/features}/dashboard/stores/dashboardStore.d.ts +48 -5
  64. package/dist/{features → src/features}/dashboard/stores/dataFiltersStore.d.ts +2 -2
  65. package/dist/{features → src/features}/dashboard/types.d.ts +1 -1
  66. package/dist/src/features/dashboard/utils/dashboardSerialization.d.ts +49 -0
  67. package/dist/src/features/dashboard/utils/gridDefaults.d.ts +17 -0
  68. package/dist/src/features/dashboard/utils/gridPacking.d.ts +56 -0
  69. package/dist/src/features/dashboard/utils/initialCardSize.d.ts +27 -0
  70. package/dist/src/features/dashboard/utils/tweakability.d.ts +20 -0
  71. package/dist/{features → src/features}/data-package/stores/dataPackageStore.d.ts +1 -1
  72. package/dist/{features → src/features}/data-package/utils/structuredTextParser.d.ts +1 -1
  73. package/dist/{features → src/features}/tool-calls/components/ClarifyVariable.d.ts +1 -1
  74. package/dist/{features → src/features}/tool-calls/components/FieldListChip.d.ts +1 -1
  75. package/dist/{features → src/features}/tool-calls/components/FilterComponent.d.ts +2 -2
  76. package/dist/{features → src/features}/tool-calls/components/FreeTextExplain.d.ts +1 -1
  77. package/dist/{features → src/features}/tool-calls/components/IntervalFilterComponent.d.ts +2 -2
  78. package/dist/{features → src/features}/tool-calls/components/PointFilterComponent.d.ts +2 -2
  79. package/dist/{features → src/features}/tool-calls/components/RebuffNotice.d.ts +1 -1
  80. package/dist/{features → src/features}/tool-calls/components/ToolCallRenderer.d.ts +2 -2
  81. package/dist/{features → src/features}/tool-calls/components/VisualizationCard.d.ts +1 -1
  82. package/dist/src/index.d.ts +6 -0
  83. package/dist/src/stores/globalStore.test.d.ts +1 -0
  84. package/dist/{types → src/types}/dataPackage.d.ts +1 -15
  85. package/dist/src/types/usage.d.ts +18 -0
  86. package/dist/src/utils/specMutations.test.d.ts +1 -0
  87. package/dist/udi-yac.css +2 -2
  88. package/dist/udi-yac.js +21577 -15571
  89. package/package.json +10 -8
  90. package/dist/ce-entry-C4ngOj0B.js +0 -42577
  91. package/dist/features/chat/api/completions.d.ts +0 -12
  92. package/dist/features/chat/components/ConversationList.d.ts +0 -1
  93. package/dist/features/chat/stores/conversationStore.d.ts +0 -10
  94. package/dist/features/dashboard/components/DashboardPanel.d.ts +0 -1
  95. package/dist/features/dashboard/components/DataCounts.d.ts +0 -1
  96. package/dist/features/dashboard/components/DownloadButton.d.ts +0 -1
  97. package/dist/features/dashboard/components/FilterToolbar.d.ts +0 -1
  98. package/dist/features/dashboard/components/WelcomeSplash.d.ts +0 -1
  99. package/dist/features/dashboard/stores/selectionsStore.d.ts +0 -7
  100. package/dist/features/data-package/types.d.ts +0 -27
  101. package/dist/features/data-package/workers/domainWorker.d.ts +0 -13
  102. /package/dist/{app/validateConfig.test.d.ts → src/app/snapshotRegistry.test.d.ts} +0 -0
  103. /package/dist/{features/chat/stores/conversationStore.test.d.ts → src/app/validateConfig.test.d.ts} +0 -0
  104. /package/dist/{components → src/components}/ui/badge.d.ts +0 -0
  105. /package/dist/{components → src/components}/ui/button.d.ts +0 -0
  106. /package/dist/{features → src/features}/chat/hooks/useApiKey.d.ts +0 -0
  107. /package/dist/{features → src/features}/chat/hooks/useDebugExports.d.ts +0 -0
  108. /package/dist/{features → src/features}/chat/hooks/useExamplePrompts.d.ts +0 -0
  109. /package/dist/{features → src/features}/chat/hooks/useResetHandlers.d.ts +0 -0
  110. /package/dist/{features → src/features}/chat/index.d.ts +0 -0
  111. /package/dist/{features/dashboard/stores/dashboardStore.test.d.ts → src/features/chat/stores/conversationStore.test.d.ts} +0 -0
  112. /package/dist/{features → src/features}/dashboard/components/VizTweakComponent.types.d.ts +0 -0
  113. /package/dist/{features/dashboard/stores/dataFiltersStore.test.d.ts → src/features/dashboard/stores/dashboardStore.test.d.ts} +0 -0
  114. /package/dist/{features/dashboard/stores/memoryBankStore.test.d.ts → src/features/dashboard/stores/dataFiltersStore.test.d.ts} +0 -0
  115. /package/dist/{features → src/features}/dashboard/stores/memoryBankStore.d.ts +0 -0
  116. /package/dist/{features/dashboard/stores/selectionsStore.test.d.ts → src/features/dashboard/stores/memoryBankStore.test.d.ts} +0 -0
  117. /package/dist/{features/data-package/stores/dataPackageStore.test.d.ts → src/features/dashboard/utils/dashboardSerialization.test.d.ts} +0 -0
  118. /package/dist/{features/data-package/utils/joinDataPath.test.d.ts → src/features/dashboard/utils/gridPacking.test.d.ts} +0 -0
  119. /package/dist/{features → src/features}/data-package/index.d.ts +0 -0
  120. /package/dist/{features/data-package/utils/structuredTextParser.test.d.ts → src/features/data-package/stores/dataPackageStore.test.d.ts} +0 -0
  121. /package/dist/{features → src/features}/data-package/utils/joinDataPath.d.ts +0 -0
  122. /package/dist/{stores/globalStore.test.d.ts → src/features/data-package/utils/joinDataPath.test.d.ts} +0 -0
  123. /package/dist/{utils/specMutations.test.d.ts → src/features/data-package/utils/structuredTextParser.test.d.ts} +0 -0
  124. /package/dist/{features → src/features}/tool-calls/index.d.ts +0 -0
  125. /package/dist/{features → src/features}/tool-calls/types.d.ts +0 -0
  126. /package/dist/{lib → src/lib}/utils.d.ts +0 -0
  127. /package/dist/{stores → src/stores}/globalStore.d.ts +0 -0
  128. /package/dist/{test → src/test}/setup.d.ts +0 -0
  129. /package/dist/{types → src/types}/messages.d.ts +0 -0
  130. /package/dist/{utils → src/utils}/specMutations.d.ts +0 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 HIDIVE Lab
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -85,6 +85,7 @@ import 'udi-yac/style.css';
85
85
  | `mascot` | `ReactNode \| null?` | Replace or hide the welcome mascot. See [Custom mascot](#custom-mascot). |
86
86
  | `splashMessages` | `readonly string[]?` | Override or hide the randomised prompt above the mascot. See [Custom splash messages](#custom-splash-messages). |
87
87
  | `onEvent` | `TrackerFn?` | Analytics callback invoked on key user actions. See [Analytics events](#analytics-events). |
88
+ | `palette` | `UDIPalette?` | Default color palette for every chart and table. See [Custom color palette](#custom-color-palette). |
88
89
  | `className` | `string?` | CSS class for the root element |
89
90
  | `style` | `CSSProperties?` | Inline styles for the root element |
90
91
 
@@ -279,6 +280,30 @@ const icons: EntityIconMap = {
279
280
 
280
281
  Consumer entries are merged on top of the built-in icons (`donors`, `samples`, `datasets`, …) — you only need to supply the names you want to override or add. Entities with no match fall back to a generic table icon.
281
282
 
283
+ ### Custom color palette
284
+
285
+ Pass `palette` on `UDIChatConfig` to set the default colors used by every chart and table (dashboard cards, chat-message previews, and the memory bank). A spec-level per-encoding `range` still overrides the palette.
286
+
287
+ ```tsx
288
+ import { UDIChat } from 'udi-yac';
289
+ import type { UDIPalette } from 'udi-toolkit/react';
290
+ import { interpolateViridis } from 'd3-scale-chromatic';
291
+
292
+ const palette: UDIPalette = {
293
+ // Single default mark color.
294
+ mark: '#0673b0',
295
+ // Categorical colors (nominal scales). An array, or a named Vega scheme string.
296
+ category: ['#1b9e77', '#d95f02', '#7570b3', '#e7298a', '#66a61e'],
297
+ // Continuous color for numeric scales — a scheme name, a color array, or a
298
+ // function `(t: number) => string` (t in [0, 1]).
299
+ ramp: (t) => interpolateViridis(t),
300
+ };
301
+
302
+ <UDIChat apiBaseUrl="http://localhost:8007" palette={palette} />;
303
+ ```
304
+
305
+ The `category`/`ordinal` fields accept a color array or a Vega scheme name. The `ramp` accepts a scheme name, a color array, or an interpolator function. Note: in the **table** renderer, function and array ramps are honored, while a bare scheme-name ramp falls back to the default (scheme names apply fully to Vega charts).
306
+
282
307
  ### Custom mascot
283
308
 
284
309
  The empty-dashboard welcome splash renders a YAC mascot by default. Consumers can replace it or hide it via the `mascot` prop on `UDIChatConfig`: