@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
@@ -0,0 +1,62 @@
1
+ /**
2
+ * MCP UI Solid - Components
3
+ *
4
+ * SolidJS components for rendering MCP-generated UI resources
5
+ */
6
+ export { UIResourceRenderer } from "./UIResourceRenderer.cjs";
7
+ export type { UIResourceRendererProps } from "./UIResourceRenderer.cjs";
8
+ export { StreamingUIRenderer } from "./StreamingUIRenderer.cjs";
9
+ export type { StreamingUIRendererProps } from "./StreamingUIRenderer.cjs";
10
+ export { PresentationFeedback, DEFAULT_PRESENTATION_FEEDBACK_LABELS, } from "./PresentationFeedback.cjs";
11
+ export type { PresentationFeedbackProps, PresentationFeedbackLabels, } from "./PresentationFeedback.cjs";
12
+ export { GenerativeUIErrorBoundary } from "./GenerativeUIErrorBoundary.cjs";
13
+ export type { GenerativeUIErrorBoundaryProps } from "./GenerativeUIErrorBoundary.cjs";
14
+ export { FooterRenderer } from "./FooterRenderer.cjs";
15
+ export type { FooterComponentParams } from "./FooterRenderer.cjs";
16
+ export { ActionRenderer } from "./ActionRenderer.cjs";
17
+ export type { ActionRendererProps } from "./ActionRenderer.cjs";
18
+ export { ArtifactRenderer } from "./ArtifactRenderer.cjs";
19
+ export type { ArtifactComponentParams } from "./ArtifactRenderer.cjs";
20
+ export { CarouselRenderer } from "./CarouselRenderer.cjs";
21
+ export type { CarouselRendererProps } from "./CarouselRenderer.cjs";
22
+ export { GridRenderer } from "./GridRenderer.cjs";
23
+ export type { GridRendererProps, GridComponentParams } from "./GridRenderer.cjs";
24
+ export { FormRenderer } from "./FormRenderer.cjs";
25
+ export type { FormRendererProps } from "./FormRenderer.cjs";
26
+ export { FormFieldRenderer } from "./FormFieldRenderer.cjs";
27
+ export type { FormFieldRendererProps } from "./FormFieldRenderer.cjs";
28
+ export { ModalRenderer } from "./ModalRenderer.cjs";
29
+ export type { ModalRendererProps } from "./ModalRenderer.cjs";
30
+ export { ActionGroupRenderer } from "./ActionGroupRenderer.cjs";
31
+ export type { ActionGroupRendererProps } from "./ActionGroupRenderer.cjs";
32
+ export { ChartJSRenderer, isChartJSAvailable } from "./ChartJSRenderer.cjs";
33
+ export type { ChartJSRendererProps } from "./ChartJSRenderer.cjs";
34
+ export { LightboxOverlay } from "./LightboxOverlay.cjs";
35
+ export type { LightboxOverlayProps } from "./LightboxOverlay.cjs";
36
+ export { ImageGalleryRenderer } from "./ImageGalleryRenderer.cjs";
37
+ export type { ImageGalleryRendererProps } from "./ImageGalleryRenderer.cjs";
38
+ export { VideoRenderer, isSupportedVideoUrl, getVideoProvider } from "./VideoRenderer.cjs";
39
+ export type { VideoRendererProps } from "./VideoRenderer.cjs";
40
+ export { CodeBlockRenderer } from "./CodeBlockRenderer.cjs";
41
+ export type { CodeBlockRendererProps } from "./CodeBlockRenderer.cjs";
42
+ export { MapRenderer } from "./MapRenderer.cjs";
43
+ export type { MapRendererProps } from "./MapRenderer.cjs";
44
+ export { AgentCard, AgentStatusBadge } from "./AgentCard.cjs";
45
+ export type { AgentCardProps, AgentStatusBadgeProps } from "./AgentCard.cjs";
46
+ export { SplitStepper } from "./SplitStepper.cjs";
47
+ export type { SplitStepperProps } from "./SplitStepper.cjs";
48
+ export { AgentHandoff } from "./AgentHandoff.cjs";
49
+ export type { AgentHandoffProps } from "./AgentHandoff.cjs";
50
+ export { BriefingDiff } from "./BriefingDiff.cjs";
51
+ export type { BriefingDiffProps } from "./BriefingDiff.cjs";
52
+ export { VerifiedText } from "./VerifiedText.cjs";
53
+ export type { VerifiedTextProps } from "./VerifiedText.cjs";
54
+ export { DataPreviewSection } from "./DataPreviewSection.cjs";
55
+ export type { DataPreviewSectionProps } from "./DataPreviewSection.cjs";
56
+ export { RenderContext, RenderProvider, useRenderContext } from "./RenderContext.cjs";
57
+ export type { RenderContextValue, RenderComponentFn } from "./RenderContext.cjs";
58
+ export { ElicitationForm } from "./ElicitationForm.cjs";
59
+ export type { ElicitationFormProps } from "./ElicitationForm.cjs";
60
+ export { PortalDropdownMenu } from "./PortalDropdownMenu.cjs";
61
+ export type { PortalDropdownMenuProps } from "./PortalDropdownMenu.cjs";
62
+ export { UIResourceRenderer as default } from "./UIResourceRenderer.cjs";
@@ -3,61 +3,60 @@
3
3
  *
