@vadimcomanescu/nadicode-design-system 2.0.7 → 2.0.8

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 (231) hide show
  1. package/.agents/skills/seed/SKILL.md +17 -8
  2. package/.agents/skills/seed/contract.md +5 -5
  3. package/.agents/skills/seed/intent-map.md +3 -3
  4. package/.agents/skills/seed/recipes/agents-chat.md +44 -20
  5. package/.agents/skills/seed/references/blocks.md +5 -2
  6. package/.agents/skills/seed/references/components.md +22 -2
  7. package/.agents/skills/seed/references/dashboard-patterns.md +12 -12
  8. package/.agents/skills/seed/references/nextjs.md +20 -80
  9. package/.agents/skills/seed/references/tokens.md +57 -248
  10. package/README.md +43 -215
  11. package/contracts/block-props-schemas.json +2186 -0
  12. package/contracts/component-props-schemas.json +8322 -0
  13. package/contracts/consumer-contract.json +178 -0
  14. package/contracts/consumer-intent-map.json +707 -0
  15. package/contracts/message-catalog-contract.json +820 -0
  16. package/contracts/page-kit-props-schemas.json +1894 -0
  17. package/contracts/public-surface-registry.json +6162 -0
  18. package/contracts/public-surface-registry.schema.json +227 -0
  19. package/contracts/release-governance-baseline.json +850 -0
  20. package/contracts/spec-manifest.json +46 -0
  21. package/dist/catalog.json +284 -81
  22. package/dist/chunk-4IGBBIYW.js +47 -0
  23. package/dist/chunk-4WPZ6T7V.js +186 -0
  24. package/dist/{chunk-OHOOQUVJ.js → chunk-C7WHMSF3.js} +2 -1
  25. package/dist/{chunk-4K3PATUT.js → chunk-EEL4RAPC.js} +13 -1
  26. package/dist/{chunk-ILIHQ2KZ.js → chunk-EK43W2Y6.js} +16 -10
  27. package/dist/{chunk-IDKZEPWK.js → chunk-FV2G6SAF.js} +6 -5
  28. package/dist/chunk-HWHJ6IRQ.js +78 -0
  29. package/dist/{chunk-AUSYEAIJ.js → chunk-I66XWYSS.js} +32 -8
  30. package/dist/chunk-JDJY4ABS.js +60 -0
  31. package/dist/{chunk-GV4PKHG4.js → chunk-KWILREVQ.js} +2 -2
  32. package/dist/{chunk-WI37ZYIF.js → chunk-M4XKO45H.js} +13 -1
  33. package/dist/{chunk-6N6CSJVE.js → chunk-OJ7OO3QB.js} +2 -2
  34. package/dist/{chunk-ZHTQF2KI.js → chunk-OSNTB6RY.js} +29 -22
  35. package/dist/{chunk-GMMPLZLC.js → chunk-PDSQC6VE.js} +1 -1
  36. package/dist/chunk-QQOWC53X.js +98 -0
  37. package/dist/chunk-VJ5VD4UT.js +91 -0
  38. package/dist/{chunk-TUKZKU72.js → chunk-ZKLB5N3Q.js} +1 -1
  39. package/dist/components/blocks/AgentConversationBlock.d.ts +6 -1
  40. package/dist/components/blocks/AgentConversationBlock.js +44 -42
  41. package/dist/components/blocks/AgentRunOverviewBlock.js +1 -1
  42. package/dist/components/blocks/AgentWorkbenchBlock.d.ts +5 -1
  43. package/dist/components/blocks/AgentWorkbenchBlock.js +47 -46
  44. package/dist/components/blocks/AuthLayout.js +2 -2
  45. package/dist/components/blocks/BannerBlock.js +38 -38
  46. package/dist/components/blocks/CallToActionBlock.js +2 -2
  47. package/dist/components/blocks/ChangelogBlock.js +39 -39
  48. package/dist/components/blocks/ChartBlock.js +38 -38
  49. package/dist/components/blocks/ChartCollectionBlock.js +1 -1
  50. package/dist/components/blocks/ChatLayout.d.ts +4 -1
  51. package/dist/components/blocks/ChatLayout.js +39 -39
  52. package/dist/components/blocks/CodeBlock.js +2 -2
  53. package/dist/components/blocks/ContactBlock.js +2 -2
  54. package/dist/components/blocks/CreateBlock.js +39 -39
  55. package/dist/components/blocks/DataGridBlock.js +40 -40
  56. package/dist/components/blocks/DirectoryBlock.js +43 -43
  57. package/dist/components/blocks/FAQBlock.js +38 -38
  58. package/dist/components/blocks/FeatureBlock.js +38 -38
  59. package/dist/components/blocks/GalleryBlock.js +38 -38
  60. package/dist/components/blocks/HeaderBlock.js +38 -38
  61. package/dist/components/blocks/HeroBlock.js +41 -41
  62. package/dist/components/blocks/HeroSectionBlock.js +55 -59
  63. package/dist/components/blocks/IntegrationsBlock.js +40 -40
  64. package/dist/components/blocks/InteractiveAreaChartBlock.js +38 -38
  65. package/dist/components/blocks/KanbanDemoBlock.js +3 -3
  66. package/dist/components/blocks/LoginBlock.js +2 -2
  67. package/dist/components/blocks/LogoCloud.js +2 -13
  68. package/dist/components/blocks/NavUser.js +42 -42
  69. package/dist/components/blocks/NotFoundBlock.js +41 -41
  70. package/dist/components/blocks/OnboardingBlock.js +38 -38
  71. package/dist/components/blocks/PricingBlock.js +4 -4
  72. package/dist/components/blocks/ProcessFlowBlock.js +2 -2
  73. package/dist/components/blocks/SettingsLayout.js +42 -42
  74. package/dist/components/blocks/SignUpBlock.js +1 -1
  75. package/dist/components/blocks/SocialProofBlock.js +4 -3
  76. package/dist/components/blocks/StatsBlock.js +38 -38
  77. package/dist/components/blocks/StatsMarketingBlock.js +2 -2
  78. package/dist/components/blocks/TestimonialsBlock.js +2 -1
  79. package/dist/components/blocks/TwoFactorChallengeBlock.js +38 -38
  80. package/dist/components/blocks/TwoFactorSetupBlock.js +41 -41
  81. package/dist/components/blocks/VoiceAgentCard.d.ts +3 -1
  82. package/dist/components/blocks/VoiceAgentCard.js +7 -76
  83. package/dist/components/blocks/WizardBlock.js +39 -39
  84. package/dist/components/blocks/user/InviteUserModal.js +38 -38
  85. package/dist/components/logos/index.js +2 -2
  86. package/dist/components/page-kits/AgentsChatPageKit.js +59 -58
  87. package/dist/components/page-kits/AnalyticsPageKit.js +44 -44
  88. package/dist/components/page-kits/BlogContentPageKit.js +43 -43
  89. package/dist/components/page-kits/CheckoutPageKit.js +41 -41
  90. package/dist/components/page-kits/CompanySuitePageKit.js +47 -47
  91. package/dist/components/page-kits/CrudFormPageKit.js +44 -44
  92. package/dist/components/page-kits/CrudListDetailPageKit.js +44 -44
  93. package/dist/components/page-kits/DashboardPageKit.js +44 -44
  94. package/dist/components/page-kits/KanbanBoardPageKit.js +47 -47
  95. package/dist/components/page-kits/LandingPageKit.js +50 -49
  96. package/dist/components/page-kits/LoginPageKit.js +2 -2
  97. package/dist/components/page-kits/MarketingShellPageKit.js +40 -40
  98. package/dist/components/page-kits/NavigationShellPageKit.js +42 -42
  99. package/dist/components/page-kits/OnboardingPageKit.js +44 -44
  100. package/dist/components/page-kits/PricingPageKit.js +46 -46
  101. package/dist/components/page-kits/ProfileSettingsPageKit.js +2 -2
  102. package/dist/components/page-kits/ServiceSuitePageKit.js +47 -46
  103. package/dist/components/page-kits/SignupPageKit.js +2 -2
  104. package/dist/components/page-kits/SuccessPageKit.js +38 -38
  105. package/dist/components/page-kits/TeamSettingsPageKit.js +45 -45
  106. package/dist/components/page-kits/TwoFactorPageKit.js +41 -41
  107. package/dist/components/page-kits/VerifyEmailPageKit.js +38 -38
  108. package/dist/components/page-kits/VoiceAgentsPageKit.js +80 -76
  109. package/dist/components/ui/Accordion.js +38 -38
  110. package/dist/components/ui/AgentMessageBubble.d.ts +20 -4
  111. package/dist/components/ui/AgentMessageBubble.js +39 -39
  112. package/dist/components/ui/AgentStatus.d.ts +1 -1
  113. package/dist/components/ui/AgentStatus.js +5 -10
  114. package/dist/components/ui/AgentTerminal.d.ts +4 -1
  115. package/dist/components/ui/AgentTerminal.js +3 -1
  116. package/dist/components/ui/AgentTimeline.d.ts +2 -2
  117. package/dist/components/ui/AgentTimeline.js +15 -6
  118. package/dist/components/ui/AnimatedDialog.js +38 -38
  119. package/dist/components/ui/AnimatedSheet.js +38 -38
  120. package/dist/components/ui/ApprovalCard.js +1 -1
  121. package/dist/components/ui/Breadcrumb.js +38 -38
  122. package/dist/components/ui/Calendar.js +38 -38
  123. package/dist/components/ui/Carousel.js +38 -38
  124. package/dist/components/ui/ChatActions.d.ts +14 -0
  125. package/dist/components/ui/ChatActions.js +52 -0
  126. package/dist/components/ui/ChatBranch.d.ts +18 -0
  127. package/dist/components/ui/ChatBranch.js +84 -0
  128. package/dist/components/ui/ChatChainOfThought.d.ts +25 -0
  129. package/dist/components/ui/ChatChainOfThought.js +99 -0
  130. package/dist/components/ui/ChatConfirmation.d.ts +37 -0
  131. package/dist/components/ui/ChatConfirmation.js +115 -0
  132. package/dist/components/ui/ChatGreeting.d.ts +18 -0
  133. package/dist/components/ui/ChatGreeting.js +80 -0
  134. package/dist/components/ui/ChatMessage.d.ts +40 -0
  135. package/dist/components/ui/ChatMessage.js +96 -0
  136. package/dist/components/ui/ChatPlan.d.ts +29 -0
  137. package/dist/components/ui/ChatPlan.js +86 -0
  138. package/dist/components/ui/ChatPromptInput.d.ts +32 -0
  139. package/dist/components/ui/ChatPromptInput.js +193 -0
  140. package/dist/components/ui/ChatPromptInputAttachments.d.ts +9 -0
  141. package/dist/components/ui/ChatPromptInputAttachments.js +145 -0
  142. package/dist/components/ui/ChatQueue.d.ts +32 -0
  143. package/dist/components/ui/ChatQueue.js +93 -0
  144. package/dist/components/ui/ChatReasoning.d.ts +20 -0
  145. package/dist/components/ui/ChatReasoning.js +91 -0
  146. package/dist/components/ui/ChatResponse.d.ts +14 -0
  147. package/dist/components/ui/ChatResponse.js +25 -0
  148. package/dist/components/ui/ChatShimmer.d.ts +23 -0
  149. package/dist/components/ui/ChatShimmer.js +6 -0
  150. package/dist/components/ui/ChatSources.d.ts +30 -0
  151. package/dist/components/ui/ChatSources.js +113 -0
  152. package/dist/components/ui/ChatSuggestion.d.ts +13 -0
  153. package/dist/components/ui/ChatSuggestion.js +41 -0
  154. package/dist/components/ui/ChatThinkingMessage.d.ts +12 -0
  155. package/dist/components/ui/ChatThinkingMessage.js +55 -0
  156. package/dist/components/ui/ChatToolCall.d.ts +41 -0
  157. package/dist/components/ui/ChatToolCall.js +192 -0
  158. package/dist/components/ui/CheckStatus.d.ts +1 -1
  159. package/dist/components/ui/Checkbox.js +38 -38
  160. package/dist/components/ui/CheckoutForm.js +38 -38
  161. package/dist/components/ui/CheckoutFormDemo.js +38 -38
  162. package/dist/components/ui/Combobox.js +38 -38
  163. package/dist/components/ui/Command.js +38 -38
  164. package/dist/components/ui/ContextMenu.js +38 -38
  165. package/dist/components/ui/Conversation.d.ts +21 -0
  166. package/dist/components/ui/Conversation.js +196 -0
  167. package/dist/components/ui/ConversationThread.d.ts +8 -2
  168. package/dist/components/ui/ConversationThread.js +34 -16
  169. package/dist/components/ui/DataTable.js +40 -40
  170. package/dist/components/ui/DatePicker.js +38 -38
  171. package/dist/components/ui/DateRangePicker.js +38 -38
  172. package/dist/components/ui/Dialog.js +38 -38
  173. package/dist/components/ui/DropdownMenu.js +39 -39
  174. package/dist/components/ui/FileUpload.js +38 -38
  175. package/dist/components/ui/InputOTP.js +38 -38
  176. package/dist/components/ui/KanbanBoard.js +2 -2
  177. package/dist/components/ui/LanguageSwitcher.js +38 -38
  178. package/dist/components/ui/Menubar.js +38 -38
  179. package/dist/components/ui/NavigationMenu.js +38 -38
  180. package/dist/components/ui/NotificationCenter.js +38 -38
  181. package/dist/components/ui/Pagination.js +38 -38
  182. package/dist/components/ui/RadioGroup.js +38 -38
  183. package/dist/components/ui/Resizable.js +38 -38
  184. package/dist/components/ui/SearchCommand.js +38 -38
  185. package/dist/components/ui/Select.js +38 -38
  186. package/dist/components/ui/SettingsModal.js +38 -38
  187. package/dist/components/ui/Sheet.js +38 -38
  188. package/dist/components/ui/Sidebar.js +41 -41
  189. package/dist/components/ui/StyleToggle.js +1 -1
  190. package/dist/components/ui/TagInput.js +38 -38
  191. package/dist/components/ui/ThemeToggle.js +39 -39
  192. package/dist/components/ui/ThinkingIndicator.d.ts +3 -1
  193. package/dist/components/ui/ThinkingIndicator.js +2 -1
  194. package/dist/components/ui/Toast.js +38 -38
  195. package/dist/components/ui/Toaster.js +38 -38
  196. package/dist/components/ui/ToolCallCard.d.ts +1 -1
  197. package/dist/components/ui/ToolCallCard.js +5 -1
  198. package/dist/components/ui/TreeView.js +38 -38
  199. package/dist/components/ui/charts/index.js +1 -1
  200. package/dist/components/ui/icons/index.js +38 -38
  201. package/dist/components/ui/text-effects/index.js +2 -2
  202. package/dist/hooks/use-scroll-to-bottom.d.ts +13 -0
  203. package/dist/hooks/use-scroll-to-bottom.js +2 -0
  204. package/dist/index.js +43 -43
  205. package/dist/internal/local-image-assets.d.ts +12 -0
  206. package/dist/messages/en.js +1 -1
  207. package/dist/messages/it.js +1 -1
  208. package/dist/test/PublicSeedTestProvider.js +2 -2
  209. package/dist/test/simulate-ime-composition.d.ts +54 -0
  210. package/dist/test/simulate-ime-composition.js +55 -0
  211. package/eslint-rules/nadicode/config.js +2 -0
  212. package/eslint-rules/nadicode/index.js +4 -0
  213. package/eslint-rules/nadicode/rules/no-deprecated-ds-import.js +77 -0
  214. package/eslint-rules/nadicode/rules/no-forbidden-page-kit-import.js +99 -0
  215. package/eslint-rules/nadicode/rules/no-unregistered-glass.js +2 -0
  216. package/package.json +103 -6
  217. package/scripts/ds-check.mjs +94 -73
  218. package/dist/chunk-MLUSJTS2.js +0 -107
  219. package/dist/chunk-TZXZFSD2.js +0 -33
  220. package/dist/{chunk-MX5FUFQR.js → chunk-7A2RXKGH.js} +2 -2
  221. package/dist/{chunk-5DKCZWC6.js → chunk-CQEUNASC.js} +1 -1
  222. package/dist/{chunk-RMLS2QUC.js → chunk-HZERHGBT.js} +1 -1
  223. package/dist/{chunk-WAVU744B.js → chunk-IXQGKJU4.js} +3 -3
  224. package/dist/{chunk-4HRVRW2X.js → chunk-J2DCQDXO.js} +2 -2
  225. package/dist/{chunk-6MFAZU4B.js → chunk-RGE5OQMZ.js} +1 -1
  226. package/dist/{chunk-PJNHVPHF.js → chunk-TYP2MR3Q.js} +1 -1
  227. package/dist/{chunk-TS2JSPQR.js → chunk-U4GYSYGN.js} +1 -1
  228. package/dist/{chunk-EJNF6JLL.js → chunk-VEO56RH4.js} +1 -1
  229. package/dist/{chunk-AURJQZC4.js → chunk-VNNAL4A6.js} +1 -1
  230. package/dist/{chunk-5PORR6LE.js → chunk-XTASI4IY.js} +1 -1
  231. package/dist/{chunk-E4L6LR6P.js → chunk-Z233ZQZE.js} +1 -1
