@motion-proto/live-tokens 0.94.3 → 0.95.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 (104) hide show
  1. package/.claude/skills/live-tokens-create-page/SKILL.md +7 -3
  2. package/CHANGELOG.md +97 -0
  3. package/README.md +6 -6
  4. package/dist-plugin/{chunk-7XSUHJUH.js → chunk-4J6JPSVS.js} +53 -2
  5. package/dist-plugin/{chunk-W5VQV32K.js → chunk-GYRULB2X.js} +1 -1
  6. package/dist-plugin/{chunk-ONYAIXCZ.js → chunk-QQASYPW7.js} +32 -9
  7. package/dist-plugin/index.cjs +598 -17
  8. package/dist-plugin/index.d.cts +9 -1
  9. package/dist-plugin/index.d.ts +9 -1
  10. package/dist-plugin/index.js +513 -6
  11. package/dist-plugin/migrateData/index.cjs +32 -9
  12. package/dist-plugin/migrateData/index.js +2 -2
  13. package/dist-plugin/setColors/index.cjs +32 -22
  14. package/dist-plugin/setColors/index.js +2 -15
  15. package/dist-plugin/setGeometry/index.cjs +32 -9
  16. package/dist-plugin/setGeometry/index.js +1 -1
  17. package/dist-plugin/tokensCssMigrations/index.cjs +53 -2
  18. package/dist-plugin/tokensCssMigrations/index.d.cts +9 -2
  19. package/dist-plugin/tokensCssMigrations/index.d.ts +9 -2
  20. package/dist-plugin/tokensCssMigrations/index.js +1 -1
  21. package/package.json +8 -3
  22. package/src/demo/Demo.svelte +39 -5
  23. package/src/demo/DemoBar.svelte +23 -5
  24. package/src/demo/FloatingTokenTags.css +33 -4
  25. package/src/demo/FloatingTokenTags.svelte +81 -68
  26. package/src/demo/Section.svelte +1 -7
  27. package/src/demo/SourceLinks.svelte +5 -4
  28. package/src/demo/TestingLoops.svelte +128 -19
  29. package/src/demo/evalResults.ts +7 -7
  30. package/src/demo/sections/SectionClaude.svelte +20 -13
  31. package/src/demo/sections/SectionFooter.svelte +4 -5
  32. package/src/demo/sections/SectionGetStarted.svelte +5 -6
  33. package/src/demo/sections/SectionHero.svelte +43 -23
  34. package/src/demo/sections/SectionKit.svelte +141 -45
  35. package/src/demo/sections/SectionLayers.svelte +3 -3
  36. package/src/demo/sections/SectionOffering.svelte +8 -23
  37. package/src/editor/bootstrap.ts +12 -6
  38. package/src/editor/component-editor/ImageEditor.svelte +1 -1
  39. package/src/editor/component-editor/ImageLightboxEditor.svelte +3 -4
  40. package/src/editor/component-editor/registration.ts +36 -0
  41. package/src/editor/component-editor/registry.ts +5 -12
  42. package/src/editor/component-editor/scaffolding/ShadowBackdrop.svelte +11 -2
  43. package/src/editor/component-editor/scaffolding/StateBlock.svelte +7 -0
  44. package/src/editor/component-editor/scaffolding/TokenLayout.svelte +1 -2
  45. package/src/editor/component-editor/scaffolding/VariantGroup.svelte +17 -2
  46. package/src/editor/core/store/editorPersistence.ts +6 -1
  47. package/src/editor/core/store/editorRenderer.ts +1 -4
  48. package/src/editor/core/store/editorStore.ts +5 -9
  49. package/src/editor/core/store/editorTypes.ts +2 -2
  50. package/src/editor/core/themes/migrations/2026-10-15-responsive-columns.ts +40 -0
  51. package/src/editor/core/themes/migrations/index.ts +2 -0
  52. package/src/editor/core/themes/slices/columns.ts +112 -42
  53. package/src/editor/docs/Docs.svelte +25 -22
  54. package/src/editor/docs/chapters.ts +1 -0
  55. package/src/editor/docs/content/editing-tokens.md +5 -3
  56. package/src/editor/docs/content/production-css.md +116 -0
  57. package/src/editor/docs/content/themes-workflow.md +2 -0
  58. package/src/editor/docs/content.generated.ts +3 -2
  59. package/src/editor/index.ts +2 -1
  60. package/src/editor/overlay/LiveEditorOverlay.svelte +67 -19
  61. package/src/editor/overlay/LiveTokensRouter.svelte +8 -4
  62. package/src/editor/pages/Editor.svelte +15 -1
  63. package/src/editor/pages/EditorShell.svelte +312 -99
  64. package/src/editor/skill-atlas/SkillAtlas.svelte +111 -24
  65. package/src/editor/skill-atlas/TreeCanvas.svelte +14 -0
  66. package/src/editor/skill-atlas/skillSources.generated.ts +1 -1
  67. package/src/editor/skill-atlas/trees/create-page.ts +24 -24
  68. package/src/editor/skill-atlas/wireLayout.ts +62 -0
  69. package/src/editor/ui/BezierCurveEditor.svelte +3 -0
  70. package/src/editor/ui/FontStackEditor.svelte +2 -2
  71. package/src/editor/ui/PaletteEditor.svelte +64 -6
  72. package/src/editor/ui/UIPaletteSelector.svelte +2 -0
  73. package/src/editor/ui/colors/ColorsTab.svelte +5 -2
  74. package/src/editor/ui/palette/OverridesPanel.svelte +1 -0
  75. package/src/editor/ui/palette/ScaleCurveEditor.svelte +127 -18
  76. package/src/editor/ui/sections/ColumnsSection.svelte +79 -49
  77. package/src/editor/ui/sections/ShadowsSection.svelte +14 -0
  78. package/src/editor/ui/sections/WashesSection.svelte +11 -0
  79. package/src/editor/ui/sketch/SketchTab.svelte +1 -1
  80. package/src/live-tokens/data/colors-and-type/autumn.json +1 -4
  81. package/src/live-tokens/data/colors-and-type/default.json +1 -4
  82. package/src/live-tokens/data/colors-and-type/halloween.json +1 -4
  83. package/src/live-tokens/data/colors-and-type/midnight-study.json +1 -4
  84. package/src/live-tokens/data/colors-and-type/ocean.json +1 -4
  85. package/src/live-tokens/data/colors-and-type/royal-velvet.json +1 -4
  86. package/src/live-tokens/data/colors-and-type/sketchy.json +1 -4
  87. package/src/live-tokens/data/colors-and-type/spring-meadow.json +1 -4
  88. package/src/live-tokens/data/colors-and-type/sunset.json +1 -4
  89. package/src/live-tokens/data/themes/autumn.json +1 -4
  90. package/src/live-tokens/data/themes/halloween.json +1 -4
  91. package/src/live-tokens/data/themes/midnight-study.json +1 -4
  92. package/src/live-tokens/data/themes/ocean.json +1 -4
  93. package/src/live-tokens/data/themes/royal-velvet.json +1 -4
  94. package/src/live-tokens/data/themes/sketchy.json +1 -4
  95. package/src/live-tokens/data/themes/spring-meadow.json +1 -4
  96. package/src/live-tokens/data/themes/sunset.json +1 -4
  97. package/src/live-tokens/data/tokens.generated.css +1 -4
  98. package/src/system/components/SectionDivider.svelte +4 -0
  99. package/src/system/styles/tokens.css +30 -4
  100. package/template/src/main.ts +2 -2
  101. package/template/src/pages/Home.svelte +11 -8
  102. package/template/vite.config.ts +7 -3
  103. package/src/system/assets/offering.webp +0 -0
  104. /package/dist-plugin/{chunk-O6GQ6GBH.js → chunk-A4TBP4MM.js} +0 -0
