@tenphi/renderer 0.22.1 → 0.24.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/dist/client/client-navigation.d.ts +1 -0
- package/dist/client/client-navigation.js +32 -0
- package/dist/client/client-navigation.js.map +1 -0
- package/dist/client/code-copy.js +3 -3
- package/dist/client/code-copy.js.map +1 -1
- package/dist/client/heading-links.js +4 -4
- package/dist/client/heading-links.js.map +1 -1
- package/dist/client/navigation-router.d.ts +2 -0
- package/dist/client/navigation-router.js +36 -0
- package/dist/client/navigation-router.js.map +1 -0
- package/dist/client/navigation.js +3 -3
- package/dist/client/navigation.js.map +1 -1
- package/dist/client/search.d.ts.map +1 -1
- package/dist/client/search.js +16 -2
- package/dist/client/search.js.map +1 -1
- package/dist/client/table-of-contents.js +2 -2
- package/dist/client/table-of-contents.js.map +1 -1
- package/dist/components/AppearanceInit.astro +6 -0
- package/dist/components/Card.styles.js +1 -0
- package/dist/components/CodeGroup.astro +8 -1
- package/dist/components/CodeGroup.styles.js +1 -2
- package/dist/components/Document.styles.js +54 -25
- package/dist/components/EditLink.astro +1 -1
- package/dist/components/Header.styles.js +13 -13
- package/dist/components/HeaderLinks.astro +4 -8
- package/dist/components/HeaderLinks.styles.js +17 -17
- package/dist/components/Hero.styles.js +28 -30
- package/dist/components/Icon.astro +3 -3
- package/dist/components/LanguageSelect.styles.js +8 -8
- package/dist/components/MainContent.styles.js +3 -3
- package/dist/components/MainPane.styles.js +1 -1
- package/dist/components/MarkdownAlert.styles.js +16 -17
- package/dist/components/MarkdownCodeBlock.styles.js +31 -19
- package/dist/components/MarkdownContent.styles.js +47 -89
- package/dist/components/MarkdownHeading.styles.js +23 -24
- package/dist/components/MarkdownInlineCode.styles.js +1 -1
- package/dist/components/MarkdownTable.styles.js +5 -5
- package/dist/components/Mermaid.styles.js +4 -1
- package/dist/components/MermaidSource.styles.js +1 -1
- package/dist/components/MobileMenuFooter.styles.js +1 -1
- package/dist/components/MobileMenuToggle.styles.js +3 -3
- package/dist/components/MobileNavigationTabs.astro +3 -2
- package/dist/components/MobileNavigationTabs.styles.js +3 -3
- package/dist/components/MobileTableOfContents.styles.js +2 -2
- package/dist/components/PackageVersion.styles.js +1 -1
- package/dist/components/PageFrame.styles.js +6 -6
- package/dist/components/Pagination.astro +2 -2
- package/dist/components/Pagination.styles.js +10 -10
- package/dist/components/Preview.astro +3 -4
- package/dist/components/Preview.styles.js +2 -2
- package/dist/components/Search.styles.js +13 -13
- package/dist/components/SearchButton.styles.js +10 -10
- package/dist/components/SearchResults.styles.js +21 -31
- package/dist/components/SelectPopover.astro +18 -9
- package/dist/components/Sidebar.styles.js +58 -49
- package/dist/components/SidebarList.astro +9 -6
- package/dist/components/SiteLogo.astro +2 -2
- package/dist/components/SiteLogo.styles.js +4 -4
- package/dist/components/SyntaxHighlight.styles.js +69 -48
- package/dist/components/TableOfContents.styles.js +1 -1
- package/dist/components/TableOfContentsLayout.styles.js +7 -7
- package/dist/components/ThemeSelect.styles.js +12 -12
- package/dist/components/TopNavigation.styles.js +1 -1
- package/dist/components/VersionSwitcher.styles.js +1 -1
- package/dist/components/appearance-bootstrap.js +21 -0
- package/dist/components/select-popover-styles.js +14 -14
- package/dist/components/tasty-states.js +10 -9
- package/dist/eslint-plugin.js +6 -9
- package/dist/eslint-plugin.js.map +1 -1
- package/dist/index.js +14 -11
- package/dist/index.js.map +1 -1
- package/dist/markdown/rendered-content.js +2 -2
- package/dist/markdown/rendered-content.js.map +1 -1
- package/dist/overrides/Header.astro +8 -12
- package/dist/overrides/Hero.astro +11 -6
- package/dist/overrides/MobileMenuFooter.astro +1 -1
- package/dist/overrides/MobileMenuToggle.astro +6 -5
- package/dist/overrides/PageFrame.astro +4 -3
- package/dist/overrides/Search.astro +22 -15
- package/dist/overrides/Sidebar.astro +2 -3
- package/dist/overrides/ThemeSelect.astro +2 -2
- package/dist/routes/Page.astro +17 -9
- package/dist/styling.js +1 -1
- package/dist/{tasty-states-_JhxFdK1.js → tasty-states-BIgiJQ3N.js} +7 -10
- package/dist/tasty-states-BIgiJQ3N.js.map +1 -0
- package/dist/theme/shiki-theme.d.ts.map +1 -1
- package/dist/theme/shiki-theme.js +37 -19
- package/dist/theme/shiki-theme.js.map +1 -1
- package/package.json +3 -3
- package/dist/tasty-states-_JhxFdK1.js.map +0 -1
|
@@ -13,17 +13,16 @@ const ui = messages(
|
|
|
13
13
|
);
|
|
14
14
|
---
|
|
15
15
|
|
|
16
|
-
<PreviewRoot className="td-preview not-content" aria-label={title}>
|
|
16
|
+
<PreviewRoot className="td-preview" data-not-content="" aria-label={title}>
|
|
17
17
|
<PreviewRoot.Caption><strong>{title}</strong></PreviewRoot.Caption>
|
|
18
|
-
<PreviewRoot.Stage
|
|
18
|
+
<PreviewRoot.Stage>
|
|
19
19
|
<PreviewRoot.Frame
|
|
20
|
-
className="td-preview__frame"
|
|
21
20
|
title={title}
|
|
22
21
|
sandbox={javascript ? "allow-scripts" : ""}
|
|
23
22
|
srcDoc={source}
|
|
24
23
|
/>
|
|
25
24
|
</PreviewRoot.Stage>
|
|
26
|
-
<PreviewRoot.Code
|
|
25
|
+
<PreviewRoot.Code>
|
|
27
26
|
<PreviewRoot.Summary>{ui.viewSource}</PreviewRoot.Summary>
|
|
28
27
|
<PreviewRoot.Pre><code>{source}</code></PreviewRoot.Pre>
|
|
29
28
|
</PreviewRoot.Code>
|
|
@@ -56,14 +56,14 @@ export const PreviewRoot = defineComponent("Preview", {
|
|
|
56
56
|
$: "> details > summary",
|
|
57
57
|
fill: {
|
|
58
58
|
"": null,
|
|
59
|
-
"@own(:
|
|
59
|
+
"@own(:hover)": "#surface-2-hover",
|
|
60
60
|
},
|
|
61
61
|
},
|
|
62
62
|
ActiveSummary: {
|
|
63
63
|
$: "> details > summary",
|
|
64
64
|
fill: {
|
|
65
65
|
"": null,
|
|
66
|
-
"@own(:
|
|
66
|
+
"@own(:active)": "#surface-2-pressed",
|
|
67
67
|
},
|
|
68
68
|
},
|
|
69
69
|
Pre: {
|
|
@@ -20,20 +20,20 @@ export const SearchRoot = defineComponent("Search", {
|
|
|
20
20
|
},
|
|
21
21
|
Dialog: {
|
|
22
22
|
$: "dialog",
|
|
23
|
-
radius: { "": "$card-radius", "
|
|
24
|
-
inlineSize: { "": "0 90% 40rem", "
|
|
23
|
+
radius: { "": "$card-radius", "!@md": "0" },
|
|
24
|
+
inlineSize: { "": "0 90% 40rem", "!@md": "100%" },
|
|
25
25
|
blockSize: {
|
|
26
26
|
"": "15rem max-content (100% - 8rem)",
|
|
27
|
-
"
|
|
27
|
+
"!@md": "100% 100% 100%",
|
|
28
28
|
},
|
|
29
|
-
margin: { "": "4rem auto auto", "
|
|
29
|
+
margin: { "": "4rem auto auto", "!@md": "0" },
|
|
30
30
|
padding: "0",
|
|
31
31
|
color: "#text",
|
|
32
32
|
border: true,
|
|
33
33
|
fill: "#surface",
|
|
34
34
|
shadow: "0 1rem 3rem #shadow",
|
|
35
35
|
opacity: "0",
|
|
36
|
-
scale: { "": "0.98", "
|
|
36
|
+
scale: { "": "0.98", "!@md": "1" },
|
|
37
37
|
transition: {
|
|
38
38
|
"": "none",
|
|
39
39
|
"!@reduced-motion":
|
|
@@ -62,12 +62,12 @@ export const SearchRoot = defineComponent("Search", {
|
|
|
62
62
|
},
|
|
63
63
|
Backdrop: {
|
|
64
64
|
$: "dialog::backdrop",
|
|
65
|
-
fill: { "": "#overlay", "
|
|
66
|
-
backdropFilter: { "": "blur(0.25rem)", "
|
|
65
|
+
fill: { "": "#overlay", "!@md": "#clear" },
|
|
66
|
+
backdropFilter: { "": "blur(0.25rem)", "!@md": "none" },
|
|
67
67
|
opacity: "0",
|
|
68
68
|
transition: {
|
|
69
69
|
"": "none",
|
|
70
|
-
"!@reduced-motion &
|
|
70
|
+
"!@reduced-motion & @md":
|
|
71
71
|
"opacity $dialog-transition ease-out, display $dialog-transition allow-discrete, overlay $dialog-transition allow-discrete",
|
|
72
72
|
},
|
|
73
73
|
},
|
|
@@ -75,20 +75,20 @@ export const SearchRoot = defineComponent("Search", {
|
|
|
75
75
|
// Tasty 3.9.3 appends @own states after pseudo-elements, producing invalid CSS.
|
|
76
76
|
// eslint-disable-next-line tasty/no-state-in-selector
|
|
77
77
|
$: "dialog[open][data-open]::backdrop",
|
|
78
|
-
opacity: { "": "1", "
|
|
78
|
+
opacity: { "": "1", "!@md": "0" },
|
|
79
79
|
},
|
|
80
80
|
Frame: {
|
|
81
|
-
$: "
|
|
81
|
+
$: "Frame",
|
|
82
82
|
display: "flex",
|
|
83
83
|
flow: "column",
|
|
84
84
|
flexGrow: "1",
|
|
85
85
|
blockSize: "min 0",
|
|
86
86
|
gap: "($gap * 2)",
|
|
87
|
-
padding: { "": "($gap * 3)", "
|
|
87
|
+
padding: { "": "($gap * 3)", "!@md": "($gap * 2) ($gap * 2) 0" },
|
|
88
88
|
overflow: "hidden",
|
|
89
89
|
},
|
|
90
90
|
Container: {
|
|
91
|
-
$: "
|
|
91
|
+
$: "Container",
|
|
92
92
|
display: "flex",
|
|
93
93
|
flow: "column",
|
|
94
94
|
flexGrow: "1",
|
|
@@ -97,7 +97,7 @@ export const SearchRoot = defineComponent("Search", {
|
|
|
97
97
|
},
|
|
98
98
|
Close: {
|
|
99
99
|
$: 'button[data-element="Close"]',
|
|
100
|
-
display: { "": "none", "
|
|
100
|
+
display: { "": "none", "!@md": "grid" },
|
|
101
101
|
placeItems: "center",
|
|
102
102
|
alignSelf: "flex-end",
|
|
103
103
|
flexShrink: "0",
|
|
@@ -10,10 +10,10 @@ export const SearchButtonRoot = extendComponent("SearchButton", Button, {
|
|
|
10
10
|
"data-element": "SearchButton",
|
|
11
11
|
styles: {
|
|
12
12
|
color: { ":hover": "#text", ":active": "#text" },
|
|
13
|
-
justifyContent: { "": "flex-start", "
|
|
13
|
+
justifyContent: { "": "flex-start", "!@md": "center" },
|
|
14
14
|
inlineSize: {
|
|
15
15
|
"": "initial 100% 22rem",
|
|
16
|
-
"
|
|
16
|
+
"!@md": "initial $docs-menu-button-size 22rem",
|
|
17
17
|
},
|
|
18
18
|
inlineMargin: {
|
|
19
19
|
"": "0 start",
|
|
@@ -21,21 +21,21 @@ export const SearchButtonRoot = extendComponent("SearchButton", Button, {
|
|
|
21
21
|
},
|
|
22
22
|
blockSize: {
|
|
23
23
|
"": "0 $control-height initial",
|
|
24
|
-
"
|
|
24
|
+
"!@md": "0 $docs-menu-button-size initial",
|
|
25
25
|
},
|
|
26
|
-
padding: { "": "0 $gap 0 ($gap * 1.5)", "
|
|
27
|
-
border: { "": true, "
|
|
26
|
+
padding: { "": "0 $gap 0 ($gap * 1.5)", "!@md": "0" },
|
|
27
|
+
border: { "": true, "!@md": "0" },
|
|
28
28
|
radius: "$header-control-radius",
|
|
29
29
|
fill: {
|
|
30
30
|
"": "#surface",
|
|
31
|
-
"
|
|
31
|
+
"!@md": "#clear",
|
|
32
32
|
":hover": "#surface-2-hover",
|
|
33
33
|
":active": "#surface-2-pressed",
|
|
34
34
|
},
|
|
35
35
|
preset: "small",
|
|
36
36
|
shadow: "none",
|
|
37
37
|
transition: "color $transition, fill $transition",
|
|
38
|
-
Label: { $: "> span", hide: { "": false, "
|
|
38
|
+
Label: { $: "> span", hide: { "": false, "!@md": true } },
|
|
39
39
|
PendingShortcut: {
|
|
40
40
|
$: "> kbd",
|
|
41
41
|
visibility: { "": null, "@own([data-pending])": "hidden" },
|
|
@@ -43,7 +43,7 @@ export const SearchButtonRoot = extendComponent("SearchButton", Button, {
|
|
|
43
43
|
Shortcut: {
|
|
44
44
|
$: "> kbd",
|
|
45
45
|
display: "flex",
|
|
46
|
-
hide: { "": false, "
|
|
46
|
+
hide: { "": false, "!@lg": true },
|
|
47
47
|
gap: "0.25em",
|
|
48
48
|
inlineMargin: "auto start",
|
|
49
49
|
inlinePadding: "0.375rem",
|
|
@@ -57,8 +57,8 @@ export const SearchButtonRoot = extendComponent("SearchButton", Button, {
|
|
|
57
57
|
content: '""',
|
|
58
58
|
display: "block",
|
|
59
59
|
flexShrink: "0",
|
|
60
|
-
inlineSize: { "": "1rem", "
|
|
61
|
-
blockSize: { "": "1rem", "
|
|
60
|
+
inlineSize: { "": "1rem", "!@md": "1.25rem" },
|
|
61
|
+
blockSize: { "": "1rem", "!@md": "1.25rem" },
|
|
62
62
|
fill: "#current",
|
|
63
63
|
// The imported SVG is encoded at build time and never evaluated in the browser.
|
|
64
64
|
// eslint-disable-next-line tasty/no-runtime-styles-mutation
|
|
@@ -6,6 +6,8 @@ import { defineComponent } from "../define-component.js";
|
|
|
6
6
|
|
|
7
7
|
configureCookbookStates();
|
|
8
8
|
|
|
9
|
+
// Pagefind owns and updates result markup; its UI API exposes classes, not
|
|
10
|
+
// configurable data-element identities. Keep class selectors only for that bridge.
|
|
9
11
|
export const SearchResultsRoot = defineComponent("SearchResults", {
|
|
10
12
|
as: "div",
|
|
11
13
|
"data-element": "SearchResults",
|
|
@@ -22,23 +24,11 @@ export const SearchResultsRoot = defineComponent("SearchResults", {
|
|
|
22
24
|
"$pagefind-ui-tag": "#surface-3",
|
|
23
25
|
preset: "body",
|
|
24
26
|
UI: {
|
|
25
|
-
$: ".pagefind-ui
|
|
26
|
-
display:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
flow: {
|
|
31
|
-
"": null,
|
|
32
|
-
"@own(:is(.pagefind-ui)) | @own(:is([data-search-results]))": "column",
|
|
33
|
-
},
|
|
34
|
-
flexGrow: {
|
|
35
|
-
"": null,
|
|
36
|
-
"@own(:is(.pagefind-ui)) | @own(:is([data-search-results]))": "1",
|
|
37
|
-
},
|
|
38
|
-
blockSize: {
|
|
39
|
-
"": null,
|
|
40
|
-
"@own(:is(.pagefind-ui)) | @own(:is([data-search-results]))": "min 0",
|
|
41
|
-
},
|
|
27
|
+
$: "UI, [data-element=EngineUI], .pagefind-ui",
|
|
28
|
+
display: "flex",
|
|
29
|
+
flow: "column",
|
|
30
|
+
flexGrow: "1",
|
|
31
|
+
blockSize: "min 0",
|
|
42
32
|
},
|
|
43
33
|
Form: {
|
|
44
34
|
$: ".pagefind-ui__form",
|
|
@@ -49,7 +39,7 @@ export const SearchResultsRoot = defineComponent("SearchResults", {
|
|
|
49
39
|
blockSize: "min 0",
|
|
50
40
|
},
|
|
51
41
|
Field: {
|
|
52
|
-
$: "
|
|
42
|
+
$: "Field",
|
|
53
43
|
position: "relative",
|
|
54
44
|
flexShrink: "0",
|
|
55
45
|
},
|
|
@@ -65,7 +55,7 @@ export const SearchResultsRoot = defineComponent("SearchResults", {
|
|
|
65
55
|
blockSize: "min 0",
|
|
66
56
|
},
|
|
67
57
|
Input: {
|
|
68
|
-
$: "
|
|
58
|
+
$: "Input",
|
|
69
59
|
flexShrink: "0",
|
|
70
60
|
inlineSize: "100%",
|
|
71
61
|
blockSize: "min 3rem",
|
|
@@ -77,7 +67,7 @@ export const SearchResultsRoot = defineComponent("SearchResults", {
|
|
|
77
67
|
shadow: "none",
|
|
78
68
|
},
|
|
79
69
|
Clear: {
|
|
80
|
-
$: "
|
|
70
|
+
$: "Clear",
|
|
81
71
|
position: "absolute",
|
|
82
72
|
blockInset: "0 start",
|
|
83
73
|
inlineInset: "0 end",
|
|
@@ -97,12 +87,12 @@ export const SearchResultsRoot = defineComponent("SearchResults", {
|
|
|
97
87
|
flexGrow: "1",
|
|
98
88
|
blockSize: "min 0",
|
|
99
89
|
overflowY: "auto",
|
|
100
|
-
blockMargin: { "": "($gap * 3) start", "
|
|
90
|
+
blockMargin: { "": "($gap * 3) start", "!@md": "($gap * 2) start" },
|
|
101
91
|
blockBorder: "$border-width solid #border start",
|
|
102
|
-
inlineSize: { "
|
|
103
|
-
inlineMargin: { "
|
|
104
|
-
inlinePadding: { "
|
|
105
|
-
blockPadding: { "
|
|
92
|
+
inlineSize: { "!@md": "(100% + ($gap * 4))" },
|
|
93
|
+
inlineMargin: { "!@md": "(-1 * $gap * 2)" },
|
|
94
|
+
inlinePadding: { "!@md": "($gap * 2)" },
|
|
95
|
+
blockPadding: { "!@md": "($gap * 2) end" },
|
|
106
96
|
},
|
|
107
97
|
Result: {
|
|
108
98
|
$: ".pagefind-ui__result",
|
|
@@ -151,9 +141,9 @@ export const SearchResultsRoot = defineComponent("SearchResults", {
|
|
|
151
141
|
},
|
|
152
142
|
More: {
|
|
153
143
|
$: ".pagefind-ui__button",
|
|
154
|
-
display: { "
|
|
155
|
-
inlineSize: { "
|
|
156
|
-
inlineMargin: { "
|
|
144
|
+
display: { "!@md": "block" },
|
|
145
|
+
inlineSize: { "!@md": "max-content" },
|
|
146
|
+
inlineMargin: { "!@md": "auto start" },
|
|
157
147
|
padding: "1x 2x",
|
|
158
148
|
border: "$border-width solid #border",
|
|
159
149
|
radius: "$radius",
|
|
@@ -166,7 +156,7 @@ export const SearchResultsRoot = defineComponent("SearchResults", {
|
|
|
166
156
|
fill: { "": null, "@own(:hover)": "#surface-2-hover" },
|
|
167
157
|
},
|
|
168
158
|
SearchIcon: {
|
|
169
|
-
$: "
|
|
159
|
+
$: "Field::before",
|
|
170
160
|
content: '""',
|
|
171
161
|
position: "absolute",
|
|
172
162
|
zIndex: "1",
|
|
@@ -182,7 +172,7 @@ export const SearchResultsRoot = defineComponent("SearchResults", {
|
|
|
182
172
|
pointerEvents: "none",
|
|
183
173
|
},
|
|
184
174
|
ClearIcon: {
|
|
185
|
-
$: "
|
|
175
|
+
$: "Clear::before",
|
|
186
176
|
content: '""',
|
|
187
177
|
display: "block",
|
|
188
178
|
inlineSize: "1rem",
|
|
@@ -193,7 +183,7 @@ export const SearchResultsRoot = defineComponent("SearchResults", {
|
|
|
193
183
|
mask: `url("${svgIconUrl(closeIcon)}") center / 1rem no-repeat`,
|
|
194
184
|
},
|
|
195
185
|
SuppressedClear: {
|
|
196
|
-
$: "
|
|
186
|
+
$: "[data-element=Clear]",
|
|
197
187
|
display: { "": "", "@own([hidden])": "none" },
|
|
198
188
|
},
|
|
199
189
|
},
|
|
@@ -27,9 +27,9 @@ const id = `select-${crypto.randomUUID()}`;
|
|
|
27
27
|
aria-label={triggerLabel}
|
|
28
28
|
title={title}
|
|
29
29
|
>
|
|
30
|
-
{icon && <Icon name={icon}
|
|
31
|
-
<span
|
|
32
|
-
<Icon name="down-caret"
|
|
30
|
+
{icon && <Icon name={icon} data-element="LabelIcon" />}
|
|
31
|
+
<span data-element="TriggerLabel">{selectedLabel}</span>
|
|
32
|
+
<Icon name="down-caret" data-element="Caret" />
|
|
33
33
|
</button>
|
|
34
34
|
<div
|
|
35
35
|
id={id}
|
|
@@ -39,7 +39,7 @@ const id = `select-${crypto.randomUUID()}`;
|
|
|
39
39
|
aria-label={title}
|
|
40
40
|
data-select-popover-panel
|
|
41
41
|
>
|
|
42
|
-
<div
|
|
42
|
+
<div data-element="PanelTitle">{title}</div>
|
|
43
43
|
<nav aria-label={title}>
|
|
44
44
|
{
|
|
45
45
|
options.map((option) => (
|
|
@@ -48,8 +48,8 @@ const id = `select-${crypto.randomUUID()}`;
|
|
|
48
48
|
aria-current={option.current ? "page" : undefined}
|
|
49
49
|
>
|
|
50
50
|
<span lang={option.lang}>{option.label}</span>
|
|
51
|
-
{option.hint && <span
|
|
52
|
-
<Icon name="approve-check"
|
|
51
|
+
{option.hint && <span data-element="Fallback">({option.hint})</span>}
|
|
52
|
+
<Icon name="approve-check" data-element="Checkmark" />
|
|
53
53
|
</a>
|
|
54
54
|
))
|
|
55
55
|
}
|
|
@@ -59,7 +59,16 @@ const id = `select-${crypto.randomUUID()}`;
|
|
|
59
59
|
<script>
|
|
60
60
|
import { initializePopoverMotion } from "../client/popover-motion.js";
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
const initialized = new WeakSet<HTMLElement>();
|
|
63
|
+
function initialize(): void {
|
|
64
|
+
document
|
|
65
|
+
.querySelectorAll<HTMLElement>("[data-select-popover-panel]")
|
|
66
|
+
.forEach((panel) => {
|
|
67
|
+
if (initialized.has(panel)) return;
|
|
68
|
+
initialized.add(panel);
|
|
69
|
+
initializePopoverMotion(panel);
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
initialize();
|
|
73
|
+
document.addEventListener("astro:page-load", initialize);
|
|
65
74
|
</script>
|
|
@@ -8,22 +8,22 @@ export const SidebarRoot = defineComponent("Sidebar", {
|
|
|
8
8
|
"data-element": "Sidebar",
|
|
9
9
|
styles: {
|
|
10
10
|
"$sidebar-transition": "120ms",
|
|
11
|
-
display: { "@
|
|
11
|
+
display: { "@md": "block" },
|
|
12
12
|
visibility: {
|
|
13
13
|
"": "visible",
|
|
14
|
-
"
|
|
15
|
-
"
|
|
14
|
+
"!@md": "hidden",
|
|
15
|
+
":is(:popover-open) & !@md": "visible",
|
|
16
16
|
},
|
|
17
17
|
position: "fixed",
|
|
18
|
-
zIndex: { "": "8", "
|
|
19
|
-
blockInset: { "": "$docs-nav-height start, 0 end", "
|
|
18
|
+
zIndex: { "": "8", "!@md": "12" },
|
|
19
|
+
blockInset: { "": "$docs-nav-height start, 0 end", "!@md": "0" },
|
|
20
20
|
inlineInset: {
|
|
21
21
|
"": "0 start, auto end",
|
|
22
|
-
"@
|
|
22
|
+
"@md": "max(0px, calc((100% - $layout-width) / 2)) start, auto end",
|
|
23
23
|
},
|
|
24
24
|
inlineSize: {
|
|
25
25
|
"": "$sidebar-width",
|
|
26
|
-
"
|
|
26
|
+
"!@md": "min(22rem, calc(100% - 2rem))",
|
|
27
27
|
},
|
|
28
28
|
blockSize: "auto",
|
|
29
29
|
margin: "0",
|
|
@@ -34,15 +34,15 @@ export const SidebarRoot = defineComponent("Sidebar", {
|
|
|
34
34
|
scrollbar: "auto stable",
|
|
35
35
|
fill: "#surface",
|
|
36
36
|
overscrollBehavior: "contain",
|
|
37
|
-
shadow: { "": "none", "
|
|
37
|
+
shadow: { "": "none", "!@md": "0.25rem 0 1rem #shadow" },
|
|
38
38
|
translate: {
|
|
39
39
|
"": "0",
|
|
40
|
-
"
|
|
41
|
-
"
|
|
40
|
+
"!@md": "-100% 0",
|
|
41
|
+
":is(:popover-open) & [data-open] & !@md": "0",
|
|
42
42
|
},
|
|
43
43
|
transition: {
|
|
44
44
|
"": "none",
|
|
45
|
-
"
|
|
45
|
+
"!@md & !@reduced-motion":
|
|
46
46
|
"translate $sidebar-transition ease-out, visibility $sidebar-transition, display $sidebar-transition allow-discrete, overlay $sidebar-transition allow-discrete",
|
|
47
47
|
},
|
|
48
48
|
Backdrop: {
|
|
@@ -51,18 +51,18 @@ export const SidebarRoot = defineComponent("Sidebar", {
|
|
|
51
51
|
opacity: "0",
|
|
52
52
|
transition: {
|
|
53
53
|
"": "none",
|
|
54
|
-
"
|
|
54
|
+
"!@md & !@reduced-motion":
|
|
55
55
|
"opacity $sidebar-transition ease-out, display $sidebar-transition allow-discrete, overlay $sidebar-transition allow-discrete",
|
|
56
56
|
},
|
|
57
57
|
},
|
|
58
58
|
OpenBackdrop: {
|
|
59
59
|
$: "&::backdrop",
|
|
60
|
-
opacity: { "": null, "
|
|
60
|
+
opacity: { "": null, ":is(:popover-open) & [data-open]": "1" },
|
|
61
61
|
},
|
|
62
62
|
MobileHeading: {
|
|
63
|
-
$: "
|
|
63
|
+
$: "MobileHeading",
|
|
64
64
|
display: "flex",
|
|
65
|
-
hide: { "": true, "
|
|
65
|
+
hide: { "": true, "!@md": false },
|
|
66
66
|
alignItems: "center",
|
|
67
67
|
justifyContent: "space-between",
|
|
68
68
|
gap: "$gap",
|
|
@@ -88,7 +88,7 @@ export const SidebarRoot = defineComponent("Sidebar", {
|
|
|
88
88
|
whiteSpace: "nowrap",
|
|
89
89
|
},
|
|
90
90
|
Close: {
|
|
91
|
-
$: "
|
|
91
|
+
$: "MobileHeading > button",
|
|
92
92
|
display: "grid",
|
|
93
93
|
placeItems: "center",
|
|
94
94
|
flexShrink: "0",
|
|
@@ -101,18 +101,18 @@ export const SidebarRoot = defineComponent("Sidebar", {
|
|
|
101
101
|
radius: "$header-control-radius",
|
|
102
102
|
},
|
|
103
103
|
HoverClose: {
|
|
104
|
-
$: "
|
|
104
|
+
$: "MobileHeading > button",
|
|
105
105
|
color: {
|
|
106
106
|
"": null,
|
|
107
|
-
"@own(:
|
|
107
|
+
"@own(:hover)": "#text",
|
|
108
108
|
},
|
|
109
109
|
fill: {
|
|
110
110
|
"": null,
|
|
111
|
-
"@own(:
|
|
111
|
+
"@own(:hover)": "#surface-2-hover",
|
|
112
112
|
},
|
|
113
113
|
},
|
|
114
114
|
CloseIcon: {
|
|
115
|
-
$: "
|
|
115
|
+
$: "MobileHeading > button > svg",
|
|
116
116
|
inlineSize: "1.25rem",
|
|
117
117
|
blockSize: "1.25rem",
|
|
118
118
|
},
|
|
@@ -132,7 +132,7 @@ export const SidebarRoot = defineComponent("Sidebar", {
|
|
|
132
132
|
},
|
|
133
133
|
},
|
|
134
134
|
Content: {
|
|
135
|
-
$: "
|
|
135
|
+
$: "Content",
|
|
136
136
|
display: "flex",
|
|
137
137
|
flow: "column",
|
|
138
138
|
blockSize: "min 100%",
|
|
@@ -140,7 +140,7 @@ export const SidebarRoot = defineComponent("Sidebar", {
|
|
|
140
140
|
gap: "($gap * 2)",
|
|
141
141
|
blockPadding: {
|
|
142
142
|
"": "($gap * 3) start, ($gap * 6) end",
|
|
143
|
-
"
|
|
143
|
+
"!@md": "($gap * 2) start, ($gap * 6) end",
|
|
144
144
|
},
|
|
145
145
|
},
|
|
146
146
|
Tree: { $: "cookbook-sidebar", display: "block" },
|
|
@@ -154,13 +154,18 @@ export const SidebarRoot = defineComponent("Sidebar", {
|
|
|
154
154
|
listStyle: "none",
|
|
155
155
|
},
|
|
156
156
|
Item: { $: "cookbook-sidebar li", overflowWrap: "anywhere" },
|
|
157
|
-
TopLevelSpacing: {
|
|
157
|
+
TopLevelSpacing: {
|
|
158
|
+
$: "ul > li + li",
|
|
159
|
+
blockMargin: {
|
|
160
|
+
"": null,
|
|
161
|
+
"@own(top-level)": "0 start",
|
|
162
|
+
},
|
|
163
|
+
},
|
|
158
164
|
GroupSpacing: {
|
|
159
|
-
$: "
|
|
165
|
+
$: "ul > li + li",
|
|
160
166
|
blockMargin: {
|
|
161
167
|
"": null,
|
|
162
|
-
"@own(
|
|
163
|
-
"($gap * 2.5) start",
|
|
168
|
+
"@own(top-level & section)": "($gap * 2.5) start",
|
|
164
169
|
},
|
|
165
170
|
},
|
|
166
171
|
NestedItem: {
|
|
@@ -168,7 +173,7 @@ export const SidebarRoot = defineComponent("Sidebar", {
|
|
|
168
173
|
inlineMargin: "($gap * 1.5) start",
|
|
169
174
|
},
|
|
170
175
|
SectionHeading: {
|
|
171
|
-
$: "
|
|
176
|
+
$: "SectionHeading",
|
|
172
177
|
margin: "0 0 1bw",
|
|
173
178
|
padding: "($gap * 0.75) ($gap * 1.25)",
|
|
174
179
|
color: "#text",
|
|
@@ -194,7 +199,7 @@ export const SidebarRoot = defineComponent("Sidebar", {
|
|
|
194
199
|
userSelect: "none",
|
|
195
200
|
},
|
|
196
201
|
GroupLabel: {
|
|
197
|
-
$: "
|
|
202
|
+
$: "GroupLabel, [data-element=SectionHeading]",
|
|
198
203
|
display: "flex",
|
|
199
204
|
alignItems: "center",
|
|
200
205
|
inlineSize: "min 0",
|
|
@@ -202,22 +207,22 @@ export const SidebarRoot = defineComponent("Sidebar", {
|
|
|
202
207
|
gap: "0.25em",
|
|
203
208
|
},
|
|
204
209
|
GroupLabelText: {
|
|
205
|
-
$: "
|
|
210
|
+
$: "GroupLabel > span, SectionHeading > span",
|
|
206
211
|
inlineSize: {
|
|
207
212
|
"": null,
|
|
208
|
-
"@own(:
|
|
213
|
+
"@own(:first-child)": "min 0",
|
|
209
214
|
},
|
|
210
215
|
overflow: {
|
|
211
216
|
"": null,
|
|
212
|
-
"@own(:
|
|
217
|
+
"@own(:first-child)": "hidden",
|
|
213
218
|
},
|
|
214
219
|
textOverflow: {
|
|
215
220
|
"": null,
|
|
216
|
-
"@own(:
|
|
221
|
+
"@own(:first-child)": "ellipsis",
|
|
217
222
|
},
|
|
218
223
|
whiteSpace: {
|
|
219
224
|
"": null,
|
|
220
|
-
"@own(:
|
|
225
|
+
"@own(:first-child)": "nowrap",
|
|
221
226
|
},
|
|
222
227
|
},
|
|
223
228
|
Link: {
|
|
@@ -231,10 +236,10 @@ export const SidebarRoot = defineComponent("Sidebar", {
|
|
|
231
236
|
},
|
|
232
237
|
LinkLabel: {
|
|
233
238
|
$: "a > span",
|
|
234
|
-
inlineSize: { "": null, "@own(:
|
|
235
|
-
overflow: { "": null, "@own(:
|
|
236
|
-
textOverflow: { "": null, "@own(:
|
|
237
|
-
whiteSpace: { "": null, "@own(:
|
|
239
|
+
inlineSize: { "": null, "@own(:first-child)": "min 0" },
|
|
240
|
+
overflow: { "": null, "@own(:first-child)": "hidden" },
|
|
241
|
+
textOverflow: { "": null, "@own(:first-child)": "ellipsis" },
|
|
242
|
+
whiteSpace: { "": null, "@own(:first-child)": "nowrap" },
|
|
238
243
|
},
|
|
239
244
|
InteractiveControl: {
|
|
240
245
|
$: "cookbook-sidebar a, cookbook-sidebar summary",
|
|
@@ -253,7 +258,7 @@ export const SidebarRoot = defineComponent("Sidebar", {
|
|
|
253
258
|
hide: true,
|
|
254
259
|
},
|
|
255
260
|
Caret: {
|
|
256
|
-
$: "
|
|
261
|
+
$: "Caret",
|
|
257
262
|
flexShrink: "0",
|
|
258
263
|
inlineSize: "1rem",
|
|
259
264
|
blockSize: "1rem",
|
|
@@ -262,10 +267,10 @@ export const SidebarRoot = defineComponent("Sidebar", {
|
|
|
262
267
|
transform: { "": "none", ":dir(rtl)": "rotate(180deg)" },
|
|
263
268
|
},
|
|
264
269
|
ExpandedCaret: {
|
|
265
|
-
$: "details > summary >
|
|
270
|
+
$: "details > summary > [data-element=Caret], details > summary > a > [data-element=Caret]",
|
|
266
271
|
transform: {
|
|
267
272
|
"": null,
|
|
268
|
-
"@own(:is(details[open] > summary >
|
|
273
|
+
"@own(:is(details[open] > summary > *, details[open] > summary > a > *))":
|
|
269
274
|
"rotate(90deg)",
|
|
270
275
|
},
|
|
271
276
|
},
|
|
@@ -275,20 +280,18 @@ export const SidebarRoot = defineComponent("Sidebar", {
|
|
|
275
280
|
},
|
|
276
281
|
GroupLink: { $: "summary > a", justifyContent: "space-between" },
|
|
277
282
|
LinkedSectionHeading: {
|
|
278
|
-
$: "
|
|
283
|
+
$: "[data-element=SectionHeading]",
|
|
279
284
|
padding: { "": null, "@own(:has(> a))": "0" },
|
|
280
285
|
},
|
|
281
286
|
SectionLink: {
|
|
282
|
-
$: "
|
|
287
|
+
$: "SectionHeading > a",
|
|
283
288
|
color: {
|
|
284
289
|
"": null,
|
|
285
|
-
'@own(
|
|
286
|
-
"#text",
|
|
290
|
+
'@own(![aria-current="page"])': "#text",
|
|
287
291
|
},
|
|
288
292
|
preset: {
|
|
289
293
|
"": null,
|
|
290
|
-
'@own(
|
|
291
|
-
"small / strong",
|
|
294
|
+
'@own(![aria-current="page"])': "small / strong",
|
|
292
295
|
},
|
|
293
296
|
},
|
|
294
297
|
Badge: {
|
|
@@ -305,9 +308,15 @@ export const SidebarRoot = defineComponent("Sidebar", {
|
|
|
305
308
|
whiteSpace: "nowrap",
|
|
306
309
|
},
|
|
307
310
|
TopLevelLink: {
|
|
308
|
-
$: "a
|
|
309
|
-
color: {
|
|
310
|
-
|
|
311
|
+
$: "a",
|
|
312
|
+
color: {
|
|
313
|
+
"": null,
|
|
314
|
+
'@own(top-level & ![aria-current="page"])': "#sidebar-text",
|
|
315
|
+
},
|
|
316
|
+
preset: {
|
|
317
|
+
"": null,
|
|
318
|
+
'@own(top-level & ![aria-current="page"])': "navigation",
|
|
319
|
+
},
|
|
311
320
|
},
|
|
312
321
|
},
|
|
313
322
|
});
|