@motion-proto/live-tokens 0.52.1 → 0.54.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.
Files changed (69) hide show
  1. package/.claude/skills/live-tokens-adjust-shape-space/SKILL.md +28 -3
  2. package/.claude/skills/live-tokens-generate-theme/SKILL.md +16 -1
  3. package/CHANGELOG.md +89 -0
  4. package/bin/adjust.mjs +16 -39
  5. package/bin/generate-theme.mjs +21 -6
  6. package/dist-plugin/adjust/index.cjs +785 -21
  7. package/dist-plugin/adjust/index.d.cts +2 -1
  8. package/dist-plugin/adjust/index.d.ts +2 -1
  9. package/dist-plugin/adjust/index.js +47 -21
  10. package/dist-plugin/{chunk-6OZFXIQI.js → chunk-232GZGQU.js} +207 -12
  11. package/dist-plugin/chunk-NE6N66EE.js +753 -0
  12. package/dist-plugin/{chunk-JIGIIE5P.js → chunk-PB2JTK2H.js} +123 -0
  13. package/dist-plugin/generateColorsAndType/index.cjs +110 -31
  14. package/dist-plugin/generateColorsAndType/index.d.cts +6 -2
  15. package/dist-plugin/generateColorsAndType/index.d.ts +6 -2
  16. package/dist-plugin/generateColorsAndType/index.js +69 -772
  17. package/dist-plugin/{themeTypes-Dky03HL9.d.cts → index-DpTIRZ2H.d.cts} +49 -21
  18. package/dist-plugin/{themeTypes-Dky03HL9.d.ts → index-DpTIRZ2H.d.ts} +49 -21
  19. package/dist-plugin/index.cjs +1159 -85
  20. package/dist-plugin/index.js +102 -80
  21. package/dist-plugin/migrateData/index.cjs +956 -14
  22. package/dist-plugin/migrateData/index.js +10 -3
  23. package/package.json +6 -4
  24. package/src/editor/component-editor/scaffolding/ComponentFileManager.svelte +9 -23
  25. package/src/editor/component-editor/scaffolding/LinkedBlock.svelte +8 -8
  26. package/src/editor/core/components/adjustAliases.ts +65 -22
  27. package/src/editor/core/components/aliasKinds.ts +7 -2
  28. package/src/editor/core/components/componentConfigService.ts +1 -1
  29. package/src/editor/core/store/editorStore.ts +7 -197
  30. package/src/editor/core/store/editorTypes.ts +9 -30
  31. package/src/editor/core/themes/generateColorsAndType.ts +50 -1
  32. package/src/editor/core/themes/lookSummary.ts +3 -25
  33. package/src/editor/core/themes/migrateComponentConfig.ts +205 -0
  34. package/src/editor/core/themes/migrations/2026-05-19-sectiondivider-rich-gradient.ts +1 -1
  35. package/src/editor/core/themes/migrations/2026-05-20-sectiondivider-slim-variants.ts +1 -1
  36. package/src/editor/core/themes/migrations/2026-05-22-sectiondivider-intrinsics-to-css.ts +1 -1
  37. package/src/editor/core/themes/parsers/gradient.ts +211 -0
  38. package/src/editor/core/themes/parsers/shadow.ts +52 -0
  39. package/src/editor/core/themes/slices/gradients.ts +5 -58
  40. package/src/editor/core/themes/slices/shadows.ts +2 -38
  41. package/src/editor/core/themes/themeService.ts +22 -9
  42. package/src/editor/core/themes/themeTypes.ts +71 -21
  43. package/src/editor/docs/content/themes-workflow.md +9 -11
  44. package/src/editor/docs/content/where-themes-live.md +2 -2
  45. package/src/editor/docs/content.generated.ts +2 -2
  46. package/src/editor/index.ts +1 -0
  47. package/src/editor/styles/ui-editor.css +5 -2
  48. package/src/editor/ui/PaletteEditor.svelte +30 -15
  49. package/src/editor/ui/ThemePanel.svelte +24 -15
  50. package/src/editor/ui/Toggle.svelte +22 -22
  51. package/src/editor/ui/UIPillButton.svelte +1 -1
  52. package/src/editor/ui/UIReveal.svelte +47 -0
  53. package/src/editor/ui/UISquareButton.svelte +1 -1
  54. package/src/editor/ui/colors/ColorsTab.svelte +4 -5
  55. package/src/editor/ui/palette/OverridesPanel.svelte +4 -3
  56. package/src/editor/ui/palette/PaletteJumpButton.svelte +3 -3
  57. package/src/editor/ui/palette/ScaleCurveEditor.svelte +3 -2
  58. package/src/live-tokens/data/colors-and-type/autumn.json +5 -5
  59. package/src/live-tokens/data/colors-and-type/ocean.json +5 -5
  60. package/src/live-tokens/data/colors-and-type/spring-meadow.json +5 -5
  61. package/src/live-tokens/data/themes/autumn.json +82 -46
  62. package/src/live-tokens/data/themes/halloween.json +53 -52
  63. package/src/live-tokens/data/themes/midnight-study.json +151 -83
  64. package/src/live-tokens/data/themes/ocean.json +82 -46
  65. package/src/live-tokens/data/themes/royal-velvet.json +43 -42
  66. package/src/live-tokens/data/themes/spring-meadow.json +91 -57
  67. package/src/live-tokens/data/themes/sunset.json +101 -40
  68. package/src/system/components/FloatingTokenTags.css +6 -4
  69. package/src/system/internal/backgroundContrast.ts +2 -1
@@ -30,6 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  // vite-plugin/adjust/index.ts
31
31
  var adjust_exports = {};
