nimbus-docs 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/index.js +611 -8
- package/dist/cli/index.js.map +1 -1
- package/dist/client.js.map +1 -1
- package/dist/content.d.ts +5 -74
- package/dist/content.d.ts.map +1 -1
- package/dist/content.js +2 -2
- package/dist/content.js.map +1 -1
- package/dist/diagnostic-DZf0z79l.d.ts +123 -0
- package/dist/diagnostic-DZf0z79l.d.ts.map +1 -0
- package/dist/index.d.ts +1006 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +779 -174
- package/dist/index.js.map +1 -1
- package/dist/rules-DnAP-j89.js +5836 -0
- package/dist/rules-DnAP-j89.js.map +1 -0
- package/dist/schemas.d.ts +84 -105
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +114 -31
- package/dist/schemas.js.map +1 -1
- package/dist/strict-keys-BiXiT3pq.js +35 -0
- package/dist/strict-keys-BiXiT3pq.js.map +1 -0
- package/dist/types.d.ts +62 -21
- package/dist/types.d.ts.map +1 -1
- package/package.json +20 -4
- package/src/components/NimbusHead.astro +0 -4
package/dist/types.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { a as SeverityConfig, i as Severity, n as DiagnosticFix, r as RuleCode, t as Diagnostic } from "./diagnostic-DZf0z79l.js";
|
|
2
|
+
|
|
1
3
|
//#region src/types.d.ts
|
|
2
4
|
/**
|
|
3
5
|
* Public type surface for `nimbus-docs/types`.
|
|
@@ -7,8 +9,6 @@ interface NimbusConfig {
|
|
|
7
9
|
site: string;
|
|
8
10
|
title: string;
|
|
9
11
|
description?: string;
|
|
10
|
-
/** Short text or symbol (max ~2 chars) used in the header logo. */
|
|
11
|
-
logo: string;
|
|
12
12
|
locale?: string;
|
|
13
13
|
/** Label for the "Home" breadcrumb / root link. */
|
|
14
14
|
homeLabel?: string;
|
|
@@ -16,8 +16,6 @@ interface NimbusConfig {
|
|
|
16
16
|
github?: string | null;
|
|
17
17
|
/** Edit-link URL pattern. `{path}` is replaced with the doc's repo path. */
|
|
18
18
|
editPattern?: string | null;
|
|
19
|
-
/** Footer text. */
|
|
20
|
-
footer?: string;
|
|
21
19
|
/**
|
|
22
20
|
* Site-wide social/OG fallback image. Site-relative (e.g. `/og.png`) or
|
|
23
21
|
* absolute URL. Used when a page doesn't supply its own `socialImage`
|
|
@@ -29,6 +27,14 @@ interface NimbusConfig {
|
|
|
29
27
|
/** Site-wide head elements (meta, link, script, style). */
|
|
30
28
|
head?: HeadElement[];
|
|
31
29
|
sidebar?: SidebarConfig;
|
|
30
|
+
/**
|
|
31
|
+
* Site-wide chrome toggles. Both fields default to `true` (render).
|
|
32
|
+
* Per-page frontmatter (`sidebar: false`, `tableOfContents: false`) can
|
|
33
|
+
* override the site-wide default in the "off" direction. Merge is AND:
|
|
34
|
+
* chrome renders only when BOTH the site-wide flag AND the per-page
|
|
35
|
+
* field agree. There is no per-page opt-in to override a site-wide
|
|
36
|
+
* `false` — if you've turned a column off site-wide, it stays off.
|
|
37
|
+
*/
|
|
32
38
|
features?: FeaturesConfig;
|
|
33
39
|
/**
|
|
34
40
|
* Search backend. Absent means Pagefind. `false` disables framework search
|
|
@@ -93,7 +99,12 @@ interface VersionPageRef {
|
|
|
93
99
|
version: string;
|
|
94
100
|
/** Page slug (entry.id) within the collection. */
|
|
95
101
|
slug: string;
|
|
96
|
-
/**
|
|
102
|
+
/**
|
|
103
|
+
* Resolved URL path under the site, browser-href form: leading slash
|
|
104
|
+
* and a trailing slash on HTML document routes (`/v1/foo/`). Consumers
|
|
105
|
+
* (`<link rel="alternate">`, `<link rel="canonical">`, version picker)
|
|
106
|
+
* render this directly into `<a href>` / `<link href>`.
|
|
107
|
+
*/
|
|
97
108
|
url: string;
|
|
98
109
|
}
|
|
99
110
|
/**
|
|
@@ -130,11 +141,25 @@ interface VersionStatus {
|
|
|
130
141
|
isDeprecated: boolean;
|
|
131
142
|
isHidden: boolean;
|
|
132
143
|
}
|
|
144
|
+
/**
|
|
145
|
+
* Site-wide chrome toggles. Each field is a kill switch for one
|
|
146
|
+
* piece of the docs layout that the user might want hidden everywhere.
|
|
147
|
+
* Per-page frontmatter (`sidebar: false`, `tableOfContents: false`) can
|
|
148
|
+
* additionally turn a column off for individual pages even when the
|
|
149
|
+
* site-wide flag is `true`.
|
|
150
|
+
*
|
|
151
|
+
* Kept intentionally narrow — fields here exist because they need to
|
|
152
|
+
* thread through layout + header + mobile dialog (non-trivial to remove
|
|
153
|
+
* by user-side edits alone). Everything else that "could be a feature
|
|
154
|
+
* flag" is instead handled by editing user-owned files (delete the
|
|
155
|
+
* `<Pagination />` from `DocsLayout.astro`, drop `editPattern` to hide
|
|
156
|
+
* edit links, etc.).
|
|
157
|
+
*/
|
|
133
158
|
interface FeaturesConfig {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
159
|
+
/** Render the sidebar column site-wide. Default `true`. */
|
|
160
|
+
sidebar?: boolean;
|
|
161
|
+
/** Render the table-of-contents column site-wide. Default `true`. */
|
|
162
|
+
tableOfContents?: boolean;
|
|
138
163
|
}
|
|
139
164
|
interface SearchConfig {
|
|
140
165
|
provider?: "pagefind" | "custom";
|
|
@@ -320,7 +345,6 @@ interface BannerProps {
|
|
|
320
345
|
* Every field is something the Nimbus framework knows how to handle:
|
|
321
346
|
* - `head` entries get concatenated with `config.head` in the layout.
|
|
322
347
|
* - `noindex` emits `<meta name="robots" content="noindex">`.
|
|
323
|
-
* - `aiDeprioritize` signals AI crawlers via the conventional meta.
|
|
324
348
|
* - `title` / `description` populate `<title>` / `<meta name="description">`.
|
|
325
349
|
*/
|
|
326
350
|
interface BasePageProps {
|
|
@@ -330,8 +354,6 @@ interface BasePageProps {
|
|
|
330
354
|
head?: HeadElement[];
|
|
331
355
|
/** Emit `<meta name="robots" content="noindex">`. */
|
|
332
356
|
noindex?: boolean;
|
|
333
|
-
/** Signal AI crawlers to deprioritize this page. */
|
|
334
|
-
aiDeprioritize?: boolean;
|
|
335
357
|
/** Absolute or site-relative URL for this page's markdown variant. */
|
|
336
358
|
markdownUrl?: string;
|
|
337
359
|
/**
|
|
@@ -377,25 +399,44 @@ interface BasePageProps {
|
|
|
377
399
|
* project-specific extras.
|
|
378
400
|
*/
|
|
379
401
|
interface DocsPageProps extends BasePageProps {
|
|
380
|
-
/**
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
402
|
+
/**
|
|
403
|
+
* Layout mode. `"custom"` skips all chrome (sidebar, TOC, pagination) —
|
|
404
|
+
* the framework gets out of the way for landing pages and custom layouts.
|
|
405
|
+
* Per-key toggles (`sidebar: false`, `tableOfContents: false`, etc.) can
|
|
406
|
+
* override individual pieces regardless of mode.
|
|
407
|
+
*/
|
|
408
|
+
mode?: "doc" | "custom";
|
|
409
|
+
/**
|
|
410
|
+
* Whether the page is in the site search index. When undefined, derives
|
|
411
|
+
* from `noindex`: a non-crawlable page is by default not searchable.
|
|
412
|
+
*/
|
|
413
|
+
searchable?: boolean;
|
|
384
414
|
/** Don't render in production; treat as `noindex` in dev. */
|
|
385
415
|
draft?: boolean;
|
|
386
416
|
/** URL pointing at this page's source on the repo host (computed from `config.editPattern`). */
|
|
387
417
|
editUrl?: string;
|
|
388
418
|
/** Optional top-of-page banner. */
|
|
389
419
|
banner?: BannerProps;
|
|
390
|
-
/**
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
420
|
+
/**
|
|
421
|
+
* From `getSidebar()`. Pass `false` when the page opted out via
|
|
422
|
+
* `sidebar: false` in frontmatter — the layout treats `false` as
|
|
423
|
+
* "suppress all sidebar chrome" (desktop rail, mobile dialog, and the
|
|
424
|
+
* header menu button that opens it). An empty array still renders the
|
|
425
|
+
* column shell.
|
|
426
|
+
*/
|
|
427
|
+
sidebar: SidebarItem[] | false;
|
|
428
|
+
/**
|
|
429
|
+
* From `getTOC()`. Pass `false` when the page opted out via
|
|
430
|
+
* `tableOfContents: false` in frontmatter — the layout treats `false`
|
|
431
|
+
* as "suppress the TOC rail entirely" rather than rendering an empty
|
|
432
|
+
* column.
|
|
433
|
+
*/
|
|
434
|
+
headings: TOCItem[] | false;
|
|
394
435
|
/** From `getBreadcrumbs()`. */
|
|
395
436
|
breadcrumbs: Breadcrumb[];
|
|
396
437
|
/** From `getPrevNext()`. */
|
|
397
438
|
prevNext: PrevNext;
|
|
398
439
|
}
|
|
399
440
|
//#endregion
|
|
400
|
-
export { BadgeVariant, BannerProps, BasePageProps, Breadcrumb, DocsPageProps, FeaturesConfig, HeadElement, NimbusConfig, PrevNext, PrevNextLink, PrevNextOverrides, ResolvedVersions, SearchConfig, SearchProvider, SearchResult, SidebarBadge, SidebarConfig, SidebarConfigItem, SidebarExternalLinkItem, SidebarGroupItem, SidebarItem, SidebarLinkItem, SidebarSection, TOCItem, VersionAlternateRecord, VersionAlternatesTable, VersionPageRef, VersionStatus, VersionsConfig };
|
|
441
|
+
export { BadgeVariant, BannerProps, BasePageProps, Breadcrumb, type Diagnostic, type DiagnosticFix, DocsPageProps, FeaturesConfig, HeadElement, NimbusConfig, PrevNext, PrevNextLink, PrevNextOverrides, ResolvedVersions, type RuleCode, SearchConfig, SearchProvider, SearchResult, type Severity, type SeverityConfig, SidebarBadge, SidebarConfig, SidebarConfigItem, SidebarExternalLinkItem, SidebarGroupItem, SidebarItem, SidebarLinkItem, SidebarSection, TOCItem, VersionAlternateRecord, VersionAlternatesTable, VersionPageRef, VersionStatus, VersionsConfig };
|
|
401
442
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","names":[],"sources":["../src/types.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","names":[],"sources":["../src/types.ts"],"mappings":";;;;;;UAQiB,YAAA;EAAY;EAE3B,IAAA;EACA,KAAA;EACA,WAAA;EACA,MAAA;EAgCS;EA9BT,SAAA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f,IAAA,GAAO,YAAA;EACP,IAAA,GAAO,YAAA;AAAA;AAAA,UAGQ,iBAAA;EACf,IAAA;IAAkB,IAAA;IAAe,KAAA;EAAA;EACjC,IAAA;IAAkB,IAAA;IAAe,KAAA;EAAA;AAAA;;;;;;;UAalB,WAAA;EACf,OAAA;EACA,IAAA;EA8CkB;EA5ClB,WAAA;IAwBA,oFAtBE,EAAA,UAwBK;IAtBL,IAAA;EAAA;AAAA;;;;;;;AAsEJ;;;;;;;;UApDiB,aAAA;EACf,KAAA;EACA,WAAA;EAkDqC;EAhDrC,IAAA,GAAO,WAAA;EA6DP;EA3DA,OAAA;EAiEA;EA/DA,WAAA;EAiES;;;;;;;EAzDT,WAAA;EA8EU;;;;;EAxEV,WAAA,GAAc,IAAA;;;;;;EAMd,UAAA;;;;;EAKA,OAAA;AAAA;;;;;;;;;;;;;;;;;UAmBe,aAAA,SAAsB,aAAA;;;;;;;EAQrC,IAAA;;;;;EAKA,UAAA;;EAEA,KAAA;;EAIA,OAAA;;EAEA,MAAA,GAAS,WAAA;;;;;;;;EAUT,OAAA,EAAS,WAAA;;;;;;;EAOT,QAAA,EAAU,OAAA;;EAEV,WAAA,EAAa,UAAA;;EAEb,QAAA,EAAU,QAAA;AAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nimbus-docs",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Docs, for humans and agents",
|
|
@@ -66,16 +66,32 @@
|
|
|
66
66
|
"@clack/prompts": "^0.9.1",
|
|
67
67
|
"@shikijs/transformers": "^4.1.0",
|
|
68
68
|
"@vercel/detect-agent": "^1.2.3",
|
|
69
|
-
"mri": "^1.2.0"
|
|
69
|
+
"mri": "^1.2.0",
|
|
70
|
+
"satteri": "^0.6.3",
|
|
71
|
+
"yaml": "^2.7.1"
|
|
70
72
|
},
|
|
71
73
|
"devDependencies": {
|
|
74
|
+
"@shikijs/types": "^4.1.0",
|
|
72
75
|
"astro": "^6.4.0",
|
|
76
|
+
"github-slugger": "^2.0.0",
|
|
77
|
+
"remark-lint-emphasis-marker": "^4.0.1",
|
|
78
|
+
"remark-lint-fenced-code-flag": "^4.2.0",
|
|
79
|
+
"remark-lint-heading-increment": "^4.0.1",
|
|
80
|
+
"remark-lint-no-duplicate-headings": "^4.0.1",
|
|
81
|
+
"remark-lint-no-heading-punctuation": "^4.0.1",
|
|
82
|
+
"remark-lint-no-literal-urls": "^4.0.1",
|
|
83
|
+
"remark-lint-no-multiple-toplevel-headings": "^4.0.1",
|
|
84
|
+
"remark-lint-unordered-list-marker-style": "^4.0.1",
|
|
73
85
|
"tsdown": "^0.20.3",
|
|
74
|
-
"
|
|
86
|
+
"tsx": "^4.22.3",
|
|
87
|
+
"typescript": "^5.8.3",
|
|
88
|
+
"unified": "^11.0.5",
|
|
89
|
+
"vfile": "^6.0.3"
|
|
75
90
|
},
|
|
76
91
|
"scripts": {
|
|
77
92
|
"build": "tsdown",
|
|
78
93
|
"dev": "tsdown --watch",
|
|
79
|
-
"typecheck": "tsc --noEmit"
|
|
94
|
+
"typecheck": "tsc --noEmit",
|
|
95
|
+
"test": "node --import tsx --test \"test/**/*.test.ts\""
|
|
80
96
|
}
|
|
81
97
|
}
|
|
@@ -43,8 +43,6 @@ export interface Props {
|
|
|
43
43
|
description?: string;
|
|
44
44
|
/** Emit `<meta name="robots" content="noindex">`. */
|
|
45
45
|
noindex?: boolean;
|
|
46
|
-
/** Emit `<meta name="ai-deprioritize" content="true">`. */
|
|
47
|
-
aiDeprioritize?: boolean;
|
|
48
46
|
/** Absolute or site-relative URL for the markdown variant of this page. */
|
|
49
47
|
markdownUrl?: string;
|
|
50
48
|
/**
|
|
@@ -73,7 +71,6 @@ const {
|
|
|
73
71
|
title,
|
|
74
72
|
description,
|
|
75
73
|
noindex,
|
|
76
|
-
aiDeprioritize,
|
|
77
74
|
markdownUrl,
|
|
78
75
|
socialImage,
|
|
79
76
|
lastUpdated,
|
|
@@ -209,7 +206,6 @@ const mergedHead = [...(config.head ?? []), ...pageHead];
|
|
|
209
206
|
<meta name="generator" content={Astro.generator} />
|
|
210
207
|
{resolvedDescription && <meta name="description" content={resolvedDescription} />}
|
|
211
208
|
{noindex && <meta name="robots" content="noindex" />}
|
|
212
|
-
{aiDeprioritize && <meta name="ai-deprioritize" content="true" />}
|
|
213
209
|
|
|
214
210
|
<link rel="icon" type={faviconType} href={faviconHref} />
|
|
215
211
|
{hasSite && canonical && <link rel="canonical" href={canonical} />}
|