@timbal-ai/timbal-react 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/CHANGELOG.md +8 -1
  2. package/README.md +13 -7
  3. package/dist/app.cjs +1234 -867
  4. package/dist/app.d.cts +2 -2
  5. package/dist/app.d.ts +2 -2
  6. package/dist/app.esm.js +14 -6
  7. package/dist/{chart-artifact-CX-rh9nq.d.cts → chart-artifact-E58ve76I.d.cts} +29 -3
  8. package/dist/{chart-artifact-BZp7nmaf.d.ts → chart-artifact-_PEJgCpQ.d.ts} +29 -3
  9. package/dist/{chat-DCms8pJ_.d.cts → chat-ClmzWzCX.d.cts} +2 -0
  10. package/dist/{chat-DCms8pJ_.d.ts → chat-ClmzWzCX.d.ts} +2 -0
  11. package/dist/chat.cjs +868 -511
  12. package/dist/chat.d.cts +1 -1
  13. package/dist/chat.d.ts +1 -1
  14. package/dist/chat.esm.js +3 -3
  15. package/dist/{chunk-6HWMJNZT.esm.js → chunk-4VULP3CJ.esm.js} +1 -1
  16. package/dist/{chunk-XCM3V6RK.esm.js → chunk-AGJKK6R7.esm.js} +2 -2
  17. package/dist/{chunk-4AKJ6FKE.esm.js → chunk-BMXFXLVV.esm.js} +120 -22
  18. package/dist/{chunk-JEAUF54A.esm.js → chunk-FEYZUVBM.esm.js} +1 -1
  19. package/dist/{chunk-FRZOEYBO.esm.js → chunk-MTYXREHK.esm.js} +4 -4
  20. package/dist/{chunk-P3KDAYX6.esm.js → chunk-NAMKO2MU.esm.js} +1 -1
  21. package/dist/{chunk-YXZ22OJN.esm.js → chunk-UY7AKWJL.esm.js} +670 -402
  22. package/dist/{chunk-TK2AGIME.esm.js → chunk-XDIY2WSL.esm.js} +15 -13
  23. package/dist/index.cjs +1871 -1497
  24. package/dist/index.d.cts +5 -5
  25. package/dist/index.d.ts +5 -5
  26. package/dist/index.esm.js +21 -9
  27. package/dist/{pill-segmented-tabs-Ba5q0feL.d.cts → pill-segmented-tabs-BsIOW1Lo.d.cts} +32 -4
  28. package/dist/{pill-segmented-tabs-Ba5q0feL.d.ts → pill-segmented-tabs-BsIOW1Lo.d.ts} +32 -4
  29. package/dist/studio.cjs +1089 -732
  30. package/dist/studio.d.cts +2 -2
  31. package/dist/studio.d.ts +2 -2
  32. package/dist/studio.esm.js +5 -5
  33. package/dist/styles.css +14 -16
  34. package/dist/ui.cjs +122 -22
  35. package/dist/ui.d.cts +1 -1
  36. package/dist/ui.d.ts +1 -1
  37. package/dist/ui.esm.js +8 -4
  38. package/dist/{welcome-CRqOPKMp.d.cts → welcome-BFGRoNfK.d.cts} +1 -1
  39. package/dist/{welcome-DlHUa3OL.d.ts → welcome-DXqsGTwH.d.ts} +1 -1
  40. package/package.json +1 -1
  41. package/vite/local-dev.d.ts +5 -1
  42. package/vite/local-dev.mjs +17 -13
package/dist/app.cjs CHANGED
@@ -111,10 +111,14 @@ __export(app_exports, {
111
111
  connectionRowListClass: () => connectionRowListClass,
112
112
  createTimbalTheme: () => createTimbalTheme,
113
113
  ensureThemeFontLink: () => ensureThemeFontLink,
114
+ flushBarCategoryGap: () => flushBarCategoryGap,
115
+ flushLineAreaEdgeToEdge: () => flushLineAreaEdgeToEdge,
114
116
  formatLintReport: () => formatLintReport,
115
117
  getStoredThemePreset: () => getStoredThemePreset,
116
118
  getThemePreset: () => getThemePreset,
117
119
  lintGeneratedUi: () => lintGeneratedUi,
120
+ resolveChartMargin: () => resolveChartMargin,
121
+ resolveTooltipCategory: () => resolveTooltipCategory,
118
122
  reviewGeneratedUi: () => reviewGeneratedUi,
119
123
  themeToCss: () => themeToCss,
120
124
  useAppCopilotContext: () => useAppCopilotContext,
@@ -286,8 +290,8 @@ var HOUSE_RULES = [
286
290
  },
287
291
  {
288
292
  id: "no-data-gradient",
289
- rule: "Gradients are reserved for chrome (composer, elevated surface, playground). Never on a data card, tile, or table.",
290
- why: "Gradient stat cards are the canonical 'AI dashboard' look."
293
+ rule: "Gradients are reserved for chrome (composer, elevated surface, playground) and built-in chart/avatar fills \u2014 never on a data card shell, stat tile, or table row background.",
294
+ why: `Gradient stat cards are the canonical 'AI dashboard' look; SVG bar/pie fills and AvatarFallback variant="secondary" (Action button chrome) are kit-owned exceptions.`
291
295
  },
292
296
  {
293
297
  id: "compose-from-blocks",
@@ -400,8 +404,9 @@ The cause of slop is dropping **below** the curated block layer into raw primiti
400
404
  | \`FilterBar\` | Horizontal filter row \u2014 bottom-aligns controls. Mix \`SearchInput\` with labeled \`FilterField\` + \`Select\` (or \`Field\` + \`Select\`); labels sit above, control baselines match. |
401
405
  | \`FilterField\` | Optional label wrapper for a filter control inside \`FilterBar\` (severity, status, \u2026). Omit \`label\` for search-only fields. |
402
406
  | \`SearchInput\` | Filter field with consistent app styling. |
403
- | \`DataTable\` | Sortable table: \`columns\`, \`rows\`, \`getRowKey\`, optional \`sort\` / \`onSortChange\`, \`emptyTitle\`, \`showRowCount\`, \`caption\`. **Scales:** \`pageSize\` (built-in client pager), \`selectable\` + \`onSelectionChange\` (checkbox column for bulk actions), \`loading\` (skeleton rows). \`onRowClick\` for row \u2192 detail (open a \`Sheet\`). |
404
- | \`ChartPanel\` | Same shell as \`MetricChartCard\`: title row (\`px-4 pt-4\`), flush plot (\`pt-2\` only). Pass \`title\` + \`artifact\` (omit \`artifact.title\` to avoid duplicates) or \`children\`. \`loading\` renders a plot-height skeleton. |
407
+ | \`DataTable\` | Sortable table: \`columns\`, \`rows\`, \`getRowKey\`, optional \`sort\` / \`onSortChange\`, \`emptyTitle\`, \`showRowCount\`, \`caption\`, \`truncate: true\` on columns with long text. **Scales:** \`pageSize\` (built-in client pager), \`selectable\` + \`onSelectionChange\` (checkbox column for bulk actions), \`loading\` (skeleton rows). \`onRowClick\` for row \u2192 detail (open a \`Sheet\`). |
408
+ | \`Avatar\` / \`AvatarFallback\` | User initials: \`variant="secondary"\` (or \`primary\` / \`chart\` alias) on **both** \`Avatar\` and \`AvatarFallback\` \u2014 same chrome as catalog **Action** buttons (\`Button variant="secondary"\`: elevated gradient, \`border-border\`, \`shadow-card\`, \`text-foreground\`). Never dark primary CTA fill or raw \`bg-blue-600\`. |
409
+ | \`ChartPanel\` | Same shell as \`MetricChartCard\`: title row (\`px-4 pt-4\`), flush plot (\`pt-2\` only) with **no axis ticks** \u2014 hover tooltips show category + value. Pass \`title\` + \`artifact\` (omit \`artifact.title\` to avoid duplicates) or \`children\`. \`loading\` renders a plot-height skeleton. |
405
410
  | \`FieldInput\`, \`FieldTextarea\`, \`FieldSelect\`, \`FieldSwitch\` | Settings-style forms with labels and hints. |
406
411
  | \`FormSection\` | Grouped form block. |
407
412
  | \`AppConfirmDialog\` | Confirm/cancel modal: \`open\`, \`onOpenChange\`, \`title\`, \`description\`, \`onConfirm\`. |
@@ -414,7 +419,7 @@ Charts run on **recharts** with shadcn \`ChartContainer\` / \`ChartTooltipConten
414
419
 
415
420
  | Component | Use for |
416
421
  |-----------|---------|
417
- | \`LineAreaChart\` | Cartesian engine (shadcn-style chrome). Props: \`data\`, \`xKey\`, \`series: [{ dataKey, label?, color? }]\`, \`variant\` (\`area\`\\|\`line\`\\|\`bar\`), \`orientation\` (\`horizontal\` for horizontal bars), \`stacked\`, \`curve\` (\`monotone\`\\|\`linear\`\\|\`step\`), \`dots\`, \`gridLines\`, \`tooltipIndicator\` (\`dot\`\\|\`line\`\\|\`dashed\`), \`layout\` (\`flush\`), \`height\`, \`showLegend\`, \`formatX\`, \`formatValue\`, \`ariaLabel\`. |
422
+ | \`LineAreaChart\` | Cartesian engine (shadcn-style chrome). Bar fills use theme gradients automatically. Props: \`data\`, \`xKey\`, \`series: [{ dataKey, label?, color? }]\`, \`variant\` (\`area\`\\|\`line\`\\|\`bar\`), \`orientation\` (\`horizontal\` for horizontal bars), \`stacked\`, \`curve\`, \`dots\`, \`gridLines\`, \`tooltipIndicator\`, \`layout\` (\`flush\` \u2014 hides axes by default; category + values on hover tooltip), \`showXAxis\` / \`showYAxis\` to opt back in, \`clipTicks\` (truncates long axis labels when axes are on), \`height\`, \`showLegend\`, \`formatX\`, \`formatValue\`, \`ariaLabel\`. |
418
423
  | \`PieChart\` | Pie / donut: \`data\`, \`nameKey\`, \`dataKey\`, \`innerRadius\` (>0 = donut), \`centerValue\`/\`centerLabel\` (donut hole KPI), \`showLabels\`, \`colors\`. |
419
424
  | \`RadialChart\` | Concentric progress rings: \`data\`, \`nameKey\`, \`dataKey\`, \`maxValue\`, \`centerValue\`/\`centerLabel\`. Good for gauges / share-of-target. |
420
425
  | \`RadarChart\` | Spider chart (\u22653 axes): \`data\`, \`nameKey\`, \`series\`, \`maxValue\`. Compare a few metrics across entities. |
@@ -1540,6 +1545,33 @@ var TIMBAL_V2_SHADOW = {
1540
1545
  ghost: "",
1541
1546
  link: ""
1542
1547
  };
1548
+ var TIMBAL_V2_PRIMARY_SURFACE = cn(
1549
+ TIMBAL_V2_PRIMARY_GRADIENT,
1550
+ TIMBAL_V2_SHADOW.primary,
1551
+ TIMBAL_V2_BORDER.primary
1552
+ );
1553
+ var TIMBAL_V2_PRIMARY_PILL_ROOT = cn(
1554
+ "relative box-border inline-flex items-center justify-center overflow-hidden rounded-full border-0 bg-transparent p-0 font-normal shadow-none transition duration-200 ease-in-out",
1555
+ TIMBAL_V2_SHADOW.primary,
1556
+ TIMBAL_V2_BORDER.primary
1557
+ );
1558
+ var TIMBAL_V2_PRIMARY_PILL_FILL_LAYER = cn(
1559
+ "pointer-events-none absolute inset-0 transition duration-200 ease-in-out",
1560
+ "bg-gradient-to-b from-primary-fill-from to-primary-fill-to",
1561
+ "group-hover/avatar:from-primary-fill-hover-from group-hover/avatar:to-primary-fill-hover-to",
1562
+ "group-active/avatar:from-primary-fill-active-from group-active/avatar:to-primary-fill-active-to"
1563
+ );
1564
+ var TIMBAL_V2_SECONDARY_PILL_ROOT = cn(
1565
+ "relative box-border inline-flex items-center justify-center overflow-hidden rounded-full bg-transparent p-0 font-normal shadow-none transition duration-200 ease-in-out",
1566
+ TIMBAL_V2_SHADOW.secondary,
1567
+ TIMBAL_V2_BORDER.secondary
1568
+ );
1569
+ var TIMBAL_V2_SECONDARY_PILL_FILL_LAYER = cn(
1570
+ "pointer-events-none absolute inset-0 transition duration-200 ease-in-out",
1571
+ TIMBAL_V2_ELEVATED_GRADIENT,
1572
+ "group-hover/avatar:from-secondary-fill-hover-from group-hover/avatar:to-secondary-fill-hover-to",
1573
+ "group-active/avatar:from-secondary-fill-active-from group-active/avatar:to-secondary-fill-active-to"
1574
+ );
1543
1575
  var TIMBAL_V2_SWITCH_TRACK_OFF = cn(
1544
1576
  TIMBAL_V2_ELEVATED_GRADIENT,
1545
1577
  "border border-border shadow-card"
@@ -1871,8 +1903,8 @@ var metricCardShellClass = cn(
1871
1903
  );
1872
1904
  var metricCardHeaderClass = "flex items-start justify-between gap-3 px-4 pb-1 pt-3";
1873
1905
  var metricTilesRowClass = "grid w-full min-w-0";
1874
- var metricChartRegionClass = "relative min-h-0 w-full border-t border-border/40 pt-2";
1875
- var metricChartPlotRegionClass = "relative min-h-0 w-full border-t border-border/40 px-0 pt-5 pb-3";
1906
+ var metricChartRegionClass = "relative min-h-0 w-full overflow-x-hidden border-t border-border/40 pt-2";
1907
+ var metricChartPlotRegionClass = "relative min-h-0 w-full overflow-x-hidden border-t border-border/40 px-0 pt-5 pb-3";
1876
1908
  var metricCellDividerClass = "border-r border-border/40";
1877
1909
  var MetricCardHeader = ({
1878
1910
  title,
@@ -2098,7 +2130,7 @@ var appShellTopbarRowClass = cn(
2098
2130
  "flex w-full items-center justify-between gap-2"
2099
2131
  );
2100
2132
  var appShellTopbarStickyClass = cn(
2101
- "sticky top-0 z-20 shrink-0 bg-background pb-2",
2133
+ "shrink-0 bg-background pb-2",
2102
2134
  appShellInsetTopClass
2103
2135
  );
2104
2136
  var appPageHeaderClass = cn(
@@ -2514,10 +2546,10 @@ function useAppCopilotContext() {
2514
2546
  var import_lucide_react10 = require("lucide-react");
2515
2547
 
2516
2548
  // src/chat/thread.tsx
2517
- var import_react33 = require("react");
2518
- var import_react34 = require("@assistant-ui/react");
2549
+ var import_react36 = require("react");
2550
+ var import_react37 = require("@assistant-ui/react");
2519
2551
  var import_lucide_react9 = require("lucide-react");
2520
- var import_react35 = require("motion/react");
2552
+ var import_react38 = require("motion/react");
2521
2553
 
2522
2554
  // src/chat/attachment.tsx
2523
2555
  var import_react8 = require("react");
@@ -2661,25 +2693,71 @@ function DialogTitle({
2661
2693
  }
2662
2694
 
2663
2695
  // src/ui/avatar.tsx
2696
+ var React2 = __toESM(require("react"), 1);
2664
2697
  var import_radix_ui4 = require("radix-ui");
2665
2698
  var import_jsx_runtime17 = require("react/jsx-runtime");
2699
+ var AVATAR_PRIMARY_FALLBACK_CLASS = cn(
2700
+ TIMBAL_V2_SECONDARY_PILL_ROOT,
2701
+ TIMBAL_V2_LABEL.secondary,
2702
+ "font-medium"
2703
+ );
2704
+ var AVATAR_SECONDARY_FILL_STYLE = {
2705
+ backgroundImage: "linear-gradient(to bottom, var(--elevated-from), var(--elevated-to))"
2706
+ };
2707
+ var AvatarChromeContext = React2.createContext(
2708
+ null
2709
+ );
2710
+ function useAvatarChrome() {
2711
+ return React2.useContext(AvatarChromeContext);
2712
+ }
2713
+ function isBrandedVariant(variant) {
2714
+ return variant === "secondary" || variant === "primary" || variant === "chart";
2715
+ }
2716
+ var AVATAR_SIZE_CLASS = {
2717
+ default: "size-8",
2718
+ sm: "size-6",
2719
+ lg: "size-10"
2720
+ };
2666
2721
  function Avatar({
2667
2722
  className,
2668
2723
  size = "default",
2724
+ variant: rootVariant,
2725
+ children,
2669
2726
  ...props
2670
2727
  }) {
2671
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2728
+ const [chrome, setChrome] = React2.useState(rootVariant ?? "muted");
2729
+ React2.useLayoutEffect(() => {
2730
+ if (rootVariant !== void 0) {
2731
+ setChrome(rootVariant);
2732
+ }
2733
+ }, [rootVariant]);
2734
+ const branded = isBrandedVariant(chrome);
2735
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(AvatarChromeContext.Provider, { value: { chrome, setChrome }, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
2672
2736
  import_radix_ui4.Avatar.Root,
2673
2737
  {
2674
2738
  "data-slot": "avatar",
2675
2739
  "data-size": size,
2740
+ "data-variant": branded ? "secondary" : chrome,
2676
2741
  className: cn(
2677
- "group/avatar relative flex size-8 shrink-0 overflow-hidden rounded-full select-none data-[size=lg]:size-10 data-[size=sm]:size-6",
2742
+ "group/avatar relative shrink-0 select-none",
2743
+ AVATAR_SIZE_CLASS[size],
2744
+ branded ? TIMBAL_V2_SECONDARY_PILL_ROOT : "flex overflow-hidden rounded-full",
2678
2745
  className
2679
2746
  ),
2680
- ...props
2747
+ ...props,
2748
+ children: [
2749
+ branded ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2750
+ "span",
2751
+ {
2752
+ "aria-hidden": true,
2753
+ className: TIMBAL_V2_SECONDARY_PILL_FILL_LAYER,
2754
+ style: AVATAR_SECONDARY_FILL_STYLE
2755
+ }
2756
+ ) : null,
2757
+ children
2758
+ ]
2681
2759
  }
2682
- );
2760
+ ) });
2683
2761
  }
2684
2762
  function AvatarImage({
2685
2763
  className,
@@ -2689,24 +2767,44 @@ function AvatarImage({
2689
2767
  import_radix_ui4.Avatar.Image,
2690
2768
  {
2691
2769
  "data-slot": "avatar-image",
2692
- className: cn("aspect-square size-full", className),
2770
+ className: cn(
2771
+ "relative z-10 aspect-square size-full rounded-full object-cover",
2772
+ className
2773
+ ),
2693
2774
  ...props
2694
2775
  }
2695
2776
  );
2696
2777
  }
2697
2778
  function AvatarFallback({
2698
2779
  className,
2780
+ variant = "muted",
2781
+ seed: _seed,
2782
+ children,
2783
+ style,
2699
2784
  ...props
2700
2785
  }) {
2786
+ const chromeCtx = useAvatarChrome();
2787
+ React2.useLayoutEffect(() => {
2788
+ chromeCtx?.setChrome(variant);
2789
+ }, [chromeCtx, variant]);
2790
+ const branded = isBrandedVariant(variant);
2701
2791
  return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2702
2792
  import_radix_ui4.Avatar.Fallback,
2703
2793
  {
2704
2794
  "data-slot": "avatar-fallback",
2795
+ "data-variant": branded ? "secondary" : variant,
2705
2796
  className: cn(
2706
- "bg-muted text-muted-foreground flex size-full items-center justify-center rounded-full text-sm group-data-[size=sm]/avatar:text-xs",
2797
+ "relative z-10 flex size-full items-center justify-center rounded-full",
2798
+ branded ? cn(
2799
+ "bg-transparent font-medium",
2800
+ TIMBAL_V2_LABEL.secondary,
2801
+ "text-sm group-data-[size=sm]/avatar:text-xs"
2802
+ ) : "bg-muted font-normal text-muted-foreground text-sm group-data-[size=sm]/avatar:text-xs",
2707
2803
  className
2708
2804
  ),
2709
- ...props
2805
+ style,
2806
+ ...props,
2807
+ children
2710
2808
  }
2711
2809
  );
2712
2810
  }
@@ -2890,31 +2988,32 @@ var import_react_markdown = require("@assistant-ui/react-markdown");
2890
2988
  var import_remark_gfm = __toESM(require("remark-gfm"), 1);
2891
2989
  var import_remark_math = __toESM(require("remark-math"), 1);
2892
2990
  var import_rehype_katex = __toESM(require("rehype-katex"), 1);
2893
- var import_react20 = require("react");
2991
+ var import_react23 = require("react");
2894
2992
  var import_lucide_react5 = require("lucide-react");
2895
2993
 
2896
2994
  // src/chat/syntax-highlighter.tsx
2897
- var import_react19 = require("react");
2995
+ var import_react22 = require("react");
2898
2996
  var import_core = require("shiki/core");
2899
2997
  var import_javascript = require("shiki/engine/javascript");
2900
2998
 
2901
2999
  // src/artifacts/registry.tsx
2902
- var import_react18 = require("react");
3000
+ var import_react21 = require("react");
2903
3001
 
2904
3002
  // src/artifacts/chart-artifact.tsx
2905
- var import_react10 = require("react");
3003
+ var import_react13 = require("react");
2906
3004
 
2907
3005
  // src/charts/line-area-chart.tsx
3006
+ var import_react10 = require("react");
2908
3007
  var import_recharts = require("recharts");
2909
3008
 
2910
3009
  // src/ui/chart.tsx
2911
- var React2 = __toESM(require("react"), 1);
3010
+ var React3 = __toESM(require("react"), 1);
2912
3011
  var RechartsPrimitive = __toESM(require("recharts"), 1);
2913
3012
  var import_jsx_runtime20 = require("react/jsx-runtime");
2914
3013
  var THEMES = { light: "", dark: ".dark" };
2915
- var ChartContext = React2.createContext(null);
3014
+ var ChartContext = React3.createContext(null);
2916
3015
  function useChart() {
2917
- const context = React2.useContext(ChartContext);
3016
+ const context = React3.useContext(ChartContext);
2918
3017
  if (!context) {
2919
3018
  throw new Error("useChart must be used within a <ChartContainer />");
2920
3019
  }
@@ -2927,7 +3026,7 @@ function ChartContainer({
2927
3026
  config,
2928
3027
  ...props
2929
3028
  }) {
2930
- const uniqueId = React2.useId();
3029
+ const uniqueId = React3.useId();
2931
3030
  const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
2932
3031
  return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ChartContext.Provider, { value: { config }, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
2933
3032
  "div",
@@ -2988,7 +3087,7 @@ function ChartTooltipContent({
2988
3087
  labelKey
2989
3088
  }) {
2990
3089
  const { config } = useChart();
2991
- const tooltipLabel = React2.useMemo(() => {
3090
+ const tooltipLabel = React3.useMemo(() => {
2992
3091
  if (hideLabel || !payload?.length) {
2993
3092
  return null;
2994
3093
  }
@@ -3099,7 +3198,7 @@ function ChartLegendContent({
3099
3198
  return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
3100
3199
  "div",
3101
3200
  {
3102
- className: "[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3",
3201
+ className: "[&>svg]:text-muted-foreground flex min-w-0 max-w-[8rem] items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3",
3103
3202
  children: [
3104
3203
  itemConfig?.icon && !hideIcon ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(itemConfig.icon, {}) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3105
3204
  "div",
@@ -3108,7 +3207,7 @@ function ChartLegendContent({
3108
3207
  style: { backgroundColor: item.color }
3109
3208
  }
3110
3209
  ),
3111
- itemConfig?.label
3210
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "min-w-0 truncate", children: itemConfig?.label ?? (item.value != null ? String(item.value) : null) })
3112
3211
  ]
3113
3212
  },
3114
3213
  `${item.value ?? index}`
@@ -3131,6 +3230,83 @@ function getPayloadConfigFromPayload(config, payload, key) {
3131
3230
  return configLabelKey in config ? config[configLabelKey] : config[key];
3132
3231
  }
3133
3232
 
3233
+ // src/charts/chart-gradient-utils.ts
3234
+ function barGradientId(scopeId, dataKey) {
3235
+ return `bar-${scopeId}-${sanitizeId(dataKey)}`;
3236
+ }
3237
+ function pieGradientId(scopeId, key) {
3238
+ return `pie-${scopeId}-${sanitizeId(key)}`;
3239
+ }
3240
+ function sanitizeId(key) {
3241
+ return key.replace(/[^a-zA-Z0-9_-]/g, "_");
3242
+ }
3243
+ function truncateLabel(text, maxChars = 14) {
3244
+ const s = String(text ?? "");
3245
+ if (s.length <= maxChars) return s;
3246
+ if (maxChars <= 1) return "\u2026";
3247
+ return `${s.slice(0, maxChars - 1)}\u2026`;
3248
+ }
3249
+ function estimateYAxisWidth(labels, { min = 48, max = 112, charWidth = 6.5 } = {}) {
3250
+ if (labels.length === 0) return min;
3251
+ const longest = labels.reduce((a, b) => a.length >= b.length ? a : b, "");
3252
+ return Math.min(max, Math.max(min, Math.ceil(longest.length * charWidth) + 12));
3253
+ }
3254
+
3255
+ // src/charts/chart-axis-tick.tsx
3256
+ var import_jsx_runtime21 = require("react/jsx-runtime");
3257
+ var ChartAxisTick = ({
3258
+ x = 0,
3259
+ y = 0,
3260
+ payload,
3261
+ textAnchor = "end",
3262
+ maxChars = 14,
3263
+ clipTicks = true
3264
+ }) => {
3265
+ const raw = String(payload?.value ?? "");
3266
+ const label = clipTicks ? truncateLabel(raw, maxChars) : raw;
3267
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("g", { transform: `translate(${x},${y})`, children: [
3268
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("title", { children: raw }),
3269
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3270
+ "text",
3271
+ {
3272
+ textAnchor,
3273
+ fill: "currentColor",
3274
+ className: "fill-muted-foreground",
3275
+ dominantBaseline: "middle",
3276
+ children: label
3277
+ }
3278
+ )
3279
+ ] });
3280
+ };
3281
+
3282
+ // src/charts/chart-gradients.tsx
3283
+ var import_jsx_runtime22 = require("react/jsx-runtime");
3284
+ var BarGradientDefs = ({
3285
+ scopeId,
3286
+ dataKeys,
3287
+ horizontal
3288
+ }) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("defs", { children: dataKeys.map((dataKey) => {
3289
+ const id = barGradientId(scopeId, dataKey);
3290
+ const color = `var(--color-${dataKey})`;
3291
+ if (horizontal) {
3292
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("linearGradient", { id, x1: "0", y1: "0", x2: "1", y2: "0", children: [
3293
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("stop", { offset: "0%", stopColor: color, stopOpacity: 1 }),
3294
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("stop", { offset: "100%", stopColor: color, stopOpacity: 0.55 })
3295
+ ] }, dataKey);
3296
+ }
3297
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("linearGradient", { id, x1: "0", y1: "0", x2: "0", y2: "1", children: [
3298
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("stop", { offset: "0%", stopColor: color, stopOpacity: 1 }),
3299
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("stop", { offset: "100%", stopColor: color, stopOpacity: 0.55 })
3300
+ ] }, dataKey);
3301
+ }) });
3302
+ var PieGradientDefs = ({ scopeId, slices }) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("defs", { children: slices.map(({ key, color }) => {
3303
+ const id = pieGradientId(scopeId, key);
3304
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("linearGradient", { id, x1: "0", y1: "0", x2: "1", y2: "1", children: [
3305
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("stop", { offset: "0%", stopColor: color, stopOpacity: 1 }),
3306
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("stop", { offset: "100%", stopColor: color, stopOpacity: 0.65 })
3307
+ ] }, key);
3308
+ }) });
3309
+
3134
3310
  // src/charts/geometry.ts
3135
3311
  function toNum(value) {
3136
3312
  const n = typeof value === "number" ? value : Number(value);
@@ -3213,15 +3389,52 @@ function formatCompact(value, unit) {
3213
3389
  return unit ? `${s}${unit}` : s;
3214
3390
  }
3215
3391
 
3392
+ // src/charts/line-area-chart-utils.ts
3393
+ function resolveChartMargin(options) {
3394
+ const { flush, showXAxis, showYAxis } = options;
3395
+ if (!flush) {
3396
+ return { top: 8, right: 12, bottom: 0, left: 0 };
3397
+ }
3398
+ const anyAxis = showXAxis || showYAxis;
3399
+ if (!anyAxis) {
3400
+ return { top: 8, right: 12, bottom: 8, left: 12 };
3401
+ }
3402
+ return {
3403
+ top: 8,
3404
+ right: 12,
3405
+ bottom: showXAxis ? 24 : 8,
3406
+ left: showYAxis ? 8 : 12
3407
+ };
3408
+ }
3409
+ function flushBarCategoryGap(flush, showCategoryAxis) {
3410
+ return flush && showCategoryAxis ? "0%" : void 0;
3411
+ }
3412
+ function flushLineAreaEdgeToEdge(flush, variant, showXAxis, showYAxis) {
3413
+ return flush && (variant === "line" || variant === "area") && showXAxis && !showYAxis;
3414
+ }
3415
+ function resolveTooltipCategory(label, payload, xKey, data, formatX) {
3416
+ const row = payload?.[0]?.payload;
3417
+ if (row && xKey in row) {
3418
+ const idx = data.indexOf(row);
3419
+ return formatX(row[xKey], idx >= 0 ? idx : 0);
3420
+ }
3421
+ if (label != null && label !== "") {
3422
+ const idx = typeof label === "number" ? label : data.findIndex((r) => r[xKey] === label || String(r[xKey]) === String(label));
3423
+ return formatX(label, idx >= 0 ? idx : 0);
3424
+ }
3425
+ return "";
3426
+ }
3427
+
3216
3428
  // src/charts/line-area-chart.tsx
3217
- var import_jsx_runtime21 = require("react/jsx-runtime");
3429
+ var import_jsx_runtime23 = require("react/jsx-runtime");
3430
+ var INDEX_X_KEY = "__index";
3218
3431
  var CHART_PALETTE = [
3219
- "var(--chart-1, #6366f1)",
3220
- "var(--chart-2, #10b981)",
3221
- "var(--chart-3, #f59e0b)",
3222
- "var(--chart-4, #a855f7)",
3223
- "var(--chart-5, #ef4444)",
3224
- "var(--chart-6, #06b6d4)"
3432
+ "var(--chart-1, #4f46e5)",
3433
+ "var(--chart-2, #3b82f6)",
3434
+ "var(--chart-3, #0ea5e9)",
3435
+ "var(--chart-4, #6366f1)",
3436
+ "var(--chart-5, #60a5fa)",
3437
+ "var(--chart-6, #2563eb)"
3225
3438
  ];
3226
3439
  var LineAreaChart = ({
3227
3440
  data = [],
@@ -3246,9 +3459,11 @@ var LineAreaChart = ({
3246
3459
  tooltipIndicator = "dot",
3247
3460
  formatValue,
3248
3461
  formatX,
3462
+ clipTicks = true,
3249
3463
  className,
3250
3464
  ariaLabel = "Chart"
3251
3465
  }) => {
3466
+ const gradientScopeId = (0, import_react10.useId)().replace(/:/g, "");
3252
3467
  const xKey = xKeyProp ?? inferXKey(data);
3253
3468
  const series = resolveSeries(seriesProp, data, xKey);
3254
3469
  const flush = layout === "flush";
@@ -3258,7 +3473,7 @@ var LineAreaChart = ({
3258
3473
  const showLegend = showLegendProp ?? (!flush && series.length > 1);
3259
3474
  const grid = gridLines ?? (horizontal ? "vertical" : "horizontal");
3260
3475
  if (data.length === 0 || series.length === 0) {
3261
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ChartEmpty, { className, height, ariaLabel });
3476
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ChartEmpty, { className, height, ariaLabel });
3262
3477
  }
3263
3478
  const config = {};
3264
3479
  series.forEach((s, i) => {
@@ -3269,25 +3484,52 @@ var LineAreaChart = ({
3269
3484
  });
3270
3485
  const valueFmt = (v) => formatValue ? formatValue(toNum(v)) : formatCompact(toNum(v), unit);
3271
3486
  const xFmt = (v, i) => formatX ? formatX(v, i) : String(v ?? "");
3272
- const margin = flush ? { top: 8, right: 4, bottom: 0, left: 0 } : { top: 8, right: 12, bottom: 0, left: 0 };
3487
+ const margin = resolveChartMargin({ flush, showXAxis, showYAxis });
3488
+ const flushCategoryXAxisProps = flush && showXAxis && flushLineAreaEdgeToEdge(flush, variant, showXAxis, showYAxis) ? { scale: "point", padding: "no-gap", interval: 0 } : flush && showXAxis && variant === "bar" ? { interval: 0 } : {};
3489
+ const useIndexX = flushLineAreaEdgeToEdge(flush, variant, showXAxis, showYAxis);
3490
+ const chartData = useIndexX ? data.map((row, i) => ({ ...row, [INDEX_X_KEY]: i })) : data;
3491
+ const chartXKey = useIndexX ? INDEX_X_KEY : xKey;
3492
+ const categoryTick = (textAnchor) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ChartAxisTick, { textAnchor, clipTicks });
3273
3493
  const showVGrid = showGrid && (grid === "vertical" || grid === "both");
3274
3494
  const showHGrid = showGrid && (grid === "horizontal" || grid === "both");
3275
- const tooltipEl = showTooltip ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3495
+ const tooltipEl = showTooltip ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3276
3496
  ChartTooltip,
3277
3497
  {
3278
3498
  cursor: variant === "bar",
3279
- content: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ChartTooltipContent, { indicator: tooltipIndicator })
3499
+ content: ({ active, payload, label }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3500
+ ChartTooltipContent,
3501
+ {
3502
+ active,
3503
+ payload,
3504
+ label,
3505
+ indicator: tooltipIndicator,
3506
+ labelFormatter: (_value, items) => {
3507
+ const category = resolveTooltipCategory(label, items, xKey, data, xFmt);
3508
+ return category || null;
3509
+ },
3510
+ formatter: (value, name, item) => {
3511
+ const key = String(item.dataKey ?? name ?? "value");
3512
+ const seriesLabel = config[key]?.label ?? name;
3513
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex flex-1 items-center justify-between leading-none", children: [
3514
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "text-muted-foreground", children: seriesLabel }),
3515
+ value != null ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "text-foreground font-mono font-medium tabular-nums", children: valueFmt(value) }) : null
3516
+ ] });
3517
+ }
3518
+ }
3519
+ )
3280
3520
  }
3281
3521
  ) : null;
3282
- const legendEl = showLegend ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ChartLegend, { content: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ChartLegendContent, {}) }) : null;
3283
- const gridEl = showGrid && grid !== "none" ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_recharts.CartesianGrid, { vertical: showVGrid, horizontal: showHGrid, strokeDasharray: "4 4" }) : null;
3522
+ const legendEl = showLegend ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ChartLegend, { content: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ChartLegendContent, {}) }) : null;
3523
+ const gridEl = showGrid && grid !== "none" ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_recharts.CartesianGrid, { vertical: showVGrid, horizontal: showHGrid, strokeDasharray: "4 4" }) : null;
3284
3524
  const yDomain = yMax != null ? [0, yMax] : void 0;
3285
3525
  if (variant === "bar") {
3286
- const bars = series.map((s) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3526
+ const dataKeys = series.map((s) => s.dataKey);
3527
+ const barDefs = /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(BarGradientDefs, { scopeId: gradientScopeId, dataKeys, horizontal });
3528
+ const bars = series.map((s) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3287
3529
  import_recharts.Bar,
3288
3530
  {
3289
3531
  dataKey: s.dataKey,
3290
- fill: `var(--color-${s.dataKey})`,
3532
+ fill: `url(#${barGradientId(gradientScopeId, s.dataKey)})`,
3291
3533
  radius: barCornerRadius(barRadius, horizontal, stacked),
3292
3534
  stackId: stacked ? "stack" : void 0,
3293
3535
  isAnimationActive: true
@@ -3295,149 +3537,212 @@ var LineAreaChart = ({
3295
3537
  s.dataKey
3296
3538
  ));
3297
3539
  if (horizontal) {
3298
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ChartShell, { config, height, className, ariaLabel, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_recharts.BarChart, { accessibilityLayer: true, data, layout: "vertical", margin, children: [
3299
- gridEl,
3300
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3301
- import_recharts.XAxis,
3302
- {
3303
- type: "number",
3304
- hide: !showXAxis,
3305
- tickLine: false,
3306
- axisLine: false,
3307
- tickMargin: 8,
3308
- tickFormatter: (v) => valueFmt(v),
3309
- domain: yDomain
3310
- }
3311
- ),
3312
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3313
- import_recharts.YAxis,
3314
- {
3315
- type: "category",
3316
- dataKey: xKey,
3317
- hide: !showYAxis,
3318
- tickLine: false,
3319
- axisLine: false,
3320
- tickMargin: 8,
3321
- width: showYAxis ? void 0 : 0,
3322
- tickFormatter: (v, i) => xFmt(v, i)
3323
- }
3324
- ),
3325
- tooltipEl,
3326
- legendEl,
3327
- bars
3328
- ] }) });
3329
- }
3330
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ChartShell, { config, height, className, ariaLabel, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_recharts.BarChart, { accessibilityLayer: true, data, margin, children: [
3331
- gridEl,
3332
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3333
- import_recharts.XAxis,
3540
+ const categoryLabels = data.map((row, i) => xFmt(row[xKey], i));
3541
+ const yAxisWidth = showYAxis ? estimateYAxisWidth(
3542
+ clipTicks ? categoryLabels.map((l) => l.slice(0, 14)) : categoryLabels
3543
+ ) : 0;
3544
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ChartShell, { config, height, className, ariaLabel, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
3545
+ import_recharts.BarChart,
3334
3546
  {
3335
- dataKey: xKey,
3336
- hide: !showXAxis,
3337
- tickLine: false,
3338
- axisLine: false,
3339
- tickMargin: 8,
3340
- minTickGap: 16,
3341
- tickFormatter: (v, i) => xFmt(v, i)
3342
- }
3343
- ),
3344
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3345
- import_recharts.YAxis,
3346
- {
3347
- hide: !showYAxis,
3348
- tickLine: false,
3349
- axisLine: false,
3350
- tickMargin: 8,
3351
- width: showYAxis ? 44 : 0,
3352
- tickFormatter: (v) => valueFmt(v),
3353
- domain: yDomain
3547
+ accessibilityLayer: true,
3548
+ data,
3549
+ layout: "vertical",
3550
+ margin,
3551
+ barCategoryGap: flushBarCategoryGap(flush, showYAxis),
3552
+ children: [
3553
+ barDefs,
3554
+ gridEl,
3555
+ showXAxis ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3556
+ import_recharts.XAxis,
3557
+ {
3558
+ type: "number",
3559
+ tickLine: false,
3560
+ axisLine: false,
3561
+ tickMargin: 8,
3562
+ tickFormatter: (v) => valueFmt(v),
3563
+ domain: yDomain
3564
+ }
3565
+ ) : null,
3566
+ showYAxis ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3567
+ import_recharts.YAxis,
3568
+ {
3569
+ type: "category",
3570
+ dataKey: xKey,
3571
+ tickLine: false,
3572
+ axisLine: false,
3573
+ tickMargin: 8,
3574
+ width: yAxisWidth,
3575
+ minTickGap: 16,
3576
+ tick: categoryTick("end")
3577
+ }
3578
+ ) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_recharts.YAxis, { type: "category", dataKey: xKey, hide: true, width: 0 }),
3579
+ tooltipEl,
3580
+ legendEl,
3581
+ bars
3582
+ ]
3354
3583
  }
