@seed-ship/mcp-ui-solid 1.2.0 → 1.2.1

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.
@@ -9,7 +9,48 @@ const GridRenderer = require("./GridRenderer.cjs");
9
9
  const FooterRenderer = require("./FooterRenderer.cjs");
10
10
  const useAction = require("../hooks/useAction.cjs");
11
11
  const marked_esm = require("../node_modules/.pnpm/marked@16.4.2/node_modules/marked/lib/marked.esm.cjs");
12
- var _tmpl$ = /* @__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$2 = /* @__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$3 = /* @__PURE__ */ web.template(`<h3 class="text-sm font-semibold text-gray-900 dark:text-white mb-3">`), _tmpl$4 = /* @__PURE__ */ web.template(`<div class="w-full h-full p-4"><!$><!/><div class="w-full h-full"><img alt="Chart visualization"class="w-full h-auto max-h-[300px] object-contain">`), _tmpl$5 = /* @__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$6 = /* @__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$7 = /* @__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"><div class=p-4><!$><!/><div class=overflow-x-auto><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"><tr></tr></thead><tbody class="bg-white dark:bg-gray-800 divide-y divide-gray-200 dark:divide-gray-700"></tbody></table></div><!$><!/>`), _tmpl$8 = /* @__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">`), _tmpl$9 = /* @__PURE__ */ web.template(`<tr>`), _tmpl$0 = /* @__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$1 = /* @__PURE__ */ web.template(`<span class="ml-2 text-sm font-medium text-gray-500 dark:text-gray-400">`), _tmpl$10 = /* @__PURE__ */ web.template(`<div class="mt-3 flex items-center"><span><!$><!/> <!$><!/>%`), _tmpl$11 = /* @__PURE__ */ web.template(`<p class="mt-2 text-xs text-gray-500 dark:text-gray-400">`), _tmpl$12 = /* @__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 p-4"><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$13 = /* @__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 p-4"><div>`), _tmpl$14 = /* @__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$15 = /* @__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$16 = /* @__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"sandbox="allow-scripts allow-same-origin allow-popups allow-forms"loading=lazy>`, true, false, false), _tmpl$17 = /* @__PURE__ */ web.template(`<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">`), _tmpl$18 = /* @__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-[500px] object-contain rounded shadow-sm hover:opacity-95 transition-opacity"loading=lazy></a></div><!$><!/>`, true, false, false), _tmpl$19 = /* @__PURE__ */ web.template(`<p class="text-xs text-gray-500 dark:text-gray-400 truncate">`), _tmpl$20 = /* @__PURE__ */ web.template(`<a target=_blank rel="noopener noreferrer"class="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"><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"><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><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$21 = /* @__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$22 = /* @__PURE__ */ web.template(`<span>`), _tmpl$23 = /* @__PURE__ */ web.template(`<a rel="noopener noreferrer"><!$><!/><!$><!/>`), _tmpl$24 = /* @__PURE__ */ web.template(`<span class="animate-spin h-4 w-4 border-2 border-current border-t-transparent rounded-full">`), _tmpl$25 = /* @__PURE__ */ web.template(`<button><!$><!/><!$><!/><!$><!/>`), _tmpl$26 = /* @__PURE__ */ web.template(`<div><div class="grid gap-4"></div><!$><!/>`), _tmpl$27 = /* @__PURE__ */ web.template(`<div>`);
12
+ 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="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$5 = /* @__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$6 = /* @__PURE__ */ web.template(`<h3 class="text-sm font-semibold text-gray-900 dark:text-white mb-3">`), _tmpl$7 = /* @__PURE__ */ web.template(`<div class="w-full h-full p-4"><!$><!/><div class="w-full h-full"><img alt="Chart visualization"class="w-full h-auto max-h-[300px] object-contain">`), _tmpl$8 = /* @__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$9 = /* @__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$0 = /* @__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><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"><tr></tr></thead><tbody class="bg-white dark:bg-gray-800 divide-y divide-gray-200 dark:divide-gray-700"></tbody></table></div><!$><!/>`), _tmpl$1 = /* @__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">`), _tmpl$10 = /* @__PURE__ */ web.template(`<tr>`), _tmpl$11 = /* @__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$12 = /* @__PURE__ */ web.template(`<span class="ml-2 text-sm font-medium text-gray-500 dark:text-gray-400">`), _tmpl$13 = /* @__PURE__ */ web.template(`<div class="mt-3 flex items-center"><span><!$><!/> <!$><!/>%`), _tmpl$14 = /* @__PURE__ */ web.template(`<p class="mt-2 text-xs text-gray-500 dark:text-gray-400">`), _tmpl$15 = /* @__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$16 = /* @__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$17 = /* @__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$18 = /* @__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$19 = /* @__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"sandbox="allow-scripts allow-same-origin allow-popups allow-forms"loading=lazy>`, true, false, false), _tmpl$20 = /* @__PURE__ */ web.template(`<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">`), _tmpl$21 = /* @__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-[500px] object-contain rounded shadow-sm hover:opacity-95 transition-opacity"loading=lazy></a></div><!$><!/>`, true, false, false), _tmpl$22 = /* @__PURE__ */ web.template(`<p class="text-xs text-gray-500 dark:text-gray-400 truncate">`), _tmpl$23 = /* @__PURE__ */ web.template(`<a target=_blank rel="noopener noreferrer"class="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"><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"><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><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$24 = /* @__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$25 = /* @__PURE__ */ web.template(`<span>`), _tmpl$26 = /* @__PURE__ */ web.template(`<a rel="noopener noreferrer"><!$><!/><!$><!/>`), _tmpl$27 = /* @__PURE__ */ web.template(`<span class="animate-spin h-4 w-4 border-2 border-current border-t-transparent rounded-full">`), _tmpl$28 = /* @__PURE__ */ web.template(`<button><!$><!/><!$><!/><!$><!/>`), _tmpl$29 = /* @__PURE__ */ web.template(`<div><div class="grid gap-4"></div><!$><!/>`), _tmpl$30 = /* @__PURE__ */ web.template(`<div>`);
13
+ function CopyButton(props) {
14
+ const [copied, setCopied] = solidJs.createSignal(false);
15
+ const handleCopy = async () => {
16
+ try {
17
+ await navigator.clipboard.writeText(props.getText());
18
+ setCopied(true);
19
+ setTimeout(() => setCopied(false), 2e3);
20
+ } catch (err) {
21
+ console.error("Failed to copy:", err);
22
+ }
23
+ };
24
+ const positionClasses = () => {
25
+ return props.position === "bottom-right" ? "absolute -right-2 -bottom-3" : "absolute right-2 top-2";
26
+ };
27
+ return (() => {
28
+ var _el$ = web.getNextElement(_tmpl$2);
29
+ _el$.$$click = handleCopy;
30
+ web.insert(_el$, web.createComponent(solidJs.Show, {
31
+ get when() {
32
+ return !copied();
33
+ },
34
+ get fallback() {
35
+ return web.getNextElement(_tmpl$3);
36
+ },
37
+ get children() {
38
+ return web.getNextElement(_tmpl$);
39
+ }
40
+ }));
41
+ web.effect((_p$) => {
42
+ var _v$ = `${positionClasses()} 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 z-10`, _v$2 = props.title || "Copy";
43
+ _v$ !== _p$.e && web.className(_el$, _p$.e = _v$);
44
+ _v$2 !== _p$.t && web.setAttribute(_el$, "title", _p$.t = _v$2);
45
+ return _p$;
46
+ }, {
47
+ e: void 0,
48
+ t: void 0
49
+ });
50
+ web.runHydrationEvents();
51
+ return _el$;
52
+ })();
53
+ }
13
54
  function ChartRenderer(props) {
14
55
  const [iframeUrl, setIframeUrl] = solidJs.createSignal();
15
56
  const [isLoading, setIsLoading] = solidJs.createSignal(true);
@@ -32,42 +73,42 @@ function ChartRenderer(props) {
32
73
  setIsLoading(false);
33
74
  });
34
75
  return (() => {
35
- var _el$ = web.getNextElement(_tmpl$5), _el$11 = _el$.firstChild, [_el$12, _co$2] = web.getNextMarker(_el$11.nextSibling), _el$13 = _el$12.nextSibling, [_el$14, _co$3] = web.getNextMarker(_el$13.nextSibling), _el$15 = _el$14.nextSibling, [_el$16, _co$4] = web.getNextMarker(_el$15.nextSibling);
36
- web.insert(_el$, web.createComponent(solidJs.Show, {
76
+ var _el$4 = web.getNextElement(_tmpl$8), _el$14 = _el$4.firstChild, [_el$15, _co$2] = web.getNextMarker(_el$14.nextSibling), _el$16 = _el$15.nextSibling, [_el$17, _co$3] = web.getNextMarker(_el$16.nextSibling), _el$18 = _el$17.nextSibling, [_el$19, _co$4] = web.getNextMarker(_el$18.nextSibling);
77
+ web.insert(_el$4, web.createComponent(solidJs.Show, {
37
78
  get when() {
38
79
  return isLoading();
39
80
  },
40
81
  get children() {
41
- return web.getNextElement(_tmpl$);
82
+ return web.getNextElement(_tmpl$4);
42
83
  }
43
- }), _el$12, _co$2);
44
- web.insert(_el$, web.createComponent(solidJs.Show, {
84
+ }), _el$15, _co$2);
85
+ web.insert(_el$4, web.createComponent(solidJs.Show, {
45
86
  get when() {
46
87
  return error();
47
88
  },
48
89
  get children() {
49
- var _el$3 = web.getNextElement(_tmpl$2), _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling;
50
- web.insert(_el$6, error);
51
- return _el$3;
90
+ var _el$6 = web.getNextElement(_tmpl$5), _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild, _el$9 = _el$8.nextSibling;
91
+ web.insert(_el$9, error);
92
+ return _el$6;
52
93
  }
53
- }), _el$14, _co$3);
54
- web.insert(_el$, web.createComponent(solidJs.Show, {
94
+ }), _el$17, _co$3);
95
+ web.insert(_el$4, web.createComponent(solidJs.Show, {
55
96
  get when() {
56
97
  return web.memo(() => !!iframeUrl())() && !error();
57
98
  },
58
99
  get children() {
59
- var _el$7 = web.getNextElement(_tmpl$4), _el$1 = _el$7.firstChild, [_el$10, _co$] = web.getNextMarker(_el$1.nextSibling), _el$9 = _el$10.nextSibling, _el$0 = _el$9.firstChild;
60
- web.insert(_el$7, web.createComponent(solidJs.Show, {
100
+ var _el$0 = web.getNextElement(_tmpl$7), _el$12 = _el$0.firstChild, [_el$13, _co$] = web.getNextMarker(_el$12.nextSibling), _el$10 = _el$13.nextSibling, _el$11 = _el$10.firstChild;
101
+ web.insert(_el$0, web.createComponent(solidJs.Show, {
61
102
  get when() {
62
103
  return props.component.params.title;
63
104
  },
64
105
  get children() {
65
- var _el$8 = web.getNextElement(_tmpl$3);
66
- web.insert(_el$8, () => props.component.params.title);
67
- return _el$8;
106
+ var _el$1 = web.getNextElement(_tmpl$6);
107
+ web.insert(_el$1, () => props.component.params.title);
108
+ return _el$1;
68
109
  }
69
- }), _el$10, _co$);
70
- _el$0.addEventListener("error", () => {
110
+ }), _el$13, _co$);
111
+ _el$11.addEventListener("error", () => {
71
112
  var _a;
72
113
  setError("Failed to load chart");
73
114
  (_a = props.onError) == null ? void 0 : _a.call(props, {
@@ -76,11 +117,11 @@ function ChartRenderer(props) {
76
117
  componentId: props.component.id
77
118
  });
78
119
  });
79
- web.effect(() => web.setAttribute(_el$0, "src", iframeUrl()));
80
- return _el$7;
120
+ web.effect(() => web.setAttribute(_el$11, "src", iframeUrl()));
121
+ return _el$0;
81
122
  }
82
- }), _el$16, _co$4);
83
- return _el$;
123
+ }), _el$19, _co$4);
124
+ return _el$4;
84
125
  })();
85
126
  }
86
127
  function renderCellValue(value) {
@@ -132,109 +173,138 @@ function renderCellValue(value) {
132
173
  }
133
174
  function TableRenderer(props) {
134
175
  const tableParams = props.component.params;
176
+ const getTableText = () => {
177
+ const columns = tableParams.columns || [];
178
+ const rows = tableParams.rows || [];
179
+ const header = columns.map((c) => c.label).join(" ");
180
+ const dataRows = rows.map((row) => columns.map((c) => {
181
+ const value = row[c.key];
182
+ if (value === null || value === void 0) return "";
183
+ if (typeof value === "object") return value.name || value.label || JSON.stringify(value);
184
+ return String(value);
185
+ }).join(" ")).join("\n");
186
+ return `${header}
187
+ ${dataRows}`;
188
+ };
135
189
  return (() => {
136
- var _el$17 = web.getNextElement(_tmpl$7), _el$18 = _el$17.firstChild, _el$38 = _el$18.firstChild, [_el$39, _co$8] = web.getNextMarker(_el$38.nextSibling), _el$20 = _el$39.nextSibling, _el$21 = _el$20.firstChild, _el$22 = _el$21.firstChild, _el$23 = _el$22.firstChild, _el$24 = _el$22.nextSibling, _el$40 = _el$20.nextSibling, [_el$41, _co$9] = web.getNextMarker(_el$40.nextSibling);
137
- web.insert(_el$18, web.createComponent(solidJs.Show, {
190
+ var _el$20 = web.getNextElement(_tmpl$0), _el$45 = _el$20.firstChild, [_el$46, _co$0] = web.getNextMarker(_el$45.nextSibling), _el$21 = _el$46.nextSibling, _el$41 = _el$21.firstChild, [_el$42, _co$8] = web.getNextMarker(_el$41.nextSibling), _el$23 = _el$42.nextSibling, _el$24 = _el$23.firstChild, _el$25 = _el$24.firstChild, _el$26 = _el$25.firstChild, _el$27 = _el$25.nextSibling, _el$43 = _el$23.nextSibling, [_el$44, _co$9] = web.getNextMarker(_el$43.nextSibling);
191
+ web.insert(_el$20, web.createComponent(CopyButton, {
192
+ getText: getTableText,
193
+ title: "Copy table data",
194
+ position: "top-right"
195
+ }), _el$46, _co$0);
196
+ web.insert(_el$21, web.createComponent(solidJs.Show, {
138
197
  get when() {
139
198
  return tableParams.title;
140
199
  },
141
200
  get children() {
142
- var _el$19 = web.getNextElement(_tmpl$3);
143
- web.insert(_el$19, () => tableParams.title);
144
- return _el$19;
201
+ var _el$22 = web.getNextElement(_tmpl$6);
202
+ web.insert(_el$22, () => tableParams.title);
203
+ return _el$22;
145
204
  }
146
- }), _el$39, _co$8);
147
- web.insert(_el$23, web.createComponent(solidJs.For, {
205
+ }), _el$42, _co$8);
206
+ web.insert(_el$26, web.createComponent(solidJs.For, {
148
207
  get each() {
149
208
  return tableParams.columns;
150
209
  },
151
210
  children: (column) => (() => {
152
- var _el$42 = web.getNextElement(_tmpl$8);
153
- web.insert(_el$42, () => column.label);
154
- web.effect((_$p) => web.style(_el$42, column.width ? {
211
+ var _el$47 = web.getNextElement(_tmpl$1);
212
+ web.insert(_el$47, () => column.label);
213
+ web.effect((_$p) => web.style(_el$47, column.width ? {
155
214
  width: column.width
156
215
  } : {}, _$p));
157
- return _el$42;
216
+ return _el$47;
158
217
  })()
159
218
  }));
160
- web.insert(_el$24, web.createComponent(solidJs.For, {
219
+ web.insert(_el$27, web.createComponent(solidJs.For, {
161
220
  get each() {
162
221
  return tableParams.rows.slice(0, validation.DEFAULT_RESOURCE_LIMITS.maxTableRows);
163
222
  },
164
223
  children: (row, i) => (() => {
165
- var _el$43 = web.getNextElement(_tmpl$9);
166
- web.insert(_el$43, web.createComponent(solidJs.For, {
224
+ var _el$48 = web.getNextElement(_tmpl$10);
225
+ web.insert(_el$48, web.createComponent(solidJs.For, {
167
226
  get each() {
168
227
  return tableParams.columns;
169
228
  },
170
229
  children: (column) => (() => {
171
- var _el$44 = web.getNextElement(_tmpl$0), _el$45 = _el$44.firstChild;
172
- web.effect(() => web.setProperty(_el$45, "innerHTML", renderCellValue(row[column.key])));
173
- return _el$44;
230
+ var _el$49 = web.getNextElement(_tmpl$11), _el$50 = _el$49.firstChild;
231
+ web.effect(() => web.setProperty(_el$50, "innerHTML", renderCellValue(row[column.key])));
232
+ return _el$49;
174
233
  })()
175
234
  }));
176
- web.effect(() => web.className(_el$43, `hover:bg-gray-50 dark:hover:bg-gray-700/50 transition-colors ${i() % 2 === 0 ? "bg-white dark:bg-gray-800" : "bg-gray-50/30 dark:bg-gray-800/50"}`));
177
- return _el$43;
235
+ web.effect(() => web.className(_el$48, `hover:bg-gray-50 dark:hover:bg-gray-700/50 transition-colors ${i() % 2 === 0 ? "bg-white dark:bg-gray-800" : "bg-gray-50/30 dark:bg-gray-800/50"}`));
236
+ return _el$48;
178
237
  })()
179
238
  }));
180
- web.insert(_el$18, web.createComponent(solidJs.Show, {
239
+ web.insert(_el$21, web.createComponent(solidJs.Show, {
181
240
  get when() {
182
241
  return tableParams.pagination;
183
242
  },
184
243
  get children() {
185
- var _el$25 = web.getNextElement(_tmpl$6), _el$26 = _el$25.firstChild, _el$27 = _el$26.firstChild, _el$32 = _el$27.nextSibling, [_el$33, _co$5] = web.getNextMarker(_el$32.nextSibling), _el$28 = _el$33.nextSibling, _el$34 = _el$28.nextSibling, [_el$35, _co$6] = web.getNextMarker(_el$34.nextSibling), _el$30 = _el$35.nextSibling, _el$36 = _el$30.nextSibling, [_el$37, _co$7] = web.getNextMarker(_el$36.nextSibling);
186
- web.insert(_el$26, () => tableParams.pagination.currentPage * tableParams.pagination.pageSize + 1, _el$33, _co$5);
187
- web.insert(_el$26, () => Math.min((tableParams.pagination.currentPage + 1) * tableParams.pagination.pageSize, tableParams.pagination.totalRows), _el$35, _co$6);
188
- web.insert(_el$26, () => tableParams.pagination.totalRows, _el$37, _co$7);
189
- return _el$25;
244
+ var _el$28 = web.getNextElement(_tmpl$9), _el$29 = _el$28.firstChild, _el$30 = _el$29.firstChild, _el$35 = _el$30.nextSibling, [_el$36, _co$5] = web.getNextMarker(_el$35.nextSibling), _el$31 = _el$36.nextSibling, _el$37 = _el$31.nextSibling, [_el$38, _co$6] = web.getNextMarker(_el$37.nextSibling), _el$33 = _el$38.nextSibling, _el$39 = _el$33.nextSibling, [_el$40, _co$7] = web.getNextMarker(_el$39.nextSibling);
245
+ web.insert(_el$29, () => tableParams.pagination.currentPage * tableParams.pagination.pageSize + 1, _el$36, _co$5);
246
+ web.insert(_el$29, () => Math.min((tableParams.pagination.currentPage + 1) * tableParams.pagination.pageSize, tableParams.pagination.totalRows), _el$38, _co$6);
247
+ web.insert(_el$29, () => tableParams.pagination.totalRows, _el$40, _co$7);
248
+ return _el$28;
190
249
  }
191
- }), _el$41, _co$9);
192
- return _el$17;
250
+ }), _el$44, _co$9);
251
+ return _el$20;
193
252
  })();
194
253
  }
195
254
  function MetricRenderer(props) {
196
255
  const metricParams = props.component.params;
256
+ const getMetricText = () => {
257
+ const title = metricParams.title || metricParams.label || "";
258
+ const value = metricParams.value;
259
+ const unit = metricParams.unit || "";
260
+ return `${title}: ${value}${unit ? " " + unit : ""}`;
261
+ };
197
262
  return (() => {
198
- var _el$46 = web.getNextElement(_tmpl$12), _el$47 = _el$46.firstChild, _el$48 = _el$47.firstChild, _el$49 = _el$48.firstChild, _el$50 = _el$49.nextSibling, _el$51 = _el$50.firstChild, _el$53 = _el$51.nextSibling, [_el$54, _co$0] = web.getNextMarker(_el$53.nextSibling), _el$64 = _el$48.nextSibling, [_el$65, _co$11] = web.getNextMarker(_el$64.nextSibling), _el$66 = _el$65.nextSibling, [_el$67, _co$12] = web.getNextMarker(_el$66.nextSibling);
199
- web.insert(_el$49, () => metricParams.title);
200
- web.insert(_el$51, () => metricParams.value);
201
- web.insert(_el$50, web.createComponent(solidJs.Show, {
263
+ var _el$51 = web.getNextElement(_tmpl$15), _el$73 = _el$51.firstChild, [_el$74, _co$14] = web.getNextMarker(_el$73.nextSibling), _el$52 = _el$74.nextSibling, _el$53 = _el$52.firstChild, _el$54 = _el$53.firstChild, _el$55 = _el$54.nextSibling, _el$56 = _el$55.firstChild, _el$58 = _el$56.nextSibling, [_el$59, _co$1] = web.getNextMarker(_el$58.nextSibling), _el$69 = _el$53.nextSibling, [_el$70, _co$12] = web.getNextMarker(_el$69.nextSibling), _el$71 = _el$70.nextSibling, [_el$72, _co$13] = web.getNextMarker(_el$71.nextSibling);
264
+ web.insert(_el$51, web.createComponent(CopyButton, {
265
+ getText: getMetricText,
266
+ title: "Copy metric",
267
+ position: "top-right"
268
+ }), _el$74, _co$14);
269
+ web.insert(_el$54, () => metricParams.title);
270
+ web.insert(_el$56, () => metricParams.value);
271
+ web.insert(_el$55, web.createComponent(solidJs.Show, {
202
272
  get when() {
203
273
  return metricParams.unit;
204
274
  },
205
275
  get children() {
206
- var _el$52 = web.getNextElement(_tmpl$1);
207
- web.insert(_el$52, () => metricParams.unit);
208
- return _el$52;
276
+ var _el$57 = web.getNextElement(_tmpl$12);
277
+ web.insert(_el$57, () => metricParams.unit);
278
+ return _el$57;
209
279
  }
210
- }), _el$54, _co$0);
211
- web.insert(_el$47, web.createComponent(solidJs.Show, {
280
+ }), _el$59, _co$1);
281
+ web.insert(_el$52, web.createComponent(solidJs.Show, {
212
282
  get when() {
213
283
  return metricParams.trend;
214
284
  },
215
285
  get children() {
216
- var _el$55 = web.getNextElement(_tmpl$10), _el$56 = _el$55.firstChild, _el$59 = _el$56.firstChild, [_el$60, _co$1] = web.getNextMarker(_el$59.nextSibling), _el$57 = _el$60.nextSibling, _el$61 = _el$57.nextSibling, [_el$62, _co$10] = web.getNextMarker(_el$61.nextSibling);
217
- _el$62.nextSibling;
218
- web.insert(_el$56, (() => {
286
+ var _el$60 = web.getNextElement(_tmpl$13), _el$61 = _el$60.firstChild, _el$64 = _el$61.firstChild, [_el$65, _co$10] = web.getNextMarker(_el$64.nextSibling), _el$62 = _el$65.nextSibling, _el$66 = _el$62.nextSibling, [_el$67, _co$11] = web.getNextMarker(_el$66.nextSibling);
287
+ _el$67.nextSibling;
288
+ web.insert(_el$61, (() => {
219
289
  var _c$ = web.memo(() => metricParams.trend.direction === "up");
220
290
  return () => _c$() ? "�" : metricParams.trend.direction === "down" ? "�" : "�";
221
- })(), _el$60, _co$1);
222
- web.insert(_el$56, () => Math.abs(metricParams.trend.value), _el$62, _co$10);
223
- web.effect(() => web.className(_el$56, `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"}`));
224
- return _el$55;
291
+ })(), _el$65, _co$10);
292
+ web.insert(_el$61, () => Math.abs(metricParams.trend.value), _el$67, _co$11);
293
+ web.effect(() => web.className(_el$61, `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"}`));
294
+ return _el$60;
225
295
  }
