@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
@@ -1,6 +1,6 @@
1
1
  /* Generated by themeFileApi from the production theme. Do not edit. */
2
2
  /* tokens.css holds developer-authored defaults; this file holds editor overrides. */
3
- /* Bake fingerprint: 2c683a9cbf8a9e66 */
3
+ /* Bake fingerprint: f72b7c717f550cbd */
4
4
 
5
5
  /* Production theme: default */
6
6
  :root:root {
@@ -8,10 +8,7 @@
8
8
  --gradient-2: linear-gradient(135deg, var(--color-brand-500) 0%, var(--color-special-500) 100%);
9
9
  --gradient-3: linear-gradient(90deg, var(--color-success-500) 0%, var(--color-info-500) 100%);
10
10
  --gradient-4: linear-gradient(45deg, var(--color-danger-500) 0%, var(--color-warning-500) 100%);
11
- --columns-count: 12;
12
11
  --columns-max-width: 1440px;
13
- --columns-gutter: 32px;
14
- --columns-margin: 0px;
15
12
  --scrim-color: var(--surface-neutral-lowest);
16
13
  --scrim-opacity-low: 0.7;
17
14
  --scrim-opacity: 0.8;
@@ -436,8 +436,11 @@
436
436
  letter-spacing: var(--_divider-title-letter-spacing);
437
437
  }
438
438
 
439
+ /* The rows carry their own padding tokens, so a content-box 100% would run
440
+ past the divider by that padding. */
439
441
  .title-row {
440
442
  display: flex;
443
+ box-sizing: border-box;
441
444
  width: 100%;
442
445
  justify-content: var(--_divider-justify);
443
446
  align-items: center;
@@ -463,6 +466,7 @@
463
466
  flow entirely. */
464
467
  .description-row {
465
468
  display: var(--_divider-description-display);
469
+ box-sizing: border-box;
466
470
  width: 100%;
467
471
  justify-content: var(--_divider-justify);
468
472
  align-items: center;
@@ -497,13 +497,24 @@
497
497
  --scale-xl: 1.2;
498
498
  --scale-2xl: 1.25;
499
499
 
500
- /* COLUMN LAYOUT — 12-col grid. Drives the dev overlay; consume via
500
+ /* COLUMN LAYOUT. Twelve columns at every width; each viewport sets its own
501
+ gutter and margin. --columns-gutter and --columns-margin read the desktop
502
+ values, and the 767px and 480px blocks at the foot of this file re-point
503
+ them to the tablet and phone values. Drives the dev overlay; consume via
501
504
  grid-template-columns: repeat(var(--columns-count), 1fr) etc.
502
- --columns-margin = side gutters (0 = flush). */
505
+ --columns-margin = the page grid's inline padding. With box-sizing:
506
+ content-box the columns span --columns-max-width and the margin sits
507
+ outside them. */
503
508
  --columns-count: 12;
504
509
  --columns-max-width: 1440px;
505
- --columns-gutter: clamp(0.5rem, 1.5vw, 1.5rem);
506
- --columns-margin: 0;
510
+ --columns-desktop-gutter: 32px;
511
+ --columns-desktop-margin: 32px;
512
+ --columns-tablet-gutter: 24px;
513
+ --columns-tablet-margin: 24px;
514
+ --columns-phone-gutter: 16px;
515
+ --columns-phone-margin: 16px;
516
+ --columns-gutter: var(--columns-desktop-gutter);
517
+ --columns-margin: var(--columns-desktop-margin);
507
518
 
508
519
  /* Font Families */
509
520
  --font-display: "Arvo", serif;
@@ -1088,6 +1099,17 @@
1088
1099
  }
1089
1100
  }
1090
1101
 
