react-cheminfo 0.7.0 → 0.9.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 (308) hide show
  1. package/README.md +60 -2
  2. package/bin/check-tokens.mjs +105 -0
  3. package/lib/about/core/about.d.ts +95 -0
  4. package/lib/about/core/about.d.ts.map +1 -0
  5. package/lib/about/core/about.js +78 -0
  6. package/lib/about/core/about.js.map +1 -0
  7. package/lib/about/core/index.d.ts +3 -0
  8. package/lib/about/core/index.d.ts.map +1 -0
  9. package/lib/about/core/index.js +2 -0
  10. package/lib/about/core/index.js.map +1 -0
  11. package/lib/about/ui/AboutCitations.d.ts +14 -0
  12. package/lib/about/ui/AboutCitations.d.ts.map +1 -0
  13. package/lib/about/ui/AboutCitations.js +40 -0
  14. package/lib/about/ui/AboutCitations.js.map +1 -0
  15. package/lib/about/ui/AboutPage.d.ts +32 -0
  16. package/lib/about/ui/AboutPage.d.ts.map +1 -0
  17. package/lib/about/ui/AboutPage.js +70 -0
  18. package/lib/about/ui/AboutPage.js.map +1 -0
  19. package/lib/about/ui/AboutSection.d.ts +23 -0
  20. package/lib/about/ui/AboutSection.d.ts.map +1 -0
  21. package/lib/about/ui/AboutSection.js +28 -0
  22. package/lib/about/ui/AboutSection.js.map +1 -0
  23. package/lib/about/ui/index.d.ts +7 -0
  24. package/lib/about/ui/index.d.ts.map +1 -0
  25. package/lib/about/ui/index.js +4 -0
  26. package/lib/about/ui/index.js.map +1 -0
  27. package/lib/chrome/ui/index.d.ts +1 -0
  28. package/lib/chrome/ui/index.d.ts.map +1 -1
  29. package/lib/chrome/ui/index.js +3 -0
  30. package/lib/chrome/ui/index.js.map +1 -1
  31. package/lib/citation/core/index.d.ts +1 -0
  32. package/lib/citation/core/index.d.ts.map +1 -1
  33. package/lib/citation/core/index.js +1 -0
  34. package/lib/citation/core/index.js.map +1 -1
  35. package/lib/citation/core/teachingPaper.d.ts +15 -0
  36. package/lib/citation/core/teachingPaper.d.ts.map +1 -0
  37. package/lib/citation/core/teachingPaper.js +32 -0
  38. package/lib/citation/core/teachingPaper.js.map +1 -0
  39. package/lib/clipboard/ui/CodeBlock.d.ts.map +1 -1
  40. package/lib/clipboard/ui/CodeBlock.js +4 -1
  41. package/lib/clipboard/ui/CodeBlock.js.map +1 -1
  42. package/lib/color/ui/ColorScaleLegend.js +1 -1
  43. package/lib/color/ui/ColorScaleLegend.js.map +1 -1
  44. package/lib/core.d.ts +3 -0
  45. package/lib/core.d.ts.map +1 -1
  46. package/lib/core.js +5 -0
  47. package/lib/core.js.map +1 -1
  48. package/lib/credits/core/credits.d.ts +36 -0
  49. package/lib/credits/core/credits.d.ts.map +1 -1
  50. package/lib/credits/core/credits.js +42 -0
  51. package/lib/credits/core/credits.js.map +1 -1
  52. package/lib/credits/ui/CreditsList.js +1 -1
  53. package/lib/credits/ui/CreditsList.js.map +1 -1
  54. package/lib/delimited/ui/DelimitedTextPanel.js +1 -1
  55. package/lib/delimited/ui/DelimitedTextPanel.js.map +1 -1
  56. package/lib/ecosystem/core/sites.d.ts +1 -1
  57. package/lib/ecosystem/core/sites.d.ts.map +1 -1
  58. package/lib/ecosystem/core/sites.js +10 -0
  59. package/lib/ecosystem/core/sites.js.map +1 -1
  60. package/lib/ecosystem/core/tokens.d.ts.map +1 -1
  61. package/lib/ecosystem/core/tokens.js +1 -0
  62. package/lib/ecosystem/core/tokens.js.map +1 -1
  63. package/lib/ecosystem/ui/EcosystemLinks.js +2 -2
  64. package/lib/ecosystem/ui/EcosystemLinks.js.map +1 -1
  65. package/lib/ecosystem/ui/EcosystemMenu.js +1 -1
  66. package/lib/ecosystem/ui/EcosystemMenu.js.map +1 -1
  67. package/lib/ecosystem/ui/SiteTile.d.ts.map +1 -1
  68. package/lib/ecosystem/ui/SiteTile.js +5 -5
  69. package/lib/ecosystem/ui/SiteTile.js.map +1 -1
  70. package/lib/ecosystem/ui/glyphs.d.ts.map +1 -1
  71. package/lib/ecosystem/ui/glyphs.js +3 -0
  72. package/lib/ecosystem/ui/glyphs.js.map +1 -1
  73. package/lib/orbital/core/index.d.ts +1 -1
  74. package/lib/orbital/core/index.d.ts.map +1 -1
  75. package/lib/orbital/core/index.js +1 -1
  76. package/lib/orbital/core/index.js.map +1 -1
  77. package/lib/orbital/core/realHarmonics.d.ts +5 -2
  78. package/lib/orbital/core/realHarmonics.d.ts.map +1 -1
  79. package/lib/orbital/core/realHarmonics.js.map +1 -1
  80. package/lib/orbital/ui/AtomicOrbitalCanvas.d.ts +18 -0
  81. package/lib/orbital/ui/AtomicOrbitalCanvas.d.ts.map +1 -1
  82. package/lib/orbital/ui/AtomicOrbitalCanvas.js +84 -7
  83. package/lib/orbital/ui/AtomicOrbitalCanvas.js.map +1 -1
  84. package/lib/orbital/ui/AtomicOrbitalViewer.d.ts +13 -0
  85. package/lib/orbital/ui/AtomicOrbitalViewer.d.ts.map +1 -1
  86. package/lib/orbital/ui/AtomicOrbitalViewer.js +1 -1
  87. package/lib/orbital/ui/AtomicOrbitalViewer.js.map +1 -1
  88. package/lib/orbital/ui/camera.d.ts +15 -0
  89. package/lib/orbital/ui/camera.d.ts.map +1 -1
  90. package/lib/orbital/ui/camera.js +68 -0
  91. package/lib/orbital/ui/camera.js.map +1 -1
  92. package/lib/orbital/ui/renderVolume.d.ts.map +1 -1
  93. package/lib/orbital/ui/renderVolume.js +8 -1
  94. package/lib/orbital/ui/renderVolume.js.map +1 -1
  95. package/lib/orbital/ui/serial.d.ts +25 -0
  96. package/lib/orbital/ui/serial.d.ts.map +1 -0
  97. package/lib/orbital/ui/serial.js +25 -0
  98. package/lib/orbital/ui/serial.js.map +1 -0
  99. package/lib/orbital/ui/viewer.d.ts +23 -0
  100. package/lib/orbital/ui/viewer.d.ts.map +1 -1
  101. package/lib/orbital/ui/viewer.js +70 -17
  102. package/lib/orbital/ui/viewer.js.map +1 -1
  103. package/lib/pedagogy/ui/ExerciseProgressHeader.js +1 -1
  104. package/lib/pedagogy/ui/ExerciseProgressHeader.js.map +1 -1
  105. package/lib/pedagogy/ui/GlossaryText.js +2 -2
  106. package/lib/pedagogy/ui/GlossaryText.js.map +1 -1
  107. package/lib/pedagogy/ui/ReferenceSectionBlock.js +5 -2
  108. package/lib/pedagogy/ui/ReferenceSectionBlock.js.map +1 -1
  109. package/lib/pedagogy/ui/SyntaxTooltip.js +2 -2
  110. package/lib/pedagogy/ui/SyntaxTooltip.js.map +1 -1
  111. package/lib/pedagogy/ui/TutorialStepStrip.d.ts +15 -2
  112. package/lib/pedagogy/ui/TutorialStepStrip.d.ts.map +1 -1
  113. package/lib/pedagogy/ui/TutorialStepStrip.js +19 -5
  114. package/lib/pedagogy/ui/TutorialStepStrip.js.map +1 -1
  115. package/lib/pedagogy/ui/index.d.ts +1 -1
  116. package/lib/pedagogy/ui/index.d.ts.map +1 -1
  117. package/lib/pedagogy/ui/index.js.map +1 -1
  118. package/lib/periodic/ui/CategoryLegend.js +1 -1
  119. package/lib/periodic/ui/CategoryLegend.js.map +1 -1
  120. package/lib/periodic/ui/PeriodicTableChrome.js +2 -2
  121. package/lib/periodic/ui/PeriodicTableChrome.js.map +1 -1
  122. package/lib/seo/vite/ogCard.d.ts.map +1 -1
  123. package/lib/seo/vite/ogCard.js +1 -0
  124. package/lib/seo/vite/ogCard.js.map +1 -1
  125. package/lib/share/ui/ShareDialogContent.d.ts.map +1 -1
  126. package/lib/share/ui/ShareDialogContent.js +5 -2
  127. package/lib/share/ui/ShareDialogContent.js.map +1 -1
  128. package/lib/share/ui/SharePartOptions.js +1 -1
  129. package/lib/share/ui/SharePartOptions.js.map +1 -1
  130. package/lib/slides/core/demoLinks.d.ts +43 -0
  131. package/lib/slides/core/demoLinks.d.ts.map +1 -0
  132. package/lib/slides/core/demoLinks.js +104 -0
  133. package/lib/slides/core/demoLinks.js.map +1 -0
  134. package/lib/slides/core/index.d.ts +13 -0
  135. package/lib/slides/core/index.d.ts.map +1 -0
  136. package/lib/slides/core/index.js +7 -0
  137. package/lib/slides/core/index.js.map +1 -0
  138. package/lib/slides/core/sectionHeading.d.ts +19 -0
  139. package/lib/slides/core/sectionHeading.d.ts.map +1 -0
  140. package/lib/slides/core/sectionHeading.js +19 -0
  141. package/lib/slides/core/sectionHeading.js.map +1 -0
  142. package/lib/slides/core/slideNavigation.d.ts +38 -0
  143. package/lib/slides/core/slideNavigation.d.ts.map +1 -0
  144. package/lib/slides/core/slideNavigation.js +65 -0
  145. package/lib/slides/core/slideNavigation.js.map +1 -0
  146. package/lib/slides/core/talk.d.ts +82 -0
  147. package/lib/slides/core/talk.d.ts.map +1 -0
  148. package/lib/slides/core/talk.js +134 -0
  149. package/lib/slides/core/talk.js.map +1 -0
  150. package/lib/slides/core/talkManifest.d.ts +90 -0
  151. package/lib/slides/core/talkManifest.d.ts.map +1 -0
  152. package/lib/slides/core/talkManifest.js +109 -0
  153. package/lib/slides/core/talkManifest.js.map +1 -0
  154. package/lib/slides/core/talkOrigin.d.ts +50 -0
  155. package/lib/slides/core/talkOrigin.d.ts.map +1 -0
  156. package/lib/slides/core/talkOrigin.js +62 -0
  157. package/lib/slides/core/talkOrigin.js.map +1 -0
  158. package/lib/slides/ui/BackToSlides.d.ts +26 -0
  159. package/lib/slides/ui/BackToSlides.d.ts.map +1 -0
  160. package/lib/slides/ui/BackToSlides.js +24 -0
  161. package/lib/slides/ui/BackToSlides.js.map +1 -0
  162. package/lib/slides/ui/DemoLink.d.ts +42 -0
  163. package/lib/slides/ui/DemoLink.d.ts.map +1 -0
  164. package/lib/slides/ui/DemoLink.js +17 -0
  165. package/lib/slides/ui/DemoLink.js.map +1 -0
  166. package/lib/slides/ui/EmbedSlide.d.ts +19 -0
  167. package/lib/slides/ui/EmbedSlide.d.ts.map +1 -0
  168. package/lib/slides/ui/EmbedSlide.js +56 -0
  169. package/lib/slides/ui/EmbedSlide.js.map +1 -0
  170. package/lib/slides/ui/SectionSlide.d.ts +18 -0
  171. package/lib/slides/ui/SectionSlide.d.ts.map +1 -0
  172. package/lib/slides/ui/SectionSlide.js +18 -0
  173. package/lib/slides/ui/SectionSlide.js.map +1 -0
  174. package/lib/slides/ui/Slide.d.ts +52 -0
  175. package/lib/slides/ui/Slide.d.ts.map +1 -0
  176. package/lib/slides/ui/Slide.js +58 -0
  177. package/lib/slides/ui/Slide.js.map +1 -0
  178. package/lib/slides/ui/SlideBody.d.ts +32 -0
  179. package/lib/slides/ui/SlideBody.d.ts.map +1 -0
  180. package/lib/slides/ui/SlideBody.js +27 -0
  181. package/lib/slides/ui/SlideBody.js.map +1 -0
  182. package/lib/slides/ui/Slideshow.d.ts +93 -0
  183. package/lib/slides/ui/Slideshow.d.ts.map +1 -0
  184. package/lib/slides/ui/Slideshow.js +122 -0
  185. package/lib/slides/ui/Slideshow.js.map +1 -0
  186. package/lib/slides/ui/SlideshowBar.d.ts +33 -0
  187. package/lib/slides/ui/SlideshowBar.d.ts.map +1 -0
  188. package/lib/slides/ui/SlideshowBar.js +20 -0
  189. package/lib/slides/ui/SlideshowBar.js.map +1 -0
  190. package/lib/slides/ui/TalkList.d.ts +37 -0
  191. package/lib/slides/ui/TalkList.d.ts.map +1 -0
  192. package/lib/slides/ui/TalkList.js +68 -0
  193. package/lib/slides/ui/TalkList.js.map +1 -0
  194. package/lib/slides/ui/index.d.ts +19 -0
  195. package/lib/slides/ui/index.d.ts.map +1 -0
  196. package/lib/slides/ui/index.js +10 -0
  197. package/lib/slides/ui/index.js.map +1 -0
  198. package/lib/slides/vite/index.d.ts +3 -0
  199. package/lib/slides/vite/index.d.ts.map +1 -0
  200. package/lib/slides/vite/index.js +2 -0
  201. package/lib/slides/vite/index.js.map +1 -0
  202. package/lib/slides/vite/talks.d.ts +50 -0
  203. package/lib/slides/vite/talks.d.ts.map +1 -0
  204. package/lib/slides/vite/talks.js +87 -0
  205. package/lib/slides/vite/talks.js.map +1 -0
  206. package/lib/slides.d.ts +3 -0
  207. package/lib/slides.d.ts.map +1 -0
  208. package/lib/slides.js +3 -0
  209. package/lib/slides.js.map +1 -0
  210. package/lib/structure/ui/StructureEditor.js +2 -2
  211. package/lib/structure/ui/StructureEditor.js.map +1 -1
  212. package/lib/structure/ui/StructurePlaceholder.js +1 -1
  213. package/lib/structure/ui/StructurePlaceholder.js.map +1 -1
  214. package/lib/tokens/core/checkTokens.d.ts +51 -0
  215. package/lib/tokens/core/checkTokens.d.ts.map +1 -0
  216. package/lib/tokens/core/checkTokens.js +188 -0
  217. package/lib/tokens/core/checkTokens.js.map +1 -0
  218. package/lib/tokens/core/colors.d.ts +42 -0
  219. package/lib/tokens/core/colors.d.ts.map +1 -0
  220. package/lib/tokens/core/colors.js +119 -0
  221. package/lib/tokens/core/colors.js.map +1 -0
  222. package/lib/tokens/core/index.d.ts +3 -0
  223. package/lib/tokens/core/index.d.ts.map +1 -0
  224. package/lib/tokens/core/index.js +2 -0
  225. package/lib/tokens/core/index.js.map +1 -0
  226. package/lib/tokens/core/rules.d.ts +23 -0
  227. package/lib/tokens/core/rules.d.ts.map +1 -0
  228. package/lib/tokens/core/rules.js +90 -0
  229. package/lib/tokens/core/rules.js.map +1 -0
  230. package/lib/ui.d.ts +1 -0
  231. package/lib/ui.d.ts.map +1 -1
  232. package/lib/ui.js +1 -0
  233. package/lib/ui.js.map +1 -1
  234. package/lib/vite.d.ts +1 -0
  235. package/lib/vite.d.ts.map +1 -1
  236. package/lib/vite.js +1 -0
  237. package/lib/vite.js.map +1 -1
  238. package/package.json +11 -3
  239. package/src/about/core/about.ts +176 -0
  240. package/src/about/core/index.ts +2 -0
  241. package/src/about/ui/AboutCitations.tsx +79 -0
  242. package/src/about/ui/AboutPage.tsx +177 -0
  243. package/src/about/ui/AboutSection.tsx +56 -0
  244. package/src/about/ui/index.ts +6 -0
  245. package/src/chrome/ui/index.ts +3 -0
  246. package/src/citation/core/index.ts +1 -0
  247. package/src/citation/core/teachingPaper.ts +36 -0
  248. package/src/clipboard/ui/CodeBlock.tsx +4 -1
  249. package/src/color/ui/ColorScaleLegend.tsx +1 -1
  250. package/src/core.ts +5 -0
  251. package/src/credits/core/credits.ts +42 -0
  252. package/src/credits/ui/CreditsList.tsx +1 -1
  253. package/src/delimited/ui/DelimitedTextPanel.tsx +1 -1
  254. package/src/ecosystem/core/sites.ts +12 -0
  255. package/src/ecosystem/core/tokens.ts +1 -0
  256. package/src/ecosystem/ui/EcosystemLinks.tsx +2 -2
  257. package/src/ecosystem/ui/EcosystemMenu.tsx +1 -1
  258. package/src/ecosystem/ui/SiteTile.tsx +7 -5
  259. package/src/ecosystem/ui/glyphs.tsx +40 -0
  260. package/src/orbital/core/index.ts +4 -1
  261. package/src/orbital/core/realHarmonics.ts +5 -2
  262. package/src/orbital/ui/AtomicOrbitalCanvas.tsx +126 -4
  263. package/src/orbital/ui/AtomicOrbitalViewer.tsx +14 -1
  264. package/src/orbital/ui/camera.ts +81 -0
  265. package/src/orbital/ui/renderVolume.ts +8 -1
  266. package/src/orbital/ui/serial.ts +35 -0
  267. package/src/orbital/ui/viewer.ts +72 -13
  268. package/src/pedagogy/ui/ExerciseProgressHeader.tsx +1 -1
  269. package/src/pedagogy/ui/GlossaryText.tsx +2 -2
  270. package/src/pedagogy/ui/ReferenceSectionBlock.tsx +5 -2
  271. package/src/pedagogy/ui/SyntaxTooltip.tsx +2 -2
  272. package/src/pedagogy/ui/TutorialStepStrip.tsx +39 -10
  273. package/src/pedagogy/ui/index.ts +4 -1
  274. package/src/periodic/ui/CategoryLegend.tsx +1 -1
  275. package/src/periodic/ui/PeriodicTableChrome.tsx +2 -2
  276. package/src/seo/vite/ogCard.ts +1 -0
  277. package/src/share/ui/ShareDialogContent.tsx +5 -2
  278. package/src/share/ui/SharePartOptions.tsx +1 -1
  279. package/src/slides/core/demoLinks.ts +113 -0
  280. package/src/slides/core/index.ts +22 -0
  281. package/src/slides/core/sectionHeading.ts +29 -0
  282. package/src/slides/core/slideNavigation.ts +77 -0
  283. package/src/slides/core/talk.ts +203 -0
  284. package/src/slides/core/talkManifest.ts +158 -0
  285. package/src/slides/core/talkOrigin.ts +83 -0
  286. package/src/slides/ui/BackToSlides.tsx +49 -0
  287. package/src/slides/ui/DemoLink.tsx +67 -0
  288. package/src/slides/ui/EmbedSlide.tsx +85 -0
  289. package/src/slides/ui/SectionSlide.tsx +44 -0
  290. package/src/slides/ui/Slide.tsx +143 -0
  291. package/src/slides/ui/SlideBody.tsx +64 -0
  292. package/src/slides/ui/Slideshow.tsx +282 -0
  293. package/src/slides/ui/SlideshowBar.tsx +83 -0
  294. package/src/slides/ui/TalkList.tsx +146 -0
  295. package/src/slides/ui/index.ts +18 -0
  296. package/src/slides/vite/index.ts +2 -0
  297. package/src/slides/vite/talks.ts +126 -0
  298. package/src/slides.ts +2 -0
  299. package/src/structure/ui/StructureEditor.tsx +2 -2
  300. package/src/structure/ui/StructurePlaceholder.tsx +1 -1
  301. package/src/tokens/core/checkTokens.ts +242 -0
  302. package/src/tokens/core/colors.ts +122 -0
  303. package/src/tokens/core/index.ts +6 -0
  304. package/src/tokens/core/rules.ts +103 -0
  305. package/src/ui.ts +1 -0
  306. package/src/vite.ts +1 -0
  307. package/styles/chrome.css +1 -0
  308. package/styles/slides.css +667 -0
