rafters 0.0.21 → 0.0.22
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/dist/index.js +14 -8
- package/package.json +3 -1
package/dist/index.js
CHANGED
|
@@ -49208,7 +49208,8 @@ function generateLightnessProgression(baseLightness) {
|
|
|
49208
49208
|
const totalLighterSteps = baseIndex;
|
|
49209
49209
|
const t2 = (stepsFromBase / totalLighterSteps) ** 0.8;
|
|
49210
49210
|
const calculatedL = baseLightness + (MAX_LIGHT - baseLightness) * t2;
|
|
49211
|
-
|
|
49211
|
+
const pos = positions[i];
|
|
49212
|
+
if (pos !== void 0) lightness[pos.toString()] = Math.min(MAX_LIGHT, calculatedL);
|
|
49212
49213
|
}
|
|
49213
49214
|
lightness["600"] = baseLightness;
|
|
49214
49215
|
for (let i = baseIndex + 1; i < positions.length; i++) {
|
|
@@ -49217,7 +49218,8 @@ function generateLightnessProgression(baseLightness) {
|
|
|
49217
49218
|
const t2 = stepsFromBase / totalDarkerSteps;
|
|
49218
49219
|
const darkenAmount = (baseLightness - MIN_DARK) * t2;
|
|
49219
49220
|
const calculatedL = Math.max(MIN_DARK, baseLightness - darkenAmount);
|
|
49220
|
-
|
|
49221
|
+
const pos = positions[i];
|
|
49222
|
+
if (pos !== void 0) lightness[pos.toString()] = calculatedL;
|
|
49221
49223
|
}
|
|
49222
49224
|
return lightness;
|
|
49223
49225
|
}
|
|
@@ -53678,22 +53680,26 @@ async function studio() {
|
|
|
53678
53680
|
console.error('No .rafters/ directory found. Run "rafters init" first.');
|
|
53679
53681
|
process.exit(1);
|
|
53680
53682
|
}
|
|
53681
|
-
const
|
|
53682
|
-
if (!existsSync7(
|
|
53683
|
-
console.error(
|
|
53683
|
+
const studioPath = join13(__dirname2, "..", "..", "studio");
|
|
53684
|
+
if (!existsSync7(studioPath)) {
|
|
53685
|
+
console.error(
|
|
53686
|
+
"Studio package not found. Install @rafters/studio or run from the rafters monorepo."
|
|
53687
|
+
);
|
|
53684
53688
|
process.exit(1);
|
|
53685
53689
|
}
|
|
53686
|
-
console.log("Starting Rafters Studio
|
|
53690
|
+
console.log("Starting Rafters Studio...");
|
|
53687
53691
|
console.log(`Project: ${cwd}`);
|
|
53688
53692
|
console.log(`Tokens: ${paths.tokens}`);
|
|
53689
53693
|
console.log("");
|
|
53690
53694
|
const subprocess = execa2("pnpm", ["dev"], {
|
|
53691
|
-
cwd:
|
|
53695
|
+
cwd: studioPath,
|
|
53692
53696
|
stdio: "inherit",
|
|
53693
53697
|
env: {
|
|
53694
53698
|
...process.env,
|
|
53695
53699
|
RAFTERS_PROJECT_PATH: cwd,
|
|
53696
|
-
RAFTERS_TOKENS_PATH: paths.tokens
|
|
53700
|
+
RAFTERS_TOKENS_PATH: paths.tokens,
|
|
53701
|
+
// tsx/esm resolves .js imports to .ts files in workspace packages
|
|
53702
|
+
NODE_OPTIONS: [process.env.NODE_OPTIONS, "--import tsx/esm"].filter(Boolean).join(" ")
|
|
53697
53703
|
}
|
|
53698
53704
|
});
|
|
53699
53705
|
process.on("SIGINT", () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rafters",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.22",
|
|
4
4
|
"description": "CLI for Rafters design system - scaffold tokens and add components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -31,10 +31,12 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@antfu/ni": "^28.1.0",
|
|
34
|
+
"@hono/node-server": "^1.19.11",
|
|
34
35
|
"@inquirer/prompts": "^8.2.0",
|
|
35
36
|
"@modelcontextprotocol/sdk": "^1.25.1",
|
|
36
37
|
"commander": "^13.0.0",
|
|
37
38
|
"execa": "^9.6.1",
|
|
39
|
+
"hono": "catalog:",
|
|
38
40
|
"ora": "^9.0.0"
|
|
39
41
|
},
|
|
40
42
|
"devDependencies": {
|