226
- }), _el$65, _co$11);
227
- web.insert(_el$47, web.createComponent(solidJs.Show, {
296
+ }), _el$70, _co$12);
297
+ web.insert(_el$52, web.createComponent(solidJs.Show, {
228
298
  get when() {
229
299
  return metricParams.subtitle;
230
300
  },
231
301
  get children() {
232
- var _el$63 = web.getNextElement(_tmpl$11);
233
- web.insert(_el$63, () => metricParams.subtitle);
234
- return _el$63;
302
+ var _el$68 = web.getNextElement(_tmpl$14);
303
+ web.insert(_el$68, () => metricParams.subtitle);
304
+ return _el$68;
235
305
  }
236
- }), _el$67, _co$12);
237
- return _el$46;
306
+ }), _el$72, _co$13);
307
+ return _el$51;
238
308
  })();
239
309
  }
240
310
  function extractImageFromMarkdown(content) {
@@ -266,118 +336,126 @@ function TextRenderer(props) {
266
336
  }
267
337
  return textParams.content;
268
338
  });
339
+ const getTextContent = () => {
340
+ return textParams.content || "";
341
+ };
269
342
  return web.createComponent(solidJs.Show, {
270
343
  get when() {
271
344
  return imageData();
272
345
  },
273
346
  get fallback() {
274
347
  return (() => {
275
- var _el$68 = web.getNextElement(_tmpl$13), _el$69 = _el$68.firstChild;
348
+ var _el$75 = web.getNextElement(_tmpl$16), _el$77 = _el$75.firstChild, [_el$78, _co$15] = web.getNextMarker(_el$77.nextSibling), _el$76 = _el$78.nextSibling;
349
+ web.insert(_el$75, web.createComponent(CopyButton, {
350
+ getText: getTextContent,
351
+ title: "Copy text",
352
+ position: "top-right"
353
+ }), _el$78, _co$15);
276
354
  web.effect((_p$) => {
277
- var _v$ = `prose prose-sm dark:prose-invert max-w-none ${textParams.className || ""}`, _v$2 = htmlContent();
278
- _v$ !== _p$.e && web.className(_el$69, _p$.e = _v$);
279
- _v$2 !== _p$.t && web.setProperty(_el$69, "innerHTML", _p$.t = _v$2);
355
+ var _v$3 = `prose prose-sm dark:prose-invert max-w-none ${textParams.className || ""}`, _v$4 = htmlContent();
356
+ _v$3 !== _p$.e && web.className(_el$76, _p$.e = _v$3);
357
+ _v$4 !== _p$.t && web.setProperty(_el$76, "innerHTML", _p$.t = _v$4);
280
358
  return _p$;
281
359
  }, {
282
360
  e: void 0,
283
361
  t: void 0
284
362
  });
285
- return _el$68;
363
+ return _el$75;
286
364
  })();
287
365
  },
288
366
  children: (data) => (() => {
289
- var _el$70 = web.getNextElement(_tmpl$14), _el$71 = _el$70.firstChild, _el$72 = _el$71.firstChild, _el$73 = _el$72.firstChild, _el$74 = _el$71.nextSibling, _el$75 = _el$74.firstChild;
290
- web.insert(_el$75, () => data().credit);
367
+ var _el$79 = web.getNextElement(_tmpl$17), _el$80 = _el$79.firstChild, _el$81 = _el$80.firstChild, _el$82 = _el$81.firstChild, _el$83 = _el$80.nextSibling, _el$84 = _el$83.firstChild;
368
+ web.insert(_el$84, () => data().credit);
291
369
  web.effect((_p$) => {
292
- var _v$3 = data().linkUrl, _v$4 = data().imageUrl, _v$5 = data().alt;
293
- _v$3 !== _p$.e && web.setAttribute(_el$72, "href", _p$.e = _v$3);
294
- _v$4 !== _p$.t && web.setAttribute(_el$73, "src", _p$.t = _v$4);
295
- _v$5 !== _p$.a && web.setAttribute(_el$73, "alt", _p$.a = _v$5);
370
+ var _v$5 = data().linkUrl, _v$6 = data().imageUrl, _v$7 = data().alt;
371
+ _v$5 !== _p$.e && web.setAttribute(_el$81, "href", _p$.e = _v$5);
372
+ _v$6 !== _p$.t && web.setAttribute(_el$82, "src", _p$.t = _v$6);
373
+ _v$7 !== _p$.a && web.setAttribute(_el$82, "alt", _p$.a = _v$7);
296
374
  return _p$;
297
375
  }, {
298
376
  e: void 0,
299
377
  t: void 0,
300
378
  a: void 0
301
379
  });
302
- return _el$70;
380
+ return _el$79;
303
381
  })()
304
382
  });