3355
- ),
3356
- tooltipEl,
3357
- legendEl,
3358
- bars
3359
- ] }) });
3584
+ ) });
3585
+ }
3586
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ChartShell, { config, height, className, ariaLabel, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
3587
+ import_recharts.BarChart,
3588
+ {
3589
+ accessibilityLayer: true,
3590
+ data,
3591
+ margin,
3592
+ barCategoryGap: flushBarCategoryGap(flush, showXAxis),
3593
+ children: [
3594
+ barDefs,
3595
+ gridEl,
3596
+ showXAxis ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3597
+ import_recharts.XAxis,
3598
+ {
3599
+ dataKey: xKey,
3600
+ tickLine: false,
3601
+ axisLine: false,
3602
+ tickMargin: 8,
3603
+ minTickGap: 16,
3604
+ tick: categoryTick("middle"),
3605
+ ...flushCategoryXAxisProps
3606
+ }
3607
+ ) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_recharts.XAxis, { dataKey: xKey, hide: true }),
3608
+ showYAxis ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3609
+ import_recharts.YAxis,
3610
+ {
3611
+ tickLine: false,
3612
+ axisLine: false,
3613
+ tickMargin: 8,
3614
+ width: 44,
3615
+ tickFormatter: (v) => valueFmt(v),
3616
+ domain: yDomain
3617
+ }
3618
+ ) : null,
3619
+ tooltipEl,
3620
+ legendEl,
3621
+ bars
3622
+ ]
3623
+ }
3624
+ ) });
3360
3625
  }
3361
- const axes = /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
3362
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3626
+ const lineAreaAxes = /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
3627
+ showXAxis && useIndexX ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3628
+ import_recharts.XAxis,
3629
+ {
3630
+ type: "number",
3631
+ dataKey: INDEX_X_KEY,
3632
+ domain: [0, Math.max(0, chartData.length - 1)],
3633
+ allowDecimals: false,
3634
+ ticks: chartData.map((_, i) => i),
3635
+ tickLine: false,
3636
+ axisLine: false,
3637
+ tickMargin: 8,
3638
+ tickFormatter: (i) => {
3639
+ const row = chartData[Number(i)];
3640
+ return row ? xFmt(row[xKey], Number(i)) : "";
3641
+ }
3642
+ }
3643
+ ) : showXAxis ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3363
3644
  import_recharts.XAxis,
3364
3645
  {
3365
3646
  dataKey: xKey,
3366
- hide: !showXAxis,
3367
3647
  tickLine: false,
3368
3648
  axisLine: false,
3369
3649
  tickMargin: 8,
3370
- minTickGap: 24,
3371
- tickFormatter: (v, i) => xFmt(v, i)
3650
+ minTickGap: flush ? 8 : 24,
3651
+ tickFormatter: (v, i) => xFmt(v, i),
3652
+ ...flushCategoryXAxisProps
3372
3653
  }
3373
- ),
3374
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3654
+ ) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_recharts.XAxis, { dataKey: chartXKey, hide: true }),
3655
+ showYAxis ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3375
3656
  import_recharts.YAxis,
3376
3657
  {
3377
- hide: !showYAxis,
3378
3658
  tickLine: false,
3379
3659
  axisLine: false,
3380
3660
  tickMargin: 8,
3381
- width: showYAxis ? 44 : 0,
3661
+ width: 44,
3382
3662
  tickFormatter: (v) => valueFmt(v),
3383
3663
  domain: yDomain
3384
3664
  }
3385
- )
3665
+ ) : null
3386
3666
  ] });
3667
+ const chartA11y = flush ? {} : { accessibilityLayer: true };
3387
3668
  if (variant === "area") {
3388
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ChartShell, { config, height, className, ariaLabel, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_recharts.AreaChart, { accessibilityLayer: true, data, margin, children: [
3389
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("defs", { children: series.map((s) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("linearGradient", { id: `fill-${s.dataKey}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
3390
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("stop", { offset: "5%", stopColor: `var(--color-${s.dataKey})`, stopOpacity: 0.3 }),
3391
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("stop", { offset: "95%", stopColor: `var(--color-${s.dataKey})`, stopOpacity: 0.04 })
3392
- ] }, s.dataKey)) }),
3393
- gridEl,
3394
- axes,
3395
- tooltipEl,
3396
- legendEl,
3397
- series.map((s) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3398
- import_recharts.Area,
3399
- {
3400
- dataKey: s.dataKey,
3401
- type: curve,
3402
- stackId: stacked ? "stack" : void 0,
3403
- stroke: `var(--color-${s.dataKey})`,
3404
- strokeWidth: 2,
3405
- fill: `url(#fill-${s.dataKey})`,
3406
- dot: dots === true ? { r: 3 } : false,
3407
- activeDot: { r: 4 },
3408
- isAnimationActive: true
3409
- },
3410
- s.dataKey
3411
- ))
3412
- ] }) });
3413
- }
3414
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ChartShell, { config, height, className, ariaLabel, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_recharts.LineChart, { accessibilityLayer: true, data, margin, children: [
3415
- gridEl,
3416
- axes,
3417
- tooltipEl,
3418
- legendEl,
3419
- series.map((s) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3420
- import_recharts.Line,
3669
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3670
+ ChartShell,
3421
3671
  {
3422
- dataKey: s.dataKey,
3423
- type: curve,
3424
- stroke: `var(--color-${s.dataKey})`,
3425
- strokeWidth: 2,
3426
- dot: dots === true ? { r: 3 } : false,
3427
- activeDot: { r: 4 },
3428
- isAnimationActive: true
3429
- },
3430
- s.dataKey
3431
- ))
3432
- ] }) });
3672
+ config,
3673
+ height,
3674
+ className,
3675
+ ariaLabel,
3676
+ flush,
3677
+ children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_recharts.AreaChart, { ...chartA11y, data: chartData, margin, children: [
3678
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("defs", { children: series.map((s) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("linearGradient", { id: `fill-${s.dataKey}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
3679
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("stop", { offset: "5%", stopColor: `var(--color-${s.dataKey})`, stopOpacity: 0.3 }),
3680
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("stop", { offset: "95%", stopColor: `var(--color-${s.dataKey})`, stopOpacity: 0.04 })
3681
+ ] }, s.dataKey)) }),
3682
+ gridEl,
3683
+ lineAreaAxes,
3684
+ tooltipEl,
3685
+ legendEl,
3686
+ series.map((s) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3687
+ import_recharts.Area,
3688
+ {
3689
+ dataKey: s.dataKey,
3690
+ type: curve,
3691
+ stackId: stacked ? "stack" : void 0,
3692
+ stroke: `var(--color-${s.dataKey})`,
3693
+ strokeWidth: 2,
3694
+ fill: `url(#fill-${s.dataKey})`,
3695
+ dot: dots === true ? { r: 3 } : false,
3696
+ activeDot: { r: 4 },
3697
+ isAnimationActive: true
3698
+ },
3699
+ s.dataKey
3700
+ ))
3701
+ ] })
3702
+ }
3703
+ );
3704
+ }
3705
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3706
+ ChartShell,
3707
+ {
3708
+ config,
3709
+ height,
3710
+ className,
3711
+ ariaLabel,
3712
+ flush,
3713
+ children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_recharts.LineChart, { ...chartA11y, data: chartData, margin, children: [
3714
+ gridEl,
3715
+ lineAreaAxes,
3716
+ tooltipEl,
3717
+ legendEl,
3718
+ series.map((s) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3719
+ import_recharts.Line,
3720
+ {
3721
+ dataKey: s.dataKey,
3722
+ type: curve,
3723
+ stroke: `var(--color-${s.dataKey})`,
3724
+ strokeWidth: 2,
3725
+ dot: dots === true ? { r: 3 } : false,
3726
+ activeDot: { r: 4 },
3727
+ isAnimationActive: true
3728
+ },
3729
+ s.dataKey
3730
+ ))
3731
+ ] })
3732
+ }
3733
+ );
3433
3734
  };
3434
- var ChartShell = ({ config, height, className, ariaLabel, children }) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3735
+ var ChartShell = ({ config, height, className, ariaLabel, flush = false, children }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3435
3736
  ChartContainer,
3436
3737
  {
3437
3738
  config,
3438
3739
  role: "img",
3439
3740
  "aria-label": ariaLabel,
3440
- className: cn("aspect-auto w-full", className),
3741
+ className: cn(
3742
+ "aspect-auto w-full",
3743
+ flush && "justify-start [&_.recharts-responsive-container]:!mx-0 [&_.recharts-responsive-container]:w-full",
3744
+ className
3745
+ ),
3441
3746
  style: { height },
3442
3747
  children
3443
3748
  }
@@ -3446,7 +3751,7 @@ var ChartEmpty = ({
3446
3751
  className,
3447
3752
  height,
3448
3753
  ariaLabel
3449
- }) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3754
+ }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3450
3755
  "div",
3451
3756
  {
3452
3757
  className: cn(
@@ -3479,8 +3784,35 @@ function resolveSeries(seriesProp, data, xKey) {
3479
3784
  }
3480
3785
 
3481
3786
  // src/charts/pie-chart.tsx
3787
+ var import_react11 = require("react");
3482
3788
  var import_recharts2 = require("recharts");
3483
- var import_jsx_runtime22 = require("react/jsx-runtime");
3789
+
3790
+ // src/charts/chart-center-label.tsx
3791
+ var import_jsx_runtime24 = require("react/jsx-runtime");
3792
+ var CENTER_BOX_W = 96;
3793
+ var CENTER_BOX_H = 52;
3794
+ var ChartCenterLabel = ({ cx, cy, value, label }) => {
3795
+ const hasValue = value != null && value !== "";
3796
+ const hasLabel = label != null && label !== "";
3797
+ if (!hasValue && !hasLabel) return null;
3798
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3799
+ "foreignObject",
3800
+ {
3801
+ x: cx - CENTER_BOX_W / 2,
3802
+ y: cy - CENTER_BOX_H / 2,
3803
+ width: CENTER_BOX_W,
3804
+ height: CENTER_BOX_H,
3805
+ className: "overflow-visible",
3806
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "pointer-events-none flex h-full flex-col items-center justify-center gap-0.5 text-center", children: [
3807
+ hasValue ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "text-2xl font-normal leading-none tabular-nums text-foreground", children: value }) : null,
3808
+ hasLabel ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "text-[11px] leading-none text-muted-foreground", children: label }) : null
3809
+ ] })
3810
+ }
3811
+ );
3812
+ };
3813
+
3814
+ // src/charts/pie-chart.tsx
3815
+ var import_jsx_runtime25 = require("react/jsx-runtime");
3484
3816
  var PieChart = ({
3485
3817
  data,
3486
3818
  nameKey: nameKeyProp,
@@ -3497,10 +3829,11 @@ var PieChart = ({
3497
3829
  className,
3498
3830
  ariaLabel = "Pie chart"
3499
3831
  }) => {
3832
+ const gradientScopeId = (0, import_react11.useId)().replace(/:/g, "");
3500
3833
  const nameKey = nameKeyProp ?? inferNameKey(data, dataKey);
3501
3834
  const palette = colors ?? CHART_PALETTE;
3502
3835
  if (data.length === 0) {
3503
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(PieEmpty, { className, height, ariaLabel });
3836
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(PieEmpty, { className, height, ariaLabel });
3504
3837
  }
3505
3838
  const slices = data.map((d, i) => ({
3506
3839
  name: String(d[nameKey] ?? i),
@@ -3511,7 +3844,7 @@ var PieChart = ({
3511
3844
  for (const s of slices) config[s.name] = { label: s.name };
3512
3845
  const innerPct = innerRadius > 0 ? `${Math.round(innerRadius * 75)}%` : 0;
3513
3846
  const hasCenter = innerRadius > 0 && (centerValue != null || centerLabel != null);
3514
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3847
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3515
3848
  ChartContainer,
3516
3849
  {
3517
3850
  config,
@@ -3519,14 +3852,21 @@ var PieChart = ({
3519
3852
  "aria-label": ariaLabel,
3520
3853
  className: cn("aspect-auto w-full", className),
3521
3854
  style: { height },
3522
- children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_recharts2.PieChart, { children: [
3523
- showTooltip && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3855
+ children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_recharts2.PieChart, { children: [
3856
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3857
+ PieGradientDefs,
3858
+ {
3859
+ scopeId: gradientScopeId,
3860
+ slices: slices.map((s) => ({ key: s.name, color: s.fill }))
3861
+ }
3862
+ ),
3863
+ showTooltip && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3524
3864
  ChartTooltip,
3525
3865
  {
3526
- content: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ChartTooltipContent, { nameKey: "name", indicator: tooltipIndicator, hideLabel: true })
3866
+ content: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ChartTooltipContent, { nameKey: "name", indicator: tooltipIndicator, hideLabel: true })
3527
3867
  }
3528
3868
  ),
3529
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
3869
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
3530
3870
  import_recharts2.Pie,
3531
3871
  {
3532
3872
  data: slices,
@@ -3539,24 +3879,30 @@ var PieChart = ({
3539
3879
  label: showLabels,
3540
3880
  isAnimationActive: true,
3541
3881
  children: [
3542
- slices.map((s) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_recharts2.Cell, { fill: s.fill }, s.name)),
3543
- hasCenter && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3882
+ slices.map((s) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_recharts2.Cell, { fill: `url(#${pieGradientId(gradientScopeId, s.name)})` }, s.name)),
3883
+ hasCenter && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3544
3884
  import_recharts2.Label,
3545
3885
  {
3886
+ position: "center",
3546
3887
  content: ({ viewBox }) => {
3547
3888
  if (!viewBox || !("cx" in viewBox)) return null;
3548
3889
  const { cx, cy } = viewBox;
3549
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("text", { x: cx, y: cy, textAnchor: "middle", dominantBaseline: "middle", children: [
3550
- centerValue != null && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("tspan", { x: cx, y: cy - 2, className: "fill-foreground text-2xl tabular-nums", children: centerValue }),
3551
- centerLabel != null && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("tspan", { x: cx, y: cy + 18, className: "fill-muted-foreground text-[11px]", children: centerLabel })
3552
- ] });
3890
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3891
+ ChartCenterLabel,
3892
+ {
3893
+ cx,
3894
+ cy,
3895
+ value: centerValue,
3896
+ label: centerLabel
3897
+ }
3898
+ );
3553
3899
  }
3554
3900
  }
3555
3901
  )
3556
3902
  ]
3557
3903
  }
3558
3904
  ),
3559
- showLegend && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ChartLegend, { content: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ChartLegendContent, { nameKey: "name" }) })
3905
+ showLegend && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ChartLegend, { content: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ChartLegendContent, { nameKey: "name" }) })
3560
3906
  ] })
3561
3907
  }
3562
3908
  );
@@ -3565,7 +3911,7 @@ var PieEmpty = ({
3565
3911
  className,
3566
3912
  height,
3567
3913
  ariaLabel
3568
- }) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3914
+ }) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3569
3915
  "div",
3570
3916
  {
3571
3917
  className: cn("flex w-full items-center justify-center text-xs text-muted-foreground", className),
@@ -3584,8 +3930,9 @@ function inferNameKey(data, dataKey) {
3584
3930
  }
3585
3931
 
3586
3932
  // src/charts/radial-chart.tsx
3933
+ var import_react12 = require("react");
3587
3934
  var import_recharts3 = require("recharts");
3588
- var import_jsx_runtime23 = require("react/jsx-runtime");
3935
+ var import_jsx_runtime26 = require("react/jsx-runtime");
3589
3936
  var RadialChart = ({
3590
3937
  data,
3591
3938
  nameKey: nameKeyProp,
@@ -3601,10 +3948,11 @@ var RadialChart = ({
3601
3948
  className,
3602
3949
  ariaLabel = "Radial chart"
3603
3950
  }) => {
3951
+ const gradientScopeId = (0, import_react12.useId)().replace(/:/g, "");
3604
3952
  const nameKey = nameKeyProp ?? inferNameKey2(data, dataKey);
3605
3953
  const palette = colors ?? CHART_PALETTE;
3606
3954
  if (data.length === 0) {
3607
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(RadialEmpty, { className, height, ariaLabel });
3955
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(RadialEmpty, { className, height, ariaLabel });
3608
3956
  }
3609
3957
  const rows = data.map((d, i) => ({
3610
3958
  name: String(d[nameKey] ?? i),
@@ -3615,8 +3963,8 @@ var RadialChart = ({
3615
3963
  const config = {};
3616
3964
  for (const r of rows) config[r.name] = { label: r.name };
3617
3965
  const hasCenter = centerValue != null || centerLabel != null;
3618
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: cn("flex w-full flex-col items-center gap-3", className), children: [
3619
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3966
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: cn("flex w-full flex-col items-center gap-3", className), children: [
3967
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3620
3968
  ChartContainer,
3621
3969
  {
3622
3970
  config,
@@ -3624,7 +3972,7 @@ var RadialChart = ({
3624
3972
  "aria-label": ariaLabel,
3625
3973
  className: "aspect-auto w-full",
3626
3974
  style: { height: height - (showLegend ? 32 : 0) },
3627
- children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
3975
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
3628
3976
  import_recharts3.RadialBarChart,
3629
3977
  {
3630
3978
  data: rows,
@@ -3635,19 +3983,32 @@ var RadialChart = ({
3635
3983
  barSize: ringWidth,
3636
3984
  barGap: ringGap,
3637
3985
  children: [
3638
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_recharts3.PolarAngleAxis, { type: "number", domain: [0, max], tick: false, axisLine: false }),
3639
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ChartTooltip, { content: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ChartTooltipContent, { nameKey: "name", hideLabel: true }) }),
3640
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_recharts3.RadialBar, { dataKey: "value", background: true, cornerRadius: ringWidth / 2, isAnimationActive: true, children: rows.map((r) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_recharts3.Cell, { fill: r.fill }, r.name)) }),
3641
- hasCenter && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_recharts3.PolarRadiusAxis, { tick: false, tickLine: false, axisLine: false, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3986
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3987
+ PieGradientDefs,
3988
+ {
3989
+ scopeId: gradientScopeId,
3990
+ slices: rows.map((r) => ({ key: r.name, color: r.fill }))
3991
+ }
3992
+ ),
3993
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_recharts3.PolarAngleAxis, { type: "number", domain: [0, max], tick: false, axisLine: false }),
3994
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ChartTooltip, { content: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ChartTooltipContent, { nameKey: "name", hideLabel: true }) }),
3995
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_recharts3.RadialBar, { dataKey: "value", background: true, cornerRadius: ringWidth / 2, isAnimationActive: true, children: rows.map((r) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_recharts3.Cell, { fill: `url(#${pieGradientId(gradientScopeId, r.name)})` }, r.name)) }),
3996
+ hasCenter && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_recharts3.PolarRadiusAxis, { tick: false, tickLine: false, axisLine: false, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3642
3997
  import_recharts3.Label,
3643
3998
  {
3999
+ position: "center",
3644
4000
  content: ({ viewBox }) => {
3645
4001
  if (!viewBox || !("cx" in viewBox)) return null;
3646
4002
  const { cx, cy } = viewBox;
3647
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("text", { x: cx, y: cy, textAnchor: "middle", dominantBaseline: "middle", children: [
3648
- centerValue != null && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("tspan", { x: cx, y: cy - 2, className: "fill-foreground text-2xl tabular-nums", children: centerValue }),
3649
- centerLabel != null && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("tspan", { x: cx, y: cy + 18, className: "fill-muted-foreground text-[11px]", children: centerLabel })
3650
- ] });
4003
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
4004
+ ChartCenterLabel,
4005
+ {
4006
+ cx,
4007
+ cy,
4008
+ value: centerValue,
4009
+ label: centerLabel
4010
+ }
4011
+ );
3651
4012
  }
3652
4013
  }
3653
4014
  ) })
@@ -3656,8 +4017,8 @@ var RadialChart = ({
3656
4017
  )
3657
4018
  }
3658
4019
  ),
3659
- showLegend && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "flex flex-wrap items-center justify-center gap-x-4 gap-y-1 text-xs text-muted-foreground", children: rows.map((r) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("span", { className: "inline-flex items-center gap-1.5", children: [
3660
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "inline-block size-2.5 rounded-[3px]", style: { background: r.fill } }),
4020
+ showLegend && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "flex flex-wrap items-center justify-center gap-x-4 gap-y-1 text-xs text-muted-foreground", children: rows.map((r) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("span", { className: "inline-flex items-center gap-1.5", children: [
4021
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "inline-block size-2.5 rounded-[3px]", style: { background: r.fill } }),
3661
4022
  r.name
3662
4023
  ] }, r.name)) })
3663
4024
  ] });
@@ -3666,7 +4027,7 @@ var RadialEmpty = ({
3666
4027
  className,
3667
4028
  height,
3668
4029
  ariaLabel
3669
- }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
4030
+ }) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3670
4031
  "div",
3671
4032
  {
3672
4033
  className: cn("flex w-full items-center justify-center text-xs text-muted-foreground", className),
@@ -3686,7 +4047,7 @@ function inferNameKey2(data, dataKey) {
3686
4047
 
3687
4048
  // src/charts/radar-chart.tsx
3688
4049
  var import_recharts4 = require("recharts");
3689
- var import_jsx_runtime24 = require("react/jsx-runtime");
4050
+ var import_jsx_runtime27 = require("react/jsx-runtime");
3690
4051
  var RadarChart = ({
3691
4052
  data,
3692
4053
  nameKey: nameKeyProp,
@@ -3701,7 +4062,7 @@ var RadarChart = ({
3701
4062
  const nameKey = nameKeyProp ?? inferNameKey3(data);
3702
4063
  const series = resolveSeries2(seriesProp, data, nameKey);
3703
4064
  if (data.length < 3 || series.length === 0) {
3704
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
4065
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3705
4066
  "div",
3706
4067
  {
3707
4068
  className: cn("flex items-center justify-center text-xs text-muted-foreground", className),
@@ -3719,7 +4080,7 @@ var RadarChart = ({
3719
4080
  color: s.color ?? CHART_PALETTE[i % CHART_PALETTE.length]
3720
4081
  };
3721
4082
  });
3722
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
4083
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3723
4084
  ChartContainer,
3724
4085
  {
3725
4086
  config,
@@ -3727,17 +4088,17 @@ var RadarChart = ({
3727
4088
  "aria-label": ariaLabel,
3728
4089
  className: cn("mx-auto aspect-square", className),
3729
4090
  style: { height },
3730
- children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_recharts4.RadarChart, { data, outerRadius: "70%", children: [
3731
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ChartTooltip, { content: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ChartTooltipContent, { indicator: "line" }) }),
3732
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_recharts4.PolarGrid, {}),
3733
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
4091
+ children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_recharts4.RadarChart, { data, outerRadius: "70%", children: [
4092
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ChartTooltip, { content: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ChartTooltipContent, { indicator: "line" }) }),
4093
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_recharts4.PolarGrid, {}),
4094
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3734
4095
  import_recharts4.PolarAngleAxis,
3735
4096
  {
3736
4097
  dataKey: nameKey,
3737
4098
  tick: { fontSize: 10, fill: "var(--color-muted-foreground)" }
3738
4099
  }
3739
4100
  ),
3740
- series.map((s) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
4101
+ series.map((s) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3741
4102
  import_recharts4.Radar,
3742
4103
  {
3743
4104
  dataKey: s.dataKey,
@@ -3750,7 +4111,7 @@ var RadarChart = ({
3750
4111
  },
3751
4112
  s.dataKey
3752
4113
  )),
3753
- showLegend && series.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ChartLegend, { content: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ChartLegendContent, {}) })
4114
+ showLegend && series.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ChartLegend, { content: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ChartLegendContent, {}) })
3754
4115
  ] })
3755
4116
  }
3756
4117
  );
