react-cheminfo 0.22.0 → 0.24.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 (464) hide show
  1. package/README.md +51 -28
  2. package/lib/chrome/ui/HeaderToggle.d.ts +52 -0
  3. package/lib/chrome/ui/HeaderToggle.d.ts.map +1 -0
  4. package/lib/chrome/ui/HeaderToggle.js +31 -0
  5. package/lib/chrome/ui/HeaderToggle.js.map +1 -0
  6. package/lib/chrome/ui/index.d.ts +2 -0
  7. package/lib/chrome/ui/index.d.ts.map +1 -1
  8. package/lib/chrome/ui/index.js +1 -0
  9. package/lib/chrome/ui/index.js.map +1 -1
  10. package/lib/citation/core/gfn2Paper.d.ts +10 -0
  11. package/lib/citation/core/gfn2Paper.d.ts.map +1 -0
  12. package/lib/citation/core/gfn2Paper.js +28 -0
  13. package/lib/citation/core/gfn2Paper.js.map +1 -0
  14. package/lib/citation/core/index.d.ts +1 -0
  15. package/lib/citation/core/index.d.ts.map +1 -1
  16. package/lib/citation/core/index.js +1 -0
  17. package/lib/citation/core/index.js.map +1 -1
  18. package/lib/clipboard/ui/ClickToCopy.d.ts +8 -7
  19. package/lib/clipboard/ui/ClickToCopy.d.ts.map +1 -1
  20. package/lib/clipboard/ui/ClickToCopy.js +3 -3
  21. package/lib/clipboard/ui/ClickToCopy.js.map +1 -1
  22. package/lib/conformers.d.ts +27 -0
  23. package/lib/conformers.d.ts.map +1 -0
  24. package/lib/conformers.js +19 -0
  25. package/lib/conformers.js.map +1 -0
  26. package/lib/core.d.ts +1 -0
  27. package/lib/core.d.ts.map +1 -1
  28. package/lib/core.js +1 -0
  29. package/lib/core.js.map +1 -1
  30. package/lib/credits/core/credits.d.ts +12 -0
  31. package/lib/credits/core/credits.d.ts.map +1 -1
  32. package/lib/credits/core/credits.js +14 -0
  33. package/lib/credits/core/credits.js.map +1 -1
  34. package/lib/ecosystem/core/index.d.ts +1 -1
  35. package/lib/ecosystem/core/index.d.ts.map +1 -1
  36. package/lib/ecosystem/core/index.js.map +1 -1
  37. package/lib/ecosystem/core/sites.d.ts +11 -1
  38. package/lib/ecosystem/core/sites.d.ts.map +1 -1
  39. package/lib/ecosystem/core/sites.js +7 -2
  40. package/lib/ecosystem/core/sites.js.map +1 -1
  41. package/lib/ecosystem/ui/EcosystemLinks.d.ts.map +1 -1
  42. package/lib/ecosystem/ui/EcosystemLinks.js +3 -1
  43. package/lib/ecosystem/ui/EcosystemLinks.js.map +1 -1
  44. package/lib/ecosystem/ui/SiteTile.d.ts.map +1 -1
  45. package/lib/ecosystem/ui/SiteTile.js +3 -1
  46. package/lib/ecosystem/ui/SiteTile.js.map +1 -1
  47. package/lib/format/core/index.d.ts +1 -1
  48. package/lib/format/core/index.d.ts.map +1 -1
  49. package/lib/format/core/index.js +1 -1
  50. package/lib/format/core/index.js.map +1 -1
  51. package/lib/format/core/words.d.ts +9 -0
  52. package/lib/format/core/words.d.ts.map +1 -1
  53. package/lib/format/core/words.js +16 -0
  54. package/lib/format/core/words.js.map +1 -1
  55. package/lib/language/core/index.d.ts +3 -0
  56. package/lib/language/core/index.d.ts.map +1 -0
  57. package/lib/language/core/index.js +3 -0
  58. package/lib/language/core/index.js.map +1 -0
  59. package/lib/language/core/languageName.d.ts +8 -0
  60. package/lib/language/core/languageName.d.ts.map +1 -0
  61. package/lib/language/core/languageName.js +16 -0
  62. package/lib/language/core/languageName.js.map +1 -0
  63. package/lib/language/core/languageParam.d.ts +35 -0
  64. package/lib/language/core/languageParam.d.ts.map +1 -0
  65. package/lib/language/core/languageParam.js +67 -0
  66. package/lib/language/core/languageParam.js.map +1 -0
  67. package/lib/language/ui/SiteLanguage.d.ts +20 -0
  68. package/lib/language/ui/SiteLanguage.d.ts.map +1 -0
  69. package/lib/language/ui/SiteLanguage.js +14 -0
  70. package/lib/language/ui/SiteLanguage.js.map +1 -0
  71. package/lib/language/ui/index.d.ts +4 -0
  72. package/lib/language/ui/index.d.ts.map +1 -0
  73. package/lib/language/ui/index.js +3 -0
  74. package/lib/language/ui/index.js.map +1 -0
  75. package/lib/language/ui/siteLanguageContext.d.ts +12 -0
  76. package/lib/language/ui/siteLanguageContext.d.ts.map +1 -0
  77. package/lib/language/ui/siteLanguageContext.js +19 -0
  78. package/lib/language/ui/siteLanguageContext.js.map +1 -0
  79. package/lib/orbital/core/atomicOrbitals.d.ts +9 -1
  80. package/lib/orbital/core/atomicOrbitals.d.ts.map +1 -1
  81. package/lib/orbital/core/atomicOrbitals.js +7 -0
  82. package/lib/orbital/core/atomicOrbitals.js.map +1 -1
  83. package/lib/orbital/core/hydrogenic.d.ts +2 -1
  84. package/lib/orbital/core/hydrogenic.d.ts.map +1 -1
  85. package/lib/orbital/core/hydrogenic.js +2 -1
  86. package/lib/orbital/core/hydrogenic.js.map +1 -1
  87. package/lib/orbital/core/index.d.ts +1 -0
  88. package/lib/orbital/core/index.d.ts.map +1 -1
  89. package/lib/orbital/core/index.js +1 -0
  90. package/lib/orbital/core/index.js.map +1 -1
  91. package/lib/orbital/core/slaterEnergy.d.ts +35 -0
  92. package/lib/orbital/core/slaterEnergy.d.ts.map +1 -0
  93. package/lib/orbital/core/slaterEnergy.js +66 -0
  94. package/lib/orbital/core/slaterEnergy.js.map +1 -0
  95. package/lib/overlay/core/index.d.ts +2 -2
  96. package/lib/overlay/core/index.d.ts.map +1 -1
  97. package/lib/overlay/core/index.js +1 -1
  98. package/lib/overlay/core/index.js.map +1 -1
  99. package/lib/overlay/core/overlayMarks.d.ts +20 -5
  100. package/lib/overlay/core/overlayMarks.d.ts.map +1 -1
  101. package/lib/overlay/core/overlayMarks.js +31 -5
  102. package/lib/overlay/core/overlayMarks.js.map +1 -1
  103. package/lib/overlay/ui/OverlayLegendMark.js +5 -0
  104. package/lib/overlay/ui/OverlayLegendMark.js.map +1 -1
  105. package/lib/projection/core/index.d.ts +4 -4
  106. package/lib/projection/core/index.d.ts.map +1 -1
  107. package/lib/projection/core/index.js +2 -2
  108. package/lib/projection/core/index.js.map +1 -1
  109. package/lib/projection/core/projectionCopy.d.ts +2 -0
  110. package/lib/projection/core/projectionCopy.d.ts.map +1 -1
  111. package/lib/projection/core/projectionCopy.js +1 -0
  112. package/lib/projection/core/projectionCopy.js.map +1 -1
  113. package/lib/projection/core/projectionGroupings.d.ts +44 -0
  114. package/lib/projection/core/projectionGroupings.d.ts.map +1 -0
  115. package/lib/projection/core/projectionGroupings.js +132 -0
  116. package/lib/projection/core/projectionGroupings.js.map +1 -0
  117. package/lib/projection/core/projectionOptions.d.ts +16 -6
  118. package/lib/projection/core/projectionOptions.d.ts.map +1 -1
  119. package/lib/projection/core/projectionOptions.js +7 -1
  120. package/lib/projection/core/projectionOptions.js.map +1 -1
  121. package/lib/projection/core/projectionPanelWords.d.ts +6 -0
  122. package/lib/projection/core/projectionPanelWords.d.ts.map +1 -1
  123. package/lib/projection/core/projectionPanelWords.js +4 -0
  124. package/lib/projection/core/projectionPanelWords.js.map +1 -1
  125. package/lib/projection/core/projectionSamples.d.ts +63 -32
  126. package/lib/projection/core/projectionSamples.d.ts.map +1 -1
  127. package/lib/projection/core/projectionSamples.js +1 -80
  128. package/lib/projection/core/projectionSamples.js.map +1 -1
  129. package/lib/projection/core/projectionStrings.d.ts +2 -0
  130. package/lib/projection/core/projectionStrings.d.ts.map +1 -1
  131. package/lib/projection/core/projectionStrings.js +10 -1
  132. package/lib/projection/core/projectionStrings.js.map +1 -1
  133. package/lib/projection/core/resolveProjectionOptions.d.ts +8 -3
  134. package/lib/projection/core/resolveProjectionOptions.d.ts.map +1 -1
  135. package/lib/projection/core/resolveProjectionOptions.js +58 -5
  136. package/lib/projection/core/resolveProjectionOptions.js.map +1 -1
  137. package/lib/projection/ui/ProjectionBar.d.ts +1 -1
  138. package/lib/projection/ui/ProjectionBar.d.ts.map +1 -1
  139. package/lib/projection/ui/ProjectionBar.js +3 -1
  140. package/lib/projection/ui/ProjectionBar.js.map +1 -1
  141. package/lib/projection/ui/ProjectionGroupingPickers.d.ts +38 -0
  142. package/lib/projection/ui/ProjectionGroupingPickers.d.ts.map +1 -0
  143. package/lib/projection/ui/ProjectionGroupingPickers.js +33 -0
  144. package/lib/projection/ui/ProjectionGroupingPickers.js.map +1 -0
  145. package/lib/projection/ui/ProjectionMapControls.d.ts +6 -7
  146. package/lib/projection/ui/ProjectionMapControls.d.ts.map +1 -1
  147. package/lib/projection/ui/ProjectionMapControls.js +11 -9
  148. package/lib/projection/ui/ProjectionMapControls.js.map +1 -1
  149. package/lib/projection/ui/ProjectionMapLegend.d.ts.map +1 -1
  150. package/lib/projection/ui/ProjectionMapLegend.js +1 -1
  151. package/lib/projection/ui/ProjectionMapLegend.js.map +1 -1
  152. package/lib/projection/ui/ProjectionMapMore.d.ts +2 -2
  153. package/lib/projection/ui/ProjectionMapMore.d.ts.map +1 -1
  154. package/lib/projection/ui/ProjectionMapMore.js +7 -5
  155. package/lib/projection/ui/ProjectionMapMore.js.map +1 -1
  156. package/lib/projection/ui/ProjectionMapTab.d.ts +15 -6
  157. package/lib/projection/ui/ProjectionMapTab.d.ts.map +1 -1
  158. package/lib/projection/ui/ProjectionMapTab.js +11 -7
  159. package/lib/projection/ui/ProjectionMapTab.js.map +1 -1
  160. package/lib/projection/ui/ProjectionPairsMore.d.ts +3 -7
  161. package/lib/projection/ui/ProjectionPairsMore.d.ts.map +1 -1
  162. package/lib/projection/ui/ProjectionPairsMore.js +4 -5
  163. package/lib/projection/ui/ProjectionPairsMore.js.map +1 -1
  164. package/lib/projection/ui/ProjectionPairsTab.d.ts.map +1 -1
  165. package/lib/projection/ui/ProjectionPairsTab.js +2 -2
  166. package/lib/projection/ui/ProjectionPairsTab.js.map +1 -1
  167. package/lib/projection/ui/ProjectionPanel.d.ts +1 -1
  168. package/lib/projection/ui/ProjectionPanel.d.ts.map +1 -1
  169. package/lib/projection/ui/ProjectionPanel.js +1 -1
  170. package/lib/projection/ui/ProjectionPanel.js.map +1 -1
  171. package/lib/projection/ui/ProjectionReadout.d.ts +7 -1
  172. package/lib/projection/ui/ProjectionReadout.d.ts.map +1 -1
  173. package/lib/projection/ui/ProjectionReadout.js +19 -7
  174. package/lib/projection/ui/ProjectionReadout.js.map +1 -1
  175. package/lib/projection/ui/ProjectionSpaceControls.d.ts +3 -5
  176. package/lib/projection/ui/ProjectionSpaceControls.d.ts.map +1 -1
  177. package/lib/projection/ui/ProjectionSpaceControls.js +9 -7
  178. package/lib/projection/ui/ProjectionSpaceControls.js.map +1 -1
  179. package/lib/projection/ui/ProjectionSpaceMore.d.ts +2 -2
  180. package/lib/projection/ui/ProjectionSpaceMore.d.ts.map +1 -1
  181. package/lib/projection/ui/ProjectionSpaceMore.js +5 -4
  182. package/lib/projection/ui/ProjectionSpaceMore.js.map +1 -1
  183. package/lib/projection/ui/ProjectionSpaceTab.d.ts +11 -3
  184. package/lib/projection/ui/ProjectionSpaceTab.d.ts.map +1 -1
  185. package/lib/projection/ui/ProjectionSpaceTab.js +7 -4
  186. package/lib/projection/ui/ProjectionSpaceTab.js.map +1 -1
  187. package/lib/projection/ui/ProjectionViewer.d.ts.map +1 -1
  188. package/lib/projection/ui/ProjectionViewer.js +1 -0
  189. package/lib/projection/ui/ProjectionViewer.js.map +1 -1
  190. package/lib/projection/ui/projectionBarReadings.d.ts +4 -1
  191. package/lib/projection/ui/projectionBarReadings.d.ts.map +1 -1
  192. package/lib/projection/ui/projectionBarReadings.js +14 -4
  193. package/lib/projection/ui/projectionBarReadings.js.map +1 -1
  194. package/lib/projection/ui/projectionBarSlots.d.ts +4 -2
  195. package/lib/projection/ui/projectionBarSlots.d.ts.map +1 -1
  196. package/lib/projection/ui/projectionBarSlots.js +3 -7
  197. package/lib/projection/ui/projectionBarSlots.js.map +1 -1
  198. package/lib/projection/ui/projectionMapChoices.d.ts +31 -6
  199. package/lib/projection/ui/projectionMapChoices.d.ts.map +1 -1
  200. package/lib/projection/ui/projectionMapChoices.js +58 -9
  201. package/lib/projection/ui/projectionMapChoices.js.map +1 -1
  202. package/lib/projection/ui/projectionMapChrome.d.ts +3 -9
  203. package/lib/projection/ui/projectionMapChrome.d.ts.map +1 -1
  204. package/lib/projection/ui/projectionMapChrome.js +41 -27
  205. package/lib/projection/ui/projectionMapChrome.js.map +1 -1
  206. package/lib/projection/ui/projectionMapCorner.d.ts +25 -0
  207. package/lib/projection/ui/projectionMapCorner.d.ts.map +1 -0
  208. package/lib/projection/ui/projectionMapCorner.js +46 -0
  209. package/lib/projection/ui/projectionMapCorner.js.map +1 -0
  210. package/lib/projection/ui/projectionMapModel.d.ts +9 -18
  211. package/lib/projection/ui/projectionMapModel.d.ts.map +1 -1
  212. package/lib/projection/ui/projectionMapModel.js +14 -39
  213. package/lib/projection/ui/projectionMapModel.js.map +1 -1
  214. package/lib/projection/ui/projectionMapView.d.ts +3 -1
  215. package/lib/projection/ui/projectionMapView.d.ts.map +1 -1
  216. package/lib/projection/ui/projectionMapView.js +9 -4
  217. package/lib/projection/ui/projectionMapView.js.map +1 -1
  218. package/lib/projection/ui/projectionSelectionSentence.d.ts +10 -0
  219. package/lib/projection/ui/projectionSelectionSentence.d.ts.map +1 -0
  220. package/lib/projection/ui/projectionSelectionSentence.js +18 -0
  221. package/lib/projection/ui/projectionSelectionSentence.js.map +1 -0
  222. package/lib/projection/ui/projectionStateApi.d.ts +47 -0
  223. package/lib/projection/ui/projectionStateApi.d.ts.map +1 -0
  224. package/lib/projection/ui/projectionStateApi.js +9 -0
  225. package/lib/projection/ui/projectionStateApi.js.map +1 -0
  226. package/lib/projection/ui/projectionTabModels.js +1 -1
  227. package/lib/projection/ui/projectionTabModels.js.map +1 -1
  228. package/lib/projection/ui/useProjectionState.d.ts +1 -29
  229. package/lib/projection/ui/useProjectionState.d.ts.map +1 -1
  230. package/lib/projection/ui/useProjectionState.js +13 -5
  231. package/lib/projection/ui/useProjectionState.js.map +1 -1
  232. package/lib/scatter/core/index.d.ts +1 -0
  233. package/lib/scatter/core/index.d.ts.map +1 -1
  234. package/lib/scatter/core/index.js +1 -0
  235. package/lib/scatter/core/index.js.map +1 -1
  236. package/lib/scatter/core/pointShape.d.ts +18 -0
  237. package/lib/scatter/core/pointShape.d.ts.map +1 -0
  238. package/lib/scatter/core/pointShape.js +70 -0
  239. package/lib/scatter/core/pointShape.js.map +1 -0
  240. package/lib/scatter/ui/ScatterPlot.d.ts.map +1 -1
  241. package/lib/scatter/ui/ScatterPlot.js +3 -2
  242. package/lib/scatter/ui/ScatterPlot.js.map +1 -1
  243. package/lib/scatter/ui/ScatterPointLayer.d.ts +14 -1
  244. package/lib/scatter/ui/ScatterPointLayer.d.ts.map +1 -1
  245. package/lib/scatter/ui/ScatterPointLayer.js +15 -3
  246. package/lib/scatter/ui/ScatterPointLayer.js.map +1 -1
  247. package/lib/scatter/ui/scatterFigureProps.d.ts +13 -0
  248. package/lib/scatter/ui/scatterFigureProps.d.ts.map +1 -1
  249. package/lib/scatter/ui/scatterMarkGlyph.d.ts +2 -1
  250. package/lib/scatter/ui/scatterMarkGlyph.d.ts.map +1 -1
  251. package/lib/scatter/ui/scatterMarkGlyph.js +7 -1
  252. package/lib/scatter/ui/scatterMarkGlyph.js.map +1 -1
  253. package/lib/scatter3d/ui/ScatterCloud.d.ts.map +1 -1
  254. package/lib/scatter3d/ui/ScatterCloud.js +2 -1
  255. package/lib/scatter3d/ui/ScatterCloud.js.map +1 -1
  256. package/lib/shared/ui/MenuButton.d.ts +3 -2
  257. package/lib/shared/ui/MenuButton.d.ts.map +1 -1
  258. package/lib/shared/ui/MenuButton.js +1 -1
  259. package/lib/shared/ui/MenuButton.js.map +1 -1
  260. package/lib/structure/core/conformerMinimise.d.ts +36 -0
  261. package/lib/structure/core/conformerMinimise.d.ts.map +1 -0
  262. package/lib/structure/core/conformerMinimise.js +81 -0
  263. package/lib/structure/core/conformerMinimise.js.map +1 -0
  264. package/lib/structure/core/conformerMinimum.d.ts +62 -0
  265. package/lib/structure/core/conformerMinimum.d.ts.map +1 -0
  266. package/lib/structure/core/conformerMinimum.js +90 -0
  267. package/lib/structure/core/conformerMinimum.js.map +1 -0
  268. package/lib/structure/core/conformerOptions.d.ts +62 -0
  269. package/lib/structure/core/conformerOptions.d.ts.map +1 -0
  270. package/lib/structure/core/conformerOptions.js +83 -0
  271. package/lib/structure/core/conformerOptions.js.map +1 -0
  272. package/lib/structure/core/conformerRefine.d.ts +104 -0
  273. package/lib/structure/core/conformerRefine.d.ts.map +1 -0
  274. package/lib/structure/core/conformerRefine.js +130 -0
  275. package/lib/structure/core/conformerRefine.js.map +1 -0
  276. package/lib/structure/core/conformerRefineRank.d.ts +36 -0
  277. package/lib/structure/core/conformerRefineRank.d.ts.map +1 -0
  278. package/lib/structure/core/conformerRefineRank.js +69 -0
  279. package/lib/structure/core/conformerRefineRank.js.map +1 -0
  280. package/lib/structure/core/conformerSession.d.ts +50 -0
  281. package/lib/structure/core/conformerSession.d.ts.map +1 -0
  282. package/lib/structure/core/conformerSession.js +88 -0
  283. package/lib/structure/core/conformerSession.js.map +1 -0
  284. package/lib/structure/core/conformerShape.d.ts +36 -0
  285. package/lib/structure/core/conformerShape.d.ts.map +1 -0
  286. package/lib/structure/core/conformerShape.js +150 -0
  287. package/lib/structure/core/conformerShape.js.map +1 -0
  288. package/lib/structure/core/conformers.d.ts +107 -0
  289. package/lib/structure/core/conformers.d.ts.map +1 -0
  290. package/lib/structure/core/conformers.js +149 -0
  291. package/lib/structure/core/conformers.js.map +1 -0
  292. package/lib/structure/core/geometryRelaxer.d.ts +66 -0
  293. package/lib/structure/core/geometryRelaxer.d.ts.map +1 -0
  294. package/lib/structure/core/geometryRelaxer.js +2 -0
  295. package/lib/structure/core/geometryRelaxer.js.map +1 -0
  296. package/lib/structure/core/index.d.ts +4 -0
  297. package/lib/structure/core/index.d.ts.map +1 -1
  298. package/lib/structure/core/index.js +2 -0
  299. package/lib/structure/core/index.js.map +1 -1
  300. package/lib/structure/core/moleculeCoordinates.d.ts +31 -0
  301. package/lib/structure/core/moleculeCoordinates.d.ts.map +1 -0
  302. package/lib/structure/core/moleculeCoordinates.js +80 -0
  303. package/lib/structure/core/moleculeCoordinates.js.map +1 -0
  304. package/lib/structure/core/molfileExport.d.ts +42 -0
  305. package/lib/structure/core/molfileExport.d.ts.map +1 -0
  306. package/lib/structure/core/molfileExport.js +47 -0
  307. package/lib/structure/core/molfileExport.js.map +1 -0
  308. package/lib/structure/core/oclResources.d.ts +12 -0
  309. package/lib/structure/core/oclResources.d.ts.map +1 -0
  310. package/lib/structure/core/oclResources.js +35 -0
  311. package/lib/structure/core/oclResources.js.map +1 -0
  312. package/lib/translate/core/catalog.d.ts +61 -0
  313. package/lib/translate/core/catalog.d.ts.map +1 -0
  314. package/lib/translate/core/catalog.js +49 -0
  315. package/lib/translate/core/catalog.js.map +1 -0
  316. package/lib/translate/core/checkTranslation.d.ts +32 -0
  317. package/lib/translate/core/checkTranslation.d.ts.map +1 -0
  318. package/lib/translate/core/checkTranslation.js +98 -0
  319. package/lib/translate/core/checkTranslation.js.map +1 -0
  320. package/lib/translate/core/contribution.d.ts +88 -0
  321. package/lib/translate/core/contribution.d.ts.map +1 -0
  322. package/lib/translate/core/contribution.js +14 -0
  323. package/lib/translate/core/contribution.js.map +1 -0
  324. package/lib/translate/core/index.d.ts +19 -0
  325. package/lib/translate/core/index.d.ts.map +1 -0
  326. package/lib/translate/core/index.js +15 -0
  327. package/lib/translate/core/index.js.map +1 -0
  328. package/lib/translate/core/marker.d.ts +45 -0
  329. package/lib/translate/core/marker.d.ts.map +1 -0
  330. package/lib/translate/core/marker.js +79 -0
  331. package/lib/translate/core/marker.js.map +1 -0
  332. package/lib/translate/core/mergeMessages.d.ts +35 -0
  333. package/lib/translate/core/mergeMessages.d.ts.map +1 -0
  334. package/lib/translate/core/mergeMessages.js +69 -0
  335. package/lib/translate/core/mergeMessages.js.map +1 -0
  336. package/lib/translate/core/session.d.ts +102 -0
  337. package/lib/translate/core/session.d.ts.map +1 -0
  338. package/lib/translate/core/session.js +162 -0
  339. package/lib/translate/core/session.js.map +1 -0
  340. package/lib/translate/core/start.d.ts +70 -0
  341. package/lib/translate/core/start.d.ts.map +1 -0
  342. package/lib/translate/core/start.js +73 -0
  343. package/lib/translate/core/start.js.map +1 -0
  344. package/lib/translate/core/suggestions.d.ts +77 -0
  345. package/lib/translate/core/suggestions.d.ts.map +1 -0
  346. package/lib/translate/core/suggestions.js +143 -0
  347. package/lib/translate/core/suggestions.js.map +1 -0
  348. package/lib/translate/core/tables.d.ts +100 -0
  349. package/lib/translate/core/tables.d.ts.map +1 -0
  350. package/lib/translate/core/tables.js +51 -0
  351. package/lib/translate/core/tables.js.map +1 -0
  352. package/lib/translate.d.ts +2 -0
  353. package/lib/translate.d.ts.map +1 -0
  354. package/lib/translate.js +6 -0
  355. package/lib/translate.js.map +1 -0
  356. package/lib/ui.d.ts +1 -0
  357. package/lib/ui.d.ts.map +1 -1
  358. package/lib/ui.js +1 -0
  359. package/lib/ui.js.map +1 -1
  360. package/lib/xtb/core/xtbRelaxer.d.ts +61 -0
  361. package/lib/xtb/core/xtbRelaxer.d.ts.map +1 -0
  362. package/lib/xtb/core/xtbRelaxer.js +108 -0
  363. package/lib/xtb/core/xtbRelaxer.js.map +1 -0
  364. package/lib/xtb.d.ts +11 -0
  365. package/lib/xtb.d.ts.map +1 -0
  366. package/lib/xtb.js +10 -0
  367. package/lib/xtb.js.map +1 -0
  368. package/package.json +18 -11
  369. package/src/chrome/ui/HeaderToggle.tsx +100 -0
  370. package/src/chrome/ui/index.ts +2 -0
  371. package/src/citation/core/gfn2Paper.ts +32 -0
  372. package/src/citation/core/index.ts +1 -0
  373. package/src/clipboard/ui/ClickToCopy.tsx +8 -7
  374. package/src/conformers.ts +87 -0
  375. package/src/core.ts +1 -0
  376. package/src/credits/core/credits.ts +16 -0
  377. package/src/ecosystem/core/index.ts +1 -0
  378. package/src/ecosystem/core/sites.ts +20 -2
  379. package/src/ecosystem/ui/EcosystemLinks.tsx +3 -1
  380. package/src/ecosystem/ui/SiteTile.tsx +3 -1
  381. package/src/format/core/index.ts +1 -1
  382. package/src/format/core/words.ts +19 -0
  383. package/src/language/core/index.ts +7 -0
  384. package/src/language/core/languageName.ts +16 -0
  385. package/src/language/core/languageParam.ts +70 -0
  386. package/src/language/ui/SiteLanguage.tsx +26 -0
  387. package/src/language/ui/index.ts +3 -0
  388. package/src/language/ui/siteLanguageContext.ts +20 -0
  389. package/src/orbital/core/atomicOrbitals.ts +17 -1
  390. package/src/orbital/core/hydrogenic.ts +2 -1
  391. package/src/orbital/core/index.ts +1 -0
  392. package/src/orbital/core/slaterEnergy.ts +83 -0
  393. package/src/overlay/core/index.ts +6 -2
  394. package/src/overlay/core/overlayMarks.ts +51 -6
  395. package/src/overlay/ui/OverlayLegendMark.tsx +5 -0
  396. package/src/projection/core/index.ts +11 -3
  397. package/src/projection/core/projectionCopy.ts +3 -0
  398. package/src/projection/core/projectionGroupings.ts +174 -0
  399. package/src/projection/core/projectionOptions.ts +18 -7
  400. package/src/projection/core/projectionPanelWords.ts +10 -0
  401. package/src/projection/core/projectionSamples.ts +62 -120
  402. package/src/projection/core/projectionStrings.ts +12 -1
  403. package/src/projection/core/resolveProjectionOptions.ts +66 -4
  404. package/src/projection/ui/ProjectionBar.tsx +4 -2
  405. package/src/projection/ui/ProjectionGroupingPickers.tsx +91 -0
  406. package/src/projection/ui/ProjectionMapControls.tsx +29 -32
  407. package/src/projection/ui/ProjectionMapLegend.tsx +1 -1
  408. package/src/projection/ui/ProjectionMapMore.tsx +14 -4
  409. package/src/projection/ui/ProjectionMapTab.tsx +27 -9
  410. package/src/projection/ui/ProjectionPairsMore.tsx +12 -21
  411. package/src/projection/ui/ProjectionPairsTab.tsx +5 -2
  412. package/src/projection/ui/ProjectionPanel.tsx +7 -3
  413. package/src/projection/ui/ProjectionReadout.tsx +28 -8
  414. package/src/projection/ui/ProjectionSpaceControls.tsx +20 -27
  415. package/src/projection/ui/ProjectionSpaceMore.tsx +12 -3
  416. package/src/projection/ui/ProjectionSpaceTab.tsx +23 -6
  417. package/src/projection/ui/ProjectionViewer.tsx +1 -0
  418. package/src/projection/ui/projectionBarReadings.ts +24 -8
  419. package/src/projection/ui/projectionBarSlots.tsx +10 -9
  420. package/src/projection/ui/projectionMapChoices.ts +71 -14
  421. package/src/projection/ui/projectionMapChrome.ts +55 -30
  422. package/src/projection/ui/projectionMapCorner.ts +67 -0
  423. package/src/projection/ui/projectionMapModel.ts +20 -59
  424. package/src/projection/ui/projectionMapView.ts +15 -8
  425. package/src/projection/ui/projectionSelectionSentence.ts +22 -0
  426. package/src/projection/ui/projectionStateApi.ts +57 -0
  427. package/src/projection/ui/projectionTabModels.ts +1 -1
  428. package/src/projection/ui/useProjectionState.ts +33 -37
  429. package/src/scatter/core/index.ts +1 -0
  430. package/src/scatter/core/pointShape.ts +80 -0
  431. package/src/scatter/ui/ScatterPlot.tsx +4 -1
  432. package/src/scatter/ui/ScatterPointLayer.tsx +39 -11
  433. package/src/scatter/ui/scatterFigureProps.ts +13 -0
  434. package/src/scatter/ui/scatterMarkGlyph.tsx +9 -1
  435. package/src/scatter3d/ui/ScatterCloud.tsx +3 -0
  436. package/src/shared/ui/MenuButton.tsx +4 -3
  437. package/src/structure/core/conformerMinimise.ts +99 -0
  438. package/src/structure/core/conformerMinimum.ts +125 -0
  439. package/src/structure/core/conformerOptions.ts +125 -0
  440. package/src/structure/core/conformerRefine.ts +234 -0
  441. package/src/structure/core/conformerRefineRank.ts +89 -0
  442. package/src/structure/core/conformerSession.ts +123 -0
  443. package/src/structure/core/conformerShape.ts +181 -0
  444. package/src/structure/core/conformers.ts +282 -0
  445. package/src/structure/core/geometryRelaxer.ts +71 -0
  446. package/src/structure/core/index.ts +13 -0
  447. package/src/structure/core/moleculeCoordinates.ts +93 -0
  448. package/src/structure/core/molfileExport.ts +62 -0
  449. package/src/structure/core/oclResources.ts +41 -0
  450. package/src/translate/core/catalog.ts +83 -0
  451. package/src/translate/core/checkTranslation.ts +128 -0
  452. package/src/translate/core/contribution.ts +99 -0
  453. package/src/translate/core/index.ts +72 -0
  454. package/src/translate/core/marker.ts +85 -0
  455. package/src/translate/core/mergeMessages.ts +74 -0
  456. package/src/translate/core/session.ts +250 -0
  457. package/src/translate/core/start.ts +121 -0
  458. package/src/translate/core/suggestions.ts +211 -0
  459. package/src/translate/core/tables.ts +120 -0
  460. package/src/translate.ts +5 -0
  461. package/src/ui.ts +1 -0
  462. package/src/xtb/core/xtbRelaxer.ts +160 -0
  463. package/src/xtb.ts +16 -0
  464. package/styles/chrome.css +61 -30