4
4
  * SolidJS components for rendering MCP-generated UI resources
5
5
  */
6
- export { UIResourceRenderer } from './UIResourceRenderer';
7
- export type { UIResourceRendererProps } from './UIResourceRenderer';
8
- export { StreamingUIRenderer } from './StreamingUIRenderer';
9
- export type { StreamingUIRendererProps } from './StreamingUIRenderer';
10
- export { PresentationFeedback, DEFAULT_PRESENTATION_FEEDBACK_LABELS, } from './PresentationFeedback';
11
- export type { PresentationFeedbackProps, PresentationFeedbackLabels, } from './PresentationFeedback';
12
- export { GenerativeUIErrorBoundary } from './GenerativeUIErrorBoundary';
13
- export type { GenerativeUIErrorBoundaryProps } from './GenerativeUIErrorBoundary';
14
- export { FooterRenderer } from './FooterRenderer';
15
- export type { FooterComponentParams } from './FooterRenderer';
16
- export { ActionRenderer } from './ActionRenderer';
17
- export type { ActionRendererProps } from './ActionRenderer';
18
- export { ArtifactRenderer } from './ArtifactRenderer';
19
- export type { ArtifactComponentParams } from './ArtifactRenderer';
20
- export { CarouselRenderer } from './CarouselRenderer';
21
- export type { CarouselRendererProps } from './CarouselRenderer';
22
- export { GridRenderer } from './GridRenderer';
23
- export type { GridRendererProps, GridComponentParams } from './GridRenderer';
24
- export { FormRenderer } from './FormRenderer';
25
- export type { FormRendererProps } from './FormRenderer';
26
- export { FormFieldRenderer } from './FormFieldRenderer';
27
- export type { FormFieldRendererProps } from './FormFieldRenderer';
28
- export { ModalRenderer } from './ModalRenderer';
29
- export type { ModalRendererProps } from './ModalRenderer';
30
- export { ActionGroupRenderer } from './ActionGroupRenderer';
31
- export type { ActionGroupRendererProps } from './ActionGroupRenderer';
32
- export { ChartJSRenderer, isChartJSAvailable } from './ChartJSRenderer';
33
- export type { ChartJSRendererProps } from './ChartJSRenderer';
34
- export { LightboxOverlay } from './LightboxOverlay';
35
- export type { LightboxOverlayProps } from './LightboxOverlay';
36
- export { ImageGalleryRenderer } from './ImageGalleryRenderer';
37
- export type { ImageGalleryRendererProps } from './ImageGalleryRenderer';
38
- export { VideoRenderer, isSupportedVideoUrl, getVideoProvider } from './VideoRenderer';
39
- export type { VideoRendererProps } from './VideoRenderer';
40
- export { CodeBlockRenderer } from './CodeBlockRenderer';
41
- export type { CodeBlockRendererProps } from './CodeBlockRenderer';
42
- export { MapRenderer } from './MapRenderer';
43
- export type { MapRendererProps } from './MapRenderer';
44
- export { AgentCard, AgentStatusBadge } from './AgentCard';
45
- export type { AgentCardProps, AgentStatusBadgeProps } from './AgentCard';
46
- export { SplitStepper } from './SplitStepper';
47
- export type { SplitStepperProps } from './SplitStepper';
48
- export { AgentHandoff } from './AgentHandoff';
49
- export type { AgentHandoffProps } from './AgentHandoff';
50
- export { BriefingDiff } from './BriefingDiff';
51
- export type { BriefingDiffProps } from './BriefingDiff';
52
- export { VerifiedText } from './VerifiedText';
53
- export type { VerifiedTextProps } from './VerifiedText';
54
- export { DataPreviewSection } from './DataPreviewSection';
55
- export type { DataPreviewSectionProps } from './DataPreviewSection';
56
- export { RenderContext, RenderProvider, useRenderContext } from './RenderContext';
57
- export type { RenderContextValue, RenderComponentFn } from './RenderContext';
58
- export { ElicitationForm } from './ElicitationForm';
59
- export type { ElicitationFormProps } from './ElicitationForm';
60
- export { PortalDropdownMenu } from './PortalDropdownMenu';
61
- export type { PortalDropdownMenuProps } from './PortalDropdownMenu';
62
- export { UIResourceRenderer as default } from './UIResourceRenderer';
63
- //# sourceMappingURL=index.d.ts.map
6
+ export { UIResourceRenderer } from "./UIResourceRenderer.js";
7
+ export type { UIResourceRendererProps } from "./UIResourceRenderer.js";
8
+ export { StreamingUIRenderer } from "./StreamingUIRenderer.js";
9
+ export type { StreamingUIRendererProps } from "./StreamingUIRenderer.js";
10
+ export { PresentationFeedback, DEFAULT_PRESENTATION_FEEDBACK_LABELS, } from "./PresentationFeedback.js";
11
+ export type { PresentationFeedbackProps, PresentationFeedbackLabels, } from "./PresentationFeedback.js";
12
+ export { GenerativeUIErrorBoundary } from "./GenerativeUIErrorBoundary.js";
13
+ export type { GenerativeUIErrorBoundaryProps } from "./GenerativeUIErrorBoundary.js";
14
+ export { FooterRenderer } from "./FooterRenderer.js";
15
+ export type { FooterComponentParams } from "./FooterRenderer.js";
16
+ export { ActionRenderer } from "./ActionRenderer.js";
17
+ export type { ActionRendererProps } from "./ActionRenderer.js";
18
+ export { ArtifactRenderer } from "./ArtifactRenderer.js";
19
+ export type { ArtifactComponentParams } from "./ArtifactRenderer.js";
20
+ export { CarouselRenderer } from "./CarouselRenderer.js";
21
+ export type { CarouselRendererProps } from "./CarouselRenderer.js";
22
+ export { GridRenderer } from "./GridRenderer.js";
23
+ export type { GridRendererProps, GridComponentParams } from "./GridRenderer.js";
24
+ export { FormRenderer } from "./FormRenderer.js";
25
+ export type { FormRendererProps } from "./FormRenderer.js";
26
+ export { FormFieldRenderer } from "./FormFieldRenderer.js";
27
+ export type { FormFieldRendererProps } from "./FormFieldRenderer.js";
28
+ export { ModalRenderer } from "./ModalRenderer.js";
29
+ export type { ModalRendererProps } from "./ModalRenderer.js";
30
+ export { ActionGroupRenderer } from "./ActionGroupRenderer.js";
31
+ export type { ActionGroupRendererProps } from "./ActionGroupRenderer.js";
32
+ export { ChartJSRenderer, isChartJSAvailable } from "./ChartJSRenderer.js";
33
+ export type { ChartJSRendererProps } from "./ChartJSRenderer.js";
34
+ export { LightboxOverlay } from "./LightboxOverlay.js";
35
+ export type { LightboxOverlayProps } from "./LightboxOverlay.js";
36
+ export { ImageGalleryRenderer } from "./ImageGalleryRenderer.js";
37
+ export type { ImageGalleryRendererProps } from "./ImageGalleryRenderer.js";
38
+ export { VideoRenderer, isSupportedVideoUrl, getVideoProvider } from "./VideoRenderer.js";
39
+ export type { VideoRendererProps } from "./VideoRenderer.js";
40
+ export { CodeBlockRenderer } from "./CodeBlockRenderer.js";
41
+ export type { CodeBlockRendererProps } from "./CodeBlockRenderer.js";
42
+ export { MapRenderer } from "./MapRenderer.js";
43
+ export type { MapRendererProps } from "./MapRenderer.js";
44
+ export { AgentCard, AgentStatusBadge } from "./AgentCard.js";
45
+ export type { AgentCardProps, AgentStatusBadgeProps } from "./AgentCard.js";
46
+ export { SplitStepper } from "./SplitStepper.js";
47
+ export type { SplitStepperProps } from "./SplitStepper.js";
48
+ export { AgentHandoff } from "./AgentHandoff.js";
49
+ export type { AgentHandoffProps } from "./AgentHandoff.js";
50
+ export { BriefingDiff } from "./BriefingDiff.js";
51
+ export type { BriefingDiffProps } from "./BriefingDiff.js";
52
+ export { VerifiedText } from "./VerifiedText.js";
53
+ export type { VerifiedTextProps } from "./VerifiedText.js";
54
+ export { DataPreviewSection } from "./DataPreviewSection.js";
55
+ export type { DataPreviewSectionProps } from "./DataPreviewSection.js";
56
+ export { RenderContext, RenderProvider, useRenderContext } from "./RenderContext.js";
57
+ export type { RenderContextValue, RenderComponentFn } from "./RenderContext.js";
58
+ export { ElicitationForm } from "./ElicitationForm.js";
59
+ export type { ElicitationFormProps } from "./ElicitationForm.js";
60
+ export { PortalDropdownMenu } from "./PortalDropdownMenu.js";
61
+ export type { PortalDropdownMenuProps } from "./PortalDropdownMenu.js";
62
+ export { UIResourceRenderer as default } from "./UIResourceRenderer.js";
@@ -1,2 +1,2 @@
1
- export * from './components/index';
2
- export { default } from './components/index';
1
+ export * from "./components/index.cjs";
2
+ export { default } from "./components/index.cjs";
@@ -1,2 +1,2 @@
1
- export * from './components/index';
2
- export { default } from './components/index';
1
+ export * from "./components/index.js";
2
+ export { default } from "./components/index.js";
@@ -0,0 +1,76 @@
1
+ /**
2
+ * AutocompleteContext - Context provider for autocomplete functionality
3
+ * Manages plugins and provides unified autocomplete API
4
+ *
5
+ * Sprint Autocomplete Feature
6
+ */
7
+ import { ParentComponent, Accessor } from 'solid-js';
8
+ import type { AutocompletePlugin, AutocompleteResult, AutocompleteContext as AutocompleteContextData, AutocompleteProviderConfig } from "../types.cjs";
9
+ /**
10
+ * Context value interface
11
+ */
12
+ export interface AutocompleteContextValue {
13
+ /**
14
+ * Get suggestions from a plugin
15
+ */
16
+ getSuggestions: (input: string, pluginId?: string, context?: AutocompleteContextData) => Promise<AutocompleteResult>;
17
+ /**
18
+ * Get registered plugins
19
+ */
20
+ plugins: Accessor<AutocompletePlugin[]>;
21
+ /**
22
+ * Get default plugin ID
23
+ */
24
+ defaultPluginId: Accessor<string | undefined>;
25
+ /**
26
+ * Check if a plugin is ready
27
+ */
28
+ isPluginReady: (pluginId: string) => boolean;
29
+ /**
30
+ * Get plugin by ID
31
+ */
32
+ getPlugin: (pluginId: string) => AutocompletePlugin | undefined;
33
+ /**
34
+ * Register a new plugin
35
+ */
36
+ registerPlugin: (plugin: AutocompletePlugin) => void;
37
+ /**
38
+ * Unregister a plugin
39
+ */
40
+ unregisterPlugin: (pluginId: string) => void;
41
+ /**
42
+ * Clear cache
43
+ */
44
+ clearCache: () => void;
45
+ /**
46
+ * Global config
47
+ */
48
+ config: {
49
+ debounceMs: number;
50
+ minChars: number;
51
+ cacheTtl: number;
52
+ cacheEnabled: boolean;
53
+ };
54
+ }
55
+ declare const AutocompleteCtx: import("solid-js").Context<AutocompleteContextValue | undefined>;
56
+ /**
57
+ * Props for AutocompleteProvider
58
+ */
59
+ export interface AutocompleteProviderProps extends AutocompleteProviderConfig {
60
+ children: any;
61
+ }
62
+ /**
63
+ * AutocompleteProvider Component
64
+ * Provides autocomplete context to child components
65
+ */
66
+ export declare const AutocompleteProvider: ParentComponent<AutocompleteProviderProps>;
67
+ /**
68
+ * Hook to use autocomplete context
69
+ * @throws Error if used outside provider
70
+ */
71
+ export declare function useAutocompleteContext(): AutocompleteContextValue;
72
+ /**
73
+ * Safe hook that returns undefined if outside provider
74
+ */
75
+ export declare function useAutocompleteContextSafe(): AutocompleteContextValue | undefined;
76
+ export { AutocompleteCtx };
@@ -5,7 +5,7 @@
5
5
  * Sprint Autocomplete Feature
