@tenphi/renderer 0.27.0 → 0.30.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.
Files changed (71) hide show
  1. package/README.md +6 -4
  2. package/dist/client/preview-height.d.ts +16 -0
  3. package/dist/client/preview-height.d.ts.map +1 -0
  4. package/dist/client/preview-height.js +31 -0
  5. package/dist/client/preview-height.js.map +1 -0
  6. package/dist/components/Banner.styles.js +1 -1
  7. package/dist/components/Button.styles.js +1 -1
  8. package/dist/components/Card.astro +3 -4
  9. package/dist/components/Card.styles.js +16 -25
  10. package/dist/components/Document.styles.js +19 -40
  11. package/dist/components/Footer.styles.js +5 -5
  12. package/dist/components/Header.styles.js +2 -2
  13. package/dist/components/HeaderFrame.styles.js +1 -1
  14. package/dist/components/HeaderLinks.styles.js +25 -15
  15. package/dist/components/Hero.styles.js +8 -8
  16. package/dist/components/LanguageSelect.styles.js +5 -6
  17. package/dist/components/MainContent.styles.js +6 -8
  18. package/dist/components/MainPane.styles.js +2 -2
  19. package/dist/components/MarkdownAlert.styles.js +13 -13
  20. package/dist/components/MarkdownCodeBlock.styles.js +7 -10
  21. package/dist/components/MarkdownContent.styles.js +11 -17
  22. package/dist/components/MarkdownHeading.styles.js +4 -6
  23. package/dist/components/MarkdownInlineCode.styles.js +1 -1
  24. package/dist/components/MarkdownTable.styles.js +7 -10
  25. package/dist/components/Mermaid.styles.js +2 -2
  26. package/dist/components/MermaidSource.styles.js +1 -1
  27. package/dist/components/MobileMenuFooter.styles.js +5 -5
  28. package/dist/components/MobileMenuToggle.styles.js +2 -2
  29. package/dist/components/MobileNavigationTabs.styles.js +9 -10
  30. package/dist/components/MobileTableOfContents.styles.js +7 -7
  31. package/dist/components/PackageVersion.styles.js +1 -1
  32. package/dist/components/PageActions.styles.js +3 -3
  33. package/dist/components/PageFrame.styles.js +1 -1
  34. package/dist/components/Pagination.styles.js +13 -18
  35. package/dist/components/Preview.astro +7 -0
  36. package/dist/components/Preview.styles.js +10 -4
  37. package/dist/components/Search.styles.js +7 -8
  38. package/dist/components/SearchButton.styles.js +13 -5
  39. package/dist/components/SearchResults.styles.js +20 -20
  40. package/dist/components/Sidebar.styles.js +17 -19
  41. package/dist/components/SkipLink.styles.js +4 -3
  42. package/dist/components/SocialIcons.styles.js +1 -1
  43. package/dist/components/Steps.styles.js +3 -3
  44. package/dist/components/TableOfContents.styles.js +3 -3
  45. package/dist/components/TableOfContentsLayout.styles.js +2 -2
  46. package/dist/components/ThemeSelect.styles.js +16 -16
  47. package/dist/components/TopNavigation.styles.js +1 -3
  48. package/dist/components/VersionSwitcher.styles.js +4 -4
  49. package/dist/components/props.d.ts +2 -0
  50. package/dist/components/props.d.ts.map +1 -1
  51. package/dist/components/props.ts +2 -0
  52. package/dist/components/select-popover-styles.js +14 -14
  53. package/dist/define-component.d.ts.map +1 -1
  54. package/dist/define-component.js +20 -1
  55. package/dist/define-component.js.map +1 -0
  56. package/dist/eslint-plugin.d.ts +0 -5
  57. package/dist/eslint-plugin.d.ts.map +1 -1
  58. package/dist/eslint-plugin.js +0 -5
  59. package/dist/eslint-plugin.js.map +1 -1
  60. package/dist/index.js.map +1 -1
  61. package/dist/preview-document.d.ts +16 -3
  62. package/dist/preview-document.d.ts.map +1 -1
  63. package/dist/preview-document.js +31 -9
  64. package/dist/preview-document.js.map +1 -1
  65. package/dist/styling.js +2 -2
  66. package/dist/styling.js.map +1 -1
  67. package/package.json +4 -4
  68. package/dist/components/inherit-component-parts.d.ts +0 -1
  69. package/dist/components/inherit-component-parts.js +0 -7
  70. package/dist/define-component-BP4YwMak.js +0 -28
  71. package/dist/define-component-BP4YwMak.js.map +0 -1
