react-cheminfo 0.76.0 → 0.77.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 (316) hide show
  1. package/README.md +141 -31
  2. package/lib/card/core/cardAddress.d.ts +19 -2
  3. package/lib/card/core/cardAddress.d.ts.map +1 -1
  4. package/lib/card/core/cardAddress.js +35 -2
  5. package/lib/card/core/cardAddress.js.map +1 -1
  6. package/lib/card/core/cardPageUrl.d.ts +7 -1
  7. package/lib/card/core/cardPageUrl.d.ts.map +1 -1
  8. package/lib/card/core/cardPageUrl.js +4 -2
  9. package/lib/card/core/cardPageUrl.js.map +1 -1
  10. package/lib/card/core/index.d.ts +1 -1
  11. package/lib/card/core/index.d.ts.map +1 -1
  12. package/lib/card/core/index.js +1 -1
  13. package/lib/card/core/index.js.map +1 -1
  14. package/lib/credits/core/credits.d.ts +30 -0
  15. package/lib/credits/core/credits.d.ts.map +1 -1
  16. package/lib/credits/core/credits.js +35 -0
  17. package/lib/credits/core/credits.js.map +1 -1
  18. package/lib/download/core/downloadFigure.d.ts +12 -1
  19. package/lib/download/core/downloadFigure.d.ts.map +1 -1
  20. package/lib/download/core/downloadFigure.js +21 -0
  21. package/lib/download/core/downloadFigure.js.map +1 -1
  22. package/lib/download/core/figureDpi.d.ts +59 -0
  23. package/lib/download/core/figureDpi.d.ts.map +1 -0
  24. package/lib/download/core/figureDpi.js +75 -0
  25. package/lib/download/core/figureDpi.js.map +1 -0
  26. package/lib/download/core/figurePng.d.ts +4 -1
  27. package/lib/download/core/figurePng.d.ts.map +1 -1
  28. package/lib/download/core/figurePng.js +11 -2
  29. package/lib/download/core/figurePng.js.map +1 -1
  30. package/lib/download/core/index.d.ts +4 -1
  31. package/lib/download/core/index.d.ts.map +1 -1
  32. package/lib/download/core/index.js +3 -1
  33. package/lib/download/core/index.js.map +1 -1
  34. package/lib/download/core/pngDpi.d.ts +22 -0
  35. package/lib/download/core/pngDpi.d.ts.map +1 -0
  36. package/lib/download/core/pngDpi.js +79 -0
  37. package/lib/download/core/pngDpi.js.map +1 -0
  38. package/lib/download/ui/FigureDownloadPanel.d.ts +13 -0
  39. package/lib/download/ui/FigureDownloadPanel.d.ts.map +1 -1
  40. package/lib/download/ui/FigureDownloadPanel.js +18 -34
  41. package/lib/download/ui/FigureDownloadPanel.js.map +1 -1
  42. package/lib/download/ui/figureDownloadHint.d.ts +5 -0
  43. package/lib/download/ui/figureDownloadHint.d.ts.map +1 -1
  44. package/lib/download/ui/figureDownloadHint.js +8 -0
  45. package/lib/download/ui/figureDownloadHint.js.map +1 -1
  46. package/lib/download/ui/figureDownloadOptions.d.ts +84 -0
  47. package/lib/download/ui/figureDownloadOptions.d.ts.map +1 -0
  48. package/lib/download/ui/figureDownloadOptions.js +2 -0
  49. package/lib/download/ui/figureDownloadOptions.js.map +1 -0
  50. package/lib/download/ui/resolutionChoices.d.ts +27 -0
  51. package/lib/download/ui/resolutionChoices.d.ts.map +1 -0
  52. package/lib/download/ui/resolutionChoices.js +48 -0
  53. package/lib/download/ui/resolutionChoices.js.map +1 -0
  54. package/lib/download/ui/useFigureActions.d.ts +4 -1
  55. package/lib/download/ui/useFigureActions.d.ts.map +1 -1
  56. package/lib/download/ui/useFigureActions.js +17 -8
  57. package/lib/download/ui/useFigureActions.js.map +1 -1
  58. package/lib/download/ui/useFigureDownload.d.ts +2 -55
  59. package/lib/download/ui/useFigureDownload.d.ts.map +1 -1
  60. package/lib/download/ui/useFigureDownload.js +45 -13
  61. package/lib/download/ui/useFigureDownload.js.map +1 -1
  62. package/lib/ecosystem/core/sites.d.ts.map +1 -1
  63. package/lib/ecosystem/core/sites.js +14 -0
  64. package/lib/ecosystem/core/sites.js.map +1 -1
  65. package/lib/ecosystem/core/types.d.ts +1 -1
  66. package/lib/ecosystem/core/types.d.ts.map +1 -1
  67. package/lib/ecosystem/ui/glyphs.d.ts.map +1 -1
  68. package/lib/ecosystem/ui/glyphs.js +3 -0
  69. package/lib/ecosystem/ui/glyphs.js.map +1 -1
  70. package/lib/i18n/core/chromeCatalog.d.ts +1 -1
  71. package/lib/i18n/core/chromeCatalog.d.ts.map +1 -1
  72. package/lib/locales/de.json +30 -1
  73. package/lib/locales/en.json +30 -1
  74. package/lib/locales/es.json +30 -1
  75. package/lib/locales/fr.json +30 -1
  76. package/lib/locales/it.json +30 -1
  77. package/lib/molecule3d/ui/Molecule3DStage.d.ts +4 -33
  78. package/lib/molecule3d/ui/Molecule3DStage.d.ts.map +1 -1
  79. package/lib/molecule3d/ui/Molecule3DStage.js +3 -37
  80. package/lib/molecule3d/ui/Molecule3DStage.js.map +1 -1
  81. package/lib/osiris/core/barGeometry.d.ts +42 -0
  82. package/lib/osiris/core/barGeometry.d.ts.map +1 -0
  83. package/lib/osiris/core/barGeometry.js +46 -0
  84. package/lib/osiris/core/barGeometry.js.map +1 -0
  85. package/lib/osiris/core/computeProperties.d.ts +42 -0
  86. package/lib/osiris/core/computeProperties.d.ts.map +1 -0
  87. package/lib/osiris/core/computeProperties.js +115 -0
  88. package/lib/osiris/core/computeProperties.js.map +1 -0
  89. package/lib/osiris/core/constants.d.ts +70 -0
  90. package/lib/osiris/core/constants.d.ts.map +1 -0
  91. package/lib/osiris/core/constants.js +99 -0
  92. package/lib/osiris/core/constants.js.map +1 -0
  93. package/lib/osiris/core/fitness.d.ts +32 -0
  94. package/lib/osiris/core/fitness.d.ts.map +1 -0
  95. package/lib/osiris/core/fitness.js +48 -0
  96. package/lib/osiris/core/fitness.js.map +1 -0
  97. package/lib/osiris/core/index.d.ts +29 -0
  98. package/lib/osiris/core/index.d.ts.map +1 -0
  99. package/lib/osiris/core/index.js +19 -0
  100. package/lib/osiris/core/index.js.map +1 -0
  101. package/lib/osiris/core/poolSize.d.ts +17 -0
  102. package/lib/osiris/core/poolSize.d.ts.map +1 -0
  103. package/lib/osiris/core/poolSize.js +22 -0
  104. package/lib/osiris/core/poolSize.js.map +1 -0
  105. package/lib/osiris/core/poolTypes.d.ts +140 -0
  106. package/lib/osiris/core/poolTypes.d.ts.map +1 -0
  107. package/lib/osiris/core/poolTypes.js +12 -0
  108. package/lib/osiris/core/poolTypes.js.map +1 -0
  109. package/lib/osiris/core/predictIdCode.d.ts +39 -0
  110. package/lib/osiris/core/predictIdCode.d.ts.map +1 -0
  111. package/lib/osiris/core/predictIdCode.js +54 -0
  112. package/lib/osiris/core/predictIdCode.js.map +1 -0
  113. package/lib/osiris/core/predictProtocol.d.ts +67 -0
  114. package/lib/osiris/core/predictProtocol.d.ts.map +1 -0
  115. package/lib/osiris/core/predictProtocol.js +29 -0
  116. package/lib/osiris/core/predictProtocol.js.map +1 -0
  117. package/lib/osiris/core/predictionPool.d.ts +23 -0
  118. package/lib/osiris/core/predictionPool.d.ts.map +1 -0
  119. package/lib/osiris/core/predictionPool.js +186 -0
  120. package/lib/osiris/core/predictionPool.js.map +1 -0
  121. package/lib/osiris/core/predictionQueue.d.ts +46 -0
  122. package/lib/osiris/core/predictionQueue.d.ts.map +1 -0
  123. package/lib/osiris/core/predictionQueue.js +57 -0
  124. package/lib/osiris/core/predictionQueue.js.map +1 -0
  125. package/lib/osiris/core/predictors.d.ts +62 -0
  126. package/lib/osiris/core/predictors.d.ts.map +1 -0
  127. package/lib/osiris/core/predictors.js +100 -0
  128. package/lib/osiris/core/predictors.js.map +1 -0
  129. package/lib/osiris/core/propertyKeys.d.ts +32 -0
  130. package/lib/osiris/core/propertyKeys.d.ts.map +1 -0
  131. package/lib/osiris/core/propertyKeys.js +44 -0
  132. package/lib/osiris/core/propertyKeys.js.map +1 -0
  133. package/lib/osiris/core/riskAppearance.d.ts +60 -0
  134. package/lib/osiris/core/riskAppearance.d.ts.map +1 -0
  135. package/lib/osiris/core/riskAppearance.js +59 -0
  136. package/lib/osiris/core/riskAppearance.js.map +1 -0
  137. package/lib/osiris/core/riskDetail.d.ts +22 -0
  138. package/lib/osiris/core/riskDetail.d.ts.map +1 -0
  139. package/lib/osiris/core/riskDetail.js +86 -0
  140. package/lib/osiris/core/riskDetail.js.map +1 -0
  141. package/lib/osiris/core/riskDetailRequest.d.ts +31 -0
  142. package/lib/osiris/core/riskDetailRequest.d.ts.map +1 -0
  143. package/lib/osiris/core/riskDetailRequest.js +49 -0
  144. package/lib/osiris/core/riskDetailRequest.js.map +1 -0
  145. package/lib/osiris/core/riskFindings.d.ts +26 -0
  146. package/lib/osiris/core/riskFindings.d.ts.map +1 -0
  147. package/lib/osiris/core/riskFindings.js +79 -0
  148. package/lib/osiris/core/riskFindings.js.map +1 -0
  149. package/lib/osiris/core/runPredictionJob.d.ts +20 -0
  150. package/lib/osiris/core/runPredictionJob.d.ts.map +1 -0
  151. package/lib/osiris/core/runPredictionJob.js +43 -0
  152. package/lib/osiris/core/runPredictionJob.js.map +1 -0
  153. package/lib/osiris/core/scales.d.ts +70 -0
  154. package/lib/osiris/core/scales.d.ts.map +1 -0
  155. package/lib/osiris/core/scales.js +185 -0
  156. package/lib/osiris/core/scales.js.map +1 -0
  157. package/lib/osiris/core/types.d.ts +91 -0
  158. package/lib/osiris/core/types.d.ts.map +1 -0
  159. package/lib/osiris/core/types.js +19 -0
  160. package/lib/osiris/core/types.js.map +1 -0
  161. package/lib/osiris/core/valuation.d.ts +28 -0
  162. package/lib/osiris/core/valuation.d.ts.map +1 -0
  163. package/lib/osiris/core/valuation.js +39 -0
  164. package/lib/osiris/core/valuation.js.map +1 -0
  165. package/lib/osiris/ui/PropertyBar.d.ts +27 -0
  166. package/lib/osiris/ui/PropertyBar.d.ts.map +1 -0
  167. package/lib/osiris/ui/PropertyBar.js +27 -0
  168. package/lib/osiris/ui/PropertyBar.js.map +1 -0
  169. package/lib/osiris/ui/PropertyPanel.d.ts +91 -0
  170. package/lib/osiris/ui/PropertyPanel.d.ts.map +1 -0
  171. package/lib/osiris/ui/PropertyPanel.js +77 -0
  172. package/lib/osiris/ui/PropertyPanel.js.map +1 -0
  173. package/lib/osiris/ui/PropertyRows.d.ts +40 -0
  174. package/lib/osiris/ui/PropertyRows.d.ts.map +1 -0
  175. package/lib/osiris/ui/PropertyRows.js +23 -0
  176. package/lib/osiris/ui/PropertyRows.js.map +1 -0
  177. package/lib/osiris/ui/RiskFindings.d.ts +43 -0
  178. package/lib/osiris/ui/RiskFindings.d.ts.map +1 -0
  179. package/lib/osiris/ui/RiskFindings.js +51 -0
  180. package/lib/osiris/ui/RiskFindings.js.map +1 -0
  181. package/lib/osiris/ui/RiskPanel.d.ts +46 -0
  182. package/lib/osiris/ui/RiskPanel.d.ts.map +1 -0
  183. package/lib/osiris/ui/RiskPanel.js +32 -0
  184. package/lib/osiris/ui/RiskPanel.js.map +1 -0
  185. package/lib/osiris/ui/RiskSquare.d.ts +51 -0
  186. package/lib/osiris/ui/RiskSquare.d.ts.map +1 -0
  187. package/lib/osiris/ui/RiskSquare.js +23 -0
  188. package/lib/osiris/ui/RiskSquare.js.map +1 -0
  189. package/lib/osiris/ui/index.d.ts +15 -0
  190. package/lib/osiris/ui/index.d.ts.map +1 -0
  191. package/lib/osiris/ui/index.js +8 -0
  192. package/lib/osiris/ui/index.js.map +1 -0
  193. package/lib/osiris/ui/usePredictions.d.ts +81 -0
  194. package/lib/osiris/ui/usePredictions.d.ts.map +1 -0
  195. package/lib/osiris/ui/usePredictions.js +102 -0
  196. package/lib/osiris/ui/usePredictions.js.map +1 -0
  197. package/lib/osiris-ui.d.ts +11 -0
  198. package/lib/osiris-ui.d.ts.map +1 -0
  199. package/lib/osiris-ui.js +11 -0
  200. package/lib/osiris-ui.js.map +1 -0
  201. package/lib/osiris.d.ts +17 -0
  202. package/lib/osiris.d.ts.map +1 -0
  203. package/lib/osiris.js +17 -0
  204. package/lib/osiris.js.map +1 -0
  205. package/lib/panel/ui/FilterInput.d.ts.map +1 -1
  206. package/lib/panel/ui/FilterInput.js +3 -1
  207. package/lib/panel/ui/FilterInput.js.map +1 -1
  208. package/lib/panel/ui/SidePanelItem.d.ts +39 -0
  209. package/lib/panel/ui/SidePanelItem.d.ts.map +1 -0
  210. package/lib/panel/ui/SidePanelItem.js +63 -0
  211. package/lib/panel/ui/SidePanelItem.js.map +1 -0
  212. package/lib/panel/ui/SidePanelStack.d.ts +11 -10
  213. package/lib/panel/ui/SidePanelStack.d.ts.map +1 -1
  214. package/lib/panel/ui/SidePanelStack.js +22 -15
  215. package/lib/panel/ui/SidePanelStack.js.map +1 -1
  216. package/lib/panel/ui/SpectrumColorSwatch.d.ts.map +1 -1
  217. package/lib/panel/ui/SpectrumColorSwatch.js +4 -2
  218. package/lib/panel/ui/SpectrumColorSwatch.js.map +1 -1
  219. package/lib/panel/ui/usePanelFolds.d.ts +35 -0
  220. package/lib/panel/ui/usePanelFolds.d.ts.map +1 -0
  221. package/lib/panel/ui/usePanelFolds.js +73 -0
  222. package/lib/panel/ui/usePanelFolds.js.map +1 -0
  223. package/lib/shared/ui/FullscreenStage.d.ts +43 -0
  224. package/lib/shared/ui/FullscreenStage.d.ts.map +1 -0
  225. package/lib/shared/ui/FullscreenStage.js +38 -0
  226. package/lib/shared/ui/FullscreenStage.js.map +1 -0
  227. package/lib/shared/ui/canFillScreen.d.ts +7 -0
  228. package/lib/shared/ui/canFillScreen.d.ts.map +1 -0
  229. package/lib/shared/ui/canFillScreen.js +9 -0
  230. package/lib/shared/ui/canFillScreen.js.map +1 -0
  231. package/lib/shared/ui/index.d.ts +3 -0
  232. package/lib/shared/ui/index.d.ts.map +1 -1
  233. package/lib/shared/ui/index.js +2 -0
  234. package/lib/shared/ui/index.js.map +1 -1
  235. package/lib/split/ui/splitPanes.d.ts +3 -3
  236. package/lib/split/ui/splitPanes.js +1 -1
  237. package/lib/structure/core/structureNotations.d.ts +8 -1
  238. package/lib/structure/core/structureNotations.d.ts.map +1 -1
  239. package/lib/structure/core/structureNotations.js +14 -8
  240. package/lib/structure/core/structureNotations.js.map +1 -1
  241. package/lib/structure/ui/StructureExportPanel.d.ts +8 -0
  242. package/lib/structure/ui/StructureExportPanel.d.ts.map +1 -1
  243. package/lib/structure/ui/StructureExportPanel.js +9 -4
  244. package/lib/structure/ui/StructureExportPanel.js.map +1 -1
  245. package/lib/structure/ui/index.d.ts +1 -0
  246. package/lib/structure/ui/index.d.ts.map +1 -1
  247. package/lib/structure/ui/index.js.map +1 -1
  248. package/package.json +4 -1
  249. package/src/card/core/cardAddress.ts +39 -3
  250. package/src/card/core/cardPageUrl.ts +10 -3
  251. package/src/card/core/index.ts +7 -1
  252. package/src/credits/core/credits.ts +40 -0
  253. package/src/download/core/downloadFigure.ts +26 -1
  254. package/src/download/core/figureDpi.ts +94 -0
  255. package/src/download/core/figurePng.ts +11 -2
  256. package/src/download/core/index.ts +13 -1
  257. package/src/download/core/pngDpi.ts +84 -0
  258. package/src/download/ui/FigureDownloadPanel.tsx +41 -51
  259. package/src/download/ui/figureDownloadHint.ts +13 -0
  260. package/src/download/ui/figureDownloadOptions.ts +85 -0
  261. package/src/download/ui/resolutionChoices.ts +67 -0
  262. package/src/download/ui/useFigureActions.ts +24 -9
  263. package/src/download/ui/useFigureDownload.tsx +57 -71
  264. package/src/ecosystem/core/sites.ts +14 -0
  265. package/src/ecosystem/core/types.ts +2 -1
  266. package/src/ecosystem/ui/glyphs.tsx +20 -0
  267. package/src/locales/de.json +30 -1
  268. package/src/locales/en.json +30 -1
  269. package/src/locales/es.json +30 -1
  270. package/src/locales/fr.json +30 -1
  271. package/src/locales/it.json +30 -1
  272. package/src/molecule3d/ui/Molecule3DStage.tsx +4 -88
  273. package/src/osiris/core/barGeometry.ts +74 -0
  274. package/src/osiris/core/computeProperties.ts +175 -0
  275. package/src/osiris/core/constants.ts +110 -0
  276. package/src/osiris/core/fitness.ts +59 -0
  277. package/src/osiris/core/index.ts +78 -0
  278. package/src/osiris/core/poolSize.ts +24 -0
  279. package/src/osiris/core/poolTypes.ts +140 -0
  280. package/src/osiris/core/predictIdCode.ts +69 -0
  281. package/src/osiris/core/predictProtocol.ts +78 -0
  282. package/src/osiris/core/predictionPool.ts +237 -0
  283. package/src/osiris/core/predictionQueue.ts +89 -0
  284. package/src/osiris/core/predictors.ts +142 -0
  285. package/src/osiris/core/propertyKeys.ts +54 -0
  286. package/src/osiris/core/riskAppearance.ts +86 -0
  287. package/src/osiris/core/riskDetail.ts +120 -0
  288. package/src/osiris/core/riskDetailRequest.ts +64 -0
  289. package/src/osiris/core/riskFindings.ts +92 -0
  290. package/src/osiris/core/runPredictionJob.ts +49 -0
  291. package/src/osiris/core/scales.ts +236 -0
  292. package/src/osiris/core/types.ts +103 -0
  293. package/src/osiris/core/valuation.ts +44 -0
  294. package/src/osiris/ui/PropertyBar.tsx +77 -0
  295. package/src/osiris/ui/PropertyPanel.tsx +227 -0
  296. package/src/osiris/ui/PropertyRows.tsx +92 -0
  297. package/src/osiris/ui/RiskFindings.tsx +137 -0
  298. package/src/osiris/ui/RiskPanel.tsx +81 -0
  299. package/src/osiris/ui/RiskSquare.tsx +108 -0
  300. package/src/osiris/ui/index.ts +17 -0
  301. package/src/osiris/ui/usePredictions.ts +194 -0
  302. package/src/osiris-ui.ts +11 -0
  303. package/src/osiris.ts +17 -0
  304. package/src/panel/ui/FilterInput.tsx +4 -1
  305. package/src/panel/ui/SidePanelItem.tsx +162 -0
  306. package/src/panel/ui/SidePanelStack.tsx +29 -36
  307. package/src/panel/ui/SpectrumColorSwatch.tsx +5 -3
  308. package/src/panel/ui/usePanelFolds.ts +103 -0
  309. package/src/shared/ui/FullscreenStage.tsx +96 -0
  310. package/src/shared/ui/canFillScreen.ts +8 -0
  311. package/src/shared/ui/index.ts +6 -0
  312. package/src/split/ui/splitPanes.tsx +4 -4
  313. package/src/structure/core/structureNotations.ts +25 -8
  314. package/src/structure/ui/StructureExportPanel.tsx +23 -4
  315. package/src/structure/ui/index.ts +4 -0
  316. package/styles/osiris.css +339 -0
