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