shelving 1.216.0 → 1.216.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/package.json
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Definition, Definitions } from "../block/Definitions.js";
|
|
3
|
+
import { Flex } from "../block/Flex.js";
|
|
3
4
|
import { Heading } from "../block/Heading.js";
|
|
4
5
|
import { Preformatted } from "../block/Preformatted.js";
|
|
5
6
|
import { Prose } from "../block/Prose.js";
|
|
6
7
|
import { Section } from "../block/Section.js";
|
|
8
|
+
import { Title } from "../block/Title.js";
|
|
7
9
|
import { Code } from "../inline/Code.js";
|
|
8
10
|
import { Markup } from "../misc/Markup.js";
|
|
9
11
|
import { requireMeta } from "../misc/MetaContext.js";
|
|
@@ -19,5 +21,5 @@ const DEFAULT_TYPE = "unknown";
|
|
|
19
21
|
export function DocumentationPage({ title, name, kind, description, content, signatures, params, returns, throws, examples, children, }) {
|
|
20
22
|
const { url } = requireMeta();
|
|
21
23
|
const path = (url?.pathname ?? "/");
|
|
22
|
-
return (_jsxs(Page, { title: title ?? name, description: description, children: [kind && _jsx(DocumentationKind, { kind: kind }), signatures?.map(sig => (_jsx(Preformatted, { children: sig }, sig))), content && (_jsx(Prose, { children: _jsx(Markup, { children: content }) })), params?.length && (_jsxs(Section, { children: [_jsx(Heading, {
|
|
24
|
+
return (_jsxs(Page, { title: title ?? name, description: description, children: [_jsx(Title, { children: _jsxs(Flex, { left: true, children: [title ?? name, kind && _jsx(DocumentationKind, { kind: kind })] }) }), signatures?.map(sig => (_jsx(Preformatted, { children: sig }, sig))), content && (_jsx(Prose, { children: _jsx(Markup, { children: content }) })), params?.length && (_jsxs(Section, { children: [_jsx(Heading, { children: "Parameters" }), _jsx(Definitions, { row: true, children: params.map(({ name, type = DEFAULT_TYPE, description = "", optional }) => (_jsx(Definition, { term: _jsxs(_Fragment, { children: [_jsx(Code, { children: name }), ": ", _jsx(Code, { children: type }), optional && _jsx(_Fragment, { children: " (optional)" })] }), children: description }, `${name}-${type}-${description}`))) })] })), returns?.length && (_jsxs(Section, { children: [_jsx(Heading, { children: "Returns" }), _jsx(Definitions, { row: true, children: returns.map(({ type = DEFAULT_TYPE, description = "" }) => (_jsx(Definition, { term: _jsx(Code, { children: type }), children: description }, `${type}-${description}`))) })] })), throws?.length && (_jsxs(Section, { children: [_jsx(Heading, { children: "Throws" }), _jsx(Definitions, { row: true, children: throws.map(({ type = DEFAULT_TYPE, description = "" }) => (_jsx(Definition, { term: _jsx(Code, { children: type }), children: description }, `${type}-${description}`))) })] })), examples?.length && (_jsxs(Section, { children: [_jsx(Heading, { children: "Examples" }), examples.map(({ description }) => (_jsx(Preformatted, { children: description }, description)))] })), _jsx(TreeCards, { path: path, children: children })] }));
|
|
23
25
|
}
|
|
@@ -2,10 +2,12 @@ import type { ReactNode } from "react";
|
|
|
2
2
|
import type { DocumentationElementProps } from "../../util/element.js";
|
|
3
3
|
import type { AbsolutePath } from "../../util/path.js";
|
|
4
4
|
import { Definition, Definitions } from "../block/Definitions.js";
|
|
5
|
+
import { Flex } from "../block/Flex.js";
|
|
5
6
|
import { Heading } from "../block/Heading.js";
|
|
6
7
|
import { Preformatted } from "../block/Preformatted.js";
|
|
7
8
|
import { Prose } from "../block/Prose.js";
|
|
8
9
|
import { Section } from "../block/Section.js";
|
|
10
|
+
import { Title } from "../block/Title.js";
|
|
9
11
|
import { Code } from "../inline/Code.js";
|
|
10
12
|
import { Markup } from "../misc/Markup.js";
|
|
11
13
|
import { requireMeta } from "../misc/MetaContext.js";
|
|
@@ -37,7 +39,12 @@ export function DocumentationPage({
|
|
|
37
39
|
const path = (url?.pathname ?? "/") as AbsolutePath;
|
|
38
40
|
return (
|
|
39
41
|
<Page title={title ?? name} description={description}>
|
|
40
|
-
|
|
42
|
+
<Title>
|
|
43
|
+
<Flex left>
|
|
44
|
+
{title ?? name}
|
|
45
|
+
{kind && <DocumentationKind kind={kind} />}
|
|
46
|
+
</Flex>
|
|
47
|
+
</Title>
|
|
41
48
|
{signatures?.map(sig => (
|
|
42
49
|
<Preformatted key={sig}>{sig}</Preformatted>
|
|
43
50
|
))}
|
|
@@ -48,7 +55,7 @@ export function DocumentationPage({
|
|
|
48
55
|
)}
|
|
49
56
|
{params?.length && (
|
|
50
57
|
<Section>
|
|
51
|
-
<Heading
|
|
58
|
+
<Heading>Parameters</Heading>
|
|
52
59
|
<Definitions row>
|
|
53
60
|
{params.map(({ name, type = DEFAULT_TYPE, description = "", optional }) => (
|
|
54
61
|
<Definition
|
|
@@ -68,7 +75,7 @@ export function DocumentationPage({
|
|
|
68
75
|
)}
|
|
69
76
|
{returns?.length && (
|
|
70
77
|
<Section>
|
|
71
|
-
<Heading
|
|
78
|
+
<Heading>Returns</Heading>
|
|
72
79
|
<Definitions row>
|
|
73
80
|
{returns.map(({ type = DEFAULT_TYPE, description = "" }) => (
|
|
74
81
|
<Definition key={`${type}-${description}`} term={<Code>{type}</Code>}>
|
|
@@ -80,7 +87,7 @@ export function DocumentationPage({
|
|
|
80
87
|
)}
|
|
81
88
|
{throws?.length && (
|
|
82
89
|
<Section>
|
|
83
|
-
<Heading
|
|
90
|
+
<Heading>Throws</Heading>
|
|
84
91
|
<Definitions row>
|
|
85
92
|
{throws.map(({ type = DEFAULT_TYPE, description = "" }) => (
|
|
86
93
|
<Definition key={`${type}-${description}`} term={<Code>{type}</Code>}>
|
|
@@ -92,7 +99,7 @@ export function DocumentationPage({
|
|
|
92
99
|
)}
|
|
93
100
|
{examples?.length && (
|
|
94
101
|
<Section>
|
|
95
|
-
<Heading
|
|
102
|
+
<Heading>Examples</Heading>
|
|
96
103
|
{examples.map(({ description }) => (
|
|
97
104
|
<Preformatted key={description}>{description}</Preformatted>
|
|
98
105
|
))}
|
package/ui/menu/Menu.module.css
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
/* Typography */
|
|
11
11
|
font-family: var(--menu-font, var(--font-body));
|
|
12
|
-
font-size: var(--menu-size, var(--size-
|
|
12
|
+
font-size: var(--menu-size, var(--size-normal));
|
|
13
13
|
line-height: var(--menu-leading, var(--leading-normal));
|
|
14
14
|
color: var(--menu-color-text, var(--color-quiet));
|
|
15
15
|
}
|