@@ -0,0 +1,5 @@
1
+ // Everything a page, an overlay or a server needs to translate a site of the
2
+ // family: the catalogs, the invisible marker, the checks, and the session a
3
+ // page in translate mode hands to the overlay. It is its own entry point
4
+ // because an ordinary visit loads none of it.
5
+ export * from './translate/core/index.ts';
package/src/ui.ts CHANGED
@@ -14,6 +14,7 @@ export * from './ecosystem/ui/index.ts';
14
14
  export * from './error/ui/index.ts';
15
15
  export * from './help/ui/index.ts';
16
16
  export * from './hooks/ui/index.ts';
17
+ export * from './language/ui/index.ts';
17
18
  export * from './overlay/ui/index.ts';
18
19
  export * from './parallel/ui/index.ts';
19
20
  export * from './pedagogy/ui/index.ts';
@@ -0,0 +1,160 @@
1
+ import type * as XtbWasm from 'xtb-wasm';
2
+
3
+ import { errorMessage } from '../../error/core/toError.ts';
4
+ import type {
5
+ GeometryRelaxer,
6
+ RelaxableGeometry,
7
+ RelaxedGeometry,
8
+ RelaxerOptions,
9
+ } from '../../structure/core/geometryRelaxer.ts';
10
+
11
+ /**
12
+ * kcal/mol per hartree, CODATA 2018. Every energy a relaxer reports is in
13
+ * kcal/mol, so it can be read against a force-field energy without the reader
14
+ * converting anything.
15
+ */
16
+ export const KCAL_PER_MOL_PER_HARTREE = 627.509_474_063_1;
17
+
18
+ /** How many occjs instances a relaxation may use. */
19
+ export interface XtbRelaxerOptions {
20
+ /**
21
+ * Hard cap on the number of GFN2 instances. Each one costs about 100 MB of
22
+ * WebAssembly memory, so a long batch on a small machine is worth capping.
23
+ * @default one per structure, one below the core count
24
+ */
25
+ maxWorkers?: number;
26
+ /**
27
+ * Total molecular charge in units of e, applied to every structure.
28
+ * @default 0
29
+ */
30
+ charge?: number;
31
+ /**
32
+ * Unpaired electrons, applied to every structure. `1` for a doublet radical.
33
+ * @default 0
34
+ */
35
+ unpairedElectrons?: number;
36
+ /**
37
+ * Cycle budget of one optimization.
38
+ * @default 250
39
+ */
40
+ maxCycles?: number;
41
+ }
42
+
43
+ /**
44
+ * GFN2-xTB as a {@link GeometryRelaxer}: the second stage that decides how good
45
+ * a force field's conformers really are.
46
+ *
47
+ * `xtb-wasm` is loaded on the **first call**, never on the import, so a page that
48
+ * offers refinement as an action downloads the 21.5 MB WebAssembly only once a
49
+ * visitor asks for it. The module is cached afterwards, and the worker pool it
50
+ * starts is kept alive between calls.
51
+ *
52
+ * Energies come back in kcal/mol, which is the unit `conformer.energy` is
53
+ * already in.
54
+ * @param options - Instance cap, charge, spin and the cycle budget.
55
+ * @returns A relaxer to hand to `refineConformers`, or to call directly.
56
+ */
57
+ export function xtbRelaxer(options: XtbRelaxerOptions = {}): GeometryRelaxer {
58
+ return async (
59
+ geometries: readonly RelaxableGeometry[],
60
+ runOptions: RelaxerOptions = {},
61
+ ): Promise<RelaxedGeometry[]> => {
62
+ const xtb = await loadXtb();
63
+ const settings = {
64
+ charge: options.charge ?? 0,
65
+ unpairedElectrons: options.unpairedElectrons ?? 0,
66
+ ...(options.maxCycles === undefined
67
+ ? {}
68
+ : { maxCycles: options.maxCycles }),
69
+ };
70
+ const requests = geometries.map((geometry) => ({ geometry, settings }));
71
+ const results = isXtbRelaxerAvailable()
72
+ ? await xtb.relaxGeometries(requests, {
73
+ maxWorkers: options.maxWorkers,
74
+ onSettled: runOptions.onSettled,
75
+ signal: runOptions.signal,
76
+ })
77
+ : await relaxHere(xtb, requests, runOptions);
78
+ const relaxed: RelaxedGeometry[] = [];
79
+ for (const result of results) {
80
+ relaxed.push({
81
+ coordinates: result.coordinates,
82
+ energy: result.energy.total * KCAL_PER_MOL_PER_HARTREE,
83
+ dispersionEnergy:
84
+ result.energy.dispersion === null
85
+ ? null
86
+ : result.energy.dispersion * KCAL_PER_MOL_PER_HARTREE,
87
+ cycles: result.cycles,
88
+ converged: result.converged,
89
+ warnings: result.warnings,
90
+ });
91
+ }
92
+ return relaxed;
93
+ };
94
+ }
95
+
96
+ /**
97
+ * Whether this environment has the worker pool the relaxer prefers.
98
+ *
99
+ * Without `Worker` — Node, a prerender pass, a test run — the relaxer still
100
+ * works, one structure at a time on the calling thread, so a site keeps one code
101
+ * path. It is the caller's business only when the difference in speed matters.
102
+ * @returns `true` in a browser, `false` in a plain Node process.
103
+ */
104
+ export function isXtbRelaxerAvailable(): boolean {
105
+ return typeof Worker !== 'undefined';
106
+ }
107
+
108
+ /**
109
+ * Drop the GFN2 worker pool and the memory it holds, about 100 MB per instance.
110
+ * The next relaxation starts a fresh one.
111
+ */
112
+ export async function disposeXtbRelaxer(): Promise<void> {
113
+ const loaded = await pending;
114
+ loaded?.disposeOccPool();
115
+ }
116
+
117
+ /**
118
+ * Relax one structure after another on this thread, for want of a pool.
119
+ * @param xtb - The loaded `xtb-wasm` module.
120
+ * @param requests - The structures to relax, with their settings.
121
+ * @param runOptions - Progress and cancellation.
122
+ * @returns One `xtb-wasm` result per request, in request order.
123
+ * @throws {Error} When the run is cancelled, or when occ fails.
124
+ */
125
+ async function relaxHere(
126
+ xtb: XtbModule,
127
+ requests: ReadonlyArray<Parameters<XtbModule['relaxGeometryInProcess']>[0]>,
128
+ runOptions: RelaxerOptions,
129
+ ): Promise<Array<Awaited<ReturnType<XtbModule['relaxGeometryInProcess']>>>> {
130
+ const results = [];
131
+ for (const [index, request] of requests.entries()) {
132
+ if (runOptions.signal?.aborted === true) {
133
+ throw new Error('calculation cancelled');
134
+ }
135
+ /* eslint-disable-next-line no-await-in-loop -- there is one thread: the
136
+ whole point of this path is that the structures run in turn. */
137
+ results.push(await xtb.relaxGeometryInProcess(request));
138
+ runOptions.onSettled?.(index + 1, requests.length);
139
+ }
140
+ return results;
141
+ }
142
+
143
+ type XtbModule = typeof XtbWasm;
144
+
145
+ let pending: Promise<XtbModule> | null = null;
146
+
147
+ function loadXtb(): Promise<XtbModule> {
148
+ pending ??= import('xtb-wasm').catch((error: unknown) => {
149
+ // A failed chunk load must not poison every later call of the session.
150
+ pending = null;
151
+ // The reason is in the message, not only in `cause`: what a reader sees is
152
+ // whatever the UI renders, and "could not be loaded" alone names neither a
153
+ // missing install nor a chunk that failed to come down the wire.
154
+ throw new Error(
155
+ `xtb-wasm could not be loaded, so geometries cannot be refined: ${errorMessage(error)}`,
156
+ { cause: error },
157
+ );
158
+ });
159
+ return pending;
160
+ }
package/src/xtb.ts ADDED
@@ -0,0 +1,16 @@
1
+ /**
2
+ * GFN2-xTB, the opt-in second stage after a force field.
3
+ *
4
+ * Its own door because it drags `xtb-wasm` and a 21.5 MB WebAssembly binary
5
+ * behind it, and because most pages never refine anything. The contract it
6
+ * implements — `GeometryRelaxer` — lives in `react-cheminfo/core`, so the code
7
+ * that orchestrates a refinement (`refineConformers`) loads none of this.
8
+ */
9
+
10
+ export type { XtbRelaxerOptions } from './xtb/core/xtbRelaxer.ts';
11
+ export {
12
+ KCAL_PER_MOL_PER_HARTREE,
13
+ disposeXtbRelaxer,
14
+ isXtbRelaxerAvailable,
15
+ xtbRelaxer,
16
+ } from './xtb/core/xtbRelaxer.ts';
package/styles/chrome.css CHANGED
@@ -170,6 +170,47 @@ button {
170
170
  flex: 1;
171
171
  }
