@motion-proto/live-tokens 0.74.0 → 0.76.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-check-compliance/SKILL.md +33 -38
- package/.claude/skills/live-tokens-create-component/SKILL copy.md +196 -0
- package/.claude/skills/live-tokens-create-component/SKILL.md +198 -146
- package/.claude/skills/live-tokens-create-component/references/contract-tests.md +95 -52
- package/.claude/skills/live-tokens-create-component/references/intrinsics.md +2 -2
- package/.claude/skills/live-tokens-create-component/references/linked-siblings.md +2 -2
- package/.claude/skills/live-tokens-create-component/references/sketch-mode.md +12 -12
- package/.claude/skills/live-tokens-create-component/references/token-naming.md +2 -1
- package/.claude/skills/live-tokens-create-page/SKILL.md +187 -0
- package/.claude/skills/live-tokens-create-page/references/interaction-sources.md +66 -0
- package/.claude/skills/live-tokens-create-page/references/layout-sources.md +87 -0
- package/.claude/skills/live-tokens-create-theme/SKILL.md +52 -48
- package/.claude/skills/live-tokens-create-theme/references/design-directions.md +1 -1
- package/.claude/skills/live-tokens-fix-findings/SKILL.md +69 -60
- package/.claude/skills/live-tokens-pick-component/SKILL.md +64 -79
- package/.claude/skills/live-tokens-set-colors/SKILL.md +47 -38
- package/.claude/skills/live-tokens-set-geometry/SKILL.md +58 -35
- package/.claude/skills/live-tokens-set-geometry/references/geometry-anchors.md +5 -3
- package/.claude/skills/live-tokens-set-type/SKILL.md +30 -30
- package/CHANGELOG.md +138 -0
- package/README.md +17 -7
- package/bin/check-component.mjs +91 -19
- package/bin/check-page.mjs +102 -21
- package/bin/cli.mjs +87 -113
- package/bin/contractRunner.mjs +945 -0
- package/bin/create.mjs +1 -1
- package/bin/lib/catalogue.mjs +37 -30
- package/bin/lib/findings.mjs +46 -15
- package/bin/lib/report.mjs +3 -3
- package/bin/lib/tokenVocabulary.mjs +4 -4
- package/bin/migrate-routes.mjs +5 -5
- package/bin/migrate.mjs +4 -4
- package/bin/save-theme.mjs +8 -9
- package/bin/set-colors.mjs +9 -11
- package/bin/set-geometry.mjs +7 -7
- package/bin/set-type.mjs +5 -7
- package/bin/setup-claude.mjs +110 -0
- package/dist-plugin/{chunk-W6Y4BWFB.js → chunk-6WGFOJXO.js} +22 -0
- package/dist-plugin/{chunk-7VRTBGJT.js → chunk-PDNL4NC5.js} +9 -2
- package/dist-plugin/{chunk-V3YF6CGT.js → chunk-SWXRVZKT.js} +43 -1
- package/dist-plugin/{dataPaths-BhWzd5cL.d.cts → dataPaths-BpIK_Obx.d.cts} +1 -0
- package/dist-plugin/{dataPaths-BhWzd5cL.d.ts → dataPaths-BpIK_Obx.d.ts} +1 -0
- package/dist-plugin/index.cjs +310 -147
- package/dist-plugin/index.d.cts +1 -1
- package/dist-plugin/index.d.ts +1 -1
- package/dist-plugin/index.js +218 -122
- package/dist-plugin/migrateData/index.cjs +66 -2
- package/dist-plugin/migrateData/index.d.cts +1 -1
- package/dist-plugin/migrateData/index.d.ts +1 -1
- package/dist-plugin/migrateData/index.js +3 -3
- package/dist-plugin/setColors/index.cjs +61 -4
- package/dist-plugin/setColors/index.d.cts +1 -1
- package/dist-plugin/setColors/index.d.ts +1 -1
- package/dist-plugin/setColors/index.js +5 -5
- package/dist-plugin/setGeometry/index.cjs +107 -44
- package/dist-plugin/setGeometry/index.d.cts +5 -5
- package/dist-plugin/setGeometry/index.d.ts +5 -5
- package/dist-plugin/setGeometry/index.js +51 -45
- package/dist-plugin/setType/index.cjs +15 -0
- package/dist-plugin/setType/index.d.cts +1 -1
- package/dist-plugin/setType/index.d.ts +1 -1
- package/dist-plugin/setType/index.js +1 -1
- package/dist-plugin/tokensCssMigrations/index.d.cts +1 -1
- package/dist-plugin/tokensCssMigrations/index.d.ts +1 -1
- package/dist-plugin/tokensCssMigrations/index.js +1 -1
- package/package.json +35 -8
- package/src/app/site.css +19 -9
- package/src/editor/bootstrap.ts +2 -0
- package/src/editor/component-editor/CollapsibleSectionEditor.svelte +4 -4
- package/src/editor/component-editor/DialogEditor.svelte +4 -4
- package/src/editor/component-editor/MenuSelectEditor.svelte +4 -1
- package/src/editor/component-editor/SegmentedControlEditor.svelte +6 -1
- package/src/editor/component-editor/TabBarEditor.svelte +1 -1
- package/src/editor/component-editor/TableEditor.svelte +2 -2
- package/src/editor/component-editor/scaffolding/TokenLayout.svelte +6 -3
- package/src/editor/component-editor/scaffolding/VariantGroup.svelte +41 -20
- package/src/editor/core/components/adjustAliases.ts +59 -45
- package/src/editor/core/components/aliasKinds.ts +9 -5
- package/src/editor/core/preview/themePreview.ts +9 -2
- package/src/editor/core/sketch/sketchLayer.ts +22 -0
- package/src/editor/core/store/editorStore.ts +10 -1
- package/src/editor/core/themes/buildColors.ts +3 -3
- package/src/editor/core/themes/liveStateStream.ts +26 -0
- package/src/editor/core/themes/migrations/2026-09-07-stroke-role-renames.ts +52 -0
- package/src/editor/core/themes/migrations/index.ts +2 -0
- package/src/editor/core/themes/themeDocumentSync.ts +22 -11
- package/src/editor/core/themes/themeService.ts +9 -2
- package/src/editor/pages/ComponentEditorPage.svelte +17 -1
- package/src/editor/pages/liveTokensEditorHandle.ts +23 -0
- package/src/editor/skill-atlas/SkillAtlas.svelte +75 -573
- package/src/editor/skill-atlas/TreeCanvas.svelte +263 -0
- package/src/editor/skill-atlas/TreeNodeCard.svelte +136 -53
- package/src/editor/skill-atlas/edges.ts +31 -0
- package/src/editor/skill-atlas/skillSources.generated.ts +20 -19
- package/src/editor/skill-atlas/skillTrees.ts +19 -3840
- package/src/editor/skill-atlas/trees/check-compliance.ts +183 -0
- package/src/editor/skill-atlas/trees/create-component.ts +275 -0
- package/src/editor/skill-atlas/trees/create-page.ts +320 -0
- package/src/editor/skill-atlas/trees/create-theme.ts +255 -0
- package/src/editor/skill-atlas/trees/fix-findings.ts +469 -0
- package/src/editor/skill-atlas/trees/pick-component.ts +300 -0
- package/src/editor/skill-atlas/trees/set-colors.ts +148 -0
- package/src/editor/skill-atlas/trees/set-geometry.ts +136 -0
- package/src/editor/skill-atlas/trees/set-type.ts +142 -0
- package/src/editor/skill-atlas/types.ts +3 -4
- package/src/editor/skill-atlas/wireLayout.ts +287 -0
- package/src/live-tokens/data/themes/autumn.json +15 -15
- package/src/live-tokens/data/themes/halloween.json +15 -15
- package/src/live-tokens/data/themes/midnight-study.json +15 -15
- package/src/live-tokens/data/themes/ocean.json +15 -15
- package/src/live-tokens/data/themes/royal-velvet.json +15 -15
- package/src/live-tokens/data/themes/sketchy.json +15 -15
- package/src/live-tokens/data/themes/spring-meadow.json +15 -15
- package/src/live-tokens/data/themes/sunset.json +15 -15
- package/src/system/components/Badge.svelte +7 -0
- package/src/system/components/Button.svelte +7 -0
- package/src/system/components/Callout.svelte +10 -6
- package/src/system/components/Card.svelte +23 -4
- package/src/system/components/CodeSnippet.svelte +4 -3
- package/src/system/components/CollapsibleSection.svelte +23 -8
- package/src/system/components/CornerBadge.svelte +6 -0
- package/src/system/components/Dialog.svelte +13 -6
- package/src/system/components/IconButton.svelte +9 -0
- package/src/system/components/Image.svelte +8 -0
- package/src/system/components/ImageLightbox.svelte +6 -0
- package/src/system/components/InlineEditActions.svelte +7 -0
- package/src/system/components/Input.svelte +7 -0
- package/src/system/components/MenuSelect.svelte +7 -0
- package/src/system/components/Notification.svelte +7 -0
- package/src/system/components/Panel.svelte +6 -0
- package/src/system/components/ProgressBar.svelte +5 -0
- package/src/system/components/RadioButton.svelte +11 -5
- package/src/system/components/SectionDivider.svelte +8 -0
- package/src/system/components/SegmentedControl.svelte +6 -0
- package/src/system/components/SideNavigation.svelte +6 -0
- package/src/system/components/Slider.svelte +7 -4
- package/src/system/components/TabBar.svelte +15 -9
- package/src/system/components/Table.svelte +8 -3
- package/src/system/components/Toggle.svelte +4 -4
- package/src/system/components/Tooltip.svelte +6 -0
- package/src/testing-js/chunk-AO7EZHYV.js +776 -0
- package/src/testing-js/chunk-AO7EZHYV.js.map +1 -0
- package/src/testing-js/chunk-FAFOAWYL.js +39 -0
- package/src/testing-js/chunk-FAFOAWYL.js.map +1 -0
- package/src/testing-js/chunk-L73N4NSO.js +23 -0
- package/src/testing-js/chunk-L73N4NSO.js.map +1 -0
- package/src/testing-js/chunk-LXR3MN6N.js +3063 -0
- package/src/testing-js/chunk-LXR3MN6N.js.map +1 -0
- package/src/testing-js/chunk-ZMSX6CXR.js +53 -0
- package/src/testing-js/chunk-ZMSX6CXR.js.map +1 -0
- package/src/testing-js/component-alias.contract.js +81 -0
- package/src/testing-js/component-alias.contract.js.map +1 -0
- package/src/testing-js/component-editor.contract.js +62 -0
- package/src/testing-js/component-editor.contract.js.map +1 -0
- package/src/testing-js/component-render.contract.js +568 -0
- package/src/testing-js/component-render.contract.js.map +1 -0
- package/src/testing-js/index.d.ts +293 -0
- package/src/testing-js/index.js +222 -0
- package/src/testing-js/index.js.map +1 -0
- package/src/testing-js/registry.contract.js +39 -0
- package/src/testing-js/registry.contract.js.map +1 -0
- package/src/testing-js/vitest-BE6uGF31.d.ts +73 -0
- package/src/testing-js/vitest.d.ts +3 -0
- package/src/testing-js/vitest.js +13 -0
- package/src/testing-js/vitest.js.map +1 -0
- package/template/README.md +13 -0
- package/template/_gitignore +6 -0
- package/template/package.json +3 -1
- package/template/src/pages/Home.svelte +4 -18
- package/.claude/skills/live-tokens-build-page/SKILL.md +0 -103
- package/.claude/skills/live-tokens-build-page/references/layout-sources.md +0 -48
|
@@ -59,9 +59,11 @@ function versionedFileResourceServer(opts) {
|
|
|
59
59
|
function ensureMeta() {
|
|
60
60
|
if (!import_fs.default.existsSync(activePath)) {
|
|
61
61
|
import_fs.default.writeFileSync(activePath, JSON.stringify({ activeFile: defaultName }));
|
|
62
|
+
opts.onWrite?.(activePath);
|
|
62
63
|
}
|
|
63
64
|
if (!import_fs.default.existsSync(productionPath)) {
|
|
64
65
|
import_fs.default.writeFileSync(productionPath, JSON.stringify({ productionFile: defaultName }));
|
|
66
|
+
opts.onWrite?.(productionPath);
|
|
65
67
|
}
|
|
66
68
|
}
|
|
67
69
|
function filePath(name) {
|
|
@@ -126,9 +128,11 @@ function versionedFileResourceServer(opts) {
|
|
|
126
128
|
}
|
|
127
129
|
function setActiveName(name) {
|
|
128
130
|
import_fs.default.writeFileSync(activePath, JSON.stringify({ activeFile: name }));
|
|
131
|
+
opts.onWrite?.(activePath);
|
|
129
132
|
}
|
|
130
133
|
function setProductionName(name) {
|
|
131
134
|
import_fs.default.writeFileSync(productionPath, JSON.stringify({ productionFile: name }));
|
|
135
|
+
opts.onWrite?.(productionPath);
|
|
132
136
|
}
|
|
133
137
|
function hasWorking() {
|
|
134
138
|
return import_fs.default.existsSync(workingPath);
|
|
@@ -144,9 +148,12 @@ function versionedFileResourceServer(opts) {
|
|
|
144
148
|
function writeWorking(data) {
|
|
145
149
|
ensureDir();
|
|
146
150
|
import_fs.default.writeFileSync(workingPath, JSON.stringify(data, null, 2));
|
|
151
|
+
opts.onWrite?.(workingPath);
|
|
147
152
|
}
|
|
148
153
|
function clearWorking() {
|
|
149
|
-
if (import_fs.default.existsSync(workingPath))
|
|
154
|
+
if (!import_fs.default.existsSync(workingPath)) return;
|
|
155
|
+
import_fs.default.unlinkSync(workingPath);
|
|
156
|
+
opts.onWrite?.(workingPath);
|
|
150
157
|
}
|
|
151
158
|
return {
|
|
152
159
|
dir,
|
|
@@ -1053,6 +1060,47 @@ var colorsAndTypeMigration_2026_09_03_dropLegacyComponentKeys = {
|
|
|
1053
1060
|
}
|
|
1054
1061
|
};
|
|
1055
1062
|
|
|
1063
|
+
// src/editor/core/themes/migrations/2026-09-07-stroke-role-renames.ts
|
|
1064
|
+
var RENAMES2 = {
|
|
1065
|
+
tabbar: Object.fromEntries(
|
|
1066
|
+
["default", "hover", "active", "disabled"].map((s) => [
|
|
1067
|
+
`--tabbar-${s}-indicator-border-width`,
|
|
1068
|
+
`--tabbar-${s}-indicator-width`
|
|
1069
|
+
])
|
|
1070
|
+
),
|
|
1071
|
+
collapsiblesection: Object.fromEntries(
|
|
1072
|
+
["default", "hover"].flatMap((s) => [
|
|
1073
|
+
[`--collapsiblesection-divider-${s}-border`, `--collapsiblesection-divider-${s}-hairline-color`],
|
|
1074
|
+
[`--collapsiblesection-divider-${s}-border-width`, `--collapsiblesection-divider-${s}-hairline-thickness`]
|
|
1075
|
+
])
|
|
1076
|
+
),
|
|
1077
|
+
dialog: Object.fromEntries(
|
|
1078
|
+
["header", "footer"].flatMap((part) => [
|
|
1079
|
+
[`--dialog-${part}-border`, `--dialog-${part}-divider`],
|
|
1080
|
+
[`--dialog-${part}-border-width`, `--dialog-${part}-divider-width`]
|
|
1081
|
+
])
|
|
1082
|
+
),
|
|
1083
|
+
table: {
|
|
1084
|
+
"--table-default-header-border": "--table-default-header-divider",
|
|
1085
|
+
"--table-default-header-border-width": "--table-default-header-divider-width"
|
|
1086
|
+
}
|
|
1087
|
+
};
|
|
1088
|
+
var componentMigration_2026_09_07_strokeRoleRenames = {
|
|
1089
|
+
id: "2026-09-07-stroke-role-renames",
|
|
1090
|
+
fromVersion: 26,
|
|
1091
|
+
toVersion: 27,
|
|
1092
|
+
appliesTo: "component-config",
|
|
1093
|
+
apply(rawVars, meta) {
|
|
1094
|
+
const renames = meta.component ? RENAMES2[meta.component] : void 0;
|
|
1095
|
+
if (!renames) return { ...rawVars };
|
|
1096
|
+
const out = {};
|
|
1097
|
+
for (const [key, value] of Object.entries(rawVars)) {
|
|
1098
|
+
out[renames[key] ?? key] = value;
|
|
1099
|
+
}
|
|
1100
|
+
return out;
|
|
1101
|
+
}
|
|
1102
|
+
};
|
|
1103
|
+
|
|
1056
1104
|
// src/editor/core/themes/migrations/index.ts
|
|
1057
1105
|
var MIGRATIONS = [
|
|
1058
1106
|
colorsAndTypeMigration_2026_04_24_legacyKeysAndBgToCanvas,
|
|
@@ -1088,7 +1136,8 @@ var MIGRATIONS = [
|
|
|
1088
1136
|
componentMigration_2026_09_01_tabbarActiveTint,
|
|
1089
1137
|
componentMigration_2026_09_01_gateSuffixEnabled,
|
|
1090
1138
|
componentMigration_2026_09_02_sectiondividerDropTitleOutline,
|
|
1091
|
-
colorsAndTypeMigration_2026_09_03_dropLegacyComponentKeys
|
|
1139
|
+
colorsAndTypeMigration_2026_09_03_dropLegacyComponentKeys,
|
|
1140
|
+
componentMigration_2026_09_07_strokeRoleRenames
|
|
1092
1141
|
];
|
|
1093
1142
|
function countFor(kind) {
|
|
1094
1143
|
return MIGRATIONS.filter((m) => m.appliesTo === kind).length;
|
|
@@ -2251,6 +2300,11 @@ function migrateData(opts) {
|
|
|
2251
2300
|
var import_fs4 = __toESM(require("fs"), 1);
|
|
2252
2301
|
var import_path4 = __toESM(require("path"), 1);
|
|
2253
2302
|
var DEFAULT_DATA_DIR = "src/live-tokens/data";
|
|
2303
|
+
var TEST_DATA_DIR_ENV = "LIVE_TOKENS_TEST_DATA_DIR";
|
|
2304
|
+
function testDataDir() {
|
|
2305
|
+
const raw = process.env[TEST_DATA_DIR_ENV];
|
|
2306
|
+
return raw && raw.trim() !== "" ? import_path4.default.resolve(raw.trim()) : void 0;
|
|
2307
|
+
}
|
|
2254
2308
|
var KNOWN_CONFIG_KEYS = /* @__PURE__ */ new Set([
|
|
2255
2309
|
"dataDir",
|
|
2256
2310
|
"colorsAndTypeDir",
|
|
@@ -2284,6 +2338,16 @@ function readLiveTokensConfig() {
|
|
|
2284
2338
|
}
|
|
2285
2339
|
}
|
|
2286
2340
|
function resolveDataDirs(opts = {}) {
|
|
2341
|
+
const isolated = testDataDir();
|
|
2342
|
+
if (isolated) {
|
|
2343
|
+
return {
|
|
2344
|
+
dataDir: isolated,
|
|
2345
|
+
colorsAndTypeDir: import_path4.default.join(isolated, "colors-and-type"),
|
|
2346
|
+
componentConfigsDir: import_path4.default.join(isolated, "component-configs"),
|
|
2347
|
+
themesDir: import_path4.default.join(isolated, "themes"),
|
|
2348
|
+
sketchStylesDir: import_path4.default.join(isolated, "sketch-styles")
|
|
2349
|
+
};
|
|
2350
|
+
}
|
|
2287
2351
|
const fileConfig = readLiveTokensConfig();
|
|
2288
2352
|
const dataDirRaw = opts.dataDir ?? fileConfig.dataDir ?? DEFAULT_DATA_DIR;
|
|
2289
2353
|
const dataDir = import_path4.default.resolve(dataDirRaw);
|
|
@@ -7,14 +7,14 @@ import {
|
|
|
7
7
|
normalizeTheme,
|
|
8
8
|
planLegacyRenames,
|
|
9
9
|
versionedFileResourceServer
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-PDNL4NC5.js";
|
|
11
11
|
import {
|
|
12
12
|
CURRENT_COMPONENT_SCHEMA_VERSION
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-SWXRVZKT.js";
|
|
14
14
|
import {
|
|
15
15
|
readLiveTokensConfig,
|
|
16
16
|
resolveDataDirs
|
|
17
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-6WGFOJXO.js";
|
|
18
18
|
|
|
19
19
|
// vite-plugin/migrateData/migrateData.ts
|
|
20
20
|
import fs from "fs";
|
|
@@ -1013,7 +1013,7 @@ function runContrastGate(configs, scheme) {
|
|
|
1013
1013
|
const failures = checks.filter((c) => !c.pass).map((c) => {
|
|
1014
1014
|
const label = defs.find((d) => d.textVar === c.textVar).paletteLabel;
|
|
1015
1015
|
const hint = scheme === "dark" ? `raise the ${label} base color lightness (derived text tops out at 2\xD7 its L)` : `raise the ${label} base color lightness or reduce its chroma`;
|
|
1016
|
-
return `${c.textVar} reaches ${c.ratio.toFixed(2)}:1 vs ${c.against} (floor ${c.floor}:1)
|
|
1016
|
+
return `${c.textVar} reaches ${c.ratio.toFixed(2)}:1 vs ${c.against} (floor ${c.floor}:1): ${hint}`;
|
|
1017
1017
|
});
|
|
1018
1018
|
return { scheme, checks, failures };
|
|
1019
1019
|
}
|
|
@@ -1044,7 +1044,7 @@ function applyCanvasGradient(canvas, scheme) {
|
|
|
1044
1044
|
const anchor = canvas.anchorPlacement.step;
|
|
1045
1045
|
const sky = scheme === "dark" ? Math.min(anchor + 2, labels.length - 1) : Math.max(anchor - 2, 0);
|
|
1046
1046
|
if (sky === anchor) {
|
|
1047
|
-
return `skipped
|
|
1047
|
+
return `skipped: the Canvas base color anchors at the ramp edge (${labels[anchor]}), leaving no room for a sky; commit the canvas further from ${scheme === "dark" ? "black" : "white"}`;
|
|
1048
1048
|
}
|
|
1049
1049
|
canvas.emptyMode = "gradient";
|
|
1050
1050
|
canvas.gradientStyle = "linear";
|
|
@@ -1055,7 +1055,7 @@ function applyCanvasGradient(canvas, scheme) {
|
|
|
1055
1055
|
{ position: 100, paletteLabel: labels[anchor] }
|
|
1056
1056
|
];
|
|
1057
1057
|
canvas.gradientSize = "window";
|
|
1058
|
-
return `on, ${labels[sky]}
|
|
1058
|
+
return `on, ${labels[sky]} to ${labels[anchor]}`;
|
|
1059
1059
|
}
|
|
1060
1060
|
var STOCK_SHADOW_GEOMETRY = {
|
|
1061
1061
|
"--shadow-sm": [1, 1, 2],
|
|
@@ -1130,6 +1130,11 @@ function sanitizeFileName(name) {
|
|
|
1130
1130
|
var import_fs = __toESM(require("fs"), 1);
|
|
1131
1131
|
var import_path = __toESM(require("path"), 1);
|
|
1132
1132
|
var DEFAULT_DATA_DIR = "src/live-tokens/data";
|
|
1133
|
+
var TEST_DATA_DIR_ENV = "LIVE_TOKENS_TEST_DATA_DIR";
|
|
1134
|
+
function testDataDir() {
|
|
1135
|
+
const raw = process.env[TEST_DATA_DIR_ENV];
|
|
1136
|
+
return raw && raw.trim() !== "" ? import_path.default.resolve(raw.trim()) : void 0;
|
|
1137
|
+
}
|
|
1133
1138
|
var KNOWN_CONFIG_KEYS = /* @__PURE__ */ new Set([
|
|
1134
1139
|
"dataDir",
|
|
1135
1140
|
"colorsAndTypeDir",
|
|
@@ -1163,6 +1168,16 @@ function readLiveTokensConfig() {
|
|
|
1163
1168
|
}
|
|
1164
1169
|
}
|
|
1165
1170
|
function resolveDataDirs(opts = {}) {
|
|
1171
|
+
const isolated = testDataDir();
|
|
1172
|
+
if (isolated) {
|
|
1173
|
+
return {
|
|
1174
|
+
dataDir: isolated,
|
|
1175
|
+
colorsAndTypeDir: import_path.default.join(isolated, "colors-and-type"),
|
|
1176
|
+
componentConfigsDir: import_path.default.join(isolated, "component-configs"),
|
|
1177
|
+
themesDir: import_path.default.join(isolated, "themes"),
|
|
1178
|
+
sketchStylesDir: import_path.default.join(isolated, "sketch-styles")
|
|
1179
|
+
};
|
|
1180
|
+
}
|
|
1166
1181
|
const fileConfig = readLiveTokensConfig();
|
|
1167
1182
|
const dataDirRaw = opts.dataDir ?? fileConfig.dataDir ?? DEFAULT_DATA_DIR;
|
|
1168
1183
|
const dataDir = import_path.default.resolve(dataDirRaw);
|
|
@@ -2059,6 +2074,47 @@ var colorsAndTypeMigration_2026_09_03_dropLegacyComponentKeys = {
|
|
|
2059
2074
|
}
|
|
2060
2075
|
};
|
|
2061
2076
|
|
|
2077
|
+
// src/editor/core/themes/migrations/2026-09-07-stroke-role-renames.ts
|
|
2078
|
+
var RENAMES2 = {
|
|
2079
|
+
tabbar: Object.fromEntries(
|
|
2080
|
+
["default", "hover", "active", "disabled"].map((s) => [
|
|
2081
|
+
`--tabbar-${s}-indicator-border-width`,
|
|
2082
|
+
`--tabbar-${s}-indicator-width`
|
|
2083
|
+
])
|
|
2084
|
+
),
|
|
2085
|
+
collapsiblesection: Object.fromEntries(
|
|
2086
|
+
["default", "hover"].flatMap((s) => [
|
|
2087
|
+
[`--collapsiblesection-divider-${s}-border`, `--collapsiblesection-divider-${s}-hairline-color`],
|
|
2088
|
+
[`--collapsiblesection-divider-${s}-border-width`, `--collapsiblesection-divider-${s}-hairline-thickness`]
|
|
2089
|
+
])
|
|
2090
|
+
),
|
|
2091
|
+
dialog: Object.fromEntries(
|
|
2092
|
+
["header", "footer"].flatMap((part) => [
|
|
2093
|
+
[`--dialog-${part}-border`, `--dialog-${part}-divider`],
|
|
2094
|
+
[`--dialog-${part}-border-width`, `--dialog-${part}-divider-width`]
|
|
2095
|
+
])
|
|
2096
|
+
),
|
|
2097
|
+
table: {
|
|
2098
|
+
"--table-default-header-border": "--table-default-header-divider",
|
|
2099
|
+
"--table-default-header-border-width": "--table-default-header-divider-width"
|
|
2100
|
+
}
|
|
2101
|
+
};
|
|
2102
|
+
var componentMigration_2026_09_07_strokeRoleRenames = {
|
|
2103
|
+
id: "2026-09-07-stroke-role-renames",
|
|
2104
|
+
fromVersion: 26,
|
|
2105
|
+
toVersion: 27,
|
|
2106
|
+
appliesTo: "component-config",
|
|
2107
|
+
apply(rawVars, meta) {
|
|
2108
|
+
const renames = meta.component ? RENAMES2[meta.component] : void 0;
|
|
2109
|
+
if (!renames) return { ...rawVars };
|
|
2110
|
+
const out = {};
|
|
2111
|
+
for (const [key, value] of Object.entries(rawVars)) {
|
|
2112
|
+
out[renames[key] ?? key] = value;
|
|
2113
|
+
}
|
|
2114
|
+
return out;
|
|
2115
|
+
}
|
|
2116
|
+
};
|
|
2117
|
+
|
|
2062
2118
|
// src/editor/core/themes/migrations/index.ts
|
|
2063
2119
|
var MIGRATIONS = [
|
|
2064
2120
|
colorsAndTypeMigration_2026_04_24_legacyKeysAndBgToCanvas,
|
|
@@ -2094,7 +2150,8 @@ var MIGRATIONS = [
|
|
|
2094
2150
|
componentMigration_2026_09_01_tabbarActiveTint,
|
|
2095
2151
|
componentMigration_2026_09_01_gateSuffixEnabled,
|
|
2096
2152
|
componentMigration_2026_09_02_sectiondividerDropTitleOutline,
|
|
2097
|
-
colorsAndTypeMigration_2026_09_03_dropLegacyComponentKeys
|
|
2153
|
+
colorsAndTypeMigration_2026_09_03_dropLegacyComponentKeys,
|
|
2154
|
+
componentMigration_2026_09_07_strokeRoleRenames
|
|
2098
2155
|
];
|
|
2099
2156
|
function countFor(kind) {
|
|
2100
2157
|
return MIGRATIONS.filter((m) => m.appliesTo === kind).length;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { P as PaletteConfig, H as HarmonyAxis, G as GradientDiskToken, O as Oklch, d as HarmonyMode } from '../themeTypes-BxRtuN5V.cjs';
|
|
2
|
-
export { r as readLiveTokensConfig, a as resolveDataDirs } from '../dataPaths-
|
|
2
|
+
export { r as readLiveTokensConfig, a as resolveDataDirs } from '../dataPaths-BpIK_Obx.cjs';
|
|
3
3
|
export { C as CURRENT_COMPONENT_SCHEMA_VERSION } from '../index-4N-Orzzi.cjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { P as PaletteConfig, H as HarmonyAxis, G as GradientDiskToken, O as Oklch, d as HarmonyMode } from '../themeTypes-BxRtuN5V.js';
|
|
2
|
-
export { r as readLiveTokensConfig, a as resolveDataDirs } from '../dataPaths-
|
|
2
|
+
export { r as readLiveTokensConfig, a as resolveDataDirs } from '../dataPaths-BpIK_Obx.js';
|
|
3
3
|
export { C as CURRENT_COMPONENT_SCHEMA_VERSION } from '../index-4N-Orzzi.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
} from "../chunk-O6GQ6GBH.js";
|
|
19
19
|
import {
|
|
20
20
|
CURRENT_COMPONENT_SCHEMA_VERSION
|
|
21
|
-
} from "../chunk-
|
|
21
|
+
} from "../chunk-SWXRVZKT.js";
|
|
22
22
|
import {
|
|
23
23
|
cssColorToOklch,
|
|
24
24
|
gamutClamp,
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
import {
|
|
30
30
|
readLiveTokensConfig,
|
|
31
31
|
resolveDataDirs
|
|
32
|
-
} from "../chunk-
|
|
32
|
+
} from "../chunk-6WGFOJXO.js";
|
|
33
33
|
|
|
34
34
|
// src/editor/core/store/editorCore.ts
|
|
35
35
|
import { writable, derived, get } from "svelte/store";
|
|
@@ -398,7 +398,7 @@ function runContrastGate(configs, scheme) {
|
|
|
398
398
|
const failures = checks.filter((c) => !c.pass).map((c) => {
|
|
399
399
|
const label = defs.find((d) => d.textVar === c.textVar).paletteLabel;
|
|
400
400
|
const hint = scheme === "dark" ? `raise the ${label} base color lightness (derived text tops out at 2\xD7 its L)` : `raise the ${label} base color lightness or reduce its chroma`;
|
|
401
|
-
return `${c.textVar} reaches ${c.ratio.toFixed(2)}:1 vs ${c.against} (floor ${c.floor}:1)
|
|
401
|
+
return `${c.textVar} reaches ${c.ratio.toFixed(2)}:1 vs ${c.against} (floor ${c.floor}:1): ${hint}`;
|
|
402
402
|
});
|
|
403
403
|
return { scheme, checks, failures };
|
|
404
404
|
}
|
|
@@ -429,7 +429,7 @@ function applyCanvasGradient(canvas, scheme) {
|
|
|
429
429
|
const anchor = canvas.anchorPlacement.step;
|
|
430
430
|
const sky = scheme === "dark" ? Math.min(anchor + 2, labels.length - 1) : Math.max(anchor - 2, 0);
|
|
431
431
|
if (sky === anchor) {
|
|
432
|
-
return `skipped
|
|
432
|
+
return `skipped: the Canvas base color anchors at the ramp edge (${labels[anchor]}), leaving no room for a sky; commit the canvas further from ${scheme === "dark" ? "black" : "white"}`;
|
|
433
433
|
}
|
|
434
434
|
canvas.emptyMode = "gradient";
|
|
435
435
|
canvas.gradientStyle = "linear";
|
|
@@ -440,7 +440,7 @@ function applyCanvasGradient(canvas, scheme) {
|
|
|
440
440
|
{ position: 100, paletteLabel: labels[anchor] }
|
|
441
441
|
];
|
|
442
442
|
canvas.gradientSize = "window";
|
|
443
|
-
return `on, ${labels[sky]}
|
|
443
|
+
return `on, ${labels[sky]} to ${labels[anchor]}`;
|
|
444
444
|
}
|
|
445
445
|
var STOCK_SHADOW_GEOMETRY = {
|
|
446
446
|
"--shadow-sm": [1, 1, 2],
|
|
@@ -64,7 +64,10 @@ var KIND_RULES = [
|
|
|
64
64
|
prefix: ["--text-"]
|
|
65
65
|
},
|
|
66
66
|
{ kind: "radius", suffix: ["-radius"], prefix: ["--radius-"] },
|
|
67
|
-
|
|
67
|
+
// Three stroke roles share the `--border-width-*` scale: a border encloses,
|
|
68
|
+
// a divider separates, an accent emphasises. `set-geometry` moves each role
|
|
69
|
+
// on its own, so a suffix has to say which line it names.
|
|
70
|
+
{ kind: "divider-width", suffix: ["-divider-width", "-divider-thickness", "-hairline-thickness", "-thickness"] },
|
|
68
71
|
{ kind: "divider-height", suffix: ["-divider-height", "-track-height"] },
|
|
69
72
|
{ kind: "divider-inset", suffix: ["-divider-inset", "-inset"] },
|
|
70
73
|
{ kind: "dot-size", suffix: ["-dot-size"] },
|
|
@@ -75,11 +78,8 @@ var KIND_RULES = [
|
|
|
75
78
|
{ kind: "gap", suffix: ["-gap"] },
|
|
76
79
|
{ kind: "duration", suffix: ["-duration"], prefix: ["--duration-"] },
|
|
77
80
|
{ kind: "easing", suffix: ["-easing"], prefix: ["--ease-"] },
|
|
78
|
-
{
|
|
79
|
-
|
|
80
|
-
suffix: ["-border-width", "-accent-width", "-hairline-thickness", "-thickness"],
|
|
81
|
-
prefix: ["--border-width-"]
|
|
82
|
-
},
|
|
81
|
+
{ kind: "accent-width", suffix: ["-accent-width", "-indicator-width"] },
|
|
82
|
+
{ kind: "border-width", suffix: ["-border-width"], prefix: ["--border-width-"] },
|
|
83
83
|
{ kind: "border", suffix: ["-border"], prefix: ["--border-"] },
|
|
84
84
|
// A dimension with no more specific name behind it — a panel's width, an
|
|
85
85
|
// avatar's size. Last of the geometry rules, so every `-border-width`,
|
|
@@ -122,7 +122,7 @@ function matchesKind(variable, kind) {
|
|
|
122
122
|
|
|
123
123
|
// src/editor/core/components/adjustAliases.ts
|
|
124
124
|
var RADIUS_FULL = "--radius-full";
|
|
125
|
-
var
|
|
125
|
+
var RADIUS_STEPS = [
|
|
126
126
|
"--radius-none",
|
|
127
127
|
"--radius-sm",
|
|
128
128
|
"--radius-md",
|
|
@@ -146,12 +146,13 @@ var SPACE_SETTABLE = [
|
|
|
146
146
|
"--space-32",
|
|
147
147
|
"--space-48"
|
|
148
148
|
];
|
|
149
|
-
var
|
|
150
|
-
var
|
|
151
|
-
var
|
|
149
|
+
var SPACE_STEPS = SPACE_SETTABLE;
|
|
150
|
+
var INSET_STEPS = SPACE_SETTABLE.slice(SPACE_SETTABLE.indexOf("--space-4"));
|
|
151
|
+
var TEXT_INSET_STEPS = SPACE_SETTABLE.slice(SPACE_SETTABLE.indexOf("--space-6"));
|
|
152
152
|
var SPACE_FAMILY = [...SPACE_SETTABLE, "--space-40", "--space-64", "--space-96", "--space-128"];
|
|
153
|
-
var
|
|
154
|
-
|
|
153
|
+
var BORDER_WIDTH_NONE = "--border-width-0";
|
|
154
|
+
var BORDER_WIDTH_SETTABLE = [
|
|
155
|
+
BORDER_WIDTH_NONE,
|
|
155
156
|
"--border-width-1",
|
|
156
157
|
"--border-width-2",
|
|
157
158
|
"--border-width-3",
|
|
@@ -165,70 +166,75 @@ var BORDER_WIDTH_RUNGS = [
|
|
|
165
166
|
"--border-width-20",
|
|
166
167
|
"--border-width-24"
|
|
167
168
|
];
|
|
168
|
-
var
|
|
169
|
+
var STROKE_STEPS = BORDER_WIDTH_SETTABLE.slice(1);
|
|
170
|
+
var STROKE_SCALE = {
|
|
171
|
+
steps: STROKE_STEPS,
|
|
172
|
+
settable: BORDER_WIDTH_SETTABLE,
|
|
173
|
+
family: BORDER_WIDTH_SETTABLE
|
|
174
|
+
};
|
|
175
|
+
var SCALES = {
|
|
169
176
|
radius: {
|
|
170
|
-
|
|
171
|
-
settable: [...
|
|
172
|
-
family: [...
|
|
177
|
+
steps: RADIUS_STEPS,
|
|
178
|
+
settable: [...RADIUS_STEPS, RADIUS_FULL],
|
|
179
|
+
family: [...RADIUS_STEPS, RADIUS_FULL]
|
|
173
180
|
},
|
|
174
|
-
padding: {
|
|
175
|
-
gap: {
|
|
176
|
-
"border-width":
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
family: BORDER_WIDTH_RUNGS
|
|
180
|
-
}
|
|
181
|
+
padding: { steps: SPACE_STEPS, settable: SPACE_SETTABLE, family: SPACE_FAMILY },
|
|
182
|
+
gap: { steps: SPACE_STEPS, settable: SPACE_SETTABLE, family: SPACE_FAMILY },
|
|
183
|
+
"border-width": STROKE_SCALE,
|
|
184
|
+
"divider-width": STROKE_SCALE,
|
|
185
|
+
"accent-width": STROKE_SCALE
|
|
181
186
|
};
|
|
182
187
|
var TOKEN_NAME = /^--[a-z0-9-]+$/;
|
|
183
|
-
function
|
|
184
|
-
if (op.kind === "radius") return op.full ? [...
|
|
185
|
-
if (op.kind !== "padding") return
|
|
188
|
+
function stepsFor(op, variable, aliases) {
|
|
189
|
+
if (op.kind === "radius") return op.full ? [...RADIUS_STEPS, RADIUS_FULL] : RADIUS_STEPS;
|
|
190
|
+
if (op.kind !== "padding") return SCALES[op.kind].steps;
|
|
186
191
|
const base = stripSide(variable);
|
|
187
|
-
if (!base.endsWith("-padding")) return
|
|
192
|
+
if (!base.endsWith("-padding")) return SCALES.padding.steps;
|
|
188
193
|
const variant = base.slice(0, -"-padding".length);
|
|
189
|
-
return `${variant}-text-font-size` in aliases ?
|
|
194
|
+
return `${variant}-text-font-size` in aliases ? TEXT_INSET_STEPS : INSET_STEPS;
|
|
190
195
|
}
|
|
191
196
|
function spaceStep(token) {
|
|
192
197
|
return Number(token.slice("--space-".length));
|
|
193
198
|
}
|
|
194
|
-
function
|
|
199
|
+
function snapStep(token, steps, direction) {
|
|
195
200
|
const step = spaceStep(token);
|
|
196
|
-
if (direction > 0) return
|
|
197
|
-
for (let index =
|
|
198
|
-
if (spaceStep(
|
|
201
|
+
if (direction > 0) return steps.findIndex((candidate) => spaceStep(candidate) > step);
|
|
202
|
+
for (let index = steps.length - 1; index >= 0; index--) {
|
|
203
|
+
if (spaceStep(steps[index]) < step) return index;
|
|
199
204
|
}
|
|
200
205
|
return -1;
|
|
201
206
|
}
|
|
202
207
|
function resolve(op, variable, value, aliases) {
|
|
203
208
|
if (typeof value !== "string" || !TOKEN_NAME.test(value)) return { skip: "raw-value" };
|
|
204
|
-
if (!
|
|
209
|
+
if (!SCALES[op.kind].family.includes(value)) return { skip: "off-scale" };
|
|
205
210
|
if (op.set !== void 0) return { from: value, to: op.set };
|
|
206
|
-
const
|
|
207
|
-
let index =
|
|
211
|
+
const steps = stepsFor(op, variable, aliases);
|
|
212
|
+
let index = steps.indexOf(value);
|
|
208
213
|
let shift = op.shift;
|
|
209
214
|
if (index < 0) {
|
|
210
215
|
if (value === RADIUS_FULL) return { skip: "pill-preserved" };
|
|
211
|
-
|
|
216
|
+
if (value === BORDER_WIDTH_NONE) return { skip: "none-preserved" };
|
|
217
|
+
index = snapStep(value, steps, shift);
|
|
212
218
|
if (index < 0) return { skip: "clamped" };
|
|
213
219
|
shift -= Math.sign(shift);
|
|
214
220
|
}
|
|
215
221
|
const wanted = index + shift;
|
|
216
|
-
const landed = Math.min(Math.max(wanted, 0),
|
|
217
|
-
if (landed !== wanted &&
|
|
218
|
-
return { from: value, to:
|
|
222
|
+
const landed = Math.min(Math.max(wanted, 0), steps.length - 1);
|
|
223
|
+
if (landed !== wanted && steps[landed] === value) return { skip: "clamped" };
|
|
224
|
+
return { from: value, to: steps[landed] };
|
|
219
225
|
}
|
|
220
226
|
function validateOp(op, configs) {
|
|
221
|
-
const
|
|
222
|
-
if (!
|
|
227
|
+
const scale = SCALES[op.kind];
|
|
228
|
+
if (!scale) throw new Error(`Unknown kind "${op.kind}" (expected ${Object.keys(SCALES).join(", ")})`);
|
|
223
229
|
if (op.target !== void 0 && !(op.target in configs)) {
|
|
224
230
|
throw new Error(`Unknown target component "${op.target}"`);
|
|
225
231
|
}
|
|
226
232
|
const hasSet = op.set !== void 0;
|
|
227
233
|
const hasShift = op.shift !== void 0;
|
|
228
234
|
if (hasSet === hasShift) throw new Error(`A ${op.kind} op needs exactly one of "set" or "shift"`);
|
|
229
|
-
const settable =
|
|
235
|
+
const settable = scale.settable;
|
|
230
236
|
if (hasSet && !settable.includes(op.set)) {
|
|
231
|
-
throw new Error(`"${op.set}" is not on the ${op.kind}
|
|
237
|
+
throw new Error(`"${op.set}" is not on the ${op.kind} scale`);
|
|
232
238
|
}
|
|
233
239
|
if (hasShift && !Number.isInteger(op.shift)) {
|
|
234
240
|
throw new Error(`"shift" must be a whole number of steps, got ${op.shift}`);
|
|
@@ -276,6 +282,11 @@ function adjustAliases(configs, ops, now) {
|
|
|
276
282
|
var import_fs = __toESM(require("fs"), 1);
|
|
277
283
|
var import_path = __toESM(require("path"), 1);
|
|
278
284
|
var DEFAULT_DATA_DIR = "src/live-tokens/data";
|
|
285
|
+
var TEST_DATA_DIR_ENV = "LIVE_TOKENS_TEST_DATA_DIR";
|
|
286
|
+
function testDataDir() {
|
|
287
|
+
const raw = process.env[TEST_DATA_DIR_ENV];
|
|
288
|
+
return raw && raw.trim() !== "" ? import_path.default.resolve(raw.trim()) : void 0;
|
|
289
|
+
}
|
|
279
290
|
var KNOWN_CONFIG_KEYS = /* @__PURE__ */ new Set([
|
|
280
291
|
"dataDir",
|
|
281
292
|
"colorsAndTypeDir",
|
|
@@ -309,6 +320,16 @@ function readLiveTokensConfig() {
|
|
|
309
320
|
}
|
|
310
321
|
}
|
|
311
322
|
function resolveDataDirs(opts = {}) {
|
|
323
|
+
const isolated = testDataDir();
|
|
324
|
+
if (isolated) {
|
|
325
|
+
return {
|
|
326
|
+
dataDir: isolated,
|
|
327
|
+
colorsAndTypeDir: import_path.default.join(isolated, "colors-and-type"),
|
|
328
|
+
componentConfigsDir: import_path.default.join(isolated, "component-configs"),
|
|
329
|
+
themesDir: import_path.default.join(isolated, "themes"),
|
|
330
|
+
sketchStylesDir: import_path.default.join(isolated, "sketch-styles")
|
|
331
|
+
};
|
|
332
|
+
}
|
|
312
333
|
const fileConfig = readLiveTokensConfig();
|
|
313
334
|
const dataDirRaw = opts.dataDir ?? fileConfig.dataDir ?? DEFAULT_DATA_DIR;
|
|
314
335
|
const dataDir = import_path.default.resolve(dataDirRaw);
|
|
@@ -1205,6 +1226,47 @@ var colorsAndTypeMigration_2026_09_03_dropLegacyComponentKeys = {
|
|
|
1205
1226
|
}
|
|
1206
1227
|
};
|
|
1207
1228
|
|
|
1229
|
+
// src/editor/core/themes/migrations/2026-09-07-stroke-role-renames.ts
|
|
1230
|
+
var RENAMES2 = {
|
|
1231
|
+
tabbar: Object.fromEntries(
|
|
1232
|
+
["default", "hover", "active", "disabled"].map((s) => [
|
|
1233
|
+
`--tabbar-${s}-indicator-border-width`,
|
|
1234
|
+
`--tabbar-${s}-indicator-width`
|
|
1235
|
+
])
|
|
1236
|
+
),
|
|
1237
|
+
collapsiblesection: Object.fromEntries(
|
|
1238
|
+
["default", "hover"].flatMap((s) => [
|
|
1239
|
+
[`--collapsiblesection-divider-${s}-border`, `--collapsiblesection-divider-${s}-hairline-color`],
|
|
1240
|
+
[`--collapsiblesection-divider-${s}-border-width`, `--collapsiblesection-divider-${s}-hairline-thickness`]
|
|
1241
|
+
])
|
|
1242
|
+
),
|
|
1243
|
+
dialog: Object.fromEntries(
|
|
1244
|
+
["header", "footer"].flatMap((part) => [
|
|
1245
|
+
[`--dialog-${part}-border`, `--dialog-${part}-divider`],
|
|
1246
|
+
[`--dialog-${part}-border-width`, `--dialog-${part}-divider-width`]
|
|
1247
|
+
])
|
|
1248
|
+
),
|
|
1249
|
+
table: {
|
|
1250
|
+
"--table-default-header-border": "--table-default-header-divider",
|
|
1251
|
+
"--table-default-header-border-width": "--table-default-header-divider-width"
|
|
1252
|
+
}
|
|
1253
|
+
};
|
|
1254
|
+
var componentMigration_2026_09_07_strokeRoleRenames = {
|
|
1255
|
+
id: "2026-09-07-stroke-role-renames",
|
|
1256
|
+
fromVersion: 26,
|
|
1257
|
+
toVersion: 27,
|
|
1258
|
+
appliesTo: "component-config",
|
|
1259
|
+
apply(rawVars, meta) {
|
|
1260
|
+
const renames = meta.component ? RENAMES2[meta.component] : void 0;
|
|
1261
|
+
if (!renames) return { ...rawVars };
|
|
1262
|
+
const out = {};
|
|
1263
|
+
for (const [key, value] of Object.entries(rawVars)) {
|
|
1264
|
+
out[renames[key] ?? key] = value;
|
|
1265
|
+
}
|
|
1266
|
+
return out;
|
|
1267
|
+
}
|
|
1268
|
+
};
|
|
1269
|
+
|
|
1208
1270
|
// src/editor/core/themes/migrations/index.ts
|
|
1209
1271
|
var MIGRATIONS = [
|
|
1210
1272
|
colorsAndTypeMigration_2026_04_24_legacyKeysAndBgToCanvas,
|
|
@@ -1240,7 +1302,8 @@ var MIGRATIONS = [
|
|
|
1240
1302
|
componentMigration_2026_09_01_tabbarActiveTint,
|
|
1241
1303
|
componentMigration_2026_09_01_gateSuffixEnabled,
|
|
1242
1304
|
componentMigration_2026_09_02_sectiondividerDropTitleOutline,
|
|
1243
|
-
colorsAndTypeMigration_2026_09_03_dropLegacyComponentKeys
|
|
1305
|
+
colorsAndTypeMigration_2026_09_03_dropLegacyComponentKeys,
|
|
1306
|
+
componentMigration_2026_09_07_strokeRoleRenames
|
|
1244
1307
|
];
|
|
1245
1308
|
function countFor(kind) {
|
|
1246
1309
|
return MIGRATIONS.filter((m) => m.appliesTo === kind).length;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { A as AliasDiskValue, a as ComponentConfig } from '../themeTypes-BxRtuN5V.cjs';
|
|
2
|
-
export { r as readLiveTokensConfig, a as resolveDataDirs } from '../dataPaths-
|
|
2
|
+
export { r as readLiveTokensConfig, a as resolveDataDirs } from '../dataPaths-BpIK_Obx.cjs';
|
|
3
3
|
export { C as CURRENT_COMPONENT_SCHEMA_VERSION } from '../index-4N-Orzzi.cjs';
|
|
4
4
|
|
|
5
|
-
type AdjustKind = 'radius' | 'padding' | 'gap' | 'border-width';
|
|
5
|
+
type AdjustKind = 'radius' | 'padding' | 'gap' | 'border-width' | 'divider-width' | 'accent-width';
|
|
6
6
|
interface AdjustOp {
|
|
7
7
|
/** Component id; omitted applies the op to every config. */
|
|
8
8
|
target?: string;
|
|
9
9
|
kind: AdjustKind;
|
|
10
10
|
set?: string;
|
|
11
11
|
shift?: number;
|
|
12
|
-
/** Radius shifts only: admits `--radius-full` as the
|
|
12
|
+
/** Radius shifts only: admits `--radius-full` as the top step of the scale. */
|
|
13
13
|
full?: boolean;
|
|
14
14
|
}
|
|
15
|
-
type SkipReason = 'raw-value' | 'off-
|
|
15
|
+
type SkipReason = 'raw-value' | 'off-scale' | 'clamped' | 'pill-preserved' | 'none-preserved';
|
|
16
16
|
interface AliasChange {
|
|
17
17
|
variable: string;
|
|
18
18
|
from: string;
|
|
@@ -37,7 +37,7 @@ interface AdjustResult {
|
|
|
37
37
|
}
|
|
38
38
|
declare function adjustAliases(configs: Record<string, ComponentConfig>, ops: readonly AdjustOp[], now: string): AdjustResult;
|
|
39
39
|
|
|
40
|
-
type TokenKind = 'surface' | 'border' | 'border-width' | '
|
|
40
|
+
type TokenKind = 'surface' | 'border' | 'border-width' | 'divider-width' | 'accent-width' | 'radius' | 'divider-height' | 'divider-inset' | 'dot-size' | 'length' | 'blur' | 'scale' | 'shadow' | 'font-family' | 'font-weight' | 'font-size' | 'line-height' | 'letter-spacing' | 'padding' | 'gap' | 'duration' | 'easing' | 'text-color';
|
|
41
41
|
/** Side-aware kind test. Per-side paddings (`--card-default-body-padding-top`)
|
|
42
42
|
are written by UIPaddingSelector and never declared as editor tokens, so
|
|
43
43
|
`rawKind` never meets one; the CLI does, and they belong with their parent. */
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { A as AliasDiskValue, a as ComponentConfig } from '../themeTypes-BxRtuN5V.js';
|
|
2
|
-
export { r as readLiveTokensConfig, a as resolveDataDirs } from '../dataPaths-
|
|
2
|
+
export { r as readLiveTokensConfig, a as resolveDataDirs } from '../dataPaths-BpIK_Obx.js';
|
|
3
3
|
export { C as CURRENT_COMPONENT_SCHEMA_VERSION } from '../index-4N-Orzzi.js';
|
|
4
4
|
|
|
5
|
-
type AdjustKind = 'radius' | 'padding' | 'gap' | 'border-width';
|
|
5
|
+
type AdjustKind = 'radius' | 'padding' | 'gap' | 'border-width' | 'divider-width' | 'accent-width';
|
|
6
6
|
interface AdjustOp {
|
|
7
7
|
/** Component id; omitted applies the op to every config. */
|
|
8
8
|
target?: string;
|
|
9
9
|
kind: AdjustKind;
|
|
10
10
|
set?: string;
|
|
11
11
|
shift?: number;
|
|
12
|
-
/** Radius shifts only: admits `--radius-full` as the
|
|
12
|
+
/** Radius shifts only: admits `--radius-full` as the top step of the scale. */
|
|
13
13
|
full?: boolean;
|
|
14
14
|
}
|
|
15
|
-
type SkipReason = 'raw-value' | 'off-
|
|
15
|
+
type SkipReason = 'raw-value' | 'off-scale' | 'clamped' | 'pill-preserved' | 'none-preserved';
|
|
16
16
|
interface AliasChange {
|
|
17
17
|
variable: string;
|
|
18
18
|
from: string;
|
|
@@ -37,7 +37,7 @@ interface AdjustResult {
|
|
|
37
37
|
}
|
|
38
38
|
declare function adjustAliases(configs: Record<string, ComponentConfig>, ops: readonly AdjustOp[], now: string): AdjustResult;
|
|
39
39
|
|
|
40
|
-
type TokenKind = 'surface' | 'border' | 'border-width' | '
|
|
40
|
+
type TokenKind = 'surface' | 'border' | 'border-width' | 'divider-width' | 'accent-width' | 'radius' | 'divider-height' | 'divider-inset' | 'dot-size' | 'length' | 'blur' | 'scale' | 'shadow' | 'font-family' | 'font-weight' | 'font-size' | 'line-height' | 'letter-spacing' | 'padding' | 'gap' | 'duration' | 'easing' | 'text-color';
|
|
41
41
|
/** Side-aware kind test. Per-side paddings (`--card-default-body-padding-top`)
|
|
42
42
|
are written by UIPaddingSelector and never declared as editor tokens, so
|
|
43
43
|
`rawKind` never meets one; the CLI does, and they belong with their parent. */
|