@matteoaliano/forest-ui 0.2.8 → 0.2.10
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/stamp-version.mjs +53 -0
- package/bin/sync.mjs +8 -1
- package/dist/{chunk-3FZJFTY7.mjs → chunk-7B6NCKX3.mjs} +144 -26
- package/dist/chunk-7B6NCKX3.mjs.map +1 -0
- package/dist/{index-C7JP9vAZ.d.mts → index-DiI9xbOM.d.mts} +61 -11
- package/dist/{index-C7JP9vAZ.d.ts → index-DiI9xbOM.d.ts} +61 -11
- package/dist/index.d.mts +89 -2
- package/dist/index.d.ts +89 -2
- package/dist/index.js +742 -32
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +589 -10
- package/dist/index.mjs.map +1 -1
- package/dist/theme.d.mts +1 -1
- package/dist/theme.d.ts +1 -1
- package/dist/theme.js +142 -24
- package/dist/theme.js.map +1 -1
- package/dist/theme.mjs +1 -1
- package/guidelines/FOREST_AI_GUIDELINES.md +1 -1
- package/guidelines/FOREST_DEV_GUIDELINES.md +1 -1
- package/guidelines/themes/FOREST_THEME_ALKEMY_PLUS.md +1 -1
- package/guidelines/themes/FOREST_THEME_DEFAULT.md +1 -1
- package/package.json +11 -6
- package/dist/chunk-3FZJFTY7.mjs.map +0 -1
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Stamps the current package version into all guideline .md files.
|
|
5
|
+
* Replaces lines matching `> **forest-ui v*.**` with the version from package.json.
|
|
6
|
+
*
|
|
7
|
+
* Run automatically before sync and publish via npm scripts.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { readFileSync, writeFileSync, readdirSync, existsSync } from "node:fs";
|
|
11
|
+
import { resolve, dirname } from "node:path";
|
|
12
|
+
import { fileURLToPath } from "node:url";
|
|
13
|
+
|
|
14
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
15
|
+
const pkgPath = resolve(__dirname, "..", "package.json");
|
|
16
|
+
const version = JSON.parse(readFileSync(pkgPath, "utf-8")).version;
|
|
17
|
+
|
|
18
|
+
const guidelinesDir = resolve(__dirname, "..", "guidelines");
|
|
19
|
+
const themesDir = resolve(guidelinesDir, "themes");
|
|
20
|
+
|
|
21
|
+
const versionRe = />\s*\*\*forest-ui v[^*]*\*\*/;
|
|
22
|
+
const replacement = `> **forest-ui v${version}**`;
|
|
23
|
+
|
|
24
|
+
function stampFile(filePath) {
|
|
25
|
+
const content = readFileSync(filePath, "utf-8");
|
|
26
|
+
if (!versionRe.test(content)) return false;
|
|
27
|
+
const updated = content.replace(versionRe, replacement);
|
|
28
|
+
if (updated === content) return false;
|
|
29
|
+
writeFileSync(filePath, updated, "utf-8");
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
let stamped = 0;
|
|
34
|
+
|
|
35
|
+
// Stamp top-level guideline files
|
|
36
|
+
for (const f of readdirSync(guidelinesDir)) {
|
|
37
|
+
if (!f.endsWith(".md")) continue;
|
|
38
|
+
if (stampFile(resolve(guidelinesDir, f))) stamped++;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// Stamp theme files
|
|
42
|
+
if (existsSync(themesDir)) {
|
|
43
|
+
for (const f of readdirSync(themesDir)) {
|
|
44
|
+
if (!f.endsWith(".md")) continue;
|
|
45
|
+
if (stampFile(resolve(themesDir, f))) stamped++;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (stamped > 0) {
|
|
50
|
+
console.log(` Stamped v${version} into ${stamped} guideline file(s)`);
|
|
51
|
+
} else {
|
|
52
|
+
console.log(` All guideline files already at v${version}`);
|
|
53
|
+
}
|
package/bin/sync.mjs
CHANGED
|
@@ -26,6 +26,9 @@ import { fileURLToPath } from "node:url";
|
|
|
26
26
|
const __filename = fileURLToPath(import.meta.url);
|
|
27
27
|
const __dirname = dirname(__filename);
|
|
28
28
|
|
|
29
|
+
const pkgPath = resolve(__dirname, "..", "package.json");
|
|
30
|
+
const pkgVersion = JSON.parse(readFileSync(pkgPath, "utf-8")).version;
|
|
31
|
+
|
|
29
32
|
const guidelinesDir = resolve(__dirname, "..", "guidelines");
|
|
30
33
|
const themesDir = resolve(guidelinesDir, "themes");
|
|
31
34
|
|
|
@@ -102,7 +105,11 @@ for (const entry of entries) {
|
|
|
102
105
|
continue;
|
|
103
106
|
}
|
|
104
107
|
|
|
105
|
-
const
|
|
108
|
+
const raw = readFileSync(entry.source, "utf-8");
|
|
109
|
+
const content = raw.replace(
|
|
110
|
+
/>\s*\*\*forest-ui v[^*]*\*\*/,
|
|
111
|
+
`> **forest-ui v${pkgVersion}**`,
|
|
112
|
+
);
|
|
106
113
|
|
|
107
114
|
// Claude Code target
|
|
108
115
|
const claudeDir = resolve(projectRoot, ".claude");
|
|
@@ -92,6 +92,54 @@ var colors = {
|
|
|
92
92
|
800: "#1849a9",
|
|
93
93
|
900: "#194185",
|
|
94
94
|
950: "#102a56"
|
|
95
|
+
},
|
|
96
|
+
teal: {
|
|
97
|
+
100: "#ccfbef",
|
|
98
|
+
200: "#99f6e0",
|
|
99
|
+
600: "#0e9384",
|
|
100
|
+
700: "#107569"
|
|
101
|
+
},
|
|
102
|
+
orange: {
|
|
103
|
+
100: "#fdead7",
|
|
104
|
+
200: "#f9dbaf",
|
|
105
|
+
600: "#e04f16",
|
|
106
|
+
700: "#b93815"
|
|
107
|
+
},
|
|
108
|
+
purple: {
|
|
109
|
+
100: "#ebe9fe",
|
|
110
|
+
200: "#d9d6fe",
|
|
111
|
+
600: "#6938ef",
|
|
112
|
+
700: "#5925dc"
|
|
113
|
+
},
|
|
114
|
+
pink: {
|
|
115
|
+
100: "#fce7f6",
|
|
116
|
+
200: "#fcceee",
|
|
117
|
+
600: "#dd2590",
|
|
118
|
+
700: "#c11574"
|
|
119
|
+
},
|
|
120
|
+
fuchsia: {
|
|
121
|
+
100: "#fbe8ff",
|
|
122
|
+
200: "#f6d0fe",
|
|
123
|
+
600: "#ba24d5",
|
|
124
|
+
700: "#9f1ab1"
|
|
125
|
+
},
|
|
126
|
+
orangeDark: {
|
|
127
|
+
100: "#ffe6d5",
|
|
128
|
+
200: "#ffd6ae",
|
|
129
|
+
600: "#e62e05",
|
|
130
|
+
700: "#bc1b06"
|
|
131
|
+
},
|
|
132
|
+
green: {
|
|
133
|
+
100: "#d3f8df",
|
|
134
|
+
200: "#aaf0c4",
|
|
135
|
+
600: "#099250",
|
|
136
|
+
700: "#087443"
|
|
137
|
+
},
|
|
138
|
+
indigo: {
|
|
139
|
+
100: "#e0eaff",
|
|
140
|
+
200: "#c7d7fe",
|
|
141
|
+
600: "#444ce7",
|
|
142
|
+
700: "#3538cd"
|
|
95
143
|
}
|
|
96
144
|
};
|
|
97
145
|
var spacing = {
|
|
@@ -229,7 +277,7 @@ var bg = {
|
|
|
229
277
|
secondarySolid: colors.gray[600],
|
|
230
278
|
tertiary: colors.gray[100],
|
|
231
279
|
quaternary: colors.gray[200],
|
|
232
|
-
active: colors.gray[
|
|
280
|
+
active: colors.gray[200],
|
|
233
281
|
disabled: colors.gray[100],
|
|
234
282
|
disabledSubtle: colors.gray[50],
|
|
235
283
|
overlay: colors.gray[950],
|
|
@@ -376,7 +424,7 @@ var iconColors = {
|
|
|
376
424
|
};
|
|
377
425
|
var navColors = {
|
|
378
426
|
itemIconFg: colors.gray[500],
|
|
379
|
-
itemIconFgActive: colors.gray[
|
|
427
|
+
itemIconFgActive: colors.gray[700],
|
|
380
428
|
itemButtonIconFg: colors.gray[500],
|
|
381
429
|
itemButtonIconFgActive: colors.gray[700]
|
|
382
430
|
};
|
|
@@ -397,15 +445,33 @@ var chartColors = {
|
|
|
397
445
|
tooltipBg: colors.gray[950],
|
|
398
446
|
tooltipFg: colors.base.white,
|
|
399
447
|
crosshairFg: colors.gray[500],
|
|
400
|
-
legendFg:
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
448
|
+
legendFg: text.tertiary,
|
|
449
|
+
categorical: [
|
|
450
|
+
"#7B61FF",
|
|
451
|
+
"#FF7E67",
|
|
452
|
+
"#76DFD5",
|
|
453
|
+
"#F6C343",
|
|
454
|
+
"#B36A6F",
|
|
455
|
+
"#71BCF6",
|
|
456
|
+
"#FFB076",
|
|
457
|
+
"#11819D",
|
|
458
|
+
"#3CB371",
|
|
459
|
+
"#FFBCAE",
|
|
460
|
+
"#C87EED",
|
|
461
|
+
"#76C5AF"
|
|
462
|
+
],
|
|
463
|
+
vibrant: [
|
|
464
|
+
"#6B38FB",
|
|
465
|
+
// 1. Deep Purple
|
|
466
|
+
"#E85B22",
|
|
467
|
+
// 2. Deep Orange
|
|
468
|
+
"#4AABFF",
|
|
469
|
+
// 3. Bright Blue
|
|
470
|
+
"#E83B1A",
|
|
471
|
+
// 4. True Red
|
|
472
|
+
"#E02088"
|
|
473
|
+
// 5. Magenta
|
|
474
|
+
]
|
|
409
475
|
};
|
|
410
476
|
var alpha = {
|
|
411
477
|
white: {
|
|
@@ -436,6 +502,7 @@ var alpha = {
|
|
|
436
502
|
|
|
437
503
|
// src/theme/palette.ts
|
|
438
504
|
function buildPalette(tokens) {
|
|
505
|
+
var _a;
|
|
439
506
|
const { colors: colors3, text: text3, bg: bg3, fg: fg3, border: border3 } = tokens;
|
|
440
507
|
return {
|
|
441
508
|
primary: {
|
|
@@ -490,7 +557,8 @@ function buildPalette(tokens) {
|
|
|
490
557
|
selected: bg3.brandPrimary,
|
|
491
558
|
disabled: fg3.disabled,
|
|
492
559
|
disabledBackground: bg3.disabled
|
|
493
|
-
}
|
|
560
|
+
},
|
|
561
|
+
chart: (_a = tokens.chartColors) != null ? _a : chartColors
|
|
494
562
|
};
|
|
495
563
|
}
|
|
496
564
|
var palette = buildPalette({
|
|
@@ -498,7 +566,8 @@ var palette = buildPalette({
|
|
|
498
566
|
text,
|
|
499
567
|
bg,
|
|
500
568
|
fg,
|
|
501
|
-
border
|
|
569
|
+
border,
|
|
570
|
+
chartColors
|
|
502
571
|
});
|
|
503
572
|
|
|
504
573
|
// src/theme/typography.ts
|
|
@@ -1019,6 +1088,15 @@ function buildComponents(tokens) {
|
|
|
1019
1088
|
}
|
|
1020
1089
|
}
|
|
1021
1090
|
},
|
|
1091
|
+
// ─── Drawer (used by Sidebar) ─────────────────────────────────
|
|
1092
|
+
MuiDrawer: {
|
|
1093
|
+
styleOverrides: {
|
|
1094
|
+
paper: {
|
|
1095
|
+
backgroundColor: bg3.primary,
|
|
1096
|
+
borderRight: `1px solid ${border3.secondary}`
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
1099
|
+
},
|
|
1022
1100
|
// ─── Card ───────────────────────────────────────────────────────
|
|
1023
1101
|
MuiCard: {
|
|
1024
1102
|
defaultProps: {
|
|
@@ -1809,7 +1887,6 @@ var forestPreset = {
|
|
|
1809
1887
|
// src/theme/presets/alkemy-plus.ts
|
|
1810
1888
|
var red = {
|
|
1811
1889
|
50: "#fef2f2",
|
|
1812
|
-
100: "#fee2e2",
|
|
1813
1890
|
200: "#fecaca",
|
|
1814
1891
|
600: "#dc2626",
|
|
1815
1892
|
700: "#b91c1c",
|
|
@@ -1871,7 +1948,15 @@ var colors2 = {
|
|
|
1871
1948
|
/** Success — forest defaults (standard UX green) */
|
|
1872
1949
|
success: colors.success,
|
|
1873
1950
|
/** Blue (info) — forest defaults (standard UX) */
|
|
1874
|
-
blue: colors.blue
|
|
1951
|
+
blue: colors.blue,
|
|
1952
|
+
teal: colors.teal,
|
|
1953
|
+
orange: colors.orange,
|
|
1954
|
+
purple: colors.purple,
|
|
1955
|
+
pink: colors.pink,
|
|
1956
|
+
fuchsia: colors.fuchsia,
|
|
1957
|
+
orangeDark: colors.orangeDark,
|
|
1958
|
+
green: colors.green,
|
|
1959
|
+
indigo: colors.indigo
|
|
1875
1960
|
};
|
|
1876
1961
|
var radius2 = {
|
|
1877
1962
|
...radius,
|
|
@@ -2091,15 +2176,48 @@ var chartColors2 = {
|
|
|
2091
2176
|
tooltipBg: colors2.gray[950],
|
|
2092
2177
|
tooltipFg: colors2.base.white,
|
|
2093
2178
|
crosshairFg: colors2.gray[500],
|
|
2094
|
-
legendFg:
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2179
|
+
legendFg: text2.tertiary,
|
|
2180
|
+
categorical: [
|
|
2181
|
+
"#7B61FF",
|
|
2182
|
+
"#FF7E67",
|
|
2183
|
+
"#76DFD5",
|
|
2184
|
+
"#F6C343",
|
|
2185
|
+
"#B36A6F",
|
|
2186
|
+
"#71BCF6",
|
|
2187
|
+
"#FFB076",
|
|
2188
|
+
"#11819D",
|
|
2189
|
+
"#3CB371",
|
|
2190
|
+
"#FFBCAE",
|
|
2191
|
+
"#C87EED",
|
|
2192
|
+
"#76C5AF"
|
|
2193
|
+
],
|
|
2194
|
+
vibrant: [
|
|
2195
|
+
"#6B38FB",
|
|
2196
|
+
"#E85B22",
|
|
2197
|
+
"#4AABFF",
|
|
2198
|
+
"#E83B1A",
|
|
2199
|
+
"#E02088"
|
|
2200
|
+
],
|
|
2201
|
+
series6Fg: colors2.brand[400],
|
|
2202
|
+
series6FgHover: colors2.brand[500],
|
|
2203
|
+
series6Bg: colors2.brand[100],
|
|
2204
|
+
series6BgHover: colors2.brand[200],
|
|
2205
|
+
series7Fg: colors2.fuchsia[600],
|
|
2206
|
+
series7FgHover: colors2.fuchsia[700],
|
|
2207
|
+
series7Bg: colors2.fuchsia[100],
|
|
2208
|
+
series7BgHover: colors2.fuchsia[200],
|
|
2209
|
+
series8Fg: colors2.teal[600],
|
|
2210
|
+
series8FgHover: colors2.teal[700],
|
|
2211
|
+
series8Bg: colors2.teal[100],
|
|
2212
|
+
series8BgHover: colors2.teal[200],
|
|
2213
|
+
series9Fg: colors2.indigo[600],
|
|
2214
|
+
series9FgHover: colors2.indigo[700],
|
|
2215
|
+
series9Bg: colors2.indigo[100],
|
|
2216
|
+
series9BgHover: colors2.indigo[200],
|
|
2217
|
+
series10Fg: colors2.green[600],
|
|
2218
|
+
series10FgHover: colors2.green[700],
|
|
2219
|
+
series10Bg: colors2.green[100],
|
|
2220
|
+
series10BgHover: colors2.green[200]
|
|
2103
2221
|
};
|
|
2104
2222
|
var focusRings2 = {
|
|
2105
2223
|
brand: "0px 0px 0px 4px #f040403d",
|
|
@@ -2174,5 +2292,5 @@ var forestThemeOptions = {
|
|
|
2174
2292
|
var forestTheme = createTheme(forestThemeOptions);
|
|
2175
2293
|
|
|
2176
2294
|
export { alkemyPlusPreset, alpha, avatarColors, bg, border, breadcrumbColors, buildTheme, buildThemeOptions, buttonColors, chartColors, colors, components, container, display, fg, focusRings, fontFamily, fontSize, fontWeight, forestPreset, forestTheme, forestThemeOptions, getAvailablePresets, getPreset, iconColors, lineHeight, navColors, palette, radius, registerPreset, shadows, shadows2, sliderColors, spacing, text, toggleColors, typography, widths };
|
|
2177
|
-
//# sourceMappingURL=chunk-
|
|
2178
|
-
//# sourceMappingURL=chunk-
|
|
2295
|
+
//# sourceMappingURL=chunk-7B6NCKX3.mjs.map
|
|
2296
|
+
//# sourceMappingURL=chunk-7B6NCKX3.mjs.map
|