@arbidocs/react 0.3.108 → 0.3.110
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2432 -199
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +729 -32
- package/dist/index.d.ts +729 -32
- package/dist/index.js +2305 -205
- package/dist/index.js.map +1 -1
- package/package.json +26 -4
package/dist/index.cjs
CHANGED
|
@@ -4,22 +4,39 @@ var React = require('react');
|
|
|
4
4
|
var browser = require('@arbidocs/sdk/browser');
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
var reactQuery = require('@tanstack/react-query');
|
|
7
|
-
var
|
|
7
|
+
var lucideReact = require('lucide-react');
|
|
8
8
|
var clsx = require('clsx');
|
|
9
9
|
var tailwindMerge = require('tailwind-merge');
|
|
10
|
+
var client = require('@arbidocs/client');
|
|
11
|
+
var zustand = require('zustand');
|
|
12
|
+
var reactDom = require('react-dom');
|
|
10
13
|
var AvatarPrimitive = require('@radix-ui/react-avatar');
|
|
11
14
|
var classVarianceAuthority = require('class-variance-authority');
|
|
12
15
|
var reactSlot = require('@radix-ui/react-slot');
|
|
13
16
|
var HoverCardPrimitive = require('@radix-ui/react-hover-card');
|
|
17
|
+
var SeparatorPrimitive = require('@radix-ui/react-separator');
|
|
18
|
+
var CollapsiblePrimitive = require('@radix-ui/react-collapsible');
|
|
19
|
+
var ProgressPrimitive = require('@radix-ui/react-progress');
|
|
20
|
+
var ScrollAreaPrimitive = require('@radix-ui/react-scroll-area');
|
|
21
|
+
var RadioGroupPrimitive = require('@radix-ui/react-radio-group');
|
|
22
|
+
var CheckboxPrimitive = require('@radix-ui/react-checkbox');
|
|
23
|
+
var SwitchPrimitives = require('@radix-ui/react-switch');
|
|
24
|
+
var TabsPrimitive = require('@radix-ui/react-tabs');
|
|
25
|
+
var SliderPrimitive = require('@radix-ui/react-slider');
|
|
26
|
+
var TogglePrimitive = require('@radix-ui/react-toggle');
|
|
27
|
+
var ToggleGroupPrimitive = require('@radix-ui/react-toggle-group');
|
|
28
|
+
var DialogPrimitive = require('@radix-ui/react-dialog');
|
|
29
|
+
var PopoverPrimitive = require('@radix-ui/react-popover');
|
|
30
|
+
var DropdownMenuPrimitive = require('@radix-ui/react-dropdown-menu');
|
|
31
|
+
var SelectPrimitive = require('@radix-ui/react-select');
|
|
32
|
+
var cmdk = require('cmdk');
|
|
14
33
|
var diff = require('diff');
|
|
15
34
|
var ReactMarkdown = require('react-markdown');
|
|
16
35
|
var remarkGfm = require('remark-gfm');
|
|
17
36
|
var rehypeRaw = require('rehype-raw');
|
|
18
|
-
var lucideReact = require('lucide-react');
|
|
19
37
|
var framerMotion = require('framer-motion');
|
|
20
38
|
var agGridReact = require('ag-grid-react');
|
|
21
39
|
var agGridCommunity = require('ag-grid-community');
|
|
22
|
-
var zustand = require('zustand');
|
|
23
40
|
|
|
24
41
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
25
42
|
|
|
@@ -44,6 +61,21 @@ function _interopNamespace(e) {
|
|
|
44
61
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
45
62
|
var AvatarPrimitive__namespace = /*#__PURE__*/_interopNamespace(AvatarPrimitive);
|
|
46
63
|
var HoverCardPrimitive__namespace = /*#__PURE__*/_interopNamespace(HoverCardPrimitive);
|
|
64
|
+
var SeparatorPrimitive__namespace = /*#__PURE__*/_interopNamespace(SeparatorPrimitive);
|
|
65
|
+
var CollapsiblePrimitive__namespace = /*#__PURE__*/_interopNamespace(CollapsiblePrimitive);
|
|
66
|
+
var ProgressPrimitive__namespace = /*#__PURE__*/_interopNamespace(ProgressPrimitive);
|
|
67
|
+
var ScrollAreaPrimitive__namespace = /*#__PURE__*/_interopNamespace(ScrollAreaPrimitive);
|
|
68
|
+
var RadioGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(RadioGroupPrimitive);
|
|
69
|
+
var CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespace(CheckboxPrimitive);
|
|
70
|
+
var SwitchPrimitives__namespace = /*#__PURE__*/_interopNamespace(SwitchPrimitives);
|
|
71
|
+
var TabsPrimitive__namespace = /*#__PURE__*/_interopNamespace(TabsPrimitive);
|
|
72
|
+
var SliderPrimitive__namespace = /*#__PURE__*/_interopNamespace(SliderPrimitive);
|
|
73
|
+
var TogglePrimitive__namespace = /*#__PURE__*/_interopNamespace(TogglePrimitive);
|
|
74
|
+
var ToggleGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(ToggleGroupPrimitive);
|
|
75
|
+
var DialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(DialogPrimitive);
|
|
76
|
+
var PopoverPrimitive__namespace = /*#__PURE__*/_interopNamespace(PopoverPrimitive);
|
|
77
|
+
var DropdownMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(DropdownMenuPrimitive);
|
|
78
|
+
var SelectPrimitive__namespace = /*#__PURE__*/_interopNamespace(SelectPrimitive);
|
|
47
79
|
var ReactMarkdown__default = /*#__PURE__*/_interopDefault(ReactMarkdown);
|
|
48
80
|
var remarkGfm__default = /*#__PURE__*/_interopDefault(remarkGfm);
|
|
49
81
|
var rehypeRaw__default = /*#__PURE__*/_interopDefault(rehypeRaw);
|
|
@@ -1270,6 +1302,256 @@ function ArbiChat({
|
|
|
1270
1302
|
function cn(...inputs) {
|
|
1271
1303
|
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
1272
1304
|
}
|
|
1305
|
+
var TypingIndicator = React.memo(function TypingIndicator2() {
|
|
1306
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex w-full justify-start mb-2", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-card border border-primary rounded-2xl rounded-bl-md px-4 py-2.5", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-1 items-center", children: [
|
|
1307
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-muted-foreground animate-bounce [animation-delay:0ms]" }),
|
|
1308
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-muted-foreground animate-bounce [animation-delay:150ms]" }),
|
|
1309
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-muted-foreground animate-bounce [animation-delay:300ms]" })
|
|
1310
|
+
] }) }) });
|
|
1311
|
+
});
|
|
1312
|
+
var ChatBubble = React.memo(function ChatBubble2({
|
|
1313
|
+
message,
|
|
1314
|
+
timestamp,
|
|
1315
|
+
isSent,
|
|
1316
|
+
deleted,
|
|
1317
|
+
read,
|
|
1318
|
+
onDelete,
|
|
1319
|
+
isLastOfRun = true,
|
|
1320
|
+
renderMessage = (m) => m,
|
|
1321
|
+
formatTimestamp = (t) => t
|
|
1322
|
+
}) {
|
|
1323
|
+
const [isHovered, setIsHovered] = React.useState(false);
|
|
1324
|
+
const [isFocused, setIsFocused] = React.useState(false);
|
|
1325
|
+
const showDeleteButton = isHovered || isFocused;
|
|
1326
|
+
if (deleted) {
|
|
1327
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex w-full ${isSent ? "justify-end" : "justify-start"} mb-2`, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-muted-foreground italic px-3 py-1", children: "Message deleted" }) });
|
|
1328
|
+
}
|
|
1329
|
+
const bubbleRadius = cn(
|
|
1330
|
+
"rounded-2xl",
|
|
1331
|
+
isSent && isLastOfRun && "rounded-br-md",
|
|
1332
|
+
!isSent && isLastOfRun && "rounded-bl-md"
|
|
1333
|
+
);
|
|
1334
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1335
|
+
"div",
|
|
1336
|
+
{
|
|
1337
|
+
className: cn(
|
|
1338
|
+
"flex w-full items-end",
|
|
1339
|
+
isLastOfRun ? "mb-2" : "mb-0.5",
|
|
1340
|
+
isSent ? "justify-end" : "justify-start"
|
|
1341
|
+
),
|
|
1342
|
+
onMouseEnter: () => setIsHovered(true),
|
|
1343
|
+
onMouseLeave: () => setIsHovered(false),
|
|
1344
|
+
children: [
|
|
1345
|
+
isSent && onDelete && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1346
|
+
"button",
|
|
1347
|
+
{
|
|
1348
|
+
onClick: onDelete,
|
|
1349
|
+
onFocus: () => setIsFocused(true),
|
|
1350
|
+
onBlur: () => setIsFocused(false),
|
|
1351
|
+
className: cn(
|
|
1352
|
+
"self-end p-1 mr-1 transition-opacity focus:outline-none focus-visible:ring-1 focus-visible:ring-ring rounded",
|
|
1353
|
+
showDeleteButton ? "opacity-100 text-destructive" : "opacity-0 text-muted-foreground"
|
|
1354
|
+
),
|
|
1355
|
+
"aria-label": "Delete message",
|
|
1356
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Trash2, { className: "w-3.5 h-3.5" })
|
|
1357
|
+
}
|
|
1358
|
+
),
|
|
1359
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col max-w-[80%] md:max-w-[60%]", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1360
|
+
"div",
|
|
1361
|
+
{
|
|
1362
|
+
className: cn(
|
|
1363
|
+
"px-3 py-1.5 break-words",
|
|
1364
|
+
bubbleRadius,
|
|
1365
|
+
isSent ? "bg-primary text-primary-foreground chat-bubble-sent" : "bg-card border border-primary"
|
|
1366
|
+
),
|
|
1367
|
+
children: [
|
|
1368
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm [&_.markdown-content]:space-y-1.5 [&_pre]:max-w-full [&_pre]:overflow-x-auto", children: renderMessage(message) }),
|
|
1369
|
+
isLastOfRun && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1370
|
+
"div",
|
|
1371
|
+
{
|
|
1372
|
+
className: cn(
|
|
1373
|
+
"flex items-center gap-1 mt-0.5",
|
|
1374
|
+
isSent ? "justify-end" : "justify-start"
|
|
1375
|
+
),
|
|
1376
|
+
children: [
|
|
1377
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1378
|
+
"span",
|
|
1379
|
+
{
|
|
1380
|
+
className: cn(
|
|
1381
|
+
"text-[11px] leading-none",
|
|
1382
|
+
isSent ? "text-primary-foreground/70" : "text-muted-foreground"
|
|
1383
|
+
),
|
|
1384
|
+
children: formatTimestamp(timestamp)
|
|
1385
|
+
}
|
|
1386
|
+
),
|
|
1387
|
+
isSent && (read ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckCheck, { className: "w-3.5 h-3.5 text-primary-foreground/80 flex-shrink-0" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "w-3.5 h-3.5 text-primary-foreground/60 flex-shrink-0" }))
|
|
1388
|
+
]
|
|
1389
|
+
}
|
|
1390
|
+
)
|
|
1391
|
+
]
|
|
1392
|
+
}
|
|
1393
|
+
) }),
|
|
1394
|
+
!isSent && onDelete && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1395
|
+
"button",
|
|
1396
|
+
{
|
|
1397
|
+
onClick: onDelete,
|
|
1398
|
+
onFocus: () => setIsFocused(true),
|
|
1399
|
+
onBlur: () => setIsFocused(false),
|
|
1400
|
+
className: cn(
|
|
1401
|
+
"self-end p-1 ml-1 transition-opacity focus:outline-none focus-visible:ring-1 focus-visible:ring-ring rounded",
|
|
1402
|
+
showDeleteButton ? "opacity-100 text-destructive" : "opacity-0 text-muted-foreground"
|
|
1403
|
+
),
|
|
1404
|
+
"aria-label": "Delete message",
|
|
1405
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Trash2, { className: "w-3.5 h-3.5" })
|
|
1406
|
+
}
|
|
1407
|
+
)
|
|
1408
|
+
]
|
|
1409
|
+
}
|
|
1410
|
+
);
|
|
1411
|
+
});
|
|
1412
|
+
var useArbiWsStore = zustand.create((set) => ({
|
|
1413
|
+
status: "disconnected",
|
|
1414
|
+
tasks: {},
|
|
1415
|
+
lastTaskUpdate: null,
|
|
1416
|
+
presence: {},
|
|
1417
|
+
setStatus: (status) => set({ status }),
|
|
1418
|
+
applyTaskUpdate: (msg) => set((s) => ({ tasks: { ...s.tasks, [msg.doc_ext_id]: msg }, lastTaskUpdate: msg })),
|
|
1419
|
+
applyPresence: (msg) => set((s) => ({ presence: { ...s.presence, [msg.user_id]: msg.status } })),
|
|
1420
|
+
reset: () => set({ status: "disconnected", tasks: {}, lastTaskUpdate: null, presence: {} })
|
|
1421
|
+
}));
|
|
1422
|
+
var ArbiWsContext = React.createContext(null);
|
|
1423
|
+
function useArbiWsContext() {
|
|
1424
|
+
const ctx = React.useContext(ArbiWsContext);
|
|
1425
|
+
if (!ctx) {
|
|
1426
|
+
throw new Error("useArbiWebSocket hooks must be used within an <ArbiWebSocketProvider>");
|
|
1427
|
+
}
|
|
1428
|
+
return ctx;
|
|
1429
|
+
}
|
|
1430
|
+
function ArbiWebSocketProvider({ enabled = true, children }) {
|
|
1431
|
+
const arbi = useArbi();
|
|
1432
|
+
const subscribersRef = React.useRef(/* @__PURE__ */ new Set());
|
|
1433
|
+
const setStatus = useArbiWsStore((s) => s.setStatus);
|
|
1434
|
+
const applyTaskUpdate = useArbiWsStore((s) => s.applyTaskUpdate);
|
|
1435
|
+
const applyPresence = useArbiWsStore((s) => s.applyPresence);
|
|
1436
|
+
const reset = useArbiWsStore((s) => s.reset);
|
|
1437
|
+
const context = React.useMemo(
|
|
1438
|
+
() => ({
|
|
1439
|
+
subscribe: (fn) => {
|
|
1440
|
+
subscribersRef.current.add(fn);
|
|
1441
|
+
return () => {
|
|
1442
|
+
subscribersRef.current.delete(fn);
|
|
1443
|
+
};
|
|
1444
|
+
}
|
|
1445
|
+
}),
|
|
1446
|
+
[]
|
|
1447
|
+
);
|
|
1448
|
+
React.useEffect(() => {
|
|
1449
|
+
if (!enabled) {
|
|
1450
|
+
reset();
|
|
1451
|
+
return;
|
|
1452
|
+
}
|
|
1453
|
+
let conn = null;
|
|
1454
|
+
let cancelled = false;
|
|
1455
|
+
const onMessage = (msg) => {
|
|
1456
|
+
if (client.isMessageType(msg, "task_update")) applyTaskUpdate(msg);
|
|
1457
|
+
else if (client.isMessageType(msg, "presence_update")) applyPresence(msg);
|
|
1458
|
+
for (const fn of subscribersRef.current) {
|
|
1459
|
+
try {
|
|
1460
|
+
fn(msg);
|
|
1461
|
+
} catch {
|
|
1462
|
+
}
|
|
1463
|
+
}
|
|
1464
|
+
};
|
|
1465
|
+
const start = async () => {
|
|
1466
|
+
const info = arbi.getConnectionInfo();
|
|
1467
|
+
if (!info) return;
|
|
1468
|
+
setStatus("connecting");
|
|
1469
|
+
try {
|
|
1470
|
+
const c = await browser.connectWithReconnect({
|
|
1471
|
+
baseUrl: info.baseUrl,
|
|
1472
|
+
accessToken: info.accessToken,
|
|
1473
|
+
// Resolve the freshest token on every (re)connect so rotation is picked up.
|
|
1474
|
+
getAccessToken: () => arbi.getConnectionInfo()?.accessToken ?? null,
|
|
1475
|
+
onMessage,
|
|
1476
|
+
onReconnecting: () => setStatus("reconnecting"),
|
|
1477
|
+
onReconnected: () => setStatus("connected"),
|
|
1478
|
+
onClose: () => {
|
|
1479
|
+
if (!cancelled) setStatus("reconnecting");
|
|
1480
|
+
}
|
|
1481
|
+
});
|
|
1482
|
+
if (cancelled) {
|
|
1483
|
+
c.close();
|
|
1484
|
+
return;
|
|
1485
|
+
}
|
|
1486
|
+
conn = c;
|
|
1487
|
+
setStatus("connected");
|
|
1488
|
+
} catch {
|
|
1489
|
+
setStatus("disconnected");
|
|
1490
|
+
}
|
|
1491
|
+
};
|
|
1492
|
+
void start();
|
|
1493
|
+
return () => {
|
|
1494
|
+
cancelled = true;
|
|
1495
|
+
conn?.close();
|
|
1496
|
+
reset();
|
|
1497
|
+
};
|
|
1498
|
+
}, [enabled, arbi, setStatus, applyTaskUpdate, applyPresence, reset]);
|
|
1499
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ArbiWsContext.Provider, { value: context, children });
|
|
1500
|
+
}
|
|
1501
|
+
function useArbiWebSocket(onMessage) {
|
|
1502
|
+
const { subscribe } = useArbiWsContext();
|
|
1503
|
+
const handlerRef = React.useRef(onMessage);
|
|
1504
|
+
handlerRef.current = onMessage;
|
|
1505
|
+
React.useEffect(() => subscribe((msg) => handlerRef.current(msg)), [subscribe]);
|
|
1506
|
+
}
|
|
1507
|
+
function useArbiWsMessage(type, handler) {
|
|
1508
|
+
const { subscribe } = useArbiWsContext();
|
|
1509
|
+
const handlerRef = React.useRef(handler);
|
|
1510
|
+
handlerRef.current = handler;
|
|
1511
|
+
React.useEffect(
|
|
1512
|
+
() => subscribe((msg) => {
|
|
1513
|
+
if (client.isMessageType(msg, type)) handlerRef.current(msg);
|
|
1514
|
+
}),
|
|
1515
|
+
[subscribe, type]
|
|
1516
|
+
);
|
|
1517
|
+
}
|
|
1518
|
+
function useArbiWsStatus() {
|
|
1519
|
+
return useArbiWsStore((s) => s.status);
|
|
1520
|
+
}
|
|
1521
|
+
function useArbiConnected() {
|
|
1522
|
+
return useArbiWsStore((s) => s.status === "connected");
|
|
1523
|
+
}
|
|
1524
|
+
function useArbiWsTasks() {
|
|
1525
|
+
return useArbiWsStore((s) => s.tasks);
|
|
1526
|
+
}
|
|
1527
|
+
function useArbiWsTask(docId) {
|
|
1528
|
+
return useArbiWsStore((s) => s.tasks[docId]);
|
|
1529
|
+
}
|
|
1530
|
+
var TERMINAL_STATUSES = /* @__PURE__ */ new Set([
|
|
1531
|
+
"completed",
|
|
1532
|
+
"failed",
|
|
1533
|
+
"skipped",
|
|
1534
|
+
"empty",
|
|
1535
|
+
"low-content"
|
|
1536
|
+
]);
|
|
1537
|
+
function useArbiDocumentSync(workspaceId) {
|
|
1538
|
+
const queryClient = reactQuery.useQueryClient();
|
|
1539
|
+
useArbiWebSocket((msg) => {
|
|
1540
|
+
if (!workspaceId) return;
|
|
1541
|
+
if (client.isMessageType(msg, "batch_complete")) {
|
|
1542
|
+
if (msg.workspace_ext_id !== workspaceId) return;
|
|
1543
|
+
void queryClient.invalidateQueries({ queryKey: arbiQueryKeys.documents(workspaceId) });
|
|
1544
|
+
void queryClient.invalidateQueries({ queryKey: arbiQueryKeys.tags(workspaceId) });
|
|
1545
|
+
return;
|
|
1546
|
+
}
|
|
1547
|
+
if (client.isMessageType(msg, "task_update")) {
|
|
1548
|
+
if (msg.workspace_ext_id !== workspaceId) return;
|
|
1549
|
+
if (TERMINAL_STATUSES.has(msg.status)) {
|
|
1550
|
+
void queryClient.invalidateQueries({ queryKey: arbiQueryKeys.documents(workspaceId) });
|
|
1551
|
+
}
|
|
1552
|
+
}
|
|
1553
|
+
});
|
|
1554
|
+
}
|
|
1273
1555
|
var TooltipContext = React__namespace.createContext(null);
|
|
1274
1556
|
var TooltipProvider = ({ children }) => /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
1275
1557
|
function Tooltip({ children, delayDuration = 300 }) {
|
|
@@ -1506,159 +1788,888 @@ var HoverCardContent = React__namespace.forwardRef(({ className, align = "center
|
|
|
1506
1788
|
}
|
|
1507
1789
|
) }));
|
|
1508
1790
|
HoverCardContent.displayName = HoverCardPrimitive__namespace.Content.displayName;
|
|
1509
|
-
|
|
1510
|
-
|
|
1791
|
+
var cardVariants = classVarianceAuthority.cva("rounded-lg bg-card text-card-foreground", {
|
|
1792
|
+
variants: {
|
|
1793
|
+
variant: {
|
|
1794
|
+
flat: "",
|
|
1795
|
+
outline: "border",
|
|
1796
|
+
elevated: "border shadow-sm"
|
|
1797
|
+
}
|
|
1798
|
+
},
|
|
1799
|
+
defaultVariants: {
|
|
1800
|
+
variant: "flat"
|
|
1801
|
+
}
|
|
1802
|
+
});
|
|
1803
|
+
var Card = React__namespace.forwardRef(
|
|
1804
|
+
({ className, variant, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1511
1805
|
"div",
|
|
1512
1806
|
{
|
|
1807
|
+
ref,
|
|
1513
1808
|
"data-slot": "card",
|
|
1514
|
-
className: cn(
|
|
1515
|
-
"rounded-xl border border-border bg-card text-card-foreground shadow-sm",
|
|
1516
|
-
className
|
|
1517
|
-
),
|
|
1809
|
+
className: cn(cardVariants({ variant }), className),
|
|
1518
1810
|
...props
|
|
1519
1811
|
}
|
|
1520
|
-
)
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1812
|
+
)
|
|
1813
|
+
);
|
|
1814
|
+
Card.displayName = "Card";
|
|
1815
|
+
var CardHeader = React__namespace.forwardRef(
|
|
1816
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1524
1817
|
"div",
|
|
1525
1818
|
{
|
|
1819
|
+
ref,
|
|
1526
1820
|
"data-slot": "card-header",
|
|
1527
|
-
className: cn("flex flex-col
|
|
1821
|
+
className: cn("flex flex-col space-y-1.5 p-6", className),
|
|
1528
1822
|
...props
|
|
1529
1823
|
}
|
|
1530
|
-
)
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1824
|
+
)
|
|
1825
|
+
);
|
|
1826
|
+
CardHeader.displayName = "CardHeader";
|
|
1827
|
+
var CardTitle = React__namespace.forwardRef(
|
|
1828
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1534
1829
|
"div",
|
|
1535
1830
|
{
|
|
1831
|
+
ref,
|
|
1536
1832
|
"data-slot": "card-title",
|
|
1537
|
-
className: cn("
|
|
1833
|
+
className: cn("font-semibold leading-none tracking-tight", className),
|
|
1538
1834
|
...props
|
|
1539
1835
|
}
|
|
1540
|
-
)
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1836
|
+
)
|
|
1837
|
+
);
|
|
1838
|
+
CardTitle.displayName = "CardTitle";
|
|
1839
|
+
var CardDescription = React__namespace.forwardRef(
|
|
1840
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1544
1841
|
"div",
|
|
1545
1842
|
{
|
|
1843
|
+
ref,
|
|
1546
1844
|
"data-slot": "card-description",
|
|
1547
1845
|
className: cn("text-sm text-muted-foreground", className),
|
|
1548
1846
|
...props
|
|
1549
1847
|
}
|
|
1550
|
-
)
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
}
|
|
1555
|
-
|
|
1556
|
-
|
|
1848
|
+
)
|
|
1849
|
+
);
|
|
1850
|
+
CardDescription.displayName = "CardDescription";
|
|
1851
|
+
var CardContent = React__namespace.forwardRef(
|
|
1852
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, "data-slot": "card-content", className: cn("p-6 pt-0", className), ...props })
|
|
1853
|
+
);
|
|
1854
|
+
CardContent.displayName = "CardContent";
|
|
1855
|
+
var CardFooter = React__namespace.forwardRef(
|
|
1856
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1557
1857
|
"div",
|
|
1558
1858
|
{
|
|
1859
|
+
ref,
|
|
1559
1860
|
"data-slot": "card-footer",
|
|
1560
1861
|
className: cn("flex items-center p-6 pt-0", className),
|
|
1561
1862
|
...props
|
|
1562
1863
|
}
|
|
1563
|
-
)
|
|
1564
|
-
|
|
1565
|
-
|
|
1864
|
+
)
|
|
1865
|
+
);
|
|
1866
|
+
CardFooter.displayName = "CardFooter";
|
|
1867
|
+
var Input = React__namespace.forwardRef(
|
|
1868
|
+
({ className, type, ...props }, ref) => {
|
|
1869
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1870
|
+
"input",
|
|
1871
|
+
{
|
|
1872
|
+
type,
|
|
1873
|
+
"data-slot": "input",
|
|
1874
|
+
className: cn(
|
|
1875
|
+
"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
1876
|
+
className
|
|
1877
|
+
),
|
|
1878
|
+
ref,
|
|
1879
|
+
...props
|
|
1880
|
+
}
|
|
1881
|
+
);
|
|
1882
|
+
}
|
|
1883
|
+
);
|
|
1884
|
+
Input.displayName = "Input";
|
|
1885
|
+
var Label = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1886
|
+
"label",
|
|
1887
|
+
{
|
|
1888
|
+
ref,
|
|
1889
|
+
className: `text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 ${className || ""}`,
|
|
1890
|
+
...props
|
|
1891
|
+
}
|
|
1892
|
+
));
|
|
1893
|
+
Label.displayName = "Label";
|
|
1894
|
+
var Separator = React__namespace.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1895
|
+
SeparatorPrimitive__namespace.Root,
|
|
1896
|
+
{
|
|
1897
|
+
ref,
|
|
1898
|
+
decorative,
|
|
1899
|
+
orientation,
|
|
1900
|
+
className: cn(
|
|
1901
|
+
"shrink-0 bg-border",
|
|
1902
|
+
orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
|
|
1903
|
+
className
|
|
1904
|
+
),
|
|
1905
|
+
...props
|
|
1906
|
+
}
|
|
1907
|
+
));
|
|
1908
|
+
Separator.displayName = SeparatorPrimitive__namespace.Root.displayName;
|
|
1909
|
+
var Textarea = React__namespace.forwardRef(
|
|
1910
|
+
({ className, ...props }, ref) => {
|
|
1911
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1912
|
+
"textarea",
|
|
1913
|
+
{
|
|
1914
|
+
className: cn(
|
|
1915
|
+
"flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
1916
|
+
className
|
|
1917
|
+
),
|
|
1918
|
+
ref,
|
|
1919
|
+
...props
|
|
1920
|
+
}
|
|
1921
|
+
);
|
|
1922
|
+
}
|
|
1923
|
+
);
|
|
1924
|
+
Textarea.displayName = "Textarea";
|
|
1925
|
+
var Collapsible = CollapsiblePrimitive__namespace.Root;
|
|
1926
|
+
var CollapsibleTrigger2 = CollapsiblePrimitive__namespace.CollapsibleTrigger;
|
|
1927
|
+
var CollapsibleContent2 = CollapsiblePrimitive__namespace.CollapsibleContent;
|
|
1928
|
+
var Progress = React__namespace.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1929
|
+
ProgressPrimitive__namespace.Root,
|
|
1930
|
+
{
|
|
1931
|
+
ref,
|
|
1932
|
+
className: cn("relative h-2 w-full overflow-hidden rounded-full bg-primary/20", className),
|
|
1933
|
+
...props,
|
|
1934
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1935
|
+
ProgressPrimitive__namespace.Indicator,
|
|
1936
|
+
{
|
|
1937
|
+
className: "h-full w-full flex-1 bg-primary transition-all",
|
|
1938
|
+
style: { transform: `translateX(-${100 - (value || 0)}%)` }
|
|
1939
|
+
}
|
|
1940
|
+
)
|
|
1941
|
+
}
|
|
1942
|
+
));
|
|
1943
|
+
Progress.displayName = ProgressPrimitive__namespace.Root.displayName;
|
|
1944
|
+
var ScrollArea = React__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1945
|
+
ScrollAreaPrimitive__namespace.Root,
|
|
1946
|
+
{
|
|
1947
|
+
ref,
|
|
1948
|
+
className: cn("relative overflow-hidden", className),
|
|
1949
|
+
...props,
|
|
1950
|
+
children: [
|
|
1951
|
+
/* @__PURE__ */ jsxRuntime.jsx(ScrollAreaPrimitive__namespace.Viewport, { className: "h-full w-full rounded-[inherit]", children }),
|
|
1952
|
+
/* @__PURE__ */ jsxRuntime.jsx(ScrollBar, {}),
|
|
1953
|
+
/* @__PURE__ */ jsxRuntime.jsx(ScrollAreaPrimitive__namespace.Corner, {})
|
|
1954
|
+
]
|
|
1955
|
+
}
|
|
1956
|
+
));
|
|
1957
|
+
ScrollArea.displayName = ScrollAreaPrimitive__namespace.Root.displayName;
|
|
1958
|
+
var ScrollBar = React__namespace.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1959
|
+
ScrollAreaPrimitive__namespace.ScrollAreaScrollbar,
|
|
1960
|
+
{
|
|
1961
|
+
ref,
|
|
1962
|
+
orientation,
|
|
1963
|
+
className: cn(
|
|
1964
|
+
"flex touch-none select-none transition-colors",
|
|
1965
|
+
orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
|
|
1966
|
+
orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
|
|
1967
|
+
className
|
|
1968
|
+
),
|
|
1969
|
+
...props,
|
|
1970
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(ScrollAreaPrimitive__namespace.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
|
|
1971
|
+
}
|
|
1972
|
+
));
|
|
1973
|
+
ScrollBar.displayName = ScrollAreaPrimitive__namespace.ScrollAreaScrollbar.displayName;
|
|
1974
|
+
var RadioGroup = React__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
1975
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RadioGroupPrimitive__namespace.Root, { className: cn("grid gap-2", className), ...props, ref });
|
|
1976
|
+
});
|
|
1977
|
+
RadioGroup.displayName = RadioGroupPrimitive__namespace.Root.displayName;
|
|
1978
|
+
var RadioGroupItem = React__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
1566
1979
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1567
|
-
|
|
1980
|
+
RadioGroupPrimitive__namespace.Item,
|
|
1568
1981
|
{
|
|
1569
|
-
|
|
1570
|
-
"data-slot": "input",
|
|
1982
|
+
ref,
|
|
1571
1983
|
className: cn(
|
|
1572
|
-
"
|
|
1573
|
-
"placeholder:text-muted-foreground/70",
|
|
1574
|
-
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 focus-visible:border-ring/60",
|
|
1575
|
-
"disabled:cursor-not-allowed disabled:opacity-50 file:border-0 file:bg-transparent file:text-sm file:font-medium",
|
|
1984
|
+
"aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
1576
1985
|
className
|
|
1577
1986
|
),
|
|
1578
|
-
...props
|
|
1987
|
+
...props,
|
|
1988
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(RadioGroupPrimitive__namespace.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Circle, { className: "h-2.5 w-2.5 fill-current text-current" }) })
|
|
1579
1989
|
}
|
|
1580
1990
|
);
|
|
1581
|
-
}
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1991
|
+
});
|
|
1992
|
+
RadioGroupItem.displayName = RadioGroupPrimitive__namespace.Item.displayName;
|
|
1993
|
+
var Checkbox = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1994
|
+
CheckboxPrimitive__namespace.Root,
|
|
1995
|
+
{
|
|
1996
|
+
ref,
|
|
1997
|
+
className: cn(
|
|
1998
|
+
"peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
|
|
1999
|
+
className
|
|
2000
|
+
),
|
|
2001
|
+
...props,
|
|
2002
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(CheckboxPrimitive__namespace.Indicator, { className: cn("flex items-center justify-center text-current"), children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-4 w-4" }) })
|
|
2003
|
+
}
|
|
2004
|
+
));
|
|
2005
|
+
Checkbox.displayName = CheckboxPrimitive__namespace.Root.displayName;
|
|
2006
|
+
var Switch = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2007
|
+
SwitchPrimitives__namespace.Root,
|
|
2008
|
+
{
|
|
2009
|
+
className: cn(
|
|
2010
|
+
"peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
|
|
2011
|
+
className
|
|
2012
|
+
),
|
|
2013
|
+
...props,
|
|
2014
|
+
ref,
|
|
2015
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2016
|
+
SwitchPrimitives__namespace.Thumb,
|
|
2017
|
+
{
|
|
2018
|
+
className: cn(
|
|
2019
|
+
"pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"
|
|
2020
|
+
)
|
|
2021
|
+
}
|
|
2022
|
+
)
|
|
2023
|
+
}
|
|
2024
|
+
));
|
|
2025
|
+
Switch.displayName = SwitchPrimitives__namespace.Root.displayName;
|
|
2026
|
+
var Tabs = TabsPrimitive__namespace.Root;
|
|
2027
|
+
var TabsList = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2028
|
+
TabsPrimitive__namespace.List,
|
|
2029
|
+
{
|
|
2030
|
+
ref,
|
|
2031
|
+
className: cn(
|
|
2032
|
+
"inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",
|
|
2033
|
+
className
|
|
2034
|
+
),
|
|
2035
|
+
...props
|
|
2036
|
+
}
|
|
2037
|
+
));
|
|
2038
|
+
TabsList.displayName = TabsPrimitive__namespace.List.displayName;
|
|
2039
|
+
var TabsTrigger = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2040
|
+
TabsPrimitive__namespace.Trigger,
|
|
2041
|
+
{
|
|
2042
|
+
ref,
|
|
2043
|
+
className: cn(
|
|
2044
|
+
"inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",
|
|
2045
|
+
className
|
|
2046
|
+
),
|
|
2047
|
+
...props
|
|
2048
|
+
}
|
|
2049
|
+
));
|
|
2050
|
+
TabsTrigger.displayName = TabsPrimitive__namespace.Trigger.displayName;
|
|
2051
|
+
var TabsContent = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2052
|
+
TabsPrimitive__namespace.Content,
|
|
2053
|
+
{
|
|
2054
|
+
ref,
|
|
2055
|
+
className: cn(
|
|
2056
|
+
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
2057
|
+
className
|
|
2058
|
+
),
|
|
2059
|
+
...props
|
|
2060
|
+
}
|
|
2061
|
+
));
|
|
2062
|
+
TabsContent.displayName = TabsPrimitive__namespace.Content.displayName;
|
|
2063
|
+
var Table = React__namespace.forwardRef(
|
|
2064
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsxRuntime.jsx("table", { ref, className: cn("w-full caption-bottom text-sm", className), ...props }) })
|
|
2065
|
+
);
|
|
2066
|
+
Table.displayName = "Table";
|
|
2067
|
+
var TableHeader = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
|
|
2068
|
+
TableHeader.displayName = "TableHeader";
|
|
2069
|
+
var TableBody = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("tbody", { ref, className: cn("[&_tr:last-child]:border-0", className), ...props }));
|
|
2070
|
+
TableBody.displayName = "TableBody";
|
|
2071
|
+
var TableFooter = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2072
|
+
"tfoot",
|
|
2073
|
+
{
|
|
2074
|
+
ref,
|
|
2075
|
+
className: cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className),
|
|
2076
|
+
...props
|
|
2077
|
+
}
|
|
2078
|
+
));
|
|
2079
|
+
TableFooter.displayName = "TableFooter";
|
|
2080
|
+
var TableRow = React__namespace.forwardRef(
|
|
2081
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2082
|
+
"tr",
|
|
2083
|
+
{
|
|
2084
|
+
ref,
|
|
2085
|
+
className: cn(
|
|
2086
|
+
"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
|
|
2087
|
+
className
|
|
2088
|
+
),
|
|
2089
|
+
...props
|
|
2090
|
+
}
|
|
2091
|
+
)
|
|
2092
|
+
);
|
|
2093
|
+
TableRow.displayName = "TableRow";
|
|
2094
|
+
var TableHead = React__namespace.forwardRef(
|
|
2095
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2096
|
+
"th",
|
|
2097
|
+
{
|
|
2098
|
+
ref,
|
|
2099
|
+
className: cn(
|
|
2100
|
+
"h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
2101
|
+
className
|
|
2102
|
+
),
|
|
2103
|
+
...props
|
|
2104
|
+
}
|
|
2105
|
+
)
|
|
2106
|
+
);
|
|
2107
|
+
TableHead.displayName = "TableHead";
|
|
2108
|
+
var TableCell = React__namespace.forwardRef(
|
|
2109
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2110
|
+
"td",
|
|
2111
|
+
{
|
|
2112
|
+
ref,
|
|
2113
|
+
className: cn(
|
|
2114
|
+
"p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
2115
|
+
className
|
|
2116
|
+
),
|
|
2117
|
+
...props
|
|
2118
|
+
}
|
|
2119
|
+
)
|
|
2120
|
+
);
|
|
2121
|
+
TableCell.displayName = "TableCell";
|
|
2122
|
+
var TableCaption = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("caption", { ref, className: cn("mt-4 text-sm text-muted-foreground", className), ...props }));
|
|
2123
|
+
TableCaption.displayName = "TableCaption";
|
|
2124
|
+
var Slider = React__namespace.forwardRef(
|
|
2125
|
+
({ className, rangeClassName, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2126
|
+
SliderPrimitive__namespace.Root,
|
|
2127
|
+
{
|
|
2128
|
+
ref,
|
|
2129
|
+
className: cn("relative flex w-full touch-none select-none items-center", className),
|
|
2130
|
+
...props,
|
|
2131
|
+
children: [
|
|
2132
|
+
/* @__PURE__ */ jsxRuntime.jsx(SliderPrimitive__namespace.Track, { className: "relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20", children: /* @__PURE__ */ jsxRuntime.jsx(SliderPrimitive__namespace.Range, { className: cn("absolute h-full bg-primary", rangeClassName) }) }),
|
|
2133
|
+
/* @__PURE__ */ jsxRuntime.jsx(SliderPrimitive__namespace.Thumb, { className: "block h-4 w-4 rounded-full border border-primary/50 bg-background shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50" })
|
|
2134
|
+
]
|
|
2135
|
+
}
|
|
2136
|
+
)
|
|
2137
|
+
);
|
|
2138
|
+
Slider.displayName = SliderPrimitive__namespace.Root.displayName;
|
|
2139
|
+
var toggleVariants = classVarianceAuthority.cva(
|
|
2140
|
+
"inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
2141
|
+
{
|
|
2142
|
+
variants: {
|
|
2143
|
+
variant: {
|
|
2144
|
+
default: "bg-transparent",
|
|
2145
|
+
outline: "border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"
|
|
2146
|
+
},
|
|
2147
|
+
size: {
|
|
2148
|
+
default: "h-9 px-2 min-w-9",
|
|
2149
|
+
sm: "h-8 px-1.5 min-w-8",
|
|
2150
|
+
lg: "h-10 px-2.5 min-w-10"
|
|
2151
|
+
}
|
|
2152
|
+
},
|
|
2153
|
+
defaultVariants: {
|
|
2154
|
+
variant: "default",
|
|
2155
|
+
size: "default"
|
|
2156
|
+
}
|
|
2157
|
+
}
|
|
2158
|
+
);
|
|
2159
|
+
var Toggle = React__namespace.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2160
|
+
TogglePrimitive__namespace.Root,
|
|
2161
|
+
{
|
|
2162
|
+
ref,
|
|
2163
|
+
className: cn(toggleVariants({ variant, size, className })),
|
|
2164
|
+
...props
|
|
2165
|
+
}
|
|
2166
|
+
));
|
|
2167
|
+
Toggle.displayName = TogglePrimitive__namespace.Root.displayName;
|
|
2168
|
+
var ToggleGroupContext = React__namespace.createContext({
|
|
2169
|
+
size: "default",
|
|
2170
|
+
variant: "default"
|
|
2171
|
+
});
|
|
2172
|
+
var ToggleGroup = React__namespace.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2173
|
+
ToggleGroupPrimitive__namespace.Root,
|
|
2174
|
+
{
|
|
2175
|
+
ref,
|
|
2176
|
+
className: cn("flex items-center justify-center gap-1", className),
|
|
2177
|
+
...props,
|
|
2178
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(ToggleGroupContext.Provider, { value: { variant, size }, children })
|
|
2179
|
+
}
|
|
2180
|
+
));
|
|
2181
|
+
ToggleGroup.displayName = ToggleGroupPrimitive__namespace.Root.displayName;
|
|
2182
|
+
var ToggleGroupItem = React__namespace.forwardRef(({ className, children, variant, size, ...props }, ref) => {
|
|
2183
|
+
const context = React__namespace.useContext(ToggleGroupContext);
|
|
2184
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2185
|
+
ToggleGroupPrimitive__namespace.Item,
|
|
2186
|
+
{
|
|
2187
|
+
ref,
|
|
2188
|
+
className: cn(
|
|
2189
|
+
toggleVariants({
|
|
2190
|
+
variant: context.variant || variant,
|
|
2191
|
+
size: context.size || size
|
|
2192
|
+
}),
|
|
2193
|
+
className
|
|
2194
|
+
),
|
|
2195
|
+
...props,
|
|
2196
|
+
children
|
|
2197
|
+
}
|
|
2198
|
+
);
|
|
2199
|
+
});
|
|
2200
|
+
ToggleGroupItem.displayName = ToggleGroupPrimitive__namespace.Item.displayName;
|
|
2201
|
+
var Dialog = DialogPrimitive__namespace.Root;
|
|
2202
|
+
var DialogTrigger = DialogPrimitive__namespace.Trigger;
|
|
2203
|
+
var DialogPortal = DialogPrimitive__namespace.Portal;
|
|
2204
|
+
var DialogClose = DialogPrimitive__namespace.Close;
|
|
2205
|
+
var DialogOverlay = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2206
|
+
DialogPrimitive__namespace.Overlay,
|
|
2207
|
+
{
|
|
2208
|
+
ref,
|
|
2209
|
+
className: cn(
|
|
2210
|
+
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
2211
|
+
className
|
|
2212
|
+
),
|
|
2213
|
+
...props
|
|
2214
|
+
}
|
|
2215
|
+
));
|
|
2216
|
+
DialogOverlay.displayName = DialogPrimitive__namespace.Overlay.displayName;
|
|
2217
|
+
var DialogContent = React__namespace.forwardRef(({ className, children, hideCloseButton, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { children: [
|
|
2218
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogOverlay, {}),
|
|
2219
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2220
|
+
DialogPrimitive__namespace.Content,
|
|
2221
|
+
{
|
|
2222
|
+
ref,
|
|
2223
|
+
className: cn(
|
|
2224
|
+
"fixed left-[50%] top-[50%] z-50 grid w-[calc(100%-2rem)] max-w-lg max-h-[90vh] translate-x-[-50%] translate-y-[-50%] gap-4 overflow-y-auto border bg-background p-6 shadow-lg duration-200 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 rounded-md",
|
|
2225
|
+
className
|
|
2226
|
+
),
|
|
2227
|
+
...props,
|
|
2228
|
+
children: [
|
|
2229
|
+
children,
|
|
2230
|
+
!hideCloseButton && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2231
|
+
DialogPrimitive__namespace.Close,
|
|
2232
|
+
{
|
|
2233
|
+
className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",
|
|
2234
|
+
"data-testid": "dialog-close-button",
|
|
2235
|
+
children: [
|
|
2236
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4" }),
|
|
2237
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close dialog" })
|
|
2238
|
+
]
|
|
2239
|
+
}
|
|
2240
|
+
)
|
|
2241
|
+
]
|
|
2242
|
+
}
|
|
2243
|
+
)
|
|
2244
|
+
] }));
|
|
2245
|
+
DialogContent.displayName = DialogPrimitive__namespace.Content.displayName;
|
|
2246
|
+
var DialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className), ...props });
|
|
2247
|
+
DialogHeader.displayName = "DialogHeader";
|
|
2248
|
+
var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2249
|
+
"div",
|
|
2250
|
+
{
|
|
2251
|
+
className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className),
|
|
2252
|
+
...props
|
|
2253
|
+
}
|
|
2254
|
+
);
|
|
2255
|
+
DialogFooter.displayName = "DialogFooter";
|
|
2256
|
+
var DialogTitle = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2257
|
+
DialogPrimitive__namespace.Title,
|
|
2258
|
+
{
|
|
2259
|
+
ref,
|
|
2260
|
+
className: cn("text-lg font-semibold leading-none tracking-tight", className),
|
|
2261
|
+
...props
|
|
2262
|
+
}
|
|
2263
|
+
));
|
|
2264
|
+
DialogTitle.displayName = DialogPrimitive__namespace.Title.displayName;
|
|
2265
|
+
var DialogDescription = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2266
|
+
DialogPrimitive__namespace.Description,
|
|
2267
|
+
{
|
|
2268
|
+
ref,
|
|
2269
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
2270
|
+
...props
|
|
2271
|
+
}
|
|
2272
|
+
));
|
|
2273
|
+
DialogDescription.displayName = DialogPrimitive__namespace.Description.displayName;
|
|
2274
|
+
var Popover = PopoverPrimitive__namespace.Root;
|
|
2275
|
+
var PopoverTrigger = PopoverPrimitive__namespace.Trigger;
|
|
2276
|
+
var PopoverAnchor = PopoverPrimitive__namespace.Anchor;
|
|
2277
|
+
var PopoverContent = React__namespace.forwardRef(({ className, align = "center", sideOffset = 4, container, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { container: container ?? void 0, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2278
|
+
PopoverPrimitive__namespace.Content,
|
|
2279
|
+
{
|
|
2280
|
+
ref,
|
|
2281
|
+
align,
|
|
2282
|
+
sideOffset,
|
|
2283
|
+
className: cn(
|
|
2284
|
+
"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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 origin-[--radix-popover-content-transform-origin]",
|
|
2285
|
+
className
|
|
2286
|
+
),
|
|
2287
|
+
...props
|
|
2288
|
+
}
|
|
2289
|
+
) }));
|
|
2290
|
+
PopoverContent.displayName = PopoverPrimitive__namespace.Content.displayName;
|
|
2291
|
+
var DropdownMenu = DropdownMenuPrimitive__namespace.Root;
|
|
2292
|
+
var DropdownMenuTrigger = DropdownMenuPrimitive__namespace.Trigger;
|
|
2293
|
+
var DropdownMenuGroup = DropdownMenuPrimitive__namespace.Group;
|
|
2294
|
+
var DropdownMenuPortal = DropdownMenuPrimitive__namespace.Portal;
|
|
2295
|
+
var DropdownMenuSub = DropdownMenuPrimitive__namespace.Sub;
|
|
2296
|
+
var DropdownMenuRadioGroup = DropdownMenuPrimitive__namespace.RadioGroup;
|
|
2297
|
+
var DropdownMenuSubTrigger = React__namespace.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2298
|
+
DropdownMenuPrimitive__namespace.SubTrigger,
|
|
2299
|
+
{
|
|
2300
|
+
ref,
|
|
2301
|
+
className: cn(
|
|
2302
|
+
"flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
2303
|
+
inset && "pl-8",
|
|
2304
|
+
className
|
|
2305
|
+
),
|
|
2306
|
+
...props,
|
|
2307
|
+
children: [
|
|
2308
|
+
children,
|
|
2309
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "ml-auto" })
|
|
2310
|
+
]
|
|
2311
|
+
}
|
|
2312
|
+
));
|
|
2313
|
+
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive__namespace.SubTrigger.displayName;
|
|
2314
|
+
var DropdownMenuSubContent = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2315
|
+
DropdownMenuPrimitive__namespace.SubContent,
|
|
2316
|
+
{
|
|
2317
|
+
ref,
|
|
2318
|
+
className: cn(
|
|
2319
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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 origin-[--radix-dropdown-menu-content-transform-origin]",
|
|
2320
|
+
className
|
|
2321
|
+
),
|
|
2322
|
+
...props
|
|
2323
|
+
}
|
|
2324
|
+
));
|
|
2325
|
+
DropdownMenuSubContent.displayName = DropdownMenuPrimitive__namespace.SubContent.displayName;
|
|
2326
|
+
var DropdownMenuContent = React__namespace.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2327
|
+
DropdownMenuPrimitive__namespace.Content,
|
|
2328
|
+
{
|
|
2329
|
+
ref,
|
|
2330
|
+
sideOffset,
|
|
2331
|
+
className: cn(
|
|
2332
|
+
"z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
|
|
2333
|
+
"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 origin-[--radix-dropdown-menu-content-transform-origin]",
|
|
2334
|
+
className
|
|
2335
|
+
),
|
|
2336
|
+
...props
|
|
2337
|
+
}
|
|
2338
|
+
) }));
|
|
2339
|
+
DropdownMenuContent.displayName = DropdownMenuPrimitive__namespace.Content.displayName;
|
|
2340
|
+
var DropdownMenuItem = React__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2341
|
+
DropdownMenuPrimitive__namespace.Item,
|
|
2342
|
+
{
|
|
2343
|
+
ref,
|
|
2344
|
+
className: cn(
|
|
2345
|
+
"relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
2346
|
+
inset && "pl-8",
|
|
2347
|
+
className
|
|
2348
|
+
),
|
|
2349
|
+
...props
|
|
2350
|
+
}
|
|
2351
|
+
));
|
|
2352
|
+
DropdownMenuItem.displayName = DropdownMenuPrimitive__namespace.Item.displayName;
|
|
2353
|
+
var DropdownMenuCheckboxItem = React__namespace.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2354
|
+
DropdownMenuPrimitive__namespace.CheckboxItem,
|
|
2355
|
+
{
|
|
2356
|
+
ref,
|
|
2357
|
+
className: cn(
|
|
2358
|
+
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
2359
|
+
className
|
|
2360
|
+
),
|
|
2361
|
+
checked,
|
|
2362
|
+
...props,
|
|
2363
|
+
children: [
|
|
2364
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute left-2 flex h-4 w-4 items-center justify-center rounded border border-border bg-popover", children: /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-3.5 w-3.5 text-primary" }) }) }),
|
|
2365
|
+
children
|
|
2366
|
+
]
|
|
2367
|
+
}
|
|
2368
|
+
));
|
|
2369
|
+
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive__namespace.CheckboxItem.displayName;
|
|
2370
|
+
var DropdownMenuRadioItem = React__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2371
|
+
DropdownMenuPrimitive__namespace.RadioItem,
|
|
2372
|
+
{
|
|
2373
|
+
ref,
|
|
2374
|
+
className: cn(
|
|
2375
|
+
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
2376
|
+
className
|
|
2377
|
+
),
|
|
2378
|
+
...props,
|
|
2379
|
+
children: [
|
|
2380
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Circle, { className: "h-2 w-2 fill-current" }) }) }),
|
|
2381
|
+
children
|
|
2382
|
+
]
|
|
2383
|
+
}
|
|
2384
|
+
));
|
|
2385
|
+
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive__namespace.RadioItem.displayName;
|
|
2386
|
+
var DropdownMenuLabel = React__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2387
|
+
DropdownMenuPrimitive__namespace.Label,
|
|
2388
|
+
{
|
|
2389
|
+
ref,
|
|
2390
|
+
className: cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className),
|
|
2391
|
+
...props
|
|
2392
|
+
}
|
|
2393
|
+
));
|
|
2394
|
+
DropdownMenuLabel.displayName = DropdownMenuPrimitive__namespace.Label.displayName;
|
|
2395
|
+
var DropdownMenuSeparator = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2396
|
+
DropdownMenuPrimitive__namespace.Separator,
|
|
2397
|
+
{
|
|
2398
|
+
ref,
|
|
2399
|
+
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
2400
|
+
...props
|
|
2401
|
+
}
|
|
2402
|
+
));
|
|
2403
|
+
DropdownMenuSeparator.displayName = DropdownMenuPrimitive__namespace.Separator.displayName;
|
|
2404
|
+
var DropdownMenuShortcut = ({ className, ...props }) => {
|
|
2405
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("ml-auto text-sm tracking-widest opacity-60", className), ...props });
|
|
2406
|
+
};
|
|
2407
|
+
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
2408
|
+
var Select = SelectPrimitive__namespace.Root;
|
|
2409
|
+
var SelectGroup = SelectPrimitive__namespace.Group;
|
|
2410
|
+
var SelectValue = SelectPrimitive__namespace.Value;
|
|
2411
|
+
var SelectTrigger = React__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2412
|
+
SelectPrimitive__namespace.Trigger,
|
|
2413
|
+
{
|
|
2414
|
+
ref,
|
|
2415
|
+
className: cn(
|
|
2416
|
+
"flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
2417
|
+
className
|
|
2418
|
+
),
|
|
2419
|
+
...props,
|
|
2420
|
+
children: [
|
|
2421
|
+
children,
|
|
2422
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Icon, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "h-4 w-4 opacity-50" }) })
|
|
2423
|
+
]
|
|
2424
|
+
}
|
|
2425
|
+
));
|
|
2426
|
+
SelectTrigger.displayName = SelectPrimitive__namespace.Trigger.displayName;
|
|
2427
|
+
var SelectScrollUpButton = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2428
|
+
SelectPrimitive__namespace.ScrollUpButton,
|
|
2429
|
+
{
|
|
2430
|
+
ref,
|
|
2431
|
+
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
2432
|
+
...props,
|
|
2433
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronUp, { className: "h-4 w-4" })
|
|
2434
|
+
}
|
|
2435
|
+
));
|
|
2436
|
+
SelectScrollUpButton.displayName = SelectPrimitive__namespace.ScrollUpButton.displayName;
|
|
2437
|
+
var SelectScrollDownButton = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2438
|
+
SelectPrimitive__namespace.ScrollDownButton,
|
|
2439
|
+
{
|
|
2440
|
+
ref,
|
|
2441
|
+
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
2442
|
+
...props,
|
|
2443
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "h-4 w-4" })
|
|
2444
|
+
}
|
|
2445
|
+
));
|
|
2446
|
+
SelectScrollDownButton.displayName = SelectPrimitive__namespace.ScrollDownButton.displayName;
|
|
2447
|
+
var SelectContent = React__namespace.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2448
|
+
SelectPrimitive__namespace.Content,
|
|
2449
|
+
{
|
|
2450
|
+
ref,
|
|
2451
|
+
className: cn(
|
|
2452
|
+
"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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",
|
|
2453
|
+
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",
|
|
2454
|
+
className
|
|
2455
|
+
),
|
|
2456
|
+
position,
|
|
2457
|
+
...props,
|
|
2458
|
+
children: [
|
|
2459
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectScrollUpButton, {}),
|
|
2460
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2461
|
+
SelectPrimitive__namespace.Viewport,
|
|
2462
|
+
{
|
|
2463
|
+
className: cn(
|
|
2464
|
+
"p-1",
|
|
2465
|
+
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
|
|
2466
|
+
),
|
|
2467
|
+
children
|
|
2468
|
+
}
|
|
2469
|
+
),
|
|
2470
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectScrollDownButton, {})
|
|
2471
|
+
]
|
|
2472
|
+
}
|
|
2473
|
+
) }));
|
|
2474
|
+
SelectContent.displayName = SelectPrimitive__namespace.Content.displayName;
|
|
2475
|
+
var SelectLabel = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2476
|
+
SelectPrimitive__namespace.Label,
|
|
2477
|
+
{
|
|
2478
|
+
ref,
|
|
2479
|
+
className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className),
|
|
2480
|
+
...props
|
|
2481
|
+
}
|
|
2482
|
+
));
|
|
2483
|
+
SelectLabel.displayName = SelectPrimitive__namespace.Label.displayName;
|
|
2484
|
+
var SelectItem = React__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2485
|
+
SelectPrimitive__namespace.Item,
|
|
2486
|
+
{
|
|
2487
|
+
ref,
|
|
2488
|
+
className: cn(
|
|
2489
|
+
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
2490
|
+
className
|
|
2491
|
+
),
|
|
2492
|
+
...props,
|
|
2493
|
+
children: [
|
|
2494
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-4 w-4" }) }) }),
|
|
2495
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.ItemText, { children })
|
|
2496
|
+
]
|
|
2497
|
+
}
|
|
2498
|
+
));
|
|
2499
|
+
SelectItem.displayName = SelectPrimitive__namespace.Item.displayName;
|
|
2500
|
+
var SelectSeparator = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2501
|
+
SelectPrimitive__namespace.Separator,
|
|
2502
|
+
{
|
|
2503
|
+
ref,
|
|
2504
|
+
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
2505
|
+
...props
|
|
2506
|
+
}
|
|
2507
|
+
));
|
|
2508
|
+
SelectSeparator.displayName = SelectPrimitive__namespace.Separator.displayName;
|
|
2509
|
+
var Command = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2510
|
+
cmdk.Command,
|
|
2511
|
+
{
|
|
2512
|
+
ref,
|
|
2513
|
+
className: cn(
|
|
2514
|
+
"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
|
|
2515
|
+
className
|
|
2516
|
+
),
|
|
2517
|
+
...props
|
|
2518
|
+
}
|
|
2519
|
+
));
|
|
2520
|
+
Command.displayName = cmdk.Command.displayName;
|
|
2521
|
+
var CommandDialog = ({ children, ...props }) => {
|
|
2522
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Dialog, { ...props, children: /* @__PURE__ */ jsxRuntime.jsx(DialogContent, { className: "overflow-hidden p-0", children: /* @__PURE__ */ jsxRuntime.jsx(Command, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children }) }) });
|
|
2523
|
+
};
|
|
2524
|
+
var CommandInput = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center border-b px-3", "data-cmdk-input-wrapper": "", children: [
|
|
2525
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
2526
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2527
|
+
cmdk.Command.Input,
|
|
2528
|
+
{
|
|
2529
|
+
ref,
|
|
2530
|
+
className: cn(
|
|
2531
|
+
"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
|
2532
|
+
className
|
|
2533
|
+
),
|
|
2534
|
+
...props
|
|
2535
|
+
}
|
|
2536
|
+
)
|
|
2537
|
+
] }));
|
|
2538
|
+
CommandInput.displayName = cmdk.Command.Input.displayName;
|
|
2539
|
+
var CommandList = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2540
|
+
cmdk.Command.List,
|
|
2541
|
+
{
|
|
2542
|
+
ref,
|
|
2543
|
+
className: cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className),
|
|
2544
|
+
...props
|
|
2545
|
+
}
|
|
2546
|
+
));
|
|
2547
|
+
CommandList.displayName = cmdk.Command.List.displayName;
|
|
2548
|
+
var CommandEmpty = React__namespace.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntime.jsx(cmdk.Command.Empty, { ref, className: "py-6 text-center text-sm", ...props }));
|
|
2549
|
+
CommandEmpty.displayName = cmdk.Command.Empty.displayName;
|
|
2550
|
+
var CommandGroup = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2551
|
+
cmdk.Command.Group,
|
|
2552
|
+
{
|
|
2553
|
+
ref,
|
|
2554
|
+
className: cn(
|
|
2555
|
+
"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-sm [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
|
|
2556
|
+
className
|
|
2557
|
+
),
|
|
2558
|
+
...props
|
|
2559
|
+
}
|
|
2560
|
+
));
|
|
2561
|
+
CommandGroup.displayName = cmdk.Command.Group.displayName;
|
|
2562
|
+
var CommandSeparator = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2563
|
+
cmdk.Command.Separator,
|
|
2564
|
+
{
|
|
2565
|
+
ref,
|
|
2566
|
+
className: cn("-mx-1 h-px bg-border", className),
|
|
2567
|
+
...props
|
|
2568
|
+
}
|
|
2569
|
+
));
|
|
2570
|
+
CommandSeparator.displayName = cmdk.Command.Separator.displayName;
|
|
2571
|
+
var CommandItem = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2572
|
+
cmdk.Command.Item,
|
|
2573
|
+
{
|
|
2574
|
+
ref,
|
|
2575
|
+
className: cn(
|
|
2576
|
+
"relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
2577
|
+
className
|
|
2578
|
+
),
|
|
2579
|
+
...props
|
|
2580
|
+
}
|
|
2581
|
+
));
|
|
2582
|
+
CommandItem.displayName = cmdk.Command.Item.displayName;
|
|
2583
|
+
var CommandShortcut = ({ className, ...props }) => {
|
|
2584
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2585
|
+
"span",
|
|
2586
|
+
{
|
|
2587
|
+
className: cn("ml-auto text-sm tracking-widest text-muted-foreground", className),
|
|
2588
|
+
...props
|
|
2589
|
+
}
|
|
2590
|
+
);
|
|
2591
|
+
};
|
|
2592
|
+
CommandShortcut.displayName = "CommandShortcut";
|
|
2593
|
+
function useWorkspaceDocs(workspaceId) {
|
|
2594
|
+
const { data: docs = [], isLoading, isError } = useDocuments(workspaceId);
|
|
2595
|
+
const docIds = React.useMemo(
|
|
2596
|
+
() => docs.map((d) => d.external_id).filter((id) => !!id),
|
|
2597
|
+
[docs]
|
|
2598
|
+
);
|
|
2599
|
+
return { wsId: workspaceId, docs, docIds, isLoading, isError, ready: docIds.length > 0 };
|
|
2600
|
+
}
|
|
2601
|
+
function useAiTask() {
|
|
2602
|
+
const mutation = useAssistantQuery();
|
|
2603
|
+
const [status, setStatus] = React.useState("idle");
|
|
2604
|
+
const [text, setText] = React.useState("");
|
|
2605
|
+
const [stepCount, setStepCount] = React.useState(0);
|
|
2606
|
+
const [error, setError] = React.useState(null);
|
|
2607
|
+
const [responseId, setResponseId] = React.useState(null);
|
|
2608
|
+
const [artifacts, setArtifacts] = React.useState([]);
|
|
2609
|
+
const bufferRef = React.useRef("");
|
|
2610
|
+
const artifactsRef = React.useRef(/* @__PURE__ */ new Map());
|
|
2611
|
+
const reset = React.useCallback(() => {
|
|
2612
|
+
setStatus("idle");
|
|
2613
|
+
setText("");
|
|
2614
|
+
setStepCount(0);
|
|
2615
|
+
setError(null);
|
|
2616
|
+
setResponseId(null);
|
|
2617
|
+
setArtifacts([]);
|
|
2618
|
+
artifactsRef.current = /* @__PURE__ */ new Map();
|
|
2619
|
+
bufferRef.current = "";
|
|
2620
|
+
}, []);
|
|
2621
|
+
const run = React.useCallback(
|
|
2622
|
+
async (question, docIds, opts) => {
|
|
2623
|
+
setStatus("running");
|
|
2624
|
+
setText("");
|
|
2625
|
+
setStepCount(0);
|
|
2626
|
+
setError(null);
|
|
2627
|
+
setArtifacts([]);
|
|
2628
|
+
artifactsRef.current = /* @__PURE__ */ new Map();
|
|
2629
|
+
bufferRef.current = "";
|
|
2630
|
+
let streamError = null;
|
|
2631
|
+
try {
|
|
2632
|
+
const result = await mutation.mutateAsync({
|
|
2633
|
+
question,
|
|
2634
|
+
docIds,
|
|
2635
|
+
previousResponseId: opts?.previousResponseId ?? void 0,
|
|
2636
|
+
model: opts?.model,
|
|
2637
|
+
onToken: (c) => {
|
|
2638
|
+
bufferRef.current += c;
|
|
2639
|
+
setText(bufferRef.current);
|
|
2640
|
+
},
|
|
2641
|
+
onAgentStep: () => setStepCount((n) => n + 1),
|
|
2642
|
+
onArtifact: (a) => {
|
|
2643
|
+
artifactsRef.current.set(a.doc_ext_id, a);
|
|
2644
|
+
setArtifacts([...artifactsRef.current.values()]);
|
|
2645
|
+
},
|
|
2646
|
+
onError: (m) => {
|
|
2647
|
+
streamError = m;
|
|
2648
|
+
}
|
|
2649
|
+
});
|
|
2650
|
+
const finalText = result.text || bufferRef.current;
|
|
2651
|
+
setText(finalText);
|
|
2652
|
+
setResponseId(result.assistantMessageExtId);
|
|
2653
|
+
setStepCount(result.agentSteps.length || 0);
|
|
2654
|
+
if (result.artifacts?.length) {
|
|
2655
|
+
for (const a of result.artifacts) artifactsRef.current.set(a.doc_ext_id, a);
|
|
2656
|
+
setArtifacts([...artifactsRef.current.values()]);
|
|
2657
|
+
}
|
|
2658
|
+
const err = streamError || result.errors[0] || null;
|
|
2659
|
+
if (err && !finalText) {
|
|
2660
|
+
setError(err);
|
|
2661
|
+
setStatus("error");
|
|
2662
|
+
} else {
|
|
2663
|
+
setStatus("done");
|
|
2664
|
+
}
|
|
2665
|
+
return result;
|
|
2666
|
+
} catch (e) {
|
|
2667
|
+
setError(e instanceof Error ? e.message : "The assistant request failed.");
|
|
2668
|
+
setStatus("error");
|
|
2669
|
+
return null;
|
|
2670
|
+
}
|
|
2671
|
+
},
|
|
2672
|
+
[mutation]
|
|
1662
2673
|
);
|
|
1663
2674
|
return {
|
|
1664
2675
|
status,
|
|
@@ -1747,6 +2758,38 @@ function textToArtifact(title, content, opts) {
|
|
|
1747
2758
|
t: null
|
|
1748
2759
|
};
|
|
1749
2760
|
}
|
|
2761
|
+
var markdownBaseComponents = {
|
|
2762
|
+
h1: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-lg font-semibold", "data-testid": "markdown-heading-1", ...props, children }),
|
|
2763
|
+
h2: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "font-semibold text-base", "data-testid": "markdown-heading-2", ...props, children }),
|
|
2764
|
+
h3: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "font-semibold text-base", "data-testid": "markdown-heading-3", ...props, children }),
|
|
2765
|
+
h4: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "font-semibold text-base", ...props, children }),
|
|
2766
|
+
h5: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("h5", { className: "font-medium", ...props, children }),
|
|
2767
|
+
strong: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("strong", { className: "font-semibold", ...props, children }),
|
|
2768
|
+
blockquote: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("blockquote", { className: "border-l-2 border-primary pl-4", ...props, children }),
|
|
2769
|
+
ol: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("ol", { className: "list-decimal space-y-2 pl-6", "data-testid": "markdown-ordered-list", ...props, children }),
|
|
2770
|
+
ul: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "list-none space-y-2 pl-6", "data-testid": "markdown-unordered-list", ...props, children }),
|
|
2771
|
+
li: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("li", { className: "my-1.5", ...props, children }),
|
|
2772
|
+
table: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("table", { "data-testid": "markdown-table", ...props, children }),
|
|
2773
|
+
th: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("th", { ...props, children }),
|
|
2774
|
+
td: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("td", { ...props, children }),
|
|
2775
|
+
tr: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("tr", { ...props, children }),
|
|
2776
|
+
p: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("p", { className: "whitespace-pre-wrap", ...props, children }),
|
|
2777
|
+
hr: (props) => /* @__PURE__ */ jsxRuntime.jsx("hr", { className: "border-foreground/20", ...props }),
|
|
2778
|
+
sup: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("sup", { className: "text-xs", ...props, children }),
|
|
2779
|
+
sub: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("sub", { className: "text-xs", ...props, children }),
|
|
2780
|
+
div: ({ children, className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className, ...props, children }),
|
|
2781
|
+
br: (props) => /* @__PURE__ */ jsxRuntime.jsx("br", { ...props }),
|
|
2782
|
+
kbd: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2783
|
+
"kbd",
|
|
2784
|
+
{
|
|
2785
|
+
className: "px-1.5 py-0.5 text-xs font-mono bg-muted border border-border rounded",
|
|
2786
|
+
...props,
|
|
2787
|
+
children
|
|
2788
|
+
}
|
|
2789
|
+
),
|
|
2790
|
+
abbr: ({ children, title, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("abbr", { title, className: "underline decoration-dotted cursor-help", ...props, children }),
|
|
2791
|
+
cite: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("cite", { className: "italic", ...props, children })
|
|
2792
|
+
};
|
|
1750
2793
|
function AiMarkdown({ children, className }) {
|
|
1751
2794
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1752
2795
|
"div",
|
|
@@ -1759,15 +2802,9 @@ function AiMarkdown({ children, className }) {
|
|
|
1759
2802
|
remarkPlugins: [remarkGfm__default.default],
|
|
1760
2803
|
rehypePlugins: [rehypeRaw__default.default],
|
|
1761
2804
|
components: {
|
|
1762
|
-
|
|
1763
|
-
h2: (p) => /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "mb-2 mt-4 text-base font-semibold text-foreground first:mt-0", ...p }),
|
|
1764
|
-
h3: (p) => /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-1.5 mt-3 text-sm font-semibold text-foreground first:mt-0", ...p }),
|
|
1765
|
-
p: (p) => /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-3 last:mb-0", ...p }),
|
|
1766
|
-
ul: (p) => /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "mb-3 list-disc space-y-1 pl-5 last:mb-0", ...p }),
|
|
1767
|
-
ol: (p) => /* @__PURE__ */ jsxRuntime.jsx("ol", { className: "mb-3 list-decimal space-y-1 pl-5 last:mb-0", ...p }),
|
|
1768
|
-
li: (p) => /* @__PURE__ */ jsxRuntime.jsx("li", { className: "pl-1", ...p }),
|
|
1769
|
-
strong: (p) => /* @__PURE__ */ jsxRuntime.jsx("strong", { className: "font-semibold text-foreground", ...p }),
|
|
2805
|
+
...markdownBaseComponents,
|
|
1770
2806
|
a: (p) => /* @__PURE__ */ jsxRuntime.jsx("a", { className: "text-ai-accent underline underline-offset-2", ...p }),
|
|
2807
|
+
code: (p) => /* @__PURE__ */ jsxRuntime.jsx("code", { className: "rounded bg-secondary px-1 py-0.5 font-mono text-[0.8em]", ...p }),
|
|
1771
2808
|
// Redline marks: deletions in red strike, <ins>/<mark> additions accented.
|
|
1772
2809
|
del: (p) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1773
2810
|
"del",
|
|
@@ -1778,14 +2815,7 @@ function AiMarkdown({ children, className }) {
|
|
|
1778
2815
|
),
|
|
1779
2816
|
ins: (p) => /* @__PURE__ */ jsxRuntime.jsx("ins", { className: "rounded bg-ai-accent-soft px-0.5 text-ai-accent no-underline", ...p }),
|
|
1780
2817
|
mark: (p) => /* @__PURE__ */ jsxRuntime.jsx("mark", { className: "rounded bg-ai-accent-soft px-0.5 text-ai-accent", ...p }),
|
|
1781
|
-
|
|
1782
|
-
blockquote: (p) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1783
|
-
"blockquote",
|
|
1784
|
-
{
|
|
1785
|
-
className: "my-3 border-l-2 border-ai-accent/40 pl-3 italic text-muted-foreground",
|
|
1786
|
-
...p
|
|
1787
|
-
}
|
|
1788
|
-
),
|
|
2818
|
+
// Self-contained bordered tables (base leaves these to app CSS).
|
|
1789
2819
|
table: (p) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "my-3 overflow-x-auto rounded-lg border border-border", children: /* @__PURE__ */ jsxRuntime.jsx("table", { className: "w-full border-collapse text-xs", ...p }) }),
|
|
1790
2820
|
thead: (p) => /* @__PURE__ */ jsxRuntime.jsx("thead", { className: "bg-secondary/60", ...p }),
|
|
1791
2821
|
th: (p) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1884,7 +2914,7 @@ function AiAnswer({
|
|
|
1884
2914
|
] });
|
|
1885
2915
|
}
|
|
1886
2916
|
function AiActionCard({
|
|
1887
|
-
icon:
|
|
2917
|
+
icon: Icon2 = lucideReact.Sparkles,
|
|
1888
2918
|
title,
|
|
1889
2919
|
description,
|
|
1890
2920
|
prompt,
|
|
@@ -1900,10 +2930,10 @@ function AiActionCard({
|
|
|
1900
2930
|
const p = typeof prompt === "function" ? prompt() : prompt;
|
|
1901
2931
|
void task.run(p, docIds);
|
|
1902
2932
|
};
|
|
1903
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Card, { className: "p-5", "data-testid": testId, children: [
|
|
2933
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Card, { variant: "elevated", className: "rounded-xl p-5", "data-testid": testId, children: [
|
|
1904
2934
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-4", children: [
|
|
1905
2935
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3", children: [
|
|
1906
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex size-9 shrink-0 items-center justify-center rounded-lg bg-ai-accent-soft text-ai-accent", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2936
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex size-9 shrink-0 items-center justify-center rounded-lg bg-ai-accent-soft text-ai-accent", children: /* @__PURE__ */ jsxRuntime.jsx(Icon2, { className: "size-4" }) }),
|
|
1907
2937
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
1908
2938
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-semibold text-foreground", children: title }),
|
|
1909
2939
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-0.5 text-xs leading-relaxed text-muted-foreground", children: description })
|
|
@@ -2110,6 +3140,47 @@ function ArtifactCanvas({
|
|
|
2110
3140
|
}
|
|
2111
3141
|
);
|
|
2112
3142
|
}
|
|
3143
|
+
function MessageArtifactCard({
|
|
3144
|
+
artifact,
|
|
3145
|
+
onOpen
|
|
3146
|
+
}) {
|
|
3147
|
+
const { docExtId, title, isComplete, mode } = artifact;
|
|
3148
|
+
const isImage = mode === "image";
|
|
3149
|
+
const Icon2 = isImage ? lucideReact.Image : lucideReact.FileText;
|
|
3150
|
+
const statusText = isImage ? isComplete ? "Image ready" : "Generating\u2026" : isComplete ? "Draft ready" : "Drafting\u2026";
|
|
3151
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3152
|
+
Card,
|
|
3153
|
+
{
|
|
3154
|
+
variant: "outline",
|
|
3155
|
+
className: "mt-3 flex items-center gap-3 px-3 py-2.5",
|
|
3156
|
+
"data-testid": `message-artifact-card-${docExtId}`,
|
|
3157
|
+
children: [
|
|
3158
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icon2, { className: "h-4 w-4 shrink-0 text-muted-foreground", "aria-hidden": true }),
|
|
3159
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
3160
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3161
|
+
"div",
|
|
3162
|
+
{
|
|
3163
|
+
className: "truncate text-chat font-semibold text-foreground",
|
|
3164
|
+
"data-testid": "artifact-title",
|
|
3165
|
+
children: title || (isImage ? "Generated image" : "Untitled draft")
|
|
3166
|
+
}
|
|
3167
|
+
),
|
|
3168
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-muted-foreground", "data-testid": "artifact-status", children: statusText })
|
|
3169
|
+
] }),
|
|
3170
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3171
|
+
"button",
|
|
3172
|
+
{
|
|
3173
|
+
type: "button",
|
|
3174
|
+
onClick: () => onOpen(docExtId),
|
|
3175
|
+
className: "shrink-0 rounded-md bg-secondary/15 px-3 py-1.5 text-sm font-semibold text-secondary transition-colors hover:bg-secondary/25",
|
|
3176
|
+
"data-testid": `view-artifact-button-${docExtId}`,
|
|
3177
|
+
children: isImage ? "View image" : "View draft"
|
|
3178
|
+
}
|
|
3179
|
+
)
|
|
3180
|
+
]
|
|
3181
|
+
}
|
|
3182
|
+
);
|
|
3183
|
+
}
|
|
2113
3184
|
function DocSearch({
|
|
2114
3185
|
docIds,
|
|
2115
3186
|
onOpenDoc,
|
|
@@ -2156,8 +3227,9 @@ function DocSearch({
|
|
|
2156
3227
|
results.slice(0, 8).map((r, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2157
3228
|
Card,
|
|
2158
3229
|
{
|
|
3230
|
+
variant: "elevated",
|
|
2159
3231
|
className: cn(
|
|
2160
|
-
"p-3",
|
|
3232
|
+
"rounded-xl p-3",
|
|
2161
3233
|
onOpenDoc && r.docId && "cursor-pointer transition-colors hover:border-ai-accent/40"
|
|
2162
3234
|
),
|
|
2163
3235
|
onClick: () => r.docId && onOpenDoc?.(r.docId),
|
|
@@ -2209,6 +3281,7 @@ Question: ${question}`,
|
|
|
2209
3281
|
onChange: (e) => setQ(e.target.value),
|
|
2210
3282
|
onKeyDown: (e) => e.key === "Enter" && (e.preventDefault(), ask()),
|
|
2211
3283
|
placeholder: "Ask about this document\u2026",
|
|
3284
|
+
className: "bg-card text-sm placeholder:text-muted-foreground/70 focus-visible:border-ring/60 focus-visible:ring-2 focus-visible:ring-ring/50",
|
|
2212
3285
|
"data-testid": "doc-qa-input"
|
|
2213
3286
|
}
|
|
2214
3287
|
),
|
|
@@ -2251,20 +3324,325 @@ Question: ${question}`,
|
|
|
2251
3324
|
)
|
|
2252
3325
|
] });
|
|
2253
3326
|
}
|
|
3327
|
+
var INLINE_MD_COMPONENTS = {
|
|
3328
|
+
p: ({ children }) => /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children }),
|
|
3329
|
+
strong: ({ children }) => /* @__PURE__ */ jsxRuntime.jsx("strong", { className: "font-semibold", children }),
|
|
3330
|
+
em: ({ children }) => /* @__PURE__ */ jsxRuntime.jsx("em", { children }),
|
|
3331
|
+
code: ({ children }) => /* @__PURE__ */ jsxRuntime.jsx("code", { className: "font-mono", children }),
|
|
3332
|
+
a: ({ children }) => /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children }),
|
|
3333
|
+
ul: ({ children }) => /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children }),
|
|
3334
|
+
ol: ({ children }) => /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children }),
|
|
3335
|
+
li: ({ children }) => /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
3336
|
+
children,
|
|
3337
|
+
" "
|
|
3338
|
+
] }),
|
|
3339
|
+
h1: ({ children }) => /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children }),
|
|
3340
|
+
h2: ({ children }) => /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children }),
|
|
3341
|
+
h3: ({ children }) => /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children }),
|
|
3342
|
+
h4: ({ children }) => /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children }),
|
|
3343
|
+
h5: ({ children }) => /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children }),
|
|
3344
|
+
h6: ({ children }) => /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children }),
|
|
3345
|
+
blockquote: ({ children }) => /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children }),
|
|
3346
|
+
pre: ({ children }) => /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children })
|
|
3347
|
+
};
|
|
3348
|
+
var CitationRendererComponent = ({
|
|
3349
|
+
content,
|
|
3350
|
+
citations,
|
|
3351
|
+
citationData,
|
|
3352
|
+
className,
|
|
3353
|
+
messageId,
|
|
3354
|
+
isStreaming = false,
|
|
3355
|
+
renderMarkdown,
|
|
3356
|
+
ExternalLink,
|
|
3357
|
+
onOpenCitation,
|
|
3358
|
+
onActivateChunk,
|
|
3359
|
+
useCitationState,
|
|
3360
|
+
onCloseCitation,
|
|
3361
|
+
onDismissCitation
|
|
3362
|
+
}) => {
|
|
3363
|
+
const chunkMap = React.useMemo(() => {
|
|
3364
|
+
const map = /* @__PURE__ */ new Map();
|
|
3365
|
+
if (citationData) {
|
|
3366
|
+
Object.entries(citationData).forEach(([, docChunks]) => {
|
|
3367
|
+
if (docChunks && Array.isArray(docChunks)) {
|
|
3368
|
+
docChunks.forEach((chunk) => {
|
|
3369
|
+
if (chunk.metadata && chunk.metadata.chunk_ext_id) {
|
|
3370
|
+
map.set(chunk.metadata.chunk_ext_id, chunk);
|
|
3371
|
+
}
|
|
3372
|
+
});
|
|
3373
|
+
}
|
|
3374
|
+
});
|
|
3375
|
+
}
|
|
3376
|
+
return map;
|
|
3377
|
+
}, [citationData]);
|
|
3378
|
+
const getChunkDetails = React.useCallback(
|
|
3379
|
+
(chunkIds) => [...new Set(chunkIds)].map((id) => chunkMap.get(id)).filter((c) => c !== void 0),
|
|
3380
|
+
[chunkMap]
|
|
3381
|
+
);
|
|
3382
|
+
const handleChunkClick = React.useCallback(
|
|
3383
|
+
(citationNum, chunkIds, chunk) => {
|
|
3384
|
+
onActivateChunk({ messageId, citationNum, chunkIds, chunk, citationData });
|
|
3385
|
+
},
|
|
3386
|
+
[messageId, citationData, onActivateChunk]
|
|
3387
|
+
);
|
|
3388
|
+
const markdownComponents = React.useMemo(() => {
|
|
3389
|
+
const components = {
|
|
3390
|
+
a: ({ href, children, ...props }) => {
|
|
3391
|
+
if (!href?.startsWith("#cite-")) {
|
|
3392
|
+
if (!href || href.startsWith("#")) {
|
|
3393
|
+
return /* @__PURE__ */ jsxRuntime.jsx("a", { className: "text-primary underline underline-offset-2", href, ...props, children });
|
|
3394
|
+
}
|
|
3395
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ExternalLink, { href, ...props, children });
|
|
3396
|
+
}
|
|
3397
|
+
const citationNum = href.slice(6);
|
|
3398
|
+
const citationKey = `${messageId}-${citationNum}`;
|
|
3399
|
+
const chunkIds = citations?.[citationNum] || [];
|
|
3400
|
+
const chunks = getChunkDetails(chunkIds);
|
|
3401
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3402
|
+
CitationPopover,
|
|
3403
|
+
{
|
|
3404
|
+
citationNum,
|
|
3405
|
+
messageId,
|
|
3406
|
+
chunks,
|
|
3407
|
+
isStreaming,
|
|
3408
|
+
onOpen: () => onOpenCitation(citationKey),
|
|
3409
|
+
onChunkClick: (chunk) => handleChunkClick(citationNum, chunkIds, chunk),
|
|
3410
|
+
useCitationState,
|
|
3411
|
+
onCloseCitation,
|
|
3412
|
+
onDismissCitation,
|
|
3413
|
+
children
|
|
3414
|
+
},
|
|
3415
|
+
citationKey
|
|
3416
|
+
);
|
|
3417
|
+
}
|
|
3418
|
+
};
|
|
3419
|
+
return components;
|
|
3420
|
+
}, [
|
|
3421
|
+
citations,
|
|
3422
|
+
messageId,
|
|
3423
|
+
isStreaming,
|
|
3424
|
+
getChunkDetails,
|
|
3425
|
+
handleChunkClick,
|
|
3426
|
+
onOpenCitation,
|
|
3427
|
+
ExternalLink,
|
|
3428
|
+
useCitationState,
|
|
3429
|
+
onCloseCitation,
|
|
3430
|
+
onDismissCitation
|
|
3431
|
+
]);
|
|
3432
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("citation-container", className), "data-testid": "citation-renderer", children: renderMarkdown({ components: markdownComponents, isStreaming, children: content }) });
|
|
3433
|
+
};
|
|
3434
|
+
var CitationPopover = ({
|
|
3435
|
+
citationNum,
|
|
3436
|
+
messageId,
|
|
3437
|
+
chunks,
|
|
3438
|
+
isStreaming,
|
|
3439
|
+
onOpen,
|
|
3440
|
+
onChunkClick,
|
|
3441
|
+
useCitationState,
|
|
3442
|
+
onCloseCitation,
|
|
3443
|
+
onDismissCitation,
|
|
3444
|
+
children
|
|
3445
|
+
}) => {
|
|
3446
|
+
const { activeCitationKey, viewingPassageId, isOnConversationPage } = useCitationState();
|
|
3447
|
+
const isActive = activeCitationKey === `${messageId}-${citationNum}`;
|
|
3448
|
+
const open = isActive && isOnConversationPage;
|
|
3449
|
+
const chatContainer = React.useMemo(
|
|
3450
|
+
() => document.querySelector('main[data-testid^="conversation-"]'),
|
|
3451
|
+
[]
|
|
3452
|
+
);
|
|
3453
|
+
const triggerRef = React.useRef(null);
|
|
3454
|
+
const [alignOffset, setAlignOffset] = React.useState(0);
|
|
3455
|
+
const handleOpen = React.useCallback(() => {
|
|
3456
|
+
if (triggerRef.current && chatContainer) {
|
|
3457
|
+
const triggerLeft = triggerRef.current.getBoundingClientRect().left;
|
|
3458
|
+
const chatLeft = chatContainer.getBoundingClientRect().left;
|
|
3459
|
+
setAlignOffset(-(triggerLeft - chatLeft));
|
|
3460
|
+
}
|
|
3461
|
+
onOpen();
|
|
3462
|
+
if (chunks.length > 0) {
|
|
3463
|
+
onChunkClick(chunks[0]);
|
|
3464
|
+
}
|
|
3465
|
+
}, [onOpen, onChunkClick, chunks, chatContainer]);
|
|
3466
|
+
const byDoc = React.useMemo(() => {
|
|
3467
|
+
const map = /* @__PURE__ */ new Map();
|
|
3468
|
+
chunks.forEach((chunk) => {
|
|
3469
|
+
const docId = chunk.metadata.doc_ext_id ?? "unknown";
|
|
3470
|
+
const title = chunk.metadata.doc_title ?? docId;
|
|
3471
|
+
if (!map.has(docId)) map.set(docId, { title, chunks: [] });
|
|
3472
|
+
map.get(docId).chunks.push(chunk);
|
|
3473
|
+
});
|
|
3474
|
+
return Array.from(map.entries()).map(([docId, val]) => ({ docId, ...val }));
|
|
3475
|
+
}, [chunks]);
|
|
3476
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3477
|
+
Popover,
|
|
3478
|
+
{
|
|
3479
|
+
open,
|
|
3480
|
+
onOpenChange: (next) => {
|
|
3481
|
+
if (isStreaming) return;
|
|
3482
|
+
if (next) {
|
|
3483
|
+
handleOpen();
|
|
3484
|
+
} else {
|
|
3485
|
+
onCloseCitation();
|
|
3486
|
+
}
|
|
3487
|
+
},
|
|
3488
|
+
children: [
|
|
3489
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3490
|
+
CitationLink,
|
|
3491
|
+
{
|
|
3492
|
+
ref: triggerRef,
|
|
3493
|
+
citationNum,
|
|
3494
|
+
isActive,
|
|
3495
|
+
isStreaming,
|
|
3496
|
+
children
|
|
3497
|
+
}
|
|
3498
|
+
) }),
|
|
3499
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3500
|
+
PopoverContent,
|
|
3501
|
+
{
|
|
3502
|
+
className: "w-[min(var(--radix-popover-content-available-width),48rem)] min-w-0 p-0 max-h-[75vh] overflow-y-auto border-2 border-border shadow-xl",
|
|
3503
|
+
align: "start",
|
|
3504
|
+
alignOffset,
|
|
3505
|
+
side: "bottom",
|
|
3506
|
+
sideOffset: 6,
|
|
3507
|
+
avoidCollisions: true,
|
|
3508
|
+
container: chatContainer,
|
|
3509
|
+
collisionBoundary: chatContainer,
|
|
3510
|
+
collisionPadding: { top: 8, bottom: 8, left: 8, right: 8 },
|
|
3511
|
+
"data-testid": `citation-popover-${citationNum}`,
|
|
3512
|
+
onInteractOutside: (e) => e.preventDefault(),
|
|
3513
|
+
onEscapeKeyDown: (e) => e.preventDefault(),
|
|
3514
|
+
onCloseAutoFocus: (e) => e.preventDefault(),
|
|
3515
|
+
children: [
|
|
3516
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-3 py-2 border-b border-border sticky top-0 bg-popover z-10 flex items-center justify-between gap-2", children: [
|
|
3517
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs font-semibold text-muted-foreground tracking-wide", children: [
|
|
3518
|
+
"Citation ",
|
|
3519
|
+
citationNum,
|
|
3520
|
+
" (",
|
|
3521
|
+
chunks.length,
|
|
3522
|
+
" passage",
|
|
3523
|
+
chunks.length !== 1 ? "s" : "",
|
|
3524
|
+
")"
|
|
3525
|
+
] }),
|
|
3526
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3527
|
+
"button",
|
|
3528
|
+
{
|
|
3529
|
+
onClick: onDismissCitation,
|
|
3530
|
+
className: "shrink-0 text-muted-foreground hover:text-foreground transition-colors",
|
|
3531
|
+
"aria-label": "Close",
|
|
3532
|
+
"data-testid": `citation-popover-close-${citationNum}`,
|
|
3533
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3534
|
+
"svg",
|
|
3535
|
+
{
|
|
3536
|
+
width: "12",
|
|
3537
|
+
height: "12",
|
|
3538
|
+
viewBox: "0 0 12 12",
|
|
3539
|
+
fill: "none",
|
|
3540
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3541
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3542
|
+
"path",
|
|
3543
|
+
{
|
|
3544
|
+
d: "M1 1L11 11M11 1L1 11",
|
|
3545
|
+
stroke: "currentColor",
|
|
3546
|
+
strokeWidth: "1.5",
|
|
3547
|
+
strokeLinecap: "round"
|
|
3548
|
+
}
|
|
3549
|
+
)
|
|
3550
|
+
}
|
|
3551
|
+
)
|
|
3552
|
+
}
|
|
3553
|
+
)
|
|
3554
|
+
] }),
|
|
3555
|
+
(() => {
|
|
3556
|
+
let idx = 0;
|
|
3557
|
+
return byDoc.map(({ docId, title, chunks: docChunks }) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-3 py-2 border-b border-border last:border-0", children: [
|
|
3558
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-medium text-primary mb-1 truncate", title, children: title }),
|
|
3559
|
+
docChunks.map((chunk) => {
|
|
3560
|
+
idx++;
|
|
3561
|
+
const isSelected = viewingPassageId === chunk.metadata.chunk_ext_id;
|
|
3562
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3563
|
+
"button",
|
|
3564
|
+
{
|
|
3565
|
+
"data-testid": `citation-chunk-${chunk.metadata.chunk_ext_id}`,
|
|
3566
|
+
onClick: () => onChunkClick(chunk),
|
|
3567
|
+
className: cn(
|
|
3568
|
+
"w-full text-left text-xs rounded px-2 py-1.5 transition-colors flex items-start gap-2 mb-1 last:mb-0",
|
|
3569
|
+
isSelected ? "bg-yellow-100 dark:bg-yellow-900/30 text-yellow-900 dark:text-yellow-100" : "text-muted-foreground hover:text-primary hover:bg-muted"
|
|
3570
|
+
),
|
|
3571
|
+
children: [
|
|
3572
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "shrink-0 text-[10px] font-mono bg-muted text-muted-foreground rounded px-1 py-0.5 mt-0.5", children: [
|
|
3573
|
+
idx,
|
|
3574
|
+
"."
|
|
3575
|
+
] }),
|
|
3576
|
+
chunk.metadata.page_number != null && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "shrink-0 text-[10px] font-mono bg-muted text-muted-foreground rounded-full px-1.5 py-0.5 mt-0.5", children: [
|
|
3577
|
+
"p.",
|
|
3578
|
+
chunk.metadata.page_number
|
|
3579
|
+
] }),
|
|
3580
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "min-w-0 flex-1 overflow-hidden whitespace-nowrap text-ellipsis block", children: [
|
|
3581
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "(\u201C" }),
|
|
3582
|
+
" ",
|
|
3583
|
+
/* @__PURE__ */ jsxRuntime.jsx(ReactMarkdown__default.default, { components: INLINE_MD_COMPONENTS, children: chunk.content.replace(/\n+/g, " ").trim() }),
|
|
3584
|
+
" ",
|
|
3585
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "\u201D)" })
|
|
3586
|
+
] })
|
|
3587
|
+
]
|
|
3588
|
+
},
|
|
3589
|
+
chunk.metadata.chunk_ext_id
|
|
3590
|
+
);
|
|
3591
|
+
})
|
|
3592
|
+
] }, docId));
|
|
3593
|
+
})()
|
|
3594
|
+
]
|
|
3595
|
+
}
|
|
3596
|
+
)
|
|
3597
|
+
]
|
|
3598
|
+
}
|
|
3599
|
+
);
|
|
3600
|
+
};
|
|
3601
|
+
var CitationLink = React__namespace.default.forwardRef(
|
|
3602
|
+
({ citationNum, isActive, isStreaming, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3603
|
+
"span",
|
|
3604
|
+
{
|
|
3605
|
+
ref,
|
|
3606
|
+
className: cn(
|
|
3607
|
+
"cited-text transition-colors px-0.5 rounded inline-block",
|
|
3608
|
+
isStreaming ? "cursor-default" : "cursor-pointer",
|
|
3609
|
+
isActive ? "bg-yellow-100 dark:bg-yellow-900/30 hover:bg-yellow-200 dark:hover:bg-yellow-900/40" : "hover:bg-yellow-50 dark:hover:bg-yellow-900/20"
|
|
3610
|
+
),
|
|
3611
|
+
"data-testid": `citation-link-${citationNum}`,
|
|
3612
|
+
...props,
|
|
3613
|
+
children: [
|
|
3614
|
+
children,
|
|
3615
|
+
/* @__PURE__ */ jsxRuntime.jsx("sup", { className: "relative -top-2", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-flex items-center justify-center min-w-4 h-4 px-1 text-[10px] border border-muted bg-muted text-primary rounded font-normal cursor-pointer antialiased tabular-nums font-heading", children: citationNum }) })
|
|
3616
|
+
]
|
|
3617
|
+
}
|
|
3618
|
+
)
|
|
3619
|
+
);
|
|
3620
|
+
CitationLink.displayName = "CitationLink";
|
|
3621
|
+
var CitationRenderer = React__namespace.default.memo(CitationRendererComponent);
|
|
2254
3622
|
|
|
2255
3623
|
// src/icons/colors.ts
|
|
2256
3624
|
var NEUTRAL_GRAY = "#64748b";
|
|
2257
3625
|
var FILE_TYPE_COLORS = {
|
|
2258
3626
|
pdf: "#ef4444",
|
|
2259
3627
|
// red
|
|
3628
|
+
doc: "#3b82f6",
|
|
3629
|
+
// blue (Word docs)
|
|
3630
|
+
docx: "#3b82f6",
|
|
3631
|
+
// blue
|
|
3632
|
+
html: "#0284c7",
|
|
3633
|
+
// sky-600 (web files)
|
|
2260
3634
|
img: "#8b5cf6",
|
|
2261
3635
|
// violet-500 (images)
|
|
2262
3636
|
vid: "#10b981",
|
|
2263
3637
|
// emerald-500 (video)
|
|
2264
3638
|
aud: "#f59e0b",
|
|
2265
3639
|
// amber-500 (audio)
|
|
3640
|
+
xls: "#16a34a",
|
|
3641
|
+
// green-600 (Excel)
|
|
2266
3642
|
eml: "#0d9488",
|
|
2267
3643
|
// teal-600 (email)
|
|
3644
|
+
txt: NEUTRAL_GRAY,
|
|
3645
|
+
// gray (plain text)
|
|
2268
3646
|
generic: NEUTRAL_GRAY,
|
|
2269
3647
|
// gray (unknown)
|
|
2270
3648
|
white: "#ffffff"
|
|
@@ -2320,6 +3698,206 @@ var PdfIcon = ({ size = 16, className = "" }) => {
|
|
|
2320
3698
|
}
|
|
2321
3699
|
);
|
|
2322
3700
|
};
|
|
3701
|
+
var DocIcon = ({ size = 16, className = "" }) => {
|
|
3702
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3703
|
+
"svg",
|
|
3704
|
+
{
|
|
3705
|
+
width: size,
|
|
3706
|
+
height: size,
|
|
3707
|
+
viewBox: "0 0 24 24",
|
|
3708
|
+
fill: "none",
|
|
3709
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3710
|
+
className,
|
|
3711
|
+
children: [
|
|
3712
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3713
|
+
"path",
|
|
3714
|
+
{
|
|
3715
|
+
d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6z",
|
|
3716
|
+
fill: FILE_TYPE_COLORS.doc,
|
|
3717
|
+
stroke: FILE_TYPE_COLORS.doc,
|
|
3718
|
+
strokeWidth: "1",
|
|
3719
|
+
strokeLinecap: "round",
|
|
3720
|
+
strokeLinejoin: "round"
|
|
3721
|
+
}
|
|
3722
|
+
),
|
|
3723
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3724
|
+
"path",
|
|
3725
|
+
{
|
|
3726
|
+
d: "M14 2v6h6",
|
|
3727
|
+
fill: "none",
|
|
3728
|
+
stroke: FILE_TYPE_COLORS.white,
|
|
3729
|
+
strokeWidth: "1",
|
|
3730
|
+
strokeLinecap: "round",
|
|
3731
|
+
strokeLinejoin: "round"
|
|
3732
|
+
}
|
|
3733
|
+
),
|
|
3734
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3735
|
+
"text",
|
|
3736
|
+
{
|
|
3737
|
+
x: "12",
|
|
3738
|
+
y: "16",
|
|
3739
|
+
fontSize: "6",
|
|
3740
|
+
fill: "white",
|
|
3741
|
+
textAnchor: "middle",
|
|
3742
|
+
fontWeight: "bold",
|
|
3743
|
+
fontFamily: "Arial, sans-serif",
|
|
3744
|
+
children: "DOC"
|
|
3745
|
+
}
|
|
3746
|
+
)
|
|
3747
|
+
]
|
|
3748
|
+
}
|
|
3749
|
+
);
|
|
3750
|
+
};
|
|
3751
|
+
var HtmlIcon = ({ size = 16, className = "" }) => {
|
|
3752
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3753
|
+
"svg",
|
|
3754
|
+
{
|
|
3755
|
+
width: size,
|
|
3756
|
+
height: size,
|
|
3757
|
+
viewBox: "0 0 24 24",
|
|
3758
|
+
fill: "none",
|
|
3759
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3760
|
+
className,
|
|
3761
|
+
children: [
|
|
3762
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3763
|
+
"path",
|
|
3764
|
+
{
|
|
3765
|
+
d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6z",
|
|
3766
|
+
fill: FILE_TYPE_COLORS.html,
|
|
3767
|
+
stroke: FILE_TYPE_COLORS.html,
|
|
3768
|
+
strokeWidth: "1",
|
|
3769
|
+
strokeLinecap: "round",
|
|
3770
|
+
strokeLinejoin: "round"
|
|
3771
|
+
}
|
|
3772
|
+
),
|
|
3773
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3774
|
+
"path",
|
|
3775
|
+
{
|
|
3776
|
+
d: "M14 2v6h6",
|
|
3777
|
+
fill: "none",
|
|
3778
|
+
stroke: FILE_TYPE_COLORS.white,
|
|
3779
|
+
strokeWidth: "1",
|
|
3780
|
+
strokeLinecap: "round",
|
|
3781
|
+
strokeLinejoin: "round"
|
|
3782
|
+
}
|
|
3783
|
+
),
|
|
3784
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3785
|
+
"text",
|
|
3786
|
+
{
|
|
3787
|
+
x: "12",
|
|
3788
|
+
y: "16",
|
|
3789
|
+
fontSize: "5",
|
|
3790
|
+
fill: "white",
|
|
3791
|
+
textAnchor: "middle",
|
|
3792
|
+
fontWeight: "bold",
|
|
3793
|
+
fontFamily: "Arial, sans-serif",
|
|
3794
|
+
children: "HTML"
|
|
3795
|
+
}
|
|
3796
|
+
)
|
|
3797
|
+
]
|
|
3798
|
+
}
|
|
3799
|
+
);
|
|
3800
|
+
};
|
|
3801
|
+
var TxtIcon = ({ size = 16, className = "" }) => {
|
|
3802
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3803
|
+
"svg",
|
|
3804
|
+
{
|
|
3805
|
+
width: size,
|
|
3806
|
+
height: size,
|
|
3807
|
+
viewBox: "0 0 24 24",
|
|
3808
|
+
fill: "none",
|
|
3809
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3810
|
+
className,
|
|
3811
|
+
children: [
|
|
3812
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3813
|
+
"path",
|
|
3814
|
+
{
|
|
3815
|
+
d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6z",
|
|
3816
|
+
fill: FILE_TYPE_COLORS.txt,
|
|
3817
|
+
stroke: FILE_TYPE_COLORS.txt,
|
|
3818
|
+
strokeWidth: "1",
|
|
3819
|
+
strokeLinecap: "round",
|
|
3820
|
+
strokeLinejoin: "round"
|
|
3821
|
+
}
|
|
3822
|
+
),
|
|
3823
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3824
|
+
"path",
|
|
3825
|
+
{
|
|
3826
|
+
d: "M14 2v6h6",
|
|
3827
|
+
fill: "none",
|
|
3828
|
+
stroke: FILE_TYPE_COLORS.white,
|
|
3829
|
+
strokeWidth: "1",
|
|
3830
|
+
strokeLinecap: "round",
|
|
3831
|
+
strokeLinejoin: "round"
|
|
3832
|
+
}
|
|
3833
|
+
),
|
|
3834
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3835
|
+
"text",
|
|
3836
|
+
{
|
|
3837
|
+
x: "12",
|
|
3838
|
+
y: "16",
|
|
3839
|
+
fontSize: "6",
|
|
3840
|
+
fill: "white",
|
|
3841
|
+
textAnchor: "middle",
|
|
3842
|
+
fontWeight: "bold",
|
|
3843
|
+
fontFamily: "Arial, sans-serif",
|
|
3844
|
+
children: "TXT"
|
|
3845
|
+
}
|
|
3846
|
+
)
|
|
3847
|
+
]
|
|
3848
|
+
}
|
|
3849
|
+
);
|
|
3850
|
+
};
|
|
3851
|
+
var XlsIcon = ({ size = 16, className = "" }) => {
|
|
3852
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3853
|
+
"svg",
|
|
3854
|
+
{
|
|
3855
|
+
width: size,
|
|
3856
|
+
height: size,
|
|
3857
|
+
viewBox: "0 0 24 24",
|
|
3858
|
+
fill: "none",
|
|
3859
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3860
|
+
className,
|
|
3861
|
+
children: [
|
|
3862
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3863
|
+
"path",
|
|
3864
|
+
{
|
|
3865
|
+
d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6z",
|
|
3866
|
+
fill: FILE_TYPE_COLORS.xls,
|
|
3867
|
+
stroke: FILE_TYPE_COLORS.xls,
|
|
3868
|
+
strokeWidth: "1",
|
|
3869
|
+
strokeLinecap: "round",
|
|
3870
|
+
strokeLinejoin: "round"
|
|
3871
|
+
}
|
|
3872
|
+
),
|
|
3873
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3874
|
+
"path",
|
|
3875
|
+
{
|
|
3876
|
+
d: "M14 2v6h6",
|
|
3877
|
+
fill: "none",
|
|
3878
|
+
stroke: FILE_TYPE_COLORS.white,
|
|
3879
|
+
strokeWidth: "1",
|
|
3880
|
+
strokeLinecap: "round",
|
|
3881
|
+
strokeLinejoin: "round"
|
|
3882
|
+
}
|
|
3883
|
+
),
|
|
3884
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3885
|
+
"text",
|
|
3886
|
+
{
|
|
3887
|
+
x: "12",
|
|
3888
|
+
y: "16",
|
|
3889
|
+
fontSize: "6",
|
|
3890
|
+
fill: "white",
|
|
3891
|
+
textAnchor: "middle",
|
|
3892
|
+
fontWeight: "bold",
|
|
3893
|
+
fontFamily: "Arial, sans-serif",
|
|
3894
|
+
children: "XLS"
|
|
3895
|
+
}
|
|
3896
|
+
)
|
|
3897
|
+
]
|
|
3898
|
+
}
|
|
3899
|
+
);
|
|
3900
|
+
};
|
|
2323
3901
|
var AudIcon = ({ size = 16, className = "" }) => {
|
|
2324
3902
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2325
3903
|
"svg",
|
|
@@ -2521,56 +4099,428 @@ var EmlIcon = ({ size = 16, className = "" }) => {
|
|
|
2521
4099
|
}
|
|
2522
4100
|
);
|
|
2523
4101
|
};
|
|
2524
|
-
var FileIcon = ({ size = 16, className = "" }) => {
|
|
4102
|
+
var FileIcon = ({ size = 16, className = "" }) => {
|
|
4103
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4104
|
+
"svg",
|
|
4105
|
+
{
|
|
4106
|
+
width: size,
|
|
4107
|
+
height: size,
|
|
4108
|
+
viewBox: "0 0 24 24",
|
|
4109
|
+
fill: "none",
|
|
4110
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4111
|
+
className,
|
|
4112
|
+
children: [
|
|
4113
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4114
|
+
"path",
|
|
4115
|
+
{
|
|
4116
|
+
d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6z",
|
|
4117
|
+
fill: FILE_TYPE_COLORS.generic,
|
|
4118
|
+
stroke: FILE_TYPE_COLORS.generic,
|
|
4119
|
+
strokeWidth: "1",
|
|
4120
|
+
strokeLinecap: "round",
|
|
4121
|
+
strokeLinejoin: "round"
|
|
4122
|
+
}
|
|
4123
|
+
),
|
|
4124
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4125
|
+
"path",
|
|
4126
|
+
{
|
|
4127
|
+
d: "M14 2v6h6",
|
|
4128
|
+
fill: "none",
|
|
4129
|
+
stroke: FILE_TYPE_COLORS.white,
|
|
4130
|
+
strokeWidth: "1",
|
|
4131
|
+
strokeLinecap: "round",
|
|
4132
|
+
strokeLinejoin: "round"
|
|
4133
|
+
}
|
|
4134
|
+
),
|
|
4135
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4136
|
+
"text",
|
|
4137
|
+
{
|
|
4138
|
+
x: "12",
|
|
4139
|
+
y: "17",
|
|
4140
|
+
fontSize: "10",
|
|
4141
|
+
fill: "white",
|
|
4142
|
+
textAnchor: "middle",
|
|
4143
|
+
fontWeight: "bold",
|
|
4144
|
+
fontFamily: "Arial, sans-serif",
|
|
4145
|
+
children: "?"
|
|
4146
|
+
}
|
|
4147
|
+
)
|
|
4148
|
+
]
|
|
4149
|
+
}
|
|
4150
|
+
);
|
|
4151
|
+
};
|
|
4152
|
+
var AppleIcon = ({
|
|
4153
|
+
size = 20,
|
|
4154
|
+
className = "",
|
|
4155
|
+
"aria-label": ariaLabel,
|
|
4156
|
+
"aria-hidden": ariaHidden = true
|
|
4157
|
+
}) => {
|
|
4158
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4159
|
+
"svg",
|
|
4160
|
+
{
|
|
4161
|
+
className,
|
|
4162
|
+
width: size,
|
|
4163
|
+
height: size,
|
|
4164
|
+
viewBox: "0 0 24 24",
|
|
4165
|
+
fill: "currentColor",
|
|
4166
|
+
"aria-label": ariaLabel,
|
|
4167
|
+
"aria-hidden": ariaHidden,
|
|
4168
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M17.05 20.28c-.98.95-2.05.8-3.08.35-1.09-.46-2.09-.48-3.24 0-1.44.62-2.2.44-3.06-.35C2.79 15.25 3.51 7.59 9.05 7.31c1.35.07 2.29.74 3.08.8 1.18-.24 2.31-.93 3.57-.84 1.51.12 2.65.72 3.4 1.8-3.12 1.87-2.38 5.98.48 7.13-.57 1.5-1.31 2.99-2.54 4.09l.01-.01zM12.03 7.25c-.15-2.23 1.66-4.07 3.74-4.25.29 2.58-2.34 4.5-3.74 4.25z" })
|
|
4169
|
+
}
|
|
4170
|
+
);
|
|
4171
|
+
};
|
|
4172
|
+
var GoogleIcon = ({
|
|
4173
|
+
size = 20,
|
|
4174
|
+
className = "",
|
|
4175
|
+
"aria-label": ariaLabel,
|
|
4176
|
+
"aria-hidden": ariaHidden = true
|
|
4177
|
+
}) => {
|
|
2525
4178
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2526
4179
|
"svg",
|
|
2527
4180
|
{
|
|
4181
|
+
className,
|
|
2528
4182
|
width: size,
|
|
2529
4183
|
height: size,
|
|
2530
4184
|
viewBox: "0 0 24 24",
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
className,
|
|
4185
|
+
"aria-label": ariaLabel,
|
|
4186
|
+
"aria-hidden": ariaHidden,
|
|
2534
4187
|
children: [
|
|
2535
4188
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2536
4189
|
"path",
|
|
2537
4190
|
{
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
stroke: FILE_TYPE_COLORS.generic,
|
|
2541
|
-
strokeWidth: "1",
|
|
2542
|
-
strokeLinecap: "round",
|
|
2543
|
-
strokeLinejoin: "round"
|
|
4191
|
+
fill: "#4285F4",
|
|
4192
|
+
d: "M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"
|
|
2544
4193
|
}
|
|
2545
4194
|
),
|
|
2546
4195
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2547
4196
|
"path",
|
|
2548
4197
|
{
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
stroke: FILE_TYPE_COLORS.white,
|
|
2552
|
-
strokeWidth: "1",
|
|
2553
|
-
strokeLinecap: "round",
|
|
2554
|
-
strokeLinejoin: "round"
|
|
4198
|
+
fill: "#34A853",
|
|
4199
|
+
d: "M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"
|
|
2555
4200
|
}
|
|
2556
4201
|
),
|
|
2557
4202
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2558
|
-
"
|
|
4203
|
+
"path",
|
|
2559
4204
|
{
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
4205
|
+
fill: "#FBBC05",
|
|
4206
|
+
d: "M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"
|
|
4207
|
+
}
|
|
4208
|
+
),
|
|
4209
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4210
|
+
"path",
|
|
4211
|
+
{
|
|
4212
|
+
fill: "#EA4335",
|
|
4213
|
+
d: "M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"
|
|
2568
4214
|
}
|
|
2569
4215
|
)
|
|
2570
4216
|
]
|
|
2571
4217
|
}
|
|
2572
4218
|
);
|
|
2573
4219
|
};
|
|
4220
|
+
var GitHubIcon = ({
|
|
4221
|
+
size = 20,
|
|
4222
|
+
className = "",
|
|
4223
|
+
"aria-label": ariaLabel,
|
|
4224
|
+
"aria-hidden": ariaHidden = true
|
|
4225
|
+
}) => {
|
|
4226
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4227
|
+
"svg",
|
|
4228
|
+
{
|
|
4229
|
+
className,
|
|
4230
|
+
width: size,
|
|
4231
|
+
height: size,
|
|
4232
|
+
viewBox: "0 0 24 24",
|
|
4233
|
+
fill: "currentColor",
|
|
4234
|
+
"aria-label": ariaLabel,
|
|
4235
|
+
"aria-hidden": ariaHidden,
|
|
4236
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4237
|
+
"path",
|
|
4238
|
+
{
|
|
4239
|
+
fillRule: "evenodd",
|
|
4240
|
+
clipRule: "evenodd",
|
|
4241
|
+
d: "M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z"
|
|
4242
|
+
}
|
|
4243
|
+
)
|
|
4244
|
+
}
|
|
4245
|
+
);
|
|
4246
|
+
};
|
|
4247
|
+
var LinkedInIcon = ({
|
|
4248
|
+
size = 20,
|
|
4249
|
+
className = "",
|
|
4250
|
+
"aria-label": ariaLabel,
|
|
4251
|
+
"aria-hidden": ariaHidden = true
|
|
4252
|
+
}) => {
|
|
4253
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4254
|
+
"svg",
|
|
4255
|
+
{
|
|
4256
|
+
className,
|
|
4257
|
+
width: size,
|
|
4258
|
+
height: size,
|
|
4259
|
+
viewBox: "0 0 24 24",
|
|
4260
|
+
fill: "#0A66C2",
|
|
4261
|
+
"aria-label": ariaLabel,
|
|
4262
|
+
"aria-hidden": ariaHidden,
|
|
4263
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z" })
|
|
4264
|
+
}
|
|
4265
|
+
);
|
|
4266
|
+
};
|
|
4267
|
+
var OpenAIIcon = ({
|
|
4268
|
+
size = 16,
|
|
4269
|
+
className = "",
|
|
4270
|
+
"aria-label": ariaLabel = "OpenAI",
|
|
4271
|
+
"aria-hidden": ariaHidden = true
|
|
4272
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4273
|
+
"svg",
|
|
4274
|
+
{
|
|
4275
|
+
className,
|
|
4276
|
+
width: size,
|
|
4277
|
+
height: size,
|
|
4278
|
+
viewBox: "0 0 24 24",
|
|
4279
|
+
"aria-label": ariaLabel,
|
|
4280
|
+
"aria-hidden": ariaHidden,
|
|
4281
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4282
|
+
"path",
|
|
4283
|
+
{
|
|
4284
|
+
fill: "#10A37F",
|
|
4285
|
+
d: "M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z"
|
|
4286
|
+
}
|
|
4287
|
+
)
|
|
4288
|
+
}
|
|
4289
|
+
);
|
|
4290
|
+
var ClaudeIcon = ({
|
|
4291
|
+
size = 16,
|
|
4292
|
+
className = "",
|
|
4293
|
+
"aria-label": ariaLabel = "Claude",
|
|
4294
|
+
"aria-hidden": ariaHidden = true
|
|
4295
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4296
|
+
"svg",
|
|
4297
|
+
{
|
|
4298
|
+
className,
|
|
4299
|
+
width: size,
|
|
4300
|
+
height: size,
|
|
4301
|
+
viewBox: "0 0 24 24",
|
|
4302
|
+
"aria-label": ariaLabel,
|
|
4303
|
+
"aria-hidden": ariaHidden,
|
|
4304
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4305
|
+
"path",
|
|
4306
|
+
{
|
|
4307
|
+
fill: "#D97757",
|
|
4308
|
+
d: "m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z"
|
|
4309
|
+
}
|
|
4310
|
+
)
|
|
4311
|
+
}
|
|
4312
|
+
);
|
|
4313
|
+
var GeminiIcon = ({
|
|
4314
|
+
size = 16,
|
|
4315
|
+
className = "",
|
|
4316
|
+
"aria-label": ariaLabel = "Gemini",
|
|
4317
|
+
"aria-hidden": ariaHidden = true
|
|
4318
|
+
}) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4319
|
+
"svg",
|
|
4320
|
+
{
|
|
4321
|
+
className,
|
|
4322
|
+
width: size,
|
|
4323
|
+
height: size,
|
|
4324
|
+
viewBox: "0 0 24 24",
|
|
4325
|
+
"aria-label": ariaLabel,
|
|
4326
|
+
"aria-hidden": ariaHidden,
|
|
4327
|
+
children: [
|
|
4328
|
+
/* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsxs("linearGradient", { id: "geminiGradient", x1: "0%", y1: "0%", x2: "100%", y2: "100%", children: [
|
|
4329
|
+
/* @__PURE__ */ jsxRuntime.jsx("stop", { offset: "0%", stopColor: "#1BA1E3" }),
|
|
4330
|
+
/* @__PURE__ */ jsxRuntime.jsx("stop", { offset: "25%", stopColor: "#5489D6" }),
|
|
4331
|
+
/* @__PURE__ */ jsxRuntime.jsx("stop", { offset: "50%", stopColor: "#9B72CB" }),
|
|
4332
|
+
/* @__PURE__ */ jsxRuntime.jsx("stop", { offset: "75%", stopColor: "#D96570" }),
|
|
4333
|
+
/* @__PURE__ */ jsxRuntime.jsx("stop", { offset: "100%", stopColor: "#F49C46" })
|
|
4334
|
+
] }) }),
|
|
4335
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4336
|
+
"path",
|
|
4337
|
+
{
|
|
4338
|
+
fill: "url(#geminiGradient)",
|
|
4339
|
+
d: "M11.04 19.32Q12 21.51 12 24q0-2.49.93-4.68.96-2.19 2.58-3.81t3.81-2.55Q21.51 12 24 12q-2.49 0-4.68-.93a12.3 12.3 0 0 1-3.81-2.58 12.3 12.3 0 0 1-2.58-3.81Q12 2.49 12 0q0 2.49-.96 4.68-.93 2.19-2.55 3.81a12.3 12.3 0 0 1-3.81 2.58Q2.49 12 0 12q2.49 0 4.68.96 2.19.93 3.81 2.55t2.55 3.81"
|
|
4340
|
+
}
|
|
4341
|
+
)
|
|
4342
|
+
]
|
|
4343
|
+
}
|
|
4344
|
+
);
|
|
4345
|
+
var FireworksIcon = ({
|
|
4346
|
+
size = 16,
|
|
4347
|
+
className = "",
|
|
4348
|
+
"aria-label": ariaLabel = "Fireworks AI",
|
|
4349
|
+
"aria-hidden": ariaHidden = true
|
|
4350
|
+
}) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4351
|
+
"svg",
|
|
4352
|
+
{
|
|
4353
|
+
className,
|
|
4354
|
+
width: size,
|
|
4355
|
+
height: size,
|
|
4356
|
+
viewBox: "-2 6 36 20",
|
|
4357
|
+
preserveAspectRatio: "xMidYMid meet",
|
|
4358
|
+
fill: "none",
|
|
4359
|
+
style: { minWidth: size, minHeight: size },
|
|
4360
|
+
"aria-label": ariaLabel,
|
|
4361
|
+
"aria-hidden": ariaHidden,
|
|
4362
|
+
children: [
|
|
4363
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4364
|
+
"path",
|
|
4365
|
+
{
|
|
4366
|
+
fill: "#6720FF",
|
|
4367
|
+
d: "M15.9851 19.1274C15.0969 19.1274 14.2999 18.6001 13.96 17.7838L9.86258 8H12.2608L15.9991 16.9499L19.7339 8H22.1321L18.0102 17.7873C17.6686 18.6001 16.8733 19.1274 15.9851 19.1274Z"
|
|
4368
|
+
}
|
|
4369
|
+
),
|
|
4370
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4371
|
+
"path",
|
|
4372
|
+
{
|
|
4373
|
+
fill: "#6720FF",
|
|
4374
|
+
d: "M21.3316 23.8029C20.4469 23.8029 19.6533 23.2792 19.31 22.4698C18.9649 21.6535 19.1436 20.7215 19.7672 20.0891L27.2299 12.5302L28.1618 14.7287L21.3298 21.636L31.068 21.5817L32 23.7802L21.3333 23.8065L21.3298 23.8029H21.3316Z"
|
|
4375
|
+
}
|
|
4376
|
+
),
|
|
4377
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4378
|
+
"path",
|
|
4379
|
+
{
|
|
4380
|
+
fill: "#6720FF",
|
|
4381
|
+
d: "M0 23.7766L0.931955 21.5781L10.6702 21.6324L3.83993 14.7234L4.77189 12.5249L12.2345 20.0838C12.8582 20.7145 13.0386 21.65 12.6918 22.4645C12.3484 23.2756 11.5513 23.7977 10.6702 23.7977L0.00350359 23.7731L0 23.7766Z"
|
|
4382
|
+
}
|
|
4383
|
+
)
|
|
4384
|
+
]
|
|
4385
|
+
}
|
|
4386
|
+
);
|
|
4387
|
+
function ProviderIcon({
|
|
4388
|
+
modelName,
|
|
4389
|
+
provider,
|
|
4390
|
+
size = 16,
|
|
4391
|
+
className = ""
|
|
4392
|
+
}) {
|
|
4393
|
+
const m = (modelName ?? "").toLowerCase();
|
|
4394
|
+
const p = (provider ?? "").toLowerCase();
|
|
4395
|
+
if (m.includes("gpt") || p === "openai") {
|
|
4396
|
+
return /* @__PURE__ */ jsxRuntime.jsx(OpenAIIcon, { size, className });
|
|
4397
|
+
}
|
|
4398
|
+
if (m.includes("claude") || p === "anthropic") {
|
|
4399
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ClaudeIcon, { size, className });
|
|
4400
|
+
}
|
|
4401
|
+
if (m.includes("gemini") || p.startsWith("vertex_ai")) {
|
|
4402
|
+
return /* @__PURE__ */ jsxRuntime.jsx(GeminiIcon, { size, className });
|
|
4403
|
+
}
|
|
4404
|
+
if (p === "google") {
|
|
4405
|
+
return /* @__PURE__ */ jsxRuntime.jsx(GoogleIcon, { size, className });
|
|
4406
|
+
}
|
|
4407
|
+
if (p === "fireworks_ai") {
|
|
4408
|
+
return /* @__PURE__ */ jsxRuntime.jsx(FireworksIcon, { size, className });
|
|
4409
|
+
}
|
|
4410
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4411
|
+
lucideReact.Crown,
|
|
4412
|
+
{
|
|
4413
|
+
className,
|
|
4414
|
+
style: { width: size, height: size, color: "#EAB308", fill: "#EAB308" }
|
|
4415
|
+
}
|
|
4416
|
+
);
|
|
4417
|
+
}
|
|
4418
|
+
var ArbiIcon = ({
|
|
4419
|
+
size = 20,
|
|
4420
|
+
className = "",
|
|
4421
|
+
"aria-label": ariaLabel = "ARBI Docs",
|
|
4422
|
+
"aria-hidden": ariaHidden = false
|
|
4423
|
+
}) => {
|
|
4424
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4425
|
+
"img",
|
|
4426
|
+
{
|
|
4427
|
+
src: "/favicon.svg",
|
|
4428
|
+
alt: ariaLabel,
|
|
4429
|
+
className: `rounded object-contain ${className}`,
|
|
4430
|
+
style: { width: size, height: size },
|
|
4431
|
+
"aria-label": ariaLabel,
|
|
4432
|
+
"aria-hidden": ariaHidden
|
|
4433
|
+
}
|
|
4434
|
+
);
|
|
4435
|
+
};
|
|
4436
|
+
var ArbiBotHeadIcon = ({ size = 24, className = "" }) => {
|
|
4437
|
+
const maskId = React.useId();
|
|
4438
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4439
|
+
"svg",
|
|
4440
|
+
{
|
|
4441
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4442
|
+
width: size,
|
|
4443
|
+
height: size,
|
|
4444
|
+
viewBox: "30 -5 190 190",
|
|
4445
|
+
preserveAspectRatio: "xMidYMid meet",
|
|
4446
|
+
className,
|
|
4447
|
+
children: [
|
|
4448
|
+
/* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsx("mask", { id: maskId, children: /* @__PURE__ */ jsxRuntime.jsxs("g", { transform: "translate(0,250) scale(0.1,-0.1)", children: [
|
|
4449
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "0", y: "0", width: "2500", height: "2500", fill: "white" }),
|
|
4450
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "855", cy: "1715", r: "190", fill: "black" }),
|
|
4451
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "855", cy: "1715", r: "50", fill: "white" }),
|
|
4452
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "1665", cy: "1700", r: "190", fill: "black" }),
|
|
4453
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "1665", cy: "1700", r: "50", fill: "white" })
|
|
4454
|
+
] }) }) }),
|
|
4455
|
+
/* @__PURE__ */ jsxRuntime.jsxs("g", { mask: `url(#${maskId})`, children: [
|
|
4456
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4457
|
+
"g",
|
|
4458
|
+
{
|
|
4459
|
+
transform: "translate(0,250) scale(0.1,-0.1)",
|
|
4460
|
+
fill: "currentColor",
|
|
4461
|
+
stroke: "currentColor",
|
|
4462
|
+
strokeWidth: "100",
|
|
4463
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M1038 2434 c-217 -39 -406 -154 -522 -318 -121 -170 -176 -376 -103 -384 l27 -3 0 -106 c0 -88 -3 -108 -17 -118 -15 -11 -16 -18 -5 -66 44 -188 209 -369 420 -459 l65 -28 -74 -7 c-283 -26 -444 -152 -535 -418 -70 -204 -73 -507 -5 -507 4 0 12 75 19 168 18 263 68 419 167 530 78 87 224 162 263 134 9 -6 43 -26 76 -43 224 -117 802 -95 948 38 38 34 165 -22 253 -111 117 -119 168 -268 187 -549 6 -92 15 -167 19 -167 89 0 53 415 -54 627 -88 173 -238 270 -458 295 l-99 11 75 32 c201 88 367 274 406 454 10 47 9 56 -5 66 -13 10 -16 32 -16 118 l0 106 28 3 c91 10 -12 297 -165 459 -202 214 -544 307 -895 243z m472 -84 c170 -43 323 -140 416 -264 47 -61 117 -197 128 -248 l6 -28 -65 0 c-64 0 -65 1 -78 33 -43 102 -109 136 -262 137 l-110 0 -38 -40 c-25 -27 -46 -40 -65 -41 -134 -5 -394 1 -410 10 -11 6 -30 24 -42 41 l-21 30 -112 0 c-156 -1 -219 -33 -262 -136 -14 -34 -14 -34 -80 -34 -76 0 -74 -7 -30 103 96 243 311 406 595 452 118 20 319 13 430 -15z m-561 -505 c97 -50 126 -174 61 -263 -118 -163 -380 -23 -309 165 35 93 162 143 248 98z m799 -15 c129 -96 69 -304 -92 -318 -189 -16 -265 218 -106 326 48 33 149 29 198 -8z m272 -389 c0 -23 -45 -110 -86 -168 -245 -343 -856 -408 -1231 -130 -90 67 -213 236 -213 294 0 11 132 13 765 13 457 0 765 -4 765 -9z" })
|
|
4464
|
+
}
|
|
4465
|
+
),
|
|
4466
|
+
/* @__PURE__ */ jsxRuntime.jsxs("g", { transform: "translate(0,250) scale(0.1,-0.1)", fill: "currentColor", stroke: "none", children: [
|
|
4467
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M785 1777 c-60 -60 -59 -134 1 -186 92 -82 236 9 204 128 -25 93 -138 125 -205 58z m161 -29 c7 -22 -19 -52 -40 -45 -21 7 -30 35 -17 51 19 23 48 20 57 -6z" }),
|
|
4468
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M1591 1803 c-128 -67 -85 -243 60 -243 83 0 141 99 105 178 -32 69 -103 97 -165 65z m127 -59 c4 -25 -19 -47 -41 -38 -22 8 -30 34 -16 51 17 20 53 12 57 -13z" }),
|
|
4469
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M843 1347 c-9 -15 9 -63 41 -108 148 -202 565 -209 730 -12 37 44 60 103 47 116 -13 13 -810 17 -818 4z" })
|
|
4470
|
+
] })
|
|
4471
|
+
] })
|
|
4472
|
+
]
|
|
4473
|
+
}
|
|
4474
|
+
);
|
|
4475
|
+
};
|
|
4476
|
+
var ArbiBotIcon = ({ size = 24, className = "" }) => {
|
|
4477
|
+
const maskId = React.useId();
|
|
4478
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4479
|
+
"svg",
|
|
4480
|
+
{
|
|
4481
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4482
|
+
width: size,
|
|
4483
|
+
height: size,
|
|
4484
|
+
viewBox: "0 0 250 250",
|
|
4485
|
+
preserveAspectRatio: "xMidYMid meet",
|
|
4486
|
+
className,
|
|
4487
|
+
children: [
|
|
4488
|
+
/* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsx("mask", { id: maskId, children: /* @__PURE__ */ jsxRuntime.jsxs("g", { transform: "translate(0,250) scale(0.1,-0.1)", children: [
|
|
4489
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "0", y: "0", width: "2500", height: "2500", fill: "white" }),
|
|
4490
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "855", cy: "1715", r: "190", fill: "black" }),
|
|
4491
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "855", cy: "1715", r: "50", fill: "white" }),
|
|
4492
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "1665", cy: "1700", r: "190", fill: "black" }),
|
|
4493
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "1665", cy: "1700", r: "50", fill: "white" })
|
|
4494
|
+
] }) }) }),
|
|
4495
|
+
/* @__PURE__ */ jsxRuntime.jsxs("g", { mask: `url(#${maskId})`, children: [
|
|
4496
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4497
|
+
"g",
|
|
4498
|
+
{
|
|
4499
|
+
transform: "translate(0,250) scale(0.1,-0.1)",
|
|
4500
|
+
fill: "currentColor",
|
|
4501
|
+
stroke: "currentColor",
|
|
4502
|
+
strokeWidth: "100",
|
|
4503
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M1038 2434 c-217 -39 -406 -154 -522 -318 -121 -170 -176 -376 -103 -384 l27 -3 0 -106 c0 -88 -3 -108 -17 -118 -15 -11 -16 -18 -5 -66 44 -188 209 -369 420 -459 l65 -28 -74 -7 c-283 -26 -444 -152 -535 -418 -70 -204 -73 -507 -5 -507 4 0 12 75 19 168 18 263 68 419 167 530 78 87 224 162 263 134 9 -6 43 -26 76 -43 224 -117 802 -95 948 38 38 34 165 -22 253 -111 117 -119 168 -268 187 -549 6 -92 15 -167 19 -167 89 0 53 415 -54 627 -88 173 -238 270 -458 295 l-99 11 75 32 c201 88 367 274 406 454 10 47 9 56 -5 66 -13 10 -16 32 -16 118 l0 106 28 3 c91 10 -12 297 -165 459 -202 214 -544 307 -895 243z m472 -84 c170 -43 323 -140 416 -264 47 -61 117 -197 128 -248 l6 -28 -65 0 c-64 0 -65 1 -78 33 -43 102 -109 136 -262 137 l-110 0 -38 -40 c-25 -27 -46 -40 -65 -41 -134 -5 -394 1 -410 10 -11 6 -30 24 -42 41 l-21 30 -112 0 c-156 -1 -219 -33 -262 -136 -14 -34 -14 -34 -80 -34 -76 0 -74 -7 -30 103 96 243 311 406 595 452 118 20 319 13 430 -15z m-561 -505 c97 -50 126 -174 61 -263 -118 -163 -380 -23 -309 165 35 93 162 143 248 98z m799 -15 c129 -96 69 -304 -92 -318 -189 -16 -265 218 -106 326 48 33 149 29 198 -8z m272 -389 c0 -23 -45 -110 -86 -168 -245 -343 -856 -408 -1231 -130 -90 67 -213 236 -213 294 0 11 132 13 765 13 457 0 765 -4 765 -9z" })
|
|
4504
|
+
}
|
|
4505
|
+
),
|
|
4506
|
+
/* @__PURE__ */ jsxRuntime.jsxs("g", { transform: "translate(0,250) scale(0.1,-0.1)", fill: "currentColor", stroke: "none", children: [
|
|
4507
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M785 1777 c-60 -60 -59 -134 1 -186 92 -82 236 9 204 128 -25 93 -138 125 -205 58z m161 -29 c7 -22 -19 -52 -40 -45 -21 7 -30 35 -17 51 19 23 48 20 57 -6z" }),
|
|
4508
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M1591 1803 c-128 -67 -85 -243 60 -243 83 0 141 99 105 178 -32 69 -103 97 -165 65z m127 -59 c4 -25 -19 -47 -41 -38 -22 8 -30 34 -16 51 17 20 53 12 57 -13z" }),
|
|
4509
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M843 1347 c-9 -15 9 -63 41 -108 148 -202 565 -209 730 -12 37 44 60 103 47 116 -13 13 -810 17 -818 4z" }),
|
|
4510
|
+
/* @__PURE__ */ jsxRuntime.jsx("g", { transform: "translate(564,0)", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4511
|
+
"path",
|
|
4512
|
+
{
|
|
4513
|
+
d: "M515 353 c-49 -136 -91 -253 -93 -261 -3 -10 11 -12 60 -10 l63 3 19 53 19 52 91 0 92 0 18 -55 17 -56 62 3 c76 4 79 -24 -30 275 l-88 243 -70 0 -70 0 -90 -247z m215 -55 c0 -4 -27 -8 -59 -8 l-60 0 31 92 31 93 29 -85 c15 -46 28 -88 28 -92z",
|
|
4514
|
+
stroke: "currentColor",
|
|
4515
|
+
strokeWidth: "30"
|
|
4516
|
+
}
|
|
4517
|
+
) })
|
|
4518
|
+
] })
|
|
4519
|
+
] })
|
|
4520
|
+
]
|
|
4521
|
+
}
|
|
4522
|
+
);
|
|
4523
|
+
};
|
|
2574
4524
|
var EntityPill = React.forwardRef(function EntityPill2({
|
|
2575
4525
|
icon,
|
|
2576
4526
|
label,
|
|
@@ -2592,12 +4542,12 @@ var EntityPill = React.forwardRef(function EntityPill2({
|
|
|
2592
4542
|
"data-testid": testId
|
|
2593
4543
|
}, ref) {
|
|
2594
4544
|
const shapeClass = shape === "pill" ? "rounded-full" : "rounded-md";
|
|
2595
|
-
const
|
|
4545
|
+
const sizeClasses2 = size === "base" ? "gap-1.5 px-1.5 py-0.5" : "gap-1 px-1";
|
|
2596
4546
|
const textSizeClass = size === "base" ? "text-base" : "text-sm";
|
|
2597
4547
|
const baseClasses = cn(
|
|
2598
4548
|
"group/pill items-center",
|
|
2599
4549
|
fullWidth ? "flex w-full" : "inline-flex",
|
|
2600
|
-
|
|
4550
|
+
sizeClasses2,
|
|
2601
4551
|
shapeClass,
|
|
2602
4552
|
"bg-muted",
|
|
2603
4553
|
"border border-border",
|
|
@@ -2891,6 +4841,33 @@ function DocumentEntity({
|
|
|
2891
4841
|
}
|
|
2892
4842
|
);
|
|
2893
4843
|
}
|
|
4844
|
+
var TAG_TYPE_LABELS = {
|
|
4845
|
+
checkbox: "Checkbox",
|
|
4846
|
+
select: "Select",
|
|
4847
|
+
number: "Number",
|
|
4848
|
+
text: "Text",
|
|
4849
|
+
folder: "Folder",
|
|
4850
|
+
search: "Saved Search",
|
|
4851
|
+
date: "Date",
|
|
4852
|
+
assistant: "AI Assistant"
|
|
4853
|
+
};
|
|
4854
|
+
var TAG_TYPE_ICONS = {
|
|
4855
|
+
checkbox: lucideReact.SquareCheckBig,
|
|
4856
|
+
select: lucideReact.List,
|
|
4857
|
+
number: lucideReact.Hash,
|
|
4858
|
+
text: lucideReact.StickyNote,
|
|
4859
|
+
folder: lucideReact.Folder,
|
|
4860
|
+
search: lucideReact.Search,
|
|
4861
|
+
date: lucideReact.Calendar,
|
|
4862
|
+
assistant: lucideReact.Bot
|
|
4863
|
+
};
|
|
4864
|
+
function getTagTypeIcon(type) {
|
|
4865
|
+
return TAG_TYPE_ICONS[type ?? "text"] || lucideReact.StickyNote;
|
|
4866
|
+
}
|
|
4867
|
+
function getTagTypeLabel(type) {
|
|
4868
|
+
const t = type ?? "text";
|
|
4869
|
+
return TAG_TYPE_LABELS[t] || t;
|
|
4870
|
+
}
|
|
2894
4871
|
var BASE_COLORS = {
|
|
2895
4872
|
"0": "#10b981",
|
|
2896
4873
|
"1": "#3b82f6",
|
|
@@ -2912,37 +4889,18 @@ var BASE_COLORS = {
|
|
|
2912
4889
|
function getEntityColor(entityId) {
|
|
2913
4890
|
return BASE_COLORS[entityId[4]] || BASE_COLORS["0"];
|
|
2914
4891
|
}
|
|
2915
|
-
var TAG_TYPE_LABELS = {
|
|
2916
|
-
checkbox: "Checkbox",
|
|
2917
|
-
select: "Select",
|
|
2918
|
-
number: "Number",
|
|
2919
|
-
text: "Text",
|
|
2920
|
-
folder: "Folder",
|
|
2921
|
-
search: "Saved Search",
|
|
2922
|
-
date: "Date",
|
|
2923
|
-
assistant: "AI Assistant"
|
|
2924
|
-
};
|
|
2925
|
-
var TAG_TYPE_ICONS = {
|
|
2926
|
-
checkbox: lucideReact.SquareCheckBig,
|
|
2927
|
-
select: lucideReact.List,
|
|
2928
|
-
number: lucideReact.Hash,
|
|
2929
|
-
text: lucideReact.StickyNote,
|
|
2930
|
-
folder: lucideReact.Folder,
|
|
2931
|
-
search: lucideReact.Search,
|
|
2932
|
-
date: lucideReact.Calendar,
|
|
2933
|
-
assistant: lucideReact.Bot
|
|
2934
|
-
};
|
|
2935
4892
|
function TagEntity({
|
|
2936
4893
|
tag,
|
|
2937
4894
|
size = "md",
|
|
2938
4895
|
className = "",
|
|
2939
4896
|
onClick,
|
|
2940
|
-
showTooltip = true
|
|
4897
|
+
showTooltip = true,
|
|
4898
|
+
tooltipContent
|
|
2941
4899
|
}) {
|
|
2942
4900
|
const tagType = tag.tag_type?.type ?? "text";
|
|
2943
4901
|
const iconSize = size === "sm" ? 12 : size === "md" ? 14 : 16;
|
|
2944
|
-
const
|
|
2945
|
-
const
|
|
4902
|
+
const Icon2 = getTagTypeIcon(tagType);
|
|
4903
|
+
const sizeClasses2 = {
|
|
2946
4904
|
sm: "p-0.5",
|
|
2947
4905
|
md: "p-1",
|
|
2948
4906
|
lg: "p-1.5"
|
|
@@ -2951,20 +4909,20 @@ function TagEntity({
|
|
|
2951
4909
|
const iconElement = /* @__PURE__ */ jsxRuntime.jsx(
|
|
2952
4910
|
"span",
|
|
2953
4911
|
{
|
|
2954
|
-
className: `inline-flex items-center justify-center rounded-md text-white flex-shrink-0 ${
|
|
4912
|
+
className: `inline-flex items-center justify-center rounded-md text-white flex-shrink-0 ${sizeClasses2[size]}`,
|
|
2955
4913
|
style: { backgroundColor: tagColor },
|
|
2956
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4914
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Icon2, { size: iconSize, className: "flex-shrink-0" })
|
|
2957
4915
|
}
|
|
2958
4916
|
);
|
|
2959
4917
|
const pillSize = size === "lg" ? "base" : "sm";
|
|
2960
|
-
const
|
|
4918
|
+
const defaultTooltip = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
2961
4919
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2962
4920
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2963
4921
|
"span",
|
|
2964
4922
|
{
|
|
2965
4923
|
className: "inline-flex items-center justify-center rounded-md text-white p-1",
|
|
2966
4924
|
style: { backgroundColor: tagColor },
|
|
2967
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4925
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Icon2, { size: 16 })
|
|
2968
4926
|
}
|
|
2969
4927
|
),
|
|
2970
4928
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-sm", children: tag.name })
|
|
@@ -2972,7 +4930,7 @@ function TagEntity({
|
|
|
2972
4930
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1.5 text-sm", children: [
|
|
2973
4931
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2974
4932
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "Type:" }),
|
|
2975
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children:
|
|
4933
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: getTagTypeLabel(tagType) })
|
|
2976
4934
|
] }),
|
|
2977
4935
|
tag.doctag_count != null && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2978
4936
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "Documents:" }),
|
|
@@ -2980,7 +4938,8 @@ function TagEntity({
|
|
|
2980
4938
|
] }),
|
|
2981
4939
|
tag.shared != null && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: tag.shared ? "Shared" : "Private" }) })
|
|
2982
4940
|
] })
|
|
2983
|
-
] })
|
|
4941
|
+
] });
|
|
4942
|
+
const resolvedTooltip = showTooltip ? tooltipContent ?? defaultTooltip : void 0;
|
|
2984
4943
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2985
4944
|
EntityPill,
|
|
2986
4945
|
{
|
|
@@ -2989,7 +4948,7 @@ function TagEntity({
|
|
|
2989
4948
|
size: pillSize,
|
|
2990
4949
|
shape: "rounded",
|
|
2991
4950
|
labelMaxWidth: "max-w-[180px]",
|
|
2992
|
-
tooltipContent,
|
|
4951
|
+
tooltipContent: resolvedTooltip,
|
|
2993
4952
|
onClick,
|
|
2994
4953
|
className,
|
|
2995
4954
|
"data-testid": `tag-entity-${tag.external_id}`
|
|
@@ -3052,6 +5011,161 @@ function ProjectEntity({
|
|
|
3052
5011
|
}
|
|
3053
5012
|
);
|
|
3054
5013
|
}
|
|
5014
|
+
var sizeClasses = {
|
|
5015
|
+
xs: "h-5 w-5",
|
|
5016
|
+
sm: "h-6 w-6",
|
|
5017
|
+
md: "h-8 w-8",
|
|
5018
|
+
lg: "h-10 w-10"
|
|
5019
|
+
};
|
|
5020
|
+
var textSizeClasses = {
|
|
5021
|
+
xs: "text-xs",
|
|
5022
|
+
sm: "text-xs",
|
|
5023
|
+
md: "text-xs",
|
|
5024
|
+
lg: "text-sm"
|
|
5025
|
+
};
|
|
5026
|
+
var presenceDotClasses = {
|
|
5027
|
+
xs: "w-2 h-2 border",
|
|
5028
|
+
sm: "w-2.5 h-2.5 border",
|
|
5029
|
+
md: "w-3 h-3 border-2",
|
|
5030
|
+
lg: "w-3.5 h-3.5 border-2"
|
|
5031
|
+
};
|
|
5032
|
+
var presencePositionClasses = {
|
|
5033
|
+
xs: "-right-1 bottom-0",
|
|
5034
|
+
sm: "-right-1 bottom-0",
|
|
5035
|
+
md: "-right-1.5 -bottom-0.5",
|
|
5036
|
+
lg: "-right-1.5 -bottom-0.5"
|
|
5037
|
+
};
|
|
5038
|
+
var presenceColorClasses = {
|
|
5039
|
+
connected: "bg-status-online",
|
|
5040
|
+
connecting: "bg-status-connecting",
|
|
5041
|
+
disconnected: "bg-status-away",
|
|
5042
|
+
error: "bg-status-busy",
|
|
5043
|
+
hidden: "bg-status-offline"
|
|
5044
|
+
};
|
|
5045
|
+
var UserEntity = React.memo(function UserEntity2({
|
|
5046
|
+
size = "md",
|
|
5047
|
+
variant = "pill",
|
|
5048
|
+
className,
|
|
5049
|
+
showTooltip = true,
|
|
5050
|
+
interactive = true,
|
|
5051
|
+
hasUnreadMessages = false,
|
|
5052
|
+
initials = "",
|
|
5053
|
+
displayName = "",
|
|
5054
|
+
picture,
|
|
5055
|
+
colorClass = "",
|
|
5056
|
+
isAgent = false,
|
|
5057
|
+
agentStyle,
|
|
5058
|
+
isMe = false,
|
|
5059
|
+
displayStatus,
|
|
5060
|
+
onClick,
|
|
5061
|
+
tooltipContent,
|
|
5062
|
+
empty = false
|
|
5063
|
+
}) {
|
|
5064
|
+
if (empty) {
|
|
5065
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5066
|
+
Avatar,
|
|
5067
|
+
{
|
|
5068
|
+
className: cn(sizeClasses[size], "border border-border", className),
|
|
5069
|
+
"data-testid": "user-entity",
|
|
5070
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(AvatarFallback, { className: "bg-status-empty text-muted-foreground text-xs font-semibold", children: "?" })
|
|
5071
|
+
}
|
|
5072
|
+
);
|
|
5073
|
+
}
|
|
5074
|
+
const agentBadge = isAgent ? /* @__PURE__ */ jsxRuntime.jsx(ArbiBotHeadIcon, { className: "w-3.5 h-3.5 text-muted-foreground" }) : void 0;
|
|
5075
|
+
const chatIcon = interactive && !isMe && !isAgent ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex-shrink-0 ml-0.5", children: [
|
|
5076
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.MessageCircleMore, { className: "w-3.5 h-3.5 text-muted-foreground" }),
|
|
5077
|
+
hasUnreadMessages && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute -top-1 -right-1.5 w-2 h-2 aspect-square rounded-full bg-secondary border border-background" })
|
|
5078
|
+
] }) : void 0;
|
|
5079
|
+
const avatarCore = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5080
|
+
Avatar,
|
|
5081
|
+
{
|
|
5082
|
+
className: cn(
|
|
5083
|
+
sizeClasses[size],
|
|
5084
|
+
isAgent ? "rounded-full border-2 border-dashed" : "border border-white"
|
|
5085
|
+
),
|
|
5086
|
+
style: agentStyle,
|
|
5087
|
+
"data-testid": "user-entity",
|
|
5088
|
+
children: [
|
|
5089
|
+
picture && /* @__PURE__ */ jsxRuntime.jsx(AvatarImage, { src: picture, alt: initials }),
|
|
5090
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5091
|
+
AvatarFallback,
|
|
5092
|
+
{
|
|
5093
|
+
className: cn(
|
|
5094
|
+
textSizeClasses[size],
|
|
5095
|
+
"font-semibold leading-none",
|
|
5096
|
+
isAgent ? "rounded-full bg-transparent" : `text-white ${colorClass}`
|
|
5097
|
+
),
|
|
5098
|
+
style: agentStyle,
|
|
5099
|
+
children: initials
|
|
5100
|
+
}
|
|
5101
|
+
)
|
|
5102
|
+
]
|
|
5103
|
+
}
|
|
5104
|
+
);
|
|
5105
|
+
const presenceDot = displayStatus && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5106
|
+
"div",
|
|
5107
|
+
{
|
|
5108
|
+
className: cn(
|
|
5109
|
+
"absolute rounded-full border-white",
|
|
5110
|
+
presenceDotClasses[size],
|
|
5111
|
+
presencePositionClasses[size],
|
|
5112
|
+
presenceColorClasses[displayStatus]
|
|
5113
|
+
),
|
|
5114
|
+
"data-testid": "user-entity-presence"
|
|
5115
|
+
}
|
|
5116
|
+
);
|
|
5117
|
+
const avatarElement = displayStatus ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5118
|
+
"div",
|
|
5119
|
+
{
|
|
5120
|
+
className: cn(
|
|
5121
|
+
"relative inline-block",
|
|
5122
|
+
sizeClasses[size],
|
|
5123
|
+
variant === "pill" ? "" : className
|
|
5124
|
+
),
|
|
5125
|
+
children: [
|
|
5126
|
+
avatarCore,
|
|
5127
|
+
presenceDot
|
|
5128
|
+
]
|
|
5129
|
+
}
|
|
5130
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("inline-block", variant === "pill" ? "" : className), children: avatarCore });
|
|
5131
|
+
const resolvedTooltip = showTooltip ? tooltipContent : void 0;
|
|
5132
|
+
if (variant === "pill") {
|
|
5133
|
+
if (!interactive) {
|
|
5134
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5135
|
+
EntityPill,
|
|
5136
|
+
{
|
|
5137
|
+
icon: avatarElement,
|
|
5138
|
+
label: displayName,
|
|
5139
|
+
secondaryText: agentBadge,
|
|
5140
|
+
shape: "pill",
|
|
5141
|
+
tooltipContent: resolvedTooltip,
|
|
5142
|
+
className,
|
|
5143
|
+
"data-testid": "user-entity-pill"
|
|
5144
|
+
}
|
|
5145
|
+
);
|
|
5146
|
+
}
|
|
5147
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5148
|
+
EntityPill,
|
|
5149
|
+
{
|
|
5150
|
+
icon: avatarElement,
|
|
5151
|
+
label: displayName,
|
|
5152
|
+
secondaryText: chatIcon || agentBadge,
|
|
5153
|
+
shape: "pill",
|
|
5154
|
+
onClick,
|
|
5155
|
+
tooltipContent: resolvedTooltip,
|
|
5156
|
+
className,
|
|
5157
|
+
"data-testid": "user-entity-pill"
|
|
5158
|
+
}
|
|
5159
|
+
);
|
|
5160
|
+
}
|
|
5161
|
+
if (showTooltip) {
|
|
5162
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Tooltip, { children: [
|
|
5163
|
+
/* @__PURE__ */ jsxRuntime.jsx(TooltipTrigger, { onFocusCapture: (e) => e.stopPropagation(), className: "inline-flex", children: avatarElement }),
|
|
5164
|
+
/* @__PURE__ */ jsxRuntime.jsx(TooltipContent, { className: "p-2", children: tooltipContent })
|
|
5165
|
+
] });
|
|
5166
|
+
}
|
|
5167
|
+
return avatarElement;
|
|
5168
|
+
});
|
|
3055
5169
|
var useArbiUiStore = zustand.create((set) => ({
|
|
3056
5170
|
selectedDocIds: [],
|
|
3057
5171
|
setSelectedDocIds: (ids) => set({ selectedDocIds: ids }),
|
|
@@ -3628,12 +5742,21 @@ Object.defineProperty(exports, "ArbiError", {
|
|
|
3628
5742
|
enumerable: true,
|
|
3629
5743
|
get: function () { return browser.ArbiError; }
|
|
3630
5744
|
});
|
|
5745
|
+
Object.defineProperty(exports, "isMessageType", {
|
|
5746
|
+
enumerable: true,
|
|
5747
|
+
get: function () { return client.isMessageType; }
|
|
5748
|
+
});
|
|
3631
5749
|
exports.AiActionCard = AiActionCard;
|
|
3632
5750
|
exports.AiAnswer = AiAnswer;
|
|
3633
5751
|
exports.AiMarkdown = AiMarkdown;
|
|
5752
|
+
exports.AppleIcon = AppleIcon;
|
|
5753
|
+
exports.ArbiBotHeadIcon = ArbiBotHeadIcon;
|
|
5754
|
+
exports.ArbiBotIcon = ArbiBotIcon;
|
|
3634
5755
|
exports.ArbiChat = ArbiChat;
|
|
3635
5756
|
exports.ArbiChatPanel = ArbiChatPanel;
|
|
5757
|
+
exports.ArbiIcon = ArbiIcon;
|
|
3636
5758
|
exports.ArbiProvider = ArbiProvider;
|
|
5759
|
+
exports.ArbiWebSocketProvider = ArbiWebSocketProvider;
|
|
3637
5760
|
exports.ArtifactCanvas = ArtifactCanvas;
|
|
3638
5761
|
exports.AudIcon = AudIcon;
|
|
3639
5762
|
exports.Avatar = Avatar;
|
|
@@ -3647,40 +5770,150 @@ exports.CardDescription = CardDescription;
|
|
|
3647
5770
|
exports.CardFooter = CardFooter;
|
|
3648
5771
|
exports.CardHeader = CardHeader;
|
|
3649
5772
|
exports.CardTitle = CardTitle;
|
|
5773
|
+
exports.ChatBubble = ChatBubble;
|
|
5774
|
+
exports.Checkbox = Checkbox;
|
|
5775
|
+
exports.CitationRenderer = CitationRenderer;
|
|
5776
|
+
exports.ClaudeIcon = ClaudeIcon;
|
|
5777
|
+
exports.Collapsible = Collapsible;
|
|
5778
|
+
exports.CollapsibleContent = CollapsibleContent2;
|
|
5779
|
+
exports.CollapsibleTrigger = CollapsibleTrigger2;
|
|
5780
|
+
exports.Command = Command;
|
|
5781
|
+
exports.CommandDialog = CommandDialog;
|
|
5782
|
+
exports.CommandEmpty = CommandEmpty;
|
|
5783
|
+
exports.CommandGroup = CommandGroup;
|
|
5784
|
+
exports.CommandInput = CommandInput;
|
|
5785
|
+
exports.CommandItem = CommandItem;
|
|
5786
|
+
exports.CommandList = CommandList;
|
|
5787
|
+
exports.CommandSeparator = CommandSeparator;
|
|
5788
|
+
exports.CommandShortcut = CommandShortcut;
|
|
5789
|
+
exports.Dialog = Dialog;
|
|
5790
|
+
exports.DialogClose = DialogClose;
|
|
5791
|
+
exports.DialogContent = DialogContent;
|
|
5792
|
+
exports.DialogDescription = DialogDescription;
|
|
5793
|
+
exports.DialogFooter = DialogFooter;
|
|
5794
|
+
exports.DialogHeader = DialogHeader;
|
|
5795
|
+
exports.DialogOverlay = DialogOverlay;
|
|
5796
|
+
exports.DialogPortal = DialogPortal;
|
|
5797
|
+
exports.DialogTitle = DialogTitle;
|
|
5798
|
+
exports.DialogTrigger = DialogTrigger;
|
|
5799
|
+
exports.DocIcon = DocIcon;
|
|
3650
5800
|
exports.DocQaPanel = DocQaPanel;
|
|
3651
5801
|
exports.DocSearch = DocSearch;
|
|
3652
5802
|
exports.DocumentEntity = DocumentEntity;
|
|
3653
5803
|
exports.DocumentGallery = DocumentGallery;
|
|
3654
5804
|
exports.DocumentReview = DocumentReview;
|
|
3655
5805
|
exports.DocumentTable = DocumentTable;
|
|
5806
|
+
exports.DropdownMenu = DropdownMenu;
|
|
5807
|
+
exports.DropdownMenuCheckboxItem = DropdownMenuCheckboxItem;
|
|
5808
|
+
exports.DropdownMenuContent = DropdownMenuContent;
|
|
5809
|
+
exports.DropdownMenuGroup = DropdownMenuGroup;
|
|
5810
|
+
exports.DropdownMenuItem = DropdownMenuItem;
|
|
5811
|
+
exports.DropdownMenuLabel = DropdownMenuLabel;
|
|
5812
|
+
exports.DropdownMenuPortal = DropdownMenuPortal;
|
|
5813
|
+
exports.DropdownMenuRadioGroup = DropdownMenuRadioGroup;
|
|
5814
|
+
exports.DropdownMenuRadioItem = DropdownMenuRadioItem;
|
|
5815
|
+
exports.DropdownMenuSeparator = DropdownMenuSeparator;
|
|
5816
|
+
exports.DropdownMenuShortcut = DropdownMenuShortcut;
|
|
5817
|
+
exports.DropdownMenuSub = DropdownMenuSub;
|
|
5818
|
+
exports.DropdownMenuSubContent = DropdownMenuSubContent;
|
|
5819
|
+
exports.DropdownMenuSubTrigger = DropdownMenuSubTrigger;
|
|
5820
|
+
exports.DropdownMenuTrigger = DropdownMenuTrigger;
|
|
3656
5821
|
exports.EmlIcon = EmlIcon;
|
|
3657
5822
|
exports.EntityPill = EntityPill;
|
|
3658
5823
|
exports.FILE_TYPE_COLORS = FILE_TYPE_COLORS;
|
|
3659
5824
|
exports.FileIcon = FileIcon;
|
|
5825
|
+
exports.FireworksIcon = FireworksIcon;
|
|
5826
|
+
exports.GeminiIcon = GeminiIcon;
|
|
5827
|
+
exports.GitHubIcon = GitHubIcon;
|
|
5828
|
+
exports.GoogleIcon = GoogleIcon;
|
|
3660
5829
|
exports.HoverCard = HoverCard;
|
|
3661
5830
|
exports.HoverCardContent = HoverCardContent;
|
|
3662
5831
|
exports.HoverCardTrigger = HoverCardTrigger;
|
|
5832
|
+
exports.HtmlIcon = HtmlIcon;
|
|
3663
5833
|
exports.ImgIcon = ImgIcon;
|
|
3664
5834
|
exports.Input = Input;
|
|
5835
|
+
exports.Label = Label;
|
|
5836
|
+
exports.LinkedInIcon = LinkedInIcon;
|
|
5837
|
+
exports.MessageArtifactCard = MessageArtifactCard;
|
|
5838
|
+
exports.OpenAIIcon = OpenAIIcon;
|
|
3665
5839
|
exports.PdfIcon = PdfIcon;
|
|
5840
|
+
exports.Popover = Popover;
|
|
5841
|
+
exports.PopoverAnchor = PopoverAnchor;
|
|
5842
|
+
exports.PopoverContent = PopoverContent;
|
|
5843
|
+
exports.PopoverTrigger = PopoverTrigger;
|
|
5844
|
+
exports.Progress = Progress;
|
|
3666
5845
|
exports.ProjectEntity = ProjectEntity;
|
|
5846
|
+
exports.ProviderIcon = ProviderIcon;
|
|
5847
|
+
exports.RadioGroup = RadioGroup;
|
|
5848
|
+
exports.RadioGroupItem = RadioGroupItem;
|
|
5849
|
+
exports.ScrollArea = ScrollArea;
|
|
5850
|
+
exports.ScrollBar = ScrollBar;
|
|
5851
|
+
exports.Select = Select;
|
|
5852
|
+
exports.SelectContent = SelectContent;
|
|
5853
|
+
exports.SelectGroup = SelectGroup;
|
|
5854
|
+
exports.SelectItem = SelectItem;
|
|
5855
|
+
exports.SelectLabel = SelectLabel;
|
|
5856
|
+
exports.SelectScrollDownButton = SelectScrollDownButton;
|
|
5857
|
+
exports.SelectScrollUpButton = SelectScrollUpButton;
|
|
5858
|
+
exports.SelectSeparator = SelectSeparator;
|
|
5859
|
+
exports.SelectTrigger = SelectTrigger;
|
|
5860
|
+
exports.SelectValue = SelectValue;
|
|
5861
|
+
exports.Separator = Separator;
|
|
5862
|
+
exports.Slider = Slider;
|
|
5863
|
+
exports.Switch = Switch;
|
|
5864
|
+
exports.TAG_TYPE_ICONS = TAG_TYPE_ICONS;
|
|
5865
|
+
exports.TAG_TYPE_LABELS = TAG_TYPE_LABELS;
|
|
5866
|
+
exports.Table = Table;
|
|
5867
|
+
exports.TableBody = TableBody;
|
|
5868
|
+
exports.TableCaption = TableCaption;
|
|
5869
|
+
exports.TableCell = TableCell;
|
|
5870
|
+
exports.TableFooter = TableFooter;
|
|
5871
|
+
exports.TableHead = TableHead;
|
|
5872
|
+
exports.TableHeader = TableHeader;
|
|
5873
|
+
exports.TableRow = TableRow;
|
|
5874
|
+
exports.Tabs = Tabs;
|
|
5875
|
+
exports.TabsContent = TabsContent;
|
|
5876
|
+
exports.TabsList = TabsList;
|
|
5877
|
+
exports.TabsTrigger = TabsTrigger;
|
|
3667
5878
|
exports.TagEntity = TagEntity;
|
|
5879
|
+
exports.Textarea = Textarea;
|
|
5880
|
+
exports.Toggle = Toggle;
|
|
5881
|
+
exports.ToggleGroup = ToggleGroup;
|
|
5882
|
+
exports.ToggleGroupItem = ToggleGroupItem;
|
|
3668
5883
|
exports.Tooltip = Tooltip;
|
|
3669
5884
|
exports.TooltipContent = TooltipContent;
|
|
3670
5885
|
exports.TooltipProvider = TooltipProvider;
|
|
3671
5886
|
exports.TooltipTrigger = TooltipTrigger;
|
|
5887
|
+
exports.TxtIcon = TxtIcon;
|
|
5888
|
+
exports.TypingIndicator = TypingIndicator;
|
|
5889
|
+
exports.UserEntity = UserEntity;
|
|
3672
5890
|
exports.VidIcon = VidIcon;
|
|
5891
|
+
exports.XlsIcon = XlsIcon;
|
|
3673
5892
|
exports.arbiQueryKeys = arbiQueryKeys;
|
|
3674
5893
|
exports.badgeVariants = badgeVariants;
|
|
3675
5894
|
exports.buttonVariants = buttonVariants;
|
|
5895
|
+
exports.cardVariants = cardVariants;
|
|
3676
5896
|
exports.cn = cn;
|
|
5897
|
+
exports.getTagTypeIcon = getTagTypeIcon;
|
|
5898
|
+
exports.getTagTypeLabel = getTagTypeLabel;
|
|
5899
|
+
exports.markdownBaseComponents = markdownBaseComponents;
|
|
3677
5900
|
exports.redlineStats = redlineStats;
|
|
3678
5901
|
exports.textToArtifact = textToArtifact;
|
|
3679
5902
|
exports.toRedlineMarkdown = toRedlineMarkdown;
|
|
5903
|
+
exports.toggleVariants = toggleVariants;
|
|
3680
5904
|
exports.useAgents = useAgents;
|
|
3681
5905
|
exports.useAiTask = useAiTask;
|
|
3682
5906
|
exports.useArbi = useArbi;
|
|
5907
|
+
exports.useArbiConnected = useArbiConnected;
|
|
5908
|
+
exports.useArbiDocumentSync = useArbiDocumentSync;
|
|
3683
5909
|
exports.useArbiUiStore = useArbiUiStore;
|
|
5910
|
+
exports.useArbiWebSocket = useArbiWebSocket;
|
|
5911
|
+
exports.useArbiWsContext = useArbiWsContext;
|
|
5912
|
+
exports.useArbiWsMessage = useArbiWsMessage;
|
|
5913
|
+
exports.useArbiWsStatus = useArbiWsStatus;
|
|
5914
|
+
exports.useArbiWsStore = useArbiWsStore;
|
|
5915
|
+
exports.useArbiWsTask = useArbiWsTask;
|
|
5916
|
+
exports.useArbiWsTasks = useArbiWsTasks;
|
|
3684
5917
|
exports.useAssistantQuery = useAssistantQuery;
|
|
3685
5918
|
exports.useConfigs = useConfigs;
|
|
3686
5919
|
exports.useConversations = useConversations;
|