172
172
 
173
+ /* A utility of the bar is its glyph: the name it carries is the tooltip and the
174
+ accessible name, never written beside it. About, Cite, Tools and Share read
175
+ as four marks the eye passes over, and the pages keep the width the labels
176
+ would take — which in a long language is most of the bar. An entry with no
177
+ glyph keeps its text, or it would be left an empty button: that is how a
178
+ toggle of the bar still shows the value it is set to. */
179
+ .app-header-actions .nav-link--icon .nav-link__label,
180
+ .app-header-actions
181
+ .bp6-button:has(> .bp6-icon:not(.bp6-icon-caret-down))
182
+ > .bp6-button-text,
183
+ .app-header-actions
184
+ .bp6-button:has(> .bp6-icon:not(.bp6-icon-caret-down))
185
+ > .bp6-icon-caret-down {
186
+ display: none;
187
+ }
188
+
189
+ .app-header-actions .nav-link--icon,
190
+ .citation-button .bp6-button,
191
+ .ecosystem-button .bp6-button {
192
+ padding: 0.3rem 0.5rem;
193
+ }
194
+
195
+ /* A setting the bar shows as its own values — the language, the scale a
196
+ temperature is read on — the one in force pressed. The values carry no
197
+ glyph, which is what keeps them written where a utility is only its mark. */
198
+ .site-toggle .bp6-button {
199
+ padding: 0.25rem 0.4rem;
200
+ color: var(--text-muted);
201
+ font-size: 0.8125rem;
202
+ font-weight: 500;
203
+ }
204
+
205
+ .site-toggle .bp6-button.bp6-active {
206
+ color: var(--text);
207
+ }
208
+
209
+ /* Narrow: the one value in force, a click away from the next. */
210
+ .site-toggle--compact {
211
+ color: var(--text);
212
+ }
213
+
173
214
  /* Carried by a link and by a button alike, so the whole row reads as one menu
174
215
  rather than as a button dropped among addresses. */
