@vadimcomanescu/nadicode-design-system 2.0.9 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/seed/SKILL.md +19 -10
- package/.agents/skills/seed/contract.md +9 -2
- package/.agents/skills/seed/references/blocks.md +5 -5
- package/.agents/skills/seed/references/components.md +2 -2
- package/.agents/skills/seed/references/nextjs.md +2 -2
- package/README.md +3 -3
- package/contracts/consumer-intent-map.json +1 -2
- package/contracts/release-governance-baseline.json +3 -37
- package/dist/catalog/catalog.d.ts +2220 -0
- package/dist/catalog/catalog.js +1913 -0
- package/dist/catalog/components.d.ts +201 -0
- package/dist/catalog/components.js +407 -0
- package/dist/catalog/types.d.ts +4 -0
- package/dist/catalog/types.js +1 -0
- package/dist/chunk-224KPIOG.js +60 -0
- package/dist/chunk-25BOZMXA.js +169 -0
- package/dist/chunk-32OLQ7FC.js +130 -0
- package/dist/chunk-3JJBJ4VR.js +47 -0
- package/dist/chunk-3U56FXYC.js +30 -0
- package/dist/chunk-4MWKE6F5.js +86 -0
- package/dist/chunk-6HGSU24S.js +94 -0
- package/dist/chunk-7IADIXDV.js +168 -0
- package/dist/chunk-7NS3VFD7.js +86 -0
- package/dist/chunk-7XLZCXUL.js +175 -0
- package/dist/chunk-ALA6OM7K.js +134 -0
- package/dist/chunk-AN5TW4AL.js +50 -0
- package/dist/chunk-AWZFQQGN.js +167 -0
- package/dist/chunk-BRCBJ3S4.js +42 -0
- package/dist/chunk-BRICSLHJ.js +30 -0
- package/dist/chunk-BYEHHZZN.js +115 -0
- package/dist/chunk-C33GUEDY.js +149 -0
- package/dist/chunk-CUDMDYKE.js +150 -0
- package/dist/chunk-CVTMWSNS.js +145 -0
- package/dist/chunk-DEZXWNYF.js +165 -0
- package/dist/chunk-DNJEVMDY.js +40 -0
- package/dist/chunk-DNJOBML6.js +66 -0
- package/dist/chunk-FTGFOK6T.js +69 -0
- package/dist/chunk-HFBJ6L6O.js +104 -0
- package/dist/chunk-HPTHS7SX.js +52 -0
- package/dist/chunk-KNR3WB5C.js +147 -0
- package/dist/chunk-KQ7ZC6EM.js +66 -0
- package/dist/chunk-LGW7FVG5.js +83 -0
- package/dist/chunk-LP6ZZYOQ.js +36 -0
- package/dist/chunk-LV4P7WVM.js +54 -0
- package/dist/chunk-MGSGCARB.js +164 -0
- package/dist/chunk-N3YFYMNZ.js +73 -0
- package/dist/chunk-Q5IYBNA7.js +56 -0
- package/dist/chunk-QJCE7NZF.js +85 -0
- package/dist/chunk-QW5II6YK.js +96 -0
- package/dist/chunk-RMGDDOCD.js +138 -0
- package/dist/chunk-RNCX4JIE.js +70 -0
- package/dist/chunk-RWCL5OPX.js +112 -0
- package/dist/chunk-S5OY2B63.js +28 -0
- package/dist/chunk-SIQNG72C.js +257 -0
- package/dist/chunk-SP7NIZFP.js +117 -0
- package/dist/chunk-SWRJWMGG.js +30 -0
- package/dist/chunk-TCQIJ3DO.js +85 -0
- package/dist/chunk-TPJ6JJ2F.js +290 -0
- package/dist/chunk-TUJZMJXW.js +72 -0
- package/dist/chunk-UR43ANYS.js +159 -0
- package/dist/chunk-VRGPG2YN.js +79 -0
- package/dist/chunk-WSBLCWY7.js +126 -0
- package/dist/chunk-XKKFSFYO.js +93 -0
- package/dist/chunk-XO7TBM47.js +32 -0
- package/dist/chunk-YDYDGG5K.js +132 -0
- package/dist/chunk-YMJOUYMT.js +171 -0
- package/dist/chunk-Z2WION42.js +32 -0
- package/dist/chunk-ZFKSVEYW.js +35 -0
- package/dist/components/blocks/AgentProfileGridBlock.js +8 -86
- package/dist/components/blocks/AgentRunOverviewBlock.js +8 -147
- package/dist/components/blocks/AgentWorkbenchBlock.js +15 -257
- package/dist/components/blocks/AudioVisualizerBlock.js +2 -50
- package/dist/components/blocks/AuthLayout.js +9 -73
- package/dist/components/blocks/BannerBlock.js +8 -66
- package/dist/components/blocks/BarChartBlock.js +5 -47
- package/dist/components/blocks/ChartBlock.js +7 -54
- package/dist/components/blocks/ChartCollectionBlock.js +11 -171
- package/dist/components/blocks/ChatLayout.js +12 -126
- package/dist/components/blocks/CreateBlock.js +9 -104
- package/dist/components/blocks/DataGridBlock.js +9 -117
- package/dist/components/blocks/DirectoryBlock.js +12 -85
- package/dist/components/blocks/FeatureGridBlock.js +6 -56
- package/dist/components/blocks/GalleryBlock.js +6 -69
- package/dist/components/blocks/HeroSectionBlock.js +10 -134
- package/dist/components/blocks/IntegrationsBlock.js +13 -94
- package/dist/components/blocks/InteractiveAreaChartBlock.js +5 -290
- package/dist/components/blocks/KanbanDemoBlock.js +8 -145
- package/dist/components/blocks/LogoCloud.js +4 -35
- package/dist/components/blocks/NavUser.js +5 -85
- package/dist/components/blocks/NotFoundBlock.js +8 -32
- package/dist/components/blocks/OnboardingBlock.js +7 -66
- package/dist/components/blocks/SettingsLayout.js +13 -86
- package/dist/components/blocks/SignUpBlock.js +8 -168
- package/dist/components/blocks/SolutionShowcaseBlock.js +11 -112
- package/dist/components/blocks/StatsBlock.js +6 -60
- package/dist/components/blocks/UsageDonutBlock.js +5 -79
- package/dist/components/blocks/WizardBlock.js +12 -93
- package/dist/components/blocks/user/InviteUserModal.js +10 -132
- package/dist/components/page-kits/AccountLockedPageKit.js +3 -40
- package/dist/components/page-kits/AgentsChatPageKit.js +11 -159
- package/dist/components/page-kits/AnalyticsPageKit.js +12 -150
- package/dist/components/page-kits/BlogContentPageKit.js +12 -167
- package/dist/components/page-kits/CheckoutPageKit.js +9 -83
- package/dist/components/page-kits/CompanySuitePageKit.js +9 -96
- package/dist/components/page-kits/DashboardPageKit.js +11 -149
- package/dist/components/page-kits/ErrorPageKit.js +5 -52
- package/dist/components/page-kits/KanbanBoardPageKit.js +7 -169
- package/dist/components/page-kits/LandingPageKit.js +11 -72
- package/dist/components/page-kits/LoginPageKit.js +3 -32
- package/dist/components/page-kits/OnboardingPageKit.js +6 -115
- package/dist/components/page-kits/PricingPageKit.js +12 -138
- package/dist/components/page-kits/ProfileSettingsPageKit.js +10 -164
- package/dist/components/page-kits/RecoveryPageKit.js +3 -42
- package/dist/components/page-kits/ResetPageKit.js +3 -36
- package/dist/components/page-kits/ServiceSuitePageKit.js +10 -175
- package/dist/components/page-kits/SignupPageKit.js +3 -30
- package/dist/components/page-kits/SuccessPageKit.js +4 -30
- package/dist/components/page-kits/TeamSettingsPageKit.js +9 -165
- package/dist/components/page-kits/TwoFactorPageKit.js +4 -28
- package/dist/components/page-kits/VerifyEmailPageKit.js +4 -30
- package/dist/components/page-kits/VoiceAgentsPageKit.js +13 -130
- package/dist/components/ui/CheckoutForm.js +5 -70
- package/eslint-rules/nadicode/config.js +1 -0
- package/eslint-rules/nadicode/data/catalog-names.json +93 -0
- package/eslint-rules/nadicode/index.js +2 -0
- package/eslint-rules/nadicode/rules/__tests__/require-catalog-component.test.js +77 -0
- package/eslint-rules/nadicode/rules/require-catalog-component.js +79 -0
- package/package.json +18 -25
- package/contracts/block-props-schemas.json +0 -2186
- package/contracts/component-props-schemas.json +0 -8322
- package/contracts/consumer-contract.json +0 -178
- package/contracts/page-kit-props-schemas.json +0 -1894
- package/contracts/public-surface-registry.json +0 -5822
- package/contracts/public-surface-registry.schema.json +0 -219
- package/contracts/spec-manifest.json +0 -46
- package/dist/catalog.json +0 -5221
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { CrudListDetailPageKit } from './chunk-OJ7OO3QB.js';
|
|
2
|
+
import { Typography } from './chunk-N53OMWW2.js';
|
|
3
|
+
import { KanbanBoard, KanbanColumn, KanbanColumnHeader, KanbanItem, KanbanHandle } from './chunk-TYP2MR3Q.js';
|
|
4
|
+
import { Avatar, AvatarFallback } from './chunk-NAAU5IWU.js';
|
|
5
|
+
import { Badge } from './chunk-S4JAHKOP.js';
|
|
6
|
+
import { cn } from './chunk-QYZT24TS.js';
|
|
7
|
+
import { useState, useMemo } from 'react';
|
|
8
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
9
|
+
|
|
10
|
+
function mapState(state) {
|
|
11
|
+
switch (state) {
|
|
12
|
+
case "loading":
|
|
13
|
+
return "loading";
|
|
14
|
+
case "empty":
|
|
15
|
+
return "empty";
|
|
16
|
+
default:
|
|
17
|
+
return "has-data";
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
function KanbanBoardPageKit({
|
|
21
|
+
shell,
|
|
22
|
+
state,
|
|
23
|
+
columns,
|
|
24
|
+
getItemId,
|
|
25
|
+
onMove,
|
|
26
|
+
readOnly = false,
|
|
27
|
+
title = "Kanban board",
|
|
28
|
+
description = "Track work through draggable board columns with explicit move and failure contracts.",
|
|
29
|
+
moveErrorMessage,
|
|
30
|
+
activityRegion,
|
|
31
|
+
className
|
|
32
|
+
}) {
|
|
33
|
+
const [selectedItemId, setSelectedItemId] = useState(null);
|
|
34
|
+
const boardColumns = useMemo(
|
|
35
|
+
() => columns.map((column) => ({ id: column.id, items: column.items })),
|
|
36
|
+
[columns]
|
|
37
|
+
);
|
|
38
|
+
const flattenedRows = useMemo(
|
|
39
|
+
() => columns.flatMap((column) => column.items.map((item) => ({
|
|
40
|
+
id: String(getItemId(item)),
|
|
41
|
+
summaryLabel: item.title,
|
|
42
|
+
cells: {
|
|
43
|
+
title: item.title,
|
|
44
|
+
column: column.title
|
|
45
|
+
}
|
|
46
|
+
}))),
|
|
47
|
+
[columns, getItemId]
|
|
48
|
+
);
|
|
49
|
+
const selectedItem = useMemo(() => {
|
|
50
|
+
if (!selectedItemId) {
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
for (const column of columns) {
|
|
54
|
+
const match = column.items.find((item) => String(getItemId(item)) === selectedItemId);
|
|
55
|
+
if (match) {
|
|
56
|
+
return match;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return null;
|
|
60
|
+
}, [columns, getItemId, selectedItemId]);
|
|
61
|
+
return /* @__PURE__ */ jsx(
|
|
62
|
+
CrudListDetailPageKit,
|
|
63
|
+
{
|
|
64
|
+
shell,
|
|
65
|
+
title,
|
|
66
|
+
description,
|
|
67
|
+
state: mapState(state),
|
|
68
|
+
columns: [
|
|
69
|
+
{ id: "title", header: "Title" },
|
|
70
|
+
{ id: "column", header: "Column" }
|
|
71
|
+
],
|
|
72
|
+
rows: flattenedRows,
|
|
73
|
+
selectedRowId: selectedItemId,
|
|
74
|
+
onRowSelect: setSelectedItemId,
|
|
75
|
+
detailPanel: {
|
|
76
|
+
title: "Task detail",
|
|
77
|
+
description: "Review the selected work item without leaving the board context.",
|
|
78
|
+
mode: "inline",
|
|
79
|
+
renderDetail: () => {
|
|
80
|
+
if (!selectedItem) {
|
|
81
|
+
return /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-text-secondary", children: "Select a task to inspect details." });
|
|
82
|
+
}
|
|
83
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
84
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "font-medium text-text-primary", children: selectedItem.title }),
|
|
85
|
+
selectedItem.description ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-text-secondary", children: selectedItem.description }) : null,
|
|
86
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
87
|
+
selectedItem.badgeLabel ? /* @__PURE__ */ jsx(Badge, { variant: "outline", children: selectedItem.badgeLabel }) : null,
|
|
88
|
+
selectedItem.assigneeLabel ? /* @__PURE__ */ jsx(Avatar, { className: "h-6 w-6 text-[11px]", children: /* @__PURE__ */ jsx(AvatarFallback, { children: selectedItem.assigneeLabel }) }) : null
|
|
89
|
+
] })
|
|
90
|
+
] });
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
emptyState: {
|
|
94
|
+
title: "No board columns available",
|
|
95
|
+
description: "Provide at least one column to render the kanban board."
|
|
96
|
+
},
|
|
97
|
+
pagination: {
|
|
98
|
+
page: 1,
|
|
99
|
+
totalPages: 1,
|
|
100
|
+
onPageChange: () => {
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
renderCollection: () => /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
|
|
104
|
+
state === "move-failed" ? /* @__PURE__ */ jsx(
|
|
105
|
+
"div",
|
|
106
|
+
{
|
|
107
|
+
role: "alert",
|
|
108
|
+
className: "rounded-md border border-destructive/40 bg-destructive/10 px-4 py-3 text-sm text-destructive",
|
|
109
|
+
children: moveErrorMessage ?? "A move failed. Keep board state and retry once the backend recovers."
|
|
110
|
+
}
|
|
111
|
+
) : null,
|
|
112
|
+
/* @__PURE__ */ jsx(
|
|
113
|
+
KanbanBoard,
|
|
114
|
+
{
|
|
115
|
+
value: boardColumns,
|
|
116
|
+
getItemId,
|
|
117
|
+
getItemLabel: (item) => item.title,
|
|
118
|
+
canMove: readOnly ? () => false : void 0,
|
|
119
|
+
onValueChange: onMove,
|
|
120
|
+
className: cn("pb-2", className),
|
|
121
|
+
children: columns.map((column) => /* @__PURE__ */ jsxs(
|
|
122
|
+
KanbanColumn,
|
|
123
|
+
{
|
|
124
|
+
id: column.id,
|
|
125
|
+
items: column.items,
|
|
126
|
+
disabled: readOnly || column.disabled,
|
|
127
|
+
"aria-label": `${column.title} column`,
|
|
128
|
+
children: [
|
|
129
|
+
/* @__PURE__ */ jsxs(KanbanColumnHeader, { children: [
|
|
130
|
+
/* @__PURE__ */ jsx("span", { children: column.title }),
|
|
131
|
+
/* @__PURE__ */ jsx(Badge, { variant: "outline", className: "tabular-nums text-xs", children: column.items.length })
|
|
132
|
+
] }),
|
|
133
|
+
/* @__PURE__ */ jsx("div", { className: "flex flex-col gap-2", children: column.items.map((item) => {
|
|
134
|
+
const itemId = String(getItemId(item));
|
|
135
|
+
return /* @__PURE__ */ jsx(
|
|
136
|
+
KanbanItem,
|
|
137
|
+
{
|
|
138
|
+
value: item,
|
|
139
|
+
disabled: readOnly,
|
|
140
|
+
onClick: () => setSelectedItemId(itemId),
|
|
141
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2", children: [
|
|
142
|
+
!readOnly ? /* @__PURE__ */ jsx(KanbanHandle, { "aria-label": `Move ${item.title}` }) : null,
|
|
143
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1 space-y-1", children: [
|
|
144
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "font-medium text-text-primary", children: item.title }),
|
|
145
|
+
item.description ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "line-clamp-2 text-text-secondary", children: item.description }) : null,
|
|
146
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
147
|
+
item.badgeLabel ? /* @__PURE__ */ jsx(Badge, { variant: "outline", children: item.badgeLabel }) : null,
|
|
148
|
+
item.assigneeLabel ? /* @__PURE__ */ jsx(Avatar, { className: "h-5 w-5 text-[10px]", children: /* @__PURE__ */ jsx(AvatarFallback, { children: item.assigneeLabel }) }) : null
|
|
149
|
+
] })
|
|
150
|
+
] })
|
|
151
|
+
] })
|
|
152
|
+
},
|
|
153
|
+
itemId
|
|
154
|
+
);
|
|
155
|
+
}) })
|
|
156
|
+
]
|
|
157
|
+
},
|
|
158
|
+
column.id
|
|
159
|
+
))
|
|
160
|
+
}
|
|
161
|
+
),
|
|
162
|
+
activityRegion ? /* @__PURE__ */ jsx("div", { children: activityRegion }) : null
|
|
163
|
+
] }),
|
|
164
|
+
className
|
|
165
|
+
}
|
|
166
|
+
);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export { KanbanBoardPageKit };
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { VoiceAgentCard } from './chunk-HWHJ6IRQ.js';
|
|
2
|
+
import { AgentConversationBlock } from './chunk-4IGBBIYW.js';
|
|
3
|
+
import { Typography } from './chunk-N53OMWW2.js';
|
|
4
|
+
import { ScrollArea } from './chunk-GLU236NN.js';
|
|
5
|
+
import { Heading } from './chunk-WI547C47.js';
|
|
6
|
+
import { Input } from './chunk-AP3XXYAY.js';
|
|
7
|
+
import { Card, CardContent, CardHeader, CardTitle } from './chunk-AH6YSYYT.js';
|
|
8
|
+
import { AudioWaveform } from './chunk-5UESKK6S.js';
|
|
9
|
+
import { Button } from './chunk-7KIDDF3I.js';
|
|
10
|
+
import { AgentMessageBubble } from './chunk-I66XWYSS.js';
|
|
11
|
+
import { Badge } from './chunk-S4JAHKOP.js';
|
|
12
|
+
import { cn } from './chunk-QYZT24TS.js';
|
|
13
|
+
import { useMemo } from 'react';
|
|
14
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
15
|
+
|
|
16
|
+
var EMPTY_MESSAGES = [];
|
|
17
|
+
function presenceLabel(state) {
|
|
18
|
+
switch (state) {
|
|
19
|
+
case "listening":
|
|
20
|
+
return "Listening";
|
|
21
|
+
case "speaking":
|
|
22
|
+
return "Speaking";
|
|
23
|
+
case "idle":
|
|
24
|
+
return "Idle";
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
function VoiceAgentsPageKit({
|
|
28
|
+
state = "agent-selection",
|
|
29
|
+
agents,
|
|
30
|
+
selectedAgentId,
|
|
31
|
+
presenceState = "idle",
|
|
32
|
+
messages = EMPTY_MESSAGES,
|
|
33
|
+
streamingReply,
|
|
34
|
+
composerValue = "",
|
|
35
|
+
composerPlaceholder = "Send a voice prompt...",
|
|
36
|
+
onComposerChange,
|
|
37
|
+
onSendMessage,
|
|
38
|
+
onSelectAgent,
|
|
39
|
+
onBackToSelection,
|
|
40
|
+
noAgentsMessage = "No voice agents are available right now.",
|
|
41
|
+
disconnectedMessage = "The selected agent is unavailable. Choose another agent.",
|
|
42
|
+
className
|
|
43
|
+
}) {
|
|
44
|
+
const selectedAgent = useMemo(
|
|
45
|
+
() => selectedAgentId ? agents.find((agent) => agent.id === selectedAgentId) : null,
|
|
46
|
+
[agents, selectedAgentId]
|
|
47
|
+
);
|
|
48
|
+
function handleSendMessage() {
|
|
49
|
+
const payload = composerValue.trim();
|
|
50
|
+
if (!payload) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
onSendMessage?.(payload);
|
|
54
|
+
}
|
|
55
|
+
if (state === "agent-selection") {
|
|
56
|
+
return /* @__PURE__ */ jsxs("section", { className: cn("space-y-6", className), children: [
|
|
57
|
+
/* @__PURE__ */ jsxs("header", { className: "space-y-2", children: [
|
|
58
|
+
/* @__PURE__ */ jsx(Heading, { level: 3, children: "Voice agents" }),
|
|
59
|
+
/* @__PURE__ */ jsx(Typography, { variant: "muted", children: "Choose an agent to start a voice session." })
|
|
60
|
+
] }),
|
|
61
|
+
agents.length === 0 ? /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsx(CardContent, { className: "py-6", children: /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-text-secondary", children: noAgentsMessage }) }) }) : /* @__PURE__ */ jsx("div", { className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-3", children: agents.map((agent) => /* @__PURE__ */ jsx(
|
|
62
|
+
VoiceAgentCard,
|
|
63
|
+
{
|
|
64
|
+
agent,
|
|
65
|
+
state: "idle",
|
|
66
|
+
selected: false,
|
|
67
|
+
onSelect: () => onSelectAgent?.(agent.id),
|
|
68
|
+
ariaLabel: `Select ${agent.name}`
|
|
69
|
+
},
|
|
70
|
+
agent.id
|
|
71
|
+
)) })
|
|
72
|
+
] });
|
|
73
|
+
}
|
|
74
|
+
return /* @__PURE__ */ jsxs("section", { className: cn("space-y-6", className), children: [
|
|
75
|
+
/* @__PURE__ */ jsxs("header", { className: "space-y-2", children: [
|
|
76
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center justify-between gap-2", children: [
|
|
77
|
+
/* @__PURE__ */ jsx(Heading, { level: 3, children: "Voice agents" }),
|
|
78
|
+
/* @__PURE__ */ jsx(Button, { type: "button", variant: "outline", onClick: onBackToSelection, children: "Back to agent selection" })
|
|
79
|
+
] }),
|
|
80
|
+
/* @__PURE__ */ jsx(Typography, { variant: "muted", children: selectedAgent ? `Active voice session with ${selectedAgent.name}.` : disconnectedMessage })
|
|
81
|
+
] }),
|
|
82
|
+
selectedAgent ? /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-3", children: [
|
|
83
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "font-medium text-text-primary", children: selectedAgent.name }),
|
|
84
|
+
/* @__PURE__ */ jsx(Badge, { variant: "outline", children: presenceLabel(presenceState) }),
|
|
85
|
+
/* @__PURE__ */ jsx(AudioWaveform, { active: presenceState === "speaking", bars: 20, size: "sm", variant: "accent" })
|
|
86
|
+
] }) : /* @__PURE__ */ jsx("div", { role: "alert", className: "rounded-md border border-destructive/40 bg-destructive/10 px-4 py-3 text-sm text-destructive", children: disconnectedMessage }),
|
|
87
|
+
/* @__PURE__ */ jsxs(Card, { children: [
|
|
88
|
+
/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: "Conversation" }) }),
|
|
89
|
+
/* @__PURE__ */ jsxs(CardContent, { className: "space-y-3", children: [
|
|
90
|
+
/* @__PURE__ */ jsxs(ScrollArea, { className: "max-h-96", children: [
|
|
91
|
+
/* @__PURE__ */ jsx(
|
|
92
|
+
AgentConversationBlock,
|
|
93
|
+
{
|
|
94
|
+
messages: messages.length > 0 ? messages : [{
|
|
95
|
+
id: "voice-empty",
|
|
96
|
+
role: "system",
|
|
97
|
+
content: "No messages yet. Start speaking to begin the session."
|
|
98
|
+
}]
|
|
99
|
+
}
|
|
100
|
+
),
|
|
101
|
+
!!streamingReply && /* @__PURE__ */ jsxs("div", { className: "mt-3 space-y-1", children: [
|
|
102
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "font-medium text-text-primary", children: "Streaming response" }),
|
|
103
|
+
/* @__PURE__ */ jsx(
|
|
104
|
+
AgentMessageBubble,
|
|
105
|
+
{
|
|
106
|
+
role: "assistant",
|
|
107
|
+
content: streamingReply,
|
|
108
|
+
isStreaming: true
|
|
109
|
+
}
|
|
110
|
+
)
|
|
111
|
+
] })
|
|
112
|
+
] }),
|
|
113
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2 sm:flex-row", children: [
|
|
114
|
+
/* @__PURE__ */ jsx(
|
|
115
|
+
Input,
|
|
116
|
+
{
|
|
117
|
+
"aria-label": "Voice composer",
|
|
118
|
+
value: composerValue,
|
|
119
|
+
placeholder: composerPlaceholder,
|
|
120
|
+
onChange: (event) => onComposerChange?.(event.target.value)
|
|
121
|
+
}
|
|
122
|
+
),
|
|
123
|
+
/* @__PURE__ */ jsx(Button, { type: "button", onClick: handleSendMessage, children: "Send voice message" })
|
|
124
|
+
] })
|
|
125
|
+
] })
|
|
126
|
+
] })
|
|
127
|
+
] });
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export { VoiceAgentsPageKit };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { BarChart } from './chunk-UWHKZX4Y.js';
|
|
2
|
+
import { Empty, EmptyTitle, EmptyDescription } from './chunk-55HD4L6G.js';
|
|
3
|
+
import { Card, CardHeader, CardTitle, CardDescription, CardContent } from './chunk-AH6YSYYT.js';
|
|
4
|
+
import { cn } from './chunk-QYZT24TS.js';
|
|
5
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
var defaultData = [
|
|
8
|
+
{ name: "Jan", total: 3200, prediction: 1800 },
|
|
9
|
+
{ name: "Feb", total: 4100, prediction: 2200 },
|
|
10
|
+
{ name: "Mar", total: 2800, prediction: 1500 },
|
|
11
|
+
{ name: "Apr", total: 4600, prediction: 2900 },
|
|
12
|
+
{ name: "May", total: 3500, prediction: 2100 },
|
|
13
|
+
{ name: "Jun", total: 5200, prediction: 3100 }
|
|
14
|
+
];
|
|
15
|
+
var defaultConfig = {
|
|
16
|
+
total: { label: "Total", color: "rgb(var(--chart-1))" },
|
|
17
|
+
prediction: { label: "Prediction", color: "rgb(var(--chart-2))" }
|
|
18
|
+
};
|
|
19
|
+
function BarChartBlock({
|
|
20
|
+
data = defaultData,
|
|
21
|
+
config = defaultConfig,
|
|
22
|
+
title = "Token Usage",
|
|
23
|
+
description = "Monthly inference token consumption",
|
|
24
|
+
className
|
|
25
|
+
}) {
|
|
26
|
+
return /* @__PURE__ */ jsxs(Card, { className: cn("w-full", className), children: [
|
|
27
|
+
/* @__PURE__ */ jsxs(CardHeader, { children: [
|
|
28
|
+
/* @__PURE__ */ jsx(CardTitle, { children: title }),
|
|
29
|
+
/* @__PURE__ */ jsx(CardDescription, { children: description })
|
|
30
|
+
] }),
|
|
31
|
+
/* @__PURE__ */ jsx(CardContent, { className: "pb-4", children: data.length === 0 ? /* @__PURE__ */ jsxs(Empty, { className: "min-h-[240px]", children: [
|
|
32
|
+
/* @__PURE__ */ jsx(EmptyTitle, { children: "No chart data" }),
|
|
33
|
+
/* @__PURE__ */ jsx(EmptyDescription, { children: "Token usage will appear here once analytics data is available." })
|
|
34
|
+
] }) : /* @__PURE__ */ jsx(
|
|
35
|
+
BarChart,
|
|
36
|
+
{
|
|
37
|
+
data,
|
|
38
|
+
config,
|
|
39
|
+
indexKey: "name",
|
|
40
|
+
bars: ["total", "prediction"],
|
|
41
|
+
stacked: true
|
|
42
|
+
}
|
|
43
|
+
) })
|
|
44
|
+
] });
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export { BarChartBlock };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { AuthSuccessBlock } from './chunk-LCKLZ4XK.js';
|
|
2
|
+
import { CheckCircleIcon } from './chunk-226EBOTK.js';
|
|
3
|
+
import { cn } from './chunk-QYZT24TS.js';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
function SuccessPageKit({
|
|
7
|
+
icon = /* @__PURE__ */ jsx(CheckCircleIcon, { size: 32, className: "text-success" }),
|
|
8
|
+
title = "Success",
|
|
9
|
+
description = "Your request completed successfully.",
|
|
10
|
+
buttonText = "Continue",
|
|
11
|
+
onContinue,
|
|
12
|
+
autoRedirectSeconds,
|
|
13
|
+
className,
|
|
14
|
+
cardClassName
|
|
15
|
+
}) {
|
|
16
|
+
return /* @__PURE__ */ jsx("section", { className: cn("min-h-dvh w-full bg-background px-4 py-12 md:px-8 md:py-20", className), children: /* @__PURE__ */ jsx("div", { className: "mx-auto flex w-full max-w-5xl items-center justify-center", children: /* @__PURE__ */ jsx(
|
|
17
|
+
AuthSuccessBlock,
|
|
18
|
+
{
|
|
19
|
+
className: cn("w-full", cardClassName),
|
|
20
|
+
icon,
|
|
21
|
+
title,
|
|
22
|
+
description,
|
|
23
|
+
buttonText,
|
|
24
|
+
onContinue,
|
|
25
|
+
autoRedirectSeconds
|
|
26
|
+
}
|
|
27
|
+
) }) });
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export { SuccessPageKit };
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { SidebarProvider, Sidebar, SidebarHeader, SidebarContent, SidebarGroup, SidebarGroupContent, SidebarMenu, SidebarMenuItem, SidebarMenuButton, SidebarTrigger } from './chunk-J2DCQDXO.js';
|
|
2
|
+
import { siteConfig } from './chunk-A7NUWD76.js';
|
|
3
|
+
import { Empty, EmptyTitle, EmptyDescription } from './chunk-55HD4L6G.js';
|
|
4
|
+
import { useMotionConfig, m, motionSpring } from './chunk-PD2YEH3H.js';
|
|
5
|
+
import { UsersIcon } from './chunk-WUO7OONN.js';
|
|
6
|
+
import { SettingsIcon } from './chunk-OITJWGFV.js';
|
|
7
|
+
import { LockIcon } from './chunk-RYOTIXZO.js';
|
|
8
|
+
import { LayoutDashboardIcon } from './chunk-O74AEVHW.js';
|
|
9
|
+
import { CreditCardIcon } from './chunk-JHQTKMKG.js';
|
|
10
|
+
import { BellIcon } from './chunk-JBK2LA6U.js';
|
|
11
|
+
import { UserIcon } from './chunk-UHXGBV5N.js';
|
|
12
|
+
import { Badge } from './chunk-S4JAHKOP.js';
|
|
13
|
+
import React from 'react';
|
|
14
|
+
import { AnimatePresence } from 'motion/react';
|
|
15
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
16
|
+
|
|
17
|
+
var defaultLinks = [
|
|
18
|
+
{ label: "General", icon: /* @__PURE__ */ jsx(SettingsIcon, { size: 16 }) },
|
|
19
|
+
{ label: "Profile", icon: /* @__PURE__ */ jsx(UserIcon, { size: 16 }) },
|
|
20
|
+
{ label: "Team", icon: /* @__PURE__ */ jsx(UsersIcon, { size: 16 }), badge: "New" },
|
|
21
|
+
{ label: "Notifications", icon: /* @__PURE__ */ jsx(BellIcon, { size: 16 }) },
|
|
22
|
+
{ label: "Security", icon: /* @__PURE__ */ jsx(LockIcon, { size: 16 }) },
|
|
23
|
+
{ label: "Billing", icon: /* @__PURE__ */ jsx(CreditCardIcon, { size: 16 }) }
|
|
24
|
+
];
|
|
25
|
+
function SettingsLayout({
|
|
26
|
+
links = defaultLinks,
|
|
27
|
+
title = siteConfig.name,
|
|
28
|
+
subtitle = "Enterprise",
|
|
29
|
+
defaultActive = "Profile",
|
|
30
|
+
className,
|
|
31
|
+
renderContent
|
|
32
|
+
}) {
|
|
33
|
+
const motionConfig = useMotionConfig();
|
|
34
|
+
const [activeLink, setActiveLink] = React.useState(defaultActive);
|
|
35
|
+
return /* @__PURE__ */ jsx(SidebarProvider, { className: className ?? "h-[800px] w-full glass-panel rounded-xl overflow-hidden shadow-2xl", children: /* @__PURE__ */ jsxs("div", { className: "h-full w-full bg-background flex", children: [
|
|
36
|
+
/* @__PURE__ */ jsxs(Sidebar, { collapsible: "none", className: "hidden sm:flex w-64 border-r border-border bg-muted/20", children: [
|
|
37
|
+
/* @__PURE__ */ jsx(SidebarHeader, { className: "p-4", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4 px-2", children: [
|
|
38
|
+
/* @__PURE__ */ jsx("div", { className: "flex aspect-square size-8 items-center justify-center rounded-lg bg-primary text-primary-foreground shadow-glow", children: /* @__PURE__ */ jsx(LayoutDashboardIcon, { size: 16 }) }),
|
|
39
|
+
/* @__PURE__ */ jsxs("div", { className: "grid flex-1 text-left text-sm leading-tight", children: [
|
|
40
|
+
/* @__PURE__ */ jsx("span", { className: "truncate font-semibold", children: title }),
|
|
41
|
+
/* @__PURE__ */ jsx("span", { className: "truncate text-xs text-text-secondary", children: subtitle })
|
|
42
|
+
] })
|
|
43
|
+
] }) }),
|
|
44
|
+
/* @__PURE__ */ jsx(SidebarContent, { className: "px-2", children: /* @__PURE__ */ jsx(SidebarGroup, { children: /* @__PURE__ */ jsx(SidebarGroupContent, { children: /* @__PURE__ */ jsx(SidebarMenu, { className: "space-y-1.5", children: links.map((link) => /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsxs(
|
|
45
|
+
SidebarMenuButton,
|
|
46
|
+
{
|
|
47
|
+
isActive: activeLink === link.label,
|
|
48
|
+
onClick: () => setActiveLink(link.label),
|
|
49
|
+
className: "justify-between",
|
|
50
|
+
children: [
|
|
51
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
52
|
+
link.icon,
|
|
53
|
+
/* @__PURE__ */ jsx("span", { children: link.label })
|
|
54
|
+
] }),
|
|
55
|
+
link.badge && /* @__PURE__ */ jsx(Badge, { variant: "accent", className: "h-5 px-1.5 text-[10px]", children: link.badge })
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
) }, link.label)) }) }) }) })
|
|
59
|
+
] }),
|
|
60
|
+
/* @__PURE__ */ jsxs("main", { className: "flex-1 min-w-0 overflow-y-auto bg-background/50", children: [
|
|
61
|
+
/* @__PURE__ */ jsxs("header", { className: "sticky top-0 z-10 flex items-center border-b border-border bg-background px-4 py-2 sm:hidden", children: [
|
|
62
|
+
/* @__PURE__ */ jsx(SidebarTrigger, {}),
|
|
63
|
+
/* @__PURE__ */ jsx("span", { className: "ml-2 text-sm font-medium text-text-primary", children: "Settings" })
|
|
64
|
+
] }),
|
|
65
|
+
/* @__PURE__ */ jsx("div", { className: "max-w-4xl mx-auto p-8", children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", children: /* @__PURE__ */ jsx(
|
|
66
|
+
m.div,
|
|
67
|
+
{
|
|
68
|
+
initial: { opacity: 0, y: 8 },
|
|
69
|
+
animate: { opacity: 1, y: 0 },
|
|
70
|
+
exit: { opacity: 0, y: -8 },
|
|
71
|
+
transition: { ...motionSpring.snappy, ...motionConfig },
|
|
72
|
+
children: renderContent ? renderContent(activeLink) : /* @__PURE__ */ jsxs(Empty, { className: "h-[400px]", children: [
|
|
73
|
+
/* @__PURE__ */ jsxs(EmptyTitle, { children: [
|
|
74
|
+
activeLink,
|
|
75
|
+
" Settings"
|
|
76
|
+
] }),
|
|
77
|
+
/* @__PURE__ */ jsx(EmptyDescription, { children: "This section is under construction." })
|
|
78
|
+
] })
|
|
79
|
+
},
|
|
80
|
+
activeLink
|
|
81
|
+
) }) })
|
|
82
|
+
] })
|
|
83
|
+
] }) });
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export { SettingsLayout };
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { MediaWiki } from './chunk-H466RJCI.js';
|
|
2
|
+
import { Replit } from './chunk-DT6DGTVW.js';
|
|
3
|
+
import { VSCodium } from './chunk-J5DRK4RF.js';
|
|
4
|
+
import { Gemini } from './chunk-TSVN5A2F.js';
|
|
5
|
+
import { GooglePaLM } from './chunk-PX2WVDDB.js';
|
|
6
|
+
import { MagicUI } from './chunk-BZYMCJHW.js';
|
|
7
|
+
import { StaggerChildren } from './chunk-DQPK2XRL.js';
|
|
8
|
+
import { Heading } from './chunk-WI547C47.js';
|
|
9
|
+
import { ScrollFadeIn } from './chunk-I23DDSU7.js';
|
|
10
|
+
import { Card } from './chunk-AH6YSYYT.js';
|
|
11
|
+
import { Button } from './chunk-7KIDDF3I.js';
|
|
12
|
+
import { ChevronRightIcon } from './chunk-G24VV5NO.js';
|
|
13
|
+
import Link from 'next/link';
|
|
14
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
15
|
+
|
|
16
|
+
var defaultIntegrations = [
|
|
17
|
+
{
|
|
18
|
+
title: "Google Gemini",
|
|
19
|
+
description: "Advanced multimodal AI for reasoning, code generation, and creative tasks.",
|
|
20
|
+
icon: /* @__PURE__ */ jsx(Gemini, {})
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
title: "Replit",
|
|
24
|
+
description: "Cloud-based IDE with real-time collaboration and instant deployment.",
|
|
25
|
+
icon: /* @__PURE__ */ jsx(Replit, {})
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
title: "Magic UI",
|
|
29
|
+
description: "Beautiful animated components to elevate your interface design.",
|
|
30
|
+
icon: /* @__PURE__ */ jsx(MagicUI, {})
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
title: "VSCodium",
|
|
34
|
+
description: "Open-source code editor with full extension ecosystem support.",
|
|
35
|
+
icon: /* @__PURE__ */ jsx(VSCodium, {})
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
title: "MediaWiki",
|
|
39
|
+
description: "Structured knowledge management with powerful search and versioning.",
|
|
40
|
+
icon: /* @__PURE__ */ jsx(MediaWiki, {})
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
title: "Google PaLM",
|
|
44
|
+
description: "Large language model API for text generation and understanding.",
|
|
45
|
+
icon: /* @__PURE__ */ jsx(GooglePaLM, {})
|
|
46
|
+
}
|
|
47
|
+
];
|
|
48
|
+
function IntegrationsBlock({
|
|
49
|
+
title = "Integrate with your favorite tools",
|
|
50
|
+
description = "Connect seamlessly with popular platforms and services to enhance your workflow.",
|
|
51
|
+
integrations = defaultIntegrations,
|
|
52
|
+
className
|
|
53
|
+
} = {}) {
|
|
54
|
+
return /* @__PURE__ */ jsx(ScrollFadeIn, { children: /* @__PURE__ */ jsx("section", { className, children: /* @__PURE__ */ jsx("div", { className: "py-32", children: /* @__PURE__ */ jsxs("div", { className: "mx-auto max-w-5xl px-6", children: [
|
|
55
|
+
/* @__PURE__ */ jsxs("div", { className: "text-center", children: [
|
|
56
|
+
/* @__PURE__ */ jsx(Heading, { level: 2, size: "section", className: "md:text-4xl", children: title }),
|
|
57
|
+
/* @__PURE__ */ jsx("p", { className: "text-text-tertiary mt-6", children: description })
|
|
58
|
+
] }),
|
|
59
|
+
/* @__PURE__ */ jsx(StaggerChildren, { staggerMs: 80, className: "mt-12 grid gap-4 sm:grid-cols-2 lg:grid-cols-3", children: integrations.map((integration, i) => /* @__PURE__ */ jsx(
|
|
60
|
+
IntegrationCard,
|
|
61
|
+
{
|
|
62
|
+
title: integration.title,
|
|
63
|
+
description: integration.description,
|
|
64
|
+
link: integration.link,
|
|
65
|
+
children: integration.icon
|
|
66
|
+
},
|
|
67
|
+
i
|
|
68
|
+
)) })
|
|
69
|
+
] }) }) }) });
|
|
70
|
+
}
|
|
71
|
+
var IntegrationCard = ({ title, description, children, link = "https://github.com/meschacirung/cnblocks" }) => {
|
|
72
|
+
return /* @__PURE__ */ jsx(Card, { className: "p-6", interactive: true, children: /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
73
|
+
/* @__PURE__ */ jsx("div", { className: "*:size-10", children }),
|
|
74
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-2 py-6", children: [
|
|
75
|
+
/* @__PURE__ */ jsx(Heading, { level: 3, size: "eyebrow", children: title }),
|
|
76
|
+
/* @__PURE__ */ jsx("p", { className: "text-text-tertiary line-clamp-2 text-sm", children: description })
|
|
77
|
+
] }),
|
|
78
|
+
/* @__PURE__ */ jsx("div", { className: "flex gap-4 border-t border-dashed pt-6", children: /* @__PURE__ */ jsx(
|
|
79
|
+
Button,
|
|
80
|
+
{
|
|
81
|
+
asChild: true,
|
|
82
|
+
variant: "secondary",
|
|
83
|
+
size: "sm",
|
|
84
|
+
className: "gap-1.5 pr-2 shadow-none",
|
|
85
|
+
children: /* @__PURE__ */ jsxs(Link, { href: link, children: [
|
|
86
|
+
"Learn More",
|
|
87
|
+
/* @__PURE__ */ jsx(ChevronRightIcon, { size: 14, className: "ml-0 opacity-50" })
|
|
88
|
+
] })
|
|
89
|
+
}
|
|
90
|
+
) })
|
|
91
|
+
] }) });
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export { IntegrationsBlock };
|