package/README.md CHANGED
@@ -37,7 +37,9 @@ only when it drags a heavy dependency behind it.
37
37
  | `react-cheminfo/vite` | the prerender plugin and the OG card | nothing; React on the card |
38
38
  | `react-cheminfo/orbital` | the 3D atomic-orbital viewer | React, molstar |
39
39
  | `react-cheminfo/structure` | the structure editor and renderer | React, react-ocl, OCL |
40
+ | `react-cheminfo/slides` | the deck format and the slideshow player | React, react-markdown |
40
41
  | `react-cheminfo/styles/chrome.css` | the shared tokens and site-header stylesheet | nothing |
42
+ | `react-cheminfo/styles/slides.css` | the deck stylesheet, themed on the site's colours | nothing |
41
43
 
42
44
  A backend serving an RIS endpoint, a prerender script writing a sitemap, and
43
45
  every unit test of that logic therefore load no React at all — and a worker
@@ -69,10 +71,13 @@ through a wildcard subpath exactly as `react-science` serves its own.
69
71
  | **Widgets** | `CREDITS`, `credits` | `ErrorBoundary`, `CollapsibleSection`, `CapsuleFilter`, `HelpTooltip`, `CreditsList` |
70
72
  | **Hooks & state** | `createWorkerChannel` | `persistBucket`, `useDebouncedValue`, `useContainerSize`, `useListKeyboardNavigation`, `useDisclosure` |
