react-cheminfo 0.76.0 → 0.78.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 (389) 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/host/core/connectHost.js +1 -1
  71. package/lib/host/core/connectHost.js.map +1 -1
  72. package/lib/host/core/connectTool.d.ts +103 -0
  73. package/lib/host/core/connectTool.d.ts.map +1 -0
  74. package/lib/host/core/connectTool.js +169 -0
  75. package/lib/host/core/connectTool.js.map +1 -0
  76. package/lib/host/core/hostOutputs.d.ts +16 -3
  77. package/lib/host/core/hostOutputs.d.ts.map +1 -1
  78. package/lib/host/core/hostOutputs.js +38 -4
  79. package/lib/host/core/hostOutputs.js.map +1 -1
  80. package/lib/host/core/index.d.ts +8 -2
  81. package/lib/host/core/index.d.ts.map +1 -1
  82. package/lib/host/core/index.js +4 -1
  83. package/lib/host/core/index.js.map +1 -1
  84. package/lib/host/core/kinds.d.ts +31 -3
  85. package/lib/host/core/kinds.d.ts.map +1 -1
  86. package/lib/host/core/kinds.js +35 -4
  87. package/lib/host/core/kinds.js.map +1 -1
  88. package/lib/host/core/messageValues.d.ts +29 -0
  89. package/lib/host/core/messageValues.d.ts.map +1 -0
  90. package/lib/host/core/messageValues.js +57 -0
  91. package/lib/host/core/messageValues.js.map +1 -0
  92. package/lib/host/core/protocol.d.ts +2 -5
  93. package/lib/host/core/protocol.d.ts.map +1 -1
  94. package/lib/host/core/protocol.js +3 -37
  95. package/lib/host/core/protocol.js.map +1 -1
  96. package/lib/host/core/resultKinds.d.ts +74 -0
  97. package/lib/host/core/resultKinds.d.ts.map +1 -0
  98. package/lib/host/core/resultKinds.js +40 -0
  99. package/lib/host/core/resultKinds.js.map +1 -0
  100. package/lib/host/core/toolMessages.d.ts +24 -0
  101. package/lib/host/core/toolMessages.d.ts.map +1 -0
  102. package/lib/host/core/toolMessages.js +136 -0
  103. package/lib/host/core/toolMessages.js.map +1 -0
  104. package/lib/host/ui/index.d.ts +2 -0
  105. package/lib/host/ui/index.d.ts.map +1 -1
  106. package/lib/host/ui/index.js +1 -0
  107. package/lib/host/ui/index.js.map +1 -1
  108. package/lib/host/ui/useFramedTool.d.ts +74 -0
  109. package/lib/host/ui/useFramedTool.d.ts.map +1 -0
  110. package/lib/host/ui/useFramedTool.js +125 -0
  111. package/lib/host/ui/useFramedTool.js.map +1 -0
  112. package/lib/i18n/core/chromeCatalog.d.ts +1 -1
  113. package/lib/i18n/core/chromeCatalog.d.ts.map +1 -1
  114. package/lib/locales/de.json +30 -1
  115. package/lib/locales/en.json +30 -1
  116. package/lib/locales/es.json +30 -1
  117. package/lib/locales/fr.json +30 -1
  118. package/lib/locales/it.json +30 -1
  119. package/lib/molecule3d/ui/Molecule3DStage.d.ts +4 -33
  120. package/lib/molecule3d/ui/Molecule3DStage.d.ts.map +1 -1
  121. package/lib/molecule3d/ui/Molecule3DStage.js +3 -37
  122. package/lib/molecule3d/ui/Molecule3DStage.js.map +1 -1
  123. package/lib/molecule3d/ui/MoleculeCanvas3D.d.ts.map +1 -1
  124. package/lib/molecule3d/ui/MoleculeCanvas3D.js +10 -2
  125. package/lib/molecule3d/ui/MoleculeCanvas3D.js.map +1 -1
  126. package/lib/molecule3d/ui/exportMoleculeImage.d.ts +10 -0
  127. package/lib/molecule3d/ui/exportMoleculeImage.d.ts.map +1 -1
  128. package/lib/molecule3d/ui/exportMoleculeImage.js +17 -0
  129. package/lib/molecule3d/ui/exportMoleculeImage.js.map +1 -1
  130. package/lib/molecule3d/ui/index.d.ts +1 -1
  131. package/lib/molecule3d/ui/index.d.ts.map +1 -1
  132. package/lib/molecule3d/ui/moleculeViewer3DProps.d.ts +23 -0
  133. package/lib/molecule3d/ui/moleculeViewer3DProps.d.ts.map +1 -1
  134. package/lib/molecule3d/ui/useImageExport.d.ts +3 -0
  135. package/lib/molecule3d/ui/useImageExport.d.ts.map +1 -1
  136. package/lib/molecule3d/ui/useImageExport.js +21 -3
  137. package/lib/molecule3d/ui/useImageExport.js.map +1 -1
  138. package/lib/osiris/core/barGeometry.d.ts +42 -0
  139. package/lib/osiris/core/barGeometry.d.ts.map +1 -0
  140. package/lib/osiris/core/barGeometry.js +46 -0
  141. package/lib/osiris/core/barGeometry.js.map +1 -0
  142. package/lib/osiris/core/computeProperties.d.ts +42 -0
  143. package/lib/osiris/core/computeProperties.d.ts.map +1 -0
  144. package/lib/osiris/core/computeProperties.js +115 -0
  145. package/lib/osiris/core/computeProperties.js.map +1 -0
  146. package/lib/osiris/core/constants.d.ts +70 -0
  147. package/lib/osiris/core/constants.d.ts.map +1 -0
  148. package/lib/osiris/core/constants.js +99 -0
  149. package/lib/osiris/core/constants.js.map +1 -0
  150. package/lib/osiris/core/fitness.d.ts +32 -0
  151. package/lib/osiris/core/fitness.d.ts.map +1 -0
  152. package/lib/osiris/core/fitness.js +48 -0
  153. package/lib/osiris/core/fitness.js.map +1 -0
  154. package/lib/osiris/core/index.d.ts +29 -0
  155. package/lib/osiris/core/index.d.ts.map +1 -0
  156. package/lib/osiris/core/index.js +19 -0
  157. package/lib/osiris/core/index.js.map +1 -0
  158. package/lib/osiris/core/poolSize.d.ts +17 -0
  159. package/lib/osiris/core/poolSize.d.ts.map +1 -0
  160. package/lib/osiris/core/poolSize.js +22 -0
  161. package/lib/osiris/core/poolSize.js.map +1 -0
  162. package/lib/osiris/core/poolTypes.d.ts +140 -0
  163. package/lib/osiris/core/poolTypes.d.ts.map +1 -0
  164. package/lib/osiris/core/poolTypes.js +12 -0
  165. package/lib/osiris/core/poolTypes.js.map +1 -0
  166. package/lib/osiris/core/predictIdCode.d.ts +39 -0
  167. package/lib/osiris/core/predictIdCode.d.ts.map +1 -0
  168. package/lib/osiris/core/predictIdCode.js +54 -0
  169. package/lib/osiris/core/predictIdCode.js.map +1 -0
  170. package/lib/osiris/core/predictProtocol.d.ts +67 -0
  171. package/lib/osiris/core/predictProtocol.d.ts.map +1 -0
  172. package/lib/osiris/core/predictProtocol.js +29 -0
  173. package/lib/osiris/core/predictProtocol.js.map +1 -0
  174. package/lib/osiris/core/predictionPool.d.ts +23 -0
  175. package/lib/osiris/core/predictionPool.d.ts.map +1 -0
  176. package/lib/osiris/core/predictionPool.js +186 -0
  177. package/lib/osiris/core/predictionPool.js.map +1 -0
  178. package/lib/osiris/core/predictionQueue.d.ts +46 -0
  179. package/lib/osiris/core/predictionQueue.d.ts.map +1 -0
  180. package/lib/osiris/core/predictionQueue.js +57 -0
  181. package/lib/osiris/core/predictionQueue.js.map +1 -0
  182. package/lib/osiris/core/predictors.d.ts +62 -0
  183. package/lib/osiris/core/predictors.d.ts.map +1 -0
  184. package/lib/osiris/core/predictors.js +100 -0
  185. package/lib/osiris/core/predictors.js.map +1 -0
  186. package/lib/osiris/core/propertyKeys.d.ts +32 -0
  187. package/lib/osiris/core/propertyKeys.d.ts.map +1 -0
  188. package/lib/osiris/core/propertyKeys.js +44 -0
  189. package/lib/osiris/core/propertyKeys.js.map +1 -0
  190. package/lib/osiris/core/riskAppearance.d.ts +60 -0
  191. package/lib/osiris/core/riskAppearance.d.ts.map +1 -0
  192. package/lib/osiris/core/riskAppearance.js +59 -0
  193. package/lib/osiris/core/riskAppearance.js.map +1 -0
  194. package/lib/osiris/core/riskDetail.d.ts +22 -0
  195. package/lib/osiris/core/riskDetail.d.ts.map +1 -0
  196. package/lib/osiris/core/riskDetail.js +86 -0
  197. package/lib/osiris/core/riskDetail.js.map +1 -0
  198. package/lib/osiris/core/riskDetailRequest.d.ts +31 -0
  199. package/lib/osiris/core/riskDetailRequest.d.ts.map +1 -0
  200. package/lib/osiris/core/riskDetailRequest.js +49 -0
  201. package/lib/osiris/core/riskDetailRequest.js.map +1 -0
  202. package/lib/osiris/core/riskFindings.d.ts +26 -0
  203. package/lib/osiris/core/riskFindings.d.ts.map +1 -0
  204. package/lib/osiris/core/riskFindings.js +79 -0
  205. package/lib/osiris/core/riskFindings.js.map +1 -0
  206. package/lib/osiris/core/runPredictionJob.d.ts +20 -0
  207. package/lib/osiris/core/runPredictionJob.d.ts.map +1 -0
  208. package/lib/osiris/core/runPredictionJob.js +43 -0
  209. package/lib/osiris/core/runPredictionJob.js.map +1 -0
  210. package/lib/osiris/core/scales.d.ts +70 -0
  211. package/lib/osiris/core/scales.d.ts.map +1 -0
  212. package/lib/osiris/core/scales.js +185 -0
  213. package/lib/osiris/core/scales.js.map +1 -0
  214. package/lib/osiris/core/types.d.ts +91 -0
  215. package/lib/osiris/core/types.d.ts.map +1 -0
  216. package/lib/osiris/core/types.js +19 -0
  217. package/lib/osiris/core/types.js.map +1 -0
  218. package/lib/osiris/core/valuation.d.ts +28 -0
  219. package/lib/osiris/core/valuation.d.ts.map +1 -0
  220. package/lib/osiris/core/valuation.js +39 -0
  221. package/lib/osiris/core/valuation.js.map +1 -0
  222. package/lib/osiris/ui/PropertyBar.d.ts +27 -0
  223. package/lib/osiris/ui/PropertyBar.d.ts.map +1 -0
  224. package/lib/osiris/ui/PropertyBar.js +27 -0
  225. package/lib/osiris/ui/PropertyBar.js.map +1 -0
  226. package/lib/osiris/ui/PropertyPanel.d.ts +91 -0
  227. package/lib/osiris/ui/PropertyPanel.d.ts.map +1 -0
  228. package/lib/osiris/ui/PropertyPanel.js +77 -0
  229. package/lib/osiris/ui/PropertyPanel.js.map +1 -0
  230. package/lib/osiris/ui/PropertyRows.d.ts +40 -0
  231. package/lib/osiris/ui/PropertyRows.d.ts.map +1 -0
  232. package/lib/osiris/ui/PropertyRows.js +23 -0
  233. package/lib/osiris/ui/PropertyRows.js.map +1 -0
  234. package/lib/osiris/ui/RiskFindings.d.ts +43 -0
  235. package/lib/osiris/ui/RiskFindings.d.ts.map +1 -0
  236. package/lib/osiris/ui/RiskFindings.js +51 -0
  237. package/lib/osiris/ui/RiskFindings.js.map +1 -0
  238. package/lib/osiris/ui/RiskPanel.d.ts +46 -0
  239. package/lib/osiris/ui/RiskPanel.d.ts.map +1 -0
  240. package/lib/osiris/ui/RiskPanel.js +32 -0
  241. package/lib/osiris/ui/RiskPanel.js.map +1 -0
  242. package/lib/osiris/ui/RiskSquare.d.ts +51 -0
  243. package/lib/osiris/ui/RiskSquare.d.ts.map +1 -0
  244. package/lib/osiris/ui/RiskSquare.js +23 -0
  245. package/lib/osiris/ui/RiskSquare.js.map +1 -0
  246. package/lib/osiris/ui/index.d.ts +15 -0
  247. package/lib/osiris/ui/index.d.ts.map +1 -0
  248. package/lib/osiris/ui/index.js +8 -0
  249. package/lib/osiris/ui/index.js.map +1 -0
  250. package/lib/osiris/ui/usePredictions.d.ts +81 -0
  251. package/lib/osiris/ui/usePredictions.d.ts.map +1 -0
  252. package/lib/osiris/ui/usePredictions.js +102 -0
  253. package/lib/osiris/ui/usePredictions.js.map +1 -0
  254. package/lib/osiris-ui.d.ts +11 -0
  255. package/lib/osiris-ui.d.ts.map +1 -0
  256. package/lib/osiris-ui.js +11 -0
  257. package/lib/osiris-ui.js.map +1 -0
  258. package/lib/osiris.d.ts +17 -0
  259. package/lib/osiris.d.ts.map +1 -0
  260. package/lib/osiris.js +17 -0
  261. package/lib/osiris.js.map +1 -0
  262. package/lib/panel/ui/FilterInput.d.ts.map +1 -1
  263. package/lib/panel/ui/FilterInput.js +3 -1
  264. package/lib/panel/ui/FilterInput.js.map +1 -1
  265. package/lib/panel/ui/SidePanelItem.d.ts +39 -0
  266. package/lib/panel/ui/SidePanelItem.d.ts.map +1 -0
  267. package/lib/panel/ui/SidePanelItem.js +63 -0
  268. package/lib/panel/ui/SidePanelItem.js.map +1 -0
  269. package/lib/panel/ui/SidePanelStack.d.ts +11 -10
  270. package/lib/panel/ui/SidePanelStack.d.ts.map +1 -1
  271. package/lib/panel/ui/SidePanelStack.js +22 -15
  272. package/lib/panel/ui/SidePanelStack.js.map +1 -1
  273. package/lib/panel/ui/SpectrumColorSwatch.d.ts.map +1 -1
  274. package/lib/panel/ui/SpectrumColorSwatch.js +4 -2
  275. package/lib/panel/ui/SpectrumColorSwatch.js.map +1 -1
  276. package/lib/panel/ui/usePanelFolds.d.ts +35 -0
  277. package/lib/panel/ui/usePanelFolds.d.ts.map +1 -0
  278. package/lib/panel/ui/usePanelFolds.js +73 -0
  279. package/lib/panel/ui/usePanelFolds.js.map +1 -0
  280. package/lib/shared/ui/FullscreenStage.d.ts +43 -0
  281. package/lib/shared/ui/FullscreenStage.d.ts.map +1 -0
  282. package/lib/shared/ui/FullscreenStage.js +38 -0
  283. package/lib/shared/ui/FullscreenStage.js.map +1 -0
  284. package/lib/shared/ui/canFillScreen.d.ts +7 -0
  285. package/lib/shared/ui/canFillScreen.d.ts.map +1 -0
  286. package/lib/shared/ui/canFillScreen.js +9 -0
  287. package/lib/shared/ui/canFillScreen.js.map +1 -0
  288. package/lib/shared/ui/index.d.ts +3 -0
  289. package/lib/shared/ui/index.d.ts.map +1 -1
  290. package/lib/shared/ui/index.js +2 -0
  291. package/lib/shared/ui/index.js.map +1 -1
  292. package/lib/split/ui/splitPanes.d.ts +3 -3
  293. package/lib/split/ui/splitPanes.js +1 -1
  294. package/lib/structure/core/structureNotations.d.ts +8 -1
  295. package/lib/structure/core/structureNotations.d.ts.map +1 -1
  296. package/lib/structure/core/structureNotations.js +14 -8
  297. package/lib/structure/core/structureNotations.js.map +1 -1
  298. package/lib/structure/ui/StructureExportPanel.d.ts +8 -0
  299. package/lib/structure/ui/StructureExportPanel.d.ts.map +1 -1
  300. package/lib/structure/ui/StructureExportPanel.js +9 -4
  301. package/lib/structure/ui/StructureExportPanel.js.map +1 -1
  302. package/lib/structure/ui/index.d.ts +1 -0
  303. package/lib/structure/ui/index.d.ts.map +1 -1
  304. package/lib/structure/ui/index.js.map +1 -1
  305. package/package.json +4 -1
  306. package/src/card/core/cardAddress.ts +39 -3
  307. package/src/card/core/cardPageUrl.ts +10 -3
  308. package/src/card/core/index.ts +7 -1
  309. package/src/credits/core/credits.ts +40 -0
  310. package/src/download/core/downloadFigure.ts +26 -1
  311. package/src/download/core/figureDpi.ts +94 -0
  312. package/src/download/core/figurePng.ts +11 -2
  313. package/src/download/core/index.ts +13 -1
  314. package/src/download/core/pngDpi.ts +84 -0
  315. package/src/download/ui/FigureDownloadPanel.tsx +41 -51
  316. package/src/download/ui/figureDownloadHint.ts +13 -0
  317. package/src/download/ui/figureDownloadOptions.ts +85 -0
  318. package/src/download/ui/resolutionChoices.ts +67 -0
  319. package/src/download/ui/useFigureActions.ts +24 -9
  320. package/src/download/ui/useFigureDownload.tsx +57 -71
  321. package/src/ecosystem/core/sites.ts +14 -0
  322. package/src/ecosystem/core/types.ts +2 -1
  323. package/src/ecosystem/ui/glyphs.tsx +20 -0
  324. package/src/host/core/connectHost.ts +1 -1
  325. package/src/host/core/connectTool.ts +285 -0
  326. package/src/host/core/hostOutputs.ts +47 -5
  327. package/src/host/core/index.ts +20 -1
  328. package/src/host/core/kinds.ts +53 -8
  329. package/src/host/core/messageValues.ts +58 -0
  330. package/src/host/core/protocol.ts +5 -37
  331. package/src/host/core/resultKinds.ts +65 -0
  332. package/src/host/core/toolMessages.ts +160 -0
  333. package/src/host/ui/index.ts +6 -0
  334. package/src/host/ui/useFramedTool.ts +213 -0
  335. package/src/locales/de.json +30 -1
  336. package/src/locales/en.json +30 -1
  337. package/src/locales/es.json +30 -1
  338. package/src/locales/fr.json +30 -1
  339. package/src/locales/it.json +30 -1
  340. package/src/molecule3d/ui/Molecule3DStage.tsx +4 -88
  341. package/src/molecule3d/ui/MoleculeCanvas3D.tsx +10 -1
  342. package/src/molecule3d/ui/exportMoleculeImage.ts +22 -0
  343. package/src/molecule3d/ui/index.ts +4 -1
  344. package/src/molecule3d/ui/moleculeViewer3DProps.ts +24 -0
  345. package/src/molecule3d/ui/useImageExport.ts +28 -2
  346. package/src/osiris/core/barGeometry.ts +74 -0
  347. package/src/osiris/core/computeProperties.ts +175 -0
  348. package/src/osiris/core/constants.ts +110 -0
  349. package/src/osiris/core/fitness.ts +59 -0
  350. package/src/osiris/core/index.ts +78 -0
  351. package/src/osiris/core/poolSize.ts +24 -0
  352. package/src/osiris/core/poolTypes.ts +140 -0
  353. package/src/osiris/core/predictIdCode.ts +69 -0
  354. package/src/osiris/core/predictProtocol.ts +78 -0
  355. package/src/osiris/core/predictionPool.ts +237 -0
  356. package/src/osiris/core/predictionQueue.ts +89 -0
  357. package/src/osiris/core/predictors.ts +142 -0
  358. package/src/osiris/core/propertyKeys.ts +54 -0
  359. package/src/osiris/core/riskAppearance.ts +86 -0
  360. package/src/osiris/core/riskDetail.ts +120 -0
  361. package/src/osiris/core/riskDetailRequest.ts +64 -0
  362. package/src/osiris/core/riskFindings.ts +92 -0
  363. package/src/osiris/core/runPredictionJob.ts +49 -0
  364. package/src/osiris/core/scales.ts +236 -0
  365. package/src/osiris/core/types.ts +103 -0
  366. package/src/osiris/core/valuation.ts +44 -0
  367. package/src/osiris/ui/PropertyBar.tsx +77 -0
  368. package/src/osiris/ui/PropertyPanel.tsx +227 -0
  369. package/src/osiris/ui/PropertyRows.tsx +92 -0
  370. package/src/osiris/ui/RiskFindings.tsx +137 -0
  371. package/src/osiris/ui/RiskPanel.tsx +81 -0
  372. package/src/osiris/ui/RiskSquare.tsx +108 -0
  373. package/src/osiris/ui/index.ts +17 -0
  374. package/src/osiris/ui/usePredictions.ts +194 -0
  375. package/src/osiris-ui.ts +11 -0
  376. package/src/osiris.ts +17 -0
  377. package/src/panel/ui/FilterInput.tsx +4 -1
  378. package/src/panel/ui/SidePanelItem.tsx +162 -0
  379. package/src/panel/ui/SidePanelStack.tsx +29 -36
  380. package/src/panel/ui/SpectrumColorSwatch.tsx +5 -3
  381. package/src/panel/ui/usePanelFolds.ts +103 -0
  382. package/src/shared/ui/FullscreenStage.tsx +96 -0
  383. package/src/shared/ui/canFillScreen.ts +8 -0
  384. package/src/shared/ui/index.ts +6 -0
  385. package/src/split/ui/splitPanes.tsx +4 -4
  386. package/src/structure/core/structureNotations.ts +25 -8
  387. package/src/structure/ui/StructureExportPanel.tsx +23 -4
  388. package/src/structure/ui/index.ts +4 -0
  389. package/styles/osiris.css +339 -0
