@vadimcomanescu/nadicode-design-system 2.0.6 → 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 (339) hide show
  1. package/.agents/skills/seed/SKILL.md +17 -8
  2. package/.agents/skills/seed/contract.md +5 -4
  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/recipes/marketing-shell.md +10 -19
  6. package/.agents/skills/seed/recipes/navigation-shell.md +5 -5
  7. package/.agents/skills/seed/recipes/service-detail.md +1 -1
  8. package/.agents/skills/seed/references/blocks.md +30 -26
  9. package/.agents/skills/seed/references/brand-override.md +3 -1
  10. package/.agents/skills/seed/references/components.md +22 -2
  11. package/.agents/skills/seed/references/dashboard-patterns.md +12 -12
  12. package/.agents/skills/seed/references/nextjs.md +20 -80
  13. package/.agents/skills/seed/references/tokens.md +57 -248
  14. package/README.md +43 -215
  15. package/contracts/block-props-schemas.json +2186 -0
  16. package/contracts/component-props-schemas.json +8322 -0
  17. package/contracts/consumer-contract.json +178 -0
  18. package/contracts/consumer-intent-map.json +707 -0
  19. package/contracts/message-catalog-contract.json +820 -0
  20. package/contracts/page-kit-props-schemas.json +1894 -0
  21. package/contracts/public-surface-registry.json +6162 -0
  22. package/contracts/public-surface-registry.schema.json +227 -0
  23. package/contracts/release-governance-baseline.json +850 -0
  24. package/contracts/spec-manifest.json +46 -0
  25. package/css/tokens.css +300 -122
  26. package/dist/catalog.json +2166 -162
  27. package/dist/chunk-2BADJLMV.js +117 -0
  28. package/dist/chunk-35EX5FP5.js +106 -0
  29. package/dist/chunk-4IGBBIYW.js +47 -0
  30. package/dist/chunk-4WPZ6T7V.js +186 -0
  31. package/dist/chunk-5PZ4VR2D.js +142 -0
  32. package/dist/chunk-5UESKK6S.js +76 -0
  33. package/dist/chunk-7A2RXKGH.js +205 -0
  34. package/dist/{chunk-DF47R6LN.js → chunk-AWIG4QN6.js} +9 -9
  35. package/dist/chunk-AYWL4IYM.js +67 -0
  36. package/dist/chunk-C7WHMSF3.js +114 -0
  37. package/dist/{chunk-SV3KZ6CB.js → chunk-DSMGCFMJ.js} +7 -2
  38. package/dist/{chunk-4K3PATUT.js → chunk-EEL4RAPC.js} +13 -1
  39. package/dist/{chunk-ILIHQ2KZ.js → chunk-EK43W2Y6.js} +16 -10
  40. package/dist/chunk-FV2G6SAF.js +134 -0
  41. package/dist/chunk-FX23F33E.js +57 -0
  42. package/dist/chunk-GJPTPLCQ.js +52 -0
  43. package/dist/chunk-HJ3A2YNO.js +163 -0
  44. package/dist/chunk-HJZRSPWB.js +38 -0
  45. package/dist/chunk-HWHJ6IRQ.js +78 -0
  46. package/dist/chunk-HZERHGBT.js +77 -0
  47. package/dist/{chunk-AUSYEAIJ.js → chunk-I66XWYSS.js} +32 -8
  48. package/dist/chunk-IXQGKJU4.js +183 -0
  49. package/dist/chunk-JDJY4ABS.js +60 -0
  50. package/dist/chunk-K7NQ6ZAW.js +84 -0
  51. package/dist/chunk-KWILREVQ.js +147 -0
  52. package/dist/chunk-LCKLZ4XK.js +60 -0
  53. package/dist/{chunk-WI37ZYIF.js → chunk-M4XKO45H.js} +13 -1
  54. package/dist/chunk-NEHCPO53.js +44 -0
  55. package/dist/chunk-OJ7OO3QB.js +269 -0
  56. package/dist/{chunk-ZHTQF2KI.js → chunk-OSNTB6RY.js} +29 -22
  57. package/dist/{chunk-GMMPLZLC.js → chunk-PDSQC6VE.js} +1 -1
  58. package/dist/chunk-QIHA7S3A.js +36 -0
  59. package/dist/chunk-QQOWC53X.js +98 -0
  60. package/dist/chunk-RKQPU75I.js +126 -0
  61. package/dist/chunk-U4GYSYGN.js +120 -0
  62. package/dist/chunk-UGV45DH3.js +18 -0
  63. package/dist/chunk-VBZQ4DBE.js +52 -0
  64. package/dist/{chunk-LQLFA2EL.js → chunk-VDONTZZX.js} +2 -2
  65. package/dist/chunk-VEO56RH4.js +105 -0
  66. package/dist/chunk-VJ5VD4UT.js +91 -0
  67. package/dist/{chunk-RWNJ54CI.js → chunk-VN475YZS.js} +1 -1
  68. package/dist/chunk-VNNAL4A6.js +110 -0
  69. package/dist/chunk-VZCB4APK.js +94 -0
  70. package/dist/chunk-W7FXDRQJ.js +94 -0
  71. package/dist/{chunk-5I3FWRC5.js → chunk-WOYBVPXK.js} +10 -10
  72. package/dist/chunk-WST5NLLC.js +73 -0
  73. package/dist/chunk-X6VXWEDO.js +125 -0
  74. package/dist/chunk-XTASI4IY.js +60 -0
  75. package/dist/chunk-Z233ZQZE.js +33 -0
  76. package/dist/chunk-ZKLB5N3Q.js +110 -0
  77. package/dist/chunk-ZM2NODUK.js +39 -0
  78. package/dist/components/blocks/AccountLockedBlock.js +7 -57
  79. package/dist/components/blocks/ActivityFeedBlock.js +6 -39
  80. package/dist/components/blocks/AgentConversationBlock.d.ts +6 -1
  81. package/dist/components/blocks/AgentConversationBlock.js +45 -71
  82. package/dist/components/blocks/AgentRunOverviewBlock.js +1 -1
  83. package/dist/components/blocks/AgentWorkbenchBlock.d.ts +5 -1
  84. package/dist/components/blocks/AgentWorkbenchBlock.js +47 -46
  85. package/dist/components/blocks/AudioVisualizerBlock.d.ts +1 -1
  86. package/dist/components/blocks/AudioVisualizerBlock.js +2 -2
  87. package/dist/components/blocks/AuthLayout.js +2 -2
  88. package/dist/components/blocks/AuthSuccessBlock.js +5 -60
  89. package/dist/components/blocks/BannerBlock.js +38 -38
  90. package/dist/components/blocks/BarChartBlock.d.ts +1 -1
  91. package/dist/components/blocks/BarChartBlock.js +2 -2
  92. package/dist/components/blocks/CallToActionBlock.d.ts +1 -1
  93. package/dist/components/blocks/CallToActionBlock.js +7 -53
  94. package/dist/components/blocks/ChangelogBlock.js +45 -142
  95. package/dist/components/blocks/ChartBlock.js +38 -38
  96. package/dist/components/blocks/ChartCollectionBlock.js +3 -3
  97. package/dist/components/blocks/ChatLayout.d.ts +4 -1
  98. package/dist/components/blocks/ChatLayout.js +39 -39
  99. package/dist/components/blocks/CodeBlock.js +7 -60
  100. package/dist/components/blocks/ComparisonBlock.js +9 -94
  101. package/dist/components/blocks/ContactBlock.js +11 -120
  102. package/dist/components/blocks/CreateBlock.js +39 -39
  103. package/dist/components/blocks/DataGridBlock.js +40 -40
  104. package/dist/components/blocks/DirectoryBlock.js +43 -43
  105. package/dist/components/blocks/FAQBlock.js +44 -82
  106. package/dist/components/blocks/FeatureBlock.d.ts +10 -14
  107. package/dist/components/blocks/FeatureBlock.js +54 -196
  108. package/dist/components/blocks/FeatureGridBlock.d.ts +1 -1
  109. package/dist/components/blocks/FeatureGridBlock.js +2 -2
  110. package/dist/components/blocks/FooterBlock.d.ts +2 -2
  111. package/dist/components/blocks/FooterBlock.js +11 -67
  112. package/dist/components/blocks/GalleryBlock.js +38 -38
  113. package/dist/components/blocks/HeaderBlock.d.ts +2 -2
  114. package/dist/components/blocks/HeaderBlock.js +39 -39
  115. package/dist/components/blocks/HeatmapChartBlock.d.ts +1 -1
  116. package/dist/components/blocks/HeatmapChartBlock.js +1 -1
  117. package/dist/components/blocks/HeroBlock.d.ts +6 -3
  118. package/dist/components/blocks/HeroBlock.js +53 -236
  119. package/dist/components/blocks/HeroSectionBlock.d.ts +1 -1
  120. package/dist/components/blocks/HeroSectionBlock.js +59 -63
  121. package/dist/components/blocks/IntegrationsBlock.d.ts +1 -1
  122. package/dist/components/blocks/IntegrationsBlock.js +42 -42
  123. package/dist/components/blocks/InteractiveAreaChartBlock.d.ts +1 -1
  124. package/dist/components/blocks/InteractiveAreaChartBlock.js +40 -40
  125. package/dist/components/blocks/KanbanDemoBlock.js +3 -3
  126. package/dist/components/blocks/LoginBlock.js +2 -2
  127. package/dist/components/blocks/LogoCloud.js +2 -13
  128. package/dist/components/blocks/NavUser.js +42 -42
  129. package/dist/components/blocks/NewsletterBlock.js +11 -84
  130. package/dist/components/blocks/NotFoundBlock.js +41 -41
  131. package/dist/components/blocks/OnboardingBlock.js +38 -38
  132. package/dist/components/blocks/PasswordRecoveryBlock.js +14 -142
  133. package/dist/components/blocks/PricingBlock.d.ts +1 -1
  134. package/dist/components/blocks/PricingBlock.js +13 -112
  135. package/dist/components/blocks/ProcessFlowBlock.js +10 -77
  136. package/dist/components/blocks/ResetPasswordBlock.js +11 -125
  137. package/dist/components/blocks/SettingsLayout.js +42 -42
  138. package/dist/components/blocks/SignUpBlock.d.ts +1 -1
  139. package/dist/components/blocks/SignUpBlock.js +3 -3
  140. package/dist/components/blocks/SocialProofBlock.d.ts +7 -11
  141. package/dist/components/blocks/SocialProofBlock.js +10 -108
  142. package/dist/components/blocks/StatsBlock.d.ts +1 -1
  143. package/dist/components/blocks/StatsBlock.js +40 -40
  144. package/dist/components/blocks/StatsMarketingBlock.d.ts +1 -1
  145. package/dist/components/blocks/StatsMarketingBlock.js +7 -38
  146. package/dist/components/blocks/TeamBlock.d.ts +1 -1
  147. package/dist/components/blocks/TeamBlock.js +4 -52
  148. package/dist/components/blocks/TestimonialsBlock.d.ts +1 -1
  149. package/dist/components/blocks/TestimonialsBlock.js +5 -133
  150. package/dist/components/blocks/TwoFactorChallengeBlock.js +46 -131
  151. package/dist/components/blocks/TwoFactorSetupBlock.js +53 -220
  152. package/dist/components/blocks/UsageDonutBlock.d.ts +1 -1
  153. package/dist/components/blocks/UsageDonutBlock.js +2 -2
  154. package/dist/components/blocks/VoiceAgentCard.d.ts +3 -1
  155. package/dist/components/blocks/VoiceAgentCard.js +7 -76
  156. package/dist/components/blocks/WizardBlock.js +39 -39
  157. package/dist/components/blocks/user/InviteUserModal.js +38 -38
  158. package/dist/components/logos/index.js +2 -2
  159. package/dist/components/page-kits/AccountLockedPageKit.d.ts +10 -0
  160. package/dist/components/page-kits/AccountLockedPageKit.js +48 -0
  161. package/dist/components/page-kits/AgentsChatPageKit.d.ts +46 -0
  162. package/dist/components/page-kits/AgentsChatPageKit.js +290 -0
  163. package/dist/components/page-kits/AnalyticsPageKit.d.ts +49 -0
  164. package/dist/components/page-kits/AnalyticsPageKit.js +277 -0
  165. package/dist/components/page-kits/BlogContentPageKit.d.ts +64 -0
  166. package/dist/components/page-kits/BlogContentPageKit.js +296 -0
  167. package/dist/components/page-kits/CheckoutPageKit.d.ts +36 -0
  168. package/dist/components/page-kits/CheckoutPageKit.js +209 -0
  169. package/dist/components/page-kits/CompanySuitePageKit.d.ts +25 -0
  170. package/dist/components/page-kits/CompanySuitePageKit.js +240 -0
  171. package/dist/components/page-kits/CrudFormPageKit.d.ts +54 -0
  172. package/dist/components/page-kits/CrudFormPageKit.js +138 -0
  173. package/dist/components/page-kits/CrudListDetailPageKit.d.ts +70 -0
  174. package/dist/components/page-kits/CrudListDetailPageKit.js +138 -0
  175. package/dist/components/page-kits/DashboardPageKit.d.ts +39 -0
  176. package/dist/components/page-kits/DashboardPageKit.js +284 -0
  177. package/dist/components/page-kits/ErrorPageKit.d.ts +22 -0
  178. package/dist/components/page-kits/ErrorPageKit.js +55 -0
  179. package/dist/components/page-kits/KanbanBoardPageKit.d.ts +31 -0
  180. package/dist/components/page-kits/KanbanBoardPageKit.js +305 -0
  181. package/dist/components/page-kits/LandingPageKit.d.ts +29 -0
  182. package/dist/components/page-kits/LandingPageKit.js +222 -0
  183. package/dist/components/page-kits/LoginPageKit.d.ts +16 -0
  184. package/dist/components/page-kits/LoginPageKit.js +43 -0
  185. package/dist/components/page-kits/MarketingShellPageKit.d.ts +21 -0
  186. package/dist/components/page-kits/MarketingShellPageKit.js +131 -0
  187. package/dist/components/page-kits/NavigationShellPageKit.d.ts +41 -0
  188. package/dist/components/page-kits/NavigationShellPageKit.js +132 -0
  189. package/dist/components/page-kits/OnboardingPageKit.d.ts +26 -0
  190. package/dist/components/page-kits/OnboardingPageKit.js +248 -0
  191. package/dist/components/page-kits/PricingPageKit.d.ts +41 -0
  192. package/dist/components/page-kits/PricingPageKit.js +279 -0
  193. package/dist/components/page-kits/ProfileSettingsPageKit.d.ts +50 -0
  194. package/dist/components/page-kits/ProfileSettingsPageKit.js +171 -0
  195. package/dist/components/page-kits/RecoveryPageKit.d.ts +17 -0
  196. package/dist/components/page-kits/RecoveryPageKit.js +58 -0
  197. package/dist/components/page-kits/ResetPageKit.d.ts +14 -0
  198. package/dist/components/page-kits/ResetPageKit.js +52 -0
  199. package/dist/components/page-kits/ServiceSuitePageKit.d.ts +25 -0
  200. package/dist/components/page-kits/ServiceSuitePageKit.js +321 -0
  201. package/dist/components/page-kits/SettingsPageKit.d.ts +27 -0
  202. package/dist/components/page-kits/SettingsPageKit.js +11 -0
  203. package/dist/components/page-kits/SignupPageKit.d.ts +15 -0
  204. package/dist/components/page-kits/SignupPageKit.js +41 -0
  205. package/dist/components/page-kits/SuccessPageKit.d.ts +15 -0
  206. package/dist/components/page-kits/SuccessPageKit.js +146 -0
  207. package/dist/components/page-kits/TeamSettingsPageKit.d.ts +50 -0
  208. package/dist/components/page-kits/TeamSettingsPageKit.js +297 -0
  209. package/dist/components/page-kits/TwoFactorPageKit.d.ts +16 -0
  210. package/dist/components/page-kits/TwoFactorPageKit.js +156 -0
  211. package/dist/components/page-kits/VerifyEmailPageKit.d.ts +15 -0
  212. package/dist/components/page-kits/VerifyEmailPageKit.js +146 -0
  213. package/dist/components/page-kits/VoiceAgentsPageKit.d.ts +35 -0
  214. package/dist/components/page-kits/VoiceAgentsPageKit.js +250 -0
  215. package/dist/components/ui/Accordion.js +38 -38
  216. package/dist/components/ui/AgentMessageBubble.d.ts +20 -4
  217. package/dist/components/ui/AgentMessageBubble.js +39 -39
  218. package/dist/components/ui/AgentStatus.d.ts +1 -1
  219. package/dist/components/ui/AgentStatus.js +5 -10
  220. package/dist/components/ui/AgentTerminal.d.ts +4 -1
  221. package/dist/components/ui/AgentTerminal.js +3 -1
  222. package/dist/components/ui/AgentTimeline.d.ts +2 -2
  223. package/dist/components/ui/AgentTimeline.js +15 -6
  224. package/dist/components/ui/AnimatedDialog.js +38 -38
  225. package/dist/components/ui/AnimatedSheet.js +38 -38
  226. package/dist/components/ui/ApprovalCard.js +1 -1
  227. package/dist/components/ui/AudioWaveform.js +2 -76
  228. package/dist/components/ui/AvatarUpload.js +1 -1
  229. package/dist/components/ui/Breadcrumb.js +41 -143
  230. package/dist/components/ui/Calendar.js +38 -38
  231. package/dist/components/ui/Carousel.js +38 -38
  232. package/dist/components/ui/ChartCard.js +5 -38
  233. package/dist/components/ui/ChatActions.d.ts +14 -0
  234. package/dist/components/ui/ChatActions.js +52 -0
  235. package/dist/components/ui/ChatBranch.d.ts +18 -0
  236. package/dist/components/ui/ChatBranch.js +84 -0
  237. package/dist/components/ui/ChatChainOfThought.d.ts +25 -0
  238. package/dist/components/ui/ChatChainOfThought.js +99 -0
  239. package/dist/components/ui/ChatConfirmation.d.ts +37 -0
  240. package/dist/components/ui/ChatConfirmation.js +115 -0
  241. package/dist/components/ui/ChatGreeting.d.ts +18 -0
  242. package/dist/components/ui/ChatGreeting.js +80 -0
  243. package/dist/components/ui/ChatMessage.d.ts +40 -0
  244. package/dist/components/ui/ChatMessage.js +96 -0
  245. package/dist/components/ui/ChatPlan.d.ts +29 -0
  246. package/dist/components/ui/ChatPlan.js +86 -0
  247. package/dist/components/ui/ChatPromptInput.d.ts +32 -0
  248. package/dist/components/ui/ChatPromptInput.js +193 -0
  249. package/dist/components/ui/ChatPromptInputAttachments.d.ts +9 -0
  250. package/dist/components/ui/ChatPromptInputAttachments.js +145 -0
  251. package/dist/components/ui/ChatQueue.d.ts +32 -0
  252. package/dist/components/ui/ChatQueue.js +93 -0
  253. package/dist/components/ui/ChatReasoning.d.ts +20 -0
  254. package/dist/components/ui/ChatReasoning.js +91 -0
  255. package/dist/components/ui/ChatResponse.d.ts +14 -0
  256. package/dist/components/ui/ChatResponse.js +25 -0
  257. package/dist/components/ui/ChatShimmer.d.ts +23 -0
  258. package/dist/components/ui/ChatShimmer.js +6 -0
  259. package/dist/components/ui/ChatSources.d.ts +30 -0
  260. package/dist/components/ui/ChatSources.js +113 -0
  261. package/dist/components/ui/ChatSuggestion.d.ts +13 -0
  262. package/dist/components/ui/ChatSuggestion.js +41 -0
  263. package/dist/components/ui/ChatThinkingMessage.d.ts +12 -0
  264. package/dist/components/ui/ChatThinkingMessage.js +55 -0
  265. package/dist/components/ui/ChatToolCall.d.ts +41 -0
  266. package/dist/components/ui/ChatToolCall.js +192 -0
  267. package/dist/components/ui/CheckStatus.d.ts +1 -1
  268. package/dist/components/ui/Checkbox.js +38 -38
  269. package/dist/components/ui/CheckoutForm.js +38 -38
  270. package/dist/components/ui/CheckoutFormDemo.js +43 -44
  271. package/dist/components/ui/Combobox.js +38 -38
  272. package/dist/components/ui/Command.js +38 -38
  273. package/dist/components/ui/ContextMenu.js +38 -38
  274. package/dist/components/ui/Conversation.d.ts +21 -0
  275. package/dist/components/ui/Conversation.js +196 -0
  276. package/dist/components/ui/ConversationThread.d.ts +8 -2
  277. package/dist/components/ui/ConversationThread.js +34 -16
  278. package/dist/components/ui/DataFreshness.js +2 -73
  279. package/dist/components/ui/DataTable.js +40 -40
  280. package/dist/components/ui/DatePicker.js +38 -38
  281. package/dist/components/ui/DateRangePicker.js +38 -38
  282. package/dist/components/ui/Dialog.js +38 -38
  283. package/dist/components/ui/DropdownMenu.js +39 -39
  284. package/dist/components/ui/FileUpload.js +38 -38
  285. package/dist/components/ui/InputOTP.js +38 -38
  286. package/dist/components/ui/KanbanBoard.js +2 -2
  287. package/dist/components/ui/LanguageSwitcher.js +38 -38
  288. package/dist/components/ui/Menubar.js +38 -38
  289. package/dist/components/ui/MouseEffect.js +1 -1
  290. package/dist/components/ui/NativeSelect.js +2 -18
  291. package/dist/components/ui/NavigationMenu.js +38 -38
  292. package/dist/components/ui/NotificationCenter.js +38 -38
  293. package/dist/components/ui/Pagination.js +42 -153
  294. package/dist/components/ui/RadioGroup.js +38 -38
  295. package/dist/components/ui/Resizable.js +38 -38
  296. package/dist/components/ui/SearchCommand.js +38 -38
  297. package/dist/components/ui/Select.js +38 -38
  298. package/dist/components/ui/SettingsModal.js +38 -38
  299. package/dist/components/ui/ShaderBackground.js +2 -2
  300. package/dist/components/ui/Sheet.js +38 -38
  301. package/dist/components/ui/Sidebar.js +41 -41
  302. package/dist/components/ui/StyleToggle.js +1 -1
  303. package/dist/components/ui/TagInput.js +38 -38
  304. package/dist/components/ui/ThemeToggle.js +39 -39
  305. package/dist/components/ui/ThinkingIndicator.d.ts +3 -1
  306. package/dist/components/ui/ThinkingIndicator.js +2 -1
  307. package/dist/components/ui/Toast.js +38 -38
  308. package/dist/components/ui/Toaster.js +38 -38
  309. package/dist/components/ui/ToolCallCard.d.ts +1 -1
  310. package/dist/components/ui/ToolCallCard.js +5 -1
  311. package/dist/components/ui/TreeView.js +38 -38
  312. package/dist/components/ui/charts/index.js +1 -1
  313. package/dist/components/ui/icons/index.js +38 -38
  314. package/dist/components/ui/text-effects/index.js +2 -2
  315. package/dist/hooks/use-scroll-to-bottom.d.ts +13 -0
  316. package/dist/hooks/use-scroll-to-bottom.js +2 -0
  317. package/dist/hooks/use-shader-preset.js +2 -2
  318. package/dist/index.js +43 -43
  319. package/dist/internal/local-image-assets.d.ts +12 -0
  320. package/dist/lib/shader-presets.js +1 -1
  321. package/dist/lib/tokens.config.d.ts +19 -0
  322. package/dist/messages/en.js +1 -1
  323. package/dist/messages/it.js +1 -1
  324. package/dist/test/PublicSeedTestProvider.js +2 -2
  325. package/dist/test/simulate-ime-composition.d.ts +54 -0
  326. package/dist/test/simulate-ime-composition.js +55 -0
  327. package/eslint-rules/nadicode/config.js +2 -0
  328. package/eslint-rules/nadicode/index.js +4 -0
  329. package/eslint-rules/nadicode/rules/no-deprecated-ds-import.js +77 -0
  330. package/eslint-rules/nadicode/rules/no-forbidden-page-kit-import.js +99 -0
  331. package/eslint-rules/nadicode/rules/no-unregistered-glass.js +2 -0
  332. package/package.json +895 -686
  333. package/scripts/ds-check.mjs +102 -73
  334. package/src/lib/tokens.config.js +63 -41
  335. package/dist/chunk-MLUSJTS2.js +0 -107
  336. package/dist/{chunk-5DKCZWC6.js → chunk-CQEUNASC.js} +1 -1
  337. package/dist/{chunk-4HRVRW2X.js → chunk-J2DCQDXO.js} +2 -2
  338. package/dist/{chunk-6MFAZU4B.js → chunk-RGE5OQMZ.js} +1 -1
  339. package/dist/{chunk-PJNHVPHF.js → chunk-TYP2MR3Q.js} +1 -1