@@ -3771,10 +4132,10 @@ function resolveSeries2(seriesProp, data, nameKey) {
3771
4132
  }
3772
4133
 
3773
4134
  // src/artifacts/artifact-card.tsx
3774
- var import_jsx_runtime25 = require("react/jsx-runtime");
4135
+ var import_jsx_runtime28 = require("react/jsx-runtime");
3775
4136
  var ArtifactCard = ({ title, kind, className, bodyClassName, toolbar, children }) => {
3776
4137
  const hasHeader = Boolean(title || toolbar);
3777
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
4138
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
3778
4139
  "div",
3779
4140
  {
3780
4141
  className: cn(
@@ -3783,29 +4144,29 @@ var ArtifactCard = ({ title, kind, className, bodyClassName, toolbar, children }
3783
4144
  ),
3784
4145
  "data-artifact-kind": kind,
3785
4146
  children: [
3786
- hasHeader && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "aui-artifact-header flex items-center gap-2 border-b border-border/40 bg-muted/30 px-3 py-1.5", children: [
3787
- title && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "aui-artifact-title flex-1 truncate text-xs font-semibold text-foreground/80", children: title }),
3788
- !title && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "flex-1" }),
4147
+ hasHeader && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "aui-artifact-header flex items-center gap-2 border-b border-border/40 bg-muted/30 px-3 py-1.5", children: [
4148
+ title && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "aui-artifact-title flex-1 truncate text-xs font-semibold text-foreground/80", children: title }),
4149
+ !title && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "flex-1" }),
3789
4150
  toolbar
3790
4151
  ] }),
3791
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: cn("aui-artifact-body", bodyClassName), children })
4152
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: cn("aui-artifact-body", bodyClassName), children })
3792
4153
  ]
3793
4154
  }
3794
4155
  );
3795
4156
  };
3796
4157
 
3797
4158
  // src/artifacts/chart-artifact.tsx
3798
- var import_jsx_runtime26 = require("react/jsx-runtime");
4159
+ var import_jsx_runtime29 = require("react/jsx-runtime");
3799
4160
  var ChartArtifactView = ({
3800
4161
  artifact,
3801
4162
  embedded = false,
3802
4163
  height = 300
3803
4164
  }) => {
3804
- const plot = /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ChartArtifactPlot, { artifact, height });
4165
+ const plot = /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ChartArtifactPlot, { artifact, height });
3805
4166
  if (embedded) {
3806
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "aui-artifact-chart w-full", children: plot });
4167
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "aui-artifact-chart w-full", children: plot });
3807
4168
  }
3808
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ArtifactCard, { title: artifact.title, kind: "chart", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "aui-artifact-chart pt-2", children: plot }) });
4169
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ArtifactCard, { title: artifact.title, kind: "chart", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "aui-artifact-chart pt-2", children: plot }) });
3809
4170
  };
