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,186 @@
1
+ /**
2
+ * A pool of prediction workers, answering one molecule at a time each.
3
+ *
4
+ * `createWorkerChannel` from `react-cheminfo/core` does the per-worker half —
5
+ * request identifiers so answers match callers whatever order they arrive in,
6
+ * timeouts, cancellation, and the in-process fallback where a page has no
7
+ * `Worker` at all. What it does not do is spread work over several workers, so
8
+ * that is what this adds: one channel per worker, a queue the pool owns, and at
9
+ * most one outstanding job per channel, which is what makes reordering possible
10
+ * at all. A channel asked for everything at once would post everything at once,
11
+ * and the row the reader is looking at would be answered forty-eighth.
12
+ */
13
+ import { errorMessage } from "../../error/core/toError.js";
14
+ import { CancelledRequestError } from "../../worker/core/errors.js";
15
+ import { createWorkerChannel } from "../../worker/core/workerChannel.js";
16
+ import { predictionPoolSize } from "./poolSize.js";
17
+ import { createPredictionQueue } from "./predictionQueue.js";
18
+ import { PredictorsUnavailableError } from "./predictors.js";
19
+ import { requestRiskDetail } from "./riskDetailRequest.js";
20
+ import { runPredictionJob } from "./runPredictionJob.js";
21
+ /**
22
+ * Start a pool of prediction workers.
23
+ *
24
+ * Workers are created lazily by the channels, on their first job, so a page
25
+ * that never predicts anything never loads OpenChemLib.
26
+ * @param options - See {@link PredictionPoolOptions}.
27
+ * @returns The pool.
28
+ */
29
+ export function createPredictionPool(options) {
30
+ const { resources, onResult, onProgress, onUnavailable, createWorker, runInProcess, timeoutMs = 60_000, } = options;
31
+ const size = predictionPoolSize(options.size);
32
+ const run = runInProcess ?? runPredictionJob;
33
+ const slots = [];
34
+ for (let index = 0; index < size; index++) {
35
+ slots.push({
36
+ channel: createWorkerChannel(createWorker, {
37
+ name: `osiris-prediction-${index}`,
38
+ defaultTimeoutMs: timeoutMs,
39
+ runInProcess: run,
40
+ }),
41
+ busy: false,
42
+ });
43
+ }
44
+ const queue = createPredictionQueue();
45
+ const inFlight = new Set();
46
+ let generation = 0;
47
+ let done = 0;
48
+ let total = 0;
49
+ let running = false;
50
+ let terminated = false;
51
+ let unavailable = null;
52
+ function progress() {
53
+ return { done, total, pending: queue.size + inFlight.size, running };
54
+ }
55
+ function report() {
56
+ onProgress?.(progress());
57
+ }
58
+ function pump() {
59
+ if (unavailable !== null)
60
+ return;
61
+ for (const slot of slots) {
62
+ if (slot.busy)
63
+ continue;
64
+ const next = queue.take();
65
+ if (next === undefined)
66
+ break;
67
+ dispatch(slot, next);
68
+ }
69
+ }
70
+ function dispatch(slot, input) {
71
+ const era = generation;
72
+ slot.busy = true;
73
+ inFlight.add(input.key);
74
+ const request = {
75
+ kind: 'properties',
76
+ resources,
77
+ key: input.key,
78
+ idCode: input.idCode,
79
+ ...(input.label === undefined ? {} : { label: input.label }),
80
+ };
81
+ slot.channel.request(request).then((response) => {
82
+ settle(slot, input, era, response, null);
83
+ }, (error) => {
84
+ settle(slot, input, era, null, error);
85
+ });
86
+ }
87
+ function settle(slot, input, era, response, error) {
88
+ slot.busy = false;
89
+ inFlight.delete(input.key);
90
+ // An answer from a cancelled run is not counted and not reported, but the
91
+ // slot it just freed is still dispatched from: a submit made in the same
92
+ // turn as the cancel found every slot busy and queued its molecules here.
93
+ if (era === generation) {
94
+ if (response?.kind === 'unavailable') {
95
+ stop(response.message);
96
+ return;
97
+ }
98
+ if (response?.kind === 'properties') {
99
+ done += 1;
100
+ onResult?.({
101
+ key: input.key,
102
+ ok: true,
103
+ properties: response.properties,
104
+ });
105
+ }
106
+ else if (error !== null && !(error instanceof CancelledRequestError)) {
107
+ done += 1;
108
+ onResult?.({ key: input.key, ok: false, message: errorMessage(error) });
109
+ }
110
+ }
111
+ pump();
112
+ if (queue.size === 0 && inFlight.size === 0)
113
+ running = false;
114
+ report();
115
+ }
116
+ function clear() {
117
+ generation += 1;
118
+ queue.clear();
119
+ inFlight.clear();
120
+ running = false;
121
+ for (const slot of slots)
122
+ slot.channel.cancel();
123
+ }
124
+ function stop(message) {
125
+ clear();
126
+ unavailable = message;
127
+ report();
128
+ onUnavailable?.(message);
129
+ }
130
+ function leastBusy() {
131
+ let best = slots[0];
132
+ for (const slot of slots) {
133
+ if (slot.channel.pendingCount < best.channel.pendingCount)
134
+ best = slot;
135
+ }
136
+ return best;
137
+ }
138
+ return {
139
+ size,
140
+ get progress() {
141
+ return progress();
142
+ },
143
+ submit(molecules) {
144
+ if (unavailable !== null)
145
+ return;
146
+ if (!running && queue.size === 0 && inFlight.size === 0) {
147
+ done = 0;
148
+ total = 0;
149
+ }
150
+ for (const input of molecules) {
151
+ if (inFlight.has(input.key))
152
+ continue;
153
+ if (queue.add(input))
154
+ total += 1;
155
+ }
156
+ running = queue.size > 0 || inFlight.size > 0;
157
+ pump();
158
+ report();
159
+ },
160
+ prioritize(keys) {
161
+ queue.prioritize(keys);
162
+ },
163
+ async riskDetail(idCode, risk) {
164
+ const response = await requestRiskDetail(() => leastBusy().channel, { kind: 'riskDetail', resources, idCode, risk }, () => !terminated && unavailable === null);
165
+ if (response.kind === 'unavailable') {
166
+ stop(response.message);
167
+ throw new PredictorsUnavailableError(response.message);
168
+ }
169
+ if (response.kind !== 'riskDetail') {
170
+ throw new Error('The worker answered something other than a detail.');
171
+ }
172
+ return response.detail;
173
+ },
174
+ cancel() {
175
+ clear();
176
+ report();
177
+ },
178
+ terminate() {
179
+ terminated = true;
180
+ clear();
181
+ for (const slot of slots)
182
+ slot.channel.terminate();
183
+ },
184
+ };
185
+ }
186
+ //# sourceMappingURL=predictionPool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"predictionPool.js","sourceRoot":"","sources":["../../../src/osiris/core/predictionPool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAGzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAQnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB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Ac,EAAE,IAAc;YAC7C,MAAM,QAAQ,GAAG,MAAM,iBAAiB,CACtC,GAAG,EAAE,CAAC,SAAS,EAAE,CAAC,OAAO,EACzB,EAAE,IAAI,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,EAC/C,GAAG,EAAE,CAAC,CAAC,UAAU,IAAI,WAAW,KAAK,IAAI,CAC1C,CAAC;YACF,IAAI,QAAQ,CAAC,IAAI,KAAK,aAAa,EAAE,CAAC;gBACpC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;gBACvB,MAAM,IAAI,0BAA0B,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;YACzD,CAAC;YACD,IAAI,QAAQ,CAAC,IAAI,KAAK,YAAY,EAAE,CAAC;gBACnC,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;YACxE,CAAC;YACD,OAAO,QAAQ,CAAC,MAAM,CAAC;QACzB,CAAC;QAED,MAAM;YACJ,KAAK,EAAE,CAAC;YACR,MAAM,EAAE,CAAC;QACX,CAAC;QAED,SAAS;YACP,UAAU,GAAG,IAAI,CAAC;YAClB,KAAK,EAAE,CAAC;YACR,KAAK,MAAM,IAAI,IAAI,KAAK;gBAAE,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC;QACrD,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * What is still to be predicted, in the order it will be.
3
+ *
4
+ * Arrival order by default, because that is the order the reader read the file
5
+ * in. On top of it sits a short list of keys to answer first — the rows
6
+ * actually on screen — which is re-laid every time the reader scrolls or
7
+ * focuses a row. A key named as wanted that has since been answered or removed
8
+ * is skipped rather than looked up again.
9
+ */
10
+ import type { PredictionInput } from './poolTypes.ts';
11
+ /** The molecules waiting, and which of them to take next. */
12
+ export interface PredictionQueue {
13
+ /** How many are waiting. */
14
+ readonly size: number;
15
+ /**
16
+ * Whether one is waiting.
17
+ * @param key - The row's key.
18
+ * @returns True when it is still queued.
19
+ */
20
+ has: (key: string) => boolean;
21
+ /**
22
+ * Queue one molecule, unless its key is already waiting.
23
+ * @param input - The molecule.
24
+ * @returns True when it was added.
25
+ */
26
+ add: (input: PredictionInput) => boolean;
27
+ /**
28
+ * Take the next molecule to predict: the first still-queued key of the wanted
29
+ * list, else the one that has waited longest.
30
+ * @returns The molecule, or `undefined` when nothing is waiting.
31
+ */
32
+ take: () => PredictionInput | undefined;
33
+ /**
34
+ * Replace the list of keys to answer first.
35
+ * @param keys - The keys, most wanted first.
36
+ */
37
+ prioritize: (keys: readonly string[]) => void;
38
+ /** Forget everything waiting. */
39
+ clear: () => void;
40
+ }
41
+ /**
42
+ * A queue of molecules to predict.
43
+ * @returns The queue, empty.
44
+ */
45
+ export declare function createPredictionQueue(): PredictionQueue;
46
+ //# sourceMappingURL=predictionQueue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"predictionQueue.d.ts","sourceRoot":"","sources":["../../../src/osiris/core/predictionQueue.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,6DAA6D;AAC7D,MAAM,WAAW,eAAe;IAC9B,4BAA4B;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;IAC9B;;;;OAIG;IACH,GAAG,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,OAAO,CAAC;IACzC;;;;OAIG;IACH,IAAI,EAAE,MAAM,eAAe,GAAG,SAAS,CAAC;IACxC;;;OAGG;IACH,UAAU,EAAE,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,KAAK,IAAI,CAAC;IAC9C,iCAAiC;IACjC,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,IAAI,eAAe,CAyCvD"}
@@ -0,0 +1,57 @@
1
+ /**
2
+ * What is still to be predicted, in the order it will be.
3
+ *
4
+ * Arrival order by default, because that is the order the reader read the file
5
+ * in. On top of it sits a short list of keys to answer first — the rows
6
+ * actually on screen — which is re-laid every time the reader scrolls or
7
+ * focuses a row. A key named as wanted that has since been answered or removed
8
+ * is skipped rather than looked up again.
9
+ */
10
+ /**
11
+ * A queue of molecules to predict.
12
+ * @returns The queue, empty.
13
+ */
14
+ export function createPredictionQueue() {
15
+ const waiting = new Map();
16
+ let wanted = [];
17
+ let cursor = 0;
18
+ return {
19
+ get size() {
20
+ return waiting.size;
21
+ },
22
+ has: (key) => waiting.has(key),
23
+ add(input) {
24
+ if (waiting.has(input.key))
25
+ return false;
26
+ waiting.set(input.key, input);
27
+ return true;
28
+ },
29
+ take() {
30
+ while (cursor < wanted.length) {
31
+ const key = wanted[cursor];
32
+ cursor += 1;
33
+ const next = waiting.get(key);
34
+ if (next !== undefined) {
35
+ waiting.delete(key);
36
+ return next;
37
+ }
38
+ }
39
+ const first = waiting.keys().next();
40
+ if (first.done === true)
41
+ return undefined;
42
+ const next = waiting.get(first.value);
43
+ waiting.delete(first.value);
44
+ return next;
45
+ },
46
+ prioritize(keys) {
47
+ wanted = [...keys];
48
+ cursor = 0;
49
+ },
50
+ clear() {
51
+ waiting.clear();
52
+ wanted = [];
53
+ cursor = 0;
54
+ },
55
+ };
56
+ }
57
+ //# sourceMappingURL=predictionQueue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"predictionQueue.js","sourceRoot":"","sources":["../../../src/osiris/core/predictionQueue.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAmCH;;;GAGG;AACH,MAAM,UAAU,qBAAqB;IACnC,MAAM,OAAO,GAAG,IAAI,GAAG,EAA2B,CAAC;IACnD,IAAI,MAAM,GAAsB,EAAE,CAAC;IACnC,IAAI,MAAM,GAAG,CAAC,CAAC;IAEf,OAAO;QACL,IAAI,IAAI;YACN,OAAO,OAAO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AC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,62 @@
1
+ /**
2
+ * OpenChemLib, loaded once and proved to be working before anything is
3
+ * predicted with it.
4
+ *
5
+ * Both predictors throw `static resources must be registered first` until
6
+ * `Resources.register*` has run — but only when *nothing* was registered. If
7
+ * something else was, `new ToxicityPredictor()` constructs happily, prints to
8
+ * the console, and answers every `assessRisk` with `RISK_UNKNOWN`, on which
9
+ * `DrugScoreCalculator` applies no penalty at all. The failure therefore reads
10
+ * on screen as four clean molecules and a healthy score. So the tables are
11
+ * proved here, at start-up, against a molecule whose answer is known: a
12
+ * fragment match that must come back high, and a drug-likeness that must be a
13
+ * real number. Between them the two families of resource file are both covered.
14
+ *
15
+ * The check costs about 160 ms once per worker, most of which is warm-up the
16
+ * first real molecule would have paid anyway — measured, a first prediction is
17
+ * 320 ms cold against 191 ms warm.
18
+ */
19
+ import type * as OCL from 'openchemlib';
20
+ /**
21
+ * Where the resource tables come from: the URL of the site's own
22
+ * `openchemlib-resources.json`, or the parsed file itself.
23
+ *
24
+ * A URL must be absolute. `registerFromUrl` resolves a relative one against
25
+ * `import.meta.url`, which after a build is a hashed chunk under `assets/`, so
26
+ * it answers 404 and every prediction quietly becomes unknown.
27
+ */
28
+ export type ResourceSource = string | Readonly<Record<string, string>>;
29
+ /** OpenChemLib, registered, checked and ready to predict with. */
30
+ export interface OsirisPredictors {
31
+ /** Reads an idCode or a SMILES into a molecule. */
32
+ Molecule: typeof OCL.Molecule;
33
+ /** cLogP, solubility, TPSA and the four counts. */
34
+ MoleculeProperties: typeof OCL.MoleculeProperties;
35
+ /** Finds a toxicophore on a molecule, in the predictor's own match mode. */
36
+ SSSearcher: typeof OCL.SSSearcher;
37
+ /** The four spline terms and the four risk factors. */
38
+ DrugScoreCalculator: typeof OCL.DrugScoreCalculator;
39
+ /** The four risk assessments and their explanations. */
40
+ toxicity: OCL.ToxicityPredictor;
41
+ /** The 5294-fragment drug-likeness table. */
42
+ druglikeness: OCL.DruglikenessPredictor;
43
+ }
44
+ /** The tables did not load, so nothing may be predicted. */
45
+ export declare class PredictorsUnavailableError extends Error {
46
+ name: string;
47
+ }
48
+ /**
49
+ * OpenChemLib with its resources registered and checked.
50
+ *
51
+ * Loaded lazily — the library is 340 kB gzipped and does not tree-shake — and
52
+ * kept, because `Resources.register` replaces the whole map rather than merging
53
+ * into it, so registering twice with different keys silently unregisters the
54
+ * first set.
55
+ * @param source - The resources URL, or the parsed resources themselves.
56
+ * @returns The predictors, proved to answer.
57
+ * @throws {PredictorsUnavailableError} When the resources did not load, or loaded and answer nothing.
58
+ */
59
+ export declare function loadPredictors(source: ResourceSource): Promise<OsirisPredictors>;
60
+ /** Forget the loaded predictors, so the next call registers again. */
61
+ export declare function resetPredictors(): void;
62
+ //# sourceMappingURL=predictors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"predictors.d.ts","sourceRoot":"","sources":["../../../src/osiris/core/predictors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,KAAK,GAAG,MAAM,aAAa,CAAC;AAQxC;;;;;;;GAOG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAEvE,kEAAkE;AAClE,MAAM,WAAW,gBAAgB;IAC/B,mDAAmD;IACnD,QAAQ,EAAE,OAAO,GAAG,CAAC,QAAQ,CAAC;IAC9B,mDAAmD;IACnD,kBAAkB,EAAE,OAAO,GAAG,CAAC,kBAAkB,CAAC;IAClD,4EAA4E;IAC5E,UAAU,EAAE,OAAO,GAAG,CAAC,UAAU,CAAC;IAClC,uDAAuD;IACvD,mBAAmB,EAAE,OAAO,GAAG,CAAC,mBAAmB,CAAC;IACpD,wDAAwD;IACxD,QAAQ,EAAE,GAAG,CAAC,iBAAiB,CAAC;IAChC,6CAA6C;IAC7C,YAAY,EAAE,GAAG,CAAC,qBAAqB,CAAC;CACzC;AAED,4DAA4D;AAC5D,qBAAa,0BAA2B,SAAQ,KAAK;IAC1C,IAAI,SAAgC;CAC9C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,cAAc,GACrB,OAAO,CAAC,gBAAgB,CAAC,CAG3B;AAED,sEAAsE;AACtE,wBAAgB,eAAe,IAAI,IAAI,CAEtC"}
@@ -0,0 +1,100 @@
1
+ /**
2
+ * OpenChemLib, loaded once and proved to be working before anything is
3
+ * predicted with it.
4
+ *
5
+ * Both predictors throw `static resources must be registered first` until
6
+ * `Resources.register*` has run — but only when *nothing* was registered. If
7
+ * something else was, `new ToxicityPredictor()` constructs happily, prints to
8
+ * the console, and answers every `assessRisk` with `RISK_UNKNOWN`, on which
9
+ * `DrugScoreCalculator` applies no penalty at all. The failure therefore reads
10
+ * on screen as four clean molecules and a healthy score. So the tables are
11
+ * proved here, at start-up, against a molecule whose answer is known: a
12
+ * fragment match that must come back high, and a drug-likeness that must be a
13
+ * real number. Between them the two families of resource file are both covered.
14
+ *
15
+ * The check costs about 160 ms once per worker, most of which is warm-up the
16
+ * first real molecule would have paid anyway — measured, a first prediction is
17
+ * 320 ms cold against 191 ms warm.
18
+ */
19
+ import { NO_FRAGMENT_MATCHED, RISK_TYPE_CODES, UNKNOWN_NUMBER, } from "./constants.js";
20
+ /** The tables did not load, so nothing may be predicted. */
21
+ export class PredictorsUnavailableError extends Error {
22
+ name = 'PredictorsUnavailableError';
23
+ }
24
+ /**
25
+ * OpenChemLib with its resources registered and checked.
26
+ *
27
+ * Loaded lazily — the library is 340 kB gzipped and does not tree-shake — and
28
+ * kept, because `Resources.register` replaces the whole map rather than merging
29
+ * into it, so registering twice with different keys silently unregisters the
30
+ * first set.
31
+ * @param source - The resources URL, or the parsed resources themselves.
32
+ * @returns The predictors, proved to answer.
33
+ * @throws {PredictorsUnavailableError} When the resources did not load, or loaded and answer nothing.
34
+ */
35
+ export function loadPredictors(source) {
36
+ if (loaded === null)
37
+ loaded = start(source);
38
+ return loaded;
39
+ }
40
+ /** Forget the loaded predictors, so the next call registers again. */
41
+ export function resetPredictors() {
42
+ loaded = null;
43
+ }
44
+ let loaded = null;
45
+ /**
46
+ * A failed load is not kept: a fetch that failed once may well answer on the
47
+ * next try, and a cached rejection would turn one lost packet into a page that
48
+ * stays broken until it is reloaded.
49
+ * @param source - The resources URL, or the parsed resources themselves.
50
+ * @returns The predictors, proved to answer.
51
+ */
52
+ function start(source) {
53
+ const pending = build(source);
54
+ void pending.catch(() => {
55
+ if (loaded === pending)
56
+ loaded = null;
57
+ });
58
+ return pending;
59
+ }
60
+ /** Benzidine — its mutagenicity comes from a fragment match, not from a list. */
61
+ const PROBE_ID_CODE = 'dg}@@@mIe]e^ftx@H@H@@';
62
+ const UNAVAILABLE = 'The prediction tables did not load, so no risk or drug-likeness can be computed. Reload the page.';
63
+ async function build(source) {
64
+ const ocl = await import('openchemlib');
65
+ try {
66
+ if (typeof source === 'string')
67
+ await ocl.Resources.registerFromUrl(source);
68
+ else
69
+ ocl.Resources.register({ ...source });
70
+ }
71
+ catch {
72
+ throw new PredictorsUnavailableError(UNAVAILABLE);
73
+ }
74
+ let toxicity;
75
+ let druglikeness;
76
+ try {
77
+ toxicity = new ocl.ToxicityPredictor();
78
+ druglikeness = new ocl.DruglikenessPredictor();
79
+ }
80
+ catch {
81
+ throw new PredictorsUnavailableError(UNAVAILABLE);
82
+ }
83
+ const probe = ocl.Molecule.fromIDCode(PROBE_ID_CODE);
84
+ const risk = toxicity.assessRisk(probe, RISK_TYPE_CODES.mutagenic);
85
+ const likeness = druglikeness.assessDruglikeness(probe);
86
+ if (risk !== 3 ||
87
+ likeness === UNKNOWN_NUMBER ||
88
+ likeness === NO_FRAGMENT_MATCHED) {
89
+ throw new PredictorsUnavailableError(UNAVAILABLE);
90
+ }
91
+ return {
92
+ Molecule: ocl.Molecule,
93
+ MoleculeProperties: ocl.MoleculeProperties,
94
+ SSSearcher: ocl.SSSearcher,
95
+ DrugScoreCalculator: ocl.DrugScoreCalculator,
96
+ toxicity,
97
+ druglikeness,
98
+ };
99
+ }
100
+ //# sourceMappingURL=predictors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"predictors.js","sourceRoot":"","sources":["../../../src/osiris/core/predictors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,cAAc,GACf,MAAM,gBAAgB,CAAC;AA4BxB,4DAA4D;AAC5D,MAAM,OAAO,0BAA2B,SAAQ,KAAK;IAC1C,IAAI,GAAG,4BAA4B,CAAC;CAC9C;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,cAAc,CAC5B,MAAsB;IAEtB,IAAI,MAAM,KAAK,IAAI;QAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IAC5C,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,sEAAsE;AACtE,MAAM,UAAU,eAAe;IAC7B,MAAM,GAAG,IAAI,CAAC;AAChB,CAAC;AAED,IAAI,MAAM,GAAqC,IAAI,CAAC;AAEpD;;;;;;GAMG;AACH,SAAS,KAAK,CAAC,MAAsB;IACnC,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IAC9B,KAAK,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE;QACtB,IAAI,MAAM,KAAK,OAAO;YAAE,MAAM,GAAG,IAAI,CAAC;IACxC,CAAC,CAAC,CAAC;IACH,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,iFAAiF;AACjF,MAAM,aAAa,GAAG,uBAAuB,CAAC;AAE9C,MAAM,WAAW,GACf,mGAAmG,CAAC;AAEtG,KAAK,UAAU,KAAK,CAAC,MAAsB;IACzC,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,CAAC;IACxC,IAAI,CAAC;QACH,IAAI,OAAO,MAAM,KAAK,QAAQ;YAAE,MAAM,GAAG,CAAC,SAAS,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;;YACvE,GAAG,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC;IAC7C,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,0BAA0B,CAAC,WAAW,CAAC,CAAC;IACpD,CAAC;IAED,IAAI,QAA+B,CAAC;IACpC,IAAI,YAAuC,CAAC;IAC5C,IAAI,CAAC;QACH,QAAQ,GAAG,IAAI,GAAG,CAAC,iBAAiB,EAAE,CAAC;QACvC,YAAY,GAAG,IAAI,GAAG,CAAC,qBAAqB,EAAE,CAAC;IACjD,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,0BAA0B,CAAC,WAAW,CAAC,CAAC;IACpD,CAAC;IAED,MAAM,KAAK,GAAG,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IACrD,MAAM,IAAI,GAAG,QAAQ,CAAC,UAAU,CAAC,KAAK,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;IACnE,MAAM,QAAQ,GAAG,YAAY,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;IACxD,IACE,IAAI,KAAK,CAAC;QACV,QAAQ,KAAK,cAAc;QAC3B,QAAQ,KAAK,mBAAmB,EAChC,CAAC;QACD,MAAM,IAAI,0BAA0B,CAAC,WAAW,CAAC,CAAC;IACpD,CAAC;IAED,OAAO;QACL,QAAQ,EAAE,GAAG,CAAC,QAAQ;QACtB,kBAAkB,EAAE,GAAG,CAAC,kBAAkB;QAC1C,UAAU,EAAE,GAAG,CAAC,UAAU;QAC1B,mBAAmB,EAAE,GAAG,CAAC,mBAAmB;QAC5C,QAAQ;QACR,YAAY;KACb,CAAC;AACJ,CAAC"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Which of a molecule's predicted numbers the tool shows, and in which order.
3
+ *
4
+ * The order is the legacy panel's, top to bottom, and it is the same order the
5
+ * comparison table's columns and the plot's default axes take: a reader who
6
+ * learned the panel reads the table without relearning it. The keys are the
7
+ * field names of {@link OsirisProperties}, so an address carrying
8
+ * `axes=logP,logS` names the same things the panel does.
9
+ */
10
+ import type { OsirisProperties } from './types.ts';
11
+ /** The ten numbers the tool shows, in the order it shows them. */
12
+ export declare const PROPERTY_KEYS: readonly ["logP", "logS", "molecularWeight", "polarSurfaceArea", "druglikeness", "acceptorCount", "donorCount", "stereoCenterCount", "rotatableBondCount", "drugScore"];
13
+ /** One of the ten displayed properties. */
14
+ export type PropertyKey = (typeof PROPERTY_KEYS)[number];
15
+ /**
16
+ * Whether a string names a displayed property, so an address that carries
17
+ * something else is ignored rather than plotted as a blank axis.
18
+ * @param value - Whatever the address or the reader supplied.
19
+ * @returns True when it is one of the ten.
20
+ */
21
+ export declare function isPropertyKey(value: string): value is PropertyKey;
22
+ /**
23
+ * One property of one molecule.
24
+ *
25
+ * `null` means the predictor could not answer — never zero, and never the
26
+ * library's own sentinel, both of which plot and sort as real values.
27
+ * @param properties - What was predicted for the molecule.
28
+ * @param key - Which of the ten to read.
29
+ * @returns The number, or `null` when it is unknown.
30
+ */
31
+ export declare function propertyValue(properties: OsirisProperties, key: PropertyKey): number | null;
32
+ //# sourceMappingURL=propertyKeys.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"propertyKeys.d.ts","sourceRoot":"","sources":["../../../src/osiris/core/propertyKeys.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD,kEAAkE;AAClE,eAAO,MAAM,aAAa,yKAWhB,CAAC;AAEX,2CAA2C;AAC3C,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzD;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,WAAW,CAEjE;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAC3B,UAAU,EAAE,gBAAgB,EAC5B,GAAG,EAAE,WAAW,GACf,MAAM,GAAG,IAAI,CAEf"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Which of a molecule's predicted numbers the tool shows, and in which order.
3
+ *
4
+ * The order is the legacy panel's, top to bottom, and it is the same order the
5
+ * comparison table's columns and the plot's default axes take: a reader who
6
+ * learned the panel reads the table without relearning it. The keys are the
7
+ * field names of {@link OsirisProperties}, so an address carrying
8
+ * `axes=logP,logS` names the same things the panel does.
9
+ */
10
+ /** The ten numbers the tool shows, in the order it shows them. */
11
+ export const PROPERTY_KEYS = [
12
+ 'logP',
13
+ 'logS',
14
+ 'molecularWeight',
15
+ 'polarSurfaceArea',
16
+ 'druglikeness',
17
+ 'acceptorCount',
18
+ 'donorCount',
19
+ 'stereoCenterCount',
20
+ 'rotatableBondCount',
21
+ 'drugScore',
22
+ ];
23
+ /**
24
+ * Whether a string names a displayed property, so an address that carries
25
+ * something else is ignored rather than plotted as a blank axis.
26
+ * @param value - Whatever the address or the reader supplied.
27
+ * @returns True when it is one of the ten.
28
+ */
29
+ export function isPropertyKey(value) {
30
+ return PROPERTY_KEYS.includes(value);
31
+ }
32
+ /**
33
+ * One property of one molecule.
34
+ *
35
+ * `null` means the predictor could not answer — never zero, and never the
36
+ * library's own sentinel, both of which plot and sort as real values.
37
+ * @param properties - What was predicted for the molecule.
38
+ * @param key - Which of the ten to read.
39
+ * @returns The number, or `null` when it is unknown.
40
+ */
41
+ export function propertyValue(properties, key) {
42
+ return properties[key];
43
+ }
44
+ //# sourceMappingURL=propertyKeys.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"propertyKeys.js","sourceRoot":"","sources":["../../../src/osiris/core/propertyKeys.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,kEAAkE;AAClE,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,MAAM;IACN,MAAM;IACN,iBAAiB;IACjB,kBAAkB;IAClB,cAAc;IACd,eAAe;IACf,YAAY;IACZ,mBAAmB;IACnB,oBAAoB;IACpB,WAAW;CACH,CAAC;AAKX;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAAC,KAAa;IACzC,OAAQ,aAAmC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC9D,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,aAAa,CAC3B,UAA4B,EAC5B,GAAgB;IAEhB,OAAO,UAAU,CAAC,GAAG,CAAC,CAAC;AACzB,CAAC"}
@@ -0,0 +1,60 @@
1
+ /**
2
+ * How one risk reads on screen: the word for it, and the tone its square takes.
3
+ *
4
+ * Three levels, and they are exactly the three `DrugScoreCalculator` multiplies
5
+ * by — no risk ×1, medium ×0.8, high ×0.6 — so the colours say what the score
6
+ * already counted. A fourth tone exists for the state the library calls
7
+ * `RISK_UNKNOWN`, which means its tables did not load: it is grey, never green,
8
+ * because "nothing was assessed" and "nothing was found" are different answers
9
+ * and showing them alike is the one mistake that makes the panel dishonest.
10
+ *
11
+ * A fifth, `pending`, is ours: the prediction costs a fifth of a second and the
12
+ * square is on screen before it comes back.
13
+ */
14
+ import type { RiskLevel } from './types.ts';
15
+ /** What a square is painted with, before the stylesheet turns it into a colour. */
16
+ export type RiskTone = 'pending' | 'unknown' | 'none' | 'low' | 'high';
17
+ /** How one risk is shown. */
18
+ export interface RiskAppearance {
19
+ /** The stylesheet's `data-level`, which picks the square's colour. */
20
+ tone: RiskTone;
21
+ /** What the square says next to the risk's name, e.g. `High risk`. */
22
+ label: string;
23
+ /**
24
+ * Whether the level is worth opening: an explanation exists for an assessed
25
+ * risk and for nothing else.
26
+ */
27
+ explainable: boolean;
28
+ }
29
+ /** What a square says while its molecule is still being predicted. */
30
+ export declare const PENDING_RISK_LABEL = "Predicting\u2026";
31
+ /**
32
+ * What a square says when there is no molecule to predict.
33
+ *
34
+ * The comparison page draws the panel before a row is picked, and a square that
35
+ * said `Predicting…` there would claim work nobody asked for — under a heading
36
+ * inviting the reader to pick a row, which is a plain contradiction.
37
+ */
38
+ export declare const IDLE_RISK_LABEL = "Not predicted yet";
39
+ /**
40
+ * What the predictor's own page says about its alerts, word for word.
41
+ *
42
+ * Quoted rather than paraphrased: it is the sentence that stops a red square
43
+ * being read as a verdict, and rewriting it would put our words over his.
44
+ */
45
+ export declare const RISK_CAVEAT = "Toxicity risk alerts are by no means meant to be a fully reliable toxicity prediction. Nor should be concluded from the absence of risk alerts that a particular substance is completely free of any toxic effect.";
46
+ /**
47
+ * What is said in place of a highlight when the compound's own idCode is on one
48
+ * of the RTECS-derived lists. There is no fragment to point at, and painting the
49
+ * whole molecule would call the compound its own toxicophore.
50
+ */
51
+ export declare const KNOWN_MOLECULE_NOTE = "This exact compound is on the list, so there is no fragment to point at.";
52
+ /**
53
+ * The tone and the word for one risk.
54
+ * @param level - How the risk came back, or `undefined` when there is none yet.
55
+ * @param pending - Whether a prediction is actually running for this molecule.
56
+ * @default false
57
+ * @returns See {@link RiskAppearance}.
58
+ */
59
+ export declare function riskAppearance(level: RiskLevel | undefined, pending?: boolean): RiskAppearance;
60
+ //# sourceMappingURL=riskAppearance.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"riskAppearance.d.ts","sourceRoot":"","sources":["../../../src/osiris/core/riskAppearance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,mFAAmF;AACnF,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,CAAC;AAEvE,6BAA6B;AAC7B,MAAM,WAAW,cAAc;IAC7B,sEAAsE;IACtE,IAAI,EAAE,QAAQ,CAAC;IACf,sEAAsE;IACtE,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,sEAAsE;AACtE,eAAO,MAAM,kBAAkB,qBAAgB,CAAC;AAEhD;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,sBAAsB,CAAC;AAEnD;;;;;GAKG;AACH,eAAO,MAAM,WAAW,uNAC8L,CAAC;AAEvN;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,6EAC4C,CAAC;AAE7E;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,SAAS,GAAG,SAAS,EAC5B,OAAO,UAAQ,GACd,cAAc,CAahB"}