6
6
  */
7
7
  import { ParentComponent, Accessor } from 'solid-js';
8
- import type { AutocompletePlugin, AutocompleteResult, AutocompleteContext as AutocompleteContextData, AutocompleteProviderConfig } from '../types';
8
+ import type { AutocompletePlugin, AutocompleteResult, AutocompleteContext as AutocompleteContextData, AutocompleteProviderConfig } from "../types.js";
9
9
  /**
10
10
  * Context value interface
11
11
  */
@@ -74,4 +74,3 @@ export declare function useAutocompleteContext(): AutocompleteContextValue;
74
74
  */
75
75
  export declare function useAutocompleteContextSafe(): AutocompleteContextValue | undefined;
76
76
  export { AutocompleteCtx };
77
- //# sourceMappingURL=AutocompleteContext.d.ts.map
@@ -0,0 +1,169 @@
1
+ /**
2
+ * MCPActionContext - Context provider for MCP action execution
3
+ * Phase 5.0: Quick Wins - Replaces CustomEvent with typed context for Mastra integration
4
+ */
5
+ import { ParentComponent, Accessor } from 'solid-js';
6
+ /**
7
+ * Action request payload
8
+ */
9
+ export interface ActionRequest {
10
+ /**
11
+ * MCP tool name to execute. For a `submit` action with no associated
12
+ * tool, renderers pass the sentinel `'submit'` — branch on `action`,
13
+ * not on `toolName`, to tell a submit apart from a tool call.
14
+ */
15
+ toolName: string;
16
+ /**
17
+ * Tool parameters
18
+ */
19
+ params?: Record<string, any>;
20
+ /**
21
+ * Optional space IDs for multi-space context
22
+ */
23
+ spaceIds?: string[];
24
+ /**
25
+ * Optional macro ID for template execution
26
+ */
27
+ macroId?: string;
28
+ /**
29
+ * Action kind (v6.6.1). Lets a host `executor` tell a tool call apart
30
+ * from a form-style `submit`. Absent ⇒ treat as `'tool-call'` (backward
31
+ * compatible — every pre-v6.6.1 request omits it).
32
+ *
33
+ * A `submit` action carries its payload in `params` (e.g. `submit_url`,
34
+ * `connector_id`, `feedback_value`) and **must NOT** be executed as a
35
+ * tool call — the host routes it (e.g. POST to `params.submit_url`).
36
+ */
37
+ action?: 'tool-call' | 'submit' | 'link';
38
+ }
39
+ /**
40
+ * Action result from execution
41
+ */
42
+ export interface ActionResult {
43
+ /**
44
+ * Whether the action was successful
45
+ */
46
+ success: boolean;
47
+ /**
48
+ * Result data (if successful)
49
+ */
50
+ data?: any;
51
+ /**
52
+ * Error message (if failed)
53
+ */
54
+ error?: string;
55
+ /**
56
+ * Execution timestamp
57
+ */
58
+ timestamp: string;
59
+ /**
60
+ * Tool that was executed
61
+ */
62
+ toolName: string;
63
+ }
64
+ /**
65
+ * Context value interface
66
+ */
67
+ export interface MCPActionContextValue {
68
+ /**
69
+ * Execute an MCP action
70
+ */
71
+ executeAction: (request: ActionRequest) => Promise<ActionResult>;
72
+ /**
73
+ * Currently available tools (from MCP server)
74
+ */
75
+ availableTools: Accessor<string[]>;
76
+ /**
77
+ * Space IDs in current context
78
+ */
79
+ spaceIds: Accessor<string[]>;
80
+ /**
81
+ * Current macro ID (if executing within a template)
82
+ */
83
+ macroId: Accessor<string | undefined>;
84
+ /**
85
+ * Whether an action is currently executing
86
+ */
87
+ isExecuting: Accessor<boolean>;
88
+ /**
89
+ * Last action result
90
+ */
91
+ lastResult: Accessor<ActionResult | undefined>;
92
+ }
93
+ /**
94
+ * Props for MCPActionProvider
95
+ */
96
+ export interface MCPActionProviderProps {
97
+ /**
98
+ * Space IDs for multi-space queries
99
+ */
100
+ spaceIds?: string[];
101
+ /**
102
+ * Macro ID when executing within a template
103
+ */
104
+ macroId?: string;
105
+ /**
106
+ * Available MCP tools
107
+ */
108
+ availableTools?: string[];
109
+ /**
110
+ * Callback for action execution (for audit logging)
111
+ */
112
+ onAction?: (request: ActionRequest, result: ActionResult) => void;
113
+ /**
114
+ * Callback for webhook events (n8n, Zapier integration)
115
+ */
116
+ onWebhook?: (event: {
117
+ type: string;
118
+ payload: any;
119
+ }) => void;
120
+ /**
121
+ * Custom action executor (override default)
122
+ */
123
+ executor?: (request: ActionRequest) => Promise<ActionResult>;
124
+ }
125
+ declare const MCPActionContext: import("solid-js").Context<MCPActionContextValue | undefined>;
126
+ /**
127
+ * MCPActionProvider - Provides action execution context to child components
128
+ *
129
+ * @example
130
+ * ```tsx
131
+ * <MCPActionProvider
132
+ * spaceIds={['space-123']}
133
+ * macroId="sales_overview"
134
+ * onAction={(req, res) => audit(req, res)}
135
+ * >
136
+ * <UIResourceRenderer layout={layout} />
137
+ * </MCPActionProvider>
138
+ * ```
139
+ */
140
+ export declare const MCPActionProvider: ParentComponent<MCPActionProviderProps>;
141
+ /**
142
+ * Hook to access MCP action context
143
+ * Throws if used outside of MCPActionProvider
144
+ *
145
+ * @example
146
+ * ```tsx
147
+ * const { executeAction, isExecuting } = useMCPAction()
148
+ *
149
+ * const handleClick = async () => {
150
+ * const result = await executeAction({
151
+ * toolName: 'search.hub',
152
+ * params: { query: 'revenue Q4' },
153
+ * })
154
+ * }
155
+ * ```
156
+ */
157
+ export declare function useMCPAction(): MCPActionContextValue;
158
+ /**
159
+ * Hook to access MCP action context with fallback for components
160
+ * outside of provider (uses CustomEvent fallback)
161
+ *
162
+ * @example
163
+ * ```tsx
164
+ * const { executeAction, isExecuting } = useMCPActionSafe()
165
+ * // Works even without MCPActionProvider
166
+ * ```
167
+ */
168
+ export declare function useMCPActionSafe(): MCPActionContextValue;
169
+ export { MCPActionContext };
@@ -167,4 +167,3 @@ export declare function useMCPAction(): MCPActionContextValue;
167
167
  */