3810
4171
  function ChartArtifactPlot({
3811
4172
  artifact,
@@ -3813,7 +4174,7 @@ function ChartArtifactPlot({
3813
4174
  }) {
3814
4175
  const { chartType = "bar", data = [] } = artifact;
3815
4176
  const xKey = artifact.xKey ?? inferXKey2(data);
3816
- const series = (0, import_react10.useMemo)(() => {
4177
+ const series = (0, import_react13.useMemo)(() => {
3817
4178
  if (artifact.series && artifact.series.length > 0) {
3818
4179
  return artifact.series.map((s) => ({
3819
4180
  dataKey: s.dataKey,
@@ -3831,7 +4192,7 @@ function ChartArtifactPlot({
3831
4192
  const aria = typeof artifact.title === "string" ? artifact.title : "Chart";
3832
4193
  if (chartType === "pie" || chartType === "donut") {
3833
4194
  const total = data.reduce((sum, d) => sum + toNum(d[series[0]?.dataKey ?? "value"]), 0);
3834
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "px-3 pb-3 pt-2", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
4195
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "px-3 pb-3 pt-2", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
3835
4196
  PieChart,
3836
4197
  {
3837
4198
  data,
@@ -3848,7 +4209,7 @@ function ChartArtifactPlot({
3848
4209
  ) });
3849
4210
  }
3850
4211
  if (chartType === "radial") {
3851
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "px-3 pb-3 pt-2", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
4212
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "px-3 pb-3 pt-2", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
3852
4213
  RadialChart,
3853
4214
  {
3854
4215
  data,
@@ -3861,10 +4222,11 @@ function ChartArtifactPlot({
3861
4222
  ) });
3862
4223
  }
3863
4224
  if (chartType === "radar") {
3864
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "px-3 pb-3 pt-2", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(RadarChart, { data, nameKey: xKey, series, height, ariaLabel: aria }) });
4225
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "px-3 pb-3 pt-2", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(RadarChart, { data, nameKey: xKey, series, height, ariaLabel: aria }) });
3865
4226
  }
3866
4227
  const horizontal = chartType === "horizontalBar";
3867
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
4228
+ const showAxes = artifact.showAxes === true;
4229
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
3868
4230
  LineAreaChart,
3869
4231
  {
3870
4232
  data,
@@ -3878,8 +4240,8 @@ function ChartArtifactPlot({
3878
4240
  curve: artifact.curve,
3879
4241
  dots: artifact.dots,
3880
4242
  tooltipIndicator: artifact.tooltipIndicator,
3881
- showXAxis: true,
3882
- showYAxis: horizontal,
4243
+ showXAxis: showAxes,
4244
+ showYAxis: showAxes && horizontal,
3883
4245
  showLegend: artifact.legend ?? series.length > 1,
3884
4246
  unit: artifact.unit,
3885
4247
  ariaLabel: aria
@@ -3901,15 +4263,15 @@ function inferDataKeys(data, xKey) {
3901
4263
  }
3902
4264
 
3903
4265
  // src/artifacts/question-artifact.tsx
3904
- var import_react11 = require("react");
3905
- var import_react12 = require("@assistant-ui/react");
4266
+ var import_react14 = require("react");
4267
+ var import_react15 = require("@assistant-ui/react");
3906
4268
  var import_lucide_react4 = require("lucide-react");
3907
- var import_jsx_runtime27 = require("react/jsx-runtime");
4269
+ var import_jsx_runtime30 = require("react/jsx-runtime");
3908
4270
  function optionKey(option, index) {
3909
4271
  const id = option.id?.trim();
3910
4272
  return id ? id : `__option-${index}`;
3911
4273
  }
3912
- var OptionRadio = ({ selected }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
4274
+ var OptionRadio = ({ selected }) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3913
4275
  "span",
3914
4276
  {
3915
4277
  className: cn(
@@ -3917,18 +4279,18 @@ var OptionRadio = ({ selected }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx
3917
4279
  selected ? "border-foreground bg-foreground text-background" : "border-border bg-background"
3918
4280
  ),
3919
4281
  "aria-hidden": true,
3920
- children: selected ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react4.CheckIcon, { className: "size-2.5 stroke-[3]" }) : null
4282
+ children: selected ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react4.CheckIcon, { className: "size-2.5 stroke-[3]" }) : null
3921
4283
  }
3922
4284
  );
3923
4285
  var QuestionArtifactView = ({
3924
4286
  artifact
3925
4287
  }) => {
3926
- const runtime = (0, import_react12.useThreadRuntime)();
3927
- const [selected, setSelected] = (0, import_react11.useState)([]);
3928
- const [submittedIds, setSubmittedIds] = (0, import_react11.useState)(null);
4288
+ const runtime = (0, import_react15.useThreadRuntime)();
4289
+ const [selected, setSelected] = (0, import_react14.useState)([]);
4290
+ const [submittedIds, setSubmittedIds] = (0, import_react14.useState)(null);
3929
4291
  const isMulti = artifact.multi === true;
3930
4292
  const isDisabled = submittedIds !== null;
3931
- const send = (0, import_react11.useCallback)(
4293
+ const send = (0, import_react14.useCallback)(
3932
4294
  (keys) => {
3933
4295
  if (keys.length === 0) return;
3934
4296
  const labels = artifact.options.map((option, index) => ({ option, key: optionKey(option, index) })).filter(({ key }) => keys.includes(key)).map(({ option }) => option.label);
@@ -3940,7 +4302,7 @@ var QuestionArtifactView = ({
3940
4302
  },
3941
4303
  [artifact.options, runtime]
3942
4304
  );
3943
- const onPick = (0, import_react11.useCallback)(
4305
+ const onPick = (0, import_react14.useCallback)(
3944
4306
  (key) => {
3945
4307
  if (isDisabled) return;
3946
4308
  if (!isMulti) {
@@ -3953,15 +4315,15 @@ var QuestionArtifactView = ({
3953
4315
  },
3954
4316
  [isDisabled, isMulti, send]
3955
4317
  );
3956
- const onConfirm = (0, import_react11.useCallback)(() => {
4318
+ const onConfirm = (0, import_react14.useCallback)(() => {
3957
4319
  send(selected);
3958
4320
  }, [selected, send]);
3959
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: studioArtifactShellClass, "data-artifact-kind": "question", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "px-2.5 py-2", children: [
3960
- artifact.prompt ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "mb-2 text-sm font-normal leading-snug text-foreground", children: artifact.prompt }) : null,
3961
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "flex flex-col gap-0.5", role: "list", children: artifact.options.map((option, index) => {
4321
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: studioArtifactShellClass, "data-artifact-kind": "question", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "px-2.5 py-2", children: [
4322
+ artifact.prompt ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "mb-2 text-sm font-normal leading-snug text-foreground", children: artifact.prompt }) : null,
4323
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "flex flex-col gap-0.5", role: "list", children: artifact.options.map((option, index) => {
3962
4324
  const key = optionKey(option, index);
3963
4325
  const isSelected = submittedIds ? submittedIds.includes(key) : isMulti && selected.includes(key);
3964
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
4326
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
3965
4327
  "button",
3966
4328
  {
3967
4329
  type: "button",
@@ -3973,17 +4335,17 @@ var QuestionArtifactView = ({
3973
4335
  isDisabled && (isSelected ? "cursor-default" : "cursor-not-allowed opacity-50")
3974
4336
  ),
3975
4337
  children: [
3976
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(OptionRadio, { selected: isSelected }),
3977
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("span", { className: "min-w-0 flex-1 text-left", children: [
3978
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "block font-normal text-foreground", children: option.label }),
3979
- option.description ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "mt-0.5 block text-xs text-muted-foreground", children: option.description }) : null
4338
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(OptionRadio, { selected: isSelected }),
4339
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { className: "min-w-0 flex-1 text-left", children: [
4340
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "block font-normal text-foreground", children: option.label }),
4341
+ option.description ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "mt-0.5 block text-xs text-muted-foreground", children: option.description }) : null
3980
4342
  ] })
3981
4343
  ]
3982
4344
  },
3983
4345
  key
3984
4346
  );
3985
4347
  }) }),
3986
- isMulti && !submittedIds ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "mt-2 flex justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
4348
+ isMulti && !submittedIds ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "mt-2 flex justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3987
4349
  TimbalV2Button,
3988
4350
  {
3989
4351
  type: "button",
@@ -3998,12 +4360,12 @@ var QuestionArtifactView = ({
3998
4360
  };
3999
4361
 
4000
4362
  // src/artifacts/html-artifact.tsx
4001
- var import_jsx_runtime28 = require("react/jsx-runtime");
4363
+ var import_jsx_runtime31 = require("react/jsx-runtime");
4002
4364
  var HtmlArtifactView = ({ artifact }) => {
4003
4365
  const sandboxed = artifact.sandboxed !== false;
4004
4366
  const sandbox = sandboxed ? "allow-scripts allow-same-origin allow-forms allow-modals allow-popups allow-pointer-lock" : void 0;
4005
4367
  const height = artifact.height ?? "320px";
4006
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ArtifactCard, { title: artifact.title, kind: "html", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
4368
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ArtifactCard, { title: artifact.title, kind: "html", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
4007
4369
  "iframe",
4008
4370
  {
4009
4371
  title: artifact.title ?? "HTML artifact",
@@ -4016,7 +4378,7 @@ var HtmlArtifactView = ({ artifact }) => {
4016
4378
  };
4017
4379
 
4018
4380
  // src/artifacts/json-artifact.tsx
4019
- var import_jsx_runtime29 = require("react/jsx-runtime");
4381
+ var import_jsx_runtime32 = require("react/jsx-runtime");
4020
4382
  var JsonArtifactView = ({
4021
4383
  artifact
4022
4384
  }) => {
@@ -4028,16 +4390,16 @@ var JsonArtifactView = ({
4028
4390
  } catch {
4029
4391
  body = String(data);
4030
4392
  }
4031
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ArtifactCard, { title, kind: "json", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("pre", { className: "aui-artifact-json m-0 max-h-[420px] overflow-auto p-3 font-mono text-[12px] leading-relaxed text-foreground/85", children: body }) });
4393
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ArtifactCard, { title, kind: "json", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("pre", { className: "aui-artifact-json m-0 max-h-[420px] overflow-auto p-3 font-mono text-[12px] leading-relaxed text-foreground/85", children: body }) });
4032
4394
  };
4033
4395
 
4034
4396
  // src/artifacts/table-artifact.tsx
4035
- var import_jsx_runtime30 = require("react/jsx-runtime");
4397
+ var import_jsx_runtime33 = require("react/jsx-runtime");
4036
4398
  var TableArtifactView = ({ artifact }) => {
4037
4399
  const rows = artifact.rows ?? [];
4038
4400
  const columns = artifact.columns ?? deriveColumns(rows);
4039
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(ArtifactCard, { title: artifact.title, kind: "table", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "aui-artifact-table-wrap overflow-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("table", { className: "aui-artifact-table w-full border-collapse text-sm", children: [
4040
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("tr", { className: "border-b border-border/40 bg-muted/20", children: columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4401
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ArtifactCard, { title: artifact.title, kind: "table", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "aui-artifact-table-wrap overflow-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("table", { className: "aui-artifact-table w-full border-collapse text-sm", children: [
4402
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("tr", { className: "border-b border-border/40 bg-muted/20", children: columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
4041
4403
  "th",
4042
4404
  {
4043
4405
  className: "px-3 py-2 text-left text-xs font-semibold uppercase tracking-wider text-muted-foreground",
@@ -4045,11 +4407,11 @@ var TableArtifactView = ({ artifact }) => {
4045
4407
  },
4046
4408
  col.key
4047
4409
  )) }) }),
4048
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("tbody", { children: rows.map((row, i) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4410
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("tbody", { children: rows.map((row, i) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
4049
4411
  "tr",
4050
4412
  {
4051
4413
  className: "border-b border-border/30 transition-colors last:border-b-0 hover:bg-muted/20",
4052
- children: columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4414
+ children: columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
4053
4415
  "td",
4054
4416
  {
4055
4417
  className: "px-3 py-2 align-top text-foreground/85",
@@ -4082,7 +4444,7 @@ function formatCell(value) {
4082
4444
  }
4083
4445
 
4084
4446
  // src/artifacts/ui/ui-artifact.tsx
4085
- var import_react17 = require("react");
4447
+ var import_react20 = require("react");
4086
4448
 
4087
4449
  // src/artifacts/ui/types.ts
4088
4450
  function isUiBinding(value) {
@@ -4135,57 +4497,57 @@ function resolveBindable(value, state) {
4135
4497
  }
4136
4498
 
4137
4499
  // src/artifacts/ui/registry.tsx
4138
- var import_react13 = require("react");
4139
- var import_jsx_runtime31 = require("react/jsx-runtime");
4140
- var UiStateContext = (0, import_react13.createContext)({});
4141
- var UiDispatchContext = (0, import_react13.createContext)(() => {
4500
+ var import_react16 = require("react");
4501
+ var import_jsx_runtime34 = require("react/jsx-runtime");
4502
+ var UiStateContext = (0, import_react16.createContext)({});
4503
+ var UiDispatchContext = (0, import_react16.createContext)(() => {
4142
4504
  });
4143
- var UiStateProvider = ({ state, dispatch, children }) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(UiStateContext.Provider, { value: state, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(UiDispatchContext.Provider, { value: dispatch, children }) });
4505
+ var UiStateProvider = ({ state, dispatch, children }) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(UiStateContext.Provider, { value: state, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(UiDispatchContext.Provider, { value: dispatch, children }) });
4144
4506
  function useUiState() {
4145
- return (0, import_react13.useContext)(UiStateContext);
4507
+ return (0, import_react16.useContext)(UiStateContext);
4146
4508
  }
4147
4509
  function useUiDispatch() {
4148
- return (0, import_react13.useContext)(UiDispatchContext);
4510
+ return (0, import_react16.useContext)(UiDispatchContext);
4149
4511
  }
4150
- var UiEventContext = (0, import_react13.createContext)(
4512
+ var UiEventContext = (0, import_react16.createContext)(
4151
4513
  null
4152
4514
  );
4153
- var UiEventProvider = ({ onEvent, children }) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(UiEventContext.Provider, { value: onEvent, children });
4515
+ var UiEventProvider = ({ onEvent, children }) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(UiEventContext.Provider, { value: onEvent, children });
4154
4516
  function useUiEventEmitter() {
4155
- return (0, import_react13.useContext)(UiEventContext);
4517
+ return (0, import_react16.useContext)(UiEventContext);
4156
4518
  }
4157
- var UiCustomNodeRegistryContext = (0, import_react13.createContext)({});
4519
+ var UiCustomNodeRegistryContext = (0, import_react16.createContext)({});
4158
4520
  function useUiCustomNodeRegistry() {
4159
- return (0, import_react13.useContext)(UiCustomNodeRegistryContext);
4521
+ return (0, import_react16.useContext)(UiCustomNodeRegistryContext);
4160
4522
  }
4161
4523
 
4162
4524
  // src/artifacts/ui/nodes.tsx
4163
- var import_react14 = require("react");
4164
- var import_react15 = require("motion/react");
4165
- var import_react16 = require("@assistant-ui/react");
4166
- var import_jsx_runtime32 = require("react/jsx-runtime");
4525
+ var import_react17 = require("react");
4526
+ var import_react18 = require("motion/react");
4527
+ var import_react19 = require("@assistant-ui/react");
4528
+ var import_jsx_runtime35 = require("react/jsx-runtime");
4167
4529
  var UiNodeView = ({ node }) => {
4168
4530
  switch (node.kind) {
4169
4531
  case "box":
4170
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(BoxNode, { node });
4532
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(BoxNode, { node });
4171
4533
  case "text":
4172
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TextNode, { node });
4534
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TextNode, { node });
4173
4535
  case "heading":
4174
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(HeadingNode, { node });
4536
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(HeadingNode, { node });
4175
4537
  case "badge":
4176
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(BadgeNode, { node });
4538
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(BadgeNode, { node });
4177
4539
  case "button":
4178
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ButtonNode, { node });
4540
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ButtonNode, { node });
4179
4541
  case "toggle":
4180
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ToggleNode, { node });
4542
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ToggleNode, { node });
4181
4543
  case "slider":
4182
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(SliderNode, { node });
4544
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SliderNode, { node });
4183
4545
  case "tooltip":
4184
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TooltipNode, { node });
4546
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TooltipNode, { node });
4185
4547
  case "draggable":
4186
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DraggableNode, { node });
4548
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(DraggableNode, { node });
4187
4549
  case "custom":
4188
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(CustomNode, { node });
4550
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(CustomNode, { node });
4189
4551
  default:
4190
4552
  return null;
4191
4553
  }
@@ -4193,9 +4555,9 @@ var UiNodeView = ({ node }) => {
4193
4555
  function useActionRunner() {
4194
4556
  const state = useUiState();
4195
4557
  const dispatch = useUiDispatch();
4196
- const runtime = (0, import_react16.useThreadRuntime)();
4558
+ const runtime = (0, import_react19.useThreadRuntime)();
4197
4559
  const emit = useUiEventEmitter();
4198
- return (0, import_react14.useCallback)(
4560
+ return (0, import_react17.useCallback)(
4199
4561
  (actions) => {
4200
4562
  if (!actions) return;
4201
4563
  const list = Array.isArray(actions) ? actions : [actions];
@@ -4245,7 +4607,7 @@ var JUSTIFY_CLS = {
4245
4607
  };
4246
4608
  var BoxNode = ({ node }) => {
4247
4609
  const dir = node.direction ?? "col";
4248
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4610
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4249
4611
  "div",
4250
4612
  {
4251
4613
  className: cn(
@@ -4260,7 +4622,7 @@ var BoxNode = ({ node }) => {
4260
4622
  gap: node.gap !== void 0 ? `${node.gap * 0.25}rem` : void 0,
4261
4623
  padding: node.padding !== void 0 ? `${node.padding * 0.25}rem` : void 0
4262
4624
  },
4263
- children: node.children?.map((child, i) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(UiNodeView, { node: child }, child.id ?? i))
4625
+ children: node.children?.map((child, i) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(UiNodeView, { node: child }, child.id ?? i))
4264
4626
  }
4265
4627
  );
4266
4628
  };
@@ -4279,7 +4641,7 @@ var TEXT_WEIGHT = {
4279
4641
  var TextNode = ({ node }) => {
4280
4642
  const state = useUiState();
4281
4643
  const value = resolveBindable(node.value, state);
4282
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4644
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4283
4645
  "span",
4284
4646
  {
4285
4647
  className: cn(
@@ -4310,13 +4672,13 @@ var HeadingNode = ({ node }) => {
4310
4672
  );
4311
4673
  switch (level) {
4312
4674
  case 1:
4313
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("h1", { className: cls, children: value });
4675
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("h1", { className: cls, children: value });
4314
4676
  case 2:
4315
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("h2", { className: cls, children: value });
4677
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("h2", { className: cls, children: value });
4316
4678
  case 3:
4317
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("h3", { className: cls, children: value });
4679
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("h3", { className: cls, children: value });
4318
4680
  case 4:
4319
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("h4", { className: cls, children: value });
4681
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("h4", { className: cls, children: value });
4320
4682
  }
4321
4683
  };
4322
4684
  var BADGE_TONE = {
@@ -4329,7 +4691,7 @@ var BADGE_TONE = {
4329
4691
  var BadgeNode = ({ node }) => {
4330
4692
  const state = useUiState();
4331
4693
  const value = String(resolveBindable(node.value, state) ?? "");
4332
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4694
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4333
4695
  "span",
4334
4696
  {
4335
4697
  className: cn(
@@ -4346,7 +4708,7 @@ var ButtonNode = ({ node }) => {
4346
4708
  const run = useActionRunner();
4347
4709
  const label = String(resolveBindable(node.label, state) ?? "");
4348
4710
  const disabled = node.disabled !== void 0 ? Boolean(resolveBindable(node.disabled, state)) : false;
4349
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4711
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4350
4712
  Button,
4351
4713
  {
4352
4714
  variant: node.variant ?? "default",
@@ -4368,7 +4730,7 @@ var ToggleNode = ({ node }) => {
4368
4730
  dispatch({ type: "toggle", path: node.binding });
4369
4731
  run(node.onChange);
4370
4732
  };
4371
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
4733
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
4372
4734
  "label",
4373
4735
  {
4374
4736
  className: cn(
@@ -4376,7 +4738,7 @@ var ToggleNode = ({ node }) => {
4376
4738
  node.className
4377
4739
  ),
4378
4740
  children: [
4379
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4741
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4380
4742
  "button",
4381
4743
  {
4382
4744
  type: "button",
@@ -4387,7 +4749,7 @@ var ToggleNode = ({ node }) => {
4387
4749
  "relative inline-flex h-5 w-9 shrink-0 items-center rounded-full transition-[background,box-shadow,border-color] duration-200",
4388
4750
  value ? "border-foreground/15 bg-gradient-to-b from-primary-fill-from to-primary-fill-to shadow-card" : cn(TIMBAL_V2_SWITCH_TRACK_OFF, "hover:from-secondary-fill-hover-from hover:to-secondary-fill-hover-to")
4389
4751
  ),
4390
- children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4752
+ children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4391
4753
  "span",
4392
4754
  {
4393
4755
  className: cn(
@@ -4400,7 +4762,7 @@ var ToggleNode = ({ node }) => {
4400
4762
  )
4401
4763
  }
4402
4764
  ),
4403
- label && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-foreground/85", children: label })
4765
+ label && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "text-foreground/85", children: label })
4404
4766
  ]
4405
4767
  }
4406
4768
  );
@@ -4420,12 +4782,12 @@ var SliderNode = ({ node }) => {
4420
4782
  const next = Number(e.target.value);
4421
4783
  dispatch({ type: "set", path: node.binding, value: next });
4422
4784
  };
4423
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: cn("aui-ui-slider flex flex-col gap-1", node.className), children: [
4424
- (label || showValue) && /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex items-center justify-between text-xs text-muted-foreground", children: [
4425
- label && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { children: label }),
4426
- showValue && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "font-mono", children: value })
4785
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: cn("aui-ui-slider flex flex-col gap-1", node.className), children: [
4786
+ (label || showValue) && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-center justify-between text-xs text-muted-foreground", children: [
4787
+ label && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { children: label }),
4788
+ showValue && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "font-mono", children: value })
4427
4789
  ] }),
4428
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4790
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4429
4791
  "input",
4430
4792
  {
4431
4793
  type: "range",
@@ -4447,9 +4809,9 @@ var SliderNode = ({ node }) => {
4447
4809
  var TooltipNode = ({ node }) => {
4448
4810
  const state = useUiState();
4449
4811
  const content = String(resolveBindable(node.content, state) ?? "");
4450
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(Tooltip, { children: [
4451
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: cn("aui-ui-tooltip-trigger inline-flex", node.className), children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(UiNodeView, { node: node.child }) }) }),
4452
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TooltipContent, { side: node.side ?? "top", children: content })
4812
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Tooltip, { children: [
4813
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: cn("aui-ui-tooltip-trigger inline-flex", node.className), children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(UiNodeView, { node: node.child }) }) }),
4814
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TooltipContent, { side: node.side ?? "top", children: content })
4453
4815
  ] }) });
4454
4816
  };
4455
4817
  var DraggableNode = ({ node }) => {
@@ -4457,8 +4819,8 @@ var DraggableNode = ({ node }) => {
4457
4819
  const snapBack = node.snapBack ?? true;
4458
4820
  const axis = node.axis ?? "both";
4459
4821
  const dragProp = axis === "both" ? true : axis;
4460
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4461
- import_react15.motion.div,
4822
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4823
+ import_react18.motion.div,
4462
4824
  {
4463
4825
  drag: dragProp,
4464
4826
  dragMomentum: false,
@@ -4469,7 +4831,7 @@ var DraggableNode = ({ node }) => {
4469
4831
  "aui-ui-draggable inline-block cursor-grab touch-none",
4470
4832
  node.className
4471
4833
  ),
4472
- children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(UiNodeView, { node: node.child })
4834
+ children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(UiNodeView, { node: node.child })
4473
4835
  }
4474
4836
  );
4475
4837
  };
@@ -4479,8 +4841,8 @@ var CustomNode = ({ node }) => {
4479
4841
  const Renderer = registry[node.name];
4480
4842
  if (!Renderer) return null;
4481
4843
  const resolvedProps = resolveProps(node.props ?? {}, state);
4482
- const children = node.children?.map((child, i) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(UiNodeView, { node: child }, child.id ?? i));
4483
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Renderer, { props: resolvedProps, children });
4844
+ const children = node.children?.map((child, i) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(UiNodeView, { node: child }, child.id ?? i));
4845
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Renderer, { props: resolvedProps, children });
4484
4846
  };
4485
4847
  function resolveProps(props, state) {
4486
4848
  const out = {};
@@ -4491,17 +4853,17 @@ function resolveProps(props, state) {
4491
4853
  }
4492
4854
 
4493
4855
  // src/artifacts/ui/ui-artifact.tsx
4494
- var import_jsx_runtime33 = require("react/jsx-runtime");
4856
+ var import_jsx_runtime36 = require("react/jsx-runtime");
4495
4857
  var UiArtifactView = ({ artifact }) => {
4496
- const [state, dispatch] = (0, import_react17.useReducer)(
4858
+ const [state, dispatch] = (0, import_react20.useReducer)(
4497
4859
  uiStateReducer,
4498
4860
  artifact.initialState ?? {}
4499
4861
  );
4500
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ArtifactCard, { title: artifact.title, kind: "ui", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(UiStateProvider, { state, dispatch, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "aui-ui-root p-3", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(UiNodeView, { node: artifact.root }) }) }) });
4862
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ArtifactCard, { title: artifact.title, kind: "ui", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(UiStateProvider, { state, dispatch, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "aui-ui-root p-3", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(UiNodeView, { node: artifact.root }) }) }) });
4501
4863
  };
4502
4864
 
4503
4865
  // src/artifacts/registry.tsx
4504
- var import_jsx_runtime34 = require("react/jsx-runtime");
4866
+ var import_jsx_runtime37 = require("react/jsx-runtime");
4505
4867
  var defaultArtifactRenderers = {
4506
4868
  chart: ChartArtifactView,
4507
4869
  question: QuestionArtifactView,
@@ -4510,25 +4872,25 @@ var defaultArtifactRenderers = {
4510
4872
  table: TableArtifactView,
4511
4873
  ui: UiArtifactView
4512
4874
  };
4513
- var ArtifactRegistryContext = (0, import_react18.createContext)(
4875
+ var ArtifactRegistryContext = (0, import_react21.createContext)(
4514
4876
  defaultArtifactRenderers
4515
4877
  );
4516
4878
  var ArtifactRegistryProvider = ({ renderers, override, children }) => {
4517
- const merged = (0, import_react18.useMemo)(() => {
4879
+ const merged = (0, import_react21.useMemo)(() => {
4518
4880
  if (!renderers) return defaultArtifactRenderers;
4519
4881
  if (override) return renderers;
4520
4882
  return { ...defaultArtifactRenderers, ...renderers };
4521
4883
  }, [renderers, override]);
4522
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ArtifactRegistryContext.Provider, { value: merged, children });
4884
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ArtifactRegistryContext.Provider, { value: merged, children });
4523
4885
  };
4524
4886
  function useArtifactRegistry() {
4525
- return (0, import_react18.useContext)(ArtifactRegistryContext);
4887
+ return (0, import_react21.useContext)(ArtifactRegistryContext);
4526
4888
  }
4527
4889
  var ArtifactView = ({ artifact }) => {
4528
4890
  const registry = useArtifactRegistry();
4529
4891
  const Renderer = registry[artifact.type] ?? registry.json;
4530
4892
  if (!Renderer) return null;
4531
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Renderer, { artifact });
4893
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Renderer, { artifact });
4532
4894
  };
4533
4895
 
4534
4896
  // src/artifacts/types.ts
@@ -4609,7 +4971,7 @@ var import_c = __toESM(require("shiki/langs/c.mjs"), 1);
4609
4971
  var import_cpp = __toESM(require("shiki/langs/cpp.mjs"), 1);
4610
4972
  var import_vitesse_dark = __toESM(require("shiki/themes/vitesse-dark.mjs"), 1);
4611
4973
  var import_vitesse_light = __toESM(require("shiki/themes/vitesse-light.mjs"), 1);
4612
- var import_jsx_runtime35 = require("react/jsx-runtime");
4974
+ var import_jsx_runtime38 = require("react/jsx-runtime");
4613
4975
  var SHIKI_THEME_DARK = "vitesse-dark";
4614
4976
  var SHIKI_THEME_LIGHT = "vitesse-light";
4615
4977
  var highlighterPromise = null;
@@ -4647,8 +5009,8 @@ var ShikiSyntaxHighlighter = ({
4647
5009
  language,
4648
5010
  code
4649
5011
  }) => {
4650
- const [html, setHtml] = (0, import_react19.useState)(null);
4651
- (0, import_react19.useEffect)(() => {
5012
+ const [html, setHtml] = (0, import_react22.useState)(null);
5013
+ (0, import_react22.useEffect)(() => {
4652
5014
  let cancelled = false;
4653
5015
  (async () => {
4654
5016
  try {
@@ -4678,13 +5040,13 @@ var ShikiSyntaxHighlighter = ({
4678
5040
  try {
4679
5041
  const parsed = JSON.parse(code);
4680
5042
  if (isArtifact(parsed)) {
4681
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ArtifactView, { artifact: parsed });
5043
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ArtifactView, { artifact: parsed });
4682
5044
  }
4683
5045
  } catch {
4684
5046
  }
4685
5047
  }
4686
5048
  if (html) {
4687
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
5049
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
4688
5050
  "div",
4689
5051
  {
4690
5052
  className: "shiki-wrapper [&>pre]:!m-0 [&>pre]:!rounded-t-none [&>pre]:!rounded-b-lg [&>pre]:!border [&>pre]:!border-t-0 [&>pre]:!border-border/50 [&>pre]:!p-3 [&>pre]:!text-xs [&>pre]:!leading-relaxed [&>pre]:overflow-x-auto",
@@ -4692,14 +5054,14 @@ var ShikiSyntaxHighlighter = ({
4692
5054
  }
4693
5055
  );
4694
5056
  }
4695
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Pre, { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Code2, { children: code }) });
5057
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Pre, { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Code2, { children: code }) });
4696
5058
  };
4697
5059
  var syntax_highlighter_default = ShikiSyntaxHighlighter;
4698
5060
 
4699
5061
  // src/chat/markdown-text.tsx
4700
- var import_jsx_runtime36 = require("react/jsx-runtime");
5062
+ var import_jsx_runtime39 = require("react/jsx-runtime");
4701
5063
  var MarkdownTextImpl = () => {
4702
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
5064
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4703
5065
  import_react_markdown.MarkdownTextPrimitive,
4704
5066
  {
4705
5067
  remarkPlugins: [import_remark_gfm.default, import_remark_math.default],
@@ -4712,7 +5074,7 @@ var MarkdownTextImpl = () => {
4712
5074
  }
4713
5075
  );
4714
5076
  };
4715
- var MarkdownText = (0, import_react20.memo)(MarkdownTextImpl);
5077
+ var MarkdownText = (0, import_react23.memo)(MarkdownTextImpl);
4716
5078
  var CodeHeader = ({ language, code }) => {
4717
5079
  const { isCopied, copyToClipboard } = useCopyToClipboard();
4718
5080
  if (isArtifactFenceLanguage(language)) return null;
@@ -4720,20 +5082,20 @@ var CodeHeader = ({ language, code }) => {
4720
5082
  if (!code || isCopied) return;
4721
5083
  copyToClipboard(code);
4722
5084
  };
4723
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "aui-code-header flex items-center justify-between rounded-t-lg border border-b-0 border-border/50 bg-code-header-bg px-4 py-2", children: [
4724
- /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("span", { className: "flex items-center gap-2 text-xs font-semibold tracking-wide text-muted-foreground/80 uppercase", children: [
4725
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "inline-block h-2 w-2 rounded-full bg-primary/40" }),
5085
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "aui-code-header flex items-center justify-between rounded-t-lg border border-b-0 border-border/50 bg-code-header-bg px-4 py-2", children: [
5086
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("span", { className: "flex items-center gap-2 text-xs font-semibold tracking-wide text-muted-foreground/80 uppercase", children: [
5087
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "inline-block h-2 w-2 rounded-full bg-primary/40" }),
4726
5088
  language
4727
5089
  ] }),
4728
- /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
5090
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
4729
5091
  TooltipIconButton,
4730
5092
  {
4731
5093
  tooltip: isCopied ? "Copied!" : "Copy",
4732
5094
  onClick: onCopy,
4733
5095
  className: "transition-colors hover:text-foreground",
4734
5096
  children: [
4735
- !isCopied && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react5.CopyIcon, { className: "h-3.5 w-3.5" }),
4736
- isCopied && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react5.CheckIcon, { className: "h-3.5 w-3.5 text-emerald-500" })
5097
+ !isCopied && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react5.CopyIcon, { className: "h-3.5 w-3.5" }),
5098
+ isCopied && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react5.CheckIcon, { className: "h-3.5 w-3.5 text-emerald-500" })
4737
5099
  ]
4738
5100
  }
4739
5101
  )
@@ -4742,7 +5104,7 @@ var CodeHeader = ({ language, code }) => {
4742
5104
  var useCopyToClipboard = ({
4743
5105
  copiedDuration = 3e3
4744
5106
  } = {}) => {
4745
- const [isCopied, setIsCopied] = (0, import_react20.useState)(false);
5107
+ const [isCopied, setIsCopied] = (0, import_react23.useState)(false);
4746
5108
  const copyToClipboard = (value) => {
4747
5109
  if (!value) return;
4748
5110
  navigator.clipboard.writeText(value).then(() => {
@@ -4753,7 +5115,7 @@ var useCopyToClipboard = ({
4753
5115
  return { isCopied, copyToClipboard };
4754
5116
  };
4755
5117
  var defaultComponents = (0, import_react_markdown.unstable_memoizeMarkdownComponents)({
4756
- h1: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
5118
+ h1: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4757
5119
  "h1",
4758
5120
  {
4759
5121
  className: cn(
@@ -4763,7 +5125,7 @@ var defaultComponents = (0, import_react_markdown.unstable_memoizeMarkdownCompon
4763
5125
  ...props
4764
5126
  }
4765
5127
  ),
4766
- h2: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
5128
+ h2: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4767
5129
  "h2",
4768
5130
  {
4769
5131
  className: cn(
@@ -4773,7 +5135,7 @@ var defaultComponents = (0, import_react_markdown.unstable_memoizeMarkdownCompon
4773
5135
  ...props
4774
5136
  }
4775
5137
  ),
4776
- h3: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
5138
+ h3: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4777
5139
  "h3",
4778
5140
  {
4779
5141
  className: cn(
@@ -4783,7 +5145,7 @@ var defaultComponents = (0, import_react_markdown.unstable_memoizeMarkdownCompon
4783
5145
  ...props
4784
5146
  }
4785
5147
  ),
4786
- h4: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
5148
+ h4: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4787
5149
  "h4",
4788
5150
  {
4789
5151
  className: cn(
@@ -4793,7 +5155,7 @@ var defaultComponents = (0, import_react_markdown.unstable_memoizeMarkdownCompon
4793
5155
  ...props
4794
5156
  }
4795
5157
  ),
4796
- h5: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
5158
+ h5: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4797
5159
  "h5",
4798
5160
  {
4799
5161
  className: cn(
@@ -4803,7 +5165,7 @@ var defaultComponents = (0, import_react_markdown.unstable_memoizeMarkdownCompon
4803
5165
  ...props
4804
5166
  }
4805
5167
  ),
4806
- h6: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
5168
+ h6: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4807
5169
  "h6",
4808
5170
  {
4809
5171
  className: cn(
@@ -4813,7 +5175,7 @@ var defaultComponents = (0, import_react_markdown.unstable_memoizeMarkdownCompon
4813
5175
  ...props
4814
5176
  }
4815
5177
  ),
4816
- p: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
5178
+ p: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4817
5179
  "p",
4818
5180
  {
4819
5181
  className: cn(
@@ -4823,7 +5185,7 @@ var defaultComponents = (0, import_react_markdown.unstable_memoizeMarkdownCompon
4823
5185
  ...props
4824
5186
  }
4825
5187
  ),
4826
- a: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
5188
+ a: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4827
5189
  "a",
4828
5190
  {
4829
5191
  className: cn(
@@ -4835,7 +5197,7 @@ var defaultComponents = (0, import_react_markdown.unstable_memoizeMarkdownCompon
4835
5197
  ...props
4836
5198
  }
4837
5199
  ),
4838
- blockquote: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
5200
+ blockquote: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4839
5201
  "blockquote",
4840
5202
  {
4841
5203
  className: cn(
@@ -4845,7 +5207,7 @@ var defaultComponents = (0, import_react_markdown.unstable_memoizeMarkdownCompon
4845
5207
  ...props
4846
5208
  }
4847
5209
  ),
4848
- ul: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
5210
+ ul: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4849
5211
  "ul",
4850
5212
  {
4851
5213
  className: cn(
@@ -4855,7 +5217,7 @@ var defaultComponents = (0, import_react_markdown.unstable_memoizeMarkdownCompon
4855
5217
  ...props
4856
5218
  }
4857
5219
  ),
4858
- ol: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
5220
+ ol: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4859
5221
  "ol",
4860
5222
  {
4861
5223
  className: cn(
@@ -4865,7 +5227,7 @@ var defaultComponents = (0, import_react_markdown.unstable_memoizeMarkdownCompon
4865
5227
  ...props
4866
5228
  }
4867
5229
  ),
4868
- hr: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
5230
+ hr: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4869
5231
  "hr",
4870
5232
  {
4871
5233
  className: cn(
@@ -4875,14 +5237,14 @@ var defaultComponents = (0, import_react_markdown.unstable_memoizeMarkdownCompon
4875
5237
  ...props
4876
5238
  }
4877
5239
  ),
4878
- table: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "my-4 w-full overflow-x-auto rounded-lg border border-border/50", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
5240
+ table: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "my-4 w-full overflow-x-auto rounded-lg border border-border/50", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4879
5241
  "table",
4880
5242
  {
4881
5243
  className: cn("aui-md-table w-full border-collapse text-sm", className),
4882
5244
  ...props
4883
5245
  }
4884
5246
  ) }),
4885
- th: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
5247
+ th: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4886
5248
  "th",
4887
5249
  {
4888
5250
  className: cn(
@@ -4892,7 +5254,7 @@ var defaultComponents = (0, import_react_markdown.unstable_memoizeMarkdownCompon
4892
5254
  ...props
4893
5255
  }
4894
5256
  ),
4895
- td: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
5257
+ td: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4896
5258
  "td",
4897
5259
  {
4898
5260
  className: cn(
@@ -4902,7 +5264,7 @@ var defaultComponents = (0, import_react_markdown.unstable_memoizeMarkdownCompon
4902
5264
  ...props
4903
5265
  }
4904
5266
  ),
4905
- tr: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
5267
+ tr: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4906
5268
  "tr",
4907
5269
  {
4908
5270
  className: cn(
@@ -4912,8 +5274,8 @@ var defaultComponents = (0, import_react_markdown.unstable_memoizeMarkdownCompon
4912
5274
  ...props
4913
5275
  }
4914
5276
  ),
4915
- li: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("li", { className: cn("aui-md-li leading-[1.7]", className), ...props }),
4916
- sup: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
5277
+ li: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("li", { className: cn("aui-md-li leading-[1.7]", className), ...props }),
5278
+ sup: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4917
5279
  "sup",
4918
5280
  {
4919
5281
  className: cn(
@@ -4923,7 +5285,7 @@ var defaultComponents = (0, import_react_markdown.unstable_memoizeMarkdownCompon
4923
5285
  ...props
4924
5286
  }
4925
5287
  ),
4926
- pre: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
5288
+ pre: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4927
5289
  "pre",
4928
5290
  {
4929
5291
  className: cn(
@@ -4935,7 +5297,7 @@ var defaultComponents = (0, import_react_markdown.unstable_memoizeMarkdownCompon
4935
5297
  ),
4936
5298
  code: function Code({ className, ...props }) {
4937
5299
  const isCodeBlock = (0, import_react_markdown.useIsMarkdownCodeBlock)();
4938
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
5300
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4939
5301
  "code",
4940
5302
  {
4941
5303
  className: cn(
@@ -4946,20 +5308,20 @@ var defaultComponents = (0, import_react_markdown.unstable_memoizeMarkdownCompon
4946
5308
  }
4947
5309
  );
4948
5310
  },
4949
- strong: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("strong", { className: cn("font-semibold text-foreground", className), ...props }),
4950
- em: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("em", { className: cn("italic", className), ...props }),
5311
+ strong: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("strong", { className: cn("font-semibold text-foreground", className), ...props }),
5312
+ em: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("em", { className: cn("italic", className), ...props }),
4951
5313
  CodeHeader
4952
5314
  });
4953
5315
 
4954
5316
  // src/chat/tool-fallback.tsx
4955
- var import_react27 = require("react");
5317
+ var import_react30 = require("react");
4956
5318
  var import_lucide_react6 = require("lucide-react");
4957
- var import_react28 = require("@assistant-ui/react");
5319
+ var import_react31 = require("@assistant-ui/react");
4958
5320
 
4959
5321
  // src/ui/shimmer.tsx
4960
- var import_react21 = require("motion/react");
4961
- var import_react22 = require("react");
4962
- var import_jsx_runtime37 = require("react/jsx-runtime");
5322
+ var import_react24 = require("motion/react");
5323
+ var import_react25 = require("react");
5324
+ var import_jsx_runtime40 = require("react/jsx-runtime");
4963
5325
  var ShimmerComponent = ({
4964
5326
  children,
4965
5327
  as: Component = "p",
@@ -4967,14 +5329,14 @@ var ShimmerComponent = ({
4967
5329
  duration = 2,
4968
5330
  spread = 2
4969
5331
  }) => {
4970
- const MotionComponent = import_react21.motion.create(
5332
+ const MotionComponent = import_react24.motion.create(
4971
5333
  Component
4972
5334
  );
4973
- const dynamicSpread = (0, import_react22.useMemo)(
5335
+ const dynamicSpread = (0, import_react25.useMemo)(
4974
5336
  () => (children?.length ?? 0) * spread,
4975
5337
  [children, spread]
4976
5338
  );
4977
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
5339
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
4978
5340
  MotionComponent,
4979
5341
  {
4980
5342
  animate: { backgroundPosition: "0% center" },
@@ -4997,11 +5359,11 @@ var ShimmerComponent = ({
4997
5359
  }
4998
5360
  );
4999
5361
  };
5000
- var Shimmer = (0, import_react22.memo)(ShimmerComponent);
5362
+ var Shimmer = (0, import_react25.memo)(ShimmerComponent);
5001
5363
 
5002
5364
  // src/chat/motion.tsx
5003
- var import_react23 = require("motion/react");
5004
- var import_jsx_runtime38 = require("react/jsx-runtime");
5365
+ var import_react26 = require("motion/react");
5366
+ var import_jsx_runtime41 = require("react/jsx-runtime");
5005
5367
  var luxuryEase = [0.16, 1, 0.3, 1];
5006
5368
  var TOOL_ENTER_MS = 0.78;
5007
5369
  var TOOL_EXIT_MS = 0.28;
@@ -5027,10 +5389,10 @@ function toolMotionState(reduced, entering, variant) {
5027
5389
  return entering ? { opacity: 0, y: 14, filter: "blur(10px)" } : { opacity: 1, y: 0, filter: "blur(0px)" };
5028
5390
  }
5029
5391
  function ToolMotion({ children, className, motionKey }) {
5030
- const reduced = (0, import_react23.useReducedMotion)() ?? false;
5392
+ const reduced = (0, import_react26.useReducedMotion)() ?? false;
5031
5393
  const { enter, exit } = toolPresenceTransition(reduced);
5032
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
5033
- import_react23.motion.div,
5394
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
5395
+ import_react26.motion.div,
5034
5396
  {
5035
5397
  className: cn("aui-tool-motion w-full min-w-0", className),
5036
5398
  initial: toolMotionState(reduced, true, "settled"),
@@ -5049,11 +5411,11 @@ function ToolPresence({
5049
5411
  className,
5050
5412
  variant = "settled"
5051
5413
  }) {
5052
- const reduced = (0, import_react23.useReducedMotion)() ?? false;
5414
+ const reduced = (0, import_react26.useReducedMotion)() ?? false;
5053
5415
  const { enter, exit } = toolPresenceTransition(reduced);
5054
5416
  const enterTransition = variant === "executing" ? { duration: reduced ? 0.3 : 0.52, ease: luxuryEase } : enter;
5055
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react23.AnimatePresence, { mode: "wait", initial: true, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
5056
- import_react23.motion.div,
5417
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react26.AnimatePresence, { mode: "wait", initial: true, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
5418
+ import_react26.motion.div,
5057
5419
  {
5058
5420
  className: cn("aui-tool-presence w-full min-w-0", className),
5059
5421
  initial: toolMotionState(reduced, true, variant),
@@ -5073,8 +5435,8 @@ function ToolBodyPresence({
5073
5435
  children,
5074
5436
  className
5075
5437
  }) {
5076
- const reduced = (0, import_react23.useReducedMotion)() ?? false;
5077
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
5438
+ const reduced = (0, import_react26.useReducedMotion)() ?? false;
5439
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
5078
5440
  "div",
5079
5441
  {
5080
5442
  className: cn(
@@ -5082,7 +5444,7 @@ function ToolBodyPresence({
5082
5444
  open ? reduced ? "duration-200 ease-out" : "duration-[340ms] ease-[cubic-bezier(0.16,1,0.3,1)]" : reduced ? "duration-150 ease-[cubic-bezier(0.4,0,0.2,1)]" : "duration-200 ease-[cubic-bezier(0.4,0,0.2,1)]"
5083
5445
  ),
5084
5446
  style: { gridTemplateRows: open ? "1fr" : "0fr" },
5085
- children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "min-h-0 overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
5447
+ children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "min-h-0 overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
5086
5448
  "div",
5087
5449
  {
5088
5450
  className: cn(
@@ -5098,8 +5460,8 @@ function ToolBodyPresence({
5098
5460
  }
5099
5461
 
5100
5462
  // src/runtime/provider.tsx
5101
- var import_react25 = require("react");
5102
- var import_react26 = require("@assistant-ui/react");
5463
+ var import_react28 = require("react");
5464
+ var import_react29 = require("@assistant-ui/react");
5103
5465
  var import_timbal_sdk = require("@timbal-ai/timbal-sdk");
5104
5466
 
5105
5467
  // src/auth/tokens.ts
@@ -5514,17 +5876,17 @@ function buildPromptBody({
5514
5876
  }
5515
5877
 
5516
5878
  // src/runtime/attachments-context.tsx
5517
- var import_react24 = require("react");
5518
- var import_jsx_runtime39 = require("react/jsx-runtime");
5519
- var TimbalAttachmentsEnabledContext = (0, import_react24.createContext)(false);
5879
+ var import_react27 = require("react");
5880
+ var import_jsx_runtime42 = require("react/jsx-runtime");
5881
+ var TimbalAttachmentsEnabledContext = (0, import_react27.createContext)(false);
5520
5882
  function TimbalAttachmentsEnabledProvider({
5521
5883
  enabled,
5522
5884
  children
5523
5885
  }) {
5524
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(TimbalAttachmentsEnabledContext.Provider, { value: enabled, children });
5886
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(TimbalAttachmentsEnabledContext.Provider, { value: enabled, children });
5525
5887
  }
5526
5888
  function useTimbalAttachmentsEnabled() {
5527
- return (0, import_react24.useContext)(TimbalAttachmentsEnabledContext);
5889
+ return (0, import_react27.useContext)(TimbalAttachmentsEnabledContext);
5528
5890
  }
5529
5891
 
5530
5892
  // src/runtime/upload-adapter.ts
@@ -5633,7 +5995,7 @@ function resolveAttachmentAdapter(attachments, options = {}) {
5633
5995
  }
5634
5996
 
5635
5997
  // src/runtime/provider.tsx
5636
- var import_jsx_runtime40 = require("react/jsx-runtime");
5998
+ var import_jsx_runtime43 = require("react/jsx-runtime");
5637
5999
  function projectAttachment(attachment) {
5638
6000
  const filename = attachment.name ?? "attachment";
5639
6001
  const mimeType = attachment.contentType ?? "application/octet-stream";
@@ -5698,22 +6060,22 @@ function useTimbalStream({
5698
6060
  fetch: fetchFn,
5699
6061
  debug = false
5700
6062
  }) {
5701
- const [messages, setMessages] = (0, import_react25.useState)([]);
5702
- const [isRunning, setIsRunning] = (0, import_react25.useState)(false);
5703
- const abortRef = (0, import_react25.useRef)(null);
5704
- const messagesRef = (0, import_react25.useRef)([]);
5705
- const fetchFnRef = (0, import_react25.useRef)(fetchFn ?? authFetch);
5706
- (0, import_react25.useEffect)(() => {
6063
+ const [messages, setMessages] = (0, import_react28.useState)([]);
6064
+ const [isRunning, setIsRunning] = (0, import_react28.useState)(false);
6065
+ const abortRef = (0, import_react28.useRef)(null);
6066
+ const messagesRef = (0, import_react28.useRef)([]);
6067
+ const fetchFnRef = (0, import_react28.useRef)(fetchFn ?? authFetch);
6068
+ (0, import_react28.useEffect)(() => {
5707
6069
  fetchFnRef.current = fetchFn ?? authFetch;
5708
6070
  }, [fetchFn]);
5709
- const debugRef = (0, import_react25.useRef)(debug);
5710
- (0, import_react25.useEffect)(() => {
6071
+ const debugRef = (0, import_react28.useRef)(debug);
6072
+ (0, import_react28.useEffect)(() => {
5711
6073
  debugRef.current = debug;
5712
6074
  }, [debug]);
5713
- (0, import_react25.useEffect)(() => {
6075
+ (0, import_react28.useEffect)(() => {
5714
6076
  messagesRef.current = messages;
5715
6077
  }, [messages]);
5716
- const streamAssistantResponse = (0, import_react25.useCallback)(
6078
+ const streamAssistantResponse = (0, import_react28.useCallback)(
5717
6079
  async (input, attachments, userId, assistantId, parentId, signal) => {
5718
6080
  const state = createReducerState();
5719
6081
  const flush = () => {
@@ -5792,7 +6154,7 @@ function useTimbalStream({
5792
6154
  },
5793
6155
  [workforceId, baseUrl]
5794
6156
  );
5795
- const send = (0, import_react25.useCallback)(
6157
+ const send = (0, import_react28.useCallback)(
5796
6158
  async (input, options) => {
5797
6159
  const userId = crypto.randomUUID();
5798
6160
  const assistantId = crypto.randomUUID();
@@ -5823,7 +6185,7 @@ function useTimbalStream({
5823
6185
  },
5824
6186
  [streamAssistantResponse]
5825
6187
  );
5826
- const reload = (0, import_react25.useCallback)(
6188
+ const reload = (0, import_react28.useCallback)(
5827
6189
  async (messageId) => {
5828
6190
  const current = messagesRef.current;
5829
6191
  const idx = messageId ? current.findIndex((m) => m.id === messageId) : current.length - 2;
@@ -5852,14 +6214,14 @@ function useTimbalStream({
5852
6214
  },
5853
6215
  [streamAssistantResponse]
5854
6216
  );
5855
- const cancel = (0, import_react25.useCallback)(() => {
6217
+ const cancel = (0, import_react28.useCallback)(() => {
5856
6218
  abortRef.current?.abort();
5857
6219
  }, []);
5858
- const clear = (0, import_react25.useCallback)(() => {
6220
+ const clear = (0, import_react28.useCallback)(() => {
5859
6221
  abortRef.current?.abort();
5860
6222
  setMessages([]);
5861
6223
  }, []);
5862
- return (0, import_react25.useMemo)(
6224
+ return (0, import_react28.useMemo)(
5863
6225
  () => ({ messages, isRunning, send, reload, cancel, clear }),
5864
6226
  [messages, isRunning, send, reload, cancel, clear]
5865
6227
  );
@@ -5870,9 +6232,9 @@ function readTopLevelStartRunId(event) {
5870
6232
  }
5871
6233
  return null;
5872
6234
  }
5873
- var TimbalStreamContext = (0, import_react25.createContext)(null);
6235
+ var TimbalStreamContext = (0, import_react28.createContext)(null);
5874
6236
  function useTimbalRuntime() {
5875
- const ctx = (0, import_react25.useContext)(TimbalStreamContext);
6237
+ const ctx = (0, import_react28.useContext)(TimbalStreamContext);
5876
6238
  if (!ctx) {
5877
6239
  throw new Error(
5878
6240
  "useTimbalRuntime must be used inside a <TimbalRuntimeProvider>."
@@ -5896,7 +6258,7 @@ function TimbalRuntimeProvider({
5896
6258
  fetch: fetchFn,
5897
6259
  debug
5898
6260
  });
5899
- const attachmentAdapter = (0, import_react25.useMemo)(
6261
+ const attachmentAdapter = (0, import_react28.useMemo)(
5900
6262
  () => resolveAttachmentAdapter(attachments, {
5901
6263
  baseUrl,
5902
6264
  fetch: fetchFn,
@@ -5905,7 +6267,7 @@ function TimbalRuntimeProvider({
5905
6267
  }),
5906
6268
  [attachments, attachmentsUploadUrl, attachmentsAccept, baseUrl, fetchFn]
5907
6269
  );
5908
- const onNew = (0, import_react25.useCallback)(
6270
+ const onNew = (0, import_react28.useCallback)(
5909
6271
  async (message) => {
5910
6272
  const textPart = message.content.find((c) => c.type === "text");
5911
6273
  const input = textPart && textPart.type === "text" ? textPart.text : "";
@@ -5920,16 +6282,16 @@ function TimbalRuntimeProvider({
5920
6282
  },
5921
6283
  [stream]
5922
6284
  );
5923
- const onReload = (0, import_react25.useCallback)(
6285
+ const onReload = (0, import_react28.useCallback)(
5924
6286
  async (messageId) => {
5925
6287
  await stream.reload(messageId);
5926
6288
  },
5927
6289
  [stream]
5928
6290
  );
5929
- const onCancel = (0, import_react25.useCallback)(async () => {
6291
+ const onCancel = (0, import_react28.useCallback)(async () => {
5930
6292
  stream.cancel();
5931
6293
  }, [stream]);
5932
- const runtime = (0, import_react26.useExternalStoreRuntime)({
6294
+ const runtime = (0, import_react29.useExternalStoreRuntime)({
5933
6295
  isRunning: stream.isRunning,
5934
6296
  messages: stream.messages,
5935
6297
  convertMessage,
@@ -5939,7 +6301,7 @@ function TimbalRuntimeProvider({
5939
6301
  onCancel,
5940
6302
  ...attachmentAdapter ? { adapters: { attachments: attachmentAdapter } } : {}
5941
6303
  });
5942
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(TimbalStreamContext.Provider, { value: stream, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(TimbalAttachmentsEnabledProvider, { enabled: attachmentAdapter !== void 0, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react26.AssistantRuntimeProvider, { runtime, children }) }) });
6304
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(TimbalStreamContext.Provider, { value: stream, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(TimbalAttachmentsEnabledProvider, { enabled: attachmentAdapter !== void 0, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react29.AssistantRuntimeProvider, { runtime, children }) }) });
5943
6305
  }
5944
6306
  function findParentIdFromAuiParent(messages, auiParentId) {
5945
6307
  const idx = messages.findIndex((m) => m.id === auiParentId);
@@ -5948,7 +6310,7 @@ function findParentIdFromAuiParent(messages, auiParentId) {
5948
6310
  }
5949
6311
 
5950
6312
  // src/chat/tool-fallback.tsx
5951
- var import_jsx_runtime41 = require("react/jsx-runtime");
6313
+ var import_jsx_runtime44 = require("react/jsx-runtime");
5952
6314
  function detectRunning({
5953
6315
  status,
5954
6316
  result,
@@ -5962,7 +6324,7 @@ function detectRunning({
5962
6324
  }
5963
6325
  function useToolRunning(props) {
5964
6326
  const { isRunning: streamRunning } = useTimbalRuntime();
5965
- const partStatus = (0, import_react28.useAuiState)((s) => s.part.status);
6327
+ const partStatus = (0, import_react31.useAuiState)((s) => s.part.status);
5966
6328
  return detectRunning({
5967
6329
  status: partStatus ?? props.status,
5968
6330
  result: props.result,
@@ -5980,8 +6342,8 @@ function formatToolResult(result) {
5980
6342
  return String(result);
5981
6343
  }
5982
6344
  }
5983
- var TimelineActionLabel = ({ action, detail, shimmer = false }) => /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("span", { className: "inline-flex min-w-0 max-w-full items-baseline gap-1", children: [
5984
- action ? shimmer ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6345
+ var TimelineActionLabel = ({ action, detail, shimmer = false }) => /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("span", { className: "inline-flex min-w-0 max-w-full items-baseline gap-1", children: [
6346
+ action ? shimmer ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
5985
6347
  Shimmer,
5986
6348
  {
5987
6349
  as: "span",
@@ -5990,10 +6352,10 @@ var TimelineActionLabel = ({ action, detail, shimmer = false }) => /* @__PURE__
5990
6352
  spread: 2.5,
5991
6353
  children: action
5992
6354
  }
5993
- ) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: studioTimelineActionClass, children: action }) : null,
5994
- detail ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: studioTimelineDetailClass, children: detail }) : null
6355
+ ) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: studioTimelineActionClass, children: action }) : null,
6356
+ detail ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: studioTimelineDetailClass, children: detail }) : null
5995
6357
  ] });
5996
- var TimelineHoverChevron = ({ expanded }) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6358
+ var TimelineHoverChevron = ({ expanded }) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
5997
6359
  import_lucide_react6.ChevronRightIcon,
5998
6360
  {
5999
6361
  className: studioTimelineChevronClass(expanded),
@@ -6001,9 +6363,9 @@ var TimelineHoverChevron = ({ expanded }) => /* @__PURE__ */ (0, import_jsx_runt
6001
6363
  }
6002
6364
  );
6003
6365
  var ToolPanel = ({ toolName, argsText, result, isError }) => {
6004
- const [open, setOpen] = (0, import_react27.useState)(false);
6366
+ const [open, setOpen] = (0, import_react30.useState)(false);
6005
6367
  const detail = formatToolLabel(toolName);
6006
- const formattedArgs = (0, import_react27.useMemo)(() => {
6368
+ const formattedArgs = (0, import_react30.useMemo)(() => {
6007
6369
  if (!argsText || argsText === "{}") return null;
6008
6370
  try {
6009
6371
  return JSON.stringify(JSON.parse(argsText), null, 2);
@@ -6011,17 +6373,17 @@ var ToolPanel = ({ toolName, argsText, result, isError }) => {
6011
6373
  return argsText;
6012
6374
  }
6013
6375
  }, [argsText]);
6014
- const formattedResult = (0, import_react27.useMemo)(() => {
6376
+ const formattedResult = (0, import_react30.useMemo)(() => {
6015
6377
  if (result === void 0 || result === null) return null;
6016
6378
  return formatToolResult(result);
6017
6379
  }, [result]);
6018
6380
  const hasBody = Boolean(formattedArgs || formattedResult);
6019
6381
  const action = isError ? "Failed" : "Used";
6020
6382
  if (!hasBody) {
6021
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "aui-tool-row w-full min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TimelineActionLabel, { action, detail }) });
6383
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "aui-tool-row w-full min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(TimelineActionLabel, { action, detail }) });
6022
6384
  }
6023
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "aui-tool-row w-full min-w-0", children: [
6024
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6385
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "aui-tool-row w-full min-w-0", children: [
6386
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
6025
6387
  "button",
6026
6388
  {
6027
6389
  type: "button",
@@ -6029,7 +6391,7 @@ var ToolPanel = ({ toolName, argsText, result, isError }) => {
6029
6391
  "aria-expanded": open,
6030
6392
  "aria-label": `${action} ${detail}`,
6031
6393
  className: studioTimelineRowButtonClass,
6032
- children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
6394
+ children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
6033
6395
  "span",
6034
6396
  {
6035
6397
  className: cn(
@@ -6038,37 +6400,37 @@ var ToolPanel = ({ toolName, argsText, result, isError }) => {
6038
6400
  "text-foreground"
6039
6401
  ),
6040
6402
  children: [
6041
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TimelineActionLabel, { action, detail }),
6042
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TimelineHoverChevron, { expanded: open })
6403
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(TimelineActionLabel, { action, detail }),
6404
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(TimelineHoverChevron, { expanded: open })
6043
6405
  ]
6044
6406
  }
6045
6407
  )
6046
6408
  }
6047
6409
  ),
6048
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
6410
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
6049
6411
  ToolBodyPresence,
6050
6412
  {
6051
6413
  open,
6052
6414
  className: cn(studioTimelineBodyPadClass, "gap-2"),
6053
6415
  children: [
6054
- formattedArgs ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6416
+ formattedArgs ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
6055
6417
  "div",
6056
6418
  {
6057
6419
  className: cn(
6058
6420
  studioComposerIoWellClass,
6059
6421
  "max-h-48 overflow-auto px-2.5 py-2"
6060
6422
  ),
6061
- children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("pre", { className: "whitespace-pre-wrap break-words font-mono text-[11px] font-normal leading-relaxed text-foreground", children: formattedArgs })
6423
+ children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("pre", { className: "whitespace-pre-wrap break-words font-mono text-[11px] font-normal leading-relaxed text-foreground", children: formattedArgs })
6062
6424
  }
6063
6425
  ) : null,
6064
- formattedResult ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6426
+ formattedResult ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
6065
6427
  "div",
6066
6428
  {
6067
6429
  className: cn(
6068
6430
  studioComposerIoWellClass,
6069
6431
  "max-h-48 overflow-auto px-2.5 py-2"
6070
6432
  ),
6071
- children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("pre", { className: "whitespace-pre-wrap break-words font-mono text-[11px] font-normal leading-relaxed text-foreground", children: formattedResult })
6433
+ children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("pre", { className: "whitespace-pre-wrap break-words font-mono text-[11px] font-normal leading-relaxed text-foreground", children: formattedResult })
6072
6434
  }
6073
6435
  ) : null
6074
6436
  ]
@@ -6085,20 +6447,20 @@ var ToolFallbackImpl = ({
6085
6447
  const isRunning = useToolRunning({ status, result });
6086
6448
  const isError = status?.type === "incomplete" && status.reason !== "cancelled";
6087
6449
  const presenceKey = isRunning ? "running" : isError ? "error" : "complete";
6088
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6450
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
6089
6451
  ToolPresence,
6090
6452
  {
6091
6453
  presenceKey,
6092
6454
  variant: isRunning ? "executing" : "settled",
6093
6455
  className: "py-0.5",
6094
- children: isRunning ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "aui-tool-running", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6456
+ children: isRunning ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "aui-tool-running", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
6095
6457
  TimelineActionLabel,
6096
6458
  {
6097
6459
  action: "Using",
6098
6460
  detail: formatToolLabel(toolName),
6099
6461
  shimmer: true
6100
6462
  }
6101
- ) }) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6463
+ ) }) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
6102
6464
  ToolPanel,
6103
6465
  {
6104
6466
  toolName,
@@ -6110,13 +6472,13 @@ var ToolFallbackImpl = ({
6110
6472
  }
6111
6473
  );
6112
6474
  };
6113
- var ToolFallback = (0, import_react27.memo)(
6475
+ var ToolFallback = (0, import_react30.memo)(
6114
6476
  ToolFallbackImpl
6115
6477
  );
6116
6478
  ToolFallback.displayName = "ToolFallback";
6117
6479
 
6118
6480
  // src/artifacts/tool-artifact.tsx
6119
- var import_jsx_runtime42 = require("react/jsx-runtime");
6481
+ var import_jsx_runtime45 = require("react/jsx-runtime");
6120
6482
  var ToolArtifactFallback = (props) => {
6121
6483
  const registry = useArtifactRegistry();
6122
6484
  const isRunning = useToolRunning({
@@ -6128,24 +6490,24 @@ var ToolArtifactFallback = (props) => {
6128
6490
  if (artifact) {
6129
6491
  const Renderer = registry[artifact.type];
6130
6492
  if (Renderer) {
6131
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
6493
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
6132
6494
  ToolMotion,
6133
6495
  {
6134
6496
  motionKey: `artifact-${artifact.type}`,
6135
6497
  className: "aui-tool-artifact",
6136
- children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Renderer, { artifact })
6498
+ children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Renderer, { artifact })
6137
6499
  }
6138
6500
  );
6139
6501
  }
6140
6502
  }
6141
6503
  }
6142
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ToolFallback, { ...props });
6504
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ToolFallback, { ...props });
6143
6505
  };
6144
6506
 
6145
6507
  // src/chat/composer.tsx
6146
- var import_react29 = require("@assistant-ui/react");
6508
+ var import_react32 = require("@assistant-ui/react");
6147
6509
  var import_lucide_react7 = require("lucide-react");
6148
- var import_jsx_runtime43 = require("react/jsx-runtime");
6510
+ var import_jsx_runtime46 = require("react/jsx-runtime");
6149
6511
  var Composer = ({
6150
6512
  placeholder = "Send a message...",
6151
6513
  showAttachments,
@@ -6156,10 +6518,10 @@ var Composer = ({
6156
6518
  }) => {
6157
6519
  const attachmentsEnabled = useTimbalAttachmentsEnabled();
6158
6520
  const attachUi = showAttachments !== false && attachmentsEnabled;
6159
- const shell = /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
6160
- attachUi && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ComposerAttachments, {}),
6161
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ComposerInput, { placeholder, autoFocus: !noAutoFocus }),
6162
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
6521
+ const shell = /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
6522
+ attachUi && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ComposerAttachments, {}),
6523
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ComposerInput, { placeholder, autoFocus: !noAutoFocus }),
6524
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
6163
6525
  ComposerToolbar,
6164
6526
  {
6165
6527
  showAttachments: attachUi,
@@ -6168,15 +6530,15 @@ var Composer = ({
6168
6530
  }
6169
6531
  )
6170
6532
  ] });
6171
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
6172
- import_react29.ComposerPrimitive.Root,
6533
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
6534
+ import_react32.ComposerPrimitive.Root,
6173
6535
  {
6174
6536
  className: cn(
6175
6537
  "aui-composer-root relative flex w-full flex-col",
6176
6538
  className
6177
6539
  ),
6178
- children: attachUi ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
6179
- import_react29.ComposerPrimitive.AttachmentDropzone,
6540
+ children: attachUi ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
6541
+ import_react32.ComposerPrimitive.AttachmentDropzone,
6180
6542
  {
6181
6543
  className: cn(
6182
6544
  studioComposeInputShellClass,
@@ -6184,7 +6546,7 @@ var Composer = ({
6184
6546
  ),
6185
6547
  children: shell
6186
6548
  }
6187
- ) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: studioComposeInputShellClass, children: shell })
6549
+ ) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: studioComposeInputShellClass, children: shell })
6188
6550
  }
6189
6551
  );
6190
6552
  };
@@ -6192,7 +6554,7 @@ var ComposerInput = ({
6192
6554
  placeholder,
6193
6555
  autoFocus
6194
6556
  }) => {
6195
- const composer = (0, import_react29.useComposerRuntime)();
6557
+ const composer = (0, import_react32.useComposerRuntime)();
6196
6558
  const onKeyDown = (e) => {
6197
6559
  if (e.key === "Enter" && !e.shiftKey && !e.nativeEvent.isComposing) {
6198
6560
  e.preventDefault();
@@ -6204,8 +6566,8 @@ var ComposerInput = ({
6204
6566
  el.style.height = "auto";
6205
6567
  el.style.height = `${Math.min(el.scrollHeight, 240)}px`;
6206
6568
  };
6207
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
6208
- import_react29.ComposerPrimitive.Input,
6569
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
6570
+ import_react32.ComposerPrimitive.Input,
6209
6571
  {
6210
6572
  placeholder,
6211
6573
  className: "aui-composer-input max-h-60 min-h-14 w-full resize-none bg-composer-bg px-3 pt-3 pb-1 text-sm outline-none placeholder:text-muted-foreground/70 focus-visible:ring-0",
@@ -6218,17 +6580,17 @@ var ComposerInput = ({
6218
6580
  );
6219
6581
  };
6220
6582
  var ComposerToolbar = ({ showAttachments, toolbar, sendTooltip }) => {
6221
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "aui-composer-action-wrapper relative z-[1] flex items-center justify-between gap-1 bg-composer-bg px-2.5 pb-2.5", children: [
6222
- /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex items-center gap-1", children: [
6223
- showAttachments && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ComposerAddAttachment, {}),
6583
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "aui-composer-action-wrapper relative z-[1] flex items-center justify-between gap-1 bg-composer-bg px-2.5 pb-2.5", children: [
6584
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex items-center gap-1", children: [
6585
+ showAttachments && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ComposerAddAttachment, {}),
6224
6586
  toolbar
6225
6587
  ] }),
6226
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ComposerSendOrCancel, { sendTooltip })
6588
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ComposerSendOrCancel, { sendTooltip })
6227
6589
  ] });
6228
6590
  };
6229
6591
  var ComposerSendOrCancel = ({ sendTooltip }) => {
6230
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
6231
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react29.AuiIf, { condition: (s) => !s.thread.isRunning, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react29.ComposerPrimitive.Send, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
6592
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
6593
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react32.AuiIf, { condition: (s) => !s.thread.isRunning, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react32.ComposerPrimitive.Send, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
6232
6594
  TooltipIconButton,
6233
6595
  {
6234
6596
  tooltip: sendTooltip,
@@ -6236,34 +6598,34 @@ var ComposerSendOrCancel = ({ sendTooltip }) => {
6236
6598
  type: "submit",
6237
6599
  className: "aui-composer-send shrink-0 disabled:opacity-30",
6238
6600
  "aria-label": "Send message",
6239
- children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react7.ArrowUpIcon, { className: "aui-composer-send-icon size-4" })
6601
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react7.ArrowUpIcon, { className: "aui-composer-send-icon size-4" })
6240
6602
  }
6241
6603
  ) }) }),
6242
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react29.AuiIf, { condition: (s) => s.thread.isRunning, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react29.ComposerPrimitive.Cancel, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
6604
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react32.AuiIf, { condition: (s) => s.thread.isRunning, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react32.ComposerPrimitive.Cancel, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
6243
6605
  TooltipIconButton,
6244
6606
  {
6245
6607
  tooltip: "Stop generating",
6246
6608
  variant: "primary",
6247
6609
  className: "aui-composer-cancel shrink-0",
6248
6610
  "aria-label": "Stop generating",
6249
- children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react7.SquareIcon, { className: "aui-composer-cancel-icon size-3 fill-current" })
6611
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react7.SquareIcon, { className: "aui-composer-cancel-icon size-3 fill-current" })
6250
6612
  }
6251
6613
  ) }) })
6252
6614
  ] });
6253
6615
  };
6254
6616
 
6255
6617
  // src/chat/suggestions.tsx
6256
- var import_react30 = require("react");
6257
- var import_react31 = require("@assistant-ui/react");
6618
+ var import_react33 = require("react");
6619
+ var import_react34 = require("@assistant-ui/react");
6258
6620
  var import_lucide_react8 = require("lucide-react");
6259
- var import_jsx_runtime44 = require("react/jsx-runtime");
6621
+ var import_jsx_runtime47 = require("react/jsx-runtime");
6260
6622
  var Suggestions = ({
6261
6623
  suggestions,
6262
6624
  className
6263
6625
  }) => {
6264
6626
  const items = useResolvedSuggestions(suggestions);
6265
6627
  if (!items || items.length === 0) return null;
6266
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
6628
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
6267
6629
  "div",
6268
6630
  {
6269
6631
  className: cn(
@@ -6272,17 +6634,17 @@ var Suggestions = ({
6272
6634
  ),
6273
6635
  role: "list",
6274
6636
  "aria-label": "Suggested prompts",
6275
- children: items.map((suggestion, i) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(SuggestionRow, { suggestion }, (suggestion.prompt ?? suggestion.title) + i))
6637
+ children: items.map((suggestion, i) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SuggestionRow, { suggestion }, (suggestion.prompt ?? suggestion.title) + i))
6276
6638
  }
6277
6639
  );
6278
6640
  };
6279
6641
  var SuggestionRow = ({ suggestion }) => {
6280
- const runtime = (0, import_react31.useThreadRuntime)();
6642
+ const runtime = (0, import_react34.useThreadRuntime)();
6281
6643
  const onClick = () => {
6282
6644
  const text = suggestion.prompt ?? suggestion.title;
6283
6645
  runtime.append({ role: "user", content: [{ type: "text", text }] });
6284
6646
  };
6285
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
6647
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
6286
6648
  "button",
6287
6649
  {
6288
6650
  type: "button",
@@ -6290,20 +6652,20 @@ var SuggestionRow = ({ suggestion }) => {
6290
6652
  onClick,
6291
6653
  className: cn("aui-thread-suggestion", studioListRowButtonClass),
6292
6654
  children: [
6293
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "aui-thread-suggestion-icon shrink-0 text-muted-foreground", children: suggestion.icon ?? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react8.ArrowUpIcon, { className: "size-4", strokeWidth: 1.75, "aria-hidden": true }) }),
6294
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("span", { className: "aui-thread-suggestion-text min-w-0 flex-1 text-left", children: [
6295
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "aui-thread-suggestion-text-1 block truncate text-sm font-normal text-foreground", children: suggestion.title }),
6296
- suggestion.description && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "aui-thread-suggestion-text-2 mt-0.5 block truncate text-xs text-muted-foreground", children: suggestion.description })
6655
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "aui-thread-suggestion-icon shrink-0 text-muted-foreground", children: suggestion.icon ?? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react8.ArrowUpIcon, { className: "size-4", strokeWidth: 1.75, "aria-hidden": true }) }),
6656
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("span", { className: "aui-thread-suggestion-text min-w-0 flex-1 text-left", children: [
6657
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "aui-thread-suggestion-text-1 block truncate text-sm font-normal text-foreground", children: suggestion.title }),
6658
+ suggestion.description && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "aui-thread-suggestion-text-2 mt-0.5 block truncate text-xs text-muted-foreground", children: suggestion.description })
6297
6659
  ] })
6298
6660
  ]
6299
6661
  }
6300
6662
  );
6301
6663
  };
6302
6664
  function useResolvedSuggestions(source) {
6303
- const [resolved, setResolved] = (0, import_react30.useState)(
6665
+ const [resolved, setResolved] = (0, import_react33.useState)(
6304
6666
  () => Array.isArray(source) ? source : void 0
6305
6667
  );
6306
- (0, import_react30.useEffect)(() => {
6668
+ (0, import_react33.useEffect)(() => {
6307
6669
  if (!source) {
6308
6670
  setResolved(void 0);
6309
6671
  return;
@@ -6322,7 +6684,7 @@ function useResolvedSuggestions(source) {
6322
6684
  cancelled = true;
6323
6685
  };
6324
6686
  }, [source]);
6325
- return (0, import_react30.useMemo)(() => resolved, [resolved]);
6687
+ return (0, import_react33.useMemo)(() => resolved, [resolved]);
6326
6688
  }
6327
6689
 
6328
6690
  // src/design/theme-sanity.ts
@@ -6395,15 +6757,15 @@ function scheduleThemeSanityCheck() {
6395
6757
  }
6396
6758
 
6397
6759
  // src/chat/thread-variant.tsx
6398
- var import_react32 = require("react");
6399
- var ThreadVariantContext = (0, import_react32.createContext)("default");
6760
+ var import_react35 = require("react");
6761
+ var ThreadVariantContext = (0, import_react35.createContext)("default");
6400
6762
  var ThreadVariantProvider = ThreadVariantContext.Provider;
6401
6763
  function useThreadVariant() {
6402
- return (0, import_react32.useContext)(ThreadVariantContext);
6764
+ return (0, import_react35.useContext)(ThreadVariantContext);
6403
6765
  }
6404
6766
 
6405
6767
  // src/chat/thread.tsx
6406
- var import_jsx_runtime45 = require("react/jsx-runtime");
6768
+ var import_jsx_runtime48 = require("react/jsx-runtime");
6407
6769
  var Thread = ({
6408
6770
  className,
6409
6771
  variant = "default",
@@ -6426,17 +6788,17 @@ var Thread = ({
6426
6788
  const EditComposerSlot = components?.EditComposer ?? EditComposer;
6427
6789
  const ScrollToBottomSlot = components?.ScrollToBottom ?? ThreadScrollToBottom;
6428
6790
  const SuggestionsSlot = components?.Suggestions ?? Suggestions;
6429
- (0, import_react33.useEffect)(() => {
6791
+ (0, import_react36.useEffect)(() => {
6430
6792
  scheduleThemeSanityCheck();
6431
6793
  }, []);
6432
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ThreadVariantProvider, { value: variant, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
6794
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ThreadVariantProvider, { value: variant, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
6433
6795
  ArtifactRegistryProvider,
6434
6796
  {
6435
6797
  renderers: artifacts?.renderers,
6436
6798
  override: artifacts?.override,
6437
- children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(UiEventProvider, { onEvent: onArtifactEvent ?? (() => {
6438
- }), children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
6439
- import_react34.ThreadPrimitive.Root,
6799
+ children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(UiEventProvider, { onEvent: onArtifactEvent ?? (() => {
6800
+ }), children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
6801
+ import_react37.ThreadPrimitive.Root,
6440
6802
  {
6441
6803
  className: cn(
6442
6804
  "aui-root aui-thread-root @container flex h-full flex-col bg-transparent",
@@ -6445,8 +6807,8 @@ var Thread = ({
6445
6807
  ),
6446
6808
  style: { ["--thread-max-width"]: maxWidth },
6447
6809
  "data-thread-variant": variant,
6448
- children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
6449
- import_react34.ThreadPrimitive.Viewport,
6810
+ children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
6811
+ import_react37.ThreadPrimitive.Viewport,
6450
6812
  {
6451
6813
  turnAnchor: "bottom",
6452
6814
  className: cn(
@@ -6454,7 +6816,7 @@ var Thread = ({
6454
6816
  isPanel ? "px-2 pt-2" : "px-4 pt-4"
6455
6817
  ),
6456
6818
  children: [
6457
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
6819
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
6458
6820
  WelcomeSlot,
6459
6821
  {
6460
6822
  config: welcome,
@@ -6463,8 +6825,8 @@ var Thread = ({
6463
6825
  Suggestions: SuggestionsSlot
6464
6826
  }
6465
6827
  ),
6466
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
6467
- import_react34.ThreadPrimitive.Messages,
6828
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
6829
+ import_react37.ThreadPrimitive.Messages,
6468
6830
  {
6469
6831
  components: {
6470
6832
  UserMessage: UserMessageSlot,
@@ -6473,14 +6835,14 @@ var Thread = ({
6473
6835
  }
6474
6836
  }
6475
6837
  ),
6476
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
6477
- import_react34.ThreadPrimitive.ViewportFooter,
6838
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
6839
+ import_react37.ThreadPrimitive.ViewportFooter,
6478
6840
  {
6479
6841
  className: cn(
6480
6842
  "aui-thread-viewport-footer sticky bottom-0 z-10 mt-auto w-full isolate pt-2",
6481
6843
  isPanel ? "bg-card pb-2" : "bg-background pb-4 md:pb-6"
6482
6844
  ),
6483
- children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
6845
+ children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
6484
6846
  "div",
6485
6847
  {
6486
6848
  className: cn(
@@ -6488,8 +6850,8 @@ var Thread = ({
6488
6850
  isPanel ? "gap-2" : "gap-4"
6489
6851
  ),
6490
6852
  children: [
6491
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ScrollToBottomSlot, {}),
6492
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ComposerSlot, { placeholder })
6853
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ScrollToBottomSlot, {}),
6854
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ComposerSlot, { placeholder })
6493
6855
  ]
6494
6856
  }
6495
6857
  )
@@ -6504,13 +6866,13 @@ var Thread = ({
6504
6866
  ) });
6505
6867
  };
6506
6868
  var ThreadScrollToBottom = () => {
6507
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react34.ThreadPrimitive.ScrollToBottom, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
6869
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react37.ThreadPrimitive.ScrollToBottom, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
6508
6870
  TooltipIconButton,
6509
6871
  {
6510
6872
  tooltip: "Scroll to bottom",
6511
6873
  variant: "secondary",
6512
6874
  className: "aui-thread-scroll-to-bottom absolute -top-12 z-10 self-center disabled:invisible",
6513
- children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react9.ArrowDownIcon, { className: "size-4" })
6875
+ children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react9.ArrowDownIcon, { className: "size-4" })
6514
6876
  }
6515
6877
  ) });
6516
6878
  };
@@ -6543,15 +6905,15 @@ var ThreadWelcome = ({
6543
6905
  showWelcomeSuggestions: showWelcomeSuggestionsProp,
6544
6906
  Suggestions: SuggestionsSlot = Suggestions
6545
6907
  }) => {
6546
- const isEmpty = (0, import_react34.useThread)((s) => s.messages.length === 0);
6908
+ const isEmpty = (0, import_react37.useThread)((s) => s.messages.length === 0);
6547
6909
  const isPanel = useThreadVariant() === "panel";
6548
6910
  const showWelcomeSuggestions = showWelcomeSuggestionsProp ?? !isPanel;
6549
6911
  if (!isEmpty) return null;
6550
6912
  const defaultHeading = isPanel ? "Ask about this page" : "How can I help you today?";
6551
6913
  const defaultSubheading = isPanel ? "The assistant can use dashboard context from your app." : "Send a message to start a conversation.";
6552
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "aui-thread-welcome-root mx-auto my-auto flex w-full max-w-(--thread-max-width) grow flex-col", children: [
6553
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "aui-thread-welcome-center flex w-full grow flex-col items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
6554
- import_react35.motion.div,
6914
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "aui-thread-welcome-root mx-auto my-auto flex w-full max-w-(--thread-max-width) grow flex-col", children: [
6915
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "aui-thread-welcome-center flex w-full grow flex-col items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
6916
+ import_react38.motion.div,
6555
6917
  {
6556
6918
  className: cn(
6557
6919
  "aui-thread-welcome-message flex flex-col items-center justify-center text-center",
@@ -6561,9 +6923,9 @@ var ThreadWelcome = ({
6561
6923
  initial: "initial",
6562
6924
  animate: "animate",
6563
6925
  children: [
6564
- config?.icon && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react35.motion.div, { variants: welcomeIcon, className: isPanel ? "mb-3" : "mb-5", children: config.icon }),
6565
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
6566
- import_react35.motion.h1,
6926
+ config?.icon && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react38.motion.div, { variants: welcomeIcon, className: isPanel ? "mb-3" : "mb-5", children: config.icon }),
6927
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
6928
+ import_react38.motion.h1,
6567
6929
  {
6568
6930
  variants: welcomeItem,
6569
6931
  className: cn(
@@ -6573,8 +6935,8 @@ var ThreadWelcome = ({
6573
6935
  children: config?.heading ?? defaultHeading
6574
6936
  }
6575
6937
  ),
6576
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
6577
- import_react35.motion.p,
6938
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
6939
+ import_react38.motion.p,
6578
6940
  {
6579
6941
  variants: welcomeItem,
6580
6942
  className: "aui-thread-welcome-message-inner mt-1.5 text-muted-foreground text-sm",
@@ -6584,16 +6946,16 @@ var ThreadWelcome = ({
6584
6946
  ]
6585
6947
  }
6586
6948
  ) }),
6587
- showWelcomeSuggestions && suggestions ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "aui-thread-welcome-suggestions mx-auto w-full max-w-(--thread-max-width) px-2", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(SuggestionsSlot, { suggestions }) }) : null
6949
+ showWelcomeSuggestions && suggestions ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "aui-thread-welcome-suggestions mx-auto w-full max-w-(--thread-max-width) px-2", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SuggestionsSlot, { suggestions }) }) : null
6588
6950
  ] });
6589
6951
  };
6590
6952
  var MessageError = () => {
6591
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react34.MessagePrimitive.Error, { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react34.ErrorPrimitive.Root, { className: "aui-message-error-root mt-2 rounded-md border border-destructive bg-destructive/10 p-3 text-destructive text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react34.ErrorPrimitive.Message, { className: "aui-message-error-message line-clamp-2" }) }) });
6953
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react37.MessagePrimitive.Error, { children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react37.ErrorPrimitive.Root, { className: "aui-message-error-root mt-2 rounded-md border border-destructive bg-destructive/10 p-3 text-destructive text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react37.ErrorPrimitive.Message, { className: "aui-message-error-message line-clamp-2" }) }) });
6592
6954
  };
6593
6955
  var AssistantMessage = () => {
6594
6956
  const isPanel = useThreadVariant() === "panel";
6595
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
6596
- import_react34.MessagePrimitive.Root,
6957
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
6958
+ import_react37.MessagePrimitive.Root,
6597
6959
  {
6598
6960
  className: cn(
6599
6961
  "aui-assistant-message-root fade-in slide-in-from-bottom-1 relative mx-auto w-full max-w-(--thread-max-width) animate-in duration-150",
@@ -6601,7 +6963,7 @@ var AssistantMessage = () => {
6601
6963
  ),
6602
6964
  "data-role": "assistant",
6603
6965
  children: [
6604
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
6966
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
6605
6967
  "div",
6606
6968
  {
6607
6969
  className: cn(
@@ -6609,8 +6971,8 @@ var AssistantMessage = () => {
6609
6971
  isPanel ? "px-1 text-sm" : "px-2"
6610
6972
  ),
6611
6973
  children: [
6612
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
6613
- import_react34.MessagePrimitive.Parts,
6974
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
6975
+ import_react37.MessagePrimitive.Parts,
6614
6976
  {
6615
6977
  components: {
6616
6978
  Text: MarkdownText,
@@ -6620,11 +6982,11 @@ var AssistantMessage = () => {
6620
6982
  }
6621
6983
  }
6622
6984
  ),
6623
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(MessageError, {})
6985
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(MessageError, {})
6624
6986
  ]
6625
6987
  }
6626
6988
  ),
6627
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "aui-assistant-message-footer mt-1 mb-3 ml-1 flex", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(AssistantActionBar, {}) })
6989
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "aui-assistant-message-footer mt-1 mb-3 ml-1 flex", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(AssistantActionBar, {}) })
6628
6990
  ]
6629
6991
  }
6630
6992
  );
@@ -6637,36 +6999,36 @@ var ASSISTANT_ACTION_ICON_CLASS = cn(
6637
6999
  "[&>span:first-child]:group-hover/tbv2:bg-ghost-fill-hover"
6638
7000
  );
6639
7001
  var AssistantActionBar = () => {
6640
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
6641
- import_react34.ActionBarPrimitive.Root,
7002
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
7003
+ import_react37.ActionBarPrimitive.Root,
6642
7004
  {
6643
7005
  hideWhenRunning: true,
6644
7006
  autohide: "never",
6645
7007
  className: "aui-assistant-action-bar-root flex items-center gap-0 bg-transparent px-0 py-0.5 text-muted-foreground/60",
6646
7008
  children: [
6647
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react34.ActionBarPrimitive.Copy, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
7009
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react37.ActionBarPrimitive.Copy, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
6648
7010
  TooltipIconButton,
6649
7011
  {
6650
7012
  tooltip: "Copy",
6651
7013
  variant: "ghost",
6652
7014
  className: ASSISTANT_ACTION_ICON_CLASS,
6653
7015
  children: [
6654
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react34.AuiIf, { condition: (s) => s.message.isCopied, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react9.CheckIcon, { className: "size-3" }) }),
6655
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react34.AuiIf, { condition: (s) => !s.message.isCopied, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react9.CopyIcon, { className: "size-3" }) })
7016
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react37.AuiIf, { condition: (s) => s.message.isCopied, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react9.CheckIcon, { className: "size-3" }) }),
7017
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react37.AuiIf, { condition: (s) => !s.message.isCopied, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react9.CopyIcon, { className: "size-3" }) })
6656
7018
  ]
6657
7019
  }
6658
7020
  ) }),
6659
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react34.ActionBarPrimitive.Reload, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
7021
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react37.ActionBarPrimitive.Reload, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
6660
7022
  TooltipIconButton,
6661
7023
  {
6662
7024
  tooltip: "Regenerate",
6663
7025
  variant: "ghost",
6664
7026
  className: ASSISTANT_ACTION_ICON_CLASS,
6665
- children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react9.RefreshCwIcon, { className: "size-3" })
7027
+ children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react9.RefreshCwIcon, { className: "size-3" })
6666
7028
  }
6667
7029
  ) }),
6668
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_react34.ActionBarMorePrimitive.Root, { children: [
6669
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react34.ActionBarMorePrimitive.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
7030
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_react37.ActionBarMorePrimitive.Root, { children: [
7031
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react37.ActionBarMorePrimitive.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
6670
7032
  TooltipIconButton,
6671
7033
  {
6672
7034
  tooltip: "More",
@@ -6675,17 +7037,17 @@ var AssistantActionBar = () => {
6675
7037
  ASSISTANT_ACTION_ICON_CLASS,
6676
7038
  "data-[state=open]:text-muted-foreground/80"
6677
7039
  ),
6678
- children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react9.MoreHorizontalIcon, { className: "size-3" })
7040
+ children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react9.MoreHorizontalIcon, { className: "size-3" })
6679
7041
  }
6680
7042
  ) }),
6681
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
6682
- import_react34.ActionBarMorePrimitive.Content,
7043
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
7044
+ import_react37.ActionBarMorePrimitive.Content,
6683
7045
  {
6684
7046
  side: "bottom",
6685
7047
  align: "start",
6686
7048
  className: "aui-action-bar-more-content z-50 min-w-36 overflow-hidden rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-card-elevated",
6687
- children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react34.ActionBarPrimitive.ExportMarkdown, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_react34.ActionBarMorePrimitive.Item, { className: "aui-action-bar-more-item flex cursor-pointer select-none items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-none hover:bg-muted focus:bg-muted", children: [
6688
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react9.DownloadIcon, { className: "size-4 shrink-0" }),
7049
+ children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react37.ActionBarPrimitive.ExportMarkdown, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_react37.ActionBarMorePrimitive.Item, { className: "aui-action-bar-more-item flex cursor-pointer select-none items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-none hover:bg-muted focus:bg-muted", children: [
7050
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react9.DownloadIcon, { className: "size-4 shrink-0" }),
6689
7051
  "Export as Markdown"
6690
7052
  ] }) })
6691
7053
  }
@@ -6696,12 +7058,12 @@ var AssistantActionBar = () => {
6696
7058
  );
6697
7059
  };
6698
7060
  var UserMessageText = () => {
6699
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "whitespace-pre-wrap", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react34.MessagePartPrimitive.Text, { smooth: false }) });
7061
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "whitespace-pre-wrap", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react37.MessagePartPrimitive.Text, { smooth: false }) });
6700
7062
  };
6701
7063
  var UserMessage = () => {
6702
7064
  const isPanel = useThreadVariant() === "panel";
6703
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
6704
- import_react34.MessagePrimitive.Root,
7065
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
7066
+ import_react37.MessagePrimitive.Root,
6705
7067
  {
6706
7068
  className: cn(
6707
7069
  "aui-user-message-root mx-auto flex w-full max-w-(--thread-max-width) flex-col items-end gap-2",
@@ -6709,9 +7071,9 @@ var UserMessage = () => {
6709
7071
  ),
6710
7072
  "data-role": "user",
6711
7073
  children: [
6712
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(UserMessageAttachments, {}),
6713
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
6714
- import_react35.motion.div,
7074
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(UserMessageAttachments, {}),
7075
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
7076
+ import_react38.motion.div,
6715
7077
  {
6716
7078
  className: cn(
6717
7079
  "aui-user-message-content relative inline-block max-w-[85%] rounded-2xl bg-bubble-user text-bubble-user-foreground",
@@ -6721,8 +7083,8 @@ var UserMessage = () => {
6721
7083
  animate: { opacity: 1, y: 0, scale: 1 },
6722
7084
  transition: { duration: 0.65, ease: luxuryEase },
6723
7085
  children: [
6724
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react34.MessagePrimitive.Parts, { components: { Text: UserMessageText } }),
6725
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "aui-user-action-bar-wrapper absolute top-1/2 left-0 -translate-x-full -translate-y-1/2 pr-2", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(UserActionBar, {}) })
7086
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react37.MessagePrimitive.Parts, { components: { Text: UserMessageText } }),
7087
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "aui-user-action-bar-wrapper absolute top-1/2 left-0 -translate-x-full -translate-y-1/2 pr-2", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(UserActionBar, {}) })
6726
7088
  ]
6727
7089
  }
6728
7090
  )
@@ -6731,42 +7093,42 @@ var UserMessage = () => {
6731
7093
  );
6732
7094
  };
6733
7095
  var UserActionBar = () => {
6734
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
6735
- import_react34.ActionBarPrimitive.Root,
7096
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
7097
+ import_react37.ActionBarPrimitive.Root,
6736
7098
  {
6737
7099
  hideWhenRunning: true,
6738
7100
  autohide: "always",
6739
7101
  className: "aui-user-action-bar-root flex flex-col items-end",
6740
- children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react34.ActionBarPrimitive.Edit, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
7102
+ children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react37.ActionBarPrimitive.Edit, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
6741
7103
  TooltipIconButton,
6742
7104
  {
6743
7105
  tooltip: "Edit",
6744
7106
  variant: "ghost",
6745
7107
  className: ASSISTANT_ACTION_ICON_CLASS,
6746
- children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react9.PencilIcon, { className: "size-3" })
7108
+ children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react9.PencilIcon, { className: "size-3" })
6747
7109
  }
6748
7110
  ) })
6749
7111
  }
6750
7112
  );
6751
7113
  };
6752
7114
  var EditComposer = () => {
6753
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react34.MessagePrimitive.Root, { className: "aui-edit-composer-wrapper mx-auto flex w-full max-w-(--thread-max-width) flex-col px-2 py-3", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_react34.ComposerPrimitive.Root, { className: "aui-edit-composer-root ml-auto flex w-full max-w-[85%] flex-col rounded-2xl bg-muted", children: [
6754
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
6755
- import_react34.ComposerPrimitive.Input,
7115
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react37.MessagePrimitive.Root, { className: "aui-edit-composer-wrapper mx-auto flex w-full max-w-(--thread-max-width) flex-col px-2 py-3", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_react37.ComposerPrimitive.Root, { className: "aui-edit-composer-root ml-auto flex w-full max-w-[85%] flex-col rounded-2xl bg-muted", children: [
7116
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
7117
+ import_react37.ComposerPrimitive.Input,
6756
7118
  {
6757
7119
  className: "aui-edit-composer-input min-h-14 w-full resize-none bg-transparent p-4 text-foreground text-sm outline-none",
6758
7120
  autoFocus: true
6759
7121
  }
6760
7122
  ),
6761
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "aui-edit-composer-footer mx-3 mb-3 flex items-center gap-2 self-end", children: [
6762
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react34.ComposerPrimitive.Cancel, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(TimbalV2Button, { variant: "ghost", size: "sm", children: "Cancel" }) }),
6763
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react34.ComposerPrimitive.Send, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(TimbalV2Button, { variant: "primary", size: "sm", children: "Update" }) })
7123
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "aui-edit-composer-footer mx-3 mb-3 flex items-center gap-2 self-end", children: [
7124
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react37.ComposerPrimitive.Cancel, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TimbalV2Button, { variant: "ghost", size: "sm", children: "Cancel" }) }),
7125
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react37.ComposerPrimitive.Send, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TimbalV2Button, { variant: "primary", size: "sm", children: "Update" }) })
6764
7126
  ] })
6765
7127
  ] }) });
6766
7128
  };
6767
7129
 
6768
7130
  // src/app/chat/AppChatPanel.tsx
6769
- var import_jsx_runtime46 = require("react/jsx-runtime");
7131
+ var import_jsx_runtime49 = require("react/jsx-runtime");
6770
7132
  var shellClass = "aui-app-chat-panel flex h-full min-h-0 flex-col overflow-hidden";
6771
7133
  var chromeClass = cn(
6772
7134
  "aui-app-chat-panel-chrome relative z-20 flex min-h-10 shrink-0 items-center justify-end px-2 pt-2"
@@ -6811,18 +7173,18 @@ var AppChatPanel = ({
6811
7173
  ...rest
6812
7174
  }) => {
6813
7175
  const shellChat = useAppShellChat();
6814
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: cn(shellClass, className), children: [
6815
- shellChat?.collapsible ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: chromeClass, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
7176
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: cn(shellClass, className), children: [
7177
+ shellChat?.collapsible ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: chromeClass, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
6816
7178
  "button",
6817
7179
  {
6818
7180
  type: "button",
6819
7181
  className: closeButtonClass,
6820
7182
  onClick: () => shellChat.setOpen(false),
6821
7183
  "aria-label": "Close assistant",
6822
- children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react10.XIcon, { className: "size-4", "aria-hidden": true })
7184
+ children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react10.XIcon, { className: "size-4", "aria-hidden": true })
6823
7185
  }
6824
7186
  ) }) : null,
6825
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: bodyClass, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
7187
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: bodyClass, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
6826
7188
  TimbalRuntimeProvider,
6827
7189
  {
6828
7190
  workforceId,
@@ -6832,7 +7194,7 @@ var AppChatPanel = ({
6832
7194
  attachmentsUploadUrl,
6833
7195
  attachmentsAccept,
6834
7196
  debug,
6835
- children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
7197
+ children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
6836
7198
  Thread,
6837
7199
  {
6838
7200
  variant: "panel",
@@ -6853,38 +7215,38 @@ var AppChatPanel = ({
6853
7215
  };
6854
7216
 
6855
7217
  // src/app/surfaces/SurfaceCard.tsx
6856
- var import_jsx_runtime47 = require("react/jsx-runtime");
7218
+ var import_jsx_runtime50 = require("react/jsx-runtime");
6857
7219
  var SurfaceCard = ({ children, className }) => {
6858
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: cn("aui-app-surface-card", appSurfaceCardClass, className), children });
7220
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: cn("aui-app-surface-card", appSurfaceCardClass, className), children });
6859
7221
  };
6860
7222
 
6861
7223
  // src/app/surfaces/StatTile.tsx
6862
- var import_jsx_runtime48 = require("react/jsx-runtime");
7224
+ var import_jsx_runtime51 = require("react/jsx-runtime");
6863
7225
  var StatTile = ({ label, value, hint, className }) => {
6864
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: cn("aui-app-stat-tile", appStatTileClass, className), children: [
6865
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: appStatLabelClass, children: label }),
6866
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: appStatValueClass, children: value }),
6867
- hint ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "text-xs text-muted-foreground", children: hint }) : null
7226
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: cn("aui-app-stat-tile", appStatTileClass, className), children: [
7227
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: appStatLabelClass, children: label }),
7228
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: appStatValueClass, children: value }),
7229
+ hint ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "text-xs text-muted-foreground", children: hint }) : null
6868
7230
  ] });
6869
7231
  };
6870
7232
 
6871
7233
  // src/app/surfaces/EmptyState.tsx
6872
- var import_jsx_runtime49 = require("react/jsx-runtime");
7234
+ var import_jsx_runtime52 = require("react/jsx-runtime");
6873
7235
  var EmptyState = ({
6874
7236
  title,
6875
7237
  description,
6876
7238
  action,
6877
7239
  className
6878
7240
  }) => {
6879
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: cn("aui-app-empty-state", appEmptyStateClass, className), children: [
6880
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: appEmptyStateTitleClass, children: title }),
6881
- description ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: appEmptyStateDescriptionClass, children: description }) : null,
7241
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: cn("aui-app-empty-state", appEmptyStateClass, className), children: [
7242
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: appEmptyStateTitleClass, children: title }),
7243
+ description ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: appEmptyStateDescriptionClass, children: description }) : null,
6882
7244
  action
6883
7245
  ] });
6884
7246
  };
6885
7247
 
6886
7248
  // src/app/surfaces/StatusBadge.tsx
6887
- var import_jsx_runtime50 = require("react/jsx-runtime");
7249
+ var import_jsx_runtime53 = require("react/jsx-runtime");
6888
7250
  var statusBadgeToneClass = {
6889
7251
  default: "bg-muted text-foreground",
6890
7252
  primary: "bg-primary/10 text-primary",
@@ -6898,7 +7260,7 @@ var StatusBadge = ({
6898
7260
  tone = "default",
6899
7261
  className
6900
7262
  }) => {
6901
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
7263
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
6902
7264
  "span",
6903
7265
  {
6904
7266
  className: cn(
@@ -6912,7 +7274,7 @@ var StatusBadge = ({
6912
7274
  };
6913
7275
 
6914
7276
  // src/app/surfaces/AppConfirmDialog.tsx
6915
- var import_jsx_runtime51 = require("react/jsx-runtime");
7277
+ var import_jsx_runtime54 = require("react/jsx-runtime");
6916
7278
  var bodyClass2 = "flex flex-col gap-4 p-6";
6917
7279
  var titleClass = "pr-8";
6918
7280
  var actionsClass = "flex flex-wrap justify-end gap-2";
@@ -6927,15 +7289,15 @@ var AppConfirmDialog = ({
6927
7289
  destructive = false,
6928
7290
  className
6929
7291
  }) => {
6930
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Dialog, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
7292
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Dialog, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
6931
7293
  DialogContent,
6932
7294
  {
6933
7295
  className: cn("gap-0 p-0 sm:max-w-md", className),
6934
- children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: bodyClass2, children: [
6935
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(DialogTitle, { className: titleClass, children: title }),
6936
- description ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "text-sm text-muted-foreground", children: description }) : null,
6937
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: actionsClass, children: [
6938
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
7296
+ children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: bodyClass2, children: [
7297
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(DialogTitle, { className: titleClass, children: title }),
7298
+ description ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: "text-sm text-muted-foreground", children: description }) : null,
7299
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: actionsClass, children: [
7300
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
6939
7301
  TimbalV2Button,
6940
7302
  {
6941
7303
  type: "button",
@@ -6945,7 +7307,7 @@ var AppConfirmDialog = ({
6945
7307
  children: cancelLabel
6946
7308
  }
6947
7309
  ),
6948
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
7310
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
6949
7311
  TimbalV2Button,
6950
7312
  {
6951
7313
  type: "button",
@@ -6965,7 +7327,7 @@ var AppConfirmDialog = ({
6965
7327
  };
6966
7328
 
6967
7329
  // src/app/surfaces/InfoCard.tsx
6968
- var import_jsx_runtime52 = require("react/jsx-runtime");
7330
+ var import_jsx_runtime55 = require("react/jsx-runtime");
6969
7331
  var toneClass = {
6970
7332
  neutral: "border-border bg-muted/40",
6971
7333
  info: "border-primary/25 bg-primary/5",
@@ -6980,7 +7342,7 @@ var InfoCard = ({
6980
7342
  action,
6981
7343
  tone = "neutral",
6982
7344
  className
6983
- }) => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
7345
+ }) => /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
6984
7346
  "div",
6985
7347
  {
6986
7348
  className: cn(
@@ -6989,18 +7351,18 @@ var InfoCard = ({
6989
7351
  className
6990
7352
  ),
6991
7353
  children: [
6992
- icon ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "mt-0.5 shrink-0 text-muted-foreground", children: icon }) : null,
6993
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "min-w-0 flex-1", children: [
6994
- title ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-sm font-medium text-foreground", children: title }) : null,
6995
- children ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: cn("text-sm text-muted-foreground", title && "mt-1"), children }) : null
7354
+ icon ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "mt-0.5 shrink-0 text-muted-foreground", children: icon }) : null,
7355
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "min-w-0 flex-1", children: [
7356
+ title ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { className: "text-sm font-medium text-foreground", children: title }) : null,
7357
+ children ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: cn("text-sm text-muted-foreground", title && "mt-1"), children }) : null
6996
7358
  ] }),
6997
- action ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "shrink-0", children: action }) : null
7359
+ action ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "shrink-0", children: action }) : null
6998
7360
  ]
6999
7361
  }
7000
7362
  );
7001
7363
 
7002
7364
  // src/app/surfaces/StatusDot.tsx
7003
- var import_jsx_runtime53 = require("react/jsx-runtime");
7365
+ var import_jsx_runtime56 = require("react/jsx-runtime");
7004
7366
  var dotClass = {
7005
7367
  online: "bg-emerald-500",
7006
7368
  busy: "bg-amber-500",
@@ -7013,9 +7375,9 @@ var StatusDot = ({
7013
7375
  label,
7014
7376
  pulse = false,
7015
7377
  className
7016
- }) => /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("span", { className: cn("inline-flex items-center gap-1.5", className), children: [
7017
- /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("span", { className: "relative flex size-2", children: [
7018
- pulse ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
7378
+ }) => /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("span", { className: cn("inline-flex items-center gap-1.5", className), children: [
7379
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("span", { className: "relative flex size-2", children: [
7380
+ pulse ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
7019
7381
  "span",
7020
7382
  {
7021
7383
  className: cn(
@@ -7024,25 +7386,25 @@ var StatusDot = ({
7024
7386
  )
7025
7387
  }
7026
7388
  ) : null,
7027
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: cn("relative inline-flex size-2 rounded-full", dotClass[tone]) })
7389
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: cn("relative inline-flex size-2 rounded-full", dotClass[tone]) })
7028
7390
  ] }),
7029
- label ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "text-xs text-muted-foreground", children: label }) : null
7391
+ label ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "text-xs text-muted-foreground", children: label }) : null
7030
7392
  ] });
7031
7393
 
7032
7394
  // src/app/surfaces/DescriptionList.tsx
7033
- var import_jsx_runtime54 = require("react/jsx-runtime");
7395
+ var import_jsx_runtime57 = require("react/jsx-runtime");
7034
7396
  var DescriptionList = ({
7035
7397
  items,
7036
7398
  stacked = false,
7037
7399
  className
7038
- }) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
7400
+ }) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
7039
7401
  "dl",
7040
7402
  {
7041
7403
  className: cn(
7042
7404
  "divide-y divide-border rounded-xl border border-border bg-card",
7043
7405
  className
7044
7406
  ),
7045
- children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
7407
+ children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
7046
7408
  "div",
7047
7409
  {
7048
7410
  className: cn(
@@ -7050,8 +7412,8 @@ var DescriptionList = ({
7050
7412
  stacked ? "flex flex-col gap-0.5" : "flex items-center justify-between gap-4"
7051
7413
  ),
7052
7414
  children: [
7053
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("dt", { className: "text-sm text-muted-foreground", children: item.label }),
7054
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
7415
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("dt", { className: "text-sm text-muted-foreground", children: item.label }),
7416
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
7055
7417
  "dd",
7056
7418
  {
7057
7419
  className: cn(
@@ -7069,10 +7431,10 @@ var DescriptionList = ({
7069
7431
  );
7070
7432
 
7071
7433
  // src/app/surfaces/ExpandableSection.tsx
7072
- var import_react36 = require("react");
7073
- var import_react37 = require("motion/react");
7074
- var import_jsx_runtime55 = require("react/jsx-runtime");
7075
- var Chevron = ({ open }) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
7434
+ var import_react39 = require("react");
7435
+ var import_react40 = require("motion/react");
7436
+ var import_jsx_runtime58 = require("react/jsx-runtime");
7437
+ var Chevron = ({ open }) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
7076
7438
  "svg",
7077
7439
  {
7078
7440
  viewBox: "0 0 24 24",
@@ -7086,7 +7448,7 @@ var Chevron = ({ open }) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
7086
7448
  strokeLinecap: "round",
7087
7449
  strokeLinejoin: "round",
7088
7450
  "aria-hidden": true,
7089
- children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("path", { d: "m6 9 6 6 6-6" })
7451
+ children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("path", { d: "m6 9 6 6 6-6" })
7090
7452
  }
7091
7453
  );
7092
7454
  var ExpandableSection = ({
@@ -7099,16 +7461,16 @@ var ExpandableSection = ({
7099
7461
  onOpenChange,
7100
7462
  className
7101
7463
  }) => {
7102
- const reduceMotion = (0, import_react37.useReducedMotion)();
7103
- const panelId = (0, import_react36.useId)();
7104
- const [internalOpen, setInternalOpen] = (0, import_react36.useState)(defaultOpen);
7464
+ const reduceMotion = (0, import_react40.useReducedMotion)();
7465
+ const panelId = (0, import_react39.useId)();
7466
+ const [internalOpen, setInternalOpen] = (0, import_react39.useState)(defaultOpen);
7105
7467
  const open = openProp ?? internalOpen;
7106
7468
  const toggle = () => {
7107
7469
  if (openProp == null) setInternalOpen((o) => !o);
7108
7470
  onOpenChange?.(!open);
7109
7471
  };
7110
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: cn("border-b border-border last:border-0", className), children: [
7111
- /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
7472
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: cn("border-b border-border last:border-0", className), children: [
7473
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
7112
7474
  "button",
7113
7475
  {
7114
7476
  type: "button",
@@ -7117,17 +7479,17 @@ var ExpandableSection = ({
7117
7479
  "aria-controls": panelId,
7118
7480
  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",
7119
7481
  children: [
7120
- /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("span", { className: "flex min-w-0 items-center gap-3", children: [
7121
- icon ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "flex size-8 items-center justify-center rounded-lg border border-border bg-muted text-muted-foreground", children: icon }) : null,
7122
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "truncate text-sm font-medium text-foreground", children: title }),
7123
- count != null ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "rounded-full border border-border bg-muted px-2 py-0.5 text-xs text-muted-foreground", children: count }) : null
7482
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("span", { className: "flex min-w-0 items-center gap-3", children: [
7483
+ icon ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "flex size-8 items-center justify-center rounded-lg border border-border bg-muted text-muted-foreground", children: icon }) : null,
7484
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "truncate text-sm font-medium text-foreground", children: title }),
7485
+ count != null ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "rounded-full border border-border bg-muted px-2 py-0.5 text-xs text-muted-foreground", children: count }) : null
7124
7486
  ] }),
7125
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Chevron, { open })
7487
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Chevron, { open })
7126
7488
  ]
7127
7489
  }
7128
7490
  ),
7129
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react37.AnimatePresence, { initial: false, children: open ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
7130
- import_react37.motion.div,
7491
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_react40.AnimatePresence, { initial: false, children: open ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
7492
+ import_react40.motion.div,
7131
7493
  {
7132
7494
  id: panelId,
7133
7495
  initial: reduceMotion ? void 0 : { height: 0, opacity: 0 },
@@ -7135,7 +7497,7 @@ var ExpandableSection = ({
7135
7497
  exit: reduceMotion ? void 0 : { height: 0, opacity: 0 },
7136
7498
  transition: { duration: 0.2, ease: "easeOut" },
7137
7499
  className: "overflow-hidden",
7138
- children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "bg-muted/20", children })
7500
+ children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "bg-muted/20", children })
7139
7501
  },
7140
7502
  "body"
7141
7503
  ) : null })
@@ -7143,7 +7505,7 @@ var ExpandableSection = ({
7143
7505
  };
7144
7506
 
7145
7507
  // src/app/surfaces/ResourceCard.tsx
7146
- var import_jsx_runtime56 = require("react/jsx-runtime");
7508
+ var import_jsx_runtime59 = require("react/jsx-runtime");
7147
7509
  var resourceCardShellClass = cn(
7148
7510
  "flex min-h-[8.5rem] flex-col rounded-2xl p-4 text-left font-normal",
7149
7511
  TIMBAL_V2_ELEVATED_SURFACE
@@ -7168,35 +7530,35 @@ var ResourceCard = ({
7168
7530
  ariaLabel,
7169
7531
  className
7170
7532
  }) => {
7171
- const body = /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_jsx_runtime56.Fragment, { children: [
7172
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex items-start gap-3", children: [
7173
- media ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: mediaShellClass, children: media }) : null,
7174
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "min-w-0 flex-1 pt-0.5", children: [
7175
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("p", { className: "truncate text-sm font-normal leading-snug text-foreground", children: title }),
7176
- subtitle ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("p", { className: "mt-1 line-clamp-2 text-xs font-normal text-muted-foreground", children: subtitle }) : null
7533
+ const body = /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_jsx_runtime59.Fragment, { children: [
7534
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex items-start gap-3", children: [
7535
+ media ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: mediaShellClass, children: media }) : null,
7536
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "min-w-0 flex-1 pt-0.5", children: [
7537
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { className: "truncate text-sm font-normal leading-snug text-foreground", children: title }),
7538
+ subtitle ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { className: "mt-1 line-clamp-2 text-xs font-normal text-muted-foreground", children: subtitle }) : null
7177
7539
  ] }),
7178
- badge ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "shrink-0 pt-0.5", children: badge }) : null
7540
+ badge ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "shrink-0 pt-0.5", children: badge }) : null
7179
7541
  ] }),
7180
- footer || action ? /* @__PURE__ */ (0, import_jsx_runtime56.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: [
7181
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "min-w-0 truncate", children: footer }),
7182
- action ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "shrink-0 opacity-80", children: action }) : null
7542
+ footer || action ? /* @__PURE__ */ (0, import_jsx_runtime59.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: [
7543
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "min-w-0 truncate", children: footer }),
7544
+ action ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "shrink-0 opacity-80", children: action }) : null
7183
7545
  ] }) : null
