@dogsbay/format-astro 0.2.0-beta.12 → 0.2.0-beta.121
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/api-markdown.d.ts +8 -0
- package/dist/api-markdown.d.ts.map +1 -0
- package/dist/api-markdown.js +50 -0
- package/dist/api-markdown.js.map +1 -0
- package/dist/base-path.d.ts +93 -7
- package/dist/base-path.d.ts.map +1 -1
- package/dist/base-path.js +122 -8
- package/dist/base-path.js.map +1 -1
- package/dist/blog.d.ts +134 -0
- package/dist/blog.d.ts.map +1 -0
- package/dist/blog.js +324 -0
- package/dist/blog.js.map +1 -0
- package/dist/browser.d.ts +14 -0
- package/dist/browser.d.ts.map +1 -0
- package/dist/browser.js +14 -0
- package/dist/browser.js.map +1 -0
- package/dist/canonical.d.ts +34 -0
- package/dist/canonical.d.ts.map +1 -0
- package/dist/canonical.js +107 -0
- package/dist/canonical.js.map +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +1 -0
- package/dist/cli.js.map +1 -1
- package/dist/diff-decoration.d.ts +79 -0
- package/dist/diff-decoration.d.ts.map +1 -0
- package/dist/diff-decoration.js +541 -0
- package/dist/diff-decoration.js.map +1 -0
- package/dist/granularity.d.ts +83 -0
- package/dist/granularity.d.ts.map +1 -0
- package/dist/granularity.js +247 -0
- package/dist/granularity.js.map +1 -0
- package/dist/head-metadata.d.ts +26 -0
- package/dist/head-metadata.d.ts.map +1 -0
- package/dist/head-metadata.js +56 -0
- package/dist/head-metadata.js.map +1 -0
- package/dist/index.d.ts +24 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +30 -3
- package/dist/index.js.map +1 -1
- package/dist/lead.d.ts +1 -38
- package/dist/lead.d.ts.map +1 -1
- package/dist/lead.js +3 -37
- package/dist/lead.js.map +1 -1
- package/dist/llms-txt.d.ts +53 -11
- package/dist/llms-txt.d.ts.map +1 -1
- package/dist/llms-txt.js +85 -222
- package/dist/llms-txt.js.map +1 -1
- package/dist/plugins.d.ts.map +1 -1
- package/dist/plugins.js +4 -2
- package/dist/plugins.js.map +1 -1
- package/dist/project.d.ts +377 -12
- package/dist/project.d.ts.map +1 -1
- package/dist/project.js +2263 -661
- package/dist/project.js.map +1 -1
- package/dist/redirects.d.ts +116 -0
- package/dist/redirects.d.ts.map +1 -0
- package/dist/redirects.js +224 -0
- package/dist/redirects.js.map +1 -0
- package/dist/serialize.d.ts +14 -0
- package/dist/serialize.d.ts.map +1 -1
- package/dist/serialize.js +643 -216
- package/dist/serialize.js.map +1 -1
- package/dist/sitemap.d.ts +108 -0
- package/dist/sitemap.d.ts.map +1 -0
- package/dist/sitemap.js +127 -0
- package/dist/sitemap.js.map +1 -0
- package/dist/taxonomy.d.ts +48 -1
- package/dist/taxonomy.d.ts.map +1 -1
- package/dist/taxonomy.js +46 -11
- package/dist/taxonomy.js.map +1 -1
- package/dist/theme-css.d.ts +26 -0
- package/dist/theme-css.d.ts.map +1 -0
- package/dist/theme-css.js +651 -0
- package/dist/theme-css.js.map +1 -0
- package/dist/tone-classes.d.ts +14 -0
- package/dist/tone-classes.d.ts.map +1 -0
- package/dist/tone-classes.js +30 -0
- package/dist/tone-classes.js.map +1 -0
- package/dist/write-if-changed.d.ts +21 -0
- package/dist/write-if-changed.d.ts.map +1 -0
- package/dist/write-if-changed.js +58 -0
- package/dist/write-if-changed.js.map +1 -0
- package/package.json +16 -7
|
@@ -0,0 +1,651 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The stylesheets a generated Astro site starts from: global.css
|
|
3
|
+
* (generateGlobalCss: element display rules, .docs-prose, the tone safelist)
|
|
4
|
+
* and theme.css (themeCss: the Tailwind theme mapping plus a preset's tokens).
|
|
5
|
+
*
|
|
6
|
+
* Pure (no I/O; it imports only the tone palette) so other packages can use
|
|
7
|
+
* the same strings: @dogsbay/render-html bundles this module to write its
|
|
8
|
+
* css/ (packages/render-html/scripts/sources.mjs), which dogsbay-ssg and the
|
|
9
|
+
* single-page renderer use.
|
|
10
|
+
*/
|
|
11
|
+
import { TONE_CLASSES } from "./tone-classes.js";
|
|
12
|
+
// ── CSS generation (ported from import-mkdocs.ts) ───────
|
|
13
|
+
/**
|
|
14
|
+
* Build the `@source inline("...")` directive that pins the
|
|
15
|
+
* grid-tone palette into the generated stylesheet.
|
|
16
|
+
*
|
|
17
|
+
* Why we need it: tone classes like `bg-primary/10` only appear in
|
|
18
|
+
* `.astro` pages emitted by Dogsbay's grid-item serializer. When
|
|
19
|
+
* Tailwind's content scanner doesn't pick them up — because the
|
|
20
|
+
* page lives outside the default scan globs, or because a class
|
|
21
|
+
* is composed at the boundary of an interpolation — they get
|
|
22
|
+
* purged. Result observed in dogsbay-docs-markdown audit: half
|
|
23
|
+
* the grid demo cells render with no background. Pinning forces
|
|
24
|
+
* generation regardless of scanner reach.
|
|
25
|
+
*
|
|
26
|
+
* Single source of truth: derived from TONE_CLASSES so any new
|
|
27
|
+
* tone added to the palette is automatically safelisted.
|
|
28
|
+
*/
|
|
29
|
+
export function buildToneSafelist() {
|
|
30
|
+
const seen = new Set();
|
|
31
|
+
for (const classes of Object.values(TONE_CLASSES)) {
|
|
32
|
+
for (const cls of classes.split(/\s+/)) {
|
|
33
|
+
if (cls)
|
|
34
|
+
seen.add(cls);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return [...seen].sort().join(" ");
|
|
38
|
+
}
|
|
39
|
+
export function generateGlobalCss() {
|
|
40
|
+
return `@import "tailwindcss";
|
|
41
|
+
@import "./theme.css";
|
|
42
|
+
|
|
43
|
+
/* Custom elements have no user-agent style, so an unstyled one is
|
|
44
|
+
display:inline — on which w-full does nothing and a border paints
|
|
45
|
+
as detached fragments rather than around the content. @dogsbay/elements
|
|
46
|
+
injects these same defaults at runtime, which is what reaches EXISTING
|
|
47
|
+
sites (global.css is scaffolded once and never rewritten). Having them
|
|
48
|
+
here too means a new site is correct at CSS time, with no flash before
|
|
49
|
+
the module script runs.
|
|
50
|
+
|
|
51
|
+
:where() keeps specificity at zero, so any utility class wins. */
|
|
52
|
+
:where(db-tabs, db-accordion, db-collapsible, db-card, db-steps, db-code-block) {
|
|
53
|
+
display: block;
|
|
54
|
+
}
|
|
55
|
+
:where(db-link-button) {
|
|
56
|
+
display: inline-block;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* Scan @dogsbay packages for Tailwind classes */
|
|
60
|
+
@source "../../node_modules/@dogsbay/ui/src";
|
|
61
|
+
@source "../../node_modules/@dogsbay/docs-layout/src";
|
|
62
|
+
|
|
63
|
+
/* Pin the grid-tone palette. These classes are emitted into
|
|
64
|
+
markdown-generated .astro pages by the grid-item serializer
|
|
65
|
+
(TONE_CLASSES in @dogsbay/format-astro). Without inlining,
|
|
66
|
+
opacity-modified utilities like bg-primary/10 get purged when
|
|
67
|
+
Tailwind doesn't see them in the scanned globs, leaving grid
|
|
68
|
+
demo cells with no visible background. */
|
|
69
|
+
@source inline("${buildToneSafelist()}");
|
|
70
|
+
|
|
71
|
+
/* Prose typography for rendered content.
|
|
72
|
+
Every element rule is guarded with :not(.dba-api *): API-reference
|
|
73
|
+
regions (ApiLayout root carries the dba-api marker) compose their own
|
|
74
|
+
typography from utility classes, and unguarded .docs-prose rules would
|
|
75
|
+
out-specify them. The guard lets mixed prose+endpoint pages (MDX
|
|
76
|
+
imports) keep full typography outside the cards. */
|
|
77
|
+
.docs-prose {
|
|
78
|
+
line-height: 1.7;
|
|
79
|
+
|
|
80
|
+
& h1:not(.dba-api *) { font-family: var(--font-heading); font-size: 2rem; font-weight: 700; margin-top: 0; margin-bottom: 1rem; line-height: 1.2; letter-spacing: -0.025em; }
|
|
81
|
+
& h2:not(.dba-api *) { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 600; margin-top: 2.5rem; margin-bottom: 0.75rem; line-height: 1.3; border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; letter-spacing: -0.015em; }
|
|
82
|
+
& h3:not(.dba-api *) { font-family: var(--font-heading); font-size: 1.25rem; font-weight: 600; margin-top: 2rem; margin-bottom: 0.5rem; line-height: 1.4; }
|
|
83
|
+
& h4:not(.dba-api *) { font-family: var(--font-heading); font-size: 1.1rem; font-weight: 600; margin-top: 1.5rem; margin-bottom: 0.5rem; }
|
|
84
|
+
|
|
85
|
+
& p:not(.dba-api *) { margin-top: 0.75rem; margin-bottom: 0.75rem; }
|
|
86
|
+
|
|
87
|
+
/* The :not([data-variant]) guard exempts anchors that ARE components. A
|
|
88
|
+
link-button renders as an <a> carrying bg-primary + text-primary-foreground
|
|
89
|
+
and a data-variant attribute, and this rule repainted its text with
|
|
90
|
+
var(--primary) — primary on primary: an unreadable solid block in light
|
|
91
|
+
mode, a blank one in dark. The secondary variant survived only because its
|
|
92
|
+
background is light enough to read primary-coloured text, which is why it
|
|
93
|
+
looked like a colour bug in one button rather than a cascade bug in both.
|
|
94
|
+
(No backticks in this comment: the whole stylesheet is a template
|
|
95
|
+
literal.) */
|
|
96
|
+
& a:not(.dba-api *):not([data-variant]) { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
|
|
97
|
+
& a:hover:not(.dba-api *):not([data-variant]) { opacity: 0.8; }
|
|
98
|
+
|
|
99
|
+
& strong:not(.dba-api *) { font-weight: 600; }
|
|
100
|
+
& code:not(.dba-api *) { font-size: 0.875em; padding: 0.15em 0.35em; border-radius: 0.25rem; background: var(--muted); font-family: var(--font-code, ui-monospace, monospace); }
|
|
101
|
+
& pre code:not(.dba-api *) { padding: 0; background: none; font-size: 1em; }
|
|
102
|
+
|
|
103
|
+
/* Spacing between consecutive block elements (code blocks, alerts, etc.) */
|
|
104
|
+
& > * + * { margin-top: 0.75rem; }
|
|
105
|
+
& li > * + *:not(.dba-api *) { margin-top: 0.75rem; }
|
|
106
|
+
|
|
107
|
+
& ul:not(.dba-api *) { list-style: disc; padding-left: 1.5rem; margin: 0.75rem 0; }
|
|
108
|
+
& ol:not(.dba-api *) { list-style: decimal; padding-left: 1.5rem; margin: 0.75rem 0; }
|
|
109
|
+
& li:not(.dba-api *) { margin: 0.25rem 0; }
|
|
110
|
+
& li > ul:not(.dba-api *), & li > ol:not(.dba-api *) { margin: 0.25rem 0; }
|
|
111
|
+
|
|
112
|
+
& blockquote:not(.dba-api *) { border-left: 4px solid var(--border); padding-left: 1rem; color: var(--muted-foreground); font-style: italic; margin: 1rem 0; }
|
|
113
|
+
|
|
114
|
+
& hr:not(.dba-api *) { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }
|
|
115
|
+
|
|
116
|
+
& table:not(.dba-api *) { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.875rem; }
|
|
117
|
+
& th:not(.dba-api *) { text-align: left; vertical-align: bottom; font-weight: 600; padding: 0.5rem; border-bottom: 2px solid var(--border); }
|
|
118
|
+
& td:not(.dba-api *) { padding: 0.5rem; vertical-align: top; border-bottom: 1px solid var(--border); }
|
|
119
|
+
/* A table's caption is its title, above it; the same for Table components and raw HTML tables */
|
|
120
|
+
& caption:not(.dba-api *) { caption-side: top; text-align: left; font-weight: 500; color: var(--foreground); padding-bottom: 0.5rem; }
|
|
121
|
+
|
|
122
|
+
/* Tailwind Preflight sets display: block on every img, which turns an
|
|
123
|
+
INLINE icon into its own line and splits the sentence around it —
|
|
124
|
+
AsciiDoc UI macros render mid-step and were breaking every procedure
|
|
125
|
+
that used one. inline-block restores the flow and leaves a standalone
|
|
126
|
+
image (the only child of its paragraph) looking exactly as before. */
|
|
127
|
+
& img:not(.dba-api *) { display: inline-block; max-width: 100%; border-radius: 0.5rem; }
|
|
128
|
+
/* A standalone image — the only child of its paragraph — keeps block
|
|
129
|
+
layout, so the vertical rhythm and the absence of baseline descender
|
|
130
|
+
space are exactly what they were before inline icons were fixed. */
|
|
131
|
+
& p > img:only-child:not(.dba-api *) { display: block; }
|
|
132
|
+
|
|
133
|
+
& .heading-anchor { text-decoration: none; opacity: 0; margin-right: 0.25rem; transition: opacity 0.2s; }
|
|
134
|
+
& h1:hover .heading-anchor, & h2:hover .heading-anchor, & h3:hover .heading-anchor, & h4:hover .heading-anchor { opacity: 0.4; }
|
|
135
|
+
|
|
136
|
+
& details:not(.dba-api *) { border: 1px solid var(--border); border-radius: 0.5rem; padding: 1rem; margin: 1rem 0; }
|
|
137
|
+
& summary:not(.dba-api *) { cursor: pointer; font-weight: 600; }
|
|
138
|
+
|
|
139
|
+
/* mark is emitted by the highlight directive AND can arrive as raw HTML
|
|
140
|
+
from an importer. Without a rule here it renders as the browser default
|
|
141
|
+
yellow, which clashes in light mode and is unreadable on a dark page
|
|
142
|
+
(nothing declares color-scheme). Token-based so it follows the theme. */
|
|
143
|
+
& mark:not(.dba-api *) { background: var(--dsb-mark-bg, rgb(254 240 138 / 0.6)); color: inherit; border-radius: 0.125rem; padding: 0 0.125rem; }
|
|
144
|
+
&:where(.dark *) mark:not(.dba-api *), .dark & mark:not(.dba-api *) { background: var(--dsb-mark-bg-dark, rgb(234 179 8 / 0.3)); }
|
|
145
|
+
|
|
146
|
+
& dl:not(.dba-api *) { margin: 1rem 0; }
|
|
147
|
+
& dt:not(.dba-api *) { font-weight: 600; margin-top: 0.75rem; }
|
|
148
|
+
& dd:not(.dba-api *) { margin-left: 1.5rem; color: var(--muted-foreground); }
|
|
149
|
+
|
|
150
|
+
/* In-cell admonitions. Inside a raw HTML table cell nothing
|
|
151
|
+
markdown-native works, so the AsciiDoc engine emits a neutral
|
|
152
|
+
dl.db-admonition shape (DD-010) and this rule renders it as a compact
|
|
153
|
+
callout box — same contract the Obsidian plugin styles. Per-type
|
|
154
|
+
accent from theme tokens; overrides the generic dl/dt/dd rules above. */
|
|
155
|
+
& dl.db-admonition {
|
|
156
|
+
margin: 0.75rem 0;
|
|
157
|
+
padding: 0.5rem 0.75rem;
|
|
158
|
+
border-left: 3px solid var(--info);
|
|
159
|
+
border-radius: 0.25rem;
|
|
160
|
+
background: color-mix(in oklab, var(--info) 8%, transparent);
|
|
161
|
+
}
|
|
162
|
+
/* The LABEL blends the accent toward the foreground; the border and the
|
|
163
|
+
tint keep the accent at full strength, so the callout still reads as
|
|
164
|
+
its colour while the text stays legible.
|
|
165
|
+
|
|
166
|
+
Measured from painted pixels on a real page, light mode, 13px/600 —
|
|
167
|
+
the accent used raw is a genuine AA failure, not one of axe's oklch
|
|
168
|
+
misreads:
|
|
169
|
+
|
|
170
|
+
--info raw 2.18:1 mixed 5.66:1
|
|
171
|
+
--warning raw 2.25:1 mixed 5.74:1
|
|
172
|
+
--destructive raw 5.97:1 mixed 10.98:1
|
|
173
|
+
|
|
174
|
+
Mixed with var(--foreground), not black, on purpose. Black fixes
|
|
175
|
+
light and BREAKS dark: 70% black measures 5.21:1 light but 3.25:1
|
|
176
|
+
dark, because the tint it sits on is dark too. --foreground is
|
|
177
|
+
near-black in light and near-white in dark, so one rule serves both
|
|
178
|
+
(dark measures 10.96 / 10.87 / 9.79). A fixed colour used in both
|
|
179
|
+
themes is a bug waiting. */
|
|
180
|
+
& dl.db-admonition > dt {
|
|
181
|
+
margin-top: 0;
|
|
182
|
+
font-weight: 600;
|
|
183
|
+
font-size: 0.8125rem;
|
|
184
|
+
text-transform: uppercase;
|
|
185
|
+
letter-spacing: 0.03em;
|
|
186
|
+
color: color-mix(in oklab, var(--info) 60%, var(--foreground));
|
|
187
|
+
}
|
|
188
|
+
& dl.db-admonition > dd { margin-left: 0; margin-top: 0.25rem; color: var(--foreground); }
|
|
189
|
+
& dl.db-admonition-warning, & dl.db-admonition-caution {
|
|
190
|
+
border-left-color: var(--warning);
|
|
191
|
+
background: color-mix(in oklab, var(--warning) 8%, transparent);
|
|
192
|
+
}
|
|
193
|
+
& dl.db-admonition-warning > dt, & dl.db-admonition-caution > dt { color: color-mix(in oklab, var(--warning) 60%, var(--foreground)); }
|
|
194
|
+
& dl.db-admonition-important {
|
|
195
|
+
border-left-color: var(--destructive);
|
|
196
|
+
background: color-mix(in oklab, var(--destructive) 8%, transparent);
|
|
197
|
+
}
|
|
198
|
+
& dl.db-admonition-important > dt { color: color-mix(in oklab, var(--destructive) 60%, var(--foreground)); }
|
|
199
|
+
|
|
200
|
+
/* Granularity book-view affordances (plans/granularity-views.md):
|
|
201
|
+
"Read as single page →" on topics, "Open as page ↗" on book sections.
|
|
202
|
+
Deliberately subtle/muted — the book has one per section. */
|
|
203
|
+
& .dsb-read-single-page {
|
|
204
|
+
display: inline-block;
|
|
205
|
+
margin: 0 0 1.25rem;
|
|
206
|
+
font-size: 0.8125rem;
|
|
207
|
+
color: var(--muted-foreground);
|
|
208
|
+
text-decoration: none;
|
|
209
|
+
}
|
|
210
|
+
& .dsb-read-single-page:hover { color: var(--foreground); text-decoration: underline; }
|
|
211
|
+
& .dsb-open-as-page { margin: -0.25rem 0 0.5rem; font-size: 0.75rem; }
|
|
212
|
+
& .dsb-open-as-page a { color: var(--muted-foreground); text-decoration: none; }
|
|
213
|
+
& .dsb-open-as-page a:hover { color: var(--foreground); text-decoration: underline; }
|
|
214
|
+
|
|
215
|
+
/* AsciiDoc block roles ([role="x"] / [.x]) preserved as classes (#384).
|
|
216
|
+
_abstract marks a module's lead/intro paragraph; .lead/.small are
|
|
217
|
+
Asciidoctor built-ins; _additional-resources marks the trailing
|
|
218
|
+
"Additional resources" section heading. */
|
|
219
|
+
& ._abstract, & .abstract, & .lead {
|
|
220
|
+
font-size: 1.05rem;
|
|
221
|
+
line-height: 1.6;
|
|
222
|
+
color: var(--muted-foreground);
|
|
223
|
+
}
|
|
224
|
+
& .small { font-size: 0.875rem; }
|
|
225
|
+
& h2._additional-resources, & h3._additional-resources {
|
|
226
|
+
font-size: 1.15rem;
|
|
227
|
+
margin-top: 2rem;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/* Related resources (#384 R3): [role="_additional-resources"] + .Title +
|
|
231
|
+
list folds to a <section class="related-resources"> (→ DITA related-links). */
|
|
232
|
+
& .related-resources {
|
|
233
|
+
margin-top: 2rem;
|
|
234
|
+
padding-top: 1rem;
|
|
235
|
+
border-top: 1px solid var(--border);
|
|
236
|
+
}
|
|
237
|
+
& .related-resources-title {
|
|
238
|
+
font-weight: 600;
|
|
239
|
+
margin: 0 0 0.5rem;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
@utility scrollbar-none {
|
|
244
|
+
-ms-overflow-style: none;
|
|
245
|
+
scrollbar-width: none;
|
|
246
|
+
&::-webkit-scrollbar {
|
|
247
|
+
display: none;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
`;
|
|
251
|
+
}
|
|
252
|
+
// ── Theme presets ───────────────────────────────────────
|
|
253
|
+
const THEME_DEFAULT = {
|
|
254
|
+
light: `:root {
|
|
255
|
+
--background: oklch(1 0 0);
|
|
256
|
+
--foreground: oklch(0.145 0.014 285.823);
|
|
257
|
+
--card: oklch(1 0 0);
|
|
258
|
+
--card-foreground: oklch(0.145 0.014 285.823);
|
|
259
|
+
--popover: oklch(1 0 0);
|
|
260
|
+
--popover-foreground: oklch(0.145 0.014 285.823);
|
|
261
|
+
--primary: oklch(0.205 0.014 285.823);
|
|
262
|
+
--primary-foreground: oklch(0.985 0 0);
|
|
263
|
+
--secondary: oklch(0.965 0.001 286.375);
|
|
264
|
+
--secondary-foreground: oklch(0.205 0.014 285.823);
|
|
265
|
+
--muted: oklch(0.965 0.001 286.375);
|
|
266
|
+
--muted-foreground: oklch(0.45 0.014 285.938);
|
|
267
|
+
--accent: oklch(0.965 0.001 286.375);
|
|
268
|
+
--accent-foreground: oklch(0.205 0.014 285.823);
|
|
269
|
+
--destructive: oklch(0.45 0.245 27.325);
|
|
270
|
+
--destructive-foreground: oklch(0.985 0 0);
|
|
271
|
+
--border: oklch(0.922 0.004 286.32);
|
|
272
|
+
--input: oklch(0.922 0.004 286.32);
|
|
273
|
+
--ring: oklch(0.708 0.014 285.823);
|
|
274
|
+
--radius: 0.625rem;
|
|
275
|
+
--note: oklch(0.637 0.174 259.126);
|
|
276
|
+
--note-foreground: var(--foreground);
|
|
277
|
+
--abstract: oklch(0.691 0.148 221.723);
|
|
278
|
+
--info: oklch(0.722 0.128 207.084);
|
|
279
|
+
--tip: oklch(0.731 0.112 178.627);
|
|
280
|
+
--success: oklch(0.754 0.175 149.577);
|
|
281
|
+
--question: oklch(0.809 0.19 126.526);
|
|
282
|
+
--warning: oklch(0.74 0.175 62.778);
|
|
283
|
+
--failure: oklch(0.614 0.194 21.602);
|
|
284
|
+
--danger: oklch(0.577 0.245 16.439);
|
|
285
|
+
--bug: oklch(0.548 0.258 349.761);
|
|
286
|
+
--example: oklch(0.534 0.222 286.033);
|
|
287
|
+
--quote: oklch(0.65 0 0);
|
|
288
|
+
--sidebar: oklch(0.985 0 0);
|
|
289
|
+
--sidebar-foreground: oklch(0.145 0.014 285.823);
|
|
290
|
+
--sidebar-primary: oklch(0.205 0.014 285.823);
|
|
291
|
+
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
292
|
+
--sidebar-accent: oklch(0.965 0.001 286.375);
|
|
293
|
+
--sidebar-accent-foreground: oklch(0.205 0.014 285.823);
|
|
294
|
+
--sidebar-border: oklch(0.922 0.004 286.32);
|
|
295
|
+
--sidebar-ring: oklch(0.708 0.014 285.823);
|
|
296
|
+
--code-background: oklch(0.965 0.004 264);
|
|
297
|
+
--code-foreground: oklch(0.3 0.014 253.833);
|
|
298
|
+
|
|
299
|
+
/* API reference — always-dark code panel */
|
|
300
|
+
--api-panel-bg: oklch(0.145 0.014 253.833);
|
|
301
|
+
--api-panel-fg: oklch(0.926 0.013 253.833);
|
|
302
|
+
|
|
303
|
+
/* API semantic colors — HTTP methods, types, status codes */
|
|
304
|
+
/* Light mode: darkened for WCAG AA on the 20%/10% tints. See .dark. */
|
|
305
|
+
--api-get: oklch(0.435 0.095 162);
|
|
306
|
+
--api-post: oklch(0.45 0.174 259);
|
|
307
|
+
--api-put: oklch(0.455 0.105 63);
|
|
308
|
+
--api-patch: oklch(0.455 0.13 45);
|
|
309
|
+
--api-delete: oklch(0.45 0.179 22);
|
|
310
|
+
--api-head: oklch(0.47 0.222 286);
|
|
311
|
+
--api-required: oklch(0.45 0.179 22);
|
|
312
|
+
--api-deprecated: oklch(0.455 0.105 63);
|
|
313
|
+
/* A field name in an operation's description (\`id\`, \`name\`): the JSON
|
|
314
|
+
key colour of the highlighted examples (github-light-default #0550ae). */
|
|
315
|
+
--api-field: oklch(0.47 0.16 254);
|
|
316
|
+
--api-type-string: oklch(0.435 0.095 162);
|
|
317
|
+
--api-type-number: oklch(0.45 0.174 259);
|
|
318
|
+
--api-type-boolean: oklch(0.455 0.105 63);
|
|
319
|
+
--api-type-object: oklch(0.47 0.222 286);
|
|
320
|
+
--api-type-array: oklch(0.455 0.13 45);
|
|
321
|
+
--api-status-2xx: oklch(0.435 0.095 162);
|
|
322
|
+
--api-status-3xx: oklch(0.45 0.174 259);
|
|
323
|
+
--api-status-4xx: oklch(0.455 0.105 63);
|
|
324
|
+
--api-status-5xx: oklch(0.45 0.179 22);
|
|
325
|
+
|
|
326
|
+
--font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
327
|
+
--font-heading: var(--font-sans);
|
|
328
|
+
--font-code: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
|
|
329
|
+
}`,
|
|
330
|
+
dark: `.dark {
|
|
331
|
+
--background: oklch(0.145 0.014 285.823);
|
|
332
|
+
--foreground: oklch(0.985 0 0);
|
|
333
|
+
--card: oklch(0.145 0.014 285.823);
|
|
334
|
+
--card-foreground: oklch(0.985 0 0);
|
|
335
|
+
--popover: oklch(0.145 0.014 285.823);
|
|
336
|
+
--popover-foreground: oklch(0.985 0 0);
|
|
337
|
+
--primary: oklch(0.985 0 0);
|
|
338
|
+
--primary-foreground: oklch(0.205 0.014 285.823);
|
|
339
|
+
--secondary: oklch(0.269 0.007 286.033);
|
|
340
|
+
--secondary-foreground: oklch(0.985 0 0);
|
|
341
|
+
--muted: oklch(0.269 0.007 286.033);
|
|
342
|
+
--muted-foreground: oklch(0.708 0.014 285.823);
|
|
343
|
+
--accent: oklch(0.269 0.007 286.033);
|
|
344
|
+
--accent-foreground: oklch(0.985 0 0);
|
|
345
|
+
--destructive: oklch(0.704 0.191 22.216);
|
|
346
|
+
--destructive-foreground: oklch(0.145 0.014 285.823);
|
|
347
|
+
--border: oklch(0.269 0.007 286.033);
|
|
348
|
+
--input: oklch(0.269 0.007 286.033);
|
|
349
|
+
--ring: oklch(0.439 0.01 286.375);
|
|
350
|
+
--note-foreground: var(--foreground);
|
|
351
|
+
--sidebar: oklch(0.205 0.014 285.823);
|
|
352
|
+
--sidebar-foreground: oklch(0.985 0 0);
|
|
353
|
+
--sidebar-primary: oklch(0.488 0.243 264.376);
|
|
354
|
+
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
355
|
+
--sidebar-accent: oklch(0.269 0.007 286.033);
|
|
356
|
+
--sidebar-accent-foreground: oklch(0.985 0 0);
|
|
357
|
+
--sidebar-border: oklch(0.269 0.007 286.033);
|
|
358
|
+
--sidebar-ring: oklch(0.439 0.01 286.375);
|
|
359
|
+
--code-background: oklch(0.18 0.014 253.833);
|
|
360
|
+
--code-foreground: oklch(0.926 0.013 253.833);
|
|
361
|
+
|
|
362
|
+
/* API semantic colors — lightened for dark mode (AA on 20%/10% tints). */
|
|
363
|
+
--api-get: oklch(0.720 0.135 162);
|
|
364
|
+
--api-post: oklch(0.755 0.174 259);
|
|
365
|
+
--api-put: oklch(0.745 0.15 63);
|
|
366
|
+
--api-patch: oklch(0.725 0.18 45);
|
|
367
|
+
--api-delete: oklch(0.805 0.194 22);
|
|
368
|
+
--api-head: oklch(0.740 0.182 286);
|
|
369
|
+
--api-required: oklch(0.805 0.194 22);
|
|
370
|
+
--api-deprecated: oklch(0.745 0.15 63);
|
|
371
|
+
--api-field: oklch(0.79 0.11 245); /* github-dark-default #79c0ff */
|
|
372
|
+
--api-type-string: oklch(0.690 0.135 162);
|
|
373
|
+
--api-type-number: oklch(0.725 0.174 259);
|
|
374
|
+
--api-type-boolean: oklch(0.720 0.15 63);
|
|
375
|
+
--api-type-object: oklch(0.740 0.182 286);
|
|
376
|
+
--api-type-array: oklch(0.725 0.18 45);
|
|
377
|
+
--api-status-2xx: oklch(0.720 0.135 162);
|
|
378
|
+
--api-status-3xx: oklch(0.755 0.174 259);
|
|
379
|
+
--api-status-4xx: oklch(0.770 0.15 63);
|
|
380
|
+
--api-status-5xx: oklch(0.805 0.194 22);
|
|
381
|
+
}`,
|
|
382
|
+
};
|
|
383
|
+
/**
|
|
384
|
+
* Mintlify-inspired theme — clean, neutral palette matching modern doc sites.
|
|
385
|
+
*
|
|
386
|
+
* Extracted from Claude Code docs (Mintlify):
|
|
387
|
+
* - White background, near-black text
|
|
388
|
+
* - Serif display font for H1, sans-serif body
|
|
389
|
+
* - Soft colored callout backgrounds (blue note, green tip, amber warning)
|
|
390
|
+
* - Rounded callout borders (16px radius)
|
|
391
|
+
* - Light gray code background, JetBrains Mono
|
|
392
|
+
*/
|
|
393
|
+
const THEME_MINTLIFY = {
|
|
394
|
+
light: `:root {
|
|
395
|
+
--background: oklch(0.993 0.005 95);
|
|
396
|
+
--foreground: oklch(0.15 0.01 260);
|
|
397
|
+
--card: oklch(0.993 0.005 95);
|
|
398
|
+
--card-foreground: oklch(0.15 0.01 260);
|
|
399
|
+
--popover: oklch(0.993 0.005 95);
|
|
400
|
+
--popover-foreground: oklch(0.15 0.01 260);
|
|
401
|
+
--primary: oklch(0.15 0.01 260);
|
|
402
|
+
--primary-foreground: oklch(0.985 0 0);
|
|
403
|
+
--secondary: oklch(0.97 0.002 260);
|
|
404
|
+
--secondary-foreground: oklch(0.15 0.01 260);
|
|
405
|
+
--muted: oklch(0.97 0.002 260);
|
|
406
|
+
--muted-foreground: oklch(0.45 0.01 260);
|
|
407
|
+
--accent: oklch(0.97 0.002 260);
|
|
408
|
+
--accent-foreground: oklch(0.15 0.01 260);
|
|
409
|
+
--destructive: oklch(0.55 0.22 25);
|
|
410
|
+
--destructive-foreground: oklch(0.985 0 0);
|
|
411
|
+
--border: oklch(0.91 0.004 260);
|
|
412
|
+
--input: oklch(0.91 0.004 260);
|
|
413
|
+
--ring: oklch(0.7 0.01 260);
|
|
414
|
+
--radius: 1rem;
|
|
415
|
+
/* Callout colors — soft pastel backgrounds matching Mintlify */
|
|
416
|
+
--note: oklch(0.62 0.18 260);
|
|
417
|
+
--note-foreground: var(--foreground);
|
|
418
|
+
--abstract: oklch(0.65 0.14 220);
|
|
419
|
+
--info: oklch(0.65 0.14 230);
|
|
420
|
+
--tip: oklch(0.65 0.16 155);
|
|
421
|
+
--success: oklch(0.65 0.16 155);
|
|
422
|
+
--question: oklch(0.7 0.15 270);
|
|
423
|
+
--warning: oklch(0.7 0.15 75);
|
|
424
|
+
--failure: oklch(0.6 0.2 25);
|
|
425
|
+
--danger: oklch(0.55 0.22 25);
|
|
426
|
+
--bug: oklch(0.55 0.22 350);
|
|
427
|
+
--example: oklch(0.55 0.2 285);
|
|
428
|
+
--quote: oklch(0.55 0 0);
|
|
429
|
+
/* Sidebar */
|
|
430
|
+
--sidebar: oklch(0.993 0.005 95);
|
|
431
|
+
--sidebar-foreground: oklch(0.15 0.01 260);
|
|
432
|
+
--sidebar-primary: oklch(0.15 0.01 260);
|
|
433
|
+
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
434
|
+
--sidebar-accent: oklch(0.97 0.002 260);
|
|
435
|
+
--sidebar-accent-foreground: oklch(0.15 0.01 260);
|
|
436
|
+
--sidebar-border: oklch(0.93 0.004 260);
|
|
437
|
+
--sidebar-ring: oklch(0.7 0.01 260);
|
|
438
|
+
/* Code — light gray background, matching Mintlify's inline code */
|
|
439
|
+
--code-background: oklch(0.96 0.003 260);
|
|
440
|
+
--code-foreground: oklch(0.25 0.01 260);
|
|
441
|
+
|
|
442
|
+
/* API reference — always-dark code panel */
|
|
443
|
+
--api-panel-bg: oklch(0.145 0.014 253.833);
|
|
444
|
+
--api-panel-fg: oklch(0.926 0.013 253.833);
|
|
445
|
+
|
|
446
|
+
/* API semantic colors — HTTP methods, types, status codes */
|
|
447
|
+
/* Light mode: darkened for WCAG AA on the 20%/10% tints. See .dark. */
|
|
448
|
+
--api-get: oklch(0.435 0.095 162);
|
|
449
|
+
--api-post: oklch(0.45 0.174 259);
|
|
450
|
+
--api-put: oklch(0.455 0.105 63);
|
|
451
|
+
--api-patch: oklch(0.455 0.13 45);
|
|
452
|
+
--api-delete: oklch(0.45 0.179 22);
|
|
453
|
+
--api-head: oklch(0.47 0.222 286);
|
|
454
|
+
--api-required: oklch(0.45 0.179 22);
|
|
455
|
+
--api-deprecated: oklch(0.455 0.105 63);
|
|
456
|
+
/* A field name in an operation's description (\`id\`, \`name\`): the JSON
|
|
457
|
+
key colour of the highlighted examples (github-light-default #0550ae). */
|
|
458
|
+
--api-field: oklch(0.47 0.16 254);
|
|
459
|
+
--api-type-string: oklch(0.435 0.095 162);
|
|
460
|
+
--api-type-number: oklch(0.45 0.174 259);
|
|
461
|
+
--api-type-boolean: oklch(0.455 0.105 63);
|
|
462
|
+
--api-type-object: oklch(0.47 0.222 286);
|
|
463
|
+
--api-type-array: oklch(0.455 0.13 45);
|
|
464
|
+
--api-status-2xx: oklch(0.435 0.095 162);
|
|
465
|
+
--api-status-3xx: oklch(0.45 0.174 259);
|
|
466
|
+
--api-status-4xx: oklch(0.455 0.105 63);
|
|
467
|
+
--api-status-5xx: oklch(0.45 0.179 22);
|
|
468
|
+
|
|
469
|
+
/* Fonts — system sans for body, JetBrains Mono for code */
|
|
470
|
+
--font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
471
|
+
--font-heading: var(--font-sans);
|
|
472
|
+
--font-code: "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
473
|
+
}`,
|
|
474
|
+
dark: `.dark {
|
|
475
|
+
--background: oklch(0.16 0.01 260);
|
|
476
|
+
--foreground: oklch(0.93 0.005 260);
|
|
477
|
+
--card: oklch(0.18 0.01 260);
|
|
478
|
+
--card-foreground: oklch(0.93 0.005 260);
|
|
479
|
+
--popover: oklch(0.18 0.01 260);
|
|
480
|
+
--popover-foreground: oklch(0.93 0.005 260);
|
|
481
|
+
--primary: oklch(0.93 0.005 260);
|
|
482
|
+
--primary-foreground: oklch(0.16 0.01 260);
|
|
483
|
+
--secondary: oklch(0.22 0.008 260);
|
|
484
|
+
--secondary-foreground: oklch(0.93 0.005 260);
|
|
485
|
+
--muted: oklch(0.22 0.008 260);
|
|
486
|
+
--muted-foreground: oklch(0.65 0.01 260);
|
|
487
|
+
--accent: oklch(0.22 0.008 260);
|
|
488
|
+
--accent-foreground: oklch(0.93 0.005 260);
|
|
489
|
+
--destructive: oklch(0.65 0.2 25);
|
|
490
|
+
--destructive-foreground: oklch(0.16 0.01 260);
|
|
491
|
+
--border: oklch(0.28 0.008 260);
|
|
492
|
+
--input: oklch(0.28 0.008 260);
|
|
493
|
+
--ring: oklch(0.45 0.01 260);
|
|
494
|
+
--note-foreground: var(--foreground);
|
|
495
|
+
--sidebar: oklch(0.16 0.01 260);
|
|
496
|
+
--sidebar-foreground: oklch(0.93 0.005 260);
|
|
497
|
+
--sidebar-primary: oklch(0.55 0.2 260);
|
|
498
|
+
--sidebar-primary-foreground: oklch(0.93 0.005 260);
|
|
499
|
+
--sidebar-accent: oklch(0.22 0.008 260);
|
|
500
|
+
--sidebar-accent-foreground: oklch(0.93 0.005 260);
|
|
501
|
+
--sidebar-border: oklch(0.28 0.008 260);
|
|
502
|
+
--sidebar-ring: oklch(0.45 0.01 260);
|
|
503
|
+
--code-background: oklch(0.2 0.01 260);
|
|
504
|
+
--code-foreground: oklch(0.9 0.01 260);
|
|
505
|
+
|
|
506
|
+
/* API semantic colors — lightened for dark mode (AA on 20%/10% tints). */
|
|
507
|
+
--api-get: oklch(0.720 0.135 162);
|
|
508
|
+
--api-post: oklch(0.755 0.174 259);
|
|
509
|
+
--api-put: oklch(0.745 0.15 63);
|
|
510
|
+
--api-patch: oklch(0.725 0.18 45);
|
|
511
|
+
--api-delete: oklch(0.805 0.194 22);
|
|
512
|
+
--api-head: oklch(0.740 0.182 286);
|
|
513
|
+
--api-required: oklch(0.805 0.194 22);
|
|
514
|
+
--api-deprecated: oklch(0.745 0.15 63);
|
|
515
|
+
--api-field: oklch(0.79 0.11 245); /* github-dark-default #79c0ff */
|
|
516
|
+
--api-type-string: oklch(0.690 0.135 162);
|
|
517
|
+
--api-type-number: oklch(0.725 0.174 259);
|
|
518
|
+
--api-type-boolean: oklch(0.720 0.15 63);
|
|
519
|
+
--api-type-object: oklch(0.740 0.182 286);
|
|
520
|
+
--api-type-array: oklch(0.725 0.18 45);
|
|
521
|
+
--api-status-2xx: oklch(0.720 0.135 162);
|
|
522
|
+
--api-status-3xx: oklch(0.755 0.174 259);
|
|
523
|
+
--api-status-4xx: oklch(0.770 0.15 63);
|
|
524
|
+
--api-status-5xx: oklch(0.805 0.194 22);
|
|
525
|
+
}`,
|
|
526
|
+
};
|
|
527
|
+
/** The theme presets by name. A name not here falls back to "default", as writeThemeFile always did. */
|
|
528
|
+
export const THEMES = { default: THEME_DEFAULT, mintlify: THEME_MINTLIFY };
|
|
529
|
+
/** A site's src/styles/theme.css for a preset: the Tailwind theme mapping plus the preset's tokens. */
|
|
530
|
+
export function themeCss(themeName) {
|
|
531
|
+
const tokens = themeName === "mintlify" ? THEME_MINTLIFY : THEME_DEFAULT;
|
|
532
|
+
return `@custom-variant dark (&:where(.dark, .dark *));
|
|
533
|
+
|
|
534
|
+
@theme inline {
|
|
535
|
+
--color-background: var(--background);
|
|
536
|
+
--color-foreground: var(--foreground);
|
|
537
|
+
--color-card: var(--card);
|
|
538
|
+
--color-card-foreground: var(--card-foreground);
|
|
539
|
+
--color-popover: var(--popover);
|
|
540
|
+
--color-popover-foreground: var(--popover-foreground);
|
|
541
|
+
--color-primary: var(--primary);
|
|
542
|
+
--color-primary-foreground: var(--primary-foreground);
|
|
543
|
+
--color-secondary: var(--secondary);
|
|
544
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
545
|
+
--color-muted: var(--muted);
|
|
546
|
+
--color-muted-foreground: var(--muted-foreground);
|
|
547
|
+
--color-accent: var(--accent);
|
|
548
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
549
|
+
--color-destructive: var(--destructive);
|
|
550
|
+
--color-destructive-foreground: var(--destructive-foreground);
|
|
551
|
+
--color-border: var(--border);
|
|
552
|
+
--color-input: var(--input);
|
|
553
|
+
--color-ring: var(--ring);
|
|
554
|
+
--radius-sm: calc(var(--radius) - 4px);
|
|
555
|
+
--radius-md: calc(var(--radius) - 2px);
|
|
556
|
+
--radius-lg: var(--radius);
|
|
557
|
+
--radius-xl: calc(var(--radius) + 4px);
|
|
558
|
+
|
|
559
|
+
/* Sidebar */
|
|
560
|
+
--color-sidebar: var(--sidebar);
|
|
561
|
+
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
562
|
+
--color-sidebar-primary: var(--sidebar-primary);
|
|
563
|
+
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
564
|
+
--color-sidebar-accent: var(--sidebar-accent);
|
|
565
|
+
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
566
|
+
--color-sidebar-border: var(--sidebar-border);
|
|
567
|
+
--color-sidebar-ring: var(--sidebar-ring);
|
|
568
|
+
|
|
569
|
+
/* Admonition colors */
|
|
570
|
+
--color-note: var(--note);
|
|
571
|
+
--color-note-foreground: var(--note-foreground);
|
|
572
|
+
--color-abstract: var(--abstract);
|
|
573
|
+
--color-info: var(--info);
|
|
574
|
+
--color-tip: var(--tip);
|
|
575
|
+
--color-success: var(--success);
|
|
576
|
+
--color-question: var(--question);
|
|
577
|
+
--color-warning: var(--warning);
|
|
578
|
+
--color-failure: var(--failure);
|
|
579
|
+
--color-danger: var(--danger);
|
|
580
|
+
--color-bug: var(--bug);
|
|
581
|
+
--color-example: var(--example);
|
|
582
|
+
--color-quote: var(--quote);
|
|
583
|
+
|
|
584
|
+
/* Code */
|
|
585
|
+
--color-code-bg: var(--code-background);
|
|
586
|
+
--color-code-fg: var(--code-foreground);
|
|
587
|
+
|
|
588
|
+
/* API reference — HTTP method, type, status, role colors */
|
|
589
|
+
--color-api-field: var(--api-field);
|
|
590
|
+
--color-api-get: var(--api-get);
|
|
591
|
+
--color-api-post: var(--api-post);
|
|
592
|
+
--color-api-put: var(--api-put);
|
|
593
|
+
--color-api-patch: var(--api-patch);
|
|
594
|
+
--color-api-delete: var(--api-delete);
|
|
595
|
+
--color-api-head: var(--api-head);
|
|
596
|
+
--color-api-required: var(--api-required);
|
|
597
|
+
--color-api-deprecated: var(--api-deprecated);
|
|
598
|
+
--color-api-type-string: var(--api-type-string);
|
|
599
|
+
--color-api-type-number: var(--api-type-number);
|
|
600
|
+
--color-api-type-boolean: var(--api-type-boolean);
|
|
601
|
+
--color-api-type-object: var(--api-type-object);
|
|
602
|
+
--color-api-type-array: var(--api-type-array);
|
|
603
|
+
--color-api-status-2xx: var(--api-status-2xx);
|
|
604
|
+
--color-api-status-3xx: var(--api-status-3xx);
|
|
605
|
+
--color-api-status-4xx: var(--api-status-4xx);
|
|
606
|
+
--color-api-status-5xx: var(--api-status-5xx);
|
|
607
|
+
|
|
608
|
+
/* Fonts */
|
|
609
|
+
--font-sans: var(--font-sans);
|
|
610
|
+
--font-mono: var(--font-code);
|
|
611
|
+
--font-family-code: var(--font-code);
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
${tokens.light}
|
|
615
|
+
|
|
616
|
+
${tokens.dark}
|
|
617
|
+
|
|
618
|
+
@layer base {
|
|
619
|
+
* { @apply border-border outline-ring/50; }
|
|
620
|
+
body { @apply bg-background text-foreground font-sans; }
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
/* Shiki dual-theme: light by default, dark when .dark class is active */
|
|
624
|
+
.shiki,
|
|
625
|
+
.shiki span,
|
|
626
|
+
.astro-code,
|
|
627
|
+
.astro-code span {
|
|
628
|
+
color: var(--shiki-light) !important;
|
|
629
|
+
}
|
|
630
|
+
.shiki,
|
|
631
|
+
.astro-code {
|
|
632
|
+
background-color: var(--shiki-light-bg) !important;
|
|
633
|
+
}
|
|
634
|
+
.dark .shiki,
|
|
635
|
+
.dark .shiki span,
|
|
636
|
+
.dark .astro-code,
|
|
637
|
+
.dark .astro-code span {
|
|
638
|
+
color: var(--shiki-dark) !important;
|
|
639
|
+
}
|
|
640
|
+
.dark .shiki,
|
|
641
|
+
.dark .astro-code {
|
|
642
|
+
background-color: var(--shiki-dark-bg) !important;
|
|
643
|
+
}
|
|
644
|
+
/* Fix comment color contrast for WCAG AA */
|
|
645
|
+
.shiki span[style*="--shiki-light:#6E7781"],
|
|
646
|
+
.astro-code span[style*="--shiki-light:#6E7781"] {
|
|
647
|
+
--shiki-light: #576069 !important;
|
|
648
|
+
}
|
|
649
|
+
`;
|
|
650
|
+
}
|
|
651
|
+
//# sourceMappingURL=theme-css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme-css.js","sourceRoot":"","sources":["../src/theme-css.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,2DAA2D;AAE3D;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,iBAAiB;IAC/B,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,KAAK,MAAM,OAAO,IAAI,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC;QAClD,KAAK,MAAM,GAAG,IAAI,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC;YACvC,IAAI,GAAG;gBAAE,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACzB,CAAC;IACH,CAAC;IACD,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,iBAAiB;IAC/B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA6BS,iBAAiB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqLpC,CAAC;AACF,CAAC;AAED,2DAA2D;AAE3D,MAAM,aAAa,GAAG;IACpB,KAAK,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2EP;IACA,IAAI,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmDN;CACD,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,cAAc,GAAG;IACrB,KAAK,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+EP;IACA,IAAI,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmDN;CACD,CAAC;AAEF,wGAAwG;AACxG,MAAM,CAAC,MAAM,MAAM,GAAoD,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,cAAc,EAAE,CAAC;AAE5H,uGAAuG;AACvG,MAAM,UAAU,QAAQ,CAAC,SAAkB;IACzC,MAAM,MAAM,GAAG,SAAS,KAAK,UAAU,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,aAAa,CAAC;IACzE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkFP,MAAM,CAAC,KAAK;;EAEZ,MAAM,CAAC,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiCZ,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tone palette for `:::grid-item{label="..." tone="..."}` cells.
|
|
3
|
+
* Each tone is a `bg + text` Tailwind class pair. Used to make grid demos
|
|
4
|
+
* declarative — authors specify a tone instead of writing the styling.
|
|
5
|
+
*
|
|
6
|
+
* Exported because the scaffolded site's `global.css` must safelist
|
|
7
|
+
* these classes via `@source inline()` — they only appear in
|
|
8
|
+
* markdown-generated `.astro` pages, which Tailwind's content
|
|
9
|
+
* scanner doesn't always pick up reliably (and consumers who put
|
|
10
|
+
* their content/ outside the scanned globs won't pick them up at
|
|
11
|
+
* all). See generateGlobalCss in theme-css.ts.
|
|
12
|
+
*/
|
|
13
|
+
export declare const TONE_CLASSES: Record<string, string>;
|
|
14
|
+
//# sourceMappingURL=tone-classes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tone-classes.d.ts","sourceRoot":"","sources":["../src/tone-classes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAgB/C,CAAC"}
|