305
383
  }
306
384
  function IframeRenderer(props) {
307
385
  const params = props.component.params;
308
386
  return (() => {
309
- var _el$76 = web.getNextElement(_tmpl$16), _el$80 = _el$76.firstChild, [_el$81, _co$13] = web.getNextMarker(_el$80.nextSibling), _el$79 = _el$81.nextSibling;
310
- web.insert(_el$76, web.createComponent(solidJs.Show, {
387
+ var _el$85 = web.getNextElement(_tmpl$19), _el$89 = _el$85.firstChild, [_el$90, _co$16] = web.getNextMarker(_el$89.nextSibling), _el$88 = _el$90.nextSibling;
388
+ web.insert(_el$85, web.createComponent(solidJs.Show, {
311
389
  get when() {
312
390
  return params.title;
313
391
  },
314
392
  get children() {
315
- var _el$77 = web.getNextElement(_tmpl$15), _el$78 = _el$77.firstChild;
316
- web.insert(_el$78, () => params.title);
317
- return _el$77;
393
+ var _el$86 = web.getNextElement(_tmpl$18), _el$87 = _el$86.firstChild;
394
+ web.insert(_el$87, () => params.title);
395
+ return _el$86;
318
396
  }
319
- }), _el$81, _co$13);
397
+ }), _el$90, _co$16);
320
398
  web.effect((_p$) => {
321
- var _v$6 = params.url, _v$7 = params.title || "Embedded content", _v$8 = `height: ${params.height || "400px"}; min-height: 300px;`;
322
- _v$6 !== _p$.e && web.setAttribute(_el$79, "src", _p$.e = _v$6);
323
- _v$7 !== _p$.t && web.setAttribute(_el$79, "title", _p$.t = _v$7);
324
- _p$.a = web.style(_el$79, _v$8, _p$.a);
399
+ var _v$8 = params.url, _v$9 = params.title || "Embedded content", _v$0 = `height: ${params.height || "400px"}; min-height: 300px;`;
400
+ _v$8 !== _p$.e && web.setAttribute(_el$88, "src", _p$.e = _v$8);
401
+ _v$9 !== _p$.t && web.setAttribute(_el$88, "title", _p$.t = _v$9);
402
+ _p$.a = web.style(_el$88, _v$0, _p$.a);
325
403
  return _p$;
326
404
  }, {
327
405
  e: void 0,
328
406
  t: void 0,
329
407
  a: void 0
330
408
  });
331
- return _el$76;
409
+ return _el$85;
332
410
  })();
333
411
  }