@@ -20,7 +20,7 @@ export const SearchRoot = defineComponent("Search", {
20
20
  },
21
21
  Dialog: {
22
22
  $: "dialog",
23
- radius: { "": "$card-radius", "!@md": "0" },
23
+ radius: { "": "1cr", "!@md": "0" },
24
24
  inlineSize: { "": "0 90% 40rem", "!@md": "100%" },
25
25
  blockSize: {
26
26
  "": "15rem max-content (100% - 8rem)",
@@ -54,7 +54,7 @@ export const SearchRoot = defineComponent("Search", {
54
54
  // eslint-disable-next-line tasty/no-runtime-styles-mutation
55
55
  mask: `url("${svgIconUrl(closeIcon)}") center / contain no-repeat`,
56
56
  },
57
- OpenDialog: { $: "dialog", display: { "": "", "@own([open])": "flex" } },
57
+ OpenDialog: { $: "dialog", display: { "": null, "@own([open])": "flex" } },
58
58
  EnteredDialog: {
59
59
  $: "dialog",
60
60
  opacity: { "": null, "@own([open] & [data-open])": "1" },
@@ -72,8 +72,6 @@ export const SearchRoot = defineComponent("Search", {
72
72
  },
73
73
  },
74
74
  EnteredBackdrop: {
75
- // Tasty 3.9.3 appends @own states after pseudo-elements, producing invalid CSS.
76
- // eslint-disable-next-line tasty/no-state-in-selector
77
75
  $: "dialog[open][data-open]::backdrop",
78
76
  opacity: { "": "1", "!@md": "0" },
79
77
  },
@@ -83,8 +81,8 @@ export const SearchRoot = defineComponent("Search", {
83
81
  flow: "column",
84
82
  flexGrow: "1",
85
83
  blockSize: "min 0",
86
- gap: "($gap * 2)",
87
- padding: { "": "($gap * 3)", "!@md": "($gap * 2) ($gap * 2) 0" },
84
+ gap: "2x",
85
+ padding: { "": "3x", "!@md": "2x 2x 0" },
88
86
  overflow: "hidden",
89
87
  },
90
88
  Container: {
@@ -97,7 +95,8 @@ export const SearchRoot = defineComponent("Search", {
97
95
  },
98
96
  Close: {
99
97
  $: 'button[data-element="Close"]',
100
- display: { "": "none", "!@md": "grid" },
98
+ display: "grid",
99
+ hide: { "": true, "!@md": false },
101
100
  placeItems: "center",
102
101
  alignSelf: "flex-end",
103
102
  flexShrink: "0",
@@ -110,7 +109,7 @@ export const SearchRoot = defineComponent("Search", {
110
109
  fill: "#clear",
111
110
  shadow: "none",
112
111
  cursor: "pointer",
113
- transition: "color $transition, background-color $transition",
112
+ transition: "color, fill",
114
113
  },
115
114
  HoverClose: {
116
115
  $: 'button[data-element="Close"]',
@@ -17,13 +17,14 @@ export const SearchButtonRoot = extendComponent("SearchButton", Button, {
17
17
  },
18
18
  inlineMargin: {
19
19
  "": "0 start",
20
- "@media(w >= 80rem)": "min(5rem, max(0px, calc(100% - 22rem))) start",
20
+ "@media(w >= 80rem)": "min(5rem, max(0px, (100% - 22rem))) start",
21
21
  },
22
22
  blockSize: {
23
23
  "": "0 $control-height initial",
24
24
  "!@md": "0 $docs-menu-button-size initial",
25
25
  },
26
- padding: { "": "0 $gap 0 ($gap * 1.5)", "!@md": "0" },
26
+ blockPadding: "0",
27
+ inlinePadding: { "": "1.5x 1x", "!@md": "0" },
27
28
  border: { "": true, "!@md": "0" },
28
29
  radius: "$header-control-radius",
29
30
  fill: {
@@ -34,8 +35,15 @@ export const SearchButtonRoot = extendComponent("SearchButton", Button, {
34
35
  },
35
36
  preset: "small",
36
37
  shadow: "none",
37
- transition: "color $transition, fill $transition",
38
- Label: { $: "> span", hide: { "": false, "!@md": true } },
38
+ transition: "color, fill",
39
+ Label: {
40
+ $: "> span",
41
+ hide: { "": false, "!@md": true },
42
+ inlineSize: "min 0",
43
+ overflow: "hidden",
44
+ whiteSpace: "nowrap",
45
+ textOverflow: "ellipsis",
46
+ },
39
47
  PendingShortcut: {
40
48
  $: "> kbd",
41
49
  visibility: { "": null, "@own([data-pending])": "hidden" },
@@ -49,7 +57,7 @@ export const SearchButtonRoot = extendComponent("SearchButton", Button, {
49
57
  inlinePadding: "0.375rem",
50
58
  fill: "#surface-3",
51
59
  preset: "small",
52
- radius: "($radius * 0.75)",
60
+ radius: "0.75r",
53
61
  },
54
62
  NativeIcon: { $: "> svg", hide: true },
55
63
  Icon: {
@@ -20,7 +20,7 @@ export const SearchResultsRoot = defineComponent("SearchResults", {
20
20
  "$pagefind-ui-text": "#text-soft",
21
21
  "$pagefind-ui-background": "#surface",
22
22
  "$pagefind-ui-border": "#border",
23
- "$pagefind-ui-border-width": "$border-width",
23
+ "$pagefind-ui-border-width": "1bw",
24
24
  "$pagefind-ui-tag": "#surface-3",
25
25
  preset: "body",
26
26
  UI: {
@@ -45,7 +45,7 @@ export const SearchResultsRoot = defineComponent("SearchResults", {
45
45
  },
46
46
  EngineControls: {
47
47
  $: ".pagefind-ui__search-input, .pagefind-ui__search-clear",
48
- display: "none",
48
+ hide: true,
49
49
  },
50
50
  Drawer: {
51
51
  $: ".pagefind-ui__drawer",
@@ -61,8 +61,8 @@ export const SearchResultsRoot = defineComponent("SearchResults", {
61
61
  blockSize: "min 3rem",
62
62
  inlinePadding: "2.75rem",
63
63
  color: "#text",
64
- border: "$border-width solid #border",
65
- radius: "$radius",
64
+ border: true,
65
+ radius: "1r",
66
66
  fill: "#surface",
67
67
  shadow: "none",
68
68
  },
@@ -87,17 +87,17 @@ export const SearchResultsRoot = defineComponent("SearchResults", {
87
87
  flexGrow: "1",
88
88
  blockSize: "min 0",
89
89
  overflowY: "auto",
90
- blockMargin: { "": "($gap * 3) start", "!@md": "($gap * 2) start" },
91
- blockBorder: "$border-width solid #border start",
92
- inlineSize: { "!@md": "(100% + ($gap * 4))" },
93
- inlineMargin: { "!@md": "(-1 * $gap * 2)" },
94
- inlinePadding: { "!@md": "($gap * 2)" },
95
- blockPadding: { "!@md": "($gap * 2) end" },
90
+ blockMargin: { "": "3x start", "!@md": "2x start" },
91
+ blockBorder: "1bw solid #border start",
92
+ inlineSize: { "": null, "!@md": "(100% + 4x)" },
93
+ inlineMargin: { "": null, "!@md": "-2x" },
94
+ inlinePadding: { "": null, "!@md": "2x" },
95
+ blockPadding: { "": null, "!@md": "2x end" },
96
96
  },
97
97
  Result: {
98
98
  $: ".pagefind-ui__result",
99
- blockPadding: "($gap * 2)",
100
- blockBorder: "$border-width solid #border start",
99
+ blockPadding: "2x",
100
+ blockBorder: "1bw solid #border start",
101
101
  },
102
102
  ResultLink: {
103
103
  $: ".pagefind-ui__result-link",
@@ -122,13 +122,13 @@ export const SearchResultsRoot = defineComponent("SearchResults", {
122
122
  },
123
123
  Excerpt: {
124
124
  $: ".pagefind-ui__result-excerpt",
125
- margin: "$gap 0 0",
125
+ margin: "1x top",
126
126
  color: "#text-soft",
127
127
  preset: "small",
128
128
  },
129
129
  NestedResult: {
130
130
  $: ".pagefind-ui__result-nested",
131
- margin: "2x 0 0",
131
+ margin: "2x top",
132
132
  inlinePadding: "2x start",
133
133
  inlineBorder: "1bw solid #border start",
134
134
  },
@@ -141,12 +141,12 @@ export const SearchResultsRoot = defineComponent("SearchResults", {
141
141
  },
142
142
  More: {
143
143
  $: ".pagefind-ui__button",
144
- display: { "!@md": "block" },
145
- inlineSize: { "!@md": "max-content" },
146
- inlineMargin: { "!@md": "auto start" },
144
+ display: { "": null, "!@md": "block" },
145
+ inlineSize: { "": null, "!@md": "max-content" },
146
+ inlineMargin: { "": null, "!@md": "auto start" },
147
147
  padding: "1x 2x",
148
- border: "$border-width solid #border",
149
- radius: "$radius",
148
+ border: true,
149
+ radius: "1r",
150
150
  color: "#text",
151
151
  fill: "#surface-2",
152
152
  preset: "navigation",
@@ -184,7 +184,7 @@ export const SearchResultsRoot = defineComponent("SearchResults", {
184
184
  },
185
185
  SuppressedClear: {
186
186
  $: "[data-element=Clear]",
187
- display: { "": "", "@own([hidden])": "none" },
187
+ hide: { "": null, "@own([hidden])": true },
188
188
  },
189
189
  },
190
190
  });
@@ -8,22 +8,22 @@ export const SidebarRoot = defineComponent("Sidebar", {
8
8
  "data-element": "Sidebar",
9
9
  styles: {
10
10
  "$sidebar-transition": "120ms",
11
- display: { "@md": "block" },
11
+ display: { "": null, "@md": "block" },
12
12
  visibility: {
13
13
  "": "visible",
14
14
  "!@md": "hidden",
15
- ":is(:popover-open) & !@md": "visible",
15
+ ":popover-open & !@md": "visible",
16
16
  },
17
17
  position: "fixed",
18
18
  zIndex: { "": "8", "!@md": "12" },
19
19
  blockInset: { "": "$docs-nav-height start, 0 end", "!@md": "0" },
20
20
  inlineInset: {
21
21
  "": "0 start, auto end",
22
- "@md": "max(0px, calc((100% - $layout-width) / 2)) start, auto end",
22
+ "@md": "max(0px, ((100% - $layout-width) / 2)) start, auto end",
23
23
  },
24
24
  inlineSize: {
25
25
  "": "$sidebar-width",
26
- "!@md": "min(22rem, calc(100% - 2rem))",
26
+ "!@md": "min(22rem, (100% - 2rem))",
27
27
  },
28
28
  blockSize: "auto",
29
29
  margin: "0",
@@ -38,7 +38,7 @@ export const SidebarRoot = defineComponent("Sidebar", {
38
38
  translate: {
39
39
  "": "0",
40
40
  "!@md": "-100% 0",
41
- ":is(:popover-open) & [data-open] & !@md": "0",
41
+ ":popover-open & [data-open] & !@md": "0",
42
42
  },
43
43
  transition: {
44
44
  "": "none",
@@ -57,7 +57,7 @@ export const SidebarRoot = defineComponent("Sidebar", {
57
57
  },
58
58
  OpenBackdrop: {
59
59
  $: "&::backdrop",
60
- opacity: { "": null, ":is(:popover-open) & [data-open]": "1" },
60
+ opacity: { "": null, ":popover-open & [data-open]": "1" },
61
61
  },
62
62
  MobileHeading: {
63
63
  $: "MobileHeading",
@@ -65,7 +65,7 @@ export const SidebarRoot = defineComponent("Sidebar", {
65
65
  hide: { "": true, "!@md": false },
66
66
  alignItems: "center",
67
67
  justifyContent: "space-between",
68
- gap: "$gap",
68
+ gap: "1x",
69
69
  },
70
70
  HomeLink: {
71
71
  display: "flex",
@@ -73,7 +73,7 @@ export const SidebarRoot = defineComponent("Sidebar", {
73
73
  textDecoration: "none",
74
74
  inlineSize: "min 0",
75
75
  padding: "0",
76
- gap: "$gap",
76
+ gap: "1x",
77
77
  color: "#text",
78
78
  preset: "h4",
79
79
  },
@@ -137,10 +137,10 @@ export const SidebarRoot = defineComponent("Sidebar", {
137
137
  flow: "column",
138
138
  blockSize: "min 100%",
139
139
  inlinePadding: "$docs-sidebar-pad-x",
140
- gap: "($gap * 2)",
140
+ gap: "2x",
141
141
  blockPadding: {
142
- "": "($gap * 3) start, ($gap * 6) end",
143
- "!@md": "($gap * 2) start, ($gap * 6) end",
142
+ "": "3x start, 6x end",
143
+ "!@md": "2x start, 6x end",
144
144
  },
145
145
  },
146
146
  Tree: { $: "cookbook-sidebar", display: "block" },
@@ -167,27 +167,27 @@ export const SidebarRoot = defineComponent("Sidebar", {
167
167
  $: "ul > li + li",
168
168
  blockMargin: {
169
169
  "": null,
170
- "@own(top-level & section)": "($gap * 2.5) start",
170
+ "@own(top-level & section)": "2.5x start",
171
171
  },
172
172
  },
173
173
  NestedItem: {
174
174
  $: "cookbook-sidebar details > ul > li",
175
- inlineMargin: "($gap * 1.5) start",
175
+ inlineMargin: "1.5x start",
176
176
  },
177
177
  SectionHeading: {
178
178
  $: "SectionHeading",
179
- margin: "0 0 1bw",
180
- padding: "($gap * 0.75) ($gap * 1.25)",
179
+ margin: "1bw bottom",
180
+ padding: "0.75x 1.25x",
181
181
  color: "#text",
182
182
  preset: "small / strong",
183
183
  },
184
184
  Control: {
185
185
  $: "cookbook-sidebar summary, cookbook-sidebar a",
186
186
  blockSize: "min 2.25rem",
187
- padding: "($gap * 0.75) ($gap * 1.25)",
187
+ padding: "0.75x 1.25x",
188
188
  color: "#sidebar-text",
189
189
  preset: "navigation",
190
- radius: "$radius",
190
+ radius: "1r",
191
191
  textDecoration: "none",
192
192
  },
193
193
  Summary: {
@@ -267,8 +267,6 @@ export const SidebarRoot = defineComponent("Sidebar", {
267
267
  flexShrink: "0",
268
268
  inlineSize: "1rem",
269
269
  blockSize: "1rem",
270
- // Tasty and browsers support :dir(); the lint rule's pseudo list omits it.
271
- // eslint-disable-next-line tasty/valid-state-key
272
270
  transform: { "": "none", ":dir(rtl)": "rotate(180deg)" },
273
271
  },
274
272
  ExpandedCaret: {
@@ -11,14 +11,15 @@ export const SkipLinkRoot = defineComponent("SkipLink", {
11
11
  zIndex: { "": null, ":focus": "20" },
12
12
  color: { "": null, ":focus": "#accent-surface-text" },
13
13
  fill: { "": null, ":focus": "#accent-surface" },
14
- radius: { "": null, ":focus": "$radius" },
14
+ radius: { "": null, ":focus": "1r" },
15
15
  shadow: { "": null, ":focus": "0 1rem 3rem #shadow" },
16
16
  textDecoration: { "": null, ":focus": "none" },
17
17
  position: "fixed",
18
- inset: "($gap * 1.5) auto auto ($gap * 1.5)",
18
+ blockInset: "1.5x start",
19
+ inlineInset: "1.5x start",
19
20
  inlineSize: { "": "$visually-hidden-size", ":focus": "auto" },
20
21
  blockSize: { "": "$visually-hidden-size", ":focus": "auto" },
21
- padding: { "": "0", ":focus": "$gap ($gap * 2)" },
22
+ padding: { "": "0", ":focus": "1x 2x" },
22
23
  overflow: { "": "hidden", ":focus": "visible" },
23
24
  clip: { "": "rect(0, 0, 0, 0)", ":focus": "auto" },
24
25
  },
@@ -9,7 +9,7 @@ export const SocialIconsRoot = defineComponent("SocialIcons", {
9
9
  styles: {
10
10
  display: "flex",
11
11
  alignItems: "center",
12
- gap: "($gap * 0.5)",
12
+ gap: "0.5x",
13
13
  Link: {
14
14
  $: "a",
15
15
  display: "grid",
@@ -9,12 +9,12 @@ export const StepsRoot = defineComponent("Steps", {
9
9
  styles: {
10
10
  display: "grid",
11
11
  gap: "2x",
12
- padding: "4x left",
13
- border: "1bw left #border",
12
+ inlinePadding: "4x start",
13
+ inlineBorder: "1bw solid #border start",
14
14
 
15
15
  Item: {
16
16
  $: "> li",
17
- padding: "1x left",
17
+ inlinePadding: "1x start",
18
18
  },
19
19
  Marker: {
20
20
  $: "> li::marker",
@@ -9,11 +9,11 @@ export const TableOfContentsRoot = defineComponent("TableOfContents", {
9
9
  styles: {
10
10
  display: "block",
11
11
  hide: { "": false, "!@lg": true },
12
- blockPadding: "($gap * 4) start",
12
+ blockPadding: "4x start",
13
13
  inlinePadding: "$docs-sidebar-pad-x",
14
14
  Heading: {
15
15
  $: "h2",
16
- margin: "0 0 $gap",
16
+ margin: "1x bottom",
17
17
  color: "#text",
18
18
  preset: "small / strong",
19
19
  },
@@ -39,7 +39,7 @@ export const TableOfContentsRoot = defineComponent("TableOfContents", {
39
39
  $: "a",
40
40
  display: "block",
41
41
  inlineSize: "0 auto 100%",
42
- blockPadding: "($gap * 0.5)",
42
+ blockPadding: "0.5x",
43
43
  color: "#text-muted",
44
44
  preset: "small",
45
45
  textDecoration: "none",
@@ -9,7 +9,7 @@ export const TableOfContentsLayoutRoot = defineComponent(
9
9
  as: "aside",
10
10
  "data-element": "TableOfContentsLayout",
11
11
  styles: {
12
- display: { "": "", ":has(cookbook-mobile-toc)": "block" },
12
+ display: { "": null, ":has(cookbook-mobile-toc)": "block" },
13
13
  hide: {
14
14
  "": false,
15
15
  "!@lg": true,
@@ -18,7 +18,7 @@ export const TableOfContentsLayoutRoot = defineComponent(
18
18
  order: { "": "2", "!@lg": "0" },
19
19
  position: "relative",
20
20
  inlineSize: {
21
- "": "max($sidebar-width, calc($sidebar-width + (100% - $content-width - $sidebar-width) / 2))",
21
+ "": "max($sidebar-width, ($sidebar-width + (100% - $content-width - $sidebar-width) / 2))",
22
22
  "!@lg": "100%",
23
23
  },
24
24
  Content: {
@@ -27,17 +27,17 @@ export const ThemeSelectRoot = defineComponent("ThemeSelect", {
27
27
  fill: "#clear",
28
28
  border: "0",
29
29
  radius: "$header-control-radius",
30
- transition: "color $transition, fill $transition",
30
+ transition: "color, fill",
31
31
  },
32
32
  HoverTrigger: {
33
33
  $: "> button",
34
34
  color: {
35
35
  "": null,
36
- "@own(:hover) | :has([popover]:is(:popover-open))": "#text",
36
+ "@own(:hover) | :has([popover]:popover-open)": "#text",
37
37
  },
38
38
  fill: {
39
39
  "": null,
40
- "@own(:hover) | :has([popover]:is(:popover-open))": "#surface-2-hover",
40
+ "@own(:hover) | :has([popover]:popover-open)": "#surface-2-hover",
41
41
  },
42
42
  },
43
43
  ActiveTrigger: {
@@ -58,15 +58,15 @@ export const ThemeSelectRoot = defineComponent("ThemeSelect", {
58
58
  blockInset: { "": "4rem start", "!@md": "3.5rem start" },
59
59
  inlineInset:
60
60
  "max($docs-nav-pad-x, ((100vw - $layout-width) / 2 + $docs-sidebar-pad-x)) end",
61
- inlineSize: "min(15rem, calc(100vw - 2 * $docs-nav-pad-x))",
62
- blockSize: "max (100dvh - $docs-nav-height - $gap)",
61
+ inlineSize: "min(15rem, (100vw - 2 * $docs-nav-pad-x))",
62
+ blockSize: "max (100dvh - $docs-nav-height - 1x)",
63
63
  overflowY: "auto",
64
64
  margin: "0",
65
- padding: "$gap",
65
+ padding: "1x",
66
66
  color: "#text",
67
67
  fill: "#surface-2",
68
68
  border: true,
69
- radius: "$card-radius",
69
+ radius: "1cr",
70
70
  shadow: "0 0.75rem 2rem #shadow",
71
71
  opacity: "0",
72
72
  scale: "1 0.96",
@@ -81,9 +81,9 @@ export const ThemeSelectRoot = defineComponent("ThemeSelect", {
81
81
  $: '[data-element="Panel"]',
82
82
  opacity: {
83
83
  "": null,
84
- "@own(:is(:popover-open) & [data-open])": "1",
84
+ "@own(:popover-open & [data-open])": "1",
85
85
  },
86
- scale: { "": null, "@own(:is(:popover-open) & [data-open])": "1" },
86
+ scale: { "": null, "@own(:popover-open & [data-open])": "1" },
87
87
  },
88
88
  Section: {
89
89
  $: "fieldset",
@@ -94,15 +94,15 @@ export const ThemeSelectRoot = defineComponent("ThemeSelect", {
94
94
  },
95
95
  SectionSpacing: {
96
96
  $: "fieldset + fieldset",
97
- blockMargin: "$gap start",
98
- blockPadding: "$gap start",
99
- blockBorder: "$border-width solid #border start",
97
+ blockMargin: "1x start",
98
+ blockPadding: "1x start",
99
+ blockBorder: "1bw solid #border start",
100
100
  },
101
101
  SectionLabel: {
102
102
  $: "legend",
103
103
  float: "inline-start",
104
104
  inlineSize: "100%",
105
- padding: "($gap * 0.75) $gap",
105
+ padding: "0.75x 1x",
106
106
  color: "#text-muted",
107
107
  preset: "small / strong",
108
108
  },
@@ -111,13 +111,13 @@ export const ThemeSelectRoot = defineComponent("ThemeSelect", {
111
111
  position: "relative",
112
112
  display: "flex",
113
113
  alignItems: "center",
114
- gap: "$gap",
114
+ gap: "1x",
115
115
  inlineSize: "100%",
116
116
  blockSize: "min 2.25rem",
117
- padding: "($gap * 0.75) $gap",
117
+ padding: "0.75x 1x",
118
118
  color: "#text-soft",
119
119
  preset: "small",
120
- radius: "$radius",
120
+ radius: "1r",
121
121
  cursor: "pointer",
122
122
  },
123
123
  HoverOption: {
@@ -26,7 +26,7 @@ export const TopNavigationRoot = defineComponent("TopNavigation", {
26
26
  flexGrow: "0",
27
27
  flexShrink: "0",
28
28
  flexBasis: "auto",
29
- blockPadding: "($gap * 1.25) start, $gap end",
29
+ blockPadding: "1.25x start, 1x end",
30
30
  color: "#text-soft",
31
31
  preset: "navigation",
32
32
  textDecoration: "none",
@@ -38,8 +38,6 @@ export const TopNavigationRoot = defineComponent("TopNavigation", {
38
38
  color: { "": null, '@own([aria-current="page"])': "#accent-text" },
39
39
  },
40
40
  ActiveIndicator: {
41
- // Tasty 3.9.3 appends @own states after pseudo-elements, producing invalid CSS.
42
- // eslint-disable-next-line tasty/no-state-in-selector
43
41
  $: 'a[aria-current="page"]::after',
44
42
  "$indicator-height": "2px",
45
43
  content: '""',
@@ -24,7 +24,7 @@ export const VersionSwitcherRoot = defineComponent("VersionSwitcher", {
24
24
  // eslint-disable-next-line tasty/no-style-spread
25
25
  ...versionSelectStyles.Trigger,
26
26
  blockSize: "min $control-height",
27
- inlinePadding: "$gap",
27
+ inlinePadding: "1x",
28
28
  fill: "#surface-2",
29
29
  border: true,
30
30
  preset: "small / strong",
@@ -35,10 +35,10 @@ export const VersionSwitcherRoot = defineComponent("VersionSwitcher", {
35
35
  // eslint-disable-next-line tasty/no-style-spread
36
36
  ...versionSelectStyles.Panel,
37
37
  positionAnchor: "--version-trigger",
38
- blockInset: "(anchor(bottom) + $gap) start, auto end",
38
+ blockInset: "(anchor(bottom) + 1x) start, auto end",
39
39
  inlineInset: {
40
- "": "anchor(left) start, auto end",
41
- "!@md": "auto start, anchor(right) end",
40
+ "": "anchor(start) start, auto end",
41
+ "!@md": "auto start, anchor(end) end",
42
42
  },
43
43
  },
44
44
  },
@@ -17,6 +17,8 @@ interface PreviewProps {
17
17
  scripts?: string[];
18
18
  /** The frame's minimum height as a CSS length, such as `18rem`; defaults to `10rem`. */
19
19
  height?: string;
20
+ /** Room below the content of a preview that runs scripts, as a CSS length such as `12rem`, for overlays like a listbox; defaults to `0`. */
21
+ buffer?: string;
20
22
  }
21
23
  type StepsProps = Record<string, never>;
22
24
  interface TabsProps {
@@ -1 +1 @@
1
- {"version":3,"file":"props.d.ts","names":[],"sources":["../../src/components/props.ts"],"mappings":";UAAiB;EACf;EACA;;UAEe;EACf;EACA;EACA;;UAEe;EACf;EACA;EACA;EACA;;EAEA;;EAEA;;KAEU,aAAa;UACR;EACf;;UAEe;EACf;;UAEe;EACf;EACA;;UAEe;EACf;EACA,OAAO;IAAQ;IAAe;IAAc"}
1
+ {"version":3,"file":"props.d.ts","names":[],"sources":["../../src/components/props.ts"],"mappings":";UAAiB;EACf;EACA;;UAEe;EACf;EACA;EACA;;UAEe;EACf;EACA;EACA;EACA;;EAEA;;EAEA;;EAEA;;KAEU,aAAa;UACR;EACf;;UAEe;EACf;;UAEe;EACf;EACA;;UAEe;EACf;EACA,OAAO;IAAQ;IAAe;IAAc"}
@@ -16,6 +16,8 @@ export interface PreviewProps {
16
16
  scripts?: string[];
17
17
  /** The frame's minimum height as a CSS length, such as `18rem`; defaults to `10rem`. */
18
18
  height?: string;
19
+ /** Room below the content of a preview that runs scripts, as a CSS length such as `12rem`, for overlays like a listbox; defaults to `0`. */
20
+ buffer?: string;
19
21
  }
20
22
  export type StepsProps = Record<string, never>;
21
23
  export interface TabsProps {
@@ -11,7 +11,7 @@ export function selectPopoverStyles({
11
11
  display: "flex",
12
12
  alignItems: "center",
13
13
  justifyContent: "center",
14
- gap: "($gap * 0.5)",
14
+ gap: "0.5x",
15
15
  color: "#text-soft",
16
16
  radius: "$header-control-radius",
17
17
  preset: "small",
@@ -21,11 +21,11 @@ export function selectPopoverStyles({
21
21
  $: "> button",
22
22
  color: {
23
23
  "": null,
24
- "@own(:hover) | :has([popover]:is(:popover-open))": "#text",
24
+ "@own(:hover) | :has([popover]:popover-open)": "#text",
25
25
  },
26
26
  fill: {
27
27
  "": null,
28
- "@own(:hover) | :has([popover]:is(:popover-open))": "#surface-2-hover",
28
+ "@own(:hover) | :has([popover]:popover-open)": "#surface-2-hover",
29
29
  },
30
30
  },
31
31
  TriggerLabel: {
@@ -44,15 +44,15 @@ export function selectPopoverStyles({
44
44
  $: '> [data-element="Panel"]',
45
45
  position: "fixed",
46
46
  inset: "auto",
47
- inlineSize: "min(15rem, calc(100vw - 2 * $docs-nav-pad-x))",
48
- blockSize: "max (100dvh - $docs-nav-height - $gap)",
47
+ inlineSize: "min(15rem, (100vw - 2 * $docs-nav-pad-x))",
48
+ blockSize: "max (100dvh - $docs-nav-height - 1x)",
49
49
  overflowY: "auto",
50
50
  margin: "0",
51
- padding: "$gap",
51
+ padding: "1x",
52
52
  color: "#text",
53
53
  fill: "#surface-2",
54
54
  border: true,
55
- radius: "$card-radius",
55
+ radius: "1cr",
56
56
  shadow: "0 0.75rem 2rem #shadow",
57
57
  opacity: "0",
58
58
  scale: "1 0.96",
@@ -67,28 +67,28 @@ export function selectPopoverStyles({
67
67
  $: '> [data-element="Panel"]',
68
68
  opacity: {
69
69
  "": null,
70
- "@own(:is(:popover-open) & [data-open])": "1",
70
+ "@own(:popover-open & [data-open])": "1",
71
71
  },
72
- scale: { "": null, "@own(:is(:popover-open) & [data-open])": "1" },
72
+ scale: { "": null, "@own(:popover-open & [data-open])": "1" },
73
73
  },
74
74
  PanelTitle: {
75
75
  $: "PanelTitle",
76
- padding: "($gap * 0.75) $gap",
76
+ padding: "0.75x 1x",
77
77
  color: "#text-muted",
78
78
  preset: "small / strong",
79
79
  },
80
- Options: { $: "nav", display: "grid", gap: "($gap * 0.25)" },
80
+ Options: { $: "nav", display: "grid", gap: "0.25x" },
81
81
  [option]: {
82
82
  $: "nav a",
83
83
  display: "flex",
84
84
  alignItems: "center",
85
- gap: "$gap",
85
+ gap: "1x",
86
86
  blockSize: "min 2.25rem",
87
- padding: "($gap * 0.75) $gap",
87
+ padding: "0.75x 1x",
88
88
  color: "#text-soft",
89
89
  preset: "small",
90
90
  textDecoration: "none",
91
- radius: "$radius",
91
+ radius: "1r",
92
92
  },
93
93
  [hoverOption]: {
94
94
  $: "nav a",
@@ -1 +1 @@
1
- {"version":3,"file":"define-component.d.ts","names":[],"sources":["../src/define-component.ts"],"mappings":";;;KAwBK,eAAe,QAEhB,cAAc,KAAK,sBACf,aAAa,WAAW,QACtB,EAAE,cAAc,qBACd,+BAIP,EAAE;KAGF,cAAc,mBAAmB,8BACpC,4BACI,aACA;EAAqB,WAAW;IAC9B,kBAAkB,IAAI,oBACpB;KAKL,YAAY,UAAU,yBACxB,cAAc,IAAI,0BACjB,gBAAgB,gBAAgB,cAAc,EAAE,WAC9C,cACE,cAAc,EAAE,qBAAqB,wBACjC,sBAAsB,cAAc,EAAE;;iBAOlC,gBAAgB,UAAU,oBACxC,cACA,MAAM,GACN,SAAS,QAAQ,KAAK,eAAe;EACnC,SAAS;IAEV,cAAc,eAAe,MAAM,eAAe;;iBAcrC,gBACd,0BAA0B,oBAC1B,UAAU,YACV,UAAU,qBAAqB,uBAC/B,eAAe,qBACf,UAAU,kCACV,WAAW,oCAEX,cACA,SAAS,oBAAoB,GAAG,GAAG,GAAG,QAAQ,GAAG,MAChD,0BAA0B,QAAQ,GAAG,GAAG,GAAG,MAAM,YAAY"}
1
+ {"version":3,"file":"define-component.d.ts","names":[],"sources":["../src/define-component.ts"],"mappings":";;;KAuBK,eAAe,QAEhB,cAAc,KAAK,sBACf,aAAa,WAAW,QACtB,EAAE,cAAc,qBACd,+BAIP,EAAE;KAGF,cAAc,mBAAmB,8BACpC,4BACI,aACA;EAAqB,WAAW;IAC9B,kBAAkB,IAAI,oBACpB;KAKL,YAAY,UAAU,yBACxB,cAAc,IAAI,0BACjB,gBAAgB,gBAAgB,cAAc,EAAE,WAC9C,cACE,cAAc,EAAE,qBAAqB,wBACjC,sBAAsB,cAAc,EAAE;;iBAOlC,gBAAgB,UAAU,oBACxC,cACA,MAAM,GACN,SAAS,QAAQ,KAAK,eAAe;EACnC,SAAS;IAEV,cAAc,eAAe,MAAM,eAAe;;iBAUrC,gBACd,0BAA0B,oBAC1B,UAAU,YACV,UAAU,qBAAqB,uBAC/B,eAAe,qBACf,UAAU,kCACV,WAAW,oCAEX,cACA,SAAS,oBAAoB,GAAG,GAAG,GAAG,QAAQ,GAAG,MAChD,0BAA0B,QAAQ,GAAG,GAAG,GAAG,MAAM,YAAY"}