react-cheminfo 0.18.0 → 0.20.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.
Files changed (108) hide show
  1. package/lib/about/core/about.d.ts +15 -4
  2. package/lib/about/core/about.d.ts.map +1 -1
  3. package/lib/about/core/about.js +8 -1
  4. package/lib/about/core/about.js.map +1 -1
  5. package/lib/about/core/index.d.ts +1 -0
  6. package/lib/about/core/index.d.ts.map +1 -1
  7. package/lib/about/core/index.js +1 -0
  8. package/lib/about/core/index.js.map +1 -1
  9. package/lib/about/core/repository.d.ts +14 -0
  10. package/lib/about/core/repository.d.ts.map +1 -0
  11. package/lib/about/core/repository.js +21 -0
  12. package/lib/about/core/repository.js.map +1 -0
  13. package/lib/about/ui/AboutBuild.d.ts +5 -4
  14. package/lib/about/ui/AboutBuild.d.ts.map +1 -1
  15. package/lib/about/ui/AboutBuild.js +10 -10
  16. package/lib/about/ui/AboutBuild.js.map +1 -1
  17. package/lib/about/ui/AboutPage.d.ts.map +1 -1
  18. package/lib/about/ui/AboutPage.js +7 -8
  19. package/lib/about/ui/AboutPage.js.map +1 -1
  20. package/lib/about/ui/AboutVersion.d.ts +26 -0
  21. package/lib/about/ui/AboutVersion.d.ts.map +1 -0
  22. package/lib/about/ui/AboutVersion.js +54 -0
  23. package/lib/about/ui/AboutVersion.js.map +1 -0
  24. package/lib/about/ui/index.d.ts +2 -0
  25. package/lib/about/ui/index.d.ts.map +1 -1
  26. package/lib/about/ui/index.js +1 -0
  27. package/lib/about/ui/index.js.map +1 -1
  28. package/lib/build/core/buildInfo.d.ts +44 -0
  29. package/lib/build/core/buildInfo.d.ts.map +1 -1
  30. package/lib/build/core/buildInfo.js +63 -0
  31. package/lib/build/core/buildInfo.js.map +1 -1
  32. package/lib/build/core/index.d.ts +1 -1
  33. package/lib/build/core/index.d.ts.map +1 -1
  34. package/lib/build/core/index.js +1 -1
  35. package/lib/build/core/index.js.map +1 -1
  36. package/lib/build/vite/buildInfo.d.ts.map +1 -1
  37. package/lib/build/vite/buildInfo.js +2 -2
  38. package/lib/build/vite/buildInfo.js.map +1 -1
  39. package/lib/ecosystem/core/sites.d.ts.map +1 -1
  40. package/lib/ecosystem/core/sites.js +12 -0
  41. package/lib/ecosystem/core/sites.js.map +1 -1
  42. package/lib/ecosystem/core/types.d.ts +8 -0
  43. package/lib/ecosystem/core/types.d.ts.map +1 -1
  44. package/lib/molecule3d/core/camera.d.ts +89 -0
  45. package/lib/molecule3d/core/camera.d.ts.map +1 -0
  46. package/lib/molecule3d/core/camera.js +172 -0
  47. package/lib/molecule3d/core/camera.js.map +1 -0
  48. package/lib/molecule3d/core/index.d.ts +2 -0
  49. package/lib/molecule3d/core/index.d.ts.map +1 -1
  50. package/lib/molecule3d/core/index.js +1 -0
  51. package/lib/molecule3d/core/index.js.map +1 -1
  52. package/lib/molecule3d/ui/MoleculeCanvas3D.d.ts.map +1 -1
  53. package/lib/molecule3d/ui/MoleculeCanvas3D.js +14 -37
  54. package/lib/molecule3d/ui/MoleculeCanvas3D.js.map +1 -1
  55. package/lib/molecule3d/ui/camera.d.ts +35 -2
  56. package/lib/molecule3d/ui/camera.d.ts.map +1 -1
  57. package/lib/molecule3d/ui/camera.js +113 -4
  58. package/lib/molecule3d/ui/camera.js.map +1 -1
  59. package/lib/molecule3d/ui/captureScene.d.ts +14 -0
  60. package/lib/molecule3d/ui/captureScene.d.ts.map +1 -0
  61. package/lib/molecule3d/ui/captureScene.js +24 -0
  62. package/lib/molecule3d/ui/captureScene.js.map +1 -0
  63. package/lib/molecule3d/ui/createViewer.d.ts +18 -0
  64. package/lib/molecule3d/ui/createViewer.d.ts.map +1 -0
  65. package/lib/molecule3d/ui/createViewer.js +19 -0
  66. package/lib/molecule3d/ui/createViewer.js.map +1 -0
  67. package/lib/molecule3d/ui/moleculeViewer3DProps.d.ts +21 -0
  68. package/lib/molecule3d/ui/moleculeViewer3DProps.d.ts.map +1 -1
  69. package/lib/molecule3d/ui/useMoleculeScene.d.ts +47 -0
  70. package/lib/molecule3d/ui/useMoleculeScene.d.ts.map +1 -0
  71. package/lib/molecule3d/ui/useMoleculeScene.js +82 -0
  72. package/lib/molecule3d/ui/useMoleculeScene.js.map +1 -0
  73. package/lib/molecule3d/ui/useSharedCamera.d.ts +52 -0
  74. package/lib/molecule3d/ui/useSharedCamera.d.ts.map +1 -0
  75. package/lib/molecule3d/ui/useSharedCamera.js +82 -0
  76. package/lib/molecule3d/ui/useSharedCamera.js.map +1 -0
  77. package/lib/molecule3d/ui/viewer.d.ts +21 -15
  78. package/lib/molecule3d/ui/viewer.d.ts.map +1 -1
  79. package/lib/molecule3d/ui/viewer.js +41 -47
  80. package/lib/molecule3d/ui/viewer.js.map +1 -1
  81. package/lib/molecule3d/ui/viewerSpec.d.ts +17 -0
  82. package/lib/molecule3d/ui/viewerSpec.d.ts.map +1 -0
  83. package/lib/molecule3d/ui/viewerSpec.js +34 -0
  84. package/lib/molecule3d/ui/viewerSpec.js.map +1 -0
  85. package/package.json +1 -1
  86. package/src/about/core/about.ts +25 -5
  87. package/src/about/core/index.ts +1 -0
  88. package/src/about/core/repository.ts +22 -0
  89. package/src/about/ui/AboutBuild.tsx +13 -20
  90. package/src/about/ui/AboutPage.tsx +42 -28
  91. package/src/about/ui/AboutVersion.tsx +95 -0
  92. package/src/about/ui/index.ts +2 -0
  93. package/src/build/core/buildInfo.ts +67 -0
  94. package/src/build/core/index.ts +9 -1
  95. package/src/build/vite/buildInfo.ts +2 -2
  96. package/src/ecosystem/core/sites.ts +12 -0
  97. package/src/ecosystem/core/types.ts +8 -0
  98. package/src/molecule3d/core/camera.ts +212 -0
  99. package/src/molecule3d/core/index.ts +14 -0
  100. package/src/molecule3d/ui/MoleculeCanvas3D.tsx +14 -43
  101. package/src/molecule3d/ui/camera.ts +128 -7
  102. package/src/molecule3d/ui/captureScene.ts +31 -0
  103. package/src/molecule3d/ui/createViewer.ts +24 -0
  104. package/src/molecule3d/ui/moleculeViewer3DProps.ts +21 -0
  105. package/src/molecule3d/ui/useMoleculeScene.ts +141 -0
  106. package/src/molecule3d/ui/useSharedCamera.ts +121 -0
  107. package/src/molecule3d/ui/viewer.ts +45 -50
  108. package/src/molecule3d/ui/viewerSpec.ts +38 -0
