@seed-ship/mcp-ui-solid 6.23.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 (79) hide show
  1. package/CHANGELOG.md +125 -0
  2. package/README.md +107 -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 +237 -199
  21. package/dist/components/UIResourceRenderer.cjs.map +1 -1
  22. package/dist/components/UIResourceRenderer.d.ts.map +1 -1
  23. package/dist/components/UIResourceRenderer.js +237 -199
  24. package/dist/components/UIResourceRenderer.js.map +1 -1
  25. package/dist/components/chart-data-table.cjs +30 -5
  26. package/dist/components/chart-data-table.cjs.map +1 -1
  27. package/dist/components/chart-data-table.d.ts +18 -1
  28. package/dist/components/chart-data-table.d.ts.map +1 -1
  29. package/dist/components/chart-data-table.js +30 -5
  30. package/dist/components/chart-data-table.js.map +1 -1
  31. package/dist/components/chart-missing-plugin.cjs +194 -0
  32. package/dist/components/chart-missing-plugin.cjs.map +1 -0
  33. package/dist/components/chart-missing-plugin.d.ts +127 -0
  34. package/dist/components/chart-missing-plugin.d.ts.map +1 -0
  35. package/dist/components/chart-missing-plugin.js +194 -0
  36. package/dist/components/chart-missing-plugin.js.map +1 -0
  37. package/dist/context/MCPUIStringsContext.cjs +12 -1
  38. package/dist/context/MCPUIStringsContext.cjs.map +1 -1
  39. package/dist/context/MCPUIStringsContext.d.ts +62 -0
  40. package/dist/context/MCPUIStringsContext.d.ts.map +1 -1
  41. package/dist/context/MCPUIStringsContext.js +12 -1
  42. package/dist/context/MCPUIStringsContext.js.map +1 -1
  43. package/dist/services/component-registry.cjs +9 -2
  44. package/dist/services/component-registry.cjs.map +1 -1
  45. package/dist/services/component-registry.d.ts.map +1 -1
  46. package/dist/services/component-registry.js +9 -2
  47. package/dist/services/component-registry.js.map +1 -1
  48. package/dist/services/validation.cjs +31 -8
  49. package/dist/services/validation.cjs.map +1 -1
  50. package/dist/services/validation.d.ts.map +1 -1
  51. package/dist/services/validation.js +31 -8
  52. package/dist/services/validation.js.map +1 -1
  53. package/dist/types/index.d.ts +14 -2
  54. package/dist/types/index.d.ts.map +1 -1
  55. package/dist/utils/degraded-projections.cjs +19 -3
  56. package/dist/utils/degraded-projections.cjs.map +1 -1
  57. package/dist/utils/degraded-projections.d.ts +22 -2
  58. package/dist/utils/degraded-projections.d.ts.map +1 -1
  59. package/dist/utils/degraded-projections.js +19 -3
  60. package/dist/utils/degraded-projections.js.map +1 -1
  61. package/dist/utils/missing-value.cjs +60 -0
  62. package/dist/utils/missing-value.cjs.map +1 -0
  63. package/dist/utils/missing-value.d.ts +79 -0
  64. package/dist/utils/missing-value.d.ts.map +1 -0
  65. package/dist/utils/missing-value.js +60 -0
  66. package/dist/utils/missing-value.js.map +1 -0
  67. package/package.json +3 -3
  68. package/src/components/ChartJSRenderer.tsx +159 -6
  69. package/src/components/DegradedFallback.tsx +24 -2
  70. package/src/components/MissingValue.tsx +61 -0
  71. package/src/components/UIResourceRenderer.tsx +42 -9
  72. package/src/components/chart-data-table.ts +50 -6
  73. package/src/components/chart-missing-plugin.ts +334 -0
  74. package/src/context/MCPUIStringsContext.tsx +76 -0
  75. package/src/services/component-registry.ts +10 -2
  76. package/src/services/validation.ts +44 -9
  77. package/src/types/index.ts +13 -1
  78. package/src/utils/degraded-projections.ts +44 -4
  79. 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";
@@ -39,7 +41,7 @@ import { marked } from "marked";
39
41
  import { useMCPUIMath } from "../context/MCPUIMathContext.js";
40
42
  import { parseMathMarkdown } from "../utils/math-markdown.js";
41
43
  import { formatMCPUIString } from "../utils/format-string.js";
