@matteoaliano/forest-ui 1.0.0 → 1.1.1
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/bin/sync.mjs +37 -72
- package/dist/{chunk-XJYBU6LC.mjs → chunk-BCOHH5MJ.mjs} +5 -2
- package/dist/chunk-BCOHH5MJ.mjs.map +1 -0
- package/dist/index.d.mts +74 -2
- package/dist/index.d.ts +74 -2
- package/dist/index.js +254 -41
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +258 -50
- package/dist/index.mjs.map +1 -1
- package/dist/theme.js +4 -1
- package/dist/theme.js.map +1 -1
- package/dist/theme.mjs +1 -1
- package/package.json +2 -2
- package/skills/forest-alkemy-plus/SKILL.md +25 -131
- package/skills/forest-alkemy-plus/references/components.md +2 -0
- package/skills/forest-alkemy-plus/references/patterns.md +65 -121
- package/skills/forest-alkemy-plus/references/upgrading.md +6 -25
- package/dist/chunk-XJYBU6LC.mjs.map +0 -1
package/bin/sync.mjs
CHANGED
|
@@ -3,94 +3,59 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* forest-ui sync
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
6
|
+
* DEPRECATED for consumers — documentation + enforcement now ship as a Claude
|
|
7
|
+
* Code plugin. Copying loose skill files is no longer supported because stale
|
|
8
|
+
* copies drift from the plugin's hook.
|
|
9
|
+
*
|
|
10
|
+
* `--internal` (used by the monorepo's `npm run sync`) still propagates the
|
|
11
|
+
* skill source to the dogfood `.claude/skills/` copy and the plugin bundle.
|
|
8
12
|
*/
|
|
9
13
|
|
|
10
|
-
import {
|
|
14
|
+
import { mkdirSync, readdirSync, cpSync } from "node:fs";
|
|
11
15
|
import { resolve, dirname } from "node:path";
|
|
12
16
|
import { fileURLToPath } from "node:url";
|
|
13
17
|
|
|
14
18
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
15
19
|
const skillsDir = resolve(__dirname, "..", "skills");
|
|
16
20
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
while (dir !== dirname(dir)) {
|
|
21
|
-
if (existsSync(resolve(dir, "package.json"))) {
|
|
22
|
-
try {
|
|
23
|
-
const pkg = JSON.parse(readFileSync(resolve(dir, "package.json"), "utf-8"));
|
|
24
|
-
if (pkg.name !== "@matteoaliano/forest-ui") return dir;
|
|
25
|
-
} catch {
|
|
26
|
-
return dir;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
dir = dirname(dir);
|
|
30
|
-
}
|
|
31
|
-
return process.cwd();
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
const projectRoot = findProjectRoot(process.cwd());
|
|
21
|
+
if (!process.argv.includes("--internal")) {
|
|
22
|
+
console.log(`
|
|
23
|
+
🌲 Forest UI — \`sync\` is deprecated
|
|
35
24
|
|
|
36
|
-
|
|
37
|
-
|
|
25
|
+
Skills are now delivered through the Forest Design System Claude Code
|
|
26
|
+
plugin, which also ships design-system enforcement hooks. Install it:
|
|
38
27
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
resolve(projectRoot, ".claude", "forest-ui.md"),
|
|
42
|
-
resolve(projectRoot, ".cursor", "rules", "forest-ui.mdc"),
|
|
43
|
-
resolve(projectRoot, ".gemini", "forest-ui.md"),
|
|
44
|
-
resolve(projectRoot, ".antigravity", "rules.md"),
|
|
45
|
-
];
|
|
28
|
+
/plugin marketplace add Witailer/wtl-design-system-forest
|
|
29
|
+
/plugin install forest-ui@forest-design-system
|
|
46
30
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
rmSync(legacyPath);
|
|
52
|
-
const rel = legacyPath.replace(projectRoot + "/", "");
|
|
53
|
-
console.log(` 🧹 Removed legacy ${rel}`);
|
|
54
|
-
cleaned++;
|
|
55
|
-
} catch (err) {
|
|
56
|
-
const rel = legacyPath.replace(projectRoot + "/", "");
|
|
57
|
-
console.log(` ⚠️ Could not remove ${rel} (${err.message})`);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
31
|
+
No files were copied. If you previously synced, you can delete
|
|
32
|
+
.claude/skills/forest-alkemy-plus/ — the plugin replaces it.
|
|
33
|
+
`);
|
|
34
|
+
process.exit(0);
|
|
60
35
|
}
|
|
61
|
-
if (cleaned > 0) console.log();
|
|
62
36
|
|
|
63
|
-
|
|
64
|
-
|
|
37
|
+
// ── Internal monorepo sync: skills/ → dogfood + plugin bundle ──
|
|
38
|
+
const repoRoot = resolve(__dirname, "..", "..", "..");
|
|
39
|
+
const targets = [
|
|
40
|
+
resolve(repoRoot, ".claude", "skills"),
|
|
41
|
+
resolve(repoRoot, "plugins", "forest-ui", "skills"),
|
|
42
|
+
];
|
|
65
43
|
|
|
66
|
-
|
|
67
|
-
console.log(` ⚠️ No skills directory found, nothing to sync.\n`);
|
|
68
|
-
process.exit(0);
|
|
69
|
-
}
|
|
44
|
+
console.log(`\n🌲 Forest UI — Syncing skills (internal)\n`);
|
|
70
45
|
|
|
71
46
|
const skillFolders = readdirSync(skillsDir, { withFileTypes: true })
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
if (skillFolders.length === 0) {
|
|
76
|
-
console.log(` ⚠️ No skill folders found, nothing to sync.\n`);
|
|
77
|
-
process.exit(0);
|
|
78
|
-
}
|
|
47
|
+
.filter((d) => d.isDirectory())
|
|
48
|
+
.map((d) => d.name);
|
|
79
49
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
for (const folder of skillFolders) {
|
|
83
|
-
const
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
console.log(` ✅ .claude/skills/${folder}/`);
|
|
90
|
-
synced++;
|
|
91
|
-
} catch (err) {
|
|
92
|
-
console.log(` ⚠️ .claude/skills/${folder}/ skipped (${err.message})`);
|
|
93
|
-
}
|
|
50
|
+
let synced = 0;
|
|
51
|
+
for (const target of targets) {
|
|
52
|
+
for (const folder of skillFolders) {
|
|
53
|
+
const dest = resolve(target, folder);
|
|
54
|
+
mkdirSync(dest, { recursive: true });
|
|
55
|
+
cpSync(resolve(skillsDir, folder), dest, { recursive: true });
|
|
56
|
+
console.log(` ✅ ${dest.replace(repoRoot + "/", "")}/`);
|
|
57
|
+
synced++;
|
|
58
|
+
}
|
|
94
59
|
}
|
|
95
60
|
|
|
96
|
-
console.log(`\n Synced ${
|
|
61
|
+
console.log(`\n Synced ${skillFolders.length} skill(s) to ${targets.length} target(s) (${synced} copies).\n`);
|
|
@@ -2051,8 +2051,11 @@ function buildComponents(tokens2) {
|
|
|
2051
2051
|
}
|
|
2052
2052
|
},
|
|
2053
2053
|
staticTooltipLabel: {
|
|
2054
|
+
// Match MuiTooltip: inverted face (charcoal in light, near-white in
|
|
2055
|
+
// dark) with on-solid fg that inverts WITH it. text.white is
|
|
2056
|
+
// mode-invariant and vanished on the dark-mode light face.
|
|
2054
2057
|
backgroundColor: bg4.primarySolid,
|
|
2055
|
-
color:
|
|
2058
|
+
color: buttonColors4.primary.fg,
|
|
2056
2059
|
fontSize: 12,
|
|
2057
2060
|
fontWeight: 600,
|
|
2058
2061
|
borderRadius: radius4.md,
|
|
@@ -3973,4 +3976,4 @@ export {
|
|
|
3973
3976
|
forestTheme,
|
|
3974
3977
|
forestThemeOptions
|
|
3975
3978
|
};
|
|
3976
|
-
//# sourceMappingURL=chunk-
|
|
3979
|
+
//# sourceMappingURL=chunk-BCOHH5MJ.mjs.map
|