udi-yac 0.2.3 → 0.3.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.
- package/README.md +38 -25
- package/dist/{ce-entry-CLKEbGj8.js → ce-entry-BN36qTNy.js} +21608 -21351
- package/dist/src/app/ErrorBoundary.d.ts +1 -1
- package/dist/src/app/UDIChatConfig.d.ts +9 -0
- package/dist/src/app/validateConfig.d.ts +0 -12
- package/dist/src/components/FieldTooltipContent.d.ts +12 -0
- package/dist/src/components/ui/accordion.d.ts +8 -1
- package/dist/src/features/chat/components/BrushFilterWidgets.d.ts +8 -0
- package/dist/src/features/dashboard/components/VizTweakComponent.types.d.ts +9 -0
- package/dist/src/features/dashboard/hooks/useBrushFilters.d.ts +45 -0
- package/dist/src/features/dashboard/hooks/useBrushFilters.test.d.ts +1 -0
- package/dist/src/features/dashboard/index.d.ts +1 -0
- package/dist/src/features/dashboard/utils/relevantTableMapping.d.ts +21 -0
- package/dist/src/features/dashboard/utils/relevantTableMapping.test.d.ts +1 -0
- package/dist/src/features/dashboard/utils/tweakability.d.ts +31 -14
- package/dist/src/features/data-package/components/DataOverviewPanel.d.ts +10 -0
- package/dist/src/features/data-package/components/DataOverviewPanel.test.d.ts +1 -0
- package/dist/src/features/data-package/components/EntityOverview.d.ts +10 -0
- package/dist/src/features/data-package/index.d.ts +1 -0
- package/dist/src/features/data-package/stores/dataPackageStore.d.ts +14 -0
- package/dist/src/features/data-package/utils/entityOverview.d.ts +136 -0
- package/dist/src/features/data-package/utils/entityOverview.test.d.ts +1 -0
- package/dist/src/features/tool-calls/components/IntervalFilterComponent.d.ts +8 -1
- package/dist/src/features/tool-calls/components/PointFilterComponent.d.ts +7 -1
- package/dist/src/features/tool-calls/components/PointFilterComponent.test.d.ts +1 -0
- package/dist/src/features/tool-calls/index.d.ts +2 -0
- package/dist/src/lib/chatRoot.d.ts +7 -0
- package/dist/src/stores/globalStore.d.ts +10 -0
- package/dist/src/utils/entityIcons.d.ts +10 -0
- package/dist/src/utils/highlightMatch.d.ts +7 -0
- package/dist/src/utils/httpError.d.ts +11 -0
- package/dist/src/utils/httpError.test.d.ts +1 -0
- package/dist/src/utils/specMutations.d.ts +73 -17
- package/dist/udi-yac.css +1 -1
- package/dist/udi-yac.js +29202 -27869
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -59,35 +59,48 @@ The project builds as both a **library** and a **standalone app**:
|
|
|
59
59
|
import { UDIChat } from 'udi-yac';
|
|
60
60
|
import 'udi-yac/style.css';
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
62
|
+
// UDIChat fills its parent, so that parent needs a definite height — with an
|
|
63
|
+
// `auto`-height ancestor it collapses to nothing.
|
|
64
|
+
<div className="h-screen">
|
|
65
|
+
<UDIChat
|
|
66
|
+
apiBaseUrl="http://localhost:8007"
|
|
67
|
+
dataPackagePath="./data/hubmap/datapackage.json"
|
|
68
|
+
authToken="your-jwt-token" // optional
|
|
69
|
+
requireApiKey // optional — prompts for OpenAI key
|
|
70
|
+
/>
|
|
71
|
+
</div>;
|
|
69
72
|
```
|
|
70
73
|
|
|
74
|
+
Embedding in another app? Two things worth knowing up front:
|
|
75
|
+
|
|
76
|
+
- **`apiBaseUrl` accepts a same-origin path** (`/api/yac`), so agent traffic can go
|
|
77
|
+
through your own reverse proxy and let your server attach auth — no CORS, no token in
|
|
78
|
+
the browser. `authToken` is then unnecessary.
|
|
79
|
+
- **Every style is scoped** to the root element's `udi-yac` class, so the stylesheet
|
|
80
|
+
won't touch your app's own shadcn tokens or typography. Dark mode follows a `.dark`
|
|
81
|
+
class on any ancestor (the usual shadcn convention).
|
|
82
|
+
|
|
71
83
|
### Config Props
|
|
72
84
|
|
|
73
|
-
| Prop | Type | Description
|
|
74
|
-
| ------------------ | -------------------- |
|
|
75
|
-
| `apiBaseUrl` | `string` | Base URL for the UDIAgent API
|
|
76
|
-
| `
|
|
77
|
-
| `
|
|
78
|
-
| `
|
|
79
|
-
| `
|
|
80
|
-
| `
|
|
81
|
-
| `
|
|
82
|
-
| `
|
|
83
|
-
| `
|
|
84
|
-
| `
|
|
85
|
-
| `
|
|
86
|
-
| `
|
|
87
|
-
| `
|
|
88
|
-
| `
|
|
89
|
-
| `
|
|
90
|
-
| `
|
|
85
|
+
| Prop | Type | Description |
|
|
86
|
+
| ------------------ | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
87
|
+
| `apiBaseUrl` | `string` | Base URL for the UDIAgent API. Absolute (`https://agent.example.org`) or a same-origin path (`/api/yac`). |
|
|
88
|
+
| `remotePackage` | `string?` | Server-side data package name. Schema/domains come from `GET /v1/yac/metadata` and queries from `POST /v1/yac/query`; no CSVs load in the browser and cross-filtering becomes commit-on-mouse-up. Takes precedence over both data-package props. |
|
|
89
|
+
| `dataPackagePath` | `string?` | URL/path to `datapackage_udi.json`. Ignored when `dataPackage` is provided. |
|
|
90
|
+
| `dataPackage` | `DataPackage?` | Provide a data package object directly instead of fetching from a URL. Takes precedence over `dataPackagePath`. |
|
|
91
|
+
| `dataFieldDomains` | `DataFieldDomain[]?` | Pre-computed field domains. Skips CSV loading for domain computation when provided with `dataPackage`. |
|
|
92
|
+
| `fetchOptions` | `RequestInit?` | Custom fetch options (headers, credentials, etc.) forwarded to all data-loading fetch calls. |
|
|
93
|
+
| `authToken` | `string?` | JWT bearer token for API auth |
|
|
94
|
+
| `requireApiKey` | `boolean?` | Show API key input before chatting |
|
|
95
|
+
| `model` | `string?` | LLM model name override |
|
|
96
|
+
| `downloadActions` | `DownloadAction[]?` | Extra items appended to the Download Data dropdown. See [Custom download actions](#custom-download-actions). |
|
|
97
|
+
| `entityIcons` | `EntityIconMap?` | Icon overrides for entity count chips. See [Custom entity icons](#custom-entity-icons). |
|
|
98
|
+
| `mascot` | `ReactNode \| null?` | Replace or hide the welcome mascot. See [Custom mascot](#custom-mascot). |
|
|
99
|
+
| `splashMessages` | `readonly string[]?` | Override or hide the randomised prompt above the mascot. See [Custom splash messages](#custom-splash-messages). |
|
|
100
|
+
| `onEvent` | `TrackerFn?` | Analytics callback invoked on key user actions. See [Analytics events](#analytics-events). |
|
|
101
|
+
| `palette` | `UDIPalette?` | Default color palette for every chart and table. See [Custom color palette](#custom-color-palette). |
|
|
102
|
+
| `className` | `string?` | CSS class for the root element |
|
|
103
|
+
| `style` | `CSSProperties?` | Inline styles for the root element |
|
|
91
104
|
|
|
92
105
|
### Data Source Configuration
|
|
93
106
|
|