@motion-proto/live-tokens 0.72.1 → 0.74.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 (81) hide show
  1. package/.claude/skills/live-tokens-build-page/SKILL.md +37 -2
  2. package/.claude/skills/live-tokens-build-page/references/layout-sources.md +48 -0
  3. package/.claude/skills/live-tokens-check-compliance/SKILL.md +2 -2
  4. package/.claude/skills/live-tokens-create-component/SKILL.md +4 -4
  5. package/.claude/skills/live-tokens-create-theme/SKILL.md +80 -0
  6. package/.claude/skills/live-tokens-create-theme/references/design-directions.md +94 -0
  7. package/.claude/skills/live-tokens-pick-component/SKILL.md +1 -1
  8. package/.claude/skills/live-tokens-set-colors/SKILL.md +140 -0
  9. package/.claude/skills/live-tokens-set-colors/references/color-anchors.md +80 -0
  10. package/.claude/skills/{live-tokens-adjust-geometry → live-tokens-set-geometry}/SKILL.md +12 -7
  11. package/.claude/skills/live-tokens-set-geometry/references/geometry-anchors.md +61 -0
  12. package/.claude/skills/{live-tokens-pair-fonts → live-tokens-set-type}/SKILL.md +18 -15
  13. package/.claude/skills/live-tokens-set-type/references/type-anchors.md +60 -0
  14. package/CHANGELOG.md +141 -0
  15. package/README.md +24 -15
  16. package/bin/check-page.mjs +3 -3
  17. package/bin/cli.mjs +92 -55
  18. package/bin/lib/liveState.mjs +110 -0
  19. package/bin/save-theme.mjs +177 -0
  20. package/bin/set-colors.mjs +191 -0
  21. package/bin/{adjust.mjs → set-geometry.mjs} +18 -50
  22. package/bin/{set-fonts.mjs → set-type.mjs} +21 -55
  23. package/dist-plugin/{chunk-RIXO2E55.js → chunk-7VRTBGJT.js} +1 -1
  24. package/dist-plugin/{chunk-YLCOIGQC.js → chunk-V3YF6CGT.js} +56 -2
  25. package/dist-plugin/index.cjs +58 -3
  26. package/dist-plugin/index.js +11 -11
  27. package/dist-plugin/migrateData/index.cjs +56 -1
  28. package/dist-plugin/migrateData/index.js +2 -2
  29. package/dist-plugin/{generateColorsAndType → setColors}/index.cjs +1109 -1071
  30. package/dist-plugin/{generateColorsAndType → setColors}/index.d.cts +33 -24
  31. package/dist-plugin/{generateColorsAndType → setColors}/index.d.ts +33 -24
  32. package/dist-plugin/{generateColorsAndType → setColors}/index.js +45 -63
  33. package/dist-plugin/{adjust → setGeometry}/index.cjs +60 -5
  34. package/dist-plugin/{adjust → setGeometry}/index.d.cts +1 -1
  35. package/dist-plugin/{adjust → setGeometry}/index.d.ts +1 -1
  36. package/dist-plugin/{adjust → setGeometry}/index.js +1 -1
  37. package/dist-plugin/{fontPairing → setType}/index.cjs +4 -4
  38. package/dist-plugin/{fontPairing → setType}/index.d.cts +1 -1
  39. package/dist-plugin/{fontPairing → setType}/index.d.ts +1 -1
  40. package/dist-plugin/{themeTypes-DSV3Zisf.d.cts → themeTypes-BxRtuN5V.d.cts} +1 -1
  41. package/dist-plugin/{themeTypes-DSV3Zisf.d.ts → themeTypes-BxRtuN5V.d.ts} +1 -1
  42. package/package.json +10 -2
  43. package/src/editor/core/themes/{generateColorsAndType.ts → buildColors.ts} +82 -96
  44. package/src/editor/core/themes/migrations/2026-09-03-drop-legacy-component-keys.ts +62 -0
  45. package/src/editor/core/themes/migrations/index.ts +2 -0
  46. package/src/editor/docs/content/creating-components.md +13 -0
  47. package/src/editor/docs/content/themes-workflow.md +2 -2
  48. package/src/editor/docs/content.generated.ts +2 -2
  49. package/src/editor/overlay/LiveEditorOverlay.svelte +519 -28
  50. package/src/editor/skill-atlas/SkillAtlas.svelte +836 -0
  51. package/src/editor/skill-atlas/SkillAtlas.svelte.d.ts +4 -0
  52. package/src/editor/skill-atlas/SourcePane.svelte +364 -0
  53. package/src/editor/skill-atlas/TreeNodeCard.svelte +206 -0
  54. package/src/editor/skill-atlas/skillSources.generated.ts +45 -0
  55. package/src/editor/skill-atlas/skillSources.ts +1 -0
  56. package/src/editor/skill-atlas/skillTrees.ts +3844 -0
  57. package/src/editor/skill-atlas/types.ts +65 -0
  58. package/src/live-tokens/data/colors-and-type/autumn.json +1 -37
  59. package/src/live-tokens/data/colors-and-type/default.json +1 -37
  60. package/src/live-tokens/data/colors-and-type/halloween.json +1 -37
  61. package/src/live-tokens/data/colors-and-type/midnight-study.json +1 -37
  62. package/src/live-tokens/data/colors-and-type/ocean.json +1 -37
  63. package/src/live-tokens/data/colors-and-type/royal-velvet.json +1 -37
  64. package/src/live-tokens/data/colors-and-type/sketchy.json +1 -37
  65. package/src/live-tokens/data/colors-and-type/spring-meadow.json +1 -37
  66. package/src/live-tokens/data/colors-and-type/sunset.json +1 -37
  67. package/src/live-tokens/data/themes/autumn.json +1 -37
  68. package/src/live-tokens/data/themes/halloween.json +1 -37
  69. package/src/live-tokens/data/themes/midnight-study.json +1 -37
  70. package/src/live-tokens/data/themes/ocean.json +1 -37
  71. package/src/live-tokens/data/themes/royal-velvet.json +1 -37
  72. package/src/live-tokens/data/themes/sketchy.json +1 -37
  73. package/src/live-tokens/data/themes/spring-meadow.json +1 -37
  74. package/src/live-tokens/data/themes/sunset.json +1 -37
  75. package/src/live-tokens/data/tokens.generated.css +0 -36
  76. package/.claude/skills/live-tokens-generate-theme/SKILL.md +0 -156
  77. package/.claude/skills/live-tokens-generate-theme/references/mood-vocabulary.md +0 -43
  78. package/.claude/skills/live-tokens-generate-theme/references/named-themes.md +0 -18
  79. package/.claude/skills/live-tokens-generate-theme/references/style-vocabulary.md +0 -35
  80. package/bin/generate-theme.mjs +0 -260
  81. /package/dist-plugin/{fontPairing → setType}/index.js +0 -0