42
- 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>`);
43
45
  function CopyButton(props) {
44
46
  const strings = useMCPUIStrings();
45
47
  const [copied, setCopied] = createSignal(false);
@@ -194,7 +196,8 @@ function ChartRenderer(props) {
194
196
  return strings.chartQuickchartCaption;
195
197
  }
196
198
  }, () => chartToDegradedTable(params() ?? {}, {
197
- series: strings.degradedSeries
199
+ series: strings.degradedSeries,
200
+ withUnit: strings.chartLabelWithUnit
198
201
  }))));
199
202
  return _el$7;
200
203
  }
@@ -375,8 +378,7 @@ function renderCellValue(value, citationCtx, mathRenderer) {
375
378
  }
376
379
  }
377
380
  let strValue = String(value);
378
- strValue = strValue.replace(/\s*[–-]\s*undefined\s*$/gi, "");
379
- strValue = strValue.replace(/^undefined\s*[–-]\s*/gi, "");
381
+ strValue = stripUndefinedDebris(strValue);
380
382
  if (strValue.trim().toLowerCase() === "undefined") {
381
383
  return "-";
382
384
  }
@@ -447,12 +449,14 @@ function TableRenderer(props) {
447
449
  const dir = sortDir();
448
450
  if (!key || !dir) return r;
449
451
  const col = columns().find((c) => c.key === key);
450
- 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";
451
454
  return [...r].sort((a, b) => {
452
455
  const va = a[key], vb = b[key];
453
- if (va == null && vb == null) return 0;
454
- if (va == null) return 1;
455
- 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;
456
460
  let cmp;
457
461
  if (isNum) {
458
462
  cmp = (Number(va) || 0) - (Number(vb) || 0);
@@ -488,7 +492,7 @@ function TableRenderer(props) {
488
492
  const cols = columns();
489
493
  return sortedRows().filter((row) => cols.some((col) => {
490
494
  const val = row[col.key];
491
- if (val == null) return false;
495
+ if (isMissingCellValue(val)) return false;
492
496
  return normalize(String(val)).includes(q);
493
497
  }));
494
498
  });
@@ -656,6 +660,10 @@ ${dataRows}`;
656
660
  }
657
661
  };
658
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
+ });
659
667
  const StandardTableBody = () => (() => {
660
668
  var _el$25 = getNextElement(_tmpl$1);
661
669
  insert(_el$25, createComponent(For, {
@@ -670,8 +678,18 @@ ${dataRows}`;
670
678
  },
671
679
  children: (column) => (() => {
672
680
  var _el$27 = getNextElement(_tmpl$11);
673
- insert(_el$27, createComponent(SafeHtml, {
674
- html: () => highlightQuery(renderCellValue(row[column.key], citationCtx, mathRenderer()), 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
+ }
675
693
  }));
676
694
  return _el$27;
677
695
  })()
@@ -705,8 +723,18 @@ ${dataRows}`;
705
723
  },
706
724
  children: (column) => (() => {
707
725
  var _el$30 = getNextElement(_tmpl$11);
708
- insert(_el$30, createComponent(SafeHtml, {
709
- html: () => highlightQuery(renderCellValue(row[column.key], citationCtx, mathRenderer()), 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
+ }
710
738
  }));
711
739
  return _el$30;
712
740
  })()
@@ -742,7 +770,7 @@ ${dataRows}`;
742
770
  },
743
771
  onExpandedChange: setSelfExpanded,
744
772
  get children() {
745
- 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);
746
774
  insert(_el$31, createComponent(Show, {
747
775
  when: exportable,
748
776
  get fallback() {
@@ -817,7 +845,7 @@ ${dataRows}`;
817
845
  runHydrationEvents();
818
846
  return _el$32;
819
847
  }
820
- }), _el$93, _co$19);
848
+ }), _el$95, _co$20);
821
849
  insert(_el$39, createComponent(Show, {
822
850
  get when() {
823
851
  return tableParams.title;
@@ -894,10 +922,10 @@ ${dataRows}`;
894
922
  return tableParams.columns;
895
923
  },
896
924
  children: (column) => (() => {
897
- 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;
898
- addEventListener(_el$94, "click", () => handleSort(column.key));
899
- insert(_el$95, () => column.label, _el$98, _co$20);
900
- 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));
901
929
  effect((_p$) => {
902
930
  var _v$20 = column.width ? {
903
931
  width: column.width
@@ -907,16 +935,16 @@ ${dataRows}`;
907
935
  "opacity-30": sortKey() !== column.key,
908
936
  "opacity-100 text-blue-600 dark:text-blue-400": sortKey() === column.key
909
937
  };
910
- _p$.e = style(_el$94, _v$20, _p$.e);
911
- _v$21 !== _p$.t && setAttribute(_el$94, "title", _p$.t = _v$21);
912
- _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);
913
941
  return _p$;
914
942
  }, {
915
943
  e: void 0,
916
944
  t: void 0,
917
945
  a: void 0
918
946
  });
