@rxova/brand 1.1.0 → 1.1.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/MIGRATION.md CHANGED
@@ -31,8 +31,9 @@ returns now point into `@rxova/astro-ui`.
31
31
  | `@rxova/brand/starlight.css` | `@rxova/astro-ui/styles/starlight.css` |
32
32
  | `@rxova/brand/tokens.css`, `fonts.css`, `assets/*` | unchanged |
33
33
 
34
- `<Chrome>` is `SiteShell`, `Header`, `SiteFooter`, `ProjectSwitcher`,
35
- `ThemeToggle` or `ThemeScript`. `<Override>` is `SiteTitle`, `SocialIcons`,
34
+ `<Chrome>` is `Header`, `SiteFooter`, `ProjectSwitcher`, `ThemeToggle` or
35
+ `ThemeScript`. `SiteShell` has no replacement: `@rxova/astro-ui` removed it in 0.3.0, so give the
36
+ page its own layout. `<Override>` is `SiteTitle`, `SocialIcons`,
36
37
  `Footer` or `ThemeSelect`.
37
38
 
38
39
  ## 4. Rename the short token aliases
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rxova/brand",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "type": "module",
5
5
  "description": "Design tokens, typefaces and project data for rxova.org",
6
6
  "keywords": [
package/src/sites.ts CHANGED
@@ -6,32 +6,14 @@
6
6
  /** Canonical origin. Override for a staging deploy (e.g. https://web.rxova.org). */
7
7
  export const RXOVA_ORIGIN = process.env.RXOVA_ORIGIN ?? 'https://rxova.org'
8
8
 
9
- export type ProjectId =
10
- 'overlock' | 'journey' | 'react-inputs' | 'use-everywhere' | 'ts-extended-errors'
11
-
12
- export interface Project {
13
- id: ProjectId
14
- /** Display name, used in the header, the switcher and the landing cards. */
15
- label: string
16
- /** Path the aggregator mounts this project's docs at. Leading and trailing slash. */
17
- mount: `/${string}/`
18
- tagline: string
19
- repo: string
20
- /** The package a newcomer should install first. */
21
- npm: string
22
- /** npm package names, most prominent first. */
23
- packages: string[]
24
- }
25
-
26
9
  /**
27
- * Display order, shared by the landing's project rail and the docs switcher.
28
- * overlock stays last: it is a CLI and CI gate, not a library you import.
10
+ * Every rxova project, in display order: the landing's project rail and the docs switcher.
11
+ * The one list of projects; `sources.json` only says which are deployed. overlock stays last.
29
12
  */
30
- export const PROJECTS: readonly Project[] = [
13
+ const DEFINITIONS = [
31
14
  {
32
15
  id: 'journey',
33
16
  label: 'journey',
34
- mount: '/packages/journey/',
35
17
  tagline: 'Declarative journey graphs for non-linear UI flows.',
36
18
  repo: 'https://github.com/rxova/journey',
37
19
  npm: 'https://www.npmjs.com/package/@rxova/journey-core',
@@ -40,7 +22,6 @@ export const PROJECTS: readonly Project[] = [
40
22
  {
41
23
  id: 'react-inputs',
42
24
  label: 'react-inputs',
43
- mount: '/packages/react-inputs/',
44
25
  tagline: 'The tricky React inputs, done right.',
45
26
  repo: 'https://github.com/rxova/react-inputs',
46
27
  npm: 'https://www.npmjs.com/package/@rxova/react-inputs',
@@ -60,7 +41,6 @@ export const PROJECTS: readonly Project[] = [
60
41
  {
61
42
  id: 'use-everywhere',
62
43
  label: 'use-everywhere',
63
- mount: '/packages/use-everywhere/',
64
44
  tagline: 'State and messages that exist in every tab, window, and worker.',
65
45
  repo: 'https://github.com/rxova/use-everywhere',
66
46
  npm: 'https://www.npmjs.com/package/use-everywhere',
@@ -69,7 +49,6 @@ export const PROJECTS: readonly Project[] = [
69
49
  {
70
50
  id: 'ts-extended-errors',
71
51
  label: 'ts-extended-errors',
72
- mount: '/packages/ts-extended-errors/',
73
52
  tagline: 'Typed, serializable errors that survive a JSON round trip.',
74
53
  repo: 'https://github.com/rxova/ts-extended-errors',
75
54
  npm: 'https://www.npmjs.com/package/ts-extended-errors',
@@ -78,7 +57,6 @@ export const PROJECTS: readonly Project[] = [
78
57
  {
79
58
  id: 'overlock',
80
59
  label: 'overlock',
81
- mount: '/packages/overlock/',
82
60
  tagline: 'A deterministic gate on test integrity in a git patch.',
83
61
  repo: 'https://github.com/rxova/overlock',
84
62
  npm: 'https://www.npmjs.com/package/overlock',
@@ -86,6 +64,28 @@ export const PROJECTS: readonly Project[] = [
86
64
  },
87
65
  ] as const
88
66
 
67
+ export type ProjectId = (typeof DEFINITIONS)[number]['id']
68
+
69
+ export interface Project {
70
+ id: ProjectId
71
+ /** Display name, used in the header, the switcher and the landing cards. */
72
+ label: string
73
+ /** Path the aggregator mounts this project's docs at: always `/packages/<id>/`. */
74
+ mount: `/${string}/`
75
+ tagline: string
76
+ repo: string
77
+ /** The package a newcomer should install first. */
78
+ npm: string
79
+ /** npm package names, most prominent first. */
80
+ packages: string[]
81
+ }
82
+
83
+ export const PROJECTS: readonly Project[] = DEFINITIONS.map((project) => ({
84
+ ...project,
85
+ mount: `/packages/${project.id}/`,
86
+ packages: [...project.packages],
87
+ }))
88
+
89
89
  export function getProject(id: ProjectId): Project {
90
90
  const project = PROJECTS.find((p) => p.id === id)
91
91
  if (!project) throw new Error(`[@rxova/brand] unknown project id: ${id}`)