@seed-ship/mcp-ui-solid 6.24.0 → 7.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 (353) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/README.md +61 -0
  3. package/dist/adapters/connector.cjs +3 -3
  4. package/dist/adapters/connector.cjs.map +1 -1
  5. package/dist/adapters/connector.d.cts +108 -0
  6. package/dist/adapters/connector.d.ts +1 -2
  7. package/dist/adapters/connector.js +3 -3
  8. package/dist/adapters/connector.js.map +1 -1
  9. package/dist/adapters/index.d.cts +21 -0
  10. package/dist/adapters/index.d.ts +6 -7
  11. package/dist/adapters/macro-run.d.cts +99 -0
  12. package/dist/adapters/macro-run.d.ts +1 -2
  13. package/dist/adapters/presentation.d.cts +1 -2
  14. package/dist/adapters/presentation.d.ts +1 -2
  15. package/dist/adapters.d.cts +1 -1
  16. package/dist/adapters.d.ts +1 -1
  17. package/dist/components/ActionGroupRenderer.cjs +6 -6
  18. package/dist/components/ActionGroupRenderer.cjs.map +1 -1
  19. package/dist/components/ActionGroupRenderer.d.cts +38 -0
  20. package/dist/components/ActionGroupRenderer.d.ts +1 -2
  21. package/dist/components/ActionGroupRenderer.js +6 -6
  22. package/dist/components/ActionGroupRenderer.js.map +1 -1
  23. package/dist/components/ActionRenderer.d.cts +9 -0
  24. package/dist/components/ActionRenderer.d.ts +0 -1
  25. package/dist/components/AgentCard.d.cts +19 -0
  26. package/dist/components/AgentCard.d.ts +1 -2
  27. package/dist/components/AgentHandoff.d.cts +11 -0
  28. package/dist/components/AgentHandoff.d.ts +1 -2
  29. package/dist/components/ArtifactRenderer.d.cts +11 -0
  30. package/dist/components/ArtifactRenderer.d.ts +0 -1
  31. package/dist/components/AutocompleteDropdown.cjs +6 -6
  32. package/dist/components/AutocompleteDropdown.cjs.map +1 -1
  33. package/dist/components/AutocompleteDropdown.d.cts +70 -0
  34. package/dist/components/AutocompleteDropdown.d.ts +1 -2
  35. package/dist/components/AutocompleteDropdown.js +6 -6
  36. package/dist/components/AutocompleteDropdown.js.map +1 -1
  37. package/dist/components/AutocompleteFormField.cjs +6 -5
  38. package/dist/components/AutocompleteFormField.cjs.map +1 -1
  39. package/dist/components/AutocompleteFormField.d.cts +51 -0
  40. package/dist/components/AutocompleteFormField.d.ts +1 -2
  41. package/dist/components/AutocompleteFormField.d.ts.map +1 -1
  42. package/dist/components/AutocompleteFormField.js +6 -5
  43. package/dist/components/AutocompleteFormField.js.map +1 -1
  44. package/dist/components/BriefingDiff.d.cts +11 -0
  45. package/dist/components/BriefingDiff.d.ts +1 -2
  46. package/dist/components/CarouselRenderer.d.cts +12 -0
  47. package/dist/components/CarouselRenderer.d.ts +1 -2
  48. package/dist/components/ChartJSRenderer.cjs +216 -6
  49. package/dist/components/ChartJSRenderer.cjs.map +1 -1
  50. package/dist/components/ChartJSRenderer.d.cts +62 -0
  51. package/dist/components/ChartJSRenderer.d.ts +1 -2
  52. package/dist/components/ChartJSRenderer.d.ts.map +1 -1
  53. package/dist/components/ChartJSRenderer.js +217 -7
  54. package/dist/components/ChartJSRenderer.js.map +1 -1
  55. package/dist/components/ChatPrompt.cjs +5 -5
  56. package/dist/components/ChatPrompt.cjs.map +1 -1
  57. package/dist/components/ChatPrompt.d.cts +69 -0
  58. package/dist/components/ChatPrompt.d.ts +1 -2
  59. package/dist/components/ChatPrompt.js +5 -5
  60. package/dist/components/ChatPrompt.js.map +1 -1
  61. package/dist/components/CodeBlockRenderer.d.cts +23 -0
  62. package/dist/components/CodeBlockRenderer.d.ts +1 -2
  63. package/dist/components/ComponentToolbar.cjs +5 -5
  64. package/dist/components/ComponentToolbar.cjs.map +1 -1
  65. package/dist/components/ComponentToolbar.d.cts +46 -0
  66. package/dist/components/ComponentToolbar.d.ts +0 -1
  67. package/dist/components/ComponentToolbar.js +5 -5
  68. package/dist/components/ComponentToolbar.js.map +1 -1
  69. package/dist/components/DataPreviewSection.d.cts +11 -0
  70. package/dist/components/DataPreviewSection.d.ts +1 -2
  71. package/dist/components/DegradedFallback.cjs +1 -1
  72. package/dist/components/DegradedFallback.cjs.map +1 -1
  73. package/dist/components/DegradedFallback.d.cts +43 -0
  74. package/dist/components/DegradedFallback.d.ts +0 -1
  75. package/dist/components/DegradedFallback.js +1 -1
  76. package/dist/components/DegradedFallback.js.map +1 -1
  77. package/dist/components/DraggableGridItem.d.cts +94 -0
  78. package/dist/components/DraggableGridItem.d.ts +1 -2
  79. package/dist/components/EditableLayoutContext.d.cts +4 -0
  80. package/dist/components/EditableLayoutContext.d.ts +0 -1
  81. package/dist/components/EditableUIResourceRenderer.d.cts +42 -0
  82. package/dist/components/EditableUIResourceRenderer.d.ts +1 -2
  83. package/dist/components/ElicitationForm.d.cts +67 -0
  84. package/dist/components/ElicitationForm.d.ts +1 -2
  85. package/dist/components/ExpandableWrapper.cjs +10 -7
  86. package/dist/components/ExpandableWrapper.cjs.map +1 -1
  87. package/dist/components/ExpandableWrapper.d.cts +49 -0
  88. package/dist/components/ExpandableWrapper.d.ts +0 -1
  89. package/dist/components/ExpandableWrapper.d.ts.map +1 -1
  90. package/dist/components/ExpandableWrapper.js +10 -7
  91. package/dist/components/ExpandableWrapper.js.map +1 -1
  92. package/dist/components/FeedbackInline.d.cts +70 -0
  93. package/dist/components/FeedbackInline.d.ts +0 -1
  94. package/dist/components/FooterRenderer.d.cts +15 -0
  95. package/dist/components/FooterRenderer.d.ts +0 -1
  96. package/dist/components/FormFieldRenderer.cjs +13 -12
  97. package/dist/components/FormFieldRenderer.cjs.map +1 -1
  98. package/dist/components/FormFieldRenderer.d.cts +19 -0
  99. package/dist/components/FormFieldRenderer.d.ts +1 -2
  100. package/dist/components/FormFieldRenderer.d.ts.map +1 -1
  101. package/dist/components/FormFieldRenderer.js +13 -12
  102. package/dist/components/FormFieldRenderer.js.map +1 -1
  103. package/dist/components/FormRenderer.cjs +1 -1
  104. package/dist/components/FormRenderer.cjs.map +1 -1
  105. package/dist/components/FormRenderer.d.cts +14 -0
  106. package/dist/components/FormRenderer.d.ts +1 -2
  107. package/dist/components/FormRenderer.js +1 -1
  108. package/dist/components/FormRenderer.js.map +1 -1
  109. package/dist/components/GenerativeUIErrorBoundary.cjs +1 -1
  110. package/dist/components/GenerativeUIErrorBoundary.cjs.map +1 -1
  111. package/dist/components/GenerativeUIErrorBoundary.d.cts +58 -0
  112. package/dist/components/GenerativeUIErrorBoundary.d.ts +1 -2
  113. package/dist/components/GenerativeUIErrorBoundary.default.d.cts +1 -0
  114. package/dist/components/GenerativeUIErrorBoundary.default.d.ts +1 -2
  115. package/dist/components/GenerativeUIErrorBoundary.js +1 -1
  116. package/dist/components/GenerativeUIErrorBoundary.js.map +1 -1
  117. package/dist/components/GhostText.cjs +2 -2
  118. package/dist/components/GhostText.cjs.map +1 -1
  119. package/dist/components/GhostText.d.cts +112 -0
  120. package/dist/components/GhostText.d.ts +0 -1
  121. package/dist/components/GhostText.js +2 -2
  122. package/dist/components/GhostText.js.map +1 -1
  123. package/dist/components/GraphRenderer.cjs +100 -29
  124. package/dist/components/GraphRenderer.cjs.map +1 -1
  125. package/dist/components/GraphRenderer.d.cts +66 -0
  126. package/dist/components/GraphRenderer.d.ts +2 -3
  127. package/dist/components/GraphRenderer.d.ts.map +1 -1
  128. package/dist/components/GraphRenderer.js +100 -29
  129. package/dist/components/GraphRenderer.js.map +1 -1
  130. package/dist/components/GridRenderer.d.cts +49 -0
  131. package/dist/components/GridRenderer.d.ts +1 -2
  132. package/dist/components/IframeFallbackLink.d.cts +22 -0
  133. package/dist/components/IframeFallbackLink.d.ts +0 -1
  134. package/dist/components/ImageGalleryRenderer.d.cts +22 -0
  135. package/dist/components/ImageGalleryRenderer.d.ts +1 -2
  136. package/dist/components/LightboxOverlay.d.cts +31 -0
  137. package/dist/components/LightboxOverlay.d.ts +1 -2
  138. package/dist/components/MapRenderer.d.cts +77 -0
  139. package/dist/components/MapRenderer.d.ts +1 -2
  140. package/dist/components/MissingValue.cjs +2 -2
  141. package/dist/components/MissingValue.cjs.map +1 -1
  142. package/dist/components/MissingValue.d.cts +26 -0
  143. package/dist/components/MissingValue.d.ts +0 -1
  144. package/dist/components/MissingValue.js +2 -2
  145. package/dist/components/MissingValue.js.map +1 -1
  146. package/dist/components/ModalRenderer.cjs +39 -31
  147. package/dist/components/ModalRenderer.cjs.map +1 -1
  148. package/dist/components/ModalRenderer.d.cts +66 -0
  149. package/dist/components/ModalRenderer.d.ts +1 -2
  150. package/dist/components/ModalRenderer.d.ts.map +1 -1
  151. package/dist/components/ModalRenderer.js +40 -32
  152. package/dist/components/ModalRenderer.js.map +1 -1
  153. package/dist/components/PortalDropdownMenu.cjs +6 -3
  154. package/dist/components/PortalDropdownMenu.cjs.map +1 -1
  155. package/dist/components/PortalDropdownMenu.d.cts +55 -0
  156. package/dist/components/PortalDropdownMenu.d.ts +0 -1
  157. package/dist/components/PortalDropdownMenu.d.ts.map +1 -1
  158. package/dist/components/PortalDropdownMenu.js +7 -4
  159. package/dist/components/PortalDropdownMenu.js.map +1 -1
  160. package/dist/components/PresentationFeedback.d.cts +112 -0
  161. package/dist/components/PresentationFeedback.d.ts +0 -1
  162. package/dist/components/RenderContext.d.cts +41 -0
  163. package/dist/components/RenderContext.d.ts +1 -2
  164. package/dist/components/ResizeHandle.d.cts +49 -0
  165. package/dist/components/ResizeHandle.d.ts +0 -1
  166. package/dist/components/SafeHtml.d.cts +45 -0
  167. package/dist/components/SafeHtml.d.ts +0 -1
  168. package/dist/components/ScratchpadPanel.cjs +38 -44
  169. package/dist/components/ScratchpadPanel.cjs.map +1 -1
  170. package/dist/components/ScratchpadPanel.d.cts +34 -0
  171. package/dist/components/ScratchpadPanel.d.ts +1 -2
  172. package/dist/components/ScratchpadPanel.d.ts.map +1 -1
  173. package/dist/components/ScratchpadPanel.js +38 -44
  174. package/dist/components/ScratchpadPanel.js.map +1 -1
  175. package/dist/components/SplitStepper.d.cts +11 -0
  176. package/dist/components/SplitStepper.d.ts +1 -2
  177. package/dist/components/StreamingUIRenderer.d.cts +58 -0
  178. package/dist/components/StreamingUIRenderer.d.ts +3 -4
  179. package/dist/components/UIResourceRenderer.cjs +20 -20
  180. package/dist/components/UIResourceRenderer.cjs.map +1 -1
  181. package/dist/components/UIResourceRenderer.d.cts +181 -0
  182. package/dist/components/UIResourceRenderer.d.ts +3 -4
  183. package/dist/components/UIResourceRenderer.default.d.cts +1 -0
  184. package/dist/components/UIResourceRenderer.default.d.ts +1 -2
  185. package/dist/components/UIResourceRenderer.js +20 -20
  186. package/dist/components/UIResourceRenderer.js.map +1 -1
  187. package/dist/components/VerifiedText.d.cts +22 -0
  188. package/dist/components/VerifiedText.d.ts +1 -2
  189. package/dist/components/VideoRenderer.d.cts +41 -0
  190. package/dist/components/VideoRenderer.d.ts +1 -2
  191. package/dist/components/chart-data-table.d.cts +68 -0
  192. package/dist/components/chart-data-table.d.ts +0 -1
  193. package/dist/components/chart-missing-plugin.cjs +4 -4
  194. package/dist/components/chart-missing-plugin.cjs.map +1 -1
  195. package/dist/components/chart-missing-plugin.d.cts +128 -0
  196. package/dist/components/chart-missing-plugin.d.ts +4 -3
  197. package/dist/components/chart-missing-plugin.d.ts.map +1 -1
  198. package/dist/components/chart-missing-plugin.js +4 -4
  199. package/dist/components/chart-missing-plugin.js.map +1 -1
  200. package/dist/components/index.d.cts +62 -0
  201. package/dist/components/index.d.ts +57 -58
  202. package/dist/components.d.cts +2 -2
  203. package/dist/components.d.ts +2 -2
  204. package/dist/context/AutocompleteContext.d.cts +76 -0
  205. package/dist/context/AutocompleteContext.d.ts +1 -2
  206. package/dist/context/MCPActionContext.d.cts +169 -0
  207. package/dist/context/MCPActionContext.d.ts +0 -1
  208. package/dist/context/MCPUIConfigContext.d.cts +201 -0
  209. package/dist/context/MCPUIConfigContext.d.ts +1 -2
  210. package/dist/context/MCPUIMathContext.d.cts +17 -0
  211. package/dist/context/MCPUIMathContext.d.ts +0 -1
  212. package/dist/context/MCPUIStringsContext.d.cts +802 -0
  213. package/dist/context/MCPUIStringsContext.d.ts +1 -2
  214. package/dist/context/MCPUITelemetryContext.d.cts +35 -0
  215. package/dist/context/MCPUITelemetryContext.d.ts +1 -2
  216. package/dist/context/index.d.cts +7 -0
  217. package/dist/context/index.d.ts +2 -3
  218. package/dist/hooks/createResponsiveGrid.d.cts +5 -0
  219. package/dist/hooks/createResponsiveGrid.d.ts +0 -1
  220. package/dist/hooks/index.d.cts +25 -0
  221. package/dist/hooks/index.d.ts +20 -21
  222. package/dist/hooks/useAction.d.cts +164 -0
  223. package/dist/hooks/useAction.d.ts +2 -3
  224. package/dist/hooks/useAutocomplete.d.cts +118 -0
  225. package/dist/hooks/useAutocomplete.d.ts +1 -2
  226. package/dist/hooks/useChatBus.d.cts +55 -0
  227. package/dist/hooks/useChatBus.d.ts +1 -2
  228. package/dist/hooks/useConditionalField.d.cts +34 -0
  229. package/dist/hooks/useConditionalField.d.ts +1 -2
  230. package/dist/hooks/useDataValidator.d.cts +41 -0
  231. package/dist/hooks/useDataValidator.d.ts +1 -2
  232. package/dist/hooks/useDragDrop.d.cts +99 -0
  233. package/dist/hooks/useDragDrop.d.ts +1 -2
  234. package/dist/hooks/useFormPersistence.d.cts +80 -0
  235. package/dist/hooks/useFormPersistence.d.ts +0 -1
  236. package/dist/hooks/useModal.d.cts +106 -0
  237. package/dist/hooks/useModal.d.ts +0 -1
  238. package/dist/hooks/useResize.d.cts +86 -0
  239. package/dist/hooks/useResize.d.ts +1 -2
  240. package/dist/hooks/useStreamingUI.d.cts +117 -0
  241. package/dist/hooks/useStreamingUI.d.ts +1 -2
  242. package/dist/hooks.d.cts +1 -1
  243. package/dist/hooks.d.ts +1 -1
  244. package/dist/index.d.cts +91 -92
  245. package/dist/index.d.ts +91 -92
  246. package/dist/plugins/duckdb.d.cts +1 -2
  247. package/dist/plugins/duckdb.d.ts +1 -2
  248. package/dist/plugins/groq.d.cts +12 -0
  249. package/dist/plugins/groq.d.ts +1 -2
  250. package/dist/plugins/index.d.cts +9 -0
  251. package/dist/plugins/index.d.ts +3 -4
  252. package/dist/plugins/katex.d.cts +1 -2
  253. package/dist/plugins/katex.d.ts +1 -2
  254. package/dist/plugins/rest.d.cts +12 -0
  255. package/dist/plugins/rest.d.ts +1 -2
  256. package/dist/plugins/supabase.d.cts +12 -0
  257. package/dist/plugins/supabase.d.ts +1 -2
  258. package/dist/services/chat-bus.d.cts +100 -0
  259. package/dist/services/chat-bus.d.ts +1 -2
  260. package/dist/services/chat-prompt-controller.d.cts +92 -0
  261. package/dist/services/chat-prompt-controller.d.ts +1 -2
  262. package/dist/services/component-registry.d.cts +119 -0
  263. package/dist/services/component-registry.d.ts +1 -2
  264. package/dist/services/data-validator.d.cts +27 -0
  265. package/dist/services/data-validator.d.ts +1 -2
  266. package/dist/services/index.d.cts +9 -0
  267. package/dist/services/index.d.ts +4 -5
  268. package/dist/services/telemetry.d.cts +86 -0
  269. package/dist/services/telemetry.d.ts +1 -2
  270. package/dist/services/validation.d.cts +169 -0
  271. package/dist/services/validation.d.ts +1 -2
  272. package/dist/stores/scratchpad-store.d.cts +109 -0
  273. package/dist/stores/scratchpad-store.d.ts +1 -2
  274. package/dist/stores/server-capabilities-store.d.cts +171 -0
  275. package/dist/stores/server-capabilities-store.d.ts +0 -1
  276. package/dist/test-setup.d.cts +5 -0
  277. package/dist/test-setup.d.ts +0 -1
  278. package/dist/testing/index.d.cts +34 -0
  279. package/dist/testing/index.d.ts +1 -2
  280. package/dist/types/chat-bus.d.cts +783 -0
  281. package/dist/types/chat-bus.d.ts +4 -5
  282. package/dist/types/index.d.cts +1616 -0
  283. package/dist/types/index.d.ts +0 -1
  284. package/dist/types-export.d.cts +1 -2
  285. package/dist/types-export.d.ts +1 -2
  286. package/dist/types.d.cts +1 -1
  287. package/dist/types.d.ts +1 -1
  288. package/dist/utils/degraded-projections.d.cts +119 -0
  289. package/dist/utils/degraded-projections.d.ts +0 -1
  290. package/dist/utils/duplicate-mount-registry.d.cts +83 -0
  291. package/dist/utils/duplicate-mount-registry.d.ts +0 -1
  292. package/dist/utils/escape-html.d.cts +12 -0
  293. package/dist/utils/escape-html.d.ts +0 -1
  294. package/dist/utils/format-string.d.cts +25 -0
  295. package/dist/utils/format-string.d.ts +0 -1
  296. package/dist/utils/iframe-coep.d.cts +53 -0
  297. package/dist/utils/iframe-coep.d.ts +1 -2
  298. package/dist/utils/logger.d.cts +57 -0
  299. package/dist/utils/logger.d.ts +0 -1
  300. package/dist/utils/math-markdown.cjs +1 -1
  301. package/dist/utils/math-markdown.cjs.map +1 -1
  302. package/dist/utils/math-markdown.d.cts +15 -0
  303. package/dist/utils/math-markdown.d.ts +1 -2
  304. package/dist/utils/math-markdown.js +1 -1
  305. package/dist/utils/math-markdown.js.map +1 -1
  306. package/dist/utils/missing-value.d.cts +78 -0
  307. package/dist/utils/missing-value.d.ts +0 -1
  308. package/dist/utils/pan-zoom.d.cts +234 -0
  309. package/dist/utils/pan-zoom.d.ts +0 -1
  310. package/dist/utils/perf.d.cts +18 -0
  311. package/dist/utils/perf.d.ts +0 -1
  312. package/dist/utils/safe-url.d.cts +33 -0
  313. package/dist/utils/safe-url.d.ts +0 -1
  314. package/dist/utils/sanitize-html.d.cts +142 -0
  315. package/dist/utils/sanitize-html.d.ts +0 -1
  316. package/dist/utils/stable-key.d.cts +32 -0
  317. package/dist/utils/stable-key.d.ts +0 -1
  318. package/dist/utils/theme.cjs +91 -0
  319. package/dist/utils/theme.cjs.map +1 -0
  320. package/dist/utils/theme.d.cts +10 -0
  321. package/dist/utils/theme.d.ts +10 -0
  322. package/dist/utils/theme.d.ts.map +1 -0
  323. package/dist/utils/theme.js +91 -0
  324. package/dist/utils/theme.js.map +1 -0
  325. package/dist/validation.d.cts +3 -4
  326. package/dist/validation.d.ts +3 -4
  327. package/docs/SECURITY-DEPENDENCIES.md +209 -0
  328. package/docs/THEMING.md +205 -0
  329. package/docs/ZOD4-STABLE-MIGRATION-2026-10-26.md +181 -0
  330. package/package.json +12 -9
  331. package/src/adapters/connector.ts +3 -3
  332. package/src/components/ActionGroupRenderer.tsx +6 -6
  333. package/src/components/AutocompleteDropdown.tsx +17 -17
  334. package/src/components/AutocompleteFormField.tsx +10 -9
  335. package/src/components/ChartJSRenderer.tsx +483 -239
  336. package/src/components/ChatPrompt.tsx +16 -16
  337. package/src/components/ComponentToolbar.tsx +5 -5
  338. package/src/components/DegradedFallback.tsx +9 -9
  339. package/src/components/ExpandableWrapper.tsx +15 -11
  340. package/src/components/FormFieldRenderer.tsx +52 -51
  341. package/src/components/FormRenderer.tsx +12 -12
  342. package/src/components/GenerativeUIErrorBoundary.tsx +6 -6
  343. package/src/components/GhostText.tsx +7 -7
  344. package/src/components/GraphRenderer.tsx +83 -67
  345. package/src/components/MissingValue.tsx +2 -2
  346. package/src/components/ModalRenderer.tsx +11 -5
  347. package/src/components/PortalDropdownMenu.tsx +6 -2
  348. package/src/components/ScratchpadPanel.tsx +144 -141
  349. package/src/components/UIResourceRenderer.tsx +101 -101
  350. package/src/components/chart-missing-plugin.ts +5 -3
  351. package/src/styles/autocomplete.css +53 -53
  352. package/src/utils/math-markdown.ts +1 -1
  353. package/src/utils/theme.ts +101 -0