@@ -1,5 +1,7 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Accordion, AccordionProvider, Button } from 'react-science/ui';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Accordion, AccordionProvider } from 'react-science/ui';
3
+ import { SidePanelItem } from "./SidePanelItem.js";
4
+ import { usePanelFolds } from "./usePanelFolds.js";
3
5
  /**
4
6
  * The panels that are open, stacked one under the other down the side.
5
7
  *
@@ -12,29 +14,34 @@ import { Accordion, AccordionProvider, Button } from 'react-science/ui';
12
14
  * They are drawn in the order the rail stacks their icons rather than the order
13
15
  * they were switched on, so a panel always comes back where it was.
14
16
  *
15
- * The header carries the shell's own two gestures and nothing about what the
16
- * panel holds: the chevron that folds it away and the cross that closes it.
17
- * What a panel switches on and off is a toolbar at the top of its own body, so
18
- * it travels with the panel when it is folded, reordered or lent to another
19
- * editor, and every header in every editor reads the same — which is the reason
20
- * this is one component rather than one per editor.
17
+ * The header carries the shell's own gestures and nothing about what the panel
18
+ * holds: focus, which folds every other panel away and unfolds them again;
19
+ * filling the screen with the panel, where the browser can; the chevron that
20
+ * folds it away; and the cross that closes it. What a panel switches on and off
21
+ * is a toolbar at the top of its own body, so it travels with the panel when it
22
+ * is folded, reordered or lent to another editor, and every header in every
23
+ * editor reads the same — which is the reason this is one component rather
24
+ * than one per editor.
21
25
  *
22
26
  * The chevron is there because nothing else says which panels are folded. The
23
27
  * accordion draws every header identically and hides only the body, so a side
24
28
  * of four closed panels and a side of four open ones differ by white space, and
25
29
  * a reader looking for a panel that is already open reaches for its icon and
26
- * closes it. It is a real button rather than a glyph because the header's own
27
- * click never reaches the toolbar — clicks there are stopped so the close cross
28
- * does not also fold the panel — so a chevron that did nothing when pressed
29
- * would be an affordance that lies.
30
+ * closes it. Focus is a button as well as a shift-click because a modifier on a
31
+ * header is a gesture nobody finds, and it undoes itself, which a shift-click
32
+ * does not.
30
33
  * @param props - Component props.
31
34
  * @returns The stack.
32
35
  */
