@timbal-ai/timbal-react 0.8.0 → 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
@@ -149,8 +149,11 @@ __export(index_exports, {
149
149
  SubNav: () => SubNav,
150
150
  Suggestions: () => Suggestions,
151
151
  SurfaceCard: () => SurfaceCard,
152
+ THEME_AGENT_INSTRUCTIONS: () => THEME_AGENT_INSTRUCTIONS,
152
153
  THREAD_DEFAULT_MAX_WIDTH: () => THREAD_DEFAULT_MAX_WIDTH,
154
+ TIMBAL_THEME_PRESETS: () => TIMBAL_THEME_PRESETS,
153
155
  TableArtifactView: () => TableArtifactView,
156
+ ThemePresetGallery: () => ThemePresetGallery,
154
157
  Thread: () => Thread,
155
158
  ThreadPrimitive: () => import_react69.ThreadPrimitive,
156
159
  TimbalChat: () => TimbalChat,
@@ -158,6 +161,7 @@ __export(index_exports, {
158
161
  TimbalMark: () => TimbalMark,
159
162
  TimbalRuntimeProvider: () => TimbalRuntimeProvider,
160
163
  TimbalStudioShell: () => TimbalStudioShell,
164
+ TimbalThemeStyle: () => TimbalThemeStyle,
161
165
  ToolArtifactFallback: () => ToolArtifactFallback,
162
166
  ToolFallback: () => ToolFallback,
163
167
  Tooltip: () => Tooltip,
@@ -170,20 +174,27 @@ __export(index_exports, {
170
174
  UiEventProvider: () => UiEventProvider,
171
175
  UiNodeView: () => UiNodeView,
172
176
  WorkforceSelector: () => WorkforceSelector,
177
+ applyThemePreset: () => applyThemePreset,
178
+ applyTimbalTheme: () => applyTimbalTheme,
173
179
  assistantMessageContentClass: () => assistantMessageContentClass,
174
180
  assistantMessageRootClass: () => assistantMessageRootClass,
175
181
  authFetch: () => authFetch,
182
+ clearTimbalTheme: () => clearTimbalTheme,
176
183
  clearTokens: () => clearTokens,
177
184
  cn: () => cn,
178
185
  connectionRowListClass: () => connectionRowListClass,
179
186
  createDefaultAttachmentAdapter: () => createDefaultAttachmentAdapter,
187
+ createTimbalTheme: () => createTimbalTheme,
180
188
  createUploadAttachmentAdapter: () => createUploadAttachmentAdapter,
181
189
  defaultArtifactRenderers: () => defaultArtifactRenderers,
190
+ ensureThemeFontLink: () => ensureThemeFontLink,
182
191
  fetchCurrentUser: () => fetchCurrentUser,
183
192
  findMarkdownArtifacts: () => findMarkdownArtifacts,
184
193
  getAccessToken: () => getAccessToken,
185
194
  getPath: () => getPath,
186
195
  getRefreshToken: () => getRefreshToken,
196
+ getStoredThemePreset: () => getStoredThemePreset,
197
+ getThemePreset: () => getThemePreset,
187
198
  isArtifact: () => isArtifact,
188
199
  isArtifactFenceLanguage: () => isArtifactFenceLanguage,
189
200
  isUiBinding: () => isUiBinding,
@@ -196,6 +207,7 @@ __export(index_exports, {
196
207
  setPath: () => setPath,
197
208
  setRefreshToken: () => setRefreshToken,
198
209
  splitMarkdownByArtifacts: () => splitMarkdownByArtifacts,
210
+ themeToCss: () => themeToCss,
199
211
  threadMessageColumnClass: () => threadMessageColumnClass,
200
212
  useAppCopilotContext: () => useAppCopilotContext,
201
213
  useAppShellChat: () => useAppShellChat,
@@ -4805,7 +4817,9 @@ var studioChromeShellStyle = {
4805
4817
  var STORAGE_KEYS = {
4806
4818
  sidebarCollapsed: "timbal-studio-sidebar-collapsed",
4807
4819
  /** Used by `ModeToggle` in uncontrolled mode (`localStorage`). */
4808
- theme: "timbal-theme"
4820
+ theme: "timbal-theme",
4821
+ /** Used by the theme preset picker to remember the selected brand preset. */
4822
+ themePreset: "timbal-theme-preset"
4809
4823
  };
4810
4824
  var DOM_IDS = {
4811
4825
  sidebarRuntimeAnchor: "timbal-studio-sidebar-runtime-anchor",
@@ -6495,6 +6509,8 @@ Presentational groups \u2014 import from the package root, not from these paths:
6495
6509
 
6496
6510
  Also re-exported: \`Button\`, \`TimbalChat\`, \`ChartArtifactView\`, \`APP_KIT_AGENT_INSTRUCTIONS\`.
6497
6511
 
6512
+ Theming helpers (import from the package root or \`/app\`): \`createTimbalTheme\`, \`themeToCss\`, \`applyTimbalTheme\`, \`TIMBAL_THEME_PRESETS\`, \`applyThemePreset\`, \`ThemePresetGallery\`, \`TimbalThemeStyle\`, \`THEME_AGENT_INSTRUCTIONS\`.
6513
+
6498
6514
  ### Design guidelines (required)
6499
6515
 
6500
6516
  | Area | Rule |
@@ -6502,7 +6518,7 @@ Also re-exported: \`Button\`, \`TimbalChat\`, \`ChartArtifactView\`, \`APP_KIT_A
6502
6518
  | **Copilot** | Use \`AppCopilotProvider\` for page context (\`useAppCopilotContext\`). Copilot is a **floating overlay** via \`AppShell\` \`chat={<AppChatPanel />}\` \u2014 not a sidebar column that shrinks main content. |
6503
6519
  | **Chat panel** | \`AppChatPanel\` only; \`Thread\` uses \`variant="panel"\` internally. Dismiss with **X**; trigger is a **text-only** pill (e.g. "Assistant") \u2014 **no** MessageSquare or chat icons on the shell trigger. |
6504
6520
  | **Context** | Do not show raw JSON context in the panel header; keep context in \`AppCopilotProvider\` only. |
6505
- | **Theming** | Use semantic Tailwind tokens (\`bg-background\`, \`text-foreground\`, \`border-border\`, \`bg-elevated-from\`, etc.) from the host app's \`styles.css\`. Optional: \`import "@timbal-ai/timbal-react/styles.css"\`. |
6521
+ | **Theming** | Use semantic Tailwind tokens (\`bg-background\`, \`text-foreground\`, \`border-border\`, \`bg-elevated-from\`, etc.) from the host app's \`styles.css\`. To rebrand, **never hand-author OKLCH** \u2014 call \`createTimbalTheme({ brand })\` + \`themeToCss\`/\`applyTimbalTheme\`, or apply a catalog preset (\`TIMBAL_THEME_PRESETS\` / \`applyThemePreset\`). To offer styles, render \`ThemePresetGallery\`. See \`THEME_AGENT_INSTRUCTIONS\`. |
6506
6522
  | **Layout chrome** | \`Page\` \u2192 \`Section\` for main content hierarchy. \`AppShellTopbar\` for global actions (auth, theme). |
6507
6523
  | **Data** | Prefer \`DataTable\` with typed \`columns\` / \`rows\` / \`getRowKey\`; use \`ChartPanel\` with \`ChartArtifact\` for charts. |
6508
6524
  | **Modals** | Use \`AppConfirmDialog\` for destructive/export confirmations. |
@@ -6602,6 +6618,7 @@ Studio chrome (\`StudioSidebar\`, \`ModeToggle\`, \u2026) lives in \`@timbal-ai/
6602
6618
  | \`resource-gallery.tsx\` | \`ResourceCard\`, \`StatusDot\`, \`Sparkline\` |
6603
6619
  | \`charts-panel.tsx\` | \`ChartPanel\`, \`ChartArtifact\` |
6604
6620
  | \`copilot-overlay.tsx\` | \`AppShell\`, \`AppChatPanel\` |
6621
+ | \`theme-presets.tsx\` | \`ThemePresetGallery\`, \`applyTimbalTheme\` |
6605
6622
 
6606
6623
  ### Typical compositions
6607
6624
 
@@ -6647,6 +6664,864 @@ import {
6647
6664
  - For rich in-chat widgets, use **artifacts** (\`ARTIFACT_AGENT_INSTRUCTIONS\`) \u2014 app kit is for the **host application shell**.
6648
6665
  `.trim();
6649
6666
 
6667
+ // src/design/oklch.ts
6668
+ var clamp = (n, min, max) => Math.min(max, Math.max(min, n));
6669
+ var round2 = (n, digits) => {
6670
+ const f = 10 ** digits;
6671
+ return Math.round(n * f) / f;
6672
+ };
6673
+ function srgbToLinear(channel) {
6674
+ const c = channel / 255;
6675
+ return c <= 0.04045 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;
6676
+ }
6677
+ function linearRgbToOklch(r, g, b, alpha) {
6678
+ const l = 0.4122214708 * r + 0.5363325363 * g + 0.0514459929 * b;
6679
+ const m = 0.2119034982 * r + 0.6806995451 * g + 0.1073969566 * b;
6680
+ const s = 0.0883024619 * r + 0.2817188376 * g + 0.6299787005 * b;
6681
+ const l_ = Math.cbrt(l);
6682
+ const m_ = Math.cbrt(m);
6683
+ const s_ = Math.cbrt(s);
6684
+ const labL = 0.2104542553 * l_ + 0.793617785 * m_ - 0.0040720468 * s_;
6685
+ const labA = 1.9779984951 * l_ - 2.428592205 * m_ + 0.4505937099 * s_;
6686
+ const labB = 0.0259040371 * l_ + 0.7827717662 * m_ - 0.808675766 * s_;
6687
+ const c = Math.sqrt(labA * labA + labB * labB);
6688
+ let h = Math.atan2(labB, labA) * 180 / Math.PI;
6689
+ if (h < 0) h += 360;
6690
+ return { l: labL, c, h, alpha };
6691
+ }
6692
+ function oklchToLinearRgb(color) {
6693
+ const hRad = color.h * Math.PI / 180;
6694
+ const labA = color.c * Math.cos(hRad);
6695
+ const labB = color.c * Math.sin(hRad);
6696
+ const l_ = color.l + 0.3963377774 * labA + 0.2158037573 * labB;
6697
+ const m_ = color.l - 0.1055613458 * labA - 0.0638541728 * labB;
6698
+ const s_ = color.l - 0.0894841775 * labA - 1.291485548 * labB;
6699
+ const l = l_ ** 3;
6700
+ const m = m_ ** 3;
6701
+ const s = s_ ** 3;
6702
+ return {
6703
+ r: 4.0767416621 * l - 3.3077115913 * m + 0.2309699292 * s,
6704
+ g: -1.2684380046 * l + 2.6097574011 * m - 0.3413193965 * s,
6705
+ b: -0.0041960863 * l - 0.7034186147 * m + 1.707614701 * s
6706
+ };
6707
+ }
6708
+ function parseHex(value) {
6709
+ let hex = value.trim().replace(/^#/, "");
6710
+ if (![3, 4, 6, 8].includes(hex.length)) return null;
6711
+ if (hex.length === 3 || hex.length === 4) {
6712
+ hex = hex.split("").map((ch) => ch + ch).join("");
6713
+ }
6714
+ const int = Number.parseInt(hex, 16);
6715
+ if (Number.isNaN(int)) return null;
6716
+ const hasAlpha = hex.length === 8;
6717
+ const r = int >>> (hasAlpha ? 24 : 16) & 255;
6718
+ const g = int >>> (hasAlpha ? 16 : 8) & 255;
6719
+ const b = int >>> (hasAlpha ? 8 : 0) & 255;
6720
+ const alpha = hasAlpha ? (int & 255) / 255 : 1;
6721
+ return linearRgbToOklch(
6722
+ srgbToLinear(r),
6723
+ srgbToLinear(g),
6724
+ srgbToLinear(b),
6725
+ alpha
6726
+ );
6727
+ }
6728
+ function parseRgb(value) {
6729
+ const match = value.match(
6730
+ /rgba?\(\s*([0-9.]+)[\s,]+([0-9.]+)[\s,]+([0-9.]+)(?:[\s,/]+([0-9.%]+))?\s*\)/i
6731
+ );
6732
+ if (!match) return null;
6733
+ const r = Number.parseFloat(match[1]);
6734
+ const g = Number.parseFloat(match[2]);
6735
+ const b = Number.parseFloat(match[3]);
6736
+ let alpha = 1;
6737
+ if (match[4]) {
6738
+ alpha = match[4].includes("%") ? Number.parseFloat(match[4]) / 100 : Number.parseFloat(match[4]);
6739
+ }
6740
+ if (![r, g, b].every(Number.isFinite)) return null;
6741
+ return linearRgbToOklch(
6742
+ srgbToLinear(r),
6743
+ srgbToLinear(g),
6744
+ srgbToLinear(b),
6745
+ Number.isFinite(alpha) ? alpha : 1
6746
+ );
6747
+ }
6748
+ function parseOklch(value) {
6749
+ const match = value.match(
6750
+ /oklch\(\s*([0-9.]+%?)\s+([0-9.]+%?)\s+([0-9.]+)(?:deg)?(?:\s*\/\s*([0-9.%]+))?\s*\)/i
6751
+ );
6752
+ if (!match) return null;
6753
+ const l = match[1].includes("%") ? Number.parseFloat(match[1]) / 100 : Number.parseFloat(match[1]);
6754
+ const c = match[2].includes("%") ? Number.parseFloat(match[2]) / 100 * 0.4 : Number.parseFloat(match[2]);
6755
+ const h = Number.parseFloat(match[3]);
6756
+ let alpha = 1;
6757
+ if (match[4]) {
6758
+ alpha = match[4].includes("%") ? Number.parseFloat(match[4]) / 100 : Number.parseFloat(match[4]);
6759
+ }
6760
+ if (![l, c, h].every(Number.isFinite)) return null;
6761
+ return { l, c, h, alpha: Number.isFinite(alpha) ? alpha : 1 };
6762
+ }
6763
+ function parseColor(value) {
6764
+ const parsed = parseOklch(value) ?? parseHex(value) ?? parseRgb(value);
6765
+ if (!parsed) {
6766
+ throw new Error(
6767
+ `[@timbal-ai/timbal-react] Could not parse color "${value}". Use a hex (#1E40AF), rgb()/rgba(), or oklch() string.`
6768
+ );
6769
+ }
6770
+ return parsed;
6771
+ }
6772
+ function lighten(color, delta) {
6773
+ return { ...color, l: clamp(color.l + delta, 0, 1) };
6774
+ }
6775
+ function scaleChroma(color, factor) {
6776
+ return { ...color, c: clamp(color.c * factor, 0, 0.4) };
6777
+ }
6778
+ function withAlpha(color, alpha) {
6779
+ return { ...color, alpha: clamp(alpha, 0, 1) };
6780
+ }
6781
+ function oklchToString(color) {
6782
+ const l = round2(clamp(color.l, 0, 1), 4);
6783
+ const c = round2(clamp(color.c, 0, 0.4), 4);
6784
+ const h = round2((color.h % 360 + 360) % 360, 2);
6785
+ const a = clamp(color.alpha, 0, 1);
6786
+ const base = `oklch(${l} ${c} ${h}`;
6787
+ return a >= 1 ? `${base})` : `${base} / ${round2(a, 3)})`;
6788
+ }
6789
+ function readableForeground(bg, options) {
6790
+ const threshold = options?.threshold ?? 0.62;
6791
+ const lightText = options?.light ?? "oklch(0.985 0 0)";
6792
+ const darkText = options?.dark ?? "oklch(0.205 0 0)";
6793
+ return bg.l >= threshold ? darkText : lightText;
6794
+ }
6795
+ function relativeLuminance(color) {
6796
+ const { r, g, b } = oklchToLinearRgb(color);
6797
+ const lr = clamp(r, 0, 1);
6798
+ const lg = clamp(g, 0, 1);
6799
+ const lb = clamp(b, 0, 1);
6800
+ return 0.2126 * lr + 0.7152 * lg + 0.0722 * lb;
6801
+ }
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
+ };
6836
+ function primaryForMode(brand, mode) {
6837
+ if (mode === "light") {
6838
+ return { ...brand, l: Math.min(Math.max(brand.l, 0.42), 0.68) };
6839
+ }
6840
+ const lightened = lighten(brand, 0.06);
6841
+ return {
6842
+ ...lightened,
6843
+ l: Math.min(Math.max(lightened.l, 0.5), 0.78),
6844
+ c: Math.min(brand.c, 0.22)
6845
+ };
6846
+ }
6847
+ function brandGradient(primary) {
6848
+ return {
6849
+ from: lighten(primary, 0.03),
6850
+ to: lighten(primary, -0.02),
6851
+ hoverFrom: lighten(primary, 0.06),
6852
+ hoverTo: lighten(primary, 0.01),
6853
+ activeFrom: lighten(primary, -0.02),
6854
+ activeTo: lighten(primary, -0.06)
6855
+ };
6856
+ }
6857
+ function neutralTints(brand) {
6858
+ return {
6859
+ lightHue: brand.h,
6860
+ darkHue: brand.h,
6861
+ lightChroma: 6e-3,
6862
+ darkChroma: 8e-3
6863
+ };
6864
+ }
6865
+ function createTimbalTheme(intent) {
6866
+ const brand = parseColor(intent.brand);
6867
+ const accent = intent.accent ? parseColor(intent.accent) : null;
6868
+ const light = {};
6869
+ const dark = {};
6870
+ const root = {};
6871
+ let fontFamily;
6872
+ let fontImportUrl;
6873
+ if (typeof intent.radius === "number") {
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;
6891
+ }
6892
+ const primaryLight = primaryForMode(brand, "light");
6893
+ const primaryDark = primaryForMode(brand, "dark");
6894
+ light["--primary"] = oklchToString(primaryLight);
6895
+ light["--primary-foreground"] = readableForeground(primaryLight);
6896
+ light["--ring"] = oklchToString(
6897
+ scaleChroma({ ...primaryLight, l: 0.6 }, 0.7)
6898
+ );
6899
+ dark["--primary"] = oklchToString(primaryDark);
6900
+ dark["--primary-foreground"] = readableForeground(primaryDark);
6901
+ dark["--ring"] = oklchToString(scaleChroma({ ...primaryDark, l: 0.62 }, 0.6));
6902
+ const gLight = brandGradient(primaryLight);
6903
+ light["--primary-fill-from"] = oklchToString(gLight.from);
6904
+ light["--primary-fill-to"] = oklchToString(gLight.to);
6905
+ light["--primary-fill-hover-from"] = oklchToString(gLight.hoverFrom);
6906
+ light["--primary-fill-hover-to"] = oklchToString(gLight.hoverTo);
6907
+ light["--primary-fill-active-from"] = oklchToString(gLight.activeFrom);
6908
+ light["--primary-fill-active-to"] = oklchToString(gLight.activeTo);
6909
+ const gDark = brandGradient(primaryDark);
6910
+ dark["--primary-fill-from"] = oklchToString(gDark.from);
6911
+ dark["--primary-fill-to"] = oklchToString(gDark.to);
6912
+ dark["--primary-fill-hover-from"] = oklchToString(gDark.hoverFrom);
6913
+ dark["--primary-fill-hover-to"] = oklchToString(gDark.hoverTo);
6914
+ dark["--primary-fill-active-from"] = oklchToString(gDark.activeFrom);
6915
+ dark["--primary-fill-active-to"] = oklchToString(gDark.activeTo);
6916
+ if (accent) {
6917
+ const accentLight = { ...accent, l: Math.min(Math.max(accent.l, 0.9), 0.97) };
6918
+ const accentDark = { ...accent, l: 0.25, c: Math.min(accent.c, 0.04) };
6919
+ light["--accent"] = oklchToString(accentLight);
6920
+ light["--accent-foreground"] = readableForeground(accentLight);
6921
+ dark["--accent"] = oklchToString(accentDark);
6922
+ dark["--accent-foreground"] = readableForeground(accentDark);
6923
+ }
6924
+ light["--playground-from"] = oklchToString(
6925
+ withAlpha({ l: 0.91, c: 0.03, h: brand.h, alpha: 0.6 }, 0.6)
6926
+ );
6927
+ light["--playground-via"] = oklchToString(
6928
+ withAlpha({ l: 0.965, c: 0.015, h: brand.h, alpha: 0.3 }, 0.3)
6929
+ );
6930
+ dark["--playground-from"] = oklchToString({
6931
+ l: 0.27,
6932
+ c: 0.03,
6933
+ h: brand.h,
6934
+ alpha: 1
6935
+ });
6936
+ dark["--playground-via"] = oklchToString({
6937
+ l: 0.19,
6938
+ c: 0.02,
6939
+ h: brand.h,
6940
+ alpha: 1
6941
+ });
6942
+ if (intent.tintNeutrals) {
6943
+ const t = neutralTints(brand);
6944
+ light["--secondary"] = oklchToString({
6945
+ l: 0.975,
6946
+ c: t.lightChroma,
6947
+ h: t.lightHue,
6948
+ alpha: 1
6949
+ });
6950
+ light["--muted"] = light["--secondary"];
6951
+ light["--accent"] ?? (light["--accent"] = oklchToString({
6952
+ l: 0.965,
6953
+ c: t.lightChroma,
6954
+ h: t.lightHue,
6955
+ alpha: 1
6956
+ }));
6957
+ light["--border"] = oklchToString({
6958
+ l: 0.91,
6959
+ c: t.lightChroma,
6960
+ h: t.lightHue,
6961
+ alpha: 1
6962
+ });
6963
+ dark["--secondary"] = oklchToString({
6964
+ l: 0.22,
6965
+ c: t.darkChroma,
6966
+ h: t.darkHue,
6967
+ alpha: 1
6968
+ });
6969
+ dark["--muted"] = dark["--secondary"];
6970
+ dark["--border"] = oklchToString({
6971
+ l: 1,
6972
+ c: 0,
6973
+ h: 0,
6974
+ alpha: 0.1
6975
+ });
6976
+ }
6977
+ if (isDev2()) {
6978
+ const lum = relativeLuminance(primaryLight);
6979
+ const fgIsLight = light["--primary-foreground"].includes("0.985");
6980
+ const fgLum = fgIsLight ? 1 : 0.05;
6981
+ const ratio = (Math.max(lum, fgLum) + 0.05) / (Math.min(lum, fgLum) + 0.05);
6982
+ if (ratio < 3.5) {
6983
+ console.warn(
6984
+ `[@timbal-ai/timbal-react] createTimbalTheme: brand "${intent.brand}" yields a low primary/foreground contrast (~${ratio.toFixed(2)}:1). Consider a darker or more saturated brand color for buttons/CTAs.`
6985
+ );
6986
+ }
6987
+ }
6988
+ return { light, dark, root, fontFamily, fontImportUrl };
6989
+ }
6990
+ function declarations(map, indent) {
6991
+ return Object.entries(map).map(([name, value]) => `${indent}${name}: ${value};`).join("\n");
6992
+ }
6993
+ function themeToCss(theme, options = {}) {
6994
+ const indent = options.indent ?? " ";
6995
+ const blocks = [];
6996
+ const lightVars = { ...theme.root ?? {}, ...theme.light };
6997
+ if (options.scope) {
6998
+ const sel = `[data-timbal-theme="${options.scope}"]`;
6999
+ if (Object.keys(lightVars).length) {
7000
+ blocks.push(`${sel} {
7001
+ ${declarations(lightVars, indent)}
7002
+ }`);
7003
+ }
7004
+ if (Object.keys(theme.dark).length) {
7005
+ blocks.push(
7006
+ `.dark ${sel}, ${sel}.dark {
7007
+ ${declarations(theme.dark, indent)}
7008
+ }`
7009
+ );
7010
+ }
7011
+ if (theme.fontFamily) {
7012
+ blocks.push(`${sel} {
7013
+ ${indent}font-family: var(--font-sans);
7014
+ }`);
7015
+ }
7016
+ } else {
7017
+ if (Object.keys(lightVars).length) {
7018
+ blocks.push(`:root {
7019
+ ${declarations(lightVars, indent)}
7020
+ }`);
7021
+ }
7022
+ if (Object.keys(theme.dark).length) {
7023
+ blocks.push(`.dark {
7024
+ ${declarations(theme.dark, indent)}
7025
+ }`);
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}`;
7039
+ }
7040
+ return css;
7041
+ }
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
+ }
7060
+ function applyTimbalTheme(theme) {
7061
+ if (typeof document === "undefined") return () => {
7062
+ };
7063
+ ensureThemeFontLink(theme.fontImportUrl);
7064
+ let el = document.getElementById(RUNTIME_STYLE_ID);
7065
+ if (!el) {
7066
+ el = document.createElement("style");
7067
+ el.id = RUNTIME_STYLE_ID;
7068
+ el.setAttribute("data-timbal-theme-runtime", "");
7069
+ document.head.appendChild(el);
7070
+ }
7071
+ el.textContent = themeToCss(theme);
7072
+ return () => {
7073
+ el?.parentNode?.removeChild(el);
7074
+ ensureThemeFontLink(void 0);
7075
+ };
7076
+ }
7077
+ function clearTimbalTheme() {
7078
+ if (typeof document === "undefined") return;
7079
+ document.getElementById(RUNTIME_STYLE_ID)?.remove();
7080
+ ensureThemeFontLink(void 0);
7081
+ }
7082
+ function isDev2() {
7083
+ if (typeof process !== "undefined" && process.env?.NODE_ENV === "production") {
7084
+ return false;
7085
+ }
7086
+ return true;
7087
+ }
7088
+
7089
+ // src/design/theme-presets.ts
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
+ };
7107
+ var TIMBAL_THEME_PRESETS = [
7108
+ {
7109
+ id: "platform",
7110
+ label: "Platform",
7111
+ description: "Shipped neutral monochrome \u2014 the Timbal Platform default. Calm, brand-agnostic, system font.",
7112
+ swatch: "oklch(0.205 0 0)",
7113
+ font: null,
7114
+ tokens: EMPTY_TOKENS
7115
+ },
7116
+ {
7117
+ id: "indigo",
7118
+ label: "Indigo",
7119
+ description: "Cool, trustworthy blue-violet, Geist type, generous radius, soft shadows \u2014 analytics & ops dashboards.",
7120
+ swatch: "#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
+ })
7128
+ },
7129
+ {
7130
+ id: "violet",
7131
+ label: "Violet",
7132
+ description: "Vivid purple, Sora type, rounded, soft shadows \u2014 expressive product / marketing surfaces.",
7133
+ swatch: "#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
+ })
7141
+ },
7142
+ {
7143
+ id: "forest",
7144
+ label: "Forest",
7145
+ description: "Grounded green, Lexend type, compact radius \u2014 finance, sustainability, status-positive apps.",
7146
+ swatch: "#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
+ })
7154
+ },
7155
+ {
7156
+ id: "warm",
7157
+ label: "Warm",
7158
+ description: "Energetic orange, Lexend type, friendly radius \u2014 consumer, creative, high-engagement tools.",
7159
+ swatch: "#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
+ })
7167
+ },
7168
+ {
7169
+ id: "slate",
7170
+ label: "Slate",
7171
+ description: "Muted enterprise gray-blue, Inter type, tight radius, hairline shadows, tinted neutrals.",
7172
+ swatch: "#475569",
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
+ })
7207
+ }
7208
+ ];
7209
+ var PRESET_BY_ID = new Map(
7210
+ TIMBAL_THEME_PRESETS.map((preset) => [preset.id, preset])
7211
+ );
7212
+ function getThemePreset(id) {
7213
+ return PRESET_BY_ID.get(id);
7214
+ }
7215
+ function applyThemePreset(id) {
7216
+ const preset = PRESET_BY_ID.get(id);
7217
+ if (!preset) return () => {
7218
+ };
7219
+ if (typeof window !== "undefined") {
7220
+ try {
7221
+ window.localStorage.setItem(STORAGE_KEYS.themePreset, id);
7222
+ } catch {
7223
+ }
7224
+ }
7225
+ return applyTimbalTheme(preset.tokens);
7226
+ }
7227
+ function getStoredThemePreset() {
7228
+ if (typeof window === "undefined") return null;
7229
+ try {
7230
+ const value = window.localStorage.getItem(STORAGE_KEYS.themePreset);
7231
+ return value && PRESET_BY_ID.has(value) ? value : null;
7232
+ } catch {
7233
+ return null;
7234
+ }
7235
+ }
7236
+
7237
+ // src/design/theme-instructions.ts
7238
+ var THEME_AGENT_INSTRUCTIONS = `
7239
+ ## Theming (@timbal-ai/timbal-react)
7240
+
7241
+ The package ships a complete light + dark token system (\`styles.css\`). Components are written against semantic Tailwind tokens (\`bg-background\`, \`text-primary\`, \`border-border\`, \`bg-elevated-from\`, \`bg-bubble-user\`, \u2026). To restyle, you change CSS variables \u2014 **never** hardcode colors in component code.
7242
+
7243
+ ### Golden rule
7244
+
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.
7246
+
7247
+ ### Generate a full personality (color + roundness + fonts + shadows)
7248
+
7249
+ \`\`\`ts
7250
+ import { createTimbalTheme, themeToCss } from "@timbal-ai/timbal-react";
7251
+
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
7265
+ \`\`\`
7266
+
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).
7270
+
7271
+ ### Apply a theme
7272
+
7273
+ - **Build-time / SSR:** \`themeToCss(theme)\` \u2192 paste the returned CSS into your \`index.css\` (after the \`@import "@timbal-ai/timbal-react/styles.css"\`). One block, both modes.
7274
+ - **Runtime / swappable:** \`applyTimbalTheme(theme)\` injects a managed \`<style>\` and returns a disposer. Works with the \`.dark\` toggle (next-themes / ModeToggle).
7275
+ - **Component:** render \`<TimbalThemeStyle theme={theme} />\` (or \`preset="indigo"\`) once near the app root.
7276
+
7277
+ ### Offer styles to the user ("show compatible styles, then apply")
7278
+
7279
+ Use the closed preset catalog \u2014 do not invent options:
7280
+
7281
+ \`\`\`ts
7282
+ import { TIMBAL_THEME_PRESETS, applyThemePreset } from "@timbal-ai/timbal-react";
7283
+ // TIMBAL_THEME_PRESETS: { id, label, description, swatch, tokens }[]
7284
+ \`\`\`
7285
+
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 |
7298
+
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.
7300
+ - On selection, call \`applyThemePreset(id)\` (persists to \`localStorage\` and restores on reload).
7301
+
7302
+ ### Rules
7303
+
7304
+ - Generated pages use **semantic Tailwind tokens only** \u2014 never literal colors or per-element \`style={{ color }}\`.
7305
+ - Light/dark mode stays the \`.dark\` class (\`next-themes attribute="class"\` or \`ModeToggle\`). Presets are **brand**, not a second dark-mode system.
7306
+ - Override individual tokens only for one-offs the generator doesn't cover; if you must, set the variable in **both** \`:root\` and \`.dark\` (a dev-only warning fires otherwise).
7307
+ `.trim();
7308
+
7309
+ // src/app/theme/TimbalThemeStyle.tsx
7310
+ var import_jsx_runtime49 = require("react/jsx-runtime");
7311
+ var TimbalThemeStyle = ({
7312
+ theme,
7313
+ preset,
7314
+ scope,
7315
+ nonce
7316
+ }) => {
7317
+ const tokens = theme ?? (preset ? getThemePreset(preset)?.tokens : void 0);
7318
+ if (!tokens) return null;
7319
+ const css = themeToCss(tokens, scope ? { scope } : void 0);
7320
+ if (!css) return null;
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
+ ] });
7332
+ };
7333
+
7334
+ // src/app/data/metrics-shared.tsx
7335
+ var import_jsx_runtime50 = require("react/jsx-runtime");
7336
+ var metricCardShellClass = cn(
7337
+ studioIntegrationCardClass,
7338
+ "aui-app-metric-card shadow-none",
7339
+ "flex flex-col overflow-hidden"
7340
+ );
7341
+ var metricCardHeaderClass = "flex items-start justify-between gap-3 px-4 pb-1 pt-3";
7342
+ var metricTilesRowClass = "grid w-full min-w-0";
7343
+ var metricChartRegionClass = "relative min-h-0 w-full border-t border-border/40 pt-2";
7344
+ var metricChartPlotRegionClass = "relative min-h-0 w-full border-t border-border/40 px-0 pt-5 pb-3";
7345
+ var metricCellDividerClass = "border-r border-border/40";
7346
+ var MetricCardHeader = ({
7347
+ title,
7348
+ titleId,
7349
+ description,
7350
+ actions
7351
+ }) => {
7352
+ if (!title && !description && !actions) return null;
7353
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("header", { className: metricCardHeaderClass, children: [
7354
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "min-w-0", children: [
7355
+ title ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("h3", { id: titleId, className: "text-base font-normal text-foreground", children: title }) : null,
7356
+ description ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { className: "mt-0.5 text-sm text-muted-foreground", children: description }) : null
7357
+ ] }),
7358
+ actions ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "shrink-0", children: actions }) : null
7359
+ ] });
7360
+ };
7361
+ function metricTilesGridColsClass(n) {
7362
+ switch (n) {
7363
+ case 1:
7364
+ return "grid-cols-1";
7365
+ case 2:
7366
+ return "grid-cols-2";
7367
+ case 3:
7368
+ return "grid-cols-3";
7369
+ case 5:
7370
+ return "grid-cols-2 sm:grid-cols-5";
7371
+ case 6:
7372
+ return "grid-cols-2 sm:grid-cols-3 lg:grid-cols-6";
7373
+ default:
7374
+ return "grid-cols-2 md:grid-cols-4";
7375
+ }
7376
+ }
7377
+
7378
+ // src/app/data/MetricTile.tsx
7379
+ var import_jsx_runtime51 = require("react/jsx-runtime");
7380
+ var trendToneClass = {
7381
+ up: "border-border/80 bg-muted/40 text-muted-foreground",
7382
+ down: "border-border/80 bg-muted/40 text-muted-foreground",
7383
+ neutral: "border-border/80 bg-muted/30 text-muted-foreground"
7384
+ };
7385
+ var metricTileBaseClass = "relative flex min-w-0 flex-1 flex-col gap-1 px-4 py-3 text-left font-normal";
7386
+ var metricTileInteractiveClass = cn(
7387
+ metricTileBaseClass,
7388
+ "bg-transparent hover:bg-transparent active:bg-transparent",
7389
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-foreground/10"
7390
+ );
7391
+ var MetricTile = ({
7392
+ label,
7393
+ value,
7394
+ unit,
7395
+ trend,
7396
+ trendTone = "neutral",
7397
+ active = false,
7398
+ showDivider = false,
7399
+ onSelect,
7400
+ ariaLabel,
7401
+ className
7402
+ }) => {
7403
+ const content = /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
7404
+ active ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
7405
+ "span",
7406
+ {
7407
+ "aria-hidden": true,
7408
+ className: "absolute inset-x-0 bottom-0 h-0.5 bg-foreground dark:bg-white"
7409
+ }
7410
+ ) : null,
7411
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "text-xs font-normal text-muted-foreground", children: label }),
7412
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("span", { className: "flex items-center gap-2", children: [
7413
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("span", { className: "flex items-baseline gap-1", children: [
7414
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "text-2xl font-normal tracking-tight text-foreground tabular-nums", children: value }),
7415
+ unit ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "text-xs font-normal text-muted-foreground", children: unit }) : null
7416
+ ] }),
7417
+ trend ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
7418
+ "span",
7419
+ {
7420
+ className: cn(
7421
+ "rounded-full border px-1.5 py-0.5 text-xs font-normal",
7422
+ trendToneClass[trendTone]
7423
+ ),
7424
+ children: trend
7425
+ }
7426
+ ) : null
7427
+ ] })
7428
+ ] });
7429
+ const divider = showDivider ? metricCellDividerClass : void 0;
7430
+ if (onSelect) {
7431
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
7432
+ "button",
7433
+ {
7434
+ type: "button",
7435
+ onClick: onSelect,
7436
+ "aria-pressed": active,
7437
+ "aria-label": ariaLabel,
7438
+ className: cn(metricTileInteractiveClass, divider, className),
7439
+ children: content
7440
+ }
7441
+ );
7442
+ }
7443
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: cn(metricTileBaseClass, divider, className), children: content });
7444
+ };
7445
+
7446
+ // src/app/theme/ThemePresetGallery.tsx
7447
+ var import_jsx_runtime52 = require("react/jsx-runtime");
7448
+ var ThemePresetGallery = ({
7449
+ value,
7450
+ onSelect,
7451
+ presets,
7452
+ className
7453
+ }) => {
7454
+ const items = presets ? TIMBAL_THEME_PRESETS.filter((p) => presets.includes(p.id)) : TIMBAL_THEME_PRESETS;
7455
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
7456
+ "div",
7457
+ {
7458
+ role: "radiogroup",
7459
+ "aria-label": "Theme presets",
7460
+ className: cn(
7461
+ "grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",
7462
+ className
7463
+ ),
7464
+ children: items.map((preset) => {
7465
+ const selected = value === preset.id;
7466
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { "data-timbal-theme": preset.id, children: [
7467
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(TimbalThemeStyle, { preset: preset.id, scope: preset.id }),
7468
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
7469
+ "button",
7470
+ {
7471
+ type: "button",
7472
+ role: "radio",
7473
+ "aria-checked": selected,
7474
+ "aria-label": `${preset.label} theme`,
7475
+ onClick: () => onSelect?.(preset.id),
7476
+ className: cn(
7477
+ "group flex w-full flex-col gap-3 rounded-xl border bg-card p-3 text-left transition-colors",
7478
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
7479
+ selected ? "border-primary ring-2 ring-primary/30" : "border-border hover:border-foreground/30"
7480
+ ),
7481
+ children: [
7482
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
7483
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { className: "flex items-center gap-2", children: [
7484
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
7485
+ "span",
7486
+ {
7487
+ "aria-hidden": true,
7488
+ className: "size-4 shrink-0 rounded-full ring-1 ring-black/10",
7489
+ style: { background: preset.swatch }
7490
+ }
7491
+ ),
7492
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "text-sm font-medium text-foreground", children: preset.label })
7493
+ ] }),
7494
+ selected ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "text-xs font-medium text-primary", children: "Selected" }) : null
7495
+ ] }),
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,
7501
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex flex-col gap-2 rounded-lg border border-border bg-background p-2", children: [
7502
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex items-center gap-2", children: [
7503
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Button, { size: "xs", className: "pointer-events-none", children: "Primary" }),
7504
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "size-5 rounded-md bg-primary", "aria-hidden": true }),
7505
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "size-5 rounded-md bg-muted", "aria-hidden": true }),
7506
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
7507
+ "span",
7508
+ {
7509
+ className: "size-5 rounded-md border border-border bg-accent",
7510
+ "aria-hidden": true
7511
+ }
7512
+ )
7513
+ ] }),
7514
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(MetricTile, { label: "Active users", value: "1,248", trend: "+8%" })
7515
+ ] })
7516
+ ]
7517
+ }
7518
+ )
7519
+ ] }, preset.id);
7520
+ })
7521
+ }
7522
+ );
7523
+ };
7524
+
6650
7525
  // src/app/layout/AppShell.tsx
