@seed-ship/mcp-ui-solid 6.20.0 → 6.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/CHANGELOG.md +223 -0
  2. package/README.md +120 -3
  3. package/dist/components/ChartJSRenderer.cjs +244 -68
  4. package/dist/components/ChartJSRenderer.cjs.map +1 -1
  5. package/dist/components/ChartJSRenderer.d.ts +9 -0
  6. package/dist/components/ChartJSRenderer.d.ts.map +1 -1
  7. package/dist/components/ChartJSRenderer.js +246 -70
  8. package/dist/components/ChartJSRenderer.js.map +1 -1
  9. package/dist/components/ExpandableWrapper.cjs +9 -1
  10. package/dist/components/ExpandableWrapper.cjs.map +1 -1
  11. package/dist/components/ExpandableWrapper.d.ts.map +1 -1
  12. package/dist/components/ExpandableWrapper.js +9 -1
  13. package/dist/components/ExpandableWrapper.js.map +1 -1
  14. package/dist/components/IframeFallbackLink.cjs +37 -0
  15. package/dist/components/IframeFallbackLink.cjs.map +1 -0
  16. package/dist/components/IframeFallbackLink.d.ts +23 -0
  17. package/dist/components/IframeFallbackLink.d.ts.map +1 -0
  18. package/dist/components/IframeFallbackLink.js +37 -0
  19. package/dist/components/IframeFallbackLink.js.map +1 -0
  20. package/dist/components/LightboxOverlay.cjs +139 -16
  21. package/dist/components/LightboxOverlay.cjs.map +1 -1
  22. package/dist/components/LightboxOverlay.d.ts +6 -0
  23. package/dist/components/LightboxOverlay.d.ts.map +1 -1
  24. package/dist/components/LightboxOverlay.js +141 -18
  25. package/dist/components/LightboxOverlay.js.map +1 -1
  26. package/dist/components/UIResourceRenderer.cjs +150 -127
  27. package/dist/components/UIResourceRenderer.cjs.map +1 -1
  28. package/dist/components/UIResourceRenderer.d.ts.map +1 -1
  29. package/dist/components/UIResourceRenderer.js +151 -128
  30. package/dist/components/UIResourceRenderer.js.map +1 -1
  31. package/dist/components/VideoRenderer.cjs +45 -19
  32. package/dist/components/VideoRenderer.cjs.map +1 -1
  33. package/dist/components/VideoRenderer.d.ts.map +1 -1
  34. package/dist/components/VideoRenderer.js +45 -19
  35. package/dist/components/VideoRenderer.js.map +1 -1
  36. package/dist/context/MCPUIConfigContext.cjs +30 -0
  37. package/dist/context/MCPUIConfigContext.cjs.map +1 -0
  38. package/dist/context/MCPUIConfigContext.d.ts +173 -0
  39. package/dist/context/MCPUIConfigContext.d.ts.map +1 -0
  40. package/dist/context/MCPUIConfigContext.js +30 -0
  41. package/dist/context/MCPUIConfigContext.js.map +1 -0
  42. package/dist/context/MCPUIStringsContext.cjs +8 -1
  43. package/dist/context/MCPUIStringsContext.cjs.map +1 -1
  44. package/dist/context/MCPUIStringsContext.d.ts +29 -0
  45. package/dist/context/MCPUIStringsContext.d.ts.map +1 -1
  46. package/dist/context/MCPUIStringsContext.js +8 -1
  47. package/dist/context/MCPUIStringsContext.js.map +1 -1
  48. package/dist/hooks/index.d.ts +2 -0
  49. package/dist/hooks/index.d.ts.map +1 -1
  50. package/dist/hooks.cjs +2 -0
  51. package/dist/hooks.cjs.map +1 -1
  52. package/dist/hooks.js +2 -0
  53. package/dist/hooks.js.map +1 -1
  54. package/dist/index.cjs +12 -0
  55. package/dist/index.cjs.map +1 -1
  56. package/dist/index.d.cts +5 -1
  57. package/dist/index.d.ts +5 -1
  58. package/dist/index.d.ts.map +1 -1
  59. package/dist/index.js +14 -2
  60. package/dist/index.js.map +1 -1
  61. package/dist/services/index.d.ts +1 -1
  62. package/dist/services/index.d.ts.map +1 -1
  63. package/dist/services/validation.cjs +11 -10
  64. package/dist/services/validation.cjs.map +1 -1
  65. package/dist/services/validation.d.ts +20 -0
  66. package/dist/services/validation.d.ts.map +1 -1
  67. package/dist/services/validation.js +11 -10
  68. package/dist/services/validation.js.map +1 -1
  69. package/dist/utils/iframe-coep.cjs +30 -0
  70. package/dist/utils/iframe-coep.cjs.map +1 -0
  71. package/dist/utils/iframe-coep.d.ts +53 -0
  72. package/dist/utils/iframe-coep.d.ts.map +1 -0
  73. package/dist/utils/iframe-coep.js +30 -0
  74. package/dist/utils/iframe-coep.js.map +1 -0
  75. package/dist/utils/pan-zoom.cjs +312 -0
  76. package/dist/utils/pan-zoom.cjs.map +1 -0
  77. package/dist/utils/pan-zoom.d.ts +235 -0
  78. package/dist/utils/pan-zoom.d.ts.map +1 -0
  79. package/dist/utils/pan-zoom.js +312 -0
  80. package/dist/utils/pan-zoom.js.map +1 -0
  81. package/dist/validation.cjs +2 -0
  82. package/dist/validation.cjs.map +1 -1
  83. package/dist/validation.d.cts +1 -1
  84. package/dist/validation.d.ts +1 -1
  85. package/dist/validation.d.ts.map +1 -1
  86. package/dist/validation.js +3 -1
  87. package/package.json +5 -1
  88. package/src/components/ChartJSRenderer.tsx +396 -1
  89. package/src/components/ExpandableWrapper.tsx +26 -0
  90. package/src/components/IframeFallbackLink.tsx +57 -0
  91. package/src/components/LightboxOverlay.tsx +280 -4
  92. package/src/components/UIResourceRenderer.tsx +31 -4
  93. package/src/components/VideoRenderer.tsx +20 -0
  94. package/src/context/MCPUIConfigContext.tsx +202 -0
  95. package/src/context/MCPUIStringsContext.tsx +40 -0
  96. package/src/hooks/index.ts +13 -0
  97. package/src/index.ts +31 -0
  98. package/src/services/index.ts +1 -0
  99. package/src/services/validation.ts +38 -16
  100. package/src/solid-jsx-attrs.d.ts +24 -0
  101. package/src/utils/iframe-coep.ts +81 -0
  102. package/src/utils/pan-zoom.ts +779 -0
  103. package/src/validation.ts +4 -0
@@ -4,7 +4,7 @@ import { sanitizeHtml, SANITIZE_PROFILES, canSanitizeHtml } from "../utils/sanit
4
4
  import { escapeHtml } from "../utils/escape-html.js";
5
5
  import { safeUrl } from "../utils/safe-url.js";
6
6
  import { SafeHtml } from "./SafeHtml.js";
7
- import { validateComponent, getIframeSandbox, DEFAULT_RESOURCE_LIMITS } from "../services/validation.js";
7
+ import { validateComponent, getIframeSandbox, isTrustedIframeDomain, DEFAULT_RESOURCE_LIMITS } from "../services/validation.js";
8
8
  import { GenerativeUIErrorBoundary } from "./GenerativeUIErrorBoundary.js";
9
9
  import { markRenderStart, markRenderEnd, PERF_PREFIX } from "../utils/perf.js";
10
10
  import { isDebugEnabled } from "../utils/logger.js";
@@ -12,6 +12,9 @@ import { getUiResourceStableKey } from "../utils/stable-key.js";
12
12
  import { _registerMount, _unregisterMount, getDuplicateMountReporter } from "../utils/duplicate-mount-registry.js";
13
13
  import { useTelemetry } from "../context/MCPUITelemetryContext.js";
14
14
  import { useMCPUIStrings, DEFAULT_MCPUI_STRINGS } from "../context/MCPUIStringsContext.js";
15
+ import { useMCPUIConfig } from "../context/MCPUIConfigContext.js";
16
+ import { shouldSetCredentialless } from "../utils/iframe-coep.js";
17
+ import { IframeFallbackLink } from "./IframeFallbackLink.js";
15
18
  import { GridRenderer } from "./GridRenderer.js";
16
19
  import { FooterRenderer } from "./FooterRenderer.js";
17
20
  import { CarouselRenderer } from "./CarouselRenderer.js";
@@ -34,7 +37,7 @@ import { useAction } from "../hooks/useAction.js";
34
37
  import { createResponsiveGrid } from "../hooks/createResponsiveGrid.js";
35
38
  import { marked } from "marked";
36
39
  import { formatMCPUIString } from "../utils/format-string.js";
