@vadimcomanescu/nadicode-design-system 2.0.9 → 4.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. package/.agents/skills/seed/SKILL.md +24 -14
  2. package/.agents/skills/seed/contract.md +19 -6
  3. package/.agents/skills/seed/recipes/agency-home.md +5 -5
  4. package/.agents/skills/seed/recipes/auth.md +3 -3
  5. package/.agents/skills/seed/recipes/blog-content.md +2 -2
  6. package/.agents/skills/seed/recipes/company-about.md +3 -3
  7. package/.agents/skills/seed/recipes/company-contact.md +3 -3
  8. package/.agents/skills/seed/recipes/digital-workers.md +3 -3
  9. package/.agents/skills/seed/recipes/marketing-landing.md +8 -8
  10. package/.agents/skills/seed/recipes/marketing-shell.md +4 -4
  11. package/.agents/skills/seed/recipes/navigation-shell.md +3 -2
  12. package/.agents/skills/seed/recipes/pricing.md +4 -4
  13. package/.agents/skills/seed/recipes/service-detail.md +3 -3
  14. package/.agents/skills/seed/references/blocks.md +5 -5
  15. package/.agents/skills/seed/references/components.md +2 -2
  16. package/.agents/skills/seed/references/nextjs.md +2 -2
  17. package/README.md +3 -3
  18. package/contracts/consumer-intent-map.json +1 -2
  19. package/contracts/release-governance-baseline.json +3 -37
  20. package/dist/catalog/catalog.d.ts +2220 -0
  21. package/dist/catalog/catalog.js +1913 -0
  22. package/dist/catalog/components.d.ts +201 -0
  23. package/dist/catalog/components.js +407 -0
  24. package/dist/catalog/types.d.ts +4 -0
  25. package/dist/catalog/types.js +1 -0
  26. package/dist/chunk-224KPIOG.js +60 -0
  27. package/dist/chunk-25BOZMXA.js +169 -0
  28. package/dist/chunk-32OLQ7FC.js +130 -0
  29. package/dist/chunk-3JJBJ4VR.js +47 -0
  30. package/dist/chunk-3U56FXYC.js +30 -0
  31. package/dist/chunk-4MWKE6F5.js +86 -0
  32. package/dist/chunk-6HGSU24S.js +94 -0
  33. package/dist/chunk-7IADIXDV.js +168 -0
  34. package/dist/chunk-7NS3VFD7.js +86 -0
  35. package/dist/chunk-ALA6OM7K.js +134 -0
  36. package/dist/chunk-AN5TW4AL.js +50 -0
  37. package/dist/chunk-AWZFQQGN.js +167 -0
  38. package/dist/chunk-BRCBJ3S4.js +42 -0
  39. package/dist/chunk-BRICSLHJ.js +30 -0
  40. package/dist/chunk-BYEHHZZN.js +115 -0
  41. package/dist/chunk-C33GUEDY.js +149 -0
  42. package/dist/chunk-CUDMDYKE.js +150 -0
  43. package/dist/chunk-CVTMWSNS.js +145 -0
  44. package/dist/chunk-DEZXWNYF.js +165 -0
  45. package/dist/chunk-DNJEVMDY.js +40 -0
  46. package/dist/chunk-DNJOBML6.js +66 -0
  47. package/dist/chunk-FTGFOK6T.js +69 -0
  48. package/dist/{chunk-7A2RXKGH.js → chunk-GJ557DGH.js} +1 -1
  49. package/dist/chunk-HFBJ6L6O.js +104 -0
  50. package/dist/chunk-HPTHS7SX.js +52 -0
  51. package/dist/chunk-K4U67BVG.js +175 -0
  52. package/dist/chunk-KNR3WB5C.js +147 -0
  53. package/dist/chunk-KQ7ZC6EM.js +66 -0
  54. package/dist/chunk-LGW7FVG5.js +83 -0
  55. package/dist/chunk-LK2L3C7D.js +72 -0
  56. package/dist/chunk-LP6ZZYOQ.js +36 -0
  57. package/dist/chunk-LV4P7WVM.js +54 -0
  58. package/dist/chunk-MGSGCARB.js +164 -0
  59. package/dist/chunk-N3YFYMNZ.js +73 -0
  60. package/dist/{chunk-DSMGCFMJ.js → chunk-POFFOUQW.js} +2 -5
  61. package/dist/chunk-Q5IYBNA7.js +56 -0
  62. package/dist/chunk-QJCE7NZF.js +85 -0
  63. package/dist/chunk-QW5II6YK.js +96 -0
  64. package/dist/chunk-RMGDDOCD.js +138 -0
  65. package/dist/chunk-RNCX4JIE.js +70 -0
  66. package/dist/chunk-RWCL5OPX.js +112 -0
  67. package/dist/chunk-S5OY2B63.js +28 -0
  68. package/dist/chunk-SIQNG72C.js +257 -0
  69. package/dist/chunk-SP7NIZFP.js +117 -0
  70. package/dist/chunk-SWRJWMGG.js +30 -0
  71. package/dist/chunk-TCQIJ3DO.js +85 -0
  72. package/dist/chunk-TPJ6JJ2F.js +290 -0
  73. package/dist/chunk-UR43ANYS.js +159 -0
  74. package/dist/chunk-VRGPG2YN.js +79 -0
  75. package/dist/chunk-WSBLCWY7.js +126 -0
  76. package/dist/chunk-XKKFSFYO.js +93 -0
  77. package/dist/chunk-XO7TBM47.js +32 -0
  78. package/dist/chunk-YDYDGG5K.js +132 -0
  79. package/dist/chunk-YMJOUYMT.js +171 -0
  80. package/dist/chunk-Z2WION42.js +32 -0
  81. package/dist/chunk-ZFKSVEYW.js +35 -0
  82. package/dist/components/blocks/AgentProfileGridBlock.js +8 -86
  83. package/dist/components/blocks/AgentRunOverviewBlock.js +8 -147
  84. package/dist/components/blocks/AgentWorkbenchBlock.js +15 -257
  85. package/dist/components/blocks/AudioVisualizerBlock.js +2 -50
  86. package/dist/components/blocks/AuthLayout.js +9 -73
  87. package/dist/components/blocks/BannerBlock.js +8 -66
  88. package/dist/components/blocks/BarChartBlock.js +5 -47
  89. package/dist/components/blocks/ChartBlock.js +7 -54
  90. package/dist/components/blocks/ChartCollectionBlock.js +11 -171
  91. package/dist/components/blocks/ChatLayout.js +12 -126
  92. package/dist/components/blocks/CreateBlock.js +9 -104
  93. package/dist/components/blocks/DataGridBlock.js +9 -117
  94. package/dist/components/blocks/DirectoryBlock.js +12 -85
  95. package/dist/components/blocks/FeatureGridBlock.js +6 -56
  96. package/dist/components/blocks/GalleryBlock.js +6 -69
  97. package/dist/components/blocks/HeroBlock.js +2 -2
  98. package/dist/components/blocks/HeroSectionBlock.js +10 -134
  99. package/dist/components/blocks/IntegrationsBlock.js +13 -94
  100. package/dist/components/blocks/InteractiveAreaChartBlock.js +5 -290
  101. package/dist/components/blocks/KanbanDemoBlock.js +8 -145
  102. package/dist/components/blocks/LogoCloud.js +4 -35
  103. package/dist/components/blocks/NavUser.js +5 -85
  104. package/dist/components/blocks/NotFoundBlock.js +8 -32
  105. package/dist/components/blocks/OnboardingBlock.js +7 -66
  106. package/dist/components/blocks/SettingsLayout.js +13 -86
  107. package/dist/components/blocks/SignUpBlock.js +8 -168
  108. package/dist/components/blocks/SolutionShowcaseBlock.js +11 -112
  109. package/dist/components/blocks/StatsBlock.js +6 -60
  110. package/dist/components/blocks/UsageDonutBlock.js +5 -79
  111. package/dist/components/blocks/WizardBlock.js +12 -93
  112. package/dist/components/blocks/user/InviteUserModal.js +10 -132
  113. package/dist/components/page-kits/AccountLockedPageKit.js +3 -40
  114. package/dist/components/page-kits/AgentsChatPageKit.js +11 -159
  115. package/dist/components/page-kits/AnalyticsPageKit.js +12 -150
  116. package/dist/components/page-kits/BlogContentPageKit.js +12 -167
  117. package/dist/components/page-kits/CheckoutPageKit.js +9 -83
  118. package/dist/components/page-kits/CompanySuitePageKit.js +9 -96
  119. package/dist/components/page-kits/DashboardPageKit.js +11 -149
  120. package/dist/components/page-kits/ErrorPageKit.js +5 -52
  121. package/dist/components/page-kits/KanbanBoardPageKit.js +7 -169
  122. package/dist/components/page-kits/LandingPageKit.js +12 -73
  123. package/dist/components/page-kits/LoginPageKit.js +3 -32
  124. package/dist/components/page-kits/OnboardingPageKit.js +6 -115
  125. package/dist/components/page-kits/PricingPageKit.js +12 -138
  126. package/dist/components/page-kits/ProfileSettingsPageKit.js +10 -164
  127. package/dist/components/page-kits/RecoveryPageKit.js +3 -42
  128. package/dist/components/page-kits/ResetPageKit.js +3 -36
  129. package/dist/components/page-kits/ServiceSuitePageKit.js +11 -176
  130. package/dist/components/page-kits/SignupPageKit.js +3 -30
  131. package/dist/components/page-kits/SuccessPageKit.js +4 -30
  132. package/dist/components/page-kits/TeamSettingsPageKit.js +9 -165
  133. package/dist/components/page-kits/TwoFactorPageKit.js +4 -28
  134. package/dist/components/page-kits/VerifyEmailPageKit.js +4 -30
  135. package/dist/components/page-kits/VoiceAgentsPageKit.js +13 -130
  136. package/dist/components/ui/AvatarUpload.js +1 -1
  137. package/dist/components/ui/CheckoutForm.js +5 -70
  138. package/dist/components/ui/MouseEffect.js +1 -1
  139. package/eslint-rules/nadicode/config.js +2 -0
  140. package/eslint-rules/nadicode/data/catalog-names.json +93 -0
  141. package/eslint-rules/nadicode/index.js +4 -0
  142. package/eslint-rules/nadicode/rules/__tests__/require-catalog-component.test.js +77 -0
  143. package/eslint-rules/nadicode/rules/__tests__/require-catalog-import.test.js +111 -0
  144. package/eslint-rules/nadicode/rules/require-catalog-component.js +79 -0
  145. package/eslint-rules/nadicode/rules/require-catalog-import.js +59 -0
  146. package/package.json +15 -358
  147. package/contracts/block-props-schemas.json +0 -2186
  148. package/contracts/component-props-schemas.json +0 -8322
  149. package/contracts/consumer-contract.json +0 -178
  150. package/contracts/page-kit-props-schemas.json +0 -1894
  151. package/contracts/public-surface-registry.json +0 -5822
  152. package/contracts/public-surface-registry.schema.json +0 -219
  153. package/contracts/spec-manifest.json +0 -46
  154. package/dist/catalog.json +0 -5221
