@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.
- package/.claude/skills/live-tokens-build-page/SKILL.md +37 -2
- package/.claude/skills/live-tokens-build-page/references/layout-sources.md +48 -0
- package/.claude/skills/live-tokens-check-compliance/SKILL.md +2 -2
- package/.claude/skills/live-tokens-create-component/SKILL.md +4 -4
- package/.claude/skills/live-tokens-create-theme/SKILL.md +80 -0
- package/.claude/skills/live-tokens-create-theme/references/design-directions.md +94 -0
- package/.claude/skills/live-tokens-pick-component/SKILL.md +1 -1
- package/.claude/skills/live-tokens-set-colors/SKILL.md +140 -0
- package/.claude/skills/live-tokens-set-colors/references/color-anchors.md +80 -0
- package/.claude/skills/{live-tokens-adjust-geometry → live-tokens-set-geometry}/SKILL.md +12 -7
- package/.claude/skills/live-tokens-set-geometry/references/geometry-anchors.md +61 -0
- package/.claude/skills/{live-tokens-pair-fonts → live-tokens-set-type}/SKILL.md +18 -15
- package/.claude/skills/live-tokens-set-type/references/type-anchors.md +60 -0
- package/CHANGELOG.md +141 -0
- package/README.md +24 -15
- package/bin/check-page.mjs +3 -3
- package/bin/cli.mjs +92 -55
- package/bin/lib/liveState.mjs +110 -0
- package/bin/save-theme.mjs +177 -0
- package/bin/set-colors.mjs +191 -0
- package/bin/{adjust.mjs → set-geometry.mjs} +18 -50
- package/bin/{set-fonts.mjs → set-type.mjs} +21 -55
- package/dist-plugin/{chunk-RIXO2E55.js → chunk-7VRTBGJT.js} +1 -1
- package/dist-plugin/{chunk-YLCOIGQC.js → chunk-V3YF6CGT.js} +56 -2
- package/dist-plugin/index.cjs +58 -3
- package/dist-plugin/index.js +11 -11
- package/dist-plugin/migrateData/index.cjs +56 -1
- package/dist-plugin/migrateData/index.js +2 -2
- package/dist-plugin/{generateColorsAndType → setColors}/index.cjs +1109 -1071
- package/dist-plugin/{generateColorsAndType → setColors}/index.d.cts +33 -24
- package/dist-plugin/{generateColorsAndType → setColors}/index.d.ts +33 -24
- package/dist-plugin/{generateColorsAndType → setColors}/index.js +45 -63
- package/dist-plugin/{adjust → setGeometry}/index.cjs +60 -5
- package/dist-plugin/{adjust → setGeometry}/index.d.cts +1 -1
- package/dist-plugin/{adjust → setGeometry}/index.d.ts +1 -1
- package/dist-plugin/{adjust → setGeometry}/index.js +1 -1
- package/dist-plugin/{fontPairing → setType}/index.cjs +4 -4
- package/dist-plugin/{fontPairing → setType}/index.d.cts +1 -1
- package/dist-plugin/{fontPairing → setType}/index.d.ts +1 -1
- package/dist-plugin/{themeTypes-DSV3Zisf.d.cts → themeTypes-BxRtuN5V.d.cts} +1 -1
- package/dist-plugin/{themeTypes-DSV3Zisf.d.ts → themeTypes-BxRtuN5V.d.ts} +1 -1
- package/package.json +10 -2
- package/src/editor/core/themes/{generateColorsAndType.ts → buildColors.ts} +82 -96
- package/src/editor/core/themes/migrations/2026-09-03-drop-legacy-component-keys.ts +62 -0
- package/src/editor/core/themes/migrations/index.ts +2 -0
- package/src/editor/docs/content/creating-components.md +13 -0
- package/src/editor/docs/content/themes-workflow.md +2 -2
- package/src/editor/docs/content.generated.ts +2 -2
- package/src/editor/overlay/LiveEditorOverlay.svelte +519 -28
- package/src/editor/skill-atlas/SkillAtlas.svelte +836 -0
- package/src/editor/skill-atlas/SkillAtlas.svelte.d.ts +4 -0
- package/src/editor/skill-atlas/SourcePane.svelte +364 -0
- package/src/editor/skill-atlas/TreeNodeCard.svelte +206 -0
- package/src/editor/skill-atlas/skillSources.generated.ts +45 -0
- package/src/editor/skill-atlas/skillSources.ts +1 -0
- package/src/editor/skill-atlas/skillTrees.ts +3844 -0
- package/src/editor/skill-atlas/types.ts +65 -0
- package/src/live-tokens/data/colors-and-type/autumn.json +1 -37
- package/src/live-tokens/data/colors-and-type/default.json +1 -37
- package/src/live-tokens/data/colors-and-type/halloween.json +1 -37
- package/src/live-tokens/data/colors-and-type/midnight-study.json +1 -37
- package/src/live-tokens/data/colors-and-type/ocean.json +1 -37
- package/src/live-tokens/data/colors-and-type/royal-velvet.json +1 -37
- package/src/live-tokens/data/colors-and-type/sketchy.json +1 -37
- package/src/live-tokens/data/colors-and-type/spring-meadow.json +1 -37
- package/src/live-tokens/data/colors-and-type/sunset.json +1 -37
- package/src/live-tokens/data/themes/autumn.json +1 -37
- package/src/live-tokens/data/themes/halloween.json +1 -37
- package/src/live-tokens/data/themes/midnight-study.json +1 -37
- package/src/live-tokens/data/themes/ocean.json +1 -37
- package/src/live-tokens/data/themes/royal-velvet.json +1 -37
- package/src/live-tokens/data/themes/sketchy.json +1 -37
- package/src/live-tokens/data/themes/spring-meadow.json +1 -37
- package/src/live-tokens/data/themes/sunset.json +1 -37
- package/src/live-tokens/data/tokens.generated.css +0 -36
- package/.claude/skills/live-tokens-generate-theme/SKILL.md +0 -156
- package/.claude/skills/live-tokens-generate-theme/references/mood-vocabulary.md +0 -43
- package/.claude/skills/live-tokens-generate-theme/references/named-themes.md +0 -18
- package/.claude/skills/live-tokens-generate-theme/references/style-vocabulary.md +0 -35
- package/bin/generate-theme.mjs +0 -260
- /package/dist-plugin/{fontPairing → setType}/index.js +0 -0
package/dist-plugin/index.js
CHANGED
|
@@ -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-
|
|
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
|
|
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
|
|
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-
|
|
10
|
+
} from "../chunk-7VRTBGJT.js";
|
|
11
11
|
import {
|
|
12
12
|
CURRENT_COMPONENT_SCHEMA_VERSION
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-V3YF6CGT.js";
|
|
14
14
|
import {
|
|
15
15
|
readLiveTokensConfig,
|
|
16
16
|
resolveDataDirs
|