33
36
  export function SidePanelStack(props) {
34
37
  const { panels, openPanelIds, onClose, children } = props;
35
38
  const open = panels.filter((panel) => openPanelIds.includes(panel.id));
36
- return (_jsx(AccordionProvider, { children: _jsx(Accordion, { children: open.map((panel) => (_jsx(Accordion.Item, { id: panel.id, title: panel.title, defaultOpen: true, renderToolbar: ({ isOpen, controls }) => (_jsxs(_Fragment, { children: [_jsx(Button, { variant: "minimal", icon: isOpen ? 'chevron-down' : 'chevron-right', "data-panel-open": isOpen, "aria-expanded": isOpen, "aria-label": `${isOpen ? 'Fold' : 'Unfold'} the ${panel.title.toLowerCase()} panel`, tooltipProps: {
37
- content: isOpen ? 'Fold this panel away' : 'Unfold it',
38
- }, onClick: () => controls.toggle() }), _jsx(Button, { variant: "minimal", icon: "cross", tooltipProps: { content: 'Close this panel' }, "aria-label": `Close the ${panel.title.toLowerCase()} panel`, onClick: () => onClose(panel.id) })] })), children: children(panel) }, panel.id))) }) }));
39
+ const folds = usePanelFolds(open.map((panel) => panel.id));
40
+ return (_jsx(AccordionProvider, { children: _jsx(Accordion, { children: open.map((panel) => (_jsx(SidePanelItem, { id: panel.id, title: panel.title, isOpen: folds.isOpen(panel.id), onOpenChange: (isOpen) => folds.setOpen(panel.id, isOpen), focus: open.length > 1
41
+ ? {
42
+ active: folds.focused === panel.id,
43
+ toggle: () => folds.toggleFocus(panel.id),
44
+ }
45
+ : undefined, onClose: () => onClose(panel.id), children: children(panel) }, panel.id))) }) }));
39
46
  }