@@ -774,7 +774,7 @@ export declare const DEFAULT_MCPUI_STRINGS: Required<MCPUIStrings>;
774
774
  * importing `solid-js`. Re-exported here (and from the root barrel) so every
775
775
  * existing import path keeps working.
776
776
  */
777
- export { formatMCPUIString } from '../utils/format-string';
777
+ export { formatMCPUIString } from "../utils/format-string.js";
778
778
  export declare const MCPUIStringsContext: import("solid-js").Context<MCPUIStrings>;
779
779
  /**
780
780
  * Returns `locale` in canonical BCP-47 form, or `DEFAULT_MCPUI_STRINGS.locale`
@@ -800,4 +800,3 @@ export interface MCPUIStringsProviderProps {
800
800
  * Merges the partial `strings` override over the English defaults.
801
801
  */
802
802
  export declare function MCPUIStringsProvider(props: MCPUIStringsProviderProps): JSX.Element;
803
- //# sourceMappingURL=MCPUIStringsContext.d.ts.map
@@ -0,0 +1,35 @@
1
+ /**
2
+ * MCPUITelemetryProvider + useTelemetry hook (B.5 — v5.6.0)
3
+ *
4
+ * SolidJS Context wrapper around `createTelemetryDispatcher`. Optional —
5
+ * when no Provider is present, `useTelemetry()` returns `null` and dispatch
6
+ * sites no-op (zero behavior change for apps that don't opt in).
7
+ *
8
+ * See `services/telemetry.ts` for the dispatcher contract and
9
+ * `MCP-UI-AUDIT-2026-04-26.md` §M.6 for the full specification.
10
+ */
11
+ import { type Component, type JSX } from 'solid-js';
12
+ import { type TelemetryDispatcher, type TelemetrySink, type TelemetryOptions } from "../services/telemetry.cjs";
13
+ export declare const MCPUITelemetryContext: import("solid-js").Context<TelemetryDispatcher | null>;
14
+ export interface MCPUITelemetryProviderProps {
15
+ /** Consumer-supplied sink. Receives a batch of events. Fail-open. */
16
+ sink: TelemetrySink;
17
+ /** Sampling + buffering knobs (defaults: 100% / 100ms / max 50). */
18
+ options?: TelemetryOptions;
19
+ children: JSX.Element;
20
+ }
21
+ export declare const MCPUITelemetryProvider: Component<MCPUITelemetryProviderProps>;
22
+ /**
23
+ * Returns the current telemetry dispatcher, or `null` when no Provider is
24
+ * mounted in the tree above. Dispatch sites should null-check and no-op
25
+ * when null — telemetry is OPT-IN and must not impose a Provider on apps.
26
+ *
27
+ * @example
28
+ * ```tsx
29
+ * const telemetry = useTelemetry()
30
+ * onMount(() => {
31
+ * telemetry?.dispatch({ type: 'component:mounted', id, componentType, ts: Date.now() })
32
+ * })
33
+ * ```
34
+ */
35
+ export declare function useTelemetry(): TelemetryDispatcher | null;
@@ -9,7 +9,7 @@
9
9
  * `MCP-UI-AUDIT-2026-04-26.md` §M.6 for the full specification.
