@frontmcp/ui 0.6.0 → 0.6.2

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 (650) hide show
  1. package/README.md +140 -362
  2. package/bridge/core/bridge-factory.d.ts +1 -0
  3. package/bridge/core/bridge-factory.d.ts.map +1 -1
  4. package/bridge/index.d.ts +1 -1
  5. package/bridge/index.d.ts.map +1 -1
  6. package/bridge/index.js +39 -881
  7. package/bridge/runtime/index.d.ts +2 -1
  8. package/bridge/runtime/index.d.ts.map +1 -1
  9. package/bundler/browser-components.d.ts +42 -0
  10. package/bundler/browser-components.d.ts.map +1 -0
  11. package/bundler/bundler.d.ts +78 -4
  12. package/bundler/bundler.d.ts.map +1 -1
  13. package/bundler/index.d.ts +8 -8
  14. package/bundler/index.d.ts.map +1 -1
  15. package/bundler/index.js +1411 -2997
  16. package/bundler/types.d.ts +188 -7
  17. package/bundler/types.d.ts.map +1 -1
  18. package/components/alert.schema.d.ts +6 -6
  19. package/components/avatar.schema.d.ts +9 -9
  20. package/components/badge.schema.d.ts +9 -9
  21. package/components/button.schema.d.ts +9 -9
  22. package/components/card.schema.d.ts +7 -7
  23. package/components/form.schema.d.ts +24 -24
  24. package/components/index.js +128 -198
  25. package/components/modal.schema.d.ts +8 -8
  26. package/components/table.schema.d.ts +6 -6
  27. package/esm/bridge/{index.js → index.mjs} +40 -877
  28. package/esm/bundler/index.mjs +3136 -0
  29. package/esm/components/{index.js → index.mjs} +136 -196
  30. package/esm/index.mjs +5450 -0
  31. package/esm/layouts/index.mjs +409 -0
  32. package/esm/package.json +15 -32
  33. package/esm/react/{index.js → index.mjs} +71 -260
  34. package/esm/renderers/index.mjs +611 -0
  35. package/esm/universal/index.mjs +1951 -0
  36. package/esm/web-components/{index.js → index.mjs} +232 -287
  37. package/index.d.ts +22 -41
  38. package/index.d.ts.map +1 -1
  39. package/index.js +4286 -19607
  40. package/layouts/base.d.ts +2 -2
  41. package/layouts/base.d.ts.map +1 -1
  42. package/layouts/index.js +46 -539
  43. package/layouts/presets.d.ts.map +1 -1
  44. package/package.json +15 -32
  45. package/react/Alert.d.ts +1 -2
  46. package/react/Alert.d.ts.map +1 -1
  47. package/react/Badge.d.ts +1 -2
  48. package/react/Badge.d.ts.map +1 -1
  49. package/react/Button.d.ts +1 -2
  50. package/react/Button.d.ts.map +1 -1
  51. package/react/Card.d.ts +1 -2
  52. package/react/Card.d.ts.map +1 -1
  53. package/react/hooks/context.d.ts +1 -1
  54. package/react/hooks/context.d.ts.map +1 -1
  55. package/react/index.d.ts +5 -7
  56. package/react/index.d.ts.map +1 -1
  57. package/react/index.js +55 -269
  58. package/react/types.d.ts +1 -2
  59. package/react/types.d.ts.map +1 -1
  60. package/renderers/index.d.ts +15 -25
  61. package/renderers/index.d.ts.map +1 -1
  62. package/renderers/index.js +393 -1619
  63. package/renderers/mdx.renderer.d.ts +13 -34
  64. package/renderers/mdx.renderer.d.ts.map +1 -1
  65. package/{esm/runtime/adapters → renderers}/react.adapter.d.ts +2 -2
  66. package/renderers/react.adapter.d.ts.map +1 -0
  67. package/renderers/react.renderer.d.ts +25 -16
  68. package/renderers/react.renderer.d.ts.map +1 -1
  69. package/renderers/transpiler.d.ts +49 -0
  70. package/renderers/transpiler.d.ts.map +1 -0
  71. package/universal/cached-runtime.d.ts +25 -1
  72. package/universal/cached-runtime.d.ts.map +1 -1
  73. package/universal/index.js +2037 -0
  74. package/universal/runtime-builder.d.ts.map +1 -1
  75. package/universal/types.d.ts.map +1 -1
  76. package/web-components/elements/fmcp-input.d.ts.map +1 -1
  77. package/web-components/elements/fmcp-select.d.ts.map +1 -1
  78. package/web-components/index.d.ts +0 -1
  79. package/web-components/index.d.ts.map +1 -1
  80. package/web-components/index.js +224 -289
  81. package/adapters/index.d.ts +0 -13
  82. package/adapters/index.d.ts.map +0 -1
  83. package/adapters/index.js +0 -462
  84. package/adapters/platform-meta.d.ts +0 -166
  85. package/adapters/platform-meta.d.ts.map +0 -1
  86. package/adapters/response-builder.d.ts +0 -108
  87. package/adapters/response-builder.d.ts.map +0 -1
  88. package/adapters/serving-mode.d.ts +0 -107
  89. package/adapters/serving-mode.d.ts.map +0 -1
  90. package/base-template/bridge.d.ts +0 -90
  91. package/base-template/bridge.d.ts.map +0 -1
  92. package/base-template/default-base-template.d.ts +0 -92
  93. package/base-template/default-base-template.d.ts.map +0 -1
  94. package/base-template/index.d.ts +0 -15
  95. package/base-template/index.d.ts.map +0 -1
  96. package/base-template/index.js +0 -1398
  97. package/base-template/polyfills.d.ts +0 -31
  98. package/base-template/polyfills.d.ts.map +0 -1
  99. package/base-template/theme-styles.d.ts +0 -74
  100. package/base-template/theme-styles.d.ts.map +0 -1
  101. package/build/cdn-resources.d.ts +0 -243
  102. package/build/cdn-resources.d.ts.map +0 -1
  103. package/build/index.d.ts +0 -295
  104. package/build/index.d.ts.map +0 -1
  105. package/build/index.js +0 -7096
  106. package/build/widget-manifest.d.ts +0 -362
  107. package/build/widget-manifest.d.ts.map +0 -1
  108. package/bundler/cache.d.ts +0 -173
  109. package/bundler/cache.d.ts.map +0 -1
  110. package/bundler/file-cache/component-builder.d.ts +0 -167
  111. package/bundler/file-cache/component-builder.d.ts.map +0 -1
  112. package/bundler/file-cache/hash-calculator.d.ts +0 -155
  113. package/bundler/file-cache/hash-calculator.d.ts.map +0 -1
  114. package/bundler/file-cache/index.d.ts +0 -12
  115. package/bundler/file-cache/index.d.ts.map +0 -1
  116. package/bundler/file-cache/storage/filesystem.d.ts +0 -149
  117. package/bundler/file-cache/storage/filesystem.d.ts.map +0 -1
  118. package/bundler/file-cache/storage/index.d.ts +0 -11
  119. package/bundler/file-cache/storage/index.d.ts.map +0 -1
  120. package/bundler/file-cache/storage/interface.d.ts +0 -152
  121. package/bundler/file-cache/storage/interface.d.ts.map +0 -1
  122. package/bundler/file-cache/storage/redis.d.ts +0 -139
  123. package/bundler/file-cache/storage/redis.d.ts.map +0 -1
  124. package/bundler/sandbox/enclave-adapter.d.ts +0 -121
  125. package/bundler/sandbox/enclave-adapter.d.ts.map +0 -1
  126. package/bundler/sandbox/executor.d.ts +0 -14
  127. package/bundler/sandbox/executor.d.ts.map +0 -1
  128. package/bundler/sandbox/policy.d.ts +0 -62
  129. package/bundler/sandbox/policy.d.ts.map +0 -1
  130. package/dependency/cdn-registry.d.ts +0 -98
  131. package/dependency/cdn-registry.d.ts.map +0 -1
  132. package/dependency/import-map.d.ts +0 -186
  133. package/dependency/import-map.d.ts.map +0 -1
  134. package/dependency/import-parser.d.ts +0 -82
  135. package/dependency/import-parser.d.ts.map +0 -1
  136. package/dependency/index.d.ts +0 -17
  137. package/dependency/index.d.ts.map +0 -1
  138. package/dependency/resolver.d.ts +0 -164
  139. package/dependency/resolver.d.ts.map +0 -1
  140. package/dependency/schemas.d.ts +0 -486
  141. package/dependency/schemas.d.ts.map +0 -1
  142. package/dependency/template-loader.d.ts +0 -204
  143. package/dependency/template-loader.d.ts.map +0 -1
  144. package/dependency/template-processor.d.ts +0 -118
  145. package/dependency/template-processor.d.ts.map +0 -1
  146. package/dependency/types.d.ts +0 -739
  147. package/dependency/types.d.ts.map +0 -1
  148. package/esm/adapters/index.d.ts +0 -13
  149. package/esm/adapters/index.d.ts.map +0 -1
  150. package/esm/adapters/index.js +0 -427
  151. package/esm/adapters/platform-meta.d.ts +0 -166
  152. package/esm/adapters/platform-meta.d.ts.map +0 -1
  153. package/esm/adapters/response-builder.d.ts +0 -108
  154. package/esm/adapters/response-builder.d.ts.map +0 -1
  155. package/esm/adapters/serving-mode.d.ts +0 -107
  156. package/esm/adapters/serving-mode.d.ts.map +0 -1
  157. package/esm/base-template/bridge.d.ts +0 -90
  158. package/esm/base-template/bridge.d.ts.map +0 -1
  159. package/esm/base-template/default-base-template.d.ts +0 -92
  160. package/esm/base-template/default-base-template.d.ts.map +0 -1
  161. package/esm/base-template/index.d.ts +0 -15
  162. package/esm/base-template/index.d.ts.map +0 -1
  163. package/esm/base-template/index.js +0 -1364
  164. package/esm/base-template/polyfills.d.ts +0 -31
  165. package/esm/base-template/polyfills.d.ts.map +0 -1
  166. package/esm/base-template/theme-styles.d.ts +0 -74
  167. package/esm/base-template/theme-styles.d.ts.map +0 -1
  168. package/esm/bridge/adapters/base-adapter.d.ts +0 -104
  169. package/esm/bridge/adapters/base-adapter.d.ts.map +0 -1
  170. package/esm/bridge/adapters/claude.adapter.d.ts +0 -67
  171. package/esm/bridge/adapters/claude.adapter.d.ts.map +0 -1
  172. package/esm/bridge/adapters/ext-apps.adapter.d.ts +0 -143
  173. package/esm/bridge/adapters/ext-apps.adapter.d.ts.map +0 -1
  174. package/esm/bridge/adapters/gemini.adapter.d.ts +0 -64
  175. package/esm/bridge/adapters/gemini.adapter.d.ts.map +0 -1
  176. package/esm/bridge/adapters/generic.adapter.d.ts +0 -56
  177. package/esm/bridge/adapters/generic.adapter.d.ts.map +0 -1
  178. package/esm/bridge/adapters/index.d.ts +0 -26
  179. package/esm/bridge/adapters/index.d.ts.map +0 -1
  180. package/esm/bridge/adapters/openai.adapter.d.ts +0 -65
  181. package/esm/bridge/adapters/openai.adapter.d.ts.map +0 -1
  182. package/esm/bridge/core/adapter-registry.d.ts +0 -122
  183. package/esm/bridge/core/adapter-registry.d.ts.map +0 -1
  184. package/esm/bridge/core/bridge-factory.d.ts +0 -199
  185. package/esm/bridge/core/bridge-factory.d.ts.map +0 -1
  186. package/esm/bridge/core/index.d.ts +0 -10
  187. package/esm/bridge/core/index.d.ts.map +0 -1
  188. package/esm/bridge/index.d.ts +0 -62
  189. package/esm/bridge/index.d.ts.map +0 -1
  190. package/esm/bridge/runtime/iife-generator.d.ts +0 -62
  191. package/esm/bridge/runtime/iife-generator.d.ts.map +0 -1
  192. package/esm/bridge/runtime/index.d.ts +0 -9
  193. package/esm/bridge/runtime/index.d.ts.map +0 -1
  194. package/esm/bridge/types.d.ts +0 -386
  195. package/esm/bridge/types.d.ts.map +0 -1
  196. package/esm/build/cdn-resources.d.ts +0 -243
  197. package/esm/build/cdn-resources.d.ts.map +0 -1
  198. package/esm/build/index.d.ts +0 -295
  199. package/esm/build/index.d.ts.map +0 -1
  200. package/esm/build/index.js +0 -7021
  201. package/esm/build/widget-manifest.d.ts +0 -362
  202. package/esm/build/widget-manifest.d.ts.map +0 -1
  203. package/esm/bundler/bundler.d.ts +0 -208
  204. package/esm/bundler/bundler.d.ts.map +0 -1
  205. package/esm/bundler/cache.d.ts +0 -173
  206. package/esm/bundler/cache.d.ts.map +0 -1
  207. package/esm/bundler/file-cache/component-builder.d.ts +0 -167
  208. package/esm/bundler/file-cache/component-builder.d.ts.map +0 -1
  209. package/esm/bundler/file-cache/hash-calculator.d.ts +0 -155
  210. package/esm/bundler/file-cache/hash-calculator.d.ts.map +0 -1
  211. package/esm/bundler/file-cache/index.d.ts +0 -12
  212. package/esm/bundler/file-cache/index.d.ts.map +0 -1
  213. package/esm/bundler/file-cache/storage/filesystem.d.ts +0 -149
  214. package/esm/bundler/file-cache/storage/filesystem.d.ts.map +0 -1
  215. package/esm/bundler/file-cache/storage/index.d.ts +0 -11
  216. package/esm/bundler/file-cache/storage/index.d.ts.map +0 -1
  217. package/esm/bundler/file-cache/storage/interface.d.ts +0 -152
  218. package/esm/bundler/file-cache/storage/interface.d.ts.map +0 -1
  219. package/esm/bundler/file-cache/storage/redis.d.ts +0 -139
  220. package/esm/bundler/file-cache/storage/redis.d.ts.map +0 -1
  221. package/esm/bundler/index.d.ts +0 -43
  222. package/esm/bundler/index.d.ts.map +0 -1
  223. package/esm/bundler/index.js +0 -4687
  224. package/esm/bundler/sandbox/enclave-adapter.d.ts +0 -121
  225. package/esm/bundler/sandbox/enclave-adapter.d.ts.map +0 -1
  226. package/esm/bundler/sandbox/executor.d.ts +0 -14
  227. package/esm/bundler/sandbox/executor.d.ts.map +0 -1
  228. package/esm/bundler/sandbox/policy.d.ts +0 -62
  229. package/esm/bundler/sandbox/policy.d.ts.map +0 -1
  230. package/esm/bundler/types.d.ts +0 -702
  231. package/esm/bundler/types.d.ts.map +0 -1
  232. package/esm/components/alert.d.ts +0 -66
  233. package/esm/components/alert.d.ts.map +0 -1
  234. package/esm/components/alert.schema.d.ts +0 -98
  235. package/esm/components/alert.schema.d.ts.map +0 -1
  236. package/esm/components/avatar.d.ts +0 -77
  237. package/esm/components/avatar.d.ts.map +0 -1
  238. package/esm/components/avatar.schema.d.ts +0 -170
  239. package/esm/components/avatar.schema.d.ts.map +0 -1
  240. package/esm/components/badge.d.ts +0 -64
  241. package/esm/components/badge.d.ts.map +0 -1
  242. package/esm/components/badge.schema.d.ts +0 -91
  243. package/esm/components/badge.schema.d.ts.map +0 -1
  244. package/esm/components/button.d.ts +0 -100
  245. package/esm/components/button.d.ts.map +0 -1
  246. package/esm/components/button.schema.d.ts +0 -120
  247. package/esm/components/button.schema.d.ts.map +0 -1
  248. package/esm/components/card.d.ts +0 -53
  249. package/esm/components/card.d.ts.map +0 -1
  250. package/esm/components/card.schema.d.ts +0 -93
  251. package/esm/components/card.schema.d.ts.map +0 -1
  252. package/esm/components/form.d.ts +0 -212
  253. package/esm/components/form.d.ts.map +0 -1
  254. package/esm/components/form.schema.d.ts +0 -365
  255. package/esm/components/form.schema.d.ts.map +0 -1
  256. package/esm/components/index.d.ts +0 -29
  257. package/esm/components/index.d.ts.map +0 -1
  258. package/esm/components/list.d.ts +0 -121
  259. package/esm/components/list.d.ts.map +0 -1
  260. package/esm/components/list.schema.d.ts +0 -129
  261. package/esm/components/list.schema.d.ts.map +0 -1
  262. package/esm/components/modal.d.ts +0 -100
  263. package/esm/components/modal.d.ts.map +0 -1
  264. package/esm/components/modal.schema.d.ts +0 -151
  265. package/esm/components/modal.schema.d.ts.map +0 -1
  266. package/esm/components/table.d.ts +0 -91
  267. package/esm/components/table.d.ts.map +0 -1
  268. package/esm/components/table.schema.d.ts +0 -123
  269. package/esm/components/table.schema.d.ts.map +0 -1
  270. package/esm/dependency/cdn-registry.d.ts +0 -98
  271. package/esm/dependency/cdn-registry.d.ts.map +0 -1
  272. package/esm/dependency/import-map.d.ts +0 -186
  273. package/esm/dependency/import-map.d.ts.map +0 -1
  274. package/esm/dependency/import-parser.d.ts +0 -82
  275. package/esm/dependency/import-parser.d.ts.map +0 -1
  276. package/esm/dependency/index.d.ts +0 -17
  277. package/esm/dependency/index.d.ts.map +0 -1
  278. package/esm/dependency/resolver.d.ts +0 -164
  279. package/esm/dependency/resolver.d.ts.map +0 -1
  280. package/esm/dependency/schemas.d.ts +0 -486
  281. package/esm/dependency/schemas.d.ts.map +0 -1
  282. package/esm/dependency/template-loader.d.ts +0 -204
  283. package/esm/dependency/template-loader.d.ts.map +0 -1
  284. package/esm/dependency/template-processor.d.ts +0 -118
  285. package/esm/dependency/template-processor.d.ts.map +0 -1
  286. package/esm/dependency/types.d.ts +0 -739
  287. package/esm/dependency/types.d.ts.map +0 -1
  288. package/esm/handlebars/expression-extractor.d.ts +0 -147
  289. package/esm/handlebars/expression-extractor.d.ts.map +0 -1
  290. package/esm/handlebars/helpers.d.ts +0 -339
  291. package/esm/handlebars/helpers.d.ts.map +0 -1
  292. package/esm/handlebars/index.d.ts +0 -195
  293. package/esm/handlebars/index.d.ts.map +0 -1
  294. package/esm/handlebars/index.js +0 -587
  295. package/esm/index.d.ts +0 -56
  296. package/esm/index.d.ts.map +0 -1
  297. package/esm/index.js +0 -20511
  298. package/esm/layouts/base.d.ts +0 -86
  299. package/esm/layouts/base.d.ts.map +0 -1
  300. package/esm/layouts/index.d.ts +0 -8
  301. package/esm/layouts/index.d.ts.map +0 -1
  302. package/esm/layouts/index.js +0 -892
  303. package/esm/layouts/presets.d.ts +0 -134
  304. package/esm/layouts/presets.d.ts.map +0 -1
  305. package/esm/pages/consent.d.ts +0 -117
  306. package/esm/pages/consent.d.ts.map +0 -1
  307. package/esm/pages/error.d.ts +0 -101
  308. package/esm/pages/error.d.ts.map +0 -1
  309. package/esm/pages/index.d.ts +0 -9
  310. package/esm/pages/index.d.ts.map +0 -1
  311. package/esm/pages/index.js +0 -1563
  312. package/esm/react/Alert.d.ts +0 -102
  313. package/esm/react/Alert.d.ts.map +0 -1
  314. package/esm/react/Badge.d.ts +0 -101
  315. package/esm/react/Badge.d.ts.map +0 -1
  316. package/esm/react/Button.d.ts +0 -109
  317. package/esm/react/Button.d.ts.map +0 -1
  318. package/esm/react/Card.d.ts +0 -104
  319. package/esm/react/Card.d.ts.map +0 -1
  320. package/esm/react/hooks/context.d.ts +0 -179
  321. package/esm/react/hooks/context.d.ts.map +0 -1
  322. package/esm/react/hooks/index.d.ts +0 -42
  323. package/esm/react/hooks/index.d.ts.map +0 -1
  324. package/esm/react/hooks/tools.d.ts +0 -284
  325. package/esm/react/hooks/tools.d.ts.map +0 -1
  326. package/esm/react/index.d.ts +0 -81
  327. package/esm/react/index.d.ts.map +0 -1
  328. package/esm/react/types.d.ts +0 -106
  329. package/esm/react/types.d.ts.map +0 -1
  330. package/esm/react/utils.d.ts +0 -43
  331. package/esm/react/utils.d.ts.map +0 -1
  332. package/esm/registry/index.d.ts +0 -46
  333. package/esm/registry/index.d.ts.map +0 -1
  334. package/esm/registry/index.js +0 -6422
  335. package/esm/registry/render-template.d.ts +0 -91
  336. package/esm/registry/render-template.d.ts.map +0 -1
  337. package/esm/registry/tool-ui.registry.d.ts +0 -294
  338. package/esm/registry/tool-ui.registry.d.ts.map +0 -1
  339. package/esm/registry/uri-utils.d.ts +0 -56
  340. package/esm/registry/uri-utils.d.ts.map +0 -1
  341. package/esm/render/index.d.ts +0 -8
  342. package/esm/render/index.d.ts.map +0 -1
  343. package/esm/render/prerender.d.ts +0 -57
  344. package/esm/render/prerender.d.ts.map +0 -1
  345. package/esm/renderers/cache.d.ts +0 -145
  346. package/esm/renderers/cache.d.ts.map +0 -1
  347. package/esm/renderers/html.renderer.d.ts +0 -123
  348. package/esm/renderers/html.renderer.d.ts.map +0 -1
  349. package/esm/renderers/index.d.ts +0 -36
  350. package/esm/renderers/index.d.ts.map +0 -1
  351. package/esm/renderers/index.js +0 -1827
  352. package/esm/renderers/mdx.renderer.d.ts +0 -120
  353. package/esm/renderers/mdx.renderer.d.ts.map +0 -1
  354. package/esm/renderers/react.renderer.d.ts +0 -96
  355. package/esm/renderers/react.renderer.d.ts.map +0 -1
  356. package/esm/renderers/registry.d.ts +0 -134
  357. package/esm/renderers/registry.d.ts.map +0 -1
  358. package/esm/renderers/types.d.ts +0 -342
  359. package/esm/renderers/types.d.ts.map +0 -1
  360. package/esm/renderers/utils/detect.d.ts +0 -107
  361. package/esm/renderers/utils/detect.d.ts.map +0 -1
  362. package/esm/renderers/utils/hash.d.ts +0 -40
  363. package/esm/renderers/utils/hash.d.ts.map +0 -1
  364. package/esm/renderers/utils/index.d.ts +0 -9
  365. package/esm/renderers/utils/index.d.ts.map +0 -1
  366. package/esm/renderers/utils/transpiler.d.ts +0 -89
  367. package/esm/renderers/utils/transpiler.d.ts.map +0 -1
  368. package/esm/runtime/adapters/html.adapter.d.ts +0 -59
  369. package/esm/runtime/adapters/html.adapter.d.ts.map +0 -1
  370. package/esm/runtime/adapters/index.d.ts +0 -26
  371. package/esm/runtime/adapters/index.d.ts.map +0 -1
  372. package/esm/runtime/adapters/mdx.adapter.d.ts +0 -73
  373. package/esm/runtime/adapters/mdx.adapter.d.ts.map +0 -1
  374. package/esm/runtime/adapters/react.adapter.d.ts.map +0 -1
  375. package/esm/runtime/adapters/types.d.ts +0 -95
  376. package/esm/runtime/adapters/types.d.ts.map +0 -1
  377. package/esm/runtime/csp.d.ts +0 -48
  378. package/esm/runtime/csp.d.ts.map +0 -1
  379. package/esm/runtime/index.d.ts +0 -17
  380. package/esm/runtime/index.d.ts.map +0 -1
  381. package/esm/runtime/index.js +0 -5186
  382. package/esm/runtime/mcp-bridge.d.ts +0 -101
  383. package/esm/runtime/mcp-bridge.d.ts.map +0 -1
  384. package/esm/runtime/renderer-runtime.d.ts +0 -133
  385. package/esm/runtime/renderer-runtime.d.ts.map +0 -1
  386. package/esm/runtime/sanitizer.d.ts +0 -172
  387. package/esm/runtime/sanitizer.d.ts.map +0 -1
  388. package/esm/runtime/types.d.ts +0 -415
  389. package/esm/runtime/types.d.ts.map +0 -1
  390. package/esm/runtime/wrapper.d.ts +0 -421
  391. package/esm/runtime/wrapper.d.ts.map +0 -1
  392. package/esm/styles/index.d.ts +0 -8
  393. package/esm/styles/index.d.ts.map +0 -1
  394. package/esm/styles/index.js +0 -171
  395. package/esm/styles/variants.d.ts +0 -51
  396. package/esm/styles/variants.d.ts.map +0 -1
  397. package/esm/theme/cdn.d.ts +0 -195
  398. package/esm/theme/cdn.d.ts.map +0 -1
  399. package/esm/theme/index.d.ts +0 -18
  400. package/esm/theme/index.d.ts.map +0 -1
  401. package/esm/theme/index.js +0 -700
  402. package/esm/theme/platforms.d.ts +0 -107
  403. package/esm/theme/platforms.d.ts.map +0 -1
  404. package/esm/theme/presets/github-openai.d.ts +0 -50
  405. package/esm/theme/presets/github-openai.d.ts.map +0 -1
  406. package/esm/theme/presets/index.d.ts +0 -11
  407. package/esm/theme/presets/index.d.ts.map +0 -1
  408. package/esm/theme/theme.d.ts +0 -396
  409. package/esm/theme/theme.d.ts.map +0 -1
  410. package/esm/tool-template/builder.d.ts +0 -213
  411. package/esm/tool-template/builder.d.ts.map +0 -1
  412. package/esm/tool-template/index.d.ts +0 -16
  413. package/esm/tool-template/index.d.ts.map +0 -1
  414. package/esm/tool-template/index.js +0 -3515
  415. package/esm/types/index.d.ts +0 -14
  416. package/esm/types/index.d.ts.map +0 -1
  417. package/esm/types/index.js +0 -75
  418. package/esm/types/ui-config.d.ts +0 -639
  419. package/esm/types/ui-config.d.ts.map +0 -1
  420. package/esm/types/ui-runtime.d.ts +0 -1007
  421. package/esm/types/ui-runtime.d.ts.map +0 -1
  422. package/esm/typings/cache/cache-adapter.d.ts +0 -125
  423. package/esm/typings/cache/cache-adapter.d.ts.map +0 -1
  424. package/esm/typings/cache/index.d.ts +0 -10
  425. package/esm/typings/cache/index.d.ts.map +0 -1
  426. package/esm/typings/cache/memory-cache.d.ts +0 -92
  427. package/esm/typings/cache/memory-cache.d.ts.map +0 -1
  428. package/esm/typings/dts-parser.d.ts +0 -90
  429. package/esm/typings/dts-parser.d.ts.map +0 -1
  430. package/esm/typings/index.d.ts +0 -48
  431. package/esm/typings/index.d.ts.map +0 -1
  432. package/esm/typings/schemas.d.ts +0 -232
  433. package/esm/typings/schemas.d.ts.map +0 -1
  434. package/esm/typings/type-fetcher.d.ts +0 -89
  435. package/esm/typings/type-fetcher.d.ts.map +0 -1
  436. package/esm/typings/types.d.ts +0 -320
  437. package/esm/typings/types.d.ts.map +0 -1
  438. package/esm/universal/UniversalApp.d.ts +0 -108
  439. package/esm/universal/UniversalApp.d.ts.map +0 -1
  440. package/esm/universal/cached-runtime.d.ts +0 -115
  441. package/esm/universal/cached-runtime.d.ts.map +0 -1
  442. package/esm/universal/context.d.ts +0 -122
  443. package/esm/universal/context.d.ts.map +0 -1
  444. package/esm/universal/index.d.ts +0 -57
  445. package/esm/universal/index.d.ts.map +0 -1
  446. package/esm/universal/renderers/html.renderer.d.ts +0 -37
  447. package/esm/universal/renderers/html.renderer.d.ts.map +0 -1
  448. package/esm/universal/renderers/index.d.ts +0 -112
  449. package/esm/universal/renderers/index.d.ts.map +0 -1
  450. package/esm/universal/renderers/markdown.renderer.d.ts +0 -33
  451. package/esm/universal/renderers/markdown.renderer.d.ts.map +0 -1
  452. package/esm/universal/renderers/mdx.renderer.d.ts +0 -38
  453. package/esm/universal/renderers/mdx.renderer.d.ts.map +0 -1
  454. package/esm/universal/renderers/react.renderer.d.ts +0 -46
  455. package/esm/universal/renderers/react.renderer.d.ts.map +0 -1
  456. package/esm/universal/runtime-builder.d.ts +0 -33
  457. package/esm/universal/runtime-builder.d.ts.map +0 -1
  458. package/esm/universal/store.d.ts +0 -135
  459. package/esm/universal/store.d.ts.map +0 -1
  460. package/esm/universal/types.d.ts +0 -199
  461. package/esm/universal/types.d.ts.map +0 -1
  462. package/esm/utils/escape-html.d.ts +0 -58
  463. package/esm/utils/escape-html.d.ts.map +0 -1
  464. package/esm/utils/index.d.ts +0 -10
  465. package/esm/utils/index.d.ts.map +0 -1
  466. package/esm/utils/index.js +0 -40
  467. package/esm/utils/safe-stringify.d.ts +0 -30
  468. package/esm/utils/safe-stringify.d.ts.map +0 -1
  469. package/esm/validation/error-box.d.ts +0 -56
  470. package/esm/validation/error-box.d.ts.map +0 -1
  471. package/esm/validation/index.d.ts +0 -13
  472. package/esm/validation/index.d.ts.map +0 -1
  473. package/esm/validation/index.js +0 -562
  474. package/esm/validation/schema-paths.d.ts +0 -118
  475. package/esm/validation/schema-paths.d.ts.map +0 -1
  476. package/esm/validation/template-validator.d.ts +0 -143
  477. package/esm/validation/template-validator.d.ts.map +0 -1
  478. package/esm/validation/wrapper.d.ts +0 -97
  479. package/esm/validation/wrapper.d.ts.map +0 -1
  480. package/esm/web-components/core/attribute-parser.d.ts +0 -82
  481. package/esm/web-components/core/attribute-parser.d.ts.map +0 -1
  482. package/esm/web-components/core/base-element.d.ts +0 -197
  483. package/esm/web-components/core/base-element.d.ts.map +0 -1
  484. package/esm/web-components/core/index.d.ts +0 -9
  485. package/esm/web-components/core/index.d.ts.map +0 -1
  486. package/esm/web-components/elements/fmcp-alert.d.ts +0 -46
  487. package/esm/web-components/elements/fmcp-alert.d.ts.map +0 -1
  488. package/esm/web-components/elements/fmcp-badge.d.ts +0 -47
  489. package/esm/web-components/elements/fmcp-badge.d.ts.map +0 -1
  490. package/esm/web-components/elements/fmcp-button.d.ts +0 -117
  491. package/esm/web-components/elements/fmcp-button.d.ts.map +0 -1
  492. package/esm/web-components/elements/fmcp-card.d.ts +0 -53
  493. package/esm/web-components/elements/fmcp-card.d.ts.map +0 -1
  494. package/esm/web-components/elements/fmcp-input.d.ts +0 -96
  495. package/esm/web-components/elements/fmcp-input.d.ts.map +0 -1
  496. package/esm/web-components/elements/fmcp-select.d.ts +0 -100
  497. package/esm/web-components/elements/fmcp-select.d.ts.map +0 -1
  498. package/esm/web-components/elements/index.d.ts +0 -13
  499. package/esm/web-components/elements/index.d.ts.map +0 -1
  500. package/esm/web-components/index.d.ts +0 -50
  501. package/esm/web-components/index.d.ts.map +0 -1
  502. package/esm/web-components/register.d.ts +0 -57
  503. package/esm/web-components/register.d.ts.map +0 -1
  504. package/esm/web-components/types.d.ts +0 -122
  505. package/esm/web-components/types.d.ts.map +0 -1
  506. package/esm/widgets/index.d.ts +0 -8
  507. package/esm/widgets/index.d.ts.map +0 -1
  508. package/esm/widgets/index.js +0 -941
  509. package/esm/widgets/progress.d.ts +0 -133
  510. package/esm/widgets/progress.d.ts.map +0 -1
  511. package/esm/widgets/resource.d.ts +0 -163
  512. package/esm/widgets/resource.d.ts.map +0 -1
  513. package/handlebars/expression-extractor.d.ts +0 -147
  514. package/handlebars/expression-extractor.d.ts.map +0 -1
  515. package/handlebars/helpers.d.ts +0 -339
  516. package/handlebars/helpers.d.ts.map +0 -1
  517. package/handlebars/index.d.ts +0 -195
  518. package/handlebars/index.d.ts.map +0 -1
  519. package/handlebars/index.js +0 -666
  520. package/pages/consent.d.ts +0 -117
  521. package/pages/consent.d.ts.map +0 -1
  522. package/pages/error.d.ts +0 -101
  523. package/pages/error.d.ts.map +0 -1
  524. package/pages/index.d.ts +0 -9
  525. package/pages/index.d.ts.map +0 -1
  526. package/pages/index.js +0 -1602
  527. package/react/utils.d.ts +0 -43
  528. package/react/utils.d.ts.map +0 -1
  529. package/registry/index.d.ts +0 -46
  530. package/registry/index.d.ts.map +0 -1
  531. package/registry/index.js +0 -6465
  532. package/registry/render-template.d.ts +0 -91
  533. package/registry/render-template.d.ts.map +0 -1
  534. package/registry/tool-ui.registry.d.ts +0 -294
  535. package/registry/tool-ui.registry.d.ts.map +0 -1
  536. package/registry/uri-utils.d.ts +0 -56
  537. package/registry/uri-utils.d.ts.map +0 -1
  538. package/renderers/cache.d.ts +0 -145
  539. package/renderers/cache.d.ts.map +0 -1
  540. package/renderers/html.renderer.d.ts +0 -123
  541. package/renderers/html.renderer.d.ts.map +0 -1
  542. package/renderers/registry.d.ts +0 -134
  543. package/renderers/registry.d.ts.map +0 -1
  544. package/renderers/types.d.ts +0 -342
  545. package/renderers/types.d.ts.map +0 -1
  546. package/renderers/utils/detect.d.ts +0 -107
  547. package/renderers/utils/detect.d.ts.map +0 -1
  548. package/renderers/utils/hash.d.ts +0 -40
  549. package/renderers/utils/hash.d.ts.map +0 -1
  550. package/renderers/utils/index.d.ts +0 -9
  551. package/renderers/utils/index.d.ts.map +0 -1
  552. package/renderers/utils/transpiler.d.ts +0 -89
  553. package/renderers/utils/transpiler.d.ts.map +0 -1
  554. package/runtime/adapters/html.adapter.d.ts +0 -59
  555. package/runtime/adapters/html.adapter.d.ts.map +0 -1
  556. package/runtime/adapters/index.d.ts +0 -26
  557. package/runtime/adapters/index.d.ts.map +0 -1
  558. package/runtime/adapters/mdx.adapter.d.ts +0 -73
  559. package/runtime/adapters/mdx.adapter.d.ts.map +0 -1
  560. package/runtime/adapters/react.adapter.d.ts +0 -70
  561. package/runtime/adapters/react.adapter.d.ts.map +0 -1
  562. package/runtime/adapters/types.d.ts +0 -95
  563. package/runtime/adapters/types.d.ts.map +0 -1
  564. package/runtime/csp.d.ts +0 -48
  565. package/runtime/csp.d.ts.map +0 -1
  566. package/runtime/index.d.ts +0 -17
  567. package/runtime/index.d.ts.map +0 -1
  568. package/runtime/index.js +0 -5264
  569. package/runtime/mcp-bridge.d.ts +0 -101
  570. package/runtime/mcp-bridge.d.ts.map +0 -1
  571. package/runtime/renderer-runtime.d.ts +0 -133
  572. package/runtime/renderer-runtime.d.ts.map +0 -1
  573. package/runtime/sanitizer.d.ts +0 -172
  574. package/runtime/sanitizer.d.ts.map +0 -1
  575. package/runtime/types.d.ts +0 -415
  576. package/runtime/types.d.ts.map +0 -1
  577. package/runtime/wrapper.d.ts +0 -421
  578. package/runtime/wrapper.d.ts.map +0 -1
  579. package/styles/index.d.ts +0 -8
  580. package/styles/index.d.ts.map +0 -1
  581. package/styles/index.js +0 -222
  582. package/styles/variants.d.ts +0 -51
  583. package/styles/variants.d.ts.map +0 -1
  584. package/theme/cdn.d.ts +0 -195
  585. package/theme/cdn.d.ts.map +0 -1
  586. package/theme/index.d.ts +0 -18
  587. package/theme/index.d.ts.map +0 -1
  588. package/theme/index.js +0 -757
  589. package/theme/platforms.d.ts +0 -107
  590. package/theme/platforms.d.ts.map +0 -1
  591. package/theme/presets/github-openai.d.ts +0 -50
  592. package/theme/presets/github-openai.d.ts.map +0 -1
  593. package/theme/presets/index.d.ts +0 -11
  594. package/theme/presets/index.d.ts.map +0 -1
  595. package/theme/theme.d.ts +0 -396
  596. package/theme/theme.d.ts.map +0 -1
  597. package/tool-template/builder.d.ts +0 -213
  598. package/tool-template/builder.d.ts.map +0 -1
  599. package/tool-template/index.d.ts +0 -16
  600. package/tool-template/index.d.ts.map +0 -1
  601. package/tool-template/index.js +0 -3559
  602. package/types/index.d.ts +0 -14
  603. package/types/index.d.ts.map +0 -1
  604. package/types/index.js +0 -108
  605. package/types/ui-config.d.ts +0 -639
  606. package/types/ui-config.d.ts.map +0 -1
  607. package/types/ui-runtime.d.ts +0 -1007
  608. package/types/ui-runtime.d.ts.map +0 -1
  609. package/typings/cache/cache-adapter.d.ts +0 -125
  610. package/typings/cache/cache-adapter.d.ts.map +0 -1
  611. package/typings/cache/index.d.ts +0 -10
  612. package/typings/cache/index.d.ts.map +0 -1
  613. package/typings/cache/memory-cache.d.ts +0 -92
  614. package/typings/cache/memory-cache.d.ts.map +0 -1
  615. package/typings/dts-parser.d.ts +0 -90
  616. package/typings/dts-parser.d.ts.map +0 -1
  617. package/typings/index.d.ts +0 -48
  618. package/typings/index.d.ts.map +0 -1
  619. package/typings/schemas.d.ts +0 -232
  620. package/typings/schemas.d.ts.map +0 -1
  621. package/typings/type-fetcher.d.ts +0 -89
  622. package/typings/type-fetcher.d.ts.map +0 -1
  623. package/typings/types.d.ts +0 -320
  624. package/typings/types.d.ts.map +0 -1
  625. package/utils/escape-html.d.ts +0 -58
  626. package/utils/escape-html.d.ts.map +0 -1
  627. package/utils/index.d.ts +0 -10
  628. package/utils/index.d.ts.map +0 -1
  629. package/utils/index.js +0 -70
  630. package/utils/safe-stringify.d.ts +0 -30
  631. package/utils/safe-stringify.d.ts.map +0 -1
  632. package/validation/error-box.d.ts +0 -56
  633. package/validation/error-box.d.ts.map +0 -1
  634. package/validation/index.d.ts +0 -13
  635. package/validation/index.d.ts.map +0 -1
  636. package/validation/index.js +0 -603
  637. package/validation/schema-paths.d.ts +0 -118
  638. package/validation/schema-paths.d.ts.map +0 -1
  639. package/validation/template-validator.d.ts +0 -143
  640. package/validation/template-validator.d.ts.map +0 -1
  641. package/validation/wrapper.d.ts +0 -97
  642. package/validation/wrapper.d.ts.map +0 -1
  643. package/widgets/index.d.ts +0 -8
  644. package/widgets/index.d.ts.map +0 -1
  645. package/widgets/index.js +0 -978
  646. package/widgets/progress.d.ts +0 -133
  647. package/widgets/progress.d.ts.map +0 -1
  648. package/widgets/resource.d.ts +0 -163
  649. package/widgets/resource.d.ts.map +0 -1
  650. /package/esm/render/{index.js → index.mjs} +0 -0