175
216
  .nav-link {
@@ -257,29 +298,11 @@ button {
257
298
  flex: none;
258
299
  }
259
300
 
260
- /* The utilities give up their labels and keep their icons. An entry with no
261
- icon keeps its label, or it would be left an empty button. */
262
301
  @container app-header (max-width: 48rem) {
263
302
  .app-header__inner {
264
303
  padding: 0 0.75rem;
265
304
  gap: 0.5rem;
266
305
  }
267
-
268
- .app-header-actions .nav-link--icon .nav-link__label,
269
- .app-header-actions
270
- .bp6-button:has(> .bp6-icon:not(.bp6-icon-caret-down))
271
- > .bp6-button-text,
272
- .app-header-actions
273
- .bp6-button:has(> .bp6-icon:not(.bp6-icon-caret-down))
274
- > .bp6-icon-caret-down {
275
- display: none;
276
- }
277
-
278
- .app-header-actions .nav-link--icon,
279
- .citation-button .bp6-button,
280
- .ecosystem-button .bp6-button {
281
- padding: 0.3rem 0.5rem;
282
- }
283
306
  }
284
307
 
285
308
  /* A phone: the pages fold into one menu beside the brand. */
@@ -365,14 +388,25 @@ select,
365
388
 
366
389
  /* ── Click to copy ───────────────────────────────────────────────────────── */
367
390
 
368
- /* The copy cursor, the tint and the clipboard glyph are the promise; a tick
369
- keeps it. The glyph is `clipboard`, never `duplicate`: two overlapping squares
370
- read as "add another". Green and red are the confirmation's own colours,
371
- the ones Blueprint gives success and danger. */
391
+ /* The cursor is the promise: a pointer carrying a clipboard, so the hover says
392
+ "click and this is yours" without a glyph crowding the line of text. The OS
393
+ `copy` cursor is not it — its badge is a plus, which reads as "add". The glyph
394
+ stays for what the cursor cannot say: the tick or cross after a click, and the
395
+ affordance for a keyboard, which has no pointer. Green and red are the
396
+ confirmation's own colours, the ones Blueprint gives success and danger. */
397
+ :root {
398
+ /* A cursor is a file of its own and cannot read a token, so its ink and its
399
+ halo are literal; the halo is what keeps it legible on a dark background. */
400
+ --cursor-copy:
401
+ url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M1 1 1 17 5 13 7.5 18.5 10 17.4 7.6 12.4 12 12.4Z' fill='%231c2127' stroke='%23ffffff' stroke-width='2' stroke-linejoin='round' paint-order='stroke'/%3E%3Crect x='13' y='11.5' width='10' height='11.5' rx='2' fill='%231c2127' stroke='%23ffffff' stroke-width='2' paint-order='stroke'/%3E%3Crect x='15.5' y='9.8' width='5' height='3.6' rx='1.2' fill='%231c2127' stroke='%23ffffff' stroke-width='1.6' paint-order='stroke'/%3E%3C/svg%3E")
402
+ 1 1,
403
+ copy;
404
+ }
405
+
372
406
  .click-to-copy {
373
407
  position: relative;
374
408
  border-radius: 4px;
375
- cursor: copy;
409
+ cursor: var(--cursor-copy);
376
410
  transition: background-color 120ms ease;
377
411
  }
378
412
 
@@ -398,8 +432,9 @@ select,
398
432
  transition: opacity 120ms ease;
399
433
  }