@@ -59,14 +59,22 @@ export interface AboutContent {
59
59
  */
60
60
  repository?: string;
61
61
  /**
62
- * Which build is running, from `virtual:cheminfo-build-info` — never written
62
+ * Whether a visitor can open that repository. A site naming a repository of
63
+ * its own says so here too, since the family's record then describes another
64
+ * one.
65
+ * @default the `publicRepository` of the ECOSYSTEM_SITES record
66
+ */
67
+ publicRepository?: boolean;
68
+ /**
69
+ * Which build is running, from `react-cheminfo/build-info` — never written
63
70
  * by hand, which is what keeps it true after the next release.
64
71
  * @default undefined — the site's build does not publish one
65
72
  */
66
73
  build?: BuildInfo;
67
74
  /**
68
- * Where a problem is reported.
69
- * @default the repository's /issues
75
+ * Where a problem is reported: an address a visitor can actually open, so a
76
+ * site whose sources are private names one of its own or says nothing.
77
+ * @default the repository's /issues, and none at all when it is private
70
78
  */
71
79
  issues?: string;
72
80
  }
@@ -101,9 +109,12 @@ export interface ResolvedAbout {
101
109
  providedBy: ProviderEntry[];
102
110
  license: string;
103
111
  repository: string;
112
+ /** Whether a visitor can open the repository, and so whether it is named. */
113
+ publicRepository: boolean;
104
114
  /** Which build is running, or `undefined` when the site does not say. */
105
115
  build: BuildInfo | undefined;
106
- issues: string;
116
+ /** Where a problem is reported, or `undefined` when there is nowhere open. */
117
+ issues: string | undefined;
107
118
  }