71
73
  | **Chemistry** | `atomicOrbitalsOf`, `configurationOf`, `classifyMolfile`, `readStructure` | `AtomicOrbitalViewer` (`/orbital`), `StructureEditor`, `Structure` (`/structure`) |
74
+ | **About** | `resolveAbout`, `aboutProblems` | `AboutPage` |
75
+ | **Slideshows** | `parseTalk`, `splitDemoLinks`, `slideActionForKey`, `parseTalkOrigin`, `buildTalkManifest` (all `/slides`) | `Slideshow`, `SlideView`, `TalkList`, `BackToSlides` (all `/slides`), `cheminfoTalks` (`/vite`) |
76
+ | **Token guard** | `findTokenViolations` | `cheminfo-check-tokens` (the bin) |
72
77
  | **Periodic table** | `PERIODIC_ELEMENTS`, `elementBySymbol`, `elementByAtomicNumber`, `cellOf`, `placedElements`, `elementByArrowKey`, `categorySwatch`, `CATEGORY_LABELS` | `PeriodicTable`, `ElementCell`, `CategoryLegend` |
73
78
 
74
- Everything in that table is exported from `./core`, `./ui`, `./vite` or
75
- `./structure` and nothing else is: the sub-components a component is built
79
+ Everything in that table is exported from `./core`, `./ui`, `./slides`,
80
+ `./vite` or `./structure` and nothing else is: the sub-components a component is built
76
81
  from, the parsers a helper calls and the internals of a hook stay inside the