334
412
  function ImageRenderer(props) {
335
413
  const params = props.component.params;
336
414
  return (() => {
337
- var _el$82 = web.getNextElement(_tmpl$18), _el$83 = _el$82.firstChild, _el$84 = _el$83.firstChild, _el$85 = _el$84.firstChild, _el$88 = _el$83.nextSibling, [_el$89, _co$14] = web.getNextMarker(_el$88.nextSibling);
338
- web.insert(_el$82, web.createComponent(solidJs.Show, {
415
+ var _el$91 = web.getNextElement(_tmpl$21), _el$92 = _el$91.firstChild, _el$93 = _el$92.firstChild, _el$94 = _el$93.firstChild, _el$97 = _el$92.nextSibling, [_el$98, _co$17] = web.getNextMarker(_el$97.nextSibling);
416
+ web.insert(_el$91, web.createComponent(solidJs.Show, {
339
417
  get when() {
340
418
  return params.caption;
341
419
  },
342
420
  get children() {
343
- var _el$86 = web.getNextElement(_tmpl$17), _el$87 = _el$86.firstChild;
344
- web.insert(_el$87, () => params.caption);
345
- return _el$86;
421
+ var _el$95 = web.getNextElement(_tmpl$20), _el$96 = _el$95.firstChild;
422
+ web.insert(_el$96, () => params.caption);
423
+ return _el$95;
346
424
  }
347
- }), _el$89, _co$14);
425
+ }), _el$98, _co$17);
348
426
  web.effect((_p$) => {
349
- var _v$9 = params.url, _v$0 = params.url, _v$1 = params.alt || "Image";
350
- _v$9 !== _p$.e && web.setAttribute(_el$84, "href", _p$.e = _v$9);
351
- _v$0 !== _p$.t && web.setAttribute(_el$85, "src", _p$.t = _v$0);
352
- _v$1 !== _p$.a && web.setAttribute(_el$85, "alt", _p$.a = _v$1);
427
+ var _v$1 = params.url, _v$10 = params.url, _v$11 = params.alt || "Image";
428
+ _v$1 !== _p$.e && web.setAttribute(_el$93, "href", _p$.e = _v$1);
429
+ _v$10 !== _p$.t && web.setAttribute(_el$94, "src", _p$.t = _v$10);
430
+ _v$11 !== _p$.a && web.setAttribute(_el$94, "alt", _p$.a = _v$11);
353
431
  return _p$;
354
432
  }, {
355
433
  e: void 0,
356
434
  t: void 0,
357
435
  a: void 0
358
436
  });
359
- return _el$82;
437
+ return _el$91;
360
438
  })();
361
439
  }
