@rxova/brand 0.12.0 → 0.13.1
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/README.md +6 -5
- package/assets/og/overlock.png +0 -0
- package/assets/og/rxova.png +0 -0
- package/package.json +10 -10
- package/src/components/Footer.astro +3 -1
- package/src/components/Header.astro +7 -11
- package/src/components/ProjectSwitcher.astro +14 -14
- package/src/components/SiteFooter.astro +65 -68
- package/src/components/SiteShell.astro +6 -6
- package/src/components/SiteTitle.astro +3 -1
- package/src/components/SocialIcons.astro +3 -1
- package/src/components/ThemeSelect.astro +3 -1
- package/src/components/ThemeToggle.astro +7 -5
- package/src/sites.ts +11 -2
- package/src/starlight.css +4 -1
package/README.md
CHANGED
|
@@ -9,17 +9,18 @@
|
|
|
9
9
|
|
|
10
10
|
## Why this exists
|
|
11
11
|
|
|
12
|
-
`rxova.org` serves
|
|
12
|
+
`rxova.org` serves one surface per project from a single origin — an Astro
|
|
13
|
+
landing at `/`, plus [overlock](https://github.com/rxova/overlock),
|
|
13
14
|
[journey](https://github.com/rxova/journey),
|
|
14
15
|
[react-inputs](https://github.com/rxova/react-inputs) and
|
|
15
16
|
[use-everywhere](https://github.com/rxova/use-everywhere) docs, each built in its
|
|
16
17
|
own repo and mounted as a static tree under `/packages/<name>/`.
|
|
17
18
|
|
|
18
|
-
They were built independently and ended up looking like
|
|
19
|
-
|
|
19
|
+
They were built independently and ended up looking like unrelated products:
|
|
20
|
+
a different accent colour each, a different footer each, no way to navigate from
|
|
20
21
|
one project's docs to another's. This package is the single source of truth that
|
|
21
|
-
makes them one site — and it lives in its own repo because it is consumed by
|
|
22
|
-
and owned by none.
|
|
22
|
+
makes them one site — and it lives in its own repo because it is consumed by all
|
|
23
|
+
of them and owned by none.
|
|
23
24
|
|
|
24
25
|
## Install
|
|
25
26
|
|
|
Binary file
|
package/assets/og/rxova.png
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rxova/brand",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Design tokens, Starlight theme and shared site chrome for rxova.org",
|
|
6
6
|
"keywords": [
|
|
@@ -54,17 +54,17 @@
|
|
|
54
54
|
"@fontsource/space-grotesk": "^5.2.5"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@astrojs/check": "^0.9.
|
|
58
|
-
"@astrojs/starlight": "^0.
|
|
57
|
+
"@astrojs/check": "^0.9.10",
|
|
58
|
+
"@astrojs/starlight": "^0.42.0",
|
|
59
59
|
"@resvg/resvg-js": "^2.6.2",
|
|
60
|
-
"@types/node": "^26.
|
|
61
|
-
"@vitest/coverage-v8": "^
|
|
62
|
-
"astro": "^7.
|
|
63
|
-
"publint": "^0.3.
|
|
64
|
-
"satori": "^0.
|
|
65
|
-
"tsx": "^4.23.
|
|
60
|
+
"@types/node": "^26.5.0",
|
|
61
|
+
"@vitest/coverage-v8": "^5.0.0",
|
|
62
|
+
"astro": "^7.3.2",
|
|
63
|
+
"publint": "^0.3.24",
|
|
64
|
+
"satori": "^0.33.4",
|
|
65
|
+
"tsx": "^4.23.13",
|
|
66
66
|
"typescript": "6.0.3",
|
|
67
|
-
"vitest": "^
|
|
67
|
+
"vitest": "^5.0.0"
|
|
68
68
|
},
|
|
69
69
|
"scripts": {
|
|
70
70
|
"typecheck": "tsc --noEmit",
|
|
@@ -41,11 +41,9 @@ interface Props {
|
|
|
41
41
|
const { homeHref, logoSrc, items } = Astro.props
|
|
42
42
|
---
|
|
43
43
|
|
|
44
|
-
{
|
|
45
|
-
/* Outside <main> in every shell so it can span the viewport while its contents
|
|
44
|
+
{/* Outside <main> in every shell so it can span the viewport while its contents
|
|
46
45
|
stay on the page's measure. Sticky rather than fixed: it still takes part in
|
|
47
|
-
layout, so nothing below needs a compensating top margin. */
|
|
48
|
-
}
|
|
46
|
+
layout, so nothing below needs a compensating top margin. */}
|
|
49
47
|
<header class="site">
|
|
50
48
|
<div class="site__inner">
|
|
51
49
|
<a class="brand" href={homeHref}>
|
|
@@ -53,13 +51,11 @@ const { homeHref, logoSrc, items } = Astro.props
|
|
|
53
51
|
<span>Rxova</span>
|
|
54
52
|
</a>
|
|
55
53
|
<nav aria-label="Sections">
|
|
56
|
-
{
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
))
|
|
62
|
-
}
|
|
54
|
+
{items.map((item) => (
|
|
55
|
+
<a href={item.href} aria-current={item.current ? 'page' : undefined}>
|
|
56
|
+
{item.label}
|
|
57
|
+
</a>
|
|
58
|
+
))}
|
|
63
59
|
</nav>
|
|
64
60
|
{/* In the header, not floating over it — see ThemeToggle's `floating`. */}
|
|
65
61
|
<ThemeToggle floating={false} />
|
|
@@ -28,20 +28,20 @@ const { current } = Astro.props
|
|
|
28
28
|
</svg>
|
|
29
29
|
</summary>
|
|
30
30
|
<ul class="rx-switcher__menu">
|
|
31
|
-
<li
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
</
|
|
43
|
-
|
|
44
|
-
}
|
|
31
|
+
<li>
|
|
32
|
+
<a href={RXOVA_ORIGIN}>rxova.org</a>
|
|
33
|
+
</li>
|
|
34
|
+
{PROJECTS.map((project) => (
|
|
35
|
+
<li>
|
|
36
|
+
<a
|
|
37
|
+
href={`${RXOVA_ORIGIN}${project.mount}`}
|
|
38
|
+
class={project.id === current ? 'rx-switcher__current' : undefined}
|
|
39
|
+
aria-current={project.id === current ? 'page' : undefined}
|
|
40
|
+
>
|
|
41
|
+
{project.label}
|
|
42
|
+
</a>
|
|
43
|
+
</li>
|
|
44
|
+
))}
|
|
45
45
|
</ul>
|
|
46
46
|
</details>
|
|
47
47
|
|
|
@@ -66,98 +66,95 @@ const surfaces: readonly SiteLink[] = site ?? [
|
|
|
66
66
|
<img src={siteUrl('/rxova-logo-256.png')} alt="" width="28" height="28" loading="lazy" />
|
|
67
67
|
<span>Rxova</span>
|
|
68
68
|
</a>
|
|
69
|
-
{
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
browser
|
|
73
|
-
what these are. Same correction as the landing's hero. */
|
|
74
|
-
}
|
|
69
|
+
{/* Not "React libraries": most of these ship a framework-agnostic core
|
|
70
|
+
that runs in a worker or a plain script, Journey also ships a browser
|
|
71
|
+
extension, and overlock is a command-line tool that never sees a
|
|
72
|
+
browser at all. React is a binding we provide, not the boundary of
|
|
73
|
+
what these are. Same correction as the landing's hero. */}
|
|
75
74
|
<p class="rx-footer__blurb">
|
|
76
|
-
Small TypeScript libraries
|
|
77
|
-
the open.
|
|
75
|
+
Small TypeScript libraries and developer tools, documented in one place. MIT licensed, built
|
|
76
|
+
in the open.
|
|
78
77
|
</p>
|
|
79
78
|
</div>
|
|
80
79
|
|
|
81
80
|
<div class="rx-footer__columns">
|
|
82
|
-
{
|
|
83
|
-
|
|
84
|
-
<
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
<
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
)
|
|
95
|
-
}
|
|
81
|
+
{docs && docs.length > 0 && (
|
|
82
|
+
<div>
|
|
83
|
+
<h2 class="rx-footer__title">Docs</h2>
|
|
84
|
+
<ul class="rx-footer__list">
|
|
85
|
+
{docs.map((link) => (
|
|
86
|
+
<li>
|
|
87
|
+
<a href={link.href}>{link.label}</a>
|
|
88
|
+
</li>
|
|
89
|
+
))}
|
|
90
|
+
</ul>
|
|
91
|
+
</div>
|
|
92
|
+
)}
|
|
96
93
|
|
|
97
94
|
<div>
|
|
98
95
|
<h2 class="rx-footer__title">Projects</h2>
|
|
99
96
|
<ul class="rx-footer__list">
|
|
100
|
-
{
|
|
101
|
-
|
|
102
|
-
<
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
))
|
|
106
|
-
}
|
|
97
|
+
{PROJECTS.map((p) => (
|
|
98
|
+
<li>
|
|
99
|
+
<a href={`${RXOVA_ORIGIN}${p.mount}`}>{p.label}</a>
|
|
100
|
+
</li>
|
|
101
|
+
))}
|
|
107
102
|
</ul>
|
|
108
103
|
</div>
|
|
109
104
|
|
|
110
|
-
{
|
|
111
|
-
|
|
112
|
-
<
|
|
113
|
-
|
|
114
|
-
<
|
|
115
|
-
<
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
<
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
<
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
<
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
<
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
)
|
|
133
|
-
}
|
|
105
|
+
{self && (
|
|
106
|
+
<div>
|
|
107
|
+
<h2 class="rx-footer__title">Community</h2>
|
|
108
|
+
<ul class="rx-footer__list">
|
|
109
|
+
<li>
|
|
110
|
+
<a href={self.repo}>GitHub</a>
|
|
111
|
+
</li>
|
|
112
|
+
<li>
|
|
113
|
+
<a href={`${self.repo}/issues`}>Issues</a>
|
|
114
|
+
</li>
|
|
115
|
+
<li>
|
|
116
|
+
<a href={`${self.repo}/discussions`}>Discussions</a>
|
|
117
|
+
</li>
|
|
118
|
+
<li>
|
|
119
|
+
<a href={self.npm}>npm</a>
|
|
120
|
+
</li>
|
|
121
|
+
<li>
|
|
122
|
+
<a href={`${self.repo}/blob/main/CONTRIBUTING.md`}>Contributing</a>
|
|
123
|
+
</li>
|
|
124
|
+
</ul>
|
|
125
|
+
</div>
|
|
126
|
+
)}
|
|
134
127
|
|
|
135
|
-
{
|
|
136
|
-
/* Blog and Updates are here on every surface, docs sites included: they
|
|
128
|
+
{/* Blog and Updates are here on every surface, docs sites included: they
|
|
137
129
|
were reachable only from the umbrella landing, which meant a reader
|
|
138
130
|
who arrived on a docs page from a search result never learned the
|
|
139
|
-
rest of the site existed. */
|
|
140
|
-
}
|
|
131
|
+
rest of the site existed. */}
|
|
141
132
|
<div>
|
|
142
133
|
<h2 class="rx-footer__title">Site</h2>
|
|
143
134
|
<ul class="rx-footer__list">
|
|
144
|
-
<li
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
</
|
|
150
|
-
|
|
151
|
-
}
|
|
135
|
+
<li>
|
|
136
|
+
<a href={RXOVA_ORIGIN}>Home</a>
|
|
137
|
+
</li>
|
|
138
|
+
{surfaces.map((s) => (
|
|
139
|
+
<li>
|
|
140
|
+
<a href={s.href}>{s.label}</a>
|
|
141
|
+
</li>
|
|
142
|
+
))}
|
|
152
143
|
</ul>
|
|
153
144
|
</div>
|
|
154
145
|
|
|
155
146
|
<div>
|
|
156
147
|
<h2 class="rx-footer__title">Connect</h2>
|
|
157
148
|
<ul class="rx-footer__list">
|
|
158
|
-
<li
|
|
159
|
-
|
|
160
|
-
|
|
149
|
+
<li>
|
|
150
|
+
<a href="https://github.com/rxova">GitHub</a>
|
|
151
|
+
</li>
|
|
152
|
+
<li>
|
|
153
|
+
<a href="https://www.npmjs.com/org/rxova">npm</a>
|
|
154
|
+
</li>
|
|
155
|
+
<li>
|
|
156
|
+
<a href="mailto:rxova@proton.me">rxova@proton.me</a>
|
|
157
|
+
</li>
|
|
161
158
|
</ul>
|
|
162
159
|
</div>
|
|
163
160
|
</div>
|
|
@@ -78,12 +78,12 @@ const serialiseJsonLd = (value: unknown): string => JSON.stringify(value).replac
|
|
|
78
78
|
<meta property="og:url" content={canonical} />
|
|
79
79
|
<meta property="og:image" content={ogImage} />
|
|
80
80
|
<meta name="twitter:card" content="summary_large_image" />
|
|
81
|
-
{
|
|
82
|
-
feed
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
81
|
+
{feed && (
|
|
82
|
+
<link rel="alternate" type="application/rss+xml" title={feed.title} href={feed.href} />
|
|
83
|
+
)}
|
|
84
|
+
{jsonLd && (
|
|
85
|
+
<script type="application/ld+json" is:inline set:html={serialiseJsonLd(jsonLd)}></script>
|
|
86
|
+
)}
|
|
87
87
|
</head>
|
|
88
88
|
<body>
|
|
89
89
|
<main>
|
|
@@ -32,7 +32,9 @@ const { siteTitle, siteTitleHref } = (
|
|
|
32
32
|
<img src={mark.src} alt="" width="28" height="28" />
|
|
33
33
|
</a>
|
|
34
34
|
<span class="rx-site-title__sep" aria-hidden="true"></span>
|
|
35
|
-
<a href={siteTitleHref} class="rx-site-title__project" translate="no">
|
|
35
|
+
<a href={siteTitleHref} class="rx-site-title__project" translate="no">
|
|
36
|
+
{siteTitle}
|
|
37
|
+
</a>
|
|
36
38
|
</div>
|
|
37
39
|
|
|
38
40
|
<style>
|
|
@@ -39,8 +39,8 @@ const { floating = true } = Astro.props
|
|
|
39
39
|
type="button"
|
|
40
40
|
aria-label="Toggle theme"
|
|
41
41
|
>
|
|
42
|
-
<span class="icon" aria-hidden="true"
|
|
43
|
-
|
|
42
|
+
<span class="icon" aria-hidden="true">
|
|
43
|
+
<svg
|
|
44
44
|
xmlns="http://www.w3.org/2000/svg"
|
|
45
45
|
viewBox="0 0 24 24"
|
|
46
46
|
width="24"
|
|
@@ -49,9 +49,11 @@ const { floating = true } = Astro.props
|
|
|
49
49
|
stroke="currentColor"
|
|
50
50
|
stroke-width="2"
|
|
51
51
|
stroke-linecap="round"
|
|
52
|
-
stroke-linejoin="round"
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
stroke-linejoin="round"
|
|
53
|
+
>
|
|
54
|
+
<path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"></path>
|
|
55
|
+
</svg>
|
|
56
|
+
</span>
|
|
55
57
|
</button>
|
|
56
58
|
|
|
57
59
|
<style>
|
package/src/sites.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* rxova.org is an aggregator: an Astro landing at `/`, plus each project's docs
|
|
5
5
|
* built in its own repo and mounted as a static tree under `/packages/<name>/`.
|
|
6
|
-
* That means
|
|
6
|
+
* That means every surface lives on one origin at its own base path, so
|
|
7
7
|
* **every cross-project link must be absolute**. A relative href would resolve
|
|
8
8
|
* against the local base and produce `/packages/journey/packages/react-inputs/`.
|
|
9
9
|
*
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
/** Canonical origin. Override for a staging deploy (e.g. https://web.rxova.org). */
|
|
15
15
|
export const RXOVA_ORIGIN = process.env.RXOVA_ORIGIN ?? 'https://rxova.org'
|
|
16
16
|
|
|
17
|
-
export type ProjectId = 'journey' | 'react-inputs' | 'use-everywhere'
|
|
17
|
+
export type ProjectId = 'overlock' | 'journey' | 'react-inputs' | 'use-everywhere'
|
|
18
18
|
|
|
19
19
|
export interface Project {
|
|
20
20
|
id: ProjectId
|
|
@@ -31,6 +31,15 @@ export interface Project {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
export const PROJECTS: readonly Project[] = [
|
|
34
|
+
{
|
|
35
|
+
id: 'overlock',
|
|
36
|
+
label: 'overlock',
|
|
37
|
+
mount: '/packages/overlock/',
|
|
38
|
+
tagline: 'A deterministic gate on test integrity in a git patch.',
|
|
39
|
+
repo: 'https://github.com/rxova/overlock',
|
|
40
|
+
npm: 'https://www.npmjs.com/package/overlock',
|
|
41
|
+
packages: ['overlock'],
|
|
42
|
+
},
|
|
34
43
|
{
|
|
35
44
|
id: 'journey',
|
|
36
45
|
label: 'Journey',
|
package/src/starlight.css
CHANGED
|
@@ -97,7 +97,10 @@ html[data-rxova-shell] mobile-starlight-toc nav {
|
|
|
97
97
|
top: calc(var(--rx-shell-header-height) + var(--sl-nav-height) - 1px);
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
|
|
100
|
+
/* Starlight 0.42 dropped the <starlight-menu-button> wrapper for a bare
|
|
101
|
+
button.sl-menu-button; the peer range still covers the older markup. */
|
|
102
|
+
html[data-rxova-shell] starlight-menu-button button,
|
|
103
|
+
html[data-rxova-shell] .sl-menu-button {
|
|
101
104
|
top: calc(
|
|
102
105
|
var(--rx-shell-header-height) + (var(--sl-nav-height) - var(--sl-menu-button-size)) / 2
|
|
103
106
|
);
|