rafters 0.0.20 → 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.
Files changed (2) hide show
  1. package/dist/index.js +11 -7
  2. 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
- lightness[positions[i].toString()] = Math.min(MAX_LIGHT, calculatedL);
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
- lightness[positions[i].toString()] = calculatedL;
49221
+ const pos = positions[i];
49222
+ if (pos !== void 0) lightness[pos.toString()] = calculatedL;
49221
49223
  }
49222
49224
  return lightness;
49223
49225
  }
@@ -53678,11 +53680,11 @@ async function studio() {
53678
53680
  console.error('No .rafters/ directory found. Run "rafters init" first.');
53679
53681
  process.exit(1);
53680
53682
  }
53681
- const devStudioPath = join13(__dirname2, "..", "..", "..", "studio");
53682
- const prodStudioPath = join13(__dirname2, "..", "node_modules", "@rafters", "studio");
53683
- const studioPath = existsSync7(devStudioPath) ? devStudioPath : prodStudioPath;
53683
+ const studioPath = join13(__dirname2, "..", "..", "studio");
53684
53684
  if (!existsSync7(studioPath)) {
53685
- console.error("Studio package not found. Please reinstall @rafters/cli.");
53685
+ console.error(
53686
+ "Studio package not found. Install @rafters/studio or run from the rafters monorepo."
53687
+ );
53686
53688
  process.exit(1);
53687
53689
  }
53688
53690
  console.log("Starting Rafters Studio...");
@@ -53695,7 +53697,9 @@ async function studio() {
53695
53697
  env: {
53696
53698
  ...process.env,
53697
53699
  RAFTERS_PROJECT_PATH: cwd,
53698
- 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(" ")
53699
53703
  }
53700
53704
  });
53701
53705
  process.on("SIGINT", () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rafters",
3
- "version": "0.0.20",
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": {