@frontmcp/ui 0.6.0 → 0.6.1

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 (445) hide show
  1. package/README.md +140 -362
  2. package/bridge/runtime/index.d.ts +2 -1
  3. package/bridge/runtime/index.d.ts.map +1 -1
  4. package/bundler/file-cache/component-builder.d.ts +1 -1
  5. package/bundler/file-cache/component-builder.d.ts.map +1 -1
  6. package/bundler/file-cache/hash-calculator.d.ts +1 -1
  7. package/bundler/file-cache/hash-calculator.d.ts.map +1 -1
  8. package/bundler/file-cache/storage/filesystem.d.ts +1 -1
  9. package/bundler/file-cache/storage/filesystem.d.ts.map +1 -1
  10. package/bundler/file-cache/storage/interface.d.ts +1 -1
  11. package/bundler/file-cache/storage/interface.d.ts.map +1 -1
  12. package/bundler/file-cache/storage/redis.d.ts +1 -1
  13. package/bundler/file-cache/storage/redis.d.ts.map +1 -1
  14. package/bundler/index.js +10 -1057
  15. package/components/alert.schema.d.ts +6 -6
  16. package/components/avatar.schema.d.ts +9 -9
  17. package/components/badge.schema.d.ts +9 -9
  18. package/components/button.schema.d.ts +9 -9
  19. package/components/card.schema.d.ts +7 -7
  20. package/components/form.schema.d.ts +24 -24
  21. package/components/index.js +128 -198
  22. package/components/modal.schema.d.ts +8 -8
  23. package/components/table.schema.d.ts +6 -6
  24. package/esm/bridge/runtime/index.d.ts +2 -1
  25. package/esm/bridge/runtime/index.d.ts.map +1 -1
  26. package/esm/bundler/file-cache/component-builder.d.ts +1 -1
  27. package/esm/bundler/file-cache/component-builder.d.ts.map +1 -1
  28. package/esm/bundler/file-cache/hash-calculator.d.ts +1 -1
  29. package/esm/bundler/file-cache/hash-calculator.d.ts.map +1 -1
  30. package/esm/bundler/file-cache/storage/filesystem.d.ts +1 -1
  31. package/esm/bundler/file-cache/storage/filesystem.d.ts.map +1 -1
  32. package/esm/bundler/file-cache/storage/interface.d.ts +1 -1
  33. package/esm/bundler/file-cache/storage/interface.d.ts.map +1 -1
  34. package/esm/bundler/file-cache/storage/redis.d.ts +1 -1
  35. package/esm/bundler/file-cache/storage/redis.d.ts.map +1 -1
  36. package/esm/bundler/index.js +3 -1050
  37. package/esm/components/alert.schema.d.ts +6 -6
  38. package/esm/components/avatar.schema.d.ts +9 -9
  39. package/esm/components/badge.schema.d.ts +9 -9
  40. package/esm/components/button.schema.d.ts +9 -9
  41. package/esm/components/card.schema.d.ts +7 -7
  42. package/esm/components/form.schema.d.ts +24 -24
  43. package/esm/components/index.js +136 -196
  44. package/esm/components/modal.schema.d.ts +8 -8
  45. package/esm/components/table.schema.d.ts +6 -6
  46. package/esm/index.d.ts +23 -39
  47. package/esm/index.d.ts.map +1 -1
  48. package/esm/index.js +4256 -16441
  49. package/esm/layouts/base.d.ts +2 -2
  50. package/esm/layouts/base.d.ts.map +1 -1
  51. package/esm/layouts/index.js +33 -516
  52. package/esm/package.json +8 -26
  53. package/esm/pages/index.js +100 -627
  54. package/esm/react/Alert.d.ts +1 -2
  55. package/esm/react/Alert.d.ts.map +1 -1
  56. package/esm/react/Badge.d.ts +1 -2
  57. package/esm/react/Badge.d.ts.map +1 -1
  58. package/esm/react/Button.d.ts +1 -2
  59. package/esm/react/Button.d.ts.map +1 -1
  60. package/esm/react/Card.d.ts +1 -2
  61. package/esm/react/Card.d.ts.map +1 -1
  62. package/esm/react/hooks/context.d.ts +1 -1
  63. package/esm/react/hooks/context.d.ts.map +1 -1
  64. package/esm/react/index.d.ts +5 -6
  65. package/esm/react/index.d.ts.map +1 -1
  66. package/esm/react/index.js +2074 -322
  67. package/esm/react/types.d.ts +1 -2
  68. package/esm/react/types.d.ts.map +1 -1
  69. package/esm/renderers/index.d.ts +10 -25
  70. package/esm/renderers/index.d.ts.map +1 -1
  71. package/esm/renderers/index.js +171 -1617
  72. package/esm/{runtime/adapters → renderers}/react.adapter.d.ts +2 -2
  73. package/esm/renderers/react.adapter.d.ts.map +1 -0
  74. package/esm/renderers/react.renderer.d.ts +3 -3
  75. package/esm/renderers/react.renderer.d.ts.map +1 -1
  76. package/esm/universal/index.js +1755 -0
  77. package/esm/web-components/index.js +232 -287
  78. package/esm/widgets/index.js +89 -147
  79. package/index.d.ts +23 -39
  80. package/index.d.ts.map +1 -1
  81. package/index.js +6123 -18539
  82. package/layouts/base.d.ts +2 -2
  83. package/layouts/base.d.ts.map +1 -1
  84. package/layouts/index.js +43 -536
  85. package/package.json +8 -26
  86. package/pages/index.js +111 -648
  87. package/react/Alert.d.ts +1 -2
  88. package/react/Alert.d.ts.map +1 -1
  89. package/react/Badge.d.ts +1 -2
  90. package/react/Badge.d.ts.map +1 -1
  91. package/react/Button.d.ts +1 -2
  92. package/react/Button.d.ts.map +1 -1
  93. package/react/Card.d.ts +1 -2
  94. package/react/Card.d.ts.map +1 -1
  95. package/react/hooks/context.d.ts +1 -1
  96. package/react/hooks/context.d.ts.map +1 -1
  97. package/react/index.d.ts +5 -6
  98. package/react/index.d.ts.map +1 -1
  99. package/react/index.js +2065 -335
  100. package/react/types.d.ts +1 -2
  101. package/react/types.d.ts.map +1 -1
  102. package/renderers/index.d.ts +10 -25
  103. package/renderers/index.d.ts.map +1 -1
  104. package/renderers/index.js +175 -1641
  105. package/{runtime/adapters → renderers}/react.adapter.d.ts +2 -2
  106. package/renderers/react.adapter.d.ts.map +1 -0
  107. package/renderers/react.renderer.d.ts +3 -3
  108. package/renderers/react.renderer.d.ts.map +1 -1
  109. package/universal/index.js +1841 -0
  110. package/web-components/index.js +224 -289
  111. package/widgets/index.js +80 -148
  112. package/adapters/index.d.ts +0 -13
  113. package/adapters/index.d.ts.map +0 -1
  114. package/adapters/index.js +0 -462
  115. package/adapters/platform-meta.d.ts +0 -166
  116. package/adapters/platform-meta.d.ts.map +0 -1
  117. package/adapters/response-builder.d.ts +0 -108
  118. package/adapters/response-builder.d.ts.map +0 -1
  119. package/adapters/serving-mode.d.ts +0 -107
  120. package/adapters/serving-mode.d.ts.map +0 -1
  121. package/base-template/bridge.d.ts +0 -90
  122. package/base-template/bridge.d.ts.map +0 -1
  123. package/base-template/default-base-template.d.ts +0 -92
  124. package/base-template/default-base-template.d.ts.map +0 -1
  125. package/base-template/index.d.ts +0 -15
  126. package/base-template/index.d.ts.map +0 -1
  127. package/base-template/index.js +0 -1398
  128. package/base-template/polyfills.d.ts +0 -31
  129. package/base-template/polyfills.d.ts.map +0 -1
  130. package/base-template/theme-styles.d.ts +0 -74
  131. package/base-template/theme-styles.d.ts.map +0 -1
  132. package/build/cdn-resources.d.ts +0 -243
  133. package/build/cdn-resources.d.ts.map +0 -1
  134. package/build/index.d.ts +0 -295
  135. package/build/index.d.ts.map +0 -1
  136. package/build/index.js +0 -7096
  137. package/build/widget-manifest.d.ts +0 -362
  138. package/build/widget-manifest.d.ts.map +0 -1
  139. package/dependency/cdn-registry.d.ts +0 -98
  140. package/dependency/cdn-registry.d.ts.map +0 -1
  141. package/dependency/import-map.d.ts +0 -186
  142. package/dependency/import-map.d.ts.map +0 -1
  143. package/dependency/import-parser.d.ts +0 -82
  144. package/dependency/import-parser.d.ts.map +0 -1
  145. package/dependency/index.d.ts +0 -17
  146. package/dependency/index.d.ts.map +0 -1
  147. package/dependency/resolver.d.ts +0 -164
  148. package/dependency/resolver.d.ts.map +0 -1
  149. package/dependency/schemas.d.ts +0 -486
  150. package/dependency/schemas.d.ts.map +0 -1
  151. package/dependency/template-loader.d.ts +0 -204
  152. package/dependency/template-loader.d.ts.map +0 -1
  153. package/dependency/template-processor.d.ts +0 -118
  154. package/dependency/template-processor.d.ts.map +0 -1
  155. package/dependency/types.d.ts +0 -739
  156. package/dependency/types.d.ts.map +0 -1
  157. package/esm/adapters/index.d.ts +0 -13
  158. package/esm/adapters/index.d.ts.map +0 -1
  159. package/esm/adapters/index.js +0 -427
  160. package/esm/adapters/platform-meta.d.ts +0 -166
  161. package/esm/adapters/platform-meta.d.ts.map +0 -1
  162. package/esm/adapters/response-builder.d.ts +0 -108
  163. package/esm/adapters/response-builder.d.ts.map +0 -1
  164. package/esm/adapters/serving-mode.d.ts +0 -107
  165. package/esm/adapters/serving-mode.d.ts.map +0 -1
  166. package/esm/base-template/bridge.d.ts +0 -90
  167. package/esm/base-template/bridge.d.ts.map +0 -1
  168. package/esm/base-template/default-base-template.d.ts +0 -92
  169. package/esm/base-template/default-base-template.d.ts.map +0 -1
  170. package/esm/base-template/index.d.ts +0 -15
  171. package/esm/base-template/index.d.ts.map +0 -1
  172. package/esm/base-template/index.js +0 -1364
  173. package/esm/base-template/polyfills.d.ts +0 -31
  174. package/esm/base-template/polyfills.d.ts.map +0 -1
  175. package/esm/base-template/theme-styles.d.ts +0 -74
  176. package/esm/base-template/theme-styles.d.ts.map +0 -1
  177. package/esm/build/cdn-resources.d.ts +0 -243
  178. package/esm/build/cdn-resources.d.ts.map +0 -1
  179. package/esm/build/index.d.ts +0 -295
  180. package/esm/build/index.d.ts.map +0 -1
  181. package/esm/build/index.js +0 -7021
  182. package/esm/build/widget-manifest.d.ts +0 -362
  183. package/esm/build/widget-manifest.d.ts.map +0 -1
  184. package/esm/dependency/cdn-registry.d.ts +0 -98
  185. package/esm/dependency/cdn-registry.d.ts.map +0 -1
  186. package/esm/dependency/import-map.d.ts +0 -186
  187. package/esm/dependency/import-map.d.ts.map +0 -1
  188. package/esm/dependency/import-parser.d.ts +0 -82
  189. package/esm/dependency/import-parser.d.ts.map +0 -1
  190. package/esm/dependency/index.d.ts +0 -17
  191. package/esm/dependency/index.d.ts.map +0 -1
  192. package/esm/dependency/resolver.d.ts +0 -164
  193. package/esm/dependency/resolver.d.ts.map +0 -1
  194. package/esm/dependency/schemas.d.ts +0 -486
  195. package/esm/dependency/schemas.d.ts.map +0 -1
  196. package/esm/dependency/template-loader.d.ts +0 -204
  197. package/esm/dependency/template-loader.d.ts.map +0 -1
  198. package/esm/dependency/template-processor.d.ts +0 -118
  199. package/esm/dependency/template-processor.d.ts.map +0 -1
  200. package/esm/dependency/types.d.ts +0 -739
  201. package/esm/dependency/types.d.ts.map +0 -1
  202. package/esm/handlebars/expression-extractor.d.ts +0 -147
  203. package/esm/handlebars/expression-extractor.d.ts.map +0 -1
  204. package/esm/handlebars/helpers.d.ts +0 -339
  205. package/esm/handlebars/helpers.d.ts.map +0 -1
  206. package/esm/handlebars/index.d.ts +0 -195
  207. package/esm/handlebars/index.d.ts.map +0 -1
  208. package/esm/handlebars/index.js +0 -587
  209. package/esm/registry/index.d.ts +0 -46
  210. package/esm/registry/index.d.ts.map +0 -1
  211. package/esm/registry/index.js +0 -6422
  212. package/esm/registry/render-template.d.ts +0 -91
  213. package/esm/registry/render-template.d.ts.map +0 -1
  214. package/esm/registry/tool-ui.registry.d.ts +0 -294
  215. package/esm/registry/tool-ui.registry.d.ts.map +0 -1
  216. package/esm/registry/uri-utils.d.ts +0 -56
  217. package/esm/registry/uri-utils.d.ts.map +0 -1
  218. package/esm/renderers/cache.d.ts +0 -145
  219. package/esm/renderers/cache.d.ts.map +0 -1
  220. package/esm/renderers/html.renderer.d.ts +0 -123
  221. package/esm/renderers/html.renderer.d.ts.map +0 -1
  222. package/esm/renderers/mdx.renderer.d.ts +0 -120
  223. package/esm/renderers/mdx.renderer.d.ts.map +0 -1
  224. package/esm/renderers/registry.d.ts +0 -134
  225. package/esm/renderers/registry.d.ts.map +0 -1
  226. package/esm/renderers/types.d.ts +0 -342
  227. package/esm/renderers/types.d.ts.map +0 -1
  228. package/esm/renderers/utils/detect.d.ts +0 -107
  229. package/esm/renderers/utils/detect.d.ts.map +0 -1
  230. package/esm/renderers/utils/hash.d.ts +0 -40
  231. package/esm/renderers/utils/hash.d.ts.map +0 -1
  232. package/esm/renderers/utils/index.d.ts +0 -9
  233. package/esm/renderers/utils/index.d.ts.map +0 -1
  234. package/esm/renderers/utils/transpiler.d.ts +0 -89
  235. package/esm/renderers/utils/transpiler.d.ts.map +0 -1
  236. package/esm/runtime/adapters/html.adapter.d.ts +0 -59
  237. package/esm/runtime/adapters/html.adapter.d.ts.map +0 -1
  238. package/esm/runtime/adapters/index.d.ts +0 -26
  239. package/esm/runtime/adapters/index.d.ts.map +0 -1
  240. package/esm/runtime/adapters/mdx.adapter.d.ts +0 -73
  241. package/esm/runtime/adapters/mdx.adapter.d.ts.map +0 -1
  242. package/esm/runtime/adapters/react.adapter.d.ts.map +0 -1
  243. package/esm/runtime/adapters/types.d.ts +0 -95
  244. package/esm/runtime/adapters/types.d.ts.map +0 -1
  245. package/esm/runtime/csp.d.ts +0 -48
  246. package/esm/runtime/csp.d.ts.map +0 -1
  247. package/esm/runtime/index.d.ts +0 -17
  248. package/esm/runtime/index.d.ts.map +0 -1
  249. package/esm/runtime/index.js +0 -5186
  250. package/esm/runtime/mcp-bridge.d.ts +0 -101
  251. package/esm/runtime/mcp-bridge.d.ts.map +0 -1
  252. package/esm/runtime/renderer-runtime.d.ts +0 -133
  253. package/esm/runtime/renderer-runtime.d.ts.map +0 -1
  254. package/esm/runtime/sanitizer.d.ts +0 -172
  255. package/esm/runtime/sanitizer.d.ts.map +0 -1
  256. package/esm/runtime/types.d.ts +0 -415
  257. package/esm/runtime/types.d.ts.map +0 -1
  258. package/esm/runtime/wrapper.d.ts +0 -421
  259. package/esm/runtime/wrapper.d.ts.map +0 -1
  260. package/esm/styles/index.d.ts +0 -8
  261. package/esm/styles/index.d.ts.map +0 -1
  262. package/esm/styles/index.js +0 -171
  263. package/esm/styles/variants.d.ts +0 -51
  264. package/esm/styles/variants.d.ts.map +0 -1
  265. package/esm/theme/cdn.d.ts +0 -195
  266. package/esm/theme/cdn.d.ts.map +0 -1
  267. package/esm/theme/index.d.ts +0 -18
  268. package/esm/theme/index.d.ts.map +0 -1
  269. package/esm/theme/index.js +0 -700
  270. package/esm/theme/platforms.d.ts +0 -107
  271. package/esm/theme/platforms.d.ts.map +0 -1
  272. package/esm/theme/presets/github-openai.d.ts +0 -50
  273. package/esm/theme/presets/github-openai.d.ts.map +0 -1
  274. package/esm/theme/presets/index.d.ts +0 -11
  275. package/esm/theme/presets/index.d.ts.map +0 -1
  276. package/esm/theme/theme.d.ts +0 -396
  277. package/esm/theme/theme.d.ts.map +0 -1
  278. package/esm/tool-template/builder.d.ts +0 -213
  279. package/esm/tool-template/builder.d.ts.map +0 -1
  280. package/esm/tool-template/index.d.ts +0 -16
  281. package/esm/tool-template/index.d.ts.map +0 -1
  282. package/esm/tool-template/index.js +0 -3515
  283. package/esm/types/index.d.ts +0 -14
  284. package/esm/types/index.d.ts.map +0 -1
  285. package/esm/types/index.js +0 -75
  286. package/esm/types/ui-config.d.ts +0 -639
  287. package/esm/types/ui-config.d.ts.map +0 -1
  288. package/esm/types/ui-runtime.d.ts +0 -1007
  289. package/esm/types/ui-runtime.d.ts.map +0 -1
  290. package/esm/typings/cache/cache-adapter.d.ts +0 -125
  291. package/esm/typings/cache/cache-adapter.d.ts.map +0 -1
  292. package/esm/typings/cache/index.d.ts +0 -10
  293. package/esm/typings/cache/index.d.ts.map +0 -1
  294. package/esm/typings/cache/memory-cache.d.ts +0 -92
  295. package/esm/typings/cache/memory-cache.d.ts.map +0 -1
  296. package/esm/typings/dts-parser.d.ts +0 -90
  297. package/esm/typings/dts-parser.d.ts.map +0 -1
  298. package/esm/typings/index.d.ts +0 -48
  299. package/esm/typings/index.d.ts.map +0 -1
  300. package/esm/typings/schemas.d.ts +0 -232
  301. package/esm/typings/schemas.d.ts.map +0 -1
  302. package/esm/typings/type-fetcher.d.ts +0 -89
  303. package/esm/typings/type-fetcher.d.ts.map +0 -1
  304. package/esm/typings/types.d.ts +0 -320
  305. package/esm/typings/types.d.ts.map +0 -1
  306. package/esm/utils/escape-html.d.ts +0 -58
  307. package/esm/utils/escape-html.d.ts.map +0 -1
  308. package/esm/utils/index.d.ts +0 -10
  309. package/esm/utils/index.d.ts.map +0 -1
  310. package/esm/utils/index.js +0 -40
  311. package/esm/utils/safe-stringify.d.ts +0 -30
  312. package/esm/utils/safe-stringify.d.ts.map +0 -1
  313. package/esm/validation/error-box.d.ts +0 -56
  314. package/esm/validation/error-box.d.ts.map +0 -1
  315. package/esm/validation/index.d.ts +0 -13
  316. package/esm/validation/index.d.ts.map +0 -1
  317. package/esm/validation/index.js +0 -562
  318. package/esm/validation/schema-paths.d.ts +0 -118
  319. package/esm/validation/schema-paths.d.ts.map +0 -1
  320. package/esm/validation/template-validator.d.ts +0 -143
  321. package/esm/validation/template-validator.d.ts.map +0 -1
  322. package/esm/validation/wrapper.d.ts +0 -97
  323. package/esm/validation/wrapper.d.ts.map +0 -1
  324. package/handlebars/expression-extractor.d.ts +0 -147
  325. package/handlebars/expression-extractor.d.ts.map +0 -1
  326. package/handlebars/helpers.d.ts +0 -339
  327. package/handlebars/helpers.d.ts.map +0 -1
  328. package/handlebars/index.d.ts +0 -195
  329. package/handlebars/index.d.ts.map +0 -1
  330. package/handlebars/index.js +0 -666
  331. package/registry/index.d.ts +0 -46
  332. package/registry/index.d.ts.map +0 -1
  333. package/registry/index.js +0 -6465
  334. package/registry/render-template.d.ts +0 -91
  335. package/registry/render-template.d.ts.map +0 -1
  336. package/registry/tool-ui.registry.d.ts +0 -294
  337. package/registry/tool-ui.registry.d.ts.map +0 -1
  338. package/registry/uri-utils.d.ts +0 -56
  339. package/registry/uri-utils.d.ts.map +0 -1
  340. package/renderers/cache.d.ts +0 -145
  341. package/renderers/cache.d.ts.map +0 -1
  342. package/renderers/html.renderer.d.ts +0 -123
  343. package/renderers/html.renderer.d.ts.map +0 -1
  344. package/renderers/mdx.renderer.d.ts +0 -120
  345. package/renderers/mdx.renderer.d.ts.map +0 -1
  346. package/renderers/registry.d.ts +0 -134
  347. package/renderers/registry.d.ts.map +0 -1
  348. package/renderers/types.d.ts +0 -342
  349. package/renderers/types.d.ts.map +0 -1
  350. package/renderers/utils/detect.d.ts +0 -107
  351. package/renderers/utils/detect.d.ts.map +0 -1
  352. package/renderers/utils/hash.d.ts +0 -40
  353. package/renderers/utils/hash.d.ts.map +0 -1
  354. package/renderers/utils/index.d.ts +0 -9
  355. package/renderers/utils/index.d.ts.map +0 -1
  356. package/renderers/utils/transpiler.d.ts +0 -89
  357. package/renderers/utils/transpiler.d.ts.map +0 -1
  358. package/runtime/adapters/html.adapter.d.ts +0 -59
  359. package/runtime/adapters/html.adapter.d.ts.map +0 -1
  360. package/runtime/adapters/index.d.ts +0 -26
  361. package/runtime/adapters/index.d.ts.map +0 -1
  362. package/runtime/adapters/mdx.adapter.d.ts +0 -73
  363. package/runtime/adapters/mdx.adapter.d.ts.map +0 -1
  364. package/runtime/adapters/react.adapter.d.ts.map +0 -1
  365. package/runtime/adapters/types.d.ts +0 -95
  366. package/runtime/adapters/types.d.ts.map +0 -1
  367. package/runtime/csp.d.ts +0 -48
  368. package/runtime/csp.d.ts.map +0 -1
  369. package/runtime/index.d.ts +0 -17
  370. package/runtime/index.d.ts.map +0 -1
  371. package/runtime/index.js +0 -5264
  372. package/runtime/mcp-bridge.d.ts +0 -101
  373. package/runtime/mcp-bridge.d.ts.map +0 -1
  374. package/runtime/renderer-runtime.d.ts +0 -133
  375. package/runtime/renderer-runtime.d.ts.map +0 -1
  376. package/runtime/sanitizer.d.ts +0 -172
  377. package/runtime/sanitizer.d.ts.map +0 -1
  378. package/runtime/types.d.ts +0 -415
  379. package/runtime/types.d.ts.map +0 -1
  380. package/runtime/wrapper.d.ts +0 -421
  381. package/runtime/wrapper.d.ts.map +0 -1
  382. package/styles/index.d.ts +0 -8
  383. package/styles/index.d.ts.map +0 -1
  384. package/styles/index.js +0 -222
  385. package/styles/variants.d.ts +0 -51
  386. package/styles/variants.d.ts.map +0 -1
  387. package/theme/cdn.d.ts +0 -195
  388. package/theme/cdn.d.ts.map +0 -1
  389. package/theme/index.d.ts +0 -18
  390. package/theme/index.d.ts.map +0 -1
  391. package/theme/index.js +0 -757
  392. package/theme/platforms.d.ts +0 -107
  393. package/theme/platforms.d.ts.map +0 -1
  394. package/theme/presets/github-openai.d.ts +0 -50
  395. package/theme/presets/github-openai.d.ts.map +0 -1
  396. package/theme/presets/index.d.ts +0 -11
  397. package/theme/presets/index.d.ts.map +0 -1
  398. package/theme/theme.d.ts +0 -396
  399. package/theme/theme.d.ts.map +0 -1
  400. package/tool-template/builder.d.ts +0 -213
  401. package/tool-template/builder.d.ts.map +0 -1
  402. package/tool-template/index.d.ts +0 -16
  403. package/tool-template/index.d.ts.map +0 -1
  404. package/tool-template/index.js +0 -3559
  405. package/types/index.d.ts +0 -14
  406. package/types/index.d.ts.map +0 -1
  407. package/types/index.js +0 -108
  408. package/types/ui-config.d.ts +0 -639
  409. package/types/ui-config.d.ts.map +0 -1
  410. package/types/ui-runtime.d.ts +0 -1007
  411. package/types/ui-runtime.d.ts.map +0 -1
  412. package/typings/cache/cache-adapter.d.ts +0 -125
  413. package/typings/cache/cache-adapter.d.ts.map +0 -1
  414. package/typings/cache/index.d.ts +0 -10
  415. package/typings/cache/index.d.ts.map +0 -1
  416. package/typings/cache/memory-cache.d.ts +0 -92
  417. package/typings/cache/memory-cache.d.ts.map +0 -1
  418. package/typings/dts-parser.d.ts +0 -90
  419. package/typings/dts-parser.d.ts.map +0 -1
  420. package/typings/index.d.ts +0 -48
  421. package/typings/index.d.ts.map +0 -1
  422. package/typings/schemas.d.ts +0 -232
  423. package/typings/schemas.d.ts.map +0 -1
  424. package/typings/type-fetcher.d.ts +0 -89
  425. package/typings/type-fetcher.d.ts.map +0 -1
  426. package/typings/types.d.ts +0 -320
  427. package/typings/types.d.ts.map +0 -1
  428. package/utils/escape-html.d.ts +0 -58
  429. package/utils/escape-html.d.ts.map +0 -1
  430. package/utils/index.d.ts +0 -10
  431. package/utils/index.d.ts.map +0 -1
  432. package/utils/index.js +0 -70
  433. package/utils/safe-stringify.d.ts +0 -30
  434. package/utils/safe-stringify.d.ts.map +0 -1
  435. package/validation/error-box.d.ts +0 -56
  436. package/validation/error-box.d.ts.map +0 -1
  437. package/validation/index.d.ts +0 -13
  438. package/validation/index.d.ts.map +0 -1
  439. package/validation/index.js +0 -603
  440. package/validation/schema-paths.d.ts +0 -118
  441. package/validation/schema-paths.d.ts.map +0 -1
  442. package/validation/template-validator.d.ts +0 -143
  443. package/validation/template-validator.d.ts.map +0 -1
  444. package/validation/wrapper.d.ts +0 -97
  445. package/validation/wrapper.d.ts.map +0 -1
