@tenphi/renderer 0.21.1 → 0.21.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/dist/component-styles-DstqPFf3.js +21 -0
  2. package/dist/component-styles-DstqPFf3.js.map +1 -0
  3. package/dist/components/Banner.styles.js +19 -0
  4. package/dist/components/Button.styles.d.ts +9 -0
  5. package/dist/components/Button.styles.js +14 -0
  6. package/dist/components/Callout.astro +1 -1
  7. package/dist/components/Callout.styles.js +54 -0
  8. package/dist/components/Card.astro +4 -4
  9. package/dist/components/Card.styles.js +64 -0
  10. package/dist/components/CodeGroup.astro +9 -4
  11. package/dist/components/CodeGroup.styles.js +27 -0
  12. package/dist/components/Document.styles.js +230 -0
  13. package/dist/components/EditLink.astro +1 -1
  14. package/dist/components/Footer.styles.js +45 -0
  15. package/dist/components/Header.styles.js +96 -0
  16. package/dist/components/HeaderFrame.styles.js +20 -0
  17. package/dist/components/HeaderLinks.astro +2 -2
  18. package/dist/components/HeaderLinks.styles.js +149 -0
  19. package/dist/components/Hero.styles.js +129 -0
  20. package/dist/components/LanguageSelect.styles.js +169 -0
  21. package/dist/components/LastUpdated.astro +1 -1
  22. package/dist/components/Logo.astro +4 -8
  23. package/dist/components/Logo.styles.js +27 -0
  24. package/dist/components/MainContent.styles.js +38 -0
  25. package/dist/components/MainPane.styles.js +19 -0
  26. package/dist/components/MarkdownAlert.styles.js +61 -0
  27. package/dist/components/MarkdownCodeBlock.styles.js +131 -0
  28. package/dist/components/MarkdownContent.styles.js +231 -0
  29. package/dist/components/MarkdownHeading.styles.js +117 -0
  30. package/dist/components/MarkdownInlineCode.styles.js +19 -0
  31. package/dist/components/MarkdownTable.styles.js +58 -0
  32. package/dist/components/Mermaid.styles.js +50 -0
  33. package/dist/components/MermaidSource.styles.js +21 -0
  34. package/dist/components/MobileMenuFooter.styles.js +27 -0
  35. package/dist/components/MobileMenuToggle.styles.js +49 -0
  36. package/dist/components/MobileNavigationTabs.astro +1 -2
  37. package/dist/components/MobileNavigationTabs.styles.js +88 -0
  38. package/dist/components/MobileTableOfContents.styles.js +59 -0
  39. package/dist/components/PackageVersion.astro +1 -2
  40. package/dist/components/PackageVersion.styles.js +23 -0
  41. package/dist/components/PageActions.astro +2 -2
  42. package/dist/components/PageActions.styles.js +51 -0
  43. package/dist/components/PageFrame.styles.js +34 -0
  44. package/dist/components/Pagination.astro +3 -2
  45. package/dist/components/Pagination.styles.js +126 -0
  46. package/dist/components/Preview.astro +2 -6
  47. package/dist/components/Preview.styles.js +78 -0
  48. package/dist/components/Search.styles.js +132 -0
  49. package/dist/components/SearchButton.styles.js +68 -0
  50. package/dist/components/SearchResults.styles.js +200 -0
  51. package/dist/components/SelectPopover.astro +1 -0
  52. package/dist/components/Sidebar.styles.js +309 -0
  53. package/dist/components/SiteLogo.astro +1 -2
  54. package/dist/components/SiteLogo.styles.js +32 -0
  55. package/dist/components/SiteTitle.astro +1 -1
  56. package/dist/components/SkipLink.styles.js +24 -0
  57. package/dist/components/SocialIcons.styles.js +36 -0
  58. package/dist/components/Steps.astro +2 -2
  59. package/dist/components/Steps.styles.js +25 -0
  60. package/dist/components/SyntaxHighlight.styles.js +87 -0
  61. package/dist/components/Tab.astro +1 -1
  62. package/dist/components/Tab.styles.js +30 -0
  63. package/dist/components/TableOfContents.styles.js +62 -0
  64. package/dist/components/TableOfContentsLayout.styles.js +38 -0
  65. package/dist/components/Tabs.astro +1 -1
  66. package/dist/components/Tabs.styles.js +60 -0
  67. package/dist/components/ThemeSelect.styles.js +177 -0
  68. package/dist/components/TopNavigation.styles.js +52 -0
  69. package/dist/components/VersionSwitcher.astro +2 -2
  70. package/dist/components/VersionSwitcher.styles.js +45 -0
  71. package/dist/components/component-styles.test.ts +0 -10
  72. package/dist/components/component-styles.ts +0 -7
  73. package/dist/components/inherit-component-parts.d.ts +1 -0
  74. package/dist/components/inherit-component-parts.js +7 -0
  75. package/dist/components/select-popover-styles.js +34 -16
  76. package/dist/components/tasty-states.js +13 -1
  77. package/dist/define-component-BP4YwMak.js +28 -0
  78. package/dist/define-component-BP4YwMak.js.map +1 -0
  79. package/dist/define-component.d.ts +17 -0
  80. package/dist/define-component.d.ts.map +1 -0
  81. package/dist/define-component.js +2 -0
  82. package/dist/eslint-plugin.d.ts +5 -0
  83. package/dist/eslint-plugin.d.ts.map +1 -1
  84. package/dist/eslint-plugin.js +26 -3
  85. package/dist/eslint-plugin.js.map +1 -1
  86. package/dist/index.d.ts.map +1 -1
  87. package/dist/index.js +7 -3
  88. package/dist/index.js.map +1 -1
  89. package/dist/overrides/Footer.astro +6 -5
  90. package/dist/overrides/Header.astro +13 -17
  91. package/dist/overrides/Hero.astro +3 -2
  92. package/dist/overrides/LanguageSelect.astro +3 -3
  93. package/dist/overrides/MarkdownContent.astro +7 -1
  94. package/dist/overrides/MobileMenuFooter.astro +2 -5
  95. package/dist/overrides/MobileMenuToggle.astro +4 -3
  96. package/dist/overrides/MobileTableOfContents.astro +2 -2
  97. package/dist/overrides/PageFrame.astro +9 -11
  98. package/dist/overrides/Search.astro +13 -9
  99. package/dist/overrides/Sidebar.astro +4 -1
  100. package/dist/overrides/SocialIcons.astro +2 -2
  101. package/dist/overrides/ThemeSelect.astro +9 -3
  102. package/dist/routes/Page.astro +22 -11
  103. package/dist/styling.d.ts +5 -10
  104. package/dist/styling.d.ts.map +1 -1
  105. package/dist/styling.js +18 -11
  106. package/dist/styling.js.map +1 -1
  107. package/dist/tasty-states-_JhxFdK1.js +47 -0
  108. package/dist/tasty-states-_JhxFdK1.js.map +1 -0
  109. package/dist/theme/defaults.d.ts.map +1 -1
  110. package/dist/theme/defaults.js +22 -1
  111. package/dist/theme/defaults.js.map +1 -1
  112. package/dist/theme/tasty-config.d.ts +23 -1
  113. package/dist/theme/tasty-config.d.ts.map +1 -1
  114. package/dist/theme/tasty-config.js +23 -1
  115. package/dist/theme/tasty-config.js.map +1 -1
  116. package/package.json +4 -4
  117. package/dist/components/GlobalStyles.js +0 -1792
  118. package/dist/components/LayoutComponents.js +0 -872
  119. package/dist/components/TastyComponents.js +0 -269
  120. package/dist/components/customize-component.js +0 -8
  121. package/dist/tasty-states-rTLFy26t.js +0 -57
  122. package/dist/tasty-states-rTLFy26t.js.map +0 -1