362
440
  function LinkRenderer(props) {
363
441
  const params = props.component.params;
364
442
  return (() => {
365
- var _el$90 = web.getNextElement(_tmpl$20), _el$91 = _el$90.firstChild, _el$92 = _el$91.nextSibling, _el$93 = _el$92.firstChild, _el$95 = _el$93.nextSibling, [_el$96, _co$15] = web.getNextMarker(_el$95.nextSibling);
366
- _el$90.$$click = (e) => e.stopPropagation();
367
- web.insert(_el$93, () => params.label || params.url);
368
- web.insert(_el$92, web.createComponent(solidJs.Show, {
443
+ var _el$99 = web.getNextElement(_tmpl$23), _el$100 = _el$99.firstChild, _el$101 = _el$100.nextSibling, _el$102 = _el$101.firstChild, _el$104 = _el$102.nextSibling, [_el$105, _co$18] = web.getNextMarker(_el$104.nextSibling);
444
+ _el$99.$$click = (e) => e.stopPropagation();
445
+ web.insert(_el$102, () => params.label || params.url);
446
+ web.insert(_el$101, web.createComponent(solidJs.Show, {
369
447
  get when() {
370
448
  return params.description;
371
449
  },
372
450
  get children() {
373
- var _el$94 = web.getNextElement(_tmpl$19);
374
- web.insert(_el$94, () => params.description);
375
- return _el$94;
451
+ var _el$103 = web.getNextElement(_tmpl$22);
452
+ web.insert(_el$103, () => params.description);
453
+ return _el$103;
376
454
  }
377
- }), _el$96, _co$15);
378
- web.effect(() => web.setAttribute(_el$90, "href", params.url));
455
+ }), _el$105, _co$18);
456
+ web.effect(() => web.setAttribute(_el$99, "href", params.url));
379
457
  web.runHydrationEvents();
380
- return _el$90;
458
+ return _el$99;
381
459
  })();
382
460
  }