37
- var _tmpl$ = /* @__PURE__ */ template(`<svg class="w-3 h-3 text-gray-500 dark:text-gray-400"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z">`), _tmpl$2 = /* @__PURE__ */ template(`<button data-mcp-ui-action=copy type=button>`), _tmpl$3 = /* @__PURE__ */ template(`<svg class="w-3 h-3 text-green-500"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M5 13l4 4L19 7">`), _tmpl$4 = /* @__PURE__ */ template(`<div class="p-4 bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700"><p class="text-red-500 dark:text-red-400 text-sm">`), _tmpl$5 = /* @__PURE__ */ template(`<div class=p-3>`), _tmpl$6 = /* @__PURE__ */ template(`<div class="absolute inset-0 flex items-center justify-center"><div class="animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600">`), _tmpl$7 = /* @__PURE__ */ template(`<div class="absolute inset-0 flex items-center justify-center p-4"><div class=text-center><p class="text-red-600 dark:text-red-400 text-sm font-medium"></p><p class="text-gray-600 dark:text-gray-400 text-xs mt-1">`), _tmpl$8 = /* @__PURE__ */ template(`<h3 class="text-sm font-semibold text-gray-900 dark:text-white mb-3">`), _tmpl$9 = /* @__PURE__ */ template(`<div class="w-full h-full p-4"><!$><!/><div class="w-full h-full"role=img><img class="w-full h-auto max-h-[300px] object-contain">`), _tmpl$0 = /* @__PURE__ */ template(`<div class="relative w-full h-full min-h-[300px] bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700 overflow-hidden"><!$><!/><!$><!/><!$><!/><!$><!/>`), _tmpl$1 = /* @__PURE__ */ template(`<tbody class="bg-white dark:bg-gray-800 divide-y divide-gray-200 dark:divide-gray-700">`), _tmpl$10 = /* @__PURE__ */ template(`<tr>`), _tmpl$11 = /* @__PURE__ */ template(`<td class="px-6 py-4 text-sm text-gray-700 dark:text-gray-200 whitespace-normal break-words leading-relaxed first:pl-6 last:pr-6">`), _tmpl$12 = /* @__PURE__ */ template(`<tbody class="bg-white dark:bg-gray-800 relative">`), _tmpl$13 = /* @__PURE__ */ template(`<button class="w-full text-left px-3 py-1.5 hover:bg-gray-100 dark:hover:bg-gray-700 text-gray-700 dark:text-gray-300">`), _tmpl$14 = /* @__PURE__ */ template(`<div class="absolute right-10 top-2 z-10"><button class="opacity-60 hover:opacity-100 px-2 py-1 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-600 rounded-full hover:bg-gray-100 dark:hover:bg-gray-700 transition-all shadow-sm"aria-haspopup=menu><svg class="w-3 h-3 text-gray-500 dark:text-gray-400"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M12 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path></svg></button><!$><!/>`), _tmpl$15 = /* @__PURE__ */ template(`<span class="ml-2 text-xs font-normal text-gray-400">`), _tmpl$16 = /* @__PURE__ */ template(`<h3 class="text-sm font-semibold text-gray-900 dark:text-white mb-3 flex-shrink-0"><!$><!/><!$><!/>`), _tmpl$17 = /* @__PURE__ */ template(`<button type=button class="absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 text-sm">&times;`), _tmpl$18 = /* @__PURE__ */ template(`<div class="relative mb-3"><span class="absolute left-3 top-1/2 -translate-y-1/2 text-gray-400 pointer-events-none text-sm">🔍</span><input type=text class="w-full max-w-xs min-w-[200px] pl-8 pr-8 py-1.5 text-sm border border-gray-200 dark:border-gray-600 rounded-md bg-white dark:bg-gray-700 text-gray-900 dark:text-white placeholder-gray-400 focus:border-blue-400 focus:ring-1 focus:ring-blue-400 outline-none"><!$><!/>`), _tmpl$19 = /* @__PURE__ */ template(`<p class="text-xs text-gray-500 dark:text-gray-400 mb-2">`), _tmpl$20 = /* @__PURE__ */ template(`<div class="mt-3 flex items-center justify-between text-xs text-gray-500 dark:text-gray-400"><span>`), _tmpl$21 = /* @__PURE__ */ template(`<select class="ml-2 px-1 py-0.5 text-xs border border-gray-200 dark:border-gray-600 rounded bg-white dark:bg-gray-700 text-gray-700 dark:text-gray-300"data-mcp-ui-action=page-size>`), _tmpl$22 = /* @__PURE__ */ template(`<span class=text-gray-400>`), _tmpl$23 = /* @__PURE__ */ template(`<div class="mt-3 flex items-center justify-between text-xs text-gray-500 dark:text-gray-400"><span><!$><!/>&ndash;<!$><!/> / <!$><!/></span><div class="flex items-center gap-2"><button type=button class="px-2 py-1 rounded hover:bg-gray-100 dark:hover:bg-gray-700 disabled:opacity-40 disabled:cursor-not-allowed transition-colors"data-mcp-ui-action=page-prev><span aria-hidden=true>&#x25C0;</span></button><span aria-live=polite><!$><!/> / <!$><!/></span><button type=button class="px-2 py-1 rounded hover:bg-gray-100 dark:hover:bg-gray-700 disabled:opacity-40 disabled:cursor-not-allowed transition-colors"data-mcp-ui-action=page-next><span aria-hidden=true>&#x25B6;</span></button><!$><!/>`), _tmpl$24 = /* @__PURE__ */ template(`<div><!$><!/><div><!$><!/><!$><!/><div role=region tabindex=0><table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700 border-separate border-spacing-0"><thead class="bg-gray-100 dark:bg-gray-900 sticky top-0 z-10"><tr></tr></thead><!$><!/></table></div><!$><!/><!$><!/>`), _tmpl$25 = /* @__PURE__ */ template(`<th scope=col class="px-6 py-3 text-left text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wider border-b border-gray-200 dark:border-gray-700 first:pl-6 last:pr-6 bg-gray-100 dark:bg-gray-900 cursor-pointer select-none hover:bg-gray-200 dark:hover:bg-gray-800 transition-colors"><span class="inline-flex items-center gap-1"><!$><!/><span class="text-[10px] leading-none">`), _tmpl$26 = /* @__PURE__ */ template(`<option>`), _tmpl$27 = /* @__PURE__ */ template(`<span class="ml-2 text-sm font-medium text-gray-500 dark:text-gray-400">`), _tmpl$28 = /* @__PURE__ */ template(`<div class="mt-3 flex items-center"><span><!$><!/> <!$><!/>%`), _tmpl$29 = /* @__PURE__ */ template(`<p class="mt-2 text-xs text-gray-500 dark:text-gray-400">`), _tmpl$30 = /* @__PURE__ */ template(`<div class="relative w-full h-full bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700 p-4 group"><!$><!/><div class="flex flex-col h-full justify-between"><div><p class="text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wide"></p><div class="mt-2 flex items-baseline"><p class="text-2xl font-semibold text-gray-900 dark:text-white"></p><!$><!/></div></div><!$><!/><!$><!/>`), _tmpl$31 = /* @__PURE__ */ template(`<div class="relative w-full h-full bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700 p-4 group"><!$><!/><!$><!/>`), _tmpl$32 = /* @__PURE__ */ template(`<img class="max-w-full max-h-[400px] object-contain rounded shadow-sm hover:opacity-90 transition-opacity"loading=lazy>`, true, false, false), _tmpl$33 = /* @__PURE__ */ template(`<div class="w-full h-full bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700 overflow-hidden flex flex-col"><div class="flex-1 flex items-center justify-center p-4 bg-gray-50 dark:bg-gray-900 min-h-[200px]"></div><div class="p-3 border-t border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800"><p class="text-sm text-gray-600 dark:text-gray-400 text-center italic">`), _tmpl$34 = /* @__PURE__ */ template(`<a target=_blank rel="noopener noreferrer"class=cursor-zoom-in>`), _tmpl$35 = /* @__PURE__ */ template(`<div class="px-4 py-2 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900"><h3 class="text-sm font-semibold text-gray-900 dark:text-white">`), _tmpl$36 = /* @__PURE__ */ template(`<div class="w-full h-full bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700 overflow-hidden flex flex-col"><!$><!/><iframe class="w-full border-0 flex-1"loading=lazy>`, true, false, false), _tmpl$37 = /* @__PURE__ */ template(`<figcaption class="p-3 border-t border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800"><p class="text-sm text-gray-600 dark:text-gray-400 text-center">`), _tmpl$38 = /* @__PURE__ */ template(`<figure><div class="flex-1 flex items-center justify-center p-4 bg-gray-50 dark:bg-gray-900 min-h-[200px]"><a target=_blank rel="noopener noreferrer"class="cursor-zoom-in focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 rounded"><img class="max-w-full max-h-[500px] object-contain rounded shadow-sm hover:opacity-95 transition-opacity"loading=lazy></a></div><!$><!/>`, true, false, false), _tmpl$39 = /* @__PURE__ */ template(`<p class="text-xs text-gray-500 dark:text-gray-400 truncate">`), _tmpl$40 = /* @__PURE__ */ template(`<a target=_blank rel="noopener noreferrer"><div class="p-2 bg-blue-50 dark:bg-blue-900/30 rounded-full text-blue-600 dark:text-blue-400 group-hover:bg-blue-100 dark:group-hover:bg-blue-900/50 shrink-0 transition-colors"aria-hidden=true><svg xmlns=http://www.w3.org/2000/svg class="w-5 h-5"viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg></div><div class="flex-1 min-w-0"><h4 class="text-sm font-medium text-gray-900 dark:text-white truncate group-hover:text-blue-600 dark:group-hover:text-blue-400 transition-colors"></h4><!$><!/></div><svg xmlns=http://www.w3.org/2000/svg class="w-4 h-4 text-gray-400 group-hover:text-gray-600 dark:group-hover:text-gray-300 shrink-0 transition-colors"viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round aria-hidden=true><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1=10 y1=14 x2=21 y2=3>`), _tmpl$41 = /* @__PURE__ */ template(`<div class="inline-flex items-center gap-1.5 px-2 py-1 rounded-md bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 text-xs text-yellow-800 dark:text-yellow-200"role=alert><svg xmlns=http://www.w3.org/2000/svg class="w-3.5 h-3.5"viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round aria-hidden=true><path d="M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path><line x1=12 y1=9 x2=12 y2=13></line><line x1=12 y1=17 x2=12.01 y2=17></line></svg><span>`), _tmpl$42 = /* @__PURE__ */ template(`<div class="w-full h-full bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg p-4"><p class="text-sm font-medium text-red-900 dark:text-red-100"></p><p class="text-xs text-red-700 dark:text-red-300 mt-1">`), _tmpl$43 = /* @__PURE__ */ template(`<div role=alert class="w-full rounded-lg border border-amber-300 bg-amber-50 px-3 py-2 text-sm text-amber-800 dark:border-amber-700/50 dark:bg-amber-900/20 dark:text-amber-200"><!$><!/> <code class=font-mono>`), _tmpl$44 = /* @__PURE__ */ template(`<span aria-hidden=true>`), _tmpl$45 = /* @__PURE__ */ template(`<a rel="noopener noreferrer"><!$><!/><!$><!/>`), _tmpl$46 = /* @__PURE__ */ template(`<span class="animate-spin h-4 w-4 border-2 border-current border-t-transparent rounded-full"aria-hidden=true>`), _tmpl$47 = /* @__PURE__ */ template(`<button type=button><!$><!/><!$><!/><!$><!/>`), _tmpl$48 = /* @__PURE__ */ template(`<p class="text-xs text-red-600 dark:text-red-400 mt-1">`), _tmpl$49 = /* @__PURE__ */ template(`<div class=mt-3><p class="text-xs font-medium text-red-700 dark:text-red-300"></p><ul class="mt-1 text-xs text-red-600 dark:text-red-400 list-disc list-inside">`), _tmpl$50 = /* @__PURE__ */ template(`<p class="text-xs text-red-500 dark:text-red-500 mt-2">`), _tmpl$51 = /* @__PURE__ */ template(`<div class="relative w-full bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg p-4 group"><!$><!/><div class="flex items-start gap-3"><div class="p-2 bg-red-100 dark:bg-red-900/40 rounded-full shrink-0"><svg class="w-5 h-5 text-red-600 dark:text-red-400"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"></path></svg></div><div class="flex-1 min-w-0"><h4 class="text-sm font-semibold text-red-800 dark:text-red-200"></h4><p class="text-sm text-red-700 dark:text-red-300 mt-1"></p><!$><!/><!$><!/><!$><!/>`), _tmpl$52 = /* @__PURE__ */ template(`<li>`), _tmpl$53 = /* @__PURE__ */ template(`<div class="px-4 py-2 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900"><h3 class="text-sm font-semibold text-gray-900 dark:text-white capitalize">`), _tmpl$54 = /* @__PURE__ */ template(`<div class="w-full bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700 overflow-hidden"><!$><!/><!$><!/>`), _tmpl$55 = /* @__PURE__ */ template(`<div><div class="grid gap-4"data-mcp-ui-grid></div><!$><!/>`), _tmpl$56 = /* @__PURE__ */ template(`<div class=min-w-0>`);
40
+ var _tmpl$ = /* @__PURE__ */ template(`<svg class="w-3 h-3 text-gray-500 dark:text-gray-400"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z">`), _tmpl$2 = /* @__PURE__ */ template(`<button data-mcp-ui-action=copy type=button>`), _tmpl$3 = /* @__PURE__ */ template(`<svg class="w-3 h-3 text-green-500"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M5 13l4 4L19 7">`), _tmpl$4 = /* @__PURE__ */ template(`<div class="p-4 bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700"><p class="text-red-500 dark:text-red-400 text-sm">`), _tmpl$5 = /* @__PURE__ */ template(`<div class=p-3>`), _tmpl$6 = /* @__PURE__ */ template(`<div class="absolute inset-0 flex items-center justify-center"><div class="animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600">`), _tmpl$7 = /* @__PURE__ */ template(`<div class="absolute inset-0 flex items-center justify-center p-4"><div class=text-center><p class="text-red-600 dark:text-red-400 text-sm font-medium"></p><p class="text-gray-600 dark:text-gray-400 text-xs mt-1">`), _tmpl$8 = /* @__PURE__ */ template(`<h3 class="text-sm font-semibold text-gray-900 dark:text-white mb-3">`), _tmpl$9 = /* @__PURE__ */ template(`<div class="w-full h-full p-4"><!$><!/><div class="w-full h-full"role=img><img class="w-full h-auto max-h-[300px] object-contain">`), _tmpl$0 = /* @__PURE__ */ template(`<div class="relative w-full h-full min-h-[300px] bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700 overflow-hidden"><!$><!/><!$><!/><!$><!/><!$><!/>`), _tmpl$1 = /* @__PURE__ */ template(`<tbody class="bg-white dark:bg-gray-800 divide-y divide-gray-200 dark:divide-gray-700">`), _tmpl$10 = /* @__PURE__ */ template(`<tr>`), _tmpl$11 = /* @__PURE__ */ template(`<td class="px-6 py-4 text-sm text-gray-700 dark:text-gray-200 whitespace-normal break-words leading-relaxed first:pl-6 last:pr-6">`), _tmpl$12 = /* @__PURE__ */ template(`<tbody class="bg-white dark:bg-gray-800 relative">`), _tmpl$13 = /* @__PURE__ */ template(`<button class="w-full text-left px-3 py-1.5 hover:bg-gray-100 dark:hover:bg-gray-700 text-gray-700 dark:text-gray-300">`), _tmpl$14 = /* @__PURE__ */ template(`<div class="absolute right-10 top-2 z-10"><button class="opacity-60 hover:opacity-100 px-2 py-1 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-600 rounded-full hover:bg-gray-100 dark:hover:bg-gray-700 transition-all shadow-sm"aria-haspopup=menu><svg class="w-3 h-3 text-gray-500 dark:text-gray-400"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M12 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path></svg></button><!$><!/>`), _tmpl$15 = /* @__PURE__ */ template(`<span class="ml-2 text-xs font-normal text-gray-400">`), _tmpl$16 = /* @__PURE__ */ template(`<h3 class="text-sm font-semibold text-gray-900 dark:text-white mb-3 flex-shrink-0"><!$><!/><!$><!/>`), _tmpl$17 = /* @__PURE__ */ template(`<button type=button class="absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 text-sm">&times;`), _tmpl$18 = /* @__PURE__ */ template(`<div class="relative mb-3"><span class="absolute left-3 top-1/2 -translate-y-1/2 text-gray-400 pointer-events-none text-sm">🔍</span><input type=text class="w-full max-w-xs min-w-[200px] pl-8 pr-8 py-1.5 text-sm border border-gray-200 dark:border-gray-600 rounded-md bg-white dark:bg-gray-700 text-gray-900 dark:text-white placeholder-gray-400 focus:border-blue-400 focus:ring-1 focus:ring-blue-400 outline-none"><!$><!/>`), _tmpl$19 = /* @__PURE__ */ template(`<p class="text-xs text-gray-500 dark:text-gray-400 mb-2">`), _tmpl$20 = /* @__PURE__ */ template(`<div class="mt-3 flex items-center justify-between text-xs text-gray-500 dark:text-gray-400"><span>`), _tmpl$21 = /* @__PURE__ */ template(`<select class="ml-2 px-1 py-0.5 text-xs border border-gray-200 dark:border-gray-600 rounded bg-white dark:bg-gray-700 text-gray-700 dark:text-gray-300"data-mcp-ui-action=page-size>`), _tmpl$22 = /* @__PURE__ */ template(`<span class=text-gray-400>`), _tmpl$23 = /* @__PURE__ */ template(`<div class="mt-3 flex items-center justify-between text-xs text-gray-500 dark:text-gray-400"><span><!$><!/>&ndash;<!$><!/> / <!$><!/></span><div class="flex items-center gap-2"><button type=button class="px-2 py-1 rounded hover:bg-gray-100 dark:hover:bg-gray-700 disabled:opacity-40 disabled:cursor-not-allowed transition-colors"data-mcp-ui-action=page-prev><span aria-hidden=true>&#x25C0;</span></button><span aria-live=polite><!$><!/> / <!$><!/></span><button type=button class="px-2 py-1 rounded hover:bg-gray-100 dark:hover:bg-gray-700 disabled:opacity-40 disabled:cursor-not-allowed transition-colors"data-mcp-ui-action=page-next><span aria-hidden=true>&#x25B6;</span></button><!$><!/>`), _tmpl$24 = /* @__PURE__ */ template(`<div><!$><!/><div><!$><!/><!$><!/><div role=region tabindex=0><table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700 border-separate border-spacing-0"><thead class="bg-gray-100 dark:bg-gray-900 sticky top-0 z-10"><tr></tr></thead><!$><!/></table></div><!$><!/><!$><!/>`), _tmpl$25 = /* @__PURE__ */ template(`<th scope=col class="px-6 py-3 text-left text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wider border-b border-gray-200 dark:border-gray-700 first:pl-6 last:pr-6 bg-gray-100 dark:bg-gray-900 cursor-pointer select-none hover:bg-gray-200 dark:hover:bg-gray-800 transition-colors"><span class="inline-flex items-center gap-1"><!$><!/><span class="text-[10px] leading-none">`), _tmpl$26 = /* @__PURE__ */ template(`<option>`), _tmpl$27 = /* @__PURE__ */ template(`<span class="ml-2 text-sm font-medium text-gray-500 dark:text-gray-400">`), _tmpl$28 = /* @__PURE__ */ template(`<div class="mt-3 flex items-center"><span><!$><!/> <!$><!/>%`), _tmpl$29 = /* @__PURE__ */ template(`<p class="mt-2 text-xs text-gray-500 dark:text-gray-400">`), _tmpl$30 = /* @__PURE__ */ template(`<div class="relative w-full h-full bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700 p-4 group"><!$><!/><div class="flex flex-col h-full justify-between"><div><p class="text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wide"></p><div class="mt-2 flex items-baseline"><p class="text-2xl font-semibold text-gray-900 dark:text-white"></p><!$><!/></div></div><!$><!/><!$><!/>`), _tmpl$31 = /* @__PURE__ */ template(`<div class="relative w-full h-full bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700 p-4 group"><!$><!/><!$><!/>`), _tmpl$32 = /* @__PURE__ */ template(`<img class="max-w-full max-h-[400px] object-contain rounded shadow-sm hover:opacity-90 transition-opacity"loading=lazy>`, true, false, false), _tmpl$33 = /* @__PURE__ */ template(`<div class="w-full h-full bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700 overflow-hidden flex flex-col"><div class="flex-1 flex items-center justify-center p-4 bg-gray-50 dark:bg-gray-900 min-h-[200px]"></div><div class="p-3 border-t border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800"><p class="text-sm text-gray-600 dark:text-gray-400 text-center italic">`), _tmpl$34 = /* @__PURE__ */ template(`<a target=_blank rel="noopener noreferrer"class=cursor-zoom-in>`), _tmpl$35 = /* @__PURE__ */ template(`<div class="px-4 py-2 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900"><h3 class="text-sm font-semibold text-gray-900 dark:text-white">`), _tmpl$36 = /* @__PURE__ */ template(`<div class="w-full h-full bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700 overflow-hidden flex flex-col"><!$><!/><iframe class="w-full border-0 flex-1"loading=lazy></iframe><!$><!/>`, true, false, false), _tmpl$37 = /* @__PURE__ */ template(`<figcaption class="p-3 border-t border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800"><p class="text-sm text-gray-600 dark:text-gray-400 text-center">`), _tmpl$38 = /* @__PURE__ */ template(`<figure><div class="flex-1 flex items-center justify-center p-4 bg-gray-50 dark:bg-gray-900 min-h-[200px]"><a target=_blank rel="noopener noreferrer"class="cursor-zoom-in focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 rounded"><img class="max-w-full max-h-[500px] object-contain rounded shadow-sm hover:opacity-95 transition-opacity"loading=lazy></a></div><!$><!/>`, true, false, false), _tmpl$39 = /* @__PURE__ */ template(`<p class="text-xs text-gray-500 dark:text-gray-400 truncate">`), _tmpl$40 = /* @__PURE__ */ template(`<a target=_blank rel="noopener noreferrer"><div class="p-2 bg-blue-50 dark:bg-blue-900/30 rounded-full text-blue-600 dark:text-blue-400 group-hover:bg-blue-100 dark:group-hover:bg-blue-900/50 shrink-0 transition-colors"aria-hidden=true><svg xmlns=http://www.w3.org/2000/svg class="w-5 h-5"viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg></div><div class="flex-1 min-w-0"><h4 class="text-sm font-medium text-gray-900 dark:text-white truncate group-hover:text-blue-600 dark:group-hover:text-blue-400 transition-colors"></h4><!$><!/></div><svg xmlns=http://www.w3.org/2000/svg class="w-4 h-4 text-gray-400 group-hover:text-gray-600 dark:group-hover:text-gray-300 shrink-0 transition-colors"viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round aria-hidden=true><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1=10 y1=14 x2=21 y2=3>`), _tmpl$41 = /* @__PURE__ */ template(`<div class="inline-flex items-center gap-1.5 px-2 py-1 rounded-md bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 text-xs text-yellow-800 dark:text-yellow-200"role=alert><svg xmlns=http://www.w3.org/2000/svg class="w-3.5 h-3.5"viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round aria-hidden=true><path d="M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path><line x1=12 y1=9 x2=12 y2=13></line><line x1=12 y1=17 x2=12.01 y2=17></line></svg><span>`), _tmpl$42 = /* @__PURE__ */ template(`<div class="w-full h-full bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg p-4"><p class="text-sm font-medium text-red-900 dark:text-red-100"></p><p class="text-xs text-red-700 dark:text-red-300 mt-1">`), _tmpl$43 = /* @__PURE__ */ template(`<div role=alert class="w-full rounded-lg border border-amber-300 bg-amber-50 px-3 py-2 text-sm text-amber-800 dark:border-amber-700/50 dark:bg-amber-900/20 dark:text-amber-200"><!$><!/> <code class=font-mono>`), _tmpl$44 = /* @__PURE__ */ template(`<span aria-hidden=true>`), _tmpl$45 = /* @__PURE__ */ template(`<a rel="noopener noreferrer"><!$><!/><!$><!/>`), _tmpl$46 = /* @__PURE__ */ template(`<span class="animate-spin h-4 w-4 border-2 border-current border-t-transparent rounded-full"aria-hidden=true>`), _tmpl$47 = /* @__PURE__ */ template(`<button type=button><!$><!/><!$><!/><!$><!/>`), _tmpl$48 = /* @__PURE__ */ template(`<p class="text-xs text-red-600 dark:text-red-400 mt-1">`), _tmpl$49 = /* @__PURE__ */ template(`<div class=mt-3><p class="text-xs font-medium text-red-700 dark:text-red-300"></p><ul class="mt-1 text-xs text-red-600 dark:text-red-400 list-disc list-inside">`), _tmpl$50 = /* @__PURE__ */ template(`<p class="text-xs text-red-500 dark:text-red-500 mt-2">`), _tmpl$51 = /* @__PURE__ */ template(`<div class="relative w-full bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg p-4 group"><!$><!/><div class="flex items-start gap-3"><div class="p-2 bg-red-100 dark:bg-red-900/40 rounded-full shrink-0"><svg class="w-5 h-5 text-red-600 dark:text-red-400"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"></path></svg></div><div class="flex-1 min-w-0"><h4 class="text-sm font-semibold text-red-800 dark:text-red-200"></h4><p class="text-sm text-red-700 dark:text-red-300 mt-1"></p><!$><!/><!$><!/><!$><!/>`), _tmpl$52 = /* @__PURE__ */ template(`<li>`), _tmpl$53 = /* @__PURE__ */ template(`<div class="px-4 py-2 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900"><h3 class="text-sm font-semibold text-gray-900 dark:text-white capitalize">`), _tmpl$54 = /* @__PURE__ */ template(`<div class="w-full bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700 overflow-hidden"><!$><!/><!$><!/>`), _tmpl$55 = /* @__PURE__ */ template(`<div><div class="grid gap-4"data-mcp-ui-grid></div><!$><!/>`), _tmpl$56 = /* @__PURE__ */ template(`<div class=min-w-0>`);
38
41
  function CopyButton(props) {
39
42
  const strings = useMCPUIStrings();
40
43
  const [copied, setCopied] = createSignal(false);
@@ -1211,9 +1214,13 @@ function TextRenderer(props) {
1211
1214
  }
1212
1215
  function IframeRenderer(props) {
1213
1216
  const strings = useMCPUIStrings();
1217
+ const config = useMCPUIConfig();
1214
1218
  const params = props.component.params;
1219
+ const trustOptions = () => ({
1220
+ customTrustedDomains: config.customTrustedIframeDomains
1221
+ });
1215
1222
  return (() => {
1216
- var _el$135 = getNextElement(_tmpl$36), _el$139 = _el$135.firstChild, [_el$140, _co$29] = getNextMarker(_el$139.nextSibling), _el$138 = _el$140.nextSibling;
1223
+ var _el$135 = getNextElement(_tmpl$36), _el$139 = _el$135.firstChild, [_el$140, _co$29] = getNextMarker(_el$139.nextSibling), _el$138 = _el$140.nextSibling, _el$141 = _el$138.nextSibling, [_el$142, _co$30] = getNextMarker(_el$141.nextSibling);
1217
1224
  insert(_el$135, createComponent(Show, {
1218
1225
  get when() {
1219
1226
  return params.title;
@@ -1224,18 +1231,30 @@ function IframeRenderer(props) {
1224
1231
  return _el$136;
1225
1232
  }
1226
1233
  }), _el$140, _co$29);
1234
+ insert(_el$135, createComponent(IframeFallbackLink, {
1235
+ get url() {
1236
+ return params.url;
1237
+ },
1238
+ "class": "border-t border-gray-200 dark:border-gray-700"
1239
+ }), _el$142, _co$30);
1227
1240
  effect((_p$) => {
1228
- var _v$25 = params.url, _v$26 = params.title || strings.iframeTitle, _v$27 = `height: ${params.height || "400px"}; min-height: 300px;`, _v$28 = getIframeSandbox(params.url);
1241
+ var _v$25 = params.url, _v$26 = params.title || strings.iframeTitle, _v$27 = `height: ${params.height || "400px"}; min-height: 300px;`, _v$28 = getIframeSandbox(params.url, trustOptions()), _v$29 = shouldSetCredentialless(params.url, config, {
1242
+ // This iframe's sandbox never carries `allow-same-origin` for an
1243
+ // untrusted host, so it already runs without cookies.
1244
+ sandboxedWithoutSameOrigin: !isTrustedIframeDomain(params.url, trustOptions())
1245
+ }) || void 0;
1229
1246
  _v$25 !== _p$.e && setAttribute(_el$138, "src", _p$.e = _v$25);
1230
1247
  _v$26 !== _p$.t && setAttribute(_el$138, "title", _p$.t = _v$26);
1231
1248
  _p$.a = style(_el$138, _v$27, _p$.a);
1232
1249
  _v$28 !== _p$.o && setAttribute(_el$138, "sandbox", _p$.o = _v$28);
1250
+ _v$29 !== _p$.i && setAttribute(_el$138, "credentialless", _p$.i = _v$29);
1233
1251
  return _p$;
1234
1252
  }, {
1235
1253
  e: void 0,
1236
1254
  t: void 0,
1237
1255
  a: void 0,
1238
- o: void 0
1256
+ o: void 0,
1257
+ i: void 0
1239
1258
  });
1240
1259
  return _el$135;
1241
1260
  })();
@@ -1244,28 +1263,28 @@ function ImageRenderer(props) {
1244
1263
  const strings = useMCPUIStrings();
1245
1264
  const params = props.component.params;
1246
1265
  return (() => {
1247
- var _el$141 = getNextElement(_tmpl$38), _el$142 = _el$141.firstChild, _el$143 = _el$142.firstChild, _el$144 = _el$143.firstChild, _el$147 = _el$142.nextSibling, [_el$148, _co$30] = getNextMarker(_el$147.nextSibling);
1248
- insert(_el$141, createComponent(Show, {
1266
+ var _el$143 = getNextElement(_tmpl$38), _el$144 = _el$143.firstChild, _el$145 = _el$144.firstChild, _el$146 = _el$145.firstChild, _el$149 = _el$144.nextSibling, [_el$150, _co$31] = getNextMarker(_el$149.nextSibling);
1267
+ insert(_el$143, createComponent(Show, {
1249
1268
  get when() {
1250
1269
  return params.caption;
1251
1270
  },
1252
1271
  get children() {
1253
- var _el$145 = getNextElement(_tmpl$37), _el$146 = _el$145.firstChild;
1254
- insert(_el$146, () => params.caption);
1255
- return _el$145;
1272
+ var _el$147 = getNextElement(_tmpl$37), _el$148 = _el$147.firstChild;
1273
+ insert(_el$148, () => params.caption);
1274
+ return _el$147;
1256
1275
  }
1257
- }), _el$148, _co$30);
1276
+ }), _el$150, _co$31);
1258
1277
  effect((_p$) => {
1259
- var _v$29 = `w-full h-full bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700 overflow-hidden flex flex-col ${params.className || ""}`, _v$30 = safeUrl(params.url), _v$31 = formatMCPUIString(strings.imageViewFullSize, {
1278
+ var _v$30 = `w-full h-full bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700 overflow-hidden flex flex-col ${params.className || ""}`, _v$31 = safeUrl(params.url), _v$32 = formatMCPUIString(strings.imageViewFullSize, {
1260
1279
  alt: params.alt || strings.imageAltFallback
1261
- }), _v$32 = safeUrl(params.url, {
1280
+ }), _v$33 = safeUrl(params.url, {
1262
1281
  allowDataImage: true
1263
- }), _v$33 = params.alt || strings.imageAlt;
1264
- _v$29 !== _p$.e && className(_el$141, _p$.e = _v$29);
1265
- _v$30 !== _p$.t && setAttribute(_el$143, "href", _p$.t = _v$30);
1266
- _v$31 !== _p$.a && setAttribute(_el$143, "aria-label", _p$.a = _v$31);
1267
- _v$32 !== _p$.o && setAttribute(_el$144, "src", _p$.o = _v$32);
1268
- _v$33 !== _p$.i && setAttribute(_el$144, "alt", _p$.i = _v$33);
1282
+ }), _v$34 = params.alt || strings.imageAlt;
1283
+ _v$30 !== _p$.e && className(_el$143, _p$.e = _v$30);
1284
+ _v$31 !== _p$.t && setAttribute(_el$145, "href", _p$.t = _v$31);
1285
+ _v$32 !== _p$.a && setAttribute(_el$145, "aria-label", _p$.a = _v$32);
1286
+ _v$33 !== _p$.o && setAttribute(_el$146, "src", _p$.o = _v$33);
1287
+ _v$34 !== _p$.i && setAttribute(_el$146, "alt", _p$.i = _v$34);
1269
1288
  return _p$;
1270
1289
  }, {
1271
1290
  e: void 0,
@@ -1274,34 +1293,34 @@ function ImageRenderer(props) {
1274
1293
  o: void 0,
1275
1294
  i: void 0
1276
1295
  });
1277
- return _el$141;
1296
+ return _el$143;
1278
1297
  })();
1279
1298
  }
1280
1299
  function LinkRenderer(props) {
1281
1300
  const strings = useMCPUIStrings();
1282
1301
  const params = props.component.params;
1283
1302
  return (() => {
1284
- var _el$149 = getNextElement(_tmpl$40), _el$150 = _el$149.firstChild, _el$151 = _el$150.nextSibling, _el$152 = _el$151.firstChild, _el$154 = _el$152.nextSibling, [_el$155, _co$31] = getNextMarker(_el$154.nextSibling);
1285
- _el$149.$$click = (e) => e.stopPropagation();
1286
- insert(_el$152, () => params.label || params.url);
1287
- insert(_el$151, createComponent(Show, {
1303
+ var _el$151 = getNextElement(_tmpl$40), _el$152 = _el$151.firstChild, _el$153 = _el$152.nextSibling, _el$154 = _el$153.firstChild, _el$156 = _el$154.nextSibling, [_el$157, _co$32] = getNextMarker(_el$156.nextSibling);
1304
+ _el$151.$$click = (e) => e.stopPropagation();
1305
+ insert(_el$154, () => params.label || params.url);
1306
+ insert(_el$153, createComponent(Show, {
1288
1307
  get when() {
1289
1308
  return params.description;
1290
1309
  },
1291
1310
  get children() {
1292
- var _el$153 = getNextElement(_tmpl$39);
1293
- insert(_el$153, () => params.description);
1294
- return _el$153;
1311
+ var _el$155 = getNextElement(_tmpl$39);
1312
+ insert(_el$155, () => params.description);
1313
+ return _el$155;
1295
1314
  }
1296
- }), _el$155, _co$31);
1315
+ }), _el$157, _co$32);
1297
1316
  effect((_p$) => {
1298
- var _v$34 = safeUrl(params.url), _v$35 = formatMCPUIString(strings.linkOpensInNewTab, {
1317
+ var _v$35 = safeUrl(params.url), _v$36 = formatMCPUIString(strings.linkOpensInNewTab, {
1299
1318
  label: params.label || strings.linkLabel,
1300
1319
  description: params.description || params.url
1301
- }), _v$36 = `flex items-center gap-3 p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors group h-full focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 ${params.className || ""}`;
1302
- _v$34 !== _p$.e && setAttribute(_el$149, "href", _p$.e = _v$34);
1303
- _v$35 !== _p$.t && setAttribute(_el$149, "aria-label", _p$.t = _v$35);
1304
- _v$36 !== _p$.a && className(_el$149, _p$.a = _v$36);
1320
+ }), _v$37 = `flex items-center gap-3 p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors group h-full focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 ${params.className || ""}`;
1321
+ _v$35 !== _p$.e && setAttribute(_el$151, "href", _p$.e = _v$35);
1322
+ _v$36 !== _p$.t && setAttribute(_el$151, "aria-label", _p$.t = _v$36);
1323
+ _v$37 !== _p$.a && className(_el$151, _p$.a = _v$37);
1305
1324
  return _p$;
1306
1325
  }, {
1307
1326
  e: void 0,
@@ -1309,7 +1328,7 @@ function LinkRenderer(props) {
1309
1328
  a: void 0
1310
1329
  });
1311
1330
  runHydrationEvents();
1312
- return _el$149;
1331
+ return _el$151;
1313
1332
  })();
1314
1333
  }
1315
1334
  function ComponentRenderer(props) {
@@ -1317,6 +1336,7 @@ function ComponentRenderer(props) {
1317
1336
  markRenderStart(props.component.id);
1318
1337
  const telemetry = useTelemetry();
1319
1338
  const strings = useMCPUIStrings();
1339
+ const componentConfig = useMCPUIConfig();
1320
1340
  onMount(() => {
1321
1341
  markRenderEnd(props.component.id);
1322
1342
  if (telemetry) {
@@ -1352,7 +1372,10 @@ function ComponentRenderer(props) {
1352
1372
  });
1353
1373
  }
1354
1374
  });
1355
- const validation = validateComponent(props.component);
1375
+ const validation = validateComponent(props.component, {
1376
+ iframePolicy: componentConfig.iframePolicy,
1377
+ customIframeDomains: componentConfig.customIframeDomains
1378
+ });
1356
1379
  if (!validation.valid) {
1357
1380
  (_a = props.onError) == null ? void 0 : _a.call(props, {
1358
1381
  type: "validation",
@@ -1384,20 +1407,20 @@ function ComponentRenderer(props) {
1384
1407
  }
1385
1408
  if (mode === "inline-warn") {
1386
1409
  return (() => {
1387
- var _el$156 = getNextElement(_tmpl$41), _el$157 = _el$156.firstChild, _el$158 = _el$157.nextSibling;
1388
- setAttribute(_el$156, "title", firstError);
1389
- insert(_el$158, () => formatMCPUIString(strings.invalidComponent, {
1410
+ var _el$158 = getNextElement(_tmpl$41), _el$159 = _el$158.firstChild, _el$160 = _el$159.nextSibling;
1411
+ setAttribute(_el$158, "title", firstError);
1412
+ insert(_el$160, () => formatMCPUIString(strings.invalidComponent, {
1390
1413
  type: props.component.type
1391
1414
  }));
1392
- effect(() => setAttribute(_el$156, "aria-label", strings.validationWarning));
1393
- return _el$156;
1415
+ effect(() => setAttribute(_el$158, "aria-label", strings.validationWarning));
1416
+ return _el$158;
1394
1417
  })();
1395
1418
  }
1396
1419
  return (() => {
1397
- var _el$159 = getNextElement(_tmpl$42), _el$160 = _el$159.firstChild, _el$161 = _el$160.nextSibling;
1398
- insert(_el$160, () => strings.validationError);
1399
- insert(_el$161, firstError);
1400
- return _el$159;
1420
+ var _el$161 = getNextElement(_tmpl$42), _el$162 = _el$161.firstChild, _el$163 = _el$162.nextSibling;
1421
+ insert(_el$162, () => strings.validationError);
1422
+ insert(_el$163, firstError);
1423
+ return _el$161;
1401
1424
  })();
1402
1425
  }
1403
1426
  return createComponent(GenerativeUIErrorBoundary, {
@@ -1691,10 +1714,10 @@ function ComponentRenderer(props) {
1691
1714
  function UnsupportedComponentFallback(props) {
1692
1715
  const strings = useMCPUIStrings();
1693
1716
  return (() => {
1694
- var _el$162 = getNextElement(_tmpl$43), _el$165 = _el$162.firstChild, [_el$166, _co$32] = getNextMarker(_el$165.nextSibling), _el$163 = _el$166.nextSibling, _el$164 = _el$163.nextSibling;
1695
- insert(_el$162, () => strings.unsupportedComponentType, _el$166, _co$32);
1696
- insert(_el$164, () => props.component.type);
1697
- return _el$162;
1717
+ var _el$164 = getNextElement(_tmpl$43), _el$167 = _el$164.firstChild, [_el$168, _co$33] = getNextMarker(_el$167.nextSibling), _el$165 = _el$168.nextSibling, _el$166 = _el$165.nextSibling;
1718
+ insert(_el$164, () => strings.unsupportedComponentType, _el$168, _co$33);
1719
+ insert(_el$166, () => props.component.type);
1720
+ return _el$164;
1698
1721
  })();
1699
1722
  }
1700
1723
  function ActionRenderer(props) {
@@ -1734,27 +1757,27 @@ function ActionRenderer(props) {
1734
1757
  const isDisabled = () => params.disabled || isExecutable() && isExecuting();
1735
1758
  if (params.type === "link" || params.action === "link") {
1736
1759
  return (() => {
1737
- var _el$167 = getNextElement(_tmpl$45), _el$169 = _el$167.firstChild, [_el$170, _co$33] = getNextMarker(_el$169.nextSibling), _el$171 = _el$170.nextSibling, [_el$172, _co$34] = getNextMarker(_el$171.nextSibling);
1738
- _el$167.$$click = handleClick;
1739
- insert(_el$167, createComponent(Show, {
1760
+ var _el$169 = getNextElement(_tmpl$45), _el$171 = _el$169.firstChild, [_el$172, _co$34] = getNextMarker(_el$171.nextSibling), _el$173 = _el$172.nextSibling, [_el$174, _co$35] = getNextMarker(_el$173.nextSibling);
1761
+ _el$169.$$click = handleClick;
1762
+ insert(_el$169, createComponent(Show, {
1740
1763
  get when() {
1741
1764
  return params.icon;
1742
1765
  },
1743
1766
  get children() {
1744
- var _el$168 = getNextElement(_tmpl$44);
1745
- insert(_el$168, () => params.icon);
1746
- return _el$168;
1767
+ var _el$170 = getNextElement(_tmpl$44);
1768
+ insert(_el$170, () => params.icon);
1769
+ return _el$170;
1747
1770
  }
1748
- }), _el$170, _co$33);
1749
- insert(_el$167, () => params.label, _el$172, _co$34);
1771
+ }), _el$172, _co$34);
1772
+ insert(_el$169, () => params.label, _el$174, _co$35);
1750
1773
  effect((_p$) => {
1751
- var _v$37 = safeUrl(params.url) ?? "#", _v$38 = safeUrl(params.url) ? "_blank" : void 0, _v$39 = params.ariaLabel || params.label, _v$40 = `inline-flex items-center gap-2 px-4 py-2 rounded-md text-sm font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500
1774
+ var _v$38 = safeUrl(params.url) ?? "#", _v$39 = safeUrl(params.url) ? "_blank" : void 0, _v$40 = params.ariaLabel || params.label, _v$41 = `inline-flex items-center gap-2 px-4 py-2 rounded-md text-sm font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500
1752
1775
  ${params.variant === "primary" ? "bg-blue-600 text-white hover:bg-blue-700" : params.variant === "outline" ? "border border-gray-300 text-gray-700 hover:bg-gray-50 dark:border-gray-600 dark:text-gray-300 dark:hover:bg-gray-800" : "text-blue-600 hover:text-blue-800 dark:text-blue-400 dark:hover:text-blue-300"}
1753
1776
  ${params.className || ""}`;
1754
- _v$37 !== _p$.e && setAttribute(_el$167, "href", _p$.e = _v$37);
1755
- _v$38 !== _p$.t && setAttribute(_el$167, "target", _p$.t = _v$38);
1756
- _v$39 !== _p$.a && setAttribute(_el$167, "aria-label", _p$.a = _v$39);
1757
- _v$40 !== _p$.o && className(_el$167, _p$.o = _v$40);
1777
+ _v$38 !== _p$.e && setAttribute(_el$169, "href", _p$.e = _v$38);
1778
+ _v$39 !== _p$.t && setAttribute(_el$169, "target", _p$.t = _v$39);
1779
+ _v$40 !== _p$.a && setAttribute(_el$169, "aria-label", _p$.a = _v$40);
1780
+ _v$41 !== _p$.o && className(_el$169, _p$.o = _v$41);
1758
1781
  return _p$;
1759
1782
  }, {
1760
1783
  e: void 0,
@@ -1763,41 +1786,41 @@ function ActionRenderer(props) {
1763
1786
  o: void 0
1764
1787
  });
1765
1788
  runHydrationEvents();
1766
- return _el$167;
1789
+ return _el$169;
1767
1790
  })();
1768
1791
  }
1769
1792
  return (() => {
1770
- var _el$173 = getNextElement(_tmpl$47), _el$176 = _el$173.firstChild, [_el$177, _co$35] = getNextMarker(_el$176.nextSibling), _el$178 = _el$177.nextSibling, [_el$179, _co$36] = getNextMarker(_el$178.nextSibling), _el$180 = _el$179.nextSibling, [_el$181, _co$37] = getNextMarker(_el$180.nextSibling);
1771
- _el$173.$$click = handleClick;
1772
- insert(_el$173, createComponent(Show, {
1793
+ var _el$175 = getNextElement(_tmpl$47), _el$178 = _el$175.firstChild, [_el$179, _co$36] = getNextMarker(_el$178.nextSibling), _el$180 = _el$179.nextSibling, [_el$181, _co$37] = getNextMarker(_el$180.nextSibling), _el$182 = _el$181.nextSibling, [_el$183, _co$38] = getNextMarker(_el$182.nextSibling);
1794
+ _el$175.$$click = handleClick;
1795
+ insert(_el$175, createComponent(Show, {
1773
1796
  get when() {
1774
1797
  return memo(() => !!isExecuting())() && isExecutable();
1775
1798
  },
1776
1799
  get children() {
1777
1800
  return getNextElement(_tmpl$46);
1778
1801
  }
1779
- }), _el$177, _co$35);
1780
- insert(_el$173, createComponent(Show, {
1802
+ }), _el$179, _co$36);
1803
+ insert(_el$175, createComponent(Show, {
1781
1804
  get when() {
1782
1805
  return memo(() => !!params.icon)() && !(isExecuting() && isExecutable());
1783
1806
  },
1784
1807
  get children() {
1785
- var _el$175 = getNextElement(_tmpl$44);
1786
- insert(_el$175, () => params.icon);
1787
- return _el$175;
1808
+ var _el$177 = getNextElement(_tmpl$44);
1809
+ insert(_el$177, () => params.icon);
1810
+ return _el$177;
1788
1811
  }
1789
- }), _el$179, _co$36);
1790
- insert(_el$173, () => params.label, _el$181, _co$37);
1812
+ }), _el$181, _co$37);
1813
+ insert(_el$175, () => params.label, _el$183, _co$38);
1791
1814
  effect((_p$) => {
1792
- var _v$41 = isDisabled(), _v$42 = isExecuting() && isExecutable(), _v$43 = params.ariaLabel || params.label, _v$44 = `inline-flex items-center gap-2 px-4 py-2 rounded-md text-sm font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500
1815
+ var _v$42 = isDisabled(), _v$43 = isExecuting() && isExecutable(), _v$44 = params.ariaLabel || params.label, _v$45 = `inline-flex items-center gap-2 px-4 py-2 rounded-md text-sm font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500
1793
1816
  ${params.variant === "primary" ? "bg-blue-600 text-white hover:bg-blue-700 shadow-sm" : params.variant === "secondary" ? "bg-gray-100 text-gray-900 hover:bg-gray-200 dark:bg-gray-700 dark:text-white dark:hover:bg-gray-600" : params.variant === "outline" ? "border border-gray-300 text-gray-700 hover:bg-gray-50 dark:border-gray-600 dark:text-gray-300 dark:hover:bg-gray-800" : params.variant === "danger" ? "bg-red-600 text-white hover:bg-red-700" : "bg-transparent text-gray-700 hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-gray-800"}
1794
1817
  ${isDisabled() ? "opacity-50 cursor-not-allowed" : ""}
1795
1818
  ${params.size === "sm" ? "px-3 py-1.5 text-xs" : params.size === "lg" ? "px-6 py-3 text-base" : ""}
1796
1819
  ${params.className || ""}`;
1797
- _v$41 !== _p$.e && setProperty(_el$173, "disabled", _p$.e = _v$41);
1798
- _v$42 !== _p$.t && setAttribute(_el$173, "aria-busy", _p$.t = _v$42);
1799
- _v$43 !== _p$.a && setAttribute(_el$173, "aria-label", _p$.a = _v$43);
1800
- _v$44 !== _p$.o && className(_el$173, _p$.o = _v$44);
1820
+ _v$42 !== _p$.e && setProperty(_el$175, "disabled", _p$.e = _v$42);
1821
+ _v$43 !== _p$.t && setAttribute(_el$175, "aria-busy", _p$.t = _v$43);
1822
+ _v$44 !== _p$.a && setAttribute(_el$175, "aria-label", _p$.a = _v$44);
1823
+ _v$45 !== _p$.o && className(_el$175, _p$.o = _v$45);
1801
1824
  return _p$;
1802
1825
  }, {
1803
1826
  e: void 0,
@@ -1806,7 +1829,7 @@ function ActionRenderer(props) {
1806
1829
  o: void 0
1807
1830
  });
1808
1831
  runHydrationEvents();
1809
- return _el$173;
1832
+ return _el$175;
1810
1833
  })();
1811
1834
  }
1812
1835
  function ErrorCardRenderer(props) {
@@ -1820,62 +1843,62 @@ function ErrorCardRenderer(props) {
1820
1843
  });
1821
1844
  };
1822
1845
  return (() => {
1823
- var _el$182 = getNextElement(_tmpl$51), _el$199 = _el$182.firstChild, [_el$200, _co$41] = getNextMarker(_el$199.nextSibling), _el$183 = _el$200.nextSibling, _el$184 = _el$183.firstChild, _el$185 = _el$184.nextSibling, _el$186 = _el$185.firstChild, _el$187 = _el$186.nextSibling, _el$193 = _el$187.nextSibling, [_el$194, _co$38] = getNextMarker(_el$193.nextSibling), _el$195 = _el$194.nextSibling, [_el$196, _co$39] = getNextMarker(_el$195.nextSibling), _el$197 = _el$196.nextSibling, [_el$198, _co$40] = getNextMarker(_el$197.nextSibling);
1824
- insert(_el$182, createComponent(CopyButton, {
1846
+ var _el$184 = getNextElement(_tmpl$51), _el$201 = _el$184.firstChild, [_el$202, _co$42] = getNextMarker(_el$201.nextSibling), _el$185 = _el$202.nextSibling, _el$186 = _el$185.firstChild, _el$187 = _el$186.nextSibling, _el$188 = _el$187.firstChild, _el$189 = _el$188.nextSibling, _el$195 = _el$189.nextSibling, [_el$196, _co$39] = getNextMarker(_el$195.nextSibling), _el$197 = _el$196.nextSibling, [_el$198, _co$40] = getNextMarker(_el$197.nextSibling), _el$199 = _el$198.nextSibling, [_el$200, _co$41] = getNextMarker(_el$199.nextSibling);
1847
+ insert(_el$184, createComponent(CopyButton, {
1825
1848
  getText: getErrorText,
1826
1849
  get title() {
1827
1850
  return strings.copyErrorDetails;
1828
1851
  },
1829
1852
  position: "top-right"
1830
- }), _el$200, _co$41);
1831
- insert(_el$186, () => formatMCPUIString(strings.toolErrorTitle, {
1853
+ }), _el$202, _co$42);
1854
+ insert(_el$188, () => formatMCPUIString(strings.toolErrorTitle, {
1832
1855
  tool: props.error.tool || strings.errorUnknownToolName
1833
1856
  }));
1834
- insert(_el$187, () => props.error.message || strings.errorToolExecution);
1835
- insert(_el$185, createComponent(Show, {
1857
+ insert(_el$189, () => props.error.message || strings.errorToolExecution);
1858
+ insert(_el$187, createComponent(Show, {
1836
1859
  get when() {
1837
1860
  return props.error.type;
1838
1861
  },
1839
1862
  get children() {
1840
- var _el$188 = getNextElement(_tmpl$48);
1841
- insert(_el$188, () => formatMCPUIString(strings.errorTypeLabel, {
1863
+ var _el$190 = getNextElement(_tmpl$48);
1864
+ insert(_el$190, () => formatMCPUIString(strings.errorTypeLabel, {
1842
1865
  type: props.error.type
1843
1866
  }));
1844
- return _el$188;
1867
+ return _el$190;
1845
1868
  }
1846
- }), _el$194, _co$38);
1847
- insert(_el$185, createComponent(Show, {
1869
+ }), _el$196, _co$39);
1870
+ insert(_el$187, createComponent(Show, {
1848
1871
  get when() {
1849
1872
  var _a;
1850
1873
  return (_a = props.error.suggestions) == null ? void 0 : _a.length;
1851
1874
  },
1852
1875
  get children() {
1853
- var _el$189 = getNextElement(_tmpl$49), _el$190 = _el$189.firstChild, _el$191 = _el$190.nextSibling;
1854
- insert(_el$190, () => strings.errorSuggestions);
1855
- insert(_el$191, createComponent(For, {
1876
+ var _el$191 = getNextElement(_tmpl$49), _el$192 = _el$191.firstChild, _el$193 = _el$192.nextSibling;
1877
+ insert(_el$192, () => strings.errorSuggestions);
1878
+ insert(_el$193, createComponent(For, {
1856
1879
  get each() {
1857
1880
  return props.error.suggestions;
1858
1881
  },
1859
1882
  children: (suggestion) => (() => {
1860
- var _el$201 = getNextElement(_tmpl$52);
1861
- insert(_el$201, suggestion);
1862
- return _el$201;
1883
+ var _el$203 = getNextElement(_tmpl$52);
1884
+ insert(_el$203, suggestion);
1885
+ return _el$203;
1863
1886
  })()
1864
1887
  }));
1865
- return _el$189;
1888
+ return _el$191;
1866
1889
  }
1867
- }), _el$196, _co$39);
1868
- insert(_el$185, createComponent(Show, {
1890
+ }), _el$198, _co$40);
1891
+ insert(_el$187, createComponent(Show, {
1869
1892
  get when() {
1870
1893
  return memo(() => !!mounted())() && props.error.timestamp;
1871
1894
  },
1872
1895
  get children() {
1873
- var _el$192 = getNextElement(_tmpl$50);
1874
- insert(_el$192, () => new Date(props.error.timestamp).toLocaleString(strings.locale));
1875
- return _el$192;
1896
+ var _el$194 = getNextElement(_tmpl$50);
1897
+ insert(_el$194, () => new Date(props.error.timestamp).toLocaleString(strings.locale));
1898
+ return _el$194;
1876
1899
  }
1877
- }), _el$198, _co$40);
1878
- return _el$182;
1900
+ }), _el$200, _co$41);
1901
+ return _el$184;
1879
1902
  })();
1880
1903
  }
1881
1904
  function isErrorResponse(content) {
@@ -1899,23 +1922,23 @@ function UIResourceHtmlRenderer(props) {
1899
1922
  return ((_a = props.resource.metadata) == null ? void 0 : _a.title) || ((_b = props.resource.uri) == null ? void 0 : _b.replace("ui://deposium/", "")) || strings.resourceTitle;
1900
1923
  };
1901
1924
  return (() => {
1902
- var _el$202 = getNextElement(_tmpl$54), _el$205 = _el$202.firstChild, [_el$206, _co$42] = getNextMarker(_el$205.nextSibling), _el$207 = _el$206.nextSibling, [_el$208, _co$43] = getNextMarker(_el$207.nextSibling);
1903
- insert(_el$202, createComponent(Show, {
1925
+ var _el$204 = getNextElement(_tmpl$54), _el$207 = _el$204.firstChild, [_el$208, _co$43] = getNextMarker(_el$207.nextSibling), _el$209 = _el$208.nextSibling, [_el$210, _co$44] = getNextMarker(_el$209.nextSibling);
1926
+ insert(_el$204, createComponent(Show, {
1904
1927
  get when() {
1905
1928
  var _a;
1906
1929
  return ((_a = props.resource.metadata) == null ? void 0 : _a.title) || props.resource.uri;
1907
1930
  },
1908
1931
  get children() {
1909
- var _el$203 = getNextElement(_tmpl$53), _el$204 = _el$203.firstChild;
1910
- insert(_el$204, resourceTitle);
1911
- return _el$203;
1932
+ var _el$205 = getNextElement(_tmpl$53), _el$206 = _el$205.firstChild;
1933
+ insert(_el$206, resourceTitle);
1934
+ return _el$205;
1912
1935
  }
1913
- }), _el$206, _co$42);
1914
- insert(_el$202, createComponent(SafeHtml, {
1936
+ }), _el$208, _co$43);
1937
+ insert(_el$204, createComponent(SafeHtml, {
1915
1938
  "class": "p-4 prose prose-sm dark:prose-invert max-w-none",
1916
1939
  html: htmlContent
1917
- }), _el$208, _co$43);
1918
- return _el$202;
1940
+ }), _el$210, _co$44);
1941
+ return _el$204;
1919
1942
  })();
1920
1943
  }
1921
1944
  const UIResourceRenderer = (props) => {
@@ -2021,8 +2044,8 @@ const UIResourceRenderer = (props) => {
2021
2044
  return createComponent(RenderProvider, {
2022
2045
  renderComponent,
2023
2046
  get children() {
2024
- var _el$209 = getNextElement(_tmpl$55), _el$210 = _el$209.firstChild, _el$211 = _el$210.nextSibling, [_el$212, _co$44] = getNextMarker(_el$211.nextSibling);
2025
- spread(_el$209, mergeProps({
2047
+ var _el$211 = getNextElement(_tmpl$55), _el$212 = _el$211.firstChild, _el$213 = _el$212.nextSibling, [_el$214, _co$45] = getNextMarker(_el$213.nextSibling);
2048
+ spread(_el$211, mergeProps({
2026
2049
  get ["class"]() {
2027
2050
  return `w-full ${props.class || ""}`;
2028
2051
  }
@@ -2032,14 +2055,14 @@ const UIResourceRenderer = (props) => {
2032
2055
  "data-mcp-ui-component-id": outerKey()
2033
2056
  }), false, true);
2034
2057
  var _ref$3 = responsiveGrid.ref;
2035
- typeof _ref$3 === "function" ? use(_ref$3, _el$210) : responsiveGrid.ref = _el$210;
2036
- insert(_el$210, createComponent(For, {
2058
+ typeof _ref$3 === "function" ? use(_ref$3, _el$212) : responsiveGrid.ref = _el$212;
2059
+ insert(_el$212, createComponent(For, {
2037
2060
  get each() {
2038
2061
  return layout().components;
2039
2062
  },
2040
2063
  children: (component) => (() => {
2041
- var _el$213 = getNextElement(_tmpl$56);
2042
- insert(_el$213, createComponent(ComponentRenderer, {
2064
+ var _el$215 = getNextElement(_tmpl$56);
2065
+ insert(_el$215, createComponent(ComponentRenderer, {
2043
2066
  component,
2044
2067
  get onError() {
2045
2068
  return props.onError;
@@ -2055,18 +2078,18 @@ const UIResourceRenderer = (props) => {
2055
2078
  }
2056
2079
  }));
2057
2080
  effect((_p$) => {
2058
- var _v$47 = getGridStyleString(component), _v$48 = getUiResourceStableKey(component);
2059
- _p$.e = style(_el$213, _v$47, _p$.e);
2060
- _v$48 !== _p$.t && setAttribute(_el$213, "data-mcp-ui-component-id", _p$.t = _v$48);
2081
+ var _v$48 = getGridStyleString(component), _v$49 = getUiResourceStableKey(component);
2082
+ _p$.e = style(_el$215, _v$48, _p$.e);
2083
+ _v$49 !== _p$.t && setAttribute(_el$215, "data-mcp-ui-component-id", _p$.t = _v$49);
2061
2084
  return _p$;
2062
2085
  }, {
2063
2086
  e: void 0,
2064
2087
  t: void 0
2065
2088
  });
2066
- return _el$213;
2089
+ return _el$215;
2067
2090
  })()
2068
2091
  }));
2069
- insert(_el$209, createComponent(Show, {
2092
+ insert(_el$211, createComponent(Show, {
2070
2093
  get when() {
2071
2094
  return shouldShowAutoFooter();
2072
2095
  },
@@ -2077,18 +2100,18 @@ const UIResourceRenderer = (props) => {
2077
2100
  }
2078
2101
  });
2079
2102
  }
2080
- }), _el$212, _co$44);
2103
+ }), _el$214, _co$45);
2081
2104
  effect((_p$) => {
2082
- var _v$45 = gridContainerStyle(), _v$46 = responsiveGrid.stacked();
2083
- _p$.e = style(_el$210, _v$45, _p$.e);
2084
- _v$46 !== _p$.t && setAttribute(_el$210, "data-mcp-ui-stacked", _p$.t = _v$46);
2105
+ var _v$46 = gridContainerStyle(), _v$47 = responsiveGrid.stacked();
2106
+ _p$.e = style(_el$212, _v$46, _p$.e);
2107
+ _v$47 !== _p$.t && setAttribute(_el$212, "data-mcp-ui-stacked", _p$.t = _v$47);
2085
2108
  return _p$;
2086
2109
  }, {
2087
2110
  e: void 0,
2088
2111
  t: void 0
2089
2112
  });
2090
2113
  runHydrationEvents();
2091
- return _el$209;
2114
+ return _el$211;
2092
2115
  }
2093
2116
  });
2094
2117
  };