@seed-ship/mcp-ui-solid 6.22.0 → 6.24.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 (120) hide show
  1. package/CHANGELOG.md +219 -0
  2. package/README.md +209 -2
  3. package/dist/components/ChartJSRenderer.cjs +192 -66
  4. package/dist/components/ChartJSRenderer.cjs.map +1 -1
  5. package/dist/components/ChartJSRenderer.d.ts.map +1 -1
  6. package/dist/components/ChartJSRenderer.js +192 -66
  7. package/dist/components/ChartJSRenderer.js.map +1 -1
  8. package/dist/components/DegradedFallback.cjs +34 -2
  9. package/dist/components/DegradedFallback.cjs.map +1 -1
  10. package/dist/components/DegradedFallback.d.ts +7 -0
  11. package/dist/components/DegradedFallback.d.ts.map +1 -1
  12. package/dist/components/DegradedFallback.js +34 -2
  13. package/dist/components/DegradedFallback.js.map +1 -1
  14. package/dist/components/MissingValue.cjs +43 -0
  15. package/dist/components/MissingValue.cjs.map +1 -0
  16. package/dist/components/MissingValue.d.ts +27 -0
  17. package/dist/components/MissingValue.d.ts.map +1 -0
  18. package/dist/components/MissingValue.js +43 -0
  19. package/dist/components/MissingValue.js.map +1 -0
  20. package/dist/components/UIResourceRenderer.cjs +250 -202
  21. package/dist/components/UIResourceRenderer.cjs.map +1 -1
  22. package/dist/components/UIResourceRenderer.d.ts +2 -1
  23. package/dist/components/UIResourceRenderer.d.ts.map +1 -1
  24. package/dist/components/UIResourceRenderer.js +250 -202
  25. package/dist/components/UIResourceRenderer.js.map +1 -1
  26. package/dist/components/chart-data-table.cjs +30 -5
  27. package/dist/components/chart-data-table.cjs.map +1 -1
  28. package/dist/components/chart-data-table.d.ts +18 -1
  29. package/dist/components/chart-data-table.d.ts.map +1 -1
  30. package/dist/components/chart-data-table.js +30 -5
  31. package/dist/components/chart-data-table.js.map +1 -1
  32. package/dist/components/chart-missing-plugin.cjs +194 -0
  33. package/dist/components/chart-missing-plugin.cjs.map +1 -0
  34. package/dist/components/chart-missing-plugin.d.ts +127 -0
  35. package/dist/components/chart-missing-plugin.d.ts.map +1 -0
  36. package/dist/components/chart-missing-plugin.js +194 -0
  37. package/dist/components/chart-missing-plugin.js.map +1 -0
  38. package/dist/context/MCPUIConfigContext.cjs.map +1 -1
  39. package/dist/context/MCPUIConfigContext.d.ts +57 -28
  40. package/dist/context/MCPUIConfigContext.d.ts.map +1 -1
  41. package/dist/context/MCPUIConfigContext.js.map +1 -1
  42. package/dist/context/MCPUIMathContext.cjs +19 -0
  43. package/dist/context/MCPUIMathContext.cjs.map +1 -0
  44. package/dist/context/MCPUIMathContext.d.ts +18 -0
  45. package/dist/context/MCPUIMathContext.d.ts.map +1 -0
  46. package/dist/context/MCPUIMathContext.js +19 -0
  47. package/dist/context/MCPUIMathContext.js.map +1 -0
  48. package/dist/context/MCPUIStringsContext.cjs +12 -1
  49. package/dist/context/MCPUIStringsContext.cjs.map +1 -1
  50. package/dist/context/MCPUIStringsContext.d.ts +62 -0
  51. package/dist/context/MCPUIStringsContext.d.ts.map +1 -1
  52. package/dist/context/MCPUIStringsContext.js +12 -1
  53. package/dist/context/MCPUIStringsContext.js.map +1 -1
  54. package/dist/index.cjs +2 -0
  55. package/dist/index.cjs.map +1 -1
  56. package/dist/index.d.cts +3 -1
  57. package/dist/index.d.ts +3 -1
  58. package/dist/index.d.ts.map +1 -1
  59. package/dist/index.js +2 -0
  60. package/dist/index.js.map +1 -1
  61. package/dist/plugins/katex.cjs +23 -0
  62. package/dist/plugins/katex.cjs.map +1 -0
  63. package/dist/plugins/katex.d.cts +7 -0
  64. package/dist/plugins/katex.d.ts +7 -0
  65. package/dist/plugins/katex.d.ts.map +1 -0
  66. package/dist/plugins/katex.js +23 -0
  67. package/dist/plugins/katex.js.map +1 -0
  68. package/dist/services/component-registry.cjs +9 -2
  69. package/dist/services/component-registry.cjs.map +1 -1
  70. package/dist/services/component-registry.d.ts.map +1 -1
  71. package/dist/services/component-registry.js +9 -2
  72. package/dist/services/component-registry.js.map +1 -1
  73. package/dist/services/validation.cjs +31 -8
  74. package/dist/services/validation.cjs.map +1 -1
  75. package/dist/services/validation.d.ts.map +1 -1
  76. package/dist/services/validation.js +31 -8
  77. package/dist/services/validation.js.map +1 -1
  78. package/dist/types/index.d.ts +14 -2
  79. package/dist/types/index.d.ts.map +1 -1
  80. package/dist/utils/degraded-projections.cjs +19 -3
  81. package/dist/utils/degraded-projections.cjs.map +1 -1
  82. package/dist/utils/degraded-projections.d.ts +22 -2
  83. package/dist/utils/degraded-projections.d.ts.map +1 -1
  84. package/dist/utils/degraded-projections.js +19 -3
  85. package/dist/utils/degraded-projections.js.map +1 -1
  86. package/dist/utils/iframe-coep.cjs.map +1 -1
  87. package/dist/utils/iframe-coep.d.ts +7 -6
  88. package/dist/utils/iframe-coep.d.ts.map +1 -1
  89. package/dist/utils/iframe-coep.js.map +1 -1
  90. package/dist/utils/math-markdown.cjs +240 -0
  91. package/dist/utils/math-markdown.cjs.map +1 -0
  92. package/dist/utils/math-markdown.d.ts +16 -0
  93. package/dist/utils/math-markdown.d.ts.map +1 -0
  94. package/dist/utils/math-markdown.js +240 -0
  95. package/dist/utils/math-markdown.js.map +1 -0
  96. package/dist/utils/missing-value.cjs +60 -0
  97. package/dist/utils/missing-value.cjs.map +1 -0
  98. package/dist/utils/missing-value.d.ts +79 -0
  99. package/dist/utils/missing-value.d.ts.map +1 -0
  100. package/dist/utils/missing-value.js +60 -0
  101. package/dist/utils/missing-value.js.map +1 -0
  102. package/package.json +23 -4
  103. package/src/components/ChartJSRenderer.tsx +159 -6
  104. package/src/components/DegradedFallback.tsx +24 -2
  105. package/src/components/MissingValue.tsx +61 -0
  106. package/src/components/UIResourceRenderer.tsx +64 -10
  107. package/src/components/chart-data-table.ts +50 -6
  108. package/src/components/chart-missing-plugin.ts +334 -0
  109. package/src/context/MCPUIConfigContext.tsx +57 -28
  110. package/src/context/MCPUIMathContext.tsx +32 -0
  111. package/src/context/MCPUIStringsContext.tsx +76 -0
  112. package/src/index.ts +4 -0
  113. package/src/plugins/katex.ts +25 -0
  114. package/src/services/component-registry.ts +10 -2
  115. package/src/services/validation.ts +44 -9
  116. package/src/types/index.ts +13 -1
  117. package/src/utils/degraded-projections.ts +44 -4
  118. package/src/utils/iframe-coep.ts +7 -6
  119. package/src/utils/math-markdown.ts +222 -0
  120. package/src/utils/missing-value.ts +127 -0
