@rxova/astro-ui 0.0.0 → 0.2.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/LICENSE +21 -0
- package/README.md +88 -2
- package/package.json +65 -6
- package/src/components/BackLink.astro +24 -0
- package/src/components/CodeRecipes.astro +67 -0
- package/src/components/CtaBand.astro +121 -0
- package/src/components/DataTable.astro +114 -0
- package/src/components/DocAccordion.astro +15 -0
- package/src/components/DocAccordionItem.astro +83 -0
- package/src/components/Header.astro +148 -0
- package/src/components/Icon.astro +29 -0
- package/src/components/ModeTabs.astro +124 -0
- package/src/components/PageHeader.astro +63 -0
- package/src/components/ProjectSwitcher.astro +95 -0
- package/src/components/ProofStats.astro +207 -0
- package/src/components/QuickStart.astro +156 -0
- package/src/components/ScreenshotGrid.astro +164 -0
- package/src/components/Section.astro +103 -0
- package/src/components/ShowMore.astro +82 -0
- package/src/components/SiteFooter.astro +149 -0
- package/src/components/SiteShell.astro +155 -0
- package/src/components/SizeTable.astro +118 -0
- package/src/components/ThemeScript.astro +31 -0
- package/src/components/ThemeToggle.astro +163 -0
- package/src/components/ValueGrid.astro +116 -0
- package/src/components/VisuallyHidden.astro +23 -0
- package/src/components/icons/Collapse.astro +11 -0
- package/src/components/icons/Expand.astro +11 -0
- package/src/components/icons/Next.astro +11 -0
- package/src/components/icons/Pause.astro +11 -0
- package/src/components/icons/Play.astro +11 -0
- package/src/components/icons/Prev.astro +11 -0
- package/src/components/icons/Replay.astro +11 -0
- package/src/env.d.ts +15 -0
- package/src/lib/entries.ts +72 -0
- package/src/lib/icons.ts +15 -0
- package/src/scripts/show-more.ts +46 -0
- package/src/starlight/Footer.astro +16 -0
- package/src/starlight/SiteTitle.astro +34 -0
- package/src/starlight/SocialIcons.astro +18 -0
- package/src/starlight/ThemeSelect.astro +42 -0
- package/src/starlight/index.ts +103 -0
- package/src/styles/chrome.css +8 -0
- package/src/styles/document.css +72 -0
- package/src/styles/footer.css +124 -0
- package/src/styles/landing.css +55 -0
- package/src/styles/mermaid.css +75 -0
- package/src/styles/starlight.css +162 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Theme-aware mermaid diagrams for `rehype-mermaid`'s build-time SVG, which bakes in a light palette.
|
|
3
|
+
* Mermaid scopes its own <style> by id, which outranks any class rule, so the colours here need !important.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
.sl-markdown-content svg[aria-roledescription] {
|
|
7
|
+
max-width: 100%;
|
|
8
|
+
height: auto;
|
|
9
|
+
/* Mermaid sizes the viewBox to the diagram; let it breathe on the page. */
|
|
10
|
+
margin-block: 1.5rem;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/* Node and cluster surfaces. */
|
|
14
|
+
.sl-markdown-content svg[aria-roledescription] .node rect,
|
|
15
|
+
.sl-markdown-content svg[aria-roledescription] .node circle,
|
|
16
|
+
.sl-markdown-content svg[aria-roledescription] .node polygon,
|
|
17
|
+
.sl-markdown-content svg[aria-roledescription] .node path,
|
|
18
|
+
.sl-markdown-content svg[aria-roledescription] .label-container {
|
|
19
|
+
fill: var(--rx-card) !important;
|
|
20
|
+
stroke: var(--rx-rule-strong) !important;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.sl-markdown-content svg[aria-roledescription] .cluster rect {
|
|
24
|
+
fill: color-mix(in srgb, var(--rx-tag-bg) 60%, transparent) !important;
|
|
25
|
+
stroke: var(--rx-rule) !important;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* All text: labels, cluster titles, edge labels, actor names. */
|
|
29
|
+
.sl-markdown-content svg[aria-roledescription] text,
|
|
30
|
+
.sl-markdown-content svg[aria-roledescription] .nodeLabel,
|
|
31
|
+
.sl-markdown-content svg[aria-roledescription] .edgeLabel,
|
|
32
|
+
.sl-markdown-content svg[aria-roledescription] .cluster-label,
|
|
33
|
+
.sl-markdown-content svg[aria-roledescription] .messageText,
|
|
34
|
+
.sl-markdown-content svg[aria-roledescription] .loopText {
|
|
35
|
+
fill: var(--rx-fg) !important;
|
|
36
|
+
color: var(--rx-fg) !important;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/* Edge labels sit on an opaque plate; mermaid renders them as HTML in a <foreignObject>, so cover both. */
|
|
40
|
+
.sl-markdown-content svg[aria-roledescription] .edgeLabel,
|
|
41
|
+
.sl-markdown-content svg[aria-roledescription] .edgeLabel *,
|
|
42
|
+
.sl-markdown-content svg[aria-roledescription] .labelBkg {
|
|
43
|
+
background-color: var(--rx-bg) !important;
|
|
44
|
+
color: var(--rx-fg) !important;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.sl-markdown-content svg[aria-roledescription] .edgeLabel rect,
|
|
48
|
+
.sl-markdown-content svg[aria-roledescription] .labelBkg rect {
|
|
49
|
+
fill: var(--rx-bg) !important;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* Connectors. */
|
|
53
|
+
.sl-markdown-content svg[aria-roledescription] .edgePath path,
|
|
54
|
+
.sl-markdown-content svg[aria-roledescription] .flowchart-link,
|
|
55
|
+
.sl-markdown-content svg[aria-roledescription] line,
|
|
56
|
+
.sl-markdown-content svg[aria-roledescription] .messageLine0,
|
|
57
|
+
.sl-markdown-content svg[aria-roledescription] .messageLine1 {
|
|
58
|
+
stroke: var(--rx-faint) !important;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.sl-markdown-content svg[aria-roledescription] marker path,
|
|
62
|
+
.sl-markdown-content svg[aria-roledescription] .arrowMarkerPath {
|
|
63
|
+
fill: var(--rx-faint) !important;
|
|
64
|
+
stroke: var(--rx-faint) !important;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/* Sequence-diagram participant boxes and lifelines. */
|
|
68
|
+
.sl-markdown-content svg[aria-roledescription='sequence'] .actor {
|
|
69
|
+
fill: var(--rx-card) !important;
|
|
70
|
+
stroke: var(--rx-rule-strong) !important;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.sl-markdown-content svg[aria-roledescription='sequence'] .actor-line {
|
|
74
|
+
stroke: var(--rx-rule-strong) !important;
|
|
75
|
+
}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Maps rxova tokens onto Starlight's theme variables; load via `customCss` so it wins without
|
|
3
|
+
* !important. One block covers both modes because every --rx-* neutral already flips.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
@import '@rxova/brand/tokens.css';
|
|
7
|
+
@import './footer.css';
|
|
8
|
+
|
|
9
|
+
:root {
|
|
10
|
+
/* Accent. */
|
|
11
|
+
--sl-color-accent: var(--rx-primary);
|
|
12
|
+
--sl-color-accent-low: color-mix(in srgb, var(--rx-primary) 20%, var(--rx-bg));
|
|
13
|
+
--sl-color-accent-high: var(--rx-primary-lightest);
|
|
14
|
+
--sl-color-text-accent: var(--rx-primary);
|
|
15
|
+
|
|
16
|
+
/* Neutral ladder. "white" and "black" are Starlight's names for the two
|
|
17
|
+
contrast extremes, not literal colours — they invert with the theme. */
|
|
18
|
+
--sl-color-white: var(--rx-fg);
|
|
19
|
+
--sl-color-gray-1: var(--rx-fg);
|
|
20
|
+
--sl-color-gray-2: var(--rx-muted);
|
|
21
|
+
--sl-color-gray-3: var(--rx-faint);
|
|
22
|
+
--sl-color-gray-4: var(--rx-rule-strong);
|
|
23
|
+
--sl-color-gray-5: var(--rx-rule);
|
|
24
|
+
--sl-color-gray-6: var(--rx-tag-bg);
|
|
25
|
+
--sl-color-gray-7: var(--rx-card);
|
|
26
|
+
--sl-color-black: var(--rx-bg);
|
|
27
|
+
|
|
28
|
+
/* Surfaces. Nav and sidebar sit flush with the page — the hairline does the
|
|
29
|
+
separating, not a fill change. */
|
|
30
|
+
--sl-color-bg: var(--rx-bg);
|
|
31
|
+
--sl-color-bg-nav: var(--rx-bg);
|
|
32
|
+
--sl-color-bg-sidebar: var(--rx-bg);
|
|
33
|
+
--sl-color-bg-inline-code: var(--rx-tag-bg);
|
|
34
|
+
--sl-color-bg-badge: var(--rx-tag-bg);
|
|
35
|
+
|
|
36
|
+
--sl-color-hairline: var(--rx-rule);
|
|
37
|
+
--sl-color-hairline-light: var(--rx-rule);
|
|
38
|
+
--sl-color-hairline-shade: var(--rx-rule-strong);
|
|
39
|
+
--sl-color-backdrop-overlay: color-mix(in srgb, var(--rx-bg) 80%, transparent);
|
|
40
|
+
|
|
41
|
+
/* Type. */
|
|
42
|
+
--sl-font: var(--rx-font-sans);
|
|
43
|
+
--sl-font-mono: var(--rx-font-mono);
|
|
44
|
+
|
|
45
|
+
--sl-shadow-sm: 0 1px 2px rgb(0 0 0 / 0.06);
|
|
46
|
+
--sl-shadow-md: 0 4px 12px -4px rgb(0 0 0 / 0.12);
|
|
47
|
+
--sl-shadow-lg: var(--rx-shadow-soft);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* Starlight ships a slightly cooler focus ring; align it with the accent. */
|
|
51
|
+
:root {
|
|
52
|
+
--sl-color-focus: var(--rx-primary);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* --- Shared chrome ------------------------------------------------------- */
|
|
56
|
+
|
|
57
|
+
/* The gradient, the brand's only chroma, gets exactly two placements: the header hairline and
|
|
58
|
+
the switcher's current-project dot. */
|
|
59
|
+
.site-title::after {
|
|
60
|
+
content: none;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
header.header {
|
|
64
|
+
border-bottom: 1px solid var(--sl-color-hairline);
|
|
65
|
+
background: var(--sl-color-bg-nav);
|
|
66
|
+
}
|
|
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
|
+
/* Site title: the rxova mark sits beside the project wordmark. */
|
|
109
|
+
.rx-site-title {
|
|
110
|
+
display: flex;
|
|
111
|
+
align-items: center;
|
|
112
|
+
gap: 0.625rem;
|
|
113
|
+
color: var(--rx-fg);
|
|
114
|
+
font-weight: 600;
|
|
115
|
+
letter-spacing: -0.01em;
|
|
116
|
+
text-decoration: none;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.rx-site-title a {
|
|
120
|
+
color: inherit;
|
|
121
|
+
text-decoration: none;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.rx-site-title a:hover {
|
|
125
|
+
color: var(--rx-fg);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.rx-site-title img {
|
|
129
|
+
width: 28px;
|
|
130
|
+
height: 28px;
|
|
131
|
+
border-radius: var(--rx-radius-sm);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.rx-site-title__sep {
|
|
135
|
+
width: 1px;
|
|
136
|
+
height: 1.1rem;
|
|
137
|
+
background: var(--rx-rule-strong);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.rx-site-title__project {
|
|
141
|
+
color: var(--rx-muted);
|
|
142
|
+
font-weight: 500;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/* Project switcher. */
|
|
146
|
+
.rx-switcher {
|
|
147
|
+
position: relative;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.rx-switcher__current::before {
|
|
151
|
+
content: '';
|
|
152
|
+
display: inline-block;
|
|
153
|
+
width: 0.5rem;
|
|
154
|
+
height: 0.5rem;
|
|
155
|
+
margin-inline-end: 0.5rem;
|
|
156
|
+
border-radius: var(--rx-radius-pill);
|
|
157
|
+
background: var(--rx-gradient);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/* --- Footer -------------------------------------------------------------- */
|
|
161
|
+
|
|
162
|
+
/* Footer styles live in footer.css (imported above) because /blog and /updates need them too. */
|