6651
7526
  var import_react55 = require("motion/react");
6652
7527
  var import_react56 = require("react");
@@ -6713,7 +7588,7 @@ function useAppShellChat() {
6713
7588
  }
6714
7589
 
6715
7590
  // src/app/layout/AppShell.tsx
6716
- var import_jsx_runtime49 = require("react/jsx-runtime");
7591
+ var import_jsx_runtime53 = require("react/jsx-runtime");
6717
7592
  var floatingTriggerClass = cn(
6718
7593
  "aui-app-shell-chat-trigger-fixed fixed z-50 rounded-full px-5 py-2.5 text-sm font-medium shadow-card-elevated",
6719
7594
  "bg-primary text-primary-foreground transition-colors hover:bg-primary/90",
@@ -6742,14 +7617,14 @@ var AppShellBody = ({
6742
7617
  layoutDirection
6743
7618
  );
6744
7619
  const insetPadding = sidebar ? insetPaddingPx : 0;
6745
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
7620
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
6746
7621
  import_react55.motion.div,
6747
7622
  {
6748
7623
  className: "aui-app-shell-body relative z-10 flex min-h-0 min-w-0 flex-1 flex-col",
6749
7624
  initial: false,
6750
7625
  animate: { paddingLeft: insetPadding },
6751
7626
  transition: layoutTransition,
6752
- children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
7627
+ children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
6753
7628
  "div",
6754
7629
  {
6755
7630
  className: cn(
@@ -6757,8 +7632,8 @@ var AppShellBody = ({
6757
7632
  !topbarContent && appShellInsetTopClass
6758
7633
  ),
6759
7634
  children: [
6760
- topbarContent ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("header", { className: cn("aui-app-shell-topbar-region", appShellTopbarStickyClass), children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: appShellTopbarInsetClass, children: topbarContent }) }) : null,
6761
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("main", { className: cn("aui-app-shell-main min-w-0 flex-1", mainClassName), children })
7635
+ topbarContent ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("header", { className: cn("aui-app-shell-topbar-region", appShellTopbarStickyClass), children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: appShellTopbarInsetClass, children: topbarContent }) }) : null,
7636
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("main", { className: cn("aui-app-shell-main min-w-0 flex-1", mainClassName), children })
6762
7637
  ]
6763
7638
  }
6764
7639
  )