@@ -1,1007 +0,0 @@
1
- /**
2
- * Widget Runtime Types
3
- *
4
- * Core types for the Tool UI widget system. These types define:
5
- * - UI rendering modes (html, react, mdx, markdown, auto)
6
- * - Bundling strategies (static vs dynamic)
7
- * - Widget manifests for caching and discovery
8
- * - Runtime payloads for tool responses
9
- * - CSP directives for security
10
- *
11
- * This module is the canonical source for widget types.
12
- * Both `@frontmcp/sdk` and external consumers (like AgentLink)
13
- * should import types from here.
14
- *
15
- * @packageDocumentation
16
- */
17
- import type { WidgetServingMode as _WidgetServingMode } from './ui-config';
18
- import type { ZodTypeAny } from 'zod';
19
- export type { TemplateHelpers, TemplateContext, TemplateBuilderFn, UIContentSecurityPolicy, WidgetDisplayMode, WidgetServingMode, } from './ui-config';
20
- type WidgetServingMode = _WidgetServingMode;
21
- /**
22
- * UI renderer type for widget templates.
23
- *
24
- * - `'html'`: Plain HTML template (with optional Handlebars enhancement)
25
- * - `'react'`: React component (SSR + optional hydration)
26
- * - `'mdx'`: MDX template (Markdown + JSX components)
27
- * - `'markdown'`: Pure Markdown (rendered via markdown engine)
28
- * - `'auto'`: Auto-detect from template; loads all renderers at runtime
29
- *
30
- * @example
31
- * ```typescript
32
- * // Explicit HTML mode
33
- * ui: {
34
- * template: '<div>{{output.value}}</div>',
35
- * uiType: 'html'
36
- * }
37
- *
38
- * // Auto-detect (loads all renderers)
39
- * ui: {
40
- * template: MyReactComponent,
41
- * uiType: 'auto'
42
- * }
43
- * ```
44
- */
45
- export type UIType = 'html' | 'react' | 'mdx' | 'markdown' | 'auto';
46
- /**
47
- * Widget bundling strategy.
48
- *
49
- * - `'static'`: Widget shell is pre-compiled at startup and cached.
50
- * Tool responses reference the cached widget via `ui://widget/{toolName}`.
51
- * Data is injected at runtime via FrontMCP Bridge. **Default mode.**
52
- *
53
- * - `'dynamic'`: Fresh HTML is generated for each tool invocation.
54
- * Use for debugging or when template logic depends on invocation context.
55
- *
56
- * @example
57
- * ```typescript
58
- * // Static mode (default, recommended)
59
- * ui: {
60
- * template: WeatherWidget,
61
- * bundlingMode: 'static'
62
- * }
63
- *
64
- * // Dynamic mode (debugging, fresh per call)
65
- * ui: {
66
- * template: (ctx) => `<div>${ctx.output.debug}</div>`,
67
- * bundlingMode: 'dynamic'
68
- * }
69
- * ```
70
- */
71
- export type BundlingMode = 'static' | 'dynamic';
72
- /**
73
- * Resource loading mode for widget dependencies.
74
- *
75
- * - `'cdn'`: Load React/MDX/Handlebars from CDN URLs (light, fast).
76
- * Requires network access. Best for most platforms.
77
- *
78
- * - `'inline'`: Embed all scripts directly in the HTML (self-contained).
79
- * Works in network-blocked environments (e.g., Claude Artifacts).
80
- * Results in larger HTML payloads.
81
- *
82
- * @example
83
- * ```typescript
84
- * // CDN mode (default, lightweight)
85
- * ui: {
86
- * template: WeatherWidget,
87
- * resourceMode: 'cdn'
88
- * }
89
- *
90
- * // Inline mode (network-blocked environments)
91
- * ui: {
92
- * template: WeatherWidget,
93
- * resourceMode: 'inline'
94
- * }
95
- * ```
96
- */
97
- export type ResourceMode = 'cdn' | 'inline';
98
- /**
99
- * Widget output mode - determines what is returned in tool responses.
100
- *
101
- * - `'code-only'`: Return just the transpiled/rendered content.
102
- * The host platform (OpenAI, etc.) provides the runtime wrapper.
103
- * Best for capable platforms that handle their own rendering.
104
- *
105
- * - `'full-ssr'`: Return complete SSR'd HTML with embedded data.
106
- * Self-contained output for limited/unknown MCP clients.
107
- * Includes FrontMCP Bridge, scripts, and all necessary runtime.
108
- *
109
- * - `'dual-payload'`: Return TWO TextContent blocks for Claude Artifacts.
110
- * Block 0: Pure JSON stringified data (for programmatic parsing).
111
- * Block 1: Markdown-wrapped HTML (```html...```) for visual rendering.
112
- * Uses cloudflare CDN for all resources (Claude sandbox restriction).
113
- *
114
- * @example
115
- * ```typescript
116
- * // For OpenAI - just return the rendered content
117
- * const result = await buildWidgetOutput({
118
- * uiConfig,
119
- * toolName: 'weather',
120
- * outputMode: 'code-only',
121
- * output: { temperature: 72 },
122
- * });
123
- * // result.content = '<div class="weather">72°F</div>'
124
- *
125
- * // For unknown clients - return full HTML
126
- * const result = await buildWidgetOutput({
127
- * uiConfig,
128
- * toolName: 'weather',
129
- * outputMode: 'full-ssr',
130
- * output: { temperature: 72 },
131
- * });
132
- * // result.html = '<!DOCTYPE html>...'
133
- *
134
- * // For Claude - return dual-payload
135
- * const result = await buildWidgetOutput({
136
- * uiConfig,
137
- * toolName: 'weather',
138
- * outputMode: 'dual-payload',
139
- * output: { temperature: 72 },
140
- * });
141
- * // result.content = [
142
- * // { type: 'text', text: '{"temperature":72}' },
143
- * // { type: 'text', text: 'Here is the weather:\n\n```html\n<!DOCTYPE html>...\n```' }
144
- * // ]
145
- * ```
146
- */
147
- export type OutputMode = 'code-only' | 'full-ssr' | 'dual-payload';
148
- /**
149
- * Display mode for widget presentation.
150
- *
151
- * Note: This is an alias for `WidgetDisplayMode` from ui-config.ts.
152
- * Prefer using `WidgetDisplayMode` for new code.
153
- */
154
- export type DisplayMode = 'inline' | 'fullscreen' | 'pip';
155
- /**
156
- * Content Security Policy directives for widget sandboxes.
157
- *
158
- * More granular than `UIContentSecurityPolicy`, this type
159
- * maps directly to CSP header directives.
160
- *
161
- * @example
162
- * ```typescript
163
- * const csp: CSPDirectives = {
164
- * scriptSrc: ["'self'", "'unsafe-inline'", "https://unpkg.com"],
165
- * styleSrc: ["'self'", "'unsafe-inline'"],
166
- * connectSrc: ["https://api.example.com"],
167
- * };
168
- * ```
169
- */
170
- export interface CSPDirectives {
171
- /**
172
- * Script source directives (CSP script-src).
173
- * @example ["'self'", "'unsafe-inline'", "https://unpkg.com"]
174
- */
175
- scriptSrc: string[];
176
- /**
177
- * Style source directives (CSP style-src).
178
- * @example ["'self'", "'unsafe-inline'"]
179
- */
180
- styleSrc: string[];
181
- /**
182
- * Connection source directives (CSP connect-src).
183
- * Controls fetch/XHR/WebSocket destinations.
184
- * @example ["https://api.example.com"]
185
- */
186
- connectSrc: string[];
187
- /**
188
- * Image source directives (CSP img-src).
189
- * @example ["'self'", "data:", "https://images.example.com"]
190
- */
191
- imgSrc?: string[];
192
- /**
193
- * Font source directives (CSP font-src).
194
- * @example ["'self'", "https://fonts.gstatic.com"]
195
- */
196
- fontSrc?: string[];
197
- /**
198
- * Default source directive (CSP default-src).
199
- * @example ["'self'"]
200
- */
201
- defaultSrc?: string[];
202
- /**
203
- * Frame source directives (CSP frame-src).
204
- * @example ["'none'"]
205
- */
206
- frameSrc?: string[];
207
- /**
208
- * Object source directives (CSP object-src).
209
- * @example ["'none'"]
210
- */
211
- objectSrc?: string[];
212
- }
213
- /**
214
- * CDN configuration for a single script resource.
215
- */
216
- export interface CDNResource {
217
- /**
218
- * CDN URL for the script.
219
- */
220
- url: string;
221
- /**
222
- * Subresource integrity hash (SRI).
223
- * @example "sha384-..."
224
- */
225
- integrity?: string;
226
- /**
227
- * Crossorigin attribute.
228
- * @default "anonymous"
229
- */
230
- crossorigin?: 'anonymous' | 'use-credentials';
231
- }
232
- /**
233
- * External assets required by a renderer type.
234
- *
235
- * Supports two modes:
236
- * - CDN mode: Light payloads, scripts loaded from CDN URLs
237
- * - Inline mode: Self-contained, scripts embedded in HTML
238
- *
239
- * @example
240
- * ```typescript
241
- * // CDN mode (lightweight)
242
- * const assets: RendererAssets = {
243
- * mode: 'cdn',
244
- * react: { url: 'https://unpkg.com/react@18/umd/react.production.min.js' },
245
- * reactDom: { url: 'https://unpkg.com/react-dom@18/umd/react-dom.production.min.js' },
246
- * };
247
- *
248
- * // Inline mode (self-contained)
249
- * const assets: RendererAssets = {
250
- * mode: 'inline',
251
- * inlineReact: '/* minified react code *\/',
252
- * inlineReactDom: '/* minified react-dom code *\/',
253
- * };
254
- * ```
255
- */
256
- export interface RendererAssets {
257
- /**
258
- * Resource loading mode.
259
- * - 'cdn': Load scripts from CDN URLs (light, requires network)
260
- * - 'inline': Embed scripts in HTML (heavy, works offline)
261
- * @default 'cdn'
262
- */
263
- mode: ResourceMode;
264
- /**
265
- * React UMD runtime CDN (for 'react' UI type).
266
- */
267
- react?: CDNResource;
268
- /**
269
- * ReactDOM UMD runtime CDN (for 'react' UI type with hydration).
270
- */
271
- reactDom?: CDNResource;
272
- /**
273
- * Markdown rendering engine CDN (for 'markdown' or 'mdx' types).
274
- */
275
- markdown?: CDNResource;
276
- /**
277
- * MDX runtime CDN (for 'mdx' type).
278
- */
279
- mdxRuntime?: CDNResource;
280
- /**
281
- * Handlebars runtime CDN (for enhanced HTML templates).
282
- */
283
- handlebars?: CDNResource;
284
- /**
285
- * Tailwind CSS CDN.
286
- */
287
- tailwind?: CDNResource;
288
- /**
289
- * Inline React runtime (for inline mode).
290
- * Contains minified React UMD bundle.
291
- */
292
- inlineReact?: string;
293
- /**
294
- * Inline ReactDOM runtime (for inline mode).
295
- * Contains minified ReactDOM UMD bundle.
296
- */
297
- inlineReactDom?: string;
298
- /**
299
- * Inline Handlebars runtime (for inline mode).
300
- */
301
- inlineHandlebars?: string;
302
- /**
303
- * Inline Markdown engine (for inline mode).
304
- */
305
- inlineMarkdown?: string;
306
- /**
307
- * Inline bundle content (compiled widget template).
308
- * Contains the pre-bundled renderer + template code.
309
- */
310
- inlineBundle?: string;
311
- /**
312
- * Content hash of the bundled widget code.
313
- * Used for cache invalidation.
314
- */
315
- bundleHash?: string;
316
- /**
317
- * @deprecated Use `react.url` instead
318
- */
319
- reactRuntime?: string;
320
- /**
321
- * @deprecated Use `reactDom.url` instead
322
- */
323
- reactDomRuntime?: string;
324
- /**
325
- * @deprecated Use `markdown.url` instead
326
- */
327
- markdownEngine?: string;
328
- /**
329
- * @deprecated Use `handlebars.url` instead
330
- */
331
- handlebarsRuntime?: string;
332
- }
333
- /**
334
- * Widget manifest describing a pre-compiled static widget.
335
- *
336
- * The manifest is embedded in the widget HTML and also cached
337
- * separately for quick lookups. It contains all metadata needed
338
- * for the runtime to render the widget correctly.
339
- *
340
- * @example
341
- * ```json
342
- * {
343
- * "tool": "weather.get",
344
- * "uiType": "react",
345
- * "bundlingMode": "static",
346
- * "displayMode": "inline",
347
- * "widgetAccessible": true,
348
- * "schema": { "type": "object", "properties": {...} },
349
- * "csp": { "scriptSrc": ["'self'"], ... },
350
- * "rendererAssets": { "reactRuntime": "https://..." },
351
- * "hash": "sha256-abc123..."
352
- * }
353
- * ```
354
- */
355
- export interface WidgetManifest {
356
- /**
357
- * Tool name (unique identifier).
358
- * @example "weather.get"
359
- */
360
- tool: string;
361
- /**
362
- * UI renderer type.
363
- */
364
- uiType: UIType;
365
- /**
366
- * Bundling mode used to create this widget.
367
- */
368
- bundlingMode: BundlingMode;
369
- /**
370
- * Preferred display mode for the widget.
371
- */
372
- displayMode: DisplayMode;
373
- /**
374
- * Whether the widget can invoke tools via MCP bridge.
375
- * When true, widget has access to `window.mcpBridge.callTool()`.
376
- */
377
- widgetAccessible: boolean;
378
- /**
379
- * JSON Schema describing the tool's output structure.
380
- * Used for type hints and validation.
381
- */
382
- schema: object;
383
- /**
384
- * Content Security Policy directives.
385
- */
386
- csp: CSPDirectives;
387
- /**
388
- * External assets required by the renderer.
389
- */
390
- rendererAssets: RendererAssets;
391
- /**
392
- * SHA-256 hash of the manifest + HTML content.
393
- * Used for cache validation and ETag generation.
394
- */
395
- hash: string;
396
- /**
397
- * Timestamp when the manifest was created (ISO 8601).
398
- */
399
- createdAt?: string;
400
- /**
401
- * Human-readable description of the widget.
402
- */
403
- description?: string;
404
- /**
405
- * Widget URI in the MCP resource format.
406
- * @example "ui://widget/weather.get.html"
407
- */
408
- uri?: string;
409
- }
410
- /**
411
- * UI metadata fields emitted in tool response `_meta`.
412
- *
413
- * All UI-related data goes in `_meta`, NOT in the `content` array.
414
- * The MCP client reads these fields to render the widget.
415
- *
416
- * @example
417
- * ```typescript
418
- * // Tool response structure
419
- * {
420
- * content: [{ type: 'text', text: 'Weather data retrieved' }],
421
- * _meta: {
422
- * // UI type for renderer selection
423
- * 'ui/type': 'react',
424
- *
425
- * // Transpiled widget code (for capable clients like OpenAI)
426
- * 'ui/content': '<div class="weather">72°F Sunny</div>',
427
- *
428
- * // OR full HTML (for limited clients)
429
- * 'ui/html': '<!DOCTYPE html>...',
430
- *
431
- * // Content hash for caching
432
- * 'ui/hash': 'sha256-abc123...',
433
- *
434
- * // Display mode hint
435
- * 'ui/displayMode': 'inline',
436
- *
437
- * // Widget can call tools
438
- * 'ui/widgetAccessible': true,
439
- *
440
- * // OpenAI-specific CSP
441
- * 'openai/widgetCSP': { connect_domains: ['api.weather.com'] },
442
- * }
443
- * }
444
- * ```
445
- */
446
- export interface UIMetaFields {
447
- /**
448
- * UI renderer type.
449
- * Maps to `_meta['ui/type']`.
450
- */
451
- 'ui/type': UIType;
452
- /**
453
- * Transpiled widget content (code-only mode).
454
- * Just the rendered template without wrapper HTML.
455
- * Use for capable clients (OpenAI) that provide their own runtime.
456
- * Maps to `_meta['ui/content']`.
457
- */
458
- 'ui/content'?: string;
459
- /**
460
- * Full HTML document (full-ssr mode).
461
- * Complete self-contained HTML with scripts, bridge, etc.
462
- * Use for limited/unknown MCP clients.
463
- * Maps to `_meta['ui/html']`.
464
- */
465
- 'ui/html'?: string;
466
- /**
467
- * Content hash for cache validation.
468
- * Maps to `_meta['ui/hash']`.
469
- */
470
- 'ui/hash': string;
471
- /**
472
- * Display mode hint.
473
- * Maps to `_meta['ui/displayMode']`.
474
- */
475
- 'ui/displayMode'?: DisplayMode;
476
- /**
477
- * Whether widget can invoke tools via MCP bridge.
478
- * Maps to `_meta['ui/widgetAccessible']`.
479
- */
480
- 'ui/widgetAccessible'?: boolean;
481
- /**
482
- * Widget description for accessibility.
483
- * Maps to `_meta['ui/description']`.
484
- */
485
- 'ui/description'?: string;
486
- /**
487
- * Resource mode used (cdn or inline).
488
- * Maps to `_meta['ui/resourceMode']`.
489
- */
490
- 'ui/resourceMode'?: ResourceMode;
491
- }
492
- /**
493
- * OpenAI-specific meta fields.
494
- * These are in addition to the standard UI fields.
495
- */
496
- export interface OpenAIMetaFields {
497
- /**
498
- * OpenAI CSP configuration.
499
- * Maps to `_meta['openai/widgetCSP']`.
500
- */
501
- 'openai/widgetCSP'?: {
502
- connect_domains?: string[];
503
- resource_domains?: string[];
504
- };
505
- /**
506
- * OpenAI widget accessible flag.
507
- * Maps to `_meta['openai/widgetAccessible']`.
508
- */
509
- 'openai/widgetAccessible'?: boolean;
510
- /**
511
- * OpenAI widget description.
512
- * Maps to `_meta['openai/widgetDescription']`.
513
- */
514
- 'openai/widgetDescription'?: string;
515
- /**
516
- * OpenAI display mode.
517
- * Maps to `_meta['openai/displayMode']`.
518
- */
519
- 'openai/displayMode'?: 'inline' | 'fullscreen' | 'pip';
520
- }
521
- /**
522
- * Combined meta fields for tool responses.
523
- * Includes both standard UI fields and platform-specific fields.
524
- */
525
- export type ToolResponseMeta = Partial<UIMetaFields> & Partial<OpenAIMetaFields> & Record<string, unknown>;
526
- /**
527
- * @deprecated Use UIMetaFields instead. RuntimePayload is being replaced
528
- * with explicit _meta field types.
529
- */
530
- export interface RuntimePayload {
531
- /**
532
- * Resolved UI type for this invocation.
533
- * @deprecated Use UIMetaFields['ui/type']
534
- */
535
- type: UIType;
536
- /**
537
- * Rendered/compiled content.
538
- * @deprecated Use UIMetaFields['ui/content']
539
- */
540
- content: string;
541
- /**
542
- * Content hash for cache validation.
543
- * @deprecated Use UIMetaFields['ui/hash']
544
- */
545
- hash: string;
546
- /**
547
- * Hydration data for React components.
548
- */
549
- hydrationData?: unknown;
550
- /**
551
- * Structured tool output (JSON-serializable).
552
- */
553
- toolOutput?: unknown;
554
- /**
555
- * Additional metadata for the runtime.
556
- */
557
- metadata?: Record<string, unknown>;
558
- }
559
- /**
560
- * Widget template types supported by the system.
561
- *
562
- * - String: HTML/MDX/Markdown content
563
- * - Builder function: Receives context, returns HTML string
564
- * - React component: SSR'd with props from context
565
- */
566
- export type WidgetTemplate = string | ((ctx: WidgetTemplateContext) => string) | React.ComponentType<WidgetTemplateContext>;
567
- /**
568
- * Context passed to widget templates.
569
- *
570
- * This is a more specific version of `TemplateContext` with
571
- * explicit typing for widget rendering.
572
- */
573
- export interface WidgetTemplateContext<Input = Record<string, unknown>, Output = unknown> {
574
- /**
575
- * Tool input arguments.
576
- */
577
- input: Input;
578
- /**
579
- * Tool output/result.
580
- */
581
- output: Output;
582
- /**
583
- * Structured content parsed from output (if schema provided).
584
- */
585
- structuredContent?: unknown;
586
- /**
587
- * Template helper functions.
588
- */
589
- helpers: WidgetTemplateHelpers;
590
- }
591
- /**
592
- * Helper functions available in widget templates.
593
- */
594
- export interface WidgetTemplateHelpers {
595
- /**
596
- * Escape HTML special characters to prevent XSS.
597
- */
598
- escapeHtml(str: string): string;
599
- /**
600
- * Format a date for display.
601
- * @param date - Date object or ISO string
602
- * @param format - Optional format string
603
- */
604
- formatDate(date: Date | string, format?: string): string;
605
- /**
606
- * Format a number as currency.
607
- * @param amount - Numeric amount
608
- * @param currency - ISO 4217 currency code (default: 'USD')
609
- */
610
- formatCurrency(amount: number, currency?: string): string;
611
- /**
612
- * Generate a unique ID for DOM elements.
613
- * @param prefix - Optional prefix
614
- */
615
- uniqueId(prefix?: string): string;
616
- /**
617
- * Safely embed JSON data in HTML.
618
- * Escapes script-breaking characters.
619
- */
620
- jsonEmbed(data: unknown): string;
621
- /**
622
- * Conditionally join class names.
623
- * @param classes - Class names (falsy values are filtered)
624
- */
625
- classNames(...classes: (string | false | undefined | null)[]): string;
626
- /**
627
- * Format a number with locale-aware separators.
628
- */
629
- formatNumber(value: number, options?: Intl.NumberFormatOptions): string;
630
- }
631
- /**
632
- * Widget configuration for tool UI templates.
633
- *
634
- * This is the main configuration type used in tool decorators
635
- * and standalone widget compilation.
636
- *
637
- * @example
638
- * ```typescript
639
- * const config: WidgetConfig = {
640
- * template: WeatherWidget,
641
- * uiType: 'react',
642
- * bundlingMode: 'static',
643
- * displayMode: 'inline',
644
- * widgetAccessible: true,
645
- * csp: { connectSrc: ['https://api.weather.com'] },
646
- * };
647
- * ```
648
- */
649
- export interface WidgetConfig<Input = Record<string, unknown>, Output = unknown> {
650
- /**
651
- * Widget template.
652
- *
653
- * Supports:
654
- * - HTML string (with optional Handlebars syntax)
655
- * - MDX string
656
- * - Template builder function
657
- * - React component
658
- */
659
- template: WidgetTemplate | ((ctx: WidgetTemplateContext<Input, Output>) => string);
660
- /**
661
- * UI renderer type.
662
- *
663
- * - `'html'`: HTML with optional Handlebars
664
- * - `'react'`: React component (SSR)
665
- * - `'mdx'`: MDX template
666
- * - `'markdown'`: Pure Markdown
667
- * - `'auto'`: Auto-detect from template (default)
668
- *
669
- * @default 'auto'
670
- */
671
- uiType?: UIType;
672
- /**
673
- * Bundling mode.
674
- *
675
- * - `'static'`: Pre-compile widget shell, inject data at runtime (default)
676
- * - `'dynamic'`: Generate fresh HTML per tool invocation
677
- *
678
- * @default 'static'
679
- */
680
- bundlingMode?: BundlingMode;
681
- /**
682
- * Display mode preference.
683
- *
684
- * - `'inline'`: Render inline in conversation (default)
685
- * - `'fullscreen'`: Request fullscreen display
686
- * - `'pip'`: Picture-in-picture mode
687
- *
688
- * @default 'inline'
689
- */
690
- displayMode?: DisplayMode;
691
- /**
692
- * Resource loading mode.
693
- *
694
- * - `'cdn'`: Load React/MDX/Handlebars from CDN URLs (lightweight)
695
- * - `'inline'`: Embed all scripts in HTML (self-contained)
696
- *
697
- * Use 'cdn' for most platforms (OpenAI, ChatGPT, Cursor).
698
- * Use 'inline' for network-blocked environments (Claude Artifacts).
699
- *
700
- * @default 'cdn'
701
- */
702
- resourceMode?: ResourceMode;
703
- /**
704
- * Content Security Policy overrides.
705
- *
706
- * Merged with auto-generated CSP based on uiType.
707
- */
708
- csp?: Partial<CSPDirectives>;
709
- /**
710
- * Whether widget can invoke tools via MCP bridge.
711
- *
712
- * When true, widget gets access to `window.mcpBridge.callTool()`.
713
- *
714
- * @default false
715
- */
716
- widgetAccessible?: boolean;
717
- /**
718
- * Human-readable description shown to users.
719
- * Maps to OpenAI's `openai/widgetDescription`.
720
- */
721
- widgetDescription?: string;
722
- /**
723
- * Runtime options for specific renderers.
724
- */
725
- runtimeOptions?: WidgetRuntimeOptions;
726
- /**
727
- * Custom MDX components available in templates.
728
- */
729
- mdxComponents?: Record<string, any>;
730
- /**
731
- * Status messages during tool invocation (OpenAI-specific).
732
- */
733
- invocationStatus?: {
734
- /** Status text while tool is executing */
735
- invoking?: string;
736
- /** Status text after execution completes */
737
- invoked?: string;
738
- };
739
- /**
740
- * How the widget HTML should be served to the client.
741
- *
742
- * - `'inline'`: HTML embedded directly in tool response `_meta['ui/html']`
743
- * - `'static'`: Pre-compiled at startup, via `ui://` resource URI (MCP resources/read)
744
- * - `'hybrid'`: Shell pre-compiled at startup, component in response
745
- * - `'direct-url'`: HTTP endpoint on MCP server
746
- * - `'custom-url'`: Custom URL (CDN or external hosting)
747
- *
748
- * @default 'inline'
749
- */
750
- servingMode?: WidgetServingMode;
751
- /**
752
- * Custom URL for widget serving when `servingMode: 'custom-url'`.
753
- * The URL can include `{token}` placeholder which will be replaced
754
- * with the widget access token.
755
- *
756
- * @example 'https://cdn.example.com/widgets/weather.html?token={token}'
757
- */
758
- customWidgetUrl?: string;
759
- /**
760
- * Path for direct URL serving when `servingMode: 'direct-url'`.
761
- * This path is appended to the MCP server's base URL.
762
- *
763
- * @example '/widgets/weather'
764
- */
765
- directPath?: string;
766
- /**
767
- * Whether to show a border around the UI widget.
768
- * MCP Apps spec: `_meta.ui.prefersBorder`
769
- *
770
- * @default undefined (host decides)
771
- */
772
- prefersBorder?: boolean;
773
- /**
774
- * Dedicated sandbox domain for the widget.
775
- * MCP Apps spec: `_meta.ui.domain`
776
- *
777
- * @example 'sandbox.example.com'
778
- */
779
- sandboxDomain?: string;
780
- /**
781
- * Enable client-side React hydration after server-side rendering (SSR).
782
- *
783
- * **Default: `false`**
784
- *
785
- * When `false` (default):
786
- * - SSR output is static HTML
787
- * - No React runtime loaded on client
788
- * - Interactivity via FrontMCP Bridge
789
- *
790
- * When `true`:
791
- * - React/ReactDOM scripts included
792
- * - Client attempts hydration
793
- * - May cause hydration errors in MCP clients
794
- *
795
- * @default false
796
- */
797
- hydrate?: boolean;
798
- }
799
- /**
800
- * Runtime options for widget renderers.
801
- */
802
- export interface WidgetRuntimeOptions {
803
- /**
804
- * Enable React hydration after SSR.
805
- *
806
- * **Default: false**
807
- *
808
- * When false (recommended):
809
- * - SSR output is static HTML
810
- * - No React runtime loaded on client
811
- * - Interactivity via FrontMCP Bridge
812
- *
813
- * When true:
814
- * - React/ReactDOM scripts included
815
- * - Client attempts hydration
816
- * - May cause hydration errors in MCP clients
817
- */
818
- hydrate?: boolean;
819
- /**
820
- * Markdown rendering options.
821
- */
822
- markdown?: {
823
- /** Enable GitHub-flavored markdown */
824
- gfm?: boolean;
825
- /** Syntax highlighting theme */
826
- highlightTheme?: string;
827
- /** Custom renderer overrides */
828
- rendererOverrides?: Record<string, unknown>;
829
- };
830
- /**
831
- * Handlebars options (for HTML templates).
832
- */
833
- handlebars?: {
834
- /** Custom helpers to register */
835
- helpers?: Record<string, (...args: unknown[]) => string>;
836
- /** Custom partials */
837
- partials?: Record<string, string>;
838
- /** Strict mode (error on missing variables) */
839
- strict?: boolean;
840
- };
841
- }
842
- /**
843
- * Result of building a widget manifest.
844
- *
845
- * Returned by `buildToolWidgetManifest()` and used
846
- * by `ToolUIRegistry` for caching.
847
- *
848
- * The result contains both:
849
- * - `content`: Just the rendered template (for capable clients like OpenAI)
850
- * - `html`: Complete HTML document (for limited/unknown clients)
851
- *
852
- * Choose which to use based on the target client capabilities.
853
- */
854
- export interface BuildManifestResult {
855
- /**
856
- * Rendered template content (transpiled code).
857
- *
858
- * This is just the template output WITHOUT the wrapper HTML.
859
- * Use this for capable clients (OpenAI, etc.) that provide
860
- * their own runtime environment.
861
- *
862
- * @example
863
- * For a React component, this would be the SSR'd HTML:
864
- * `<div class="weather-card"><h1>72°F</h1><p>Sunny</p></div>`
865
- */
866
- content: string;
867
- /**
868
- * Complete HTML document string.
869
- *
870
- * Contains embedded manifest, FrontMCP Bridge, scripts, and template.
871
- * Use this for limited/unknown MCP clients that need a
872
- * self-contained HTML document.
873
- *
874
- * @example
875
- * `<!DOCTYPE html><html>...<body>{{content}}</body></html>`
876
- */
877
- html: string;
878
- /**
879
- * Widget manifest (also embedded in HTML).
880
- */
881
- manifest: WidgetManifest;
882
- /**
883
- * Content hash for cache validation.
884
- */
885
- hash: string;
886
- /**
887
- * Resolved renderer type.
888
- */
889
- rendererType: UIType;
890
- /**
891
- * Transpiled component code for client-side rendering.
892
- *
893
- * For React/MDX templates, this contains the transpiled component
894
- * that can be embedded in the widget HTML for client-side re-rendering
895
- * when tool output becomes available.
896
- *
897
- * This is used by `wrapStaticWidgetUniversal` for static mode.
898
- */
899
- componentCode?: string;
900
- /**
901
- * Size of content in bytes.
902
- */
903
- contentSize: number;
904
- /**
905
- * Size of full HTML in bytes.
906
- */
907
- htmlSize: number;
908
- /**
909
- * Estimated gzipped size of full HTML.
910
- */
911
- gzipSize: number;
912
- /**
913
- * @deprecated Use `htmlSize` instead
914
- */
915
- size: number;
916
- }
917
- /**
918
- * Options for building a widget manifest.
919
- */
920
- export interface BuildManifestOptions<Input = Record<string, unknown>, Output = unknown> {
921
- /**
922
- * Tool name (unique identifier).
923
- */
924
- toolName: string;
925
- /**
926
- * Widget configuration.
927
- */
928
- uiConfig: WidgetConfig<Input, Output>;
929
- /**
930
- * JSON Schema for tool output.
931
- * Used for validation and type hints.
932
- */
933
- schema?: object;
934
- /**
935
- * Theme configuration override.
936
- */
937
- theme?: any;
938
- /**
939
- * Sample input for SSR (static mode).
940
- * Used during pre-compilation.
941
- */
942
- sampleInput?: Input;
943
- /**
944
- * Sample output for SSR (static mode).
945
- * Used during pre-compilation.
946
- */
947
- sampleOutput?: Output;
948
- /**
949
- * Zod schema for output validation.
950
- *
951
- * When provided in development mode (NODE_ENV !== 'production'),
952
- * the template will be validated against this schema to catch
953
- * Handlebars expressions referencing non-existent fields.
954
- *
955
- * @example
956
- * ```typescript
957
- * outputSchema: z.object({
958
- * temperature: z.number(),
959
- * conditions: z.string(),
960
- * })
961
- * ```
962
- */
963
- outputSchema?: ZodTypeAny;
964
- /**
965
- * Zod schema for input validation.
966
- *
967
- * When provided in development mode (NODE_ENV !== 'production'),
968
- * the template will also validate {{input.*}} expressions.
969
- */
970
- inputSchema?: ZodTypeAny;
971
- }
972
- /**
973
- * Check if a value is a valid UIType.
974
- */
975
- export declare function isUIType(value: unknown): value is UIType;
976
- /**
977
- * Check if a value is a valid BundlingMode.
978
- */
979
- export declare function isBundlingMode(value: unknown): value is BundlingMode;
980
- /**
981
- * Check if a value is a valid ResourceMode.
982
- */
983
- export declare function isResourceMode(value: unknown): value is ResourceMode;
984
- /**
985
- * Check if a value is a valid DisplayMode.
986
- */
987
- export declare function isDisplayMode(value: unknown): value is DisplayMode;
988
- /**
989
- * Check if a value is a valid OutputMode.
990
- */
991
- export declare function isOutputMode(value: unknown): value is OutputMode;
992
- /**
993
- * Default CSP directives for different UI types.
994
- */
995
- export declare const DEFAULT_CSP_BY_TYPE: Record<UIType, CSPDirectives>;
996
- /**
997
- * Default renderer assets for different UI types.
998
- */
999
- export declare const DEFAULT_RENDERER_ASSETS: Record<UIType, Partial<RendererAssets>>;
1000
- /**
1001
- * React namespace declaration for type safety.
1002
- * This allows React.ComponentType to work without importing React.
1003
- */
1004
- declare namespace React {
1005
- type ComponentType<P = any> = (props: P) => any;
1006
- }
1007
- //# sourceMappingURL=ui-runtime.d.ts.map