@@ -13,6 +13,8 @@ import { _registerMount, _unregisterMount, getDuplicateMountReporter } from "../
13
13
  import { useTelemetry } from "../context/MCPUITelemetryContext.js";
14
14
  import { useMCPUIStrings, DEFAULT_MCPUI_STRINGS } from "../context/MCPUIStringsContext.js";
15
15
  import { useMCPUIConfig } from "../context/MCPUIConfigContext.js";
16
+ import { stripUndefinedDebris, isMissingCellValue } from "../utils/missing-value.js";
17
+ import { MissingValueLegend, MissingValueMark } from "./MissingValue.js";
16
18
  import { shouldSetCredentialless } from "../utils/iframe-coep.js";
17
19
  import { IframeFallbackLink } from "./IframeFallbackLink.js";
18
20
  import { GridRenderer } from "./GridRenderer.js";
@@ -36,8 +38,10 @@ import { RenderProvider } from "./RenderContext.js";
36
38
  import { useAction } from "../hooks/useAction.js";
37
39
  import { createResponsiveGrid } from "../hooks/createResponsiveGrid.js";
38
40
  import { marked } from "marked";
41
+ import { useMCPUIMath } from "../context/MCPUIMathContext.js";
42
+ import { parseMathMarkdown } from "../utils/math-markdown.js";
39
43
  import { formatMCPUIString } from "../utils/format-string.js";
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>`);
44
+ 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>`);
41
45
  function CopyButton(props) {
42
46
  const strings = useMCPUIStrings();
43
47
  const [copied, setCopied] = createSignal(false);
@@ -192,7 +196,8 @@ function ChartRenderer(props) {
192
196
  return strings.chartQuickchartCaption;
193
197
  }
194
198
  }, () => chartToDegradedTable(params() ?? {}, {
195
- series: strings.degradedSeries
199
+ series: strings.degradedSeries,
200
+ withUnit: strings.chartLabelWithUnit
196
201
  }))));
197
202
  return _el$7;
198
203
  }
@@ -284,7 +289,7 @@ function ChartRenderer(props) {
284
289
  }
285
290
  const HIGHLIGHT_MARK_CLASS = "bg-yellow-200 dark:bg-[#222F49] text-inherit rounded px-0.5";
286
291
  function highlightQuery(html, query) {
287
- var _a;
292
+ var _a, _b;
288
293
  const q = query.trim();
289
294
  if (!q) return html;
290
295
  if (typeof document === "undefined") return html;
@@ -295,6 +300,7 @@ function highlightQuery(html, query) {
295
300
  const walker = document.createTreeWalker(template2.content, NodeFilter.SHOW_TEXT);
296
301
  const textNodes = [];
297
302
  for (let node = walker.nextNode(); node; node = walker.nextNode()) {
303
+ if ((_a = node.parentElement) == null ? void 0 : _a.closest("math")) continue;
298
304
  textNodes.push(node);
299
305
  }
300
306
  for (const node of textNodes) {
@@ -322,7 +328,7 @@ function highlightQuery(html, query) {
322
328
  if (cursor < text.length) {
323
329
  fragment.appendChild(document.createTextNode(text.slice(cursor)));
324
330
  }
325
- (_a = node.parentNode) == null ? void 0 : _a.replaceChild(fragment, node);
331
+ (_b = node.parentNode) == null ? void 0 : _b.replaceChild(fragment, node);
326
332
  }
327
333
  return template2.innerHTML;
328
334
  }
@@ -350,7 +356,7 @@ function transformCellCitations(text, ctx) {
350
356
  });
351
357
  });
352
358
  }
353
- function renderCellValue(value, citationCtx) {
359
+ function renderCellValue(value, citationCtx, mathRenderer) {
354
360
  if (value === null || value === void 0) {
355
361
  return "-";
356
362
  }
@@ -372,14 +378,16 @@ function renderCellValue(value, citationCtx) {
372
378
  }
373
379
  }
374
380
  let strValue = String(value);
375
- strValue = strValue.replace(/\s*[–-]\s*undefined\s*$/gi, "");
376
- strValue = strValue.replace(/^undefined\s*[–-]\s*/gi, "");
381
+ strValue = stripUndefinedDebris(strValue);
377
382
  if (strValue.trim().toLowerCase() === "undefined") {
378
383
  return "-";
379
384
  }
380
385
  if (strValue.trim() === "") {
381
386
  return "-";
382
387
  }
388
+ if (mathRenderer && strValue.includes("$")) {
389
+ return parseMathMarkdown(strValue, mathRenderer, "cellMarkdown", citationCtx ? (text) => transformCellCitations(text, citationCtx) : void 0);
390
+ }
383
391
  const markdownLinkRegex = /\[([^\]]+)\]\(([^)]+)\)/g;
384
392
  if (markdownLinkRegex.test(strValue)) {
385
393
  const htmlValue = strValue.replace(/\[([^\]]+)\]\(([^)]+)\)/g, '<a href="$2" target="_blank" rel="noopener noreferrer" class="text-blue-600 dark:text-blue-400 hover:underline">$1</a>');
