clean-jsdoc-theme 5.0.0-alpha.1 → 5.0.0-alpha.2

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Ankit Kumar (अंकित कुमार)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,117 +1,82 @@
1
- # clean-jsdoc-theme
2
-
3
- JSDoc theme entry for v5. A thin bridge that JSDoc invokes via `require()` and that wires the four boundary packages — [setu](../setu) (JSDoc → `SiteManifest`), [dwar](../dwar) (`SiteManifest` → HTML/CSS/JS), and [Pagefind](https://pagefind.app/) (post-write search index) — into a single `publish(data, opts, tutorials)` call.
4
-
5
- > v5 is in alpha. To stay on v4, pin `"clean-jsdoc-theme": "^4"` in your `package.json`.
6
-
7
- ## Install
1
+ <div align="center">
2
+
3
+ <a href="https://ankdev.me/clean-jsdoc-theme"><img src="https://raw.githubusercontent.com/ankitskvmdam/clean-jsdoc-theme/master/packages/clean-jsdoc-theme/media/clean-jsdoc-theme.svg" alt="clean-jsdoc-theme" width="340" /></a>
4
+
5
+ A fast, modern, LLM-friendly documentation theme for **JSDoc** and **TypeDoc**.
6
+
7
+ [![npm version](https://img.shields.io/npm/v/clean-jsdoc-theme)](https://www.npmjs.com/package/clean-jsdoc-theme)
8
+ [![npm downloads](https://img.shields.io/npm/dm/clean-jsdoc-theme)](https://www.npmjs.com/package/clean-jsdoc-theme)
9
+ [![license](https://img.shields.io/npm/l/clean-jsdoc-theme)](https://github.com/ankitskvmdam/clean-jsdoc-theme/blob/master/LICENSE)
10
+ [![docs](https://img.shields.io/badge/docs-ankdev.me-005bff)](https://ankdev.me/clean-jsdoc-theme)
11
+ [![live demo](https://img.shields.io/badge/live%20demo-api--docs-7c3aed)](https://ankdev.me/clean-jsdoc-theme/api-docs)
12
+ [![stars](https://img.shields.io/github/stars/ankitskvmdam/clean-jsdoc-theme)](https://github.com/ankitskvmdam/clean-jsdoc-theme)
13
+ [![forks](https://img.shields.io/github/forks/ankitskvmdam/clean-jsdoc-theme)](https://github.com/ankitskvmdam/clean-jsdoc-theme/fork)
14
+ [![issues](https://img.shields.io/github/issues/ankitskvmdam/clean-jsdoc-theme)](https://github.com/ankitskvmdam/clean-jsdoc-theme/issues)
15
+ [![contributors](https://img.shields.io/github/contributors/ankitskvmdam/clean-jsdoc-theme)](https://github.com/ankitskvmdam/clean-jsdoc-theme/graphs/contributors)
16
+
17
+ </div>
18
+
19
+ <p align="center">
20
+ <img src="https://raw.githubusercontent.com/ankitskvmdam/clean-jsdoc-theme/master/packages/clean-jsdoc-theme/media/screenshot.png" width="49%" alt="clean-jsdoc-theme — light theme" />
21
+ <img src="https://raw.githubusercontent.com/ankitskvmdam/clean-jsdoc-theme/master/packages/clean-jsdoc-theme/media/screenshot-dark.png" width="49%" alt="clean-jsdoc-theme — dark theme" />
22
+ </p>
23
+
24
+ Point it at your source comments — and, optionally, a folder of Markdown guides —
25
+ and it produces a static site: server-rendered HTML, lazily-hydrated interactive
26
+ islands, fuzzy + full-text search, light and dark themes, and a companion `.md`
27
+ of every page for LLMs. No CSS or build config required to get started.
28
+
29
+ ## Highlights
30
+
31
+ - **JSDoc _and_ TypeDoc** — the same modern output from either toolchain.
32
+ - **Fast & framework-free** — server-rendered pages with lazily-hydrated Preact
33
+ islands; each page loads only the JS it actually uses.
34
+ - **Search built in** — a fuzzy command palette (`Ctrl K`) over titles,
35
+ descriptions, content, and per-member deep links, plus an optional
36
+ [Pagefind](https://pagefind.app/) full-text index.
37
+ - **Guides + API in one site** — hand-written Markdown guides and the
38
+ auto-generated reference share one sidebar and one search.
39
+ - **LLM-friendly** — every page ships a clean companion `.md`, plus a
40
+ copy-page button to hand any page to Claude / ChatGPT / Perplexity.
41
+ - **Polished by default** — light/dark OKLCH themes, Google Fonts, shiki syntax
42
+ highlighting, a Monaco source viewer, and `Source: file:line` links.
43
+
44
+ ## Quick start
8
45
 
9
46
  ```sh
10
- pnpm add -D clean-jsdoc-theme jsdoc
47
+ npm install --save-dev clean-jsdoc-theme jsdoc
11
48
  ```
12
49
 
13
- ## Usage
14
-
15
- Add a `jsdoc.json` to your project:
50
+ Add a `jsdoc.json`:
16
51
 
17
52
  ```json
18
53
  {
19
- "source": {
20
- "include": ["./src", "./README.md"]
21
- },
54
+ "source": { "include": ["./src", "./README.md"] },
22
55
  "plugins": ["plugins/markdown"],
23
56
  "opts": {
24
- "encoding": "utf8",
25
57
  "destination": "dist",
26
58
  "recurse": true,
27
- "template": "./node_modules/clean-jsdoc-theme/dist"
59
+ "template": "node_modules/clean-jsdoc-theme/dist"
28
60
  }
29
61
  }
30
62
  ```
31
63
 
32
- Run JSDoc:
64
+ Build, then serve over HTTP (Pagefind needs HTTP to load its index):
33
65
 
34
66
  ```sh
35
67
  jsdoc -c jsdoc.json
68
+ npx serve dist
36
69
  ```
37
70
 
38
- Then serve `dist/` over HTTP (Pagefind requires HTTP for the search index to load):
39
-
40
- ```sh
41
- pnpm dlx serve dist
42
- ```
43
-
44
- ## What gets generated
45
-
46
- The theme emits a page per documented container (class / interface / mixin / module / namespace / typedef), one aggregated **Globals** page, the **README** as the home page, and **tutorials** as guide pages. For each page:
47
-
48
- - `<slug>/index.html` — a server-rendered page with a pre-hydration theme script, layout chrome (header / sidebar / TOC / footer), island markers, and the lazy island loader.
49
- - `<slug>/index.md` — the page's Markdown, written verbatim alongside the HTML, so LLMs (and the copy-page button) can fetch the source for any page. Source-viewer pages have none.
50
-
51
- Plus, once per build:
52
-
53
- - `_assets/styles.<buildId>.css` — combined theme-variable layer + static utility CSS, content-hashed for caching.
54
- - `_assets/search-index.<buildId>.json` — the fuzzy search index the command palette (`Ctrl/⌘ K`) fetches on first open.
55
- - `_islands/<name>.js` — one ESM chunk per island (`sidebar`, `mobile-nav`, `toc`, `toc-mobile`, `cmdk`, `code-tabs`, `copy-btn`, `copy-page`, `theme-toggle`, `settings`, `code-viewer`). Each page loads only the chunks whose markers are present.
56
- - `pagefind/…` — an optional Pagefind full-text index, built against the on-disk HTML.
57
-
58
- When `templates.default.outputSourceFiles` is on (default), every documented source file also becomes a read-only viewer page, with a flat **Source Files** index and a `Source: file:line` link on each member.
59
-
60
- `opts.package` (the path to your `package.json` if you pass `--package`) flows into the manifest as `pkg.name` / `pkg.version` / `pkg.repository` / etc. for footer and `<meta>` tags. If not provided, the theme falls back to JSDoc's automatic `kind: 'package'` doclet, then to no metadata.
61
-
62
- ## Configuration
63
-
64
- All keys go under `opts` in `jsdoc.json` (unless noted):
65
-
66
- | Key | Type | Description |
67
- | --------------------------------------- | ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
68
- | `siteName` | `string` \| `{ default?, dark?, light?, alt? }` | Header/footer identity + `<title>` suffix. A string, or a per-theme logo set (local images are copied to `_assets/logo-*`). |
69
- | `fonts` | `{ heading?, body?, mono? }` | Google Fonts family names for `heading`/`body`; `mono` is a CSS stack. |
70
- | `sectionOrder` | `string[]` | Orders **and** filters the sidebar sections (e.g. `["Classes","Modules","Tutorials"]`). |
71
- | `menu` | `{ id?, title?, link?/href?, icon? }[]` | Full sidebar top region (built-in `home`/`source` links + external links). Takes precedence over `sectionOrder`'s built-ins. |
72
- | `clubSidebarItems` | `boolean` | Club related entries into collapsible `parent → children` groups by path prefix (e.g. all `queue/*` under `queue`). Off by default. |
73
- | `aiPrompt` | `string` | Custom prompt for the copy-page "Open in …" actions. `{siteName}`, `{url}`, `{mdUrl}` are substituted; only the prompt + links are sent (the AI fetches `{mdUrl}`). |
74
- | `copyPage` | `boolean` \| `{ enabled?, actions? }` | The copy-page button. `false` hides it; `actions` is an ordered subset of `["copy","view","claude","chatgpt","perplexity"]` (`[]` = primary button only). On by default. |
75
- | `templates.default.outputSourceFiles` | `boolean` | Emit source-viewer pages + `Source:` links. On by default. |
76
- | `templates.default.sourceLinkToComment` | `boolean` | Make `Source:` links land on the doc-comment line instead of the declaration. Off by default. |
77
-
78
- The default theme uses a light/dark OKLCH palette, system fonts, and the [GitHub Light](https://github.com/shikijs/textmate-grammars-themes/blob/main/packages/tm-themes/themes/github-light.json) / [GitHub Dark](https://github.com/shikijs/textmate-grammars-themes/blob/main/packages/tm-themes/themes/github-dark.json) shiki themes. Full token + component overrides land before stable.
79
-
80
- > **Pagefind is optional.** If `pagefind` isn't installed in the consuming project, the publish step warns and continues without the full-text index (the fuzzy palette still works).
81
-
82
- ## How it works
83
-
84
- `publish.ts` is small by design — every non-trivial concern lives in one of the boundary packages:
85
-
86
- ```
87
- JSDoc 4 invokes publish(data, opts, tutorials)
88
- │
89
- ├── setu.generateSite(data, { pkg, readme, tutorials, sources, … }) → SiteManifest
90
- │ (one MDX page per container + globals + home + tutorials)
91
- │
92
- ├── dwar.render(manifest, { theme, destination }) → RenderResult
93
- │ (Preact SSR + esbuild island bundles + CSS)
94
- │
95
- ├── writeOutputFiles(destination, result.files)
96
- │ (mkdir -p + writeFile loop; Windows-safe via node:path)
97
- │
98
- └── dwar.runPagefindAgainstDir(destination)
99
- (post-write search index; optional)
100
- ```
101
-
102
- The CJS bundle dynamic-`import()`s setu and dwar via `file://` URLs because both are ESM-only with `"type":"module"` while JSDoc 4 loads themes via `require()`. The bridge walks `node_modules` from its own location, so it works regardless of where JSDoc was invoked.
103
-
104
- See the per-package READMEs for deeper detail:
105
-
106
- - [`@clean-jsdoc-theme/utils`](../utils) — type contracts and slug rules
107
- - [`@clean-jsdoc-theme/setu`](../setu) — JSDoc → SiteManifest
108
- - [`@clean-jsdoc-theme/rang`](../rang) — Preact components + island registry
109
- - [`@clean-jsdoc-theme/dwar`](../dwar) — SiteManifest → OutputFile[]
71
+ ## Documentation
110
72
 
111
- ## End-to-end example
73
+ - **Guides & full reference** — [**ankdev.me/clean-jsdoc-theme**](https://ankdev.me/clean-jsdoc-theme): installation, TypeDoc usage, configuration, and theming.
74
+ - **Live demo** — [**ankdev.me/clean-jsdoc-theme/api-docs**](https://ankdev.me/clean-jsdoc-theme/api-docs): a real generated API reference, so you can see the output before installing.
112
75
 
113
- [`examples/basic/`](../../examples/basic) is the working reference: a tree of JSDoc-annotated source files in `src/`, tutorials, a `jsdoc.json` exercising the config above, and `pnpm run docs` produces the full `dist/`.
76
+ > **v5 is in alpha.** To stay on v4, pin `"clean-jsdoc-theme": "^4"` in your
77
+ > `package.json`. Every past release is tagged, so you can check out the matching
78
+ > git tag to browse the v4 source.
114
79
 
115
80
  ## License
116
81
 
117
- MIT.
82
+ [MIT](https://github.com/ankitskvmdam/clean-jsdoc-theme/blob/master/LICENSE) © [Ankit Kumar](https://ankdev.me)
@@ -1,4 +1,4 @@
1
- import { CopyPageConfig, SiteLogo } from '@clean-jsdoc-theme/dwar';
1
+ import { ThemeColors, CopyPageConfig, PageNavConfig, SiteLogo, OutputFile } from '@clean-jsdoc-theme/dwar';
2
2
  import { DocInput, MenuItem } from '@clean-jsdoc-theme/setu';
3
3
 
4
4
  interface JSDocOpts {
@@ -21,6 +21,19 @@ interface JSDocOpts {
21
21
  body?: string;
22
22
  mono?: string;
23
23
  };
24
+ /**
25
+ * Light-mode color overrides from `jsdoc.json` (`"opts": { "colors": { ... } }`).
26
+ * Any subset of `bg`, `bgMuted`, `fg`, `fgMuted`, `accent`, `accentFg`, `border`;
27
+ * each value is any CSS color string (the theme ships oklch). Omitted keys keep
28
+ * the default palette.
29
+ */
30
+ colors?: unknown;
31
+ /**
32
+ * Dark-mode color overrides (`"opts": { "darkColors": { ... } }`). Same keys as
33
+ * {@link JSDocOpts.colors}; emitted under `[data-theme="dark"]`. Omitted keys
34
+ * keep the default dark palette.
35
+ */
36
+ darkColors?: unknown;
24
37
  /**
25
38
  * Project README as HTML. JSDoc renders the Markdown README (`-R`/`opts.readme`
26
39
  * or one found in the source paths) and replaces this with the resulting HTML
@@ -86,6 +99,13 @@ interface JSDocOpts {
86
99
  * primary copy button). Defaults to enabled with all actions.
87
100
  */
88
101
  copyPage?: unknown;
102
+ /**
103
+ * Previous/next page pager config (`jsdoc.json` `"opts": { "pageNav": … }`).
104
+ * Either a boolean (`false` hides the pager) or an object `{ enabled? }`. The
105
+ * pager links each content page to its neighbors in sidebar reading order.
106
+ * Defaults to enabled.
107
+ */
108
+ pageNav?: unknown;
89
109
  /**
90
110
  * Inline custom CSS (`jsdoc.json` `"opts": { "customCss": "…" }`), injected as
91
111
  * a `<style>` after the theme stylesheet so it can override.
@@ -118,6 +138,14 @@ interface JSDocOpts {
118
138
  * Set `false` to copy with the original `<name>.css`/`.js` (no hash).
119
139
  */
120
140
  hashCustomAssets?: unknown;
141
+ /**
142
+ * Build-stage progress output (`jsdoc.json` `"opts": { "progress": false }`).
143
+ * The setu→dwar pipeline does noticeably more than a bare jsdoc run (per-page
144
+ * MDX compile, per-island esbuild bundling, the Pagefind index), so by default
145
+ * the bridge narrates each stage with its elapsed time. Set `false` to silence
146
+ * the stage lines (the build report still prints).
147
+ */
148
+ progress?: unknown;
121
149
  /**
122
150
  * JSDoc's default-template source options, read from `conf.templates.default`
123
151
  * (or, as a fallback, nested under `opts.templates`):
@@ -155,6 +183,15 @@ declare function outputSourceFilesEnabled(opts: JSDocOpts): boolean;
155
183
  * is exactly `=== true`; otherwise `false` (the default: links jump to code).
156
184
  */
157
185
  declare function sourceLinkToCommentEnabled(opts: JSDocOpts): boolean;
186
+ /**
187
+ * Whether a JSDoc `conf.plugins` list enables the bundled `plugins/markdown`
188
+ * plugin. The theme relies on it: JSDoc runs `plugins/markdown` to convert the
189
+ * Markdown in doclet descriptions/tags to HTML *before* `publish` ever sees the
190
+ * doclets, so without it descriptions arrive as raw Markdown and render wrong.
191
+ * Pure + exported for testing — accepts the `plugins` array (module specifiers,
192
+ * e.g. `"plugins/markdown"`; tolerant of a `.js` suffix or path separators).
193
+ */
194
+ declare function hasMarkdownPlugin(plugins: unknown): boolean;
158
195
  /**
159
196
  * Validate `opts.sectionOrder` into a clean `string[]`, or `undefined` to fall
160
197
  * back to setu's default order. Accepts only an array; trims string entries and
@@ -177,6 +214,20 @@ declare function normalizeMenu(raw: unknown): MenuItem[] | undefined;
177
214
  * only), which is meaningful and kept.
178
215
  */
179
216
  declare function normalizeCopyPage(raw: unknown): CopyPageConfig | undefined;
217
+ /**
218
+ * Validate `opts.pageNav` into a {@link PageNavConfig}, or `undefined` to use the
219
+ * default (enabled). Accepts a boolean shorthand (`false` hides the pager) or an
220
+ * object whose `enabled` is read when boolean.
221
+ */
222
+ declare function normalizePageNav(raw: unknown): PageNavConfig | undefined;
223
+ /**
224
+ * Validate a user `colors`/`darkColors` object from `jsdoc.json` into a clean
225
+ * `Partial<ThemeColors>`: keeps only the known palette keys whose value is a
226
+ * non-empty string, dropping everything else. Returns `undefined` when the input
227
+ * is not an object or yields no usable keys, so callers can fall back cleanly.
228
+ * Values are passed through verbatim (any CSS color is valid).
229
+ */
230
+ declare function normalizeColors(raw: unknown): Partial<ThemeColors> | undefined;
180
231
  /**
181
232
  * Compute project-relative paths for a set of absolute source paths by stripping
182
233
  * their longest common directory prefix. Returns a `Map<absPath, relPath>` with
@@ -207,6 +258,24 @@ declare function computeRelPaths(absPaths: readonly string[]): Map<string, strin
207
258
  * the docs tree is read.
208
259
  */
209
260
  declare function collectDocs(dir: string): Promise<DocInput[]>;
261
+ /**
262
+ * Resolve the local images a doc references and route them through the same
263
+ * content-hashed `_assets/` pipeline the logo and custom files use. For each
264
+ * `![alt](src)` whose `src` points to a file on disk, the file is copied to
265
+ * `_assets/<base>.<hash><ext>` (cache-busted, deduped across docs) and the `src`
266
+ * is rewritten to the root-relative `/_assets/<base>.<hash><ext>` (rang's
267
+ * `MdxImg` adds the base path, like it does for links). A `src` is resolved
268
+ * relative to the project root when it starts with `/`, else relative to the
269
+ * doc's own directory; absolute (`http(s):`, `data:`), `#`-anchor, and
270
+ * unreadable srcs are left untouched (the last with a warning). Returns the docs
271
+ * with rewritten content plus the asset files to write. The bridge is the I/O
272
+ * layer here, so setu/dwar only ever see the final `_assets/` paths.
273
+ */
274
+ declare function resolveDocImages(docs: DocInput[], docsDir: string): Promise<{
275
+ docs: DocInput[];
276
+ files: OutputFile[];
277
+ inlineSvgs: Record<string, string>;
278
+ }>;
210
279
  /**
211
280
  * Validate `opts.docGroups` into a clean `string[]`, or `undefined` to fall back
212
281
  * to setu's default doc-group order. Mirrors {@link normalizeSectionOrder}:
@@ -215,4 +284,4 @@ declare function collectDocs(dir: string): Promise<DocInput[]>;
215
284
  declare function normalizeDocGroups(raw: unknown): string[] | undefined;
216
285
  declare function publish(data: unknown, opts: JSDocOpts, tutorials?: unknown): Promise<void>;
217
286
 
218
- export { collectDocs, computeRelPaths, normalizeCopyPage, normalizeDocGroups, normalizeMenu, normalizeSectionOrder, outputSourceFilesEnabled, publish, sourceLinkToCommentEnabled };
287
+ export { collectDocs, computeRelPaths, hasMarkdownPlugin, normalizeColors, normalizeCopyPage, normalizeDocGroups, normalizeMenu, normalizePageNav, normalizeSectionOrder, outputSourceFilesEnabled, publish, resolveDocImages, sourceLinkToCommentEnabled };
package/dist/publish.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { CopyPageConfig, SiteLogo } from '@clean-jsdoc-theme/dwar';
1
+ import { ThemeColors, CopyPageConfig, PageNavConfig, SiteLogo, OutputFile } from '@clean-jsdoc-theme/dwar';
2
2
  import { DocInput, MenuItem } from '@clean-jsdoc-theme/setu';
3
3
 
4
4
  interface JSDocOpts {
@@ -21,6 +21,19 @@ interface JSDocOpts {
21
21
  body?: string;
22
22
  mono?: string;
23
23
  };
24
+ /**
25
+ * Light-mode color overrides from `jsdoc.json` (`"opts": { "colors": { ... } }`).
26
+ * Any subset of `bg`, `bgMuted`, `fg`, `fgMuted`, `accent`, `accentFg`, `border`;
27
+ * each value is any CSS color string (the theme ships oklch). Omitted keys keep
28
+ * the default palette.
29
+ */
30
+ colors?: unknown;
31
+ /**
32
+ * Dark-mode color overrides (`"opts": { "darkColors": { ... } }`). Same keys as
33
+ * {@link JSDocOpts.colors}; emitted under `[data-theme="dark"]`. Omitted keys
34
+ * keep the default dark palette.
35
+ */
36
+ darkColors?: unknown;
24
37
  /**
25
38
  * Project README as HTML. JSDoc renders the Markdown README (`-R`/`opts.readme`
26
39
  * or one found in the source paths) and replaces this with the resulting HTML
@@ -86,6 +99,13 @@ interface JSDocOpts {
86
99
  * primary copy button). Defaults to enabled with all actions.
87
100
  */
88
101
  copyPage?: unknown;
102
+ /**
103
+ * Previous/next page pager config (`jsdoc.json` `"opts": { "pageNav": … }`).
104
+ * Either a boolean (`false` hides the pager) or an object `{ enabled? }`. The
105
+ * pager links each content page to its neighbors in sidebar reading order.
106
+ * Defaults to enabled.
107
+ */
108
+ pageNav?: unknown;
89
109
  /**
90
110
  * Inline custom CSS (`jsdoc.json` `"opts": { "customCss": "…" }`), injected as
91
111
  * a `<style>` after the theme stylesheet so it can override.
@@ -118,6 +138,14 @@ interface JSDocOpts {
118
138
  * Set `false` to copy with the original `<name>.css`/`.js` (no hash).
119
139
  */
120
140
  hashCustomAssets?: unknown;
141
+ /**
142
+ * Build-stage progress output (`jsdoc.json` `"opts": { "progress": false }`).
143
+ * The setu→dwar pipeline does noticeably more than a bare jsdoc run (per-page
144
+ * MDX compile, per-island esbuild bundling, the Pagefind index), so by default
145
+ * the bridge narrates each stage with its elapsed time. Set `false` to silence
146
+ * the stage lines (the build report still prints).
147
+ */
148
+ progress?: unknown;
121
149
  /**
122
150
  * JSDoc's default-template source options, read from `conf.templates.default`
123
151
  * (or, as a fallback, nested under `opts.templates`):
@@ -155,6 +183,15 @@ declare function outputSourceFilesEnabled(opts: JSDocOpts): boolean;
155
183
  * is exactly `=== true`; otherwise `false` (the default: links jump to code).
156
184
  */
157
185
  declare function sourceLinkToCommentEnabled(opts: JSDocOpts): boolean;
186
+ /**
187
+ * Whether a JSDoc `conf.plugins` list enables the bundled `plugins/markdown`
188
+ * plugin. The theme relies on it: JSDoc runs `plugins/markdown` to convert the
189
+ * Markdown in doclet descriptions/tags to HTML *before* `publish` ever sees the
190
+ * doclets, so without it descriptions arrive as raw Markdown and render wrong.
191
+ * Pure + exported for testing — accepts the `plugins` array (module specifiers,
192
+ * e.g. `"plugins/markdown"`; tolerant of a `.js` suffix or path separators).
193
+ */
194
+ declare function hasMarkdownPlugin(plugins: unknown): boolean;
158
195
  /**
159
196
  * Validate `opts.sectionOrder` into a clean `string[]`, or `undefined` to fall
160
197
  * back to setu's default order. Accepts only an array; trims string entries and
@@ -177,6 +214,20 @@ declare function normalizeMenu(raw: unknown): MenuItem[] | undefined;
177
214
  * only), which is meaningful and kept.
178
215
  */
179
216
  declare function normalizeCopyPage(raw: unknown): CopyPageConfig | undefined;
217
+ /**
218
+ * Validate `opts.pageNav` into a {@link PageNavConfig}, or `undefined` to use the
219
+ * default (enabled). Accepts a boolean shorthand (`false` hides the pager) or an
220
+ * object whose `enabled` is read when boolean.
221
+ */
222
+ declare function normalizePageNav(raw: unknown): PageNavConfig | undefined;
223
+ /**
224
+ * Validate a user `colors`/`darkColors` object from `jsdoc.json` into a clean
225
+ * `Partial<ThemeColors>`: keeps only the known palette keys whose value is a
226
+ * non-empty string, dropping everything else. Returns `undefined` when the input
227
+ * is not an object or yields no usable keys, so callers can fall back cleanly.
228
+ * Values are passed through verbatim (any CSS color is valid).
229
+ */
230
+ declare function normalizeColors(raw: unknown): Partial<ThemeColors> | undefined;
180
231
  /**
181
232
  * Compute project-relative paths for a set of absolute source paths by stripping
182
233
  * their longest common directory prefix. Returns a `Map<absPath, relPath>` with
@@ -207,6 +258,24 @@ declare function computeRelPaths(absPaths: readonly string[]): Map<string, strin
207
258
  * the docs tree is read.
208
259
  */
209
260
  declare function collectDocs(dir: string): Promise<DocInput[]>;
261
+ /**
262
+ * Resolve the local images a doc references and route them through the same
263
+ * content-hashed `_assets/` pipeline the logo and custom files use. For each
264
+ * `![alt](src)` whose `src` points to a file on disk, the file is copied to
265
+ * `_assets/<base>.<hash><ext>` (cache-busted, deduped across docs) and the `src`
266
+ * is rewritten to the root-relative `/_assets/<base>.<hash><ext>` (rang's
267
+ * `MdxImg` adds the base path, like it does for links). A `src` is resolved
268
+ * relative to the project root when it starts with `/`, else relative to the
269
+ * doc's own directory; absolute (`http(s):`, `data:`), `#`-anchor, and
270
+ * unreadable srcs are left untouched (the last with a warning). Returns the docs
271
+ * with rewritten content plus the asset files to write. The bridge is the I/O
272
+ * layer here, so setu/dwar only ever see the final `_assets/` paths.
273
+ */
274
+ declare function resolveDocImages(docs: DocInput[], docsDir: string): Promise<{
275
+ docs: DocInput[];
276
+ files: OutputFile[];
277
+ inlineSvgs: Record<string, string>;
278
+ }>;
210
279
  /**
211
280
  * Validate `opts.docGroups` into a clean `string[]`, or `undefined` to fall back
212
281
  * to setu's default doc-group order. Mirrors {@link normalizeSectionOrder}:
@@ -215,4 +284,4 @@ declare function collectDocs(dir: string): Promise<DocInput[]>;
215
284
  declare function normalizeDocGroups(raw: unknown): string[] | undefined;
216
285
  declare function publish(data: unknown, opts: JSDocOpts, tutorials?: unknown): Promise<void>;
217
286
 
218
- export { collectDocs, computeRelPaths, normalizeCopyPage, normalizeDocGroups, normalizeMenu, normalizeSectionOrder, outputSourceFilesEnabled, publish, sourceLinkToCommentEnabled };
287
+ export { collectDocs, computeRelPaths, hasMarkdownPlugin, normalizeColors, normalizeCopyPage, normalizeDocGroups, normalizeMenu, normalizePageNav, normalizeSectionOrder, outputSourceFilesEnabled, publish, resolveDocImages, sourceLinkToCommentEnabled };