@@ -0,0 +1,113 @@
1
+ 'use client';
2
+ import { Collapsible, CollapsibleTrigger, CollapsibleContent } from '../../chunk-VJIL7W55.js';
3
+ import { LinkIcon } from '../../chunk-TBKJ34BB.js';
4
+ import { ChevronDownIcon } from '../../chunk-HJBXUXTD.js';
5
+ import '../../chunk-ASKFAYYR.js';
6
+ import { cn } from '../../chunk-QYZT24TS.js';
7
+ import { jsx, jsxs } from 'react/jsx-runtime';
8
+
9
+ function ChatSources({
10
+ children,
11
+ className,
12
+ defaultOpen = false
13
+ }) {
14
+ return /* @__PURE__ */ jsx(Collapsible, { defaultOpen, className: cn("space-y-1", className), children });
15
+ }
16
+ function ChatSourcesTrigger({ count, className }) {
17
+ const label = `Used ${count} source${count === 1 ? "" : "s"}`;
18
+ return /* @__PURE__ */ jsxs(
19
+ CollapsibleTrigger,
20
+ {
21
+ "aria-label": label,
22
+ className: cn(
23
+ "inline-flex min-h-10 min-w-10 items-center gap-1.5 rounded-lg px-2 py-1",
24
+ "text-xs text-text-secondary",
25
+ "hover:bg-surface/80 hover:text-text-primary transition-colors",
26
+ "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent",
27
+ className
28
+ ),
29
+ children: [
30
+ /* @__PURE__ */ jsx(LinkIcon, { size: 14, "aria-hidden": "true" }),
31
+ /* @__PURE__ */ jsx("span", { children: label }),
32
+ /* @__PURE__ */ jsx(
33
+ ChevronDownIcon,
34
+ {
35
+ size: 14,
36
+ "aria-hidden": "true",
37
+ className: "transition-transform [[data-state=open]>&]:rotate-180"
38
+ }
39
+ )
40
+ ]
41
+ }
42
+ );
43
+ }
44
+ function ChatSourcesContent({
45
+ children,
46
+ className
47
+ }) {
48
+ return /* @__PURE__ */ jsx(CollapsibleContent, { children: /* @__PURE__ */ jsx(
49
+ "div",
50
+ {
51
+ role: "list",
52
+ className: cn("space-y-1 rounded-lg border border-border p-2", className),
53
+ children
54
+ }
55
+ ) });
56
+ }
57
+ function ChatSource({ title, url, description, className }) {
58
+ let hostname = "";
59
+ try {
60
+ hostname = new URL(url).hostname.replace(/^www\./, "");
61
+ } catch {
62
+ hostname = url;
63
+ }
64
+ return /* @__PURE__ */ jsxs("div", { role: "listitem", className: cn("rounded-md px-2 py-1.5", className), children: [
65
+ /* @__PURE__ */ jsx(
66
+ "a",
67
+ {
68
+ href: url,
69
+ target: "_blank",
70
+ rel: "noopener noreferrer",
71
+ className: cn(
72
+ "text-sm font-medium text-text-primary hover:underline",
73
+ "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent rounded"
74
+ ),
75
+ children: title
76
+ }
77
+ ),
78
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-text-tertiary", children: hostname }),
79
+ !!description && /* @__PURE__ */ jsx("p", { className: "mt-0.5 text-xs text-text-secondary", children: description })
80
+ ] });
81
+ }
82
+ function ChatInlineCitation({
83
+ index,
84
+ href,
85
+ onClick,
86
+ className
87
+ }) {
88
+ const baseClass = cn(
89
+ "inline-flex h-4 min-w-4 items-center justify-center rounded-sm",
90
+ "bg-accent/10 px-0.5 text-[10px] font-medium leading-none text-accent",
91
+ "hover:bg-accent/20 transition-colors",
92
+ "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent",
93
+ className
94
+ );
95
+ if (href) {
96
+ return /* @__PURE__ */ jsx("sup", { children: /* @__PURE__ */ jsx("a", { href, "aria-label": `Source ${index}`, className: baseClass, children: index }) });
97
+ }
98
+ if (onClick) {
99
+ return /* @__PURE__ */ jsx("sup", { children: /* @__PURE__ */ jsx(
100
+ "button",
101
+ {
102
+ type: "button",
103
+ onClick,
104
+ "aria-label": `Source ${index}`,
105
+ className: baseClass,
106
+ children: index
107
+ }
108
+ ) });
109
+ }
110
+ return /* @__PURE__ */ jsx("sup", { children: /* @__PURE__ */ jsx("span", { "aria-label": `Source ${index}`, className: baseClass, children: index }) });
111
+ }
112
+
113
+ export { ChatInlineCitation, ChatSource, ChatSources, ChatSourcesContent, ChatSourcesTrigger };
@@ -0,0 +1,13 @@
1
+ import { type ReactNode } from 'react';
2
+ export interface ChatSuggestionsProps {
3
+ children: ReactNode;
4
+ className?: string;
5
+ }
6
+ export declare function ChatSuggestions({ children, className }: ChatSuggestionsProps): import("react/jsx-runtime").JSX.Element;
7
+ export interface ChatSuggestionProps {
8
+ value: string;
9
+ onSelect: (value: string) => void;
10
+ children: ReactNode;
11
+ className?: string;
12
+ }
13
+ export declare function ChatSuggestion({ value, onSelect, children, className, }: ChatSuggestionProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,41 @@
1
+ 'use client';
2
+ import { cn } from '../../chunk-QYZT24TS.js';
3
+ import { jsx } from 'react/jsx-runtime';
4
+
5
+ function ChatSuggestions({ children, className }) {
6
+ return /* @__PURE__ */ jsx(
7
+ "div",
8
+ {
9
+ role: "group",
10
+ "aria-label": "Suggested prompts",
11
+ className: cn(
12
+ "flex gap-2 overflow-x-auto scrollbar-none pb-1",
13
+ className
14
+ ),
15
+ children
16
+ }
17
+ );
18
+ }
19
+ function ChatSuggestion({
20
+ value,
21
+ onSelect,
22
+ children,
23
+ className
24
+ }) {
25
+ return /* @__PURE__ */ jsx(
26
+ "button",
27
+ {
28
+ type: "button",
29
+ onClick: () => onSelect(value),
30
+ className: cn(
31
+ "shrink-0 rounded-full border border-border px-3 py-1.5 text-xs text-text-secondary",
32
+ "hover:bg-surface/80 hover:text-text-primary",
33
+ "transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent",
34
+ className
35
+ ),
36
+ children
37
+ }
38
+ );
39
+ }
40
+
41
+ export { ChatSuggestion, ChatSuggestions };
@@ -0,0 +1,12 @@
1
+ import { type Ref } from 'react';
2
+ export interface ChatThinkingMessageProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ ref?: Ref<HTMLDivElement>;
4
+ }
5
+ /**
6
+ * ChatThinkingMessage - animated "thinking" dots for pre-first-token wait.
7
+ *
8
+ * Renders 3 dots with staggered opacity pulse (0s, 0.2s, 0.4s delay).
9
+ * Respects prefers-reduced-motion by rendering static dots.
10
+ * Includes role="status" and aria-live="polite" for screen readers.
11
+ */
12
+ export declare function ChatThinkingMessage({ className, ref, ...props }: ChatThinkingMessageProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,55 @@
1
+ 'use client';
2
+ import { m } from '../../chunk-PD2YEH3H.js';
3
+ import { bezier } from '../../chunk-CRY67BIF.js';
4
+ import '../../chunk-HJC6U46F.js';
5
+ import { cn } from '../../chunk-QYZT24TS.js';
6
+ import { useReducedMotion } from 'motion/react';
7
+ import { jsx } from 'react/jsx-runtime';
8
+
9
+ var DOT_COUNT = 3;
10
+ var DOT_DELAY_S = 0.2;
11
+ var PULSE_TRANSITION = {
12
+ duration: 1.2,
13
+ repeat: Infinity,
14
+ ease: bezier["ease-in-out"]
15
+ };
16
+ function ChatThinkingMessage({
17
+ className,
18
+ ref,
19
+ ...props
20
+ }) {
21
+ const prefersReduced = useReducedMotion();
22
+ return /* @__PURE__ */ jsx(
23
+ "div",
24
+ {
25
+ ref,
26
+ role: "status",
27
+ "aria-live": "polite",
28
+ "aria-label": "Thinking",
29
+ className: cn("flex items-center gap-1", className),
30
+ ...props,
31
+ children: Array.from(
32
+ { length: DOT_COUNT },
33
+ (_, i) => prefersReduced ? /* @__PURE__ */ jsx(
34
+ "span",
35
+ {
36
+ "data-dot": i,
37
+ className: "h-1.5 w-1.5 rounded-full bg-text-secondary"
38
+ },
39
+ i
40
+ ) : /* @__PURE__ */ jsx(
41
+ m.span,
42
+ {
43
+ "data-dot": i,
44
+ className: "h-1.5 w-1.5 rounded-full bg-accent",
45
+ animate: { opacity: [0.3, 1, 0.3] },
46
+ transition: { ...PULSE_TRANSITION, delay: i * DOT_DELAY_S }
47
+ },
48
+ i
49
+ )
50
+ )
51
+ }
52
+ );
53
+ }
54
+
55
+ export { ChatThinkingMessage };
@@ -0,0 +1,41 @@
1
+ import { type ReactNode, type Ref } from 'react';
2
+ export type ChatToolCallState = 'input-streaming' | 'input-available' | 'approval-requested' | 'approval-responded' | 'output-available' | 'output-error' | 'output-denied';
3
+ declare const chatToolCallVariants: (props?: ({
4
+ state?: "input-streaming" | "input-available" | "approval-requested" | "approval-responded" | "output-available" | "output-error" | "output-denied" | null | undefined;
5
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
+ export interface ChatToolCallProps {
7
+ state: ChatToolCallState;
8
+ defaultOpen?: boolean;
9
+ open?: boolean;
10
+ onOpenChange?: (open: boolean) => void;
11
+ children: ReactNode;
12
+ className?: string;
13
+ ref?: Ref<HTMLDivElement>;
14
+ }
15
+ export declare const ChatToolCall: import("react").NamedExoticComponent<ChatToolCallProps>;
16
+ export interface ChatToolCallHeaderProps {
17
+ name?: string;
18
+ summary?: string | null;
19
+ children?: ReactNode;
20
+ className?: string;
21
+ }
22
+ export declare const ChatToolCallHeader: import("react").NamedExoticComponent<ChatToolCallHeaderProps>;
23
+ export interface ChatToolCallContentProps {
24
+ children: ReactNode;
25
+ className?: string;
26
+ }
27
+ export declare const ChatToolCallContent: import("react").NamedExoticComponent<ChatToolCallContentProps>;
28
+ export interface ChatToolCallInputProps {
29
+ children: string;
30
+ className?: string;
31
+ }
32
+ export declare function ChatToolCallInput({ children, className }: ChatToolCallInputProps): import("react/jsx-runtime").JSX.Element;
33
+ export interface ChatToolCallOutputProps {
34
+ children: string;
35
+ className?: string;
36
+ }
37
+ export declare function ChatToolCallOutput({ children, className }: ChatToolCallOutputProps): import("react/jsx-runtime").JSX.Element;
38
+ export declare function ChatToolCallStatus({ className }: {
39
+ className?: string;
40
+ }): import("react/jsx-runtime").JSX.Element;
41
+ export { chatToolCallVariants };
@@ -0,0 +1,192 @@
1
+ 'use client';
2
+ import { Collapsible, CollapsibleTrigger, CollapsibleContent } from '../../chunk-VJIL7W55.js';
3
+ import { LoaderCircleIcon } from '../../chunk-BRP6D56U.js';
4
+ import { ClockIcon } from '../../chunk-6G3RRWJT.js';
5
+ import { CheckIcon } from '../../chunk-CXACRCZ4.js';
6
+ import { ShieldCheckIcon } from '../../chunk-BFLN54VR.js';
7
+ import { XIcon } from '../../chunk-UIUMTURU.js';
8
+ import { Badge } from '../../chunk-S4JAHKOP.js';
9
+ import { ChevronDownIcon } from '../../chunk-HJBXUXTD.js';
10
+ import '../../chunk-ASKFAYYR.js';
11
+ import { cn } from '../../chunk-QYZT24TS.js';
12
+ import { createContext, memo, useContext } from 'react';
13
+ import { cva } from 'class-variance-authority';
14
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
15
+
16
+ var ChatToolCallContext = createContext(void 0);
17
+ function useChatToolCallState() {
18
+ return useContext(ChatToolCallContext);
19
+ }
20
+ var chatToolCallVariants = cva(
21
+ "rounded-xl border glass-panel transition-colors",
22
+ {
23
+ variants: {
24
+ state: {
25
+ "input-streaming": "border-accent/40",
26
+ "input-available": "border-accent/40",
27
+ "approval-requested": "border-warning/40",
28
+ "approval-responded": "border-accent/40",
29
+ "output-available": "border-success/40",
30
+ "output-error": "border-destructive/40",
31
+ "output-denied": "border-destructive/40"
32
+ }
33
+ },
34
+ defaultVariants: {
35
+ state: "input-streaming"
36
+ }
37
+ }
38
+ );
39
+ function getStatusMeta(state) {
40
+ switch (state) {
41
+ case "input-streaming":
42
+ return {
43
+ label: "Streaming",
44
+ icon: /* @__PURE__ */ jsx(LoaderCircleIcon, { size: 12, className: "animate-spin text-text-tertiary" }),
45
+ badgeVariant: "secondary"
46
+ };
47
+ case "input-available":
48
+ return {
49
+ label: "Running",
50
+ icon: /* @__PURE__ */ jsx(LoaderCircleIcon, { size: 12, className: "animate-spin text-accent" }),
51
+ badgeVariant: "accent"
52
+ };
53
+ case "approval-requested":
54
+ return {
55
+ label: "Approval needed",
56
+ icon: /* @__PURE__ */ jsx(ClockIcon, { size: 12, className: "text-warning" }),
57
+ badgeVariant: "outline"
58
+ };
59
+ case "approval-responded":
60
+ return {
61
+ label: "Approved",
62
+ icon: /* @__PURE__ */ jsx(ShieldCheckIcon, { size: 12, className: "text-accent" }),
63
+ badgeVariant: "accent"
64
+ };
65
+ case "output-available":
66
+ return {
67
+ label: "Completed",
68
+ icon: /* @__PURE__ */ jsx(CheckIcon, { size: 12, className: "text-success" }),
69
+ badgeVariant: "secondary"
70
+ };
71
+ case "output-error":
72
+ return {
73
+ label: "Error",
74
+ icon: /* @__PURE__ */ jsx(XIcon, { size: 12, className: "text-destructive" }),
75
+ badgeVariant: "destructive"
76
+ };
77
+ case "output-denied":
78
+ return {
79
+ label: "Denied",
80
+ icon: /* @__PURE__ */ jsx(XIcon, { size: 12, className: "text-warning" }),
81
+ badgeVariant: "destructive"
82
+ };
83
+ default:
84
+ return {
85
+ label: "Pending",
86
+ icon: /* @__PURE__ */ jsx(LoaderCircleIcon, { size: 12, className: "animate-spin text-text-tertiary" }),
87
+ badgeVariant: "secondary"
88
+ };
89
+ }
90
+ }
91
+ var ChatToolCall = memo(function ChatToolCall2({
92
+ state,
93
+ defaultOpen = false,
94
+ open,
95
+ onOpenChange,
96
+ children,
97
+ className,
98
+ ref
99
+ }) {
100
+ return /* @__PURE__ */ jsx(ChatToolCallContext.Provider, { value: state, children: /* @__PURE__ */ jsx(
101
+ Collapsible,
102
+ {
103
+ ref,
104
+ defaultOpen,
105
+ open,
106
+ onOpenChange,
107
+ className: cn(chatToolCallVariants({ state }), className),
108
+ children
109
+ }
110
+ ) });
111
+ });
112
+ var ChatToolCallHeader = memo(function ChatToolCallHeader2({
113
+ name,
114
+ summary,
115
+ children,
116
+ className
117
+ }) {
118
+ const state = useChatToolCallState();
119
+ const { label, icon, badgeVariant } = getStatusMeta(state);
120
+ return /* @__PURE__ */ jsx(
121
+ CollapsibleTrigger,
122
+ {
123
+ className: cn(
124
+ "flex w-full items-center gap-2 px-3 py-2 text-xs transition-colors hover:bg-surface/60 rounded-xl",
125
+ className
126
+ ),
127
+ children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [
128
+ icon,
129
+ /* @__PURE__ */ jsx("code", { className: "font-medium text-text-primary", children: name ?? "Tool" }),
130
+ Boolean(summary) && /* @__PURE__ */ jsx("span", { className: "truncate text-[11px] text-text-tertiary", children: summary }),
131
+ /* @__PURE__ */ jsx(
132
+ Badge,
133
+ {
134
+ variant: badgeVariant,
135
+ "data-testid": "chat-tool-call-badge",
136
+ className: "ml-auto rounded-full px-2 py-0 text-[10px]",
137
+ children: label
138
+ }
139
+ ),
140
+ /* @__PURE__ */ jsx(
141
+ ChevronDownIcon,
142
+ {
143
+ size: 12,
144
+ className: "text-text-tertiary transition-transform [[data-state=open]>&]:rotate-180"
145
+ }
146
+ )
147
+ ] })
148
+ }
149
+ );
150
+ });
151
+ var ChatToolCallContent = memo(function ChatToolCallContent2({
152
+ children,
153
+ className
154
+ }) {
155
+ return /* @__PURE__ */ jsx(
156
+ CollapsibleContent,
157
+ {
158
+ className: cn("border-t border-border/40 px-3 py-2", className),
159
+ children
160
+ }
161
+ );
162
+ });
163
+ function ChatToolCallInput({ children, className }) {
164
+ return /* @__PURE__ */ jsxs("div", { className: cn("text-xs", className), children: [
165
+ /* @__PURE__ */ jsx("p", { className: "mb-1 font-medium text-text-secondary", children: "Input" }),
166
+ /* @__PURE__ */ jsx("pre", { className: "overflow-x-auto rounded-lg bg-surface/60 p-2 text-[11px] text-text-secondary", children })
167
+ ] });
168
+ }
169
+ function ChatToolCallOutput({ children, className }) {
170
+ const state = useChatToolCallState();
171
+ const isError = state === "output-error" || state === "output-denied";
172
+ return /* @__PURE__ */ jsxs("div", { className: cn("text-xs", className), children: [
173
+ /* @__PURE__ */ jsx("p", { className: "mb-1 font-medium text-text-secondary", children: "Output" }),
174
+ /* @__PURE__ */ jsx(
175
+ "pre",
176
+ {
177
+ className: cn(
178
+ "overflow-x-auto rounded-lg p-2 text-[11px]",
179
+ isError ? "bg-destructive/10 text-destructive" : "bg-surface/60 text-text-secondary"
180
+ ),
181
+ children
182
+ }
183
+ )
184
+ ] });
185
+ }
186
+ function ChatToolCallStatus({ className }) {
187
+ const state = useChatToolCallState();
188
+ const { icon } = getStatusMeta(state);
189
+ return /* @__PURE__ */ jsx("span", { "data-testid": "chat-tool-call-status", className, children: icon });
190
+ }
191
+
192
+ export { ChatToolCall, ChatToolCallContent, ChatToolCallHeader, ChatToolCallInput, ChatToolCallOutput, ChatToolCallStatus, chatToolCallVariants };
@@ -1,6 +1,6 @@
1
1
  import { type VariantProps } from 'class-variance-authority';
2
2
  declare const checkStatusVariants: (props?: ({
3
- status?: "passing" | "failing" | "pending" | "neutral" | null | undefined;
3
+ status?: "pending" | "passing" | "failing" | "neutral" | null | undefined;
4
4
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
5
5
  export interface CheckStatusProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof checkStatusVariants> {
6
6
  count?: number;
@@ -1,115 +1,115 @@
1
1
  'use client';
2
2
  export { Checkbox } from '../../chunk-756Q7AC5.js';
3
3
  import '../../chunk-GO35FTNJ.js';
4
- import '../../chunk-PSVQ7ZNX.js';
4
+ import '../../chunk-WUO7OONN.js';
5
5
  import '../../chunk-FLF5AMNO.js';
6
- import '../../chunk-WFJQ43SM.js';
6
+ import '../../chunk-3CLXYQKB.js';
7
7
  import '../../chunk-S4GKGKON.js';
8
8
  import '../../chunk-LCDDAE7J.js';
9
9
  import '../../chunk-R674XI7C.js';
10
- import '../../chunk-WUO7OONN.js';
10
+ import '../../chunk-HNY45VUQ.js';
11
11
  import '../../chunk-BPCCTJSK.js';
12
12
  import '../../chunk-CGUCH322.js';
13
13
  import '../../chunk-ELKIUARM.js';
14
- import '../../chunk-ZU2GYVAP.js';
15
14
  import '../../chunk-KSHJQ2VT.js';
16
- import '../../chunk-3CLXYQKB.js';
17
- import '../../chunk-JHQ5NMLZ.js';
18
- import '../../chunk-CRZ2JE24.js';
15
+ import '../../chunk-GAKU7DFY.js';
16
+ import '../../chunk-T6BRD7TS.js';
19
17
  import '../../chunk-TXGANOAX.js';
20
18
  import '../../chunk-OITJWGFV.js';
21
19
  import '../../chunk-Z74D6D2W.js';
22
- import '../../chunk-HNY45VUQ.js';
20
+ import '../../chunk-7WDT2PRI.js';
23
21
  import '../../chunk-IJJI4RQU.js';
24
22
  import '../../chunk-E7RBK6ML.js';
25
23
  import '../../chunk-UBIGDGOP.js';
26
- import '../../chunk-Q7LVUGFL.js';
27
24
  import '../../chunk-ALMGJVMT.js';
28
25
  import '../../chunk-QPXTBZWN.js';
29
- import '../../chunk-GAKU7DFY.js';
30
- import '../../chunk-T6BRD7TS.js';
26
+ import '../../chunk-4NXZIMYZ.js';
31
27
  import '../../chunk-R5XP45PD.js';
32
28
  import '../../chunk-G5EO5FWC.js';
33
29
  import '../../chunk-NCULQXJE.js';
34
30
  import '../../chunk-VDYPDMYR.js';
35
31
  import '../../chunk-WDGIQDQG.js';
36
- import '../../chunk-WKRIKCJC.js';
37
- import '../../chunk-7WDT2PRI.js';
38
- import '../../chunk-AP5Y5M3R.js';
32
+ import '../../chunk-RYOTIXZO.js';
39
33
  import '../../chunk-JZ4G2SJH.js';
40
34
  import '../../chunk-KYGKJ553.js';
41
35
  import '../../chunk-M7YSMMAC.js';
42
36
  import '../../chunk-XQ2UDMPO.js';
43
37
  import '../../chunk-JMCSAGZ3.js';
44
38
  import '../../chunk-QUKDUSHD.js';
45
- import '../../chunk-4NXZIMYZ.js';
46
- import '../../chunk-TBKJ34BB.js';
39
+ import '../../chunk-O74AEVHW.js';
40
+ import '../../chunk-ZUHIWALK.js';
47
41
  import '../../chunk-2IZC7HSV.js';
48
42
  import '../../chunk-2SDZMTB2.js';
49
- import '../../chunk-R3AO6AZM.js';
50
- import '../../chunk-RYOTIXZO.js';
43
+ import '../../chunk-IQEBXXB5.js';
44
+ import '../../chunk-AZUJNRQU.js';
51
45
  import '../../chunk-W3B3UOEG.js';
52
46
  import '../../chunk-ACRVOD7W.js';
53
47
  import '../../chunk-QSU23VYZ.js';
54
48
  import '../../chunk-BJYCQ2NV.js';
55
49
  import '../../chunk-VM462WZC.js';
56
- import '../../chunk-O74AEVHW.js';
57
- import '../../chunk-ZUHIWALK.js';
58
50
  import '../../chunk-5UZDOF6V.js';
59
51
  import '../../chunk-PKVTEDKO.js';
60
52
  import '../../chunk-I3TH7PIB.js';
61
53
  import '../../chunk-WGPK3FQ7.js';
62
54
  import '../../chunk-JL4MVVFH.js';
63
- import '../../chunk-IQEBXXB5.js';
64
- import '../../chunk-AZUJNRQU.js';
55
+ import '../../chunk-4FEAWXJD.js';
56
+ import '../../chunk-JHQTKMKG.js';
65
57
  import '../../chunk-WA45EC4Y.js';
66
58
  import '../../chunk-2MOEOEOI.js';
67
59
  import '../../chunk-5LCXASRW.js';
68
60
  import '../../chunk-2ZJVU7NV.js';
69
61
  import '../../chunk-5ESF6N36.js';
70
62
  import '../../chunk-RBPLOM3A.js';
71
- import '../../chunk-GCUTJI7M.js';
63
+ import '../../chunk-6BAV4TZ5.js';
64
+ import '../../chunk-SW6QPJM4.js';
72
65
  import '../../chunk-2NT57K4U.js';
73
- import '../../chunk-6G3RRWJT.js';
74
66
  import '../../chunk-JRJGSNI4.js';
75
67
  import '../../chunk-RF6ECFS5.js';
76
- import '../../chunk-TV4RSQH4.js';
77
- import '../../chunk-4FEAWXJD.js';
78
- import '../../chunk-JHQTKMKG.js';
68
+ import '../../chunk-KYZT3RNW.js';
69
+ import '../../chunk-UEG2LI7Z.js';
79
70
  import '../../chunk-CI7GPGCJ.js';
80
71
  import '../../chunk-226EBOTK.js';
81
- import '../../chunk-G5YLGJXR.js';
82
- import '../../chunk-G24VV5NO.js';
83
- import '../../chunk-6BAV4TZ5.js';
84
- import '../../chunk-SW6QPJM4.js';
72
+ import '../../chunk-74RKVIBV.js';
85
73
  import '../../chunk-V6WNRZT3.js';
86
74
  import '../../chunk-JBK2LA6U.js';
87
75
  import '../../chunk-55U27XY4.js';
88
76
  import '../../chunk-LSPO6OBI.js';
89
77
  import '../../chunk-Y56WBNCY.js';
90
- import '../../chunk-KYZT3RNW.js';
91
- import '../../chunk-UEG2LI7Z.js';
92
78
  import '../../chunk-JJTQOH7J.js';
93
79
  import '../../chunk-72X6SXOX.js';
94
80
  import '../../chunk-SR5U52V3.js';
95
- import '../../chunk-74RKVIBV.js';
96
81
  import '../../chunk-AWIJHDNK.js';
97
- import '../../chunk-BRP6D56U.js';
98
- import '../../chunk-S733NAYS.js';
99
82
  import '../../chunk-MAUTIHQG.js';
83
+ import '../../chunk-S733NAYS.js';
100
84
  import '../../chunk-666N6OTL.js';
101
85
  import '../../chunk-FMH55OKV.js';
102
86
  import '../../chunk-WXVNTJIB.js';
103
- import '../../chunk-CXACRCZ4.js';
104
87
  import '../../chunk-T7H53CK2.js';
105
- import '../../chunk-BFLN54VR.js';
88
+ import '../../chunk-TBKJ34BB.js';
89
+ import '../../chunk-BRP6D56U.js';
90
+ import '../../chunk-6G3RRWJT.js';
91
+ import '../../chunk-ZU2GYVAP.js';
92
+ import '../../chunk-CRZ2JE24.js';
93
+ import '../../chunk-PSVQ7ZNX.js';
94
+ import '../../chunk-WKRIKCJC.js';
95
+ import '../../chunk-JHQ5NMLZ.js';
96
+ import '../../chunk-WFJQ43SM.js';
97
+ import '../../chunk-AP5Y5M3R.js';
98
+ import '../../chunk-Q7LVUGFL.js';
99
+ import '../../chunk-G5YLGJXR.js';
100
+ import '../../chunk-G24VV5NO.js';
101
+ import '../../chunk-R3AO6AZM.js';
102
+ import '../../chunk-GCUTJI7M.js';
103
+ import '../../chunk-CXACRCZ4.js';
106
104
  import '../../chunk-P6IRHPFM.js';
107
105
  import '../../chunk-SXHYB7JB.js';
106
+ import '../../chunk-BFLN54VR.js';
108
107
  import '../../chunk-ONGJ7AC2.js';
109
108
  import '../../chunk-UHXGBV5N.js';
110
109
  import '../../chunk-UIUMTURU.js';
111
110
  import '../../chunk-PRUXIDBD.js';
112
111
  import '../../chunk-NURPUVUV.js';
112
+ import '../../chunk-TV4RSQH4.js';
113
113
  import '../../chunk-HJBXUXTD.js';
114
114
  import '../../chunk-ASKFAYYR.js';
115
115
  import '../../chunk-QYZT24TS.js';