@rxova/brand 1.1.1 → 1.3.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/package.json +2 -2
- package/src/index.ts +2 -0
- package/src/sites.test.ts +10 -0
- package/src/sites.ts +12 -0
- package/src/tokens.css +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rxova/brand",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Design tokens, typefaces and project data for rxova.org",
|
|
6
6
|
"keywords": [
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@resvg/resvg-js": "^2.6.2",
|
|
44
|
-
"@rxova/repo-tooling": "0.0.
|
|
44
|
+
"@rxova/repo-tooling": "0.0.1",
|
|
45
45
|
"@types/node": "^26.6.1",
|
|
46
46
|
"@vitest/coverage-v8": "^5.0.1",
|
|
47
47
|
"publint": "^0.3.24",
|
package/src/index.ts
CHANGED
|
@@ -5,6 +5,7 @@ export {
|
|
|
5
5
|
PROJECTS,
|
|
6
6
|
REPOS,
|
|
7
7
|
REPO_IDS,
|
|
8
|
+
SECTIONS,
|
|
8
9
|
getProject,
|
|
9
10
|
getRepo,
|
|
10
11
|
docsUrl,
|
|
@@ -14,6 +15,7 @@ export {
|
|
|
14
15
|
type Project,
|
|
15
16
|
type ProjectId,
|
|
16
17
|
type RepoId,
|
|
18
|
+
type SectionId,
|
|
17
19
|
} from './sites.ts'
|
|
18
20
|
|
|
19
21
|
export { renderFeed, escapeXml, rfc822, type FeedItem, type FeedOptions } from './feed.ts'
|
package/src/sites.test.ts
CHANGED
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
PROJECTS,
|
|
11
11
|
REPOS,
|
|
12
12
|
REPO_IDS,
|
|
13
|
+
SECTIONS,
|
|
13
14
|
getProject,
|
|
14
15
|
getRepo,
|
|
15
16
|
docsUrl,
|
|
@@ -146,3 +147,12 @@ describe('projectFromBase', () => {
|
|
|
146
147
|
expect(projectFromBase('/packages/nope/')).toBeUndefined()
|
|
147
148
|
})
|
|
148
149
|
})
|
|
150
|
+
|
|
151
|
+
describe('SECTIONS', () => {
|
|
152
|
+
it('lists the site sections in menu order, each a page path Pages serves without a redirect', () => {
|
|
153
|
+
expect(SECTIONS.map((s) => s.label)).toEqual(['Projects', 'Blog', 'Updates'])
|
|
154
|
+
for (const section of SECTIONS) {
|
|
155
|
+
expect(section.path).toBe(`/${section.id}/`)
|
|
156
|
+
}
|
|
157
|
+
})
|
|
158
|
+
})
|
package/src/sites.ts
CHANGED
|
@@ -123,6 +123,18 @@ export function getRepo(id: RepoId): (typeof REPOS)[number] {
|
|
|
123
123
|
return found
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
+
/**
|
|
127
|
+
* The standalone sections of rxova.org, in menu order. Every surface's navigation reads this: the
|
|
128
|
+
* site header, the docs header and the shared footer. The site root is the about page, reached by the mark.
|
|
129
|
+
*/
|
|
130
|
+
export const SECTIONS = [
|
|
131
|
+
{ id: 'projects', label: 'Projects', path: '/projects/' },
|
|
132
|
+
{ id: 'blog', label: 'Blog', path: '/blog/' },
|
|
133
|
+
{ id: 'updates', label: 'Updates', path: '/updates/' },
|
|
134
|
+
] as const
|
|
135
|
+
|
|
136
|
+
export type SectionId = (typeof SECTIONS)[number]['id']
|
|
137
|
+
|
|
126
138
|
/** Absolute URL to a project's docs root. */
|
|
127
139
|
export function docsUrl(id: ProjectId): string {
|
|
128
140
|
return `${RXOVA_ORIGIN}${getProject(id).mount}`
|
package/src/tokens.css
CHANGED
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
--rx-muted: #bbb3a6;
|
|
48
48
|
--rx-fg: #f4f1ea;
|
|
49
49
|
|
|
50
|
-
/* Lightened so the accent keeps AA contrast on
|
|
51
|
-
--rx-primary: #
|
|
50
|
+
/* Lightened so the accent keeps AA contrast on every dark surface, --rx-tag-bg included (4.9:1). */
|
|
51
|
+
--rx-primary: #9d82f6;
|
|
52
52
|
--rx-primary-dark: #8159f3;
|
|
53
53
|
--rx-primary-darker: #6b3df0;
|
|
54
54
|
--rx-primary-darkest: #5a2fd6;
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
--rx-muted: #bbb3a6;
|
|
80
80
|
--rx-fg: #f4f1ea;
|
|
81
81
|
|
|
82
|
-
--rx-primary: #
|
|
82
|
+
--rx-primary: #9d82f6;
|
|
83
83
|
--rx-primary-dark: #8159f3;
|
|
84
84
|
--rx-primary-darker: #6b3df0;
|
|
85
85
|
--rx-primary-darkest: #5a2fd6;
|