@takazudo/zudo-doc 8.1.2 → 9.0.0
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/CHANGELOG.md +29 -0
- package/README.md +1 -1
- package/dist/ai-chat-modal/index.js +1 -0
- package/dist/catalog.js +1 -1
- package/dist/chrome/derive.js +2 -2
- package/dist/config.d.ts +13 -7
- package/dist/config.js +6 -0
- package/dist/footer/footer.js +1 -1
- package/dist/head-with-defaults/index.js +2 -2
- package/dist/metainfo/doc-tags.js +3 -0
- package/dist/nav-indexing/tag-nav.js +7 -1
- package/dist/preset.d.ts +10 -4
- package/dist/preset.js +11 -1
- package/dist/route-context-payload/index.d.ts +4 -1
- package/dist/route-context-payload/index.js +6 -0
- package/dist/settings-defaults.js +3 -1
- package/dist/settings.d.ts +9 -5
- package/dist/theme/theme-pack-provider.d.ts +4 -2
- package/dist/theme/theme-pack-provider.js +2 -1
- package/dist/theme-cli/config-io.js +26 -3
- package/dist/theme-cli/list.js +1 -1
- package/dist/theme-packs/default/meta.json +2 -2
- package/dist/theme-packs/drift/pack.css +50 -15
- package/dist/theme-packs/fjord/pack.css +55 -14
- package/dist/theme-packs/graphite/meta.json +37 -0
- package/dist/theme-packs/graphite/pack.css +401 -0
- package/dist/theme-packs/hollow/pack.css +51 -16
- package/dist/theme-packs/manuscript/pack.css +57 -12
- package/dist/theme-packs/matcha/pack.css +46 -13
- package/dist/theme-packs/nocturne/pack.css +46 -10
- package/dist/theme-packs/observatory/pack.css +61 -20
- package/dist/theme-packs/quiet-slate/meta.json +37 -0
- package/dist/theme-packs/quiet-slate/pack.css +401 -0
- package/dist/theme-packs/sakura/pack.css +58 -16
- package/dist/theme-packs/solar/pack.css +43 -10
- package/dist/theme-packs/warm-mineral/meta.json +37 -0
- package/dist/theme-packs/warm-mineral/pack.css +401 -0
- package/dist/theme-packs-registry/configured-theme-pack.d.ts +21 -0
- package/dist/theme-packs-registry/configured-theme-pack.js +13 -0
- package/dist/theme-packs-registry/index.d.ts +1 -0
- package/dist/theme-packs-registry/index.js +6 -0
- package/dist/theme-packs-registry/resolve-enabled-packs.d.ts +13 -6
- package/dist/theme-packs-registry/resolve-enabled-packs.js +15 -5
- package/eject/footer/footer.tsx +1 -1
- package/package.json +9 -9
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
THEME_PACK_STORAGE_KEY,
|
|
12
12
|
buildPackCssUrl
|
|
13
13
|
} from "../theme-pack-switcher/theme-pack-sync.js";
|
|
14
|
+
import { resolveConfiguredThemePack } from "../theme-packs-registry/configured-theme-pack.js";
|
|
14
15
|
const THEME_PACK_LOADING_ATTR = "data-zd-theme-pack-loading";
|
|
15
16
|
const THEME_PACK_LOAD_WATCHDOG_MS = 2e3;
|
|
16
17
|
const THEME_PACK_LATCH_CSS = `html[${THEME_PACK_LOADING_ATTR}] body{visibility:hidden}`;
|
|
@@ -23,7 +24,7 @@ function themePackVersionMap(registry) {
|
|
|
23
24
|
}
|
|
24
25
|
function resolveThemePackSsrSlug(registry, settings) {
|
|
25
26
|
if (registry === null) return void 0;
|
|
26
|
-
return settings
|
|
27
|
+
return resolveConfiguredThemePack(settings);
|
|
27
28
|
}
|
|
28
29
|
function buildThemePackBootstrap(configuredSlug, enabled, base) {
|
|
29
30
|
const configured = JSON.stringify(configuredSlug);
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import fs from "fs-extra";
|
|
2
2
|
import path from "node:path";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
CONFIGURED_DEFAULT_THEME_PACK_SLUG,
|
|
5
|
+
DEFAULT_THEME_PACK_SLUG
|
|
6
|
+
} from "../theme-packs-registry/index.js";
|
|
4
7
|
import {
|
|
5
8
|
ConfigSyntaxError,
|
|
6
9
|
findMatchingBrace,
|
|
@@ -16,7 +19,10 @@ function resolveZfbConfigPath(cwd) {
|
|
|
16
19
|
}
|
|
17
20
|
async function detectActiveThemePack(cwd) {
|
|
18
21
|
const configPath = resolveZfbConfigPath(cwd);
|
|
19
|
-
const fallback = {
|
|
22
|
+
const fallback = {
|
|
23
|
+
slug: CONFIGURED_DEFAULT_THEME_PACK_SLUG,
|
|
24
|
+
detected: false
|
|
25
|
+
};
|
|
20
26
|
if (!await fs.pathExists(configPath)) return fallback;
|
|
21
27
|
let source;
|
|
22
28
|
try {
|
|
@@ -33,7 +39,24 @@ async function detectActiveThemePack(cwd) {
|
|
|
33
39
|
const members = splitTopLevelMembers(source, braceOpenIdx + 1, braceCloseIdx);
|
|
34
40
|
if (members.some((m) => m.isSpread)) return fallback;
|
|
35
41
|
const themePackMember = members.find((m) => m.key === "themePack");
|
|
36
|
-
if (!themePackMember)
|
|
42
|
+
if (!themePackMember) {
|
|
43
|
+
const valueText = (key) => {
|
|
44
|
+
const member = members.find((m) => m.key === key);
|
|
45
|
+
if (!member) return void 0;
|
|
46
|
+
if (member.valueStart === null || member.valueEnd === null) return null;
|
|
47
|
+
return source.slice(member.valueStart, member.valueEnd).trim();
|
|
48
|
+
};
|
|
49
|
+
const colorSchemes = valueText("colorSchemes");
|
|
50
|
+
const colorMode = valueText("colorMode");
|
|
51
|
+
if (colorSchemes === null || colorMode === null) return fallback;
|
|
52
|
+
const customSchemes = colorSchemes !== void 0 && colorSchemes !== "undefined" && colorSchemes !== "null" && colorSchemes !== "defaultColorSchemes";
|
|
53
|
+
if (customSchemes || colorMode === "false") {
|
|
54
|
+
return { slug: DEFAULT_THEME_PACK_SLUG, detected: true };
|
|
55
|
+
}
|
|
56
|
+
const colorModeKnownNotFalse = colorMode === void 0 || colorMode === "undefined" || colorMode === "true" || colorMode.startsWith("{");
|
|
57
|
+
if (!colorModeKnownNotFalse) return fallback;
|
|
58
|
+
return { slug: CONFIGURED_DEFAULT_THEME_PACK_SLUG, detected: true };
|
|
59
|
+
}
|
|
37
60
|
if (themePackMember.valueStart === null || themePackMember.valueEnd === null || !isPlainStringLiteralSpan(source, themePackMember.valueStart, themePackMember.valueEnd)) {
|
|
38
61
|
return fallback;
|
|
39
62
|
}
|
package/dist/theme-cli/list.js
CHANGED
|
@@ -50,7 +50,7 @@ function formatThemeList(result) {
|
|
|
50
50
|
} else {
|
|
51
51
|
lines.push(
|
|
52
52
|
pc.dim(
|
|
53
|
-
`Active theme pack: ${activeSlug} (default \u2014 no zfb.config.ts "themePack" field found or readable)`
|
|
53
|
+
`Active theme pack: ${activeSlug} (assumed default \u2014 no zfb.config.ts "themePack" field found or readable)`
|
|
54
54
|
)
|
|
55
55
|
);
|
|
56
56
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"slug": "default",
|
|
4
|
-
"name": "
|
|
5
|
-
"description": "
|
|
4
|
+
"name": "Classic",
|
|
5
|
+
"description": "Classic — the original zudo-doc default look. No pack stylesheet is loaded — your project's configured color scheme and fonts render unchanged.",
|
|
6
6
|
"mode": "dark",
|
|
7
7
|
"version": "1.0.0",
|
|
8
8
|
"fonts": {
|
|
@@ -307,27 +307,62 @@ html[data-theme-pack="drift"] a[data-nav-active] {
|
|
|
307
307
|
0 0 18px -4px color-mix(in oklch, var(--zd-accent) 45%, transparent);
|
|
308
308
|
}
|
|
309
309
|
|
|
310
|
-
/* headings: quiet luminance
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
(Decision 6.6's sole allowlisted carve-out)
|
|
310
|
+
/* headings: quiet luminance plus a top-only rule hierarchy. h2 carries
|
|
311
|
+
a 2px accent rule, h3 a quieter 1px muted rule, h4 no rule at all.
|
|
312
|
+
The rules are top-anchored background gradients; border-image none
|
|
313
|
+
!important (Decision 6.6's sole allowlisted carve-out) keeps the
|
|
314
|
+
SSR-inlined `style="border-image:linear-gradient(...)"` from painting
|
|
315
|
+
a second bar. */
|
|
314
316
|
html[data-theme-pack="drift"] .zd-content h1 {
|
|
315
317
|
text-shadow: 0 0 34px color-mix(in oklch, var(--zd-accent) 32%, transparent);
|
|
316
318
|
}
|
|
317
319
|
html[data-theme-pack="drift"] .zd-content h2:where(:not(.zd-home-heading)):where(:not(.zd-compact-prose *)) {
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
320
|
+
border-image: none !important;
|
|
321
|
+
border-top-width: 0;
|
|
322
|
+
border-bottom-width: 0;
|
|
323
|
+
padding-top: 1.25rem;
|
|
324
|
+
padding-bottom: 0;
|
|
325
|
+
font-size: 1.75rem;
|
|
326
|
+
font-weight: 600;
|
|
327
|
+
line-height: 1.3;
|
|
328
|
+
background-image: linear-gradient(
|
|
329
|
+
to right,
|
|
330
|
+
var(--zd-accent) 0%,
|
|
331
|
+
var(--zd-accent) 32%,
|
|
332
|
+
color-mix(in oklch, var(--zd-accent) 58%, transparent) 72%,
|
|
333
|
+
transparent 100%
|
|
334
|
+
);
|
|
335
|
+
background-size: 100% 2px;
|
|
336
|
+
background-repeat: no-repeat;
|
|
337
|
+
background-position: top left;
|
|
328
338
|
}
|
|
329
339
|
html[data-theme-pack="drift"] .zd-content h3:where(:not(.zd-compact-prose *)) {
|
|
330
|
-
border-
|
|
340
|
+
border-image: none !important;
|
|
341
|
+
border-top-width: 0;
|
|
342
|
+
border-bottom-width: 0;
|
|
343
|
+
padding-top: 0.875rem;
|
|
344
|
+
padding-bottom: 0;
|
|
345
|
+
font-size: 1.375rem;
|
|
346
|
+
font-weight: 600;
|
|
347
|
+
line-height: 1.4;
|
|
348
|
+
background-image: linear-gradient(
|
|
349
|
+
to right,
|
|
350
|
+
color-mix(in oklch, var(--zd-muted) 42%, transparent),
|
|
351
|
+
color-mix(in oklch, var(--zd-muted) 22%, transparent) 40%,
|
|
352
|
+
transparent 76%
|
|
353
|
+
);
|
|
354
|
+
background-size: 100% 1px;
|
|
355
|
+
background-repeat: no-repeat;
|
|
356
|
+
background-position: top left;
|
|
357
|
+
}
|
|
358
|
+
html[data-theme-pack="drift"] .zd-content h4:where(:not(.zd-compact-prose *)) {
|
|
359
|
+
border-width: 0;
|
|
360
|
+
padding-top: 0;
|
|
361
|
+
padding-bottom: 0;
|
|
362
|
+
font-size: 1.2rem;
|
|
363
|
+
font-weight: 500;
|
|
364
|
+
line-height: 1.45;
|
|
365
|
+
background-image: none;
|
|
331
366
|
}
|
|
332
367
|
|
|
333
368
|
/* links: airy underline that brightens on approach */
|
|
@@ -232,21 +232,62 @@ html[data-theme-pack="fjord"] a[data-nav-active] {
|
|
|
232
232
|
box-shadow: 0 0 16px -4px color-mix(in oklch, var(--zd-accent) 55%, transparent);
|
|
233
233
|
}
|
|
234
234
|
|
|
235
|
-
/* headings:
|
|
236
|
-
fade
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
235
|
+
/* headings: a top-only rule hierarchy. h2 carries the 2px aurora
|
|
236
|
+
ribbon (cyan into blue) instead of the default fg fade, h3 a quieter
|
|
237
|
+
1px muted rule, h4 no rule. The rules are top-anchored background
|
|
238
|
+
gradients; border-image none !important (Decision 6.6's sole
|
|
239
|
+
allowlisted carve-out) keeps the SSR-inlined
|
|
240
|
+
`style="border-image:linear-gradient(...)"` from painting a second
|
|
241
|
+
bar. */
|
|
242
|
+
html[data-theme-pack="fjord"] .zd-content h2:where(:not(.zd-home-heading)):where(:not(.zd-compact-prose *)) {
|
|
243
|
+
border-image: none !important;
|
|
244
|
+
border-top-width: 0;
|
|
245
|
+
border-bottom-width: 0;
|
|
246
|
+
padding-top: 1.25rem;
|
|
247
|
+
padding-bottom: 0;
|
|
248
|
+
font-size: 1.75rem;
|
|
249
|
+
font-weight: 700;
|
|
250
|
+
line-height: 1.3;
|
|
251
|
+
background-image: linear-gradient(
|
|
252
|
+
to right,
|
|
253
|
+
light-dark(oklch(0.6 0.1 195), oklch(0.78 0.11 185)) 0%,
|
|
254
|
+
light-dark(oklch(0.6 0.1 195), oklch(0.78 0.11 185)) 24%,
|
|
255
|
+
light-dark(oklch(0.58 0.09 250), oklch(0.66 0.1 255)) 64%,
|
|
256
|
+
transparent 100%
|
|
257
|
+
);
|
|
258
|
+
background-size: 100% 2px;
|
|
259
|
+
background-repeat: no-repeat;
|
|
260
|
+
background-position: top left;
|
|
249
261
|
}
|
|
262
|
+
html[data-theme-pack="fjord"] .zd-content h3:where(:not(.zd-compact-prose *)) {
|
|
263
|
+
border-image: none !important;
|
|
264
|
+
border-top-width: 0;
|
|
265
|
+
border-bottom-width: 0;
|
|
266
|
+
padding-top: 0.875rem;
|
|
267
|
+
padding-bottom: 0;
|
|
268
|
+
font-size: 1.375rem;
|
|
269
|
+
font-weight: 600;
|
|
270
|
+
line-height: 1.4;
|
|
271
|
+
background-image: linear-gradient(
|
|
272
|
+
to right,
|
|
273
|
+
color-mix(in oklch, var(--zd-muted) 42%, transparent),
|
|
274
|
+
color-mix(in oklch, var(--zd-muted) 22%, transparent) 40%,
|
|
275
|
+
transparent 76%
|
|
276
|
+
);
|
|
277
|
+
background-size: 100% 1px;
|
|
278
|
+
background-repeat: no-repeat;
|
|
279
|
+
background-position: top left;
|
|
280
|
+
}
|
|
281
|
+
html[data-theme-pack="fjord"] .zd-content h4:where(:not(.zd-compact-prose *)) {
|
|
282
|
+
border-width: 0;
|
|
283
|
+
padding-top: 0;
|
|
284
|
+
padding-bottom: 0;
|
|
285
|
+
font-size: 1.2rem;
|
|
286
|
+
font-weight: 500;
|
|
287
|
+
line-height: 1.45;
|
|
288
|
+
background-image: none;
|
|
289
|
+
}
|
|
290
|
+
|
|
250
291
|
html[data-theme-pack="fjord"] .zd-content h1 {
|
|
251
292
|
color: color-mix(in oklch, var(--zd-accent) 10%, var(--zd-fg));
|
|
252
293
|
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"slug": "graphite",
|
|
4
|
+
"name": "Graphite",
|
|
5
|
+
"description": "Soft neutral graphite — low-glare grey paper by day, deep graphite at night, one warm copper accent, quiet hairline rules. The configured default.",
|
|
6
|
+
"mode": "dark",
|
|
7
|
+
"version": "1.0.0",
|
|
8
|
+
"fonts": {
|
|
9
|
+
"sans": "System",
|
|
10
|
+
"mono": "System",
|
|
11
|
+
"loaded": []
|
|
12
|
+
},
|
|
13
|
+
"preview": {
|
|
14
|
+
"light": {
|
|
15
|
+
"bg": "#F2F3F2",
|
|
16
|
+
"fg": "#3A4146",
|
|
17
|
+
"accent": "#9A4919",
|
|
18
|
+
"syntax": {
|
|
19
|
+
"keyword": "#9A4919",
|
|
20
|
+
"string": "#4E6552",
|
|
21
|
+
"comment": "#566168",
|
|
22
|
+
"callable": "#4B6373"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"dark": {
|
|
26
|
+
"bg": "#242629",
|
|
27
|
+
"fg": "#D3D5D9",
|
|
28
|
+
"accent": "#E9AA79",
|
|
29
|
+
"syntax": {
|
|
30
|
+
"keyword": "#E9AA79",
|
|
31
|
+
"string": "#9DBA9A",
|
|
32
|
+
"comment": "#ADB2B8",
|
|
33
|
+
"callable": "#9DB6C5"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|