@@ -1438,6 +1438,28 @@ var colorsAndTypeMigration_2026_09_21_washColorAndOpacity = {
1438
1438
  }
1439
1439
  };
1440
1440
 
1441
+ // src/editor/core/themes/migrations/2026-10-15-responsive-columns.ts
1442
+ var RENAMES8 = {
1443
+ "--columns-gutter": "--columns-desktop-gutter",
1444
+ "--columns-margin": "--columns-desktop-margin"
1445
+ };
1446
+ var SHIPPED = {
1447
+ "--columns-count": ["12"],
1448
+ "--columns-gutter": ["32px"],
1449
+ "--columns-margin": ["0px", "0"]
1450
+ };
1451
+ var colorsAndTypeMigration_2026_10_15_responsiveColumns = {
1452
+ id: "2026-10-15-responsive-columns",
1453
+ fromVersion: 9,
1454
+ toVersion: 10,
1455
+ appliesTo: "colors-and-type",
1456
+ apply(rawVars) {
1457
+ return Object.fromEntries(
1458
+ Object.entries(rawVars).filter(([name, value]) => !SHIPPED[name]?.includes(value.trim())).map(([name, value]) => [RENAMES8[name] ?? name, value])
1459
+ );
1460
+ }
1461
+ };
1462
+
1441
1463
  // src/editor/core/themes/migrations/2026-09-21-scrim-surface.ts
