@tenphi/renderer 0.21.1 → 0.21.2
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/component-styles-DstqPFf3.js +21 -0
- package/dist/component-styles-DstqPFf3.js.map +1 -0
- package/dist/components/Banner.styles.js +19 -0
- package/dist/components/Button.styles.d.ts +9 -0
- package/dist/components/Button.styles.js +14 -0
- package/dist/components/Callout.astro +1 -1
- package/dist/components/Callout.styles.js +54 -0
- package/dist/components/Card.astro +4 -4
- package/dist/components/Card.styles.js +64 -0
- package/dist/components/CodeGroup.astro +9 -4
- package/dist/components/CodeGroup.styles.js +27 -0
- package/dist/components/Document.styles.js +230 -0
- package/dist/components/EditLink.astro +1 -1
- package/dist/components/Footer.styles.js +45 -0
- package/dist/components/Header.styles.js +96 -0
- package/dist/components/HeaderFrame.styles.js +20 -0
- package/dist/components/HeaderLinks.astro +2 -2
- package/dist/components/HeaderLinks.styles.js +149 -0
- package/dist/components/Hero.styles.js +129 -0
- package/dist/components/LanguageSelect.styles.js +169 -0
- package/dist/components/LastUpdated.astro +1 -1
- package/dist/components/Logo.astro +4 -8
- package/dist/components/Logo.styles.js +27 -0
- package/dist/components/MainContent.styles.js +38 -0
- package/dist/components/MainPane.styles.js +19 -0
- package/dist/components/MarkdownAlert.styles.js +61 -0
- package/dist/components/MarkdownCodeBlock.styles.js +131 -0
- package/dist/components/MarkdownContent.styles.js +231 -0
- package/dist/components/MarkdownHeading.styles.js +117 -0
- package/dist/components/MarkdownInlineCode.styles.js +19 -0
- package/dist/components/MarkdownTable.styles.js +58 -0
- package/dist/components/Mermaid.styles.js +50 -0
- package/dist/components/MermaidSource.styles.js +21 -0
- package/dist/components/MobileMenuFooter.styles.js +27 -0
- package/dist/components/MobileMenuToggle.styles.js +49 -0
- package/dist/components/MobileNavigationTabs.astro +1 -2
- package/dist/components/MobileNavigationTabs.styles.js +88 -0
- package/dist/components/MobileTableOfContents.styles.js +59 -0
- package/dist/components/PackageVersion.astro +1 -2
- package/dist/components/PackageVersion.styles.js +23 -0
- package/dist/components/PageActions.astro +2 -2
- package/dist/components/PageActions.styles.js +51 -0
- package/dist/components/PageFrame.styles.js +34 -0
- package/dist/components/Pagination.astro +3 -2
- package/dist/components/Pagination.styles.js +126 -0
- package/dist/components/Preview.astro +2 -6
- package/dist/components/Preview.styles.js +78 -0
- package/dist/components/Search.styles.js +132 -0
- package/dist/components/SearchButton.styles.js +68 -0
- package/dist/components/SearchResults.styles.js +200 -0
- package/dist/components/SelectPopover.astro +1 -0
- package/dist/components/Sidebar.styles.js +309 -0
- package/dist/components/SiteLogo.astro +1 -2
- package/dist/components/SiteLogo.styles.js +32 -0
- package/dist/components/SiteTitle.astro +1 -1
- package/dist/components/SkipLink.styles.js +24 -0
- package/dist/components/SocialIcons.styles.js +36 -0
- package/dist/components/Steps.astro +2 -2
- package/dist/components/Steps.styles.js +25 -0
- package/dist/components/SyntaxHighlight.styles.js +87 -0
- package/dist/components/Tab.astro +1 -1
- package/dist/components/Tab.styles.js +30 -0
- package/dist/components/TableOfContents.styles.js +62 -0
- package/dist/components/TableOfContentsLayout.styles.js +38 -0
- package/dist/components/Tabs.astro +1 -1
- package/dist/components/Tabs.styles.js +60 -0
- package/dist/components/ThemeSelect.styles.js +177 -0
- package/dist/components/TopNavigation.styles.js +52 -0
- package/dist/components/VersionSwitcher.astro +2 -2
- package/dist/components/VersionSwitcher.styles.js +45 -0
- package/dist/components/component-styles.test.ts +0 -10
- package/dist/components/component-styles.ts +0 -7
- package/dist/components/inherit-component-parts.d.ts +1 -0
- package/dist/components/inherit-component-parts.js +7 -0
- package/dist/components/select-popover-styles.js +34 -16
- package/dist/components/tasty-states.js +13 -1
- package/dist/define-component-BP4YwMak.js +28 -0
- package/dist/define-component-BP4YwMak.js.map +1 -0
- package/dist/define-component.d.ts +17 -0
- package/dist/define-component.d.ts.map +1 -0
- package/dist/define-component.js +2 -0
- package/dist/eslint-plugin.d.ts +5 -0
- package/dist/eslint-plugin.d.ts.map +1 -1
- package/dist/eslint-plugin.js +26 -3
- package/dist/eslint-plugin.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/dist/overrides/Footer.astro +6 -5
- package/dist/overrides/Header.astro +13 -17
- package/dist/overrides/Hero.astro +3 -2
- package/dist/overrides/LanguageSelect.astro +3 -3
- package/dist/overrides/MarkdownContent.astro +7 -1
- package/dist/overrides/MobileMenuFooter.astro +2 -5
- package/dist/overrides/MobileMenuToggle.astro +4 -3
- package/dist/overrides/MobileTableOfContents.astro +2 -2
- package/dist/overrides/PageFrame.astro +9 -11
- package/dist/overrides/Search.astro +13 -9
- package/dist/overrides/Sidebar.astro +4 -1
- package/dist/overrides/SocialIcons.astro +2 -2
- package/dist/overrides/ThemeSelect.astro +9 -3
- package/dist/routes/Page.astro +22 -11
- package/dist/styling.d.ts +5 -10
- package/dist/styling.d.ts.map +1 -1
- package/dist/styling.js +18 -11
- package/dist/styling.js.map +1 -1
- package/dist/tasty-states-_JhxFdK1.js +47 -0
- package/dist/tasty-states-_JhxFdK1.js.map +1 -0
- package/dist/theme/defaults.d.ts.map +1 -1
- package/dist/theme/defaults.js +22 -1
- package/dist/theme/defaults.js.map +1 -1
- package/dist/theme/tasty-config.d.ts +23 -1
- package/dist/theme/tasty-config.d.ts.map +1 -1
- package/dist/theme/tasty-config.js +23 -1
- package/dist/theme/tasty-config.js.map +1 -1
- package/package.json +4 -4
- package/dist/components/GlobalStyles.js +0 -1792
- package/dist/components/LayoutComponents.js +0 -872
- package/dist/components/TastyComponents.js +0 -269
- package/dist/components/customize-component.js +0 -8
- package/dist/tasty-states-rTLFy26t.js +0 -57
- package/dist/tasty-states-rTLFy26t.js.map +0 -1
|
@@ -1,1792 +0,0 @@
|
|
|
1
|
-
import { useFontFace, useGlobalStyles } from "@tenphi/tasty";
|
|
2
|
-
import jetBrainsMonoLatin from "@fontsource-variable/jetbrains-mono/files/jetbrains-mono-latin-wght-normal.woff2?url";
|
|
3
|
-
import onestLatin from "@fontsource-variable/onest/files/onest-latin-wght-normal.woff2?url";
|
|
4
|
-
import arrowLeftIcon from "../icons/arrow-left.svg?raw";
|
|
5
|
-
import arrowRightIcon from "../icons/arrow-right.svg?raw";
|
|
6
|
-
import checkIcon from "../icons/check.svg?raw";
|
|
7
|
-
import chevronRightIcon from "../icons/chevron-right.svg?raw";
|
|
8
|
-
import closeIcon from "../icons/close.svg?raw";
|
|
9
|
-
import copyIcon from "../icons/copy.svg?raw";
|
|
10
|
-
import searchIcon from "../icons/search.svg?raw";
|
|
11
|
-
import { resolveComponentStyles } from "./component-styles.js";
|
|
12
|
-
import { selectPopoverStyles } from "./select-popover-styles.js";
|
|
13
|
-
import { svgIconUrl } from "./svg-icon.js";
|
|
14
|
-
import { configureCookbookStates } from "./tasty-states.js";
|
|
15
|
-
import { getDefaultFontUsage, getFontFaces } from "../theme/fonts.js";
|
|
16
|
-
|
|
17
|
-
configureCookbookStates();
|
|
18
|
-
|
|
19
|
-
// Cookbook owns the document markup, Tasty owns every emitted style, and
|
|
20
|
-
// Glaze owns every color value. Components use tasty() wrappers;
|
|
21
|
-
// every global style object remains visible to the Tasty linter.
|
|
22
|
-
export default function GlobalStyles() {
|
|
23
|
-
const defaultFonts = getDefaultFontUsage();
|
|
24
|
-
if (defaultFonts.onest)
|
|
25
|
-
useFontFace("Onest Variable", {
|
|
26
|
-
src: `url("${onestLatin}") format("woff2-variations")`,
|
|
27
|
-
fontWeight: "100 900",
|
|
28
|
-
fontDisplay: defaultFonts.display ?? "swap",
|
|
29
|
-
});
|
|
30
|
-
if (defaultFonts.mono)
|
|
31
|
-
useFontFace("JetBrains Mono Variable", {
|
|
32
|
-
src: `url("${jetBrainsMonoLatin}") format("woff2-variations")`,
|
|
33
|
-
fontWeight: "100 800",
|
|
34
|
-
fontDisplay: defaultFonts.display ?? "swap",
|
|
35
|
-
});
|
|
36
|
-
for (const face of getFontFaces()) useFontFace(face.family, face.descriptors);
|
|
37
|
-
|
|
38
|
-
useGlobalStyles(
|
|
39
|
-
":root",
|
|
40
|
-
resolveComponentStyles("Layout", {
|
|
41
|
-
colorScheme: "dark",
|
|
42
|
-
"$docs-nav-height": {
|
|
43
|
-
"": "4.5rem",
|
|
44
|
-
":has(.td-top-tabs)": "7.25rem",
|
|
45
|
-
"@mobile": "3.5rem",
|
|
46
|
-
"@mobile & [data-has-sidebar]": "6.5rem",
|
|
47
|
-
},
|
|
48
|
-
"$docs-nav-pad-x": {
|
|
49
|
-
"": "clamp(1.25rem, 2.5vw, 2rem)",
|
|
50
|
-
"@mobile": "1rem",
|
|
51
|
-
},
|
|
52
|
-
"$docs-nav-gap": { "": "0.75rem", "@mobile": "0.5rem" },
|
|
53
|
-
"$docs-sidebar-pad-x": "1.5rem",
|
|
54
|
-
"$docs-content-pad-x": {
|
|
55
|
-
"": "clamp(1.5rem, 4vw, 4rem)",
|
|
56
|
-
"@mobile": "1rem",
|
|
57
|
-
},
|
|
58
|
-
"$docs-menu-button-size": { "": "2.5rem", "@mobile": "2.25rem" },
|
|
59
|
-
"$docs-mobile-toc-height": "0rem",
|
|
60
|
-
Islands: {
|
|
61
|
-
$: "astro-island, astro-slot, astro-static-slot",
|
|
62
|
-
display: "contents",
|
|
63
|
-
},
|
|
64
|
-
LockedPage: {
|
|
65
|
-
$: "&:has(#cookbook__sidebar:popover-open)",
|
|
66
|
-
overflow: { "@mobile": "hidden" },
|
|
67
|
-
},
|
|
68
|
-
Light: { $: '&[data-theme="light"]', colorScheme: "light" },
|
|
69
|
-
Auto: {
|
|
70
|
-
$: "&:not([data-theme])",
|
|
71
|
-
colorScheme: {
|
|
72
|
-
"@media(prefers-color-scheme: light)": "light",
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
|
-
}),
|
|
76
|
-
);
|
|
77
|
-
|
|
78
|
-
useGlobalStyles(
|
|
79
|
-
":where(html)",
|
|
80
|
-
resolveComponentStyles("Document", {
|
|
81
|
-
minBlockSize: "100%",
|
|
82
|
-
scrollPaddingBlockStart:
|
|
83
|
-
"(1.5rem + $docs-nav-height + $docs-mobile-toc-height)",
|
|
84
|
-
All: {
|
|
85
|
-
$: "&:where(*), &::before, &::after, *, *::before, *::after",
|
|
86
|
-
boxSizing: "border-box",
|
|
87
|
-
scrollBehavior: {
|
|
88
|
-
"@reduced-motion": "auto",
|
|
89
|
-
},
|
|
90
|
-
transitionDuration: {
|
|
91
|
-
"@reduced-motion": "0.01ms",
|
|
92
|
-
},
|
|
93
|
-
},
|
|
94
|
-
Body: {
|
|
95
|
-
$: "body",
|
|
96
|
-
minInlineSize: "0",
|
|
97
|
-
minBlockSize: "100%",
|
|
98
|
-
margin: "0",
|
|
99
|
-
color: "#text",
|
|
100
|
-
fill: "#surface",
|
|
101
|
-
preset: "body",
|
|
102
|
-
},
|
|
103
|
-
Control: {
|
|
104
|
-
$: ":where(button), :where(input), :where(select), :where(textarea)",
|
|
105
|
-
preset: "body",
|
|
106
|
-
minBlockSize: "$control-height",
|
|
107
|
-
radius: "$radius",
|
|
108
|
-
boxShadow: "none",
|
|
109
|
-
},
|
|
110
|
-
Pointer: {
|
|
111
|
-
$: ":where(button), :where(summary), :where(select)",
|
|
112
|
-
cursor: "pointer",
|
|
113
|
-
},
|
|
114
|
-
ResponsiveWidth: {
|
|
115
|
-
$: "img:not([width]), :where(picture), video:not([width]), canvas:not([width]), svg:not([width]), iframe:not([width])",
|
|
116
|
-
maxInlineSize: "100%",
|
|
117
|
-
},
|
|
118
|
-
ResponsiveHeight: {
|
|
119
|
-
$: "img:not([height]), :where(picture), video:not([height]), canvas:not([height]), svg:not([height])",
|
|
120
|
-
blockSize: "auto",
|
|
121
|
-
},
|
|
122
|
-
Hidden: { $: ":where([hidden]), :where(.cookbook-hidden)", hide: true },
|
|
123
|
-
PrintHidden: {
|
|
124
|
-
$: ".cookbook-print-hidden",
|
|
125
|
-
display: { "@media:print": "none" },
|
|
126
|
-
},
|
|
127
|
-
DesktopBlock: {
|
|
128
|
-
$: '[class~="md:cookbook-block"]',
|
|
129
|
-
display: { "": "block", "@mobile": "none" },
|
|
130
|
-
},
|
|
131
|
-
DesktopFlex: {
|
|
132
|
-
$: '[class~="md:cookbook-flex"]',
|
|
133
|
-
display: { "": "flex", "@mobile": "none" },
|
|
134
|
-
},
|
|
135
|
-
ScreenReaderOnly: {
|
|
136
|
-
$: ".sr-only",
|
|
137
|
-
position: "absolute",
|
|
138
|
-
inlineSize: "1px",
|
|
139
|
-
blockSize: "1px",
|
|
140
|
-
padding: "0",
|
|
141
|
-
margin: "-1px",
|
|
142
|
-
overflow: "hidden",
|
|
143
|
-
clip: "rect(0, 0, 0, 0)",
|
|
144
|
-
whiteSpace: "nowrap",
|
|
145
|
-
border: "0",
|
|
146
|
-
},
|
|
147
|
-
Strong: { $: ":where(strong), :where(b)", preset: "strong" },
|
|
148
|
-
Link: { $: "a", color: "#accent-text" },
|
|
149
|
-
NarrowBlock: {
|
|
150
|
-
$: '[class~="lg:cookbook-hidden"]',
|
|
151
|
-
display: { "": "none", "@narrow-layout": "block" },
|
|
152
|
-
},
|
|
153
|
-
MobileBlock: {
|
|
154
|
-
$: '[class~="md:cookbook-hidden"]',
|
|
155
|
-
display: { "": "none", "@mobile": "block" },
|
|
156
|
-
},
|
|
157
|
-
Code: {
|
|
158
|
-
$: ":where(code), :where(kbd), :where(samp), :where(pre)",
|
|
159
|
-
preset: "code",
|
|
160
|
-
},
|
|
161
|
-
FocusRing: {
|
|
162
|
-
$: ":where(a):focus-visible, :where(button):focus-visible, :where(input):focus-visible, :where(select):focus-visible, :where(textarea):focus-visible, :where(summary):focus-visible",
|
|
163
|
-
outline: "$outline-width solid #focus",
|
|
164
|
-
outlineOffset: "$outline-offset",
|
|
165
|
-
},
|
|
166
|
-
CurrentLink: { $: 'a[aria-current="page"]', radius: "$radius" },
|
|
167
|
-
SearchOpen: { $: "body[data-search-modal-open]", overflow: "hidden" },
|
|
168
|
-
}),
|
|
169
|
-
);
|
|
170
|
-
|
|
171
|
-
useGlobalStyles(
|
|
172
|
-
"body > .page > .header",
|
|
173
|
-
resolveComponentStyles("HeaderFrame", {
|
|
174
|
-
position: "fixed",
|
|
175
|
-
zIndex: "10",
|
|
176
|
-
inset: "0 0 auto",
|
|
177
|
-
inlineSize: "100%",
|
|
178
|
-
blockSize: "$docs-nav-height",
|
|
179
|
-
padding: "0 $docs-nav-pad-x",
|
|
180
|
-
borderBlockEnd: "$border-width solid #border",
|
|
181
|
-
fill: "#header",
|
|
182
|
-
backdropFilter: "blur(16px)",
|
|
183
|
-
}),
|
|
184
|
-
);
|
|
185
|
-
|
|
186
|
-
useGlobalStyles(
|
|
187
|
-
".main-pane",
|
|
188
|
-
resolveComponentStyles("MainPane", {
|
|
189
|
-
isolation: "isolate",
|
|
190
|
-
inlineSize: "100%",
|
|
191
|
-
minInlineSize: "0",
|
|
192
|
-
WithSidebars: {
|
|
193
|
-
$: "&:is([data-has-sidebar][data-has-toc] .main-pane)",
|
|
194
|
-
order: "1",
|
|
195
|
-
inlineSize: {
|
|
196
|
-
"": "min(calc(100% - $sidebar-width), calc($content-width + (100% - $content-width - $sidebar-width) / 2))",
|
|
197
|
-
"@narrow-layout": "100%",
|
|
198
|
-
},
|
|
199
|
-
},
|
|
200
|
-
}),
|
|
201
|
-
);
|
|
202
|
-
|
|
203
|
-
useGlobalStyles(
|
|
204
|
-
".right-sidebar-container",
|
|
205
|
-
resolveComponentStyles("TableOfContentsLayout", {
|
|
206
|
-
hide: { "": false, "@narrow-layout": true },
|
|
207
|
-
order: { "": "2", "@narrow-layout": "0" },
|
|
208
|
-
WithMobile: { $: "&:has(cookbook-mobile-toc)", display: "block" },
|
|
209
|
-
position: "relative",
|
|
210
|
-
inlineSize: {
|
|
211
|
-
"": "max($sidebar-width, calc($sidebar-width + (100% - $content-width - $sidebar-width) / 2))",
|
|
212
|
-
"@narrow-layout": "100%",
|
|
213
|
-
},
|
|
214
|
-
Content: {
|
|
215
|
-
$: ".right-sidebar",
|
|
216
|
-
position: { "": "sticky", "@narrow-layout": "static" },
|
|
217
|
-
insetBlockStart: "$docs-nav-height",
|
|
218
|
-
inlineSize: "100%",
|
|
219
|
-
blockSize: {
|
|
220
|
-
"": "(100vh - $docs-nav-height)",
|
|
221
|
-
"@narrow-layout": "auto",
|
|
222
|
-
},
|
|
223
|
-
overflowY: { "": "auto", "@narrow-layout": "visible" },
|
|
224
|
-
scrollbarWidth: "none",
|
|
225
|
-
},
|
|
226
|
-
}),
|
|
227
|
-
);
|
|
228
|
-
|
|
229
|
-
useGlobalStyles(
|
|
230
|
-
"main",
|
|
231
|
-
resolveComponentStyles("MainContent", {
|
|
232
|
-
padding: "0 0 5rem",
|
|
233
|
-
ContentSpacing: {
|
|
234
|
-
$: ".content-panel > .cookbook-container > * + *",
|
|
235
|
-
marginBlockStart: "($gap * 3)",
|
|
236
|
-
},
|
|
237
|
-
Container: {
|
|
238
|
-
$: ".content-panel > .cookbook-container",
|
|
239
|
-
marginInlineStart: { "": "auto", "@narrow-layout": "0" },
|
|
240
|
-
marginInlineEnd: { "": "auto", "@narrow-layout": "0" },
|
|
241
|
-
maxInlineSize: "$content-width",
|
|
242
|
-
},
|
|
243
|
-
Panel: { $: ".content-panel", padding: "($gap * 3) $docs-content-pad-x" },
|
|
244
|
-
FirstPanel: {
|
|
245
|
-
$: "> .content-panel:first-of-type",
|
|
246
|
-
paddingBlockStart: "($gap * 3)",
|
|
247
|
-
paddingBlockEnd: "($gap * 2)",
|
|
248
|
-
},
|
|
249
|
-
BodyPanel: {
|
|
250
|
-
$: "> .content-panel:nth-of-type(2)",
|
|
251
|
-
paddingBlockStart: "($gap * 2)",
|
|
252
|
-
},
|
|
253
|
-
}),
|
|
254
|
-
);
|
|
255
|
-
|
|
256
|
-
useGlobalStyles(
|
|
257
|
-
".cookbook-banner",
|
|
258
|
-
resolveComponentStyles("Banner", {
|
|
259
|
-
padding: "($gap * 1.5) $docs-nav-pad-x",
|
|
260
|
-
color: "#accent-surface-text",
|
|
261
|
-
fill: "#accent-surface",
|
|
262
|
-
preset: "body / strong",
|
|
263
|
-
textAlign: "center",
|
|
264
|
-
textWrap: "balance",
|
|
265
|
-
boxShadow: "none",
|
|
266
|
-
Link: { $: "a", color: "#accent-surface-text" },
|
|
267
|
-
}),
|
|
268
|
-
);
|
|
269
|
-
|
|
270
|
-
useGlobalStyles(
|
|
271
|
-
".cookbook-skip-link",
|
|
272
|
-
resolveComponentStyles("SkipLink", {
|
|
273
|
-
position: "fixed",
|
|
274
|
-
inset: "($gap * 1.5) auto auto ($gap * 1.5)",
|
|
275
|
-
inlineSize: "1px",
|
|
276
|
-
blockSize: "1px",
|
|
277
|
-
padding: "0",
|
|
278
|
-
overflow: "hidden",
|
|
279
|
-
clip: "rect(0, 0, 0, 0)",
|
|
280
|
-
Focus: {
|
|
281
|
-
$: "&:focus",
|
|
282
|
-
zIndex: "20",
|
|
283
|
-
inlineSize: "auto",
|
|
284
|
-
blockSize: "auto",
|
|
285
|
-
padding: "$gap ($gap * 2)",
|
|
286
|
-
overflow: "visible",
|
|
287
|
-
color: "#accent-surface-text",
|
|
288
|
-
fill: "#accent-surface",
|
|
289
|
-
clip: "auto",
|
|
290
|
-
radius: "$radius",
|
|
291
|
-
shadow: "0 1rem 3rem #shadow",
|
|
292
|
-
textDecoration: "none",
|
|
293
|
-
},
|
|
294
|
-
}),
|
|
295
|
-
);
|
|
296
|
-
|
|
297
|
-
useGlobalStyles(
|
|
298
|
-
":where(h1, h2, h3, h4, h5, h6, .site-title)",
|
|
299
|
-
resolveComponentStyles("Heading", {
|
|
300
|
-
color: "#heading",
|
|
301
|
-
preset: "heading",
|
|
302
|
-
textWrap: "balance",
|
|
303
|
-
Level1: { $: "&:is(h1)", preset: "h1" },
|
|
304
|
-
Level2: { $: "&:is(h2)", preset: "h2" },
|
|
305
|
-
Level3: { $: "&:is(h3)", preset: "h3" },
|
|
306
|
-
Level4: { $: "&:is(h4)", preset: "h4" },
|
|
307
|
-
Level5: { $: "&:is(h5)", preset: "h5" },
|
|
308
|
-
Level6: { $: "&:is(h6)", preset: "h6" },
|
|
309
|
-
PageTitle: { $: '&[id="_top"]', marginBlockStart: "($gap * 2)" },
|
|
310
|
-
}),
|
|
311
|
-
);
|
|
312
|
-
|
|
313
|
-
useGlobalStyles(
|
|
314
|
-
"site-search",
|
|
315
|
-
resolveComponentStyles("Search", {
|
|
316
|
-
display: "contents",
|
|
317
|
-
"$dialog-transition": "120ms",
|
|
318
|
-
Status: {
|
|
319
|
-
$: "[data-search-status]",
|
|
320
|
-
margin: "auto",
|
|
321
|
-
textAlign: "center",
|
|
322
|
-
whiteSpace: "pre-line",
|
|
323
|
-
preset: "body",
|
|
324
|
-
},
|
|
325
|
-
Dialog: {
|
|
326
|
-
$: "dialog",
|
|
327
|
-
radius: { "": "$card-radius", "@mobile": "0" },
|
|
328
|
-
inlineSize: { "": "0 90% 40rem", "@mobile": "100%" },
|
|
329
|
-
blockSize: { "": "max-content", "@mobile": "100%" },
|
|
330
|
-
maxBlockSize: { "": "(100% - 8rem)", "@mobile": "100%" },
|
|
331
|
-
minBlockSize: { "": "15rem", "@mobile": "100%" },
|
|
332
|
-
margin: { "": "4rem auto auto", "@mobile": "0" },
|
|
333
|
-
padding: "0",
|
|
334
|
-
color: "#text",
|
|
335
|
-
border: true,
|
|
336
|
-
fill: "#surface",
|
|
337
|
-
shadow: "0 1rem 3rem #shadow",
|
|
338
|
-
opacity: "0",
|
|
339
|
-
scale: { "": "0.98", "@mobile": "1" },
|
|
340
|
-
transition: {
|
|
341
|
-
"": "none",
|
|
342
|
-
"!@reduced-motion":
|
|
343
|
-
"opacity $dialog-transition ease-out, scale $dialog-transition ease-out, display $dialog-transition allow-discrete, overlay $dialog-transition allow-discrete",
|
|
344
|
-
},
|
|
345
|
-
},
|
|
346
|
-
CloseIcon: {
|
|
347
|
-
$: "button[data-close-modal]::before",
|
|
348
|
-
content: '""',
|
|
349
|
-
display: "block",
|
|
350
|
-
flexGrow: "0",
|
|
351
|
-
flexShrink: "0",
|
|
352
|
-
flexBasis: "auto",
|
|
353
|
-
inlineSize: "1rem",
|
|
354
|
-
blockSize: "1rem",
|
|
355
|
-
fill: "#current",
|
|
356
|
-
mask: `url("${svgIconUrl(closeIcon)}") center / contain no-repeat`,
|
|
357
|
-
},
|
|
358
|
-
OpenDialog: { $: "dialog[open]", display: "flex" },
|
|
359
|
-
EnteredDialog: {
|
|
360
|
-
$: "dialog[open][data-open]",
|
|
361
|
-
opacity: "1",
|
|
362
|
-
scale: "1",
|
|
363
|
-
},
|
|
364
|
-
Backdrop: {
|
|
365
|
-
$: "dialog::backdrop",
|
|
366
|
-
fill: { "": "#overlay", "@mobile": "#clear" },
|
|
367
|
-
backdropFilter: { "": "blur(0.25rem)", "@mobile": "none" },
|
|
368
|
-
opacity: "0",
|
|
369
|
-
transition: {
|
|
370
|
-
"": "none",
|
|
371
|
-
"!@reduced-motion & !@mobile":
|
|
372
|
-
"opacity $dialog-transition ease-out, display $dialog-transition allow-discrete, overlay $dialog-transition allow-discrete",
|
|
373
|
-
},
|
|
374
|
-
},
|
|
375
|
-
EnteredBackdrop: {
|
|
376
|
-
$: "dialog[open][data-open]::backdrop",
|
|
377
|
-
opacity: { "": "1", "@mobile": "0" },
|
|
378
|
-
},
|
|
379
|
-
Frame: {
|
|
380
|
-
$: ".dialog-frame",
|
|
381
|
-
display: "flex",
|
|
382
|
-
flow: "column",
|
|
383
|
-
flexGrow: "1",
|
|
384
|
-
minBlockSize: "0",
|
|
385
|
-
gap: "($gap * 2)",
|
|
386
|
-
padding: { "": "($gap * 3)", "@mobile": "($gap * 2) ($gap * 2) 0" },
|
|
387
|
-
overflow: "hidden",
|
|
388
|
-
},
|
|
389
|
-
Container: {
|
|
390
|
-
$: ".search-container",
|
|
391
|
-
display: "flex",
|
|
392
|
-
flow: "column",
|
|
393
|
-
flexGrow: "1",
|
|
394
|
-
inlineSize: "100%",
|
|
395
|
-
minBlockSize: "0",
|
|
396
|
-
},
|
|
397
|
-
Close: {
|
|
398
|
-
$: "button[data-close-modal]",
|
|
399
|
-
display: { "": "none", "@mobile": "grid" },
|
|
400
|
-
placeItems: "center",
|
|
401
|
-
alignSelf: "flex-end",
|
|
402
|
-
flexShrink: "0",
|
|
403
|
-
inlineSize: "$docs-menu-button-size",
|
|
404
|
-
blockSize: "$docs-menu-button-size",
|
|
405
|
-
minBlockSize: "$docs-menu-button-size",
|
|
406
|
-
padding: "0",
|
|
407
|
-
color: "#text-soft",
|
|
408
|
-
border: "0",
|
|
409
|
-
radius: "$header-control-radius",
|
|
410
|
-
fill: "#clear",
|
|
411
|
-
boxShadow: "none",
|
|
412
|
-
cursor: "pointer",
|
|
413
|
-
transition: "color $transition, background-color $transition",
|
|
414
|
-
},
|
|
415
|
-
HoverClose: {
|
|
416
|
-
$: "button[data-close-modal]:hover",
|
|
417
|
-
color: "#text",
|
|
418
|
-
fill: "#surface-2-hover",
|
|
419
|
-
},
|
|
420
|
-
ActiveClose: {
|
|
421
|
-
$: "button[data-close-modal]:active",
|
|
422
|
-
color: "#text",
|
|
423
|
-
fill: "#surface-2-pressed",
|
|
424
|
-
},
|
|
425
|
-
}),
|
|
426
|
-
);
|
|
427
|
-
|
|
428
|
-
useGlobalStyles(
|
|
429
|
-
".pagination-links",
|
|
430
|
-
resolveComponentStyles("Pagination", {
|
|
431
|
-
display: { "": "grid", "@media:print": "none" },
|
|
432
|
-
gap: "($gap * 2)",
|
|
433
|
-
gridTemplateColumns: {
|
|
434
|
-
"": "repeat(2, minmax(0, 1fr))",
|
|
435
|
-
"@small": "1fr",
|
|
436
|
-
},
|
|
437
|
-
Link: {
|
|
438
|
-
$: "a",
|
|
439
|
-
radius: "$radius",
|
|
440
|
-
display: "flex",
|
|
441
|
-
alignItems: "center",
|
|
442
|
-
justifyContent: "flex-start",
|
|
443
|
-
gap: "$gap",
|
|
444
|
-
inlineSize: "100%",
|
|
445
|
-
padding: "($gap * 2)",
|
|
446
|
-
border: "$border-width solid #border",
|
|
447
|
-
color: "#text-soft",
|
|
448
|
-
fill: "#surface-2",
|
|
449
|
-
boxShadow: "none",
|
|
450
|
-
transition: "color $transition, background-color $transition",
|
|
451
|
-
textDecoration: "none",
|
|
452
|
-
overflowWrap: "anywhere",
|
|
453
|
-
},
|
|
454
|
-
PreviousLink: {
|
|
455
|
-
$: 'a[rel="prev"]',
|
|
456
|
-
gridColumn: { "": "1", "@small": "auto" },
|
|
457
|
-
gridRow: { "": "1", "@small": "auto" },
|
|
458
|
-
},
|
|
459
|
-
NextLink: {
|
|
460
|
-
$: 'a[rel="next"]',
|
|
461
|
-
justifyContent: "flex-start",
|
|
462
|
-
textAlign: "end",
|
|
463
|
-
gridColumn: { "": "2", "@small": "auto" },
|
|
464
|
-
gridRow: { "": "1", "@small": "auto" },
|
|
465
|
-
},
|
|
466
|
-
NextIcon: {
|
|
467
|
-
$: 'a[rel="next"]::before',
|
|
468
|
-
order: "1",
|
|
469
|
-
mask: `url("${svgIconUrl(arrowRightIcon)}") center / contain no-repeat`,
|
|
470
|
-
},
|
|
471
|
-
NextLabel: {
|
|
472
|
-
$: 'a[rel="next"] > span',
|
|
473
|
-
marginInlineStart: "auto",
|
|
474
|
-
textAlign: "end",
|
|
475
|
-
},
|
|
476
|
-
HoverLink: {
|
|
477
|
-
$: "a:hover",
|
|
478
|
-
borderColor: "#border",
|
|
479
|
-
fill: "#surface-2-hover",
|
|
480
|
-
},
|
|
481
|
-
ActiveLink: { $: "a:active", fill: "#surface-2-pressed" },
|
|
482
|
-
Title: { $: ".link-title", color: "#heading", preset: "h5" },
|
|
483
|
-
LoneNextLink: {
|
|
484
|
-
$: 'a[rel="next"]:only-child',
|
|
485
|
-
},
|
|
486
|
-
Icon: {
|
|
487
|
-
$: "a::before",
|
|
488
|
-
content: '""',
|
|
489
|
-
display: "block",
|
|
490
|
-
flexGrow: "0",
|
|
491
|
-
flexShrink: "0",
|
|
492
|
-
flexBasis: "auto",
|
|
493
|
-
inlineSize: "1.25rem",
|
|
494
|
-
blockSize: "1.25rem",
|
|
495
|
-
fill: "#current",
|
|
496
|
-
mask: `url("${svgIconUrl(arrowLeftIcon)}") center / contain no-repeat`,
|
|
497
|
-
},
|
|
498
|
-
PreviousIconRtl: {
|
|
499
|
-
$: '&:is([dir="rtl"] *) a[rel="prev"]::before',
|
|
500
|
-
mask: `url("${svgIconUrl(arrowRightIcon)}") center / contain no-repeat`,
|
|
501
|
-
},
|
|
502
|
-
NextIconRtl: {
|
|
503
|
-
$: '&:is([dir="rtl"] *) a[rel="next"]::before',
|
|
504
|
-
mask: `url("${svgIconUrl(arrowLeftIcon)}") center / contain no-repeat`,
|
|
505
|
-
},
|
|
506
|
-
}),
|
|
507
|
-
);
|
|
508
|
-
|
|
509
|
-
useGlobalStyles(
|
|
510
|
-
"#cookbook__sidebar",
|
|
511
|
-
resolveComponentStyles("Sidebar", {
|
|
512
|
-
display: { "@desktop": "block" },
|
|
513
|
-
visibility: { "": "visible", "@mobile": "hidden" },
|
|
514
|
-
position: "fixed",
|
|
515
|
-
zIndex: { "": "8", "@mobile": "12" },
|
|
516
|
-
blockInset: { "": "$docs-nav-height start, 0 end", "@mobile": "0" },
|
|
517
|
-
inlineInset: {
|
|
518
|
-
"": "0 start, auto end",
|
|
519
|
-
"@desktop":
|
|
520
|
-
"max(0px, calc((100% - $layout-width) / 2)) start, auto end",
|
|
521
|
-
},
|
|
522
|
-
inlineSize: {
|
|
523
|
-
"": "$sidebar-width",
|
|
524
|
-
"@mobile": "min(22rem, calc(100% - 2rem))",
|
|
525
|
-
},
|
|
526
|
-
blockSize: "auto",
|
|
527
|
-
margin: "0",
|
|
528
|
-
padding: "0",
|
|
529
|
-
border: "0",
|
|
530
|
-
color: "#text",
|
|
531
|
-
overflowY: "auto",
|
|
532
|
-
scrollbarGutter: "stable",
|
|
533
|
-
fill: "#surface",
|
|
534
|
-
overscrollBehavior: "contain",
|
|
535
|
-
shadow: { "": "none", "@mobile": "0.25rem 0 1rem #shadow" },
|
|
536
|
-
translate: { "": "0", "@mobile": "-100% 0" },
|
|
537
|
-
transition: {
|
|
538
|
-
"": "none",
|
|
539
|
-
"@mobile & !@reduced-motion":
|
|
540
|
-
"translate 120ms ease-out, visibility 120ms, display 120ms allow-discrete, overlay 120ms allow-discrete",
|
|
541
|
-
},
|
|
542
|
-
Backdrop: {
|
|
543
|
-
$: "&::backdrop",
|
|
544
|
-
fill: "#overlay",
|
|
545
|
-
opacity: "0",
|
|
546
|
-
transition: {
|
|
547
|
-
"": "none",
|
|
548
|
-
"@mobile & !@reduced-motion":
|
|
549
|
-
"opacity 120ms ease-out, display 120ms allow-discrete, overlay 120ms allow-discrete",
|
|
550
|
-
},
|
|
551
|
-
},
|
|
552
|
-
OpenBackdrop: { $: "&:popover-open[data-open]::backdrop", opacity: "1" },
|
|
553
|
-
MobileHeading: {
|
|
554
|
-
$: ".td-sidebar-heading",
|
|
555
|
-
display: "flex",
|
|
556
|
-
hide: { "": true, "@mobile": false },
|
|
557
|
-
alignItems: "center",
|
|
558
|
-
justifyContent: "space-between",
|
|
559
|
-
gap: "$gap",
|
|
560
|
-
},
|
|
561
|
-
HomeLink: {
|
|
562
|
-
$: ".td-sidebar-heading__home",
|
|
563
|
-
display: "flex",
|
|
564
|
-
alignItems: "center",
|
|
565
|
-
textDecoration: "none",
|
|
566
|
-
inlineSize: "min 0",
|
|
567
|
-
padding: "0",
|
|
568
|
-
gap: "$gap",
|
|
569
|
-
color: "#text",
|
|
570
|
-
preset: "h4",
|
|
571
|
-
},
|
|
572
|
-
HomeLogo: {
|
|
573
|
-
$: '.td-sidebar-heading__home > [data-tasty-anatomy="Logo"]',
|
|
574
|
-
inlineSize: "2rem",
|
|
575
|
-
blockSize: "2rem",
|
|
576
|
-
},
|
|
577
|
-
HomeLabel: {
|
|
578
|
-
$: ".td-sidebar-heading__home > [data-site-title]",
|
|
579
|
-
overflow: "hidden",
|
|
580
|
-
textOverflow: "ellipsis",
|
|
581
|
-
whiteSpace: "nowrap",
|
|
582
|
-
},
|
|
583
|
-
Close: {
|
|
584
|
-
$: ".td-sidebar-heading > button",
|
|
585
|
-
display: "grid",
|
|
586
|
-
placeItems: "center",
|
|
587
|
-
flexShrink: "0",
|
|
588
|
-
inlineSize: "$docs-menu-button-size",
|
|
589
|
-
blockSize: "$docs-menu-button-size",
|
|
590
|
-
padding: "0",
|
|
591
|
-
border: "0",
|
|
592
|
-
color: "#text-soft",
|
|
593
|
-
fill: "#clear",
|
|
594
|
-
radius: "$header-control-radius",
|
|
595
|
-
},
|
|
596
|
-
HoverClose: {
|
|
597
|
-
$: ".td-sidebar-heading > button:hover",
|
|
598
|
-
color: "#text",
|
|
599
|
-
fill: "#surface-2-hover",
|
|
600
|
-
},
|
|
601
|
-
CloseIcon: {
|
|
602
|
-
$: ".td-sidebar-heading > button > svg",
|
|
603
|
-
inlineSize: "1.25rem",
|
|
604
|
-
blockSize: "1.25rem",
|
|
605
|
-
},
|
|
606
|
-
CurrentLink: {
|
|
607
|
-
$: 'cookbook-sidebar a[aria-current="page"], cookbook-sidebar a[aria-current="page"]:hover, cookbook-sidebar a[aria-current="page"]:focus',
|
|
608
|
-
color: "#accent-text",
|
|
609
|
-
fill: "#accent-surface-subtle",
|
|
610
|
-
preset: "navigation / strong",
|
|
611
|
-
},
|
|
612
|
-
OpenPane: { $: "&:popover-open", visibility: { "@mobile": "visible" } },
|
|
613
|
-
EnteredPane: {
|
|
614
|
-
$: "&:popover-open[data-open]",
|
|
615
|
-
translate: { "@mobile": "0" },
|
|
616
|
-
},
|
|
617
|
-
Content: {
|
|
618
|
-
$: ".sidebar-content",
|
|
619
|
-
display: "flex",
|
|
620
|
-
flow: "column",
|
|
621
|
-
minBlockSize: "100%",
|
|
622
|
-
inlinePadding: "$docs-sidebar-pad-x",
|
|
623
|
-
gap: "($gap * 2)",
|
|
624
|
-
paddingBlockStart: { "": "($gap * 3)", "@mobile": "($gap * 2)" },
|
|
625
|
-
paddingBlockEnd: "($gap * 6)",
|
|
626
|
-
},
|
|
627
|
-
Tree: { $: "cookbook-sidebar", display: "block" },
|
|
628
|
-
List: {
|
|
629
|
-
$: "cookbook-sidebar ul",
|
|
630
|
-
display: "grid",
|
|
631
|
-
gridTemplateColumns: "minmax(0, 1fr)",
|
|
632
|
-
gap: "1bw",
|
|
633
|
-
margin: "0",
|
|
634
|
-
padding: "0",
|
|
635
|
-
listStyle: "none",
|
|
636
|
-
},
|
|
637
|
-
Item: { $: "cookbook-sidebar li", overflowWrap: "anywhere" },
|
|
638
|
-
TopLevelSpacing: { $: ".top-level > li + li", marginBlockStart: "0" },
|
|
639
|
-
GroupSpacing: {
|
|
640
|
-
$: ".top-level > li + li:has(> .sidebar-section-label)",
|
|
641
|
-
marginBlockStart: "($gap * 2.5)",
|
|
642
|
-
},
|
|
643
|
-
NestedItem: {
|
|
644
|
-
$: "cookbook-sidebar details > ul > li",
|
|
645
|
-
marginInlineStart: "($gap * 1.5)",
|
|
646
|
-
},
|
|
647
|
-
SectionHeading: {
|
|
648
|
-
$: ".sidebar-section-label",
|
|
649
|
-
margin: "0 0 1bw",
|
|
650
|
-
padding: "($gap * 0.75) ($gap * 1.25)",
|
|
651
|
-
color: "#text",
|
|
652
|
-
preset: "small / strong",
|
|
653
|
-
},
|
|
654
|
-
Control: {
|
|
655
|
-
$: "cookbook-sidebar summary, cookbook-sidebar a",
|
|
656
|
-
blockSize: "min 2.25rem",
|
|
657
|
-
padding: "($gap * 0.75) ($gap * 1.25)",
|
|
658
|
-
color: "#sidebar-text",
|
|
659
|
-
preset: "navigation",
|
|
660
|
-
radius: "$radius",
|
|
661
|
-
textDecoration: "none",
|
|
662
|
-
},
|
|
663
|
-
Summary: {
|
|
664
|
-
$: "cookbook-sidebar summary",
|
|
665
|
-
blockMargin: "1bw end",
|
|
666
|
-
display: "flex",
|
|
667
|
-
alignItems: "center",
|
|
668
|
-
justifyContent: "space-between",
|
|
669
|
-
gap: "1x",
|
|
670
|
-
cursor: "pointer",
|
|
671
|
-
userSelect: "none",
|
|
672
|
-
},
|
|
673
|
-
GroupLabel: {
|
|
674
|
-
$: ".group-label",
|
|
675
|
-
display: "flex",
|
|
676
|
-
alignItems: "center",
|
|
677
|
-
minInlineSize: "0",
|
|
678
|
-
gap: "0.25em",
|
|
679
|
-
},
|
|
680
|
-
GroupLabelText: {
|
|
681
|
-
$: ".group-label > span:first-child",
|
|
682
|
-
minInlineSize: "0",
|
|
683
|
-
overflow: "hidden",
|
|
684
|
-
textOverflow: "ellipsis",
|
|
685
|
-
whiteSpace: "nowrap",
|
|
686
|
-
},
|
|
687
|
-
Link: {
|
|
688
|
-
$: "cookbook-sidebar a",
|
|
689
|
-
inlineSize: "100%",
|
|
690
|
-
display: "flex",
|
|
691
|
-
alignItems: "center",
|
|
692
|
-
minInlineSize: "0",
|
|
693
|
-
gap: "0.25em",
|
|
694
|
-
fill: "#surface",
|
|
695
|
-
preset: "navigation",
|
|
696
|
-
},
|
|
697
|
-
LinkLabel: {
|
|
698
|
-
$: "a > span:first-child",
|
|
699
|
-
minInlineSize: "0",
|
|
700
|
-
overflow: "hidden",
|
|
701
|
-
textOverflow: "ellipsis",
|
|
702
|
-
whiteSpace: "nowrap",
|
|
703
|
-
},
|
|
704
|
-
InteractiveControl: {
|
|
705
|
-
$: "cookbook-sidebar a:hover, cookbook-sidebar a:focus-visible, cookbook-sidebar summary:hover, cookbook-sidebar summary:focus-visible",
|
|
706
|
-
color: "#text",
|
|
707
|
-
fill: "#surface-2-hover",
|
|
708
|
-
},
|
|
709
|
-
SummaryMarker: {
|
|
710
|
-
$: "cookbook-sidebar summary::marker, summary::-webkit-details-marker",
|
|
711
|
-
hide: true,
|
|
712
|
-
},
|
|
713
|
-
Caret: {
|
|
714
|
-
$: ".sidebar-caret",
|
|
715
|
-
flexShrink: "0",
|
|
716
|
-
inlineSize: "1rem",
|
|
717
|
-
blockSize: "1rem",
|
|
718
|
-
transform: { "": "none", ":dir(rtl)": "rotate(180deg)" },
|
|
719
|
-
},
|
|
720
|
-
ExpandedCaret: {
|
|
721
|
-
$: "details[open] > summary > .sidebar-caret, details[open] > summary > a > .sidebar-caret",
|
|
722
|
-
transform: "rotate(90deg)",
|
|
723
|
-
},
|
|
724
|
-
LinkedSummary: { $: "summary:has(> a)", padding: "0" },
|
|
725
|
-
GroupLink: { $: "summary > a", justifyContent: "space-between" },
|
|
726
|
-
LinkedSectionHeading: {
|
|
727
|
-
$: ".sidebar-section-label:has(> a)",
|
|
728
|
-
padding: "0",
|
|
729
|
-
},
|
|
730
|
-
SectionLink: {
|
|
731
|
-
$: '.sidebar-section-label > a:not([aria-current="page"])',
|
|
732
|
-
color: "#text",
|
|
733
|
-
preset: "small / strong",
|
|
734
|
-
},
|
|
735
|
-
Badge: {
|
|
736
|
-
$: ".sidebar-badge",
|
|
737
|
-
flexShrink: "0",
|
|
738
|
-
padding: "0.125rem 0.375rem",
|
|
739
|
-
color: "#text-soft",
|
|
740
|
-
fill: "#surface-3",
|
|
741
|
-
border: "$border-width solid #border",
|
|
742
|
-
radius: "$radius",
|
|
743
|
-
preset: "small",
|
|
744
|
-
},
|
|
745
|
-
TopLevelLink: {
|
|
746
|
-
$: 'a.large:not([aria-current="page"])',
|
|
747
|
-
color: "#sidebar-text",
|
|
748
|
-
preset: "navigation",
|
|
749
|
-
},
|
|
750
|
-
}),
|
|
751
|
-
);
|
|
752
|
-
|
|
753
|
-
useGlobalStyles(
|
|
754
|
-
".right-sidebar-panel",
|
|
755
|
-
resolveComponentStyles("TableOfContents", {
|
|
756
|
-
display: "block",
|
|
757
|
-
hide: { "": false, "@narrow-layout": true },
|
|
758
|
-
paddingBlockStart: "($gap * 4)",
|
|
759
|
-
paddingInlineStart: "$docs-sidebar-pad-x",
|
|
760
|
-
paddingInlineEnd: "$docs-sidebar-pad-x",
|
|
761
|
-
Heading: {
|
|
762
|
-
$: "h2",
|
|
763
|
-
margin: "0 0 $gap",
|
|
764
|
-
color: "#text",
|
|
765
|
-
preset: "small / strong",
|
|
766
|
-
},
|
|
767
|
-
List: {
|
|
768
|
-
$: "ul",
|
|
769
|
-
display: "grid",
|
|
770
|
-
gridTemplateColumns: "minmax(0, 1fr)",
|
|
771
|
-
minInlineSize: "0",
|
|
772
|
-
gap: "1px",
|
|
773
|
-
margin: "0",
|
|
774
|
-
padding: "0",
|
|
775
|
-
listStyle: "none",
|
|
776
|
-
},
|
|
777
|
-
Item: {
|
|
778
|
-
$: "li",
|
|
779
|
-
minInlineSize: "0",
|
|
780
|
-
margin: "0",
|
|
781
|
-
padding: "0",
|
|
782
|
-
listStyle: "none",
|
|
783
|
-
},
|
|
784
|
-
Link: {
|
|
785
|
-
$: "a",
|
|
786
|
-
display: "block",
|
|
787
|
-
minInlineSize: "0",
|
|
788
|
-
maxInlineSize: "100%",
|
|
789
|
-
paddingBlockStart: "($gap * 0.5)",
|
|
790
|
-
paddingBlockEnd: "($gap * 0.5)",
|
|
791
|
-
color: "#text-muted",
|
|
792
|
-
preset: "small",
|
|
793
|
-
textDecoration: "none",
|
|
794
|
-
overflowWrap: "anywhere",
|
|
795
|
-
},
|
|
796
|
-
LinkLabel: {
|
|
797
|
-
$: "a > span",
|
|
798
|
-
display: "block",
|
|
799
|
-
minInlineSize: "0",
|
|
800
|
-
overflow: "hidden",
|
|
801
|
-
textOverflow: "ellipsis",
|
|
802
|
-
whiteSpace: "nowrap",
|
|
803
|
-
},
|
|
804
|
-
HoverLink: { $: "a:hover", color: "#text" },
|
|
805
|
-
CurrentLink: {
|
|
806
|
-
$: 'a[aria-current="location"]',
|
|
807
|
-
color: "#accent-text",
|
|
808
|
-
preset: "small / strong",
|
|
809
|
-
},
|
|
810
|
-
}),
|
|
811
|
-
);
|
|
812
|
-
|
|
813
|
-
useGlobalStyles(
|
|
814
|
-
".hero",
|
|
815
|
-
resolveComponentStyles("Hero", {
|
|
816
|
-
display: "grid",
|
|
817
|
-
gridTemplateColumns: {
|
|
818
|
-
"": "minmax(0, 7fr) minmax(12rem, 4fr)",
|
|
819
|
-
"@mobile": "minmax(0, 1fr)",
|
|
820
|
-
},
|
|
821
|
-
alignItems: "center",
|
|
822
|
-
gap: "clamp(2rem, 5vw, 5rem)",
|
|
823
|
-
paddingBlockStart: {
|
|
824
|
-
"": "clamp(3rem, 8vw, 7rem)",
|
|
825
|
-
"@mobile": "($gap * 4)",
|
|
826
|
-
},
|
|
827
|
-
paddingBlockEnd: "clamp(2rem, 6vw, 5rem)",
|
|
828
|
-
Visual: {
|
|
829
|
-
$: "> img, > .hero-html",
|
|
830
|
-
order: { "": "2", "@mobile": "0" },
|
|
831
|
-
display: "grid",
|
|
832
|
-
placeItems: "center",
|
|
833
|
-
inlineSize: "min(100%, 22rem)",
|
|
834
|
-
blockSize: "auto",
|
|
835
|
-
objectFit: "contain",
|
|
836
|
-
marginInlineStart: "auto",
|
|
837
|
-
marginInlineEnd: "auto",
|
|
838
|
-
color: "#logo-surface",
|
|
839
|
-
},
|
|
840
|
-
DarkVisual: {
|
|
841
|
-
$: '> img[data-hero-image="dark"]',
|
|
842
|
-
hide: { "": false, "@parent(theme=light)": true },
|
|
843
|
-
},
|
|
844
|
-
LightVisual: {
|
|
845
|
-
$: '> img[data-hero-image="light"]',
|
|
846
|
-
hide: { "": true, "@parent(theme=light)": false },
|
|
847
|
-
},
|
|
848
|
-
Stack: {
|
|
849
|
-
$: "> .stack",
|
|
850
|
-
display: "flex",
|
|
851
|
-
flow: "column",
|
|
852
|
-
alignItems: { "": "flex-start", "@mobile": "center" },
|
|
853
|
-
gap: "clamp(1.5rem, 3vw, 2rem)",
|
|
854
|
-
textAlign: { "": "start", "@mobile": "center" },
|
|
855
|
-
},
|
|
856
|
-
Copy: {
|
|
857
|
-
$: "> .stack > .copy",
|
|
858
|
-
display: "flex",
|
|
859
|
-
flow: "column",
|
|
860
|
-
alignItems: "inherit",
|
|
861
|
-
gap: "($gap * 2)",
|
|
862
|
-
},
|
|
863
|
-
Title: {
|
|
864
|
-
$: "h1",
|
|
865
|
-
maxInlineSize: "16ch",
|
|
866
|
-
margin: "0",
|
|
867
|
-
color: "#heading",
|
|
868
|
-
preset: "h1",
|
|
869
|
-
fontSize: "clamp(2.75rem, 7vw, 4.75rem)",
|
|
870
|
-
textWrap: "balance",
|
|
871
|
-
},
|
|
872
|
-
Tagline: {
|
|
873
|
-
$: ".tagline",
|
|
874
|
-
maxInlineSize: "48ch",
|
|
875
|
-
color: "#text-soft",
|
|
876
|
-
fontSize: "clamp(1.05rem, 2.5vw, 1.35rem)",
|
|
877
|
-
lineHeight: "1.55",
|
|
878
|
-
textWrap: "balance",
|
|
879
|
-
},
|
|
880
|
-
Actions: {
|
|
881
|
-
$: ".actions",
|
|
882
|
-
display: "flex",
|
|
883
|
-
flow: "row wrap",
|
|
884
|
-
justifyContent: { "": "flex-start", "@mobile": "center" },
|
|
885
|
-
gap: "($gap * 1.5)",
|
|
886
|
-
},
|
|
887
|
-
Action: {
|
|
888
|
-
$: ".cookbook-link-button",
|
|
889
|
-
display: "inline-flex",
|
|
890
|
-
alignItems: "center",
|
|
891
|
-
minBlockSize: "$control-height",
|
|
892
|
-
padding: "($gap * 1.25) ($gap * 2.5)",
|
|
893
|
-
gap: "$gap",
|
|
894
|
-
color: "#text",
|
|
895
|
-
border: true,
|
|
896
|
-
radius: "999px",
|
|
897
|
-
fill: "#surface-2",
|
|
898
|
-
preset: "navigation / strong",
|
|
899
|
-
textDecoration: "none",
|
|
900
|
-
transition: "fill $transition, translate $transition",
|
|
901
|
-
},
|
|
902
|
-
HoverAction: {
|
|
903
|
-
$: ".cookbook-link-button:hover",
|
|
904
|
-
fill: "#surface-2-hover",
|
|
905
|
-
translate: "0 -1px",
|
|
906
|
-
},
|
|
907
|
-
PrimaryAction: {
|
|
908
|
-
$: ".cookbook-link-button.primary",
|
|
909
|
-
color: "#accent-surface-text",
|
|
910
|
-
borderColor: "#accent-surface",
|
|
911
|
-
fill: "#accent-surface",
|
|
912
|
-
},
|
|
913
|
-
SecondaryAction: {
|
|
914
|
-
$: ".cookbook-link-button.secondary",
|
|
915
|
-
color: "#accent-text",
|
|
916
|
-
borderColor: "#border-strong",
|
|
917
|
-
},
|
|
918
|
-
MinimalAction: {
|
|
919
|
-
$: ".cookbook-link-button.minimal",
|
|
920
|
-
paddingInlineStart: "0",
|
|
921
|
-
paddingInlineEnd: "0",
|
|
922
|
-
color: "#accent-text",
|
|
923
|
-
border: "0",
|
|
924
|
-
fill: "#clear",
|
|
925
|
-
},
|
|
926
|
-
ActionIcon: { $: ".cookbook-link-button svg", flexShrink: "0" },
|
|
927
|
-
}),
|
|
928
|
-
);
|
|
929
|
-
|
|
930
|
-
useGlobalStyles(
|
|
931
|
-
".cookbook-markdown-content",
|
|
932
|
-
resolveComponentStyles("Markdown", {
|
|
933
|
-
fontSize: "1.025rem",
|
|
934
|
-
Block: {
|
|
935
|
-
$: ":where(p):not(.not-content *), :where(ul):not(.not-content *), :where(ol):not(.not-content *), :where(dl):not(.not-content *), :where(blockquote):not(.not-content *), :where(pre):not(.not-content *), :where(table):not(.not-content *), :where(hr):not(.not-content *), :where(details):not(.not-content *)",
|
|
936
|
-
marginBlockStart: "0",
|
|
937
|
-
marginBlockEnd: "0",
|
|
938
|
-
},
|
|
939
|
-
// Linked Cards are block content even though their root is an anchor.
|
|
940
|
-
BlockSpacing: {
|
|
941
|
-
$: ":not(a):not(strong):not(em):not(del):not(span):not(input):not(code):not(br) + :not(a):not(strong):not(em):not(del):not(span):not(input):not(code):not(br):not(li):not(dt):not(dd):not(.not-content *), :not(a):not(strong):not(em):not(del):not(span):not(input):not(code):not(br) + a.td-card, a.td-card + :not(a):not(strong):not(em):not(del):not(span):not(input):not(code):not(br):not(li):not(dt):not(dd):not(.not-content *), a.td-card + a.td-card",
|
|
942
|
-
marginBlockStart: "($gap * 3)",
|
|
943
|
-
},
|
|
944
|
-
HeadingSpacing: {
|
|
945
|
-
$: ":not(h1):not(h2):not(h3):not(h4):not(h5):not(h6):not(.cookbook-heading-wrapper) + :where(h1):not(.not-content *), :not(h1):not(h2):not(h3):not(h4):not(h5):not(h6):not(.cookbook-heading-wrapper) + :where(h2):not(.not-content *), :not(h1):not(h2):not(h3):not(h4):not(h5):not(h6):not(.cookbook-heading-wrapper) + :where(h3):not(.not-content *), :not(h1):not(h2):not(h3):not(h4):not(h5):not(h6):not(.cookbook-heading-wrapper) + :where(h4):not(.not-content *), :not(h1):not(h2):not(h3):not(h4):not(h5):not(h6):not(.cookbook-heading-wrapper) + :where(h5):not(.not-content *), :not(h1):not(h2):not(h3):not(h4):not(h5):not(h6):not(.cookbook-heading-wrapper) + :where(h6):not(.not-content *), :not(h1):not(h2):not(h3):not(h4):not(h5):not(h6):not(.cookbook-heading-wrapper) + :where(.cookbook-heading-wrapper):not(.not-content *)",
|
|
946
|
-
marginBlockStart: "1.5em",
|
|
947
|
-
},
|
|
948
|
-
List: {
|
|
949
|
-
$: ":where(ul):not(.not-content *), :where(ol):not(.not-content *)",
|
|
950
|
-
paddingInlineStart: "1.5rem",
|
|
951
|
-
},
|
|
952
|
-
CompactItem: {
|
|
953
|
-
$: ":where(li + li):not(.not-content *), :where(dt + dt):not(.not-content *), :where(dt + dd):not(.not-content *), :where(dd + dd):not(.not-content *)",
|
|
954
|
-
marginBlockStart: "($gap * 0.5)",
|
|
955
|
-
},
|
|
956
|
-
ListItem: {
|
|
957
|
-
$: "li:not(.not-content *)",
|
|
958
|
-
overflowWrap: "anywhere",
|
|
959
|
-
},
|
|
960
|
-
DefinitionTerm: { $: "dt:not(.not-content *)", preset: "strong" },
|
|
961
|
-
DefinitionDescription: {
|
|
962
|
-
$: "dd:not(.not-content *)",
|
|
963
|
-
paddingInlineStart: "($gap * 2)",
|
|
964
|
-
},
|
|
965
|
-
Link: {
|
|
966
|
-
$: "a:not(.not-content *)",
|
|
967
|
-
color: "#accent-text",
|
|
968
|
-
textUnderlineOffset: "0.15em",
|
|
969
|
-
},
|
|
970
|
-
HoverLink: { $: "a:hover:not(.not-content *)", color: "#text" },
|
|
971
|
-
Quote: {
|
|
972
|
-
$: "blockquote:not(.not-content *)",
|
|
973
|
-
inlinePadding: "2x start",
|
|
974
|
-
color: "#text-soft",
|
|
975
|
-
inlineBorder: "1bw solid #border start",
|
|
976
|
-
},
|
|
977
|
-
Rule: {
|
|
978
|
-
$: "hr:not(.not-content *)",
|
|
979
|
-
border: "0",
|
|
980
|
-
borderBlockEnd: "$border-width solid #border",
|
|
981
|
-
},
|
|
982
|
-
Details: {
|
|
983
|
-
$: "details:not(.not-content *)",
|
|
984
|
-
paddingInlineStart: "($gap * 2)",
|
|
985
|
-
borderInlineStart: "2px solid #border",
|
|
986
|
-
borderColor: "#border",
|
|
987
|
-
},
|
|
988
|
-
HoverDetails: {
|
|
989
|
-
$: "details:not([open]):hover:not(.not-content *), details:has(> summary:hover):not(.not-content *)",
|
|
990
|
-
borderColor: "#accent-text",
|
|
991
|
-
},
|
|
992
|
-
Summary: {
|
|
993
|
-
$: "summary:not(.not-content *)",
|
|
994
|
-
display: "block",
|
|
995
|
-
marginInlineStart: "-0.5rem",
|
|
996
|
-
paddingInlineStart: "0.5rem",
|
|
997
|
-
color: "#text",
|
|
998
|
-
preset: "strong",
|
|
999
|
-
},
|
|
1000
|
-
OpenSummary: {
|
|
1001
|
-
$: "details[open] > summary:not(.not-content *)",
|
|
1002
|
-
marginBlockEnd: "($gap * 2)",
|
|
1003
|
-
},
|
|
1004
|
-
SummaryMarker: {
|
|
1005
|
-
$: "summary:not(.not-content *)::marker, summary:not(.not-content *)::-webkit-details-marker",
|
|
1006
|
-
hide: true,
|
|
1007
|
-
},
|
|
1008
|
-
SummaryIcon: {
|
|
1009
|
-
$: "summary:not(.not-content *)::before",
|
|
1010
|
-
content: '""',
|
|
1011
|
-
display: "inline-block",
|
|
1012
|
-
inlineSize: "1.25rem",
|
|
1013
|
-
blockSize: "1.25rem",
|
|
1014
|
-
marginInlineEnd: "($gap * 0.5)",
|
|
1015
|
-
verticalAlign: "middle",
|
|
1016
|
-
fill: "#current",
|
|
1017
|
-
mask: `url("${svgIconUrl(chevronRightIcon)}") center / contain no-repeat`,
|
|
1018
|
-
transition: "rotate $transition",
|
|
1019
|
-
},
|
|
1020
|
-
OpenSummaryIcon: {
|
|
1021
|
-
$: "details[open] > summary:not(.not-content *)::before",
|
|
1022
|
-
rotate: "90deg",
|
|
1023
|
-
},
|
|
1024
|
-
Code: {
|
|
1025
|
-
$: ":where(code):not(.not-content *)",
|
|
1026
|
-
radius: "($radius * 0.65)",
|
|
1027
|
-
},
|
|
1028
|
-
}),
|
|
1029
|
-
);
|
|
1030
|
-
|
|
1031
|
-
useGlobalStyles(
|
|
1032
|
-
".cookbook-markdown-content code:not(:where(pre *, .not-content *))",
|
|
1033
|
-
resolveComponentStyles("MarkdownInlineCode", {
|
|
1034
|
-
padding: "0.125rem 0.375rem",
|
|
1035
|
-
color: "#text-soft",
|
|
1036
|
-
fill: "#surface-3",
|
|
1037
|
-
preset: "code",
|
|
1038
|
-
fontSize: "0.875em",
|
|
1039
|
-
radius: "($radius * 0.65)",
|
|
1040
|
-
}),
|
|
1041
|
-
);
|
|
1042
|
-
|
|
1043
|
-
useGlobalStyles(
|
|
1044
|
-
".tasty-code",
|
|
1045
|
-
resolveComponentStyles("SyntaxHighlight", {
|
|
1046
|
-
Scroll: { $: "&.td-syntax-scroll", overflowX: "auto" },
|
|
1047
|
-
Wrap: {
|
|
1048
|
-
$: "&.td-syntax-wrap",
|
|
1049
|
-
whiteSpace: "pre-wrap",
|
|
1050
|
-
overflowWrap: "break-word",
|
|
1051
|
-
},
|
|
1052
|
-
Marker: { $: ".td-syntax-marker", userSelect: "none" },
|
|
1053
|
-
Comment: {
|
|
1054
|
-
$: "&.td-syntax-comment, .td-syntax-comment",
|
|
1055
|
-
color: "#syntax-comment",
|
|
1056
|
-
},
|
|
1057
|
-
Punctuation: {
|
|
1058
|
-
$: "&.td-syntax-punctuation, .td-syntax-punctuation",
|
|
1059
|
-
color: "#syntax-punctuation",
|
|
1060
|
-
},
|
|
1061
|
-
Keyword: {
|
|
1062
|
-
$: "&.td-syntax-keyword, .td-syntax-keyword",
|
|
1063
|
-
color: "#syntax-keyword",
|
|
1064
|
-
},
|
|
1065
|
-
String: {
|
|
1066
|
-
$: "&.td-syntax-string, .td-syntax-string",
|
|
1067
|
-
color: "#syntax-string",
|
|
1068
|
-
},
|
|
1069
|
-
Token: {
|
|
1070
|
-
$: "&.td-syntax-token, .td-syntax-token",
|
|
1071
|
-
color: "#syntax-token",
|
|
1072
|
-
},
|
|
1073
|
-
Property: {
|
|
1074
|
-
$: "&.td-syntax-property, .td-syntax-property",
|
|
1075
|
-
color: "#syntax-property",
|
|
1076
|
-
},
|
|
1077
|
-
Number: {
|
|
1078
|
-
$: "&.td-syntax-number, .td-syntax-number",
|
|
1079
|
-
color: "#syntax-number",
|
|
1080
|
-
},
|
|
1081
|
-
Function: {
|
|
1082
|
-
$: "&.td-syntax-function, .td-syntax-function",
|
|
1083
|
-
color: "#syntax-function",
|
|
1084
|
-
},
|
|
1085
|
-
Value: {
|
|
1086
|
-
$: "&.td-syntax-value, .td-syntax-value",
|
|
1087
|
-
color: "#syntax-value",
|
|
1088
|
-
},
|
|
1089
|
-
Operator: {
|
|
1090
|
-
$: "&.td-syntax-operator, .td-syntax-operator",
|
|
1091
|
-
color: "#syntax-operator",
|
|
1092
|
-
},
|
|
1093
|
-
Text: { $: "&.td-syntax-text, .td-syntax-text", color: "#syntax-text" },
|
|
1094
|
-
Bg: { $: "&.td-syntax-bg, .td-syntax-bg", fill: "#syntax-bg" },
|
|
1095
|
-
Inserted: { $: "&.td-green-text, .td-green-text", color: "#green-text" },
|
|
1096
|
-
Deleted: { $: "&.td-red-text, .td-red-text", color: "#red-text" },
|
|
1097
|
-
Italic: { $: ".td-syntax-italic", fontStyle: "italic" },
|
|
1098
|
-
Strong: { $: ".td-syntax-strong", preset: "strong" },
|
|
1099
|
-
Underline: { $: ".td-syntax-underline", textDecoration: "underline" },
|
|
1100
|
-
}),
|
|
1101
|
-
);
|
|
1102
|
-
|
|
1103
|
-
useGlobalStyles(
|
|
1104
|
-
".cookbook-markdown-content .td-code-block",
|
|
1105
|
-
resolveComponentStyles("MarkdownCodeBlock", {
|
|
1106
|
-
"$copy-button-size": "2rem",
|
|
1107
|
-
display: "block",
|
|
1108
|
-
position: "relative",
|
|
1109
|
-
minInlineSize: "0",
|
|
1110
|
-
Pre: {
|
|
1111
|
-
$: "> pre",
|
|
1112
|
-
margin: "0",
|
|
1113
|
-
padding: "0 3.75rem 0 1rem",
|
|
1114
|
-
// Balance a single code line around the copy control, including the border.
|
|
1115
|
-
blockPadding:
|
|
1116
|
-
"max(0px, ($copy-button-size - 1lh) / 2 + $gap - $border-width)",
|
|
1117
|
-
overflowX: "auto",
|
|
1118
|
-
color: "#syntax-text",
|
|
1119
|
-
border: true,
|
|
1120
|
-
fill: "#syntax-bg",
|
|
1121
|
-
radius: "$card-radius",
|
|
1122
|
-
tabSize: "2",
|
|
1123
|
-
},
|
|
1124
|
-
CopyButton: {
|
|
1125
|
-
$: "> [data-copy-code]",
|
|
1126
|
-
position: "absolute",
|
|
1127
|
-
zIndex: "1",
|
|
1128
|
-
insetBlockStart: "$gap",
|
|
1129
|
-
insetInlineEnd: "$gap",
|
|
1130
|
-
margin: "0",
|
|
1131
|
-
display: "grid",
|
|
1132
|
-
placeItems: "center",
|
|
1133
|
-
inlineSize: "$copy-button-size",
|
|
1134
|
-
minInlineSize: "$copy-button-size",
|
|
1135
|
-
blockSize: "$copy-button-size",
|
|
1136
|
-
minBlockSize: "$copy-button-size",
|
|
1137
|
-
padding: "0",
|
|
1138
|
-
color: "#text-soft",
|
|
1139
|
-
border: true,
|
|
1140
|
-
fill: "#surface-2",
|
|
1141
|
-
radius: "$radius",
|
|
1142
|
-
preset: "small / strong",
|
|
1143
|
-
cursor: "pointer",
|
|
1144
|
-
transition: "color $transition, fill $transition",
|
|
1145
|
-
},
|
|
1146
|
-
HoverCopyButton: {
|
|
1147
|
-
$: "> [data-copy-code]:hover",
|
|
1148
|
-
color: "#text",
|
|
1149
|
-
fill: "#surface-2-hover",
|
|
1150
|
-
},
|
|
1151
|
-
CopiedButton: {
|
|
1152
|
-
$: '> [data-copy-code][data-copy-state="copied"]',
|
|
1153
|
-
color: "#green-text",
|
|
1154
|
-
borderColor: "#green",
|
|
1155
|
-
},
|
|
1156
|
-
CopyIcon: {
|
|
1157
|
-
$: "> [data-copy-code] > [data-copy-icon]",
|
|
1158
|
-
display: "block",
|
|
1159
|
-
inlineSize: "1rem",
|
|
1160
|
-
blockSize: "1rem",
|
|
1161
|
-
fill: "#current",
|
|
1162
|
-
mask: `url("${svgIconUrl(copyIcon)}") center / contain no-repeat`,
|
|
1163
|
-
},
|
|
1164
|
-
CopiedIcon: {
|
|
1165
|
-
$: '> [data-copy-code][data-copy-state="copied"] > [data-copy-icon]',
|
|
1166
|
-
mask: `url("${svgIconUrl(checkIcon)}") center / contain no-repeat`,
|
|
1167
|
-
},
|
|
1168
|
-
Code: { $: "pre code", padding: "0", color: "inherit", fill: "#clear" },
|
|
1169
|
-
Diff: { $: "pre.td-diff", inlinePadding: "0" },
|
|
1170
|
-
DiffCode: {
|
|
1171
|
-
$: "pre.td-diff code",
|
|
1172
|
-
display: "block",
|
|
1173
|
-
inlineSize: "max-content",
|
|
1174
|
-
minInlineSize: "100%",
|
|
1175
|
-
lineHeight: "0",
|
|
1176
|
-
},
|
|
1177
|
-
DiffLine: {
|
|
1178
|
-
$: "pre.td-diff > code > .line",
|
|
1179
|
-
display: "block",
|
|
1180
|
-
inlinePadding: "1rem",
|
|
1181
|
-
preset: "code",
|
|
1182
|
-
},
|
|
1183
|
-
EmptyDiffLine: {
|
|
1184
|
-
$: "pre.td-diff > code > .line:empty::before",
|
|
1185
|
-
content: '"\\200b"',
|
|
1186
|
-
},
|
|
1187
|
-
InsertedLine: {
|
|
1188
|
-
$: "pre.td-diff > code > .td-diff-line--inserted",
|
|
1189
|
-
fill: "#green-surface",
|
|
1190
|
-
},
|
|
1191
|
-
DeletedLine: {
|
|
1192
|
-
$: "pre.td-diff > code > .td-diff-line--deleted",
|
|
1193
|
-
fill: "#red-surface",
|
|
1194
|
-
},
|
|
1195
|
-
}),
|
|
1196
|
-
);
|
|
1197
|
-
|
|
1198
|
-
useGlobalStyles(
|
|
1199
|
-
'.cookbook-markdown-content pre[data-language="mermaid"]:not(.not-content *)',
|
|
1200
|
-
resolveComponentStyles("MermaidSource", {
|
|
1201
|
-
padding: "0.875rem 1rem",
|
|
1202
|
-
overflowX: "auto",
|
|
1203
|
-
color: "#syntax-text",
|
|
1204
|
-
border: true,
|
|
1205
|
-
fill: "#syntax-bg",
|
|
1206
|
-
radius: "$card-radius",
|
|
1207
|
-
tabSize: "2",
|
|
1208
|
-
}),
|
|
1209
|
-
);
|
|
1210
|
-
|
|
1211
|
-
useGlobalStyles(
|
|
1212
|
-
".cookbook-markdown-content .td-mermaid",
|
|
1213
|
-
resolveComponentStyles("Mermaid", {
|
|
1214
|
-
display: "grid",
|
|
1215
|
-
placeItems: "center",
|
|
1216
|
-
minInlineSize: "0",
|
|
1217
|
-
padding: "($gap * 2)",
|
|
1218
|
-
overflowX: "auto",
|
|
1219
|
-
border: true,
|
|
1220
|
-
fill: "#surface-2",
|
|
1221
|
-
radius: "$card-radius",
|
|
1222
|
-
Diagram: {
|
|
1223
|
-
$: "> svg",
|
|
1224
|
-
$bg: "#surface-2",
|
|
1225
|
-
$fg: "#text",
|
|
1226
|
-
$line: "#text-soft",
|
|
1227
|
-
$accent: "#accent-text",
|
|
1228
|
-
$muted: "#text-soft",
|
|
1229
|
-
$surface: "#surface",
|
|
1230
|
-
$border: "#border-strong",
|
|
1231
|
-
$_text: "#text",
|
|
1232
|
-
"$_text-sec": "#text-soft",
|
|
1233
|
-
"$_text-muted": "#text-soft",
|
|
1234
|
-
"$_text-faint": "#text-muted",
|
|
1235
|
-
$_line: "#text-soft",
|
|
1236
|
-
$_arrow: "#accent-text",
|
|
1237
|
-
"$_node-fill": "#surface",
|
|
1238
|
-
"$_node-stroke": "#border-strong",
|
|
1239
|
-
"$_group-fill": "#surface-2",
|
|
1240
|
-
"$_group-hdr": "#surface",
|
|
1241
|
-
"$_inner-stroke": "#border",
|
|
1242
|
-
"$_key-badge": "#surface",
|
|
1243
|
-
display: "block",
|
|
1244
|
-
maxInlineSize: "100%",
|
|
1245
|
-
blockSize: "auto",
|
|
1246
|
-
margin: "auto",
|
|
1247
|
-
},
|
|
1248
|
-
Text: { $: "text", fontFamily: "$body-font-family" },
|
|
1249
|
-
MonoText: { $: ".mono", fontFamily: "$code-font-family" },
|
|
1250
|
-
}),
|
|
1251
|
-
);
|
|
1252
|
-
|
|
1253
|
-
useGlobalStyles(
|
|
1254
|
-
".cookbook-markdown-content .cookbook-heading-wrapper",
|
|
1255
|
-
resolveComponentStyles("MarkdownHeading", {
|
|
1256
|
-
position: "relative",
|
|
1257
|
-
color: "#heading",
|
|
1258
|
-
preset: "heading",
|
|
1259
|
-
Heading: {
|
|
1260
|
-
$: "> :first-child",
|
|
1261
|
-
color: "inherit",
|
|
1262
|
-
display: "inline",
|
|
1263
|
-
paddingInlineEnd: { "": "0", "@mobile": "1.75rem" },
|
|
1264
|
-
},
|
|
1265
|
-
Heading1: { $: "&.level-h1", preset: "h1" },
|
|
1266
|
-
Heading2: { $: "&.level-h2", preset: "h2" },
|
|
1267
|
-
Heading3: { $: "&.level-h3", preset: "h3" },
|
|
1268
|
-
Heading4: { $: "&.level-h4", preset: "h4" },
|
|
1269
|
-
Heading5: { $: "&.level-h5", preset: "h5" },
|
|
1270
|
-
Heading6: { $: "&.level-h6", preset: "h6" },
|
|
1271
|
-
Link: {
|
|
1272
|
-
$: "> .cookbook-anchor-link",
|
|
1273
|
-
position: { "": "absolute", "@mobile": "relative" },
|
|
1274
|
-
insetBlockStart: {
|
|
1275
|
-
"": "((1lh - 1.75rem) / 2)",
|
|
1276
|
-
"@mobile": "auto",
|
|
1277
|
-
},
|
|
1278
|
-
insetInlineStart: { "": "-2rem", "@mobile": "auto" },
|
|
1279
|
-
display: "inline-grid",
|
|
1280
|
-
placeItems: "center",
|
|
1281
|
-
inlineSize: { "": "1.75rem", "@mobile": "1.5rem" },
|
|
1282
|
-
blockSize: { "": "1.75rem", "@mobile": "1.5rem" },
|
|
1283
|
-
marginInlineStart: { "": "0", "@mobile": "-1.5rem" },
|
|
1284
|
-
verticalAlign: { "": "baseline", "@mobile": "middle" },
|
|
1285
|
-
color: "#text-muted",
|
|
1286
|
-
opacity: {
|
|
1287
|
-
"": "1",
|
|
1288
|
-
"@media(hover: hover)": "0",
|
|
1289
|
-
"@mobile": "1",
|
|
1290
|
-
},
|
|
1291
|
-
radius: "$radius",
|
|
1292
|
-
userSelect: "none",
|
|
1293
|
-
textDecoration: "none",
|
|
1294
|
-
transition: "color $transition, fill $transition, opacity $transition",
|
|
1295
|
-
},
|
|
1296
|
-
RevealedLink: {
|
|
1297
|
-
$: "&:hover > .cookbook-anchor-link, > .cookbook-anchor-link:focus-visible",
|
|
1298
|
-
opacity: "1",
|
|
1299
|
-
},
|
|
1300
|
-
HoverLink: {
|
|
1301
|
-
$: "> .cookbook-anchor-link:hover, > .cookbook-anchor-link:focus-visible",
|
|
1302
|
-
color: "#accent-text",
|
|
1303
|
-
fill: "#surface-2-hover",
|
|
1304
|
-
},
|
|
1305
|
-
LinkIcon: {
|
|
1306
|
-
$: "> .cookbook-anchor-link > .cookbook-anchor-icon",
|
|
1307
|
-
display: "block",
|
|
1308
|
-
fontSize: "clamp(1rem, 0.65em, 1.5rem)",
|
|
1309
|
-
lineHeight: "1",
|
|
1310
|
-
textAlign: "center",
|
|
1311
|
-
inlineSize: "1em",
|
|
1312
|
-
blockSize: "1em",
|
|
1313
|
-
},
|
|
1314
|
-
CopiedLink: {
|
|
1315
|
-
$: '> .cookbook-anchor-link[data-copy-state="copied"]',
|
|
1316
|
-
color: "#green-text",
|
|
1317
|
-
opacity: "1",
|
|
1318
|
-
},
|
|
1319
|
-
CopiedLinkIcon: {
|
|
1320
|
-
$: '> .cookbook-anchor-link[data-copy-state="copied"] > .cookbook-anchor-icon',
|
|
1321
|
-
visibility: "hidden",
|
|
1322
|
-
},
|
|
1323
|
-
CopiedIcon: {
|
|
1324
|
-
$: '> .cookbook-anchor-link[data-copy-state="copied"]::after',
|
|
1325
|
-
content: '""',
|
|
1326
|
-
position: "absolute",
|
|
1327
|
-
inlineSize: "clamp(1rem, 0.65em, 1.5rem)",
|
|
1328
|
-
blockSize: "clamp(1rem, 0.65em, 1.5rem)",
|
|
1329
|
-
fill: "#current",
|
|
1330
|
-
mask: `url("${svgIconUrl(checkIcon)}") center / contain no-repeat`,
|
|
1331
|
-
},
|
|
1332
|
-
}),
|
|
1333
|
-
);
|
|
1334
|
-
|
|
1335
|
-
useGlobalStyles(
|
|
1336
|
-
".cookbook-alert",
|
|
1337
|
-
resolveComponentStyles("MarkdownAlert", {
|
|
1338
|
-
padding: "($gap * 2) ($gap * 2.5)",
|
|
1339
|
-
color: "#text-soft",
|
|
1340
|
-
border: true,
|
|
1341
|
-
radius: "$card-radius",
|
|
1342
|
-
fill: "#surface-2",
|
|
1343
|
-
Note: {
|
|
1344
|
-
$: "&.cookbook-alert--note",
|
|
1345
|
-
fill: "#blue-surface",
|
|
1346
|
-
color: "#blue-text",
|
|
1347
|
-
border: "#blue",
|
|
1348
|
-
},
|
|
1349
|
-
Tip: {
|
|
1350
|
-
$: "&.cookbook-alert--tip",
|
|
1351
|
-
fill: "#green-surface",
|
|
1352
|
-
color: "#green-text",
|
|
1353
|
-
border: "#green",
|
|
1354
|
-
},
|
|
1355
|
-
Caution: {
|
|
1356
|
-
$: "&.cookbook-alert--caution",
|
|
1357
|
-
fill: "#yellow-surface",
|
|
1358
|
-
color: "#yellow-text",
|
|
1359
|
-
border: "#yellow",
|
|
1360
|
-
},
|
|
1361
|
-
Danger: {
|
|
1362
|
-
$: "&.cookbook-alert--danger",
|
|
1363
|
-
fill: "#red-surface",
|
|
1364
|
-
color: "#red-text",
|
|
1365
|
-
border: "#red",
|
|
1366
|
-
},
|
|
1367
|
-
Title: {
|
|
1368
|
-
$: ".cookbook-alert__title",
|
|
1369
|
-
display: "flex",
|
|
1370
|
-
alignItems: "center",
|
|
1371
|
-
gap: "$gap",
|
|
1372
|
-
margin: "0 0 $gap",
|
|
1373
|
-
color: "inherit",
|
|
1374
|
-
preset: "strong",
|
|
1375
|
-
},
|
|
1376
|
-
FirstContent: {
|
|
1377
|
-
$: ".cookbook-alert__content > :first-child",
|
|
1378
|
-
marginBlockStart: "0",
|
|
1379
|
-
},
|
|
1380
|
-
}),
|
|
1381
|
-
);
|
|
1382
|
-
|
|
1383
|
-
useGlobalStyles(
|
|
1384
|
-
"site-search button[data-open-modal]",
|
|
1385
|
-
resolveComponentStyles("SearchButton", {
|
|
1386
|
-
display: "flex",
|
|
1387
|
-
alignItems: "center",
|
|
1388
|
-
justifyContent: { "": "flex-start", "@mobile": "center" },
|
|
1389
|
-
gap: "$gap",
|
|
1390
|
-
inlineSize: { "": "100%", "@mobile": "$docs-menu-button-size" },
|
|
1391
|
-
maxInlineSize: "22rem",
|
|
1392
|
-
marginInlineStart: {
|
|
1393
|
-
"": "0",
|
|
1394
|
-
"@media(w >= 80rem)": "min(5rem, max(0px, calc(100% - 22rem)))",
|
|
1395
|
-
},
|
|
1396
|
-
blockSize: { "": "$control-height", "@mobile": "$docs-menu-button-size" },
|
|
1397
|
-
minBlockSize: "0",
|
|
1398
|
-
padding: { "": "0 $gap 0 ($gap * 1.5)", "@mobile": "0" },
|
|
1399
|
-
color: "#text-soft",
|
|
1400
|
-
border: { "": true, "@mobile": "0" },
|
|
1401
|
-
radius: "$header-control-radius",
|
|
1402
|
-
fill: { "": "#surface", "@mobile": "#clear" },
|
|
1403
|
-
preset: "small",
|
|
1404
|
-
shadow: "none",
|
|
1405
|
-
cursor: "pointer",
|
|
1406
|
-
transition: "color $transition, fill $transition",
|
|
1407
|
-
Label: { $: "> span", hide: { "": false, "@mobile": true } },
|
|
1408
|
-
PendingShortcut: { $: "> kbd[data-pending]", visibility: "hidden" },
|
|
1409
|
-
Shortcut: {
|
|
1410
|
-
$: "> kbd",
|
|
1411
|
-
display: "flex",
|
|
1412
|
-
hide: { "": false, "@narrow-layout": true },
|
|
1413
|
-
gap: "0.25em",
|
|
1414
|
-
inlineMargin: "auto start",
|
|
1415
|
-
inlinePadding: "0.375rem",
|
|
1416
|
-
fill: "#surface-3",
|
|
1417
|
-
preset: "small",
|
|
1418
|
-
radius: "($radius * 0.75)",
|
|
1419
|
-
},
|
|
1420
|
-
Hover: { $: "&:hover", color: "#text", fill: "#surface-2-hover" },
|
|
1421
|
-
Active: { $: "&:active", color: "#text", fill: "#surface-2-pressed" },
|
|
1422
|
-
NativeIcon: { $: "> svg", hide: true },
|
|
1423
|
-
Icon: {
|
|
1424
|
-
$: "&::before",
|
|
1425
|
-
content: '""',
|
|
1426
|
-
display: "block",
|
|
1427
|
-
flexShrink: "0",
|
|
1428
|
-
inlineSize: { "": "1rem", "@mobile": "1.25rem" },
|
|
1429
|
-
blockSize: { "": "1rem", "@mobile": "1.25rem" },
|
|
1430
|
-
fill: "#current",
|
|
1431
|
-
mask: `url("${svgIconUrl(searchIcon)}") center / contain no-repeat`,
|
|
1432
|
-
},
|
|
1433
|
-
}),
|
|
1434
|
-
);
|
|
1435
|
-
|
|
1436
|
-
const languageSelectStyles = selectPopoverStyles();
|
|
1437
|
-
useGlobalStyles(
|
|
1438
|
-
"cookbook-language-select",
|
|
1439
|
-
resolveComponentStyles("LanguageSelect", {
|
|
1440
|
-
display: "flex",
|
|
1441
|
-
flexShrink: "0",
|
|
1442
|
-
"$popover-transition": languageSelectStyles["$popover-transition"],
|
|
1443
|
-
Compact: {
|
|
1444
|
-
$: "&[data-compact]",
|
|
1445
|
-
},
|
|
1446
|
-
Trigger: {
|
|
1447
|
-
...languageSelectStyles.Trigger,
|
|
1448
|
-
inlineSize: "8rem",
|
|
1449
|
-
blockSize: "$control-height",
|
|
1450
|
-
padding: "0 $gap",
|
|
1451
|
-
fill: "#clear",
|
|
1452
|
-
border: "0",
|
|
1453
|
-
transition: "color $transition, fill $transition",
|
|
1454
|
-
},
|
|
1455
|
-
HoverTrigger: languageSelectStyles.HoverTrigger,
|
|
1456
|
-
ActiveTrigger: {
|
|
1457
|
-
$: "> button:active",
|
|
1458
|
-
color: "#text",
|
|
1459
|
-
fill: "#surface-2-pressed",
|
|
1460
|
-
},
|
|
1461
|
-
LabelIcon: {
|
|
1462
|
-
$: "> button > .label-icon",
|
|
1463
|
-
display: "block",
|
|
1464
|
-
flexShrink: "0",
|
|
1465
|
-
inlineSize: { "": "1.25rem", "@mobile": "1.125rem" },
|
|
1466
|
-
blockSize: { "": "1.25rem", "@mobile": "1.125rem" },
|
|
1467
|
-
},
|
|
1468
|
-
TriggerLabel: languageSelectStyles.TriggerLabel,
|
|
1469
|
-
Caret: languageSelectStyles.Caret,
|
|
1470
|
-
CompactTrigger: {
|
|
1471
|
-
$: "&[data-compact] > button",
|
|
1472
|
-
inlineSize: "$docs-menu-button-size",
|
|
1473
|
-
blockSize: "$docs-menu-button-size",
|
|
1474
|
-
padding: "0",
|
|
1475
|
-
},
|
|
1476
|
-
CompactLabel: {
|
|
1477
|
-
$: "&[data-compact] > button > .trigger-label",
|
|
1478
|
-
hide: true,
|
|
1479
|
-
},
|
|
1480
|
-
CompactCaret: { $: "&[data-compact] > button > .caret", hide: true },
|
|
1481
|
-
Label: { $: "> button" },
|
|
1482
|
-
HoverLabel: { $: "> button:hover" },
|
|
1483
|
-
Select: { $: "> button" },
|
|
1484
|
-
CompactSelect: { $: "&[data-compact] > button" },
|
|
1485
|
-
CompactLabelIcon: { $: "&[data-compact] > button > .label-icon" },
|
|
1486
|
-
SidebarTrigger: {
|
|
1487
|
-
$: "&[data-sidebar] > button",
|
|
1488
|
-
anchorName: "--language-trigger",
|
|
1489
|
-
},
|
|
1490
|
-
Panel: {
|
|
1491
|
-
...languageSelectStyles.Panel,
|
|
1492
|
-
blockInset: { "": "4rem start", "@mobile": "3.5rem start" },
|
|
1493
|
-
inlineInset:
|
|
1494
|
-
"max($docs-nav-pad-x, ((100vw - $layout-width) / 2 + $docs-sidebar-pad-x)) end",
|
|
1495
|
-
},
|
|
1496
|
-
SidebarPanel: {
|
|
1497
|
-
$: "&[data-sidebar] > [popover]",
|
|
1498
|
-
positionAnchor: "--language-trigger",
|
|
1499
|
-
blockInset: "auto start, anchor(top) end",
|
|
1500
|
-
blockMargin: "$gap end",
|
|
1501
|
-
inlineInset: "$gap start, auto end",
|
|
1502
|
-
inlineSize: "min(20rem, calc(100vw - 4rem))",
|
|
1503
|
-
blockSize: "max (100dvh - 8rem)",
|
|
1504
|
-
transformOrigin: "bottom",
|
|
1505
|
-
},
|
|
1506
|
-
OpenPanel: languageSelectStyles.OpenPanel,
|
|
1507
|
-
PanelTitle: languageSelectStyles.PanelTitle,
|
|
1508
|
-
Options: languageSelectStyles.Options,
|
|
1509
|
-
Option: languageSelectStyles.Option,
|
|
1510
|
-
HoverOption: languageSelectStyles.HoverOption,
|
|
1511
|
-
CurrentOption: languageSelectStyles.CurrentOption,
|
|
1512
|
-
Fallback: { $: ".fallback-label", color: "#text-muted" },
|
|
1513
|
-
Checkmark: languageSelectStyles.Checkmark,
|
|
1514
|
-
SelectedCheckmark: languageSelectStyles.SelectedCheckmark,
|
|
1515
|
-
}),
|
|
1516
|
-
);
|
|
1517
|
-
|
|
1518
|
-
useGlobalStyles(
|
|
1519
|
-
"#cookbook__search",
|
|
1520
|
-
resolveComponentStyles("SearchResults", {
|
|
1521
|
-
display: "flex",
|
|
1522
|
-
flow: "column",
|
|
1523
|
-
flexGrow: "1",
|
|
1524
|
-
minBlockSize: "0",
|
|
1525
|
-
"$pagefind-ui-primary": "#accent-text",
|
|
1526
|
-
"$pagefind-ui-text": "#text-soft",
|
|
1527
|
-
"$pagefind-ui-background": "#surface",
|
|
1528
|
-
"$pagefind-ui-border": "#border",
|
|
1529
|
-
"$pagefind-ui-border-width": "$border-width",
|
|
1530
|
-
"$pagefind-ui-tag": "#surface-3",
|
|
1531
|
-
preset: "body",
|
|
1532
|
-
UI: {
|
|
1533
|
-
$: ".pagefind-ui, [data-search-results]",
|
|
1534
|
-
display: "flex",
|
|
1535
|
-
flow: "column",
|
|
1536
|
-
flexGrow: "1",
|
|
1537
|
-
minBlockSize: "0",
|
|
1538
|
-
},
|
|
1539
|
-
Form: {
|
|
1540
|
-
$: ".pagefind-ui__form",
|
|
1541
|
-
position: "relative",
|
|
1542
|
-
display: "flex",
|
|
1543
|
-
flow: "column",
|
|
1544
|
-
flexGrow: "1",
|
|
1545
|
-
minBlockSize: "0",
|
|
1546
|
-
},
|
|
1547
|
-
Field: {
|
|
1548
|
-
$: ".cookbook-search-field",
|
|
1549
|
-
position: "relative",
|
|
1550
|
-
flexShrink: "0",
|
|
1551
|
-
},
|
|
1552
|
-
EngineControls: {
|
|
1553
|
-
$: ".pagefind-ui__search-input, .pagefind-ui__search-clear",
|
|
1554
|
-
display: "none",
|
|
1555
|
-
},
|
|
1556
|
-
Drawer: {
|
|
1557
|
-
$: ".pagefind-ui__drawer",
|
|
1558
|
-
display: "flex",
|
|
1559
|
-
flow: "column",
|
|
1560
|
-
flexGrow: "1",
|
|
1561
|
-
minBlockSize: "0",
|
|
1562
|
-
},
|
|
1563
|
-
Input: {
|
|
1564
|
-
$: ".cookbook-search-input",
|
|
1565
|
-
flexShrink: "0",
|
|
1566
|
-
inlineSize: "100%",
|
|
1567
|
-
minBlockSize: "3rem",
|
|
1568
|
-
paddingInlineStart: "2.75rem",
|
|
1569
|
-
paddingInlineEnd: "2.75rem",
|
|
1570
|
-
color: "#text",
|
|
1571
|
-
border: true,
|
|
1572
|
-
radius: "$radius",
|
|
1573
|
-
fill: "#surface",
|
|
1574
|
-
borderColor: "#border",
|
|
1575
|
-
boxShadow: "none",
|
|
1576
|
-
},
|
|
1577
|
-
Clear: {
|
|
1578
|
-
$: ".cookbook-search-clear",
|
|
1579
|
-
position: "absolute",
|
|
1580
|
-
insetBlockStart: "0",
|
|
1581
|
-
insetInlineEnd: "0",
|
|
1582
|
-
inlineSize: "3rem",
|
|
1583
|
-
blockSize: "3rem",
|
|
1584
|
-
padding: "0",
|
|
1585
|
-
color: "#text-soft",
|
|
1586
|
-
border: "0",
|
|
1587
|
-
fill: "#clear",
|
|
1588
|
-
display: "flex",
|
|
1589
|
-
alignItems: "center",
|
|
1590
|
-
justifyContent: "center",
|
|
1591
|
-
fontSize: "0",
|
|
1592
|
-
cursor: "pointer",
|
|
1593
|
-
},
|
|
1594
|
-
Results: {
|
|
1595
|
-
$: ".pagefind-ui__results-area",
|
|
1596
|
-
flexGrow: "1",
|
|
1597
|
-
minBlockSize: "0",
|
|
1598
|
-
overflowY: "auto",
|
|
1599
|
-
marginBlockStart: { "": "($gap * 3)", "@mobile": "($gap * 2)" },
|
|
1600
|
-
borderBlockStart: "$border-width solid #border",
|
|
1601
|
-
inlineSize: { "@mobile": "(100% + ($gap * 4))" },
|
|
1602
|
-
inlineMargin: { "@mobile": "(-1 * $gap * 2)" },
|
|
1603
|
-
inlinePadding: { "@mobile": "($gap * 2)" },
|
|
1604
|
-
paddingBlockEnd: { "@mobile": "($gap * 2)" },
|
|
1605
|
-
},
|
|
1606
|
-
Result: {
|
|
1607
|
-
$: ".pagefind-ui__result",
|
|
1608
|
-
paddingBlockStart: "($gap * 2)",
|
|
1609
|
-
paddingBlockEnd: "($gap * 2)",
|
|
1610
|
-
borderBlockStart: "$border-width solid #border",
|
|
1611
|
-
},
|
|
1612
|
-
ResultLink: {
|
|
1613
|
-
$: ".pagefind-ui__result-link",
|
|
1614
|
-
color: "#text",
|
|
1615
|
-
preset: "strong",
|
|
1616
|
-
},
|
|
1617
|
-
Message: {
|
|
1618
|
-
$: ".pagefind-ui__message",
|
|
1619
|
-
color: "#text-soft",
|
|
1620
|
-
preset: "small",
|
|
1621
|
-
},
|
|
1622
|
-
List: {
|
|
1623
|
-
$: ".pagefind-ui__results",
|
|
1624
|
-
margin: "0",
|
|
1625
|
-
padding: "0",
|
|
1626
|
-
listStyle: "none",
|
|
1627
|
-
},
|
|
1628
|
-
Title: {
|
|
1629
|
-
$: ".pagefind-ui__result-title",
|
|
1630
|
-
margin: "0",
|
|
1631
|
-
preset: "body / strong",
|
|
1632
|
-
},
|
|
1633
|
-
Excerpt: {
|
|
1634
|
-
$: ".pagefind-ui__result-excerpt",
|
|
1635
|
-
margin: "$gap 0 0",
|
|
1636
|
-
color: "#text-soft",
|
|
1637
|
-
preset: "small",
|
|
1638
|
-
},
|
|
1639
|
-
NestedResult: {
|
|
1640
|
-
$: ".pagefind-ui__result-nested",
|
|
1641
|
-
margin: "2x 0 0",
|
|
1642
|
-
inlinePadding: "2x start",
|
|
1643
|
-
inlineBorder: "1bw solid #border start",
|
|
1644
|
-
},
|
|
1645
|
-
Match: {
|
|
1646
|
-
$: "mark",
|
|
1647
|
-
color: "#accent-surface-text",
|
|
1648
|
-
fill: "#accent-surface",
|
|
1649
|
-
preset: "strong",
|
|
1650
|
-
radius: "0.2em",
|
|
1651
|
-
},
|
|
1652
|
-
More: {
|
|
1653
|
-
$: ".pagefind-ui__button",
|
|
1654
|
-
display: { "@mobile": "block" },
|
|
1655
|
-
inlineSize: { "@mobile": "max-content" },
|
|
1656
|
-
marginInlineStart: { "@mobile": "auto" },
|
|
1657
|
-
padding: "1x 2x",
|
|
1658
|
-
border: true,
|
|
1659
|
-
radius: "$radius",
|
|
1660
|
-
color: "#text",
|
|
1661
|
-
fill: "#surface-2",
|
|
1662
|
-
preset: "navigation",
|
|
1663
|
-
},
|
|
1664
|
-
HoverMore: { $: ".pagefind-ui__button:hover", fill: "#surface-2-hover" },
|
|
1665
|
-
SearchIcon: {
|
|
1666
|
-
$: ".cookbook-search-field::before",
|
|
1667
|
-
content: '""',
|
|
1668
|
-
position: "absolute",
|
|
1669
|
-
zIndex: "1",
|
|
1670
|
-
insetBlockStart: "1rem",
|
|
1671
|
-
insetInlineStart: "1rem",
|
|
1672
|
-
display: "block",
|
|
1673
|
-
inlineSize: "1rem",
|
|
1674
|
-
blockSize: "1rem",
|
|
1675
|
-
fill: "#text-soft",
|
|
1676
|
-
mask: `url("${svgIconUrl(searchIcon)}") center / contain no-repeat`,
|
|
1677
|
-
pointerEvents: "none",
|
|
1678
|
-
},
|
|
1679
|
-
ClearIcon: {
|
|
1680
|
-
$: ".cookbook-search-clear::before",
|
|
1681
|
-
content: '""',
|
|
1682
|
-
display: "block",
|
|
1683
|
-
inlineSize: "1rem",
|
|
1684
|
-
blockSize: "1rem",
|
|
1685
|
-
fill: "#current",
|
|
1686
|
-
mask: `url("${svgIconUrl(closeIcon)}") center / 1rem no-repeat`,
|
|
1687
|
-
},
|
|
1688
|
-
SuppressedClear: {
|
|
1689
|
-
$: ".cookbook-search-clear[hidden]",
|
|
1690
|
-
display: "none",
|
|
1691
|
-
},
|
|
1692
|
-
}),
|
|
1693
|
-
);
|
|
1694
|
-
|
|
1695
|
-
useGlobalStyles(
|
|
1696
|
-
".cookbook-menu-button",
|
|
1697
|
-
resolveComponentStyles("MobileMenuToggle", {
|
|
1698
|
-
display: { "": "none", "@mobile": "flex" },
|
|
1699
|
-
alignItems: "center",
|
|
1700
|
-
gap: "$gap",
|
|
1701
|
-
inlineSize: "(100% + ($docs-nav-pad-x * 2))",
|
|
1702
|
-
inlineMargin: "(-1 * $docs-nav-pad-x)",
|
|
1703
|
-
blockSize: "3rem",
|
|
1704
|
-
minBlockSize: "0",
|
|
1705
|
-
flexShrink: "0",
|
|
1706
|
-
padding: "0 $docs-nav-pad-x",
|
|
1707
|
-
border: "0",
|
|
1708
|
-
blockBorder: "$border-width solid #border start",
|
|
1709
|
-
radius: "0",
|
|
1710
|
-
color: "#text-soft",
|
|
1711
|
-
fill: "#clear",
|
|
1712
|
-
preset: "navigation",
|
|
1713
|
-
textAlign: "start",
|
|
1714
|
-
Control: { $: "&.td-menu-button", cursor: "pointer" },
|
|
1715
|
-
Icon: {
|
|
1716
|
-
$: "> svg",
|
|
1717
|
-
flexShrink: "0",
|
|
1718
|
-
inlineSize: "1.125rem",
|
|
1719
|
-
blockSize: "1.125rem",
|
|
1720
|
-
},
|
|
1721
|
-
Section: {
|
|
1722
|
-
$: ".td-menu-button__section",
|
|
1723
|
-
overflow: "hidden",
|
|
1724
|
-
textOverflow: "ellipsis",
|
|
1725
|
-
whiteSpace: "nowrap",
|
|
1726
|
-
inlineSize: "max 40%",
|
|
1727
|
-
},
|
|
1728
|
-
Page: {
|
|
1729
|
-
$: ".td-menu-button__page",
|
|
1730
|
-
overflow: "hidden",
|
|
1731
|
-
textOverflow: "ellipsis",
|
|
1732
|
-
whiteSpace: "nowrap",
|
|
1733
|
-
color: "#text",
|
|
1734
|
-
preset: "navigation / strong",
|
|
1735
|
-
},
|
|
1736
|
-
HoverControl: { $: "&:hover", color: "#text" },
|
|
1737
|
-
ActiveControl: { $: "&:active", color: "#accent-text" },
|
|
1738
|
-
}),
|
|
1739
|
-
);
|
|
1740
|
-
|
|
1741
|
-
useGlobalStyles(
|
|
1742
|
-
".cookbook-markdown-content:where(*)",
|
|
1743
|
-
resolveComponentStyles("MarkdownTable", {
|
|
1744
|
-
Table: {
|
|
1745
|
-
$: "table",
|
|
1746
|
-
inlineSize: "100%",
|
|
1747
|
-
borderCollapse: "separate",
|
|
1748
|
-
borderSpacing: "0",
|
|
1749
|
-
color: "#text-soft",
|
|
1750
|
-
preset: "small",
|
|
1751
|
-
border: true,
|
|
1752
|
-
borderColor: "#border",
|
|
1753
|
-
radius: "$card-radius",
|
|
1754
|
-
},
|
|
1755
|
-
Cell: {
|
|
1756
|
-
$: "th, td",
|
|
1757
|
-
padding: "($gap * 1.5) ($gap * 2)",
|
|
1758
|
-
verticalAlign: "top",
|
|
1759
|
-
borderColor: "#border",
|
|
1760
|
-
},
|
|
1761
|
-
LastBodyRowCell: {
|
|
1762
|
-
$: "tbody td",
|
|
1763
|
-
borderBlockEnd: {
|
|
1764
|
-
"@own(:is(tbody tr:last-child > td))": "0",
|
|
1765
|
-
},
|
|
1766
|
-
},
|
|
1767
|
-
HeaderCell: {
|
|
1768
|
-
$: "th",
|
|
1769
|
-
color: "#text",
|
|
1770
|
-
fill: "#surface-2",
|
|
1771
|
-
textAlign: "start",
|
|
1772
|
-
radius: {
|
|
1773
|
-
"@own(:is(thead:first-child tr:first-child > th) & :first-child & !:last-child)":
|
|
1774
|
-
"($card-radius - $border-width) top-left",
|
|
1775
|
-
"@own(:is(thead:first-child tr:first-child > th) & !:first-child & :last-child)":
|
|
1776
|
-
"($card-radius - $border-width) top-right",
|
|
1777
|
-
"@own(:is(thead:first-child tr:first-child > th) & :first-child & :last-child)":
|
|
1778
|
-
"($card-radius - $border-width) top",
|
|
1779
|
-
},
|
|
1780
|
-
},
|
|
1781
|
-
Scroll: {
|
|
1782
|
-
$: ".td-table-scroll",
|
|
1783
|
-
inlineSize: "100%",
|
|
1784
|
-
maxInlineSize: "100%",
|
|
1785
|
-
overflow: "auto",
|
|
1786
|
-
scrollbarWidth: "thin",
|
|
1787
|
-
},
|
|
1788
|
-
}),
|
|
1789
|
-
);
|
|
1790
|
-
|
|
1791
|
-
return null;
|
|
1792
|
-
}
|