383
461
  function ComponentRenderer(props) {
@@ -391,12 +469,12 @@ function ComponentRenderer(props) {
391
469
  details: validation$1.errors
392
470
  });
393
471
  return (() => {
394
- var _el$97 = web.getNextElement(_tmpl$21), _el$98 = _el$97.firstChild, _el$99 = _el$98.nextSibling;
395
- web.insert(_el$99, () => {
472
+ var _el$106 = web.getNextElement(_tmpl$24), _el$107 = _el$106.firstChild, _el$108 = _el$107.nextSibling;
473
+ web.insert(_el$108, () => {
396
474
  var _a2, _b;
397
475
  return ((_b = (_a2 = validation$1.errors) == null ? void 0 : _a2[0]) == null ? void 0 : _b.message) || "Unknown validation error";
398
476
  });
399
- return _el$97;
477
+ return _el$106;
400
478
  })();
401
479
  }
402
480
  return web.createComponent(GenerativeUIErrorBoundary.GenerativeUIErrorBoundary, {
@@ -538,25 +616,25 @@ function ActionRenderer(props) {
538
616
  const isDisabled = () => params.disabled || params.action === "tool-call" && isExecuting();
539
617
  if (params.type === "link" || params.action === "link") {
540
618
  return (() => {
541
- var _el$100 = web.getNextElement(_tmpl$23), _el$102 = _el$100.firstChild, [_el$103, _co$16] = web.getNextMarker(_el$102.nextSibling), _el$104 = _el$103.nextSibling, [_el$105, _co$17] = web.getNextMarker(_el$104.nextSibling);
542
- _el$100.$$click = handleClick;
543
- web.insert(_el$100, web.createComponent(solidJs.Show, {
619
+ var _el$109 = web.getNextElement(_tmpl$26), _el$111 = _el$109.firstChild, [_el$112, _co$19] = web.getNextMarker(_el$111.nextSibling), _el$113 = _el$112.nextSibling, [_el$114, _co$20] = web.getNextMarker(_el$113.nextSibling);
620
+ _el$109.$$click = handleClick;
621
+ web.insert(_el$109, web.createComponent(solidJs.Show, {
544
622
  get when() {
545
623
  return params.icon;
546
624
  },
547
625
  get children() {
548
- var _el$101 = web.getNextElement(_tmpl$22);
549
- web.insert(_el$101, () => params.icon);
550
- return _el$101;
626
+ var _el$110 = web.getNextElement(_tmpl$25);
627
+ web.insert(_el$110, () => params.icon);
628
+ return _el$110;
551
629
  }
552
- }), _el$103, _co$16);
553
- web.insert(_el$100, () => params.label, _el$105, _co$17);
630
+ }), _el$112, _co$19);
631
+ web.insert(_el$109, () => params.label, _el$114, _co$20);
554
632
  web.effect((_p$) => {
555
- var _v$10 = params.url || "#", _v$11 = params.url ? "_blank" : void 0, _v$12 = `inline-flex items-center gap-2 px-4 py-2 rounded-md text-sm font-medium transition-colors
633
+ var _v$12 = params.url || "#", _v$13 = params.url ? "_blank" : void 0, _v$14 = `inline-flex items-center gap-2 px-4 py-2 rounded-md text-sm font-medium transition-colors
556
634
  ${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"}`;
557
- _v$10 !== _p$.e && web.setAttribute(_el$100, "href", _p$.e = _v$10);
558
- _v$11 !== _p$.t && web.setAttribute(_el$100, "target", _p$.t = _v$11);
559
- _v$12 !== _p$.a && web.className(_el$100, _p$.a = _v$12);
635
+ _v$12 !== _p$.e && web.setAttribute(_el$109, "href", _p$.e = _v$12);
636
+ _v$13 !== _p$.t && web.setAttribute(_el$109, "target", _p$.t = _v$13);
637
+ _v$14 !== _p$.a && web.className(_el$109, _p$.a = _v$14);
560
638
  return _p$;
561
639
  }, {
562
640
  e: void 0,
@@ -564,39 +642,39 @@ function ActionRenderer(props) {
564
642
  a: void 0
565
643
  });
566
644
  web.runHydrationEvents();
567
- return _el$100;
645
+ return _el$109;
568
646
  })();
569
647
  }
570
648
  return (() => {
571
- var _el$106 = web.getNextElement(_tmpl$25), _el$109 = _el$106.firstChild, [_el$110, _co$18] = web.getNextMarker(_el$109.nextSibling), _el$111 = _el$110.nextSibling, [_el$112, _co$19] = web.getNextMarker(_el$111.nextSibling), _el$113 = _el$112.nextSibling, [_el$114, _co$20] = web.getNextMarker(_el$113.nextSibling);
572
- _el$106.$$click = handleClick;
573
- web.insert(_el$106, web.createComponent(solidJs.Show, {
649
+ var _el$115 = web.getNextElement(_tmpl$28), _el$118 = _el$115.firstChild, [_el$119, _co$21] = web.getNextMarker(_el$118.nextSibling), _el$120 = _el$119.nextSibling, [_el$121, _co$22] = web.getNextMarker(_el$120.nextSibling), _el$122 = _el$121.nextSibling, [_el$123, _co$23] = web.getNextMarker(_el$122.nextSibling);
650
+ _el$115.$$click = handleClick;
651
+ web.insert(_el$115, web.createComponent(solidJs.Show, {
574
652
  get when() {
575
653
  return web.memo(() => !!isExecuting())() && params.action === "tool-call";
576
654
  },
577
655
  get children() {
578
- return web.getNextElement(_tmpl$24);
656
+ return web.getNextElement(_tmpl$27);
579
657
  }
580
- }), _el$110, _co$18);
581
- web.insert(_el$106, web.createComponent(solidJs.Show, {
658
+ }), _el$119, _co$21);
659
+ web.insert(_el$115, web.createComponent(solidJs.Show, {
582
660
  get when() {
583
661
  return web.memo(() => !!params.icon)() && !(isExecuting() && params.action === "tool-call");
584
662
  },
585
663
  get children() {
586
- var _el$108 = web.getNextElement(_tmpl$22);
587
- web.insert(_el$108, () => params.icon);
588
- return _el$108;
664
+ var _el$117 = web.getNextElement(_tmpl$25);
665
+ web.insert(_el$117, () => params.icon);
666
+ return _el$117;
589
667
  }
590
- }), _el$112, _co$19);
591
- web.insert(_el$106, () => params.label, _el$114, _co$20);
668
+ }), _el$121, _co$22);
669
+ web.insert(_el$115, () => params.label, _el$123, _co$23);
592
670
  web.effect((_p$) => {
593
- var _v$13 = params.action === "submit" ? "submit" : "button", _v$14 = isDisabled(), _v$15 = `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
671
+ var _v$15 = params.action === "submit" ? "submit" : "button", _v$16 = isDisabled(), _v$17 = `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
594
672
  ${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"}
595
673
  ${isDisabled() ? "opacity-50 cursor-not-allowed" : ""}
596
674
  ${params.size === "sm" ? "px-3 py-1.5 text-xs" : params.size === "lg" ? "px-6 py-3 text-base" : ""}`;
597
- _v$13 !== _p$.e && web.setAttribute(_el$106, "type", _p$.e = _v$13);
598
- _v$14 !== _p$.t && web.setProperty(_el$106, "disabled", _p$.t = _v$14);
599
- _v$15 !== _p$.a && web.className(_el$106, _p$.a = _v$15);
675
+ _v$15 !== _p$.e && web.setAttribute(_el$115, "type", _p$.e = _v$15);
676
+ _v$16 !== _p$.t && web.setProperty(_el$115, "disabled", _p$.t = _v$16);
677
+ _v$17 !== _p$.a && web.className(_el$115, _p$.a = _v$17);
600
678
  return _p$;
601
679
  }, {
602
680
  e: void 0,
@@ -604,7 +682,7 @@ function ActionRenderer(props) {
604
682
  a: void 0
605
683
  });
606
684
  web.runHydrationEvents();
607
- return _el$106;
685
+ return _el$115;
608
686
  })();
609
687
  }
610
688
  const UIResourceRenderer = (props) => {
@@ -664,24 +742,24 @@ const UIResourceRenderer = (props) => {
664
742
  });
665
743
  const layoutData = layout();
666
744
  return (() => {
667
- var _el$115 = web.getNextElement(_tmpl$26), _el$116 = _el$115.firstChild, _el$117 = _el$116.nextSibling, [_el$118, _co$21] = web.getNextMarker(_el$117.nextSibling);
668
- web.insert(_el$116, web.createComponent(solidJs.For, {
745
+ var _el$124 = web.getNextElement(_tmpl$29), _el$125 = _el$124.firstChild, _el$126 = _el$125.nextSibling, [_el$127, _co$24] = web.getNextMarker(_el$126.nextSibling);
746
+ web.insert(_el$125, web.createComponent(solidJs.For, {
669
747
  get each() {
670
748
  return layoutData.components;
671
749
  },
672
750
  children: (component) => (() => {
673
- var _el$119 = web.getNextElement(_tmpl$27);
674
- web.insert(_el$119, web.createComponent(ComponentRenderer, {
751
+ var _el$128 = web.getNextElement(_tmpl$30);
752
+ web.insert(_el$128, web.createComponent(ComponentRenderer, {
675
753
  component,
676
754
  get onError() {
677
755
  return props.onError;
678
756
  }
679
757
  }));
680
- web.effect((_$p) => web.style(_el$119, getGridStyleString(component), _$p));
681
- return _el$119;
758
+ web.effect((_$p) => web.style(_el$128, getGridStyleString(component), _$p));
759
+ return _el$128;
682
760
  })()
683
761
  }));
684
- web.insert(_el$115, web.createComponent(solidJs.Show, {
762
+ web.insert(_el$124, web.createComponent(solidJs.Show, {
685
763
  get when() {
686
764
  return shouldShowAutoFooter();
687
765
  },
@@ -692,17 +770,17 @@ const UIResourceRenderer = (props) => {
692
770
  }
693
771
  });
694
772
  }
695
- }), _el$118, _co$21);
773
+ }), _el$127, _co$24);
696
774
  web.effect((_p$) => {
697
- var _v$16 = `w-full ${props.class || ""}`, _v$17 = gridContainerStyle();
698
- _v$16 !== _p$.e && web.className(_el$115, _p$.e = _v$16);
699
- _p$.t = web.style(_el$116, _v$17, _p$.t);
775
+ var _v$18 = `w-full ${props.class || ""}`, _v$19 = gridContainerStyle();
776
+ _v$18 !== _p$.e && web.className(_el$124, _p$.e = _v$18);
777
+ _p$.t = web.style(_el$125, _v$19, _p$.t);
700
778
  return _p$;
701
779
  }, {
702
780
  e: void 0,
703
781
  t: void 0
704
782
  });
705
- return _el$115;
783
+ return _el$124;
706
784
  })();
707
785
  };
708
786
  web.delegateEvents(["click"]);