@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
|
@@ -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="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 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__ */ 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>`);
|
|
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(`<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__ */ web.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__ */ 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$24 = /* @__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 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__ */ web.template(`<span class="ml-2 text-sm font-medium text-gray-500 dark:text-gray-400">`), _tmpl$26 = /* @__PURE__ */ web.template(`<div class="mt-3 flex items-center"><span><!$><!/> <!$><!/>%`), _tmpl$27 = /* @__PURE__ */ web.template(`<p class="mt-2 text-xs text-gray-500 dark:text-gray-400">`), _tmpl$28 = /* @__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$29 = /* @__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$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"><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__ */ 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$32 = /* @__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$33 = /* @__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$34 = /* @__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$35 = /* @__PURE__ */ web.template(`<p class="text-xs text-gray-500 dark:text-gray-400 truncate">`), _tmpl$36 = /* @__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$37 = /* @__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$38 = /* @__PURE__ */ web.template(`<span aria-hidden=true>`), _tmpl$39 = /* @__PURE__ */ web.template(`<a rel="noopener noreferrer"><!$><!/><!$><!/>`), _tmpl$40 = /* @__PURE__ */ web.template(`<span class="animate-spin h-4 w-4 border-2 border-current border-t-transparent rounded-full"aria-hidden=true>`), _tmpl$41 = /* @__PURE__ */ web.template(`<button><!$><!/><!$><!/><!$><!/>`), _tmpl$42 = /* @__PURE__ */ web.template(`<p class="text-xs text-red-600 dark:text-red-400 mt-1">Type: <!$><!/>`), _tmpl$43 = /* @__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$44 = /* @__PURE__ */ web.template(`<p class="text-xs text-red-500 dark:text-red-500 mt-2">`), _tmpl$45 = /* @__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$46 = /* @__PURE__ */ web.template(`<li>`), _tmpl$47 = /* @__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$48 = /* @__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$49 = /* @__PURE__ */ web.template(`<div><div class="grid gap-4"></div><!$><!/>`), _tmpl$50 = /* @__PURE__ */ web.template(`<div>`);
|
|
25
25
|
function CopyButton(props) {
|
|
26
26
|
const [copied, setCopied] = solidJs.createSignal(false);
|
|
27
27
|
const handleCopy = async () => {
|
|
@@ -282,6 +282,7 @@ function TableRenderer(props) {
|
|
|
282
282
|
setSortDir("asc");
|
|
283
283
|
}
|
|
284
284
|
setClientPage(0);
|
|
285
|
+
setProgressivePages(1);
|
|
285
286
|
};
|
|
286
287
|
const sortedRows = solidJs.createMemo(() => {
|
|
287
288
|
var _a;
|
|
@@ -313,16 +314,24 @@ function TableRenderer(props) {
|
|
|
313
314
|
};
|
|
314
315
|
const clientPageSize = () => tableParams.pageSize ?? 25;
|
|
315
316
|
const hasServerPagination = () => !!tableParams.pagination;
|
|
317
|
+
const isProgressiveMode = () => !!tableParams.showAllLabel;
|
|
316
318
|
const needsClientPagination = () => !hasServerPagination() && clientPageSize() > 0 && sortedRows().length > clientPageSize();
|
|
317
319
|
const [clientPage, setClientPage] = solidJs.createSignal(tableParams.initialPage ?? 0);
|
|
320
|
+
const [progressivePages, setProgressivePages] = solidJs.createSignal(1);
|
|
318
321
|
const clientTotalPages = () => needsClientPagination() ? Math.ceil(sortedRows().length / clientPageSize()) : 1;
|
|
319
322
|
const clientVisibleRows = solidJs.createMemo(() => {
|
|
320
323
|
if (!needsClientPagination()) return sortedRows();
|
|
324
|
+
if (isProgressiveMode()) {
|
|
325
|
+
return sortedRows().slice(0, progressivePages() * clientPageSize());
|
|
326
|
+
}
|
|
321
327
|
const start = clientPage() * clientPageSize();
|
|
322
328
|
return sortedRows().slice(start, start + clientPageSize());
|
|
323
329
|
});
|
|
324
|
-
const clientRangeStart = () => needsClientPagination() ? clientPage() * clientPageSize() + 1 : 1;
|
|
325
|
-
const clientRangeEnd = () => needsClientPagination() ? Math.min((clientPage() + 1) * clientPageSize(), sortedRows().length) : sortedRows().length;
|
|
330
|
+
const clientRangeStart = () => needsClientPagination() ? isProgressiveMode() ? 1 : clientPage() * clientPageSize() + 1 : 1;
|
|
331
|
+
const clientRangeEnd = () => needsClientPagination() ? isProgressiveMode() ? Math.min(progressivePages() * clientPageSize(), sortedRows().length) : Math.min((clientPage() + 1) * clientPageSize(), sortedRows().length) : sortedRows().length;
|
|
332
|
+
const progressiveHasMore = () => isProgressiveMode() && needsClientPagination() && progressivePages() < clientTotalPages();
|
|
333
|
+
const progressiveRemaining = () => sortedRows().length - progressivePages() * clientPageSize();
|
|
334
|
+
const showMoreLabel = () => tableParams.showAllLabel || "Show more";
|
|
326
335
|
const [virtualizer, setVirtualizer] = solidJs.createSignal(null);
|
|
327
336
|
const [isVirtualizing, setIsVirtualizing] = solidJs.createSignal(false);
|
|
328
337
|
const shouldVirtualize = solidJs.createMemo(() => {
|
|
@@ -516,7 +525,7 @@ ${dataRows}`;
|
|
|
516
525
|
},
|
|
517
526
|
copyLabel: "Copy table (TSV)",
|
|
518
527
|
get children() {
|
|
519
|
-
var _el$29 = web.getNextElement(_tmpl$
|
|
528
|
+
var _el$29 = web.getNextElement(_tmpl$23), _el$125 = _el$29.firstChild, [_el$126, _co$30] = web.getNextMarker(_el$125.nextSibling), _el$44 = _el$126.nextSibling, _el$117 = _el$44.firstChild, [_el$118, _co$26] = web.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] = web.getNextMarker(_el$59.nextSibling), _el$119 = _el$55.nextSibling, [_el$120, _co$27] = web.getNextMarker(_el$119.nextSibling), _el$121 = _el$120.nextSibling, [_el$122, _co$28] = web.getNextMarker(_el$121.nextSibling), _el$123 = _el$122.nextSibling, [_el$124, _co$29] = web.getNextMarker(_el$123.nextSibling);
|
|
520
529
|
web.insert(_el$29, web.createComponent(solidJs.Show, {
|
|
521
530
|
when: exportable,
|
|
522
531
|
get fallback() {
|
|
@@ -574,7 +583,7 @@ ${dataRows}`;
|
|
|
574
583
|
web.runHydrationEvents();
|
|
575
584
|
return _el$30;
|
|
576
585
|
}
|
|
577
|
-
}), _el$
|
|
586
|
+
}), _el$126, _co$30);
|
|
578
587
|
web.insert(_el$44, web.createComponent(solidJs.Show, {
|
|
579
588
|
get when() {
|
|
580
589
|
return tableParams.title;
|
|
@@ -599,7 +608,7 @@ ${dataRows}`;
|
|
|
599
608
|
}), _el$54, _co$1);
|
|
600
609
|
return _el$45;
|
|
601
610
|
}
|
|
602
|
-
}), _el$
|
|
611
|
+
}), _el$118, _co$26);
|
|
603
612
|
var _ref$ = scrollContainerRef;
|
|
604
613
|
typeof _ref$ === "function" ? web.use(_ref$, _el$55) : scrollContainerRef = _el$55;
|
|
605
614
|
web.insert(_el$58, web.createComponent(solidJs.For, {
|
|
@@ -607,10 +616,10 @@ ${dataRows}`;
|
|
|
607
616
|
return tableParams.columns;
|
|
608
617
|
},
|
|
609
618
|
children: (column) => (() => {
|
|
610
|
-
var _el$
|
|
611
|
-
web.addEventListener(_el$
|
|
612
|
-
web.insert(_el$
|
|
613
|
-
web.insert(_el$
|
|
619
|
+
var _el$127 = web.getNextElement(_tmpl$24), _el$128 = _el$127.firstChild, _el$130 = _el$128.firstChild, [_el$131, _co$31] = web.getNextMarker(_el$130.nextSibling), _el$129 = _el$131.nextSibling;
|
|
620
|
+
web.addEventListener(_el$127, "click", () => handleSort(column.key));
|
|
621
|
+
web.insert(_el$128, () => column.label, _el$131, _co$31);
|
|
622
|
+
web.insert(_el$129, () => sortIndicator(column.key));
|
|
614
623
|
web.effect((_p$) => {
|
|
615
624
|
var _v$11 = column.width ? {
|
|
616
625
|
width: column.width
|
|
@@ -618,16 +627,16 @@ ${dataRows}`;
|
|
|
618
627
|
"opacity-30": sortKey() !== column.key,
|
|
619
628
|
"opacity-100 text-blue-600 dark:text-blue-400": sortKey() === column.key
|
|
620
629
|
};
|
|
621
|
-
_p$.e = web.style(_el$
|
|
622
|
-
_v$12 !== _p$.t && web.setAttribute(_el$
|
|
623
|
-
_p$.a = web.classList(_el$
|
|
630
|
+
_p$.e = web.style(_el$127, _v$11, _p$.e);
|
|
631
|
+
_v$12 !== _p$.t && web.setAttribute(_el$127, "title", _p$.t = _v$12);
|
|
632
|
+
_p$.a = web.classList(_el$129, _v$13, _p$.a);
|
|
624
633
|
return _p$;
|
|
625
634
|
}, {
|
|
626
635
|
e: void 0,
|
|
627
636
|
t: void 0,
|
|
628
637
|
a: void 0
|
|
629
638
|
});
|
|
630
|
-
return _el$
|
|
639
|
+
return _el$127;
|
|
631
640
|
})()
|
|
632
641
|
}));
|
|
633
642
|
web.insert(_el$56, web.createComponent(solidJs.Show, {
|
|
@@ -652,10 +661,10 @@ ${dataRows}`;
|
|
|
652
661
|
web.insert(_el$62, () => tableParams.pagination.totalRows, _el$73, _co$13);
|
|
653
662
|
return _el$61;
|
|
654
663
|
}
|
|
655
|
-
}), _el$
|
|
664
|
+
}), _el$120, _co$27);
|
|
656
665
|
web.insert(_el$44, web.createComponent(solidJs.Show, {
|
|
657
666
|
get when() {
|
|
658
|
-
return needsClientPagination();
|
|
667
|
+
return web.memo(() => !!needsClientPagination())() && !isProgressiveMode();
|
|
659
668
|
},
|
|
660
669
|
get children() {
|
|
661
670
|
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;
|
|
@@ -678,7 +687,34 @@ ${dataRows}`;
|
|
|
678
687
|
web.runHydrationEvents();
|
|
679
688
|
return _el$74;
|
|
680
689
|
}
|
|
681
|
-
}), _el$
|
|
690
|
+
}), _el$122, _co$28);
|
|
691
|
+
web.insert(_el$44, web.createComponent(solidJs.Show, {
|
|
692
|
+
get when() {
|
|
693
|
+
return web.memo(() => !!needsClientPagination())() && isProgressiveMode();
|
|
694
|
+
},
|
|
695
|
+
get children() {
|
|
696
|
+
var _el$95 = web.getNextElement(_tmpl$22), _el$96 = _el$95.firstChild, _el$99 = _el$96.firstChild, [_el$100, _co$19] = web.getNextMarker(_el$99.nextSibling), _el$97 = _el$100.nextSibling, _el$101 = _el$97.nextSibling, [_el$102, _co$20] = web.getNextMarker(_el$101.nextSibling), _el$98 = _el$102.nextSibling, _el$103 = _el$98.nextSibling, [_el$104, _co$21] = web.getNextMarker(_el$103.nextSibling), _el$115 = _el$96.nextSibling, [_el$116, _co$25] = web.getNextMarker(_el$115.nextSibling);
|
|
697
|
+
web.insert(_el$96, clientRangeStart, _el$100, _co$19);
|
|
698
|
+
web.insert(_el$96, clientRangeEnd, _el$102, _co$20);
|
|
699
|
+
web.insert(_el$96, () => allRows().length.toLocaleString("fr-FR"), _el$104, _co$21);
|
|
700
|
+
web.insert(_el$95, web.createComponent(solidJs.Show, {
|
|
701
|
+
get when() {
|
|
702
|
+
return progressiveHasMore();
|
|
703
|
+
},
|
|
704
|
+
get children() {
|
|
705
|
+
var _el$105 = web.getNextElement(_tmpl$21), _el$109 = _el$105.firstChild, [_el$110, _co$22] = web.getNextMarker(_el$109.nextSibling), _el$106 = _el$110.nextSibling, _el$111 = _el$106.nextSibling, [_el$112, _co$23] = web.getNextMarker(_el$111.nextSibling), _el$107 = _el$112.nextSibling, _el$113 = _el$107.nextSibling, [_el$114, _co$24] = web.getNextMarker(_el$113.nextSibling);
|
|
706
|
+
_el$114.nextSibling;
|
|
707
|
+
_el$105.$$click = () => setProgressivePages((p) => p + 1);
|
|
708
|
+
web.insert(_el$105, showMoreLabel, _el$110, _co$22);
|
|
709
|
+
web.insert(_el$105, () => Math.min(progressiveRemaining(), clientPageSize()), _el$112, _co$23);
|
|
710
|
+
web.insert(_el$105, () => Math.min(progressiveRemaining(), clientPageSize()) > 1 ? "es" : "e", _el$114, _co$24);
|
|
711
|
+
web.runHydrationEvents();
|
|
712
|
+
return _el$105;
|
|
713
|
+
}
|
|
714
|
+
}), _el$116, _co$25);
|
|
715
|
+
return _el$95;
|
|
716
|
+
}
|
|
717
|
+
}), _el$124, _co$29);
|
|
682
718
|
web.effect((_p$) => {
|
|
683
719
|
var _v$0 = isVirtualizing() ? {
|
|
684
720
|
"max-height": "500px",
|
|
@@ -706,51 +742,51 @@ function MetricRenderer(props) {
|
|
|
706
742
|
return `${title}: ${value}${unit ? " " + unit : ""}`;
|
|
707
743
|
};
|
|
708
744
|
return (() => {
|
|
709
|
-
var _el$
|
|
710
|
-
web.insert(_el$
|
|
745
|
+
var _el$132 = web.getNextElement(_tmpl$28), _el$154 = _el$132.firstChild, [_el$155, _co$37] = web.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] = web.getNextMarker(_el$139.nextSibling), _el$150 = _el$134.nextSibling, [_el$151, _co$35] = web.getNextMarker(_el$150.nextSibling), _el$152 = _el$151.nextSibling, [_el$153, _co$36] = web.getNextMarker(_el$152.nextSibling);
|
|
746
|
+
web.insert(_el$132, web.createComponent(CopyButton, {
|
|
711
747
|
getText: getMetricText,
|
|
712
748
|
title: "Copy metric",
|
|
713
749
|
position: "top-right"
|
|
714
|
-
}), _el$
|
|
715
|
-
web.insert(_el$
|
|
716
|
-
web.insert(_el$
|
|
717
|
-
web.insert(_el$
|
|
750
|
+
}), _el$155, _co$37);
|
|
751
|
+
web.insert(_el$135, () => metricParams.title);
|
|
752
|
+
web.insert(_el$137, () => metricParams.value);
|
|
753
|
+
web.insert(_el$136, web.createComponent(solidJs.Show, {
|
|
718
754
|
get when() {
|
|
719
755
|
return metricParams.unit;
|
|
720
756
|
},
|
|
721
757
|
get children() {
|
|
722
|
-
var _el$
|
|
723
|
-
web.insert(_el$
|
|
724
|
-
return _el$
|
|
758
|
+
var _el$138 = web.getNextElement(_tmpl$25);
|
|
759
|
+
web.insert(_el$138, () => metricParams.unit);
|
|
760
|
+
return _el$138;
|
|
725
761
|
}
|
|
726
|
-
}), _el$
|
|
727
|
-
web.insert(_el$
|
|
762
|
+
}), _el$140, _co$32);
|
|
763
|
+
web.insert(_el$133, web.createComponent(solidJs.Show, {
|
|
728
764
|
get when() {
|
|
729
765
|
return metricParams.trend;
|
|
730
766
|
},
|
|
731
767
|
get children() {
|
|
732
|
-
var _el$
|
|
733
|
-
_el$
|
|
734
|
-
web.insert(_el$
|
|
768
|
+
var _el$141 = web.getNextElement(_tmpl$26), _el$142 = _el$141.firstChild, _el$145 = _el$142.firstChild, [_el$146, _co$33] = web.getNextMarker(_el$145.nextSibling), _el$143 = _el$146.nextSibling, _el$147 = _el$143.nextSibling, [_el$148, _co$34] = web.getNextMarker(_el$147.nextSibling);
|
|
769
|
+
_el$148.nextSibling;
|
|
770
|
+
web.insert(_el$142, (() => {
|
|
735
771
|
var _c$ = web.memo(() => metricParams.trend.direction === "up");
|
|
736
772
|
return () => _c$() ? "�" : metricParams.trend.direction === "down" ? "�" : "�";
|
|
737
|
-
})(), _el$
|
|
738
|
-
web.insert(_el$
|
|
739
|
-
web.effect(() => web.className(_el$
|
|
740
|
-
return _el$
|
|
773
|
+
})(), _el$146, _co$33);
|
|
774
|
+
web.insert(_el$142, () => Math.abs(metricParams.trend.value), _el$148, _co$34);
|
|
775
|
+
web.effect(() => web.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"}`));
|
|
776
|
+
return _el$141;
|
|
741
777
|
}
|
|
742
|
-
}), _el$
|
|
743
|
-
web.insert(_el$
|
|
778
|
+
}), _el$151, _co$35);
|
|
779
|
+
web.insert(_el$133, web.createComponent(solidJs.Show, {
|
|
744
780
|
get when() {
|
|
745
781
|
return metricParams.subtitle;
|
|
746
782
|
},
|
|
747
783
|
get children() {
|
|
748
|
-
var _el$
|
|
749
|
-
web.insert(_el$
|
|
750
|
-
return _el$
|
|
784
|
+
var _el$149 = web.getNextElement(_tmpl$27);
|
|
785
|
+
web.insert(_el$149, () => metricParams.subtitle);
|
|
786
|
+
return _el$149;
|
|
751
787
|
}
|
|
752
|
-
}), _el$
|
|
753
|
-
return _el$
|
|
788
|
+
}), _el$153, _co$36);
|
|
789
|
+
return _el$132;
|
|
754
790
|
})();
|
|
755
791
|
}
|
|
756
792
|
function extractImageFromMarkdown(content) {
|
|
@@ -791,62 +827,62 @@ function TextRenderer(props) {
|
|
|
791
827
|
},
|
|
792
828
|
get fallback() {
|
|
793
829
|
return (() => {
|
|
794
|
-
var _el$
|
|
795
|
-
web.insert(_el$
|
|
830
|
+
var _el$156 = web.getNextElement(_tmpl$29), _el$158 = _el$156.firstChild, [_el$159, _co$38] = web.getNextMarker(_el$158.nextSibling), _el$157 = _el$159.nextSibling;
|
|
831
|
+
web.insert(_el$156, web.createComponent(CopyButton, {
|
|
796
832
|
getText: getTextContent,
|
|
797
833
|
title: "Copy text",
|
|
798
834
|
position: "top-right"
|
|
799
|
-
}), _el$
|
|
835
|
+
}), _el$159, _co$38);
|
|
800
836
|
web.effect((_p$) => {
|
|
801
837
|
var _v$14 = `prose prose-sm dark:prose-invert max-w-none ${textParams.className || ""}`, _v$15 = htmlContent();
|
|
802
|
-
_v$14 !== _p$.e && web.className(_el$
|
|
803
|
-
_v$15 !== _p$.t && web.setProperty(_el$
|
|
838
|
+
_v$14 !== _p$.e && web.className(_el$157, _p$.e = _v$14);
|
|
839
|
+
_v$15 !== _p$.t && web.setProperty(_el$157, "innerHTML", _p$.t = _v$15);
|
|
804
840
|
return _p$;
|
|
805
841
|
}, {
|
|
806
842
|
e: void 0,
|
|
807
843
|
t: void 0
|
|
808
844
|
});
|
|
809
|
-
return _el$
|
|
845
|
+
return _el$156;
|
|
810
846
|
})();
|
|
811
847
|
},
|
|
812
848
|
children: (data) => (() => {
|
|
813
|
-
var _el$
|
|
814
|
-
web.insert(_el$
|
|
849
|
+
var _el$160 = web.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;
|
|
850
|
+
web.insert(_el$165, () => data().credit);
|
|
815
851
|
web.effect((_p$) => {
|
|
816
852
|
var _v$16 = data().linkUrl, _v$17 = data().imageUrl, _v$18 = data().alt;
|
|
817
|
-
_v$16 !== _p$.e && web.setAttribute(_el$
|
|
818
|
-
_v$17 !== _p$.t && web.setAttribute(_el$
|
|
819
|
-
_v$18 !== _p$.a && web.setAttribute(_el$
|
|
853
|
+
_v$16 !== _p$.e && web.setAttribute(_el$162, "href", _p$.e = _v$16);
|
|
854
|
+
_v$17 !== _p$.t && web.setAttribute(_el$163, "src", _p$.t = _v$17);
|
|
855
|
+
_v$18 !== _p$.a && web.setAttribute(_el$163, "alt", _p$.a = _v$18);
|
|
820
856
|
return _p$;
|
|
821
857
|
}, {
|
|
822
858
|
e: void 0,
|
|
823
859
|
t: void 0,
|
|
824
860
|
a: void 0
|
|
825
861
|
});
|
|
826
|
-
return _el$
|
|
862
|
+
return _el$160;
|
|
827
863
|
})()
|
|
828
864
|
});
|
|
829
865
|
}
|
|
830
866
|
function IframeRenderer(props) {
|
|
831
867
|
const params = props.component.params;
|
|
832
868
|
return (() => {
|
|
833
|
-
var _el$
|
|
834
|
-
web.insert(_el$
|
|
869
|
+
var _el$166 = web.getNextElement(_tmpl$32), _el$170 = _el$166.firstChild, [_el$171, _co$39] = web.getNextMarker(_el$170.nextSibling), _el$169 = _el$171.nextSibling;
|
|
870
|
+
web.insert(_el$166, web.createComponent(solidJs.Show, {
|
|
835
871
|
get when() {
|
|
836
872
|
return params.title;
|
|
837
873
|
},
|
|
838
874
|
get children() {
|
|
839
|
-
var _el$
|
|
840
|
-
web.insert(_el$
|
|
841
|
-
return _el$
|
|
875
|
+
var _el$167 = web.getNextElement(_tmpl$31), _el$168 = _el$167.firstChild;
|
|
876
|
+
web.insert(_el$168, () => params.title);
|
|
877
|
+
return _el$167;
|
|
842
878
|
}
|
|
843
|
-
}), _el$
|
|
879
|
+
}), _el$171, _co$39);
|
|
844
880
|
web.effect((_p$) => {
|
|
845
881
|
var _v$19 = params.url, _v$20 = params.title || "Embedded content", _v$21 = `height: ${params.height || "400px"}; min-height: 300px;`, _v$22 = validation.getIframeSandbox(params.url);
|
|
846
|
-
_v$19 !== _p$.e && web.setAttribute(_el$
|
|
847
|
-
_v$20 !== _p$.t && web.setAttribute(_el$
|
|
848
|
-
_p$.a = web.style(_el$
|
|
849
|
-
_v$22 !== _p$.o && web.setAttribute(_el$
|
|
882
|
+
_v$19 !== _p$.e && web.setAttribute(_el$169, "src", _p$.e = _v$19);
|
|
883
|
+
_v$20 !== _p$.t && web.setAttribute(_el$169, "title", _p$.t = _v$20);
|
|
884
|
+
_p$.a = web.style(_el$169, _v$21, _p$.a);
|
|
885
|
+
_v$22 !== _p$.o && web.setAttribute(_el$169, "sandbox", _p$.o = _v$22);
|
|
850
886
|
return _p$;
|
|
851
887
|
}, {
|
|
852
888
|
e: void 0,
|
|
@@ -854,30 +890,30 @@ function IframeRenderer(props) {
|
|
|
854
890
|
a: void 0,
|
|
855
891
|
o: void 0
|
|
856
892
|
});
|
|
857
|
-
return _el$
|
|
893
|
+
return _el$166;
|
|
858
894
|
})();
|
|
859
895
|
}
|
|
860
896
|
function ImageRenderer(props) {
|
|
861
897
|
const params = props.component.params;
|
|
862
898
|
return (() => {
|
|
863
|
-
var _el$
|
|
864
|
-
web.insert(_el$
|
|
899
|
+
var _el$172 = web.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] = web.getNextMarker(_el$178.nextSibling);
|
|
900
|
+
web.insert(_el$172, web.createComponent(solidJs.Show, {
|
|
865
901
|
get when() {
|
|
866
902
|
return params.caption;
|
|
867
903
|
},
|
|
868
904
|
get children() {
|
|
869
|
-
var _el$
|
|
870
|
-
web.insert(_el$
|
|
871
|
-
return _el$
|
|
905
|
+
var _el$176 = web.getNextElement(_tmpl$33), _el$177 = _el$176.firstChild;
|
|
906
|
+
web.insert(_el$177, () => params.caption);
|
|
907
|
+
return _el$176;
|
|
872
908
|
}
|
|
873
|
-
}), _el$
|
|
909
|
+
}), _el$179, _co$40);
|
|
874
910
|
web.effect((_p$) => {
|
|
875
911
|
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";
|
|
876
|
-
_v$23 !== _p$.e && web.className(_el$
|
|
877
|
-
_v$24 !== _p$.t && web.setAttribute(_el$
|
|
878
|
-
_v$25 !== _p$.a && web.setAttribute(_el$
|
|
879
|
-
_v$26 !== _p$.o && web.setAttribute(_el$
|
|
880
|
-
_v$27 !== _p$.i && web.setAttribute(_el$
|
|
912
|
+
_v$23 !== _p$.e && web.className(_el$172, _p$.e = _v$23);
|
|
913
|
+
_v$24 !== _p$.t && web.setAttribute(_el$174, "href", _p$.t = _v$24);
|
|
914
|
+
_v$25 !== _p$.a && web.setAttribute(_el$174, "aria-label", _p$.a = _v$25);
|
|
915
|
+
_v$26 !== _p$.o && web.setAttribute(_el$175, "src", _p$.o = _v$26);
|
|
916
|
+
_v$27 !== _p$.i && web.setAttribute(_el$175, "alt", _p$.i = _v$27);
|
|
881
917
|
return _p$;
|
|
882
918
|
}, {
|
|
883
919
|
e: void 0,
|
|
@@ -886,30 +922,30 @@ function ImageRenderer(props) {
|
|
|
886
922
|
o: void 0,
|
|
887
923
|
i: void 0
|
|
888
924
|
});
|
|
889
|
-
return _el$
|
|
925
|
+
return _el$172;
|
|
890
926
|
})();
|
|
891
927
|
}
|
|
892
928
|
function LinkRenderer(props) {
|
|
893
929
|
const params = props.component.params;
|
|
894
930
|
return (() => {
|
|
895
|
-
var _el$
|
|
896
|
-
_el$
|
|
897
|
-
web.insert(_el$
|
|
898
|
-
web.insert(_el$
|
|
931
|
+
var _el$180 = web.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] = web.getNextMarker(_el$185.nextSibling);
|
|
932
|
+
_el$180.$$click = (e) => e.stopPropagation();
|
|
933
|
+
web.insert(_el$183, () => params.label || params.url);
|
|
934
|
+
web.insert(_el$182, web.createComponent(solidJs.Show, {
|
|
899
935
|
get when() {
|
|
900
936
|
return params.description;
|
|
901
937
|
},
|
|
902
938
|
get children() {
|
|
903
|
-
var _el$
|
|
904
|
-
web.insert(_el$
|
|
905
|
-
return _el$
|
|
939
|
+
var _el$184 = web.getNextElement(_tmpl$35);
|
|
940
|
+
web.insert(_el$184, () => params.description);
|
|
941
|
+
return _el$184;
|
|
906
942
|
}
|
|
907
|
-
}), _el$
|
|
943
|
+
}), _el$186, _co$41);
|
|
908
944
|
web.effect((_p$) => {
|
|
909
945
|
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 || ""}`;
|
|
910
|
-
_v$28 !== _p$.e && web.setAttribute(_el$
|
|
911
|
-
_v$29 !== _p$.t && web.setAttribute(_el$
|
|
912
|
-
_v$30 !== _p$.a && web.className(_el$
|
|
946
|
+
_v$28 !== _p$.e && web.setAttribute(_el$180, "href", _p$.e = _v$28);
|
|
947
|
+
_v$29 !== _p$.t && web.setAttribute(_el$180, "aria-label", _p$.t = _v$29);
|
|
948
|
+
_v$30 !== _p$.a && web.className(_el$180, _p$.a = _v$30);
|
|
913
949
|
return _p$;
|
|
914
950
|
}, {
|
|
915
951
|
e: void 0,
|
|
@@ -917,7 +953,7 @@ function LinkRenderer(props) {
|
|
|
917
953
|
a: void 0
|
|
918
954
|
});
|
|
919
955
|
web.runHydrationEvents();
|
|
920
|
-
return _el$
|
|
956
|
+
return _el$180;
|
|
921
957
|
})();
|
|
922
958
|
}
|
|
923
959
|
function ComponentRenderer(props) {
|
|
@@ -931,12 +967,12 @@ function ComponentRenderer(props) {
|
|
|
931
967
|
details: validation$1.errors
|
|
932
968
|
});
|
|
933
969
|
return (() => {
|
|
934
|
-
var _el$
|
|
935
|
-
web.insert(_el$
|
|
970
|
+
var _el$187 = web.getNextElement(_tmpl$37), _el$188 = _el$187.firstChild, _el$189 = _el$188.nextSibling;
|
|
971
|
+
web.insert(_el$189, () => {
|
|
936
972
|
var _a2, _b;
|
|
937
973
|
return ((_b = (_a2 = validation$1.errors) == null ? void 0 : _a2[0]) == null ? void 0 : _b.message) || "Unknown validation error";
|
|
938
974
|
});
|
|
939
|
-
return _el$
|
|
975
|
+
return _el$187;
|
|
940
976
|
})();
|
|
941
977
|
}
|
|
942
978
|
return web.createComponent(GenerativeUIErrorBoundary.GenerativeUIErrorBoundary, {
|
|
@@ -1182,27 +1218,27 @@ function ActionRenderer(props) {
|
|
|
1182
1218
|
const isDisabled = () => params.disabled || params.action === "tool-call" && isExecuting();
|
|
1183
1219
|
if (params.type === "link" || params.action === "link") {
|
|
1184
1220
|
return (() => {
|
|
1185
|
-
var _el$
|
|
1186
|
-
_el$
|
|
1187
|
-
web.insert(_el$
|
|
1221
|
+
var _el$190 = web.getNextElement(_tmpl$39), _el$192 = _el$190.firstChild, [_el$193, _co$42] = web.getNextMarker(_el$192.nextSibling), _el$194 = _el$193.nextSibling, [_el$195, _co$43] = web.getNextMarker(_el$194.nextSibling);
|
|
1222
|
+
_el$190.$$click = handleClick;
|
|
1223
|
+
web.insert(_el$190, web.createComponent(solidJs.Show, {
|
|
1188
1224
|
get when() {
|
|
1189
1225
|
return params.icon;
|
|
1190
1226
|
},
|
|
1191
1227
|
get children() {
|
|
1192
|
-
var _el$
|
|
1193
|
-
web.insert(_el$
|
|
1194
|
-
return _el$
|
|
1228
|
+
var _el$191 = web.getNextElement(_tmpl$38);
|
|
1229
|
+
web.insert(_el$191, () => params.icon);
|
|
1230
|
+
return _el$191;
|
|
1195
1231
|
}
|
|
1196
|
-
}), _el$
|
|
1197
|
-
web.insert(_el$
|
|
1232
|
+
}), _el$193, _co$42);
|
|
1233
|
+
web.insert(_el$190, () => params.label, _el$195, _co$43);
|
|
1198
1234
|
web.effect((_p$) => {
|
|
1199
1235
|
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
|
|
1200
1236
|
${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"}
|
|
1201
1237
|
${params.className || ""}`;
|
|
1202
|
-
_v$31 !== _p$.e && web.setAttribute(_el$
|
|
1203
|
-
_v$32 !== _p$.t && web.setAttribute(_el$
|
|
1204
|
-
_v$33 !== _p$.a && web.setAttribute(_el$
|
|
1205
|
-
_v$34 !== _p$.o && web.className(_el$
|
|
1238
|
+
_v$31 !== _p$.e && web.setAttribute(_el$190, "href", _p$.e = _v$31);
|
|
1239
|
+
_v$32 !== _p$.t && web.setAttribute(_el$190, "target", _p$.t = _v$32);
|
|
1240
|
+
_v$33 !== _p$.a && web.setAttribute(_el$190, "aria-label", _p$.a = _v$33);
|
|
1241
|
+
_v$34 !== _p$.o && web.className(_el$190, _p$.o = _v$34);
|
|
1206
1242
|
return _p$;
|
|
1207
1243
|
}, {
|
|
1208
1244
|
e: void 0,
|
|
@@ -1211,42 +1247,42 @@ function ActionRenderer(props) {
|
|
|
1211
1247
|
o: void 0
|
|
1212
1248
|
});
|
|
1213
1249
|
web.runHydrationEvents();
|
|
1214
|
-
return _el$
|
|
1250
|
+
return _el$190;
|
|
1215
1251
|
})();
|
|
1216
1252
|
}
|
|
1217
1253
|
return (() => {
|
|
1218
|
-
var _el$
|
|
1219
|
-
_el$
|
|
1220
|
-
web.insert(_el$
|
|
1254
|
+
var _el$196 = web.getNextElement(_tmpl$41), _el$199 = _el$196.firstChild, [_el$200, _co$44] = web.getNextMarker(_el$199.nextSibling), _el$201 = _el$200.nextSibling, [_el$202, _co$45] = web.getNextMarker(_el$201.nextSibling), _el$203 = _el$202.nextSibling, [_el$204, _co$46] = web.getNextMarker(_el$203.nextSibling);
|
|
1255
|
+
_el$196.$$click = handleClick;
|
|
1256
|
+
web.insert(_el$196, web.createComponent(solidJs.Show, {
|
|
1221
1257
|
get when() {
|
|
1222
1258
|
return web.memo(() => !!isExecuting())() && params.action === "tool-call";
|
|
1223
1259
|
},
|
|
1224
1260
|
get children() {
|
|
1225
|
-
return web.getNextElement(_tmpl$
|
|
1261
|
+
return web.getNextElement(_tmpl$40);
|
|
1226
1262
|
}
|
|
1227
|
-
}), _el$
|
|
1228
|
-
web.insert(_el$
|
|
1263
|
+
}), _el$200, _co$44);
|
|
1264
|
+
web.insert(_el$196, web.createComponent(solidJs.Show, {
|
|
1229
1265
|
get when() {
|
|
1230
1266
|
return web.memo(() => !!params.icon)() && !(isExecuting() && params.action === "tool-call");
|
|
1231
1267
|
},
|
|
1232
1268
|
get children() {
|
|
1233
|
-
var _el$
|
|
1234
|
-
web.insert(_el$
|
|
1235
|
-
return _el$
|
|
1269
|
+
var _el$198 = web.getNextElement(_tmpl$38);
|
|
1270
|
+
web.insert(_el$198, () => params.icon);
|
|
1271
|
+
return _el$198;
|
|
1236
1272
|
}
|
|
1237
|
-
}), _el$
|
|
1238
|
-
web.insert(_el$
|
|
1273
|
+
}), _el$202, _co$45);
|
|
1274
|
+
web.insert(_el$196, () => params.label, _el$204, _co$46);
|
|
1239
1275
|
web.effect((_p$) => {
|
|
1240
1276
|
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
|
|
1241
1277
|
${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"}
|
|
1242
1278
|
${isDisabled() ? "opacity-50 cursor-not-allowed" : ""}
|
|
1243
1279
|
${params.size === "sm" ? "px-3 py-1.5 text-xs" : params.size === "lg" ? "px-6 py-3 text-base" : ""}
|
|
1244
1280
|
${params.className || ""}`;
|
|
1245
|
-
_v$35 !== _p$.e && web.setAttribute(_el$
|
|
1246
|
-
_v$36 !== _p$.t && web.setProperty(_el$
|
|
1247
|
-
_v$37 !== _p$.a && web.setAttribute(_el$
|
|
1248
|
-
_v$38 !== _p$.o && web.setAttribute(_el$
|
|
1249
|
-
_v$39 !== _p$.i && web.className(_el$
|
|
1281
|
+
_v$35 !== _p$.e && web.setAttribute(_el$196, "type", _p$.e = _v$35);
|
|
1282
|
+
_v$36 !== _p$.t && web.setProperty(_el$196, "disabled", _p$.t = _v$36);
|
|
1283
|
+
_v$37 !== _p$.a && web.setAttribute(_el$196, "aria-busy", _p$.a = _v$37);
|
|
1284
|
+
_v$38 !== _p$.o && web.setAttribute(_el$196, "aria-label", _p$.o = _v$38);
|
|
1285
|
+
_v$39 !== _p$.i && web.className(_el$196, _p$.i = _v$39);
|
|
1250
1286
|
return _p$;
|
|
1251
1287
|
}, {
|
|
1252
1288
|
e: void 0,
|
|
@@ -1256,7 +1292,7 @@ function ActionRenderer(props) {
|
|
|
1256
1292
|
i: void 0
|
|
1257
1293
|
});
|
|
1258
1294
|
web.runHydrationEvents();
|
|
1259
|
-
return _el$
|
|
1295
|
+
return _el$196;
|
|
1260
1296
|
})();
|
|
1261
1297
|
}
|
|
1262
1298
|
function ErrorCardRenderer(props) {
|
|
@@ -1264,55 +1300,55 @@ function ErrorCardRenderer(props) {
|
|
|
1264
1300
|
return `Error in ${props.error.tool || "unknown tool"}: ${props.error.message || "Unknown error"}`;
|
|
1265
1301
|
};
|
|
1266
1302
|
return (() => {
|
|
1267
|
-
var _el$
|
|
1268
|
-
web.insert(_el$
|
|
1303
|
+
var _el$205 = web.getNextElement(_tmpl$45), _el$228 = _el$205.firstChild, [_el$229, _co$52] = web.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] = web.getNextMarker(_el$211.nextSibling), _el$213 = _el$209.nextSibling, _el$222 = _el$213.nextSibling, [_el$223, _co$49] = web.getNextMarker(_el$222.nextSibling), _el$224 = _el$223.nextSibling, [_el$225, _co$50] = web.getNextMarker(_el$224.nextSibling), _el$226 = _el$225.nextSibling, [_el$227, _co$51] = web.getNextMarker(_el$226.nextSibling);
|
|
1304
|
+
web.insert(_el$205, web.createComponent(CopyButton, {
|
|
1269
1305
|
getText: getErrorText,
|
|
1270
1306
|
title: "Copy error details",
|
|
1271
1307
|
position: "top-right"
|
|
1272
|
-
}), _el$
|
|
1273
|
-
web.insert(_el$
|
|
1274
|
-
web.insert(_el$
|
|
1275
|
-
web.insert(_el$
|
|
1308
|
+
}), _el$229, _co$52);
|
|
1309
|
+
web.insert(_el$209, () => props.error.tool || "Unknown", _el$212, _co$47);
|
|
1310
|
+
web.insert(_el$213, () => props.error.message || "An error occurred during tool execution");
|
|
1311
|
+
web.insert(_el$208, web.createComponent(solidJs.Show, {
|
|
1276
1312
|
get when() {
|
|
1277
1313
|
return props.error.type;
|
|
1278
1314
|
},
|
|
1279
1315
|
get children() {
|
|
1280
|
-
var _el$
|
|
1281
|
-
web.insert(_el$
|
|
1282
|
-
return _el$
|
|
1316
|
+
var _el$214 = web.getNextElement(_tmpl$42), _el$215 = _el$214.firstChild, _el$216 = _el$215.nextSibling, [_el$217, _co$48] = web.getNextMarker(_el$216.nextSibling);
|
|
1317
|
+
web.insert(_el$214, () => props.error.type, _el$217, _co$48);
|
|
1318
|
+
return _el$214;
|
|
1283
1319
|
}
|
|
1284
|
-
}), _el$
|
|
1285
|
-
web.insert(_el$
|
|
1320
|
+
}), _el$223, _co$49);
|
|
1321
|
+
web.insert(_el$208, web.createComponent(solidJs.Show, {
|
|
1286
1322
|
get when() {
|
|
1287
1323
|
var _a;
|
|
1288
1324
|
return (_a = props.error.suggestions) == null ? void 0 : _a.length;
|
|
1289
1325
|
},
|
|
1290
1326
|
get children() {
|
|
1291
|
-
var _el$
|
|
1292
|
-
web.insert(_el$
|
|
1327
|
+
var _el$218 = web.getNextElement(_tmpl$43), _el$219 = _el$218.firstChild, _el$220 = _el$219.nextSibling;
|
|
1328
|
+
web.insert(_el$220, web.createComponent(solidJs.For, {
|
|
1293
1329
|
get each() {
|
|
1294
1330
|
return props.error.suggestions;
|
|
1295
1331
|
},
|
|
1296
1332
|
children: (suggestion) => (() => {
|
|
1297
|
-
var _el$
|
|
1298
|
-
web.insert(_el$
|
|
1299
|
-
return _el$
|
|
1333
|
+
var _el$230 = web.getNextElement(_tmpl$46);
|
|
1334
|
+
web.insert(_el$230, suggestion);
|
|
1335
|
+
return _el$230;
|
|
1300
1336
|
})()
|
|
1301
1337
|
}));
|
|
1302
|
-
return _el$
|
|
1338
|
+
return _el$218;
|
|
1303
1339
|
}
|
|
1304
|
-
}), _el$
|
|
1305
|
-
web.insert(_el$
|
|
1340
|
+
}), _el$225, _co$50);
|
|
1341
|
+
web.insert(_el$208, web.createComponent(solidJs.Show, {
|
|
1306
1342
|
get when() {
|
|
1307
1343
|
return props.error.timestamp;
|
|
1308
1344
|
},
|
|
1309
1345
|
get children() {
|
|
1310
|
-
var _el$
|
|
1311
|
-
web.insert(_el$
|
|
1312
|
-
return _el$
|
|
1346
|
+
var _el$221 = web.getNextElement(_tmpl$44);
|
|
1347
|
+
web.insert(_el$221, () => new Date(props.error.timestamp).toLocaleString());
|
|
1348
|
+
return _el$221;
|
|
1313
1349
|
}
|
|
1314
|
-
}), _el$
|
|
1315
|
-
return _el$
|
|
1350
|
+
}), _el$227, _co$51);
|
|
1351
|
+
return _el$205;
|
|
1316
1352
|
})();
|
|
1317
1353
|
}
|
|
1318
1354
|
function isErrorResponse(content) {
|
|
@@ -1335,20 +1371,20 @@ function UIResourceHtmlRenderer(props) {
|
|
|
1335
1371
|
return ((_a = props.resource.metadata) == null ? void 0 : _a.title) || ((_b = props.resource.uri) == null ? void 0 : _b.replace("ui://deposium/", "")) || "Resource";
|
|
1336
1372
|
};
|
|
1337
1373
|
return (() => {
|
|
1338
|
-
var _el$
|
|
1339
|
-
web.insert(_el$
|
|
1374
|
+
var _el$231 = web.getNextElement(_tmpl$48), _el$235 = _el$231.firstChild, [_el$236, _co$53] = web.getNextMarker(_el$235.nextSibling), _el$234 = _el$236.nextSibling;
|
|
1375
|
+
web.insert(_el$231, web.createComponent(solidJs.Show, {
|
|
1340
1376
|
get when() {
|
|
1341
1377
|
var _a;
|
|
1342
1378
|
return ((_a = props.resource.metadata) == null ? void 0 : _a.title) || props.resource.uri;
|
|
1343
1379
|
},
|
|
1344
1380
|
get children() {
|
|
1345
|
-
var _el$
|
|
1346
|
-
web.insert(_el$
|
|
1347
|
-
return _el$
|
|
1381
|
+
var _el$232 = web.getNextElement(_tmpl$47), _el$233 = _el$232.firstChild;
|
|
1382
|
+
web.insert(_el$233, resourceTitle);
|
|
1383
|
+
return _el$232;
|
|
1348
1384
|
}
|
|
1349
|
-
}), _el$
|
|
1350
|
-
web.effect(() => web.setProperty(_el$
|
|
1351
|
-
return _el$
|
|
1385
|
+
}), _el$236, _co$53);
|
|
1386
|
+
web.effect(() => web.setProperty(_el$234, "innerHTML", htmlContent()));
|
|
1387
|
+
return _el$231;
|
|
1352
1388
|
})();
|
|
1353
1389
|
}
|
|
1354
1390
|
const UIResourceRenderer = (props) => {
|
|
@@ -1428,24 +1464,24 @@ const UIResourceRenderer = (props) => {
|
|
|
1428
1464
|
return web.createComponent(RenderContext.RenderProvider, {
|
|
1429
1465
|
renderComponent,
|
|
1430
1466
|
get children() {
|
|
1431
|
-
var _el$
|
|
1432
|
-
web.insert(_el$
|
|
1467
|
+
var _el$237 = web.getNextElement(_tmpl$49), _el$238 = _el$237.firstChild, _el$239 = _el$238.nextSibling, [_el$240, _co$54] = web.getNextMarker(_el$239.nextSibling);
|
|
1468
|
+
web.insert(_el$238, web.createComponent(solidJs.For, {
|
|
1433
1469
|
get each() {
|
|
1434
1470
|
return layoutData.components;
|
|
1435
1471
|
},
|
|
1436
1472
|
children: (component) => (() => {
|
|
1437
|
-
var _el$
|
|
1438
|
-
web.insert(_el$
|
|
1473
|
+
var _el$241 = web.getNextElement(_tmpl$50);
|
|
1474
|
+
web.insert(_el$241, web.createComponent(ComponentRenderer, {
|
|
1439
1475
|
component,
|
|
1440
1476
|
get onError() {
|
|
1441
1477
|
return props.onError;
|
|
1442
1478
|
}
|
|
1443
1479
|
}));
|
|
1444
|
-
web.effect((_$p) => web.style(_el$
|
|
1445
|
-
return _el$
|
|
1480
|
+
web.effect((_$p) => web.style(_el$241, getGridStyleString(component), _$p));
|
|
1481
|
+
return _el$241;
|
|
1446
1482
|
})()
|
|
1447
1483
|
}));
|
|
1448
|
-
web.insert(_el$
|
|
1484
|
+
web.insert(_el$237, web.createComponent(solidJs.Show, {
|
|
1449
1485
|
get when() {
|
|
1450
1486
|
return shouldShowAutoFooter();
|
|
1451
1487
|
},
|
|
@@ -1456,17 +1492,17 @@ const UIResourceRenderer = (props) => {
|
|
|
1456
1492
|
}
|
|
1457
1493
|
});
|
|
1458
1494
|
}
|
|
1459
|
-
}), _el$
|
|
1495
|
+
}), _el$240, _co$54);
|
|
1460
1496
|
web.effect((_p$) => {
|
|
1461
1497
|
var _v$40 = `w-full ${props.class || ""}`, _v$41 = gridContainerStyle();
|
|
1462
|
-
_v$40 !== _p$.e && web.className(_el$
|
|
1463
|
-
_p$.t = web.style(_el$
|
|
1498
|
+
_v$40 !== _p$.e && web.className(_el$237, _p$.e = _v$40);
|
|
1499
|
+
_p$.t = web.style(_el$238, _v$41, _p$.t);
|
|
1464
1500
|
return _p$;
|
|
1465
1501
|
}, {
|
|
1466
1502
|
e: void 0,
|
|
1467
1503
|
t: void 0
|
|
1468
1504
|
});
|
|
1469
|
-
return _el$
|
|
1505
|
+
return _el$237;
|
|
1470
1506
|
}
|
|
1471
1507
|
});
|
|
1472
1508
|
};
|