40
47
  //# sourceMappingURL=SidePanelStack.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SidePanelStack.js","sourceRoot":"","sources":["../../../src/panel/ui/SidePanelStack.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAgCxE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,UAAU,cAAc,CAC5B,KAAkC;IAElC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAC1D,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EA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1C;oBACH,CAAC,CAAC,SAAS,EAEf,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,YAE/B,QAAQ,CAAC,KAAK,CAAC,IAfX,KAAK,CAAC,EAAE,CAgBC,CACjB,CAAC,GACQ,GACM,CACrB,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"SpectrumColorSwatch.d.ts","sourceRoot":"","sources":["../../../src/panel/ui/SpectrumColorSwatch.tsx"],"names":[],"mappings":"AAQA,MAAM,WAAW,wBAAwB;IACvC,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,wEAAwE;IACxE,IAAI,EAAE,MAAM,CAAC;IACb,8CAA8C;IAC9C,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,+BA8ClE"}
1
+ {"version":3,"file":"SpectrumColorSwatch.d.ts","sourceRoot":"","sources":["../../../src/panel/ui/SpectrumColorSwatch.tsx"],"names":[],"mappings":"AASA,MAAM,WAAW,wBAAwB;IACvC,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,wEAAwE;IACxE,IAAI,EAAE,MAAM,CAAC;IACb,8CAA8C;IAC9C,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,+BA+ClE"}
@@ -2,6 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { PopoverNext } from '@blueprintjs/core';
3
3
  import { useState } from 'react';
4
4
  import { EXTRA_SPECTRUM_COLORS, SPECTRUM_COLORS, } from "../../chart/core/spectrumColor.js";