919
- return _el$94;
947
+ return _el$96;
920
948
  })()
921
949
  }));
922
950
  insert(_el$54, createComponent(Show, {
@@ -930,6 +958,16 @@ ${dataRows}`;
930
958
  return createComponent(VirtualizedTableBody, {});
931
959
  }
932
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);
933
971
  insert(_el$39, createComponent(Show, {
934
972
  get when() {
935
973
  return tableParams.pagination;
@@ -943,7 +981,7 @@ ${dataRows}`;
943
981
  }));
944
982
  return _el$59;
945
983
  }
946
- }), _el$89, _co$17);
984
+ }), _el$91, _co$18);
947
985
  insert(_el$39, createComponent(Show, {
948
986
  get when() {
949
987
  return needsClientPagination();
@@ -970,10 +1008,10 @@ ${dataRows}`;
970
1008
  return pageSizeOptions();
971
1009
  },
972
1010
  children: (opt) => (() => {
973
- var _el$99 = getNextElement(_tmpl$26);
974
- insert(_el$99, () => opt.label);
975
- effect(() => setProperty(_el$99, "value", opt.value));
976
- 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;
977
1015
  })()
978
1016
  }));
979
1017
  effect(() => setAttribute(_el$80, "aria-label", strings.paginationPageSize));
@@ -1002,7 +1040,7 @@ ${dataRows}`;
1002
1040
  runHydrationEvents();
1003
1041
  return _el$61;
1004
1042
  }
1005
- }), _el$91, _co$18);
1043
+ }), _el$93, _co$19);
1006
1044
  effect((_p$) => {
1007
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 = (
1008
1046
  // v6.1.0 — when expanded, the scroll container fills the
@@ -1063,53 +1101,53 @@ function MetricRenderer(props) {
1063
1101
  return `${title}: ${value}${unit ? " " + unit : ""}`;
1064
1102
  };
1065
1103
  return (() => {
1066
- 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);
1067
- 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, {
1068
1106
  getText: getMetricText,
1069
1107
  get title() {
1070
1108
  return strings.copyMetric;
1071
1109
  },
1072
1110
  position: "top-right"
1073
- }), _el$123, _co$26);
1074
- insert(_el$103, () => metricParams.title);
1075
- insert(_el$105, () => metricParams.value);
1076
- 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, {
1077
1115
  get when() {
1078
1116
  return metricParams.unit;
1079
1117
  },
1080
1118
  get children() {
1081
- var _el$106 = getNextElement(_tmpl$27);
1082
- insert(_el$106, () => metricParams.unit);
1083
- return _el$106;
1119
+ var _el$108 = getNextElement(_tmpl$27);
1120
+ insert(_el$108, () => metricParams.unit);
1121
+ return _el$108;
1084
1122
  }
1085
- }), _el$108, _co$21);
1086
- insert(_el$101, createComponent(Show, {
1123
+ }), _el$110, _co$22);
1124
+ insert(_el$103, createComponent(Show, {
1087
1125
  get when() {
1088
1126
  return metricParams.trend;
1089
1127
  },
1090
1128
  get children() {
1091
- 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);
1092
- _el$116.nextSibling;
1093
- 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, (() => {
1094
1132
  var _c$ = memo(() => metricParams.trend.direction === "up");
1095
1133
  return () => _c$() ? "�" : metricParams.trend.direction === "down" ? "�" : "�";
1096
- })(), _el$114, _co$22);
1097
- insert(_el$110, () => Math.abs(metricParams.trend.value), _el$116, _co$23);
1098
- 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"}`));
1099
- 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;
1100
1138
  }
1101
- }), _el$119, _co$24);
1102
- insert(_el$101, createComponent(Show, {
1139
+ }), _el$121, _co$25);
1140
+ insert(_el$103, createComponent(Show, {
1103
1141
  get when() {
1104
1142
  return metricParams.subtitle;
1105
1143
  },
1106
1144
  get children() {
1107
- var _el$117 = getNextElement(_tmpl$29);
1108
- insert(_el$117, () => metricParams.subtitle);
1109
- return _el$117;
1145
+ var _el$119 = getNextElement(_tmpl$29);
1146
+ insert(_el$119, () => metricParams.subtitle);
1147
+ return _el$119;
1110
1148
  }
1111
- }), _el$121, _co$25);
1112
- return _el$100;
1149
+ }), _el$123, _co$26);
1150
+ return _el$102;
1113
1151
  })();
1114
1152
  }
