@motion-proto/live-tokens 0.12.0 → 0.13.0
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/dist-plugin/index.cjs
CHANGED
|
@@ -632,7 +632,7 @@ function themeFileApi(opts) {
|
|
|
632
632
|
const COMPONENT_CONFIGS_DIR = dataDirs.componentConfigsDir;
|
|
633
633
|
const MANIFESTS_DIR = dataDirs.manifestsDir;
|
|
634
634
|
const CSS_PATH = import_path3.default.resolve(opts.tokensCssPath);
|
|
635
|
-
const GENERATED_CSS_PATH = opts.tokensGeneratedCssPath ? import_path3.default.resolve(opts.tokensGeneratedCssPath) : import_path3.default.join(
|
|
635
|
+
const GENERATED_CSS_PATH = opts.tokensGeneratedCssPath ? import_path3.default.resolve(opts.tokensGeneratedCssPath) : import_path3.default.join(dataDirs.dataDir, "tokens.generated.css");
|
|
636
636
|
const FONTS_CSS_PATH = opts.fontsCssPath ? import_path3.default.resolve(opts.fontsCssPath) : import_path3.default.join(import_path3.default.dirname(CSS_PATH), "fonts.css");
|
|
637
637
|
const API_BASE = opts.apiBase ?? "/api/live-tokens";
|
|
638
638
|
const COMPONENTS_SRC_DIR = opts.componentsSrcDir ? import_path3.default.resolve(opts.componentsSrcDir) : import_path3.default.resolve("src/system/components");
|
package/dist-plugin/index.js
CHANGED
|
@@ -595,7 +595,7 @@ function themeFileApi(opts) {
|
|
|
595
595
|
const COMPONENT_CONFIGS_DIR = dataDirs.componentConfigsDir;
|
|
596
596
|
const MANIFESTS_DIR = dataDirs.manifestsDir;
|
|
597
597
|
const CSS_PATH = path3.resolve(opts.tokensCssPath);
|
|
598
|
-
const GENERATED_CSS_PATH = opts.tokensGeneratedCssPath ? path3.resolve(opts.tokensGeneratedCssPath) : path3.join(
|
|
598
|
+
const GENERATED_CSS_PATH = opts.tokensGeneratedCssPath ? path3.resolve(opts.tokensGeneratedCssPath) : path3.join(dataDirs.dataDir, "tokens.generated.css");
|
|
599
599
|
const FONTS_CSS_PATH = opts.fontsCssPath ? path3.resolve(opts.fontsCssPath) : path3.join(path3.dirname(CSS_PATH), "fonts.css");
|
|
600
600
|
const API_BASE = opts.apiBase ?? "/api/live-tokens";
|
|
601
601
|
const COMPONENTS_SRC_DIR = opts.componentsSrcDir ? path3.resolve(opts.componentsSrcDir) : path3.resolve("src/system/components");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@motion-proto/live-tokens",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Design token editor with live CSS variable editing. Svelte 5 + Vite 6/7.",
|
|
6
6
|
"keywords": [
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"src/editor",
|
|
23
23
|
"src/system",
|
|
24
24
|
"src/app/site.css",
|
|
25
|
+
"src/live-tokens/data/tokens.generated.css",
|
|
25
26
|
"dist-plugin",
|
|
26
27
|
".claude/skills",
|
|
27
28
|
"bin",
|
|
@@ -71,7 +72,7 @@
|
|
|
71
72
|
},
|
|
72
73
|
"./styles/ui-editor.css": "./src/editor/styles/ui-editor.css",
|
|
73
74
|
"./app/tokens.css": "./src/system/styles/tokens.css",
|
|
74
|
-
"./app/tokens.generated.css": "./src/
|
|
75
|
+
"./app/tokens.generated.css": "./src/live-tokens/data/tokens.generated.css",
|
|
75
76
|
"./app/site.css": "./src/app/site.css",
|
|
76
77
|
"./app/fonts.css": "./src/system/styles/fonts.css"
|
|
77
78
|
},
|
|
@@ -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]);
|
|
File without changes
|