@@ -6806,7 +7681,7 @@ var AppShell = ({
6806
7681
  setInsetPaddingPx(insetPx);
6807
7682
  }, []);
6808
7683
  const insetExpanded = insetPaddingPx >= SIDEBAR_INSET_PX_EXPANDED;
6809
- const shellBody = /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
7684
+ const shellBody = /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
6810
7685
  AppShellBody,
6811
7686
  {
6812
7687
  sidebar,
@@ -6817,7 +7692,7 @@ var AppShell = ({
6817
7692
  children
6818
7693
  }
6819
7694
  );
6820
- const tree = /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ShellInsetProvider, { value: sidebar ? reportShellInset : null, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
7695
+ const tree = /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ShellInsetProvider, { value: sidebar ? reportShellInset : null, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
6821
7696
  "div",
6822
7697
  {
6823
7698
  className: cn(
@@ -6828,7 +7703,7 @@ var AppShell = ({
6828
7703
  children: [
6829
7704
  sidebar,
6830
7705
  shellBody,
6831
- hasChat && chatOpen ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
7706
+ hasChat && chatOpen ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
6832
7707
  "div",
6833
7708
  {
6834
7709
  className: floatingPanelClass,
@@ -6841,7 +7716,7 @@ var AppShell = ({
6841
7716
  children: chat
6842
7717
  }
6843
7718
  ) : null,
6844
- hasChat && chatCollapsible && !chatOpen && !hideChatTrigger ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
7719
+ hasChat && chatCollapsible && !chatOpen && !hideChatTrigger ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
6845
7720
  "button",
6846
7721
  {
6847
7722
  type: "button",
@@ -6857,7 +7732,7 @@ var AppShell = ({
6857
7732
  if (!hasChat) {
6858
7733
  return tree;
6859
7734
  }
6860
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
7735
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
6861
7736
  AppShellChatProvider,
6862
7737
  {
6863
7738
  value: {
@@ -6872,24 +7747,24 @@ var AppShell = ({
6872
7747
  };
6873
7748
 
6874
7749
  // src/app/layout/AppShellTopbar.tsx
6875
- var import_jsx_runtime50 = require("react/jsx-runtime");
7750
+ var import_jsx_runtime54 = require("react/jsx-runtime");
6876
7751
  var AppShellTopbar = ({
6877
7752
  start,
6878
7753
  actions,
6879
7754
  children,
6880
7755
  className
6881
7756
  }) => {
6882
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: cn("aui-app-shell-topbar", appShellTopbarRowClass, className), children: [
6883
- /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
7757
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: cn("aui-app-shell-topbar", appShellTopbarRowClass, className), children: [
7758
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
6884
7759
  start,
6885
7760
  children
6886
7761
  ] }),
6887
- actions ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "aui-app-shell-topbar-actions flex shrink-0 items-center gap-2", children: actions }) : null
7762
+ actions ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "aui-app-shell-topbar-actions flex shrink-0 items-center gap-2", children: actions }) : null
6888
7763
  ] });
6889
7764
  };
6890
7765
 
6891
7766
  // src/app/layout/AppShellChatTrigger.tsx
6892
- var import_jsx_runtime51 = require("react/jsx-runtime");
7767
+ var import_jsx_runtime55 = require("react/jsx-runtime");
6893
7768
  var floatingPositionClass = "fixed bottom-6 right-6 z-50 max-sm:bottom-4 max-sm:right-4";
6894
7769
  var AppShellChatTrigger = ({
6895
7770
  className,
@@ -6898,7 +7773,7 @@ var AppShellChatTrigger = ({
6898
7773
  }) => {
6899
7774
  const shellChat = useAppShellChat();
6900
7775
  if (!shellChat || shellChat.open) return null;
6901
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
7776
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
6902
7777
  TimbalV2Button,
6903
7778
  {
6904
7779
  type: "button",
@@ -6918,61 +7793,61 @@ var AppShellChatTrigger = ({
6918
7793
  };
6919
7794
 
6920
7795
  // src/app/layout/PageHeader.tsx
6921
- var import_jsx_runtime52 = require("react/jsx-runtime");
7796
+ var import_jsx_runtime56 = require("react/jsx-runtime");
6922
7797
  var PageHeader = ({
6923
7798
  title,
6924
7799
  description,
6925
7800
  actions,
6926
7801
  className
6927
7802
  }) => {
6928
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("header", { className: cn("aui-app-page-header", appPageHeaderClass, className), children: [
6929
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "min-w-0", children: [
6930
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("h1", { className: "text-2xl font-semibold tracking-tight text-foreground", children: title }),
6931
- description ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "mt-1 text-sm text-muted-foreground", children: description }) : null
7803
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("header", { className: cn("aui-app-page-header", appPageHeaderClass, className), children: [
7804
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "min-w-0", children: [
7805
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("h1", { className: "text-2xl font-semibold tracking-tight text-foreground", children: title }),
7806
+ description ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("p", { className: "mt-1 text-sm text-muted-foreground", children: description }) : null
6932
7807
  ] }),
6933
- actions ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "aui-app-page-header-actions flex shrink-0 flex-wrap items-center gap-2", children: actions }) : null
7808
+ actions ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "aui-app-page-header-actions flex shrink-0 flex-wrap items-center gap-2", children: actions }) : null
6934
7809
  ] });
6935
7810
  };
6936
7811
 
6937
7812
  // src/app/layout/Page.tsx
6938
- var import_jsx_runtime53 = require("react/jsx-runtime");
7813
+ var import_jsx_runtime57 = require("react/jsx-runtime");
6939
7814
  var Page = ({
6940
7815
  children,
6941
7816
  breadcrumbs,
6942
7817
  className,
6943
7818
  ...headerProps
6944
7819
  }) => {
6945
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: cn("aui-app-page", appPageColumnClass, className), children: [
7820
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: cn("aui-app-page", appPageColumnClass, className), children: [
6946
7821
  breadcrumbs,
6947
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(PageHeader, { ...headerProps }),
7822
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(PageHeader, { ...headerProps }),
6948
7823
  children
6949
7824
  ] });
6950
7825
  };
6951
7826
 
6952
7827
  // src/app/layout/Section.tsx
6953
- var import_jsx_runtime54 = require("react/jsx-runtime");
7828
+ var import_jsx_runtime58 = require("react/jsx-runtime");
6954
7829
  var Section = ({
6955
7830
  title,
6956
7831
  description,
6957
7832
  children,
6958
7833
  className
6959
7834
  }) => {
6960
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("section", { className: cn("aui-app-section", appSectionClass, className), children: [
6961
- title ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("h2", { className: appSectionTitleClass, children: title }) : null,
6962
- description ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: appSectionDescriptionClass, children: description }) : null,
7835
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("section", { className: cn("aui-app-section", appSectionClass, className), children: [
7836
+ title ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("h2", { className: appSectionTitleClass, children: title }) : null,
7837
+ description ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: appSectionDescriptionClass, children: description }) : null,
6963
7838
  children
6964
7839
  ] });
6965
7840
  };
6966
7841
 
6967
7842
  // src/app/copilot/app-copilot-context.tsx
6968
7843
  var import_react57 = require("react");
6969
- var import_jsx_runtime55 = require("react/jsx-runtime");
7844
+ var import_jsx_runtime59 = require("react/jsx-runtime");
6970
7845
  var AppCopilotContext = (0, import_react57.createContext)(null);
6971
7846
  var AppCopilotProvider = ({
6972
7847
  value,
6973
7848
  children
6974
7849
  }) => {
6975
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(AppCopilotContext.Provider, { value, children });
7850
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(AppCopilotContext.Provider, { value, children });
6976
7851
  };
6977
7852
  function useAppCopilotContext() {
6978
7853
  return (0, import_react57.useContext)(AppCopilotContext) ?? {};
@@ -6980,7 +7855,7 @@ function useAppCopilotContext() {
6980
7855
 
6981
7856
  // src/app/chat/AppChatPanel.tsx
6982
7857
  var import_lucide_react15 = require("lucide-react");
6983
- var import_jsx_runtime56 = require("react/jsx-runtime");
7858
+ var import_jsx_runtime60 = require("react/jsx-runtime");
6984
7859
  var shellClass = "aui-app-chat-panel flex h-full min-h-0 flex-col overflow-hidden";
6985
7860
  var chromeClass = cn(
6986
7861
  "aui-app-chat-panel-chrome relative z-20 flex min-h-10 shrink-0 items-center justify-end px-2 pt-2"
@@ -7025,18 +7900,18 @@ var AppChatPanel = ({
7025
7900
  ...rest
7026
7901
  }) => {
7027
7902
  const shellChat = useAppShellChat();
7028
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: cn(shellClass, className), children: [
7029
- shellChat?.collapsible ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: chromeClass, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
7903
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: cn(shellClass, className), children: [
7904
+ shellChat?.collapsible ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: chromeClass, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
7030
7905
  "button",
7031
7906
  {
7032
7907
  type: "button",
7033
7908
  className: closeButtonClass,
7034
7909
  onClick: () => shellChat.setOpen(false),
7035
7910
  "aria-label": "Close assistant",
7036
- children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_lucide_react15.XIcon, { className: "size-4", "aria-hidden": true })
7911
+ children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_lucide_react15.XIcon, { className: "size-4", "aria-hidden": true })
7037
7912
  }
7038
7913
  ) }) : null,
7039
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: bodyClass, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
7914
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: bodyClass, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
7040
7915
  TimbalRuntimeProvider,
7041
7916
  {
7042
7917
  workforceId,
@@ -7046,7 +7921,7 @@ var AppChatPanel = ({
7046
7921
  attachmentsUploadUrl,
7047
7922
  attachmentsAccept,
7048
7923
  debug,
7049
- children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
7924
+ children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
7050
7925
  Thread,
7051
7926
  {
7052
7927
  variant: "panel",
@@ -7067,38 +7942,38 @@ var AppChatPanel = ({
7067
7942
  };
7068
7943
 
7069
7944
  // src/app/surfaces/SurfaceCard.tsx
7070
- var import_jsx_runtime57 = require("react/jsx-runtime");
7945
+ var import_jsx_runtime61 = require("react/jsx-runtime");
7071
7946
  var SurfaceCard = ({ children, className }) => {
7072
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: cn("aui-app-surface-card", appSurfaceCardClass, className), children });
7947
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: cn("aui-app-surface-card", appSurfaceCardClass, className), children });
7073
7948
  };
7074
7949
 
7075
7950
  // src/app/surfaces/StatTile.tsx
7076
- var import_jsx_runtime58 = require("react/jsx-runtime");
7951
+ var import_jsx_runtime62 = require("react/jsx-runtime");
7077
7952
  var StatTile = ({ label, value, hint, className }) => {
7078
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: cn("aui-app-stat-tile", appStatTileClass, className), children: [
7079
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: appStatLabelClass, children: label }),
7080
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: appStatValueClass, children: value }),
7081
- hint ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "text-xs text-muted-foreground", children: hint }) : null
7953
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: cn("aui-app-stat-tile", appStatTileClass, className), children: [
7954
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: appStatLabelClass, children: label }),
7955
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: appStatValueClass, children: value }),
7956
+ hint ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "text-xs text-muted-foreground", children: hint }) : null
7082
7957
  ] });
