@timbal-ai/timbal-react 0.7.1 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +29 -0
- package/README.md +51 -5
- package/dist/app.cjs +1750 -1157
- package/dist/app.d.cts +2 -2
- package/dist/app.d.ts +2 -2
- package/dist/app.esm.js +27 -5
- package/dist/{button-CIKzUrJI.d.cts → button-ClSgD6OF.d.cts} +1 -1
- package/dist/{button-CIKzUrJI.d.ts → button-ClSgD6OF.d.ts} +1 -1
- package/dist/{chart-artifact-C2m891nx.d.cts → chart-artifact-DWkqIAK5.d.cts} +165 -1
- package/dist/{chart-artifact-CqqhdSR9.d.ts → chart-artifact-DwfRtQWL.d.ts} +165 -1
- package/dist/chat.esm.js +3 -3
- package/dist/{chunk-RY3LB3JN.esm.js → chunk-5ZKLPWVN.esm.js} +1 -1
- package/dist/{chunk-3WCG6ZRL.esm.js → chunk-CFU3YDTV.esm.js} +2 -2
- package/dist/{chunk-7U2N6XZA.esm.js → chunk-GBBLAM3G.esm.js} +954 -378
- package/dist/{chunk-TDIJHV4I.esm.js → chunk-OISVICYF.esm.js} +1 -1
- package/dist/chunk-P4SN7M67.esm.js +435 -0
- package/dist/{chunk-Z27GBSOT.esm.js → chunk-QIABF4KB.esm.js} +53 -51
- package/dist/{chunk-2XZ3S4OP.esm.js → chunk-QVAUCVQA.esm.js} +129 -90
- package/dist/{chunk-EQC5JEDZ.esm.js → chunk-VWHHKAHN.esm.js} +5 -5
- package/dist/index.cjs +1580 -493
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.esm.js +93 -7
- package/dist/studio.cjs +3 -1
- package/dist/studio.esm.js +6 -6
- package/dist/ui.cjs +507 -8
- package/dist/ui.d.cts +46 -3
- package/dist/ui.d.ts +46 -3
- package/dist/ui.esm.js +66 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -66,10 +66,27 @@ __export(index_exports, {
|
|
|
66
66
|
Dialog: () => Dialog,
|
|
67
67
|
DialogClose: () => DialogClose,
|
|
68
68
|
DialogContent: () => DialogContent,
|
|
69
|
+
DialogDescription: () => DialogDescription,
|
|
70
|
+
DialogFooter: () => DialogFooter,
|
|
71
|
+
DialogHeader: () => DialogHeader,
|
|
69
72
|
DialogOverlay: () => DialogOverlay,
|
|
70
73
|
DialogPortal: () => DialogPortal,
|
|
71
74
|
DialogTitle: () => DialogTitle,
|
|
72
75
|
DialogTrigger: () => DialogTrigger,
|
|
76
|
+
DropdownMenu: () => DropdownMenu,
|
|
77
|
+
DropdownMenuCheckboxItem: () => DropdownMenuCheckboxItem,
|
|
78
|
+
DropdownMenuContent: () => DropdownMenuContent,
|
|
79
|
+
DropdownMenuGroup: () => DropdownMenuGroup,
|
|
80
|
+
DropdownMenuItem: () => DropdownMenuItem,
|
|
81
|
+
DropdownMenuLabel: () => DropdownMenuLabel,
|
|
82
|
+
DropdownMenuRadioGroup: () => DropdownMenuRadioGroup,
|
|
83
|
+
DropdownMenuRadioItem: () => DropdownMenuRadioItem,
|
|
84
|
+
DropdownMenuSeparator: () => DropdownMenuSeparator,
|
|
85
|
+
DropdownMenuShortcut: () => DropdownMenuShortcut,
|
|
86
|
+
DropdownMenuSub: () => DropdownMenuSub,
|
|
87
|
+
DropdownMenuSubContent: () => DropdownMenuSubContent,
|
|
88
|
+
DropdownMenuSubTrigger: () => DropdownMenuSubTrigger,
|
|
89
|
+
DropdownMenuTrigger: () => DropdownMenuTrigger,
|
|
73
90
|
EmptyState: () => EmptyState,
|
|
74
91
|
ExpandableSection: () => ExpandableSection,
|
|
75
92
|
Field: () => Field,
|
|
@@ -99,11 +116,25 @@ __export(index_exports, {
|
|
|
99
116
|
PageHeader: () => PageHeader,
|
|
100
117
|
PillSegmentedTabs: () => PillSegmentedTabs,
|
|
101
118
|
PlanBadge: () => PlanBadge,
|
|
119
|
+
Popover: () => Popover,
|
|
120
|
+
PopoverAnchor: () => PopoverAnchor,
|
|
121
|
+
PopoverContent: () => PopoverContent,
|
|
122
|
+
PopoverTrigger: () => PopoverTrigger,
|
|
102
123
|
QuestionArtifactView: () => QuestionArtifactView,
|
|
103
124
|
ResourceCard: () => ResourceCard,
|
|
104
125
|
STUDIO_NAV_MODE: () => STUDIO_NAV_MODE,
|
|
105
126
|
SearchInput: () => SearchInput,
|
|
106
127
|
Section: () => Section,
|
|
128
|
+
Select: () => Select,
|
|
129
|
+
SelectContent: () => SelectContent,
|
|
130
|
+
SelectGroup: () => SelectGroup,
|
|
131
|
+
SelectItem: () => SelectItem,
|
|
132
|
+
SelectLabel: () => SelectLabel,
|
|
133
|
+
SelectScrollDownButton: () => SelectScrollDownButton,
|
|
134
|
+
SelectScrollUpButton: () => SelectScrollUpButton,
|
|
135
|
+
SelectSeparator: () => SelectSeparator,
|
|
136
|
+
SelectTrigger: () => SelectTrigger,
|
|
137
|
+
SelectValue: () => SelectValue,
|
|
107
138
|
SessionProvider: () => SessionProvider,
|
|
108
139
|
SettingsSection: () => SettingsSection,
|
|
109
140
|
SettingsSectionHeader: () => SettingsSectionHeader,
|
|
@@ -118,8 +149,11 @@ __export(index_exports, {
|
|
|
118
149
|
SubNav: () => SubNav,
|
|
119
150
|
Suggestions: () => Suggestions,
|
|
120
151
|
SurfaceCard: () => SurfaceCard,
|
|
152
|
+
THEME_AGENT_INSTRUCTIONS: () => THEME_AGENT_INSTRUCTIONS,
|
|
121
153
|
THREAD_DEFAULT_MAX_WIDTH: () => THREAD_DEFAULT_MAX_WIDTH,
|
|
154
|
+
TIMBAL_THEME_PRESETS: () => TIMBAL_THEME_PRESETS,
|
|
122
155
|
TableArtifactView: () => TableArtifactView,
|
|
156
|
+
ThemePresetGallery: () => ThemePresetGallery,
|
|
123
157
|
Thread: () => Thread,
|
|
124
158
|
ThreadPrimitive: () => import_react69.ThreadPrimitive,
|
|
125
159
|
TimbalChat: () => TimbalChat,
|
|
@@ -127,6 +161,7 @@ __export(index_exports, {
|
|
|
127
161
|
TimbalMark: () => TimbalMark,
|
|
128
162
|
TimbalRuntimeProvider: () => TimbalRuntimeProvider,
|
|
129
163
|
TimbalStudioShell: () => TimbalStudioShell,
|
|
164
|
+
TimbalThemeStyle: () => TimbalThemeStyle,
|
|
130
165
|
ToolArtifactFallback: () => ToolArtifactFallback,
|
|
131
166
|
ToolFallback: () => ToolFallback,
|
|
132
167
|
Tooltip: () => Tooltip,
|
|
@@ -139,13 +174,17 @@ __export(index_exports, {
|
|
|
139
174
|
UiEventProvider: () => UiEventProvider,
|
|
140
175
|
UiNodeView: () => UiNodeView,
|
|
141
176
|
WorkforceSelector: () => WorkforceSelector,
|
|
177
|
+
applyThemePreset: () => applyThemePreset,
|
|
178
|
+
applyTimbalTheme: () => applyTimbalTheme,
|
|
142
179
|
assistantMessageContentClass: () => assistantMessageContentClass,
|
|
143
180
|
assistantMessageRootClass: () => assistantMessageRootClass,
|
|
144
181
|
authFetch: () => authFetch,
|
|
182
|
+
clearTimbalTheme: () => clearTimbalTheme,
|
|
145
183
|
clearTokens: () => clearTokens,
|
|
146
184
|
cn: () => cn,
|
|
147
185
|
connectionRowListClass: () => connectionRowListClass,
|
|
148
186
|
createDefaultAttachmentAdapter: () => createDefaultAttachmentAdapter,
|
|
187
|
+
createTimbalTheme: () => createTimbalTheme,
|
|
149
188
|
createUploadAttachmentAdapter: () => createUploadAttachmentAdapter,
|
|
150
189
|
defaultArtifactRenderers: () => defaultArtifactRenderers,
|
|
151
190
|
fetchCurrentUser: () => fetchCurrentUser,
|
|
@@ -153,6 +192,8 @@ __export(index_exports, {
|
|
|
153
192
|
getAccessToken: () => getAccessToken,
|
|
154
193
|
getPath: () => getPath,
|
|
155
194
|
getRefreshToken: () => getRefreshToken,
|
|
195
|
+
getStoredThemePreset: () => getStoredThemePreset,
|
|
196
|
+
getThemePreset: () => getThemePreset,
|
|
156
197
|
isArtifact: () => isArtifact,
|
|
157
198
|
isArtifactFenceLanguage: () => isArtifactFenceLanguage,
|
|
158
199
|
isUiBinding: () => isUiBinding,
|
|
@@ -165,6 +206,7 @@ __export(index_exports, {
|
|
|
165
206
|
setPath: () => setPath,
|
|
166
207
|
setRefreshToken: () => setRefreshToken,
|
|
167
208
|
splitMarkdownByArtifacts: () => splitMarkdownByArtifacts,
|
|
209
|
+
themeToCss: () => themeToCss,
|
|
168
210
|
threadMessageColumnClass: () => threadMessageColumnClass,
|
|
169
211
|
useAppCopilotContext: () => useAppCopilotContext,
|
|
170
212
|
useAppShellChat: () => useAppShellChat,
|
|
@@ -1334,6 +1376,42 @@ function DialogTitle({
|
|
|
1334
1376
|
}
|
|
1335
1377
|
);
|
|
1336
1378
|
}
|
|
1379
|
+
function DialogDescription({
|
|
1380
|
+
className,
|
|
1381
|
+
...props
|
|
1382
|
+
}) {
|
|
1383
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1384
|
+
import_radix_ui2.Dialog.Description,
|
|
1385
|
+
{
|
|
1386
|
+
"data-slot": "dialog-description",
|
|
1387
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
1388
|
+
...props
|
|
1389
|
+
}
|
|
1390
|
+
);
|
|
1391
|
+
}
|
|
1392
|
+
function DialogHeader({ className, ...props }) {
|
|
1393
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1394
|
+
"div",
|
|
1395
|
+
{
|
|
1396
|
+
"data-slot": "dialog-header",
|
|
1397
|
+
className: cn("flex flex-col gap-1.5 text-center sm:text-left", className),
|
|
1398
|
+
...props
|
|
1399
|
+
}
|
|
1400
|
+
);
|
|
1401
|
+
}
|
|
1402
|
+
function DialogFooter({ className, ...props }) {
|
|
1403
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1404
|
+
"div",
|
|
1405
|
+
{
|
|
1406
|
+
"data-slot": "dialog-footer",
|
|
1407
|
+
className: cn(
|
|
1408
|
+
"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
|
|
1409
|
+
className
|
|
1410
|
+
),
|
|
1411
|
+
...props
|
|
1412
|
+
}
|
|
1413
|
+
);
|
|
1414
|
+
}
|
|
1337
1415
|
|
|
1338
1416
|
// src/ui/avatar.tsx
|
|
1339
1417
|
var import_radix_ui3 = require("radix-ui");
|
|
@@ -4738,7 +4816,9 @@ var studioChromeShellStyle = {
|
|
|
4738
4816
|
var STORAGE_KEYS = {
|
|
4739
4817
|
sidebarCollapsed: "timbal-studio-sidebar-collapsed",
|
|
4740
4818
|
/** Used by `ModeToggle` in uncontrolled mode (`localStorage`). */
|
|
4741
|
-
theme: "timbal-theme"
|
|
4819
|
+
theme: "timbal-theme",
|
|
4820
|
+
/** Used by the theme preset picker to remember the selected brand preset. */
|
|
4821
|
+
themePreset: "timbal-theme-preset"
|
|
4742
4822
|
};
|
|
4743
4823
|
var DOM_IDS = {
|
|
4744
4824
|
sidebarRuntimeAnchor: "timbal-studio-sidebar-runtime-anchor",
|
|
@@ -6428,6 +6508,8 @@ Presentational groups \u2014 import from the package root, not from these paths:
|
|
|
6428
6508
|
|
|
6429
6509
|
Also re-exported: \`Button\`, \`TimbalChat\`, \`ChartArtifactView\`, \`APP_KIT_AGENT_INSTRUCTIONS\`.
|
|
6430
6510
|
|
|
6511
|
+
Theming helpers (import from the package root or \`/app\`): \`createTimbalTheme\`, \`themeToCss\`, \`applyTimbalTheme\`, \`TIMBAL_THEME_PRESETS\`, \`applyThemePreset\`, \`ThemePresetGallery\`, \`TimbalThemeStyle\`, \`THEME_AGENT_INSTRUCTIONS\`.
|
|
6512
|
+
|
|
6431
6513
|
### Design guidelines (required)
|
|
6432
6514
|
|
|
6433
6515
|
| Area | Rule |
|
|
@@ -6435,7 +6517,7 @@ Also re-exported: \`Button\`, \`TimbalChat\`, \`ChartArtifactView\`, \`APP_KIT_A
|
|
|
6435
6517
|
| **Copilot** | Use \`AppCopilotProvider\` for page context (\`useAppCopilotContext\`). Copilot is a **floating overlay** via \`AppShell\` \`chat={<AppChatPanel />}\` \u2014 not a sidebar column that shrinks main content. |
|
|
6436
6518
|
| **Chat panel** | \`AppChatPanel\` only; \`Thread\` uses \`variant="panel"\` internally. Dismiss with **X**; trigger is a **text-only** pill (e.g. "Assistant") \u2014 **no** MessageSquare or chat icons on the shell trigger. |
|
|
6437
6519
|
| **Context** | Do not show raw JSON context in the panel header; keep context in \`AppCopilotProvider\` only. |
|
|
6438
|
-
| **Theming** | Use semantic Tailwind tokens (\`bg-background\`, \`text-foreground\`, \`border-border\`, \`bg-elevated-from\`, etc.) from the host app's \`styles.css\`.
|
|
6520
|
+
| **Theming** | Use semantic Tailwind tokens (\`bg-background\`, \`text-foreground\`, \`border-border\`, \`bg-elevated-from\`, etc.) from the host app's \`styles.css\`. To rebrand, **never hand-author OKLCH** \u2014 call \`createTimbalTheme({ brand })\` + \`themeToCss\`/\`applyTimbalTheme\`, or apply a catalog preset (\`TIMBAL_THEME_PRESETS\` / \`applyThemePreset\`). To offer styles, render \`ThemePresetGallery\`. See \`THEME_AGENT_INSTRUCTIONS\`. |
|
|
6439
6521
|
| **Layout chrome** | \`Page\` \u2192 \`Section\` for main content hierarchy. \`AppShellTopbar\` for global actions (auth, theme). |
|
|
6440
6522
|
| **Data** | Prefer \`DataTable\` with typed \`columns\` / \`rows\` / \`getRowKey\`; use \`ChartPanel\` with \`ChartArtifact\` for charts. |
|
|
6441
6523
|
| **Modals** | Use \`AppConfirmDialog\` for destructive/export confirmations. |
|
|
@@ -6535,6 +6617,7 @@ Studio chrome (\`StudioSidebar\`, \`ModeToggle\`, \u2026) lives in \`@timbal-ai/
|
|
|
6535
6617
|
| \`resource-gallery.tsx\` | \`ResourceCard\`, \`StatusDot\`, \`Sparkline\` |
|
|
6536
6618
|
| \`charts-panel.tsx\` | \`ChartPanel\`, \`ChartArtifact\` |
|
|
6537
6619
|
| \`copilot-overlay.tsx\` | \`AppShell\`, \`AppChatPanel\` |
|
|
6620
|
+
| \`theme-presets.tsx\` | \`ThemePresetGallery\`, \`applyTimbalTheme\` |
|
|
6538
6621
|
|
|
6539
6622
|
### Typical compositions
|
|
6540
6623
|
|
|
@@ -6580,139 +6663,814 @@ import {
|
|
|
6580
6663
|
- For rich in-chat widgets, use **artifacts** (\`ARTIFACT_AGENT_INSTRUCTIONS\`) \u2014 app kit is for the **host application shell**.
|
|
6581
6664
|
`.trim();
|
|
6582
6665
|
|
|
6583
|
-
// src/
|
|
6584
|
-
var
|
|
6585
|
-
var
|
|
6666
|
+
// src/design/oklch.ts
|
|
6667
|
+
var clamp = (n, min, max) => Math.min(max, Math.max(min, n));
|
|
6668
|
+
var round2 = (n, digits) => {
|
|
6669
|
+
const f = 10 ** digits;
|
|
6670
|
+
return Math.round(n * f) / f;
|
|
6671
|
+
};
|
|
6672
|
+
function srgbToLinear(channel) {
|
|
6673
|
+
const c = channel / 255;
|
|
6674
|
+
return c <= 0.04045 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;
|
|
6675
|
+
}
|
|
6676
|
+
function linearRgbToOklch(r, g, b, alpha) {
|
|
6677
|
+
const l = 0.4122214708 * r + 0.5363325363 * g + 0.0514459929 * b;
|
|
6678
|
+
const m = 0.2119034982 * r + 0.6806995451 * g + 0.1073969566 * b;
|
|
6679
|
+
const s = 0.0883024619 * r + 0.2817188376 * g + 0.6299787005 * b;
|
|
6680
|
+
const l_ = Math.cbrt(l);
|
|
6681
|
+
const m_ = Math.cbrt(m);
|
|
6682
|
+
const s_ = Math.cbrt(s);
|
|
6683
|
+
const labL = 0.2104542553 * l_ + 0.793617785 * m_ - 0.0040720468 * s_;
|
|
6684
|
+
const labA = 1.9779984951 * l_ - 2.428592205 * m_ + 0.4505937099 * s_;
|
|
6685
|
+
const labB = 0.0259040371 * l_ + 0.7827717662 * m_ - 0.808675766 * s_;
|
|
6686
|
+
const c = Math.sqrt(labA * labA + labB * labB);
|
|
6687
|
+
let h = Math.atan2(labB, labA) * 180 / Math.PI;
|
|
6688
|
+
if (h < 0) h += 360;
|
|
6689
|
+
return { l: labL, c, h, alpha };
|
|
6690
|
+
}
|
|
6691
|
+
function oklchToLinearRgb(color) {
|
|
6692
|
+
const hRad = color.h * Math.PI / 180;
|
|
6693
|
+
const labA = color.c * Math.cos(hRad);
|
|
6694
|
+
const labB = color.c * Math.sin(hRad);
|
|
6695
|
+
const l_ = color.l + 0.3963377774 * labA + 0.2158037573 * labB;
|
|
6696
|
+
const m_ = color.l - 0.1055613458 * labA - 0.0638541728 * labB;
|
|
6697
|
+
const s_ = color.l - 0.0894841775 * labA - 1.291485548 * labB;
|
|
6698
|
+
const l = l_ ** 3;
|
|
6699
|
+
const m = m_ ** 3;
|
|
6700
|
+
const s = s_ ** 3;
|
|
6701
|
+
return {
|
|
6702
|
+
r: 4.0767416621 * l - 3.3077115913 * m + 0.2309699292 * s,
|
|
6703
|
+
g: -1.2684380046 * l + 2.6097574011 * m - 0.3413193965 * s,
|
|
6704
|
+
b: -0.0041960863 * l - 0.7034186147 * m + 1.707614701 * s
|
|
6705
|
+
};
|
|
6706
|
+
}
|
|
6707
|
+
function parseHex(value) {
|
|
6708
|
+
let hex = value.trim().replace(/^#/, "");
|
|
6709
|
+
if (![3, 4, 6, 8].includes(hex.length)) return null;
|
|
6710
|
+
if (hex.length === 3 || hex.length === 4) {
|
|
6711
|
+
hex = hex.split("").map((ch) => ch + ch).join("");
|
|
6712
|
+
}
|
|
6713
|
+
const int = Number.parseInt(hex, 16);
|
|
6714
|
+
if (Number.isNaN(int)) return null;
|
|
6715
|
+
const hasAlpha = hex.length === 8;
|
|
6716
|
+
const r = int >>> (hasAlpha ? 24 : 16) & 255;
|
|
6717
|
+
const g = int >>> (hasAlpha ? 16 : 8) & 255;
|
|
6718
|
+
const b = int >>> (hasAlpha ? 8 : 0) & 255;
|
|
6719
|
+
const alpha = hasAlpha ? (int & 255) / 255 : 1;
|
|
6720
|
+
return linearRgbToOklch(
|
|
6721
|
+
srgbToLinear(r),
|
|
6722
|
+
srgbToLinear(g),
|
|
6723
|
+
srgbToLinear(b),
|
|
6724
|
+
alpha
|
|
6725
|
+
);
|
|
6726
|
+
}
|
|
6727
|
+
function parseRgb(value) {
|
|
6728
|
+
const match = value.match(
|
|
6729
|
+
/rgba?\(\s*([0-9.]+)[\s,]+([0-9.]+)[\s,]+([0-9.]+)(?:[\s,/]+([0-9.%]+))?\s*\)/i
|
|
6730
|
+
);
|
|
6731
|
+
if (!match) return null;
|
|
6732
|
+
const r = Number.parseFloat(match[1]);
|
|
6733
|
+
const g = Number.parseFloat(match[2]);
|
|
6734
|
+
const b = Number.parseFloat(match[3]);
|
|
6735
|
+
let alpha = 1;
|
|
6736
|
+
if (match[4]) {
|
|
6737
|
+
alpha = match[4].includes("%") ? Number.parseFloat(match[4]) / 100 : Number.parseFloat(match[4]);
|
|
6738
|
+
}
|
|
6739
|
+
if (![r, g, b].every(Number.isFinite)) return null;
|
|
6740
|
+
return linearRgbToOklch(
|
|
6741
|
+
srgbToLinear(r),
|
|
6742
|
+
srgbToLinear(g),
|
|
6743
|
+
srgbToLinear(b),
|
|
6744
|
+
Number.isFinite(alpha) ? alpha : 1
|
|
6745
|
+
);
|
|
6746
|
+
}
|
|
6747
|
+
function parseOklch(value) {
|
|
6748
|
+
const match = value.match(
|
|
6749
|
+
/oklch\(\s*([0-9.]+%?)\s+([0-9.]+%?)\s+([0-9.]+)(?:deg)?(?:\s*\/\s*([0-9.%]+))?\s*\)/i
|
|
6750
|
+
);
|
|
6751
|
+
if (!match) return null;
|
|
6752
|
+
const l = match[1].includes("%") ? Number.parseFloat(match[1]) / 100 : Number.parseFloat(match[1]);
|
|
6753
|
+
const c = match[2].includes("%") ? Number.parseFloat(match[2]) / 100 * 0.4 : Number.parseFloat(match[2]);
|
|
6754
|
+
const h = Number.parseFloat(match[3]);
|
|
6755
|
+
let alpha = 1;
|
|
6756
|
+
if (match[4]) {
|
|
6757
|
+
alpha = match[4].includes("%") ? Number.parseFloat(match[4]) / 100 : Number.parseFloat(match[4]);
|
|
6758
|
+
}
|
|
6759
|
+
if (![l, c, h].every(Number.isFinite)) return null;
|
|
6760
|
+
return { l, c, h, alpha: Number.isFinite(alpha) ? alpha : 1 };
|
|
6761
|
+
}
|
|
6762
|
+
function parseColor(value) {
|
|
6763
|
+
const parsed = parseOklch(value) ?? parseHex(value) ?? parseRgb(value);
|
|
6764
|
+
if (!parsed) {
|
|
6765
|
+
throw new Error(
|
|
6766
|
+
`[@timbal-ai/timbal-react] Could not parse color "${value}". Use a hex (#1E40AF), rgb()/rgba(), or oklch() string.`
|
|
6767
|
+
);
|
|
6768
|
+
}
|
|
6769
|
+
return parsed;
|
|
6770
|
+
}
|
|
6771
|
+
function lighten(color, delta) {
|
|
6772
|
+
return { ...color, l: clamp(color.l + delta, 0, 1) };
|
|
6773
|
+
}
|
|
6774
|
+
function scaleChroma(color, factor) {
|
|
6775
|
+
return { ...color, c: clamp(color.c * factor, 0, 0.4) };
|
|
6776
|
+
}
|
|
6777
|
+
function withAlpha(color, alpha) {
|
|
6778
|
+
return { ...color, alpha: clamp(alpha, 0, 1) };
|
|
6779
|
+
}
|
|
6780
|
+
function oklchToString(color) {
|
|
6781
|
+
const l = round2(clamp(color.l, 0, 1), 4);
|
|
6782
|
+
const c = round2(clamp(color.c, 0, 0.4), 4);
|
|
6783
|
+
const h = round2((color.h % 360 + 360) % 360, 2);
|
|
6784
|
+
const a = clamp(color.alpha, 0, 1);
|
|
6785
|
+
const base = `oklch(${l} ${c} ${h}`;
|
|
6786
|
+
return a >= 1 ? `${base})` : `${base} / ${round2(a, 3)})`;
|
|
6787
|
+
}
|
|
6788
|
+
function readableForeground(bg, options) {
|
|
6789
|
+
const threshold = options?.threshold ?? 0.62;
|
|
6790
|
+
const lightText = options?.light ?? "oklch(0.985 0 0)";
|
|
6791
|
+
const darkText = options?.dark ?? "oklch(0.205 0 0)";
|
|
6792
|
+
return bg.l >= threshold ? darkText : lightText;
|
|
6793
|
+
}
|
|
6794
|
+
function relativeLuminance(color) {
|
|
6795
|
+
const { r, g, b } = oklchToLinearRgb(color);
|
|
6796
|
+
const lr = clamp(r, 0, 1);
|
|
6797
|
+
const lg = clamp(g, 0, 1);
|
|
6798
|
+
const lb = clamp(b, 0, 1);
|
|
6799
|
+
return 0.2126 * lr + 0.7152 * lg + 0.0722 * lb;
|
|
6800
|
+
}
|
|
6586
6801
|
|
|
6587
|
-
// src/design/
|
|
6588
|
-
|
|
6589
|
-
|
|
6590
|
-
|
|
6591
|
-
|
|
6592
|
-
|
|
6593
|
-
|
|
6594
|
-
|
|
6595
|
-
|
|
6596
|
-
|
|
6597
|
-
|
|
6598
|
-
|
|
6599
|
-
|
|
6600
|
-
|
|
6601
|
-
|
|
6602
|
-
)
|
|
6603
|
-
|
|
6604
|
-
|
|
6605
|
-
|
|
6606
|
-
|
|
6607
|
-
|
|
6608
|
-
|
|
6609
|
-
)
|
|
6610
|
-
|
|
6611
|
-
|
|
6612
|
-
|
|
6613
|
-
|
|
6614
|
-
|
|
6615
|
-
|
|
6616
|
-
|
|
6617
|
-
|
|
6618
|
-
|
|
6619
|
-
);
|
|
6620
|
-
|
|
6621
|
-
|
|
6622
|
-
|
|
6623
|
-
|
|
6624
|
-
|
|
6625
|
-
|
|
6626
|
-
|
|
6627
|
-
|
|
6628
|
-
"
|
|
6629
|
-
"
|
|
6630
|
-
"
|
|
6631
|
-
)
|
|
6632
|
-
|
|
6633
|
-
|
|
6634
|
-
"
|
|
6635
|
-
);
|
|
6636
|
-
|
|
6637
|
-
|
|
6638
|
-
|
|
6802
|
+
// src/design/theme.ts
|
|
6803
|
+
function primaryForMode(brand, mode) {
|
|
6804
|
+
if (mode === "light") {
|
|
6805
|
+
return { ...brand, l: Math.min(Math.max(brand.l, 0.42), 0.68) };
|
|
6806
|
+
}
|
|
6807
|
+
const lightened = lighten(brand, 0.06);
|
|
6808
|
+
return {
|
|
6809
|
+
...lightened,
|
|
6810
|
+
l: Math.min(Math.max(lightened.l, 0.5), 0.78),
|
|
6811
|
+
c: Math.min(brand.c, 0.22)
|
|
6812
|
+
};
|
|
6813
|
+
}
|
|
6814
|
+
function brandGradient(primary) {
|
|
6815
|
+
return {
|
|
6816
|
+
from: lighten(primary, 0.03),
|
|
6817
|
+
to: lighten(primary, -0.02),
|
|
6818
|
+
hoverFrom: lighten(primary, 0.06),
|
|
6819
|
+
hoverTo: lighten(primary, 0.01),
|
|
6820
|
+
activeFrom: lighten(primary, -0.02),
|
|
6821
|
+
activeTo: lighten(primary, -0.06)
|
|
6822
|
+
};
|
|
6823
|
+
}
|
|
6824
|
+
function neutralTints(brand) {
|
|
6825
|
+
return {
|
|
6826
|
+
lightHue: brand.h,
|
|
6827
|
+
darkHue: brand.h,
|
|
6828
|
+
lightChroma: 6e-3,
|
|
6829
|
+
darkChroma: 8e-3
|
|
6830
|
+
};
|
|
6831
|
+
}
|
|
6832
|
+
function createTimbalTheme(intent) {
|
|
6833
|
+
const brand = parseColor(intent.brand);
|
|
6834
|
+
const accent = intent.accent ? parseColor(intent.accent) : null;
|
|
6835
|
+
const light = {};
|
|
6836
|
+
const dark = {};
|
|
6837
|
+
const root = {};
|
|
6838
|
+
if (typeof intent.radius === "number") {
|
|
6839
|
+
root["--radius"] = `${intent.radius}rem`;
|
|
6840
|
+
}
|
|
6841
|
+
const primaryLight = primaryForMode(brand, "light");
|
|
6842
|
+
const primaryDark = primaryForMode(brand, "dark");
|
|
6843
|
+
light["--primary"] = oklchToString(primaryLight);
|
|
6844
|
+
light["--primary-foreground"] = readableForeground(primaryLight);
|
|
6845
|
+
light["--ring"] = oklchToString(
|
|
6846
|
+
scaleChroma({ ...primaryLight, l: 0.6 }, 0.7)
|
|
6847
|
+
);
|
|
6848
|
+
dark["--primary"] = oklchToString(primaryDark);
|
|
6849
|
+
dark["--primary-foreground"] = readableForeground(primaryDark);
|
|
6850
|
+
dark["--ring"] = oklchToString(scaleChroma({ ...primaryDark, l: 0.62 }, 0.6));
|
|
6851
|
+
const gLight = brandGradient(primaryLight);
|
|
6852
|
+
light["--primary-fill-from"] = oklchToString(gLight.from);
|
|
6853
|
+
light["--primary-fill-to"] = oklchToString(gLight.to);
|
|
6854
|
+
light["--primary-fill-hover-from"] = oklchToString(gLight.hoverFrom);
|
|
6855
|
+
light["--primary-fill-hover-to"] = oklchToString(gLight.hoverTo);
|
|
6856
|
+
light["--primary-fill-active-from"] = oklchToString(gLight.activeFrom);
|
|
6857
|
+
light["--primary-fill-active-to"] = oklchToString(gLight.activeTo);
|
|
6858
|
+
const gDark = brandGradient(primaryDark);
|
|
6859
|
+
dark["--primary-fill-from"] = oklchToString(gDark.from);
|
|
6860
|
+
dark["--primary-fill-to"] = oklchToString(gDark.to);
|
|
6861
|
+
dark["--primary-fill-hover-from"] = oklchToString(gDark.hoverFrom);
|
|
6862
|
+
dark["--primary-fill-hover-to"] = oklchToString(gDark.hoverTo);
|
|
6863
|
+
dark["--primary-fill-active-from"] = oklchToString(gDark.activeFrom);
|
|
6864
|
+
dark["--primary-fill-active-to"] = oklchToString(gDark.activeTo);
|
|
6865
|
+
if (accent) {
|
|
6866
|
+
const accentLight = { ...accent, l: Math.min(Math.max(accent.l, 0.9), 0.97) };
|
|
6867
|
+
const accentDark = { ...accent, l: 0.25, c: Math.min(accent.c, 0.04) };
|
|
6868
|
+
light["--accent"] = oklchToString(accentLight);
|
|
6869
|
+
light["--accent-foreground"] = readableForeground(accentLight);
|
|
6870
|
+
dark["--accent"] = oklchToString(accentDark);
|
|
6871
|
+
dark["--accent-foreground"] = readableForeground(accentDark);
|
|
6872
|
+
}
|
|
6873
|
+
light["--playground-from"] = oklchToString(
|
|
6874
|
+
withAlpha({ l: 0.91, c: 0.03, h: brand.h, alpha: 0.6 }, 0.6)
|
|
6875
|
+
);
|
|
6876
|
+
light["--playground-via"] = oklchToString(
|
|
6877
|
+
withAlpha({ l: 0.965, c: 0.015, h: brand.h, alpha: 0.3 }, 0.3)
|
|
6878
|
+
);
|
|
6879
|
+
dark["--playground-from"] = oklchToString({
|
|
6880
|
+
l: 0.27,
|
|
6881
|
+
c: 0.03,
|
|
6882
|
+
h: brand.h,
|
|
6883
|
+
alpha: 1
|
|
6884
|
+
});
|
|
6885
|
+
dark["--playground-via"] = oklchToString({
|
|
6886
|
+
l: 0.19,
|
|
6887
|
+
c: 0.02,
|
|
6888
|
+
h: brand.h,
|
|
6889
|
+
alpha: 1
|
|
6890
|
+
});
|
|
6891
|
+
if (intent.tintNeutrals) {
|
|
6892
|
+
const t = neutralTints(brand);
|
|
6893
|
+
light["--secondary"] = oklchToString({
|
|
6894
|
+
l: 0.975,
|
|
6895
|
+
c: t.lightChroma,
|
|
6896
|
+
h: t.lightHue,
|
|
6897
|
+
alpha: 1
|
|
6898
|
+
});
|
|
6899
|
+
light["--muted"] = light["--secondary"];
|
|
6900
|
+
light["--accent"] ?? (light["--accent"] = oklchToString({
|
|
6901
|
+
l: 0.965,
|
|
6902
|
+
c: t.lightChroma,
|
|
6903
|
+
h: t.lightHue,
|
|
6904
|
+
alpha: 1
|
|
6905
|
+
}));
|
|
6906
|
+
light["--border"] = oklchToString({
|
|
6907
|
+
l: 0.91,
|
|
6908
|
+
c: t.lightChroma,
|
|
6909
|
+
h: t.lightHue,
|
|
6910
|
+
alpha: 1
|
|
6911
|
+
});
|
|
6912
|
+
dark["--secondary"] = oklchToString({
|
|
6913
|
+
l: 0.22,
|
|
6914
|
+
c: t.darkChroma,
|
|
6915
|
+
h: t.darkHue,
|
|
6916
|
+
alpha: 1
|
|
6917
|
+
});
|
|
6918
|
+
dark["--muted"] = dark["--secondary"];
|
|
6919
|
+
dark["--border"] = oklchToString({
|
|
6920
|
+
l: 1,
|
|
6921
|
+
c: 0,
|
|
6922
|
+
h: 0,
|
|
6923
|
+
alpha: 0.1
|
|
6924
|
+
});
|
|
6925
|
+
}
|
|
6926
|
+
if (isDev2()) {
|
|
6927
|
+
const lum = relativeLuminance(primaryLight);
|
|
6928
|
+
const fgIsLight = light["--primary-foreground"].includes("0.985");
|
|
6929
|
+
const fgLum = fgIsLight ? 1 : 0.05;
|
|
6930
|
+
const ratio = (Math.max(lum, fgLum) + 0.05) / (Math.min(lum, fgLum) + 0.05);
|
|
6931
|
+
if (ratio < 3.5) {
|
|
6932
|
+
console.warn(
|
|
6933
|
+
`[@timbal-ai/timbal-react] createTimbalTheme: brand "${intent.brand}" yields a low primary/foreground contrast (~${ratio.toFixed(2)}:1). Consider a darker or more saturated brand color for buttons/CTAs.`
|
|
6934
|
+
);
|
|
6935
|
+
}
|
|
6936
|
+
}
|
|
6937
|
+
return { light, dark, root };
|
|
6938
|
+
}
|
|
6939
|
+
function declarations(map, indent) {
|
|
6940
|
+
return Object.entries(map).map(([name, value]) => `${indent}${name}: ${value};`).join("\n");
|
|
6941
|
+
}
|
|
6942
|
+
function themeToCss(theme, options = {}) {
|
|
6943
|
+
const indent = options.indent ?? " ";
|
|
6944
|
+
const blocks = [];
|
|
6945
|
+
const lightVars = { ...theme.root ?? {}, ...theme.light };
|
|
6946
|
+
if (options.scope) {
|
|
6947
|
+
const sel = `[data-timbal-theme="${options.scope}"]`;
|
|
6948
|
+
if (Object.keys(lightVars).length) {
|
|
6949
|
+
blocks.push(`${sel} {
|
|
6950
|
+
${declarations(lightVars, indent)}
|
|
6951
|
+
}`);
|
|
6952
|
+
}
|
|
6953
|
+
if (Object.keys(theme.dark).length) {
|
|
6954
|
+
blocks.push(
|
|
6955
|
+
`.dark ${sel}, ${sel}.dark {
|
|
6956
|
+
${declarations(theme.dark, indent)}
|
|
6957
|
+
}`
|
|
6958
|
+
);
|
|
6959
|
+
}
|
|
6960
|
+
} else {
|
|
6961
|
+
if (Object.keys(lightVars).length) {
|
|
6962
|
+
blocks.push(`:root {
|
|
6963
|
+
${declarations(lightVars, indent)}
|
|
6964
|
+
}`);
|
|
6965
|
+
}
|
|
6966
|
+
if (Object.keys(theme.dark).length) {
|
|
6967
|
+
blocks.push(`.dark {
|
|
6968
|
+
${declarations(theme.dark, indent)}
|
|
6969
|
+
}`);
|
|
6970
|
+
}
|
|
6971
|
+
}
|
|
6972
|
+
return blocks.join("\n\n");
|
|
6973
|
+
}
|
|
6974
|
+
var RUNTIME_STYLE_ID = "timbal-theme-runtime";
|
|
6975
|
+
function applyTimbalTheme(theme) {
|
|
6976
|
+
if (typeof document === "undefined") return () => {
|
|
6977
|
+
};
|
|
6978
|
+
let el = document.getElementById(RUNTIME_STYLE_ID);
|
|
6979
|
+
if (!el) {
|
|
6980
|
+
el = document.createElement("style");
|
|
6981
|
+
el.id = RUNTIME_STYLE_ID;
|
|
6982
|
+
el.setAttribute("data-timbal-theme-runtime", "");
|
|
6983
|
+
document.head.appendChild(el);
|
|
6984
|
+
}
|
|
6985
|
+
el.textContent = themeToCss(theme);
|
|
6986
|
+
return () => {
|
|
6987
|
+
el?.parentNode?.removeChild(el);
|
|
6988
|
+
};
|
|
6989
|
+
}
|
|
6990
|
+
function clearTimbalTheme() {
|
|
6991
|
+
if (typeof document === "undefined") return;
|
|
6992
|
+
document.getElementById(RUNTIME_STYLE_ID)?.remove();
|
|
6993
|
+
}
|
|
6994
|
+
function isDev2() {
|
|
6995
|
+
if (typeof process !== "undefined" && process.env?.NODE_ENV === "production") {
|
|
6996
|
+
return false;
|
|
6997
|
+
}
|
|
6998
|
+
return true;
|
|
6999
|
+
}
|
|
6639
7000
|
|
|
6640
|
-
// src/
|
|
6641
|
-
var
|
|
6642
|
-
var
|
|
6643
|
-
|
|
6644
|
-
|
|
6645
|
-
|
|
7001
|
+
// src/design/theme-presets.ts
|
|
7002
|
+
var EMPTY_TOKENS = { light: {}, dark: {}, root: {} };
|
|
7003
|
+
var TIMBAL_THEME_PRESETS = [
|
|
7004
|
+
{
|
|
7005
|
+
id: "platform",
|
|
7006
|
+
label: "Platform",
|
|
7007
|
+
description: "Shipped neutral monochrome \u2014 the Timbal Platform default. Calm, brand-agnostic.",
|
|
7008
|
+
swatch: "oklch(0.205 0 0)",
|
|
7009
|
+
tokens: EMPTY_TOKENS
|
|
7010
|
+
},
|
|
7011
|
+
{
|
|
7012
|
+
id: "indigo",
|
|
7013
|
+
label: "Indigo",
|
|
7014
|
+
description: "Cool, trustworthy blue-violet \u2014 good for analytics & ops dashboards.",
|
|
7015
|
+
swatch: "#4f46e5",
|
|
7016
|
+
tokens: createTimbalTheme({ brand: "#4f46e5" })
|
|
7017
|
+
},
|
|
7018
|
+
{
|
|
7019
|
+
id: "violet",
|
|
7020
|
+
label: "Violet",
|
|
7021
|
+
description: "Vivid purple \u2014 expressive, product/marketing-leaning surfaces.",
|
|
7022
|
+
swatch: "#7c3aed",
|
|
7023
|
+
tokens: createTimbalTheme({ brand: "#7c3aed" })
|
|
7024
|
+
},
|
|
7025
|
+
{
|
|
7026
|
+
id: "forest",
|
|
7027
|
+
label: "Forest",
|
|
7028
|
+
description: "Grounded green \u2014 finance, sustainability, status-positive apps.",
|
|
7029
|
+
swatch: "#16a34a",
|
|
7030
|
+
tokens: createTimbalTheme({ brand: "#16a34a" })
|
|
7031
|
+
},
|
|
7032
|
+
{
|
|
7033
|
+
id: "warm",
|
|
7034
|
+
label: "Warm",
|
|
7035
|
+
description: "Energetic orange \u2014 consumer, creative, high-engagement tools.",
|
|
7036
|
+
swatch: "#ea580c",
|
|
7037
|
+
tokens: createTimbalTheme({ brand: "#ea580c" })
|
|
7038
|
+
},
|
|
7039
|
+
{
|
|
7040
|
+
id: "slate",
|
|
7041
|
+
label: "Slate",
|
|
7042
|
+
description: "Muted cool gray-blue with a subtle tint \u2014 understated enterprise.",
|
|
7043
|
+
swatch: "#475569",
|
|
7044
|
+
tokens: createTimbalTheme({ brand: "#475569", tintNeutrals: true })
|
|
7045
|
+
}
|
|
7046
|
+
];
|
|
7047
|
+
var PRESET_BY_ID = new Map(
|
|
7048
|
+
TIMBAL_THEME_PRESETS.map((preset) => [preset.id, preset])
|
|
7049
|
+
);
|
|
7050
|
+
function getThemePreset(id) {
|
|
7051
|
+
return PRESET_BY_ID.get(id);
|
|
7052
|
+
}
|
|
7053
|
+
function applyThemePreset(id) {
|
|
7054
|
+
const preset = PRESET_BY_ID.get(id);
|
|
7055
|
+
if (!preset) return () => {
|
|
7056
|
+
};
|
|
7057
|
+
if (typeof window !== "undefined") {
|
|
7058
|
+
try {
|
|
7059
|
+
window.localStorage.setItem(STORAGE_KEYS.themePreset, id);
|
|
7060
|
+
} catch {
|
|
7061
|
+
}
|
|
7062
|
+
}
|
|
7063
|
+
return applyTimbalTheme(preset.tokens);
|
|
7064
|
+
}
|
|
7065
|
+
function getStoredThemePreset() {
|
|
7066
|
+
if (typeof window === "undefined") return null;
|
|
7067
|
+
try {
|
|
7068
|
+
const value = window.localStorage.getItem(STORAGE_KEYS.themePreset);
|
|
7069
|
+
return value && PRESET_BY_ID.has(value) ? value : null;
|
|
7070
|
+
} catch {
|
|
7071
|
+
return null;
|
|
7072
|
+
}
|
|
6646
7073
|
}
|
|
6647
7074
|
|
|
6648
|
-
// src/
|
|
7075
|
+
// src/design/theme-instructions.ts
|
|
7076
|
+
var THEME_AGENT_INSTRUCTIONS = `
|
|
7077
|
+
## Theming (@timbal-ai/timbal-react)
|
|
7078
|
+
|
|
7079
|
+
The package ships a complete light + dark token system (\`styles.css\`). Components are written against semantic Tailwind tokens (\`bg-background\`, \`text-primary\`, \`border-border\`, \`bg-elevated-from\`, \`bg-bubble-user\`, \u2026). To restyle, you change CSS variables \u2014 **never** hardcode colors in component code.
|
|
7080
|
+
|
|
7081
|
+
### Golden rule
|
|
7082
|
+
|
|
7083
|
+
**Never write \`oklch(...)\` / hex literals or hand-author paired \`:root\` + \`.dark\` blocks.** Express intent and let the package derive a complete, contrast-correct, paired palette.
|
|
7084
|
+
|
|
7085
|
+
### Pick a brand color (rebrand)
|
|
7086
|
+
|
|
7087
|
+
\`\`\`ts
|
|
7088
|
+
import { createTimbalTheme, themeToCss } from "@timbal-ai/timbal-react";
|
|
7089
|
+
|
|
7090
|
+
const theme = createTimbalTheme({ brand: "#4f46e5" /* accent?, radius?, tintNeutrals? */ });
|
|
7091
|
+
// Build-time: write once into your app CSS (paired light + dark, guaranteed in sync):
|
|
7092
|
+
const css = themeToCss(theme);
|
|
7093
|
+
\`\`\`
|
|
7094
|
+
|
|
7095
|
+
- For a real company, look up the actual brand hex first (brandfetch / "<company> brand color hex"), then pass it as \`brand\`.
|
|
7096
|
+
- \`createTimbalTheme\` derives \`--primary\`, its foreground, ring, the full button gradient, and a soft playground tint. You only supply intent.
|
|
7097
|
+
|
|
7098
|
+
### Apply a theme
|
|
7099
|
+
|
|
7100
|
+
- **Build-time / SSR:** \`themeToCss(theme)\` \u2192 paste the returned CSS into your \`index.css\` (after the \`@import "@timbal-ai/timbal-react/styles.css"\`). One block, both modes.
|
|
7101
|
+
- **Runtime / swappable:** \`applyTimbalTheme(theme)\` injects a managed \`<style>\` and returns a disposer. Works with the \`.dark\` toggle (next-themes / ModeToggle).
|
|
7102
|
+
- **Component:** render \`<TimbalThemeStyle theme={theme} />\` (or \`preset="indigo"\`) once near the app root.
|
|
7103
|
+
|
|
7104
|
+
### Offer styles to the user ("show compatible styles, then apply")
|
|
7105
|
+
|
|
7106
|
+
Use the closed preset catalog \u2014 do not invent options:
|
|
7107
|
+
|
|
7108
|
+
\`\`\`ts
|
|
7109
|
+
import { TIMBAL_THEME_PRESETS, applyThemePreset } from "@timbal-ai/timbal-react";
|
|
7110
|
+
// TIMBAL_THEME_PRESETS: { id, label, description, swatch, tokens }[]
|
|
7111
|
+
\`\`\`
|
|
7112
|
+
|
|
7113
|
+
| Preset id | Use when |
|
|
7114
|
+
|-----------|----------|
|
|
7115
|
+
| \`platform\` | Neutral monochrome default (no brand) |
|
|
7116
|
+
| \`indigo\` | Cool, trustworthy \u2014 analytics / ops dashboards |
|
|
7117
|
+
| \`violet\` | Expressive purple \u2014 product / marketing |
|
|
7118
|
+
| \`forest\` | Green \u2014 finance, sustainability, positive status |
|
|
7119
|
+
| \`warm\` | Orange \u2014 consumer / creative / high-engagement |
|
|
7120
|
+
| \`slate\` | Muted enterprise gray-blue (tinted neutrals) |
|
|
7121
|
+
|
|
7122
|
+
- To present options visually, render \`<ThemePresetGallery value={id} onSelect={setId} />\` \u2014 each swatch previews real components (Button + metric tile) scoped via \`data-timbal-theme\`, so the live app doesn't change until the user picks.
|
|
7123
|
+
- On selection, call \`applyThemePreset(id)\` (persists to \`localStorage\` and restores on reload).
|
|
7124
|
+
|
|
7125
|
+
### Rules
|
|
7126
|
+
|
|
7127
|
+
- Generated pages use **semantic Tailwind tokens only** \u2014 never literal colors or per-element \`style={{ color }}\`.
|
|
7128
|
+
- Light/dark mode stays the \`.dark\` class (\`next-themes attribute="class"\` or \`ModeToggle\`). Presets are **brand**, not a second dark-mode system.
|
|
7129
|
+
- Override individual tokens only for one-offs the generator doesn't cover; if you must, set the variable in **both** \`:root\` and \`.dark\` (a dev-only warning fires otherwise).
|
|
7130
|
+
`.trim();
|
|
7131
|
+
|
|
7132
|
+
// src/app/theme/TimbalThemeStyle.tsx
|
|
6649
7133
|
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
6650
|
-
var
|
|
6651
|
-
|
|
6652
|
-
|
|
6653
|
-
|
|
6654
|
-
|
|
6655
|
-
);
|
|
6656
|
-
var floatingPanelClass = cn(
|
|
6657
|
-
"aui-app-shell-chat-float fixed z-50 flex flex-col overflow-hidden rounded-2xl border border-border/60 shadow-card-elevated",
|
|
6658
|
-
"bg-card/85 backdrop-blur-xl supports-backdrop-filter:bg-card/75",
|
|
6659
|
-
// Mobile: stretch between insets (no fixed width — avoids a wide empty strip on the right)
|
|
6660
|
-
"max-sm:inset-x-3 max-sm:top-3 max-sm:bottom-3 max-sm:w-auto",
|
|
6661
|
-
"sm:top-6 sm:right-6 sm:bottom-6 sm:w-[var(--app-shell-chat-width)] sm:max-w-[calc(100vw-3rem)]"
|
|
6662
|
-
);
|
|
6663
|
-
var AppShellBody = ({
|
|
6664
|
-
sidebar,
|
|
6665
|
-
topbarContent,
|
|
6666
|
-
mainClassName,
|
|
6667
|
-
insetPaddingPx,
|
|
6668
|
-
insetExpanded,
|
|
6669
|
-
children
|
|
7134
|
+
var TimbalThemeStyle = ({
|
|
7135
|
+
theme,
|
|
7136
|
+
preset,
|
|
7137
|
+
scope,
|
|
7138
|
+
nonce
|
|
6670
7139
|
}) => {
|
|
6671
|
-
const
|
|
6672
|
-
|
|
6673
|
-
const
|
|
6674
|
-
|
|
6675
|
-
layoutDirection
|
|
6676
|
-
);
|
|
6677
|
-
const insetPadding = sidebar ? insetPaddingPx : 0;
|
|
7140
|
+
const tokens = theme ?? (preset ? getThemePreset(preset)?.tokens : void 0);
|
|
7141
|
+
if (!tokens) return null;
|
|
7142
|
+
const css = themeToCss(tokens, scope ? { scope } : void 0);
|
|
7143
|
+
if (!css) return null;
|
|
6678
7144
|
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
6679
|
-
|
|
7145
|
+
"style",
|
|
6680
7146
|
{
|
|
6681
|
-
|
|
6682
|
-
|
|
6683
|
-
|
|
6684
|
-
transition: layoutTransition,
|
|
6685
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
6686
|
-
"div",
|
|
6687
|
-
{
|
|
6688
|
-
className: cn(
|
|
6689
|
-
"aui-app-shell-scroll flex min-h-0 flex-1 flex-col overflow-y-auto",
|
|
6690
|
-
!topbarContent && appShellInsetTopClass
|
|
6691
|
-
),
|
|
6692
|
-
children: [
|
|
6693
|
-
topbarContent ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("header", { className: cn("aui-app-shell-topbar-region", appShellTopbarStickyClass), children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: appShellTopbarInsetClass, children: topbarContent }) }) : null,
|
|
6694
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("main", { className: cn("aui-app-shell-main min-w-0 flex-1", mainClassName), children })
|
|
6695
|
-
]
|
|
6696
|
-
}
|
|
6697
|
-
)
|
|
7147
|
+
"data-timbal-theme-style": scope ?? "root",
|
|
7148
|
+
nonce,
|
|
7149
|
+
dangerouslySetInnerHTML: { __html: css }
|
|
6698
7150
|
}
|
|
6699
7151
|
);
|
|
6700
7152
|
};
|
|
6701
|
-
|
|
6702
|
-
|
|
6703
|
-
|
|
6704
|
-
|
|
6705
|
-
|
|
6706
|
-
|
|
6707
|
-
|
|
6708
|
-
|
|
6709
|
-
|
|
6710
|
-
|
|
6711
|
-
|
|
6712
|
-
|
|
6713
|
-
|
|
6714
|
-
|
|
6715
|
-
|
|
7153
|
+
|
|
7154
|
+
// src/app/data/metrics-shared.tsx
|
|
7155
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
7156
|
+
var metricCardShellClass = cn(
|
|
7157
|
+
studioIntegrationCardClass,
|
|
7158
|
+
"aui-app-metric-card shadow-none",
|
|
7159
|
+
"flex flex-col overflow-hidden"
|
|
7160
|
+
);
|
|
7161
|
+
var metricCardHeaderClass = "flex items-start justify-between gap-3 px-4 pb-1 pt-3";
|
|
7162
|
+
var metricTilesRowClass = "grid w-full min-w-0";
|
|
7163
|
+
var metricChartRegionClass = "relative min-h-0 w-full border-t border-border/40 pt-2";
|
|
7164
|
+
var metricChartPlotRegionClass = "relative min-h-0 w-full border-t border-border/40 px-0 pt-5 pb-3";
|
|
7165
|
+
var metricCellDividerClass = "border-r border-border/40";
|
|
7166
|
+
var MetricCardHeader = ({
|
|
7167
|
+
title,
|
|
7168
|
+
titleId,
|
|
7169
|
+
description,
|
|
7170
|
+
actions
|
|
7171
|
+
}) => {
|
|
7172
|
+
if (!title && !description && !actions) return null;
|
|
7173
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("header", { className: metricCardHeaderClass, children: [
|
|
7174
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "min-w-0", children: [
|
|
7175
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("h3", { id: titleId, className: "text-base font-normal text-foreground", children: title }) : null,
|
|
7176
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { className: "mt-0.5 text-sm text-muted-foreground", children: description }) : null
|
|
7177
|
+
] }),
|
|
7178
|
+
actions ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "shrink-0", children: actions }) : null
|
|
7179
|
+
] });
|
|
7180
|
+
};
|
|
7181
|
+
function metricTilesGridColsClass(n) {
|
|
7182
|
+
switch (n) {
|
|
7183
|
+
case 1:
|
|
7184
|
+
return "grid-cols-1";
|
|
7185
|
+
case 2:
|
|
7186
|
+
return "grid-cols-2";
|
|
7187
|
+
case 3:
|
|
7188
|
+
return "grid-cols-3";
|
|
7189
|
+
case 5:
|
|
7190
|
+
return "grid-cols-2 sm:grid-cols-5";
|
|
7191
|
+
case 6:
|
|
7192
|
+
return "grid-cols-2 sm:grid-cols-3 lg:grid-cols-6";
|
|
7193
|
+
default:
|
|
7194
|
+
return "grid-cols-2 md:grid-cols-4";
|
|
7195
|
+
}
|
|
7196
|
+
}
|
|
7197
|
+
|
|
7198
|
+
// src/app/data/MetricTile.tsx
|
|
7199
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
7200
|
+
var trendToneClass = {
|
|
7201
|
+
up: "border-border/80 bg-muted/40 text-muted-foreground",
|
|
7202
|
+
down: "border-border/80 bg-muted/40 text-muted-foreground",
|
|
7203
|
+
neutral: "border-border/80 bg-muted/30 text-muted-foreground"
|
|
7204
|
+
};
|
|
7205
|
+
var metricTileBaseClass = "relative flex min-w-0 flex-1 flex-col gap-1 px-4 py-3 text-left font-normal";
|
|
7206
|
+
var metricTileInteractiveClass = cn(
|
|
7207
|
+
metricTileBaseClass,
|
|
7208
|
+
"bg-transparent hover:bg-transparent active:bg-transparent",
|
|
7209
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-foreground/10"
|
|
7210
|
+
);
|
|
7211
|
+
var MetricTile = ({
|
|
7212
|
+
label,
|
|
7213
|
+
value,
|
|
7214
|
+
unit,
|
|
7215
|
+
trend,
|
|
7216
|
+
trendTone = "neutral",
|
|
7217
|
+
active = false,
|
|
7218
|
+
showDivider = false,
|
|
7219
|
+
onSelect,
|
|
7220
|
+
ariaLabel,
|
|
7221
|
+
className
|
|
7222
|
+
}) => {
|
|
7223
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
|
|
7224
|
+
active ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
7225
|
+
"span",
|
|
7226
|
+
{
|
|
7227
|
+
"aria-hidden": true,
|
|
7228
|
+
className: "absolute inset-x-0 bottom-0 h-0.5 bg-foreground dark:bg-white"
|
|
7229
|
+
}
|
|
7230
|
+
) : null,
|
|
7231
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "text-xs font-normal text-muted-foreground", children: label }),
|
|
7232
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("span", { className: "flex items-center gap-2", children: [
|
|
7233
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("span", { className: "flex items-baseline gap-1", children: [
|
|
7234
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "text-2xl font-normal tracking-tight text-foreground tabular-nums", children: value }),
|
|
7235
|
+
unit ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "text-xs font-normal text-muted-foreground", children: unit }) : null
|
|
7236
|
+
] }),
|
|
7237
|
+
trend ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
7238
|
+
"span",
|
|
7239
|
+
{
|
|
7240
|
+
className: cn(
|
|
7241
|
+
"rounded-full border px-1.5 py-0.5 text-xs font-normal",
|
|
7242
|
+
trendToneClass[trendTone]
|
|
7243
|
+
),
|
|
7244
|
+
children: trend
|
|
7245
|
+
}
|
|
7246
|
+
) : null
|
|
7247
|
+
] })
|
|
7248
|
+
] });
|
|
7249
|
+
const divider = showDivider ? metricCellDividerClass : void 0;
|
|
7250
|
+
if (onSelect) {
|
|
7251
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
7252
|
+
"button",
|
|
7253
|
+
{
|
|
7254
|
+
type: "button",
|
|
7255
|
+
onClick: onSelect,
|
|
7256
|
+
"aria-pressed": active,
|
|
7257
|
+
"aria-label": ariaLabel,
|
|
7258
|
+
className: cn(metricTileInteractiveClass, divider, className),
|
|
7259
|
+
children: content
|
|
7260
|
+
}
|
|
7261
|
+
);
|
|
7262
|
+
}
|
|
7263
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: cn(metricTileBaseClass, divider, className), children: content });
|
|
7264
|
+
};
|
|
7265
|
+
|
|
7266
|
+
// src/app/theme/ThemePresetGallery.tsx
|
|
7267
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
7268
|
+
var ThemePresetGallery = ({
|
|
7269
|
+
value,
|
|
7270
|
+
onSelect,
|
|
7271
|
+
presets,
|
|
7272
|
+
className
|
|
7273
|
+
}) => {
|
|
7274
|
+
const items = presets ? TIMBAL_THEME_PRESETS.filter((p) => presets.includes(p.id)) : TIMBAL_THEME_PRESETS;
|
|
7275
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
7276
|
+
"div",
|
|
7277
|
+
{
|
|
7278
|
+
role: "radiogroup",
|
|
7279
|
+
"aria-label": "Theme presets",
|
|
7280
|
+
className: cn(
|
|
7281
|
+
"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",
|
|
7282
|
+
className
|
|
7283
|
+
),
|
|
7284
|
+
children: items.map((preset) => {
|
|
7285
|
+
const selected = value === preset.id;
|
|
7286
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { "data-timbal-theme": preset.id, children: [
|
|
7287
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(TimbalThemeStyle, { preset: preset.id, scope: preset.id }),
|
|
7288
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
7289
|
+
"button",
|
|
7290
|
+
{
|
|
7291
|
+
type: "button",
|
|
7292
|
+
role: "radio",
|
|
7293
|
+
"aria-checked": selected,
|
|
7294
|
+
"aria-label": `${preset.label} theme`,
|
|
7295
|
+
onClick: () => onSelect?.(preset.id),
|
|
7296
|
+
className: cn(
|
|
7297
|
+
"group flex w-full flex-col gap-3 rounded-xl border bg-card p-3 text-left transition-colors",
|
|
7298
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
7299
|
+
selected ? "border-primary ring-2 ring-primary/30" : "border-border hover:border-foreground/30"
|
|
7300
|
+
),
|
|
7301
|
+
children: [
|
|
7302
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
|
|
7303
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { className: "flex items-center gap-2", children: [
|
|
7304
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
7305
|
+
"span",
|
|
7306
|
+
{
|
|
7307
|
+
"aria-hidden": true,
|
|
7308
|
+
className: "size-4 shrink-0 rounded-full ring-1 ring-black/10",
|
|
7309
|
+
style: { background: preset.swatch }
|
|
7310
|
+
}
|
|
7311
|
+
),
|
|
7312
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "text-sm font-medium text-foreground", children: preset.label })
|
|
7313
|
+
] }),
|
|
7314
|
+
selected ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "text-xs font-medium text-primary", children: "Selected" }) : null
|
|
7315
|
+
] }),
|
|
7316
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-xs leading-snug text-muted-foreground", children: preset.description }),
|
|
7317
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex flex-col gap-2 rounded-lg border border-border bg-background p-2", children: [
|
|
7318
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
7319
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Button, { size: "xs", className: "pointer-events-none", children: "Primary" }),
|
|
7320
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "size-5 rounded-md bg-primary", "aria-hidden": true }),
|
|
7321
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "size-5 rounded-md bg-muted", "aria-hidden": true }),
|
|
7322
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
7323
|
+
"span",
|
|
7324
|
+
{
|
|
7325
|
+
className: "size-5 rounded-md border border-border bg-accent",
|
|
7326
|
+
"aria-hidden": true
|
|
7327
|
+
}
|
|
7328
|
+
)
|
|
7329
|
+
] }),
|
|
7330
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(MetricTile, { label: "Active users", value: "1,248", trend: "+8%" })
|
|
7331
|
+
] })
|
|
7332
|
+
]
|
|
7333
|
+
}
|
|
7334
|
+
)
|
|
7335
|
+
] }, preset.id);
|
|
7336
|
+
})
|
|
7337
|
+
}
|
|
7338
|
+
);
|
|
7339
|
+
};
|
|
7340
|
+
|
|
7341
|
+
// src/app/layout/AppShell.tsx
|
|
7342
|
+
var import_react55 = require("motion/react");
|
|
7343
|
+
var import_react56 = require("react");
|
|
7344
|
+
|
|
7345
|
+
// src/design/app-classes.ts
|
|
7346
|
+
var appPageColumnClass = "mx-auto w-full max-w-6xl px-4 md:px-6";
|
|
7347
|
+
var appShellTopbarInsetClass = "w-full px-4 md:px-6";
|
|
7348
|
+
var appShellInsetTopClass = "pt-4 md:pt-6";
|
|
7349
|
+
var appShellTopbarRowClass = cn(
|
|
7350
|
+
studioTopbarPillHeightClass,
|
|
7351
|
+
"flex w-full items-center justify-between gap-2"
|
|
7352
|
+
);
|
|
7353
|
+
var appShellTopbarStickyClass = cn(
|
|
7354
|
+
"sticky top-0 z-20 shrink-0 bg-background pb-2",
|
|
7355
|
+
appShellInsetTopClass
|
|
7356
|
+
);
|
|
7357
|
+
var appPageHeaderClass = cn(
|
|
7358
|
+
"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",
|
|
7359
|
+
"pb-4 pt-2"
|
|
7360
|
+
);
|
|
7361
|
+
var appSectionClass = "flex flex-col gap-4 py-4";
|
|
7362
|
+
var appSectionTitleClass = "text-lg font-semibold text-foreground";
|
|
7363
|
+
var appSectionDescriptionClass = "text-sm text-muted-foreground";
|
|
7364
|
+
var appSurfaceCardClass = cn(
|
|
7365
|
+
studioIntegrationCardClass,
|
|
7366
|
+
"p-4 md:p-5"
|
|
7367
|
+
);
|
|
7368
|
+
var appStatTileClass = cn(
|
|
7369
|
+
appSurfaceCardClass,
|
|
7370
|
+
"flex flex-col gap-1 px-4 py-3 shadow-none"
|
|
7371
|
+
);
|
|
7372
|
+
var appStatValueClass = "text-2xl font-normal tracking-tight text-foreground tabular-nums";
|
|
7373
|
+
var appStatLabelClass = "text-xs font-normal text-muted-foreground";
|
|
7374
|
+
var appFilterBarClass = cn(
|
|
7375
|
+
"flex flex-wrap items-center gap-2",
|
|
7376
|
+
studioTopbarPillHeightClass
|
|
7377
|
+
);
|
|
7378
|
+
var appSearchInputClass = cn(studioSearchChromeClass, "text-sm");
|
|
7379
|
+
var appBreadcrumbsClass = "flex flex-wrap items-center gap-1.5 text-sm text-muted-foreground";
|
|
7380
|
+
var appBreadcrumbLinkClass = "transition-colors hover:text-foreground";
|
|
7381
|
+
var appFieldClass = "flex flex-col gap-1.5";
|
|
7382
|
+
var appFieldLabelClass = "text-sm font-medium text-foreground";
|
|
7383
|
+
var appFieldHintClass = "text-xs text-muted-foreground";
|
|
7384
|
+
var appInputClass = cn(
|
|
7385
|
+
studioSecondaryChromeClass,
|
|
7386
|
+
"h-10 w-full rounded-lg px-3 text-sm text-foreground outline-none",
|
|
7387
|
+
"placeholder:text-muted-foreground/70",
|
|
7388
|
+
"focus-visible:ring-2 focus-visible:ring-foreground/10"
|
|
7389
|
+
);
|
|
7390
|
+
var appEmptyStateClass = cn(
|
|
7391
|
+
appSurfaceCardClass,
|
|
7392
|
+
"flex flex-col items-center justify-center gap-2 py-12 text-center"
|
|
7393
|
+
);
|
|
7394
|
+
var appEmptyStateTitleClass = "text-base font-medium text-foreground";
|
|
7395
|
+
var appEmptyStateDescriptionClass = "max-w-sm text-sm text-muted-foreground";
|
|
7396
|
+
var appChartPanelClass = cn(appSurfaceCardClass, "flex flex-col gap-3");
|
|
7397
|
+
|
|
7398
|
+
// src/app/layout/app-shell-chat-context.tsx
|
|
7399
|
+
var import_react54 = require("react");
|
|
7400
|
+
var AppShellChatContext = (0, import_react54.createContext)(null);
|
|
7401
|
+
var AppShellChatProvider = AppShellChatContext.Provider;
|
|
7402
|
+
function useAppShellChat() {
|
|
7403
|
+
return (0, import_react54.useContext)(AppShellChatContext);
|
|
7404
|
+
}
|
|
7405
|
+
|
|
7406
|
+
// src/app/layout/AppShell.tsx
|
|
7407
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
7408
|
+
var floatingTriggerClass = cn(
|
|
7409
|
+
"aui-app-shell-chat-trigger-fixed fixed z-50 rounded-full px-5 py-2.5 text-sm font-medium shadow-card-elevated",
|
|
7410
|
+
"bg-primary text-primary-foreground transition-colors hover:bg-primary/90",
|
|
7411
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
7412
|
+
"bottom-6 right-6 max-sm:bottom-4 max-sm:right-4"
|
|
7413
|
+
);
|
|
7414
|
+
var floatingPanelClass = cn(
|
|
7415
|
+
"aui-app-shell-chat-float fixed z-50 flex flex-col overflow-hidden rounded-2xl border border-border/60 shadow-card-elevated",
|
|
7416
|
+
"bg-card/85 backdrop-blur-xl supports-backdrop-filter:bg-card/75",
|
|
7417
|
+
// Mobile: stretch between insets (no fixed width — avoids a wide empty strip on the right)
|
|
7418
|
+
"max-sm:inset-x-3 max-sm:top-3 max-sm:bottom-3 max-sm:w-auto",
|
|
7419
|
+
"sm:top-6 sm:right-6 sm:bottom-6 sm:w-[var(--app-shell-chat-width)] sm:max-w-[calc(100vw-3rem)]"
|
|
7420
|
+
);
|
|
7421
|
+
var AppShellBody = ({
|
|
7422
|
+
sidebar,
|
|
7423
|
+
topbarContent,
|
|
7424
|
+
mainClassName,
|
|
7425
|
+
insetPaddingPx,
|
|
7426
|
+
insetExpanded,
|
|
7427
|
+
children
|
|
7428
|
+
}) => {
|
|
7429
|
+
const reducedMotion = (0, import_react55.useReducedMotion)();
|
|
7430
|
+
const layoutDirection = insetExpanded ? "expand" : "collapse";
|
|
7431
|
+
const layoutTransition = studioSidebarWidthTransition(
|
|
7432
|
+
!!reducedMotion,
|
|
7433
|
+
layoutDirection
|
|
7434
|
+
);
|
|
7435
|
+
const insetPadding = sidebar ? insetPaddingPx : 0;
|
|
7436
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
7437
|
+
import_react55.motion.div,
|
|
7438
|
+
{
|
|
7439
|
+
className: "aui-app-shell-body relative z-10 flex min-h-0 min-w-0 flex-1 flex-col",
|
|
7440
|
+
initial: false,
|
|
7441
|
+
animate: { paddingLeft: insetPadding },
|
|
7442
|
+
transition: layoutTransition,
|
|
7443
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
7444
|
+
"div",
|
|
7445
|
+
{
|
|
7446
|
+
className: cn(
|
|
7447
|
+
"aui-app-shell-scroll flex min-h-0 flex-1 flex-col overflow-y-auto",
|
|
7448
|
+
!topbarContent && appShellInsetTopClass
|
|
7449
|
+
),
|
|
7450
|
+
children: [
|
|
7451
|
+
topbarContent ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("header", { className: cn("aui-app-shell-topbar-region", appShellTopbarStickyClass), children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: appShellTopbarInsetClass, children: topbarContent }) }) : null,
|
|
7452
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("main", { className: cn("aui-app-shell-main min-w-0 flex-1", mainClassName), children })
|
|
7453
|
+
]
|
|
7454
|
+
}
|
|
7455
|
+
)
|
|
7456
|
+
}
|
|
7457
|
+
);
|
|
7458
|
+
};
|
|
7459
|
+
var AppShell = ({
|
|
7460
|
+
sidebar,
|
|
7461
|
+
topbar,
|
|
7462
|
+
header,
|
|
7463
|
+
children,
|
|
7464
|
+
chat,
|
|
7465
|
+
chatWidth = "24rem",
|
|
7466
|
+
chatHeight,
|
|
7467
|
+
chatOpen: chatOpenProp,
|
|
7468
|
+
defaultChatOpen = false,
|
|
7469
|
+
onChatOpenChange,
|
|
7470
|
+
chatCollapsible = true,
|
|
7471
|
+
chatTriggerLabel = "Assistant",
|
|
7472
|
+
hideChatTrigger = false,
|
|
7473
|
+
className,
|
|
6716
7474
|
mainClassName
|
|
6717
7475
|
}) => {
|
|
6718
7476
|
const topbarContent = topbar ?? header;
|
|
@@ -6739,7 +7497,7 @@ var AppShell = ({
|
|
|
6739
7497
|
setInsetPaddingPx(insetPx);
|
|
6740
7498
|
}, []);
|
|
6741
7499
|
const insetExpanded = insetPaddingPx >= SIDEBAR_INSET_PX_EXPANDED;
|
|
6742
|
-
const shellBody = /* @__PURE__ */ (0,
|
|
7500
|
+
const shellBody = /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
6743
7501
|
AppShellBody,
|
|
6744
7502
|
{
|
|
6745
7503
|
sidebar,
|
|
@@ -6750,7 +7508,7 @@ var AppShell = ({
|
|
|
6750
7508
|
children
|
|
6751
7509
|
}
|
|
6752
7510
|
);
|
|
6753
|
-
const tree = /* @__PURE__ */ (0,
|
|
7511
|
+
const tree = /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ShellInsetProvider, { value: sidebar ? reportShellInset : null, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
6754
7512
|
"div",
|
|
6755
7513
|
{
|
|
6756
7514
|
className: cn(
|
|
@@ -6761,7 +7519,7 @@ var AppShell = ({
|
|
|
6761
7519
|
children: [
|
|
6762
7520
|
sidebar,
|
|
6763
7521
|
shellBody,
|
|
6764
|
-
hasChat && chatOpen ? /* @__PURE__ */ (0,
|
|
7522
|
+
hasChat && chatOpen ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
6765
7523
|
"div",
|
|
6766
7524
|
{
|
|
6767
7525
|
className: floatingPanelClass,
|
|
@@ -6774,7 +7532,7 @@ var AppShell = ({
|
|
|
6774
7532
|
children: chat
|
|
6775
7533
|
}
|
|
6776
7534
|
) : null,
|
|
6777
|
-
hasChat && chatCollapsible && !chatOpen && !hideChatTrigger ? /* @__PURE__ */ (0,
|
|
7535
|
+
hasChat && chatCollapsible && !chatOpen && !hideChatTrigger ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
6778
7536
|
"button",
|
|
6779
7537
|
{
|
|
6780
7538
|
type: "button",
|
|
@@ -6790,7 +7548,7 @@ var AppShell = ({
|
|
|
6790
7548
|
if (!hasChat) {
|
|
6791
7549
|
return tree;
|
|
6792
7550
|
}
|
|
6793
|
-
return /* @__PURE__ */ (0,
|
|
7551
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
6794
7552
|
AppShellChatProvider,
|
|
6795
7553
|
{
|
|
6796
7554
|
value: {
|
|
@@ -6805,24 +7563,24 @@ var AppShell = ({
|
|
|
6805
7563
|
};
|
|
6806
7564
|
|
|
6807
7565
|
// src/app/layout/AppShellTopbar.tsx
|
|
6808
|
-
var
|
|
7566
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
6809
7567
|
var AppShellTopbar = ({
|
|
6810
7568
|
start,
|
|
6811
7569
|
actions,
|
|
6812
7570
|
children,
|
|
6813
7571
|
className
|
|
6814
7572
|
}) => {
|
|
6815
|
-
return /* @__PURE__ */ (0,
|
|
6816
|
-
/* @__PURE__ */ (0,
|
|
7573
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: cn("aui-app-shell-topbar", appShellTopbarRowClass, className), children: [
|
|
7574
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
|
|
6817
7575
|
start,
|
|
6818
7576
|
children
|
|
6819
7577
|
] }),
|
|
6820
|
-
actions ? /* @__PURE__ */ (0,
|
|
7578
|
+
actions ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "aui-app-shell-topbar-actions flex shrink-0 items-center gap-2", children: actions }) : null
|
|
6821
7579
|
] });
|
|
6822
7580
|
};
|
|
6823
7581
|
|
|
6824
7582
|
// src/app/layout/AppShellChatTrigger.tsx
|
|
6825
|
-
var
|
|
7583
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
6826
7584
|
var floatingPositionClass = "fixed bottom-6 right-6 z-50 max-sm:bottom-4 max-sm:right-4";
|
|
6827
7585
|
var AppShellChatTrigger = ({
|
|
6828
7586
|
className,
|
|
@@ -6831,7 +7589,7 @@ var AppShellChatTrigger = ({
|
|
|
6831
7589
|
}) => {
|
|
6832
7590
|
const shellChat = useAppShellChat();
|
|
6833
7591
|
if (!shellChat || shellChat.open) return null;
|
|
6834
|
-
return /* @__PURE__ */ (0,
|
|
7592
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
6835
7593
|
TimbalV2Button,
|
|
6836
7594
|
{
|
|
6837
7595
|
type: "button",
|
|
@@ -6851,61 +7609,61 @@ var AppShellChatTrigger = ({
|
|
|
6851
7609
|
};
|
|
6852
7610
|
|
|
6853
7611
|
// src/app/layout/PageHeader.tsx
|
|
6854
|
-
var
|
|
7612
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
6855
7613
|
var PageHeader = ({
|
|
6856
7614
|
title,
|
|
6857
7615
|
description,
|
|
6858
7616
|
actions,
|
|
6859
7617
|
className
|
|
6860
7618
|
}) => {
|
|
6861
|
-
return /* @__PURE__ */ (0,
|
|
6862
|
-
/* @__PURE__ */ (0,
|
|
6863
|
-
/* @__PURE__ */ (0,
|
|
6864
|
-
description ? /* @__PURE__ */ (0,
|
|
7619
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("header", { className: cn("aui-app-page-header", appPageHeaderClass, className), children: [
|
|
7620
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "min-w-0", children: [
|
|
7621
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("h1", { className: "text-2xl font-semibold tracking-tight text-foreground", children: title }),
|
|
7622
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("p", { className: "mt-1 text-sm text-muted-foreground", children: description }) : null
|
|
6865
7623
|
] }),
|
|
6866
|
-
actions ? /* @__PURE__ */ (0,
|
|
7624
|
+
actions ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "aui-app-page-header-actions flex shrink-0 flex-wrap items-center gap-2", children: actions }) : null
|
|
6867
7625
|
] });
|
|
6868
7626
|
};
|
|
6869
7627
|
|
|
6870
7628
|
// src/app/layout/Page.tsx
|
|
6871
|
-
var
|
|
7629
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
6872
7630
|
var Page = ({
|
|
6873
7631
|
children,
|
|
6874
7632
|
breadcrumbs,
|
|
6875
7633
|
className,
|
|
6876
7634
|
...headerProps
|
|
6877
7635
|
}) => {
|
|
6878
|
-
return /* @__PURE__ */ (0,
|
|
7636
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: cn("aui-app-page", appPageColumnClass, className), children: [
|
|
6879
7637
|
breadcrumbs,
|
|
6880
|
-
/* @__PURE__ */ (0,
|
|
7638
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(PageHeader, { ...headerProps }),
|
|
6881
7639
|
children
|
|
6882
7640
|
] });
|
|
6883
7641
|
};
|
|
6884
7642
|
|
|
6885
7643
|
// src/app/layout/Section.tsx
|
|
6886
|
-
var
|
|
7644
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
6887
7645
|
var Section = ({
|
|
6888
7646
|
title,
|
|
6889
7647
|
description,
|
|
6890
7648
|
children,
|
|
6891
7649
|
className
|
|
6892
7650
|
}) => {
|
|
6893
|
-
return /* @__PURE__ */ (0,
|
|
6894
|
-
title ? /* @__PURE__ */ (0,
|
|
6895
|
-
description ? /* @__PURE__ */ (0,
|
|
7651
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("section", { className: cn("aui-app-section", appSectionClass, className), children: [
|
|
7652
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("h2", { className: appSectionTitleClass, children: title }) : null,
|
|
7653
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: appSectionDescriptionClass, children: description }) : null,
|
|
6896
7654
|
children
|
|
6897
7655
|
] });
|
|
6898
7656
|
};
|
|
6899
7657
|
|
|
6900
7658
|
// src/app/copilot/app-copilot-context.tsx
|
|
6901
7659
|
var import_react57 = require("react");
|
|
6902
|
-
var
|
|
7660
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
6903
7661
|
var AppCopilotContext = (0, import_react57.createContext)(null);
|
|
6904
7662
|
var AppCopilotProvider = ({
|
|
6905
7663
|
value,
|
|
6906
7664
|
children
|
|
6907
7665
|
}) => {
|
|
6908
|
-
return /* @__PURE__ */ (0,
|
|
7666
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(AppCopilotContext.Provider, { value, children });
|
|
6909
7667
|
};
|
|
6910
7668
|
function useAppCopilotContext() {
|
|
6911
7669
|
return (0, import_react57.useContext)(AppCopilotContext) ?? {};
|
|
@@ -6913,7 +7671,7 @@ function useAppCopilotContext() {
|
|
|
6913
7671
|
|
|
6914
7672
|
// src/app/chat/AppChatPanel.tsx
|
|
6915
7673
|
var import_lucide_react15 = require("lucide-react");
|
|
6916
|
-
var
|
|
7674
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
6917
7675
|
var shellClass = "aui-app-chat-panel flex h-full min-h-0 flex-col overflow-hidden";
|
|
6918
7676
|
var chromeClass = cn(
|
|
6919
7677
|
"aui-app-chat-panel-chrome relative z-20 flex min-h-10 shrink-0 items-center justify-end px-2 pt-2"
|
|
@@ -6958,18 +7716,18 @@ var AppChatPanel = ({
|
|
|
6958
7716
|
...rest
|
|
6959
7717
|
}) => {
|
|
6960
7718
|
const shellChat = useAppShellChat();
|
|
6961
|
-
return /* @__PURE__ */ (0,
|
|
6962
|
-
shellChat?.collapsible ? /* @__PURE__ */ (0,
|
|
7719
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: cn(shellClass, className), children: [
|
|
7720
|
+
shellChat?.collapsible ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: chromeClass, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
6963
7721
|
"button",
|
|
6964
7722
|
{
|
|
6965
7723
|
type: "button",
|
|
6966
7724
|
className: closeButtonClass,
|
|
6967
7725
|
onClick: () => shellChat.setOpen(false),
|
|
6968
7726
|
"aria-label": "Close assistant",
|
|
6969
|
-
children: /* @__PURE__ */ (0,
|
|
7727
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_lucide_react15.XIcon, { className: "size-4", "aria-hidden": true })
|
|
6970
7728
|
}
|
|
6971
7729
|
) }) : null,
|
|
6972
|
-
/* @__PURE__ */ (0,
|
|
7730
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: bodyClass, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
6973
7731
|
TimbalRuntimeProvider,
|
|
6974
7732
|
{
|
|
6975
7733
|
workforceId,
|
|
@@ -6979,7 +7737,7 @@ var AppChatPanel = ({
|
|
|
6979
7737
|
attachmentsUploadUrl,
|
|
6980
7738
|
attachmentsAccept,
|
|
6981
7739
|
debug,
|
|
6982
|
-
children: /* @__PURE__ */ (0,
|
|
7740
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
6983
7741
|
Thread,
|
|
6984
7742
|
{
|
|
6985
7743
|
variant: "panel",
|
|
@@ -7000,38 +7758,38 @@ var AppChatPanel = ({
|
|
|
7000
7758
|
};
|
|
7001
7759
|
|
|
7002
7760
|
// src/app/surfaces/SurfaceCard.tsx
|
|
7003
|
-
var
|
|
7761
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
7004
7762
|
var SurfaceCard = ({ children, className }) => {
|
|
7005
|
-
return /* @__PURE__ */ (0,
|
|
7763
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: cn("aui-app-surface-card", appSurfaceCardClass, className), children });
|
|
7006
7764
|
};
|
|
7007
7765
|
|
|
7008
7766
|
// src/app/surfaces/StatTile.tsx
|
|
7009
|
-
var
|
|
7767
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
7010
7768
|
var StatTile = ({ label, value, hint, className }) => {
|
|
7011
|
-
return /* @__PURE__ */ (0,
|
|
7012
|
-
/* @__PURE__ */ (0,
|
|
7013
|
-
/* @__PURE__ */ (0,
|
|
7014
|
-
hint ? /* @__PURE__ */ (0,
|
|
7769
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: cn("aui-app-stat-tile", appStatTileClass, className), children: [
|
|
7770
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: appStatLabelClass, children: label }),
|
|
7771
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: appStatValueClass, children: value }),
|
|
7772
|
+
hint ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "text-xs text-muted-foreground", children: hint }) : null
|
|
7015
7773
|
] });
|
|
7016
7774
|
};
|
|
7017
7775
|
|
|
7018
7776
|
// src/app/surfaces/EmptyState.tsx
|
|
7019
|
-
var
|
|
7777
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
7020
7778
|
var EmptyState = ({
|
|
7021
7779
|
title,
|
|
7022
7780
|
description,
|
|
7023
7781
|
action,
|
|
7024
7782
|
className
|
|
7025
7783
|
}) => {
|
|
7026
|
-
return /* @__PURE__ */ (0,
|
|
7027
|
-
/* @__PURE__ */ (0,
|
|
7028
|
-
description ? /* @__PURE__ */ (0,
|
|
7784
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: cn("aui-app-empty-state", appEmptyStateClass, className), children: [
|
|
7785
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("p", { className: appEmptyStateTitleClass, children: title }),
|
|
7786
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("p", { className: appEmptyStateDescriptionClass, children: description }) : null,
|
|
7029
7787
|
action
|
|
7030
7788
|
] });
|
|
7031
7789
|
};
|
|
7032
7790
|
|
|
7033
7791
|
// src/app/surfaces/StatusBadge.tsx
|
|
7034
|
-
var
|
|
7792
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
7035
7793
|
var statusBadgeToneClass = {
|
|
7036
7794
|
default: "bg-muted text-foreground",
|
|
7037
7795
|
primary: "bg-primary/10 text-primary",
|
|
@@ -7044,7 +7802,7 @@ var StatusBadge = ({
|
|
|
7044
7802
|
tone = "default",
|
|
7045
7803
|
className
|
|
7046
7804
|
}) => {
|
|
7047
|
-
return /* @__PURE__ */ (0,
|
|
7805
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
7048
7806
|
"span",
|
|
7049
7807
|
{
|
|
7050
7808
|
className: cn(
|
|
@@ -7058,7 +7816,7 @@ var StatusBadge = ({
|
|
|
7058
7816
|
};
|
|
7059
7817
|
|
|
7060
7818
|
// src/app/surfaces/AppConfirmDialog.tsx
|
|
7061
|
-
var
|
|
7819
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
7062
7820
|
var bodyClass2 = "flex flex-col gap-4 p-6";
|
|
7063
7821
|
var titleClass = "pr-8";
|
|
7064
7822
|
var actionsClass = "flex flex-wrap justify-end gap-2";
|
|
@@ -7073,15 +7831,15 @@ var AppConfirmDialog = ({
|
|
|
7073
7831
|
destructive = false,
|
|
7074
7832
|
className
|
|
7075
7833
|
}) => {
|
|
7076
|
-
return /* @__PURE__ */ (0,
|
|
7834
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Dialog, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
7077
7835
|
DialogContent,
|
|
7078
7836
|
{
|
|
7079
7837
|
className: cn("gap-0 p-0 sm:max-w-md", className),
|
|
7080
|
-
children: /* @__PURE__ */ (0,
|
|
7081
|
-
/* @__PURE__ */ (0,
|
|
7082
|
-
description ? /* @__PURE__ */ (0,
|
|
7083
|
-
/* @__PURE__ */ (0,
|
|
7084
|
-
/* @__PURE__ */ (0,
|
|
7838
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: bodyClass2, children: [
|
|
7839
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(DialogTitle, { className: titleClass, children: title }),
|
|
7840
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("p", { className: "text-sm text-muted-foreground", children: description }) : null,
|
|
7841
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: actionsClass, children: [
|
|
7842
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
7085
7843
|
TimbalV2Button,
|
|
7086
7844
|
{
|
|
7087
7845
|
type: "button",
|
|
@@ -7091,7 +7849,7 @@ var AppConfirmDialog = ({
|
|
|
7091
7849
|
children: cancelLabel
|
|
7092
7850
|
}
|
|
7093
7851
|
),
|
|
7094
|
-
/* @__PURE__ */ (0,
|
|
7852
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
7095
7853
|
TimbalV2Button,
|
|
7096
7854
|
{
|
|
7097
7855
|
type: "button",
|
|
@@ -7111,7 +7869,7 @@ var AppConfirmDialog = ({
|
|
|
7111
7869
|
};
|
|
7112
7870
|
|
|
7113
7871
|
// src/app/surfaces/InfoCard.tsx
|
|
7114
|
-
var
|
|
7872
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
7115
7873
|
var toneClass = {
|
|
7116
7874
|
neutral: "border-border bg-muted/40",
|
|
7117
7875
|
info: "border-primary/25 bg-primary/5",
|
|
@@ -7126,7 +7884,7 @@ var InfoCard = ({
|
|
|
7126
7884
|
action,
|
|
7127
7885
|
tone = "neutral",
|
|
7128
7886
|
className
|
|
7129
|
-
}) => /* @__PURE__ */ (0,
|
|
7887
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
|
7130
7888
|
"div",
|
|
7131
7889
|
{
|
|
7132
7890
|
className: cn(
|
|
@@ -7135,18 +7893,18 @@ var InfoCard = ({
|
|
|
7135
7893
|
className
|
|
7136
7894
|
),
|
|
7137
7895
|
children: [
|
|
7138
|
-
icon ? /* @__PURE__ */ (0,
|
|
7139
|
-
/* @__PURE__ */ (0,
|
|
7140
|
-
title ? /* @__PURE__ */ (0,
|
|
7141
|
-
children ? /* @__PURE__ */ (0,
|
|
7896
|
+
icon ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "mt-0.5 shrink-0 text-muted-foreground", children: icon }) : null,
|
|
7897
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
7898
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("p", { className: "text-sm font-medium text-foreground", children: title }) : null,
|
|
7899
|
+
children ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: cn("text-sm text-muted-foreground", title && "mt-1"), children }) : null
|
|
7142
7900
|
] }),
|
|
7143
|
-
action ? /* @__PURE__ */ (0,
|
|
7901
|
+
action ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "shrink-0", children: action }) : null
|
|
7144
7902
|
]
|
|
7145
7903
|
}
|
|
7146
7904
|
);
|
|
7147
7905
|
|
|
7148
7906
|
// src/app/surfaces/StatusDot.tsx
|
|
7149
|
-
var
|
|
7907
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
7150
7908
|
var dotClass = {
|
|
7151
7909
|
online: "bg-emerald-500",
|
|
7152
7910
|
busy: "bg-amber-500",
|
|
@@ -7159,9 +7917,9 @@ var StatusDot = ({
|
|
|
7159
7917
|
label,
|
|
7160
7918
|
pulse = false,
|
|
7161
7919
|
className
|
|
7162
|
-
}) => /* @__PURE__ */ (0,
|
|
7163
|
-
/* @__PURE__ */ (0,
|
|
7164
|
-
pulse ? /* @__PURE__ */ (0,
|
|
7920
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("span", { className: cn("inline-flex items-center gap-1.5", className), children: [
|
|
7921
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("span", { className: "relative flex size-2", children: [
|
|
7922
|
+
pulse ? /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
7165
7923
|
"span",
|
|
7166
7924
|
{
|
|
7167
7925
|
className: cn(
|
|
@@ -7170,25 +7928,25 @@ var StatusDot = ({
|
|
|
7170
7928
|
)
|
|
7171
7929
|
}
|
|
7172
7930
|
) : null,
|
|
7173
|
-
/* @__PURE__ */ (0,
|
|
7931
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: cn("relative inline-flex size-2 rounded-full", dotClass[tone]) })
|
|
7174
7932
|
] }),
|
|
7175
|
-
label ? /* @__PURE__ */ (0,
|
|
7933
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "text-xs text-muted-foreground", children: label }) : null
|
|
7176
7934
|
] });
|
|
7177
7935
|
|
|
7178
7936
|
// src/app/surfaces/DescriptionList.tsx
|
|
7179
|
-
var
|
|
7937
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
7180
7938
|
var DescriptionList = ({
|
|
7181
7939
|
items,
|
|
7182
7940
|
stacked = false,
|
|
7183
7941
|
className
|
|
7184
|
-
}) => /* @__PURE__ */ (0,
|
|
7942
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
7185
7943
|
"dl",
|
|
7186
7944
|
{
|
|
7187
7945
|
className: cn(
|
|
7188
7946
|
"divide-y divide-border rounded-xl border border-border bg-card",
|
|
7189
7947
|
className
|
|
7190
7948
|
),
|
|
7191
|
-
children: items.map((item, i) => /* @__PURE__ */ (0,
|
|
7949
|
+
children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
7192
7950
|
"div",
|
|
7193
7951
|
{
|
|
7194
7952
|
className: cn(
|
|
@@ -7196,8 +7954,8 @@ var DescriptionList = ({
|
|
|
7196
7954
|
stacked ? "flex flex-col gap-0.5" : "flex items-center justify-between gap-4"
|
|
7197
7955
|
),
|
|
7198
7956
|
children: [
|
|
7199
|
-
/* @__PURE__ */ (0,
|
|
7200
|
-
/* @__PURE__ */ (0,
|
|
7957
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("dt", { className: "text-sm text-muted-foreground", children: item.label }),
|
|
7958
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
7201
7959
|
"dd",
|
|
7202
7960
|
{
|
|
7203
7961
|
className: cn(
|
|
@@ -7217,8 +7975,8 @@ var DescriptionList = ({
|
|
|
7217
7975
|
// src/app/surfaces/ExpandableSection.tsx
|
|
7218
7976
|
var import_react58 = require("react");
|
|
7219
7977
|
var import_react59 = require("motion/react");
|
|
7220
|
-
var
|
|
7221
|
-
var Chevron = ({ open }) => /* @__PURE__ */ (0,
|
|
7978
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
7979
|
+
var Chevron = ({ open }) => /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
7222
7980
|
"svg",
|
|
7223
7981
|
{
|
|
7224
7982
|
viewBox: "0 0 24 24",
|
|
@@ -7232,7 +7990,7 @@ var Chevron = ({ open }) => /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
|
7232
7990
|
strokeLinecap: "round",
|
|
7233
7991
|
strokeLinejoin: "round",
|
|
7234
7992
|
"aria-hidden": true,
|
|
7235
|
-
children: /* @__PURE__ */ (0,
|
|
7993
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("path", { d: "m6 9 6 6 6-6" })
|
|
7236
7994
|
}
|
|
7237
7995
|
);
|
|
7238
7996
|
var ExpandableSection = ({
|
|
@@ -7253,8 +8011,8 @@ var ExpandableSection = ({
|
|
|
7253
8011
|
if (openProp == null) setInternalOpen((o) => !o);
|
|
7254
8012
|
onOpenChange?.(!open);
|
|
7255
8013
|
};
|
|
7256
|
-
return /* @__PURE__ */ (0,
|
|
7257
|
-
/* @__PURE__ */ (0,
|
|
8014
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: cn("border-b border-border last:border-0", className), children: [
|
|
8015
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
7258
8016
|
"button",
|
|
7259
8017
|
{
|
|
7260
8018
|
type: "button",
|
|
@@ -7263,16 +8021,16 @@ var ExpandableSection = ({
|
|
|
7263
8021
|
"aria-controls": panelId,
|
|
7264
8022
|
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",
|
|
7265
8023
|
children: [
|
|
7266
|
-
/* @__PURE__ */ (0,
|
|
7267
|
-
icon ? /* @__PURE__ */ (0,
|
|
7268
|
-
/* @__PURE__ */ (0,
|
|
7269
|
-
count != null ? /* @__PURE__ */ (0,
|
|
8024
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("span", { className: "flex min-w-0 items-center gap-3", children: [
|
|
8025
|
+
icon ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "flex size-8 items-center justify-center rounded-lg border border-border bg-muted text-muted-foreground", children: icon }) : null,
|
|
8026
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "truncate text-sm font-medium text-foreground", children: title }),
|
|
8027
|
+
count != null ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "rounded-full border border-border bg-muted px-2 py-0.5 text-xs text-muted-foreground", children: count }) : null
|
|
7270
8028
|
] }),
|
|
7271
|
-
/* @__PURE__ */ (0,
|
|
8029
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Chevron, { open })
|
|
7272
8030
|
]
|
|
7273
8031
|
}
|
|
7274
8032
|
),
|
|
7275
|
-
/* @__PURE__ */ (0,
|
|
8033
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react59.AnimatePresence, { initial: false, children: open ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
7276
8034
|
import_react59.motion.div,
|
|
7277
8035
|
{
|
|
7278
8036
|
id: panelId,
|
|
@@ -7281,7 +8039,7 @@ var ExpandableSection = ({
|
|
|
7281
8039
|
exit: reduceMotion ? void 0 : { height: 0, opacity: 0 },
|
|
7282
8040
|
transition: { duration: 0.2, ease: "easeOut" },
|
|
7283
8041
|
className: "overflow-hidden",
|
|
7284
|
-
children: /* @__PURE__ */ (0,
|
|
8042
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "bg-muted/20", children })
|
|
7285
8043
|
},
|
|
7286
8044
|
"body"
|
|
7287
8045
|
) : null })
|
|
@@ -7289,7 +8047,7 @@ var ExpandableSection = ({
|
|
|
7289
8047
|
};
|
|
7290
8048
|
|
|
7291
8049
|
// src/app/surfaces/ResourceCard.tsx
|
|
7292
|
-
var
|
|
8050
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
7293
8051
|
var resourceCardShellClass = cn(
|
|
7294
8052
|
"flex min-h-[8.5rem] flex-col rounded-2xl p-4 text-left font-normal",
|
|
7295
8053
|
TIMBAL_V2_ELEVATED_SURFACE
|
|
@@ -7314,35 +8072,35 @@ var ResourceCard = ({
|
|
|
7314
8072
|
ariaLabel,
|
|
7315
8073
|
className
|
|
7316
8074
|
}) => {
|
|
7317
|
-
const body = /* @__PURE__ */ (0,
|
|
7318
|
-
/* @__PURE__ */ (0,
|
|
7319
|
-
media ? /* @__PURE__ */ (0,
|
|
7320
|
-
/* @__PURE__ */ (0,
|
|
7321
|
-
/* @__PURE__ */ (0,
|
|
7322
|
-
subtitle ? /* @__PURE__ */ (0,
|
|
8075
|
+
const body = /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(import_jsx_runtime70.Fragment, { children: [
|
|
8076
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "flex items-start gap-3", children: [
|
|
8077
|
+
media ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: mediaShellClass, children: media }) : null,
|
|
8078
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "min-w-0 flex-1 pt-0.5", children: [
|
|
8079
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("p", { className: "truncate text-sm font-normal leading-snug text-foreground", children: title }),
|
|
8080
|
+
subtitle ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("p", { className: "mt-1 line-clamp-2 text-xs font-normal text-muted-foreground", children: subtitle }) : null
|
|
7323
8081
|
] }),
|
|
7324
|
-
badge ? /* @__PURE__ */ (0,
|
|
8082
|
+
badge ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "shrink-0 pt-0.5", children: badge }) : null
|
|
7325
8083
|
] }),
|
|
7326
|
-
footer || action ? /* @__PURE__ */ (0,
|
|
7327
|
-
/* @__PURE__ */ (0,
|
|
7328
|
-
action ? /* @__PURE__ */ (0,
|
|
8084
|
+
footer || action ? /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "mt-auto flex items-center justify-between gap-3 border-t border-border/40 pt-3 text-xs font-normal text-muted-foreground", children: [
|
|
8085
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "min-w-0 truncate", children: footer }),
|
|
8086
|
+
action ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "shrink-0 opacity-80", children: action }) : null
|
|
7329
8087
|
] }) : null
|
|
7330
8088
|
] });
|
|
7331
8089
|
if (onClick) {
|
|
7332
|
-
return /* @__PURE__ */ (0,
|
|
8090
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("button", { type: "button", onClick, "aria-label": ariaLabel, className: cn(resourceCardInteractiveClass, className), children: body });
|
|
7333
8091
|
}
|
|
7334
|
-
return /* @__PURE__ */ (0,
|
|
8092
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("article", { className: cn(resourceCardShellClass, className), children: body });
|
|
7335
8093
|
};
|
|
7336
8094
|
|
|
7337
8095
|
// src/app/settings/SettingsSection.tsx
|
|
7338
|
-
var
|
|
8096
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
7339
8097
|
var SettingsSectionHeader = ({
|
|
7340
8098
|
title,
|
|
7341
8099
|
description,
|
|
7342
8100
|
className
|
|
7343
|
-
}) => /* @__PURE__ */ (0,
|
|
7344
|
-
/* @__PURE__ */ (0,
|
|
7345
|
-
description ? /* @__PURE__ */ (0,
|
|
8101
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: cn("flex flex-col", className), children: [
|
|
8102
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("h3", { className: "text-[17px] font-medium leading-tight text-foreground", children: title }),
|
|
8103
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("p", { className: "mt-1 text-sm text-muted-foreground", children: description }) : null
|
|
7346
8104
|
] });
|
|
7347
8105
|
var SettingsSection = ({
|
|
7348
8106
|
title,
|
|
@@ -7351,7 +8109,7 @@ var SettingsSection = ({
|
|
|
7351
8109
|
children,
|
|
7352
8110
|
noBorderTop = false,
|
|
7353
8111
|
className
|
|
7354
|
-
}) => /* @__PURE__ */ (0,
|
|
8112
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(
|
|
7355
8113
|
"section",
|
|
7356
8114
|
{
|
|
7357
8115
|
className: cn(
|
|
@@ -7360,18 +8118,18 @@ var SettingsSection = ({
|
|
|
7360
8118
|
className
|
|
7361
8119
|
),
|
|
7362
8120
|
children: [
|
|
7363
|
-
/* @__PURE__ */ (0,
|
|
7364
|
-
/* @__PURE__ */ (0,
|
|
7365
|
-
description ? /* @__PURE__ */ (0,
|
|
7366
|
-
descriptionFooter ? /* @__PURE__ */ (0,
|
|
8121
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "min-w-0", children: [
|
|
8122
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("h2", { className: "text-sm font-medium text-foreground", children: title }),
|
|
8123
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("p", { className: "mt-1 text-sm text-muted-foreground", children: description }) : null,
|
|
8124
|
+
descriptionFooter ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "mt-3 min-w-0", children: descriptionFooter }) : null
|
|
7367
8125
|
] }),
|
|
7368
|
-
/* @__PURE__ */ (0,
|
|
8126
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "min-w-0 space-y-3", children })
|
|
7369
8127
|
]
|
|
7370
8128
|
}
|
|
7371
8129
|
);
|
|
7372
8130
|
|
|
7373
8131
|
// src/app/settings/FieldRow.tsx
|
|
7374
|
-
var
|
|
8132
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
7375
8133
|
var FieldRow = ({
|
|
7376
8134
|
label,
|
|
7377
8135
|
children,
|
|
@@ -7381,7 +8139,7 @@ var FieldRow = ({
|
|
|
7381
8139
|
className
|
|
7382
8140
|
}) => {
|
|
7383
8141
|
if (inline) {
|
|
7384
|
-
return /* @__PURE__ */ (0,
|
|
8142
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
|
|
7385
8143
|
"div",
|
|
7386
8144
|
{
|
|
7387
8145
|
className: cn(
|
|
@@ -7389,8 +8147,8 @@ var FieldRow = ({
|
|
|
7389
8147
|
className
|
|
7390
8148
|
),
|
|
7391
8149
|
children: [
|
|
7392
|
-
/* @__PURE__ */ (0,
|
|
7393
|
-
/* @__PURE__ */ (0,
|
|
8150
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "min-w-0", children: [
|
|
8151
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
7394
8152
|
"label",
|
|
7395
8153
|
{
|
|
7396
8154
|
htmlFor,
|
|
@@ -7398,17 +8156,17 @@ var FieldRow = ({
|
|
|
7398
8156
|
children: label
|
|
7399
8157
|
}
|
|
7400
8158
|
),
|
|
7401
|
-
description ? /* @__PURE__ */ (0,
|
|
8159
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("p", { className: "mt-0.5 text-xs text-muted-foreground", children: description }) : null
|
|
7402
8160
|
] }),
|
|
7403
|
-
/* @__PURE__ */ (0,
|
|
8161
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "shrink-0", children })
|
|
7404
8162
|
]
|
|
7405
8163
|
}
|
|
7406
8164
|
);
|
|
7407
8165
|
}
|
|
7408
|
-
return /* @__PURE__ */ (0,
|
|
7409
|
-
/* @__PURE__ */ (0,
|
|
8166
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: cn("flex flex-col gap-1.5", className), children: [
|
|
8167
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("label", { htmlFor, className: "text-sm font-medium text-foreground", children: label }),
|
|
7410
8168
|
children,
|
|
7411
|
-
description ? /* @__PURE__ */ (0,
|
|
8169
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("p", { className: "text-xs text-muted-foreground", children: description }) : null
|
|
7412
8170
|
] });
|
|
7413
8171
|
};
|
|
7414
8172
|
|
|
@@ -7416,7 +8174,7 @@ var FieldRow = ({
|
|
|
7416
8174
|
var import_react60 = require("react");
|
|
7417
8175
|
var import_react_dom2 = require("react-dom");
|
|
7418
8176
|
var import_react61 = require("motion/react");
|
|
7419
|
-
var
|
|
8177
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
7420
8178
|
var FloatingUnsavedChangesBar = ({
|
|
7421
8179
|
visible,
|
|
7422
8180
|
message = "Unsaved changes",
|
|
@@ -7434,7 +8192,7 @@ var FloatingUnsavedChangesBar = ({
|
|
|
7434
8192
|
(0, import_react60.useEffect)(() => setMounted(true), []);
|
|
7435
8193
|
if (!mounted || typeof document === "undefined") return null;
|
|
7436
8194
|
return (0, import_react_dom2.createPortal)(
|
|
7437
|
-
/* @__PURE__ */ (0,
|
|
8195
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_react61.AnimatePresence, { children: visible ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "pointer-events-none fixed inset-x-0 bottom-5 z-50 flex justify-center px-4", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
7438
8196
|
import_react61.motion.div,
|
|
7439
8197
|
{
|
|
7440
8198
|
role: "region",
|
|
@@ -7448,10 +8206,10 @@ var FloatingUnsavedChangesBar = ({
|
|
|
7448
8206
|
className
|
|
7449
8207
|
),
|
|
7450
8208
|
children: [
|
|
7451
|
-
/* @__PURE__ */ (0,
|
|
7452
|
-
/* @__PURE__ */ (0,
|
|
7453
|
-
/* @__PURE__ */ (0,
|
|
7454
|
-
/* @__PURE__ */ (0,
|
|
8209
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "text-sm text-muted-foreground", children: message }),
|
|
8210
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("span", { className: "flex items-center gap-1.5", children: [
|
|
8211
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Button, { variant: "ghost", size: "sm", onClick: onDiscard, disabled: isSaving, children: discardLabel }),
|
|
8212
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Button, { size: "sm", onClick: onSave, disabled: saveDisabled || isSaving, children: isSaving ? "Saving\u2026" : saveLabel })
|
|
7455
8213
|
] })
|
|
7456
8214
|
]
|
|
7457
8215
|
}
|
|
@@ -7461,13 +8219,13 @@ var FloatingUnsavedChangesBar = ({
|
|
|
7461
8219
|
};
|
|
7462
8220
|
|
|
7463
8221
|
// src/app/settings/DangerZone.tsx
|
|
7464
|
-
var
|
|
8222
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
7465
8223
|
var DangerZoneAction = ({
|
|
7466
8224
|
title,
|
|
7467
8225
|
description,
|
|
7468
8226
|
action,
|
|
7469
8227
|
className
|
|
7470
|
-
}) => /* @__PURE__ */ (0,
|
|
8228
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
7471
8229
|
"div",
|
|
7472
8230
|
{
|
|
7473
8231
|
className: cn(
|
|
@@ -7475,11 +8233,11 @@ var DangerZoneAction = ({
|
|
|
7475
8233
|
className
|
|
7476
8234
|
),
|
|
7477
8235
|
children: [
|
|
7478
|
-
/* @__PURE__ */ (0,
|
|
7479
|
-
/* @__PURE__ */ (0,
|
|
7480
|
-
description ? /* @__PURE__ */ (0,
|
|
8236
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "min-w-0", children: [
|
|
8237
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("p", { className: "text-sm font-medium text-foreground", children: title }),
|
|
8238
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("p", { className: "mt-0.5 text-sm text-muted-foreground", children: description }) : null
|
|
7481
8239
|
] }),
|
|
7482
|
-
/* @__PURE__ */ (0,
|
|
8240
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "shrink-0", children: action })
|
|
7483
8241
|
]
|
|
7484
8242
|
}
|
|
7485
8243
|
);
|
|
@@ -7488,7 +8246,7 @@ var DangerZone = ({
|
|
|
7488
8246
|
description,
|
|
7489
8247
|
children,
|
|
7490
8248
|
className
|
|
7491
|
-
}) => /* @__PURE__ */ (0,
|
|
8249
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
7492
8250
|
"section",
|
|
7493
8251
|
{
|
|
7494
8252
|
className: cn(
|
|
@@ -7496,18 +8254,18 @@ var DangerZone = ({
|
|
|
7496
8254
|
className
|
|
7497
8255
|
),
|
|
7498
8256
|
children: [
|
|
7499
|
-
(title || description) && /* @__PURE__ */ (0,
|
|
7500
|
-
title ? /* @__PURE__ */ (0,
|
|
7501
|
-
description ? /* @__PURE__ */ (0,
|
|
8257
|
+
(title || description) && /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("header", { className: "border-b border-destructive/20 bg-destructive/5 px-4 py-3", children: [
|
|
8258
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("h3", { className: "text-sm font-semibold text-destructive", children: title }) : null,
|
|
8259
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("p", { className: "mt-0.5 text-sm text-muted-foreground", children: description }) : null
|
|
7502
8260
|
] }),
|
|
7503
|
-
/* @__PURE__ */ (0,
|
|
8261
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "divide-y divide-border bg-card", children })
|
|
7504
8262
|
]
|
|
7505
8263
|
}
|
|
7506
8264
|
);
|
|
7507
8265
|
|
|
7508
8266
|
// src/app/integrations/IntegrationCard.tsx
|
|
7509
8267
|
var import_react62 = require("react");
|
|
7510
|
-
var
|
|
8268
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
7511
8269
|
var INTEGRATION_CATALOG_CARD_HEIGHT_CLASS = "h-[12.25rem] min-h-[12.25rem] max-h-[12.25rem]";
|
|
7512
8270
|
var statusLabel = {
|
|
7513
8271
|
available: null,
|
|
@@ -7548,12 +8306,12 @@ var IntegrationCard = ({
|
|
|
7548
8306
|
const titleId = (0, import_react62.useId)();
|
|
7549
8307
|
const locked = status === "locked";
|
|
7550
8308
|
const dimmed = status === "disabled" || locked;
|
|
7551
|
-
const body = /* @__PURE__ */ (0,
|
|
7552
|
-
/* @__PURE__ */ (0,
|
|
7553
|
-
logo ? /* @__PURE__ */ (0,
|
|
7554
|
-
/* @__PURE__ */ (0,
|
|
7555
|
-
/* @__PURE__ */ (0,
|
|
7556
|
-
/* @__PURE__ */ (0,
|
|
8309
|
+
const body = /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "flex h-full min-h-0 flex-col", children: [
|
|
8310
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "flex shrink-0 items-start gap-3 pr-2", children: [
|
|
8311
|
+
logo ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: logoShellClass, "aria-hidden": Boolean(ariaLabel), children: logo }) : null,
|
|
8312
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "min-w-0 flex-1 pt-0.5", children: /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "flex items-start justify-between gap-2", children: [
|
|
8313
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "min-w-0", children: [
|
|
8314
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
7557
8315
|
"h4",
|
|
7558
8316
|
{
|
|
7559
8317
|
id: onClick && !action ? void 0 : titleId,
|
|
@@ -7561,12 +8319,12 @@ var IntegrationCard = ({
|
|
|
7561
8319
|
children: name
|
|
7562
8320
|
}
|
|
7563
8321
|
),
|
|
7564
|
-
statusLabel[status] ? /* @__PURE__ */ (0,
|
|
8322
|
+
statusLabel[status] ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("p", { className: "mt-0.5 text-xs text-muted-foreground", children: statusLabel[status] }) : null
|
|
7565
8323
|
] }),
|
|
7566
|
-
badge ? /* @__PURE__ */ (0,
|
|
8324
|
+
badge ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "shrink-0", children: badge }) : null
|
|
7567
8325
|
] }) })
|
|
7568
8326
|
] }),
|
|
7569
|
-
description ? /* @__PURE__ */ (0,
|
|
8327
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
7570
8328
|
"p",
|
|
7571
8329
|
{
|
|
7572
8330
|
className: cn(
|
|
@@ -7576,9 +8334,9 @@ var IntegrationCard = ({
|
|
|
7576
8334
|
children: description
|
|
7577
8335
|
}
|
|
7578
8336
|
) : null,
|
|
7579
|
-
action ? /* @__PURE__ */ (0,
|
|
7580
|
-
/* @__PURE__ */ (0,
|
|
7581
|
-
/* @__PURE__ */ (0,
|
|
8337
|
+
action ? /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(import_jsx_runtime75.Fragment, { children: [
|
|
8338
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "min-h-0 flex-1", "aria-hidden": true }),
|
|
8339
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "relative mt-3 shrink-0", children: action })
|
|
7582
8340
|
] }) : null
|
|
7583
8341
|
] });
|
|
7584
8342
|
const shellClass3 = cn(
|
|
@@ -7588,7 +8346,7 @@ var IntegrationCard = ({
|
|
|
7588
8346
|
className
|
|
7589
8347
|
);
|
|
7590
8348
|
if (onClick && !action) {
|
|
7591
|
-
return /* @__PURE__ */ (0,
|
|
8349
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
7592
8350
|
"button",
|
|
7593
8351
|
{
|
|
7594
8352
|
type: "button",
|
|
@@ -7605,12 +8363,12 @@ var IntegrationCard = ({
|
|
|
7605
8363
|
}
|
|
7606
8364
|
);
|
|
7607
8365
|
}
|
|
7608
|
-
return /* @__PURE__ */ (0,
|
|
8366
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("article", { className: shellClass3, "aria-labelledby": titleId, children: body });
|
|
7609
8367
|
};
|
|
7610
8368
|
|
|
7611
8369
|
// src/app/integrations/IntegrationsEmptyState.tsx
|
|
7612
8370
|
var import_react63 = require("react");
|
|
7613
|
-
var
|
|
8371
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
7614
8372
|
var IntegrationsEmptyState = ({
|
|
7615
8373
|
title = "No integrations yet",
|
|
7616
8374
|
description = "Connect a provider to start syncing data and powering your workforce.",
|
|
@@ -7619,7 +8377,7 @@ var IntegrationsEmptyState = ({
|
|
|
7619
8377
|
className
|
|
7620
8378
|
}) => {
|
|
7621
8379
|
const titleId = (0, import_react63.useId)();
|
|
7622
|
-
return /* @__PURE__ */ (0,
|
|
8380
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
|
|
7623
8381
|
"section",
|
|
7624
8382
|
{
|
|
7625
8383
|
className: cn(
|
|
@@ -7629,7 +8387,7 @@ var IntegrationsEmptyState = ({
|
|
|
7629
8387
|
),
|
|
7630
8388
|
"aria-labelledby": titleId,
|
|
7631
8389
|
children: [
|
|
7632
|
-
icon ? /* @__PURE__ */ (0,
|
|
8390
|
+
icon ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
7633
8391
|
"span",
|
|
7634
8392
|
{
|
|
7635
8393
|
className: cn(
|
|
@@ -7641,21 +8399,21 @@ var IntegrationsEmptyState = ({
|
|
|
7641
8399
|
children: icon
|
|
7642
8400
|
}
|
|
7643
8401
|
) : null,
|
|
7644
|
-
/* @__PURE__ */ (0,
|
|
7645
|
-
description ? /* @__PURE__ */ (0,
|
|
7646
|
-
action ? /* @__PURE__ */ (0,
|
|
8402
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("h3", { id: titleId, className: "text-base font-normal text-foreground", children: title }),
|
|
8403
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("p", { className: "max-w-sm text-sm text-muted-foreground", children: description }) : null,
|
|
8404
|
+
action ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "mt-1", children: action }) : null
|
|
7647
8405
|
]
|
|
7648
8406
|
}
|
|
7649
8407
|
);
|
|
7650
8408
|
};
|
|
7651
8409
|
|
|
7652
8410
|
// src/app/integrations/PlanBadge.tsx
|
|
7653
|
-
var
|
|
8411
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
7654
8412
|
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";
|
|
7655
|
-
var PlanBadge = ({ children, className }) => /* @__PURE__ */ (0,
|
|
8413
|
+
var PlanBadge = ({ children, className }) => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: cn(planBadgeClass, className), children });
|
|
7656
8414
|
|
|
7657
8415
|
// src/app/integrations/ConnectionRow.tsx
|
|
7658
|
-
var
|
|
8416
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
7659
8417
|
var logoShellClass2 = cn(
|
|
7660
8418
|
"flex size-9 shrink-0 items-center justify-center overflow-hidden rounded-lg",
|
|
7661
8419
|
TIMBAL_V2_LOGO_TILE
|
|
@@ -7670,14 +8428,14 @@ var ConnectionRow = ({
|
|
|
7670
8428
|
ariaLabel,
|
|
7671
8429
|
className
|
|
7672
8430
|
}) => {
|
|
7673
|
-
const inner = /* @__PURE__ */ (0,
|
|
7674
|
-
logo ? /* @__PURE__ */ (0,
|
|
7675
|
-
/* @__PURE__ */ (0,
|
|
7676
|
-
/* @__PURE__ */ (0,
|
|
7677
|
-
meta ? /* @__PURE__ */ (0,
|
|
8431
|
+
const inner = /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_jsx_runtime78.Fragment, { children: [
|
|
8432
|
+
logo ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: logoShellClass2, children: logo }) : null,
|
|
8433
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
8434
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("p", { className: "truncate text-sm font-normal text-foreground", children: name }),
|
|
8435
|
+
meta ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("p", { className: "truncate text-xs text-muted-foreground", children: meta }) : null
|
|
7678
8436
|
] }),
|
|
7679
|
-
badge ? /* @__PURE__ */ (0,
|
|
7680
|
-
action ? /* @__PURE__ */ (0,
|
|
8437
|
+
badge ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "shrink-0", children: badge }) : null,
|
|
8438
|
+
action ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "shrink-0", children: action }) : null
|
|
7681
8439
|
] });
|
|
7682
8440
|
const rowClass2 = cn(
|
|
7683
8441
|
"flex w-full items-center gap-3 px-4 py-3 text-left",
|
|
@@ -7685,7 +8443,7 @@ var ConnectionRow = ({
|
|
|
7685
8443
|
className
|
|
7686
8444
|
);
|
|
7687
8445
|
if (onClick) {
|
|
7688
|
-
return /* @__PURE__ */ (0,
|
|
8446
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7689
8447
|
"button",
|
|
7690
8448
|
{
|
|
7691
8449
|
type: "button",
|
|
@@ -7697,7 +8455,7 @@ var ConnectionRow = ({
|
|
|
7697
8455
|
}
|
|
7698
8456
|
);
|
|
7699
8457
|
}
|
|
7700
|
-
return /* @__PURE__ */ (0,
|
|
8458
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { role: "listitem", className: rowClass2, children: inner });
|
|
7701
8459
|
};
|
|
7702
8460
|
var connectionRowListClass = cn(
|
|
7703
8461
|
"overflow-hidden rounded-2xl",
|
|
@@ -7705,12 +8463,12 @@ var connectionRowListClass = cn(
|
|
|
7705
8463
|
);
|
|
7706
8464
|
|
|
7707
8465
|
// src/app/integrations/ConnectionRowList.tsx
|
|
7708
|
-
var
|
|
8466
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
7709
8467
|
var ConnectionRowList = ({
|
|
7710
8468
|
children,
|
|
7711
8469
|
"aria-label": ariaLabel = "Connected integrations",
|
|
7712
8470
|
className
|
|
7713
|
-
}) => /* @__PURE__ */ (0,
|
|
8471
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7714
8472
|
"div",
|
|
7715
8473
|
{
|
|
7716
8474
|
role: "list",
|
|
@@ -7721,7 +8479,7 @@ var ConnectionRowList = ({
|
|
|
7721
8479
|
);
|
|
7722
8480
|
|
|
7723
8481
|
// src/app/navigation/SubNav.tsx
|
|
7724
|
-
var
|
|
8482
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
7725
8483
|
var SubNav = ({
|
|
7726
8484
|
items,
|
|
7727
8485
|
activeId,
|
|
@@ -7730,7 +8488,7 @@ var SubNav = ({
|
|
|
7730
8488
|
"aria-label": ariaLabel = "Section navigation",
|
|
7731
8489
|
layoutId
|
|
7732
8490
|
}) => {
|
|
7733
|
-
return /* @__PURE__ */ (0,
|
|
8491
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("nav", { className: cn("aui-app-sub-nav", className), "aria-label": ariaLabel, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
7734
8492
|
PillSegmentedTabs,
|
|
7735
8493
|
{
|
|
7736
8494
|
value: activeId,
|
|
@@ -7744,13 +8502,13 @@ var SubNav = ({
|
|
|
7744
8502
|
};
|
|
7745
8503
|
|
|
7746
8504
|
// src/app/navigation/Breadcrumbs.tsx
|
|
7747
|
-
var
|
|
8505
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
7748
8506
|
var Breadcrumbs = ({ items, className }) => {
|
|
7749
|
-
return /* @__PURE__ */ (0,
|
|
8507
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("nav", { className: cn("aui-app-breadcrumbs", appBreadcrumbsClass, className), "aria-label": "Breadcrumb", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("ol", { className: "flex flex-wrap items-center gap-1.5", children: items.map((item, index) => {
|
|
7750
8508
|
const isLast = index === items.length - 1;
|
|
7751
|
-
return /* @__PURE__ */ (0,
|
|
7752
|
-
index > 0 ? /* @__PURE__ */ (0,
|
|
7753
|
-
isLast ? /* @__PURE__ */ (0,
|
|
8509
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("li", { className: "inline-flex items-center gap-1.5", children: [
|
|
8510
|
+
index > 0 ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "text-muted-foreground/50", "aria-hidden": true, children: "/" }) : null,
|
|
8511
|
+
isLast ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "text-foreground", "aria-current": "page", children: item.label }) : item.href ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("a", { href: item.href, className: appBreadcrumbLinkClass, children: item.label }) : /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7754
8512
|
"button",
|
|
7755
8513
|
{
|
|
7756
8514
|
type: "button",
|
|
@@ -7764,7 +8522,7 @@ var Breadcrumbs = ({ items, className }) => {
|
|
|
7764
8522
|
};
|
|
7765
8523
|
|
|
7766
8524
|
// src/app/forms/Field.tsx
|
|
7767
|
-
var
|
|
8525
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
7768
8526
|
var Field = ({
|
|
7769
8527
|
label,
|
|
7770
8528
|
hint,
|
|
@@ -7773,11 +8531,11 @@ var Field = ({
|
|
|
7773
8531
|
className,
|
|
7774
8532
|
htmlFor
|
|
7775
8533
|
}) => {
|
|
7776
|
-
return /* @__PURE__ */ (0,
|
|
7777
|
-
/* @__PURE__ */ (0,
|
|
8534
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: cn("aui-app-field", appFieldClass, className), children: [
|
|
8535
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("label", { className: appFieldLabelClass, htmlFor, children: label }),
|
|
7778
8536
|
children,
|
|
7779
|
-
hint && !error ? /* @__PURE__ */ (0,
|
|
7780
|
-
error ? /* @__PURE__ */ (0,
|
|
8537
|
+
hint && !error ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("p", { className: appFieldHintClass, children: hint }) : null,
|
|
8538
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("p", { className: "text-xs text-destructive", role: "alert", children: error }) : null
|
|
7781
8539
|
] });
|
|
7782
8540
|
};
|
|
7783
8541
|
var FieldInput = ({
|
|
@@ -7790,7 +8548,7 @@ var FieldInput = ({
|
|
|
7790
8548
|
...inputProps
|
|
7791
8549
|
}) => {
|
|
7792
8550
|
const inputId = id ?? inputProps.name;
|
|
7793
|
-
return /* @__PURE__ */ (0,
|
|
8551
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
7794
8552
|
Field,
|
|
7795
8553
|
{
|
|
7796
8554
|
label,
|
|
@@ -7798,7 +8556,7 @@ var FieldInput = ({
|
|
|
7798
8556
|
error,
|
|
7799
8557
|
htmlFor: inputId,
|
|
7800
8558
|
className: fieldClassName,
|
|
7801
|
-
children: /* @__PURE__ */ (0,
|
|
8559
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
7802
8560
|
"input",
|
|
7803
8561
|
{
|
|
7804
8562
|
id: inputId,
|
|
@@ -7812,7 +8570,7 @@ var FieldInput = ({
|
|
|
7812
8570
|
};
|
|
7813
8571
|
|
|
7814
8572
|
// src/app/forms/FieldTextarea.tsx
|
|
7815
|
-
var
|
|
8573
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
7816
8574
|
var textareaClass = cn(
|
|
7817
8575
|
appInputClass,
|
|
7818
8576
|
"min-h-[5.5rem] resize-y py-2.5 leading-relaxed"
|
|
@@ -7827,7 +8585,7 @@ var FieldTextarea = ({
|
|
|
7827
8585
|
...props
|
|
7828
8586
|
}) => {
|
|
7829
8587
|
const textareaId = id ?? props.name;
|
|
7830
|
-
return /* @__PURE__ */ (0,
|
|
8588
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
7831
8589
|
Field,
|
|
7832
8590
|
{
|
|
7833
8591
|
label,
|
|
@@ -7835,7 +8593,7 @@ var FieldTextarea = ({
|
|
|
7835
8593
|
error,
|
|
7836
8594
|
htmlFor: textareaId,
|
|
7837
8595
|
className: fieldClassName,
|
|
7838
|
-
children: /* @__PURE__ */ (0,
|
|
8596
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
7839
8597
|
"textarea",
|
|
7840
8598
|
{
|
|
7841
8599
|
id: textareaId,
|
|
@@ -7850,7 +8608,7 @@ var FieldTextarea = ({
|
|
|
7850
8608
|
|
|
7851
8609
|
// src/app/forms/FieldSelect.tsx
|
|
7852
8610
|
var import_lucide_react16 = require("lucide-react");
|
|
7853
|
-
var
|
|
8611
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
7854
8612
|
var selectWrapClass = "relative";
|
|
7855
8613
|
var selectClass = cn(
|
|
7856
8614
|
appInputClass,
|
|
@@ -7867,7 +8625,7 @@ var FieldSelect = ({
|
|
|
7867
8625
|
...props
|
|
7868
8626
|
}) => {
|
|
7869
8627
|
const selectId = id ?? props.name;
|
|
7870
|
-
return /* @__PURE__ */ (0,
|
|
8628
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
7871
8629
|
Field,
|
|
7872
8630
|
{
|
|
7873
8631
|
label,
|
|
@@ -7875,8 +8633,8 @@ var FieldSelect = ({
|
|
|
7875
8633
|
error,
|
|
7876
8634
|
htmlFor: selectId,
|
|
7877
8635
|
className: fieldClassName,
|
|
7878
|
-
children: /* @__PURE__ */ (0,
|
|
7879
|
-
/* @__PURE__ */ (0,
|
|
8636
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: selectWrapClass, children: [
|
|
8637
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
7880
8638
|
"select",
|
|
7881
8639
|
{
|
|
7882
8640
|
id: selectId,
|
|
@@ -7886,7 +8644,7 @@ var FieldSelect = ({
|
|
|
7886
8644
|
children
|
|
7887
8645
|
}
|
|
7888
8646
|
),
|
|
7889
|
-
/* @__PURE__ */ (0,
|
|
8647
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
7890
8648
|
import_lucide_react16.ChevronDownIcon,
|
|
7891
8649
|
{
|
|
7892
8650
|
className: "pointer-events-none absolute top-1/2 right-3 size-4 -translate-y-1/2 text-muted-foreground",
|
|
@@ -7899,7 +8657,7 @@ var FieldSelect = ({
|
|
|
7899
8657
|
};
|
|
7900
8658
|
|
|
7901
8659
|
// src/app/forms/FieldSwitch.tsx
|
|
7902
|
-
var
|
|
8660
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
7903
8661
|
var trackClass = cn(
|
|
7904
8662
|
"relative inline-flex h-5 w-9 shrink-0 items-center rounded-full transition-[background,box-shadow,border-color] duration-200",
|
|
7905
8663
|
"peer-focus-visible:ring-2 peer-focus-visible:ring-foreground/10",
|
|
@@ -7920,7 +8678,7 @@ var FieldSwitch = ({
|
|
|
7920
8678
|
...props
|
|
7921
8679
|
}) => {
|
|
7922
8680
|
const inputId = id ?? props.name ?? "switch";
|
|
7923
|
-
return /* @__PURE__ */ (0,
|
|
8681
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
|
|
7924
8682
|
"label",
|
|
7925
8683
|
{
|
|
7926
8684
|
className: cn(
|
|
@@ -7929,8 +8687,8 @@ var FieldSwitch = ({
|
|
|
7929
8687
|
),
|
|
7930
8688
|
htmlFor: inputId,
|
|
7931
8689
|
children: [
|
|
7932
|
-
/* @__PURE__ */ (0,
|
|
7933
|
-
/* @__PURE__ */ (0,
|
|
8690
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("span", { className: "relative mt-0.5", children: [
|
|
8691
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
7934
8692
|
"input",
|
|
7935
8693
|
{
|
|
7936
8694
|
id: inputId,
|
|
@@ -7940,11 +8698,11 @@ var FieldSwitch = ({
|
|
|
7940
8698
|
...props
|
|
7941
8699
|
}
|
|
7942
8700
|
),
|
|
7943
|
-
/* @__PURE__ */ (0,
|
|
8701
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: trackClass, "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: thumbClass }) })
|
|
7944
8702
|
] }),
|
|
7945
|
-
/* @__PURE__ */ (0,
|
|
7946
|
-
/* @__PURE__ */ (0,
|
|
7947
|
-
description ? /* @__PURE__ */ (0,
|
|
8703
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("span", { className: "flex min-w-0 flex-col gap-0.5", children: [
|
|
8704
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "text-sm font-medium text-foreground", children: label }),
|
|
8705
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "text-xs text-muted-foreground", children: description }) : null
|
|
7948
8706
|
] })
|
|
7949
8707
|
]
|
|
7950
8708
|
}
|
|
@@ -7953,13 +8711,13 @@ var FieldSwitch = ({
|
|
|
7953
8711
|
|
|
7954
8712
|
// src/app/forms/SearchInput.tsx
|
|
7955
8713
|
var import_lucide_react17 = require("lucide-react");
|
|
7956
|
-
var
|
|
8714
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
7957
8715
|
var SearchInput = ({
|
|
7958
8716
|
className,
|
|
7959
8717
|
placeholder = "Search\u2026",
|
|
7960
8718
|
...props
|
|
7961
8719
|
}) => {
|
|
7962
|
-
return /* @__PURE__ */ (0,
|
|
8720
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
7963
8721
|
"label",
|
|
7964
8722
|
{
|
|
7965
8723
|
className: cn(
|
|
@@ -7968,8 +8726,8 @@ var SearchInput = ({
|
|
|
7968
8726
|
className
|
|
7969
8727
|
),
|
|
7970
8728
|
children: [
|
|
7971
|
-
/* @__PURE__ */ (0,
|
|
7972
|
-
/* @__PURE__ */ (0,
|
|
8729
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_lucide_react17.SearchIcon, { className: "size-4 shrink-0 text-muted-foreground", "aria-hidden": true }),
|
|
8730
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
7973
8731
|
"input",
|
|
7974
8732
|
{
|
|
7975
8733
|
type: "search",
|
|
@@ -7984,18 +8742,18 @@ var SearchInput = ({
|
|
|
7984
8742
|
};
|
|
7985
8743
|
|
|
7986
8744
|
// src/app/forms/FormSection.tsx
|
|
7987
|
-
var
|
|
8745
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
7988
8746
|
var FormSection = ({ title, children, className }) => {
|
|
7989
|
-
return /* @__PURE__ */ (0,
|
|
7990
|
-
title ? /* @__PURE__ */ (0,
|
|
7991
|
-
/* @__PURE__ */ (0,
|
|
8747
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("fieldset", { className: cn("aui-app-form-section", appSectionClass, "border-0 p-0", className), children: [
|
|
8748
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("legend", { className: cn(appSectionTitleClass, "mb-3 px-0"), children: title }) : null,
|
|
8749
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "flex flex-col gap-4", children })
|
|
7992
8750
|
] });
|
|
7993
8751
|
};
|
|
7994
8752
|
|
|
7995
8753
|
// src/app/data/FilterBar.tsx
|
|
7996
|
-
var
|
|
8754
|
+
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
7997
8755
|
var FilterBar = ({ children, className }) => {
|
|
7998
|
-
return /* @__PURE__ */ (0,
|
|
8756
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
7999
8757
|
"div",
|
|
8000
8758
|
{
|
|
8001
8759
|
className: cn("aui-app-filter-bar", appFilterBarClass, className),
|
|
@@ -8009,7 +8767,7 @@ var FilterBar = ({ children, className }) => {
|
|
|
8009
8767
|
// src/app/data/DataTable.tsx
|
|
8010
8768
|
var import_react64 = require("react");
|
|
8011
8769
|
var import_lucide_react18 = require("lucide-react");
|
|
8012
|
-
var
|
|
8770
|
+
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
8013
8771
|
var shellClass2 = "overflow-hidden rounded-xl border border-border bg-card shadow-card";
|
|
8014
8772
|
var tableClass = "w-full border-collapse bg-transparent text-sm";
|
|
8015
8773
|
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";
|
|
@@ -8049,12 +8807,12 @@ function SortIndicator({
|
|
|
8049
8807
|
}) {
|
|
8050
8808
|
const iconClass = "size-3.5 shrink-0 opacity-60 group-hover:opacity-100";
|
|
8051
8809
|
if (!active) {
|
|
8052
|
-
return /* @__PURE__ */ (0,
|
|
8810
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_lucide_react18.ArrowUpDownIcon, { className: iconClass, "aria-hidden": true });
|
|
8053
8811
|
}
|
|
8054
8812
|
if (direction === "desc") {
|
|
8055
|
-
return /* @__PURE__ */ (0,
|
|
8813
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_lucide_react18.ArrowDownIcon, { className: iconClass, "aria-hidden": true });
|
|
8056
8814
|
}
|
|
8057
|
-
return /* @__PURE__ */ (0,
|
|
8815
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_lucide_react18.ArrowUpIcon, { className: iconClass, "aria-hidden": true });
|
|
8058
8816
|
}
|
|
8059
8817
|
function DataTable({
|
|
8060
8818
|
columns,
|
|
@@ -8105,28 +8863,28 @@ function DataTable({
|
|
|
8105
8863
|
const cellPad = dense ? "px-3 py-2" : void 0;
|
|
8106
8864
|
const headPad = dense ? "px-3 py-2" : void 0;
|
|
8107
8865
|
if (rows.length === 0 && emptyMode === "replace") {
|
|
8108
|
-
return /* @__PURE__ */ (0,
|
|
8866
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(EmptyState, { title: emptyTitle, description: emptyDescription, className });
|
|
8109
8867
|
}
|
|
8110
8868
|
const rowCountText = rowCountLabel?.(sortedRows.length) ?? `${sortedRows.length} row${sortedRows.length === 1 ? "" : "s"}`;
|
|
8111
8869
|
const hasFoot = Boolean((showRowCount || footer) && sortedRows.length > 0);
|
|
8112
|
-
return /* @__PURE__ */ (0,
|
|
8113
|
-
caption ? /* @__PURE__ */ (0,
|
|
8114
|
-
/* @__PURE__ */ (0,
|
|
8870
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: cn("aui-app-data-table", shellClass2, className), children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "overflow-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("table", { className: tableClass, children: [
|
|
8871
|
+
caption ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("caption", { className: "sr-only", children: caption }) : null,
|
|
8872
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("thead", { className: cn(stickyHeader && stickyHeadClass), children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("tr", { children: columns.map((col) => {
|
|
8115
8873
|
const isSorted = sort?.columnId === col.id;
|
|
8116
8874
|
const ariaSort = col.sortable ? isSorted ? sort.direction === "asc" ? "ascending" : "descending" : "none" : void 0;
|
|
8117
|
-
const headerContent = col.sortable ? /* @__PURE__ */ (0,
|
|
8875
|
+
const headerContent = col.sortable ? /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(
|
|
8118
8876
|
"button",
|
|
8119
8877
|
{
|
|
8120
8878
|
type: "button",
|
|
8121
8879
|
className: sortButtonClass,
|
|
8122
8880
|
onClick: () => setSort(nextSort(sort, col.id)),
|
|
8123
8881
|
children: [
|
|
8124
|
-
/* @__PURE__ */ (0,
|
|
8125
|
-
/* @__PURE__ */ (0,
|
|
8882
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("span", { className: "truncate", children: col.header }),
|
|
8883
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(SortIndicator, { active: Boolean(isSorted), direction: sort?.direction })
|
|
8126
8884
|
]
|
|
8127
8885
|
}
|
|
8128
8886
|
) : col.header;
|
|
8129
|
-
return /* @__PURE__ */ (0,
|
|
8887
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
8130
8888
|
"th",
|
|
8131
8889
|
{
|
|
8132
8890
|
scope: "col",
|
|
@@ -8142,10 +8900,10 @@ function DataTable({
|
|
|
8142
8900
|
col.id
|
|
8143
8901
|
);
|
|
8144
8902
|
}) }) }),
|
|
8145
|
-
/* @__PURE__ */ (0,
|
|
8146
|
-
/* @__PURE__ */ (0,
|
|
8147
|
-
emptyDescription ? /* @__PURE__ */ (0,
|
|
8148
|
-
] }) }) }) : sortedRows.map((row) => /* @__PURE__ */ (0,
|
|
8903
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("tbody", { className: cn(!hasFoot && "[&_tr:last-child_td]:border-b-0"), children: sortedRows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("td", { colSpan: columns.length, className: emptyCellClass, children: /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "flex flex-col items-center gap-1", children: [
|
|
8904
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("p", { className: "font-medium text-foreground", children: emptyTitle }),
|
|
8905
|
+
emptyDescription ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("p", { className: "max-w-sm text-muted-foreground", children: emptyDescription }) : null
|
|
8906
|
+
] }) }) }) : sortedRows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
8149
8907
|
"tr",
|
|
8150
8908
|
{
|
|
8151
8909
|
className: rowClass,
|
|
@@ -8159,7 +8917,7 @@ function DataTable({
|
|
|
8159
8917
|
} : void 0,
|
|
8160
8918
|
tabIndex: onRowClick ? 0 : void 0,
|
|
8161
8919
|
role: onRowClick ? "button" : void 0,
|
|
8162
|
-
children: columns.map((col) => /* @__PURE__ */ (0,
|
|
8920
|
+
children: columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
8163
8921
|
"td",
|
|
8164
8922
|
{
|
|
8165
8923
|
className: cn(
|
|
@@ -8175,7 +8933,7 @@ function DataTable({
|
|
|
8175
8933
|
},
|
|
8176
8934
|
getRowKey(row)
|
|
8177
8935
|
)) }),
|
|
8178
|
-
hasFoot ? /* @__PURE__ */ (0,
|
|
8936
|
+
hasFoot ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("tfoot", { children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("td", { colSpan: columns.length, className: footCellClass, children: /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(
|
|
8179
8937
|
"div",
|
|
8180
8938
|
{
|
|
8181
8939
|
className: cn(
|
|
@@ -8183,7 +8941,7 @@ function DataTable({
|
|
|
8183
8941
|
showRowCount && footer ? "justify-between" : "justify-start"
|
|
8184
8942
|
),
|
|
8185
8943
|
children: [
|
|
8186
|
-
showRowCount ? /* @__PURE__ */ (0,
|
|
8944
|
+
showRowCount ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("span", { children: rowCountText }) : null,
|
|
8187
8945
|
footer
|
|
8188
8946
|
]
|
|
8189
8947
|
}
|
|
@@ -8193,53 +8951,7 @@ function DataTable({
|
|
|
8193
8951
|
|
|
8194
8952
|
// src/app/data/ChartPanel.tsx
|
|
8195
8953
|
var import_react65 = require("react");
|
|
8196
|
-
|
|
8197
|
-
// src/app/data/metrics-shared.tsx
|
|
8198
|
-
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
8199
|
-
var metricCardShellClass = cn(
|
|
8200
|
-
studioIntegrationCardClass,
|
|
8201
|
-
"aui-app-metric-card shadow-none",
|
|
8202
|
-
"flex flex-col overflow-hidden"
|
|
8203
|
-
);
|
|
8204
|
-
var metricCardHeaderClass = "flex items-start justify-between gap-3 px-4 pb-1 pt-3";
|
|
8205
|
-
var metricTilesRowClass = "grid w-full min-w-0";
|
|
8206
|
-
var metricChartRegionClass = "relative min-h-0 w-full border-t border-border/40 pt-2";
|
|
8207
|
-
var metricChartPlotRegionClass = "relative min-h-0 w-full border-t border-border/40 px-0 pt-5 pb-3";
|
|
8208
|
-
var metricCellDividerClass = "border-r border-border/40";
|
|
8209
|
-
var MetricCardHeader = ({
|
|
8210
|
-
title,
|
|
8211
|
-
titleId,
|
|
8212
|
-
description,
|
|
8213
|
-
actions
|
|
8214
|
-
}) => {
|
|
8215
|
-
if (!title && !description && !actions) return null;
|
|
8216
|
-
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("header", { className: metricCardHeaderClass, children: [
|
|
8217
|
-
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "min-w-0", children: [
|
|
8218
|
-
title ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("h3", { id: titleId, className: "text-base font-normal text-foreground", children: title }) : null,
|
|
8219
|
-
description ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("p", { className: "mt-0.5 text-sm text-muted-foreground", children: description }) : null
|
|
8220
|
-
] }),
|
|
8221
|
-
actions ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "shrink-0", children: actions }) : null
|
|
8222
|
-
] });
|
|
8223
|
-
};
|
|
8224
|
-
function metricTilesGridColsClass(n) {
|
|
8225
|
-
switch (n) {
|
|
8226
|
-
case 1:
|
|
8227
|
-
return "grid-cols-1";
|
|
8228
|
-
case 2:
|
|
8229
|
-
return "grid-cols-2";
|
|
8230
|
-
case 3:
|
|
8231
|
-
return "grid-cols-3";
|
|
8232
|
-
case 5:
|
|
8233
|
-
return "grid-cols-2 sm:grid-cols-5";
|
|
8234
|
-
case 6:
|
|
8235
|
-
return "grid-cols-2 sm:grid-cols-3 lg:grid-cols-6";
|
|
8236
|
-
default:
|
|
8237
|
-
return "grid-cols-2 md:grid-cols-4";
|
|
8238
|
-
}
|
|
8239
|
-
}
|
|
8240
|
-
|
|
8241
|
-
// src/app/data/ChartPanel.tsx
|
|
8242
|
-
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
8954
|
+
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
8243
8955
|
var ChartPanel = ({
|
|
8244
8956
|
title,
|
|
8245
8957
|
description,
|
|
@@ -8252,14 +8964,14 @@ var ChartPanel = ({
|
|
|
8252
8964
|
const titleId = (0, import_react65.useId)();
|
|
8253
8965
|
const resolvedTitle = title ?? artifact?.title;
|
|
8254
8966
|
const hasHeader = Boolean(resolvedTitle || description || actions);
|
|
8255
|
-
const body = children ?? (artifact ? /* @__PURE__ */ (0,
|
|
8256
|
-
return /* @__PURE__ */ (0,
|
|
8967
|
+
const body = children ?? (artifact ? /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(ChartArtifactView, { artifact, embedded: true, height }) : null);
|
|
8968
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
|
|
8257
8969
|
"section",
|
|
8258
8970
|
{
|
|
8259
8971
|
className: cn(metricCardShellClass, "aui-app-chart-panel", className),
|
|
8260
8972
|
"aria-labelledby": resolvedTitle ? titleId : void 0,
|
|
8261
8973
|
children: [
|
|
8262
|
-
/* @__PURE__ */ (0,
|
|
8974
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
8263
8975
|
MetricCardHeader,
|
|
8264
8976
|
{
|
|
8265
8977
|
title: resolvedTitle,
|
|
@@ -8268,14 +8980,14 @@ var ChartPanel = ({
|
|
|
8268
8980
|
actions
|
|
8269
8981
|
}
|
|
8270
8982
|
),
|
|
8271
|
-
/* @__PURE__ */ (0,
|
|
8983
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
8272
8984
|
"div",
|
|
8273
8985
|
{
|
|
8274
8986
|
className: cn(
|
|
8275
8987
|
"relative min-h-0 w-full",
|
|
8276
8988
|
hasHeader ? metricChartPlotRegionClass : "pt-2 pb-3"
|
|
8277
8989
|
),
|
|
8278
|
-
children: body ?? /* @__PURE__ */ (0,
|
|
8990
|
+
children: body ?? /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
8279
8991
|
"div",
|
|
8280
8992
|
{
|
|
8281
8993
|
className: "flex items-center justify-center text-sm font-normal text-muted-foreground",
|
|
@@ -8291,77 +9003,9 @@ var ChartPanel = ({
|
|
|
8291
9003
|
);
|
|
8292
9004
|
};
|
|
8293
9005
|
|
|
8294
|
-
// src/app/data/MetricTile.tsx
|
|
8295
|
-
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
8296
|
-
var trendToneClass = {
|
|
8297
|
-
up: "border-border/80 bg-muted/40 text-muted-foreground",
|
|
8298
|
-
down: "border-border/80 bg-muted/40 text-muted-foreground",
|
|
8299
|
-
neutral: "border-border/80 bg-muted/30 text-muted-foreground"
|
|
8300
|
-
};
|
|
8301
|
-
var metricTileBaseClass = "relative flex min-w-0 flex-1 flex-col gap-1 px-4 py-3 text-left font-normal";
|
|
8302
|
-
var metricTileInteractiveClass = cn(
|
|
8303
|
-
metricTileBaseClass,
|
|
8304
|
-
"bg-transparent hover:bg-transparent active:bg-transparent",
|
|
8305
|
-
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-foreground/10"
|
|
8306
|
-
);
|
|
8307
|
-
var MetricTile = ({
|
|
8308
|
-
label,
|
|
8309
|
-
value,
|
|
8310
|
-
unit,
|
|
8311
|
-
trend,
|
|
8312
|
-
trendTone = "neutral",
|
|
8313
|
-
active = false,
|
|
8314
|
-
showDivider = false,
|
|
8315
|
-
onSelect,
|
|
8316
|
-
ariaLabel,
|
|
8317
|
-
className
|
|
8318
|
-
}) => {
|
|
8319
|
-
const content = /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(import_jsx_runtime88.Fragment, { children: [
|
|
8320
|
-
active ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
8321
|
-
"span",
|
|
8322
|
-
{
|
|
8323
|
-
"aria-hidden": true,
|
|
8324
|
-
className: "absolute inset-x-0 bottom-0 h-0.5 bg-foreground dark:bg-white"
|
|
8325
|
-
}
|
|
8326
|
-
) : null,
|
|
8327
|
-
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("span", { className: "text-xs font-normal text-muted-foreground", children: label }),
|
|
8328
|
-
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("span", { className: "flex items-center gap-2", children: [
|
|
8329
|
-
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("span", { className: "flex items-baseline gap-1", children: [
|
|
8330
|
-
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("span", { className: "text-2xl font-normal tracking-tight text-foreground tabular-nums", children: value }),
|
|
8331
|
-
unit ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("span", { className: "text-xs font-normal text-muted-foreground", children: unit }) : null
|
|
8332
|
-
] }),
|
|
8333
|
-
trend ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
8334
|
-
"span",
|
|
8335
|
-
{
|
|
8336
|
-
className: cn(
|
|
8337
|
-
"rounded-full border px-1.5 py-0.5 text-xs font-normal",
|
|
8338
|
-
trendToneClass[trendTone]
|
|
8339
|
-
),
|
|
8340
|
-
children: trend
|
|
8341
|
-
}
|
|
8342
|
-
) : null
|
|
8343
|
-
] })
|
|
8344
|
-
] });
|
|
8345
|
-
const divider = showDivider ? metricCellDividerClass : void 0;
|
|
8346
|
-
if (onSelect) {
|
|
8347
|
-
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
8348
|
-
"button",
|
|
8349
|
-
{
|
|
8350
|
-
type: "button",
|
|
8351
|
-
onClick: onSelect,
|
|
8352
|
-
"aria-pressed": active,
|
|
8353
|
-
"aria-label": ariaLabel,
|
|
8354
|
-
className: cn(metricTileInteractiveClass, divider, className),
|
|
8355
|
-
children: content
|
|
8356
|
-
}
|
|
8357
|
-
);
|
|
8358
|
-
}
|
|
8359
|
-
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: cn(metricTileBaseClass, divider, className), children: content });
|
|
8360
|
-
};
|
|
8361
|
-
|
|
8362
9006
|
// src/app/data/MetricRow.tsx
|
|
8363
9007
|
var import_react66 = require("react");
|
|
8364
|
-
var
|
|
9008
|
+
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
8365
9009
|
var MetricRow = ({
|
|
8366
9010
|
title,
|
|
8367
9011
|
description,
|
|
@@ -8383,13 +9027,13 @@ var MetricRow = ({
|
|
|
8383
9027
|
if (activeMetricId == null) setInternalId(id);
|
|
8384
9028
|
onMetricChange?.(id);
|
|
8385
9029
|
};
|
|
8386
|
-
return /* @__PURE__ */ (0,
|
|
9030
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
8387
9031
|
"section",
|
|
8388
9032
|
{
|
|
8389
9033
|
className: cn(metricCardShellClass, className),
|
|
8390
9034
|
"aria-labelledby": title ? titleId : void 0,
|
|
8391
9035
|
children: [
|
|
8392
|
-
/* @__PURE__ */ (0,
|
|
9036
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
8393
9037
|
MetricCardHeader,
|
|
8394
9038
|
{
|
|
8395
9039
|
title,
|
|
@@ -8398,7 +9042,7 @@ var MetricRow = ({
|
|
|
8398
9042
|
actions
|
|
8399
9043
|
}
|
|
8400
9044
|
),
|
|
8401
|
-
/* @__PURE__ */ (0,
|
|
9045
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
8402
9046
|
"div",
|
|
8403
9047
|
{
|
|
8404
9048
|
role: selectable ? "group" : void 0,
|
|
@@ -8408,7 +9052,7 @@ var MetricRow = ({
|
|
|
8408
9052
|
metricTilesGridColsClass(metrics.length),
|
|
8409
9053
|
(title || description || actions) && "mt-3"
|
|
8410
9054
|
),
|
|
8411
|
-
children: metrics.map((m, index) => /* @__PURE__ */ (0,
|
|
9055
|
+
children: metrics.map((m, index) => /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
8412
9056
|
MetricTile,
|
|
8413
9057
|
{
|
|
8414
9058
|
label: m.label,
|
|
@@ -8431,7 +9075,7 @@ var MetricRow = ({
|
|
|
8431
9075
|
|
|
8432
9076
|
// src/app/data/MetricChartCard.tsx
|
|
8433
9077
|
var import_react67 = require("react");
|
|
8434
|
-
var
|
|
9078
|
+
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
8435
9079
|
var MetricChartCard = ({
|
|
8436
9080
|
title,
|
|
8437
9081
|
description,
|
|
@@ -8461,13 +9105,13 @@ var MetricChartCard = ({
|
|
|
8461
9105
|
};
|
|
8462
9106
|
const hasHeader = Boolean(title || description || actions);
|
|
8463
9107
|
const chartAriaLabel = typeof active?.label === "string" ? `${active.label} over time` : "Metric chart";
|
|
8464
|
-
return /* @__PURE__ */ (0,
|
|
9108
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(
|
|
8465
9109
|
"section",
|
|
8466
9110
|
{
|
|
8467
9111
|
className: cn(metricCardShellClass, className),
|
|
8468
9112
|
"aria-labelledby": title ? titleId : void 0,
|
|
8469
9113
|
children: [
|
|
8470
|
-
/* @__PURE__ */ (0,
|
|
9114
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
8471
9115
|
MetricCardHeader,
|
|
8472
9116
|
{
|
|
8473
9117
|
title,
|
|
@@ -8476,7 +9120,7 @@ var MetricChartCard = ({
|
|
|
8476
9120
|
actions
|
|
8477
9121
|
}
|
|
8478
9122
|
),
|
|
8479
|
-
/* @__PURE__ */ (0,
|
|
9123
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
8480
9124
|
"div",
|
|
8481
9125
|
{
|
|
8482
9126
|
role: "group",
|
|
@@ -8486,7 +9130,7 @@ var MetricChartCard = ({
|
|
|
8486
9130
|
metricTilesGridColsClass(metrics.length),
|
|
8487
9131
|
hasHeader && "mt-3"
|
|
8488
9132
|
),
|
|
8489
|
-
children: metrics.map((m, index) => /* @__PURE__ */ (0,
|
|
9133
|
+
children: metrics.map((m, index) => /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
8490
9134
|
MetricTile,
|
|
8491
9135
|
{
|
|
8492
9136
|
label: m.label,
|
|
@@ -8502,7 +9146,7 @@ var MetricChartCard = ({
|
|
|
8502
9146
|
))
|
|
8503
9147
|
}
|
|
8504
9148
|
),
|
|
8505
|
-
/* @__PURE__ */ (0,
|
|
9149
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: metricChartRegionClass, "aria-live": "polite", "aria-atomic": "true", children: active?.data && active.data.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
8506
9150
|
LineAreaChart,
|
|
8507
9151
|
{
|
|
8508
9152
|
data: active.data,
|
|
@@ -8522,7 +9166,7 @@ var MetricChartCard = ({
|
|
|
8522
9166
|
ariaLabel: chartAriaLabel
|
|
8523
9167
|
},
|
|
8524
9168
|
active.id
|
|
8525
|
-
) : /* @__PURE__ */ (0,
|
|
9169
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
8526
9170
|
"div",
|
|
8527
9171
|
{
|
|
8528
9172
|
className: "flex w-full items-center justify-center text-sm font-normal text-muted-foreground",
|
|
@@ -8538,7 +9182,7 @@ var MetricChartCard = ({
|
|
|
8538
9182
|
|
|
8539
9183
|
// src/charts/sparkline.tsx
|
|
8540
9184
|
var import_react68 = require("react");
|
|
8541
|
-
var
|
|
9185
|
+
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
8542
9186
|
var Sparkline = ({
|
|
8543
9187
|
data,
|
|
8544
9188
|
dataKey = "value",
|
|
@@ -8553,7 +9197,7 @@ var Sparkline = ({
|
|
|
8553
9197
|
const uid = (0, import_react68.useId)();
|
|
8554
9198
|
const values = data.map((d) => typeof d === "number" ? d : toNum(d[dataKey]));
|
|
8555
9199
|
if (values.length === 0) {
|
|
8556
|
-
return /* @__PURE__ */ (0,
|
|
9200
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: cn("inline-block", className), style: { width, height } });
|
|
8557
9201
|
}
|
|
8558
9202
|
const pad = strokeWidth + 1;
|
|
8559
9203
|
const min = Math.min(...values);
|
|
@@ -8565,7 +9209,7 @@ var Sparkline = ({
|
|
|
8565
9209
|
x: pad + (values.length > 1 ? i / (values.length - 1) * innerW : innerW / 2),
|
|
8566
9210
|
y: pad + innerH - (v - min) / range * innerH
|
|
8567
9211
|
}));
|
|
8568
|
-
return /* @__PURE__ */ (0,
|
|
9212
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(
|
|
8569
9213
|
"svg",
|
|
8570
9214
|
{
|
|
8571
9215
|
width,
|
|
@@ -8576,14 +9220,14 @@ var Sparkline = ({
|
|
|
8576
9220
|
"aria-label": ariaLabel,
|
|
8577
9221
|
preserveAspectRatio: "none",
|
|
8578
9222
|
children: [
|
|
8579
|
-
area && /* @__PURE__ */ (0,
|
|
8580
|
-
/* @__PURE__ */ (0,
|
|
8581
|
-
/* @__PURE__ */ (0,
|
|
8582
|
-
/* @__PURE__ */ (0,
|
|
9223
|
+
area && /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(import_jsx_runtime93.Fragment, { children: [
|
|
9224
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("linearGradient", { id: `${uid}-spark`, x1: "0", x2: "0", y1: "0", y2: "1", children: [
|
|
9225
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("stop", { offset: "0%", style: { stopColor: color, stopOpacity: 0.25 } }),
|
|
9226
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("stop", { offset: "100%", style: { stopColor: color, stopOpacity: 0 } })
|
|
8583
9227
|
] }) }),
|
|
8584
|
-
/* @__PURE__ */ (0,
|
|
9228
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("path", { d: monotoneAreaPath(points, height - pad), fill: `url(#${uid}-spark)` })
|
|
8585
9229
|
] }),
|
|
8586
|
-
/* @__PURE__ */ (0,
|
|
9230
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
8587
9231
|
"path",
|
|
8588
9232
|
{
|
|
8589
9233
|
d: monotoneLinePath(points),
|
|
@@ -8727,7 +9371,7 @@ When you call a tool that returns an artifact (\`make_chart\`, \`ask_question\`,
|
|
|
8727
9371
|
|
|
8728
9372
|
// src/auth/guard.tsx
|
|
8729
9373
|
var import_lucide_react19 = require("lucide-react");
|
|
8730
|
-
var
|
|
9374
|
+
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
8731
9375
|
var AuthGuard = ({
|
|
8732
9376
|
children,
|
|
8733
9377
|
requireAuth = false,
|
|
@@ -8738,7 +9382,7 @@ var AuthGuard = ({
|
|
|
8738
9382
|
return children;
|
|
8739
9383
|
}
|
|
8740
9384
|
if (loading) {
|
|
8741
|
-
return /* @__PURE__ */ (0,
|
|
9385
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "flex items-center justify-center h-screen", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_lucide_react19.Loader2, { className: "w-8 h-8 animate-spin" }) });
|
|
8742
9386
|
}
|
|
8743
9387
|
if (requireAuth && !isAuthenticated && !isEmbedded) {
|
|
8744
9388
|
const returnTo = encodeURIComponent(
|
|
@@ -8752,6 +9396,407 @@ var AuthGuard = ({
|
|
|
8752
9396
|
|
|
8753
9397
|
// src/index.ts
|
|
8754
9398
|
var import_react69 = require("@assistant-ui/react");
|
|
9399
|
+
|
|
9400
|
+
// src/ui/dropdown-menu.tsx
|
|
9401
|
+
var import_radix_ui5 = require("radix-ui");
|
|
9402
|
+
var import_lucide_react20 = require("lucide-react");
|
|
9403
|
+
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
9404
|
+
function DropdownMenu({
|
|
9405
|
+
...props
|
|
9406
|
+
}) {
|
|
9407
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_radix_ui5.DropdownMenu.Root, { "data-slot": "dropdown-menu", ...props });
|
|
9408
|
+
}
|
|
9409
|
+
function DropdownMenuTrigger({
|
|
9410
|
+
...props
|
|
9411
|
+
}) {
|
|
9412
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
9413
|
+
import_radix_ui5.DropdownMenu.Trigger,
|
|
9414
|
+
{
|
|
9415
|
+
"data-slot": "dropdown-menu-trigger",
|
|
9416
|
+
...props
|
|
9417
|
+
}
|
|
9418
|
+
);
|
|
9419
|
+
}
|
|
9420
|
+
function DropdownMenuGroup({
|
|
9421
|
+
...props
|
|
9422
|
+
}) {
|
|
9423
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_radix_ui5.DropdownMenu.Group, { "data-slot": "dropdown-menu-group", ...props });
|
|
9424
|
+
}
|
|
9425
|
+
function DropdownMenuContent({
|
|
9426
|
+
className,
|
|
9427
|
+
sideOffset = 4,
|
|
9428
|
+
...props
|
|
9429
|
+
}) {
|
|
9430
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_radix_ui5.DropdownMenu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
9431
|
+
import_radix_ui5.DropdownMenu.Content,
|
|
9432
|
+
{
|
|
9433
|
+
"data-slot": "dropdown-menu-content",
|
|
9434
|
+
sideOffset,
|
|
9435
|
+
className: cn(
|
|
9436
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-[80] max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] origin-[var(--radix-dropdown-menu-content-transform-origin)] overflow-x-hidden overflow-y-auto rounded-lg border border-border p-1 shadow-card",
|
|
9437
|
+
className
|
|
9438
|
+
),
|
|
9439
|
+
...props
|
|
9440
|
+
}
|
|
9441
|
+
) });
|
|
9442
|
+
}
|
|
9443
|
+
function DropdownMenuItem({
|
|
9444
|
+
className,
|
|
9445
|
+
inset,
|
|
9446
|
+
variant = "default",
|
|
9447
|
+
...props
|
|
9448
|
+
}) {
|
|
9449
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
9450
|
+
import_radix_ui5.DropdownMenu.Item,
|
|
9451
|
+
{
|
|
9452
|
+
"data-slot": "dropdown-menu-item",
|
|
9453
|
+
"data-inset": inset,
|
|
9454
|
+
"data-variant": variant,
|
|
9455
|
+
className: cn(
|
|
9456
|
+
"relative flex cursor-default items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",
|
|
9457
|
+
className
|
|
9458
|
+
),
|
|
9459
|
+
...props
|
|
9460
|
+
}
|
|
9461
|
+
);
|
|
9462
|
+
}
|
|
9463
|
+
function DropdownMenuCheckboxItem({
|
|
9464
|
+
className,
|
|
9465
|
+
children,
|
|
9466
|
+
checked,
|
|
9467
|
+
...props
|
|
9468
|
+
}) {
|
|
9469
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
|
|
9470
|
+
import_radix_ui5.DropdownMenu.CheckboxItem,
|
|
9471
|
+
{
|
|
9472
|
+
"data-slot": "dropdown-menu-checkbox-item",
|
|
9473
|
+
className: cn(
|
|
9474
|
+
"relative flex cursor-default items-center gap-2 rounded-md py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
9475
|
+
className
|
|
9476
|
+
),
|
|
9477
|
+
checked,
|
|
9478
|
+
...props,
|
|
9479
|
+
children: [
|
|
9480
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_radix_ui5.DropdownMenu.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_lucide_react20.CheckIcon, { className: "size-4" }) }) }),
|
|
9481
|
+
children
|
|
9482
|
+
]
|
|
9483
|
+
}
|
|
9484
|
+
);
|
|
9485
|
+
}
|
|
9486
|
+
function DropdownMenuRadioGroup({
|
|
9487
|
+
...props
|
|
9488
|
+
}) {
|
|
9489
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
9490
|
+
import_radix_ui5.DropdownMenu.RadioGroup,
|
|
9491
|
+
{
|
|
9492
|
+
"data-slot": "dropdown-menu-radio-group",
|
|
9493
|
+
...props
|
|
9494
|
+
}
|
|
9495
|
+
);
|
|
9496
|
+
}
|
|
9497
|
+
function DropdownMenuRadioItem({
|
|
9498
|
+
className,
|
|
9499
|
+
children,
|
|
9500
|
+
...props
|
|
9501
|
+
}) {
|
|
9502
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
|
|
9503
|
+
import_radix_ui5.DropdownMenu.RadioItem,
|
|
9504
|
+
{
|
|
9505
|
+
"data-slot": "dropdown-menu-radio-item",
|
|
9506
|
+
className: cn(
|
|
9507
|
+
"relative flex cursor-default items-center gap-2 rounded-md py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
9508
|
+
className
|
|
9509
|
+
),
|
|
9510
|
+
...props,
|
|
9511
|
+
children: [
|
|
9512
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_radix_ui5.DropdownMenu.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_lucide_react20.CircleIcon, { className: "size-2 fill-current" }) }) }),
|
|
9513
|
+
children
|
|
9514
|
+
]
|
|
9515
|
+
}
|
|
9516
|
+
);
|
|
9517
|
+
}
|
|
9518
|
+
function DropdownMenuLabel({
|
|
9519
|
+
className,
|
|
9520
|
+
inset,
|
|
9521
|
+
...props
|
|
9522
|
+
}) {
|
|
9523
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
9524
|
+
import_radix_ui5.DropdownMenu.Label,
|
|
9525
|
+
{
|
|
9526
|
+
"data-slot": "dropdown-menu-label",
|
|
9527
|
+
"data-inset": inset,
|
|
9528
|
+
className: cn(
|
|
9529
|
+
"px-2 py-1.5 text-xs font-medium text-muted-foreground data-[inset]:pl-8",
|
|
9530
|
+
className
|
|
9531
|
+
),
|
|
9532
|
+
...props
|
|
9533
|
+
}
|
|
9534
|
+
);
|
|
9535
|
+
}
|
|
9536
|
+
function DropdownMenuSeparator({
|
|
9537
|
+
className,
|
|
9538
|
+
...props
|
|
9539
|
+
}) {
|
|
9540
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
9541
|
+
import_radix_ui5.DropdownMenu.Separator,
|
|
9542
|
+
{
|
|
9543
|
+
"data-slot": "dropdown-menu-separator",
|
|
9544
|
+
className: cn("-mx-1 my-1 h-px bg-border", className),
|
|
9545
|
+
...props
|
|
9546
|
+
}
|
|
9547
|
+
);
|
|
9548
|
+
}
|
|
9549
|
+
function DropdownMenuShortcut({
|
|
9550
|
+
className,
|
|
9551
|
+
...props
|
|
9552
|
+
}) {
|
|
9553
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
9554
|
+
"span",
|
|
9555
|
+
{
|
|
9556
|
+
"data-slot": "dropdown-menu-shortcut",
|
|
9557
|
+
className: cn(
|
|
9558
|
+
"ml-auto text-xs tracking-widest text-muted-foreground",
|
|
9559
|
+
className
|
|
9560
|
+
),
|
|
9561
|
+
...props
|
|
9562
|
+
}
|
|
9563
|
+
);
|
|
9564
|
+
}
|
|
9565
|
+
function DropdownMenuSub({
|
|
9566
|
+
...props
|
|
9567
|
+
}) {
|
|
9568
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_radix_ui5.DropdownMenu.Sub, { "data-slot": "dropdown-menu-sub", ...props });
|
|
9569
|
+
}
|
|
9570
|
+
function DropdownMenuSubTrigger({
|
|
9571
|
+
className,
|
|
9572
|
+
inset,
|
|
9573
|
+
children,
|
|
9574
|
+
...props
|
|
9575
|
+
}) {
|
|
9576
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
|
|
9577
|
+
import_radix_ui5.DropdownMenu.SubTrigger,
|
|
9578
|
+
{
|
|
9579
|
+
"data-slot": "dropdown-menu-sub-trigger",
|
|
9580
|
+
"data-inset": inset,
|
|
9581
|
+
className: cn(
|
|
9582
|
+
"flex cursor-default items-center rounded-md px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground data-[inset]:pl-8",
|
|
9583
|
+
className
|
|
9584
|
+
),
|
|
9585
|
+
...props,
|
|
9586
|
+
children: [
|
|
9587
|
+
children,
|
|
9588
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_lucide_react20.ChevronRightIcon, { className: "ml-auto size-4" })
|
|
9589
|
+
]
|
|
9590
|
+
}
|
|
9591
|
+
);
|
|
9592
|
+
}
|
|
9593
|
+
function DropdownMenuSubContent({
|
|
9594
|
+
className,
|
|
9595
|
+
...props
|
|
9596
|
+
}) {
|
|
9597
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
9598
|
+
import_radix_ui5.DropdownMenu.SubContent,
|
|
9599
|
+
{
|
|
9600
|
+
"data-slot": "dropdown-menu-sub-content",
|
|
9601
|
+
className: cn(
|
|
9602
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-[80] min-w-[8rem] origin-[var(--radix-dropdown-menu-content-transform-origin)] overflow-hidden rounded-lg border border-border p-1 shadow-card",
|
|
9603
|
+
className
|
|
9604
|
+
),
|
|
9605
|
+
...props
|
|
9606
|
+
}
|
|
9607
|
+
);
|
|
9608
|
+
}
|
|
9609
|
+
|
|
9610
|
+
// src/ui/popover.tsx
|
|
9611
|
+
var import_radix_ui6 = require("radix-ui");
|
|
9612
|
+
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
9613
|
+
function Popover({
|
|
9614
|
+
...props
|
|
9615
|
+
}) {
|
|
9616
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_radix_ui6.Popover.Root, { "data-slot": "popover", ...props });
|
|
9617
|
+
}
|
|
9618
|
+
function PopoverTrigger({
|
|
9619
|
+
...props
|
|
9620
|
+
}) {
|
|
9621
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_radix_ui6.Popover.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
9622
|
+
}
|
|
9623
|
+
function PopoverAnchor({
|
|
9624
|
+
...props
|
|
9625
|
+
}) {
|
|
9626
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_radix_ui6.Popover.Anchor, { "data-slot": "popover-anchor", ...props });
|
|
9627
|
+
}
|
|
9628
|
+
function PopoverContent({
|
|
9629
|
+
className,
|
|
9630
|
+
align = "center",
|
|
9631
|
+
sideOffset = 4,
|
|
9632
|
+
...props
|
|
9633
|
+
}) {
|
|
9634
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_radix_ui6.Popover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
9635
|
+
import_radix_ui6.Popover.Content,
|
|
9636
|
+
{
|
|
9637
|
+
"data-slot": "popover-content",
|
|
9638
|
+
align,
|
|
9639
|
+
sideOffset,
|
|
9640
|
+
className: cn(
|
|
9641
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-[80] w-72 origin-[var(--radix-popover-content-transform-origin)] rounded-xl border border-border p-4 shadow-card outline-hidden",
|
|
9642
|
+
className
|
|
9643
|
+
),
|
|
9644
|
+
...props
|
|
9645
|
+
}
|
|
9646
|
+
) });
|
|
9647
|
+
}
|
|
9648
|
+
|
|
9649
|
+
// src/ui/select.tsx
|
|
9650
|
+
var import_radix_ui7 = require("radix-ui");
|
|
9651
|
+
var import_lucide_react21 = require("lucide-react");
|
|
9652
|
+
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
9653
|
+
function Select({
|
|
9654
|
+
...props
|
|
9655
|
+
}) {
|
|
9656
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_radix_ui7.Select.Root, { "data-slot": "select", ...props });
|
|
9657
|
+
}
|
|
9658
|
+
function SelectGroup({
|
|
9659
|
+
...props
|
|
9660
|
+
}) {
|
|
9661
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_radix_ui7.Select.Group, { "data-slot": "select-group", ...props });
|
|
9662
|
+
}
|
|
9663
|
+
function SelectValue({
|
|
9664
|
+
...props
|
|
9665
|
+
}) {
|
|
9666
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_radix_ui7.Select.Value, { "data-slot": "select-value", ...props });
|
|
9667
|
+
}
|
|
9668
|
+
function SelectTrigger({
|
|
9669
|
+
className,
|
|
9670
|
+
size = "default",
|
|
9671
|
+
children,
|
|
9672
|
+
...props
|
|
9673
|
+
}) {
|
|
9674
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
9675
|
+
import_radix_ui7.Select.Trigger,
|
|
9676
|
+
{
|
|
9677
|
+
"data-slot": "select-trigger",
|
|
9678
|
+
"data-size": size,
|
|
9679
|
+
className: cn(
|
|
9680
|
+
"flex w-fit items-center justify-between gap-2 rounded-lg border border-input bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/40 disabled:cursor-not-allowed disabled:opacity-50 data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",
|
|
9681
|
+
className
|
|
9682
|
+
),
|
|
9683
|
+
...props,
|
|
9684
|
+
children: [
|
|
9685
|
+
children,
|
|
9686
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_radix_ui7.Select.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react21.ChevronDownIcon, { className: "size-4 opacity-50" }) })
|
|
9687
|
+
]
|
|
9688
|
+
}
|
|
9689
|
+
);
|
|
9690
|
+
}
|
|
9691
|
+
function SelectContent({
|
|
9692
|
+
className,
|
|
9693
|
+
children,
|
|
9694
|
+
position = "popper",
|
|
9695
|
+
...props
|
|
9696
|
+
}) {
|
|
9697
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_radix_ui7.Select.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
9698
|
+
import_radix_ui7.Select.Content,
|
|
9699
|
+
{
|
|
9700
|
+
"data-slot": "select-content",
|
|
9701
|
+
className: cn(
|
|
9702
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-[80] max-h-[var(--radix-select-content-available-height)] min-w-[8rem] origin-[var(--radix-select-content-transform-origin)] overflow-x-hidden overflow-y-auto rounded-lg border border-border shadow-card",
|
|
9703
|
+
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
9704
|
+
className
|
|
9705
|
+
),
|
|
9706
|
+
position,
|
|
9707
|
+
...props,
|
|
9708
|
+
children: [
|
|
9709
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(SelectScrollUpButton, {}),
|
|
9710
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
9711
|
+
import_radix_ui7.Select.Viewport,
|
|
9712
|
+
{
|
|
9713
|
+
className: cn(
|
|
9714
|
+
"p-1",
|
|
9715
|
+
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
|
|
9716
|
+
),
|
|
9717
|
+
children
|
|
9718
|
+
}
|
|
9719
|
+
),
|
|
9720
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(SelectScrollDownButton, {})
|
|
9721
|
+
]
|
|
9722
|
+
}
|
|
9723
|
+
) });
|
|
9724
|
+
}
|
|
9725
|
+
function SelectLabel({
|
|
9726
|
+
className,
|
|
9727
|
+
...props
|
|
9728
|
+
}) {
|
|
9729
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
9730
|
+
import_radix_ui7.Select.Label,
|
|
9731
|
+
{
|
|
9732
|
+
"data-slot": "select-label",
|
|
9733
|
+
className: cn("px-2 py-1.5 text-xs font-medium text-muted-foreground", className),
|
|
9734
|
+
...props
|
|
9735
|
+
}
|
|
9736
|
+
);
|
|
9737
|
+
}
|
|
9738
|
+
function SelectItem({
|
|
9739
|
+
className,
|
|
9740
|
+
children,
|
|
9741
|
+
...props
|
|
9742
|
+
}) {
|
|
9743
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
9744
|
+
import_radix_ui7.Select.Item,
|
|
9745
|
+
{
|
|
9746
|
+
"data-slot": "select-item",
|
|
9747
|
+
className: cn(
|
|
9748
|
+
"relative flex w-full cursor-default items-center gap-2 rounded-md py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",
|
|
9749
|
+
className
|
|
9750
|
+
),
|
|
9751
|
+
...props,
|
|
9752
|
+
children: [
|
|
9753
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_radix_ui7.Select.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react21.CheckIcon, { className: "size-4" }) }) }),
|
|
9754
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_radix_ui7.Select.ItemText, { children })
|
|
9755
|
+
]
|
|
9756
|
+
}
|
|
9757
|
+
);
|
|
9758
|
+
}
|
|
9759
|
+
function SelectSeparator({
|
|
9760
|
+
className,
|
|
9761
|
+
...props
|
|
9762
|
+
}) {
|
|
9763
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
9764
|
+
import_radix_ui7.Select.Separator,
|
|
9765
|
+
{
|
|
9766
|
+
"data-slot": "select-separator",
|
|
9767
|
+
className: cn("-mx-1 my-1 h-px bg-border", className),
|
|
9768
|
+
...props
|
|
9769
|
+
}
|
|
9770
|
+
);
|
|
9771
|
+
}
|
|
9772
|
+
function SelectScrollUpButton({
|
|
9773
|
+
className,
|
|
9774
|
+
...props
|
|
9775
|
+
}) {
|
|
9776
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
9777
|
+
import_radix_ui7.Select.ScrollUpButton,
|
|
9778
|
+
{
|
|
9779
|
+
"data-slot": "select-scroll-up-button",
|
|
9780
|
+
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
9781
|
+
...props,
|
|
9782
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react21.ChevronUpIcon, { className: "size-4" })
|
|
9783
|
+
}
|
|
9784
|
+
);
|
|
9785
|
+
}
|
|
9786
|
+
function SelectScrollDownButton({
|
|
9787
|
+
className,
|
|
9788
|
+
...props
|
|
9789
|
+
}) {
|
|
9790
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
9791
|
+
import_radix_ui7.Select.ScrollDownButton,
|
|
9792
|
+
{
|
|
9793
|
+
"data-slot": "select-scroll-down-button",
|
|
9794
|
+
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
9795
|
+
...props,
|
|
9796
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react21.ChevronDownIcon, { className: "size-4" })
|
|
9797
|
+
}
|
|
9798
|
+
);
|
|
9799
|
+
}
|
|
8755
9800
|
// Annotate the CommonJS export names for ESM import in node:
|
|
8756
9801
|
0 && (module.exports = {
|
|
8757
9802
|
APP_KIT_AGENT_INSTRUCTIONS,
|
|
@@ -8790,10 +9835,27 @@ var import_react69 = require("@assistant-ui/react");
|
|
|
8790
9835
|
Dialog,
|
|
8791
9836
|
DialogClose,
|
|
8792
9837
|
DialogContent,
|
|
9838
|
+
DialogDescription,
|
|
9839
|
+
DialogFooter,
|
|
9840
|
+
DialogHeader,
|
|
8793
9841
|
DialogOverlay,
|
|
8794
9842
|
DialogPortal,
|
|
8795
9843
|
DialogTitle,
|
|
8796
9844
|
DialogTrigger,
|
|
9845
|
+
DropdownMenu,
|
|
9846
|
+
DropdownMenuCheckboxItem,
|
|
9847
|
+
DropdownMenuContent,
|
|
9848
|
+
DropdownMenuGroup,
|
|
9849
|
+
DropdownMenuItem,
|
|
9850
|
+
DropdownMenuLabel,
|
|
9851
|
+
DropdownMenuRadioGroup,
|
|
9852
|
+
DropdownMenuRadioItem,
|
|
9853
|
+
DropdownMenuSeparator,
|
|
9854
|
+
DropdownMenuShortcut,
|
|
9855
|
+
DropdownMenuSub,
|
|
9856
|
+
DropdownMenuSubContent,
|
|
9857
|
+
DropdownMenuSubTrigger,
|
|
9858
|
+
DropdownMenuTrigger,
|
|
8797
9859
|
EmptyState,
|
|
8798
9860
|
ExpandableSection,
|
|
8799
9861
|
Field,
|
|
@@ -8823,11 +9885,25 @@ var import_react69 = require("@assistant-ui/react");
|
|
|
8823
9885
|
PageHeader,
|
|
8824
9886
|
PillSegmentedTabs,
|
|
8825
9887
|
PlanBadge,
|
|
9888
|
+
Popover,
|
|
9889
|
+
PopoverAnchor,
|
|
9890
|
+
PopoverContent,
|
|
9891
|
+
PopoverTrigger,
|
|
8826
9892
|
QuestionArtifactView,
|
|
8827
9893
|
ResourceCard,
|
|
8828
9894
|
STUDIO_NAV_MODE,
|
|
8829
9895
|
SearchInput,
|
|
8830
9896
|
Section,
|
|
9897
|
+
Select,
|
|
9898
|
+
SelectContent,
|
|
9899
|
+
SelectGroup,
|
|
9900
|
+
SelectItem,
|
|
9901
|
+
SelectLabel,
|
|
9902
|
+
SelectScrollDownButton,
|
|
9903
|
+
SelectScrollUpButton,
|
|
9904
|
+
SelectSeparator,
|
|
9905
|
+
SelectTrigger,
|
|
9906
|
+
SelectValue,
|
|
8831
9907
|
SessionProvider,
|
|
8832
9908
|
SettingsSection,
|
|
8833
9909
|
SettingsSectionHeader,
|
|
@@ -8842,8 +9918,11 @@ var import_react69 = require("@assistant-ui/react");
|
|
|
8842
9918
|
SubNav,
|
|
8843
9919
|
Suggestions,
|
|
8844
9920
|
SurfaceCard,
|
|
9921
|
+
THEME_AGENT_INSTRUCTIONS,
|
|
8845
9922
|
THREAD_DEFAULT_MAX_WIDTH,
|
|
9923
|
+
TIMBAL_THEME_PRESETS,
|
|
8846
9924
|
TableArtifactView,
|
|
9925
|
+
ThemePresetGallery,
|
|
8847
9926
|
Thread,
|
|
8848
9927
|
ThreadPrimitive,
|
|
8849
9928
|
TimbalChat,
|
|
@@ -8851,6 +9930,7 @@ var import_react69 = require("@assistant-ui/react");
|
|
|
8851
9930
|
TimbalMark,
|
|
8852
9931
|
TimbalRuntimeProvider,
|
|
8853
9932
|
TimbalStudioShell,
|
|
9933
|
+
TimbalThemeStyle,
|
|
8854
9934
|
ToolArtifactFallback,
|
|
8855
9935
|
ToolFallback,
|
|
8856
9936
|
Tooltip,
|
|
@@ -8863,13 +9943,17 @@ var import_react69 = require("@assistant-ui/react");
|
|
|
8863
9943
|
UiEventProvider,
|
|
8864
9944
|
UiNodeView,
|
|
8865
9945
|
WorkforceSelector,
|
|
9946
|
+
applyThemePreset,
|
|
9947
|
+
applyTimbalTheme,
|
|
8866
9948
|
assistantMessageContentClass,
|
|
8867
9949
|
assistantMessageRootClass,
|
|
8868
9950
|
authFetch,
|
|
9951
|
+
clearTimbalTheme,
|
|
8869
9952
|
clearTokens,
|
|
8870
9953
|
cn,
|
|
8871
9954
|
connectionRowListClass,
|
|
8872
9955
|
createDefaultAttachmentAdapter,
|
|
9956
|
+
createTimbalTheme,
|
|
8873
9957
|
createUploadAttachmentAdapter,
|
|
8874
9958
|
defaultArtifactRenderers,
|
|
8875
9959
|
fetchCurrentUser,
|
|
@@ -8877,6 +9961,8 @@ var import_react69 = require("@assistant-ui/react");
|
|
|
8877
9961
|
getAccessToken,
|
|
8878
9962
|
getPath,
|
|
8879
9963
|
getRefreshToken,
|
|
9964
|
+
getStoredThemePreset,
|
|
9965
|
+
getThemePreset,
|
|
8880
9966
|
isArtifact,
|
|
8881
9967
|
isArtifactFenceLanguage,
|
|
8882
9968
|
isUiBinding,
|
|
@@ -8889,6 +9975,7 @@ var import_react69 = require("@assistant-ui/react");
|
|
|
8889
9975
|
setPath,
|
|
8890
9976
|
setRefreshToken,
|
|
8891
9977
|
splitMarkdownByArtifacts,
|
|
9978
|
+
themeToCss,
|
|
8892
9979
|
threadMessageColumnClass,
|
|
8893
9980
|
useAppCopilotContext,
|
|
8894
9981
|
useAppShellChat,
|