168
168
  export declare function useMCPActionSafe(): MCPActionContextValue;
169
169
  export { MCPActionContext };
170
- //# sourceMappingURL=MCPActionContext.d.ts.map
@@ -0,0 +1,201 @@
1
+ /**
2
+ * MCPUIConfigContext — host-level rendering policy: the library's iframes
3
+ * (v6.21.0) and, since v6.22.0, where a chart may capture the wheel.
4
+ *
5
+ * @since v6.21.0
6
+ *
7
+ * ## Why
8
+ *
9
+ * A host that serves `Cross-Origin-Embedder-Policy: credentialless` makes the
10
+ * browser refuse every cross-origin iframe whose own document does not send a
11
+ * COEP header — which is YouTube, Vimeo, Google Docs, Notion and nearly all of
12
+ * `DEFAULT_IFRAME_DOMAINS`. The escape hatch is the boolean HTML attribute
13
+ * `credentialless` on the `<iframe>` itself: the document then loads, but
14
+ * without access to the cookies and storage of its own origin.
15
+ *
16
+ * That trade-off is free for a public video or chart and fatal for an
17
+ * authenticated embed, so the library keys it on the distinction it already
18
+ * makes: `TRUSTED_IFRAME_DOMAINS` (the hosts that receive `allow-same-origin`
19
+ * because they need their own cookies) do NOT get the attribute; everything
20
+ * else does. This context lets a host override that, add its own trusted
21
+ * hosts, and control the "open in a new tab" fallback link.
22
+ *
23
+ * ## Scope — policy only, NOT strings
24
+ *
25
+ * Text lives in `MCPUIStrings` (`MCPUIStringsContext`). This context carries
26
+ * only behavioural switches, and like the strings context every renderer works
27
+ * standalone: with no provider mounted, `DEFAULT_MCPUI_CONFIG` applies.
28
+ *
29
+ * @example
30
+ * ```tsx
31
+ * import { MCPUIConfigProvider } from '@seed-ship/mcp-ui-solid'
32
+ *
33
+ * <MCPUIConfigProvider config={{ customTrustedIframeDomains: ['embed.acme.com'] }}>
34
+ * <App />
35
+ * </MCPUIConfigProvider>
36
+ * ```
37
+ */
38
+ import { type JSX } from 'solid-js';
39
+ import type { IframePolicy } from "../types.cjs";
40
+ /**
41
+ * Host-level rendering policy. Every field has a default — a provider passes
42
+ * a partial override.
43
+ *
44
+ * ## Two names, because there are two jobs
45
+ *
46
+ * This type grows a key every time the library gains a policy switch, and
47
+ * those releases are MINOR — so neither AUTHORING a config nor READING one
48
+ * may break when a key appears. Those two demands pull in opposite
49
+ * directions, and one name cannot serve both:
50
+ *
51
+ * - an author must be allowed to omit the new key, so the fields they write
52
+ * have to be OPTIONAL;
53
+ * - a reader assigning `const p: IframePolicy = config.iframePolicy` must not
54
+ * suddenly face `undefined`, so the fields they read have to be REQUIRED.
55
+ *
56
+ * Hence {@link MCPUIConfigInput} (what a host writes — every field optional)
57
+ * and {@link MCPUIConfig} (what the library hands back — every field
58
+ * resolved). `MCPUIConfig` is derived from the input type, so the two can
59
+ * never drift and a key is declared exactly once.
60
+ *
61
+ * Which one you name depends on the surface:
62
+ *
63
+ * - `<MCPUIConfigProvider config={…}>` takes `MCPUIConfigInput` — name that
64
+ * type for a partial you build, and it merges the rest;
65
+ * - `<MCPUIConfigContext.Provider value={…}>` takes the RESOLVED
66
+ * `MCPUIConfig`, because that context is read as well as written, so a
67
+ * direct provider hands over `{ ...DEFAULT_MCPUI_CONFIG, ...mine }`;
68
+ * - anything you RECEIVE is `MCPUIConfig`, which is what
69
+ * {@link useMCPUIConfig} returns.
70
+ */
71
+ export interface MCPUIConfigInput {
72
+ /**
73
+ * When the library puts the boolean `credentialless` attribute on an
74
+ * `<iframe>` it renders.
75
+ *
76
+ * - `'auto'` (default) — on every iframe whose host is NOT in
77
+ * `TRUSTED_IFRAME_DOMAINS` (plus `customTrustedIframeDomains`). Those
78
+ * hosts already ran without cookies, since their sandbox has no
79
+ * `allow-same-origin`; the attribute is what unblocks them under COEP.
80
+ * - `'always'` — on every iframe, trusted hosts included. An authenticated
81
+ * embed will then render its login screen.
82
+ * - `'never'` — never. The right value for a host that sends no COEP header
83
+ * and does not want its embeds to lose their cookies.
84
+ *
85
+ * Chrome/Edge 110+ honour the attribute; Firefox ignores it (iframes stay
86
+ * blocked while the host sends COEP); Safari ignores the COEP value itself,
87
+ * so nothing is blocked there in the first place.
88
+ */
89
+ iframeCredentialless?: 'auto' | 'always' | 'never';
90
+ /**
91
+ * Extra hosts treated as trusted, on top of `TRUSTED_IFRAME_DOMAINS`:
92
+ * no `credentialless` attribute, and `allow-same-origin` in the sandbox.
93
+ * A subdomain of a listed host matches too.
94
+ *
95
+ * This only RECLASSIFIES a host the allow-list already accepts. To render an
96
+ * iframe whose host is outside `DEFAULT_IFRAME_DOMAINS`, add it to
97
+ * {@link MCPUIConfigInput.customIframeDomains} with `iframePolicy: 'extend'`.
98
+ */
99
+ customTrustedIframeDomains?: string[];
100
+ /**
101
+ * How `UIResourceRenderer` validates an `iframe` component's host:
102
+ * `'strict'` (default) accepts `DEFAULT_IFRAME_DOMAINS` only, `'extend'`
103
+ * also accepts {@link MCPUIConfigInput.customIframeDomains}.
104
+ */
105
+ iframePolicy?: IframePolicy;
106
+ /**
107
+ * Extra hosts the allow-list accepts when `iframePolicy` is `'extend'`.
108
+ * Without this, a component pointing at an unlisted host is replaced by the
109
+ * validation card before any renderer runs.
110
+ */
111
+ customIframeDomains?: string[];
112
+ /**
113
+ * When the library renders an "open in a new tab" link under an embed
114
+ * (`strings.iframeOpenInNewTab`).
115
+ *
116
+ * A COEP-blocked iframe fires no event the parent page can observe, so
117
+ * without this the user sees an unexplained blank frame.
118
+ *
119
+ * - `'auto'` (default) — only when the page is cross-origin isolated
120
+ * (`window.crossOriginIsolated`). That flag needs COOP `same-origin` AND
121
+ * COEP, so a host that sends COEP alone still blocks embeds while the
122
+ * flag is false: set `'always'` there. Read after mount, never during
123
+ * render, so SSR markup and hydration agree.
124
+ * - `'always'` / `'never'` — unconditional.
125
+ */
126
+ iframeFallbackLink?: 'auto' | 'always' | 'never';
127
+ /**
128
+ * Where `ChartJSRenderer` enables wheel-zoom / drag-pan / pinch on a chart
129
+ * (through the optional `chartjs-plugin-zoom` peer dependency — absent, the
130
+ * chart renders exactly as it does without this setting).
131
+ *
132
+ * Hijacking the mouse wheel on a component sitting inline in a scrolling
133
+ * chat feed is hostile: the user scrolls the conversation and the chart eats
134
+ * the gesture. So zoom belongs to a surface that OWNS its viewport, which
135
+ * here is `ExpandableWrapper`'s fullscreen modal.
136
+ *
137
+ * - `'expanded'` (default) — only inside the fullscreen modal.
138
+ * - `'always'` — inline as well. For a host that lays charts out in a
139
+ * dashboard rather than in a feed, where the wheel has nothing to steal.
140
+ * - `'never'` — off everywhere; the plugin is never registered.
141
+ *
142
+ * @since 6.22.0
143
+ */
144
+ chartZoom?: 'expanded' | 'always' | 'never';
145
+ }
146
+ /**
147
+ * The resolved host policy: every key present. This is what the library hands
148
+ * back, so a reader never null-checks a policy.
149
+ *
150
+ * Extends `Required<`{@link MCPUIConfigInput}`>` rather than declaring the
151
+ * fields again, so a key exists in exactly one place and the two views cannot
152
+ * drift. It remains an interface so existing consumers can extend or augment
153
+ * the public contract as they could before 6.22.0.
154
+ */
155
+ export interface MCPUIConfig extends Required<MCPUIConfigInput> {
156
+ }
157
+ /**
158
+ * Defaults. Chosen so a host that sends no COEP header sees no change from
159
+ * 6.20.0 apart from the fallback link, which `'auto'` keeps hidden there —
160
+ * and, since 6.22.0, so no inline component ever captures the wheel
161
+ * (`chartZoom: 'expanded'`).
162
+ *
163
+ * Typed `MCPUIConfig` (i.e. resolved): that annotation is what stops a new
164
+ * key from shipping without a default.
165
+ */
166
+ export declare const DEFAULT_MCPUI_CONFIG: MCPUIConfig;
167
+ /**
168
+ * Typed with the RESOLVED view, because this context is read as well as
169
+ * written: it is exported, so a consumer may call
170
+ * `useContext(MCPUIConfigContext)` directly, and typing it as the input view
171
+ * would hand them `IframePolicy | undefined` — exactly the regression this
172
+ * whole split exists to undo.
173
+ *
174
+ * The cost lands on the rarer side: a host feeding this context directly
175
+ * passes a COMPLETE value, `{ ...DEFAULT_MCPUI_CONFIG, ...mine }`. Anyone who
176
+ * wants to pass only the keys they care about uses `MCPUIConfigProvider`,
177
+ * whose `config` prop takes `Partial<`{@link MCPUIConfig}`>` and does that
178
+ * merge. That preserves optional properties added through declaration
179
+ * merging; {@link MCPUIConfigInput} remains the unaugmented built-in input
180
+ * shape a host can name for ordinary authored configs.
181
+ */
182
+ export declare const MCPUIConfigContext: import("solid-js").Context<MCPUIConfig>;
183
+ /**
184
+ * Reads the active host config, resolved: every key is present, whether it
185
+ * came from the provider or from `DEFAULT_MCPUI_CONFIG`. Returns the defaults
186
+ * outright when no `<MCPUIConfigProvider>` is mounted above.
187
+ */
188
+ export declare function useMCPUIConfig(): MCPUIConfig;
189
+ export interface MCPUIConfigProviderProps {
190
+ /**
191
+ * Partial override of the host config. Any key left unset falls back to
192
+ * `DEFAULT_MCPUI_CONFIG`.
193
+ */
194
+ config?: Partial<MCPUIConfig>;
195
+ children: JSX.Element;
196
+ }
197
+ /**
198
+ * Provides the host config to every MCP-UI renderer below it.
199
+ * Merges the partial `config` override over the defaults.
200
+ */
201
+ export declare function MCPUIConfigProvider(props: MCPUIConfigProviderProps): JSX.Element;