@seed-ship/mcp-ui-solid 6.20.0 → 6.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +223 -0
- package/README.md +120 -3
- package/dist/components/ChartJSRenderer.cjs +244 -68
- package/dist/components/ChartJSRenderer.cjs.map +1 -1
- package/dist/components/ChartJSRenderer.d.ts +9 -0
- package/dist/components/ChartJSRenderer.d.ts.map +1 -1
- package/dist/components/ChartJSRenderer.js +246 -70
- package/dist/components/ChartJSRenderer.js.map +1 -1
- package/dist/components/ExpandableWrapper.cjs +9 -1
- package/dist/components/ExpandableWrapper.cjs.map +1 -1
- package/dist/components/ExpandableWrapper.d.ts.map +1 -1
- package/dist/components/ExpandableWrapper.js +9 -1
- package/dist/components/ExpandableWrapper.js.map +1 -1
- package/dist/components/IframeFallbackLink.cjs +37 -0
- package/dist/components/IframeFallbackLink.cjs.map +1 -0
- package/dist/components/IframeFallbackLink.d.ts +23 -0
- package/dist/components/IframeFallbackLink.d.ts.map +1 -0
- package/dist/components/IframeFallbackLink.js +37 -0
- package/dist/components/IframeFallbackLink.js.map +1 -0
- package/dist/components/LightboxOverlay.cjs +139 -16
- package/dist/components/LightboxOverlay.cjs.map +1 -1
- package/dist/components/LightboxOverlay.d.ts +6 -0
- package/dist/components/LightboxOverlay.d.ts.map +1 -1
- package/dist/components/LightboxOverlay.js +141 -18
- package/dist/components/LightboxOverlay.js.map +1 -1
- package/dist/components/UIResourceRenderer.cjs +150 -127
- package/dist/components/UIResourceRenderer.cjs.map +1 -1
- package/dist/components/UIResourceRenderer.d.ts.map +1 -1
- package/dist/components/UIResourceRenderer.js +151 -128
- package/dist/components/UIResourceRenderer.js.map +1 -1
- package/dist/components/VideoRenderer.cjs +45 -19
- package/dist/components/VideoRenderer.cjs.map +1 -1
- package/dist/components/VideoRenderer.d.ts.map +1 -1
- package/dist/components/VideoRenderer.js +45 -19
- package/dist/components/VideoRenderer.js.map +1 -1
- package/dist/context/MCPUIConfigContext.cjs +30 -0
- package/dist/context/MCPUIConfigContext.cjs.map +1 -0
- package/dist/context/MCPUIConfigContext.d.ts +173 -0
- package/dist/context/MCPUIConfigContext.d.ts.map +1 -0
- package/dist/context/MCPUIConfigContext.js +30 -0
- package/dist/context/MCPUIConfigContext.js.map +1 -0
- package/dist/context/MCPUIStringsContext.cjs +8 -1
- package/dist/context/MCPUIStringsContext.cjs.map +1 -1
- package/dist/context/MCPUIStringsContext.d.ts +29 -0
- package/dist/context/MCPUIStringsContext.d.ts.map +1 -1
- package/dist/context/MCPUIStringsContext.js +8 -1
- package/dist/context/MCPUIStringsContext.js.map +1 -1
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks.cjs +2 -0
- package/dist/hooks.cjs.map +1 -1
- package/dist/hooks.js +2 -0
- package/dist/hooks.js.map +1 -1
- package/dist/index.cjs +12 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -2
- package/dist/index.js.map +1 -1
- package/dist/services/index.d.ts +1 -1
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/validation.cjs +11 -10
- package/dist/services/validation.cjs.map +1 -1
- package/dist/services/validation.d.ts +20 -0
- package/dist/services/validation.d.ts.map +1 -1
- package/dist/services/validation.js +11 -10
- package/dist/services/validation.js.map +1 -1
- package/dist/utils/iframe-coep.cjs +30 -0
- package/dist/utils/iframe-coep.cjs.map +1 -0
- package/dist/utils/iframe-coep.d.ts +53 -0
- package/dist/utils/iframe-coep.d.ts.map +1 -0
- package/dist/utils/iframe-coep.js +30 -0
- package/dist/utils/iframe-coep.js.map +1 -0
- package/dist/utils/pan-zoom.cjs +312 -0
- package/dist/utils/pan-zoom.cjs.map +1 -0
- package/dist/utils/pan-zoom.d.ts +235 -0
- package/dist/utils/pan-zoom.d.ts.map +1 -0
- package/dist/utils/pan-zoom.js +312 -0
- package/dist/utils/pan-zoom.js.map +1 -0
- package/dist/validation.cjs +2 -0
- package/dist/validation.cjs.map +1 -1
- package/dist/validation.d.cts +1 -1
- package/dist/validation.d.ts +1 -1
- package/dist/validation.d.ts.map +1 -1
- package/dist/validation.js +3 -1
- package/package.json +5 -1
- package/src/components/ChartJSRenderer.tsx +396 -1
- package/src/components/ExpandableWrapper.tsx +26 -0
- package/src/components/IframeFallbackLink.tsx +57 -0
- package/src/components/LightboxOverlay.tsx +280 -4
- package/src/components/UIResourceRenderer.tsx +31 -4
- package/src/components/VideoRenderer.tsx +20 -0
- package/src/context/MCPUIConfigContext.tsx +202 -0
- package/src/context/MCPUIStringsContext.tsx +40 -0
- package/src/hooks/index.ts +13 -0
- package/src/index.ts +31 -0
- package/src/services/index.ts +1 -0
- package/src/services/validation.ts +38 -16
- package/src/solid-jsx-attrs.d.ts +24 -0
- package/src/utils/iframe-coep.ts +81 -0
- package/src/utils/pan-zoom.ts +779 -0
- package/src/validation.ts +4 -0
|
@@ -36,6 +36,9 @@ const stableKey = require("../utils/stable-key.cjs");
|
|
|
36
36
|
const duplicateMountRegistry = require("../utils/duplicate-mount-registry.cjs");
|
|
37
37
|
const MCPUITelemetryContext = require("../context/MCPUITelemetryContext.cjs");
|
|
38
38
|
const MCPUIStringsContext = require("../context/MCPUIStringsContext.cjs");
|
|
39
|
+
const MCPUIConfigContext = require("../context/MCPUIConfigContext.cjs");
|
|
40
|
+
const iframeCoep = require("../utils/iframe-coep.cjs");
|
|
41
|
+
const IframeFallbackLink = require("./IframeFallbackLink.cjs");
|
|
39
42
|
const GridRenderer = require("./GridRenderer.cjs");
|
|
40
43
|
const FooterRenderer = require("./FooterRenderer.cjs");
|
|
41
44
|
const CarouselRenderer = require("./CarouselRenderer.cjs");
|
|
@@ -58,7 +61,7 @@ const useAction = require("../hooks/useAction.cjs");
|
|
|
58
61
|
const createResponsiveGrid = require("../hooks/createResponsiveGrid.cjs");
|
|
59
62
|
const marked = require("marked");
|
|
60
63
|
const formatString = require("../utils/format-string.cjs");
|
|
61
|
-
var _tmpl$ = /* @__PURE__ */ web.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__ */ web.template(`<button data-mcp-ui-action=copy type=button>`), _tmpl$3 = /* @__PURE__ */ web.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__ */ web.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__ */ web.template(`<div class=p-3>`), _tmpl$6 = /* @__PURE__ */ web.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__ */ web.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__ */ web.template(`<h3 class="text-sm font-semibold text-gray-900 dark:text-white mb-3">`), _tmpl$9 = /* @__PURE__ */ web.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__ */ web.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__ */ web.template(`<tbody class="bg-white dark:bg-gray-800 divide-y divide-gray-200 dark:divide-gray-700">`), _tmpl$10 = /* @__PURE__ */ web.template(`<tr>`), _tmpl$11 = /* @__PURE__ */ web.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__ */ web.template(`<tbody class="bg-white dark:bg-gray-800 relative">`), _tmpl$13 = /* @__PURE__ */ web.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__ */ web.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__ */ web.template(`<span class="ml-2 text-xs font-normal text-gray-400">`), _tmpl$16 = /* @__PURE__ */ web.template(`<h3 class="text-sm font-semibold text-gray-900 dark:text-white mb-3 flex-shrink-0"><!$><!/><!$><!/>`), _tmpl$17 = /* @__PURE__ */ web.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">×`), _tmpl$18 = /* @__PURE__ */ web.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__ */ web.template(`<p class="text-xs text-gray-500 dark:text-gray-400 mb-2">`), _tmpl$20 = /* @__PURE__ */ web.template(`<div class="mt-3 flex items-center justify-between text-xs text-gray-500 dark:text-gray-400"><span>`), _tmpl$21 = /* @__PURE__ */ web.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__ */ web.template(`<span class=text-gray-400>`), _tmpl$23 = /* @__PURE__ */ web.template(`<div class="mt-3 flex items-center justify-between text-xs text-gray-500 dark:text-gray-400"><span><!$><!/>–<!$><!/> / <!$><!/></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>◀</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>▶</span></button><!$><!/>`), _tmpl$24 = /* @__PURE__ */ web.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__ */ web.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__ */ web.template(`<option>`), _tmpl$27 = /* @__PURE__ */ web.template(`<span class="ml-2 text-sm font-medium text-gray-500 dark:text-gray-400">`), _tmpl$28 = /* @__PURE__ */ web.template(`<div class="mt-3 flex items-center"><span><!$><!/> <!$><!/>%`), _tmpl$29 = /* @__PURE__ */ web.template(`<p class="mt-2 text-xs text-gray-500 dark:text-gray-400">`), _tmpl$30 = /* @__PURE__ */ web.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__ */ web.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__ */ web.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__ */ web.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__ */ web.template(`<a target=_blank rel="noopener noreferrer"class=cursor-zoom-in>`), _tmpl$35 = /* @__PURE__ */ web.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__ */ web.template(`<div class="w-full h-full bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700 overflow-hidden flex flex-col"><!$><!/><iframe class="w-full border-0 flex-1"loading=lazy>`, true, false, false), _tmpl$37 = /* @__PURE__ */ web.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__ */ web.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__ */ web.template(`<p class="text-xs text-gray-500 dark:text-gray-400 truncate">`), _tmpl$40 = /* @__PURE__ */ web.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__ */ web.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__ */ web.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__ */ web.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__ */ web.template(`<span aria-hidden=true>`), _tmpl$45 = /* @__PURE__ */ web.template(`<a rel="noopener noreferrer"><!$><!/><!$><!/>`), _tmpl$46 = /* @__PURE__ */ web.template(`<span class="animate-spin h-4 w-4 border-2 border-current border-t-transparent rounded-full"aria-hidden=true>`), _tmpl$47 = /* @__PURE__ */ web.template(`<button type=button><!$><!/><!$><!/><!$><!/>`), _tmpl$48 = /* @__PURE__ */ web.template(`<p class="text-xs text-red-600 dark:text-red-400 mt-1">`), _tmpl$49 = /* @__PURE__ */ web.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__ */ web.template(`<p class="text-xs text-red-500 dark:text-red-500 mt-2">`), _tmpl$51 = /* @__PURE__ */ web.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__ */ web.template(`<li>`), _tmpl$53 = /* @__PURE__ */ web.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__ */ web.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__ */ web.template(`<div><div class="grid gap-4"data-mcp-ui-grid></div><!$><!/>`), _tmpl$56 = /* @__PURE__ */ web.template(`<div class=min-w-0>`);
|
|
64
|
+
var _tmpl$ = /* @__PURE__ */ web.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__ */ web.template(`<button data-mcp-ui-action=copy type=button>`), _tmpl$3 = /* @__PURE__ */ web.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__ */ web.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__ */ web.template(`<div class=p-3>`), _tmpl$6 = /* @__PURE__ */ web.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__ */ web.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__ */ web.template(`<h3 class="text-sm font-semibold text-gray-900 dark:text-white mb-3">`), _tmpl$9 = /* @__PURE__ */ web.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__ */ web.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__ */ web.template(`<tbody class="bg-white dark:bg-gray-800 divide-y divide-gray-200 dark:divide-gray-700">`), _tmpl$10 = /* @__PURE__ */ web.template(`<tr>`), _tmpl$11 = /* @__PURE__ */ web.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__ */ web.template(`<tbody class="bg-white dark:bg-gray-800 relative">`), _tmpl$13 = /* @__PURE__ */ web.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__ */ web.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__ */ web.template(`<span class="ml-2 text-xs font-normal text-gray-400">`), _tmpl$16 = /* @__PURE__ */ web.template(`<h3 class="text-sm font-semibold text-gray-900 dark:text-white mb-3 flex-shrink-0"><!$><!/><!$><!/>`), _tmpl$17 = /* @__PURE__ */ web.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">×`), _tmpl$18 = /* @__PURE__ */ web.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__ */ web.template(`<p class="text-xs text-gray-500 dark:text-gray-400 mb-2">`), _tmpl$20 = /* @__PURE__ */ web.template(`<div class="mt-3 flex items-center justify-between text-xs text-gray-500 dark:text-gray-400"><span>`), _tmpl$21 = /* @__PURE__ */ web.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__ */ web.template(`<span class=text-gray-400>`), _tmpl$23 = /* @__PURE__ */ web.template(`<div class="mt-3 flex items-center justify-between text-xs text-gray-500 dark:text-gray-400"><span><!$><!/>–<!$><!/> / <!$><!/></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>◀</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>▶</span></button><!$><!/>`), _tmpl$24 = /* @__PURE__ */ web.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__ */ web.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__ */ web.template(`<option>`), _tmpl$27 = /* @__PURE__ */ web.template(`<span class="ml-2 text-sm font-medium text-gray-500 dark:text-gray-400">`), _tmpl$28 = /* @__PURE__ */ web.template(`<div class="mt-3 flex items-center"><span><!$><!/> <!$><!/>%`), _tmpl$29 = /* @__PURE__ */ web.template(`<p class="mt-2 text-xs text-gray-500 dark:text-gray-400">`), _tmpl$30 = /* @__PURE__ */ web.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__ */ web.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__ */ web.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__ */ web.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__ */ web.template(`<a target=_blank rel="noopener noreferrer"class=cursor-zoom-in>`), _tmpl$35 = /* @__PURE__ */ web.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__ */ web.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__ */ web.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__ */ web.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__ */ web.template(`<p class="text-xs text-gray-500 dark:text-gray-400 truncate">`), _tmpl$40 = /* @__PURE__ */ web.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__ */ web.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__ */ web.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__ */ web.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__ */ web.template(`<span aria-hidden=true>`), _tmpl$45 = /* @__PURE__ */ web.template(`<a rel="noopener noreferrer"><!$><!/><!$><!/>`), _tmpl$46 = /* @__PURE__ */ web.template(`<span class="animate-spin h-4 w-4 border-2 border-current border-t-transparent rounded-full"aria-hidden=true>`), _tmpl$47 = /* @__PURE__ */ web.template(`<button type=button><!$><!/><!$><!/><!$><!/>`), _tmpl$48 = /* @__PURE__ */ web.template(`<p class="text-xs text-red-600 dark:text-red-400 mt-1">`), _tmpl$49 = /* @__PURE__ */ web.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__ */ web.template(`<p class="text-xs text-red-500 dark:text-red-500 mt-2">`), _tmpl$51 = /* @__PURE__ */ web.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__ */ web.template(`<li>`), _tmpl$53 = /* @__PURE__ */ web.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__ */ web.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__ */ web.template(`<div><div class="grid gap-4"data-mcp-ui-grid></div><!$><!/>`), _tmpl$56 = /* @__PURE__ */ web.template(`<div class=min-w-0>`);
|
|
62
65
|
function CopyButton(props) {
|
|
63
66
|
const strings = MCPUIStringsContext.useMCPUIStrings();
|
|
64
67
|
const [copied, setCopied] = solidJs.createSignal(false);
|
|
@@ -1235,9 +1238,13 @@ function TextRenderer(props) {
|
|
|
1235
1238
|
}
|
|
1236
1239
|
function IframeRenderer(props) {
|
|
1237
1240
|
const strings = MCPUIStringsContext.useMCPUIStrings();
|
|
1241
|
+
const config = MCPUIConfigContext.useMCPUIConfig();
|
|
1238
1242
|
const params = props.component.params;
|
|
1243
|
+
const trustOptions = () => ({
|
|
1244
|
+
customTrustedDomains: config.customTrustedIframeDomains
|
|
1245
|
+
});
|
|
1239
1246
|
return (() => {
|
|
1240
|
-
var _el$135 = web.getNextElement(_tmpl$36), _el$139 = _el$135.firstChild, [_el$140, _co$29] = web.getNextMarker(_el$139.nextSibling), _el$138 = _el$140.nextSibling;
|
|
1247
|
+
var _el$135 = web.getNextElement(_tmpl$36), _el$139 = _el$135.firstChild, [_el$140, _co$29] = web.getNextMarker(_el$139.nextSibling), _el$138 = _el$140.nextSibling, _el$141 = _el$138.nextSibling, [_el$142, _co$30] = web.getNextMarker(_el$141.nextSibling);
|
|
1241
1248
|
web.insert(_el$135, web.createComponent(solidJs.Show, {
|
|
1242
1249
|
get when() {
|
|
1243
1250
|
return params.title;
|
|
@@ -1248,18 +1255,30 @@ function IframeRenderer(props) {
|
|
|
1248
1255
|
return _el$136;
|
|
1249
1256
|
}
|
|
1250
1257
|
}), _el$140, _co$29);
|
|
1258
|
+
web.insert(_el$135, web.createComponent(IframeFallbackLink.IframeFallbackLink, {
|
|
1259
|
+
get url() {
|
|
1260
|
+
return params.url;
|
|
1261
|
+
},
|
|
1262
|
+
"class": "border-t border-gray-200 dark:border-gray-700"
|
|
1263
|
+
}), _el$142, _co$30);
|
|
1251
1264
|
web.effect((_p$) => {
|
|
1252
|
-
var _v$25 = params.url, _v$26 = params.title || strings.iframeTitle, _v$27 = `height: ${params.height || "400px"}; min-height: 300px;`, _v$28 = validation.getIframeSandbox(params.url)
|
|
1265
|
+
var _v$25 = params.url, _v$26 = params.title || strings.iframeTitle, _v$27 = `height: ${params.height || "400px"}; min-height: 300px;`, _v$28 = validation.getIframeSandbox(params.url, trustOptions()), _v$29 = iframeCoep.shouldSetCredentialless(params.url, config, {
|
|
1266
|
+
// This iframe's sandbox never carries `allow-same-origin` for an
|
|
1267
|
+
// untrusted host, so it already runs without cookies.
|
|
1268
|
+
sandboxedWithoutSameOrigin: !validation.isTrustedIframeDomain(params.url, trustOptions())
|
|
1269
|
+
}) || void 0;
|
|
1253
1270
|
_v$25 !== _p$.e && web.setAttribute(_el$138, "src", _p$.e = _v$25);
|
|
1254
1271
|
_v$26 !== _p$.t && web.setAttribute(_el$138, "title", _p$.t = _v$26);
|
|
1255
1272
|
_p$.a = web.style(_el$138, _v$27, _p$.a);
|
|
1256
1273
|
_v$28 !== _p$.o && web.setAttribute(_el$138, "sandbox", _p$.o = _v$28);
|
|
1274
|
+
_v$29 !== _p$.i && web.setAttribute(_el$138, "credentialless", _p$.i = _v$29);
|
|
1257
1275
|
return _p$;
|
|
1258
1276
|
}, {
|
|
1259
1277
|
e: void 0,
|
|
1260
1278
|
t: void 0,
|
|
1261
1279
|
a: void 0,
|
|
1262
|
-
o: void 0
|
|
1280
|
+
o: void 0,
|
|
1281
|
+
i: void 0
|
|
1263
1282
|
});
|
|
1264
1283
|
return _el$135;
|
|
1265
1284
|
})();
|
|
@@ -1268,28 +1287,28 @@ function ImageRenderer(props) {
|
|
|
1268
1287
|
const strings = MCPUIStringsContext.useMCPUIStrings();
|
|
1269
1288
|
const params = props.component.params;
|
|
1270
1289
|
return (() => {
|
|
1271
|
-
var _el$
|
|
1272
|
-
web.insert(_el$
|
|
1290
|
+
var _el$143 = web.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] = web.getNextMarker(_el$149.nextSibling);
|
|
1291
|
+
web.insert(_el$143, web.createComponent(solidJs.Show, {
|
|
1273
1292
|
get when() {
|
|
1274
1293
|
return params.caption;
|
|
1275
1294
|
},
|
|
1276
1295
|
get children() {
|
|
1277
|
-
var _el$
|
|
1278
|
-
web.insert(_el$
|
|
1279
|
-
return _el$
|
|
1296
|
+
var _el$147 = web.getNextElement(_tmpl$37), _el$148 = _el$147.firstChild;
|
|
1297
|
+
web.insert(_el$148, () => params.caption);
|
|
1298
|
+
return _el$147;
|
|
1280
1299
|
}
|
|
1281
|
-
}), _el$
|
|
1300
|
+
}), _el$150, _co$31);
|
|
1282
1301
|
web.effect((_p$) => {
|
|
1283
|
-
var _v$
|
|
1302
|
+
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.safeUrl(params.url), _v$32 = formatString.formatMCPUIString(strings.imageViewFullSize, {
|
|
1284
1303
|
alt: params.alt || strings.imageAltFallback
|
|
1285
|
-
}), _v$
|
|
1304
|
+
}), _v$33 = safeUrl.safeUrl(params.url, {
|
|
1286
1305
|
allowDataImage: true
|
|
1287
|
-
}), _v$
|
|
1288
|
-
_v$
|
|
1289
|
-
_v$
|
|
1290
|
-
_v$
|
|
1291
|
-
_v$
|
|
1292
|
-
_v$
|
|
1306
|
+
}), _v$34 = params.alt || strings.imageAlt;
|
|
1307
|
+
_v$30 !== _p$.e && web.className(_el$143, _p$.e = _v$30);
|
|
1308
|
+
_v$31 !== _p$.t && web.setAttribute(_el$145, "href", _p$.t = _v$31);
|
|
1309
|
+
_v$32 !== _p$.a && web.setAttribute(_el$145, "aria-label", _p$.a = _v$32);
|
|
1310
|
+
_v$33 !== _p$.o && web.setAttribute(_el$146, "src", _p$.o = _v$33);
|
|
1311
|
+
_v$34 !== _p$.i && web.setAttribute(_el$146, "alt", _p$.i = _v$34);
|
|
1293
1312
|
return _p$;
|
|
1294
1313
|
}, {
|
|
1295
1314
|
e: void 0,
|
|
@@ -1298,34 +1317,34 @@ function ImageRenderer(props) {
|
|
|
1298
1317
|
o: void 0,
|
|
1299
1318
|
i: void 0
|
|
1300
1319
|
});
|
|
1301
|
-
return _el$
|
|
1320
|
+
return _el$143;
|
|
1302
1321
|
})();
|
|
1303
1322
|
}
|
|
1304
1323
|
function LinkRenderer(props) {
|
|
1305
1324
|
const strings = MCPUIStringsContext.useMCPUIStrings();
|
|
1306
1325
|
const params = props.component.params;
|
|
1307
1326
|
return (() => {
|
|
1308
|
-
var _el$
|
|
1309
|
-
_el$
|
|
1310
|
-
web.insert(_el$
|
|
1311
|
-
web.insert(_el$
|
|
1327
|
+
var _el$151 = web.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] = web.getNextMarker(_el$156.nextSibling);
|
|
1328
|
+
_el$151.$$click = (e) => e.stopPropagation();
|
|
1329
|
+
web.insert(_el$154, () => params.label || params.url);
|
|
1330
|
+
web.insert(_el$153, web.createComponent(solidJs.Show, {
|
|
1312
1331
|
get when() {
|
|
1313
1332
|
return params.description;
|
|
1314
1333
|
},
|
|
1315
1334
|
get children() {
|
|
1316
|
-
var _el$
|
|
1317
|
-
web.insert(_el$
|
|
1318
|
-
return _el$
|
|
1335
|
+
var _el$155 = web.getNextElement(_tmpl$39);
|
|
1336
|
+
web.insert(_el$155, () => params.description);
|
|
1337
|
+
return _el$155;
|
|
1319
1338
|
}
|
|
1320
|
-
}), _el$
|
|
1339
|
+
}), _el$157, _co$32);
|
|
1321
1340
|
web.effect((_p$) => {
|
|
1322
|
-
var _v$
|
|
1341
|
+
var _v$35 = safeUrl.safeUrl(params.url), _v$36 = formatString.formatMCPUIString(strings.linkOpensInNewTab, {
|
|
1323
1342
|
label: params.label || strings.linkLabel,
|
|
1324
1343
|
description: params.description || params.url
|
|
1325
|
-
}), _v$
|
|
1326
|
-
_v$
|
|
1327
|
-
_v$
|
|
1328
|
-
_v$
|
|
1344
|
+
}), _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 || ""}`;
|
|
1345
|
+
_v$35 !== _p$.e && web.setAttribute(_el$151, "href", _p$.e = _v$35);
|
|
1346
|
+
_v$36 !== _p$.t && web.setAttribute(_el$151, "aria-label", _p$.t = _v$36);
|
|
1347
|
+
_v$37 !== _p$.a && web.className(_el$151, _p$.a = _v$37);
|
|
1329
1348
|
return _p$;
|
|
1330
1349
|
}, {
|
|
1331
1350
|
e: void 0,
|
|
@@ -1333,7 +1352,7 @@ function LinkRenderer(props) {
|
|
|
1333
1352
|
a: void 0
|
|
1334
1353
|
});
|
|
1335
1354
|
web.runHydrationEvents();
|
|
1336
|
-
return _el$
|
|
1355
|
+
return _el$151;
|
|
1337
1356
|
})();
|
|
1338
1357
|
}
|
|
1339
1358
|
function ComponentRenderer(props) {
|
|
@@ -1341,6 +1360,7 @@ function ComponentRenderer(props) {
|
|
|
1341
1360
|
perf.markRenderStart(props.component.id);
|
|
1342
1361
|
const telemetry = MCPUITelemetryContext.useTelemetry();
|
|
1343
1362
|
const strings = MCPUIStringsContext.useMCPUIStrings();
|
|
1363
|
+
const componentConfig = MCPUIConfigContext.useMCPUIConfig();
|
|
1344
1364
|
solidJs.onMount(() => {
|
|
1345
1365
|
perf.markRenderEnd(props.component.id);
|
|
1346
1366
|
if (telemetry) {
|
|
@@ -1376,7 +1396,10 @@ function ComponentRenderer(props) {
|
|
|
1376
1396
|
});
|
|
1377
1397
|
}
|
|
1378
1398
|
});
|
|
1379
|
-
const validation$1 = validation.validateComponent(props.component
|
|
1399
|
+
const validation$1 = validation.validateComponent(props.component, {
|
|
1400
|
+
iframePolicy: componentConfig.iframePolicy,
|
|
1401
|
+
customIframeDomains: componentConfig.customIframeDomains
|
|
1402
|
+
});
|
|
1380
1403
|
if (!validation$1.valid) {
|
|
1381
1404
|
(_a = props.onError) == null ? void 0 : _a.call(props, {
|
|
1382
1405
|
type: "validation",
|
|
@@ -1408,20 +1431,20 @@ function ComponentRenderer(props) {
|
|
|
1408
1431
|
}
|
|
1409
1432
|
if (mode === "inline-warn") {
|
|
1410
1433
|
return (() => {
|
|
1411
|
-
var _el$
|
|
1412
|
-
web.setAttribute(_el$
|
|
1413
|
-
web.insert(_el$
|
|
1434
|
+
var _el$158 = web.getNextElement(_tmpl$41), _el$159 = _el$158.firstChild, _el$160 = _el$159.nextSibling;
|
|
1435
|
+
web.setAttribute(_el$158, "title", firstError);
|
|
1436
|
+
web.insert(_el$160, () => formatString.formatMCPUIString(strings.invalidComponent, {
|
|
1414
1437
|
type: props.component.type
|
|
1415
1438
|
}));
|
|
1416
|
-
web.effect(() => web.setAttribute(_el$
|
|
1417
|
-
return _el$
|
|
1439
|
+
web.effect(() => web.setAttribute(_el$158, "aria-label", strings.validationWarning));
|
|
1440
|
+
return _el$158;
|
|
1418
1441
|
})();
|
|
1419
1442
|
}
|
|
1420
1443
|
return (() => {
|
|
1421
|
-
var _el$
|
|
1422
|
-
web.insert(_el$
|
|
1423
|
-
web.insert(_el$
|
|
1424
|
-
return _el$
|
|
1444
|
+
var _el$161 = web.getNextElement(_tmpl$42), _el$162 = _el$161.firstChild, _el$163 = _el$162.nextSibling;
|
|
1445
|
+
web.insert(_el$162, () => strings.validationError);
|
|
1446
|
+
web.insert(_el$163, firstError);
|
|
1447
|
+
return _el$161;
|
|
1425
1448
|
})();
|
|
1426
1449
|
}
|
|
1427
1450
|
return web.createComponent(GenerativeUIErrorBoundary.GenerativeUIErrorBoundary, {
|
|
@@ -1715,10 +1738,10 @@ function ComponentRenderer(props) {
|
|
|
1715
1738
|
function UnsupportedComponentFallback(props) {
|
|
1716
1739
|
const strings = MCPUIStringsContext.useMCPUIStrings();
|
|
1717
1740
|
return (() => {
|
|
1718
|
-
var _el$
|
|
1719
|
-
web.insert(_el$
|
|
1720
|
-
web.insert(_el$
|
|
1721
|
-
return _el$
|
|
1741
|
+
var _el$164 = web.getNextElement(_tmpl$43), _el$167 = _el$164.firstChild, [_el$168, _co$33] = web.getNextMarker(_el$167.nextSibling), _el$165 = _el$168.nextSibling, _el$166 = _el$165.nextSibling;
|
|
1742
|
+
web.insert(_el$164, () => strings.unsupportedComponentType, _el$168, _co$33);
|
|
1743
|
+
web.insert(_el$166, () => props.component.type);
|
|
1744
|
+
return _el$164;
|
|
1722
1745
|
})();
|
|
1723
1746
|
}
|
|
1724
1747
|
function ActionRenderer(props) {
|
|
@@ -1758,27 +1781,27 @@ function ActionRenderer(props) {
|
|
|
1758
1781
|
const isDisabled = () => params.disabled || isExecutable() && isExecuting();
|
|
1759
1782
|
if (params.type === "link" || params.action === "link") {
|
|
1760
1783
|
return (() => {
|
|
1761
|
-
var _el$
|
|
1762
|
-
_el$
|
|
1763
|
-
web.insert(_el$
|
|
1784
|
+
var _el$169 = web.getNextElement(_tmpl$45), _el$171 = _el$169.firstChild, [_el$172, _co$34] = web.getNextMarker(_el$171.nextSibling), _el$173 = _el$172.nextSibling, [_el$174, _co$35] = web.getNextMarker(_el$173.nextSibling);
|
|
1785
|
+
_el$169.$$click = handleClick;
|
|
1786
|
+
web.insert(_el$169, web.createComponent(solidJs.Show, {
|
|
1764
1787
|
get when() {
|
|
1765
1788
|
return params.icon;
|
|
1766
1789
|
},
|
|
1767
1790
|
get children() {
|
|
1768
|
-
var _el$
|
|
1769
|
-
web.insert(_el$
|
|
1770
|
-
return _el$
|
|
1791
|
+
var _el$170 = web.getNextElement(_tmpl$44);
|
|
1792
|
+
web.insert(_el$170, () => params.icon);
|
|
1793
|
+
return _el$170;
|
|
1771
1794
|
}
|
|
1772
|
-
}), _el$
|
|
1773
|
-
web.insert(_el$
|
|
1795
|
+
}), _el$172, _co$34);
|
|
1796
|
+
web.insert(_el$169, () => params.label, _el$174, _co$35);
|
|
1774
1797
|
web.effect((_p$) => {
|
|
1775
|
-
var _v$
|
|
1798
|
+
var _v$38 = safeUrl.safeUrl(params.url) ?? "#", _v$39 = safeUrl.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
|
|
1776
1799
|
${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"}
|
|
1777
1800
|
${params.className || ""}`;
|
|
1778
|
-
_v$
|
|
1779
|
-
_v$
|
|
1780
|
-
_v$
|
|
1781
|
-
_v$
|
|
1801
|
+
_v$38 !== _p$.e && web.setAttribute(_el$169, "href", _p$.e = _v$38);
|
|
1802
|
+
_v$39 !== _p$.t && web.setAttribute(_el$169, "target", _p$.t = _v$39);
|
|
1803
|
+
_v$40 !== _p$.a && web.setAttribute(_el$169, "aria-label", _p$.a = _v$40);
|
|
1804
|
+
_v$41 !== _p$.o && web.className(_el$169, _p$.o = _v$41);
|
|
1782
1805
|
return _p$;
|
|
1783
1806
|
}, {
|
|
1784
1807
|
e: void 0,
|
|
@@ -1787,41 +1810,41 @@ function ActionRenderer(props) {
|
|
|
1787
1810
|
o: void 0
|
|
1788
1811
|
});
|
|
1789
1812
|
web.runHydrationEvents();
|
|
1790
|
-
return _el$
|
|
1813
|
+
return _el$169;
|
|
1791
1814
|
})();
|
|
1792
1815
|
}
|
|
1793
1816
|
return (() => {
|
|
1794
|
-
var _el$
|
|
1795
|
-
_el$
|
|
1796
|
-
web.insert(_el$
|
|
1817
|
+
var _el$175 = web.getNextElement(_tmpl$47), _el$178 = _el$175.firstChild, [_el$179, _co$36] = web.getNextMarker(_el$178.nextSibling), _el$180 = _el$179.nextSibling, [_el$181, _co$37] = web.getNextMarker(_el$180.nextSibling), _el$182 = _el$181.nextSibling, [_el$183, _co$38] = web.getNextMarker(_el$182.nextSibling);
|
|
1818
|
+
_el$175.$$click = handleClick;
|
|
1819
|
+
web.insert(_el$175, web.createComponent(solidJs.Show, {
|
|
1797
1820
|
get when() {
|
|
1798
1821
|
return web.memo(() => !!isExecuting())() && isExecutable();
|
|
1799
1822
|
},
|
|
1800
1823
|
get children() {
|
|
1801
1824
|
return web.getNextElement(_tmpl$46);
|
|
1802
1825
|
}
|
|
1803
|
-
}), _el$
|
|
1804
|
-
web.insert(_el$
|
|
1826
|
+
}), _el$179, _co$36);
|
|
1827
|
+
web.insert(_el$175, web.createComponent(solidJs.Show, {
|
|
1805
1828
|
get when() {
|
|
1806
1829
|
return web.memo(() => !!params.icon)() && !(isExecuting() && isExecutable());
|
|
1807
1830
|
},
|
|
1808
1831
|
get children() {
|
|
1809
|
-
var _el$
|
|
1810
|
-
web.insert(_el$
|
|
1811
|
-
return _el$
|
|
1832
|
+
var _el$177 = web.getNextElement(_tmpl$44);
|
|
1833
|
+
web.insert(_el$177, () => params.icon);
|
|
1834
|
+
return _el$177;
|
|
1812
1835
|
}
|
|
1813
|
-
}), _el$
|
|
1814
|
-
web.insert(_el$
|
|
1836
|
+
}), _el$181, _co$37);
|
|
1837
|
+
web.insert(_el$175, () => params.label, _el$183, _co$38);
|
|
1815
1838
|
web.effect((_p$) => {
|
|
1816
|
-
var _v$
|
|
1839
|
+
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
|
|
1817
1840
|
${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"}
|
|
1818
1841
|
${isDisabled() ? "opacity-50 cursor-not-allowed" : ""}
|
|
1819
1842
|
${params.size === "sm" ? "px-3 py-1.5 text-xs" : params.size === "lg" ? "px-6 py-3 text-base" : ""}
|
|
1820
1843
|
${params.className || ""}`;
|
|
1821
|
-
_v$
|
|
1822
|
-
_v$
|
|
1823
|
-
_v$
|
|
1824
|
-
_v$
|
|
1844
|
+
_v$42 !== _p$.e && web.setProperty(_el$175, "disabled", _p$.e = _v$42);
|
|
1845
|
+
_v$43 !== _p$.t && web.setAttribute(_el$175, "aria-busy", _p$.t = _v$43);
|
|
1846
|
+
_v$44 !== _p$.a && web.setAttribute(_el$175, "aria-label", _p$.a = _v$44);
|
|
1847
|
+
_v$45 !== _p$.o && web.className(_el$175, _p$.o = _v$45);
|
|
1825
1848
|
return _p$;
|
|
1826
1849
|
}, {
|
|
1827
1850
|
e: void 0,
|
|
@@ -1830,7 +1853,7 @@ function ActionRenderer(props) {
|
|
|
1830
1853
|
o: void 0
|
|
1831
1854
|
});
|
|
1832
1855
|
web.runHydrationEvents();
|
|
1833
|
-
return _el$
|
|
1856
|
+
return _el$175;
|
|
1834
1857
|
})();
|
|
1835
1858
|
}
|
|
1836
1859
|
function ErrorCardRenderer(props) {
|
|
@@ -1844,62 +1867,62 @@ function ErrorCardRenderer(props) {
|
|
|
1844
1867
|
});
|
|
1845
1868
|
};
|
|
1846
1869
|
return (() => {
|
|
1847
|
-
var _el$
|
|
1848
|
-
web.insert(_el$
|
|
1870
|
+
var _el$184 = web.getNextElement(_tmpl$51), _el$201 = _el$184.firstChild, [_el$202, _co$42] = web.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] = web.getNextMarker(_el$195.nextSibling), _el$197 = _el$196.nextSibling, [_el$198, _co$40] = web.getNextMarker(_el$197.nextSibling), _el$199 = _el$198.nextSibling, [_el$200, _co$41] = web.getNextMarker(_el$199.nextSibling);
|
|
1871
|
+
web.insert(_el$184, web.createComponent(CopyButton, {
|
|
1849
1872
|
getText: getErrorText,
|
|
1850
1873
|
get title() {
|
|
1851
1874
|
return strings.copyErrorDetails;
|
|
1852
1875
|
},
|
|
1853
1876
|
position: "top-right"
|
|
1854
|
-
}), _el$
|
|
1855
|
-
web.insert(_el$
|
|
1877
|
+
}), _el$202, _co$42);
|
|
1878
|
+
web.insert(_el$188, () => formatString.formatMCPUIString(strings.toolErrorTitle, {
|
|
1856
1879
|
tool: props.error.tool || strings.errorUnknownToolName
|
|
1857
1880
|
}));
|
|
1858
|
-
web.insert(_el$
|
|
1859
|
-
web.insert(_el$
|
|
1881
|
+
web.insert(_el$189, () => props.error.message || strings.errorToolExecution);
|
|
1882
|
+
web.insert(_el$187, web.createComponent(solidJs.Show, {
|
|
1860
1883
|
get when() {
|
|
1861
1884
|
return props.error.type;
|
|
1862
1885
|
},
|
|
1863
1886
|
get children() {
|
|
1864
|
-
var _el$
|
|
1865
|
-
web.insert(_el$
|
|
1887
|
+
var _el$190 = web.getNextElement(_tmpl$48);
|
|
1888
|
+
web.insert(_el$190, () => formatString.formatMCPUIString(strings.errorTypeLabel, {
|
|
1866
1889
|
type: props.error.type
|
|
1867
1890
|
}));
|
|
1868
|
-
return _el$
|
|
1891
|
+
return _el$190;
|
|
1869
1892
|
}
|
|
1870
|
-
}), _el$
|
|
1871
|
-
web.insert(_el$
|
|
1893
|
+
}), _el$196, _co$39);
|
|
1894
|
+
web.insert(_el$187, web.createComponent(solidJs.Show, {
|
|
1872
1895
|
get when() {
|
|
1873
1896
|
var _a;
|
|
1874
1897
|
return (_a = props.error.suggestions) == null ? void 0 : _a.length;
|
|
1875
1898
|
},
|
|
1876
1899
|
get children() {
|
|
1877
|
-
var _el$
|
|
1878
|
-
web.insert(_el$
|
|
1879
|
-
web.insert(_el$
|
|
1900
|
+
var _el$191 = web.getNextElement(_tmpl$49), _el$192 = _el$191.firstChild, _el$193 = _el$192.nextSibling;
|
|
1901
|
+
web.insert(_el$192, () => strings.errorSuggestions);
|
|
1902
|
+
web.insert(_el$193, web.createComponent(solidJs.For, {
|
|
1880
1903
|
get each() {
|
|
1881
1904
|
return props.error.suggestions;
|
|
1882
1905
|
},
|
|
1883
1906
|
children: (suggestion) => (() => {
|
|
1884
|
-
var _el$
|
|
1885
|
-
web.insert(_el$
|
|
1886
|
-
return _el$
|
|
1907
|
+
var _el$203 = web.getNextElement(_tmpl$52);
|
|
1908
|
+
web.insert(_el$203, suggestion);
|
|
1909
|
+
return _el$203;
|
|
1887
1910
|
})()
|
|
1888
1911
|
}));
|
|
1889
|
-
return _el$
|
|
1912
|
+
return _el$191;
|
|
1890
1913
|
}
|
|
1891
|
-
}), _el$
|
|
1892
|
-
web.insert(_el$
|
|
1914
|
+
}), _el$198, _co$40);
|
|
1915
|
+
web.insert(_el$187, web.createComponent(solidJs.Show, {
|
|
1893
1916
|
get when() {
|
|
1894
1917
|
return web.memo(() => !!mounted())() && props.error.timestamp;
|
|
1895
1918
|
},
|
|
1896
1919
|
get children() {
|
|
1897
|
-
var _el$
|
|
1898
|
-
web.insert(_el$
|
|
1899
|
-
return _el$
|
|
1920
|
+
var _el$194 = web.getNextElement(_tmpl$50);
|
|
1921
|
+
web.insert(_el$194, () => new Date(props.error.timestamp).toLocaleString(strings.locale));
|
|
1922
|
+
return _el$194;
|
|
1900
1923
|
}
|
|
1901
|
-
}), _el$
|
|
1902
|
-
return _el$
|
|
1924
|
+
}), _el$200, _co$41);
|
|
1925
|
+
return _el$184;
|
|
1903
1926
|
})();
|
|
1904
1927
|
}
|
|
1905
1928
|
function isErrorResponse(content) {
|
|
@@ -1923,23 +1946,23 @@ function UIResourceHtmlRenderer(props) {
|
|
|
1923
1946
|
return ((_a = props.resource.metadata) == null ? void 0 : _a.title) || ((_b = props.resource.uri) == null ? void 0 : _b.replace("ui://deposium/", "")) || strings.resourceTitle;
|
|
1924
1947
|
};
|
|
1925
1948
|
return (() => {
|
|
1926
|
-
var _el$
|
|
1927
|
-
web.insert(_el$
|
|
1949
|
+
var _el$204 = web.getNextElement(_tmpl$54), _el$207 = _el$204.firstChild, [_el$208, _co$43] = web.getNextMarker(_el$207.nextSibling), _el$209 = _el$208.nextSibling, [_el$210, _co$44] = web.getNextMarker(_el$209.nextSibling);
|
|
1950
|
+
web.insert(_el$204, web.createComponent(solidJs.Show, {
|
|
1928
1951
|
get when() {
|
|
1929
1952
|
var _a;
|
|
1930
1953
|
return ((_a = props.resource.metadata) == null ? void 0 : _a.title) || props.resource.uri;
|
|
1931
1954
|
},
|
|
1932
1955
|
get children() {
|
|
1933
|
-
var _el$
|
|
1934
|
-
web.insert(_el$
|
|
1935
|
-
return _el$
|
|
1956
|
+
var _el$205 = web.getNextElement(_tmpl$53), _el$206 = _el$205.firstChild;
|
|
1957
|
+
web.insert(_el$206, resourceTitle);
|
|
1958
|
+
return _el$205;
|
|
1936
1959
|
}
|
|
1937
|
-
}), _el$
|
|
1938
|
-
web.insert(_el$
|
|
1960
|
+
}), _el$208, _co$43);
|
|
1961
|
+
web.insert(_el$204, web.createComponent(SafeHtml.SafeHtml, {
|
|
1939
1962
|
"class": "p-4 prose prose-sm dark:prose-invert max-w-none",
|
|
1940
1963
|
html: htmlContent
|
|
1941
|
-
}), _el$
|
|
1942
|
-
return _el$
|
|
1964
|
+
}), _el$210, _co$44);
|
|
1965
|
+
return _el$204;
|
|
1943
1966
|
})();
|
|
1944
1967
|
}
|
|
1945
1968
|
const UIResourceRenderer = (props) => {
|
|
@@ -2045,8 +2068,8 @@ const UIResourceRenderer = (props) => {
|
|
|
2045
2068
|
return web.createComponent(RenderContext.RenderProvider, {
|
|
2046
2069
|
renderComponent,
|
|
2047
2070
|
get children() {
|
|
2048
|
-
var _el$
|
|
2049
|
-
web.spread(_el$
|
|
2071
|
+
var _el$211 = web.getNextElement(_tmpl$55), _el$212 = _el$211.firstChild, _el$213 = _el$212.nextSibling, [_el$214, _co$45] = web.getNextMarker(_el$213.nextSibling);
|
|
2072
|
+
web.spread(_el$211, web.mergeProps({
|
|
2050
2073
|
get ["class"]() {
|
|
2051
2074
|
return `w-full ${props.class || ""}`;
|
|
2052
2075
|
}
|
|
@@ -2056,14 +2079,14 @@ const UIResourceRenderer = (props) => {
|
|
|
2056
2079
|
"data-mcp-ui-component-id": outerKey()
|
|
2057
2080
|
}), false, true);
|
|
2058
2081
|
var _ref$3 = responsiveGrid.ref;
|
|
2059
|
-
typeof _ref$3 === "function" ? web.use(_ref$3, _el$
|
|
2060
|
-
web.insert(_el$
|
|
2082
|
+
typeof _ref$3 === "function" ? web.use(_ref$3, _el$212) : responsiveGrid.ref = _el$212;
|
|
2083
|
+
web.insert(_el$212, web.createComponent(solidJs.For, {
|
|
2061
2084
|
get each() {
|
|
2062
2085
|
return layout().components;
|
|
2063
2086
|
},
|
|
2064
2087
|
children: (component) => (() => {
|
|
2065
|
-
var _el$
|
|
2066
|
-
web.insert(_el$
|
|
2088
|
+
var _el$215 = web.getNextElement(_tmpl$56);
|
|
2089
|
+
web.insert(_el$215, web.createComponent(ComponentRenderer, {
|
|
2067
2090
|
component,
|
|
2068
2091
|
get onError() {
|
|
2069
2092
|
return props.onError;
|
|
@@ -2079,18 +2102,18 @@ const UIResourceRenderer = (props) => {
|
|
|
2079
2102
|
}
|
|
2080
2103
|
}));
|
|
2081
2104
|
web.effect((_p$) => {
|
|
2082
|
-
var _v$
|
|
2083
|
-
_p$.e = web.style(_el$
|
|
2084
|
-
_v$
|
|
2105
|
+
var _v$48 = getGridStyleString(component), _v$49 = stableKey.getUiResourceStableKey(component);
|
|
2106
|
+
_p$.e = web.style(_el$215, _v$48, _p$.e);
|
|
2107
|
+
_v$49 !== _p$.t && web.setAttribute(_el$215, "data-mcp-ui-component-id", _p$.t = _v$49);
|
|
2085
2108
|
return _p$;
|
|
2086
2109
|
}, {
|
|
2087
2110
|
e: void 0,
|
|
2088
2111
|
t: void 0
|
|
2089
2112
|
});
|
|
2090
|
-
return _el$
|
|
2113
|
+
return _el$215;
|
|
2091
2114
|
})()
|
|
2092
2115
|
}));
|
|
2093
|
-
web.insert(_el$
|
|
2116
|
+
web.insert(_el$211, web.createComponent(solidJs.Show, {
|
|
2094
2117
|
get when() {
|
|
2095
2118
|
return shouldShowAutoFooter();
|
|
2096
2119
|
},
|
|
@@ -2101,18 +2124,18 @@ const UIResourceRenderer = (props) => {
|
|
|
2101
2124
|
}
|
|
2102
2125
|
});
|
|
2103
2126
|
}
|
|
2104
|
-
}), _el$
|
|
2127
|
+
}), _el$214, _co$45);
|
|
2105
2128
|
web.effect((_p$) => {
|
|
2106
|
-
var _v$
|
|
2107
|
-
_p$.e = web.style(_el$
|
|
2108
|
-
_v$
|
|
2129
|
+
var _v$46 = gridContainerStyle(), _v$47 = responsiveGrid.stacked();
|
|
2130
|
+
_p$.e = web.style(_el$212, _v$46, _p$.e);
|
|
2131
|
+
_v$47 !== _p$.t && web.setAttribute(_el$212, "data-mcp-ui-stacked", _p$.t = _v$47);
|
|
2109
2132
|
return _p$;
|
|
2110
2133
|
}, {
|
|
2111
2134
|
e: void 0,
|
|
2112
2135
|
t: void 0
|
|
2113
2136
|
});
|
|
2114
2137
|
web.runHydrationEvents();
|
|
2115
|
-
return _el$
|
|
2138
|
+
return _el$211;
|
|
2116
2139
|
}
|
|
2117
2140
|
});
|
|
2118
2141
|
};
|