7083
7958
  };
7084
7959
 
7085
7960
  // src/app/surfaces/EmptyState.tsx
7086
- var import_jsx_runtime59 = require("react/jsx-runtime");
7961
+ var import_jsx_runtime63 = require("react/jsx-runtime");
7087
7962
  var EmptyState = ({
7088
7963
  title,
7089
7964
  description,
7090
7965
  action,
7091
7966
  className
7092
7967
  }) => {
7093
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: cn("aui-app-empty-state", appEmptyStateClass, className), children: [
7094
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { className: appEmptyStateTitleClass, children: title }),
7095
- description ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { className: appEmptyStateDescriptionClass, children: description }) : null,
7968
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: cn("aui-app-empty-state", appEmptyStateClass, className), children: [
7969
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("p", { className: appEmptyStateTitleClass, children: title }),
7970
+ description ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("p", { className: appEmptyStateDescriptionClass, children: description }) : null,
7096
7971
  action
7097
7972
  ] });
7098
7973
  };
7099
7974
 
7100
7975
  // src/app/surfaces/StatusBadge.tsx
7101
- var import_jsx_runtime60 = require("react/jsx-runtime");
7976
+ var import_jsx_runtime64 = require("react/jsx-runtime");
7102
7977
  var statusBadgeToneClass = {
7103
7978
  default: "bg-muted text-foreground",
7104
7979
  primary: "bg-primary/10 text-primary",
@@ -7111,7 +7986,7 @@ var StatusBadge = ({
7111
7986
  tone = "default",
7112
7987
  className
7113
7988
  }) => {
7114
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
7989
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
7115
7990
  "span",
7116
7991
  {
7117
7992
  className: cn(
@@ -7125,7 +8000,7 @@ var StatusBadge = ({
7125
8000
  };
7126
8001
 
7127
8002
  // src/app/surfaces/AppConfirmDialog.tsx
7128
- var import_jsx_runtime61 = require("react/jsx-runtime");
8003
+ var import_jsx_runtime65 = require("react/jsx-runtime");
7129
8004
  var bodyClass2 = "flex flex-col gap-4 p-6";
7130
8005
  var titleClass = "pr-8";
7131
8006
  var actionsClass = "flex flex-wrap justify-end gap-2";
@@ -7140,15 +8015,15 @@ var AppConfirmDialog = ({
7140
8015
  destructive = false,
7141
8016
  className
7142
8017
  }) => {
7143
- return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Dialog, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
8018
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Dialog, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
7144
8019
  DialogContent,
7145
8020
  {
7146
8021
  className: cn("gap-0 p-0 sm:max-w-md", className),
7147
- children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: bodyClass2, children: [
7148
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(DialogTitle, { className: titleClass, children: title }),
7149
- description ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("p", { className: "text-sm text-muted-foreground", children: description }) : null,
7150
- /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: actionsClass, children: [
7151
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
8022
+ children: /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: bodyClass2, children: [
8023
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(DialogTitle, { className: titleClass, children: title }),
8024
+ description ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("p", { className: "text-sm text-muted-foreground", children: description }) : null,
8025
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: actionsClass, children: [
8026
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
7152
8027
  TimbalV2Button,
7153
8028
  {
7154
8029
  type: "button",
@@ -7158,7 +8033,7 @@ var AppConfirmDialog = ({
7158
8033
  children: cancelLabel
7159
8034
  }
7160
8035
  ),
7161
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
8036
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
7162
8037
  TimbalV2Button,
7163
8038
  {
7164
8039
  type: "button",
@@ -7178,7 +8053,7 @@ var AppConfirmDialog = ({
7178
8053
  };
7179
8054
 
7180
8055
  // src/app/surfaces/InfoCard.tsx
7181
- var import_jsx_runtime62 = require("react/jsx-runtime");
8056
+ var import_jsx_runtime66 = require("react/jsx-runtime");
7182
8057
  var toneClass = {
7183
8058
  neutral: "border-border bg-muted/40",
7184
8059
  info: "border-primary/25 bg-primary/5",
@@ -7193,7 +8068,7 @@ var InfoCard = ({
7193
8068
  action,
7194
8069
  tone = "neutral",
7195
8070
  className
7196
- }) => /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
8071
+ }) => /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
7197
8072
  "div",
7198
8073
  {
7199
8074
  className: cn(
@@ -7202,18 +8077,18 @@ var InfoCard = ({
7202
8077
  className
7203
8078
  ),
7204
8079
  children: [
7205
- icon ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "mt-0.5 shrink-0 text-muted-foreground", children: icon }) : null,
7206
- /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "min-w-0 flex-1", children: [
7207
- title ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("p", { className: "text-sm font-medium text-foreground", children: title }) : null,
7208
- children ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: cn("text-sm text-muted-foreground", title && "mt-1"), children }) : null
8080
+ icon ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "mt-0.5 shrink-0 text-muted-foreground", children: icon }) : null,
8081
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "min-w-0 flex-1", children: [
8082
+ title ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("p", { className: "text-sm font-medium text-foreground", children: title }) : null,
8083
+ children ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: cn("text-sm text-muted-foreground", title && "mt-1"), children }) : null
7209
8084
  ] }),
7210
- action ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "shrink-0", children: action }) : null
8085
+ action ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "shrink-0", children: action }) : null
7211
8086
  ]
7212
8087
  }
7213
8088
  );
7214
8089
 
7215
8090
  // src/app/surfaces/StatusDot.tsx
7216
- var import_jsx_runtime63 = require("react/jsx-runtime");
8091
+ var import_jsx_runtime67 = require("react/jsx-runtime");
7217
8092
  var dotClass = {
7218
8093
  online: "bg-emerald-500",
7219
8094
  busy: "bg-amber-500",
@@ -7226,9 +8101,9 @@ var StatusDot = ({
7226
8101
  label,
7227
8102
  pulse = false,
7228
8103
  className
7229
- }) => /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("span", { className: cn("inline-flex items-center gap-1.5", className), children: [
7230
- /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("span", { className: "relative flex size-2", children: [
7231
- pulse ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
8104
+ }) => /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("span", { className: cn("inline-flex items-center gap-1.5", className), children: [
8105
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("span", { className: "relative flex size-2", children: [
8106
+ pulse ? /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
7232
8107
  "span",
7233
8108
  {
7234
8109
  className: cn(
@@ -7237,25 +8112,25 @@ var StatusDot = ({
7237
8112
  )
7238
8113
  }
7239
8114
  ) : null,
7240
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: cn("relative inline-flex size-2 rounded-full", dotClass[tone]) })
8115
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: cn("relative inline-flex size-2 rounded-full", dotClass[tone]) })
7241
8116
  ] }),
7242
- label ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: "text-xs text-muted-foreground", children: label }) : null
8117
+ label ? /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "text-xs text-muted-foreground", children: label }) : null
7243
8118
  ] });
7244
8119
 
7245
8120
  // src/app/surfaces/DescriptionList.tsx
7246
- var import_jsx_runtime64 = require("react/jsx-runtime");
8121
+ var import_jsx_runtime68 = require("react/jsx-runtime");
7247
8122
  var DescriptionList = ({
7248
8123
  items,
7249
8124
  stacked = false,
7250
8125
  className
7251
- }) => /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
8126
+ }) => /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
7252
8127
  "dl",
7253
8128
  {
7254
8129
  className: cn(
7255
8130
  "divide-y divide-border rounded-xl border border-border bg-card",
7256
8131
  className
7257
8132
  ),
7258
- children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
8133
+ children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
7259
8134
  "div",
7260
8135
  {
7261
8136
  className: cn(
@@ -7263,8 +8138,8 @@ var DescriptionList = ({
7263
8138
  stacked ? "flex flex-col gap-0.5" : "flex items-center justify-between gap-4"
7264
8139
  ),
7265
8140
  children: [
7266
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("dt", { className: "text-sm text-muted-foreground", children: item.label }),
7267
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
8141
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("dt", { className: "text-sm text-muted-foreground", children: item.label }),
8142
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
7268
8143
  "dd",
7269
8144
  {
7270
8145
  className: cn(
@@ -7284,8 +8159,8 @@ var DescriptionList = ({
7284
8159
  // src/app/surfaces/ExpandableSection.tsx
7285
8160
  var import_react58 = require("react");
7286
8161
  var import_react59 = require("motion/react");
7287
- var import_jsx_runtime65 = require("react/jsx-runtime");
7288
- var Chevron = ({ open }) => /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
8162
+ var import_jsx_runtime69 = require("react/jsx-runtime");
8163
+ var Chevron = ({ open }) => /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
7289
8164
  "svg",
7290
8165
  {
7291
8166
  viewBox: "0 0 24 24",
@@ -7299,7 +8174,7 @@ var Chevron = ({ open }) => /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
7299
8174
  strokeLinecap: "round",
7300
8175
  strokeLinejoin: "round",
7301
8176
  "aria-hidden": true,
7302
- children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("path", { d: "m6 9 6 6 6-6" })
8177
+ children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("path", { d: "m6 9 6 6 6-6" })
7303
8178
  }
7304
8179
  );
7305
8180
  var ExpandableSection = ({
@@ -7320,8 +8195,8 @@ var ExpandableSection = ({
7320
8195
  if (openProp == null) setInternalOpen((o) => !o);
7321
8196
  onOpenChange?.(!open);
7322
8197
  };
7323
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: cn("border-b border-border last:border-0", className), children: [
7324
- /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
8198
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: cn("border-b border-border last:border-0", className), children: [
8199
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
7325
8200
  "button",
7326
8201
  {
7327
8202
  type: "button",
@@ -7330,16 +8205,16 @@ var ExpandableSection = ({
7330
8205
  "aria-controls": panelId,
7331
8206
  className: "flex w-full items-center justify-between gap-3 bg-transparent px-4 py-3 text-left hover:bg-transparent active:bg-transparent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-foreground/10",
7332
8207
  children: [
7333
- /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("span", { className: "flex min-w-0 items-center gap-3", children: [
7334
- icon ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "flex size-8 items-center justify-center rounded-lg border border-border bg-muted text-muted-foreground", children: icon }) : null,
7335
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "truncate text-sm font-medium text-foreground", children: title }),
7336
- count != null ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "rounded-full border border-border bg-muted px-2 py-0.5 text-xs text-muted-foreground", children: count }) : null
8208
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("span", { className: "flex min-w-0 items-center gap-3", children: [
8209
+ icon ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "flex size-8 items-center justify-center rounded-lg border border-border bg-muted text-muted-foreground", children: icon }) : null,
8210
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "truncate text-sm font-medium text-foreground", children: title }),
8211
+ count != null ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "rounded-full border border-border bg-muted px-2 py-0.5 text-xs text-muted-foreground", children: count }) : null
7337
8212
  ] }),
7338
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Chevron, { open })
8213
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Chevron, { open })
7339
8214
  ]
7340
8215
  }
7341
8216
  ),
7342
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_react59.AnimatePresence, { initial: false, children: open ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
8217
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react59.AnimatePresence, { initial: false, children: open ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
7343
8218
  import_react59.motion.div,
7344
8219
  {
7345
8220
  id: panelId,
@@ -7348,7 +8223,7 @@ var ExpandableSection = ({
7348
8223
  exit: reduceMotion ? void 0 : { height: 0, opacity: 0 },
7349
8224
  transition: { duration: 0.2, ease: "easeOut" },
7350
8225
  className: "overflow-hidden",
7351
- children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "bg-muted/20", children })
8226
+ children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "bg-muted/20", children })
7352
8227
  },
7353
8228
  "body"
7354
8229
  ) : null })
@@ -7356,7 +8231,7 @@ var ExpandableSection = ({
7356
8231
  };
7357
8232
 
7358
8233
  // src/app/surfaces/ResourceCard.tsx
7359
- var import_jsx_runtime66 = require("react/jsx-runtime");
8234
+ var import_jsx_runtime70 = require("react/jsx-runtime");
7360
8235
  var resourceCardShellClass = cn(
7361
8236
  "flex min-h-[8.5rem] flex-col rounded-2xl p-4 text-left font-normal",
7362
8237
  TIMBAL_V2_ELEVATED_SURFACE
@@ -7381,35 +8256,35 @@ var ResourceCard = ({
7381
8256
  ariaLabel,
7382
8257
  className
7383
8258
  }) => {
7384
- const body = /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_jsx_runtime66.Fragment, { children: [
7385
- /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex items-start gap-3", children: [
7386
- media ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: mediaShellClass, children: media }) : null,
7387
- /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "min-w-0 flex-1 pt-0.5", children: [
7388
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("p", { className: "truncate text-sm font-normal leading-snug text-foreground", children: title }),
7389
- subtitle ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("p", { className: "mt-1 line-clamp-2 text-xs font-normal text-muted-foreground", children: subtitle }) : null
8259
+ const body = /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(import_jsx_runtime70.Fragment, { children: [
8260
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "flex items-start gap-3", children: [
8261
+ media ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: mediaShellClass, children: media }) : null,
8262
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "min-w-0 flex-1 pt-0.5", children: [
8263
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("p", { className: "truncate text-sm font-normal leading-snug text-foreground", children: title }),
8264
+ subtitle ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("p", { className: "mt-1 line-clamp-2 text-xs font-normal text-muted-foreground", children: subtitle }) : null
7390
8265
  ] }),
7391
- badge ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "shrink-0 pt-0.5", children: badge }) : null
8266
+ badge ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "shrink-0 pt-0.5", children: badge }) : null
7392
8267
  ] }),
7393
- footer || action ? /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "mt-auto flex items-center justify-between gap-3 border-t border-border/40 pt-3 text-xs font-normal text-muted-foreground", children: [
7394
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "min-w-0 truncate", children: footer }),
7395
- action ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "shrink-0 opacity-80", children: action }) : null
8268
+ footer || action ? /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "mt-auto flex items-center justify-between gap-3 border-t border-border/40 pt-3 text-xs font-normal text-muted-foreground", children: [
8269
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "min-w-0 truncate", children: footer }),
8270
+ action ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "shrink-0 opacity-80", children: action }) : null
7396
8271
  ] }) : null
7397
8272
  ] });
7398
8273
  if (onClick) {
7399
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("button", { type: "button", onClick, "aria-label": ariaLabel, className: cn(resourceCardInteractiveClass, className), children: body });
8274
+ return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("button", { type: "button", onClick, "aria-label": ariaLabel, className: cn(resourceCardInteractiveClass, className), children: body });
7400
8275
  }
7401
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("article", { className: cn(resourceCardShellClass, className), children: body });
8276
+ return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("article", { className: cn(resourceCardShellClass, className), children: body });
7402
8277
  };
7403
8278
 
7404
8279
  // src/app/settings/SettingsSection.tsx
7405
- var import_jsx_runtime67 = require("react/jsx-runtime");
8280
+ var import_jsx_runtime71 = require("react/jsx-runtime");
7406
8281
  var SettingsSectionHeader = ({
7407
8282
  title,
7408
8283
  description,
7409
8284
  className
7410
- }) => /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: cn("flex flex-col", className), children: [
7411
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("h3", { className: "text-[17px] font-medium leading-tight text-foreground", children: title }),
7412
- description ? /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("p", { className: "mt-1 text-sm text-muted-foreground", children: description }) : null
8285
+ }) => /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: cn("flex flex-col", className), children: [
8286
+ /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("h3", { className: "text-[17px] font-medium leading-tight text-foreground", children: title }),
8287
+ description ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("p", { className: "mt-1 text-sm text-muted-foreground", children: description }) : null
7413
8288
  ] });
