@motion-proto/live-tokens 0.12.0 → 0.12.1
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
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
import { fade } from 'svelte/transition';
|
|
16
16
|
import { cubicInOut } from 'svelte/easing';
|
|
17
17
|
import { route, navigate } from '../core/routing/router';
|
|
18
|
+
import { editorView } from '../core/store/editorViewStore';
|
|
18
19
|
import { columnsVisible, toggleColumns } from './columnsOverlay';
|
|
19
20
|
import { storageKey } from '../core/store/editorConfig';
|
|
20
21
|
import { overlayOpen } from './overlayState';
|
|
@@ -61,6 +62,15 @@
|
|
|
61
62
|
overlayOpen.set(!!open);
|
|
62
63
|
});
|
|
63
64
|
|
|
65
|
+
// The /components route renders the same component-editor surface as the
|
|
66
|
+
// overlay's components view. Pair them: when the page is /components, flip
|
|
67
|
+
// the overlay to tokens so the two surfaces don't stack.
|
|
68
|
+
run(() => {
|
|
69
|
+
if ($route === '/components' && $editorView === 'components') {
|
|
70
|
+
editorView.set('tokens');
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
|
|
64
74
|
// Editor route has its own chrome — hide overlay there.
|
|
65
75
|
let onEditorPath = $derived($route === editorPath);
|
|
66
76
|
let sourceFile = $derived(pageSources[$route]);
|