1115
1153
  function extractImageFromMarkdown(content, fallbackAlt) {
@@ -1169,40 +1207,40 @@ function TextRenderer(props) {
1169
1207
  },
1170
1208
  get fallback() {
1171
1209
  return (() => {
1172
- 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);
1173
- 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, {
1174
1212
  getText: getTextContent,
1175
1213
  get title() {
1176
1214
  return strings.copyText;
1177
1215
  },
1178
1216
  position: "top-right"
1179
- }), _el$126, _co$27);
1180
- insert(_el$124, createComponent(SafeHtml, {
1217
+ }), _el$128, _co$28);
1218
+ insert(_el$126, createComponent(SafeHtml, {
1181
1219
  get ["class"]() {
1182
1220
  return `prose prose-sm dark:prose-invert max-w-none ${textParams.className || ""}`;
1183
1221
  },
1184
1222
  html: htmlContent
1185
- }), _el$128, _co$28);
1186
- return _el$124;
1223
+ }), _el$130, _co$29);
1224
+ return _el$126;
1187
1225
  })();
1188
1226
  },
1189
1227
  children: (data) => {
1190
1228
  const image = () => (() => {
1191
- var _el$129 = getNextElement(_tmpl$32);
1229
+ var _el$131 = getNextElement(_tmpl$32);
1192
1230
  effect((_p$) => {
1193
1231
  var _v$23 = data().imageUrl, _v$24 = data().alt;
1194
- _v$23 !== _p$.e && setAttribute(_el$129, "src", _p$.e = _v$23);
1195
- _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);
1196
1234
  return _p$;
1197
1235
  }, {
1198
1236
  e: void 0,
1199
1237
  t: void 0
1200
1238
  });
1201
- return _el$129;
1239
+ return _el$131;
1202
1240
  })();
1203
1241
  return (() => {
1204
- var _el$130 = getNextElement(_tmpl$33), _el$131 = _el$130.firstChild, _el$132 = _el$131.nextSibling, _el$133 = _el$132.firstChild;
1205
- 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, {
1206
1244
  get when() {
1207
1245
  return data().linkUrl;
1208
1246
  },
@@ -1210,14 +1248,14 @@ function TextRenderer(props) {
1210
1248
  return image();
1211
1249
  },
1212
1250
  children: (href) => (() => {
1213
- var _el$134 = getNextElement(_tmpl$34);
1214
- insert(_el$134, image);
1215
- effect(() => setAttribute(_el$134, "href", href()));
1216
- 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;
1217
1255
  })()
1218
1256
  }));
1219
- insert(_el$133, () => data().credit);
1220
- return _el$130;
1257
+ insert(_el$135, () => data().credit);
1258
+ return _el$132;
1221
1259
  })();
1222
1260
  }
1223
1261
  });
@@ -1230,34 +1268,34 @@ function IframeRenderer(props) {
1230
1268
  customTrustedDomains: config.customTrustedIframeDomains
1231
1269
  });
1232
1270
  return (() => {
1233
- 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);
1234
- 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, {
1235
1273
  get when() {
1236
1274
  return params.title;
1237
1275
  },
1238
1276
  get children() {
1239
- var _el$136 = getNextElement(_tmpl$35), _el$137 = _el$136.firstChild;
1240
- insert(_el$137, () => params.title);
1241
- 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;
1242
1280
  }
1243
- }), _el$140, _co$29);
1244
- insert(_el$135, createComponent(IframeFallbackLink, {
1281
+ }), _el$142, _co$30);
1282
+ insert(_el$137, createComponent(IframeFallbackLink, {
1245
1283
  get url() {
1246
1284
  return params.url;
1247
1285
  },
1248
1286
  "class": "border-t border-gray-200 dark:border-gray-700"
1249
- }), _el$142, _co$30);
1287
+ }), _el$144, _co$31);
1250
1288
  effect((_p$) => {
1251
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, {
1252
1290
  // This iframe's sandbox never carries `allow-same-origin` for an
1253
1291
  // untrusted host, so it already runs without cookies.
1254
1292
  sandboxedWithoutSameOrigin: !isTrustedIframeDomain(params.url, trustOptions())
1255
1293
  }) || void 0;
1256
- _v$25 !== _p$.e && setAttribute(_el$138, "src", _p$.e = _v$25);
1257
- _v$26 !== _p$.t && setAttribute(_el$138, "title", _p$.t = _v$26);
1258
- _p$.a = style(_el$138, _v$27, _p$.a);
1259
- _v$28 !== _p$.o && setAttribute(_el$138, "sandbox", _p$.o = _v$28);
1260
- _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);
1261
1299
  return _p$;