7184
7546
  ] });
7185
7547
  if (onClick) {
7186
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("button", { type: "button", onClick, "aria-label": ariaLabel, className: cn(resourceCardInteractiveClass, className), children: body });
7548
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("button", { type: "button", onClick, "aria-label": ariaLabel, className: cn(resourceCardInteractiveClass, className), children: body });
7187
7549
  }
7188
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("article", { className: cn(resourceCardShellClass, className), children: body });
7550
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("article", { className: cn(resourceCardShellClass, className), children: body });
7189
7551
  };
7190
7552
 
7191
7553
  // src/app/settings/SettingsSection.tsx
7192
- var import_jsx_runtime57 = require("react/jsx-runtime");
7554
+ var import_jsx_runtime60 = require("react/jsx-runtime");
7193
7555
  var SettingsSectionHeader = ({
7194
7556
  title,
7195
7557
  description,
7196
7558
  className
7197
- }) => /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: cn("flex flex-col", className), children: [
7198
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("h3", { className: "text-[17px] font-medium leading-tight text-foreground", children: title }),
7199
- description ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { className: "mt-1 text-sm text-muted-foreground", children: description }) : null
7559
+ }) => /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: cn("flex flex-col", className), children: [
7560
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("h3", { className: "text-[17px] font-medium leading-tight text-foreground", children: title }),
7561
+ description ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("p", { className: "mt-1 text-sm text-muted-foreground", children: description }) : null
7200
7562
  ] });