@@ -0,0 +1,85 @@
1
+ import { SidebarProvider, Sidebar, SidebarContent, SidebarGroup, SidebarGroupLabel, SidebarGroupContent, SidebarMenu, SidebarMenuItem, SidebarMenuButton, SidebarMenuAction } from './chunk-J2DCQDXO.js';
2
+ import { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator } from './chunk-CQEUNASC.js';
3
+ import { Empty, EmptyDescription } from './chunk-55HD4L6G.js';
4
+ import { UsersIcon } from './chunk-WUO7OONN.js';
5
+ import { Trash2Icon } from './chunk-S4GKGKON.js';
6
+ import { StarIcon } from './chunk-ELKIUARM.js';
7
+ import { SettingsIcon } from './chunk-OITJWGFV.js';
8
+ import { LayoutDashboardIcon } from './chunk-O74AEVHW.js';
9
+ import { HomeIcon } from './chunk-IQEBXXB5.js';
10
+ import { FolderIcon } from './chunk-I3TH7PIB.js';
11
+ import { EllipsisIcon } from './chunk-5ESF6N36.js';
12
+ import { useTranslations } from 'next-intl';
13
+ import Link from 'next/link';
14
+ import { jsxs, jsx } from 'react/jsx-runtime';
15
+
16
+ var defaultNavItems = [
17
+ { name: "Home", icon: /* @__PURE__ */ jsx(HomeIcon, { size: 16 }), isActive: true },
18
+ { name: "Dashboard", icon: /* @__PURE__ */ jsx(LayoutDashboardIcon, { size: 16 }) },
19
+ { name: "Team", icon: /* @__PURE__ */ jsx(UsersIcon, { size: 16 }) },
20
+ { name: "Settings", icon: /* @__PURE__ */ jsx(SettingsIcon, { size: 16 }) }
21
+ ];
22
+ var defaultProjects = [
23
+ { name: "Design Engineering", url: "#" },
24
+ { name: "Sales & Marketing", url: "#" },
25
+ { name: "Travel", url: "#" }
26
+ ];
27
+ function DirectoryBlock({
28
+ navItems = defaultNavItems,
29
+ projects = defaultProjects,
30
+ className
31
+ }) {
32
+ const t = useTranslations("blocks.directoryBlock");
33
+ return /* @__PURE__ */ jsxs("div", { className: className ?? "h-[500px] border border-border rounded-lg overflow-hidden flex bg-surface text-text-primary", children: [
34
+ /* @__PURE__ */ jsx(SidebarProvider, { className: "h-full", children: /* @__PURE__ */ jsx(Sidebar, { collapsible: "none", className: "h-full border-r border-border", children: /* @__PURE__ */ jsxs(SidebarContent, { children: [
35
+ /* @__PURE__ */ jsxs(SidebarGroup, { children: [
36
+ /* @__PURE__ */ jsx(SidebarGroupLabel, { children: t("platform") }),
37
+ /* @__PURE__ */ jsx(SidebarGroupContent, { children: /* @__PURE__ */ jsx(SidebarMenu, { children: navItems.map((item) => /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsxs(SidebarMenuButton, { isActive: item.isActive, children: [
38
+ item.icon,
39
+ /* @__PURE__ */ jsx("span", { children: item.name })
40
+ ] }) }, item.name)) }) })
41
+ ] }),
42
+ /* @__PURE__ */ jsxs(SidebarGroup, { children: [
43
+ /* @__PURE__ */ jsx(SidebarGroupLabel, { children: t("projects") }),
44
+ /* @__PURE__ */ jsx(SidebarGroupContent, { children: /* @__PURE__ */ jsx(SidebarMenu, { children: projects.map((item) => /* @__PURE__ */ jsxs(SidebarMenuItem, { children: [
45
+ /* @__PURE__ */ jsx(SidebarMenuButton, { asChild: true, children: /* @__PURE__ */ jsxs(Link, { href: item.url, children: [
46
+ /* @__PURE__ */ jsx(FolderIcon, { size: 16 }),
47
+ /* @__PURE__ */ jsx("span", { children: item.name })
48
+ ] }) }),
49
+ /* @__PURE__ */ jsxs(DropdownMenu, { children: [
50
+ /* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(SidebarMenuAction, { showOnHover: true, children: [
51
+ /* @__PURE__ */ jsx(EllipsisIcon, { size: 16 }),
52
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: t("more") })
53
+ ] }) }),
54
+ /* @__PURE__ */ jsxs(
55
+ DropdownMenuContent,
56
+ {
57
+ className: "w-48 rounded-lg",
58
+ side: "bottom",
59
+ align: "end",
60
+ children: [
61
+ /* @__PURE__ */ jsxs(DropdownMenuItem, { children: [
62
+ /* @__PURE__ */ jsx(FolderIcon, { size: 16, className: "text-text-tertiary" }),
63
+ /* @__PURE__ */ jsx("span", { children: t("viewProject") })
64
+ ] }),
65
+ /* @__PURE__ */ jsxs(DropdownMenuItem, { children: [
66
+ /* @__PURE__ */ jsx(StarIcon, { size: 16, className: "text-text-tertiary" }),
67
+ /* @__PURE__ */ jsx("span", { children: t("addToFavorites") })
68
+ ] }),
69
+ /* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
70
+ /* @__PURE__ */ jsxs(DropdownMenuItem, { children: [
71
+ /* @__PURE__ */ jsx(Trash2Icon, { size: 16, className: "text-text-tertiary" }),
72
+ /* @__PURE__ */ jsx("span", { children: t("deleteProject") })
73
+ ] })
74
+ ]
75
+ }
76
+ )
77
+ ] })
78
+ ] }, item.name)) }) })
79
+ ] })
80
+ ] }) }) }),
81
+ /* @__PURE__ */ jsx("div", { className: "flex-1 p-8 bg-background", children: /* @__PURE__ */ jsx(Empty, { className: "h-full", children: /* @__PURE__ */ jsx(EmptyDescription, { children: t("selectProject") }) }) })
82
+ ] });
83
+ }
84
+
85
+ export { DirectoryBlock };
@@ -0,0 +1,290 @@
1
+ import { AreaChart } from './chunk-IPXL7WX7.js';
2
+ import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from './chunk-WH62BE24.js';
3
+ import { Card, CardHeader, CardTitle, CardDescription, CardContent } from './chunk-AH6YSYYT.js';
4
+ import { cn } from './chunk-QYZT24TS.js';
5
+ import * as React from 'react';
6
+ import { jsxs, jsx } from 'react/jsx-runtime';
7
+
8
+ var defaultTimeRanges = [
9
+ { value: "90d", label: "Last 3 months", days: 90 },
10
+ { value: "30d", label: "Last 30 days", days: 30 },
11
+ { value: "7d", label: "Last 7 days", days: 7 }
12
+ ];
13
+ var defaultData = (() => {
14
+ const base = /* @__PURE__ */ new Date("2024-06-15");
15
+ const desktopValues = [
16
+ 312,
17
+ 245,
18
+ 178,
19
+ 389,
20
+ 267,
21
+ 334,
22
+ 198,
23
+ 421,
24
+ 156,
25
+ 290,
26
+ 375,
27
+ 203,
28
+ 348,
29
+ 187,
30
+ 412,
31
+ 256,
32
+ 301,
33
+ 169,
34
+ 395,
35
+ 228,
36
+ 367,
37
+ 194,
38
+ 340,
39
+ 275,
40
+ 403,
41
+ 215,
42
+ 352,
43
+ 183,
44
+ 298,
45
+ 246,
46
+ 385,
47
+ 210,
48
+ 327,
49
+ 171,
50
+ 416,
51
+ 263,
52
+ 309,
53
+ 195,
54
+ 388,
55
+ 231,
56
+ 370,
57
+ 201,
58
+ 345,
59
+ 278,
60
+ 407,
61
+ 219,
62
+ 356,
63
+ 186,
64
+ 302,
65
+ 249,
66
+ 380,
67
+ 207,
68
+ 332,
69
+ 174,
70
+ 413,
71
+ 260,
72
+ 305,
73
+ 192,
74
+ 392,
75
+ 234,
76
+ 373,
77
+ 198,
78
+ 342,
79
+ 272,
80
+ 405,
81
+ 222,
82
+ 359,
83
+ 189,
84
+ 306,
85
+ 252,
86
+ 377,
87
+ 204,
88
+ 335,
89
+ 177,
90
+ 410,
91
+ 257,
92
+ 308,
93
+ 196,
94
+ 390,
95
+ 237,
96
+ 376,
97
+ 200,
98
+ 339,
99
+ 270,
100
+ 408,
101
+ 225,
102
+ 362,
103
+ 191,
104
+ 303,
105
+ 248,
106
+ 382,
107
+ 209,
108
+ 330,
109
+ 173,
110
+ 415,
111
+ 261,
112
+ 311,
113
+ 193,
114
+ 387,
115
+ 233
116
+ ];
117
+ const mobileValues = [
118
+ 215,
119
+ 312,
120
+ 178,
121
+ 256,
122
+ 345,
123
+ 189,
124
+ 278,
125
+ 367,
126
+ 201,
127
+ 290,
128
+ 234,
129
+ 156,
130
+ 323,
131
+ 198,
132
+ 267,
133
+ 389,
134
+ 212,
135
+ 345,
136
+ 176,
137
+ 301,
138
+ 248,
139
+ 167,
140
+ 334,
141
+ 205,
142
+ 278,
143
+ 356,
144
+ 189,
145
+ 312,
146
+ 223,
147
+ 267,
148
+ 241,
149
+ 159,
150
+ 328,
151
+ 201,
152
+ 271,
153
+ 382,
154
+ 195,
155
+ 338,
156
+ 179,
157
+ 305,
158
+ 245,
159
+ 162,
160
+ 330,
161
+ 208,
162
+ 274,
163
+ 360,
164
+ 192,
165
+ 315,
166
+ 226,
167
+ 270,
168
+ 238,
169
+ 155,
170
+ 325,
171
+ 198,
172
+ 268,
173
+ 385,
174
+ 191,
175
+ 342,
176
+ 182,
177
+ 308,
178
+ 242,
179
+ 164,
180
+ 332,
181
+ 210,
182
+ 276,
183
+ 358,
184
+ 188,
185
+ 318,
186
+ 220,
187
+ 264,
188
+ 240,
189
+ 157,
190
+ 322,
191
+ 195,
192
+ 265,
193
+ 388,
194
+ 194,
195
+ 340,
196
+ 180,
197
+ 302,
198
+ 247,
199
+ 166,
200
+ 336,
201
+ 212,
202
+ 280,
203
+ 362,
204
+ 190,
205
+ 320,
206
+ 228,
207
+ 272,
208
+ 236,
209
+ 153,
210
+ 327,
211
+ 200,
212
+ 270,
213
+ 380,
214
+ 193,
215
+ 335,
216
+ 175,
217
+ 310
218
+ ];
219
+ return Array.from({ length: 100 }, (_, i) => {
220
+ const date = new Date(base);
221
+ date.setDate(date.getDate() - (99 - i));
222
+ return {
223
+ date: date.toISOString().split("T")[0],
224
+ desktop: desktopValues[i],
225
+ mobile: mobileValues[i]
226
+ };
227
+ });
228
+ })();
229
+ var defaultConfig = {
230
+ visitors: {
231
+ label: "Visitors"
232
+ },
233
+ desktop: {
234
+ label: "Desktop",
235
+ color: "rgb(var(--chart-1))"
236
+ },
237
+ mobile: {
238
+ label: "Mobile",
239
+ color: "rgb(var(--chart-2))"
240
+ }
241
+ };
242
+ function InteractiveAreaChartBlock({
243
+ data = defaultData,
244
+ config = defaultConfig,
245
+ title = "Traffic Analysis",
246
+ description = "Showing total visitors for the last 3 months",
247
+ timeRanges = defaultTimeRanges,
248
+ className
249
+ }) {
250
+ const [timeRange, setTimeRange] = React.useState(timeRanges[0]?.value ?? "90d");
251
+ const filteredData = React.useMemo(() => data.filter((item) => {
252
+ const date = new Date(item.date);
253
+ const now = /* @__PURE__ */ new Date();
254
+ const selectedRange = timeRanges.find((r) => r.value === timeRange);
255
+ const daysToSubtract = selectedRange?.days ?? 90;
256
+ now.setDate(now.getDate() - daysToSubtract);
257
+ return date >= now;
258
+ }), [data, timeRanges, timeRange]);
259
+ return /* @__PURE__ */ jsxs(Card, { className: cn(className), children: [
260
+ /* @__PURE__ */ jsxs(CardHeader, { className: "flex items-center gap-2 space-y-0 border-b border-border py-6 sm:flex-row", children: [
261
+ /* @__PURE__ */ jsxs("div", { className: "grid flex-1 gap-1.5 text-center sm:text-left", children: [
262
+ /* @__PURE__ */ jsx(CardTitle, { children: title }),
263
+ /* @__PURE__ */ jsx(CardDescription, { children: description })
264
+ ] }),
265
+ /* @__PURE__ */ jsxs(Select, { value: timeRange, onValueChange: setTimeRange, children: [
266
+ /* @__PURE__ */ jsx(
267
+ SelectTrigger,
268
+ {
269
+ className: "w-[160px] rounded-lg sm:ml-auto",
270
+ "aria-label": "Select a value",
271
+ children: /* @__PURE__ */ jsx(SelectValue, { placeholder: timeRanges[0]?.label ?? "Last 3 months" })
272
+ }
273
+ ),
274
+ /* @__PURE__ */ jsx(SelectContent, { className: "rounded-xl", children: timeRanges.map((range) => /* @__PURE__ */ jsx(SelectItem, { value: range.value, className: "rounded-lg", children: range.label }, range.value)) })
275
+ ] })
276
+ ] }),
277
+ /* @__PURE__ */ jsx(CardContent, { className: "px-2 pt-4 sm:px-6 sm:pt-6", children: /* @__PURE__ */ jsx(
278
+ AreaChart,
279
+ {
280
+ data: filteredData,
281
+ config,
282
+ indexKey: "date",
283
+ areas: ["mobile", "desktop"],
284
+ stacked: true
285
+ }
286
+ ) })
287
+ ] });
288
+ }
289
+
290
+ export { InteractiveAreaChartBlock };
@@ -0,0 +1,159 @@
1
+ import { NavigationShellPageKit } from './chunk-ZKLB5N3Q.js';
2
+ import { AgentConversationBlock } from './chunk-4IGBBIYW.js';
3
+ import { ToolCallCard } from './chunk-4WPZ6T7V.js';
4
+ import { Typography } from './chunk-N53OMWW2.js';
5
+ import { Textarea } from './chunk-4OBE2FS2.js';
6
+ import { Heading } from './chunk-WI547C47.js';
7
+ import { Card, CardHeader, CardTitle, CardContent } from './chunk-AH6YSYYT.js';
8
+ import { Button } from './chunk-7KIDDF3I.js';
9
+ import { Badge } from './chunk-S4JAHKOP.js';
10
+ import { cn } from './chunk-QYZT24TS.js';
11
+ import React from 'react';
12
+ import { jsx, jsxs } from 'react/jsx-runtime';
13
+
14
+ var EMPTY_MESSAGES = [];
15
+ var EMPTY_TOOL_CALLS = [];
16
+ var EMPTY_ARTIFACTS = [];
17
+ var EMPTY_TRACE_EVENTS = [];
18
+ function stateLabel(state) {
19
+ switch (state) {
20
+ case "empty":
21
+ return "Empty";
22
+ case "loading":
23
+ return "Loading";
24
+ case "thinking":
25
+ return "Thinking";
26
+ case "blocked-approval":
27
+ return "Blocked on approval";
28
+ case "failed":
29
+ return "Failed";
30
+ case "running":
31
+ return "Running";
32
+ case "complete":
33
+ return "Complete";
34
+ default:
35
+ return "Running";
36
+ }
37
+ }
38
+ function placeholderContent(state) {
39
+ switch (state) {
40
+ case "empty":
41
+ return "No messages yet. Start the run from the composer.";
42
+ case "loading":
43
+ return "Loading run context...";
44
+ case "thinking":
45
+ return "Agent is thinking through the next step.";
46
+ default:
47
+ return "Waiting for conversation updates.";
48
+ }
49
+ }
50
+ function AgentsChatPageKit({
51
+ shell,
52
+ state = "running",
53
+ messages = EMPTY_MESSAGES,
54
+ toolCalls = EMPTY_TOOL_CALLS,
55
+ artifacts = EMPTY_ARTIFACTS,
56
+ traceEvents = EMPTY_TRACE_EVENTS,
57
+ approval,
58
+ composer,
59
+ errorMessage,
60
+ className
61
+ }) {
62
+ const [draft, setDraft] = React.useState(composer?.value ?? "");
63
+ const composerValue = composer?.value ?? draft;
64
+ const composerPlaceholder = composer?.placeholder ?? "Type a message to the active run...";
65
+ const composerDisabled = composer?.disabled ?? false;
66
+ function handleComposerChange(value) {
67
+ if (composer?.value == null) {
68
+ setDraft(value);
69
+ }
70
+ composer?.onChange?.(value);
71
+ }
72
+ function handleComposerSend() {
73
+ const payload = composerValue.trim();
74
+ if (!payload || composerDisabled) {
75
+ return;
76
+ }
77
+ composer?.onSend?.(payload);
78
+ if (composer?.value == null) {
79
+ setDraft("");
80
+ }
81
+ }
82
+ const conversationMessages = messages.length > 0 ? messages : [{
83
+ id: "state-placeholder",
84
+ role: "system",
85
+ content: placeholderContent(state)
86
+ }];
87
+ return /* @__PURE__ */ jsx(NavigationShellPageKit, { ...shell, children: /* @__PURE__ */ jsxs("section", { className: cn("space-y-6", className), children: [
88
+ /* @__PURE__ */ jsxs("header", { className: "space-y-2", children: [
89
+ /* @__PURE__ */ jsx(Heading, { level: 3, children: "Agents chat" }),
90
+ /* @__PURE__ */ jsx(Typography, { variant: "muted", children: "Conversation-driven agent workflow surface with explicit tooling and traceability layers." }),
91
+ /* @__PURE__ */ jsx("div", { className: "flex flex-wrap items-center gap-2", children: /* @__PURE__ */ jsx(Badge, { variant: state === "failed" ? "destructive" : "outline", children: stateLabel(state) }) })
92
+ ] }),
93
+ state === "failed" ? /* @__PURE__ */ jsx("div", { role: "alert", className: "rounded-md border border-destructive/40 bg-destructive/10 px-4 py-3 text-sm text-destructive", children: errorMessage ?? "The run failed. Inspect tooling and traceability details before retrying." }) : null,
94
+ state === "blocked-approval" && approval ? /* @__PURE__ */ jsxs(Card, { children: [
95
+ /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: "Approval required" }) }),
96
+ /* @__PURE__ */ jsxs(CardContent, { className: "space-y-3", children: [
97
+ /* @__PURE__ */ jsx(Typography, { variant: "small", children: approval.pendingReason }),
98
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-2", children: [
99
+ /* @__PURE__ */ jsx(Button, { type: "button", onClick: approval.onApprove, children: "Approve run" }),
100
+ /* @__PURE__ */ jsx(Button, { type: "button", variant: "outline", onClick: approval.onReject, children: "Reject run" })
101
+ ] })
102
+ ] })
103
+ ] }) : null,
104
+ /* @__PURE__ */ jsxs("div", { className: "grid gap-4 xl:grid-cols-[minmax(0,1.4fr)_minmax(0,1fr)]", children: [
105
+ /* @__PURE__ */ jsxs(Card, { children: [
106
+ /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: "Conversation" }) }),
107
+ /* @__PURE__ */ jsxs(CardContent, { className: "space-y-4", children: [
108
+ /* @__PURE__ */ jsx(AgentConversationBlock, { messages: conversationMessages }),
109
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
110
+ /* @__PURE__ */ jsx("label", { htmlFor: "agents-chat-composer", className: "text-sm font-medium text-text-primary", children: "Message composer" }),
111
+ /* @__PURE__ */ jsx(
112
+ Textarea,
113
+ {
114
+ id: "agents-chat-composer",
115
+ value: composerValue,
116
+ disabled: composerDisabled,
117
+ placeholder: composerPlaceholder,
118
+ onChange: (event) => handleComposerChange(event.target.value)
119
+ }
120
+ ),
121
+ /* @__PURE__ */ jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx(Button, { type: "button", onClick: handleComposerSend, disabled: composerDisabled || composerValue.trim().length === 0, children: "Send message" }) })
122
+ ] })
123
+ ] })
124
+ ] }),
125
+ /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
126
+ /* @__PURE__ */ jsxs(Card, { children: [
127
+ /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: "Tooling" }) }),
128
+ /* @__PURE__ */ jsx(CardContent, { className: "space-y-3", children: toolCalls.length === 0 ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-text-secondary", children: "No tool calls yet." }) : toolCalls.map((toolCall) => /* @__PURE__ */ jsx(
129
+ ToolCallCard,
130
+ {
131
+ toolName: toolCall.toolName,
132
+ status: toolCall.status,
133
+ result: toolCall.result,
134
+ duration: toolCall.durationMs
135
+ },
136
+ toolCall.id
137
+ )) })
138
+ ] }),
139
+ /* @__PURE__ */ jsxs(Card, { children: [
140
+ /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: "Traceability" }) }),
141
+ /* @__PURE__ */ jsxs(CardContent, { className: "space-y-3", children: [
142
+ artifacts.length === 0 && traceEvents.length === 0 ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-text-secondary", children: "No artifacts or trace events recorded yet." }) : null,
143
+ artifacts.map((artifact) => /* @__PURE__ */ jsxs("div", { className: "rounded-md border border-border/70 p-3", children: [
144
+ /* @__PURE__ */ jsx(Typography, { variant: "small", className: "font-medium text-text-primary", children: artifact.title }),
145
+ /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-text-tertiary uppercase tracking-wide", children: artifact.kind }),
146
+ /* @__PURE__ */ jsx(Typography, { variant: "small", className: "mt-1 text-text-secondary", children: artifact.summary })
147
+ ] }, artifact.id)),
148
+ traceEvents.map((event) => /* @__PURE__ */ jsxs("div", { className: "rounded-md border border-border/70 p-3", children: [
149
+ /* @__PURE__ */ jsx(Typography, { variant: "small", className: "font-medium text-text-primary", children: event.label }),
150
+ /* @__PURE__ */ jsx(Typography, { variant: "small", className: "mt-1 text-text-secondary", children: event.detail })
151
+ ] }, event.id))
152
+ ] })
153
+ ] })
154
+ ] })
155
+ ] })
156
+ ] }) });
157
+ }
158
+
159
+ export { AgentsChatPageKit };
@@ -0,0 +1,79 @@
1
+ import { PieChart } from './chunk-U7V6TREO.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, Fragment } from 'react/jsx-runtime';
6
+
7
+ var defaultData = [
8
+ { name: "Vector DB", value: 400, fill: "rgb(var(--chart-1))" },
9
+ { name: "Model Storage", value: 300, fill: "rgb(var(--chart-2))" },
10
+ { name: "Logs", value: 300, fill: "rgb(var(--chart-3))" },
11
+ { name: "Cache", value: 200, fill: "rgb(var(--chart-4))" }
12
+ ];
13
+ var defaultConfig = {
14
+ "Vector DB": {
15
+ label: "Vector DB",
16
+ color: "rgb(var(--chart-1))"
17
+ },
18
+ "Model Storage": {
19
+ label: "Model Storage",
20
+ color: "rgb(var(--chart-2))"
21
+ },
22
+ "Logs": {
23
+ label: "Logs",
24
+ color: "rgb(var(--chart-3))"
25
+ },
26
+ "Cache": {
27
+ label: "Cache",
28
+ color: "rgb(var(--chart-4))"
29
+ }
30
+ };
31
+ var defaultCenterLabel = /* @__PURE__ */ jsxs(Fragment, { children: [
32
+ /* @__PURE__ */ jsxs("span", { className: "text-3xl font-bold text-text-primary", children: [
33
+ "1.2",
34
+ /* @__PURE__ */ jsx("span", { className: "text-lg text-text-secondary", children: "GB" })
35
+ ] }),
36
+ /* @__PURE__ */ jsx("span", { className: "text-xs text-text-tertiary uppercase tracking-wider", children: "Used" })
37
+ ] });
38
+ function UsageDonutBlock({
39
+ data = defaultData,
40
+ config = defaultConfig,
41
+ title = "Storage",
42
+ description = "Distribution of data types",
43
+ centerLabel = defaultCenterLabel,
44
+ className
45
+ }) {
46
+ return /* @__PURE__ */ jsxs(Card, { className: cn("w-full max-w-[350px]", className), children: [
47
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
48
+ /* @__PURE__ */ jsx(CardTitle, { children: title }),
49
+ /* @__PURE__ */ jsx(CardDescription, { children: description })
50
+ ] }),
51
+ /* @__PURE__ */ jsx(CardContent, { className: "pb-4", children: data.length === 0 ? /* @__PURE__ */ jsxs(Empty, { className: "min-h-[240px]", children: [
52
+ /* @__PURE__ */ jsx(EmptyTitle, { children: "No storage breakdown" }),
53
+ /* @__PURE__ */ jsx(EmptyDescription, { children: "Storage categories will appear here once usage data is available." })
54
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
55
+ /* @__PURE__ */ jsxs("div", { className: "h-[240px] relative", children: [
56
+ /* @__PURE__ */ jsx(
57
+ PieChart,
58
+ {
59
+ data,
60
+ config,
61
+ dataKey: "value",
62
+ nameKey: "name",
63
+ innerRadius: 60,
64
+ outerRadius: 80,
65
+ showLegend: false,
66
+ className: "mx-auto aspect-square max-h-[240px]"
67
+ }
68
+ ),
69
+ /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex flex-col items-center justify-center pointer-events-none", children: centerLabel })
70
+ ] }),
71
+ /* @__PURE__ */ jsx("div", { className: "mt-4 grid grid-cols-2 gap-2 text-sm", children: data.map((item) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-text-secondary", children: [
72
+ /* @__PURE__ */ jsx("div", { className: "h-2.5 w-2.5 rounded-full", style: { backgroundColor: item.fill } }),
73
+ item.name
74
+ ] }, item.name)) })
75
+ ] }) })
76
+ ] });
77
+ }
78
+
79
+ export { UsageDonutBlock };