clean-jsdoc-theme 5.1.0 → 5.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,228 +1,245 @@
1
- import { OutputFile, SiteLogo, ThemeColors, CopyPageConfig, MetaTag, PageNavConfig, ThemeConfig } from '@clean-jsdoc-theme/dwar';
2
- import { DocInput, MenuItem, PlaygroundSiteConfig, TutorialInput } from '@clean-jsdoc-theme/setu';
3
-
1
+ import { CopyPageConfig, MetaTag, OutputFile, PageNavConfig, SiteLogo, ThemeColors, ThemeConfig } from "@clean-jsdoc-theme/dwar";
2
+ import { DocInput, MenuItem, PlaygroundSiteConfig, TutorialInput } from "@clean-jsdoc-theme/setu";
3
+ //#region src/publish.d.ts
4
4
  interface JSDocOpts {
5
- destination?: string;
6
- package?: string;
7
- /**
8
- * Site identity from `jsdoc.json` (`"opts": { "siteName": ... }`). Either a
9
- * string (shown in the header/footer and appended to each page's `<title>`),
10
- * or a logo image set `{ default, dark, light, alt }`. Local image paths are
11
- * copied into the output; `http(s)://` and `data:` values pass through. The
12
- * `alt` text (or `pkg.name`) is used for the `<title>` suffix and image alt.
13
- */
14
- siteName?: string | SiteLogo;
15
- /**
16
- * Font overrides from `jsdoc.json` (`"opts": { "fonts": { ... } }`). Values
17
- * are Google Fonts family names for `heading`/`body`; `mono` is a CSS stack.
18
- */
19
- fonts?: {
20
- heading?: string;
21
- body?: string;
22
- mono?: string;
5
+ destination?: string;
6
+ package?: string;
7
+ /**
8
+ * Site identity from `jsdoc.json` (`"opts": { "siteName": ... }`). Either a
9
+ * string (shown in the header/footer and appended to each page's `<title>`),
10
+ * or a logo image set `{ default, dark, light, alt }`. Local image paths are
11
+ * copied into the output; `http(s)://` and `data:` values pass through. The
12
+ * `alt` text (or `pkg.name`) is used for the `<title>` suffix and image alt.
13
+ */
14
+ siteName?: string | SiteLogo;
15
+ /**
16
+ * Font overrides from `jsdoc.json` (`"opts": { "fonts": { ... } }`). Values
17
+ * are Google Fonts family names for `heading`/`body`; `mono` is a CSS stack.
18
+ */
19
+ fonts?: {
20
+ heading?: string;
21
+ body?: string;
22
+ mono?: string;
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;
37
+ /**
38
+ * Project README as HTML. JSDoc renders the Markdown README (`-R`/`opts.readme`
39
+ * or one found in the source paths) and replaces this with the resulting HTML
40
+ * before calling `publish`. Rendered as the site home page.
41
+ */
42
+ readme?: string;
43
+ /** Path to the tutorials directory (`-u`/`opts.tutorials`); resolved tree arrives as the 3rd `publish` arg. */
44
+ tutorials?: string;
45
+ /**
46
+ * Path to a docs content directory (`jsdoc.json` `"opts": { "docs": "docs/" }`),
47
+ * resolved relative to the cwd. The bridge walks it recursively; each
48
+ * `*.md`/`*.markdown` (and `*.html`) file becomes a prose page at its clean,
49
+ * unprefixed slug (the relative path), grouped by frontmatter/directory. A root
50
+ * `index.md` becomes the home page. Unset → no docs site (today's behavior).
51
+ */
52
+ docs?: unknown;
53
+ /**
54
+ * Top-level doc-group display order (`jsdoc.json` `"opts": { "docGroups": [...] }`).
55
+ * An ordered list of doc-group labels controlling how the doc-group sidebar
56
+ * sections render (after the API sections). Omit for the default order.
57
+ */
58
+ docGroups?: unknown;
59
+ /**
60
+ * Group label assigned to a doc page that carries no frontmatter/directory
61
+ * group (`jsdoc.json` `"opts": { "defaultDocGroup": "Docs" }`). Omit to leave
62
+ * such pages ungrouped.
63
+ */
64
+ defaultDocGroup?: unknown;
65
+ /**
66
+ * Sidebar section order from `jsdoc.json` (`"opts": { "sectionOrder": [...] }`).
67
+ * An ordered list of section labels (e.g. `["Classes", "Tutorials"]`) that both
68
+ * filters and orders the sidebar sections; "Home" and "Source Files" are always
69
+ * shown regardless. Omit (or leave empty) for the default order.
70
+ */
71
+ sectionOrder?: unknown;
72
+ /**
73
+ * Full sidebar menu from `jsdoc.json` (`"opts": { "menu": [...] }`). An ordered
74
+ * list of `{ id, title, href, icon }` entries. When present it takes precedence
75
+ * over `sectionOrder` and controls the entire sidebar (built-ins, sections, and
76
+ * external links). See setu's {@link MenuItem}.
77
+ */
78
+ menu?: unknown;
79
+ /**
80
+ * Club related sidebar entries into prefix-grouped subtrees (`jsdoc.json`
81
+ * `"opts": { "clubSidebarItems": true }`). Groups entries within each section
82
+ * by the path segment before the first `/` (e.g. `queue/*` under a `queue`
83
+ * parent); a prefix with a single entry is left flat. Off by default.
84
+ */
85
+ clubSidebarItems?: unknown;
86
+ /**
87
+ * Which top-level sidebar sections collapse (`jsdoc.json`
88
+ * `"opts": { "collapsibleSidebarSections": true | ["Classes","Namespaces"] }`).
89
+ * `true`/absent → all; `false` → none; array → only those exact labels
90
+ * (case-sensitive). Unmatched labels warn. See utils `resolveCollapsibleSections`.
91
+ */
92
+ collapsibleSidebarSections?: unknown;
93
+ /**
94
+ * Custom prompt for the copy-page button's "Open in ChatGPT/Claude/Perplexity"
95
+ * actions (`jsdoc.json` `"opts": { "aiPrompt": "…" }`). `{siteName}`, `{url}`,
96
+ * and `{mdUrl}` (the page's raw Markdown link) placeholders are substituted at
97
+ * click time. Only the prompt + links are sent (the AI fetches `{mdUrl}`), so
98
+ * the query stays short for long docs. Omit for a sensible default.
99
+ */
100
+ aiPrompt?: unknown;
101
+ /**
102
+ * Copy-page button config (`jsdoc.json` `"opts": { "copyPage": … }`). Either a
103
+ * boolean (`false` hides the button) or an object `{ enabled?, actions? }`,
104
+ * where `actions` is an ordered subset of
105
+ * `["copy","view","claude","chatgpt","perplexity"]` (`[]` shows just the
106
+ * primary copy button). Defaults to enabled with all actions.
107
+ */
108
+ copyPage?: unknown;
109
+ /**
110
+ * Previous/next page pager config (`jsdoc.json` `"opts": { "pageNav": … }`).
111
+ * Either a boolean (`false` hides the pager) or an object `{ enabled? }`. The
112
+ * pager links each content page to its neighbors in sidebar reading order.
113
+ * Defaults to enabled.
114
+ */
115
+ pageNav?: unknown;
116
+ /**
117
+ * Scrollbar presentation (`jsdoc.json` `"opts": { "scrollbar": "native" }`).
118
+ * `"styled"` (default) = overlay bar that hides at rest; `"visible"` = themed
119
+ * bar always shown; `"native"` = the browser's own scrollbar. See #281.
120
+ */
121
+ scrollbar?: unknown;
122
+ /**
123
+ * Code-playground config (`jsdoc.json` `"opts": { "playground": … }`). Either
124
+ * a boolean (`true` turns it on with defaults; absent/`false` = off) or an
125
+ * object `{ enableForAllExamples?, providers?, codepen?, jsfiddle?,
126
+ * codesandbox? }`. `providers` picks which of CodePen/JSFiddle/CodeSandbox an
127
+ * `@example` (or prose code block) can be opened in; the per-provider records
128
+ * hold their site-wide runtime options. When set, `@playground` tags are
129
+ * honored; when off, they're ignored (byte-identical output).
130
+ */
131
+ playground?: unknown;
132
+ /**
133
+ * Custom site footer (`jsdoc.json` `"opts": { "footer": … }`). Either an
134
+ * inline HTML string (v4 parity) or `{ "file": "./footer.html" }` (read from
135
+ * disk by the bridge). Rendered into rang's footer slot in place of the
136
+ * default footer on every page; style it with `customCss`/`customCssFile`.
137
+ * Omit for the default footer.
138
+ */
139
+ footer?: unknown;
140
+ /**
141
+ * Site public base URL (`jsdoc.json` `"opts": { "siteUrl": "https://example.com" }`).
142
+ * When set, the build emits a `sitemap.xml` at the output root listing every
143
+ * non-hidden page's canonical URL. Only the URL's origin is used — the deploy
144
+ * sub-path comes from `basePath` — so a bare origin or a full URL whose path
145
+ * equals `basePath` both work. Omit it for no sitemap.
146
+ */
147
+ siteUrl?: unknown;
148
+ /**
149
+ * Emit an llmstxt.org index (`jsdoc.json` `"opts": { "llmsTxt": true }`) —
150
+ * `llms.txt` at the output root, plus `llms-full.txt` (every page concatenated)
151
+ * unless `full: false`. Accepts `true` (⇒ `{ full: true, api: true }`) or
152
+ * `{ full?: boolean, api?: boolean | 'index' }`, where `api: 'index'` lists API
153
+ * pages without descriptions and omits their bodies from `llms-full.txt`, and
154
+ * `api: false` omits API pages entirely. **Requires `siteUrl`** — the file is
155
+ * fetched standalone, so its links must be absolute; without it the build warns
156
+ * and emits nothing.
157
+ */
158
+ llmsTxt?: unknown;
159
+ /**
160
+ * Favicon (`jsdoc.json` `"opts": { "favicon": "./icon.svg" }`). A path to an
161
+ * image file (`.svg`/`.png`/`.ico`/…), relative to the working dir. The bridge
162
+ * copies it to a content-hashed `_assets/` asset and emits a `<link rel="icon">`
163
+ * in every page's `<head>`. Needed for an SVG favicon (browsers only
164
+ * auto-discover a root `favicon.ico`). Omit for none.
165
+ */
166
+ favicon?: unknown;
167
+ /**
168
+ * Site-wide custom `<meta>` tags (`jsdoc.json` `"opts": { "meta": [...] }`). An
169
+ * array of attribute maps — each object's key/value pairs become one `<meta>`
170
+ * tag in `<head>` (`{ name, content }`, `{ property, content }`, …). dwar
171
+ * escapes values, drops invalid attribute names, and de-dupes against its own
172
+ * head defaults (an author `name: "description"` replaces the auto one).
173
+ */
174
+ meta?: unknown;
175
+ /**
176
+ * Inline custom CSS (`jsdoc.json` `"opts": { "customCss": "…" }`), injected as
177
+ * a `<style>` after the theme stylesheet so it can override.
178
+ */
179
+ customCss?: unknown;
180
+ /**
181
+ * Path(s) to custom CSS file(s) (`"opts": { "customCssFile": "a.css" }` or an
182
+ * array). Each file is copied AS-IS (its own bytes) to
183
+ * `_assets/<name>.<hash>.css` and linked after the theme stylesheet. The
184
+ * `<hash>` is a content hash (see `hashCustomAssets`), so an unchanged file
185
+ * keeps a stable, cacheable URL.
186
+ */
187
+ customCssFile?: unknown;
188
+ /**
189
+ * Inline custom JS (`"opts": { "customJs": "…" }`), injected as a classic
190
+ * `<script>` before `</body>`, after the theme's own scripts.
191
+ */
192
+ customJs?: unknown;
193
+ /**
194
+ * Path(s) to custom JS file(s) (`"opts": { "customJsFile": "a.js" }` or an
195
+ * array). Each file is copied AS-IS to `_assets/<name>.<hash>.js` and
196
+ * referenced before `</body>`. See `hashCustomAssets`.
197
+ */
198
+ customJsFile?: unknown;
199
+ /**
200
+ * Whether to append a content hash to copied `customCssFile`/`customJsFile`
201
+ * asset names (`_assets/<name>.<hash>.css`). Defaults to `true` — the hash is
202
+ * derived from the file's content (NOT random), so an unchanged file yields
203
+ * the same URL across builds (cache-friendly) and a changed file cache-busts.
204
+ * Set `false` to copy with the original `<name>.css`/`.js` (no hash).
205
+ */
206
+ hashCustomAssets?: unknown;
207
+ /**
208
+ * Build-stage progress output (`jsdoc.json` `"opts": { "progress": false }`).
209
+ * The setu→dwar pipeline does noticeably more than a bare jsdoc run (per-page
210
+ * MDX compile, per-island esbuild bundling, the Pagefind index), so by default
211
+ * the bridge narrates each stage with its elapsed time. Set `false` to silence
212
+ * the stage lines (the build report still prints).
213
+ */
214
+ progress?: unknown;
215
+ /**
216
+ * JSDoc's default-template source options, read from `conf.templates.default`
217
+ * (or, as a fallback, nested under `opts.templates`):
218
+ * - `outputSourceFiles` — defaults to `true`; set `false` to suppress the
219
+ * per-file source viewer pages and the `Source: file:line` member links.
220
+ * - `sourceLinkToComment` — defaults to `false`. By default a `Source:`
221
+ * link lands on the first line of the declaration; set `true` to point it
222
+ * at the doclet's doc-comment line instead (the pre-v5 behavior).
223
+ * - `cleanOutputDir` — defaults to `true`; set `false` to keep existing files
224
+ * in the destination instead of emptying it before each build.
225
+ */
226
+ templates?: {
227
+ default?: {
228
+ outputSourceFiles?: unknown;
229
+ sourceLinkToComment?: unknown;
230
+ cleanOutputDir?: unknown;
231
+ /**
232
+ * JSDoc's standard static-file passthrough
233
+ * (`templates.default.staticFiles`): `{ include, exclude, includePattern,
234
+ * excludePattern }`. Files matched by `include` are copied verbatim into
235
+ * the output (an include dir's contents land at the output root, JSDoc's
236
+ * mapping) AND their dirs become fallback search roots for image
237
+ * resolution, so a bare/relative reference to a static image resolves.
238
+ */
239
+ staticFiles?: unknown;
23
240
  };
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;
37
- /**
38
- * Project README as HTML. JSDoc renders the Markdown README (`-R`/`opts.readme`
39
- * or one found in the source paths) and replaces this with the resulting HTML
40
- * before calling `publish`. Rendered as the site home page.
41
- */
42
- readme?: string;
43
- /** Path to the tutorials directory (`-u`/`opts.tutorials`); resolved tree arrives as the 3rd `publish` arg. */
44
- tutorials?: string;
45
- /**
46
- * Path to a docs content directory (`jsdoc.json` `"opts": { "docs": "docs/" }`),
47
- * resolved relative to the cwd. The bridge walks it recursively; each
48
- * `*.md`/`*.markdown` (and `*.html`) file becomes a prose page at its clean,
49
- * unprefixed slug (the relative path), grouped by frontmatter/directory. A root
50
- * `index.md` becomes the home page. Unset → no docs site (today's behavior).
51
- */
52
- docs?: unknown;
53
- /**
54
- * Top-level doc-group display order (`jsdoc.json` `"opts": { "docGroups": [...] }`).
55
- * An ordered list of doc-group labels controlling how the doc-group sidebar
56
- * sections render (after the API sections). Omit for the default order.
57
- */
58
- docGroups?: unknown;
59
- /**
60
- * Group label assigned to a doc page that carries no frontmatter/directory
61
- * group (`jsdoc.json` `"opts": { "defaultDocGroup": "Docs" }`). Omit to leave
62
- * such pages ungrouped.
63
- */
64
- defaultDocGroup?: unknown;
65
- /**
66
- * Sidebar section order from `jsdoc.json` (`"opts": { "sectionOrder": [...] }`).
67
- * An ordered list of section labels (e.g. `["Classes", "Tutorials"]`) that both
68
- * filters and orders the sidebar sections; "Home" and "Source Files" are always
69
- * shown regardless. Omit (or leave empty) for the default order.
70
- */
71
- sectionOrder?: unknown;
72
- /**
73
- * Full sidebar menu from `jsdoc.json` (`"opts": { "menu": [...] }`). An ordered
74
- * list of `{ id, title, href, icon }` entries. When present it takes precedence
75
- * over `sectionOrder` and controls the entire sidebar (built-ins, sections, and
76
- * external links). See setu's {@link MenuItem}.
77
- */
78
- menu?: unknown;
79
- /**
80
- * Club related sidebar entries into prefix-grouped subtrees (`jsdoc.json`
81
- * `"opts": { "clubSidebarItems": true }`). Groups entries within each section
82
- * by the path segment before the first `/` (e.g. `queue/*` under a `queue`
83
- * parent); a prefix with a single entry is left flat. Off by default.
84
- */
85
- clubSidebarItems?: unknown;
86
- /**
87
- * Which top-level sidebar sections collapse (`jsdoc.json`
88
- * `"opts": { "collapsibleSidebarSections": true | ["Classes","Namespaces"] }`).
89
- * `true`/absent → all; `false` → none; array → only those exact labels
90
- * (case-sensitive). Unmatched labels warn. See utils `resolveCollapsibleSections`.
91
- */
92
- collapsibleSidebarSections?: unknown;
93
- /**
94
- * Custom prompt for the copy-page button's "Open in ChatGPT/Claude/Perplexity"
95
- * actions (`jsdoc.json` `"opts": { "aiPrompt": "…" }`). `{siteName}`, `{url}`,
96
- * and `{mdUrl}` (the page's raw Markdown link) placeholders are substituted at
97
- * click time. Only the prompt + links are sent (the AI fetches `{mdUrl}`), so
98
- * the query stays short for long docs. Omit for a sensible default.
99
- */
100
- aiPrompt?: unknown;
101
- /**
102
- * Copy-page button config (`jsdoc.json` `"opts": { "copyPage": … }`). Either a
103
- * boolean (`false` hides the button) or an object `{ enabled?, actions? }`,
104
- * where `actions` is an ordered subset of
105
- * `["copy","view","claude","chatgpt","perplexity"]` (`[]` shows just the
106
- * primary copy button). Defaults to enabled with all actions.
107
- */
108
- copyPage?: unknown;
109
- /**
110
- * Previous/next page pager config (`jsdoc.json` `"opts": { "pageNav": … }`).
111
- * Either a boolean (`false` hides the pager) or an object `{ enabled? }`. The
112
- * pager links each content page to its neighbors in sidebar reading order.
113
- * Defaults to enabled.
114
- */
115
- pageNav?: unknown;
116
- /**
117
- * Code-playground config (`jsdoc.json` `"opts": { "playground": … }`). Either
118
- * a boolean (`true` turns it on with defaults; absent/`false` = off) or an
119
- * object `{ enableForAllExamples?, providers?, codepen?, jsfiddle?,
120
- * codesandbox? }`. `providers` picks which of CodePen/JSFiddle/CodeSandbox an
121
- * `@example` (or prose code block) can be opened in; the per-provider records
122
- * hold their site-wide runtime options. When set, `@playground` tags are
123
- * honored; when off, they're ignored (byte-identical output).
124
- */
125
- playground?: unknown;
126
- /**
127
- * Custom site footer (`jsdoc.json` `"opts": { "footer": … }`). Either an
128
- * inline HTML string (v4 parity) or `{ "file": "./footer.html" }` (read from
129
- * disk by the bridge). Rendered into rang's footer slot in place of the
130
- * default footer on every page; style it with `customCss`/`customCssFile`.
131
- * Omit for the default footer.
132
- */
133
- footer?: unknown;
134
- /**
135
- * Site public base URL (`jsdoc.json` `"opts": { "siteUrl": "https://example.com" }`).
136
- * When set, the build emits a `sitemap.xml` at the output root listing every
137
- * non-hidden page's canonical URL. Only the URL's origin is used — the deploy
138
- * sub-path comes from `basePath` — so a bare origin or a full URL whose path
139
- * equals `basePath` both work. Omit it for no sitemap.
140
- */
141
- siteUrl?: unknown;
142
- /**
143
- * Favicon (`jsdoc.json` `"opts": { "favicon": "./icon.svg" }`). A path to an
144
- * image file (`.svg`/`.png`/`.ico`/…), relative to the working dir. The bridge
145
- * copies it to a content-hashed `_assets/` asset and emits a `<link rel="icon">`
146
- * in every page's `<head>`. Needed for an SVG favicon (browsers only
147
- * auto-discover a root `favicon.ico`). Omit for none.
148
- */
149
- favicon?: unknown;
150
- /**
151
- * Site-wide custom `<meta>` tags (`jsdoc.json` `"opts": { "meta": [...] }`). An
152
- * array of attribute maps — each object's key/value pairs become one `<meta>`
153
- * tag in `<head>` (`{ name, content }`, `{ property, content }`, …). dwar
154
- * escapes values, drops invalid attribute names, and de-dupes against its own
155
- * head defaults (an author `name: "description"` replaces the auto one).
156
- */
157
- meta?: unknown;
158
- /**
159
- * Inline custom CSS (`jsdoc.json` `"opts": { "customCss": "…" }`), injected as
160
- * a `<style>` after the theme stylesheet so it can override.
161
- */
162
- customCss?: unknown;
163
- /**
164
- * Path(s) to custom CSS file(s) (`"opts": { "customCssFile": "a.css" }` or an
165
- * array). Each file is copied AS-IS (its own bytes) to
166
- * `_assets/<name>.<hash>.css` and linked after the theme stylesheet. The
167
- * `<hash>` is a content hash (see `hashCustomAssets`), so an unchanged file
168
- * keeps a stable, cacheable URL.
169
- */
170
- customCssFile?: unknown;
171
- /**
172
- * Inline custom JS (`"opts": { "customJs": "…" }`), injected as a classic
173
- * `<script>` before `</body>`, after the theme's own scripts.
174
- */
175
- customJs?: unknown;
176
- /**
177
- * Path(s) to custom JS file(s) (`"opts": { "customJsFile": "a.js" }` or an
178
- * array). Each file is copied AS-IS to `_assets/<name>.<hash>.js` and
179
- * referenced before `</body>`. See `hashCustomAssets`.
180
- */
181
- customJsFile?: unknown;
182
- /**
183
- * Whether to append a content hash to copied `customCssFile`/`customJsFile`
184
- * asset names (`_assets/<name>.<hash>.css`). Defaults to `true` — the hash is
185
- * derived from the file's content (NOT random), so an unchanged file yields
186
- * the same URL across builds (cache-friendly) and a changed file cache-busts.
187
- * Set `false` to copy with the original `<name>.css`/`.js` (no hash).
188
- */
189
- hashCustomAssets?: unknown;
190
- /**
191
- * Build-stage progress output (`jsdoc.json` `"opts": { "progress": false }`).
192
- * The setu→dwar pipeline does noticeably more than a bare jsdoc run (per-page
193
- * MDX compile, per-island esbuild bundling, the Pagefind index), so by default
194
- * the bridge narrates each stage with its elapsed time. Set `false` to silence
195
- * the stage lines (the build report still prints).
196
- */
197
- progress?: unknown;
198
- /**
199
- * JSDoc's default-template source options, read from `conf.templates.default`
200
- * (or, as a fallback, nested under `opts.templates`):
201
- * - `outputSourceFiles` — defaults to `true`; set `false` to suppress the
202
- * per-file source viewer pages and the `Source: file:line` member links.
203
- * - `sourceLinkToComment` — defaults to `false`. By default a `Source:`
204
- * link lands on the first line of the declaration; set `true` to point it
205
- * at the doclet's doc-comment line instead (the pre-v5 behavior).
206
- * - `cleanOutputDir` — defaults to `true`; set `false` to keep existing files
207
- * in the destination instead of emptying it before each build.
208
- */
209
- templates?: {
210
- default?: {
211
- outputSourceFiles?: unknown;
212
- sourceLinkToComment?: unknown;
213
- cleanOutputDir?: unknown;
214
- /**
215
- * JSDoc's standard static-file passthrough
216
- * (`templates.default.staticFiles`): `{ include, exclude, includePattern,
217
- * excludePattern }`. Files matched by `include` are copied verbatim into
218
- * the output (an include dir's contents land at the output root, JSDoc's
219
- * mapping) AND their dirs become fallback search roots for image
220
- * resolution, so a bare/relative reference to a static image resolves.
221
- */
222
- staticFiles?: unknown;
223
- };
224
- };
225
- [key: string]: unknown;
241
+ };
242
+ [key: string]: unknown;
226
243
  }
227
244
  /**
228
245
  * Resolve `opts.footer` (inline HTML `string` | `{ file }`) into the single
@@ -242,8 +259,8 @@ declare function resolveFooter(raw: unknown): Promise<string | undefined>;
242
259
  * (resilient, like the logo/custom-asset paths). Exported for testing.
243
260
  */
244
261
  declare function resolveFavicon(raw: unknown, hash: boolean, hrefForServed: (servedPath: string) => string): Promise<{
245
- href: string;
246
- files: OutputFile[];
262
+ href: string;
263
+ files: OutputFile[];
247
264
  } | undefined>;
248
265
  /**
249
266
  * Validate `opts.meta` into a clean `MetaTag[]` (attribute maps), or `undefined`
@@ -332,8 +349,8 @@ declare function normalizePageNav(raw: unknown): PageNavConfig | undefined;
332
349
  * byte-identical.
333
350
  */
334
351
  declare function normalizePlayground(raw: unknown): {
335
- site: PlaygroundSiteConfig;
336
- theme: NonNullable<ThemeConfig['playground']>;
352
+ site: PlaygroundSiteConfig;
353
+ theme: NonNullable<ThemeConfig['playground']>;
337
354
  } | undefined;
338
355
  /**
339
356
  * Validate a user `colors`/`darkColors` object from `jsdoc.json` into a clean
@@ -393,10 +410,10 @@ declare function collectDocs(dir: string): Promise<DocInput[]>;
393
410
  * them untouched.
394
411
  */
395
412
  interface ImageCollector {
396
- resolve(rawSrc: string, baseDir: string): Promise<string | null>;
397
- readonly files: OutputFile[];
398
- readonly inlineSvgs: Record<string, string>;
399
- readonly consumed: Set<string>;
413
+ resolve(rawSrc: string, baseDir: string): Promise<string | null>;
414
+ readonly files: OutputFile[];
415
+ readonly inlineSvgs: Record<string, string>;
416
+ readonly consumed: Set<string>;
400
417
  }
401
418
  declare function createImageCollector(staticDirs?: readonly string[]): ImageCollector;
402
419
  /**
@@ -411,9 +428,9 @@ declare function createImageCollector(staticDirs?: readonly string[]): ImageColl
411
428
  * paths.
412
429
  */
413
430
  declare function resolveDocImages(docs: DocInput[], docsDir: string, collector?: ImageCollector): Promise<{
414
- docs: DocInput[];
415
- files: OutputFile[];
416
- inlineSvgs: Record<string, string>;
431
+ docs: DocInput[];
432
+ files: OutputFile[];
433
+ inlineSvgs: Record<string, string>;
417
434
  }>;
418
435
  /**
419
436
  * Resolve the local images referenced by tutorial content, routing them through
@@ -440,14 +457,14 @@ declare function resolveTutorialImages(tree: TutorialInput[], tutorialsDir: stri
440
457
  declare function resolveDocletImages(data: unknown, collector: ImageCollector): Promise<void>;
441
458
  /** Normalized `templates.default.staticFiles` config. */
442
459
  interface StaticFilesConfig {
443
- /** Resolved-as-given include paths (dirs or files), trimmed, non-empty. */
444
- include: string[];
445
- /** Paths to exclude (a file equal to, or under, an excluded dir is dropped). */
446
- exclude: string[];
447
- /** Regex (source string) a file's POSIX abs path must match to be included. */
448
- includePattern?: string;
449
- /** Regex (source string) that drops a file when its POSIX abs path matches. */
450
- excludePattern?: string;
460
+ /** Resolved-as-given include paths (dirs or files), trimmed, non-empty. */
461
+ include: string[];
462
+ /** Paths to exclude (a file equal to, or under, an excluded dir is dropped). */
463
+ exclude: string[];
464
+ /** Regex (source string) a file's POSIX abs path must match to be included. */
465
+ includePattern?: string;
466
+ /** Regex (source string) that drops a file when its POSIX abs path matches. */
467
+ excludePattern?: string;
451
468
  }
452
469
  /**
453
470
  * Normalize a raw `staticFiles` block into a {@link StaticFilesConfig}, or
@@ -482,11 +499,11 @@ declare function staticFileOutputName(absFile: string, includeRootAbs: string):
482
499
  declare function staticFileIncluded(absFile: string, config: StaticFilesConfig): boolean;
483
500
  /** One verbatim static-file copy entry. */
484
501
  interface StaticFileEntry {
485
- /** Output-relative POSIX path (where it lands under the destination). */
486
- outputPath: string;
487
- /** Absolute source path (matched against the image collector's `consumed`). */
488
- absSource: string;
489
- contents: Buffer;
502
+ /** Output-relative POSIX path (where it lands under the destination). */
503
+ outputPath: string;
504
+ /** Absolute source path (matched against the image collector's `consumed`). */
505
+ absSource: string;
506
+ contents: Buffer;
490
507
  }
491
508
  /**
492
509
  * Collect the files matched by a {@link StaticFilesConfig}: walk each include
@@ -499,14 +516,14 @@ interface StaticFileEntry {
499
516
  * testing.
500
517
  */
501
518
  declare function collectStaticFiles(config: StaticFilesConfig, warn?: (message: string) => void): Promise<{
502
- files: StaticFileEntry[];
503
- searchDirs: string[];
519
+ files: StaticFileEntry[];
520
+ searchDirs: string[];
504
521
  }>;
505
522
  /** The output of {@link resolveDocImages}: resolved docs + their image assets. */
506
523
  interface ResolvedDocs {
507
- docs: DocInput[];
508
- files: OutputFile[];
509
- inlineSvgs: Record<string, string>;
524
+ docs: DocInput[];
525
+ files: OutputFile[];
526
+ inlineSvgs: Record<string, string>;
510
527
  }
511
528
  /**
512
529
  * Overlay a locale's resolved docs over the default set (the per-locale docs
@@ -525,5 +542,6 @@ declare function overlayDocs(base: ResolvedDocs, locale: ResolvedDocs): Resolved
525
542
  */
526
543
  declare function normalizeDocGroups(raw: unknown): string[] | undefined;
527
544
  declare function publish(data: unknown, opts: JSDocOpts, tutorials?: unknown): Promise<void>;
528
-
529
- export { type ImageCollector, type ResolvedDocs, type StaticFileEntry, type StaticFilesConfig, cleanOutputDirEnabled, collectDocs, collectStaticFiles, computeRelPaths, createImageCollector, hasMarkdownPlugin, normalizeColors, normalizeCopyPage, normalizeDocGroups, normalizeMenu, normalizeMeta, normalizePageNav, normalizePlayground, normalizeSectionOrder, normalizeStaticFilesConfig, outputSourceFilesEnabled, overlayDocs, publish, readStaticFilesConfig, resolveDocImages, resolveDocletImages, resolveFavicon, resolveFooter, resolveTutorialImages, sourceLinkToCommentEnabled, staticFileIncluded, staticFileOutputName };
545
+ //#endregion
546
+ export { ImageCollector, ResolvedDocs, StaticFileEntry, StaticFilesConfig, cleanOutputDirEnabled, collectDocs, collectStaticFiles, computeRelPaths, createImageCollector, hasMarkdownPlugin, normalizeColors, normalizeCopyPage, normalizeDocGroups, normalizeMenu, normalizeMeta, normalizePageNav, normalizePlayground, normalizeSectionOrder, normalizeStaticFilesConfig, outputSourceFilesEnabled, overlayDocs, publish, readStaticFilesConfig, resolveDocImages, resolveDocletImages, resolveFavicon, resolveFooter, resolveTutorialImages, sourceLinkToCommentEnabled, staticFileIncluded, staticFileOutputName };
547
+ //# sourceMappingURL=publish.d.mts.map