1262
1300
  }, {
1263
1301
  e: void 0,
@@ -1266,35 +1304,35 @@ function IframeRenderer(props) {
1266
1304
  o: void 0,
1267
1305
  i: void 0
1268
1306
  });
1269
- return _el$135;
1307
+ return _el$137;
1270
1308
  })();
1271
1309
  }
1272
1310
  function ImageRenderer(props) {
1273
1311
  const strings = useMCPUIStrings();
1274
1312
  const params = props.component.params;
1275
1313
  return (() => {
1276
- 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);
1277
- 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, {
1278
1316
  get when() {
1279
1317
  return params.caption;
1280
1318
  },
1281
1319
  get children() {
1282
- var _el$147 = getNextElement(_tmpl$37), _el$148 = _el$147.firstChild;
1283
- insert(_el$148, () => params.caption);
1284
- 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;
1285
1323
  }
1286
- }), _el$150, _co$31);
1324
+ }), _el$152, _co$32);
1287
1325
  effect((_p$) => {
1288
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, {
1289
1327
  alt: params.alt || strings.imageAltFallback
1290
1328
  }), _v$33 = safeUrl(params.url, {
1291
1329
  allowDataImage: true
1292
1330
  }), _v$34 = params.alt || strings.imageAlt;
1293
- _v$30 !== _p$.e && className(_el$143, _p$.e = _v$30);
1294
- _v$31 !== _p$.t && setAttribute(_el$145, "href", _p$.t = _v$31);
1295
- _v$32 !== _p$.a && setAttribute(_el$145, "aria-label", _p$.a = _v$32);
1296
- _v$33 !== _p$.o && setAttribute(_el$146, "src", _p$.o = _v$33);
1297
- _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);
1298
1336
  return _p$;
1299
1337
  }, {
1300
1338
  e: void 0,
@@ -1303,34 +1341,34 @@ function ImageRenderer(props) {
1303
1341
  o: void 0,
1304
1342
  i: void 0
1305
1343
  });
1306
- return _el$143;
1344
+ return _el$145;
1307
1345
  })();
1308
1346
  }