7201
7563
  var SettingsSection = ({
7202
7564
  title,
@@ -7205,7 +7567,7 @@ var SettingsSection = ({
7205
7567
  children,
7206
7568
  noBorderTop = false,
7207
7569
  className
7208
- }) => /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
7570
+ }) => /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
7209
7571
  "section",
7210
7572
  {
7211
7573
  className: cn(
@@ -7214,18 +7576,18 @@ var SettingsSection = ({
7214
7576
  className
7215
7577
  ),
7216
7578
  children: [
7217
- /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "min-w-0", children: [
7218
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("h2", { className: "text-sm font-medium text-foreground", children: title }),
7219
- description ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { className: "mt-1 text-sm text-muted-foreground", children: description }) : null,
7220
- descriptionFooter ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "mt-3 min-w-0", children: descriptionFooter }) : null
7579
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "min-w-0", children: [
7580
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("h2", { className: "text-sm font-medium text-foreground", children: title }),
7581
+ description ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("p", { className: "mt-1 text-sm text-muted-foreground", children: description }) : null,
7582
+ descriptionFooter ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "mt-3 min-w-0", children: descriptionFooter }) : null
7221
7583
  ] }),
7222
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "min-w-0 space-y-3", children })
7584
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "min-w-0 space-y-3", children })
7223
7585
  ]
7224
7586
  }
7225
7587
  );
7226
7588
 
7227
7589
  // src/app/settings/FieldRow.tsx
7228
- var import_jsx_runtime58 = require("react/jsx-runtime");
7590
+ var import_jsx_runtime61 = require("react/jsx-runtime");
7229
7591
  var FieldRow = ({
7230
7592
  label,
7231
7593
  children,
@@ -7235,7 +7597,7 @@ var FieldRow = ({
7235
7597
  className
7236
7598
  }) => {
7237
7599
  if (inline) {
7238
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
7600
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
7239
7601
  "div",
7240
7602
  {
7241
7603
  className: cn(
@@ -7243,8 +7605,8 @@ var FieldRow = ({
7243
7605
  className
7244
7606
  ),
7245
7607
  children: [
7246
- /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "min-w-0", children: [
7247
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
7608
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "min-w-0", children: [
7609
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
7248
7610
  "label",
7249
7611
  {
7250
7612
  htmlFor,
@@ -7252,25 +7614,25 @@ var FieldRow = ({
7252
7614
  children: label
7253
7615
  }
7254
7616
  ),
7255
- description ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: "mt-0.5 text-xs text-muted-foreground", children: description }) : null
7617
+ description ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("p", { className: "mt-0.5 text-xs text-muted-foreground", children: description }) : null
7256
7618
  ] }),
7257
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "shrink-0", children })
7619
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "shrink-0", children })
7258
7620
  ]
7259
7621
  }
7260
7622
  );
7261
7623
  }
7262
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: cn("flex flex-col gap-1.5", className), children: [
7263
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("label", { htmlFor, className: "text-sm font-medium text-foreground", children: label }),
7624
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: cn("flex flex-col gap-1.5", className), children: [
7625
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("label", { htmlFor, className: "text-sm font-medium text-foreground", children: label }),
7264
7626
  children,
7265
- description ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: "text-xs text-muted-foreground", children: description }) : null
7627
+ description ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("p", { className: "text-xs text-muted-foreground", children: description }) : null
7266
7628
  ] });
7267
7629
  };
7268
7630
 
7269
7631
  // src/app/settings/FloatingUnsavedChangesBar.tsx
7270
- var import_react38 = require("react");
7632
+ var import_react41 = require("react");
7271
7633
  var import_react_dom = require("react-dom");
7272
- var import_react39 = require("motion/react");
7273
- var import_jsx_runtime59 = require("react/jsx-runtime");
7634
+ var import_react42 = require("motion/react");
7635
+ var import_jsx_runtime62 = require("react/jsx-runtime");
7274
7636
  var FloatingUnsavedChangesBar = ({
7275
7637
  visible,
7276
7638
  message = "Unsaved changes",
@@ -7283,13 +7645,13 @@ var FloatingUnsavedChangesBar = ({
7283
7645
  ariaLabel = "Unsaved changes",
7284
7646
  className
7285
7647
  }) => {
7286
- const reduceMotion = (0, import_react39.useReducedMotion)();
7287
- const [mounted, setMounted] = (0, import_react38.useState)(false);
7288
- (0, import_react38.useEffect)(() => setMounted(true), []);
7648
+ const reduceMotion = (0, import_react42.useReducedMotion)();
7649
+ const [mounted, setMounted] = (0, import_react41.useState)(false);
7650
+ (0, import_react41.useEffect)(() => setMounted(true), []);
7289
7651
  if (!mounted || typeof document === "undefined") return null;
7290
7652
  return (0, import_react_dom.createPortal)(
7291
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_react39.AnimatePresence, { children: visible ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "pointer-events-none fixed inset-x-0 bottom-5 z-50 flex justify-center px-4", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
7292
- import_react39.motion.div,
7653
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react42.AnimatePresence, { children: visible ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "pointer-events-none fixed inset-x-0 bottom-5 z-50 flex justify-center px-4", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
7654
+ import_react42.motion.div,
7293
7655
  {
7294
7656
  role: "region",
7295
7657
  "aria-label": ariaLabel,
@@ -7302,10 +7664,10 @@ var FloatingUnsavedChangesBar = ({
7302
7664
  className
7303
7665
  ),
7304
7666
  children: [
7305
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "text-sm text-muted-foreground", children: message }),
7306
- /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("span", { className: "flex items-center gap-1.5", children: [
7307
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Button, { variant: "ghost", size: "sm", onClick: onDiscard, disabled: isSaving, children: discardLabel }),
7308
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Button, { size: "sm", onClick: onSave, disabled: saveDisabled || isSaving, children: isSaving ? "Saving\u2026" : saveLabel })
7667
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "text-sm text-muted-foreground", children: message }),
7668
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("span", { className: "flex items-center gap-1.5", children: [
7669
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Button, { variant: "ghost", size: "sm", onClick: onDiscard, disabled: isSaving, children: discardLabel }),
7670
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Button, { size: "sm", onClick: onSave, disabled: saveDisabled || isSaving, children: isSaving ? "Saving\u2026" : saveLabel })
7309
7671
  ] })
7310
7672
  ]
7311
7673
  }
@@ -7315,13 +7677,13 @@ var FloatingUnsavedChangesBar = ({
7315
7677
  };
7316
7678
 
7317
7679
  // src/app/settings/DangerZone.tsx
7318
- var import_jsx_runtime60 = require("react/jsx-runtime");
7680
+ var import_jsx_runtime63 = require("react/jsx-runtime");
7319
7681
  var DangerZoneAction = ({
7320
7682
  title,
7321
7683
  description,
7322
7684
  action,
7323
7685
  className
7324
- }) => /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
7686
+ }) => /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
7325
7687
  "div",
7326
7688
  {
7327
7689
  className: cn(
@@ -7329,11 +7691,11 @@ var DangerZoneAction = ({
7329
7691
  className
7330
7692
  ),
7331
7693
  children: [
7332
- /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "min-w-0", children: [
7333
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("p", { className: "text-sm font-medium text-foreground", children: title }),
7334
- description ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("p", { className: "mt-0.5 text-sm text-muted-foreground", children: description }) : null
7694
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "min-w-0", children: [
7695
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("p", { className: "text-sm font-medium text-foreground", children: title }),
7696
+ description ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("p", { className: "mt-0.5 text-sm text-muted-foreground", children: description }) : null
7335
7697
  ] }),
7336
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "shrink-0", children: action })
7698
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "shrink-0", children: action })
7337
7699
  ]
7338
7700
  }
7339
7701
  );
@@ -7342,7 +7704,7 @@ var DangerZone = ({
7342
7704
  description,
7343
7705
  children,
7344
7706
  className
7345
- }) => /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
7707
+ }) => /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
7346
7708
  "section",