32
32
  __export(adjust_exports, {
33
+ CURRENT_COMPONENT_SCHEMA_VERSION: () => CURRENT_COMPONENT_SCHEMA_VERSION,
33
34
  adjustAliases: () => adjustAliases,
34
35
  matchesKind: () => matchesKind,
35
36
  readLiveTokensConfig: () => readLiveTokensConfig,
@@ -65,9 +66,12 @@ var MATCHER_BY_KIND = Object.fromEntries(
65
66
  KIND_PATTERNS.map((p) => [p.kind, p.matches])
66
67
  );
67
68
  var SIDE_SUFFIXES = ["-top", "-right", "-bottom", "-left"];
68
- function matchesKind(variable, kind) {
69
+ function stripSide(variable) {
69
70
  const side = SIDE_SUFFIXES.find((s) => variable.endsWith(s));
70
- return MATCHER_BY_KIND[kind](side ? variable.slice(0, -side.length) : variable);
71
+ return side ? variable.slice(0, -side.length) : variable;
72
+ }
73
+ function matchesKind(variable, kind) {
74
+ return MATCHER_BY_KIND[kind](stripSide(variable));
71
75
  }
72
76
 
73
77
  // src/editor/core/components/adjustAliases.ts
@@ -82,7 +86,7 @@ var RADIUS_RUNGS = [
82
86
  "--radius-3xl",
83
87
  "--radius-4xl"
84
88
  ];
85
- var SPACE_RUNGS = [
89
+ var SPACE_SETTABLE = [
86
90
  "--space-0",
87
91
  "--space-2",
88
92
  "--space-4",
@@ -96,7 +100,10 @@ var SPACE_RUNGS = [
96
100
  "--space-32",
97
101
  "--space-48"
98
102
  ];
99
- var SPACE_FAMILY = [...SPACE_RUNGS, "--space-40", "--space-64", "--space-96", "--space-128"];
103
+ var SPACE_RUNGS = SPACE_SETTABLE;
104
+ var INSET_RUNGS = SPACE_SETTABLE.slice(SPACE_SETTABLE.indexOf("--space-4"));
105
+ var TEXT_INSET_RUNGS = SPACE_SETTABLE.slice(SPACE_SETTABLE.indexOf("--space-6"));
106
+ var SPACE_FAMILY = [...SPACE_SETTABLE, "--space-40", "--space-64", "--space-96", "--space-128"];
100
107
  var BORDER_WIDTH_RUNGS = [
101
108
  "--border-width-0",
102
109
  "--border-width-1",
@@ -113,37 +120,53 @@ var BORDER_WIDTH_RUNGS = [
113
120
  "--border-width-24"
114
121
  ];
115
122
  var LADDERS = {
116
- radius: { rungs: RADIUS_RUNGS, family: [...RADIUS_RUNGS, RADIUS_FULL] },
117
- padding: { rungs: SPACE_RUNGS, family: SPACE_FAMILY },
118
- gap: { rungs: SPACE_RUNGS, family: SPACE_FAMILY },
119
- "border-width": { rungs: BORDER_WIDTH_RUNGS, family: BORDER_WIDTH_RUNGS }
123
+ radius: {
124
+ rungs: RADIUS_RUNGS,
125
+ settable: [...RADIUS_RUNGS, RADIUS_FULL],
126
+ family: [...RADIUS_RUNGS, RADIUS_FULL]
127
+ },
128
+ padding: { rungs: SPACE_RUNGS, settable: SPACE_SETTABLE, family: SPACE_FAMILY },
129
+ gap: { rungs: SPACE_RUNGS, settable: SPACE_SETTABLE, family: SPACE_FAMILY },
130
+ "border-width": {
131
+ rungs: BORDER_WIDTH_RUNGS,
132
+ settable: BORDER_WIDTH_RUNGS,
133
+ family: BORDER_WIDTH_RUNGS
134
+ }
120
135
  };
121
136
  var TOKEN_NAME = /^--[a-z0-9-]+$/;
122
- function rungsFor(op) {
123
- return op.kind === "radius" && op.full ? [...RADIUS_RUNGS, RADIUS_FULL] : LADDERS[op.kind].rungs;
137
+ function rungsFor(op, variable, aliases) {
138
+ if (op.kind === "radius") return op.full ? [...RADIUS_RUNGS, RADIUS_FULL] : RADIUS_RUNGS;
139
+ if (op.kind !== "padding") return LADDERS[op.kind].rungs;
140
+ const base = stripSide(variable);
141
+ if (!base.endsWith("-padding")) return LADDERS.padding.rungs;
142
+ const variant = base.slice(0, -"-padding".length);
143
+ return `${variant}-text-font-size` in aliases ? TEXT_INSET_RUNGS : INSET_RUNGS;
124
144
  }
125
145
  function spaceStep(token) {
126
146
  return Number(token.slice("--space-".length));
127
147
  }
128
- function nearestSpaceRung(token, rungs) {
148
+ function snapRung(token, rungs, direction) {
129
149
  const step = spaceStep(token);
130
- let best = 0;
131
- for (let i = 1; i < rungs.length; i++) {
132
- if (Math.abs(spaceStep(rungs[i]) - step) <= Math.abs(spaceStep(rungs[best]) - step)) best = i;
150
+ if (direction > 0) return rungs.findIndex((rung) => spaceStep(rung) > step);
151
+ for (let index = rungs.length - 1; index >= 0; index--) {
152
+ if (spaceStep(rungs[index]) < step) return index;
133
153
  }
134
- return best;
154
+ return -1;
135
155
  }
136
- function resolve(op, value) {
156
+ function resolve(op, variable, value, aliases) {
137
157
  if (typeof value !== "string" || !TOKEN_NAME.test(value)) return { skip: "raw-value" };
138
158
  if (!LADDERS[op.kind].family.includes(value)) return { skip: "off-ladder" };
139
159
  if (op.set !== void 0) return { from: value, to: op.set };
140
- const rungs = rungsFor(op);
160
+ const rungs = rungsFor(op, variable, aliases);
141
161
  let index = rungs.indexOf(value);
162
+ let shift = op.shift;
142
163
  if (index < 0) {
143
164
  if (value === RADIUS_FULL) return { skip: "pill-preserved" };
144
- index = nearestSpaceRung(value, rungs);
165
+ index = snapRung(value, rungs, shift);
166
+ if (index < 0) return { skip: "clamped" };
167
+ shift -= Math.sign(shift);
145
168
  }
146
- const wanted = index + op.shift;
169
+ const wanted = index + shift;
147
170
  const landed = Math.min(Math.max(wanted, 0), rungs.length - 1);
148
171
  if (landed !== wanted && rungs[landed] === value) return { skip: "clamped" };
149
172
  return { from: value, to: rungs[landed] };
@@ -157,7 +180,7 @@ function validateOp(op, configs) {
157
180
  const hasSet = op.set !== void 0;
158
181
  const hasShift = op.shift !== void 0;
159
182
  if (hasSet === hasShift) throw new Error(`A ${op.kind} op needs exactly one of "set" or "shift"`);
160
- const settable = op.kind === "radius" ? ladder.family : ladder.rungs;
183
+ const settable = ladder.settable;
161
184
  if (hasSet && !settable.includes(op.set)) {
162
185
  throw new Error(`"${op.set}" is not on the ${op.kind} ladder`);
163
186
  }
@@ -187,7 +210,7 @@ function adjustAliases(configs, ops, now) {
187
210
  let changed = false;
188
211
  for (const [variable, value] of Object.entries(config.aliases)) {
189
212
  if (!matchesKind(variable, op.kind)) continue;
190
- const outcome = resolve(op, value);
213
+ const outcome = resolve(op, variable, value, config.aliases);
191
214
  if ("skip" in outcome) {
192
215
  reportFor(component).skips.push({ variable, value, reason: outcome.skip });
193
216
  continue;
@@ -250,8 +273,749 @@ function resolveDataDirs(opts = {}) {
250
273
  legacyManifestsDir: fileConfig.manifestsDir ? import_path.default.resolve(fileConfig.manifestsDir) : void 0
251
274
  };
252
275
  }
276
+
277
+ // src/editor/core/themes/migrations/2026-04-24-legacy-keys-and-bg-to-canvas.ts
278
+ var LEGACY_KEY_RENAMES = {
279
+ "--empty": "--page-bg",
280
+ "--empty-attachment": "--page-bg-attachment",
281
+ // Orphan exports dropped from tokens.css; no new home — silently discard.
282
+ "--border-neutral": null,
283
+ // Shadow cleanup: these five tokens were removed (low/zero consumers,
284
+ // aesthetic drift). Dialog migrated onto --shadow-2xl; focus rings moved
285
+ // to their own --ring-focus-* namespace, which themes don't carry by
286
+ // default — tokens.css provides the canonical values.
287
+ "--shadow-app": null,
288
+ "--shadow-card": null,
289
+ "--shadow-overlay": null,
290
+ "--shadow-focus": null,
291
+ "--shadow-glow-green": null
292
+ };
293
+ var BG_TO_CANVAS_PREFIXES = ["--color-bg-", "--surface-bg", "--border-bg", "--text-bg"];
294
+ function migrateBgToCanvas(rawVars) {
295
+ for (const oldKey of Object.keys(rawVars)) {
296
+ for (const prefix of BG_TO_CANVAS_PREFIXES) {
297
+ if (!oldKey.startsWith(prefix)) continue;
298
+ const suffix = oldKey.slice(prefix.length);
299
+ if (suffix && !suffix.startsWith("-")) continue;
300
+ const newKey = prefix.replace("-bg", "-canvas") + suffix;
301
+ if (newKey === oldKey) continue;
302
+ const value = rawVars[oldKey];
303
+ delete rawVars[oldKey];
304
+ if (!(newKey in rawVars)) rawVars[newKey] = value;
305
+ break;
306
+ }
307
+ }
308
+ }
309
+ function migrateLegacyKeys(rawVars) {
310
+ for (const [oldKey, newKey] of Object.entries(LEGACY_KEY_RENAMES)) {
311
+ if (!(oldKey in rawVars)) continue;
312
+ const value = rawVars[oldKey];
313
+ delete rawVars[oldKey];
314
+ if (newKey && !(newKey in rawVars)) rawVars[newKey] = value;
315
+ }
316
+ migrateBgToCanvas(rawVars);
317
+ }
318
+ var colorsAndTypeMigration_2026_04_24_legacyKeysAndBgToCanvas = {
319
+ id: "2026-04-24-legacy-keys-and-bg-to-canvas",
320
+ fromVersion: 0,
321
+ toVersion: 1,
322
+ appliesTo: "colors-and-type",
323
+ apply(rawVars) {
324
+ const out = { ...rawVars };
325
+ migrateLegacyKeys(out);
326
+ return out;
327
+ }
328
+ };
329
+
330
+ // src/editor/core/themes/migrations/2026-04-24-component-prefix-and-suffix-renames.ts
331
+ var COMPONENT_PREFIX_RENAMES = {
332
+ "--segment-": "--segmentedcontrol-",
333
+ "--collapsible-": "--collapsiblesection-",
334
+ "--progress-": "--progressbar-",
335
+ "--section-divider-": "--sectiondivider-",
336
+ "--radio-": "--radiobutton-",
337
+ "--inline-edit-": "--inlineeditactions-"
338
+ };
339
+ var COMPONENT_SUFFIX_RENAMES = {
340
+ progressbar: [["-track-bg", "-track-surface"]],
341
+ inlineeditactions: [
342
+ ["-bg-hover", "-hover-surface"],
343
+ ["-bg", "-surface"]
344
+ ]
345
+ };
346
+ var componentMigration_2026_04_24_prefixAndSuffixRenames = {
347
+ id: "2026-04-24-component-prefix-and-suffix-renames",
348
+ fromVersion: 0,
349
+ toVersion: 1,
350
+ appliesTo: "component-config",
351
+ apply(rawVars, meta) {
352
+ const component = meta.component ?? "";
353
+ const out = {};
354
+ const suffixRules = COMPONENT_SUFFIX_RENAMES[component] ?? [];
355
+ for (const [oldKey, value] of Object.entries(rawVars)) {
356
+ let key = oldKey;
357
+ if (key === "--detail-nav-bg") key = "--detailnav-surface";
358
+ for (const [oldPrefix, newPrefix] of Object.entries(COMPONENT_PREFIX_RENAMES)) {
359
+ if (key.startsWith(oldPrefix)) {
360
+ key = newPrefix + key.slice(oldPrefix.length);
361
+ break;
362
+ }
363
+ }
364
+ for (const [oldSuffix, newSuffix] of suffixRules) {
365
+ if (key.endsWith(oldSuffix)) {
366
+ key = key.slice(0, -oldSuffix.length) + newSuffix;
367
+ break;
368
+ }
369
+ }
370
+ if (!(key in out)) out[key] = value;
371
+ }
372
+ return out;
373
+ }
374
+ };
375
+
376
+ // src/editor/core/themes/migrations/2026-04-27-segmentedcontrol-disabled-flatten.ts
377
+ var OPTION_DISABLED_PREFIX = "--segmentedcontrol-option-disabled-";
378
+ var DISABLED_PREFIX = "--segmentedcontrol-disabled-";
379
+ var SELECTED_DISABLED_PREFIX = "--segmentedcontrol-selected-disabled-";
380
+ var SELECTED_HOVER_PREFIX = "--segmentedcontrol-selected-hover-";
381
+ var componentMigration_2026_04_27_segmentedcontrolDisabledFlatten = {
382
+ id: "2026-04-27-segmentedcontrol-disabled-flatten",
383
+ fromVersion: 1,
384
+ toVersion: 2,
385
+ appliesTo: "component-config",
386
+ apply(rawVars, meta) {
387
+ if (meta.component !== "segmentedcontrol") return { ...rawVars };
388
+ const out = {};
389
+ for (const [oldKey, value] of Object.entries(rawVars)) {
390
+ let key = oldKey;
391
+ if (key.startsWith(SELECTED_DISABLED_PREFIX)) continue;
392
+ if (key.startsWith(SELECTED_HOVER_PREFIX)) continue;
393
+ if (key.startsWith(OPTION_DISABLED_PREFIX)) {
394
+ key = DISABLED_PREFIX + key.slice(OPTION_DISABLED_PREFIX.length);
395
+ }
396
+ if (!(key in out)) out[key] = value;
397
+ }
398
+ return out;
399
+ }
400
+ };
401
+
402
+ // src/editor/core/themes/migrations/2026-05-08-collapsiblesection-variant-namespace.ts
403
+ var PREFIX = "--collapsiblesection-";
404
+ var STATE_NAMES = /* @__PURE__ */ new Set(["default", "hover", "active", "expanded"]);
405
+ var componentMigration_2026_05_08_collapsiblesectionVariantNamespace = {
406
+ id: "2026-05-08-collapsiblesection-variant-namespace",
407
+ fromVersion: 2,
408
+ toVersion: 3,
409
+ appliesTo: "component-config",
410
+ apply(rawVars, meta) {
411
+ if (meta.component !== "collapsiblesection") return { ...rawVars };
412
+ const out = {};
413
+ for (const [oldKey, value] of Object.entries(rawVars)) {
414
+ let key = oldKey;
415
+ if (key.startsWith(PREFIX)) {
416
+ const tail = key.slice(PREFIX.length);
417
+ const firstSegment = tail.split("-", 1)[0];
418
+ if (STATE_NAMES.has(firstSegment)) {
419
+ key = `${PREFIX}container-${tail}`;
420
+ }
421
+ }
422
+ if (!(key in out)) out[key] = value;
423
+ }
424
+ return out;
425
+ }
426
+ };
427
+
428
+ // src/editor/core/themes/migrations/2026-05-08-collapsiblesection-frame-and-cleanup.ts
429
+ var PFX = "--collapsiblesection-";
430
+ var componentMigration_2026_05_08_collapsiblesectionFrameAndCleanup = {
431
+ id: "2026-05-08-collapsiblesection-frame-and-cleanup",
432
+ fromVersion: 3,
433
+ toVersion: 4,
434
+ appliesTo: "component-config",
435
+ apply(rawVars, meta) {
436
+ if (meta.component !== "collapsiblesection") return { ...rawVars };
437
+ const out = {};
438
+ for (const prop of ["surface", "border", "border-width", "radius"]) {
439
+ const src = `${PFX}container-default-${prop}`;
440
+ if (src in rawVars) {
441
+ out[`${PFX}container-frame-${prop}`] = rawVars[src];
442
+ }
443
+ }
444
+ for (const [key, value] of Object.entries(rawVars)) {
445
+ if (/^--collapsiblesection-chromeless-(default|hover|active)-(border|border-width|radius)$/.test(key)) continue;
446
+ if (/^--collapsiblesection-container-(hover|active)-(border|border-width|radius)$/.test(key)) continue;
447
+ if (/^--collapsiblesection-container-default-(border|border-width|radius)$/.test(key)) continue;
448
+ if (/^--collapsiblesection-divider-(default|hover|active)-radius$/.test(key)) continue;
449
+ if (/^--collapsiblesection-(chromeless|divider|container)-expanded-(border|border-width|radius)$/.test(key)) continue;
450
+ if (/^--collapsiblesection-(chromeless|divider)-expanded-surface$/.test(key)) continue;
451
+ if (!(key in out)) out[key] = value;
452
+ }
453
+ return out;
454
+ }
455
+ };
456
+
457
+ // src/editor/core/themes/migrations/2026-05-10-sectiondivider-gradient-stops.ts
458
+ var PFX2 = "--sectiondivider-";
459
+ var VARIANTS = ["canvas", "neutral", "alternate", "primary", "accent", "special"];
460
+ var OLD_STOP_RE = /^--sectiondivider-(canvas|neutral|alternate|primary|accent|special)-gradient-stop-\d+$/;
461
+ var componentMigration_2026_05_10_sectiondividerGradientStops = {
462
+ id: "2026-05-10-sectiondivider-gradient-stops",
463
+ fromVersion: 4,
464
+ toVersion: 5,
465
+ appliesTo: "component-config",
466
+ apply(rawVars, meta) {
467
+ if (meta.component !== "sectiondivider") return { ...rawVars };
468
+ const out = {};
469
+ for (const [key, value] of Object.entries(rawVars)) {
470
+ if (OLD_STOP_RE.test(key)) continue;
471
+ out[key] = value;
472
+ }
473
+ const setIfMissing = (key, fallback) => {
474
+ if (!(key in out)) out[key] = fallback;
475
+ };
476
+ for (const v of VARIANTS) {
477
+ const old1 = rawVars[`${PFX2}${v}-gradient-stop-1`];
478
+ const old2 = rawVars[`${PFX2}${v}-gradient-stop-2`];
479
+ const old4 = rawVars[`${PFX2}${v}-gradient-stop-4`];
480
+ setIfMissing(`${PFX2}${v}-gradient-angle`, "--gradient-angle-diagonal");
481
+ setIfMissing(`${PFX2}${v}-gradient-stop-1-color`, old1 ?? `--surface-${v}-highest`);
482
+ setIfMissing(`${PFX2}${v}-gradient-stop-1-position`, "--gradient-stop-start");
483
+ setIfMissing(`${PFX2}${v}-gradient-stop-2-color`, old2 ?? `--surface-${v}-higher`);
484
+ setIfMissing(`${PFX2}${v}-gradient-stop-2-position`, "--gradient-stop-mid");
485
+ setIfMissing(`${PFX2}${v}-gradient-stop-3-color`, old4 ?? `--surface-${v}`);
486
+ setIfMissing(`${PFX2}${v}-gradient-stop-3-position`, "--gradient-stop-end");
487
+ }
488
+ return out;
489
+ }
490
+ };
491
+
492
+ // src/editor/core/themes/migrations/2026-05-13-primary-to-brand.ts
493
+ var PALETTE_STEPS = ["100", "200", "300", "400", "500", "600", "700", "800", "850", "900", "950"];
494
+ var SURFACE_SUFFIXES = ["lowest", "lower", "low", "high", "higher", "highest"];
495
+ var BORDER_SUFFIXES = ["faint", "subtle", "medium", "strong"];
496
+ var TEXT_SUFFIXES = ["secondary", "tertiary", "muted", "disabled"];
497
+ var RENAME_MAP = (() => {
498
+ const m = {};
499
+ for (const step of PALETTE_STEPS) m[`--color-primary-${step}`] = `--color-brand-${step}`;
500
+ m["--surface-primary"] = "--surface-brand";
501
+ for (const suf of SURFACE_SUFFIXES) m[`--surface-primary-${suf}`] = `--surface-brand-${suf}`;
502
+ m["--border-primary"] = "--border-brand";
503
+ for (const suf of BORDER_SUFFIXES) m[`--border-primary-${suf}`] = `--border-brand-${suf}`;
504
+ m["--text-primary-color"] = "--text-brand";
505
+ for (const suf of TEXT_SUFFIXES) m[`--text-primary-${suf}`] = `--text-brand-${suf}`;
506
+ return m;
507
+ })();
508
+ function renameToken(name) {
509
+ return RENAME_MAP[name] ?? name;
510
+ }
511
+ function renameKeys(rawVars) {
512
+ const out = {};
513
+ for (const [k, v] of Object.entries(rawVars)) {
514
+ out[renameToken(k)] = v;
515
+ }
516
+ return out;
517
+ }
518
+ function renameKeysAndValues(rawVars) {
519
+ const out = {};
520
+ for (const [k, v] of Object.entries(rawVars)) {
521
+ out[renameToken(k)] = renameToken(v);
522
+ }
523
+ return out;
524
+ }
525
+ var colorsAndTypeMigration_2026_05_13_primaryToBrand = {
526
+ id: "2026-05-13-primary-to-brand-theme",
527
+ fromVersion: 1,
528
+ toVersion: 2,
529
+ appliesTo: "colors-and-type",
530
+ apply: renameKeys
531
+ };
532
+ var componentMigration_2026_05_13_primaryToBrand = {
533
+ id: "2026-05-13-primary-to-brand-component",
534
+ fromVersion: 5,
535
+ toVersion: 6,
536
+ appliesTo: "component-config",
537
+ apply: renameKeysAndValues
538
+ };
539
+
540
+ // src/editor/core/themes/migrations/2026-05-19-collapsiblesection-drop-frame-surface.ts
541
+ function dropFrameSurface(rawVars, meta) {
542
+ if (meta.component !== "collapsiblesection") return rawVars;
543
+ const { "--collapsiblesection-container-frame-surface": _drop, ...rest } = rawVars;
544
+ return rest;
545
+ }
546
+ var componentMigration_2026_05_19_collapsiblesectionDropFrameSurface = {
547
+ id: "2026-05-19-collapsiblesection-drop-frame-surface",
548
+ fromVersion: 6,
549
+ toVersion: 7,
550
+ appliesTo: "component-config",
551
+ apply: dropFrameSurface
552
+ };
553
+
554
+ // src/editor/core/themes/migrations/2026-05-19-sectiondivider-rich-gradient.ts
555
+ var FLAT_RE = /^--sectiondivider-(canvas|neutral|alternate|primary|accent|special)-gradient-(angle|stop-[123]-(color|position))$/;
556
+ var componentMigration_2026_05_19_sectiondividerRichGradient = {
557
+ id: "2026-05-19-sectiondivider-rich-gradient",
558
+ fromVersion: 7,
559
+ toVersion: 8,
560
+ appliesTo: "component-config",
561
+ apply(rawVars, meta) {
562
+ if (meta.component !== "sectiondivider") return { ...rawVars };
563
+ const out = {};
564
+ for (const [key, value] of Object.entries(rawVars)) {
565
+ if (FLAT_RE.test(key)) continue;
566
+ out[key] = value;
567
+ }
568
+ return out;
569
+ }
570
+ };
571
+
572
+ // src/editor/core/themes/migrations/2026-05-20-sectiondivider-slim-variants.ts
573
+ var VARIANTS2 = ["lg", "md", "sm"];
574
+ var SUFFIX_RENAMES = [
575
+ [/-title-border-width$/, "-title-outline-width"],
576
+ [/-title-stroke-color$/, "-title-outline-color"],
577
+ [
578
+ /^--sectiondivider-(canvas|neutral|alternate|primary|accent|special)-padding$/,
579
+ "--sectiondivider-$1-spacing"
580
+ ]
581
+ ];
582
+ function renameKeySuffix(key) {
583
+ for (const [re, repl] of SUFFIX_RENAMES) {
584
+ if (re.test(key)) return key.replace(re, repl);
585
+ }
586
+ return key;
587
+ }
588
+ function splitFamilyKey(key) {
589
+ const m = key.match(/^--sectiondivider-(canvas|neutral|alternate|primary|accent|special)-(.+)$/);
590
+ if (!m) return null;
591
+ return { family: m[1], suffix: m[2] };
592
+ }
593
+ var componentMigration_2026_05_20_sectiondividerSlimVariants = {
594
+ id: "2026-05-20-sectiondivider-slim-variants",
595
+ fromVersion: 8,
596
+ toVersion: 9,
597
+ appliesTo: "component-config",
598
+ apply(rawVars, meta) {
599
+ if (meta.component !== "sectiondivider") return { ...rawVars };
600
+ const out = {};
601
+ const canvasValues = {};
602
+ for (const [rawKey, value] of Object.entries(rawVars)) {
603
+ const key = renameKeySuffix(rawKey);
604
+ const parts = splitFamilyKey(key);
605
+ if (!parts) {
606
+ out[key] = value;
607
+ continue;
608
+ }
609
+ if (parts.family !== "canvas") continue;
610
+ canvasValues[parts.suffix] = value;
611
+ }
612
+ for (const suffix of Object.keys(canvasValues)) {
613
+ for (const v of VARIANTS2) {
614
+ out[`--sectiondivider-${v}-${suffix}`] = canvasValues[suffix];
615
+ }
616
+ }
617
+ return out;
618
+ }
619
+ };
620
+
621
+ // src/editor/core/themes/migrations/2026-05-21-sectiondivider-spacing-to-padding.ts
622
+ var componentMigration_2026_05_21_sectiondividerSpacingToPadding = {
623
+ id: "2026-05-21-sectiondivider-spacing-to-padding",
624
+ fromVersion: 9,
625
+ toVersion: 10,
626
+ appliesTo: "component-config",
627
+ apply(rawVars, meta) {
628
+ if (meta.component !== "sectiondivider") return { ...rawVars };
629
+ const out = {};
630
+ for (const [key, value] of Object.entries(rawVars)) {
631
+ const renamed = key.replace(
632
+ /^--sectiondivider-(lg|md|sm)-spacing$/,
633
+ "--sectiondivider-$1-padding"
634
+ );
635
+ out[renamed] = value;
636
+ }
637
+ return out;
638
+ }
639
+ };
640
+
641
+ // src/editor/core/themes/migrations/2026-05-22-sectiondivider-intrinsics-to-css.ts
642
+ var componentMigration_2026_05_22_sectiondividerIntrinsicsToCss = {
643
+ id: "2026-05-22-sectiondivider-intrinsics-to-css",
644
+ fromVersion: 10,
645
+ toVersion: 11,
646
+ appliesTo: "component-config",
647
+ apply(rawVars, meta) {
648
+ if (meta.component !== "sectiondivider") return { ...rawVars };
649
+ const VARIANTS4 = ["lg", "md", "sm"];
650
+ const prefix = "--sectiondivider-";
651
+ const dropped = /* @__PURE__ */ new Set();
652
+ for (const v of VARIANTS4) {
653
+ dropped.add(`${prefix}${v}-show-eyebrow`);
654
+ dropped.add(`${prefix}${v}-show-description`);
655
+ dropped.add(`${prefix}${v}-show-hairline`);
656
+ dropped.add(`${prefix}${v}-hairline`);
657
+ dropped.add(`${prefix}${v}-eyebrow-uppercase`);
658
+ }
659
+ const out = {};
660
+ for (const [key, value] of Object.entries(rawVars)) {
661
+ if (dropped.has(key)) continue;
662
+ out[key] = value;
663
+ }
664
+ for (const v of VARIANTS4) {
665
+ const showEyebrow = rawVars[`${prefix}${v}-show-eyebrow`];
666
+ if (showEyebrow !== void 0) {
667
+ out[`${prefix}${v}-eyebrow-display`] = showEyebrow === "1" ? "block" : "none";
668
+ }
669
+ const showDesc = rawVars[`${prefix}${v}-show-description`];
670
+ if (showDesc !== void 0) {
671
+ out[`${prefix}${v}-description-display`] = showDesc === "1" ? "flex" : "none";
672
+ }
673
+ const showHair = rawVars[`${prefix}${v}-show-hairline`];
674
+ const oldHair = rawVars[`${prefix}${v}-hairline`];
675
+ const oldHairIsPos = typeof oldHair === "string" && oldHair !== "" && oldHair !== "off";
676
+ let newHair;
677
+ if (showHair === "") newHair = "none";
678
+ else if (showHair === "1") newHair = oldHairIsPos ? oldHair : "above-label";
679
+ else if (oldHair !== void 0) newHair = oldHairIsPos ? oldHair : "none";
680
+ if (newHair !== void 0) {
681
+ out[`${prefix}${v}-hairline`] = newHair;
682
+ }
683
+ const upper = rawVars[`${prefix}${v}-eyebrow-uppercase`];
684
+ if (upper !== void 0) {
685
+ out[`${prefix}${v}-eyebrow-text-transform`] = upper === "1" ? "uppercase" : "none";
686
+ }
687
+ }
688
+ return out;
689
+ }
690
+ };
691
+
692
+ // src/editor/core/themes/migrations/2026-05-24-segmentedcontrol-divider-inset.ts
693
+ var componentMigration_2026_05_24_segmentedcontrolDividerInset = {
694
+ id: "2026-05-24-segmentedcontrol-divider-inset",
695
+ fromVersion: 11,
696
+ toVersion: 12,
697
+ appliesTo: "component-config",
698
+ apply(rawVars, meta) {
699
+ if (meta.component !== "segmentedcontrol") return { ...rawVars };
700
+ const out = {};
701
+ for (const [key, value] of Object.entries(rawVars)) {
702
+ if (key === "--segmentedcontrol-divider-height") continue;
703
+ out[key] = value;
704
+ }
705
+ return out;
706
+ }
707
+ };
708
+
709
+ // src/editor/core/themes/migrations/2026-05-24-promote-state-shared-tokens.ts
710
+ var BUTTON_VARIANTS = ["primary", "secondary", "outline", "success", "danger", "warning"];
711
+ var BUTTON_STATES = ["hover", "disabled"];
712
+ var BUTTON_PROPS = ["padding", "radius", "border-width"];
713
+ var buttonDeadKeys = new Set(
714
+ BUTTON_VARIANTS.flatMap(
715
+ (v) => BUTTON_STATES.flatMap(
716
+ (s) => BUTTON_PROPS.map((p) => `--button-${v}-${s}-${p}`)
717
+ )
718
+ )
719
+ );
720
+ var segmentedcontrolDeadKeys = /* @__PURE__ */ new Set([
721
+ "--segmentedcontrol-selected-icon-size",
722
+ "--segmentedcontrol-option-hover-icon-size",
723
+ "--segmentedcontrol-disabled-icon-size"
724
+ ]);
725
+ var componentMigration_2026_05_24_promoteStateSharedTokens = {
726
+ id: "2026-05-24-promote-state-shared-tokens",
727
+ fromVersion: 12,
728
+ toVersion: 13,
729
+ appliesTo: "component-config",
730
+ apply(rawVars, meta) {
731
+ const dead = meta.component === "button" ? buttonDeadKeys : meta.component === "segmentedcontrol" ? segmentedcontrolDeadKeys : null;
732
+ if (!dead) return { ...rawVars };
733
+ const out = {};
734
+ for (const [key, value] of Object.entries(rawVars)) {
735
+ if (dead.has(key)) continue;
736
+ out[key] = value;
737
+ }
738
+ return out;
739
+ }
740
+ };
741
+
742
+ // src/editor/core/themes/migrations/2026-05-24-progressbar-collapse-variants.ts
743
+ var PRIMARY_PREFIX = "--progressbar-primary-";
744
+ var NEW_PREFIX = "--progressbar-";
745
+ var DROP_PREFIXES = [
746
+ "--progressbar-success-",
747
+ "--progressbar-warning-",
748
+ "--progressbar-danger-",
749
+ "--progressbar-info-"
750
+ ];
751
+ var componentMigration_2026_05_24_progressbarCollapseVariants = {
752
+ id: "2026-05-24-progressbar-collapse-variants",
753
+ fromVersion: 13,
754
+ toVersion: 14,
755
+ appliesTo: "component-config",
756
+ apply(rawVars, meta) {
757
+ if (meta.component !== "progressbar") return { ...rawVars };
758
+ const out = {};
759
+ for (const [oldKey, value] of Object.entries(rawVars)) {
760
+ if (DROP_PREFIXES.some((p) => oldKey.startsWith(p))) continue;
761
+ const key = oldKey.startsWith(PRIMARY_PREFIX) ? NEW_PREFIX + oldKey.slice(PRIMARY_PREFIX.length) : oldKey;
762
+ if (!(key in out)) out[key] = value;
763
+ }
764
+ return out;
765
+ }
766
+ };
767
+
768
+ // src/editor/core/themes/migrations/2026-05-24-collapsiblesection-drop-active-state.ts
769
+ function dropActiveState(rawVars, meta) {
770
+ if (meta.component !== "collapsiblesection") return rawVars;
771
+ const re = /^--collapsiblesection-(chromeless|divider|container)-active-/;
772
+ const out = {};
773
+ for (const [key, value] of Object.entries(rawVars)) {
774
+ if (re.test(key)) continue;
775
+ out[key] = value;
776
+ }
777
+ return out;
778
+ }
779
+ var componentMigration_2026_05_24_collapsiblesectionDropActiveState = {
780
+ id: "2026-05-24-collapsiblesection-drop-active-state",
781
+ fromVersion: 14,
782
+ toVersion: 15,
783
+ appliesTo: "component-config",
784
+ apply: dropActiveState
785
+ };
786
+
787
+ // src/editor/core/themes/migrations/2026-05-25-cornerbadge-flatten-variants.ts
788
+ var VARIANTS3 = ["primary", "accent", "neutral", "alternate", "canvas", "special", "success", "warning", "danger", "info"];
789
+ var RE = new RegExp(`^--corner-badge-(${VARIANTS3.join("|")})-(.+)$`);
790
+ var CURRENT_COLOR_PROPS = /* @__PURE__ */ new Set(["surface", "border", "text"]);
791
+ function flattenVariants(rawVars, meta) {
792
+ if (meta.component !== "cornerbadge") return rawVars;
793
+ const out = {};
794
+ const collected = /* @__PURE__ */ new Map();
795
+ for (const [key, value] of Object.entries(rawVars)) {
796
+ const m = key.match(RE);
797
+ if (m) {
798
+ const prop = m[2];
799
+ if (CURRENT_COLOR_PROPS.has(prop)) {
800
+ out[key] = value;
801
+ continue;
802
+ }
803
+ if (!collected.has(prop)) collected.set(prop, value);
804
+ continue;
805
+ }
806
+ out[key] = value;
807
+ }
808
+ for (const [prop, value] of collected) {
809
+ const flatKey = `--corner-badge-${prop}`;
810
+ if (!(flatKey in out)) out[flatKey] = value;
811
+ }
812
+ return out;
813
+ }
814
+ var componentMigration_2026_05_25_cornerbadgeFlattenVariants = {
815
+ id: "2026-05-25-cornerbadge-flatten-variants",
816
+ fromVersion: 15,
817
+ toVersion: 16,
818
+ appliesTo: "component-config",
819
+ apply: flattenVariants
820
+ };
821
+
822
+ // src/editor/core/themes/migrations/2026-05-26-drop-overlay-extra-stops.ts
823
+ var DROPPED_TO_KEPT = {
824
+ "--overlay-lowest": "--overlay-low",
825
+ "--overlay-lower": "--overlay-low",
826
+ "--overlay-higher": "--overlay-high",
827
+ "--overlay-highest": "--overlay-high"
828
+ };
829
+ var colorsAndTypeMigration_2026_05_26_dropOverlayExtraStops = {
830
+ id: "2026-05-26-drop-overlay-extra-stops-theme",
831
+ fromVersion: 2,
832
+ toVersion: 3,
833
+ appliesTo: "colors-and-type",
834
+ apply(rawVars) {
835
+ const out = {};
836
+ for (const [key, value] of Object.entries(rawVars)) {
837
+ if (key in DROPPED_TO_KEPT) continue;
838
+ out[key] = value;
839
+ }
840
+ return out;
841
+ }
842
+ };
843
+ var componentMigration_2026_05_26_dropOverlayExtraStops = {
844
+ id: "2026-05-26-drop-overlay-extra-stops-component",
845
+ fromVersion: 16,
846
+ toVersion: 17,
847
+ appliesTo: "component-config",
848
+ apply(rawVars) {
849
+ const out = {};
850
+ for (const [key, value] of Object.entries(rawVars)) {
851
+ out[key] = DROPPED_TO_KEPT[value] ?? value;
852
+ }
853
+ return out;
854
+ }
855
+ };
856
+
857
+ // src/editor/core/themes/migrations/2026-05-29-tabbar-indicator-thickness-to-per-state-width.ts
858
+ var TABBAR_STATES = ["default", "hover", "active", "disabled"];
859
+ var OLD_KEY = "--tabbar-bar-indicator-thickness";
860
+ var FALLBACK = "--border-width-2";
861
+ var componentMigration_2026_05_29_tabbarIndicatorThicknessToPerStateWidth = {
862
+ id: "2026-05-29-tabbar-indicator-thickness-to-per-state-width",
863
+ fromVersion: 17,
864
+ toVersion: 18,
865
+ appliesTo: "component-config",
866
+ apply(rawVars, meta) {
867
+ if (meta.component !== "tabbar") return { ...rawVars };
868
+ const seed = rawVars[OLD_KEY] ?? FALLBACK;
869
+ const out = {};
870
+ for (const [key, value] of Object.entries(rawVars)) {
871
+ if (key === OLD_KEY) continue;
872
+ out[key] = value;
873
+ }
874
+ for (const state of TABBAR_STATES) {
875
+ const newKey = `--tabbar-${state}-indicator-border-width`;
876
+ if (!(newKey in out)) out[newKey] = seed;
877
+ }
878
+ return out;
879
+ }
880
+ };
881
+
882
+ // src/editor/core/themes/migrations/2026-05-29-segmentedcontrol-small-divider-rename.ts
883
+ var RENAMES = {
884
+ "--segmentedcontrol-divider-small-thickness": "--segmentedcontrol-small-divider-thickness",
885
+ "--segmentedcontrol-divider-small-inset": "--segmentedcontrol-small-divider-inset"
886
+ };
887
+ var componentMigration_2026_05_29_segmentedcontrolSmallDividerRename = {
888
+ id: "2026-05-29-segmentedcontrol-small-divider-rename",
889
+ fromVersion: 18,
890
+ toVersion: 19,
891
+ appliesTo: "component-config",
892
+ apply(rawVars, meta) {
893
+ if (meta.component !== "segmentedcontrol") return { ...rawVars };
894
+ const out = {};
895
+ for (const [key, value] of Object.entries(rawVars)) {
896
+ out[RENAMES[key] ?? key] = value;
897
+ }
898
+ return out;
899
+ }
900
+ };
901
+
902
+ // src/editor/core/themes/migrations/2026-05-29-toggle-derive-track-from-thumb.ts
903
+ var componentMigration_2026_05_29_toggleDeriveTrackFromThumb = {
904
+ id: "2026-05-29-toggle-derive-track-from-thumb",
905
+ fromVersion: 19,
906
+ toVersion: 20,
907
+ appliesTo: "component-config",
908
+ apply(rawVars, meta) {
909
+ if (meta.component !== "toggle") return { ...rawVars };
910
+ const out = {};
911
+ for (const [key, value] of Object.entries(rawVars)) {
912
+ if (key === "--toggle-track-width" || key === "--toggle-track-thickness") continue;
913
+ out[key] = value;
914
+ }
915
+ if (!("--toggle-track-padding" in out)) {
916
+ out["--toggle-track-padding"] = "--space-2";
917
+ }
918
+ return out;
919
+ }
920
+ };
921
+
922
+ // src/editor/core/themes/migrations/2026-08-13-drop-legacy-shape-space-keys.ts
923
+ var DROPPED = /* @__PURE__ */ new Set([
924
+ "--badge-trait-radius",
925
+ "--badge-trait-padding",
926
+ "--sectiondivider-padding",
927
+ "--dialog-primary-default-radius",
928
+ "--dialog-primary-default-padding",
929
+ "--dialog-primary-hover-radius",
930
+ "--dialog-primary-hover-padding",
931
+ "--dialog-secondary-default-radius",
932
+ "--dialog-secondary-default-padding",
933
+ "--dialog-secondary-hover-radius",
934
+ "--dialog-secondary-hover-padding"
935
+ ]);
936
+ var colorsAndTypeMigration_2026_08_13_dropLegacyShapeSpaceKeys = {
937
+ id: "2026-08-13-drop-legacy-shape-space-keys",
938
+ fromVersion: 3,
939
+ toVersion: 4,
940
+ appliesTo: "colors-and-type",
941
+ apply(rawVars) {
942
+ const out = {};
943
+ for (const [key, value] of Object.entries(rawVars)) {
944
+ if (DROPPED.has(key)) continue;
945
+ out[key] = value;
946
+ }
947
+ return out;
948
+ }
949
+ };
950
+
951
+ // src/editor/core/themes/migrations/2026-08-15-line-height-scale-rename.ts
952
+ var RENAMED = {
953
+ "--line-height-xs": "--line-height-none",
954
+ "--line-height-sm": "--line-height-tighter",
955
+ "--line-height-md": "--line-height-normal",
956
+ "--line-height-lg": "--line-height-relaxed",
957
+ "--line-height-xl": "--line-height-relaxed"
958
+ };
959
+ var REFERENCE = /--line-height-(?:xs|sm|md|lg|xl)(?![\w-])/g;
960
+ function renameValues(rawVars) {
961
+ const out = {};
962
+ for (const [key, value] of Object.entries(rawVars)) {
963
+ out[key] = typeof value === "string" ? value.replace(REFERENCE, (name) => RENAMED[name]) : value;
964
+ }
965
+ return out;
966
+ }
967
+ var colorsAndTypeMigration_2026_08_15_lineHeightScaleRename = {
968
+ id: "2026-08-15-line-height-scale-rename-colors-and-type",
969
+ fromVersion: 4,
970
+ toVersion: 5,
971
+ appliesTo: "colors-and-type",
972
+ apply: renameValues
973
+ };
974
+ var componentMigration_2026_08_15_lineHeightScaleRename = {
975
+ id: "2026-08-15-line-height-scale-rename-component",
976
+ fromVersion: 20,
977
+ toVersion: 21,
978
+ appliesTo: "component-config",
979
+ apply: renameValues
980
+ };
981
+
982
+ // src/editor/core/themes/migrations/index.ts
983
+ var MIGRATIONS = [
984
+ colorsAndTypeMigration_2026_04_24_legacyKeysAndBgToCanvas,
985
+ colorsAndTypeMigration_2026_05_13_primaryToBrand,
986
+ componentMigration_2026_04_24_prefixAndSuffixRenames,
987
+ componentMigration_2026_04_27_segmentedcontrolDisabledFlatten,
988
+ componentMigration_2026_05_08_collapsiblesectionVariantNamespace,
989
+ componentMigration_2026_05_08_collapsiblesectionFrameAndCleanup,
990
+ componentMigration_2026_05_10_sectiondividerGradientStops,
991
+ componentMigration_2026_05_13_primaryToBrand,
992
+ componentMigration_2026_05_19_collapsiblesectionDropFrameSurface,
993
+ componentMigration_2026_05_19_sectiondividerRichGradient,
994
+ componentMigration_2026_05_20_sectiondividerSlimVariants,
995
+ componentMigration_2026_05_21_sectiondividerSpacingToPadding,
996
+ componentMigration_2026_05_22_sectiondividerIntrinsicsToCss,
997
+ componentMigration_2026_05_24_segmentedcontrolDividerInset,
998
+ componentMigration_2026_05_24_promoteStateSharedTokens,
999
+ componentMigration_2026_05_24_progressbarCollapseVariants,
1000
+ componentMigration_2026_05_24_collapsiblesectionDropActiveState,
1001
+ componentMigration_2026_05_25_cornerbadgeFlattenVariants,
1002
+ colorsAndTypeMigration_2026_05_26_dropOverlayExtraStops,
1003
+ componentMigration_2026_05_26_dropOverlayExtraStops,
1004
+ componentMigration_2026_05_29_tabbarIndicatorThicknessToPerStateWidth,
1005
+ componentMigration_2026_05_29_segmentedcontrolSmallDividerRename,
1006
+ componentMigration_2026_05_29_toggleDeriveTrackFromThumb,
1007
+ colorsAndTypeMigration_2026_08_13_dropLegacyShapeSpaceKeys,
1008
+ colorsAndTypeMigration_2026_08_15_lineHeightScaleRename,
1009
+ componentMigration_2026_08_15_lineHeightScaleRename
1010
+ ];
1011
+ function countFor(kind) {
1012
+ return MIGRATIONS.filter((m) => m.appliesTo === kind).length;
1013
+ }
1014
+ var CURRENT_COLORS_AND_TYPE_SCHEMA_VERSION = countFor("colors-and-type");
1015
+ var CURRENT_COMPONENT_SCHEMA_VERSION = countFor("component-config");
253
1016
  // Annotate the CommonJS export names for ESM import in node:
254
1017
  0 && (module.exports = {
1018
+ CURRENT_COMPONENT_SCHEMA_VERSION,
255
1019
  adjustAliases,
256
1020
  matchesKind,
257
1021
  readLiveTokensConfig,