77
82
  package, reachable only by their own path. If it is exported, it is supported.
78
83
 
@@ -260,6 +265,59 @@ The colours a name is set in are the site's own and are not retuned to reach the
260
265
  4.5:1 of body text: ChemCalc's teal and NMRium's orange both land just under it,
261
266
  which is why a name is set bold, where 3:1 is the threshold.
262
267
 
268
+ ## Carrying talks
269
+
270
+ A deck is one Markdown file in the repository of the site whose subject it
271
+ teaches — front matter, slides separated by a `---` line, and a
272
+ `<!-- layout: … -->` comment where the default is not what is wanted. The
273
+ format and the player are `react-cheminfo/slides`; the addresses and the
274
+ authoring rules are in `rules/slideshows.md`.
275
+
276
+ ```tsx
277
+ import { parseTalk, Slideshow } from 'react-cheminfo/slides';
278
+ import 'react-cheminfo/styles/slides.css';
279
+
280
+ const talk = parseTalk(source);
281
+
282
+ <Slideshow
283
+ talk={talk}
284
+ talkId="20260824_IMSC"
285
+ index={slide}
286
+ onIndex={(next) => navigate(`/talks/${id}?slide=${next}`)}
287
+ layouts={{ octochemdb: OctoChemDbFlow }}
288
+ />;
289
+ ```
290
+
291
+ The index is **controlled**: the site owns the address, so a link can open one
292
+ slide and a demo link can come back to it. Arrow keys, space and PageUp/Down
293
+ navigate, `Home` and `End` jump, `f` is fullscreen, `b` and `w` blank the
294
+ screen, `n` shows the speaker's notes. A layout name the player does not know
295
+ falls back to `content` rather than breaking a deck in front of a room, and a
296
+ site adds its own through `layouts`.
297
+
298
+ The `embed` layout puts a **live tool** on the slide — the last bare URL of the
299
+ body is framed — which is what our `?embed` mode exists for.
300
+
301
+ The format itself is framework-free and is also exported from
302
+ `react-cheminfo/core`, so a backend gathering the family's manifests reads them
303
+ without loading React.
304
+
305
+ A site that fullscreens its own shell — so a slide can open the live tool and
306
+ come back still presenting — passes `fullscreen={{ isFullscreen, onToggle }}`,
307
+ and the `f` key and the bar's button drive that instead of the player's own
308
+ element.
309
+
310
+ Publishing a site's decks to the family is one plugin:
311
+
312
+ ```ts
313
+ import { cheminfoTalks } from 'react-cheminfo/vite';
314
+
315
+ plugins: [cheminfoTalks({ site: 'chemcalc' })];
316
+ ```
317
+
318
+ It writes `dist/talks.json` and `dist/talks/<id>.md`, which is what
319
+ learn.cheminfo.org reads to list and play every site's talks beside its own.
320
+
263
321
  ## Prerendering a site
264
322
 
265
323
  A static site has no server to rewrite a head per request, so a crawler gets