5
+ import { useChromeT } from "../../i18n/ui/useT.js";
5
6
  /**
6
7
  * The chip that says what colour a spectrum is drawn in, and changes it.
7
8
  *
@@ -28,8 +29,9 @@ import { EXTRA_SPECTRUM_COLORS, SPECTRUM_COLORS, } from "../../chart/core/spectr
28
29
  export function SpectrumColorSwatch(props) {
29
30
  const { color, name, onPick } = props;
30
31
  const [isOpen, setIsOpen] = useState(false);
32
+ const t = useChromeT();
31
33
  function offer(offered) {
32
- return (_jsx("button", { type: "button", title: offered, "aria-label": `Draw ${name} in ${offered}`, style: {
34
+ return (_jsx("button", { type: "button", title: offered, "aria-label": t('panel.drawIn', { name, color: offered }), style: {
33
35
  ...(offered === color ? activeSwatchStyle : swatchStyle),
34
36
  background: offered,
35
37
  }, onClick: () => {
@@ -43,7 +45,7 @@ export function SpectrumColorSwatch(props) {
43
45
  , {
44
46
  // A handful of chips need no arrow pointing back at a chip of the same
45
47
  // size.
46
- arrow: false, isOpen: isOpen, placement: "bottom-start", onInteraction: setIsOpen, content: _jsxs("div", { style: paletteStyle, children: [_jsx("div", { style: paletteRowStyle, children: SPECTRUM_COLORS.map(offer) }), _jsx("div", { style: paletteRowStyle, children: EXTRA_SPECTRUM_COLORS.map(offer) })] }), children: _jsx("button", { type: "button", title: "Draw this spectrum in another colour", "aria-label": `Colour of ${name}`, style: { ...swatchStyle, background: color } }) }));
48
+ arrow: false, isOpen: isOpen, placement: "bottom-start", onInteraction: setIsOpen, content: _jsxs("div", { style: paletteStyle, children: [_jsx("div", { style: paletteRowStyle, children: SPECTRUM_COLORS.map(offer) }), _jsx("div", { style: paletteRowStyle, children: EXTRA_SPECTRUM_COLORS.map(offer) })] }), children: _jsx("button", { type: "button", title: t('panel.changeColour'), "aria-label": t('panel.colourOf', { name }), style: { ...swatchStyle, background: color } }) }));
47
49
  }
48
50
  /**
49
51
  * A round chip rather than a square one: it is the mark the chart's own
@@ -1 +1 @@
1
- {"version":3,"file":"SpectrumColorSwatch.js","sourceRoot":"","sources":["../../../src/panel/ui/SpectrumColorSwatch.tsx"],"names":[],"m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AE;IACV,OAAO,EAAE,CAAC;IACV,YAAY,EAAE,KAAK;IACnB,MAAM,EAAE,iCAAiC;IACzC,MAAM,EAAE,SAAS;CACT,CAAC;AAEX,MAAM,iBAAiB,GAAG;IACxB,GAAG,WAAW;IACd,MAAM,EAAE,yBAAyB;CACzB,CAAC;AAEX,MAAM,YAAY,GAAG;IACnB,OAAO,EAAE,MAAM;IACf,aAAa,EAAE,QAAQ;IACvB,GAAG,EAAE,CAAC;IACN,OAAO,EAAE,CAAC;CACF,CAAC;AAEX,MAAM,eAAe,GAAG;IACtB,OAAO,EAAE,MAAM;IACf,GAAG,EAAE,CAAC;CACE,CAAC"}
@@ -0,0 +1,35 @@
1
+ /** Which panels of a stack are folded, and the gestures that change that. */
2
+ export interface PanelFolds {
3
+ /**
4
+ * Whether a panel shows its body.
5
+ * @param id - The panel.
6
+ * @returns False while it is folded away.
7
+ */
8
+ isOpen: (id: string) => boolean;
9
+ /**
10
+ * Fold a panel away, or unfold it.
11
+ * @param id - The panel.
12
+ * @param open - Whether it shows its body.
13
+ */
14
+ setOpen: (id: string, open: boolean) => void;
15
+ /** The one panel left unfolded among several, or null. */
16
+ focused: string | null;
17
+ /**
18
+ * Focus on a panel: unfold it and fold every other one, or, when it is
19
+ * already in focus, unfold them all again.
20
+ * @param id - The panel.
21
+ */
22
+ toggleFocus: (id: string) => void;
23
+ }
24
+ /**
25
+ * The folds of a stack of panels, kept by the stack rather than by each panel
26
+ * so that one panel can be focused — every other one folded — and the focus
27
+ * undone.
28
+ *
29
+ * A panel closed while folded comes back unfolded when it is opened again: a
30
+ * reader reopening a panel from the rail is asking to see it.
31
+ * @param openIds - The panels in the stack, in the order they are drawn.
32
+ * @returns The folds.
33
+ */
34
+ export declare function usePanelFolds(openIds: readonly string[]): PanelFolds;
35
+ //# sourceMappingURL=usePanelFolds.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePanelFolds.d.ts","sourceRoot":"","sources":["../../../src/panel/ui/usePanelFolds.ts"],"names":[],"mappings":"AAEA,6EAA6E;AAC7E,MAAM,WAAW,UAAU;IACzB;;;;OAIG;IACH,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC;IAChC;;;;OAIG;IACH,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,0DAA0D;IAC1D,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB;;;;OAIG;IACH,WAAW,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAID;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,UAAU,CA0BpE"}
@@ -0,0 +1,73 @@
1
+ import { useState } from 'react';
2
+ const NOTHING_FOLDED = new Set();
3
+ /**
4
+ * The folds of a stack of panels, kept by the stack rather than by each panel
5
+ * so that one panel can be focused — every other one folded — and the focus
6
+ * undone.
7
+ *
8
+ * A panel closed while folded comes back unfolded when it is opened again: a
9
+ * reader reopening a panel from the rail is asking to see it.
10
+ * @param openIds - The panels in the stack, in the order they are drawn.
11
+ * @returns The folds.
12
+ */
13
+ export function usePanelFolds(openIds) {
14
+ const [folded, setFolded] = useState(NOTHING_FOLDED);
15
+ const kept = keepOnly(folded, openIds);
16
+ if (kept !== folded)
17
+ setFolded(kept);
18
+ return {
19
+ isOpen: (id) => !kept.has(id),
20
+ setOpen: (id, open) => {
21
+ setFolded((previous) => {
22
+ if (previous.has(id) !== open)
23
+ return previous;
24
+ const next = new Set(previous);
25
+ if (open)
26
+ next.delete(id);
27
+ else
28
+ next.add(id);
29
+ return next;
30
+ });
31
+ },
32
+ focused: focusedPanel(openIds, kept),
33
+ toggleFocus: (id) => {
34
+ setFolded(focusedPanel(openIds, kept) === id
35
+ ? NOTHING_FOLDED
36
+ : new Set(openIds.filter((other) => other !== id)));
37
+ },
38
+ };
39
+ }
40
+ /**
41
+ * The folds of the panels still in the stack.
42
+ * @param folded - The panels folded.
43
+ * @param openIds - The panels in the stack.
44
+ * @returns `folded` itself when every one of them is still in the stack.
45
+ */
46
+ function keepOnly(folded, openIds) {
47
+ for (const id of folded) {
48
+ if (!openIds.includes(id)) {
49
+ return new Set(openIds.filter((open) => folded.has(open)));
50
+ }
51
+ }
52
+ return folded;
53
+ }
54
+ /**
55
+ * The panel in focus: the only one unfolded, when there is another to fold.
56
+ * @param openIds - The panels in the stack.
57
+ * @param folded - The panels folded.
58
+ * @returns The panel, or null.
59
+ */
60
+ function focusedPanel(openIds, folded) {
61
+ if (openIds.length < 2)
62
+ return null;
63
+ let unfolded = null;
64
+ for (const id of openIds) {
65
+ if (folded.has(id))
66
+ continue;
67
+ if (unfolded !== null)
68
+ return null;
69
+ unfolded = id;
70
+ }
71
+ return unfolded;
72
+ }
73
+ //# sourceMappingURL=usePanelFolds.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePanelFolds.js","sourceRoot":"","sources":["../../../src/panel/ui/usePanelFolds.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AA0BjC,MAAM,cAAc,GAAwB,IAAI,GAAG,EAAE,CAAC;AAEtD;;;;;;;;;GASG;AACH,MAAM,UAAU,aAAa,CAAC,OAA0B;IACtD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,cAAc,CAAC,CAAC;IAErD,MAAM,IAAI,GAAG,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC,IAAI,IAAI,KAAK,MAAM;QAAE,SAAS,CAAC,IAAI,CAAC,CAAC;IAErC,OAAO;QACL,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QAC7B,OAAO,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,EAAE;YACpB,SAAS,CAAC,CAAC,QAAQ,EAAE,EAAE;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,KAAK,MAAM,EAAE,IAAI,OAAO,EAAE,CAAC;QACzB,IAAI,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC;YAAE,SAAS;QAC7B,IAAI,QAAQ,KAAK,IAAI;YAAE,OAAO,IAAI,CAAC;QACnC,QAAQ,GAAG,EAAE,CAAC;IAChB,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * A box that can fill the screen: the 3D canvas and its toolbars, a side panel.
3
+ *
4
+ * A box filling the screen hides everything outside it, and the popovers and
5
+ * tooltips of what it holds are portalled to `document.body`: while the box
6
+ * fills the screen they are portalled into it instead, the way react-science's
7
+ * `RootLayout` keeps its own menus visible. Otherwise the portal options of the
8
+ * page around the box are passed through untouched.
9
+ */
10
+ import type { CSSProperties, ReactElement, ReactNode } from 'react';
11
+ /** Whether a box fills the screen, and how to change that. */
12
+ export interface StageFullscreen {
13
+ /** Whether the box fills the screen. */
14
+ active: boolean;
15
+ /** Fill the screen, or leave it. */
16
+ toggle: () => void;
17
+ }
18
+ /** Props of {@link FullscreenStage}. */
19
+ export interface FullscreenStageProps {
20
+ /**
21
+ * Style of the box, or a function handed whether the box fills the screen,
22
+ * for a box shaped differently while it does.
23
+ */
24
+ style: CSSProperties | ((fillsScreen: boolean) => CSSProperties);
25
+ /**
26
+ * Called with the box once it is mounted, and with `null` once it is gone.
27
+ * It must keep its identity across renders.
28
+ * @default undefined
29
+ */
30
+ onStage?: (element: HTMLDivElement | null) => void;
31
+ /**
32
+ * What is drawn in the box, handed whether it fills the screen and the
33
+ * toggle, or `undefined` where the browser cannot fill the screen.
34
+ */
35
+ children: (fullscreen: StageFullscreen | undefined) => ReactNode;
36
+ }
37
+ /**
38
+ * The box, able to fill the screen.
39
+ * @param props - See {@link FullscreenStageProps}.
40
+ * @returns The box.
41
+ */
42
+ export declare function FullscreenStage(props: FullscreenStageProps): ReactElement;
43
+ //# sourceMappingURL=FullscreenStage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FullscreenStage.d.ts","sourceRoot":"","sources":["../../../src/shared/ui/FullscreenStage.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMpE,8DAA8D;AAC9D,MAAM,WAAW,eAAe;IAC9B,wCAAwC;IACxC,MAAM,EAAE,OAAO,CAAC;IAChB,oCAAoC;IACpC,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,wCAAwC;AACxC,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,KAAK,EAAE,aAAa,GAAG,CAAC,CAAC,WAAW,EAAE,OAAO,KAAK,aAAa,CAAC,CAAC;IACjE;;;;OAIG;IACH,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI,KAAK,IAAI,CAAC;IACnD;;;OAGG;IACH,QAAQ,EAAE,CAAC,UAAU,EAAE,eAAe,GAAG,SAAS,KAAK,SAAS,CAAC;CAClE;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,GAAG,YAAY,CAMzE"}
@@ -0,0 +1,38 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /**
3
+ * A box that can fill the screen: the 3D canvas and its toolbars, a side panel.
4
+ *
5
+ * A box filling the screen hides everything outside it, and the popovers and
6
+ * tooltips of what it holds are portalled to `document.body`: while the box
7
+ * fills the screen they are portalled into it instead, the way react-science's
8
+ * `RootLayout` keeps its own menus visible. Otherwise the portal options of the
9
+ * page around the box are passed through untouched.
10
+ */
11
+ import { PortalContext, PortalProvider } from '@blueprintjs/core';
12
+ import { useCallback, useContext, useState } from 'react';
13
+ import { FullScreenProvider, useFullscreen } from 'react-science/ui';
14
+ import { canFillScreen } from "./canFillScreen.js";
15
+ /**
16
+ * The box, able to fill the screen.
17
+ * @param props - See {@link FullscreenStageProps}.
18
+ * @returns The box.
19
+ */
20
+ export function FullscreenStage(props) {
21
+ return (_jsx(FullScreenProvider, { children: (fullscreenRef) => _jsx(Stage, { ...props, fullscreenRef: fullscreenRef }) }));
22
+ }
23
+ function Stage(props) {
24
+ const { style, onStage, children, fullscreenRef } = props;
25
+ const { isFullScreen, toggle } = useFullscreen();
26
+ const portal = useContext(PortalContext);
27
+ const [canFill] = useState(canFillScreen);
28
+ const [stage, setStage] = useState(null);
29
+ const stageRef = useCallback((element) => {
30
+ fullscreenRef.current = element;
31
+ setStage(element);
32
+ onStage?.(element);
33
+ }, [fullscreenRef, onStage]);
34
+ // The provider is always there, so entering full screen changes a value
35
+ // rather than the tree, and what the box holds is never mounted again.
36
+ return (_jsx("div", { ref: stageRef, style: typeof style === 'function' ? style(isFullScreen) : style, children: _jsx(PortalProvider, { portalClassName: portal.portalClassName, portalContainer: isFullScreen && stage !== null ? stage : portal.portalContainer, children: children(canFill ? { active: isFullScreen, toggle } : undefined) }) }));
37
+ }
38
+ //# sourceMappingURL=FullscreenStage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FullscreenStage.js","sourceRoot":"","sources":["../../../src/shared/ui/FullscreenStage.tsx"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAElE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAErE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AA8BnD;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,KAA2B;IACzD,OAAO,CACL,KAAC,kBAAkB,cAChB,CAAC,aAAa,EAAE,EAAE,CAAC,KAAC,KAAK,OAAK,KAAK,EAAE,aAAa,EAAE,aAAa,GAAI,GACnD,CACtB,CAAC;AACJ,CAAC;AAOD,SAAS,KAAK,CAAC,KAAiB;IAC9B,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,GAAG,KAAK,CAAC;IAC1D,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,aAAa,EAAE,CAAC;IACjD,MAAM,MAAM,GAAG,UAAU,CAAC,aAAa,CAAC,CAAC;IACzC,MAAM,CAAC,OAAO,CAAC,GAAG,QAAQ,CAAC,aAAa,CAAC,CAAC;IAC1C,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAwB,IAAI,CAAC,CAAC;IAChE,MAAM,QAAQ,GAAG,WAAW,CAC1B,CAAC,OAA8B,EAAE,EAAE;QACjC,aAAa,CAAC,OAAO,GAAG,OAAO,CAAC;QAChC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAClB,OAAO,EAAE,CAAC,OAAO,CAAC,CAAC;IACrB,CAAC,EACD,CAAC,aAAa,EAAE,OAAO,CAAC,CACzB,CAAC;IAEF,wEAAwE;IACxE,uEAAuE;IACvE,OAAO,CACL,cACE,GAAG,EAAE,QAAQ,EACb,KAAK,EAAE,OAAO,KAAK,KAAK,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,KAAK,YAEhE,KAAC,cAAc,IACb,eAAe,EAAE,MAAM,CAAC,eAAe,EACvC,eAAe,EACb,YAAY,IAAI,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,eAAe,YAGhE,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,GAClD,GACb,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Whether this browser lets a page fill the screen: neither an iPhone nor a
3
+ * frame without `allowfullscreen` does.
4
+ * @returns Whether `requestFullscreen` can succeed.
5
+ */
6
+ export declare function canFillScreen(): boolean;
7
+ //# sourceMappingURL=canFillScreen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"canFillScreen.d.ts","sourceRoot":"","sources":["../../../src/shared/ui/canFillScreen.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,aAAa,IAAI,OAAO,CAEvC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Whether this browser lets a page fill the screen: neither an iPhone nor a
3
+ * frame without `allowfullscreen` does.
4
+ * @returns Whether `requestFullscreen` can succeed.
5
+ */
6
+ export function canFillScreen() {
7
+ return typeof document !== 'undefined' && document.fullscreenEnabled;
8
+ }
9
+ //# sourceMappingURL=canFillScreen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"canFillScreen.js","sourceRoot":"","sources":["../../../src/shared/ui/canFillScreen.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,UAAU,aAAa;IAC3B,OAAO,OAAO,QAAQ,KAAK,WAAW,IAAI,QAAQ,CAAC,iBAAiB,CAAC;AACvE,CAAC"}
@@ -4,4 +4,7 @@ export type { HeaderButtonProps, MenuButtonProps } from './MenuButton.tsx';
4
4
  export { MenuButton } from './MenuButton.tsx';
