@motion-proto/live-tokens 0.13.2 → 0.13.3

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": "@motion-proto/live-tokens",
3
- "version": "0.13.2",
3
+ "version": "0.13.3",
4
4
  "type": "module",
5
5
  "description": "Design token editor with live CSS variable editing. Svelte 5 + Vite 6/7.",
6
6
  "keywords": [
@@ -71,15 +71,25 @@
71
71
  // cascades (the storage handler regularly took >1s in practice) and a
72
72
  // visible flicker as the view bounces.
73
73
  let prevRoute: string | undefined;
74
+ const dbgCtx = isInIframe ? 'iframe' : 'parent';
74
75
  run(() => {
75
76
  const r = $route;
77
+ console.log(`[lt-debug:${dbgCtx}] route-pair fired`, { route: r, prevRoute, editorView: $editorView });
76
78
  if (r === prevRoute) return;
77
79
  prevRoute = r;
78
80
  if (r === '/components') {
79
- editorView.update((v) => (v === 'components' ? 'tokens' : v));
81
+ editorView.update((v) => {
82
+ const next = v === 'components' ? 'tokens' : v;
83
+ console.log(`[lt-debug:${dbgCtx}] route-pair → set editorView`, { from: v, to: next });
84
+ return next;
85
+ });
80
86
  }
81
87
  });
82
88
 
89
+ editorView.subscribe((v) => {
90
+ console.log(`[lt-debug:${dbgCtx}] editorView subscribe`, { value: v });
91
+ });
92
+
83
93
  // Editor route has its own chrome — hide overlay there.
84
94
  let onEditorPath = $derived($route === editorPath);
85
95
  let sourceFile = $derived(pageSources[$route]);