@motion-proto/live-tokens 0.47.1 → 0.48.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/.claude/skills/live-tokens-adjust-shape-space/SKILL.md +68 -0
- package/.claude/skills/live-tokens-create-component/SKILL.md +2 -2
- package/.claude/skills/live-tokens-generate-theme/SKILL.md +152 -0
- package/CHANGELOG.md +270 -0
- package/README.md +37 -26
- package/bin/adjust.mjs +254 -0
- package/bin/cli.mjs +94 -7
- package/bin/generate-theme.mjs +251 -0
- package/bin/migrate.mjs +95 -6
- package/dist-plugin/adjust/index.cjs +259 -0
- package/dist-plugin/adjust/index.d.cts +45 -0
- package/dist-plugin/adjust/index.d.ts +45 -0
- package/dist-plugin/adjust/index.js +176 -0
- package/dist-plugin/{chunk-H4TRUINI.js → chunk-44RSTAII.js} +0 -48
- package/dist-plugin/chunk-6OZFXIQI.js +316 -0
- package/dist-plugin/chunk-76TFDTJO.js +556 -0
- package/dist-plugin/chunk-D3ZVKOR4.js +52 -0
- package/dist-plugin/dataPaths-DBN0RPuT.d.cts +54 -0
- package/dist-plugin/dataPaths-DBN0RPuT.d.ts +54 -0
- package/dist-plugin/generateColorsAndType/index.cjs +1781 -0
- package/dist-plugin/generateColorsAndType/index.d.cts +81 -0
- package/dist-plugin/generateColorsAndType/index.d.ts +81 -0
- package/dist-plugin/generateColorsAndType/index.js +1210 -0
- package/dist-plugin/index.cjs +849 -531
- package/dist-plugin/index.d.cts +3 -2
- package/dist-plugin/index.d.ts +3 -2
- package/dist-plugin/index.js +658 -1132
- package/dist-plugin/migrateData/index.cjs +728 -0
- package/dist-plugin/migrateData/index.d.cts +60 -0
- package/dist-plugin/migrateData/index.d.ts +60 -0
- package/dist-plugin/migrateData/index.js +348 -0
- package/dist-plugin/themeTypes-DMHZOnUn.d.cts +211 -0
- package/dist-plugin/themeTypes-DMHZOnUn.d.ts +211 -0
- package/dist-plugin/tokensCssMigrations/index.cjs +2 -1
- package/dist-plugin/tokensCssMigrations/index.d.cts +3 -15
- package/dist-plugin/tokensCssMigrations/index.d.ts +3 -15
- package/dist-plugin/tokensCssMigrations/index.js +4 -2
- package/package.json +18 -4
- package/src/editor/component-editor/scaffolding/ComponentFileManager.svelte +183 -158
- package/src/editor/component-editor/scaffolding/ComponentFileMenu.svelte +0 -4
- package/src/editor/component-editor/scaffolding/SaveAsDialog.svelte +4 -4
- package/src/editor/component-editor/scaffolding/TokenLayout.svelte +2 -59
- package/src/editor/component-editor/scaffolding/VariantGroup.svelte +1 -1
- package/src/editor/core/components/adjustAliases.ts +180 -0
- package/src/editor/core/components/aliasKinds.ts +73 -0
- package/src/editor/core/components/componentConfigService.ts +26 -38
- package/src/editor/core/flashStatus.ts +1 -1
- package/src/editor/core/fonts/fontMigration.ts +13 -13
- package/src/editor/core/fonts/fontPairing.ts +35 -0
- package/src/editor/core/palettes/paletteDerivation.ts +83 -13
- package/src/editor/core/preview/lookPreview.ts +141 -0
- package/src/editor/core/productionPulse.ts +34 -21
- package/src/editor/core/storage/files/versionedFileResourceClient.ts +18 -45
- package/src/editor/core/store/editorConfigStore.ts +2 -2
- package/src/editor/core/store/editorPersistence.ts +0 -1
- package/src/editor/core/store/editorStore.ts +114 -51
- package/src/editor/core/store/editorTypes.ts +0 -1
- package/src/editor/core/store/gradientSource.ts +2 -2
- package/src/editor/core/themes/colorsAndTypeService.ts +95 -0
- package/src/editor/core/themes/generateColorsAndType.ts +433 -0
- package/src/editor/core/themes/loadRows.ts +64 -0
- package/src/editor/core/themes/lookSummary.ts +75 -0
- package/src/editor/core/themes/migrations/2026-04-24-legacy-keys-and-bg-to-canvas.ts +3 -3
- package/src/editor/core/themes/migrations/2026-05-13-primary-to-brand.ts +2 -2
- package/src/editor/core/themes/migrations/2026-05-26-drop-overlay-extra-stops.ts +3 -3
- package/src/editor/core/themes/migrations/2026-08-13-drop-legacy-shape-space-keys.ts +38 -0
- package/src/editor/core/themes/migrations/2026-08-15-line-height-scale-rename.ts +57 -0
- package/src/editor/core/themes/migrations/index.ts +19 -11
- package/src/editor/core/themes/slices/components.ts +4 -4
- package/src/editor/core/themes/slices/fonts.ts +1 -1
- package/src/editor/core/themes/slices/gradients.ts +22 -0
- package/src/editor/core/themes/slices/palettes.ts +2 -2
- package/src/editor/core/themes/themeInit.ts +21 -29
- package/src/editor/core/themes/themeService.ts +218 -78
- package/src/editor/core/themes/themeTypes.ts +94 -51
- package/src/editor/docs/Docs.svelte +1 -0
- package/src/editor/docs/chapters.ts +1 -0
- package/src/editor/docs/content/01-overview.md +1 -1
- package/src/editor/docs/content/editing-tokens.md +6 -6
- package/src/editor/docs/content/getting-started.md +9 -7
- package/src/editor/docs/content/themes-workflow.md +74 -34
- package/src/editor/docs/content/where-themes-live.md +61 -0
- package/src/editor/docs/content.generated.ts +5 -4
- package/src/editor/index.ts +27 -27
- package/src/editor/pages/ComponentEditorPage.svelte +2 -2
- package/src/editor/pages/EditorShell.svelte +4 -30
- package/src/editor/ui/FileLoadList.svelte +67 -7
- package/src/editor/ui/GradientEditor.svelte +3 -3
- package/src/editor/ui/ThemePanel.svelte +1067 -0
- package/src/editor/ui/UIDialog.svelte +11 -9
- package/src/editor/ui/index.ts +4 -2
- package/src/live-tokens/data/colors-and-type/autumn.json +2490 -0
- package/src/live-tokens/data/{themes → colors-and-type}/default.json +962 -549
- package/src/live-tokens/data/colors-and-type/halloween.json +2529 -0
- package/src/live-tokens/data/colors-and-type/midnight-study.json +2536 -0
- package/src/live-tokens/data/colors-and-type/ocean.json +2489 -0
- package/src/live-tokens/data/colors-and-type/royal-velvet.json +2520 -0
- package/src/live-tokens/data/colors-and-type/spring-meadow.json +2476 -0
- package/src/live-tokens/data/colors-and-type/sunset.json +2528 -0
- package/src/live-tokens/data/themes/autumn.json +3918 -0
- package/src/live-tokens/data/themes/halloween.json +3992 -0
- package/src/live-tokens/data/themes/midnight-study.json +3932 -0
- package/src/live-tokens/data/themes/ocean.json +3917 -0
- package/src/live-tokens/data/themes/royal-velvet.json +3983 -0
- package/src/live-tokens/data/themes/spring-meadow.json +3904 -0
- package/src/live-tokens/data/themes/sunset.json +3931 -0
- package/src/live-tokens/data/tokens.generated.css +129 -140
- package/src/system/styles/CONVENTIONS.md +1 -1
- package/src/system/styles/fonts.css +1 -1
- package/template/README.md +7 -5
- package/template/_gitignore +0 -6
- package/src/editor/core/components/componentPersist.ts +0 -62
- package/src/editor/core/manifests/manifestService.ts +0 -172
- package/src/editor/ui/ManifestFileManager.svelte +0 -446
- package/src/editor/ui/ThemeFileManager.svelte +0 -785
- package/src/live-tokens/data/manifests/default.json +0 -35
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* Generated by themeFileApi from the production theme
|
|
1
|
+
/* Generated by themeFileApi from the production theme. Do not edit. */
|
|
2
2
|
/* tokens.css holds developer-authored defaults; this file holds editor overrides. */
|
|
3
3
|
|
|
4
4
|
/* Production theme: default */
|
|
@@ -15,10 +15,7 @@
|
|
|
15
15
|
--badge-trait-text-line-height: var(--line-height-none);
|
|
16
16
|
--badge-trait-border: var(--border-brand-medium);
|
|
17
17
|
--badge-trait-border-width: var(--border-width-1);
|
|
18
|
-
--badge-trait-radius: var(--radius-full);
|
|
19
|
-
--badge-trait-padding: var(--space-6);
|
|
20
18
|
--badge-trait-shadow: transparent;
|
|
21
|
-
--sectiondivider-padding: var(--space-16);
|
|
22
19
|
--sectiondivider-title: var(--text-primary);
|
|
23
20
|
--sectiondivider-title-font-family: var(--font-display);
|
|
24
21
|
--sectiondivider-title-font-size: var(--font-size-5xl);
|
|
@@ -35,25 +32,17 @@
|
|
|
35
32
|
--dialog-primary-default-text: var(--text-primary);
|
|
36
33
|
--dialog-primary-default-border: var(--border-neutral-medium);
|
|
37
34
|
--dialog-primary-default-border-width: var(--border-width-1);
|
|
38
|
-
--dialog-primary-default-radius: var(--radius-md);
|
|
39
|
-
--dialog-primary-default-padding: var(--space-8);
|
|
40
35
|
--dialog-primary-hover-surface: var(--surface-neutral-higher);
|
|
41
36
|
--dialog-primary-hover-text: var(--text-primary);
|
|
42
37
|
--dialog-primary-hover-border: var(--border-neutral-strong);
|
|
43
38
|
--dialog-primary-hover-border-width: var(--border-width-1);
|
|
44
|
-
--dialog-primary-hover-radius: var(--radius-md);
|
|
45
|
-
--dialog-primary-hover-padding: var(--space-8);
|
|
46
39
|
--dialog-secondary-default-text: var(--text-primary);
|
|
47
40
|
--dialog-secondary-default-border: var(--border-neutral-medium);
|
|
48
41
|
--dialog-secondary-default-border-width: var(--border-width-1);
|
|
49
|
-
--dialog-secondary-default-radius: var(--radius-md);
|
|
50
|
-
--dialog-secondary-default-padding: var(--space-8);
|
|
51
42
|
--dialog-secondary-hover-surface: var(--surface-neutral-lower);
|
|
52
43
|
--dialog-secondary-hover-text: var(--text-primary);
|
|
53
44
|
--dialog-secondary-hover-border: var(--border-neutral-strong);
|
|
54
45
|
--dialog-secondary-hover-border-width: var(--border-width-1);
|
|
55
|
-
--dialog-secondary-hover-radius: var(--radius-md);
|
|
56
|
-
--dialog-secondary-hover-padding: var(--space-8);
|
|
57
46
|
--columns-count: 12;
|
|
58
47
|
--columns-max-width: 1440px;
|
|
59
48
|
--columns-gutter: 32px;
|
|
@@ -69,17 +58,17 @@
|
|
|
69
58
|
--shadow-lg: 5px 5px 9px 0px hsla(237, 18%, 3%, 0.9);
|
|
70
59
|
--shadow-xl: 6px 7px 13px 0px hsla(237, 18%, 3%, 0.9);
|
|
71
60
|
--shadow-2xl: 8px 9px 16px 0px hsla(237, 18%, 3%, 0.9);
|
|
72
|
-
--color-brand-100: #
|
|
73
|
-
--color-brand-200: #
|
|
74
|
-
--color-brand-300: #
|
|
75
|
-
--color-brand-400: #
|
|
76
|
-
--color-brand-500: #
|
|
77
|
-
--color-brand-600: #
|
|
78
|
-
--color-brand-700: #
|
|
79
|
-
--color-brand-800: #
|
|
80
|
-
--color-brand-850: #
|
|
81
|
-
--color-brand-900: #
|
|
82
|
-
--color-brand-950: #
|
|
61
|
+
--color-brand-100: #ffe7ef;
|
|
62
|
+
--color-brand-200: #ffb5d1;
|
|
63
|
+
--color-brand-300: #ff7cb3;
|
|
64
|
+
--color-brand-400: #fb2898;
|
|
65
|
+
--color-brand-500: #d5007d;
|
|
66
|
+
--color-brand-600: #ab0064;
|
|
67
|
+
--color-brand-700: #85004c;
|
|
68
|
+
--color-brand-800: #610036;
|
|
69
|
+
--color-brand-850: #400022;
|
|
70
|
+
--color-brand-900: #21000f;
|
|
71
|
+
--color-brand-950: #070002;
|
|
83
72
|
--surface-brand-lowest: #1d000c;
|
|
84
73
|
--surface-brand-lower: #3e0020;
|
|
85
74
|
--surface-brand-low: #620037;
|
|
@@ -93,21 +82,21 @@
|
|
|
93
82
|
--border-brand-medium: #e9008a;
|
|
94
83
|
--border-brand-strong: #ff6cad;
|
|
95
84
|
--text-brand: #ff75b1;
|
|
96
|
-
--text-brand-secondary: #
|
|
97
|
-
--text-brand-tertiary: #
|
|
98
|
-
--text-brand-muted: #
|
|
85
|
+
--text-brand-secondary: #df2d88;
|
|
86
|
+
--text-brand-tertiary: #953b63;
|
|
87
|
+
--text-brand-muted: #5c3846;
|
|
99
88
|
--text-brand-disabled: #403337;
|
|
100
|
-
--color-accent-100: #
|
|
101
|
-
--color-accent-200: #
|
|
102
|
-
--color-accent-300: #
|
|
103
|
-
--color-accent-400: #
|
|
104
|
-
--color-accent-500: #
|
|
105
|
-
--color-accent-600: #
|
|
106
|
-
--color-accent-700: #
|
|
107
|
-
--color-accent-800: #
|
|
108
|
-
--color-accent-850: #
|
|
109
|
-
--color-accent-900: #
|
|
110
|
-
--color-accent-950: #
|
|
89
|
+
--color-accent-100: #b4fffb;
|
|
90
|
+
--color-accent-200: #84e9e5;
|
|
91
|
+
--color-accent-300: #6ad0cc;
|
|
92
|
+
--color-accent-400: #50b8b4;
|
|
93
|
+
--color-accent-500: #329f9b;
|
|
94
|
+
--color-accent-600: #008582;
|
|
95
|
+
--color-accent-700: #006866;
|
|
96
|
+
--color-accent-800: #004b49;
|
|
97
|
+
--color-accent-850: #002f2e;
|
|
98
|
+
--color-accent-900: #001514;
|
|
99
|
+
--color-accent-950: #000202;
|
|
111
100
|
--surface-accent-lowest: #000f0e;
|
|
112
101
|
--surface-accent-lower: #002423;
|
|
113
102
|
--surface-accent-low: #003c3b;
|
|
@@ -121,21 +110,21 @@
|
|
|
121
110
|
--border-accent-medium: #259592;
|
|
122
111
|
--border-accent-strong: #53bbb7;
|
|
123
112
|
--text-accent: #62efea;
|
|
124
|
-
--text-accent-secondary: #
|
|
125
|
-
--text-accent-tertiary: #
|
|
126
|
-
--text-accent-muted: #
|
|
113
|
+
--text-accent-secondary: #5baba8;
|
|
114
|
+
--text-accent-tertiary: #4d7271;
|
|
115
|
+
--text-accent-muted: #3c4847;
|
|
127
116
|
--text-accent-disabled: #313232;
|
|
128
|
-
--color-special-100: #
|
|
129
|
-
--color-special-200: #
|
|
130
|
-
--color-special-300: #
|
|
131
|
-
--color-special-400: #
|
|
132
|
-
--color-special-500: #
|
|
133
|
-
--color-special-600: #
|
|
134
|
-
--color-special-700: #
|
|
135
|
-
--color-special-800: #
|
|
136
|
-
--color-special-850: #
|
|
137
|
-
--color-special-900: #
|
|
138
|
-
--color-special-950: #
|
|
117
|
+
--color-special-100: #efecff;
|
|
118
|
+
--color-special-200: #d3caff;
|
|
119
|
+
--color-special-300: #b9a7ff;
|
|
120
|
+
--color-special-400: #a282ff;
|
|
121
|
+
--color-special-500: #8b5cf6;
|
|
122
|
+
--color-special-600: #733ed8;
|
|
123
|
+
--color-special-700: #5c1bba;
|
|
124
|
+
--color-special-800: #430090;
|
|
125
|
+
--color-special-850: #2a005f;
|
|
126
|
+
--color-special-900: #130033;
|
|
127
|
+
--color-special-950: #03000d;
|
|
139
128
|
--surface-special-lowest: #0f002b;
|
|
140
129
|
--surface-special-lower: #250055;
|
|
141
130
|
--surface-special-low: #3d0084;
|
|
@@ -149,21 +138,21 @@
|
|
|
149
138
|
--border-special-medium: #8c5df8;
|
|
150
139
|
--border-special-strong: #ac93ff;
|
|
151
140
|
--text-special: #baa9ff;
|
|
152
|
-
--text-special-secondary: #
|
|
153
|
-
--text-special-tertiary: #
|
|
154
|
-
--text-special-muted: #
|
|
141
|
+
--text-special-secondary: #8665e0;
|
|
142
|
+
--text-special-tertiary: #5c4e8b;
|
|
143
|
+
--text-special-muted: #3e3a4f;
|
|
155
144
|
--text-special-disabled: #303032;
|
|
156
|
-
--color-canvas-100: #
|
|
157
|
-
--color-canvas-200: #
|
|
158
|
-
--color-canvas-300: #
|
|
159
|
-
--color-canvas-400: #
|
|
160
|
-
--color-canvas-500: #
|
|
161
|
-
--color-canvas-600: #
|
|
162
|
-
--color-canvas-700: #
|
|
163
|
-
--color-canvas-800: #
|
|
164
|
-
--color-canvas-850: #
|
|
165
|
-
--color-canvas-900: #
|
|
166
|
-
--color-canvas-950: #
|
|
145
|
+
--color-canvas-100: #ecedff;
|
|
146
|
+
--color-canvas-200: #d0d0ed;
|
|
147
|
+
--color-canvas-300: #b6b6d2;
|
|
148
|
+
--color-canvas-400: #9c9db8;
|
|
149
|
+
--color-canvas-500: #84849e;
|
|
150
|
+
--color-canvas-600: #6b6c85;
|
|
151
|
+
--color-canvas-700: #53546c;
|
|
152
|
+
--color-canvas-800: #3c3c53;
|
|
153
|
+
--color-canvas-850: #25243a;
|
|
154
|
+
--color-canvas-900: #0f0e21;
|
|
155
|
+
--color-canvas-950: #02000b;
|
|
167
156
|
--surface-canvas-lowest: #0a0523;
|
|
168
157
|
--surface-canvas-lower: #1c1a37;
|
|
169
158
|
--surface-canvas-low: #31304c;
|
|
@@ -177,14 +166,14 @@
|
|
|
177
166
|
--border-canvas-medium: #80809b;
|
|
178
167
|
--border-canvas-strong: #a4a5c0;
|
|
179
168
|
--text-canvas: #9595c6;
|
|
180
|
-
--text-canvas-secondary: #
|
|
181
|
-
--text-canvas-tertiary: #
|
|
182
|
-
--text-canvas-muted: #
|
|
169
|
+
--text-canvas-secondary: #6b6b89;
|
|
170
|
+
--text-canvas-tertiary: #4e4f5e;
|
|
171
|
+
--text-canvas-muted: #3c3c41;
|
|
183
172
|
--text-canvas-disabled: #343435;
|
|
184
173
|
--page-bg: #3c3c53;
|
|
185
174
|
--page-bg-attachment: scroll;
|
|
186
175
|
--color-neutral-100: #dde6ed;
|
|
187
|
-
--color-neutral-200: #
|
|
176
|
+
--color-neutral-200: #c1c9d0;
|
|
188
177
|
--color-neutral-300: #a5adb4;
|
|
189
178
|
--color-neutral-400: #8a9299;
|
|
190
179
|
--color-neutral-500: #70787e;
|
|
@@ -207,22 +196,22 @@
|
|
|
207
196
|
--border-neutral-medium: #7c848b;
|
|
208
197
|
--border-neutral-strong: #a0a9af;
|
|
209
198
|
--text-primary: #ffffff;
|
|
210
|
-
--text-secondary: #
|
|
211
|
-
--text-tertiary: #
|
|
212
|
-
--text-muted: #
|
|
199
|
+
--text-secondary: #c2cacf;
|
|
200
|
+
--text-tertiary: #7e8285;
|
|
201
|
+
--text-muted: #4e4f50;
|
|
213
202
|
--text-disabled: #383838;
|
|
214
203
|
--text-inverted: #0f0f0f;
|
|
215
204
|
--color-alternate-100: #eae3e0;
|
|
216
|
-
--color-alternate-200: #
|
|
217
|
-
--color-alternate-300: #
|
|
218
|
-
--color-alternate-400: #
|
|
205
|
+
--color-alternate-200: #cfc8c5;
|
|
206
|
+
--color-alternate-300: #b5aeab;
|
|
207
|
+
--color-alternate-400: #9b9591;
|
|
219
208
|
--color-alternate-500: #817b78;
|
|
220
|
-
--color-alternate-600: #
|
|
221
|
-
--color-alternate-700: #
|
|
222
|
-
--color-alternate-800: #
|
|
223
|
-
--color-alternate-850: #
|
|
224
|
-
--color-alternate-900: #
|
|
225
|
-
--color-alternate-950: #
|
|
209
|
+
--color-alternate-600: #67615e;
|
|
210
|
+
--color-alternate-700: #4e4845;
|
|
211
|
+
--color-alternate-800: #35302d;
|
|
212
|
+
--color-alternate-850: #1e1917;
|
|
213
|
+
--color-alternate-900: #090604;
|
|
214
|
+
--color-alternate-950: #000000;
|
|
226
215
|
--surface-alternate-lowest: #100907;
|
|
227
216
|
--surface-alternate-lower: #241d19;
|
|
228
217
|
--surface-alternate-low: #39322f;
|
|
@@ -236,21 +225,21 @@
|
|
|
236
225
|
--border-alternate-medium: #88827f;
|
|
237
226
|
--border-alternate-strong: #ada6a3;
|
|
238
227
|
--text-alternate: #ffffff;
|
|
239
|
-
--text-alternate-secondary: #
|
|
240
|
-
--text-alternate-tertiary: #
|
|
241
|
-
--text-alternate-muted: #
|
|
228
|
+
--text-alternate-secondary: #d6d0cd;
|
|
229
|
+
--text-alternate-tertiary: #8a8786;
|
|
230
|
+
--text-alternate-muted: #545352;
|
|
242
231
|
--text-alternate-disabled: #3b3b3b;
|
|
243
|
-
--color-info-100: #
|
|
244
|
-
--color-info-200: #
|
|
245
|
-
--color-info-300: #
|
|
246
|
-
--color-info-400: #
|
|
247
|
-
--color-info-500: #
|
|
248
|
-
--color-info-600: #
|
|
249
|
-
--color-info-700: #
|
|
250
|
-
--color-info-800: #
|
|
251
|
-
--color-info-850: #
|
|
252
|
-
--color-info-900: #
|
|
253
|
-
--color-info-950: #
|
|
232
|
+
--color-info-100: #ddf2ff;
|
|
233
|
+
--color-info-200: #8fd7ff;
|
|
234
|
+
--color-info-300: #00bbff;
|
|
235
|
+
--color-info-400: #009dd7;
|
|
236
|
+
--color-info-500: #0081b1;
|
|
237
|
+
--color-info-600: #00678f;
|
|
238
|
+
--color-info-700: #004f6f;
|
|
239
|
+
--color-info-800: #003850;
|
|
240
|
+
--color-info-850: #002334;
|
|
241
|
+
--color-info-900: #00101a;
|
|
242
|
+
--color-info-950: #000205;
|
|
254
243
|
--surface-info-lowest: #000d17;
|
|
255
244
|
--surface-info-lower: #002232;
|
|
256
245
|
--surface-info-low: #003951;
|
|
@@ -264,21 +253,21 @@
|
|
|
264
253
|
--border-info-medium: #008ec3;
|
|
265
254
|
--border-info-strong: #00b6f8;
|
|
266
255
|
--text-info: #64caff;
|
|
267
|
-
--text-info-secondary: #
|
|
268
|
-
--text-info-tertiary: #
|
|
269
|
-
--text-info-muted: #
|
|
256
|
+
--text-info-secondary: #0083b4;
|
|
257
|
+
--text-info-tertiary: #1c506a;
|
|
258
|
+
--text-info-muted: #1d2c34;
|
|
270
259
|
--text-info-disabled: #181a1b;
|
|
271
|
-
--color-success-100: #
|
|
272
|
-
--color-success-200: #
|
|
273
|
-
--color-success-300: #
|
|
274
|
-
--color-success-400: #
|
|
275
|
-
--color-success-500: #
|
|
276
|
-
--color-success-600: #
|
|
277
|
-
--color-success-700: #
|
|
278
|
-
--color-success-800: #
|
|
279
|
-
--color-success-850: #
|
|
280
|
-
--color-success-900: #
|
|
281
|
-
--color-success-950: #
|
|
260
|
+
--color-success-100: #c7ffd1;
|
|
261
|
+
--color-success-200: #77f194;
|
|
262
|
+
--color-success-300: #59d47a;
|
|
263
|
+
--color-success-400: #38b85f;
|
|
264
|
+
--color-success-500: #009c45;
|
|
265
|
+
--color-success-600: #007e36;
|
|
266
|
+
--color-success-700: #006128;
|
|
267
|
+
--color-success-800: #00461b;
|
|
268
|
+
--color-success-850: #002c0e;
|
|
269
|
+
--color-success-900: #001404;
|
|
270
|
+
--color-success-950: #000300;
|
|
282
271
|
--surface-success-lowest: #001003;
|
|
283
272
|
--surface-success-lower: #00270b;
|
|
284
273
|
--surface-success-low: #004018;
|
|
@@ -292,21 +281,21 @@
|
|
|
292
281
|
--border-success-medium: #059e46;
|
|
293
282
|
--border-success-strong: #47c46b;
|
|
294
283
|
--text-success: #88f2a0;
|
|
295
|
-
--text-success-secondary: #
|
|
296
|
-
--text-success-tertiary: #
|
|
297
|
-
--text-success-muted: #
|
|
284
|
+
--text-success-secondary: #2e974e;
|
|
285
|
+
--text-success-tertiary: #31673e;
|
|
286
|
+
--text-success-muted: #2c4530;
|
|
298
287
|
--text-success-disabled: #263429;
|
|
299
|
-
--color-warning-100: #
|
|
300
|
-
--color-warning-200: #
|
|
301
|
-
--color-warning-300: #
|
|
302
|
-
--color-warning-400: #
|
|
303
|
-
--color-warning-500: #
|
|
304
|
-
--color-warning-600: #
|
|
305
|
-
--color-warning-700: #
|
|
306
|
-
--color-warning-800: #
|
|
307
|
-
--color-warning-850: #
|
|
308
|
-
--color-warning-900: #
|
|
309
|
-
--color-warning-950: #
|
|
288
|
+
--color-warning-100: #ffebd1;
|
|
289
|
+
--color-warning-200: #ffd08e;
|
|
290
|
+
--color-warning-300: #ffb01f;
|
|
291
|
+
--color-warning-400: #e09800;
|
|
292
|
+
--color-warning-500: #be8000;
|
|
293
|
+
--color-warning-600: #9b6800;
|
|
294
|
+
--color-warning-700: #784f00;
|
|
295
|
+
--color-warning-800: #563800;
|
|
296
|
+
--color-warning-850: #362100;
|
|
297
|
+
--color-warning-900: #190d00;
|
|
298
|
+
--color-warning-950: #040100;
|
|
310
299
|
--surface-warning-lowest: #130900;
|
|
311
300
|
--surface-warning-lower: #372200;
|
|
312
301
|
--surface-warning-low: #613f00;
|
|
@@ -320,21 +309,21 @@
|
|
|
320
309
|
--border-warning-medium: #af7600;
|
|
321
310
|
--border-warning-strong: #df9700;
|
|
322
311
|
--text-warning: #ffecd2;
|
|
323
|
-
--text-warning-secondary: #
|
|
324
|
-
--text-warning-tertiary: #
|
|
325
|
-
--text-warning-muted: #
|
|
312
|
+
--text-warning-secondary: #eba633;
|
|
313
|
+
--text-warning-tertiary: #a17e4c;
|
|
314
|
+
--text-warning-muted: #685d4d;
|
|
326
315
|
--text-warning-disabled: #4d4b4a;
|
|
327
|
-
--color-danger-100: #
|
|
328
|
-
--color-danger-200: #
|
|
329
|
-
--color-danger-300: #
|
|
330
|
-
--color-danger-400: #
|
|
331
|
-
--color-danger-500: #
|
|
332
|
-
--color-danger-600: #
|
|
333
|
-
--color-danger-700: #
|
|
334
|
-
--color-danger-800: #
|
|
335
|
-
--color-danger-850: #
|
|
336
|
-
--color-danger-900: #
|
|
337
|
-
--color-danger-950: #
|
|
316
|
+
--color-danger-100: #ffe9e6;
|
|
317
|
+
--color-danger-200: #ffc3bd;
|
|
318
|
+
--color-danger-300: #ff9a93;
|
|
319
|
+
--color-danger-400: #ff6a65;
|
|
320
|
+
--color-danger-500: #f0373e;
|
|
321
|
+
--color-danger-600: #d10023;
|
|
322
|
+
--color-danger-700: #a40019;
|
|
323
|
+
--color-danger-800: #78000f;
|
|
324
|
+
--color-danger-850: #4e0006;
|
|
325
|
+
--color-danger-900: #280002;
|
|
326
|
+
--color-danger-950: #080000;
|
|
338
327
|
--surface-danger-lowest: #1f0001;
|
|
339
328
|
--surface-danger-lower: #410004;
|
|
340
329
|
--surface-danger-low: #67000c;
|
|
@@ -348,9 +337,9 @@
|
|
|
348
337
|
--border-danger-medium: #ea3039;
|
|
349
338
|
--border-danger-strong: #ff7872;
|
|
350
339
|
--text-danger: #ff635f;
|
|
351
|
-
--text-danger-secondary: #
|
|
352
|
-
--text-danger-tertiary: #
|
|
353
|
-
--text-danger-muted: #
|
|
340
|
+
--text-danger-secondary: #bb292f;
|
|
341
|
+
--text-danger-tertiary: #813b37;
|
|
342
|
+
--text-danger-muted: #543b39;
|
|
354
343
|
--text-danger-disabled: #3c3939;
|
|
355
344
|
--font-display: "Arvo", serif;
|
|
356
345
|
--font-sans: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, sans-serif;
|
|
@@ -37,7 +37,7 @@ Editor chrome uses **only** the `--ui-*` font namespace (`--ui-font-sans`, `--ui
|
|
|
37
37
|
|
|
38
38
|
## Layer 1 — theme tokens (`tokens.css`)
|
|
39
39
|
|
|
40
|
-
Theme tokens are the design system's vocabulary. They describe colors, sizes, spacing, shadows, and motion: the things a designer reasons about independent of any one component. Components consume them, and
|
|
40
|
+
Theme tokens are the design system's vocabulary. They describe colors, sizes, spacing, shadows, and motion: the things a designer reasons about independent of any one component. Components consume them, and the colors-and-type files in `colors-and-type/*.json` recolor or re-scale them.
|
|
41
41
|
|
|
42
42
|
### Category-first naming
|
|
43
43
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* Generated from the production
|
|
1
|
+
/* Generated from the production colors and type by syncFontsToCss. Do not edit. */
|
|
2
2
|
/* Both fonts.css and fonts/ are in dist/, so relative paths work at runtime. */
|
|
3
3
|
|
|
4
4
|
/* Adobe Typekit — fira-code */
|
package/template/README.md
CHANGED
|
@@ -18,16 +18,18 @@ This project follows the package's [recommended layout](https://github.com/motio
|
|
|
18
18
|
a reserved `/live-tokens/*` namespace (so they never collide with your pages):
|
|
19
19
|
`/live-tokens/editor` (theme tokens), `/live-tokens/components` (per-component
|
|
20
20
|
aliases), and `/live-tokens/docs` (the user guide).
|
|
21
|
-
- `src/system/styles/tokens.css` — your theme token vocabulary.
|
|
22
|
-
|
|
21
|
+
- `src/system/styles/tokens.css` — your theme token vocabulary. Hand-authored
|
|
22
|
+
and yours; the editor reads it but never writes it.
|
|
23
23
|
- `src/styles/site.css` — themed page typography. Yours to edit.
|
|
24
24
|
|
|
25
25
|
## Editing live
|
|
26
26
|
|
|
27
27
|
Run `npm run dev`, then click **Open Token Editor** on the home page (or visit
|
|
28
|
-
`/live-tokens/editor`).
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
`/live-tokens/editor`). Edits live in the JSON under `src/live-tokens/data/`:
|
|
29
|
+
Save keeps them in a theme, and Adopt writes the theme into
|
|
30
|
+
`src/live-tokens/data/tokens.generated.css`, the file your built site ships.
|
|
31
|
+
The editor is dev-only — `npm run build` ships plain CSS variables and the
|
|
32
|
+
components you used, nothing else.
|
|
31
33
|
|
|
32
34
|
## Adding components
|
|
33
35
|
|
package/template/_gitignore
CHANGED
|
@@ -5,12 +5,6 @@ dist-ssr
|
|
|
5
5
|
*.log
|
|
6
6
|
.npmrc
|
|
7
7
|
|
|
8
|
-
# Editor-written backups stay local to each machine; the live JSON/CSS commit.
|
|
9
|
-
src/live-tokens/data/themes/_backups/
|
|
10
|
-
src/live-tokens/data/manifests/_backups/
|
|
11
|
-
src/live-tokens/data/component-configs/*/_backups/
|
|
12
|
-
src/system/styles/_backups/
|
|
13
|
-
|
|
14
8
|
.DS_Store
|
|
15
9
|
.vscode/*
|
|
16
10
|
!.vscode/extensions.json
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { get } from 'svelte/store';
|
|
2
|
-
import type { AliasDiskValue, ComponentConfig } from '../themes/themeTypes';
|
|
3
|
-
import { editorState, markComponentSaved } from '../store/editorStore';
|
|
4
|
-
import { refToDiskValue } from '../store/cssVarRef';
|
|
5
|
-
import { CURRENT_COMPONENT_SCHEMA_VERSION } from '../themes/migrations';
|
|
6
|
-
import {
|
|
7
|
-
listComponentConfigs,
|
|
8
|
-
saveComponentConfig,
|
|
9
|
-
setActiveComponentFile,
|
|
10
|
-
} from './componentConfigService';
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Save the current in-memory state of a component to its active file. Mirrors
|
|
14
|
-
* the `persist` flow inside `ComponentFileManager.svelte` so callers without a
|
|
15
|
-
* file-manager instance (e.g. an unsaved-components dialog upstream)
|
|
16
|
-
* can save a dirty component without duplicating the schema-version + aliases
|
|
17
|
-
* stringification logic.
|
|
18
|
-
*
|
|
19
|
-
* Refuses to overwrite `default` — that's the protected source-derived snapshot.
|
|
20
|
-
* Callers that hit `{ ok: false, reason: 'default' }` should prompt for a new
|
|
21
|
-
* name and re-route to a Save-As flow.
|
|
22
|
-
*/
|
|
23
|
-
export type SaveActiveComponentResult =
|
|
24
|
-
| { ok: true; fileName: string; displayName: string }
|
|
25
|
-
| { ok: false; reason: 'default' | 'no-state' | 'error'; error?: unknown };
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
export async function saveActiveComponentConfig(
|
|
29
|
-
component: string,
|
|
30
|
-
): Promise<SaveActiveComponentResult> {
|
|
31
|
-
const slice = get(editorState).components[component];
|
|
32
|
-
if (!slice) return { ok: false, reason: 'no-state' };
|
|
33
|
-
|
|
34
|
-
try {
|
|
35
|
-
const list = await listComponentConfigs(component);
|
|
36
|
-
const fileName = list.activeFile;
|
|
37
|
-
if (fileName === 'default') return { ok: false, reason: 'default' };
|
|
38
|
-
|
|
39
|
-
const active = list.files.find((f) => f.fileName === fileName);
|
|
40
|
-
const displayName = active?.name ?? fileName;
|
|
41
|
-
|
|
42
|
-
const now = new Date().toISOString();
|
|
43
|
-
const aliases: Record<string, AliasDiskValue> = {};
|
|
44
|
-
for (const [k, ref] of Object.entries(slice.aliases)) aliases[k] = refToDiskValue(ref);
|
|
45
|
-
|
|
46
|
-
const data: ComponentConfig = {
|
|
47
|
-
name: displayName,
|
|
48
|
-
component,
|
|
49
|
-
createdAt: now,
|
|
50
|
-
updatedAt: now,
|
|
51
|
-
aliases,
|
|
52
|
-
config: { ...slice.config },
|
|
53
|
-
schemaVersion: CURRENT_COMPONENT_SCHEMA_VERSION,
|
|
54
|
-
};
|
|
55
|
-
await saveComponentConfig(component, fileName, data);
|
|
56
|
-
await setActiveComponentFile(component, fileName);
|
|
57
|
-
markComponentSaved(component);
|
|
58
|
-
return { ok: true, fileName, displayName };
|
|
59
|
-
} catch (error) {
|
|
60
|
-
return { ok: false, reason: 'error', error };
|
|
61
|
-
}
|
|
62
|
-
}
|