@treeseed/core 0.8.9 → 0.8.11
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/components/SiteTitle.astro +2 -2
- package/dist/components/docs/Footer.astro +6 -90
- package/dist/components/docs/Header.astro +9 -2
- package/dist/components/site/RouteNotFound.astro +2 -2
- package/dist/components/ui/shell/AppShell.astro +2 -0
- package/dist/components/ui/shell/PublicFooter.astro +39 -0
- package/dist/components/ui/shell/PublicShell.astro +80 -9
- package/dist/components/ui/shell/TopBar.astro +1 -1
- package/dist/components/ui/theme/ThemeScript.astro +8 -2
- package/dist/dev-watch.d.ts +6 -2
- package/dist/dev-watch.js +12 -3
- package/dist/dev.d.ts +11 -2
- package/dist/dev.js +360 -66
- package/dist/layouts/MainLayout.astro +66 -195
- package/dist/middleware/starlightRouteData.js +20 -14
- package/dist/pages/404.astro +3 -3
- package/dist/pages/[slug].astro +1 -1
- package/dist/pages/books/[slug].astro +5 -5
- package/dist/pages/docs-runtime/[...slug].astro +1 -1
- package/dist/scripts/dev-platform.js +10 -2
- package/dist/site.js +50 -3
- package/dist/styles/app-shell.css +208 -9
- package/dist/styles/global.css +6 -1
- package/dist/utils/color-schemes/cedar.js +53 -0
- package/dist/utils/color-schemes/fern.js +53 -0
- package/dist/utils/color-schemes/index.js +13 -0
- package/dist/utils/color-schemes/lichen.js +53 -0
- package/dist/utils/color-schemes/shared.js +33 -0
- package/dist/utils/color-schemes/tidepool.js +53 -0
- package/dist/utils/starlight-nav.js +13 -7
- package/dist/utils/theme.js +10 -230
- package/package.json +3 -2
package/dist/utils/theme.js
CHANGED
|
@@ -1,236 +1,16 @@
|
|
|
1
|
+
import { BUILT_IN_COLOR_SCHEMES } from "./color-schemes/index.js";
|
|
1
2
|
const DEFAULT_SCHEME = "fern";
|
|
2
3
|
const DEFAULT_MODE = "system";
|
|
3
4
|
const THEME_MODES = /* @__PURE__ */ new Set(["light", "dark", "system"]);
|
|
4
|
-
const BUILT_IN_SCHEME_SUMMARIES =
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
id: "lichen",
|
|
16
|
-
name: "Lichen Stone",
|
|
17
|
-
swatches: ["#6f8b67", "#4e6d49", "#ffffff", "#242923"],
|
|
18
|
-
modeSwatches: {
|
|
19
|
-
light: ["#6f8b67", "#4e6d49", "#ffffff", "#242923"],
|
|
20
|
-
dark: ["#9ab48a", "#c9dbbd", "#1a201d", "#e7ece5"]
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
id: "cedar",
|
|
25
|
-
name: "Cedar Clay",
|
|
26
|
-
swatches: ["#b86b3c", "#7d4528", "#fffdf8", "#2d241c"],
|
|
27
|
-
modeSwatches: {
|
|
28
|
-
light: ["#b86b3c", "#7d4528", "#fffdf8", "#2d241c"],
|
|
29
|
-
dark: ["#d98c5f", "#ffc59c", "#241b16", "#f1e7da"]
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
id: "tidepool",
|
|
34
|
-
name: "Tidepool Dusk",
|
|
35
|
-
swatches: ["#3f8582", "#286462", "#ffffff", "#1d2928"],
|
|
36
|
-
modeSwatches: {
|
|
37
|
-
light: ["#3f8582", "#286462", "#ffffff", "#1d2928"],
|
|
38
|
-
dark: ["#73c5bd", "#b8eee8", "#162123", "#e2eeee"]
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
];
|
|
42
|
-
const BUILT_IN_SCHEMES = {
|
|
43
|
-
fern: {
|
|
44
|
-
light: completeTokens({
|
|
45
|
-
canvas: "#f3f7ef",
|
|
46
|
-
canvasSubtle: "#e8efe1",
|
|
47
|
-
surface: "#ffffff",
|
|
48
|
-
surfaceMuted: "#e8efe1",
|
|
49
|
-
surfaceRaised: "#fafcf7",
|
|
50
|
-
text: "#1f2a20",
|
|
51
|
-
textMuted: "#51604d",
|
|
52
|
-
border: "#cdd8c6",
|
|
53
|
-
borderStrong: "#aebca6",
|
|
54
|
-
accent: "#4f7d4e",
|
|
55
|
-
accentHover: "#3f6f3f",
|
|
56
|
-
accentStrong: "#2f5a35",
|
|
57
|
-
accentSoft: "#dcebd6",
|
|
58
|
-
info: "#3a6f75",
|
|
59
|
-
success: "#287243",
|
|
60
|
-
warning: "#8a6a1f",
|
|
61
|
-
danger: "#a23e35"
|
|
62
|
-
}, "light"),
|
|
63
|
-
dark: completeTokens({
|
|
64
|
-
canvas: "#11170f",
|
|
65
|
-
canvasSubtle: "#172016",
|
|
66
|
-
surface: "#172016",
|
|
67
|
-
surfaceMuted: "#1e2b1b",
|
|
68
|
-
surfaceRaised: "#223020",
|
|
69
|
-
text: "#e8f0e3",
|
|
70
|
-
textMuted: "#a8b6a2",
|
|
71
|
-
border: "#344431",
|
|
72
|
-
borderStrong: "#4d6048",
|
|
73
|
-
accent: "#8bbb75",
|
|
74
|
-
accentHover: "#a9d88e",
|
|
75
|
-
accentStrong: "#b9e69e",
|
|
76
|
-
accentSoft: "#20351f",
|
|
77
|
-
info: "#7db9bd",
|
|
78
|
-
success: "#81c784",
|
|
79
|
-
warning: "#d6b45e",
|
|
80
|
-
danger: "#e07a6f"
|
|
81
|
-
}, "dark")
|
|
82
|
-
},
|
|
83
|
-
lichen: {
|
|
84
|
-
light: completeTokens({
|
|
85
|
-
canvas: "#f4f5f1",
|
|
86
|
-
canvasSubtle: "#e7ebe3",
|
|
87
|
-
surface: "#ffffff",
|
|
88
|
-
surfaceMuted: "#e7ebe3",
|
|
89
|
-
surfaceRaised: "#fbfcf8",
|
|
90
|
-
text: "#242923",
|
|
91
|
-
textMuted: "#596057",
|
|
92
|
-
border: "#d2d8cf",
|
|
93
|
-
borderStrong: "#b7c0b2",
|
|
94
|
-
accent: "#6f8b67",
|
|
95
|
-
accentHover: "#5d7a56",
|
|
96
|
-
accentStrong: "#4e6d49",
|
|
97
|
-
accentSoft: "#e0eadc",
|
|
98
|
-
info: "#607d83",
|
|
99
|
-
success: "#537f54",
|
|
100
|
-
warning: "#8a7140",
|
|
101
|
-
danger: "#9d4c44"
|
|
102
|
-
}, "light"),
|
|
103
|
-
dark: completeTokens({
|
|
104
|
-
canvas: "#121614",
|
|
105
|
-
canvasSubtle: "#1a201d",
|
|
106
|
-
surface: "#1a201d",
|
|
107
|
-
surfaceMuted: "#222a25",
|
|
108
|
-
surfaceRaised: "#27302b",
|
|
109
|
-
text: "#e7ece5",
|
|
110
|
-
textMuted: "#a5aea4",
|
|
111
|
-
border: "#38423c",
|
|
112
|
-
borderStrong: "#515c55",
|
|
113
|
-
accent: "#9ab48a",
|
|
114
|
-
accentHover: "#bdd0ad",
|
|
115
|
-
accentStrong: "#c9dbbd",
|
|
116
|
-
accentSoft: "#243322",
|
|
117
|
-
info: "#8fb1b4",
|
|
118
|
-
success: "#94be8d",
|
|
119
|
-
warning: "#d0b577",
|
|
120
|
-
danger: "#db8579"
|
|
121
|
-
}, "dark")
|
|
122
|
-
},
|
|
123
|
-
cedar: {
|
|
124
|
-
light: completeTokens({
|
|
125
|
-
canvas: "#f8f2e8",
|
|
126
|
-
canvasSubtle: "#efe3d2",
|
|
127
|
-
surface: "#fffdf8",
|
|
128
|
-
surfaceMuted: "#efe3d2",
|
|
129
|
-
surfaceRaised: "#fbf7ef",
|
|
130
|
-
text: "#2d241c",
|
|
131
|
-
textMuted: "#695746",
|
|
132
|
-
border: "#dccdb8",
|
|
133
|
-
borderStrong: "#bea98f",
|
|
134
|
-
accent: "#b86b3c",
|
|
135
|
-
accentHover: "#9a5731",
|
|
136
|
-
accentStrong: "#7d4528",
|
|
137
|
-
accentSoft: "#f1d9c8",
|
|
138
|
-
info: "#557f84",
|
|
139
|
-
success: "#5f7d45",
|
|
140
|
-
warning: "#9a6a21",
|
|
141
|
-
danger: "#a74435"
|
|
142
|
-
}, "light"),
|
|
143
|
-
dark: completeTokens({
|
|
144
|
-
canvas: "#181310",
|
|
145
|
-
canvasSubtle: "#241b16",
|
|
146
|
-
surface: "#241b16",
|
|
147
|
-
surfaceMuted: "#2d2119",
|
|
148
|
-
surfaceRaised: "#33261d",
|
|
149
|
-
text: "#f1e7da",
|
|
150
|
-
textMuted: "#c0ab98",
|
|
151
|
-
border: "#49382b",
|
|
152
|
-
borderStrong: "#655040",
|
|
153
|
-
accent: "#d98c5f",
|
|
154
|
-
accentHover: "#f0b184",
|
|
155
|
-
accentStrong: "#ffc59c",
|
|
156
|
-
accentSoft: "#3a241b",
|
|
157
|
-
info: "#83b0b3",
|
|
158
|
-
success: "#a1bf78",
|
|
159
|
-
warning: "#ddb76b",
|
|
160
|
-
danger: "#e88976"
|
|
161
|
-
}, "dark")
|
|
162
|
-
},
|
|
163
|
-
tidepool: {
|
|
164
|
-
light: completeTokens({
|
|
165
|
-
canvas: "#eff7f5",
|
|
166
|
-
canvasSubtle: "#dfecea",
|
|
167
|
-
surface: "#ffffff",
|
|
168
|
-
surfaceMuted: "#dfecea",
|
|
169
|
-
surfaceRaised: "#f7fbfa",
|
|
170
|
-
text: "#1d2928",
|
|
171
|
-
textMuted: "#4f615f",
|
|
172
|
-
border: "#c9d9d7",
|
|
173
|
-
borderStrong: "#a9bfbc",
|
|
174
|
-
accent: "#3f8582",
|
|
175
|
-
accentHover: "#32726f",
|
|
176
|
-
accentStrong: "#286462",
|
|
177
|
-
accentSoft: "#d5ece9",
|
|
178
|
-
info: "#4c7899",
|
|
179
|
-
success: "#3d7b62",
|
|
180
|
-
warning: "#8b6e2f",
|
|
181
|
-
danger: "#a6453d"
|
|
182
|
-
}, "light"),
|
|
183
|
-
dark: completeTokens({
|
|
184
|
-
canvas: "#0f1718",
|
|
185
|
-
canvasSubtle: "#162123",
|
|
186
|
-
surface: "#162123",
|
|
187
|
-
surfaceMuted: "#1c2b2d",
|
|
188
|
-
surfaceRaised: "#223235",
|
|
189
|
-
text: "#e2eeee",
|
|
190
|
-
textMuted: "#9fb6b6",
|
|
191
|
-
border: "#304649",
|
|
192
|
-
borderStrong: "#496265",
|
|
193
|
-
accent: "#73c5bd",
|
|
194
|
-
accentHover: "#a2e1d9",
|
|
195
|
-
accentStrong: "#b8eee8",
|
|
196
|
-
accentSoft: "#1c3838",
|
|
197
|
-
info: "#8bbce5",
|
|
198
|
-
success: "#7cc6a1",
|
|
199
|
-
warning: "#d3b66a",
|
|
200
|
-
danger: "#e28074"
|
|
201
|
-
}, "dark")
|
|
202
|
-
}
|
|
203
|
-
};
|
|
204
|
-
function completeTokens(tokens, mode) {
|
|
205
|
-
return {
|
|
206
|
-
...tokens,
|
|
207
|
-
surfaceOverlay: mode === "dark" ? "rgba(7, 12, 8, 0.72)" : "rgba(255, 255, 255, 0.88)",
|
|
208
|
-
textSubtle: tokens.textMuted,
|
|
209
|
-
textInverse: mode === "dark" ? "#11170f" : "#ffffff",
|
|
210
|
-
link: tokens.info,
|
|
211
|
-
linkHover: tokens.accentHover,
|
|
212
|
-
borderMuted: tokens.border,
|
|
213
|
-
focus: tokens.info,
|
|
214
|
-
accentText: mode === "dark" ? "#10170f" : "#ffffff",
|
|
215
|
-
infoSoft: mode === "dark" ? colorMix(tokens.info, tokens.canvas, 22) : colorMix(tokens.info, tokens.surface, 18),
|
|
216
|
-
infoText: tokens.info,
|
|
217
|
-
infoBorder: colorMix(tokens.info, tokens.border, mode === "dark" ? 48 : 42),
|
|
218
|
-
successSoft: mode === "dark" ? colorMix(tokens.success, tokens.canvas, 24) : colorMix(tokens.success, tokens.surface, 18),
|
|
219
|
-
successText: tokens.success,
|
|
220
|
-
successBorder: colorMix(tokens.success, tokens.border, mode === "dark" ? 48 : 42),
|
|
221
|
-
warningSoft: mode === "dark" ? colorMix(tokens.warning, tokens.canvas, 24) : colorMix(tokens.warning, tokens.surface, 18),
|
|
222
|
-
warningText: tokens.warning,
|
|
223
|
-
warningBorder: colorMix(tokens.warning, tokens.border, mode === "dark" ? 48 : 42),
|
|
224
|
-
dangerSoft: mode === "dark" ? colorMix(tokens.danger, tokens.canvas, 24) : colorMix(tokens.danger, tokens.surface, 16),
|
|
225
|
-
dangerText: tokens.danger,
|
|
226
|
-
dangerBorder: colorMix(tokens.danger, tokens.border, mode === "dark" ? 48 : 42),
|
|
227
|
-
shadow: mode === "dark" ? "0 16px 36px rgba(0, 0, 0, 0.28)" : "0 1px 2px rgba(31, 35, 40, 0.08)",
|
|
228
|
-
grid: mode === "dark" ? "rgba(160, 180, 150, 0.12)" : "rgba(80, 100, 74, 0.12)"
|
|
229
|
-
};
|
|
230
|
-
}
|
|
231
|
-
function colorMix(first, second, firstPercent) {
|
|
232
|
-
return `color-mix(in srgb, ${first} ${firstPercent}%, ${second})`;
|
|
233
|
-
}
|
|
5
|
+
const BUILT_IN_SCHEME_SUMMARIES = BUILT_IN_COLOR_SCHEMES.map((scheme) => ({
|
|
6
|
+
id: scheme.id,
|
|
7
|
+
name: scheme.name,
|
|
8
|
+
swatches: scheme.swatches,
|
|
9
|
+
modeSwatches: scheme.modeSwatches
|
|
10
|
+
}));
|
|
11
|
+
const BUILT_IN_SCHEMES = Object.fromEntries(
|
|
12
|
+
BUILT_IN_COLOR_SCHEMES.map((scheme) => [scheme.id, scheme.tokens])
|
|
13
|
+
);
|
|
234
14
|
function mergeTokens(base, override) {
|
|
235
15
|
return {
|
|
236
16
|
...base,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@treeseed/core",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.11",
|
|
4
4
|
"description": "Treeseed web framework package for Astro/Starlight site runtimes.",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"repository": {
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"@astrojs/sitemap": "3.7.0",
|
|
71
71
|
"@astrojs/starlight": "0.37.6",
|
|
72
72
|
"@tailwindcss/vite": "^4.1.4",
|
|
73
|
-
"@treeseed/sdk": "0.8.
|
|
73
|
+
"@treeseed/sdk": "0.8.11",
|
|
74
74
|
"astro": "^5.6.1",
|
|
75
75
|
"esbuild": "^0.28.0",
|
|
76
76
|
"katex": "^0.16.22",
|
|
@@ -184,6 +184,7 @@
|
|
|
184
184
|
"./components/ui/layout/PageHeader.astro": "./dist/components/ui/layout/PageHeader.astro",
|
|
185
185
|
"./components/ui/shell/AppShell.astro": "./dist/components/ui/shell/AppShell.astro",
|
|
186
186
|
"./components/ui/shell/PublicShell.astro": "./dist/components/ui/shell/PublicShell.astro",
|
|
187
|
+
"./components/ui/shell/PublicFooter.astro": "./dist/components/ui/shell/PublicFooter.astro",
|
|
187
188
|
"./components/ui/shell/RailNav.astro": "./dist/components/ui/shell/RailNav.astro",
|
|
188
189
|
"./components/ui/shell/BottomNav.astro": "./dist/components/ui/shell/BottomNav.astro",
|
|
189
190
|
"./components/ui/shell/TopBar.astro": "./dist/components/ui/shell/TopBar.astro",
|