@seed-ship/mcp-ui-solid 6.19.1 โ 6.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +519 -0
- package/README.md +791 -1
- package/dist/adapters/connector.cjs +15 -4
- package/dist/adapters/connector.cjs.map +1 -1
- package/dist/adapters/connector.d.ts +38 -0
- package/dist/adapters/connector.d.ts.map +1 -1
- package/dist/adapters/connector.js +15 -4
- package/dist/adapters/connector.js.map +1 -1
- package/dist/adapters/index.d.ts +4 -3
- package/dist/adapters/index.d.ts.map +1 -1
- package/dist/adapters/macro-run.cjs +25 -13
- package/dist/adapters/macro-run.cjs.map +1 -1
- package/dist/adapters/macro-run.d.ts +37 -2
- package/dist/adapters/macro-run.d.ts.map +1 -1
- package/dist/adapters/macro-run.js +25 -13
- package/dist/adapters/macro-run.js.map +1 -1
- package/dist/adapters.cjs +2 -0
- package/dist/adapters.cjs.map +1 -1
- package/dist/adapters.js +4 -2
- package/dist/components/ActionGroupRenderer.cjs +3 -1
- package/dist/components/ActionGroupRenderer.cjs.map +1 -1
- package/dist/components/ActionGroupRenderer.d.ts.map +1 -1
- package/dist/components/ActionGroupRenderer.js +3 -1
- package/dist/components/ActionGroupRenderer.js.map +1 -1
- package/dist/components/AgentCard.cjs +11 -8
- package/dist/components/AgentCard.cjs.map +1 -1
- package/dist/components/AgentCard.d.ts.map +1 -1
- package/dist/components/AgentCard.js +11 -8
- package/dist/components/AgentCard.js.map +1 -1
- package/dist/components/AgentHandoff.cjs +6 -1
- package/dist/components/AgentHandoff.cjs.map +1 -1
- package/dist/components/AgentHandoff.d.ts.map +1 -1
- package/dist/components/AgentHandoff.js +6 -1
- package/dist/components/AgentHandoff.js.map +1 -1
- package/dist/components/ArtifactRenderer.cjs +25 -6
- package/dist/components/ArtifactRenderer.cjs.map +1 -1
- package/dist/components/ArtifactRenderer.d.ts.map +1 -1
- package/dist/components/ArtifactRenderer.js +25 -6
- package/dist/components/ArtifactRenderer.js.map +1 -1
- package/dist/components/AutocompleteDropdown.cjs +30 -24
- package/dist/components/AutocompleteDropdown.cjs.map +1 -1
- package/dist/components/AutocompleteDropdown.d.ts.map +1 -1
- package/dist/components/AutocompleteDropdown.js +30 -24
- package/dist/components/AutocompleteDropdown.js.map +1 -1
- package/dist/components/AutocompleteFormField.cjs +3 -1
- package/dist/components/AutocompleteFormField.cjs.map +1 -1
- package/dist/components/AutocompleteFormField.d.ts.map +1 -1
- package/dist/components/AutocompleteFormField.js +4 -2
- package/dist/components/AutocompleteFormField.js.map +1 -1
- package/dist/components/BriefingDiff.cjs +45 -39
- package/dist/components/BriefingDiff.cjs.map +1 -1
- package/dist/components/BriefingDiff.d.ts.map +1 -1
- package/dist/components/BriefingDiff.js +45 -39
- package/dist/components/BriefingDiff.js.map +1 -1
- package/dist/components/CarouselRenderer.cjs +8 -2
- package/dist/components/CarouselRenderer.cjs.map +1 -1
- package/dist/components/CarouselRenderer.d.ts.map +1 -1
- package/dist/components/CarouselRenderer.js +8 -2
- package/dist/components/CarouselRenderer.js.map +1 -1
- package/dist/components/ChartJSRenderer.cjs +60 -36
- package/dist/components/ChartJSRenderer.cjs.map +1 -1
- package/dist/components/ChartJSRenderer.d.ts.map +1 -1
- package/dist/components/ChartJSRenderer.js +61 -37
- package/dist/components/ChartJSRenderer.js.map +1 -1
- package/dist/components/ChatPrompt.cjs +15 -9
- package/dist/components/ChatPrompt.cjs.map +1 -1
- package/dist/components/ChatPrompt.d.ts.map +1 -1
- package/dist/components/ChatPrompt.js +15 -9
- package/dist/components/ChatPrompt.js.map +1 -1
- package/dist/components/CodeBlockRenderer.cjs +34 -16
- package/dist/components/CodeBlockRenderer.cjs.map +1 -1
- package/dist/components/CodeBlockRenderer.d.ts.map +1 -1
- package/dist/components/CodeBlockRenderer.js +34 -16
- package/dist/components/CodeBlockRenderer.js.map +1 -1
- package/dist/components/DataPreviewSection.cjs +91 -44
- package/dist/components/DataPreviewSection.cjs.map +1 -1
- package/dist/components/DataPreviewSection.d.ts.map +1 -1
- package/dist/components/DataPreviewSection.js +92 -45
- package/dist/components/DataPreviewSection.js.map +1 -1
- package/dist/components/DegradedFallback.cjs +20 -16
- package/dist/components/DegradedFallback.cjs.map +1 -1
- package/dist/components/DegradedFallback.d.ts.map +1 -1
- package/dist/components/DegradedFallback.js +20 -16
- package/dist/components/DegradedFallback.js.map +1 -1
- package/dist/components/FooterRenderer.cjs +21 -17
- package/dist/components/FooterRenderer.cjs.map +1 -1
- package/dist/components/FooterRenderer.d.ts.map +1 -1
- package/dist/components/FooterRenderer.js +21 -17
- package/dist/components/FooterRenderer.js.map +1 -1
- package/dist/components/FormFieldRenderer.cjs +116 -93
- package/dist/components/FormFieldRenderer.cjs.map +1 -1
- package/dist/components/FormFieldRenderer.d.ts.map +1 -1
- package/dist/components/FormFieldRenderer.js +116 -93
- package/dist/components/FormFieldRenderer.js.map +1 -1
- package/dist/components/FormRenderer.cjs +55 -31
- package/dist/components/FormRenderer.cjs.map +1 -1
- package/dist/components/FormRenderer.d.ts.map +1 -1
- package/dist/components/FormRenderer.js +55 -31
- package/dist/components/FormRenderer.js.map +1 -1
- package/dist/components/GenerativeUIErrorBoundary.cjs +20 -15
- package/dist/components/GenerativeUIErrorBoundary.cjs.map +1 -1
- package/dist/components/GenerativeUIErrorBoundary.d.ts.map +1 -1
- package/dist/components/GenerativeUIErrorBoundary.js +20 -15
- package/dist/components/GenerativeUIErrorBoundary.js.map +1 -1
- package/dist/components/GraphRenderer.cjs +56 -33
- package/dist/components/GraphRenderer.cjs.map +1 -1
- package/dist/components/GraphRenderer.d.ts.map +1 -1
- package/dist/components/GraphRenderer.js +56 -33
- package/dist/components/GraphRenderer.js.map +1 -1
- package/dist/components/ImageGalleryRenderer.cjs +13 -4
- package/dist/components/ImageGalleryRenderer.cjs.map +1 -1
- package/dist/components/ImageGalleryRenderer.d.ts.map +1 -1
- package/dist/components/ImageGalleryRenderer.js +13 -4
- package/dist/components/ImageGalleryRenderer.js.map +1 -1
- package/dist/components/LightboxOverlay.cjs +16 -8
- package/dist/components/LightboxOverlay.cjs.map +1 -1
- package/dist/components/LightboxOverlay.d.ts.map +1 -1
- package/dist/components/LightboxOverlay.js +17 -9
- package/dist/components/LightboxOverlay.js.map +1 -1
- package/dist/components/MapRenderer.cjs +59 -29
- package/dist/components/MapRenderer.cjs.map +1 -1
- package/dist/components/MapRenderer.d.ts +10 -2
- package/dist/components/MapRenderer.d.ts.map +1 -1
- package/dist/components/MapRenderer.js +60 -30
- package/dist/components/MapRenderer.js.map +1 -1
- package/dist/components/ModalRenderer.cjs +4 -1
- package/dist/components/ModalRenderer.cjs.map +1 -1
- package/dist/components/ModalRenderer.d.ts.map +1 -1
- package/dist/components/ModalRenderer.js +5 -2
- package/dist/components/ModalRenderer.js.map +1 -1
- package/dist/components/ScratchpadPanel.cjs +578 -535
- package/dist/components/ScratchpadPanel.cjs.map +1 -1
- package/dist/components/ScratchpadPanel.d.ts.map +1 -1
- package/dist/components/ScratchpadPanel.js +578 -535
- package/dist/components/ScratchpadPanel.js.map +1 -1
- package/dist/components/StreamingUIRenderer.cjs +92 -28
- package/dist/components/StreamingUIRenderer.cjs.map +1 -1
- package/dist/components/StreamingUIRenderer.d.ts.map +1 -1
- package/dist/components/StreamingUIRenderer.js +92 -28
- package/dist/components/StreamingUIRenderer.js.map +1 -1
- package/dist/components/UIResourceRenderer.cjs +456 -363
- package/dist/components/UIResourceRenderer.cjs.map +1 -1
- package/dist/components/UIResourceRenderer.d.ts +21 -0
- package/dist/components/UIResourceRenderer.d.ts.map +1 -1
- package/dist/components/UIResourceRenderer.js +458 -365
- package/dist/components/UIResourceRenderer.js.map +1 -1
- package/dist/components/VerifiedText.cjs +39 -20
- package/dist/components/VerifiedText.cjs.map +1 -1
- package/dist/components/VerifiedText.d.ts +2 -1
- package/dist/components/VerifiedText.d.ts.map +1 -1
- package/dist/components/VerifiedText.js +39 -20
- package/dist/components/VerifiedText.js.map +1 -1
- package/dist/components/VideoRenderer.cjs +10 -5
- package/dist/components/VideoRenderer.cjs.map +1 -1
- package/dist/components/VideoRenderer.d.ts.map +1 -1
- package/dist/components/VideoRenderer.js +10 -5
- package/dist/components/VideoRenderer.js.map +1 -1
- package/dist/components/chart-data-table.cjs +38 -17
- package/dist/components/chart-data-table.cjs.map +1 -1
- package/dist/components/chart-data-table.d.ts +30 -1
- package/dist/components/chart-data-table.d.ts.map +1 -1
- package/dist/components/chart-data-table.js +38 -17
- package/dist/components/chart-data-table.js.map +1 -1
- package/dist/context/MCPActionContext.cjs +3 -1
- package/dist/context/MCPActionContext.cjs.map +1 -1
- package/dist/context/MCPActionContext.d.ts.map +1 -1
- package/dist/context/MCPActionContext.js +3 -1
- package/dist/context/MCPActionContext.js.map +1 -1
- package/dist/context/MCPUIStringsContext.cjs +285 -2
- package/dist/context/MCPUIStringsContext.cjs.map +1 -1
- package/dist/context/MCPUIStringsContext.d.ts +600 -3
- package/dist/context/MCPUIStringsContext.d.ts.map +1 -1
- package/dist/context/MCPUIStringsContext.js +285 -2
- package/dist/context/MCPUIStringsContext.js.map +1 -1
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/useStreamingUI.cjs +28 -10
- package/dist/hooks/useStreamingUI.cjs.map +1 -1
- package/dist/hooks/useStreamingUI.d.ts +37 -0
- package/dist/hooks/useStreamingUI.d.ts.map +1 -1
- package/dist/hooks/useStreamingUI.js +28 -10
- package/dist/hooks/useStreamingUI.js.map +1 -1
- package/dist/hooks.cjs +1 -0
- package/dist/hooks.cjs.map +1 -1
- package/dist/hooks.js +2 -1
- package/dist/index.cjs +23 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -3
- package/dist/index.d.ts +9 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +18 -3
- package/dist/index.js.map +1 -1
- package/dist/services/validation.cjs +41 -16
- package/dist/services/validation.cjs.map +1 -1
- package/dist/services/validation.d.ts +47 -2
- package/dist/services/validation.d.ts.map +1 -1
- package/dist/services/validation.js +41 -16
- package/dist/services/validation.js.map +1 -1
- package/dist/utils/degraded-projections.cjs +37 -12
- package/dist/utils/degraded-projections.cjs.map +1 -1
- package/dist/utils/degraded-projections.d.ts +39 -3
- package/dist/utils/degraded-projections.d.ts.map +1 -1
- package/dist/utils/degraded-projections.js +37 -12
- package/dist/utils/degraded-projections.js.map +1 -1
- package/dist/utils/format-string.cjs +10 -0
- package/dist/utils/format-string.cjs.map +1 -0
- package/dist/utils/format-string.d.ts +26 -0
- package/dist/utils/format-string.d.ts.map +1 -0
- package/dist/utils/format-string.js +10 -0
- package/dist/utils/format-string.js.map +1 -0
- package/dist/validation.cjs +3 -0
- package/dist/validation.cjs.map +1 -1
- package/dist/validation.d.cts +2 -1
- package/dist/validation.d.ts +2 -1
- package/dist/validation.d.ts.map +1 -1
- package/dist/validation.js +4 -1
- package/package.json +1 -1
- package/src/adapters/connector.ts +58 -4
- package/src/adapters/index.ts +12 -2
- package/src/adapters/macro-run.ts +71 -11
- package/src/components/ActionGroupRenderer.tsx +3 -1
- package/src/components/AgentCard.tsx +27 -9
- package/src/components/AgentHandoff.tsx +4 -1
- package/src/components/ArtifactRenderer.tsx +17 -5
- package/src/components/AutocompleteDropdown.tsx +8 -6
- package/src/components/AutocompleteFormField.tsx +5 -1
- package/src/components/BriefingDiff.tsx +11 -3
- package/src/components/CarouselRenderer.tsx +4 -2
- package/src/components/ChartJSRenderer.tsx +18 -9
- package/src/components/ChatPrompt.tsx +13 -8
- package/src/components/CodeBlockRenderer.tsx +12 -10
- package/src/components/DataPreviewSection.tsx +92 -26
- package/src/components/DegradedFallback.tsx +4 -2
- package/src/components/FooterRenderer.tsx +3 -1
- package/src/components/FormFieldRenderer.tsx +34 -19
- package/src/components/FormRenderer.tsx +38 -10
- package/src/components/GenerativeUIErrorBoundary.tsx +8 -3
- package/src/components/GraphRenderer.tsx +31 -16
- package/src/components/ImageGalleryRenderer.tsx +8 -4
- package/src/components/LightboxOverlay.tsx +6 -4
- package/src/components/MapRenderer.tsx +57 -20
- package/src/components/ModalRenderer.tsx +3 -1
- package/src/components/ScratchpadPanel.tsx +95 -44
- package/src/components/StreamingUIRenderer.tsx +41 -11
- package/src/components/UIResourceRenderer.tsx +145 -63
- package/src/components/VerifiedText.tsx +19 -9
- package/src/components/VideoRenderer.tsx +6 -4
- package/src/components/chart-data-table.ts +68 -14
- package/src/context/MCPActionContext.tsx +4 -1
- package/src/context/MCPUIStringsContext.tsx +1004 -1
- package/src/hooks/index.ts +2 -1
- package/src/hooks/useStreamingUI.ts +64 -10
- package/src/index.ts +23 -0
- package/src/services/validation.ts +93 -16
- package/src/utils/degraded-projections.ts +75 -12
- package/src/utils/format-string.ts +33 -0
- package/src/validation.ts +5 -0
|
@@ -11,37 +11,41 @@ const AgentCard = require("./AgentCard.cjs");
|
|
|
11
11
|
const SplitStepper = require("./SplitStepper.cjs");
|
|
12
12
|
const AgentHandoff = require("./AgentHandoff.cjs");
|
|
13
13
|
const BriefingDiff = require("./BriefingDiff.cjs");
|
|
14
|
-
|
|
14
|
+
const MCPUIStringsContext = require("../context/MCPUIStringsContext.cjs");
|
|
15
|
+
const formatString = require("../utils/format-string.cjs");
|
|
16
|
+
var _tmpl$ = /* @__PURE__ */ web.template(`<svg fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M19 9l-7 7-7-7">`), _tmpl$2 = /* @__PURE__ */ web.template(`<button class="p-1 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 rounded-full hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors"><svg class="w-4 h-4"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M6 18L18 6M6 6l12 12">`), _tmpl$3 = /* @__PURE__ */ web.template(`<div class="px-4 py-2 border-b border-gray-100 dark:border-gray-700 flex flex-wrap items-center gap-1.5">`), _tmpl$4 = /* @__PURE__ */ web.template(`<div class="px-4 py-3 border-t border-gray-100 dark:border-gray-700 space-y-2">`), _tmpl$5 = /* @__PURE__ */ web.template(`<div class="flex flex-col items-center gap-2 py-4 text-center"><span class=text-2xl>🔍</span><p class="text-sm text-gray-500 dark:text-gray-400"></p><button type=button class="px-3 py-1.5 text-xs font-medium text-blue-600 dark:text-blue-400 hover:bg-blue-50 dark:hover:bg-blue-900/20 rounded-lg transition-colors">`), _tmpl$6 = /* @__PURE__ */ web.template(`<div class="px-4 py-3 border-t border-gray-100 dark:border-gray-700">`), _tmpl$7 = /* @__PURE__ */ web.template(`<p class="text-xs text-red-500 dark:text-red-500 mt-0.5">`), _tmpl$8 = /* @__PURE__ */ web.template(`<button type=button class="px-3 py-1.5 text-sm font-medium rounded-lg bg-red-600 text-white hover:bg-red-700 transition-colors flex items-center gap-1">🔄 <!$><!/>`), _tmpl$9 = /* @__PURE__ */ web.template(`<button type=button class="px-3 py-1.5 text-sm font-medium rounded-lg border border-gray-200 dark:border-gray-600 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors">`), _tmpl$0 = /* @__PURE__ */ web.template(`<div class="px-4 py-3 border-t border-red-100 dark:border-red-900/30 bg-red-50 dark:bg-red-900/10"><div class="flex items-start gap-2 text-sm text-red-700 dark:text-red-400"><span class="flex-shrink-0 mt-0.5">โ ๏ธ</span><div class=flex-1><p class=font-medium></p><!$><!/></div></div><div class="flex gap-2 mt-2"><!$><!/><!$><!/>`), _tmpl$1 = /* @__PURE__ */ web.template(`<div class="px-4 py-3 border-t border-gray-100 dark:border-gray-700"><button type=button class="w-full px-4 py-2.5 text-sm font-semibold rounded-lg text-white bg-blue-600 hover:bg-blue-700 transition-colors flex items-center justify-center gap-2"><svg class="w-4 h-4"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path></svg><!$><!/>`), _tmpl$10 = /* @__PURE__ */ web.template(`<div style=overflow-y:auto><!$><!/><div class="divide-y divide-gray-100 dark:divide-gray-700"></div><!$><!/><!$><!/><!$><!/><!$><!/>`), _tmpl$11 = /* @__PURE__ */ web.template(`<div class="absolute bottom-1 right-1 px-2 py-1 text-[9px] font-mono bg-black/80 text-green-400 rounded z-50 pointer-events-none"><!$><!/> | ev:<!$><!/> | sec:<!$><!/> | <!$><!/> | last:<!$><!/>`), _tmpl$12 = /* @__PURE__ */ web.template(`<div style="animation:scratchpad-slide-down 0.2s ease-out"><div><div class="flex items-center gap-2"><span class=text-base>📝</span><h3 class="text-sm font-semibold text-gray-900 dark:text-white"></h3><!$><!/><!$><!/></div><div class="flex items-center gap-2"><span></span><!$><!/></div></div><!$><!/><style>
|
|
15
17
|
@keyframes scratchpad-slide-down { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
|
|
16
|
-
</style><!$><!/>`), _tmpl$13 = /* @__PURE__ */ web.template(`<svg class="w-3 h-3 text-gray-300 dark:text-gray-600 flex-shrink-0"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M9 5l7 7-7 7">`), _tmpl$14 = /* @__PURE__ */ web.template(`<span class="ml-1 font-normal opacity-75">โ <!$><!/>`), _tmpl$15 = /* @__PURE__ */ web.template(`<span><!$><!/> <!$><!/><!$><!/>`), _tmpl$16 = /* @__PURE__ */ web.template(`<div><span class="flex-shrink-0 mt-0.5"></span><p>`), _tmpl$17 = /* @__PURE__ */ web.template(`<div class="flex items-center gap-2 mb-2"><span class="text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wide">Preview</span><span class="px-1.5 py-0.5 text-xs font-bold bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 rounded">`), _tmpl$18 = /* @__PURE__ */ web.template(`<p class="text-sm text-gray-700 dark:text-gray-300">`), _tmpl$19 = /* @__PURE__ */ web.template(`<div class="mt-2 overflow-x-auto"><table class="min-w-full text-xs"><thead><tr></tr></thead><tbody>`), _tmpl$20 = /* @__PURE__ */ web.template(`<th class="px-2 py-1 text-left font-medium text-gray-500 dark:text-gray-400">`), _tmpl$21 = /* @__PURE__ */ web.template(`<tr class="border-t border-gray-100 dark:border-gray-700">`), _tmpl$22 = /* @__PURE__ */ web.template(`<td class="px-2 py-1 text-gray-700 dark:text-gray-300">`), _tmpl$23 = /* @__PURE__ */ web.template(`<pre class="text-xs text-gray-500 overflow-auto">`), _tmpl$24 = /* @__PURE__ */ web.template(`<div class="px-4 py-3 animate-[slideDown_0.2s_ease-out]"><h4 class="text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wide mb-2"></h4><!$><!/>`), _tmpl$25 = /* @__PURE__ */ web.template(`<div class=space-y-1>`), _tmpl$26 = /* @__PURE__ */ web.template(`<div class="flex gap-2 text-xs"><span class="text-gray-500 dark:text-gray-400 font-mono min-w-[120px]"><!$><!/>:</span><span class="text-gray-900 dark:text-white">`), _tmpl$27 = /* @__PURE__ */ web.template(`<p class="text-xs text-gray-400 italic">No filters`), _tmpl$28 = /* @__PURE__ */ web.template(`<div class="flex flex-wrap gap-1.5"><!$><!/><!$><!/>`), _tmpl$29 = /* @__PURE__ */ web.template(`<button type=button class="ml-0.5 hover:text-blue-900 dark:hover:text-blue-100">×`), _tmpl$30 = /* @__PURE__ */ web.template(`<span class="inline-flex items-center gap-1 px-2.5 py-1 text-xs font-medium bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 rounded-full"><button type=button class=hover:underline><span class="text-blue-500 dark:text-blue-400"><!$><!/>:</span> <!$><!/></button><!$><!/>`), _tmpl$31 = /* @__PURE__ */ web.template(`<div class="max-h-48 overflow-y-auto">`), _tmpl$32 = /* @__PURE__ */ web.template(`<button type=button class="mt-1 w-full px-2 py-1 text-xs text-gray-500 hover:text-gray-700 text-center">Cancel`), _tmpl$33 = /* @__PURE__ */ web.template(`<div class="absolute z-50 mt-1 left-0 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-600 rounded-lg shadow-lg p-2 min-w-[200px]">`), _tmpl$34 = /* @__PURE__ */ web.template(`<div class=relative><!$><!/><!$><!/>`), _tmpl$35 = /* @__PURE__ */ web.template(`<button type=button class="inline-flex items-center gap-1 px-2.5 py-1 text-xs font-medium border border-dashed border-gray-300 dark:border-gray-600 text-gray-500 dark:text-gray-400 rounded-full hover:border-blue-400 hover:text-blue-500 transition-colors">+ <!$><!/>`), _tmpl$36 = /* @__PURE__ */ web.template(`<form class="flex gap-1"><input type=text autofocus class="flex-1 px-2 py-1 text-sm border border-gray-200 dark:border-gray-600 rounded bg-white dark:bg-gray-700 text-gray-900 dark:text-white focus:border-blue-400 outline-none"><button type=submit class="px-2 py-1 text-xs bg-blue-600 text-white rounded hover:bg-blue-700">OK</button><button type=button class="px-2 py-1 text-xs text-gray-500 hover:text-gray-700">Cancel`), _tmpl$37 = /* @__PURE__ */ web.template(`<span class=ml-1>โ`), _tmpl$38 = /* @__PURE__ */ web.template(`<button type=button><!$><!/><!$><!/>`), _tmpl$39 = /* @__PURE__ */ web.template(`<p class="text-xs text-gray-500 dark:text-gray-400"><!$><!/> champ<!$><!/> prรฉ-rempli<!$><!/> sur <!$><!/>`), _tmpl$40 = /* @__PURE__ */ web.template(`<div class="flex items-center gap-3 p-2 bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 rounded-md text-sm"><span class="text-blue-700 dark:text-blue-300"><!$><!/> in <!$><!/>s...</span><button type=button class="text-blue-600 dark:text-blue-400 underline hover:text-blue-800 dark:hover:text-blue-200">Cancel`), _tmpl$41 = /* @__PURE__ */ web.template(`<form class="flex flex-col gap-3"><!$><!/><!$><!/><!$><!/><div class="flex justify-end"><button type=submit class="px-4 py-2 text-sm font-medium rounded-lg text-white bg-blue-600 hover:bg-blue-700 transition-colors">`), _tmpl$42 = /* @__PURE__ */ web.template(`<div class="flex items-center gap-3 p-3 bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 rounded-lg text-sm"><span class="flex-1 text-blue-800 dark:text-blue-200 font-medium"></span><span class="text-blue-600 dark:text-blue-300"><!$><!/>s...</span><button type=button class="text-blue-600 dark:text-blue-400 underline text-xs">Modifier</button><button type=button class="text-gray-400 hover:text-gray-600 dark:hover:text-gray-300">×`), _tmpl$43 = /* @__PURE__ */ web.template(`<div class=pl-2>routing: <!$><!/> via <!$><!/> (<!$><!/>ms)`), _tmpl$44 = /* @__PURE__ */ web.template(`<div class="pl-2 text-amber-500">missing: <!$><!/>`), _tmpl$45 = /* @__PURE__ */ web.template(`<div class="pt-1 border-t border-gray-200 dark:border-gray-600"><div class="font-medium text-gray-800 dark:text-gray-200">Server _debug:</div><!$><!/><!$><!/><!$><!/>`), _tmpl$46 = /* @__PURE__ */ web.template(`<pre class="mt-1 p-2 bg-gray-50 dark:bg-gray-900 rounded max-h-48 overflow-auto text-[10px]">`), _tmpl$47 = /* @__PURE__ */ web.template(`<div class="px-3 pb-3 space-y-2 text-gray-600 dark:text-gray-400 border-t border-gray-200 dark:border-gray-700 pt-2"><div>Fields: <!$><!/> total, <!$><!/> prefilled</div><!$><!/><div class="pt-1 border-t border-gray-200 dark:border-gray-600">autoSubmit: <!$><!/><!$><!/><div> reason: <!$><!/></div></div><!$><!/><div class="pt-1 border-t border-gray-200 dark:border-gray-600"><button type=button class="text-blue-500 hover:text-blue-700 underline"><!$><!/> raw SSE payload</button><!$><!/>`), _tmpl$48 = /* @__PURE__ */ web.template(`<div class="mt-2 border border-gray-200 dark:border-gray-700 rounded-md text-xs font-mono"><button type=button class="w-full px-3 py-1.5 text-left text-gray-500 dark:text-gray-400 hover:bg-gray-50 dark:hover:bg-gray-800 flex items-center gap-1"><span></span>Debug trace (<!$><!/>/<!$><!/> prefilled)</button><!$><!/>`), _tmpl$49 = /* @__PURE__ */ web.template(`<div> prefill: <!$><!/>`), _tmpl$50 = /* @__PURE__ */ web.template(`<div class=text-amber-500> prefill: (none)`), _tmpl$51 = /* @__PURE__ */ web.template(`<div> source: <!$><!/>`), _tmpl$52 = /* @__PURE__ */ web.template(`<div> displayHint: "<!$><!/>"`), _tmpl$53 = /* @__PURE__ */ web.template(`<div> muted: true`), _tmpl$54 = /* @__PURE__ */ web.template(`<div> prefillMode: <!$><!/>`), _tmpl$55 = /* @__PURE__ */ web.template(`<div> valueFormat: /<!$><!/>/`), _tmpl$56 = /* @__PURE__ */ web.template(`<div class="pl-2 border-l-2 border-gray-200 dark:border-gray-600 space-y-0.5"><div class="text-gray-800 dark:text-gray-200 font-medium"><!$><!/>:</div><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/>`), _tmpl$57 = /* @__PURE__ */ web.template(`<div>โ submitted: <!$><!/>`), _tmpl$58 = /* @__PURE__ */ web.template(`<div class=pl-2><!$><!/>: <!$><!/> "<!$><!/>" โ "<!$><!/>" (<!$><!/>ms)`), _tmpl$59 = /* @__PURE__ */ web.template(`<div class="flex justify-end"><button type=button class="px-3 py-1.5 text-sm font-medium text-blue-600 dark:text-blue-400 hover:bg-blue-50 dark:hover:bg-blue-900/20 rounded-lg transition-colors flex items-center gap-1">Next <svg class="w-3.5 h-3.5"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M9 5l7 7-7 7">`), _tmpl$60 = /* @__PURE__ */ web.template(`<div class=space-y-3><!$><!/><!$><!/>`), _tmpl$61 = /* @__PURE__ */ web.template(`<span class="text-xs font-normal text-gray-500 dark:text-gray-400">โ <!$><!/>`), _tmpl$62 = /* @__PURE__ */ web.template(`<div class="mt-2 ml-6">`), _tmpl$63 = /* @__PURE__ */ web.template(`<div><div><span></span><!$><!/><!$><!/></div><!$><!/>`), _tmpl$64 = /* @__PURE__ */ web.template(`<p class="text-sm font-medium text-gray-800 dark:text-gray-200 mb-2">`), _tmpl$65 = /* @__PURE__ */ web.template(`<span class=text-amber-600>(<!$><!/> unverified)`), _tmpl$66 = /* @__PURE__ */ web.template(`<div class="mb-2 flex items-center gap-2 text-xs"><span><!$><!/>% verified</span><!$><!/>`), _tmpl$67 = /* @__PURE__ */ web.template(`<div><!$><!/><!$><!/><!$><!/><div class="flex flex-wrap gap-2">`), _tmpl$68 = /* @__PURE__ */ web.template(`<span class="font-medium text-gray-800 dark:text-gray-200">`), _tmpl$69 = /* @__PURE__ */ web.template(`<span class=ml-1>— <!$><!/>`), _tmpl$70 = /* @__PURE__ */ web.template(`<div class="mb-2 p-2 rounded bg-gray-50 dark:bg-gray-800 border border-gray-200 dark:border-gray-700 text-xs text-gray-600 dark:text-gray-400"><!$><!/><!$><!/>`), _tmpl$71 = /* @__PURE__ */ web.template(`<span class=mr-1>`), _tmpl$72 = /* @__PURE__ */ web.template(`<div class=space-y-2><div class=space-y-1.5></div><!$><!/>`), _tmpl$73 = /* @__PURE__ */ web.template(`<div class="flex items-center gap-2 text-sm"><span></span><span class="text-gray-900 dark:text-white">`), _tmpl$74 = /* @__PURE__ */ web.template(`<div class="flex items-start gap-1.5 text-xs text-amber-600 dark:text-amber-400"><span class=flex-shrink-0>โ ๏ธ</span><span>`), _tmpl$75 = /* @__PURE__ */ web.template(`<span class=italic>— <!$><!/>`), _tmpl$76 = /* @__PURE__ */ web.template(`<div class="flex items-center gap-2 text-xs text-gray-500 dark:text-gray-400"><span><!$><!/> <!$><!/></span><!$><!/>`), _tmpl$77 = /* @__PURE__ */ web.template(`<div class="flex flex-wrap gap-2">`), _tmpl$78 = /* @__PURE__ */ web.template(`<div class="flex gap-1"><input type=text class="flex-1 px-3 py-2 text-sm border border-gray-200 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-700 text-gray-900 dark:text-white focus:border-blue-400 outline-none"><button type=button class="px-3 py-2 text-sm bg-blue-600 text-white rounded-lg hover:bg-blue-700">Send`), _tmpl$79 = /* @__PURE__ */ web.template(`<div class=space-y-3><p class="text-sm text-gray-700 dark:text-gray-300"></p><!$><!/><!$><!/>`), _tmpl$80 = /* @__PURE__ */ web.template(`<span>`), _tmpl$81 = /* @__PURE__ */ web.template(`<p class="text-xs text-gray-500 dark:text-gray-400 italic">"<!$><!/>"`), _tmpl$82 = /* @__PURE__ */ web.template(`<div class="mt-2 px-3 py-2 bg-blue-50 dark:bg-blue-900/10 rounded-lg text-sm text-blue-700 dark:text-blue-300"><span class=font-medium>Plan:</span> <!$><!/>`), _tmpl$83 = /* @__PURE__ */ web.template(`<button type=button class="text-xs text-blue-600 dark:text-blue-400 hover:underline flex items-center gap-1">✎ Modify`), _tmpl$84 = /* @__PURE__ */ web.template(`<div class=space-y-2><!$><!/><div class=space-y-1></div><!$><!/><!$><!/>`), _tmpl$85 = /* @__PURE__ */ web.template(`<div class="flex gap-2 text-sm"><span class="text-gray-500 dark:text-gray-400 font-medium min-w-[80px]"><!$><!/>:</span><span class="text-gray-900 dark:text-white">`), _tmpl$86 = /* @__PURE__ */ web.template(`<div class="flex items-center gap-1 flex-wrap">`), _tmpl$87 = /* @__PURE__ */ web.template(`<div class=space-y-2>`), _tmpl$88 = /* @__PURE__ */ web.template(`<span class="ml-1 text-xs text-gray-500 dark:text-gray-400">โ <!$><!/>`), _tmpl$89 = /* @__PURE__ */ web.template(`<span class="ml-1 text-xs text-gray-400">(<!$><!/>ms)`), _tmpl$90 = /* @__PURE__ */ web.template(`<div><span class=flex-shrink-0></span><div><span></span><!$><!/><!$><!/>`), _tmpl$91 = /* @__PURE__ */ web.template(`<span class="text-[10px] opacity-75">`), _tmpl$92 = /* @__PURE__ */ web.template(`<div><span></span><span></span><!$><!/>`), _tmpl$93 = /* @__PURE__ */ web.template(`<button type=button>🔄 <!$><!/>`), _tmpl$94 = /* @__PURE__ */ web.template(`<button type=button class="px-2 py-1 text-xs opacity-70 hover:opacity-100">▶ Details`), _tmpl$95 = /* @__PURE__ */ web.template(`<pre class="mt-2 text-xs opacity-70 overflow-x-auto">`), _tmpl$96 = /* @__PURE__ */ web.template(`<div><div class="flex items-start gap-2"><span class=flex-shrink-0></span><div class=flex-1><p></p><div class="flex gap-2 mt-2"><!$><!/><!$><!/></div><!$><!/>`), _tmpl$97 = /* @__PURE__ */ web.template(`<span class="text-xs font-bold text-blue-600 dark:text-blue-400"><!$><!/> results`), _tmpl$98 = /* @__PURE__ */ web.template(`<p class="text-[10px] text-gray-400">`), _tmpl$99 = /* @__PURE__ */ web.template(`<div class="rounded-lg border border-gray-200 dark:border-gray-700 px-3 py-2"><div class="flex items-center justify-between mb-1.5"><span class="text-sm font-medium text-gray-900 dark:text-white"><!$><!/> <!$><!/></span><!$><!/></div><div class="flex flex-wrap gap-1.5 mb-1"></div><!$><!/>`), _tmpl$100 = /* @__PURE__ */ web.template(`<span><!$><!/> <!$><!/>`), _tmpl$101 = /* @__PURE__ */ web.template(`<div class=overflow-x-auto><table class="min-w-full text-xs"><thead><tr><th class="px-2 py-1 text-left text-gray-500 dark:text-gray-400"></th><th class="px-2 py-1 text-left font-medium text-blue-600 dark:text-blue-400"></th><th class="px-2 py-1 text-left font-medium text-purple-600 dark:text-purple-400"></th></tr></thead><tbody>`), _tmpl$102 = /* @__PURE__ */ web.template(`<tr><td class="px-2 py-1 font-mono text-gray-500 dark:text-gray-400"></td><td class="px-2 py-1 text-gray-900 dark:text-white"></td><td class="px-2 py-1 text-gray-900 dark:text-white">`);
|
|
18
|
+
</style><!$><!/>`), _tmpl$13 = /* @__PURE__ */ web.template(`<svg class="w-3 h-3 text-gray-300 dark:text-gray-600 flex-shrink-0"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M9 5l7 7-7 7">`), _tmpl$14 = /* @__PURE__ */ web.template(`<span class="ml-1 font-normal opacity-75">โ <!$><!/>`), _tmpl$15 = /* @__PURE__ */ web.template(`<span><!$><!/> <!$><!/><!$><!/>`), _tmpl$16 = /* @__PURE__ */ web.template(`<div><span class="flex-shrink-0 mt-0.5"></span><p>`), _tmpl$17 = /* @__PURE__ */ web.template(`<div class="flex items-center gap-2 mb-2"><span class="text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wide"></span><span class="px-1.5 py-0.5 text-xs font-bold bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 rounded">`), _tmpl$18 = /* @__PURE__ */ web.template(`<p class="text-sm text-gray-700 dark:text-gray-300">`), _tmpl$19 = /* @__PURE__ */ web.template(`<div class="mt-2 overflow-x-auto"><table class="min-w-full text-xs"><thead><tr></tr></thead><tbody>`), _tmpl$20 = /* @__PURE__ */ web.template(`<th class="px-2 py-1 text-left font-medium text-gray-500 dark:text-gray-400">`), _tmpl$21 = /* @__PURE__ */ web.template(`<tr class="border-t border-gray-100 dark:border-gray-700">`), _tmpl$22 = /* @__PURE__ */ web.template(`<td class="px-2 py-1 text-gray-700 dark:text-gray-300">`), _tmpl$23 = /* @__PURE__ */ web.template(`<pre class="text-xs text-gray-500 overflow-auto">`), _tmpl$24 = /* @__PURE__ */ web.template(`<div class="px-4 py-3 animate-[slideDown_0.2s_ease-out]"><h4 class="text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wide mb-2"></h4><!$><!/>`), _tmpl$25 = /* @__PURE__ */ web.template(`<div class=space-y-1>`), _tmpl$26 = /* @__PURE__ */ web.template(`<div class="flex gap-2 text-xs"><span class="text-gray-500 dark:text-gray-400 font-mono min-w-[120px]"><!$><!/>:</span><span class="text-gray-900 dark:text-white">`), _tmpl$27 = /* @__PURE__ */ web.template(`<p class="text-xs text-gray-400 italic">`), _tmpl$28 = /* @__PURE__ */ web.template(`<div class="flex flex-wrap gap-1.5"><!$><!/><!$><!/>`), _tmpl$29 = /* @__PURE__ */ web.template(`<button type=button class="ml-0.5 hover:text-blue-900 dark:hover:text-blue-100">×`), _tmpl$30 = /* @__PURE__ */ web.template(`<span class="inline-flex items-center gap-1 px-2.5 py-1 text-xs font-medium bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 rounded-full"><button type=button class=hover:underline><span class="text-blue-500 dark:text-blue-400"><!$><!/>:</span> <!$><!/></button><!$><!/>`), _tmpl$31 = /* @__PURE__ */ web.template(`<div class="max-h-48 overflow-y-auto">`), _tmpl$32 = /* @__PURE__ */ web.template(`<button type=button class="mt-1 w-full px-2 py-1 text-xs text-gray-500 hover:text-gray-700 text-center">`), _tmpl$33 = /* @__PURE__ */ web.template(`<div class="absolute z-50 mt-1 left-0 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-600 rounded-lg shadow-lg p-2 min-w-[200px]">`), _tmpl$34 = /* @__PURE__ */ web.template(`<div class=relative><!$><!/><!$><!/>`), _tmpl$35 = /* @__PURE__ */ web.template(`<button type=button class="inline-flex items-center gap-1 px-2.5 py-1 text-xs font-medium border border-dashed border-gray-300 dark:border-gray-600 text-gray-500 dark:text-gray-400 rounded-full hover:border-blue-400 hover:text-blue-500 transition-colors">+ <!$><!/>`), _tmpl$36 = /* @__PURE__ */ web.template(`<form class="flex gap-1"><input type=text autofocus class="flex-1 px-2 py-1 text-sm border border-gray-200 dark:border-gray-600 rounded bg-white dark:bg-gray-700 text-gray-900 dark:text-white focus:border-blue-400 outline-none"><button type=submit class="px-2 py-1 text-xs bg-blue-600 text-white rounded hover:bg-blue-700"></button><button type=button class="px-2 py-1 text-xs text-gray-500 hover:text-gray-700">`), _tmpl$37 = /* @__PURE__ */ web.template(`<span class=ml-1>โ`), _tmpl$38 = /* @__PURE__ */ web.template(`<button type=button><!$><!/><!$><!/>`), _tmpl$39 = /* @__PURE__ */ web.template(`<p class="text-xs text-gray-500 dark:text-gray-400">`), _tmpl$40 = /* @__PURE__ */ web.template(`<div class="flex items-center gap-3 p-2 bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 rounded-md text-sm"><span class="text-blue-700 dark:text-blue-300"></span><button type=button class="text-blue-600 dark:text-blue-400 underline hover:text-blue-800 dark:hover:text-blue-200">`), _tmpl$41 = /* @__PURE__ */ web.template(`<form class="flex flex-col gap-3"><!$><!/><!$><!/><!$><!/><div class="flex justify-end"><button type=submit class="px-4 py-2 text-sm font-medium rounded-lg text-white bg-blue-600 hover:bg-blue-700 transition-colors">`), _tmpl$42 = /* @__PURE__ */ web.template(`<div class="flex items-center gap-3 p-3 bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 rounded-lg text-sm"><span class="flex-1 text-blue-800 dark:text-blue-200 font-medium"></span><span class="text-blue-600 dark:text-blue-300"><!$><!/>s...</span><button type=button class="text-blue-600 dark:text-blue-400 underline text-xs"></button><button type=button class="text-gray-400 hover:text-gray-600 dark:hover:text-gray-300">×`), _tmpl$43 = /* @__PURE__ */ web.template(`<div class=pl-2>routing: <!$><!/> via <!$><!/> (<!$><!/>ms)`), _tmpl$44 = /* @__PURE__ */ web.template(`<div class="pl-2 text-amber-500">missing: <!$><!/>`), _tmpl$45 = /* @__PURE__ */ web.template(`<div class="pt-1 border-t border-gray-200 dark:border-gray-600"><div class="font-medium text-gray-800 dark:text-gray-200">Server _debug:</div><!$><!/><!$><!/><!$><!/>`), _tmpl$46 = /* @__PURE__ */ web.template(`<pre class="mt-1 p-2 bg-gray-50 dark:bg-gray-900 rounded max-h-48 overflow-auto text-[10px]">`), _tmpl$47 = /* @__PURE__ */ web.template(`<div class="px-3 pb-3 space-y-2 text-gray-600 dark:text-gray-400 border-t border-gray-200 dark:border-gray-700 pt-2"><div>Fields: <!$><!/> total, <!$><!/> prefilled</div><!$><!/><div class="pt-1 border-t border-gray-200 dark:border-gray-600">autoSubmit: <!$><!/><!$><!/><div> reason: <!$><!/></div></div><!$><!/><div class="pt-1 border-t border-gray-200 dark:border-gray-600"><button type=button class="text-blue-500 hover:text-blue-700 underline"></button><!$><!/>`), _tmpl$48 = /* @__PURE__ */ web.template(`<div class="mt-2 border border-gray-200 dark:border-gray-700 rounded-md text-xs font-mono"><button type=button class="w-full px-3 py-1.5 text-left text-gray-500 dark:text-gray-400 hover:bg-gray-50 dark:hover:bg-gray-800 flex items-center gap-1"><span></span>Debug trace (<!$><!/>/<!$><!/> prefilled)</button><!$><!/>`), _tmpl$49 = /* @__PURE__ */ web.template(`<div> prefill: <!$><!/>`), _tmpl$50 = /* @__PURE__ */ web.template(`<div class=text-amber-500> prefill: (none)`), _tmpl$51 = /* @__PURE__ */ web.template(`<div> source: <!$><!/>`), _tmpl$52 = /* @__PURE__ */ web.template(`<div> displayHint: "<!$><!/>"`), _tmpl$53 = /* @__PURE__ */ web.template(`<div> muted: true`), _tmpl$54 = /* @__PURE__ */ web.template(`<div> prefillMode: <!$><!/>`), _tmpl$55 = /* @__PURE__ */ web.template(`<div> valueFormat: /<!$><!/>/`), _tmpl$56 = /* @__PURE__ */ web.template(`<div class="pl-2 border-l-2 border-gray-200 dark:border-gray-600 space-y-0.5"><div class="text-gray-800 dark:text-gray-200 font-medium"><!$><!/>:</div><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/>`), _tmpl$57 = /* @__PURE__ */ web.template(`<div>โ submitted: <!$><!/>`), _tmpl$58 = /* @__PURE__ */ web.template(`<div class=pl-2><!$><!/>: <!$><!/> "<!$><!/>" โ "<!$><!/>" (<!$><!/>ms)`), _tmpl$59 = /* @__PURE__ */ web.template(`<div class="flex justify-end"><button type=button class="px-3 py-1.5 text-sm font-medium text-blue-600 dark:text-blue-400 hover:bg-blue-50 dark:hover:bg-blue-900/20 rounded-lg transition-colors flex items-center gap-1"><!$><!/> <svg class="w-3.5 h-3.5"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M9 5l7 7-7 7">`), _tmpl$60 = /* @__PURE__ */ web.template(`<div class=space-y-3><!$><!/><!$><!/>`), _tmpl$61 = /* @__PURE__ */ web.template(`<span class="text-xs font-normal text-gray-500 dark:text-gray-400">โ <!$><!/>`), _tmpl$62 = /* @__PURE__ */ web.template(`<div class="mt-2 ml-6">`), _tmpl$63 = /* @__PURE__ */ web.template(`<div><div><span></span><!$><!/><!$><!/></div><!$><!/>`), _tmpl$64 = /* @__PURE__ */ web.template(`<p class="text-sm font-medium text-gray-800 dark:text-gray-200 mb-2">`), _tmpl$65 = /* @__PURE__ */ web.template(`<span class=text-amber-600>`), _tmpl$66 = /* @__PURE__ */ web.template(`<div class="mb-2 flex items-center gap-2 text-xs"><span></span><!$><!/>`), _tmpl$67 = /* @__PURE__ */ web.template(`<div><!$><!/><!$><!/><!$><!/><div class="flex flex-wrap gap-2">`), _tmpl$68 = /* @__PURE__ */ web.template(`<span class="font-medium text-gray-800 dark:text-gray-200">`), _tmpl$69 = /* @__PURE__ */ web.template(`<span class=ml-1>— <!$><!/>`), _tmpl$70 = /* @__PURE__ */ web.template(`<div class="mb-2 p-2 rounded bg-gray-50 dark:bg-gray-800 border border-gray-200 dark:border-gray-700 text-xs text-gray-600 dark:text-gray-400"><!$><!/><!$><!/>`), _tmpl$71 = /* @__PURE__ */ web.template(`<span class=mr-1>`), _tmpl$72 = /* @__PURE__ */ web.template(`<div class=space-y-2><div class=space-y-1.5></div><!$><!/>`), _tmpl$73 = /* @__PURE__ */ web.template(`<div class="flex items-center gap-2 text-sm"><span></span><span class="text-gray-900 dark:text-white">`), _tmpl$74 = /* @__PURE__ */ web.template(`<div class="flex items-start gap-1.5 text-xs text-amber-600 dark:text-amber-400"><span class=flex-shrink-0>โ ๏ธ</span><span>`), _tmpl$75 = /* @__PURE__ */ web.template(`<span class=italic>— <!$><!/>`), _tmpl$76 = /* @__PURE__ */ web.template(`<div class="flex items-center gap-2 text-xs text-gray-500 dark:text-gray-400"><span><!$><!/> <!$><!/></span><!$><!/>`), _tmpl$77 = /* @__PURE__ */ web.template(`<div class="flex flex-wrap gap-2">`), _tmpl$78 = /* @__PURE__ */ web.template(`<div class="flex gap-1"><input type=text class="flex-1 px-3 py-2 text-sm border border-gray-200 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-700 text-gray-900 dark:text-white focus:border-blue-400 outline-none"><button type=button class="px-3 py-2 text-sm bg-blue-600 text-white rounded-lg hover:bg-blue-700">`), _tmpl$79 = /* @__PURE__ */ web.template(`<div class=space-y-3><p class="text-sm text-gray-700 dark:text-gray-300"></p><!$><!/><!$><!/>`), _tmpl$80 = /* @__PURE__ */ web.template(`<span>`), _tmpl$81 = /* @__PURE__ */ web.template(`<p class="text-xs text-gray-500 dark:text-gray-400 italic">"<!$><!/>"`), _tmpl$82 = /* @__PURE__ */ web.template(`<div class="mt-2 px-3 py-2 bg-blue-50 dark:bg-blue-900/10 rounded-lg text-sm text-blue-700 dark:text-blue-300"><span class=font-medium></span> <!$><!/>`), _tmpl$83 = /* @__PURE__ */ web.template(`<button type=button class="text-xs text-blue-600 dark:text-blue-400 hover:underline flex items-center gap-1">✎ <!$><!/>`), _tmpl$84 = /* @__PURE__ */ web.template(`<div class=space-y-2><!$><!/><div class=space-y-1></div><!$><!/><!$><!/>`), _tmpl$85 = /* @__PURE__ */ web.template(`<div class="flex gap-2 text-sm"><span class="text-gray-500 dark:text-gray-400 font-medium min-w-[80px]"><!$><!/>:</span><span class="text-gray-900 dark:text-white">`), _tmpl$86 = /* @__PURE__ */ web.template(`<div class="flex items-center gap-1 flex-wrap">`), _tmpl$87 = /* @__PURE__ */ web.template(`<div class=space-y-2>`), _tmpl$88 = /* @__PURE__ */ web.template(`<span class="ml-1 text-xs text-gray-500 dark:text-gray-400">โ <!$><!/>`), _tmpl$89 = /* @__PURE__ */ web.template(`<span class="ml-1 text-xs text-gray-400">(<!$><!/>ms)`), _tmpl$90 = /* @__PURE__ */ web.template(`<div><span class=flex-shrink-0></span><div><span></span><!$><!/><!$><!/>`), _tmpl$91 = /* @__PURE__ */ web.template(`<span class="text-[10px] opacity-75">`), _tmpl$92 = /* @__PURE__ */ web.template(`<div><span></span><span></span><!$><!/>`), _tmpl$93 = /* @__PURE__ */ web.template(`<button type=button>🔄 <!$><!/>`), _tmpl$94 = /* @__PURE__ */ web.template(`<button type=button class="px-2 py-1 text-xs opacity-70 hover:opacity-100">▶ <!$><!/>`), _tmpl$95 = /* @__PURE__ */ web.template(`<pre class="mt-2 text-xs opacity-70 overflow-x-auto">`), _tmpl$96 = /* @__PURE__ */ web.template(`<div><div class="flex items-start gap-2"><span class=flex-shrink-0></span><div class=flex-1><p></p><div class="flex gap-2 mt-2"><!$><!/><!$><!/></div><!$><!/>`), _tmpl$97 = /* @__PURE__ */ web.template(`<span class="text-xs font-bold text-blue-600 dark:text-blue-400">`), _tmpl$98 = /* @__PURE__ */ web.template(`<p class="text-[10px] text-gray-400">`), _tmpl$99 = /* @__PURE__ */ web.template(`<div class="rounded-lg border border-gray-200 dark:border-gray-700 px-3 py-2"><div class="flex items-center justify-between mb-1.5"><span class="text-sm font-medium text-gray-900 dark:text-white"><!$><!/> <!$><!/></span><!$><!/></div><div class="flex flex-wrap gap-1.5 mb-1"></div><!$><!/>`), _tmpl$100 = /* @__PURE__ */ web.template(`<span><!$><!/> <!$><!/>`), _tmpl$101 = /* @__PURE__ */ web.template(`<div class=overflow-x-auto><table class="min-w-full text-xs"><thead><tr><th class="px-2 py-1 text-left text-gray-500 dark:text-gray-400"></th><th class="px-2 py-1 text-left font-medium text-blue-600 dark:text-blue-400"></th><th class="px-2 py-1 text-left font-medium text-purple-600 dark:text-purple-400"></th></tr></thead><tbody>`), _tmpl$102 = /* @__PURE__ */ web.template(`<tr><td class="px-2 py-1 font-mono text-gray-500 dark:text-gray-400"></td><td class="px-2 py-1 text-gray-900 dark:text-white"></td><td class="px-2 py-1 text-gray-900 dark:text-white">`);
|
|
17
19
|
const STATUS_BADGES = {
|
|
18
20
|
loading: {
|
|
19
|
-
|
|
21
|
+
labelKey: "statusLoading",
|
|
20
22
|
class: "bg-yellow-100 text-yellow-700 dark:bg-yellow-900/30 dark:text-yellow-400"
|
|
21
23
|
},
|
|
22
24
|
ready: {
|
|
23
|
-
|
|
25
|
+
labelKey: "statusActionAvailable",
|
|
24
26
|
class: "bg-cyan-100 text-cyan-700 dark:bg-cyan-900/30 dark:text-cyan-400"
|
|
25
27
|
},
|
|
26
28
|
waiting_human: {
|
|
27
|
-
|
|
29
|
+
labelKey: "statusYourTurn",
|
|
28
30
|
class: "bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400 animate-pulse"
|
|
29
31
|
},
|
|
30
32
|
processing: {
|
|
31
|
-
|
|
33
|
+
labelKey: "statusProcessing",
|
|
32
34
|
class: "bg-purple-100 text-purple-700 dark:bg-purple-900/30 dark:text-purple-400"
|
|
33
35
|
},
|
|
34
36
|
complete: {
|
|
35
|
-
|
|
37
|
+
labelKey: "statusComplete",
|
|
36
38
|
class: "bg-green-100 text-green-600 dark:bg-green-900/30 dark:text-green-400"
|
|
37
39
|
},
|
|
40
|
+
// The error badge reuses the existing `scratchpadError` key ('Error').
|
|
38
41
|
error: {
|
|
39
|
-
|
|
42
|
+
labelKey: "scratchpadError",
|
|
40
43
|
class: "bg-red-100 text-red-600 dark:bg-red-900/30 dark:text-red-400"
|
|
41
44
|
}
|
|
42
45
|
};
|
|
43
46
|
const ScratchpadPanel = (props) => {
|
|
44
47
|
var _a;
|
|
48
|
+
const strings = MCPUIStringsContext.useMCPUIStrings();
|
|
45
49
|
const [collapsed, setCollapsed] = solidJs.createSignal(false);
|
|
46
50
|
const [localPreview, setLocalPreview] = solidJs.createSignal(void 0);
|
|
47
51
|
const [loadingAction, setLoadingAction] = solidJs.createSignal(null);
|
|
@@ -152,7 +156,7 @@ const ScratchpadPanel = (props) => {
|
|
|
152
156
|
if (previewTimer) clearTimeout(previewTimer);
|
|
153
157
|
});
|
|
154
158
|
return (() => {
|
|
155
|
-
var _el$ = web.getNextElement(_tmpl$12), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$7 = _el$5.nextSibling, [_el$8, _co$] = web.getNextMarker(_el$7.nextSibling), _el$9 = _el$8.nextSibling, [_el$0, _co$2] = web.getNextMarker(_el$9.nextSibling), _el$1 = _el$3.nextSibling, _el$10 = _el$1.firstChild, _el$12 = _el$10.nextSibling, [_el$13, _co$3] = web.getNextMarker(_el$12.nextSibling), _el$
|
|
159
|
+
var _el$ = web.getNextElement(_tmpl$12), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$7 = _el$5.nextSibling, [_el$8, _co$] = web.getNextMarker(_el$7.nextSibling), _el$9 = _el$8.nextSibling, [_el$0, _co$2] = web.getNextMarker(_el$9.nextSibling), _el$1 = _el$3.nextSibling, _el$10 = _el$1.firstChild, _el$12 = _el$10.nextSibling, [_el$13, _co$3] = web.getNextMarker(_el$12.nextSibling), _el$72 = _el$2.nextSibling, [_el$73, _co$17] = web.getNextMarker(_el$72.nextSibling), _el$56 = _el$73.nextSibling, _el$74 = _el$56.nextSibling, [_el$75, _co$18] = web.getNextMarker(_el$74.nextSibling);
|
|
156
160
|
_el$2.$$click = () => isCollapsible() && setCollapsed(!collapsed());
|
|
157
161
|
web.insert(_el$5, () => props.state.title);
|
|
158
162
|
web.insert(_el$3, () => {
|
|
@@ -179,7 +183,7 @@ const ScratchpadPanel = (props) => {
|
|
|
179
183
|
return _el$6;
|
|
180
184
|
}
|
|
181
185
|
}), _el$0, _co$2);
|
|
182
|
-
web.insert(_el$10, () => badge().
|
|
186
|
+
web.insert(_el$10, () => strings[badge().labelKey]);
|
|
183
187
|
web.insert(_el$1, web.createComponent(solidJs.Show, {
|
|
184
188
|
get when() {
|
|
185
189
|
return web.memo(() => !!isClosable())() && props.onClose;
|
|
@@ -191,6 +195,7 @@ const ScratchpadPanel = (props) => {
|
|
|
191
195
|
e.stopPropagation();
|
|
192
196
|
(_a2 = props.onClose) == null ? void 0 : _a2.call(props);
|
|
193
197
|
};
|
|
198
|
+
web.effect(() => web.setAttribute(_el$11, "aria-label", strings.scratchpadClose));
|
|
194
199
|
web.runHydrationEvents();
|
|
195
200
|
return _el$11;
|
|
196
201
|
}
|
|
@@ -200,7 +205,7 @@ const ScratchpadPanel = (props) => {
|
|
|
200
205
|
return !collapsed();
|
|
201
206
|
},
|
|
202
207
|
get children() {
|
|
203
|
-
var _el$14 = web.getNextElement(_tmpl$10), _el$
|
|
208
|
+
var _el$14 = web.getNextElement(_tmpl$10), _el$46 = _el$14.firstChild, [_el$47, _co$9] = web.getNextMarker(_el$46.nextSibling), _el$16 = _el$47.nextSibling, _el$48 = _el$16.nextSibling, [_el$49, _co$0] = web.getNextMarker(_el$48.nextSibling), _el$50 = _el$49.nextSibling, [_el$51, _co$1] = web.getNextMarker(_el$50.nextSibling), _el$52 = _el$51.nextSibling, [_el$53, _co$10] = web.getNextMarker(_el$52.nextSibling), _el$54 = _el$53.nextSibling, [_el$55, _co$11] = web.getNextMarker(_el$54.nextSibling);
|
|
204
209
|
web.insert(_el$14, web.createComponent(solidJs.Show, {
|
|
205
210
|
get when() {
|
|
206
211
|
return web.memo(() => !!props.state.turnHistory)() && props.state.turnHistory.length > 0;
|
|
@@ -219,29 +224,29 @@ const ScratchpadPanel = (props) => {
|
|
|
219
224
|
return web.getNextElement(_tmpl$13);
|
|
220
225
|
}
|
|
221
226
|
}), (() => {
|
|
222
|
-
var _el$
|
|
223
|
-
web.insert(_el$
|
|
227
|
+
var _el$77 = web.getNextElement(_tmpl$15), _el$83 = _el$77.firstChild, [_el$84, _co$20] = web.getNextMarker(_el$83.nextSibling), _el$78 = _el$84.nextSibling, _el$85 = _el$78.nextSibling, [_el$86, _co$21] = web.getNextMarker(_el$85.nextSibling), _el$87 = _el$86.nextSibling, [_el$88, _co$22] = web.getNextMarker(_el$87.nextSibling);
|
|
228
|
+
web.insert(_el$77, (() => {
|
|
224
229
|
var _c$ = web.memo(() => turn.status === "done");
|
|
225
230
|
return () => _c$() ? "โ
" : turn.status === "active" ? "โ" : "โ";
|
|
226
|
-
})(), _el$
|
|
227
|
-
web.insert(_el$
|
|
228
|
-
web.insert(_el$
|
|
231
|
+
})(), _el$84, _co$20);
|
|
232
|
+
web.insert(_el$77, () => turn.label, _el$86, _co$21);
|
|
233
|
+
web.insert(_el$77, web.createComponent(solidJs.Show, {
|
|
229
234
|
get when() {
|
|
230
235
|
return turn.summary;
|
|
231
236
|
},
|
|
232
237
|
get children() {
|
|
233
|
-
var _el$
|
|
234
|
-
web.insert(_el$
|
|
235
|
-
return _el$
|
|
238
|
+
var _el$79 = web.getNextElement(_tmpl$14), _el$80 = _el$79.firstChild, _el$81 = _el$80.nextSibling, [_el$82, _co$19] = web.getNextMarker(_el$81.nextSibling);
|
|
239
|
+
web.insert(_el$79, () => turn.summary, _el$82, _co$19);
|
|
240
|
+
return _el$79;
|
|
236
241
|
}
|
|
237
|
-
}), _el$
|
|
238
|
-
web.effect(() => web.className(_el$
|
|
239
|
-
return _el$
|
|
242
|
+
}), _el$88, _co$22);
|
|
243
|
+
web.effect(() => web.className(_el$77, `text-xs font-medium px-2 py-0.5 rounded-full ${turn.status === "done" ? "bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-400" : turn.status === "active" ? "bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-400" : turn.status === "skipped" ? "bg-gray-100 dark:bg-gray-700 text-gray-400 line-through" : "bg-gray-100 dark:bg-gray-700 text-gray-400"}`));
|
|
244
|
+
return _el$77;
|
|
240
245
|
})()]
|
|
241
246
|
}));
|
|
242
247
|
return _el$15;
|
|
243
248
|
}
|
|
244
|
-
}), _el$
|
|
249
|
+
}), _el$47, _co$9);
|
|
245
250
|
web.insert(_el$16, web.createComponent(solidJs.For, {
|
|
246
251
|
get each() {
|
|
247
252
|
return props.state.sections;
|
|
@@ -277,19 +282,19 @@ const ScratchpadPanel = (props) => {
|
|
|
277
282
|
return props.state.agentMessages;
|
|
278
283
|
},
|
|
279
284
|
children: (msg) => (() => {
|
|
280
|
-
var _el$
|
|
281
|
-
web.insert(_el$
|
|
285
|
+
var _el$89 = web.getNextElement(_tmpl$16), _el$90 = _el$89.firstChild, _el$91 = _el$90.nextSibling;
|
|
286
|
+
web.insert(_el$90, (() => {
|
|
282
287
|
var _c$2 = web.memo(() => msg.type === "warning");
|
|
283
288
|
return () => _c$2() ? "โ ๏ธ" : msg.type === "question" ? "โ" : "โน๏ธ";
|
|
284
289
|
})());
|
|
285
|
-
web.insert(_el$
|
|
286
|
-
web.effect(() => web.className(_el$
|
|
287
|
-
return _el$
|
|
290
|
+
web.insert(_el$91, () => msg.text);
|
|
291
|
+
web.effect(() => web.className(_el$89, `flex items-start gap-2 text-sm rounded-lg px-3 py-2 ${msg.type === "warning" ? "bg-amber-50 dark:bg-amber-900/10 text-amber-700 dark:text-amber-400" : msg.type === "question" ? "bg-blue-50 dark:bg-blue-900/10 text-blue-700 dark:text-blue-400 border border-blue-200 dark:border-blue-800" : "bg-gray-50 dark:bg-gray-700/50 text-gray-600 dark:text-gray-400"}`));
|
|
292
|
+
return _el$89;
|
|
288
293
|
})()
|
|
289
294
|
}));
|
|
290
295
|
return _el$17;
|
|
291
296
|
}
|
|
292
|
-
}), _el$
|
|
297
|
+
}), _el$49, _co$0);
|
|
293
298
|
web.insert(_el$14, web.createComponent(solidJs.Show, {
|
|
294
299
|
get when() {
|
|
295
300
|
return preview();
|
|
@@ -302,97 +307,103 @@ const ScratchpadPanel = (props) => {
|
|
|
302
307
|
},
|
|
303
308
|
get fallback() {
|
|
304
309
|
return [(() => {
|
|
305
|
-
var _el$
|
|
306
|
-
web.insert(_el$
|
|
307
|
-
|
|
308
|
-
})(), (() => {
|
|
309
|
-
var _el$92 = web.getNextElement(_tmpl$18);
|
|
310
|
-
web.insert(_el$92, () => preview().summary);
|
|
310
|
+
var _el$92 = web.getNextElement(_tmpl$17), _el$93 = _el$92.firstChild, _el$94 = _el$93.nextSibling;
|
|
311
|
+
web.insert(_el$93, () => strings.scratchpadPreview);
|
|
312
|
+
web.insert(_el$94, () => preview().count.toLocaleString(strings.locale));
|
|
311
313
|
return _el$92;
|
|
314
|
+
})(), (() => {
|
|
315
|
+
var _el$95 = web.getNextElement(_tmpl$18);
|
|
316
|
+
web.insert(_el$95, () => preview().summary);
|
|
317
|
+
return _el$95;
|
|
312
318
|
})(), web.createComponent(solidJs.Show, {
|
|
313
319
|
get when() {
|
|
314
320
|
return web.memo(() => !!preview().rows)() && preview().rows.length > 0;
|
|
315
321
|
},
|
|
316
322
|
get children() {
|
|
317
|
-
var _el$
|
|
318
|
-
web.insert(_el$
|
|
323
|
+
var _el$96 = web.getNextElement(_tmpl$19), _el$97 = _el$96.firstChild, _el$98 = _el$97.firstChild, _el$99 = _el$98.firstChild, _el$100 = _el$98.nextSibling;
|
|
324
|
+
web.insert(_el$99, web.createComponent(solidJs.For, {
|
|
319
325
|
get each() {
|
|
320
326
|
return Object.keys(preview().rows[0]);
|
|
321
327
|
},
|
|
322
328
|
children: (k) => (() => {
|
|
323
|
-
var _el$
|
|
324
|
-
web.insert(_el$
|
|
325
|
-
return _el$
|
|
329
|
+
var _el$101 = web.getNextElement(_tmpl$20);
|
|
330
|
+
web.insert(_el$101, k);
|
|
331
|
+
return _el$101;
|
|
326
332
|
})()
|
|
327
333
|
}));
|
|
328
|
-
web.insert(_el$
|
|
334
|
+
web.insert(_el$100, web.createComponent(solidJs.For, {
|
|
329
335
|
get each() {
|
|
330
336
|
return preview().rows.slice(0, 5);
|
|
331
337
|
},
|
|
332
338
|
children: (row) => (() => {
|
|
333
|
-
var _el$
|
|
334
|
-
web.insert(_el$
|
|
339
|
+
var _el$102 = web.getNextElement(_tmpl$21);
|
|
340
|
+
web.insert(_el$102, web.createComponent(solidJs.For, {
|
|
335
341
|
get each() {
|
|
336
342
|
return Object.values(row);
|
|
337
343
|
},
|
|
338
344
|
children: (v) => (() => {
|
|
339
|
-
var _el$
|
|
340
|
-
web.insert(_el$
|
|
341
|
-
return _el$
|
|
345
|
+
var _el$103 = web.getNextElement(_tmpl$22);
|
|
346
|
+
web.insert(_el$103, () => String(v));
|
|
347
|
+
return _el$103;
|
|
342
348
|
})()
|
|
343
349
|
}));
|
|
344
|
-
return _el$
|
|
350
|
+
return _el$102;
|
|
345
351
|
})()
|
|
346
352
|
}));
|
|
347
|
-
return _el$
|
|
353
|
+
return _el$96;
|
|
348
354
|
}
|
|
349
355
|
})];
|
|
350
356
|
},
|
|
351
357
|
get children() {
|
|
352
358
|
var _el$19 = web.getNextElement(_tmpl$5), _el$20 = _el$19.firstChild, _el$21 = _el$20.nextSibling, _el$22 = _el$21.nextSibling;
|
|
359
|
+
web.insert(_el$21, () => strings.scratchpadNoResults);
|
|
353
360
|
_el$22.$$click = () => {
|
|
354
361
|
var _a2;
|
|
355
362
|
return (_a2 = props.onAction) == null ? void 0 : _a2.call(props, "refine_filters");
|
|
356
363
|
};
|
|
364
|
+
web.insert(_el$22, () => strings.scratchpadModifyFilters);
|
|
357
365
|
web.runHydrationEvents();
|
|
358
366
|
return _el$19;
|
|
359
367
|
}
|
|
360
368
|
}));
|
|
361
369
|
return _el$18;
|
|
362
370
|
}
|
|
363
|
-
}), _el$
|
|
371
|
+
}), _el$51, _co$1);
|
|
364
372
|
web.insert(_el$14, web.createComponent(solidJs.Show, {
|
|
365
373
|
get when() {
|
|
366
374
|
return web.memo(() => props.state.status === "error")() && props.state.error;
|
|
367
375
|
},
|
|
368
376
|
get children() {
|
|
369
|
-
var _el$23 = web.getNextElement(_tmpl$0), _el$24 = _el$23.firstChild, _el$25 = _el$24.firstChild, _el$26 = _el$25.nextSibling, _el$27 = _el$26.firstChild, _el$
|
|
377
|
+
var _el$23 = web.getNextElement(_tmpl$0), _el$24 = _el$23.firstChild, _el$25 = _el$24.firstChild, _el$26 = _el$25.nextSibling, _el$27 = _el$26.firstChild, _el$29 = _el$27.nextSibling, [_el$30, _co$4] = web.getNextMarker(_el$29.nextSibling), _el$31 = _el$24.nextSibling, _el$37 = _el$31.firstChild, [_el$38, _co$6] = web.getNextMarker(_el$37.nextSibling), _el$39 = _el$38.nextSibling, [_el$40, _co$7] = web.getNextMarker(_el$39.nextSibling);
|
|
370
378
|
web.insert(_el$27, () => props.state.error.message);
|
|
371
379
|
web.insert(_el$26, web.createComponent(solidJs.Show, {
|
|
372
380
|
get when() {
|
|
373
381
|
return props.state.error.code;
|
|
374
382
|
},
|
|
375
383
|
get children() {
|
|
376
|
-
var _el$28 = web.getNextElement(_tmpl$7)
|
|
377
|
-
web.insert(_el$28, () =>
|
|
384
|
+
var _el$28 = web.getNextElement(_tmpl$7);
|
|
385
|
+
web.insert(_el$28, () => formatString.formatMCPUIString(strings.scratchpadErrorCode, {
|
|
386
|
+
code: props.state.error.code
|
|
387
|
+
}));
|
|
378
388
|
return _el$28;
|
|
379
389
|
}
|
|
380
|
-
}), _el$
|
|
381
|
-
web.insert(_el$
|
|
390
|
+
}), _el$30, _co$4);
|
|
391
|
+
web.insert(_el$31, web.createComponent(solidJs.Show, {
|
|
382
392
|
get when() {
|
|
383
393
|
return props.state.error.retryable !== false;
|
|
384
394
|
},
|
|
385
395
|
get children() {
|
|
386
|
-
var _el$
|
|
387
|
-
_el$
|
|
396
|
+
var _el$32 = web.getNextElement(_tmpl$8), _el$33 = _el$32.firstChild, _el$34 = _el$33.nextSibling, [_el$35, _co$5] = web.getNextMarker(_el$34.nextSibling);
|
|
397
|
+
_el$32.$$click = () => {
|
|
388
398
|
var _a2;
|
|
389
399
|
return (_a2 = props.onRetry) == null ? void 0 : _a2.call(props);
|
|
390
400
|
};
|
|
401
|
+
web.insert(_el$32, () => strings.retry, _el$35, _co$5);
|
|
391
402
|
web.runHydrationEvents();
|
|
392
|
-
return _el$
|
|
403
|
+
return _el$32;
|
|
393
404
|
}
|
|
394
405
|
}), _el$38, _co$6);
|
|
395
|
-
web.insert(_el$
|
|
406
|
+
web.insert(_el$31, web.createComponent(solidJs.Show, {
|
|
396
407
|
get when() {
|
|
397
408
|
return props.onClose;
|
|
398
409
|
},
|
|
@@ -402,47 +413,49 @@ const ScratchpadPanel = (props) => {
|
|
|
402
413
|
var _a2;
|
|
403
414
|
return (_a2 = props.onClose) == null ? void 0 : _a2.call(props);
|
|
404
415
|
};
|
|
416
|
+
web.insert(_el$36, () => strings.scratchpadClose);
|
|
405
417
|
web.runHydrationEvents();
|
|
406
418
|
return _el$36;
|
|
407
419
|
}
|
|
408
420
|
}), _el$40, _co$7);
|
|
409
421
|
return _el$23;
|
|
410
422
|
}
|
|
411
|
-
}), _el$
|
|
423
|
+
}), _el$53, _co$10);
|
|
412
424
|
web.insert(_el$14, web.createComponent(solidJs.Show, {
|
|
413
425
|
get when() {
|
|
414
426
|
return web.memo(() => props.state.status === "waiting_human")() && hasFilters();
|
|
415
427
|
},
|
|
416
428
|
get children() {
|
|
417
|
-
var _el$41 = web.getNextElement(_tmpl$1), _el$42 = _el$41.firstChild;
|
|
429
|
+
var _el$41 = web.getNextElement(_tmpl$1), _el$42 = _el$41.firstChild, _el$43 = _el$42.firstChild, _el$44 = _el$43.nextSibling, [_el$45, _co$8] = web.getNextMarker(_el$44.nextSibling);
|
|
418
430
|
_el$42.$$click = () => handleAction("search", {
|
|
419
431
|
filters: props.state.filters
|
|
420
432
|
});
|
|
433
|
+
web.insert(_el$42, () => strings.scratchpadSearch, _el$45, _co$8);
|
|
421
434
|
web.runHydrationEvents();
|
|
422
435
|
return _el$41;
|
|
423
436
|
}
|
|
424
|
-
}), _el$
|
|
437
|
+
}), _el$55, _co$11);
|
|
425
438
|
web.effect((_$p) => web.setStyleProperty(_el$14, "max-height", props.maxHeight || "500px"));
|
|
426
439
|
return _el$14;
|
|
427
440
|
}
|
|
428
|
-
}), _el$
|
|
441
|
+
}), _el$73, _co$17);
|
|
429
442
|
web.insert(_el$, web.createComponent(solidJs.Show, {
|
|
430
443
|
get when() {
|
|
431
444
|
return props.debugOverlay;
|
|
432
445
|
},
|
|
433
446
|
get children() {
|
|
434
|
-
var _el$
|
|
435
|
-
web.insert(_el$
|
|
436
|
-
web.insert(_el$
|
|
437
|
-
web.insert(_el$
|
|
447
|
+
var _el$57 = web.getNextElement(_tmpl$11), _el$62 = _el$57.firstChild, [_el$63, _co$12] = web.getNextMarker(_el$62.nextSibling), _el$58 = _el$63.nextSibling, _el$64 = _el$58.nextSibling, [_el$65, _co$13] = web.getNextMarker(_el$64.nextSibling), _el$59 = _el$65.nextSibling, _el$66 = _el$59.nextSibling, [_el$67, _co$14] = web.getNextMarker(_el$66.nextSibling), _el$60 = _el$67.nextSibling, _el$68 = _el$60.nextSibling, [_el$69, _co$15] = web.getNextMarker(_el$68.nextSibling), _el$61 = _el$69.nextSibling, _el$70 = _el$61.nextSibling, [_el$71, _co$16] = web.getNextMarker(_el$70.nextSibling);
|
|
448
|
+
web.insert(_el$57, () => props.state.id, _el$63, _co$12);
|
|
449
|
+
web.insert(_el$57, eventCount, _el$65, _co$13);
|
|
450
|
+
web.insert(_el$57, () => {
|
|
438
451
|
var _a2;
|
|
439
452
|
return ((_a2 = props.state.sections) == null ? void 0 : _a2.length) || 0;
|
|
440
|
-
}, _el$
|
|
441
|
-
web.insert(_el$
|
|
442
|
-
web.insert(_el$
|
|
443
|
-
return _el$
|
|
453
|
+
}, _el$67, _co$14);
|
|
454
|
+
web.insert(_el$57, () => props.state.status, _el$69, _co$15);
|
|
455
|
+
web.insert(_el$57, lastEvent, _el$71, _co$16);
|
|
456
|
+
return _el$57;
|
|
444
457
|
}
|
|
445
|
-
}), _el$
|
|
458
|
+
}), _el$75, _co$18);
|
|
446
459
|
web.effect((_p$) => {
|
|
447
460
|
var _v$ = `w-full bg-white dark:bg-gray-800 rounded-xl border shadow-lg overflow-visible ${props.state.status === "waiting_human" ? "border-blue-300 dark:border-blue-600" : "border-gray-200 dark:border-gray-700"} ${props.pinned ? "sticky top-0 z-40" : ""}`, _v$2 = `flex items-center justify-between px-4 py-3 border-b border-gray-100 dark:border-gray-700 ${isCollapsible() ? "cursor-pointer select-none hover:bg-gray-50 dark:hover:bg-gray-750" : ""}`, _v$3 = `px-2 py-0.5 text-xs font-medium rounded-full ${badge().class}`;
|
|
448
461
|
_v$ !== _p$.e && web.className(_el$, _p$.e = _v$);
|
|
@@ -470,9 +483,9 @@ function parseContent(content) {
|
|
|
470
483
|
}
|
|
471
484
|
const SectionRenderer = (props) => {
|
|
472
485
|
return (() => {
|
|
473
|
-
var _el$
|
|
474
|
-
web.insert(_el$
|
|
475
|
-
web.insert(_el$
|
|
486
|
+
var _el$104 = web.getNextElement(_tmpl$24), _el$105 = _el$104.firstChild, _el$108 = _el$105.nextSibling, [_el$109, _co$23] = web.getNextMarker(_el$108.nextSibling);
|
|
487
|
+
web.insert(_el$105, () => props.section.title);
|
|
488
|
+
web.insert(_el$104, web.createComponent(solidJs.Switch, {
|
|
476
489
|
get children() {
|
|
477
490
|
return [web.createComponent(solidJs.Match, {
|
|
478
491
|
get when() {
|
|
@@ -507,9 +520,9 @@ const SectionRenderer = (props) => {
|
|
|
507
520
|
return props.section.type === "message";
|
|
508
521
|
},
|
|
509
522
|
get children() {
|
|
510
|
-
var _el$
|
|
511
|
-
web.insert(_el$
|
|
512
|
-
return _el$
|
|
523
|
+
var _el$106 = web.getNextElement(_tmpl$18);
|
|
524
|
+
web.insert(_el$106, () => String(props.section.content));
|
|
525
|
+
return _el$106;
|
|
513
526
|
}
|
|
514
527
|
}), web.createComponent(solidJs.Match, {
|
|
515
528
|
get when() {
|
|
@@ -770,40 +783,41 @@ const SectionRenderer = (props) => {
|
|
|
770
783
|
}), web.createComponent(solidJs.Match, {
|
|
771
784
|
when: true,
|
|
772
785
|
get children() {
|
|
773
|
-
var _el$
|
|
774
|
-
web.insert(_el$
|
|
775
|
-
return _el$
|
|
786
|
+
var _el$107 = web.getNextElement(_tmpl$23);
|
|
787
|
+
web.insert(_el$107, () => JSON.stringify(props.section.content, null, 2));
|
|
788
|
+
return _el$107;
|
|
776
789
|
}
|
|
777
790
|
})];
|
|
778
791
|
}
|
|
779
|
-
}), _el$
|
|
780
|
-
return _el$
|
|
792
|
+
}), _el$109, _co$23);
|
|
793
|
+
return _el$104;
|
|
781
794
|
})();
|
|
782
795
|
};
|
|
783
796
|
const DataSection = (props) => {
|
|
784
797
|
const entries = () => typeof props.content === "object" && props.content ? Object.entries(props.content) : [];
|
|
785
798
|
return (() => {
|
|
786
|
-
var _el$
|
|
787
|
-
web.insert(_el$
|
|
799
|
+
var _el$110 = web.getNextElement(_tmpl$25);
|
|
800
|
+
web.insert(_el$110, web.createComponent(solidJs.For, {
|
|
788
801
|
get each() {
|
|
789
802
|
return entries();
|
|
790
803
|
},
|
|
791
804
|
children: ([k, v]) => (() => {
|
|
792
|
-
var _el$
|
|
793
|
-
_el$
|
|
794
|
-
var _el$
|
|
795
|
-
web.insert(_el$
|
|
796
|
-
web.insert(_el$
|
|
805
|
+
var _el$111 = web.getNextElement(_tmpl$26), _el$112 = _el$111.firstChild, _el$114 = _el$112.firstChild, [_el$115, _co$24] = web.getNextMarker(_el$114.nextSibling);
|
|
806
|
+
_el$115.nextSibling;
|
|
807
|
+
var _el$116 = _el$112.nextSibling;
|
|
808
|
+
web.insert(_el$112, k, _el$115, _co$24);
|
|
809
|
+
web.insert(_el$116, (() => {
|
|
797
810
|
var _c$3 = web.memo(() => !!Array.isArray(v));
|
|
798
811
|
return () => _c$3() ? v.join(", ") : String(v);
|
|
799
812
|
})());
|
|
800
|
-
return _el$
|
|
813
|
+
return _el$111;
|
|
801
814
|
})()
|
|
802
815
|
}));
|
|
803
|
-
return _el$
|
|
816
|
+
return _el$110;
|
|
804
817
|
})();
|
|
805
818
|
};
|
|
806
819
|
const InteractiveFilterSection = (props) => {
|
|
820
|
+
const strings = MCPUIStringsContext.useMCPUIStrings();
|
|
807
821
|
const [editingKey, setEditingKey] = solidJs.createSignal(null);
|
|
808
822
|
const [editValue, setEditValue] = solidJs.createSignal("");
|
|
809
823
|
const filterDefs = () => {
|
|
@@ -834,8 +848,8 @@ const InteractiveFilterSection = (props) => {
|
|
|
834
848
|
};
|
|
835
849
|
const getDef = (key) => filterDefs()[key] || {};
|
|
836
850
|
return (() => {
|
|
837
|
-
var _el$
|
|
838
|
-
web.insert(_el$
|
|
851
|
+
var _el$117 = web.getNextElement(_tmpl$28), _el$119 = _el$117.firstChild, [_el$120, _co$25] = web.getNextMarker(_el$119.nextSibling), _el$121 = _el$120.nextSibling, [_el$122, _co$26] = web.getNextMarker(_el$121.nextSibling);
|
|
852
|
+
web.insert(_el$117, web.createComponent(solidJs.For, {
|
|
839
853
|
get each() {
|
|
840
854
|
return allKeys();
|
|
841
855
|
},
|
|
@@ -844,145 +858,153 @@ const InteractiveFilterSection = (props) => {
|
|
|
844
858
|
const value = () => props.filters[key];
|
|
845
859
|
const hasValue = () => value() !== void 0 && value() !== "";
|
|
846
860
|
return (() => {
|
|
847
|
-
var _el$
|
|
848
|
-
web.insert(_el$
|
|
861
|
+
var _el$123 = web.getNextElement(_tmpl$34), _el$139 = _el$123.firstChild, [_el$140, _co$30] = web.getNextMarker(_el$139.nextSibling), _el$141 = _el$140.nextSibling, [_el$142, _co$31] = web.getNextMarker(_el$141.nextSibling);
|
|
862
|
+
web.insert(_el$123, web.createComponent(solidJs.Show, {
|
|
849
863
|
get when() {
|
|
850
864
|
return hasValue();
|
|
851
865
|
},
|
|
852
866
|
get fallback() {
|
|
853
867
|
return (() => {
|
|
854
|
-
var _el$
|
|
855
|
-
_el$
|
|
868
|
+
var _el$143 = web.getNextElement(_tmpl$35), _el$144 = _el$143.firstChild, _el$145 = _el$144.nextSibling, [_el$146, _co$32] = web.getNextMarker(_el$145.nextSibling);
|
|
869
|
+
_el$143.$$click = () => {
|
|
856
870
|
setEditingKey(key);
|
|
857
871
|
setEditValue("");
|
|
858
872
|
};
|
|
859
|
-
web.insert(_el$
|
|
873
|
+
web.insert(_el$143, () => {
|
|
860
874
|
var _a;
|
|
861
875
|
return ((_a = def()) == null ? void 0 : _a.label) || key;
|
|
862
|
-
}, _el$
|
|
876
|
+
}, _el$146, _co$32);
|
|
863
877
|
web.runHydrationEvents();
|
|
864
|
-
return _el$
|
|
878
|
+
return _el$143;
|
|
865
879
|
})();
|
|
866
880
|
},
|
|
867
881
|
get children() {
|
|
868
|
-
var _el$
|
|
869
|
-
_el$
|
|
870
|
-
var _el$
|
|
871
|
-
_el$
|
|
882
|
+
var _el$124 = web.getNextElement(_tmpl$30), _el$125 = _el$124.firstChild, _el$126 = _el$125.firstChild, _el$128 = _el$126.firstChild, [_el$129, _co$27] = web.getNextMarker(_el$128.nextSibling);
|
|
883
|
+
_el$129.nextSibling;
|
|
884
|
+
var _el$130 = _el$126.nextSibling, _el$131 = _el$130.nextSibling, [_el$132, _co$28] = web.getNextMarker(_el$131.nextSibling), _el$134 = _el$125.nextSibling, [_el$135, _co$29] = web.getNextMarker(_el$134.nextSibling);
|
|
885
|
+
_el$125.$$click = () => {
|
|
872
886
|
setEditingKey(key);
|
|
873
887
|
setEditValue(String(value() || ""));
|
|
874
888
|
};
|
|
875
|
-
web.insert(_el$
|
|
889
|
+
web.insert(_el$126, () => {
|
|
876
890
|
var _a;
|
|
877
891
|
return ((_a = def()) == null ? void 0 : _a.label) || key;
|
|
878
|
-
}, _el$
|
|
879
|
-
web.insert(_el$
|
|
892
|
+
}, _el$129, _co$27);
|
|
893
|
+
web.insert(_el$125, (() => {
|
|
880
894
|
var _c$4 = web.memo(() => !!Array.isArray(value()));
|
|
881
895
|
return () => _c$4() ? value().join(", ") : String(value());
|
|
882
|
-
})(), _el$
|
|
883
|
-
web.insert(_el$
|
|
896
|
+
})(), _el$132, _co$28);
|
|
897
|
+
web.insert(_el$124, web.createComponent(solidJs.Show, {
|
|
884
898
|
get when() {
|
|
885
899
|
return props.onFilterChange;
|
|
886
900
|
},
|
|
887
901
|
get children() {
|
|
888
|
-
var _el$
|
|
889
|
-
_el$
|
|
890
|
-
web.setAttribute(_el$
|
|
902
|
+
var _el$133 = web.getNextElement(_tmpl$29);
|
|
903
|
+
_el$133.$$click = () => removeFilter(key);
|
|
904
|
+
web.effect(() => web.setAttribute(_el$133, "aria-label", formatString.formatMCPUIString(strings.removeItem, {
|
|
905
|
+
name: key
|
|
906
|
+
})));
|
|
891
907
|
web.runHydrationEvents();
|
|
892
|
-
return _el$
|
|
908
|
+
return _el$133;
|
|
893
909
|
}
|
|
894
|
-
}), _el$
|
|
910
|
+
}), _el$135, _co$29);
|
|
895
911
|
web.runHydrationEvents();
|
|
896
|
-
return _el$
|
|
912
|
+
return _el$124;
|
|
897
913
|
}
|
|
898
|
-
}), _el$
|
|
899
|
-
web.insert(_el$
|
|
914
|
+
}), _el$140, _co$30);
|
|
915
|
+
web.insert(_el$123, web.createComponent(solidJs.Show, {
|
|
900
916
|
get when() {
|
|
901
917
|
return editingKey() === key;
|
|
902
918
|
},
|
|
903
919
|
get children() {
|
|
904
|
-
var _el$
|
|
905
|
-
web.insert(_el$
|
|
920
|
+
var _el$136 = web.getNextElement(_tmpl$33);
|
|
921
|
+
web.insert(_el$136, web.createComponent(solidJs.Show, {
|
|
906
922
|
get when() {
|
|
907
923
|
var _a;
|
|
908
924
|
return (_a = def()) == null ? void 0 : _a.options;
|
|
909
925
|
},
|
|
910
926
|
get fallback() {
|
|
911
927
|
return (() => {
|
|
912
|
-
var _el$
|
|
913
|
-
_el$
|
|
928
|
+
var _el$147 = web.getNextElement(_tmpl$36), _el$148 = _el$147.firstChild, _el$149 = _el$148.nextSibling, _el$150 = _el$149.nextSibling;
|
|
929
|
+
_el$147.addEventListener("submit", (e) => {
|
|
914
930
|
e.preventDefault();
|
|
915
931
|
setFilter(key, editValue());
|
|
916
932
|
});
|
|
917
|
-
_el$
|
|
918
|
-
_el$
|
|
933
|
+
_el$148.$$input = (e) => setEditValue(e.currentTarget.value);
|
|
934
|
+
web.insert(_el$149, () => strings.ok);
|
|
935
|
+
_el$150.$$click = () => setEditingKey(null);
|
|
936
|
+
web.insert(_el$150, () => strings.cancel);
|
|
919
937
|
web.effect(() => {
|
|
920
938
|
var _a;
|
|
921
|
-
return web.setAttribute(_el$
|
|
939
|
+
return web.setAttribute(_el$148, "placeholder", ((_a = def()) == null ? void 0 : _a.placeholder) || key);
|
|
922
940
|
});
|
|
923
|
-
web.effect(() => web.setProperty(_el$
|
|
941
|
+
web.effect(() => web.setProperty(_el$148, "value", editValue()));
|
|
924
942
|
web.runHydrationEvents();
|
|
925
|
-
return _el$
|
|
943
|
+
return _el$147;
|
|
926
944
|
})();
|
|
927
945
|
},
|
|
928
946
|
get children() {
|
|
929
947
|
return [(() => {
|
|
930
|
-
var _el$
|
|
931
|
-
web.insert(_el$
|
|
948
|
+
var _el$137 = web.getNextElement(_tmpl$31);
|
|
949
|
+
web.insert(_el$137, web.createComponent(solidJs.For, {
|
|
932
950
|
get each() {
|
|
933
951
|
return def().options;
|
|
934
952
|
},
|
|
935
953
|
children: (opt) => (() => {
|
|
936
|
-
var _el$
|
|
937
|
-
_el$
|
|
938
|
-
web.insert(_el$
|
|
939
|
-
web.insert(_el$
|
|
954
|
+
var _el$151 = web.getNextElement(_tmpl$38), _el$153 = _el$151.firstChild, [_el$154, _co$33] = web.getNextMarker(_el$153.nextSibling), _el$155 = _el$154.nextSibling, [_el$156, _co$34] = web.getNextMarker(_el$155.nextSibling);
|
|
955
|
+
_el$151.$$click = () => setFilter(key, opt.value);
|
|
956
|
+
web.insert(_el$151, () => opt.label, _el$154, _co$33);
|
|
957
|
+
web.insert(_el$151, web.createComponent(solidJs.Show, {
|
|
940
958
|
get when() {
|
|
941
959
|
return String(value()) === opt.value;
|
|
942
960
|
},
|
|
943
961
|
get children() {
|
|
944
962
|
return web.getNextElement(_tmpl$37);
|
|
945
963
|
}
|
|
946
|
-
}), _el$
|
|
947
|
-
web.effect(() => web.className(_el$
|
|
964
|
+
}), _el$156, _co$34);
|
|
965
|
+
web.effect(() => web.className(_el$151, `w-full text-left px-2 py-1.5 text-sm rounded hover:bg-blue-50 dark:hover:bg-blue-900/20 ${String(value()) === opt.value ? "text-blue-600 dark:text-blue-400 bg-blue-50/50 dark:bg-blue-900/10" : "text-gray-900 dark:text-white"}`));
|
|
948
966
|
web.runHydrationEvents();
|
|
949
|
-
return _el$
|
|
967
|
+
return _el$151;
|
|
950
968
|
})()
|
|
951
969
|
}));
|
|
952
|
-
return _el$
|
|
970
|
+
return _el$137;
|
|
953
971
|
})(), (() => {
|
|
954
|
-
var _el$
|
|
955
|
-
_el$
|
|
972
|
+
var _el$138 = web.getNextElement(_tmpl$32);
|
|
973
|
+
_el$138.$$click = () => setEditingKey(null);
|
|
974
|
+
web.insert(_el$138, () => strings.cancel);
|
|
956
975
|
web.runHydrationEvents();
|
|
957
|
-
return _el$
|
|
976
|
+
return _el$138;
|
|
958
977
|
})()];
|
|
959
978
|
}
|
|
960
979
|
}));
|
|
961
|
-
return _el$
|
|
980
|
+
return _el$136;
|
|
962
981
|
}
|
|
963
|
-
}), _el$
|
|
964
|
-
return _el$
|
|
982
|
+
}), _el$142, _co$31);
|
|
983
|
+
return _el$123;
|
|
965
984
|
})();
|
|
966
985
|
}
|
|
967
|
-
}), _el$
|
|
968
|
-
web.insert(_el$
|
|
986
|
+
}), _el$120, _co$25);
|
|
987
|
+
web.insert(_el$117, web.createComponent(solidJs.Show, {
|
|
969
988
|
get when() {
|
|
970
989
|
return allKeys().length === 0;
|
|
971
990
|
},
|
|
972
991
|
get children() {
|
|
973
|
-
|
|
992
|
+
var _el$118 = web.getNextElement(_tmpl$27);
|
|
993
|
+
web.insert(_el$118, () => strings.scratchpadNoFilters);
|
|
994
|
+
return _el$118;
|
|
974
995
|
}
|
|
975
|
-
}), _el$
|
|
976
|
-
return _el$
|
|
996
|
+
}), _el$122, _co$26);
|
|
997
|
+
return _el$117;
|
|
977
998
|
})();
|
|
978
999
|
};
|
|
979
1000
|
const EmbeddedFormSection = (props) => {
|
|
1001
|
+
const strings = MCPUIStringsContext.useMCPUIStrings();
|
|
980
1002
|
const [dynamicOptions, setDynamicOptions] = solidJs.createSignal({});
|
|
981
1003
|
const config = () => {
|
|
982
1004
|
const c = props.content;
|
|
983
1005
|
return {
|
|
984
1006
|
fields: (c == null ? void 0 : c.fields) || [],
|
|
985
|
-
submitLabel: (c == null ? void 0 : c.submitLabel) ||
|
|
1007
|
+
submitLabel: (c == null ? void 0 : c.submitLabel) || strings.submit,
|
|
986
1008
|
autoSubmitDelay: c == null ? void 0 : c.autoSubmitDelay
|
|
987
1009
|
};
|
|
988
1010
|
};
|
|
@@ -1121,41 +1143,42 @@ const EmbeddedFormSection = (props) => {
|
|
|
1121
1143
|
},
|
|
1122
1144
|
get fallback() {
|
|
1123
1145
|
return (() => {
|
|
1124
|
-
var _el$
|
|
1125
|
-
_el$
|
|
1126
|
-
var _el$
|
|
1127
|
-
web.insert(_el$
|
|
1128
|
-
web.insert(_el$
|
|
1129
|
-
_el$
|
|
1146
|
+
var _el$170 = web.getNextElement(_tmpl$42), _el$171 = _el$170.firstChild, _el$172 = _el$171.nextSibling, _el$174 = _el$172.firstChild, [_el$175, _co$38] = web.getNextMarker(_el$174.nextSibling);
|
|
1147
|
+
_el$175.nextSibling;
|
|
1148
|
+
var _el$176 = _el$172.nextSibling, _el$177 = _el$176.nextSibling;
|
|
1149
|
+
web.insert(_el$171, () => config().fields.map((f) => f.displayHint || f.prefill).join(", "));
|
|
1150
|
+
web.insert(_el$172, countdown, _el$175, _co$38);
|
|
1151
|
+
_el$176.$$click = () => {
|
|
1130
1152
|
setExpanded(true);
|
|
1131
1153
|
cancelCountdown();
|
|
1132
1154
|
setUserInteracted(true);
|
|
1133
1155
|
};
|
|
1134
|
-
_el$
|
|
1156
|
+
web.insert(_el$176, () => strings.scratchpadEdit);
|
|
1157
|
+
_el$177.$$click = () => {
|
|
1135
1158
|
cancelCountdown();
|
|
1136
1159
|
setUserInteracted(true);
|
|
1137
1160
|
};
|
|
1138
1161
|
web.runHydrationEvents();
|
|
1139
|
-
return _el$
|
|
1162
|
+
return _el$170;
|
|
1140
1163
|
})();
|
|
1141
1164
|
},
|
|
1142
1165
|
get children() {
|
|
1143
|
-
var _el$
|
|
1144
|
-
_el$
|
|
1145
|
-
web.insert(_el$
|
|
1166
|
+
var _el$157 = web.getNextElement(_tmpl$41), _el$164 = _el$157.firstChild, [_el$165, _co$35] = web.getNextMarker(_el$164.nextSibling), _el$166 = _el$165.nextSibling, [_el$167, _co$36] = web.getNextMarker(_el$166.nextSibling), _el$168 = _el$167.nextSibling, [_el$169, _co$37] = web.getNextMarker(_el$168.nextSibling), _el$162 = _el$169.nextSibling, _el$163 = _el$162.firstChild;
|
|
1167
|
+
_el$157.addEventListener("submit", handleSubmit);
|
|
1168
|
+
web.insert(_el$157, web.createComponent(solidJs.Show, {
|
|
1146
1169
|
get when() {
|
|
1147
1170
|
return prefillSummary().prefilled > 0;
|
|
1148
1171
|
},
|
|
1149
1172
|
get children() {
|
|
1150
|
-
var _el$
|
|
1151
|
-
web.insert(_el$
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
return _el$
|
|
1173
|
+
var _el$158 = web.getNextElement(_tmpl$39);
|
|
1174
|
+
web.insert(_el$158, () => formatString.formatMCPUIString(prefillSummary().prefilled === 1 ? strings.formPrefilledOne : strings.formPrefilledMany, {
|
|
1175
|
+
count: prefillSummary().prefilled,
|
|
1176
|
+
total: prefillSummary().total
|
|
1177
|
+
}));
|
|
1178
|
+
return _el$158;
|
|
1156
1179
|
}
|
|
1157
|
-
}), _el$
|
|
1158
|
-
web.insert(_el$
|
|
1180
|
+
}), _el$165, _co$35);
|
|
1181
|
+
web.insert(_el$157, web.createComponent(solidJs.For, {
|
|
1159
1182
|
get each() {
|
|
1160
1183
|
return config().fields;
|
|
1161
1184
|
},
|
|
@@ -1169,28 +1192,29 @@ const EmbeddedFormSection = (props) => {
|
|
|
1169
1192
|
onChange: (val) => updateField(field.name, val),
|
|
1170
1193
|
formData
|
|
1171
1194
|
})
|
|
1172
|
-
}), _el$
|
|
1173
|
-
web.insert(_el$
|
|
1195
|
+
}), _el$167, _co$36);
|
|
1196
|
+
web.insert(_el$157, web.createComponent(solidJs.Show, {
|
|
1174
1197
|
get when() {
|
|
1175
1198
|
return countdown() != null;
|
|
1176
1199
|
},
|
|
1177
1200
|
get children() {
|
|
1178
|
-
var _el$
|
|
1179
|
-
_el$
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
_el$
|
|
1201
|
+
var _el$159 = web.getNextElement(_tmpl$40), _el$160 = _el$159.firstChild, _el$161 = _el$160.nextSibling;
|
|
1202
|
+
web.insert(_el$160, () => formatString.formatMCPUIString(strings.formSubmitCountdown, {
|
|
1203
|
+
label: config().submitLabel,
|
|
1204
|
+
seconds: countdown()
|
|
1205
|
+
}));
|
|
1206
|
+
_el$161.$$click = () => {
|
|
1184
1207
|
cancelCountdown();
|
|
1185
1208
|
setUserInteracted(true);
|
|
1186
1209
|
};
|
|
1210
|
+
web.insert(_el$161, () => strings.cancel);
|
|
1187
1211
|
web.runHydrationEvents();
|
|
1188
|
-
return _el$
|
|
1212
|
+
return _el$159;
|
|
1189
1213
|
}
|
|
1190
|
-
}), _el$
|
|
1191
|
-
web.insert(_el$
|
|
1192
|
-
web.effect(() => web.setAttribute(_el$
|
|
1193
|
-
return _el$
|
|
1214
|
+
}), _el$169, _co$37);
|
|
1215
|
+
web.insert(_el$163, () => config().submitLabel);
|
|
1216
|
+
web.effect(() => web.setAttribute(_el$157, "id", `scratchpad-form-${props.sectionId}`));
|
|
1217
|
+
return _el$157;
|
|
1194
1218
|
}
|
|
1195
1219
|
}), web.createComponent(solidJs.Show, {
|
|
1196
1220
|
get when() {
|
|
@@ -1221,6 +1245,7 @@ const EmbeddedFormSection = (props) => {
|
|
|
1221
1245
|
})];
|
|
1222
1246
|
};
|
|
1223
1247
|
const FormDebugTrace = (props) => {
|
|
1248
|
+
const strings = MCPUIStringsContext.useMCPUIStrings();
|
|
1224
1249
|
const [open, setOpen] = solidJs.createSignal(false);
|
|
1225
1250
|
const [showRaw, setShowRaw] = solidJs.createSignal(false);
|
|
1226
1251
|
const prefilledCount = () => props.fields.filter((f) => f.prefill != null).length;
|
|
@@ -1237,103 +1262,101 @@ const FormDebugTrace = (props) => {
|
|
|
1237
1262
|
return (_a = props.rawContent) == null ? void 0 : _a._debug;
|
|
1238
1263
|
};
|
|
1239
1264
|
return (() => {
|
|
1240
|
-
var _el$
|
|
1241
|
-
_el$
|
|
1242
|
-
var _el$
|
|
1243
|
-
_el$
|
|
1244
|
-
web.insert(_el$
|
|
1245
|
-
web.insert(_el$
|
|
1246
|
-
web.insert(_el$
|
|
1247
|
-
web.insert(_el$
|
|
1265
|
+
var _el$178 = web.getNextElement(_tmpl$48), _el$179 = _el$178.firstChild, _el$180 = _el$179.firstChild, _el$181 = _el$180.nextSibling, _el$184 = _el$181.nextSibling, [_el$185, _co$39] = web.getNextMarker(_el$184.nextSibling), _el$182 = _el$185.nextSibling, _el$186 = _el$182.nextSibling, [_el$187, _co$40] = web.getNextMarker(_el$186.nextSibling);
|
|
1266
|
+
_el$187.nextSibling;
|
|
1267
|
+
var _el$239 = _el$179.nextSibling, [_el$240, _co$56] = web.getNextMarker(_el$239.nextSibling);
|
|
1268
|
+
_el$179.$$click = () => setOpen(!open());
|
|
1269
|
+
web.insert(_el$180, () => open() ? "โพ" : "โธ");
|
|
1270
|
+
web.insert(_el$179, prefilledCount, _el$185, _co$39);
|
|
1271
|
+
web.insert(_el$179, () => props.fields.length, _el$187, _co$40);
|
|
1272
|
+
web.insert(_el$178, web.createComponent(solidJs.Show, {
|
|
1248
1273
|
get when() {
|
|
1249
1274
|
return open();
|
|
1250
1275
|
},
|
|
1251
1276
|
get children() {
|
|
1252
|
-
var _el$
|
|
1253
|
-
_el$
|
|
1254
|
-
var _el$
|
|
1255
|
-
_el$
|
|
1256
|
-
|
|
1257
|
-
web.insert(_el$
|
|
1258
|
-
web.insert(_el$203, prefilledCount, _el$210, _co$47);
|
|
1259
|
-
web.insert(_el$202, web.createComponent(solidJs.For, {
|
|
1277
|
+
var _el$188 = web.getNextElement(_tmpl$47), _el$189 = _el$188.firstChild, _el$190 = _el$189.firstChild, _el$193 = _el$190.nextSibling, [_el$194, _co$41] = web.getNextMarker(_el$193.nextSibling), _el$191 = _el$194.nextSibling, _el$195 = _el$191.nextSibling, [_el$196, _co$42] = web.getNextMarker(_el$195.nextSibling);
|
|
1278
|
+
_el$196.nextSibling;
|
|
1279
|
+
var _el$235 = _el$189.nextSibling, [_el$236, _co$54] = web.getNextMarker(_el$235.nextSibling), _el$197 = _el$236.nextSibling, _el$198 = _el$197.firstChild, _el$203 = _el$198.nextSibling, [_el$204, _co$44] = web.getNextMarker(_el$203.nextSibling), _el$205 = _el$204.nextSibling, [_el$206, _co$45] = web.getNextMarker(_el$205.nextSibling), _el$199 = _el$206.nextSibling, _el$200 = _el$199.firstChild, _el$201 = _el$200.nextSibling, [_el$202, _co$43] = web.getNextMarker(_el$201.nextSibling), _el$237 = _el$197.nextSibling, [_el$238, _co$55] = web.getNextMarker(_el$237.nextSibling), _el$230 = _el$238.nextSibling, _el$231 = _el$230.firstChild, _el$233 = _el$231.nextSibling, [_el$234, _co$53] = web.getNextMarker(_el$233.nextSibling);
|
|
1280
|
+
web.insert(_el$189, () => props.fields.length, _el$194, _co$41);
|
|
1281
|
+
web.insert(_el$189, prefilledCount, _el$196, _co$42);
|
|
1282
|
+
web.insert(_el$188, web.createComponent(solidJs.For, {
|
|
1260
1283
|
get each() {
|
|
1261
1284
|
return props.fields;
|
|
1262
1285
|
},
|
|
1263
1286
|
children: (field) => (() => {
|
|
1264
|
-
var _el$
|
|
1265
|
-
_el$
|
|
1266
|
-
var _el$
|
|
1267
|
-
web.insert(_el$
|
|
1268
|
-
web.insert(_el$
|
|
1287
|
+
var _el$241 = web.getNextElement(_tmpl$56), _el$242 = _el$241.firstChild, _el$244 = _el$242.firstChild, [_el$245, _co$57] = web.getNextMarker(_el$244.nextSibling);
|
|
1288
|
+
_el$245.nextSibling;
|
|
1289
|
+
var _el$270 = _el$242.nextSibling, [_el$271, _co$63] = web.getNextMarker(_el$270.nextSibling), _el$272 = _el$271.nextSibling, [_el$273, _co$64] = web.getNextMarker(_el$272.nextSibling), _el$274 = _el$273.nextSibling, [_el$275, _co$65] = web.getNextMarker(_el$274.nextSibling), _el$276 = _el$275.nextSibling, [_el$277, _co$66] = web.getNextMarker(_el$276.nextSibling), _el$278 = _el$277.nextSibling, [_el$279, _co$67] = web.getNextMarker(_el$278.nextSibling), _el$280 = _el$279.nextSibling, [_el$281, _co$68] = web.getNextMarker(_el$280.nextSibling), _el$282 = _el$281.nextSibling, [_el$283, _co$69] = web.getNextMarker(_el$282.nextSibling), _el$284 = _el$283.nextSibling, [_el$285, _co$70] = web.getNextMarker(_el$284.nextSibling);
|
|
1290
|
+
web.insert(_el$242, () => field.name, _el$245, _co$57);
|
|
1291
|
+
web.insert(_el$241, web.createComponent(solidJs.Show, {
|
|
1269
1292
|
get when() {
|
|
1270
1293
|
return field.prefill != null;
|
|
1271
1294
|
},
|
|
1272
1295
|
get children() {
|
|
1273
|
-
var _el$
|
|
1274
|
-
web.insert(_el$
|
|
1275
|
-
return _el$
|
|
1296
|
+
var _el$246 = web.getNextElement(_tmpl$49), _el$247 = _el$246.firstChild, _el$248 = _el$247.nextSibling, [_el$249, _co$58] = web.getNextMarker(_el$248.nextSibling);
|
|
1297
|
+
web.insert(_el$246, () => JSON.stringify(field.prefill), _el$249, _co$58);
|
|
1298
|
+
return _el$246;
|
|
1276
1299
|
}
|
|
1277
|
-
}), _el$
|
|
1278
|
-
web.insert(_el$
|
|
1300
|
+
}), _el$271, _co$63);
|
|
1301
|
+
web.insert(_el$241, web.createComponent(solidJs.Show, {
|
|
1279
1302
|
get when() {
|
|
1280
1303
|
return !field.prefill;
|
|
1281
1304
|
},
|
|
1282
1305
|
get children() {
|
|
1283
1306
|
return web.getNextElement(_tmpl$50);
|
|
1284
1307
|
}
|
|
1285
|
-
}), _el$
|
|
1286
|
-
web.insert(_el$
|
|
1308
|
+
}), _el$273, _co$64);
|
|
1309
|
+
web.insert(_el$241, web.createComponent(solidJs.Show, {
|
|
1287
1310
|
get when() {
|
|
1288
1311
|
return field.source;
|
|
1289
1312
|
},
|
|
1290
1313
|
get children() {
|
|
1291
|
-
var _el$
|
|
1292
|
-
web.insert(_el$
|
|
1293
|
-
return _el$
|
|
1314
|
+
var _el$251 = web.getNextElement(_tmpl$51), _el$252 = _el$251.firstChild, _el$253 = _el$252.nextSibling, [_el$254, _co$59] = web.getNextMarker(_el$253.nextSibling);
|
|
1315
|
+
web.insert(_el$251, () => field.source, _el$254, _co$59);
|
|
1316
|
+
return _el$251;
|
|
1294
1317
|
}
|
|
1295
|
-
}), _el$
|
|
1296
|
-
web.insert(_el$
|
|
1318
|
+
}), _el$275, _co$65);
|
|
1319
|
+
web.insert(_el$241, web.createComponent(solidJs.Show, {
|
|
1297
1320
|
get when() {
|
|
1298
1321
|
return field.displayHint;
|
|
1299
1322
|
},
|
|
1300
1323
|
get children() {
|
|
1301
|
-
var _el$
|
|
1302
|
-
_el$
|
|
1303
|
-
web.insert(_el$
|
|
1304
|
-
return _el$
|
|
1324
|
+
var _el$255 = web.getNextElement(_tmpl$52), _el$256 = _el$255.firstChild, _el$258 = _el$256.nextSibling, [_el$259, _co$60] = web.getNextMarker(_el$258.nextSibling);
|
|
1325
|
+
_el$259.nextSibling;
|
|
1326
|
+
web.insert(_el$255, () => field.displayHint, _el$259, _co$60);
|
|
1327
|
+
return _el$255;
|
|
1305
1328
|
}
|
|
1306
|
-
}), _el$
|
|
1307
|
-
web.insert(_el$
|
|
1329
|
+
}), _el$277, _co$66);
|
|
1330
|
+
web.insert(_el$241, web.createComponent(solidJs.Show, {
|
|
1308
1331
|
get when() {
|
|
1309
1332
|
return field.muted;
|
|
1310
1333
|
},
|
|
1311
1334
|
get children() {
|
|
1312
1335
|
return web.getNextElement(_tmpl$53);
|
|
1313
1336
|
}
|
|
1314
|
-
}), _el$
|
|
1315
|
-
web.insert(_el$
|
|
1337
|
+
}), _el$279, _co$67);
|
|
1338
|
+
web.insert(_el$241, web.createComponent(solidJs.Show, {
|
|
1316
1339
|
get when() {
|
|
1317
1340
|
return field.prefillMode;
|
|
1318
1341
|
},
|
|
1319
1342
|
get children() {
|
|
1320
|
-
var _el$
|
|
1321
|
-
web.insert(_el$
|
|
1322
|
-
return _el$
|
|
1343
|
+
var _el$261 = web.getNextElement(_tmpl$54), _el$262 = _el$261.firstChild, _el$263 = _el$262.nextSibling, [_el$264, _co$61] = web.getNextMarker(_el$263.nextSibling);
|
|
1344
|
+
web.insert(_el$261, () => field.prefillMode, _el$264, _co$61);
|
|
1345
|
+
return _el$261;
|
|
1323
1346
|
}
|
|
1324
|
-
}), _el$
|
|
1325
|
-
web.insert(_el$
|
|
1347
|
+
}), _el$281, _co$68);
|
|
1348
|
+
web.insert(_el$241, web.createComponent(solidJs.Show, {
|
|
1326
1349
|
get when() {
|
|
1327
1350
|
return field.valueFormat;
|
|
1328
1351
|
},
|
|
1329
1352
|
get children() {
|
|
1330
|
-
var _el$
|
|
1331
|
-
_el$
|
|
1332
|
-
web.insert(_el$
|
|
1333
|
-
return _el$
|
|
1353
|
+
var _el$265 = web.getNextElement(_tmpl$55), _el$266 = _el$265.firstChild, _el$268 = _el$266.nextSibling, [_el$269, _co$62] = web.getNextMarker(_el$268.nextSibling);
|
|
1354
|
+
_el$269.nextSibling;
|
|
1355
|
+
web.insert(_el$265, () => field.valueFormat, _el$269, _co$62);
|
|
1356
|
+
return _el$265;
|
|
1334
1357
|
}
|
|
1335
|
-
}), _el$
|
|
1336
|
-
web.insert(_el$
|
|
1358
|
+
}), _el$283, _co$69);
|
|
1359
|
+
web.insert(_el$241, web.createComponent(solidJs.Show, {
|
|
1337
1360
|
get when() {
|
|
1338
1361
|
return props.submittedValues;
|
|
1339
1362
|
},
|
|
@@ -1342,30 +1365,30 @@ const FormDebugTrace = (props) => {
|
|
|
1342
1365
|
const v = props.submittedValues[field.name];
|
|
1343
1366
|
const hasValue = v !== void 0 && v !== "" && !(Array.isArray(v) && v.length === 0);
|
|
1344
1367
|
return (() => {
|
|
1345
|
-
var _el$
|
|
1346
|
-
web.className(_el$
|
|
1347
|
-
web.insert(_el$
|
|
1348
|
-
return _el$
|
|
1368
|
+
var _el$286 = web.getNextElement(_tmpl$57), _el$287 = _el$286.firstChild, _el$289 = _el$287.nextSibling, [_el$290, _co$71] = web.getNextMarker(_el$289.nextSibling);
|
|
1369
|
+
web.className(_el$286, hasValue ? "text-green-600 dark:text-green-400" : "text-gray-400");
|
|
1370
|
+
web.insert(_el$286, () => hasValue ? `${JSON.stringify(v)} โ` : "(empty)", _el$290, _co$71);
|
|
1371
|
+
return _el$286;
|
|
1349
1372
|
})();
|
|
1350
1373
|
})();
|
|
1351
1374
|
}
|
|
1352
|
-
}), _el$
|
|
1353
|
-
return _el$
|
|
1375
|
+
}), _el$285, _co$70);
|
|
1376
|
+
return _el$241;
|
|
1354
1377
|
})()
|
|
1355
|
-
}), _el$
|
|
1356
|
-
web.insert(_el$
|
|
1357
|
-
web.insert(_el$
|
|
1378
|
+
}), _el$236, _co$54);
|
|
1379
|
+
web.insert(_el$197, () => props.autoSubmitDelay ? "true" : "false", _el$204, _co$44);
|
|
1380
|
+
web.insert(_el$197, (() => {
|
|
1358
1381
|
var _c$5 = web.memo(() => !!props.autoSubmitDelay);
|
|
1359
1382
|
return () => _c$5() ? ` (${props.autoSubmitDelay}ms)` : "";
|
|
1360
|
-
})(), _el$
|
|
1361
|
-
web.insert(_el$
|
|
1362
|
-
web.insert(_el$
|
|
1383
|
+
})(), _el$206, _co$45);
|
|
1384
|
+
web.insert(_el$199, autoSubmitReason, _el$202, _co$43);
|
|
1385
|
+
web.insert(_el$188, web.createComponent(solidJs.Show, {
|
|
1363
1386
|
get when() {
|
|
1364
1387
|
return serverDebug();
|
|
1365
1388
|
},
|
|
1366
1389
|
get children() {
|
|
1367
|
-
var _el$
|
|
1368
|
-
web.insert(_el$
|
|
1390
|
+
var _el$207 = web.getNextElement(_tmpl$45), _el$208 = _el$207.firstChild, _el$224 = _el$208.nextSibling, [_el$225, _co$50] = web.getNextMarker(_el$224.nextSibling), _el$226 = _el$225.nextSibling, [_el$227, _co$51] = web.getNextMarker(_el$226.nextSibling), _el$228 = _el$227.nextSibling, [_el$229, _co$52] = web.getNextMarker(_el$228.nextSibling);
|
|
1391
|
+
web.insert(_el$207, web.createComponent(solidJs.Show, {
|
|
1369
1392
|
get when() {
|
|
1370
1393
|
var _a;
|
|
1371
1394
|
return (_a = serverDebug()) == null ? void 0 : _a.resolvers;
|
|
@@ -1376,67 +1399,71 @@ const FormDebugTrace = (props) => {
|
|
|
1376
1399
|
return serverDebug().resolvers;
|
|
1377
1400
|
},
|
|
1378
1401
|
children: (r) => (() => {
|
|
1379
|
-
var _el$
|
|
1380
|
-
_el$
|
|
1381
|
-
web.insert(_el$
|
|
1382
|
-
web.insert(_el$
|
|
1383
|
-
web.insert(_el$
|
|
1384
|
-
web.insert(_el$
|
|
1385
|
-
web.insert(_el$
|
|
1386
|
-
return _el$
|
|
1402
|
+
var _el$291 = web.getNextElement(_tmpl$58), _el$299 = _el$291.firstChild, [_el$300, _co$72] = web.getNextMarker(_el$299.nextSibling), _el$292 = _el$300.nextSibling, _el$301 = _el$292.nextSibling, [_el$302, _co$73] = web.getNextMarker(_el$301.nextSibling), _el$293 = _el$302.nextSibling, _el$303 = _el$293.nextSibling, [_el$304, _co$74] = web.getNextMarker(_el$303.nextSibling), _el$294 = _el$304.nextSibling, _el$305 = _el$294.nextSibling, [_el$306, _co$75] = web.getNextMarker(_el$305.nextSibling), _el$297 = _el$306.nextSibling, _el$307 = _el$297.nextSibling, [_el$308, _co$76] = web.getNextMarker(_el$307.nextSibling);
|
|
1403
|
+
_el$308.nextSibling;
|
|
1404
|
+
web.insert(_el$291, () => r.field, _el$300, _co$72);
|
|
1405
|
+
web.insert(_el$291, () => r.resolver, _el$302, _co$73);
|
|
1406
|
+
web.insert(_el$291, () => r.input, _el$304, _co$74);
|
|
1407
|
+
web.insert(_el$291, () => r.output, _el$306, _co$75);
|
|
1408
|
+
web.insert(_el$291, () => r.ms, _el$308, _co$76);
|
|
1409
|
+
return _el$291;
|
|
1387
1410
|
})()
|
|
1388
1411
|
});
|
|
1389
1412
|
}
|
|
1390
|
-
}), _el$
|
|
1391
|
-
web.insert(_el$
|
|
1413
|
+
}), _el$225, _co$50);
|
|
1414
|
+
web.insert(_el$207, web.createComponent(solidJs.Show, {
|
|
1392
1415
|
get when() {
|
|
1393
1416
|
var _a;
|
|
1394
1417
|
return (_a = serverDebug()) == null ? void 0 : _a.routing;
|
|
1395
1418
|
},
|
|
1396
1419
|
get children() {
|
|
1397
|
-
var _el$
|
|
1398
|
-
_el$
|
|
1399
|
-
web.insert(_el$
|
|
1400
|
-
web.insert(_el$
|
|
1401
|
-
web.insert(_el$
|
|
1402
|
-
return _el$
|
|
1420
|
+
var _el$209 = web.getNextElement(_tmpl$43), _el$210 = _el$209.firstChild, _el$214 = _el$210.nextSibling, [_el$215, _co$46] = web.getNextMarker(_el$214.nextSibling), _el$211 = _el$215.nextSibling, _el$216 = _el$211.nextSibling, [_el$217, _co$47] = web.getNextMarker(_el$216.nextSibling), _el$212 = _el$217.nextSibling, _el$218 = _el$212.nextSibling, [_el$219, _co$48] = web.getNextMarker(_el$218.nextSibling);
|
|
1421
|
+
_el$219.nextSibling;
|
|
1422
|
+
web.insert(_el$209, () => serverDebug().routing.topic, _el$215, _co$46);
|
|
1423
|
+
web.insert(_el$209, () => serverDebug().routing.method, _el$217, _co$47);
|
|
1424
|
+
web.insert(_el$209, () => serverDebug().routing.ms, _el$219, _co$48);
|
|
1425
|
+
return _el$209;
|
|
1403
1426
|
}
|
|
1404
|
-
}), _el$
|
|
1405
|
-
web.insert(_el$
|
|
1427
|
+
}), _el$227, _co$51);
|
|
1428
|
+
web.insert(_el$207, web.createComponent(solidJs.Show, {
|
|
1406
1429
|
get when() {
|
|
1407
1430
|
var _a;
|
|
1408
1431
|
return (_a = serverDebug()) == null ? void 0 : _a.missingFields;
|
|
1409
1432
|
},
|
|
1410
1433
|
get children() {
|
|
1411
|
-
var _el$
|
|
1412
|
-
web.insert(_el$
|
|
1413
|
-
return _el$
|
|
1434
|
+
var _el$220 = web.getNextElement(_tmpl$44), _el$221 = _el$220.firstChild, _el$222 = _el$221.nextSibling, [_el$223, _co$49] = web.getNextMarker(_el$222.nextSibling);
|
|
1435
|
+
web.insert(_el$220, () => serverDebug().missingFields.join(", "), _el$223, _co$49);
|
|
1436
|
+
return _el$220;
|
|
1414
1437
|
}
|
|
1415
|
-
}), _el$
|
|
1416
|
-
return _el$
|
|
1438
|
+
}), _el$229, _co$52);
|
|
1439
|
+
return _el$207;
|
|
1417
1440
|
}
|
|
1418
|
-
}), _el$
|
|
1419
|
-
_el$
|
|
1420
|
-
web.insert(_el$
|
|
1421
|
-
|
|
1441
|
+
}), _el$238, _co$55);
|
|
1442
|
+
_el$231.$$click = () => setShowRaw(!showRaw());
|
|
1443
|
+
web.insert(_el$231, (() => {
|
|
1444
|
+
var _c$6 = web.memo(() => !!showRaw());
|
|
1445
|
+
return () => _c$6() ? strings.scratchpadHideRaw : strings.scratchpadShowRaw;
|
|
1446
|
+
})());
|
|
1447
|
+
web.insert(_el$230, web.createComponent(solidJs.Show, {
|
|
1422
1448
|
get when() {
|
|
1423
1449
|
return showRaw();
|
|
1424
1450
|
},
|
|
1425
1451
|
get children() {
|
|
1426
|
-
var _el$
|
|
1427
|
-
web.insert(_el$
|
|
1428
|
-
return _el$
|
|
1452
|
+
var _el$232 = web.getNextElement(_tmpl$46);
|
|
1453
|
+
web.insert(_el$232, () => JSON.stringify(props.rawContent, null, 2));
|
|
1454
|
+
return _el$232;
|
|
1429
1455
|
}
|
|
1430
|
-
}), _el$
|
|
1456
|
+
}), _el$234, _co$53);
|
|
1431
1457
|
web.runHydrationEvents();
|
|
1432
|
-
return _el$
|
|
1458
|
+
return _el$188;
|
|
1433
1459
|
}
|
|
1434
|
-
}), _el$
|
|
1460
|
+
}), _el$240, _co$56);
|
|
1435
1461
|
web.runHydrationEvents();
|
|
1436
|
-
return _el$
|
|
1462
|
+
return _el$178;
|
|
1437
1463
|
})();
|
|
1438
1464
|
};
|
|
1439
1465
|
const EnrichedStepsSection = (props) => {
|
|
1466
|
+
const strings = MCPUIStringsContext.useMCPUIStrings();
|
|
1440
1467
|
const stepsData = () => {
|
|
1441
1468
|
const c = props.content;
|
|
1442
1469
|
return {
|
|
@@ -1445,35 +1472,35 @@ const EnrichedStepsSection = (props) => {
|
|
|
1445
1472
|
};
|
|
1446
1473
|
};
|
|
1447
1474
|
return (() => {
|
|
1448
|
-
var _el$
|
|
1449
|
-
web.insert(_el$
|
|
1475
|
+
var _el$309 = web.getNextElement(_tmpl$60), _el$315 = _el$309.firstChild, [_el$316, _co$78] = web.getNextMarker(_el$315.nextSibling), _el$317 = _el$316.nextSibling, [_el$318, _co$79] = web.getNextMarker(_el$317.nextSibling);
|
|
1476
|
+
web.insert(_el$309, web.createComponent(solidJs.For, {
|
|
1450
1477
|
get each() {
|
|
1451
1478
|
return stepsData().steps;
|
|
1452
1479
|
},
|
|
1453
1480
|
children: (step) => (() => {
|
|
1454
|
-
var _el$
|
|
1455
|
-
web.insert(_el$
|
|
1456
|
-
var _c$
|
|
1457
|
-
return () => _c$
|
|
1481
|
+
var _el$319 = web.getNextElement(_tmpl$63), _el$320 = _el$319.firstChild, _el$321 = _el$320.firstChild, _el$326 = _el$321.nextSibling, [_el$327, _co$81] = web.getNextMarker(_el$326.nextSibling), _el$328 = _el$327.nextSibling, [_el$329, _co$82] = web.getNextMarker(_el$328.nextSibling), _el$331 = _el$320.nextSibling, [_el$332, _co$83] = web.getNextMarker(_el$331.nextSibling);
|
|
1482
|
+
web.insert(_el$321, (() => {
|
|
1483
|
+
var _c$7 = web.memo(() => step.status === "done");
|
|
1484
|
+
return () => _c$7() ? "โ
" : step.status === "active" ? "โ" : "โ";
|
|
1458
1485
|
})());
|
|
1459
|
-
web.insert(_el$
|
|
1460
|
-
web.insert(_el$
|
|
1486
|
+
web.insert(_el$320, () => step.label, _el$327, _co$81);
|
|
1487
|
+
web.insert(_el$320, web.createComponent(solidJs.Show, {
|
|
1461
1488
|
get when() {
|
|
1462
1489
|
return web.memo(() => !!step.description)() && step.status === "active";
|
|
1463
1490
|
},
|
|
1464
1491
|
get children() {
|
|
1465
|
-
var _el$
|
|
1466
|
-
web.insert(_el$
|
|
1467
|
-
return _el$
|
|
1492
|
+
var _el$322 = web.getNextElement(_tmpl$61), _el$323 = _el$322.firstChild, _el$324 = _el$323.nextSibling, [_el$325, _co$80] = web.getNextMarker(_el$324.nextSibling);
|
|
1493
|
+
web.insert(_el$322, () => step.description, _el$325, _co$80);
|
|
1494
|
+
return _el$322;
|
|
1468
1495
|
}
|
|
1469
|
-
}), _el$
|
|
1470
|
-
web.insert(_el$
|
|
1496
|
+
}), _el$329, _co$82);
|
|
1497
|
+
web.insert(_el$319, web.createComponent(solidJs.Show, {
|
|
1471
1498
|
get when() {
|
|
1472
1499
|
return web.memo(() => step.status === "active")() && step.content;
|
|
1473
1500
|
},
|
|
1474
1501
|
get children() {
|
|
1475
|
-
var _el$
|
|
1476
|
-
web.insert(_el$
|
|
1502
|
+
var _el$330 = web.getNextElement(_tmpl$62);
|
|
1503
|
+
web.insert(_el$330, web.createComponent(SectionRenderer, {
|
|
1477
1504
|
get section() {
|
|
1478
1505
|
return step.content;
|
|
1479
1506
|
},
|
|
@@ -1485,41 +1512,44 @@ const EnrichedStepsSection = (props) => {
|
|
|
1485
1512
|
return props.onAction;
|
|
1486
1513
|
}
|
|
1487
1514
|
}));
|
|
1488
|
-
return _el$
|
|
1515
|
+
return _el$330;
|
|
1489
1516
|
}
|
|
1490
|
-
}), _el$
|
|
1517
|
+
}), _el$332, _co$83);
|
|
1491
1518
|
web.effect((_p$) => {
|
|
1492
1519
|
var _v$4 = `rounded-lg ${step.status === "active" ? "bg-blue-50/50 dark:bg-blue-900/10 border border-blue-200 dark:border-blue-800 p-3 animate-pulse" : "px-1"}`, _v$5 = `flex items-center gap-2 text-sm font-medium ${step.status === "done" ? "text-green-600 dark:text-green-400" : step.status === "active" ? "text-blue-600 dark:text-blue-400" : "text-gray-400"}`;
|
|
1493
|
-
_v$4 !== _p$.e && web.className(_el$
|
|
1494
|
-
_v$5 !== _p$.t && web.className(_el$
|
|
1520
|
+
_v$4 !== _p$.e && web.className(_el$319, _p$.e = _v$4);
|
|
1521
|
+
_v$5 !== _p$.t && web.className(_el$320, _p$.t = _v$5);
|
|
1495
1522
|
return _p$;
|
|
1496
1523
|
}, {
|
|
1497
1524
|
e: void 0,
|
|
1498
1525
|
t: void 0
|
|
1499
1526
|
});
|
|
1500
|
-
return _el$
|
|
1527
|
+
return _el$319;
|
|
1501
1528
|
})()
|
|
1502
|
-
}), _el$
|
|
1503
|
-
web.insert(_el$
|
|
1529
|
+
}), _el$316, _co$78);
|
|
1530
|
+
web.insert(_el$309, web.createComponent(solidJs.Show, {
|
|
1504
1531
|
get when() {
|
|
1505
1532
|
return stepsData().steps.some((s) => s.status === "active");
|
|
1506
1533
|
},
|
|
1507
1534
|
get children() {
|
|
1508
|
-
var _el$
|
|
1509
|
-
_el$
|
|
1535
|
+
var _el$310 = web.getNextElement(_tmpl$59), _el$311 = _el$310.firstChild, _el$313 = _el$311.firstChild, [_el$314, _co$77] = web.getNextMarker(_el$313.nextSibling);
|
|
1536
|
+
_el$314.nextSibling;
|
|
1537
|
+
_el$311.$$click = () => {
|
|
1510
1538
|
var _a;
|
|
1511
1539
|
return (_a = props.onAction) == null ? void 0 : _a.call(props, "next_step", {
|
|
1512
1540
|
step: stepsData().currentStep
|
|
1513
1541
|
});
|
|
1514
1542
|
};
|
|
1543
|
+
web.insert(_el$311, () => strings.scratchpadNextStep, _el$314, _co$77);
|
|
1515
1544
|
web.runHydrationEvents();
|
|
1516
|
-
return _el$
|
|
1545
|
+
return _el$310;
|
|
1517
1546
|
}
|
|
1518
|
-
}), _el$
|
|
1519
|
-
return _el$
|
|
1547
|
+
}), _el$318, _co$79);
|
|
1548
|
+
return _el$309;
|
|
1520
1549
|
})();
|
|
1521
1550
|
};
|
|
1522
1551
|
const ActionSection = (props) => {
|
|
1552
|
+
const strings = MCPUIStringsContext.useMCPUIStrings();
|
|
1523
1553
|
const data = () => {
|
|
1524
1554
|
const c = props.content;
|
|
1525
1555
|
if (Array.isArray(c)) return {
|
|
@@ -1542,103 +1572,104 @@ const ActionSection = (props) => {
|
|
|
1542
1572
|
};
|
|
1543
1573
|
};
|
|
1544
1574
|
return (() => {
|
|
1545
|
-
var _el$
|
|
1546
|
-
web.insert(_el$
|
|
1575
|
+
var _el$333 = web.getNextElement(_tmpl$67), _el$341 = _el$333.firstChild, [_el$342, _co$85] = web.getNextMarker(_el$341.nextSibling), _el$343 = _el$342.nextSibling, [_el$344, _co$86] = web.getNextMarker(_el$343.nextSibling), _el$345 = _el$344.nextSibling, [_el$346, _co$87] = web.getNextMarker(_el$345.nextSibling), _el$340 = _el$346.nextSibling;
|
|
1576
|
+
web.insert(_el$333, web.createComponent(solidJs.Show, {
|
|
1547
1577
|
get when() {
|
|
1548
1578
|
return data().title;
|
|
1549
1579
|
},
|
|
1550
1580
|
get children() {
|
|
1551
|
-
var _el$
|
|
1552
|
-
web.insert(_el$
|
|
1553
|
-
return _el$
|
|
1581
|
+
var _el$334 = web.getNextElement(_tmpl$64);
|
|
1582
|
+
web.insert(_el$334, () => data().title);
|
|
1583
|
+
return _el$334;
|
|
1554
1584
|
}
|
|
1555
|
-
}), _el$
|
|
1556
|
-
web.insert(_el$
|
|
1585
|
+
}), _el$342, _co$85);
|
|
1586
|
+
web.insert(_el$333, web.createComponent(solidJs.Show, {
|
|
1557
1587
|
get when() {
|
|
1558
1588
|
return data().preview;
|
|
1559
1589
|
},
|
|
1560
1590
|
children: (preview) => (() => {
|
|
1561
|
-
var _el$
|
|
1562
|
-
web.insert(_el$
|
|
1591
|
+
var _el$347 = web.getNextElement(_tmpl$70), _el$353 = _el$347.firstChild, [_el$354, _co$89] = web.getNextMarker(_el$353.nextSibling), _el$355 = _el$354.nextSibling, [_el$356, _co$90] = web.getNextMarker(_el$355.nextSibling);
|
|
1592
|
+
web.insert(_el$347, web.createComponent(solidJs.Show, {
|
|
1563
1593
|
get when() {
|
|
1564
1594
|
return preview().count != null;
|
|
1565
1595
|
},
|
|
1566
1596
|
get children() {
|
|
1567
1597
|
return [(() => {
|
|
1568
|
-
var _el$
|
|
1569
|
-
web.insert(_el$
|
|
1570
|
-
return _el$
|
|
1571
|
-
})(), "
|
|
1598
|
+
var _el$348 = web.getNextElement(_tmpl$68);
|
|
1599
|
+
web.insert(_el$348, () => preview().count);
|
|
1600
|
+
return _el$348;
|
|
1601
|
+
})(), " ", web.memo(() => strings.scratchpadItems)];
|
|
1572
1602
|
}
|
|
1573
|
-
}), _el$
|
|
1574
|
-
web.insert(_el$
|
|
1603
|
+
}), _el$354, _co$89);
|
|
1604
|
+
web.insert(_el$347, web.createComponent(solidJs.Show, {
|
|
1575
1605
|
get when() {
|
|
1576
1606
|
return preview().summary;
|
|
1577
1607
|
},
|
|
1578
1608
|
get children() {
|
|
1579
|
-
var _el$
|
|
1580
|
-
web.insert(_el$
|
|
1581
|
-
return _el$
|
|
1609
|
+
var _el$349 = web.getNextElement(_tmpl$69), _el$350 = _el$349.firstChild, _el$351 = _el$350.nextSibling, [_el$352, _co$88] = web.getNextMarker(_el$351.nextSibling);
|
|
1610
|
+
web.insert(_el$349, () => preview().summary, _el$352, _co$88);
|
|
1611
|
+
return _el$349;
|
|
1582
1612
|
}
|
|
1583
|
-
}), _el$
|
|
1584
|
-
return _el$
|
|
1613
|
+
}), _el$356, _co$90);
|
|
1614
|
+
return _el$347;
|
|
1585
1615
|
})()
|
|
1586
|
-
}), _el$
|
|
1587
|
-
web.insert(_el$
|
|
1616
|
+
}), _el$344, _co$86);
|
|
1617
|
+
web.insert(_el$333, web.createComponent(solidJs.Show, {
|
|
1588
1618
|
get when() {
|
|
1589
1619
|
return web.memo(() => !!data().validation)() && data().validation.confidence != null;
|
|
1590
1620
|
},
|
|
1591
1621
|
get children() {
|
|
1592
|
-
var _el$
|
|
1593
|
-
_el$
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
web.insert(_el$
|
|
1622
|
+
var _el$335 = web.getNextElement(_tmpl$66), _el$336 = _el$335.firstChild, _el$338 = _el$336.nextSibling, [_el$339, _co$84] = web.getNextMarker(_el$338.nextSibling);
|
|
1623
|
+
web.insert(_el$336, () => formatString.formatMCPUIString(strings.verifiedConfidence, {
|
|
1624
|
+
pct: Math.round(data().validation.confidence * 100)
|
|
1625
|
+
}));
|
|
1626
|
+
web.insert(_el$335, web.createComponent(solidJs.Show, {
|
|
1597
1627
|
get when() {
|
|
1598
1628
|
var _a;
|
|
1599
1629
|
return ((_a = data().validation.hallucinated) == null ? void 0 : _a.length) > 0;
|
|
1600
1630
|
},
|
|
1601
1631
|
get children() {
|
|
1602
|
-
var _el$
|
|
1603
|
-
_el$
|
|
1604
|
-
|
|
1605
|
-
|
|
1632
|
+
var _el$337 = web.getNextElement(_tmpl$65);
|
|
1633
|
+
web.insert(_el$337, () => formatString.formatMCPUIString(strings.verifiedUnverifiedCount, {
|
|
1634
|
+
count: data().validation.hallucinated.length
|
|
1635
|
+
}));
|
|
1636
|
+
return _el$337;
|
|
1606
1637
|
}
|
|
1607
|
-
}), _el$
|
|
1608
|
-
web.effect((_$p) => web.classList(_el$
|
|
1638
|
+
}), _el$339, _co$84);
|
|
1639
|
+
web.effect((_$p) => web.classList(_el$336, {
|
|
1609
1640
|
"text-green-600 dark:text-green-400": data().validation.confidence >= 0.8,
|
|
1610
1641
|
"text-amber-600 dark:text-amber-400": data().validation.confidence >= 0.5 && data().validation.confidence < 0.8,
|
|
1611
1642
|
"text-red-600 dark:text-red-400": data().validation.confidence < 0.5
|
|
1612
1643
|
}, _$p));
|
|
1613
|
-
return _el$
|
|
1644
|
+
return _el$335;
|
|
1614
1645
|
}
|
|
1615
|
-
}), _el$
|
|
1616
|
-
web.insert(_el$
|
|
1646
|
+
}), _el$346, _co$87);
|
|
1647
|
+
web.insert(_el$340, web.createComponent(solidJs.For, {
|
|
1617
1648
|
get each() {
|
|
1618
1649
|
return data().actions;
|
|
1619
1650
|
},
|
|
1620
1651
|
children: (item) => (() => {
|
|
1621
|
-
var _el$
|
|
1622
|
-
web.addEventListener(_el$
|
|
1652
|
+
var _el$357 = web.getNextElement(_tmpl$38), _el$359 = _el$357.firstChild, [_el$360, _co$91] = web.getNextMarker(_el$359.nextSibling), _el$361 = _el$360.nextSibling, [_el$362, _co$92] = web.getNextMarker(_el$361.nextSibling);
|
|
1653
|
+
web.addEventListener(_el$357, "click", () => {
|
|
1623
1654
|
var _a;
|
|
1624
1655
|
return (_a = props.onAction) == null ? void 0 : _a.call(props, item.value || item.action || item.label, item);
|
|
1625
1656
|
});
|
|
1626
|
-
web.insert(_el$
|
|
1657
|
+
web.insert(_el$357, web.createComponent(solidJs.Show, {
|
|
1627
1658
|
get when() {
|
|
1628
1659
|
return item.icon;
|
|
1629
1660
|
},
|
|
1630
1661
|
get children() {
|
|
1631
|
-
var _el$
|
|
1632
|
-
web.insert(_el$
|
|
1633
|
-
return _el$
|
|
1662
|
+
var _el$358 = web.getNextElement(_tmpl$71);
|
|
1663
|
+
web.insert(_el$358, () => item.icon);
|
|
1664
|
+
return _el$358;
|
|
1634
1665
|
}
|
|
1635
|
-
}), _el$
|
|
1636
|
-
web.insert(_el$
|
|
1637
|
-
web.effect(() => web.className(_el$
|
|
1638
|
-
return _el$
|
|
1666
|
+
}), _el$360, _co$91);
|
|
1667
|
+
web.insert(_el$357, () => item.label, _el$362, _co$92);
|
|
1668
|
+
web.effect(() => web.className(_el$357, `px-3 py-1.5 text-sm font-medium rounded-lg transition-colors ${item.variant === "primary" ? "bg-blue-600 text-white hover:bg-blue-700" : item.variant === "danger" ? "bg-red-600 text-white hover:bg-red-700" : item.variant === "secondary" ? "border border-blue-300 dark:border-blue-600 text-blue-700 dark:text-blue-300 hover:bg-blue-50 dark:hover:bg-blue-900/20" : "border border-gray-200 dark:border-gray-600 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700"}`));
|
|
1669
|
+
return _el$357;
|
|
1639
1670
|
})()
|
|
1640
1671
|
}));
|
|
1641
|
-
return _el$
|
|
1672
|
+
return _el$333;
|
|
1642
1673
|
})();
|
|
1643
1674
|
};
|
|
1644
1675
|
const UnderstandingSection = (props) => {
|
|
@@ -1662,63 +1693,65 @@ const UnderstandingSection = (props) => {
|
|
|
1662
1693
|
}
|
|
1663
1694
|
};
|
|
1664
1695
|
return (() => {
|
|
1665
|
-
var _el$
|
|
1666
|
-
web.insert(_el$
|
|
1696
|
+
var _el$363 = web.getNextElement(_tmpl$72), _el$364 = _el$363.firstChild, _el$366 = _el$364.nextSibling, [_el$367, _co$93] = web.getNextMarker(_el$366.nextSibling);
|
|
1697
|
+
web.insert(_el$364, web.createComponent(solidJs.For, {
|
|
1667
1698
|
get each() {
|
|
1668
1699
|
return data().detections;
|
|
1669
1700
|
},
|
|
1670
1701
|
children: (det) => (() => {
|
|
1671
|
-
var _el$
|
|
1672
|
-
web.insert(_el$
|
|
1673
|
-
web.insert(_el$
|
|
1674
|
-
web.effect(() => web.className(_el$
|
|
1675
|
-
return _el$
|
|
1702
|
+
var _el$368 = web.getNextElement(_tmpl$73), _el$369 = _el$368.firstChild, _el$370 = _el$369.nextSibling;
|
|
1703
|
+
web.insert(_el$369, () => det.label);
|
|
1704
|
+
web.insert(_el$370, () => det.value);
|
|
1705
|
+
web.effect(() => web.className(_el$369, `px-1.5 py-0.5 text-xs font-medium rounded ${confidenceClass(det.confidence)}`));
|
|
1706
|
+
return _el$368;
|
|
1676
1707
|
})()
|
|
1677
1708
|
}));
|
|
1678
|
-
web.insert(_el$
|
|
1709
|
+
web.insert(_el$363, web.createComponent(solidJs.Show, {
|
|
1679
1710
|
get when() {
|
|
1680
1711
|
return data().warnings.length > 0;
|
|
1681
1712
|
},
|
|
1682
1713
|
get children() {
|
|
1683
|
-
var _el$
|
|
1684
|
-
web.insert(_el$
|
|
1714
|
+
var _el$365 = web.getNextElement(_tmpl$25);
|
|
1715
|
+
web.insert(_el$365, web.createComponent(solidJs.For, {
|
|
1685
1716
|
get each() {
|
|
1686
1717
|
return data().warnings;
|
|
1687
1718
|
},
|
|
1688
1719
|
children: (w) => (() => {
|
|
1689
|
-
var _el$
|
|
1690
|
-
web.insert(_el$
|
|
1691
|
-
return _el$
|
|
1720
|
+
var _el$371 = web.getNextElement(_tmpl$74), _el$372 = _el$371.firstChild, _el$373 = _el$372.nextSibling;
|
|
1721
|
+
web.insert(_el$373, w);
|
|
1722
|
+
return _el$371;
|
|
1692
1723
|
})()
|
|
1693
1724
|
}));
|
|
1694
|
-
return _el$
|
|
1725
|
+
return _el$365;
|
|
1695
1726
|
}
|
|
1696
|
-
}), _el$
|
|
1697
|
-
return _el$
|
|
1727
|
+
}), _el$367, _co$93);
|
|
1728
|
+
return _el$363;
|
|
1698
1729
|
})();
|
|
1699
1730
|
};
|
|
1700
1731
|
const FeedbackSection = (props) => {
|
|
1732
|
+
const strings = MCPUIStringsContext.useMCPUIStrings();
|
|
1701
1733
|
const [comment, setComment] = solidJs.createSignal("");
|
|
1702
1734
|
const [showComment, setShowComment] = solidJs.createSignal(false);
|
|
1703
1735
|
const [submitted, setSubmitted] = solidJs.createSignal(null);
|
|
1736
|
+
const [submittedLabel, setSubmittedLabel] = solidJs.createSignal("");
|
|
1704
1737
|
const data = () => {
|
|
1705
1738
|
var _a, _b, _c, _d;
|
|
1706
1739
|
const c = props.content;
|
|
1707
1740
|
const options = (c == null ? void 0 : c.options) || [{
|
|
1708
1741
|
value: ((_a = c == null ? void 0 : c.approve) == null ? void 0 : _a.value) || "approve",
|
|
1709
|
-
label: ((_b = c == null ? void 0 : c.approve) == null ? void 0 : _b.label) ||
|
|
1742
|
+
label: ((_b = c == null ? void 0 : c.approve) == null ? void 0 : _b.label) || strings.yes,
|
|
1710
1743
|
icon: "๐",
|
|
1711
1744
|
variant: "primary"
|
|
1712
1745
|
}, {
|
|
1713
1746
|
value: ((_c = c == null ? void 0 : c.reject) == null ? void 0 : _c.value) || "reject",
|
|
1714
|
-
label: ((_d = c == null ? void 0 : c.reject) == null ? void 0 : _d.label) ||
|
|
1747
|
+
label: ((_d = c == null ? void 0 : c.reject) == null ? void 0 : _d.label) || strings.no,
|
|
1715
1748
|
icon: "๐"
|
|
1716
1749
|
}];
|
|
1717
1750
|
return {
|
|
1718
1751
|
question: (c == null ? void 0 : c.question) || "",
|
|
1719
1752
|
options,
|
|
1720
1753
|
allowFreeText: (c == null ? void 0 : c.allowFreeText) ?? (c == null ? void 0 : c.allowComment) ?? false,
|
|
1721
|
-
placeholder: (c == null ? void 0 : c.placeholder) || (c == null ? void 0 : c.commentPlaceholder) ||
|
|
1754
|
+
placeholder: (c == null ? void 0 : c.placeholder) || (c == null ? void 0 : c.commentPlaceholder) || strings.scratchpadCommentPlaceholder,
|
|
1722
1755
|
// v4.1.0: per-step feedback
|
|
1723
1756
|
agentId: c == null ? void 0 : c.agentId,
|
|
1724
1757
|
stepId: c == null ? void 0 : c.stepId
|
|
@@ -1731,6 +1764,7 @@ const FeedbackSection = (props) => {
|
|
|
1731
1764
|
return;
|
|
1732
1765
|
}
|
|
1733
1766
|
setSubmitted(option.value);
|
|
1767
|
+
setSubmittedLabel(option.label ?? "");
|
|
1734
1768
|
const payload = {
|
|
1735
1769
|
option: option.value,
|
|
1736
1770
|
comment: comment(),
|
|
@@ -1749,83 +1783,84 @@ const FeedbackSection = (props) => {
|
|
|
1749
1783
|
(_a = props.onAction) == null ? void 0 : _a.call(props, "feedback", payload);
|
|
1750
1784
|
};
|
|
1751
1785
|
return (() => {
|
|
1752
|
-
var _el$
|
|
1753
|
-
web.insert(_el$
|
|
1754
|
-
web.insert(_el$
|
|
1786
|
+
var _el$374 = web.getNextElement(_tmpl$79), _el$375 = _el$374.firstChild, _el$393 = _el$375.nextSibling, [_el$394, _co$98] = web.getNextMarker(_el$393.nextSibling), _el$395 = _el$394.nextSibling, [_el$396, _co$99] = web.getNextMarker(_el$395.nextSibling);
|
|
1787
|
+
web.insert(_el$375, () => data().question);
|
|
1788
|
+
web.insert(_el$374, web.createComponent(solidJs.Show, {
|
|
1755
1789
|
get when() {
|
|
1756
1790
|
return submitted();
|
|
1757
1791
|
},
|
|
1758
1792
|
get children() {
|
|
1759
|
-
var _el$
|
|
1760
|
-
web.insert(_el$
|
|
1761
|
-
var _c$
|
|
1762
|
-
return () => _c$
|
|
1763
|
-
})(), _el$
|
|
1764
|
-
web.insert(_el$
|
|
1765
|
-
web.insert(_el$
|
|
1793
|
+
var _el$376 = web.getNextElement(_tmpl$76), _el$377 = _el$376.firstChild, _el$379 = _el$377.firstChild, [_el$380, _co$94] = web.getNextMarker(_el$379.nextSibling), _el$378 = _el$380.nextSibling, _el$381 = _el$378.nextSibling, [_el$382, _co$95] = web.getNextMarker(_el$381.nextSibling), _el$387 = _el$377.nextSibling, [_el$388, _co$97] = web.getNextMarker(_el$387.nextSibling);
|
|
1794
|
+
web.insert(_el$377, (() => {
|
|
1795
|
+
var _c$8 = web.memo(() => submitted() === "approve");
|
|
1796
|
+
return () => _c$8() ? "โ
" : submitted() === "reject" ? "โ" : "๐ฌ";
|
|
1797
|
+
})(), _el$380, _co$94);
|
|
1798
|
+
web.insert(_el$377, submittedLabel, _el$382, _co$95);
|
|
1799
|
+
web.insert(_el$376, web.createComponent(solidJs.Show, {
|
|
1766
1800
|
get when() {
|
|
1767
1801
|
return comment();
|
|
1768
1802
|
},
|
|
1769
1803
|
get children() {
|
|
1770
|
-
var _el$
|
|
1771
|
-
web.insert(_el$
|
|
1772
|
-
return _el$
|
|
1804
|
+
var _el$383 = web.getNextElement(_tmpl$75), _el$384 = _el$383.firstChild, _el$385 = _el$384.nextSibling, [_el$386, _co$96] = web.getNextMarker(_el$385.nextSibling);
|
|
1805
|
+
web.insert(_el$383, comment, _el$386, _co$96);
|
|
1806
|
+
return _el$383;
|
|
1773
1807
|
}
|
|
1774
|
-
}), _el$
|
|
1808
|
+
}), _el$388, _co$97);
|
|
1775
1809
|
web.effect((_p$) => {
|
|
1776
1810
|
var _v$6 = !!(submitted() === "approve"), _v$7 = !!(submitted() === "reject"), _v$8 = !!(submitted() !== "approve" && submitted() !== "reject");
|
|
1777
|
-
_v$6 !== _p$.e && _el$
|
|
1778
|
-
_v$7 !== _p$.t && _el$
|
|
1779
|
-
_v$8 !== _p$.a && _el$
|
|
1811
|
+
_v$6 !== _p$.e && _el$377.classList.toggle("text-green-600", _p$.e = _v$6);
|
|
1812
|
+
_v$7 !== _p$.t && _el$377.classList.toggle("text-red-600", _p$.t = _v$7);
|
|
1813
|
+
_v$8 !== _p$.a && _el$377.classList.toggle("text-blue-600", _p$.a = _v$8);
|
|
1780
1814
|
return _p$;
|
|
1781
1815
|
}, {
|
|
1782
1816
|
e: void 0,
|
|
1783
1817
|
t: void 0,
|
|
1784
1818
|
a: void 0
|
|
1785
1819
|
});
|
|
1786
|
-
return _el$
|
|
1820
|
+
return _el$376;
|
|
1787
1821
|
}
|
|
1788
|
-
}), _el$
|
|
1789
|
-
web.insert(_el$
|
|
1822
|
+
}), _el$394, _co$98);
|
|
1823
|
+
web.insert(_el$374, web.createComponent(solidJs.Show, {
|
|
1790
1824
|
get when() {
|
|
1791
1825
|
return !submitted();
|
|
1792
1826
|
},
|
|
1793
1827
|
get children() {
|
|
1794
1828
|
return [(() => {
|
|
1795
|
-
var _el$
|
|
1796
|
-
web.insert(_el$
|
|
1829
|
+
var _el$389 = web.getNextElement(_tmpl$77);
|
|
1830
|
+
web.insert(_el$389, web.createComponent(solidJs.For, {
|
|
1797
1831
|
get each() {
|
|
1798
1832
|
return data().options;
|
|
1799
1833
|
},
|
|
1800
1834
|
children: (option) => (() => {
|
|
1801
|
-
var _el$
|
|
1802
|
-
web.addEventListener(_el$
|
|
1803
|
-
web.insert(_el$
|
|
1835
|
+
var _el$397 = web.getNextElement(_tmpl$38), _el$399 = _el$397.firstChild, [_el$400, _co$100] = web.getNextMarker(_el$399.nextSibling), _el$401 = _el$400.nextSibling, [_el$402, _co$101] = web.getNextMarker(_el$401.nextSibling);
|
|
1836
|
+
web.addEventListener(_el$397, "click", () => handleOption(option));
|
|
1837
|
+
web.insert(_el$397, web.createComponent(solidJs.Show, {
|
|
1804
1838
|
get when() {
|
|
1805
1839
|
return option.icon;
|
|
1806
1840
|
},
|
|
1807
1841
|
get children() {
|
|
1808
|
-
var _el$
|
|
1809
|
-
web.insert(_el$
|
|
1810
|
-
return _el$
|
|
1842
|
+
var _el$398 = web.getNextElement(_tmpl$80);
|
|
1843
|
+
web.insert(_el$398, () => option.icon);
|
|
1844
|
+
return _el$398;
|
|
1811
1845
|
}
|
|
1812
|
-
}), _el$
|
|
1813
|
-
web.insert(_el$
|
|
1814
|
-
web.effect(() => web.className(_el$
|
|
1815
|
-
return _el$
|
|
1846
|
+
}), _el$400, _co$100);
|
|
1847
|
+
web.insert(_el$397, () => option.label, _el$402, _co$101);
|
|
1848
|
+
web.effect(() => web.className(_el$397, `px-3 py-1.5 text-sm font-medium rounded-lg transition-colors flex items-center gap-1 ${option.variant === "primary" ? "bg-blue-600 text-white hover:bg-blue-700" : option.variant === "danger" ? "bg-red-600 text-white hover:bg-red-700" : "border border-gray-200 dark:border-gray-600 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700"}`));
|
|
1849
|
+
return _el$397;
|
|
1816
1850
|
})()
|
|
1817
1851
|
}));
|
|
1818
|
-
return _el$
|
|
1852
|
+
return _el$389;
|
|
1819
1853
|
})(), web.createComponent(solidJs.Show, {
|
|
1820
1854
|
get when() {
|
|
1821
1855
|
return data().allowFreeText || showComment();
|
|
1822
1856
|
},
|
|
1823
1857
|
get children() {
|
|
1824
|
-
var _el$
|
|
1825
|
-
_el$
|
|
1826
|
-
web.addEventListener(_el$
|
|
1858
|
+
var _el$390 = web.getNextElement(_tmpl$78), _el$391 = _el$390.firstChild, _el$392 = _el$391.nextSibling;
|
|
1859
|
+
_el$391.$$input = (e) => setComment(e.currentTarget.value);
|
|
1860
|
+
web.addEventListener(_el$392, "click", () => {
|
|
1827
1861
|
var _a;
|
|
1828
1862
|
setSubmitted("comment");
|
|
1863
|
+
setSubmittedLabel("");
|
|
1829
1864
|
(_a = props.onAction) == null ? void 0 : _a.call(props, "feedback", {
|
|
1830
1865
|
option: "comment",
|
|
1831
1866
|
comment: comment(),
|
|
@@ -1833,26 +1868,28 @@ const FeedbackSection = (props) => {
|
|
|
1833
1868
|
stepId: data().stepId
|
|
1834
1869
|
});
|
|
1835
1870
|
});
|
|
1871
|
+
web.insert(_el$392, () => strings.scratchpadSend);
|
|
1836
1872
|
web.effect((_p$) => {
|
|
1837
1873
|
var _v$9 = data().placeholder, _v$0 = showComment();
|
|
1838
|
-
_v$9 !== _p$.e && web.setAttribute(_el$
|
|
1839
|
-
_v$0 !== _p$.t && web.setProperty(_el$
|
|
1874
|
+
_v$9 !== _p$.e && web.setAttribute(_el$391, "placeholder", _p$.e = _v$9);
|
|
1875
|
+
_v$0 !== _p$.t && web.setProperty(_el$391, "autofocus", _p$.t = _v$0);
|
|
1840
1876
|
return _p$;
|
|
1841
1877
|
}, {
|
|
1842
1878
|
e: void 0,
|
|
1843
1879
|
t: void 0
|
|
1844
1880
|
});
|
|
1845
|
-
web.effect(() => web.setProperty(_el$
|
|
1881
|
+
web.effect(() => web.setProperty(_el$391, "value", comment()));
|
|
1846
1882
|
web.runHydrationEvents();
|
|
1847
|
-
return _el$
|
|
1883
|
+
return _el$390;
|
|
1848
1884
|
}
|
|
1849
1885
|
})];
|
|
1850
1886
|
}
|
|
1851
|
-
}), _el$
|
|
1852
|
-
return _el$
|
|
1887
|
+
}), _el$396, _co$99);
|
|
1888
|
+
return _el$374;
|
|
1853
1889
|
})();
|
|
1854
1890
|
};
|
|
1855
1891
|
const PromptSection = (props) => {
|
|
1892
|
+
const strings = MCPUIStringsContext.useMCPUIStrings();
|
|
1856
1893
|
const data = () => {
|
|
1857
1894
|
const c = props.content;
|
|
1858
1895
|
return {
|
|
@@ -1864,56 +1901,58 @@ const PromptSection = (props) => {
|
|
|
1864
1901
|
};
|
|
1865
1902
|
};
|
|
1866
1903
|
return (() => {
|
|
1867
|
-
var _el$
|
|
1868
|
-
web.insert(_el$
|
|
1904
|
+
var _el$403 = web.getNextElement(_tmpl$84), _el$419 = _el$403.firstChild, [_el$420, _co$105] = web.getNextMarker(_el$419.nextSibling), _el$409 = _el$420.nextSibling, _el$421 = _el$409.nextSibling, [_el$422, _co$106] = web.getNextMarker(_el$421.nextSibling), _el$423 = _el$422.nextSibling, [_el$424, _co$107] = web.getNextMarker(_el$423.nextSibling);
|
|
1905
|
+
web.insert(_el$403, web.createComponent(solidJs.Show, {
|
|
1869
1906
|
get when() {
|
|
1870
1907
|
return data().originalQuery;
|
|
1871
1908
|
},
|
|
1872
1909
|
get children() {
|
|
1873
|
-
var _el$
|
|
1874
|
-
_el$
|
|
1875
|
-
web.insert(_el$
|
|
1876
|
-
return _el$
|
|
1910
|
+
var _el$404 = web.getNextElement(_tmpl$81), _el$405 = _el$404.firstChild, _el$407 = _el$405.nextSibling, [_el$408, _co$102] = web.getNextMarker(_el$407.nextSibling);
|
|
1911
|
+
_el$408.nextSibling;
|
|
1912
|
+
web.insert(_el$404, () => data().originalQuery, _el$408, _co$102);
|
|
1913
|
+
return _el$404;
|
|
1877
1914
|
}
|
|
1878
|
-
}), _el$
|
|
1879
|
-
web.insert(_el$
|
|
1915
|
+
}), _el$420, _co$105);
|
|
1916
|
+
web.insert(_el$409, web.createComponent(solidJs.For, {
|
|
1880
1917
|
get each() {
|
|
1881
1918
|
return Object.entries(data().extracted);
|
|
1882
1919
|
},
|
|
1883
1920
|
children: ([key, value]) => (() => {
|
|
1884
|
-
var _el$
|
|
1885
|
-
_el$
|
|
1886
|
-
var _el$
|
|
1887
|
-
web.insert(_el$
|
|
1888
|
-
web.insert(_el$
|
|
1889
|
-
return _el$
|
|
1921
|
+
var _el$425 = web.getNextElement(_tmpl$85), _el$426 = _el$425.firstChild, _el$428 = _el$426.firstChild, [_el$429, _co$108] = web.getNextMarker(_el$428.nextSibling);
|
|
1922
|
+
_el$429.nextSibling;
|
|
1923
|
+
var _el$430 = _el$426.nextSibling;
|
|
1924
|
+
web.insert(_el$426, key, _el$429, _co$108);
|
|
1925
|
+
web.insert(_el$430, () => String(value));
|
|
1926
|
+
return _el$425;
|
|
1890
1927
|
})()
|
|
1891
1928
|
}));
|
|
1892
|
-
web.insert(_el$
|
|
1929
|
+
web.insert(_el$403, web.createComponent(solidJs.Show, {
|
|
1893
1930
|
get when() {
|
|
1894
1931
|
return data().plan;
|
|
1895
1932
|
},
|
|
1896
1933
|
get children() {
|
|
1897
|
-
var _el$
|
|
1898
|
-
web.insert(_el$
|
|
1899
|
-
|
|
1934
|
+
var _el$410 = web.getNextElement(_tmpl$82), _el$411 = _el$410.firstChild, _el$412 = _el$411.nextSibling, _el$413 = _el$412.nextSibling, [_el$414, _co$103] = web.getNextMarker(_el$413.nextSibling);
|
|
1935
|
+
web.insert(_el$411, () => strings.scratchpadPlan);
|
|
1936
|
+
web.insert(_el$410, () => data().plan, _el$414, _co$103);
|
|
1937
|
+
return _el$410;
|
|
1900
1938
|
}
|
|
1901
|
-
}), _el$
|
|
1902
|
-
web.insert(_el$
|
|
1939
|
+
}), _el$422, _co$106);
|
|
1940
|
+
web.insert(_el$403, web.createComponent(solidJs.Show, {
|
|
1903
1941
|
get when() {
|
|
1904
1942
|
return data().editable;
|
|
1905
1943
|
},
|
|
1906
1944
|
get children() {
|
|
1907
|
-
var _el$
|
|
1908
|
-
_el$
|
|
1945
|
+
var _el$415 = web.getNextElement(_tmpl$83), _el$416 = _el$415.firstChild, _el$417 = _el$416.nextSibling, [_el$418, _co$104] = web.getNextMarker(_el$417.nextSibling);
|
|
1946
|
+
_el$415.$$click = () => {
|
|
1909
1947
|
var _a;
|
|
1910
1948
|
return (_a = props.onAction) == null ? void 0 : _a.call(props, "edit_prompt", data());
|
|
1911
1949
|
};
|
|
1950
|
+
web.insert(_el$415, () => strings.scratchpadModify, _el$418, _co$104);
|
|
1912
1951
|
web.runHydrationEvents();
|
|
1913
|
-
return _el$
|
|
1952
|
+
return _el$415;
|
|
1914
1953
|
}
|
|
1915
|
-
}), _el$
|
|
1916
|
-
return _el$
|
|
1954
|
+
}), _el$424, _co$107);
|
|
1955
|
+
return _el$403;
|
|
1917
1956
|
})();
|
|
1918
1957
|
};
|
|
1919
1958
|
const StepperProgressSection = (props) => {
|
|
@@ -1943,46 +1982,46 @@ const StepperProgressSection = (props) => {
|
|
|
1943
1982
|
},
|
|
1944
1983
|
get fallback() {
|
|
1945
1984
|
return (() => {
|
|
1946
|
-
var _el$
|
|
1947
|
-
web.insert(_el$
|
|
1985
|
+
var _el$432 = web.getNextElement(_tmpl$87);
|
|
1986
|
+
web.insert(_el$432, web.createComponent(solidJs.For, {
|
|
1948
1987
|
get each() {
|
|
1949
1988
|
return data().steps;
|
|
1950
1989
|
},
|
|
1951
1990
|
children: (step) => (() => {
|
|
1952
|
-
var _el$
|
|
1953
|
-
web.insert(_el$
|
|
1954
|
-
web.insert(_el$
|
|
1955
|
-
web.insert(_el$
|
|
1991
|
+
var _el$433 = web.getNextElement(_tmpl$90), _el$434 = _el$433.firstChild, _el$435 = _el$434.nextSibling, _el$436 = _el$435.firstChild, _el$446 = _el$436.nextSibling, [_el$447, _co$111] = web.getNextMarker(_el$446.nextSibling), _el$448 = _el$447.nextSibling, [_el$449, _co$112] = web.getNextMarker(_el$448.nextSibling);
|
|
1992
|
+
web.insert(_el$434, () => statusIcon(step.status));
|
|
1993
|
+
web.insert(_el$436, () => step.label);
|
|
1994
|
+
web.insert(_el$435, web.createComponent(solidJs.Show, {
|
|
1956
1995
|
get when() {
|
|
1957
1996
|
return step.summary;
|
|
1958
1997
|
},
|
|
1959
1998
|
get children() {
|
|
1960
|
-
var _el$
|
|
1961
|
-
web.insert(_el$
|
|
1962
|
-
return _el$
|
|
1999
|
+
var _el$437 = web.getNextElement(_tmpl$88), _el$438 = _el$437.firstChild, _el$439 = _el$438.nextSibling, [_el$440, _co$109] = web.getNextMarker(_el$439.nextSibling);
|
|
2000
|
+
web.insert(_el$437, () => step.summary, _el$440, _co$109);
|
|
2001
|
+
return _el$437;
|
|
1963
2002
|
}
|
|
1964
|
-
}), _el$
|
|
1965
|
-
web.insert(_el$
|
|
2003
|
+
}), _el$447, _co$111);
|
|
2004
|
+
web.insert(_el$435, web.createComponent(solidJs.Show, {
|
|
1966
2005
|
get when() {
|
|
1967
2006
|
return step.duration_ms;
|
|
1968
2007
|
},
|
|
1969
2008
|
get children() {
|
|
1970
|
-
var _el$
|
|
1971
|
-
_el$
|
|
1972
|
-
web.insert(_el$
|
|
1973
|
-
return _el$
|
|
2009
|
+
var _el$441 = web.getNextElement(_tmpl$89), _el$442 = _el$441.firstChild, _el$444 = _el$442.nextSibling, [_el$445, _co$110] = web.getNextMarker(_el$444.nextSibling);
|
|
2010
|
+
_el$445.nextSibling;
|
|
2011
|
+
web.insert(_el$441, () => step.duration_ms, _el$445, _co$110);
|
|
2012
|
+
return _el$441;
|
|
1974
2013
|
}
|
|
1975
|
-
}), _el$
|
|
1976
|
-
web.effect(() => web.className(_el$
|
|
1977
|
-
return _el$
|
|
2014
|
+
}), _el$449, _co$112);
|
|
2015
|
+
web.effect(() => web.className(_el$433, `flex items-start gap-2 text-sm ${step.status === "active" ? "font-medium" : ""} ${step.status === "pending" ? "text-gray-400" : "text-gray-700 dark:text-gray-300"}`));
|
|
2016
|
+
return _el$433;
|
|
1978
2017
|
})()
|
|
1979
2018
|
}));
|
|
1980
|
-
return _el$
|
|
2019
|
+
return _el$432;
|
|
1981
2020
|
})();
|
|
1982
2021
|
},
|
|
1983
2022
|
get children() {
|
|
1984
|
-
var _el$
|
|
1985
|
-
web.insert(_el$
|
|
2023
|
+
var _el$431 = web.getNextElement(_tmpl$86);
|
|
2024
|
+
web.insert(_el$431, web.createComponent(solidJs.For, {
|
|
1986
2025
|
get each() {
|
|
1987
2026
|
return data().steps;
|
|
1988
2027
|
},
|
|
@@ -1994,36 +2033,37 @@ const StepperProgressSection = (props) => {
|
|
|
1994
2033
|
return web.getNextElement(_tmpl$13);
|
|
1995
2034
|
}
|
|
1996
2035
|
}), (() => {
|
|
1997
|
-
var _el$
|
|
1998
|
-
web.insert(_el$
|
|
1999
|
-
web.insert(_el$
|
|
2000
|
-
web.insert(_el$
|
|
2036
|
+
var _el$451 = web.getNextElement(_tmpl$92), _el$452 = _el$451.firstChild, _el$453 = _el$452.nextSibling, _el$455 = _el$453.nextSibling, [_el$456, _co$113] = web.getNextMarker(_el$455.nextSibling);
|
|
2037
|
+
web.insert(_el$452, () => statusIcon(step.status));
|
|
2038
|
+
web.insert(_el$453, () => step.label);
|
|
2039
|
+
web.insert(_el$451, web.createComponent(solidJs.Show, {
|
|
2001
2040
|
get when() {
|
|
2002
2041
|
return step.summary;
|
|
2003
2042
|
},
|
|
2004
2043
|
get children() {
|
|
2005
|
-
var _el$
|
|
2006
|
-
web.insert(_el$
|
|
2007
|
-
return _el$
|
|
2044
|
+
var _el$454 = web.getNextElement(_tmpl$91);
|
|
2045
|
+
web.insert(_el$454, () => step.summary);
|
|
2046
|
+
return _el$454;
|
|
2008
2047
|
}
|
|
2009
|
-
}), _el$
|
|
2010
|
-
web.effect(() => web.className(_el$
|
|
2011
|
-
return _el$
|
|
2048
|
+
}), _el$456, _co$113);
|
|
2049
|
+
web.effect(() => web.className(_el$451, `flex items-center gap-1 px-2 py-1 rounded text-xs ${step.status === "done" ? "bg-green-50 dark:bg-green-900/20 text-green-700 dark:text-green-400" : step.status === "active" ? "bg-blue-50 dark:bg-blue-900/20 text-blue-700 dark:text-blue-400 font-medium animate-pulse" : step.status === "error" ? "bg-red-50 dark:bg-red-900/20 text-red-700 dark:text-red-400" : "text-gray-400"}`));
|
|
2050
|
+
return _el$451;
|
|
2012
2051
|
})()]
|
|
2013
2052
|
}));
|
|
2014
|
-
return _el$
|
|
2053
|
+
return _el$431;
|
|
2015
2054
|
}
|
|
2016
2055
|
});
|
|
2017
2056
|
};
|
|
2018
2057
|
const ErrorSectionRenderer = (props) => {
|
|
2058
|
+
const strings = MCPUIStringsContext.useMCPUIStrings();
|
|
2019
2059
|
const [showDetails, setShowDetails] = solidJs.createSignal(false);
|
|
2020
2060
|
const data = () => {
|
|
2021
2061
|
const c = props.content;
|
|
2022
2062
|
const d = {
|
|
2023
|
-
message: (c == null ? void 0 : c.message) ||
|
|
2063
|
+
message: (c == null ? void 0 : c.message) || strings.scratchpadError,
|
|
2024
2064
|
severity: (c == null ? void 0 : c.severity) || "error",
|
|
2025
2065
|
retryAction: c == null ? void 0 : c.retryAction,
|
|
2026
|
-
retryLabel: (c == null ? void 0 : c.retryLabel) ||
|
|
2066
|
+
retryLabel: (c == null ? void 0 : c.retryLabel) || strings.retry,
|
|
2027
2067
|
details: c == null ? void 0 : c.details,
|
|
2028
2068
|
timestamp: c == null ? void 0 : c.timestamp
|
|
2029
2069
|
};
|
|
@@ -2032,55 +2072,57 @@ const ErrorSectionRenderer = (props) => {
|
|
|
2032
2072
|
};
|
|
2033
2073
|
const isWarning = () => data().severity === "warning";
|
|
2034
2074
|
return (() => {
|
|
2035
|
-
var _el$
|
|
2036
|
-
web.insert(_el$
|
|
2037
|
-
web.insert(_el$
|
|
2038
|
-
web.insert(_el$
|
|
2075
|
+
var _el$457 = web.getNextElement(_tmpl$96), _el$458 = _el$457.firstChild, _el$459 = _el$458.firstChild, _el$460 = _el$459.nextSibling, _el$461 = _el$460.firstChild, _el$462 = _el$461.nextSibling, _el$471 = _el$462.firstChild, [_el$472, _co$116] = web.getNextMarker(_el$471.nextSibling), _el$473 = _el$472.nextSibling, [_el$474, _co$117] = web.getNextMarker(_el$473.nextSibling), _el$476 = _el$462.nextSibling, [_el$477, _co$118] = web.getNextMarker(_el$476.nextSibling);
|
|
2076
|
+
web.insert(_el$459, () => isWarning() ? "โ ๏ธ" : "โ");
|
|
2077
|
+
web.insert(_el$461, () => data().message);
|
|
2078
|
+
web.insert(_el$462, web.createComponent(solidJs.Show, {
|
|
2039
2079
|
get when() {
|
|
2040
2080
|
return data().retryAction;
|
|
2041
2081
|
},
|
|
2042
2082
|
get children() {
|
|
2043
|
-
var _el$
|
|
2044
|
-
_el$
|
|
2083
|
+
var _el$463 = web.getNextElement(_tmpl$93), _el$464 = _el$463.firstChild, _el$465 = _el$464.nextSibling, [_el$466, _co$114] = web.getNextMarker(_el$465.nextSibling);
|
|
2084
|
+
_el$463.$$click = () => {
|
|
2045
2085
|
var _a;
|
|
2046
2086
|
return (_a = props.onAction) == null ? void 0 : _a.call(props, data().retryAction);
|
|
2047
2087
|
};
|
|
2048
|
-
web.insert(_el$
|
|
2049
|
-
web.effect(() => web.className(_el$
|
|
2088
|
+
web.insert(_el$463, () => data().retryLabel, _el$466, _co$114);
|
|
2089
|
+
web.effect(() => web.className(_el$463, `px-2 py-1 text-xs font-medium rounded ${isWarning() ? "bg-amber-600 text-white hover:bg-amber-700" : "bg-red-600 text-white hover:bg-red-700"} transition-colors`));
|
|
2050
2090
|
web.runHydrationEvents();
|
|
2051
|
-
return _el$
|
|
2091
|
+
return _el$463;
|
|
2052
2092
|
}
|
|
2053
|
-
}), _el$
|
|
2054
|
-
web.insert(_el$
|
|
2093
|
+
}), _el$472, _co$116);
|
|
2094
|
+
web.insert(_el$462, web.createComponent(solidJs.Show, {
|
|
2055
2095
|
get when() {
|
|
2056
2096
|
return data().details;
|
|
2057
2097
|
},
|
|
2058
2098
|
get children() {
|
|
2059
|
-
var _el$
|
|
2060
|
-
_el$
|
|
2099
|
+
var _el$467 = web.getNextElement(_tmpl$94), _el$468 = _el$467.firstChild, _el$469 = _el$468.nextSibling, [_el$470, _co$115] = web.getNextMarker(_el$469.nextSibling);
|
|
2100
|
+
_el$467.$$click = () => setShowDetails(!showDetails());
|
|
2101
|
+
web.insert(_el$467, () => strings.scratchpadDetails, _el$470, _co$115);
|
|
2061
2102
|
web.runHydrationEvents();
|
|
2062
|
-
return _el$
|
|
2103
|
+
return _el$467;
|
|
2063
2104
|
}
|
|
2064
|
-
}), _el$
|
|
2065
|
-
web.insert(_el$
|
|
2105
|
+
}), _el$474, _co$117);
|
|
2106
|
+
web.insert(_el$460, web.createComponent(solidJs.Show, {
|
|
2066
2107
|
get when() {
|
|
2067
2108
|
return web.memo(() => !!showDetails())() && data().details;
|
|
2068
2109
|
},
|
|
2069
2110
|
get children() {
|
|
2070
|
-
var _el$
|
|
2071
|
-
web.insert(_el$
|
|
2072
|
-
return _el$
|
|
2111
|
+
var _el$475 = web.getNextElement(_tmpl$95);
|
|
2112
|
+
web.insert(_el$475, () => data().details);
|
|
2113
|
+
return _el$475;
|
|
2073
2114
|
}
|
|
2074
|
-
}), _el$
|
|
2075
|
-
web.effect(() => web.className(_el$
|
|
2076
|
-
return _el$
|
|
2115
|
+
}), _el$477, _co$118);
|
|
2116
|
+
web.effect(() => web.className(_el$457, `rounded-lg px-3 py-2 text-sm ${isWarning() ? "bg-amber-50 dark:bg-amber-900/10 text-amber-700 dark:text-amber-400 border border-amber-200 dark:border-amber-800" : "bg-red-50 dark:bg-red-900/10 text-red-700 dark:text-red-400 border border-red-200 dark:border-red-800"}`));
|
|
2117
|
+
return _el$457;
|
|
2077
2118
|
})();
|
|
2078
2119
|
};
|
|
2079
2120
|
const SourceCardSection = (props) => {
|
|
2121
|
+
const strings = MCPUIStringsContext.useMCPUIStrings();
|
|
2080
2122
|
const data = () => {
|
|
2081
2123
|
const c = props.content;
|
|
2082
2124
|
return {
|
|
2083
|
-
name: (c == null ? void 0 : c.name) ||
|
|
2125
|
+
name: (c == null ? void 0 : c.name) || strings.scratchpadSource,
|
|
2084
2126
|
status: (c == null ? void 0 : c.status) || "available",
|
|
2085
2127
|
capabilities: (c == null ? void 0 : c.capabilities) || [],
|
|
2086
2128
|
latency_ms: c == null ? void 0 : c.latency_ms,
|
|
@@ -2094,46 +2136,47 @@ const SourceCardSection = (props) => {
|
|
|
2094
2136
|
error: "โ"
|
|
2095
2137
|
})[data().status] || "๐ฆ";
|
|
2096
2138
|
return (() => {
|
|
2097
|
-
var _el$
|
|
2098
|
-
web.insert(_el$
|
|
2099
|
-
web.insert(_el$
|
|
2100
|
-
web.insert(_el$
|
|
2139
|
+
var _el$478 = web.getNextElement(_tmpl$99), _el$479 = _el$478.firstChild, _el$480 = _el$479.firstChild, _el$482 = _el$480.firstChild, [_el$483, _co$119] = web.getNextMarker(_el$482.nextSibling), _el$481 = _el$483.nextSibling, _el$484 = _el$481.nextSibling, [_el$485, _co$120] = web.getNextMarker(_el$484.nextSibling), _el$487 = _el$480.nextSibling, [_el$488, _co$121] = web.getNextMarker(_el$487.nextSibling), _el$489 = _el$479.nextSibling, _el$491 = _el$489.nextSibling, [_el$492, _co$122] = web.getNextMarker(_el$491.nextSibling);
|
|
2140
|
+
web.insert(_el$480, statusIcon, _el$483, _co$119);
|
|
2141
|
+
web.insert(_el$480, () => data().name, _el$485, _co$120);
|
|
2142
|
+
web.insert(_el$479, web.createComponent(solidJs.Show, {
|
|
2101
2143
|
get when() {
|
|
2102
2144
|
return data().row_count !== void 0;
|
|
2103
2145
|
},
|
|
2104
2146
|
get children() {
|
|
2105
|
-
var _el$
|
|
2106
|
-
_el$
|
|
2107
|
-
web.insert(_el$501, () => {
|
|
2147
|
+
var _el$486 = web.getNextElement(_tmpl$97);
|
|
2148
|
+
web.insert(_el$486, () => {
|
|
2108
2149
|
var _a;
|
|
2109
|
-
return (
|
|
2110
|
-
|
|
2111
|
-
|
|
2150
|
+
return formatString.formatMCPUIString(strings.scratchpadResultCount, {
|
|
2151
|
+
count: ((_a = data().row_count) == null ? void 0 : _a.toLocaleString(strings.locale)) ?? ""
|
|
2152
|
+
});
|
|
2153
|
+
});
|
|
2154
|
+
return _el$486;
|
|
2112
2155
|
}
|
|
2113
|
-
}), _el$
|
|
2114
|
-
web.insert(_el$
|
|
2156
|
+
}), _el$488, _co$121);
|
|
2157
|
+
web.insert(_el$489, web.createComponent(solidJs.For, {
|
|
2115
2158
|
get each() {
|
|
2116
2159
|
return data().capabilities;
|
|
2117
2160
|
},
|
|
2118
2161
|
children: (cap) => (() => {
|
|
2119
|
-
var _el$
|
|
2120
|
-
web.insert(_el$
|
|
2121
|
-
web.insert(_el$
|
|
2122
|
-
web.effect(() => web.className(_el$
|
|
2123
|
-
return _el$
|
|
2162
|
+
var _el$493 = web.getNextElement(_tmpl$100), _el$495 = _el$493.firstChild, [_el$496, _co$123] = web.getNextMarker(_el$495.nextSibling), _el$494 = _el$496.nextSibling, _el$497 = _el$494.nextSibling, [_el$498, _co$124] = web.getNextMarker(_el$497.nextSibling);
|
|
2163
|
+
web.insert(_el$493, () => cap.supported ? "โ
" : "โ", _el$496, _co$123);
|
|
2164
|
+
web.insert(_el$493, () => cap.label, _el$498, _co$124);
|
|
2165
|
+
web.effect(() => web.className(_el$493, `text-[10px] px-1.5 py-0.5 rounded ${cap.supported ? "bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-400" : "bg-red-100 dark:bg-red-900/30 text-red-600 dark:text-red-400"}`));
|
|
2166
|
+
return _el$493;
|
|
2124
2167
|
})()
|
|
2125
2168
|
}));
|
|
2126
|
-
web.insert(_el$
|
|
2169
|
+
web.insert(_el$478, web.createComponent(solidJs.Show, {
|
|
2127
2170
|
get when() {
|
|
2128
2171
|
return data().freshness || data().latency_ms;
|
|
2129
2172
|
},
|
|
2130
2173
|
get children() {
|
|
2131
|
-
var _el$
|
|
2132
|
-
web.insert(_el$
|
|
2133
|
-
return _el$
|
|
2174
|
+
var _el$490 = web.getNextElement(_tmpl$98);
|
|
2175
|
+
web.insert(_el$490, () => [data().freshness, data().latency_ms ? `${data().latency_ms}ms` : ""].filter(Boolean).join(" ยท "));
|
|
2176
|
+
return _el$490;
|
|
2134
2177
|
}
|
|
2135
|
-
}), _el$
|
|
2136
|
-
return _el$
|
|
2178
|
+
}), _el$492, _co$122);
|
|
2179
|
+
return _el$478;
|
|
2137
2180
|
})();
|
|
2138
2181
|
};
|
|
2139
2182
|
const DiffSection = (props) => {
|
|
@@ -2157,10 +2200,10 @@ const DiffSection = (props) => {
|
|
|
2157
2200
|
return [.../* @__PURE__ */ new Set([...Object.keys(l), ...Object.keys(r)])];
|
|
2158
2201
|
};
|
|
2159
2202
|
return (() => {
|
|
2160
|
-
var _el$
|
|
2161
|
-
web.insert(_el$
|
|
2162
|
-
web.insert(_el$
|
|
2163
|
-
web.insert(_el$
|
|
2203
|
+
var _el$499 = web.getNextElement(_tmpl$101), _el$500 = _el$499.firstChild, _el$501 = _el$500.firstChild, _el$502 = _el$501.firstChild, _el$503 = _el$502.firstChild, _el$504 = _el$503.nextSibling, _el$505 = _el$504.nextSibling, _el$506 = _el$501.nextSibling;
|
|
2204
|
+
web.insert(_el$504, () => data().left.label);
|
|
2205
|
+
web.insert(_el$505, () => data().right.label);
|
|
2206
|
+
web.insert(_el$506, web.createComponent(solidJs.For, {
|
|
2164
2207
|
get each() {
|
|
2165
2208
|
return allKeys();
|
|
2166
2209
|
},
|
|
@@ -2175,22 +2218,22 @@ const DiffSection = (props) => {
|
|
|
2175
2218
|
};
|
|
2176
2219
|
const isDiff = () => String(lVal()) !== String(rVal()) && data().highlight.includes(key);
|
|
2177
2220
|
return (() => {
|
|
2178
|
-
var _el$
|
|
2179
|
-
web.insert(_el$
|
|
2180
|
-
web.insert(_el$
|
|
2181
|
-
var _c$
|
|
2182
|
-
return () => _c$
|
|
2221
|
+
var _el$507 = web.getNextElement(_tmpl$102), _el$508 = _el$507.firstChild, _el$509 = _el$508.nextSibling, _el$510 = _el$509.nextSibling;
|
|
2222
|
+
web.insert(_el$508, key);
|
|
2223
|
+
web.insert(_el$509, (() => {
|
|
2224
|
+
var _c$9 = web.memo(() => lVal() !== void 0);
|
|
2225
|
+
return () => _c$9() ? String(lVal()) : "โ";
|
|
2183
2226
|
})());
|
|
2184
|
-
web.insert(_el$
|
|
2185
|
-
var _c$
|
|
2186
|
-
return () => _c$
|
|
2227
|
+
web.insert(_el$510, (() => {
|
|
2228
|
+
var _c$0 = web.memo(() => rVal() !== void 0);
|
|
2229
|
+
return () => _c$0() ? String(rVal()) : "โ";
|
|
2187
2230
|
})());
|
|
2188
|
-
web.effect(() => web.className(_el$
|
|
2189
|
-
return _el$
|
|
2231
|
+
web.effect(() => web.className(_el$507, `border-t border-gray-100 dark:border-gray-700 ${isDiff() ? "bg-yellow-50 dark:bg-yellow-900/10" : ""}`));
|
|
2232
|
+
return _el$507;
|
|
2190
2233
|
})();
|
|
2191
2234
|
}
|
|
2192
2235
|
}));
|
|
2193
|
-
return _el$
|
|
2236
|
+
return _el$499;
|
|
2194
2237
|
})();
|
|
2195
2238
|
};
|
|
2196
2239
|
web.delegateEvents(["click", "input"]);
|