@rxova/brand 1.3.1 → 1.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/README.md +2 -2
- package/package.json +11 -11
- package/src/feed.ts +27 -27
- package/src/fonts.css +42 -42
- package/src/index.ts +3 -3
- package/src/sites.ts +90 -81
- package/src/tokens.css +4 -4
package/README.md
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
<p align="center">
|
|
4
4
|
Design tokens, typefaces and project data for every
|
|
5
|
-
<a href="https://rxova.
|
|
5
|
+
<a href="https://rxova.dev">rxova.dev</a> surface.
|
|
6
6
|
</p>
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
## Why this exists
|
|
11
11
|
|
|
12
|
-
`rxova.
|
|
12
|
+
`rxova.dev` serves one surface per project from a single origin — an Astro
|
|
13
13
|
landing at `/`, plus [overlock](https://github.com/rxova/overlock),
|
|
14
14
|
[journey](https://github.com/rxova/journey),
|
|
15
15
|
[react-inputs](https://github.com/rxova/react-inputs) and
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rxova/brand",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"description": "Design tokens, typefaces and project data for rxova.
|
|
5
|
+
"description": "Design tokens, typefaces and project data for rxova.dev",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"rxova",
|
|
8
8
|
"design-tokens",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
],
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"author": "Jonatan Kruszewski <jonakrusze@gmail.com>",
|
|
13
|
-
"homepage": "https://rxova.
|
|
13
|
+
"homepage": "https://rxova.dev",
|
|
14
14
|
"repository": {
|
|
15
15
|
"type": "git",
|
|
16
16
|
"url": "git+https://github.com/rxova/rxova-website.git",
|
|
@@ -37,18 +37,18 @@
|
|
|
37
37
|
"./package.json": "./package.json"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@fontsource/ibm-plex-mono": "^5.
|
|
41
|
-
"@fontsource/space-grotesk": "^5.
|
|
40
|
+
"@fontsource/ibm-plex-mono": "^5.3.0",
|
|
41
|
+
"@fontsource/space-grotesk": "^5.3.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@resvg/resvg-js": "^2.6.2",
|
|
45
|
-
"@types/node": "^26.6.
|
|
46
|
-
"@vitest/coverage-v8": "^5.0.
|
|
47
|
-
"publint": "^0.3.
|
|
48
|
-
"satori": "^0.
|
|
49
|
-
"tsx": "^4.23.
|
|
45
|
+
"@types/node": "^26.6.5",
|
|
46
|
+
"@vitest/coverage-v8": "^5.0.5",
|
|
47
|
+
"publint": "^0.3.25",
|
|
48
|
+
"satori": "^0.63.2",
|
|
49
|
+
"tsx": "^4.23.15",
|
|
50
50
|
"typescript": "6.0.3",
|
|
51
|
-
"vitest": "^5.0.
|
|
51
|
+
"vitest": "^5.0.5"
|
|
52
52
|
},
|
|
53
53
|
"repoConfig": {
|
|
54
54
|
"packSmoke": {
|
package/src/feed.ts
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Hand-written RSS 2.0 for the rxova.
|
|
2
|
+
* Hand-written RSS 2.0 for the rxova.dev surfaces that publish a stream (/blog and /updates).
|
|
3
3
|
* No Node-only imports, so it stays importable from an Astro endpoint in any runtime.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
/** Escapes text for an XML node or attribute; `&` goes first so entities aren't double-escaped. */
|
|
7
7
|
export const escapeXml = (value: string): string =>
|
|
8
8
|
value
|
|
9
|
-
.replace(/&/g,
|
|
10
|
-
.replace(/</g,
|
|
11
|
-
.replace(/>/g,
|
|
12
|
-
.replace(/"/g,
|
|
13
|
-
.replace(/'/g,
|
|
9
|
+
.replace(/&/g, "&")
|
|
10
|
+
.replace(/</g, "<")
|
|
11
|
+
.replace(/>/g, ">")
|
|
12
|
+
.replace(/"/g, """)
|
|
13
|
+
.replace(/'/g, "'");
|
|
14
14
|
|
|
15
15
|
export interface FeedItem {
|
|
16
|
-
title: string
|
|
16
|
+
title: string;
|
|
17
17
|
/** Absolute URL. Also used as the guid, which is why it must be stable. */
|
|
18
|
-
link: string
|
|
19
|
-
description: string
|
|
20
|
-
pubDate: Date
|
|
18
|
+
link: string;
|
|
19
|
+
description: string;
|
|
20
|
+
pubDate: Date;
|
|
21
21
|
/** Plain author names. Rendered as `<dc:creator>`, not `<author>`. */
|
|
22
|
-
authors?: readonly string[]
|
|
23
|
-
categories?: readonly string[]
|
|
22
|
+
authors?: readonly string[];
|
|
23
|
+
categories?: readonly string[];
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
export interface FeedOptions {
|
|
27
|
-
title: string
|
|
28
|
-
description: string
|
|
27
|
+
title: string;
|
|
28
|
+
description: string;
|
|
29
29
|
/** Absolute URL of the page this feed describes. */
|
|
30
|
-
siteUrl: string
|
|
30
|
+
siteUrl: string;
|
|
31
31
|
/** Absolute URL of the feed document itself, for `atom:link rel="self"`. */
|
|
32
|
-
feedUrl: string
|
|
33
|
-
items: readonly FeedItem[]
|
|
32
|
+
feedUrl: string;
|
|
33
|
+
items: readonly FeedItem[];
|
|
34
34
|
/** Defaults to the newest item's date. */
|
|
35
|
-
lastBuildDate?: Date
|
|
35
|
+
lastBuildDate?: Date;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
/** RFC 822 date, as RSS 2.0 requires; `toUTCString()` yields exactly that, locale-independent. */
|
|
39
|
-
export const rfc822 = (date: Date): string => date.toUTCString()
|
|
39
|
+
export const rfc822 = (date: Date): string => date.toUTCString();
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
42
|
* A complete RSS 2.0 document; bylines use `dc:creator` because `<author>` must be an email.
|
|
@@ -50,8 +50,8 @@ export function renderFeed({
|
|
|
50
50
|
items,
|
|
51
51
|
lastBuildDate,
|
|
52
52
|
}: FeedOptions): string {
|
|
53
|
-
const newest = items[0]?.pubDate
|
|
54
|
-
const built = lastBuildDate ?? newest
|
|
53
|
+
const newest = items[0]?.pubDate;
|
|
54
|
+
const built = lastBuildDate ?? newest;
|
|
55
55
|
|
|
56
56
|
const entries = items.map((item) => {
|
|
57
57
|
const parts = [
|
|
@@ -64,9 +64,9 @@ export function renderFeed({
|
|
|
64
64
|
` <pubDate>${rfc822(item.pubDate)}</pubDate>`,
|
|
65
65
|
...(item.authors ?? []).map((a) => ` <dc:creator>${escapeXml(a)}</dc:creator>`),
|
|
66
66
|
...(item.categories ?? []).map((c) => ` <category>${escapeXml(c)}</category>`),
|
|
67
|
-
]
|
|
68
|
-
return ` <item>\n${parts.join(
|
|
69
|
-
})
|
|
67
|
+
];
|
|
68
|
+
return ` <item>\n${parts.join("\n")}\n </item>`;
|
|
69
|
+
});
|
|
70
70
|
|
|
71
71
|
return `<?xml version="1.0" encoding="UTF-8"?>
|
|
72
72
|
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
|
|
@@ -76,10 +76,10 @@ export function renderFeed({
|
|
|
76
76
|
<description>${escapeXml(description)}</description>
|
|
77
77
|
<language>en</language>
|
|
78
78
|
<atom:link href="${escapeXml(feedUrl)}" rel="self" type="application/rss+xml" />${
|
|
79
|
-
built ? `\n <lastBuildDate>${rfc822(built)}</lastBuildDate>` :
|
|
79
|
+
built ? `\n <lastBuildDate>${rfc822(built)}</lastBuildDate>` : ""
|
|
80
80
|
}
|
|
81
|
-
${entries.join(
|
|
81
|
+
${entries.join("\n")}
|
|
82
82
|
</channel>
|
|
83
83
|
</rss>
|
|
84
|
-
|
|
84
|
+
`;
|
|
85
85
|
}
|
package/src/fonts.css
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
/* Space Grotesk 400 — latin */
|
|
7
7
|
@font-face {
|
|
8
|
-
font-family:
|
|
8
|
+
font-family: "Space Grotesk";
|
|
9
9
|
font-style: normal;
|
|
10
10
|
font-weight: 400;
|
|
11
11
|
font-display: optional;
|
|
12
|
-
src: url(
|
|
12
|
+
src: url("@fontsource/space-grotesk/files/space-grotesk-latin-400-normal.woff2") format("woff2");
|
|
13
13
|
unicode-range:
|
|
14
14
|
U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
|
|
15
15
|
U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
|
|
18
18
|
/* Space Grotesk 400 — latin-ext */
|
|
19
19
|
@font-face {
|
|
20
|
-
font-family:
|
|
20
|
+
font-family: "Space Grotesk";
|
|
21
21
|
font-style: normal;
|
|
22
22
|
font-weight: 400;
|
|
23
23
|
font-display: optional;
|
|
24
|
-
src: url(
|
|
25
|
-
format(
|
|
24
|
+
src: url("@fontsource/space-grotesk/files/space-grotesk-latin-ext-400-normal.woff2")
|
|
25
|
+
format("woff2");
|
|
26
26
|
unicode-range:
|
|
27
27
|
U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
|
|
28
28
|
U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
|
|
32
32
|
/* Space Grotesk 400 — vietnamese */
|
|
33
33
|
@font-face {
|
|
34
|
-
font-family:
|
|
34
|
+
font-family: "Space Grotesk";
|
|
35
35
|
font-style: normal;
|
|
36
36
|
font-weight: 400;
|
|
37
37
|
font-display: optional;
|
|
38
|
-
src: url(
|
|
39
|
-
format(
|
|
38
|
+
src: url("@fontsource/space-grotesk/files/space-grotesk-vietnamese-400-normal.woff2")
|
|
39
|
+
format("woff2");
|
|
40
40
|
unicode-range:
|
|
41
41
|
U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301,
|
|
42
42
|
U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
|
@@ -44,11 +44,11 @@
|
|
|
44
44
|
|
|
45
45
|
/* Space Grotesk 500 — latin */
|
|
46
46
|
@font-face {
|
|
47
|
-
font-family:
|
|
47
|
+
font-family: "Space Grotesk";
|
|
48
48
|
font-style: normal;
|
|
49
49
|
font-weight: 500;
|
|
50
50
|
font-display: optional;
|
|
51
|
-
src: url(
|
|
51
|
+
src: url("@fontsource/space-grotesk/files/space-grotesk-latin-500-normal.woff2") format("woff2");
|
|
52
52
|
unicode-range:
|
|
53
53
|
U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
|
|
54
54
|
U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
@@ -56,12 +56,12 @@
|
|
|
56
56
|
|
|
57
57
|
/* Space Grotesk 500 — latin-ext */
|
|
58
58
|
@font-face {
|
|
59
|
-
font-family:
|
|
59
|
+
font-family: "Space Grotesk";
|
|
60
60
|
font-style: normal;
|
|
61
61
|
font-weight: 500;
|
|
62
62
|
font-display: optional;
|
|
63
|
-
src: url(
|
|
64
|
-
format(
|
|
63
|
+
src: url("@fontsource/space-grotesk/files/space-grotesk-latin-ext-500-normal.woff2")
|
|
64
|
+
format("woff2");
|
|
65
65
|
unicode-range:
|
|
66
66
|
U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
|
|
67
67
|
U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
|
|
@@ -70,12 +70,12 @@
|
|
|
70
70
|
|
|
71
71
|
/* Space Grotesk 500 — vietnamese */
|
|
72
72
|
@font-face {
|
|
73
|
-
font-family:
|
|
73
|
+
font-family: "Space Grotesk";
|
|
74
74
|
font-style: normal;
|
|
75
75
|
font-weight: 500;
|
|
76
76
|
font-display: optional;
|
|
77
|
-
src: url(
|
|
78
|
-
format(
|
|
77
|
+
src: url("@fontsource/space-grotesk/files/space-grotesk-vietnamese-500-normal.woff2")
|
|
78
|
+
format("woff2");
|
|
79
79
|
unicode-range:
|
|
80
80
|
U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301,
|
|
81
81
|
U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
|
@@ -83,11 +83,11 @@
|
|
|
83
83
|
|
|
84
84
|
/* Space Grotesk 600 — latin */
|
|
85
85
|
@font-face {
|
|
86
|
-
font-family:
|
|
86
|
+
font-family: "Space Grotesk";
|
|
87
87
|
font-style: normal;
|
|
88
88
|
font-weight: 600;
|
|
89
89
|
font-display: optional;
|
|
90
|
-
src: url(
|
|
90
|
+
src: url("@fontsource/space-grotesk/files/space-grotesk-latin-600-normal.woff2") format("woff2");
|
|
91
91
|
unicode-range:
|
|
92
92
|
U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
|
|
93
93
|
U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
@@ -95,12 +95,12 @@
|
|
|
95
95
|
|
|
96
96
|
/* Space Grotesk 600 — latin-ext */
|
|
97
97
|
@font-face {
|
|
98
|
-
font-family:
|
|
98
|
+
font-family: "Space Grotesk";
|
|
99
99
|
font-style: normal;
|
|
100
100
|
font-weight: 600;
|
|
101
101
|
font-display: optional;
|
|
102
|
-
src: url(
|
|
103
|
-
format(
|
|
102
|
+
src: url("@fontsource/space-grotesk/files/space-grotesk-latin-ext-600-normal.woff2")
|
|
103
|
+
format("woff2");
|
|
104
104
|
unicode-range:
|
|
105
105
|
U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
|
|
106
106
|
U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
|
|
@@ -109,12 +109,12 @@
|
|
|
109
109
|
|
|
110
110
|
/* Space Grotesk 600 — vietnamese */
|
|
111
111
|
@font-face {
|
|
112
|
-
font-family:
|
|
112
|
+
font-family: "Space Grotesk";
|
|
113
113
|
font-style: normal;
|
|
114
114
|
font-weight: 600;
|
|
115
115
|
font-display: optional;
|
|
116
|
-
src: url(
|
|
117
|
-
format(
|
|
116
|
+
src: url("@fontsource/space-grotesk/files/space-grotesk-vietnamese-600-normal.woff2")
|
|
117
|
+
format("woff2");
|
|
118
118
|
unicode-range:
|
|
119
119
|
U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301,
|
|
120
120
|
U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
|
@@ -122,11 +122,11 @@
|
|
|
122
122
|
|
|
123
123
|
/* Space Grotesk 700 — latin */
|
|
124
124
|
@font-face {
|
|
125
|
-
font-family:
|
|
125
|
+
font-family: "Space Grotesk";
|
|
126
126
|
font-style: normal;
|
|
127
127
|
font-weight: 700;
|
|
128
128
|
font-display: optional;
|
|
129
|
-
src: url(
|
|
129
|
+
src: url("@fontsource/space-grotesk/files/space-grotesk-latin-700-normal.woff2") format("woff2");
|
|
130
130
|
unicode-range:
|
|
131
131
|
U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
|
|
132
132
|
U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
@@ -134,12 +134,12 @@
|
|
|
134
134
|
|
|
135
135
|
/* Space Grotesk 700 — latin-ext */
|
|
136
136
|
@font-face {
|
|
137
|
-
font-family:
|
|
137
|
+
font-family: "Space Grotesk";
|
|
138
138
|
font-style: normal;
|
|
139
139
|
font-weight: 700;
|
|
140
140
|
font-display: optional;
|
|
141
|
-
src: url(
|
|
142
|
-
format(
|
|
141
|
+
src: url("@fontsource/space-grotesk/files/space-grotesk-latin-ext-700-normal.woff2")
|
|
142
|
+
format("woff2");
|
|
143
143
|
unicode-range:
|
|
144
144
|
U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
|
|
145
145
|
U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
|
|
@@ -148,12 +148,12 @@
|
|
|
148
148
|
|
|
149
149
|
/* Space Grotesk 700 — vietnamese */
|
|
150
150
|
@font-face {
|
|
151
|
-
font-family:
|
|
151
|
+
font-family: "Space Grotesk";
|
|
152
152
|
font-style: normal;
|
|
153
153
|
font-weight: 700;
|
|
154
154
|
font-display: optional;
|
|
155
|
-
src: url(
|
|
156
|
-
format(
|
|
155
|
+
src: url("@fontsource/space-grotesk/files/space-grotesk-vietnamese-700-normal.woff2")
|
|
156
|
+
format("woff2");
|
|
157
157
|
unicode-range:
|
|
158
158
|
U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301,
|
|
159
159
|
U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
|
@@ -161,11 +161,11 @@
|
|
|
161
161
|
|
|
162
162
|
/* IBM Plex Mono 400 — latin */
|
|
163
163
|
@font-face {
|
|
164
|
-
font-family:
|
|
164
|
+
font-family: "IBM Plex Mono";
|
|
165
165
|
font-style: normal;
|
|
166
166
|
font-weight: 400;
|
|
167
167
|
font-display: optional;
|
|
168
|
-
src: url(
|
|
168
|
+
src: url("@fontsource/ibm-plex-mono/files/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
|
|
169
169
|
unicode-range:
|
|
170
170
|
U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
|
|
171
171
|
U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
@@ -173,12 +173,12 @@
|
|
|
173
173
|
|
|
174
174
|
/* IBM Plex Mono 400 — latin-ext */
|
|
175
175
|
@font-face {
|
|
176
|
-
font-family:
|
|
176
|
+
font-family: "IBM Plex Mono";
|
|
177
177
|
font-style: normal;
|
|
178
178
|
font-weight: 400;
|
|
179
179
|
font-display: optional;
|
|
180
|
-
src: url(
|
|
181
|
-
format(
|
|
180
|
+
src: url("@fontsource/ibm-plex-mono/files/ibm-plex-mono-latin-ext-400-normal.woff2")
|
|
181
|
+
format("woff2");
|
|
182
182
|
unicode-range:
|
|
183
183
|
U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
|
|
184
184
|
U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
|
|
@@ -187,11 +187,11 @@
|
|
|
187
187
|
|
|
188
188
|
/* IBM Plex Mono 500 — latin */
|
|
189
189
|
@font-face {
|
|
190
|
-
font-family:
|
|
190
|
+
font-family: "IBM Plex Mono";
|
|
191
191
|
font-style: normal;
|
|
192
192
|
font-weight: 500;
|
|
193
193
|
font-display: optional;
|
|
194
|
-
src: url(
|
|
194
|
+
src: url("@fontsource/ibm-plex-mono/files/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
|
|
195
195
|
unicode-range:
|
|
196
196
|
U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
|
|
197
197
|
U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
@@ -199,12 +199,12 @@
|
|
|
199
199
|
|
|
200
200
|
/* IBM Plex Mono 500 — latin-ext */
|
|
201
201
|
@font-face {
|
|
202
|
-
font-family:
|
|
202
|
+
font-family: "IBM Plex Mono";
|
|
203
203
|
font-style: normal;
|
|
204
204
|
font-weight: 500;
|
|
205
205
|
font-display: optional;
|
|
206
|
-
src: url(
|
|
207
|
-
format(
|
|
206
|
+
src: url("@fontsource/ibm-plex-mono/files/ibm-plex-mono-latin-ext-500-normal.woff2")
|
|
207
|
+
format("woff2");
|
|
208
208
|
unicode-range:
|
|
209
209
|
U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
|
|
210
210
|
U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
|
package/src/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @rxova/brand — the project data behind rxova.
|
|
1
|
+
/** @rxova/brand — the project data behind rxova.dev. Stylesheets are subpath exports (`@rxova/brand/tokens.css`). */
|
|
2
2
|
|
|
3
3
|
export {
|
|
4
4
|
RXOVA_ORIGIN,
|
|
@@ -16,6 +16,6 @@ export {
|
|
|
16
16
|
type ProjectId,
|
|
17
17
|
type RepoId,
|
|
18
18
|
type SectionId,
|
|
19
|
-
} from
|
|
19
|
+
} from "./sites.ts";
|
|
20
20
|
|
|
21
|
-
export { renderFeed, escapeXml, rfc822, type FeedItem, type FeedOptions } from
|
|
21
|
+
export { renderFeed, escapeXml, rfc822, type FeedItem, type FeedOptions } from "./feed.ts";
|
package/src/sites.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The rxova.
|
|
2
|
+
* The rxova.dev site map. Each surface has its own base path, so cross-project links are absolute.
|
|
3
3
|
* Imported from `astro.config.mjs` under Node, so it must never import CSS or a component.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
/** Canonical origin. Override for a staging deploy (e.g. https://web.rxova.
|
|
7
|
-
export const RXOVA_ORIGIN = process.env.RXOVA_ORIGIN ??
|
|
6
|
+
/** Canonical origin. Override for a staging deploy (e.g. https://web.rxova.dev). */
|
|
7
|
+
export const RXOVA_ORIGIN = process.env.RXOVA_ORIGIN ?? "https://rxova.dev";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Every rxova project, in display order: the landing's project rail and the docs switcher.
|
|
@@ -12,84 +12,84 @@ export const RXOVA_ORIGIN = process.env.RXOVA_ORIGIN ?? 'https://rxova.org'
|
|
|
12
12
|
*/
|
|
13
13
|
const DEFINITIONS = [
|
|
14
14
|
{
|
|
15
|
-
id:
|
|
16
|
-
label:
|
|
17
|
-
tagline:
|
|
18
|
-
repo:
|
|
19
|
-
npm:
|
|
20
|
-
packages: [
|
|
15
|
+
id: "journey",
|
|
16
|
+
label: "journey",
|
|
17
|
+
tagline: "Declarative journey graphs for non-linear UI flows.",
|
|
18
|
+
repo: "https://github.com/rxova/journey",
|
|
19
|
+
npm: "https://www.npmjs.com/package/@rxova/journey-core",
|
|
20
|
+
packages: ["@rxova/journey-core", "@rxova/journey-react", "@rxova/journey-devtools-bridge"],
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
|
-
id:
|
|
24
|
-
label:
|
|
25
|
-
tagline:
|
|
26
|
-
repo:
|
|
27
|
-
npm:
|
|
23
|
+
id: "react-inputs",
|
|
24
|
+
label: "react-inputs",
|
|
25
|
+
tagline: "The tricky React inputs, done right.",
|
|
26
|
+
repo: "https://github.com/rxova/react-inputs",
|
|
27
|
+
npm: "https://www.npmjs.com/package/@rxova/react-inputs",
|
|
28
28
|
packages: [
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
29
|
+
"@rxova/react-inputs",
|
|
30
|
+
"@rxova/react-intl-currency-input",
|
|
31
|
+
"@rxova/react-rating-input",
|
|
32
|
+
"@rxova/react-otp-input",
|
|
33
|
+
"@rxova/react-password-input",
|
|
34
|
+
"@rxova/react-phone-input",
|
|
35
|
+
"@rxova/react-date-input",
|
|
36
|
+
"@rxova/react-time-input",
|
|
37
|
+
"@rxova/react-tags-input",
|
|
38
|
+
"@rxova/react-file-input",
|
|
39
39
|
],
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
|
-
id:
|
|
43
|
-
label:
|
|
44
|
-
tagline:
|
|
45
|
-
repo:
|
|
46
|
-
npm:
|
|
47
|
-
packages: [
|
|
42
|
+
id: "use-everywhere",
|
|
43
|
+
label: "use-everywhere",
|
|
44
|
+
tagline: "State and messages that exist in every tab, window, and worker.",
|
|
45
|
+
repo: "https://github.com/rxova/use-everywhere",
|
|
46
|
+
npm: "https://www.npmjs.com/package/use-everywhere",
|
|
47
|
+
packages: ["use-everywhere", "@use-everywhere/core"],
|
|
48
48
|
},
|
|
49
49
|
{
|
|
50
|
-
id:
|
|
51
|
-
label:
|
|
52
|
-
tagline:
|
|
53
|
-
repo:
|
|
54
|
-
npm:
|
|
55
|
-
packages: [
|
|
50
|
+
id: "ts-extended-errors",
|
|
51
|
+
label: "ts-extended-errors",
|
|
52
|
+
tagline: "Typed, serializable errors that survive a JSON round trip.",
|
|
53
|
+
repo: "https://github.com/rxova/ts-extended-errors",
|
|
54
|
+
npm: "https://www.npmjs.com/package/ts-extended-errors",
|
|
55
|
+
packages: ["ts-extended-errors"],
|
|
56
56
|
},
|
|
57
57
|
{
|
|
58
|
-
id:
|
|
59
|
-
label:
|
|
60
|
-
tagline:
|
|
61
|
-
repo:
|
|
62
|
-
npm:
|
|
63
|
-
packages: [
|
|
58
|
+
id: "overlock",
|
|
59
|
+
label: "overlock",
|
|
60
|
+
tagline: "A deterministic gate on test integrity in a git patch.",
|
|
61
|
+
repo: "https://github.com/rxova/overlock",
|
|
62
|
+
npm: "https://www.npmjs.com/package/overlock",
|
|
63
|
+
packages: ["overlock"],
|
|
64
64
|
},
|
|
65
|
-
] as const
|
|
65
|
+
] as const;
|
|
66
66
|
|
|
67
|
-
export type ProjectId = (typeof DEFINITIONS)[number][
|
|
67
|
+
export type ProjectId = (typeof DEFINITIONS)[number]["id"];
|
|
68
68
|
|
|
69
69
|
export interface Project {
|
|
70
|
-
id: ProjectId
|
|
70
|
+
id: ProjectId;
|
|
71
71
|
/** Display name, used in the header, the switcher and the landing cards. */
|
|
72
|
-
label: string
|
|
72
|
+
label: string;
|
|
73
73
|
/** Path the aggregator mounts this project's docs at: always `/packages/<id>/`. */
|
|
74
|
-
mount: `/${string}
|
|
75
|
-
tagline: string
|
|
76
|
-
repo: string
|
|
74
|
+
mount: `/${string}/`;
|
|
75
|
+
tagline: string;
|
|
76
|
+
repo: string;
|
|
77
77
|
/** The package a newcomer should install first. */
|
|
78
|
-
npm: string
|
|
78
|
+
npm: string;
|
|
79
79
|
/** npm package names, most prominent first. */
|
|
80
|
-
packages: string[]
|
|
80
|
+
packages: string[];
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
export const PROJECTS: readonly Project[] = DEFINITIONS.map((project) => ({
|
|
84
84
|
...project,
|
|
85
85
|
mount: `/packages/${project.id}/`,
|
|
86
86
|
packages: [...project.packages],
|
|
87
|
-
}))
|
|
87
|
+
}));
|
|
88
88
|
|
|
89
89
|
export function getProject(id: ProjectId): Project {
|
|
90
|
-
const project = PROJECTS.find((p) => p.id === id)
|
|
91
|
-
if (!project) throw new Error(`[@rxova/brand] unknown project id: ${id}`)
|
|
92
|
-
return project
|
|
90
|
+
const project = PROJECTS.find((p) => p.id === id);
|
|
91
|
+
if (!project) throw new Error(`[@rxova/brand] unknown project id: ${id}`);
|
|
92
|
+
return project;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
/**
|
|
@@ -99,59 +99,68 @@ export function getProject(id: ProjectId): Project {
|
|
|
99
99
|
export const REPOS = [
|
|
100
100
|
...PROJECTS.map((p) => ({ id: p.id, label: p.label, repo: p.repo, project: true as const })),
|
|
101
101
|
{
|
|
102
|
-
id:
|
|
103
|
-
label:
|
|
104
|
-
repo
|
|
102
|
+
id: "nx-link",
|
|
103
|
+
label: "NX LinkConnect",
|
|
104
|
+
// No `repo`: the iPhone app's source is private, so the app's own page is where a
|
|
105
|
+
// reader is sent instead of a GitHub URL that would 404 for everyone.
|
|
106
|
+
page: "/apps/nx-link/",
|
|
105
107
|
project: false as const,
|
|
106
108
|
},
|
|
107
109
|
{
|
|
108
|
-
id:
|
|
109
|
-
label:
|
|
110
|
-
repo:
|
|
110
|
+
id: "rxova-website",
|
|
111
|
+
label: "Website",
|
|
112
|
+
repo: "https://github.com/rxova/rxova-website",
|
|
111
113
|
project: false as const,
|
|
112
114
|
},
|
|
113
|
-
|
|
115
|
+
{
|
|
116
|
+
id: "brand",
|
|
117
|
+
label: "Brand",
|
|
118
|
+
repo: "https://github.com/rxova/rxova-website/tree/main/packages/brand",
|
|
119
|
+
project: false as const,
|
|
120
|
+
},
|
|
121
|
+
] as const;
|
|
114
122
|
|
|
115
|
-
export type RepoId = (typeof REPOS)[number][
|
|
123
|
+
export type RepoId = (typeof REPOS)[number]["id"];
|
|
116
124
|
|
|
117
125
|
/** The ids only, for schema validation — see packages/website-schemas. */
|
|
118
|
-
export const REPO_IDS: readonly RepoId[] = REPOS.map((r) => r.id)
|
|
126
|
+
export const REPO_IDS: readonly RepoId[] = REPOS.map((r) => r.id);
|
|
119
127
|
|
|
120
128
|
export function getRepo(id: RepoId): (typeof REPOS)[number] {
|
|
121
|
-
const found = REPOS.find((r) => r.id === id)
|
|
122
|
-
if (!found) throw new Error(`[@rxova/brand] unknown repo id: ${id}`)
|
|
123
|
-
return found
|
|
129
|
+
const found = REPOS.find((r) => r.id === id);
|
|
130
|
+
if (!found) throw new Error(`[@rxova/brand] unknown repo id: ${id}`);
|
|
131
|
+
return found;
|
|
124
132
|
}
|
|
125
133
|
|
|
126
134
|
/**
|
|
127
|
-
* The standalone sections of rxova.
|
|
135
|
+
* The standalone sections of rxova.dev, in menu order. Every surface's navigation reads this: the
|
|
128
136
|
* site header, the docs header and the shared footer. The site root is the about page, reached by the mark.
|
|
129
137
|
*/
|
|
130
138
|
export const SECTIONS = [
|
|
131
|
-
{ id:
|
|
132
|
-
{ id:
|
|
133
|
-
{ id:
|
|
134
|
-
|
|
139
|
+
{ id: "apps", label: "Apps", path: "/apps/" },
|
|
140
|
+
{ id: "projects", label: "Projects", path: "/projects/" },
|
|
141
|
+
{ id: "blog", label: "Blog", path: "/blog/" },
|
|
142
|
+
{ id: "updates", label: "Updates", path: "/updates/" },
|
|
143
|
+
] as const;
|
|
135
144
|
|
|
136
|
-
export type SectionId = (typeof SECTIONS)[number][
|
|
145
|
+
export type SectionId = (typeof SECTIONS)[number]["id"];
|
|
137
146
|
|
|
138
147
|
/** Absolute URL to a project's docs root. */
|
|
139
148
|
export function docsUrl(id: ProjectId): string {
|
|
140
|
-
return `${RXOVA_ORIGIN}${getProject(id).mount}
|
|
149
|
+
return `${RXOVA_ORIGIN}${getProject(id).mount}`;
|
|
141
150
|
}
|
|
142
151
|
|
|
143
152
|
/** Absolute URL to a path on the umbrella site, e.g. `/privacy`. */
|
|
144
|
-
export function siteUrl(path =
|
|
145
|
-
return `${RXOVA_ORIGIN}${path.startsWith(
|
|
153
|
+
export function siteUrl(path = "/"): string {
|
|
154
|
+
return `${RXOVA_ORIGIN}${path.startsWith("/") ? path : `/${path}`}`;
|
|
146
155
|
}
|
|
147
156
|
|
|
148
157
|
/**
|
|
149
158
|
* Absolute canonical URL for a page, always with a trailing slash (GitHub Pages 301s `/blog`).
|
|
150
159
|
* Pages only; assets keep their exact path and use `siteUrl`.
|
|
151
160
|
*/
|
|
152
|
-
export function canonicalUrl(path =
|
|
153
|
-
const rooted = path.startsWith(
|
|
154
|
-
return `${RXOVA_ORIGIN}${rooted.endsWith(
|
|
161
|
+
export function canonicalUrl(path = "/"): string {
|
|
162
|
+
const rooted = path.startsWith("/") ? path : `/${path}`;
|
|
163
|
+
return `${RXOVA_ORIGIN}${rooted.endsWith("/") ? rooted : `${rooted}/`}`;
|
|
155
164
|
}
|
|
156
165
|
|
|
157
166
|
/**
|
|
@@ -159,6 +168,6 @@ export function canonicalUrl(path = '/'): string {
|
|
|
159
168
|
* Returns `undefined` on a standalone build, where the base is `/`.
|
|
160
169
|
*/
|
|
161
170
|
export function projectFromBase(base: string): ProjectId | undefined {
|
|
162
|
-
const normalised = base.endsWith(
|
|
163
|
-
return PROJECTS.find((p) => p.mount === normalised)?.id
|
|
171
|
+
const normalised = base.endsWith("/") ? base : `${base}/`;
|
|
172
|
+
return PROJECTS.find((p) => p.mount === normalised)?.id;
|
|
164
173
|
}
|
package/src/tokens.css
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
:root,
|
|
7
|
-
:root[data-theme=
|
|
7
|
+
:root[data-theme="light"] {
|
|
8
8
|
color-scheme: light;
|
|
9
9
|
|
|
10
10
|
/* Surfaces, ordered background -> foreground. */
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
--rx-shadow-soft: 0 20px 60px -30px rgb(107 61 240 / 0.35);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
:root[data-theme=
|
|
37
|
+
:root[data-theme="dark"] {
|
|
38
38
|
color-scheme: dark;
|
|
39
39
|
|
|
40
40
|
--rx-bg: #0b0a08;
|
|
@@ -103,9 +103,9 @@
|
|
|
103
103
|
--rx-gradient: linear-gradient(90deg, var(--rx-accent-a), var(--rx-accent-b), var(--rx-accent-c));
|
|
104
104
|
|
|
105
105
|
--rx-font-sans:
|
|
106
|
-
|
|
106
|
+
"Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
|
|
107
107
|
--rx-font-mono:
|
|
108
|
-
|
|
108
|
+
"IBM Plex Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
|
|
109
109
|
|
|
110
110
|
--rx-radius: 12px;
|
|
111
111
|
--rx-radius-sm: 6px;
|