@rxova/astro-ui 0.4.0 → 0.5.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/package.json +2 -2
- package/src/starlight/index.ts +1 -4
- package/src/styles/starlight.css +8 -40
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rxova/astro-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Astro components, Starlight preset and shared chrome for rxova.org",
|
|
6
6
|
"keywords": [
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@astrojs/check": "^0.9.10",
|
|
54
54
|
"@astrojs/starlight": "^0.42.1",
|
|
55
|
-
"@rxova/repo-tooling": "0.0.
|
|
55
|
+
"@rxova/repo-tooling": "0.0.1",
|
|
56
56
|
"@types/node": "^26.6.1",
|
|
57
57
|
"@vitest/coverage-v8": "^5.0.1",
|
|
58
58
|
"astro": "^7.3.2",
|
package/src/starlight/index.ts
CHANGED
|
@@ -16,8 +16,6 @@ export interface SharedStarlightOptions {
|
|
|
16
16
|
components?: Record<string, string>
|
|
17
17
|
/** Path under the repo root that holds the docs site, for the edit link. */
|
|
18
18
|
editLinkBase?: string
|
|
19
|
-
/** Build body-only docs for rxova-website's shell: Starlight's page UI stays, the footer goes. */
|
|
20
|
-
pageComponent?: boolean
|
|
21
19
|
}
|
|
22
20
|
|
|
23
21
|
export function sharedStarlightConfig({
|
|
@@ -26,7 +24,6 @@ export function sharedStarlightConfig({
|
|
|
26
24
|
customCss = [],
|
|
27
25
|
components = {},
|
|
28
26
|
editLinkBase = 'apps/docs',
|
|
29
|
-
pageComponent = false,
|
|
30
27
|
}: SharedStarlightOptions) {
|
|
31
28
|
const self = getProject(project)
|
|
32
29
|
|
|
@@ -59,7 +56,7 @@ export function sharedStarlightConfig({
|
|
|
59
56
|
SocialIcons: '@rxova/astro-ui/starlight/SocialIcons.astro',
|
|
60
57
|
// Starlight's default footer (pagination, edit link, last updated) plus
|
|
61
58
|
// the shared four-column site footer beneath it.
|
|
62
|
-
|
|
59
|
+
Footer: '@rxova/astro-ui/starlight/Footer.astro',
|
|
63
60
|
// Starlight's own picker, plus a resync when a page is restored from the bfcache.
|
|
64
61
|
ThemeSelect: '@rxova/astro-ui/starlight/ThemeSelect.astro',
|
|
65
62
|
...components,
|
package/src/styles/starlight.css
CHANGED
|
@@ -65,46 +65,6 @@ header.header {
|
|
|
65
65
|
background: var(--sl-color-bg-nav);
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
/* In a schema-2 page bundle rxova-website renders the umbrella header outside `.page`; keep
|
|
69
|
-
Starlight's sticky docs bar below it. */
|
|
70
|
-
html[data-rxova-shell] {
|
|
71
|
-
--rx-shell-header-height: 3.5rem;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
html[data-rxova-shell] .page > header.header {
|
|
75
|
-
inset-block-start: var(--rx-shell-header-height);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
html[data-rxova-shell] .sidebar-pane {
|
|
79
|
-
inset-block-start: calc(var(--rx-shell-header-height) + var(--sl-nav-height));
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
html[data-rxova-shell] mobile-starlight-toc nav {
|
|
83
|
-
top: calc(var(--rx-shell-header-height) + var(--sl-nav-height) - 1px);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/* Starlight 0.42 dropped the <starlight-menu-button> wrapper for a bare
|
|
87
|
-
button.sl-menu-button; the peer range still covers the older markup. */
|
|
88
|
-
html[data-rxova-shell] starlight-menu-button button,
|
|
89
|
-
html[data-rxova-shell] .sl-menu-button {
|
|
90
|
-
top: calc(
|
|
91
|
-
var(--rx-shell-header-height) + (var(--sl-nav-height) - var(--sl-menu-button-size)) / 2
|
|
92
|
-
);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
@media (min-width: 72rem) {
|
|
96
|
-
html[data-rxova-shell] .right-sidebar {
|
|
97
|
-
top: var(--rx-shell-header-height);
|
|
98
|
-
height: calc(100vh - var(--rx-shell-header-height));
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
@media (max-width: 34rem) {
|
|
103
|
-
html[data-rxova-shell] {
|
|
104
|
-
--rx-shell-header-height: 3.25rem;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
68
|
/* Site title: the rxova mark sits beside the project wordmark. */
|
|
109
69
|
.rx-site-title {
|
|
110
70
|
display: flex;
|
|
@@ -185,6 +145,14 @@ html[data-rxova-shell] .sl-menu-button {
|
|
|
185
145
|
flex-basis: 100%;
|
|
186
146
|
}
|
|
187
147
|
|
|
148
|
+
/* In the phone menu the switcher sits at the left edge and at the bottom of the menu, so its
|
|
149
|
+
list opens rightward and upward instead of off-screen. */
|
|
150
|
+
.mobile-preferences .rx-switcher .rx-switcher__menu {
|
|
151
|
+
inset-inline: 0 auto;
|
|
152
|
+
inset-block-end: 100%;
|
|
153
|
+
margin: 0 0 0.4rem;
|
|
154
|
+
}
|
|
155
|
+
|
|
188
156
|
/* --- Footer -------------------------------------------------------------- */
|
|
189
157
|
|
|
190
158
|
/* Footer styles live in footer.css (imported above) because /blog and /updates need them too. */
|