@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
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
interface CurveAnchor {
|
|
2
|
+
x: number;
|
|
3
|
+
y: number;
|
|
4
|
+
inDx: number;
|
|
5
|
+
inDy: number;
|
|
6
|
+
outDx: number;
|
|
7
|
+
outDy: number;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface Oklch {
|
|
11
|
+
l: number;
|
|
12
|
+
c: number;
|
|
13
|
+
h: number;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
type HarmonyMode = 'complementary' | 'split-complementary' | 'triadic' | 'tetradic' | 'compound' | 'square' | 'analogous' | 'monochromatic' | 'custom';
|
|
17
|
+
interface HarmonyAxis {
|
|
18
|
+
/** Hue in [0, 360). Always present, bound or not. */
|
|
19
|
+
hue: number;
|
|
20
|
+
/** Bound family label (member of HARMONY_ELIGIBLE), or null when the axis is empty. */
|
|
21
|
+
family: string | null;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
type GradientStyle = 'linear' | 'radial' | 'conic';
|
|
25
|
+
interface GradientStop {
|
|
26
|
+
position: number;
|
|
27
|
+
paletteLabel: string;
|
|
28
|
+
}
|
|
29
|
+
interface PaletteConfig {
|
|
30
|
+
/** Numeric OKLCH intent — the single stored basis. Unclamped: the store holds
|
|
31
|
+
* what the user meant; gamut clamping is projection-only (derivation output,
|
|
32
|
+
* swatch/canvas painting, hex/CSS serialization). */
|
|
33
|
+
baseColor: Oklch;
|
|
34
|
+
lightnessCurve: CurveAnchor[];
|
|
35
|
+
saturationCurve: CurveAnchor[];
|
|
36
|
+
scaleCurves: Record<string, {
|
|
37
|
+
lightness: CurveAnchor[];
|
|
38
|
+
saturation: CurveAnchor[];
|
|
39
|
+
}>;
|
|
40
|
+
curveOffset: Record<string, number>;
|
|
41
|
+
overrides: Record<string, Oklch>;
|
|
42
|
+
snappedScales: string[];
|
|
43
|
+
emptyMode?: 'solid' | 'gradient';
|
|
44
|
+
gradientStyle?: GradientStyle;
|
|
45
|
+
gradientAngle?: number;
|
|
46
|
+
gradientReverse?: boolean;
|
|
47
|
+
gradientStops?: GradientStop[];
|
|
48
|
+
gradientSize?: 'page' | 'window';
|
|
49
|
+
anchorToBase?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Where the base color sits in the ramp while `anchorToBase` is on: the
|
|
52
|
+
* PALETTE_STEPS index whose curve anchors are pinned to the base color
|
|
53
|
+
* (lightness = base L, saturation = multiplier 100). `displacedL` /
|
|
54
|
+
* `displacedS` remember the y of a pre-existing anchor (endpoint or
|
|
55
|
+
* user-authored) the placement overwrote at that x, so moving the
|
|
56
|
+
* placement or toggling off restores it instead of deleting it.
|
|
57
|
+
* `priorLightnessEndpoints` / `priorSaturationEndpoints` remember the two
|
|
58
|
+
* endpoints exactly as they stood before the curve's first-ever placement
|
|
59
|
+
* (a smoothed reshape, not algebraically invertible the way a later
|
|
60
|
+
* scaled-handle re-placement is), so a clear can still restore the true
|
|
61
|
+
* original regardless of how many times the anchor has since moved.
|
|
62
|
+
*/
|
|
63
|
+
anchorPlacement?: {
|
|
64
|
+
step: number;
|
|
65
|
+
displacedL?: number;
|
|
66
|
+
displacedS?: number;
|
|
67
|
+
priorLightnessEndpoints?: [CurveAnchor, CurveAnchor];
|
|
68
|
+
priorSaturationEndpoints?: [CurveAnchor, CurveAnchor];
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* Set to true by importers when they overlay `cssVariables[--color-{ns}-*]`
|
|
72
|
+
* without owning the typed-state curves. The storage-layer reconciler uses
|
|
73
|
+
* it as an opt-in switch: snap `baseColor` to the imported
|
|
74
|
+
* `--color-{ns}-500` anchor and clear the flag. Editor-authored themes
|
|
75
|
+
* never set this, so the reconciler is a strict no-op for them.
|
|
76
|
+
*
|
|
77
|
+
* Persists on disk for first-load reconciliation. After reconcile strips
|
|
78
|
+
* the palette-derived keys from `cssVariables`, subsequent reconciles find
|
|
79
|
+
* no anchor and become idempotent no-ops regardless of the flag's value.
|
|
80
|
+
*/
|
|
81
|
+
_imported?: boolean;
|
|
82
|
+
}
|
|
83
|
+
type FontSourceKind = 'google' | 'typekit' | 'css-url' | 'font-face';
|
|
84
|
+
interface FontFamily {
|
|
85
|
+
id: string;
|
|
86
|
+
name: string;
|
|
87
|
+
cssName: string;
|
|
88
|
+
weights?: number[];
|
|
89
|
+
italics?: boolean;
|
|
90
|
+
}
|
|
91
|
+
interface FontSource {
|
|
92
|
+
id: string;
|
|
93
|
+
kind: FontSourceKind;
|
|
94
|
+
url?: string;
|
|
95
|
+
cssText?: string;
|
|
96
|
+
families: FontFamily[];
|
|
97
|
+
label?: string;
|
|
98
|
+
}
|
|
99
|
+
type SystemCascadePreset = 'system-ui-sans' | 'system-ui-serif' | 'system-ui-mono';
|
|
100
|
+
type GenericFamily = 'sans-serif' | 'serif' | 'monospace' | 'cursive' | 'fantasy';
|
|
101
|
+
type FontStackVariable = '--font-display' | '--font-sans' | '--font-serif' | '--font-mono';
|
|
102
|
+
type FontStackSlot = {
|
|
103
|
+
kind: 'project';
|
|
104
|
+
familyId: string;
|
|
105
|
+
} | {
|
|
106
|
+
kind: 'system';
|
|
107
|
+
preset: SystemCascadePreset;
|
|
108
|
+
} | {
|
|
109
|
+
kind: 'generic';
|
|
110
|
+
value: GenericFamily;
|
|
111
|
+
};
|
|
112
|
+
interface FontStack {
|
|
113
|
+
variable: FontStackVariable;
|
|
114
|
+
slots: FontStackSlot[];
|
|
115
|
+
}
|
|
116
|
+
/** On-disk shape of one `--gradient-N` library token. Structural mirror of the
|
|
117
|
+
* store's `GradientToken` (like `AliasDiskValue`'s inline gradient shape) so
|
|
118
|
+
* the file schema stays independent of store types. The rendered strings in
|
|
119
|
+
* `cssVariables` are a projection of these for production CSS; this field is
|
|
120
|
+
* the editable basis. */
|
|
121
|
+
interface GradientDiskToken {
|
|
122
|
+
variable: string;
|
|
123
|
+
type: 'linear' | 'radial' | 'solid' | 'none';
|
|
124
|
+
angle: number;
|
|
125
|
+
radius?: number;
|
|
126
|
+
centerX?: number;
|
|
127
|
+
aspectX?: number;
|
|
128
|
+
aspectY?: number;
|
|
129
|
+
stops: {
|
|
130
|
+
position: number;
|
|
131
|
+
color: string;
|
|
132
|
+
opacity?: number;
|
|
133
|
+
}[];
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Where a live read resolved from: the unsaved `_working` buffer, the open
|
|
137
|
+
* theme's embedded copy, or the shipped default. It says which layer answered,
|
|
138
|
+
* never whether the content was edited — applying a theme fills the buffer for
|
|
139
|
+
* every layer it carries.
|
|
140
|
+
*/
|
|
141
|
+
type LiveSource = 'working' | 'theme' | 'default';
|
|
142
|
+
interface ColorsAndType {
|
|
143
|
+
name: string;
|
|
144
|
+
createdAt: string;
|
|
145
|
+
updatedAt: string;
|
|
146
|
+
editorConfigs: Record<string, PaletteConfig>;
|
|
147
|
+
cssVariables: Record<string, string>;
|
|
148
|
+
fontSources?: FontSource[];
|
|
149
|
+
fontStacks?: FontStack[];
|
|
150
|
+
/** Absent on files saved before gradients round-tripped; the loader keeps
|
|
151
|
+
* the stock defaults then, which match what those files rendered. */
|
|
152
|
+
gradients?: GradientDiskToken[];
|
|
153
|
+
/** Four fixed harmony axes, each owning a hue with an optional bound family. */
|
|
154
|
+
harmonyAxes?: HarmonyAxis[];
|
|
155
|
+
/**
|
|
156
|
+
* Server-attached marker naming the open theme — the document this content
|
|
157
|
+
* belongs to, not a colors-and-type file. Set by `themeFileApi`'s GET
|
|
158
|
+
* handlers; read by `themeInit` to seed `openThemeSlug`. Not persisted.
|
|
159
|
+
*/
|
|
160
|
+
_fileName?: string;
|
|
161
|
+
/** Server-attached marker: which of the three live layers answered. */
|
|
162
|
+
_source?: LiveSource;
|
|
163
|
+
/**
|
|
164
|
+
* Migration stamp. Absent on legacy files, treated as 0; the loader runs
|
|
165
|
+
* any registered theme migrations whose `fromVersion >= file.schemaVersion`.
|
|
166
|
+
* Save paths stamp the current value so resaved files skip past
|
|
167
|
+
* migrations.
|
|
168
|
+
*/
|
|
169
|
+
schemaVersion?: number;
|
|
170
|
+
}
|
|
171
|
+
/** On-disk shape of a single alias entry. Plain strings carry the bulk of
|
|
172
|
+
* aliases (token refs like `--surface-canvas-low` or literal CSS like `4px`);
|
|
173
|
+
* the gradient object shape is the structured payload for component-owned
|
|
174
|
+
* gradients that can't compress to a single string. */
|
|
175
|
+
type AliasDiskValue = string | {
|
|
176
|
+
kind: 'gradient';
|
|
177
|
+
value: {
|
|
178
|
+
type: 'linear' | 'radial' | 'solid' | 'none';
|
|
179
|
+
angle: number;
|
|
180
|
+
radius?: number;
|
|
181
|
+
centerX?: number;
|
|
182
|
+
aspectX?: number;
|
|
183
|
+
aspectY?: number;
|
|
184
|
+
stops: {
|
|
185
|
+
position: number;
|
|
186
|
+
color: string;
|
|
187
|
+
opacity?: number;
|
|
188
|
+
}[];
|
|
189
|
+
};
|
|
190
|
+
};
|
|
191
|
+
interface ComponentConfig {
|
|
192
|
+
name: string;
|
|
193
|
+
component: string;
|
|
194
|
+
createdAt: string;
|
|
195
|
+
updatedAt: string;
|
|
196
|
+
aliases: Record<string, AliasDiskValue>;
|
|
197
|
+
config?: Record<string, unknown>;
|
|
198
|
+
/**
|
|
199
|
+
* Server-attached marker. Same role as `ColorsAndType._fileName`: the open
|
|
200
|
+
* theme, not a config file. Set by the component-configs GET handlers.
|
|
201
|
+
*/
|
|
202
|
+
_fileName?: string;
|
|
203
|
+
/** Server-attached marker: which of the three live layers answered. */
|
|
204
|
+
_source?: LiveSource;
|
|
205
|
+
/**
|
|
206
|
+
* Migration stamp. Absent on legacy files, treated as 0. See `ColorsAndType.schemaVersion`.
|
|
207
|
+
*/
|
|
208
|
+
schemaVersion?: number;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
export type { AliasDiskValue as A, ColorsAndType as C, FontSource as F, GradientDiskToken as G, HarmonyMode as H, Oklch as O, ComponentConfig as a, FontStack as b };
|
|
@@ -404,8 +404,9 @@ var import_fs = __toESM(require("fs"), 1);
|
|
|
404
404
|
var import_path = __toESM(require("path"), 1);
|
|
405
405
|
var KNOWN_CONFIG_KEYS = /* @__PURE__ */ new Set([
|
|
406
406
|
"dataDir",
|
|
407
|
-
"
|
|
407
|
+
"colorsAndTypeDir",
|
|
408
408
|
"componentConfigsDir",
|
|
409
|
+
"themesDir",
|
|
409
410
|
"manifestsDir",
|
|
410
411
|
"tokensCssPath"
|
|
411
412
|
]);
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export { r as readLiveTokensConfig } from '../dataPaths-DBN0RPuT.cjs';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* A `tokens-css` migration: a pure, idempotent transform on the text of a
|
|
3
5
|
* consumer's `tokens.css`.
|
|
@@ -93,20 +95,6 @@ declare function removeToken(css: string, name: string): string;
|
|
|
93
95
|
*/
|
|
94
96
|
declare function removeTokensMatching(css: string, predicate: (name: string) => boolean): string;
|
|
95
97
|
|
|
96
|
-
interface LiveTokensFileConfig {
|
|
97
|
-
dataDir?: string;
|
|
98
|
-
themesDir?: string;
|
|
99
|
-
componentConfigsDir?: string;
|
|
100
|
-
manifestsDir?: string;
|
|
101
|
-
/**
|
|
102
|
-
* Path to the developer-authored `tokens.css`. The dev plugin takes this from
|
|
103
|
-
* its `themeFileApi({ tokensCssPath })` option; the standalone `live-tokens
|
|
104
|
-
* migrate` CLI has no plugin options, so it reads this key to locate the file.
|
|
105
|
-
*/
|
|
106
|
-
tokensCssPath?: string;
|
|
107
|
-
}
|
|
108
|
-
declare function readLiveTokensConfig(): LiveTokensFileConfig;
|
|
109
|
-
|
|
110
98
|
/**
|
|
111
99
|
* Registered tokens-css migrations, applied in array order. Unlike the
|
|
112
100
|
* versioned data-file migrations, ordering here is explicit (chronological) and
|
|
@@ -195,4 +183,4 @@ interface ValidateInput {
|
|
|
195
183
|
*/
|
|
196
184
|
declare function validateTokensCss(input: ValidateInput): MissingToken[];
|
|
197
185
|
|
|
198
|
-
export { type BreakingGateResult, type ComponentSource, type ContractViolation, type MissingToken, type RunResult, type SemverBump, TOKENS_CSS_MIGRATIONS, type TokensCssMigration, type ValidateInput, collectDefinedTokens, collectReferencedTokens, enforceBreakingRequiresMajor, ensureScale, findContractViolations,
|
|
186
|
+
export { type BreakingGateResult, type ComponentSource, type ContractViolation, type MissingToken, type RunResult, type SemverBump, TOKENS_CSS_MIGRATIONS, type TokensCssMigration, type ValidateInput, collectDefinedTokens, collectReferencedTokens, enforceBreakingRequiresMajor, ensureScale, findContractViolations, removeToken, removeTokensMatching, renameToken, runAdditiveTokensCssMigrations, runTokensCssMigrations, semverBumpType, validateTokensCss };
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export { r as readLiveTokensConfig } from '../dataPaths-DBN0RPuT.js';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* A `tokens-css` migration: a pure, idempotent transform on the text of a
|
|
3
5
|
* consumer's `tokens.css`.
|
|
@@ -93,20 +95,6 @@ declare function removeToken(css: string, name: string): string;
|
|
|
93
95
|
*/
|
|
94
96
|
declare function removeTokensMatching(css: string, predicate: (name: string) => boolean): string;
|
|
95
97
|
|
|
96
|
-
interface LiveTokensFileConfig {
|
|
97
|
-
dataDir?: string;
|
|
98
|
-
themesDir?: string;
|
|
99
|
-
componentConfigsDir?: string;
|
|
100
|
-
manifestsDir?: string;
|
|
101
|
-
/**
|
|
102
|
-
* Path to the developer-authored `tokens.css`. The dev plugin takes this from
|
|
103
|
-
* its `themeFileApi({ tokensCssPath })` option; the standalone `live-tokens
|
|
104
|
-
* migrate` CLI has no plugin options, so it reads this key to locate the file.
|
|
105
|
-
*/
|
|
106
|
-
tokensCssPath?: string;
|
|
107
|
-
}
|
|
108
|
-
declare function readLiveTokensConfig(): LiveTokensFileConfig;
|
|
109
|
-
|
|
110
98
|
/**
|
|
111
99
|
* Registered tokens-css migrations, applied in array order. Unlike the
|
|
112
100
|
* versioned data-file migrations, ordering here is explicit (chronological) and
|
|
@@ -195,4 +183,4 @@ interface ValidateInput {
|
|
|
195
183
|
*/
|
|
196
184
|
declare function validateTokensCss(input: ValidateInput): MissingToken[];
|
|
197
185
|
|
|
198
|
-
export { type BreakingGateResult, type ComponentSource, type ContractViolation, type MissingToken, type RunResult, type SemverBump, TOKENS_CSS_MIGRATIONS, type TokensCssMigration, type ValidateInput, collectDefinedTokens, collectReferencedTokens, enforceBreakingRequiresMajor, ensureScale, findContractViolations,
|
|
186
|
+
export { type BreakingGateResult, type ComponentSource, type ContractViolation, type MissingToken, type RunResult, type SemverBump, TOKENS_CSS_MIGRATIONS, type TokensCssMigration, type ValidateInput, collectDefinedTokens, collectReferencedTokens, enforceBreakingRequiresMajor, ensureScale, findContractViolations, removeToken, removeTokensMatching, renameToken, runAdditiveTokensCssMigrations, runTokensCssMigrations, semverBumpType, validateTokensCss };
|
|
@@ -5,7 +5,6 @@ import {
|
|
|
5
5
|
enforceBreakingRequiresMajor,
|
|
6
6
|
ensureScale,
|
|
7
7
|
findContractViolations,
|
|
8
|
-
readLiveTokensConfig,
|
|
9
8
|
removeToken,
|
|
10
9
|
removeTokensMatching,
|
|
11
10
|
renameToken,
|
|
@@ -13,7 +12,10 @@ import {
|
|
|
13
12
|
runTokensCssMigrations,
|
|
14
13
|
semverBumpType,
|
|
15
14
|
validateTokensCss
|
|
16
|
-
} from "../chunk-
|
|
15
|
+
} from "../chunk-44RSTAII.js";
|
|
16
|
+
import {
|
|
17
|
+
readLiveTokensConfig
|
|
18
|
+
} from "../chunk-D3ZVKOR4.js";
|
|
17
19
|
export {
|
|
18
20
|
TOKENS_CSS_MIGRATIONS,
|
|
19
21
|
collectDefinedTokens,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@motion-proto/live-tokens",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.48.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Design token editor with live CSS variable editing. Svelte 5 + Vite 8.",
|
|
6
6
|
"keywords": [
|
|
@@ -24,8 +24,21 @@
|
|
|
24
24
|
"src/system",
|
|
25
25
|
"src/app/site.css",
|
|
26
26
|
"src/live-tokens/data/tokens.generated.css",
|
|
27
|
-
"src/live-tokens/data/
|
|
28
|
-
"src/live-tokens/data/
|
|
27
|
+
"src/live-tokens/data/colors-and-type/default.json",
|
|
28
|
+
"src/live-tokens/data/colors-and-type/autumn.json",
|
|
29
|
+
"src/live-tokens/data/colors-and-type/halloween.json",
|
|
30
|
+
"src/live-tokens/data/colors-and-type/midnight-study.json",
|
|
31
|
+
"src/live-tokens/data/colors-and-type/ocean.json",
|
|
32
|
+
"src/live-tokens/data/colors-and-type/royal-velvet.json",
|
|
33
|
+
"src/live-tokens/data/colors-and-type/spring-meadow.json",
|
|
34
|
+
"src/live-tokens/data/colors-and-type/sunset.json",
|
|
35
|
+
"src/live-tokens/data/themes/autumn.json",
|
|
36
|
+
"src/live-tokens/data/themes/halloween.json",
|
|
37
|
+
"src/live-tokens/data/themes/midnight-study.json",
|
|
38
|
+
"src/live-tokens/data/themes/ocean.json",
|
|
39
|
+
"src/live-tokens/data/themes/royal-velvet.json",
|
|
40
|
+
"src/live-tokens/data/themes/spring-meadow.json",
|
|
41
|
+
"src/live-tokens/data/themes/sunset.json",
|
|
29
42
|
"dist-plugin",
|
|
30
43
|
".claude/skills",
|
|
31
44
|
"bin",
|
|
@@ -110,7 +123,8 @@
|
|
|
110
123
|
"check:token-contract": "node scripts/check-token-contract.mjs",
|
|
111
124
|
"sync:component-defaults": "node scripts/sync-component-defaults.mjs --write",
|
|
112
125
|
"sync:docs": "node scripts/sync-docs.mjs --write",
|
|
113
|
-
"
|
|
126
|
+
"generate:preset-themes": "node scripts/generate-preset-themes.mjs",
|
|
127
|
+
"collapse:theme": "node scripts/collapse-theme-to-default.mjs",
|
|
114
128
|
"check:smoke-install": "bash scripts/smoke-install.sh",
|
|
115
129
|
"check:smoke-create": "bash scripts/smoke-create.sh",
|
|
116
130
|
"prepublishOnly": "npm run check:no-style-imports && npm run check:slot-prose && npm run check:overlay-portal && npm run check:editor-font-isolation && npm run check:component-defaults && npm run check:production-is-default && npm run check:docs-content && npm run build:lib && npm run check:token-contract && npm run check:smoke-install && npm run check:smoke-create"
|