@waveso/docs 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +155 -1
- package/README.md +114 -37
- package/dist/frontmatter.d.ts +8 -0
- package/dist/frontmatter.js +7 -1
- package/dist/next.d.ts +34 -27
- package/dist/next.js +20 -11
- package/dist/react/hero.d.ts +19 -0
- package/dist/react/hero.js +44 -0
- package/dist/react/layout.d.ts +1 -3
- package/dist/react/layout.js +17 -54
- package/dist/react/nav.d.ts +11 -11
- package/dist/react/nav.js +106 -58
- package/dist/react/next-nav.d.ts +5 -1
- package/dist/react/next-nav.js +4 -2
- package/dist/react/shell-labels.d.ts +8 -2
- package/dist/react/toc.d.ts +13 -3
- package/dist/react/toc.js +17 -10
- package/dist/render.js +2 -1
- package/dist/source.js +1 -1
- package/dist/styles.css +1079 -237
- package/dist/types.d.ts +31 -1
- package/package.json +5 -1
package/dist/types.d.ts
CHANGED
|
@@ -15,6 +15,21 @@ import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
|
15
15
|
* `Property 'audience' does not exist on type 'DocFrontmatter'` at every read
|
|
16
16
|
* site, because the inference then collapses to this default.
|
|
17
17
|
*/
|
|
18
|
+
/**
|
|
19
|
+
* One call to action in a page's hero.
|
|
20
|
+
*
|
|
21
|
+
* `variant` is optional because the shape every landing page has is
|
|
22
|
+
* primary-then-secondary: the first action is the primary unless it says
|
|
23
|
+
* otherwise.
|
|
24
|
+
*/
|
|
25
|
+
interface DocAction {
|
|
26
|
+
/** Visible text. */
|
|
27
|
+
label: string;
|
|
28
|
+
/** Where it goes. Internal hrefs route; external ones open in a new tab. */
|
|
29
|
+
href: string;
|
|
30
|
+
/** Overrides the position-derived default. */
|
|
31
|
+
variant?: 'primary' | 'secondary' | undefined;
|
|
32
|
+
}
|
|
18
33
|
interface DocFrontmatter {
|
|
19
34
|
/** Page title. Used for `<h1>` fallbacks, `<title>`, and search. */
|
|
20
35
|
title: string;
|
|
@@ -44,6 +59,21 @@ interface DocFrontmatter {
|
|
|
44
59
|
* Lower sorts first; pages without an order sort last, alphabetically.
|
|
45
60
|
*/
|
|
46
61
|
order?: number | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* Calls to action, and the opt-in for the page's hero.
|
|
64
|
+
*
|
|
65
|
+
* Declaring them turns {@link DocFrontmatter.title} and
|
|
66
|
+
* {@link DocFrontmatter.description} into a page header with these links
|
|
67
|
+
* under it, and stops `render` prepending its own `<h1>` — the hero renders
|
|
68
|
+
* the heading, because the tagline and the actions have to sit beneath it.
|
|
69
|
+
*
|
|
70
|
+
* Leave it off and the page is exactly what it was: the description stays a
|
|
71
|
+
* `<meta>` tag and the title is the first thing in the prose. That is the
|
|
72
|
+
* whole difference between documentation that is the entire site and
|
|
73
|
+
* documentation mounted inside an application that already has a landing
|
|
74
|
+
* page — one field, in the file that wants it.
|
|
75
|
+
*/
|
|
76
|
+
actions?: DocAction[] | undefined;
|
|
47
77
|
}
|
|
48
78
|
/**
|
|
49
79
|
* A single documentation page discovered on disk.
|
|
@@ -450,4 +480,4 @@ interface ResolvedDocsConfig<TFrontmatter extends DocFrontmatter = DocFrontmatte
|
|
|
450
480
|
frontmatterSchema?: StandardSchemaV1<unknown, TFrontmatter> | undefined;
|
|
451
481
|
}
|
|
452
482
|
//#endregion
|
|
453
|
-
export { DocFile, DocFrontmatter, DocLinkContext, DocNavGroup, DocNavLink, DocNavNode, DocNavPage, DocNavSeparator, DocsConfig, DocsLinkSeverity, DocsMeta, ImageResolver, LinkResolver, RenderedDoc, ResolvedDocsConfig, SearchRecord, TocEntry };
|
|
483
|
+
export { DocAction, DocFile, DocFrontmatter, DocLinkContext, DocNavGroup, DocNavLink, DocNavNode, DocNavPage, DocNavSeparator, DocsConfig, DocsLinkSeverity, DocsMeta, ImageResolver, LinkResolver, RenderedDoc, ResolvedDocsConfig, SearchRecord, TocEntry };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@waveso/docs",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Zero parser bytes in the browser: markdown docs for Next.js, built to hast in Node and rendered as your components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -68,6 +68,10 @@
|
|
|
68
68
|
"types": "./dist/react/callout.d.ts",
|
|
69
69
|
"default": "./dist/react/callout.js"
|
|
70
70
|
},
|
|
71
|
+
"./react/hero": {
|
|
72
|
+
"types": "./dist/react/hero.d.ts",
|
|
73
|
+
"default": "./dist/react/hero.js"
|
|
74
|
+
},
|
|
71
75
|
"./react/doc-content": {
|
|
72
76
|
"types": "./dist/react/doc-content.d.ts",
|
|
73
77
|
"default": "./dist/react/doc-content.js"
|