@@ -1,3 +1,11 @@
1
+ import {
2
+ THEME_SCHEMA_VERSION,
3
+ detectLegacyLayout,
4
+ isColorsAndTypeShaped,
5
+ nextAvailableName,
6
+ normalizeTheme,
7
+ versionedFileResourceServer
8
+ } from "./chunk-7VRTBGJT.js";
1
9
  import {
2
10
  formatGradientValue,
3
11
  palettesToVars,
@@ -6,17 +14,9 @@ import {
6
14
  reconcilePalettesFromCssVars,
7
15
  sanitizeFileName
8
16
  } from "./chunk-O6GQ6GBH.js";
9
- import {
10
- THEME_SCHEMA_VERSION,
11
- detectLegacyLayout,
12
- isColorsAndTypeShaped,
13
- nextAvailableName,
14
- normalizeTheme,
15
- versionedFileResourceServer
16
- } from "./chunk-RIXO2E55.js";
17
17
  import {
18
18
  CURRENT_COMPONENT_SCHEMA_VERSION
19
- } from "./chunk-YLCOIGQC.js";
19
+ } from "./chunk-V3YF6CGT.js";
20
20
  import {
21
21
  TOKENS_CSS_MIGRATIONS,
22
22
  extractGlobalRootBody,
@@ -659,7 +659,7 @@ ${lines.join("\n")}
659
659
  return "corrupt";
660
660
  }
661
661
  function notAThemeError(fileName) {
662
- return `"${fileName}" is a colors-and-type file, not a theme. Before 0.48 those lived in themes/; move it to ${path.basename(COLORS_AND_TYPE_DIR)}/ or delete it. To build a theme, use the theme generator skill "generate-theme".`;
662
+ return `"${fileName}" is a colors-and-type file, not a theme. Before 0.48 those lived in themes/; move it to ${path.basename(COLORS_AND_TYPE_DIR)}/ or delete it. To build a theme, use the theme skill "create-theme".`;
663
663
  }