400
434
 
401
- /* In a line of text the glyph floats just past the value, so the line keeps
402
- its spacing; a block keeps room for it inside its right edge. */
435
+ /* The glyph is shown to a keyboard and after a copy, never on hover. In a line
436
+ of text it floats just past the value, so the line keeps its spacing; a block
437
+ keeps room for it inside its right edge. */
403
438
  .click-to-copy--inline .click-to-copy__icon {
404
439
  left: 100%;
405
440
  transform: translate(3px, -50%);
@@ -433,17 +468,13 @@ select,
433
468
  .click-to-copy:not([data-copy]):hover {
434
469
  background-color: color-mix(in oklab, var(--accent) 12%, transparent);
435
470
  }
436
-
437
- .click-to-copy:hover .click-to-copy__icon {
438
- opacity: 1;
439
- }
440
471
  }
441
472
 
442
473
  /* Blueprint's interactive and striped tables paint and point every cell from
443
474
  three classes deep, so a copyable cell repeats its class to stay ahead. */
444
475
  .click-to-copy.click-to-copy.click-to-copy.click-to-copy:is(td, th) {
445
476
  border-radius: 0;
446
- cursor: copy;
477
+ cursor: var(--cursor-copy);
447
478
  }
448
479
 
449
480
  .click-to-copy.click-to-copy.click-to-copy.click-to-copy:is(