@webmcp-auto-ui/ui 2.5.36 → 2.5.38
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/package.json +3 -1
- package/src/agent/MCPserversList.svelte +44 -32
- package/src/agent/RecipeBrowser.svelte +54 -18
- package/src/agent/RemoteMCPserversDemo.svelte +7 -7
- package/src/agent/ToolBrowser.svelte +34 -5
- package/src/agent/WebMCPserversList.svelte +85 -40
- package/src/base/chat-inline.svelte +81 -9
- package/src/index.ts +1 -0
- package/src/primitives/MarkdownView.svelte +12 -2
- package/src/recipe/RecipeCodeBlock.svelte +10 -2
- package/src/recipe/RecipeRunModal.svelte +245 -0
- package/src/widgets/WidgetRenderer.svelte +8 -5
- package/src/widgets/notebook/executors/sql.ts +9 -6
- package/src/widgets/notebook/import-modal-api.ts +15 -19
- package/src/widgets/notebook/import-modal.svelte +5 -4
- package/src/widgets/notebook/left-pane.ts +23 -3
- package/src/widgets/notebook/notebook.svelte +0 -1
- package/src/widgets/notebook/notebook.ts +437 -80
- package/src/widgets/notebook/resource-extractor.ts +16 -1
- package/src/widgets/notebook/share-handlers.ts +90 -1
- package/src/widgets/notebook/shared.ts +260 -88
- package/src/widgets/rich/cards.svelte +3 -1
- package/src/widgets/rich/chart-rich.svelte +73 -7
- package/src/widgets/rich/data-table.svelte +28 -7
- package/src/widgets/rich/map.svelte +392 -0
- package/src/widgets/rich/stat-card.svelte +119 -20
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
// Collapsed by default.
|
|
7
7
|
// ---------------------------------------------------------------------------
|
|
8
8
|
|
|
9
|
-
import {
|
|
9
|
+
import { canvas } from '@webmcp-auto-ui/sdk/canvas';
|
|
10
10
|
import { openRecipeViewerModal, openToolViewerModal, type ImportedRecipe } from './import-modal-api.js';
|
|
11
11
|
import type { NotebookCell, NotebookState, DataServerDescriptor } from './shared.js';
|
|
12
12
|
|
|
@@ -67,13 +67,22 @@ export function mountLeftPane(
|
|
|
67
67
|
serversEl.innerHTML = '<div class="nb-lp-empty">No servers connected.</div>';
|
|
68
68
|
return;
|
|
69
69
|
}
|
|
70
|
+
let lastGroup: 'data' | 'webmcp' | null = null;
|
|
70
71
|
for (const srv of servers) {
|
|
72
|
+
const group: 'data' | 'webmcp' = srv.kind === 'webmcp' ? 'webmcp' : 'data';
|
|
73
|
+
if (group !== lastGroup) {
|
|
74
|
+
const header = document.createElement('div');
|
|
75
|
+
header.className = 'nb-lp-group-header';
|
|
76
|
+
header.textContent = group === 'webmcp' ? 'Widgets' : 'Data';
|
|
77
|
+
serversEl.appendChild(header);
|
|
78
|
+
lastGroup = group;
|
|
79
|
+
}
|
|
71
80
|
const section = document.createElement('section');
|
|
72
81
|
section.className = 'nb-lp-srv';
|
|
73
82
|
section.innerHTML = `
|
|
74
83
|
<header class="nb-lp-srv-head">
|
|
75
84
|
<span class="nb-lp-srv-dot"></span>
|
|
76
|
-
<span class="nb-lp-srv-name">${escapeHtml(srv.name)}</span>
|
|
85
|
+
<span class="nb-lp-srv-name">${escapeHtml(srv.serverName ?? srv.label ?? srv.name)}</span>
|
|
77
86
|
</header>
|
|
78
87
|
<div class="nb-lp-srv-groups">
|
|
79
88
|
${srv.recipes?.length ? `
|
|
@@ -132,9 +141,13 @@ export function mountLeftPane(
|
|
|
132
141
|
if (!imported.body && recipeBodyCache.has(key)) {
|
|
133
142
|
imported.body = recipeBodyCache.get(key);
|
|
134
143
|
}
|
|
144
|
+
// Bundled WebMCP servers expose recipe bodies inline — no MCP roundtrip.
|
|
145
|
+
if (!imported.body && srv.kind === 'webmcp') {
|
|
146
|
+
imported.body = `> ⚠ Recipe \`${r.name}\` (server \`${srv.name}\`) has no inline body.`;
|
|
147
|
+
}
|
|
135
148
|
if (!imported.body) {
|
|
136
149
|
try {
|
|
137
|
-
const res: any = await
|
|
150
|
+
const res: any = await canvas.callTool(srv.name, 'get_recipe', { name: r.name, id: r.name });
|
|
138
151
|
const text = res?.content?.find?.((c: any) => c.type === 'text')?.text;
|
|
139
152
|
if (text) {
|
|
140
153
|
let body = text;
|
|
@@ -245,6 +258,13 @@ function injectLeftPaneStyles() {
|
|
|
245
258
|
.nb-lp-title { flex: 1; font-weight: 600; font-size: 12px; }
|
|
246
259
|
.nb-lp-close { background: none; border: none; cursor: pointer; font-size: 16px; color: var(--color-text2, #666); }
|
|
247
260
|
.nb-lp-servers { overflow-y: auto; padding: 8px 10px 12px; flex: 1; }
|
|
261
|
+
.nb-lp-group-header {
|
|
262
|
+
font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
|
|
263
|
+
color: var(--color-text2, #888); padding: 6px 2px 4px;
|
|
264
|
+
border-bottom: 1px dashed var(--color-border, #e4e4e7);
|
|
265
|
+
margin-bottom: 6px;
|
|
266
|
+
}
|
|
267
|
+
.nb-lp-group-header:not(:first-child) { margin-top: 14px; }
|
|
248
268
|
.nb-lp-srv { margin-bottom: 10px; }
|
|
249
269
|
.nb-lp-srv-head {
|
|
250
270
|
display: flex; align-items: center; gap: 6px;
|