@seed-ship/mcp-ui-solid 4.3.1 → 4.3.2
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 +13 -0
- package/dist/components/UIResourceRenderer.cjs +201 -165
- package/dist/components/UIResourceRenderer.cjs.map +1 -1
- package/dist/components/UIResourceRenderer.d.ts.map +1 -1
- package/dist/components/UIResourceRenderer.js +201 -165
- package/dist/components/UIResourceRenderer.js.map +1 -1
- package/package.json +1 -1
- package/src/components/UIResourceRenderer.tsx +37 -5
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -19,7 +19,7 @@ import { ExpandableWrapper } from "./ExpandableWrapper.js";
|
|
|
19
19
|
import { RenderProvider } from "./RenderContext.js";
|
|
20
20
|
import { useAction } from "../hooks/useAction.js";
|
|
21
21
|
import { marked as k } from "../node_modules/.pnpm/marked@16.4.2/node_modules/marked/lib/marked.esm.js";
|
|
22
|
-
var _tmpl$ = /* @__PURE__ */ template(`<svg class="w-3 h-3 text-gray-500 dark:text-gray-400"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z">`), _tmpl$2 = /* @__PURE__ */ template(`<button>`), _tmpl$3 = /* @__PURE__ */ template(`<svg class="w-3 h-3 text-green-500"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M5 13l4 4L19 7">`), _tmpl$4 = /* @__PURE__ */ template(`<div class="p-4 bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700"><p class="text-red-500 dark:text-red-400 text-sm">Invalid chart data: missing data.datasets`), _tmpl$5 = /* @__PURE__ */ template(`<div class="absolute inset-0 flex items-center justify-center"><div class="animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600">`), _tmpl$6 = /* @__PURE__ */ template(`<div class="absolute inset-0 flex items-center justify-center p-4"><div class=text-center><p class="text-red-600 dark:text-red-400 text-sm font-medium">Chart Error</p><p class="text-gray-600 dark:text-gray-400 text-xs mt-1">`), _tmpl$7 = /* @__PURE__ */ template(`<h3 class="text-sm font-semibold text-gray-900 dark:text-white mb-3">`), _tmpl$8 = /* @__PURE__ */ template(`<div class="w-full h-full p-4"><!$><!/><div class="w-full h-full"role=img><img class="w-full h-auto max-h-[300px] object-contain">`), _tmpl$9 = /* @__PURE__ */ template(`<div class="relative w-full h-full min-h-[300px] bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700 overflow-hidden"><!$><!/><!$><!/><!$><!/>`), _tmpl$0 = /* @__PURE__ */ template(`<tbody class="bg-white dark:bg-gray-800 divide-y divide-gray-200 dark:divide-gray-700">`), _tmpl$1 = /* @__PURE__ */ template(`<tr>`), _tmpl$10 = /* @__PURE__ */ template(`<td class="px-6 py-4 text-sm text-gray-700 dark:text-gray-200 whitespace-normal break-words leading-relaxed first:pl-6 last:pr-6"><div>`), _tmpl$11 = /* @__PURE__ */ template(`<tbody class="bg-white dark:bg-gray-800 relative">`), _tmpl$12 = /* @__PURE__ */ template(`<button class="w-full text-left px-3 py-1.5 hover:bg-gray-100 dark:hover:bg-gray-700 text-gray-700 dark:text-gray-300">Copy TSV`), _tmpl$13 = /* @__PURE__ */ template(`<button class="w-full text-left px-3 py-1.5 hover:bg-gray-100 dark:hover:bg-gray-700 text-gray-700 dark:text-gray-300">Download CSV`), _tmpl$14 = /* @__PURE__ */ template(`<button class="w-full text-left px-3 py-1.5 hover:bg-gray-100 dark:hover:bg-gray-700 text-gray-700 dark:text-gray-300">Download JSON`), _tmpl$15 = /* @__PURE__ */ 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__ */ 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__ */ template(`<span class="ml-2 text-xs font-normal text-gray-400">(virtualized: <!$><!/> rows)`), _tmpl$18 = /* @__PURE__ */ template(`<h3 class="text-sm font-semibold text-gray-900 dark:text-white mb-3"><!$><!/><!$><!/>`), _tmpl$19 = /* @__PURE__ */ 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__ */ 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__ */ 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__ */ 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 cursor-pointer select-none hover:bg-gray-100 dark:hover:bg-gray-800/50 transition-colors"><span class="inline-flex items-center gap-1"><!$><!/><span class="text-[10px] leading-none">`), _tmpl$23 = /* @__PURE__ */ template(`<span class="ml-2 text-sm font-medium text-gray-500 dark:text-gray-400">`), _tmpl$24 = /* @__PURE__ */ template(`<div class="mt-3 flex items-center"><span><!$><!/> <!$><!/>%`), _tmpl$25 = /* @__PURE__ */ template(`<p class="mt-2 text-xs text-gray-500 dark:text-gray-400">`), _tmpl$26 = /* @__PURE__ */ template(`<div class="relative w-full h-full bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700 p-4 group"><!$><!/><div class="flex flex-col h-full justify-between"><div><p class="text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wide"></p><div class="mt-2 flex items-baseline"><p class="text-2xl font-semibold text-gray-900 dark:text-white"></p><!$><!/></div></div><!$><!/><!$><!/>`), _tmpl$27 = /* @__PURE__ */ template(`<div class="relative w-full h-full bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700 p-4 group"><!$><!/><div>`), _tmpl$28 = /* @__PURE__ */ template(`<div class="w-full h-full bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700 overflow-hidden flex flex-col"><div class="flex-1 flex items-center justify-center p-4 bg-gray-50 dark:bg-gray-900 min-h-[200px]"><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__ */ 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__ */ 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__ */ 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__ */ 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__ */ template(`<p class="text-xs text-gray-500 dark:text-gray-400 truncate">`), _tmpl$34 = /* @__PURE__ */ template(`<a target=_blank rel="noopener noreferrer"><div class="p-2 bg-blue-50 dark:bg-blue-900/30 rounded-full text-blue-600 dark:text-blue-400 group-hover:bg-blue-100 dark:group-hover:bg-blue-900/50 shrink-0 transition-colors"aria-hidden=true><svg xmlns=http://www.w3.org/2000/svg class="w-5 h-5"viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg></div><div class="flex-1 min-w-0"><h4 class="text-sm font-medium text-gray-900 dark:text-white truncate group-hover:text-blue-600 dark:group-hover:text-blue-400 transition-colors"></h4><!$><!/></div><svg xmlns=http://www.w3.org/2000/svg class="w-4 h-4 text-gray-400 group-hover:text-gray-600 dark:group-hover:text-gray-300 shrink-0 transition-colors"viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round aria-hidden=true><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1=10 y1=14 x2=21 y2=3>`), _tmpl$35 = /* @__PURE__ */ template(`<div class="w-full h-full bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg p-4"><p class="text-sm font-medium text-red-900 dark:text-red-100">Validation Error</p><p class="text-xs text-red-700 dark:text-red-300 mt-1">`), _tmpl$36 = /* @__PURE__ */ template(`<span aria-hidden=true>`), _tmpl$37 = /* @__PURE__ */ template(`<a rel="noopener noreferrer"><!$><!/><!$><!/>`), _tmpl$38 = /* @__PURE__ */ template(`<span class="animate-spin h-4 w-4 border-2 border-current border-t-transparent rounded-full"aria-hidden=true>`), _tmpl$39 = /* @__PURE__ */ template(`<button><!$><!/><!$><!/><!$><!/>`), _tmpl$40 = /* @__PURE__ */ template(`<p class="text-xs text-red-600 dark:text-red-400 mt-1">Type: <!$><!/>`), _tmpl$41 = /* @__PURE__ */ 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__ */ template(`<p class="text-xs text-red-500 dark:text-red-500 mt-2">`), _tmpl$43 = /* @__PURE__ */ template(`<div class="relative w-full bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg p-4 group"><!$><!/><div class="flex items-start gap-3"><div class="p-2 bg-red-100 dark:bg-red-900/40 rounded-full shrink-0"><svg class="w-5 h-5 text-red-600 dark:text-red-400"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"></path></svg></div><div class="flex-1 min-w-0"><h4 class="text-sm font-semibold text-red-800 dark:text-red-200">Tool Error: <!$><!/></h4><p class="text-sm text-red-700 dark:text-red-300 mt-1"></p><!$><!/><!$><!/><!$><!/>`), _tmpl$44 = /* @__PURE__ */ template(`<li>`), _tmpl$45 = /* @__PURE__ */ template(`<div class="px-4 py-2 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900"><h3 class="text-sm font-semibold text-gray-900 dark:text-white capitalize">`), _tmpl$46 = /* @__PURE__ */ template(`<div class="w-full bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700 overflow-hidden"><!$><!/><div class="p-4 prose prose-sm dark:prose-invert max-w-none">`), _tmpl$47 = /* @__PURE__ */ template(`<div><div class="grid gap-4"></div><!$><!/>`), _tmpl$48 = /* @__PURE__ */ template(`<div>`);
|
|
22
|
+
var _tmpl$ = /* @__PURE__ */ template(`<svg class="w-3 h-3 text-gray-500 dark:text-gray-400"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z">`), _tmpl$2 = /* @__PURE__ */ template(`<button>`), _tmpl$3 = /* @__PURE__ */ template(`<svg class="w-3 h-3 text-green-500"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M5 13l4 4L19 7">`), _tmpl$4 = /* @__PURE__ */ template(`<div class="p-4 bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700"><p class="text-red-500 dark:text-red-400 text-sm">Invalid chart data: missing data.datasets`), _tmpl$5 = /* @__PURE__ */ template(`<div class="absolute inset-0 flex items-center justify-center"><div class="animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600">`), _tmpl$6 = /* @__PURE__ */ template(`<div class="absolute inset-0 flex items-center justify-center p-4"><div class=text-center><p class="text-red-600 dark:text-red-400 text-sm font-medium">Chart Error</p><p class="text-gray-600 dark:text-gray-400 text-xs mt-1">`), _tmpl$7 = /* @__PURE__ */ template(`<h3 class="text-sm font-semibold text-gray-900 dark:text-white mb-3">`), _tmpl$8 = /* @__PURE__ */ template(`<div class="w-full h-full p-4"><!$><!/><div class="w-full h-full"role=img><img class="w-full h-auto max-h-[300px] object-contain">`), _tmpl$9 = /* @__PURE__ */ template(`<div class="relative w-full h-full min-h-[300px] bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700 overflow-hidden"><!$><!/><!$><!/><!$><!/>`), _tmpl$0 = /* @__PURE__ */ template(`<tbody class="bg-white dark:bg-gray-800 divide-y divide-gray-200 dark:divide-gray-700">`), _tmpl$1 = /* @__PURE__ */ template(`<tr>`), _tmpl$10 = /* @__PURE__ */ template(`<td class="px-6 py-4 text-sm text-gray-700 dark:text-gray-200 whitespace-normal break-words leading-relaxed first:pl-6 last:pr-6"><div>`), _tmpl$11 = /* @__PURE__ */ template(`<tbody class="bg-white dark:bg-gray-800 relative">`), _tmpl$12 = /* @__PURE__ */ template(`<button class="w-full text-left px-3 py-1.5 hover:bg-gray-100 dark:hover:bg-gray-700 text-gray-700 dark:text-gray-300">Copy TSV`), _tmpl$13 = /* @__PURE__ */ template(`<button class="w-full text-left px-3 py-1.5 hover:bg-gray-100 dark:hover:bg-gray-700 text-gray-700 dark:text-gray-300">Download CSV`), _tmpl$14 = /* @__PURE__ */ template(`<button class="w-full text-left px-3 py-1.5 hover:bg-gray-100 dark:hover:bg-gray-700 text-gray-700 dark:text-gray-300">Download JSON`), _tmpl$15 = /* @__PURE__ */ 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__ */ 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__ */ template(`<span class="ml-2 text-xs font-normal text-gray-400">(virtualized: <!$><!/> rows)`), _tmpl$18 = /* @__PURE__ */ template(`<h3 class="text-sm font-semibold text-gray-900 dark:text-white mb-3"><!$><!/><!$><!/>`), _tmpl$19 = /* @__PURE__ */ 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__ */ 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__ */ template(`<button class="px-4 py-1.5 rounded-md bg-gray-100 dark:bg-gray-700 hover:bg-gray-200 dark:hover:bg-gray-600 text-gray-700 dark:text-gray-300 transition-colors"><!$><!/> (<!$><!/> suivant<!$><!/>)`), _tmpl$22 = /* @__PURE__ */ template(`<div class="mt-3 flex flex-col items-center gap-2 text-xs text-gray-500 dark:text-gray-400"><span><!$><!/>–<!$><!/> of <!$><!/></span><!$><!/>`), _tmpl$23 = /* @__PURE__ */ template(`<div class="relative w-full h-full bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700 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$24 = /* @__PURE__ */ template(`<th scope=col class="px-6 py-3 text-left text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wider border-b border-gray-200 dark:border-gray-700 first:pl-6 last:pr-6 bg-gray-50 dark:bg-gray-900/50 cursor-pointer select-none hover:bg-gray-100 dark:hover:bg-gray-800/50 transition-colors"><span class="inline-flex items-center gap-1"><!$><!/><span class="text-[10px] leading-none">`), _tmpl$25 = /* @__PURE__ */ template(`<span class="ml-2 text-sm font-medium text-gray-500 dark:text-gray-400">`), _tmpl$26 = /* @__PURE__ */ template(`<div class="mt-3 flex items-center"><span><!$><!/> <!$><!/>%`), _tmpl$27 = /* @__PURE__ */ template(`<p class="mt-2 text-xs text-gray-500 dark:text-gray-400">`), _tmpl$28 = /* @__PURE__ */ template(`<div class="relative w-full h-full bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700 p-4 group"><!$><!/><div class="flex flex-col h-full justify-between"><div><p class="text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wide"></p><div class="mt-2 flex items-baseline"><p class="text-2xl font-semibold text-gray-900 dark:text-white"></p><!$><!/></div></div><!$><!/><!$><!/>`), _tmpl$29 = /* @__PURE__ */ template(`<div class="relative w-full h-full bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700 p-4 group"><!$><!/><div>`), _tmpl$30 = /* @__PURE__ */ template(`<div class="w-full h-full bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700 overflow-hidden flex flex-col"><div class="flex-1 flex items-center justify-center p-4 bg-gray-50 dark:bg-gray-900 min-h-[200px]"><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$31 = /* @__PURE__ */ template(`<div class="px-4 py-2 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900"><h3 class="text-sm font-semibold text-gray-900 dark:text-white">`), _tmpl$32 = /* @__PURE__ */ template(`<div class="w-full h-full bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700 overflow-hidden flex flex-col"><!$><!/><iframe class="w-full border-0 flex-1"loading=lazy>`, true, false, false), _tmpl$33 = /* @__PURE__ */ template(`<figcaption class="p-3 border-t border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800"><p class="text-sm text-gray-600 dark:text-gray-400 text-center">`), _tmpl$34 = /* @__PURE__ */ template(`<figure><div class="flex-1 flex items-center justify-center p-4 bg-gray-50 dark:bg-gray-900 min-h-[200px]"><a target=_blank rel="noopener noreferrer"class="cursor-zoom-in focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 rounded"><img class="max-w-full max-h-[500px] object-contain rounded shadow-sm hover:opacity-95 transition-opacity"loading=lazy></a></div><!$><!/>`, true, false, false), _tmpl$35 = /* @__PURE__ */ template(`<p class="text-xs text-gray-500 dark:text-gray-400 truncate">`), _tmpl$36 = /* @__PURE__ */ template(`<a target=_blank rel="noopener noreferrer"><div class="p-2 bg-blue-50 dark:bg-blue-900/30 rounded-full text-blue-600 dark:text-blue-400 group-hover:bg-blue-100 dark:group-hover:bg-blue-900/50 shrink-0 transition-colors"aria-hidden=true><svg xmlns=http://www.w3.org/2000/svg class="w-5 h-5"viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg></div><div class="flex-1 min-w-0"><h4 class="text-sm font-medium text-gray-900 dark:text-white truncate group-hover:text-blue-600 dark:group-hover:text-blue-400 transition-colors"></h4><!$><!/></div><svg xmlns=http://www.w3.org/2000/svg class="w-4 h-4 text-gray-400 group-hover:text-gray-600 dark:group-hover:text-gray-300 shrink-0 transition-colors"viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round aria-hidden=true><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1=10 y1=14 x2=21 y2=3>`), _tmpl$37 = /* @__PURE__ */ template(`<div class="w-full h-full bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg p-4"><p class="text-sm font-medium text-red-900 dark:text-red-100">Validation Error</p><p class="text-xs text-red-700 dark:text-red-300 mt-1">`), _tmpl$38 = /* @__PURE__ */ template(`<span aria-hidden=true>`), _tmpl$39 = /* @__PURE__ */ template(`<a rel="noopener noreferrer"><!$><!/><!$><!/>`), _tmpl$40 = /* @__PURE__ */ template(`<span class="animate-spin h-4 w-4 border-2 border-current border-t-transparent rounded-full"aria-hidden=true>`), _tmpl$41 = /* @__PURE__ */ template(`<button><!$><!/><!$><!/><!$><!/>`), _tmpl$42 = /* @__PURE__ */ template(`<p class="text-xs text-red-600 dark:text-red-400 mt-1">Type: <!$><!/>`), _tmpl$43 = /* @__PURE__ */ 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$44 = /* @__PURE__ */ template(`<p class="text-xs text-red-500 dark:text-red-500 mt-2">`), _tmpl$45 = /* @__PURE__ */ template(`<div class="relative w-full bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg p-4 group"><!$><!/><div class="flex items-start gap-3"><div class="p-2 bg-red-100 dark:bg-red-900/40 rounded-full shrink-0"><svg class="w-5 h-5 text-red-600 dark:text-red-400"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"></path></svg></div><div class="flex-1 min-w-0"><h4 class="text-sm font-semibold text-red-800 dark:text-red-200">Tool Error: <!$><!/></h4><p class="text-sm text-red-700 dark:text-red-300 mt-1"></p><!$><!/><!$><!/><!$><!/>`), _tmpl$46 = /* @__PURE__ */ template(`<li>`), _tmpl$47 = /* @__PURE__ */ template(`<div class="px-4 py-2 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900"><h3 class="text-sm font-semibold text-gray-900 dark:text-white capitalize">`), _tmpl$48 = /* @__PURE__ */ template(`<div class="w-full bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700 overflow-hidden"><!$><!/><div class="p-4 prose prose-sm dark:prose-invert max-w-none">`), _tmpl$49 = /* @__PURE__ */ template(`<div><div class="grid gap-4"></div><!$><!/>`), _tmpl$50 = /* @__PURE__ */ template(`<div>`);
|
|
23
23
|
function CopyButton(props) {
|
|
24
24
|
const [copied, setCopied] = createSignal(false);
|
|
25
25
|
const handleCopy = async () => {
|
|
@@ -280,6 +280,7 @@ function TableRenderer(props) {
|
|
|
280
280
|
setSortDir("asc");
|
|
281
281
|
}
|
|
282
282
|
setClientPage(0);
|
|
283
|
+
setProgressivePages(1);
|
|
283
284
|
};
|
|
284
285
|
const sortedRows = createMemo(() => {
|
|
285
286
|
var _a;
|
|
@@ -311,16 +312,24 @@ function TableRenderer(props) {
|
|
|
311
312
|
};
|
|
312
313
|
const clientPageSize = () => tableParams.pageSize ?? 25;
|
|
313
314
|
const hasServerPagination = () => !!tableParams.pagination;
|
|
315
|
+
const isProgressiveMode = () => !!tableParams.showAllLabel;
|
|
314
316
|
const needsClientPagination = () => !hasServerPagination() && clientPageSize() > 0 && sortedRows().length > clientPageSize();
|
|
315
317
|
const [clientPage, setClientPage] = createSignal(tableParams.initialPage ?? 0);
|
|
318
|
+
const [progressivePages, setProgressivePages] = createSignal(1);
|
|
316
319
|
const clientTotalPages = () => needsClientPagination() ? Math.ceil(sortedRows().length / clientPageSize()) : 1;
|
|
317
320
|
const clientVisibleRows = createMemo(() => {
|
|
318
321
|
if (!needsClientPagination()) return sortedRows();
|
|
322
|
+
if (isProgressiveMode()) {
|
|
323
|
+
return sortedRows().slice(0, progressivePages() * clientPageSize());
|
|
324
|
+
}
|
|
319
325
|
const start = clientPage() * clientPageSize();
|
|
320
326
|
return sortedRows().slice(start, start + clientPageSize());
|
|
321
327
|
});
|
|
322
|
-
const clientRangeStart = () => needsClientPagination() ? clientPage() * clientPageSize() + 1 : 1;
|
|
323
|
-
const clientRangeEnd = () => needsClientPagination() ? Math.min((clientPage() + 1) * clientPageSize(), sortedRows().length) : sortedRows().length;
|
|
328
|
+
const clientRangeStart = () => needsClientPagination() ? isProgressiveMode() ? 1 : clientPage() * clientPageSize() + 1 : 1;
|
|
329
|
+
const clientRangeEnd = () => needsClientPagination() ? isProgressiveMode() ? Math.min(progressivePages() * clientPageSize(), sortedRows().length) : Math.min((clientPage() + 1) * clientPageSize(), sortedRows().length) : sortedRows().length;
|
|
330
|
+
const progressiveHasMore = () => isProgressiveMode() && needsClientPagination() && progressivePages() < clientTotalPages();
|
|
331
|
+
const progressiveRemaining = () => sortedRows().length - progressivePages() * clientPageSize();
|
|
332
|
+
const showMoreLabel = () => tableParams.showAllLabel || "Show more";
|
|
324
333
|
const [virtualizer, setVirtualizer] = createSignal(null);
|
|
325
334
|
const [isVirtualizing, setIsVirtualizing] = createSignal(false);
|
|
326
335
|
const shouldVirtualize = createMemo(() => {
|
|
@@ -514,7 +523,7 @@ ${dataRows}`;
|
|
|
514
523
|
},
|
|
515
524
|
copyLabel: "Copy table (TSV)",
|
|
516
525
|
get children() {
|
|
517
|
-
var _el$29 = getNextElement(_tmpl$
|
|
526
|
+
var _el$29 = getNextElement(_tmpl$23), _el$125 = _el$29.firstChild, [_el$126, _co$30] = getNextMarker(_el$125.nextSibling), _el$44 = _el$126.nextSibling, _el$117 = _el$44.firstChild, [_el$118, _co$26] = getNextMarker(_el$117.nextSibling), _el$55 = _el$118.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] = getNextMarker(_el$59.nextSibling), _el$119 = _el$55.nextSibling, [_el$120, _co$27] = getNextMarker(_el$119.nextSibling), _el$121 = _el$120.nextSibling, [_el$122, _co$28] = getNextMarker(_el$121.nextSibling), _el$123 = _el$122.nextSibling, [_el$124, _co$29] = getNextMarker(_el$123.nextSibling);
|
|
518
527
|
insert(_el$29, createComponent(Show, {
|
|
519
528
|
when: exportable,
|
|
520
529
|
get fallback() {
|
|
@@ -572,7 +581,7 @@ ${dataRows}`;
|
|
|
572
581
|
runHydrationEvents();
|
|
573
582
|
return _el$30;
|
|
574
583
|
}
|
|
575
|
-
}), _el$
|
|
584
|
+
}), _el$126, _co$30);
|
|
576
585
|
insert(_el$44, createComponent(Show, {
|
|
577
586
|
get when() {
|
|
578
587
|
return tableParams.title;
|
|
@@ -597,7 +606,7 @@ ${dataRows}`;
|
|
|
597
606
|
}), _el$54, _co$1);
|
|
598
607
|
return _el$45;
|
|
599
608
|
}
|
|
600
|
-
}), _el$
|
|
609
|
+
}), _el$118, _co$26);
|
|
601
610
|
var _ref$ = scrollContainerRef;
|
|
602
611
|
typeof _ref$ === "function" ? use(_ref$, _el$55) : scrollContainerRef = _el$55;
|
|
603
612
|
insert(_el$58, createComponent(For, {
|
|
@@ -605,10 +614,10 @@ ${dataRows}`;
|
|
|
605
614
|
return tableParams.columns;
|
|
606
615
|
},
|
|
607
616
|
children: (column) => (() => {
|
|
608
|
-
var _el$
|
|
609
|
-
addEventListener(_el$
|
|
610
|
-
insert(_el$
|
|
611
|
-
insert(_el$
|
|
617
|
+
var _el$127 = getNextElement(_tmpl$24), _el$128 = _el$127.firstChild, _el$130 = _el$128.firstChild, [_el$131, _co$31] = getNextMarker(_el$130.nextSibling), _el$129 = _el$131.nextSibling;
|
|
618
|
+
addEventListener(_el$127, "click", () => handleSort(column.key));
|
|
619
|
+
insert(_el$128, () => column.label, _el$131, _co$31);
|
|
620
|
+
insert(_el$129, () => sortIndicator(column.key));
|
|
612
621
|
effect((_p$) => {
|
|
613
622
|
var _v$11 = column.width ? {
|
|
614
623
|
width: column.width
|
|
@@ -616,16 +625,16 @@ ${dataRows}`;
|
|
|
616
625
|
"opacity-30": sortKey() !== column.key,
|
|
617
626
|
"opacity-100 text-blue-600 dark:text-blue-400": sortKey() === column.key
|
|
618
627
|
};
|
|
619
|
-
_p$.e = style(_el$
|
|
620
|
-
_v$12 !== _p$.t && setAttribute(_el$
|
|
621
|
-
_p$.a = classList(_el$
|
|
628
|
+
_p$.e = style(_el$127, _v$11, _p$.e);
|
|
629
|
+
_v$12 !== _p$.t && setAttribute(_el$127, "title", _p$.t = _v$12);
|
|
630
|
+
_p$.a = classList(_el$129, _v$13, _p$.a);
|
|
622
631
|
return _p$;
|
|
623
632
|
}, {
|
|
624
633
|
e: void 0,
|
|
625
634
|
t: void 0,
|
|
626
635
|
a: void 0
|
|
627
636
|
});
|
|
628
|
-
return _el$
|
|
637
|
+
return _el$127;
|
|
629
638
|
})()
|
|
630
639
|
}));
|
|
631
640
|
insert(_el$56, createComponent(Show, {
|
|
@@ -650,10 +659,10 @@ ${dataRows}`;
|
|
|
650
659
|
insert(_el$62, () => tableParams.pagination.totalRows, _el$73, _co$13);
|
|
651
660
|
return _el$61;
|
|
652
661
|
}
|
|
653
|
-
}), _el$
|
|
662
|
+
}), _el$120, _co$27);
|
|
654
663
|
insert(_el$44, createComponent(Show, {
|
|
655
664
|
get when() {
|
|
656
|
-
return needsClientPagination();
|
|
665
|
+
return memo(() => !!needsClientPagination())() && !isProgressiveMode();
|
|
657
666
|
},
|
|
658
667
|
get children() {
|
|
659
668
|
var _el$74 = getNextElement(_tmpl$20), _el$75 = _el$74.firstChild, _el$76 = _el$75.firstChild, _el$79 = _el$76.nextSibling, [_el$80, _co$14] = getNextMarker(_el$79.nextSibling), _el$77 = _el$80.nextSibling, _el$81 = _el$77.nextSibling, [_el$82, _co$15] = getNextMarker(_el$81.nextSibling), _el$78 = _el$82.nextSibling, _el$83 = _el$78.nextSibling, [_el$84, _co$16] = 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] = getNextMarker(_el$90.nextSibling), _el$89 = _el$91.nextSibling, _el$92 = _el$89.nextSibling, [_el$93, _co$18] = getNextMarker(_el$92.nextSibling), _el$94 = _el$87.nextSibling;
|
|
@@ -676,7 +685,34 @@ ${dataRows}`;
|
|
|
676
685
|
runHydrationEvents();
|
|
677
686
|
return _el$74;
|
|
678
687
|
}
|
|
679
|
-
}), _el$
|
|
688
|
+
}), _el$122, _co$28);
|
|
689
|
+
insert(_el$44, createComponent(Show, {
|
|
690
|
+
get when() {
|
|
691
|
+
return memo(() => !!needsClientPagination())() && isProgressiveMode();
|
|
692
|
+
},
|
|
693
|
+
get children() {
|
|
694
|
+
var _el$95 = getNextElement(_tmpl$22), _el$96 = _el$95.firstChild, _el$99 = _el$96.firstChild, [_el$100, _co$19] = getNextMarker(_el$99.nextSibling), _el$97 = _el$100.nextSibling, _el$101 = _el$97.nextSibling, [_el$102, _co$20] = getNextMarker(_el$101.nextSibling), _el$98 = _el$102.nextSibling, _el$103 = _el$98.nextSibling, [_el$104, _co$21] = getNextMarker(_el$103.nextSibling), _el$115 = _el$96.nextSibling, [_el$116, _co$25] = getNextMarker(_el$115.nextSibling);
|
|
695
|
+
insert(_el$96, clientRangeStart, _el$100, _co$19);
|
|
696
|
+
insert(_el$96, clientRangeEnd, _el$102, _co$20);
|
|
697
|
+
insert(_el$96, () => allRows().length.toLocaleString("fr-FR"), _el$104, _co$21);
|
|
698
|
+
insert(_el$95, createComponent(Show, {
|
|
699
|
+
get when() {
|
|
700
|
+
return progressiveHasMore();
|
|
701
|
+
},
|
|
702
|
+
get children() {
|
|
703
|
+
var _el$105 = getNextElement(_tmpl$21), _el$109 = _el$105.firstChild, [_el$110, _co$22] = getNextMarker(_el$109.nextSibling), _el$106 = _el$110.nextSibling, _el$111 = _el$106.nextSibling, [_el$112, _co$23] = getNextMarker(_el$111.nextSibling), _el$107 = _el$112.nextSibling, _el$113 = _el$107.nextSibling, [_el$114, _co$24] = getNextMarker(_el$113.nextSibling);
|
|
704
|
+
_el$114.nextSibling;
|
|
705
|
+
_el$105.$$click = () => setProgressivePages((p) => p + 1);
|
|
706
|
+
insert(_el$105, showMoreLabel, _el$110, _co$22);
|
|
707
|
+
insert(_el$105, () => Math.min(progressiveRemaining(), clientPageSize()), _el$112, _co$23);
|
|
708
|
+
insert(_el$105, () => Math.min(progressiveRemaining(), clientPageSize()) > 1 ? "es" : "e", _el$114, _co$24);
|
|
709
|
+
runHydrationEvents();
|
|
710
|
+
return _el$105;
|
|
711
|
+
}
|
|
712
|
+
}), _el$116, _co$25);
|
|
713
|
+
return _el$95;
|
|
714
|
+
}
|
|
715
|
+
}), _el$124, _co$29);
|
|
680
716
|
effect((_p$) => {
|
|
681
717
|
var _v$0 = isVirtualizing() ? {
|
|
682
718
|
"max-height": "500px",
|
|
@@ -704,51 +740,51 @@ function MetricRenderer(props) {
|
|
|
704
740
|
return `${title}: ${value}${unit ? " " + unit : ""}`;
|
|
705
741
|
};
|
|
706
742
|
return (() => {
|
|
707
|
-
var _el$
|
|
708
|
-
insert(_el$
|
|
743
|
+
var _el$132 = getNextElement(_tmpl$28), _el$154 = _el$132.firstChild, [_el$155, _co$37] = getNextMarker(_el$154.nextSibling), _el$133 = _el$155.nextSibling, _el$134 = _el$133.firstChild, _el$135 = _el$134.firstChild, _el$136 = _el$135.nextSibling, _el$137 = _el$136.firstChild, _el$139 = _el$137.nextSibling, [_el$140, _co$32] = getNextMarker(_el$139.nextSibling), _el$150 = _el$134.nextSibling, [_el$151, _co$35] = getNextMarker(_el$150.nextSibling), _el$152 = _el$151.nextSibling, [_el$153, _co$36] = getNextMarker(_el$152.nextSibling);
|
|
744
|
+
insert(_el$132, createComponent(CopyButton, {
|
|
709
745
|
getText: getMetricText,
|
|
710
746
|
title: "Copy metric",
|
|
711
747
|
position: "top-right"
|
|
712
|
-
}), _el$
|
|
713
|
-
insert(_el$
|
|
714
|
-
insert(_el$
|
|
715
|
-
insert(_el$
|
|
748
|
+
}), _el$155, _co$37);
|
|
749
|
+
insert(_el$135, () => metricParams.title);
|
|
750
|
+
insert(_el$137, () => metricParams.value);
|
|
751
|
+
insert(_el$136, createComponent(Show, {
|
|
716
752
|
get when() {
|
|
717
753
|
return metricParams.unit;
|
|
718
754
|
},
|
|
719
755
|
get children() {
|
|
720
|
-
var _el$
|
|
721
|
-
insert(_el$
|
|
722
|
-
return _el$
|
|
756
|
+
var _el$138 = getNextElement(_tmpl$25);
|
|
757
|
+
insert(_el$138, () => metricParams.unit);
|
|
758
|
+
return _el$138;
|
|
723
759
|
}
|
|
724
|
-
}), _el$
|
|
725
|
-
insert(_el$
|
|
760
|
+
}), _el$140, _co$32);
|
|
761
|
+
insert(_el$133, createComponent(Show, {
|
|
726
762
|
get when() {
|
|
727
763
|
return metricParams.trend;
|
|
728
764
|
},
|
|
729
765
|
get children() {
|
|
730
|
-
var _el$
|
|
731
|
-
_el$
|
|
732
|
-
insert(_el$
|
|
766
|
+
var _el$141 = getNextElement(_tmpl$26), _el$142 = _el$141.firstChild, _el$145 = _el$142.firstChild, [_el$146, _co$33] = getNextMarker(_el$145.nextSibling), _el$143 = _el$146.nextSibling, _el$147 = _el$143.nextSibling, [_el$148, _co$34] = getNextMarker(_el$147.nextSibling);
|
|
767
|
+
_el$148.nextSibling;
|
|
768
|
+
insert(_el$142, (() => {
|
|
733
769
|
var _c$ = memo(() => metricParams.trend.direction === "up");
|
|
734
770
|
return () => _c$() ? "�" : metricParams.trend.direction === "down" ? "�" : "�";
|
|
735
|
-
})(), _el$
|
|
736
|
-
insert(_el$
|
|
737
|
-
effect(() => className(_el$
|
|
738
|
-
return _el$
|
|
771
|
+
})(), _el$146, _co$33);
|
|
772
|
+
insert(_el$142, () => Math.abs(metricParams.trend.value), _el$148, _co$34);
|
|
773
|
+
effect(() => className(_el$142, `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"}`));
|
|
774
|
+
return _el$141;
|
|
739
775
|
}
|
|
740
|
-
}), _el$
|
|
741
|
-
insert(_el$
|
|
776
|
+
}), _el$151, _co$35);
|
|
777
|
+
insert(_el$133, createComponent(Show, {
|
|
742
778
|
get when() {
|
|
743
779
|
return metricParams.subtitle;
|
|
744
780
|
},
|
|
745
781
|
get children() {
|
|
746
|
-
var _el$
|
|
747
|
-
insert(_el$
|
|
748
|
-
return _el$
|
|
782
|
+
var _el$149 = getNextElement(_tmpl$27);
|
|
783
|
+
insert(_el$149, () => metricParams.subtitle);
|
|
784
|
+
return _el$149;
|
|
749
785
|
}
|
|
750
|
-
}), _el$
|
|
751
|
-
return _el$
|
|
786
|
+
}), _el$153, _co$36);
|
|
787
|
+
return _el$132;
|
|
752
788
|
})();
|
|
753
789
|
}
|
|
754
790
|
function extractImageFromMarkdown(content) {
|
|
@@ -789,62 +825,62 @@ function TextRenderer(props) {
|
|
|
789
825
|
},
|
|
790
826
|
get fallback() {
|
|
791
827
|
return (() => {
|
|
792
|
-
var _el$
|
|
793
|
-
insert(_el$
|
|
828
|
+
var _el$156 = getNextElement(_tmpl$29), _el$158 = _el$156.firstChild, [_el$159, _co$38] = getNextMarker(_el$158.nextSibling), _el$157 = _el$159.nextSibling;
|
|
829
|
+
insert(_el$156, createComponent(CopyButton, {
|
|
794
830
|
getText: getTextContent,
|
|
795
831
|
title: "Copy text",
|
|
796
832
|
position: "top-right"
|
|
797
|
-
}), _el$
|
|
833
|
+
}), _el$159, _co$38);
|
|
798
834
|
effect((_p$) => {
|
|
799
835
|
var _v$14 = `prose prose-sm dark:prose-invert max-w-none ${textParams.className || ""}`, _v$15 = htmlContent();
|
|
800
|
-
_v$14 !== _p$.e && className(_el$
|
|
801
|
-
_v$15 !== _p$.t && setProperty(_el$
|
|
836
|
+
_v$14 !== _p$.e && className(_el$157, _p$.e = _v$14);
|
|
837
|
+
_v$15 !== _p$.t && setProperty(_el$157, "innerHTML", _p$.t = _v$15);
|
|
802
838
|
return _p$;
|
|
803
839
|
}, {
|
|
804
840
|
e: void 0,
|
|
805
841
|
t: void 0
|
|
806
842
|
});
|
|
807
|
-
return _el$
|
|
843
|
+
return _el$156;
|
|
808
844
|
})();
|
|
809
845
|
},
|
|
810
846
|
children: (data) => (() => {
|
|
811
|
-
var _el$
|
|
812
|
-
insert(_el$
|
|
847
|
+
var _el$160 = getNextElement(_tmpl$30), _el$161 = _el$160.firstChild, _el$162 = _el$161.firstChild, _el$163 = _el$162.firstChild, _el$164 = _el$161.nextSibling, _el$165 = _el$164.firstChild;
|
|
848
|
+
insert(_el$165, () => data().credit);
|
|
813
849
|
effect((_p$) => {
|
|
814
850
|
var _v$16 = data().linkUrl, _v$17 = data().imageUrl, _v$18 = data().alt;
|
|
815
|
-
_v$16 !== _p$.e && setAttribute(_el$
|
|
816
|
-
_v$17 !== _p$.t && setAttribute(_el$
|
|
817
|
-
_v$18 !== _p$.a && setAttribute(_el$
|
|
851
|
+
_v$16 !== _p$.e && setAttribute(_el$162, "href", _p$.e = _v$16);
|
|
852
|
+
_v$17 !== _p$.t && setAttribute(_el$163, "src", _p$.t = _v$17);
|
|
853
|
+
_v$18 !== _p$.a && setAttribute(_el$163, "alt", _p$.a = _v$18);
|
|
818
854
|
return _p$;
|
|
819
855
|
}, {
|
|
820
856
|
e: void 0,
|
|
821
857
|
t: void 0,
|
|
822
858
|
a: void 0
|
|
823
859
|
});
|
|
824
|
-
return _el$
|
|
860
|
+
return _el$160;
|
|
825
861
|
})()
|
|
826
862
|
});
|
|
827
863
|
}
|
|
828
864
|
function IframeRenderer(props) {
|
|
829
865
|
const params = props.component.params;
|
|
830
866
|
return (() => {
|
|
831
|
-
var _el$
|
|
832
|
-
insert(_el$
|
|
867
|
+
var _el$166 = getNextElement(_tmpl$32), _el$170 = _el$166.firstChild, [_el$171, _co$39] = getNextMarker(_el$170.nextSibling), _el$169 = _el$171.nextSibling;
|
|
868
|
+
insert(_el$166, createComponent(Show, {
|
|
833
869
|
get when() {
|
|
834
870
|
return params.title;
|
|
835
871
|
},
|
|
836
872
|
get children() {
|
|
837
|
-
var _el$
|
|
838
|
-
insert(_el$
|
|
839
|
-
return _el$
|
|
873
|
+
var _el$167 = getNextElement(_tmpl$31), _el$168 = _el$167.firstChild;
|
|
874
|
+
insert(_el$168, () => params.title);
|
|
875
|
+
return _el$167;
|
|
840
876
|
}
|
|
841
|
-
}), _el$
|
|
877
|
+
}), _el$171, _co$39);
|
|
842
878
|
effect((_p$) => {
|
|
843
879
|
var _v$19 = params.url, _v$20 = params.title || "Embedded content", _v$21 = `height: ${params.height || "400px"}; min-height: 300px;`, _v$22 = getIframeSandbox(params.url);
|
|
844
|
-
_v$19 !== _p$.e && setAttribute(_el$
|
|
845
|
-
_v$20 !== _p$.t && setAttribute(_el$
|
|
846
|
-
_p$.a = style(_el$
|
|
847
|
-
_v$22 !== _p$.o && setAttribute(_el$
|
|
880
|
+
_v$19 !== _p$.e && setAttribute(_el$169, "src", _p$.e = _v$19);
|
|
881
|
+
_v$20 !== _p$.t && setAttribute(_el$169, "title", _p$.t = _v$20);
|
|
882
|
+
_p$.a = style(_el$169, _v$21, _p$.a);
|
|
883
|
+
_v$22 !== _p$.o && setAttribute(_el$169, "sandbox", _p$.o = _v$22);
|
|
848
884
|
return _p$;
|
|
849
885
|
}, {
|
|
850
886
|
e: void 0,
|
|
@@ -852,30 +888,30 @@ function IframeRenderer(props) {
|
|
|
852
888
|
a: void 0,
|
|
853
889
|
o: void 0
|
|
854
890
|
});
|
|
855
|
-
return _el$
|
|
891
|
+
return _el$166;
|
|
856
892
|
})();
|
|
857
893
|
}
|
|
858
894
|
function ImageRenderer(props) {
|
|
859
895
|
const params = props.component.params;
|
|
860
896
|
return (() => {
|
|
861
|
-
var _el$
|
|
862
|
-
insert(_el$
|
|
897
|
+
var _el$172 = getNextElement(_tmpl$34), _el$173 = _el$172.firstChild, _el$174 = _el$173.firstChild, _el$175 = _el$174.firstChild, _el$178 = _el$173.nextSibling, [_el$179, _co$40] = getNextMarker(_el$178.nextSibling);
|
|
898
|
+
insert(_el$172, createComponent(Show, {
|
|
863
899
|
get when() {
|
|
864
900
|
return params.caption;
|
|
865
901
|
},
|
|
866
902
|
get children() {
|
|
867
|
-
var _el$
|
|
868
|
-
insert(_el$
|
|
869
|
-
return _el$
|
|
903
|
+
var _el$176 = getNextElement(_tmpl$33), _el$177 = _el$176.firstChild;
|
|
904
|
+
insert(_el$177, () => params.caption);
|
|
905
|
+
return _el$176;
|
|
870
906
|
}
|
|
871
|
-
}), _el$
|
|
907
|
+
}), _el$179, _co$40);
|
|
872
908
|
effect((_p$) => {
|
|
873
909
|
var _v$23 = `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$24 = params.url, _v$25 = `View full size: ${params.alt || "image"}`, _v$26 = params.url, _v$27 = params.alt || "Image";
|
|
874
|
-
_v$23 !== _p$.e && className(_el$
|
|
875
|
-
_v$24 !== _p$.t && setAttribute(_el$
|
|
876
|
-
_v$25 !== _p$.a && setAttribute(_el$
|
|
877
|
-
_v$26 !== _p$.o && setAttribute(_el$
|
|
878
|
-
_v$27 !== _p$.i && setAttribute(_el$
|
|
910
|
+
_v$23 !== _p$.e && className(_el$172, _p$.e = _v$23);
|
|
911
|
+
_v$24 !== _p$.t && setAttribute(_el$174, "href", _p$.t = _v$24);
|
|
912
|
+
_v$25 !== _p$.a && setAttribute(_el$174, "aria-label", _p$.a = _v$25);
|
|
913
|
+
_v$26 !== _p$.o && setAttribute(_el$175, "src", _p$.o = _v$26);
|
|
914
|
+
_v$27 !== _p$.i && setAttribute(_el$175, "alt", _p$.i = _v$27);
|
|
879
915
|
return _p$;
|
|
880
916
|
}, {
|
|
881
917
|
e: void 0,
|
|
@@ -884,30 +920,30 @@ function ImageRenderer(props) {
|
|
|
884
920
|
o: void 0,
|
|
885
921
|
i: void 0
|
|
886
922
|
});
|
|
887
|
-
return _el$
|
|
923
|
+
return _el$172;
|
|
888
924
|
})();
|
|
889
925
|
}
|
|
890
926
|
function LinkRenderer(props) {
|
|
891
927
|
const params = props.component.params;
|
|
892
928
|
return (() => {
|
|
893
|
-
var _el$
|
|
894
|
-
_el$
|
|
895
|
-
insert(_el$
|
|
896
|
-
insert(_el$
|
|
929
|
+
var _el$180 = getNextElement(_tmpl$36), _el$181 = _el$180.firstChild, _el$182 = _el$181.nextSibling, _el$183 = _el$182.firstChild, _el$185 = _el$183.nextSibling, [_el$186, _co$41] = getNextMarker(_el$185.nextSibling);
|
|
930
|
+
_el$180.$$click = (e) => e.stopPropagation();
|
|
931
|
+
insert(_el$183, () => params.label || params.url);
|
|
932
|
+
insert(_el$182, createComponent(Show, {
|
|
897
933
|
get when() {
|
|
898
934
|
return params.description;
|
|
899
935
|
},
|
|
900
936
|
get children() {
|
|
901
|
-
var _el$
|
|
902
|
-
insert(_el$
|
|
903
|
-
return _el$
|
|
937
|
+
var _el$184 = getNextElement(_tmpl$35);
|
|
938
|
+
insert(_el$184, () => params.description);
|
|
939
|
+
return _el$184;
|
|
904
940
|
}
|
|
905
|
-
}), _el$
|
|
941
|
+
}), _el$186, _co$41);
|
|
906
942
|
effect((_p$) => {
|
|
907
943
|
var _v$28 = params.url, _v$29 = `${params.label || "Link"}: ${params.description || params.url} (opens in new tab)`, _v$30 = `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 || ""}`;
|
|
908
|
-
_v$28 !== _p$.e && setAttribute(_el$
|
|
909
|
-
_v$29 !== _p$.t && setAttribute(_el$
|
|
910
|
-
_v$30 !== _p$.a && className(_el$
|
|
944
|
+
_v$28 !== _p$.e && setAttribute(_el$180, "href", _p$.e = _v$28);
|
|
945
|
+
_v$29 !== _p$.t && setAttribute(_el$180, "aria-label", _p$.t = _v$29);
|
|
946
|
+
_v$30 !== _p$.a && className(_el$180, _p$.a = _v$30);
|
|
911
947
|
return _p$;
|
|
912
948
|
}, {
|
|
913
949
|
e: void 0,
|
|
@@ -915,7 +951,7 @@ function LinkRenderer(props) {
|
|
|
915
951
|
a: void 0
|
|
916
952
|
});
|
|
917
953
|
runHydrationEvents();
|
|
918
|
-
return _el$
|
|
954
|
+
return _el$180;
|
|
919
955
|
})();
|
|
920
956
|
}
|
|
921
957
|
function ComponentRenderer(props) {
|
|
@@ -929,12 +965,12 @@ function ComponentRenderer(props) {
|
|
|
929
965
|
details: validation.errors
|
|
930
966
|
});
|
|
931
967
|
return (() => {
|
|
932
|
-
var _el$
|
|
933
|
-
insert(_el$
|
|
968
|
+
var _el$187 = getNextElement(_tmpl$37), _el$188 = _el$187.firstChild, _el$189 = _el$188.nextSibling;
|
|
969
|
+
insert(_el$189, () => {
|
|
934
970
|
var _a2, _b;
|
|
935
971
|
return ((_b = (_a2 = validation.errors) == null ? void 0 : _a2[0]) == null ? void 0 : _b.message) || "Unknown validation error";
|
|
936
972
|
});
|
|
937
|
-
return _el$
|
|
973
|
+
return _el$187;
|
|
938
974
|
})();
|
|
939
975
|
}
|
|
940
976
|
return createComponent(GenerativeUIErrorBoundary, {
|
|
@@ -1180,27 +1216,27 @@ function ActionRenderer(props) {
|
|
|
1180
1216
|
const isDisabled = () => params.disabled || params.action === "tool-call" && isExecuting();
|
|
1181
1217
|
if (params.type === "link" || params.action === "link") {
|
|
1182
1218
|
return (() => {
|
|
1183
|
-
var _el$
|
|
1184
|
-
_el$
|
|
1185
|
-
insert(_el$
|
|
1219
|
+
var _el$190 = getNextElement(_tmpl$39), _el$192 = _el$190.firstChild, [_el$193, _co$42] = getNextMarker(_el$192.nextSibling), _el$194 = _el$193.nextSibling, [_el$195, _co$43] = getNextMarker(_el$194.nextSibling);
|
|
1220
|
+
_el$190.$$click = handleClick;
|
|
1221
|
+
insert(_el$190, createComponent(Show, {
|
|
1186
1222
|
get when() {
|
|
1187
1223
|
return params.icon;
|
|
1188
1224
|
},
|
|
1189
1225
|
get children() {
|
|
1190
|
-
var _el$
|
|
1191
|
-
insert(_el$
|
|
1192
|
-
return _el$
|
|
1226
|
+
var _el$191 = getNextElement(_tmpl$38);
|
|
1227
|
+
insert(_el$191, () => params.icon);
|
|
1228
|
+
return _el$191;
|
|
1193
1229
|
}
|
|
1194
|
-
}), _el$
|
|
1195
|
-
insert(_el$
|
|
1230
|
+
}), _el$193, _co$42);
|
|
1231
|
+
insert(_el$190, () => params.label, _el$195, _co$43);
|
|
1196
1232
|
effect((_p$) => {
|
|
1197
1233
|
var _v$31 = params.url || "#", _v$32 = params.url ? "_blank" : void 0, _v$33 = params.ariaLabel || params.label, _v$34 = `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
|
|
1198
1234
|
${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"}
|
|
1199
1235
|
${params.className || ""}`;
|
|
1200
|
-
_v$31 !== _p$.e && setAttribute(_el$
|
|
1201
|
-
_v$32 !== _p$.t && setAttribute(_el$
|
|
1202
|
-
_v$33 !== _p$.a && setAttribute(_el$
|
|
1203
|
-
_v$34 !== _p$.o && className(_el$
|
|
1236
|
+
_v$31 !== _p$.e && setAttribute(_el$190, "href", _p$.e = _v$31);
|
|
1237
|
+
_v$32 !== _p$.t && setAttribute(_el$190, "target", _p$.t = _v$32);
|
|
1238
|
+
_v$33 !== _p$.a && setAttribute(_el$190, "aria-label", _p$.a = _v$33);
|
|
1239
|
+
_v$34 !== _p$.o && className(_el$190, _p$.o = _v$34);
|
|
1204
1240
|
return _p$;
|
|
1205
1241
|
}, {
|
|
1206
1242
|
e: void 0,
|
|
@@ -1209,42 +1245,42 @@ function ActionRenderer(props) {
|
|
|
1209
1245
|
o: void 0
|
|
1210
1246
|
});
|
|
1211
1247
|
runHydrationEvents();
|
|
1212
|
-
return _el$
|
|
1248
|
+
return _el$190;
|
|
1213
1249
|
})();
|
|
1214
1250
|
}
|
|
1215
1251
|
return (() => {
|
|
1216
|
-
var _el$
|
|
1217
|
-
_el$
|
|
1218
|
-
insert(_el$
|
|
1252
|
+
var _el$196 = getNextElement(_tmpl$41), _el$199 = _el$196.firstChild, [_el$200, _co$44] = getNextMarker(_el$199.nextSibling), _el$201 = _el$200.nextSibling, [_el$202, _co$45] = getNextMarker(_el$201.nextSibling), _el$203 = _el$202.nextSibling, [_el$204, _co$46] = getNextMarker(_el$203.nextSibling);
|
|
1253
|
+
_el$196.$$click = handleClick;
|
|
1254
|
+
insert(_el$196, createComponent(Show, {
|
|
1219
1255
|
get when() {
|
|
1220
1256
|
return memo(() => !!isExecuting())() && params.action === "tool-call";
|
|
1221
1257
|
},
|
|
1222
1258
|
get children() {
|
|
1223
|
-
return getNextElement(_tmpl$
|
|
1259
|
+
return getNextElement(_tmpl$40);
|
|
1224
1260
|
}
|
|
1225
|
-
}), _el$
|
|
1226
|
-
insert(_el$
|
|
1261
|
+
}), _el$200, _co$44);
|
|
1262
|
+
insert(_el$196, createComponent(Show, {
|
|
1227
1263
|
get when() {
|
|
1228
1264
|
return memo(() => !!params.icon)() && !(isExecuting() && params.action === "tool-call");
|
|
1229
1265
|
},
|
|
1230
1266
|
get children() {
|
|
1231
|
-
var _el$
|
|
1232
|
-
insert(_el$
|
|
1233
|
-
return _el$
|
|
1267
|
+
var _el$198 = getNextElement(_tmpl$38);
|
|
1268
|
+
insert(_el$198, () => params.icon);
|
|
1269
|
+
return _el$198;
|
|
1234
1270
|
}
|
|
1235
|
-
}), _el$
|
|
1236
|
-
insert(_el$
|
|
1271
|
+
}), _el$202, _co$45);
|
|
1272
|
+
insert(_el$196, () => params.label, _el$204, _co$46);
|
|
1237
1273
|
effect((_p$) => {
|
|
1238
1274
|
var _v$35 = params.action === "submit" ? "submit" : "button", _v$36 = isDisabled(), _v$37 = isExecuting() && params.action === "tool-call", _v$38 = params.ariaLabel || params.label, _v$39 = `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
|
|
1239
1275
|
${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"}
|
|
1240
1276
|
${isDisabled() ? "opacity-50 cursor-not-allowed" : ""}
|
|
1241
1277
|
${params.size === "sm" ? "px-3 py-1.5 text-xs" : params.size === "lg" ? "px-6 py-3 text-base" : ""}
|
|
1242
1278
|
${params.className || ""}`;
|
|
1243
|
-
_v$35 !== _p$.e && setAttribute(_el$
|
|
1244
|
-
_v$36 !== _p$.t && setProperty(_el$
|
|
1245
|
-
_v$37 !== _p$.a && setAttribute(_el$
|
|
1246
|
-
_v$38 !== _p$.o && setAttribute(_el$
|
|
1247
|
-
_v$39 !== _p$.i && className(_el$
|
|
1279
|
+
_v$35 !== _p$.e && setAttribute(_el$196, "type", _p$.e = _v$35);
|
|
1280
|
+
_v$36 !== _p$.t && setProperty(_el$196, "disabled", _p$.t = _v$36);
|
|
1281
|
+
_v$37 !== _p$.a && setAttribute(_el$196, "aria-busy", _p$.a = _v$37);
|
|
1282
|
+
_v$38 !== _p$.o && setAttribute(_el$196, "aria-label", _p$.o = _v$38);
|
|
1283
|
+
_v$39 !== _p$.i && className(_el$196, _p$.i = _v$39);
|
|
1248
1284
|
return _p$;
|
|
1249
1285
|
}, {
|
|
1250
1286
|
e: void 0,
|
|
@@ -1254,7 +1290,7 @@ function ActionRenderer(props) {
|
|
|
1254
1290
|
i: void 0
|
|
1255
1291
|
});
|
|
1256
1292
|
runHydrationEvents();
|
|
1257
|
-
return _el$
|
|
1293
|
+
return _el$196;
|
|
1258
1294
|
})();
|
|
1259
1295
|
}
|
|
1260
1296
|
function ErrorCardRenderer(props) {
|
|
@@ -1262,55 +1298,55 @@ function ErrorCardRenderer(props) {
|
|
|
1262
1298
|
return `Error in ${props.error.tool || "unknown tool"}: ${props.error.message || "Unknown error"}`;
|
|
1263
1299
|
};
|
|
1264
1300
|
return (() => {
|
|
1265
|
-
var _el$
|
|
1266
|
-
insert(_el$
|
|
1301
|
+
var _el$205 = getNextElement(_tmpl$45), _el$228 = _el$205.firstChild, [_el$229, _co$52] = getNextMarker(_el$228.nextSibling), _el$206 = _el$229.nextSibling, _el$207 = _el$206.firstChild, _el$208 = _el$207.nextSibling, _el$209 = _el$208.firstChild, _el$210 = _el$209.firstChild, _el$211 = _el$210.nextSibling, [_el$212, _co$47] = getNextMarker(_el$211.nextSibling), _el$213 = _el$209.nextSibling, _el$222 = _el$213.nextSibling, [_el$223, _co$49] = getNextMarker(_el$222.nextSibling), _el$224 = _el$223.nextSibling, [_el$225, _co$50] = getNextMarker(_el$224.nextSibling), _el$226 = _el$225.nextSibling, [_el$227, _co$51] = getNextMarker(_el$226.nextSibling);
|
|
1302
|
+
insert(_el$205, createComponent(CopyButton, {
|
|
1267
1303
|
getText: getErrorText,
|
|
1268
1304
|
title: "Copy error details",
|
|
1269
1305
|
position: "top-right"
|
|
1270
|
-
}), _el$
|
|
1271
|
-
insert(_el$
|
|
1272
|
-
insert(_el$
|
|
1273
|
-
insert(_el$
|
|
1306
|
+
}), _el$229, _co$52);
|
|
1307
|
+
insert(_el$209, () => props.error.tool || "Unknown", _el$212, _co$47);
|
|
1308
|
+
insert(_el$213, () => props.error.message || "An error occurred during tool execution");
|
|
1309
|
+
insert(_el$208, createComponent(Show, {
|
|
1274
1310
|
get when() {
|
|
1275
1311
|
return props.error.type;
|
|
1276
1312
|
},
|
|
1277
1313
|
get children() {
|
|
1278
|
-
var _el$
|
|
1279
|
-
insert(_el$
|
|
1280
|
-
return _el$
|
|
1314
|
+
var _el$214 = getNextElement(_tmpl$42), _el$215 = _el$214.firstChild, _el$216 = _el$215.nextSibling, [_el$217, _co$48] = getNextMarker(_el$216.nextSibling);
|
|
1315
|
+
insert(_el$214, () => props.error.type, _el$217, _co$48);
|
|
1316
|
+
return _el$214;
|
|
1281
1317
|
}
|
|
1282
|
-
}), _el$
|
|
1283
|
-
insert(_el$
|
|
1318
|
+
}), _el$223, _co$49);
|
|
1319
|
+
insert(_el$208, createComponent(Show, {
|
|
1284
1320
|
get when() {
|
|
1285
1321
|
var _a;
|
|
1286
1322
|
return (_a = props.error.suggestions) == null ? void 0 : _a.length;
|
|
1287
1323
|
},
|
|
1288
1324
|
get children() {
|
|
1289
|
-
var _el$
|
|
1290
|
-
insert(_el$
|
|
1325
|
+
var _el$218 = getNextElement(_tmpl$43), _el$219 = _el$218.firstChild, _el$220 = _el$219.nextSibling;
|
|
1326
|
+
insert(_el$220, createComponent(For, {
|
|
1291
1327
|
get each() {
|
|
1292
1328
|
return props.error.suggestions;
|
|
1293
1329
|
},
|
|
1294
1330
|
children: (suggestion) => (() => {
|
|
1295
|
-
var _el$
|
|
1296
|
-
insert(_el$
|
|
1297
|
-
return _el$
|
|
1331
|
+
var _el$230 = getNextElement(_tmpl$46);
|
|
1332
|
+
insert(_el$230, suggestion);
|
|
1333
|
+
return _el$230;
|
|
1298
1334
|
})()
|
|
1299
1335
|
}));
|
|
1300
|
-
return _el$
|
|
1336
|
+
return _el$218;
|
|
1301
1337
|
}
|
|
1302
|
-
}), _el$
|
|
1303
|
-
insert(_el$
|
|
1338
|
+
}), _el$225, _co$50);
|
|
1339
|
+
insert(_el$208, createComponent(Show, {
|
|
1304
1340
|
get when() {
|
|
1305
1341
|
return props.error.timestamp;
|
|
1306
1342
|
},
|
|
1307
1343
|
get children() {
|
|
1308
|
-
var _el$
|
|
1309
|
-
insert(_el$
|
|
1310
|
-
return _el$
|
|
1344
|
+
var _el$221 = getNextElement(_tmpl$44);
|
|
1345
|
+
insert(_el$221, () => new Date(props.error.timestamp).toLocaleString());
|
|
1346
|
+
return _el$221;
|
|
1311
1347
|
}
|
|
1312
|
-
}), _el$
|
|
1313
|
-
return _el$
|
|
1348
|
+
}), _el$227, _co$51);
|
|
1349
|
+
return _el$205;
|
|
1314
1350
|
})();
|
|
1315
1351
|
}
|
|
1316
1352
|
function isErrorResponse(content) {
|
|
@@ -1333,20 +1369,20 @@ function UIResourceHtmlRenderer(props) {
|
|
|
1333
1369
|
return ((_a = props.resource.metadata) == null ? void 0 : _a.title) || ((_b = props.resource.uri) == null ? void 0 : _b.replace("ui://deposium/", "")) || "Resource";
|
|
1334
1370
|
};
|
|
1335
1371
|
return (() => {
|
|
1336
|
-
var _el$
|
|
1337
|
-
insert(_el$
|
|
1372
|
+
var _el$231 = getNextElement(_tmpl$48), _el$235 = _el$231.firstChild, [_el$236, _co$53] = getNextMarker(_el$235.nextSibling), _el$234 = _el$236.nextSibling;
|
|
1373
|
+
insert(_el$231, createComponent(Show, {
|
|
1338
1374
|
get when() {
|
|
1339
1375
|
var _a;
|
|
1340
1376
|
return ((_a = props.resource.metadata) == null ? void 0 : _a.title) || props.resource.uri;
|
|
1341
1377
|
},
|
|
1342
1378
|
get children() {
|
|
1343
|
-
var _el$
|
|
1344
|
-
insert(_el$
|
|
1345
|
-
return _el$
|
|
1379
|
+
var _el$232 = getNextElement(_tmpl$47), _el$233 = _el$232.firstChild;
|
|
1380
|
+
insert(_el$233, resourceTitle);
|
|
1381
|
+
return _el$232;
|
|
1346
1382
|
}
|
|
1347
|
-
}), _el$
|
|
1348
|
-
effect(() => setProperty(_el$
|
|
1349
|
-
return _el$
|
|
1383
|
+
}), _el$236, _co$53);
|
|
1384
|
+
effect(() => setProperty(_el$234, "innerHTML", htmlContent()));
|
|
1385
|
+
return _el$231;
|
|
1350
1386
|
})();
|
|
1351
1387
|
}
|
|
1352
1388
|
const UIResourceRenderer = (props) => {
|
|
@@ -1426,24 +1462,24 @@ const UIResourceRenderer = (props) => {
|
|
|
1426
1462
|
return createComponent(RenderProvider, {
|
|
1427
1463
|
renderComponent,
|
|
1428
1464
|
get children() {
|
|
1429
|
-
var _el$
|
|
1430
|
-
insert(_el$
|
|
1465
|
+
var _el$237 = getNextElement(_tmpl$49), _el$238 = _el$237.firstChild, _el$239 = _el$238.nextSibling, [_el$240, _co$54] = getNextMarker(_el$239.nextSibling);
|
|
1466
|
+
insert(_el$238, createComponent(For, {
|
|
1431
1467
|
get each() {
|
|
1432
1468
|
return layoutData.components;
|
|
1433
1469
|
},
|
|
1434
1470
|
children: (component) => (() => {
|
|
1435
|
-
var _el$
|
|
1436
|
-
insert(_el$
|
|
1471
|
+
var _el$241 = getNextElement(_tmpl$50);
|
|
1472
|
+
insert(_el$241, createComponent(ComponentRenderer, {
|
|
1437
1473
|
component,
|
|
1438
1474
|
get onError() {
|
|
1439
1475
|
return props.onError;
|
|
1440
1476
|
}
|
|
1441
1477
|
}));
|
|
1442
|
-
effect((_$p) => style(_el$
|
|
1443
|
-
return _el$
|
|
1478
|
+
effect((_$p) => style(_el$241, getGridStyleString(component), _$p));
|
|
1479
|
+
return _el$241;
|
|
1444
1480
|
})()
|
|
1445
1481
|
}));
|
|
1446
|
-
insert(_el$
|
|
1482
|
+
insert(_el$237, createComponent(Show, {
|
|
1447
1483
|
get when() {
|
|
1448
1484
|
return shouldShowAutoFooter();
|
|
1449
1485
|
},
|
|
@@ -1454,17 +1490,17 @@ const UIResourceRenderer = (props) => {
|
|
|
1454
1490
|
}
|
|
1455
1491
|
});
|
|
1456
1492
|
}
|
|
1457
|
-
}), _el$
|
|
1493
|
+
}), _el$240, _co$54);
|
|
1458
1494
|
effect((_p$) => {
|
|
1459
1495
|
var _v$40 = `w-full ${props.class || ""}`, _v$41 = gridContainerStyle();
|
|
1460
|
-
_v$40 !== _p$.e && className(_el$
|
|
1461
|
-
_p$.t = style(_el$
|
|
1496
|
+
_v$40 !== _p$.e && className(_el$237, _p$.e = _v$40);
|
|
1497
|
+
_p$.t = style(_el$238, _v$41, _p$.t);
|
|
1462
1498
|
return _p$;
|
|
1463
1499
|
}, {
|
|
1464
1500
|
e: void 0,
|
|
1465
1501
|
t: void 0
|
|
1466
1502
|
});
|
|
1467
|
-
return _el$
|
|
1503
|
+
return _el$237;
|
|
1468
1504
|
}
|
|
1469
1505
|
});
|
|
1470
1506
|
};
|