react-cheminfo 0.19.0 → 0.21.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/lib/about/core/about.d.ts +9 -7
- package/lib/about/core/about.d.ts.map +1 -1
- package/lib/about/core/about.js +8 -2
- package/lib/about/core/about.js.map +1 -1
- package/lib/about/ui/AboutPage.d.ts.map +1 -1
- package/lib/about/ui/AboutPage.js +1 -1
- package/lib/about/ui/AboutPage.js.map +1 -1
- package/lib/about/ui/AboutVersion.d.ts +7 -6
- package/lib/about/ui/AboutVersion.d.ts.map +1 -1
- package/lib/about/ui/AboutVersion.js +32 -9
- package/lib/about/ui/AboutVersion.js.map +1 -1
- package/lib/build/core/buildInfo.d.ts +28 -0
- package/lib/build/core/buildInfo.d.ts.map +1 -1
- package/lib/build/core/buildInfo.js +42 -0
- package/lib/build/core/buildInfo.js.map +1 -1
- package/lib/build/core/index.d.ts +1 -1
- package/lib/build/core/index.d.ts.map +1 -1
- package/lib/build/core/index.js +1 -1
- package/lib/build/core/index.js.map +1 -1
- package/lib/chrome/ui/SiteHeader.d.ts +20 -3
- package/lib/chrome/ui/SiteHeader.d.ts.map +1 -1
- package/lib/chrome/ui/SiteHeader.js +7 -3
- package/lib/chrome/ui/SiteHeader.js.map +1 -1
- package/lib/ecosystem/core/index.d.ts +1 -1
- package/lib/ecosystem/core/index.d.ts.map +1 -1
- package/lib/ecosystem/core/index.js.map +1 -1
- package/lib/ecosystem/core/lookup.d.ts +2 -2
- package/lib/ecosystem/core/lookup.d.ts.map +1 -1
- package/lib/ecosystem/core/lookup.js.map +1 -1
- package/lib/ecosystem/core/nameColors.d.ts +2 -2
- package/lib/ecosystem/core/nameColors.d.ts.map +1 -1
- package/lib/ecosystem/core/nameColors.js.map +1 -1
- package/lib/ecosystem/core/sites.d.ts +3 -3
- package/lib/ecosystem/core/sites.d.ts.map +1 -1
- package/lib/ecosystem/core/sites.js.map +1 -1
- package/lib/ecosystem/core/tokens.d.ts +4 -3
- package/lib/ecosystem/core/tokens.d.ts.map +1 -1
- package/lib/ecosystem/core/tokens.js +8 -7
- package/lib/ecosystem/core/tokens.js.map +1 -1
- package/lib/ecosystem/core/types.d.ts +18 -9
- package/lib/ecosystem/core/types.d.ts.map +1 -1
- package/lib/ecosystem/ui/SiteTheme.d.ts +14 -3
- package/lib/ecosystem/ui/SiteTheme.d.ts.map +1 -1
- package/lib/ecosystem/ui/SiteTheme.js +6 -1
- package/lib/ecosystem/ui/SiteTheme.js.map +1 -1
- package/lib/ecosystem/ui/Wordmark.d.ts +2 -2
- package/lib/ecosystem/ui/Wordmark.d.ts.map +1 -1
- package/lib/ecosystem/ui/marks.d.ts +13 -4
- package/lib/ecosystem/ui/marks.d.ts.map +1 -1
- package/lib/ecosystem/ui/marks.js +11 -3
- package/lib/ecosystem/ui/marks.js.map +1 -1
- package/lib/seo/core/pageMeta.d.ts +2 -2
- package/lib/seo/core/pageMeta.d.ts.map +1 -1
- package/lib/seo/core/siteFiles.d.ts +3 -3
- package/lib/seo/core/siteFiles.d.ts.map +1 -1
- package/lib/seo/core/siteFiles.js.map +1 -1
- package/lib/seo/vite/ogCard.d.ts +9 -2
- package/lib/seo/vite/ogCard.d.ts.map +1 -1
- package/lib/seo/vite/ogCard.js +6 -1
- package/lib/seo/vite/ogCard.js.map +1 -1
- package/lib/seo/vite/prerender.d.ts +2 -2
- package/lib/seo/vite/prerender.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/about/core/about.ts +19 -10
- package/src/about/ui/AboutPage.tsx +12 -6
- package/src/about/ui/AboutVersion.tsx +43 -15
- package/src/build/core/buildInfo.ts +43 -0
- package/src/build/core/index.ts +3 -0
- package/src/chrome/ui/SiteHeader.tsx +28 -6
- package/src/ecosystem/core/index.ts +1 -0
- package/src/ecosystem/core/lookup.ts +2 -2
- package/src/ecosystem/core/nameColors.ts +2 -2
- package/src/ecosystem/core/sites.ts +3 -2
- package/src/ecosystem/core/tokens.ts +10 -9
- package/src/ecosystem/core/types.ts +19 -9
- package/src/ecosystem/ui/SiteTheme.tsx +19 -4
- package/src/ecosystem/ui/Wordmark.tsx +2 -2
- package/src/ecosystem/ui/marks.tsx +23 -5
- package/src/seo/core/noscript.ts +1 -1
- package/src/seo/core/pageMeta.ts +2 -2
- package/src/seo/core/siteFiles.ts +3 -3
- package/src/seo/vite/ogCard.ts +16 -3
- package/src/seo/vite/prerender.ts +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sites.js","sourceRoot":"","sources":["../../../src/ecosystem/core/sites.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sites.js","sourceRoot":"","sources":["../../../src/ecosystem/core/sites.ts"],"names":[],"mappings":"AAWA;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAA6B;IACvD;QACE,EAAE,EAAE,OAAO;QACX,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE;QACnD,IAAI,EAAE,oBAAoB;QAC1B,UAAU,EAAE,gDAAgD;QAC5D,OAAO,EAAE,wDAAwD;QACjE,KAAK,EAAE,WAAW;QAClB,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,SAAS;QACnB,IAAI,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE;KAC9C;IACD;QACE,EAAE,EAAE,OAAO;QACX,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE;QACnD,IAAI,EAAE,oBAAoB;QAC1B,UAAU,EAAE,gDAAgD;QAC5D,OAAO,EAAE,sDAAsD;QAC/D,KAAK,EAAE,YAAY;QACnB,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,SAAS;QACnB,IAAI,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE;KAC9C;IACD;QACE,EAA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S,EAAE;KAC9C;IACD;QACE,EAAE,EAAE,QAAQ;QACZ,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE;QACpD,IAAI,EAAE,qBAAqB;QAC3B,UAAU,EAAE,iDAAiD;QAC7D,gBAAgB,EAAE,IAAI;QACtB,OAAO,EAAE,gEAAgE;QACzE,KAAK,EAAE,UAAU;QACjB,KAAK,EAAE,SAAS;QAChB,2EAA2E;QAC3E,yEAAyE;QACzE,6CAA6C;QAC7C,QAAQ,EAAE,SAAS;QACnB,IAAI,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE;KAC9C;CACF,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,OAAO,CAAC,IAAgB;IACtC,OAAO,WAAW,IAAI,CAAC,IAAI,GAAG,CAAC;AACjC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SiteId } from './sites.ts';
|
|
1
|
+
import type { SiteId, SiteRecord } from './sites.ts';
|
|
2
2
|
/**
|
|
3
3
|
* The custom properties a site of the family sets on `:root`: the two colours
|
|
4
4
|
* it owns, the readable form of the second one when that is needed, and the
|
|
@@ -6,8 +6,9 @@ import type { SiteId } from './sites.ts';
|
|
|
6
6
|
*
|
|
7
7
|
* It is a complete rule rather than a list of declarations, so it drops into a
|
|
8
8
|
* `<style>` of a prerendered page as it is.
|
|
9
|
-
* @param
|
|
9
|
+
* @param site - The site whose palette is wanted: its id, or the record of a
|
|
10
|
+
* site that is not one of the family.
|
|
10
11
|
* @returns The `:root` rule, ending in a newline.
|
|
11
12
|
*/
|
|
12
|
-
export declare function siteTokensCss(
|
|
13
|
+
export declare function siteTokensCss(site: SiteId | SiteRecord): string;
|
|
13
14
|
//# sourceMappingURL=tokens.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../../src/ecosystem/core/tokens.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../../src/ecosystem/core/tokens.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAErD;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,MAAM,CAgB/D"}
|
|
@@ -7,20 +7,21 @@ import { siteById } from "./lookup.js";
|
|
|
7
7
|
*
|
|
8
8
|
* It is a complete rule rather than a list of declarations, so it drops into a
|
|
9
9
|
* `<style>` of a prerendered page as it is.
|
|
10
|
-
* @param
|
|
10
|
+
* @param site - The site whose palette is wanted: its id, or the record of a
|
|
11
|
+
* site that is not one of the family.
|
|
11
12
|
* @returns The `:root` rule, ending in a newline.
|
|
12
13
|
*/
|
|
13
|
-
export function siteTokensCss(
|
|
14
|
-
const
|
|
15
|
-
const answering = answeringColor(
|
|
14
|
+
export function siteTokensCss(site) {
|
|
15
|
+
const record = typeof site === 'string' ? siteById(site) : site;
|
|
16
|
+
const answering = answeringColor(record);
|
|
16
17
|
const declarations = [
|
|
17
|
-
`--brand: ${
|
|
18
|
+
`--brand: ${record.brand};`,
|
|
18
19
|
`--brand-alt: ${answering};`,
|
|
19
20
|
];
|
|
20
21
|
// The answering colour of several sites is a yellow or an amber that sits
|
|
21
22
|
// around 2:1 on white, so text set in it needs the darkened form instead.
|
|
22
|
-
if (
|
|
23
|
-
declarations.push(`--brand-alt-text: ${
|
|
23
|
+
if (record.brandAlt !== answering) {
|
|
24
|
+
declarations.push(`--brand-alt-text: ${record.brandAlt};`);
|
|
24
25
|
}
|
|
25
26
|
declarations.push('--accent: var(--brand);');
|
|
26
27
|
return `:root {\n ${declarations.join('\n ')}\n}\n`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../../src/ecosystem/core/tokens.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAGvC
|
|
1
|
+
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../../src/ecosystem/core/tokens.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAGvC;;;;;;;;;;GAUG;AACH,MAAM,UAAU,aAAa,CAAC,IAAyB;IACrD,MAAM,MAAM,GAAG,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAChE,MAAM,SAAS,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;IACzC,MAAM,YAAY,GAAG;QACnB,YAAY,MAAM,CAAC,KAAK,GAAG;QAC3B,gBAAgB,SAAS,GAAG;KAC7B,CAAC;IAEF,0EAA0E;IAC1E,0EAA0E;IAC1E,IAAI,MAAM,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;QAClC,YAAY,CAAC,IAAI,CAAC,qBAAqB,MAAM,CAAC,QAAQ,GAAG,CAAC,CAAC;IAC7D,CAAC;IACD,YAAY,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC;IAE7C,OAAO,cAAc,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;AACxD,CAAC;AAED,+EAA+E;AAC/E,8EAA8E;AAC9E,SAAS,cAAc,CAAC,IAAgB;IACtC,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;AAC9E,CAAC"}
|
|
@@ -24,10 +24,14 @@ export interface SiteName {
|
|
|
24
24
|
*/
|
|
25
25
|
ink?: 'lead' | 'alt';
|
|
26
26
|
}
|
|
27
|
-
/**
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
/**
|
|
28
|
+
* What the chrome draws a site from: its name, address and two colours. A site
|
|
29
|
+
* that is deliberately not one of the family writes its own, and passes it
|
|
30
|
+
* wherever a family site passes its id.
|
|
31
|
+
*/
|
|
32
|
+
export interface SiteRecord {
|
|
33
|
+
/** The identifier the site is named by. */
|
|
34
|
+
id: string;
|
|
31
35
|
/** The name, split the way the site's own wordmark splits it. */
|
|
32
36
|
name: SiteName;
|
|
33
37
|
/** Where the site lives, written the way it is typed. */
|
|
@@ -44,11 +48,6 @@ export interface EcosystemSite {
|
|
|
44
48
|
publicRepository?: boolean;
|
|
45
49
|
/** One line on what the site does. */
|
|
46
50
|
tagline: string;
|
|
47
|
-
/**
|
|
48
|
-
* The topic the site is written under, which is what decides where it sits
|
|
49
|
-
* in the menu and in the footer.
|
|
50
|
-
*/
|
|
51
|
-
group: SiteGroupId;
|
|
52
51
|
/**
|
|
53
52
|
* The colour the name is written in — the first half, or the second when
|
|
54
53
|
* `name.ink` leaves the first in the family's ink.
|
|
@@ -63,6 +62,16 @@ export interface EcosystemSite {
|
|
|
63
62
|
/** The plate of the site's mark, and the colour one element of it carries. */
|
|
64
63
|
mark: SiteMarkColors;
|
|
65
64
|
}
|
|
65
|
+
/** One site of the family: its record, and the topic it is listed under. */
|
|
66
|
+
export interface EcosystemSite extends SiteRecord {
|
|
67
|
+
/** The identifier every component and helper names the site by. */
|
|
68
|
+
id: SiteId;
|
|
69
|
+
/**
|
|
70
|
+
* The topic the site is written under, which is what decides where it sits
|
|
71
|
+
* in the menu and in the footer.
|
|
72
|
+
*/
|
|
73
|
+
group: SiteGroupId;
|
|
74
|
+
}
|
|
66
75
|
/** The colours a site's mark is drawn in. */
|
|
67
76
|
export interface SiteMarkColors {
|
|
68
77
|
/** The rounded square the mark is drawn on. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/ecosystem/core/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,mCAAmC;AACnC,MAAM,MAAM,MAAM,GACd,OAAO,GACP,OAAO,GACP,KAAK,GACL,QAAQ,GACR,WAAW,GACX,UAAU,GACV,KAAK,GACL,QAAQ,GACR,QAAQ,GACR,WAAW,GACX,OAAO,GACP,KAAK,GACL,MAAM,GACN,QAAQ,GACR,KAAK,GACL,aAAa,GACb,aAAa,GACb,UAAU,GACV,IAAI,GACJ,gBAAgB,GAChB,UAAU,GACV,UAAU,GACV,QAAQ,CAAC;AAEb,+DAA+D;AAC/D,MAAM,WAAW,QAAQ;IACvB;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,uDAAuD;IACvD,GAAG,EAAE,MAAM,CAAC;IACZ;;;;OAIG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;IACd;;;;;OAKG;IACH,GAAG,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;CACtB;AAED
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/ecosystem/core/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,mCAAmC;AACnC,MAAM,MAAM,MAAM,GACd,OAAO,GACP,OAAO,GACP,KAAK,GACL,QAAQ,GACR,WAAW,GACX,UAAU,GACV,KAAK,GACL,QAAQ,GACR,QAAQ,GACR,WAAW,GACX,OAAO,GACP,KAAK,GACL,MAAM,GACN,QAAQ,GACR,KAAK,GACL,aAAa,GACb,aAAa,GACb,UAAU,GACV,IAAI,GACJ,gBAAgB,GAChB,UAAU,GACV,UAAU,GACV,QAAQ,CAAC;AAEb,+DAA+D;AAC/D,MAAM,WAAW,QAAQ;IACvB;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,uDAAuD;IACvD,GAAG,EAAE,MAAM,CAAC;IACZ;;;;OAIG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;IACd;;;;;OAKG;IACH,GAAG,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;CACtB;AAED;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB,2CAA2C;IAC3C,EAAE,EAAE,MAAM,CAAC;IACX,iEAAiE;IACjE,IAAI,EAAE,QAAQ,CAAC;IACf,yDAAyD;IACzD,IAAI,EAAE,MAAM,CAAC;IACb,4DAA4D;IAC5D,UAAU,EAAE,MAAM,CAAC;IACnB;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,sCAAsC;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB,8EAA8E;IAC9E,IAAI,EAAE,cAAc,CAAC;CACtB;AAED,4EAA4E;AAC5E,MAAM,WAAW,aAAc,SAAQ,UAAU;IAC/C,mEAAmE;IACnE,EAAE,EAAE,MAAM,CAAC;IACX;;;OAGG;IACH,KAAK,EAAE,WAAW,CAAC;CACpB;AAED,6CAA6C;AAC7C,MAAM,WAAW,cAAc;IAC7B,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
|
-
import type { SiteId } from '../core/sites.ts';
|
|
2
|
+
import type { SiteId, SiteRecord } from '../core/sites.ts';
|
|
3
3
|
/** What the site palette needs. */
|
|
4
4
|
export interface SiteThemeProps {
|
|
5
|
-
/**
|
|
6
|
-
|
|
5
|
+
/**
|
|
6
|
+
* The site whose palette the page takes, named. One of `site` and `siteId`
|
|
7
|
+
* is required.
|
|
8
|
+
* @default undefined
|
|
9
|
+
*/
|
|
10
|
+
siteId?: SiteId;
|
|
11
|
+
/**
|
|
12
|
+
* The same site, passed rather than named — for a site that is deliberately
|
|
13
|
+
* not one of `ECOSYSTEM_SITES`.
|
|
14
|
+
* @default undefined
|
|
15
|
+
*/
|
|
16
|
+
site?: SiteRecord;
|
|
7
17
|
}
|
|
8
18
|
/**
|
|
9
19
|
* The two colours a site owns, put on the page as custom properties.
|
|
@@ -14,6 +24,7 @@ export interface SiteThemeProps {
|
|
|
14
24
|
* in a component.
|
|
15
25
|
* @param props - The site whose palette is injected.
|
|
16
26
|
* @returns The rule, as a style element that applies wherever it is rendered.
|
|
27
|
+
* @throws {Error} When neither `site` nor `siteId` is given.
|
|
17
28
|
*/
|
|
18
29
|
export declare function SiteTheme(props: SiteThemeProps): ReactElement;
|
|
19
30
|
//# sourceMappingURL=SiteTheme.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SiteTheme.d.ts","sourceRoot":"","sources":["../../../src/ecosystem/ui/SiteTheme.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"SiteTheme.d.ts","sourceRoot":"","sources":["../../../src/ecosystem/ui/SiteTheme.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAG3D,mCAAmC;AACnC,MAAM,WAAW,cAAc;IAC7B;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,GAAG,YAAY,CAM7D"}
|
|
@@ -9,8 +9,13 @@ import { siteTokensCss } from "../core/tokens.js";
|
|
|
9
9
|
* in a component.
|
|
10
10
|
* @param props - The site whose palette is injected.
|
|
11
11
|
* @returns The rule, as a style element that applies wherever it is rendered.
|
|
12
|
+
* @throws {Error} When neither `site` nor `siteId` is given.
|
|
12
13
|
*/
|
|
13
14
|
export function SiteTheme(props) {
|
|
14
|
-
|
|
15
|
+
const site = props.site ?? props.siteId;
|
|
16
|
+
if (site === undefined) {
|
|
17
|
+
throw new Error('SiteTheme needs one of its `site` and `siteId` props');
|
|
18
|
+
}
|
|
19
|
+
return _jsx("style", { children: siteTokensCss(site) });
|
|
15
20
|
}
|
|
16
21
|
//# sourceMappingURL=SiteTheme.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SiteTheme.js","sourceRoot":"","sources":["../../../src/ecosystem/ui/SiteTheme.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"SiteTheme.js","sourceRoot":"","sources":["../../../src/ecosystem/ui/SiteTheme.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAkBlD;;;;;;;;;;GAUG;AACH,MAAM,UAAU,SAAS,CAAC,KAAqB;IAC7C,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,MAAM,CAAC;IACxC,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACvB,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAC;IAC1E,CAAC;IACD,OAAO,0BAAQ,aAAa,CAAC,IAAI,CAAC,GAAS,CAAC;AAC9C,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
|
-
import type {
|
|
2
|
+
import type { SiteId, SiteRecord } from '../core/sites.ts';
|
|
3
3
|
/** What a site's written name needs. */
|
|
4
4
|
export interface WordmarkProps {
|
|
5
5
|
/**
|
|
@@ -8,7 +8,7 @@ export interface WordmarkProps {
|
|
|
8
8
|
* required.
|
|
9
9
|
* @default undefined
|
|
10
10
|
*/
|
|
11
|
-
site?:
|
|
11
|
+
site?: SiteRecord;
|
|
12
12
|
/**
|
|
13
13
|
* The same site, named rather than passed, which is what a header knows.
|
|
14
14
|
* @default undefined
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Wordmark.d.ts","sourceRoot":"","sources":["../../../src/ecosystem/ui/Wordmark.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,OAAO,CAAC;AAKzD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"Wordmark.d.ts","sourceRoot":"","sources":["../../../src/ecosystem/ui/Wordmark.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,OAAO,CAAC;AAKzD,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE3D,wCAAwC;AACxC,MAAM,WAAW,aAAa;IAC5B;;;;;OAKG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,YAAY,CA4B3D"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ReactElement } from 'react';
|
|
2
|
-
import type {
|
|
1
|
+
import type { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import type { SiteId, SiteRecord } from '../core/sites.ts';
|
|
3
3
|
/** What a site's mark needs. */
|
|
4
4
|
export interface SiteMarkProps {
|
|
5
5
|
/**
|
|
@@ -7,13 +7,21 @@ export interface SiteMarkProps {
|
|
|
7
7
|
* and `siteId` is required.
|
|
8
8
|
* @default undefined
|
|
9
9
|
*/
|
|
10
|
-
site?:
|
|
10
|
+
site?: SiteRecord;
|
|
11
11
|
/**
|
|
12
12
|
* The same site, named rather than passed, for a header that knows only
|
|
13
13
|
* which site it is.
|
|
14
14
|
* @default undefined
|
|
15
15
|
*/
|
|
16
16
|
siteId?: SiteId;
|
|
17
|
+
/**
|
|
18
|
+
* What is drawn on the plate, in the same 32×32 box, given the colour its one
|
|
19
|
+
* answering element takes. It is how a site that is not one of the family,
|
|
20
|
+
* and so has no drawing in the shared set, still gets a mark of the family's
|
|
21
|
+
* shape.
|
|
22
|
+
* @default the family's drawing for that site
|
|
23
|
+
*/
|
|
24
|
+
glyph?: (accent: string) => ReactNode;
|
|
17
25
|
/**
|
|
18
26
|
* Edge of the square the mark is drawn in, in pixels.
|
|
19
27
|
* @default 28
|
|
@@ -44,7 +52,8 @@ export interface SiteMarkProps {
|
|
|
44
52
|
* The little logo of one site of the family.
|
|
45
53
|
* @param props - Which site, how big, and where its colours come from.
|
|
46
54
|
* @returns The mark, as an inline SVG.
|
|
47
|
-
* @throws {Error} When neither `site` nor `siteId` is given
|
|
55
|
+
* @throws {Error} When neither `site` nor `siteId` is given, or when the site
|
|
56
|
+
* is not one of the family and no `glyph` is.
|
|
48
57
|
*/
|
|
49
58
|
export declare function SiteMark(props: SiteMarkProps): ReactElement;
|
|
50
59
|
//# sourceMappingURL=marks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"marks.d.ts","sourceRoot":"","sources":["../../../src/ecosystem/ui/marks.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"marks.d.ts","sourceRoot":"","sources":["../../../src/ecosystem/ui/marks.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGpE,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAW3D,gCAAgC;AAChC,MAAM,WAAW,aAAa;IAC5B;;;;OAIG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,SAAS,CAAC;IACtC;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC9B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,YAAY,CAiD3D"}
|
|
@@ -11,18 +11,26 @@ const MARK_STYLE = { display: 'block', flex: 'none' };
|
|
|
11
11
|
* The little logo of one site of the family.
|
|
12
12
|
* @param props - Which site, how big, and where its colours come from.
|
|
13
13
|
* @returns The mark, as an inline SVG.
|
|
14
|
-
* @throws {Error} When neither `site` nor `siteId` is given
|
|
14
|
+
* @throws {Error} When neither `site` nor `siteId` is given, or when the site
|
|
15
|
+
* is not one of the family and no `glyph` is.
|
|
15
16
|
*/
|
|
16
17
|
export function SiteMark(props) {
|
|
17
|
-
const { className, site, siteId, size = 28, plate = true, colors = 'literal', } = props;
|
|
18
|
+
const { className, site, siteId, glyph, size = 28, plate = true, colors = 'literal', } = props;
|
|
18
19
|
const drawn = site ?? (siteId === undefined ? undefined : siteById(siteId));
|
|
19
20
|
if (drawn === undefined) {
|
|
20
21
|
throw new Error('SiteMark needs one of its `site` and `siteId` props');
|
|
21
22
|
}
|
|
23
|
+
const draw = glyph ?? familyGlyph(drawn.id);
|
|
24
|
+
if (draw === undefined) {
|
|
25
|
+
throw new Error(`SiteMark has no drawing for ${drawn.id}: pass its glyph`);
|
|
26
|
+
}
|
|
22
27
|
const usesTokens = colors === 'tokens';
|
|
23
28
|
const plateFill = usesTokens ? 'var(--brand)' : drawn.mark.plate;
|
|
24
29
|
const accent = usesTokens ? 'var(--brand-alt)' : drawn.mark.accent;
|
|
25
30
|
const edge = drawn.mark.edge;
|
|
26
|
-
return (_jsxs("svg", { className: className, style: MARK_STYLE, width: size, height: size, viewBox: "0 0 32 32", "aria-hidden": "true", focusable: "false", children: [plate ? (_jsx("rect", { x: edge ? 0.5 : 0, y: edge ? 0.5 : 0, width: edge ? 31 : 32, height: edge ? 31 : 32, rx: edge ? 6.5 : 7, fill: plateFill, stroke: edge })) : null,
|
|
31
|
+
return (_jsxs("svg", { className: className, style: MARK_STYLE, width: size, height: size, viewBox: "0 0 32 32", "aria-hidden": "true", focusable: "false", children: [plate ? (_jsx("rect", { x: edge ? 0.5 : 0, y: edge ? 0.5 : 0, width: edge ? 31 : 32, height: edge ? 31 : 32, rx: edge ? 6.5 : 7, fill: plateFill, stroke: edge })) : null, draw(accent)] }));
|
|
32
|
+
}
|
|
33
|
+
function familyGlyph(id) {
|
|
34
|
+
return Object.hasOwn(GLYPHS, id) ? GLYPHS[id] : undefined;
|
|
27
35
|
}
|
|
28
36
|
//# sourceMappingURL=marks.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"marks.js","sourceRoot":"","sources":["../../../src/ecosystem/ui/marks.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAG7C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAc,CAAC;AAEtC,0EAA0E;AAC1E,6EAA6E;AAC7E,4EAA4E;AAC5E,8EAA8E;AAC9E,8BAA8B;AAC9B,MAAM,UAAU,GAAkB,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAA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CAAC,kBAAkB,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC;IACnE,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;IAE7B,OAAO,CACL,eACE,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,UAAU,EACjB,KAAK,EAAE,IAAI,EACX,MAAM,EAAE,IAAI,EACZ,OAAO,EAAC,WAAW,iBACP,MAAM,EAClB,SAAS,EAAC,OAAO,aAEhB,KAAK,CAAC,CAAC,CAAC,CACP,eACE,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EACjB,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EACjB,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EACrB,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EACtB,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAClB,IAAI,EAAE,SAAS,EACf,MAAM,EAAE,IAAI,GACZ,CACH,CAAC,CAAC,CAAC,IAAI,EACP,IAAI,CAAC,MAAM,CAAC,IACT,CACP,CAAC;AACJ,CAAC;AAED,SAAS,WAAW,CAAC,EAAU;IAC7B,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,EAAY,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACtE,CAAC"}
|
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
* The page it is given is the template, which declares where its head goes and
|
|
12
12
|
* carries none of its own, so this only ever writes — see `./template.ts`.
|
|
13
13
|
*/
|
|
14
|
-
import type {
|
|
14
|
+
import type { SiteId, SiteRecord } from '../../ecosystem/core/sites.ts';
|
|
15
15
|
import type { DocumentMeta } from './documentMeta.ts';
|
|
16
16
|
import type { RouteMeta } from './routes.ts';
|
|
17
17
|
/** Which site is being served, and what it answers. */
|
|
18
18
|
export interface PageMetaOptions {
|
|
19
19
|
/** The site, named or passed. */
|
|
20
|
-
site:
|
|
20
|
+
site: SiteRecord | SiteId;
|
|
21
21
|
/** Every address it answers, each with its title and description. */
|
|
22
22
|
routes: readonly RouteMeta[];
|
|
23
23
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pageMeta.d.ts","sourceRoot":"","sources":["../../../src/seo/core/pageMeta.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"pageMeta.d.ts","sourceRoot":"","sources":["../../../src/seo/core/pageMeta.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAGxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAK7C,uDAAuD;AACvD,MAAM,WAAW,eAAe;IAC9B,iCAAiC;IACjC,IAAI,EAAE,UAAU,GAAG,MAAM,CAAC;IAC1B,qEAAqE;IACrE,MAAM,EAAE,SAAS,SAAS,EAAE,CAAC;IAC7B;;;OAGG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,GAAG,MAAM,CAE7E;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CAmB7D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,eAAe,GACvB,QAAQ,CAAC,YAAY,CAAC,CAQxB"}
|
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
* entry need. The mount is read back out of it here, so the addresses these
|
|
9
9
|
* files hand out start where the site actually answers.
|
|
10
10
|
*/
|
|
11
|
-
import type {
|
|
11
|
+
import type { SiteId, SiteRecord } from '../../ecosystem/core/sites.ts';
|
|
12
12
|
import type { RouteMeta } from './routes.ts';
|
|
13
13
|
/** What a crawler is told about the site as a whole. */
|
|
14
14
|
export interface SiteFilesOptions {
|
|
15
15
|
/** The site, named or passed. */
|
|
16
|
-
site:
|
|
16
|
+
site: SiteRecord | SiteId;
|
|
17
17
|
/** Every address it answers. */
|
|
18
18
|
routes: readonly RouteMeta[];
|
|
19
19
|
/**
|
|
@@ -41,7 +41,7 @@ export declare function sitemapXml(options: SiteFilesOptions): string;
|
|
|
41
41
|
* @param site - The site, named or passed.
|
|
42
42
|
* @returns Its record.
|
|
43
43
|
*/
|
|
44
|
-
export declare function resolveSite(site:
|
|
44
|
+
export declare function resolveSite(site: SiteRecord | SiteId): SiteRecord;
|
|
45
45
|
/**
|
|
46
46
|
* Where the site is served, as an absolute address without a trailing slash.
|
|
47
47
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"siteFiles.d.ts","sourceRoot":"","sources":["../../../src/seo/core/siteFiles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"siteFiles.d.ts","sourceRoot":"","sources":["../../../src/seo/core/siteFiles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAKxE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAO7C,wDAAwD;AACxD,MAAM,WAAW,gBAAgB;IAC/B,iC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AAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAC1D,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,QAAQ,CAAC,OAAyB;IAChD,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,WAAW,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC;IAC7E,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QACvD,MAAM,IAAI,KAAK,CACb,sEAAsE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAC/F,CAAC;IACJ,CAAC;IACD,OAAO,iBAAiB,CAAC,MAAM,CAAC,CAAC;AACnC,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,WAAW,CAAC,OAAyB;IACnD,OAAO,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;AACvC,CAAC"}
|
package/lib/seo/vite/ogCard.d.ts
CHANGED
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
* load: this module sits in the same entry point as the prerender plugin, which
|
|
10
10
|
* a site must be able to import with none of the optional peers installed.
|
|
11
11
|
*/
|
|
12
|
-
import type {
|
|
12
|
+
import type { ReactNode } from 'react';
|
|
13
|
+
import type { SiteId, SiteRecord } from '../../ecosystem/core/sites.ts';
|
|
13
14
|
/** The width every card is drawn at. */
|
|
14
15
|
export declare const OG_WIDTH = 1200;
|
|
15
16
|
/** The height every card is drawn at. */
|
|
@@ -17,12 +18,18 @@ export declare const OG_HEIGHT = 630;
|
|
|
17
18
|
/** What the card says, beyond the site's own name and mark. */
|
|
18
19
|
export interface OgCardOptions {
|
|
19
20
|
/** The site, named or passed. */
|
|
20
|
-
site:
|
|
21
|
+
site: SiteRecord | SiteId;
|
|
21
22
|
/**
|
|
22
23
|
* The sentence under the name.
|
|
23
24
|
* @default the site's tagline
|
|
24
25
|
*/
|
|
25
26
|
description?: string;
|
|
27
|
+
/**
|
|
28
|
+
* The drawing on the mark's plate, for a site the shared glyph set does not
|
|
29
|
+
* hold — see `SiteMark`.
|
|
30
|
+
* @default the family's drawing for that site
|
|
31
|
+
*/
|
|
32
|
+
glyph?: (accent: string) => ReactNode;
|
|
26
33
|
}
|
|
27
34
|
/**
|
|
28
35
|
* The card, as a standalone page.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ogCard.d.ts","sourceRoot":"","sources":["../../../src/seo/vite/ogCard.ts"],"names":[],"mappings":"AACA;;;;;;;;;;GAUG;
|
|
1
|
+
{"version":3,"file":"ogCard.d.ts","sourceRoot":"","sources":["../../../src/seo/vite/ogCard.ts"],"names":[],"mappings":"AACA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAKxE,wCAAwC;AACxC,eAAO,MAAM,QAAQ,OAAO,CAAC;AAE7B,yCAAyC;AACzC,eAAO,MAAM,SAAS,MAAM,CAAC;AAE7B,+DAA+D;AAC/D,MAAM,WAAW,aAAa;IAC5B,iCAAiC;IACjC,IAAI,EAAE,UAAU,GAAG,MAAM,CAAC;IAC1B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,SAAS,CAAC;CACvC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,UAAU,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,CA4DxE"}
|
package/lib/seo/vite/ogCard.js
CHANGED
|
@@ -40,7 +40,12 @@ export async function ogCardHtml(options) {
|
|
|
40
40
|
import('react-dom/server'),
|
|
41
41
|
import("../../ecosystem/ui/marks.js"),
|
|
42
42
|
]);
|
|
43
|
-
const mark = renderToStaticMarkup(createElement(SiteMark, {
|
|
43
|
+
const mark = renderToStaticMarkup(createElement(SiteMark, {
|
|
44
|
+
site,
|
|
45
|
+
glyph: options.glyph,
|
|
46
|
+
size: 132,
|
|
47
|
+
colors: 'literal',
|
|
48
|
+
}));
|
|
44
49
|
const dot = site.name.dot === true ? '<span class="dot">.</span>' : '';
|
|
45
50
|
return `<!doctype html>
|
|
46
51
|
<html lang="en">
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ogCard.js","sourceRoot":"","sources":["../../../src/seo/vite/ogCard.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F;;;;;;;;;;GAUG;
|
|
1
|
+
{"version":3,"file":"ogCard.js","sourceRoot":"","sources":["../../../src/seo/vite/ogCard.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F;;;;;;;;;;GAUG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,wCAAwC;AACxC,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,CAAC;AAE7B,yCAAyC;AACzC,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,CAAC;AAmB7B;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,OAAsB;IACrD,MAAM,IAAI,GAAG,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,MAAM,MAAM,GAAG,cAAc,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;IAC3D,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,IAAI,IAAI,CAAC,OAAO,CAAC;IACxD,MAAM,CAAC,EAAE,aAAa,EAAE,EAAE,EAAE,oBAAoB,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,GAC/D,MAAM,OAAO,CAAC,GAAG,CAAC;QAChB,MAAM,CAAC,OAAO,CAAC;QACf,MAAM,CAAC,kBAAkB,CAAC;QAC1B,MAAM,CAAC,6BAA8B,CAAC;KACvC,CAAC,CAAC;IACL,MAAM,IAAI,GAAG,oBAAoB,CAC/B,aAAa,CAAC,QAAQ,EAAE;QACtB,IAAI;QACJ,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,IAAI,EAAE,GAAG;QACT,MAAM,EAAE,SAAS;KAClB,CAAC,CACH,CAAC;IACF,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,4BAA4B,CAAC,CAAC,CAAC,EAAE,CAAC;IAEvE,OAAO;;;;;;;;iBAQQ,QAAQ;kBACP,SAAS;;;;sBAIL,mBAAmB,CAAC,WAAW,CAAC;iBACrC,mBAAmB,CAAC,QAAQ,CAAC;;;;;;uBAMvB,MAAM,CAAC,IAAI;sBACZ,MAAM,CAAC,GAAG;sBACV,MAAM,CAAC,GAAG;qCACK,mBAAmB,CAAC,cAAc,CAAC;;;;;sBAKlD,IAAI,CAAC,QAAQ;;;;;MAK7B,IAAI;6BACmB,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,GAAG,qBAAqB,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;;SAEzG,UAAU,CAAC,WAAW,CAAC;;;CAG/B,CAAC;AACF,CAAC"}
|
|
@@ -17,14 +17,14 @@
|
|
|
17
17
|
* a name it does not have.
|
|
18
18
|
*/
|
|
19
19
|
import type { Plugin } from 'vite';
|
|
20
|
-
import type {
|
|
20
|
+
import type { SiteId, SiteRecord } from '../../ecosystem/core/sites.ts';
|
|
21
21
|
import type { NoscriptText } from '../core/noscript.ts';
|
|
22
22
|
import type { RobotsDisallow } from '../core/robots.ts';
|
|
23
23
|
import type { RouteMeta } from '../core/routes.ts';
|
|
24
24
|
/** What the build needs to know to write the site's addresses. */
|
|
25
25
|
export interface PrerenderOptions {
|
|
26
26
|
/** The site, named or passed. */
|
|
27
|
-
site:
|
|
27
|
+
site: SiteRecord | SiteId;
|
|
28
28
|
/** Every address it answers, each with its title and description. */
|
|
29
29
|
routes: readonly RouteMeta[];
|
|
30
30
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prerender.d.ts","sourceRoot":"","sources":["../../../src/seo/vite/prerender.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAKH,OAAO,KAAK,EAAU,MAAM,EAAE,MAAM,MAAM,CAAC;AAE3C,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"prerender.d.ts","sourceRoot":"","sources":["../../../src/seo/vite/prerender.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAKH,OAAO,KAAK,EAAU,MAAM,EAAE,MAAM,MAAM,CAAC;AAE3C,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAExE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAMnD,kEAAkE;AAClE,MAAM,WAAW,gBAAgB;IAC/B,iCAAiC;IACjC,IAAI,EAAE,UAAU,GAAG,MAAM,CAAC;IAC1B,qEAAqE;IACrE,MAAM,EAAE,SAAS,SAAS,EAAE,CAAC;IAC7B;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,KAAK,GAAG,aAAa,CAAC,MAAM,GAAG,cAAc,CAAC,CAAC;IACxD;;;;OAIG;IACH,QAAQ,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAC1B;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,YAAY,CAAC;CACnC;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,gBAAgB,GAAG,MAAM,CA6EnE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-cheminfo",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.21.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "React components, hooks and framework-free helpers shared by the cheminfo sites: site chrome, citations, sharing, routing, pedagogy, charts, and the structure, orbital and 3D molecule viewers",
|
|
6
6
|
"author": "Luc Patiny",
|
package/src/about/core/about.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { CitedWork } from '../../citation/core/works.ts';
|
|
|
3
3
|
import type { CreditEntry, CreditId } from '../../credits/core/credits.ts';
|
|
4
4
|
import { credits } from '../../credits/core/credits.ts';
|
|
5
5
|
import { siteById } from '../../ecosystem/core/lookup.ts';
|
|
6
|
-
import type {
|
|
6
|
+
import type { SiteId, SiteRecord } from '../../ecosystem/core/sites.ts';
|
|
7
7
|
|
|
8
8
|
import type { ProviderEntry, ProviderId } from './providers.ts';
|
|
9
9
|
import { providers } from './providers.ts';
|
|
@@ -23,7 +23,7 @@ export interface AboutContent {
|
|
|
23
23
|
* is deliberately not listed in the family's Tools menu and therefore not in
|
|
24
24
|
* `ECOSYSTEM_SITES`.
|
|
25
25
|
*/
|
|
26
|
-
siteId: SiteId |
|
|
26
|
+
siteId: SiteId | SiteRecord;
|
|
27
27
|
/** One sentence: what this tool is. */
|
|
28
28
|
what: string;
|
|
29
29
|
/**
|
|
@@ -71,14 +71,15 @@ export interface AboutContent {
|
|
|
71
71
|
*/
|
|
72
72
|
publicRepository?: boolean;
|
|
73
73
|
/**
|
|
74
|
-
* Which build is running, from `
|
|
74
|
+
* Which build is running, from `react-cheminfo/build-info` — never written
|
|
75
75
|
* by hand, which is what keeps it true after the next release.
|
|
76
76
|
* @default undefined — the site's build does not publish one
|
|
77
77
|
*/
|
|
78
78
|
build?: BuildInfo;
|
|
79
79
|
/**
|
|
80
|
-
* Where a problem is reported
|
|
81
|
-
*
|
|
80
|
+
* Where a problem is reported: an address a visitor can actually open, so a
|
|
81
|
+
* site whose sources are private names one of its own or says nothing.
|
|
82
|
+
* @default the repository's /issues, and none at all when it is private
|
|
82
83
|
*/
|
|
83
84
|
issues?: string;
|
|
84
85
|
}
|
|
@@ -100,7 +101,7 @@ export interface AboutPerson {
|
|
|
100
101
|
*/
|
|
101
102
|
export interface ResolvedAbout {
|
|
102
103
|
/** The site's own record, which carries its name, tagline and colours. */
|
|
103
|
-
site:
|
|
104
|
+
site: SiteRecord;
|
|
104
105
|
what: string;
|
|
105
106
|
/** The context paragraphs, empty when the site writes none. */
|
|
106
107
|
paragraphs: readonly string[];
|
|
@@ -119,7 +120,8 @@ export interface ResolvedAbout {
|
|
|
119
120
|
publicRepository: boolean;
|
|
120
121
|
/** Which build is running, or `undefined` when the site does not say. */
|
|
121
122
|
build: BuildInfo | undefined;
|
|
122
|
-
|
|
123
|
+
/** Where a problem is reported, or `undefined` when there is nowhere open. */
|
|
124
|
+
issues: string | undefined;
|
|
123
125
|
}
|
|
124
126
|
|
|
125
127
|
/**
|
|
@@ -136,6 +138,8 @@ export function resolveAbout(content: AboutContent): ResolvedAbout {
|
|
|
136
138
|
? siteById(content.siteId)
|
|
137
139
|
: content.siteId;
|
|
138
140
|
const repository = content.repository ?? site.repository;
|
|
141
|
+
const publicRepository =
|
|
142
|
+
content.publicRepository ?? site.publicRepository ?? false;
|
|
139
143
|
|
|
140
144
|
return {
|
|
141
145
|
site,
|
|
@@ -148,10 +152,15 @@ export function resolveAbout(content: AboutContent): ResolvedAbout {
|
|
|
148
152
|
providedBy: providers(content.providedBy ?? []),
|
|
149
153
|
license: content.license ?? DEFAULT_LICENSE,
|
|
150
154
|
repository,
|
|
151
|
-
publicRepository
|
|
152
|
-
content.publicRepository ?? site.publicRepository ?? false,
|
|
155
|
+
publicRepository,
|
|
153
156
|
build: content.build,
|
|
154
|
-
|
|
157
|
+
// A tracker behind a private repository answers 404 to every visitor, so
|
|
158
|
+
// a site that names none of its own asks for a report nowhere.
|
|
159
|
+
issues:
|
|
160
|
+
content.issues ??
|
|
161
|
+
(publicRepository
|
|
162
|
+
? `${withoutTrailingSlash(repository)}/issues`
|
|
163
|
+
: undefined),
|
|
155
164
|
};
|
|
156
165
|
}
|
|
157
166
|
|
|
@@ -143,12 +143,18 @@ export function AboutPage(props: AboutPageProps): ReactElement {
|
|
|
143
143
|
</AboutSection>
|
|
144
144
|
)}
|
|
145
145
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
146
|
+
{/*
|
|
147
|
+
Asking for a report is worth nothing without somewhere to send it, and
|
|
148
|
+
the tracker of a private repository answers 404 to every visitor.
|
|
149
|
+
*/}
|
|
150
|
+
{about.issues === undefined ? null : (
|
|
151
|
+
<AboutSection title="Found a problem?" className="about-issues">
|
|
152
|
+
<p style={FIRST_PARAGRAPH_STYLE}>
|
|
153
|
+
Tell us: a report naming what you typed and what came back is the
|
|
154
|
+
fastest fix there is. <ExternalLink href={about.issues} />.
|
|
155
|
+
</p>
|
|
156
|
+
</AboutSection>
|
|
157
|
+
)}
|
|
152
158
|
</div>
|
|
153
159
|
);
|
|
154
160
|
}
|