@seed-ship/mcp-ui-solid 4.3.2 → 4.3.3
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 +15 -0
- package/dist/components/UIResourceRenderer.cjs +274 -208
- package/dist/components/UIResourceRenderer.cjs.map +1 -1
- package/dist/components/UIResourceRenderer.d.ts.map +1 -1
- package/dist/components/UIResourceRenderer.js +274 -208
- package/dist/components/UIResourceRenderer.js.map +1 -1
- package/package.json +1 -1
- package/src/components/UIResourceRenderer.tsx +72 -11
- 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(`<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>`);
|
|
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(`<button type=button class="absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 text-sm"aria-label="Clear search">×`), _tmpl$20 = /* @__PURE__ */ web.template(`<div class="relative mb-3"><span class="absolute left-3 top-1/2 -translate-y-1/2 text-gray-400 pointer-events-none text-sm">🔍</span><input type=text class="w-full pl-8 pr-8 py-1.5 text-sm border border-gray-200 dark:border-gray-600 rounded-md bg-white dark:bg-gray-700 text-gray-900 dark:text-white placeholder-gray-400 focus:border-blue-400 focus:ring-1 focus:ring-blue-400 outline-none"><!$><!/>`), _tmpl$21 = /* @__PURE__ */ web.template(`<p class="text-xs text-gray-500 dark:text-gray-400 mb-2"><!$><!/> result<!$><!/> on <!$><!/>`), _tmpl$22 = /* @__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$23 = /* @__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$24 = /* @__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$25 = /* @__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$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 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$27 = /* @__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$28 = /* @__PURE__ */ web.template(`<span class="ml-2 text-sm font-medium text-gray-500 dark:text-gray-400">`), _tmpl$29 = /* @__PURE__ */ web.template(`<div class="mt-3 flex items-center"><span><!$><!/> <!$><!/>%`), _tmpl$30 = /* @__PURE__ */ web.template(`<p class="mt-2 text-xs text-gray-500 dark:text-gray-400">`), _tmpl$31 = /* @__PURE__ */ web.template(`<div class="relative w-full h-full bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700 p-4 group"><!$><!/><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$32 = /* @__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$33 = /* @__PURE__ */ web.template(`<div class="w-full h-full bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700 overflow-hidden flex flex-col"><div class="flex-1 flex items-center justify-center p-4 bg-gray-50 dark:bg-gray-900 min-h-[200px]"><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$34 = /* @__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$35 = /* @__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$36 = /* @__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$37 = /* @__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$38 = /* @__PURE__ */ web.template(`<p class="text-xs text-gray-500 dark:text-gray-400 truncate">`), _tmpl$39 = /* @__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$40 = /* @__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$41 = /* @__PURE__ */ web.template(`<span aria-hidden=true>`), _tmpl$42 = /* @__PURE__ */ web.template(`<a rel="noopener noreferrer"><!$><!/><!$><!/>`), _tmpl$43 = /* @__PURE__ */ web.template(`<span class="animate-spin h-4 w-4 border-2 border-current border-t-transparent rounded-full"aria-hidden=true>`), _tmpl$44 = /* @__PURE__ */ web.template(`<button><!$><!/><!$><!/><!$><!/>`), _tmpl$45 = /* @__PURE__ */ web.template(`<p class="text-xs text-red-600 dark:text-red-400 mt-1">Type: <!$><!/>`), _tmpl$46 = /* @__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$47 = /* @__PURE__ */ web.template(`<p class="text-xs text-red-500 dark:text-red-500 mt-2">`), _tmpl$48 = /* @__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$49 = /* @__PURE__ */ web.template(`<li>`), _tmpl$50 = /* @__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$51 = /* @__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$52 = /* @__PURE__ */ web.template(`<div><div class="grid gap-4"></div><!$><!/>`), _tmpl$53 = /* @__PURE__ */ web.template(`<div>`);
|
|
25
25
|
function CopyButton(props) {
|
|
26
26
|
const [copied, setCopied] = solidJs.createSignal(false);
|
|
27
27
|
const handleCopy = async () => {
|
|
@@ -312,25 +312,50 @@ function TableRenderer(props) {
|
|
|
312
312
|
if (sortKey() !== key) return "↕";
|
|
313
313
|
return sortDir() === "asc" ? "↑" : "↓";
|
|
314
314
|
};
|
|
315
|
+
const [searchQuery, setSearchQuery] = solidJs.createSignal("");
|
|
316
|
+
const [debouncedQuery, setDebouncedQuery] = solidJs.createSignal("");
|
|
317
|
+
let searchTimer = null;
|
|
318
|
+
const isSearchable = () => tableParams.searchable === true || tableParams.searchable !== false && allRows().length > 10;
|
|
319
|
+
const searchPlaceholder = () => tableParams.searchPlaceholder || "Rechercher dans le tableau...";
|
|
320
|
+
const handleSearch = (value) => {
|
|
321
|
+
setSearchQuery(value);
|
|
322
|
+
if (searchTimer) clearTimeout(searchTimer);
|
|
323
|
+
searchTimer = setTimeout(() => {
|
|
324
|
+
setDebouncedQuery(value);
|
|
325
|
+
setClientPage(0);
|
|
326
|
+
setProgressivePages(1);
|
|
327
|
+
}, 200);
|
|
328
|
+
};
|
|
329
|
+
const normalize = (s) => s.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase();
|
|
330
|
+
const filteredRows = solidJs.createMemo(() => {
|
|
331
|
+
const q = normalize(debouncedQuery());
|
|
332
|
+
if (!q) return sortedRows();
|
|
333
|
+
const cols = columns();
|
|
334
|
+
return sortedRows().filter((row) => cols.some((col) => {
|
|
335
|
+
const val = row[col.key];
|
|
336
|
+
if (val == null) return false;
|
|
337
|
+
return normalize(String(val)).includes(q);
|
|
338
|
+
}));
|
|
339
|
+
});
|
|
315
340
|
const clientPageSize = () => tableParams.pageSize ?? 25;
|
|
316
341
|
const hasServerPagination = () => !!tableParams.pagination;
|
|
317
342
|
const isProgressiveMode = () => !!tableParams.showAllLabel;
|
|
318
|
-
const needsClientPagination = () => !hasServerPagination() && clientPageSize() > 0 &&
|
|
343
|
+
const needsClientPagination = () => !hasServerPagination() && clientPageSize() > 0 && filteredRows().length > clientPageSize();
|
|
319
344
|
const [clientPage, setClientPage] = solidJs.createSignal(tableParams.initialPage ?? 0);
|
|
320
345
|
const [progressivePages, setProgressivePages] = solidJs.createSignal(1);
|
|
321
|
-
const clientTotalPages = () => needsClientPagination() ? Math.ceil(
|
|
346
|
+
const clientTotalPages = () => needsClientPagination() ? Math.ceil(filteredRows().length / clientPageSize()) : 1;
|
|
322
347
|
const clientVisibleRows = solidJs.createMemo(() => {
|
|
323
|
-
if (!needsClientPagination()) return
|
|
348
|
+
if (!needsClientPagination()) return filteredRows();
|
|
324
349
|
if (isProgressiveMode()) {
|
|
325
|
-
return
|
|
350
|
+
return filteredRows().slice(0, progressivePages() * clientPageSize());
|
|
326
351
|
}
|
|
327
352
|
const start = clientPage() * clientPageSize();
|
|
328
|
-
return
|
|
353
|
+
return filteredRows().slice(start, start + clientPageSize());
|
|
329
354
|
});
|
|
330
355
|
const clientRangeStart = () => needsClientPagination() ? isProgressiveMode() ? 1 : clientPage() * clientPageSize() + 1 : 1;
|
|
331
|
-
const clientRangeEnd = () => needsClientPagination() ? isProgressiveMode() ? Math.min(progressivePages() * clientPageSize(),
|
|
356
|
+
const clientRangeEnd = () => needsClientPagination() ? isProgressiveMode() ? Math.min(progressivePages() * clientPageSize(), filteredRows().length) : Math.min((clientPage() + 1) * clientPageSize(), filteredRows().length) : filteredRows().length;
|
|
332
357
|
const progressiveHasMore = () => isProgressiveMode() && needsClientPagination() && progressivePages() < clientTotalPages();
|
|
333
|
-
const progressiveRemaining = () =>
|
|
358
|
+
const progressiveRemaining = () => filteredRows().length - progressivePages() * clientPageSize();
|
|
334
359
|
const showMoreLabel = () => tableParams.showAllLabel || "Show more";
|
|
335
360
|
const [virtualizer, setVirtualizer] = solidJs.createSignal(null);
|
|
336
361
|
const [isVirtualizing, setIsVirtualizing] = solidJs.createSignal(false);
|
|
@@ -525,7 +550,7 @@ ${dataRows}`;
|
|
|
525
550
|
},
|
|
526
551
|
copyLabel: "Copy table (TSV)",
|
|
527
552
|
get children() {
|
|
528
|
-
var _el$29 = web.getNextElement(_tmpl$
|
|
553
|
+
var _el$29 = web.getNextElement(_tmpl$26), _el$142 = _el$29.firstChild, [_el$143, _co$35] = web.getNextMarker(_el$142.nextSibling), _el$44 = _el$143.nextSibling, _el$132 = _el$44.firstChild, [_el$133, _co$30] = web.getNextMarker(_el$132.nextSibling), _el$134 = _el$133.nextSibling, [_el$135, _co$31] = web.getNextMarker(_el$134.nextSibling), _el$70 = _el$135.nextSibling, _el$71 = _el$70.firstChild, _el$72 = _el$71.firstChild, _el$73 = _el$72.firstChild, _el$74 = _el$72.nextSibling, [_el$75, _co$14] = web.getNextMarker(_el$74.nextSibling), _el$136 = _el$70.nextSibling, [_el$137, _co$32] = web.getNextMarker(_el$136.nextSibling), _el$138 = _el$137.nextSibling, [_el$139, _co$33] = web.getNextMarker(_el$138.nextSibling), _el$140 = _el$139.nextSibling, [_el$141, _co$34] = web.getNextMarker(_el$140.nextSibling);
|
|
529
554
|
web.insert(_el$29, web.createComponent(solidJs.Show, {
|
|
530
555
|
when: exportable,
|
|
531
556
|
get fallback() {
|
|
@@ -583,7 +608,7 @@ ${dataRows}`;
|
|
|
583
608
|
web.runHydrationEvents();
|
|
584
609
|
return _el$30;
|
|
585
610
|
}
|
|
586
|
-
}), _el$
|
|
611
|
+
}), _el$143, _co$35);
|
|
587
612
|
web.insert(_el$44, web.createComponent(solidJs.Show, {
|
|
588
613
|
get when() {
|
|
589
614
|
return tableParams.title;
|
|
@@ -608,18 +633,59 @@ ${dataRows}`;
|
|
|
608
633
|
}), _el$54, _co$1);
|
|
609
634
|
return _el$45;
|
|
610
635
|
}
|
|
611
|
-
}), _el$
|
|
636
|
+
}), _el$133, _co$30);
|
|
637
|
+
web.insert(_el$44, web.createComponent(solidJs.Show, {
|
|
638
|
+
get when() {
|
|
639
|
+
return isSearchable();
|
|
640
|
+
},
|
|
641
|
+
get children() {
|
|
642
|
+
return [(() => {
|
|
643
|
+
var _el$55 = web.getNextElement(_tmpl$20), _el$56 = _el$55.firstChild, _el$57 = _el$56.nextSibling, _el$59 = _el$57.nextSibling, [_el$60, _co$10] = web.getNextMarker(_el$59.nextSibling);
|
|
644
|
+
_el$57.$$input = (e) => handleSearch(e.currentTarget.value);
|
|
645
|
+
web.insert(_el$55, web.createComponent(solidJs.Show, {
|
|
646
|
+
get when() {
|
|
647
|
+
return searchQuery();
|
|
648
|
+
},
|
|
649
|
+
get children() {
|
|
650
|
+
var _el$58 = web.getNextElement(_tmpl$19);
|
|
651
|
+
_el$58.$$click = () => {
|
|
652
|
+
handleSearch("");
|
|
653
|
+
setSearchQuery("");
|
|
654
|
+
setDebouncedQuery("");
|
|
655
|
+
};
|
|
656
|
+
web.runHydrationEvents();
|
|
657
|
+
return _el$58;
|
|
658
|
+
}
|
|
659
|
+
}), _el$60, _co$10);
|
|
660
|
+
web.effect(() => web.setAttribute(_el$57, "placeholder", searchPlaceholder()));
|
|
661
|
+
web.effect(() => web.setProperty(_el$57, "value", searchQuery()));
|
|
662
|
+
web.runHydrationEvents();
|
|
663
|
+
return _el$55;
|
|
664
|
+
})(), web.createComponent(solidJs.Show, {
|
|
665
|
+
get when() {
|
|
666
|
+
return web.memo(() => !!debouncedQuery())() && filteredRows().length !== sortedRows().length;
|
|
667
|
+
},
|
|
668
|
+
get children() {
|
|
669
|
+
var _el$61 = web.getNextElement(_tmpl$21), _el$64 = _el$61.firstChild, [_el$65, _co$11] = web.getNextMarker(_el$64.nextSibling), _el$62 = _el$65.nextSibling, _el$66 = _el$62.nextSibling, [_el$67, _co$12] = web.getNextMarker(_el$66.nextSibling), _el$63 = _el$67.nextSibling, _el$68 = _el$63.nextSibling, [_el$69, _co$13] = web.getNextMarker(_el$68.nextSibling);
|
|
670
|
+
web.insert(_el$61, () => filteredRows().length, _el$65, _co$11);
|
|
671
|
+
web.insert(_el$61, () => filteredRows().length !== 1 ? "s" : "", _el$67, _co$12);
|
|
672
|
+
web.insert(_el$61, () => sortedRows().length, _el$69, _co$13);
|
|
673
|
+
return _el$61;
|
|
674
|
+
}
|
|
675
|
+
})];
|
|
676
|
+
}
|
|
677
|
+
}), _el$135, _co$31);
|
|
612
678
|
var _ref$ = scrollContainerRef;
|
|
613
|
-
typeof _ref$ === "function" ? web.use(_ref$, _el$
|
|
614
|
-
web.insert(_el$
|
|
679
|
+
typeof _ref$ === "function" ? web.use(_ref$, _el$70) : scrollContainerRef = _el$70;
|
|
680
|
+
web.insert(_el$73, web.createComponent(solidJs.For, {
|
|
615
681
|
get each() {
|
|
616
682
|
return tableParams.columns;
|
|
617
683
|
},
|
|
618
684
|
children: (column) => (() => {
|
|
619
|
-
var _el$
|
|
620
|
-
web.addEventListener(_el$
|
|
621
|
-
web.insert(_el$
|
|
622
|
-
web.insert(_el$
|
|
685
|
+
var _el$144 = web.getNextElement(_tmpl$27), _el$145 = _el$144.firstChild, _el$147 = _el$145.firstChild, [_el$148, _co$36] = web.getNextMarker(_el$147.nextSibling), _el$146 = _el$148.nextSibling;
|
|
686
|
+
web.addEventListener(_el$144, "click", () => handleSort(column.key));
|
|
687
|
+
web.insert(_el$145, () => column.label, _el$148, _co$36);
|
|
688
|
+
web.insert(_el$146, () => sortIndicator(column.key));
|
|
623
689
|
web.effect((_p$) => {
|
|
624
690
|
var _v$11 = column.width ? {
|
|
625
691
|
width: column.width
|
|
@@ -627,19 +693,19 @@ ${dataRows}`;
|
|
|
627
693
|
"opacity-30": sortKey() !== column.key,
|
|
628
694
|
"opacity-100 text-blue-600 dark:text-blue-400": sortKey() === column.key
|
|
629
695
|
};
|
|
630
|
-
_p$.e = web.style(_el$
|
|
631
|
-
_v$12 !== _p$.t && web.setAttribute(_el$
|
|
632
|
-
_p$.a = web.classList(_el$
|
|
696
|
+
_p$.e = web.style(_el$144, _v$11, _p$.e);
|
|
697
|
+
_v$12 !== _p$.t && web.setAttribute(_el$144, "title", _p$.t = _v$12);
|
|
698
|
+
_p$.a = web.classList(_el$146, _v$13, _p$.a);
|
|
633
699
|
return _p$;
|
|
634
700
|
}, {
|
|
635
701
|
e: void 0,
|
|
636
702
|
t: void 0,
|
|
637
703
|
a: void 0
|
|
638
704
|
});
|
|
639
|
-
return _el$
|
|
705
|
+
return _el$144;
|
|
640
706
|
})()
|
|
641
707
|
}));
|
|
642
|
-
web.insert(_el$
|
|
708
|
+
web.insert(_el$71, web.createComponent(solidJs.Show, {
|
|
643
709
|
get when() {
|
|
644
710
|
return isVirtualizing();
|
|
645
711
|
},
|
|
@@ -649,80 +715,80 @@ ${dataRows}`;
|
|
|
649
715
|
get children() {
|
|
650
716
|
return web.createComponent(VirtualizedTableBody, {});
|
|
651
717
|
}
|
|
652
|
-
}), _el$
|
|
718
|
+
}), _el$75, _co$14);
|
|
653
719
|
web.insert(_el$44, web.createComponent(solidJs.Show, {
|
|
654
720
|
get when() {
|
|
655
721
|
return tableParams.pagination;
|
|
656
722
|
},
|
|
657
723
|
get children() {
|
|
658
|
-
var _el$
|
|
659
|
-
web.insert(_el$
|
|
660
|
-
web.insert(_el$
|
|
661
|
-
web.insert(_el$
|
|
662
|
-
return _el$
|
|
724
|
+
var _el$76 = web.getNextElement(_tmpl$22), _el$77 = _el$76.firstChild, _el$78 = _el$77.firstChild, _el$83 = _el$78.nextSibling, [_el$84, _co$15] = web.getNextMarker(_el$83.nextSibling), _el$79 = _el$84.nextSibling, _el$85 = _el$79.nextSibling, [_el$86, _co$16] = web.getNextMarker(_el$85.nextSibling), _el$81 = _el$86.nextSibling, _el$87 = _el$81.nextSibling, [_el$88, _co$17] = web.getNextMarker(_el$87.nextSibling);
|
|
725
|
+
web.insert(_el$77, () => tableParams.pagination.currentPage * tableParams.pagination.pageSize + 1, _el$84, _co$15);
|
|
726
|
+
web.insert(_el$77, () => Math.min((tableParams.pagination.currentPage + 1) * tableParams.pagination.pageSize, tableParams.pagination.totalRows), _el$86, _co$16);
|
|
727
|
+
web.insert(_el$77, () => tableParams.pagination.totalRows, _el$88, _co$17);
|
|
728
|
+
return _el$76;
|
|
663
729
|
}
|
|
664
|
-
}), _el$
|
|
730
|
+
}), _el$137, _co$32);
|
|
665
731
|
web.insert(_el$44, web.createComponent(solidJs.Show, {
|
|
666
732
|
get when() {
|
|
667
733
|
return web.memo(() => !!needsClientPagination())() && !isProgressiveMode();
|
|
668
734
|
},
|
|
669
735
|
get children() {
|
|
670
|
-
var _el$
|
|
671
|
-
web.insert(_el$
|
|
672
|
-
web.insert(_el$
|
|
673
|
-
web.insert(_el$
|
|
674
|
-
_el$
|
|
675
|
-
web.insert(_el$
|
|
676
|
-
web.insert(_el$
|
|
677
|
-
_el$
|
|
736
|
+
var _el$89 = web.getNextElement(_tmpl$23), _el$90 = _el$89.firstChild, _el$91 = _el$90.firstChild, _el$94 = _el$91.nextSibling, [_el$95, _co$18] = web.getNextMarker(_el$94.nextSibling), _el$92 = _el$95.nextSibling, _el$96 = _el$92.nextSibling, [_el$97, _co$19] = web.getNextMarker(_el$96.nextSibling), _el$93 = _el$97.nextSibling, _el$98 = _el$93.nextSibling, [_el$99, _co$20] = web.getNextMarker(_el$98.nextSibling), _el$100 = _el$90.nextSibling, _el$101 = _el$100.firstChild, _el$102 = _el$101.nextSibling, _el$103 = _el$102.firstChild, _el$105 = _el$103.nextSibling, [_el$106, _co$21] = web.getNextMarker(_el$105.nextSibling), _el$104 = _el$106.nextSibling, _el$107 = _el$104.nextSibling, [_el$108, _co$22] = web.getNextMarker(_el$107.nextSibling), _el$109 = _el$102.nextSibling;
|
|
737
|
+
web.insert(_el$90, clientRangeStart, _el$95, _co$18);
|
|
738
|
+
web.insert(_el$90, clientRangeEnd, _el$97, _co$19);
|
|
739
|
+
web.insert(_el$90, () => filteredRows().length.toLocaleString("fr-FR"), _el$99, _co$20);
|
|
740
|
+
_el$101.$$click = () => setClientPage((p) => p - 1);
|
|
741
|
+
web.insert(_el$102, () => clientPage() + 1, _el$106, _co$21);
|
|
742
|
+
web.insert(_el$102, clientTotalPages, _el$108, _co$22);
|
|
743
|
+
_el$109.$$click = () => setClientPage((p) => p + 1);
|
|
678
744
|
web.effect((_p$) => {
|
|
679
745
|
var _v$8 = clientPage() === 0, _v$9 = clientPage() >= clientTotalPages() - 1;
|
|
680
|
-
_v$8 !== _p$.e && web.setProperty(_el$
|
|
681
|
-
_v$9 !== _p$.t && web.setProperty(_el$
|
|
746
|
+
_v$8 !== _p$.e && web.setProperty(_el$101, "disabled", _p$.e = _v$8);
|
|
747
|
+
_v$9 !== _p$.t && web.setProperty(_el$109, "disabled", _p$.t = _v$9);
|
|
682
748
|
return _p$;
|
|
683
749
|
}, {
|
|
684
750
|
e: void 0,
|
|
685
751
|
t: void 0
|
|
686
752
|
});
|
|
687
753
|
web.runHydrationEvents();
|
|
688
|
-
return _el$
|
|
754
|
+
return _el$89;
|
|
689
755
|
}
|
|
690
|
-
}), _el$
|
|
756
|
+
}), _el$139, _co$33);
|
|
691
757
|
web.insert(_el$44, web.createComponent(solidJs.Show, {
|
|
692
758
|
get when() {
|
|
693
759
|
return web.memo(() => !!needsClientPagination())() && isProgressiveMode();
|
|
694
760
|
},
|
|
695
761
|
get children() {
|
|
696
|
-
var _el$
|
|
697
|
-
web.insert(_el$
|
|
698
|
-
web.insert(_el$
|
|
699
|
-
web.insert(_el$
|
|
700
|
-
web.insert(_el$
|
|
762
|
+
var _el$110 = web.getNextElement(_tmpl$25), _el$111 = _el$110.firstChild, _el$114 = _el$111.firstChild, [_el$115, _co$23] = web.getNextMarker(_el$114.nextSibling), _el$112 = _el$115.nextSibling, _el$116 = _el$112.nextSibling, [_el$117, _co$24] = web.getNextMarker(_el$116.nextSibling), _el$113 = _el$117.nextSibling, _el$118 = _el$113.nextSibling, [_el$119, _co$25] = web.getNextMarker(_el$118.nextSibling), _el$130 = _el$111.nextSibling, [_el$131, _co$29] = web.getNextMarker(_el$130.nextSibling);
|
|
763
|
+
web.insert(_el$111, clientRangeStart, _el$115, _co$23);
|
|
764
|
+
web.insert(_el$111, clientRangeEnd, _el$117, _co$24);
|
|
765
|
+
web.insert(_el$111, () => filteredRows().length.toLocaleString("fr-FR"), _el$119, _co$25);
|
|
766
|
+
web.insert(_el$110, web.createComponent(solidJs.Show, {
|
|
701
767
|
get when() {
|
|
702
768
|
return progressiveHasMore();
|
|
703
769
|
},
|
|
704
770
|
get children() {
|
|
705
|
-
var _el$
|
|
706
|
-
_el$
|
|
707
|
-
_el$
|
|
708
|
-
web.insert(_el$
|
|
709
|
-
web.insert(_el$
|
|
710
|
-
web.insert(_el$
|
|
771
|
+
var _el$120 = web.getNextElement(_tmpl$24), _el$124 = _el$120.firstChild, [_el$125, _co$26] = web.getNextMarker(_el$124.nextSibling), _el$121 = _el$125.nextSibling, _el$126 = _el$121.nextSibling, [_el$127, _co$27] = web.getNextMarker(_el$126.nextSibling), _el$122 = _el$127.nextSibling, _el$128 = _el$122.nextSibling, [_el$129, _co$28] = web.getNextMarker(_el$128.nextSibling);
|
|
772
|
+
_el$129.nextSibling;
|
|
773
|
+
_el$120.$$click = () => setProgressivePages((p) => p + 1);
|
|
774
|
+
web.insert(_el$120, showMoreLabel, _el$125, _co$26);
|
|
775
|
+
web.insert(_el$120, () => Math.min(progressiveRemaining(), clientPageSize()), _el$127, _co$27);
|
|
776
|
+
web.insert(_el$120, () => Math.min(progressiveRemaining(), clientPageSize()) > 1 ? "es" : "e", _el$129, _co$28);
|
|
711
777
|
web.runHydrationEvents();
|
|
712
|
-
return _el$
|
|
778
|
+
return _el$120;
|
|
713
779
|
}
|
|
714
|
-
}), _el$
|
|
715
|
-
return _el$
|
|
780
|
+
}), _el$131, _co$29);
|
|
781
|
+
return _el$110;
|
|
716
782
|
}
|
|
717
|
-
}), _el$
|
|
783
|
+
}), _el$141, _co$34);
|
|
718
784
|
web.effect((_p$) => {
|
|
719
785
|
var _v$0 = isVirtualizing() ? {
|
|
720
786
|
"max-height": "500px",
|
|
721
787
|
"overflow-y": "auto"
|
|
722
788
|
} : {}, _v$1 = tableParams.title || "Data table", _v$10 = tableParams.title ? `${tableId}-title` : void 0;
|
|
723
|
-
_p$.e = web.style(_el$
|
|
724
|
-
_v$1 !== _p$.t && web.setAttribute(_el$
|
|
725
|
-
_v$10 !== _p$.a && web.setAttribute(_el$
|
|
789
|
+
_p$.e = web.style(_el$70, _v$0, _p$.e);
|
|
790
|
+
_v$1 !== _p$.t && web.setAttribute(_el$70, "aria-label", _p$.t = _v$1);
|
|
791
|
+
_v$10 !== _p$.a && web.setAttribute(_el$71, "aria-labelledby", _p$.a = _v$10);
|
|
726
792
|
return _p$;
|
|
727
793
|
}, {
|
|
728
794
|
e: void 0,
|
|
@@ -742,51 +808,51 @@ function MetricRenderer(props) {
|
|
|
742
808
|
return `${title}: ${value}${unit ? " " + unit : ""}`;
|
|
743
809
|
};
|
|
744
810
|
return (() => {
|
|
745
|
-
var _el$
|
|
746
|
-
web.insert(_el$
|
|
811
|
+
var _el$149 = web.getNextElement(_tmpl$31), _el$171 = _el$149.firstChild, [_el$172, _co$42] = web.getNextMarker(_el$171.nextSibling), _el$150 = _el$172.nextSibling, _el$151 = _el$150.firstChild, _el$152 = _el$151.firstChild, _el$153 = _el$152.nextSibling, _el$154 = _el$153.firstChild, _el$156 = _el$154.nextSibling, [_el$157, _co$37] = web.getNextMarker(_el$156.nextSibling), _el$167 = _el$151.nextSibling, [_el$168, _co$40] = web.getNextMarker(_el$167.nextSibling), _el$169 = _el$168.nextSibling, [_el$170, _co$41] = web.getNextMarker(_el$169.nextSibling);
|
|
812
|
+
web.insert(_el$149, web.createComponent(CopyButton, {
|
|
747
813
|
getText: getMetricText,
|
|
748
814
|
title: "Copy metric",
|
|
749
815
|
position: "top-right"
|
|
750
|
-
}), _el$
|
|
751
|
-
web.insert(_el$
|
|
752
|
-
web.insert(_el$
|
|
753
|
-
web.insert(_el$
|
|
816
|
+
}), _el$172, _co$42);
|
|
817
|
+
web.insert(_el$152, () => metricParams.title);
|
|
818
|
+
web.insert(_el$154, () => metricParams.value);
|
|
819
|
+
web.insert(_el$153, web.createComponent(solidJs.Show, {
|
|
754
820
|
get when() {
|
|
755
821
|
return metricParams.unit;
|
|
756
822
|
},
|
|
757
823
|
get children() {
|
|
758
|
-
var _el$
|
|
759
|
-
web.insert(_el$
|
|
760
|
-
return _el$
|
|
824
|
+
var _el$155 = web.getNextElement(_tmpl$28);
|
|
825
|
+
web.insert(_el$155, () => metricParams.unit);
|
|
826
|
+
return _el$155;
|
|
761
827
|
}
|
|
762
|
-
}), _el$
|
|
763
|
-
web.insert(_el$
|
|
828
|
+
}), _el$157, _co$37);
|
|
829
|
+
web.insert(_el$150, web.createComponent(solidJs.Show, {
|
|
764
830
|
get when() {
|
|
765
831
|
return metricParams.trend;
|
|
766
832
|
},
|
|
767
833
|
get children() {
|
|
768
|
-
var _el$
|
|
769
|
-
_el$
|
|
770
|
-
web.insert(_el$
|
|
834
|
+
var _el$158 = web.getNextElement(_tmpl$29), _el$159 = _el$158.firstChild, _el$162 = _el$159.firstChild, [_el$163, _co$38] = web.getNextMarker(_el$162.nextSibling), _el$160 = _el$163.nextSibling, _el$164 = _el$160.nextSibling, [_el$165, _co$39] = web.getNextMarker(_el$164.nextSibling);
|
|
835
|
+
_el$165.nextSibling;
|
|
836
|
+
web.insert(_el$159, (() => {
|
|
771
837
|
var _c$ = web.memo(() => metricParams.trend.direction === "up");
|
|
772
838
|
return () => _c$() ? "�" : metricParams.trend.direction === "down" ? "�" : "�";
|
|
773
|
-
})(), _el$
|
|
774
|
-
web.insert(_el$
|
|
775
|
-
web.effect(() => web.className(_el$
|
|
776
|
-
return _el$
|
|
839
|
+
})(), _el$163, _co$38);
|
|
840
|
+
web.insert(_el$159, () => Math.abs(metricParams.trend.value), _el$165, _co$39);
|
|
841
|
+
web.effect(() => web.className(_el$159, `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"}`));
|
|
842
|
+
return _el$158;
|
|
777
843
|
}
|
|
778
|
-
}), _el$
|
|
779
|
-
web.insert(_el$
|
|
844
|
+
}), _el$168, _co$40);
|
|
845
|
+
web.insert(_el$150, web.createComponent(solidJs.Show, {
|
|
780
846
|
get when() {
|
|
781
847
|
return metricParams.subtitle;
|
|
782
848
|
},
|
|
783
849
|
get children() {
|
|
784
|
-
var _el$
|
|
785
|
-
web.insert(_el$
|
|
786
|
-
return _el$
|
|
850
|
+
var _el$166 = web.getNextElement(_tmpl$30);
|
|
851
|
+
web.insert(_el$166, () => metricParams.subtitle);
|
|
852
|
+
return _el$166;
|
|
787
853
|
}
|
|
788
|
-
}), _el$
|
|
789
|
-
return _el$
|
|
854
|
+
}), _el$170, _co$41);
|
|
855
|
+
return _el$149;
|
|
790
856
|
})();
|
|
791
857
|
}
|
|
792
858
|
function extractImageFromMarkdown(content) {
|
|
@@ -827,62 +893,62 @@ function TextRenderer(props) {
|
|
|
827
893
|
},
|
|
828
894
|
get fallback() {
|
|
829
895
|
return (() => {
|
|
830
|
-
var _el$
|
|
831
|
-
web.insert(_el$
|
|
896
|
+
var _el$173 = web.getNextElement(_tmpl$32), _el$175 = _el$173.firstChild, [_el$176, _co$43] = web.getNextMarker(_el$175.nextSibling), _el$174 = _el$176.nextSibling;
|
|
897
|
+
web.insert(_el$173, web.createComponent(CopyButton, {
|
|
832
898
|
getText: getTextContent,
|
|
833
899
|
title: "Copy text",
|
|
834
900
|
position: "top-right"
|
|
835
|
-
}), _el$
|
|
901
|
+
}), _el$176, _co$43);
|
|
836
902
|
web.effect((_p$) => {
|
|
837
903
|
var _v$14 = `prose prose-sm dark:prose-invert max-w-none ${textParams.className || ""}`, _v$15 = htmlContent();
|
|
838
|
-
_v$14 !== _p$.e && web.className(_el$
|
|
839
|
-
_v$15 !== _p$.t && web.setProperty(_el$
|
|
904
|
+
_v$14 !== _p$.e && web.className(_el$174, _p$.e = _v$14);
|
|
905
|
+
_v$15 !== _p$.t && web.setProperty(_el$174, "innerHTML", _p$.t = _v$15);
|
|
840
906
|
return _p$;
|
|
841
907
|
}, {
|
|
842
908
|
e: void 0,
|
|
843
909
|
t: void 0
|
|
844
910
|
});
|
|
845
|
-
return _el$
|
|
911
|
+
return _el$173;
|
|
846
912
|
})();
|
|
847
913
|
},
|
|
848
914
|
children: (data) => (() => {
|
|
849
|
-
var _el$
|
|
850
|
-
web.insert(_el$
|
|
915
|
+
var _el$177 = web.getNextElement(_tmpl$33), _el$178 = _el$177.firstChild, _el$179 = _el$178.firstChild, _el$180 = _el$179.firstChild, _el$181 = _el$178.nextSibling, _el$182 = _el$181.firstChild;
|
|
916
|
+
web.insert(_el$182, () => data().credit);
|
|
851
917
|
web.effect((_p$) => {
|
|
852
918
|
var _v$16 = data().linkUrl, _v$17 = data().imageUrl, _v$18 = data().alt;
|
|
853
|
-
_v$16 !== _p$.e && web.setAttribute(_el$
|
|
854
|
-
_v$17 !== _p$.t && web.setAttribute(_el$
|
|
855
|
-
_v$18 !== _p$.a && web.setAttribute(_el$
|
|
919
|
+
_v$16 !== _p$.e && web.setAttribute(_el$179, "href", _p$.e = _v$16);
|
|
920
|
+
_v$17 !== _p$.t && web.setAttribute(_el$180, "src", _p$.t = _v$17);
|
|
921
|
+
_v$18 !== _p$.a && web.setAttribute(_el$180, "alt", _p$.a = _v$18);
|
|
856
922
|
return _p$;
|
|
857
923
|
}, {
|
|
858
924
|
e: void 0,
|
|
859
925
|
t: void 0,
|
|
860
926
|
a: void 0
|
|
861
927
|
});
|
|
862
|
-
return _el$
|
|
928
|
+
return _el$177;
|
|
863
929
|
})()
|
|
864
930
|
});
|
|
865
931
|
}
|
|
866
932
|
function IframeRenderer(props) {
|
|
867
933
|
const params = props.component.params;
|
|
868
934
|
return (() => {
|
|
869
|
-
var _el$
|
|
870
|
-
web.insert(_el$
|
|
935
|
+
var _el$183 = web.getNextElement(_tmpl$35), _el$187 = _el$183.firstChild, [_el$188, _co$44] = web.getNextMarker(_el$187.nextSibling), _el$186 = _el$188.nextSibling;
|
|
936
|
+
web.insert(_el$183, web.createComponent(solidJs.Show, {
|
|
871
937
|
get when() {
|
|
872
938
|
return params.title;
|
|
873
939
|
},
|
|
874
940
|
get children() {
|
|
875
|
-
var _el$
|
|
876
|
-
web.insert(_el$
|
|
877
|
-
return _el$
|
|
941
|
+
var _el$184 = web.getNextElement(_tmpl$34), _el$185 = _el$184.firstChild;
|
|
942
|
+
web.insert(_el$185, () => params.title);
|
|
943
|
+
return _el$184;
|
|
878
944
|
}
|
|
879
|
-
}), _el$
|
|
945
|
+
}), _el$188, _co$44);
|
|
880
946
|
web.effect((_p$) => {
|
|
881
947
|
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);
|
|
882
|
-
_v$19 !== _p$.e && web.setAttribute(_el$
|
|
883
|
-
_v$20 !== _p$.t && web.setAttribute(_el$
|
|
884
|
-
_p$.a = web.style(_el$
|
|
885
|
-
_v$22 !== _p$.o && web.setAttribute(_el$
|
|
948
|
+
_v$19 !== _p$.e && web.setAttribute(_el$186, "src", _p$.e = _v$19);
|
|
949
|
+
_v$20 !== _p$.t && web.setAttribute(_el$186, "title", _p$.t = _v$20);
|
|
950
|
+
_p$.a = web.style(_el$186, _v$21, _p$.a);
|
|
951
|
+
_v$22 !== _p$.o && web.setAttribute(_el$186, "sandbox", _p$.o = _v$22);
|
|
886
952
|
return _p$;
|
|
887
953
|
}, {
|
|
888
954
|
e: void 0,
|
|
@@ -890,30 +956,30 @@ function IframeRenderer(props) {
|
|
|
890
956
|
a: void 0,
|
|
891
957
|
o: void 0
|
|
892
958
|
});
|
|
893
|
-
return _el$
|
|
959
|
+
return _el$183;
|
|
894
960
|
})();
|
|
895
961
|
}
|
|
896
962
|
function ImageRenderer(props) {
|
|
897
963
|
const params = props.component.params;
|
|
898
964
|
return (() => {
|
|
899
|
-
var _el$
|
|
900
|
-
web.insert(_el$
|
|
965
|
+
var _el$189 = web.getNextElement(_tmpl$37), _el$190 = _el$189.firstChild, _el$191 = _el$190.firstChild, _el$192 = _el$191.firstChild, _el$195 = _el$190.nextSibling, [_el$196, _co$45] = web.getNextMarker(_el$195.nextSibling);
|
|
966
|
+
web.insert(_el$189, web.createComponent(solidJs.Show, {
|
|
901
967
|
get when() {
|
|
902
968
|
return params.caption;
|
|
903
969
|
},
|
|
904
970
|
get children() {
|
|
905
|
-
var _el$
|
|
906
|
-
web.insert(_el$
|
|
907
|
-
return _el$
|
|
971
|
+
var _el$193 = web.getNextElement(_tmpl$36), _el$194 = _el$193.firstChild;
|
|
972
|
+
web.insert(_el$194, () => params.caption);
|
|
973
|
+
return _el$193;
|
|
908
974
|
}
|
|
909
|
-
}), _el$
|
|
975
|
+
}), _el$196, _co$45);
|
|
910
976
|
web.effect((_p$) => {
|
|
911
977
|
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";
|
|
912
|
-
_v$23 !== _p$.e && web.className(_el$
|
|
913
|
-
_v$24 !== _p$.t && web.setAttribute(_el$
|
|
914
|
-
_v$25 !== _p$.a && web.setAttribute(_el$
|
|
915
|
-
_v$26 !== _p$.o && web.setAttribute(_el$
|
|
916
|
-
_v$27 !== _p$.i && web.setAttribute(_el$
|
|
978
|
+
_v$23 !== _p$.e && web.className(_el$189, _p$.e = _v$23);
|
|
979
|
+
_v$24 !== _p$.t && web.setAttribute(_el$191, "href", _p$.t = _v$24);
|
|
980
|
+
_v$25 !== _p$.a && web.setAttribute(_el$191, "aria-label", _p$.a = _v$25);
|
|
981
|
+
_v$26 !== _p$.o && web.setAttribute(_el$192, "src", _p$.o = _v$26);
|
|
982
|
+
_v$27 !== _p$.i && web.setAttribute(_el$192, "alt", _p$.i = _v$27);
|
|
917
983
|
return _p$;
|
|
918
984
|
}, {
|
|
919
985
|
e: void 0,
|
|
@@ -922,30 +988,30 @@ function ImageRenderer(props) {
|
|
|
922
988
|
o: void 0,
|
|
923
989
|
i: void 0
|
|
924
990
|
});
|
|
925
|
-
return _el$
|
|
991
|
+
return _el$189;
|
|
926
992
|
})();
|
|
927
993
|
}
|
|
928
994
|
function LinkRenderer(props) {
|
|
929
995
|
const params = props.component.params;
|
|
930
996
|
return (() => {
|
|
931
|
-
var _el$
|
|
932
|
-
_el$
|
|
933
|
-
web.insert(_el$
|
|
934
|
-
web.insert(_el$
|
|
997
|
+
var _el$197 = web.getNextElement(_tmpl$39), _el$198 = _el$197.firstChild, _el$199 = _el$198.nextSibling, _el$200 = _el$199.firstChild, _el$202 = _el$200.nextSibling, [_el$203, _co$46] = web.getNextMarker(_el$202.nextSibling);
|
|
998
|
+
_el$197.$$click = (e) => e.stopPropagation();
|
|
999
|
+
web.insert(_el$200, () => params.label || params.url);
|
|
1000
|
+
web.insert(_el$199, web.createComponent(solidJs.Show, {
|
|
935
1001
|
get when() {
|
|
936
1002
|
return params.description;
|
|
937
1003
|
},
|
|
938
1004
|
get children() {
|
|
939
|
-
var _el$
|
|
940
|
-
web.insert(_el$
|
|
941
|
-
return _el$
|
|
1005
|
+
var _el$201 = web.getNextElement(_tmpl$38);
|
|
1006
|
+
web.insert(_el$201, () => params.description);
|
|
1007
|
+
return _el$201;
|
|
942
1008
|
}
|
|
943
|
-
}), _el$
|
|
1009
|
+
}), _el$203, _co$46);
|
|
944
1010
|
web.effect((_p$) => {
|
|
945
1011
|
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 || ""}`;
|
|
946
|
-
_v$28 !== _p$.e && web.setAttribute(_el$
|
|
947
|
-
_v$29 !== _p$.t && web.setAttribute(_el$
|
|
948
|
-
_v$30 !== _p$.a && web.className(_el$
|
|
1012
|
+
_v$28 !== _p$.e && web.setAttribute(_el$197, "href", _p$.e = _v$28);
|
|
1013
|
+
_v$29 !== _p$.t && web.setAttribute(_el$197, "aria-label", _p$.t = _v$29);
|
|
1014
|
+
_v$30 !== _p$.a && web.className(_el$197, _p$.a = _v$30);
|
|
949
1015
|
return _p$;
|
|
950
1016
|
}, {
|
|
951
1017
|
e: void 0,
|
|
@@ -953,7 +1019,7 @@ function LinkRenderer(props) {
|
|
|
953
1019
|
a: void 0
|
|
954
1020
|
});
|
|
955
1021
|
web.runHydrationEvents();
|
|
956
|
-
return _el$
|
|
1022
|
+
return _el$197;
|
|
957
1023
|
})();
|
|
958
1024
|
}
|
|
959
1025
|
function ComponentRenderer(props) {
|
|
@@ -967,12 +1033,12 @@ function ComponentRenderer(props) {
|
|
|
967
1033
|
details: validation$1.errors
|
|
968
1034
|
});
|
|
969
1035
|
return (() => {
|
|
970
|
-
var _el$
|
|
971
|
-
web.insert(_el$
|
|
1036
|
+
var _el$204 = web.getNextElement(_tmpl$40), _el$205 = _el$204.firstChild, _el$206 = _el$205.nextSibling;
|
|
1037
|
+
web.insert(_el$206, () => {
|
|
972
1038
|
var _a2, _b;
|
|
973
1039
|
return ((_b = (_a2 = validation$1.errors) == null ? void 0 : _a2[0]) == null ? void 0 : _b.message) || "Unknown validation error";
|
|
974
1040
|
});
|
|
975
|
-
return _el$
|
|
1041
|
+
return _el$204;
|
|
976
1042
|
})();
|
|
977
1043
|
}
|
|
978
1044
|
return web.createComponent(GenerativeUIErrorBoundary.GenerativeUIErrorBoundary, {
|
|
@@ -1218,27 +1284,27 @@ function ActionRenderer(props) {
|
|
|
1218
1284
|
const isDisabled = () => params.disabled || params.action === "tool-call" && isExecuting();
|
|
1219
1285
|
if (params.type === "link" || params.action === "link") {
|
|
1220
1286
|
return (() => {
|
|
1221
|
-
var _el$
|
|
1222
|
-
_el$
|
|
1223
|
-
web.insert(_el$
|
|
1287
|
+
var _el$207 = web.getNextElement(_tmpl$42), _el$209 = _el$207.firstChild, [_el$210, _co$47] = web.getNextMarker(_el$209.nextSibling), _el$211 = _el$210.nextSibling, [_el$212, _co$48] = web.getNextMarker(_el$211.nextSibling);
|
|
1288
|
+
_el$207.$$click = handleClick;
|
|
1289
|
+
web.insert(_el$207, web.createComponent(solidJs.Show, {
|
|
1224
1290
|
get when() {
|
|
1225
1291
|
return params.icon;
|
|
1226
1292
|
},
|
|
1227
1293
|
get children() {
|
|
1228
|
-
var _el$
|
|
1229
|
-
web.insert(_el$
|
|
1230
|
-
return _el$
|
|
1294
|
+
var _el$208 = web.getNextElement(_tmpl$41);
|
|
1295
|
+
web.insert(_el$208, () => params.icon);
|
|
1296
|
+
return _el$208;
|
|
1231
1297
|
}
|
|
1232
|
-
}), _el$
|
|
1233
|
-
web.insert(_el$
|
|
1298
|
+
}), _el$210, _co$47);
|
|
1299
|
+
web.insert(_el$207, () => params.label, _el$212, _co$48);
|
|
1234
1300
|
web.effect((_p$) => {
|
|
1235
1301
|
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
|
|
1236
1302
|
${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"}
|
|
1237
1303
|
${params.className || ""}`;
|
|
1238
|
-
_v$31 !== _p$.e && web.setAttribute(_el$
|
|
1239
|
-
_v$32 !== _p$.t && web.setAttribute(_el$
|
|
1240
|
-
_v$33 !== _p$.a && web.setAttribute(_el$
|
|
1241
|
-
_v$34 !== _p$.o && web.className(_el$
|
|
1304
|
+
_v$31 !== _p$.e && web.setAttribute(_el$207, "href", _p$.e = _v$31);
|
|
1305
|
+
_v$32 !== _p$.t && web.setAttribute(_el$207, "target", _p$.t = _v$32);
|
|
1306
|
+
_v$33 !== _p$.a && web.setAttribute(_el$207, "aria-label", _p$.a = _v$33);
|
|
1307
|
+
_v$34 !== _p$.o && web.className(_el$207, _p$.o = _v$34);
|
|
1242
1308
|
return _p$;
|
|
1243
1309
|
}, {
|
|
1244
1310
|
e: void 0,
|
|
@@ -1247,42 +1313,42 @@ function ActionRenderer(props) {
|
|
|
1247
1313
|
o: void 0
|
|
1248
1314
|
});
|
|
1249
1315
|
web.runHydrationEvents();
|
|
1250
|
-
return _el$
|
|
1316
|
+
return _el$207;
|
|
1251
1317
|
})();
|
|
1252
1318
|
}
|
|
1253
1319
|
return (() => {
|
|
1254
|
-
var _el$
|
|
1255
|
-
_el$
|
|
1256
|
-
web.insert(_el$
|
|
1320
|
+
var _el$213 = web.getNextElement(_tmpl$44), _el$216 = _el$213.firstChild, [_el$217, _co$49] = web.getNextMarker(_el$216.nextSibling), _el$218 = _el$217.nextSibling, [_el$219, _co$50] = web.getNextMarker(_el$218.nextSibling), _el$220 = _el$219.nextSibling, [_el$221, _co$51] = web.getNextMarker(_el$220.nextSibling);
|
|
1321
|
+
_el$213.$$click = handleClick;
|
|
1322
|
+
web.insert(_el$213, web.createComponent(solidJs.Show, {
|
|
1257
1323
|
get when() {
|
|
1258
1324
|
return web.memo(() => !!isExecuting())() && params.action === "tool-call";
|
|
1259
1325
|
},
|
|
1260
1326
|
get children() {
|
|
1261
|
-
return web.getNextElement(_tmpl$
|
|
1327
|
+
return web.getNextElement(_tmpl$43);
|
|
1262
1328
|
}
|
|
1263
|
-
}), _el$
|
|
1264
|
-
web.insert(_el$
|
|
1329
|
+
}), _el$217, _co$49);
|
|
1330
|
+
web.insert(_el$213, web.createComponent(solidJs.Show, {
|
|
1265
1331
|
get when() {
|
|
1266
1332
|
return web.memo(() => !!params.icon)() && !(isExecuting() && params.action === "tool-call");
|
|
1267
1333
|
},
|
|
1268
1334
|
get children() {
|
|
1269
|
-
var _el$
|
|
1270
|
-
web.insert(_el$
|
|
1271
|
-
return _el$
|
|
1335
|
+
var _el$215 = web.getNextElement(_tmpl$41);
|
|
1336
|
+
web.insert(_el$215, () => params.icon);
|
|
1337
|
+
return _el$215;
|
|
1272
1338
|
}
|
|
1273
|
-
}), _el$
|
|
1274
|
-
web.insert(_el$
|
|
1339
|
+
}), _el$219, _co$50);
|
|
1340
|
+
web.insert(_el$213, () => params.label, _el$221, _co$51);
|
|
1275
1341
|
web.effect((_p$) => {
|
|
1276
1342
|
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
|
|
1277
1343
|
${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"}
|
|
1278
1344
|
${isDisabled() ? "opacity-50 cursor-not-allowed" : ""}
|
|
1279
1345
|
${params.size === "sm" ? "px-3 py-1.5 text-xs" : params.size === "lg" ? "px-6 py-3 text-base" : ""}
|
|
1280
1346
|
${params.className || ""}`;
|
|
1281
|
-
_v$35 !== _p$.e && web.setAttribute(_el$
|
|
1282
|
-
_v$36 !== _p$.t && web.setProperty(_el$
|
|
1283
|
-
_v$37 !== _p$.a && web.setAttribute(_el$
|
|
1284
|
-
_v$38 !== _p$.o && web.setAttribute(_el$
|
|
1285
|
-
_v$39 !== _p$.i && web.className(_el$
|
|
1347
|
+
_v$35 !== _p$.e && web.setAttribute(_el$213, "type", _p$.e = _v$35);
|
|
1348
|
+
_v$36 !== _p$.t && web.setProperty(_el$213, "disabled", _p$.t = _v$36);
|
|
1349
|
+
_v$37 !== _p$.a && web.setAttribute(_el$213, "aria-busy", _p$.a = _v$37);
|
|
1350
|
+
_v$38 !== _p$.o && web.setAttribute(_el$213, "aria-label", _p$.o = _v$38);
|
|
1351
|
+
_v$39 !== _p$.i && web.className(_el$213, _p$.i = _v$39);
|
|
1286
1352
|
return _p$;
|
|
1287
1353
|
}, {
|
|
1288
1354
|
e: void 0,
|
|
@@ -1292,7 +1358,7 @@ function ActionRenderer(props) {
|
|
|
1292
1358
|
i: void 0
|
|
1293
1359
|
});
|
|
1294
1360
|
web.runHydrationEvents();
|
|
1295
|
-
return _el$
|
|
1361
|
+
return _el$213;
|
|
1296
1362
|
})();
|
|
1297
1363
|
}
|
|
1298
1364
|
function ErrorCardRenderer(props) {
|
|
@@ -1300,55 +1366,55 @@ function ErrorCardRenderer(props) {
|
|
|
1300
1366
|
return `Error in ${props.error.tool || "unknown tool"}: ${props.error.message || "Unknown error"}`;
|
|
1301
1367
|
};
|
|
1302
1368
|
return (() => {
|
|
1303
|
-
var _el$
|
|
1304
|
-
web.insert(_el$
|
|
1369
|
+
var _el$222 = web.getNextElement(_tmpl$48), _el$245 = _el$222.firstChild, [_el$246, _co$57] = web.getNextMarker(_el$245.nextSibling), _el$223 = _el$246.nextSibling, _el$224 = _el$223.firstChild, _el$225 = _el$224.nextSibling, _el$226 = _el$225.firstChild, _el$227 = _el$226.firstChild, _el$228 = _el$227.nextSibling, [_el$229, _co$52] = web.getNextMarker(_el$228.nextSibling), _el$230 = _el$226.nextSibling, _el$239 = _el$230.nextSibling, [_el$240, _co$54] = web.getNextMarker(_el$239.nextSibling), _el$241 = _el$240.nextSibling, [_el$242, _co$55] = web.getNextMarker(_el$241.nextSibling), _el$243 = _el$242.nextSibling, [_el$244, _co$56] = web.getNextMarker(_el$243.nextSibling);
|
|
1370
|
+
web.insert(_el$222, web.createComponent(CopyButton, {
|
|
1305
1371
|
getText: getErrorText,
|
|
1306
1372
|
title: "Copy error details",
|
|
1307
1373
|
position: "top-right"
|
|
1308
|
-
}), _el$
|
|
1309
|
-
web.insert(_el$
|
|
1310
|
-
web.insert(_el$
|
|
1311
|
-
web.insert(_el$
|
|
1374
|
+
}), _el$246, _co$57);
|
|
1375
|
+
web.insert(_el$226, () => props.error.tool || "Unknown", _el$229, _co$52);
|
|
1376
|
+
web.insert(_el$230, () => props.error.message || "An error occurred during tool execution");
|
|
1377
|
+
web.insert(_el$225, web.createComponent(solidJs.Show, {
|
|
1312
1378
|
get when() {
|
|
1313
1379
|
return props.error.type;
|
|
1314
1380
|
},
|
|
1315
1381
|
get children() {
|
|
1316
|
-
var _el$
|
|
1317
|
-
web.insert(_el$
|
|
1318
|
-
return _el$
|
|
1382
|
+
var _el$231 = web.getNextElement(_tmpl$45), _el$232 = _el$231.firstChild, _el$233 = _el$232.nextSibling, [_el$234, _co$53] = web.getNextMarker(_el$233.nextSibling);
|
|
1383
|
+
web.insert(_el$231, () => props.error.type, _el$234, _co$53);
|
|
1384
|
+
return _el$231;
|
|
1319
1385
|
}
|
|
1320
|
-
}), _el$
|
|
1321
|
-
web.insert(_el$
|
|
1386
|
+
}), _el$240, _co$54);
|
|
1387
|
+
web.insert(_el$225, web.createComponent(solidJs.Show, {
|
|
1322
1388
|
get when() {
|
|
1323
1389
|
var _a;
|
|
1324
1390
|
return (_a = props.error.suggestions) == null ? void 0 : _a.length;
|
|
1325
1391
|
},
|
|
1326
1392
|
get children() {
|
|
1327
|
-
var _el$
|
|
1328
|
-
web.insert(_el$
|
|
1393
|
+
var _el$235 = web.getNextElement(_tmpl$46), _el$236 = _el$235.firstChild, _el$237 = _el$236.nextSibling;
|
|
1394
|
+
web.insert(_el$237, web.createComponent(solidJs.For, {
|
|
1329
1395
|
get each() {
|
|
1330
1396
|
return props.error.suggestions;
|
|
1331
1397
|
},
|
|
1332
1398
|
children: (suggestion) => (() => {
|
|
1333
|
-
var _el$
|
|
1334
|
-
web.insert(_el$
|
|
1335
|
-
return _el$
|
|
1399
|
+
var _el$247 = web.getNextElement(_tmpl$49);
|
|
1400
|
+
web.insert(_el$247, suggestion);
|
|
1401
|
+
return _el$247;
|
|
1336
1402
|
})()
|
|
1337
1403
|
}));
|
|
1338
|
-
return _el$
|
|
1404
|
+
return _el$235;
|
|
1339
1405
|
}
|
|
1340
|
-
}), _el$
|
|
1341
|
-
web.insert(_el$
|
|
1406
|
+
}), _el$242, _co$55);
|
|
1407
|
+
web.insert(_el$225, web.createComponent(solidJs.Show, {
|
|
1342
1408
|
get when() {
|
|
1343
1409
|
return props.error.timestamp;
|
|
1344
1410
|
},
|
|
1345
1411
|
get children() {
|
|
1346
|
-
var _el$
|
|
1347
|
-
web.insert(_el$
|
|
1348
|
-
return _el$
|
|
1412
|
+
var _el$238 = web.getNextElement(_tmpl$47);
|
|
1413
|
+
web.insert(_el$238, () => new Date(props.error.timestamp).toLocaleString());
|
|
1414
|
+
return _el$238;
|
|
1349
1415
|
}
|
|
1350
|
-
}), _el$
|
|
1351
|
-
return _el$
|
|
1416
|
+
}), _el$244, _co$56);
|
|
1417
|
+
return _el$222;
|
|
1352
1418
|
})();
|
|
1353
1419
|
}
|
|
1354
1420
|
function isErrorResponse(content) {
|
|
@@ -1371,20 +1437,20 @@ function UIResourceHtmlRenderer(props) {
|
|
|
1371
1437
|
return ((_a = props.resource.metadata) == null ? void 0 : _a.title) || ((_b = props.resource.uri) == null ? void 0 : _b.replace("ui://deposium/", "")) || "Resource";
|
|
1372
1438
|
};
|
|
1373
1439
|
return (() => {
|
|
1374
|
-
var _el$
|
|
1375
|
-
web.insert(_el$
|
|
1440
|
+
var _el$248 = web.getNextElement(_tmpl$51), _el$252 = _el$248.firstChild, [_el$253, _co$58] = web.getNextMarker(_el$252.nextSibling), _el$251 = _el$253.nextSibling;
|
|
1441
|
+
web.insert(_el$248, web.createComponent(solidJs.Show, {
|
|
1376
1442
|
get when() {
|
|
1377
1443
|
var _a;
|
|
1378
1444
|
return ((_a = props.resource.metadata) == null ? void 0 : _a.title) || props.resource.uri;
|
|
1379
1445
|
},
|
|
1380
1446
|
get children() {
|
|
1381
|
-
var _el$
|
|
1382
|
-
web.insert(_el$
|
|
1383
|
-
return _el$
|
|
1447
|
+
var _el$249 = web.getNextElement(_tmpl$50), _el$250 = _el$249.firstChild;
|
|
1448
|
+
web.insert(_el$250, resourceTitle);
|
|
1449
|
+
return _el$249;
|
|
1384
1450
|
}
|
|
1385
|
-
}), _el$
|
|
1386
|
-
web.effect(() => web.setProperty(_el$
|
|
1387
|
-
return _el$
|
|
1451
|
+
}), _el$253, _co$58);
|
|
1452
|
+
web.effect(() => web.setProperty(_el$251, "innerHTML", htmlContent()));
|
|
1453
|
+
return _el$248;
|
|
1388
1454
|
})();
|
|
1389
1455
|
}
|
|
1390
1456
|
const UIResourceRenderer = (props) => {
|
|
@@ -1464,24 +1530,24 @@ const UIResourceRenderer = (props) => {
|
|
|
1464
1530
|
return web.createComponent(RenderContext.RenderProvider, {
|
|
1465
1531
|
renderComponent,
|
|
1466
1532
|
get children() {
|
|
1467
|
-
var _el$
|
|
1468
|
-
web.insert(_el$
|
|
1533
|
+
var _el$254 = web.getNextElement(_tmpl$52), _el$255 = _el$254.firstChild, _el$256 = _el$255.nextSibling, [_el$257, _co$59] = web.getNextMarker(_el$256.nextSibling);
|
|
1534
|
+
web.insert(_el$255, web.createComponent(solidJs.For, {
|
|
1469
1535
|
get each() {
|
|
1470
1536
|
return layoutData.components;
|
|
1471
1537
|
},
|
|
1472
1538
|
children: (component) => (() => {
|
|
1473
|
-
var _el$
|
|
1474
|
-
web.insert(_el$
|
|
1539
|
+
var _el$258 = web.getNextElement(_tmpl$53);
|
|
1540
|
+
web.insert(_el$258, web.createComponent(ComponentRenderer, {
|
|
1475
1541
|
component,
|
|
1476
1542
|
get onError() {
|
|
1477
1543
|
return props.onError;
|
|
1478
1544
|
}
|
|
1479
1545
|
}));
|
|
1480
|
-
web.effect((_$p) => web.style(_el$
|
|
1481
|
-
return _el$
|
|
1546
|
+
web.effect((_$p) => web.style(_el$258, getGridStyleString(component), _$p));
|
|
1547
|
+
return _el$258;
|
|
1482
1548
|
})()
|
|
1483
1549
|
}));
|
|
1484
|
-
web.insert(_el$
|
|
1550
|
+
web.insert(_el$254, web.createComponent(solidJs.Show, {
|
|
1485
1551
|
get when() {
|
|
1486
1552
|
return shouldShowAutoFooter();
|
|
1487
1553
|
},
|
|
@@ -1492,21 +1558,21 @@ const UIResourceRenderer = (props) => {
|
|
|
1492
1558
|
}
|
|
1493
1559
|
});
|
|
1494
1560
|
}
|
|
1495
|
-
}), _el$
|
|
1561
|
+
}), _el$257, _co$59);
|
|
1496
1562
|
web.effect((_p$) => {
|
|
1497
1563
|
var _v$40 = `w-full ${props.class || ""}`, _v$41 = gridContainerStyle();
|
|
1498
|
-
_v$40 !== _p$.e && web.className(_el$
|
|
1499
|
-
_p$.t = web.style(_el$
|
|
1564
|
+
_v$40 !== _p$.e && web.className(_el$254, _p$.e = _v$40);
|
|
1565
|
+
_p$.t = web.style(_el$255, _v$41, _p$.t);
|
|
1500
1566
|
return _p$;
|
|
1501
1567
|
}, {
|
|
1502
1568
|
e: void 0,
|
|
1503
1569
|
t: void 0
|
|
1504
1570
|
});
|
|
1505
|
-
return _el$
|
|
1571
|
+
return _el$254;
|
|
1506
1572
|
}
|
|
1507
1573
|
});
|
|
1508
1574
|
};
|
|
1509
|
-
web.delegateEvents(["click"]);
|
|
1575
|
+
web.delegateEvents(["click", "input"]);
|
|
1510
1576
|
exports.UIResourceRenderer = UIResourceRenderer;
|
|
1511
1577
|
exports.renderCellValue = renderCellValue;
|
|
1512
1578
|
//# sourceMappingURL=UIResourceRenderer.cjs.map
|