@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
|
@@ -16,8 +16,8 @@ export const HeaderRoot = defineComponent("Header", {
|
|
|
16
16
|
Primary: {
|
|
17
17
|
display: "flex",
|
|
18
18
|
alignItems: "center",
|
|
19
|
-
gap: { "": "clamp(0.5rem, 1.5vw, 1.5rem)", "
|
|
20
|
-
blockSize: { "": "4.5rem", "
|
|
19
|
+
gap: { "": "clamp(0.5rem, 1.5vw, 1.5rem)", "!@md": "0.5rem" },
|
|
20
|
+
blockSize: { "": "4.5rem", "!@md": "3.5rem" },
|
|
21
21
|
flexShrink: "0",
|
|
22
22
|
},
|
|
23
23
|
Title: {
|
|
@@ -28,7 +28,7 @@ export const HeaderRoot = defineComponent("Header", {
|
|
|
28
28
|
overflow: "hidden",
|
|
29
29
|
flexShrink: "1",
|
|
30
30
|
inlineSize: "min 0",
|
|
31
|
-
inlineMargin: { "": "0 end", "
|
|
31
|
+
inlineMargin: { "": "0 end", "!@md": "auto end" },
|
|
32
32
|
},
|
|
33
33
|
LogoLink: {
|
|
34
34
|
display: "inline-grid",
|
|
@@ -38,14 +38,14 @@ export const HeaderRoot = defineComponent("Header", {
|
|
|
38
38
|
textDecoration: "none",
|
|
39
39
|
},
|
|
40
40
|
Logo: {
|
|
41
|
-
inlineSize: { "": "2rem", "
|
|
42
|
-
blockSize: { "": "2rem", "
|
|
41
|
+
inlineSize: { "": "2rem", "!@md": "1.75rem" },
|
|
42
|
+
blockSize: { "": "2rem", "!@md": "1.75rem" },
|
|
43
43
|
},
|
|
44
44
|
SiteTitle: {
|
|
45
45
|
inlineSize: "min 0",
|
|
46
46
|
overflow: "hidden",
|
|
47
47
|
color: "#text",
|
|
48
|
-
preset: { "": "h4", "
|
|
48
|
+
preset: { "": "h4", "!@md": "h5" },
|
|
49
49
|
textDecoration: "none",
|
|
50
50
|
whiteSpace: "nowrap",
|
|
51
51
|
textOverflow: "ellipsis",
|
|
@@ -54,10 +54,10 @@ export const HeaderRoot = defineComponent("Header", {
|
|
|
54
54
|
$: "Primary > Search",
|
|
55
55
|
display: "flex",
|
|
56
56
|
alignItems: "center",
|
|
57
|
-
flexGrow: { "": "1", "
|
|
58
|
-
flexShrink: { "": "1", "
|
|
59
|
-
inlineSize: { "": "min 0", "
|
|
60
|
-
inlineMargin: { "": "auto", "
|
|
57
|
+
flexGrow: { "": "1", "!@md": "0" },
|
|
58
|
+
flexShrink: { "": "1", "!@md": "0" },
|
|
59
|
+
inlineSize: { "": "min 0", "!@md": "$docs-menu-button-size" },
|
|
60
|
+
inlineMargin: { "": "auto", "!@md": "0" },
|
|
61
61
|
},
|
|
62
62
|
SearchElement: {
|
|
63
63
|
$: "Search site-search",
|
|
@@ -66,7 +66,7 @@ export const HeaderRoot = defineComponent("Header", {
|
|
|
66
66
|
},
|
|
67
67
|
Tools: {
|
|
68
68
|
display: "flex",
|
|
69
|
-
hide: { "": false, "
|
|
69
|
+
hide: { "": false, "!@md": true },
|
|
70
70
|
flow: "row",
|
|
71
71
|
alignItems: "center",
|
|
72
72
|
justifyContent: "flex-end",
|
|
@@ -78,7 +78,7 @@ export const HeaderRoot = defineComponent("Header", {
|
|
|
78
78
|
},
|
|
79
79
|
MobileTheme: {
|
|
80
80
|
display: "grid",
|
|
81
|
-
hide: { "": true, "
|
|
81
|
+
hide: { "": true, "!@md": false },
|
|
82
82
|
flexShrink: "0",
|
|
83
83
|
order: "1",
|
|
84
84
|
inlineSize: "$docs-menu-button-size",
|
|
@@ -86,7 +86,7 @@ export const HeaderRoot = defineComponent("Header", {
|
|
|
86
86
|
},
|
|
87
87
|
MobileLanguage: {
|
|
88
88
|
display: "grid",
|
|
89
|
-
hide: { "": true, "
|
|
89
|
+
hide: { "": true, "!@md": false },
|
|
90
90
|
flexShrink: "0",
|
|
91
91
|
order: "1",
|
|
92
92
|
inlineSize: "$docs-menu-button-size",
|
|
@@ -23,7 +23,7 @@ const ui = messages(Astro.locals.cookbookRoute?.lang ?? "en", content);
|
|
|
23
23
|
{
|
|
24
24
|
links.length > 0 && (
|
|
25
25
|
<HeaderLinksRoot>
|
|
26
|
-
<nav
|
|
26
|
+
<nav data-element="Desktop" aria-label={ui.headerLinks}>
|
|
27
27
|
{links.map((link) => (
|
|
28
28
|
<a
|
|
29
29
|
href={href(link.link)}
|
|
@@ -37,7 +37,7 @@ const ui = messages(Astro.locals.cookbookRoute?.lang ?? "en", content);
|
|
|
37
37
|
</nav>
|
|
38
38
|
<button
|
|
39
39
|
type="button"
|
|
40
|
-
|
|
40
|
+
data-element="Trigger"
|
|
41
41
|
popovertarget="cookbook-header-links"
|
|
42
42
|
aria-label={ui.more}
|
|
43
43
|
title={ui.more}
|
|
@@ -56,14 +56,10 @@ const ui = messages(Astro.locals.cookbookRoute?.lang ?? "en", content);
|
|
|
56
56
|
</>
|
|
57
57
|
</svg>
|
|
58
58
|
</button>
|
|
59
|
-
<div
|
|
60
|
-
id="cookbook-header-links"
|
|
61
|
-
popover="auto"
|
|
62
|
-
class="td-header-links__panel"
|
|
63
|
-
>
|
|
59
|
+
<div id="cookbook-header-links" popover="auto" data-element="Panel">
|
|
64
60
|
<button
|
|
65
61
|
type="button"
|
|
66
|
-
|
|
62
|
+
data-element="Close"
|
|
67
63
|
popovertarget="cookbook-header-links"
|
|
68
64
|
popovertargetaction="hide"
|
|
69
65
|
aria-label={ui.closeMore}
|
|
@@ -9,12 +9,12 @@ export const HeaderLinksRoot = defineComponent("HeaderLinks", {
|
|
|
9
9
|
styles: {
|
|
10
10
|
display: "flex",
|
|
11
11
|
flexShrink: "0",
|
|
12
|
-
order: { "": "0", "
|
|
12
|
+
order: { "": "0", "!@md": "2" },
|
|
13
13
|
"$popover-transition": "120ms",
|
|
14
14
|
Desktop: {
|
|
15
|
-
$: "
|
|
15
|
+
$: "Desktop",
|
|
16
16
|
display: "flex",
|
|
17
|
-
hide: { "": false, "
|
|
17
|
+
hide: { "": false, "!@md": true },
|
|
18
18
|
alignItems: "center",
|
|
19
19
|
gap: "($gap * 0.5)",
|
|
20
20
|
},
|
|
@@ -33,7 +33,7 @@ export const HeaderLinksRoot = defineComponent("HeaderLinks", {
|
|
|
33
33
|
whiteSpace: "nowrap",
|
|
34
34
|
},
|
|
35
35
|
DesktopLink: {
|
|
36
|
-
$: "
|
|
36
|
+
$: "Desktop a",
|
|
37
37
|
radius: "$header-control-radius",
|
|
38
38
|
inlinePadding: "($gap * 2)",
|
|
39
39
|
},
|
|
@@ -58,9 +58,9 @@ export const HeaderLinksRoot = defineComponent("HeaderLinks", {
|
|
|
58
58
|
},
|
|
59
59
|
},
|
|
60
60
|
Trigger: {
|
|
61
|
-
$: "
|
|
61
|
+
$: "Trigger",
|
|
62
62
|
display: "grid",
|
|
63
|
-
hide: { "": true, "
|
|
63
|
+
hide: { "": true, "!@md": false },
|
|
64
64
|
placeItems: "center",
|
|
65
65
|
inlineSize: "$docs-menu-button-size",
|
|
66
66
|
blockSize: "$docs-menu-button-size",
|
|
@@ -71,12 +71,12 @@ export const HeaderLinksRoot = defineComponent("HeaderLinks", {
|
|
|
71
71
|
fill: "#clear",
|
|
72
72
|
},
|
|
73
73
|
HoverTrigger: {
|
|
74
|
-
$: "
|
|
74
|
+
$: "[data-element=Trigger]",
|
|
75
75
|
color: { "": null, "@own(:hover)": "#text" },
|
|
76
76
|
fill: { "": null, "@own(:hover)": "#surface-2-hover" },
|
|
77
77
|
},
|
|
78
78
|
Panel: {
|
|
79
|
-
$: "
|
|
79
|
+
$: "Panel",
|
|
80
80
|
position: "fixed",
|
|
81
81
|
inset: "0.5rem $docs-nav-pad-x auto auto",
|
|
82
82
|
inlineSize: "min(20rem, calc(100vw - 2 * $docs-nav-pad-x))",
|
|
@@ -99,17 +99,17 @@ export const HeaderLinksRoot = defineComponent("HeaderLinks", {
|
|
|
99
99
|
},
|
|
100
100
|
},
|
|
101
101
|
OpenPanel: {
|
|
102
|
-
$: "
|
|
103
|
-
opacity: { "": null, "@own(
|
|
104
|
-
scale: { "": null, "@own(
|
|
102
|
+
$: "[data-element=Panel]",
|
|
103
|
+
opacity: { "": null, "@own(:is(:popover-open) & [data-open])": "1" },
|
|
104
|
+
scale: { "": null, "@own(:is(:popover-open) & [data-open])": "1" },
|
|
105
105
|
},
|
|
106
106
|
PanelNavigation: {
|
|
107
|
-
$: "
|
|
107
|
+
$: "Panel nav",
|
|
108
108
|
display: "grid",
|
|
109
109
|
gap: "1bw",
|
|
110
110
|
},
|
|
111
111
|
PanelLink: {
|
|
112
|
-
$: "
|
|
112
|
+
$: "Panel a",
|
|
113
113
|
justifyContent: "flex-start",
|
|
114
114
|
blockSize: "min $docs-menu-button-size",
|
|
115
115
|
inlinePadding: "($gap * 1.5)",
|
|
@@ -119,15 +119,15 @@ export const HeaderLinksRoot = defineComponent("HeaderLinks", {
|
|
|
119
119
|
overflowWrap: "anywhere",
|
|
120
120
|
},
|
|
121
121
|
FirstPanelLink: {
|
|
122
|
-
$: "
|
|
122
|
+
$: "Panel a",
|
|
123
123
|
inlinePadding: {
|
|
124
124
|
"": null,
|
|
125
|
-
"@own(:
|
|
125
|
+
"@own(:first-child)":
|
|
126
126
|
"($gap * 1.5) start, ($docs-menu-button-size + $gap) end",
|
|
127
127
|
},
|
|
128
128
|
},
|
|
129
129
|
Close: {
|
|
130
|
-
$: "
|
|
130
|
+
$: "Close",
|
|
131
131
|
position: "absolute",
|
|
132
132
|
inset: "$gap $gap auto auto",
|
|
133
133
|
display: "grid",
|
|
@@ -141,7 +141,7 @@ export const HeaderLinksRoot = defineComponent("HeaderLinks", {
|
|
|
141
141
|
radius: "$header-control-radius",
|
|
142
142
|
},
|
|
143
143
|
HoverClose: {
|
|
144
|
-
$: "
|
|
144
|
+
$: "[data-element=Close]",
|
|
145
145
|
color: { "": null, "@own(:hover)": "#text" },
|
|
146
146
|
fill: { "": null, "@own(:hover)": "#surface-2-hover" },
|
|
147
147
|
},
|
|
@@ -10,17 +10,17 @@ export const HeroRoot = defineComponent("Hero", {
|
|
|
10
10
|
display: "grid",
|
|
11
11
|
gridColumns: {
|
|
12
12
|
"": "minmax(0, 7fr) minmax(12rem, 4fr)",
|
|
13
|
-
"
|
|
13
|
+
"!@md": "minmax(0, 1fr)",
|
|
14
14
|
},
|
|
15
15
|
alignItems: "center",
|
|
16
16
|
gap: "clamp(2rem, 5vw, 5rem)",
|
|
17
17
|
blockPadding: {
|
|
18
18
|
"": "clamp(3rem, 8vw, 7rem) start, clamp(2rem, 6vw, 5rem) end",
|
|
19
|
-
"
|
|
19
|
+
"!@md": "($gap * 4) start, clamp(2rem, 6vw, 5rem) end",
|
|
20
20
|
},
|
|
21
21
|
Visual: {
|
|
22
|
-
$: "> img, >
|
|
23
|
-
order: { "": "2", "
|
|
22
|
+
$: "> img, > Visual",
|
|
23
|
+
order: { "": "2", "!@md": "0" },
|
|
24
24
|
display: "grid",
|
|
25
25
|
placeItems: "center",
|
|
26
26
|
inlineSize: "min(100%, 22rem)",
|
|
@@ -46,15 +46,15 @@ export const HeroRoot = defineComponent("Hero", {
|
|
|
46
46
|
},
|
|
47
47
|
},
|
|
48
48
|
Stack: {
|
|
49
|
-
$: ">
|
|
49
|
+
$: "> Stack",
|
|
50
50
|
display: "flex",
|
|
51
51
|
flow: "column",
|
|
52
|
-
alignItems: { "": "flex-start", "
|
|
52
|
+
alignItems: { "": "flex-start", "!@md": "center" },
|
|
53
53
|
gap: "clamp(1.5rem, 3vw, 2rem)",
|
|
54
|
-
textAlign: { "": "start", "
|
|
54
|
+
textAlign: { "": "start", "!@md": "center" },
|
|
55
55
|
},
|
|
56
56
|
Copy: {
|
|
57
|
-
$: ">
|
|
57
|
+
$: "> Stack > Copy",
|
|
58
58
|
display: "flex",
|
|
59
59
|
flow: "column",
|
|
60
60
|
alignItems: "inherit",
|
|
@@ -69,62 +69,60 @@ export const HeroRoot = defineComponent("Hero", {
|
|
|
69
69
|
textWrap: "balance",
|
|
70
70
|
},
|
|
71
71
|
Tagline: {
|
|
72
|
-
$: "
|
|
72
|
+
$: "Tagline",
|
|
73
73
|
inlineSize: "max 48ch",
|
|
74
74
|
color: "#text-soft",
|
|
75
75
|
preset: "hero-tagline",
|
|
76
76
|
textWrap: "balance",
|
|
77
77
|
},
|
|
78
78
|
Actions: {
|
|
79
|
-
$: "
|
|
79
|
+
$: "Actions",
|
|
80
80
|
display: "flex",
|
|
81
81
|
flow: "row wrap",
|
|
82
|
-
justifyContent: { "": "flex-start", "
|
|
82
|
+
justifyContent: { "": "flex-start", "!@md": "center" },
|
|
83
83
|
gap: "($gap * 1.5)",
|
|
84
84
|
},
|
|
85
85
|
Action: {
|
|
86
|
-
$: "
|
|
86
|
+
$: "Action",
|
|
87
87
|
display: "inline-flex",
|
|
88
88
|
alignItems: "center",
|
|
89
89
|
blockSize: "min $control-height",
|
|
90
90
|
padding: "($gap * 1.25) ($gap * 2.5)",
|
|
91
91
|
gap: "$gap",
|
|
92
92
|
color: "#text",
|
|
93
|
-
border: true,
|
|
93
|
+
border: { "": true, "@own(minimal)": "#clear" },
|
|
94
94
|
radius: "round",
|
|
95
95
|
fill: "#surface-2",
|
|
96
96
|
preset: "navigation / strong",
|
|
97
97
|
textDecoration: "none",
|
|
98
|
-
transition: "fill $transition
|
|
98
|
+
transition: "fill $transition",
|
|
99
99
|
},
|
|
100
100
|
HoverAction: {
|
|
101
|
-
$: "
|
|
102
|
-
"$hover-offset": "-1px",
|
|
101
|
+
$: "[data-element=Action]",
|
|
103
102
|
fill: { "": null, "@own(:hover)": "#surface-2-hover" },
|
|
104
|
-
translate: { "": null, "@own(:hover)": "0 $hover-offset" },
|
|
105
103
|
},
|
|
106
104
|
PrimaryAction: {
|
|
107
|
-
$: "
|
|
108
|
-
color: "#accent-surface-text",
|
|
105
|
+
$: "[data-element=Action]",
|
|
106
|
+
color: { "": null, "@own(primary)": "#accent-surface-text" },
|
|
109
107
|
// Recolor only; Action owns the border width and style, including theme overrides.
|
|
110
108
|
// eslint-disable-next-line tasty/prefer-shorthand-property
|
|
111
|
-
borderColor: "#accent-surface",
|
|
112
|
-
fill: "#accent-surface",
|
|
109
|
+
borderColor: { "": null, "@own(primary)": "#accent-surface" },
|
|
110
|
+
fill: { "": null, "@own(primary)": "#accent-surface" },
|
|
113
111
|
},
|
|
114
112
|
SecondaryAction: {
|
|
115
|
-
$: "
|
|
116
|
-
color: "#accent-text",
|
|
113
|
+
$: "[data-element=Action]",
|
|
114
|
+
color: { "": null, "@own(secondary)": "#accent-text" },
|
|
117
115
|
// Recolor only; Action owns the border width and style, including theme overrides.
|
|
118
116
|
// eslint-disable-next-line tasty/prefer-shorthand-property
|
|
119
|
-
borderColor: "#border-strong",
|
|
117
|
+
borderColor: { "": null, "@own(secondary)": "#border-strong" },
|
|
120
118
|
},
|
|
121
119
|
MinimalAction: {
|
|
122
|
-
$: "
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
120
|
+
$: "[data-element=Action]",
|
|
121
|
+
color: { "": null, "@own(minimal)": "#accent-text" },
|
|
122
|
+
// Recolor only so theme.styles.Hero.Action can still own border geometry.
|
|
123
|
+
// eslint-disable-next-line tasty/prefer-shorthand-property
|
|
124
|
+
borderColor: { "": null, "@own(minimal)": "#clear" },
|
|
127
125
|
},
|
|
128
|
-
ActionIcon: { $: "
|
|
126
|
+
ActionIcon: { $: "Action svg", flexShrink: "0" },
|
|
129
127
|
},
|
|
130
128
|
});
|
|
@@ -10,9 +10,9 @@ import check from "../icons/check.svg?raw";
|
|
|
10
10
|
|
|
11
11
|
interface Props {
|
|
12
12
|
name: string;
|
|
13
|
-
|
|
13
|
+
"data-element"?: "Icon" | "LabelIcon" | "Caret" | "Checkmark";
|
|
14
14
|
}
|
|
15
|
-
const { name,
|
|
15
|
+
const { name, "data-element": element = "Icon" } = Astro.props;
|
|
16
16
|
const originals: Record<string, string> = {
|
|
17
17
|
bars: menu,
|
|
18
18
|
close,
|
|
@@ -32,7 +32,7 @@ const originals: Record<string, string> = {
|
|
|
32
32
|
};
|
|
33
33
|
const svg = originals[name]
|
|
34
34
|
?.replaceAll('stroke="black"', 'stroke="currentColor"')
|
|
35
|
-
.replace("<svg ", `<svg
|
|
35
|
+
.replace("<svg ", `<svg data-element="${element}" aria-hidden="true" `);
|
|
36
36
|
if (!svg) throw new Error(`Unknown Cookbook icon: ${name}`);
|
|
37
37
|
---
|
|
38
38
|
|
|
@@ -37,11 +37,11 @@ export const LanguageSelectRoot = defineComponent("LanguageSelect", {
|
|
|
37
37
|
fill: { "": null, "@own(:active)": "#surface-2-pressed" },
|
|
38
38
|
},
|
|
39
39
|
LabelIcon: {
|
|
40
|
-
$: "> button >
|
|
40
|
+
$: "> button > LabelIcon",
|
|
41
41
|
display: "block",
|
|
42
42
|
flexShrink: "0",
|
|
43
|
-
inlineSize: { "": "1.25rem", "
|
|
44
|
-
blockSize: { "": "1.25rem", "
|
|
43
|
+
inlineSize: { "": "1.25rem", "!@md": "1.125rem" },
|
|
44
|
+
blockSize: { "": "1.25rem", "!@md": "1.125rem" },
|
|
45
45
|
},
|
|
46
46
|
TriggerLabel: {
|
|
47
47
|
// Reuse the shared, server-only popover anatomy.
|
|
@@ -60,11 +60,11 @@ export const LanguageSelectRoot = defineComponent("LanguageSelect", {
|
|
|
60
60
|
padding: { "": null, "[data-compact]": "0" },
|
|
61
61
|
},
|
|
62
62
|
CompactLabel: {
|
|
63
|
-
$: "& > button >
|
|
63
|
+
$: "& > button > [data-element=TriggerLabel]",
|
|
64
64
|
hide: { "": null, "[data-compact]": true },
|
|
65
65
|
},
|
|
66
66
|
CompactCaret: {
|
|
67
|
-
$: "& > button > :is(
|
|
67
|
+
$: "& > button > :is(Caret)",
|
|
68
68
|
hide: { "": null, "[data-compact]": true },
|
|
69
69
|
},
|
|
70
70
|
Label: { $: "> button" },
|
|
@@ -82,7 +82,7 @@ export const LanguageSelectRoot = defineComponent("LanguageSelect", {
|
|
|
82
82
|
CompactLabelIcon: {
|
|
83
83
|
// Preserve the conditional scope of this empty legacy customization hook.
|
|
84
84
|
// eslint-disable-next-line tasty/no-state-in-selector
|
|
85
|
-
$: "&[data-compact] > button >
|
|
85
|
+
$: "&[data-compact] > button > [data-element=LabelIcon]",
|
|
86
86
|
},
|
|
87
87
|
SidebarTrigger: {
|
|
88
88
|
$: "& > button",
|
|
@@ -92,7 +92,7 @@ export const LanguageSelectRoot = defineComponent("LanguageSelect", {
|
|
|
92
92
|
// Reuse the shared, server-only popover anatomy.
|
|
93
93
|
// eslint-disable-next-line tasty/no-style-spread
|
|
94
94
|
...languageSelectStyles.Panel,
|
|
95
|
-
blockInset: { "": "4rem start", "
|
|
95
|
+
blockInset: { "": "4rem start", "!@md": "3.5rem start" },
|
|
96
96
|
inlineInset:
|
|
97
97
|
"max($docs-nav-pad-x, ((100vw - $layout-width) / 2 + $docs-sidebar-pad-x)) end",
|
|
98
98
|
},
|
|
@@ -154,7 +154,7 @@ export const LanguageSelectRoot = defineComponent("LanguageSelect", {
|
|
|
154
154
|
// eslint-disable-next-line tasty/no-style-spread
|
|
155
155
|
...languageSelectStyles.CurrentOption,
|
|
156
156
|
},
|
|
157
|
-
Fallback: { $: "
|
|
157
|
+
Fallback: { $: "Fallback", color: "#text-muted" },
|
|
158
158
|
Checkmark: {
|
|
159
159
|
// Reuse the shared, server-only popover anatomy.
|
|
160
160
|
// eslint-disable-next-line tasty/no-style-spread
|
|
@@ -12,17 +12,17 @@ export const MainContentRoot = defineComponent("MainContent", {
|
|
|
12
12
|
padding: "0 0 5rem",
|
|
13
13
|
// Layout spacing is a default; generated Markdown owns prose spacing.
|
|
14
14
|
ContentSpacing: {
|
|
15
|
-
$: ":where(
|
|
15
|
+
$: ":where(Panel > Container) > * + *",
|
|
16
16
|
blockMargin: "$margin-block-start $margin-block-end",
|
|
17
17
|
"$margin-block-start": "($gap * 3)",
|
|
18
18
|
},
|
|
19
19
|
Container: {
|
|
20
|
-
$: "
|
|
20
|
+
$: "Panel > Container",
|
|
21
21
|
inlineMargin: "auto",
|
|
22
22
|
inlineSize: "max $content-width",
|
|
23
23
|
},
|
|
24
24
|
Panel: {
|
|
25
|
-
$: "
|
|
25
|
+
$: "Panel",
|
|
26
26
|
"$padding-block-start": {
|
|
27
27
|
"": "($gap * 3)",
|
|
28
28
|
"@own(:nth-of-type(2))": "($gap * 2)",
|
|
@@ -13,7 +13,7 @@ export const MainPaneRoot = defineComponent("MainPane", {
|
|
|
13
13
|
"": "0 100% initial",
|
|
14
14
|
"[data-has-sidebar] & [data-has-toc]":
|
|
15
15
|
"min(calc(100% - $sidebar-width), calc($content-width + (100% - $content-width - $sidebar-width) / 2))",
|
|
16
|
-
"([data-has-sidebar] & [data-has-toc]) & (
|
|
16
|
+
"([data-has-sidebar] & [data-has-toc]) & (!@lg)": "100%",
|
|
17
17
|
},
|
|
18
18
|
},
|
|
19
19
|
});
|
|
@@ -11,28 +11,28 @@ export function MarkdownAlertStyles() {
|
|
|
11
11
|
padding: "($gap * 2) ($gap * 2.5)",
|
|
12
12
|
color: {
|
|
13
13
|
"": "#text-soft",
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
14
|
+
"[data-note]": "#blue-text",
|
|
15
|
+
"[data-tip]": "#green-text",
|
|
16
|
+
"[data-caution]": "#warning-text",
|
|
17
|
+
"[data-danger]": "#red-text",
|
|
18
18
|
},
|
|
19
19
|
border: {
|
|
20
20
|
"": true,
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
21
|
+
"[data-note]": "#blue",
|
|
22
|
+
"[data-tip]": "#green",
|
|
23
|
+
"[data-caution]": "#warning",
|
|
24
|
+
"[data-danger]": "#red",
|
|
25
25
|
},
|
|
26
26
|
radius: "$card-radius",
|
|
27
27
|
fill: {
|
|
28
28
|
"": "#surface-2",
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
29
|
+
"[data-note]": "#blue-surface",
|
|
30
|
+
"[data-tip]": "#green-surface",
|
|
31
|
+
"[data-caution]": "#warning-surface",
|
|
32
|
+
"[data-danger]": "#red-surface",
|
|
33
33
|
},
|
|
34
34
|
Title: {
|
|
35
|
-
$: "
|
|
35
|
+
$: "Title",
|
|
36
36
|
display: "flex",
|
|
37
37
|
alignItems: "center",
|
|
38
38
|
gap: "$gap",
|
|
@@ -44,15 +44,14 @@ export function MarkdownAlertStyles() {
|
|
|
44
44
|
preset: "strong",
|
|
45
45
|
},
|
|
46
46
|
FirstContent: {
|
|
47
|
-
$: "
|
|
47
|
+
$: "Content > *",
|
|
48
48
|
blockMargin: {
|
|
49
49
|
"": null,
|
|
50
|
-
"@own(:
|
|
51
|
-
"$margin-block-start $margin-block-end",
|
|
50
|
+
"@own(:first-child)": "$margin-block-start $margin-block-end",
|
|
52
51
|
},
|
|
53
52
|
"$margin-block-start": {
|
|
54
53
|
"": null,
|
|
55
|
-
"@own(:
|
|
54
|
+
"@own(:first-child)": "0",
|
|
56
55
|
},
|
|
57
56
|
},
|
|
58
57
|
}),
|
|
@@ -9,7 +9,7 @@ configureCookbookStates();
|
|
|
9
9
|
|
|
10
10
|
export function MarkdownCodeBlockStyles() {
|
|
11
11
|
useGlobalStyles(
|
|
12
|
-
|
|
12
|
+
".td-code-block.td-code-block",
|
|
13
13
|
resolveComponentStyles("MarkdownCodeBlock", {
|
|
14
14
|
"$copy-button-size": "2rem",
|
|
15
15
|
display: "block",
|
|
@@ -67,13 +67,13 @@ export function MarkdownCodeBlockStyles() {
|
|
|
67
67
|
$: '> [data-element="CopyButton"]',
|
|
68
68
|
color: {
|
|
69
69
|
"": null,
|
|
70
|
-
|
|
70
|
+
"copy-state=copied": "#green-text",
|
|
71
71
|
},
|
|
72
72
|
// Recolor only; CopyButton owns the border width and style, including theme overrides.
|
|
73
73
|
// eslint-disable-next-line tasty/prefer-shorthand-property
|
|
74
74
|
borderColor: {
|
|
75
75
|
"": null,
|
|
76
|
-
|
|
76
|
+
"copy-state=copied": "#green",
|
|
77
77
|
},
|
|
78
78
|
},
|
|
79
79
|
CopyIcon: {
|
|
@@ -92,38 +92,50 @@ export function MarkdownCodeBlockStyles() {
|
|
|
92
92
|
"": null,
|
|
93
93
|
// SVG encoding runs only during the server build.
|
|
94
94
|
// eslint-disable-next-line tasty/no-runtime-styles-mutation
|
|
95
|
-
|
|
95
|
+
"copy-state=copied": `url("${svgIconUrl(checkIcon)}") center / contain no-repeat`,
|
|
96
96
|
},
|
|
97
97
|
},
|
|
98
98
|
Code: { $: "pre code", padding: "0", color: "inherit", fill: "#clear" },
|
|
99
|
-
Diff: { $: "pre
|
|
99
|
+
Diff: { $: "pre", inlinePadding: { "": null, diff: "0" } },
|
|
100
100
|
DiffCode: {
|
|
101
|
-
$: "pre
|
|
102
|
-
display: "block",
|
|
103
|
-
inlineSize:
|
|
101
|
+
$: "pre code",
|
|
102
|
+
display: { "": null, diff: "block" },
|
|
103
|
+
inlineSize: {
|
|
104
|
+
"": null,
|
|
105
|
+
diff: "100% max-content initial",
|
|
106
|
+
},
|
|
104
107
|
// Zero line height removes gaps between block diff lines; the tight modifier would not.
|
|
105
108
|
// eslint-disable-next-line tasty/prefer-shorthand-property
|
|
106
|
-
lineHeight: "0",
|
|
109
|
+
lineHeight: { "": null, diff: "0" },
|
|
107
110
|
},
|
|
108
111
|
DiffLine: {
|
|
109
|
-
$: "pre
|
|
110
|
-
display: "block",
|
|
111
|
-
inlinePadding:
|
|
112
|
-
|
|
112
|
+
$: "pre > code > [data-element=Line]",
|
|
113
|
+
display: { "": null, diff: "block" },
|
|
114
|
+
inlinePadding: {
|
|
115
|
+
"": null,
|
|
116
|
+
diff: "1rem",
|
|
117
|
+
},
|
|
118
|
+
preset: { "": null, diff: "code" },
|
|
113
119
|
},
|
|
114
120
|
EmptyDiffLine: {
|
|
115
121
|
// Tasty 3.9.3 appends @own states after pseudo-elements, producing invalid CSS.
|
|
116
122
|
// eslint-disable-next-line tasty/no-state-in-selector
|
|
117
|
-
$: "pre
|
|
118
|
-
content: '"\\200b"',
|
|
123
|
+
$: "pre > code > Line:empty::before",
|
|
124
|
+
content: { "": null, diff: '"\\200b"' },
|
|
119
125
|
},
|
|
120
126
|
InsertedLine: {
|
|
121
|
-
$: "pre
|
|
122
|
-
fill:
|
|
127
|
+
$: "pre > code > [data-element=Line]",
|
|
128
|
+
fill: {
|
|
129
|
+
"": null,
|
|
130
|
+
"diff & @own(inserted)": "#green-surface",
|
|
131
|
+
},
|
|
123
132
|
},
|
|
124
133
|
DeletedLine: {
|
|
125
|
-
$: "pre
|
|
126
|
-
fill:
|
|
134
|
+
$: "pre > code > [data-element=Line]",
|
|
135
|
+
fill: {
|
|
136
|
+
"": null,
|
|
137
|
+
"diff & @own(deleted)": "#red-surface",
|
|
138
|
+
},
|
|
127
139
|
},
|
|
128
140
|
}),
|
|
129
141
|
);
|