@motion-proto/live-tokens 0.3.7 → 0.3.9
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/README.md +1 -1
- package/package.json +6 -5
- package/src/lib/LiveEditorOverlay.svelte +16 -0
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Live Tokens
|
|
2
2
|
|
|
3
|
-
A foundational design system for quickly styling and building Svelte
|
|
3
|
+
A foundational design system for quickly styling and building Svelte + Vite microsites. **Edit your tokens and components in real time** — colors, typography, spacing, per-component aliases — and see the site update as you drag the slider. Save the result as a portable configuration you can carry from project to project.
|
|
4
4
|
|
|
5
5
|
`npm install @motion-proto/live-tokens` into your app — install once, style fast. The editor is dev-only; production builds get plain CSS variables and your chosen components, nothing else.
|
|
6
6
|
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@motion-proto/live-tokens",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.9",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"description": "Design token editor with live CSS variable editing. Svelte 4 + Vite.",
|
|
5
|
+
"description": "Design token editor with live CSS variable editing. Svelte 4/5 + Vite 5/6/7.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"svelte",
|
|
8
8
|
"vite",
|
|
@@ -37,7 +37,8 @@
|
|
|
37
37
|
"src/assets",
|
|
38
38
|
"dist-plugin",
|
|
39
39
|
"!**/*.test.ts",
|
|
40
|
-
"!**/*.spec.ts"
|
|
40
|
+
"!**/*.spec.ts",
|
|
41
|
+
"!**/__tests__/**"
|
|
41
42
|
],
|
|
42
43
|
"exports": {
|
|
43
44
|
".": {
|
|
@@ -92,9 +93,9 @@
|
|
|
92
93
|
},
|
|
93
94
|
"peerDependencies": {
|
|
94
95
|
"sass": "^1.0",
|
|
95
|
-
"svelte": "^4.2",
|
|
96
|
+
"svelte": "^4.2 || ^5",
|
|
96
97
|
"svelte-preprocess": "^6.0",
|
|
97
|
-
"vite": "^5
|
|
98
|
+
"vite": "^5 || ^6 || ^7"
|
|
98
99
|
},
|
|
99
100
|
"devDependencies": {
|
|
100
101
|
"@sveltejs/vite-plugin-svelte": "^3.1.2",
|
|
@@ -4,8 +4,11 @@
|
|
|
4
4
|
// this component's type-check passes in consumer projects that haven't added
|
|
5
5
|
// the ambient global to their tsconfig.
|
|
6
6
|
declare const __PROJECT_ROOT__: string | undefined;
|
|
7
|
+
declare const __APP_VERSION__: string | undefined;
|
|
7
8
|
const INJECTED_PROJECT_ROOT: string =
|
|
8
9
|
typeof __PROJECT_ROOT__ !== 'undefined' ? (__PROJECT_ROOT__ ?? '') : '';
|
|
10
|
+
const APP_VERSION: string =
|
|
11
|
+
typeof __APP_VERSION__ !== 'undefined' ? (__APP_VERSION__ ?? '') : '';
|
|
9
12
|
</script>
|
|
10
13
|
|
|
11
14
|
<script lang="ts">
|
|
@@ -294,6 +297,10 @@
|
|
|
294
297
|
</button>
|
|
295
298
|
{/if}
|
|
296
299
|
|
|
300
|
+
{#if APP_VERSION}
|
|
301
|
+
<span class="version" title="live-tokens version">v{APP_VERSION}</span>
|
|
302
|
+
{/if}
|
|
303
|
+
|
|
297
304
|
{#if open}
|
|
298
305
|
<div class="spacer" transition:fade={BTN_FADE}></div>
|
|
299
306
|
{/if}
|
|
@@ -454,6 +461,15 @@
|
|
|
454
461
|
|
|
455
462
|
.spacer { flex: 1; }
|
|
456
463
|
|
|
464
|
+
.version {
|
|
465
|
+
font-size: 10px;
|
|
466
|
+
font-weight: 500;
|
|
467
|
+
color: rgba(255, 255, 255, 0.4);
|
|
468
|
+
letter-spacing: 0.02em;
|
|
469
|
+
margin-left: 2px;
|
|
470
|
+
user-select: none;
|
|
471
|
+
}
|
|
472
|
+
|
|
457
473
|
.hdr-btn {
|
|
458
474
|
display: inline-flex;
|
|
459
475
|
align-items: center;
|