@vadimcomanescu/nadicode-design-system 2.0.8 → 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.
Files changed (137) hide show
  1. package/.agents/skills/seed/SKILL.md +19 -10
  2. package/.agents/skills/seed/contract.md +9 -2
  3. package/.agents/skills/seed/references/blocks.md +5 -5
  4. package/.agents/skills/seed/references/components.md +2 -2
  5. package/.agents/skills/seed/references/nextjs.md +2 -2
  6. package/README.md +3 -3
  7. package/contracts/consumer-intent-map.json +1 -2
  8. package/contracts/release-governance-baseline.json +3 -37
  9. package/dist/catalog/catalog.d.ts +2220 -0
  10. package/dist/catalog/catalog.js +1913 -0
  11. package/dist/catalog/components.d.ts +201 -0
  12. package/dist/catalog/components.js +407 -0
  13. package/dist/catalog/types.d.ts +4 -0
  14. package/dist/catalog/types.js +1 -0
  15. package/dist/chunk-224KPIOG.js +60 -0
  16. package/dist/chunk-25BOZMXA.js +169 -0
  17. package/dist/chunk-32OLQ7FC.js +130 -0
  18. package/dist/chunk-3JJBJ4VR.js +47 -0
  19. package/dist/chunk-3U56FXYC.js +30 -0
  20. package/dist/chunk-4MWKE6F5.js +86 -0
  21. package/dist/chunk-6HGSU24S.js +94 -0
  22. package/dist/chunk-7IADIXDV.js +168 -0
  23. package/dist/chunk-7NS3VFD7.js +86 -0
  24. package/dist/chunk-7XLZCXUL.js +175 -0
  25. package/dist/chunk-ALA6OM7K.js +134 -0
  26. package/dist/chunk-AN5TW4AL.js +50 -0
  27. package/dist/chunk-AWZFQQGN.js +167 -0
  28. package/dist/chunk-BRCBJ3S4.js +42 -0
  29. package/dist/chunk-BRICSLHJ.js +30 -0
  30. package/dist/chunk-BYEHHZZN.js +115 -0
  31. package/dist/chunk-C33GUEDY.js +149 -0
  32. package/dist/chunk-CUDMDYKE.js +150 -0
  33. package/dist/chunk-CVTMWSNS.js +145 -0
  34. package/dist/chunk-DEZXWNYF.js +165 -0
  35. package/dist/chunk-DNJEVMDY.js +40 -0
  36. package/dist/chunk-DNJOBML6.js +66 -0
  37. package/dist/chunk-FTGFOK6T.js +69 -0
  38. package/dist/chunk-HFBJ6L6O.js +104 -0
  39. package/dist/chunk-HPTHS7SX.js +52 -0
  40. package/dist/chunk-KNR3WB5C.js +147 -0
  41. package/dist/chunk-KQ7ZC6EM.js +66 -0
  42. package/dist/chunk-LGW7FVG5.js +83 -0
  43. package/dist/chunk-LP6ZZYOQ.js +36 -0
  44. package/dist/chunk-LV4P7WVM.js +54 -0
  45. package/dist/chunk-MGSGCARB.js +164 -0
  46. package/dist/chunk-N3YFYMNZ.js +73 -0
  47. package/dist/chunk-Q5IYBNA7.js +56 -0
  48. package/dist/chunk-QJCE7NZF.js +85 -0
  49. package/dist/chunk-QW5II6YK.js +96 -0
  50. package/dist/chunk-RMGDDOCD.js +138 -0
  51. package/dist/chunk-RNCX4JIE.js +70 -0
  52. package/dist/chunk-RWCL5OPX.js +112 -0
  53. package/dist/chunk-S5OY2B63.js +28 -0
  54. package/dist/chunk-SIQNG72C.js +257 -0
  55. package/dist/chunk-SP7NIZFP.js +117 -0
  56. package/dist/chunk-SWRJWMGG.js +30 -0
  57. package/dist/chunk-TCQIJ3DO.js +85 -0
  58. package/dist/chunk-TPJ6JJ2F.js +290 -0
  59. package/dist/chunk-TUJZMJXW.js +72 -0
  60. package/dist/chunk-UR43ANYS.js +159 -0
  61. package/dist/chunk-VRGPG2YN.js +79 -0
  62. package/dist/chunk-WSBLCWY7.js +126 -0
  63. package/dist/chunk-XKKFSFYO.js +93 -0
  64. package/dist/chunk-XO7TBM47.js +32 -0
  65. package/dist/chunk-YDYDGG5K.js +132 -0
  66. package/dist/chunk-YMJOUYMT.js +171 -0
  67. package/dist/chunk-Z2WION42.js +32 -0
  68. package/dist/chunk-ZFKSVEYW.js +35 -0
  69. package/dist/components/blocks/AgentProfileGridBlock.js +8 -86
  70. package/dist/components/blocks/AgentRunOverviewBlock.js +8 -147
  71. package/dist/components/blocks/AgentWorkbenchBlock.js +15 -257
  72. package/dist/components/blocks/AudioVisualizerBlock.js +2 -50
  73. package/dist/components/blocks/AuthLayout.js +9 -73
  74. package/dist/components/blocks/BannerBlock.js +8 -66
  75. package/dist/components/blocks/BarChartBlock.js +5 -47
  76. package/dist/components/blocks/ChartBlock.js +7 -54
  77. package/dist/components/blocks/ChartCollectionBlock.js +11 -171
  78. package/dist/components/blocks/ChatLayout.js +12 -126
  79. package/dist/components/blocks/CreateBlock.js +9 -104
  80. package/dist/components/blocks/DataGridBlock.js +9 -117
  81. package/dist/components/blocks/DirectoryBlock.js +12 -85
  82. package/dist/components/blocks/FeatureGridBlock.js +6 -56
  83. package/dist/components/blocks/GalleryBlock.js +6 -69
  84. package/dist/components/blocks/HeroSectionBlock.js +10 -134
  85. package/dist/components/blocks/IntegrationsBlock.js +13 -94
  86. package/dist/components/blocks/InteractiveAreaChartBlock.js +5 -290
  87. package/dist/components/blocks/KanbanDemoBlock.js +8 -145
  88. package/dist/components/blocks/LogoCloud.js +4 -35
  89. package/dist/components/blocks/NavUser.js +5 -85
  90. package/dist/components/blocks/NotFoundBlock.js +8 -32
  91. package/dist/components/blocks/OnboardingBlock.js +7 -66
  92. package/dist/components/blocks/SettingsLayout.js +13 -86
  93. package/dist/components/blocks/SignUpBlock.js +8 -168
  94. package/dist/components/blocks/SolutionShowcaseBlock.js +11 -112
  95. package/dist/components/blocks/StatsBlock.js +6 -60
  96. package/dist/components/blocks/UsageDonutBlock.js +5 -79
  97. package/dist/components/blocks/WizardBlock.js +12 -93
  98. package/dist/components/blocks/user/InviteUserModal.js +10 -132
  99. package/dist/components/page-kits/AccountLockedPageKit.js +3 -40
  100. package/dist/components/page-kits/AgentsChatPageKit.js +11 -159
  101. package/dist/components/page-kits/AnalyticsPageKit.js +12 -150
  102. package/dist/components/page-kits/BlogContentPageKit.js +12 -167
  103. package/dist/components/page-kits/CheckoutPageKit.js +9 -83
  104. package/dist/components/page-kits/CompanySuitePageKit.js +9 -96
  105. package/dist/components/page-kits/DashboardPageKit.js +11 -149
  106. package/dist/components/page-kits/ErrorPageKit.js +5 -52
  107. package/dist/components/page-kits/KanbanBoardPageKit.js +7 -169
  108. package/dist/components/page-kits/LandingPageKit.js +11 -72
  109. package/dist/components/page-kits/LoginPageKit.js +3 -32
  110. package/dist/components/page-kits/OnboardingPageKit.js +6 -115
  111. package/dist/components/page-kits/PricingPageKit.js +12 -138
  112. package/dist/components/page-kits/ProfileSettingsPageKit.js +10 -164
  113. package/dist/components/page-kits/RecoveryPageKit.js +3 -42
  114. package/dist/components/page-kits/ResetPageKit.js +3 -36
  115. package/dist/components/page-kits/ServiceSuitePageKit.js +10 -175
  116. package/dist/components/page-kits/SignupPageKit.js +3 -30
  117. package/dist/components/page-kits/SuccessPageKit.js +4 -30
  118. package/dist/components/page-kits/TeamSettingsPageKit.js +9 -165
  119. package/dist/components/page-kits/TwoFactorPageKit.js +4 -28
  120. package/dist/components/page-kits/VerifyEmailPageKit.js +4 -30
  121. package/dist/components/page-kits/VoiceAgentsPageKit.js +13 -130
  122. package/dist/components/ui/CheckoutForm.js +5 -70
  123. package/eslint-rules/nadicode/config.js +1 -1
  124. package/eslint-rules/nadicode/data/catalog-names.json +93 -0
  125. package/eslint-rules/nadicode/index.js +2 -2
  126. package/eslint-rules/nadicode/rules/__tests__/require-catalog-component.test.js +77 -0
  127. package/eslint-rules/nadicode/rules/require-catalog-component.js +79 -0
  128. package/package.json +18 -25
  129. package/contracts/block-props-schemas.json +0 -2186
  130. package/contracts/component-props-schemas.json +0 -8322
  131. package/contracts/consumer-contract.json +0 -178
  132. package/contracts/page-kit-props-schemas.json +0 -1894
  133. package/contracts/public-surface-registry.json +0 -6162
  134. package/contracts/public-surface-registry.schema.json +0 -227
  135. package/contracts/spec-manifest.json +0 -46
  136. package/dist/catalog.json +0 -5221
  137. package/eslint-rules/nadicode/rules/no-forbidden-page-kit-import.js +0 -99