@@ -0,0 +1,290 @@
1
+ import { NavigationShellPageKit } from '../../chunk-ZKLB5N3Q.js';
2
+ import { AgentConversationBlock } from '../../chunk-4IGBBIYW.js';
3
+ import { ToolCallCard } from '../../chunk-4WPZ6T7V.js';
4
+ import '../../chunk-MDAYDDTC.js';
5
+ import { Typography } from '../../chunk-N53OMWW2.js';
6
+ import { Textarea } from '../../chunk-4OBE2FS2.js';
7
+ import '../../chunk-OSNTB6RY.js';
8
+ import '../../chunk-J2DCQDXO.js';
9
+ import '../../chunk-C4SNHMYC.js';
10
+ import '../../chunk-B5QL76GA.js';
11
+ import '../../chunk-HOWTYZL5.js';
12
+ import '../../chunk-GLU236NN.js';
13
+ import { Heading } from '../../chunk-WI547C47.js';
14
+ import '../../chunk-CUZJIDU7.js';
15
+ import '../../chunk-AP3XXYAY.js';
16
+ import '../../chunk-LIBXYD5Q.js';
17
+ import '../../chunk-RASEB2XI.js';
18
+ import '../../chunk-MJ4CB6ZL.js';
19
+ import '../../chunk-35EX5FP5.js';
20
+ import { Card, CardHeader, CardTitle, CardContent } from '../../chunk-AH6YSYYT.js';
21
+ import '../../chunk-NAAU5IWU.js';
22
+ import { Button } from '../../chunk-7KIDDF3I.js';
23
+ import '../../chunk-6FOHUNXR.js';
24
+ import '../../chunk-PD2YEH3H.js';
25
+ import '../../chunk-CRY67BIF.js';
26
+ import '../../chunk-HJC6U46F.js';
27
+ import '../../chunk-I66XWYSS.js';
28
+ import '../../chunk-GO35FTNJ.js';
29
+ import '../../chunk-WUO7OONN.js';
30
+ import '../../chunk-FLF5AMNO.js';
31
+ import '../../chunk-3CLXYQKB.js';
32
+ import '../../chunk-S4GKGKON.js';
33
+ import '../../chunk-LCDDAE7J.js';
34
+ import '../../chunk-R674XI7C.js';
35
+ import '../../chunk-HNY45VUQ.js';
36
+ import '../../chunk-BPCCTJSK.js';
37
+ import '../../chunk-CGUCH322.js';
38
+ import '../../chunk-ELKIUARM.js';
39
+ import '../../chunk-KSHJQ2VT.js';
40
+ import '../../chunk-GAKU7DFY.js';
41
+ import '../../chunk-T6BRD7TS.js';
42
+ import '../../chunk-TXGANOAX.js';
43
+ import '../../chunk-OITJWGFV.js';
44
+ import '../../chunk-Z74D6D2W.js';
45
+ import '../../chunk-7WDT2PRI.js';
46
+ import '../../chunk-IJJI4RQU.js';
47
+ import '../../chunk-E7RBK6ML.js';
48
+ import '../../chunk-UBIGDGOP.js';
49
+ import '../../chunk-ALMGJVMT.js';
50
+ import '../../chunk-QPXTBZWN.js';
51
+ import '../../chunk-4NXZIMYZ.js';
52
+ import '../../chunk-R5XP45PD.js';
53
+ import '../../chunk-G5EO5FWC.js';
54
+ import '../../chunk-NCULQXJE.js';
55
+ import '../../chunk-VDYPDMYR.js';
56
+ import '../../chunk-WDGIQDQG.js';
57
+ import '../../chunk-RYOTIXZO.js';
58
+ import '../../chunk-JZ4G2SJH.js';
59
+ import '../../chunk-KYGKJ553.js';
60
+ import '../../chunk-M7YSMMAC.js';
61
+ import '../../chunk-XQ2UDMPO.js';
62
+ import '../../chunk-JMCSAGZ3.js';
63
+ import '../../chunk-QUKDUSHD.js';
64
+ import '../../chunk-O74AEVHW.js';
65
+ import '../../chunk-ZUHIWALK.js';
66
+ import '../../chunk-2IZC7HSV.js';
67
+ import '../../chunk-2SDZMTB2.js';
68
+ import '../../chunk-IQEBXXB5.js';
69
+ import '../../chunk-AZUJNRQU.js';
70
+ import '../../chunk-W3B3UOEG.js';
71
+ import '../../chunk-ACRVOD7W.js';
72
+ import '../../chunk-QSU23VYZ.js';
73
+ import '../../chunk-BJYCQ2NV.js';
74
+ import '../../chunk-VM462WZC.js';
75
+ import '../../chunk-5UZDOF6V.js';
76
+ import '../../chunk-PKVTEDKO.js';
77
+ import '../../chunk-I3TH7PIB.js';
78
+ import '../../chunk-WGPK3FQ7.js';
79
+ import '../../chunk-JL4MVVFH.js';
80
+ import '../../chunk-4FEAWXJD.js';
81
+ import '../../chunk-JHQTKMKG.js';
82
+ import '../../chunk-WA45EC4Y.js';
83
+ import '../../chunk-2MOEOEOI.js';
84
+ import '../../chunk-5LCXASRW.js';
85
+ import '../../chunk-2ZJVU7NV.js';
86
+ import '../../chunk-5ESF6N36.js';
87
+ import '../../chunk-RBPLOM3A.js';
88
+ import '../../chunk-6BAV4TZ5.js';
89
+ import '../../chunk-SW6QPJM4.js';
90
+ import '../../chunk-2NT57K4U.js';
91
+ import '../../chunk-JRJGSNI4.js';
92
+ import '../../chunk-RF6ECFS5.js';
93
+ import '../../chunk-KYZT3RNW.js';
94
+ import '../../chunk-UEG2LI7Z.js';
95
+ import '../../chunk-CI7GPGCJ.js';
96
+ import '../../chunk-226EBOTK.js';
97
+ import '../../chunk-74RKVIBV.js';
98
+ import '../../chunk-V6WNRZT3.js';
99
+ import '../../chunk-JBK2LA6U.js';
100
+ import '../../chunk-55U27XY4.js';
101
+ import '../../chunk-LSPO6OBI.js';
102
+ import '../../chunk-Y56WBNCY.js';
103
+ import '../../chunk-JJTQOH7J.js';
104
+ import '../../chunk-72X6SXOX.js';
105
+ import '../../chunk-SR5U52V3.js';
106
+ import '../../chunk-AWIJHDNK.js';
107
+ import '../../chunk-MAUTIHQG.js';
108
+ import '../../chunk-S733NAYS.js';
109
+ import '../../chunk-666N6OTL.js';
110
+ import '../../chunk-FMH55OKV.js';
111
+ import '../../chunk-WXVNTJIB.js';
112
+ import '../../chunk-T7H53CK2.js';
113
+ import '../../chunk-TBKJ34BB.js';
114
+ import '../../chunk-BRP6D56U.js';
115
+ import '../../chunk-6G3RRWJT.js';
116
+ import '../../chunk-ZU2GYVAP.js';
117
+ import '../../chunk-CRZ2JE24.js';
118
+ import '../../chunk-PSVQ7ZNX.js';
119
+ import '../../chunk-WKRIKCJC.js';
120
+ import '../../chunk-JHQ5NMLZ.js';
121
+ import '../../chunk-WFJQ43SM.js';
122
+ import '../../chunk-AP5Y5M3R.js';
123
+ import '../../chunk-Q7LVUGFL.js';
124
+ import '../../chunk-G5YLGJXR.js';
125
+ import '../../chunk-G24VV5NO.js';
126
+ import '../../chunk-R3AO6AZM.js';
127
+ import '../../chunk-GCUTJI7M.js';
128
+ import '../../chunk-CXACRCZ4.js';
129
+ import '../../chunk-P6IRHPFM.js';
130
+ import '../../chunk-SXHYB7JB.js';
131
+ import '../../chunk-BFLN54VR.js';
132
+ import '../../chunk-ONGJ7AC2.js';
133
+ import '../../chunk-UHXGBV5N.js';
134
+ import '../../chunk-UIUMTURU.js';
135
+ import '../../chunk-PRUXIDBD.js';
136
+ import '../../chunk-NURPUVUV.js';
137
+ import { Badge } from '../../chunk-S4JAHKOP.js';
138
+ import '../../chunk-TV4RSQH4.js';
139
+ import '../../chunk-HJBXUXTD.js';
140
+ import '../../chunk-ASKFAYYR.js';
141
+ import { cn } from '../../chunk-QYZT24TS.js';
142
+ import React from 'react';
143
+ import { jsx, jsxs } from 'react/jsx-runtime';
144
+
145
+ var EMPTY_MESSAGES = [];
146
+ var EMPTY_TOOL_CALLS = [];
147
+ var EMPTY_ARTIFACTS = [];
148
+ var EMPTY_TRACE_EVENTS = [];
149
+ function stateLabel(state) {
150
+ switch (state) {
151
+ case "empty":
152
+ return "Empty";
153
+ case "loading":
154
+ return "Loading";
155
+ case "thinking":
156
+ return "Thinking";
157
+ case "blocked-approval":
158
+ return "Blocked on approval";
159
+ case "failed":
160
+ return "Failed";
161
+ case "running":
162
+ return "Running";
163
+ case "complete":
164
+ return "Complete";
165
+ default:
166
+ return "Running";
167
+ }
168
+ }
169
+ function placeholderContent(state) {
170
+ switch (state) {
171
+ case "empty":
172
+ return "No messages yet. Start the run from the composer.";
173
+ case "loading":
174
+ return "Loading run context...";
175
+ case "thinking":
176
+ return "Agent is thinking through the next step.";
177
+ default:
178
+ return "Waiting for conversation updates.";
179
+ }
180
+ }
181
+ function AgentsChatPageKit({
182
+ shell,
183
+ state = "running",
184
+ messages = EMPTY_MESSAGES,
185
+ toolCalls = EMPTY_TOOL_CALLS,
186
+ artifacts = EMPTY_ARTIFACTS,
187
+ traceEvents = EMPTY_TRACE_EVENTS,
188
+ approval,
189
+ composer,
190
+ errorMessage,
191
+ className
192
+ }) {
193
+ const [draft, setDraft] = React.useState(composer?.value ?? "");
194
+ const composerValue = composer?.value ?? draft;
195
+ const composerPlaceholder = composer?.placeholder ?? "Type a message to the active run...";
196
+ const composerDisabled = composer?.disabled ?? false;
197
+ function handleComposerChange(value) {
198
+ if (composer?.value == null) {
199
+ setDraft(value);
200
+ }
201
+ composer?.onChange?.(value);
202
+ }
203
+ function handleComposerSend() {
204
+ const payload = composerValue.trim();
205
+ if (!payload || composerDisabled) {
206
+ return;
207
+ }
208
+ composer?.onSend?.(payload);
209
+ if (composer?.value == null) {
210
+ setDraft("");
211
+ }
212
+ }
213
+ const conversationMessages = messages.length > 0 ? messages : [{
214
+ id: "state-placeholder",
215
+ role: "system",
216
+ content: placeholderContent(state)
217
+ }];
218
+ return /* @__PURE__ */ jsx(NavigationShellPageKit, { ...shell, children: /* @__PURE__ */ jsxs("section", { className: cn("space-y-6", className), children: [
219
+ /* @__PURE__ */ jsxs("header", { className: "space-y-2", children: [
220
+ /* @__PURE__ */ jsx(Heading, { level: 3, children: "Agents chat" }),
221
+ /* @__PURE__ */ jsx(Typography, { variant: "muted", children: "Conversation-driven agent workflow surface with explicit tooling and traceability layers." }),
222
+ /* @__PURE__ */ jsx("div", { className: "flex flex-wrap items-center gap-2", children: /* @__PURE__ */ jsx(Badge, { variant: state === "failed" ? "destructive" : "outline", children: stateLabel(state) }) })
223
+ ] }),
224
+ 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,
225
+ state === "blocked-approval" && approval ? /* @__PURE__ */ jsxs(Card, { children: [
226
+ /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: "Approval required" }) }),
227
+ /* @__PURE__ */ jsxs(CardContent, { className: "space-y-3", children: [
228
+ /* @__PURE__ */ jsx(Typography, { variant: "small", children: approval.pendingReason }),
229
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-2", children: [
230
+ /* @__PURE__ */ jsx(Button, { type: "button", onClick: approval.onApprove, children: "Approve run" }),
231
+ /* @__PURE__ */ jsx(Button, { type: "button", variant: "outline", onClick: approval.onReject, children: "Reject run" })
232
+ ] })
233
+ ] })
234
+ ] }) : null,
235
+ /* @__PURE__ */ jsxs("div", { className: "grid gap-4 xl:grid-cols-[minmax(0,1.4fr)_minmax(0,1fr)]", children: [
236
+ /* @__PURE__ */ jsxs(Card, { children: [
237
+ /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: "Conversation" }) }),
238
+ /* @__PURE__ */ jsxs(CardContent, { className: "space-y-4", children: [
239
+ /* @__PURE__ */ jsx(AgentConversationBlock, { messages: conversationMessages }),
240
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
241
+ /* @__PURE__ */ jsx("label", { htmlFor: "agents-chat-composer", className: "text-sm font-medium text-text-primary", children: "Message composer" }),
242
+ /* @__PURE__ */ jsx(
243
+ Textarea,
244
+ {
245
+ id: "agents-chat-composer",
246
+ value: composerValue,
247
+ disabled: composerDisabled,
248
+ placeholder: composerPlaceholder,
249
+ onChange: (event) => handleComposerChange(event.target.value)
250
+ }
251
+ ),
252
+ /* @__PURE__ */ jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx(Button, { type: "button", onClick: handleComposerSend, disabled: composerDisabled || composerValue.trim().length === 0, children: "Send message" }) })
253
+ ] })
254
+ ] })
255
+ ] }),
256
+ /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
257
+ /* @__PURE__ */ jsxs(Card, { children: [
258
+ /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: "Tooling" }) }),
259
+ /* @__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(
260
+ ToolCallCard,
261
+ {
262
+ toolName: toolCall.toolName,
263
+ status: toolCall.status,
264
+ result: toolCall.result,
265
+ duration: toolCall.durationMs
266
+ },
267
+ toolCall.id
268
+ )) })
269
+ ] }),
270
+ /* @__PURE__ */ jsxs(Card, { children: [
271
+ /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: "Traceability" }) }),
272
+ /* @__PURE__ */ jsxs(CardContent, { className: "space-y-3", children: [
273
+ artifacts.length === 0 && traceEvents.length === 0 ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-text-secondary", children: "No artifacts or trace events recorded yet." }) : null,
274
+ artifacts.map((artifact) => /* @__PURE__ */ jsxs("div", { className: "rounded-md border border-border/70 p-3", children: [
275
+ /* @__PURE__ */ jsx(Typography, { variant: "small", className: "font-medium text-text-primary", children: artifact.title }),
276
+ /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-text-tertiary uppercase tracking-wide", children: artifact.kind }),
277
+ /* @__PURE__ */ jsx(Typography, { variant: "small", className: "mt-1 text-text-secondary", children: artifact.summary })
278
+ ] }, artifact.id)),
279
+ traceEvents.map((event) => /* @__PURE__ */ jsxs("div", { className: "rounded-md border border-border/70 p-3", children: [
280
+ /* @__PURE__ */ jsx(Typography, { variant: "small", className: "font-medium text-text-primary", children: event.label }),
281
+ /* @__PURE__ */ jsx(Typography, { variant: "small", className: "mt-1 text-text-secondary", children: event.detail })
282
+ ] }, event.id))
283
+ ] })
284
+ ] })
285
+ ] })
286
+ ] })
287
+ ] }) });
288
+ }
289
+
290
+ export { AgentsChatPageKit };
@@ -0,0 +1,49 @@
1
+ import React from "react";
2
+ import { type NavigationShellPageKitProps } from "./NavigationShellPageKit";
3
+ export type AnalyticsPageKitRegionState = "loading" | "empty" | "error" | "filtered" | "has-data" | "partial-data";
4
+ export interface AnalyticsPageKitFilterOption {
5
+ value: string;
6
+ label: string;
7
+ }
8
+ export interface AnalyticsPageKitFilter {
9
+ id: string;
10
+ label: string;
11
+ value: string;
12
+ options: AnalyticsPageKitFilterOption[];
13
+ onChange?: (value: string) => void;
14
+ }
15
+ export interface AnalyticsPageKitChartRegion {
16
+ id: string;
17
+ title: string;
18
+ description?: string;
19
+ data: unknown[];
20
+ chart: React.ReactNode;
21
+ state?: AnalyticsPageKitRegionState;
22
+ emptyTitle?: string;
23
+ emptyDescription?: string;
24
+ errorMessage?: string;
25
+ className?: string;
26
+ }
27
+ export interface AnalyticsPageKitGridRegion {
28
+ id: string;
29
+ title: string;
30
+ description?: string;
31
+ columns: string[];
32
+ rows: Array<Record<string, React.ReactNode>>;
33
+ state?: AnalyticsPageKitRegionState;
34
+ emptyTitle?: string;
35
+ emptyDescription?: string;
36
+ errorMessage?: string;
37
+ }
38
+ export interface AnalyticsPageKitProps {
39
+ shell: Omit<NavigationShellPageKitProps, "children">;
40
+ title?: string;
41
+ description?: string;
42
+ filters: AnalyticsPageKitFilter[];
43
+ chartRegions: AnalyticsPageKitChartRegion[];
44
+ gridRegions: AnalyticsPageKitGridRegion[];
45
+ comparisonLabel?: string;
46
+ onResetFilters?: () => void;
47
+ className?: string;
48
+ }
49
+ export declare function AnalyticsPageKit({ shell, title, description, filters, chartRegions, gridRegions, comparisonLabel, onResetFilters, className, }: AnalyticsPageKitProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,277 @@
1
+ import { NavigationShellPageKit } from '../../chunk-ZKLB5N3Q.js';
2
+ import { Typography } from '../../chunk-N53OMWW2.js';
3
+ import '../../chunk-J2DCQDXO.js';
4
+ import '../../chunk-C4SNHMYC.js';
5
+ import '../../chunk-B5QL76GA.js';
6
+ import '../../chunk-HOWTYZL5.js';
7
+ import { NativeSelect } from '../../chunk-UGV45DH3.js';
8
+ import { Heading } from '../../chunk-WI547C47.js';
9
+ import { Table, TableHeader, TableRow, TableHead, TableBody, TableCell } from '../../chunk-PXDHNGTG.js';
10
+ import '../../chunk-CUZJIDU7.js';
11
+ import '../../chunk-AP3XXYAY.js';
12
+ import '../../chunk-LIBXYD5Q.js';
13
+ import { ChartCard } from '../../chunk-HJZRSPWB.js';
14
+ import '../../chunk-RASEB2XI.js';
15
+ import { Empty, EmptyTitle, EmptyDescription } from '../../chunk-55HD4L6G.js';
16
+ import '../../chunk-MJ4CB6ZL.js';
17
+ import '../../chunk-35EX5FP5.js';
18
+ import { Card, CardHeader, CardTitle, CardContent, CardDescription } from '../../chunk-AH6YSYYT.js';
19
+ import '../../chunk-NAAU5IWU.js';
20
+ import { Button } from '../../chunk-7KIDDF3I.js';
21
+ import '../../chunk-6FOHUNXR.js';
22
+ import '../../chunk-PD2YEH3H.js';
23
+ import '../../chunk-CRY67BIF.js';
24
+ import '../../chunk-HJC6U46F.js';
25
+ import '../../chunk-GO35FTNJ.js';
26
+ import '../../chunk-WUO7OONN.js';
27
+ import '../../chunk-FLF5AMNO.js';
28
+ import '../../chunk-3CLXYQKB.js';
29
+ import '../../chunk-S4GKGKON.js';
30
+ import '../../chunk-LCDDAE7J.js';
31
+ import '../../chunk-R674XI7C.js';
32
+ import '../../chunk-HNY45VUQ.js';
33
+ import '../../chunk-BPCCTJSK.js';
34
+ import '../../chunk-CGUCH322.js';
35
+ import '../../chunk-ELKIUARM.js';
36
+ import '../../chunk-KSHJQ2VT.js';
37
+ import '../../chunk-GAKU7DFY.js';
38
+ import '../../chunk-T6BRD7TS.js';
39
+ import '../../chunk-TXGANOAX.js';
40
+ import '../../chunk-OITJWGFV.js';
41
+ import '../../chunk-Z74D6D2W.js';
42
+ import '../../chunk-7WDT2PRI.js';
43
+ import '../../chunk-IJJI4RQU.js';
44
+ import '../../chunk-E7RBK6ML.js';
45
+ import '../../chunk-UBIGDGOP.js';
46
+ import '../../chunk-ALMGJVMT.js';
47
+ import '../../chunk-QPXTBZWN.js';
48
+ import '../../chunk-4NXZIMYZ.js';
49
+ import '../../chunk-R5XP45PD.js';
50
+ import '../../chunk-G5EO5FWC.js';
51
+ import '../../chunk-NCULQXJE.js';
52
+ import '../../chunk-VDYPDMYR.js';
53
+ import '../../chunk-WDGIQDQG.js';
54
+ import '../../chunk-RYOTIXZO.js';
55
+ import '../../chunk-JZ4G2SJH.js';
56
+ import '../../chunk-KYGKJ553.js';
57
+ import '../../chunk-M7YSMMAC.js';
58
+ import '../../chunk-XQ2UDMPO.js';
59
+ import '../../chunk-JMCSAGZ3.js';
60
+ import '../../chunk-QUKDUSHD.js';
61
+ import '../../chunk-O74AEVHW.js';
62
+ import '../../chunk-ZUHIWALK.js';
63
+ import '../../chunk-2IZC7HSV.js';
64
+ import '../../chunk-2SDZMTB2.js';
65
+ import '../../chunk-IQEBXXB5.js';
66
+ import '../../chunk-AZUJNRQU.js';
67
+ import '../../chunk-W3B3UOEG.js';
68
+ import '../../chunk-ACRVOD7W.js';
69
+ import '../../chunk-QSU23VYZ.js';
70
+ import '../../chunk-BJYCQ2NV.js';
71
+ import '../../chunk-VM462WZC.js';
72
+ import '../../chunk-5UZDOF6V.js';
73
+ import '../../chunk-PKVTEDKO.js';
74
+ import '../../chunk-I3TH7PIB.js';
75
+ import '../../chunk-WGPK3FQ7.js';
76
+ import '../../chunk-JL4MVVFH.js';
77
+ import '../../chunk-4FEAWXJD.js';
78
+ import '../../chunk-JHQTKMKG.js';
79
+ import '../../chunk-WA45EC4Y.js';
80
+ import '../../chunk-2MOEOEOI.js';
81
+ import '../../chunk-5LCXASRW.js';
82
+ import '../../chunk-2ZJVU7NV.js';
83
+ import '../../chunk-5ESF6N36.js';
84
+ import '../../chunk-RBPLOM3A.js';
85
+ import '../../chunk-6BAV4TZ5.js';
86
+ import '../../chunk-SW6QPJM4.js';
87
+ import '../../chunk-2NT57K4U.js';
88
+ import '../../chunk-JRJGSNI4.js';
89
+ import '../../chunk-RF6ECFS5.js';
90
+ import '../../chunk-KYZT3RNW.js';
91
+ import '../../chunk-UEG2LI7Z.js';
92
+ import '../../chunk-CI7GPGCJ.js';
93
+ import '../../chunk-226EBOTK.js';
94
+ import '../../chunk-74RKVIBV.js';
95
+ import '../../chunk-V6WNRZT3.js';
96
+ import '../../chunk-JBK2LA6U.js';
97
+ import '../../chunk-55U27XY4.js';
98
+ import '../../chunk-LSPO6OBI.js';
99
+ import '../../chunk-Y56WBNCY.js';
100
+ import '../../chunk-JJTQOH7J.js';
101
+ import '../../chunk-72X6SXOX.js';
102
+ import '../../chunk-SR5U52V3.js';
103
+ import '../../chunk-AWIJHDNK.js';
104
+ import '../../chunk-MAUTIHQG.js';
105
+ import '../../chunk-S733NAYS.js';
106
+ import '../../chunk-666N6OTL.js';
107
+ import '../../chunk-FMH55OKV.js';
108
+ import '../../chunk-WXVNTJIB.js';
109
+ import '../../chunk-T7H53CK2.js';
110
+ import '../../chunk-TBKJ34BB.js';
111
+ import '../../chunk-BRP6D56U.js';
112
+ import '../../chunk-6G3RRWJT.js';
113
+ import '../../chunk-ZU2GYVAP.js';
114
+ import '../../chunk-CRZ2JE24.js';
115
+ import '../../chunk-PSVQ7ZNX.js';
116
+ import '../../chunk-WKRIKCJC.js';
117
+ import '../../chunk-JHQ5NMLZ.js';
118
+ import '../../chunk-WFJQ43SM.js';
119
+ import '../../chunk-AP5Y5M3R.js';
120
+ import '../../chunk-Q7LVUGFL.js';
121
+ import '../../chunk-G5YLGJXR.js';
122
+ import '../../chunk-G24VV5NO.js';
123
+ import '../../chunk-R3AO6AZM.js';
124
+ import '../../chunk-GCUTJI7M.js';
125
+ import '../../chunk-CXACRCZ4.js';
126
+ import '../../chunk-P6IRHPFM.js';
127
+ import '../../chunk-SXHYB7JB.js';
128
+ import '../../chunk-BFLN54VR.js';
129
+ import '../../chunk-ONGJ7AC2.js';
130
+ import '../../chunk-UHXGBV5N.js';
131
+ import '../../chunk-UIUMTURU.js';
132
+ import '../../chunk-PRUXIDBD.js';
133
+ import '../../chunk-NURPUVUV.js';
134
+ import { Badge } from '../../chunk-S4JAHKOP.js';
135
+ import '../../chunk-TV4RSQH4.js';
136
+ import '../../chunk-HJBXUXTD.js';
137
+ import '../../chunk-ASKFAYYR.js';
138
+ import { cn } from '../../chunk-QYZT24TS.js';
139
+ import { jsx, jsxs } from 'react/jsx-runtime';
140
+
141
+ function deriveState(state, data) {
142
+ if (state) {
143
+ return state;
144
+ }
145
+ if (!data || data.length === 0) {
146
+ return "empty";
147
+ }
148
+ return "has-data";
149
+ }
150
+ function renderGridRegion(region) {
151
+ const state = deriveState(region.state, region.rows);
152
+ const isFilteredState = state === "filtered";
153
+ const isPartialDataState = state === "partial-data";
154
+ if (state === "loading") {
155
+ return /* @__PURE__ */ jsxs(Card, { children: [
156
+ /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: region.title }) }),
157
+ /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-text-secondary", children: "Loading analytics table" }) })
158
+ ] }, region.id);
159
+ }
160
+ if (state === "error") {
161
+ return /* @__PURE__ */ jsxs(Card, { children: [
162
+ /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: region.title }) }),
163
+ /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(
164
+ "div",
165
+ {
166
+ role: "alert",
167
+ className: "rounded-md border border-destructive/40 bg-destructive/10 px-4 py-3 text-sm text-destructive",
168
+ children: region.errorMessage ?? "Analytics table is unavailable."
169
+ }
170
+ ) })
171
+ ] }, region.id);
172
+ }
173
+ if (state === "empty" || isFilteredState) {
174
+ return /* @__PURE__ */ jsxs(Card, { children: [
175
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
176
+ /* @__PURE__ */ jsx(CardTitle, { children: region.title }),
177
+ region.description ? /* @__PURE__ */ jsx(CardDescription, { children: region.description }) : null
178
+ ] }),
179
+ /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs(Empty, { children: [
180
+ /* @__PURE__ */ jsx(EmptyTitle, { children: region.emptyTitle ?? (isFilteredState ? "No rows for selected filters" : "No matching rows") }),
181
+ /* @__PURE__ */ jsx(EmptyDescription, { children: region.emptyDescription ?? (isFilteredState ? "Broaden filters or date range to restore table results." : "Adjust filters or date range to load analytics records.") })
182
+ ] }) })
183
+ ] }, region.id);
184
+ }
185
+ return /* @__PURE__ */ jsxs(Card, { children: [
186
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
187
+ /* @__PURE__ */ jsx(CardTitle, { children: region.title }),
188
+ region.description ? /* @__PURE__ */ jsx(CardDescription, { children: region.description }) : null
189
+ ] }),
190
+ /* @__PURE__ */ jsxs(CardContent, { children: [
191
+ isPartialDataState ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "mb-3 text-text-secondary", children: "Showing available rows while some analytics dimensions are still syncing." }) : null,
192
+ /* @__PURE__ */ jsx("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxs(Table, { children: [
193
+ /* @__PURE__ */ jsx(TableHeader, { children: /* @__PURE__ */ jsx(TableRow, { children: region.columns.map((column) => /* @__PURE__ */ jsx(TableHead, { children: column }, `${region.id}-${column}`)) }) }),
194
+ /* @__PURE__ */ jsx(TableBody, { children: region.rows.map((row, rowIndex) => /* @__PURE__ */ jsx(TableRow, { children: region.columns.map((column) => /* @__PURE__ */ jsx(TableCell, { children: row[column] ?? "-" }, `${region.id}-row-${rowIndex}-${column}`)) }, `${region.id}-row-${rowIndex}`)) })
195
+ ] }) })
196
+ ] })
197
+ ] }, region.id);
198
+ }
199
+ function AnalyticsPageKit({
200
+ shell,
201
+ title = "Analytics reporting",
202
+ description = "Coordinate filters, chart surfaces, and tabular analysis from one stable page-kit contract.",
203
+ filters,
204
+ chartRegions,
205
+ gridRegions,
206
+ comparisonLabel,
207
+ onResetFilters,
208
+ className
209
+ }) {
210
+ return /* @__PURE__ */ jsx(NavigationShellPageKit, { ...shell, children: /* @__PURE__ */ jsxs("section", { className: cn("space-y-6", className), children: [
211
+ /* @__PURE__ */ jsxs("header", { className: "space-y-2", children: [
212
+ /* @__PURE__ */ jsx(Heading, { level: 3, children: title }),
213
+ /* @__PURE__ */ jsx(Typography, { variant: "muted", children: description })
214
+ ] }),
215
+ /* @__PURE__ */ jsx(
216
+ "section",
217
+ {
218
+ "aria-label": "Analytics filters",
219
+ className: "rounded-lg border border-border/70 bg-surface/60 p-4",
220
+ children: /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-end gap-4", children: [
221
+ filters.map((filter) => /* @__PURE__ */ jsxs("div", { className: "min-w-[180px] flex-1 space-y-2", children: [
222
+ /* @__PURE__ */ jsx("label", { htmlFor: `analytics-filter-${filter.id}`, className: "text-sm font-medium text-text-primary", children: filter.label }),
223
+ /* @__PURE__ */ jsx(
224
+ NativeSelect,
225
+ {
226
+ id: `analytics-filter-${filter.id}`,
227
+ "aria-label": filter.label,
228
+ value: filter.value,
229
+ onChange: (event) => filter.onChange?.(event.target.value),
230
+ children: filter.options.map((option) => /* @__PURE__ */ jsx("option", { value: option.value, children: option.label }, `${filter.id}-${option.value}`))
231
+ }
232
+ )
233
+ ] }, filter.id)),
234
+ comparisonLabel ? /* @__PURE__ */ jsx(Badge, { variant: "outline", children: comparisonLabel }) : null,
235
+ onResetFilters ? /* @__PURE__ */ jsx(Button, { variant: "ghost", onClick: onResetFilters, children: "Reset filters" }) : null
236
+ ] })
237
+ }
238
+ ),
239
+ /* @__PURE__ */ jsx("section", { className: "grid gap-4 xl:grid-cols-2", children: chartRegions.map((region) => {
240
+ const state = deriveState(region.state, region.data);
241
+ const isFilteredState = state === "filtered";
242
+ const isPartialDataState = state === "partial-data";
243
+ if (state === "error") {
244
+ return /* @__PURE__ */ jsxs(Card, { className: region.className, children: [
245
+ /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: region.title }) }),
246
+ /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(
247
+ "div",
248
+ {
249
+ role: "alert",
250
+ className: "rounded-md border border-destructive/40 bg-destructive/10 px-4 py-3 text-sm text-destructive",
251
+ children: region.errorMessage ?? "Analytics chart is unavailable."
252
+ }
253
+ ) })
254
+ ] }, region.id);
255
+ }
256
+ return /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
257
+ isPartialDataState ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-text-secondary", children: "Showing available chart data while some series are still syncing." }) : null,
258
+ /* @__PURE__ */ jsx(
259
+ ChartCard,
260
+ {
261
+ className: region.className,
262
+ title: region.title,
263
+ description: region.description,
264
+ chart: region.chart,
265
+ data: state === "empty" || isFilteredState ? [] : region.data,
266
+ loading: state === "loading",
267
+ emptyTitle: region.emptyTitle ?? (isFilteredState ? "No chart points for selected filters" : "No chart points"),
268
+ emptyDescription: region.emptyDescription ?? "Try adjusting filters to broaden the results."
269
+ }
270
+ )
271
+ ] }, region.id);
272
+ }) }),
273
+ /* @__PURE__ */ jsx("section", { className: "grid gap-4 xl:grid-cols-2", children: gridRegions.map((region) => renderGridRegion(region)) })
274
+ ] }) });
275
+ }
276
+
277
+ export { AnalyticsPageKit };