@frontmcp/ui 0.5.1 → 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 (805) hide show
  1. package/README.md +140 -362
  2. package/bridge/adapters/base-adapter.d.ts +104 -0
  3. package/bridge/adapters/base-adapter.d.ts.map +1 -0
  4. package/bridge/adapters/claude.adapter.d.ts +67 -0
  5. package/bridge/adapters/claude.adapter.d.ts.map +1 -0
  6. package/bridge/adapters/ext-apps.adapter.d.ts +143 -0
  7. package/bridge/adapters/ext-apps.adapter.d.ts.map +1 -0
  8. package/bridge/adapters/gemini.adapter.d.ts +64 -0
  9. package/bridge/adapters/gemini.adapter.d.ts.map +1 -0
  10. package/bridge/adapters/generic.adapter.d.ts +56 -0
  11. package/bridge/adapters/generic.adapter.d.ts.map +1 -0
  12. package/bridge/adapters/index.d.ts +26 -0
  13. package/bridge/adapters/index.d.ts.map +1 -0
  14. package/bridge/adapters/openai.adapter.d.ts +65 -0
  15. package/bridge/adapters/openai.adapter.d.ts.map +1 -0
  16. package/bridge/core/adapter-registry.d.ts +122 -0
  17. package/bridge/core/adapter-registry.d.ts.map +1 -0
  18. package/bridge/core/bridge-factory.d.ts +199 -0
  19. package/bridge/core/bridge-factory.d.ts.map +1 -0
  20. package/bridge/core/index.d.ts +10 -0
  21. package/bridge/core/index.d.ts.map +1 -0
  22. package/bridge/index.d.ts +62 -0
  23. package/bridge/index.d.ts.map +1 -0
  24. package/bridge/index.js +2540 -0
  25. package/bridge/runtime/iife-generator.d.ts +62 -0
  26. package/bridge/runtime/iife-generator.d.ts.map +1 -0
  27. package/bridge/runtime/index.d.ts +10 -0
  28. package/bridge/runtime/index.d.ts.map +1 -0
  29. package/bridge/types.d.ts +386 -0
  30. package/bridge/types.d.ts.map +1 -0
  31. package/bundler/bundler.d.ts +208 -0
  32. package/bundler/bundler.d.ts.map +1 -0
  33. package/bundler/cache.d.ts +173 -0
  34. package/bundler/cache.d.ts.map +1 -0
  35. package/bundler/file-cache/component-builder.d.ts +167 -0
  36. package/bundler/file-cache/component-builder.d.ts.map +1 -0
  37. package/bundler/file-cache/hash-calculator.d.ts +155 -0
  38. package/bundler/file-cache/hash-calculator.d.ts.map +1 -0
  39. package/bundler/file-cache/index.d.ts +12 -0
  40. package/bundler/file-cache/index.d.ts.map +1 -0
  41. package/bundler/file-cache/storage/filesystem.d.ts +149 -0
  42. package/bundler/file-cache/storage/filesystem.d.ts.map +1 -0
  43. package/bundler/file-cache/storage/index.d.ts +11 -0
  44. package/bundler/file-cache/storage/index.d.ts.map +1 -0
  45. package/bundler/file-cache/storage/interface.d.ts +152 -0
  46. package/bundler/file-cache/storage/interface.d.ts.map +1 -0
  47. package/bundler/file-cache/storage/redis.d.ts +139 -0
  48. package/bundler/file-cache/storage/redis.d.ts.map +1 -0
  49. package/bundler/index.d.ts +43 -0
  50. package/bundler/index.d.ts.map +1 -0
  51. package/bundler/index.js +3707 -0
  52. package/bundler/sandbox/enclave-adapter.d.ts +121 -0
  53. package/bundler/sandbox/enclave-adapter.d.ts.map +1 -0
  54. package/bundler/sandbox/executor.d.ts +14 -0
  55. package/bundler/sandbox/executor.d.ts.map +1 -0
  56. package/bundler/sandbox/policy.d.ts +62 -0
  57. package/bundler/sandbox/policy.d.ts.map +1 -0
  58. package/bundler/types.d.ts +702 -0
  59. package/bundler/types.d.ts.map +1 -0
  60. package/components/alert.d.ts +66 -0
  61. package/components/alert.d.ts.map +1 -0
  62. package/components/alert.schema.d.ts +98 -0
  63. package/components/alert.schema.d.ts.map +1 -0
  64. package/components/avatar.d.ts +77 -0
  65. package/components/avatar.d.ts.map +1 -0
  66. package/components/avatar.schema.d.ts +170 -0
  67. package/components/avatar.schema.d.ts.map +1 -0
  68. package/components/badge.d.ts +64 -0
  69. package/components/badge.d.ts.map +1 -0
  70. package/components/badge.schema.d.ts +91 -0
  71. package/components/badge.schema.d.ts.map +1 -0
  72. package/components/button.d.ts +100 -0
  73. package/components/button.d.ts.map +1 -0
  74. package/components/button.schema.d.ts +120 -0
  75. package/components/button.schema.d.ts.map +1 -0
  76. package/components/card.d.ts +53 -0
  77. package/components/card.d.ts.map +1 -0
  78. package/components/card.schema.d.ts +93 -0
  79. package/components/card.schema.d.ts.map +1 -0
  80. package/components/form.d.ts +212 -0
  81. package/components/form.d.ts.map +1 -0
  82. package/components/form.schema.d.ts +365 -0
  83. package/components/form.schema.d.ts.map +1 -0
  84. package/components/index.d.ts +29 -0
  85. package/components/index.d.ts.map +1 -0
  86. package/components/index.js +2525 -0
  87. package/components/list.d.ts +121 -0
  88. package/components/list.d.ts.map +1 -0
  89. package/components/list.schema.d.ts +129 -0
  90. package/components/list.schema.d.ts.map +1 -0
  91. package/components/modal.d.ts +100 -0
  92. package/components/modal.d.ts.map +1 -0
  93. package/components/modal.schema.d.ts +151 -0
  94. package/components/modal.schema.d.ts.map +1 -0
  95. package/components/table.d.ts +91 -0
  96. package/components/table.d.ts.map +1 -0
  97. package/components/table.schema.d.ts +123 -0
  98. package/components/table.schema.d.ts.map +1 -0
  99. package/esm/bridge/adapters/base-adapter.d.ts +104 -0
  100. package/esm/bridge/adapters/base-adapter.d.ts.map +1 -0
  101. package/esm/bridge/adapters/claude.adapter.d.ts +67 -0
  102. package/esm/bridge/adapters/claude.adapter.d.ts.map +1 -0
  103. package/esm/bridge/adapters/ext-apps.adapter.d.ts +143 -0
  104. package/esm/bridge/adapters/ext-apps.adapter.d.ts.map +1 -0
  105. package/esm/bridge/adapters/gemini.adapter.d.ts +64 -0
  106. package/esm/bridge/adapters/gemini.adapter.d.ts.map +1 -0
  107. package/esm/bridge/adapters/generic.adapter.d.ts +56 -0
  108. package/esm/bridge/adapters/generic.adapter.d.ts.map +1 -0
  109. package/esm/bridge/adapters/index.d.ts +26 -0
  110. package/esm/bridge/adapters/index.d.ts.map +1 -0
  111. package/esm/bridge/adapters/openai.adapter.d.ts +65 -0
  112. package/esm/bridge/adapters/openai.adapter.d.ts.map +1 -0
  113. package/esm/bridge/core/adapter-registry.d.ts +122 -0
  114. package/esm/bridge/core/adapter-registry.d.ts.map +1 -0
  115. package/esm/bridge/core/bridge-factory.d.ts +199 -0
  116. package/esm/bridge/core/bridge-factory.d.ts.map +1 -0
  117. package/esm/bridge/core/index.d.ts +10 -0
  118. package/esm/bridge/core/index.d.ts.map +1 -0
  119. package/esm/bridge/index.d.ts +62 -0
  120. package/esm/bridge/index.d.ts.map +1 -0
  121. package/esm/bridge/index.js +2487 -0
  122. package/esm/bridge/runtime/iife-generator.d.ts +62 -0
  123. package/esm/bridge/runtime/iife-generator.d.ts.map +1 -0
  124. package/esm/bridge/runtime/index.d.ts +10 -0
  125. package/esm/bridge/runtime/index.d.ts.map +1 -0
  126. package/esm/bridge/types.d.ts +386 -0
  127. package/esm/bridge/types.d.ts.map +1 -0
  128. package/esm/bundler/bundler.d.ts +208 -0
  129. package/esm/bundler/bundler.d.ts.map +1 -0
  130. package/esm/bundler/cache.d.ts +173 -0
  131. package/esm/bundler/cache.d.ts.map +1 -0
  132. package/esm/bundler/file-cache/component-builder.d.ts +167 -0
  133. package/esm/bundler/file-cache/component-builder.d.ts.map +1 -0
  134. package/esm/bundler/file-cache/hash-calculator.d.ts +155 -0
  135. package/esm/bundler/file-cache/hash-calculator.d.ts.map +1 -0
  136. package/esm/bundler/file-cache/index.d.ts +12 -0
  137. package/esm/bundler/file-cache/index.d.ts.map +1 -0
  138. package/esm/bundler/file-cache/storage/filesystem.d.ts +149 -0
  139. package/esm/bundler/file-cache/storage/filesystem.d.ts.map +1 -0
  140. package/esm/bundler/file-cache/storage/index.d.ts +11 -0
  141. package/esm/bundler/file-cache/storage/index.d.ts.map +1 -0
  142. package/esm/bundler/file-cache/storage/interface.d.ts +152 -0
  143. package/esm/bundler/file-cache/storage/interface.d.ts.map +1 -0
  144. package/esm/bundler/file-cache/storage/redis.d.ts +139 -0
  145. package/esm/bundler/file-cache/storage/redis.d.ts.map +1 -0
  146. package/esm/bundler/index.d.ts +43 -0
  147. package/esm/bundler/index.d.ts.map +1 -0
  148. package/esm/bundler/index.js +3640 -0
  149. package/esm/bundler/sandbox/enclave-adapter.d.ts +121 -0
  150. package/esm/bundler/sandbox/enclave-adapter.d.ts.map +1 -0
  151. package/esm/bundler/sandbox/executor.d.ts +14 -0
  152. package/esm/bundler/sandbox/executor.d.ts.map +1 -0
  153. package/esm/bundler/sandbox/policy.d.ts +62 -0
  154. package/esm/bundler/sandbox/policy.d.ts.map +1 -0
  155. package/esm/bundler/types.d.ts +702 -0
  156. package/esm/bundler/types.d.ts.map +1 -0
  157. package/esm/components/alert.d.ts +66 -0
  158. package/esm/components/alert.d.ts.map +1 -0
  159. package/esm/components/alert.schema.d.ts +98 -0
  160. package/esm/components/alert.schema.d.ts.map +1 -0
  161. package/esm/components/avatar.d.ts +77 -0
  162. package/esm/components/avatar.d.ts.map +1 -0
  163. package/esm/components/avatar.schema.d.ts +170 -0
  164. package/esm/components/avatar.schema.d.ts.map +1 -0
  165. package/esm/components/badge.d.ts +64 -0
  166. package/esm/components/badge.d.ts.map +1 -0
  167. package/esm/components/badge.schema.d.ts +91 -0
  168. package/esm/components/badge.schema.d.ts.map +1 -0
  169. package/esm/components/button.d.ts +100 -0
  170. package/esm/components/button.d.ts.map +1 -0
  171. package/esm/components/button.schema.d.ts +120 -0
  172. package/esm/components/button.schema.d.ts.map +1 -0
  173. package/esm/components/card.d.ts +53 -0
  174. package/esm/components/card.d.ts.map +1 -0
  175. package/esm/components/card.schema.d.ts +93 -0
  176. package/esm/components/card.schema.d.ts.map +1 -0
  177. package/esm/components/form.d.ts +212 -0
  178. package/esm/components/form.d.ts.map +1 -0
  179. package/esm/components/form.schema.d.ts +365 -0
  180. package/esm/components/form.schema.d.ts.map +1 -0
  181. package/esm/components/index.d.ts +29 -0
  182. package/esm/components/index.d.ts.map +1 -0
  183. package/esm/components/index.js +2396 -0
  184. package/esm/components/list.d.ts +121 -0
  185. package/esm/components/list.d.ts.map +1 -0
  186. package/esm/components/list.schema.d.ts +129 -0
  187. package/esm/components/list.schema.d.ts.map +1 -0
  188. package/esm/components/modal.d.ts +100 -0
  189. package/esm/components/modal.d.ts.map +1 -0
  190. package/esm/components/modal.schema.d.ts +151 -0
  191. package/esm/components/modal.schema.d.ts.map +1 -0
  192. package/esm/components/table.d.ts +91 -0
  193. package/esm/components/table.d.ts.map +1 -0
  194. package/esm/components/table.schema.d.ts +123 -0
  195. package/esm/components/table.schema.d.ts.map +1 -0
  196. package/esm/index.d.ts +40 -0
  197. package/esm/index.d.ts.map +1 -0
  198. package/esm/index.js +8326 -0
  199. package/esm/layouts/base.d.ts +86 -0
  200. package/esm/layouts/base.d.ts.map +1 -0
  201. package/esm/layouts/index.d.ts +8 -0
  202. package/esm/layouts/index.d.ts.map +1 -0
  203. package/esm/layouts/index.js +409 -0
  204. package/esm/layouts/presets.d.ts +134 -0
  205. package/esm/layouts/presets.d.ts.map +1 -0
  206. package/esm/package.json +72 -0
  207. package/esm/pages/consent.d.ts +117 -0
  208. package/esm/pages/consent.d.ts.map +1 -0
  209. package/esm/pages/error.d.ts +101 -0
  210. package/esm/pages/error.d.ts.map +1 -0
  211. package/esm/pages/index.d.ts +9 -0
  212. package/esm/pages/index.d.ts.map +1 -0
  213. package/esm/pages/index.js +1036 -0
  214. package/esm/react/Alert.d.ts +101 -0
  215. package/esm/react/Alert.d.ts.map +1 -0
  216. package/esm/react/Badge.d.ts +100 -0
  217. package/esm/react/Badge.d.ts.map +1 -0
  218. package/esm/react/Button.d.ts +108 -0
  219. package/esm/react/Button.d.ts.map +1 -0
  220. package/esm/react/Card.d.ts +103 -0
  221. package/esm/react/Card.d.ts.map +1 -0
  222. package/esm/react/hooks/context.d.ts +179 -0
  223. package/esm/react/hooks/context.d.ts.map +1 -0
  224. package/esm/react/hooks/index.d.ts +42 -0
  225. package/esm/react/hooks/index.d.ts.map +1 -0
  226. package/esm/react/hooks/tools.d.ts +284 -0
  227. package/esm/react/hooks/tools.d.ts.map +1 -0
  228. package/esm/react/index.d.ts +80 -0
  229. package/esm/react/index.d.ts.map +1 -0
  230. package/esm/react/index.js +3124 -0
  231. package/esm/react/types.d.ts +105 -0
  232. package/esm/react/types.d.ts.map +1 -0
  233. package/esm/react/utils.d.ts +43 -0
  234. package/esm/react/utils.d.ts.map +1 -0
  235. package/esm/render/index.d.ts +8 -0
  236. package/esm/render/index.d.ts.map +1 -0
  237. package/esm/render/index.js +45 -0
  238. package/esm/render/prerender.d.ts +57 -0
  239. package/esm/render/prerender.d.ts.map +1 -0
  240. package/esm/renderers/index.d.ts +21 -0
  241. package/esm/renderers/index.d.ts.map +1 -0
  242. package/esm/renderers/index.js +381 -0
  243. package/esm/renderers/react.adapter.d.ts +70 -0
  244. package/esm/renderers/react.adapter.d.ts.map +1 -0
  245. package/esm/renderers/react.renderer.d.ts +96 -0
  246. package/esm/renderers/react.renderer.d.ts.map +1 -0
  247. package/esm/universal/UniversalApp.d.ts +108 -0
  248. package/esm/universal/UniversalApp.d.ts.map +1 -0
  249. package/esm/universal/cached-runtime.d.ts +115 -0
  250. package/esm/universal/cached-runtime.d.ts.map +1 -0
  251. package/esm/universal/context.d.ts +122 -0
  252. package/esm/universal/context.d.ts.map +1 -0
  253. package/esm/universal/index.d.ts +57 -0
  254. package/esm/universal/index.d.ts.map +1 -0
  255. package/esm/universal/index.js +1755 -0
  256. package/esm/universal/renderers/html.renderer.d.ts +37 -0
  257. package/esm/universal/renderers/html.renderer.d.ts.map +1 -0
  258. package/esm/universal/renderers/index.d.ts +112 -0
  259. package/esm/universal/renderers/index.d.ts.map +1 -0
  260. package/esm/universal/renderers/markdown.renderer.d.ts +33 -0
  261. package/esm/universal/renderers/markdown.renderer.d.ts.map +1 -0
  262. package/esm/universal/renderers/mdx.renderer.d.ts +38 -0
  263. package/esm/universal/renderers/mdx.renderer.d.ts.map +1 -0
  264. package/esm/universal/renderers/react.renderer.d.ts +46 -0
  265. package/esm/universal/renderers/react.renderer.d.ts.map +1 -0
  266. package/esm/universal/runtime-builder.d.ts +33 -0
  267. package/esm/universal/runtime-builder.d.ts.map +1 -0
  268. package/esm/universal/store.d.ts +135 -0
  269. package/esm/universal/store.d.ts.map +1 -0
  270. package/esm/universal/types.d.ts +199 -0
  271. package/esm/universal/types.d.ts.map +1 -0
  272. package/esm/web-components/core/attribute-parser.d.ts +82 -0
  273. package/esm/web-components/core/attribute-parser.d.ts.map +1 -0
  274. package/esm/web-components/core/base-element.d.ts +197 -0
  275. package/esm/web-components/core/base-element.d.ts.map +1 -0
  276. package/esm/web-components/core/index.d.ts +9 -0
  277. package/esm/web-components/core/index.d.ts.map +1 -0
  278. package/esm/web-components/elements/fmcp-alert.d.ts +46 -0
  279. package/esm/web-components/elements/fmcp-alert.d.ts.map +1 -0
  280. package/esm/web-components/elements/fmcp-badge.d.ts +47 -0
  281. package/esm/web-components/elements/fmcp-badge.d.ts.map +1 -0
  282. package/esm/web-components/elements/fmcp-button.d.ts +117 -0
  283. package/esm/web-components/elements/fmcp-button.d.ts.map +1 -0
  284. package/esm/web-components/elements/fmcp-card.d.ts +53 -0
  285. package/esm/web-components/elements/fmcp-card.d.ts.map +1 -0
  286. package/esm/web-components/elements/fmcp-input.d.ts +96 -0
  287. package/esm/web-components/elements/fmcp-input.d.ts.map +1 -0
  288. package/esm/web-components/elements/fmcp-select.d.ts +100 -0
  289. package/esm/web-components/elements/fmcp-select.d.ts.map +1 -0
  290. package/esm/web-components/elements/index.d.ts +13 -0
  291. package/esm/web-components/elements/index.d.ts.map +1 -0
  292. package/esm/web-components/index.d.ts +50 -0
  293. package/esm/web-components/index.d.ts.map +1 -0
  294. package/esm/web-components/index.js +1993 -0
  295. package/esm/web-components/register.d.ts +57 -0
  296. package/esm/web-components/register.d.ts.map +1 -0
  297. package/esm/web-components/types.d.ts +122 -0
  298. package/esm/web-components/types.d.ts.map +1 -0
  299. package/esm/widgets/index.d.ts +8 -0
  300. package/esm/widgets/index.d.ts.map +1 -0
  301. package/esm/widgets/index.js +883 -0
  302. package/esm/widgets/progress.d.ts +133 -0
  303. package/esm/widgets/progress.d.ts.map +1 -0
  304. package/esm/widgets/resource.d.ts +163 -0
  305. package/esm/widgets/resource.d.ts.map +1 -0
  306. package/index.d.ts +40 -0
  307. package/index.d.ts.map +1 -0
  308. package/index.js +8526 -0
  309. package/layouts/base.d.ts +86 -0
  310. package/layouts/base.d.ts.map +1 -0
  311. package/layouts/index.d.ts +8 -0
  312. package/layouts/index.d.ts.map +1 -0
  313. package/layouts/index.js +437 -0
  314. package/layouts/presets.d.ts +134 -0
  315. package/layouts/presets.d.ts.map +1 -0
  316. package/package.json +33 -110
  317. package/pages/consent.d.ts +117 -0
  318. package/pages/consent.d.ts.map +1 -0
  319. package/pages/error.d.ts +101 -0
  320. package/pages/error.d.ts.map +1 -0
  321. package/pages/index.d.ts +9 -0
  322. package/pages/index.d.ts.map +1 -0
  323. package/pages/index.js +1065 -0
  324. package/react/Alert.d.ts +101 -0
  325. package/react/Alert.d.ts.map +1 -0
  326. package/react/Badge.d.ts +100 -0
  327. package/react/Badge.d.ts.map +1 -0
  328. package/react/Button.d.ts +108 -0
  329. package/react/Button.d.ts.map +1 -0
  330. package/react/Card.d.ts +103 -0
  331. package/react/Card.d.ts.map +1 -0
  332. package/react/hooks/context.d.ts +179 -0
  333. package/react/hooks/context.d.ts.map +1 -0
  334. package/react/hooks/index.d.ts +42 -0
  335. package/react/hooks/index.d.ts.map +1 -0
  336. package/react/hooks/tools.d.ts +284 -0
  337. package/react/hooks/tools.d.ts.map +1 -0
  338. package/react/index.d.ts +80 -0
  339. package/react/index.d.ts.map +1 -0
  340. package/react/index.js +3160 -0
  341. package/react/types.d.ts +105 -0
  342. package/react/types.d.ts.map +1 -0
  343. package/react/utils.d.ts +43 -0
  344. package/react/utils.d.ts.map +1 -0
  345. package/render/index.d.ts +8 -0
  346. package/render/index.d.ts.map +1 -0
  347. package/render/index.js +77 -0
  348. package/render/prerender.d.ts +57 -0
  349. package/render/prerender.d.ts.map +1 -0
  350. package/renderers/index.d.ts +21 -0
  351. package/renderers/index.d.ts.map +1 -0
  352. package/renderers/index.js +416 -0
  353. package/renderers/react.adapter.d.ts +70 -0
  354. package/renderers/react.adapter.d.ts.map +1 -0
  355. package/renderers/react.renderer.d.ts +96 -0
  356. package/renderers/react.renderer.d.ts.map +1 -0
  357. package/universal/UniversalApp.d.ts +108 -0
  358. package/universal/UniversalApp.d.ts.map +1 -0
  359. package/universal/cached-runtime.d.ts +115 -0
  360. package/universal/cached-runtime.d.ts.map +1 -0
  361. package/universal/context.d.ts +122 -0
  362. package/universal/context.d.ts.map +1 -0
  363. package/universal/index.d.ts +57 -0
  364. package/universal/index.d.ts.map +1 -0
  365. package/universal/index.js +1841 -0
  366. package/universal/renderers/html.renderer.d.ts +37 -0
  367. package/universal/renderers/html.renderer.d.ts.map +1 -0
  368. package/universal/renderers/index.d.ts +112 -0
  369. package/universal/renderers/index.d.ts.map +1 -0
  370. package/universal/renderers/markdown.renderer.d.ts +33 -0
  371. package/universal/renderers/markdown.renderer.d.ts.map +1 -0
  372. package/universal/renderers/mdx.renderer.d.ts +38 -0
  373. package/universal/renderers/mdx.renderer.d.ts.map +1 -0
  374. package/universal/renderers/react.renderer.d.ts +46 -0
  375. package/universal/renderers/react.renderer.d.ts.map +1 -0
  376. package/universal/runtime-builder.d.ts +33 -0
  377. package/universal/runtime-builder.d.ts.map +1 -0
  378. package/universal/store.d.ts +135 -0
  379. package/universal/store.d.ts.map +1 -0
  380. package/universal/types.d.ts +199 -0
  381. package/universal/types.d.ts.map +1 -0
  382. package/web-components/core/attribute-parser.d.ts +82 -0
  383. package/web-components/core/attribute-parser.d.ts.map +1 -0
  384. package/web-components/core/base-element.d.ts +197 -0
  385. package/web-components/core/base-element.d.ts.map +1 -0
  386. package/web-components/core/index.d.ts +9 -0
  387. package/web-components/core/index.d.ts.map +1 -0
  388. package/web-components/elements/fmcp-alert.d.ts +46 -0
  389. package/web-components/elements/fmcp-alert.d.ts.map +1 -0
  390. package/web-components/elements/fmcp-badge.d.ts +47 -0
  391. package/web-components/elements/fmcp-badge.d.ts.map +1 -0
  392. package/web-components/elements/fmcp-button.d.ts +117 -0
  393. package/web-components/elements/fmcp-button.d.ts.map +1 -0
  394. package/web-components/elements/fmcp-card.d.ts +53 -0
  395. package/web-components/elements/fmcp-card.d.ts.map +1 -0
  396. package/web-components/elements/fmcp-input.d.ts +96 -0
  397. package/web-components/elements/fmcp-input.d.ts.map +1 -0
  398. package/web-components/elements/fmcp-select.d.ts +100 -0
  399. package/web-components/elements/fmcp-select.d.ts.map +1 -0
  400. package/web-components/elements/index.d.ts +13 -0
  401. package/web-components/elements/index.d.ts.map +1 -0
  402. package/web-components/index.d.ts +50 -0
  403. package/web-components/index.d.ts.map +1 -0
  404. package/web-components/index.js +2028 -0
  405. package/web-components/register.d.ts +57 -0
  406. package/web-components/register.d.ts.map +1 -0
  407. package/web-components/types.d.ts +122 -0
  408. package/web-components/types.d.ts.map +1 -0
  409. package/widgets/index.d.ts +8 -0
  410. package/widgets/index.d.ts.map +1 -0
  411. package/widgets/index.js +910 -0
  412. package/widgets/progress.d.ts +133 -0
  413. package/widgets/progress.d.ts.map +1 -0
  414. package/widgets/resource.d.ts +163 -0
  415. package/widgets/resource.d.ts.map +1 -0
  416. package/src/adapters/index.d.ts +0 -10
  417. package/src/adapters/index.js +0 -18
  418. package/src/adapters/index.js.map +0 -1
  419. package/src/adapters/platform-meta.d.ts +0 -165
  420. package/src/adapters/platform-meta.js +0 -310
  421. package/src/adapters/platform-meta.js.map +0 -1
  422. package/src/base-template/bridge.d.ts +0 -89
  423. package/src/base-template/bridge.js +0 -452
  424. package/src/base-template/bridge.js.map +0 -1
  425. package/src/base-template/default-base-template.d.ts +0 -91
  426. package/src/base-template/default-base-template.js +0 -435
  427. package/src/base-template/default-base-template.js.map +0 -1
  428. package/src/base-template/index.d.ts +0 -14
  429. package/src/base-template/index.js +0 -30
  430. package/src/base-template/index.js.map +0 -1
  431. package/src/base-template/polyfills.d.ts +0 -30
  432. package/src/base-template/polyfills.js +0 -190
  433. package/src/base-template/polyfills.js.map +0 -1
  434. package/src/base-template/theme-styles.d.ts +0 -73
  435. package/src/base-template/theme-styles.js +0 -95
  436. package/src/base-template/theme-styles.js.map +0 -1
  437. package/src/bridge/adapters/base-adapter.d.ts +0 -103
  438. package/src/bridge/adapters/base-adapter.js +0 -314
  439. package/src/bridge/adapters/base-adapter.js.map +0 -1
  440. package/src/bridge/adapters/claude.adapter.d.ts +0 -66
  441. package/src/bridge/adapters/claude.adapter.js +0 -145
  442. package/src/bridge/adapters/claude.adapter.js.map +0 -1
  443. package/src/bridge/adapters/ext-apps.adapter.d.ts +0 -142
  444. package/src/bridge/adapters/ext-apps.adapter.js +0 -416
  445. package/src/bridge/adapters/ext-apps.adapter.js.map +0 -1
  446. package/src/bridge/adapters/gemini.adapter.d.ts +0 -63
  447. package/src/bridge/adapters/gemini.adapter.js +0 -160
  448. package/src/bridge/adapters/gemini.adapter.js.map +0 -1
  449. package/src/bridge/adapters/generic.adapter.d.ts +0 -55
  450. package/src/bridge/adapters/generic.adapter.js +0 -108
  451. package/src/bridge/adapters/generic.adapter.js.map +0 -1
  452. package/src/bridge/adapters/index.d.ts +0 -25
  453. package/src/bridge/adapters/index.js +0 -65
  454. package/src/bridge/adapters/index.js.map +0 -1
  455. package/src/bridge/adapters/openai.adapter.d.ts +0 -64
  456. package/src/bridge/adapters/openai.adapter.js +0 -194
  457. package/src/bridge/adapters/openai.adapter.js.map +0 -1
  458. package/src/bridge/core/adapter-registry.d.ts +0 -121
  459. package/src/bridge/core/adapter-registry.js +0 -271
  460. package/src/bridge/core/adapter-registry.js.map +0 -1
  461. package/src/bridge/core/bridge-factory.d.ts +0 -198
  462. package/src/bridge/core/bridge-factory.js +0 -428
  463. package/src/bridge/core/bridge-factory.js.map +0 -1
  464. package/src/bridge/core/index.d.ts +0 -9
  465. package/src/bridge/core/index.js +0 -22
  466. package/src/bridge/core/index.js.map +0 -1
  467. package/src/bridge/index.d.ts +0 -61
  468. package/src/bridge/index.js +0 -94
  469. package/src/bridge/index.js.map +0 -1
  470. package/src/bridge/runtime/iife-generator.d.ts +0 -61
  471. package/src/bridge/runtime/iife-generator.js +0 -940
  472. package/src/bridge/runtime/iife-generator.js.map +0 -1
  473. package/src/bridge/runtime/index.d.ts +0 -8
  474. package/src/bridge/runtime/index.js +0 -16
  475. package/src/bridge/runtime/index.js.map +0 -1
  476. package/src/bridge/types.d.ts +0 -385
  477. package/src/bridge/types.js +0 -11
  478. package/src/bridge/types.js.map +0 -1
  479. package/src/build/cdn-resources.d.ts +0 -140
  480. package/src/build/cdn-resources.js +0 -314
  481. package/src/build/cdn-resources.js.map +0 -1
  482. package/src/build/index.d.ts +0 -294
  483. package/src/build/index.js +0 -325
  484. package/src/build/index.js.map +0 -1
  485. package/src/build/widget-manifest.d.ts +0 -212
  486. package/src/build/widget-manifest.js +0 -652
  487. package/src/build/widget-manifest.js.map +0 -1
  488. package/src/bundler/bundler.d.ts +0 -110
  489. package/src/bundler/bundler.js +0 -432
  490. package/src/bundler/bundler.js.map +0 -1
  491. package/src/bundler/cache.d.ts +0 -172
  492. package/src/bundler/cache.js +0 -250
  493. package/src/bundler/cache.js.map +0 -1
  494. package/src/bundler/index.d.ts +0 -41
  495. package/src/bundler/index.js +0 -73
  496. package/src/bundler/index.js.map +0 -1
  497. package/src/bundler/sandbox/enclave-adapter.d.ts +0 -120
  498. package/src/bundler/sandbox/enclave-adapter.js +0 -339
  499. package/src/bundler/sandbox/enclave-adapter.js.map +0 -1
  500. package/src/bundler/sandbox/executor.d.ts +0 -13
  501. package/src/bundler/sandbox/executor.js +0 -22
  502. package/src/bundler/sandbox/executor.js.map +0 -1
  503. package/src/bundler/sandbox/policy.d.ts +0 -61
  504. package/src/bundler/sandbox/policy.js +0 -238
  505. package/src/bundler/sandbox/policy.js.map +0 -1
  506. package/src/bundler/types.d.ts +0 -347
  507. package/src/bundler/types.js +0 -132
  508. package/src/bundler/types.js.map +0 -1
  509. package/src/components/alert.d.ts +0 -71
  510. package/src/components/alert.js +0 -189
  511. package/src/components/alert.js.map +0 -1
  512. package/src/components/alert.schema.d.ts +0 -114
  513. package/src/components/alert.schema.js +0 -105
  514. package/src/components/alert.schema.js.map +0 -1
  515. package/src/components/avatar.d.ts +0 -76
  516. package/src/components/avatar.js +0 -176
  517. package/src/components/avatar.js.map +0 -1
  518. package/src/components/avatar.schema.d.ts +0 -169
  519. package/src/components/avatar.schema.js +0 -103
  520. package/src/components/avatar.schema.js.map +0 -1
  521. package/src/components/badge.d.ts +0 -70
  522. package/src/components/badge.js +0 -149
  523. package/src/components/badge.js.map +0 -1
  524. package/src/components/badge.schema.d.ts +0 -109
  525. package/src/components/badge.schema.js +0 -96
  526. package/src/components/badge.schema.js.map +0 -1
  527. package/src/components/button.d.ts +0 -111
  528. package/src/components/button.js +0 -336
  529. package/src/components/button.js.map +0 -1
  530. package/src/components/button.schema.d.ts +0 -148
  531. package/src/components/button.schema.js +0 -121
  532. package/src/components/button.schema.js.map +0 -1
  533. package/src/components/card.d.ts +0 -60
  534. package/src/components/card.js +0 -117
  535. package/src/components/card.js.map +0 -1
  536. package/src/components/card.schema.d.ts +0 -113
  537. package/src/components/card.schema.js +0 -98
  538. package/src/components/card.schema.js.map +0 -1
  539. package/src/components/form.d.ts +0 -239
  540. package/src/components/form.js +0 -420
  541. package/src/components/form.js.map +0 -1
  542. package/src/components/form.schema.d.ts +0 -441
  543. package/src/components/form.schema.js +0 -406
  544. package/src/components/form.schema.js.map +0 -1
  545. package/src/components/index.d.ts +0 -29
  546. package/src/components/index.js +0 -98
  547. package/src/components/index.js.map +0 -1
  548. package/src/components/list.d.ts +0 -127
  549. package/src/components/list.js +0 -279
  550. package/src/components/list.js.map +0 -1
  551. package/src/components/list.schema.d.ts +0 -134
  552. package/src/components/list.schema.js +0 -168
  553. package/src/components/list.schema.js.map +0 -1
  554. package/src/components/modal.d.ts +0 -111
  555. package/src/components/modal.js +0 -260
  556. package/src/components/modal.js.map +0 -1
  557. package/src/components/modal.schema.d.ts +0 -186
  558. package/src/components/modal.schema.js +0 -167
  559. package/src/components/modal.schema.js.map +0 -1
  560. package/src/components/table.d.ts +0 -105
  561. package/src/components/table.js +0 -283
  562. package/src/components/table.js.map +0 -1
  563. package/src/components/table.schema.d.ts +0 -159
  564. package/src/components/table.schema.js +0 -173
  565. package/src/components/table.schema.js.map +0 -1
  566. package/src/handlebars/helpers.d.ts +0 -348
  567. package/src/handlebars/helpers.js +0 -605
  568. package/src/handlebars/helpers.js.map +0 -1
  569. package/src/handlebars/index.d.ts +0 -193
  570. package/src/handlebars/index.js +0 -350
  571. package/src/handlebars/index.js.map +0 -1
  572. package/src/index.d.ts +0 -50
  573. package/src/index.js +0 -192
  574. package/src/index.js.map +0 -1
  575. package/src/layouts/base.d.ts +0 -88
  576. package/src/layouts/base.js +0 -227
  577. package/src/layouts/base.js.map +0 -1
  578. package/src/layouts/index.d.ts +0 -7
  579. package/src/layouts/index.js +0 -25
  580. package/src/layouts/index.js.map +0 -1
  581. package/src/layouts/presets.d.ts +0 -133
  582. package/src/layouts/presets.js +0 -277
  583. package/src/layouts/presets.js.map +0 -1
  584. package/src/pages/consent.d.ts +0 -116
  585. package/src/pages/consent.js +0 -218
  586. package/src/pages/consent.js.map +0 -1
  587. package/src/pages/error.d.ts +0 -100
  588. package/src/pages/error.js +0 -263
  589. package/src/pages/error.js.map +0 -1
  590. package/src/pages/index.d.ts +0 -8
  591. package/src/pages/index.js +0 -27
  592. package/src/pages/index.js.map +0 -1
  593. package/src/react/Alert.d.ts +0 -101
  594. package/src/react/Alert.js +0 -51
  595. package/src/react/Alert.js.map +0 -1
  596. package/src/react/Badge.d.ts +0 -100
  597. package/src/react/Badge.js +0 -55
  598. package/src/react/Badge.js.map +0 -1
  599. package/src/react/Button.d.ts +0 -108
  600. package/src/react/Button.js +0 -52
  601. package/src/react/Button.js.map +0 -1
  602. package/src/react/Card.d.ts +0 -103
  603. package/src/react/Card.js +0 -55
  604. package/src/react/Card.js.map +0 -1
  605. package/src/react/hooks/context.d.ts +0 -178
  606. package/src/react/hooks/context.js +0 -287
  607. package/src/react/hooks/context.js.map +0 -1
  608. package/src/react/hooks/index.d.ts +0 -41
  609. package/src/react/hooks/index.js +0 -61
  610. package/src/react/hooks/index.js.map +0 -1
  611. package/src/react/hooks/tools.d.ts +0 -283
  612. package/src/react/hooks/tools.js +0 -465
  613. package/src/react/hooks/tools.js.map +0 -1
  614. package/src/react/index.d.ts +0 -80
  615. package/src/react/index.js +0 -113
  616. package/src/react/index.js.map +0 -1
  617. package/src/react/types.d.ts +0 -105
  618. package/src/react/types.js +0 -12
  619. package/src/react/types.js.map +0 -1
  620. package/src/react/utils.d.ts +0 -42
  621. package/src/react/utils.js +0 -99
  622. package/src/react/utils.js.map +0 -1
  623. package/src/registry/index.d.ts +0 -45
  624. package/src/registry/index.js +0 -67
  625. package/src/registry/index.js.map +0 -1
  626. package/src/registry/render-template.d.ts +0 -86
  627. package/src/registry/render-template.js +0 -239
  628. package/src/registry/render-template.js.map +0 -1
  629. package/src/registry/tool-ui.registry.d.ts +0 -260
  630. package/src/registry/tool-ui.registry.js +0 -438
  631. package/src/registry/tool-ui.registry.js.map +0 -1
  632. package/src/registry/uri-utils.d.ts +0 -55
  633. package/src/registry/uri-utils.js +0 -97
  634. package/src/registry/uri-utils.js.map +0 -1
  635. package/src/render/index.d.ts +0 -7
  636. package/src/render/index.js +0 -14
  637. package/src/render/index.js.map +0 -1
  638. package/src/render/prerender.d.ts +0 -56
  639. package/src/render/prerender.js +0 -98
  640. package/src/render/prerender.js.map +0 -1
  641. package/src/renderers/cache.d.ts +0 -144
  642. package/src/renderers/cache.js +0 -240
  643. package/src/renderers/cache.js.map +0 -1
  644. package/src/renderers/html.renderer.d.ts +0 -122
  645. package/src/renderers/html.renderer.js +0 -204
  646. package/src/renderers/html.renderer.js.map +0 -1
  647. package/src/renderers/index.d.ts +0 -35
  648. package/src/renderers/index.js +0 -70
  649. package/src/renderers/index.js.map +0 -1
  650. package/src/renderers/mdx.renderer.d.ts +0 -119
  651. package/src/renderers/mdx.renderer.js +0 -305
  652. package/src/renderers/mdx.renderer.js.map +0 -1
  653. package/src/renderers/react.renderer.d.ts +0 -95
  654. package/src/renderers/react.renderer.js +0 -260
  655. package/src/renderers/react.renderer.js.map +0 -1
  656. package/src/renderers/registry.d.ts +0 -133
  657. package/src/renderers/registry.js +0 -232
  658. package/src/renderers/registry.js.map +0 -1
  659. package/src/renderers/types.d.ts +0 -341
  660. package/src/renderers/types.js +0 -9
  661. package/src/renderers/types.js.map +0 -1
  662. package/src/renderers/utils/detect.d.ts +0 -106
  663. package/src/renderers/utils/detect.js +0 -267
  664. package/src/renderers/utils/detect.js.map +0 -1
  665. package/src/renderers/utils/hash.d.ts +0 -39
  666. package/src/renderers/utils/hash.js +0 -75
  667. package/src/renderers/utils/hash.js.map +0 -1
  668. package/src/renderers/utils/index.d.ts +0 -8
  669. package/src/renderers/utils/index.js +0 -28
  670. package/src/renderers/utils/index.js.map +0 -1
  671. package/src/renderers/utils/transpiler.d.ts +0 -88
  672. package/src/renderers/utils/transpiler.js +0 -215
  673. package/src/renderers/utils/transpiler.js.map +0 -1
  674. package/src/runtime/adapters/html.adapter.d.ts +0 -58
  675. package/src/runtime/adapters/html.adapter.js +0 -131
  676. package/src/runtime/adapters/html.adapter.js.map +0 -1
  677. package/src/runtime/adapters/index.d.ts +0 -25
  678. package/src/runtime/adapters/index.js +0 -54
  679. package/src/runtime/adapters/index.js.map +0 -1
  680. package/src/runtime/adapters/mdx.adapter.d.ts +0 -72
  681. package/src/runtime/adapters/mdx.adapter.js +0 -241
  682. package/src/runtime/adapters/mdx.adapter.js.map +0 -1
  683. package/src/runtime/adapters/react.adapter.d.ts +0 -69
  684. package/src/runtime/adapters/react.adapter.js +0 -245
  685. package/src/runtime/adapters/react.adapter.js.map +0 -1
  686. package/src/runtime/adapters/types.d.ts +0 -94
  687. package/src/runtime/adapters/types.js +0 -11
  688. package/src/runtime/adapters/types.js.map +0 -1
  689. package/src/runtime/csp.d.ts +0 -37
  690. package/src/runtime/csp.js +0 -140
  691. package/src/runtime/csp.js.map +0 -1
  692. package/src/runtime/index.d.ts +0 -16
  693. package/src/runtime/index.js +0 -72
  694. package/src/runtime/index.js.map +0 -1
  695. package/src/runtime/mcp-bridge.d.ts +0 -100
  696. package/src/runtime/mcp-bridge.js +0 -581
  697. package/src/runtime/mcp-bridge.js.map +0 -1
  698. package/src/runtime/renderer-runtime.d.ts +0 -132
  699. package/src/runtime/renderer-runtime.js +0 -389
  700. package/src/runtime/renderer-runtime.js.map +0 -1
  701. package/src/runtime/sanitizer.d.ts +0 -171
  702. package/src/runtime/sanitizer.js +0 -318
  703. package/src/runtime/sanitizer.js.map +0 -1
  704. package/src/runtime/types.d.ts +0 -414
  705. package/src/runtime/types.js +0 -12
  706. package/src/runtime/types.js.map +0 -1
  707. package/src/runtime/wrapper.d.ts +0 -375
  708. package/src/runtime/wrapper.js +0 -1793
  709. package/src/runtime/wrapper.js.map +0 -1
  710. package/src/styles/index.d.ts +0 -7
  711. package/src/styles/index.js +0 -11
  712. package/src/styles/index.js.map +0 -1
  713. package/src/styles/variants.d.ts +0 -50
  714. package/src/styles/variants.js +0 -175
  715. package/src/styles/variants.js.map +0 -1
  716. package/src/theme/cdn.d.ts +0 -194
  717. package/src/theme/cdn.js +0 -375
  718. package/src/theme/cdn.js.map +0 -1
  719. package/src/theme/index.d.ts +0 -17
  720. package/src/theme/index.js +0 -57
  721. package/src/theme/index.js.map +0 -1
  722. package/src/theme/platforms.d.ts +0 -106
  723. package/src/theme/platforms.js +0 -161
  724. package/src/theme/platforms.js.map +0 -1
  725. package/src/theme/presets/github-openai.d.ts +0 -49
  726. package/src/theme/presets/github-openai.js +0 -189
  727. package/src/theme/presets/github-openai.js.map +0 -1
  728. package/src/theme/presets/index.d.ts +0 -10
  729. package/src/theme/presets/index.js +0 -17
  730. package/src/theme/presets/index.js.map +0 -1
  731. package/src/theme/theme.d.ts +0 -395
  732. package/src/theme/theme.js +0 -332
  733. package/src/theme/theme.js.map +0 -1
  734. package/src/tool-template/builder.d.ts +0 -212
  735. package/src/tool-template/builder.js +0 -397
  736. package/src/tool-template/builder.js.map +0 -1
  737. package/src/tool-template/index.d.ts +0 -15
  738. package/src/tool-template/index.js +0 -38
  739. package/src/tool-template/index.js.map +0 -1
  740. package/src/types/index.d.ts +0 -13
  741. package/src/types/index.js +0 -26
  742. package/src/types/index.js.map +0 -1
  743. package/src/types/ui-config.d.ts +0 -357
  744. package/src/types/ui-config.js +0 -12
  745. package/src/types/ui-config.js.map +0 -1
  746. package/src/types/ui-runtime.d.ts +0 -965
  747. package/src/types/ui-runtime.js +0 -117
  748. package/src/types/ui-runtime.js.map +0 -1
  749. package/src/validation/error-box.d.ts +0 -55
  750. package/src/validation/error-box.js +0 -75
  751. package/src/validation/error-box.js.map +0 -1
  752. package/src/validation/index.d.ts +0 -12
  753. package/src/validation/index.js +0 -21
  754. package/src/validation/index.js.map +0 -1
  755. package/src/validation/wrapper.d.ts +0 -96
  756. package/src/validation/wrapper.js +0 -117
  757. package/src/validation/wrapper.js.map +0 -1
  758. package/src/web-components/core/attribute-parser.d.ts +0 -85
  759. package/src/web-components/core/attribute-parser.js +0 -189
  760. package/src/web-components/core/attribute-parser.js.map +0 -1
  761. package/src/web-components/core/base-element.d.ts +0 -197
  762. package/src/web-components/core/base-element.js +0 -289
  763. package/src/web-components/core/base-element.js.map +0 -1
  764. package/src/web-components/core/index.d.ts +0 -8
  765. package/src/web-components/core/index.js +0 -18
  766. package/src/web-components/core/index.js.map +0 -1
  767. package/src/web-components/elements/fmcp-alert.d.ts +0 -45
  768. package/src/web-components/elements/fmcp-alert.js +0 -93
  769. package/src/web-components/elements/fmcp-alert.js.map +0 -1
  770. package/src/web-components/elements/fmcp-badge.d.ts +0 -46
  771. package/src/web-components/elements/fmcp-badge.js +0 -99
  772. package/src/web-components/elements/fmcp-badge.js.map +0 -1
  773. package/src/web-components/elements/fmcp-button.d.ts +0 -124
  774. package/src/web-components/elements/fmcp-button.js +0 -233
  775. package/src/web-components/elements/fmcp-button.js.map +0 -1
  776. package/src/web-components/elements/fmcp-card.d.ts +0 -52
  777. package/src/web-components/elements/fmcp-card.js +0 -115
  778. package/src/web-components/elements/fmcp-card.js.map +0 -1
  779. package/src/web-components/elements/fmcp-input.d.ts +0 -95
  780. package/src/web-components/elements/fmcp-input.js +0 -248
  781. package/src/web-components/elements/fmcp-input.js.map +0 -1
  782. package/src/web-components/elements/fmcp-select.d.ts +0 -99
  783. package/src/web-components/elements/fmcp-select.js +0 -243
  784. package/src/web-components/elements/fmcp-select.js.map +0 -1
  785. package/src/web-components/elements/index.d.ts +0 -12
  786. package/src/web-components/elements/index.js +0 -34
  787. package/src/web-components/elements/index.js.map +0 -1
  788. package/src/web-components/index.d.ts +0 -49
  789. package/src/web-components/index.js +0 -75
  790. package/src/web-components/index.js.map +0 -1
  791. package/src/web-components/register.d.ts +0 -56
  792. package/src/web-components/register.js +0 -80
  793. package/src/web-components/register.js.map +0 -1
  794. package/src/web-components/types.d.ts +0 -121
  795. package/src/web-components/types.js +0 -25
  796. package/src/web-components/types.js.map +0 -1
  797. package/src/widgets/index.d.ts +0 -7
  798. package/src/widgets/index.js +0 -24
  799. package/src/widgets/index.js.map +0 -1
  800. package/src/widgets/progress.d.ts +0 -132
  801. package/src/widgets/progress.js +0 -303
  802. package/src/widgets/progress.js.map +0 -1
  803. package/src/widgets/resource.d.ts +0 -162
  804. package/src/widgets/resource.js +0 -340
  805. package/src/widgets/resource.js.map +0 -1