@@ -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,72 @@
1
+ import { MarketingShellPageKit } from './chunk-Z233ZQZE.js';
2
+ import { SocialProofBlock } from './chunk-C7WHMSF3.js';
3
+ import { StatsMarketingBlock } from './chunk-QIHA7S3A.js';
4
+ import { NewsletterBlock } from './chunk-K7NQ6ZAW.js';
5
+ import { PricingBlock } from './chunk-VNNAL4A6.js';
6
+ import { HeroBlock } from './chunk-7A2RXKGH.js';
7
+ import { FAQBlock } from './chunk-NEHCPO53.js';
8
+ import { FeatureBlock } from './chunk-HJ3A2YNO.js';
9
+ import { CallToActionBlock } from './chunk-GJPTPLCQ.js';
10
+ import { cn } from './chunk-QYZT24TS.js';
11
+ import React from 'react';
12
+ import { jsx, jsxs } from 'react/jsx-runtime';
13
+
14
+ var DEFAULT_SECTION_ORDER = [
15
+ "hero",
16
+ "features",
17
+ "proof",
18
+ "pricing-teaser",
19
+ "faq",
20
+ "cta",
21
+ "newsletter"
22
+ ];
23
+ var DEFAULT_FEATURES = {};
24
+ var DEFAULT_PROOF = {};
25
+ var DEFAULT_PRICING_TEASER = {};
26
+ var DEFAULT_FAQ = {};
27
+ var DEFAULT_CTA = {};
28
+ var DEFAULT_NEWSLETTER = {};
29
+ function normalizeSectionOrder(sectionOrder) {
30
+ if (!sectionOrder || sectionOrder.length === 0) {
31
+ return DEFAULT_SECTION_ORDER;
32
+ }
33
+ const seen = /* @__PURE__ */ new Set();
34
+ return sectionOrder.filter((section) => {
35
+ if (seen.has(section)) {
36
+ return false;
37
+ }
38
+ seen.add(section);
39
+ return true;
40
+ });
41
+ }
42
+ function LandingPageKit({
43
+ shell,
44
+ sectionOrder,
45
+ hero,
46
+ features = DEFAULT_FEATURES,
47
+ proof = DEFAULT_PROOF,
48
+ pricingTeaser = DEFAULT_PRICING_TEASER,
49
+ faq = DEFAULT_FAQ,
50
+ cta = DEFAULT_CTA,
51
+ newsletter = DEFAULT_NEWSLETTER,
52
+ className
53
+ }) {
54
+ const orderedSections = normalizeSectionOrder(sectionOrder);
55
+ const hasProof = proof !== null && (proof.logos !== null || proof.testimonials !== null || proof.stats !== null);
56
+ const sectionById = {
57
+ hero: hero === null ? null : /* @__PURE__ */ jsx("section", { "data-testid": "landing-section-hero", className: "mx-auto w-full max-w-6xl px-6 pt-4", children: /* @__PURE__ */ jsx(HeroBlock, { ...hero }) }),
58
+ features: features === null ? null : /* @__PURE__ */ jsx("section", { "data-testid": "landing-section-features", className: "mx-auto w-full max-w-6xl px-6", children: /* @__PURE__ */ jsx(FeatureBlock, { ...features }) }),
59
+ proof: !hasProof ? null : /* @__PURE__ */ jsxs("section", { "data-testid": "landing-section-proof", className: "mx-auto grid w-full max-w-6xl gap-6 px-6 lg:grid-cols-2", children: [
60
+ proof.logos !== null ? /* @__PURE__ */ jsx(SocialProofBlock, { variant: "logo-cloud", ...proof.logos }) : null,
61
+ proof.stats !== null ? /* @__PURE__ */ jsx(StatsMarketingBlock, { ...proof.stats }) : null,
62
+ proof.testimonials !== null ? /* @__PURE__ */ jsx("div", { className: "lg:col-span-2", children: /* @__PURE__ */ jsx(SocialProofBlock, { variant: "testimonials", ...proof.testimonials }) }) : null
63
+ ] }),
64
+ "pricing-teaser": pricingTeaser === null ? null : /* @__PURE__ */ jsx("section", { "data-testid": "landing-section-pricing-teaser", className: "mx-auto w-full max-w-6xl px-6", children: /* @__PURE__ */ jsx(PricingBlock, { showBillingToggle: false, ...pricingTeaser }) }),
65
+ faq: faq === null ? null : /* @__PURE__ */ jsx("section", { "data-testid": "landing-section-faq", className: "mx-auto w-full max-w-6xl px-6", children: /* @__PURE__ */ jsx(FAQBlock, { ...faq }) }),
66
+ cta: cta === null ? null : /* @__PURE__ */ jsx("section", { "data-testid": "landing-section-cta", className: "mx-auto w-full max-w-6xl px-6", children: /* @__PURE__ */ jsx(CallToActionBlock, { ...cta }) }),
67
+ newsletter: newsletter === null ? null : /* @__PURE__ */ jsx("section", { "data-testid": "landing-section-newsletter", className: "mx-auto w-full max-w-6xl px-6 pb-16", children: /* @__PURE__ */ jsx(NewsletterBlock, { ...newsletter }) })
68
+ };
69
+ return /* @__PURE__ */ jsx(MarketingShellPageKit, { ...shell, children: /* @__PURE__ */ jsx("div", { className: cn("space-y-10 pb-10", className), children: orderedSections.map((sectionId) => /* @__PURE__ */ jsx(React.Fragment, { children: sectionById[sectionId] }, sectionId)) }) });
70
+ }
71
+
72
+ export { LandingPageKit };
@@ -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 };