@arbidocs/blocks 0.3.160 → 0.3.162
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 +348 -31
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +156 -3
- package/dist/index.d.ts +156 -3
- package/dist/index.js +345 -33
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { formatPageRefs, tid, initials, fromNow, fmtDate, assetRefId, applyStoredTheme, AssetResolverProvider, ThemeEditor, applyThemeVars, SectionHeading, PricingTable, Tabs as Tabs$1, Accordion, Gallery, VideoEmbed, ContactForm, Banner, MediaText, TeamGrid, Steps, TestimonialGrid, Columns, Spacer, Container, Hero, FeatureGrid, Testimonial, CTABanner, LogoCloud, FAQ, Timeline, RichTextBlock, Callout, BlockImage, AvatarBlock, Navbar, Footer, ListBlock, isAssetRef, asAssetRef } from './chunk-27Q4AST5.js';
|
|
2
2
|
export { ASSET_REF_PREFIX, Accordion, AssetResolverProvider, AvatarBlock, Banner, BlockImage, BlockLink, CTABanner, Callout, Columns, ContactForm, Container, FAQ, FONT_PAIRINGS, FeatureGrid, Footer, Gallery, Hero, ListBlock, LogoCloud, MediaText, Navbar, PricingTable, RichTextBlock, SectionHeading, Spacer, Steps, THEME_STYLE_ID, Tabs, TeamGrid, Testimonial, TestimonialGrid, ThemeEditor, Timeline, TimelineCalendar, TimelineGantt, VideoEmbed, applyFontVars, applyStoredTheme, applyThemeVars, asAssetRef, assetRefId, clearFontVars, clearThemeVars, createThemeStore, dayKey, daysUntil, fmtDate, fmtDateTime, fontPackages, formatPageRefs, formatSpan, fromNow, gbp, getFontPairing, hrs, initials, isAssetRef, matchFontPairing, monthLabel, parseIso, pct, tid, toEmbedUrl, toHslTriplet, useAssetRenderer, useAssetResolverActive, utcDay } from './chunk-27Q4AST5.js';
|
|
3
3
|
import { createContext, useState, useRef, useEffect, useMemo, useCallback, useContext } from 'react';
|
|
4
|
-
import { MessageSquare, Cpu, Code, Cloud, Layers, Target, Award, MapPin, Phone, Mail, Lock, Globe, Heart, Star, Rocket, Shield, Zap, Sparkles, Gavel, Scale, Bell, Activity, BarChart3, DollarSign, TrendingUp, Info, AlertCircle, CheckCircle, Clock, Calendar, Briefcase, Users, Folder, FileText, X, Loader2, UploadCloud, Search, Pencil, ChevronDown, ArrowUpRight, ArrowDownRight,
|
|
4
|
+
import { MessageSquare, Cpu, Code, Cloud, Layers, Target, Award, MapPin, Phone, Mail, Lock, Globe, Heart, Star, Rocket, Shield, Zap, Sparkles, Gavel, Scale, Bell, Activity, BarChart3, DollarSign, TrendingUp, Info, AlertCircle, CheckCircle, Clock, Calendar, Briefcase, Users, Folder, FileText, X, Loader2, UploadCloud, Search, Pencil, ChevronDown, ArrowUpRight, ArrowDownRight, Plus, FolderLock, CheckCircle2, ArrowLeftRight, MessagesSquare, Menu, ArrowLeft, Palette, RotateCcw, ChevronUp, BrainCircuit, Bot, LayoutGrid, FileJson, Download, Crop, ImagePlus, Upload, Link2, Check } from 'lucide-react';
|
|
5
5
|
import { cn, DocumentEntity, useArbi, ArbiProvider, useAiTask, useWorkspaceDocs as useWorkspaceDocs$1, useSemanticSearch as useSemanticSearch$1, Table, TableHeader, TableRow, TableHead, TableBody, TableCell, Input, Textarea, Avatar, AvatarImage, AvatarFallback, Card, Button, CardHeader, CardTitle, CardDescription, CardContent, Tooltip, TooltipTrigger, TooltipContent, CardFooter, TooltipProvider, NotificationBell, UserMenu, useThumbnails, Badge, Switch, useConfigs, useAgents, Checkbox, Tabs, TabsList, TabsTrigger, TabsContent, Separator, ArbiWebSocketProvider, useDocuments, ImageCropModal, DEFAULT_ASPECT_OPTIONS, useConversations } from '@arbidocs/react';
|
|
6
6
|
export { DocumentCard, Table, TableBody, TableCell, TableHead, TableHeader, TableRow, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, redlineStats, textToArtifact, toRedlineMarkdown } from '@arbidocs/react';
|
|
7
7
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -643,10 +643,10 @@ function DataTableBlock({ columns, rows, caption, emptyText, testId }) {
|
|
|
643
643
|
] });
|
|
644
644
|
}
|
|
645
645
|
var arbiTheme = themeQuartz.withParams({
|
|
646
|
-
// Font settings
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
646
|
+
// Font settings — inherit the host app's font. A googleFont here never
|
|
647
|
+
// loaded under the apps' CSP, so every grid silently fell back to the
|
|
648
|
+
// browser's default SERIF and read as unstyled.
|
|
649
|
+
fontFamily: "inherit",
|
|
650
650
|
fontSize: 14,
|
|
651
651
|
headerFontSize: 13,
|
|
652
652
|
headerFontWeight: 600,
|
|
@@ -1039,6 +1039,42 @@ function GridView({
|
|
|
1039
1039
|
}
|
|
1040
1040
|
) });
|
|
1041
1041
|
}
|
|
1042
|
+
function UsageMeter({
|
|
1043
|
+
icon: Icon,
|
|
1044
|
+
label,
|
|
1045
|
+
value,
|
|
1046
|
+
pct: pct2,
|
|
1047
|
+
hint,
|
|
1048
|
+
className,
|
|
1049
|
+
testId
|
|
1050
|
+
}) {
|
|
1051
|
+
const clamped = Math.max(0, Math.min(100, pct2));
|
|
1052
|
+
const tone = clamped >= 100 ? "bg-destructive" : clamped >= 80 ? "bg-amber-500" : "bg-primary";
|
|
1053
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("space-y-1.5", className), "data-testid": testId, children: [
|
|
1054
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-3 text-sm", children: [
|
|
1055
|
+
/* @__PURE__ */ jsxs("span", { className: "flex min-w-0 items-center gap-1.5 text-muted-foreground", children: [
|
|
1056
|
+
Icon && /* @__PURE__ */ jsx(Icon, { className: "size-3.5 shrink-0" }),
|
|
1057
|
+
/* @__PURE__ */ jsxs("span", { className: "truncate", children: [
|
|
1058
|
+
label,
|
|
1059
|
+
hint ? ` (${hint})` : ""
|
|
1060
|
+
] })
|
|
1061
|
+
] }),
|
|
1062
|
+
/* @__PURE__ */ jsx("span", { className: "shrink-0 font-medium tabular-nums text-foreground", children: value })
|
|
1063
|
+
] }),
|
|
1064
|
+
/* @__PURE__ */ jsx("div", { className: "h-1.5 overflow-hidden rounded-full bg-muted", children: /* @__PURE__ */ jsx(
|
|
1065
|
+
"div",
|
|
1066
|
+
{
|
|
1067
|
+
className: cn("h-full rounded-full transition-[width]", tone),
|
|
1068
|
+
style: { width: `${clamped}%` },
|
|
1069
|
+
role: "progressbar",
|
|
1070
|
+
"aria-valuenow": clamped,
|
|
1071
|
+
"aria-valuemin": 0,
|
|
1072
|
+
"aria-valuemax": 100,
|
|
1073
|
+
"aria-label": label
|
|
1074
|
+
}
|
|
1075
|
+
) })
|
|
1076
|
+
] });
|
|
1077
|
+
}
|
|
1042
1078
|
function UploadDropzone({
|
|
1043
1079
|
onFiles,
|
|
1044
1080
|
accept,
|
|
@@ -1304,21 +1340,26 @@ function IdentityFieldRow({ field, canEdit }) {
|
|
|
1304
1340
|
children: charsLeft < 0 ? `${-charsLeft} over` : `${charsLeft} left`
|
|
1305
1341
|
}
|
|
1306
1342
|
)
|
|
1307
|
-
] }) :
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
"
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1343
|
+
] }) : (
|
|
1344
|
+
// `identity-field` (not the generic `group`) scopes the pencil's hover
|
|
1345
|
+
// to THIS field only — an ancestor card also carries `group`, so a
|
|
1346
|
+
// `.group:hover` rule would reveal every field's pencil at once.
|
|
1347
|
+
/* @__PURE__ */ jsxs("span", { className: "identity-field flex min-w-0 items-center gap-1.5", children: [
|
|
1348
|
+
/* @__PURE__ */ jsx("span", { className: cn("px-1.5 py-0.5", valueClassName), "data-testid": testId, children: value || /* @__PURE__ */ jsx("span", { className: "italic text-muted-foreground", children: placeholder }) }),
|
|
1349
|
+
canEdit && /* @__PURE__ */ jsx(
|
|
1350
|
+
"button",
|
|
1351
|
+
{
|
|
1352
|
+
type: "button",
|
|
1353
|
+
onClick: () => setIsEditing(true),
|
|
1354
|
+
"aria-label": `Edit ${label.toLowerCase()}`,
|
|
1355
|
+
title: `Edit ${label.toLowerCase()}`,
|
|
1356
|
+
className: "shrink-0 cursor-pointer rounded p-1 text-muted-foreground opacity-0 transition-[color,background-color,opacity] hover:bg-accent hover:text-foreground focus-visible:opacity-100 [.identity-field:hover_&]:opacity-100",
|
|
1357
|
+
"data-testid": testId && `${testId}-edit`,
|
|
1358
|
+
children: /* @__PURE__ */ jsx(Pencil, { className: "size-3.5" })
|
|
1359
|
+
}
|
|
1360
|
+
)
|
|
1361
|
+
] })
|
|
1362
|
+
),
|
|
1322
1363
|
trailing ? /* @__PURE__ */ jsx("div", { className: "ml-auto shrink-0", children: trailing }) : null
|
|
1323
1364
|
] })
|
|
1324
1365
|
] });
|
|
@@ -1427,6 +1468,7 @@ function RecentActivityCard({
|
|
|
1427
1468
|
actionLabel,
|
|
1428
1469
|
actionIcon: ActionIcon,
|
|
1429
1470
|
onAction,
|
|
1471
|
+
action,
|
|
1430
1472
|
rows,
|
|
1431
1473
|
caption,
|
|
1432
1474
|
emptyText,
|
|
@@ -1443,7 +1485,11 @@ function RecentActivityCard({
|
|
|
1443
1485
|
// scrolling inside a fixed-height card puts a scrollbar in the middle
|
|
1444
1486
|
// of the page, where every other page in the app scrolls at its outer
|
|
1445
1487
|
// edge. The page is the scroll container; the card is just tall.
|
|
1446
|
-
|
|
1488
|
+
//
|
|
1489
|
+
// No `card-hover` lift: the card is a container, not a single link — its
|
|
1490
|
+
// header and each row have their OWN hover, so a whole-card lift on any
|
|
1491
|
+
// hover would highlight the section instead of the item under the cursor.
|
|
1492
|
+
"flex flex-col overflow-hidden rounded-xl bg-card p-0 shadow-sm",
|
|
1447
1493
|
className
|
|
1448
1494
|
),
|
|
1449
1495
|
"data-testid": testId,
|
|
@@ -1460,12 +1506,11 @@ function RecentActivityCard({
|
|
|
1460
1506
|
children: [
|
|
1461
1507
|
Icon && /* @__PURE__ */ jsx(Icon, { className: "size-4 shrink-0 text-muted-foreground" }),
|
|
1462
1508
|
/* @__PURE__ */ jsx("span", { className: "whitespace-nowrap text-sm font-semibold text-foreground", children: title }),
|
|
1463
|
-
count !== void 0 && /* @__PURE__ */ jsx("span", { className: "text-xs tabular-nums text-muted-foreground", children: count })
|
|
1464
|
-
onOpen && /* @__PURE__ */ jsx(ChevronRight, { className: "ml-auto size-4 shrink-0 text-muted-foreground/50 transition-transform group-hover:translate-x-0.5 group-hover:text-foreground" })
|
|
1509
|
+
count !== void 0 && /* @__PURE__ */ jsx("span", { className: "text-xs tabular-nums text-muted-foreground", children: count })
|
|
1465
1510
|
]
|
|
1466
1511
|
}
|
|
1467
1512
|
),
|
|
1468
|
-
actionLabel ? /* @__PURE__ */ jsxs(
|
|
1513
|
+
action ? /* @__PURE__ */ jsx("div", { className: "shrink-0", children: action }) : actionLabel ? /* @__PURE__ */ jsxs(
|
|
1469
1514
|
Button,
|
|
1470
1515
|
{
|
|
1471
1516
|
variant: "ghost",
|
|
@@ -1489,10 +1534,10 @@ function RecentActivityCard({
|
|
|
1489
1534
|
{
|
|
1490
1535
|
type: "button",
|
|
1491
1536
|
onClick: onAction,
|
|
1492
|
-
className: "group m-3 flex flex-1 cursor-pointer flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed border-border px-4 text-center transition-colors hover:border-
|
|
1537
|
+
className: "group m-3 flex flex-1 cursor-pointer flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed border-border px-4 text-center transition-colors hover:border-border hover:bg-accent/50 focus-visible:border-border focus-visible:bg-accent/50 focus-visible:outline-none",
|
|
1493
1538
|
"data-testid": testId && `${testId}-empty-action`,
|
|
1494
1539
|
children: [
|
|
1495
|
-
/* @__PURE__ */ jsx("span", { className: "flex size-11 items-center justify-center rounded-full bg-primary/10 text-primary transition-colors group-hover:bg-primary group-hover:text-primary-foreground", children: ActionIcon ? /* @__PURE__ */ jsx(ActionIcon, { className: "size-5" }) : /* @__PURE__ */ jsx(Plus, { className: "size-5" }) }),
|
|
1540
|
+
/* @__PURE__ */ jsx("span", { className: "mt-6 flex size-11 items-center justify-center rounded-full bg-primary/10 text-primary transition-colors group-hover:bg-primary group-hover:text-primary-foreground", children: ActionIcon ? /* @__PURE__ */ jsx(ActionIcon, { className: "size-5" }) : /* @__PURE__ */ jsx(Plus, { className: "size-5" }) }),
|
|
1496
1541
|
/* @__PURE__ */ jsx("span", { className: "text-sm font-semibold text-foreground", children: emptyActionLabel ?? actionLabel }),
|
|
1497
1542
|
/* @__PURE__ */ jsx("span", { className: "text-xs leading-relaxed text-muted-foreground", children: emptyText })
|
|
1498
1543
|
]
|
|
@@ -1514,12 +1559,13 @@ function RecentActivityCard({
|
|
|
1514
1559
|
{
|
|
1515
1560
|
className: cn(
|
|
1516
1561
|
"group relative flex items-center border-b border-border/60 transition-colors last:border-b-0",
|
|
1517
|
-
//
|
|
1518
|
-
//
|
|
1519
|
-
//
|
|
1520
|
-
//
|
|
1521
|
-
|
|
1522
|
-
|
|
1562
|
+
// Clearly highlight the row under the cursor so it's obvious
|
|
1563
|
+
// which item will be clicked. Use the ungated `[&:hover]`
|
|
1564
|
+
// selector rather than `hover:` — the latter compiles behind
|
|
1565
|
+
// `@media (hover: hover)`, so on a touchscreen (primary pointer
|
|
1566
|
+
// reports `hover: none`) the highlight never shows even with a
|
|
1567
|
+
// real mouse attached.
|
|
1568
|
+
"[&:hover]:bg-primary/10 has-[button:focus-visible]:bg-primary/10"
|
|
1523
1569
|
),
|
|
1524
1570
|
children: [
|
|
1525
1571
|
/* @__PURE__ */ jsxs(
|
|
@@ -1555,6 +1601,272 @@ function RecentActivityCard({
|
|
|
1555
1601
|
}
|
|
1556
1602
|
);
|
|
1557
1603
|
}
|
|
1604
|
+
function AskBar({
|
|
1605
|
+
onAsk,
|
|
1606
|
+
onSearch,
|
|
1607
|
+
suggestions = [],
|
|
1608
|
+
placeholder = "Ask anything\u2026",
|
|
1609
|
+
askLabel = "Ask",
|
|
1610
|
+
searchLabel = "Search",
|
|
1611
|
+
value,
|
|
1612
|
+
onValueChange,
|
|
1613
|
+
onInputKeyDown,
|
|
1614
|
+
menu,
|
|
1615
|
+
inputRef: externalInputRef,
|
|
1616
|
+
className,
|
|
1617
|
+
testId = "ask-bar"
|
|
1618
|
+
}) {
|
|
1619
|
+
const [innerText, setInnerText] = useState("");
|
|
1620
|
+
const text = value !== void 0 ? value : innerText;
|
|
1621
|
+
const setText = (next) => {
|
|
1622
|
+
onValueChange?.(next);
|
|
1623
|
+
if (value === void 0) setInnerText(next);
|
|
1624
|
+
};
|
|
1625
|
+
const localInputRef = useRef(null);
|
|
1626
|
+
const inputRef = externalInputRef ?? localInputRef;
|
|
1627
|
+
const submitTo = (handler) => {
|
|
1628
|
+
const question = text.trim();
|
|
1629
|
+
if (!question) return;
|
|
1630
|
+
handler(question);
|
|
1631
|
+
setText("");
|
|
1632
|
+
};
|
|
1633
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-2", className), "data-testid": testId, children: [
|
|
1634
|
+
/* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
1635
|
+
menu,
|
|
1636
|
+
/* @__PURE__ */ jsxs(
|
|
1637
|
+
"form",
|
|
1638
|
+
{
|
|
1639
|
+
onSubmit: (e) => {
|
|
1640
|
+
e.preventDefault();
|
|
1641
|
+
submitTo(onAsk);
|
|
1642
|
+
},
|
|
1643
|
+
className: "flex h-12 items-center gap-1.5 rounded-md border border-border/50 bg-background pl-3 pr-1.5 transition-colors focus-within:border-border",
|
|
1644
|
+
children: [
|
|
1645
|
+
/* @__PURE__ */ jsx(Search, { className: "pointer-events-none size-4 shrink-0 text-muted-foreground" }),
|
|
1646
|
+
/* @__PURE__ */ jsx(
|
|
1647
|
+
"input",
|
|
1648
|
+
{
|
|
1649
|
+
ref: inputRef,
|
|
1650
|
+
type: "text",
|
|
1651
|
+
value: text,
|
|
1652
|
+
onChange: (e) => setText(e.target.value),
|
|
1653
|
+
onKeyDown: onInputKeyDown,
|
|
1654
|
+
placeholder,
|
|
1655
|
+
className: "h-8 min-w-0 flex-1 bg-transparent text-sm text-foreground outline-none placeholder:text-muted-foreground",
|
|
1656
|
+
"data-testid": testId && `${testId}-input`
|
|
1657
|
+
}
|
|
1658
|
+
),
|
|
1659
|
+
onSearch && /* @__PURE__ */ jsx(
|
|
1660
|
+
Button,
|
|
1661
|
+
{
|
|
1662
|
+
type: "button",
|
|
1663
|
+
variant: "ghost",
|
|
1664
|
+
size: "sm",
|
|
1665
|
+
disabled: !text.trim(),
|
|
1666
|
+
onClick: () => submitTo(onSearch),
|
|
1667
|
+
className: "h-8 shrink-0 px-2.5 text-xs font-medium text-muted-foreground hover:text-foreground",
|
|
1668
|
+
"data-testid": testId && `${testId}-search`,
|
|
1669
|
+
children: searchLabel
|
|
1670
|
+
}
|
|
1671
|
+
),
|
|
1672
|
+
/* @__PURE__ */ jsxs(
|
|
1673
|
+
Button,
|
|
1674
|
+
{
|
|
1675
|
+
type: "submit",
|
|
1676
|
+
size: "sm",
|
|
1677
|
+
disabled: !text.trim(),
|
|
1678
|
+
className: "h-8 shrink-0 px-3 text-xs font-medium",
|
|
1679
|
+
"data-testid": testId && `${testId}-submit`,
|
|
1680
|
+
children: [
|
|
1681
|
+
/* @__PURE__ */ jsx(Sparkles, { className: "size-3.5" }),
|
|
1682
|
+
askLabel
|
|
1683
|
+
]
|
|
1684
|
+
}
|
|
1685
|
+
)
|
|
1686
|
+
]
|
|
1687
|
+
}
|
|
1688
|
+
)
|
|
1689
|
+
] }),
|
|
1690
|
+
suggestions.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1.5", children: suggestions.map((s) => /* @__PURE__ */ jsx(
|
|
1691
|
+
"button",
|
|
1692
|
+
{
|
|
1693
|
+
type: "button",
|
|
1694
|
+
onClick: () => {
|
|
1695
|
+
setText(s);
|
|
1696
|
+
inputRef.current?.focus();
|
|
1697
|
+
},
|
|
1698
|
+
className: "rounded-full border border-border/50 bg-card px-3 py-1 text-xs text-muted-foreground transition-colors hover:border-border hover:bg-accent hover:text-foreground",
|
|
1699
|
+
"data-testid": testId && `${testId}-suggestion`,
|
|
1700
|
+
children: s
|
|
1701
|
+
},
|
|
1702
|
+
s
|
|
1703
|
+
)) })
|
|
1704
|
+
] });
|
|
1705
|
+
}
|
|
1706
|
+
function ResumeStrip({
|
|
1707
|
+
items,
|
|
1708
|
+
caption = "Pick up where you left off",
|
|
1709
|
+
className,
|
|
1710
|
+
testId = "resume-strip"
|
|
1711
|
+
}) {
|
|
1712
|
+
if (items.length === 0) return null;
|
|
1713
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-1.5", className), "data-testid": testId, children: [
|
|
1714
|
+
/* @__PURE__ */ jsx("p", { className: "text-[11px] font-medium uppercase tracking-wide text-muted-foreground", children: caption }),
|
|
1715
|
+
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-2", children: items.map((item) => /* @__PURE__ */ jsxs(
|
|
1716
|
+
"button",
|
|
1717
|
+
{
|
|
1718
|
+
type: "button",
|
|
1719
|
+
onClick: item.onClick,
|
|
1720
|
+
title: item.title,
|
|
1721
|
+
className: "group flex min-w-0 items-center gap-2 rounded-lg border border-border/50 bg-card py-2 pl-2.5 pr-3 shadow-sm transition-colors hover:border-border hover:bg-accent/50",
|
|
1722
|
+
"data-testid": testId && `${testId}-item`,
|
|
1723
|
+
children: [
|
|
1724
|
+
item.leading,
|
|
1725
|
+
/* @__PURE__ */ jsx("span", { className: "max-w-[14rem] truncate text-sm font-medium text-foreground group-hover:text-primary", children: item.title }),
|
|
1726
|
+
item.meta && /* @__PURE__ */ jsx("span", { className: "shrink-0 text-[11px] text-muted-foreground", children: item.meta })
|
|
1727
|
+
]
|
|
1728
|
+
},
|
|
1729
|
+
item.id
|
|
1730
|
+
)) })
|
|
1731
|
+
] });
|
|
1732
|
+
}
|
|
1733
|
+
function SectionStrip({
|
|
1734
|
+
icon: Icon,
|
|
1735
|
+
title,
|
|
1736
|
+
count,
|
|
1737
|
+
onOpen,
|
|
1738
|
+
actions = [],
|
|
1739
|
+
groups,
|
|
1740
|
+
empty,
|
|
1741
|
+
className,
|
|
1742
|
+
testId = "section-strip"
|
|
1743
|
+
}) {
|
|
1744
|
+
const filledGroups = groups.filter((g) => g.rows.length > 0);
|
|
1745
|
+
return /* @__PURE__ */ jsxs(
|
|
1746
|
+
"div",
|
|
1747
|
+
{
|
|
1748
|
+
className: cn("rounded-xl border border-border/60 bg-card p-2 shadow-sm", className),
|
|
1749
|
+
"data-testid": testId,
|
|
1750
|
+
children: [
|
|
1751
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
|
|
1752
|
+
/* @__PURE__ */ jsxs(
|
|
1753
|
+
"button",
|
|
1754
|
+
{
|
|
1755
|
+
type: "button",
|
|
1756
|
+
onClick: onOpen,
|
|
1757
|
+
disabled: !onOpen,
|
|
1758
|
+
className: "group flex min-w-0 flex-1 cursor-pointer items-center gap-2 rounded-lg px-2 py-1.5 text-left transition-colors hover:bg-primary/10 disabled:cursor-default disabled:hover:bg-transparent",
|
|
1759
|
+
"data-testid": testId && `${testId}-open`,
|
|
1760
|
+
children: [
|
|
1761
|
+
Icon && /* @__PURE__ */ jsx(Icon, { className: "size-4 shrink-0 text-muted-foreground" }),
|
|
1762
|
+
/* @__PURE__ */ jsx("span", { className: "whitespace-nowrap text-sm font-semibold text-foreground", children: title }),
|
|
1763
|
+
count !== void 0 && /* @__PURE__ */ jsx("span", { className: "text-xs tabular-nums text-muted-foreground", children: count })
|
|
1764
|
+
]
|
|
1765
|
+
}
|
|
1766
|
+
),
|
|
1767
|
+
actions.map(
|
|
1768
|
+
(action) => action.node ? /* @__PURE__ */ jsx("div", { className: "shrink-0", children: action.node }, action.label) : /* @__PURE__ */ jsxs(
|
|
1769
|
+
Button,
|
|
1770
|
+
{
|
|
1771
|
+
variant: "ghost",
|
|
1772
|
+
size: "sm",
|
|
1773
|
+
className: "h-8 shrink-0 px-2 text-xs font-medium text-muted-foreground hover:text-foreground",
|
|
1774
|
+
onClick: action.onClick,
|
|
1775
|
+
title: action.label,
|
|
1776
|
+
"data-testid": action.testId,
|
|
1777
|
+
children: [
|
|
1778
|
+
action.icon && /* @__PURE__ */ jsx(action.icon, { className: "size-3.5" }),
|
|
1779
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only @md:not-sr-only @md:ml-1.5", children: action.label })
|
|
1780
|
+
]
|
|
1781
|
+
},
|
|
1782
|
+
action.label
|
|
1783
|
+
)
|
|
1784
|
+
)
|
|
1785
|
+
] }),
|
|
1786
|
+
filledGroups.length === 0 ? empty ? empty.icon ? (
|
|
1787
|
+
// Fuller dashed empty state, matching a card's — an invitation, not
|
|
1788
|
+
// just a note. The icon glyph rides a tinted circle that fills on
|
|
1789
|
+
// hover, exactly like RecentActivityCard's empty card.
|
|
1790
|
+
/* @__PURE__ */ jsxs(
|
|
1791
|
+
"button",
|
|
1792
|
+
{
|
|
1793
|
+
type: "button",
|
|
1794
|
+
onClick: empty.onClick,
|
|
1795
|
+
className: "group mt-2 flex w-full cursor-pointer flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed border-border px-4 py-8 text-center transition-colors hover:border-border hover:bg-accent/50 focus-visible:border-border focus-visible:bg-accent/50 focus-visible:outline-none",
|
|
1796
|
+
"data-testid": empty.testId,
|
|
1797
|
+
children: [
|
|
1798
|
+
/* @__PURE__ */ jsx("span", { className: "mt-2 flex size-11 items-center justify-center rounded-full bg-primary/10 text-primary transition-colors group-hover:bg-primary group-hover:text-primary-foreground", children: /* @__PURE__ */ jsx(empty.icon, { className: "size-5" }) }),
|
|
1799
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-semibold text-foreground", children: empty.label }),
|
|
1800
|
+
empty.description && /* @__PURE__ */ jsx("span", { className: "text-xs leading-relaxed text-muted-foreground", children: empty.description })
|
|
1801
|
+
]
|
|
1802
|
+
}
|
|
1803
|
+
)
|
|
1804
|
+
) : /* @__PURE__ */ jsxs(
|
|
1805
|
+
"button",
|
|
1806
|
+
{
|
|
1807
|
+
type: "button",
|
|
1808
|
+
onClick: empty.onClick,
|
|
1809
|
+
className: "flex w-full items-center gap-2 rounded-lg px-2 py-1.5 text-left text-sm text-muted-foreground transition-colors hover:bg-primary/5 hover:text-foreground",
|
|
1810
|
+
"data-testid": empty.testId,
|
|
1811
|
+
children: [
|
|
1812
|
+
/* @__PURE__ */ jsx(Plus, { className: "size-3.5 shrink-0" }),
|
|
1813
|
+
empty.label
|
|
1814
|
+
]
|
|
1815
|
+
}
|
|
1816
|
+
) : null : /* @__PURE__ */ jsx("div", { className: "grid gap-x-4 @2xl:grid-cols-2", children: filledGroups.map((group) => /* @__PURE__ */ jsxs("div", { children: [
|
|
1817
|
+
/* @__PURE__ */ jsx("p", { className: "mt-1 px-2 pb-0.5 text-[11px] font-medium uppercase tracking-wide text-muted-foreground", children: group.caption }),
|
|
1818
|
+
/* @__PURE__ */ jsx("ul", { children: group.rows.map((row) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(
|
|
1819
|
+
"button",
|
|
1820
|
+
{
|
|
1821
|
+
type: "button",
|
|
1822
|
+
onClick: row.onClick,
|
|
1823
|
+
title: row.title,
|
|
1824
|
+
className: "group flex w-full min-w-0 items-center gap-2 rounded-lg px-2 py-1.5 text-left transition-colors [&:hover]:bg-primary/10",
|
|
1825
|
+
"data-testid": group.rowTestId ?? (testId && `${testId}-row`),
|
|
1826
|
+
children: [
|
|
1827
|
+
row.leading,
|
|
1828
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate text-sm text-foreground group-hover:text-primary", children: row.title }),
|
|
1829
|
+
row.meta && /* @__PURE__ */ jsx("span", { className: "shrink-0 text-[11px] tabular-nums text-muted-foreground", children: row.meta })
|
|
1830
|
+
]
|
|
1831
|
+
}
|
|
1832
|
+
) }, row.id)) })
|
|
1833
|
+
] }, group.caption)) })
|
|
1834
|
+
]
|
|
1835
|
+
}
|
|
1836
|
+
);
|
|
1837
|
+
}
|
|
1838
|
+
function StartHero({
|
|
1839
|
+
title,
|
|
1840
|
+
subtitle,
|
|
1841
|
+
children,
|
|
1842
|
+
tile,
|
|
1843
|
+
footer,
|
|
1844
|
+
className,
|
|
1845
|
+
testId
|
|
1846
|
+
}) {
|
|
1847
|
+
return /* @__PURE__ */ jsx("div", { className: cn("py-6", className), "data-testid": testId, children: /* @__PURE__ */ jsxs("div", { className: "mx-auto flex max-w-2xl flex-col gap-5 text-center", children: [
|
|
1848
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
1849
|
+
/* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold text-foreground", children: title }),
|
|
1850
|
+
subtitle && /* @__PURE__ */ jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: subtitle })
|
|
1851
|
+
] }),
|
|
1852
|
+
children,
|
|
1853
|
+
tile && /* @__PURE__ */ jsxs(
|
|
1854
|
+
"button",
|
|
1855
|
+
{
|
|
1856
|
+
type: "button",
|
|
1857
|
+
onClick: tile.onClick,
|
|
1858
|
+
className: "group flex cursor-pointer flex-col items-center justify-center gap-2 rounded-xl border-2 border-dashed border-border px-4 py-6 text-center transition-colors hover:border-border hover:bg-accent/50 focus-visible:border-border focus-visible:bg-accent/50 focus-visible:outline-none",
|
|
1859
|
+
"data-testid": tile.testId,
|
|
1860
|
+
children: [
|
|
1861
|
+
/* @__PURE__ */ jsx("span", { className: "flex size-11 items-center justify-center rounded-full bg-primary/10 text-primary transition-colors group-hover:bg-primary group-hover:text-primary-foreground", children: /* @__PURE__ */ jsx(tile.icon, { className: "size-5" }) }),
|
|
1862
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-semibold text-foreground", children: tile.label }),
|
|
1863
|
+
tile.description && /* @__PURE__ */ jsx("span", { className: "text-xs leading-relaxed text-muted-foreground", children: tile.description })
|
|
1864
|
+
]
|
|
1865
|
+
}
|
|
1866
|
+
),
|
|
1867
|
+
footer && /* @__PURE__ */ jsx("div", { className: "text-xs text-muted-foreground", children: footer })
|
|
1868
|
+
] }) });
|
|
1869
|
+
}
|
|
1558
1870
|
var MAX_AVATARS = 3;
|
|
1559
1871
|
function WorkspaceCard({
|
|
1560
1872
|
name,
|
|
@@ -5192,6 +5504,6 @@ function VerticalBuilder({
|
|
|
5192
5504
|
] });
|
|
5193
5505
|
}
|
|
5194
5506
|
|
|
5195
|
-
export { AgentsPanel, AppHeader, AppShell, AssetThumb, CitationEditor, ConnectionProvider, DataTable, DataTableBlock, EmptyState, EntityIdentityBar, GridView, IDENTITY_NAME_MAX_LENGTH, LegalArbiProvider, LiveDataProvider, MemberAvatarStack, MetricCard, ModuleManager, PageHeader, PageRenderer, RecentActivityCard, Section, StatGroup, StudioEditor, Toolbar, UploadDropzone, VerticalBuilder, WidgetPlaceholder, WorkspaceCard, createAgentSelectionStore, createAiFields, createArbiBlocksConfig, createArbiMaterializer, createBlockKit, createImageField, createLiveWidgets, createModuleRegistry, createModuleStore, createPromptLibrary, createSiteBlocks, createStudioPersistence, createVerticalExport, createWebsiteBlocks, iconMap, isAuthenticated, materializePageData, matterToContext, useAssetImage, useConnection, useFirmAiTask, useImageGen, useLiveDataActive, useSemanticSearch, useWorkspaceDocs };
|
|
5507
|
+
export { AgentsPanel, AppHeader, AppShell, AskBar, AssetThumb, CitationEditor, ConnectionProvider, DataTable, DataTableBlock, EmptyState, EntityIdentityBar, GridView, IDENTITY_NAME_MAX_LENGTH, LegalArbiProvider, LiveDataProvider, MemberAvatarStack, MetricCard, ModuleManager, PageHeader, PageRenderer, RecentActivityCard, ResumeStrip, Section, SectionStrip, StartHero, StatGroup, StudioEditor, Toolbar, UploadDropzone, UsageMeter, VerticalBuilder, WidgetPlaceholder, WorkspaceCard, createAgentSelectionStore, createAiFields, createArbiBlocksConfig, createArbiMaterializer, createBlockKit, createImageField, createLiveWidgets, createModuleRegistry, createModuleStore, createPromptLibrary, createSiteBlocks, createStudioPersistence, createVerticalExport, createWebsiteBlocks, iconMap, isAuthenticated, materializePageData, matterToContext, useAssetImage, useConnection, useFirmAiTask, useImageGen, useLiveDataActive, useSemanticSearch, useWorkspaceDocs };
|
|
5196
5508
|
//# sourceMappingURL=index.js.map
|
|
5197
5509
|
//# sourceMappingURL=index.js.map
|