@@ -405,6 +413,7 @@ function TableRenderer(props) {
405
413
  const tableParams = props.component.params;
406
414
  let scrollContainerRef;
407
415
  const strings = useMCPUIStrings();
416
+ const mathRenderer = useMCPUIMath();
408
417
  const citationCtx = tableParams.citationMap ? {
409
418
  map: tableParams.citationMap,
410
419
  render: tableParams.citationRender,
@@ -440,12 +449,14 @@ function TableRenderer(props) {
440
449
  const dir = sortDir();
441
450
  if (!key || !dir) return r;
442
451
  const col = columns().find((c) => c.key === key);
443
- const isNum = (col == null ? void 0 : col.type) === "number" || r.length > 0 && typeof ((_a = r[0]) == null ? void 0 : _a[key]) === "number";
452
+ const firstObserved = (_a = r.find((row) => !isMissingCellValue(row == null ? void 0 : row[key]))) == null ? void 0 : _a[key];
453
+ const isNum = (col == null ? void 0 : col.type) === "number" || typeof firstObserved === "number";
444
454
  return [...r].sort((a, b) => {
445
455
  const va = a[key], vb = b[key];
446
- if (va == null && vb == null) return 0;
447
- if (va == null) return 1;
448
- if (vb == null) return -1;
456
+ const missA = isMissingCellValue(va), missB = isMissingCellValue(vb);
457
+ if (missA && missB) return 0;
458
+ if (missA) return 1;
459
+ if (missB) return -1;
449
460
  let cmp;
450
461
  if (isNum) {
451
462
  cmp = (Number(va) || 0) - (Number(vb) || 0);
@@ -481,7 +492,7 @@ function TableRenderer(props) {
481
492
  const cols = columns();
482
493
  return sortedRows().filter((row) => cols.some((col) => {
483
494
  const val = row[col.key];
484
- if (val == null) return false;
495
+ if (isMissingCellValue(val)) return false;
485
496
  return normalize(String(val)).includes(q);
486
497
  }));
487
498
  });
@@ -649,6 +660,10 @@ ${dataRows}`;
649
660
  }
650
661
  };
651
662
  const tableId = `table-${Math.random().toString(36).slice(2, 9)}`;
663
+ const hasMissingCells = createMemo(() => {
664
+ const cols = columns();
665
+ return allRows().some((row) => cols.some((col) => isMissingCellValue(row == null ? void 0 : row[col.key])));
666
+ });
652
667
  const StandardTableBody = () => (() => {
653
668
  var _el$25 = getNextElement(_tmpl$1);
654
669
  insert(_el$25, createComponent(For, {
@@ -663,8 +678,18 @@ ${dataRows}`;
663
678
  },
664
679
  children: (column) => (() => {
665
680
  var _el$27 = getNextElement(_tmpl$11);
666
- insert(_el$27, createComponent(SafeHtml, {
667
- html: () => highlightQuery(renderCellValue(row[column.key], citationCtx), debouncedQuery())
681
+ insert(_el$27, createComponent(Show, {
682
+ get when() {
683
+ return !isMissingCellValue(row[column.key]);
684
+ },
685
+ get fallback() {
686
+ return createComponent(MissingValueMark, {});
687
+ },
688
+ get children() {
689
+ return createComponent(SafeHtml, {
690
+ html: () => highlightQuery(renderCellValue(row[column.key], citationCtx, mathRenderer()), debouncedQuery())
691
+ });
692
+ }
668
693
  }));
669
694
  return _el$27;
670
695
  })()
@@ -698,8 +723,18 @@ ${dataRows}`;
698
723
  },
699
724
  children: (column) => (() => {
700
725
  var _el$30 = getNextElement(_tmpl$11);
701
- insert(_el$30, createComponent(SafeHtml, {
702
- html: () => highlightQuery(renderCellValue(row[column.key], citationCtx), debouncedQuery())
726
+ insert(_el$30, createComponent(Show, {
727
+ get when() {
728
+ return !isMissingCellValue(row[column.key]);
729
+ },
730
+ get fallback() {
731
+ return createComponent(MissingValueMark, {});
732
+ },
733
+ get children() {
734
+ return createComponent(SafeHtml, {
735
+ html: () => highlightQuery(renderCellValue(row[column.key], citationCtx, mathRenderer()), debouncedQuery())
736
+ });
737
+ }
703
738
  }));
704
739
  return _el$30;
705
740
  })()
@@ -735,7 +770,7 @@ ${dataRows}`;
735
770
  },
736
771
  onExpandedChange: setSelfExpanded,
737
772
  get children() {
738
- var _el$31 = getNextElement(_tmpl$24), _el$92 = _el$31.firstChild, [_el$93, _co$19] = getNextMarker(_el$92.nextSibling), _el$39 = _el$93.nextSibling, _el$84 = _el$39.firstChild, [_el$85, _co$15] = getNextMarker(_el$84.nextSibling), _el$86 = _el$85.nextSibling, [_el$87, _co$16] = getNextMarker(_el$86.nextSibling), _el$53 = _el$87.nextSibling, _el$54 = _el$53.firstChild, _el$55 = _el$54.firstChild, _el$56 = _el$55.firstChild, _el$57 = _el$55.nextSibling, [_el$58, _co$0] = getNextMarker(_el$57.nextSibling), _el$88 = _el$53.nextSibling, [_el$89, _co$17] = getNextMarker(_el$88.nextSibling), _el$90 = _el$89.nextSibling, [_el$91, _co$18] = getNextMarker(_el$90.nextSibling);
773
+ var _el$31 = getNextElement(_tmpl$24), _el$94 = _el$31.firstChild, [_el$95, _co$20] = getNextMarker(_el$94.nextSibling), _el$39 = _el$95.nextSibling, _el$84 = _el$39.firstChild, [_el$85, _co$15] = getNextMarker(_el$84.nextSibling), _el$86 = _el$85.nextSibling, [_el$87, _co$16] = getNextMarker(_el$86.nextSibling), _el$53 = _el$87.nextSibling, _el$54 = _el$53.firstChild, _el$55 = _el$54.firstChild, _el$56 = _el$55.firstChild, _el$57 = _el$55.nextSibling, [_el$58, _co$0] = getNextMarker(_el$57.nextSibling), _el$88 = _el$53.nextSibling, [_el$89, _co$17] = getNextMarker(_el$88.nextSibling), _el$90 = _el$89.nextSibling, [_el$91, _co$18] = getNextMarker(_el$90.nextSibling), _el$92 = _el$91.nextSibling, [_el$93, _co$19] = getNextMarker(_el$92.nextSibling);
739
774
  insert(_el$31, createComponent(Show, {
740
775
  when: exportable,
741
776
  get fallback() {
@@ -810,7 +845,7 @@ ${dataRows}`;
810
845
  runHydrationEvents();
811
846
  return _el$32;
812
847
  }
813
- }), _el$93, _co$19);
848
+ }), _el$95, _co$20);
814
849
  insert(_el$39, createComponent(Show, {
815
850
  get when() {
816
851
  return tableParams.title;
@@ -887,10 +922,10 @@ ${dataRows}`;
887
922
  return tableParams.columns;
888
923
  },
889
924
  children: (column) => (() => {
890
- var _el$94 = getNextElement(_tmpl$25), _el$95 = _el$94.firstChild, _el$97 = _el$95.firstChild, [_el$98, _co$20] = getNextMarker(_el$97.nextSibling), _el$96 = _el$98.nextSibling;
891
- addEventListener(_el$94, "click", () => handleSort(column.key));
892
- insert(_el$95, () => column.label, _el$98, _co$20);
893
- insert(_el$96, () => sortIndicator(column.key));
925
+ var _el$96 = getNextElement(_tmpl$25), _el$97 = _el$96.firstChild, _el$99 = _el$97.firstChild, [_el$100, _co$21] = getNextMarker(_el$99.nextSibling), _el$98 = _el$100.nextSibling;
926
+ addEventListener(_el$96, "click", () => handleSort(column.key));
927
+ insert(_el$97, () => column.label, _el$100, _co$21);
928
+ insert(_el$98, () => sortIndicator(column.key));
894
929
  effect((_p$) => {
895
930
  var _v$20 = column.width ? {
896
931
  width: column.width
@@ -900,16 +935,16 @@ ${dataRows}`;
900
935
  "opacity-30": sortKey() !== column.key,
901
936
  "opacity-100 text-blue-600 dark:text-blue-400": sortKey() === column.key
902
937
  };
903
- _p$.e = style(_el$94, _v$20, _p$.e);
904
- _v$21 !== _p$.t && setAttribute(_el$94, "title", _p$.t = _v$21);
905
- _p$.a = classList(_el$96, _v$22, _p$.a);
938
+ _p$.e = style(_el$96, _v$20, _p$.e);
939
+ _v$21 !== _p$.t && setAttribute(_el$96, "title", _p$.t = _v$21);
940
+ _p$.a = classList(_el$98, _v$22, _p$.a);
906
941
  return _p$;
907
942
  }, {
908
943
  e: void 0,
909
944
  t: void 0,
910
945
  a: void 0
911
946
  });
912
- return _el$94;
947
+ return _el$96;
913
948
  })()
914
949
  }));
915
950
  insert(_el$54, createComponent(Show, {
@@ -923,6 +958,16 @@ ${dataRows}`;
923
958
  return createComponent(VirtualizedTableBody, {});
924
959
  }
925
960
  }), _el$58, _co$0);
961
+ insert(_el$39, createComponent(Show, {
962
+ get when() {
963
+ return hasMissingCells();
964
+ },
965
+ get children() {
966
+ return createComponent(MissingValueLegend, {
967
+ "class": "mt-2 px-1"
968
+ });
969
+ }
970
+ }), _el$89, _co$17);
926
971
  insert(_el$39, createComponent(Show, {
927
972
  get when() {
928
973
  return tableParams.pagination;
@@ -936,7 +981,7 @@ ${dataRows}`;
936
981
  }));
937
982
  return _el$59;
938
983
  }
939
- }), _el$89, _co$17);
984
+ }), _el$91, _co$18);
940
985
  insert(_el$39, createComponent(Show, {
941
986
  get when() {
942
987
  return needsClientPagination();
@@ -963,10 +1008,10 @@ ${dataRows}`;
963
1008
  return pageSizeOptions();
964
1009
  },
965
1010
  children: (opt) => (() => {
966
- var _el$99 = getNextElement(_tmpl$26);
967
- insert(_el$99, () => opt.label);
968
- effect(() => setProperty(_el$99, "value", opt.value));
969
- return _el$99;
1011
+ var _el$101 = getNextElement(_tmpl$26);
1012
+ insert(_el$101, () => opt.label);
1013
+ effect(() => setProperty(_el$101, "value", opt.value));
1014
+ return _el$101;
970
1015
  })()
971
1016
  }));
972
1017
  effect(() => setAttribute(_el$80, "aria-label", strings.paginationPageSize));
@@ -995,7 +1040,7 @@ ${dataRows}`;
995
1040
  runHydrationEvents();
996
1041
  return _el$61;
997
1042
  }
998
- }), _el$91, _co$18);
1043
+ }), _el$93, _co$19);
999
1044
  effect((_p$) => {
1000
1045
  var _v$14 = `relative w-full bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700 overflow-hidden group ${isExpanded() ? "flex-1 min-h-0 flex flex-col" : "h-full"} ${tableParams.className || ""}`, _v$15 = `p-4 ${isExpanded() ? "flex-1 min-h-0 flex flex-col" : ""}`, _v$16 = `overflow-x-auto ${isExpanded() ? "flex-1 min-h-0" : ""}`, _v$17 = (
1001
1046
  // v6.1.0 — when expanded, the scroll container fills the
@@ -1056,53 +1101,53 @@ function MetricRenderer(props) {
1056
1101
  return `${title}: ${value}${unit ? " " + unit : ""}`;
1057
1102
  };
1058
1103
  return (() => {
1059
- var _el$100 = getNextElement(_tmpl$30), _el$122 = _el$100.firstChild, [_el$123, _co$26] = getNextMarker(_el$122.nextSibling), _el$101 = _el$123.nextSibling, _el$102 = _el$101.firstChild, _el$103 = _el$102.firstChild, _el$104 = _el$103.nextSibling, _el$105 = _el$104.firstChild, _el$107 = _el$105.nextSibling, [_el$108, _co$21] = getNextMarker(_el$107.nextSibling), _el$118 = _el$102.nextSibling, [_el$119, _co$24] = getNextMarker(_el$118.nextSibling), _el$120 = _el$119.nextSibling, [_el$121, _co$25] = getNextMarker(_el$120.nextSibling);
1060
- insert(_el$100, createComponent(CopyButton, {
1104
+ var _el$102 = getNextElement(_tmpl$30), _el$124 = _el$102.firstChild, [_el$125, _co$27] = getNextMarker(_el$124.nextSibling), _el$103 = _el$125.nextSibling, _el$104 = _el$103.firstChild, _el$105 = _el$104.firstChild, _el$106 = _el$105.nextSibling, _el$107 = _el$106.firstChild, _el$109 = _el$107.nextSibling, [_el$110, _co$22] = getNextMarker(_el$109.nextSibling), _el$120 = _el$104.nextSibling, [_el$121, _co$25] = getNextMarker(_el$120.nextSibling), _el$122 = _el$121.nextSibling, [_el$123, _co$26] = getNextMarker(_el$122.nextSibling);
1105
+ insert(_el$102, createComponent(CopyButton, {
1061
1106
  getText: getMetricText,
1062
1107
  get title() {
1063
1108
  return strings.copyMetric;
1064
1109
  },
1065
1110
  position: "top-right"
1066
- }), _el$123, _co$26);
1067
- insert(_el$103, () => metricParams.title);
1068
- insert(_el$105, () => metricParams.value);
1069
- insert(_el$104, createComponent(Show, {
1111
+ }), _el$125, _co$27);
1112
+ insert(_el$105, () => metricParams.title);
1113
+ insert(_el$107, () => metricParams.value);
1114
+ insert(_el$106, createComponent(Show, {
1070
1115
  get when() {
1071
1116
  return metricParams.unit;
1072
1117
  },
1073
1118
  get children() {
1074
- var _el$106 = getNextElement(_tmpl$27);
1075
- insert(_el$106, () => metricParams.unit);
1076
- return _el$106;
1119
+ var _el$108 = getNextElement(_tmpl$27);
1120
+ insert(_el$108, () => metricParams.unit);
1121
+ return _el$108;
1077
1122
  }
1078
- }), _el$108, _co$21);
1079
- insert(_el$101, createComponent(Show, {
1123
+ }), _el$110, _co$22);
1124
+ insert(_el$103, createComponent(Show, {
1080
1125
  get when() {
1081
1126
  return metricParams.trend;
1082
1127
  },
1083
1128
  get children() {
1084
- var _el$109 = getNextElement(_tmpl$28), _el$110 = _el$109.firstChild, _el$113 = _el$110.firstChild, [_el$114, _co$22] = getNextMarker(_el$113.nextSibling), _el$111 = _el$114.nextSibling, _el$115 = _el$111.nextSibling, [_el$116, _co$23] = getNextMarker(_el$115.nextSibling);
1085
- _el$116.nextSibling;
1086
- insert(_el$110, (() => {
1129
+ var _el$111 = getNextElement(_tmpl$28), _el$112 = _el$111.firstChild, _el$115 = _el$112.firstChild, [_el$116, _co$23] = getNextMarker(_el$115.nextSibling), _el$113 = _el$116.nextSibling, _el$117 = _el$113.nextSibling, [_el$118, _co$24] = getNextMarker(_el$117.nextSibling);
1130
+ _el$118.nextSibling;
1131
+ insert(_el$112, (() => {
1087
1132
  var _c$ = memo(() => metricParams.trend.direction === "up");
1088
1133
  return () => _c$() ? "�" : metricParams.trend.direction === "down" ? "�" : "�";
1089
- })(), _el$114, _co$22);
1090
- insert(_el$110, () => Math.abs(metricParams.trend.value), _el$116, _co$23);
1091
- effect(() => className(_el$110, `text-sm font-medium ${metricParams.trend.direction === "up" ? "text-green-600 dark:text-green-400" : metricParams.trend.direction === "down" ? "text-red-600 dark:text-red-400" : "text-gray-600 dark:text-gray-400"}`));
1092
- return _el$109;
1134
+ })(), _el$116, _co$23);
1135
+ insert(_el$112, () => Math.abs(metricParams.trend.value), _el$118, _co$24);
1136
+ effect(() => className(_el$112, `text-sm font-medium ${metricParams.trend.direction === "up" ? "text-green-600 dark:text-green-400" : metricParams.trend.direction === "down" ? "text-red-600 dark:text-red-400" : "text-gray-600 dark:text-gray-400"}`));
1137
+ return _el$111;
1093
1138
  }
1094
- }), _el$119, _co$24);
1095
- insert(_el$101, createComponent(Show, {
1139
+ }), _el$121, _co$25);
1140
+ insert(_el$103, createComponent(Show, {
1096
1141
  get when() {
1097
1142
  return metricParams.subtitle;
1098
1143
  },
1099
1144
  get children() {
1100
- var _el$117 = getNextElement(_tmpl$29);
1101
- insert(_el$117, () => metricParams.subtitle);
1102
- return _el$117;
1145
+ var _el$119 = getNextElement(_tmpl$29);
1146
+ insert(_el$119, () => metricParams.subtitle);
1147
+ return _el$119;
1103
1148
  }
1104
- }), _el$121, _co$25);
1105
- return _el$100;
1149
+ }), _el$123, _co$26);
1150
+ return _el$102;
1106
1151
  })();
1107
1152
  }
1108
1153
  function extractImageFromMarkdown(content, fallbackAlt) {
@@ -1120,6 +1165,7 @@ function extractImageFromMarkdown(content, fallbackAlt) {
1120
1165
  }
1121
1166
  function TextRenderer(props) {
1122
1167
  const strings = useMCPUIStrings();
1168
+ const mathRenderer = useMCPUIMath();
1123
1169
  const textParams = props.component.params;
1124
1170
  const imageData = createMemo(() => {
1125
1171
  if (textParams.markdown && textParams.content) {
@@ -1144,6 +1190,8 @@ function TextRenderer(props) {
1144
1190
  return escapeHtml(String(raw));
1145
1191
  }
1146
1192
  if (textParams.markdown && !imageData()) {
1193
+ const renderMath = mathRenderer();
1194
+ if (renderMath) return parseMathMarkdown(String(raw), renderMath, "prose");
1147
1195
  return sanitizeHtml(marked.parse(raw, {
1148
1196
  async: false
1149
1197
  }), SANITIZE_PROFILES.prose);
@@ -1159,40 +1207,40 @@ function TextRenderer(props) {
1159
1207
  },
1160
1208
  get fallback() {
1161
1209
  return (() => {
1162
- var _el$124 = getNextElement(_tmpl$31), _el$125 = _el$124.firstChild, [_el$126, _co$27] = getNextMarker(_el$125.nextSibling), _el$127 = _el$126.nextSibling, [_el$128, _co$28] = getNextMarker(_el$127.nextSibling);
1163
- insert(_el$124, createComponent(CopyButton, {
1210
+ var _el$126 = getNextElement(_tmpl$31), _el$127 = _el$126.firstChild, [_el$128, _co$28] = getNextMarker(_el$127.nextSibling), _el$129 = _el$128.nextSibling, [_el$130, _co$29] = getNextMarker(_el$129.nextSibling);
1211
+ insert(_el$126, createComponent(CopyButton, {
1164
1212
  getText: getTextContent,
1165
1213
  get title() {
1166
1214
  return strings.copyText;
1167
1215
  },
1168
1216
  position: "top-right"
1169
- }), _el$126, _co$27);
1170
- insert(_el$124, createComponent(SafeHtml, {
1217
+ }), _el$128, _co$28);
1218
+ insert(_el$126, createComponent(SafeHtml, {
1171
1219
  get ["class"]() {
1172
1220
  return `prose prose-sm dark:prose-invert max-w-none ${textParams.className || ""}`;
1173
1221
  },
1174
1222
  html: htmlContent
1175
- }), _el$128, _co$28);
1176
- return _el$124;
1223
+ }), _el$130, _co$29);
1224
+ return _el$126;
1177
1225
  })();
1178
1226
  },
1179
1227
  children: (data) => {
1180
1228
  const image = () => (() => {
1181
- var _el$129 = getNextElement(_tmpl$32);
1229
+ var _el$131 = getNextElement(_tmpl$32);
1182
1230
  effect((_p$) => {
1183
1231
  var _v$23 = data().imageUrl, _v$24 = data().alt;
1184
- _v$23 !== _p$.e && setAttribute(_el$129, "src", _p$.e = _v$23);
1185
- _v$24 !== _p$.t && setAttribute(_el$129, "alt", _p$.t = _v$24);
1232
+ _v$23 !== _p$.e && setAttribute(_el$131, "src", _p$.e = _v$23);
1233
+ _v$24 !== _p$.t && setAttribute(_el$131, "alt", _p$.t = _v$24);
1186
1234
  return _p$;
1187
1235
  }, {
1188
1236
  e: void 0,
1189
1237
  t: void 0
1190
1238
  });
1191
- return _el$129;
1239
+ return _el$131;
1192
1240
  })();
1193
1241
  return (() => {
1194
- var _el$130 = getNextElement(_tmpl$33), _el$131 = _el$130.firstChild, _el$132 = _el$131.nextSibling, _el$133 = _el$132.firstChild;
1195
- insert(_el$131, createComponent(Show, {
1242
+ var _el$132 = getNextElement(_tmpl$33), _el$133 = _el$132.firstChild, _el$134 = _el$133.nextSibling, _el$135 = _el$134.firstChild;
1243
+ insert(_el$133, createComponent(Show, {
1196
1244
  get when() {
1197
1245
  return data().linkUrl;
1198
1246
  },
@@ -1200,14 +1248,14 @@ function TextRenderer(props) {
1200
1248
  return image();
1201
1249
  },
1202
1250
  children: (href) => (() => {
1203
- var _el$134 = getNextElement(_tmpl$34);
1204
- insert(_el$134, image);
1205
- effect(() => setAttribute(_el$134, "href", href()));
1206
- return _el$134;
1251
+ var _el$136 = getNextElement(_tmpl$34);
1252
+ insert(_el$136, image);
1253
+ effect(() => setAttribute(_el$136, "href", href()));
1254
+ return _el$136;
1207
1255
  })()
1208
1256
  }));
1209
- insert(_el$133, () => data().credit);
1210
- return _el$130;
1257
+ insert(_el$135, () => data().credit);
1258
+ return _el$132;
1211
1259
  })();
1212
1260
  }
1213
1261
  });
@@ -1220,34 +1268,34 @@ function IframeRenderer(props) {
1220
1268
  customTrustedDomains: config.customTrustedIframeDomains
1221
1269
  });
1222
1270
  return (() => {
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);
1224
- insert(_el$135, createComponent(Show, {
1271
+ var _el$137 = getNextElement(_tmpl$36), _el$141 = _el$137.firstChild, [_el$142, _co$30] = getNextMarker(_el$141.nextSibling), _el$140 = _el$142.nextSibling, _el$143 = _el$140.nextSibling, [_el$144, _co$31] = getNextMarker(_el$143.nextSibling);
1272
+ insert(_el$137, createComponent(Show, {
1225
1273
  get when() {
1226
1274
  return params.title;
1227
1275
  },
1228
1276
  get children() {
1229
- var _el$136 = getNextElement(_tmpl$35), _el$137 = _el$136.firstChild;
1230
- insert(_el$137, () => params.title);
1231
- return _el$136;
1277
+ var _el$138 = getNextElement(_tmpl$35), _el$139 = _el$138.firstChild;
1278
+ insert(_el$139, () => params.title);
1279
+ return _el$138;
1232
1280
  }
1233
- }), _el$140, _co$29);
1234
- insert(_el$135, createComponent(IframeFallbackLink, {
1281
+ }), _el$142, _co$30);
1282
+ insert(_el$137, createComponent(IframeFallbackLink, {
1235
1283
  get url() {
1236
1284
  return params.url;
1237
1285
  },
1238
1286
  "class": "border-t border-gray-200 dark:border-gray-700"
1239
- }), _el$142, _co$30);
1287
+ }), _el$144, _co$31);
1240
1288
  effect((_p$) => {
1241
1289
  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
1290
  // This iframe's sandbox never carries `allow-same-origin` for an
1243
1291
  // untrusted host, so it already runs without cookies.
1244
1292
  sandboxedWithoutSameOrigin: !isTrustedIframeDomain(params.url, trustOptions())
1245
1293
  }) || void 0;
1246
- _v$25 !== _p$.e && setAttribute(_el$138, "src", _p$.e = _v$25);
1247
- _v$26 !== _p$.t && setAttribute(_el$138, "title", _p$.t = _v$26);
1248
- _p$.a = style(_el$138, _v$27, _p$.a);
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);
1294
+ _v$25 !== _p$.e && setAttribute(_el$140, "src", _p$.e = _v$25);
1295
+ _v$26 !== _p$.t && setAttribute(_el$140, "title", _p$.t = _v$26);
1296
+ _p$.a = style(_el$140, _v$27, _p$.a);
1297
+ _v$28 !== _p$.o && setAttribute(_el$140, "sandbox", _p$.o = _v$28);
1298
+ _v$29 !== _p$.i && setAttribute(_el$140, "credentialless", _p$.i = _v$29);
1251
1299
  return _p$;
1252
1300
  }, {
1253
1301
  e: void 0,
@@ -1256,35 +1304,35 @@ function IframeRenderer(props) {
1256
1304
  o: void 0,
1257
1305
  i: void 0
1258
1306
  });
1259
- return _el$135;
1307
+ return _el$137;
1260
1308
  })();
1261
1309
  }
1262
1310
  function ImageRenderer(props) {
1263
1311
  const strings = useMCPUIStrings();
1264
1312
  const params = props.component.params;
1265
1313
  return (() => {
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, {
1314
+ var _el$145 = getNextElement(_tmpl$38), _el$146 = _el$145.firstChild, _el$147 = _el$146.firstChild, _el$148 = _el$147.firstChild, _el$151 = _el$146.nextSibling, [_el$152, _co$32] = getNextMarker(_el$151.nextSibling);
1315
+ insert(_el$145, createComponent(Show, {
1268
1316
  get when() {
1269
1317
  return params.caption;
1270
1318
  },
1271
1319
  get children() {
1272
- var _el$147 = getNextElement(_tmpl$37), _el$148 = _el$147.firstChild;
1273
- insert(_el$148, () => params.caption);
1274
- return _el$147;
1320
+ var _el$149 = getNextElement(_tmpl$37), _el$150 = _el$149.firstChild;
1321
+ insert(_el$150, () => params.caption);
1322
+ return _el$149;
1275
1323
  }
1276
- }), _el$150, _co$31);
1324
+ }), _el$152, _co$32);
1277
1325
  effect((_p$) => {
1278
1326
  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, {
1279
1327
  alt: params.alt || strings.imageAltFallback
1280
1328
  }), _v$33 = safeUrl(params.url, {
1281
1329
  allowDataImage: true
1282
1330
  }), _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);
1331
+ _v$30 !== _p$.e && className(_el$145, _p$.e = _v$30);
1332
+ _v$31 !== _p$.t && setAttribute(_el$147, "href", _p$.t = _v$31);
1333
+ _v$32 !== _p$.a && setAttribute(_el$147, "aria-label", _p$.a = _v$32);
1334
+ _v$33 !== _p$.o && setAttribute(_el$148, "src", _p$.o = _v$33);
1335
+ _v$34 !== _p$.i && setAttribute(_el$148, "alt", _p$.i = _v$34);
1288
1336
  return _p$;
1289
1337
  }, {
1290
1338
  e: void 0,
@@ -1293,34 +1341,34 @@ function ImageRenderer(props) {
1293
1341
  o: void 0,
1294
1342
  i: void 0
1295
1343
  });
1296
- return _el$143;
1344
+ return _el$145;
1297
1345
  })();
1298
1346
  }
1299
1347
  function LinkRenderer(props) {
1300
1348
  const strings = useMCPUIStrings();
1301
1349
  const params = props.component.params;
1302
1350
  return (() => {
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, {
1351
+ var _el$153 = getNextElement(_tmpl$40), _el$154 = _el$153.firstChild, _el$155 = _el$154.nextSibling, _el$156 = _el$155.firstChild, _el$158 = _el$156.nextSibling, [_el$159, _co$33] = getNextMarker(_el$158.nextSibling);
1352
+ _el$153.$$click = (e) => e.stopPropagation();
1353
+ insert(_el$156, () => params.label || params.url);
1354
+ insert(_el$155, createComponent(Show, {
1307
1355
  get when() {
1308
1356
  return params.description;
1309
1357
  },
1310
1358
  get children() {
1311
- var _el$155 = getNextElement(_tmpl$39);
1312
- insert(_el$155, () => params.description);
1313
- return _el$155;
1359
+ var _el$157 = getNextElement(_tmpl$39);
1360
+ insert(_el$157, () => params.description);
1361
+ return _el$157;
1314
1362
  }
1315
- }), _el$157, _co$32);
1363
+ }), _el$159, _co$33);
1316
1364
  effect((_p$) => {
1317
1365
  var _v$35 = safeUrl(params.url), _v$36 = formatMCPUIString(strings.linkOpensInNewTab, {
1318
1366
  label: params.label || strings.linkLabel,
1319
1367
  description: params.description || params.url
1320
1368
  }), _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);
1369
+ _v$35 !== _p$.e && setAttribute(_el$153, "href", _p$.e = _v$35);
1370
+ _v$36 !== _p$.t && setAttribute(_el$153, "aria-label", _p$.t = _v$36);
1371
+ _v$37 !== _p$.a && className(_el$153, _p$.a = _v$37);
1324
1372
  return _p$;
1325
1373
  }, {
1326
1374
  e: void 0,
@@ -1328,7 +1376,7 @@ function LinkRenderer(props) {
1328
1376
  a: void 0
1329
1377
  });
1330
1378
  runHydrationEvents();
1331
- return _el$151;
1379
+ return _el$153;
1332
1380
  })();
1333
1381
  }
1334
1382
  function ComponentRenderer(props) {
@@ -1407,20 +1455,20 @@ function ComponentRenderer(props) {
1407
1455
  }
1408
1456
  if (mode === "inline-warn") {
1409
1457
  return (() => {
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, {
1458
+ var _el$160 = getNextElement(_tmpl$41), _el$161 = _el$160.firstChild, _el$162 = _el$161.nextSibling;
1459
+ setAttribute(_el$160, "title", firstError);
1460
+ insert(_el$162, () => formatMCPUIString(strings.invalidComponent, {
1413
1461
  type: props.component.type
1414
1462
  }));
1415
- effect(() => setAttribute(_el$158, "aria-label", strings.validationWarning));
1416
- return _el$158;
1463
+ effect(() => setAttribute(_el$160, "aria-label", strings.validationWarning));
1464
+ return _el$160;
1417
1465
  })();
1418
1466
  }
1419
1467
  return (() => {
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;
1468
+ var _el$163 = getNextElement(_tmpl$42), _el$164 = _el$163.firstChild, _el$165 = _el$164.nextSibling;
1469
+ insert(_el$164, () => strings.validationError);
1470
+ insert(_el$165, firstError);
1471
+ return _el$163;
1424
1472
  })();
1425
1473
  }
1426
1474
  return createComponent(GenerativeUIErrorBoundary, {
@@ -1714,10 +1762,10 @@ function ComponentRenderer(props) {
1714
1762
  function UnsupportedComponentFallback(props) {
1715
1763
  const strings = useMCPUIStrings();
1716
1764
  return (() => {
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;
1765
+ var _el$166 = getNextElement(_tmpl$43), _el$169 = _el$166.firstChild, [_el$170, _co$34] = getNextMarker(_el$169.nextSibling), _el$167 = _el$170.nextSibling, _el$168 = _el$167.nextSibling;
1766
+ insert(_el$166, () => strings.unsupportedComponentType, _el$170, _co$34);
1767
+ insert(_el$168, () => props.component.type);
1768
+ return _el$166;
1721
1769
  })();
1722
1770
  }
1723
1771
  function ActionRenderer(props) {
@@ -1757,27 +1805,27 @@ function ActionRenderer(props) {
1757
1805
  const isDisabled = () => params.disabled || isExecutable() && isExecuting();
1758
1806
  if (params.type === "link" || params.action === "link") {
1759
1807
  return (() => {
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, {
1808
+ var _el$171 = getNextElement(_tmpl$45), _el$173 = _el$171.firstChild, [_el$174, _co$35] = getNextMarker(_el$173.nextSibling), _el$175 = _el$174.nextSibling, [_el$176, _co$36] = getNextMarker(_el$175.nextSibling);
1809
+ _el$171.$$click = handleClick;
1810
+ insert(_el$171, createComponent(Show, {
1763
1811
  get when() {
1764
1812
  return params.icon;
1765
1813
  },
1766
1814
  get children() {
1767
- var _el$170 = getNextElement(_tmpl$44);
1768
- insert(_el$170, () => params.icon);
1769
- return _el$170;
1815
+ var _el$172 = getNextElement(_tmpl$44);
1816
+ insert(_el$172, () => params.icon);
1817
+ return _el$172;
1770
1818
  }
1771
- }), _el$172, _co$34);
1772
- insert(_el$169, () => params.label, _el$174, _co$35);
1819
+ }), _el$174, _co$35);
1820
+ insert(_el$171, () => params.label, _el$176, _co$36);
1773
1821
  effect((_p$) => {
1774
1822
  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
1775
1823
  ${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"}
1776
1824
  ${params.className || ""}`;
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);
1825
+ _v$38 !== _p$.e && setAttribute(_el$171, "href", _p$.e = _v$38);
1826
+ _v$39 !== _p$.t && setAttribute(_el$171, "target", _p$.t = _v$39);
1827
+ _v$40 !== _p$.a && setAttribute(_el$171, "aria-label", _p$.a = _v$40);
1828
+ _v$41 !== _p$.o && className(_el$171, _p$.o = _v$41);
1781
1829
  return _p$;
1782
1830
  }, {
1783
1831
  e: void 0,
@@ -1786,41 +1834,41 @@ function ActionRenderer(props) {
1786
1834
  o: void 0
1787
1835
  });
1788
1836
  runHydrationEvents();
1789
- return _el$169;
1837
+ return _el$171;
1790
1838
  })();
1791
1839
  }
1792
1840
  return (() => {
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, {
1841
+ var _el$177 = getNextElement(_tmpl$47), _el$180 = _el$177.firstChild, [_el$181, _co$37] = getNextMarker(_el$180.nextSibling), _el$182 = _el$181.nextSibling, [_el$183, _co$38] = getNextMarker(_el$182.nextSibling), _el$184 = _el$183.nextSibling, [_el$185, _co$39] = getNextMarker(_el$184.nextSibling);
1842
+ _el$177.$$click = handleClick;
1843
+ insert(_el$177, createComponent(Show, {
1796
1844
  get when() {
1797
1845
  return memo(() => !!isExecuting())() && isExecutable();
1798
1846
  },
1799
1847
  get children() {
1800
1848
  return getNextElement(_tmpl$46);
1801
1849
  }
1802
- }), _el$179, _co$36);
1803
- insert(_el$175, createComponent(Show, {
1850
+ }), _el$181, _co$37);
1851
+ insert(_el$177, createComponent(Show, {
1804
1852
  get when() {
1805
1853
  return memo(() => !!params.icon)() && !(isExecuting() && isExecutable());
1806
1854
  },
1807
1855
  get children() {
1808
- var _el$177 = getNextElement(_tmpl$44);
1809
- insert(_el$177, () => params.icon);
1810
- return _el$177;
1856
+ var _el$179 = getNextElement(_tmpl$44);
1857
+ insert(_el$179, () => params.icon);
1858
+ return _el$179;
1811
1859
  }
1812
- }), _el$181, _co$37);
1813
- insert(_el$175, () => params.label, _el$183, _co$38);
1860
+ }), _el$183, _co$38);
1861
+ insert(_el$177, () => params.label, _el$185, _co$39);
1814
1862
  effect((_p$) => {
1815
1863
  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
1816
1864
  ${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"}
1817
1865
  ${isDisabled() ? "opacity-50 cursor-not-allowed" : ""}
1818
1866
  ${params.size === "sm" ? "px-3 py-1.5 text-xs" : params.size === "lg" ? "px-6 py-3 text-base" : ""}
1819
1867
  ${params.className || ""}`;
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);
1868
+ _v$42 !== _p$.e && setProperty(_el$177, "disabled", _p$.e = _v$42);
1869
+ _v$43 !== _p$.t && setAttribute(_el$177, "aria-busy", _p$.t = _v$43);
1870
+ _v$44 !== _p$.a && setAttribute(_el$177, "aria-label", _p$.a = _v$44);
1871
+ _v$45 !== _p$.o && className(_el$177, _p$.o = _v$45);
1824
1872
  return _p$;
1825
1873
  }, {
1826
1874
  e: void 0,
@@ -1829,7 +1877,7 @@ function ActionRenderer(props) {
1829
1877
  o: void 0
1830
1878
  });
1831
1879
  runHydrationEvents();
1832
- return _el$175;
1880
+ return _el$177;
1833
1881
  })();
1834
1882
  }
1835
1883
  function ErrorCardRenderer(props) {
@@ -1843,62 +1891,62 @@ function ErrorCardRenderer(props) {
1843
1891
  });
1844
1892
  };
1845
1893
  return (() => {
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, {
1894
+ var _el$186 = getNextElement(_tmpl$51), _el$203 = _el$186.firstChild, [_el$204, _co$43] = getNextMarker(_el$203.nextSibling), _el$187 = _el$204.nextSibling, _el$188 = _el$187.firstChild, _el$189 = _el$188.nextSibling, _el$190 = _el$189.firstChild, _el$191 = _el$190.nextSibling, _el$197 = _el$191.nextSibling, [_el$198, _co$40] = getNextMarker(_el$197.nextSibling), _el$199 = _el$198.nextSibling, [_el$200, _co$41] = getNextMarker(_el$199.nextSibling), _el$201 = _el$200.nextSibling, [_el$202, _co$42] = getNextMarker(_el$201.nextSibling);
1895
+ insert(_el$186, createComponent(CopyButton, {
1848
1896
  getText: getErrorText,
1849
1897
  get title() {
1850
1898
  return strings.copyErrorDetails;
1851
1899
  },
1852
1900
  position: "top-right"
1853
- }), _el$202, _co$42);
1854
- insert(_el$188, () => formatMCPUIString(strings.toolErrorTitle, {
1901
+ }), _el$204, _co$43);
1902
+ insert(_el$190, () => formatMCPUIString(strings.toolErrorTitle, {
1855
1903
  tool: props.error.tool || strings.errorUnknownToolName
1856
1904
  }));
1857
- insert(_el$189, () => props.error.message || strings.errorToolExecution);
1858
- insert(_el$187, createComponent(Show, {
1905
+ insert(_el$191, () => props.error.message || strings.errorToolExecution);
1906
+ insert(_el$189, createComponent(Show, {
1859
1907
  get when() {
1860
1908
  return props.error.type;
1861
1909
  },
1862
1910
  get children() {
1863
- var _el$190 = getNextElement(_tmpl$48);
1864
- insert(_el$190, () => formatMCPUIString(strings.errorTypeLabel, {
1911
+ var _el$192 = getNextElement(_tmpl$48);
1912
+ insert(_el$192, () => formatMCPUIString(strings.errorTypeLabel, {
1865
1913
  type: props.error.type
1866
1914
  }));
1867
- return _el$190;
1915
+ return _el$192;
1868
1916
  }
1869
- }), _el$196, _co$39);
1870
- insert(_el$187, createComponent(Show, {
1917
+ }), _el$198, _co$40);
1918
+ insert(_el$189, createComponent(Show, {
1871
1919
  get when() {
1872
1920
  var _a;
1873
1921
  return (_a = props.error.suggestions) == null ? void 0 : _a.length;
1874
1922
  },
1875
1923
  get children() {
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, {
1924
+ var _el$193 = getNextElement(_tmpl$49), _el$194 = _el$193.firstChild, _el$195 = _el$194.nextSibling;
1925
+ insert(_el$194, () => strings.errorSuggestions);
1926
+ insert(_el$195, createComponent(For, {
1879
1927
  get each() {
1880
1928
  return props.error.suggestions;
1881
1929
  },
1882
1930
  children: (suggestion) => (() => {
1883
- var _el$203 = getNextElement(_tmpl$52);
1884
- insert(_el$203, suggestion);
1885
- return _el$203;
1931
+ var _el$205 = getNextElement(_tmpl$52);
1932
+ insert(_el$205, suggestion);
1933
+ return _el$205;
1886
1934
  })()
1887
1935
  }));
1888
- return _el$191;
1936
+ return _el$193;
1889
1937
  }
1890
- }), _el$198, _co$40);
1891
- insert(_el$187, createComponent(Show, {
1938
+ }), _el$200, _co$41);
1939
+ insert(_el$189, createComponent(Show, {
1892
1940
  get when() {
1893
1941
  return memo(() => !!mounted())() && props.error.timestamp;
1894
1942
  },
1895
1943
  get children() {
1896
- var _el$194 = getNextElement(_tmpl$50);
1897
- insert(_el$194, () => new Date(props.error.timestamp).toLocaleString(strings.locale));
1898
- return _el$194;
1944
+ var _el$196 = getNextElement(_tmpl$50);
1945
+ insert(_el$196, () => new Date(props.error.timestamp).toLocaleString(strings.locale));
1946
+ return _el$196;
1899
1947
  }
1900
- }), _el$200, _co$41);
1901
- return _el$184;
1948
+ }), _el$202, _co$42);
1949
+ return _el$186;
1902
1950
  })();
1903
1951
  }
1904
1952
  function isErrorResponse(content) {
@@ -1922,23 +1970,23 @@ function UIResourceHtmlRenderer(props) {
1922
1970
  return ((_a = props.resource.metadata) == null ? void 0 : _a.title) || ((_b = props.resource.uri) == null ? void 0 : _b.replace("ui://deposium/", "")) || strings.resourceTitle;
1923
1971
  };
1924
1972
  return (() => {
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, {
1973
+ var _el$206 = getNextElement(_tmpl$54), _el$209 = _el$206.firstChild, [_el$210, _co$44] = getNextMarker(_el$209.nextSibling), _el$211 = _el$210.nextSibling, [_el$212, _co$45] = getNextMarker(_el$211.nextSibling);
1974
+ insert(_el$206, createComponent(Show, {
1927
1975
  get when() {
1928
1976
  var _a;
1929
1977
  return ((_a = props.resource.metadata) == null ? void 0 : _a.title) || props.resource.uri;
1930
1978
  },
1931
1979
  get children() {
1932
- var _el$205 = getNextElement(_tmpl$53), _el$206 = _el$205.firstChild;
1933
- insert(_el$206, resourceTitle);
1934
- return _el$205;
1980
+ var _el$207 = getNextElement(_tmpl$53), _el$208 = _el$207.firstChild;
1981
+ insert(_el$208, resourceTitle);
1982
+ return _el$207;
1935
1983
  }
1936
- }), _el$208, _co$43);
1937
- insert(_el$204, createComponent(SafeHtml, {
1984
+ }), _el$210, _co$44);
1985
+ insert(_el$206, createComponent(SafeHtml, {
1938
1986
  "class": "p-4 prose prose-sm dark:prose-invert max-w-none",
1939
1987
  html: htmlContent
1940
- }), _el$210, _co$44);
1941
- return _el$204;
1988
+ }), _el$212, _co$45);
1989
+ return _el$206;
1942
1990
  })();
1943
1991
  }
1944
1992
  const UIResourceRenderer = (props) => {
@@ -2044,8 +2092,8 @@ const UIResourceRenderer = (props) => {
2044
2092
  return createComponent(RenderProvider, {
2045
2093
  renderComponent,
2046
2094
  get children() {
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({
2095
+ var _el$213 = getNextElement(_tmpl$55), _el$214 = _el$213.firstChild, _el$215 = _el$214.nextSibling, [_el$216, _co$46] = getNextMarker(_el$215.nextSibling);
2096
+ spread(_el$213, mergeProps({
2049
2097
  get ["class"]() {
2050
2098
  return `w-full ${props.class || ""}`;
2051
2099
  }
@@ -2055,14 +2103,14 @@ const UIResourceRenderer = (props) => {
2055
2103
  "data-mcp-ui-component-id": outerKey()
2056
2104
  }), false, true);
2057
2105
  var _ref$3 = responsiveGrid.ref;
2058
- typeof _ref$3 === "function" ? use(_ref$3, _el$212) : responsiveGrid.ref = _el$212;
2059
- insert(_el$212, createComponent(For, {
2106
+ typeof _ref$3 === "function" ? use(_ref$3, _el$214) : responsiveGrid.ref = _el$214;
2107
+ insert(_el$214, createComponent(For, {
2060
2108
  get each() {
2061
2109
  return layout().components;
2062
2110
  },
2063
2111
  children: (component) => (() => {
2064
- var _el$215 = getNextElement(_tmpl$56);
2065
- insert(_el$215, createComponent(ComponentRenderer, {
2112
+ var _el$217 = getNextElement(_tmpl$56);
2113
+ insert(_el$217, createComponent(ComponentRenderer, {
2066
2114
  component,
2067
2115
  get onError() {
2068
2116
  return props.onError;
@@ -2079,17 +2127,17 @@ const UIResourceRenderer = (props) => {
2079
2127
  }));
2080
2128
  effect((_p$) => {
2081
2129
  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);
2130
+ _p$.e = style(_el$217, _v$48, _p$.e);
2131
+ _v$49 !== _p$.t && setAttribute(_el$217, "data-mcp-ui-component-id", _p$.t = _v$49);
2084
2132
  return _p$;
2085
2133
  }, {
2086
2134
  e: void 0,
2087
2135
  t: void 0
2088
2136
  });
2089
- return _el$215;
2137
+ return _el$217;
2090
2138
  })()
2091
2139
  }));
2092
- insert(_el$211, createComponent(Show, {
2140
+ insert(_el$213, createComponent(Show, {
2093
2141
  get when() {
2094
2142
  return shouldShowAutoFooter();
2095
2143
  },
@@ -2100,18 +2148,18 @@ const UIResourceRenderer = (props) => {
2100
2148
  }
2101
2149
  });
2102
2150
  }
2103
- }), _el$214, _co$45);
2151
+ }), _el$216, _co$46);
2104
2152
  effect((_p$) => {
2105
2153
  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);
2154
+ _p$.e = style(_el$214, _v$46, _p$.e);
2155
+ _v$47 !== _p$.t && setAttribute(_el$214, "data-mcp-ui-stacked", _p$.t = _v$47);
2108
2156
  return _p$;
2109
2157
  }, {
2110
2158
  e: void 0,
2111
2159
  t: void 0
2112
2160
  });
2113
2161
  runHydrationEvents();
2114
- return _el$211;
2162
+ return _el$213;
2115
2163
  }
2116
2164
  });
2117
2165
  };