@yuhuanowo/yunui 0.2.17 → 0.2.18
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/README.md +3 -1
- package/README.zh-CN.md +5 -1
- package/README.zh-TW.md +5 -1
- package/dist/ai.d.ts +99 -3
- package/dist/ai.js +212 -104
- package/dist/ai.js.map +1 -1
- package/dist/chat.d.ts +10 -3
- package/dist/chat.js +12 -7
- package/dist/chat.js.map +1 -1
- package/dist/{chunk-HH3JBHRP.js → chunk-AFVENY4D.js} +286 -31
- package/dist/chunk-AFVENY4D.js.map +1 -0
- package/dist/{chunk-F2HG4TOQ.js → chunk-GAXVET76.js} +13 -19
- package/dist/chunk-GAXVET76.js.map +1 -0
- package/dist/{chunk-DDUP7GAX.js → chunk-LEBQPP4B.js} +69 -3
- package/dist/chunk-LEBQPP4B.js.map +1 -0
- package/dist/chunk-ST6TSBVQ.js +208 -0
- package/dist/chunk-ST6TSBVQ.js.map +1 -0
- package/dist/chunk-V7VJKZ5Q.js +254 -0
- package/dist/chunk-V7VJKZ5Q.js.map +1 -0
- package/dist/{chunk-BCOKFWXC.js → chunk-YKWRCA2S.js} +80 -156
- package/dist/chunk-YKWRCA2S.js.map +1 -0
- package/dist/content.d.ts +10 -2
- package/dist/content.js +50 -40
- package/dist/content.js.map +1 -1
- package/dist/index.d.ts +266 -16
- package/dist/index.js +4 -4
- package/dist/patterns.d.ts +471 -22
- package/dist/patterns.js +783 -131
- package/dist/patterns.js.map +1 -1
- package/icons/providers/gmi.svg +5 -0
- package/package.json +3 -4
- package/styles/content.css +3 -1
- package/styles/yunui.css +197 -84
- package/dist/chunk-BCOKFWXC.js.map +0 -1
- package/dist/chunk-DDUP7GAX.js.map +0 -1
- package/dist/chunk-F2HG4TOQ.js.map +0 -1
- package/dist/chunk-HH3JBHRP.js.map +0 -1
- package/dist/chunk-N4QO7RN5.js +0 -98
- package/dist/chunk-N4QO7RN5.js.map +0 -1
- package/dist/chunk-QEIBYOG2.js +0 -188
- package/dist/chunk-QEIBYOG2.js.map +0 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" role="img" aria-label="GMI Cloud">
|
|
2
|
+
<rect width="256" height="256" rx="48" fill="#050505"/>
|
|
3
|
+
<path fill="#fff" d="M108 80h40a6 6 0 0 1 6 6v8a6 6 0 0 1-6 6h-20v18h-20a6 6 0 0 0-6 6v8a6 6 0 0 0 6 6h20v18h20a6 6 0 0 1 6 6v8a6 6 0 0 1-6 6h-40a6 6 0 0 1-6-6v-13H82a6 6 0 0 1-6-6v-13H57a6 6 0 0 1-6-6v-8a6 6 0 0 1 6-6h19v-13a6 6 0 0 1 6-6h20V86a6 6 0 0 1 6-6Z"/>
|
|
4
|
+
<path fill="#fff" d="M160 118h39a6 6 0 0 1 6 6v8a6 6 0 0 1-6 6h-20v13a6 6 0 0 1-6 6h-13a6 6 0 0 1-6-6v-27a6 6 0 0 1 6-6Z"/>
|
|
5
|
+
</svg>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yuhuanowo/yunui",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.18",
|
|
4
4
|
"description": "A versioned React 19 + Tailwind v4 design system — tokens, primitives, patterns, and AI components, in one package.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -128,13 +128,11 @@
|
|
|
128
128
|
"@radix-ui/react-dialog": "1.1.23",
|
|
129
129
|
"@radix-ui/react-dropdown-menu": "2.1.24",
|
|
130
130
|
"@radix-ui/react-popover": "1.1.23",
|
|
131
|
-
"@radix-ui/react-presence": "1.1.10",
|
|
132
131
|
"@radix-ui/react-progress": "1.1.16",
|
|
133
132
|
"@radix-ui/react-radio-group": "^1.4.7",
|
|
134
133
|
"@radix-ui/react-scroll-area": "^1.2.18",
|
|
135
134
|
"@radix-ui/react-select": "2.3.7",
|
|
136
135
|
"@radix-ui/react-slider": "1.4.7",
|
|
137
|
-
"@radix-ui/react-switch": "1.3.7",
|
|
138
136
|
"@radix-ui/react-tabs": "1.1.21",
|
|
139
137
|
"@radix-ui/react-tooltip": "1.2.16",
|
|
140
138
|
"class-variance-authority": "0.7.1",
|
|
@@ -143,7 +141,8 @@
|
|
|
143
141
|
"lucide-react": "1.28.0",
|
|
144
142
|
"next-themes": "0.4.6",
|
|
145
143
|
"sonner": "2.0.7",
|
|
146
|
-
"tailwind-merge": "3.6.0"
|
|
144
|
+
"tailwind-merge": "3.6.0",
|
|
145
|
+
"tw-animate-css": "^1.4.0"
|
|
147
146
|
},
|
|
148
147
|
"devDependencies": {
|
|
149
148
|
"@lobehub/icons-static-avatar": "^1.13.0",
|
package/styles/content.css
CHANGED
|
@@ -12,7 +12,9 @@
|
|
|
12
12
|
* container's left padding; `code` is sized to its widest line (below) so this
|
|
13
13
|
* background spans the whole line even when the block scrolls horizontally. */
|
|
14
14
|
.highlighted-line {
|
|
15
|
-
|
|
15
|
+
/* Keep syntax tokens above AA on the tinted canvas (12% put red at 4.17:1
|
|
16
|
+
* in light mode). The solid leading rail still marks the highlighted line. */
|
|
17
|
+
background-color: color-mix(in oklab, var(--accent, #6366f1) 4%, transparent);
|
|
16
18
|
border-left: 3px solid var(--accent, #6366f1);
|
|
17
19
|
margin-left: -16px;
|
|
18
20
|
padding-left: 13px;
|
package/styles/yunui.css
CHANGED
|
@@ -15,6 +15,16 @@
|
|
|
15
15
|
so the default look is unchanged. See styles/tokens.css. */
|
|
16
16
|
@import "./tokens.css";
|
|
17
17
|
|
|
18
|
+
/* Enter/exit animation utilities (`animate-in`, `fade-in-0`, `zoom-in-95`,
|
|
19
|
+
`slide-in-from-top-2`, …). These come from the `tailwindcss-animate` plugin,
|
|
20
|
+
which is Tailwind v3-only — under v4 every one of those classes silently
|
|
21
|
+
compiled to NOTHING, so every dropdown, popover, dialog, sheet, tooltip and
|
|
22
|
+
menu in YunUI (and in the apps consuming it) snapped open with no transition.
|
|
23
|
+
`tw-animate-css` is the v4 successor and is API-compatible. It is a plain
|
|
24
|
+
stylesheet, not a JS plugin, and ships as a dependency so the bare specifier
|
|
25
|
+
resolves from this file for consumers too. */
|
|
26
|
+
@import "tw-animate-css";
|
|
27
|
+
|
|
18
28
|
@theme {
|
|
19
29
|
--color-border: var(--border-default);
|
|
20
30
|
--color-input: var(--border-default);
|
|
@@ -53,6 +63,7 @@
|
|
|
53
63
|
/* Marquee animations — generate the .animate-marquee / .animate-marquee-vertical
|
|
54
64
|
utilities the <Marquee> component relies on. Duration/gap are overridable
|
|
55
65
|
per-instance via the --duration / --gap CSS vars set on the component. */
|
|
66
|
+
--animate-shimmer: shimmer 3s linear infinite;
|
|
56
67
|
--animate-marquee: marquee var(--duration, 40s) linear infinite;
|
|
57
68
|
--animate-marquee-vertical: marquee-vertical var(--duration, 40s) linear infinite;
|
|
58
69
|
}
|
|
@@ -64,6 +75,62 @@
|
|
|
64
75
|
`utilities` layer) can override them via className — e.g. a `bg-accent`
|
|
65
76
|
passed to a `.btn-ghost` now wins. `@theme` and `@custom-variant` above stay
|
|
66
77
|
at the top level (they cannot live inside a layer). */
|
|
78
|
+
/* ---------------------------------------------------------------------------
|
|
79
|
+
Semantic colour helpers — declared with `@utility`, NOT as plain rules in
|
|
80
|
+
`@layer components`.
|
|
81
|
+
|
|
82
|
+
Why it matters: a hand-written `.bg-error-soft` inside @layer components is
|
|
83
|
+
invisible to Tailwind's variant machinery, so `hover:bg-error-soft`,
|
|
84
|
+
`dark:text-error`, `data-[state=open]:bg-accent-muted` and friends compiled
|
|
85
|
+
to NOTHING — silently. That killed the hover state on every banner dismiss
|
|
86
|
+
button, session/account row delete button and notification action in the
|
|
87
|
+
library. `@utility` registers them for real, so every variant works.
|
|
88
|
+
|
|
89
|
+
These are deliberately NOT `@theme` colours: `bg-*-soft` is a 10% tint while
|
|
90
|
+
`border-*-soft` is 30%, so a single `--color-*-soft` entry could not express
|
|
91
|
+
both without changing the existing borders.
|
|
92
|
+
--------------------------------------------------------------------------- */
|
|
93
|
+
|
|
94
|
+
/* Semantic status text — canonical target for inline status colour, so
|
|
95
|
+
components stop hand-rolling `text-emerald-600 dark:text-emerald-400`. */
|
|
96
|
+
@utility text-success { color: var(--success); }
|
|
97
|
+
@utility text-warning { color: var(--warning); }
|
|
98
|
+
@utility text-error { color: var(--error); }
|
|
99
|
+
@utility text-info { color: var(--info); }
|
|
100
|
+
|
|
101
|
+
/* Soft semantic-colour backgrounds — the themeable counterpart to the .text-*
|
|
102
|
+
helpers above, for medallions / icon tiles / soft banners that need a ~10%
|
|
103
|
+
tint of a status colour. (`bg-error/10` does NOT resolve — there is no
|
|
104
|
+
--color-error.) color-mix tracks the token across light / dark / true-black. */
|
|
105
|
+
@utility bg-error-soft { background-color: color-mix(in srgb, var(--error) 10%, transparent); }
|
|
106
|
+
@utility bg-success-soft { background-color: color-mix(in srgb, var(--success) 10%, transparent); }
|
|
107
|
+
@utility bg-warning-soft { background-color: color-mix(in srgb, var(--warning) 10%, transparent); }
|
|
108
|
+
@utility bg-info-soft { background-color: color-mix(in srgb, var(--info) 10%, transparent); }
|
|
109
|
+
|
|
110
|
+
/* Matching tinted borders for soft semantic callouts (Alert, banners). */
|
|
111
|
+
@utility border-error-soft { border-color: color-mix(in srgb, var(--error) 30%, transparent); }
|
|
112
|
+
@utility border-success-soft { border-color: color-mix(in srgb, var(--success) 30%, transparent); }
|
|
113
|
+
@utility border-warning-soft { border-color: color-mix(in srgb, var(--warning) 30%, transparent); }
|
|
114
|
+
@utility border-info-soft { border-color: color-mix(in srgb, var(--info) 30%, transparent); }
|
|
115
|
+
|
|
116
|
+
/* Accent tone — neutral/brand emphasis (e.g. GitHub "important" callouts). Uses
|
|
117
|
+
the accent-subtle fill so it stays legible in every theme, unlike a 10% mix of
|
|
118
|
+
the near-black / near-white --accent. Pairs with the text-accent utility. */
|
|
119
|
+
@utility bg-accent-soft { background-color: var(--accent-subtle); }
|
|
120
|
+
@utility border-accent-soft { border-color: color-mix(in srgb, var(--accent) 25%, transparent); }
|
|
121
|
+
|
|
122
|
+
/* Accent fills/inks — use instead of bg-black / text-black. The `border-` and
|
|
123
|
+
`text-` counterparts exist because consumers reached for `border-accent-muted`
|
|
124
|
+
and `text-accent-solid`, which had no definition at all and fell through to
|
|
125
|
+
currentColor / inherited ink. */
|
|
126
|
+
@utility bg-accent-solid { background-color: var(--accent); }
|
|
127
|
+
@utility bg-accent-subtle { background-color: var(--accent-subtle); }
|
|
128
|
+
@utility bg-accent-muted { background-color: var(--accent-muted); }
|
|
129
|
+
@utility text-accent-solid { color: var(--accent); }
|
|
130
|
+
@utility border-accent-solid { border-color: var(--accent); }
|
|
131
|
+
@utility border-accent-subtle{ border-color: var(--accent-subtle); }
|
|
132
|
+
@utility border-accent-muted { border-color: var(--accent-muted); }
|
|
133
|
+
|
|
67
134
|
@layer components {
|
|
68
135
|
|
|
69
136
|
/* =====================================================
|
|
@@ -151,12 +218,18 @@
|
|
|
151
218
|
/* Text */
|
|
152
219
|
--text-primary: #ffffff;
|
|
153
220
|
--text-secondary: #a1a1aa;
|
|
154
|
-
/* Lightened for dark, and measured against the
|
|
155
|
-
the base one.
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
221
|
+
/* Lightened for dark, and measured against the LIGHTEST surface it lands on,
|
|
222
|
+
not the base one. The previous value was tuned against `--bg-elevated`
|
|
223
|
+
(#18181b) on the reasoning that cards are harder than the page background —
|
|
224
|
+
correct as far as it went, but it missed the soft status tints
|
|
225
|
+
(`bg-accent-soft`, `bg-info-soft`, … at #27272a), which are lighter still.
|
|
226
|
+
At #85858e that was 4.07:1, and axe caught `.text-label` failing inside
|
|
227
|
+
tinted cards on three Yunshu pages once the sidebar heading above it was
|
|
228
|
+
fixed.
|
|
229
|
+
#91919a measures 4.77 on the soft tints / 5.67 on elevated / 6.37 on base,
|
|
230
|
+
and stays clearly below --text-secondary (#a1a1aa, 5.81 on the tints) so
|
|
231
|
+
the three-step hierarchy survives. */
|
|
232
|
+
--text-tertiary: #91919a;
|
|
160
233
|
--text-muted: #52525b;
|
|
161
234
|
|
|
162
235
|
/* Accent */
|
|
@@ -209,12 +282,10 @@
|
|
|
209
282
|
/* Text - Reduced contrast for eye comfort */
|
|
210
283
|
--text-primary: #d4d4d8;
|
|
211
284
|
--text-secondary: #a1a1aa;
|
|
212
|
-
/*
|
|
213
|
-
the
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
--text-secondary so the three-step hierarchy survives. */
|
|
217
|
-
--text-tertiary: #85858e;
|
|
285
|
+
/* Same value and the same reasoning as the dark theme above: measured
|
|
286
|
+
against the lightest surface tertiary text lands on (the soft status tints
|
|
287
|
+
at #27272a), not just the base. */
|
|
288
|
+
--text-tertiary: #91919a;
|
|
218
289
|
--text-muted: #52525b;
|
|
219
290
|
|
|
220
291
|
/* Accent - Softer white */
|
|
@@ -341,13 +412,11 @@
|
|
|
341
412
|
--color-fd-border: rgba(255, 255, 255, 0.08);
|
|
342
413
|
}
|
|
343
414
|
|
|
344
|
-
/* True Black — Fumadocs shiki code block
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
}
|
|
350
|
-
}
|
|
415
|
+
/* True Black — Fumadocs shiki code block.
|
|
416
|
+
Moved OUT of `@layer components`: see the unlayered block at the end of this
|
|
417
|
+
file. Leaving it here made it lose to fumadocs' own rule in
|
|
418
|
+
`@layer utilities`, which comes later in the layer order — and layer order
|
|
419
|
+
beats specificity outright. */
|
|
351
420
|
|
|
352
421
|
/* True Black - Override hardcoded white colors for reduced eye strain */
|
|
353
422
|
.true-black .text-white {
|
|
@@ -1137,25 +1206,16 @@ select.input option,
|
|
|
1137
1206
|
|
|
1138
1207
|
.badge-info {
|
|
1139
1208
|
background: rgba(59, 130, 246, 0.1);
|
|
1140
|
-
|
|
1209
|
+
/* blue-700, not blue-500. On the 10% tint over a light surface, #3b82f6
|
|
1210
|
+
measured 3.28:1 — below the 4.5:1 AA floor for the 11px text these badges
|
|
1211
|
+
use. The dark-mode override below keeps the lighter blue, where the tint
|
|
1212
|
+
sits on a dark surface and the contrast runs the other way. */
|
|
1213
|
+
color: #1d4ed8;
|
|
1141
1214
|
}
|
|
1142
1215
|
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
color: var(--success);
|
|
1147
|
-
}
|
|
1148
|
-
|
|
1149
|
-
.text-warning {
|
|
1150
|
-
color: var(--warning);
|
|
1151
|
-
}
|
|
1152
|
-
|
|
1153
|
-
.text-error {
|
|
1154
|
-
color: var(--error);
|
|
1155
|
-
}
|
|
1156
|
-
|
|
1157
|
-
.text-info {
|
|
1158
|
-
color: var(--info);
|
|
1216
|
+
.dark .badge-info,
|
|
1217
|
+
.true-black .badge-info {
|
|
1218
|
+
color: #60a5fa;
|
|
1159
1219
|
}
|
|
1160
1220
|
|
|
1161
1221
|
/* White ink that STAYS white on a colored/dark fill — badges, icon overlays,
|
|
@@ -1172,43 +1232,9 @@ select.input option,
|
|
|
1172
1232
|
need a ~10% tint of a status color (the `bg-error/10` Tailwind utility does
|
|
1173
1233
|
NOT resolve — there is no --color-error). color-mix tracks the token across
|
|
1174
1234
|
light / dark / true-black. */
|
|
1175
|
-
.bg-error-soft {
|
|
1176
|
-
background-color: color-mix(in srgb, var(--error) 10%, transparent);
|
|
1177
|
-
}
|
|
1178
|
-
.bg-success-soft {
|
|
1179
|
-
background-color: color-mix(in srgb, var(--success) 10%, transparent);
|
|
1180
|
-
}
|
|
1181
|
-
.bg-warning-soft {
|
|
1182
|
-
background-color: color-mix(in srgb, var(--warning) 10%, transparent);
|
|
1183
|
-
}
|
|
1184
|
-
.bg-info-soft {
|
|
1185
|
-
background-color: color-mix(in srgb, var(--info) 10%, transparent);
|
|
1186
|
-
}
|
|
1187
|
-
|
|
1188
|
-
/* Matching tinted borders for soft semantic callouts (Alert, banners). */
|
|
1189
|
-
.border-error-soft {
|
|
1190
|
-
border-color: color-mix(in srgb, var(--error) 30%, transparent);
|
|
1191
|
-
}
|
|
1192
|
-
.border-success-soft {
|
|
1193
|
-
border-color: color-mix(in srgb, var(--success) 30%, transparent);
|
|
1194
|
-
}
|
|
1195
|
-
.border-warning-soft {
|
|
1196
|
-
border-color: color-mix(in srgb, var(--warning) 30%, transparent);
|
|
1197
|
-
}
|
|
1198
|
-
.border-info-soft {
|
|
1199
|
-
border-color: color-mix(in srgb, var(--info) 30%, transparent);
|
|
1200
|
-
}
|
|
1201
|
-
|
|
1202
1235
|
/* Accent tone — neutral/brand emphasis (e.g. GitHub "important" callouts). Uses
|
|
1203
1236
|
the accent-subtle fill so it stays legible in every theme, unlike a 10% mix of
|
|
1204
1237
|
the near-black / near-white --accent. Pairs with the text-accent utility. */
|
|
1205
|
-
.bg-accent-soft {
|
|
1206
|
-
background-color: var(--accent-subtle);
|
|
1207
|
-
}
|
|
1208
|
-
.border-accent-soft {
|
|
1209
|
-
border-color: color-mix(in srgb, var(--accent) 25%, transparent);
|
|
1210
|
-
}
|
|
1211
|
-
|
|
1212
1238
|
.badge-neutral {
|
|
1213
1239
|
background: var(--bg-glass-hover);
|
|
1214
1240
|
color: var(--text-secondary);
|
|
@@ -1302,7 +1328,11 @@ select.input option,
|
|
|
1302
1328
|
font-weight: 600;
|
|
1303
1329
|
letter-spacing: 0.08em;
|
|
1304
1330
|
text-transform: uppercase;
|
|
1305
|
-
|
|
1331
|
+
/* --text-tertiary, not --text-muted — the third place in this file to need
|
|
1332
|
+
the same correction. In dark, --text-muted (#52525b) on --bg-base is
|
|
1333
|
+
2.57:1, and this is 10px uppercase, which WCAG gives no small-text
|
|
1334
|
+
allowance for. axe flagged it on five separate Yunshu pages. */
|
|
1335
|
+
color: var(--text-tertiary);
|
|
1306
1336
|
padding: 1rem 0.875rem 0.5rem;
|
|
1307
1337
|
}
|
|
1308
1338
|
|
|
@@ -1579,19 +1609,6 @@ select.input option,
|
|
|
1579
1609
|
background-color: rgba(0, 0, 0, 0.7);
|
|
1580
1610
|
}
|
|
1581
1611
|
|
|
1582
|
-
/* Foreground/accent backgrounds - replaces bg-black */
|
|
1583
|
-
.bg-accent-solid {
|
|
1584
|
-
background-color: var(--accent);
|
|
1585
|
-
}
|
|
1586
|
-
|
|
1587
|
-
.bg-accent-subtle {
|
|
1588
|
-
background-color: var(--accent-subtle);
|
|
1589
|
-
}
|
|
1590
|
-
|
|
1591
|
-
.bg-accent-muted {
|
|
1592
|
-
background-color: var(--accent-muted);
|
|
1593
|
-
}
|
|
1594
|
-
|
|
1595
1612
|
/* Text utilities - use instead of text-black */
|
|
1596
1613
|
.text-default {
|
|
1597
1614
|
color: var(--text-primary);
|
|
@@ -2841,3 +2858,99 @@ html {
|
|
|
2841
2858
|
}
|
|
2842
2859
|
|
|
2843
2860
|
} /* end @layer components */
|
|
2861
|
+
|
|
2862
|
+
/* =====================================================
|
|
2863
|
+
UNLAYERED OVERRIDES
|
|
2864
|
+
Rules here deliberately sit outside every `@layer`, because unlayered CSS
|
|
2865
|
+
wins against all layered CSS regardless of specificity. That is the only
|
|
2866
|
+
reliable way to override a third-party rule that lives in a later layer than
|
|
2867
|
+
anything we can write.
|
|
2868
|
+
===================================================== */
|
|
2869
|
+
|
|
2870
|
+
/* Fumadocs card surface = YunUI's card surface.
|
|
2871
|
+
`--color-fd-card` was bridged only inside the true-black block, so in light
|
|
2872
|
+
and dark the docs used fumadocs' own values (#f1f1f1 / #191919) while every
|
|
2873
|
+
YunUI card next to them used `--bg-card` (#ffffff / #141417). Two card
|
|
2874
|
+
colours on one page is the thing the fd-* bridge exists to prevent.
|
|
2875
|
+
|
|
2876
|
+
It also matters for contrast: fumadocs renders code blocks on this surface,
|
|
2877
|
+
and GitHub's Shiki palettes are calibrated against their own canvas — white
|
|
2878
|
+
for `github-light-default`. On #f1f1f1 the comment token (#6e7781) measured
|
|
2879
|
+
4.03:1; on white it is 4.55:1. Every intermediate grey still failed, so this
|
|
2880
|
+
is white or nothing. */
|
|
2881
|
+
:root:not(.true-black),
|
|
2882
|
+
.light,
|
|
2883
|
+
.dark {
|
|
2884
|
+
--color-fd-card: var(--bg-card);
|
|
2885
|
+
--color-fd-card-foreground: var(--text-primary);
|
|
2886
|
+
/* Fumadocs' own muted ink is #737373, which clears AA on pure white (4.74:1)
|
|
2887
|
+
and fails on every surface it actually lands on — 4.39:1 on #f6f6f6, 4.35
|
|
2888
|
+
on #f5f5f5, 4.20 on #f1f1f1. Only `true-black` had a bridge for this token,
|
|
2889
|
+
so light and dark inherited the failure. `--text-tertiary` is the
|
|
2890
|
+
equivalent step in YunUI's ramp and is tuned against the surfaces:
|
|
2891
|
+
4.89 / 4.84 / 4.68 respectively, 5.28 on white. */
|
|
2892
|
+
--color-fd-muted-foreground: var(--text-tertiary);
|
|
2893
|
+
}
|
|
2894
|
+
|
|
2895
|
+
/* Shiki dual themes in the `true-black` theme.
|
|
2896
|
+
Fumadocs emits `--shiki-light` / `--shiki-dark` per token and switches with
|
|
2897
|
+
`.dark .shiki … code span { color: var(--shiki-dark) }`. Our third theme sets
|
|
2898
|
+
`class="true-black"` WITHOUT `dark` (next-themes maps one theme to one
|
|
2899
|
+
class), so that switch never fired and every code block rendered the LIGHT
|
|
2900
|
+
syntax theme on a near-black page: measured 1.35:1 for plain code text
|
|
2901
|
+
(#24292E on #0a0a0a). Unreadable.
|
|
2902
|
+
|
|
2903
|
+
An equivalent `.true-black` rule did exist, but inside `@layer components`,
|
|
2904
|
+
where fumadocs' own `.shiki … code span { color: var(--shiki-light) }` in
|
|
2905
|
+
`@layer utilities` beat it — later layer wins, specificity is not consulted.
|
|
2906
|
+
Unlayered, it wins.
|
|
2907
|
+
|
|
2908
|
+
Both DOM shapes are covered: fumadocs puts `.shiki` on the wrapping <figure>
|
|
2909
|
+
for block code, and on the <code> itself elsewhere. Only the first had a
|
|
2910
|
+
`true-black` counterpart. */
|
|
2911
|
+
.true-black .shiki:not(.not-fumadocs-codeblock *) code span,
|
|
2912
|
+
.true-black code.shiki:not(.not-fumadocs-code *) span {
|
|
2913
|
+
color: var(--shiki-dark);
|
|
2914
|
+
font-style: var(--shiki-dark-font-style);
|
|
2915
|
+
}
|
|
2916
|
+
|
|
2917
|
+
.true-black .shiki:not(.not-fumadocs-codeblock *),
|
|
2918
|
+
.true-black code.shiki:not(.not-fumadocs-code *) {
|
|
2919
|
+
color: var(--shiki-dark);
|
|
2920
|
+
}
|
|
2921
|
+
|
|
2922
|
+
/* Fumadocs tokens in the `true-black` theme — unlayered, and it has to be.
|
|
2923
|
+
Fumadocs ships its LIGHT defaults as `:root:not(.dark)` with no `@layer`.
|
|
2924
|
+
`true-black` sets `class="true-black"` and no `dark`, so that selector
|
|
2925
|
+
matches it, and unlayered CSS beats every layer regardless of specificity —
|
|
2926
|
+
so the `.true-black` bridge in `@layer components` lost silently. Docs body
|
|
2927
|
+
text came out at fumadocs' light `#525252` on black: 2.53:1.
|
|
2928
|
+
|
|
2929
|
+
The layered block above is kept as the single place to edit these values;
|
|
2930
|
+
this mirror exists purely to win the cascade. Keep the two in step. */
|
|
2931
|
+
/* `:root.true-black:not(.dark)` is (0,3,0), deliberately one step above
|
|
2932
|
+
fumadocs' `:root:not(.dark)` at (0,2,0). Being unlayered is necessary but not
|
|
2933
|
+
sufficient — a bare `.true-black` is only (0,1,0) and still lost. The
|
|
2934
|
+
`:not(.dark)` is redundant by construction (next-themes sets exactly one
|
|
2935
|
+
class) and is there to carry the specificity, and to say out loud which
|
|
2936
|
+
selector this is fighting. */
|
|
2937
|
+
:root.true-black:not(.dark),
|
|
2938
|
+
:root[data-theme="true-black"]:not(.dark) {
|
|
2939
|
+
--color-fd-background: #000000;
|
|
2940
|
+
--color-fd-foreground: #d4d4d8;
|
|
2941
|
+
--color-fd-muted: #111111;
|
|
2942
|
+
--color-fd-muted-foreground: rgba(161, 161, 170, 0.8);
|
|
2943
|
+
--color-fd-popover: #141414;
|
|
2944
|
+
--color-fd-popover-foreground: #d4d4d8;
|
|
2945
|
+
--color-fd-card: #0a0a0a;
|
|
2946
|
+
--color-fd-card-foreground: #d4d4d8;
|
|
2947
|
+
--color-fd-border: rgba(255, 255, 255, 0.08);
|
|
2948
|
+
--color-fd-primary: #d4d4d8;
|
|
2949
|
+
--color-fd-primary-foreground: #000000;
|
|
2950
|
+
--color-fd-secondary: #111111;
|
|
2951
|
+
--color-fd-secondary-foreground: #d4d4d8;
|
|
2952
|
+
--color-fd-accent: rgba(255, 255, 255, 0.06);
|
|
2953
|
+
--color-fd-accent-foreground: #d4d4d8;
|
|
2954
|
+
--color-fd-ring: #404040;
|
|
2955
|
+
--color-fd-overlay: rgba(0, 0, 0, 0.7);
|
|
2956
|
+
}
|