664
664
  function respondUnreadableTheme(res, fileName, missingError) {
665
665
  switch (unreadableThemeReason(fileName)) {
@@ -1251,7 +1251,7 @@ ${lines.join("\n")}
1251
1251
  const { theme, filled } = read;
1252
1252
  if (!theme.colorsAndType) {
1253
1253
  jsonResponse(res, 422, {
1254
- error: 'This theme carries no colors and type. Build one with the theme generator skill "generate-theme".'
1254
+ error: 'This theme carries no colors and type. Build one with the theme skill "create-theme".'
1255
1255
  });
1256
1256
  return;
1257
1257
  }
@@ -999,6 +999,60 @@ var componentMigration_2026_09_02_sectiondividerDropTitleOutline = {
999
999
  }
1000
1000
  };
1001
1001
 
1002
+ // src/editor/core/themes/migrations/2026-09-03-drop-legacy-component-keys.ts
1003
+ var DROPPED3 = /* @__PURE__ */ new Set([
1004
+ "--badge-trait-surface",
1005
+ "--badge-trait-text",
1006
+ "--badge-trait-text-font-family",
1007
+ "--badge-trait-text-font-size",
1008
+ "--badge-trait-text-font-weight",
1009
+ "--badge-trait-text-line-height",
1010
+ "--badge-trait-border",
1011
+ "--badge-trait-border-width",
1012
+ "--badge-trait-shadow",
1013
+ "--sectiondivider-title",
1014
+ "--sectiondivider-title-font-family",
1015
+ "--sectiondivider-title-font-size",
1016
+ "--sectiondivider-title-font-weight",
1017
+ "--sectiondivider-title-line-height",
1018
+ "--sectiondivider-title-border-width",
1019
+ "--sectiondivider-title-stroke-color",
1020
+ "--sectiondivider-description",
1021
+ "--sectiondivider-description-font-family",
1022
+ "--sectiondivider-description-font-size",
1023
+ "--sectiondivider-description-font-weight",
1024
+ "--sectiondivider-description-line-height",
1025
+ "--dialog-primary-default-surface",
1026
+ "--dialog-primary-default-text",
1027
+ "--dialog-primary-default-border",
1028
+ "--dialog-primary-default-border-width",
1029
+ "--dialog-primary-hover-surface",
1030
+ "--dialog-primary-hover-text",
1031
+ "--dialog-primary-hover-border",
1032
+ "--dialog-primary-hover-border-width",
1033
+ "--dialog-secondary-default-text",
1034
+ "--dialog-secondary-default-border",
1035
+ "--dialog-secondary-default-border-width",
1036
+ "--dialog-secondary-hover-surface",
1037
+ "--dialog-secondary-hover-text",
1038
+ "--dialog-secondary-hover-border",
1039
+ "--dialog-secondary-hover-border-width"
1040
+ ]);
1041
+ var colorsAndTypeMigration_2026_09_03_dropLegacyComponentKeys = {
1042
+ id: "2026-09-03-drop-legacy-component-keys",
1043
+ fromVersion: 7,
1044
+ toVersion: 8,
1045
+ appliesTo: "colors-and-type",
1046
+ apply(rawVars) {
1047
+ const out = {};
1048
+ for (const [key, value] of Object.entries(rawVars)) {
1049
+ if (DROPPED3.has(key)) continue;
1050
+ out[key] = value;
1051
+ }
1052
+ return out;
1053
+ }
1054
+ };
1055
+
1002
1056
  // src/editor/core/themes/migrations/index.ts
1003
1057
  var MIGRATIONS = [
1004
1058
  colorsAndTypeMigration_2026_04_24_legacyKeysAndBgToCanvas,
@@ -1033,7 +1087,8 @@ var MIGRATIONS = [
1033
1087
  componentMigration_2026_09_01_tintRename,
1034
1088
  componentMigration_2026_09_01_tabbarActiveTint,
1035
1089
  componentMigration_2026_09_01_gateSuffixEnabled,
1036
- componentMigration_2026_09_02_sectiondividerDropTitleOutline
1090
+ componentMigration_2026_09_02_sectiondividerDropTitleOutline,
1091
+ colorsAndTypeMigration_2026_09_03_dropLegacyComponentKeys
1037
1092
  ];
1038
1093
  function countFor(kind) {
1039
1094
  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-RIXO2E55.js";
10
+ } from "../chunk-7VRTBGJT.js";
11
11
  import {
12
12
  CURRENT_COMPONENT_SCHEMA_VERSION
13
- } from "../chunk-YLCOIGQC.js";
13
+ } from "../chunk-V3YF6CGT.js";
14
14
  import {
15
15
  readLiveTokensConfig,
16
16
  resolveDataDirs