@webmcp-auto-ui/ui 2.5.12 → 2.5.14

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webmcp-auto-ui/ui",
3
- "version": "2.5.12",
3
+ "version": "2.5.14",
4
4
  "description": "Svelte 5 UI components — primitives, widgets, window manager",
5
5
  "license": "AGPL-3.0-or-later",
6
6
  "type": "module",
@@ -137,6 +137,10 @@
137
137
  customRenderer ? undefined : NATIVE_MAP[type],
138
138
  );
139
139
 
140
+ // Deep-clone data to strip Svelte 5 $state proxies — third-party libs
141
+ // (Chart.js, Cytoscape, etc.) use Object.defineProperty which conflicts.
142
+ const plainData: Record<string, unknown> = $derived(JSON.parse(JSON.stringify(data)));
143
+
140
144
  // ── Vanilla renderer container + lifecycle ────────────
141
145
  let vanillaContainer: HTMLElement | undefined = $state(undefined);
142
146
 
@@ -144,9 +148,9 @@
144
148
  if (!isVanillaRenderer || !vanillaContainer) return;
145
149
  // Clear previous content
146
150
  vanillaContainer.innerHTML = '';
147
- // Call the vanilla renderer, capture optional cleanup
151
+ // Call the vanilla renderer with proxy-free data, capture optional cleanup
148
152
  const cleanup = (customRenderer as (container: HTMLElement, data: Record<string, unknown>) => void | (() => void))(
149
- vanillaContainer, data,
153
+ vanillaContainer, plainData,
150
154
  );
151
155
  // Return teardown for $effect
152
156
  return () => {
@@ -217,9 +221,9 @@
217
221
  {#if isVanillaRenderer}
218
222
  <div bind:this={vanillaContainer} class="vanilla-container w-full h-full overflow-auto p-2"></div>
219
223
  {:else if customRenderer}
220
- <svelte:component this={customRenderer as Component<any>} {data} {id} />
224
+ <svelte:component this={customRenderer as Component<any>} data={plainData} {id} />
221
225
  {:else if nativeEntry}
222
- <svelte:component this={nativeEntry.component} {...nativeEntry.props(data, emit)} />
226
+ <svelte:component this={nativeEntry.component} {...nativeEntry.props(plainData, emit)} />
223
227
  {:else}
224
228
  <div class="p-3 font-mono text-xs text-text2">[{type}]</div>
225
229
  {/if}