@timbal-ai/timbal-react 0.8.1 → 0.8.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.
package/dist/index.cjs CHANGED
@@ -187,6 +187,7 @@ __export(index_exports, {
187
187
  createTimbalTheme: () => createTimbalTheme,
188
188
  createUploadAttachmentAdapter: () => createUploadAttachmentAdapter,
189
189
  defaultArtifactRenderers: () => defaultArtifactRenderers,
190
+ ensureThemeFontLink: () => ensureThemeFontLink,
190
191
  fetchCurrentUser: () => fetchCurrentUser,
191
192
  findMarkdownArtifacts: () => findMarkdownArtifacts,
192
193
  getAccessToken: () => getAccessToken,
@@ -6800,6 +6801,38 @@ function relativeLuminance(color) {
6800
6801
  }
6801
6802
 
6802
6803
  // src/design/theme.ts
6804
+ var SHADOW_PRESETS = {
6805
+ none: {
6806
+ lightCard: "none",
6807
+ lightElevated: "none",
6808
+ darkCard: "none",
6809
+ darkElevated: "none"
6810
+ },
6811
+ hairline: {
6812
+ lightCard: "0 0 0 1px rgba(15, 23, 42, 0.06)",
6813
+ lightElevated: "0 1px 2px rgba(15, 23, 42, 0.06)",
6814
+ darkCard: "0 0 0 1px rgba(255, 255, 255, 0.06)",
6815
+ darkElevated: "0 2px 8px rgba(0, 0, 0, 0.4)"
6816
+ },
6817
+ soft: {
6818
+ lightCard: "0 1px 2px rgba(15, 23, 42, 0.04)",
6819
+ lightElevated: "0 8px 30px rgba(15, 23, 42, 0.07)",
6820
+ darkCard: "0 1px 2px rgba(0, 0, 0, 0.3)",
6821
+ darkElevated: "0 10px 34px rgba(0, 0, 0, 0.45)"
6822
+ },
6823
+ medium: {
6824
+ lightCard: "0 1px 2px -0.5px rgba(0, 0, 0, 0.05)",
6825
+ lightElevated: "0 4px 24px rgba(0, 0, 0, 0.06)",
6826
+ darkCard: "0 1px 3px rgba(0, 0, 0, 0.22)",
6827
+ darkElevated: "0 4px 24px rgba(0, 0, 0, 0.35)"
6828
+ },
6829
+ strong: {
6830
+ lightCard: "0 2px 6px rgba(15, 23, 42, 0.10)",
6831
+ lightElevated: "0 16px 48px rgba(15, 23, 42, 0.16)",
6832
+ darkCard: "0 2px 6px rgba(0, 0, 0, 0.4)",
6833
+ darkElevated: "0 18px 50px rgba(0, 0, 0, 0.6)"
6834
+ }
6835
+ };
6803
6836
  function primaryForMode(brand, mode) {
6804
6837
  if (mode === "light") {
6805
6838
  return { ...brand, l: Math.min(Math.max(brand.l, 0.42), 0.68) };
@@ -6835,8 +6868,26 @@ function createTimbalTheme(intent) {
6835
6868
  const light = {};
6836
6869
  const dark = {};
6837
6870
  const root = {};
6871
+ let fontFamily;
6872
+ let fontImportUrl;
6838
6873
  if (typeof intent.radius === "number") {
6839
6874
  root["--radius"] = `${intent.radius}rem`;
6875
+ root["--radius-2xl"] = `${Math.max(intent.radius + 0.25, 0)}rem`;
6876
+ }
6877
+ if (intent.typography) {
6878
+ const { sans, display, mono, importUrl } = intent.typography;
6879
+ root["--font-sans"] = sans;
6880
+ if (display) root["--font-display"] = display;
6881
+ if (mono) root["--font-mono"] = mono;
6882
+ fontFamily = sans;
6883
+ fontImportUrl = importUrl;
6884
+ }
6885
+ if (intent.shadow) {
6886
+ const s = SHADOW_PRESETS[intent.shadow];
6887
+ light["--shadow-card-value"] = s.lightCard;
6888
+ light["--shadow-card-elevated-value"] = s.lightElevated;
6889
+ dark["--shadow-card-value"] = s.darkCard;
6890
+ dark["--shadow-card-elevated-value"] = s.darkElevated;
6840
6891
  }
6841
6892
  const primaryLight = primaryForMode(brand, "light");
6842
6893
  const primaryDark = primaryForMode(brand, "dark");
@@ -6934,7 +6985,7 @@ function createTimbalTheme(intent) {
6934
6985
  );
6935
6986
  }
6936
6987
  }
6937
- return { light, dark, root };
6988
+ return { light, dark, root, fontFamily, fontImportUrl };
6938
6989
  }
6939
6990
  function declarations(map, indent) {
6940
6991
  return Object.entries(map).map(([name, value]) => `${indent}${name}: ${value};`).join("\n");
@@ -6957,6 +7008,11 @@ ${declarations(theme.dark, indent)}
6957
7008
  }`
6958
7009
  );
6959
7010
  }
7011
+ if (theme.fontFamily) {
7012
+ blocks.push(`${sel} {
7013
+ ${indent}font-family: var(--font-sans);
7014
+ }`);
7015
+ }
6960
7016
  } else {
6961
7017
  if (Object.keys(lightVars).length) {
6962
7018
  blocks.push(`:root {
@@ -6968,13 +7024,43 @@ ${declarations(lightVars, indent)}
6968
7024
  ${declarations(theme.dark, indent)}
6969
7025
  }`);
6970
7026
  }
7027
+ if (theme.fontFamily) {
7028
+ blocks.push(`:root,
7029
+ body {
7030
+ ${indent}font-family: var(--font-sans);
7031
+ }`);
7032
+ }
7033
+ }
7034
+ const css = blocks.join("\n\n");
7035
+ if (options.includeFontImport && theme.fontImportUrl) {
7036
+ return `@import url("${theme.fontImportUrl}");
7037
+
7038
+ ${css}`;
6971
7039
  }
6972
- return blocks.join("\n\n");
7040
+ return css;
6973
7041
  }
6974
7042
  var RUNTIME_STYLE_ID = "timbal-theme-runtime";
7043
+ var FONT_LINK_ATTR = "data-timbal-theme-font";
7044
+ function ensureThemeFontLink(url) {
7045
+ if (typeof document === "undefined") return;
7046
+ const existing = document.head.querySelector(
7047
+ `link[${FONT_LINK_ATTR}]`
7048
+ );
7049
+ if (!url) {
7050
+ existing?.remove();
7051
+ return;
7052
+ }
7053
+ if (existing?.getAttribute("href") === url) return;
7054
+ const link = existing ?? document.createElement("link");
7055
+ link.rel = "stylesheet";
7056
+ link.href = url;
7057
+ link.setAttribute(FONT_LINK_ATTR, "");
7058
+ if (!existing) document.head.appendChild(link);
7059
+ }
6975
7060
  function applyTimbalTheme(theme) {
6976
7061
  if (typeof document === "undefined") return () => {
6977
7062
  };
7063
+ ensureThemeFontLink(theme.fontImportUrl);
6978
7064
  let el = document.getElementById(RUNTIME_STYLE_ID);
6979
7065
  if (!el) {
6980
7066
  el = document.createElement("style");
@@ -6985,11 +7071,13 @@ function applyTimbalTheme(theme) {
6985
7071
  el.textContent = themeToCss(theme);
6986
7072
  return () => {
6987
7073
  el?.parentNode?.removeChild(el);
7074
+ ensureThemeFontLink(void 0);
6988
7075
  };
6989
7076
  }
6990
7077
  function clearTimbalTheme() {
6991
7078
  if (typeof document === "undefined") return;
6992
7079
  document.getElementById(RUNTIME_STYLE_ID)?.remove();
7080
+ ensureThemeFontLink(void 0);
6993
7081
  }
6994
7082
  function isDev2() {
6995
7083
  if (typeof process !== "undefined" && process.env?.NODE_ENV === "production") {
@@ -7000,48 +7088,122 @@ function isDev2() {
7000
7088
 
7001
7089
  // src/design/theme-presets.ts
7002
7090
  var EMPTY_TOKENS = { light: {}, dark: {}, root: {} };
7091
+ var FONT_URL = {
7092
+ geist: "https://fonts.googleapis.com/css2?family=Geist:wght@400..600&display=swap",
7093
+ sora: "https://fonts.googleapis.com/css2?family=Sora:wght@400..600&display=swap",
7094
+ lexend: "https://fonts.googleapis.com/css2?family=Lexend:wght@400..600&display=swap",
7095
+ inter: "https://fonts.googleapis.com/css2?family=Inter:wght@400..600&display=swap",
7096
+ fraunces: "https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400..600&display=swap",
7097
+ jetbrains: "https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400..600&display=swap"
7098
+ };
7099
+ var STACK = {
7100
+ geist: '"Geist", ui-sans-serif, system-ui, sans-serif',
7101
+ sora: '"Sora", ui-sans-serif, system-ui, sans-serif',
7102
+ lexend: '"Lexend", ui-sans-serif, system-ui, sans-serif',
7103
+ inter: '"Inter", ui-sans-serif, system-ui, sans-serif',
7104
+ fraunces: '"Fraunces", ui-serif, Georgia, "Times New Roman", serif',
7105
+ jetbrains: '"JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace'
7106
+ };
7003
7107
  var TIMBAL_THEME_PRESETS = [
7004
7108
  {
7005
7109
  id: "platform",
7006
7110
  label: "Platform",
7007
- description: "Shipped neutral monochrome \u2014 the Timbal Platform default. Calm, brand-agnostic.",
7111
+ description: "Shipped neutral monochrome \u2014 the Timbal Platform default. Calm, brand-agnostic, system font.",
7008
7112
  swatch: "oklch(0.205 0 0)",
7113
+ font: null,
7009
7114
  tokens: EMPTY_TOKENS
7010
7115
  },
7011
7116
  {
7012
7117
  id: "indigo",
7013
7118
  label: "Indigo",
7014
- description: "Cool, trustworthy blue-violet \u2014 good for analytics & ops dashboards.",
7119
+ description: "Cool, trustworthy blue-violet, Geist type, generous radius, soft shadows \u2014 analytics & ops dashboards.",
7015
7120
  swatch: "#4f46e5",
7016
- tokens: createTimbalTheme({ brand: "#4f46e5" })
7121
+ font: "Geist",
7122
+ tokens: createTimbalTheme({
7123
+ brand: "#4f46e5",
7124
+ radius: 0.875,
7125
+ shadow: "soft",
7126
+ typography: { sans: STACK.geist, importUrl: FONT_URL.geist }
7127
+ })
7017
7128
  },
7018
7129
  {
7019
7130
  id: "violet",
7020
7131
  label: "Violet",
7021
- description: "Vivid purple \u2014 expressive, product/marketing-leaning surfaces.",
7132
+ description: "Vivid purple, Sora type, rounded, soft shadows \u2014 expressive product / marketing surfaces.",
7022
7133
  swatch: "#7c3aed",
7023
- tokens: createTimbalTheme({ brand: "#7c3aed" })
7134
+ font: "Sora",
7135
+ tokens: createTimbalTheme({
7136
+ brand: "#7c3aed",
7137
+ radius: 1,
7138
+ shadow: "soft",
7139
+ typography: { sans: STACK.sora, importUrl: FONT_URL.sora }
7140
+ })
7024
7141
  },
7025
7142
  {
7026
7143
  id: "forest",
7027
7144
  label: "Forest",
7028
- description: "Grounded green \u2014 finance, sustainability, status-positive apps.",
7145
+ description: "Grounded green, Lexend type, compact radius \u2014 finance, sustainability, status-positive apps.",
7029
7146
  swatch: "#16a34a",
7030
- tokens: createTimbalTheme({ brand: "#16a34a" })
7147
+ font: "Lexend",
7148
+ tokens: createTimbalTheme({
7149
+ brand: "#16a34a",
7150
+ radius: 0.625,
7151
+ shadow: "soft",
7152
+ typography: { sans: STACK.lexend, importUrl: FONT_URL.lexend }
7153
+ })
7031
7154
  },
7032
7155
  {
7033
7156
  id: "warm",
7034
7157
  label: "Warm",
7035
- description: "Energetic orange \u2014 consumer, creative, high-engagement tools.",
7158
+ description: "Energetic orange, Lexend type, friendly radius \u2014 consumer, creative, high-engagement tools.",
7036
7159
  swatch: "#ea580c",
7037
- tokens: createTimbalTheme({ brand: "#ea580c" })
7160
+ font: "Lexend",
7161
+ tokens: createTimbalTheme({
7162
+ brand: "#ea580c",
7163
+ radius: 0.875,
7164
+ shadow: "soft",
7165
+ typography: { sans: STACK.lexend, importUrl: FONT_URL.lexend }
7166
+ })
7038
7167
  },
7039
7168
  {
7040
7169
  id: "slate",
7041
7170
  label: "Slate",
7042
- description: "Muted cool gray-blue with a subtle tint \u2014 understated enterprise.",
7171
+ description: "Muted enterprise gray-blue, Inter type, tight radius, hairline shadows, tinted neutrals.",
7043
7172
  swatch: "#475569",
7044
- tokens: createTimbalTheme({ brand: "#475569", tintNeutrals: true })
7173
+ font: "Inter",
7174
+ tokens: createTimbalTheme({
7175
+ brand: "#475569",
7176
+ radius: 0.5,
7177
+ shadow: "hairline",
7178
+ tintNeutrals: true,
7179
+ typography: { sans: STACK.inter, importUrl: FONT_URL.inter }
7180
+ })
7181
+ },
7182
+ {
7183
+ id: "folio",
7184
+ label: "Folio",
7185
+ description: "Editorial serif (Fraunces), near-sharp corners, hairline shadows \u2014 content / docs / reports.",
7186
+ swatch: "#9a3412",
7187
+ font: "Fraunces",
7188
+ tokens: createTimbalTheme({
7189
+ brand: "#9a3412",
7190
+ radius: 0.25,
7191
+ shadow: "hairline",
7192
+ typography: { sans: STACK.fraunces, importUrl: FONT_URL.fraunces }
7193
+ })
7194
+ },
7195
+ {
7196
+ id: "carbon",
7197
+ label: "Carbon",
7198
+ description: "Terminal monospace (JetBrains Mono), crisp corners, green accent \u2014 developer / infra tools.",
7199
+ swatch: "#15803d",
7200
+ font: "JetBrains Mono",
7201
+ tokens: createTimbalTheme({
7202
+ brand: "#15803d",
7203
+ radius: 0.375,
7204
+ shadow: "hairline",
7205
+ typography: { sans: STACK.jetbrains, importUrl: FONT_URL.jetbrains }
7206
+ })
7045
7207
  }
7046
7208
  ];
7047
7209
  var PRESET_BY_ID = new Map(
@@ -7082,18 +7244,29 @@ The package ships a complete light + dark token system (\`styles.css\`). Compone
7082
7244
 
7083
7245
  **Never write \`oklch(...)\` / hex literals or hand-author paired \`:root\` + \`.dark\` blocks.** Express intent and let the package derive a complete, contrast-correct, paired palette.
7084
7246
 
7085
- ### Pick a brand color (rebrand)
7247
+ ### Generate a full personality (color + roundness + fonts + shadows)
7086
7248
 
7087
7249
  \`\`\`ts
7088
7250
  import { createTimbalTheme, themeToCss } from "@timbal-ai/timbal-react";
7089
7251
 
7090
- const theme = createTimbalTheme({ brand: "#4f46e5" /* accent?, radius?, tintNeutrals? */ });
7091
- // Build-time: write once into your app CSS (paired light + dark, guaranteed in sync):
7092
- const css = themeToCss(theme);
7252
+ const theme = createTimbalTheme({
7253
+ brand: "#4f46e5",
7254
+ radius: 0.875, // corner roundness in rem (sets --radius + --radius-2xl)
7255
+ shadow: "soft", // "none" | "hairline" | "soft" | "medium" | "strong"
7256
+ tintNeutrals: false, // tint background/border toward the brand hue
7257
+ accent: "#10b981", // optional secondary accent
7258
+ typography: { // optional \u2014 re-skins every component's font
7259
+ sans: '"Geist", ui-sans-serif, system-ui, sans-serif',
7260
+ importUrl: "https://fonts.googleapis.com/css2?family=Geist:wght@400..600&display=swap",
7261
+ // display?, mono? also supported
7262
+ },
7263
+ });
7264
+ const css = themeToCss(theme); // paired light + dark, guaranteed in sync
7093
7265
  \`\`\`
7094
7266
 
7095
- - For a real company, look up the actual brand hex first (brandfetch / "<company> brand color hex"), then pass it as \`brand\`.
7096
- - \`createTimbalTheme\` derives \`--primary\`, its foreground, ring, the full button gradient, and a soft playground tint. You only supply intent.
7267
+ - \`createTimbalTheme\` derives \`--primary\`, its foreground, ring, the full button gradient, and a soft playground tint from \`brand\`. \`radius\` sets roundness, \`shadow\` sets card depth, \`typography\` sets fonts. You only supply intent \u2014 never raw OKLCH.
7268
+ - For a real company, look up the actual brand hex first (brandfetch / "<company> brand color hex").
7269
+ - **Web fonts must be loaded.** \`applyTimbalTheme\` / \`TimbalThemeStyle\` inject the \`<link>\` for \`typography.importUrl\` automatically. For build-time \`themeToCss\`, add the \`<link rel="stylesheet" href="\u2026">\` to your \`index.html\` yourself (or pass \`themeToCss(theme, { includeFontImport: true })\` when the result is a standalone stylesheet).
7097
7270
 
7098
7271
  ### Apply a theme
7099
7272
 
@@ -7110,14 +7283,18 @@ import { TIMBAL_THEME_PRESETS, applyThemePreset } from "@timbal-ai/timbal-react"
7110
7283
  // TIMBAL_THEME_PRESETS: { id, label, description, swatch, tokens }[]
7111
7284
  \`\`\`
7112
7285
 
7113
- | Preset id | Use when |
7114
- |-----------|----------|
7115
- | \`platform\` | Neutral monochrome default (no brand) |
7116
- | \`indigo\` | Cool, trustworthy \u2014 analytics / ops dashboards |
7117
- | \`violet\` | Expressive purple \u2014 product / marketing |
7118
- | \`forest\` | Green \u2014 finance, sustainability, positive status |
7119
- | \`warm\` | Orange \u2014 consumer / creative / high-engagement |
7120
- | \`slate\` | Muted enterprise gray-blue (tinted neutrals) |
7286
+ Each preset is a **full personality** (color + radius + shadows + font), not just a color:
7287
+
7288
+ | Preset id | Personality |
7289
+ |-----------|-------------|
7290
+ | \`platform\` | Neutral monochrome, system font (the default \u2014 no brand) |
7291
+ | \`indigo\` | Blue-violet, Geist, generous radius, soft shadows \u2014 analytics / ops |
7292
+ | \`violet\` | Purple, Sora, rounded \u2014 product / marketing |
7293
+ | \`forest\` | Green, Lexend, compact \u2014 finance / sustainability |
7294
+ | \`warm\` | Orange, Lexend, friendly \u2014 consumer / creative |
7295
+ | \`slate\` | Enterprise gray-blue, Inter, tight radius, hairline shadows |
7296
+ | \`folio\` | Editorial serif (Fraunces), near-sharp corners \u2014 content / docs |
7297
+ | \`carbon\` | Terminal monospace (JetBrains Mono), green accent \u2014 dev / infra |
7121
7298
 
7122
7299
  - To present options visually, render \`<ThemePresetGallery value={id} onSelect={setId} />\` \u2014 each swatch previews real components (Button + metric tile) scoped via \`data-timbal-theme\`, so the live app doesn't change until the user picks.
7123
7300
  - On selection, call \`applyThemePreset(id)\` (persists to \`localStorage\` and restores on reload).
@@ -7141,14 +7318,17 @@ var TimbalThemeStyle = ({
7141
7318
  if (!tokens) return null;
7142
7319
  const css = themeToCss(tokens, scope ? { scope } : void 0);
7143
7320
  if (!css) return null;
7144
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
7145
- "style",
7146
- {
7147
- "data-timbal-theme-style": scope ?? "root",
7148
- nonce,
7149
- dangerouslySetInnerHTML: { __html: css }
7150
- }
7151
- );
7321
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
7322
+ tokens.fontImportUrl ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("link", { rel: "stylesheet", href: tokens.fontImportUrl }) : null,
7323
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
7324
+ "style",
7325
+ {
7326
+ "data-timbal-theme-style": scope ?? "root",
7327
+ nonce,
7328
+ dangerouslySetInnerHTML: { __html: css }
7329
+ }
7330
+ )
7331
+ ] });
7152
7332
  };
7153
7333
 
7154
7334
  // src/app/data/metrics-shared.tsx
@@ -7314,6 +7494,10 @@ var ThemePresetGallery = ({
7314
7494
  selected ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "text-xs font-medium text-primary", children: "Selected" }) : null
7315
7495
  ] }),
7316
7496
  /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-xs leading-snug text-muted-foreground", children: preset.description }),
7497
+ preset.font ? /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { className: "text-[10px] uppercase tracking-wide text-muted-foreground", children: [
7498
+ "Aa \xB7 ",
7499
+ preset.font
7500
+ ] }) : null,
7317
7501
  /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex flex-col gap-2 rounded-lg border border-border bg-background p-2", children: [
7318
7502
  /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex items-center gap-2", children: [
7319
7503
  /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Button, { size: "xs", className: "pointer-events-none", children: "Primary" }),
@@ -9956,6 +10140,7 @@ function SelectScrollDownButton({
9956
10140
  createTimbalTheme,
9957
10141
  createUploadAttachmentAdapter,
9958
10142
  defaultArtifactRenderers,
10143
+ ensureThemeFontLink,
9959
10144
  fetchCurrentUser,
9960
10145
  findMarkdownArtifacts,
9961
10146
  getAccessToken,
package/dist/index.d.cts CHANGED
@@ -6,7 +6,7 @@ import { ToolCallMessagePartComponent } from '@assistant-ui/react';
6
6
  export { ActionBarPrimitive, AssistantRuntimeProvider, AttachmentAdapter, AuiIf, ComposerPrimitive, MessagePrimitive, ThreadPrimitive, useComposerRuntime, useMessageRuntime, useThread, useThreadRuntime } from '@assistant-ui/react';
7
7
  export { M as ModeToggle, a as ModeToggleProps, b as ModeToggleTheme, S as STUDIO_NAV_MODE, c as StudioModeSwitch, d as StudioModeSwitchProps, e as StudioNavMode, f as StudioSidebar, g as StudioSidebarProps, h as StudioWelcome, i as StudioWelcomeProps, T as TimbalChatShell, j as TimbalChatShellProps, k as TimbalMark, l as TimbalMarkProps, m as TimbalStudioShell, n as TimbalStudioShellProps } from './welcome-COOb05a5.cjs';
8
8
  export { M as MarkdownText, T as THREAD_DEFAULT_MAX_WIDTH, a as ToolFallback, b as TooltipIconButton, c as TooltipIconButtonProps, W as WorkforceSelector, d as WorkforceSelectorProps, e as assistantMessageContentClass, f as assistantMessageRootClass, t as threadMessageColumnClass, u as useToolRunning, g as userMessageRootClass } from './layout-C2G-FcER.cjs';
9
- export { A as APP_KIT_AGENT_INSTRUCTIONS, a as AppChatPanel, b as AppChatPanelProps, c as AppConfirmDialog, d as AppConfirmDialogProps, e as AppCopilotContextValue, f as AppCopilotProvider, g as AppCopilotProviderProps, h as AppShell, i as AppShellChatControls, j as AppShellChatTrigger, k as AppShellChatTriggerProps, l as AppShellProps, m as AppShellTopbar, n as AppShellTopbarProps, B as BreadcrumbItem, o as Breadcrumbs, p as BreadcrumbsProps, C as CHART_PALETTE, q as ChartArtifactView, s as ChartPanel, t as ChartPanelProps, u as ChartSeries, v as ChartVariant, w as ConnectionRow, x as ConnectionRowList, y as ConnectionRowListProps, z as ConnectionRowProps, D as DangerZone, E as DangerZoneAction, F as DangerZoneActionProps, G as DangerZoneProps, H as DataTable, I as DataTableColumn, J as DataTableProps, K as DataTableSort, L as DataTableSortDirection, M as DescriptionItem, N as DescriptionList, O as DescriptionListProps, P as EmptyState, Q as EmptyStateProps, R as ExpandableSection, S as ExpandableSectionProps, T as Field, U as FieldInput, V as FieldInputProps, W as FieldProps, X as FieldRow, Y as FieldRowProps, Z as FieldSelect, _ as FieldSelectProps, $ as FieldSwitch, a0 as FieldSwitchProps, a1 as FieldTextarea, a2 as FieldTextareaProps, a3 as FilterBar, a4 as FilterBarProps, a5 as FloatingUnsavedChangesBar, a6 as FloatingUnsavedChangesBarProps, a7 as FormSection, a8 as FormSectionProps, a9 as INTEGRATION_CATALOG_CARD_HEIGHT_CLASS, aa as InfoCard, ab as InfoCardProps, ac as InfoCardTone, ad as IntegrationCard, ae as IntegrationCardProps, af as IntegrationCardStatus, ag as IntegrationsEmptyState, ah as IntegrationsEmptyStateProps, ai as LineAreaChart, aj as LineAreaChartProps, ak as MetricChartCard, al as MetricChartCardProps, am as MetricChartMetric, an as MetricRow, ao as MetricRowItem, ap as MetricRowProps, aq as MetricTile, ar as MetricTileProps, as as Page, at as PageHeader, au as PageHeaderProps, av as PageProps, aw as PlanBadge, ax as PlanBadgeProps, ay as PlanBadgeTone, az as ResourceCard, aA as ResourceCardProps, aB as SearchInput, aC as SearchInputProps, aD as Section, aE as SectionProps, aF as SettingsSection, aG as SettingsSectionHeader, aH as SettingsSectionHeaderProps, aI as SettingsSectionProps, aJ as Sparkline, aK as SparklineProps, aL as StatTile, aM as StatTileProps, aN as StatusBadge, aO as StatusBadgeProps, aP as StatusBadgeTone, aQ as StatusDot, aR as StatusDotProps, aS as StatusDotTone, aT as SubNav, aU as SubNavItem, aV as SubNavProps, aW as SurfaceCard, aX as SurfaceCardProps, aY as THEME_AGENT_INSTRUCTIONS, aZ as TIMBAL_THEME_PRESETS, a_ as ThemePresetGallery, a$ as ThemePresetGalleryProps, b0 as ThemeToCssOptions, b1 as ThemeTokenMap, b2 as TimbalThemeIntent, b3 as TimbalThemePreset, b4 as TimbalThemePresetId, b5 as TimbalThemeStyle, b6 as TimbalThemeStyleProps, b7 as TimbalThemeTokens, b8 as applyThemePreset, b9 as applyTimbalTheme, ba as clearTimbalTheme, bb as connectionRowListClass, bc as createTimbalTheme, bd as getStoredThemePreset, be as getThemePreset, bf as themeToCss, bg as useAppCopilotContext, bh as useAppShellChat } from './chart-artifact-DWkqIAK5.cjs';
9
+ export { A as APP_KIT_AGENT_INSTRUCTIONS, a as AppChatPanel, b as AppChatPanelProps, c as AppConfirmDialog, d as AppConfirmDialogProps, e as AppCopilotContextValue, f as AppCopilotProvider, g as AppCopilotProviderProps, h as AppShell, i as AppShellChatControls, j as AppShellChatTrigger, k as AppShellChatTriggerProps, l as AppShellProps, m as AppShellTopbar, n as AppShellTopbarProps, B as BreadcrumbItem, o as Breadcrumbs, p as BreadcrumbsProps, C as CHART_PALETTE, q as ChartArtifactView, s as ChartPanel, t as ChartPanelProps, u as ChartSeries, v as ChartVariant, w as ConnectionRow, x as ConnectionRowList, y as ConnectionRowListProps, z as ConnectionRowProps, D as DangerZone, E as DangerZoneAction, F as DangerZoneActionProps, G as DangerZoneProps, H as DataTable, I as DataTableColumn, J as DataTableProps, K as DataTableSort, L as DataTableSortDirection, M as DescriptionItem, N as DescriptionList, O as DescriptionListProps, P as EmptyState, Q as EmptyStateProps, R as ExpandableSection, S as ExpandableSectionProps, T as Field, U as FieldInput, V as FieldInputProps, W as FieldProps, X as FieldRow, Y as FieldRowProps, Z as FieldSelect, _ as FieldSelectProps, $ as FieldSwitch, a0 as FieldSwitchProps, a1 as FieldTextarea, a2 as FieldTextareaProps, a3 as FilterBar, a4 as FilterBarProps, a5 as FloatingUnsavedChangesBar, a6 as FloatingUnsavedChangesBarProps, a7 as FormSection, a8 as FormSectionProps, a9 as INTEGRATION_CATALOG_CARD_HEIGHT_CLASS, aa as InfoCard, ab as InfoCardProps, ac as InfoCardTone, ad as IntegrationCard, ae as IntegrationCardProps, af as IntegrationCardStatus, ag as IntegrationsEmptyState, ah as IntegrationsEmptyStateProps, ai as LineAreaChart, aj as LineAreaChartProps, ak as MetricChartCard, al as MetricChartCardProps, am as MetricChartMetric, an as MetricRow, ao as MetricRowItem, ap as MetricRowProps, aq as MetricTile, ar as MetricTileProps, as as Page, at as PageHeader, au as PageHeaderProps, av as PageProps, aw as PlanBadge, ax as PlanBadgeProps, ay as PlanBadgeTone, az as ResourceCard, aA as ResourceCardProps, aB as SearchInput, aC as SearchInputProps, aD as Section, aE as SectionProps, aF as SettingsSection, aG as SettingsSectionHeader, aH as SettingsSectionHeaderProps, aI as SettingsSectionProps, aJ as Sparkline, aK as SparklineProps, aL as StatTile, aM as StatTileProps, aN as StatusBadge, aO as StatusBadgeProps, aP as StatusBadgeTone, aQ as StatusDot, aR as StatusDotProps, aS as StatusDotTone, aT as SubNav, aU as SubNavItem, aV as SubNavProps, aW as SurfaceCard, aX as SurfaceCardProps, aY as THEME_AGENT_INSTRUCTIONS, aZ as TIMBAL_THEME_PRESETS, a_ as ThemePresetGallery, a$ as ThemePresetGalleryProps, b0 as ThemeShadow, b1 as ThemeToCssOptions, b2 as ThemeTokenMap, b3 as TimbalThemeIntent, b4 as TimbalThemePreset, b5 as TimbalThemePresetId, b6 as TimbalThemeStyle, b7 as TimbalThemeStyleProps, b8 as TimbalThemeTokens, b9 as TimbalThemeTypography, ba as applyThemePreset, bb as applyTimbalTheme, bc as clearTimbalTheme, bd as connectionRowListClass, be as createTimbalTheme, bf as ensureThemeFontLink, bg as getStoredThemePreset, bh as getThemePreset, bi as themeToCss, bj as useAppCopilotContext, bk as useAppShellChat } from './chart-artifact-BzcvblDe.cjs';
10
10
  export { B as Button } from './button-ClSgD6OF.cjs';
11
11
  import React__default, { FC, ReactNode } from 'react';
12
12
  export { Avatar, AvatarFallback, AvatarImage, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, MemoPillSegmentedTabs, PillSegmentedTab, PillSegmentedTabs, PillSegmentedTabsProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Shimmer, TextShimmerProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from './ui.cjs';
package/dist/index.d.ts CHANGED
@@ -6,7 +6,7 @@ import { ToolCallMessagePartComponent } from '@assistant-ui/react';
6
6
  export { ActionBarPrimitive, AssistantRuntimeProvider, AttachmentAdapter, AuiIf, ComposerPrimitive, MessagePrimitive, ThreadPrimitive, useComposerRuntime, useMessageRuntime, useThread, useThreadRuntime } from '@assistant-ui/react';
7
7
  export { M as ModeToggle, a as ModeToggleProps, b as ModeToggleTheme, S as STUDIO_NAV_MODE, c as StudioModeSwitch, d as StudioModeSwitchProps, e as StudioNavMode, f as StudioSidebar, g as StudioSidebarProps, h as StudioWelcome, i as StudioWelcomeProps, T as TimbalChatShell, j as TimbalChatShellProps, k as TimbalMark, l as TimbalMarkProps, m as TimbalStudioShell, n as TimbalStudioShellProps } from './welcome-DE08m9ca.js';
8
8
  export { M as MarkdownText, T as THREAD_DEFAULT_MAX_WIDTH, a as ToolFallback, b as TooltipIconButton, c as TooltipIconButtonProps, W as WorkforceSelector, d as WorkforceSelectorProps, e as assistantMessageContentClass, f as assistantMessageRootClass, t as threadMessageColumnClass, u as useToolRunning, g as userMessageRootClass } from './layout-BTJyU8wd.js';
9
- export { A as APP_KIT_AGENT_INSTRUCTIONS, a as AppChatPanel, b as AppChatPanelProps, c as AppConfirmDialog, d as AppConfirmDialogProps, e as AppCopilotContextValue, f as AppCopilotProvider, g as AppCopilotProviderProps, h as AppShell, i as AppShellChatControls, j as AppShellChatTrigger, k as AppShellChatTriggerProps, l as AppShellProps, m as AppShellTopbar, n as AppShellTopbarProps, B as BreadcrumbItem, o as Breadcrumbs, p as BreadcrumbsProps, C as CHART_PALETTE, q as ChartArtifactView, s as ChartPanel, t as ChartPanelProps, u as ChartSeries, v as ChartVariant, w as ConnectionRow, x as ConnectionRowList, y as ConnectionRowListProps, z as ConnectionRowProps, D as DangerZone, E as DangerZoneAction, F as DangerZoneActionProps, G as DangerZoneProps, H as DataTable, I as DataTableColumn, J as DataTableProps, K as DataTableSort, L as DataTableSortDirection, M as DescriptionItem, N as DescriptionList, O as DescriptionListProps, P as EmptyState, Q as EmptyStateProps, R as ExpandableSection, S as ExpandableSectionProps, T as Field, U as FieldInput, V as FieldInputProps, W as FieldProps, X as FieldRow, Y as FieldRowProps, Z as FieldSelect, _ as FieldSelectProps, $ as FieldSwitch, a0 as FieldSwitchProps, a1 as FieldTextarea, a2 as FieldTextareaProps, a3 as FilterBar, a4 as FilterBarProps, a5 as FloatingUnsavedChangesBar, a6 as FloatingUnsavedChangesBarProps, a7 as FormSection, a8 as FormSectionProps, a9 as INTEGRATION_CATALOG_CARD_HEIGHT_CLASS, aa as InfoCard, ab as InfoCardProps, ac as InfoCardTone, ad as IntegrationCard, ae as IntegrationCardProps, af as IntegrationCardStatus, ag as IntegrationsEmptyState, ah as IntegrationsEmptyStateProps, ai as LineAreaChart, aj as LineAreaChartProps, ak as MetricChartCard, al as MetricChartCardProps, am as MetricChartMetric, an as MetricRow, ao as MetricRowItem, ap as MetricRowProps, aq as MetricTile, ar as MetricTileProps, as as Page, at as PageHeader, au as PageHeaderProps, av as PageProps, aw as PlanBadge, ax as PlanBadgeProps, ay as PlanBadgeTone, az as ResourceCard, aA as ResourceCardProps, aB as SearchInput, aC as SearchInputProps, aD as Section, aE as SectionProps, aF as SettingsSection, aG as SettingsSectionHeader, aH as SettingsSectionHeaderProps, aI as SettingsSectionProps, aJ as Sparkline, aK as SparklineProps, aL as StatTile, aM as StatTileProps, aN as StatusBadge, aO as StatusBadgeProps, aP as StatusBadgeTone, aQ as StatusDot, aR as StatusDotProps, aS as StatusDotTone, aT as SubNav, aU as SubNavItem, aV as SubNavProps, aW as SurfaceCard, aX as SurfaceCardProps, aY as THEME_AGENT_INSTRUCTIONS, aZ as TIMBAL_THEME_PRESETS, a_ as ThemePresetGallery, a$ as ThemePresetGalleryProps, b0 as ThemeToCssOptions, b1 as ThemeTokenMap, b2 as TimbalThemeIntent, b3 as TimbalThemePreset, b4 as TimbalThemePresetId, b5 as TimbalThemeStyle, b6 as TimbalThemeStyleProps, b7 as TimbalThemeTokens, b8 as applyThemePreset, b9 as applyTimbalTheme, ba as clearTimbalTheme, bb as connectionRowListClass, bc as createTimbalTheme, bd as getStoredThemePreset, be as getThemePreset, bf as themeToCss, bg as useAppCopilotContext, bh as useAppShellChat } from './chart-artifact-DwfRtQWL.js';
9
+ export { A as APP_KIT_AGENT_INSTRUCTIONS, a as AppChatPanel, b as AppChatPanelProps, c as AppConfirmDialog, d as AppConfirmDialogProps, e as AppCopilotContextValue, f as AppCopilotProvider, g as AppCopilotProviderProps, h as AppShell, i as AppShellChatControls, j as AppShellChatTrigger, k as AppShellChatTriggerProps, l as AppShellProps, m as AppShellTopbar, n as AppShellTopbarProps, B as BreadcrumbItem, o as Breadcrumbs, p as BreadcrumbsProps, C as CHART_PALETTE, q as ChartArtifactView, s as ChartPanel, t as ChartPanelProps, u as ChartSeries, v as ChartVariant, w as ConnectionRow, x as ConnectionRowList, y as ConnectionRowListProps, z as ConnectionRowProps, D as DangerZone, E as DangerZoneAction, F as DangerZoneActionProps, G as DangerZoneProps, H as DataTable, I as DataTableColumn, J as DataTableProps, K as DataTableSort, L as DataTableSortDirection, M as DescriptionItem, N as DescriptionList, O as DescriptionListProps, P as EmptyState, Q as EmptyStateProps, R as ExpandableSection, S as ExpandableSectionProps, T as Field, U as FieldInput, V as FieldInputProps, W as FieldProps, X as FieldRow, Y as FieldRowProps, Z as FieldSelect, _ as FieldSelectProps, $ as FieldSwitch, a0 as FieldSwitchProps, a1 as FieldTextarea, a2 as FieldTextareaProps, a3 as FilterBar, a4 as FilterBarProps, a5 as FloatingUnsavedChangesBar, a6 as FloatingUnsavedChangesBarProps, a7 as FormSection, a8 as FormSectionProps, a9 as INTEGRATION_CATALOG_CARD_HEIGHT_CLASS, aa as InfoCard, ab as InfoCardProps, ac as InfoCardTone, ad as IntegrationCard, ae as IntegrationCardProps, af as IntegrationCardStatus, ag as IntegrationsEmptyState, ah as IntegrationsEmptyStateProps, ai as LineAreaChart, aj as LineAreaChartProps, ak as MetricChartCard, al as MetricChartCardProps, am as MetricChartMetric, an as MetricRow, ao as MetricRowItem, ap as MetricRowProps, aq as MetricTile, ar as MetricTileProps, as as Page, at as PageHeader, au as PageHeaderProps, av as PageProps, aw as PlanBadge, ax as PlanBadgeProps, ay as PlanBadgeTone, az as ResourceCard, aA as ResourceCardProps, aB as SearchInput, aC as SearchInputProps, aD as Section, aE as SectionProps, aF as SettingsSection, aG as SettingsSectionHeader, aH as SettingsSectionHeaderProps, aI as SettingsSectionProps, aJ as Sparkline, aK as SparklineProps, aL as StatTile, aM as StatTileProps, aN as StatusBadge, aO as StatusBadgeProps, aP as StatusBadgeTone, aQ as StatusDot, aR as StatusDotProps, aS as StatusDotTone, aT as SubNav, aU as SubNavItem, aV as SubNavProps, aW as SurfaceCard, aX as SurfaceCardProps, aY as THEME_AGENT_INSTRUCTIONS, aZ as TIMBAL_THEME_PRESETS, a_ as ThemePresetGallery, a$ as ThemePresetGalleryProps, b0 as ThemeShadow, b1 as ThemeToCssOptions, b2 as ThemeTokenMap, b3 as TimbalThemeIntent, b4 as TimbalThemePreset, b5 as TimbalThemePresetId, b6 as TimbalThemeStyle, b7 as TimbalThemeStyleProps, b8 as TimbalThemeTokens, b9 as TimbalThemeTypography, ba as applyThemePreset, bb as applyTimbalTheme, bc as clearTimbalTheme, bd as connectionRowListClass, be as createTimbalTheme, bf as ensureThemeFontLink, bg as getStoredThemePreset, bh as getThemePreset, bi as themeToCss, bj as useAppCopilotContext, bk as useAppShellChat } from './chart-artifact-Bl67kre7.js';
10
10
  export { B as Button } from './button-ClSgD6OF.js';
11
11
  import React__default, { FC, ReactNode } from 'react';
12
12
  export { Avatar, AvatarFallback, AvatarImage, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, MemoPillSegmentedTabs, PillSegmentedTab, PillSegmentedTabs, PillSegmentedTabsProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Shimmer, TextShimmerProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from './ui.js';
package/dist/index.esm.js CHANGED
@@ -55,12 +55,13 @@ import {
55
55
  clearTimbalTheme,
56
56
  connectionRowListClass,
57
57
  createTimbalTheme,
58
+ ensureThemeFontLink,
58
59
  getStoredThemePreset,
59
60
  getThemePreset,
60
61
  themeToCss,
61
62
  useAppCopilotContext,
62
63
  useAppShellChat
63
- } from "./chunk-GBBLAM3G.esm.js";
64
+ } from "./chunk-6YVKCVEP.esm.js";
64
65
  import {
65
66
  THREAD_DEFAULT_MAX_WIDTH,
66
67
  assistantMessageContentClass,
@@ -525,6 +526,7 @@ export {
525
526
  createTimbalTheme,
526
527
  createUploadAttachmentAdapter,
527
528
  defaultArtifactRenderers,
529
+ ensureThemeFontLink,
528
530
  fetchCurrentUser,
529
531
  findMarkdownArtifacts,
530
532
  getAccessToken,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@timbal-ai/timbal-react",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "description": "React components and runtime for building Timbal chat and studio apps",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",