7347
7709
  {
7348
7710
  className: cn(
@@ -7350,18 +7712,18 @@ var DangerZone = ({
7350
7712
  className
7351
7713
  ),
7352
7714
  children: [
7353
- (title || description) && /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("header", { className: "border-b border-destructive/20 bg-destructive/5 px-4 py-3", children: [
7354
- title ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("h3", { className: "text-sm font-semibold text-destructive", children: title }) : null,
7355
- description ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("p", { className: "mt-0.5 text-sm text-muted-foreground", children: description }) : null
7715
+ (title || description) && /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("header", { className: "border-b border-destructive/20 bg-destructive/5 px-4 py-3", children: [
7716
+ title ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("h3", { className: "text-sm font-semibold text-destructive", children: title }) : null,
7717
+ description ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("p", { className: "mt-0.5 text-sm text-muted-foreground", children: description }) : null
7356
7718
  ] }),
7357
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "divide-y divide-border bg-card", children })
7719
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "divide-y divide-border bg-card", children })
7358
7720
  ]
7359
7721
  }
7360
7722
  );
7361
7723
 
7362
7724
  // src/app/integrations/IntegrationCard.tsx
7363
- var import_react40 = require("react");
7364
- var import_jsx_runtime61 = require("react/jsx-runtime");
7725
+ var import_react43 = require("react");
7726
+ var import_jsx_runtime64 = require("react/jsx-runtime");
7365
7727
  var INTEGRATION_CATALOG_CARD_HEIGHT_CLASS = "h-[12.25rem] min-h-[12.25rem] max-h-[12.25rem]";
7366
7728
  var statusLabel = {
7367
7729
  available: null,
@@ -7399,15 +7761,15 @@ var IntegrationCard = ({
7399
7761
  ariaLabel,
7400
7762
  className
7401
7763
  }) => {
7402
- const titleId = (0, import_react40.useId)();
7764
+ const titleId = (0, import_react43.useId)();
7403
7765
  const locked = status === "locked";
7404
7766
  const dimmed = status === "disabled" || locked;
7405
- const body = /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex h-full min-h-0 flex-col", children: [
7406
- /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex shrink-0 items-start gap-3 pr-2", children: [
7407
- logo ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { className: logoShellClass, "aria-hidden": Boolean(ariaLabel), children: logo }) : null,
7408
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "min-w-0 flex-1 pt-0.5", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex items-start justify-between gap-2", children: [
7409
- /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "min-w-0", children: [
7410
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
7767
+ const body = /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "flex h-full min-h-0 flex-col", children: [
7768
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "flex shrink-0 items-start gap-3 pr-2", children: [
7769
+ logo ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: logoShellClass, "aria-hidden": Boolean(ariaLabel), children: logo }) : null,
7770
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "min-w-0 flex-1 pt-0.5", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "flex items-start justify-between gap-2", children: [
7771
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "min-w-0", children: [
7772
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
7411
7773
  "h4",
7412
7774
  {
7413
7775
  id: onClick && !action ? void 0 : titleId,
@@ -7415,12 +7777,12 @@ var IntegrationCard = ({
7415
7777
  children: name
7416
7778
  }
7417
7779
  ),
7418
- statusLabel[status] ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("p", { className: "mt-0.5 text-xs text-muted-foreground", children: statusLabel[status] }) : null
7780
+ statusLabel[status] ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("p", { className: "mt-0.5 text-xs text-muted-foreground", children: statusLabel[status] }) : null
7419
7781
  ] }),
7420
- badge ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { className: "shrink-0", children: badge }) : null
7782
+ badge ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "shrink-0", children: badge }) : null
7421
7783
  ] }) })
7422
7784
  ] }),
7423
- description ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
7785
+ description ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
7424
7786
  "p",
7425
7787
  {
7426
7788
  className: cn(
@@ -7430,9 +7792,9 @@ var IntegrationCard = ({
7430
7792
  children: description
7431
7793
  }
7432
7794
  ) : null,
7433
- action ? /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_jsx_runtime61.Fragment, { children: [
7434
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "min-h-0 flex-1", "aria-hidden": true }),
7435
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "relative mt-3 shrink-0", children: action })
7795
+ action ? /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_jsx_runtime64.Fragment, { children: [
7796
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "min-h-0 flex-1", "aria-hidden": true }),
7797
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "relative mt-3 shrink-0", children: action })
7436
7798
  ] }) : null
7437
7799
  ] });
7438
7800
  const shellClass3 = cn(
@@ -7442,7 +7804,7 @@ var IntegrationCard = ({
7442
7804
  className
7443
7805
  );
7444
7806
  if (onClick && !action) {
7445
- return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
7807
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
7446
7808
  "button",
7447
7809
  {
7448
7810
  type: "button",
@@ -7459,12 +7821,12 @@ var IntegrationCard = ({
7459
7821
  }
7460
7822
  );
7461
7823
  }
7462
- return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("article", { className: shellClass3, "aria-labelledby": titleId, children: body });
7824
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("article", { className: shellClass3, "aria-labelledby": titleId, children: body });
7463
7825
  };
7464
7826
 
7465
7827
  // src/app/integrations/IntegrationsEmptyState.tsx
7466
- var import_react41 = require("react");
7467
- var import_jsx_runtime62 = require("react/jsx-runtime");
7828
+ var import_react44 = require("react");
7829
+ var import_jsx_runtime65 = require("react/jsx-runtime");
7468
7830
  var IntegrationsEmptyState = ({
7469
7831
  title = "No integrations yet",
7470
7832
  description = "Connect a provider to start syncing data and powering your workforce.",
@@ -7472,8 +7834,8 @@ var IntegrationsEmptyState = ({
7472
7834
  action,
7473
7835
  className
7474
7836
  }) => {
7475
- const titleId = (0, import_react41.useId)();
7476
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
7837
+ const titleId = (0, import_react44.useId)();
7838
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
7477
7839
  "section",
7478
7840
  {
7479
7841
  className: cn(
@@ -7483,7 +7845,7 @@ var IntegrationsEmptyState = ({
7483
7845
  ),
7484
7846
  "aria-labelledby": titleId,
7485
7847
  children: [
7486
- icon ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
7848
+ icon ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
7487
7849
  "span",
7488
7850
  {
7489
7851
  className: cn(
@@ -7495,21 +7857,21 @@ var IntegrationsEmptyState = ({
7495
7857
  children: icon
7496
7858
  }
7497
7859
  ) : null,
7498
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("h3", { id: titleId, className: "text-base font-normal text-foreground", children: title }),
7499
- description ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("p", { className: "max-w-sm text-sm text-muted-foreground", children: description }) : null,
7500
- action ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "mt-1", children: action }) : null
7860
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("h3", { id: titleId, className: "text-base font-normal text-foreground", children: title }),
7861
+ description ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("p", { className: "max-w-sm text-sm text-muted-foreground", children: description }) : null,
7862
+ action ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "mt-1", children: action }) : null
7501
7863
  ]
7502
7864
  }
7503
7865
  );
7504
7866
  };
7505
7867
 
7506
7868
  // src/app/integrations/PlanBadge.tsx
7507
- var import_jsx_runtime63 = require("react/jsx-runtime");
7869
+ var import_jsx_runtime66 = require("react/jsx-runtime");
7508
7870
  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";
7509
- var PlanBadge = ({ children, className }) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: cn(planBadgeClass, className), children });
7871
+ var PlanBadge = ({ children, className }) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: cn(planBadgeClass, className), children });
7510
7872
 
7511
7873
  // src/app/integrations/ConnectionRow.tsx
7512
- var import_jsx_runtime64 = require("react/jsx-runtime");
7874
+ var import_jsx_runtime67 = require("react/jsx-runtime");
7513
7875
  var logoShellClass2 = cn(
7514
7876
  "flex size-9 shrink-0 items-center justify-center overflow-hidden rounded-lg",
7515
7877
  TIMBAL_V2_LOGO_TILE
@@ -7524,14 +7886,14 @@ var ConnectionRow = ({
7524
7886
  ariaLabel,
7525
7887
  className
7526
7888
  }) => {
7527
- const inner = /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_jsx_runtime64.Fragment, { children: [
7528
- logo ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: logoShellClass2, children: logo }) : null,
7529
- /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "min-w-0 flex-1", children: [
7530
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("p", { className: "truncate text-sm font-normal text-foreground", children: name }),
7531
- meta ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("p", { className: "truncate text-xs text-muted-foreground", children: meta }) : null
7889
+ const inner = /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_jsx_runtime67.Fragment, { children: [
7890
+ logo ? /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: logoShellClass2, children: logo }) : null,
7891
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "min-w-0 flex-1", children: [
7892
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("p", { className: "truncate text-sm font-normal text-foreground", children: name }),
7893
+ meta ? /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("p", { className: "truncate text-xs text-muted-foreground", children: meta }) : null
7532
7894
  ] }),
7533
- badge ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "shrink-0", children: badge }) : null,
7534
- action ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "shrink-0", children: action }) : null
7895
+ badge ? /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "shrink-0", children: badge }) : null,
7896
+ action ? /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "shrink-0", children: action }) : null
7535
7897
  ] });
7536
7898
  const rowClass2 = cn(
7537
7899
  "flex w-full items-center gap-3 px-4 py-3 text-left",
@@ -7539,7 +7901,7 @@ var ConnectionRow = ({
7539
7901
  className
7540
7902
  );
7541
7903
  if (onClick) {
7542
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
7904
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
7543
7905
  "button",
7544
7906
  {
7545
7907
  type: "button",
@@ -7551,7 +7913,7 @@ var ConnectionRow = ({
7551
7913
  }
7552
7914
  );
7553
7915
  }
7554
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { role: "listitem", className: rowClass2, children: inner });
7916
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { role: "listitem", className: rowClass2, children: inner });
7555
7917
  };
7556
7918
  var connectionRowListClass = cn(
7557
7919
  "overflow-hidden rounded-2xl",
@@ -7559,12 +7921,12 @@ var connectionRowListClass = cn(
7559
7921
  );
7560
7922
 
7561
7923
  // src/app/integrations/ConnectionRowList.tsx
7562
- var import_jsx_runtime65 = require("react/jsx-runtime");
7924
+ var import_jsx_runtime68 = require("react/jsx-runtime");
7563
7925
  var ConnectionRowList = ({
7564
7926
  children,
7565
7927
  "aria-label": ariaLabel = "Connected integrations",
7566
7928
  className
7567
- }) => /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
7929
+ }) => /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
7568
7930
  "div",
7569
7931
  {
7570
7932
  role: "list",
@@ -7575,8 +7937,8 @@ var ConnectionRowList = ({
7575
7937
  );
7576
7938
 
7577
7939
  // src/ui/pill-segmented-tabs.tsx
7578
- var import_react42 = require("react");
7579
- var import_react43 = require("motion/react");
7940
+ var import_react45 = require("react");
7941
+ var import_react46 = require("motion/react");
7580
7942
 
7581
7943
  // src/design/pill-segmented-classes.ts
7582
7944
  var pillSegmentedTrackBase = "inline-flex w-fit max-w-max shrink-0 self-start items-center rounded-full";
@@ -7609,7 +7971,7 @@ var pillSegmentedActiveIndicatorClass = cn(
7609
7971
  );
7610
7972
 
7611
7973
  // src/ui/pill-segmented-tabs.tsx
7612
- var import_jsx_runtime66 = require("react/jsx-runtime");
7974
+ var import_jsx_runtime69 = require("react/jsx-runtime");
7613
7975
  var PillTab = ({
7614
7976
  tabKey,
7615
7977
  label,
@@ -7620,10 +7982,10 @@ var PillTab = ({
7620
7982
  segmentClassName,
7621
7983
  animateIndicator
7622
7984
  }) => {
7623
- const handlePress = (0, import_react42.useCallback)(() => {
7985
+ const handlePress = (0, import_react45.useCallback)(() => {
7624
7986
  if (!disabled) onSelect(tabKey);
7625
7987
  }, [disabled, onSelect, tabKey]);
7626
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
7988
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
7627
7989
  "button",
7628
7990
  {
7629
7991
  type: "button",
@@ -7636,15 +7998,15 @@ var PillTab = ({
7636
7998
  !disabled && (isActive ? "text-foreground" : "text-muted-foreground hover:text-foreground")
7637
7999
  ),
7638
8000
  children: [
7639
- isActive && animateIndicator ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
7640
- import_react43.motion.div,
8001
+ isActive && animateIndicator ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
8002
+ import_react46.motion.div,
7641
8003
  {
7642
8004
  layoutId,
7643
8005
  className: pillSegmentedActiveIndicatorClass,
7644
8006
  transition: { type: "spring", duration: 0.3, bounce: 0.15 }
7645
8007
  }
7646
- ) : isActive ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: pillSegmentedActiveIndicatorClass, "aria-hidden": true }) : null,
7647
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "relative z-10 whitespace-nowrap", children: label })
8008
+ ) : isActive ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: pillSegmentedActiveIndicatorClass, "aria-hidden": true }) : null,
8009
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "relative z-10 whitespace-nowrap", children: label })
7648
8010
  ]
7649
8011
  }
7650
8012
  );
