@motion-proto/live-tokens 0.67.1 → 0.69.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 +16 -5
- package/.claude/skills/live-tokens-create-component/SKILL.md +43 -8
- package/.claude/skills/live-tokens-create-component/references/token-naming.md +30 -1
- package/.claude/skills/live-tokens-fix-findings/SKILL.md +131 -0
- package/.claude/skills/live-tokens-pick-component/SKILL.md +2 -1
- package/CHANGELOG.md +239 -0
- package/README.md +11 -4
- package/bin/check-component.mjs +367 -63
- package/bin/check-page.mjs +409 -0
- package/bin/cli.mjs +57 -8
- package/bin/generate-theme.mjs +5 -4
- package/bin/lib/cssValues.mjs +50 -0
- package/bin/lib/findings.mjs +106 -0
- package/bin/lib/tokenVocabulary.mjs +213 -0
- package/dist-plugin/adjust/index.cjs +174 -23
- package/dist-plugin/adjust/index.d.cts +1 -1
- package/dist-plugin/adjust/index.d.ts +1 -1
- package/dist-plugin/adjust/index.js +68 -23
- package/dist-plugin/{chunk-J2JT4UEA.js → chunk-2YNERPXY.js} +26 -26
- package/dist-plugin/{chunk-NE6N66EE.js → chunk-GPIBU44G.js} +107 -1
- package/dist-plugin/{chunk-ZHPX7ZYQ.js → chunk-RFVYPNRO.js} +39 -1
- package/dist-plugin/{dataPaths-DZUzVv8H.d.ts → dataPaths-bJTCEO4H.d.cts} +1 -1
- package/dist-plugin/{dataPaths-DZUzVv8H.d.cts → dataPaths-bJTCEO4H.d.ts} +1 -1
- package/dist-plugin/fontPairing/index.d.cts +1 -1
- package/dist-plugin/fontPairing/index.d.ts +1 -1
- package/dist-plugin/generateColorsAndType/index.cjs +107 -1
- package/dist-plugin/generateColorsAndType/index.d.cts +1 -1
- package/dist-plugin/generateColorsAndType/index.d.ts +1 -1
- package/dist-plugin/generateColorsAndType/index.js +1 -1
- package/dist-plugin/index.cjs +173 -29
- package/dist-plugin/index.d.cts +1 -1
- package/dist-plugin/index.d.ts +1 -1
- package/dist-plugin/index.js +7 -7
- package/dist-plugin/migrateData/index.cjs +132 -26
- package/dist-plugin/migrateData/index.d.cts +1 -1
- package/dist-plugin/migrateData/index.d.ts +1 -1
- package/dist-plugin/migrateData/index.js +2 -2
- package/dist-plugin/tokensCssMigrations/index.cjs +39 -1
- package/dist-plugin/tokensCssMigrations/index.d.cts +1 -1
- package/dist-plugin/tokensCssMigrations/index.d.ts +1 -1
- package/dist-plugin/tokensCssMigrations/index.js +1 -1
- package/package.json +6 -5
- package/src/app/site.css +4 -4
- package/src/editor/bootstrap.ts +6 -6
- package/src/editor/component-editor/ButtonEditor.svelte +71 -4
- package/src/editor/component-editor/CardEditor.svelte +6 -6
- package/src/editor/component-editor/DialogEditor.svelte +3 -3
- package/src/editor/component-editor/IconButtonEditor.svelte +68 -3
- package/src/editor/component-editor/ImageEditor.svelte +8 -8
- package/src/editor/component-editor/ImageLightboxEditor.svelte +13 -2
- package/src/editor/component-editor/MenuSelectEditor.svelte +63 -3
- package/src/editor/component-editor/SegmentedControlEditor.svelte +63 -3
- package/src/editor/component-editor/SideNavigationEditor.svelte +67 -3
- package/src/editor/component-editor/SliderEditor.svelte +186 -0
- package/src/editor/component-editor/TabBarEditor.svelte +63 -3
- package/src/editor/component-editor/registry.ts +10 -0
- package/src/editor/component-editor/scaffolding/ComponentFileManager.svelte +4 -4
- package/src/editor/core/components/aliasKinds.ts +51 -28
- package/src/editor/core/fonts/fontLoader.ts +2 -2
- package/src/editor/core/preview/{lookPreview.ts → themePreview.ts} +27 -27
- package/src/editor/core/productionPulse.ts +3 -3
- package/src/editor/core/sketch/index.ts +52 -44
- package/src/editor/core/sketch/maskField.ts +9 -9
- package/src/editor/core/sketch/sketchLayer.ts +25 -9
- package/src/editor/core/sketch/sketchRegistry.ts +34 -34
- package/src/editor/core/sketch/sketchStore.ts +98 -83
- package/src/editor/core/sketch/sketchStyleService.ts +4 -4
- package/src/editor/core/sketch/sketchStyles.ts +28 -28
- package/src/editor/core/store/editorPersistence.ts +44 -1
- package/src/editor/core/store/editorRenderer.ts +2 -2
- package/src/editor/core/store/editorStore.ts +18 -18
- package/src/editor/core/store/editorTypes.ts +7 -6
- package/src/editor/core/themes/colorsAndTypeService.ts +1 -1
- package/src/editor/core/themes/loadRows.ts +8 -8
- package/src/editor/core/themes/migrations/2026-09-01-gate-suffix-enabled.ts +31 -0
- package/src/editor/core/themes/migrations/2026-09-01-scrim-rename.ts +52 -0
- package/src/editor/core/themes/migrations/2026-09-01-tabbar-active-tint.ts +27 -0
- package/src/editor/core/themes/migrations/2026-09-01-tint-rename.ts +42 -0
- package/src/editor/core/themes/migrations/index.ts +16 -0
- package/src/editor/core/themes/slices/domainVars.ts +2 -2
- package/src/editor/core/themes/slices/washes.ts +107 -0
- package/src/editor/core/themes/themeDocumentSync.ts +2 -2
- package/src/editor/core/themes/themeInit.ts +2 -2
- package/src/editor/core/themes/themeService.ts +17 -17
- package/src/editor/core/themes/{lookSummary.ts → themeSummary.ts} +9 -9
- package/src/editor/core/themes/themeTypes.ts +10 -6
- package/src/editor/docs/content/editing-tokens.md +5 -3
- package/src/editor/docs/content/getting-started.md +1 -1
- package/src/editor/docs/content/sketch-mode.md +22 -17
- package/src/editor/docs/content/themes-workflow.md +11 -11
- package/src/editor/docs/content/where-themes-live.md +6 -6
- package/src/editor/docs/content.generated.ts +5 -5
- package/src/editor/index.ts +2 -2
- package/src/editor/pages/EditorShell.svelte +1 -1
- package/src/editor/ui/SurfacesTab.svelte +3 -3
- package/src/editor/ui/ThemePanel.svelte +52 -52
- package/src/editor/ui/UITokenSelector.svelte +1 -0
- package/src/editor/ui/VariablesTab.svelte +2 -2
- package/src/editor/ui/sections/{OverlaysSection.svelte → WashesSection.svelte} +44 -43
- package/src/editor/ui/sketch/SketchPreview.svelte +2 -2
- package/src/editor/ui/sketch/SketchTab.svelte +64 -38
- package/src/live-tokens/data/colors-and-type/autumn.json +6 -6
- package/src/live-tokens/data/colors-and-type/default.json +6 -6
- package/src/live-tokens/data/colors-and-type/halloween.json +6 -6
- package/src/live-tokens/data/colors-and-type/midnight-study.json +6 -6
- package/src/live-tokens/data/colors-and-type/ocean.json +6 -6
- package/src/live-tokens/data/colors-and-type/royal-velvet.json +6 -6
- package/src/live-tokens/data/colors-and-type/sketchy.json +6 -6
- package/src/live-tokens/data/colors-and-type/spring-meadow.json +6 -6
- package/src/live-tokens/data/colors-and-type/sunset.json +6 -6
- package/src/live-tokens/data/sketch-styles/dry.json +5 -5
- package/src/live-tokens/data/sketch-styles/hatched.json +9 -9
- package/src/live-tokens/data/themes/autumn.json +82 -14
- package/src/live-tokens/data/themes/halloween.json +82 -14
- package/src/live-tokens/data/themes/midnight-study.json +82 -14
- package/src/live-tokens/data/themes/ocean.json +82 -14
- package/src/live-tokens/data/themes/royal-velvet.json +82 -14
- package/src/live-tokens/data/themes/sketchy.json +82 -14
- package/src/live-tokens/data/themes/spring-meadow.json +82 -14
- package/src/live-tokens/data/themes/sunset.json +82 -14
- package/src/live-tokens/data/tokens.generated.css +6 -6
- package/src/system/backdrop/backdrop.ts +1 -1
- package/src/system/components/Button.svelte +28 -10
- package/src/system/components/Card.svelte +6 -6
- package/src/system/components/Dialog.svelte +3 -3
- package/src/system/components/IconButton.svelte +23 -7
- package/src/system/components/Image.svelte +6 -6
- package/src/system/components/MenuSelect.svelte +17 -1
- package/src/system/components/SectionDivider.svelte +1 -1
- package/src/system/components/SegmentedControl.svelte +20 -2
- package/src/system/components/SideNavigation.svelte +22 -2
- package/src/system/components/Slider.svelte +348 -0
- package/src/system/components/TabBar.svelte +20 -2
- package/src/system/styles/CONVENTIONS.md +2 -2
- package/src/system/styles/tokens.css +12 -4
- package/template/package.json +3 -2
- package/template/src/pages/Home.svelte +1 -1
- package/src/editor/core/themes/slices/overlays.ts +0 -101
package/dist-plugin/index.cjs
CHANGED
|
@@ -1487,6 +1487,106 @@ var componentMigration_2026_08_15_lineHeightScaleRename = {
|
|
|
1487
1487
|
apply: renameValues
|
|
1488
1488
|
};
|
|
1489
1489
|
|
|
1490
|
+
// src/editor/core/themes/migrations/2026-09-01-scrim-rename.ts
|
|
1491
|
+
var RENAMED2 = {
|
|
1492
|
+
"--overlay-low": "--scrim-low",
|
|
1493
|
+
"--overlay": "--scrim",
|
|
1494
|
+
"--overlay-high": "--scrim-high"
|
|
1495
|
+
};
|
|
1496
|
+
var RENAMED_COMPONENT_KEYS = {
|
|
1497
|
+
"--dialog-overlay-surface": "--dialog-scrim-surface"
|
|
1498
|
+
};
|
|
1499
|
+
var colorsAndTypeMigration_2026_09_01_scrimRename = {
|
|
1500
|
+
id: "2026-09-01-scrim-rename-theme",
|
|
1501
|
+
fromVersion: 5,
|
|
1502
|
+
toVersion: 6,
|
|
1503
|
+
appliesTo: "colors-and-type",
|
|
1504
|
+
apply(rawVars) {
|
|
1505
|
+
const out = {};
|
|
1506
|
+
for (const [key, value] of Object.entries(rawVars)) {
|
|
1507
|
+
out[RENAMED2[key] ?? key] = value;
|
|
1508
|
+
}
|
|
1509
|
+
return out;
|
|
1510
|
+
}
|
|
1511
|
+
};
|
|
1512
|
+
var componentMigration_2026_09_01_scrimRename = {
|
|
1513
|
+
id: "2026-09-01-scrim-rename-component",
|
|
1514
|
+
fromVersion: 21,
|
|
1515
|
+
toVersion: 22,
|
|
1516
|
+
appliesTo: "component-config",
|
|
1517
|
+
apply(rawVars) {
|
|
1518
|
+
const out = {};
|
|
1519
|
+
for (const [key, value] of Object.entries(rawVars)) {
|
|
1520
|
+
out[RENAMED_COMPONENT_KEYS[key] ?? key] = RENAMED2[value] ?? value;
|
|
1521
|
+
}
|
|
1522
|
+
return out;
|
|
1523
|
+
}
|
|
1524
|
+
};
|
|
1525
|
+
|
|
1526
|
+
// src/editor/core/themes/migrations/2026-09-01-tint-rename.ts
|
|
1527
|
+
var RENAMED3 = {
|
|
1528
|
+
"--hover-low": "--tint-low",
|
|
1529
|
+
"--hover": "--tint",
|
|
1530
|
+
"--hover-high": "--tint-high"
|
|
1531
|
+
};
|
|
1532
|
+
var colorsAndTypeMigration_2026_09_01_tintRename = {
|
|
1533
|
+
id: "2026-09-01-tint-rename-theme",
|
|
1534
|
+
fromVersion: 6,
|
|
1535
|
+
toVersion: 7,
|
|
1536
|
+
appliesTo: "colors-and-type",
|
|
1537
|
+
apply(rawVars) {
|
|
1538
|
+
const out = {};
|
|
1539
|
+
for (const [key, value] of Object.entries(rawVars)) out[RENAMED3[key] ?? key] = value;
|
|
1540
|
+
return out;
|
|
1541
|
+
}
|
|
1542
|
+
};
|
|
1543
|
+
var componentMigration_2026_09_01_tintRename = {
|
|
1544
|
+
id: "2026-09-01-tint-rename-component",
|
|
1545
|
+
fromVersion: 22,
|
|
1546
|
+
toVersion: 23,
|
|
1547
|
+
appliesTo: "component-config",
|
|
1548
|
+
apply(rawVars) {
|
|
1549
|
+
const out = {};
|
|
1550
|
+
for (const [key, value] of Object.entries(rawVars)) out[key] = RENAMED3[value] ?? value;
|
|
1551
|
+
return out;
|
|
1552
|
+
}
|
|
1553
|
+
};
|
|
1554
|
+
|
|
1555
|
+
// src/editor/core/themes/migrations/2026-09-01-tabbar-active-tint.ts
|
|
1556
|
+
var componentMigration_2026_09_01_tabbarActiveTint = {
|
|
1557
|
+
id: "2026-09-01-tabbar-active-tint",
|
|
1558
|
+
fromVersion: 23,
|
|
1559
|
+
toVersion: 24,
|
|
1560
|
+
appliesTo: "component-config",
|
|
1561
|
+
apply(rawVars, meta) {
|
|
1562
|
+
if (meta.component !== "tabbar") return { ...rawVars };
|
|
1563
|
+
const out = { ...rawVars };
|
|
1564
|
+
if (out["--tabbar-active-surface"] === "--scrim-low") {
|
|
1565
|
+
out["--tabbar-active-surface"] = "--tint-low";
|
|
1566
|
+
}
|
|
1567
|
+
return out;
|
|
1568
|
+
}
|
|
1569
|
+
};
|
|
1570
|
+
|
|
1571
|
+
// src/editor/core/themes/migrations/2026-09-01-gate-suffix-enabled.ts
|
|
1572
|
+
var RENAMED4 = {
|
|
1573
|
+
"--card-hover-border-active": "--card-hover-border-enabled",
|
|
1574
|
+
"--card-hover-shadow-active": "--card-hover-shadow-enabled",
|
|
1575
|
+
"--image-zoom-hover": "--image-zoom-enabled",
|
|
1576
|
+
"--image-grow-hover": "--image-grow-enabled"
|
|
1577
|
+
};
|
|
1578
|
+
var componentMigration_2026_09_01_gateSuffixEnabled = {
|
|
1579
|
+
id: "2026-09-01-gate-suffix-enabled",
|
|
1580
|
+
fromVersion: 24,
|
|
1581
|
+
toVersion: 25,
|
|
1582
|
+
appliesTo: "component-config",
|
|
1583
|
+
apply(rawVars) {
|
|
1584
|
+
const out = {};
|
|
1585
|
+
for (const [key, value] of Object.entries(rawVars)) out[RENAMED4[key] ?? key] = value;
|
|
1586
|
+
return out;
|
|
1587
|
+
}
|
|
1588
|
+
};
|
|
1589
|
+
|
|
1490
1590
|
// src/editor/core/themes/migrations/index.ts
|
|
1491
1591
|
var MIGRATIONS = [
|
|
1492
1592
|
colorsAndTypeMigration_2026_04_24_legacyKeysAndBgToCanvas,
|
|
@@ -1514,7 +1614,13 @@ var MIGRATIONS = [
|
|
|
1514
1614
|
componentMigration_2026_05_29_toggleDeriveTrackFromThumb,
|
|
1515
1615
|
colorsAndTypeMigration_2026_08_13_dropLegacyShapeSpaceKeys,
|
|
1516
1616
|
colorsAndTypeMigration_2026_08_15_lineHeightScaleRename,
|
|
1517
|
-
componentMigration_2026_08_15_lineHeightScaleRename
|
|
1617
|
+
componentMigration_2026_08_15_lineHeightScaleRename,
|
|
1618
|
+
colorsAndTypeMigration_2026_09_01_scrimRename,
|
|
1619
|
+
componentMigration_2026_09_01_scrimRename,
|
|
1620
|
+
colorsAndTypeMigration_2026_09_01_tintRename,
|
|
1621
|
+
componentMigration_2026_09_01_tintRename,
|
|
1622
|
+
componentMigration_2026_09_01_tabbarActiveTint,
|
|
1623
|
+
componentMigration_2026_09_01_gateSuffixEnabled
|
|
1518
1624
|
];
|
|
1519
1625
|
function countFor(kind) {
|
|
1520
1626
|
return MIGRATIONS.filter((m) => m.appliesTo === kind).length;
|
|
@@ -1888,7 +1994,7 @@ function synthesizeSectionDividerGradients(stringPart, objectPart) {
|
|
|
1888
1994
|
}
|
|
1889
1995
|
|
|
1890
1996
|
// src/editor/core/themes/themeTypes.ts
|
|
1891
|
-
var THEME_SCHEMA_VERSION =
|
|
1997
|
+
var THEME_SCHEMA_VERSION = 5;
|
|
1892
1998
|
|
|
1893
1999
|
// src/editor/core/components/componentConfigKeys.ts
|
|
1894
2000
|
var KNOWN_COMPONENT_CONFIG_KEYS = /* @__PURE__ */ new Set([
|
|
@@ -2074,15 +2180,15 @@ var hatched_default = {
|
|
|
2074
2180
|
pressureMod: 0.45,
|
|
2075
2181
|
pooling: 0.8,
|
|
2076
2182
|
strokeInk: 1,
|
|
2077
|
-
maskOn:
|
|
2078
|
-
maskBlobX:
|
|
2079
|
-
maskBlobY:
|
|
2080
|
-
maskBlobLinked:
|
|
2081
|
-
maskAngle:
|
|
2082
|
-
maskOutputMin: 0.
|
|
2183
|
+
maskOn: true,
|
|
2184
|
+
maskBlobX: 10,
|
|
2185
|
+
maskBlobY: 600,
|
|
2186
|
+
maskBlobLinked: false,
|
|
2187
|
+
maskAngle: 150,
|
|
2188
|
+
maskOutputMin: 0.35,
|
|
2083
2189
|
maskOutputMax: 1,
|
|
2084
2190
|
maskOctaves: 2,
|
|
2085
|
-
maskGrain: "
|
|
2191
|
+
maskGrain: "turbulence",
|
|
2086
2192
|
maskPosterize: 1,
|
|
2087
2193
|
maskSoftness: 1.5,
|
|
2088
2194
|
jitterX: 1.5,
|
|
@@ -2096,7 +2202,7 @@ var hatched_default = {
|
|
|
2096
2202
|
iconMaskOn: false,
|
|
2097
2203
|
iconMaskScale: 1
|
|
2098
2204
|
},
|
|
2099
|
-
updatedAt: "2026-08-
|
|
2205
|
+
updatedAt: "2026-08-28T21:17:18.232Z",
|
|
2100
2206
|
createdAt: "2026-08-28T15:47:36.934Z"
|
|
2101
2207
|
};
|
|
2102
2208
|
|
|
@@ -2222,11 +2328,11 @@ var dry_default = {
|
|
|
2222
2328
|
pooling: 1.5,
|
|
2223
2329
|
strokeInk: 0.4,
|
|
2224
2330
|
maskOn: true,
|
|
2225
|
-
maskBlobX:
|
|
2226
|
-
maskBlobY:
|
|
2331
|
+
maskBlobX: 170,
|
|
2332
|
+
maskBlobY: 170,
|
|
2227
2333
|
maskBlobLinked: true,
|
|
2228
2334
|
maskAngle: 0,
|
|
2229
|
-
maskOutputMin: 0.
|
|
2335
|
+
maskOutputMin: 0.57,
|
|
2230
2336
|
maskOutputMax: 0.91,
|
|
2231
2337
|
maskOctaves: 2,
|
|
2232
2338
|
maskGrain: "fractal",
|
|
@@ -2243,18 +2349,18 @@ var dry_default = {
|
|
|
2243
2349
|
iconMaskOn: true,
|
|
2244
2350
|
iconMaskScale: 3.8
|
|
2245
2351
|
},
|
|
2246
|
-
updatedAt: "2026-08-
|
|
2352
|
+
updatedAt: "2026-08-28T21:19:51.383Z",
|
|
2247
2353
|
createdAt: "2026-08-28T15:47:36.934Z"
|
|
2248
2354
|
};
|
|
2249
2355
|
|
|
2250
2356
|
// src/editor/core/sketch/sketchStyles.ts
|
|
2251
2357
|
var SHIPPED_FILES = { pencil: pencil_default, marker: marker_default, whiteboard: whiteboard_default, hatched: hatched_default, dashed: dashed_default, napkin: napkin_default, dry: dry_default };
|
|
2252
|
-
var
|
|
2358
|
+
var SHIPPED_SKETCH_SETTINGS = Object.fromEntries(
|
|
2253
2359
|
Object.entries(SHIPPED_FILES).map(([id, file]) => [id, file.settings])
|
|
2254
2360
|
);
|
|
2255
2361
|
var DEFAULT_SKETCH_STYLE = "marker";
|
|
2256
|
-
function
|
|
2257
|
-
const base =
|
|
2362
|
+
function hydrateSketchSettings(raw) {
|
|
2363
|
+
const base = SHIPPED_SKETCH_SETTINGS[DEFAULT_SKETCH_STYLE];
|
|
2258
2364
|
const stored = raw ?? {};
|
|
2259
2365
|
const out = { ...base };
|
|
2260
2366
|
for (const key of Object.keys(base)) {
|
|
@@ -2418,10 +2524,10 @@ function normalizeTheme(raw, resolvers) {
|
|
|
2418
2524
|
}
|
|
2419
2525
|
const componentConfigs = {};
|
|
2420
2526
|
for (const [comp, value] of Object.entries(asObject(src.componentConfigs) ?? {})) {
|
|
2421
|
-
const
|
|
2527
|
+
const embedded2 = asObject(value);
|
|
2422
2528
|
let resolvedConfig;
|
|
2423
|
-
if (
|
|
2424
|
-
resolvedConfig = stripFileMarker(
|
|
2529
|
+
if (embedded2) {
|
|
2530
|
+
resolvedConfig = stripFileMarker(embedded2);
|
|
2425
2531
|
} else {
|
|
2426
2532
|
const configName = asString(value, "default");
|
|
2427
2533
|
const resolved = asObject(resolvers.readComponentConfig(comp, configName));
|
|
@@ -2456,8 +2562,8 @@ function normalizeTheme(raw, resolvers) {
|
|
|
2456
2562
|
if (!(key in baseAliases)) filled.orphans++;
|
|
2457
2563
|
}
|
|
2458
2564
|
}
|
|
2459
|
-
const
|
|
2460
|
-
const
|
|
2565
|
+
const embedded = asObject(src.sketchSettings) ?? asObject(src.sketchStyle);
|
|
2566
|
+
const sketchSettings = embedded ? hydrateSketchSettings(embedded) : void 0;
|
|
2461
2567
|
return {
|
|
2462
2568
|
theme: {
|
|
2463
2569
|
name: asString(src.name, "Untitled"),
|
|
@@ -2467,7 +2573,7 @@ function normalizeTheme(raw, resolvers) {
|
|
|
2467
2573
|
colorsAndType,
|
|
2468
2574
|
componentConfigs,
|
|
2469
2575
|
componentSchemaVersion: CURRENT_COMPONENT_SCHEMA_VERSION,
|
|
2470
|
-
...
|
|
2576
|
+
...sketchSettings ? { sketchSettings } : {}
|
|
2471
2577
|
},
|
|
2472
2578
|
dropped,
|
|
2473
2579
|
migrated,
|
|
@@ -2571,7 +2677,7 @@ function detectLegacyLayout(input) {
|
|
|
2571
2677
|
const manifestsDir = input.configuredManifestsDir ?? import_path3.default.join(input.dataDir, "manifests");
|
|
2572
2678
|
const themesHoldAThemeFile = holdsATheme(input.themesDir);
|
|
2573
2679
|
if (isDirectory(manifestsDir) && !themesHoldAThemeFile) {
|
|
2574
|
-
return { manifestsDir, evidence: `${manifestsDir} is the pre-0.48 whole-
|
|
2680
|
+
return { manifestsDir, evidence: `${manifestsDir} is the pre-0.48 whole-theme directory` };
|
|
2575
2681
|
}
|
|
2576
2682
|
if (jsonFiles(input.colorsAndTypeDir).length > 0) return null;
|
|
2577
2683
|
for (const file of jsonFiles(input.themesDir)) {
|
|
@@ -3092,6 +3198,42 @@ var tokensCssMigration_2026_08_27_editorialLargeSteps = {
|
|
|
3092
3198
|
}
|
|
3093
3199
|
};
|
|
3094
3200
|
|
|
3201
|
+
// vite-plugin/tokensCssMigrations/migrations/2026-09-01-scrim-rename.ts
|
|
3202
|
+
var RENAMES3 = [
|
|
3203
|
+
["--overlay-low", "--scrim-low"],
|
|
3204
|
+
["--overlay-high", "--scrim-high"],
|
|
3205
|
+
["--overlay", "--scrim"]
|
|
3206
|
+
];
|
|
3207
|
+
var tokensCssMigration_2026_09_01_scrimRename = {
|
|
3208
|
+
id: "2026-09-01-scrim-rename",
|
|
3209
|
+
kind: "breaking",
|
|
3210
|
+
description: "Rename --overlay-{low,base,high} to --scrim-*; a scrim dims what is behind it",
|
|
3211
|
+
apply(css) {
|
|
3212
|
+
let out = css;
|
|
3213
|
+
for (const [oldName, newName] of RENAMES3) out = renameToken2(out, oldName, newName);
|
|
3214
|
+
return out;
|
|
3215
|
+
}
|
|
3216
|
+
};
|
|
3217
|
+
|
|
3218
|
+
// vite-plugin/tokensCssMigrations/migrations/2026-09-01-tint-scale.ts
|
|
3219
|
+
var ENTRIES = [
|
|
3220
|
+
{ name: "--tint-low", value: "rgba(255, 255, 255, 0.05)" },
|
|
3221
|
+
{ name: "--tint", value: "rgba(255, 255, 255, 0.1)" },
|
|
3222
|
+
{ name: "--tint-high", value: "rgba(255, 255, 255, 0.15)" }
|
|
3223
|
+
];
|
|
3224
|
+
var tokensCssMigration_2026_09_01_tintScale = {
|
|
3225
|
+
id: "2026-09-01-tint-scale",
|
|
3226
|
+
kind: "additive",
|
|
3227
|
+
description: "Add the --tint-* scale; a tint shades the surface it sits on",
|
|
3228
|
+
apply(css) {
|
|
3229
|
+
return ensureScale(css, {
|
|
3230
|
+
entries: ENTRIES,
|
|
3231
|
+
sectionComment: "Tints \u2014 translucent washes that shade the surface they sit on",
|
|
3232
|
+
anchorPrefixes: ["--scrim", "--overlay"]
|
|
3233
|
+
});
|
|
3234
|
+
}
|
|
3235
|
+
};
|
|
3236
|
+
|
|
3095
3237
|
// vite-plugin/tokensCssMigrations/index.ts
|
|
3096
3238
|
var TOKENS_CSS_MIGRATIONS = [
|
|
3097
3239
|
tokensCssMigration_2026_05_29_typographyScaleAdditions,
|
|
@@ -3106,7 +3248,9 @@ var TOKENS_CSS_MIGRATIONS = [
|
|
|
3106
3248
|
tokensCssMigration_2026_08_26_gradientStops,
|
|
3107
3249
|
tokensCssMigration_2026_08_27_backdropPolarity,
|
|
3108
3250
|
tokensCssMigration_2026_08_27_editorialSizeSteps,
|
|
3109
|
-
tokensCssMigration_2026_08_27_editorialLargeSteps
|
|
3251
|
+
tokensCssMigration_2026_08_27_editorialLargeSteps,
|
|
3252
|
+
tokensCssMigration_2026_09_01_scrimRename,
|
|
3253
|
+
tokensCssMigration_2026_09_01_tintScale
|
|
3110
3254
|
];
|
|
3111
3255
|
function runTokensCssMigrations(css) {
|
|
3112
3256
|
return foldMigrations(css, () => true);
|
|
@@ -3607,7 +3751,7 @@ ${lines.join("\n")}
|
|
|
3607
3751
|
}
|
|
3608
3752
|
function warnOnLegacyLayout(evidence, warn) {
|
|
3609
3753
|
warn(
|
|
3610
|
-
`[live-tokens] This project still uses the data layout from 0.47 and earlier: ${evidence}. Since 0.48 the whole-
|
|
3754
|
+
`[live-tokens] This project still uses the data layout from 0.47 and earlier: ${evidence}. Since 0.48 the whole-theme theme files live in \`themes/\` and the colors and type live in \`colors-and-type/\`. Nothing in the data directory was written, the editor cannot save, and ${import_path4.default.basename(GENERATED_CSS_PATH)} is left exactly as it is. Run \`npx live-tokens migrate\` to move the directories and heal the tree, then restart the dev server.`
|
|
3611
3755
|
);
|
|
3612
3756
|
}
|
|
3613
3757
|
function warnOnUnmigratedSketchStyles(warn) {
|
|
@@ -4364,7 +4508,7 @@ ${lines.join("\n")}
|
|
|
4364
4508
|
filled
|
|
4365
4509
|
});
|
|
4366
4510
|
}
|
|
4367
|
-
async function
|
|
4511
|
+
async function handleAdoptTheme({ res }) {
|
|
4368
4512
|
const activeName = themesResource.getActiveName();
|
|
4369
4513
|
if (activeName === "default") {
|
|
4370
4514
|
jsonResponse(res, 409, {
|
|
@@ -4529,7 +4673,7 @@ ${lines.join("\n")}
|
|
|
4529
4673
|
{ method: "GET", pattern: THEME_BY_NAME_REGEX, handler: handleThemeByName },
|
|
4530
4674
|
{ method: "PUT", pattern: THEME_BY_NAME_REGEX, handler: handleThemeByName },
|
|
4531
4675
|
{ method: "DELETE", pattern: THEME_BY_NAME_REGEX, handler: handleThemeByName },
|
|
4532
|
-
// Production — the whole-
|
|
4676
|
+
// Production — the whole-theme adopt door
|
|
4533
4677
|
{ method: "GET", pattern: SKETCH_STYLES_ROUTE, handler: handleListSketchStyles },
|
|
4534
4678
|
{ method: "PUT", pattern: SKETCH_STYLES_ROUTE, handler: methodNotAllowed },
|
|
4535
4679
|
{ method: "POST", pattern: SKETCH_STYLES_ROUTE, handler: methodNotAllowed },
|
|
@@ -4538,7 +4682,7 @@ ${lines.join("\n")}
|
|
|
4538
4682
|
{ method: "PUT", pattern: SKETCH_STYLE_BY_NAME_REGEX, handler: handleSketchStyleByName },
|
|
4539
4683
|
{ method: "DELETE", pattern: SKETCH_STYLE_BY_NAME_REGEX, handler: handleSketchStyleByName },
|
|
4540
4684
|
{ method: "POST", pattern: SKETCH_STYLE_BY_NAME_REGEX, handler: methodNotAllowed },
|
|
4541
|
-
{ method: "PUT", pattern: PRODUCTION_ROUTE, handler:
|
|
4685
|
+
{ method: "PUT", pattern: PRODUCTION_ROUTE, handler: handleAdoptTheme },
|
|
4542
4686
|
{ method: "GET", pattern: PRODUCTION_ROUTE, handler: methodNotAllowed },
|
|
4543
4687
|
{ method: "POST", pattern: PRODUCTION_ROUTE, handler: methodNotAllowed },
|
|
4544
4688
|
{ method: "DELETE", pattern: PRODUCTION_ROUTE, handler: methodNotAllowed }
|
package/dist-plugin/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Plugin } from 'vite';
|
|
2
2
|
export { ComponentSource, MissingToken, RunResult, TOKENS_CSS_MIGRATIONS, TokensCssMigration, ValidateInput, runTokensCssMigrations, validateTokensCss } from './tokensCssMigrations/index.cjs';
|
|
3
|
-
import './dataPaths-
|
|
3
|
+
import './dataPaths-bJTCEO4H.cjs';
|
|
4
4
|
|
|
5
5
|
interface ThemeFileApiOptions {
|
|
6
6
|
tokensCssPath: string;
|
package/dist-plugin/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Plugin } from 'vite';
|
|
2
2
|
export { ComponentSource, MissingToken, RunResult, TOKENS_CSS_MIGRATIONS, TokensCssMigration, ValidateInput, runTokensCssMigrations, validateTokensCss } from './tokensCssMigrations/index.js';
|
|
3
|
-
import './dataPaths-
|
|
3
|
+
import './dataPaths-bJTCEO4H.js';
|
|
4
4
|
|
|
5
5
|
interface ThemeFileApiOptions {
|
|
6
6
|
tokensCssPath: string;
|
package/dist-plugin/index.js
CHANGED
|
@@ -13,17 +13,17 @@ import {
|
|
|
13
13
|
nextAvailableName,
|
|
14
14
|
normalizeTheme,
|
|
15
15
|
versionedFileResourceServer
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-2YNERPXY.js";
|
|
17
17
|
import {
|
|
18
18
|
CURRENT_COMPONENT_SCHEMA_VERSION
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-GPIBU44G.js";
|
|
20
20
|
import {
|
|
21
21
|
TOKENS_CSS_MIGRATIONS,
|
|
22
22
|
extractGlobalRootBody,
|
|
23
23
|
runAdditiveTokensCssMigrations,
|
|
24
24
|
runTokensCssMigrations,
|
|
25
25
|
validateTokensCss
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-RFVYPNRO.js";
|
|
27
27
|
import {
|
|
28
28
|
hexToOklch,
|
|
29
29
|
oklchToRgb255,
|
|
@@ -620,7 +620,7 @@ ${lines.join("\n")}
|
|
|
620
620
|
}
|
|
621
621
|
function warnOnLegacyLayout(evidence, warn) {
|
|
622
622
|
warn(
|
|
623
|
-
`[live-tokens] This project still uses the data layout from 0.47 and earlier: ${evidence}. Since 0.48 the whole-
|
|
623
|
+
`[live-tokens] This project still uses the data layout from 0.47 and earlier: ${evidence}. Since 0.48 the whole-theme theme files live in \`themes/\` and the colors and type live in \`colors-and-type/\`. Nothing in the data directory was written, the editor cannot save, and ${path.basename(GENERATED_CSS_PATH)} is left exactly as it is. Run \`npx live-tokens migrate\` to move the directories and heal the tree, then restart the dev server.`
|
|
624
624
|
);
|
|
625
625
|
}
|
|
626
626
|
function warnOnUnmigratedSketchStyles(warn) {
|
|
@@ -1377,7 +1377,7 @@ ${lines.join("\n")}
|
|
|
1377
1377
|
filled
|
|
1378
1378
|
});
|
|
1379
1379
|
}
|
|
1380
|
-
async function
|
|
1380
|
+
async function handleAdoptTheme({ res }) {
|
|
1381
1381
|
const activeName = themesResource.getActiveName();
|
|
1382
1382
|
if (activeName === "default") {
|
|
1383
1383
|
jsonResponse(res, 409, {
|
|
@@ -1542,7 +1542,7 @@ ${lines.join("\n")}
|
|
|
1542
1542
|
{ method: "GET", pattern: THEME_BY_NAME_REGEX, handler: handleThemeByName },
|
|
1543
1543
|
{ method: "PUT", pattern: THEME_BY_NAME_REGEX, handler: handleThemeByName },
|
|
1544
1544
|
{ method: "DELETE", pattern: THEME_BY_NAME_REGEX, handler: handleThemeByName },
|
|
1545
|
-
// Production — the whole-
|
|
1545
|
+
// Production — the whole-theme adopt door
|
|
1546
1546
|
{ method: "GET", pattern: SKETCH_STYLES_ROUTE, handler: handleListSketchStyles },
|
|
1547
1547
|
{ method: "PUT", pattern: SKETCH_STYLES_ROUTE, handler: methodNotAllowed },
|
|
1548
1548
|
{ method: "POST", pattern: SKETCH_STYLES_ROUTE, handler: methodNotAllowed },
|
|
@@ -1551,7 +1551,7 @@ ${lines.join("\n")}
|
|
|
1551
1551
|
{ method: "PUT", pattern: SKETCH_STYLE_BY_NAME_REGEX, handler: handleSketchStyleByName },
|
|
1552
1552
|
{ method: "DELETE", pattern: SKETCH_STYLE_BY_NAME_REGEX, handler: handleSketchStyleByName },
|
|
1553
1553
|
{ method: "POST", pattern: SKETCH_STYLE_BY_NAME_REGEX, handler: methodNotAllowed },
|
|
1554
|
-
{ method: "PUT", pattern: PRODUCTION_ROUTE, handler:
|
|
1554
|
+
{ method: "PUT", pattern: PRODUCTION_ROUTE, handler: handleAdoptTheme },
|
|
1555
1555
|
{ method: "GET", pattern: PRODUCTION_ROUTE, handler: methodNotAllowed },
|
|
1556
1556
|
{ method: "POST", pattern: PRODUCTION_ROUTE, handler: methodNotAllowed },
|
|
1557
1557
|
{ method: "DELETE", pattern: PRODUCTION_ROUTE, handler: methodNotAllowed }
|
|
@@ -876,6 +876,106 @@ var componentMigration_2026_08_15_lineHeightScaleRename = {
|
|
|
876
876
|
apply: renameValues
|
|
877
877
|
};
|
|
878
878
|
|
|
879
|
+
// src/editor/core/themes/migrations/2026-09-01-scrim-rename.ts
|
|
880
|
+
var RENAMED2 = {
|
|
881
|
+
"--overlay-low": "--scrim-low",
|
|
882
|
+
"--overlay": "--scrim",
|
|
883
|
+
"--overlay-high": "--scrim-high"
|
|
884
|
+
};
|
|
885
|
+
var RENAMED_COMPONENT_KEYS = {
|
|
886
|
+
"--dialog-overlay-surface": "--dialog-scrim-surface"
|
|
887
|
+
};
|
|
888
|
+
var colorsAndTypeMigration_2026_09_01_scrimRename = {
|
|
889
|
+
id: "2026-09-01-scrim-rename-theme",
|
|
890
|
+
fromVersion: 5,
|
|
891
|
+
toVersion: 6,
|
|
892
|
+
appliesTo: "colors-and-type",
|
|
893
|
+
apply(rawVars) {
|
|
894
|
+
const out = {};
|
|
895
|
+
for (const [key, value] of Object.entries(rawVars)) {
|
|
896
|
+
out[RENAMED2[key] ?? key] = value;
|
|
897
|
+
}
|
|
898
|
+
return out;
|
|
899
|
+
}
|
|
900
|
+
};
|
|
901
|
+
var componentMigration_2026_09_01_scrimRename = {
|
|
902
|
+
id: "2026-09-01-scrim-rename-component",
|
|
903
|
+
fromVersion: 21,
|
|
904
|
+
toVersion: 22,
|
|
905
|
+
appliesTo: "component-config",
|
|
906
|
+
apply(rawVars) {
|
|
907
|
+
const out = {};
|
|
908
|
+
for (const [key, value] of Object.entries(rawVars)) {
|
|
909
|
+
out[RENAMED_COMPONENT_KEYS[key] ?? key] = RENAMED2[value] ?? value;
|
|
910
|
+
}
|
|
911
|
+
return out;
|
|
912
|
+
}
|
|
913
|
+
};
|
|
914
|
+
|
|
915
|
+
// src/editor/core/themes/migrations/2026-09-01-tint-rename.ts
|
|
916
|
+
var RENAMED3 = {
|
|
917
|
+
"--hover-low": "--tint-low",
|
|
918
|
+
"--hover": "--tint",
|
|
919
|
+
"--hover-high": "--tint-high"
|
|
920
|
+
};
|
|
921
|
+
var colorsAndTypeMigration_2026_09_01_tintRename = {
|
|
922
|
+
id: "2026-09-01-tint-rename-theme",
|
|
923
|
+
fromVersion: 6,
|
|
924
|
+
toVersion: 7,
|
|
925
|
+
appliesTo: "colors-and-type",
|
|
926
|
+
apply(rawVars) {
|
|
927
|
+
const out = {};
|
|
928
|
+
for (const [key, value] of Object.entries(rawVars)) out[RENAMED3[key] ?? key] = value;
|
|
929
|
+
return out;
|
|
930
|
+
}
|
|
931
|
+
};
|
|
932
|
+
var componentMigration_2026_09_01_tintRename = {
|
|
933
|
+
id: "2026-09-01-tint-rename-component",
|
|
934
|
+
fromVersion: 22,
|
|
935
|
+
toVersion: 23,
|
|
936
|
+
appliesTo: "component-config",
|
|
937
|
+
apply(rawVars) {
|
|
938
|
+
const out = {};
|
|
939
|
+
for (const [key, value] of Object.entries(rawVars)) out[key] = RENAMED3[value] ?? value;
|
|
940
|
+
return out;
|
|
941
|
+
}
|
|
942
|
+
};
|
|
943
|
+
|
|
944
|
+
// src/editor/core/themes/migrations/2026-09-01-tabbar-active-tint.ts
|
|
945
|
+
var componentMigration_2026_09_01_tabbarActiveTint = {
|
|
946
|
+
id: "2026-09-01-tabbar-active-tint",
|
|
947
|
+
fromVersion: 23,
|
|
948
|
+
toVersion: 24,
|
|
949
|
+
appliesTo: "component-config",
|
|
950
|
+
apply(rawVars, meta) {
|
|
951
|
+
if (meta.component !== "tabbar") return { ...rawVars };
|
|
952
|
+
const out = { ...rawVars };
|
|
953
|
+
if (out["--tabbar-active-surface"] === "--scrim-low") {
|
|
954
|
+
out["--tabbar-active-surface"] = "--tint-low";
|
|
955
|
+
}
|
|
956
|
+
return out;
|
|
957
|
+
}
|
|
958
|
+
};
|
|
959
|
+
|
|
960
|
+
// src/editor/core/themes/migrations/2026-09-01-gate-suffix-enabled.ts
|
|
961
|
+
var RENAMED4 = {
|
|
962
|
+
"--card-hover-border-active": "--card-hover-border-enabled",
|
|
963
|
+
"--card-hover-shadow-active": "--card-hover-shadow-enabled",
|
|
964
|
+
"--image-zoom-hover": "--image-zoom-enabled",
|
|
965
|
+
"--image-grow-hover": "--image-grow-enabled"
|
|
966
|
+
};
|
|
967
|
+
var componentMigration_2026_09_01_gateSuffixEnabled = {
|
|
968
|
+
id: "2026-09-01-gate-suffix-enabled",
|
|
969
|
+
fromVersion: 24,
|
|
970
|
+
toVersion: 25,
|
|
971
|
+
appliesTo: "component-config",
|
|
972
|
+
apply(rawVars) {
|
|
973
|
+
const out = {};
|
|
974
|
+
for (const [key, value] of Object.entries(rawVars)) out[RENAMED4[key] ?? key] = value;
|
|
975
|
+
return out;
|
|
976
|
+
}
|
|
977
|
+
};
|
|
978
|
+
|
|
879
979
|
// src/editor/core/themes/migrations/index.ts
|
|
880
980
|
var MIGRATIONS = [
|
|
881
981
|
colorsAndTypeMigration_2026_04_24_legacyKeysAndBgToCanvas,
|
|
@@ -903,7 +1003,13 @@ var MIGRATIONS = [
|
|
|
903
1003
|
componentMigration_2026_05_29_toggleDeriveTrackFromThumb,
|
|
904
1004
|
colorsAndTypeMigration_2026_08_13_dropLegacyShapeSpaceKeys,
|
|
905
1005
|
colorsAndTypeMigration_2026_08_15_lineHeightScaleRename,
|
|
906
|
-
componentMigration_2026_08_15_lineHeightScaleRename
|
|
1006
|
+
componentMigration_2026_08_15_lineHeightScaleRename,
|
|
1007
|
+
colorsAndTypeMigration_2026_09_01_scrimRename,
|
|
1008
|
+
componentMigration_2026_09_01_scrimRename,
|
|
1009
|
+
colorsAndTypeMigration_2026_09_01_tintRename,
|
|
1010
|
+
componentMigration_2026_09_01_tintRename,
|
|
1011
|
+
componentMigration_2026_09_01_tabbarActiveTint,
|
|
1012
|
+
componentMigration_2026_09_01_gateSuffixEnabled
|
|
907
1013
|
];
|
|
908
1014
|
function countFor(kind) {
|
|
909
1015
|
return MIGRATIONS.filter((m) => m.appliesTo === kind).length;
|
|
@@ -1037,7 +1143,7 @@ function synthesizeSectionDividerGradients(stringPart, objectPart) {
|
|
|
1037
1143
|
}
|
|
1038
1144
|
|
|
1039
1145
|
// src/editor/core/themes/themeTypes.ts
|
|
1040
|
-
var THEME_SCHEMA_VERSION =
|
|
1146
|
+
var THEME_SCHEMA_VERSION = 5;
|
|
1041
1147
|
|
|
1042
1148
|
// src/editor/core/components/componentConfigKeys.ts
|
|
1043
1149
|
var KNOWN_COMPONENT_CONFIG_KEYS = /* @__PURE__ */ new Set([
|
|
@@ -1223,15 +1329,15 @@ var hatched_default = {
|
|
|
1223
1329
|
pressureMod: 0.45,
|
|
1224
1330
|
pooling: 0.8,
|
|
1225
1331
|
strokeInk: 1,
|
|
1226
|
-
maskOn:
|
|
1227
|
-
maskBlobX:
|
|
1228
|
-
maskBlobY:
|
|
1229
|
-
maskBlobLinked:
|
|
1230
|
-
maskAngle:
|
|
1231
|
-
maskOutputMin: 0.
|
|
1332
|
+
maskOn: true,
|
|
1333
|
+
maskBlobX: 10,
|
|
1334
|
+
maskBlobY: 600,
|
|
1335
|
+
maskBlobLinked: false,
|
|
1336
|
+
maskAngle: 150,
|
|
1337
|
+
maskOutputMin: 0.35,
|
|
1232
1338
|
maskOutputMax: 1,
|
|
1233
1339
|
maskOctaves: 2,
|
|
1234
|
-
maskGrain: "
|
|
1340
|
+
maskGrain: "turbulence",
|
|
1235
1341
|
maskPosterize: 1,
|
|
1236
1342
|
maskSoftness: 1.5,
|
|
1237
1343
|
jitterX: 1.5,
|
|
@@ -1245,7 +1351,7 @@ var hatched_default = {
|
|
|
1245
1351
|
iconMaskOn: false,
|
|
1246
1352
|
iconMaskScale: 1
|
|
1247
1353
|
},
|
|
1248
|
-
updatedAt: "2026-08-
|
|
1354
|
+
updatedAt: "2026-08-28T21:17:18.232Z",
|
|
1249
1355
|
createdAt: "2026-08-28T15:47:36.934Z"
|
|
1250
1356
|
};
|
|
1251
1357
|
|
|
@@ -1371,11 +1477,11 @@ var dry_default = {
|
|
|
1371
1477
|
pooling: 1.5,
|
|
1372
1478
|
strokeInk: 0.4,
|
|
1373
1479
|
maskOn: true,
|
|
1374
|
-
maskBlobX:
|
|
1375
|
-
maskBlobY:
|
|
1480
|
+
maskBlobX: 170,
|
|
1481
|
+
maskBlobY: 170,
|
|
1376
1482
|
maskBlobLinked: true,
|
|
1377
1483
|
maskAngle: 0,
|
|
1378
|
-
maskOutputMin: 0.
|
|
1484
|
+
maskOutputMin: 0.57,
|
|
1379
1485
|
maskOutputMax: 0.91,
|
|
1380
1486
|
maskOctaves: 2,
|
|
1381
1487
|
maskGrain: "fractal",
|
|
@@ -1392,18 +1498,18 @@ var dry_default = {
|
|
|
1392
1498
|
iconMaskOn: true,
|
|
1393
1499
|
iconMaskScale: 3.8
|
|
1394
1500
|
},
|
|
1395
|
-
updatedAt: "2026-08-
|
|
1501
|
+
updatedAt: "2026-08-28T21:19:51.383Z",
|
|
1396
1502
|
createdAt: "2026-08-28T15:47:36.934Z"
|
|
1397
1503
|
};
|
|
1398
1504
|
|
|
1399
1505
|
// src/editor/core/sketch/sketchStyles.ts
|
|
1400
1506
|
var SHIPPED_FILES = { pencil: pencil_default, marker: marker_default, whiteboard: whiteboard_default, hatched: hatched_default, dashed: dashed_default, napkin: napkin_default, dry: dry_default };
|
|
1401
|
-
var
|
|
1507
|
+
var SHIPPED_SKETCH_SETTINGS = Object.fromEntries(
|
|
1402
1508
|
Object.entries(SHIPPED_FILES).map(([id, file]) => [id, file.settings])
|
|
1403
1509
|
);
|
|
1404
1510
|
var DEFAULT_SKETCH_STYLE = "marker";
|
|
1405
|
-
function
|
|
1406
|
-
const base =
|
|
1511
|
+
function hydrateSketchSettings(raw) {
|
|
1512
|
+
const base = SHIPPED_SKETCH_SETTINGS[DEFAULT_SKETCH_STYLE];
|
|
1407
1513
|
const stored = raw ?? {};
|
|
1408
1514
|
const out = { ...base };
|
|
1409
1515
|
for (const key of Object.keys(base)) {
|
|
@@ -1567,10 +1673,10 @@ function normalizeTheme(raw, resolvers) {
|
|
|
1567
1673
|
}
|
|
1568
1674
|
const componentConfigs = {};
|
|
1569
1675
|
for (const [comp, value] of Object.entries(asObject(src.componentConfigs) ?? {})) {
|
|
1570
|
-
const
|
|
1676
|
+
const embedded2 = asObject(value);
|
|
1571
1677
|
let resolvedConfig;
|
|
1572
|
-
if (
|
|
1573
|
-
resolvedConfig = stripFileMarker(
|
|
1678
|
+
if (embedded2) {
|
|
1679
|
+
resolvedConfig = stripFileMarker(embedded2);
|
|
1574
1680
|
} else {
|
|
1575
1681
|
const configName = asString(value, "default");
|
|
1576
1682
|
const resolved = asObject(resolvers.readComponentConfig(comp, configName));
|
|
@@ -1605,8 +1711,8 @@ function normalizeTheme(raw, resolvers) {
|
|
|
1605
1711
|
if (!(key in baseAliases)) filled.orphans++;
|
|
1606
1712
|
}
|
|
1607
1713
|
}
|
|
1608
|
-
const
|
|
1609
|
-
const
|
|
1714
|
+
const embedded = asObject(src.sketchSettings) ?? asObject(src.sketchStyle);
|
|
1715
|
+
const sketchSettings = embedded ? hydrateSketchSettings(embedded) : void 0;
|
|
1610
1716
|
return {
|
|
1611
1717
|
theme: {
|
|
1612
1718
|
name: asString(src.name, "Untitled"),
|
|
@@ -1616,7 +1722,7 @@ function normalizeTheme(raw, resolvers) {
|
|
|
1616
1722
|
colorsAndType,
|
|
1617
1723
|
componentConfigs,
|
|
1618
1724
|
componentSchemaVersion: CURRENT_COMPONENT_SCHEMA_VERSION,
|
|
1619
|
-
...
|
|
1725
|
+
...sketchSettings ? { sketchSettings } : {}
|
|
1620
1726
|
},
|
|
1621
1727
|
dropped,
|
|
1622
1728
|
migrated,
|
|
@@ -1671,7 +1777,7 @@ function detectLegacyLayout(input) {
|
|
|
1671
1777
|
const manifestsDir = input.configuredManifestsDir ?? import_path2.default.join(input.dataDir, "manifests");
|
|
1672
1778
|
const themesHoldAThemeFile = holdsATheme(input.themesDir);
|
|
1673
1779
|
if (isDirectory(manifestsDir) && !themesHoldAThemeFile) {
|
|
1674
|
-
return { manifestsDir, evidence: `${manifestsDir} is the pre-0.48 whole-
|
|
1780
|
+
return { manifestsDir, evidence: `${manifestsDir} is the pre-0.48 whole-theme directory` };
|
|
1675
1781
|
}
|
|
1676
1782
|
if (jsonFiles(input.colorsAndTypeDir).length > 0) return null;
|
|
1677
1783
|
for (const file of jsonFiles(input.themesDir)) {
|
|
@@ -1694,12 +1800,12 @@ function planLegacyRenames(layout, input) {
|
|
|
1694
1800
|
const defaultThemes = import_path2.default.join(input.dataDir, "themes");
|
|
1695
1801
|
if (input.configuredManifestsDir && import_path2.default.resolve(input.configuredManifestsDir) !== import_path2.default.join(input.dataDir, "manifests")) {
|
|
1696
1802
|
throw new Error(
|
|
1697
|
-
`This project uses the pre-0.48 data layout (${layout.evidence}), and live-tokens.config.json sets the retired "manifestsDir" key to ${input.configuredManifestsDir}. That directory holds the whole
|
|
1803
|
+
`This project uses the pre-0.48 data layout (${layout.evidence}), and live-tokens.config.json sets the retired "manifestsDir" key to ${input.configuredManifestsDir}. That directory holds the whole themes, which now belong in ${input.themesDir}. Move it there by hand, drop the "manifestsDir" key, then run the migration again.`
|
|
1698
1804
|
);
|
|
1699
1805
|
}
|
|
1700
1806
|
if (import_path2.default.resolve(input.colorsAndTypeDir) !== import_path2.default.resolve(defaultColorsAndType) || import_path2.default.resolve(input.themesDir) !== import_path2.default.resolve(defaultThemes)) {
|
|
1701
1807
|
throw new Error(
|
|
1702
|
-
`This project uses the pre-0.48 data layout (${layout.evidence}), and its data directories are configured to custom paths (colorsAndTypeDir=${input.colorsAndTypeDir}, themesDir=${input.themesDir}). The migration cannot tell which directory holds what. Move the old colors-and-type directory to ${input.colorsAndTypeDir} and the old whole-
|
|
1808
|
+
`This project uses the pre-0.48 data layout (${layout.evidence}), and its data directories are configured to custom paths (colorsAndTypeDir=${input.colorsAndTypeDir}, themesDir=${input.themesDir}). The migration cannot tell which directory holds what. Move the old colors-and-type directory to ${input.colorsAndTypeDir} and the old whole-theme directory to ${input.themesDir} by hand, then run the migration again.`
|
|
1703
1809
|
);
|
|
1704
1810
|
}
|
|
1705
1811
|
const renames = [];
|