1442
1464
  var STOPS2 = {
1443
1465
  "--scrim-opacity-low": "--scrim-low",
@@ -1476,7 +1498,7 @@ var componentMigration_2026_09_21_scrimSurface = {
1476
1498
  };
1477
1499
 
1478
1500
  // src/editor/core/themes/migrations/2026-09-13-cornerbadge-prefix.ts
1479
- var RENAMES8 = {
1501
+ var RENAMES9 = {
1480
1502
  cornerbadge: {
1481
1503
  "--corner-badge-margin": "--cornerbadge-margin",
1482
1504
  "--corner-badge-outer-radius": "--cornerbadge-outer-radius",
@@ -1526,7 +1548,7 @@ var componentMigration_2026_09_13_cornerbadgePrefix = {
1526
1548
  toVersion: 32,
1527
1549
  appliesTo: "component-config",
1528
1550
  apply(rawVars, meta) {
1529
- const renames = meta.component ? RENAMES8[meta.component] : void 0;
1551
+ const renames = meta.component ? RENAMES9[meta.component] : void 0;
1530
1552
  if (!renames) return { ...rawVars };
1531
1553
  const out = {};
1532
1554
  for (const [key, value] of Object.entries(rawVars)) {
@@ -1537,7 +1559,7 @@ var componentMigration_2026_09_13_cornerbadgePrefix = {
1537
1559
  };
1538
1560
 
1539
1561
  // src/editor/core/themes/migrations/2026-09-13-toggle-label.ts
1540
- var RENAMES9 = {
1562
+ var RENAMES10 = {
1541
1563
  toggle: {
1542
1564
  "--toggle-label-text": "--toggle-label",
1543
1565
  "--toggle-disabled-label-text": "--toggle-disabled-label"
@@ -1549,7 +1571,7 @@ var componentMigration_2026_09_13_toggleLabel = {
1549
1571
  toVersion: 33,
1550
1572
  appliesTo: "component-config",
1551
1573
  apply(rawVars, meta) {
1552
- const renames = meta.component ? RENAMES9[meta.component] : void 0;
1574
+ const renames = meta.component ? RENAMES10[meta.component] : void 0;
1553
1575
  if (!renames) return { ...rawVars };
1554
1576
  const out = {};
1555
1577
  for (const [key, value] of Object.entries(rawVars)) {
@@ -1560,7 +1582,7 @@ var componentMigration_2026_09_13_toggleLabel = {
1560
1582
  };
1561
1583
 
1562
1584
  // src/editor/core/themes/migrations/2026-09-13-collapsiblesection-open.ts
1563
- var RENAMES10 = {
1585
+ var RENAMES11 = {
1564
1586
  collapsiblesection: {
1565
1587
  "--collapsiblesection-chromeless-expanded-padding": "--collapsiblesection-chromeless-open-padding",
1566
1588
  "--collapsiblesection-hairline-expanded-padding": "--collapsiblesection-hairline-open-padding",
@@ -1574,7 +1596,7 @@ var componentMigration_2026_09_13_collapsiblesectionOpen = {
1574
1596
  toVersion: 34,
1575
1597
  appliesTo: "component-config",
1576
1598
  apply(rawVars, meta) {
1577
- const renames = meta.component ? RENAMES10[meta.component] : void 0;
1599
+ const renames = meta.component ? RENAMES11[meta.component] : void 0;
1578
1600
  if (!renames) return { ...rawVars };
1579
1601
  const out = {};
1580
1602
  for (const [key, value] of Object.entries(rawVars)) {
@@ -1601,7 +1623,7 @@ var BADGE_SUFFIXES = [
1601
1623
  "icon-size"
1602
1624
  ];
1603
1625
  var CORNERBADGE_SUFFIXES = ["surface", "border", "text"];
1604
- var RENAMES11 = {
1626
+ var RENAMES12 = {
1605
1627
  badge: Object.fromEntries(
1606
1628
  BADGE_SUFFIXES.map((s) => [`--badge-primary-${s}`, `--badge-brand-${s}`])
1607
1629
  ),
@@ -1615,7 +1637,7 @@ var componentMigration_2026_09_13_badgeBrand = {
1615
1637
  toVersion: 35,
1616
1638
  appliesTo: "component-config",
1617
1639
  apply(rawVars, meta) {
1618
- const renames = meta.component ? RENAMES11[meta.component] : void 0;
1640
+ const renames = meta.component ? RENAMES12[meta.component] : void 0;
1619
1641
  if (!renames) return { ...rawVars };
1620
1642
  const out = {};
1621
1643
  for (const [key, value] of Object.entries(rawVars)) {
@@ -1673,7 +1695,8 @@ var MIGRATIONS = [
1673
1695
  componentMigration_2026_09_20_imagelightboxScrim,
1674
1696
  componentMigration_2026_09_20_scrimColorAndOpacity,
1675
1697
  colorsAndTypeMigration_2026_09_21_washColorAndOpacity,
1676
- componentMigration_2026_09_21_scrimSurface
1698
+ componentMigration_2026_09_21_scrimSurface,
1699
+ colorsAndTypeMigration_2026_10_15_responsiveColumns
1677
1700
  ];
1678
1701
  function countFor(kind) {
1679
1702
  return MIGRATIONS.filter((m) => m.appliesTo === kind).length;
@@ -7,10 +7,10 @@ import {
7
7
  normalizeTheme,
8
8
  planLegacyRenames,
9
9
  versionedFileResourceServer
10
- } from "../chunk-W5VQV32K.js";
10
+ } from "../chunk-GYRULB2X.js";
11
11
  import {
12
12
  CURRENT_COMPONENT_SCHEMA_VERSION
13
- } from "../chunk-ONYAIXCZ.js";
13
+ } from "../chunk-QQASYPW7.js";
14
14
  import {
15
15
  readLiveTokensConfig,
16
16
  resolveDataDirs
@@ -586,19 +586,6 @@ function palettesToVars(palettes) {
586
586
  return out;
587
587
  }
588
588
 
589
- // src/editor/core/store/editorCore.ts
590
- var import_store = require("svelte/store");
591
- var emptyStateFactory = () => ({});
592
- var store = (0, import_store.writable)(emptyStateFactory());
593
- var past = [];
594
- var future = [];
595
- var savedAtIndex = 0;
596
- var historyTick = (0, import_store.writable)(0);
597
- var editorState = { subscribe: store.subscribe };
598
- var canUndo = (0, import_store.derived)(historyTick, () => past.length > 0);
599
- var canRedo = (0, import_store.derived)(historyTick, () => future.length > 0);
600
- var dirty = (0, import_store.derived)(historyTick, () => past.length !== savedAtIndex);
601
-
602
589
  // src/editor/core/themes/parsers/colorOpacity.ts
603
590
  function formatColorOpacity(name, opacity) {
604
591
  return `color-mix(in srgb, var(${name}) ${opacity}%, transparent)`;
@@ -2452,6 +2439,28 @@ var colorsAndTypeMigration_2026_09_21_washColorAndOpacity = {
2452
2439
  }
2453
2440
  };
2454
2441
 
2442
+ // src/editor/core/themes/migrations/2026-10-15-responsive-columns.ts
2443
+ var RENAMES8 = {
2444
+ "--columns-gutter": "--columns-desktop-gutter",
2445
+ "--columns-margin": "--columns-desktop-margin"
2446
+ };
2447
+ var SHIPPED = {
2448
+ "--columns-count": ["12"],
2449
+ "--columns-gutter": ["32px"],
2450
+ "--columns-margin": ["0px", "0"]
2451
+ };
2452
+ var colorsAndTypeMigration_2026_10_15_responsiveColumns = {
2453
+ id: "2026-10-15-responsive-columns",
2454
+ fromVersion: 9,
2455
+ toVersion: 10,
2456
+ appliesTo: "colors-and-type",
2457
+ apply(rawVars) {
2458
+ return Object.fromEntries(
2459
+ Object.entries(rawVars).filter(([name, value]) => !SHIPPED[name]?.includes(value.trim())).map(([name, value]) => [RENAMES8[name] ?? name, value])
2460
+ );
2461
+ }
2462
+ };
2463
+
2455
2464
  // src/editor/core/themes/migrations/2026-09-21-scrim-surface.ts
2456
2465
  var STOPS2 = {
2457
2466
  "--scrim-opacity-low": "--scrim-low",
@@ -2490,7 +2499,7 @@ var componentMigration_2026_09_21_scrimSurface = {
2490
2499
  };
2491
2500
 
2492
2501
  // src/editor/core/themes/migrations/2026-09-13-cornerbadge-prefix.ts
2493
- var RENAMES8 = {
2502
+ var RENAMES9 = {
2494
2503
  cornerbadge: {
2495
2504
  "--corner-badge-margin": "--cornerbadge-margin",
2496
2505
  "--corner-badge-outer-radius": "--cornerbadge-outer-radius",
@@ -2540,7 +2549,7 @@ var componentMigration_2026_09_13_cornerbadgePrefix = {
2540
2549
  toVersion: 32,
2541
2550
  appliesTo: "component-config",
2542
2551
  apply(rawVars, meta) {
2543
- const renames = meta.component ? RENAMES8[meta.component] : void 0;
2552
+ const renames = meta.component ? RENAMES9[meta.component] : void 0;
2544
2553
  if (!renames) return { ...rawVars };
2545
2554
  const out = {};
2546
2555
  for (const [key, value] of Object.entries(rawVars)) {
@@ -2551,7 +2560,7 @@ var componentMigration_2026_09_13_cornerbadgePrefix = {
2551
2560
  };
2552
2561
 
2553
2562
  // src/editor/core/themes/migrations/2026-09-13-toggle-label.ts
2554
- var RENAMES9 = {
2563
+ var RENAMES10 = {
2555
2564
  toggle: {
2556
2565
  "--toggle-label-text": "--toggle-label",
2557
2566
  "--toggle-disabled-label-text": "--toggle-disabled-label"
@@ -2563,7 +2572,7 @@ var componentMigration_2026_09_13_toggleLabel = {
2563
2572
  toVersion: 33,
2564
2573
  appliesTo: "component-config",
2565
2574
  apply(rawVars, meta) {
2566
- const renames = meta.component ? RENAMES9[meta.component] : void 0;
2575
+ const renames = meta.component ? RENAMES10[meta.component] : void 0;
2567
2576
  if (!renames) return { ...rawVars };
2568
2577
  const out = {};
2569
2578
  for (const [key, value] of Object.entries(rawVars)) {
@@ -2574,7 +2583,7 @@ var componentMigration_2026_09_13_toggleLabel = {
2574
2583
  };
2575
2584
 
2576
2585
  // src/editor/core/themes/migrations/2026-09-13-collapsiblesection-open.ts
2577
- var RENAMES10 = {
2586
+ var RENAMES11 = {
2578
2587
  collapsiblesection: {
2579
2588
  "--collapsiblesection-chromeless-expanded-padding": "--collapsiblesection-chromeless-open-padding",
2580
2589
  "--collapsiblesection-hairline-expanded-padding": "--collapsiblesection-hairline-open-padding",
@@ -2588,7 +2597,7 @@ var componentMigration_2026_09_13_collapsiblesectionOpen = {
2588
2597
  toVersion: 34,
2589
2598
  appliesTo: "component-config",
2590
2599
  apply(rawVars, meta) {
2591
- const renames = meta.component ? RENAMES10[meta.component] : void 0;
2600
+ const renames = meta.component ? RENAMES11[meta.component] : void 0;
2592
2601
  if (!renames) return { ...rawVars };
2593
2602
  const out = {};
2594
2603
  for (const [key, value] of Object.entries(rawVars)) {
@@ -2615,7 +2624,7 @@ var BADGE_SUFFIXES = [
2615
2624
  "icon-size"
2616
2625
  ];
2617
2626
  var CORNERBADGE_SUFFIXES = ["surface", "border", "text"];
2618
- var RENAMES11 = {
2627
+ var RENAMES12 = {
2619
2628
  badge: Object.fromEntries(
2620
2629
  BADGE_SUFFIXES.map((s) => [`--badge-primary-${s}`, `--badge-brand-${s}`])
2621
2630
  ),
@@ -2629,7 +2638,7 @@ var componentMigration_2026_09_13_badgeBrand = {
2629
2638
  toVersion: 35,
2630
2639
  appliesTo: "component-config",
2631
2640
  apply(rawVars, meta) {
2632
- const renames = meta.component ? RENAMES11[meta.component] : void 0;
2641
+ const renames = meta.component ? RENAMES12[meta.component] : void 0;
2633
2642
  if (!renames) return { ...rawVars };
2634
2643
  const out = {};
2635
2644
  for (const [key, value] of Object.entries(rawVars)) {
@@ -2687,7 +2696,8 @@ var MIGRATIONS = [
2687
2696
  componentMigration_2026_09_20_imagelightboxScrim,
2688
2697
  componentMigration_2026_09_20_scrimColorAndOpacity,
2689
2698
  colorsAndTypeMigration_2026_09_21_washColorAndOpacity,
2690
- componentMigration_2026_09_21_scrimSurface
2699
+ componentMigration_2026_09_21_scrimSurface,
2700
+ colorsAndTypeMigration_2026_10_15_responsiveColumns
2691
2701
  ];
2692
2702
  function countFor(kind) {
2693
2703
  return MIGRATIONS.filter((m) => m.appliesTo === kind).length;
@@ -15,10 +15,10 @@ import {
15
15
  scaleToCssVar,
16
16
  setCurveAnchor,
17
17
  syncBaseAnchor
18
- } from "../chunk-O6GQ6GBH.js";
18
+ } from "../chunk-A4TBP4MM.js";
19
19
  import {
20
20
  CURRENT_COMPONENT_SCHEMA_VERSION
21
- } from "../chunk-ONYAIXCZ.js";
21
+ } from "../chunk-QQASYPW7.js";
22
22
  import {
23
23
  cssColorToOklch,
24
24
  gamutClamp,
@@ -31,19 +31,6 @@ import {
31
31
  resolveDataDirs
32
32
  } from "../chunk-6WGFOJXO.js";
33
33
 
34
- // src/editor/core/store/editorCore.ts
35
- import { writable, derived, get } from "svelte/store";
36
- var emptyStateFactory = () => ({});
37
- var store = writable(emptyStateFactory());
38
- var past = [];
39
- var future = [];
40
- var savedAtIndex = 0;
41
- var historyTick = writable(0);
42
- var editorState = { subscribe: store.subscribe };
43
- var canUndo = derived(historyTick, () => past.length > 0);
44
- var canRedo = derived(historyTick, () => future.length > 0);
45
- var dirty = derived(historyTick, () => past.length !== savedAtIndex);
46
-
47
34
  // src/editor/core/themes/slices/gradients.ts
48
35
  function makeDefaultGradients() {
49
36
  return [
@@ -1600,6 +1600,28 @@ var colorsAndTypeMigration_2026_09_21_washColorAndOpacity = {
1600
1600
  }
1601
1601
  };
1602
1602
 
1603
+ // src/editor/core/themes/migrations/2026-10-15-responsive-columns.ts
1604
+ var RENAMES8 = {
1605
+ "--columns-gutter": "--columns-desktop-gutter",
1606
+ "--columns-margin": "--columns-desktop-margin"
1607
+ };
1608
+ var SHIPPED = {
1609
+ "--columns-count": ["12"],
1610
+ "--columns-gutter": ["32px"],
1611
+ "--columns-margin": ["0px", "0"]
1612
+ };
1613
+ var colorsAndTypeMigration_2026_10_15_responsiveColumns = {
1614
+ id: "2026-10-15-responsive-columns",
1615
+ fromVersion: 9,
1616
+ toVersion: 10,
1617
+ appliesTo: "colors-and-type",
1618
+ apply(rawVars) {
1619
+ return Object.fromEntries(
1620
+ Object.entries(rawVars).filter(([name, value]) => !SHIPPED[name]?.includes(value.trim())).map(([name, value]) => [RENAMES8[name] ?? name, value])
1621
+ );
1622
+ }
1623
+ };
1624
+
1603
1625
  // src/editor/core/themes/migrations/2026-09-21-scrim-surface.ts
1604
1626
  var STOPS2 = {
1605
1627
  "--scrim-opacity-low": "--scrim-low",
@@ -1638,7 +1660,7 @@ var componentMigration_2026_09_21_scrimSurface = {
1638
1660
  };
1639
1661
 
1640
1662
  // src/editor/core/themes/migrations/2026-09-13-cornerbadge-prefix.ts
1641
- var RENAMES8 = {
1663
+ var RENAMES9 = {
1642
1664
  cornerbadge: {
1643
1665
  "--corner-badge-margin": "--cornerbadge-margin",
1644
1666
  "--corner-badge-outer-radius": "--cornerbadge-outer-radius",
@@ -1688,7 +1710,7 @@ var componentMigration_2026_09_13_cornerbadgePrefix = {
1688
1710
  toVersion: 32,
1689
1711
  appliesTo: "component-config",
1690
1712
  apply(rawVars, meta) {
1691
- const renames = meta.component ? RENAMES8[meta.component] : void 0;
1713
+ const renames = meta.component ? RENAMES9[meta.component] : void 0;
1692
1714
  if (!renames) return { ...rawVars };
1693
1715
  const out = {};
1694
1716
  for (const [key, value] of Object.entries(rawVars)) {
@@ -1699,7 +1721,7 @@ var componentMigration_2026_09_13_cornerbadgePrefix = {
1699
1721
  };
1700
1722
 
1701
1723
  // src/editor/core/themes/migrations/2026-09-13-toggle-label.ts
1702
- var RENAMES9 = {
1724
+ var RENAMES10 = {
1703
1725
  toggle: {
1704
1726
  "--toggle-label-text": "--toggle-label",
1705
1727
  "--toggle-disabled-label-text": "--toggle-disabled-label"
@@ -1711,7 +1733,7 @@ var componentMigration_2026_09_13_toggleLabel = {
1711
1733
  toVersion: 33,
1712
1734
  appliesTo: "component-config",
1713
1735
  apply(rawVars, meta) {
1714
- const renames = meta.component ? RENAMES9[meta.component] : void 0;
1736
+ const renames = meta.component ? RENAMES10[meta.component] : void 0;
1715
1737
  if (!renames) return { ...rawVars };
1716
1738
  const out = {};
1717
1739
  for (const [key, value] of Object.entries(rawVars)) {
@@ -1722,7 +1744,7 @@ var componentMigration_2026_09_13_toggleLabel = {
1722
1744
  };
1723
1745
 
1724
1746
  // src/editor/core/themes/migrations/2026-09-13-collapsiblesection-open.ts
1725
- var RENAMES10 = {
1747
+ var RENAMES11 = {
1726
1748
  collapsiblesection: {
1727
1749
  "--collapsiblesection-chromeless-expanded-padding": "--collapsiblesection-chromeless-open-padding",
1728
1750
  "--collapsiblesection-hairline-expanded-padding": "--collapsiblesection-hairline-open-padding",
@@ -1736,7 +1758,7 @@ var componentMigration_2026_09_13_collapsiblesectionOpen = {
1736
1758
  toVersion: 34,
1737
1759
  appliesTo: "component-config",
1738
1760
  apply(rawVars, meta) {
1739
- const renames = meta.component ? RENAMES10[meta.component] : void 0;
1761
+ const renames = meta.component ? RENAMES11[meta.component] : void 0;
1740
1762
  if (!renames) return { ...rawVars };
1741
1763
  const out = {};
1742
1764
  for (const [key, value] of Object.entries(rawVars)) {
@@ -1763,7 +1785,7 @@ var BADGE_SUFFIXES = [
1763
1785
  "icon-size"
1764
1786
  ];
1765
1787
  var CORNERBADGE_SUFFIXES = ["surface", "border", "text"];
1766
- var RENAMES11 = {
1788
+ var RENAMES12 = {
1767
1789
  badge: Object.fromEntries(
1768
1790
  BADGE_SUFFIXES.map((s) => [`--badge-primary-${s}`, `--badge-brand-${s}`])
1769
1791
  ),
@@ -1777,7 +1799,7 @@ var componentMigration_2026_09_13_badgeBrand = {
1777
1799
  toVersion: 35,
1778
1800
  appliesTo: "component-config",
1779
1801
  apply(rawVars, meta) {
1780
- const renames = meta.component ? RENAMES11[meta.component] : void 0;
1802
+ const renames = meta.component ? RENAMES12[meta.component] : void 0;
1781
1803
  if (!renames) return { ...rawVars };
1782
1804
  const out = {};
1783
1805
  for (const [key, value] of Object.entries(rawVars)) {
@@ -1835,7 +1857,8 @@ var MIGRATIONS = [
1835
1857
  componentMigration_2026_09_20_imagelightboxScrim,
1836
1858
  componentMigration_2026_09_20_scrimColorAndOpacity,
1837
1859
  colorsAndTypeMigration_2026_09_21_washColorAndOpacity,
1838
- componentMigration_2026_09_21_scrimSurface
1860
+ componentMigration_2026_09_21_scrimSurface,
1861
+ colorsAndTypeMigration_2026_10_15_responsiveColumns
1839
1862
  ];
1840
1863
  function countFor(kind) {
1841
1864
  return MIGRATIONS.filter((m) => m.appliesTo === kind).length;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  CURRENT_COMPONENT_SCHEMA_VERSION
3
- } from "../chunk-ONYAIXCZ.js";
3
+ } from "../chunk-QQASYPW7.js";
4
4
  import {
5
5
  readLiveTokensConfig,
6
6
  resolveDataDirs
@@ -173,7 +173,7 @@ function setTokenValue(css, name, value, opts = {}) {
173
173
  }
174
174
  return changed ? lines.join("\n") : css;
175
175
  }
176
- function appendMediaBlock(css, query, entries) {
176
+ function appendMediaBlock(css, query, entries, opts = {}) {
177
177
  const lines = css.split("\n");
178
178
  const at = query.trim();
179
179
  const blocks = findTopLevelBlocks(lines, (line) => mediaQueryOf(line) === at);
@@ -185,6 +185,12 @@ function appendMediaBlock(css, query, entries) {
185
185
  const media = blocks.find((b) => b.end > b.start);
186
186
  if (!media) {
187
187
  const block = [`@media ${at} {`, " :root {", ...declarationLines(missing, " "), " }", "}", ""];
188
+ const before = opts.before?.trim();
189
+ const next = before === void 0 ? void 0 : findTopLevelBlocks(lines, (line) => mediaQueryOf(line) === before)[0];
190
+ if (next) {
191
+ lines.splice(next.start, 0, ...block);
192
+ return lines.join("\n");
193
+ }
188
194
  while (lines.length > 0 && lines[lines.length - 1].trim() === "") lines.pop();
189
195
  return [...lines, "", ...block].join("\n");
190
196
  }
@@ -1615,6 +1621,50 @@ var tokensCssMigration_2026_10_08_typeScales = {
1615
1621
  }
1616
1622
  };
1617
1623
 
1624
+ // vite-plugin/tokensCssMigrations/migrations/2026-10-15-responsive-columns.ts
1625
+ var DESKTOP = [
1626
+ {
1627
+ structural: "--columns-gutter",
1628
+ desktop: "--columns-desktop-gutter",
1629
+ shipped: "clamp(0.5rem, 1.5vw, 1.5rem)",
1630
+ value: "32px"
1631
+ },
1632
+ { structural: "--columns-margin", desktop: "--columns-desktop-margin", shipped: "0", value: "32px" }
1633
+ ];
1634
+ var SMALLER = [
1635
+ { name: "--columns-tablet-gutter", value: "24px" },
1636
+ { name: "--columns-tablet-margin", value: "24px" },
1637
+ { name: "--columns-phone-gutter", value: "16px" },
1638
+ { name: "--columns-phone-margin", value: "16px" }
1639
+ ];
1640
+ var repoints = (viewport) => DESKTOP.map(({ structural }) => ({
1641
+ name: structural,
1642
+ value: `var(${structural.replace("--columns-", `--columns-${viewport}-`)})`
1643
+ }));
1644
+ var tokensCssMigration_2026_10_15_responsiveColumns = {
1645
+ id: "2026-10-15-responsive-columns",
1646
+ kind: "breaking",
1647
+ description: "Give the column grid a gutter and margin per viewport, and re-point --columns-gutter and --columns-margin at them",
1648
+ apply(css) {
1649
+ const values = collectTokenValues(css);
1650
+ const pending = DESKTOP.filter(({ desktop }) => !values.has(desktop));
1651
+ let out = ensureScale(css, {
1652
+ anchorPrefixes: ["--columns-"],
1653
+ entries: [
1654
+ ...pending.map(({ structural, desktop, shipped, value }) => {
1655
+ const current = values.get(structural);
1656
+ return { name: desktop, value: current === void 0 || current === shipped ? value : current };
1657
+ }),
1658
+ ...SMALLER
1659
+ ]
1660
+ });
1661
+ for (const { structural, desktop } of pending) out = setTokenValue(out, structural, `var(${desktop})`);
1662
+ out = ensureScale(out, { anchorPrefixes: ["--columns-"], entries: repoints("desktop") });
1663
+ out = appendMediaBlock(out, "(max-width: 767px)", repoints("tablet"), { before: "(max-width: 480px)" });
1664
+ return appendMediaBlock(out, "(max-width: 480px)", repoints("phone"));
1665
+ }
1666
+ };
1667
+
1618
1668
  // vite-plugin/files/dataPaths.ts
1619
1669
  var import_fs = __toESM(require("fs"), 1);
1620
1670
  var import_path = __toESM(require("path"), 1);
@@ -1670,7 +1720,8 @@ var TOKENS_CSS_MIGRATIONS = [
1670
1720
  tokensCssMigration_2026_09_01_tintScale,
1671
1721
  tokensCssMigration_2026_09_20_scrimColorAndOpacity,
1672
1722
  tokensCssMigration_2026_09_21_tintColorAndOpacity,
1673
- tokensCssMigration_2026_10_08_typeScales
1723
+ tokensCssMigration_2026_10_08_typeScales,
1724
+ tokensCssMigration_2026_10_15_responsiveColumns
1674
1725
  ];
1675
1726
  function runTokensCssMigrations(css) {
1676
1727
  return foldMigrations(css, () => true);
@@ -110,12 +110,19 @@ interface SetTokenValueOptions {
110
110
  * `:root` does not declare `name`.
111
111
  */
112
112
  declare function setTokenValue(css: string, name: string, value: string, opts?: SetTokenValueOptions): string;
113
+ interface AppendMediaBlockOptions {
114
+ /**
115
+ * A query whose first top-level block a new block goes before. A block that
116
+ * overlaps a narrower one has to precede it, or it wins the cascade there.
117
+ */
118
+ before?: string;
119
+ }
113
120
  /**
114
121
  * Append each entry that no top-level `@media <query>` block declares yet to
115
122
  * that block's `:root`. The query must match exactly. With no such block, a new
116
- * one goes at the end of the file.
123
+ * one goes before the first `opts.before` block, or else at the end of the file.
117
124
  */
118
- declare function appendMediaBlock(css: string, query: string, entries: ScaleEntry[]): string;
125
+ declare function appendMediaBlock(css: string, query: string, entries: ScaleEntry[], opts?: AppendMediaBlockOptions): string;
119
126
 
120
127
  /**
121
128
  * Registered tokens-css migrations, applied in array order. Unlike the
@@ -110,12 +110,19 @@ interface SetTokenValueOptions {
110
110
  * `:root` does not declare `name`.
111
111
  */
112
112
  declare function setTokenValue(css: string, name: string, value: string, opts?: SetTokenValueOptions): string;
113
+ interface AppendMediaBlockOptions {
114
+ /**
115
+ * A query whose first top-level block a new block goes before. A block that
116
+ * overlaps a narrower one has to precede it, or it wins the cascade there.
117
+ */
118
+ before?: string;
119
+ }
113
120
  /**
114
121
  * Append each entry that no top-level `@media <query>` block declares yet to
115
122
  * that block's `:root`. The query must match exactly. With no such block, a new
116
- * one goes at the end of the file.
123
+ * one goes before the first `opts.before` block, or else at the end of the file.
117
124
  */
118
- declare function appendMediaBlock(css: string, query: string, entries: ScaleEntry[]): string;
125
+ declare function appendMediaBlock(css: string, query: string, entries: ScaleEntry[], opts?: AppendMediaBlockOptions): string;
119
126
 
120
127
  /**
121
128
  * Registered tokens-css migrations, applied in array order. Unlike the
@@ -15,7 +15,7 @@ import {
15
15
  semverBumpType,
16
16
  setTokenValue,
17
17
  validateTokensCss
18
- } from "../chunk-7XSUHJUH.js";
18
+ } from "../chunk-4J6JPSVS.js";
19
19
  import "../chunk-7TQQTHI6.js";
20
20
  import {
21
21
  readLiveTokensConfig
package/package.json CHANGED
@@ -1,7 +1,10 @@
1
1
  {
2
2
  "name": "@motion-proto/live-tokens",
3
- "version": "0.94.3",
3
+ "version": "0.95.0",
4
4
  "type": "module",
5
+ "sideEffects": [
6
+ "**/*.css"
7
+ ],
5
8
  "description": "Design token editor with live CSS variable editing. Svelte 5 + Vite 8.",
6
9
  "keywords": [
7
10
  "svelte",
@@ -164,11 +167,12 @@
164
167
  "check": "svelte-check --tsconfig ./tsconfig.json",
165
168
  "test": "vitest run",
166
169
  "test:watch": "vitest",
167
- "test:e2e": "npm run test:e2e:contract && npm run test:e2e:contract-defects && npm run test:e2e:page-defects && npm run test:e2e:stateful",
170
+ "test:e2e": "npm run test:e2e:contract && npm run test:e2e:contract-defects && npm run test:e2e:page-defects && npm run test:e2e:stateful && npm run test:e2e:production-css",
168
171
  "test:e2e:contract": "playwright test --project=contract --workers=${PLAYWRIGHT_WORKERS:-4}",
169
172
  "test:e2e:stateful": "playwright test tests/e2e/live-editing.spec.ts tests/e2e/theme-workflow.spec.ts --workers=1",
170
173
  "test:e2e:contract-defects": "playwright test --project=contract-defects --workers=${PLAYWRIGHT_WORKERS:-4}",
171
174
  "test:e2e:page-defects": "playwright test --project=page-defects --workers=${PLAYWRIGHT_WORKERS:-4}",
175
+ "test:e2e:production-css": "playwright test tests/e2e/production-css.spec.ts --workers=1",
172
176
  "test:e2e:components": "playwright test --project=contract src/testing/component-render.contract.ts",
173
177
  "test:e2e:ui": "playwright test --ui",
174
178
  "test:registry-contract": "vitest run --config vitest.contract.config.ts",
@@ -241,6 +245,7 @@
241
245
  "dependencies": {
242
246
  "@fortawesome/fontawesome-free": "^7.2.0",
243
247
  "highlight.js": "^11.11.1",
244
- "marked": "^18.0.4"
248
+ "marked": "^18.0.4",
249
+ "postcss": "^8.5.26"
245
250
  }
246
251
  }
@@ -36,14 +36,24 @@
36
36
  </div>
37
37
 
38
38
  <style>
39
+ /* Sections place themselves on these spans, and the full-width ones nest a
40
+ subgrid, so the breakpoints below are the only place a section's columns
41
+ change. minmax(0, 1fr) keeps a wide child from widening its track. */
39
42
  .kit {
43
+ --kit-content: 2 / -2;
44
+ --kit-narrow: 3 / -3;
45
+ --kit-section-lead: var(--space-32);
46
+ --kit-quote-pause: var(--space-32);
47
+ --kit-footer-lead: var(--space-32);
40
48
  display: grid;
41
- grid-template-columns: repeat(var(--columns-count), 1fr);
49
+ grid-template-columns: repeat(var(--columns-count), minmax(0, 1fr));
42
50
  column-gap: var(--columns-gutter);
43
51
  row-gap: var(--space-64);
52
+ box-sizing: content-box;
44
53
  max-width: var(--columns-max-width);
45
54
  margin: 0 auto;
46
- padding: var(--space-48) var(--space-32);
55
+ padding-block: var(--space-48);
56
+ padding-inline: var(--columns-margin);
47
57
  min-height: 100vh;
48
58
  }
49
59
 
@@ -57,11 +67,21 @@
57
67
  margin-bottom: 0;
58
68
  }
59
69
 
60
- /* Equal lead-in above these three sections: row-gap (64) + 48 = 112px. */
70
+ /* Every titled section opens with the same lead-in: row-gap, this margin,
71
+ and the SectionDivider's own top margin. The quote pauses between the
72
+ layers and the panel below it, and the footer sets off from the page. */
61
73
  .kit > :global(.kit-section),
62
74
  .kit > :global(.layers),
63
75
  .kit > :global(.claude) {
64
- margin-top: var(--space-32);
76
+ margin-top: var(--kit-section-lead);
77
+ }
78
+
79
+ .kit > :global(.offering) {
80
+ margin-block: var(--kit-quote-pause);
81
+ }
82
+
83
+ .kit > :global(.provenance) {
84
+ margin-top: var(--kit-footer-lead);
65
85
  }
66
86
 
67
87
  /* Inline code styling cascades into every section via :global descendants. */
@@ -75,10 +95,24 @@
75
95
  color: var(--text-primary);
76
96
  }
77
97
 
98
+ @media (max-width: 1200px) {
99
+ .kit {
100
+ --kit-content: 1 / -1;
101
+ --kit-narrow: 2 / -2;
102
+ }
103
+ }
104
+
78
105
  @media (max-width: 600px) {
106
+ .kit {
107
+ --kit-narrow: 1 / -1;
108
+ }
109
+
79
110
  .kit,
80
111
  .kit.has-bar {
81
- padding: var(--space-32) var(--space-16);
112
+ --kit-section-lead: var(--space-8);
113
+ --kit-quote-pause: var(--space-16);
114
+ --kit-footer-lead: var(--space-16);
115
+ padding-block: var(--space-32);
82
116
  row-gap: var(--space-48);
83
117
  }
84
118
  }