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