@webmcp-auto-ui/ui 2.5.14 → 2.5.16
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
CHANGED
|
@@ -137,8 +137,11 @@
|
|
|
137
137
|
customRenderer ? undefined : NATIVE_MAP[type],
|
|
138
138
|
);
|
|
139
139
|
|
|
140
|
-
// Deep-clone data to strip Svelte 5 $state proxies —
|
|
141
|
-
// (
|
|
140
|
+
// Deep-clone data to strip Svelte 5 $state proxies — only needed for vanilla
|
|
141
|
+
// renderers whose third-party libs (Cytoscape, Plotly, etc.) use
|
|
142
|
+
// Object.defineProperty which conflicts with Svelte 5 proxies.
|
|
143
|
+
// Native Svelte components handle proxied data fine and benefit from
|
|
144
|
+
// fine-grained reactivity, so they receive raw `data` directly.
|
|
142
145
|
const plainData: Record<string, unknown> = $derived(JSON.parse(JSON.stringify(data)));
|
|
143
146
|
|
|
144
147
|
// ── Vanilla renderer container + lifecycle ────────────
|
|
@@ -221,9 +224,9 @@
|
|
|
221
224
|
{#if isVanillaRenderer}
|
|
222
225
|
<div bind:this={vanillaContainer} class="vanilla-container w-full h-full overflow-auto p-2"></div>
|
|
223
226
|
{:else if customRenderer}
|
|
224
|
-
<svelte:component this={customRenderer as Component<any>} data
|
|
227
|
+
<svelte:component this={customRenderer as Component<any>} {data} {id} />
|
|
225
228
|
{:else if nativeEntry}
|
|
226
|
-
<svelte:component this={nativeEntry.component} {...nativeEntry.props(
|
|
229
|
+
<svelte:component this={nativeEntry.component} {...nativeEntry.props(data, emit)} />
|
|
227
230
|
{:else}
|
|
228
231
|
<div class="p-3 font-mono text-xs text-text2">[{type}]</div>
|
|
229
232
|
{/if}
|
package/src/wm/FlexLayout.svelte
CHANGED
|
@@ -39,40 +39,42 @@
|
|
|
39
39
|
|
|
40
40
|
<div class="relative w-full h-full overflow-y-auto" bind:this={el}>
|
|
41
41
|
|
|
42
|
-
{#if
|
|
43
|
-
|
|
44
|
-
<
|
|
45
|
-
<
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
42
|
+
{#if cw > 0}
|
|
43
|
+
{#if showSlider && !mobile}
|
|
44
|
+
<div class="sticky top-0 z-10 flex items-center justify-end px-3 py-1.5 gap-2">
|
|
45
|
+
<label class="flex items-center gap-2 font-mono text-[10px] text-text2 select-none">
|
|
46
|
+
<span>Size</span>
|
|
47
|
+
<input type="range" min="0" max="1" step="0.01"
|
|
48
|
+
bind:value={scale}
|
|
49
|
+
class="w-24 h-1 accent-[var(--color-accent,#6366f1)]" />
|
|
50
|
+
<span class="w-10 text-right tabular-nums">{currentMinW}px</span>
|
|
51
|
+
</label>
|
|
52
|
+
</div>
|
|
53
|
+
{/if}
|
|
53
54
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
55
|
+
{#if mobile}
|
|
56
|
+
<div class="flex flex-col gap-3 p-2">
|
|
57
|
+
{#each windows as win (win.id)}
|
|
58
|
+
{#if win.visible !== false}
|
|
59
|
+
{@const lw = { id: win.id, x: 0, y: 0, width: cw, height: 0, zIndex: 1, visible: true, folded: win.folded }}
|
|
60
|
+
<div>
|
|
61
|
+
{@render children(win, lw, { scale })}
|
|
62
|
+
</div>
|
|
63
|
+
{/if}
|
|
64
|
+
{/each}
|
|
65
|
+
</div>
|
|
66
|
+
{:else}
|
|
67
|
+
<div class="flex-grid" style="--min-w:{currentMinW}px;--gap:{gap}px;">
|
|
68
|
+
{#each windows as win (win.id)}
|
|
69
|
+
{#if win.visible !== false}
|
|
70
|
+
{@const lw = makeLw(win)}
|
|
71
|
+
<div class="flex-grid-item rounded-lg">
|
|
72
|
+
{@render children(win, lw, { scale })}
|
|
73
|
+
</div>
|
|
74
|
+
{/if}
|
|
75
|
+
{/each}
|
|
76
|
+
</div>
|
|
77
|
+
{/if}
|
|
76
78
|
{/if}
|
|
77
79
|
|
|
78
80
|
</div>
|