108
119
  /**
109
120
  * Fill in what a site left to the family, and resolve what it named.
@@ -1 +1 @@
1
- {"version":3,"file":"about.d.ts","sourceRoot":"","sources":["../../../src/about/core/about.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,Q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C;IAC7B,8EAA8E;IAC9E,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,YAAY,GAAG,aAAa,CA8BjE;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,YAAY,GAAG,MAAM,EAAE,CA8C7D"}
@@ -14,6 +14,7 @@ export function resolveAbout(content) {
14
14
  ? siteById(content.siteId)
15
15
  : content.siteId;
16
16
  const repository = content.repository ?? site.repository;
17
+ const publicRepository = content.publicRepository ?? site.publicRepository ?? false;
17
18
  return {
18
19
  site,
19
20
  what: content.what,
@@ -25,8 +26,14 @@ export function resolveAbout(content) {
25
26
  providedBy: providers(content.providedBy ?? []),
26
27
  license: content.license ?? DEFAULT_LICENSE,
27
28
  repository,
29
+ publicRepository,
28
30
  build: content.build,
29
- issues: content.issues ?? `${withoutTrailingSlash(repository)}/issues`,
31
+ // A tracker behind a private repository answers 404 to every visitor, so
32
+ // a site that names none of its own asks for a report nowhere.
33
+ issues: content.issues ??
34
+ (publicRepository
35
+ ? `${withoutTrailingSlash(repository)}/issues`
36
+ : undefined),
30
37
  };
31
38
  }
32
39
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"about.js","sourceRoot":"","sources":["../../../src/about/core/about.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAI1D,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AA2G3C;;;;;;;GAOG;AACH,MAAM,UAAU,YAAY,CAAC,OAAqB;IAChD,MAAM,IAAI,GACR,OAAO,OAAO,CAAC,MAAM,KAAK,QAAQ;QAChC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC;QAC1B,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;IACrB,MAAM,UAAU,GA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ResolvedAbout } from './about.ts';
2
3
  export { aboutProblems, resolveAbout } from './about.ts';
3
4
  export type { ProviderEntry, ProviderId } from './providers.ts';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/about/core/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACzD,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/about/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACzD,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC"}
@@ -1,3 +1,4 @@
1
+ export { githubSources } from "./repository.js";
1
2
  export { aboutProblems, resolveAbout } from "./about.js";
2
3
  export { PROVIDERS, providers } from "./providers.js";
3
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/about/core/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAEzD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/about/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAEzD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * What can be linked to inside a repository, and when.
3
+ *
4
+ * Only GitHub has the addresses the About page builds — a release tag, a
5
+ * commit — and only a repository a visitor can open is worth pointing them at.
6
+ */
7
+ /**
8
+ * The sources as a base a release or a commit can be appended to.
9
+ * @param repository - Where the sources live.
10
+ * @returns The address without its trailing slash, or `undefined` when it is
11
+ * not a GitHub repository and nothing inside it can be addressed.
12
+ */
13
+ export declare function githubSources(repository: string): string | undefined;
14
+ //# sourceMappingURL=repository.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repository.d.ts","sourceRoot":"","sources":["../../../src/about/core/repository.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAKpE"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * What can be linked to inside a repository, and when.
3
+ *
4
+ * Only GitHub has the addresses the About page builds — a release tag, a
5
+ * commit — and only a repository a visitor can open is worth pointing them at.
6
+ */
7
+ /** Where our repositories live, and the only host whose paths we know. */
8
+ const GITHUB = 'https://github.com/';
9
+ /**
10
+ * The sources as a base a release or a commit can be appended to.
11
+ * @param repository - Where the sources live.
12
+ * @returns The address without its trailing slash, or `undefined` when it is
13
+ * not a GitHub repository and nothing inside it can be addressed.
14
+ */
15
+ export function githubSources(repository) {
16
+ const sources = repository.endsWith('/')
17
+ ? repository.slice(0, -1)
18
+ : repository;
19
+ return sources.startsWith(GITHUB) ? sources : undefined;
20
+ }
21
+ //# sourceMappingURL=repository.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repository.js","sourceRoot":"","sources":["../../../src/about/core/repository.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,0EAA0E;AAC1E,MAAM,MAAM,GAAG,qBAAqB,CAAC;AAErC;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAAC,UAAkB;IAC9C,MAAM,OAAO,GAAG,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC;QACtC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACzB,CAAC,CAAC,UAAU,CAAC;IACf,OAAO,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;AAC1D,CAAC"}
@@ -7,12 +7,13 @@ export interface AboutBuildProps {
7
7
  repository: string;
8
8
  }
9
9
  /**
10
- * The one line that says which build of the site a visitor has open.
10
+ * The one line that says when the build a visitor has open was made.
11
11
  *
12
12
  * A report of something going wrong is worth answering only when we know what
13
- * was running, and a visitor cannot read that off the page otherwise. The
14
- * version and the commit link into the repository, so the change that caused a
15
- * problem is one click from the page that shows it.
13
+ * was running. The version itself is in the hero, where a reader is asked to
14
+ * quote it from; this line carries the rest, and the commit links into the
15
+ * repository, so the change that caused a problem is one click from the page
16
+ * that shows it.
16
17
  * @param props - See {@link AboutBuildProps}.
17
18
  * @returns The line.
18
19
  */