@@ -0,0 +1,20 @@
1
+ import { configureCookbookStates } from "./tasty-states.js";
2
+ import { defineComponent } from "../define-component.js";
3
+
4
+ configureCookbookStates();
5
+
6
+ export const HeaderFrameRoot = defineComponent("HeaderFrame", {
7
+ as: "header",
8
+ "data-element": "HeaderFrame",
9
+ styles: {
10
+ position: "fixed",
11
+ zIndex: "10",
12
+ inset: "0 0 auto",
13
+ inlineSize: "100%",
14
+ blockSize: "$docs-nav-height",
15
+ padding: "0 $docs-nav-pad-x",
16
+ blockBorder: "$border-width solid #border end",
17
+ fill: "#header",
18
+ backdropFilter: "blur(16px)",
19
+ },
20
+ });
@@ -3,7 +3,7 @@ import { messages } from "../localization.js";
3
3
  import { localeHref, routeLocale } from "../localization.js";
4
4
  import { navigationPath } from "../navigation.js";
5
5
  import { content } from "virtual:cookbook/config";
6
- import { HeaderLinksRoot } from "./LayoutComponents.js";
6
+ import { HeaderLinksRoot } from "./HeaderLinks.styles.js";
7
7
 
8
8
  const links = content.site.headerLinks ?? [];
