@seed-ship/mcp-ui-solid 4.0.2 → 4.0.4
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/dist/components/DataPreviewSection.cjs +160 -49
- package/dist/components/DataPreviewSection.cjs.map +1 -1
- package/dist/components/DataPreviewSection.d.ts +2 -9
- package/dist/components/DataPreviewSection.d.ts.map +1 -1
- package/dist/components/DataPreviewSection.js +162 -51
- package/dist/components/DataPreviewSection.js.map +1 -1
- package/dist/components/UIResourceRenderer.cjs +210 -171
- package/dist/components/UIResourceRenderer.cjs.map +1 -1
- package/dist/components/UIResourceRenderer.d.ts.map +1 -1
- package/dist/components/UIResourceRenderer.js +210 -171
- package/dist/components/UIResourceRenderer.js.map +1 -1
- package/dist/types/chat-bus.d.ts +7 -1
- package/dist/types/chat-bus.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/DataPreviewSection.tsx +133 -64
- package/src/components/UIResourceRenderer.tsx +47 -2
- package/src/types/chat-bus.ts +7 -1
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -21,7 +21,7 @@ const ExpandableWrapper = require("./ExpandableWrapper.cjs");
|
|
|
21
21
|
const RenderContext = require("./RenderContext.cjs");
|
|
22
22
|
const useAction = require("../hooks/useAction.cjs");
|
|
23
23
|
const marked_esm = require("../node_modules/.pnpm/marked@16.4.2/node_modules/marked/lib/marked.esm.cjs");
|
|
24
|
-
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>`), _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">Invalid chart data: missing data.datasets`), _tmpl$5 = /* @__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$6 = /* @__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">Chart Error</p><p class="text-gray-600 dark:text-gray-400 text-xs mt-1">`), _tmpl$7 = /* @__PURE__ */ web.template(`<h3 class="text-sm font-semibold text-gray-900 dark:text-white mb-3">`), _tmpl$8 = /* @__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$9 = /* @__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$0 = /* @__PURE__ */ web.template(`<tbody class="bg-white dark:bg-gray-800 divide-y divide-gray-200 dark:divide-gray-700">`), _tmpl$1 = /* @__PURE__ */ web.template(`<tr>`), _tmpl$10 = /* @__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"><div>`), _tmpl$11 = /* @__PURE__ */ web.template(`<tbody class="bg-white dark:bg-gray-800 relative">`), _tmpl$12 = /* @__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">Copy TSV`), _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">Download CSV`), _tmpl$14 = /* @__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">Download JSON`), _tmpl$15 = /* @__PURE__ */ web.template(`<div class="absolute right-0 mt-1 w-36 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-600 rounded-lg shadow-lg py-1 text-sm"><!$><!/><!$><!/><!$><!/>`), _tmpl$16 = /* @__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"title="Export table"aria-label="Export table"><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$17 = /* @__PURE__ */ web.template(`<span class="ml-2 text-xs font-normal text-gray-400">(virtualized: <!$><!/> rows)`), _tmpl$18 = /* @__PURE__ */ web.template(`<h3 class="text-sm font-semibold text-gray-900 dark:text-white mb-3"><!$><!/><!$><!/>`), _tmpl$19 = /* @__PURE__ */ web.template(`<div class="mt-3 flex items-center justify-between text-xs text-gray-500 dark:text-gray-400"><span>Showing <!$><!/> - <!$><!/> of <!$><!/>`), _tmpl$20 = /* @__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 overflow-hidden group"><!$><!/><div class=p-4><!$><!/><div class=overflow-x-auto 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-50 dark:bg-gray-900/50 sticky top-0 z-10"><tr></tr></thead><!$><!/></table></div><!$><!/>`), _tmpl$21 = /* @__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-50 dark:bg-gray-900/50">`), _tmpl$22 = /* @__PURE__ */ web.template(`<span class="ml-2 text-sm font-medium text-gray-500 dark:text-gray-400">`), _tmpl$23 = /* @__PURE__ */ web.template(`<div class="mt-3 flex items-center"><span><!$><!/> <!$><!/>%`), _tmpl$24 = /* @__PURE__ */ web.template(`<p class="mt-2 text-xs text-gray-500 dark:text-gray-400">`), _tmpl$25 = /* @__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$26 = /* @__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>`), _tmpl$27 = /* @__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]"><a target=_blank rel="noopener noreferrer"class=cursor-zoom-in><img class="max-w-full max-h-[400px] object-contain rounded shadow-sm hover:opacity-90 transition-opacity"loading=lazy></a></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">`, true, false, false), _tmpl$28 = /* @__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$29 = /* @__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$30 = /* @__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$31 = /* @__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$32 = /* @__PURE__ */ web.template(`<p class="text-xs text-gray-500 dark:text-gray-400 truncate">`), _tmpl$33 = /* @__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$34 = /* @__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">Validation Error</p><p class="text-xs text-red-700 dark:text-red-300 mt-1">`), _tmpl$35 = /* @__PURE__ */ web.template(`<span aria-hidden=true>`), _tmpl$36 = /* @__PURE__ */ web.template(`<a rel="noopener noreferrer"><!$><!/><!$><!/>`), _tmpl$37 = /* @__PURE__ */ web.template(`<span class="animate-spin h-4 w-4 border-2 border-current border-t-transparent rounded-full"aria-hidden=true>`), _tmpl$38 = /* @__PURE__ */ web.template(`<button><!$><!/><!$><!/><!$><!/>`), _tmpl$39 = /* @__PURE__ */ web.template(`<p class="text-xs text-red-600 dark:text-red-400 mt-1">Type: <!$><!/>`), _tmpl$40 = /* @__PURE__ */ web.template(`<div class=mt-3><p class="text-xs font-medium text-red-700 dark:text-red-300">Suggestions:</p><ul class="mt-1 text-xs text-red-600 dark:text-red-400 list-disc list-inside">`), _tmpl$41 = /* @__PURE__ */ web.template(`<p class="text-xs text-red-500 dark:text-red-500 mt-2">`), _tmpl$42 = /* @__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">Tool Error: <!$><!/></h4><p class="text-sm text-red-700 dark:text-red-300 mt-1"></p><!$><!/><!$><!/><!$><!/>`), _tmpl$43 = /* @__PURE__ */ web.template(`<li>`), _tmpl$44 = /* @__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$45 = /* @__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"><!$><!/><div class="p-4 prose prose-sm dark:prose-invert max-w-none">`), _tmpl$46 = /* @__PURE__ */ web.template(`<div><div class="grid gap-4"></div><!$><!/>`), _tmpl$47 = /* @__PURE__ */ web.template(`<div>`);
|
|
24
|
+
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>`), _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">Invalid chart data: missing data.datasets`), _tmpl$5 = /* @__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$6 = /* @__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">Chart Error</p><p class="text-gray-600 dark:text-gray-400 text-xs mt-1">`), _tmpl$7 = /* @__PURE__ */ web.template(`<h3 class="text-sm font-semibold text-gray-900 dark:text-white mb-3">`), _tmpl$8 = /* @__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$9 = /* @__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$0 = /* @__PURE__ */ web.template(`<tbody class="bg-white dark:bg-gray-800 divide-y divide-gray-200 dark:divide-gray-700">`), _tmpl$1 = /* @__PURE__ */ web.template(`<tr>`), _tmpl$10 = /* @__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"><div>`), _tmpl$11 = /* @__PURE__ */ web.template(`<tbody class="bg-white dark:bg-gray-800 relative">`), _tmpl$12 = /* @__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">Copy TSV`), _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">Download CSV`), _tmpl$14 = /* @__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">Download JSON`), _tmpl$15 = /* @__PURE__ */ web.template(`<div class="absolute right-0 mt-1 w-36 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-600 rounded-lg shadow-lg py-1 text-sm"><!$><!/><!$><!/><!$><!/>`), _tmpl$16 = /* @__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"title="Export table"aria-label="Export table"><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$17 = /* @__PURE__ */ web.template(`<span class="ml-2 text-xs font-normal text-gray-400">(virtualized: <!$><!/> rows)`), _tmpl$18 = /* @__PURE__ */ web.template(`<h3 class="text-sm font-semibold text-gray-900 dark:text-white mb-3"><!$><!/><!$><!/>`), _tmpl$19 = /* @__PURE__ */ web.template(`<div class="mt-3 flex items-center justify-between text-xs text-gray-500 dark:text-gray-400"><span>Showing <!$><!/> - <!$><!/> of <!$><!/>`), _tmpl$20 = /* @__PURE__ */ web.template(`<div class="mt-3 flex items-center justify-between text-xs text-gray-500 dark:text-gray-400"><span>Showing <!$><!/>–<!$><!/> of <!$><!/></span><div class="flex items-center gap-1"><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">◀ Prev</button><span class=px-2>Page <!$><!/> / <!$><!/></span><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">Next ▶`), _tmpl$21 = /* @__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 overflow-hidden group"><!$><!/><div class=p-4><!$><!/><div class=overflow-x-auto 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-50 dark:bg-gray-900/50 sticky top-0 z-10"><tr></tr></thead><!$><!/></table></div><!$><!/><!$><!/>`), _tmpl$22 = /* @__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-50 dark:bg-gray-900/50">`), _tmpl$23 = /* @__PURE__ */ web.template(`<span class="ml-2 text-sm font-medium text-gray-500 dark:text-gray-400">`), _tmpl$24 = /* @__PURE__ */ web.template(`<div class="mt-3 flex items-center"><span><!$><!/> <!$><!/>%`), _tmpl$25 = /* @__PURE__ */ web.template(`<p class="mt-2 text-xs text-gray-500 dark:text-gray-400">`), _tmpl$26 = /* @__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$27 = /* @__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>`), _tmpl$28 = /* @__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]"><a target=_blank rel="noopener noreferrer"class=cursor-zoom-in><img class="max-w-full max-h-[400px] object-contain rounded shadow-sm hover:opacity-90 transition-opacity"loading=lazy></a></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">`, true, false, false), _tmpl$29 = /* @__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$30 = /* @__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$31 = /* @__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$32 = /* @__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$33 = /* @__PURE__ */ web.template(`<p class="text-xs text-gray-500 dark:text-gray-400 truncate">`), _tmpl$34 = /* @__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$35 = /* @__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">Validation Error</p><p class="text-xs text-red-700 dark:text-red-300 mt-1">`), _tmpl$36 = /* @__PURE__ */ web.template(`<span aria-hidden=true>`), _tmpl$37 = /* @__PURE__ */ web.template(`<a rel="noopener noreferrer"><!$><!/><!$><!/>`), _tmpl$38 = /* @__PURE__ */ web.template(`<span class="animate-spin h-4 w-4 border-2 border-current border-t-transparent rounded-full"aria-hidden=true>`), _tmpl$39 = /* @__PURE__ */ web.template(`<button><!$><!/><!$><!/><!$><!/>`), _tmpl$40 = /* @__PURE__ */ web.template(`<p class="text-xs text-red-600 dark:text-red-400 mt-1">Type: <!$><!/>`), _tmpl$41 = /* @__PURE__ */ web.template(`<div class=mt-3><p class="text-xs font-medium text-red-700 dark:text-red-300">Suggestions:</p><ul class="mt-1 text-xs text-red-600 dark:text-red-400 list-disc list-inside">`), _tmpl$42 = /* @__PURE__ */ web.template(`<p class="text-xs text-red-500 dark:text-red-500 mt-2">`), _tmpl$43 = /* @__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">Tool Error: <!$><!/></h4><p class="text-sm text-red-700 dark:text-red-300 mt-1"></p><!$><!/><!$><!/><!$><!/>`), _tmpl$44 = /* @__PURE__ */ web.template(`<li>`), _tmpl$45 = /* @__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$46 = /* @__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"><!$><!/><div class="p-4 prose prose-sm dark:prose-invert max-w-none">`), _tmpl$47 = /* @__PURE__ */ web.template(`<div><div class="grid gap-4"></div><!$><!/>`), _tmpl$48 = /* @__PURE__ */ web.template(`<div>`);
|
|
25
25
|
function CopyButton(props) {
|
|
26
26
|
const [copied, setCopied] = solidJs.createSignal(false);
|
|
27
27
|
const handleCopy = async () => {
|
|
@@ -266,6 +266,19 @@ function renderCellValue(value) {
|
|
|
266
266
|
function TableRenderer(props) {
|
|
267
267
|
const tableParams = props.component.params;
|
|
268
268
|
let scrollContainerRef;
|
|
269
|
+
const clientPageSize = () => tableParams.pageSize ?? 25;
|
|
270
|
+
const hasServerPagination = () => !!tableParams.pagination;
|
|
271
|
+
const allRows = () => tableParams.rows || [];
|
|
272
|
+
const needsClientPagination = () => !hasServerPagination() && clientPageSize() > 0 && allRows().length > clientPageSize();
|
|
273
|
+
const [clientPage, setClientPage] = solidJs.createSignal(tableParams.initialPage ?? 0);
|
|
274
|
+
const clientTotalPages = () => needsClientPagination() ? Math.ceil(allRows().length / clientPageSize()) : 1;
|
|
275
|
+
const clientVisibleRows = solidJs.createMemo(() => {
|
|
276
|
+
if (!needsClientPagination()) return allRows();
|
|
277
|
+
const start = clientPage() * clientPageSize();
|
|
278
|
+
return allRows().slice(start, start + clientPageSize());
|
|
279
|
+
});
|
|
280
|
+
const clientRangeStart = () => needsClientPagination() ? clientPage() * clientPageSize() + 1 : 1;
|
|
281
|
+
const clientRangeEnd = () => needsClientPagination() ? Math.min((clientPage() + 1) * clientPageSize(), allRows().length) : allRows().length;
|
|
269
282
|
const [virtualizer, setVirtualizer] = solidJs.createSignal(null);
|
|
270
283
|
const [isVirtualizing, setIsVirtualizing] = solidJs.createSignal(false);
|
|
271
284
|
const shouldVirtualize = solidJs.createMemo(() => {
|
|
@@ -386,7 +399,7 @@ ${dataRows}`;
|
|
|
386
399
|
var _el$21 = web.getNextElement(_tmpl$0);
|
|
387
400
|
web.insert(_el$21, web.createComponent(solidJs.For, {
|
|
388
401
|
get each() {
|
|
389
|
-
return
|
|
402
|
+
return clientVisibleRows().slice(0, validation.DEFAULT_RESOURCE_LIMITS.maxTableRows);
|
|
390
403
|
},
|
|
391
404
|
children: (row, i) => (() => {
|
|
392
405
|
var _el$22 = web.getNextElement(_tmpl$1);
|
|
@@ -458,7 +471,7 @@ ${dataRows}`;
|
|
|
458
471
|
},
|
|
459
472
|
copyLabel: "Copy table (TSV)",
|
|
460
473
|
get children() {
|
|
461
|
-
var _el$29 = web.getNextElement(_tmpl$
|
|
474
|
+
var _el$29 = web.getNextElement(_tmpl$21), _el$101 = _el$29.firstChild, [_el$102, _co$22] = web.getNextMarker(_el$101.nextSibling), _el$44 = _el$102.nextSibling, _el$95 = _el$44.firstChild, [_el$96, _co$19] = web.getNextMarker(_el$95.nextSibling), _el$55 = _el$96.nextSibling, _el$56 = _el$55.firstChild, _el$57 = _el$56.firstChild, _el$58 = _el$57.firstChild, _el$59 = _el$57.nextSibling, [_el$60, _co$10] = web.getNextMarker(_el$59.nextSibling), _el$97 = _el$55.nextSibling, [_el$98, _co$20] = web.getNextMarker(_el$97.nextSibling), _el$99 = _el$98.nextSibling, [_el$100, _co$21] = web.getNextMarker(_el$99.nextSibling);
|
|
462
475
|
web.insert(_el$29, web.createComponent(solidJs.Show, {
|
|
463
476
|
when: exportable,
|
|
464
477
|
get fallback() {
|
|
@@ -516,7 +529,7 @@ ${dataRows}`;
|
|
|
516
529
|
web.runHydrationEvents();
|
|
517
530
|
return _el$30;
|
|
518
531
|
}
|
|
519
|
-
}), _el$
|
|
532
|
+
}), _el$102, _co$22);
|
|
520
533
|
web.insert(_el$44, web.createComponent(solidJs.Show, {
|
|
521
534
|
get when() {
|
|
522
535
|
return tableParams.title;
|
|
@@ -541,7 +554,7 @@ ${dataRows}`;
|
|
|
541
554
|
}), _el$54, _co$1);
|
|
542
555
|
return _el$45;
|
|
543
556
|
}
|
|
544
|
-
}), _el$
|
|
557
|
+
}), _el$96, _co$19);
|
|
545
558
|
var _ref$ = scrollContainerRef;
|
|
546
559
|
typeof _ref$ === "function" ? web.use(_ref$, _el$55) : scrollContainerRef = _el$55;
|
|
547
560
|
web.insert(_el$58, web.createComponent(solidJs.For, {
|
|
@@ -549,12 +562,12 @@ ${dataRows}`;
|
|
|
549
562
|
return tableParams.columns;
|
|
550
563
|
},
|
|
551
564
|
children: (column) => (() => {
|
|
552
|
-
var _el$
|
|
553
|
-
web.insert(_el$
|
|
554
|
-
web.effect((_$p) => web.style(_el$
|
|
565
|
+
var _el$103 = web.getNextElement(_tmpl$22);
|
|
566
|
+
web.insert(_el$103, () => column.label);
|
|
567
|
+
web.effect((_$p) => web.style(_el$103, column.width ? {
|
|
555
568
|
width: column.width
|
|
556
569
|
} : {}, _$p));
|
|
557
|
-
return _el$
|
|
570
|
+
return _el$103;
|
|
558
571
|
})()
|
|
559
572
|
}));
|
|
560
573
|
web.insert(_el$56, web.createComponent(solidJs.Show, {
|
|
@@ -579,15 +592,41 @@ ${dataRows}`;
|
|
|
579
592
|
web.insert(_el$62, () => tableParams.pagination.totalRows, _el$73, _co$13);
|
|
580
593
|
return _el$61;
|
|
581
594
|
}
|
|
582
|
-
}), _el$
|
|
595
|
+
}), _el$98, _co$20);
|
|
596
|
+
web.insert(_el$44, web.createComponent(solidJs.Show, {
|
|
597
|
+
get when() {
|
|
598
|
+
return needsClientPagination();
|
|
599
|
+
},
|
|
600
|
+
get children() {
|
|
601
|
+
var _el$74 = web.getNextElement(_tmpl$20), _el$75 = _el$74.firstChild, _el$76 = _el$75.firstChild, _el$79 = _el$76.nextSibling, [_el$80, _co$14] = web.getNextMarker(_el$79.nextSibling), _el$77 = _el$80.nextSibling, _el$81 = _el$77.nextSibling, [_el$82, _co$15] = web.getNextMarker(_el$81.nextSibling), _el$78 = _el$82.nextSibling, _el$83 = _el$78.nextSibling, [_el$84, _co$16] = web.getNextMarker(_el$83.nextSibling), _el$85 = _el$75.nextSibling, _el$86 = _el$85.firstChild, _el$87 = _el$86.nextSibling, _el$88 = _el$87.firstChild, _el$90 = _el$88.nextSibling, [_el$91, _co$17] = web.getNextMarker(_el$90.nextSibling), _el$89 = _el$91.nextSibling, _el$92 = _el$89.nextSibling, [_el$93, _co$18] = web.getNextMarker(_el$92.nextSibling), _el$94 = _el$87.nextSibling;
|
|
602
|
+
web.insert(_el$75, clientRangeStart, _el$80, _co$14);
|
|
603
|
+
web.insert(_el$75, clientRangeEnd, _el$82, _co$15);
|
|
604
|
+
web.insert(_el$75, () => allRows().length.toLocaleString("fr-FR"), _el$84, _co$16);
|
|
605
|
+
_el$86.$$click = () => setClientPage((p) => p - 1);
|
|
606
|
+
web.insert(_el$87, () => clientPage() + 1, _el$91, _co$17);
|
|
607
|
+
web.insert(_el$87, clientTotalPages, _el$93, _co$18);
|
|
608
|
+
_el$94.$$click = () => setClientPage((p) => p + 1);
|
|
609
|
+
web.effect((_p$) => {
|
|
610
|
+
var _v$8 = clientPage() === 0, _v$9 = clientPage() >= clientTotalPages() - 1;
|
|
611
|
+
_v$8 !== _p$.e && web.setProperty(_el$86, "disabled", _p$.e = _v$8);
|
|
612
|
+
_v$9 !== _p$.t && web.setProperty(_el$94, "disabled", _p$.t = _v$9);
|
|
613
|
+
return _p$;
|
|
614
|
+
}, {
|
|
615
|
+
e: void 0,
|
|
616
|
+
t: void 0
|
|
617
|
+
});
|
|
618
|
+
web.runHydrationEvents();
|
|
619
|
+
return _el$74;
|
|
620
|
+
}
|
|
621
|
+
}), _el$100, _co$21);
|
|
583
622
|
web.effect((_p$) => {
|
|
584
|
-
var _v$
|
|
623
|
+
var _v$0 = isVirtualizing() ? {
|
|
585
624
|
"max-height": "500px",
|
|
586
625
|
"overflow-y": "auto"
|
|
587
|
-
} : {}, _v$
|
|
588
|
-
_p$.e = web.style(_el$55, _v$
|
|
589
|
-
_v$
|
|
590
|
-
_v$
|
|
626
|
+
} : {}, _v$1 = tableParams.title || "Data table", _v$10 = tableParams.title ? `${tableId}-title` : void 0;
|
|
627
|
+
_p$.e = web.style(_el$55, _v$0, _p$.e);
|
|
628
|
+
_v$1 !== _p$.t && web.setAttribute(_el$55, "aria-label", _p$.t = _v$1);
|
|
629
|
+
_v$10 !== _p$.a && web.setAttribute(_el$56, "aria-labelledby", _p$.a = _v$10);
|
|
591
630
|
return _p$;
|
|
592
631
|
}, {
|
|
593
632
|
e: void 0,
|
|
@@ -607,51 +646,51 @@ function MetricRenderer(props) {
|
|
|
607
646
|
return `${title}: ${value}${unit ? " " + unit : ""}`;
|
|
608
647
|
};
|
|
609
648
|
return (() => {
|
|
610
|
-
var _el$
|
|
611
|
-
web.insert(_el$
|
|
649
|
+
var _el$104 = web.getNextElement(_tmpl$26), _el$126 = _el$104.firstChild, [_el$127, _co$28] = web.getNextMarker(_el$126.nextSibling), _el$105 = _el$127.nextSibling, _el$106 = _el$105.firstChild, _el$107 = _el$106.firstChild, _el$108 = _el$107.nextSibling, _el$109 = _el$108.firstChild, _el$111 = _el$109.nextSibling, [_el$112, _co$23] = web.getNextMarker(_el$111.nextSibling), _el$122 = _el$106.nextSibling, [_el$123, _co$26] = web.getNextMarker(_el$122.nextSibling), _el$124 = _el$123.nextSibling, [_el$125, _co$27] = web.getNextMarker(_el$124.nextSibling);
|
|
650
|
+
web.insert(_el$104, web.createComponent(CopyButton, {
|
|
612
651
|
getText: getMetricText,
|
|
613
652
|
title: "Copy metric",
|
|
614
653
|
position: "top-right"
|
|
615
|
-
}), _el$
|
|
616
|
-
web.insert(_el$
|
|
617
|
-
web.insert(_el$
|
|
618
|
-
web.insert(_el$
|
|
654
|
+
}), _el$127, _co$28);
|
|
655
|
+
web.insert(_el$107, () => metricParams.title);
|
|
656
|
+
web.insert(_el$109, () => metricParams.value);
|
|
657
|
+
web.insert(_el$108, web.createComponent(solidJs.Show, {
|
|
619
658
|
get when() {
|
|
620
659
|
return metricParams.unit;
|
|
621
660
|
},
|
|
622
661
|
get children() {
|
|
623
|
-
var _el$
|
|
624
|
-
web.insert(_el$
|
|
625
|
-
return _el$
|
|
662
|
+
var _el$110 = web.getNextElement(_tmpl$23);
|
|
663
|
+
web.insert(_el$110, () => metricParams.unit);
|
|
664
|
+
return _el$110;
|
|
626
665
|
}
|
|
627
|
-
}), _el$
|
|
628
|
-
web.insert(_el$
|
|
666
|
+
}), _el$112, _co$23);
|
|
667
|
+
web.insert(_el$105, web.createComponent(solidJs.Show, {
|
|
629
668
|
get when() {
|
|
630
669
|
return metricParams.trend;
|
|
631
670
|
},
|
|
632
671
|
get children() {
|
|
633
|
-
var _el$
|
|
634
|
-
_el$
|
|
635
|
-
web.insert(_el$
|
|
672
|
+
var _el$113 = web.getNextElement(_tmpl$24), _el$114 = _el$113.firstChild, _el$117 = _el$114.firstChild, [_el$118, _co$24] = web.getNextMarker(_el$117.nextSibling), _el$115 = _el$118.nextSibling, _el$119 = _el$115.nextSibling, [_el$120, _co$25] = web.getNextMarker(_el$119.nextSibling);
|
|
673
|
+
_el$120.nextSibling;
|
|
674
|
+
web.insert(_el$114, (() => {
|
|
636
675
|
var _c$ = web.memo(() => metricParams.trend.direction === "up");
|
|
637
676
|
return () => _c$() ? "�" : metricParams.trend.direction === "down" ? "�" : "�";
|
|
638
|
-
})(), _el$
|
|
639
|
-
web.insert(_el$
|
|
640
|
-
web.effect(() => web.className(_el$
|
|
641
|
-
return _el$
|
|
677
|
+
})(), _el$118, _co$24);
|
|
678
|
+
web.insert(_el$114, () => Math.abs(metricParams.trend.value), _el$120, _co$25);
|
|
679
|
+
web.effect(() => web.className(_el$114, `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"}`));
|
|
680
|
+
return _el$113;
|
|
642
681
|
}
|
|
643
|
-
}), _el$
|
|
644
|
-
web.insert(_el$
|
|
682
|
+
}), _el$123, _co$26);
|
|
683
|
+
web.insert(_el$105, web.createComponent(solidJs.Show, {
|
|
645
684
|
get when() {
|
|
646
685
|
return metricParams.subtitle;
|
|
647
686
|
},
|
|
648
687
|
get children() {
|
|
649
|
-
var _el$
|
|
650
|
-
web.insert(_el$
|
|
651
|
-
return _el$
|
|
688
|
+
var _el$121 = web.getNextElement(_tmpl$25);
|
|
689
|
+
web.insert(_el$121, () => metricParams.subtitle);
|
|
690
|
+
return _el$121;
|
|
652
691
|
}
|
|
653
|
-
}), _el$
|
|
654
|
-
return _el$
|
|
692
|
+
}), _el$125, _co$27);
|
|
693
|
+
return _el$104;
|
|
655
694
|
})();
|
|
656
695
|
}
|
|
657
696
|
function extractImageFromMarkdown(content) {
|
|
@@ -692,62 +731,62 @@ function TextRenderer(props) {
|
|
|
692
731
|
},
|
|
693
732
|
get fallback() {
|
|
694
733
|
return (() => {
|
|
695
|
-
var _el$
|
|
696
|
-
web.insert(_el$
|
|
734
|
+
var _el$128 = web.getNextElement(_tmpl$27), _el$130 = _el$128.firstChild, [_el$131, _co$29] = web.getNextMarker(_el$130.nextSibling), _el$129 = _el$131.nextSibling;
|
|
735
|
+
web.insert(_el$128, web.createComponent(CopyButton, {
|
|
697
736
|
getText: getTextContent,
|
|
698
737
|
title: "Copy text",
|
|
699
738
|
position: "top-right"
|
|
700
|
-
}), _el$
|
|
739
|
+
}), _el$131, _co$29);
|
|
701
740
|
web.effect((_p$) => {
|
|
702
|
-
var _v$
|
|
703
|
-
_v$
|
|
704
|
-
_v$
|
|
741
|
+
var _v$11 = `prose prose-sm dark:prose-invert max-w-none ${textParams.className || ""}`, _v$12 = htmlContent();
|
|
742
|
+
_v$11 !== _p$.e && web.className(_el$129, _p$.e = _v$11);
|
|
743
|
+
_v$12 !== _p$.t && web.setProperty(_el$129, "innerHTML", _p$.t = _v$12);
|
|
705
744
|
return _p$;
|
|
706
745
|
}, {
|
|
707
746
|
e: void 0,
|
|
708
747
|
t: void 0
|
|
709
748
|
});
|
|
710
|
-
return _el$
|
|
749
|
+
return _el$128;
|
|
711
750
|
})();
|
|
712
751
|
},
|
|
713
752
|
children: (data) => (() => {
|
|
714
|
-
var _el$
|
|
715
|
-
web.insert(_el$
|
|
753
|
+
var _el$132 = web.getNextElement(_tmpl$28), _el$133 = _el$132.firstChild, _el$134 = _el$133.firstChild, _el$135 = _el$134.firstChild, _el$136 = _el$133.nextSibling, _el$137 = _el$136.firstChild;
|
|
754
|
+
web.insert(_el$137, () => data().credit);
|
|
716
755
|
web.effect((_p$) => {
|
|
717
|
-
var _v$
|
|
718
|
-
_v$
|
|
719
|
-
_v$
|
|
720
|
-
_v$
|
|
756
|
+
var _v$13 = data().linkUrl, _v$14 = data().imageUrl, _v$15 = data().alt;
|
|
757
|
+
_v$13 !== _p$.e && web.setAttribute(_el$134, "href", _p$.e = _v$13);
|
|
758
|
+
_v$14 !== _p$.t && web.setAttribute(_el$135, "src", _p$.t = _v$14);
|
|
759
|
+
_v$15 !== _p$.a && web.setAttribute(_el$135, "alt", _p$.a = _v$15);
|
|
721
760
|
return _p$;
|
|
722
761
|
}, {
|
|
723
762
|
e: void 0,
|
|
724
763
|
t: void 0,
|
|
725
764
|
a: void 0
|
|
726
765
|
});
|
|
727
|
-
return _el$
|
|
766
|
+
return _el$132;
|
|
728
767
|
})()
|
|
729
768
|
});
|
|
730
769
|
}
|
|
731
770
|
function IframeRenderer(props) {
|
|
732
771
|
const params = props.component.params;
|
|
733
772
|
return (() => {
|
|
734
|
-
var _el$
|
|
735
|
-
web.insert(_el$
|
|
773
|
+
var _el$138 = web.getNextElement(_tmpl$30), _el$142 = _el$138.firstChild, [_el$143, _co$30] = web.getNextMarker(_el$142.nextSibling), _el$141 = _el$143.nextSibling;
|
|
774
|
+
web.insert(_el$138, web.createComponent(solidJs.Show, {
|
|
736
775
|
get when() {
|
|
737
776
|
return params.title;
|
|
738
777
|
},
|
|
739
778
|
get children() {
|
|
740
|
-
var _el$
|
|
741
|
-
web.insert(_el$
|
|
742
|
-
return _el$
|
|
779
|
+
var _el$139 = web.getNextElement(_tmpl$29), _el$140 = _el$139.firstChild;
|
|
780
|
+
web.insert(_el$140, () => params.title);
|
|
781
|
+
return _el$139;
|
|
743
782
|
}
|
|
744
|
-
}), _el$
|
|
783
|
+
}), _el$143, _co$30);
|
|
745
784
|
web.effect((_p$) => {
|
|
746
|
-
var _v$
|
|
747
|
-
_v$
|
|
748
|
-
_v$
|
|
749
|
-
_p$.a = web.style(_el$
|
|
750
|
-
_v$
|
|
785
|
+
var _v$16 = params.url, _v$17 = params.title || "Embedded content", _v$18 = `height: ${params.height || "400px"}; min-height: 300px;`, _v$19 = validation.getIframeSandbox(params.url);
|
|
786
|
+
_v$16 !== _p$.e && web.setAttribute(_el$141, "src", _p$.e = _v$16);
|
|
787
|
+
_v$17 !== _p$.t && web.setAttribute(_el$141, "title", _p$.t = _v$17);
|
|
788
|
+
_p$.a = web.style(_el$141, _v$18, _p$.a);
|
|
789
|
+
_v$19 !== _p$.o && web.setAttribute(_el$141, "sandbox", _p$.o = _v$19);
|
|
751
790
|
return _p$;
|
|
752
791
|
}, {
|
|
753
792
|
e: void 0,
|
|
@@ -755,30 +794,30 @@ function IframeRenderer(props) {
|
|
|
755
794
|
a: void 0,
|
|
756
795
|
o: void 0
|
|
757
796
|
});
|
|
758
|
-
return _el$
|
|
797
|
+
return _el$138;
|
|
759
798
|
})();
|
|
760
799
|
}
|
|
761
800
|
function ImageRenderer(props) {
|
|
762
801
|
const params = props.component.params;
|
|
763
802
|
return (() => {
|
|
764
|
-
var _el$
|
|
765
|
-
web.insert(_el$
|
|
803
|
+
var _el$144 = web.getNextElement(_tmpl$32), _el$145 = _el$144.firstChild, _el$146 = _el$145.firstChild, _el$147 = _el$146.firstChild, _el$150 = _el$145.nextSibling, [_el$151, _co$31] = web.getNextMarker(_el$150.nextSibling);
|
|
804
|
+
web.insert(_el$144, web.createComponent(solidJs.Show, {
|
|
766
805
|
get when() {
|
|
767
806
|
return params.caption;
|
|
768
807
|
},
|
|
769
808
|
get children() {
|
|
770
|
-
var _el$
|
|
771
|
-
web.insert(_el$
|
|
772
|
-
return _el$
|
|
809
|
+
var _el$148 = web.getNextElement(_tmpl$31), _el$149 = _el$148.firstChild;
|
|
810
|
+
web.insert(_el$149, () => params.caption);
|
|
811
|
+
return _el$148;
|
|
773
812
|
}
|
|
774
|
-
}), _el$
|
|
813
|
+
}), _el$151, _co$31);
|
|
775
814
|
web.effect((_p$) => {
|
|
776
|
-
var _v$
|
|
777
|
-
_v$
|
|
778
|
-
_v$
|
|
779
|
-
_v$
|
|
780
|
-
_v$
|
|
781
|
-
_v$
|
|
815
|
+
var _v$20 = `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$21 = params.url, _v$22 = `View full size: ${params.alt || "image"}`, _v$23 = params.url, _v$24 = params.alt || "Image";
|
|
816
|
+
_v$20 !== _p$.e && web.className(_el$144, _p$.e = _v$20);
|
|
817
|
+
_v$21 !== _p$.t && web.setAttribute(_el$146, "href", _p$.t = _v$21);
|
|
818
|
+
_v$22 !== _p$.a && web.setAttribute(_el$146, "aria-label", _p$.a = _v$22);
|
|
819
|
+
_v$23 !== _p$.o && web.setAttribute(_el$147, "src", _p$.o = _v$23);
|
|
820
|
+
_v$24 !== _p$.i && web.setAttribute(_el$147, "alt", _p$.i = _v$24);
|
|
782
821
|
return _p$;
|
|
783
822
|
}, {
|
|
784
823
|
e: void 0,
|
|
@@ -787,30 +826,30 @@ function ImageRenderer(props) {
|
|
|
787
826
|
o: void 0,
|
|
788
827
|
i: void 0
|
|
789
828
|
});
|
|
790
|
-
return _el$
|
|
829
|
+
return _el$144;
|
|
791
830
|
})();
|
|
792
831
|
}
|
|
793
832
|
function LinkRenderer(props) {
|
|
794
833
|
const params = props.component.params;
|
|
795
834
|
return (() => {
|
|
796
|
-
var _el$
|
|
797
|
-
_el$
|
|
798
|
-
web.insert(_el$
|
|
799
|
-
web.insert(_el$
|
|
835
|
+
var _el$152 = web.getNextElement(_tmpl$34), _el$153 = _el$152.firstChild, _el$154 = _el$153.nextSibling, _el$155 = _el$154.firstChild, _el$157 = _el$155.nextSibling, [_el$158, _co$32] = web.getNextMarker(_el$157.nextSibling);
|
|
836
|
+
_el$152.$$click = (e) => e.stopPropagation();
|
|
837
|
+
web.insert(_el$155, () => params.label || params.url);
|
|
838
|
+
web.insert(_el$154, web.createComponent(solidJs.Show, {
|
|
800
839
|
get when() {
|
|
801
840
|
return params.description;
|
|
802
841
|
},
|
|
803
842
|
get children() {
|
|
804
|
-
var _el$
|
|
805
|
-
web.insert(_el$
|
|
806
|
-
return _el$
|
|
843
|
+
var _el$156 = web.getNextElement(_tmpl$33);
|
|
844
|
+
web.insert(_el$156, () => params.description);
|
|
845
|
+
return _el$156;
|
|
807
846
|
}
|
|
808
|
-
}), _el$
|
|
847
|
+
}), _el$158, _co$32);
|
|
809
848
|
web.effect((_p$) => {
|
|
810
|
-
var _v$
|
|
811
|
-
_v$
|
|
812
|
-
_v$
|
|
813
|
-
_v$
|
|
849
|
+
var _v$25 = params.url, _v$26 = `${params.label || "Link"}: ${params.description || params.url} (opens in new tab)`, _v$27 = `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 || ""}`;
|
|
850
|
+
_v$25 !== _p$.e && web.setAttribute(_el$152, "href", _p$.e = _v$25);
|
|
851
|
+
_v$26 !== _p$.t && web.setAttribute(_el$152, "aria-label", _p$.t = _v$26);
|
|
852
|
+
_v$27 !== _p$.a && web.className(_el$152, _p$.a = _v$27);
|
|
814
853
|
return _p$;
|
|
815
854
|
}, {
|
|
816
855
|
e: void 0,
|
|
@@ -818,7 +857,7 @@ function LinkRenderer(props) {
|
|
|
818
857
|
a: void 0
|
|
819
858
|
});
|
|
820
859
|
web.runHydrationEvents();
|
|
821
|
-
return _el$
|
|
860
|
+
return _el$152;
|
|
822
861
|
})();
|
|
823
862
|
}
|
|
824
863
|
function ComponentRenderer(props) {
|
|
@@ -832,12 +871,12 @@ function ComponentRenderer(props) {
|
|
|
832
871
|
details: validation$1.errors
|
|
833
872
|
});
|
|
834
873
|
return (() => {
|
|
835
|
-
var _el$
|
|
836
|
-
web.insert(_el$
|
|
874
|
+
var _el$159 = web.getNextElement(_tmpl$35), _el$160 = _el$159.firstChild, _el$161 = _el$160.nextSibling;
|
|
875
|
+
web.insert(_el$161, () => {
|
|
837
876
|
var _a2, _b;
|
|
838
877
|
return ((_b = (_a2 = validation$1.errors) == null ? void 0 : _a2[0]) == null ? void 0 : _b.message) || "Unknown validation error";
|
|
839
878
|
});
|
|
840
|
-
return _el$
|
|
879
|
+
return _el$159;
|
|
841
880
|
})();
|
|
842
881
|
}
|
|
843
882
|
return web.createComponent(GenerativeUIErrorBoundary.GenerativeUIErrorBoundary, {
|
|
@@ -1083,27 +1122,27 @@ function ActionRenderer(props) {
|
|
|
1083
1122
|
const isDisabled = () => params.disabled || params.action === "tool-call" && isExecuting();
|
|
1084
1123
|
if (params.type === "link" || params.action === "link") {
|
|
1085
1124
|
return (() => {
|
|
1086
|
-
var _el$
|
|
1087
|
-
_el$
|
|
1088
|
-
web.insert(_el$
|
|
1125
|
+
var _el$162 = web.getNextElement(_tmpl$37), _el$164 = _el$162.firstChild, [_el$165, _co$33] = web.getNextMarker(_el$164.nextSibling), _el$166 = _el$165.nextSibling, [_el$167, _co$34] = web.getNextMarker(_el$166.nextSibling);
|
|
1126
|
+
_el$162.$$click = handleClick;
|
|
1127
|
+
web.insert(_el$162, web.createComponent(solidJs.Show, {
|
|
1089
1128
|
get when() {
|
|
1090
1129
|
return params.icon;
|
|
1091
1130
|
},
|
|
1092
1131
|
get children() {
|
|
1093
|
-
var _el$
|
|
1094
|
-
web.insert(_el$
|
|
1095
|
-
return _el$
|
|
1132
|
+
var _el$163 = web.getNextElement(_tmpl$36);
|
|
1133
|
+
web.insert(_el$163, () => params.icon);
|
|
1134
|
+
return _el$163;
|
|
1096
1135
|
}
|
|
1097
|
-
}), _el$
|
|
1098
|
-
web.insert(_el$
|
|
1136
|
+
}), _el$165, _co$33);
|
|
1137
|
+
web.insert(_el$162, () => params.label, _el$167, _co$34);
|
|
1099
1138
|
web.effect((_p$) => {
|
|
1100
|
-
var _v$
|
|
1139
|
+
var _v$28 = params.url || "#", _v$29 = params.url ? "_blank" : void 0, _v$30 = params.ariaLabel || params.label, _v$31 = `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
|
|
1101
1140
|
${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"}
|
|
1102
1141
|
${params.className || ""}`;
|
|
1103
|
-
_v$
|
|
1104
|
-
_v$
|
|
1105
|
-
_v$
|
|
1106
|
-
_v$
|
|
1142
|
+
_v$28 !== _p$.e && web.setAttribute(_el$162, "href", _p$.e = _v$28);
|
|
1143
|
+
_v$29 !== _p$.t && web.setAttribute(_el$162, "target", _p$.t = _v$29);
|
|
1144
|
+
_v$30 !== _p$.a && web.setAttribute(_el$162, "aria-label", _p$.a = _v$30);
|
|
1145
|
+
_v$31 !== _p$.o && web.className(_el$162, _p$.o = _v$31);
|
|
1107
1146
|
return _p$;
|
|
1108
1147
|
}, {
|
|
1109
1148
|
e: void 0,
|
|
@@ -1112,42 +1151,42 @@ function ActionRenderer(props) {
|
|
|
1112
1151
|
o: void 0
|
|
1113
1152
|
});
|
|
1114
1153
|
web.runHydrationEvents();
|
|
1115
|
-
return _el$
|
|
1154
|
+
return _el$162;
|
|
1116
1155
|
})();
|
|
1117
1156
|
}
|
|
1118
1157
|
return (() => {
|
|
1119
|
-
var _el$
|
|
1120
|
-
_el$
|
|
1121
|
-
web.insert(_el$
|
|
1158
|
+
var _el$168 = web.getNextElement(_tmpl$39), _el$171 = _el$168.firstChild, [_el$172, _co$35] = web.getNextMarker(_el$171.nextSibling), _el$173 = _el$172.nextSibling, [_el$174, _co$36] = web.getNextMarker(_el$173.nextSibling), _el$175 = _el$174.nextSibling, [_el$176, _co$37] = web.getNextMarker(_el$175.nextSibling);
|
|
1159
|
+
_el$168.$$click = handleClick;
|
|
1160
|
+
web.insert(_el$168, web.createComponent(solidJs.Show, {
|
|
1122
1161
|
get when() {
|
|
1123
1162
|
return web.memo(() => !!isExecuting())() && params.action === "tool-call";
|
|
1124
1163
|
},
|
|
1125
1164
|
get children() {
|
|
1126
|
-
return web.getNextElement(_tmpl$
|
|
1165
|
+
return web.getNextElement(_tmpl$38);
|
|
1127
1166
|
}
|
|
1128
|
-
}), _el$
|
|
1129
|
-
web.insert(_el$
|
|
1167
|
+
}), _el$172, _co$35);
|
|
1168
|
+
web.insert(_el$168, web.createComponent(solidJs.Show, {
|
|
1130
1169
|
get when() {
|
|
1131
1170
|
return web.memo(() => !!params.icon)() && !(isExecuting() && params.action === "tool-call");
|
|
1132
1171
|
},
|
|
1133
1172
|
get children() {
|
|
1134
|
-
var _el$
|
|
1135
|
-
web.insert(_el$
|
|
1136
|
-
return _el$
|
|
1173
|
+
var _el$170 = web.getNextElement(_tmpl$36);
|
|
1174
|
+
web.insert(_el$170, () => params.icon);
|
|
1175
|
+
return _el$170;
|
|
1137
1176
|
}
|
|
1138
|
-
}), _el$
|
|
1139
|
-
web.insert(_el$
|
|
1177
|
+
}), _el$174, _co$36);
|
|
1178
|
+
web.insert(_el$168, () => params.label, _el$176, _co$37);
|
|
1140
1179
|
web.effect((_p$) => {
|
|
1141
|
-
var _v$
|
|
1180
|
+
var _v$32 = params.action === "submit" ? "submit" : "button", _v$33 = isDisabled(), _v$34 = isExecuting() && params.action === "tool-call", _v$35 = params.ariaLabel || params.label, _v$36 = `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
|
|
1142
1181
|
${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"}
|
|
1143
1182
|
${isDisabled() ? "opacity-50 cursor-not-allowed" : ""}
|
|
1144
1183
|
${params.size === "sm" ? "px-3 py-1.5 text-xs" : params.size === "lg" ? "px-6 py-3 text-base" : ""}
|
|
1145
1184
|
${params.className || ""}`;
|
|
1146
|
-
_v$
|
|
1147
|
-
_v$
|
|
1148
|
-
_v$
|
|
1149
|
-
_v$
|
|
1150
|
-
_v$
|
|
1185
|
+
_v$32 !== _p$.e && web.setAttribute(_el$168, "type", _p$.e = _v$32);
|
|
1186
|
+
_v$33 !== _p$.t && web.setProperty(_el$168, "disabled", _p$.t = _v$33);
|
|
1187
|
+
_v$34 !== _p$.a && web.setAttribute(_el$168, "aria-busy", _p$.a = _v$34);
|
|
1188
|
+
_v$35 !== _p$.o && web.setAttribute(_el$168, "aria-label", _p$.o = _v$35);
|
|
1189
|
+
_v$36 !== _p$.i && web.className(_el$168, _p$.i = _v$36);
|
|
1151
1190
|
return _p$;
|
|
1152
1191
|
}, {
|
|
1153
1192
|
e: void 0,
|
|
@@ -1157,7 +1196,7 @@ function ActionRenderer(props) {
|
|
|
1157
1196
|
i: void 0
|
|
1158
1197
|
});
|
|
1159
1198
|
web.runHydrationEvents();
|
|
1160
|
-
return _el$
|
|
1199
|
+
return _el$168;
|
|
1161
1200
|
})();
|
|
1162
1201
|
}
|
|
1163
1202
|
function ErrorCardRenderer(props) {
|
|
@@ -1165,55 +1204,55 @@ function ErrorCardRenderer(props) {
|
|
|
1165
1204
|
return `Error in ${props.error.tool || "unknown tool"}: ${props.error.message || "Unknown error"}`;
|
|
1166
1205
|
};
|
|
1167
1206
|
return (() => {
|
|
1168
|
-
var _el$
|
|
1169
|
-
web.insert(_el$
|
|
1207
|
+
var _el$177 = web.getNextElement(_tmpl$43), _el$200 = _el$177.firstChild, [_el$201, _co$43] = web.getNextMarker(_el$200.nextSibling), _el$178 = _el$201.nextSibling, _el$179 = _el$178.firstChild, _el$180 = _el$179.nextSibling, _el$181 = _el$180.firstChild, _el$182 = _el$181.firstChild, _el$183 = _el$182.nextSibling, [_el$184, _co$38] = web.getNextMarker(_el$183.nextSibling), _el$185 = _el$181.nextSibling, _el$194 = _el$185.nextSibling, [_el$195, _co$40] = web.getNextMarker(_el$194.nextSibling), _el$196 = _el$195.nextSibling, [_el$197, _co$41] = web.getNextMarker(_el$196.nextSibling), _el$198 = _el$197.nextSibling, [_el$199, _co$42] = web.getNextMarker(_el$198.nextSibling);
|
|
1208
|
+
web.insert(_el$177, web.createComponent(CopyButton, {
|
|
1170
1209
|
getText: getErrorText,
|
|
1171
1210
|
title: "Copy error details",
|
|
1172
1211
|
position: "top-right"
|
|
1173
|
-
}), _el$
|
|
1174
|
-
web.insert(_el$
|
|
1175
|
-
web.insert(_el$
|
|
1176
|
-
web.insert(_el$
|
|
1212
|
+
}), _el$201, _co$43);
|
|
1213
|
+
web.insert(_el$181, () => props.error.tool || "Unknown", _el$184, _co$38);
|
|
1214
|
+
web.insert(_el$185, () => props.error.message || "An error occurred during tool execution");
|
|
1215
|
+
web.insert(_el$180, web.createComponent(solidJs.Show, {
|
|
1177
1216
|
get when() {
|
|
1178
1217
|
return props.error.type;
|
|
1179
1218
|
},
|
|
1180
1219
|
get children() {
|
|
1181
|
-
var _el$
|
|
1182
|
-
web.insert(_el$
|
|
1183
|
-
return _el$
|
|
1220
|
+
var _el$186 = web.getNextElement(_tmpl$40), _el$187 = _el$186.firstChild, _el$188 = _el$187.nextSibling, [_el$189, _co$39] = web.getNextMarker(_el$188.nextSibling);
|
|
1221
|
+
web.insert(_el$186, () => props.error.type, _el$189, _co$39);
|
|
1222
|
+
return _el$186;
|
|
1184
1223
|
}
|
|
1185
|
-
}), _el$
|
|
1186
|
-
web.insert(_el$
|
|
1224
|
+
}), _el$195, _co$40);
|
|
1225
|
+
web.insert(_el$180, web.createComponent(solidJs.Show, {
|
|
1187
1226
|
get when() {
|
|
1188
1227
|
var _a;
|
|
1189
1228
|
return (_a = props.error.suggestions) == null ? void 0 : _a.length;
|
|
1190
1229
|
},
|
|
1191
1230
|
get children() {
|
|
1192
|
-
var _el$
|
|
1193
|
-
web.insert(_el$
|
|
1231
|
+
var _el$190 = web.getNextElement(_tmpl$41), _el$191 = _el$190.firstChild, _el$192 = _el$191.nextSibling;
|
|
1232
|
+
web.insert(_el$192, web.createComponent(solidJs.For, {
|
|
1194
1233
|
get each() {
|
|
1195
1234
|
return props.error.suggestions;
|
|
1196
1235
|
},
|
|
1197
1236
|
children: (suggestion) => (() => {
|
|
1198
|
-
var _el$
|
|
1199
|
-
web.insert(_el$
|
|
1200
|
-
return _el$
|
|
1237
|
+
var _el$202 = web.getNextElement(_tmpl$44);
|
|
1238
|
+
web.insert(_el$202, suggestion);
|
|
1239
|
+
return _el$202;
|
|
1201
1240
|
})()
|
|
1202
1241
|
}));
|
|
1203
|
-
return _el$
|
|
1242
|
+
return _el$190;
|
|
1204
1243
|
}
|
|
1205
|
-
}), _el$
|
|
1206
|
-
web.insert(_el$
|
|
1244
|
+
}), _el$197, _co$41);
|
|
1245
|
+
web.insert(_el$180, web.createComponent(solidJs.Show, {
|
|
1207
1246
|
get when() {
|
|
1208
1247
|
return props.error.timestamp;
|
|
1209
1248
|
},
|
|
1210
1249
|
get children() {
|
|
1211
|
-
var _el$
|
|
1212
|
-
web.insert(_el$
|
|
1213
|
-
return _el$
|
|
1250
|
+
var _el$193 = web.getNextElement(_tmpl$42);
|
|
1251
|
+
web.insert(_el$193, () => new Date(props.error.timestamp).toLocaleString());
|
|
1252
|
+
return _el$193;
|
|
1214
1253
|
}
|
|
1215
|
-
}), _el$
|
|
1216
|
-
return _el$
|
|
1254
|
+
}), _el$199, _co$42);
|
|
1255
|
+
return _el$177;
|
|
1217
1256
|
})();
|
|
1218
1257
|
}
|
|
1219
1258
|
function isErrorResponse(content) {
|
|
@@ -1236,20 +1275,20 @@ function UIResourceHtmlRenderer(props) {
|
|
|
1236
1275
|
return ((_a = props.resource.metadata) == null ? void 0 : _a.title) || ((_b = props.resource.uri) == null ? void 0 : _b.replace("ui://deposium/", "")) || "Resource";
|
|
1237
1276
|
};
|
|
1238
1277
|
return (() => {
|
|
1239
|
-
var _el$
|
|
1240
|
-
web.insert(_el$
|
|
1278
|
+
var _el$203 = web.getNextElement(_tmpl$46), _el$207 = _el$203.firstChild, [_el$208, _co$44] = web.getNextMarker(_el$207.nextSibling), _el$206 = _el$208.nextSibling;
|
|
1279
|
+
web.insert(_el$203, web.createComponent(solidJs.Show, {
|
|
1241
1280
|
get when() {
|
|
1242
1281
|
var _a;
|
|
1243
1282
|
return ((_a = props.resource.metadata) == null ? void 0 : _a.title) || props.resource.uri;
|
|
1244
1283
|
},
|
|
1245
1284
|
get children() {
|
|
1246
|
-
var _el$
|
|
1247
|
-
web.insert(_el$
|
|
1248
|
-
return _el$
|
|
1285
|
+
var _el$204 = web.getNextElement(_tmpl$45), _el$205 = _el$204.firstChild;
|
|
1286
|
+
web.insert(_el$205, resourceTitle);
|
|
1287
|
+
return _el$204;
|
|
1249
1288
|
}
|
|
1250
|
-
}), _el$
|
|
1251
|
-
web.effect(() => web.setProperty(_el$
|
|
1252
|
-
return _el$
|
|
1289
|
+
}), _el$208, _co$44);
|
|
1290
|
+
web.effect(() => web.setProperty(_el$206, "innerHTML", htmlContent()));
|
|
1291
|
+
return _el$203;
|
|
1253
1292
|
})();
|
|
1254
1293
|
}
|
|
1255
1294
|
const UIResourceRenderer = (props) => {
|
|
@@ -1329,24 +1368,24 @@ const UIResourceRenderer = (props) => {
|
|
|
1329
1368
|
return web.createComponent(RenderContext.RenderProvider, {
|
|
1330
1369
|
renderComponent,
|
|
1331
1370
|
get children() {
|
|
1332
|
-
var _el$
|
|
1333
|
-
web.insert(_el$
|
|
1371
|
+
var _el$209 = web.getNextElement(_tmpl$47), _el$210 = _el$209.firstChild, _el$211 = _el$210.nextSibling, [_el$212, _co$45] = web.getNextMarker(_el$211.nextSibling);
|
|
1372
|
+
web.insert(_el$210, web.createComponent(solidJs.For, {
|
|
1334
1373
|
get each() {
|
|
1335
1374
|
return layoutData.components;
|
|
1336
1375
|
},
|
|
1337
1376
|
children: (component) => (() => {
|
|
1338
|
-
var _el$
|
|
1339
|
-
web.insert(_el$
|
|
1377
|
+
var _el$213 = web.getNextElement(_tmpl$48);
|
|
1378
|
+
web.insert(_el$213, web.createComponent(ComponentRenderer, {
|
|
1340
1379
|
component,
|
|
1341
1380
|
get onError() {
|
|
1342
1381
|
return props.onError;
|
|
1343
1382
|
}
|
|
1344
1383
|
}));
|
|
1345
|
-
web.effect((_$p) => web.style(_el$
|
|
1346
|
-
return _el$
|
|
1384
|
+
web.effect((_$p) => web.style(_el$213, getGridStyleString(component), _$p));
|
|
1385
|
+
return _el$213;
|
|
1347
1386
|
})()
|
|
1348
1387
|
}));
|
|
1349
|
-
web.insert(_el$
|
|
1388
|
+
web.insert(_el$209, web.createComponent(solidJs.Show, {
|
|
1350
1389
|
get when() {
|
|
1351
1390
|
return shouldShowAutoFooter();
|
|
1352
1391
|
},
|
|
@@ -1357,17 +1396,17 @@ const UIResourceRenderer = (props) => {
|
|
|
1357
1396
|
}
|
|
1358
1397
|
});
|
|
1359
1398
|
}
|
|
1360
|
-
}), _el$
|
|
1399
|
+
}), _el$212, _co$45);
|
|
1361
1400
|
web.effect((_p$) => {
|
|
1362
|
-
var _v$
|
|
1363
|
-
_v$
|
|
1364
|
-
_p$.t = web.style(_el$
|
|
1401
|
+
var _v$37 = `w-full ${props.class || ""}`, _v$38 = gridContainerStyle();
|
|
1402
|
+
_v$37 !== _p$.e && web.className(_el$209, _p$.e = _v$37);
|
|
1403
|
+
_p$.t = web.style(_el$210, _v$38, _p$.t);
|
|
1365
1404
|
return _p$;
|
|
1366
1405
|
}, {
|
|
1367
1406
|
e: void 0,
|
|
1368
1407
|
t: void 0
|
|
1369
1408
|
});
|
|
1370
|
-
return _el$
|
|
1409
|
+
return _el$209;
|
|
1371
1410
|
}
|
|
1372
1411
|
});
|
|
1373
1412
|
};
|