@@ -0,0 +1,40 @@
1
+ /**
2
+ * The ten predicted numbers, one row each: a name, a bar and a value.
3
+ *
4
+ * The order is the legacy panel's — cLogP, solubility, molweight, TPSA,
5
+ * drug-likeness, the two hydrogen-bond counts, stereocentres, rotatable bonds,
6
+ * drug score — and it is `PROPERTY_KEYS`, which the comparison table's columns
7
+ * and the plot's default axes also read. A reader who learned the panel reads
8
+ * the table without relearning it.
9
+ *
10
+ * A value the predictor could not answer prints the missing marker and draws no
11
+ * bar. It is never zero: `DrugScoreCalculator` consumes every sentinel and
12
+ * hands back a plausible number, so a bar drawn from one would be a wrong
13
+ * answer with nothing saying it is wrong.
14
+ */
15
+ import type { ReactElement } from 'react';
16
+ import type { PropertyKey } from '../core/propertyKeys.ts';
17
+ import type { OsirisProperties } from '../core/types.ts';
18
+ /** What {@link PropertyRows} needs. */
19
+ export interface PropertyRowsProps {
20
+ /**
21
+ * What was predicted, or `null` while the molecule is still being worked on —
22
+ * in which case every row stands with its name and no value, so nothing moves
23
+ * when the answer arrives.
24
+ * @default null
25
+ */
26
+ properties?: OsirisProperties | null;
27
+ /**
28
+ * The rows to draw. They are drawn in the panel's order whatever order they
29
+ * are given in, so a narrowed panel still reads as the whole one does.
30
+ * @default PROPERTY_KEYS
31
+ */
32
+ keys?: readonly PropertyKey[];
33
+ }
34
+ /**
35
+ * The property rows, all ten unless fewer are asked, in the panel's order.
36
+ * @param props - See {@link PropertyRowsProps}.
37
+ * @returns One row per property.
38
+ */
39
+ export declare function PropertyRows(props: PropertyRowsProps): ReactElement;
40
+ //# sourceMappingURL=PropertyRows.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PropertyRows.d.ts","sourceRoot":"","sources":["../../../src/osiris/ui/PropertyRows.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAK1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAG3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAIzD,uCAAuC;AACvC,MAAM,WAAW,iBAAiB;IAChC;;;;;OAKG;IACH,UAAU,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACrC;;;;OAIG;IACH,IAAI,CAAC,EAAE,SAAS,WAAW,EAAE,CAAC;CAC/B;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,YAAY,CAcnE"}
@@ -0,0 +1,23 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { MISSING_VALUE } from "../../format/core/missing.js";
3
+ import { formatDecimal } from "../../format/core/numbers.js";
4
+ import { barGeometry } from "../core/barGeometry.js";
5
+ import { PROPERTY_KEYS, propertyValue } from "../core/propertyKeys.js";
6
+ import { propertyScale } from "../core/scales.js";
7
+ import { PropertyBar } from "./PropertyBar.js";
8
+ /**
9
+ * The property rows, all ten unless fewer are asked, in the panel's order.
10
+ * @param props - See {@link PropertyRowsProps}.
11
+ * @returns One row per property.
12
+ */
13
+ export function PropertyRows(props) {
14
+ const { properties = null, keys = PROPERTY_KEYS } = props;
15
+ return (_jsx("div", { className: "property-rows", children: PROPERTY_KEYS.filter((key) => keys.includes(key)).map((key) => (_jsx(PropertyRow, { propertyKey: key, value: properties === null ? null : propertyValue(properties, key) }, key))) }));
16
+ }
17
+ function PropertyRow(props) {
18
+ const { propertyKey, value } = props;
19
+ const scale = propertyScale(propertyKey);
20
+ const geometry = barGeometry(propertyKey, value);
21
+ return (_jsxs("div", { className: "property-row", children: [_jsxs("span", { className: "property-row__label", children: [scale.label, scale.unit === '' ? null : (_jsx("span", { className: "property-row__unit", children: scale.unit }))] }), _jsx("span", { className: "property-row__bar", children: geometry === null ? null : _jsx(PropertyBar, { geometry: geometry }) }), _jsx("span", { className: "property-row__value", children: value === null ? MISSING_VALUE : formatDecimal(value, scale.decimals) })] }));
22
+ }
23
+ //# sourceMappingURL=PropertyRows.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PropertyRows.js","sourceRoot":"","sources":["../../../src/osiris/ui/PropertyRows.tsx"],"names":[],"mappings":";AAiBA,OAAO,EAAE,aAAa,EAA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CAC1B,eAAM,SAAS,EAAC,oBAAoB,YAAE,KAAK,CAAC,IAAI,GAAQ,CACzD,IACI,EACP,eAAM,SAAS,EAAC,mBAAmB,YAChC,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAC,WAAW,IAAC,QAAQ,EAAE,QAAQ,GAAI,GAC1D,EACP,eAAM,SAAS,EAAC,qBAAqB,YAClC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC,GACjE,IACH,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Why one risk came back as it did.
3
+ *
4
+ * Two branches of the predictor reach the same red square and mean different
5
+ * things. *This molecule is known to be mutagenic* means the compound's own
6
+ * idCode is in a list derived from RTECS — data on this exact compound, and
7
+ * nothing on the drawing to point at. *High-risk fragments indicating
8
+ * Mutagenicity* means a substructure matched, and that substructure is drawn
9
+ * beside the molecule with its atoms painted on it.
10
+ *
11
+ * Telling them apart is the whole point of opening a square: aspirin, caffeine
12
+ * and paracetamol are all red through the first branch, and highlighting the
13
+ * whole molecule there would call the compound its own toxicophore.
14
+ *
15
+ * A fragment heading is repeated on each of the fragments under it, so it is
16
+ * printed once and the matches follow.
17
+ */
18
+ import type { ReactElement } from 'react';
19
+ import type { RiskDetail, RiskType } from '../core/types.ts';
20
+ /** What {@link RiskFindings} needs. */
21
+ export interface RiskFindingsProps {
22
+ /** Which risk is open. */
23
+ risk: RiskType;
24
+ /** The molecule it was assessed on: the idCode, with its coordinates after a space. */
25
+ structure: string;
26
+ /**
27
+ * What the predictor found, or `null` while it is being worked out.
28
+ * @default null
29
+ */
30
+ detail?: RiskDetail | null;
31
+ /**
32
+ * Why the explanation could not be fetched, or `null`.
33
+ * @default null
34
+ */
35
+ error?: string | null;
36
+ }
37
+ /**
38
+ * The explanation of one risk.
39
+ * @param props - See {@link RiskFindingsProps}.
40
+ * @returns The predictor's own sentences, with every matched fragment drawn.
41
+ */
42
+ export declare function RiskFindings(props: RiskFindingsProps): ReactElement;
43
+ //# sourceMappingURL=RiskFindings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RiskFindings.d.ts","sourceRoot":"","sources":["../../../src/osiris/ui/RiskFindings.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAK1C,OAAO,KAAK,EAAE,UAAU,EAAe,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE1E,uCAAuC;AACvC,MAAM,WAAW,iBAAiB;IAChC,0BAA0B;IAC1B,IAAI,EAAE,QAAQ,CAAC;IACf,uFAAuF;IACvF,SAAS,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,MAAM,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IAC3B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAKD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,YAAY,CAkCnE"}
@@ -0,0 +1,51 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * Why one risk came back as it did.
4
+ *
5
+ * Two branches of the predictor reach the same red square and mean different
6
+ * things. *This molecule is known to be mutagenic* means the compound's own
7
+ * idCode is in a list derived from RTECS — data on this exact compound, and
8
+ * nothing on the drawing to point at. *High-risk fragments indicating
9
+ * Mutagenicity* means a substructure matched, and that substructure is drawn
10
+ * beside the molecule with its atoms painted on it.
11
+ *
12
+ * Telling them apart is the whole point of opening a square: aspirin, caffeine
13
+ * and paracetamol are all red through the first branch, and highlighting the
14
+ * whole molecule there would call the compound its own toxicophore.
15
+ *
16
+ * A fragment heading is repeated on each of the fragments under it, so it is
17
+ * printed once and the matches follow.
18
+ */
19
+ import { Callout, Spinner } from '@blueprintjs/core';
20
+ import { Structure } from "../../structure/ui/Structure.js";
21
+ import { RISK_LABELS } from "../core/constants.js";
22
+ import { KNOWN_MOLECULE_NOTE } from "../core/riskAppearance.js";
23
+ /** How big a drawing in the explanation is, in pixels. */
24
+ const DRAWING = { width: 190, height: 130 };
25
+ /**
26
+ * The explanation of one risk.
27
+ * @param props - See {@link RiskFindingsProps}.
28
+ * @returns The predictor's own sentences, with every matched fragment drawn.
29
+ */
30
+ export function RiskFindings(props) {
31
+ const { risk, structure, detail = null, error = null } = props;
32
+ if (error !== null) {
33
+ return _jsx(Callout, { intent: "warning", children: error });
34
+ }
35
+ if (detail === null) {
36
+ return (_jsxs("div", { className: "osiris-note osiris-note--working", children: [_jsx(Spinner, { size: 14 }), " Working out why ", RISK_LABELS[risk], " came back as it did."] }));
37
+ }
38
+ return (_jsx("div", { className: "risk-findings", children: detail.findings.map((finding, index) => (_jsx(Finding
39
+ // The predictor prints each heading once and each matching fragment
40
+ // once under it, so the pair names the line without an index.
41
+ , { finding: finding, structure: structure, heading: detail.findings[index - 1]?.description === finding.description
42
+ ? null
43
+ : finding.description }, `${finding.kind}:${finding.description}:${finding.idCode ?? ''}`))) }));
44
+ }
45
+ function Finding(props) {
46
+ const { finding, structure, heading } = props;
47
+ return (_jsxs("div", { className: "risk-finding", children: [heading === null ? null : (_jsx("p", { className: "risk-finding__heading", children: heading })), finding.kind === 'known' ? (_jsx("p", { className: "osiris-note", children: KNOWN_MOLECULE_NOTE })) : null, finding.idCode === null ? null : (_jsxs("div", { className: "risk-finding__drawings", children: [_jsxs("figure", { className: "risk-finding__figure", children: [_jsx(Structure, { idCode: finding.idCode, width: DRAWING.width, height: DRAWING.height }), _jsxs("figcaption", { children: [finding.severity === 'medium' ? 'Medium-risk' : 'High-risk', ' ', "fragment"] })] }), _jsxs("figure", { className: "risk-finding__figure", children: [_jsx(Structure, { idCode: structure, width: DRAWING.width, height: DRAWING.height, atomHighlight: [...finding.atoms], bondHighlight: [...finding.bonds] }), _jsx("figcaption", { children: finding.atoms.length === 0
48
+ ? 'Not located on this drawing'
49
+ : 'Where it sits on the molecule' })] })] }))] }));
50
+ }
51
+ //# sourceMappingURL=RiskFindings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RiskFindings.js","sourceRoot":"","sources":["../../../src/osiris/ui/RiskFindings.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAGrD,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAkC,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAqBhE,0DAA0D;AAC1D,MAAM,OAAO,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;AAE5C;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,KAAwB;IACnD,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,EAAE,KAAK,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IAE/D,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QACnB,OAAO,KAAC,OAAO,IAAC,MAAM,EAAC,SAAS,YAAE,KAAK,GAAW,CAAC;IACrD,CAAC;IACD,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;QACpB,OAAO,CAEL,eAAK,SAAS,EAAC,kCAAkC,aAC/C,KAAC,OAAO,IAAC,IAAI,EAAE,EAAE,GAAI,uBAAkB,WAAW,CAAC,IAAI,CAAC,6BAEpD,CACP,CAAC;IACJ,CAAC;IAED,OAAO,CACL,cAAK,SAAS,EAAC,eAAe,YAC3B,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC,CACvC,KAAC,OAAO;QACN,oEA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M,EAAE,SAAS,EACjB,KAAK,EAAE,OAAO,CAAC,KAAK,EACpB,MAAM,EAAE,OAAO,CAAC,MAAM,EACtB,aAAa,EAAE,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,EACjC,aAAa,EAAE,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,GACjC,EACF,+BACG,OAAO,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC;oCACzB,CAAC,CAAC,6BAA6B;oCAC/B,CAAC,CAAC,+BAA+B,GACxB,IACN,IACL,CACP,IACG,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * The four toxicity risks, and the sentence that keeps them honest.
3
+ *
4
+ * OSIRIS assesses mutagenicity, tumorigenicity, irritating effects and
5
+ * reproductive effects, in that order, and answers each with one of three
6
+ * levels — the same three the drug score multiplies by. A red square is very
7
+ * often the known-molecule branch rather than a matched fragment, which is why
8
+ * every assessed square opens its explanation.
9
+ *
10
+ * The caveat under them is the author's own, quoted rather than paraphrased: it
11
+ * is the sentence that stops a red square being read as a verdict, and softening
12
+ * it would be our words over his.
13
+ */
14
+ import type { ReactElement } from 'react';
15
+ import type { RiskLevel, RiskType } from '../core/types.ts';
16
+ /** What {@link RiskPanel} needs. */
17
+ export interface RiskPanelProps {
18
+ /**
19
+ * How the four came back, or `null` when none of them has been assessed.
20
+ * @default null
21
+ */
22
+ risks?: Record<RiskType, RiskLevel> | null;
23
+ /**
24
+ * Whether a prediction is running for the molecule the panel is showing.
25
+ * @default false
26
+ */
27
+ pending?: boolean;
28
+ /**
29
+ * Which risk has its explanation open.
30
+ * @default null
31
+ */
32
+ openRisk?: RiskType | null;
33
+ /**
34
+ * Called with the risk to open, or `null` to close the one that is open.
35
+ * Without it the squares are not clickable.
36
+ * @default undefined
37
+ */
38
+ onOpenRisk?: (risk: RiskType | null) => void;
39
+ }
40
+ /**
41
+ * The four risk squares.
42
+ * @param props - See {@link RiskPanelProps}.
43
+ * @returns The panel, with the caveat under it.
44
+ */
45
+ export declare function RiskPanel(props: RiskPanelProps): ReactElement;
46
+ //# sourceMappingURL=RiskPanel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RiskPanel.d.ts","sourceRoot":"","sources":["../../../src/osiris/ui/RiskPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAG1C,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAK5D,oCAAoC;AACpC,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,GAAG,IAAI,CAAC;IAC3C;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC3B;;;;OAIG;IACH,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,GAAG,IAAI,KAAK,IAAI,CAAC;CAC9C;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,GAAG,YAAY,CA2B7D"}
@@ -0,0 +1,32 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * The four toxicity risks, and the sentence that keeps them honest.
4
+ *
5
+ * OSIRIS assesses mutagenicity, tumorigenicity, irritating effects and
6
+ * reproductive effects, in that order, and answers each with one of three
7
+ * levels — the same three the drug score multiplies by. A red square is very
8
+ * often the known-molecule branch rather than a matched fragment, which is why
9
+ * every assessed square opens its explanation.
10
+ *
11
+ * The caveat under them is the author's own, quoted rather than paraphrased: it
12
+ * is the sentence that stops a red square being read as a verdict, and softening
13
+ * it would be our words over his.
14
+ */
15
+ import { H5 } from '@blueprintjs/core';
16
+ import { RISK_CAVEAT } from "../core/riskAppearance.js";
17
+ import { RISK_TYPES } from "../core/types.js";
18
+ import { RiskSquare } from "./RiskSquare.js";
19
+ /**
20
+ * The four risk squares.
21
+ * @param props - See {@link RiskPanelProps}.
22
+ * @returns The panel, with the caveat under it.
23
+ */
24
+ export function RiskPanel(props) {
25
+ const { risks = null, pending = false, openRisk = null, onOpenRisk } = props;
26
+ return (_jsxs("section", { className: "risk-panel", children: [_jsx(H5, { children: "Predicted toxicity risks" }), _jsx("div", { className: "risk-grid", children: RISK_TYPES.map((risk) => (_jsx(RiskSquare, { risk: risk, level: risks?.[risk], pending: pending, selected: openRisk === risk, onSelect: onOpenRisk === undefined
27
+ ? undefined
28
+ : (chosen) => {
29
+ onOpenRisk(chosen === openRisk ? null : chosen);
30
+ } }, risk))) }), _jsx("p", { className: "osiris-note", children: RISK_CAVEAT })] }));
31
+ }
32
+ //# sourceMappingURL=RiskPanel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RiskPanel.js","sourceRoot":"","sources":["../../../src/osiris/ui/RiskPanel.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAC;AAGvC,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAkB,CAAC;AA2B9C;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,KAAqB;IAC7C,MAAM,EAAE,KAAK,GAAG,IAAI,EAAE,OAAO,GAAG,KAAK,EAAE,QAAQ,GAAG,IAAI,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC;IAE7E,OAAO,CACL,mBAAS,SAAS,EAAC,YAAY,aAC7B,KAAC,EAAE,2CAA8B,EACjC,cAAK,SAAS,EAAC,WAAW,YACvB,UAAU,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACxB,KAAC,UAAU,IAET,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EAAE,CAAC,IAAI,CAAC,EACpB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,KAAK,IAAI,EAC3B,QAAQ,EACN,UAAU,KAAK,SAAS;wBACtB,CAAC,CAAC,SAAS;wBACX,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE;4BACT,UAAU,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;wBAClD,CAAC,IAVF,IAAI,CAYT,CACH,CAAC,GACE,EACN,YAAG,SAAS,EAAC,aAAa,YAAE,WAAW,GAAK,IACpC,CACX,CAAC;AACJ,CAAC"}
@@ -0,0 +1,51 @@
1
+ /**
2
+ * One toxicity risk, as a coloured square with its name beside it.
3
+ *
4
+ * The square is a button whenever the page can explain it, because the
5
+ * explanation is the honest half of the colour: aspirin, caffeine and
6
+ * paracetamol come back red through the known-molecule branch, not through a
7
+ * toxicophore, and only opening it says so.
8
+ *
9
+ * `compact` drops the words and keeps the square, which is what a cell of the
10
+ * comparison table needs; the name and the level stay on the accessible label,
11
+ * so the cell is still readable to a screen reader and on hover.
12
+ */
13
+ import type { ReactElement } from 'react';
14
+ import type { RiskLevel, RiskType } from '../core/types.ts';
15
+ /** What {@link RiskSquare} needs. */
16
+ export interface RiskSquareProps {
17
+ /** Which of the four risks this shows. */
18
+ risk: RiskType;
19
+ /** How it came back, or `undefined` when it has not been assessed. */
20
+ level: RiskLevel | undefined;
21
+ /**
22
+ * Whether a prediction is running for this molecule. It is what tells an
23
+ * unassessed square to say it is working rather than that there is nothing
24
+ * to work on.
25
+ * @default false
26
+ */
27
+ pending?: boolean;
28
+ /**
29
+ * Whether this risk's explanation is the one open.
30
+ * @default false
31
+ */
32
+ selected?: boolean;
33
+ /**
34
+ * Called with the risk when the square is clicked. Without it the square is
35
+ * not a button.
36
+ * @default undefined
37
+ */
38
+ onSelect?: (risk: RiskType) => void;
39
+ /**
40
+ * Draw the square alone, for a cell of a table.
41
+ * @default false
42
+ */
43
+ compact?: boolean;
44
+ }
45
+ /**
46
+ * One risk's square.
47
+ * @param props - See {@link RiskSquareProps}.
48
+ * @returns The square, as a button when the page can explain it.
49
+ */
50
+ export declare function RiskSquare(props: RiskSquareProps): ReactElement;
51
+ //# sourceMappingURL=RiskSquare.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RiskSquare.d.ts","sourceRoot":"","sources":["../../../src/osiris/ui/RiskSquare.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAI1C,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5D,qCAAqC;AACrC,MAAM,WAAW,eAAe;IAC9B,0CAA0C;IAC1C,IAAI,EAAE,QAAQ,CAAC;IACf,sEAAsE;IACtE,KAAK,EAAE,SAAS,GAAG,SAAS,CAAC;IAC7B;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;IACpC;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,YAAY,CAoD/D"}
@@ -0,0 +1,23 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { RISK_LABELS } from "../core/constants.js";
3
+ import { riskAppearance } from "../core/riskAppearance.js";
4
+ /**
5
+ * One risk's square.
6
+ * @param props - See {@link RiskSquareProps}.
7
+ * @returns The square, as a button when the page can explain it.
8
+ */
9
+ export function RiskSquare(props) {
10
+ const { risk, level, pending = false, selected = false, onSelect, compact = false, } = props;
11
+ const { tone, label, explainable } = riskAppearance(level, pending);
12
+ const name = RISK_LABELS[risk];
13
+ const description = `${name}: ${label}`;
14
+ const clickable = onSelect !== undefined && explainable;
15
+ const body = (_jsxs(_Fragment, { children: [_jsx("span", { className: "risk-square__swatch", "data-level": tone }), compact ? null : (_jsxs("span", { className: "risk-square__text", children: [_jsx("span", { className: "risk-square__name", children: name }), _jsx("span", { className: "risk-square__level", children: label })] }))] }));
16
+ if (!clickable) {
17
+ return (_jsx("span", { className: compact ? 'risk-square risk-square--compact' : 'risk-square', title: description, "aria-label": compact ? description : undefined, children: body }));
18
+ }
19
+ return (_jsx("button", { type: "button", className: compact ? 'risk-square risk-square--compact' : 'risk-square', title: `${description} — why?`, "aria-label": compact ? description : undefined, "aria-pressed": selected, onClick: () => {
20
+ onSelect(risk);
21
+ }, children: body }));
22
+ }
23
+ //# sourceMappingURL=RiskSquare.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RiskSquare.js","sourceRoot":"","sources":["../../../src/osiris/ui/RiskSquare.tsx"],"names":[],"mappings":";AAeA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAkC3D;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,KAAsB;IAC/C,MAAM,EACJ,IAAI,EACJ,KAAK,EACL,OAAO,GAAG,KAAK,EACf,QAAQ,GAAG,KAAK,EAChB,QAAQ,EACR,OAAO,GAAG,KAAK,GAChB,GAAG,KAAK,CAAC;IACV,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,cAAc,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IACpE,MAAM,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;IAC/B,MAAM,WAAW,GAAG,GAAG,IAAI,KAAK,KAAK,EAAE,CAAC;IACxC,MAAM,SAAS,GAAG,QAAQ,KAAK,SAAS,IAAI,WAAW,CAAC;IAExD,MAAM,IAAI,GAAG,CACX,8BACE,eAAM,SAAS,EAAC,qBAAqB,gBAAa,IAAI,GAAI,EACzD,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAChB,gBAAM,SAAS,EAAC,mBAAmB,aACjC,eAAM,SAAS,EAAC,mBAAmB,YAAE,IAAI,GAAQ,EACjD,eAAM,SAAS,EAAC,oBAAoB,YAAE,KAAK,GAAQ,IAC9C,CACR,IACA,CACJ,CAAC;IAEF,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,OAAO,CACL,eACE,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,kCAAkC,CAAC,CAAC,CAAC,aAAa,EACvE,KAAK,EAAE,WAAW,gBACN,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,YAE5C,IAAI,GACA,CACR,CAAC;IACJ,CAAC;IAED,OAAO,CACL,iBACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,kCAAkC,CAAC,CAAC,CAAC,aAAa,EACvE,KAAK,EAAE,GAAG,WAAW,SAAS,gBAClB,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,kBAC/B,QAAQ,EACtB,OAAO,EAAE,GAAG,EAAE;YACZ,QAAQ,CAAC,IAAI,CAAC,CAAC;QACjB,CAAC,YAEA,IAAI,GACE,CACV,CAAC;AACJ,CAAC"}
@@ -0,0 +1,15 @@
1
+ export type { PropertyBarProps } from './PropertyBar.tsx';
2
+ export { PropertyBar } from './PropertyBar.tsx';
3
+ export type { PropertyPanelProps } from './PropertyPanel.tsx';
4
+ export { PropertyPanel } from './PropertyPanel.tsx';
5
+ export type { PropertyRowsProps } from './PropertyRows.tsx';
6
+ export { PropertyRows } from './PropertyRows.tsx';
7
+ export type { RiskFindingsProps } from './RiskFindings.tsx';
8
+ export { RiskFindings } from './RiskFindings.tsx';
9
+ export type { RiskPanelProps } from './RiskPanel.tsx';
10
+ export { RiskPanel } from './RiskPanel.tsx';
11
+ export type { RiskSquareProps } from './RiskSquare.tsx';
12
+ export { RiskSquare } from './RiskSquare.tsx';
13
+ export type { UsePredictionsOptions, UsePredictionsResult, } from './usePredictions.ts';
14
+ export { usePredictions } from './usePredictions.ts';
15
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/osiris/ui/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,YAAY,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,YAAY,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,YAAY,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,YAAY,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,YAAY,EACV,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,8 @@
1
+ export { PropertyBar } from "./PropertyBar.js";
2
+ export { PropertyPanel } from "./PropertyPanel.js";
3
+ export { PropertyRows } from "./PropertyRows.js";
4
+ export { RiskFindings } from "./RiskFindings.js";
5
+ export { RiskPanel } from "./RiskPanel.js";
6
+ export { RiskSquare } from "./RiskSquare.js";
7
+ export { usePredictions } from "./usePredictions.js";
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/osiris/ui/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAmB,CAAC;AAEhD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAqB,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAoB,CAAC;AAElD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAoB,CAAC;AAElD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAiB,CAAC;AAE5C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAkB,CAAC;AAK9C,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,81 @@
1
+ /**
2
+ * The prediction pool, handed to a page.
3
+ *
4
+ * The only React in the domain. Results arrive one at a time and are kept in a
5
+ * map the page reads by row key, so a table draws every row immediately and
6
+ * fills each one in as its worker answers — nothing waits for the set.
7
+ *
8
+ * The two maps are created once and mutated, and a counter beside them changes
9
+ * to say so. Building a new map per answer would copy a growing map once per
10
+ * molecule, which on a set of two thousand costs more than the predictions do.
11
+ */
12
+ import type { WorkerLike } from '../../worker/core/messages.ts';
13
+ import type { PredictionInput, PredictionProgress } from '../core/poolTypes.ts';
14
+ import type { ResourceSource } from '../core/predictors.ts';
15
+ import type { OsirisProperties, RiskDetail, RiskType } from '../core/types.ts';
16
+ /** What a page gives the hook. */
17
+ export interface UsePredictionsOptions {
18
+ /**
19
+ * The molecules to predict. One already answered is never asked for again,
20
+ * so a page may pass its whole set on every render — though memoising it
21
+ * saves the filtering pass.
22
+ */
23
+ molecules: readonly PredictionInput[];
24
+ /**
25
+ * The keys of the rows the reader can see, most wanted first. They are
26
+ * answered before the rest.
27
+ * @default undefined — the reading order is kept
28
+ */
29
+ visibleKeys?: readonly string[];
30
+ /**
31
+ * Whether to predict at all. Off while a file is still being read, so the
32
+ * pool is not asked for half a set.
33
+ * @default true
34
+ */
35
+ enabled?: boolean;
36
+ /**
37
+ * Where the workers register OpenChemLib's resources from: the absolute URL
38
+ * of the site's own `openchemlib-resources.json`, resolved on the main thread
39
+ * — a worker has no `document` to read the deployment's mount path off, and
40
+ * a relative address would resolve against its hashed chunk.
41
+ */
42
+ resources: ResourceSource;
43
+ /**
44
+ * Makes one prediction worker: a module worker of the site's own, serving
45
+ * `runPredictionJob` for the requests `isPredictRequest` accepts. It may be
46
+ * a new function on every render — it is read only when a worker is made.
47
+ */
48
+ createWorker: () => WorkerLike;
49
+ /**
50
+ * How many workers to run.
51
+ * @default one fewer than the machine's cores, clamped to 1 to 8
52
+ */
53
+ size?: number;
54
+ }
55
+ /** What the hook gives a page back. */
56
+ export interface UsePredictionsResult {
57
+ /** What each answered row was predicted to be, by row key. */
58
+ results: ReadonlyMap<string, OsirisProperties>;
59
+ /** Why each refused row was refused, by row key. */
60
+ failures: ReadonlyMap<string, string>;
61
+ /** How far the pool has got. */
62
+ progress: PredictionProgress;
63
+ /** Why no prediction can be made at all, or `null`. */
64
+ error: string | null;
65
+ /** Drop everything still queued. */
66
+ cancel: () => void;
67
+ /**
68
+ * Why one risk came back as it did.
69
+ * @param idCode - The molecule, coordinates included or not.
70
+ * @param risk - Which of the four risks to explain.
71
+ * @returns The findings, with the matched atoms and bonds of every fragment.
72
+ */
73
+ riskDetail: (idCode: string, risk: RiskType) => Promise<RiskDetail>;
74
+ }
75
+ /**
76
+ * Predict a set of molecules on a pool of workers, streaming the answers back.
77
+ * @param options - See {@link UsePredictionsOptions}.
78
+ * @returns The answers so far, the progress, and the controls.
79
+ */
80
+ export declare function usePredictions(options: UsePredictionsOptions): UsePredictionsResult;
81
+ //# sourceMappingURL=usePredictions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePredictions.d.ts","sourceRoot":"","sources":["../../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B,GAC7B,oBAAoB,CAmFtB"}
@@ -0,0 +1,102 @@
1
+ /**
2
+ * The prediction pool, handed to a page.
3
+ *
4
+ * The only React in the domain. Results arrive one at a time and are kept in a
5
+ * map the page reads by row key, so a table draws every row immediately and
6
+ * fills each one in as its worker answers — nothing waits for the set.
7
+ *
8
+ * The two maps are created once and mutated, and a counter beside them changes
9
+ * to say so. Building a new map per answer would copy a growing map once per
10
+ * molecule, which on a set of two thousand costs more than the predictions do.
11
+ */
12
+ import { useCallback, useEffect, useRef, useState } from 'react';
13
+ import { createPredictionPool } from "../core/predictionPool.js";
14
+ const IDLE = {
15
+ done: 0,
16
+ total: 0,
17
+ pending: 0,
18
+ running: false,
19
+ };
20
+ /**
21
+ * Predict a set of molecules on a pool of workers, streaming the answers back.
22
+ * @param options - See {@link UsePredictionsOptions}.
23
+ * @returns The answers so far, the progress, and the controls.
24
+ */
25
+ export function usePredictions(options) {
26
+ const { molecules, visibleKeys, enabled = true, size } = options;
27
+ const { resources, createWorker } = options;
28
+ // Read when the pool and its workers are made rather than listed as a
29
+ // dependency: a factory written inline is a new function on every render,
30
+ // and the progress the pool reports causes one.
31
+ const source = useRef({ resources, createWorker });
32
+ useEffect(() => {
33
+ source.current = { resources, createWorker };
34
+ }, [resources, createWorker]);
35
+ const [answered] = useState(() => ({
36
+ results: new Map(),
37
+ failures: new Map(),
38
+ }));
39
+ const [view, setView] = useState({
40
+ progress: IDLE,
41
+ error: null,
42
+ answers: 0,
43
+ });
44
+ const pool = useRef(null);
45
+ const open = useCallback(() => {
46
+ pool.current ??= createPredictionPool({
47
+ resources: source.current.resources,
48
+ createWorker: () => source.current.createWorker(),
49
+ ...(size === undefined ? {} : { size }),
50
+ onResult(outcome) {
51
+ if (outcome.ok)
52
+ answered.results.set(outcome.key, outcome.properties);
53
+ else
54
+ answered.failures.set(outcome.key, outcome.message);
55
+ setView((previous) => ({ ...previous, answers: previous.answers + 1 }));
56
+ },
57
+ onProgress(progress) {
58
+ setView((previous) => ({ ...previous, progress }));
59
+ },
60
+ onUnavailable(message) {
61
+ setView((previous) => ({ ...previous, error: message }));
62
+ },
63
+ });
64
+ return pool.current;
65
+ }, [answered, size]);
66
+ const unavailable = view.error;
67
+ useEffect(() => {
68
+ if (!enabled || unavailable !== null)
69
+ return;
70
+ const waiting = [];
71
+ for (const molecule of molecules) {
72
+ if (answered.results.has(molecule.key))
73
+ continue;
74
+ if (answered.failures.has(molecule.key))
75
+ continue;
76
+ waiting.push(molecule);
77
+ }
78
+ if (waiting.length > 0)
79
+ open().submit(waiting);
80
+ }, [answered, molecules, enabled, open, unavailable]);
81
+ useEffect(() => {
82
+ if (visibleKeys !== undefined)
83
+ pool.current?.prioritize(visibleKeys);
84
+ }, [visibleKeys]);
85
+ useEffect(() => () => {
86
+ pool.current?.terminate();
87
+ pool.current = null;
88
+ }, []);
89
+ const cancel = useCallback(() => {
90
+ pool.current?.cancel();
91
+ }, []);
92
+ const riskDetail = useCallback((idCode, risk) => open().riskDetail(idCode, risk), [open]);
93
+ return {
94
+ results: answered.results,
95
+ failures: answered.failures,
96
+ progress: view.progress,
97
+ error: view.error,
98
+ cancel,
99
+ riskDetail,
100
+ };
101
+ }
102
+ //# sourceMappingURL=usePredictions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePredictions.js","sourceRoot":"","sources":["../../../src/osiris/ui/usePredictions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAQjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAiEjE,MAAM,IAAI,GAAuB;IAC/B,IAAI,EAAE,CAAC;IACP,KAAK,EAAE,CAAC;IACR,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,KAAK;CACf,CAAC;AAaF;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAC5B,OAA8B;IAE9B,MAAM,EAAE,SA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IAAI,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACjD,CAAC,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC;IAEtD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,WAAW,KAAK,SAAS;YAAE,IAAI,CAAC,OAAO,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC;IACvE,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC;IAElB,SAAS,CACP,GAAG,EAAE,CAAC,GAAG,EAAE;QACT,IAAI,CAAC,OAAO,EAAE,SAAS,EAAE,CAAC;QAC1B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;IACtB,CAAC,EACD,EAAE,CACH,CAAC;IAEF,MAAM,MAAM,GAAG,WAAW,CAAC,GAAG,EAAE;QAC9B,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC;IACzB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,UAAU,GAAG,WAAW,CAC5B,CAAC,MAAc,EAAE,IAAc,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,EACnE,CAAC,IAAI,CAAC,CACP,CAAC;IAEF,OAAO;QACL,OAAO,EAAE,QAAQ,CAAC,OAAO;QACzB,QAAQ,EAAE,QAAQ,CAAC,QAAQ;QAC3B,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,MAAM;QACN,UAAU;KACX,CAAC;AACJ,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * The OSIRIS property panel — the four risk squares, the ten bars and the
3
+ * explanation a square opens — and `usePredictions`, which drives a pool of
4
+ * prediction workers from a page.
5
+ *
6
+ * Kept apart from `react-cheminfo/osiris` so the worker that predicts loads no
7
+ * React and no Blueprint; everything the panel draws from is imported from
8
+ * there. The stylesheet is `react-cheminfo/styles/osiris.css`.
9
+ */
10
+ export * from './osiris/ui/index.ts';
11
+ //# sourceMappingURL=osiris-ui.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"osiris-ui.d.ts","sourceRoot":"","sources":["../src/osiris-ui.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * The OSIRIS property panel — the four risk squares, the ten bars and the
3
+ * explanation a square opens — and `usePredictions`, which drives a pool of
4
+ * prediction workers from a page.
5
+ *
6
+ * Kept apart from `react-cheminfo/osiris` so the worker that predicts loads no
7
+ * React and no Blueprint; everything the panel draws from is imported from
8
+ * there. The stylesheet is `react-cheminfo/styles/osiris.css`.
9
+ */
10
+ export * from "./osiris/ui/index.js";
11
+ //# sourceMappingURL=osiris-ui.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"osiris-ui.js","sourceRoot":"","sources":["../src/osiris-ui.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,cAAc,sBAAsB,CAAC"}