1309
1347
  function LinkRenderer(props) {
1310
1348
  const strings = useMCPUIStrings();
1311
1349
  const params = props.component.params;
1312
1350
  return (() => {
1313
- 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);
1314
- _el$151.$$click = (e) => e.stopPropagation();
1315
- insert(_el$154, () => params.label || params.url);
1316
- 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, {
1317
1355
  get when() {
1318
1356
  return params.description;
1319
1357
  },
1320
1358
  get children() {
1321
- var _el$155 = getNextElement(_tmpl$39);
1322
- insert(_el$155, () => params.description);
1323
- return _el$155;
1359
+ var _el$157 = getNextElement(_tmpl$39);
1360
+ insert(_el$157, () => params.description);
1361
+ return _el$157;
1324
1362
  }
1325
- }), _el$157, _co$32);
1363
+ }), _el$159, _co$33);
1326
1364
  effect((_p$) => {
1327
1365
  var _v$35 = safeUrl(params.url), _v$36 = formatMCPUIString(strings.linkOpensInNewTab, {
1328
1366
  label: params.label || strings.linkLabel,
1329
1367
  description: params.description || params.url
1330
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 || ""}`;
1331
- _v$35 !== _p$.e && setAttribute(_el$151, "href", _p$.e = _v$35);
1332
- _v$36 !== _p$.t && setAttribute(_el$151, "aria-label", _p$.t = _v$36);
1333
- _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);
1334
1372
  return _p$;
1335
1373
  }, {
1336
1374
  e: void 0,
@@ -1338,7 +1376,7 @@ function LinkRenderer(props) {
1338
1376
  a: void 0
1339
1377
  });
1340
1378
  runHydrationEvents();
1341
- return _el$151;
1379
+ return _el$153;
1342
1380
  })();
1343
1381
  }
1344
1382
  function ComponentRenderer(props) {
@@ -1417,20 +1455,20 @@ function ComponentRenderer(props) {
1417
1455
  }
1418
1456
  if (mode === "inline-warn") {
1419
1457
  return (() => {
1420
- var _el$158 = getNextElement(_tmpl$41), _el$159 = _el$158.firstChild, _el$160 = _el$159.nextSibling;
1421
- setAttribute(_el$158, "title", firstError);
1422
- 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, {
1423
1461
  type: props.component.type
1424
1462
  }));
1425
- effect(() => setAttribute(_el$158, "aria-label", strings.validationWarning));
1426
- return _el$158;
1463
+ effect(() => setAttribute(_el$160, "aria-label", strings.validationWarning));
1464
+ return _el$160;
1427
1465
  })();
1428
1466
  }
1429
1467
  return (() => {
1430
- var _el$161 = getNextElement(_tmpl$42), _el$162 = _el$161.firstChild, _el$163 = _el$162.nextSibling;
1431
- insert(_el$162, () => strings.validationError);
1432
- insert(_el$163, firstError);
1433
- 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;
1434
1472
  })();
1435
1473
  }
1436
1474
  return createComponent(GenerativeUIErrorBoundary, {
@@ -1724,10 +1762,10 @@ function ComponentRenderer(props) {
1724
1762
  function UnsupportedComponentFallback(props) {
1725
1763
  const strings = useMCPUIStrings();
1726
1764
  return (() => {
1727
- 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;
1728
- insert(_el$164, () => strings.unsupportedComponentType, _el$168, _co$33);
1729
- insert(_el$166, () => props.component.type);
1730
- 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;
1731
1769
  })();
1732
1770
  }
1733
1771
  function ActionRenderer(props) {
@@ -1767,27 +1805,27 @@ function ActionRenderer(props) {
1767
1805
  const isDisabled = () => params.disabled || isExecutable() && isExecuting();
1768
1806
  if (params.type === "link" || params.action === "link") {
1769
1807
  return (() => {
1770
- 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);
1771
- _el$169.$$click = handleClick;
1772
- 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, {
1773
1811
  get when() {
1774
1812
  return params.icon;
1775
1813
  },
1776
1814
  get children() {
1777
- var _el$170 = getNextElement(_tmpl$44);
1778
- insert(_el$170, () => params.icon);
1779
- return _el$170;
1815
+ var _el$172 = getNextElement(_tmpl$44);
1816
+ insert(_el$172, () => params.icon);
1817
+ return _el$172;
1780
1818
  }
1781
- }), _el$172, _co$34);
1782
- insert(_el$169, () => params.label, _el$174, _co$35);
1819
+ }), _el$174, _co$35);
1820
+ insert(_el$171, () => params.label, _el$176, _co$36);
1783
1821
  effect((_p$) => {
1784
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
1785
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"}
1786
1824
  ${params.className || ""}`;
1787
- _v$38 !== _p$.e && setAttribute(_el$169, "href", _p$.e = _v$38);
1788
- _v$39 !== _p$.t && setAttribute(_el$169, "target", _p$.t = _v$39);
1789
- _v$40 !== _p$.a && setAttribute(_el$169, "aria-label", _p$.a = _v$40);
1790
- _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);
1791
1829
  return _p$;
1792
1830
  }, {
1793
1831
  e: void 0,
@@ -1796,41 +1834,41 @@ function ActionRenderer(props) {
1796
1834
  o: void 0
1797
1835
  });
1798
1836
  runHydrationEvents();
1799
- return _el$169;
1837
+ return _el$171;
1800
1838
  })();
1801
1839
  }