@@ -0,0 +1,105 @@
1
+ #!/usr/bin/env node
2
+ /*
3
+ * Report every colour a site writes that belongs to the family rather than to
4
+ * the site: Blueprint's greys and blues, the family's own token values re-typed
5
+ * as literals, and a palette declared by hand instead of rendered from
6
+ * `<SiteTheme siteId>`.
7
+ *
8
+ * Wire it as an npm script:
9
+ * "check-tokens": "node node_modules/react-cheminfo/bin/check-tokens.mjs src"
10
+ *
11
+ * Usage: check-tokens.mjs [directory...] [--allow=#aabbcc,#ddeeff] [--quiet]
12
+ * directory what to walk, `src` when none is given
13
+ * --allow colours the project legitimately owns
14
+ * --quiet say nothing when the scan is clean
15
+ *
16
+ * Exits 1 when anything is reported, 2 when it was called wrongly, 0 otherwise.
17
+ */
18
+ import { readFileSync, readdirSync, statSync } from 'node:fs';
19
+ import { extname, join } from 'node:path';
20
+ import process from 'node:process';
21
+
22
+ import { findTokenViolations } from '../lib/core.js';
23
+
24
+ const EXTENSIONS = new Set(['.css', '.ts', '.tsx', '.jsx', '.js']);
25
+ const SKIPPED = new Set(['node_modules', 'dist', 'lib', 'coverage']);
26
+ const ALLOW_PREFIX = '--allow=';
27
+
28
+ const roots = [];
29
+ const allow = [];
30
+ let quiet = false;
31
+
32
+ for (const argument of process.argv.slice(2)) {
33
+ if (argument.startsWith(ALLOW_PREFIX)) {
34
+ for (const colour of argument.slice(ALLOW_PREFIX.length).split(',')) {
35
+ if (colour.trim() !== '') allow.push(colour.trim());
36
+ }
37
+ } else if (argument === '--quiet') {
38
+ quiet = true;
39
+ } else if (argument.startsWith('-')) {
40
+ fail(`unknown option: ${argument}`);
41
+ } else {
42
+ roots.push(argument);
43
+ }
44
+ }
45
+ if (roots.length === 0) roots.push('src');
46
+
47
+ const files = [];
48
+ for (const root of roots) collect(root, files);
49
+
50
+ const violations = findTokenViolations(files, { allow });
51
+ let report = '';
52
+ for (const violation of violations) {
53
+ report += `${violation.file}:${violation.line}:${violation.column} ${violation.kind} ${violation.text} -> ${violation.hint}\n`;
54
+ }
55
+
56
+ if (violations.length > 0) {
57
+ report += `${count(violations.length, 'violation')} in ${count(files.length, 'file')}\n`;
58
+ process.stdout.write(report);
59
+ process.exit(1);
60
+ }
61
+ if (!quiet) {
62
+ process.stdout.write(
63
+ `no token violation in ${count(files.length, 'file')}\n`,
64
+ );
65
+ }
66
+
67
+ /**
68
+ * Add every file worth reading under a path to the list, walking directories
69
+ * and leaving the generated ones alone.
70
+ * @param {string} path - A file or a directory.
71
+ * @param {Array<{ path: string, text: string }>} files - Collected so far.
72
+ */
73
+ function collect(path, files) {
74
+ const stats = statSync(path, { throwIfNoEntry: false });
75
+ if (stats === undefined) fail(`no such path: ${path}`);
76
+ if (stats.isDirectory()) {
77
+ for (const entry of readdirSync(path, { withFileTypes: true })) {
78
+ if (entry.name.startsWith('.') || SKIPPED.has(entry.name)) continue;
79
+ collect(join(path, entry.name), files);
80
+ }
81
+ return;
82
+ }
83
+ if (!EXTENSIONS.has(extname(path))) return;
84
+ files.push({ path, text: readFileSync(path, 'utf8') });
85
+ }
86
+
87
+ /**
88
+ * A count with its noun, so a summary line reads as a sentence.
89
+ * @param {number} total - How many.
90
+ * @param {string} noun - What of, in the singular.
91
+ * @returns {string} The two, with the plural `s` when it is needed.
92
+ */
93
+ function count(total, noun) {
94
+ return `${total} ${noun}${total === 1 ? '' : 's'}`;
95
+ }
96
+
97
+ /**
98
+ * Stop on a call the script cannot honour, which is not a clean scan.
99
+ * @param {string} message - What was wrong with it.
100
+ * @returns {never} It never comes back: the process ends here.
101
+ */
102
+ function fail(message) {
103
+ process.stderr.write(`check-tokens: ${message}\n`);
104
+ process.exit(2);
105
+ }
@@ -0,0 +1,95 @@
1
+ import type { CitedWork } from '../../citation/core/works.ts';
2
+ import type { CreditEntry, CreditId } from '../../credits/core/credits.ts';
3
+ import type { EcosystemSite, SiteId } from '../../ecosystem/core/sites.ts';
4
+ /**
5
+ * What a site says about itself: the one page a visitor opens to find out what
6
+ * the tool is, what it stands on, and who to tell when it breaks.
7
+ *
8
+ * Every field is content, never markup. A site writes this record and the page
9
+ * is drawn from it, which is what keeps fourteen About pages in one order and
10
+ * one voice — the shape they were in before was fourteen hand-written pages,
11
+ * each crediting a different half of what it runs on.
12
+ */
13
+ export interface AboutContent {
14
+ /** The site the page belongs to. */
15
+ siteId: SiteId;
16
+ /** One sentence: what this tool is. */
17
+ what: string;
18
+ /**
19
+ * At most two short paragraphs of context — what the site replaces, where
20
+ * its numbers come from, what it deliberately does not do.
21
+ * @default undefined
22
+ */
23
+ paragraphs?: readonly string[];
24
+ /** Three to six one-line entries: what a visitor can do here. */
25
+ can: readonly string[];
26
+ /** Ids into the shared credits registry, in display order. */
27
+ credits: readonly CreditId[];
28
+ /**
29
+ * Works to cite, from the citation module.
30
+ * @default undefined — the site asks for no citation of its own
31
+ */
32
+ cite?: readonly CitedWork[];
33
+ /**
34
+ * Licence the site itself is published under.
35
+ * @default 'MIT'
36
+ */
37
+ license?: string;
38
+ /**
39
+ * Where the sources live.
40
+ * @default the repository of the ECOSYSTEM_SITES record
41
+ */
42
+ repository?: string;
43
+ /**
44
+ * The running version, when the site knows it.
45
+ * @default undefined
46
+ */
47
+ version?: string;
48
+ /**
49
+ * Where a problem is reported.
50
+ * @default the repository's /issues
51
+ */
52
+ issues?: string;
53
+ }
54
+ /**
55
+ * The same record with nothing left to look up: every default filled in, and
56
+ * every credit id replaced by the entry it names.
57
+ */
58
+ export interface ResolvedAbout {
59
+ /** The site's own record, which carries its name, tagline and colours. */
60
+ site: EcosystemSite;
61
+ what: string;
62
+ /** The context paragraphs, empty when the site writes none. */
63
+ paragraphs: readonly string[];
64
+ can: readonly string[];
65
+ /** The borrowed works themselves, in the order the site names them. */
66
+ credits: CreditEntry[];
67
+ /** The works to cite, empty when the site asks for none. */
68
+ cite: readonly CitedWork[];
69
+ license: string;
70
+ repository: string;
71
+ /** The running version, or `undefined` when the site does not know it. */
72
+ version: string | undefined;
73
+ issues: string;
74
+ }
75
+ /**
76
+ * Fill in what a site left to the family, and resolve what it named.
77
+ * @param content - What the site wrote about itself.
78
+ * @returns The record the About page is drawn from.
79
+ * @throws {Error} When the site is not one of the family, or when a credit id
80
+ * is not in the registry: an About page that silently drops a borrowed work
81
+ * credits nobody.
82
+ */
83
+ export declare function resolveAbout(content: AboutContent): ResolvedAbout;
84
+ /**
85
+ * What is wrong with a record before anyone reads the page it draws.
86
+ *
87
+ * Short and efficient prose is the house style, and prose is exactly what no
88
+ * test, lint rule or type ever checks: a `what` that runs to a paragraph and a
89
+ * `can` list of a dozen lines both compile. This is where that is caught, so a
90
+ * site can assert it in its own suite rather than discover it in review.
91
+ * @param content - What the site wrote about itself.
92
+ * @returns One line per problem, in reading order; empty when there is none.
93
+ */
94
+ export declare function aboutProblems(content: AboutContent): string[];
95
+ //# sourceMappingURL=about.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"about.d.ts","sourceRoot":"","sources":["../../../src/about/core/about.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAG3E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AAE3E;;;;;;;;GAQG;AACH,MAAM,WAAW,YAAY;IAC3B,oCAAoC;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/B,iEAAiE;IACjE,GAAG,EAAE,SAAS,MAAM,EAAE,CAAC;IACvB,8DAA8D;IAC9D,OAAO,EAAE,SAAS,QAAQ,EAAE,CAAC;IAC7B;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,SAAS,EAAE,CAAC;IAC5B;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,0EAA0E;IAC1E,IAAI,EAAE,aAAa,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,+DAA+D;IAC/D,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9B,GAAG,EAAE,SAAS,MAAM,EAAE,CAAC;IACvB,uEAAuE;IACvE,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,4DAA4D;IAC5D,IAAI,EAAE,SAAS,SAAS,EAAE,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,0EAA0E;IAC1E,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,YAAY,GAAG,aAAa,CAgBjE;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,YAAY,GAAG,MAAM,EAAE,CA8C7D"}
@@ -0,0 +1,78 @@
1
+ import { credits } from "../../credits/core/credits.js";
2
+ import { siteById } from "../../ecosystem/core/lookup.js";
3
+ /**
4
+ * Fill in what a site left to the family, and resolve what it named.
5
+ * @param content - What the site wrote about itself.
6
+ * @returns The record the About page is drawn from.
7
+ * @throws {Error} When the site is not one of the family, or when a credit id
8
+ * is not in the registry: an About page that silently drops a borrowed work
9
+ * credits nobody.
10
+ */
11
+ export function resolveAbout(content) {
12
+ const site = siteById(content.siteId);
13
+ const repository = content.repository ?? site.repository;
14
+ return {
15
+ site,
16
+ what: content.what,
17
+ paragraphs: content.paragraphs ?? [],
18
+ can: content.can,
19
+ credits: credits(content.credits),
20
+ cite: content.cite ?? [],
21
+ license: content.license ?? DEFAULT_LICENSE,
22
+ repository,
23
+ version: content.version,
24
+ issues: content.issues ?? `${withoutTrailingSlash(repository)}/issues`,
25
+ };
26
+ }
27
+ /**
28
+ * What is wrong with a record before anyone reads the page it draws.
29
+ *
30
+ * Short and efficient prose is the house style, and prose is exactly what no
31
+ * test, lint rule or type ever checks: a `what` that runs to a paragraph and a
32
+ * `can` list of a dozen lines both compile. This is where that is caught, so a
33
+ * site can assert it in its own suite rather than discover it in review.
34
+ * @param content - What the site wrote about itself.
35
+ * @returns One line per problem, in reading order; empty when there is none.
36
+ */
37
+ export function aboutProblems(content) {
38
+ const problems = [];
39
+ if (content.what.length > WHAT_LIMIT) {
40
+ problems.push(`\`what\` is ${content.what.length} characters: one sentence of at most ${WHAT_LIMIT} says what the tool is.`);
41
+ }
42
+ const can = content.can;
43
+ if (can.length < CAN_MIN || can.length > CAN_MAX) {
44
+ problems.push(`\`can\` lists ${can.length} entries: between ${CAN_MIN} and ${CAN_MAX} is what a visitor reads before deciding to stay.`);
45
+ }
46
+ for (let index = 0; index < can.length; index++) {
47
+ const line = can[index] ?? '';
48
+ if (line.length > CAN_LINE_LIMIT) {
49
+ problems.push(`\`can\` entry ${index + 1} is ${line.length} characters: one line of at most ${CAN_LINE_LIMIT}, not a sentence about it.`);
50
+ }
51
+ }
52
+ const paragraphs = content.paragraphs ?? [];
53
+ if (paragraphs.length > PARAGRAPH_MAX) {
54
+ problems.push(`\`paragraphs\` holds ${paragraphs.length}: at most ${PARAGRAPH_MAX} short paragraphs of context, and the rest belongs in the README.`);
55
+ }
56
+ for (let index = 0; index < paragraphs.length; index++) {
57
+ const paragraph = paragraphs[index] ?? '';
58
+ if (paragraph.length > PARAGRAPH_LIMIT) {
59
+ problems.push(`paragraph ${index + 1} is ${paragraph.length} characters: at most ${PARAGRAPH_LIMIT}, or it is documentation rather than context.`);
60
+ }
61
+ }
62
+ if (content.credits.length === 0) {
63
+ problems.push('`credits` is empty: every page of ours stands on borrowed work, and naming it is what the section is for.');
64
+ }
65
+ return problems;
66
+ }
67
+ /** What a site is published under unless it says otherwise. */
68
+ const DEFAULT_LICENSE = 'MIT';
69
+ const WHAT_LIMIT = 160;
70
+ const CAN_MIN = 3;
71
+ const CAN_MAX = 6;
72
+ const CAN_LINE_LIMIT = 90;
73
+ const PARAGRAPH_MAX = 2;
74
+ const PARAGRAPH_LIMIT = 400;
75
+ function withoutTrailingSlash(url) {
76
+ return url.endsWith('/') ? url.slice(0, -1) : url;
77
+ }
78
+ //# sourceMappingURL=about.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"about.js","sourceRoot":"","sources":["../../../src/about/core/about.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AA4E1D;;;;;;;GAOG;AACH,MAAM,UAAU,YAAY,CAAC,OAAqB;IAChD,MAAM,IAAI,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACtC,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU,CAAC;IAEzD,OAAO;QACL,IAAI;QACJ,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,UAAU,EAAE,OAAO,CAAC,UAAU,IAAI,EAAE;QACpC,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC;QACjC,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,EAAE;QACxB,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,eAAe;QAC3C,UAAU;QACV,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,GAAG,oBAAoB,CAAC,UAAU,CAAC,SAAS;KACvE,CAAC;AACJ,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,aAAa,CAAC,OAAqB;IACjD,MAAM,QAAQ,GAAa,EAAE,CAAC;IAE9B,IAAI,OAAO,CAAC,IAAI,CAAC,MAAM,GAAG,UAAU,EAAE,CAAC;QACrC,QAAQ,CAAC,IAAI,CACX,eAAe,OAAO,CAAC,IAAI,CAAC,MAAM,wCAAwC,UAAU,yBAAyB,CAC9G,CAAC;IACJ,CA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AM,KAAK,CAAC,EAAE,CAAC;QACjC,QAAQ,CAAC,IAAI,CACX,2GAA2G,CAC5G,CAAC;IACJ,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,+DAA+D;AAC/D,MAAM,eAAe,GAAG,KAAK,CAAC;AAE9B,MAAM,UAAU,GAAG,GAAG,CAAC;AACvB,MAAM,OAAO,GAAG,CAAC,CAAC;AAClB,MAAM,OAAO,GAAG,CAAC,CAAC;AAClB,MAAM,cAAc,GAAG,EAAE,CAAC;AAC1B,MAAM,aAAa,GAAG,CAAC,CAAC;AACxB,MAAM,eAAe,GAAG,GAAG,CAAC;AAE5B,SAAS,oBAAoB,CAAC,GAAW;IACvC,OAAO,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;AACpD,CAAC"}
@@ -0,0 +1,3 @@
1
+ export type { AboutContent, ResolvedAbout } from './about.ts';
2
+ export { aboutProblems, resolveAbout } from './about.ts';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/about/core/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { aboutProblems, resolveAbout } from "./about.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +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"}
@@ -0,0 +1,14 @@
1
+ import type { ReactElement } from 'react';
2
+ import type { CitedWork } from '../../citation/core/works.ts';
3
+ export interface AboutCitationsProps {
4
+ /** The works the site asks for, in the order it names them. */
5
+ works: readonly CitedWork[];
6
+ }
7
+ /**
8
+ * What to cite, and what citing each work credits: a reader handed two
9
+ * references has to be told which is which before they can pick one.
10
+ * @param props - See {@link AboutCitationsProps}.
11
+ * @returns The works, each with its reference and its DOI.
12
+ */
13
+ export declare function AboutCitations(props: AboutCitationsProps): ReactElement;
14
+ //# sourceMappingURL=AboutCitations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AboutCitations.d.ts","sourceRoot":"","sources":["../../../src/about/ui/AboutCitations.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,OAAO,CAAC;AAIzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAG9D,MAAM,WAAW,mBAAmB;IAClC,+DAA+D;IAC/D,KAAK,EAAE,SAAS,SAAS,EAAE,CAAC;CAC7B;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,YAAY,CA8BvE"}
@@ -0,0 +1,40 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { DEFAULT_CITATION_STYLE } from "../../citation/core/formats.js";
3
+ import { doiUrl } from "../../citation/core/reference.js";
4
+ import { CitationPreview } from "../../citation/ui/CitationPreview.js";
5
+ /**
6
+ * What to cite, and what citing each work credits: a reader handed two
7
+ * references has to be told which is which before they can pick one.
8
+ * @param props - See {@link AboutCitationsProps}.
9
+ * @returns The works, each with its reference and its DOI.
10
+ */
11
+ export function AboutCitations(props) {
12
+ const { works } = props;
13
+ return (_jsx("div", { className: "about-citations", style: LIST_STYLE, children: works.map((work) => (_jsxs("div", { className: "about-citation", children: [_jsx("div", { style: WHAT_STYLE, children: work.what }), work.note === undefined ? null : (_jsx("p", { style: NOTE_STYLE, children: work.note })), _jsx("div", { style: PLATE_STYLE, children: _jsx(CitationPreview, { reference: work.reference, format: "text", style: DEFAULT_CITATION_STYLE }) }), _jsxs("a", { href: doiUrl(work.reference), target: "_blank", rel: "noopener noreferrer", style: DOI_STYLE, children: ["doi:", work.reference.doi] })] }, work.reference.doi))) }));
14
+ }
15
+ const LIST_STYLE = {
16
+ display: 'flex',
17
+ flexDirection: 'column',
18
+ gap: 14,
19
+ };
20
+ const WHAT_STYLE = { fontWeight: 600 };
21
+ const NOTE_STYLE = {
22
+ margin: '2px 0 6px',
23
+ color: 'var(--text-muted)',
24
+ fontSize: 13,
25
+ };
26
+ // The preview is set in the light ink of the tooltip it was drawn for, so it
27
+ // is given the dark plate that ink is legible on.
28
+ const PLATE_STYLE = {
29
+ padding: '8px 10px',
30
+ borderRadius: 'var(--radius)',
31
+ background: 'var(--text)',
32
+ overflow: 'auto',
33
+ };
34
+ const DOI_STYLE = {
35
+ display: 'inline-block',
36
+ marginTop: 6,
37
+ color: 'var(--accent)',
38
+ fontSize: 12,
39
+ };
40
+ //# sourceMappingURL=AboutCitations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AboutCitations.js","sourceRoot":"","sources":["../../../src/about/ui/AboutCitations.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAE1D,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAuC,CAAC;AAOxE;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,KAA0B;IACvD,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IAExB,OAAO,CACL,cAAK,SAAS,EAAC,iBAAiB,EAAC,KAAK,EAAE,UAAU,YAC/C,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACnB,eAA8B,SAAS,EAAC,gBAAgB,aACtD,cAAK,KAAK,EAAE,UAAU,YAAG,IAAI,CAAC,IAAI,GAAO,EACxC,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAChC,YAAG,KAAK,EAAE,UAAU,YAAG,IAAI,CAAC,IAAI,GAAK,CACtC,EACD,cAAK,KAAK,EAAE,WAAW,YACrB,KAAC,eAAe,IACd,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,MAAM,EAAC,MAAM,EACb,KAAK,EAAE,sBAAsB,GAC7B,GACE,EACN,aACE,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,EAC5B,MAAM,EAAC,QAAQ,EACf,GAAG,EAAC,qBAAqB,EACzB,KAAK,EAAE,SAAS,qBAEX,IAAI,CAAC,SAAS,CAAC,GAAG,IACrB,KAnBI,IAAI,CAAC,SAAS,CAAC,GAAG,CAoBtB,CACP,CAAC,GACE,CACP,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,GAAG;IACjB,OAAO,EAAE,MAAM;IACf,aAAa,EAAE,QAAQ;IACvB,GAAG,EAAE,EAAE;CACyB,CAAC;AAEnC,MAAM,UAAU,GAAG,EAAE,UAAU,EAAE,GAAG,EAAmC,CAAC;AAExE,MAAM,UAAU,GAAG;IACjB,MAAM,EAAE,WAAW;IACnB,KAAK,EAAE,mBAAmB;IAC1B,QAAQ,EAAE,EAAE;CACoB,CAAC;AAEnC,6EAA6E;AAC7E,kDAAkD;AAClD,MAAM,WAAW,GAAG;IAClB,OAAO,EAAE,UAAU;IACnB,YAAY,EAAE,eAAe;IAC7B,UAAU,EAAE,aAAa;IACzB,QAAQ,EAAE,MAAM;CACgB,CAAC;AAEnC,MAAM,SAAS,GAAG;IAChB,OAAO,EAAE,cAAc;IACvB,SAAS,EAAE,CAAC;IACZ,KAAK,EAAE,eAAe;IACtB,QAAQ,EAAE,EAAE;CACoB,CAAC"}
@@ -0,0 +1,32 @@
1
+ import type { ReactElement, ReactNode } from 'react';
2
+ import type { AboutContent } from '../core/about.ts';
3
+ export interface AboutPageProps {
4
+ /** What the site says about itself. */
5
+ content: AboutContent;
6
+ /**
7
+ * Class the page carries, in addition to `about-page`.
8
+ * @default undefined
9
+ */
10
+ className?: string;
11
+ /**
12
+ * The one section a site adds of its own — where its numbers come from, the
13
+ * limitation it wants named. It lands under the context paragraphs, so the
14
+ * credits, the citation and the licence keep the place a reader expects.
15
+ * @default undefined
16
+ */
17
+ children?: ReactNode;
18
+ }
19
+ /**
20
+ * The About page of a site of the family: what the tool is, what a visitor can
21
+ * do with it, what it is built on, how to cite it, and where to report a
22
+ * problem — always in that order.
23
+ *
24
+ * The order is the point. A reader who has read one of our About pages knows
25
+ * where the credits are on the other thirteen, and a site that writes its own
26
+ * page is a site that will forget one of these sections.
27
+ * @param props - See {@link AboutPageProps}.
28
+ * @returns The page.
29
+ * @throws {Error} When the record names a site or a credit that does not exist.
30
+ */
31
+ export declare function AboutPage(props: AboutPageProps): ReactElement;
32
+ //# sourceMappingURL=AboutPage.d.ts.map
@@ -0,0 +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;AAMrD,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;CACtB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,GAAG,YAAY,CA6E7D"}
@@ -0,0 +1,70 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { CreditsList } from "../../credits/ui/CreditsList.js";
3
+ import { Wordmark } from "../../ecosystem/ui/Wordmark.js";
4
+ import { SiteMark } from "../../ecosystem/ui/marks.js";
5
+ import { resolveAbout } from "../core/about.js";
6
+ import { AboutCitations } from "./AboutCitations.js";
7
+ import { AboutSection } from "./AboutSection.js";
8
+ /**
9
+ * The About page of a site of the family: what the tool is, what a visitor can
10
+ * do with it, what it is built on, how to cite it, and where to report a
11
+ * problem — always in that order.
12
+ *
13
+ * The order is the point. A reader who has read one of our About pages knows
14
+ * where the credits are on the other thirteen, and a site that writes its own
15
+ * page is a site that will forget one of these sections.
16
+ * @param props - See {@link AboutPageProps}.
17
+ * @returns The page.
18
+ * @throws {Error} When the record names a site or a credit that does not exist.
19
+ */
20
+ export function AboutPage(props) {
21
+ const { content, className, children } = props;
22
+ const about = resolveAbout(content);
23
+ const site = about.site;
24
+ return (_jsxs("div", { className: className === undefined ? 'about-page' : `about-page ${className}`, style: PAGE_STYLE, children: [_jsxs("header", { className: "about-hero", style: HERO_STYLE, children: [_jsx(SiteMark, { siteId: site.id, size: 56 }), _jsxs("div", { children: [_jsx("h1", { style: NAME_STYLE, children: _jsx(Wordmark, { siteId: site.id, size: 26 }) }), _jsx("p", { style: TAGLINE_STYLE, children: site.tagline }), _jsx("p", { style: WHAT_STYLE, children: about.what })] })] }), _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.version === undefined ? null : (_jsxs("p", { style: PARAGRAPH_STYLE, children: ["This page is running version ", about.version, "."] }))] }), _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 }), "."] }) })] }));
25
+ }
26
+ function ExternalLink(props) {
27
+ const { href } = props;
28
+ return (_jsx("a", { href: href, target: "_blank", rel: "noopener noreferrer", style: LINK_STYLE, children: href.replace(/^https?:\/\//, '') }));
29
+ }
30
+ const PAGE_STYLE = {
31
+ display: 'flex',
32
+ flexDirection: 'column',
33
+ maxWidth: 980,
34
+ // Centred, because the About is read on its own rather than beside a tool.
35
+ marginInline: 'auto',
36
+ gap: 10,
37
+ };
38
+ const HERO_STYLE = {
39
+ display: 'flex',
40
+ alignItems: 'flex-start',
41
+ padding: 16,
42
+ border: '1px solid var(--border)',
43
+ borderRadius: 'var(--radius)',
44
+ background: 'var(--surface)',
45
+ gap: 16,
46
+ lineHeight: 1.55,
47
+ };
48
+ const NAME_STYLE = {
49
+ margin: 0,
50
+ fontSize: 26,
51
+ fontWeight: 700,
52
+ };
53
+ const TAGLINE_STYLE = {
54
+ margin: '2px 0 8px',
55
+ color: 'var(--text-muted)',
56
+ fontSize: 14,
57
+ };
58
+ const WHAT_STYLE = { margin: 0 };
59
+ const CAN_LIST_STYLE = {
60
+ margin: 0,
61
+ paddingLeft: 20,
62
+ };
63
+ const FIRST_PARAGRAPH_STYLE = {
64
+ margin: 0,
65
+ };
66
+ const PARAGRAPH_STYLE = {
67
+ margin: '8px 0 0',
68
+ };
69
+ const LINK_STYLE = { color: 'var(--accent)' };
70
+ //# sourceMappingURL=AboutPage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AboutPage.js","sourceRoot":"","sources":["../../../src/about/ui/AboutPage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,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,23 @@
1
+ import type { ReactElement, ReactNode } from 'react';
2
+ export interface AboutSectionProps {
3
+ /**
4
+ * What the section is called, written as its heading.
5
+ * @default undefined — the section carries no heading
6
+ */
7
+ title?: string;
8
+ /**
9
+ * Class the section carries, in addition to `about-section`.
10
+ * @default undefined
11
+ */
12
+ className?: string;
13
+ /** What the section holds. */
14
+ children: ReactNode;
15
+ }
16
+ /**
17
+ * One block of the About page: a heading and what sits under it, on the
18
+ * family's own surface rather than on a component library's card.
19
+ * @param props - See {@link AboutSectionProps}.
20
+ * @returns The section.
21
+ */
22
+ export declare function AboutSection(props: AboutSectionProps): ReactElement;
23
+ //# sourceMappingURL=AboutSection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AboutSection.d.ts","sourceRoot":"","sources":["../../../src/about/ui/AboutSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEpE,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8BAA8B;IAC9B,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,YAAY,CAcnE"}
@@ -0,0 +1,28 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * One block of the About page: a heading and what sits under it, on the
4
+ * family's own surface rather than on a component library's card.
5
+ * @param props - See {@link AboutSectionProps}.
6
+ * @returns The section.
7
+ */
8
+ export function AboutSection(props) {
9
+ const { title, className, children } = props;
10
+ return (_jsxs("section", { className: className === undefined ? 'about-section' : `about-section ${className}`, style: SECTION_STYLE, children: [title === undefined ? null : _jsx("h2", { style: TITLE_STYLE, children: title }), children] }));
11
+ }
12
+ const SECTION_STYLE = {
13
+ padding: 16,
14
+ border: '1px solid var(--border)',
15
+ borderRadius: 'var(--radius)',
16
+ background: 'var(--surface)',
17
+ // An About page is printed as often as it is read, and a section split over
18
+ // two pages loses the heading that says what its list is.
19
+ breakInside: 'avoid',
20
+ lineHeight: 1.55,
21
+ };
22
+ const TITLE_STYLE = {
23
+ margin: '0 0 8px',
24
+ color: 'var(--accent)',
25
+ fontSize: 16,
26
+ fontWeight: 600,
27
+ };
28
+ //# sourceMappingURL=AboutSection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AboutSection.js","sourceRoot":"","sources":["../../../src/about/ui/AboutSection.tsx"],"names":[],"mappings":";AAiBA;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAAC,KAAwB;IACnD,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAE7C,OAAO,CACL,mBACE,SAAS,EACP,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,iBAAiB,SAAS,EAAE,EAE1E,KAAK,EAAE,aAAa,aAEnB,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,aAAI,KAAK,EAAE,WAAW,YAAG,KAAK,GAAM,EACjE,QAAQ,IACD,CACX,CAAC;AACJ,CAAC;AAED,MAAM,aAAa,GAAG;IACpB,OAAO,EAAE,EAAE;IACX,MAAM,EAAE,yBAAyB;IACjC,YAAY,EAAE,eAAe;IAC7B,UAAU,EAAE,gBAAgB;IAC5B,4EAA4E;IAC5E,0DAA0D;IAC1D,WAAW,EAAE,OAAO;IACpB,UAAU,EAAE,IAAI;CACgB,CAAC;AAEnC,MAAM,WAAW,GAAG;IAClB,MAAM,EAAE,SAAS;IACjB,KAAK,EAAE,eAAe;IACtB,QAAQ,EAAE,EAAE;IACZ,UAAU,EAAE,GAAG;CACiB,CAAC"}