10
10
  */
11
11
  import { type Component, type JSX } from 'solid-js';
12
- import { type TelemetryDispatcher, type TelemetrySink, type TelemetryOptions } from '../services/telemetry';
12
+ import { type TelemetryDispatcher, type TelemetrySink, type TelemetryOptions } from "../services/telemetry.js";
13
13
  export declare const MCPUITelemetryContext: import("solid-js").Context<TelemetryDispatcher | null>;
14
14
  export interface MCPUITelemetryProviderProps {
15
15
  /** Consumer-supplied sink. Receives a batch of events. Fail-open. */
@@ -33,4 +33,3 @@ export declare const MCPUITelemetryProvider: Component<MCPUITelemetryProviderPro
33
33
  * ```
34
34
  */
35
35
  export declare function useTelemetry(): TelemetryDispatcher | null;
36
- //# sourceMappingURL=MCPUITelemetryContext.d.ts.map
@@ -0,0 +1,7 @@
1
+ /**
2
+ * MCP UI Solid - Context Providers
3
+ *
4
+ * Context providers for action execution and state management
5
+ */
6
+ export { MCPActionProvider, MCPActionContext, useMCPAction, useMCPActionSafe, } from "./MCPActionContext.cjs";
7
+ export type { MCPActionContextValue, MCPActionProviderProps, ActionRequest, ActionResult, } from "./MCPActionContext.cjs";
@@ -3,6 +3,5 @@
3
3
  *
4
4
  * Context providers for action execution and state management
5
5
  */
6
- export { MCPActionProvider, MCPActionContext, useMCPAction, useMCPActionSafe, } from './MCPActionContext';
7
- export type { MCPActionContextValue, MCPActionProviderProps, ActionRequest, ActionResult, } from './MCPActionContext';
8
- //# sourceMappingURL=index.d.ts.map
6
+ export { MCPActionProvider, MCPActionContext, useMCPAction, useMCPActionSafe, } from "./MCPActionContext.js";
7
+ export type { MCPActionContextValue, MCPActionProviderProps, ActionRequest, ActionResult, } from "./MCPActionContext.js";
@@ -0,0 +1,5 @@
1
+ /** Stack read-only layouts in narrow containers, including desktop chat panels. */
2
+ export declare function createResponsiveGrid(breakpoint?: number): {
3
+ stacked: () => boolean;
4
+ ref: (element: HTMLElement) => void;
5
+ };
@@ -3,4 +3,3 @@ export declare function createResponsiveGrid(breakpoint?: number): {
3
3
  stacked: () => boolean;
4
4
  ref: (element: HTMLElement) => void;
5
5
  };
6
- //# sourceMappingURL=createResponsiveGrid.d.ts.map
@@ -0,0 +1,25 @@
1
+ /**
2
+ * MCP UI Solid - Hooks
3
+ *
4
+ * SolidJS hooks for managing UI resource state and streaming
5
+ */
6
+ export { useStreamingUI, DEFAULT_STREAMING_UI_MESSAGES } from "./useStreamingUI.cjs";
7
+ export type { UseStreamingUIOptions, StreamingUIMessages, StreamingUIState, StreamProgress, StreamError, CompleteMetadata, } from "./useStreamingUI.cjs";
8
+ export { useAction, useToolAction } from "./useAction.cjs";
9
+ export type { UseActionReturn, UseActionOptions, UseToolActionReturn, ActionRequest, ActionResult, } from "./useAction.cjs";
10
+ export { useConditionalField, evaluateCondition } from "./useConditionalField.cjs";
11
+ export type { UseConditionalFieldOptions } from "./useConditionalField.cjs";
12
+ export { useModal, useConfirmModal } from "./useModal.cjs";
13
+ export type { UseModalReturn, UseConfirmModalReturn } from "./useModal.cjs";
14
+ export { useFormPersistence } from "./useFormPersistence.cjs";
15
+ export type { UseFormPersistenceOptions, UseFormPersistenceReturn } from "./useFormPersistence.cjs";
16
+ export { useDragDrop } from "./useDragDrop.cjs";
17
+ export type { UseDragDropOptions, UseDragDropReturn, DragProps, } from "./useDragDrop.cjs";
18
+ export { useResize } from "./useResize.cjs";
19
+ export type { UseResizeOptions, UseResizeReturn, ResizeEdge, ResizeHandleProps, } from "./useResize.cjs";
20
+ export { useAutocomplete } from "./useAutocomplete.cjs";
21
+ export type { UseAutocompleteOptions, UseAutocompleteReturn, } from "./useAutocomplete.cjs";
22
+ export { createPanZoom } from "../utils/pan-zoom.cjs";
23
+ export type { PanZoomOptions, PanZoomController, PanZoomState, PanZoomPoint, PanZoomCursor, } from "../utils/pan-zoom.cjs";
24
+ export { useDataValidator } from "./useDataValidator.cjs";
25
+ export type { UseDataValidatorOptions, UseDataValidatorReturn, } from "./useDataValidator.cjs";
@@ -3,24 +3,23 @@
3
3
  *
4
4
  * SolidJS hooks for managing UI resource state and streaming
5
5
  */
6
- export { useStreamingUI, DEFAULT_STREAMING_UI_MESSAGES } from './useStreamingUI';
7
- export type { UseStreamingUIOptions, StreamingUIMessages, StreamingUIState, StreamProgress, StreamError, CompleteMetadata, } from './useStreamingUI';
8
- export { useAction, useToolAction } from './useAction';
9
- export type { UseActionReturn, UseActionOptions, UseToolActionReturn, ActionRequest, ActionResult, } from './useAction';
10
- export { useConditionalField, evaluateCondition } from './useConditionalField';
11
- export type { UseConditionalFieldOptions } from './useConditionalField';
12
- export { useModal, useConfirmModal } from './useModal';
13
- export type { UseModalReturn, UseConfirmModalReturn } from './useModal';
14
- export { useFormPersistence } from './useFormPersistence';
15
- export type { UseFormPersistenceOptions, UseFormPersistenceReturn } from './useFormPersistence';
16
- export { useDragDrop } from './useDragDrop';
17
- export type { UseDragDropOptions, UseDragDropReturn, DragProps, } from './useDragDrop';
18
- export { useResize } from './useResize';
19
- export type { UseResizeOptions, UseResizeReturn, ResizeEdge, ResizeHandleProps, } from './useResize';
20
- export { useAutocomplete } from './useAutocomplete';
21
- export type { UseAutocompleteOptions, UseAutocompleteReturn, } from './useAutocomplete';
22
- export { createPanZoom } from '../utils/pan-zoom';
23
- export type { PanZoomOptions, PanZoomController, PanZoomState, PanZoomPoint, PanZoomCursor, } from '../utils/pan-zoom';
24
- export { useDataValidator } from './useDataValidator';
25
- export type { UseDataValidatorOptions, UseDataValidatorReturn, } from './useDataValidator';
26
- //# sourceMappingURL=index.d.ts.map
6
+ export { useStreamingUI, DEFAULT_STREAMING_UI_MESSAGES } from "./useStreamingUI.js";
7
+ export type { UseStreamingUIOptions, StreamingUIMessages, StreamingUIState, StreamProgress, StreamError, CompleteMetadata, } from "./useStreamingUI.js";
8
+ export { useAction, useToolAction } from "./useAction.js";
9
+ export type { UseActionReturn, UseActionOptions, UseToolActionReturn, ActionRequest, ActionResult, } from "./useAction.js";
10
+ export { useConditionalField, evaluateCondition } from "./useConditionalField.js";
11
+ export type { UseConditionalFieldOptions } from "./useConditionalField.js";
12
+ export { useModal, useConfirmModal } from "./useModal.js";
13
+ export type { UseModalReturn, UseConfirmModalReturn } from "./useModal.js";
14
+ export { useFormPersistence } from "./useFormPersistence.js";
15
+ export type { UseFormPersistenceOptions, UseFormPersistenceReturn } from "./useFormPersistence.js";
16
+ export { useDragDrop } from "./useDragDrop.js";
17
+ export type { UseDragDropOptions, UseDragDropReturn, DragProps, } from "./useDragDrop.js";
18
+ export { useResize } from "./useResize.js";
19
+ export type { UseResizeOptions, UseResizeReturn, ResizeEdge, ResizeHandleProps, } from "./useResize.js";
20
+ export { useAutocomplete } from "./useAutocomplete.js";
21
+ export type { UseAutocompleteOptions, UseAutocompleteReturn, } from "./useAutocomplete.js";
22
+ export { createPanZoom } from "../utils/pan-zoom.js";
23
+ export type { PanZoomOptions, PanZoomController, PanZoomState, PanZoomPoint, PanZoomCursor, } from "../utils/pan-zoom.js";
24
+ export { useDataValidator } from "./useDataValidator.js";
25
+ export type { UseDataValidatorOptions, UseDataValidatorReturn, } from "./useDataValidator.js";
@@ -0,0 +1,164 @@
1
+ /**
2
+ * useAction - Hook for executing MCP actions from components
3
+ * Phase 5.0: Quick Wins - Simplified API for ActionRenderer and custom components
4
+ * Sprint 2: Lifecycle callbacks and retry support
5
+ */
6
+ import { Accessor } from 'solid-js';
7
+ import { ActionRequest, ActionResult } from "../context/MCPActionContext.cjs";
8
+ import type { ActionLifecycleCallbacks } from "../types.cjs";
9
+ /**
10
+ * Options for useAction hook
11
+ */
12
+ export interface UseActionOptions extends ActionLifecycleCallbacks {
13
+ /**
14
+ * Number of retry attempts on failure
15
+ */
16
+ retryCount?: number;
17
+ /**
18
+ * Delay between retries in milliseconds
19
+ */
20
+ retryDelay?: number;
21
+ }
22
+ /**
23
+ * Return type for useAction hook
24
+ */
25
+ export interface UseActionReturn {
26
+ /**
27
+ * Execute a tool action
28
+ */
29
+ execute: (toolName: string, params?: Record<string, any>) => Promise<ActionResult>;
30
+ /**
31
+ * Full execute with ActionRequest
32
+ */
33
+ executeAction: (request: ActionRequest) => Promise<ActionResult>;
34
+ /**
35
+ * Whether an action is currently executing
36
+ */
37
+ isExecuting: Accessor<boolean>;
38
+ /**
39
+ * Last result from action execution
40
+ */
41
+ lastResult: Accessor<ActionResult | undefined>;
42
+ /**
43
+ * Last error (if any)
44
+ */
45
+ lastError: Accessor<string | undefined>;
46
+ /**
47
+ * Retry the last failed action
48
+ */
49
+ retry: () => Promise<ActionResult | undefined>;
50
+ /**
51
+ * Clear the last error
52
+ */
53
+ clearError: () => void;
54
+ /**
55
+ * Reset all state
56
+ */
57
+ reset: () => void;
58
+ }
59
+ /**
60
+ * Hook for executing MCP actions
61
+ *
62
+ * @example
63
+ * ```tsx
64
+ * function MyButton() {
65
+ * const { execute, isExecuting, lastError } = useAction()
66
+ *
67
+ * const handleClick = async () => {
68
+ * const result = await execute('search.hub', { query: 'test' })
69
+ * if (result.success) {
70
+ * console.log('Data:', result.data)
71
+ * }
72
+ * }
73
+ *
74
+ * return (
75
+ * <button onClick={handleClick} disabled={isExecuting()}>
76
+ * {isExecuting() ? 'Loading...' : 'Search'}
77
+ * </button>
78
+ * )
79
+ * }
80
+ * ```
81
+ *
82
+ * @example With lifecycle callbacks
83
+ * ```tsx
84
+ * function MyActionButton() {
85
+ * const { execute, retry, clearError, lastError } = useAction({
86
+ * onBefore: (req) => {
87
+ * console.log('About to execute:', req.toolName)
88
+ * return true // proceed
89
+ * },
90
+ * onSuccess: (result) => {
91
+ * toast.success('Action completed!')
92
+ * },
93
+ * onError: (error) => {
94
+ * toast.error(`Action failed: ${error}`)
95
+ * },
96
+ * retryCount: 3,
97
+ * retryDelay: 1000,
98
+ * })
99
+ *
100
+ * return (
101
+ * <div>
102
+ * <button onClick={() => execute('search.hub', { query: 'test' })}>
103
+ * Search
104
+ * </button>
105
+ * <Show when={lastError()}>
106
+ * <button onClick={retry}>Retry</button>
107
+ * <button onClick={clearError}>Dismiss</button>
108
+ * </Show>
109
+ * </div>
110
+ * )
111
+ * }
112
+ * ```
113
+ */
114
+ export declare function useAction(options?: UseActionOptions): UseActionReturn;
115
+ /**
116
+ * Return type for useToolAction hook
117
+ */
118
+ export interface UseToolActionReturn {
119
+ execute: (params?: Record<string, any>) => Promise<ActionResult>;
120
+ isExecuting: Accessor<boolean>;
121
+ lastResult: Accessor<ActionResult | undefined>;
122
+ lastError: Accessor<string | undefined>;
123
+ retry: () => Promise<ActionResult | undefined>;
124
+ clearError: () => void;
125
+ reset: () => void;
126
+ }
127
+ /**
128
+ * Hook for binding action to a specific tool
129
+ *
130
+ * @example
131
+ * ```tsx
132
+ * function SearchButton() {
133
+ * const { execute, isExecuting } = useToolAction('search.hub')
134
+ *
135
+ * return (
136
+ * <button onClick={() => execute({ query: 'test' })} disabled={isExecuting()}>
137
+ * Search
138
+ * </button>
139
+ * )
140
+ * }
141
+ * ```
142
+ *
143
+ * @example With lifecycle callbacks
144
+ * ```tsx
145
+ * function SearchButton() {
146
+ * const { execute, retry, lastError } = useToolAction('search.hub', {
147
+ * onSuccess: (result) => toast.success('Search complete!'),
148
+ * onError: (error) => toast.error(`Search failed: ${error}`),
149
+ * retryCount: 2,
150
+ * })
151
+ *
152
+ * return (
153
+ * <div>
154
+ * <button onClick={() => execute({ query: 'test' })}>Search</button>
155
+ * <Show when={lastError()}>
156
+ * <button onClick={retry}>Retry</button>
157
+ * </Show>
158
+ * </div>
159
+ * )
160
+ * }
161
+ * ```
162
+ */
163
+ export declare function useToolAction(toolName: string, options?: UseActionOptions): UseToolActionReturn;
164
+ export type { ActionRequest, ActionResult };
@@ -4,8 +4,8 @@
4
4
  * Sprint 2: Lifecycle callbacks and retry support
5
5
  */
6
6
  import { Accessor } from 'solid-js';
7
- import { ActionRequest, ActionResult } from '../context/MCPActionContext';
8
- import type { ActionLifecycleCallbacks } from '../types';
7
+ import { ActionRequest, ActionResult } from "../context/MCPActionContext.js";
8
+ import type { ActionLifecycleCallbacks } from "../types.js";
9
9
  /**
10
10
  * Options for useAction hook
11
11
  */
@@ -162,4 +162,3 @@ export interface UseToolActionReturn {
162
162
  */
163
163
  export declare function useToolAction(toolName: string, options?: UseActionOptions): UseToolActionReturn;
164
164
  export type { ActionRequest, ActionResult };
165
- //# sourceMappingURL=useAction.d.ts.map
@@ -0,0 +1,118 @@
1
+ /**
2
+ * useAutocomplete Hook
3
+ * Provides autocomplete functionality for form fields
4
+ *
5
+ * Sprint Autocomplete Feature
6
+ */
7
+ import { Accessor } from 'solid-js';
8
+ import type { AutocompleteOption, AutocompleteContext, FieldAutocompleteConfig } from "../types.cjs";
9
+ /**
10
+ * Options for the useAutocomplete hook
11
+ */
12
+ export interface UseAutocompleteOptions {
13
+ /**
14
+ * Current input value accessor
15
+ */
16
+ inputValue: Accessor<string>;
17
+ /**
18
+ * Plugin ID to use (overrides default)
19
+ */
20
+ pluginId?: string;
21
+ /**
22
+ * Field configuration
23
+ */
24
+ fieldConfig?: FieldAutocompleteConfig;
25
+ /**
26
+ * Context data for suggestions
27
+ */
28
+ context?: Accessor<AutocompleteContext>;
29
+ /**
30
+ * Whether autocomplete is enabled
31
+ */
32
+ enabled?: boolean;
33
+ /**
34
+ * Callback when input value should change (for accepting suggestions)
35
+ */
36
+ onInputChange?: (value: string) => void;
37
+ /**
38
+ * Minimum characters before triggering
39
+ */
40
+ minChars?: number;
41
+ /**
42
+ * Debounce delay in ms
43
+ */
44
+ debounceMs?: number;
45
+ }
46
+ /**
47
+ * Return type for the useAutocomplete hook
48
+ */
49
+ export interface UseAutocompleteReturn {
50
+ /**
51
+ * Current completion text (for ghost text, LLM mode)
52
+ */
53
+ completion: Accessor<string | null>;
54
+ /**
55
+ * Ghost text to show (remaining text after input)
56
+ */
57
+ ghostText: Accessor<string>;
58
+ /**
59
+ * Accept the current completion
60
+ */
61
+ acceptCompletion: () => void;
62
+ /**
63
+ * Current options (for dropdown, data mode)
64
+ */
65
+ options: Accessor<AutocompleteOption[]>;
66
+ /**
67
+ * Currently selected option index
68
+ */
69
+ selectedIndex: Accessor<number>;
70
+ /**
71
+ * Select an option by index
72
+ */
73
+ selectOption: (option: AutocompleteOption) => void;
74
+ /**
75
+ * Navigate to next option
76
+ */
77
+ nextOption: () => void;
78
+ /**
79
+ * Navigate to previous option
80
+ */
81
+ prevOption: () => void;
82
+ /**
83
+ * Select current highlighted option
84
+ */
85
+ selectCurrentOption: () => void;
86
+ /**
87
+ * Whether suggestions are loading
88
+ */
89
+ isLoading: Accessor<boolean>;
90
+ /**
91
+ * Error message if any
92
+ */
93
+ error: Accessor<string | null>;
94
+ /**
95
+ * Dismiss suggestions
96
+ */
97
+ dismiss: () => void;
98
+ /**
99
+ * Whether suggestions are visible
100
+ */
101
+ isOpen: Accessor<boolean>;
102
+ /**
103
+ * Result type ('completion' or 'options')
104
+ */
105
+ resultType: Accessor<'completion' | 'options' | null>;
106
+ /**
107
+ * Open/show suggestions
108
+ */
109
+ open: () => void;
110
+ /**
111
+ * Handle keyboard events
112
+ */
113
+ handleKeyDown: (e: KeyboardEvent) => boolean;
114
+ }
115
+ /**
116
+ * Hook for autocomplete functionality
117
+ */
118
+ export declare function useAutocomplete(options: UseAutocompleteOptions): UseAutocompleteReturn;
@@ -5,7 +5,7 @@
5
5
  * Sprint Autocomplete Feature
6
6
  */
7
7
  import { Accessor } from 'solid-js';
8
- import type { AutocompleteOption, AutocompleteContext, FieldAutocompleteConfig } from '../types';
8
+ import type { AutocompleteOption, AutocompleteContext, FieldAutocompleteConfig } from "../types.js";
9
9
  /**
10
10
  * Options for the useAutocomplete hook
11
11
  */
@@ -116,4 +116,3 @@ export interface UseAutocompleteReturn {
116
116
  * Hook for autocomplete functionality
117
117
  */
118
118
  export declare function useAutocomplete(options: UseAutocompleteOptions): UseAutocompleteReturn;
119
- //# sourceMappingURL=useAutocomplete.d.ts.map
@@ -0,0 +1,55 @@
1
+ /**
2
+ * useChatBus — SolidJS hook + context provider for the Chat Bus
3
+ * v2.4.0: Event-driven chat toolkit
4
+ *
5
+ * @experimental — This API may change without major bump until v2.5.0.
6
+ */
7
+ import { type ParentComponent } from 'solid-js';
8
+ import type { ChatBus } from "../types/chat-bus.cjs";
9
+ /**
10
+ * @experimental
11
+ * Provider that creates and shares a ChatBus with all children.
12
+ * Cleans up all listeners on unmount.
13
+ *
14
+ * @example
15
+ * <ChatBusProvider>
16
+ * <ChatInterfaceStreaming />
17
+ * <BriefingPanel />
18
+ * <AgentRouter />
19
+ * </ChatBusProvider>
20
+ */
21
+ export declare const ChatBusProvider: ParentComponent<{
22
+ bus?: ChatBus;
23
+ }>;
24
+ /**
25
+ * @experimental
26
+ * Access the ChatBus from any child component.
27
+ * Must be used within a `<ChatBusProvider>`.
28
+ *
29
+ * @example
30
+ * function BriefingPanel() {
31
+ * const bus = useChatBus()
32
+ *
33
+ * bus.events.on('onBriefing', (event) => {
34
+ * addBriefing(event.briefing)
35
+ * })
36
+ *
37
+ * return <div>...</div>
38
+ * }
39
+ *
40
+ * @example
41
+ * function AgentRouter() {
42
+ * const bus = useChatBus()
43
+ *
44
+ * bus.events.on('onStreamEnd', (event) => {
45
+ * if (event.metadata.needs_clarification) {
46
+ * bus.commands.exec('showChatPrompt', {
47
+ * type: 'choice',
48
+ * title: 'Quelle periode ?',
49
+ * config: { options: [...] }
50
+ * })
51
+ * }
52
+ * })
53
+ * }
54
+ */
55
+ export declare function useChatBus(): ChatBus;
@@ -5,7 +5,7 @@
5
5
  * @experimental — This API may change without major bump until v2.5.0.
6
6
  */
7
7
  import { type ParentComponent } from 'solid-js';
8
- import type { ChatBus } from '../types/chat-bus';
8
+ import type { ChatBus } from "../types/chat-bus.js";
9
9
  /**
10
10
  * @experimental
11
11
  * Provider that creates and shares a ChatBus with all children.
@@ -53,4 +53,3 @@ export declare const ChatBusProvider: ParentComponent<{
53
53
  * }
54
54
  */
55
55
  export declare function useChatBus(): ChatBus;
56
- //# sourceMappingURL=useChatBus.d.ts.map
@@ -0,0 +1,34 @@
1
+ /**
2
+ * useConditionalField - Evaluates showWhen conditions for form fields
3
+ * Sprint 2: Form Advanced
4
+ */
5
+ import { Accessor } from 'solid-js';
6
+ import type { ShowWhenCondition } from "../types.cjs";
7
+ export interface UseConditionalFieldOptions {
8
+ condition?: ShowWhenCondition;
9
+ formData: Accessor<Record<string, any>>;
10
+ }
11
+ /**
12
+ * Evaluates a showWhen condition against form data
13
+ */
14
+ export declare function evaluateCondition(condition: ShowWhenCondition, formData: Record<string, any>): boolean;
15
+ /**
16
+ * Hook for conditional field visibility
17
+ *
18
+ * @example
19
+ * ```tsx
20
+ * const { isVisible } = useConditionalField({
21
+ * condition: field.showWhen,
22
+ * formData: formDataAccessor
23
+ * })
24
+ *
25
+ * return (
26
+ * <Show when={isVisible()}>
27
+ * <input ... />
28
+ * </Show>
29
+ * )
30
+ * ```
31
+ */
32
+ export declare function useConditionalField(options: UseConditionalFieldOptions): {
33
+ isVisible: Accessor<boolean>;
34
+ };
@@ -3,7 +3,7 @@
3
3
  * Sprint 2: Form Advanced
4
4
  */
5
5
  import { Accessor } from 'solid-js';
6
- import type { ShowWhenCondition } from '../types';
6
+ import type { ShowWhenCondition } from "../types.js";
7
7
  export interface UseConditionalFieldOptions {
8
8
  condition?: ShowWhenCondition;
9
9
  formData: Accessor<Record<string, any>>;
@@ -32,4 +32,3 @@ export declare function evaluateCondition(condition: ShowWhenCondition, formData
32
32
  export declare function useConditionalField(options: UseConditionalFieldOptions): {
33
33
  isVisible: Accessor<boolean>;
34
34
  };
35
- //# sourceMappingURL=useConditionalField.d.ts.map
@@ -0,0 +1,41 @@
1
+ /**
2
+ * useDataValidator — reactive SolidJS hook for data validation
3
+ * v3.1.0: Wraps validateAgainstSource in a reactive memo
4
+ *
5
+ * @experimental
6
+ */
7
+ import type { DataValidation, DataValidationOptions } from "../types/chat-bus.cjs";
8
+ export interface UseDataValidatorOptions extends DataValidationOptions {
9
+ /** Disable validation (returns null) */
10
+ enabled?: boolean;
11
+ }
12
+ export interface UseDataValidatorReturn {
13
+ /** Reactive validation result (null if disabled or no text) */
14
+ validation: () => DataValidation | null;
15
+ /** Is the text valid (no hallucinations)? */
16
+ valid: () => boolean;
17
+ /** Confidence score 0-1 */
18
+ confidence: () => number;
19
+ /** Count of hallucinated numbers */
20
+ hallucinatedCount: () => number;
21
+ }
22
+ /**
23
+ * Reactive hook that validates LLM text against source data rows.
24
+ * Re-validates automatically when text or rows change.
25
+ *
26
+ * @example
27
+ * ```tsx
28
+ * const { validation, valid, confidence } = useDataValidator(
29
+ * () => llmResponse(),
30
+ * () => sourceRows(),
31
+ * { tolerance: 0.02, ignoreColumns: ['code_geo'] }
32
+ * )
33
+ *
34
+ * return (
35
+ * <Show when={!valid()}>
36
+ * <span>⚠️ {validation()!.hallucinated.length} unverified numbers</span>
37
+ * </Show>
38
+ * )
39
+ * ```
40
+ */
41
+ export declare function useDataValidator(text: () => string, sourceRows: () => Record<string, unknown>[], options?: UseDataValidatorOptions): UseDataValidatorReturn;
@@ -4,7 +4,7 @@
4
4
  *
5
5
  * @experimental
6
6
  */
7
- import type { DataValidation, DataValidationOptions } from '../types/chat-bus';
7
+ import type { DataValidation, DataValidationOptions } from "../types/chat-bus.js";
8
8
  export interface UseDataValidatorOptions extends DataValidationOptions {
9
9
  /** Disable validation (returns null) */
10
10
  enabled?: boolean;
@@ -39,4 +39,3 @@ export interface UseDataValidatorReturn {
39
39
  * ```
40
40
  */
41
41
  export declare function useDataValidator(text: () => string, sourceRows: () => Record<string, unknown>[], options?: UseDataValidatorOptions): UseDataValidatorReturn;
42
- //# sourceMappingURL=useDataValidator.d.ts.map