@@ -7658,13 +8020,13 @@ var PillSegmentedTabs = ({
7658
8020
  layoutId: layoutIdProp,
7659
8021
  "aria-label": ariaLabel
7660
8022
  }) => {
7661
- const reactId = (0, import_react42.useId)();
8023
+ const reactId = (0, import_react45.useId)();
7662
8024
  const layoutId = layoutIdProp ?? `pill-segmented-${reactId.replace(/:/g, "")}`;
7663
- const reducedMotion = (0, import_react43.useReducedMotion)();
8025
+ const reducedMotion = (0, import_react46.useReducedMotion)();
7664
8026
  const isFlush = trackVariant === "flush";
7665
8027
  const trackClass2 = isFlush ? pillSegmentedTrackFlushClass : pillSegmentedTrackClass;
7666
8028
  const segmentClassName = isFlush ? pillSegmentedFlushSegmentClass : pillSegmentedSegmentClass;
7667
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { role: "group", "aria-label": ariaLabel, className: cn(trackClass2, className), children: tabs.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
8029
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { role: "group", "aria-label": ariaLabel, className: cn(trackClass2, className), children: tabs.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
7668
8030
  PillTab,
7669
8031
  {
7670
8032
  tabKey: tab.key,
@@ -7679,10 +8041,10 @@ var PillSegmentedTabs = ({
7679
8041
  tab.key
7680
8042
  )) });
7681
8043
  };
7682
- var MemoPillSegmentedTabs = (0, import_react42.memo)(PillSegmentedTabs);
8044
+ var MemoPillSegmentedTabs = (0, import_react45.memo)(PillSegmentedTabs);
7683
8045
 
7684
8046
  // src/app/navigation/SubNav.tsx
7685
- var import_jsx_runtime67 = require("react/jsx-runtime");
8047
+ var import_jsx_runtime70 = require("react/jsx-runtime");
7686
8048
  var SubNav = ({
7687
8049
  items,
7688
8050
  activeId,
@@ -7691,7 +8053,7 @@ var SubNav = ({
7691
8053
  "aria-label": ariaLabel = "Section navigation",
7692
8054
  layoutId
7693
8055
  }) => {
7694
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("nav", { className: cn("aui-app-sub-nav", className), "aria-label": ariaLabel, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
8056
+ return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("nav", { className: cn("aui-app-sub-nav", className), "aria-label": ariaLabel, children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
7695
8057
  PillSegmentedTabs,
7696
8058
  {
7697
8059
  value: activeId,
@@ -7705,13 +8067,13 @@ var SubNav = ({
7705
8067
  };
7706
8068
 
7707
8069
  // src/app/navigation/Breadcrumbs.tsx
7708
- var import_jsx_runtime68 = require("react/jsx-runtime");
8070
+ var import_jsx_runtime71 = require("react/jsx-runtime");
7709
8071
  var Breadcrumbs = ({ items, className }) => {
7710
- return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("nav", { className: cn("aui-app-breadcrumbs", appBreadcrumbsClass, className), "aria-label": "Breadcrumb", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("ol", { className: "flex flex-wrap items-center gap-1.5", children: items.map((item, index) => {
8072
+ return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("nav", { className: cn("aui-app-breadcrumbs", appBreadcrumbsClass, className), "aria-label": "Breadcrumb", children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("ol", { className: "flex flex-wrap items-center gap-1.5", children: items.map((item, index) => {
7711
8073
  const isLast = index === items.length - 1;
7712
- return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("li", { className: "inline-flex items-center gap-1.5", children: [
7713
- index > 0 ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "text-muted-foreground/50", "aria-hidden": true, children: "/" }) : null,
7714
- isLast ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "text-foreground", "aria-current": "page", children: item.label }) : item.href ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("a", { href: item.href, className: appBreadcrumbLinkClass, children: item.label }) : /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
8074
+ return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("li", { className: "inline-flex items-center gap-1.5", children: [
8075
+ index > 0 ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "text-muted-foreground/50", "aria-hidden": true, children: "/" }) : null,
8076
+ isLast ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "text-foreground", "aria-current": "page", children: item.label }) : item.href ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("a", { href: item.href, className: appBreadcrumbLinkClass, children: item.label }) : /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
7715
8077
  "button",
7716
8078
  {
7717
8079
  type: "button",
@@ -7725,7 +8087,7 @@ var Breadcrumbs = ({ items, className }) => {
7725
8087
  };
7726
8088
 
7727
8089
  // src/app/forms/Field.tsx
7728
- var import_jsx_runtime69 = require("react/jsx-runtime");
8090
+ var import_jsx_runtime72 = require("react/jsx-runtime");
7729
8091
  var Field = ({
7730
8092
  label,
7731
8093
  hint,
@@ -7734,11 +8096,11 @@ var Field = ({
7734
8096
  className,
7735
8097
  htmlFor
7736
8098
  }) => {
7737
- return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: cn("aui-app-field", appFieldClass, className), children: [
7738
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("label", { className: appFieldLabelClass, htmlFor, children: label }),
8099
+ return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: cn("aui-app-field", appFieldClass, className), children: [
8100
+ /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("label", { className: appFieldLabelClass, htmlFor, children: label }),
7739
8101
  children,
7740
- hint && !error ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("p", { className: appFieldHintClass, children: hint }) : null,
7741
- error ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("p", { className: "text-xs text-destructive", role: "alert", children: error }) : null
8102
+ hint && !error ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("p", { className: appFieldHintClass, children: hint }) : null,
8103
+ error ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("p", { className: "text-xs text-destructive", role: "alert", children: error }) : null
7742
8104
  ] });
7743
8105
  };
7744
8106
  var FieldInput = ({
@@ -7751,7 +8113,7 @@ var FieldInput = ({
7751
8113
  ...inputProps
7752
8114
  }) => {
7753
8115
  const inputId = id ?? inputProps.name;
7754
- return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
8116
+ return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
7755
8117
  Field,
7756
8118
  {
7757
8119
  label,
@@ -7759,7 +8121,7 @@ var FieldInput = ({
7759
8121
  error,
7760
8122
  htmlFor: inputId,
7761
8123
  className: fieldClassName,
7762
- children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
8124
+ children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
7763
8125
  "input",
7764
8126
  {
7765
8127
  id: inputId,
@@ -7773,7 +8135,7 @@ var FieldInput = ({
7773
8135
  };
7774
8136
 
7775
8137
  // src/app/forms/FieldTextarea.tsx
7776
- var import_jsx_runtime70 = require("react/jsx-runtime");
8138
+ var import_jsx_runtime73 = require("react/jsx-runtime");
7777
8139
  var textareaClass = cn(
7778
8140
  appInputClass,
7779
8141
  "min-h-[5.5rem] resize-y py-2.5 leading-relaxed"
@@ -7788,7 +8150,7 @@ var FieldTextarea = ({
7788
8150
  ...props
7789
8151
  }) => {
7790
8152
  const textareaId = id ?? props.name;
7791
- return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
8153
+ return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
7792
8154
  Field,
7793
8155
  {
7794
8156
  label,
@@ -7796,7 +8158,7 @@ var FieldTextarea = ({
7796
8158
  error,
7797
8159
  htmlFor: textareaId,
7798
8160
  className: fieldClassName,
7799
- children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
8161
+ children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
7800
8162
  "textarea",
7801
8163
  {
7802
8164
  id: textareaId,
@@ -7811,7 +8173,7 @@ var FieldTextarea = ({
7811
8173
 
7812
8174
  // src/app/forms/FieldSelect.tsx
7813
8175
  var import_lucide_react11 = require("lucide-react");
7814
- var import_jsx_runtime71 = require("react/jsx-runtime");
8176
+ var import_jsx_runtime74 = require("react/jsx-runtime");
7815
8177
  var selectWrapClass = "relative";
7816
8178
  var selectClass = cn(
7817
8179
  appInputClass,
@@ -7828,7 +8190,7 @@ var FieldSelect = ({
7828
8190
  ...props
7829
8191
  }) => {
7830
8192
  const selectId = id ?? props.name;
7831
- return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
8193
+ return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
7832
8194
  Field,
7833
8195
  {
7834
8196
  label,
@@ -7836,8 +8198,8 @@ var FieldSelect = ({
7836
8198
  error,
7837
8199
  htmlFor: selectId,
7838
8200
  className: fieldClassName,
7839
- children: /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: selectWrapClass, children: [
7840
- /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
8201
+ children: /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: selectWrapClass, children: [
8202
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
7841
8203
  "select",
7842
8204
  {
7843
8205
  id: selectId,
@@ -7847,7 +8209,7 @@ var FieldSelect = ({
7847
8209
  children
7848
8210
  }
7849
8211
  ),
7850
- /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
8212
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
7851
8213
  import_lucide_react11.ChevronDownIcon,
7852
8214
  {
7853
8215
  className: "pointer-events-none absolute top-1/2 right-3 size-4 -translate-y-1/2 text-muted-foreground",
@@ -7860,7 +8222,7 @@ var FieldSelect = ({
7860
8222
  };
7861
8223
 
7862
8224
  // src/app/forms/FieldSwitch.tsx
7863
- var import_jsx_runtime72 = require("react/jsx-runtime");
8225
+ var import_jsx_runtime75 = require("react/jsx-runtime");
7864
8226
  var trackClass = cn(
7865
8227
  "relative inline-flex h-5 w-9 shrink-0 items-center rounded-full transition-[background,box-shadow,border-color] duration-200",
7866
8228
  "peer-focus-visible:ring-2 peer-focus-visible:ring-foreground/10",
@@ -7881,7 +8243,7 @@ var FieldSwitch = ({
7881
8243
  ...props
7882
8244
  }) => {
7883
8245
  const inputId = id ?? props.name ?? "switch";
7884
- return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
8246
+ return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(
7885
8247
  "label",
7886
8248
  {
7887
8249
  className: cn(
@@ -7890,8 +8252,8 @@ var FieldSwitch = ({
7890
8252
  ),
7891
8253
  htmlFor: inputId,
7892
8254
  children: [
7893
- /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("span", { className: "relative mt-0.5", children: [
7894
- /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
8255
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("span", { className: "relative mt-0.5", children: [
8256
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
7895
8257
  "input",
7896
8258
  {
7897
8259
  id: inputId,
@@ -7901,11 +8263,11 @@ var FieldSwitch = ({
7901
8263
  ...props
7902
8264
  }
7903
8265
  ),
7904
- /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: trackClass, "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: thumbClass }) })
8266
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: trackClass, "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: thumbClass }) })
7905
8267
  ] }),
7906
- /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("span", { className: "flex min-w-0 flex-col gap-0.5", children: [
7907
- /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: "text-sm font-medium text-foreground", children: label }),
7908
- description ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: "text-xs text-muted-foreground", children: description }) : null
8268
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("span", { className: "flex min-w-0 flex-col gap-0.5", children: [
8269
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "text-sm font-medium text-foreground", children: label }),
8270
+ description ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "text-xs text-muted-foreground", children: description }) : null
7909
8271
  ] })
7910
8272
  ]
7911
8273
  }
@@ -7914,13 +8276,13 @@ var FieldSwitch = ({
7914
8276
 
7915
8277
  // src/app/forms/SearchInput.tsx
7916
8278
  var import_lucide_react12 = require("lucide-react");
7917
- var import_jsx_runtime73 = require("react/jsx-runtime");
8279
+ var import_jsx_runtime76 = require("react/jsx-runtime");
7918
8280
  var SearchInput = ({
7919
8281
  className,
7920
8282
  placeholder = "Search\u2026",
7921
8283
  ...props
7922
8284
  }) => {
7923
- return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
8285
+ return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
7924
8286
  "label",
7925
8287
  {
7926
8288
  className: cn(
@@ -7929,8 +8291,8 @@ var SearchInput = ({
7929
8291
  className
7930
8292
  ),
7931
8293
  children: [
7932
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_lucide_react12.SearchIcon, { className: "size-4 shrink-0 text-muted-foreground", "aria-hidden": true }),
7933
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
8294
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_lucide_react12.SearchIcon, { className: "size-4 shrink-0 text-muted-foreground", "aria-hidden": true }),
8295
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
7934
8296
  "input",
7935
8297
  {
7936
8298
  type: "search",
@@ -7945,18 +8307,18 @@ var SearchInput = ({
7945
8307
  };
7946
8308
 
7947
8309
  // src/app/forms/FormSection.tsx
7948
- var import_jsx_runtime74 = require("react/jsx-runtime");
8310
+ var import_jsx_runtime77 = require("react/jsx-runtime");
7949
8311
  var FormSection = ({ title, children, className }) => {
7950
- return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("fieldset", { className: cn("aui-app-form-section", appSectionClass, "border-0 p-0", className), children: [
7951
- title ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("legend", { className: cn(appSectionTitleClass, "mb-3 px-0"), children: title }) : null,
7952
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "flex flex-col gap-4", children })
8312
+ return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("fieldset", { className: cn("aui-app-form-section", appSectionClass, "border-0 p-0", className), children: [
8313
+ title ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("legend", { className: cn(appSectionTitleClass, "mb-3 px-0"), children: title }) : null,
8314
+ /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "flex flex-col gap-4", children })
7953
8315
  ] });
7954
8316
  };
7955
8317
 
7956
8318
  // src/app/data/FilterBar.tsx
7957
- var import_jsx_runtime75 = require("react/jsx-runtime");
8319
+ var import_jsx_runtime78 = require("react/jsx-runtime");
7958
8320
  var FilterBar = ({ children, className }) => {
7959
- return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
8321
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
7960
8322
  "div",
7961
8323
  {
7962
8324
  className: cn("aui-app-filter-bar", appFilterBarClass, className),
@@ -7968,31 +8330,31 @@ var FilterBar = ({ children, className }) => {
7968
8330
  };
7969
8331
 
7970
8332
  // src/app/data/FilterField.tsx
7971
- var import_jsx_runtime76 = require("react/jsx-runtime");
8333
+ var import_jsx_runtime79 = require("react/jsx-runtime");
7972
8334
  var FilterField = ({
7973
8335
  label,
7974
8336
  children,
7975
8337
  className
7976
8338
  }) => {
7977
- return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: cn("aui-app-filter-field", appFieldClass, className), children: [
7978
- label ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: appFieldLabelClass, children: label }) : null,
8339
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: cn("aui-app-filter-field", appFieldClass, className), children: [
8340
+ label ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: appFieldLabelClass, children: label }) : null,
7979
8341
  children
7980
8342
  ] });
7981
8343
  };
7982
8344
 
7983
8345
  // src/app/data/DataTable.tsx
7984
- var import_react44 = require("react");
8346
+ var import_react47 = require("react");
7985
8347
  var import_lucide_react14 = require("lucide-react");
7986
8348
 
7987
8349
  // src/ui/checkbox.tsx
7988
8350
  var import_radix_ui5 = require("radix-ui");
7989
8351
  var import_lucide_react13 = require("lucide-react");
7990
- var import_jsx_runtime77 = require("react/jsx-runtime");
8352
+ var import_jsx_runtime80 = require("react/jsx-runtime");
7991
8353
  function Checkbox({
7992
8354
  className,
7993
8355
  ...props
7994
8356
  }) {
7995
- return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
8357
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
7996
8358
  import_radix_ui5.Checkbox.Root,
7997
8359
  {
7998
8360
  "data-slot": "checkbox",
@@ -8003,12 +8365,12 @@ function Checkbox({
8003
8365
  className
8004
8366
  ),
8005
8367
  ...props,
8006
- children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
8368
+ children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
8007
8369
  import_radix_ui5.Checkbox.Indicator,
8008
8370
  {
8009
8371
  "data-slot": "checkbox-indicator",
8010
8372
  className: "flex items-center justify-center text-current transition-none",
8011
- children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_lucide_react13.CheckIcon, { className: "size-3.5" })
8373
+ children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_lucide_react13.CheckIcon, { className: "size-3.5" })
8012
8374
  }
8013
8375
  )
8014
8376
  }
@@ -8016,9 +8378,9 @@ function Checkbox({
8016
8378
  }
8017
8379
 
8018
8380
  // src/ui/skeleton.tsx
8019
- var import_jsx_runtime78 = require("react/jsx-runtime");
8381
+ var import_jsx_runtime81 = require("react/jsx-runtime");
8020
8382
  function Skeleton({ className, ...props }) {
8021
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
8383
+ return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
8022
8384
  "div",
8023
8385
  {
8024
8386
  "data-slot": "skeleton",
@@ -8029,7 +8391,7 @@ function Skeleton({ className, ...props }) {
8029
8391
  }
8030
8392
 
8031
8393
  // src/app/data/DataTable.tsx
8032
- var import_jsx_runtime79 = require("react/jsx-runtime");
8394
+ var import_jsx_runtime82 = require("react/jsx-runtime");
8033
8395
  var shellClass2 = "overflow-hidden rounded-xl border border-border bg-card shadow-card";
8034
8396
  var tableClass = "w-full border-collapse bg-transparent text-sm";
8035
8397
  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";
@@ -8071,12 +8433,12 @@ function SortIndicator({
8071
8433
  }) {
8072
8434
  const iconClass = "size-3.5 shrink-0 opacity-60 group-hover:opacity-100";
8073
8435
  if (!active) {
8074
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_lucide_react14.ArrowUpDownIcon, { className: iconClass, "aria-hidden": true });
8436
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react14.ArrowUpDownIcon, { className: iconClass, "aria-hidden": true });
8075
8437
  }
8076
8438
  if (direction === "desc") {
8077
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_lucide_react14.ArrowDownIcon, { className: iconClass, "aria-hidden": true });
8439
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react14.ArrowDownIcon, { className: iconClass, "aria-hidden": true });
8078
8440
  }
8079
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_lucide_react14.ArrowUpIcon, { className: iconClass, "aria-hidden": true });
8441
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react14.ArrowUpIcon, { className: iconClass, "aria-hidden": true });
8080
8442
  }
8081
8443
  function DataTable({
8082
8444
  columns,
@@ -8108,7 +8470,7 @@ function DataTable({
8108
8470
  defaultPageIndex = 0,
8109
8471
  onPageChange
8110
8472
  }) {
8111
- const [uncontrolledSort, setUncontrolledSort] = (0, import_react44.useState)(
8473
+ const [uncontrolledSort, setUncontrolledSort] = (0, import_react47.useState)(
8112
8474
  defaultSort
8113
8475
  );
8114
8476
  const isSortControlled = sortProp !== void 0;
@@ -8119,19 +8481,19 @@ function DataTable({
8119
8481
  }
8120
8482
  onSortChange?.(next);
8121
8483
  };
8122
- const [uncontrolledSelected, setUncontrolledSelected] = (0, import_react44.useState)(
8484
+ const [uncontrolledSelected, setUncontrolledSelected] = (0, import_react47.useState)(
8123
8485
  defaultSelectedKeys ?? []
8124
8486
  );
8125
8487
  const isSelectionControlled = selectedKeysProp !== void 0;
8126
8488
  const selectedKeys = isSelectionControlled ? selectedKeysProp : uncontrolledSelected;
8127
- const selectedSet = (0, import_react44.useMemo)(() => new Set(selectedKeys), [selectedKeys]);
8489
+ const selectedSet = (0, import_react47.useMemo)(() => new Set(selectedKeys), [selectedKeys]);
8128
8490
  const setSelected = (next) => {
8129
8491
  if (!isSelectionControlled) {
8130
8492
  setUncontrolledSelected(next);
8131
8493
  }
8132
8494
  onSelectionChange?.(next);
8133
8495
  };
8134
- const [uncontrolledPage, setUncontrolledPage] = (0, import_react44.useState)(defaultPageIndex);
8496
+ const [uncontrolledPage, setUncontrolledPage] = (0, import_react47.useState)(defaultPageIndex);
8135
8497
  const isPageControlled = pageIndexProp !== void 0;
8136
8498
  const rawPageIndex = isPageControlled ? pageIndexProp : uncontrolledPage;
8137
8499
  const setPage = (next) => {
@@ -8140,7 +8502,7 @@ function DataTable({
8140
8502
  }
8141
8503
  onPageChange?.(next);
8142
8504
  };
8143
- const sortedRows = (0, import_react44.useMemo)(() => {
8505
+ const sortedRows = (0, import_react47.useMemo)(() => {
8144
8506
  if (!sort) return rows;
8145
8507
  const column = columns.find((col) => col.id === sort.columnId);
8146
8508
  if (!column?.sortable) return rows;
@@ -8159,13 +8521,13 @@ function DataTable({
8159
8521
  const paginated = typeof pageSize === "number" && pageSize > 0;
8160
8522
  const pageCount = paginated ? Math.max(1, Math.ceil(sortedRows.length / pageSize)) : 1;
8161
8523
  const pageIndex = Math.min(Math.max(0, rawPageIndex), pageCount - 1);
8162
- (0, import_react44.useEffect)(() => {
8524
+ (0, import_react47.useEffect)(() => {
8163
8525
  if (!paginated || isPageControlled) return;
8164
8526
  if (uncontrolledPage > pageCount - 1) {
8165
8527
  setUncontrolledPage(pageCount - 1);
8166
8528
  }
8167
8529
  }, [paginated, isPageControlled, uncontrolledPage, pageCount]);
8168
- const visibleRows = (0, import_react44.useMemo)(() => {
8530
+ const visibleRows = (0, import_react47.useMemo)(() => {
8169
8531
  if (!paginated) return sortedRows;
8170
8532
  const start = pageIndex * pageSize;
8171
8533
  return sortedRows.slice(start, start + pageSize);
@@ -8174,7 +8536,7 @@ function DataTable({
8174
8536
  const headPad = dense ? "px-3 py-2" : void 0;
8175
8537
  const colSpan = columns.length + (selectable ? 1 : 0);
8176
8538
  if (!loading && rows.length === 0 && emptyMode === "replace") {
8177
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(EmptyState, { title: emptyTitle, description: emptyDescription, className });
8539
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(EmptyState, { title: emptyTitle, description: emptyDescription, className });
8178
8540
  }
8179
8541
  const allKeys = sortedRows.map(getRowKey);
8180
8542
  const allSelected = allKeys.length > 0 && allKeys.every((k) => selectedSet.has(k));
@@ -8199,10 +8561,10 @@ function DataTable({
8199
8561
  const hasPager = paginated && !loading && sortedRows.length > 0;
8200
8562
  const hasFoot = (showRowCount || footer || hasPager) && (loading || sortedRows.length > 0);
8201
8563
  const skeletonCount = loadingRows ?? pageSize ?? 5;
8202
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: cn("aui-app-data-table", shellClass2, className), children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "overflow-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("table", { className: tableClass, children: [
8203
- caption ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("caption", { className: "sr-only", children: caption }) : null,
8204
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("thead", { className: cn(stickyHeader && stickyHeadClass), children: /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("tr", { children: [
8205
- selectable ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("th", { scope: "col", className: cn(selectCellClass, headPad), children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
8564
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: cn("aui-app-data-table", shellClass2, className), children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "overflow-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("table", { className: tableClass, children: [
8565
+ caption ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("caption", { className: "sr-only", children: caption }) : null,
8566
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("thead", { className: cn(stickyHeader && stickyHeadClass), children: /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("tr", { children: [
8567
+ selectable ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("th", { scope: "col", className: cn(selectCellClass, headPad), children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
8206
8568
  Checkbox,
8207
8569
  {
8208
8570
  checked: headerCheckedState,
@@ -8214,19 +8576,19 @@ function DataTable({
8214
8576
  columns.map((col) => {
8215
8577
  const isSorted = sort?.columnId === col.id;
8216
8578
  const ariaSort = col.sortable ? isSorted ? sort.direction === "asc" ? "ascending" : "descending" : "none" : void 0;
8217
- const headerContent = col.sortable ? /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
8579
+ const headerContent = col.sortable ? /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
8218
8580
  "button",
8219
8581
  {
8220
8582
  type: "button",
8221
8583
  className: sortButtonClass,
8222
8584
  onClick: () => setSort(nextSort(sort, col.id)),
8223
8585
  children: [
8224
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "truncate", children: col.header }),
8225
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(SortIndicator, { active: Boolean(isSorted), direction: sort?.direction })
8586
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "truncate", children: col.header }),
8587
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(SortIndicator, { active: Boolean(isSorted), direction: sort?.direction })
8226
8588
  ]
8227
8589
  }
8228
8590
  ) : col.header;
8229
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
8591
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
8230
8592
  "th",
8231
8593
  {
8232
8594
  scope: "col",
@@ -8243,9 +8605,9 @@ function DataTable({
8243
8605
  );
8244
8606
  })
8245
8607
  ] }) }),
8246
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("tbody", { className: cn(!hasFoot && "[&_tr:last-child_td]:border-b-0"), children: loading ? Array.from({ length: skeletonCount }).map((_, rowIdx) => /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("tr", { className: rowClass, "aria-hidden": true, children: [
8247
- selectable ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("td", { className: cn(selectCellClass, cellPad), children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Skeleton, { className: "size-4 rounded-[4px]" }) }) : null,
8248
- columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
8608
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("tbody", { className: cn(!hasFoot && "[&_tr:last-child_td]:border-b-0"), children: loading ? Array.from({ length: skeletonCount }).map((_, rowIdx) => /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("tr", { className: rowClass, "aria-hidden": true, children: [
8609
+ selectable ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("td", { className: cn(selectCellClass, cellPad), children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Skeleton, { className: "size-4 rounded-[4px]" }) }) : null,
8610
+ columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
8249
8611
  "td",
8250
8612
  {
8251
8613
  className: cn(
@@ -8254,17 +8616,17 @@ function DataTable({
8254
8616
  col.align && alignClass[col.align],
8255
8617
  col.className
8256
8618
  ),
8257
- children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Skeleton, { className: "h-4 w-[60%]" })
8619
+ children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Skeleton, { className: "h-4 w-[60%]" })
8258
8620
  },
8259
8621
  col.id
8260
8622
  ))
8261
- ] }, `skeleton-${rowIdx}`)) : visibleRows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("td", { colSpan, className: emptyCellClass, children: /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "flex flex-col items-center gap-1", children: [
8262
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("p", { className: "font-medium text-foreground", children: emptyTitle }),
8263
- emptyDescription ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("p", { className: "max-w-sm text-muted-foreground", children: emptyDescription }) : null
8623
+ ] }, `skeleton-${rowIdx}`)) : visibleRows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("td", { colSpan, className: emptyCellClass, children: /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "flex flex-col items-center gap-1", children: [
8624
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("p", { className: "font-medium text-foreground", children: emptyTitle }),
8625
+ emptyDescription ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("p", { className: "max-w-sm text-muted-foreground", children: emptyDescription }) : null
8264
8626
  ] }) }) }) : visibleRows.map((row) => {
8265
8627
  const key = getRowKey(row);
8266
8628
  const isSelected = selectedSet.has(key);
8267
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
8629
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
8268
8630
  "tr",
8269
8631
  {
8270
8632
  className: rowClass,
@@ -8280,12 +8642,12 @@ function DataTable({
8280
8642
  tabIndex: onRowClick ? 0 : void 0,
8281
8643
  role: onRowClick ? "button" : void 0,
8282
8644
  children: [
8283
- selectable ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
8645
+ selectable ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
8284
8646
  "td",
8285
8647
  {
8286
8648
  className: cn(selectCellClass, cellPad),
8287
8649
  onClick: (event) => event.stopPropagation(),
8288
- children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
8650
+ children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
8289
8651
  Checkbox,
8290
8652
  {
8291
8653
  checked: isSelected,
@@ -8295,16 +8657,17 @@ function DataTable({
8295
8657
  )
8296
8658
  }
8297
8659
  ) : null,
8298
- columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
8660
+ columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
8299
8661
  "td",
8300
8662
  {
8301
8663
  className: cn(
8302
8664
  bodyCellClass,
8303
8665
  cellPad,
8666
+ col.truncate && "max-w-0",
8304
8667
  col.align && alignClass[col.align],
8305
8668
  col.className
8306
8669
  ),
8307
- children: col.cell(row)
8670
+ children: col.truncate ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "truncate", children: col.cell(row) }) : col.cell(row)
8308
8671
  },
8309
8672
  col.id
8310
8673
  ))
@@ -8313,7 +8676,7 @@ function DataTable({
8313
8676
  key
8314
8677
  );
8315
8678
  }) }),
8316
- hasFoot ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("tfoot", { children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("td", { colSpan, className: footCellClass, children: /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
8679
+ hasFoot ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("tfoot", { children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("td", { colSpan, className: footCellClass, children: /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
8317
8680
  "div",
8318
8681
  {
8319
8682
  className: cn(
@@ -8321,18 +8684,18 @@ function DataTable({
8321
8684
  (showRowCount || footer || hasPager) && "justify-between"
8322
8685
  ),
8323
8686
  children: [
8324
- /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: footInnerClass, children: [
8325
- showRowCount ? /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("span", { children: [
8687
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: footInnerClass, children: [
8688
+ showRowCount ? /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("span", { children: [
8326
8689
  rowCountText,
8327
8690
  selectable && selectedSet.size > 0 ? ` \xB7 ${selectedSet.size} selected` : null
8328
- ] }) : selectable && selectedSet.size > 0 ? /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("span", { children: [
8691
+ ] }) : selectable && selectedSet.size > 0 ? /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("span", { children: [
8329
8692
  selectedSet.size,
8330
8693
  " selected"
8331
8694
  ] }) : null,
8332
8695
  footer
8333
8696
  ] }),
8334
- hasPager ? /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "flex items-center gap-2", children: [
8335
- /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("span", { className: "tabular-nums", children: [
8697
+ hasPager ? /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "flex items-center gap-2", children: [
8698
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("span", { className: "tabular-nums", children: [
8336
8699
  pageIndex * pageSize + 1,
8337
8700
  "\u2013",
8338
8701
  Math.min(
@@ -8343,8 +8706,8 @@ function DataTable({
8343
8706
  "of ",
8344
8707
  sortedRows.length
8345
8708
  ] }),
8346
- /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "flex items-center gap-1", children: [
8347
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
8709
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "flex items-center gap-1", children: [
8710
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
8348
8711
  "button",
8349
8712
  {
8350
8713
  type: "button",
@@ -8352,10 +8715,10 @@ function DataTable({
8352
8715
  onClick: () => setPage(pageIndex - 1),
8353
8716
  disabled: pageIndex <= 0,
8354
8717
  "aria-label": "Previous page",
8355
- children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_lucide_react14.ChevronLeftIcon, { className: "size-4", "aria-hidden": true })
8718
+ children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react14.ChevronLeftIcon, { className: "size-4", "aria-hidden": true })
8356
8719
  }
8357
8720
  ),
8358
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
8721
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
8359
8722
  "button",
8360
8723
  {
8361
8724
  type: "button",
@@ -8363,7 +8726,7 @@ function DataTable({
8363
8726
  onClick: () => setPage(pageIndex + 1),
8364
8727
  disabled: pageIndex >= pageCount - 1,
8365
8728
  "aria-label": "Next page",
8366
- children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_lucide_react14.ChevronRightIcon, { className: "size-4", "aria-hidden": true })
8729
+ children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react14.ChevronRightIcon, { className: "size-4", "aria-hidden": true })
8367
8730
  }
8368
8731
  )
8369
8732
  ] })
@@ -8375,8 +8738,8 @@ function DataTable({
8375
8738
  }
8376
8739
 
8377
8740
  // src/app/data/ChartPanel.tsx
8378
- var import_react45 = require("react");
8379
- var import_jsx_runtime80 = require("react/jsx-runtime");
8741
+ var import_react48 = require("react");
8742
+ var import_jsx_runtime83 = require("react/jsx-runtime");
8380
8743
  var ChartPanel = ({
8381
8744
  title,
8382
8745
  description,
@@ -8387,17 +8750,17 @@ var ChartPanel = ({
8387
8750
  loading = false,
8388
8751
  className
8389
8752
  }) => {
8390
- const titleId = (0, import_react45.useId)();
8753
+ const titleId = (0, import_react48.useId)();
8391
8754
  const resolvedTitle = title ?? artifact?.title;
8392
8755
  const hasHeader = Boolean(resolvedTitle || description || actions);
8393
- const body = loading ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Skeleton, { className: "w-full rounded-lg", style: { height }, "aria-hidden": true }) : children ?? (artifact ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(ChartArtifactView, { artifact, embedded: true, height }) : null);
8394
- return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(
8756
+ const body = loading ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Skeleton, { className: "w-full rounded-lg", style: { height }, "aria-hidden": true }) : children ?? (artifact ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(ChartArtifactView, { artifact, embedded: true, height }) : null);
8757
+ return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
8395
8758
  "section",
8396
8759
  {
8397
8760
  className: cn(metricCardShellClass, "aui-app-chart-panel", className),
8398
8761
  "aria-labelledby": resolvedTitle ? titleId : void 0,
8399
8762
  children: [
8400
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
8763
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
8401
8764
  MetricCardHeader,
8402
8765
  {
8403
8766
  title: resolvedTitle,
@@ -8406,14 +8769,14 @@ var ChartPanel = ({
8406
8769
  actions
8407
8770
  }
8408
8771
  ),
8409
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
8772
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
8410
8773
  "div",
8411
8774
  {
8412
8775
  className: cn(
8413
8776
  "relative min-h-0 w-full",
8414
8777
  hasHeader ? metricChartPlotRegionClass : "pt-2 pb-3"
8415
8778
  ),
8416
- children: body ?? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
8779
+ children: body ?? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
8417
8780
  "div",
8418
8781
  {
8419
8782
  className: "flex items-center justify-center text-sm font-normal text-muted-foreground",
@@ -8430,8 +8793,8 @@ var ChartPanel = ({
8430
8793
  };
8431
8794
 
8432
8795
  // src/app/data/MetricRow.tsx
8433
- var import_react46 = require("react");
8434
- var import_jsx_runtime81 = require("react/jsx-runtime");
8796
+ var import_react49 = require("react");
8797
+ var import_jsx_runtime84 = require("react/jsx-runtime");
8435
8798
  var MetricRow = ({
8436
8799
  title,
8437
8800
  description,
@@ -8444,9 +8807,9 @@ var MetricRow = ({
8444
8807
  loading = false,
8445
8808
  className
8446
8809
  }) => {
8447
- const titleId = (0, import_react46.useId)();
8810
+ const titleId = (0, import_react49.useId)();
8448
8811
  const selectable = onMetricChange != null || activeMetricId != null;
8449
- const [internalId, setInternalId] = (0, import_react46.useState)(
8812
+ const [internalId, setInternalId] = (0, import_react49.useState)(
8450
8813
  defaultActiveMetricId ?? metrics[0]?.id
8451
8814
  );
8452
8815
  const activeId = activeMetricId ?? internalId;
@@ -8454,13 +8817,13 @@ var MetricRow = ({
8454
8817
  if (activeMetricId == null) setInternalId(id);
8455
8818
  onMetricChange?.(id);
8456
8819
  };
8457
- return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
8820
+ return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
8458
8821
  "section",
8459
8822
  {
8460
8823
  className: cn(metricCardShellClass, className),
8461
8824
  "aria-labelledby": title ? titleId : void 0,
8462
8825
  children: [
8463
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
8826
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8464
8827
  MetricCardHeader,
8465
8828
  {
8466
8829
  title,
@@ -8469,7 +8832,7 @@ var MetricRow = ({
8469
8832
  actions
8470
8833
  }
8471
8834
  ),
8472
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
8835
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8473
8836
  "div",
8474
8837
  {
8475
8838
  role: selectable ? "group" : void 0,
@@ -8480,18 +8843,18 @@ var MetricRow = ({
8480
8843
  metricTilesGridColsClass(loading ? metrics.length || 4 : metrics.length),
8481
8844
  (title || description || actions) && "mt-3"
8482
8845
  ),
8483
- children: loading ? Array.from({ length: metrics.length || 4 }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
8846
+ children: loading ? Array.from({ length: metrics.length || 4 }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
8484
8847
  "div",
8485
8848
  {
8486
8849
  className: "flex min-w-0 flex-1 flex-col gap-2 px-4 py-3",
8487
8850
  "aria-hidden": true,
8488
8851
  children: [
8489
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Skeleton, { className: "h-3 w-20" }),
8490
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Skeleton, { className: "h-7 w-24" })
8852
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Skeleton, { className: "h-3 w-20" }),
8853
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Skeleton, { className: "h-7 w-24" })
8491
8854
  ]
8492
8855
  },
8493
8856
  `skeleton-${index}`
8494
- )) : metrics.map((m, index) => /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
8857
+ )) : metrics.map((m, index) => /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8495
8858
  MetricTile,
8496
8859
  {
8497
8860
  label: m.label,
@@ -8513,8 +8876,8 @@ var MetricRow = ({
8513
8876
  };
8514
8877
 
8515
8878
  // src/app/data/MetricChartCard.tsx
8516
- var import_react47 = require("react");
8517
- var import_jsx_runtime82 = require("react/jsx-runtime");
8879
+ var import_react50 = require("react");
8880
+ var import_jsx_runtime85 = require("react/jsx-runtime");
8518
8881
  var MetricChartCard = ({
8519
8882
  title,
8520
8883
  description,
@@ -8533,8 +8896,8 @@ var MetricChartCard = ({
8533
8896
  loading = false,
8534
8897
  className
8535
8898
  }) => {
8536
- const titleId = (0, import_react47.useId)();
8537
- const [internalId, setInternalId] = (0, import_react47.useState)(
8899
+ const titleId = (0, import_react50.useId)();
8900
+ const [internalId, setInternalId] = (0, import_react50.useState)(
8538
8901
  defaultActiveMetricId ?? metrics[0]?.id
8539
8902
  );
8540
8903
  const activeId = activeMetricId ?? internalId;
@@ -8545,13 +8908,13 @@ var MetricChartCard = ({
8545
8908
  };
8546
8909
  const hasHeader = Boolean(title || description || actions);
8547
8910
  const chartAriaLabel = typeof active?.label === "string" ? `${active.label} over time` : "Metric chart";
8548
- return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
8911
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
8549
8912
  "section",
8550
8913
  {
8551
8914
  className: cn(metricCardShellClass, className),
8552
8915
  "aria-labelledby": title ? titleId : void 0,
8553
8916
  children: [
8554
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
8917
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
8555
8918
  MetricCardHeader,
8556
8919
  {
8557
8920
  title,
@@ -8560,7 +8923,7 @@ var MetricChartCard = ({
8560
8923
  actions
8561
8924
  }
8562
8925
  ),
8563
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
8926
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
8564
8927
  "div",
8565
8928
  {
8566
8929
  role: "group",
@@ -8571,18 +8934,18 @@ var MetricChartCard = ({
8571
8934
  metricTilesGridColsClass(loading ? metrics.length || 4 : metrics.length),
8572
8935
  hasHeader && "mt-3"
8573
8936
  ),
8574
- children: loading ? Array.from({ length: metrics.length || 4 }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
8937
+ children: loading ? Array.from({ length: metrics.length || 4 }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
8575
8938
  "div",
8576
8939
  {
8577
8940
  className: "flex min-w-0 flex-1 flex-col gap-2 px-4 py-3",
8578
8941
  "aria-hidden": true,
8579
8942
  children: [
8580
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Skeleton, { className: "h-3 w-20" }),
8581
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Skeleton, { className: "h-7 w-24" })
8943
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Skeleton, { className: "h-3 w-20" }),
8944
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Skeleton, { className: "h-7 w-24" })
8582
8945
  ]
8583
8946
  },
8584
8947
  `skeleton-${index}`
8585
- )) : metrics.map((m, index) => /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
8948
+ )) : metrics.map((m, index) => /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
8586
8949
  MetricTile,
8587
8950
  {
8588
8951
  label: m.label,
@@ -8598,14 +8961,14 @@ var MetricChartCard = ({
8598
8961
  ))
8599
8962
  }
8600
8963
  ),
8601
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: metricChartRegionClass, "aria-live": "polite", "aria-atomic": "true", children: loading ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
8964
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: metricChartRegionClass, "aria-live": "polite", "aria-atomic": "true", children: loading ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
8602
8965
  Skeleton,
8603
8966
  {
8604
8967
  className: "w-full rounded-lg",
8605
8968
  style: { height },
8606
8969
  "aria-hidden": true
8607
8970
  }
8608
- ) : active?.data && active.data.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
8971
+ ) : active?.data && active.data.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
8609
8972
  LineAreaChart,
8610
8973
  {
8611
8974
  data: active.data,
@@ -8625,7 +8988,7 @@ var MetricChartCard = ({
8625
8988
  ariaLabel: chartAriaLabel
8626
8989
  },
8627
8990
  active.id
8628
- ) : /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
8991
+ ) : /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
8629
8992
  "div",
8630
8993
  {
8631
8994
  className: "flex w-full items-center justify-center text-sm font-normal text-muted-foreground",
@@ -8640,13 +9003,13 @@ var MetricChartCard = ({
8640
9003
  };
8641
9004
 
8642
9005
  // src/hooks/use-live-query.ts
8643
- var import_react48 = require("react");
9006
+ var import_react51 = require("react");
8644
9007
  function useInterval(callback, delayMs) {
8645
- const saved = (0, import_react48.useRef)(callback);
8646
- (0, import_react48.useEffect)(() => {
9008
+ const saved = (0, import_react51.useRef)(callback);
9009
+ (0, import_react51.useEffect)(() => {
8647
9010
  saved.current = callback;
8648
9011
  }, [callback]);
8649
- (0, import_react48.useEffect)(() => {
9012
+ (0, import_react51.useEffect)(() => {
8650
9013
  if (delayMs === null) return;
8651
9014
  const id = setInterval(() => saved.current(), delayMs);
8652
9015
  return () => clearInterval(id);
@@ -8659,25 +9022,25 @@ function useLiveQuery(fetcher, options = {}) {
8659
9022
  immediate = true,
8660
9023
  refetchOnFocus = true
8661
9024
  } = options;
8662
- const [data, setData] = (0, import_react48.useState)(void 0);
8663
- const [error, setError] = (0, import_react48.useState)(void 0);
8664
- const [loading, setLoading] = (0, import_react48.useState)(enabled);
8665
- const [refreshing, setRefreshing] = (0, import_react48.useState)(false);
8666
- const [lastUpdated, setLastUpdated] = (0, import_react48.useState)(null);
8667
- const fetcherRef = (0, import_react48.useRef)(fetcher);
8668
- (0, import_react48.useEffect)(() => {
9025
+ const [data, setData] = (0, import_react51.useState)(void 0);
9026
+ const [error, setError] = (0, import_react51.useState)(void 0);
9027
+ const [loading, setLoading] = (0, import_react51.useState)(enabled);
9028
+ const [refreshing, setRefreshing] = (0, import_react51.useState)(false);
9029
+ const [lastUpdated, setLastUpdated] = (0, import_react51.useState)(null);
9030
+ const fetcherRef = (0, import_react51.useRef)(fetcher);
9031
+ (0, import_react51.useEffect)(() => {
8669
9032
  fetcherRef.current = fetcher;
8670
9033
  }, [fetcher]);
8671
- const mounted = (0, import_react48.useRef)(true);
8672
- const requestId = (0, import_react48.useRef)(0);
8673
- const hasData = (0, import_react48.useRef)(false);
8674
- (0, import_react48.useEffect)(() => {
9034
+ const mounted = (0, import_react51.useRef)(true);
9035
+ const requestId = (0, import_react51.useRef)(0);
9036
+ const hasData = (0, import_react51.useRef)(false);
9037
+ (0, import_react51.useEffect)(() => {
8675
9038
  mounted.current = true;
8676
9039
  return () => {
8677
9040
  mounted.current = false;
8678
9041
  };
8679
9042
  }, []);
8680
- const run = (0, import_react48.useCallback)(() => {
9043
+ const run = (0, import_react51.useCallback)(() => {
8681
9044
  const id = ++requestId.current;
8682
9045
  if (hasData.current) {
8683
9046
  setRefreshing(true);
@@ -8699,15 +9062,15 @@ function useLiveQuery(fetcher, options = {}) {
8699
9062
  setRefreshing(false);
8700
9063
  });
8701
9064
  }, []);
8702
- const refetch = (0, import_react48.useCallback)(() => {
9065
+ const refetch = (0, import_react51.useCallback)(() => {
8703
9066
  if (!enabled) return;
8704
9067
  run();
8705
9068
  }, [enabled, run]);
8706
- (0, import_react48.useEffect)(() => {
9069
+ (0, import_react51.useEffect)(() => {
8707
9070
  if (!enabled) return;
8708
9071
  if (immediate) run();
8709
9072
  }, [enabled, immediate, run]);
8710
- (0, import_react48.useEffect)(() => {
9073
+ (0, import_react51.useEffect)(() => {
8711
9074
  if (!enabled || intervalMs === null) return;
8712
9075
  const tick = () => {
8713
9076
  if (refetchOnFocus && typeof document !== "undefined" && document.visibilityState === "hidden") {
@@ -8718,7 +9081,7 @@ function useLiveQuery(fetcher, options = {}) {
8718
9081
  const handle = setInterval(tick, intervalMs);
8719
9082
  return () => clearInterval(handle);
8720
9083
  }, [enabled, intervalMs, refetchOnFocus, run]);
8721
- (0, import_react48.useEffect)(() => {
9084
+ (0, import_react51.useEffect)(() => {
8722
9085
  if (!enabled || !refetchOnFocus || typeof document === "undefined") return;
8723
9086
  const onVisible = () => {
8724
9087
  if (document.visibilityState === "visible") run();
@@ -8730,8 +9093,8 @@ function useLiveQuery(fetcher, options = {}) {
8730
9093
  }
8731
9094
 
8732
9095
  // src/charts/sparkline.tsx
8733
- var import_react49 = require("react");
8734
- var import_jsx_runtime83 = require("react/jsx-runtime");
9096
+ var import_react52 = require("react");
9097
+ var import_jsx_runtime86 = require("react/jsx-runtime");
8735
9098
  var Sparkline = ({
8736
9099
  data,
8737
9100
  dataKey = "value",
@@ -8743,10 +9106,10 @@ var Sparkline = ({
8743
9106
  className,
8744
9107
  ariaLabel = "Trend"
8745
9108
  }) => {
8746
- const uid = (0, import_react49.useId)();
9109
+ const uid = (0, import_react52.useId)();
8747
9110
  const values = data.map((d) => typeof d === "number" ? d : toNum(d[dataKey]));
8748
9111
  if (values.length === 0) {
8749
- return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: cn("inline-block", className), style: { width, height } });
9112
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: cn("inline-block", className), style: { width, height } });
8750
9113
  }
8751
9114
  const pad = strokeWidth + 1;
8752
9115
  const min = Math.min(...values);
@@ -8758,7 +9121,7 @@ var Sparkline = ({
8758
9121
  x: pad + (values.length > 1 ? i / (values.length - 1) * innerW : innerW / 2),
8759
9122
  y: pad + innerH - (v - min) / range * innerH
8760
9123
  }));
8761
- return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
9124
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
8762
9125
  "svg",
8763
9126
  {
8764
9127
  width,
@@ -8769,14 +9132,14 @@ var Sparkline = ({
8769
9132
  "aria-label": ariaLabel,
8770
9133
  preserveAspectRatio: "none",
8771
9134
  children: [
8772
- area && /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(import_jsx_runtime83.Fragment, { children: [
8773
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("linearGradient", { id: `${uid}-spark`, x1: "0", x2: "0", y1: "0", y2: "1", children: [
8774
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("stop", { offset: "0%", style: { stopColor: color, stopOpacity: 0.25 } }),
8775
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("stop", { offset: "100%", style: { stopColor: color, stopOpacity: 0 } })
9135
+ area && /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(import_jsx_runtime86.Fragment, { children: [
9136
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("linearGradient", { id: `${uid}-spark`, x1: "0", x2: "0", y1: "0", y2: "1", children: [
9137
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("stop", { offset: "0%", style: { stopColor: color, stopOpacity: 0.25 } }),
9138
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("stop", { offset: "100%", style: { stopColor: color, stopOpacity: 0 } })
8776
9139
  ] }) }),
8777
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("path", { d: monotoneAreaPath(points, height - pad), fill: `url(#${uid}-spark)` })
9140
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("path", { d: monotoneAreaPath(points, height - pad), fill: `url(#${uid}-spark)` })
8778
9141
  ] }),
8779
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
9142
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
8780
9143
  "path",
8781
9144
  {
8782
9145
  d: monotoneLinePath(points),
@@ -8793,7 +9156,7 @@ var Sparkline = ({
8793
9156
  };
8794
9157
 
8795
9158
  // src/chat/chat.tsx
8796
- var import_jsx_runtime84 = require("react/jsx-runtime");
9159
+ var import_jsx_runtime87 = require("react/jsx-runtime");
8797
9160
  function TimbalChat({
8798
9161
  workforceId,
8799
9162
  baseUrl,
@@ -8804,7 +9167,7 @@ function TimbalChat({
8804
9167
  debug,
8805
9168
  ...threadProps
8806
9169
  }) {
8807
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
9170
+ return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
8808
9171
  TimbalRuntimeProvider,
8809
9172
  {
8810
9173
  workforceId,
@@ -8814,7 +9177,7 @@ function TimbalChat({
8814
9177
  attachmentsUploadUrl,
8815
9178
  attachmentsAccept,
8816
9179
  debug,
8817
- children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Thread, { ...threadProps })
9180
+ children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Thread, { ...threadProps })
8818
9181
  }
8819
9182
  );
8820
9183
  }
@@ -8901,10 +9264,14 @@ function TimbalChat({
8901
9264
  connectionRowListClass,
8902
9265
  createTimbalTheme,
8903
9266
  ensureThemeFontLink,
9267
+ flushBarCategoryGap,
9268
+ flushLineAreaEdgeToEdge,
8904
9269
  formatLintReport,
8905
9270
  getStoredThemePreset,
8906
9271
  getThemePreset,
8907
9272
  lintGeneratedUi,
9273
+ resolveChartMargin,
9274
+ resolveTooltipCategory,
8908
9275
  reviewGeneratedUi,
8909
9276
  themeToCss,
8910
9277
  useAppCopilotContext,