@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 CHANGED
@@ -9,17 +9,18 @@
9
9
 
10
10
  ## Why this exists
11
11
 
12
- `rxova.org` serves four surfaces from one origin — an Astro landing at `/`, plus
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 four unrelated products:
19
- three different accent colours, three different footers, no way to navigate from
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 four
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
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rxova/brand",
3
- "version": "0.12.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.9",
58
- "@astrojs/starlight": "^0.41.4",
57
+ "@astrojs/check": "^0.9.10",
58
+ "@astrojs/starlight": "^0.42.0",
59
59
  "@resvg/resvg-js": "^2.6.2",
60
- "@types/node": "^26.1.1",
61
- "@vitest/coverage-v8": "^4.1.10",
62
- "astro": "^7.1.3",
63
- "publint": "^0.3.21",
64
- "satori": "^0.29.0",
65
- "tsx": "^4.23.1",
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": "^4.1.10"
67
+ "vitest": "^5.0.0"
68
68
  },
69
69
  "scripts": {
70
70
  "typecheck": "tsc --noEmit",
@@ -14,5 +14,7 @@ import { projectFromBase } from '../sites.ts'
14
14
  const project = projectFromBase(import.meta.env.BASE_URL)
15
15
  ---
16
16
 
17
- <Default><slot /></Default>
17
+ <Default>
18
+ <slot />
19
+ </Default>
18
20
  <SiteFooter project={project} />
@@ -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
- items.map((item) => (
58
- <a href={item.href} aria-current={item.current ? 'page' : undefined}>
59
- {item.label}
60
- </a>
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><a href={RXOVA_ORIGIN}>rxova.org</a></li>
32
- {
33
- PROJECTS.map((project) => (
34
- <li>
35
- <a
36
- href={`${RXOVA_ORIGIN}${project.mount}`}
37
- class={project.id === current ? 'rx-switcher__current' : undefined}
38
- aria-current={project.id === current ? 'page' : undefined}
39
- >
40
- {project.label}
41
- </a>
42
- </li>
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
- /* Not "React libraries": two of the three ship a framework-agnostic
71
- core that runs in a worker or a plain script, and Journey also ships a
72
- browser extension. React is a binding we provide, not the boundary of
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 for the browser, documented in one place. MIT licensed, built in
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
- docs && docs.length > 0 && (
84
- <div>
85
- <h2 class="rx-footer__title">Docs</h2>
86
- <ul class="rx-footer__list">
87
- {docs.map((link) => (
88
- <li>
89
- <a href={link.href}>{link.label}</a>
90
- </li>
91
- ))}
92
- </ul>
93
- </div>
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
- PROJECTS.map((p) => (
102
- <li>
103
- <a href={`${RXOVA_ORIGIN}${p.mount}`}>{p.label}</a>
104
- </li>
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
- self && (
112
- <div>
113
- <h2 class="rx-footer__title">Community</h2>
114
- <ul class="rx-footer__list">
115
- <li>
116
- <a href={self.repo}>GitHub</a>
117
- </li>
118
- <li>
119
- <a href={`${self.repo}/issues`}>Issues</a>
120
- </li>
121
- <li>
122
- <a href={`${self.repo}/discussions`}>Discussions</a>
123
- </li>
124
- <li>
125
- <a href={self.npm}>npm</a>
126
- </li>
127
- <li>
128
- <a href={`${self.repo}/blob/main/CONTRIBUTING.md`}>Contributing</a>
129
- </li>
130
- </ul>
131
- </div>
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><a href={RXOVA_ORIGIN}>Home</a></li>
145
- {
146
- surfaces.map((s) => (
147
- <li>
148
- <a href={s.href}>{s.label}</a>
149
- </li>
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><a href="https://github.com/rxova">GitHub</a></li>
159
- <li><a href="https://www.npmjs.com/org/rxova">npm</a></li>
160
- <li><a href="mailto:rxova@proton.me">rxova@proton.me</a></li>
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
- <link rel="alternate" type="application/rss+xml" title={feed.title} href={feed.href} />
84
- )
85
- }
86
- {jsonLd && <script type="application/ld+json" is:inline set:html={serialiseJsonLd(jsonLd)} />}
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">{siteTitle}</a>
35
+ <a href={siteTitleHref} class="rx-site-title__project" translate="no">
36
+ {siteTitle}
37
+ </a>
36
38
  </div>
37
39
 
38
40
  <style>
@@ -16,4 +16,6 @@ const current = projectFromBase(import.meta.env.BASE_URL)
16
16
  ---
17
17
 
18
18
  <ProjectSwitcher current={current} />
19
- <Default><slot /></Default>
19
+ <Default>
20
+ <slot />
21
+ </Default>
@@ -22,7 +22,9 @@
22
22
  import Default from '@astrojs/starlight/components/ThemeSelect.astro'
23
23
  ---
24
24
 
25
- <Default><slot /></Default>
25
+ <Default>
26
+ <slot />
27
+ </Default>
26
28
 
27
29
  <script>
28
30
  type Theme = 'auto' | 'dark' | 'light'
@@ -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
- ><svg
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"><path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"></path></svg
53
- ></span
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 four surfaces live on one origin at four different base paths, so
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
- html[data-rxova-shell] starlight-menu-button button {
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
  );