1802
1840
  return (() => {
1803
- 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);
1804
- _el$175.$$click = handleClick;
1805
- 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, {
1806
1844
  get when() {
1807
1845
  return memo(() => !!isExecuting())() && isExecutable();
1808
1846
  },
1809
1847
  get children() {
1810
1848
  return getNextElement(_tmpl$46);
1811
1849
  }
1812
- }), _el$179, _co$36);
1813
- insert(_el$175, createComponent(Show, {
1850
+ }), _el$181, _co$37);
1851
+ insert(_el$177, createComponent(Show, {
1814
1852
  get when() {
1815
1853
  return memo(() => !!params.icon)() && !(isExecuting() && isExecutable());
1816
1854
  },
1817
1855
  get children() {
1818
- var _el$177 = getNextElement(_tmpl$44);
1819
- insert(_el$177, () => params.icon);
1820
- return _el$177;
1856
+ var _el$179 = getNextElement(_tmpl$44);
1857
+ insert(_el$179, () => params.icon);
1858
+ return _el$179;
1821
1859
  }
1822
- }), _el$181, _co$37);
1823
- insert(_el$175, () => params.label, _el$183, _co$38);
1860
+ }), _el$183, _co$38);
1861
+ insert(_el$177, () => params.label, _el$185, _co$39);
1824
1862
  effect((_p$) => {
1825
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
1826
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"}
1827
1865
  ${isDisabled() ? "opacity-50 cursor-not-allowed" : ""}
1828
1866
  ${params.size === "sm" ? "px-3 py-1.5 text-xs" : params.size === "lg" ? "px-6 py-3 text-base" : ""}
1829
1867
  ${params.className || ""}`;
1830
- _v$42 !== _p$.e && setProperty(_el$175, "disabled", _p$.e = _v$42);
1831
- _v$43 !== _p$.t && setAttribute(_el$175, "aria-busy", _p$.t = _v$43);
1832
- _v$44 !== _p$.a && setAttribute(_el$175, "aria-label", _p$.a = _v$44);
1833
- _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);
1834
1872
  return _p$;
1835
1873
  }, {
1836
1874
  e: void 0,
@@ -1839,7 +1877,7 @@ function ActionRenderer(props) {
1839
1877
  o: void 0
1840
1878
  });
1841
1879
  runHydrationEvents();
1842
- return _el$175;
1880
+ return _el$177;
1843
1881
  })();
1844
1882
  }
1845
1883
  function ErrorCardRenderer(props) {
@@ -1853,62 +1891,62 @@ function ErrorCardRenderer(props) {
1853
1891
  });
1854
1892
  };
1855
1893
  return (() => {
1856
- 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);
1857
- 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, {
1858
1896
  getText: getErrorText,
1859
1897
  get title() {
1860
1898
  return strings.copyErrorDetails;
1861
1899
  },
1862
1900
  position: "top-right"
1863
- }), _el$202, _co$42);
1864
- insert(_el$188, () => formatMCPUIString(strings.toolErrorTitle, {
1901
+ }), _el$204, _co$43);
1902
+ insert(_el$190, () => formatMCPUIString(strings.toolErrorTitle, {
1865
1903
  tool: props.error.tool || strings.errorUnknownToolName
1866
1904
  }));
1867
- insert(_el$189, () => props.error.message || strings.errorToolExecution);
1868
- insert(_el$187, createComponent(Show, {
1905
+ insert(_el$191, () => props.error.message || strings.errorToolExecution);
1906
+ insert(_el$189, createComponent(Show, {
1869
1907
  get when() {
1870
1908
  return props.error.type;
1871
1909
  },
1872
1910
  get children() {
1873
- var _el$190 = getNextElement(_tmpl$48);
1874
- insert(_el$190, () => formatMCPUIString(strings.errorTypeLabel, {
1911
+ var _el$192 = getNextElement(_tmpl$48);
1912
+ insert(_el$192, () => formatMCPUIString(strings.errorTypeLabel, {
1875
1913
  type: props.error.type
1876
1914
  }));
1877
- return _el$190;
1915
+ return _el$192;
1878
1916
  }
1879
- }), _el$196, _co$39);
1880
- insert(_el$187, createComponent(Show, {
1917
+ }), _el$198, _co$40);
1918
+ insert(_el$189, createComponent(Show, {
1881
1919
  get when() {
1882
1920
  var _a;
1883
1921
  return (_a = props.error.suggestions) == null ? void 0 : _a.length;
1884
1922
  },
1885
1923
  get children() {
1886
- var _el$191 = getNextElement(_tmpl$49), _el$192 = _el$191.firstChild, _el$193 = _el$192.nextSibling;
1887
- insert(_el$192, () => strings.errorSuggestions);
1888
- 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, {
1889
1927
  get each() {
1890
1928
  return props.error.suggestions;
1891
1929
  },
1892
1930
  children: (suggestion) => (() => {
1893
- var _el$203 = getNextElement(_tmpl$52);
1894
- insert(_el$203, suggestion);
1895
- return _el$203;
1931
+ var _el$205 = getNextElement(_tmpl$52);
1932
+ insert(_el$205, suggestion);
1933
+ return _el$205;
1896
1934
  })()
1897
1935
  }));
1898
- return _el$191;
1936
+ return _el$193;
1899
1937
  }
1900
- }), _el$198, _co$40);
1901
- insert(_el$187, createComponent(Show, {
1938
+ }), _el$200, _co$41);
1939
+ insert(_el$189, createComponent(Show, {
1902
1940
  get when() {
1903
1941
  return memo(() => !!mounted())() && props.error.timestamp;
1904
1942
  },
1905
1943
  get children() {
1906
- var _el$194 = getNextElement(_tmpl$50);
1907
- insert(_el$194, () => new Date(props.error.timestamp).toLocaleString(strings.locale));
1908
- 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;
1909
1947
  }
1910
- }), _el$200, _co$41);
1911
- return _el$184;
1948
+ }), _el$202, _co$42);
1949
+ return _el$186;
1912
1950
  })();
1913
1951
  }
1914
1952
  function isErrorResponse(content) {
@@ -1932,23 +1970,23 @@ function UIResourceHtmlRenderer(props) {
1932
1970
  return ((_a = props.resource.metadata) == null ? void 0 : _a.title) || ((_b = props.resource.uri) == null ? void 0 : _b.replace("ui://deposium/", "")) || strings.resourceTitle;
1933
1971
  };
1934
1972
  return (() => {
1935
- 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);
1936
- 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, {
1937
1975
  get when() {
1938
1976
  var _a;
1939
1977
  return ((_a = props.resource.metadata) == null ? void 0 : _a.title) || props.resource.uri;
1940
1978
  },
1941
1979
  get children() {
1942
- var _el$205 = getNextElement(_tmpl$53), _el$206 = _el$205.firstChild;
1943
- insert(_el$206, resourceTitle);
1944
- return _el$205;
1980
+ var _el$207 = getNextElement(_tmpl$53), _el$208 = _el$207.firstChild;
1981
+ insert(_el$208, resourceTitle);
1982
+ return _el$207;
1945
1983
  }
1946
- }), _el$208, _co$43);
1947
- insert(_el$204, createComponent(SafeHtml, {
1984
+ }), _el$210, _co$44);
1985
+ insert(_el$206, createComponent(SafeHtml, {
1948
1986
  "class": "p-4 prose prose-sm dark:prose-invert max-w-none",
1949
1987
  html: htmlContent
1950
- }), _el$210, _co$44);
1951
- return _el$204;
1988
+ }), _el$212, _co$45);
1989
+ return _el$206;
1952
1990
  })();
1953
1991
  }
1954
1992
  const UIResourceRenderer = (props) => {
@@ -2054,8 +2092,8 @@ const UIResourceRenderer = (props) => {
2054
2092
  return createComponent(RenderProvider, {
2055
2093
  renderComponent,
2056
2094
  get children() {
2057
- var _el$211 = getNextElement(_tmpl$55), _el$212 = _el$211.firstChild, _el$213 = _el$212.nextSibling, [_el$214, _co$45] = getNextMarker(_el$213.nextSibling);
2058
- 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({
2059
2097
  get ["class"]() {
2060
2098
  return `w-full ${props.class || ""}`;
2061
2099
  }
@@ -2065,14 +2103,14 @@ const UIResourceRenderer = (props) => {
2065
2103
  "data-mcp-ui-component-id": outerKey()
2066
2104
  }), false, true);
2067
2105
  var _ref$3 = responsiveGrid.ref;
2068
- typeof _ref$3 === "function" ? use(_ref$3, _el$212) : responsiveGrid.ref = _el$212;
2069
- 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, {
2070
2108
  get each() {
2071
2109
  return layout().components;
2072
2110
  },
2073
2111
  children: (component) => (() => {
2074
- var _el$215 = getNextElement(_tmpl$56);
2075
- insert(_el$215, createComponent(ComponentRenderer, {
2112
+ var _el$217 = getNextElement(_tmpl$56);
2113
+ insert(_el$217, createComponent(ComponentRenderer, {
2076
2114
  component,
2077
2115
  get onError() {
2078
2116
  return props.onError;
@@ -2089,17 +2127,17 @@ const UIResourceRenderer = (props) => {
2089
2127
  }));
2090
2128
  effect((_p$) => {
2091
2129
  var _v$48 = getGridStyleString(component), _v$49 = getUiResourceStableKey(component);
2092
- _p$.e = style(_el$215, _v$48, _p$.e);
2093
- _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);
2094
2132
  return _p$;
2095
2133
  }, {
2096
2134
  e: void 0,
2097
2135
  t: void 0
2098
2136
  });
2099
- return _el$215;
2137
+ return _el$217;
2100
2138
  })()
2101
2139
  }));
2102
- insert(_el$211, createComponent(Show, {
2140
+ insert(_el$213, createComponent(Show, {
2103
2141
  get when() {
2104
2142
  return shouldShowAutoFooter();
2105
2143
  },
@@ -2110,18 +2148,18 @@ const UIResourceRenderer = (props) => {
2110
2148
  }
2111
2149
  });
2112
2150
  }
2113
- }), _el$214, _co$45);
2151
+ }), _el$216, _co$46);
2114
2152
  effect((_p$) => {
2115
2153
  var _v$46 = gridContainerStyle(), _v$47 = responsiveGrid.stacked();
2116
- _p$.e = style(_el$212, _v$46, _p$.e);
2117
- _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);
2118
2156
  return _p$;
2119
2157
  }, {
2120
2158
  e: void 0,
2121
2159
  t: void 0
2122
2160
  });
2123
2161
  runHydrationEvents();
2124
- return _el$211;
2162
+ return _el$213;
2125
2163
  }
2126
2164
  });
2127
2165
  };