@seed-ship/mcp-ui-solid 4.3.6 → 4.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/UIResourceRenderer.cjs +264 -238
- package/dist/components/UIResourceRenderer.cjs.map +1 -1
- package/dist/components/UIResourceRenderer.d.ts +6 -0
- package/dist/components/UIResourceRenderer.d.ts.map +1 -1
- package/dist/components/UIResourceRenderer.js +264 -238
- package/dist/components/UIResourceRenderer.js.map +1 -1
- package/package.json +1 -1
- package/src/components/UIResourceRenderer.tsx +76 -55
- 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(`<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 max-w-xs min-w-[200px] pl-8 pr-8 py-1.5 text-sm border border-gray-200 dark:border-gray-600 rounded-md bg-white dark:bg-gray-700 text-gray-900 dark:text-white placeholder-gray-400 focus:border-blue-400 focus:ring-1 focus:ring-blue-400 outline-none"><!$><!/>`), _tmpl$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 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 cursor-pointer select-none hover:bg-gray-100 dark:hover:bg-gray-800 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>`);
|
|
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 max-w-xs min-w-[200px] pl-8 pr-8 py-1.5 text-sm border border-gray-200 dark:border-gray-600 rounded-md bg-white dark:bg-gray-700 text-gray-900 dark:text-white placeholder-gray-400 focus:border-blue-400 focus:ring-1 focus:ring-blue-400 outline-none"><!$><!/>`), _tmpl$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(`<select class="ml-2 px-1 py-0.5 text-xs border border-gray-200 dark:border-gray-600 rounded bg-white dark:bg-gray-700 text-gray-700 dark:text-gray-300">`), _tmpl$24 = /* @__PURE__ */ web.template(`<span class=text-gray-400>/ page`), _tmpl$25 = /* @__PURE__ */ web.template(`<div class="mt-3 flex items-center justify-between text-xs text-gray-500 dark:text-gray-400"><span><!$><!/>–<!$><!/> / <!$><!/></span><div class="flex items-center gap-2"><button class="px-2 py-1 rounded hover:bg-gray-100 dark:hover:bg-gray-700 disabled:opacity-40 disabled:cursor-not-allowed transition-colors">◀</button><span><!$><!/> / <!$><!/></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">▶</button><!$><!/>`), _tmpl$26 = /* @__PURE__ */ web.template(`<div><!$><!/><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-100 dark:bg-gray-900 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-100 dark:bg-gray-900 cursor-pointer select-none hover:bg-gray-200 dark:hover:bg-gray-800 transition-colors"><span class="inline-flex items-center gap-1"><!$><!/><span class="text-[10px] leading-none">`), _tmpl$28 = /* @__PURE__ */ web.template(`<option>`), _tmpl$29 = /* @__PURE__ */ web.template(`<span class="ml-2 text-sm font-medium text-gray-500 dark:text-gray-400">`), _tmpl$30 = /* @__PURE__ */ web.template(`<div class="mt-3 flex items-center"><span><!$><!/> <!$><!/>%`), _tmpl$31 = /* @__PURE__ */ web.template(`<p class="mt-2 text-xs text-gray-500 dark:text-gray-400">`), _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 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$33 = /* @__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$34 = /* @__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$35 = /* @__PURE__ */ web.template(`<div class="px-4 py-2 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900"><h3 class="text-sm font-semibold text-gray-900 dark:text-white">`), _tmpl$36 = /* @__PURE__ */ web.template(`<div class="w-full h-full bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700 overflow-hidden flex flex-col"><!$><!/><iframe class="w-full border-0 flex-1"loading=lazy>`, true, false, false), _tmpl$37 = /* @__PURE__ */ web.template(`<figcaption class="p-3 border-t border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800"><p class="text-sm text-gray-600 dark:text-gray-400 text-center">`), _tmpl$38 = /* @__PURE__ */ web.template(`<figure><div class="flex-1 flex items-center justify-center p-4 bg-gray-50 dark:bg-gray-900 min-h-[200px]"><a target=_blank rel="noopener noreferrer"class="cursor-zoom-in focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 rounded"><img class="max-w-full max-h-[500px] object-contain rounded shadow-sm hover:opacity-95 transition-opacity"loading=lazy></a></div><!$><!/>`, true, false, false), _tmpl$39 = /* @__PURE__ */ web.template(`<p class="text-xs text-gray-500 dark:text-gray-400 truncate">`), _tmpl$40 = /* @__PURE__ */ web.template(`<a target=_blank rel="noopener noreferrer"><div class="p-2 bg-blue-50 dark:bg-blue-900/30 rounded-full text-blue-600 dark:text-blue-400 group-hover:bg-blue-100 dark:group-hover:bg-blue-900/50 shrink-0 transition-colors"aria-hidden=true><svg xmlns=http://www.w3.org/2000/svg class="w-5 h-5"viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg></div><div class="flex-1 min-w-0"><h4 class="text-sm font-medium text-gray-900 dark:text-white truncate group-hover:text-blue-600 dark:group-hover:text-blue-400 transition-colors"></h4><!$><!/></div><svg xmlns=http://www.w3.org/2000/svg class="w-4 h-4 text-gray-400 group-hover:text-gray-600 dark:group-hover:text-gray-300 shrink-0 transition-colors"viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round aria-hidden=true><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1=10 y1=14 x2=21 y2=3>`), _tmpl$41 = /* @__PURE__ */ web.template(`<div class="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$42 = /* @__PURE__ */ web.template(`<span aria-hidden=true>`), _tmpl$43 = /* @__PURE__ */ web.template(`<a rel="noopener noreferrer"><!$><!/><!$><!/>`), _tmpl$44 = /* @__PURE__ */ web.template(`<span class="animate-spin h-4 w-4 border-2 border-current border-t-transparent rounded-full"aria-hidden=true>`), _tmpl$45 = /* @__PURE__ */ web.template(`<button><!$><!/><!$><!/><!$><!/>`), _tmpl$46 = /* @__PURE__ */ web.template(`<p class="text-xs text-red-600 dark:text-red-400 mt-1">Type: <!$><!/>`), _tmpl$47 = /* @__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$48 = /* @__PURE__ */ web.template(`<p class="text-xs text-red-500 dark:text-red-500 mt-2">`), _tmpl$49 = /* @__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$50 = /* @__PURE__ */ web.template(`<li>`), _tmpl$51 = /* @__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$52 = /* @__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$53 = /* @__PURE__ */ web.template(`<div><div class="grid gap-4"></div><!$><!/>`), _tmpl$54 = /* @__PURE__ */ web.template(`<div>`);
|
|
25
25
|
function CopyButton(props) {
|
|
26
26
|
const [copied, setCopied] = solidJs.createSignal(false);
|
|
27
27
|
const handleCopy = async () => {
|
|
@@ -208,6 +208,17 @@ function ChartRenderer(props) {
|
|
|
208
208
|
}
|
|
209
209
|
});
|
|
210
210
|
}
|
|
211
|
+
function highlightQuery(html, query) {
|
|
212
|
+
const q = query.trim();
|
|
213
|
+
if (!q) return html;
|
|
214
|
+
const escaped = q.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
215
|
+
const regex = new RegExp(`(${escaped})`, "gi");
|
|
216
|
+
return html.replace(/(<[^>]+>)|([^<]+)/g, (_m, tag, text) => {
|
|
217
|
+
if (tag) return tag;
|
|
218
|
+
if (!text) return "";
|
|
219
|
+
return text.replace(regex, '<mark class="bg-yellow-200 dark:bg-[#222F49] text-inherit rounded px-0.5">$1</mark>');
|
|
220
|
+
});
|
|
221
|
+
}
|
|
211
222
|
function renderCellValue(value) {
|
|
212
223
|
if (value === null || value === void 0) {
|
|
213
224
|
return "-";
|
|
@@ -282,7 +293,6 @@ function TableRenderer(props) {
|
|
|
282
293
|
setSortDir("asc");
|
|
283
294
|
}
|
|
284
295
|
setClientPage(0);
|
|
285
|
-
setProgressivePages(1);
|
|
286
296
|
};
|
|
287
297
|
const sortedRows = solidJs.createMemo(() => {
|
|
288
298
|
var _a;
|
|
@@ -323,7 +333,6 @@ function TableRenderer(props) {
|
|
|
323
333
|
searchTimer = setTimeout(() => {
|
|
324
334
|
setDebouncedQuery(value);
|
|
325
335
|
setClientPage(0);
|
|
326
|
-
setProgressivePages(1);
|
|
327
336
|
}, 200);
|
|
328
337
|
};
|
|
329
338
|
const normalize = (s) => s.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase();
|
|
@@ -338,28 +347,45 @@ function TableRenderer(props) {
|
|
|
338
347
|
}));
|
|
339
348
|
});
|
|
340
349
|
const isExpanded = ExpandableWrapper.useExpanded();
|
|
341
|
-
const
|
|
342
|
-
const
|
|
343
|
-
const
|
|
350
|
+
const defaultPageSize = () => tableParams.pageSize ?? 25;
|
|
351
|
+
const chatDefault = () => tableParams.chatPageSize ?? Math.min(10, defaultPageSize());
|
|
352
|
+
const [userPageSize, setUserPageSize] = solidJs.createSignal(null);
|
|
353
|
+
const clientPageSize = () => {
|
|
354
|
+
const ups = userPageSize();
|
|
355
|
+
if (ups !== null) return ups;
|
|
356
|
+
return isExpanded() ? defaultPageSize() : chatDefault();
|
|
357
|
+
};
|
|
358
|
+
const showAll = () => userPageSize() === 0;
|
|
344
359
|
const hasServerPagination = () => !!tableParams.pagination;
|
|
345
|
-
const
|
|
346
|
-
const needsClientPagination = () => !hasServerPagination() && clientPageSize() > 0 && filteredRows().length > clientPageSize();
|
|
360
|
+
const needsClientPagination = () => !hasServerPagination() && !showAll() && clientPageSize() > 0 && filteredRows().length > clientPageSize();
|
|
347
361
|
const [clientPage, setClientPage] = solidJs.createSignal(tableParams.initialPage ?? 0);
|
|
348
|
-
const [progressivePages, setProgressivePages] = solidJs.createSignal(1);
|
|
349
362
|
const clientTotalPages = () => needsClientPagination() ? Math.ceil(filteredRows().length / clientPageSize()) : 1;
|
|
350
363
|
const clientVisibleRows = solidJs.createMemo(() => {
|
|
351
|
-
if (!needsClientPagination()) return filteredRows();
|
|
352
|
-
if (isProgressiveMode()) {
|
|
353
|
-
return filteredRows().slice(0, progressivePages() * clientPageSize());
|
|
354
|
-
}
|
|
364
|
+
if (showAll() || !needsClientPagination()) return filteredRows();
|
|
355
365
|
const start = clientPage() * clientPageSize();
|
|
356
366
|
return filteredRows().slice(start, start + clientPageSize());
|
|
357
367
|
});
|
|
358
|
-
const clientRangeStart = () => needsClientPagination() ?
|
|
359
|
-
const clientRangeEnd = () => needsClientPagination() ?
|
|
360
|
-
const
|
|
361
|
-
|
|
362
|
-
|
|
368
|
+
const clientRangeStart = () => needsClientPagination() ? clientPage() * clientPageSize() + 1 : 1;
|
|
369
|
+
const clientRangeEnd = () => needsClientPagination() ? Math.min((clientPage() + 1) * clientPageSize(), filteredRows().length) : filteredRows().length;
|
|
370
|
+
const pageSizeOptions = () => {
|
|
371
|
+
const total = filteredRows().length;
|
|
372
|
+
const opts = [];
|
|
373
|
+
for (const n of [10, 30, 60, 100]) {
|
|
374
|
+
if (n < total) opts.push({
|
|
375
|
+
value: n,
|
|
376
|
+
label: String(n)
|
|
377
|
+
});
|
|
378
|
+
}
|
|
379
|
+
opts.push({
|
|
380
|
+
value: 0,
|
|
381
|
+
label: "All"
|
|
382
|
+
});
|
|
383
|
+
return opts;
|
|
384
|
+
};
|
|
385
|
+
const handlePageSizeChange = (val) => {
|
|
386
|
+
setUserPageSize(val === 0 ? 0 : val);
|
|
387
|
+
setClientPage(0);
|
|
388
|
+
};
|
|
363
389
|
const [virtualizer, setVirtualizer] = solidJs.createSignal(null);
|
|
364
390
|
const [isVirtualizing, setIsVirtualizing] = solidJs.createSignal(false);
|
|
365
391
|
const shouldVirtualize = solidJs.createMemo(() => {
|
|
@@ -491,7 +517,7 @@ ${dataRows}`;
|
|
|
491
517
|
},
|
|
492
518
|
children: (column) => (() => {
|
|
493
519
|
var _el$23 = web.getNextElement(_tmpl$10), _el$24 = _el$23.firstChild;
|
|
494
|
-
web.effect(() => web.setProperty(_el$24, "innerHTML", renderCellValue(row[column.key])));
|
|
520
|
+
web.effect(() => web.setProperty(_el$24, "innerHTML", highlightQuery(renderCellValue(row[column.key]), debouncedQuery())));
|
|
495
521
|
return _el$23;
|
|
496
522
|
})()
|
|
497
523
|
}));
|
|
@@ -524,7 +550,7 @@ ${dataRows}`;
|
|
|
524
550
|
},
|
|
525
551
|
children: (column) => (() => {
|
|
526
552
|
var _el$27 = web.getNextElement(_tmpl$10), _el$28 = _el$27.firstChild;
|
|
527
|
-
web.effect(() => web.setProperty(_el$28, "innerHTML", renderCellValue(row[column.key])));
|
|
553
|
+
web.effect(() => web.setProperty(_el$28, "innerHTML", highlightQuery(renderCellValue(row[column.key]), debouncedQuery())));
|
|
528
554
|
return _el$27;
|
|
529
555
|
})()
|
|
530
556
|
}));
|
|
@@ -553,7 +579,7 @@ ${dataRows}`;
|
|
|
553
579
|
},
|
|
554
580
|
copyLabel: "Copy table (CSV)",
|
|
555
581
|
get children() {
|
|
556
|
-
var _el$29 = web.getNextElement(_tmpl$26), _el$
|
|
582
|
+
var _el$29 = web.getNextElement(_tmpl$26), _el$120 = _el$29.firstChild, [_el$121, _co$28] = web.getNextMarker(_el$120.nextSibling), _el$44 = _el$121.nextSibling, _el$112 = _el$44.firstChild, [_el$113, _co$24] = web.getNextMarker(_el$112.nextSibling), _el$114 = _el$113.nextSibling, [_el$115, _co$25] = web.getNextMarker(_el$114.nextSibling), _el$70 = _el$115.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$116 = _el$70.nextSibling, [_el$117, _co$26] = web.getNextMarker(_el$116.nextSibling), _el$118 = _el$117.nextSibling, [_el$119, _co$27] = web.getNextMarker(_el$118.nextSibling);
|
|
557
583
|
web.insert(_el$29, web.createComponent(solidJs.Show, {
|
|
558
584
|
when: exportable,
|
|
559
585
|
get fallback() {
|
|
@@ -611,7 +637,7 @@ ${dataRows}`;
|
|
|
611
637
|
web.runHydrationEvents();
|
|
612
638
|
return _el$30;
|
|
613
639
|
}
|
|
614
|
-
}), _el$
|
|
640
|
+
}), _el$121, _co$28);
|
|
615
641
|
web.insert(_el$44, web.createComponent(solidJs.Show, {
|
|
616
642
|
get when() {
|
|
617
643
|
return tableParams.title;
|
|
@@ -636,7 +662,7 @@ ${dataRows}`;
|
|
|
636
662
|
}), _el$54, _co$1);
|
|
637
663
|
return _el$45;
|
|
638
664
|
}
|
|
639
|
-
}), _el$
|
|
665
|
+
}), _el$113, _co$24);
|
|
640
666
|
web.insert(_el$44, web.createComponent(solidJs.Show, {
|
|
641
667
|
get when() {
|
|
642
668
|
return isSearchable();
|
|
@@ -677,7 +703,7 @@ ${dataRows}`;
|
|
|
677
703
|
}
|
|
678
704
|
})];
|
|
679
705
|
}
|
|
680
|
-
}), _el$
|
|
706
|
+
}), _el$115, _co$25);
|
|
681
707
|
var _ref$ = scrollContainerRef;
|
|
682
708
|
typeof _ref$ === "function" ? web.use(_ref$, _el$70) : scrollContainerRef = _el$70;
|
|
683
709
|
web.insert(_el$73, web.createComponent(solidJs.For, {
|
|
@@ -685,27 +711,27 @@ ${dataRows}`;
|
|
|
685
711
|
return tableParams.columns;
|
|
686
712
|
},
|
|
687
713
|
children: (column) => (() => {
|
|
688
|
-
var _el$
|
|
689
|
-
web.addEventListener(_el$
|
|
690
|
-
web.insert(_el$
|
|
691
|
-
web.insert(_el$
|
|
714
|
+
var _el$122 = web.getNextElement(_tmpl$27), _el$123 = _el$122.firstChild, _el$125 = _el$123.firstChild, [_el$126, _co$29] = web.getNextMarker(_el$125.nextSibling), _el$124 = _el$126.nextSibling;
|
|
715
|
+
web.addEventListener(_el$122, "click", () => handleSort(column.key));
|
|
716
|
+
web.insert(_el$123, () => column.label, _el$126, _co$29);
|
|
717
|
+
web.insert(_el$124, () => sortIndicator(column.key));
|
|
692
718
|
web.effect((_p$) => {
|
|
693
|
-
var _v$
|
|
719
|
+
var _v$12 = column.width ? {
|
|
694
720
|
width: column.width
|
|
695
|
-
} : {}, _v$
|
|
721
|
+
} : {}, _v$13 = `Sort by ${column.label}`, _v$14 = {
|
|
696
722
|
"opacity-30": sortKey() !== column.key,
|
|
697
723
|
"opacity-100 text-blue-600 dark:text-blue-400": sortKey() === column.key
|
|
698
724
|
};
|
|
699
|
-
_p$.e = web.style(_el$
|
|
700
|
-
_v$
|
|
701
|
-
_p$.a = web.classList(_el$
|
|
725
|
+
_p$.e = web.style(_el$122, _v$12, _p$.e);
|
|
726
|
+
_v$13 !== _p$.t && web.setAttribute(_el$122, "title", _p$.t = _v$13);
|
|
727
|
+
_p$.a = web.classList(_el$124, _v$14, _p$.a);
|
|
702
728
|
return _p$;
|
|
703
729
|
}, {
|
|
704
730
|
e: void 0,
|
|
705
731
|
t: void 0,
|
|
706
732
|
a: void 0
|
|
707
733
|
});
|
|
708
|
-
return _el$
|
|
734
|
+
return _el$122;
|
|
709
735
|
})()
|
|
710
736
|
}));
|
|
711
737
|
web.insert(_el$71, web.createComponent(solidJs.Show, {
|
|
@@ -730,24 +756,48 @@ ${dataRows}`;
|
|
|
730
756
|
web.insert(_el$77, () => tableParams.pagination.totalRows, _el$88, _co$17);
|
|
731
757
|
return _el$76;
|
|
732
758
|
}
|
|
733
|
-
}), _el$
|
|
759
|
+
}), _el$117, _co$26);
|
|
734
760
|
web.insert(_el$44, web.createComponent(solidJs.Show, {
|
|
735
761
|
get when() {
|
|
736
|
-
return
|
|
762
|
+
return needsClientPagination();
|
|
737
763
|
},
|
|
738
764
|
get children() {
|
|
739
|
-
var _el$89 = web.getNextElement(_tmpl$
|
|
740
|
-
web.insert(_el$90, clientRangeStart, _el$
|
|
741
|
-
web.insert(_el$90, clientRangeEnd, _el$
|
|
742
|
-
web.insert(_el$90, () => filteredRows().length.toLocaleString("fr-FR"), _el$
|
|
743
|
-
_el$
|
|
744
|
-
web.insert(_el$
|
|
745
|
-
web.insert(_el$
|
|
746
|
-
_el$
|
|
765
|
+
var _el$89 = web.getNextElement(_tmpl$25), _el$90 = _el$89.firstChild, _el$93 = _el$90.firstChild, [_el$94, _co$18] = web.getNextMarker(_el$93.nextSibling), _el$91 = _el$94.nextSibling, _el$95 = _el$91.nextSibling, [_el$96, _co$19] = web.getNextMarker(_el$95.nextSibling), _el$92 = _el$96.nextSibling, _el$97 = _el$92.nextSibling, [_el$98, _co$20] = web.getNextMarker(_el$97.nextSibling), _el$99 = _el$90.nextSibling, _el$100 = _el$99.firstChild, _el$101 = _el$100.nextSibling, _el$103 = _el$101.firstChild, [_el$104, _co$21] = web.getNextMarker(_el$103.nextSibling), _el$102 = _el$104.nextSibling, _el$105 = _el$102.nextSibling, [_el$106, _co$22] = web.getNextMarker(_el$105.nextSibling), _el$107 = _el$101.nextSibling, _el$110 = _el$107.nextSibling, [_el$111, _co$23] = web.getNextMarker(_el$110.nextSibling);
|
|
766
|
+
web.insert(_el$90, clientRangeStart, _el$94, _co$18);
|
|
767
|
+
web.insert(_el$90, clientRangeEnd, _el$96, _co$19);
|
|
768
|
+
web.insert(_el$90, () => filteredRows().length.toLocaleString("fr-FR"), _el$98, _co$20);
|
|
769
|
+
_el$100.$$click = () => setClientPage((p) => p - 1);
|
|
770
|
+
web.insert(_el$101, () => clientPage() + 1, _el$104, _co$21);
|
|
771
|
+
web.insert(_el$101, clientTotalPages, _el$106, _co$22);
|
|
772
|
+
_el$107.$$click = () => setClientPage((p) => p + 1);
|
|
773
|
+
web.insert(_el$99, web.createComponent(solidJs.Show, {
|
|
774
|
+
get when() {
|
|
775
|
+
return web.memo(() => !!isExpanded())() && filteredRows().length > 10;
|
|
776
|
+
},
|
|
777
|
+
get children() {
|
|
778
|
+
return [(() => {
|
|
779
|
+
var _el$108 = web.getNextElement(_tmpl$23);
|
|
780
|
+
_el$108.addEventListener("change", (e) => handlePageSizeChange(Number(e.currentTarget.value)));
|
|
781
|
+
web.insert(_el$108, web.createComponent(solidJs.For, {
|
|
782
|
+
get each() {
|
|
783
|
+
return pageSizeOptions();
|
|
784
|
+
},
|
|
785
|
+
children: (opt) => (() => {
|
|
786
|
+
var _el$127 = web.getNextElement(_tmpl$28);
|
|
787
|
+
web.insert(_el$127, () => opt.label);
|
|
788
|
+
web.effect(() => web.setProperty(_el$127, "value", opt.value));
|
|
789
|
+
return _el$127;
|
|
790
|
+
})()
|
|
791
|
+
}));
|
|
792
|
+
web.effect(() => web.setProperty(_el$108, "value", clientPageSize()));
|
|
793
|
+
return _el$108;
|
|
794
|
+
})(), web.getNextElement(_tmpl$24)];
|
|
795
|
+
}
|
|
796
|
+
}), _el$111, _co$23);
|
|
747
797
|
web.effect((_p$) => {
|
|
748
798
|
var _v$8 = clientPage() === 0, _v$9 = clientPage() >= clientTotalPages() - 1;
|
|
749
|
-
_v$8 !== _p$.e && web.setProperty(_el$
|
|
750
|
-
_v$9 !== _p$.t && web.setProperty(_el$
|
|
799
|
+
_v$8 !== _p$.e && web.setProperty(_el$100, "disabled", _p$.e = _v$8);
|
|
800
|
+
_v$9 !== _p$.t && web.setProperty(_el$107, "disabled", _p$.t = _v$9);
|
|
751
801
|
return _p$;
|
|
752
802
|
}, {
|
|
753
803
|
e: void 0,
|
|
@@ -756,50 +806,25 @@ ${dataRows}`;
|
|
|
756
806
|
web.runHydrationEvents();
|
|
757
807
|
return _el$89;
|
|
758
808
|
}
|
|
759
|
-
}), _el$
|
|
760
|
-
web.insert(_el$44, web.createComponent(solidJs.Show, {
|
|
761
|
-
get when() {
|
|
762
|
-
return web.memo(() => !!needsClientPagination())() && isProgressiveMode();
|
|
763
|
-
},
|
|
764
|
-
get children() {
|
|
765
|
-
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);
|
|
766
|
-
web.insert(_el$111, clientRangeStart, _el$115, _co$23);
|
|
767
|
-
web.insert(_el$111, clientRangeEnd, _el$117, _co$24);
|
|
768
|
-
web.insert(_el$111, () => filteredRows().length.toLocaleString("fr-FR"), _el$119, _co$25);
|
|
769
|
-
web.insert(_el$110, web.createComponent(solidJs.Show, {
|
|
770
|
-
get when() {
|
|
771
|
-
return progressiveHasMore();
|
|
772
|
-
},
|
|
773
|
-
get children() {
|
|
774
|
-
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);
|
|
775
|
-
_el$129.nextSibling;
|
|
776
|
-
_el$120.$$click = () => setProgressivePages((p) => p + 1);
|
|
777
|
-
web.insert(_el$120, showMoreLabel, _el$125, _co$26);
|
|
778
|
-
web.insert(_el$120, () => Math.min(progressiveRemaining(), clientPageSize()), _el$127, _co$27);
|
|
779
|
-
web.insert(_el$120, () => Math.min(progressiveRemaining(), clientPageSize()) > 1 ? "es" : "e", _el$129, _co$28);
|
|
780
|
-
web.runHydrationEvents();
|
|
781
|
-
return _el$120;
|
|
782
|
-
}
|
|
783
|
-
}), _el$131, _co$29);
|
|
784
|
-
return _el$110;
|
|
785
|
-
}
|
|
786
|
-
}), _el$141, _co$34);
|
|
809
|
+
}), _el$119, _co$27);
|
|
787
810
|
web.effect((_p$) => {
|
|
788
|
-
var _v$0 = isVirtualizing() ? {
|
|
811
|
+
var _v$0 = `relative w-full bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700 overflow-hidden group ${isExpanded() ? "" : "h-full"}`, _v$1 = isVirtualizing() ? {
|
|
789
812
|
"max-height": "500px",
|
|
790
813
|
"overflow-y": "auto"
|
|
791
|
-
} : clientVisibleRows().length > 8 ? {
|
|
792
|
-
"max-height":
|
|
814
|
+
} : !isExpanded() && clientVisibleRows().length > 8 ? {
|
|
815
|
+
"max-height": "400px",
|
|
793
816
|
"overflow-y": "auto"
|
|
794
|
-
} : {}, _v$
|
|
795
|
-
_p$.e
|
|
796
|
-
|
|
797
|
-
_v$10 !== _p$.a && web.setAttribute(_el$
|
|
817
|
+
} : {}, _v$10 = tableParams.title || "Data table", _v$11 = tableParams.title ? `${tableId}-title` : void 0;
|
|
818
|
+
_v$0 !== _p$.e && web.className(_el$29, _p$.e = _v$0);
|
|
819
|
+
_p$.t = web.style(_el$70, _v$1, _p$.t);
|
|
820
|
+
_v$10 !== _p$.a && web.setAttribute(_el$70, "aria-label", _p$.a = _v$10);
|
|
821
|
+
_v$11 !== _p$.o && web.setAttribute(_el$71, "aria-labelledby", _p$.o = _v$11);
|
|
798
822
|
return _p$;
|
|
799
823
|
}, {
|
|
800
824
|
e: void 0,
|
|
801
825
|
t: void 0,
|
|
802
|
-
a: void 0
|
|
826
|
+
a: void 0,
|
|
827
|
+
o: void 0
|
|
803
828
|
});
|
|
804
829
|
return _el$29;
|
|
805
830
|
}
|
|
@@ -814,51 +839,51 @@ function MetricRenderer(props) {
|
|
|
814
839
|
return `${title}: ${value}${unit ? " " + unit : ""}`;
|
|
815
840
|
};
|
|
816
841
|
return (() => {
|
|
817
|
-
var _el$
|
|
818
|
-
web.insert(_el$
|
|
842
|
+
var _el$128 = web.getNextElement(_tmpl$32), _el$150 = _el$128.firstChild, [_el$151, _co$35] = web.getNextMarker(_el$150.nextSibling), _el$129 = _el$151.nextSibling, _el$130 = _el$129.firstChild, _el$131 = _el$130.firstChild, _el$132 = _el$131.nextSibling, _el$133 = _el$132.firstChild, _el$135 = _el$133.nextSibling, [_el$136, _co$30] = web.getNextMarker(_el$135.nextSibling), _el$146 = _el$130.nextSibling, [_el$147, _co$33] = web.getNextMarker(_el$146.nextSibling), _el$148 = _el$147.nextSibling, [_el$149, _co$34] = web.getNextMarker(_el$148.nextSibling);
|
|
843
|
+
web.insert(_el$128, web.createComponent(CopyButton, {
|
|
819
844
|
getText: getMetricText,
|
|
820
845
|
title: "Copy metric",
|
|
821
846
|
position: "top-right"
|
|
822
|
-
}), _el$
|
|
823
|
-
web.insert(_el$
|
|
824
|
-
web.insert(_el$
|
|
825
|
-
web.insert(_el$
|
|
847
|
+
}), _el$151, _co$35);
|
|
848
|
+
web.insert(_el$131, () => metricParams.title);
|
|
849
|
+
web.insert(_el$133, () => metricParams.value);
|
|
850
|
+
web.insert(_el$132, web.createComponent(solidJs.Show, {
|
|
826
851
|
get when() {
|
|
827
852
|
return metricParams.unit;
|
|
828
853
|
},
|
|
829
854
|
get children() {
|
|
830
|
-
var _el$
|
|
831
|
-
web.insert(_el$
|
|
832
|
-
return _el$
|
|
855
|
+
var _el$134 = web.getNextElement(_tmpl$29);
|
|
856
|
+
web.insert(_el$134, () => metricParams.unit);
|
|
857
|
+
return _el$134;
|
|
833
858
|
}
|
|
834
|
-
}), _el$
|
|
835
|
-
web.insert(_el$
|
|
859
|
+
}), _el$136, _co$30);
|
|
860
|
+
web.insert(_el$129, web.createComponent(solidJs.Show, {
|
|
836
861
|
get when() {
|
|
837
862
|
return metricParams.trend;
|
|
838
863
|
},
|
|
839
864
|
get children() {
|
|
840
|
-
var _el$
|
|
841
|
-
_el$
|
|
842
|
-
web.insert(_el$
|
|
865
|
+
var _el$137 = web.getNextElement(_tmpl$30), _el$138 = _el$137.firstChild, _el$141 = _el$138.firstChild, [_el$142, _co$31] = web.getNextMarker(_el$141.nextSibling), _el$139 = _el$142.nextSibling, _el$143 = _el$139.nextSibling, [_el$144, _co$32] = web.getNextMarker(_el$143.nextSibling);
|
|
866
|
+
_el$144.nextSibling;
|
|
867
|
+
web.insert(_el$138, (() => {
|
|
843
868
|
var _c$ = web.memo(() => metricParams.trend.direction === "up");
|
|
844
869
|
return () => _c$() ? "�" : metricParams.trend.direction === "down" ? "�" : "�";
|
|
845
|
-
})(), _el$
|
|
846
|
-
web.insert(_el$
|
|
847
|
-
web.effect(() => web.className(_el$
|
|
848
|
-
return _el$
|
|
870
|
+
})(), _el$142, _co$31);
|
|
871
|
+
web.insert(_el$138, () => Math.abs(metricParams.trend.value), _el$144, _co$32);
|
|
872
|
+
web.effect(() => web.className(_el$138, `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"}`));
|
|
873
|
+
return _el$137;
|
|
849
874
|
}
|
|
850
|
-
}), _el$
|
|
851
|
-
web.insert(_el$
|
|
875
|
+
}), _el$147, _co$33);
|
|
876
|
+
web.insert(_el$129, web.createComponent(solidJs.Show, {
|
|
852
877
|
get when() {
|
|
853
878
|
return metricParams.subtitle;
|
|
854
879
|
},
|
|
855
880
|
get children() {
|
|
856
|
-
var _el$
|
|
857
|
-
web.insert(_el$
|
|
858
|
-
return _el$
|
|
881
|
+
var _el$145 = web.getNextElement(_tmpl$31);
|
|
882
|
+
web.insert(_el$145, () => metricParams.subtitle);
|
|
883
|
+
return _el$145;
|
|
859
884
|
}
|
|
860
|
-
}), _el$
|
|
861
|
-
return _el$
|
|
885
|
+
}), _el$149, _co$34);
|
|
886
|
+
return _el$128;
|
|
862
887
|
})();
|
|
863
888
|
}
|
|
864
889
|
function extractImageFromMarkdown(content) {
|
|
@@ -899,62 +924,62 @@ function TextRenderer(props) {
|
|
|
899
924
|
},
|
|
900
925
|
get fallback() {
|
|
901
926
|
return (() => {
|
|
902
|
-
var _el$
|
|
903
|
-
web.insert(_el$
|
|
927
|
+
var _el$152 = web.getNextElement(_tmpl$33), _el$154 = _el$152.firstChild, [_el$155, _co$36] = web.getNextMarker(_el$154.nextSibling), _el$153 = _el$155.nextSibling;
|
|
928
|
+
web.insert(_el$152, web.createComponent(CopyButton, {
|
|
904
929
|
getText: getTextContent,
|
|
905
930
|
title: "Copy text",
|
|
906
931
|
position: "top-right"
|
|
907
|
-
}), _el$
|
|
932
|
+
}), _el$155, _co$36);
|
|
908
933
|
web.effect((_p$) => {
|
|
909
|
-
var _v$
|
|
910
|
-
_v$
|
|
911
|
-
_v$
|
|
934
|
+
var _v$15 = `prose prose-sm dark:prose-invert max-w-none ${textParams.className || ""}`, _v$16 = htmlContent();
|
|
935
|
+
_v$15 !== _p$.e && web.className(_el$153, _p$.e = _v$15);
|
|
936
|
+
_v$16 !== _p$.t && web.setProperty(_el$153, "innerHTML", _p$.t = _v$16);
|
|
912
937
|
return _p$;
|
|
913
938
|
}, {
|
|
914
939
|
e: void 0,
|
|
915
940
|
t: void 0
|
|
916
941
|
});
|
|
917
|
-
return _el$
|
|
942
|
+
return _el$152;
|
|
918
943
|
})();
|
|
919
944
|
},
|
|
920
945
|
children: (data) => (() => {
|
|
921
|
-
var _el$
|
|
922
|
-
web.insert(_el$
|
|
946
|
+
var _el$156 = web.getNextElement(_tmpl$34), _el$157 = _el$156.firstChild, _el$158 = _el$157.firstChild, _el$159 = _el$158.firstChild, _el$160 = _el$157.nextSibling, _el$161 = _el$160.firstChild;
|
|
947
|
+
web.insert(_el$161, () => data().credit);
|
|
923
948
|
web.effect((_p$) => {
|
|
924
|
-
var _v$
|
|
925
|
-
_v$
|
|
926
|
-
_v$
|
|
927
|
-
_v$
|
|
949
|
+
var _v$17 = data().linkUrl, _v$18 = data().imageUrl, _v$19 = data().alt;
|
|
950
|
+
_v$17 !== _p$.e && web.setAttribute(_el$158, "href", _p$.e = _v$17);
|
|
951
|
+
_v$18 !== _p$.t && web.setAttribute(_el$159, "src", _p$.t = _v$18);
|
|
952
|
+
_v$19 !== _p$.a && web.setAttribute(_el$159, "alt", _p$.a = _v$19);
|
|
928
953
|
return _p$;
|
|
929
954
|
}, {
|
|
930
955
|
e: void 0,
|
|
931
956
|
t: void 0,
|
|
932
957
|
a: void 0
|
|
933
958
|
});
|
|
934
|
-
return _el$
|
|
959
|
+
return _el$156;
|
|
935
960
|
})()
|
|
936
961
|
});
|
|
937
962
|
}
|
|
938
963
|
function IframeRenderer(props) {
|
|
939
964
|
const params = props.component.params;
|
|
940
965
|
return (() => {
|
|
941
|
-
var _el$
|
|
942
|
-
web.insert(_el$
|
|
966
|
+
var _el$162 = web.getNextElement(_tmpl$36), _el$166 = _el$162.firstChild, [_el$167, _co$37] = web.getNextMarker(_el$166.nextSibling), _el$165 = _el$167.nextSibling;
|
|
967
|
+
web.insert(_el$162, web.createComponent(solidJs.Show, {
|
|
943
968
|
get when() {
|
|
944
969
|
return params.title;
|
|
945
970
|
},
|
|
946
971
|
get children() {
|
|
947
|
-
var _el$
|
|
948
|
-
web.insert(_el$
|
|
949
|
-
return _el$
|
|
972
|
+
var _el$163 = web.getNextElement(_tmpl$35), _el$164 = _el$163.firstChild;
|
|
973
|
+
web.insert(_el$164, () => params.title);
|
|
974
|
+
return _el$163;
|
|
950
975
|
}
|
|
951
|
-
}), _el$
|
|
976
|
+
}), _el$167, _co$37);
|
|
952
977
|
web.effect((_p$) => {
|
|
953
|
-
var _v$
|
|
954
|
-
_v$
|
|
955
|
-
_v$
|
|
956
|
-
_p$.a = web.style(_el$
|
|
957
|
-
_v$
|
|
978
|
+
var _v$20 = params.url, _v$21 = params.title || "Embedded content", _v$22 = `height: ${params.height || "400px"}; min-height: 300px;`, _v$23 = validation.getIframeSandbox(params.url);
|
|
979
|
+
_v$20 !== _p$.e && web.setAttribute(_el$165, "src", _p$.e = _v$20);
|
|
980
|
+
_v$21 !== _p$.t && web.setAttribute(_el$165, "title", _p$.t = _v$21);
|
|
981
|
+
_p$.a = web.style(_el$165, _v$22, _p$.a);
|
|
982
|
+
_v$23 !== _p$.o && web.setAttribute(_el$165, "sandbox", _p$.o = _v$23);
|
|
958
983
|
return _p$;
|
|
959
984
|
}, {
|
|
960
985
|
e: void 0,
|
|
@@ -962,30 +987,30 @@ function IframeRenderer(props) {
|
|
|
962
987
|
a: void 0,
|
|
963
988
|
o: void 0
|
|
964
989
|
});
|
|
965
|
-
return _el$
|
|
990
|
+
return _el$162;
|
|
966
991
|
})();
|
|
967
992
|
}
|
|
968
993
|
function ImageRenderer(props) {
|
|
969
994
|
const params = props.component.params;
|
|
970
995
|
return (() => {
|
|
971
|
-
var _el$
|
|
972
|
-
web.insert(_el$
|
|
996
|
+
var _el$168 = web.getNextElement(_tmpl$38), _el$169 = _el$168.firstChild, _el$170 = _el$169.firstChild, _el$171 = _el$170.firstChild, _el$174 = _el$169.nextSibling, [_el$175, _co$38] = web.getNextMarker(_el$174.nextSibling);
|
|
997
|
+
web.insert(_el$168, web.createComponent(solidJs.Show, {
|
|
973
998
|
get when() {
|
|
974
999
|
return params.caption;
|
|
975
1000
|
},
|
|
976
1001
|
get children() {
|
|
977
|
-
var _el$
|
|
978
|
-
web.insert(_el$
|
|
979
|
-
return _el$
|
|
1002
|
+
var _el$172 = web.getNextElement(_tmpl$37), _el$173 = _el$172.firstChild;
|
|
1003
|
+
web.insert(_el$173, () => params.caption);
|
|
1004
|
+
return _el$172;
|
|
980
1005
|
}
|
|
981
|
-
}), _el$
|
|
1006
|
+
}), _el$175, _co$38);
|
|
982
1007
|
web.effect((_p$) => {
|
|
983
|
-
var _v$
|
|
984
|
-
_v$
|
|
985
|
-
_v$
|
|
986
|
-
_v$
|
|
987
|
-
_v$
|
|
988
|
-
_v$
|
|
1008
|
+
var _v$24 = `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$25 = params.url, _v$26 = `View full size: ${params.alt || "image"}`, _v$27 = params.url, _v$28 = params.alt || "Image";
|
|
1009
|
+
_v$24 !== _p$.e && web.className(_el$168, _p$.e = _v$24);
|
|
1010
|
+
_v$25 !== _p$.t && web.setAttribute(_el$170, "href", _p$.t = _v$25);
|
|
1011
|
+
_v$26 !== _p$.a && web.setAttribute(_el$170, "aria-label", _p$.a = _v$26);
|
|
1012
|
+
_v$27 !== _p$.o && web.setAttribute(_el$171, "src", _p$.o = _v$27);
|
|
1013
|
+
_v$28 !== _p$.i && web.setAttribute(_el$171, "alt", _p$.i = _v$28);
|
|
989
1014
|
return _p$;
|
|
990
1015
|
}, {
|
|
991
1016
|
e: void 0,
|
|
@@ -994,30 +1019,30 @@ function ImageRenderer(props) {
|
|
|
994
1019
|
o: void 0,
|
|
995
1020
|
i: void 0
|
|
996
1021
|
});
|
|
997
|
-
return _el$
|
|
1022
|
+
return _el$168;
|
|
998
1023
|
})();
|
|
999
1024
|
}
|
|
1000
1025
|
function LinkRenderer(props) {
|
|
1001
1026
|
const params = props.component.params;
|
|
1002
1027
|
return (() => {
|
|
1003
|
-
var _el$
|
|
1004
|
-
_el$
|
|
1005
|
-
web.insert(_el$
|
|
1006
|
-
web.insert(_el$
|
|
1028
|
+
var _el$176 = web.getNextElement(_tmpl$40), _el$177 = _el$176.firstChild, _el$178 = _el$177.nextSibling, _el$179 = _el$178.firstChild, _el$181 = _el$179.nextSibling, [_el$182, _co$39] = web.getNextMarker(_el$181.nextSibling);
|
|
1029
|
+
_el$176.$$click = (e) => e.stopPropagation();
|
|
1030
|
+
web.insert(_el$179, () => params.label || params.url);
|
|
1031
|
+
web.insert(_el$178, web.createComponent(solidJs.Show, {
|
|
1007
1032
|
get when() {
|
|
1008
1033
|
return params.description;
|
|
1009
1034
|
},
|
|
1010
1035
|
get children() {
|
|
1011
|
-
var _el$
|
|
1012
|
-
web.insert(_el$
|
|
1013
|
-
return _el$
|
|
1036
|
+
var _el$180 = web.getNextElement(_tmpl$39);
|
|
1037
|
+
web.insert(_el$180, () => params.description);
|
|
1038
|
+
return _el$180;
|
|
1014
1039
|
}
|
|
1015
|
-
}), _el$
|
|
1040
|
+
}), _el$182, _co$39);
|
|
1016
1041
|
web.effect((_p$) => {
|
|
1017
|
-
var _v$
|
|
1018
|
-
_v$
|
|
1019
|
-
_v$
|
|
1020
|
-
_v$
|
|
1042
|
+
var _v$29 = params.url, _v$30 = `${params.label || "Link"}: ${params.description || params.url} (opens in new tab)`, _v$31 = `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 || ""}`;
|
|
1043
|
+
_v$29 !== _p$.e && web.setAttribute(_el$176, "href", _p$.e = _v$29);
|
|
1044
|
+
_v$30 !== _p$.t && web.setAttribute(_el$176, "aria-label", _p$.t = _v$30);
|
|
1045
|
+
_v$31 !== _p$.a && web.className(_el$176, _p$.a = _v$31);
|
|
1021
1046
|
return _p$;
|
|
1022
1047
|
}, {
|
|
1023
1048
|
e: void 0,
|
|
@@ -1025,7 +1050,7 @@ function LinkRenderer(props) {
|
|
|
1025
1050
|
a: void 0
|
|
1026
1051
|
});
|
|
1027
1052
|
web.runHydrationEvents();
|
|
1028
|
-
return _el$
|
|
1053
|
+
return _el$176;
|
|
1029
1054
|
})();
|
|
1030
1055
|
}
|
|
1031
1056
|
function ComponentRenderer(props) {
|
|
@@ -1039,12 +1064,12 @@ function ComponentRenderer(props) {
|
|
|
1039
1064
|
details: validation$1.errors
|
|
1040
1065
|
});
|
|
1041
1066
|
return (() => {
|
|
1042
|
-
var _el$
|
|
1043
|
-
web.insert(_el$
|
|
1067
|
+
var _el$183 = web.getNextElement(_tmpl$41), _el$184 = _el$183.firstChild, _el$185 = _el$184.nextSibling;
|
|
1068
|
+
web.insert(_el$185, () => {
|
|
1044
1069
|
var _a2, _b;
|
|
1045
1070
|
return ((_b = (_a2 = validation$1.errors) == null ? void 0 : _a2[0]) == null ? void 0 : _b.message) || "Unknown validation error";
|
|
1046
1071
|
});
|
|
1047
|
-
return _el$
|
|
1072
|
+
return _el$183;
|
|
1048
1073
|
})();
|
|
1049
1074
|
}
|
|
1050
1075
|
return web.createComponent(GenerativeUIErrorBoundary.GenerativeUIErrorBoundary, {
|
|
@@ -1290,27 +1315,27 @@ function ActionRenderer(props) {
|
|
|
1290
1315
|
const isDisabled = () => params.disabled || params.action === "tool-call" && isExecuting();
|
|
1291
1316
|
if (params.type === "link" || params.action === "link") {
|
|
1292
1317
|
return (() => {
|
|
1293
|
-
var _el$
|
|
1294
|
-
_el$
|
|
1295
|
-
web.insert(_el$
|
|
1318
|
+
var _el$186 = web.getNextElement(_tmpl$43), _el$188 = _el$186.firstChild, [_el$189, _co$40] = web.getNextMarker(_el$188.nextSibling), _el$190 = _el$189.nextSibling, [_el$191, _co$41] = web.getNextMarker(_el$190.nextSibling);
|
|
1319
|
+
_el$186.$$click = handleClick;
|
|
1320
|
+
web.insert(_el$186, web.createComponent(solidJs.Show, {
|
|
1296
1321
|
get when() {
|
|
1297
1322
|
return params.icon;
|
|
1298
1323
|
},
|
|
1299
1324
|
get children() {
|
|
1300
|
-
var _el$
|
|
1301
|
-
web.insert(_el$
|
|
1302
|
-
return _el$
|
|
1325
|
+
var _el$187 = web.getNextElement(_tmpl$42);
|
|
1326
|
+
web.insert(_el$187, () => params.icon);
|
|
1327
|
+
return _el$187;
|
|
1303
1328
|
}
|
|
1304
|
-
}), _el$
|
|
1305
|
-
web.insert(_el$
|
|
1329
|
+
}), _el$189, _co$40);
|
|
1330
|
+
web.insert(_el$186, () => params.label, _el$191, _co$41);
|
|
1306
1331
|
web.effect((_p$) => {
|
|
1307
|
-
var _v$
|
|
1332
|
+
var _v$32 = params.url || "#", _v$33 = params.url ? "_blank" : void 0, _v$34 = params.ariaLabel || params.label, _v$35 = `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
|
|
1308
1333
|
${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"}
|
|
1309
1334
|
${params.className || ""}`;
|
|
1310
|
-
_v$
|
|
1311
|
-
_v$
|
|
1312
|
-
_v$
|
|
1313
|
-
_v$
|
|
1335
|
+
_v$32 !== _p$.e && web.setAttribute(_el$186, "href", _p$.e = _v$32);
|
|
1336
|
+
_v$33 !== _p$.t && web.setAttribute(_el$186, "target", _p$.t = _v$33);
|
|
1337
|
+
_v$34 !== _p$.a && web.setAttribute(_el$186, "aria-label", _p$.a = _v$34);
|
|
1338
|
+
_v$35 !== _p$.o && web.className(_el$186, _p$.o = _v$35);
|
|
1314
1339
|
return _p$;
|
|
1315
1340
|
}, {
|
|
1316
1341
|
e: void 0,
|
|
@@ -1319,42 +1344,42 @@ function ActionRenderer(props) {
|
|
|
1319
1344
|
o: void 0
|
|
1320
1345
|
});
|
|
1321
1346
|
web.runHydrationEvents();
|
|
1322
|
-
return _el$
|
|
1347
|
+
return _el$186;
|
|
1323
1348
|
})();
|
|
1324
1349
|
}
|
|
1325
1350
|
return (() => {
|
|
1326
|
-
var _el$
|
|
1327
|
-
_el$
|
|
1328
|
-
web.insert(_el$
|
|
1351
|
+
var _el$192 = web.getNextElement(_tmpl$45), _el$195 = _el$192.firstChild, [_el$196, _co$42] = web.getNextMarker(_el$195.nextSibling), _el$197 = _el$196.nextSibling, [_el$198, _co$43] = web.getNextMarker(_el$197.nextSibling), _el$199 = _el$198.nextSibling, [_el$200, _co$44] = web.getNextMarker(_el$199.nextSibling);
|
|
1352
|
+
_el$192.$$click = handleClick;
|
|
1353
|
+
web.insert(_el$192, web.createComponent(solidJs.Show, {
|
|
1329
1354
|
get when() {
|
|
1330
1355
|
return web.memo(() => !!isExecuting())() && params.action === "tool-call";
|
|
1331
1356
|
},
|
|
1332
1357
|
get children() {
|
|
1333
|
-
return web.getNextElement(_tmpl$
|
|
1358
|
+
return web.getNextElement(_tmpl$44);
|
|
1334
1359
|
}
|
|
1335
|
-
}), _el$
|
|
1336
|
-
web.insert(_el$
|
|
1360
|
+
}), _el$196, _co$42);
|
|
1361
|
+
web.insert(_el$192, web.createComponent(solidJs.Show, {
|
|
1337
1362
|
get when() {
|
|
1338
1363
|
return web.memo(() => !!params.icon)() && !(isExecuting() && params.action === "tool-call");
|
|
1339
1364
|
},
|
|
1340
1365
|
get children() {
|
|
1341
|
-
var _el$
|
|
1342
|
-
web.insert(_el$
|
|
1343
|
-
return _el$
|
|
1366
|
+
var _el$194 = web.getNextElement(_tmpl$42);
|
|
1367
|
+
web.insert(_el$194, () => params.icon);
|
|
1368
|
+
return _el$194;
|
|
1344
1369
|
}
|
|
1345
|
-
}), _el$
|
|
1346
|
-
web.insert(_el$
|
|
1370
|
+
}), _el$198, _co$43);
|
|
1371
|
+
web.insert(_el$192, () => params.label, _el$200, _co$44);
|
|
1347
1372
|
web.effect((_p$) => {
|
|
1348
|
-
var _v$
|
|
1373
|
+
var _v$36 = params.action === "submit" ? "submit" : "button", _v$37 = isDisabled(), _v$38 = isExecuting() && params.action === "tool-call", _v$39 = params.ariaLabel || params.label, _v$40 = `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
|
|
1349
1374
|
${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"}
|
|
1350
1375
|
${isDisabled() ? "opacity-50 cursor-not-allowed" : ""}
|
|
1351
1376
|
${params.size === "sm" ? "px-3 py-1.5 text-xs" : params.size === "lg" ? "px-6 py-3 text-base" : ""}
|
|
1352
1377
|
${params.className || ""}`;
|
|
1353
|
-
_v$
|
|
1354
|
-
_v$
|
|
1355
|
-
_v$
|
|
1356
|
-
_v$
|
|
1357
|
-
_v$
|
|
1378
|
+
_v$36 !== _p$.e && web.setAttribute(_el$192, "type", _p$.e = _v$36);
|
|
1379
|
+
_v$37 !== _p$.t && web.setProperty(_el$192, "disabled", _p$.t = _v$37);
|
|
1380
|
+
_v$38 !== _p$.a && web.setAttribute(_el$192, "aria-busy", _p$.a = _v$38);
|
|
1381
|
+
_v$39 !== _p$.o && web.setAttribute(_el$192, "aria-label", _p$.o = _v$39);
|
|
1382
|
+
_v$40 !== _p$.i && web.className(_el$192, _p$.i = _v$40);
|
|
1358
1383
|
return _p$;
|
|
1359
1384
|
}, {
|
|
1360
1385
|
e: void 0,
|
|
@@ -1364,7 +1389,7 @@ function ActionRenderer(props) {
|
|
|
1364
1389
|
i: void 0
|
|
1365
1390
|
});
|
|
1366
1391
|
web.runHydrationEvents();
|
|
1367
|
-
return _el$
|
|
1392
|
+
return _el$192;
|
|
1368
1393
|
})();
|
|
1369
1394
|
}
|
|
1370
1395
|
function ErrorCardRenderer(props) {
|
|
@@ -1372,55 +1397,55 @@ function ErrorCardRenderer(props) {
|
|
|
1372
1397
|
return `Error in ${props.error.tool || "unknown tool"}: ${props.error.message || "Unknown error"}`;
|
|
1373
1398
|
};
|
|
1374
1399
|
return (() => {
|
|
1375
|
-
var _el$
|
|
1376
|
-
web.insert(_el$
|
|
1400
|
+
var _el$201 = web.getNextElement(_tmpl$49), _el$224 = _el$201.firstChild, [_el$225, _co$50] = web.getNextMarker(_el$224.nextSibling), _el$202 = _el$225.nextSibling, _el$203 = _el$202.firstChild, _el$204 = _el$203.nextSibling, _el$205 = _el$204.firstChild, _el$206 = _el$205.firstChild, _el$207 = _el$206.nextSibling, [_el$208, _co$45] = web.getNextMarker(_el$207.nextSibling), _el$209 = _el$205.nextSibling, _el$218 = _el$209.nextSibling, [_el$219, _co$47] = web.getNextMarker(_el$218.nextSibling), _el$220 = _el$219.nextSibling, [_el$221, _co$48] = web.getNextMarker(_el$220.nextSibling), _el$222 = _el$221.nextSibling, [_el$223, _co$49] = web.getNextMarker(_el$222.nextSibling);
|
|
1401
|
+
web.insert(_el$201, web.createComponent(CopyButton, {
|
|
1377
1402
|
getText: getErrorText,
|
|
1378
1403
|
title: "Copy error details",
|
|
1379
1404
|
position: "top-right"
|
|
1380
|
-
}), _el$
|
|
1381
|
-
web.insert(_el$
|
|
1382
|
-
web.insert(_el$
|
|
1383
|
-
web.insert(_el$
|
|
1405
|
+
}), _el$225, _co$50);
|
|
1406
|
+
web.insert(_el$205, () => props.error.tool || "Unknown", _el$208, _co$45);
|
|
1407
|
+
web.insert(_el$209, () => props.error.message || "An error occurred during tool execution");
|
|
1408
|
+
web.insert(_el$204, web.createComponent(solidJs.Show, {
|
|
1384
1409
|
get when() {
|
|
1385
1410
|
return props.error.type;
|
|
1386
1411
|
},
|
|
1387
1412
|
get children() {
|
|
1388
|
-
var _el$
|
|
1389
|
-
web.insert(_el$
|
|
1390
|
-
return _el$
|
|
1413
|
+
var _el$210 = web.getNextElement(_tmpl$46), _el$211 = _el$210.firstChild, _el$212 = _el$211.nextSibling, [_el$213, _co$46] = web.getNextMarker(_el$212.nextSibling);
|
|
1414
|
+
web.insert(_el$210, () => props.error.type, _el$213, _co$46);
|
|
1415
|
+
return _el$210;
|
|
1391
1416
|
}
|
|
1392
|
-
}), _el$
|
|
1393
|
-
web.insert(_el$
|
|
1417
|
+
}), _el$219, _co$47);
|
|
1418
|
+
web.insert(_el$204, web.createComponent(solidJs.Show, {
|
|
1394
1419
|
get when() {
|
|
1395
1420
|
var _a;
|
|
1396
1421
|
return (_a = props.error.suggestions) == null ? void 0 : _a.length;
|
|
1397
1422
|
},
|
|
1398
1423
|
get children() {
|
|
1399
|
-
var _el$
|
|
1400
|
-
web.insert(_el$
|
|
1424
|
+
var _el$214 = web.getNextElement(_tmpl$47), _el$215 = _el$214.firstChild, _el$216 = _el$215.nextSibling;
|
|
1425
|
+
web.insert(_el$216, web.createComponent(solidJs.For, {
|
|
1401
1426
|
get each() {
|
|
1402
1427
|
return props.error.suggestions;
|
|
1403
1428
|
},
|
|
1404
1429
|
children: (suggestion) => (() => {
|
|
1405
|
-
var _el$
|
|
1406
|
-
web.insert(_el$
|
|
1407
|
-
return _el$
|
|
1430
|
+
var _el$226 = web.getNextElement(_tmpl$50);
|
|
1431
|
+
web.insert(_el$226, suggestion);
|
|
1432
|
+
return _el$226;
|
|
1408
1433
|
})()
|
|
1409
1434
|
}));
|
|
1410
|
-
return _el$
|
|
1435
|
+
return _el$214;
|
|
1411
1436
|
}
|
|
1412
|
-
}), _el$
|
|
1413
|
-
web.insert(_el$
|
|
1437
|
+
}), _el$221, _co$48);
|
|
1438
|
+
web.insert(_el$204, web.createComponent(solidJs.Show, {
|
|
1414
1439
|
get when() {
|
|
1415
1440
|
return props.error.timestamp;
|
|
1416
1441
|
},
|
|
1417
1442
|
get children() {
|
|
1418
|
-
var _el$
|
|
1419
|
-
web.insert(_el$
|
|
1420
|
-
return _el$
|
|
1443
|
+
var _el$217 = web.getNextElement(_tmpl$48);
|
|
1444
|
+
web.insert(_el$217, () => new Date(props.error.timestamp).toLocaleString());
|
|
1445
|
+
return _el$217;
|
|
1421
1446
|
}
|
|
1422
|
-
}), _el$
|
|
1423
|
-
return _el$
|
|
1447
|
+
}), _el$223, _co$49);
|
|
1448
|
+
return _el$201;
|
|
1424
1449
|
})();
|
|
1425
1450
|
}
|
|
1426
1451
|
function isErrorResponse(content) {
|
|
@@ -1443,20 +1468,20 @@ function UIResourceHtmlRenderer(props) {
|
|
|
1443
1468
|
return ((_a = props.resource.metadata) == null ? void 0 : _a.title) || ((_b = props.resource.uri) == null ? void 0 : _b.replace("ui://deposium/", "")) || "Resource";
|
|
1444
1469
|
};
|
|
1445
1470
|
return (() => {
|
|
1446
|
-
var _el$
|
|
1447
|
-
web.insert(_el$
|
|
1471
|
+
var _el$227 = web.getNextElement(_tmpl$52), _el$231 = _el$227.firstChild, [_el$232, _co$51] = web.getNextMarker(_el$231.nextSibling), _el$230 = _el$232.nextSibling;
|
|
1472
|
+
web.insert(_el$227, web.createComponent(solidJs.Show, {
|
|
1448
1473
|
get when() {
|
|
1449
1474
|
var _a;
|
|
1450
1475
|
return ((_a = props.resource.metadata) == null ? void 0 : _a.title) || props.resource.uri;
|
|
1451
1476
|
},
|
|
1452
1477
|
get children() {
|
|
1453
|
-
var _el$
|
|
1454
|
-
web.insert(_el$
|
|
1455
|
-
return _el$
|
|
1478
|
+
var _el$228 = web.getNextElement(_tmpl$51), _el$229 = _el$228.firstChild;
|
|
1479
|
+
web.insert(_el$229, resourceTitle);
|
|
1480
|
+
return _el$228;
|
|
1456
1481
|
}
|
|
1457
|
-
}), _el$
|
|
1458
|
-
web.effect(() => web.setProperty(_el$
|
|
1459
|
-
return _el$
|
|
1482
|
+
}), _el$232, _co$51);
|
|
1483
|
+
web.effect(() => web.setProperty(_el$230, "innerHTML", htmlContent()));
|
|
1484
|
+
return _el$227;
|
|
1460
1485
|
})();
|
|
1461
1486
|
}
|
|
1462
1487
|
const UIResourceRenderer = (props) => {
|
|
@@ -1536,24 +1561,24 @@ const UIResourceRenderer = (props) => {
|
|
|
1536
1561
|
return web.createComponent(RenderContext.RenderProvider, {
|
|
1537
1562
|
renderComponent,
|
|
1538
1563
|
get children() {
|
|
1539
|
-
var _el$
|
|
1540
|
-
web.insert(_el$
|
|
1564
|
+
var _el$233 = web.getNextElement(_tmpl$53), _el$234 = _el$233.firstChild, _el$235 = _el$234.nextSibling, [_el$236, _co$52] = web.getNextMarker(_el$235.nextSibling);
|
|
1565
|
+
web.insert(_el$234, web.createComponent(solidJs.For, {
|
|
1541
1566
|
get each() {
|
|
1542
1567
|
return layoutData.components;
|
|
1543
1568
|
},
|
|
1544
1569
|
children: (component) => (() => {
|
|
1545
|
-
var _el$
|
|
1546
|
-
web.insert(_el$
|
|
1570
|
+
var _el$237 = web.getNextElement(_tmpl$54);
|
|
1571
|
+
web.insert(_el$237, web.createComponent(ComponentRenderer, {
|
|
1547
1572
|
component,
|
|
1548
1573
|
get onError() {
|
|
1549
1574
|
return props.onError;
|
|
1550
1575
|
}
|
|
1551
1576
|
}));
|
|
1552
|
-
web.effect((_$p) => web.style(_el$
|
|
1553
|
-
return _el$
|
|
1577
|
+
web.effect((_$p) => web.style(_el$237, getGridStyleString(component), _$p));
|
|
1578
|
+
return _el$237;
|
|
1554
1579
|
})()
|
|
1555
1580
|
}));
|
|
1556
|
-
web.insert(_el$
|
|
1581
|
+
web.insert(_el$233, web.createComponent(solidJs.Show, {
|
|
1557
1582
|
get when() {
|
|
1558
1583
|
return shouldShowAutoFooter();
|
|
1559
1584
|
},
|
|
@@ -1564,21 +1589,22 @@ const UIResourceRenderer = (props) => {
|
|
|
1564
1589
|
}
|
|
1565
1590
|
});
|
|
1566
1591
|
}
|
|
1567
|
-
}), _el$
|
|
1592
|
+
}), _el$236, _co$52);
|
|
1568
1593
|
web.effect((_p$) => {
|
|
1569
|
-
var _v$
|
|
1570
|
-
_v$
|
|
1571
|
-
_p$.t = web.style(_el$
|
|
1594
|
+
var _v$41 = `w-full ${props.class || ""}`, _v$42 = gridContainerStyle();
|
|
1595
|
+
_v$41 !== _p$.e && web.className(_el$233, _p$.e = _v$41);
|
|
1596
|
+
_p$.t = web.style(_el$234, _v$42, _p$.t);
|
|
1572
1597
|
return _p$;
|
|
1573
1598
|
}, {
|
|
1574
1599
|
e: void 0,
|
|
1575
1600
|
t: void 0
|
|
1576
1601
|
});
|
|
1577
|
-
return _el$
|
|
1602
|
+
return _el$233;
|
|
1578
1603
|
}
|
|
1579
1604
|
});
|
|
1580
1605
|
};
|
|
1581
1606
|
web.delegateEvents(["click", "input"]);
|
|
1582
1607
|
exports.UIResourceRenderer = UIResourceRenderer;
|
|
1608
|
+
exports.highlightQuery = highlightQuery;
|
|
1583
1609
|
exports.renderCellValue = renderCellValue;
|
|
1584
1610
|
//# sourceMappingURL=UIResourceRenderer.cjs.map
|