9
9
  const base = import.meta.env.BASE_URL.replace(/\/$/, "");
@@ -22,7 +22,7 @@ const ui = messages(Astro.locals.cookbookRoute?.lang ?? "en", content);
22
22
 
23
23
  {
24
24
  links.length > 0 && (
25
- <HeaderLinksRoot data-tasty-anatomy="HeaderLinks">
25
+ <HeaderLinksRoot>
26
26
  <nav class="td-header-links__desktop" aria-label={ui.headerLinks}>
27
27
  {links.map((link) => (
28
28
  <a
@@ -0,0 +1,149 @@
1
+ import { configureCookbookStates } from "./tasty-states.js";
2
+ import { defineComponent } from "../define-component.js";
3
+
4
+ configureCookbookStates();
5
+
6
+ export const HeaderLinksRoot = defineComponent("HeaderLinks", {
7
+ as: "cookbook-header-links",
8
+ "data-element": "HeaderLinks",
9
+ styles: {
10
+ display: "flex",
11
+ flexShrink: "0",
12
+ order: { "": "0", "@mobile": "2" },
13
+ "$popover-transition": "120ms",
14
+ Desktop: {
15
+ $: ".td-header-links__desktop",
16
+ display: "flex",
17
+ hide: { "": false, "@mobile": true },
18
+ alignItems: "center",
19
+ gap: "($gap * 0.5)",
20
+ },
21
+ Link: {
22
+ $: "a",
23
+ display: "flex",
24
+ alignItems: "center",
25
+ justifyContent: "center",
26
+ blockSize: "min $control-height",
27
+ padding: "$gap ($gap * 1.25)",
28
+ radius: "$radius",
29
+ color: "#text-soft",
30
+ fill: "#clear",
31
+ preset: "small / strong",
32
+ textDecoration: "none",
33
+ whiteSpace: "nowrap",
34
+ },
35
+ DesktopLink: {
36
+ $: ".td-header-links__desktop a",
37
+ radius: "$header-control-radius",
38
+ inlinePadding: "($gap * 2)",
39
+ },
40
+ HoverLink: {
41
+ $: "a",
42
+ color: { "": null, "@own(:hover)": "#text" },
43
+ fill: { "": null, "@own(:hover)": "#surface-2-hover" },
44
+ },
45
+ PrimaryLink: {
46
+ $: "a",
47
+ color: {
48
+ "": null,
49
+ '@own([data-variant="primary"])': "#accent-surface-text",
50
+ },
51
+ fill: { "": null, '@own([data-variant="primary"])': "#accent-surface" },
52
+ },
53
+ HoverPrimaryLink: {
54
+ $: "a",
55
+ filter: {
56
+ "": null,
57
+ '@own([data-variant="primary"] & :hover)': "brightness(1.1)",
58
+ },
59
+ },
60
+ Trigger: {
61
+ $: ".td-header-links__trigger",
62
+ display: "grid",
63
+ hide: { "": true, "@mobile": false },
64
+ placeItems: "center",
65
+ inlineSize: "$docs-menu-button-size",
66
+ blockSize: "$docs-menu-button-size",
67
+ padding: "0",
68
+ border: "0",
69
+ radius: "$header-control-radius",
70
+ color: "#text-soft",
71
+ fill: "#clear",
72
+ },
73
+ HoverTrigger: {
74
+ $: ".td-header-links__trigger",
75
+ color: { "": null, "@own(:hover)": "#text" },
76
+ fill: { "": null, "@own(:hover)": "#surface-2-hover" },
77
+ },
78
+ Panel: {
79
+ $: ".td-header-links__panel",
80
+ position: "fixed",
81
+ inset: "0.5rem $docs-nav-pad-x auto auto",
82
+ inlineSize: "min(20rem, calc(100vw - 2 * $docs-nav-pad-x))",
83
+ blockSize: "max (100dvh - 1rem)",
84
+ overflowY: "auto",
85
+ margin: "0",
86
+ padding: "$gap",
87
+ color: "#text",
88
+ fill: "#surface",
89
+ border: true,
90
+ radius: "$card-radius",
91
+ shadow: "0 0.75rem 2rem #shadow",
92
+ opacity: "0",
93
+ scale: "1 0.96",
94
+ transformOrigin: "top",
95
+ transition: {
96
+ "": "none",
97
+ "!@reduced-motion":
98
+ "opacity $popover-transition ease-out, scale $popover-transition ease-out, display $popover-transition allow-discrete, overlay $popover-transition allow-discrete",
99
+ },
100
+ },
101
+ OpenPanel: {
102
+ $: ".td-header-links__panel",
103
+ opacity: { "": null, "@own(@popover-open & [data-open])": "1" },
104
+ scale: { "": null, "@own(@popover-open & [data-open])": "1" },
105
+ },
106
+ PanelNavigation: {
107
+ $: ".td-header-links__panel nav",
108
+ display: "grid",
109
+ gap: "1bw",
110
+ },
111
+ PanelLink: {
112
+ $: ".td-header-links__panel a",
113
+ justifyContent: "flex-start",
114
+ blockSize: "min $docs-menu-button-size",
115
+ inlinePadding: "($gap * 1.5)",
116
+ preset: "navigation",
117
+ textAlign: "start",
118
+ whiteSpace: "normal",
119
+ overflowWrap: "anywhere",
120
+ },
121
+ FirstPanelLink: {
122
+ $: ".td-header-links__panel a",
123
+ inlinePadding: {
124
+ "": null,
125
+ "@own(:is(.td-header-links__panel a:first-child))":
126
+ "($gap * 1.5) start, ($docs-menu-button-size + $gap) end",
127
+ },
128
+ },
129
+ Close: {
130
+ $: ".td-header-links__close",
131
+ position: "absolute",
132
+ inset: "$gap $gap auto auto",
133
+ display: "grid",
134
+ placeItems: "center",
135
+ inlineSize: "$docs-menu-button-size",
136
+ blockSize: "$docs-menu-button-size",
137
+ padding: "0",
138
+ border: "0",
139
+ color: "#text-soft",
140
+ fill: "#clear",
141
+ radius: "$header-control-radius",
142
+ },
143
+ HoverClose: {
144
+ $: ".td-header-links__close",
145
+ color: { "": null, "@own(:hover)": "#text" },
146
+ fill: { "": null, "@own(:hover)": "#surface-2-hover" },
147
+ },
148
+ },
149
+ });
@@ -0,0 +1,129 @@
1
+ import { configureCookbookStates } from "./tasty-states.js";
2
+ import { defineComponent } from "../define-component.js";
3
+
4
+ configureCookbookStates();
5
+
6
+ export const HeroRoot = defineComponent("Hero", {
7
+ as: "div",
8
+ "data-element": "Hero",
9
+ styles: {
10
+ display: "grid",
11
+ gridColumns: {
12
+ "": "minmax(0, 7fr) minmax(12rem, 4fr)",
13
+ "@mobile": "minmax(0, 1fr)",
14
+ },
15
+ alignItems: "center",
16
+ gap: "clamp(2rem, 5vw, 5rem)",
17
+ blockPadding: {
18
+ "": "clamp(3rem, 8vw, 7rem) start, clamp(2rem, 6vw, 5rem) end",
19
+ "@mobile": "($gap * 4) start, clamp(2rem, 6vw, 5rem) end",
20
+ },
21
+ Visual: {
22
+ $: "> img, > .hero-html",
23
+ order: { "": "2", "@mobile": "0" },
24
+ display: "grid",
25
+ placeItems: "center",
26
+ inlineSize: "min(100%, 22rem)",
27
+ blockSize: "auto",
28
+ objectFit: "contain",
29
+ inlineMargin: "auto",
30
+ color: "#logo-surface",
31
+ },
32
+ DarkVisual: {
33
+ $: "> img",
34
+ hide: {
35
+ "": null,
36
+ '@own([data-hero-image="dark"])': false,
37
+ '(@own([data-hero-image="dark"])) & (@light)': true,
38
+ },
39
+ },
40
+ LightVisual: {
41
+ $: "> img",
42
+ hide: {
43
+ "": null,
44
+ '@own([data-hero-image="light"])': true,
45
+ '(@own([data-hero-image="light"])) & (@light)': false,
46
+ },
47
+ },
48
+ Stack: {
49
+ $: "> :is(.stack)",
50
+ display: "flex",
51
+ flow: "column",
52
+ alignItems: { "": "flex-start", "@mobile": "center" },
53
+ gap: "clamp(1.5rem, 3vw, 2rem)",
54
+ textAlign: { "": "start", "@mobile": "center" },
55
+ },
56
+ Copy: {
57
+ $: "> :is(.stack) > :is(.copy)",
58
+ display: "flex",
59
+ flow: "column",
60
+ alignItems: "inherit",
61
+ gap: "($gap * 2)",
62
+ },
63
+ Title: {
64
+ $: "h1",
65
+ inlineSize: "max 16ch",
66
+ margin: "0",
67
+ color: "#heading",
68
+ preset: "hero-title",
69
+ textWrap: "balance",
70
+ },
71
+ Tagline: {
72
+ $: ":is(.tagline)",
73
+ inlineSize: "max 48ch",
74
+ color: "#text-soft",
75
+ preset: "hero-tagline",
76
+ textWrap: "balance",
77
+ },
78
+ Actions: {
79
+ $: ":is(.actions)",
80
+ display: "flex",
81
+ flow: "row wrap",
82
+ justifyContent: { "": "flex-start", "@mobile": "center" },
83
+ gap: "($gap * 1.5)",
84
+ },
85
+ Action: {
86
+ $: ".cookbook-link-button",
87
+ display: "inline-flex",
88
+ alignItems: "center",
89
+ blockSize: "min $control-height",
90
+ padding: "($gap * 1.25) ($gap * 2.5)",
91
+ gap: "$gap",
92
+ color: "#text",
93
+ border: true,
94
+ radius: "999px",
95
+ fill: "#surface-2",
96
+ preset: "navigation / strong",
97
+ textDecoration: "none",
98
+ transition: "fill $transition, translate $transition",
99
+ },
100
+ HoverAction: {
101
+ $: ".cookbook-link-button",
102
+ fill: { "": null, "@own(:hover)": "#surface-2-hover" },
103
+ translate: { "": null, "@own(:hover)": "0 -1px" },
104
+ },
105
+ PrimaryAction: {
106
+ $: ".cookbook-link-button.primary",
107
+ color: "#accent-surface-text",
108
+ // Recolor only; Action owns the border width and style, including theme overrides.
109
+ // eslint-disable-next-line tasty/prefer-shorthand-property
110
+ borderColor: "#accent-surface",
111
+ fill: "#accent-surface",
112
+ },
113
+ SecondaryAction: {
114
+ $: ".cookbook-link-button.secondary",
115
+ color: "#accent-text",
116
+ // Recolor only; Action owns the border width and style, including theme overrides.
117
+ // eslint-disable-next-line tasty/prefer-shorthand-property
118
+ borderColor: "#border-strong",
119
+ },
120
+ MinimalAction: {
121
+ $: ".cookbook-link-button.minimal",
122
+ inlinePadding: "0",
123
+ color: "#accent-text",
124
+ border: "0",
125
+ fill: "#clear",
126
+ },
127
+ ActionIcon: { $: ".cookbook-link-button svg", flexShrink: "0" },
128
+ },
129
+ });
@@ -0,0 +1,169 @@
1
+ import { selectPopoverStyles } from "./select-popover-styles.js";
2
+ import { configureCookbookStates } from "./tasty-states.js";
3
+ import { defineComponent } from "../define-component.js";
4
+
5
+ configureCookbookStates();
6
+
7
+ const languageSelectStyles = selectPopoverStyles();
8
+
9
+ export const LanguageSelectRoot = defineComponent("LanguageSelect", {
10
+ as: "cookbook-language-select",
11
+ "data-element": "LanguageSelect",
12
+ styles: {
13
+ display: "flex",
14
+ flexShrink: "0",
15
+ // Shared selector defaults are resolved once during server-side module evaluation.
16
+ // eslint-disable-next-line tasty/no-runtime-styles-mutation
17
+ "$popover-transition": languageSelectStyles["$popover-transition"],
18
+ Trigger: {
19
+ // Reuse the shared, server-only popover anatomy.
20
+ // eslint-disable-next-line tasty/no-style-spread
21
+ ...languageSelectStyles.Trigger,
22
+ inlineSize: "8rem",
23
+ blockSize: "$control-height",
24
+ padding: "0 $gap",
25
+ fill: "#clear",
26
+ border: "0",
27
+ transition: "color $transition, fill $transition",
28
+ },
29
+ HoverTrigger: {
30
+ // Reuse the shared, server-only popover anatomy.
31
+ // eslint-disable-next-line tasty/no-style-spread
32
+ ...languageSelectStyles.HoverTrigger,
33
+ },
34
+ ActiveTrigger: {
35
+ $: "> button",
36
+ color: { "": null, "@own(:active)": "#text" },
37
+ fill: { "": null, "@own(:active)": "#surface-2-pressed" },
38
+ },
39
+ LabelIcon: {
40
+ $: "> button > .label-icon",
41
+ display: "block",
42
+ flexShrink: "0",
43
+ inlineSize: { "": "1.25rem", "@mobile": "1.125rem" },
44
+ blockSize: { "": "1.25rem", "@mobile": "1.125rem" },
45
+ },
46
+ TriggerLabel: {
47
+ // Reuse the shared, server-only popover anatomy.
48
+ // eslint-disable-next-line tasty/no-style-spread
49
+ ...languageSelectStyles.TriggerLabel,
50
+ },
51
+ Caret: {
52
+ // Reuse the shared, server-only popover anatomy.
53
+ // eslint-disable-next-line tasty/no-style-spread
54
+ ...languageSelectStyles.Caret,
55
+ },
56
+ CompactTrigger: {
57
+ $: "& > button",
58
+ inlineSize: { "": null, "[data-compact]": "$docs-menu-button-size" },
59
+ blockSize: { "": null, "[data-compact]": "$docs-menu-button-size" },
60
+ padding: { "": null, "[data-compact]": "0" },
61
+ },
62
+ CompactLabel: {
63
+ $: "& > button > .trigger-label",
64
+ hide: { "": null, "[data-compact]": true },
65
+ },
66
+ CompactCaret: {
67
+ $: "& > button > :is(.caret)",
68
+ hide: { "": null, "[data-compact]": true },
69
+ },
70
+ Label: { $: "> button" },
71
+ HoverLabel: {
72
+ // Preserve the conditional scope of this empty legacy customization hook.
73
+ // eslint-disable-next-line tasty/no-state-in-selector
74
+ $: "> button:hover",
75
+ },
76
+ Select: { $: "> button" },
77
+ CompactSelect: {
78
+ // Preserve the conditional scope of this empty legacy customization hook.
79
+ // eslint-disable-next-line tasty/no-state-in-selector
80
+ $: "&[data-compact] > button",
81
+ },
82
+ CompactLabelIcon: {
83
+ // Preserve the conditional scope of this empty legacy customization hook.
84
+ // eslint-disable-next-line tasty/no-state-in-selector
85
+ $: "&[data-compact] > button > .label-icon",
86
+ },
87
+ SidebarTrigger: {
88
+ $: "& > button",
89
+ anchorName: { "": null, "[data-sidebar]": "--language-trigger" },
90
+ },
91
+ Panel: {
92
+ // Reuse the shared, server-only popover anatomy.
93
+ // eslint-disable-next-line tasty/no-style-spread
94
+ ...languageSelectStyles.Panel,
95
+ blockInset: { "": "4rem start", "@mobile": "3.5rem start" },
96
+ inlineInset:
97
+ "max($docs-nav-pad-x, ((100vw - $layout-width) / 2 + $docs-sidebar-pad-x)) end",
98
+ },
99
+ SidebarPanel: {
100
+ $: '& > [data-element="Panel"]',
101
+ positionAnchor: {
102
+ "": null,
103
+ "[data-sidebar]": "--language-trigger",
104
+ },
105
+ blockInset: {
106
+ "": null,
107
+ "[data-sidebar]": "auto start, anchor(top) end",
108
+ },
109
+ blockMargin: { "": null, "[data-sidebar]": "$gap end" },
110
+ inlineInset: {
111
+ "": null,
112
+ "[data-sidebar]": "$gap start, auto end",
113
+ },
114
+ inlineSize: {
115
+ "": null,
116
+ "[data-sidebar]": "min(20rem, calc(100vw - 4rem))",
117
+ },
118
+ blockSize: {
119
+ "": null,
120
+ "[data-sidebar]": "max (100dvh - 8rem)",
121
+ },
122
+ transformOrigin: {
123
+ "": null,
124
+ "[data-sidebar]": "bottom",
125
+ },
126
+ },
127
+ OpenPanel: {
128
+ // Reuse the shared, server-only popover anatomy.
129
+ // eslint-disable-next-line tasty/no-style-spread
130
+ ...languageSelectStyles.OpenPanel,
131
+ },
132
+ PanelTitle: {
133
+ // Reuse the shared, server-only popover anatomy.
134
+ // eslint-disable-next-line tasty/no-style-spread
135
+ ...languageSelectStyles.PanelTitle,
136
+ },
137
+ Options: {
138
+ // Reuse the shared, server-only popover anatomy.
139
+ // eslint-disable-next-line tasty/no-style-spread
140
+ ...languageSelectStyles.Options,
141
+ },
142
+ Option: {
143
+ // Reuse the shared, server-only popover anatomy.
144
+ // eslint-disable-next-line tasty/no-style-spread
145
+ ...languageSelectStyles.Option,
146
+ },
147
+ HoverOption: {
148
+ // Reuse the shared, server-only popover anatomy.
149
+ // eslint-disable-next-line tasty/no-style-spread
150
+ ...languageSelectStyles.HoverOption,
151
+ },
152
+ CurrentOption: {
153
+ // Reuse the shared, server-only popover anatomy.
154
+ // eslint-disable-next-line tasty/no-style-spread
155
+ ...languageSelectStyles.CurrentOption,
156
+ },
157
+ Fallback: { $: ".fallback-label", color: "#text-muted" },
158
+ Checkmark: {
159
+ // Reuse the shared, server-only popover anatomy.
160
+ // eslint-disable-next-line tasty/no-style-spread
161
+ ...languageSelectStyles.Checkmark,
162
+ },
163
+ SelectedCheckmark: {
164
+ // Reuse the shared, server-only popover anatomy.
165
+ // eslint-disable-next-line tasty/no-style-spread
166
+ ...languageSelectStyles.SelectedCheckmark,
167
+ },
168
+ },
169
+ });
@@ -4,7 +4,7 @@ const { lang, lastUpdated } = Astro.locals.cookbookRoute;
4
4
 
5
5
  {
6
6
  lastUpdated && (
7
- <p>
7
+ <p data-element="MetaUpdated">
8
8
  {Astro.locals.t("page.lastUpdated")}{" "}
9
9
  <time datetime={lastUpdated.toISOString()}>
10
10
  {lastUpdated.toLocaleDateString(lang, {
@@ -1,5 +1,5 @@
1
1
  ---
2
- import { LogoRoot } from "./LayoutComponents.js";
2
+ import { LogoRoot } from "./Logo.styles.js";
3
3
 
4
4
  import type { LogoProps as Props } from "./props.js";
5
5
 
@@ -10,11 +10,7 @@ const {
10
10
  } = Astro.props;
11
11
  ---
12
12
 
13
- <LogoRoot
14
- className={className}
15
- aria-hidden={decorative ? "true" : undefined}
16
- data-tasty-anatomy="Logo"
17
- >
13
+ <LogoRoot className={className} aria-hidden={decorative ? "true" : undefined}>
18
14
  <svg
19
15
  xmlns="http://www.w3.org/2000/svg"
20
16
  viewBox="0 0 64 64"
@@ -24,12 +20,12 @@ const {
24
20
  >
25
21
  <rect width="64" height="64" rx="14" fill="currentColor"></rect>
26
22
  <path
27
- class="td-logo__mark"
23
+ data-element="Mark"
28
24
  fill="currentColor"
29
25
  d="M14.8 16c6.7.2 12.3 2 16.7 5.4v28.4c-4.4-3.1-10-4.7-16.6-4.9a3 3 0 0 1-2.9-3V19a3 3 0 0 1 2.8-3Z"
30
26
  ></path>
31
27
  <path
32
- class="td-logo__mark"
28
+ data-element="Mark"
33
29
  fill="currentColor"
34
30
  d="M49.2 16c-6.7.2-12.3 2-16.7 5.4v28.4c4.4-3.1 10-4.7 16.6-4.9a3 3 0 0 0 2.9-3V19a3 3 0 0 0-2.8-3Z"
35
31
  ></path>
@@ -0,0 +1,27 @@
1
+ import { configureCookbookStates } from "./tasty-states.js";
2
+ import { defineComponent } from "../define-component.js";
3
+
4
+ configureCookbookStates();
5
+
6
+ export const LogoRoot = defineComponent("Logo", {
7
+ as: "span",
8
+ "data-element": "Logo",
9
+ styles: {
10
+ display: "inline-grid",
11
+ flexGrow: "0",
12
+ flexShrink: "0",
13
+ flexBasis: "auto",
14
+ inlineSize: "4rem",
15
+ blockSize: "4rem",
16
+ color: "#logo-surface",
17
+ Svg: {
18
+ $: "> svg",
19
+ display: "block",
20
+ inlineSize: "100%",
21
+ blockSize: "100%",
22
+ },
23
+ Mark: {
24
+ color: "#logo-mark",
25
+ },
26
+ },
27
+ });
@@ -0,0 +1,38 @@
1
+ import { TASTY_SPACING_PROPERTIES } from "../theme/tasty-config.js";
2
+ import { configureCookbookStates } from "./tasty-states.js";
3
+ import { defineComponent } from "../define-component.js";
4
+
5
+ configureCookbookStates();
6
+
7
+ export const MainContentRoot = defineComponent("MainContent", {
8
+ as: "main",
9
+ "data-element": "MainContent",
10
+ styles: {
11
+ "@property": TASTY_SPACING_PROPERTIES,
12
+ padding: "0 0 5rem",
13
+ // Layout spacing is a default; generated Markdown owns prose spacing.
14
+ ContentSpacing: {
15
+ $: ":where(.content-panel > .cookbook-container) > * + *",
16
+ blockMargin: "$margin-block-start $margin-block-end",
17
+ "$margin-block-start": "($gap * 3)",
18
+ },
19
+ Container: {
20
+ $: ".content-panel > .cookbook-container",
21
+ inlineMargin: { "": "auto", "@narrow-layout": "0" },
22
+ inlineSize: "max $content-width",
23
+ },
24
+ Panel: {
25
+ $: ".content-panel",
26
+ "$padding-block-start": {
27
+ "": "($gap * 3)",
28
+ "@own(:nth-of-type(2))": "($gap * 2)",
29
+ },
30
+ "$padding-block-end": {
31
+ "": "($gap * 3)",
32
+ "@own(:first-of-type)": "($gap * 2)",
33
+ },
34
+ blockPadding: "$padding-block-start $padding-block-end",
35
+ inlinePadding: "$docs-content-pad-x",
36
+ },
37
+ },
38
+ });
@@ -0,0 +1,19 @@
1
+ import { configureCookbookStates } from "./tasty-states.js";
2
+ import { defineComponent } from "../define-component.js";
3
+
4
+ configureCookbookStates();
5
+
6
+ export const MainPaneRoot = defineComponent("MainPane", {
7
+ as: "div",
8
+ "data-element": "MainPane",
9
+ styles: {
10
+ order: { "": null, "[data-has-sidebar] & [data-has-toc]": "1" },
11
+ isolation: "isolate",
12
+ inlineSize: {
13
+ "": "0 100% initial",
14
+ "[data-has-sidebar] & [data-has-toc]":
15
+ "min(calc(100% - $sidebar-width), calc($content-width + (100% - $content-width - $sidebar-width) / 2))",
16
+ "([data-has-sidebar] & [data-has-toc]) & (@narrow-layout)": "100%",
17
+ },
18
+ },
19
+ });
@@ -0,0 +1,61 @@
1
+ import { useGlobalStyles } from "@tenphi/tasty";
2
+ import { resolveComponentStyles } from "./component-styles.js";
3
+ import { configureCookbookStates } from "./tasty-states.js";
4
+
5
+ configureCookbookStates();
6
+
7
+ export function MarkdownAlertStyles() {
8
+ useGlobalStyles(
9
+ ".cookbook-alert",
10
+ resolveComponentStyles("MarkdownAlert", {
11
+ padding: "($gap * 2) ($gap * 2.5)",
12
+ color: {
13
+ "": "#text-soft",
14
+ ".cookbook-alert--note": "#blue-text",
15
+ ".cookbook-alert--tip": "#green-text",
16
+ ".cookbook-alert--caution": "#warning-text",
17
+ ".cookbook-alert--danger": "#red-text",
18
+ },
19
+ border: {
20
+ "": true,
21
+ ".cookbook-alert--note": "#blue",
22
+ ".cookbook-alert--tip": "#green",
23
+ ".cookbook-alert--caution": "#warning",
24
+ ".cookbook-alert--danger": "#red",
25
+ },
26
+ radius: "$card-radius",
27
+ fill: {
28
+ "": "#surface-2",
29
+ ".cookbook-alert--note": "#blue-surface",
30
+ ".cookbook-alert--tip": "#green-surface",
31
+ ".cookbook-alert--caution": "#warning-surface",
32
+ ".cookbook-alert--danger": "#red-surface",
33
+ },
34
+ Title: {
35
+ $: ".cookbook-alert__title",
36
+ display: "flex",
37
+ alignItems: "center",
38
+ gap: "$gap",
39
+ "$margin-block-start": "0",
40
+ "$margin-block-end": "$gap",
41
+ blockMargin: "$margin-block-start $margin-block-end",
42
+ inlineMargin: "0",
43
+ color: "inherit",
44
+ preset: "strong",
45
+ },
46
+ FirstContent: {
47
+ $: ".cookbook-alert__content > *",
48
+ blockMargin: {
49
+ "": null,
50
+ "@own(:is(.cookbook-alert__content > :first-child))":
51
+ "$margin-block-start $margin-block-end",
52
+ },
53
+ "$margin-block-start": {
54
+ "": null,
55
+ "@own(:is(.cookbook-alert__content > :first-child))": "0",
56
+ },
57
+ },
58
+ }),
59
+ );
60
+ return null;
61
+ }