7414
8289
  var SettingsSection = ({
7415
8290
  title,
@@ -7418,7 +8293,7 @@ var SettingsSection = ({
7418
8293
  children,
7419
8294
  noBorderTop = false,
7420
8295
  className
7421
- }) => /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
8296
+ }) => /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(
7422
8297
  "section",
7423
8298
  {
7424
8299
  className: cn(
@@ -7427,18 +8302,18 @@ var SettingsSection = ({
7427
8302
  className
7428
8303
  ),
7429
8304
  children: [
7430
- /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "min-w-0", children: [
7431
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("h2", { className: "text-sm font-medium text-foreground", children: title }),
7432
- description ? /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("p", { className: "mt-1 text-sm text-muted-foreground", children: description }) : null,
7433
- descriptionFooter ? /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "mt-3 min-w-0", children: descriptionFooter }) : null
8305
+ /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "min-w-0", children: [
8306
+ /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("h2", { className: "text-sm font-medium text-foreground", children: title }),
8307
+ description ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("p", { className: "mt-1 text-sm text-muted-foreground", children: description }) : null,
8308
+ descriptionFooter ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "mt-3 min-w-0", children: descriptionFooter }) : null
7434
8309
  ] }),
7435
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "min-w-0 space-y-3", children })
8310
+ /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "min-w-0 space-y-3", children })
7436
8311
  ]
7437
8312
  }
7438
8313
  );
7439
8314
 
7440
8315
  // src/app/settings/FieldRow.tsx
7441
- var import_jsx_runtime68 = require("react/jsx-runtime");
8316
+ var import_jsx_runtime72 = require("react/jsx-runtime");
7442
8317
  var FieldRow = ({
7443
8318
  label,
7444
8319
  children,
@@ -7448,7 +8323,7 @@ var FieldRow = ({
7448
8323
  className
7449
8324
  }) => {
7450
8325
  if (inline) {
7451
- return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
8326
+ return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
7452
8327
  "div",
7453
8328
  {
7454
8329
  className: cn(
@@ -7456,8 +8331,8 @@ var FieldRow = ({
7456
8331
  className
7457
8332
  ),
7458
8333
  children: [
7459
- /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "min-w-0", children: [
7460
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
8334
+ /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "min-w-0", children: [
8335
+ /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
7461
8336
  "label",
7462
8337
  {
7463
8338
  htmlFor,
@@ -7465,17 +8340,17 @@ var FieldRow = ({
7465
8340
  children: label
7466
8341
  }
7467
8342
  ),
7468
- description ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("p", { className: "mt-0.5 text-xs text-muted-foreground", children: description }) : null
8343
+ description ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("p", { className: "mt-0.5 text-xs text-muted-foreground", children: description }) : null
7469
8344
  ] }),
7470
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "shrink-0", children })
8345
+ /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "shrink-0", children })
7471
8346
  ]
7472
8347
  }
7473
8348
  );
7474
8349
  }
7475
- return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: cn("flex flex-col gap-1.5", className), children: [
7476
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("label", { htmlFor, className: "text-sm font-medium text-foreground", children: label }),
8350
+ return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: cn("flex flex-col gap-1.5", className), children: [
8351
+ /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("label", { htmlFor, className: "text-sm font-medium text-foreground", children: label }),
7477
8352
  children,
7478
- description ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("p", { className: "text-xs text-muted-foreground", children: description }) : null
8353
+ description ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("p", { className: "text-xs text-muted-foreground", children: description }) : null
7479
8354
  ] });
7480
8355
  };
7481
8356
 
@@ -7483,7 +8358,7 @@ var FieldRow = ({
7483
8358
  var import_react60 = require("react");
7484
8359
  var import_react_dom2 = require("react-dom");
7485
8360
  var import_react61 = require("motion/react");
7486
- var import_jsx_runtime69 = require("react/jsx-runtime");
8361
+ var import_jsx_runtime73 = require("react/jsx-runtime");
7487
8362
  var FloatingUnsavedChangesBar = ({
7488
8363
  visible,
7489
8364
  message = "Unsaved changes",
@@ -7501,7 +8376,7 @@ var FloatingUnsavedChangesBar = ({
7501
8376
  (0, import_react60.useEffect)(() => setMounted(true), []);
7502
8377
  if (!mounted || typeof document === "undefined") return null;
7503
8378
  return (0, import_react_dom2.createPortal)(
7504
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react61.AnimatePresence, { children: visible ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "pointer-events-none fixed inset-x-0 bottom-5 z-50 flex justify-center px-4", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
8379
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_react61.AnimatePresence, { children: visible ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "pointer-events-none fixed inset-x-0 bottom-5 z-50 flex justify-center px-4", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
7505
8380
  import_react61.motion.div,
7506
8381
  {
7507
8382
  role: "region",
@@ -7515,10 +8390,10 @@ var FloatingUnsavedChangesBar = ({
7515
8390
  className
7516
8391
  ),
7517
8392
  children: [
7518
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "text-sm text-muted-foreground", children: message }),
7519
- /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("span", { className: "flex items-center gap-1.5", children: [
7520
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Button, { variant: "ghost", size: "sm", onClick: onDiscard, disabled: isSaving, children: discardLabel }),
7521
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Button, { size: "sm", onClick: onSave, disabled: saveDisabled || isSaving, children: isSaving ? "Saving\u2026" : saveLabel })
8393
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "text-sm text-muted-foreground", children: message }),
8394
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("span", { className: "flex items-center gap-1.5", children: [
8395
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Button, { variant: "ghost", size: "sm", onClick: onDiscard, disabled: isSaving, children: discardLabel }),
8396
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Button, { size: "sm", onClick: onSave, disabled: saveDisabled || isSaving, children: isSaving ? "Saving\u2026" : saveLabel })
7522
8397
  ] })
7523
8398
  ]
7524
8399
  }
@@ -7528,13 +8403,13 @@ var FloatingUnsavedChangesBar = ({
7528
8403
  };
7529
8404
 
7530
8405
  // src/app/settings/DangerZone.tsx
7531
- var import_jsx_runtime70 = require("react/jsx-runtime");
8406
+ var import_jsx_runtime74 = require("react/jsx-runtime");
7532
8407
  var DangerZoneAction = ({
7533
8408
  title,
7534
8409
  description,
7535
8410
  action,
7536
8411
  className
7537
- }) => /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(
8412
+ }) => /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
7538
8413
  "div",
7539
8414
  {
7540
8415
  className: cn(
@@ -7542,11 +8417,11 @@ var DangerZoneAction = ({
7542
8417
  className
7543
8418
  ),
7544
8419
  children: [
7545
- /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "min-w-0", children: [
7546
- /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("p", { className: "text-sm font-medium text-foreground", children: title }),
7547
- description ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("p", { className: "mt-0.5 text-sm text-muted-foreground", children: description }) : null
8420
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "min-w-0", children: [
8421
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("p", { className: "text-sm font-medium text-foreground", children: title }),
8422
+ description ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("p", { className: "mt-0.5 text-sm text-muted-foreground", children: description }) : null
7548
8423
  ] }),
7549
- /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "shrink-0", children: action })
8424
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "shrink-0", children: action })
7550
8425
  ]
7551
8426
  }
7552
8427
  );
@@ -7555,7 +8430,7 @@ var DangerZone = ({
7555
8430
  description,
7556
8431
  children,
7557
8432
  className
7558
- }) => /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(
8433
+ }) => /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
7559
8434
  "section",
7560
8435
  {
7561
8436
  className: cn(
@@ -7563,18 +8438,18 @@ var DangerZone = ({
7563
8438
  className
7564
8439
  ),
7565
8440
  children: [
7566
- (title || description) && /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("header", { className: "border-b border-destructive/20 bg-destructive/5 px-4 py-3", children: [
7567
- title ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("h3", { className: "text-sm font-semibold text-destructive", children: title }) : null,
7568
- description ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("p", { className: "mt-0.5 text-sm text-muted-foreground", children: description }) : null
8441
+ (title || description) && /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("header", { className: "border-b border-destructive/20 bg-destructive/5 px-4 py-3", children: [
8442
+ title ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("h3", { className: "text-sm font-semibold text-destructive", children: title }) : null,
8443
+ description ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("p", { className: "mt-0.5 text-sm text-muted-foreground", children: description }) : null
7569
8444
  ] }),
7570
- /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "divide-y divide-border bg-card", children })
8445
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "divide-y divide-border bg-card", children })
7571
8446
  ]
7572
8447
  }
7573
8448
  );
7574
8449
 
7575
8450
  // src/app/integrations/IntegrationCard.tsx
7576
8451
  var import_react62 = require("react");
7577
- var import_jsx_runtime71 = require("react/jsx-runtime");
8452
+ var import_jsx_runtime75 = require("react/jsx-runtime");
7578
8453
  var INTEGRATION_CATALOG_CARD_HEIGHT_CLASS = "h-[12.25rem] min-h-[12.25rem] max-h-[12.25rem]";
7579
8454
  var statusLabel = {
7580
8455
  available: null,
@@ -7615,12 +8490,12 @@ var IntegrationCard = ({
7615
8490
  const titleId = (0, import_react62.useId)();
7616
8491
  const locked = status === "locked";
7617
8492
  const dimmed = status === "disabled" || locked;
7618
- const body = /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "flex h-full min-h-0 flex-col", children: [
7619
- /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "flex shrink-0 items-start gap-3 pr-2", children: [
7620
- logo ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: logoShellClass, "aria-hidden": Boolean(ariaLabel), children: logo }) : null,
7621
- /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "min-w-0 flex-1 pt-0.5", children: /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "flex items-start justify-between gap-2", children: [
7622
- /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "min-w-0", children: [
7623
- /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
8493
+ const body = /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "flex h-full min-h-0 flex-col", children: [
8494
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "flex shrink-0 items-start gap-3 pr-2", children: [
8495
+ logo ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: logoShellClass, "aria-hidden": Boolean(ariaLabel), children: logo }) : null,
8496
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "min-w-0 flex-1 pt-0.5", children: /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "flex items-start justify-between gap-2", children: [
8497
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "min-w-0", children: [
8498
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
7624
8499
  "h4",
7625
8500
  {
7626
8501
  id: onClick && !action ? void 0 : titleId,
@@ -7628,12 +8503,12 @@ var IntegrationCard = ({
7628
8503
  children: name
7629
8504
  }
7630
8505
  ),
7631
- statusLabel[status] ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("p", { className: "mt-0.5 text-xs text-muted-foreground", children: statusLabel[status] }) : null
8506
+ statusLabel[status] ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("p", { className: "mt-0.5 text-xs text-muted-foreground", children: statusLabel[status] }) : null
7632
8507
  ] }),
7633
- badge ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "shrink-0", children: badge }) : null
8508
+ badge ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "shrink-0", children: badge }) : null
7634
8509
  ] }) })
7635
8510
  ] }),
7636
- description ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
8511
+ description ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
7637
8512
  "p",
7638
8513
  {
7639
8514
  className: cn(
@@ -7643,9 +8518,9 @@ var IntegrationCard = ({
7643
8518
  children: description
7644
8519
  }
7645
8520
  ) : null,
7646
- action ? /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(import_jsx_runtime71.Fragment, { children: [
7647
- /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "min-h-0 flex-1", "aria-hidden": true }),
7648
- /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "relative mt-3 shrink-0", children: action })
8521
+ action ? /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(import_jsx_runtime75.Fragment, { children: [
8522
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "min-h-0 flex-1", "aria-hidden": true }),
8523
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "relative mt-3 shrink-0", children: action })
7649
8524
  ] }) : null
7650
8525
  ] });
7651
8526
  const shellClass3 = cn(
@@ -7655,7 +8530,7 @@ var IntegrationCard = ({
7655
8530
  className
7656
8531
  );
7657
8532
  if (onClick && !action) {
7658
- return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
8533
+ return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
7659
8534
  "button",
7660
8535
  {
7661
8536
  type: "button",
@@ -7672,12 +8547,12 @@ var IntegrationCard = ({
7672
8547
  }
7673
8548
  );
7674
8549
  }
7675
- return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("article", { className: shellClass3, "aria-labelledby": titleId, children: body });
8550
+ return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("article", { className: shellClass3, "aria-labelledby": titleId, children: body });
7676
8551
  };
7677
8552
 
7678
8553
  // src/app/integrations/IntegrationsEmptyState.tsx
7679
8554
  var import_react63 = require("react");
7680
- var import_jsx_runtime72 = require("react/jsx-runtime");
8555
+ var import_jsx_runtime76 = require("react/jsx-runtime");
7681
8556
  var IntegrationsEmptyState = ({
7682
8557
  title = "No integrations yet",
7683
8558
  description = "Connect a provider to start syncing data and powering your workforce.",
@@ -7686,7 +8561,7 @@ var IntegrationsEmptyState = ({
7686
8561
  className
7687
8562
  }) => {
7688
8563
  const titleId = (0, import_react63.useId)();
7689
- return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
8564
+ return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
7690
8565
  "section",
7691
8566
  {
7692
8567
  className: cn(
@@ -7696,7 +8571,7 @@ var IntegrationsEmptyState = ({
7696
8571
  ),
7697
8572
  "aria-labelledby": titleId,
7698
8573
  children: [
7699
- icon ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
8574
+ icon ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
7700
8575
  "span",
7701
8576
  {
7702
8577
  className: cn(
@@ -7708,21 +8583,21 @@ var IntegrationsEmptyState = ({
7708
8583
  children: icon
7709
8584
  }
7710
8585
  ) : null,
7711
- /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("h3", { id: titleId, className: "text-base font-normal text-foreground", children: title }),
7712
- description ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("p", { className: "max-w-sm text-sm text-muted-foreground", children: description }) : null,
7713
- action ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "mt-1", children: action }) : null
8586
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("h3", { id: titleId, className: "text-base font-normal text-foreground", children: title }),
8587
+ description ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("p", { className: "max-w-sm text-sm text-muted-foreground", children: description }) : null,
8588
+ action ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "mt-1", children: action }) : null
7714
8589
  ]
7715
8590
  }
7716
8591
  );
7717
8592
  };
7718
8593
 
7719
8594
  // src/app/integrations/PlanBadge.tsx
7720
- var import_jsx_runtime73 = require("react/jsx-runtime");
8595
+ var import_jsx_runtime77 = require("react/jsx-runtime");
7721
8596
  var planBadgeClass = "inline-flex h-5 max-w-full shrink-0 items-center rounded-md border border-border bg-muted/90 px-2 text-[11px] font-normal text-muted-foreground dark:border-white/10 dark:bg-white/5 dark:text-muted-foreground";
7722
- var PlanBadge = ({ children, className }) => /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: cn(planBadgeClass, className), children });
8597
+ var PlanBadge = ({ children, className }) => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: cn(planBadgeClass, className), children });
7723
8598
 
7724
8599
  // src/app/integrations/ConnectionRow.tsx
7725
- var import_jsx_runtime74 = require("react/jsx-runtime");
8600
+ var import_jsx_runtime78 = require("react/jsx-runtime");
7726
8601
  var logoShellClass2 = cn(
7727
8602
  "flex size-9 shrink-0 items-center justify-center overflow-hidden rounded-lg",
7728
8603
  TIMBAL_V2_LOGO_TILE
@@ -7737,14 +8612,14 @@ var ConnectionRow = ({
7737
8612
  ariaLabel,
7738
8613
  className
7739
8614
  }) => {
7740
- const inner = /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(import_jsx_runtime74.Fragment, { children: [
7741
- logo ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: logoShellClass2, children: logo }) : null,
7742
- /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "min-w-0 flex-1", children: [
7743
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("p", { className: "truncate text-sm font-normal text-foreground", children: name }),
7744
- meta ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("p", { className: "truncate text-xs text-muted-foreground", children: meta }) : null
8615
+ const inner = /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_jsx_runtime78.Fragment, { children: [
8616
+ logo ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: logoShellClass2, children: logo }) : null,
8617
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "min-w-0 flex-1", children: [
8618
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("p", { className: "truncate text-sm font-normal text-foreground", children: name }),
8619
+ meta ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("p", { className: "truncate text-xs text-muted-foreground", children: meta }) : null
7745
8620
  ] }),
7746
- badge ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "shrink-0", children: badge }) : null,
7747
- action ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "shrink-0", children: action }) : null
8621
+ badge ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "shrink-0", children: badge }) : null,
8622
+ action ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "shrink-0", children: action }) : null
7748
8623
  ] });
7749
8624
  const rowClass2 = cn(
7750
8625
  "flex w-full items-center gap-3 px-4 py-3 text-left",
@@ -7752,7 +8627,7 @@ var ConnectionRow = ({
7752
8627
  className
7753
8628
  );
7754
8629
  if (onClick) {
7755
- return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
8630
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
7756
8631
  "button",
7757
8632
  {
7758
8633
  type: "button",
@@ -7764,7 +8639,7 @@ var ConnectionRow = ({
7764
8639
  }
7765
8640
  );
7766
8641
  }
7767
- return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { role: "listitem", className: rowClass2, children: inner });
8642
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { role: "listitem", className: rowClass2, children: inner });
7768
8643
  };
