@timbal-ai/timbal-react 0.8.2 → 1.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 (43) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/README.md +100 -6
  3. package/dist/app.cjs +2538 -1262
  4. package/dist/app.d.cts +11 -6
  5. package/dist/app.d.ts +11 -6
  6. package/dist/app.esm.js +43 -6
  7. package/dist/{button-ClSgD6OF.d.cts → button-BoyX5pM_.d.cts} +1 -1
  8. package/dist/{button-ClSgD6OF.d.ts → button-BoyX5pM_.d.ts} +1 -1
  9. package/dist/{chart-artifact-Bl67kre7.d.ts → chart-artifact-BZp7nmaf.d.ts} +430 -14
  10. package/dist/{chart-artifact-BzcvblDe.d.cts → chart-artifact-CX-rh9nq.d.cts} +430 -14
  11. package/dist/{chat-Bed4FQSl.d.cts → chat-DCms8pJ_.d.cts} +31 -4
  12. package/dist/{chat-Bed4FQSl.d.ts → chat-DCms8pJ_.d.ts} +31 -4
  13. package/dist/chat.cjs +1111 -776
  14. package/dist/chat.d.cts +1 -1
  15. package/dist/chat.d.ts +1 -1
  16. package/dist/chat.esm.js +3 -3
  17. package/dist/{chunk-QVAUCVQA.esm.js → chunk-4AKJ6FKE.esm.js} +277 -4
  18. package/dist/chunk-6HWMJNZT.esm.js +3439 -0
  19. package/dist/{chunk-VWHHKAHN.esm.js → chunk-FRZOEYBO.esm.js} +4 -4
  20. package/dist/chunk-JEAUF54A.esm.js +52 -0
  21. package/dist/{chunk-OISVICYF.esm.js → chunk-P3KDAYX6.esm.js} +1 -1
  22. package/dist/{chunk-6YVKCVEP.esm.js → chunk-TK2AGIME.esm.js} +1106 -298
  23. package/dist/{chunk-CFU3YDTV.esm.js → chunk-XCM3V6RK.esm.js} +5 -5
  24. package/dist/{chunk-5ZKLPWVN.esm.js → chunk-YXZ22OJN.esm.js} +849 -667
  25. package/dist/index.cjs +6070 -1605
  26. package/dist/index.d.cts +8 -6
  27. package/dist/index.d.ts +8 -6
  28. package/dist/index.esm.js +427 -11
  29. package/dist/pill-segmented-tabs-Ba5q0feL.d.cts +500 -0
  30. package/dist/pill-segmented-tabs-Ba5q0feL.d.ts +500 -0
  31. package/dist/studio.cjs +1333 -998
  32. package/dist/studio.d.cts +2 -2
  33. package/dist/studio.d.ts +2 -2
  34. package/dist/studio.esm.js +5 -5
  35. package/dist/styles.css +220 -0
  36. package/dist/ui.cjs +3592 -89
  37. package/dist/ui.d.cts +72 -96
  38. package/dist/ui.d.ts +72 -96
  39. package/dist/ui.esm.js +400 -6
  40. package/dist/{welcome-COOb05a5.d.cts → welcome-CRqOPKMp.d.cts} +1 -1
  41. package/dist/{welcome-DE08m9ca.d.ts → welcome-DlHUa3OL.d.ts} +1 -1
  42. package/package.json +9 -3
  43. package/dist/chunk-P4SN7M67.esm.js +0 -435
@@ -204,19 +204,46 @@ declare function isUiBinding(value: unknown): value is {
204
204
  $bind: string;
205
205
  };
206
206
 
207
+ /** Per-series presentation config (shadcn `ChartConfig` analog). */
208
+ interface ChartSeriesConfig {
209
+ dataKey: string;
210
+ /** Legend / tooltip label. Defaults to `dataKey`. */
211
+ label?: string;
212
+ /** CSS color (token or literal). Defaults to the theme `--chart-N` palette. */
213
+ color?: string;
214
+ }
207
215
  interface ChartArtifact {
208
216
  type: "chart";
209
- /** Chart kind. Renderer maps these to the underlying lib (e.g. recharts). */
210
- chartType?: "bar" | "line" | "area" | "pie";
217
+ /** Chart kind. Cartesian kinds share one SVG engine; pie/donut/radial/radar are radial. */
218
+ chartType?: "bar" | "horizontalBar" | "line" | "area" | "pie" | "donut" | "radial" | "radar";
211
219
  /** Optional title rendered above the chart. */
212
220
  title?: string;
221
+ /** Optional sub-title / caption rendered under the title. */
222
+ description?: string;
213
223
  /** Array of data points. Keys map to series via `dataKey` / `xKey`. */
214
224
  data: Array<Record<string, unknown>>;
215
225
  /** Field name on each data point used for the X axis / category. */
216
226
  xKey?: string;
217
227
  /** Field name(s) used for series. Defaults to all keys except `xKey`. */
218
228
  dataKey?: string | string[];
219
- /** Optional unit label appended to numeric axis ticks. */
229
+ /**
230
+ * Rich per-series config (labels + colors). Takes precedence over `dataKey`.
231
+ * Mirrors shadcn's `ChartConfig`.
232
+ */
233
+ series?: ChartSeriesConfig[];
234
+ /** Stack bar / area series on top of each other. */
235
+ stacked?: boolean;
236
+ /** Line / area interpolation. Default `monotone`. */
237
+ curve?: "monotone" | "linear" | "step";
238
+ /** Draw point markers on line / area series. */
239
+ dots?: boolean;
240
+ /** Tooltip series marker style. Default `dot`. */
241
+ tooltipIndicator?: "dot" | "line" | "dashed";
242
+ /** Show the series legend. */
243
+ legend?: boolean;
244
+ /** Per-slice / per-ring colors for pie / donut / radial. */
245
+ colors?: string[];
246
+ /** Optional unit label appended to numeric axis ticks and tooltip values. */
220
247
  unit?: string;
221
248
  }