@@ -1 +1 @@
1
- {"version":3,"file":"AboutBuild.d.ts","sourceRoot":"","sources":["../../../src/about/ui/AboutBuild.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,YAAY,EAAa,MAAM,OAAO,CAAC;AAEpE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAG/D,MAAM,WAAW,eAAe;IAC9B,6CAA6C;IAC7C,KAAK,EAAE,SAAS,CAAC;IACjB,8EAA8E;IAC9E,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,YAAY,CA+B/D"}
1
+ {"version":3,"file":"AboutBuild.d.ts","sourceRoot":"","sources":["../../../src/about/ui/AboutBuild.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,YAAY,EAAa,MAAM,OAAO,CAAC;AAEpE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAI/D,MAAM,WAAW,eAAe;IAC9B,6CAA6C;IAC7C,KAAK,EAAE,SAAS,CAAC;IACjB,8EAA8E;IAC9E,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,YAAY,CAwB/D"}
@@ -1,22 +1,23 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { formatBuiltAt, shortCommit } from "../../build/core/buildInfo.js";
3
+ import { githubSources } from "../core/repository.js";
3
4
  /**
4
- * The one line that says which build of the site a visitor has open.
5
+ * The one line that says when the build a visitor has open was made.
5
6
  *
6
7
  * A report of something going wrong is worth answering only when we know what
7
- * was running, and a visitor cannot read that off the page otherwise. The
8
- * version and the commit link into the repository, so the change that caused a
9
- * problem is one click from the page that shows it.
8
+ * was running. The version itself is in the hero, where a reader is asked to
9
+ * quote it from; this line carries the rest, and the commit links into the
10
+ * repository, so the change that caused a problem is one click from the page
11
+ * that shows it.
10
12
  * @param props - See {@link AboutBuildProps}.
11
13
  * @returns The line.
12
14
  */
13
15
  export function AboutBuild(props) {
14
16
  const { build, repository } = props;
15
- const sources = repository.endsWith('/')
16
- ? repository.slice(0, -1)
17
- : repository;
18
- const onGitHub = sources.startsWith(GITHUB);
19
- return (_jsxs("p", { style: PARAGRAPH_STYLE, children: ["Running version", ' ', _jsx(Reference, { href: onGitHub ? `${sources}/releases/tag/v${build.version}` : undefined, children: build.version }), ", built ", formatBuiltAt(build.builtAt), build.commit === undefined ? null : (_jsxs(_Fragment, { children: [' from commit ', _jsx(Reference, { href: onGitHub ? `${sources}/commit/${build.commit}` : undefined, children: shortCommit(build.commit) })] })), "."] }));
17
+ const sources = githubSources(repository);
18
+ return (_jsxs("p", { style: PARAGRAPH_STYLE, children: ["Built ", formatBuiltAt(build.builtAt), build.commit === undefined ? null : (_jsxs(_Fragment, { children: [' from commit ', _jsx(Reference, { href: sources === undefined
19
+ ? undefined
20
+ : `${sources}/commit/${build.commit}`, children: shortCommit(build.commit) })] })), "."] }));
20
21
  }
21
22
  function Reference(props) {
22
23
  const { href, children } = props;
@@ -24,7 +25,6 @@ function Reference(props) {
24
25
  return _jsx("code", { style: CODE_STYLE, children: children });
25
26
  return (_jsx("a", { href: href, target: "_blank", rel: "noopener noreferrer", style: LINK_STYLE, children: _jsx("code", { style: CODE_STYLE, children: children }) }));
26
27
  }
27
- const GITHUB = 'https://github.com/';
28
28
  const PARAGRAPH_STYLE = {
29
29
  margin: '8px 0 0',
30
30
  color: 'var(--text-muted)',
@@ -1 +1 @@
1
- {"version":3,"file":"AboutBuild.js","sourceRoot":"","sources":["../../../src/about/ui/AboutBuild.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAS3E;;;;;;;;;GASG;AACH,MAAM,UAAU,UAAU,CAAC,KAAsB;IAC/C,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC;IACpC,MAAM,OAAO,GAAG,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC;QACtC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACzB,CAAC,CAAC,UAAU,CAAC;IACf,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;IAE5C,OAAO,CACL,aAAG,KAAK,EAAE,eAAe,gCACP,GAAG,EACnB,KAAC,SAAS,IACR,IAAI,EACF,QAAQ,CAAC,CAAC,CAA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ACvD,QAAQ,EAAE,EAAE;CACoB,CAAC;AAEnC,MAAM,UAAU,GAAG,EAAE,KAAK,EAAE,eAAe,EAAmC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"AboutPage.d.ts","sourceRoot":"","sources":["../../../src/about/ui/AboutPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAQrD,MAAM,WAAW,cAAc;IAC7B,uCAAuC;IACvC,OAAO,EAAE,YAAY,CAAC;IACtB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,GAAG,YAAY,CAsF7D"}
1
+ {"version":3,"file":"AboutPage.d.ts","sourceRoot":"","sources":["../../../src/about/ui/AboutPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AASrD,MAAM,WAAW,cAAc;IAC7B,uCAAuC;IACvC,OAAO,EAAE,YAAY,CAAC;IACtB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,GAAG,YAAY,CAqG7D"}
@@ -7,6 +7,7 @@ import { AboutBuild } from "./AboutBuild.js";
7
7
  import { AboutCitations } from "./AboutCitations.js";
8
8
  import { AboutProvidedBy } from "./AboutProvidedBy.js";
9
9
  import { AboutSection } from "./AboutSection.js";
10
+ import { AboutVersion } from "./AboutVersion.js";
10
11
  /**
11
12
  * The About page of a site of the family: what the tool is, who provides it,
12
13
  * what a visitor can do with it, what it is built on, how to cite it, and where
@@ -23,9 +24,9 @@ export function AboutPage(props) {
23
24
  const { content, className, children, logo, mark } = props;
24
25
  const about = resolveAbout(content);
25
26
  const site = about.site;
26
- return (_jsxs("div", { className: className === undefined ? 'about-page' : `about-page ${className}`, style: PAGE_STYLE, children: [_jsxs("header", { className: "about-hero", style: logo === undefined ? HERO_STYLE : LOGO_HERO_STYLE, children: [logo === undefined
27
+ return (_jsxs("div", { className: className === undefined ? 'about-page' : `about-page ${className}`, style: PAGE_STYLE, children: [_jsxs("header", { className: "about-hero", style: HERO_STYLE, children: [logo === undefined
27
28
  ? (mark ?? _jsx(SiteMark, { site: site, size: 56 }))
28
- : null, _jsxs("div", { children: [_jsx("h1", { style: logo === undefined ? NAME_STYLE : LOGO_NAME_STYLE, children: logo ?? _jsx(Wordmark, { site: site, size: 26 }) }), _jsx("p", { style: TAGLINE_STYLE, children: site.tagline }), _jsx("p", { style: WHAT_STYLE, children: about.what })] })] }), about.people.length === 0 && about.providedBy.length === 0 ? null : (_jsx(AboutSection, { title: "Provided by", className: "about-provided-by", children: _jsx(AboutProvidedBy, { people: about.people, providers: about.providedBy }) })), _jsx(AboutSection, { title: "What you can do here", className: "about-can", children: _jsx("ul", { style: CAN_LIST_STYLE, children: about.can.map((line) => (_jsx("li", { children: line }, line))) }) }), about.paragraphs.length === 0 ? null : (_jsx(AboutSection, { className: "about-context", children: about.paragraphs.map((paragraph, index) => (_jsx("p", { style: index === 0 ? FIRST_PARAGRAPH_STYLE : PARAGRAPH_STYLE, children: paragraph }, paragraph))) })), children, _jsx(AboutSection, { title: "Built on", className: "about-credits", children: _jsx(CreditsList, { entries: about.credits }) }), about.cite.length === 0 ? null : (_jsx(AboutSection, { title: "How to cite", className: "about-cite", children: _jsx(AboutCitations, { works: about.cite }) })), _jsxs(AboutSection, { title: "Licence and source", className: "about-licence", children: [_jsxs("p", { style: FIRST_PARAGRAPH_STYLE, children: [about.license, ", \u00A9 cheminfo. Use it in a course, fork it, or lift a piece of it into something else. The sources are at", ' ', _jsx(ExternalLink, { href: about.repository }), "."] }), about.build === undefined ? null : (_jsx(AboutBuild, { build: about.build, repository: about.repository }))] }), _jsx(AboutSection, { title: "Found a problem?", className: "about-issues", children: _jsxs("p", { style: FIRST_PARAGRAPH_STYLE, children: ["Tell us: a report naming what you typed and what came back is the fastest fix there is. ", _jsx(ExternalLink, { href: about.issues }), "."] }) })] }));
29
+ : null, _jsxs("div", { style: HERO_BODY_STYLE, children: [_jsx("h1", { style: logo === undefined ? NAME_STYLE : LOGO_NAME_STYLE, children: logo ?? _jsx(Wordmark, { site: site, size: 26 }) }), _jsx("p", { style: TAGLINE_STYLE, children: site.tagline }), _jsx("p", { style: WHAT_STYLE, children: about.what })] }), _jsx(AboutVersion, { build: about.build, repository: about.repository, publicRepository: about.publicRepository })] }), about.people.length === 0 && about.providedBy.length === 0 ? null : (_jsx(AboutSection, { title: "Provided by", className: "about-provided-by", children: _jsx(AboutProvidedBy, { people: about.people, providers: about.providedBy }) })), _jsx(AboutSection, { title: "What you can do here", className: "about-can", children: _jsx("ul", { style: CAN_LIST_STYLE, children: about.can.map((line) => (_jsx("li", { children: line }, line))) }) }), about.paragraphs.length === 0 ? null : (_jsx(AboutSection, { className: "about-context", children: about.paragraphs.map((paragraph, index) => (_jsx("p", { style: index === 0 ? FIRST_PARAGRAPH_STYLE : PARAGRAPH_STYLE, children: paragraph }, paragraph))) })), children, _jsx(AboutSection, { title: "Built on", className: "about-credits", children: _jsx(CreditsList, { entries: about.credits }) }), about.cite.length === 0 ? null : (_jsx(AboutSection, { title: "How to cite", className: "about-cite", children: _jsx(AboutCitations, { works: about.cite }) })), !about.publicRepository ? null : (_jsxs(AboutSection, { title: "Licence and source", className: "about-licence", children: [_jsxs("p", { style: FIRST_PARAGRAPH_STYLE, children: [about.license, ", \u00A9 cheminfo. Use it in a course, fork it, or lift a piece of it into something else. The sources are at", ' ', _jsx(ExternalLink, { href: about.repository }), "."] }), about.build === undefined ? null : (_jsx(AboutBuild, { build: about.build, repository: about.repository }))] })), about.issues === undefined ? null : (_jsx(AboutSection, { title: "Found a problem?", className: "about-issues", children: _jsxs("p", { style: FIRST_PARAGRAPH_STYLE, children: ["Tell us: a report naming what you typed and what came back is the fastest fix there is. ", _jsx(ExternalLink, { href: about.issues }), "."] }) }))] }));
29
30
  }
30
31
  function ExternalLink(props) {
31
32
  const { href } = props;
@@ -39,6 +40,10 @@ const PAGE_STYLE = {
39
40
  marginInline: 'auto',
40
41
  gap: 10,
41
42
  };
43
+ const HERO_BODY_STYLE = {
44
+ flex: '1 1 auto',
45
+ minWidth: 0,
46
+ };
42
47
  const HERO_STYLE = {
43
48
  display: 'flex',
44
49
  alignItems: 'flex-start',
@@ -54,12 +59,6 @@ const NAME_STYLE = {
54
59
  fontSize: 26,
55
60
  fontWeight: 700,
56
61
  };
57
- // A drawn lockup already carries the mark and the name at its own proportions,
58
- // so the hero gives it the full width rather than a column beside a mark.
59
- const LOGO_HERO_STYLE = {
60
- ...HERO_STYLE,
61
- display: 'block',
62
- };
63
62
  const LOGO_NAME_STYLE = {
64
63
  margin: '0 0 4px',
65
64
  };
@@ -1 +1 @@
1
- {"version":3,"file":"AboutPage.js","sourceRoot":"","sources":["../../../src/about/ui/AboutPage.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAkC,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAiC,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA8B,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IAC3E,YAAY,EAAE,MAAM;IACpB,GAAG,EAAE,EAAE;CACyB,CAAC;AAEnC,MAAM,eAAe,GAAG;IACtB,IAAI,EAAE,UAAU;IAChB,QAAQ,EAAE,CAAC;CACqB,CAAC;AAEnC,MAAM,UAAU,GAAG;IACjB,OAAO,EAAE,MAAM;IACf,UAAU,EAAE,YAAY;IACxB,OAAO,EAAE,EAAE;IACX,MAAM,EAAE,yBAAyB;IACjC,YAAY,EAAE,eAAe;IAC7B,UAAU,EAAE,gBAAgB;IAC5B,GAAG,EAAE,EAAE;IACP,UAAU,EAAE,IAAI;CACgB,CAAC;AAEnC,MAAM,UAAU,GAAG;IACjB,MAAM,EAAE,CAAC;IACT,QAAQ,EAAE,EAAE;IACZ,UAAU,EAAE,GAAG;CACiB,CAAC;AAEnC,MAAM,eAAe,GAAG;IACtB,MAAM,EAAE,SAAS;CACe,CAAC;AAEnC,MAAM,aAAa,GAAG;IACpB,MAAM,EAAE,WAAW;IACnB,KAAK,EAAE,mBAAmB;IAC1B,QAAQ,EAAE,EAAE;CACoB,CAAC;AAEnC,MAAM,UAAU,GAAG,EAAE,MAAM,EAAE,CAAC,EAAmC,CAAC;AAElE,MAAM,cAAc,GAAG;IACrB,MAAM,EAAE,CAAC;IACT,WAAW,EAAE,EAAE;CACiB,CAAC;AAEnC,MAAM,qBAAqB,GAAG;IAC5B,MAAM,EAAE,CAAC;CACuB,CAAC;AAEnC,MAAM,eAAe,GAAG;IACtB,MAAM,EAAE,SAAS;CACe,CAAC;AAEnC,MAAM,UAAU,GAAG,EAAE,KAAK,EAAE,eAAe,EAAmC,CAAC"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Which build of a site a visitor has open, in the corner of its hero.
3
+ *
4
+ * A report of something going wrong is worth answering only when we know what
5
+ * was running, and that is the one thing an About page cannot say from a
6
+ * hand-written record. It sits at the top of the page rather than at the
7
+ * bottom because it is the one line a reader is asked to quote back.
8
+ */
9
+ import type { ReactElement } from 'react';
10
+ import type { BuildInfo } from '../../build/core/buildInfo.ts';
11
+ export interface AboutVersionProps {
12
+ /** What the build published about itself, or `undefined` when it published none. */
13
+ build: BuildInfo | undefined;
14
+ /** Where the sources live, which is what the badge links into. */
15
+ repository: string;
16
+ /** Whether a visitor can open that repository, and so whether it is linked. */
17
+ publicRepository: boolean;
18
+ }
19
+ /**
20
+ * The build badge: the release a site is serving, or the commit it was built
21
+ * from while it has no release yet, and when it was made.
22
+ * @param props - See {@link AboutVersionProps}.
23
+ * @returns The badge, or `null` when the build says nothing worth showing.
24
+ */
25
+ export declare function AboutVersion(props: AboutVersionProps): ReactElement | null;
26
+ //# sourceMappingURL=AboutVersion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AboutVersion.d.ts","sourceRoot":"","sources":["../../../src/about/ui/AboutVersion.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,OAAO,CAAC;AAEzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAS/D,MAAM,WAAW,iBAAiB;IAChC,oFAAoF;IACpF,KAAK,EAAE,SAAS,GAAG,SAAS,CAAC;IAC7B,kEAAkE;IAClE,UAAU,EAAE,MAAM,CAAC;IACnB,+EAA+E;IAC/E,gBAAgB,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,YAAY,GAAG,IAAI,CA6B1E"}
@@ -0,0 +1,54 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { buildLabel, buildStamp, buildSummary, releasedVersion, } from "../../build/core/buildInfo.js";
3
+ import { githubSources } from "../core/repository.js";
4
+ /**
5
+ * The build badge: the release a site is serving, or the commit it was built
6
+ * from while it has no release yet, and when it was made.
7
+ * @param props - See {@link AboutVersionProps}.
8
+ * @returns The badge, or `null` when the build says nothing worth showing.
9
+ */
10
+ export function AboutVersion(props) {
11
+ const { build, repository, publicRepository } = props;
12
+ const label = buildLabel(build);
13
+ if (build === undefined || label === undefined)
14
+ return null;
15
+ const href = publicRepository ? addressOf(build, repository) : undefined;
16
+ const summary = buildSummary(build);
17
+ // The instant belongs on the badge rather than in its hover: a version
18
+ // nobody can date says nothing about how old the page they read is.
19
+ const badge = `${label} · ${buildStamp(build.builtAt)}`;
20
+ if (href === undefined) {
21
+ return (_jsx("span", { style: BADGE_STYLE, className: "about-version", title: summary, children: badge }));
22
+ }
23
+ return (_jsx("a", { className: "about-version", href: href, title: summary, target: "_blank", rel: "noopener noreferrer", style: LINK_BADGE_STYLE, children: badge }));
24
+ }
25
+ /**
26
+ * What the badge opens: the release it names, or the commit it was built from.
27
+ * @param build - What the build published about itself.
28
+ * @param repository - Where the sources live.
29
+ * @returns The address, or `undefined` when nothing inside the repository can
30
+ * be addressed.
31
+ */
32
+ function addressOf(build, repository) {
33
+ const sources = githubSources(repository);
34
+ if (sources === undefined)
35
+ return undefined;
36
+ const version = releasedVersion(build);
37
+ if (version !== undefined)
38
+ return `${sources}/releases/tag/v${version}`;
39
+ return build.commit === undefined
40
+ ? undefined
41
+ : `${sources}/commit/${build.commit}`;
42
+ }
43
+ const BADGE_STYLE = {
44
+ flex: '0 0 auto',
45
+ fontFamily: 'var(--font-mono, ui-monospace, monospace)',
46
+ fontSize: 13,
47
+ color: 'var(--text-muted)',
48
+ whiteSpace: 'nowrap',
49
+ };
50
+ const LINK_BADGE_STYLE = {
51
+ ...BADGE_STYLE,
52
+ color: 'var(--accent)',
53
+ };
54
+ //# sourceMappingURL=AboutVersion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AboutVersion.js","sourceRoot":"","sources":["../../../src/about/ui/AboutVersion.tsx"],"names":[],"mappings":";AAYA,OAAO,EACL,UAAU,EACV,UAAU,EACV,YAAY,EACZ,eAAe,GAChB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAWtD;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OAAO,KAAK,CAAC,MAAM,KAAK,SAAS;QAC/B,CAAC,CAAC,SAAS;QACX,CAAC,CAAC,GAAG,OAAO,WAAW,KAAK,CAAC,MAAM,EAAE,CAAC;AAC1C,CAAC;AAED,MAAM,WAAW,GAAG;IAClB,IAAI,EAAE,UAAU;IAChB,UAAU,EAAE,2CAA2C;IACvD,QAAQ,EAAE,EAAE;IACZ,KAAK,EAAE,mBAAmB;IAC1B,UAAU,EAAE,QAAQ;CACY,CAAC;AAEnC,MAAM,gBAAgB,GAAG;IACvB,GAAG,WAAW;IACd,KAAK,EAAE,eAAe;CACU,CAAC"}
@@ -1,5 +1,7 @@
1
1
  export type { AboutBuildProps } from './AboutBuild.tsx';
2
2
  export { AboutBuild } from './AboutBuild.tsx';
3
+ export type { AboutVersionProps } from './AboutVersion.tsx';
4
+ export { AboutVersion } from './AboutVersion.tsx';
3
5
  export type { AboutCitationsProps } from './AboutCitations.tsx';
4
6
  export { AboutCitations } from './AboutCitations.tsx';
5
7
  export type { AboutPageProps } from './AboutPage.tsx';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/about/ui/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,YAAY,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,YAAY,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,YAAY,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,YAAY,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/about/ui/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,YAAY,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,YAAY,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,YAAY,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,YAAY,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC"}
@@ -1,4 +1,5 @@
1
1
  export { AboutBuild } from "./AboutBuild.js";
2
+ export { AboutVersion } from "./AboutVersion.js";
2
3
  export { AboutCitations } from "./AboutCitations.js";
3
4
  export { AboutPage } from "./AboutPage.js";
4
5
  export { AboutProvidedBy } from "./AboutProvidedBy.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/about/ui/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAkB,CAAC;AAE9C,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAsB,CAAC;AAEtD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAiB,CAAC;AAE5C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAuB,CAAC;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAoB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/about/ui/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAkB,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAoB,CAAC;AAElD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAsB,CAAC;AAEtD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAiB,CAAC;AAE5C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAuB,CAAC;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAoB,CAAC"}
@@ -24,6 +24,50 @@ export interface BuildInfo {
24
24
  */
25
25
  reactCheminfo?: string;
26
26
  }
27
+ /**
28
+ * The version a build reports when the repository has never been released.
29
+ *
30
+ * release-please writes the version into the root `package.json`, so a site
31
+ * whose first release has not happened yet is built from the `0.0.0` it was
32
+ * scaffolded with. That is not a version anybody can look up, so nothing shows
33
+ * it: a page saying `0.0.0` reads as a bug rather than as a release.
34
+ */
35
+ export declare const UNRELEASED_VERSION = "0.0.0";
36
+ /**
37
+ * The version to show a reader, if there is one.
38
+ * @param build - What the build published about itself, or `undefined`.
39
+ * @returns The released version, or `undefined` when the build published none
40
+ * or has never been released.
41
+ */
42
+ export declare function releasedVersion(build: BuildInfo | undefined): string | undefined;
43
+ /**
44
+ * What the build is called on the page: the release when there is one, and the
45
+ * commit when there is not.
46
+ *
47
+ * A site that has never been released still has to be identifiable in a
48
+ * report, and `0.0.0` identifies nothing while the commit it was built from
49
+ * identifies exactly one build.
50
+ * @param build - What the build published about itself, or `undefined`.
51
+ * @returns The label, or `undefined` when the build published neither.
52
+ */
53
+ export declare function buildLabel(build: BuildInfo | undefined): string | undefined;
54
+ /**
55
+ * When the build was made, as it is read on the badge: the day and the minute.
56
+ *
57
+ * A build a reader is asked to quote is worth little without a date, and two
58
+ * builds of the same day are told apart by the minute. The seconds are left to
59
+ * the hover, where the whole record is.
60
+ * @param builtAt - The ISO instant the build wrote.
61
+ * @returns The instant, in UTC, e.g. `2026-09-16 09:41 UTC`.
62
+ */
63
+ export declare function buildStamp(builtAt: string): string;
64
+ /**
65
+ * The whole record in one line, for the hover of a badge that shows one part
66
+ * of it.
67
+ * @param build - What the build published about itself.
68
+ * @returns e.g. `Built 2026-09-16 09:41:07 UTC from commit a1b2c3d`.
69
+ */
70
+ export declare function buildSummary(build: BuildInfo): string;
27
71
  /**
28
72
  * The commit as it is written for a reader.
29
73
  * @param commit - The full hash.
@@ -1 +1 @@
1
- {"version":3,"file":"buildInfo.d.ts","sourceRoot":"","sources":["../../../src/build/core/buildInfo.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,WAAW,SAAS;IACxB,0EAA0E;IAC1E,OAAO,EAAE,MAAM,CAAC;IAChB,mFAAmF;IACnF,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAElD;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAGrD"}
1
+ {"version":3,"file":"buildInfo.d.ts","sourceRoot":"","sources":["../../../src/build/core/buildInfo.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,WAAW,SAAS;IACxB,0EAA0E;IAC1E,OAAO,EAAE,MAAM,CAAC;IAChB,mFAAmF;IACnF,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,UAAU,CAAC;AAE1C;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,SAAS,GAAG,SAAS,GAC3B,MAAM,GAAG,SAAS,CAIpB;AAED;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAK3E;AAED;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAElD;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CAIrD;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAElD;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAGrD"}
@@ -1,3 +1,65 @@
1
+ /**
2
+ * The version a build reports when the repository has never been released.
3
+ *
4
+ * release-please writes the version into the root `package.json`, so a site
5
+ * whose first release has not happened yet is built from the `0.0.0` it was
6
+ * scaffolded with. That is not a version anybody can look up, so nothing shows
7
+ * it: a page saying `0.0.0` reads as a bug rather than as a release.
8
+ */
9
+ export const UNRELEASED_VERSION = '0.0.0';
10
+ /**
11
+ * The version to show a reader, if there is one.
12
+ * @param build - What the build published about itself, or `undefined`.
13
+ * @returns The released version, or `undefined` when the build published none
14
+ * or has never been released.
15
+ */
16
+ export function releasedVersion(build) {
17
+ const version = build?.version;
18
+ if (version === undefined || version === UNRELEASED_VERSION)
19
+ return undefined;
20
+ return version;
21
+ }
22
+ /**
23
+ * What the build is called on the page: the release when there is one, and the
24
+ * commit when there is not.
25
+ *
26
+ * A site that has never been released still has to be identifiable in a
27
+ * report, and `0.0.0` identifies nothing while the commit it was built from
28
+ * identifies exactly one build.
29
+ * @param build - What the build published about itself, or `undefined`.
30
+ * @returns The label, or `undefined` when the build published neither.
31
+ */
32
+ export function buildLabel(build) {
33
+ const version = releasedVersion(build);
34
+ if (version !== undefined)
35
+ return version;
36
+ const commit = build?.commit;
37
+ return commit === undefined ? undefined : shortCommit(commit);
38
+ }
39
+ /**
40
+ * When the build was made, as it is read on the badge: the day and the minute.
41
+ *
42
+ * A build a reader is asked to quote is worth little without a date, and two
43
+ * builds of the same day are told apart by the minute. The seconds are left to
44
+ * the hover, where the whole record is.
45
+ * @param builtAt - The ISO instant the build wrote.
46
+ * @returns The instant, in UTC, e.g. `2026-09-16 09:41 UTC`.
47
+ */
48
+ export function buildStamp(builtAt) {
49
+ return `${builtAt.slice(0, MINUTE_LENGTH).replace('T', ' ')} UTC`;
50
+ }
51
+ /**
52
+ * The whole record in one line, for the hover of a badge that shows one part
53
+ * of it.
54
+ * @param build - What the build published about itself.
55
+ * @returns e.g. `Built 2026-09-16 09:41:07 UTC from commit a1b2c3d`.
56
+ */
57
+ export function buildSummary(build) {
58
+ const built = `Built ${formatBuiltAt(build.builtAt)}`;
59
+ if (build.commit === undefined)
60
+ return built;
61
+ return `${built} from commit ${shortCommit(build.commit)}`;
62
+ }
1
63
  /**
2
64
  * The commit as it is written for a reader.
3
65
  * @param commit - The full hash.
@@ -16,5 +78,6 @@ export function formatBuiltAt(builtAt) {
16
78
  return `${seconds} UTC`;
17
79
  }
18
80
  const SHORT_COMMIT_LENGTH = 7;
81
+ const MINUTE_LENGTH = 16;
19
82
  const SECOND_LENGTH = 19;
20
83
  //# sourceMappingURL=buildInfo.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"buildInfo.js","sourceRoot":"","sources":["../../../src/build/core/buildInfo.ts"],"names":[],"mappings":"AA2BA;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,MAAc;IACxC,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,mBAAmB,CAAC,CAAC;AAC9C,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,OAAe;IAC3C,MAAM,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAA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GAAG,KAAK,gBAAgB,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;AAC7D,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,MAAc;IACxC,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,mBAAmB,CAAC,CAAC;AAC9C,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,OAAe;IAC3C,MAAM,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAClE,OAAO,GAAG,OAAO,MAAM,CAAC;AAC1B,CAAC;AAED,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAC9B,MAAM,aAAa,GAAG,EAAE,CAAC;AACzB,MAAM,aAAa,GAAG,EAAE,CAAC"}
@@ -1,3 +1,3 @@
1
1
  export type { BuildInfo } from './buildInfo.ts';
2
- export { formatBuiltAt, shortCommit } from './buildInfo.ts';
2
+ export { UNRELEASED_VERSION, buildLabel, buildStamp, buildSummary, formatBuiltAt, releasedVersion, shortCommit, } from './buildInfo.ts';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/build/core/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/build/core/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EACL,kBAAkB,EAClB,UAAU,EACV,UAAU,EACV,YAAY,EACZ,aAAa,EACb,eAAe,EACf,WAAW,GACZ,MAAM,gBAAgB,CAAC"}
@@ -1,2 +1,2 @@
1
- export { formatBuiltAt, shortCommit } from "./buildInfo.js";
1
+ export { UNRELEASED_VERSION, buildLabel, buildStamp, buildSummary, formatBuiltAt, releasedVersion, shortCommit, } from "./buildInfo.js";
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/build/core/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/build/core/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,kBAAkB,EAClB,UAAU,EACV,UAAU,EACV,YAAY,EACZ,aAAa,EACb,eAAe,EACf,WAAW,GACZ,MAAM,gBAAgB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"buildInfo.d.ts","sourceRoot":"","sources":["../../../src/build/vite/buildInfo.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAEnC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAItD,uDAAuD;AACvD,eAAO,MAAM,iBAAiB,8BAA8B,CAAC;AAE7D,0CAA0C;AAC1C,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;CAC3B;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,GAAE,gBAAqB,GAAG,MAAM,CAkCxE;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CASxD;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAcxD"}
1
+ {"version":3,"file":"buildInfo.d.ts","sourceRoot":"","sources":["../../../src/build/vite/buildInfo.ts"],"names":[],"mappings":"AAAA;;;;;;;;;G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