7769
8644
  var connectionRowListClass = cn(
7770
8645
  "overflow-hidden rounded-2xl",
@@ -7772,12 +8647,12 @@ var connectionRowListClass = cn(
7772
8647
  );
7773
8648
 
7774
8649
  // src/app/integrations/ConnectionRowList.tsx
7775
- var import_jsx_runtime75 = require("react/jsx-runtime");
8650
+ var import_jsx_runtime79 = require("react/jsx-runtime");
7776
8651
  var ConnectionRowList = ({
7777
8652
  children,
7778
8653
  "aria-label": ariaLabel = "Connected integrations",
7779
8654
  className
7780
- }) => /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
8655
+ }) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
7781
8656
  "div",
7782
8657
  {
7783
8658
  role: "list",
@@ -7788,7 +8663,7 @@ var ConnectionRowList = ({
7788
8663
  );
7789
8664
 
7790
8665
  // src/app/navigation/SubNav.tsx
7791
- var import_jsx_runtime76 = require("react/jsx-runtime");
8666
+ var import_jsx_runtime80 = require("react/jsx-runtime");
7792
8667
  var SubNav = ({
7793
8668
  items,
7794
8669
  activeId,
@@ -7797,7 +8672,7 @@ var SubNav = ({
7797
8672
  "aria-label": ariaLabel = "Section navigation",
7798
8673
  layoutId
7799
8674
  }) => {
7800
- return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("nav", { className: cn("aui-app-sub-nav", className), "aria-label": ariaLabel, children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
8675
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("nav", { className: cn("aui-app-sub-nav", className), "aria-label": ariaLabel, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
7801
8676
  PillSegmentedTabs,
7802
8677
  {
7803
8678
  value: activeId,
@@ -7811,13 +8686,13 @@ var SubNav = ({
7811
8686
  };
7812
8687
 
7813
8688
  // src/app/navigation/Breadcrumbs.tsx
7814
- var import_jsx_runtime77 = require("react/jsx-runtime");
8689
+ var import_jsx_runtime81 = require("react/jsx-runtime");
7815
8690
  var Breadcrumbs = ({ items, className }) => {
7816
- return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("nav", { className: cn("aui-app-breadcrumbs", appBreadcrumbsClass, className), "aria-label": "Breadcrumb", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("ol", { className: "flex flex-wrap items-center gap-1.5", children: items.map((item, index) => {
8691
+ return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("nav", { className: cn("aui-app-breadcrumbs", appBreadcrumbsClass, className), "aria-label": "Breadcrumb", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("ol", { className: "flex flex-wrap items-center gap-1.5", children: items.map((item, index) => {
7817
8692
  const isLast = index === items.length - 1;
7818
- return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("li", { className: "inline-flex items-center gap-1.5", children: [
7819
- index > 0 ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "text-muted-foreground/50", "aria-hidden": true, children: "/" }) : null,
7820
- isLast ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "text-foreground", "aria-current": "page", children: item.label }) : item.href ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("a", { href: item.href, className: appBreadcrumbLinkClass, children: item.label }) : /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
8693
+ return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("li", { className: "inline-flex items-center gap-1.5", children: [
8694
+ index > 0 ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "text-muted-foreground/50", "aria-hidden": true, children: "/" }) : null,
8695
+ isLast ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "text-foreground", "aria-current": "page", children: item.label }) : item.href ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("a", { href: item.href, className: appBreadcrumbLinkClass, children: item.label }) : /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
7821
8696
  "button",
7822
8697
  {
7823
8698
  type: "button",
@@ -7831,7 +8706,7 @@ var Breadcrumbs = ({ items, className }) => {
7831
8706
  };
7832
8707
 
7833
8708
  // src/app/forms/Field.tsx
7834
- var import_jsx_runtime78 = require("react/jsx-runtime");
8709
+ var import_jsx_runtime82 = require("react/jsx-runtime");
7835
8710
  var Field = ({
7836
8711
  label,
7837
8712
  hint,
@@ -7840,11 +8715,11 @@ var Field = ({
7840
8715
  className,
7841
8716
  htmlFor
7842
8717
  }) => {
7843
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: cn("aui-app-field", appFieldClass, className), children: [
7844
- /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("label", { className: appFieldLabelClass, htmlFor, children: label }),
8718
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: cn("aui-app-field", appFieldClass, className), children: [
8719
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("label", { className: appFieldLabelClass, htmlFor, children: label }),
7845
8720
  children,
7846
- hint && !error ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("p", { className: appFieldHintClass, children: hint }) : null,
7847
- error ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("p", { className: "text-xs text-destructive", role: "alert", children: error }) : null
8721
+ hint && !error ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("p", { className: appFieldHintClass, children: hint }) : null,
8722
+ error ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("p", { className: "text-xs text-destructive", role: "alert", children: error }) : null
7848
8723
  ] });
7849
8724
  };
7850
8725
  var FieldInput = ({
@@ -7857,7 +8732,7 @@ var FieldInput = ({
7857
8732
  ...inputProps
7858
8733
  }) => {
7859
8734
  const inputId = id ?? inputProps.name;
7860
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
8735
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
7861
8736
  Field,
7862
8737
  {
7863
8738
  label,
@@ -7865,7 +8740,7 @@ var FieldInput = ({
7865
8740
  error,
7866
8741
  htmlFor: inputId,
7867
8742
  className: fieldClassName,
7868
- children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
8743
+ children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
7869
8744
  "input",
7870
8745
  {
7871
8746
  id: inputId,
@@ -7879,7 +8754,7 @@ var FieldInput = ({
7879
8754
  };
7880
8755
 
7881
8756
  // src/app/forms/FieldTextarea.tsx
7882
- var import_jsx_runtime79 = require("react/jsx-runtime");
8757
+ var import_jsx_runtime83 = require("react/jsx-runtime");
7883
8758
  var textareaClass = cn(
7884
8759
  appInputClass,
7885
8760
  "min-h-[5.5rem] resize-y py-2.5 leading-relaxed"
@@ -7894,7 +8769,7 @@ var FieldTextarea = ({
7894
8769
  ...props
7895
8770
  }) => {
7896
8771
  const textareaId = id ?? props.name;
7897
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
8772
+ return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
7898
8773
  Field,
7899
8774
  {
7900
8775
  label,
@@ -7902,7 +8777,7 @@ var FieldTextarea = ({
7902
8777
  error,
7903
8778
  htmlFor: textareaId,
7904
8779
  className: fieldClassName,
7905
- children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
8780
+ children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
7906
8781
  "textarea",
7907
8782
  {
7908
8783
  id: textareaId,
@@ -7917,7 +8792,7 @@ var FieldTextarea = ({
7917
8792
 
7918
8793
  // src/app/forms/FieldSelect.tsx
7919
8794
  var import_lucide_react16 = require("lucide-react");
7920
- var import_jsx_runtime80 = require("react/jsx-runtime");
8795
+ var import_jsx_runtime84 = require("react/jsx-runtime");
7921
8796
  var selectWrapClass = "relative";
7922
8797
  var selectClass = cn(
7923
8798
  appInputClass,
@@ -7934,7 +8809,7 @@ var FieldSelect = ({
7934
8809
  ...props
7935
8810
  }) => {
7936
8811
  const selectId = id ?? props.name;
7937
- return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
8812
+ return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
7938
8813
  Field,
7939
8814
  {
7940
8815
  label,
@@ -7942,8 +8817,8 @@ var FieldSelect = ({
7942
8817
  error,
7943
8818
  htmlFor: selectId,
7944
8819
  className: fieldClassName,
7945
- children: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: selectWrapClass, children: [
7946
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
8820
+ children: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: selectWrapClass, children: [
8821
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
7947
8822
  "select",
7948
8823
  {
7949
8824
  id: selectId,
@@ -7953,7 +8828,7 @@ var FieldSelect = ({
7953
8828
  children
7954
8829
  }
7955
8830
  ),
7956
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
8831
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
7957
8832
  import_lucide_react16.ChevronDownIcon,
7958
8833
  {
7959
8834
  className: "pointer-events-none absolute top-1/2 right-3 size-4 -translate-y-1/2 text-muted-foreground",
@@ -7966,7 +8841,7 @@ var FieldSelect = ({
7966
8841
  };
7967
8842
 
7968
8843
  // src/app/forms/FieldSwitch.tsx
7969
- var import_jsx_runtime81 = require("react/jsx-runtime");
8844
+ var import_jsx_runtime85 = require("react/jsx-runtime");
7970
8845
  var trackClass = cn(
7971
8846
  "relative inline-flex h-5 w-9 shrink-0 items-center rounded-full transition-[background,box-shadow,border-color] duration-200",
7972
8847
  "peer-focus-visible:ring-2 peer-focus-visible:ring-foreground/10",
@@ -7987,7 +8862,7 @@ var FieldSwitch = ({
7987
8862
  ...props
7988
8863
  }) => {
7989
8864
  const inputId = id ?? props.name ?? "switch";
7990
- return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
8865
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
7991
8866
  "label",
7992
8867
  {
7993
8868
  className: cn(
@@ -7996,8 +8871,8 @@ var FieldSwitch = ({
7996
8871
  ),
7997
8872
  htmlFor: inputId,
7998
8873
  children: [
7999
- /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("span", { className: "relative mt-0.5", children: [
8000
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
8874
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("span", { className: "relative mt-0.5", children: [
8875
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
8001
8876
  "input",
8002
8877
  {
8003
8878
  id: inputId,
@@ -8007,11 +8882,11 @@ var FieldSwitch = ({
8007
8882
  ...props
8008
8883
  }
8009
8884
  ),
8010
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: trackClass, "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: thumbClass }) })
8885
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: trackClass, "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: thumbClass }) })
8011
8886
  ] }),
8012
- /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("span", { className: "flex min-w-0 flex-col gap-0.5", children: [
8013
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "text-sm font-medium text-foreground", children: label }),
8014
- description ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "text-xs text-muted-foreground", children: description }) : null
8887
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("span", { className: "flex min-w-0 flex-col gap-0.5", children: [
8888
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "text-sm font-medium text-foreground", children: label }),
8889
+ description ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "text-xs text-muted-foreground", children: description }) : null
8015
8890
  ] })
8016
8891
  ]
8017
8892
  }
@@ -8020,13 +8895,13 @@ var FieldSwitch = ({
8020
8895
 
8021
8896
  // src/app/forms/SearchInput.tsx
8022
8897
  var import_lucide_react17 = require("lucide-react");
8023
- var import_jsx_runtime82 = require("react/jsx-runtime");
8898
+ var import_jsx_runtime86 = require("react/jsx-runtime");
8024
8899
  var SearchInput = ({
8025
8900
  className,
8026
8901
  placeholder = "Search\u2026",
8027
8902
  ...props
8028
8903
  }) => {
8029
- return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
8904
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
8030
8905
  "label",
8031
8906
  {
8032
8907
  className: cn(
@@ -8035,8 +8910,8 @@ var SearchInput = ({
8035
8910
  className
8036
8911
  ),
8037
8912
  children: [
8038
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react17.SearchIcon, { className: "size-4 shrink-0 text-muted-foreground", "aria-hidden": true }),
8039
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
8913
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_lucide_react17.SearchIcon, { className: "size-4 shrink-0 text-muted-foreground", "aria-hidden": true }),
8914
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
8040
8915
  "input",
8041
8916
  {
8042
8917
  type: "search",
@@ -8051,18 +8926,18 @@ var SearchInput = ({
8051
8926
  };
8052
8927
 
8053
8928
  // src/app/forms/FormSection.tsx
8054
- var import_jsx_runtime83 = require("react/jsx-runtime");
8929
+ var import_jsx_runtime87 = require("react/jsx-runtime");
8055
8930
  var FormSection = ({ title, children, className }) => {
8056
- return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("fieldset", { className: cn("aui-app-form-section", appSectionClass, "border-0 p-0", className), children: [
8057
- title ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("legend", { className: cn(appSectionTitleClass, "mb-3 px-0"), children: title }) : null,
8058
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "flex flex-col gap-4", children })
8931
+ return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("fieldset", { className: cn("aui-app-form-section", appSectionClass, "border-0 p-0", className), children: [
8932
+ title ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("legend", { className: cn(appSectionTitleClass, "mb-3 px-0"), children: title }) : null,
8933
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "flex flex-col gap-4", children })
8059
8934
  ] });
8060
8935
  };
8061
8936
 
8062
8937
  // src/app/data/FilterBar.tsx
8063
- var import_jsx_runtime84 = require("react/jsx-runtime");
8938
+ var import_jsx_runtime88 = require("react/jsx-runtime");
8064
8939
  var FilterBar = ({ children, className }) => {
8065
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8940
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
8066
8941
  "div",
8067
8942
  {
8068
8943
  className: cn("aui-app-filter-bar", appFilterBarClass, className),
@@ -8076,7 +8951,7 @@ var FilterBar = ({ children, className }) => {
8076
8951
  // src/app/data/DataTable.tsx
8077
8952
  var import_react64 = require("react");
8078
8953
  var import_lucide_react18 = require("lucide-react");
8079
- var import_jsx_runtime85 = require("react/jsx-runtime");
8954
+ var import_jsx_runtime89 = require("react/jsx-runtime");
8080
8955
  var shellClass2 = "overflow-hidden rounded-xl border border-border bg-card shadow-card";
8081
8956
  var tableClass = "w-full border-collapse bg-transparent text-sm";
8082
8957
  var headCellClass = "border-b border-border/60 bg-transparent px-4 py-2.5 text-left text-xs font-medium uppercase tracking-wide text-muted-foreground";
@@ -8116,12 +8991,12 @@ function SortIndicator({
8116
8991
  }) {
8117
8992
  const iconClass = "size-3.5 shrink-0 opacity-60 group-hover:opacity-100";
8118
8993
  if (!active) {
8119
- return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react18.ArrowUpDownIcon, { className: iconClass, "aria-hidden": true });
8994
+ return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_lucide_react18.ArrowUpDownIcon, { className: iconClass, "aria-hidden": true });
8120
8995
  }
8121
8996
  if (direction === "desc") {
8122
- return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react18.ArrowDownIcon, { className: iconClass, "aria-hidden": true });
8997
+ return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_lucide_react18.ArrowDownIcon, { className: iconClass, "aria-hidden": true });
8123
8998
  }
8124
- return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react18.ArrowUpIcon, { className: iconClass, "aria-hidden": true });
8999
+ return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_lucide_react18.ArrowUpIcon, { className: iconClass, "aria-hidden": true });
8125
9000
  }
8126
9001
  function DataTable({
8127
9002
  columns,
@@ -8172,28 +9047,28 @@ function DataTable({
8172
9047
  const cellPad = dense ? "px-3 py-2" : void 0;
8173
9048
  const headPad = dense ? "px-3 py-2" : void 0;
8174
9049
  if (rows.length === 0 && emptyMode === "replace") {
8175
- return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(EmptyState, { title: emptyTitle, description: emptyDescription, className });
9050
+ return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(EmptyState, { title: emptyTitle, description: emptyDescription, className });
8176
9051
  }
8177
9052
  const rowCountText = rowCountLabel?.(sortedRows.length) ?? `${sortedRows.length} row${sortedRows.length === 1 ? "" : "s"}`;
8178
9053
  const hasFoot = Boolean((showRowCount || footer) && sortedRows.length > 0);
8179
- return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: cn("aui-app-data-table", shellClass2, className), children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "overflow-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("table", { className: tableClass, children: [
8180
- caption ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("caption", { className: "sr-only", children: caption }) : null,
8181
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("thead", { className: cn(stickyHeader && stickyHeadClass), children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("tr", { children: columns.map((col) => {
9054
+ return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: cn("aui-app-data-table", shellClass2, className), children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "overflow-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("table", { className: tableClass, children: [
9055
+ caption ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("caption", { className: "sr-only", children: caption }) : null,
9056
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("thead", { className: cn(stickyHeader && stickyHeadClass), children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("tr", { children: columns.map((col) => {
8182
9057
  const isSorted = sort?.columnId === col.id;
8183
9058
  const ariaSort = col.sortable ? isSorted ? sort.direction === "asc" ? "ascending" : "descending" : "none" : void 0;
8184
- const headerContent = col.sortable ? /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
9059
+ const headerContent = col.sortable ? /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(
8185
9060
  "button",
8186
9061
  {
8187
9062
  type: "button",
8188
9063
  className: sortButtonClass,
8189
9064
  onClick: () => setSort(nextSort(sort, col.id)),
8190
9065
  children: [
8191
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "truncate", children: col.header }),
8192
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(SortIndicator, { active: Boolean(isSorted), direction: sort?.direction })
9066
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("span", { className: "truncate", children: col.header }),
9067
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(SortIndicator, { active: Boolean(isSorted), direction: sort?.direction })
8193
9068
  ]
8194
9069
  }
8195
9070
  ) : col.header;
8196
- return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
9071
+ return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
8197
9072
  "th",
8198
9073
  {
8199
9074
  scope: "col",
@@ -8209,10 +9084,10 @@ function DataTable({
8209
9084
  col.id
8210
9085
  );
8211
9086
  }) }) }),
8212
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("tbody", { className: cn(!hasFoot && "[&_tr:last-child_td]:border-b-0"), children: sortedRows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("td", { colSpan: columns.length, className: emptyCellClass, children: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "flex flex-col items-center gap-1", children: [
8213
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("p", { className: "font-medium text-foreground", children: emptyTitle }),
8214
- emptyDescription ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("p", { className: "max-w-sm text-muted-foreground", children: emptyDescription }) : null
8215
- ] }) }) }) : sortedRows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
9087
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("tbody", { className: cn(!hasFoot && "[&_tr:last-child_td]:border-b-0"), children: sortedRows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("td", { colSpan: columns.length, className: emptyCellClass, children: /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "flex flex-col items-center gap-1", children: [
9088
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("p", { className: "font-medium text-foreground", children: emptyTitle }),
9089
+ emptyDescription ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("p", { className: "max-w-sm text-muted-foreground", children: emptyDescription }) : null
9090
+ ] }) }) }) : sortedRows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
8216
9091
  "tr",
8217
9092
  {
8218
9093
  className: rowClass,
@@ -8226,7 +9101,7 @@ function DataTable({
8226
9101
  } : void 0,
8227
9102
  tabIndex: onRowClick ? 0 : void 0,
8228
9103
  role: onRowClick ? "button" : void 0,
8229
- children: columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
9104
+ children: columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
8230
9105
  "td",
8231
9106
  {
8232
9107
  className: cn(
@@ -8242,7 +9117,7 @@ function DataTable({
8242
9117
  },
8243
9118
  getRowKey(row)
8244
9119
  )) }),
8245
- hasFoot ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("tfoot", { children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("td", { colSpan: columns.length, className: footCellClass, children: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
9120
+ hasFoot ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("tfoot", { children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("td", { colSpan: columns.length, className: footCellClass, children: /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(
8246
9121
  "div",
8247
9122
  {
8248
9123
  className: cn(
@@ -8250,7 +9125,7 @@ function DataTable({
8250
9125
  showRowCount && footer ? "justify-between" : "justify-start"
8251
9126
  ),
8252
9127
  children: [
8253
- showRowCount ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { children: rowCountText }) : null,
9128
+ showRowCount ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("span", { children: rowCountText }) : null,
8254
9129
  footer
8255
9130
  ]
8256
9131
  }
@@ -8260,53 +9135,7 @@ function DataTable({
8260
9135
 
8261
9136
  // src/app/data/ChartPanel.tsx
8262
9137
  var import_react65 = require("react");
8263
-
8264
- // src/app/data/metrics-shared.tsx
8265
- var import_jsx_runtime86 = require("react/jsx-runtime");
8266
- var metricCardShellClass = cn(
8267
- studioIntegrationCardClass,
8268
- "aui-app-metric-card shadow-none",
8269
- "flex flex-col overflow-hidden"
8270
- );
8271
- var metricCardHeaderClass = "flex items-start justify-between gap-3 px-4 pb-1 pt-3";
8272
- var metricTilesRowClass = "grid w-full min-w-0";
8273
- var metricChartRegionClass = "relative min-h-0 w-full border-t border-border/40 pt-2";
8274
- var metricChartPlotRegionClass = "relative min-h-0 w-full border-t border-border/40 px-0 pt-5 pb-3";
8275
- var metricCellDividerClass = "border-r border-border/40";
8276
- var MetricCardHeader = ({
8277
- title,
8278
- titleId,
8279
- description,
8280
- actions
8281
- }) => {
8282
- if (!title && !description && !actions) return null;
8283
- return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("header", { className: metricCardHeaderClass, children: [
8284
- /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "min-w-0", children: [
8285
- title ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("h3", { id: titleId, className: "text-base font-normal text-foreground", children: title }) : null,
8286
- description ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("p", { className: "mt-0.5 text-sm text-muted-foreground", children: description }) : null
8287
- ] }),
8288
- actions ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "shrink-0", children: actions }) : null
8289
- ] });
8290
- };
8291
- function metricTilesGridColsClass(n) {
8292
- switch (n) {
8293
- case 1:
8294
- return "grid-cols-1";
8295
- case 2:
8296
- return "grid-cols-2";
8297
- case 3:
8298
- return "grid-cols-3";
8299
- case 5:
8300
- return "grid-cols-2 sm:grid-cols-5";
8301
- case 6:
8302
- return "grid-cols-2 sm:grid-cols-3 lg:grid-cols-6";
8303
- default:
8304
- return "grid-cols-2 md:grid-cols-4";
8305
- }
8306
- }
8307
-
8308
- // src/app/data/ChartPanel.tsx
8309
- var import_jsx_runtime87 = require("react/jsx-runtime");
9138
+ var import_jsx_runtime90 = require("react/jsx-runtime");
8310
9139
  var ChartPanel = ({
8311
9140
  title,
8312
9141
  description,
@@ -8319,14 +9148,14 @@ var ChartPanel = ({
8319
9148
  const titleId = (0, import_react65.useId)();
8320
9149
  const resolvedTitle = title ?? artifact?.title;
8321
9150
  const hasHeader = Boolean(resolvedTitle || description || actions);
8322
- const body = children ?? (artifact ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(ChartArtifactView, { artifact, embedded: true, height }) : null);
8323
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
9151
+ const body = children ?? (artifact ? /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(ChartArtifactView, { artifact, embedded: true, height }) : null);
9152
+ return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
8324
9153
  "section",
8325
9154
  {
8326
9155
  className: cn(metricCardShellClass, "aui-app-chart-panel", className),
8327
9156
  "aria-labelledby": resolvedTitle ? titleId : void 0,
8328
9157
  children: [
8329
- /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
9158
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
8330
9159
  MetricCardHeader,
8331
9160
  {
8332
9161
  title: resolvedTitle,
@@ -8335,14 +9164,14 @@ var ChartPanel = ({
8335
9164
  actions
8336
9165
  }
8337
9166
  ),
8338
- /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
9167
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
8339
9168
  "div",
8340
9169
  {
8341
9170
  className: cn(
8342
9171
  "relative min-h-0 w-full",
8343
9172
  hasHeader ? metricChartPlotRegionClass : "pt-2 pb-3"
8344
9173
  ),
8345
- children: body ?? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
9174
+ children: body ?? /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
8346
9175
  "div",
8347
9176
  {
8348
9177
  className: "flex items-center justify-center text-sm font-normal text-muted-foreground",
@@ -8358,77 +9187,9 @@ var ChartPanel = ({
8358
9187
  );
8359
9188
  };
8360
9189
 
8361
- // src/app/data/MetricTile.tsx
8362
- var import_jsx_runtime88 = require("react/jsx-runtime");
8363
- var trendToneClass = {
8364
- up: "border-border/80 bg-muted/40 text-muted-foreground",
8365
- down: "border-border/80 bg-muted/40 text-muted-foreground",
8366
- neutral: "border-border/80 bg-muted/30 text-muted-foreground"
8367
- };
8368
- var metricTileBaseClass = "relative flex min-w-0 flex-1 flex-col gap-1 px-4 py-3 text-left font-normal";
8369
- var metricTileInteractiveClass = cn(
8370
- metricTileBaseClass,
8371
- "bg-transparent hover:bg-transparent active:bg-transparent",
8372
- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-foreground/10"
8373
- );
8374
- var MetricTile = ({
8375
- label,
8376
- value,
8377
- unit,
8378
- trend,
8379
- trendTone = "neutral",
8380
- active = false,
8381
- showDivider = false,
8382
- onSelect,
8383
- ariaLabel,
8384
- className
8385
- }) => {
8386
- const content = /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(import_jsx_runtime88.Fragment, { children: [
8387
- active ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
8388
- "span",
8389
- {
8390
- "aria-hidden": true,
8391
- className: "absolute inset-x-0 bottom-0 h-0.5 bg-foreground dark:bg-white"
8392
- }
8393
- ) : null,
8394
- /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("span", { className: "text-xs font-normal text-muted-foreground", children: label }),
8395
- /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("span", { className: "flex items-center gap-2", children: [
8396
- /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("span", { className: "flex items-baseline gap-1", children: [
8397
- /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("span", { className: "text-2xl font-normal tracking-tight text-foreground tabular-nums", children: value }),
8398
- unit ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("span", { className: "text-xs font-normal text-muted-foreground", children: unit }) : null
8399
- ] }),
8400
- trend ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
8401
- "span",
8402
- {
8403
- className: cn(
8404
- "rounded-full border px-1.5 py-0.5 text-xs font-normal",
8405
- trendToneClass[trendTone]
8406
- ),
8407
- children: trend
8408
- }
8409
- ) : null
8410
- ] })
8411
- ] });
8412
- const divider = showDivider ? metricCellDividerClass : void 0;
8413
- if (onSelect) {
8414
- return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
8415
- "button",
8416
- {
8417
- type: "button",
8418
- onClick: onSelect,
8419
- "aria-pressed": active,
8420
- "aria-label": ariaLabel,
8421
- className: cn(metricTileInteractiveClass, divider, className),
8422
- children: content
8423
- }
8424
- );
8425
- }
8426
- return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: cn(metricTileBaseClass, divider, className), children: content });
8427
- };
8428
-
8429
9190
  // src/app/data/MetricRow.tsx
8430
9191
  var import_react66 = require("react");
8431
- var import_jsx_runtime89 = require("react/jsx-runtime");
9192
+ var import_jsx_runtime91 = require("react/jsx-runtime");
8432
9193
  var MetricRow = ({
8433
9194
  title,
8434
9195
  description,
@@ -8450,13 +9211,13 @@ var MetricRow = ({
8450
9211
  if (activeMetricId == null) setInternalId(id);
8451
9212
  onMetricChange?.(id);
8452
9213
  };
8453
- return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(
9214
+ return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
8454
9215
  "section",
8455
9216
  {
8456
9217
  className: cn(metricCardShellClass, className),
8457
9218
  "aria-labelledby": title ? titleId : void 0,
8458
9219
  children: [
8459
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
9220
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
8460
9221
  MetricCardHeader,
8461
9222
  {
8462
9223
  title,
@@ -8465,7 +9226,7 @@ var MetricRow = ({
8465
9226
  actions
8466
9227
  }
8467
9228
  ),
8468
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
9229
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
8469
9230
  "div",
8470
9231
  {
8471
9232
  role: selectable ? "group" : void 0,
@@ -8475,7 +9236,7 @@ var MetricRow = ({
8475
9236
  metricTilesGridColsClass(metrics.length),
8476
9237
  (title || description || actions) && "mt-3"
8477
9238
  ),
8478
- children: metrics.map((m, index) => /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
9239
+ children: metrics.map((m, index) => /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
8479
9240
  MetricTile,
8480
9241
  {
8481
9242
  label: m.label,
@@ -8498,7 +9259,7 @@ var MetricRow = ({
8498
9259
 
8499
9260
  // src/app/data/MetricChartCard.tsx
8500
9261
  var import_react67 = require("react");
8501
- var import_jsx_runtime90 = require("react/jsx-runtime");
9262
+ var import_jsx_runtime92 = require("react/jsx-runtime");
8502
9263
  var MetricChartCard = ({
8503
9264
  title,
8504
9265
  description,
@@ -8528,13 +9289,13 @@ var MetricChartCard = ({
8528
9289
  };
8529
9290
  const hasHeader = Boolean(title || description || actions);
8530
9291
  const chartAriaLabel = typeof active?.label === "string" ? `${active.label} over time` : "Metric chart";
8531
- return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
9292
+ return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(
8532
9293
  "section",
8533
9294
  {
8534
9295
  className: cn(metricCardShellClass, className),
8535
9296
  "aria-labelledby": title ? titleId : void 0,
8536
9297
  children: [
8537
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
9298
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
8538
9299
  MetricCardHeader,
8539
9300
  {
8540
9301
  title,
@@ -8543,7 +9304,7 @@ var MetricChartCard = ({
8543
9304
  actions
8544
9305
  }
8545
9306
  ),
8546
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
9307
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
8547
9308
  "div",
8548
9309
  {
8549
9310
  role: "group",
@@ -8553,7 +9314,7 @@ var MetricChartCard = ({
8553
9314
  metricTilesGridColsClass(metrics.length),
8554
9315
  hasHeader && "mt-3"
8555
9316
  ),
8556
- children: metrics.map((m, index) => /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
9317
+ children: metrics.map((m, index) => /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
8557
9318
  MetricTile,
8558
9319
  {
8559
9320
  label: m.label,
@@ -8569,7 +9330,7 @@ var MetricChartCard = ({
8569
9330
  ))
8570
9331
  }
8571
9332
  ),
8572
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: metricChartRegionClass, "aria-live": "polite", "aria-atomic": "true", children: active?.data && active.data.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
9333
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: metricChartRegionClass, "aria-live": "polite", "aria-atomic": "true", children: active?.data && active.data.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
8573
9334
  LineAreaChart,
8574
9335
  {
8575
9336
  data: active.data,
@@ -8589,7 +9350,7 @@ var MetricChartCard = ({
8589
9350
  ariaLabel: chartAriaLabel
8590
9351
  },
8591
9352
  active.id
8592
- ) : /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
9353
+ ) : /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
8593
9354
  "div",
8594
9355
  {
8595
9356
  className: "flex w-full items-center justify-center text-sm font-normal text-muted-foreground",
@@ -8605,7 +9366,7 @@ var MetricChartCard = ({
8605
9366
 
8606
9367
  // src/charts/sparkline.tsx
8607
9368
  var import_react68 = require("react");
8608
- var import_jsx_runtime91 = require("react/jsx-runtime");
9369
+ var import_jsx_runtime93 = require("react/jsx-runtime");
8609
9370
  var Sparkline = ({
8610
9371
  data,
8611
9372
  dataKey = "value",
@@ -8620,7 +9381,7 @@ var Sparkline = ({
8620
9381
  const uid = (0, import_react68.useId)();
8621
9382
  const values = data.map((d) => typeof d === "number" ? d : toNum(d[dataKey]));
8622
9383
  if (values.length === 0) {
8623
- return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: cn("inline-block", className), style: { width, height } });
9384
+ return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: cn("inline-block", className), style: { width, height } });
8624
9385
  }
8625
9386
  const pad = strokeWidth + 1;
8626
9387
  const min = Math.min(...values);
@@ -8632,7 +9393,7 @@ var Sparkline = ({
8632
9393
  x: pad + (values.length > 1 ? i / (values.length - 1) * innerW : innerW / 2),
8633
9394
  y: pad + innerH - (v - min) / range * innerH
8634
9395
  }));
8635
- return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
9396
+ return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(
8636
9397
  "svg",
8637
9398
  {
8638
9399
  width,
@@ -8643,14 +9404,14 @@ var Sparkline = ({
8643
9404
  "aria-label": ariaLabel,
8644
9405
  preserveAspectRatio: "none",
8645
9406
  children: [
8646
- area && /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(import_jsx_runtime91.Fragment, { children: [
8647
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("linearGradient", { id: `${uid}-spark`, x1: "0", x2: "0", y1: "0", y2: "1", children: [
8648
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("stop", { offset: "0%", style: { stopColor: color, stopOpacity: 0.25 } }),
8649
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("stop", { offset: "100%", style: { stopColor: color, stopOpacity: 0 } })
9407
+ area && /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(import_jsx_runtime93.Fragment, { children: [
9408
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("linearGradient", { id: `${uid}-spark`, x1: "0", x2: "0", y1: "0", y2: "1", children: [
9409
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("stop", { offset: "0%", style: { stopColor: color, stopOpacity: 0.25 } }),
9410
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("stop", { offset: "100%", style: { stopColor: color, stopOpacity: 0 } })
8650
9411
  ] }) }),
8651
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("path", { d: monotoneAreaPath(points, height - pad), fill: `url(#${uid}-spark)` })
9412
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("path", { d: monotoneAreaPath(points, height - pad), fill: `url(#${uid}-spark)` })
8652
9413
  ] }),
8653
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
9414
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
8654
9415
  "path",
8655
9416
  {
8656
9417
  d: monotoneLinePath(points),
@@ -8794,7 +9555,7 @@ When you call a tool that returns an artifact (\`make_chart\`, \`ask_question\`,
8794
9555
 
8795
9556
  // src/auth/guard.tsx
8796
9557
  var import_lucide_react19 = require("lucide-react");
8797
- var import_jsx_runtime92 = require("react/jsx-runtime");
9558
+ var import_jsx_runtime94 = require("react/jsx-runtime");
8798
9559
  var AuthGuard = ({
8799
9560
  children,
8800
9561
  requireAuth = false,
@@ -8805,7 +9566,7 @@ var AuthGuard = ({
8805
9566
  return children;
8806
9567
  }
8807
9568
  if (loading) {
8808
- return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "flex items-center justify-center h-screen", children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react19.Loader2, { className: "w-8 h-8 animate-spin" }) });
9569
+ return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "flex items-center justify-center h-screen", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_lucide_react19.Loader2, { className: "w-8 h-8 animate-spin" }) });
8809
9570
  }
8810
9571
  if (requireAuth && !isAuthenticated && !isEmbedded) {
8811
9572
  const returnTo = encodeURIComponent(
@@ -8823,16 +9584,16 @@ var import_react69 = require("@assistant-ui/react");
8823
9584
  // src/ui/dropdown-menu.tsx
8824
9585
  var import_radix_ui5 = require("radix-ui");
8825
9586
  var import_lucide_react20 = require("lucide-react");
8826
- var import_jsx_runtime93 = require("react/jsx-runtime");
9587
+ var import_jsx_runtime95 = require("react/jsx-runtime");
8827
9588
  function DropdownMenu({
8828
9589
  ...props
8829
9590
  }) {
8830
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_radix_ui5.DropdownMenu.Root, { "data-slot": "dropdown-menu", ...props });
9591
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_radix_ui5.DropdownMenu.Root, { "data-slot": "dropdown-menu", ...props });
8831
9592
  }
8832
9593
  function DropdownMenuTrigger({
8833
9594
  ...props
8834
9595
  }) {
8835
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
9596
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
8836
9597
  import_radix_ui5.DropdownMenu.Trigger,
8837
9598
  {
8838
9599
  "data-slot": "dropdown-menu-trigger",
@@ -8843,14 +9604,14 @@ function DropdownMenuTrigger({
8843
9604
  function DropdownMenuGroup({
8844
9605
  ...props
8845
9606
  }) {
8846
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_radix_ui5.DropdownMenu.Group, { "data-slot": "dropdown-menu-group", ...props });
9607
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_radix_ui5.DropdownMenu.Group, { "data-slot": "dropdown-menu-group", ...props });
8847
9608
  }
8848
9609
  function DropdownMenuContent({
8849
9610
  className,
8850
9611
  sideOffset = 4,
8851
9612
  ...props
8852
9613
  }) {
8853
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_radix_ui5.DropdownMenu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
9614
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_radix_ui5.DropdownMenu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
8854
9615
  import_radix_ui5.DropdownMenu.Content,
8855
9616
  {
8856
9617
  "data-slot": "dropdown-menu-content",
@@ -8869,7 +9630,7 @@ function DropdownMenuItem({
8869
9630
  variant = "default",
8870
9631
  ...props
8871
9632
  }) {
8872
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
9633
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
8873
9634
  import_radix_ui5.DropdownMenu.Item,
8874
9635
  {
8875
9636
  "data-slot": "dropdown-menu-item",
@@ -8889,7 +9650,7 @@ function DropdownMenuCheckboxItem({
8889
9650
  checked,
8890
9651
  ...props
8891
9652
  }) {
8892
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(
9653
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
8893
9654
  import_radix_ui5.DropdownMenu.CheckboxItem,
8894
9655
  {
8895
9656
  "data-slot": "dropdown-menu-checkbox-item",
@@ -8900,7 +9661,7 @@ function DropdownMenuCheckboxItem({
8900
9661
  checked,
8901
9662
  ...props,
8902
9663
  children: [
8903
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_radix_ui5.DropdownMenu.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react20.CheckIcon, { className: "size-4" }) }) }),
9664
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_radix_ui5.DropdownMenu.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_lucide_react20.CheckIcon, { className: "size-4" }) }) }),
8904
9665
  children
8905
9666
  ]
8906
9667
  }
@@ -8909,7 +9670,7 @@ function DropdownMenuCheckboxItem({
8909
9670
  function DropdownMenuRadioGroup({
8910
9671
  ...props
8911
9672
  }) {
8912
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
9673
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
8913
9674
  import_radix_ui5.DropdownMenu.RadioGroup,
8914
9675
  {
8915
9676
  "data-slot": "dropdown-menu-radio-group",
@@ -8922,7 +9683,7 @@ function DropdownMenuRadioItem({
8922
9683
  children,
8923
9684
  ...props
8924
9685
  }) {
8925
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(
9686
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
8926
9687
  import_radix_ui5.DropdownMenu.RadioItem,
8927
9688
  {
8928
9689
  "data-slot": "dropdown-menu-radio-item",
@@ -8932,7 +9693,7 @@ function DropdownMenuRadioItem({
8932
9693
  ),
8933
9694
  ...props,
8934
9695
  children: [
8935
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_radix_ui5.DropdownMenu.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react20.CircleIcon, { className: "size-2 fill-current" }) }) }),
9696
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_radix_ui5.DropdownMenu.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_lucide_react20.CircleIcon, { className: "size-2 fill-current" }) }) }),
8936
9697
  children
8937
9698
  ]
8938
9699
  }
@@ -8943,7 +9704,7 @@ function DropdownMenuLabel({
8943
9704
  inset,
8944
9705
  ...props
8945
9706
  }) {
8946
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
9707
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
8947
9708
  import_radix_ui5.DropdownMenu.Label,
8948
9709
  {
8949
9710
  "data-slot": "dropdown-menu-label",
@@ -8960,7 +9721,7 @@ function DropdownMenuSeparator({
8960
9721
  className,
8961
9722
  ...props
8962
9723
  }) {
8963
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
9724
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
8964
9725
  import_radix_ui5.DropdownMenu.Separator,
8965
9726
  {
8966
9727
  "data-slot": "dropdown-menu-separator",
@@ -8973,7 +9734,7 @@ function DropdownMenuShortcut({
8973
9734
  className,
8974
9735
  ...props
8975
9736
  }) {
8976
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
9737
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
8977
9738
  "span",
8978
9739
  {
8979
9740
  "data-slot": "dropdown-menu-shortcut",
@@ -8988,7 +9749,7 @@ function DropdownMenuShortcut({
8988
9749
  function DropdownMenuSub({
8989
9750
  ...props
8990
9751
  }) {
8991
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_radix_ui5.DropdownMenu.Sub, { "data-slot": "dropdown-menu-sub", ...props });
9752
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_radix_ui5.DropdownMenu.Sub, { "data-slot": "dropdown-menu-sub", ...props });
8992
9753
  }
8993
9754
  function DropdownMenuSubTrigger({
8994
9755
  className,
@@ -8996,7 +9757,7 @@ function DropdownMenuSubTrigger({
8996
9757
  children,
8997
9758
  ...props
8998
9759
  }) {
8999
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(
9760
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
9000
9761
  import_radix_ui5.DropdownMenu.SubTrigger,
9001
9762
  {
9002
9763
  "data-slot": "dropdown-menu-sub-trigger",
@@ -9008,7 +9769,7 @@ function DropdownMenuSubTrigger({
9008
9769
  ...props,
9009
9770
  children: [
9010
9771
  children,
9011
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react20.ChevronRightIcon, { className: "ml-auto size-4" })
9772
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_lucide_react20.ChevronRightIcon, { className: "ml-auto size-4" })
9012
9773
  ]
9013
9774
  }
9014
9775
  );
@@ -9017,7 +9778,7 @@ function DropdownMenuSubContent({
9017
9778
  className,
9018
9779
  ...props
9019
9780
  }) {
9020
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
9781
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
9021
9782
  import_radix_ui5.DropdownMenu.SubContent,
9022
9783
  {
9023
9784
  "data-slot": "dropdown-menu-sub-content",
@@ -9032,21 +9793,21 @@ function DropdownMenuSubContent({
9032
9793
 
9033
9794
  // src/ui/popover.tsx
9034
9795
  var import_radix_ui6 = require("radix-ui");
9035
- var import_jsx_runtime94 = require("react/jsx-runtime");
9796
+ var import_jsx_runtime96 = require("react/jsx-runtime");
9036
9797
  function Popover({
9037
9798
  ...props
9038
9799
  }) {
9039
- return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_radix_ui6.Popover.Root, { "data-slot": "popover", ...props });
9800
+ return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_radix_ui6.Popover.Root, { "data-slot": "popover", ...props });
9040
9801
  }
9041
9802
  function PopoverTrigger({
9042
9803
  ...props
9043
9804
  }) {
9044
- return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_radix_ui6.Popover.Trigger, { "data-slot": "popover-trigger", ...props });
9805
+ return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_radix_ui6.Popover.Trigger, { "data-slot": "popover-trigger", ...props });
9045
9806
  }
9046
9807
  function PopoverAnchor({
9047
9808
  ...props
9048
9809
  }) {
9049
- return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_radix_ui6.Popover.Anchor, { "data-slot": "popover-anchor", ...props });
9810
+ return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_radix_ui6.Popover.Anchor, { "data-slot": "popover-anchor", ...props });
9050
9811
  }
9051
9812
  function PopoverContent({
9052
9813
  className,
@@ -9054,7 +9815,7 @@ function PopoverContent({
9054
9815
  sideOffset = 4,
9055
9816
  ...props
9056
9817
  }) {
9057
- return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_radix_ui6.Popover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
9818
+ return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_radix_ui6.Popover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
9058
9819
  import_radix_ui6.Popover.Content,
9059
9820
  {
9060
9821
  "data-slot": "popover-content",
@@ -9072,21 +9833,21 @@ function PopoverContent({
9072
9833
  // src/ui/select.tsx
9073
9834
  var import_radix_ui7 = require("radix-ui");
9074
9835
  var import_lucide_react21 = require("lucide-react");
9075
- var import_jsx_runtime95 = require("react/jsx-runtime");
9836
+ var import_jsx_runtime97 = require("react/jsx-runtime");
9076
9837
  function Select({
9077
9838
  ...props
9078
9839
  }) {
9079
- return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_radix_ui7.Select.Root, { "data-slot": "select", ...props });
9840
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_radix_ui7.Select.Root, { "data-slot": "select", ...props });
9080
9841
  }
9081
9842
  function SelectGroup({
9082
9843
  ...props
9083
9844
  }) {
9084
- return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_radix_ui7.Select.Group, { "data-slot": "select-group", ...props });
9845
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_radix_ui7.Select.Group, { "data-slot": "select-group", ...props });
9085
9846
  }
9086
9847
  function SelectValue({
9087
9848
  ...props
9088
9849
  }) {
9089
- return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_radix_ui7.Select.Value, { "data-slot": "select-value", ...props });
9850
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_radix_ui7.Select.Value, { "data-slot": "select-value", ...props });
9090
9851
  }
9091
9852
  function SelectTrigger({
9092
9853
  className,
@@ -9094,7 +9855,7 @@ function SelectTrigger({
9094
9855
  children,
9095
9856
  ...props
9096
9857
  }) {
9097
- return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
9858
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
9098
9859
  import_radix_ui7.Select.Trigger,
9099
9860
  {
9100
9861
  "data-slot": "select-trigger",
@@ -9106,7 +9867,7 @@ function SelectTrigger({
9106
9867
  ...props,
9107
9868
  children: [
9108
9869
  children,
9109
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_radix_ui7.Select.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_lucide_react21.ChevronDownIcon, { className: "size-4 opacity-50" }) })
9870
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_radix_ui7.Select.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react21.ChevronDownIcon, { className: "size-4 opacity-50" }) })
9110
9871
  ]
9111
9872
  }
9112
9873
  );
@@ -9117,7 +9878,7 @@ function SelectContent({
9117
9878
  position = "popper",
9118
9879
  ...props
9119
9880
  }) {
9120
- return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_radix_ui7.Select.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
9881
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_radix_ui7.Select.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
9121
9882
  import_radix_ui7.Select.Content,
9122
9883
  {
9123
9884
  "data-slot": "select-content",
@@ -9129,8 +9890,8 @@ function SelectContent({
9129
9890
  position,
9130
9891
  ...props,
9131
9892
  children: [
9132
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(SelectScrollUpButton, {}),
9133
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
9893
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(SelectScrollUpButton, {}),
9894
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
9134
9895
  import_radix_ui7.Select.Viewport,
9135
9896
  {
9136
9897
  className: cn(
@@ -9140,7 +9901,7 @@ function SelectContent({
9140
9901
  children
9141
9902
  }
9142
9903
  ),
9143
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(SelectScrollDownButton, {})
9904
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(SelectScrollDownButton, {})
9144
9905
  ]
9145
9906
  }
9146
9907
  ) });
@@ -9149,7 +9910,7 @@ function SelectLabel({
9149
9910
  className,
9150
9911
  ...props
9151
9912
  }) {
9152
- return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
9913
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
9153
9914
  import_radix_ui7.Select.Label,
9154
9915
  {
9155
9916
  "data-slot": "select-label",
@@ -9163,7 +9924,7 @@ function SelectItem({
9163
9924
  children,
9164
9925
  ...props
9165
9926
  }) {
9166
- return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
9927
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
9167
9928
  import_radix_ui7.Select.Item,
9168
9929
  {
9169
9930
  "data-slot": "select-item",
@@ -9173,8 +9934,8 @@ function SelectItem({
9173
9934
  ),
9174
9935
  ...props,
9175
9936
  children: [
9176
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_radix_ui7.Select.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_lucide_react21.CheckIcon, { className: "size-4" }) }) }),
9177
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_radix_ui7.Select.ItemText, { children })
9937
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_radix_ui7.Select.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react21.CheckIcon, { className: "size-4" }) }) }),
9938
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_radix_ui7.Select.ItemText, { children })
9178
9939
  ]
9179
9940
  }
9180
9941
  );
@@ -9183,7 +9944,7 @@ function SelectSeparator({
9183
9944
  className,
9184
9945
  ...props
9185
9946
  }) {
9186
- return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
9947
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
9187
9948
  import_radix_ui7.Select.Separator,
9188
9949
  {
9189
9950
  "data-slot": "select-separator",
@@ -9196,13 +9957,13 @@ function SelectScrollUpButton({
9196
9957
  className,
9197
9958
  ...props
9198
9959
  }) {
9199
- return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
9960
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
9200
9961
  import_radix_ui7.Select.ScrollUpButton,
9201
9962
  {
9202
9963
  "data-slot": "select-scroll-up-button",
9203
9964
  className: cn("flex cursor-default items-center justify-center py-1", className),
9204
9965
  ...props,
9205
- children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_lucide_react21.ChevronUpIcon, { className: "size-4" })
9966
+ children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react21.ChevronUpIcon, { className: "size-4" })
9206
9967
  }
9207
9968
  );
9208
9969
  }
@@ -9210,13 +9971,13 @@ function SelectScrollDownButton({
9210
9971
  className,
9211
9972
  ...props
9212
9973
  }) {
9213
- return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
9974
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
9214
9975
  import_radix_ui7.Select.ScrollDownButton,
9215
9976
  {
9216
9977
  "data-slot": "select-scroll-down-button",
9217
9978
  className: cn("flex cursor-default items-center justify-center py-1", className),
9218
9979
  ...props,
9219
- children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_lucide_react21.ChevronDownIcon, { className: "size-4" })
9980
+ children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react21.ChevronDownIcon, { className: "size-4" })
9220
9981
  }
9221
9982
  );
9222
9983
  }
@@ -9341,8 +10102,11 @@ function SelectScrollDownButton({
9341
10102
  SubNav,
9342
10103
  Suggestions,
9343
10104
  SurfaceCard,
10105
+ THEME_AGENT_INSTRUCTIONS,
9344
10106
  THREAD_DEFAULT_MAX_WIDTH,
10107
+ TIMBAL_THEME_PRESETS,
9345
10108
  TableArtifactView,
10109
+ ThemePresetGallery,
9346
10110
  Thread,
9347
10111
  ThreadPrimitive,
9348
10112
  TimbalChat,
@@ -9350,6 +10114,7 @@ function SelectScrollDownButton({
9350
10114
  TimbalMark,
9351
10115
  TimbalRuntimeProvider,
9352
10116
  TimbalStudioShell,
10117
+ TimbalThemeStyle,
9353
10118
  ToolArtifactFallback,
9354
10119
  ToolFallback,
9355
10120
  Tooltip,
@@ -9362,20 +10127,27 @@ function SelectScrollDownButton({
9362
10127
  UiEventProvider,
9363
10128
  UiNodeView,
9364
10129
  WorkforceSelector,
10130
+ applyThemePreset,
10131
+ applyTimbalTheme,
9365
10132
  assistantMessageContentClass,
9366
10133
  assistantMessageRootClass,
9367
10134
  authFetch,
10135
+ clearTimbalTheme,
9368
10136
  clearTokens,
9369
10137
  cn,
9370
10138
  connectionRowListClass,
9371
10139
  createDefaultAttachmentAdapter,
10140
+ createTimbalTheme,
9372
10141
  createUploadAttachmentAdapter,
9373
10142
  defaultArtifactRenderers,
10143
+ ensureThemeFontLink,
9374
10144
  fetchCurrentUser,
9375
10145
  findMarkdownArtifacts,
9376
10146
  getAccessToken,
9377
10147
  getPath,
9378
10148
  getRefreshToken,
10149
+ getStoredThemePreset,
10150
+ getThemePreset,
9379
10151
  isArtifact,
9380
10152
  isArtifactFenceLanguage,
9381
10153
  isUiBinding,
@@ -9388,6 +10160,7 @@ function SelectScrollDownButton({
9388
10160
  setPath,
9389
10161
  setRefreshToken,
9390
10162
  splitMarkdownByArtifacts,
10163
+ themeToCss,
9391
10164
  threadMessageColumnClass,
9392
10165
  useAppCopilotContext,
9393
10166
  useAppShellChat,