222
249
  interface QuestionOption {
@@ -657,4 +684,4 @@ interface TimbalChatProps extends Omit<TimbalRuntimeProviderProps, "children">,
657
684
  }
658
685
  declare function TimbalChat({ workforceId, baseUrl, fetch, attachments, attachmentsUploadUrl, attachmentsAccept, debug, ...threadProps }: TimbalChatProps): react_jsx_runtime.JSX.Element;
659
686
 
660
- export { UiCustomNodeRegistryProvider as $, useTimbalRuntime as A, useTimbalStream as B, type ChartArtifact as C, type UiArtifact as D, type UiNode as E, type AnyArtifact as F, type TableArtifact as G, type HtmlArtifact as H, type ArtifactRegistry as I, type JsonArtifact as J, ArtifactRegistryProvider as K, type ArtifactRenderer as L, type ArtifactRendererProps as M, ArtifactView as N, type CreateDefaultAttachmentAdapterOptions as O, type CreateUploadAttachmentAdapterOptions as P, type QuestionArtifact as Q, DEFAULT_UPLOAD_ACCEPT as R, type SendOptions as S, type ThreadVariant as T, type UseTimbalStreamOptions as U, type QuestionOption as V, type ResolveAttachmentAdapterOptions as W, type TimbalArtifact as X, type TimbalAttachmentsConfig as Y, type TimbalAttachmentsProp as Z, type UiAction as _, TimbalChat as a, type UiEventEnvelope as a0, UiEventProvider as a1, type UploadFetchFn as a2, createDefaultAttachmentAdapter as a3, createUploadAttachmentAdapter as a4, defaultArtifactRenderers as a5, getPath as a6, isArtifact as a7, isUiBinding as a8, resolveAttachmentAdapter as a9, resolveBindable as aa, setPath as ab, useArtifactRegistry as ac, useUiCustomNodeRegistry as ad, useUiDispatch as ae, useUiEventEmitter as af, useUiState as ag, type TimbalChatProps as b, type ChatAttachment as c, type ChatMessage as d, Composer as e, type ComposerProps as f, type ContentPart as g, Suggestions as h, type SuggestionsComponent as i, type SuggestionsSlotProps as j, type SuggestionsSource as k, type TextContentPart as l, type ThinkingContentPart as m, Thread as n, type ThreadArtifactsConfig as o, type ThreadComponents as p, type ThreadProps as q, type ThreadSuggestion as r, type ThreadSuggestionsProps as s, type ThreadWelcomeConfig as t, type ThreadWelcomeProps as u, TimbalRuntimeProvider as v, type TimbalRuntimeProviderProps as w, type TimbalStreamApi as x, type ToolCallContentPart as y, useResolvedSuggestions as z };
687
+ export { type UiAction as $, useResolvedSuggestions as A, useTimbalRuntime as B, type ChartArtifact as C, useTimbalStream as D, type UiArtifact as E, type UiNode as F, type AnyArtifact as G, type HtmlArtifact as H, type TableArtifact as I, type JsonArtifact as J, type ArtifactRegistry as K, ArtifactRegistryProvider as L, type ArtifactRenderer as M, type ArtifactRendererProps as N, ArtifactView as O, type CreateDefaultAttachmentAdapterOptions as P, type QuestionArtifact as Q, type CreateUploadAttachmentAdapterOptions as R, type SendOptions as S, type ThreadVariant as T, type UseTimbalStreamOptions as U, DEFAULT_UPLOAD_ACCEPT as V, type QuestionOption as W, type ResolveAttachmentAdapterOptions as X, type TimbalArtifact as Y, type TimbalAttachmentsConfig as Z, type TimbalAttachmentsProp as _, type ChartSeriesConfig as a, UiCustomNodeRegistryProvider as a0, type UiEventEnvelope as a1, UiEventProvider as a2, type UploadFetchFn as a3, createDefaultAttachmentAdapter as a4, createUploadAttachmentAdapter as a5, defaultArtifactRenderers as a6, getPath as a7, isArtifact as a8, isUiBinding as a9, resolveAttachmentAdapter as aa, resolveBindable as ab, setPath as ac, useArtifactRegistry as ad, useUiCustomNodeRegistry as ae, useUiDispatch as af, useUiEventEmitter as ag, useUiState as ah, TimbalChat as b, type TimbalChatProps as c, type ChatAttachment as d, type ChatMessage as e, Composer as f, type ComposerProps as g, type ContentPart as h, Suggestions as i, type SuggestionsComponent as j, type SuggestionsSlotProps as k, type SuggestionsSource as l, type TextContentPart as m, type ThinkingContentPart as n, Thread as o, type ThreadArtifactsConfig as p, type ThreadComponents as q, type ThreadProps as r, type ThreadSuggestion as s, type ThreadSuggestionsProps as t, type ThreadWelcomeConfig as u, type ThreadWelcomeProps as v, TimbalRuntimeProvider as w, type TimbalRuntimeProviderProps as x, type TimbalStreamApi as y, type ToolCallContentPart as z };