@tenphi/renderer 0.22.1 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/client-navigation.d.ts +1 -0
- package/dist/client/client-navigation.js +32 -0
- package/dist/client/client-navigation.js.map +1 -0
- package/dist/client/code-copy.js +3 -3
- package/dist/client/code-copy.js.map +1 -1
- package/dist/client/heading-links.js +4 -4
- package/dist/client/heading-links.js.map +1 -1
- package/dist/client/navigation-router.d.ts +2 -0
- package/dist/client/navigation-router.js +36 -0
- package/dist/client/navigation-router.js.map +1 -0
- package/dist/client/navigation.js +3 -3
- package/dist/client/navigation.js.map +1 -1
- package/dist/client/search.d.ts.map +1 -1
- package/dist/client/search.js +16 -2
- package/dist/client/search.js.map +1 -1
- package/dist/client/table-of-contents.js +2 -2
- package/dist/client/table-of-contents.js.map +1 -1
- package/dist/components/AppearanceInit.astro +6 -0
- package/dist/components/Card.styles.js +1 -0
- package/dist/components/CodeGroup.astro +8 -1
- package/dist/components/CodeGroup.styles.js +1 -2
- package/dist/components/Document.styles.js +54 -25
- package/dist/components/EditLink.astro +1 -1
- package/dist/components/Header.styles.js +13 -13
- package/dist/components/HeaderLinks.astro +4 -8
- package/dist/components/HeaderLinks.styles.js +17 -17
- package/dist/components/Hero.styles.js +28 -30
- package/dist/components/Icon.astro +3 -3
- package/dist/components/LanguageSelect.styles.js +8 -8
- package/dist/components/MainContent.styles.js +3 -3
- package/dist/components/MainPane.styles.js +1 -1
- package/dist/components/MarkdownAlert.styles.js +16 -17
- package/dist/components/MarkdownCodeBlock.styles.js +31 -19
- package/dist/components/MarkdownContent.styles.js +47 -89
- package/dist/components/MarkdownHeading.styles.js +23 -24
- package/dist/components/MarkdownInlineCode.styles.js +1 -1
- package/dist/components/MarkdownTable.styles.js +5 -5
- package/dist/components/Mermaid.styles.js +4 -1
- package/dist/components/MermaidSource.styles.js +1 -1
- package/dist/components/MobileMenuFooter.styles.js +1 -1
- package/dist/components/MobileMenuToggle.styles.js +3 -3
- package/dist/components/MobileNavigationTabs.astro +3 -2
- package/dist/components/MobileNavigationTabs.styles.js +3 -3
- package/dist/components/MobileTableOfContents.styles.js +2 -2
- package/dist/components/PackageVersion.styles.js +1 -1
- package/dist/components/PageFrame.styles.js +6 -6
- package/dist/components/Pagination.astro +2 -2
- package/dist/components/Pagination.styles.js +10 -10
- package/dist/components/Preview.astro +3 -4
- package/dist/components/Preview.styles.js +2 -2
- package/dist/components/Search.styles.js +13 -13
- package/dist/components/SearchButton.styles.js +10 -10
- package/dist/components/SearchResults.styles.js +21 -31
- package/dist/components/SelectPopover.astro +18 -9
- package/dist/components/Sidebar.styles.js +58 -49
- package/dist/components/SidebarList.astro +9 -6
- package/dist/components/SiteLogo.astro +2 -2
- package/dist/components/SiteLogo.styles.js +4 -4
- package/dist/components/SyntaxHighlight.styles.js +69 -48
- package/dist/components/TableOfContents.styles.js +1 -1
- package/dist/components/TableOfContentsLayout.styles.js +7 -7
- package/dist/components/ThemeSelect.styles.js +12 -12
- package/dist/components/TopNavigation.styles.js +1 -1
- package/dist/components/VersionSwitcher.styles.js +1 -1
- package/dist/components/appearance-bootstrap.js +21 -0
- package/dist/components/select-popover-styles.js +14 -14
- package/dist/components/tasty-states.js +10 -9
- package/dist/eslint-plugin.js +6 -9
- package/dist/eslint-plugin.js.map +1 -1
- package/dist/index.js +14 -11
- package/dist/index.js.map +1 -1
- package/dist/markdown/rendered-content.js +2 -2
- package/dist/markdown/rendered-content.js.map +1 -1
- package/dist/overrides/Header.astro +8 -12
- package/dist/overrides/Hero.astro +11 -6
- package/dist/overrides/MobileMenuFooter.astro +1 -1
- package/dist/overrides/MobileMenuToggle.astro +6 -5
- package/dist/overrides/PageFrame.astro +4 -3
- package/dist/overrides/Search.astro +22 -15
- package/dist/overrides/Sidebar.astro +2 -3
- package/dist/overrides/ThemeSelect.astro +2 -2
- package/dist/routes/Page.astro +17 -9
- package/dist/styling.js +1 -1
- package/dist/{tasty-states-_JhxFdK1.js → tasty-states-BIgiJQ3N.js} +7 -10
- package/dist/tasty-states-BIgiJQ3N.js.map +1 -0
- package/dist/theme/shiki-theme.d.ts.map +1 -1
- package/dist/theme/shiki-theme.js +37 -19
- package/dist/theme/shiki-theme.js.map +1 -1
- package/package.json +3 -3
- package/dist/tasty-states-_JhxFdK1.js.map +0 -1
|
@@ -15,134 +15,100 @@ import { configureCookbookStates } from "./tasty-states.js";
|
|
|
15
15
|
configureCookbookStates();
|
|
16
16
|
|
|
17
17
|
export default function MarkdownStyles() {
|
|
18
|
-
//
|
|
18
|
+
// Prose must outrank component roots (two generated class selectors) so it
|
|
19
|
+
// owns block spacing without targeting the containing element in a $ selector.
|
|
19
20
|
useGlobalStyles(
|
|
20
|
-
".cookbook-markdown-content.cookbook-markdown-content",
|
|
21
|
+
".cookbook-markdown-content.cookbook-markdown-content.cookbook-markdown-content",
|
|
21
22
|
resolveComponentStyles("Markdown", {
|
|
22
23
|
preset: "prose",
|
|
23
24
|
Block: {
|
|
24
25
|
$: ":where(p), :where(ul), :where(ol), :where(dl), :where(blockquote), :where(pre), :where(table), :where(hr), :where(details)",
|
|
25
|
-
"$margin-block-start": { "": null, "@
|
|
26
|
-
"$margin-block-end": { "": null, "@
|
|
26
|
+
"$margin-block-start": { "": null, "@prose": "0" },
|
|
27
|
+
"$margin-block-end": { "": null, "@prose": "0" },
|
|
27
28
|
blockMargin: {
|
|
28
29
|
"": null,
|
|
29
|
-
"@
|
|
30
|
+
"@prose": "$margin-block-start $margin-block-end",
|
|
30
31
|
},
|
|
31
32
|
},
|
|
32
33
|
// Linked Cards are block content even though their root is an anchor.
|
|
33
34
|
BlockSpacing: {
|
|
34
35
|
// Prose spacing must win over each block component's root margin.
|
|
35
|
-
$: "
|
|
36
|
+
$: "* + *",
|
|
36
37
|
blockMargin: {
|
|
37
38
|
"": null,
|
|
38
|
-
"
|
|
39
|
-
"$margin-block-start $margin-block-end",
|
|
40
|
-
},
|
|
41
|
-
"$margin-block-start": {
|
|
42
|
-
"": null,
|
|
43
|
-
"(@own(:is(:not(a,strong,em,del,span,input,code,br) + *)) | @own(:is(a.td-card + *))) & (@own(!:is(a,strong,em,del,span,input,code,br,li,dt,dd,.not-content *)) | @own(:is(a.td-card)))":
|
|
44
|
-
"($gap * 3)",
|
|
39
|
+
"@prose-block": "$margin-block-start $margin-block-end",
|
|
45
40
|
},
|
|
41
|
+
"$margin-block-start": { "": null, "@prose-block": "($gap * 3)" },
|
|
46
42
|
},
|
|
47
43
|
HeadingSpacing: {
|
|
48
|
-
$: "* + h1, * + h2, * + h3, * + h4, * + h5, * + h6, * +
|
|
49
|
-
"$margin-block-start": {
|
|
50
|
-
|
|
51
|
-
"@own(:is(:not(h1,h2,h3,h4,h5,h6,.cookbook-heading-wrapper) + *)) & @own(!:is(.not-content *))":
|
|
52
|
-
"1.5em",
|
|
53
|
-
},
|
|
54
|
-
"$margin-block-end": {
|
|
55
|
-
"": null,
|
|
56
|
-
"@own(:is(:not(h1,h2,h3,h4,h5,h6,.cookbook-heading-wrapper) + *)) & @own(!:is(.not-content *))":
|
|
57
|
-
"0",
|
|
58
|
-
},
|
|
44
|
+
$: "* + h1, * + h2, * + h3, * + h4, * + h5, * + h6, * + [data-element=MarkdownHeading]",
|
|
45
|
+
"$margin-block-start": { "": null, "@prose-heading": "1.5em" },
|
|
46
|
+
"$margin-block-end": { "": null, "@prose-heading": "0" },
|
|
59
47
|
blockMargin: {
|
|
60
48
|
"": null,
|
|
61
|
-
"@
|
|
62
|
-
"$margin-block-start $margin-block-end",
|
|
49
|
+
"@prose-heading": "$margin-block-start $margin-block-end",
|
|
63
50
|
},
|
|
64
51
|
},
|
|
65
52
|
List: {
|
|
66
53
|
$: ":where(ul), :where(ol)",
|
|
67
|
-
inlinePadding: {
|
|
68
|
-
"": null,
|
|
69
|
-
"@own(!:is(.not-content *))": "1.5rem start",
|
|
70
|
-
},
|
|
54
|
+
inlinePadding: { "": null, "@prose": "1.5rem start" },
|
|
71
55
|
},
|
|
72
56
|
CompactItem: {
|
|
73
57
|
$: ":where(li + li), :where(dt + dt), :where(dt + dd), :where(dd + dd)",
|
|
74
|
-
"$margin-block-start": {
|
|
75
|
-
|
|
76
|
-
"@own(!:is(.not-content *))": "($gap * 0.5)",
|
|
77
|
-
},
|
|
78
|
-
"$margin-block-end": { "": null, "@own(!:is(.not-content *))": "0" },
|
|
58
|
+
"$margin-block-start": { "": null, "@prose": "($gap * 0.5)" },
|
|
59
|
+
"$margin-block-end": { "": null, "@prose": "0" },
|
|
79
60
|
blockMargin: {
|
|
80
61
|
"": null,
|
|
81
|
-
"@
|
|
62
|
+
"@prose": "$margin-block-start $margin-block-end",
|
|
82
63
|
},
|
|
83
64
|
},
|
|
84
65
|
ListItem: {
|
|
85
66
|
$: "li",
|
|
86
|
-
overflowWrap: { "": null, "@
|
|
67
|
+
overflowWrap: { "": null, "@prose": "anywhere" },
|
|
87
68
|
},
|
|
88
69
|
DefinitionTerm: {
|
|
89
70
|
$: "dt",
|
|
90
|
-
preset: { "": null, "@
|
|
71
|
+
preset: { "": null, "@prose": "strong" },
|
|
91
72
|
},
|
|
92
73
|
DefinitionDescription: {
|
|
93
74
|
$: "dd",
|
|
94
|
-
inlinePadding: {
|
|
95
|
-
"": null,
|
|
96
|
-
"@own(!:is(.not-content *))": "($gap * 2) start",
|
|
97
|
-
},
|
|
75
|
+
inlinePadding: { "": null, "@prose": "($gap * 2) start" },
|
|
98
76
|
},
|
|
99
77
|
Link: {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
"@own(!:is(.not-content *))": "0.15em",
|
|
105
|
-
},
|
|
78
|
+
// Keep ordinary prose links at their former weight so heading controls own color.
|
|
79
|
+
$: ":where(a)",
|
|
80
|
+
color: { "": null, "@prose": "#accent-text" },
|
|
81
|
+
textUnderlineOffset: { "": null, "@prose": "0.15em" },
|
|
106
82
|
},
|
|
107
83
|
HoverLink: {
|
|
108
|
-
$: "a",
|
|
84
|
+
$: ":where(a)",
|
|
109
85
|
color: {
|
|
110
86
|
"": null,
|
|
111
|
-
"@own(:hover) & @
|
|
87
|
+
"@own(:hover) & @prose": "#text",
|
|
112
88
|
},
|
|
113
89
|
},
|
|
114
90
|
Quote: {
|
|
115
91
|
$: "blockquote",
|
|
116
|
-
inlinePadding: { "": null, "@
|
|
117
|
-
color: { "": null, "@
|
|
118
|
-
inlineBorder: {
|
|
119
|
-
"": null,
|
|
120
|
-
"@own(!:is(.not-content *))": "1bw solid #border start",
|
|
121
|
-
},
|
|
92
|
+
inlinePadding: { "": null, "@prose": "2x start" },
|
|
93
|
+
color: { "": null, "@prose": "#text-soft" },
|
|
94
|
+
inlineBorder: { "": null, "@prose": "1bw solid #border start" },
|
|
122
95
|
},
|
|
123
96
|
Rule: {
|
|
124
97
|
$: "hr",
|
|
125
|
-
border: { "": null, "@
|
|
126
|
-
blockBorder: {
|
|
127
|
-
"": null,
|
|
128
|
-
"@own(!:is(.not-content *))": "$border-width solid #border end",
|
|
129
|
-
},
|
|
98
|
+
border: { "": null, "@prose": "0" },
|
|
99
|
+
blockBorder: { "": null, "@prose": "$border-width solid #border end" },
|
|
130
100
|
},
|
|
131
101
|
Details: {
|
|
132
102
|
$: "details",
|
|
133
103
|
"$details-border-width": "2px",
|
|
134
|
-
inlinePadding: {
|
|
135
|
-
"": null,
|
|
136
|
-
"@own(!:is(.not-content *))": "($gap * 2) start",
|
|
137
|
-
},
|
|
104
|
+
inlinePadding: { "": null, "@prose": "($gap * 2) start" },
|
|
138
105
|
inlineBorder: {
|
|
139
106
|
"": null,
|
|
140
|
-
"@
|
|
141
|
-
"$details-border-width solid #border start",
|
|
107
|
+
"@prose": "$details-border-width solid #border start",
|
|
142
108
|
},
|
|
143
109
|
// Change only color; border widths and styles belong to other rules or theme overrides.
|
|
144
110
|
// eslint-disable-next-line tasty/prefer-shorthand-property
|
|
145
|
-
borderColor: { "": null, "@
|
|
111
|
+
borderColor: { "": null, "@prose": "#border" },
|
|
146
112
|
},
|
|
147
113
|
HoverDetails: {
|
|
148
114
|
$: "details",
|
|
@@ -150,52 +116,44 @@ export default function MarkdownStyles() {
|
|
|
150
116
|
// eslint-disable-next-line tasty/prefer-shorthand-property
|
|
151
117
|
borderColor: {
|
|
152
118
|
"": null,
|
|
153
|
-
"(@own(![open] & :hover) | @own(:has(> summary:hover))) & @
|
|
119
|
+
"(@own(![open] & :hover) | @own(:has(> summary:hover))) & @prose":
|
|
154
120
|
"#accent-text",
|
|
155
121
|
},
|
|
156
122
|
},
|
|
157
123
|
Summary: {
|
|
158
124
|
$: "summary",
|
|
159
|
-
display: { "": "", "@
|
|
160
|
-
inlineMargin: {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
},
|
|
164
|
-
inlinePadding: {
|
|
165
|
-
"": null,
|
|
166
|
-
"@own(!:is(.not-content *))": "0.5rem start",
|
|
167
|
-
},
|
|
168
|
-
color: { "": null, "@own(!:is(.not-content *))": "#text" },
|
|
169
|
-
preset: { "": null, "@own(!:is(.not-content *))": "strong" },
|
|
125
|
+
display: { "": "", "@prose": "block" },
|
|
126
|
+
inlineMargin: { "": null, "@prose": "-0.5rem start" },
|
|
127
|
+
inlinePadding: { "": null, "@prose": "0.5rem start" },
|
|
128
|
+
color: { "": null, "@prose": "#text" },
|
|
129
|
+
preset: { "": null, "@prose": "strong" },
|
|
170
130
|
},
|
|
171
131
|
OpenSummary: {
|
|
172
132
|
$: "details > summary",
|
|
173
133
|
"$margin-block-start": {
|
|
174
134
|
"": null,
|
|
175
|
-
"@own(:is(
|
|
176
|
-
"0",
|
|
135
|
+
"@own(:is([open] >)) & @prose": "0",
|
|
177
136
|
},
|
|
178
137
|
"$margin-block-end": {
|
|
179
138
|
"": null,
|
|
180
|
-
"@own(:is(
|
|
181
|
-
"($gap * 2)",
|
|
139
|
+
"@own(:is([open] >)) & @prose": "($gap * 2)",
|
|
182
140
|
},
|
|
183
141
|
blockMargin: {
|
|
184
142
|
"": null,
|
|
185
|
-
"@own(:is(
|
|
143
|
+
"@own(:is([open] >)) & @prose":
|
|
186
144
|
"$margin-block-start $margin-block-end",
|
|
187
145
|
},
|
|
188
146
|
},
|
|
189
147
|
SummaryMarker: {
|
|
190
148
|
// Tasty 3.9.3 appends @own states after pseudo-elements, producing invalid CSS.
|
|
191
149
|
// eslint-disable-next-line tasty/no-state-in-selector
|
|
192
|
-
$: "summary:not(
|
|
150
|
+
$: "summary:not([data-not-content] *)::marker, summary:not([data-not-content] *)::-webkit-details-marker",
|
|
193
151
|
hide: true,
|
|
194
152
|
},
|
|
195
153
|
SummaryIcon: {
|
|
196
154
|
// Tasty 3.9.3 appends @own states after pseudo-elements, producing invalid CSS.
|
|
197
155
|
// eslint-disable-next-line tasty/no-state-in-selector
|
|
198
|
-
$: "summary:not(
|
|
156
|
+
$: "summary:not([data-not-content] *)::before",
|
|
199
157
|
content: '""',
|
|
200
158
|
display: "inline-block",
|
|
201
159
|
inlineSize: "1.25rem",
|
|
@@ -211,12 +169,12 @@ export default function MarkdownStyles() {
|
|
|
211
169
|
OpenSummaryIcon: {
|
|
212
170
|
// Tasty 3.9.3 appends @own states after pseudo-elements, producing invalid CSS.
|
|
213
171
|
// eslint-disable-next-line tasty/no-state-in-selector
|
|
214
|
-
$: "details[open] > summary:not(
|
|
172
|
+
$: "details[open] > summary:not([data-not-content] *)::before",
|
|
215
173
|
rotate: "90deg",
|
|
216
174
|
},
|
|
217
175
|
Code: {
|
|
218
176
|
$: ":where(code)",
|
|
219
|
-
radius: { "": null, "@
|
|
177
|
+
radius: { "": null, "@prose": "($radius * 0.65)" },
|
|
220
178
|
},
|
|
221
179
|
}),
|
|
222
180
|
);
|
|
@@ -14,12 +14,12 @@ export function MarkdownHeadingStyles() {
|
|
|
14
14
|
color: "#heading",
|
|
15
15
|
preset: {
|
|
16
16
|
"": "heading",
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
17
|
+
"level=h1": "h1",
|
|
18
|
+
"level=h2": "h2",
|
|
19
|
+
"level=h3": "h3",
|
|
20
|
+
"level=h4": "h4",
|
|
21
|
+
"level=h5": "h5",
|
|
22
|
+
"level=h6": "h6",
|
|
23
23
|
},
|
|
24
24
|
Heading: {
|
|
25
25
|
$: "> *",
|
|
@@ -28,28 +28,28 @@ export function MarkdownHeadingStyles() {
|
|
|
28
28
|
inlinePadding: {
|
|
29
29
|
"": null,
|
|
30
30
|
"@own(:first-child)": "0 end",
|
|
31
|
-
"(@own(:first-child)) & (
|
|
31
|
+
"(@own(:first-child)) & (!@md)": "1.75rem end",
|
|
32
32
|
},
|
|
33
33
|
},
|
|
34
34
|
Link: {
|
|
35
|
-
$: ">
|
|
36
|
-
position: { "": "absolute", "
|
|
35
|
+
$: "> [data-element=Anchor]",
|
|
36
|
+
position: { "": "absolute", "!@md": "relative" },
|
|
37
37
|
blockInset: {
|
|
38
38
|
"": "((1lh - 1.75rem) / 2) start",
|
|
39
|
-
"
|
|
39
|
+
"!@md": "auto start",
|
|
40
40
|
},
|
|
41
|
-
inlineInset: { "": "-2rem start", "
|
|
41
|
+
inlineInset: { "": "-2rem start", "!@md": "auto start" },
|
|
42
42
|
display: "inline-grid",
|
|
43
43
|
placeItems: "center",
|
|
44
|
-
inlineSize: { "": "1.75rem", "
|
|
45
|
-
blockSize: { "": "1.75rem", "
|
|
46
|
-
inlineMargin: { "": "0 start", "
|
|
47
|
-
verticalAlign: { "": "baseline", "
|
|
44
|
+
inlineSize: { "": "1.75rem", "!@md": "1.5rem" },
|
|
45
|
+
blockSize: { "": "1.75rem", "!@md": "1.5rem" },
|
|
46
|
+
inlineMargin: { "": "0 start", "!@md": "-1.5rem start" },
|
|
47
|
+
verticalAlign: { "": "baseline", "!@md": "middle" },
|
|
48
48
|
color: "#text-muted",
|
|
49
49
|
opacity: {
|
|
50
50
|
"": "1",
|
|
51
51
|
"@media(hover: hover)": "0",
|
|
52
|
-
"
|
|
52
|
+
"!@md": "1",
|
|
53
53
|
},
|
|
54
54
|
radius: "$radius",
|
|
55
55
|
userSelect: "none",
|
|
@@ -57,14 +57,14 @@ export function MarkdownHeadingStyles() {
|
|
|
57
57
|
transition: "color $transition, fill $transition, opacity $transition",
|
|
58
58
|
},
|
|
59
59
|
RevealedLink: {
|
|
60
|
-
$: ">
|
|
60
|
+
$: "> [data-element=Anchor]",
|
|
61
61
|
opacity: {
|
|
62
62
|
"": null,
|
|
63
63
|
":hover | @own(:focus-visible)": "1",
|
|
64
64
|
},
|
|
65
65
|
},
|
|
66
66
|
HoverLink: {
|
|
67
|
-
$: ">
|
|
67
|
+
$: "> [data-element=Anchor]",
|
|
68
68
|
color: {
|
|
69
69
|
"": null,
|
|
70
70
|
"@own(:hover | :focus-visible)": "#accent-text",
|
|
@@ -75,7 +75,7 @@ export function MarkdownHeadingStyles() {
|
|
|
75
75
|
},
|
|
76
76
|
},
|
|
77
77
|
LinkIcon: {
|
|
78
|
-
$: ">
|
|
78
|
+
$: "> Anchor > [data-element=AnchorIcon]",
|
|
79
79
|
display: "block",
|
|
80
80
|
preset: "inherit / tight",
|
|
81
81
|
// Scale with the current heading without replacing its inherited typography.
|
|
@@ -86,22 +86,21 @@ export function MarkdownHeadingStyles() {
|
|
|
86
86
|
blockSize: "1em",
|
|
87
87
|
},
|
|
88
88
|
CopiedLink: {
|
|
89
|
-
$: ">
|
|
89
|
+
$: "> [data-element=Anchor]",
|
|
90
90
|
color: { "": null, '@own([data-copy-state="copied"])': "#green-text" },
|
|
91
91
|
opacity: { "": null, '@own([data-copy-state="copied"])': "1" },
|
|
92
92
|
},
|
|
93
93
|
CopiedLinkIcon: {
|
|
94
|
-
$: ">
|
|
94
|
+
$: "> Anchor > [data-element=AnchorIcon]",
|
|
95
95
|
visibility: {
|
|
96
96
|
"": null,
|
|
97
|
-
'@own(:is(
|
|
98
|
-
"hidden",
|
|
97
|
+
'@own(:is([data-copy-state="copied"] >))': "hidden",
|
|
99
98
|
},
|
|
100
99
|
},
|
|
101
100
|
CopiedIcon: {
|
|
102
101
|
// Tasty 3.9.3 appends @own states after pseudo-elements, producing invalid CSS.
|
|
103
102
|
// eslint-disable-next-line tasty/no-state-in-selector
|
|
104
|
-
$: '>
|
|
103
|
+
$: '> Anchor[data-copy-state="copied"]::after',
|
|
105
104
|
content: '""',
|
|
106
105
|
position: "absolute",
|
|
107
106
|
inlineSize: "clamp(1rem, 0.65em, 1.5rem)",
|
|
@@ -6,7 +6,7 @@ configureCookbookStates();
|
|
|
6
6
|
|
|
7
7
|
export function MarkdownInlineCodeStyles() {
|
|
8
8
|
useGlobalStyles(
|
|
9
|
-
".cookbook-markdown-content code:not(:where(pre *,
|
|
9
|
+
".cookbook-markdown-content code:not(:where(pre *, [data-not-content] *))",
|
|
10
10
|
resolveComponentStyles("MarkdownInlineCode", {
|
|
11
11
|
padding: "0.125rem 0.375rem",
|
|
12
12
|
color: "#text-soft",
|
|
@@ -30,7 +30,7 @@ export function MarkdownTableStyles() {
|
|
|
30
30
|
$: "tbody td",
|
|
31
31
|
// Clear only the last row's end border; the theme may configure its start border.
|
|
32
32
|
// eslint-disable-next-line tasty/prefer-shorthand-property
|
|
33
|
-
borderBlockEnd: { "@own(:is(
|
|
33
|
+
borderBlockEnd: { "@own(:is(tr:last-child >))": "0" },
|
|
34
34
|
},
|
|
35
35
|
HeaderCell: {
|
|
36
36
|
$: "th",
|
|
@@ -38,16 +38,16 @@ export function MarkdownTableStyles() {
|
|
|
38
38
|
fill: "#surface-2",
|
|
39
39
|
textAlign: "start",
|
|
40
40
|
radius: {
|
|
41
|
-
"@own(:is(thead:first-child tr:first-child >
|
|
41
|
+
"@own(:is(thead:first-child tr:first-child >) & :first-child & !:last-child)":
|
|
42
42
|
"($card-radius - $border-width) top-left",
|
|
43
|
-
"@own(:is(thead:first-child tr:first-child >
|
|
43
|
+
"@own(:is(thead:first-child tr:first-child >) & !:first-child & :last-child)":
|
|
44
44
|
"($card-radius - $border-width) top-right",
|
|
45
|
-
"@own(:is(thead:first-child tr:first-child >
|
|
45
|
+
"@own(:is(thead:first-child tr:first-child >) & :first-child & :last-child)":
|
|
46
46
|
"($card-radius - $border-width) top",
|
|
47
47
|
},
|
|
48
48
|
},
|
|
49
49
|
Scroll: {
|
|
50
|
-
$: "
|
|
50
|
+
$: "Scroll",
|
|
51
51
|
inlineSize: "initial 100% 100%",
|
|
52
52
|
overflow: "auto",
|
|
53
53
|
scrollbar: "thin",
|
|
@@ -43,7 +43,10 @@ export function MermaidStyles() {
|
|
|
43
43
|
margin: "auto",
|
|
44
44
|
},
|
|
45
45
|
Text: { $: "text", font: "$body-font-family" },
|
|
46
|
-
MonoText: {
|
|
46
|
+
MonoText: {
|
|
47
|
+
$: "text",
|
|
48
|
+
font: { "": null, "@own(mono)": "$code-font-family" },
|
|
49
|
+
},
|
|
47
50
|
}),
|
|
48
51
|
);
|
|
49
52
|
return null;
|
|
@@ -6,7 +6,7 @@ configureCookbookStates();
|
|
|
6
6
|
|
|
7
7
|
export function MermaidSourceStyles() {
|
|
8
8
|
useGlobalStyles(
|
|
9
|
-
'.cookbook-markdown-content pre[data-language="mermaid"]:not(
|
|
9
|
+
'.cookbook-markdown-content pre[data-language="mermaid"]:not([data-not-content] *)',
|
|
10
10
|
resolveComponentStyles("MermaidSource", {
|
|
11
11
|
padding: "0.875rem 1rem",
|
|
12
12
|
overflowX: "auto",
|
|
@@ -15,7 +15,7 @@ export const MobileMenuFooterRoot = defineComponent("MobileMenuFooter", {
|
|
|
15
15
|
blockPadding: "$gap",
|
|
16
16
|
blockBorder: "$border-width solid #border start",
|
|
17
17
|
Social: {
|
|
18
|
-
$: "
|
|
18
|
+
$: "Social",
|
|
19
19
|
display: "flex",
|
|
20
20
|
hide: { "": false, ":empty": true },
|
|
21
21
|
alignItems: "center",
|
|
@@ -11,7 +11,7 @@ export const MobileMenuToggleRoot = extendComponent(
|
|
|
11
11
|
"data-element": "MobileMenuToggle",
|
|
12
12
|
styles: {
|
|
13
13
|
color: { ":hover": "#text", ":active": "#accent-text" },
|
|
14
|
-
display: { "": "none", "
|
|
14
|
+
display: { "": "none", "!@md": "flex" },
|
|
15
15
|
inlineSize: "(100% + ($docs-nav-pad-x * 2))",
|
|
16
16
|
inlineMargin: "(-1 * $docs-nav-pad-x)",
|
|
17
17
|
blockSize: "0 3rem initial",
|
|
@@ -30,14 +30,14 @@ export const MobileMenuToggleRoot = extendComponent(
|
|
|
30
30
|
blockSize: "1.125rem",
|
|
31
31
|
},
|
|
32
32
|
Section: {
|
|
33
|
-
$: "
|
|
33
|
+
$: "Section",
|
|
34
34
|
overflow: "hidden",
|
|
35
35
|
textOverflow: "ellipsis",
|
|
36
36
|
whiteSpace: "nowrap",
|
|
37
37
|
inlineSize: "max 40%",
|
|
38
38
|
},
|
|
39
39
|
Page: {
|
|
40
|
-
$: "
|
|
40
|
+
$: "Page",
|
|
41
41
|
overflow: "hidden",
|
|
42
42
|
textOverflow: "ellipsis",
|
|
43
43
|
whiteSpace: "nowrap",
|
|
@@ -43,12 +43,13 @@ const ui = messages(Astro.locals.cookbookRoute?.lang ?? "en", content);
|
|
|
43
43
|
{
|
|
44
44
|
layout.tabs.length > 0 && (
|
|
45
45
|
<MobileNavigationTabsRoot
|
|
46
|
-
className="td-mobile-tabs
|
|
46
|
+
className="td-mobile-tabs"
|
|
47
|
+
data-print-hidden=""
|
|
47
48
|
aria-label={ui.sections}
|
|
48
49
|
>
|
|
49
50
|
<details>
|
|
50
51
|
<summary aria-label={ui.chooseSection}>
|
|
51
|
-
<span
|
|
52
|
+
<span data-element="Label">
|
|
52
53
|
{layout.tabs[activeTab]?.label ?? ui.sections}
|
|
53
54
|
</span>
|
|
54
55
|
<svg viewBox="0 0 16 16" width="16" height="16" aria-hidden="true">
|
|
@@ -10,11 +10,11 @@ export const MobileNavigationTabsRoot = defineComponent(
|
|
|
10
10
|
"data-element": "MobileNavigationTabs",
|
|
11
11
|
styles: {
|
|
12
12
|
display: "grid",
|
|
13
|
-
hide: { "": false, "@
|
|
13
|
+
hide: { "": false, "@md": true },
|
|
14
14
|
gap: "$gap",
|
|
15
15
|
blockMargin: "0",
|
|
16
16
|
Label: {
|
|
17
|
-
$: "
|
|
17
|
+
$: "Label",
|
|
18
18
|
overflow: "hidden",
|
|
19
19
|
textOverflow: "ellipsis",
|
|
20
20
|
whiteSpace: "nowrap",
|
|
@@ -43,7 +43,7 @@ export const MobileNavigationTabsRoot = defineComponent(
|
|
|
43
43
|
$: "details > summary > svg",
|
|
44
44
|
rotate: {
|
|
45
45
|
"": null,
|
|
46
|
-
"@own(:is(
|
|
46
|
+
"@own(:is([open] > summary >))": "180deg",
|
|
47
47
|
},
|
|
48
48
|
},
|
|
49
49
|
List: {
|
|
@@ -10,7 +10,7 @@ export const MobileTableOfContentsRoot = defineComponent(
|
|
|
10
10
|
"data-element": "MobileTableOfContents",
|
|
11
11
|
styles: {
|
|
12
12
|
display: "block",
|
|
13
|
-
hide: { "": true, "
|
|
13
|
+
hide: { "": true, "!@lg": false },
|
|
14
14
|
padding: "$gap $docs-sidebar-pad-x",
|
|
15
15
|
blockBorder: "$border-width solid #border end",
|
|
16
16
|
fill: "#surface",
|
|
@@ -51,7 +51,7 @@ export const MobileTableOfContentsRoot = defineComponent(
|
|
|
51
51
|
$: "a, summary",
|
|
52
52
|
outline: {
|
|
53
53
|
"": null,
|
|
54
|
-
"@own(:
|
|
54
|
+
"@own(:focus-visible)":
|
|
55
55
|
"$outline-width solid #focus / $outline-offset",
|
|
56
56
|
},
|
|
57
57
|
},
|
|
@@ -8,7 +8,7 @@ export const PackageVersionRoot = defineComponent("PackageVersion", {
|
|
|
8
8
|
"data-element": "PackageVersion",
|
|
9
9
|
styles: {
|
|
10
10
|
display: "inline-flex",
|
|
11
|
-
hide: { "": false, "@
|
|
11
|
+
hide: { "": false, "@media(w <= 23rem)": true },
|
|
12
12
|
alignItems: "center",
|
|
13
13
|
flexShrink: "0",
|
|
14
14
|
blockSize: "min 1.5rem",
|
|
@@ -11,23 +11,23 @@ export const PageFrameRoot = defineComponent("PageFrame", {
|
|
|
11
11
|
flow: "column",
|
|
12
12
|
blockSize: "min 100vh",
|
|
13
13
|
MainFrame: {
|
|
14
|
-
$: ">
|
|
15
|
-
inlineSize: { "": "0 100%", "@
|
|
14
|
+
$: "> MainFrame",
|
|
15
|
+
inlineSize: { "": "0 100%", "@md": "min(100%, $layout-width)" },
|
|
16
16
|
inlineMargin: "auto",
|
|
17
17
|
blockPadding: "$docs-nav-height start",
|
|
18
18
|
inlinePadding: "0 start",
|
|
19
19
|
},
|
|
20
20
|
SidebarFrame: {
|
|
21
|
-
$: "& >
|
|
21
|
+
$: "& > [data-element=MainFrame]",
|
|
22
22
|
inlinePadding: {
|
|
23
23
|
"": null,
|
|
24
24
|
"[data-has-sidebar]": "$sidebar-width start",
|
|
25
|
-
"([data-has-sidebar]) & (
|
|
25
|
+
"([data-has-sidebar]) & (!@md)": "0 start",
|
|
26
26
|
},
|
|
27
27
|
},
|
|
28
28
|
Columns: {
|
|
29
|
-
$: ">
|
|
30
|
-
display: { "": "flex", "
|
|
29
|
+
$: "> MainFrame > div",
|
|
30
|
+
display: { "": "flex", "!@lg": "block" },
|
|
31
31
|
inlineSize: "min 0",
|
|
32
32
|
},
|
|
33
33
|
},
|
|
@@ -12,7 +12,7 @@ const { prev, next } = pagination;
|
|
|
12
12
|
<span>
|
|
13
13
|
{Astro.locals.t("page.nextLink")}
|
|
14
14
|
<br />
|
|
15
|
-
<span
|
|
15
|
+
<span data-element="Title">{next.label}</span>
|
|
16
16
|
</span>
|
|
17
17
|
</a>
|
|
18
18
|
)}
|
|
@@ -21,7 +21,7 @@ const { prev, next } = pagination;
|
|
|
21
21
|
<span>
|
|
22
22
|
{Astro.locals.t("page.previousLink")}
|
|
23
23
|
<br />
|
|
24
|
-
<span
|
|
24
|
+
<span data-element="Title">{prev.label}</span>
|
|
25
25
|
</span>
|
|
26
26
|
</a>
|
|
27
27
|
)}
|
|
@@ -12,7 +12,7 @@ export const PaginationRoot = defineComponent("Pagination", {
|
|
|
12
12
|
styles: {
|
|
13
13
|
display: { "": "grid", "@media:print": "none" },
|
|
14
14
|
gap: "($gap * 2)",
|
|
15
|
-
gridColumns: { "": "repeat(2, minmax(0, 1fr))", "
|
|
15
|
+
gridColumns: { "": "repeat(2, minmax(0, 1fr))", "!@sm": "1fr" },
|
|
16
16
|
Link: {
|
|
17
17
|
$: "a",
|
|
18
18
|
radius: "$radius",
|
|
@@ -22,9 +22,7 @@ export const PaginationRoot = defineComponent("Pagination", {
|
|
|
22
22
|
gap: "$gap",
|
|
23
23
|
inlineSize: "100%",
|
|
24
24
|
padding: "($gap * 2)",
|
|
25
|
-
|
|
26
|
-
// eslint-disable-next-line tasty/prefer-shorthand-property
|
|
27
|
-
borderColor: "#border",
|
|
25
|
+
border: "#clear",
|
|
28
26
|
color: "#text-soft",
|
|
29
27
|
fill: "#surface-2",
|
|
30
28
|
shadow: "none",
|
|
@@ -37,12 +35,12 @@ export const PaginationRoot = defineComponent("Pagination", {
|
|
|
37
35
|
gridColumn: {
|
|
38
36
|
"": null,
|
|
39
37
|
'@own([rel="prev"])': "1",
|
|
40
|
-
'(@own([rel="prev"])) & (
|
|
38
|
+
'(@own([rel="prev"])) & (!@sm)': "auto",
|
|
41
39
|
},
|
|
42
40
|
gridRow: {
|
|
43
41
|
"": null,
|
|
44
42
|
'@own([rel="prev"])': "1",
|
|
45
|
-
'(@own([rel="prev"])) & (
|
|
43
|
+
'(@own([rel="prev"])) & (!@sm)': "auto",
|
|
46
44
|
},
|
|
47
45
|
},
|
|
48
46
|
NextLink: {
|
|
@@ -52,12 +50,12 @@ export const PaginationRoot = defineComponent("Pagination", {
|
|
|
52
50
|
gridColumn: {
|
|
53
51
|
"": null,
|
|
54
52
|
'@own([rel="next"])': "2",
|
|
55
|
-
'(@own([rel="next"])) & (
|
|
53
|
+
'(@own([rel="next"])) & (!@sm)': "auto",
|
|
56
54
|
},
|
|
57
55
|
gridRow: {
|
|
58
56
|
"": null,
|
|
59
57
|
'@own([rel="next"])': "1",
|
|
60
|
-
'(@own([rel="next"])) & (
|
|
58
|
+
'(@own([rel="next"])) & (!@sm)': "auto",
|
|
61
59
|
},
|
|
62
60
|
},
|
|
63
61
|
NextIcon: {
|
|
@@ -79,14 +77,16 @@ export const PaginationRoot = defineComponent("Pagination", {
|
|
|
79
77
|
},
|
|
80
78
|
HoverLink: {
|
|
81
79
|
$: "a",
|
|
82
|
-
|
|
80
|
+
// Recolor only; Link owns the border width and style, including theme overrides.
|
|
81
|
+
// eslint-disable-next-line tasty/prefer-shorthand-property
|
|
82
|
+
borderColor: { "": null, "@own(:hover)": "#border" },
|
|
83
83
|
fill: { "": null, "@own(:hover)": "#surface-2-hover" },
|
|
84
84
|
},
|
|
85
85
|
ActiveLink: {
|
|
86
86
|
$: "a",
|
|
87
87
|
fill: { "": null, "@own(:active)": "#surface-2-pressed" },
|
|
88
88
|
},
|
|
89
|
-
Title: { $: "
|
|
89
|
+
Title: { $: "Title", color: "#heading", preset: "h5" },
|
|
90
90
|
LoneNextLink: {
|
|
91
91
|
// Preserve the conditional scope of this empty legacy customization hook.
|
|
92
92
|
// eslint-disable-next-line tasty/no-state-in-selector
|