@takazudo/zudo-doc 5.12.1 → 5.13.1
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 +23 -0
- package/dist/catalog.d.ts +42 -10
- package/dist/catalog.js +66 -2
- package/dist/chrome/derive.js +4 -2
- package/dist/color-scheme-utils.d.ts +2 -50
- package/dist/compiled.css +3622 -0
- package/dist/doc-body-end-islands/index.d.ts +6 -0
- package/dist/doc-body-end-islands/index.js +2 -1
- package/dist/doc-body-end-islands/theme-pack-switcher-island.d.ts +6 -0
- package/dist/doc-body-end-islands/theme-pack-switcher-island.js +8 -1
- package/dist/factory-context/index.d.ts +3 -35
- package/dist/features.css +5 -0
- package/dist/header-with-defaults/index.js +1 -1
- package/dist/hydration-pending.d.ts +5 -0
- package/dist/hydration-pending.js +9 -0
- package/dist/plugins/internal/theme-packs/resolve.d.ts +1 -1
- package/dist/plugins/internal/theme-packs/resolve.js +2 -4
- package/dist/plugins/routes.js +2 -4
- package/dist/route-context-payload/index.d.ts +60 -0
- package/dist/route-context-payload/index.js +48 -0
- package/dist/route-context-payload/types.d.ts +115 -0
- package/dist/route-context-payload/types.js +0 -0
- package/dist/safelist.css +1 -1
- package/dist/settings.d.ts +1 -17
- package/dist/sidebar-tree-island/index.js +1 -1
- package/dist/theme-cli/registry.d.ts +1 -1
- package/dist/theme-cli/registry.js +1 -3
- package/dist/theme-pack-switcher/index.d.ts +3 -1
- package/dist/theme-pack-switcher/index.js +14 -2
- package/dist/theme-packs-registry/build-registry.d.ts +41 -0
- package/dist/theme-packs-registry/build-registry.js +62 -0
- package/dist/theme-packs-registry/index.d.ts +2 -1
- package/dist/theme-packs-registry/index.js +6 -4
- package/dist/theme-packs-registry/load-registry.d.ts +2 -13
- package/dist/theme-packs-registry/meta-schema.d.ts +1 -21
- package/dist/theme-packs-registry/resolve-enabled-packs.d.ts +1 -1
- package/dist/theme-packs-registry/types.d.ts +1 -0
- package/dist/theme-packs-registry/types.js +0 -0
- package/dist/theme-toggle/index.d.ts +3 -1
- package/dist/theme-toggle/index.js +7 -1
- package/dist/transitions/nested-island-props-refresh.d.ts +3 -1
- package/dist/transitions/nested-island-props-refresh.js +89 -13
- package/eject/sidebar-tree-island/index.tsx +3 -1
- package/eject/theme-toggle/hydration-pending.ts +13 -0
- package/eject/theme-toggle/index.tsx +8 -0
- package/package.json +19 -10
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,29 @@ All notable changes to `@takazudo/zudo-doc` are documented in this file.
|
|
|
4
4
|
|
|
5
5
|
The format is based on Keep a Changelog, and release notes are generated from the changelog MDX pages.
|
|
6
6
|
|
|
7
|
+
## [5.13.1] - 2026-08-28
|
|
8
|
+
|
|
9
|
+
### Other Changes
|
|
10
|
+
|
|
11
|
+
- Raised the `@takazudo/zfb`, `@takazudo/zfb-runtime`, and `@takazudo/zfb-md-wasm` peer range to `^2.13.1`, and the `@takazudo/zudo-doc-history-server` peer floor to `^5.13.0`. (`c36fd4d0`)
|
|
12
|
+
|
|
13
|
+
## [5.13.0] - 2026-08-27
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
- Added browser-safe route-context payload types, `createRouteContextPayload()`, and a theme-pack registry builder so host applications can render package-default chrome outside the zfb route runtime. (`f25c76b9`, `e5db342e`, `b7221d01`)
|
|
18
|
+
- Published theme catalog schema v2 with explicit stylesheet capability metadata and runtime validation. (`169c9103`)
|
|
19
|
+
- Added the deterministic, browser-ready `@takazudo/zudo-doc/compiled.css` export, now built with zfb's standalone CSS compiler. (`3258a445`, `211b4e7b`)
|
|
20
|
+
- Made theme controls accessible but inactive until hydration completes, with `pendingUntilHydrated={false}` available for direct consumers that can activate earlier. (`2c71e483`, `b2faceb7`)
|
|
21
|
+
|
|
22
|
+
### Bug Fixes
|
|
23
|
+
|
|
24
|
+
- Aligned persisted nested-island prop refresh with the router's abort-safe commit boundary, preventing stale navigation data from reaching the live page during Back-navigation races. (`4a0ffce6`)
|
|
25
|
+
|
|
26
|
+
### Other Changes
|
|
27
|
+
|
|
28
|
+
- Updated the zfb peer package family to 2.12.0. (`9cf3fd4b`)
|
|
29
|
+
|
|
7
30
|
## [5.12.1] - 2026-08-24
|
|
8
31
|
|
|
9
32
|
### Bug Fixes
|
package/dist/catalog.d.ts
CHANGED
|
@@ -1,20 +1,52 @@
|
|
|
1
1
|
// GENERATED FILE — do not edit by hand.
|
|
2
|
-
// Produced by scripts/gen-catalog.mjs (zudolab/zudo-doc#3349) from the
|
|
2
|
+
// Produced by scripts/gen-catalog.mjs (zudolab/zudo-doc#3349, #3675) from the
|
|
3
3
|
// validated src/theme-packs/<slug>/meta.json registry. Re-run `pnpm build`
|
|
4
4
|
// to regenerate after adding, removing, or editing a theme pack.
|
|
5
|
+
// Catalog schemaVersion 2 is distinct from each pack's meta.json schemaVersion 1.
|
|
5
6
|
import type { ThemePackMeta } from "./theme-packs-registry/meta-schema.js";
|
|
6
7
|
|
|
7
8
|
export type { ThemePackMeta };
|
|
8
9
|
|
|
9
|
-
/**
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
/** One entry in the browser-facing catalog (catalog schemaVersion 2). */
|
|
11
|
+
export interface ThemePackCatalogEntry {
|
|
12
|
+
/** The pack directory slug. */
|
|
13
|
+
slug: string;
|
|
14
|
+
/** The pack's metadata; its own meta.json schemaVersion is currently 1. */
|
|
15
|
+
meta: ThemePackMeta;
|
|
16
|
+
/** Whether the pack ships a pack.css stylesheet, from the real registry. */
|
|
17
|
+
hasStylesheet: boolean;
|
|
17
18
|
}
|
|
18
19
|
|
|
19
|
-
|
|
20
|
+
/** The v2 catalog entry is structurally the same as a resolved registry entry. */
|
|
21
|
+
export type ThemePackRegistryEntry = ThemePackCatalogEntry;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The browser-facing theme-pack catalog manifest.
|
|
25
|
+
*
|
|
26
|
+
* This catalog schemaVersion 2 is distinct from each pack's meta.json
|
|
27
|
+
* schemaVersion 1. The two version numbers are unrelated and must not be
|
|
28
|
+
* conflated. The manifest is declared here instead of importing the
|
|
29
|
+
* postBuild-time theme-packs/index.json type so the browser export keeps its
|
|
30
|
+
* own contract and remains free of node-touching imports.
|
|
31
|
+
*/
|
|
32
|
+
export interface ThemePacksCatalogManifest {
|
|
33
|
+
schemaVersion: 2;
|
|
34
|
+
packs: ThemePackCatalogEntry[];
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @deprecated Use ThemePacksCatalogManifest. This catalog-only legacy name is
|
|
39
|
+
* not the postBuild plugin's separate `ThemePacksIndexManifest` type.
|
|
40
|
+
*/
|
|
41
|
+
export type ThemePacksIndexManifest = ThemePacksCatalogManifest;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Validate and return a browser-facing catalog manifest. Throws when the
|
|
45
|
+
* catalog is not schemaVersion 2 or has malformed v2 entries.
|
|
46
|
+
*/
|
|
47
|
+
export declare function validateThemePackCatalog(
|
|
48
|
+
value: unknown,
|
|
49
|
+
): ThemePacksCatalogManifest;
|
|
50
|
+
|
|
51
|
+
declare const catalog: ThemePacksCatalogManifest;
|
|
20
52
|
export default catalog;
|
package/dist/catalog.js
CHANGED
|
@@ -1,7 +1,71 @@
|
|
|
1
1
|
// GENERATED FILE — do not edit by hand.
|
|
2
|
-
// Produced by scripts/gen-catalog.mjs (zudolab/zudo-doc#3349) from the
|
|
2
|
+
// Produced by scripts/gen-catalog.mjs (zudolab/zudo-doc#3349, #3675) from the
|
|
3
3
|
// validated src/theme-packs/<slug>/meta.json registry. Re-run `pnpm build`
|
|
4
4
|
// to regenerate after adding, removing, or editing a theme pack.
|
|
5
|
-
const catalog = {"schemaVersion":1,"packs":[{"schemaVersion":1,"slug":"default","name":"Default","description":"The stock zudo-doc look. No pack stylesheet is loaded — your project's configured color scheme and fonts render unchanged.","mode":"dark","version":"1.0.0","fonts":{"sans":"System","mono":"System","loaded":[]},"preview":{"light":{"bg":"oklch(0.965 0.004 65)","fg":"oklch(0.185 0.005 65)","accent":"oklch(0.470 0.120 56)","syntax":{"keyword":"oklch(0.470 0.120 56)","string":"oklch(0.470 0.140 145)","comment":"oklch(0.480 0.008 65)","callable":"oklch(0.485 0.122 245)"}},"dark":{"bg":"oklch(0.185 0.005 65)","fg":"oklch(0.965 0.004 65)","accent":"oklch(0.700 0.158 62)","syntax":{"keyword":"oklch(0.700 0.158 62)","string":"oklch(0.680 0.145 145)","comment":"oklch(0.705 0.008 65)","callable":"oklch(0.680 0.130 245)"}}}},{"schemaVersion":1,"slug":"academia","name":"Academia","description":"A LaTeX paper for the web — white page, Computer-Modern-black ink, hyperref navy links, numbered theorem admonitions, booktabs tables. Dark mode is a scholarly slate.","mode":"light","version":"1.0.1","fonts":{"sans":"Source Serif 4","mono":"Courier Prime","loaded":["Source Serif 4","Courier Prime"]},"preview":{"light":{"bg":"#ffffff","fg":"#141414","accent":"#1c3d8f","syntax":{"keyword":"#1c3d8f","string":"#93262a","comment":"#2e6b2e","callable":"#295e80"}},"dark":{"bg":"#1d222b","fg":"#e7eaf0","accent":"#97b8ee","syntax":{"keyword":"#a3c0f2","string":"#e0a09a","comment":"#8cbc8c","callable":"#85c2da"}}}},{"schemaVersion":1,"slug":"bauhaus","name":"Bauhaus","description":"Primary triad as structure — gallery white, near-black ink, and red, yellow, blue doing structural work: circle, triangle, square markers, thick geometric rules, zero radius.","mode":"light","version":"1.0.0","fonts":{"sans":"Jost","mono":"Space Mono","display":"Archivo Black","loaded":["Jost","Archivo Black","Space Mono"]},"preview":{"light":{"bg":"#ffffff","fg":"#141414","accent":"#b3231b","syntax":{"keyword":"#b3231b","string":"#6d5800","comment":"#63615a","callable":"#1c4bbe"}},"dark":{"bg":"#18181b","fg":"#f0efe9","accent":"#ff7d70","syntax":{"keyword":"#ff7d70","string":"#e9ce6a","comment":"#999689","callable":"#8fb0ff"}}}},{"schemaVersion":1,"slug":"beacon","name":"Beacon","description":"WCAG-AAA high contrast — 7:1+ ink everywhere, 3px focus rings, always-underlined links. Clarity as beauty.","mode":"light","version":"1.0.1","fonts":{"sans":"Atkinson Hyperlegible","mono":"Atkinson Hyperlegible Mono","loaded":["Atkinson Hyperlegible","Atkinson Hyperlegible Mono"]},"preview":{"light":{"bg":"#ffffff","fg":"#000000","accent":"#0044cc","syntax":{"keyword":"#0044cc","string":"#a50000","comment":"#595959","callable":"#00287a"}},"dark":{"bg":"#000000","fg":"#ffffff","accent":"#6db3ff","syntax":{"keyword":"#6db3ff","string":"#ff8f8f","comment":"#b3b3b3","callable":"#a8d1ff"}}}},{"schemaVersion":1,"slug":"blueprint","name":"Blueprint","description":"Cyanotype drafting sheet — pale-cyan linework on prussian grid paper, title-block caps, dashed rules, mono-caps labels. Light mode is the vellum original.","mode":"dark","version":"1.0.1","fonts":{"sans":"Inter","mono":"IBM Plex Mono","display":"Josefin Sans","loaded":["Inter","Josefin Sans","IBM Plex Mono"]},"preview":{"light":{"bg":"oklch(0.965 0.012 235)","fg":"oklch(0.28 0.05 253)","accent":"oklch(0.44 0.095 235)","syntax":{"keyword":"oklch(0.46 0.1 80)","string":"oklch(0.43 0.085 195)","comment":"oklch(0.5 0.03 248)","callable":"oklch(0.44 0.09 235)"}},"dark":{"bg":"oklch(0.27 0.055 252)","fg":"oklch(0.965 0.01 220)","accent":"oklch(0.86 0.09 205)","syntax":{"keyword":"oklch(0.87 0.12 95)","string":"oklch(0.83 0.1 185)","comment":"oklch(0.72 0.032 235)","callable":"oklch(0.83 0.085 215)"}}}},{"schemaVersion":1,"slug":"botanica","name":"Botanica","description":"A vintage botanical plate — herbarium cream, deep green ink, engraved double rules, Latin small-caps plate labels.","mode":"light","version":"1.0.0","fonts":{"sans":"Crimson Pro","mono":"Courier Prime","display":"Cormorant Garamond","loaded":["Cormorant Garamond","Crimson Pro","Courier Prime"]},"preview":{"light":{"bg":"oklch(0.956 0.02 92)","fg":"oklch(0.29 0.03 95)","accent":"oklch(0.42 0.09 152)","syntax":{"keyword":"oklch(0.4 0.075 60)","string":"oklch(0.43 0.095 150)","comment":"oklch(0.48 0.04 95)","callable":"oklch(0.43 0.075 205)"}},"dark":{"bg":"oklch(0.215 0.022 160)","fg":"oklch(0.92 0.02 95)","accent":"oklch(0.78 0.09 148)","syntax":{"keyword":"oklch(0.82 0.085 80)","string":"oklch(0.8 0.095 145)","comment":"oklch(0.7 0.03 110)","callable":"oklch(0.78 0.075 200)"}}}},{"schemaVersion":1,"slug":"broadsheet","name":"Broadsheet","description":"Newspaper editorial — Playfair masthead, Oxford ink rules, a red drop cap, and a night-edition dark mode.","mode":"light","version":"1.0.2","fonts":{"sans":"Source Serif 4","mono":"Courier Prime","display":"Playfair Display","loaded":["Playfair Display","Source Serif 4","Courier Prime"]},"preview":{"light":{"bg":"oklch(0.955 0.012 92)","fg":"oklch(0.205 0.012 80)","accent":"oklch(0.455 0.155 27)","syntax":{"keyword":"oklch(0.445 0.155 27)","string":"oklch(0.45 0.075 60)","comment":"oklch(0.5 0.016 78)","callable":"oklch(0.42 0.09 252)"}},"dark":{"bg":"oklch(0.185 0.012 75)","fg":"oklch(0.935 0.015 90)","accent":"oklch(0.7 0.145 27)","syntax":{"keyword":"oklch(0.72 0.14 27)","string":"oklch(0.79 0.07 70)","comment":"oklch(0.7 0.02 85)","callable":"oklch(0.74 0.08 248)"}}}},{"schemaVersion":1,"slug":"brutalist","name":"Brutalist","description":"Raw concrete web — stark black on white, 4px slab borders, zero radius, hazard-orange tape. Structure you can see.","mode":"light","version":"1.0.3","fonts":{"sans":"Space Grotesk","mono":"IBM Plex Mono","display":"Archivo Black","loaded":["Archivo Black","Space Grotesk","IBM Plex Mono"]},"preview":{"light":{"bg":"#ffffff","fg":"#000000","accent":"#c2410c","syntax":{"keyword":"#c2410c","string":"#9a3412","comment":"#767676","callable":"#000000"}},"dark":{"bg":"#0d0d0d","fg":"#f5f5f5","accent":"#ff6a1f","syntax":{"keyword":"#ff7a2e","string":"#ffb38a","comment":"#878787","callable":"#ffffff"}}}},{"schemaVersion":1,"slug":"drift","name":"Drift","description":"Floaty slate-blue comfort dark for long reading — soft glows in place of borders, gentle elevation, relaxed Plex type.","mode":"dark","version":"1.0.2","fonts":{"sans":"IBM Plex Sans","mono":"IBM Plex Mono","loaded":["IBM Plex Sans","IBM Plex Mono"]},"preview":{"light":{"bg":"#edf2f6","fg":"#24303d","accent":"#236799","syntax":{"keyword":"#49539c","string":"#2b754f","comment":"#596673","callable":"#00688d"}},"dark":{"bg":"#181f26","fg":"#d6dee4","accent":"#6cafd9","syntax":{"keyword":"#9caeee","string":"#88cba4","comment":"#8494a4","callable":"#75c6e1"}}}},{"schemaVersion":1,"slug":"eink","name":"E-Ink","description":"E-reader grayscale — warm paper, near-black ink, shadowless hairline chrome, zero radius. Code is told by weight, slant, and gray value; only diffs keep a trace of ink-blue and ink-red.","mode":"light","version":"1.0.0","fonts":{"sans":"EB Garamond","mono":"Courier Prime","loaded":["EB Garamond","Courier Prime"]},"preview":{"light":{"bg":"oklch(0.956 0.007 90)","fg":"oklch(0.24 0.012 85)","accent":"oklch(0.155 0.01 85)","syntax":{"keyword":"oklch(0.18 0.01 85)","string":"oklch(0.46 0.012 85)","comment":"oklch(0.505 0.01 85)","callable":"oklch(0.31 0.012 85)"}},"dark":{"bg":"oklch(0.215 0.008 80)","fg":"oklch(0.885 0.012 85)","accent":"oklch(0.955 0.008 85)","syntax":{"keyword":"oklch(0.96 0.008 85)","string":"oklch(0.715 0.012 85)","comment":"oklch(0.645 0.01 85)","callable":"oklch(0.82 0.01 85)"}}}},{"schemaVersion":1,"slug":"fjord","name":"Fjord","description":"Polar-night blue under a faint aurora — frost-cyan accents, icy borders, snow-white text. Cold nordic calm.","mode":"dark","version":"1.0.2","fonts":{"sans":"Inter","mono":"JetBrains Mono","loaded":["Inter","JetBrains Mono"]},"preview":{"light":{"bg":"oklch(0.971 0.008 230)","fg":"oklch(0.255 0.03 255)","accent":"oklch(0.455 0.092 205)","syntax":{"keyword":"oklch(0.455 0.105 250)","string":"oklch(0.495 0.105 165)","comment":"oklch(0.51 0.03 245)","callable":"oklch(0.445 0.098 202)"}},"dark":{"bg":"oklch(0.232 0.024 255)","fg":"oklch(0.93 0.012 235)","accent":"oklch(0.79 0.095 195)","syntax":{"keyword":"oklch(0.76 0.095 242)","string":"oklch(0.8 0.105 158)","comment":"oklch(0.63 0.03 245)","callable":"oklch(0.815 0.095 195)"}}}},{"schemaVersion":1,"slug":"foundry","name":"Foundry","description":"GitHub-neutral baseline — white paper, near-black ink, Primer-blue links, quiet gray rules. Restraint, perfected.","mode":"light","version":"1.0.2","fonts":{"sans":"Inter","mono":"System","loaded":["Inter"]},"preview":{"light":{"bg":"#ffffff","fg":"#1f2328","accent":"#0969da","syntax":{"keyword":"#cf222e","string":"#0a3069","comment":"#6e7781","callable":"#8250df"}},"dark":{"bg":"#0d1117","fg":"#e6edf3","accent":"#4493f8","syntax":{"keyword":"#ff7b72","string":"#a5d6ff","comment":"#8b949e","callable":"#d2a8ff"}}}},{"schemaVersion":1,"slug":"futura-editorial","name":"Futura Editorial","description":"Normal-weight geometric Futura headings over Noto Sans body — clean white, near-black ink, one restrained red accent.","mode":"light","version":"1.0.1","fonts":{"sans":"Noto Sans","mono":"Space Mono","display":"Jost","loaded":["Jost","Noto Sans","Space Mono"]},"preview":{"light":{"bg":"oklch(1 0 0)","fg":"oklch(0.17 0 0)","accent":"oklch(0.505 0.18 28)","syntax":{"keyword":"oklch(0.505 0.18 28)","string":"oklch(0.47 0.09 160)","comment":"oklch(0.52 0 0)","callable":"oklch(0.45 0.1 250)"}},"dark":{"bg":"oklch(0.165 0 0)","fg":"oklch(0.935 0 0)","accent":"oklch(0.72 0.15 29)","syntax":{"keyword":"oklch(0.72 0.15 29)","string":"oklch(0.76 0.1 160)","comment":"oklch(0.63 0 0)","callable":"oklch(0.73 0.095 250)"}}}},{"schemaVersion":1,"slug":"hearth","name":"Hearth","description":"Warm cream & brick-red fireside docs — Fraunces headings, amber code blocks, ember-glow dark mode.","mode":"light","version":"1.0.3","fonts":{"sans":"Nunito","mono":"Spline Sans Mono","display":"Fraunces","loaded":["Fraunces","Nunito","Spline Sans Mono"]},"preview":{"light":{"bg":"oklch(0.958 0.02 85)","fg":"oklch(0.255 0.028 40)","accent":"oklch(0.49 0.145 31)","syntax":{"keyword":"oklch(0.48 0.148 30)","string":"oklch(0.47 0.1 135)","comment":"oklch(0.51 0.035 60)","callable":"oklch(0.45 0.092 245)"}},"dark":{"bg":"oklch(0.215 0.022 45)","fg":"oklch(0.915 0.02 80)","accent":"oklch(0.735 0.128 45)","syntax":{"keyword":"oklch(0.745 0.138 40)","string":"oklch(0.785 0.1 130)","comment":"oklch(0.645 0.032 65)","callable":"oklch(0.765 0.075 235)"}}}},{"schemaVersion":1,"slug":"hollow","name":"Hollow","description":"Dark violet space — neon pink headings, violet links, a quiet starfield, and razor-square midnight chrome.","mode":"dark","version":"1.0.2","fonts":{"sans":"Space Grotesk","mono":"Space Mono","loaded":["Space Grotesk","Space Mono"]},"preview":{"light":{"bg":"oklch(0.962 0.012 300)","fg":"oklch(0.24 0.045 295)","accent":"oklch(0.45 0.17 300)","syntax":{"keyword":"oklch(0.53 0.2 348)","string":"oklch(0.45 0.1 195)","comment":"oklch(0.51 0.035 292)","callable":"oklch(0.46 0.16 300)"}},"dark":{"bg":"oklch(0.155 0.035 295)","fg":"oklch(0.93 0.015 295)","accent":"oklch(0.74 0.14 300)","syntax":{"keyword":"oklch(0.76 0.17 347)","string":"oklch(0.83 0.1 190)","comment":"oklch(0.62 0.045 292)","callable":"oklch(0.76 0.13 300)"}}}},{"schemaVersion":1,"slug":"ledger","name":"Ledger","description":"Cream academic serif in the Tufte tradition — warm paper, ink prose, oxblood links, hairline rules, quiet code.","mode":"light","version":"1.0.1","fonts":{"sans":"Crimson Pro","mono":"IBM Plex Mono","loaded":["Crimson Pro","IBM Plex Mono"]},"preview":{"light":{"bg":"#fffff8","fg":"#16130e","accent":"#8b1a1a","syntax":{"keyword":"#8b1a1a","string":"#4e6328","comment":"#766b5c","callable":"#33586e"}},"dark":{"bg":"#191510","fg":"#e9e2d0","accent":"#d68a75","syntax":{"keyword":"#e2907c","string":"#a8b47c","comment":"#948a77","callable":"#93b4cd"}}}},{"schemaVersion":1,"slug":"manuscript","name":"Manuscript","description":"A quiet Garamond book page — warm paper, soft ink, sepia rubrication, small-caps subheads, fleuron section marks.","mode":"light","version":"1.0.1","fonts":{"sans":"EB Garamond","mono":"Courier Prime","loaded":["EB Garamond","Courier Prime"]},"preview":{"light":{"bg":"oklch(0.963 0.013 85)","fg":"oklch(0.245 0.018 60)","accent":"oklch(0.44 0.095 55)","syntax":{"keyword":"oklch(0.455 0.13 30)","string":"oklch(0.44 0.085 150)","comment":"oklch(0.5 0.03 70)","callable":"oklch(0.435 0.09 275)"}},"dark":{"bg":"oklch(0.215 0.015 65)","fg":"oklch(0.885 0.022 80)","accent":"oklch(0.735 0.095 70)","syntax":{"keyword":"oklch(0.72 0.115 35)","string":"oklch(0.745 0.085 150)","comment":"oklch(0.645 0.03 75)","callable":"oklch(0.745 0.07 275)"}}}},{"schemaVersion":1,"slug":"matcha","name":"Matcha","description":"Green tea ceremony — deep matcha on warm cream, mincho headings, zen whitespace, tea-foam surfaces in both modes.","mode":"light","version":"1.0.2","fonts":{"sans":"Zen Kaku Gothic New","mono":"M PLUS 1 Code","display":"Shippori Mincho","loaded":["Zen Kaku Gothic New","Shippori Mincho","M PLUS 1 Code"]},"preview":{"light":{"bg":"oklch(0.973 0.012 106)","fg":"oklch(0.245 0.018 148)","accent":"oklch(0.435 0.105 142)","syntax":{"keyword":"oklch(0.418 0.105 150)","string":"oklch(0.47 0.092 106)","comment":"oklch(0.512 0.034 130)","callable":"oklch(0.438 0.082 196)"}},"dark":{"bg":"oklch(0.205 0.016 152)","fg":"oklch(0.938 0.018 106)","accent":"oklch(0.79 0.115 138)","syntax":{"keyword":"oklch(0.782 0.118 148)","string":"oklch(0.822 0.102 108)","comment":"oklch(0.668 0.034 130)","callable":"oklch(0.772 0.088 192)"}}}},{"schemaVersion":1,"slug":"nocturne","name":"Nocturne","description":"Purple midnight — velvet aubergine depths, lavender links, and muted gold hairlines. Elegant, never neon.","mode":"dark","version":"1.0.2","fonts":{"sans":"Manrope","mono":"IBM Plex Mono","display":"Cormorant Garamond","loaded":["Cormorant Garamond","Manrope","IBM Plex Mono"]},"preview":{"light":{"bg":"oklch(0.958 0.012 300)","fg":"oklch(0.245 0.05 312)","accent":"oklch(0.455 0.15 295)","syntax":{"keyword":"oklch(0.46 0.16 295)","string":"oklch(0.5 0.105 85)","comment":"oklch(0.5 0.042 305)","callable":"oklch(0.455 0.125 265)"}},"dark":{"bg":"oklch(0.155 0.03 310)","fg":"oklch(0.922 0.018 300)","accent":"oklch(0.765 0.105 292)","syntax":{"keyword":"oklch(0.772 0.128 293)","string":"oklch(0.8 0.108 88)","comment":"oklch(0.645 0.045 302)","callable":"oklch(0.77 0.095 262)"}}}},{"schemaVersion":1,"slug":"observatory","name":"Observatory","description":"Night-sky atlas: star-field depth, constellation-line rules, nebula violet and comet gold over astronomer's navy.","mode":"dark","version":"1.0.3","fonts":{"sans":"Jost","mono":"Space Mono","display":"Josefin Sans","loaded":["Josefin Sans","Jost","Space Mono"]},"preview":{"light":{"bg":"oklch(0.965 0.012 255)","fg":"oklch(0.235 0.045 268)","accent":"oklch(0.47 0.1 75)","syntax":{"keyword":"oklch(0.46 0.14 300)","string":"oklch(0.45 0.1 162)","comment":"oklch(0.5 0.03 265)","callable":"oklch(0.46 0.11 250)"}},"dark":{"bg":"oklch(0.155 0.028 268)","fg":"oklch(0.93 0.015 255)","accent":"oklch(0.82 0.13 86)","syntax":{"keyword":"oklch(0.76 0.118 300)","string":"oklch(0.8 0.112 162)","comment":"oklch(0.61 0.038 265)","callable":"oklch(0.78 0.095 240)"}}}},{"schemaVersion":1,"slug":"onyx","name":"Onyx","description":"Luxury noir — jet black, champagne serif headings, and a single gold hairline accent. Watch-brand restraint.","mode":"dark","version":"1.0.3","fonts":{"sans":"Jost","mono":"IBM Plex Mono","display":"Cormorant Garamond","loaded":["Cormorant Garamond","Jost","IBM Plex Mono"]},"preview":{"light":{"bg":"oklch(0.972 0.005 85)","fg":"oklch(0.22 0.012 80)","accent":"oklch(0.5 0.105 80)","syntax":{"keyword":"oklch(0.51 0.105 82)","string":"oklch(0.47 0.07 155)","comment":"oklch(0.5 0.015 85)","callable":"oklch(0.45 0.045 250)"}},"dark":{"bg":"oklch(0.145 0.003 80)","fg":"oklch(0.92 0.022 88)","accent":"oklch(0.79 0.115 88)","syntax":{"keyword":"oklch(0.8 0.115 88)","string":"oklch(0.78 0.07 155)","comment":"oklch(0.62 0.02 85)","callable":"oklch(0.82 0.04 250)"}}}},{"schemaVersion":1,"slug":"phosphor","name":"Phosphor","description":"Green CRT terminal — phosphor glow, scanlines, inverse-video nav, monospace everything.","mode":"dark","version":"1.0.1","fonts":{"sans":"JetBrains Mono","mono":"JetBrains Mono","display":"VT323","loaded":["VT323","JetBrains Mono"]},"preview":{"light":{"bg":"oklch(0.955 0.014 150)","fg":"oklch(0.28 0.058 150)","accent":"oklch(0.42 0.13 150)","syntax":{"keyword":"oklch(0.4 0.13 148)","string":"oklch(0.39 0.095 165)","comment":"oklch(0.49 0.05 150)","callable":"oklch(0.43 0.095 200)"}},"dark":{"bg":"oklch(0.135 0.014 150)","fg":"oklch(0.845 0.145 150)","accent":"oklch(0.87 0.215 148)","syntax":{"keyword":"oklch(0.9 0.21 148)","string":"oklch(0.9 0.12 165)","comment":"oklch(0.58 0.062 150)","callable":"oklch(0.83 0.125 200)"}}}},{"schemaVersion":1,"slug":"riso","name":"Riso","description":"Risograph duotone print — warm paper, two inks (riso blue + fluorescent coral), misregistered offset shadows, and a soft linear paper grain.","mode":"light","version":"1.0.0","fonts":{"sans":"Space Grotesk","mono":"Space Mono","display":"Archivo Black","loaded":["Space Grotesk","Archivo Black","Space Mono"]},"preview":{"light":{"bg":"#f9f3e5","fg":"#1d3345","accent":"#0d5c94","syntax":{"keyword":"#a02310","string":"#0d5e6e","comment":"#4d5c66","callable":"#0b5b9b"}},"dark":{"bg":"#101d28","fg":"#f1e9d8","accent":"#58b8e8","syntax":{"keyword":"#ff8d72","string":"#66d4cf","comment":"#93a4ad","callable":"#5aaef5"}}}},{"schemaVersion":1,"slug":"sakura","name":"Sakura","description":"Cherry-blossom pastels — blush-white paper, plum ink, and rose accents on petal-soft corners; dark mode is yozakura, night blossoms under lantern-pink light.","mode":"light","version":"1.0.1","fonts":{"sans":"Nunito","mono":"M PLUS 1 Code","display":"Shippori Mincho","loaded":["Nunito","Shippori Mincho","M PLUS 1 Code"]},"preview":{"light":{"bg":"oklch(0.977 0.009 350)","fg":"oklch(0.29 0.055 340)","accent":"oklch(0.5 0.168 358)","syntax":{"keyword":"oklch(0.5 0.168 358)","string":"oklch(0.49 0.115 150)","comment":"oklch(0.5 0.04 340)","callable":"oklch(0.49 0.135 300)"}},"dark":{"bg":"oklch(0.215 0.03 330)","fg":"oklch(0.935 0.014 350)","accent":"oklch(0.78 0.115 355)","syntax":{"keyword":"oklch(0.79 0.125 355)","string":"oklch(0.78 0.115 150)","comment":"oklch(0.71 0.038 345)","callable":"oklch(0.78 0.105 300)"}}}},{"schemaVersion":1,"slug":"scandi","name":"Scandi","description":"Hygge minimalism — oat linen, sage & clay, pill nav actives and 8px corners; night mode is warm charcoal lit by candle amber.","mode":"light","version":"1.0.0","fonts":{"sans":"Manrope","mono":"Spline Sans Mono","loaded":["Manrope","Spline Sans Mono"]},"preview":{"light":{"bg":"oklch(0.963 0.012 83)","fg":"oklch(0.28 0.02 55)","accent":"oklch(0.44 0.08 152)","syntax":{"keyword":"oklch(0.47 0.105 40)","string":"oklch(0.45 0.09 150)","comment":"oklch(0.5 0.02 70)","callable":"oklch(0.45 0.08 240)"}},"dark":{"bg":"oklch(0.235 0.015 55)","fg":"oklch(0.92 0.012 85)","accent":"oklch(0.82 0.105 75)","syntax":{"keyword":"oklch(0.76 0.1 45)","string":"oklch(0.78 0.09 150)","comment":"oklch(0.66 0.02 75)","callable":"oklch(0.75 0.075 238)"}}}},{"schemaVersion":1,"slug":"solar","name":"Solar","description":"Solarized precision — low-eyestrain paper tones, blue/cyan/orange accents, mono labels, technical calm in both modes.","mode":"light","version":"1.0.1","fonts":{"sans":"Source Sans 3","mono":"Source Code Pro","loaded":["Source Sans 3","Source Code Pro"]},"preview":{"light":{"bg":"#fdf6e3","fg":"#4f6369","accent":"#1c6a9f","syntax":{"keyword":"#606f00","string":"#12746c","comment":"#586b72","callable":"#1d6da3"}},"dark":{"bg":"#002b36","fg":"#93a1a1","accent":"#53a6df","syntax":{"keyword":"#8ea300","string":"#2caaa0","comment":"#899da4","callable":"#49a0dd"}}}},{"schemaVersion":1,"slug":"sumi","name":"Sumi","description":"Sumi-e ink on washi — bold mincho brush headings, deep black strokes, one vermillion hanko seal accent.","mode":"light","version":"1.0.3","fonts":{"sans":"Zen Kaku Gothic New","mono":"IBM Plex Mono","display":"Shippori Mincho B1","loaded":["Shippori Mincho B1","Zen Kaku Gothic New","IBM Plex Mono"]},"preview":{"light":{"bg":"#f7f4ec","fg":"#1b1a18","accent":"#b8232e","syntax":{"keyword":"#b8232e","string":"#6a6156","comment":"#726b5e","callable":"#433d35"}},"dark":{"bg":"#161514","fg":"#ece7db","accent":"#ea6a72","syntax":{"keyword":"#ee7a81","string":"#c8bfa6","comment":"#837d72","callable":"#f4efe4"}}}},{"schemaVersion":1,"slug":"swissgrid","name":"Swissgrid","description":"International Typographic Style — grid discipline, black on white, one hot Swiss-red accent, oversized section numbers.","mode":"light","version":"1.0.1","fonts":{"sans":"Inter","mono":"IBM Plex Mono","display":"Inter Tight","loaded":["Inter","Inter Tight","IBM Plex Mono"]},"preview":{"light":{"bg":"#ffffff","fg":"#0a0a0a","accent":"#e60000","syntax":{"keyword":"#d40000","string":"#3f3f3f","comment":"#6b6b6b","callable":"#0a0a0a"}},"dark":{"bg":"#0c0c0c","fg":"#f2f2f2","accent":"#ff4d4d","syntax":{"keyword":"#ff4d4d","string":"#c9c9c9","comment":"#8c8c8c","callable":"#ffffff"}}}},{"schemaVersion":1,"slug":"tidepool","name":"Tidepool","description":"Marine teal dark — deep-sea teal surfaces, seafoam text, bioluminescent aqua accents, kelp-green success, coral danger. Light mode is the same pool at low tide.","mode":"dark","version":"1.0.0","fonts":{"sans":"Space Grotesk","mono":"JetBrains Mono","loaded":["Space Grotesk","JetBrains Mono"]},"preview":{"light":{"bg":"oklch(0.966 0.013 165)","fg":"oklch(0.27 0.045 200)","accent":"oklch(0.43 0.073 195)","syntax":{"keyword":"oklch(0.42 0.071 193)","string":"oklch(0.42 0.11 150)","comment":"oklch(0.44 0.03 200)","callable":"oklch(0.44 0.089 232)"}},"dark":{"bg":"oklch(0.235 0.032 205)","fg":"oklch(0.92 0.028 180)","accent":"oklch(0.82 0.13 185)","syntax":{"keyword":"oklch(0.84 0.14 183)","string":"oklch(0.83 0.14 152)","comment":"oklch(0.69 0.035 195)","callable":"oklch(0.8 0.1 228)"}}}},{"schemaVersion":1,"slug":"timberline","name":"Timberline","description":"Forest cabin after dark — pine & umber planks, cream prose, and matte lantern-amber accents; light mode is the same lodge at morning.","mode":"dark","version":"1.0.1","fonts":{"sans":"Source Sans 3","mono":"JetBrains Mono","display":"Fraunces","loaded":["Fraunces","Source Sans 3","JetBrains Mono"]},"preview":{"light":{"bg":"oklch(0.962 0.016 90)","fg":"oklch(0.27 0.032 155)","accent":"oklch(0.465 0.11 62)","syntax":{"keyword":"oklch(0.475 0.11 70)","string":"oklch(0.46 0.09 145)","comment":"oklch(0.49 0.035 140)","callable":"oklch(0.45 0.085 235)"}},"dark":{"bg":"oklch(0.207 0.02 60)","fg":"oklch(0.928 0.02 88)","accent":"oklch(0.78 0.125 72)","syntax":{"keyword":"oklch(0.8 0.125 80)","string":"oklch(0.79 0.1 135)","comment":"oklch(0.66 0.035 110)","callable":"oklch(0.78 0.075 220)"}}}},{"schemaVersion":1,"slug":"washi","name":"Washi","description":"Warm washi paper, sumi ink, and ai-iro indigo seals — quiet Japanese stationery for calm documentation.","mode":"light","version":"1.0.3","fonts":{"sans":"Zen Kaku Gothic New","mono":"M PLUS 1 Code","display":"Shippori Mincho","loaded":["Zen Kaku Gothic New","Shippori Mincho","M PLUS 1 Code"]},"preview":{"light":{"bg":"#f6f1e4","fg":"#2b2822","accent":"#274a78","syntax":{"keyword":"#274a78","string":"#41653a","comment":"#6f6654","callable":"#963f34"}},"dark":{"bg":"#1b212c","fg":"#eae3d2","accent":"#8ab0dd","syntax":{"keyword":"#97b9e6","string":"#a9cb90","comment":"#8894a4","callable":"#e0a49a"}}}}]};
|
|
5
|
+
// Catalog schemaVersion 2 is distinct from each pack's meta.json schemaVersion 1.
|
|
6
|
+
const catalog = {"schemaVersion":2,"packs":[{"slug":"default","meta":{"schemaVersion":1,"slug":"default","name":"Default","description":"The stock zudo-doc look. No pack stylesheet is loaded — your project's configured color scheme and fonts render unchanged.","mode":"dark","version":"1.0.0","fonts":{"sans":"System","mono":"System","loaded":[]},"preview":{"light":{"bg":"oklch(0.965 0.004 65)","fg":"oklch(0.185 0.005 65)","accent":"oklch(0.470 0.120 56)","syntax":{"keyword":"oklch(0.470 0.120 56)","string":"oklch(0.470 0.140 145)","comment":"oklch(0.480 0.008 65)","callable":"oklch(0.485 0.122 245)"}},"dark":{"bg":"oklch(0.185 0.005 65)","fg":"oklch(0.965 0.004 65)","accent":"oklch(0.700 0.158 62)","syntax":{"keyword":"oklch(0.700 0.158 62)","string":"oklch(0.680 0.145 145)","comment":"oklch(0.705 0.008 65)","callable":"oklch(0.680 0.130 245)"}}}},"hasStylesheet":false},{"slug":"academia","meta":{"schemaVersion":1,"slug":"academia","name":"Academia","description":"A LaTeX paper for the web — white page, Computer-Modern-black ink, hyperref navy links, numbered theorem admonitions, booktabs tables. Dark mode is a scholarly slate.","mode":"light","version":"1.0.1","fonts":{"sans":"Source Serif 4","mono":"Courier Prime","loaded":["Source Serif 4","Courier Prime"]},"preview":{"light":{"bg":"#ffffff","fg":"#141414","accent":"#1c3d8f","syntax":{"keyword":"#1c3d8f","string":"#93262a","comment":"#2e6b2e","callable":"#295e80"}},"dark":{"bg":"#1d222b","fg":"#e7eaf0","accent":"#97b8ee","syntax":{"keyword":"#a3c0f2","string":"#e0a09a","comment":"#8cbc8c","callable":"#85c2da"}}}},"hasStylesheet":true},{"slug":"bauhaus","meta":{"schemaVersion":1,"slug":"bauhaus","name":"Bauhaus","description":"Primary triad as structure — gallery white, near-black ink, and red, yellow, blue doing structural work: circle, triangle, square markers, thick geometric rules, zero radius.","mode":"light","version":"1.0.0","fonts":{"sans":"Jost","mono":"Space Mono","display":"Archivo Black","loaded":["Jost","Archivo Black","Space Mono"]},"preview":{"light":{"bg":"#ffffff","fg":"#141414","accent":"#b3231b","syntax":{"keyword":"#b3231b","string":"#6d5800","comment":"#63615a","callable":"#1c4bbe"}},"dark":{"bg":"#18181b","fg":"#f0efe9","accent":"#ff7d70","syntax":{"keyword":"#ff7d70","string":"#e9ce6a","comment":"#999689","callable":"#8fb0ff"}}}},"hasStylesheet":true},{"slug":"beacon","meta":{"schemaVersion":1,"slug":"beacon","name":"Beacon","description":"WCAG-AAA high contrast — 7:1+ ink everywhere, 3px focus rings, always-underlined links. Clarity as beauty.","mode":"light","version":"1.0.1","fonts":{"sans":"Atkinson Hyperlegible","mono":"Atkinson Hyperlegible Mono","loaded":["Atkinson Hyperlegible","Atkinson Hyperlegible Mono"]},"preview":{"light":{"bg":"#ffffff","fg":"#000000","accent":"#0044cc","syntax":{"keyword":"#0044cc","string":"#a50000","comment":"#595959","callable":"#00287a"}},"dark":{"bg":"#000000","fg":"#ffffff","accent":"#6db3ff","syntax":{"keyword":"#6db3ff","string":"#ff8f8f","comment":"#b3b3b3","callable":"#a8d1ff"}}}},"hasStylesheet":true},{"slug":"blueprint","meta":{"schemaVersion":1,"slug":"blueprint","name":"Blueprint","description":"Cyanotype drafting sheet — pale-cyan linework on prussian grid paper, title-block caps, dashed rules, mono-caps labels. Light mode is the vellum original.","mode":"dark","version":"1.0.1","fonts":{"sans":"Inter","mono":"IBM Plex Mono","display":"Josefin Sans","loaded":["Inter","Josefin Sans","IBM Plex Mono"]},"preview":{"light":{"bg":"oklch(0.965 0.012 235)","fg":"oklch(0.28 0.05 253)","accent":"oklch(0.44 0.095 235)","syntax":{"keyword":"oklch(0.46 0.1 80)","string":"oklch(0.43 0.085 195)","comment":"oklch(0.5 0.03 248)","callable":"oklch(0.44 0.09 235)"}},"dark":{"bg":"oklch(0.27 0.055 252)","fg":"oklch(0.965 0.01 220)","accent":"oklch(0.86 0.09 205)","syntax":{"keyword":"oklch(0.87 0.12 95)","string":"oklch(0.83 0.1 185)","comment":"oklch(0.72 0.032 235)","callable":"oklch(0.83 0.085 215)"}}}},"hasStylesheet":true},{"slug":"botanica","meta":{"schemaVersion":1,"slug":"botanica","name":"Botanica","description":"A vintage botanical plate — herbarium cream, deep green ink, engraved double rules, Latin small-caps plate labels.","mode":"light","version":"1.0.0","fonts":{"sans":"Crimson Pro","mono":"Courier Prime","display":"Cormorant Garamond","loaded":["Cormorant Garamond","Crimson Pro","Courier Prime"]},"preview":{"light":{"bg":"oklch(0.956 0.02 92)","fg":"oklch(0.29 0.03 95)","accent":"oklch(0.42 0.09 152)","syntax":{"keyword":"oklch(0.4 0.075 60)","string":"oklch(0.43 0.095 150)","comment":"oklch(0.48 0.04 95)","callable":"oklch(0.43 0.075 205)"}},"dark":{"bg":"oklch(0.215 0.022 160)","fg":"oklch(0.92 0.02 95)","accent":"oklch(0.78 0.09 148)","syntax":{"keyword":"oklch(0.82 0.085 80)","string":"oklch(0.8 0.095 145)","comment":"oklch(0.7 0.03 110)","callable":"oklch(0.78 0.075 200)"}}}},"hasStylesheet":true},{"slug":"broadsheet","meta":{"schemaVersion":1,"slug":"broadsheet","name":"Broadsheet","description":"Newspaper editorial — Playfair masthead, Oxford ink rules, a red drop cap, and a night-edition dark mode.","mode":"light","version":"1.0.2","fonts":{"sans":"Source Serif 4","mono":"Courier Prime","display":"Playfair Display","loaded":["Playfair Display","Source Serif 4","Courier Prime"]},"preview":{"light":{"bg":"oklch(0.955 0.012 92)","fg":"oklch(0.205 0.012 80)","accent":"oklch(0.455 0.155 27)","syntax":{"keyword":"oklch(0.445 0.155 27)","string":"oklch(0.45 0.075 60)","comment":"oklch(0.5 0.016 78)","callable":"oklch(0.42 0.09 252)"}},"dark":{"bg":"oklch(0.185 0.012 75)","fg":"oklch(0.935 0.015 90)","accent":"oklch(0.7 0.145 27)","syntax":{"keyword":"oklch(0.72 0.14 27)","string":"oklch(0.79 0.07 70)","comment":"oklch(0.7 0.02 85)","callable":"oklch(0.74 0.08 248)"}}}},"hasStylesheet":true},{"slug":"brutalist","meta":{"schemaVersion":1,"slug":"brutalist","name":"Brutalist","description":"Raw concrete web — stark black on white, 4px slab borders, zero radius, hazard-orange tape. Structure you can see.","mode":"light","version":"1.0.3","fonts":{"sans":"Space Grotesk","mono":"IBM Plex Mono","display":"Archivo Black","loaded":["Archivo Black","Space Grotesk","IBM Plex Mono"]},"preview":{"light":{"bg":"#ffffff","fg":"#000000","accent":"#c2410c","syntax":{"keyword":"#c2410c","string":"#9a3412","comment":"#767676","callable":"#000000"}},"dark":{"bg":"#0d0d0d","fg":"#f5f5f5","accent":"#ff6a1f","syntax":{"keyword":"#ff7a2e","string":"#ffb38a","comment":"#878787","callable":"#ffffff"}}}},"hasStylesheet":true},{"slug":"drift","meta":{"schemaVersion":1,"slug":"drift","name":"Drift","description":"Floaty slate-blue comfort dark for long reading — soft glows in place of borders, gentle elevation, relaxed Plex type.","mode":"dark","version":"1.0.2","fonts":{"sans":"IBM Plex Sans","mono":"IBM Plex Mono","loaded":["IBM Plex Sans","IBM Plex Mono"]},"preview":{"light":{"bg":"#edf2f6","fg":"#24303d","accent":"#236799","syntax":{"keyword":"#49539c","string":"#2b754f","comment":"#596673","callable":"#00688d"}},"dark":{"bg":"#181f26","fg":"#d6dee4","accent":"#6cafd9","syntax":{"keyword":"#9caeee","string":"#88cba4","comment":"#8494a4","callable":"#75c6e1"}}}},"hasStylesheet":true},{"slug":"eink","meta":{"schemaVersion":1,"slug":"eink","name":"E-Ink","description":"E-reader grayscale — warm paper, near-black ink, shadowless hairline chrome, zero radius. Code is told by weight, slant, and gray value; only diffs keep a trace of ink-blue and ink-red.","mode":"light","version":"1.0.0","fonts":{"sans":"EB Garamond","mono":"Courier Prime","loaded":["EB Garamond","Courier Prime"]},"preview":{"light":{"bg":"oklch(0.956 0.007 90)","fg":"oklch(0.24 0.012 85)","accent":"oklch(0.155 0.01 85)","syntax":{"keyword":"oklch(0.18 0.01 85)","string":"oklch(0.46 0.012 85)","comment":"oklch(0.505 0.01 85)","callable":"oklch(0.31 0.012 85)"}},"dark":{"bg":"oklch(0.215 0.008 80)","fg":"oklch(0.885 0.012 85)","accent":"oklch(0.955 0.008 85)","syntax":{"keyword":"oklch(0.96 0.008 85)","string":"oklch(0.715 0.012 85)","comment":"oklch(0.645 0.01 85)","callable":"oklch(0.82 0.01 85)"}}}},"hasStylesheet":true},{"slug":"fjord","meta":{"schemaVersion":1,"slug":"fjord","name":"Fjord","description":"Polar-night blue under a faint aurora — frost-cyan accents, icy borders, snow-white text. Cold nordic calm.","mode":"dark","version":"1.0.2","fonts":{"sans":"Inter","mono":"JetBrains Mono","loaded":["Inter","JetBrains Mono"]},"preview":{"light":{"bg":"oklch(0.971 0.008 230)","fg":"oklch(0.255 0.03 255)","accent":"oklch(0.455 0.092 205)","syntax":{"keyword":"oklch(0.455 0.105 250)","string":"oklch(0.495 0.105 165)","comment":"oklch(0.51 0.03 245)","callable":"oklch(0.445 0.098 202)"}},"dark":{"bg":"oklch(0.232 0.024 255)","fg":"oklch(0.93 0.012 235)","accent":"oklch(0.79 0.095 195)","syntax":{"keyword":"oklch(0.76 0.095 242)","string":"oklch(0.8 0.105 158)","comment":"oklch(0.63 0.03 245)","callable":"oklch(0.815 0.095 195)"}}}},"hasStylesheet":true},{"slug":"foundry","meta":{"schemaVersion":1,"slug":"foundry","name":"Foundry","description":"GitHub-neutral baseline — white paper, near-black ink, Primer-blue links, quiet gray rules. Restraint, perfected.","mode":"light","version":"1.0.2","fonts":{"sans":"Inter","mono":"System","loaded":["Inter"]},"preview":{"light":{"bg":"#ffffff","fg":"#1f2328","accent":"#0969da","syntax":{"keyword":"#cf222e","string":"#0a3069","comment":"#6e7781","callable":"#8250df"}},"dark":{"bg":"#0d1117","fg":"#e6edf3","accent":"#4493f8","syntax":{"keyword":"#ff7b72","string":"#a5d6ff","comment":"#8b949e","callable":"#d2a8ff"}}}},"hasStylesheet":true},{"slug":"futura-editorial","meta":{"schemaVersion":1,"slug":"futura-editorial","name":"Futura Editorial","description":"Normal-weight geometric Futura headings over Noto Sans body — clean white, near-black ink, one restrained red accent.","mode":"light","version":"1.0.1","fonts":{"sans":"Noto Sans","mono":"Space Mono","display":"Jost","loaded":["Jost","Noto Sans","Space Mono"]},"preview":{"light":{"bg":"oklch(1 0 0)","fg":"oklch(0.17 0 0)","accent":"oklch(0.505 0.18 28)","syntax":{"keyword":"oklch(0.505 0.18 28)","string":"oklch(0.47 0.09 160)","comment":"oklch(0.52 0 0)","callable":"oklch(0.45 0.1 250)"}},"dark":{"bg":"oklch(0.165 0 0)","fg":"oklch(0.935 0 0)","accent":"oklch(0.72 0.15 29)","syntax":{"keyword":"oklch(0.72 0.15 29)","string":"oklch(0.76 0.1 160)","comment":"oklch(0.63 0 0)","callable":"oklch(0.73 0.095 250)"}}}},"hasStylesheet":true},{"slug":"hearth","meta":{"schemaVersion":1,"slug":"hearth","name":"Hearth","description":"Warm cream & brick-red fireside docs — Fraunces headings, amber code blocks, ember-glow dark mode.","mode":"light","version":"1.0.3","fonts":{"sans":"Nunito","mono":"Spline Sans Mono","display":"Fraunces","loaded":["Fraunces","Nunito","Spline Sans Mono"]},"preview":{"light":{"bg":"oklch(0.958 0.02 85)","fg":"oklch(0.255 0.028 40)","accent":"oklch(0.49 0.145 31)","syntax":{"keyword":"oklch(0.48 0.148 30)","string":"oklch(0.47 0.1 135)","comment":"oklch(0.51 0.035 60)","callable":"oklch(0.45 0.092 245)"}},"dark":{"bg":"oklch(0.215 0.022 45)","fg":"oklch(0.915 0.02 80)","accent":"oklch(0.735 0.128 45)","syntax":{"keyword":"oklch(0.745 0.138 40)","string":"oklch(0.785 0.1 130)","comment":"oklch(0.645 0.032 65)","callable":"oklch(0.765 0.075 235)"}}}},"hasStylesheet":true},{"slug":"hollow","meta":{"schemaVersion":1,"slug":"hollow","name":"Hollow","description":"Dark violet space — neon pink headings, violet links, a quiet starfield, and razor-square midnight chrome.","mode":"dark","version":"1.0.2","fonts":{"sans":"Space Grotesk","mono":"Space Mono","loaded":["Space Grotesk","Space Mono"]},"preview":{"light":{"bg":"oklch(0.962 0.012 300)","fg":"oklch(0.24 0.045 295)","accent":"oklch(0.45 0.17 300)","syntax":{"keyword":"oklch(0.53 0.2 348)","string":"oklch(0.45 0.1 195)","comment":"oklch(0.51 0.035 292)","callable":"oklch(0.46 0.16 300)"}},"dark":{"bg":"oklch(0.155 0.035 295)","fg":"oklch(0.93 0.015 295)","accent":"oklch(0.74 0.14 300)","syntax":{"keyword":"oklch(0.76 0.17 347)","string":"oklch(0.83 0.1 190)","comment":"oklch(0.62 0.045 292)","callable":"oklch(0.76 0.13 300)"}}}},"hasStylesheet":true},{"slug":"ledger","meta":{"schemaVersion":1,"slug":"ledger","name":"Ledger","description":"Cream academic serif in the Tufte tradition — warm paper, ink prose, oxblood links, hairline rules, quiet code.","mode":"light","version":"1.0.1","fonts":{"sans":"Crimson Pro","mono":"IBM Plex Mono","loaded":["Crimson Pro","IBM Plex Mono"]},"preview":{"light":{"bg":"#fffff8","fg":"#16130e","accent":"#8b1a1a","syntax":{"keyword":"#8b1a1a","string":"#4e6328","comment":"#766b5c","callable":"#33586e"}},"dark":{"bg":"#191510","fg":"#e9e2d0","accent":"#d68a75","syntax":{"keyword":"#e2907c","string":"#a8b47c","comment":"#948a77","callable":"#93b4cd"}}}},"hasStylesheet":true},{"slug":"manuscript","meta":{"schemaVersion":1,"slug":"manuscript","name":"Manuscript","description":"A quiet Garamond book page — warm paper, soft ink, sepia rubrication, small-caps subheads, fleuron section marks.","mode":"light","version":"1.0.1","fonts":{"sans":"EB Garamond","mono":"Courier Prime","loaded":["EB Garamond","Courier Prime"]},"preview":{"light":{"bg":"oklch(0.963 0.013 85)","fg":"oklch(0.245 0.018 60)","accent":"oklch(0.44 0.095 55)","syntax":{"keyword":"oklch(0.455 0.13 30)","string":"oklch(0.44 0.085 150)","comment":"oklch(0.5 0.03 70)","callable":"oklch(0.435 0.09 275)"}},"dark":{"bg":"oklch(0.215 0.015 65)","fg":"oklch(0.885 0.022 80)","accent":"oklch(0.735 0.095 70)","syntax":{"keyword":"oklch(0.72 0.115 35)","string":"oklch(0.745 0.085 150)","comment":"oklch(0.645 0.03 75)","callable":"oklch(0.745 0.07 275)"}}}},"hasStylesheet":true},{"slug":"matcha","meta":{"schemaVersion":1,"slug":"matcha","name":"Matcha","description":"Green tea ceremony — deep matcha on warm cream, mincho headings, zen whitespace, tea-foam surfaces in both modes.","mode":"light","version":"1.0.2","fonts":{"sans":"Zen Kaku Gothic New","mono":"M PLUS 1 Code","display":"Shippori Mincho","loaded":["Zen Kaku Gothic New","Shippori Mincho","M PLUS 1 Code"]},"preview":{"light":{"bg":"oklch(0.973 0.012 106)","fg":"oklch(0.245 0.018 148)","accent":"oklch(0.435 0.105 142)","syntax":{"keyword":"oklch(0.418 0.105 150)","string":"oklch(0.47 0.092 106)","comment":"oklch(0.512 0.034 130)","callable":"oklch(0.438 0.082 196)"}},"dark":{"bg":"oklch(0.205 0.016 152)","fg":"oklch(0.938 0.018 106)","accent":"oklch(0.79 0.115 138)","syntax":{"keyword":"oklch(0.782 0.118 148)","string":"oklch(0.822 0.102 108)","comment":"oklch(0.668 0.034 130)","callable":"oklch(0.772 0.088 192)"}}}},"hasStylesheet":true},{"slug":"nocturne","meta":{"schemaVersion":1,"slug":"nocturne","name":"Nocturne","description":"Purple midnight — velvet aubergine depths, lavender links, and muted gold hairlines. Elegant, never neon.","mode":"dark","version":"1.0.2","fonts":{"sans":"Manrope","mono":"IBM Plex Mono","display":"Cormorant Garamond","loaded":["Cormorant Garamond","Manrope","IBM Plex Mono"]},"preview":{"light":{"bg":"oklch(0.958 0.012 300)","fg":"oklch(0.245 0.05 312)","accent":"oklch(0.455 0.15 295)","syntax":{"keyword":"oklch(0.46 0.16 295)","string":"oklch(0.5 0.105 85)","comment":"oklch(0.5 0.042 305)","callable":"oklch(0.455 0.125 265)"}},"dark":{"bg":"oklch(0.155 0.03 310)","fg":"oklch(0.922 0.018 300)","accent":"oklch(0.765 0.105 292)","syntax":{"keyword":"oklch(0.772 0.128 293)","string":"oklch(0.8 0.108 88)","comment":"oklch(0.645 0.045 302)","callable":"oklch(0.77 0.095 262)"}}}},"hasStylesheet":true},{"slug":"observatory","meta":{"schemaVersion":1,"slug":"observatory","name":"Observatory","description":"Night-sky atlas: star-field depth, constellation-line rules, nebula violet and comet gold over astronomer's navy.","mode":"dark","version":"1.0.3","fonts":{"sans":"Jost","mono":"Space Mono","display":"Josefin Sans","loaded":["Josefin Sans","Jost","Space Mono"]},"preview":{"light":{"bg":"oklch(0.965 0.012 255)","fg":"oklch(0.235 0.045 268)","accent":"oklch(0.47 0.1 75)","syntax":{"keyword":"oklch(0.46 0.14 300)","string":"oklch(0.45 0.1 162)","comment":"oklch(0.5 0.03 265)","callable":"oklch(0.46 0.11 250)"}},"dark":{"bg":"oklch(0.155 0.028 268)","fg":"oklch(0.93 0.015 255)","accent":"oklch(0.82 0.13 86)","syntax":{"keyword":"oklch(0.76 0.118 300)","string":"oklch(0.8 0.112 162)","comment":"oklch(0.61 0.038 265)","callable":"oklch(0.78 0.095 240)"}}}},"hasStylesheet":true},{"slug":"onyx","meta":{"schemaVersion":1,"slug":"onyx","name":"Onyx","description":"Luxury noir — jet black, champagne serif headings, and a single gold hairline accent. Watch-brand restraint.","mode":"dark","version":"1.0.3","fonts":{"sans":"Jost","mono":"IBM Plex Mono","display":"Cormorant Garamond","loaded":["Cormorant Garamond","Jost","IBM Plex Mono"]},"preview":{"light":{"bg":"oklch(0.972 0.005 85)","fg":"oklch(0.22 0.012 80)","accent":"oklch(0.5 0.105 80)","syntax":{"keyword":"oklch(0.51 0.105 82)","string":"oklch(0.47 0.07 155)","comment":"oklch(0.5 0.015 85)","callable":"oklch(0.45 0.045 250)"}},"dark":{"bg":"oklch(0.145 0.003 80)","fg":"oklch(0.92 0.022 88)","accent":"oklch(0.79 0.115 88)","syntax":{"keyword":"oklch(0.8 0.115 88)","string":"oklch(0.78 0.07 155)","comment":"oklch(0.62 0.02 85)","callable":"oklch(0.82 0.04 250)"}}}},"hasStylesheet":true},{"slug":"phosphor","meta":{"schemaVersion":1,"slug":"phosphor","name":"Phosphor","description":"Green CRT terminal — phosphor glow, scanlines, inverse-video nav, monospace everything.","mode":"dark","version":"1.0.1","fonts":{"sans":"JetBrains Mono","mono":"JetBrains Mono","display":"VT323","loaded":["VT323","JetBrains Mono"]},"preview":{"light":{"bg":"oklch(0.955 0.014 150)","fg":"oklch(0.28 0.058 150)","accent":"oklch(0.42 0.13 150)","syntax":{"keyword":"oklch(0.4 0.13 148)","string":"oklch(0.39 0.095 165)","comment":"oklch(0.49 0.05 150)","callable":"oklch(0.43 0.095 200)"}},"dark":{"bg":"oklch(0.135 0.014 150)","fg":"oklch(0.845 0.145 150)","accent":"oklch(0.87 0.215 148)","syntax":{"keyword":"oklch(0.9 0.21 148)","string":"oklch(0.9 0.12 165)","comment":"oklch(0.58 0.062 150)","callable":"oklch(0.83 0.125 200)"}}}},"hasStylesheet":true},{"slug":"riso","meta":{"schemaVersion":1,"slug":"riso","name":"Riso","description":"Risograph duotone print — warm paper, two inks (riso blue + fluorescent coral), misregistered offset shadows, and a soft linear paper grain.","mode":"light","version":"1.0.0","fonts":{"sans":"Space Grotesk","mono":"Space Mono","display":"Archivo Black","loaded":["Space Grotesk","Archivo Black","Space Mono"]},"preview":{"light":{"bg":"#f9f3e5","fg":"#1d3345","accent":"#0d5c94","syntax":{"keyword":"#a02310","string":"#0d5e6e","comment":"#4d5c66","callable":"#0b5b9b"}},"dark":{"bg":"#101d28","fg":"#f1e9d8","accent":"#58b8e8","syntax":{"keyword":"#ff8d72","string":"#66d4cf","comment":"#93a4ad","callable":"#5aaef5"}}}},"hasStylesheet":true},{"slug":"sakura","meta":{"schemaVersion":1,"slug":"sakura","name":"Sakura","description":"Cherry-blossom pastels — blush-white paper, plum ink, and rose accents on petal-soft corners; dark mode is yozakura, night blossoms under lantern-pink light.","mode":"light","version":"1.0.1","fonts":{"sans":"Nunito","mono":"M PLUS 1 Code","display":"Shippori Mincho","loaded":["Nunito","Shippori Mincho","M PLUS 1 Code"]},"preview":{"light":{"bg":"oklch(0.977 0.009 350)","fg":"oklch(0.29 0.055 340)","accent":"oklch(0.5 0.168 358)","syntax":{"keyword":"oklch(0.5 0.168 358)","string":"oklch(0.49 0.115 150)","comment":"oklch(0.5 0.04 340)","callable":"oklch(0.49 0.135 300)"}},"dark":{"bg":"oklch(0.215 0.03 330)","fg":"oklch(0.935 0.014 350)","accent":"oklch(0.78 0.115 355)","syntax":{"keyword":"oklch(0.79 0.125 355)","string":"oklch(0.78 0.115 150)","comment":"oklch(0.71 0.038 345)","callable":"oklch(0.78 0.105 300)"}}}},"hasStylesheet":true},{"slug":"scandi","meta":{"schemaVersion":1,"slug":"scandi","name":"Scandi","description":"Hygge minimalism — oat linen, sage & clay, pill nav actives and 8px corners; night mode is warm charcoal lit by candle amber.","mode":"light","version":"1.0.0","fonts":{"sans":"Manrope","mono":"Spline Sans Mono","loaded":["Manrope","Spline Sans Mono"]},"preview":{"light":{"bg":"oklch(0.963 0.012 83)","fg":"oklch(0.28 0.02 55)","accent":"oklch(0.44 0.08 152)","syntax":{"keyword":"oklch(0.47 0.105 40)","string":"oklch(0.45 0.09 150)","comment":"oklch(0.5 0.02 70)","callable":"oklch(0.45 0.08 240)"}},"dark":{"bg":"oklch(0.235 0.015 55)","fg":"oklch(0.92 0.012 85)","accent":"oklch(0.82 0.105 75)","syntax":{"keyword":"oklch(0.76 0.1 45)","string":"oklch(0.78 0.09 150)","comment":"oklch(0.66 0.02 75)","callable":"oklch(0.75 0.075 238)"}}}},"hasStylesheet":true},{"slug":"solar","meta":{"schemaVersion":1,"slug":"solar","name":"Solar","description":"Solarized precision — low-eyestrain paper tones, blue/cyan/orange accents, mono labels, technical calm in both modes.","mode":"light","version":"1.0.1","fonts":{"sans":"Source Sans 3","mono":"Source Code Pro","loaded":["Source Sans 3","Source Code Pro"]},"preview":{"light":{"bg":"#fdf6e3","fg":"#4f6369","accent":"#1c6a9f","syntax":{"keyword":"#606f00","string":"#12746c","comment":"#586b72","callable":"#1d6da3"}},"dark":{"bg":"#002b36","fg":"#93a1a1","accent":"#53a6df","syntax":{"keyword":"#8ea300","string":"#2caaa0","comment":"#899da4","callable":"#49a0dd"}}}},"hasStylesheet":true},{"slug":"sumi","meta":{"schemaVersion":1,"slug":"sumi","name":"Sumi","description":"Sumi-e ink on washi — bold mincho brush headings, deep black strokes, one vermillion hanko seal accent.","mode":"light","version":"1.0.3","fonts":{"sans":"Zen Kaku Gothic New","mono":"IBM Plex Mono","display":"Shippori Mincho B1","loaded":["Shippori Mincho B1","Zen Kaku Gothic New","IBM Plex Mono"]},"preview":{"light":{"bg":"#f7f4ec","fg":"#1b1a18","accent":"#b8232e","syntax":{"keyword":"#b8232e","string":"#6a6156","comment":"#726b5e","callable":"#433d35"}},"dark":{"bg":"#161514","fg":"#ece7db","accent":"#ea6a72","syntax":{"keyword":"#ee7a81","string":"#c8bfa6","comment":"#837d72","callable":"#f4efe4"}}}},"hasStylesheet":true},{"slug":"swissgrid","meta":{"schemaVersion":1,"slug":"swissgrid","name":"Swissgrid","description":"International Typographic Style — grid discipline, black on white, one hot Swiss-red accent, oversized section numbers.","mode":"light","version":"1.0.1","fonts":{"sans":"Inter","mono":"IBM Plex Mono","display":"Inter Tight","loaded":["Inter","Inter Tight","IBM Plex Mono"]},"preview":{"light":{"bg":"#ffffff","fg":"#0a0a0a","accent":"#e60000","syntax":{"keyword":"#d40000","string":"#3f3f3f","comment":"#6b6b6b","callable":"#0a0a0a"}},"dark":{"bg":"#0c0c0c","fg":"#f2f2f2","accent":"#ff4d4d","syntax":{"keyword":"#ff4d4d","string":"#c9c9c9","comment":"#8c8c8c","callable":"#ffffff"}}}},"hasStylesheet":true},{"slug":"tidepool","meta":{"schemaVersion":1,"slug":"tidepool","name":"Tidepool","description":"Marine teal dark — deep-sea teal surfaces, seafoam text, bioluminescent aqua accents, kelp-green success, coral danger. Light mode is the same pool at low tide.","mode":"dark","version":"1.0.0","fonts":{"sans":"Space Grotesk","mono":"JetBrains Mono","loaded":["Space Grotesk","JetBrains Mono"]},"preview":{"light":{"bg":"oklch(0.966 0.013 165)","fg":"oklch(0.27 0.045 200)","accent":"oklch(0.43 0.073 195)","syntax":{"keyword":"oklch(0.42 0.071 193)","string":"oklch(0.42 0.11 150)","comment":"oklch(0.44 0.03 200)","callable":"oklch(0.44 0.089 232)"}},"dark":{"bg":"oklch(0.235 0.032 205)","fg":"oklch(0.92 0.028 180)","accent":"oklch(0.82 0.13 185)","syntax":{"keyword":"oklch(0.84 0.14 183)","string":"oklch(0.83 0.14 152)","comment":"oklch(0.69 0.035 195)","callable":"oklch(0.8 0.1 228)"}}}},"hasStylesheet":true},{"slug":"timberline","meta":{"schemaVersion":1,"slug":"timberline","name":"Timberline","description":"Forest cabin after dark — pine & umber planks, cream prose, and matte lantern-amber accents; light mode is the same lodge at morning.","mode":"dark","version":"1.0.1","fonts":{"sans":"Source Sans 3","mono":"JetBrains Mono","display":"Fraunces","loaded":["Fraunces","Source Sans 3","JetBrains Mono"]},"preview":{"light":{"bg":"oklch(0.962 0.016 90)","fg":"oklch(0.27 0.032 155)","accent":"oklch(0.465 0.11 62)","syntax":{"keyword":"oklch(0.475 0.11 70)","string":"oklch(0.46 0.09 145)","comment":"oklch(0.49 0.035 140)","callable":"oklch(0.45 0.085 235)"}},"dark":{"bg":"oklch(0.207 0.02 60)","fg":"oklch(0.928 0.02 88)","accent":"oklch(0.78 0.125 72)","syntax":{"keyword":"oklch(0.8 0.125 80)","string":"oklch(0.79 0.1 135)","comment":"oklch(0.66 0.035 110)","callable":"oklch(0.78 0.075 220)"}}}},"hasStylesheet":true},{"slug":"washi","meta":{"schemaVersion":1,"slug":"washi","name":"Washi","description":"Warm washi paper, sumi ink, and ai-iro indigo seals — quiet Japanese stationery for calm documentation.","mode":"light","version":"1.0.3","fonts":{"sans":"Zen Kaku Gothic New","mono":"M PLUS 1 Code","display":"Shippori Mincho","loaded":["Zen Kaku Gothic New","Shippori Mincho","M PLUS 1 Code"]},"preview":{"light":{"bg":"#f6f1e4","fg":"#2b2822","accent":"#274a78","syntax":{"keyword":"#274a78","string":"#41653a","comment":"#6f6654","callable":"#963f34"}},"dark":{"bg":"#1b212c","fg":"#eae3d2","accent":"#8ab0dd","syntax":{"keyword":"#97b9e6","string":"#a9cb90","comment":"#8894a4","callable":"#e0a49a"}}}},"hasStylesheet":true}]};
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Validate the browser-facing catalog contract before consuming its entries.
|
|
10
|
+
*
|
|
11
|
+
* Catalog schemaVersion 2 is deliberately independent from the schemaVersion
|
|
12
|
+
* in each pack's meta.json (currently 1). This validator checks the catalog
|
|
13
|
+
* contract only; those per-pack metadata versions must not be conflated.
|
|
14
|
+
*/
|
|
15
|
+
export function validateThemePackCatalog(value) {
|
|
16
|
+
if (value === null || typeof value !== "object" || Array.isArray(value)) {
|
|
17
|
+
throw new TypeError(
|
|
18
|
+
`@takazudo/zudo-doc/catalog: expected a catalog manifest object with schemaVersion 2; got ${describeCatalogValue(value)}.`,
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
if (value.schemaVersion !== 2) {
|
|
23
|
+
throw new Error(
|
|
24
|
+
`@takazudo/zudo-doc/catalog: unsupported catalog schemaVersion ${describeCatalogValue(value.schemaVersion)}; expected 2.`,
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
if (!Array.isArray(value.packs)) {
|
|
29
|
+
throw new TypeError(
|
|
30
|
+
`@takazudo/zudo-doc/catalog: catalog.packs must be an array; got ${describeCatalogValue(value.packs)}.`,
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
for (const [index, entry] of value.packs.entries()) {
|
|
35
|
+
if (entry === null || typeof entry !== "object" || Array.isArray(entry)) {
|
|
36
|
+
throw new TypeError(
|
|
37
|
+
`@takazudo/zudo-doc/catalog: catalog.packs[${index}] must be an object; got ${describeCatalogValue(entry)}.`,
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
if (typeof entry.slug !== "string") {
|
|
41
|
+
throw new TypeError(
|
|
42
|
+
`@takazudo/zudo-doc/catalog: catalog.packs[${index}].slug must be a string; got ${describeCatalogValue(entry.slug)}.`,
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
if (entry.meta === null || typeof entry.meta !== "object" || Array.isArray(entry.meta)) {
|
|
46
|
+
throw new TypeError(
|
|
47
|
+
`@takazudo/zudo-doc/catalog: catalog.packs[${index}].meta must be an object; got ${describeCatalogValue(entry.meta)}.`,
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
if (typeof entry.hasStylesheet !== "boolean") {
|
|
51
|
+
throw new TypeError(
|
|
52
|
+
`@takazudo/zudo-doc/catalog: catalog.packs[${index}].hasStylesheet must be a boolean; got ${describeCatalogValue(entry.hasStylesheet)}.`,
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return value;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/** @param {unknown} value */
|
|
61
|
+
function describeCatalogValue(value) {
|
|
62
|
+
if (value === undefined) return "undefined";
|
|
63
|
+
try {
|
|
64
|
+
const json = JSON.stringify(value);
|
|
65
|
+
return json === undefined ? String(value) : json;
|
|
66
|
+
} catch {
|
|
67
|
+
return String(value);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
6
70
|
|
|
7
71
|
export default catalog;
|
package/dist/chrome/derive.js
CHANGED
|
@@ -185,7 +185,8 @@ function deriveBodyEndIslands(ctx) {
|
|
|
185
185
|
return createBodyEndIslands({
|
|
186
186
|
settings: ctx.settings,
|
|
187
187
|
...designTokenPanelDeps,
|
|
188
|
-
...themePackSwitcherDeps
|
|
188
|
+
...themePackSwitcherDeps,
|
|
189
|
+
pendingUntilHydrated: true
|
|
189
190
|
});
|
|
190
191
|
}
|
|
191
192
|
const DesignTokenPanelIsland = createDesignTokenPanelIsland({
|
|
@@ -194,7 +195,8 @@ function deriveBodyEndIslands(ctx) {
|
|
|
194
195
|
});
|
|
195
196
|
const ThemePackSwitcherIsland = createThemePackSwitcherIsland({
|
|
196
197
|
themePackSwitcher: ctx.settings.themePackSwitcher === true,
|
|
197
|
-
...themePackSwitcherDeps
|
|
198
|
+
...themePackSwitcherDeps,
|
|
199
|
+
pendingUntilHydrated: true
|
|
198
200
|
});
|
|
199
201
|
const HostBodyEnd = HostBodyEndIslands;
|
|
200
202
|
function BodyEndIslands(props) {
|
|
@@ -21,38 +21,10 @@
|
|
|
21
21
|
* package-first migration (S9a zudolab/zudo-doc#2333). The DATA (ramp values,
|
|
22
22
|
* scheme names, `colorMode` settings) stays project-side.
|
|
23
23
|
*/
|
|
24
|
-
|
|
25
|
-
export type OKLCH
|
|
26
|
-
/** The four semantic state colors that live on their own ramp. */
|
|
27
|
-
export type StateRole = "danger" | "success" | "warning" | "info";
|
|
24
|
+
import type { ColorScheme, RampRef, Ramps, SemanticKey, StateRole, SyntaxSemanticKey } from "./route-context-payload/types.js";
|
|
25
|
+
export type { ColorScheme, ModeMap, OKLCH, RampRef, Ramps, SemanticKey, StateRole, SyntaxSemanticKey, } from "./route-context-payload/types.js";
|
|
28
26
|
/** Canonical order of the state ramp — used for `--palette-state-*` emit. */
|
|
29
27
|
export declare const STATE_ROLES: readonly StateRole[];
|
|
30
|
-
/**
|
|
31
|
-
* A reference into the shared ramps, resolved by `resolveRampRef`:
|
|
32
|
-
* - `{ base: n }` → `ramps.base[n]`
|
|
33
|
-
* - `{ accent: n }` → `ramps.accent[n]`
|
|
34
|
-
* - `{ state: r }` → `ramps.state[r]`
|
|
35
|
-
* - a bare string → a literal OKLCH value, returned as-is
|
|
36
|
-
*/
|
|
37
|
-
export type RampRef = {
|
|
38
|
-
base: number;
|
|
39
|
-
} | {
|
|
40
|
-
accent: number;
|
|
41
|
-
} | {
|
|
42
|
-
state: StateRole;
|
|
43
|
-
} | OKLCH;
|
|
44
|
-
/** The shared Tier-1 ramps. Values are identical across light/dark modes; the
|
|
45
|
-
* per-mode differences live in `ModeMap`, not here. */
|
|
46
|
-
export interface Ramps {
|
|
47
|
-
/** Warm-neutral base ramp — 5 entries, index 0 = lightest. */
|
|
48
|
-
base: OKLCH[];
|
|
49
|
-
/** Accent ramp — 3 entries. */
|
|
50
|
-
accent: OKLCH[];
|
|
51
|
-
/** The four state colors. */
|
|
52
|
-
state: Record<StateRole, OKLCH>;
|
|
53
|
-
}
|
|
54
|
-
/** The 23 semantic roles that map onto `--zd-*` custom properties. */
|
|
55
|
-
export type SemanticKey = "surface" | "muted" | "accent" | "accentHover" | "codeBg" | "codeFg" | "success" | "danger" | "warning" | "info" | "mermaidNodeBg" | "mermaidText" | "mermaidLine" | "mermaidLabelBg" | "mermaidNoteBg" | "chatUserBg" | "chatUserText" | "chatAssistantBg" | "chatAssistantText" | "imageOverlayBg" | "imageOverlayFg" | "matchedKeywordBg" | "matchedKeywordFg";
|
|
56
28
|
/** Canonical order of the 23 semantic roles — used for `--zd-*` emit. */
|
|
57
29
|
export declare const SEMANTIC_KEYS: readonly SemanticKey[];
|
|
58
30
|
/**
|
|
@@ -61,29 +33,9 @@ export declare const SEMANTIC_KEYS: readonly SemanticKey[];
|
|
|
61
33
|
* `ZFB_HIGHLIGHT_ROLE_TO_ZUDO_TOKEN` below.
|
|
62
34
|
*/
|
|
63
35
|
export declare const SYNTAX_SEMANTIC_KEYS: readonly ["syntaxComment", "syntaxString", "syntaxNumber", "syntaxKeyword", "syntaxCallable", "syntaxType", "syntaxName", "syntaxInserted", "syntaxDeleted"];
|
|
64
|
-
export type SyntaxSemanticKey = (typeof SYNTAX_SEMANTIC_KEYS)[number];
|
|
65
36
|
/** Existing semantic role inherited when a syntax role has no explicit map. */
|
|
66
37
|
export declare const SYNTAX_SEMANTIC_ALIASES: Readonly<Record<SyntaxSemanticKey, SemanticKey>>;
|
|
67
38
|
export declare const SYNTAX_CSS_NAMES: Readonly<Record<SyntaxSemanticKey, string>>;
|
|
68
|
-
/** The per-mode wiring: each UI role points at a ramp stop (or literal OKLCH)
|
|
69
|
-
* via a `RampRef`. Two `ColorScheme`s (light + dark) share `ramps` but carry
|
|
70
|
-
* their own `ModeMap`. */
|
|
71
|
-
export interface ModeMap {
|
|
72
|
-
bg: RampRef;
|
|
73
|
-
fg: RampRef;
|
|
74
|
-
selectionBg: RampRef;
|
|
75
|
-
selectionFg: RampRef;
|
|
76
|
-
semantic: Record<SemanticKey, RampRef>;
|
|
77
|
-
/** Optional syntax-specific overrides. An absent map and omitted roles
|
|
78
|
-
* inherit the aliases in `SYNTAX_SEMANTIC_ALIASES`, preserving schemes
|
|
79
|
-
* authored before syntax tokens existed. */
|
|
80
|
-
syntax?: Partial<Record<SyntaxSemanticKey, RampRef>>;
|
|
81
|
-
}
|
|
82
|
-
/** A complete color scheme — shared Tier-1 ramps + per-mode Tier-2 wiring. */
|
|
83
|
-
export interface ColorScheme {
|
|
84
|
-
ramps: Ramps;
|
|
85
|
-
map: ModeMap;
|
|
86
|
-
}
|
|
87
39
|
/** Default per-mode semantic wiring (Default Dark reference — see epic #2584).
|
|
88
40
|
* Scheme authors spread this into `map.semantic` and override individual roles
|
|
89
41
|
* where a mode needs a different stop (or a per-mode AA-tuned literal). */
|