@@ -1,639 +0,0 @@
1
- /**
2
- * Standalone UI Configuration Types
3
- *
4
- * SDK-independent types for configuring UI templates.
5
- * These types can be used by external consumers (like AgentLink)
6
- * without requiring @frontmcp/sdk as a dependency.
7
- *
8
- * @packageDocumentation
9
- */
10
- import type { CDNDependency, FileBundleOptions } from '../dependency/types';
11
- /**
12
- * Content Security Policy for UI templates rendered in sandboxed iframes.
13
- * Based on OpenAI Apps SDK and MCP Apps (SEP-1865) specifications.
14
- */
15
- export interface UIContentSecurityPolicy {
16
- /**
17
- * Origins allowed for fetch/XHR/WebSocket connections.
18
- * Maps to CSP `connect-src` directive.
19
- * @example ['https://api.example.com', 'https://*.myservice.com']
20
- */
21
- connectDomains?: string[];
22
- /**
23
- * Origins allowed for images, scripts, fonts, and styles.
24
- * Maps to CSP `img-src`, `script-src`, `style-src`, `font-src` directives.
25
- * @example ['https://cdn.example.com']
26
- */
27
- resourceDomains?: string[];
28
- }
29
- /**
30
- * XSS protection and content security settings.
31
- *
32
- * Controls sanitization of HTML content rendered in widgets.
33
- * By default, strict sanitization is applied to prevent XSS attacks.
34
- *
35
- * ## Platform Isolation Context
36
- *
37
- * Both OpenAI and Claude render widgets in **double-iframe isolation**:
38
- *
39
- * ```
40
- * ┌─────────────────────────────────────────────────┐
41
- * │ ChatGPT / Claude Desktop │
42
- * │ ┌─────────────────────────────────────────────┐│
43
- * │ │ Outer Sandbox Iframe ││
44
- * │ │ - sandbox="allow-scripts allow-same-origin"││
45
- * │ │ - No access to parent cookies ││
46
- * │ │ ┌─────────────────────────────────────────┐││
47
- * │ │ │ Inner Widget Iframe │││
48
- * │ │ │ - CSP: script-src 'self' 'unsafe-inline'│││
49
- * │ │ │ - CSP: connect-src based on config │││
50
- * │ │ │ - Your widget HTML renders here │││
51
- * │ │ └─────────────────────────────────────────┘││
52
- * │ └─────────────────────────────────────────────┘│
53
- * └─────────────────────────────────────────────────┘
54
- * ```
55
- *
56
- * This isolation means XSS attacks are **contained** but can still:
57
- * - Access widget data (input/output)
58
- * - Make API calls within CSP-allowed domains
59
- * - Display fake/phishing UI to users
60
- *
61
- * **Recommendation:** Only disable protection for fully trusted content.
62
- */
63
- export interface UIContentSecurity {
64
- /**
65
- * Allow `javascript:` and other potentially dangerous URL schemes in links.
66
- *
67
- * When `false` (default), URLs are validated to only allow:
68
- * - `http://`, `https://` (web URLs)
69
- * - `/`, `#` (relative paths, anchors)
70
- * - `mailto:` (email links)
71
- *
72
- * When `true`, allows any URL scheme including:
73
- * - `javascript:` (inline script execution)
74
- * - `data:` (data URIs)
75
- * - `vbscript:` (legacy script)
76
- *
77
- * @default false
78
- */
79
- allowUnsafeLinks?: boolean;
80
- /**
81
- * Allow inline `<script>` tags and event handlers (onclick, onerror, etc).
82
- *
83
- * When `false` (default), HTML content is sanitized to remove:
84
- * - `<script>...</script>` tags
85
- * - Event handler attributes (`onclick`, `onerror`, `onload`, etc.)
86
- *
87
- * When `true`, these elements are preserved in the output.
88
- *
89
- * **Note:** Even with this enabled, CSP may still block script execution
90
- * depending on the platform's iframe sandbox settings.
91
- *
92
- * @default false
93
- */
94
- allowInlineScripts?: boolean;
95
- /**
96
- * Completely bypass all HTML sanitization.
97
- *
98
- * **⚠️ DANGEROUS:** Only use with fully trusted, server-generated content.
99
- *
100
- * When `true`, no sanitization is applied:
101
- * - Script tags are preserved
102
- * - Event handlers are preserved
103
- * - All URL schemes are allowed
104
- * - No HTML escaping is performed
105
- *
106
- * This is useful for:
107
- * - Embedding trusted third-party widgets
108
- * - Complex interactive dashboards from trusted sources
109
- * - Content that was pre-sanitized server-side
110
- *
111
- * @default false
112
- */
113
- bypassSanitization?: boolean;
114
- }
115
- /**
116
- * Helper functions available in template context.
117
- */
118
- export interface TemplateHelpers {
119
- /**
120
- * Escape HTML special characters to prevent XSS.
121
- */
122
- escapeHtml: (str: string) => string;
123
- /**
124
- * Format a date for display.
125
- * @param date - Date object or ISO string
126
- * @param format - Optional format (default: localized date)
127
- */
128
- formatDate: (date: Date | string, format?: string) => string;
129
- /**
130
- * Format a number as currency.
131
- * @param amount - The numeric amount
132
- * @param currency - ISO 4217 currency code (default: 'USD')
133
- */
134
- formatCurrency: (amount: number, currency?: string) => string;
135
- /**
136
- * Generate a unique ID for DOM elements.
137
- * @param prefix - Optional prefix for the ID
138
- */
139
- uniqueId: (prefix?: string) => string;
140
- /**
141
- * Safely embed JSON data in HTML (escapes script-breaking characters).
142
- */
143
- jsonEmbed: (data: unknown) => string;
144
- }
145
- /**
146
- * Context passed to template builder functions.
147
- * Contains all data needed to render a tool's UI template.
148
- */
149
- export interface TemplateContext<In = unknown, Out = unknown> {
150
- /**
151
- * The input arguments passed to the tool.
152
- */
153
- input: In;
154
- /**
155
- * The raw output returned by the tool's execute method.
156
- */
157
- output: Out;
158
- /**
159
- * The structured content parsed from the output (if outputSchema was provided).
160
- * This is the JSON-serializable form suitable for widget consumption.
161
- */
162
- structuredContent?: unknown;
163
- /**
164
- * Helper functions for template rendering.
165
- */
166
- helpers: TemplateHelpers;
167
- }
168
- /**
169
- * Template builder function type.
170
- * Receives context with input/output and returns HTML string.
171
- */
172
- export type TemplateBuilderFn<In = unknown, Out = unknown> = (ctx: TemplateContext<In, Out>) => string;
173
- /**
174
- * Widget serving mode determines how the widget HTML is delivered to the client.
175
- *
176
- * - `'auto'` (default): Automatically select mode based on client capabilities.
177
- * For OpenAI/ext-apps: uses 'inline'. For Claude: uses 'inline' with dual-payload.
178
- * For unsupported clients (e.g., Gemini): skips UI entirely (returns JSON only).
179
- *
180
- * - `'inline'`: HTML embedded directly in tool response `_meta['ui/html']`.
181
- * Works on all platforms including network-blocked ones.
182
- *
183
- * - `'static'`: Pre-compiled at startup, resolved via `tools/list` (ui:// resource URI).
184
- * Widget is fetched via MCP `resources/read`.
185
- *
186
- * - `'hybrid'`: Shell (React runtime + bridge) pre-compiled at startup.
187
- * Component code transpiled per-request and delivered in `_meta['ui/component']`.
188
- *
189
- * - `'direct-url'`: HTTP endpoint on MCP server.
190
- *
191
- * - `'custom-url'`: Custom URL (CDN or external hosting).
192
- */
193
- export type WidgetServingMode = 'auto' | 'inline' | 'static' | 'hybrid' | 'direct-url' | 'custom-url';
194
- /**
195
- * @deprecated Use 'static' instead of 'mcp-resource'. Will be removed in v2.0.
196
- * Alias maintained for backwards compatibility.
197
- */
198
- export type WidgetServingModeLegacy = 'mcp-resource';
199
- /**
200
- * Widget display mode preference.
201
- */
202
- export type WidgetDisplayMode = 'inline' | 'fullscreen' | 'pip';
203
- /**
204
- * UI template configuration for tools.
205
- * Enables rendering interactive widgets for tool responses in supported hosts
206
- * (OpenAI Apps SDK, Claude/MCP-UI, etc.).
207
- *
208
- * This is a standalone type that doesn't depend on @frontmcp/sdk.
209
- * Use this type in external systems (like AgentLink) that consume @frontmcp/ui.
210
- *
211
- * @example
212
- * ```typescript
213
- * const uiConfig: UITemplateConfig = {
214
- * template: (ctx) => `
215
- * <div class="p-4">
216
- * <h2>${ctx.helpers.escapeHtml(ctx.input.location)}</h2>
217
- * <p>${ctx.output.temperature}°F</p>
218
- * </div>
219
- * `,
220
- * csp: { connectDomains: ['https://api.weather.com'] },
221
- * widgetAccessible: true,
222
- * widgetDescription: 'Displays current weather conditions',
223
- * };
224
- * ```
225
- */
226
- export interface UITemplateConfig<In = unknown, Out = unknown> {
227
- /**
228
- * Template for rendering tool UI.
229
- *
230
- * Supports multiple formats (auto-detected by renderer):
231
- * - Template builder function: `(ctx) => string` - receives input/output/helpers, returns HTML
232
- * - Static HTML/MDX string: `"<div>...</div>"` or `"# Title\n<Card />"`
233
- * - React component: `MyWidget` - receives props with input/output/helpers
234
- */
235
- template: TemplateBuilderFn<In, Out> | string | ((props: any) => any);
236
- /**
237
- * Content Security Policy for the sandboxed widget.
238
- * Controls which external resources the widget can access.
239
- */
240
- csp?: UIContentSecurityPolicy;
241
- /**
242
- * Content security and XSS protection settings.
243
- *
244
- * By default, FrontMCP sanitizes HTML content to prevent XSS attacks:
245
- * - Removes `<script>` tags and event handlers (onclick, onerror, etc.)
246
- * - Validates URL schemes in links (blocks `javascript:`, `data:`, `vbscript:`)
247
- *
248
- * These protections can be disabled for trusted content that requires
249
- * inline scripts, custom event handlers, or special URL schemes.
250
- *
251
- * ## Security Context
252
- *
253
- * **OpenAI/Claude run widgets in double-iframe isolation:**
254
- * - Outer sandbox iframe with restricted permissions
255
- * - Inner content iframe with CSP headers
256
- * - No access to parent window or cookies
257
- * - Network requests restricted by CSP
258
- *
259
- * This isolation provides defense-in-depth, making XSS less impactful.
260
- * However, XSS can still:
261
- * - Steal widget state/data
262
- * - Make unauthorized API calls (within CSP limits)
263
- * - Phish users with fake UI
264
- *
265
- * **Best Practice:** Keep XSS protection enabled unless you have a specific
266
- * need for inline scripts/handlers AND trust your content source completely.
267
- *
268
- * @example
269
- * ```typescript
270
- * // Default: Full XSS protection
271
- * ui: { template: MyWidget }
272
- *
273
- * // Allow inline scripts for trusted dashboard
274
- * ui: {
275
- * template: TrustedDashboard,
276
- * contentSecurity: { allowInlineScripts: true }
277
- * }
278
- *
279
- * // Bypass all sanitization for fully trusted HTML
280
- * ui: {
281
- * template: FullyTrustedContent,
282
- * contentSecurity: { bypassSanitization: true }
283
- * }
284
- * ```
285
- */
286
- contentSecurity?: UIContentSecurity;
287
- /**
288
- * Whether the widget can invoke tools via the MCP bridge.
289
- * When true, the widget gains access to `window.mcpBridge.callTool()`.
290
- * Maps to OpenAI's `openai/widgetAccessible` annotation.
291
- *
292
- * Default: false
293
- */
294
- widgetAccessible?: boolean;
295
- /**
296
- * Preferred display mode for the widget.
297
- * - 'inline': Rendered inline in the conversation (default)
298
- * - 'fullscreen': Request fullscreen display
299
- * - 'pip': Picture-in-picture mode
300
- *
301
- * Note: Host may not support all modes; this is a preference hint.
302
- */
303
- displayMode?: WidgetDisplayMode;
304
- /**
305
- * Human-readable description shown to users about what the widget does.
306
- * Maps to OpenAI's `openai/widgetDescription` annotation.
307
- */
308
- widgetDescription?: string;
309
- /**
310
- * Status messages shown during tool invocation (OpenAI ChatGPT specific).
311
- * Maps to OpenAI's `openai/toolInvocation/invoking` and `openai/toolInvocation/invoked`.
312
- *
313
- * @example
314
- * ```typescript
315
- * invocationStatus: {
316
- * invoking: 'Fetching weather data...',
317
- * invoked: 'Weather data loaded'
318
- * }
319
- * ```
320
- */
321
- invocationStatus?: {
322
- /** Status text shown while tool is executing */
323
- invoking?: string;
324
- /** Status text shown after tool execution completes */
325
- invoked?: string;
326
- };
327
- /**
328
- * How the widget HTML should be served to the client.
329
- *
330
- * - `'auto'` (default): Automatically select mode based on client capabilities.
331
- * For OpenAI/ext-apps clients: uses `'inline'` with `_meta`.
332
- * For Claude clients: uses `'inline'` with dual-payload format.
333
- * For unsupported clients (Gemini, unknown): skips UI (returns JSON only).
334
- *
335
- * - `'inline'`: HTML embedded directly in tool response `_meta['ui/html']`.
336
- * Best for small widgets, works on all platforms including network-blocked ones.
337
- *
338
- * - `'static'`: Widget pre-compiled at server startup, registered as MCP resource with `ui://` URI.
339
- * Client fetches via `resources/read`. Good for OpenAI's template system.
340
- * Widget is resolved during `tools/list`, not dependent on tool call.
341
- *
342
- * - `'hybrid'`: Shell (React runtime + bridge) pre-compiled at startup.
343
- * Component code transpiled per-request and delivered in `_meta['ui/component']`.
344
- *
345
- * - `'direct-url'`: Served from MCP server's HTTP endpoint.
346
- * Avoids third-party cookie issues since widget loads from same domain.
347
- *
348
- * - `'custom-url'`: Served from a custom URL (CDN, external hosting).
349
- * Requires `customWidgetUrl` to be set.
350
- *
351
- * @default 'auto'
352
- */
353
- servingMode?: WidgetServingMode;
354
- /**
355
- * Custom URL for widget serving when `servingMode: 'custom-url'`.
356
- * The URL can include `{token}` placeholder which will be replaced with
357
- * the widget access token.
358
- *
359
- * @example
360
- * ```typescript
361
- * customWidgetUrl: 'https://cdn.example.com/widgets/weather.html?token={token}'
362
- * ```
363
- */
364
- customWidgetUrl?: string;
365
- /**
366
- * Path for direct URL serving when `servingMode: 'direct-url'`.
367
- * This path is appended to the MCP server's base URL.
368
- *
369
- * @example
370
- * ```typescript
371
- * directPath: '/widgets/weather'
372
- * // Results in: https://mcp-server.example.com/widgets/weather?token=...
373
- * ```
374
- */
375
- directPath?: string;
376
- /**
377
- * Custom React components available in MDX templates.
378
- * These components can be used directly in MDX content without importing.
379
- *
380
- * @example
381
- * ```typescript
382
- * ui: {
383
- * template: `# Weather\n<Alert type="info">Data loaded</Alert>`,
384
- * mdxComponents: {
385
- * Alert: ({ type, children }) => <div className={type}>{children}</div>,
386
- * Card: MyCardComponent,
387
- * }
388
- * }
389
- * ```
390
- */
391
- mdxComponents?: Record<string, any>;
392
- /**
393
- * Whether to show a border around the UI widget.
394
- * MCP Apps spec: `_meta.ui.prefersBorder`
395
- *
396
- * When true, hosts should render a visible border around the sandbox iframe.
397
- * Useful for visual clarity when the widget content doesn't have its own borders.
398
- *
399
- * Default: undefined (host decides)
400
- */
401
- prefersBorder?: boolean;
402
- /**
403
- * Dedicated sandbox domain for the widget.
404
- * MCP Apps spec: `_meta.ui.domain`
405
- *
406
- * When specified, the host should load the widget in an iframe with this
407
- * domain as the origin, providing additional isolation.
408
- *
409
- * @example 'sandbox.example.com'
410
- */
411
- sandboxDomain?: string;
412
- /**
413
- * Enable client-side React hydration after server-side rendering (SSR).
414
- *
415
- * **Default: `false`**
416
- *
417
- * When `false` (default):
418
- * - SSR output is static HTML
419
- * - No React runtime is loaded on the client
420
- * - All interactivity is handled by the FrontMCP Bridge IIFE
421
- * - This prevents React Hydration Error #418 in MCP clients
422
- *
423
- * When `true`:
424
- * - React/ReactDOM CDN scripts are included
425
- * - Client attempts to hydrate React components
426
- * - May cause hydration mismatch errors in some MCP clients (Claude, ChatGPT)
427
- *
428
- * **Why disabled by default?**
429
- * MCP clients like Claude and ChatGPT render HTML in sandboxed iframes.
430
- * React hydration expects the client-rendered HTML to exactly match the
431
- * server-rendered HTML. Due to timing differences, random data, and
432
- * different execution contexts, mismatches frequently occur causing
433
- * React Error #418 ("Hydration failed...").
434
- *
435
- * The FrontMCP Bridge IIFE already provides all necessary interactivity
436
- * (tool calls via `data-tool-call`, state updates, loading states) without
437
- * requiring React hydration.
438
- *
439
- * **Only enable if:**
440
- * - You need React state management on the client
441
- * - You're sure your template produces deterministic HTML
442
- * - You've tested hydration works in your target MCP client
443
- *
444
- * @example
445
- * ```typescript
446
- * // Disable hydration (default behavior - recommended)
447
- * ui: {
448
- * template: MyReactComponent,
449
- * hydrate: false
450
- * }
451
- *
452
- * // Enable hydration (use with caution)
453
- * ui: {
454
- * template: MyStatefulComponent,
455
- * hydrate: true
456
- * }
457
- * ```
458
- */
459
- hydrate?: boolean;
460
- /**
461
- * UI renderer type.
462
- *
463
- * - `'html'`: HTML with optional Handlebars
464
- * - `'react'`: React component (SSR)
465
- * - `'mdx'`: MDX template
466
- * - `'markdown'`: Pure Markdown
467
- * - `'auto'`: Auto-detect from template (default)
468
- *
469
- * @default 'auto'
470
- */
471
- uiType?: 'html' | 'react' | 'mdx' | 'markdown' | 'auto';
472
- /**
473
- * Bundling mode.
474
- *
475
- * - `'static'`: Pre-compile widget shell, inject data at runtime (default)
476
- * - `'dynamic'`: Generate fresh HTML per tool invocation
477
- *
478
- * @default 'static'
479
- */
480
- bundlingMode?: 'static' | 'dynamic';
481
- /**
482
- * Resource loading mode.
483
- *
484
- * - `'cdn'`: Load React/MDX/Handlebars from CDN URLs (lightweight)
485
- * - `'inline'`: Embed all scripts in HTML (self-contained)
486
- *
487
- * Use 'cdn' for most platforms (OpenAI, ChatGPT, Cursor).
488
- * Use 'inline' for network-blocked environments (Claude Artifacts).
489
- *
490
- * @default 'cdn'
491
- */
492
- resourceMode?: 'cdn' | 'inline';
493
- /**
494
- * Runtime options for specific renderers.
495
- */
496
- runtimeOptions?: {
497
- /** Enable React hydration after SSR */
498
- hydrate?: boolean;
499
- /** Markdown rendering options */
500
- markdown?: {
501
- /** Enable GitHub-flavored markdown */
502
- gfm?: boolean;
503
- /** Syntax highlighting theme */
504
- highlightTheme?: string;
505
- };
506
- };
507
- /**
508
- * Prefix text shown before HTML in dual-payload responses (Claude).
509
- *
510
- * When the output mode is `'dual-payload'` (auto-detected for Claude clients),
511
- * the tool response contains two TextContent blocks:
512
- * 1. Pure JSON data: `{"temperature": 72, ...}`
513
- * 2. Markdown-wrapped HTML: `{prefix}:\n\n```html\n<!DOCTYPE html>...\n```
514
- *
515
- * This field controls the prefix text in block 2.
516
- *
517
- * @default 'Here is the visual result'
518
- *
519
- * @example
520
- * ```typescript
521
- * // Weather tool
522
- * ui: {
523
- * template: WeatherWidget,
524
- * htmlResponsePrefix: 'Here is the weather dashboard',
525
- * }
526
- * // Output block 2: "Here is the weather dashboard:\n\n```html\n..."
527
- *
528
- * // Stock tool
529
- * ui: {
530
- * template: StockWidget,
531
- * htmlResponsePrefix: 'Here is the stock information',
532
- * }
533
- * // Output block 2: "Here is the stock information:\n\n```html\n..."
534
- * ```
535
- */
536
- htmlResponsePrefix?: string;
537
- /**
538
- * Packages to load from CDN instead of bundling.
539
- *
540
- * When `template` is a file path (e.g., `'./chart-widget.tsx'`), imports
541
- * of these packages will be excluded from the bundle and loaded at runtime
542
- * via CDN import maps.
543
- *
544
- * Package names should match npm package names. The CDN URL is resolved
545
- * from the built-in CDN registry or from explicit `dependencies` overrides.
546
- *
547
- * **Platform considerations:**
548
- * - Claude only allows `cdnjs.cloudflare.com` (blocked network)
549
- * - OpenAI/Cursor/other platforms can use any CDN
550
- *
551
- * @example
552
- * ```typescript
553
- * // Auto-resolved from CDN registry
554
- * ui: {
555
- * template: './chart-widget.tsx',
556
- * externals: ['chart.js', 'react-chartjs-2'],
557
- * }
558
- *
559
- * // With explicit override
560
- * ui: {
561
- * template: './chart-widget.tsx',
562
- * externals: ['chart.js'],
563
- * dependencies: {
564
- * 'chart.js': {
565
- * url: 'https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.4.1/chart.umd.min.js',
566
- * integrity: 'sha512-...',
567
- * global: 'Chart',
568
- * },
569
- * },
570
- * }
571
- * ```
572
- */
573
- externals?: string[];
574
- /**
575
- * Explicit CDN dependency overrides for external packages.
576
- *
577
- * Use this to specify custom CDN URLs or override the default CDN registry
578
- * entries for packages listed in `externals`.
579
- *
580
- * Keys are npm package names. Values specify the CDN URL, integrity hash,
581
- * and other loading options.
582
- *
583
- * @example
584
- * ```typescript
585
- * ui: {
586
- * template: './dashboard.tsx',
587
- * externals: ['d3', 'lodash'],
588
- * dependencies: {
589
- * 'd3': {
590
- * url: 'https://cdnjs.cloudflare.com/ajax/libs/d3/7.8.5/d3.min.js',
591
- * integrity: 'sha512-...',
592
- * global: 'd3',
593
- * },
594
- * 'lodash': {
595
- * url: 'https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.21/lodash.min.js',
596
- * global: '_',
597
- * },
598
- * },
599
- * }
600
- * ```
601
- */
602
- dependencies?: Record<string, CDNDependency>;
603
- /**
604
- * Bundle options for file-based templates.
605
- *
606
- * Controls how the file-based template is compiled and bundled.
607
- * These options are only used when `template` is a file path.
608
- *
609
- * @example
610
- * ```typescript
611
- * // Development mode
612
- * ui: {
613
- * template: './debug-widget.tsx',
614
- * bundleOptions: {
615
- * minify: false,
616
- * sourceMaps: true,
617
- * target: 'esnext',
618
- * },
619
- * }
620
- *
621
- * // Production mode (defaults)
622
- * ui: {
623
- * template: './widget.tsx',
624
- * bundleOptions: {
625
- * minify: true,
626
- * treeShake: true,
627
- * target: 'es2020',
628
- * },
629
- * }
630
- * ```
631
- */
632
- fileBundleOptions?: FileBundleOptions;
633
- }
634
- /**
635
- * Type alias for backwards compatibility.
636
- * Prefer using UITemplateConfig directly.
637
- */
638
- export type UITemplate<In = unknown, Out = unknown> = UITemplateConfig<In, Out>;
639
- //# sourceMappingURL=ui-config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ui-config.d.ts","sourceRoot":"","sources":["../../../src/types/ui-config.ts"],"names":[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