1102
+ /* RESPONSIVE COLUMN GRID. The grid takes its tablet gutter and margin at
1103
+ 767px and narrower, and its phone gutter and margin at 480px and narrower.
1104
+ This block precedes the 480px block, so the phone values win on a phone. */
1105
+
1106
+ @media (max-width: 767px) {
1107
+ :root {
1108
+ --columns-gutter: var(--columns-tablet-gutter);
1109
+ --columns-margin: var(--columns-tablet-margin);
1110
+ }
1111
+ }
1112
+
1091
1113
  @media (max-width: 480px) {
1092
1114
  :root {
1093
1115
  --font-size-2xl: 1.25rem; /* 20px */
@@ -1133,5 +1155,9 @@
1133
1155
  --code-xs-font-size: var(--code-xs-phone-font-size);
1134
1156
  --code-2xs-font-size: var(--code-2xs-phone-font-size);
1135
1157
  --eyebrow-font-size: var(--eyebrow-phone-font-size);
1158
+
1159
+ /* The column grid's phone values. */
1160
+ --columns-gutter: var(--columns-phone-gutter);
1161
+ --columns-margin: var(--columns-phone-margin);
1136
1162
  }
1137
1163
  }
@@ -18,9 +18,9 @@ const sketchFiles = import.meta.glob<{ name?: string; settings: unknown }>(
18
18
  { eager: true, import: 'default' },
19
19
  );
20
20
 
21
- const sketchLooks = Object.entries(sketchFiles).map(([path, file]) => {
21
+ const sketchStyles = Object.entries(sketchFiles).map(([path, file]) => {
22
22
  const id = path.split('/').pop()!.replace('.json', '');
23
23
  return { id, label: file.name || id, settings: file.settings };
24
24
  });
25
25
 
26
- bootLiveTokens(App, '#app', { sketchLooks });
26
+ bootLiveTokens(App, '#app', { sketchStyles });
@@ -34,9 +34,11 @@
34
34
  display: grid;
35
35
  grid-template-columns: repeat(var(--columns-count), 1fr);
36
36
  column-gap: var(--columns-gutter);
37
+ box-sizing: content-box;
37
38
  max-width: var(--columns-max-width);
38
39
  margin: 0 auto;
39
- padding: var(--space-48) var(--space-32);
40
+ padding-block: var(--space-48);
41
+ padding-inline: var(--columns-margin);
40
42
  min-height: 100vh;
41
43
  align-content: center;
42
44
  }
@@ -58,16 +60,17 @@
58
60
  margin-top: var(--space-20);
59
61
  }
60
62
 
61
- /* The theme's own column gutter alone exceeds a phone's width at 12
62
- columns, so every page has to collapse to one column below 768px. */
63
+ /* Spans count twelfths at every width, and a narrow screen widens them. */
63
64
  @media (max-width: 767px) {
64
- .home {
65
- grid-template-columns: 1fr;
66
- column-gap: 0;
67
- }
68
-
69
65
  .stub {
70
66
  grid-column: 1 / -1;
71
67
  }
72
68
  }
69
+
70
+ @media (max-width: 600px) {
71
+ .actions {
72
+ flex-direction: column;
73
+ align-items: stretch;
74
+ }
75
+ }
73
76
  </style>
@@ -5,9 +5,13 @@ import { themeFileApi } from '@motion-proto/live-tokens/vite-plugin';
5
5
  export default defineConfig({
6
6
  plugins: [
7
7
  svelte({ preprocess: vitePreprocess() }),
8
- // In dev, persists editor changes to src/system/styles/tokens.css and the
9
- // JSON under src/live-tokens/data/. In `vite build`, runs the design checks
10
- // first and stops the build on an error.
8
+ // In dev, persists editor changes to the JSON under src/live-tokens/data/,
9
+ // and Adopt writes src/live-tokens/data/tokens.generated.css. In
10
+ // `vite build`, runs the design checks
11
+ // first and stops the build on an error, then writes each token whose value
12
+ // never changes at runtime as its value. `productionCss: false` keeps every
13
+ // token a variable, and `productionCss: { keep: [...] }` keeps the names a
14
+ // script assembles at runtime.
11
15
  themeFileApi({ tokensCssPath: 'src/system/styles/tokens.css' }),
12
16
  ],
13
17
  });
Binary file