5
5
  export type { ActionTooltipState, ActionTooltipTarget, } from './useActionTooltip.ts';
6
6
  export { ACTION_TOOLTIP_DELAY, useActionTooltip } from './useActionTooltip.ts';
7
+ export { canFillScreen } from './canFillScreen.ts';
8
+ export type { FullscreenStageProps, StageFullscreen, } from './FullscreenStage.tsx';
9
+ export { FullscreenStage } from './FullscreenStage.tsx';
7
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shared/ui/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,YAAY,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,YAAY,EACV,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shared/ui/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,YAAY,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,YAAY,EACV,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC/E,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,YAAY,EACV,oBAAoB,EACpB,eAAe,GAChB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC"}
@@ -1,4 +1,6 @@
1
1
  export { ActionTooltip } from "./ActionTooltip.js";
2
2
  export { MenuButton } from "./MenuButton.js";
3
3
  export { ACTION_TOOLTIP_DELAY, useActionTooltip } from "./useActionTooltip.js";
4
+ export { canFillScreen } from "./canFillScreen.js";
5
+ export { FullscreenStage } from "./FullscreenStage.js";
4
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/shared/ui/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAqB,CAAC;AAEpD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAkB,CAAC;AAK9C,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/shared/ui/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAqB,CAAC;AAEpD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAkB,CAAC;AAK9C,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC/E,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAKnD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAuB,CAAC"}
@@ -57,9 +57,9 @@ export interface SplitPanesProps extends SplitRange {
57
57
  */
58
58
  stackBelow?: number;
59
59
  /**
60
- * The gutter each pane keeps beside the splitter, in pixels, so neither
61
- * figure is read against its edge.
62
- * @default 6
60
+ * The gutter each pane keeps beside the splitter, in pixels. The bar is
61
+ * already the separation, so a gutter only widens it into a band of page.
62
+ * @default 0
63
63
  */
64
64
  gutter?: number;
65
65
  /**
@@ -84,7 +84,7 @@ const STACK_ACROSS = 860;
84
84
  */
85
85
  const STACK_DOWN = 420;
86
86
  /** The gutter a pane keeps beside the splitter, in pixels. */
87
- const GUTTER = 6;
87
+ const GUTTER = 0;
88
88
  /** The gap between the panes once they have stacked, in pixels. */
89
89
  const STACKED_GAP = 16;
90
90
  const STACK = {
@@ -44,6 +44,12 @@ export interface StructureNotation {
44
44
  */
45
45
  block: boolean;
46
46
  }
47
+ /**
48
+ * Notations the caller has already written, shown instead of the ones
49
+ * OpenChemLib would write. A drawing program's molfile keeps its
50
+ * abbreviations as superatoms, which a round trip through OpenChemLib drops.
51
+ */
52
+ export type SuppliedNotations = Partial<Record<StructureNotationKind, string>>;
47
53
  /**
48
54
  * Write a structure every way the export dialog offers.
49
55
  *
@@ -51,7 +57,8 @@ export interface StructureNotation {
51
57
  * tautomer cannot always be canonized — comes back empty rather than taking
52
58
  * the rest of the list down with it.
53
59
  * @param molecule - The structure, as the editor handed it over. Not modified.
60
+ * @param supplied - Notations the caller wrote itself, used as they are.
54
61
  * @returns One entry per notation, in the order they are shown.
55
62
  */
56
- export declare function structureNotations(molecule: Molecule): StructureNotation[];
63
+ export declare function structureNotations(molecule: Molecule, supplied?: SuppliedNotations): StructureNotation[];
57
64
  //# sourceMappingURL=structureNotations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"structureNotations.d.ts","sourceRoot":"","sources":["../../../src/structure/core/structureNotations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAG5C,+DAA+D;AAC/D,MAAM,MAAM,qBAAqB,GAC7B,QAAQ,GACR,cAAc,GACd,cAAc,GACd,QAAQ,GACR,gBAAgB,GAChB,wBAAwB,CAAC;AAE7B,gDAAgD;AAChD,MAAM,WAAW,qBAAqB;IACpC,yEAAyE;IACzE,MAAM,EAAE,MAAM,CAAC;IACf,sCAAsC;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,8EAA8E;IAC9E,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,sCAAsC;AACtC,MAAM,WAAW,iBAAiB;IAChC,4BAA4B;IAC5B,IAAI,EAAE,qBAAqB,CAAC;IAC5B,sEAAsE;IACtE,KAAK,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,qBAAqB,CAAC;IAC7B;;;OAGG;IACH,KAAK,EAAE,OAAO,CAAC;CAChB;AAKD;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,GAAG,iBAAiB,EAAE,CAyC1E"}
1
+ {"version":3,"file":"structureNotations.d.ts","sourceRoot":"","sources":["../../../src/structure/core/structureNotations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAG5C,+DAA+D;AAC/D,MAAM,MAAM,qBAAqB,GAC7B,QAAQ,GACR,cAAc,GACd,cAAc,GACd,QAAQ,GACR,gBAAgB,GAChB,wBAAwB,CAAC;AAE7B,gDAAgD;AAChD,MAAM,WAAW,qBAAqB;IACpC,yEAAyE;IACzE,MAAM,EAAE,MAAM,CAAC;IACf,sCAAsC;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,8EAA8E;IAC9E,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,sCAAsC;AACtC,MAAM,WAAW,iBAAiB;IAChC,4BAA4B;IAC5B,IAAI,EAAE,qBAAqB,CAAC;IAC5B,sEAAsE;IACtE,KAAK,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,qBAAqB,CAAC;IAC7B;;;OAGG;IACH,KAAK,EAAE,OAAO,CAAC;CAChB;AAED;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,CAAC,MAAM,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC,CAAC;AAK/E;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,QAAQ,EAClB,QAAQ,GAAE,iBAAsB,GAC/B,iBAAiB,EAAE,CA+CrB"}
@@ -18,41 +18,47 @@ const MOLFILE_TYPE = 'chemical/x-mdl-molfile';
18
18
  * tautomer cannot always be canonized — comes back empty rather than taking
19
19
  * the rest of the list down with it.
20
20
  * @param molecule - The structure, as the editor handed it over. Not modified.
21
+ * @param supplied - Notations the caller wrote itself, used as they are.
21
22
  * @returns One entry per notation, in the order they are shown.
22
23
  */
23
- export function structureNotations(molecule) {
24
- const idCode = written(() => molecule.getIDCode());
24
+ export function structureNotations(molecule, supplied = {}) {
25
+ const value = (kind, write) => supplied[kind] ?? written(write);
25
26
  return [
26
27
  {
27
28
  kind: 'smiles',
28
- value: written(() => molecule.toIsomericSmiles()),
29
+ value: value('smiles', () => molecule.toIsomericSmiles()),
29
30
  canonical: false,
30
31
  block: false,
31
32
  },
32
33
  {
33
34
  kind: 'molfileV3000',
34
- value: written(() => molecule.toMolfileV3()),
35
+ value: value('molfileV3000', () => molecule.toMolfileV3()),
35
36
  canonical: false,
36
37
  file: { suffix: '-v3000', extension: 'mol', mimeType: MOLFILE_TYPE },
37
38
  block: true,
38
39
  },
39
40
  {
40
41
  kind: 'molfileV2000',
41
- value: written(() => molecule.toMolfile()),
42
+ value: value('molfileV2000', () => molecule.toMolfile()),
42
43
  canonical: false,
43
44
  file: { suffix: '-v2000', extension: 'mol', mimeType: MOLFILE_TYPE },
44
45
  block: true,
45
46
  },
46
- { kind: 'idCode', value: idCode, canonical: true, block: false },
47
+ {
48
+ kind: 'idCode',
49
+ value: value('idCode', () => molecule.getIDCode()),
50
+ canonical: true,
51
+ block: false,
52
+ },
47
53
  {
48
54
  kind: 'noStereoIdCode',
49
- value: written(() => CanonizerUtil.getIDCode(molecule, CanonizerUtil.NOSTEREO)),
55
+ value: value('noStereoIdCode', () => CanonizerUtil.getIDCode(molecule, CanonizerUtil.NOSTEREO)),
50
56
  canonical: true,
51
57
  block: false,
52
58
  },
53
59
  {
54
60
  kind: 'noStereoTautomerIdCode',
55
- value: written(() => CanonizerUtil.getIDCode(molecule, CanonizerUtil.NOSTEREO_TAUTOMER)),
61
+ value: value('noStereoTautomerIdCode', () => CanonizerUtil.getIDCode(molecule, CanonizerUtil.NOSTEREO_TAUTOMER)),
56
62
  canonical: true,
57
63
  block: false,
58
64
  },
@@ -1 +1 @@
1
- {"version":3,"file":"structureNotations.js","sourceRoot":"","sources":["../../../src/structure/core/structureNotations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AA8C5C,6DAA6D;AAC7D,MAAM,YA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AO,CAAC,GAAG,EAAE,CAClB,aAAa,CAAC,SAAS,CAAC,QAAQ,EAAE,aAAa,CAAC,iBAAiB,CAAC,CACnE;YACD,SAAS,EAAE,IAAI;YACf,KAAK,EAAE,KAAK;SACb;KACF,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,SAAS,OAAO,CAAC,KAAmB;IAClC,IAAI,CAAC;QACH,OAAO,KAAK,EAAE,CAAC;IACjB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"structureNotations.js","sourceRoot":"","sources":["../../../src/structure/core/structureNotations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAqD5C,6DAA6D;AAC7D,MAAM,YAAY,GAAG,wBAAwB,CAAC;AAE9C;;;;;;;;;GASG;AACH,MAAM,UAAU,kBAAkB,CAChC,QAAkB,EAClB,WAA8B,EAAE;IAEhC,MAAM,KAAK,GAAG,CAAC,IAA2B,EAAE,KAAmB,EAAE,EAAE,CACjE,QAAQ,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC;IACnC,OAAO;QACL;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,gBAAgB,EAAE,CAAC;YACzD,SAAS,EAAE,KAAK;YAChB,KAAK,EAAE,KAAK;SACb;QACD;YACE,IAAI,EAAE,cAAc;YACpB,KAAK,EAAE,KAAK,CAAC,cAAc,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC;YAC1D,SAAS,EAAE,KAAK;YAChB,IAAI,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE;YACpE,KAAK,EAAE,IAAI;SACZ;QACD;YACE,IAAI,EAAE,cAAc;YACpB,KAAK,EAAE,KAAK,CAAC,cAAc,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAC;YACxD,SAAS,EAAE,KAAK;YAChB,IAAI,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE;YACpE,KAAK,EAAE,IAAI;SACZ;QACD;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAC;YAClD,SAAS,EAAE,IAAI;YACf,KAAK,EAAE,KAAK;SACb;QACD;YACE,IAAI,EAAE,gBAAgB;YACtB,KAAK,EAAE,KAAK,CAAC,gBAAgB,EAAE,GAAG,EAAE,CAClC,aAAa,CAAC,SAAS,CAAC,QAAQ,EAAE,aAAa,CAAC,QAAQ,CAAC,CAC1D;YACD,SAAS,EAAE,IAAI;YACf,KAAK,EAAE,KAAK;SACb;QACD;YACE,IAAI,EAAE,wBAAwB;YAC9B,KAAK,EAAE,KAAK,CAAC,wBAAwB,EAAE,GAAG,EAAE,CAC1C,aAAa,CAAC,SAAS,CAAC,QAAQ,EAAE,aAAa,CAAC,iBAAiB,CAAC,CACnE;YACD,SAAS,EAAE,IAAI;YACf,KAAK,EAAE,KAAK;SACb;KACF,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,SAAS,OAAO,CAAC,KAAmB;IAClC,IAAI,CAAC;QACH,OAAO,KAAK,EAAE,CAAC;IACjB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC"}
@@ -6,6 +6,7 @@
6
6
  * this only when somebody asks to export something.
7
7
  */
8
8
  import type { ReactElement } from 'react';
9
+ import type { SuppliedNotations } from '../core/structureNotations.ts';
9
10
  import type { StructureSourceInput } from '../core/structureSource.ts';
10
11
  /** What {@link StructureExportPanel} is handed. */
11
12
  export interface StructureExportPanelProps extends StructureSourceInput {
@@ -21,6 +22,13 @@ export interface StructureExportPanelProps extends StructureSourceInput {
21
22
  * @default false
22
23
  */
23
24
  fragment?: boolean;
25
+ /**
26
+ * Notations the caller wrote itself, shown and saved as they are instead of
27
+ * the ones OpenChemLib would write from the structure — a drawing program
28
+ * whose molfile keeps superatoms that a round trip would drop.
29
+ * @default {}
30
+ */
31
+ notations?: SuppliedNotations;
24
32
  }
25
33
  /**
26
34
  * Every notation of a drawn structure, and the picture of it.
@@ -1 +1 @@
1
- {"version":3,"file":"StructureExportPanel.d.ts","sourceRoot":"","sources":["../../../src/structure/ui/StructureExportPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,OAAO,CAAC;AAUzD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAMvE,mDAAmD;AACnD,MAAM,WAAW,yBAA0B,SAAQ,oBAAoB;IACrE;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,yBAAyB,GAC/B,YAAY,CAqDd"}
1
+ {"version":3,"file":"StructureExportPanel.d.ts","sourceRoot":"","sources":["../../../src/structure/ui/StructureExportPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,OAAO,CAAC;AASzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAEvE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAMvE,mDAAmD;AACnD,MAAM,WAAW,yBAA0B,SAAQ,oBAAoB;IACrE;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,iBAAiB,CAAC;CAC/B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,yBAAyB,GAC/B,YAAY,CA0Dd"}
@@ -23,9 +23,9 @@ import { StructurePicturePane } from "./StructurePicturePane.js";
23
23
  */
24
24
  export function StructureExportPanel(props) {
25
25
  const { idCode, coordinates, molfile, smiles } = props;
26
- const { name = 'structure', fragment = false } = props;
26
+ const { name = 'structure', fragment = false, notations: supplied } = props;
27
27
  const t = useChromeT();
28
- const read = useMemo(() => readStructure({ idCode, coordinates, molfile, smiles }, fragment), [idCode, coordinates, molfile, smiles, fragment]);
28
+ const read = useMemo(() => readStructure({ idCode, coordinates, molfile, smiles }, fragment, supplied), [idCode, coordinates, molfile, smiles, fragment, supplied]);
29
29
  if (read.kind !== 'read') {
30
30
  return (_jsx("p", { style: EMPTY_STYLE, children: read.kind === 'empty' ? t('structure.export.nothing') : read.message }));
31
31
  }
@@ -39,9 +39,10 @@ export function StructureExportPanel(props) {
39
39
  * Read the notation the caller handed over, and write every other one from it.
40
40
  * @param input - Whatever notations the caller has.
41
41
  * @param fragment - Whether the structure is a query fragment.
42
+ * @param supplied - Notations the caller wrote itself.
42
43
  * @returns The molecule and its notations, or why there are none.
43
44
  */
44
- function readStructure(input, fragment) {
45
+ function readStructure(input, fragment, supplied) {
45
46
  const source = structureSource(input);
46
47
  if (source.kind === 'empty')
47
48
  return { kind: 'empty' };
@@ -54,7 +55,11 @@ function readStructure(input, fragment) {
54
55
  molecule.setFragment(true);
55
56
  if (molecule.getAllAtoms() === 0)
56
57
  return { kind: 'empty' };
57
- return { kind: 'read', molecule, notations: structureNotations(molecule) };
58
+ return {
59
+ kind: 'read',
60
+ molecule,
61
+ notations: structureNotations(molecule, supplied),
62
+ };
58
63
  }
59
64
  catch (error) {
60
65
  return { kind: 'error', message: structureError(error).message };
@@ -1 +1 @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,EAC3B,QAAiB,EACjB,QAAuC;IAEvC,MAAM,MAAM,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC;IACtC,IAAI,MAAM,CAAC,IAAI,KAAK,OAAO;QAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;IACtD,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;QACxC,oEAAoE;QACpE,qEAAqE;QACrE,yCAAyC;QACzC,IAAI,QAAQ;YAAE,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,QAAQ,CAAC,WAAW,EAAE,KAAK,CAAC;YAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;QAC3D,OAAO;YACL,IAAI,EAAE,MAAM;YACZ,QAAQ;YACR,SAAS,EAAE,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,CAAC;SAClD,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,cAAc,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC;IACnE,CAAC;AACH,CAAC;AAED,MAAM,WAAW,GAAG;IAClB,MAAM,EAAE,CAAC;IACT,OAAO,EAAE,QAAQ;IACjB,KAAK,EAAE,KAAK,CAAC,SAAS;IACtB,QAAQ,EAAE,EAAE;IACZ,SAAS,EAAE,QAAQ;CACa,CAAC;AAEnC,MAAM,UAAU,GAAG;IACjB,MAAM,EAAE,CAAC;IACT,KAAK,EAAE,KAAK,CAAC,SAAS;IACtB,QAAQ,EAAE,EAAE;CACoB,CAAC"}
@@ -30,6 +30,7 @@ export { StructureExportButton } from './StructureExportButton.tsx';
30
30
  export type { CardStructureProps } from './CardStructure.tsx';
31
31
  export { CardStructure } from './CardStructure.tsx';
32
32
  export type { StructureExportPanelProps } from './StructureExportPanel.tsx';
33
+ export type { StructureNotationKind, SuppliedNotations, } from '../core/structureNotations.ts';
33
34
  export type { ToolbarFloorOptions } from './useToolbarFloor.ts';
34
35
  export { useToolbarFloor } from './useToolbarFloor.ts';
35
36
  export type { StructureDraft } from './useStructureDraft.ts';