@@ -1,194 +0,0 @@
1
- /**
2
- * @file cdn.ts
3
- * @description CDN Configuration for FrontMCP UI.
4
- *
5
- * Centralized configuration for all CDN resources used by FrontMCP UI.
6
- * All resources are loaded at runtime - no build step required.
7
- *
8
- * For platforms with blocked network (e.g., Claude Artifacts),
9
- * scripts can be fetched once and cached for inline injection.
10
- *
11
- * CDN URLs can be customized via theme configuration for:
12
- * - Using private CDN mirrors
13
- * - Self-hosting resources
14
- * - Compliance with CSP policies
15
- *
16
- * @example
17
- * ```typescript
18
- * import { buildCdnScriptsFromTheme, DEFAULT_THEME } from '@frontmcp/ui';
19
- *
20
- * // Use default CDN URLs
21
- * const scripts = buildCdnScripts();
22
- *
23
- * // Use theme-configured CDN URLs
24
- * const themedScripts = buildCdnScriptsFromTheme(DEFAULT_THEME);
25
- * ```
26
- *
27
- * @module @frontmcp/ui/theme/cdn
28
- */
29
- import type { ThemeConfig } from './theme';
30
- /**
31
- * CDN resource configuration
32
- */
33
- export declare const CDN: {
34
- /**
35
- * Tailwind CSS v4 Browser CDN
36
- * Generates styles on-the-fly with @theme support
37
- * @see https://tailwindcss.com/docs/installation/play-cdn
38
- */
39
- readonly tailwind: "https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4";
40
- /**
41
- * HTMX 2.x - High power tools for HTML
42
- * Enables AJAX, WebSockets, Server Sent Events directly in HTML
43
- * @see https://htmx.org
44
- */
45
- readonly htmx: {
46
- readonly url: "https://cdnjs.cloudflare.com/ajax/libs/htmx/2.0.7/htmx.min.js";
47
- readonly integrity: "sha512-T6VLg/MJYMbLTmQ8VLvonbWg8VOvmDhXcOvHzCwo6ShdGuUU5SEcp1IAPXL4k9lVoMi8gRXl5K/S/zh43Y9rJA==";
48
- };
49
- /**
50
- * Alpine.js - Lightweight reactive framework
51
- * Used for more complex client-side interactions
52
- * @see https://alpinejs.dev
53
- */
54
- readonly alpine: {
55
- readonly url: "https://cdn.jsdelivr.net/npm/alpinejs@3.14.3/dist/cdn.min.js";
56
- readonly integrity: "sha384-6zY8MFQJ/EqS1r4RJl+7j8rvZPuBWpT0RzWf+IFcKhxqUzQNmJzA1X1VEVZhYaEz";
57
- };
58
- /**
59
- * Google Fonts - Inter for modern UI typography
60
- */
61
- readonly fonts: {
62
- readonly preconnect: readonly ["https://fonts.googleapis.com", "https://fonts.gstatic.com"];
63
- readonly inter: "https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap";
64
- readonly mono: "https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&display=swap";
65
- };
66
- /**
67
- * Lucide Icons - Beautiful & consistent icons
68
- * @see https://lucide.dev
69
- */
70
- readonly icons: {
71
- readonly url: "https://cdn.jsdelivr.net/npm/lucide@0.294.0/dist/umd/lucide.min.js";
72
- readonly integrity: "sha384-wpLmHb7v7V1LsEuTmPQ9tXqWZvTtRWWVqJuE+Yz6X0I6O2T6bHJVeXH1lVWqF4qE";
73
- };
74
- };
75
- /**
76
- * Fetch a script and cache its content
77
- */
78
- export declare function fetchScript(url: string): Promise<string>;
79
- /**
80
- * Fetch and cache all required scripts for offline use
81
- * Call this at startup to prepare for blocked-network platforms
82
- */
83
- export declare function fetchAndCacheScripts(options?: {
84
- tailwind?: boolean;
85
- htmx?: boolean;
86
- alpine?: boolean;
87
- icons?: boolean;
88
- }): Promise<Map<string, string>>;
89
- /**
90
- * Get cached script content
91
- */
92
- export declare function getCachedScript(url: string): string | undefined;
93
- /**
94
- * Check if a script is cached
95
- */
96
- export declare function isScriptCached(url: string): boolean;
97
- /**
98
- * Clear the script cache
99
- */
100
- export declare function clearScriptCache(): void;
101
- /**
102
- * Options for building CDN script tags
103
- */
104
- export interface CdnScriptOptions {
105
- /** Include Tailwind CSS (default: true) */
106
- tailwind?: boolean;
107
- /** Include HTMX (default: true) */
108
- htmx?: boolean;
109
- /** Include Alpine.js (default: false) */
110
- alpine?: boolean;
111
- /** Include Lucide icons (default: false) */
112
- icons?: boolean;
113
- /** Include Inter font (default: true) */
114
- interFont?: boolean;
115
- /** Include JetBrains Mono font (default: false) */
116
- monoFont?: boolean;
117
- /** Use inline scripts from cache (for blocked network) */
118
- inline?: boolean;
119
- }
120
- /**
121
- * Build font preconnect links
122
- */
123
- export declare function buildFontPreconnect(): string;
124
- /**
125
- * Build font stylesheet links
126
- */
127
- export declare function buildFontStylesheets(options?: {
128
- inter?: boolean;
129
- mono?: boolean;
130
- }): string;
131
- /**
132
- * Build all CDN script tags based on options
133
- *
134
- * @remarks
135
- * When `inline: true` is specified, scripts must be pre-cached via `fetchAndCacheScripts()`.
136
- * Uncached scripts will be silently skipped with a console warning.
137
- */
138
- export declare function buildCdnScripts(options?: CdnScriptOptions): string;
139
- /**
140
- * Options for theme-aware CDN script building
141
- */
142
- export interface ThemeCdnScriptOptions {
143
- /** Include Tailwind CSS (default: true) */
144
- tailwind?: boolean;
145
- /** Include HTMX (default: true) */
146
- htmx?: boolean;
147
- /** Include Alpine.js (default: false) */
148
- alpine?: boolean;
149
- /** Include icon library (default: false) */
150
- icons?: boolean;
151
- /** Use inline scripts from cache (for blocked network) */
152
- inline?: boolean;
153
- }
154
- /**
155
- * Build font preconnect links from theme CDN configuration
156
- *
157
- * @param theme - Theme configuration with CDN settings
158
- * @returns HTML preconnect link tags
159
- */
160
- export declare function buildFontPreconnectFromTheme(theme: ThemeConfig): string;
161
- /**
162
- * Build font stylesheet links from theme CDN configuration
163
- *
164
- * @param theme - Theme configuration with CDN settings
165
- * @returns HTML stylesheet link tags
166
- */
167
- export declare function buildFontStylesheetsFromTheme(theme: ThemeConfig): string;
168
- /**
169
- * Build all CDN script tags from theme configuration
170
- *
171
- * Uses theme.cdn configuration if available, falls back to global CDN defaults.
172
- *
173
- * @remarks
174
- * When `inline: true` is specified, scripts must be pre-cached via `fetchAndCacheScriptsFromTheme()`.
175
- * Uncached scripts will be silently skipped with a console warning.
176
- *
177
- * @param theme - Theme configuration with CDN settings
178
- * @param options - Script inclusion options
179
- * @returns HTML script tags
180
- */
181
- export declare function buildCdnScriptsFromTheme(theme: ThemeConfig, options?: ThemeCdnScriptOptions): string;
182
- /**
183
- * Fetch and cache scripts based on theme CDN configuration
184
- *
185
- * @param theme - Theme configuration with CDN settings
186
- * @param options - Which scripts to cache
187
- * @returns Map of cached script URLs to content
188
- */
189
- export declare function fetchAndCacheScriptsFromTheme(theme: ThemeConfig, options?: {
190
- tailwind?: boolean;
191
- htmx?: boolean;
192
- alpine?: boolean;
193
- icons?: boolean;
194
- }): Promise<Map<string, string>>;
package/src/theme/cdn.js DELETED
@@ -1,375 +0,0 @@
1
- "use strict";
2
- /**
3
- * @file cdn.ts
4
- * @description CDN Configuration for FrontMCP UI.
5
- *
6
- * Centralized configuration for all CDN resources used by FrontMCP UI.
7
- * All resources are loaded at runtime - no build step required.
8
- *
9
- * For platforms with blocked network (e.g., Claude Artifacts),
10
- * scripts can be fetched once and cached for inline injection.
11
- *
12
- * CDN URLs can be customized via theme configuration for:
13
- * - Using private CDN mirrors
14
- * - Self-hosting resources
15
- * - Compliance with CSP policies
16
- *
17
- * @example
18
- * ```typescript
19
- * import { buildCdnScriptsFromTheme, DEFAULT_THEME } from '@frontmcp/ui';
20
- *
21
- * // Use default CDN URLs
22
- * const scripts = buildCdnScripts();
23
- *
24
- * // Use theme-configured CDN URLs
25
- * const themedScripts = buildCdnScriptsFromTheme(DEFAULT_THEME);
26
- * ```
27
- *
28
- * @module @frontmcp/ui/theme/cdn
29
- */
30
- Object.defineProperty(exports, "__esModule", { value: true });
31
- exports.CDN = void 0;
32
- exports.fetchScript = fetchScript;
33
- exports.fetchAndCacheScripts = fetchAndCacheScripts;
34
- exports.getCachedScript = getCachedScript;
35
- exports.isScriptCached = isScriptCached;
36
- exports.clearScriptCache = clearScriptCache;
37
- exports.buildFontPreconnect = buildFontPreconnect;
38
- exports.buildFontStylesheets = buildFontStylesheets;
39
- exports.buildCdnScripts = buildCdnScripts;
40
- exports.buildFontPreconnectFromTheme = buildFontPreconnectFromTheme;
41
- exports.buildFontStylesheetsFromTheme = buildFontStylesheetsFromTheme;
42
- exports.buildCdnScriptsFromTheme = buildCdnScriptsFromTheme;
43
- exports.fetchAndCacheScriptsFromTheme = fetchAndCacheScriptsFromTheme;
44
- // ============================================
45
- // CDN URLs
46
- // ============================================
47
- /**
48
- * CDN resource configuration
49
- */
50
- exports.CDN = {
51
- /**
52
- * Tailwind CSS v4 Browser CDN
53
- * Generates styles on-the-fly with @theme support
54
- * @see https://tailwindcss.com/docs/installation/play-cdn
55
- */
56
- tailwind: 'https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4',
57
- /**
58
- * HTMX 2.x - High power tools for HTML
59
- * Enables AJAX, WebSockets, Server Sent Events directly in HTML
60
- * @see https://htmx.org
61
- */
62
- htmx: {
63
- url: 'https://cdnjs.cloudflare.com/ajax/libs/htmx/2.0.7/htmx.min.js',
64
- integrity: 'sha512-T6VLg/MJYMbLTmQ8VLvonbWg8VOvmDhXcOvHzCwo6ShdGuUU5SEcp1IAPXL4k9lVoMi8gRXl5K/S/zh43Y9rJA==',
65
- },
66
- /**
67
- * Alpine.js - Lightweight reactive framework
68
- * Used for more complex client-side interactions
69
- * @see https://alpinejs.dev
70
- */
71
- alpine: {
72
- url: 'https://cdn.jsdelivr.net/npm/alpinejs@3.14.3/dist/cdn.min.js',
73
- integrity: 'sha384-6zY8MFQJ/EqS1r4RJl+7j8rvZPuBWpT0RzWf+IFcKhxqUzQNmJzA1X1VEVZhYaEz',
74
- },
75
- /**
76
- * Google Fonts - Inter for modern UI typography
77
- */
78
- fonts: {
79
- preconnect: ['https://fonts.googleapis.com', 'https://fonts.gstatic.com'],
80
- inter: 'https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap',
81
- mono: 'https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&display=swap',
82
- },
83
- /**
84
- * Lucide Icons - Beautiful & consistent icons
85
- * @see https://lucide.dev
86
- */
87
- icons: {
88
- url: 'https://cdn.jsdelivr.net/npm/lucide@0.294.0/dist/umd/lucide.min.js',
89
- integrity: 'sha384-wpLmHb7v7V1LsEuTmPQ9tXqWZvTtRWWVqJuE+Yz6X0I6O2T6bHJVeXH1lVWqF4qE',
90
- },
91
- };
92
- // ============================================
93
- // Script Cache for Offline/Blocked Platforms
94
- // ============================================
95
- /**
96
- * Cached script content for platforms with blocked network
97
- * These are populated by fetchAndCacheScripts()
98
- */
99
- const scriptCache = new Map();
100
- /**
101
- * Fetch a script and cache its content
102
- */
103
- async function fetchScript(url) {
104
- if (scriptCache.has(url)) {
105
- return scriptCache.get(url);
106
- }
107
- const response = await fetch(url);
108
- if (!response.ok) {
109
- throw new Error(`Failed to fetch script: ${url} (${response.status})`);
110
- }
111
- const content = await response.text();
112
- scriptCache.set(url, content);
113
- return content;
114
- }
115
- /**
116
- * Fetch and cache all required scripts for offline use
117
- * Call this at startup to prepare for blocked-network platforms
118
- */
119
- async function fetchAndCacheScripts(options = {}) {
120
- const { tailwind = true, htmx = true, alpine = false, icons = false } = options;
121
- const urls = [];
122
- if (tailwind)
123
- urls.push(exports.CDN.tailwind);
124
- if (htmx)
125
- urls.push(exports.CDN.htmx.url);
126
- if (alpine)
127
- urls.push(exports.CDN.alpine.url);
128
- if (icons)
129
- urls.push(exports.CDN.icons.url);
130
- await Promise.all(urls.map(fetchScript));
131
- return scriptCache;
132
- }
133
- /**
134
- * Get cached script content
135
- */
136
- function getCachedScript(url) {
137
- return scriptCache.get(url);
138
- }
139
- /**
140
- * Check if a script is cached
141
- */
142
- function isScriptCached(url) {
143
- return scriptCache.has(url);
144
- }
145
- /**
146
- * Clear the script cache
147
- */
148
- function clearScriptCache() {
149
- scriptCache.clear();
150
- }
151
- /**
152
- * Build font preconnect links
153
- */
154
- function buildFontPreconnect() {
155
- return exports.CDN.fonts.preconnect
156
- .map((url, i) => `<link rel="preconnect" href="${url}"${i > 0 ? ' crossorigin' : ''}>`)
157
- .join('\n ');
158
- }
159
- /**
160
- * Build font stylesheet links
161
- */
162
- function buildFontStylesheets(options = {}) {
163
- const { inter = true, mono = false } = options;
164
- const links = [];
165
- if (inter) {
166
- links.push(`<link href="${exports.CDN.fonts.inter}" rel="stylesheet">`);
167
- }
168
- if (mono) {
169
- links.push(`<link href="${exports.CDN.fonts.mono}" rel="stylesheet">`);
170
- }
171
- return links.join('\n ');
172
- }
173
- /**
174
- * Build script tag with optional integrity
175
- */
176
- function buildScriptTag(url, integrity, options = {}) {
177
- const attrs = [`src="${url}"`];
178
- if (integrity) {
179
- attrs.push(`integrity="${integrity}"`);
180
- attrs.push('crossorigin="anonymous"');
181
- }
182
- if (options.defer)
183
- attrs.push('defer');
184
- if (options.async)
185
- attrs.push('async');
186
- return `<script ${attrs.join(' ')}></script>`;
187
- }
188
- /**
189
- * Build inline script tag from cached content
190
- */
191
- function buildInlineScriptTag(content) {
192
- return `<script>${content}</script>`;
193
- }
194
- /**
195
- * Build all CDN script tags based on options
196
- *
197
- * @remarks
198
- * When `inline: true` is specified, scripts must be pre-cached via `fetchAndCacheScripts()`.
199
- * Uncached scripts will be silently skipped with a console warning.
200
- */
201
- function buildCdnScripts(options = {}) {
202
- const { tailwind = true, htmx = true, alpine = false, icons = false, inline = false } = options;
203
- const scripts = [];
204
- if (inline) {
205
- // Use cached inline scripts - warn if not cached
206
- if (tailwind) {
207
- if (isScriptCached(exports.CDN.tailwind)) {
208
- scripts.push(buildInlineScriptTag(getCachedScript(exports.CDN.tailwind)));
209
- }
210
- else {
211
- console.warn('[frontmcp/ui] Inline mode requested but Tailwind script not cached. Call fetchAndCacheScripts() first.');
212
- }
213
- }
214
- if (htmx) {
215
- if (isScriptCached(exports.CDN.htmx.url)) {
216
- scripts.push(buildInlineScriptTag(getCachedScript(exports.CDN.htmx.url)));
217
- }
218
- else {
219
- console.warn('[frontmcp/ui] Inline mode requested but HTMX script not cached. Call fetchAndCacheScripts() first.');
220
- }
221
- }
222
- if (alpine) {
223
- if (isScriptCached(exports.CDN.alpine.url)) {
224
- scripts.push(buildInlineScriptTag(getCachedScript(exports.CDN.alpine.url)));
225
- }
226
- else {
227
- console.warn('[frontmcp/ui] Inline mode requested but Alpine.js script not cached. Call fetchAndCacheScripts() first.');
228
- }
229
- }
230
- if (icons) {
231
- if (isScriptCached(exports.CDN.icons.url)) {
232
- scripts.push(buildInlineScriptTag(getCachedScript(exports.CDN.icons.url)));
233
- }
234
- else {
235
- console.warn('[frontmcp/ui] Inline mode requested but Lucide icons script not cached. Call fetchAndCacheScripts() first.');
236
- }
237
- }
238
- }
239
- else {
240
- // Use CDN URLs
241
- if (tailwind) {
242
- scripts.push(buildScriptTag(exports.CDN.tailwind));
243
- }
244
- if (htmx) {
245
- scripts.push(buildScriptTag(exports.CDN.htmx.url, exports.CDN.htmx.integrity));
246
- }
247
- if (alpine) {
248
- scripts.push(buildScriptTag(exports.CDN.alpine.url, exports.CDN.alpine.integrity, { defer: true }));
249
- }
250
- if (icons) {
251
- scripts.push(buildScriptTag(exports.CDN.icons.url, exports.CDN.icons.integrity));
252
- }
253
- }
254
- return scripts.join('\n ');
255
- }
256
- /**
257
- * Build font preconnect links from theme CDN configuration
258
- *
259
- * @param theme - Theme configuration with CDN settings
260
- * @returns HTML preconnect link tags
261
- */
262
- function buildFontPreconnectFromTheme(theme) {
263
- const preconnect = theme.cdn?.fonts?.preconnect ?? exports.CDN.fonts.preconnect;
264
- return preconnect.map((url, i) => `<link rel="preconnect" href="${url}"${i > 0 ? ' crossorigin' : ''}>`).join('\n ');
265
- }
266
- /**
267
- * Build font stylesheet links from theme CDN configuration
268
- *
269
- * @param theme - Theme configuration with CDN settings
270
- * @returns HTML stylesheet link tags
271
- */
272
- function buildFontStylesheetsFromTheme(theme) {
273
- const stylesheets = theme.cdn?.fonts?.stylesheets ?? [exports.CDN.fonts.inter];
274
- return stylesheets.map((url) => `<link href="${url}" rel="stylesheet">`).join('\n ');
275
- }
276
- /**
277
- * Build all CDN script tags from theme configuration
278
- *
279
- * Uses theme.cdn configuration if available, falls back to global CDN defaults.
280
- *
281
- * @remarks
282
- * When `inline: true` is specified, scripts must be pre-cached via `fetchAndCacheScriptsFromTheme()`.
283
- * Uncached scripts will be silently skipped with a console warning.
284
- *
285
- * @param theme - Theme configuration with CDN settings
286
- * @param options - Script inclusion options
287
- * @returns HTML script tags
288
- */
289
- function buildCdnScriptsFromTheme(theme, options = {}) {
290
- const { tailwind = true, htmx = true, alpine = false, icons = false, inline = false } = options;
291
- const scripts = [];
292
- // Get URLs from theme or fallback to defaults
293
- const tailwindUrl = theme.cdn?.scripts?.tailwind ?? exports.CDN.tailwind;
294
- const htmxConfig = theme.cdn?.scripts?.htmx ?? exports.CDN.htmx;
295
- const alpineConfig = theme.cdn?.scripts?.alpine ?? exports.CDN.alpine;
296
- const iconsConfig = theme.cdn?.icons?.script ?? exports.CDN.icons;
297
- if (inline) {
298
- // Use cached inline scripts - warn if not cached
299
- if (tailwind) {
300
- if (isScriptCached(tailwindUrl)) {
301
- scripts.push(buildInlineScriptTag(getCachedScript(tailwindUrl)));
302
- }
303
- else {
304
- console.warn('[frontmcp/ui] Inline mode requested but Tailwind script not cached. Call fetchAndCacheScriptsFromTheme() first.');
305
- }
306
- }
307
- if (htmx) {
308
- if (isScriptCached(htmxConfig.url)) {
309
- scripts.push(buildInlineScriptTag(getCachedScript(htmxConfig.url)));
310
- }
311
- else {
312
- console.warn('[frontmcp/ui] Inline mode requested but HTMX script not cached. Call fetchAndCacheScriptsFromTheme() first.');
313
- }
314
- }
315
- if (alpine) {
316
- if (isScriptCached(alpineConfig.url)) {
317
- scripts.push(buildInlineScriptTag(getCachedScript(alpineConfig.url)));
318
- }
319
- else {
320
- console.warn('[frontmcp/ui] Inline mode requested but Alpine.js script not cached. Call fetchAndCacheScriptsFromTheme() first.');
321
- }
322
- }
323
- if (icons) {
324
- if (isScriptCached(iconsConfig.url)) {
325
- scripts.push(buildInlineScriptTag(getCachedScript(iconsConfig.url)));
326
- }
327
- else {
328
- console.warn('[frontmcp/ui] Inline mode requested but icons script not cached. Call fetchAndCacheScriptsFromTheme() first.');
329
- }
330
- }
331
- }
332
- else {
333
- // Use CDN URLs from theme
334
- if (tailwind) {
335
- scripts.push(buildScriptTag(tailwindUrl));
336
- }
337
- if (htmx) {
338
- scripts.push(buildScriptTag(htmxConfig.url, htmxConfig.integrity));
339
- }
340
- if (alpine) {
341
- scripts.push(buildScriptTag(alpineConfig.url, alpineConfig.integrity, { defer: true }));
342
- }
343
- if (icons) {
344
- scripts.push(buildScriptTag(iconsConfig.url, iconsConfig.integrity));
345
- }
346
- }
347
- return scripts.join('\n ');
348
- }
349
- /**
350
- * Fetch and cache scripts based on theme CDN configuration
351
- *
352
- * @param theme - Theme configuration with CDN settings
353
- * @param options - Which scripts to cache
354
- * @returns Map of cached script URLs to content
355
- */
356
- async function fetchAndCacheScriptsFromTheme(theme, options = {}) {
357
- const { tailwind = true, htmx = true, alpine = false, icons = false } = options;
358
- const urls = [];
359
- // Get URLs from theme or fallback to defaults
360
- const tailwindUrl = theme.cdn?.scripts?.tailwind ?? exports.CDN.tailwind;
361
- const htmxConfig = theme.cdn?.scripts?.htmx ?? exports.CDN.htmx;
362
- const alpineConfig = theme.cdn?.scripts?.alpine ?? exports.CDN.alpine;
363
- const iconsConfig = theme.cdn?.icons?.script ?? exports.CDN.icons;
364
- if (tailwind)
365
- urls.push(tailwindUrl);
366
- if (htmx)
367
- urls.push(htmxConfig.url);
368
- if (alpine)
369
- urls.push(alpineConfig.url);
370
- if (icons)
371
- urls.push(iconsConfig.url);
372
- await Promise.all(urls.map(fetchScript));
373
- return scriptCache;
374
- }
375
- //# sourceMappingURL=cdn.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cdn.js","sourceRoot":"","sources":["../../../src/theme/cdn.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;;;AAuEH,kCAaC;AAMD,oDAkBC;AAKD,0CAEC;AAKD,wCAEC;AAKD,4CAEC;AA6BD,kDAIC;AAKD,oDAYC;AAgCD,0CA4DC;AA4BD,oEAGC;AAQD,sEAGC;AAeD,4DAkEC;AASD,sEAyBC;AAxaD,+CAA+C;AAC/C,WAAW;AACX,+CAA+C;AAE/C;;GAEG;AACU,QAAA,GAAG,GAAG;IACjB;;;;OAIG;IACH,QAAQ,EAAE,qDAAqD;IAE/D;;;;OAIG;IACH,IAAI,EAAE;QACJ,GAAG,EAAE,+DAA+D;QACpE,SAAS,EAAE,iGAAiG;KAC7G;IAED;;;;OAI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G,CAAC,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC;IACzC,OAAO,WAAW,CAAC;AACrB,CAAC","sourcesContent":["/**\n * @file cdn.ts\n * @description CDN Configuration for FrontMCP UI.\n *\n * Centralized configuration for all CDN resources used by FrontMCP UI.\n * All resources are loaded at runtime - no build step required.\n *\n * For platforms with blocked network (e.g., Claude Artifacts),\n * scripts can be fetched once and cached for inline injection.\n *\n * CDN URLs can be customized via theme configuration for:\n * - Using private CDN mirrors\n * - Self-hosting resources\n * - Compliance with CSP policies\n *\n * @example\n * ```typescript\n * import { buildCdnScriptsFromTheme, DEFAULT_THEME } from '@frontmcp/ui';\n *\n * // Use default CDN URLs\n * const scripts = buildCdnScripts();\n *\n * // Use theme-configured CDN URLs\n * const themedScripts = buildCdnScriptsFromTheme(DEFAULT_THEME);\n * ```\n *\n * @module @frontmcp/ui/theme/cdn\n */\n\nimport type { ThemeConfig } from './theme';\n\n// ============================================\n// CDN URLs\n// ============================================\n\n/**\n * CDN resource configuration\n */\nexport const CDN = {\n /**\n * Tailwind CSS v4 Browser CDN\n * Generates styles on-the-fly with @theme support\n * @see https://tailwindcss.com/docs/installation/play-cdn\n */\n tailwind: 'https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4',\n\n /**\n * HTMX 2.x - High power tools for HTML\n * Enables AJAX, WebSockets, Server Sent Events directly in HTML\n * @see https://htmx.org\n */\n htmx: {\n url: 'https://cdnjs.cloudflare.com/ajax/libs/htmx/2.0.7/htmx.min.js',\n integrity: 'sha512-T6VLg/MJYMbLTmQ8VLvonbWg8VOvmDhXcOvHzCwo6ShdGuUU5SEcp1IAPXL4k9lVoMi8gRXl5K/S/zh43Y9rJA==',\n },\n\n /**\n * Alpine.js - Lightweight reactive framework\n * Used for more complex client-side interactions\n * @see https://alpinejs.dev\n */\n alpine: {\n url: 'https://cdn.jsdelivr.net/npm/alpinejs@3.14.3/dist/cdn.min.js',\n integrity: 'sha384-6zY8MFQJ/EqS1r4RJl+7j8rvZPuBWpT0RzWf+IFcKhxqUzQNmJzA1X1VEVZhYaEz',\n },\n\n /**\n * Google Fonts - Inter for modern UI typography\n */\n fonts: {\n preconnect: ['https://fonts.googleapis.com', 'https://fonts.gstatic.com'],\n inter: 'https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap',\n mono: 'https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&display=swap',\n },\n\n /**\n * Lucide Icons - Beautiful & consistent icons\n * @see https://lucide.dev\n */\n icons: {\n url: 'https://cdn.jsdelivr.net/npm/lucide@0.294.0/dist/umd/lucide.min.js',\n integrity: 'sha384-wpLmHb7v7V1LsEuTmPQ9tXqWZvTtRWWVqJuE+Yz6X0I6O2T6bHJVeXH1lVWqF4qE',\n },\n} as const;\n\n// ============================================\n// Script Cache for Offline/Blocked Platforms\n// ============================================\n\n/**\n * Cached script content for platforms with blocked network\n * These are populated by fetchAndCacheScripts()\n */\nconst scriptCache: Map<string, string> = new Map();\n\n/**\n * Fetch a script and cache its content\n */\nexport async function fetchScript(url: string): Promise<string> {\n if (scriptCache.has(url)) {\n return scriptCache.get(url)!;\n }\n\n const response = await fetch(url);\n if (!response.ok) {\n throw new Error(`Failed to fetch script: ${url} (${response.status})`);\n }\n\n const content = await response.text();\n scriptCache.set(url, content);\n return content;\n}\n\n/**\n * Fetch and cache all required scripts for offline use\n * Call this at startup to prepare for blocked-network platforms\n */\nexport async function fetchAndCacheScripts(\n options: {\n tailwind?: boolean;\n htmx?: boolean;\n alpine?: boolean;\n icons?: boolean;\n } = {},\n): Promise<Map<string, string>> {\n const { tailwind = true, htmx = true, alpine = false, icons = false } = options;\n const urls: string[] = [];\n\n if (tailwind) urls.push(CDN.tailwind);\n if (htmx) urls.push(CDN.htmx.url);\n if (alpine) urls.push(CDN.alpine.url);\n if (icons) urls.push(CDN.icons.url);\n\n await Promise.all(urls.map(fetchScript));\n return scriptCache;\n}\n\n/**\n * Get cached script content\n */\nexport function getCachedScript(url: string): string | undefined {\n return scriptCache.get(url);\n}\n\n/**\n * Check if a script is cached\n */\nexport function isScriptCached(url: string): boolean {\n return scriptCache.has(url);\n}\n\n/**\n * Clear the script cache\n */\nexport function clearScriptCache(): void {\n scriptCache.clear();\n}\n\n// ============================================\n// CDN Builder Utilities\n// ============================================\n\n/**\n * Options for building CDN script tags\n */\nexport interface CdnScriptOptions {\n /** Include Tailwind CSS (default: true) */\n tailwind?: boolean;\n /** Include HTMX (default: true) */\n htmx?: boolean;\n /** Include Alpine.js (default: false) */\n alpine?: boolean;\n /** Include Lucide icons (default: false) */\n icons?: boolean;\n /** Include Inter font (default: true) */\n interFont?: boolean;\n /** Include JetBrains Mono font (default: false) */\n monoFont?: boolean;\n /** Use inline scripts from cache (for blocked network) */\n inline?: boolean;\n}\n\n/**\n * Build font preconnect links\n */\nexport function buildFontPreconnect(): string {\n return CDN.fonts.preconnect\n .map((url, i) => `<link rel=\"preconnect\" href=\"${url}\"${i > 0 ? ' crossorigin' : ''}>`)\n .join('\\n ');\n}\n\n/**\n * Build font stylesheet links\n */\nexport function buildFontStylesheets(options: { inter?: boolean; mono?: boolean } = {}): string {\n const { inter = true, mono = false } = options;\n const links: string[] = [];\n\n if (inter) {\n links.push(`<link href=\"${CDN.fonts.inter}\" rel=\"stylesheet\">`);\n }\n if (mono) {\n links.push(`<link href=\"${CDN.fonts.mono}\" rel=\"stylesheet\">`);\n }\n\n return links.join('\\n ');\n}\n\n/**\n * Build script tag with optional integrity\n */\nfunction buildScriptTag(url: string, integrity?: string, options: { defer?: boolean; async?: boolean } = {}): string {\n const attrs: string[] = [`src=\"${url}\"`];\n\n if (integrity) {\n attrs.push(`integrity=\"${integrity}\"`);\n attrs.push('crossorigin=\"anonymous\"');\n }\n if (options.defer) attrs.push('defer');\n if (options.async) attrs.push('async');\n\n return `<script ${attrs.join(' ')}></script>`;\n}\n\n/**\n * Build inline script tag from cached content\n */\nfunction buildInlineScriptTag(content: string): string {\n return `<script>${content}</script>`;\n}\n\n/**\n * Build all CDN script tags based on options\n *\n * @remarks\n * When `inline: true` is specified, scripts must be pre-cached via `fetchAndCacheScripts()`.\n * Uncached scripts will be silently skipped with a console warning.\n */\nexport function buildCdnScripts(options: CdnScriptOptions = {}): string {\n const { tailwind = true, htmx = true, alpine = false, icons = false, inline = false } = options;\n\n const scripts: string[] = [];\n\n if (inline) {\n // Use cached inline scripts - warn if not cached\n if (tailwind) {\n if (isScriptCached(CDN.tailwind)) {\n scripts.push(buildInlineScriptTag(getCachedScript(CDN.tailwind)!));\n } else {\n console.warn(\n '[frontmcp/ui] Inline mode requested but Tailwind script not cached. Call fetchAndCacheScripts() first.',\n );\n }\n }\n if (htmx) {\n if (isScriptCached(CDN.htmx.url)) {\n scripts.push(buildInlineScriptTag(getCachedScript(CDN.htmx.url)!));\n } else {\n console.warn(\n '[frontmcp/ui] Inline mode requested but HTMX script not cached. Call fetchAndCacheScripts() first.',\n );\n }\n }\n if (alpine) {\n if (isScriptCached(CDN.alpine.url)) {\n scripts.push(buildInlineScriptTag(getCachedScript(CDN.alpine.url)!));\n } else {\n console.warn(\n '[frontmcp/ui] Inline mode requested but Alpine.js script not cached. Call fetchAndCacheScripts() first.',\n );\n }\n }\n if (icons) {\n if (isScriptCached(CDN.icons.url)) {\n scripts.push(buildInlineScriptTag(getCachedScript(CDN.icons.url)!));\n } else {\n console.warn(\n '[frontmcp/ui] Inline mode requested but Lucide icons script not cached. Call fetchAndCacheScripts() first.',\n );\n }\n }\n } else {\n // Use CDN URLs\n if (tailwind) {\n scripts.push(buildScriptTag(CDN.tailwind));\n }\n if (htmx) {\n scripts.push(buildScriptTag(CDN.htmx.url, CDN.htmx.integrity));\n }\n if (alpine) {\n scripts.push(buildScriptTag(CDN.alpine.url, CDN.alpine.integrity, { defer: true }));\n }\n if (icons) {\n scripts.push(buildScriptTag(CDN.icons.url, CDN.icons.integrity));\n }\n }\n\n return scripts.join('\\n ');\n}\n\n// ============================================\n// Theme-Aware CDN Builders\n// ============================================\n\n/**\n * Options for theme-aware CDN script building\n */\nexport interface ThemeCdnScriptOptions {\n /** Include Tailwind CSS (default: true) */\n tailwind?: boolean;\n /** Include HTMX (default: true) */\n htmx?: boolean;\n /** Include Alpine.js (default: false) */\n alpine?: boolean;\n /** Include icon library (default: false) */\n icons?: boolean;\n /** Use inline scripts from cache (for blocked network) */\n inline?: boolean;\n}\n\n/**\n * Build font preconnect links from theme CDN configuration\n *\n * @param theme - Theme configuration with CDN settings\n * @returns HTML preconnect link tags\n */\nexport function buildFontPreconnectFromTheme(theme: ThemeConfig): string {\n const preconnect = theme.cdn?.fonts?.preconnect ?? CDN.fonts.preconnect;\n return preconnect.map((url, i) => `<link rel=\"preconnect\" href=\"${url}\"${i > 0 ? ' crossorigin' : ''}>`).join('\\n ');\n}\n\n/**\n * Build font stylesheet links from theme CDN configuration\n *\n * @param theme - Theme configuration with CDN settings\n * @returns HTML stylesheet link tags\n */\nexport function buildFontStylesheetsFromTheme(theme: ThemeConfig): string {\n const stylesheets = theme.cdn?.fonts?.stylesheets ?? [CDN.fonts.inter];\n return stylesheets.map((url) => `<link href=\"${url}\" rel=\"stylesheet\">`).join('\\n ');\n}\n\n/**\n * Build all CDN script tags from theme configuration\n *\n * Uses theme.cdn configuration if available, falls back to global CDN defaults.\n *\n * @remarks\n * When `inline: true` is specified, scripts must be pre-cached via `fetchAndCacheScriptsFromTheme()`.\n * Uncached scripts will be silently skipped with a console warning.\n *\n * @param theme - Theme configuration with CDN settings\n * @param options - Script inclusion options\n * @returns HTML script tags\n */\nexport function buildCdnScriptsFromTheme(theme: ThemeConfig, options: ThemeCdnScriptOptions = {}): string {\n const { tailwind = true, htmx = true, alpine = false, icons = false, inline = false } = options;\n\n const scripts: string[] = [];\n\n // Get URLs from theme or fallback to defaults\n const tailwindUrl = theme.cdn?.scripts?.tailwind ?? CDN.tailwind;\n const htmxConfig = theme.cdn?.scripts?.htmx ?? CDN.htmx;\n const alpineConfig = theme.cdn?.scripts?.alpine ?? CDN.alpine;\n const iconsConfig = theme.cdn?.icons?.script ?? CDN.icons;\n\n if (inline) {\n // Use cached inline scripts - warn if not cached\n if (tailwind) {\n if (isScriptCached(tailwindUrl)) {\n scripts.push(buildInlineScriptTag(getCachedScript(tailwindUrl)!));\n } else {\n console.warn(\n '[frontmcp/ui] Inline mode requested but Tailwind script not cached. Call fetchAndCacheScriptsFromTheme() first.',\n );\n }\n }\n if (htmx) {\n if (isScriptCached(htmxConfig.url)) {\n scripts.push(buildInlineScriptTag(getCachedScript(htmxConfig.url)!));\n } else {\n console.warn(\n '[frontmcp/ui] Inline mode requested but HTMX script not cached. Call fetchAndCacheScriptsFromTheme() first.',\n );\n }\n }\n if (alpine) {\n if (isScriptCached(alpineConfig.url)) {\n scripts.push(buildInlineScriptTag(getCachedScript(alpineConfig.url)!));\n } else {\n console.warn(\n '[frontmcp/ui] Inline mode requested but Alpine.js script not cached. Call fetchAndCacheScriptsFromTheme() first.',\n );\n }\n }\n if (icons) {\n if (isScriptCached(iconsConfig.url)) {\n scripts.push(buildInlineScriptTag(getCachedScript(iconsConfig.url)!));\n } else {\n console.warn(\n '[frontmcp/ui] Inline mode requested but icons script not cached. Call fetchAndCacheScriptsFromTheme() first.',\n );\n }\n }\n } else {\n // Use CDN URLs from theme\n if (tailwind) {\n scripts.push(buildScriptTag(tailwindUrl));\n }\n if (htmx) {\n scripts.push(buildScriptTag(htmxConfig.url, htmxConfig.integrity));\n }\n if (alpine) {\n scripts.push(buildScriptTag(alpineConfig.url, alpineConfig.integrity, { defer: true }));\n }\n if (icons) {\n scripts.push(buildScriptTag(iconsConfig.url, iconsConfig.integrity));\n }\n }\n\n return scripts.join('\\n ');\n}\n\n/**\n * Fetch and cache scripts based on theme CDN configuration\n *\n * @param theme - Theme configuration with CDN settings\n * @param options - Which scripts to cache\n * @returns Map of cached script URLs to content\n */\nexport async function fetchAndCacheScriptsFromTheme(\n theme: ThemeConfig,\n options: {\n tailwind?: boolean;\n htmx?: boolean;\n alpine?: boolean;\n icons?: boolean;\n } = {},\n): Promise<Map<string, string>> {\n const { tailwind = true, htmx = true, alpine = false, icons = false } = options;\n const urls: string[] = [];\n\n // Get URLs from theme or fallback to defaults\n const tailwindUrl = theme.cdn?.scripts?.tailwind ?? CDN.tailwind;\n const htmxConfig = theme.cdn?.scripts?.htmx ?? CDN.htmx;\n const alpineConfig = theme.cdn?.scripts?.alpine ?? CDN.alpine;\n const iconsConfig = theme.cdn?.icons?.script ?? CDN.icons;\n\n if (tailwind) urls.push(tailwindUrl);\n if (htmx) urls.push(htmxConfig.url);\n if (alpine) urls.push(alpineConfig.url);\n if (icons) urls.push(iconsConfig.url);\n\n await Promise.all(urls.map(fetchScript));\n return scriptCache;\n}\n"]}
@@ -1,17 +0,0 @@
1
- /**
2
- * @file index.ts
3
- * @description Theme Module for FrontMCP UI.
4
- *
5
- * Provides comprehensive theming capabilities including:
6
- * - Color palettes and semantic tokens
7
- * - Typography and spacing configuration
8
- * - CDN resource customization
9
- * - Platform-specific configurations
10
- * - Theme presets (GitHub/OpenAI default)
11
- *
12
- * @module @frontmcp/ui/theme
13
- */
14
- export { CDN, type CdnScriptOptions, type ThemeCdnScriptOptions, fetchScript, fetchAndCacheScripts, fetchAndCacheScriptsFromTheme, getCachedScript, isScriptCached, clearScriptCache, buildFontPreconnect, buildFontPreconnectFromTheme, buildFontStylesheets, buildFontStylesheetsFromTheme, buildCdnScripts, buildCdnScriptsFromTheme, } from './cdn';
15
- export { type PlatformId, type NetworkMode, type ScriptStrategy, type PlatformCapabilities, OPENAI_PLATFORM, CLAUDE_PLATFORM, GEMINI_PLATFORM, NGROK_PLATFORM, CUSTOM_PLATFORM, PLATFORM_PRESETS, getPlatform, createPlatform, canUseCdn, needsInlineScripts, supportsFullInteractivity, getFallbackMode, } from './platforms';
16
- export { type DeepPartial, type ColorScale, type SemanticColors, type SurfaceColors, type TextColors, type BorderColors, type ThemeColors, type FontFamilies, type FontSizes, type FontWeights, type ThemeTypography, type ThemeSpacing, type ThemeRadius, type ThemeShadows, type ButtonTokens, type CardTokens, type InputTokens, type ComponentTokens, type CdnScriptResource, type ThemeCdnFonts, type ThemeCdnIcons, type ThemeCdnScripts, type ThemeCdnConfig, type ThemeConfig, mergeThemes, createTheme, buildThemeCss, buildStyleBlock, } from './theme';
17
- export { GITHUB_OPENAI_THEME, DEFAULT_THEME } from './presets';