react-cheminfo 0.66.0 → 0.68.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 (291) hide show
  1. package/README.md +22 -11
  2. package/lib/download/ui/FigureDownloadPanel.d.ts +7 -1
  3. package/lib/download/ui/FigureDownloadPanel.d.ts.map +1 -1
  4. package/lib/download/ui/FigureDownloadPanel.js +2 -2
  5. package/lib/download/ui/FigureDownloadPanel.js.map +1 -1
  6. package/lib/ecosystem/core/sites.js +6 -6
  7. package/lib/ecosystem/core/sites.js.map +1 -1
  8. package/lib/ecosystem/core/types.d.ts +1 -1
  9. package/lib/ecosystem/core/types.d.ts.map +1 -1
  10. package/lib/ecosystem/ui/glyphs.js +2 -2
  11. package/lib/ecosystem/ui/glyphs.js.map +1 -1
  12. package/lib/i18n/core/chromeCatalog.d.ts +1 -1
  13. package/lib/i18n/core/chromeCatalog.d.ts.map +1 -1
  14. package/lib/i18n/core/messageCatalog.d.ts +2 -2
  15. package/lib/i18n/vite/localeCatalog.d.ts +1 -1
  16. package/lib/ir/core/index.d.ts +2 -2
  17. package/lib/ir/core/index.d.ts.map +1 -1
  18. package/lib/ir/core/index.js.map +1 -1
  19. package/lib/ir/core/irEditorApi.d.ts +12 -0
  20. package/lib/ir/core/irEditorApi.d.ts.map +1 -1
  21. package/lib/ir/core/irReducer.d.ts +2 -2
  22. package/lib/ir/core/irReducer.d.ts.map +1 -1
  23. package/lib/ir/core/irSidePanels.d.ts +7 -1
  24. package/lib/ir/core/irSidePanels.d.ts.map +1 -1
  25. package/lib/ir/core/irState.d.ts +8 -5
  26. package/lib/ir/core/irState.d.ts.map +1 -1
  27. package/lib/ir/core/irState.js.map +1 -1
  28. package/lib/ir/ui/IrCanvas.d.ts +7 -0
  29. package/lib/ir/ui/IrCanvas.d.ts.map +1 -1
  30. package/lib/ir/ui/IrCanvas.js +8 -3
  31. package/lib/ir/ui/IrCanvas.js.map +1 -1
  32. package/lib/ir/ui/IrChart.d.ts.map +1 -1
  33. package/lib/ir/ui/IrChart.js +5 -1
  34. package/lib/ir/ui/IrChart.js.map +1 -1
  35. package/lib/ir/ui/IrEditor.d.ts +22 -4
  36. package/lib/ir/ui/IrEditor.d.ts.map +1 -1
  37. package/lib/ir/ui/IrEditor.js.map +1 -1
  38. package/lib/ir/ui/IrShell.d.ts +9 -1
  39. package/lib/ir/ui/IrShell.d.ts.map +1 -1
  40. package/lib/ir/ui/IrShell.js +4 -19
  41. package/lib/ir/ui/IrShell.js.map +1 -1
  42. package/lib/ir/ui/IrSidePanel.d.ts +11 -0
  43. package/lib/ir/ui/IrSidePanel.d.ts.map +1 -1
  44. package/lib/ir/ui/IrSidePanel.js +12 -3
  45. package/lib/ir/ui/IrSidePanel.js.map +1 -1
  46. package/lib/ir/ui/RamanEditor.d.ts +22 -4
  47. package/lib/ir/ui/RamanEditor.d.ts.map +1 -1
  48. package/lib/ir/ui/RamanEditor.js.map +1 -1
  49. package/lib/ir/ui/VibrationalEditor.d.ts +18 -4
  50. package/lib/ir/ui/VibrationalEditor.d.ts.map +1 -1
  51. package/lib/ir/ui/VibrationalEditor.js +4 -2
  52. package/lib/ir/ui/VibrationalEditor.js.map +1 -1
  53. package/lib/ir/ui/index.d.ts +1 -0
  54. package/lib/ir/ui/index.d.ts.map +1 -1
  55. package/lib/ir/ui/index.js.map +1 -1
  56. package/lib/ir/ui/irActions.d.ts +3 -3
  57. package/lib/ir/ui/irActions.d.ts.map +1 -1
  58. package/lib/ir/ui/irChartProps.d.ts +7 -0
  59. package/lib/ir/ui/irChartProps.d.ts.map +1 -1
  60. package/lib/ir/ui/irHostPanels.d.ts +53 -0
  61. package/lib/ir/ui/irHostPanels.d.ts.map +1 -0
  62. package/lib/ir/ui/irHostPanels.js +41 -0
  63. package/lib/ir/ui/irHostPanels.js.map +1 -0
  64. package/lib/ir/ui/useIrSide.d.ts +27 -0
  65. package/lib/ir/ui/useIrSide.d.ts.map +1 -0
  66. package/lib/ir/ui/useIrSide.js +42 -0
  67. package/lib/ir/ui/useIrSide.js.map +1 -0
  68. package/lib/ir/ui/useIrZoom.d.ts +8 -0
  69. package/lib/ir/ui/useIrZoom.d.ts.map +1 -1
  70. package/lib/ir/ui/useIrZoom.js +2 -1
  71. package/lib/ir/ui/useIrZoom.js.map +1 -1
  72. package/lib/locales/de.json +9 -1
  73. package/lib/locales/en.json +9 -1
  74. package/lib/locales/es.json +9 -1
  75. package/lib/locales/fr.json +9 -1
  76. package/lib/locales/it.json +9 -1
  77. package/lib/molecule3d/core/animatedPng.d.ts +25 -0
  78. package/lib/molecule3d/core/animatedPng.d.ts.map +1 -0
  79. package/lib/molecule3d/core/animatedPng.js +59 -0
  80. package/lib/molecule3d/core/animatedPng.js.map +1 -0
  81. package/lib/molecule3d/core/file.d.ts +24 -0
  82. package/lib/molecule3d/core/file.d.ts.map +1 -0
  83. package/lib/molecule3d/core/file.js +2 -0
  84. package/lib/molecule3d/core/file.js.map +1 -0
  85. package/lib/molecule3d/core/index.d.ts +4 -1
  86. package/lib/molecule3d/core/index.d.ts.map +1 -1
  87. package/lib/molecule3d/core/index.js +1 -0
  88. package/lib/molecule3d/core/index.js.map +1 -1
  89. package/lib/molecule3d/core/settings.d.ts +0 -7
  90. package/lib/molecule3d/core/settings.d.ts.map +1 -1
  91. package/lib/molecule3d/core/settings.js.map +1 -1
  92. package/lib/molecule3d/ui/Molecule3DExport.d.ts +10 -2
  93. package/lib/molecule3d/ui/Molecule3DExport.d.ts.map +1 -1
  94. package/lib/molecule3d/ui/Molecule3DExport.js +15 -2
  95. package/lib/molecule3d/ui/Molecule3DExport.js.map +1 -1
  96. package/lib/molecule3d/ui/Molecule3DToolbar.js +9 -2
  97. package/lib/molecule3d/ui/Molecule3DToolbar.js.map +1 -1
  98. package/lib/molecule3d/ui/MoleculeCanvas3D.d.ts.map +1 -1
  99. package/lib/molecule3d/ui/MoleculeCanvas3D.js +23 -41
  100. package/lib/molecule3d/ui/MoleculeCanvas3D.js.map +1 -1
  101. package/lib/molecule3d/ui/drawScene.d.ts +2 -1
  102. package/lib/molecule3d/ui/drawScene.d.ts.map +1 -1
  103. package/lib/molecule3d/ui/drawScene.js.map +1 -1
  104. package/lib/molecule3d/ui/exportMoleculeImage.d.ts +15 -1
  105. package/lib/molecule3d/ui/exportMoleculeImage.d.ts.map +1 -1
  106. package/lib/molecule3d/ui/exportMoleculeImage.js +14 -2
  107. package/lib/molecule3d/ui/exportMoleculeImage.js.map +1 -1
  108. package/lib/molecule3d/ui/moleculeFrames.d.ts +47 -0
  109. package/lib/molecule3d/ui/moleculeFrames.d.ts.map +1 -0
  110. package/lib/molecule3d/ui/moleculeFrames.js +65 -0
  111. package/lib/molecule3d/ui/moleculeFrames.js.map +1 -0
  112. package/lib/molecule3d/ui/moleculeViewer3DProps.d.ts +14 -1
  113. package/lib/molecule3d/ui/moleculeViewer3DProps.d.ts.map +1 -1
  114. package/lib/molecule3d/ui/renderMolecule.d.ts +3 -3
  115. package/lib/molecule3d/ui/renderMolecule.d.ts.map +1 -1
  116. package/lib/molecule3d/ui/renderMolecule.js +2 -1
  117. package/lib/molecule3d/ui/renderMolecule.js.map +1 -1
  118. package/lib/molecule3d/ui/sceneDrawer.d.ts +2 -1
  119. package/lib/molecule3d/ui/sceneDrawer.d.ts.map +1 -1
  120. package/lib/molecule3d/ui/sceneDrawer.js +9 -1
  121. package/lib/molecule3d/ui/sceneDrawer.js.map +1 -1
  122. package/lib/molecule3d/ui/useImageExport.d.ts +8 -3
  123. package/lib/molecule3d/ui/useImageExport.d.ts.map +1 -1
  124. package/lib/molecule3d/ui/useImageExport.js +13 -4
  125. package/lib/molecule3d/ui/useImageExport.js.map +1 -1
  126. package/lib/molecule3d/ui/useMoleculeScene.d.ts +2 -1
  127. package/lib/molecule3d/ui/useMoleculeScene.d.ts.map +1 -1
  128. package/lib/molecule3d/ui/useMoleculeScene.js.map +1 -1
  129. package/lib/molecule3d/ui/useMoleculeViewer.d.ts +16 -0
  130. package/lib/molecule3d/ui/useMoleculeViewer.d.ts.map +1 -0
  131. package/lib/molecule3d/ui/useMoleculeViewer.js +37 -0
  132. package/lib/molecule3d/ui/useMoleculeViewer.js.map +1 -0
  133. package/lib/molecule3d/ui/usePolarSurfaceArea.d.ts +3 -3
  134. package/lib/molecule3d/ui/usePolarSurfaceArea.d.ts.map +1 -1
  135. package/lib/molecule3d/ui/usePolarSurfaceArea.js +4 -3
  136. package/lib/molecule3d/ui/usePolarSurfaceArea.js.map +1 -1
  137. package/lib/molecule3d/ui/viewer.d.ts +4 -1
  138. package/lib/molecule3d/ui/viewer.d.ts.map +1 -1
  139. package/lib/molecule3d/ui/viewer.js +21 -19
  140. package/lib/molecule3d/ui/viewer.js.map +1 -1
  141. package/lib/molecule3d/ui/viewerTypes.d.ts +6 -0
  142. package/lib/molecule3d/ui/viewerTypes.d.ts.map +1 -1
  143. package/lib/molstar/core/captureScene.d.ts +19 -1
  144. package/lib/molstar/core/captureScene.d.ts.map +1 -1
  145. package/lib/molstar/core/captureScene.js +57 -2
  146. package/lib/molstar/core/captureScene.js.map +1 -1
  147. package/lib/molstar/core/index.d.ts +5 -2
  148. package/lib/molstar/core/index.d.ts.map +1 -1
  149. package/lib/molstar/core/index.js +4 -2
  150. package/lib/molstar/core/index.js.map +1 -1
  151. package/lib/molstar/core/trajectory.d.ts +56 -0
  152. package/lib/molstar/core/trajectory.d.ts.map +1 -0
  153. package/lib/molstar/core/trajectory.js +96 -0
  154. package/lib/molstar/core/trajectory.js.map +1 -0
  155. package/lib/panel/ui/PanelRail.d.ts.map +1 -1
  156. package/lib/panel/ui/PanelRail.js +1 -1
  157. package/lib/panel/ui/PanelRail.js.map +1 -1
  158. package/lib/raman.d.ts +2 -1
  159. package/lib/raman.d.ts.map +1 -1
  160. package/lib/raman.js.map +1 -1
  161. package/lib/router/core/basePath.d.ts +2 -2
  162. package/lib/router/core/basePath.js +2 -2
  163. package/lib/router/core/siteAddresses.d.ts +1 -1
  164. package/lib/router/core/siteAddresses.js +1 -1
  165. package/lib/seo/core/siteFiles.js +1 -1
  166. package/lib/seo/core/siteFiles.js.map +1 -1
  167. package/lib/server/answerAddresses.d.ts +3 -3
  168. package/lib/server/answerAddresses.js +3 -3
  169. package/lib/structure/core/index.d.ts +2 -0
  170. package/lib/structure/core/index.d.ts.map +1 -1
  171. package/lib/structure/core/index.js +1 -0
  172. package/lib/structure/core/index.js.map +1 -1
  173. package/lib/structure/core/structureTransfer.d.ts +29 -0
  174. package/lib/structure/core/structureTransfer.d.ts.map +1 -0
  175. package/lib/structure/core/structureTransfer.js +26 -0
  176. package/lib/structure/core/structureTransfer.js.map +1 -0
  177. package/lib/structure/ui/EditorImportButton.d.ts +20 -0
  178. package/lib/structure/ui/EditorImportButton.d.ts.map +1 -0
  179. package/lib/structure/ui/EditorImportButton.js +24 -0
  180. package/lib/structure/ui/EditorImportButton.js.map +1 -0
  181. package/lib/structure/ui/EditorImportProblem.d.ts +17 -0
  182. package/lib/structure/ui/EditorImportProblem.d.ts.map +1 -0
  183. package/lib/structure/ui/EditorImportProblem.js +32 -0
  184. package/lib/structure/ui/EditorImportProblem.js.map +1 -0
  185. package/lib/structure/ui/StructureDrop.d.ts +39 -0
  186. package/lib/structure/ui/StructureDrop.d.ts.map +1 -0
  187. package/lib/structure/ui/StructureDrop.js +19 -0
  188. package/lib/structure/ui/StructureDrop.js.map +1 -0
  189. package/lib/structure/ui/StructureDropOverlay.d.ts +16 -0
  190. package/lib/structure/ui/StructureDropOverlay.d.ts.map +1 -0
  191. package/lib/structure/ui/StructureDropOverlay.js +29 -0
  192. package/lib/structure/ui/StructureDropOverlay.js.map +1 -0
  193. package/lib/structure/ui/StructureEditor.d.ts +3 -80
  194. package/lib/structure/ui/StructureEditor.d.ts.map +1 -1
  195. package/lib/structure/ui/StructureEditor.js +21 -33
  196. package/lib/structure/ui/StructureEditor.js.map +1 -1
  197. package/lib/structure/ui/importedStructure.d.ts +25 -0
  198. package/lib/structure/ui/importedStructure.d.ts.map +1 -0
  199. package/lib/structure/ui/importedStructure.js +74 -0
  200. package/lib/structure/ui/importedStructure.js.map +1 -0
  201. package/lib/structure/ui/index.d.ts +2 -0
  202. package/lib/structure/ui/index.d.ts.map +1 -1
  203. package/lib/structure/ui/index.js +1 -0
  204. package/lib/structure/ui/index.js.map +1 -1
  205. package/lib/structure/ui/structureEditorProps.d.ts +98 -0
  206. package/lib/structure/ui/structureEditorProps.d.ts.map +1 -0
  207. package/lib/structure/ui/structureEditorProps.js +2 -0
  208. package/lib/structure/ui/structureEditorProps.js.map +1 -0
  209. package/lib/structure/ui/useDebouncedChange.d.ts +16 -0
  210. package/lib/structure/ui/useDebouncedChange.d.ts.map +1 -0
  211. package/lib/structure/ui/useDebouncedChange.js +30 -0
  212. package/lib/structure/ui/useDebouncedChange.js.map +1 -0
  213. package/lib/structure/ui/useStructureDrop.d.ts +30 -0
  214. package/lib/structure/ui/useStructureDrop.d.ts.map +1 -0
  215. package/lib/structure/ui/useStructureDrop.js +49 -0
  216. package/lib/structure/ui/useStructureDrop.js.map +1 -0
  217. package/lib/structure/ui/useStructureImport.d.ts +45 -0
  218. package/lib/structure/ui/useStructureImport.d.ts.map +1 -0
  219. package/lib/structure/ui/useStructureImport.js +62 -0
  220. package/lib/structure/ui/useStructureImport.js.map +1 -0
  221. package/package.json +6 -3
  222. package/src/download/ui/FigureDownloadPanel.tsx +9 -2
  223. package/src/ecosystem/core/sites.ts +6 -6
  224. package/src/ecosystem/core/types.ts +2 -2
  225. package/src/ecosystem/ui/glyphs.tsx +2 -2
  226. package/src/i18n/core/messageCatalog.ts +2 -2
  227. package/src/i18n/vite/localeCatalog.ts +1 -1
  228. package/src/ir/core/index.ts +6 -2
  229. package/src/ir/core/irEditorApi.ts +13 -0
  230. package/src/ir/core/irReducer.ts +2 -2
  231. package/src/ir/core/irSidePanels.ts +8 -1
  232. package/src/ir/core/irState.ts +8 -5
  233. package/src/ir/ui/IrCanvas.tsx +27 -2
  234. package/src/ir/ui/IrChart.tsx +11 -0
  235. package/src/ir/ui/IrEditor.tsx +22 -4
  236. package/src/ir/ui/IrShell.tsx +21 -22
  237. package/src/ir/ui/IrSidePanel.tsx +36 -10
  238. package/src/ir/ui/RamanEditor.tsx +22 -4
  239. package/src/ir/ui/VibrationalEditor.tsx +24 -5
  240. package/src/ir/ui/index.ts +1 -0
  241. package/src/ir/ui/irActions.ts +3 -3
  242. package/src/ir/ui/irChartProps.ts +7 -0
  243. package/src/ir/ui/irHostPanels.ts +76 -0
  244. package/src/ir/ui/useIrSide.ts +60 -0
  245. package/src/ir/ui/useIrZoom.ts +10 -0
  246. package/src/locales/de.json +9 -1
  247. package/src/locales/en.json +9 -1
  248. package/src/locales/es.json +9 -1
  249. package/src/locales/fr.json +9 -1
  250. package/src/locales/it.json +9 -1
  251. package/src/molecule3d/core/animatedPng.ts +79 -0
  252. package/src/molecule3d/core/file.ts +23 -0
  253. package/src/molecule3d/core/index.ts +3 -1
  254. package/src/molecule3d/core/settings.ts +0 -8
  255. package/src/molecule3d/ui/Molecule3DExport.tsx +43 -5
  256. package/src/molecule3d/ui/Molecule3DToolbar.tsx +9 -2
  257. package/src/molecule3d/ui/MoleculeCanvas3D.tsx +24 -38
  258. package/src/molecule3d/ui/drawScene.ts +2 -1
  259. package/src/molecule3d/ui/exportMoleculeImage.ts +28 -3
  260. package/src/molecule3d/ui/moleculeFrames.ts +88 -0
  261. package/src/molecule3d/ui/moleculeViewer3DProps.ts +14 -5
  262. package/src/molecule3d/ui/renderMolecule.ts +5 -3
  263. package/src/molecule3d/ui/sceneDrawer.ts +14 -2
  264. package/src/molecule3d/ui/useImageExport.ts +22 -5
  265. package/src/molecule3d/ui/useMoleculeScene.ts +2 -1
  266. package/src/molecule3d/ui/useMoleculeViewer.ts +46 -0
  267. package/src/molecule3d/ui/usePolarSurfaceArea.ts +6 -4
  268. package/src/molecule3d/ui/viewer.ts +34 -27
  269. package/src/molecule3d/ui/viewerTypes.ts +6 -0
  270. package/src/molstar/core/captureScene.ts +85 -2
  271. package/src/molstar/core/index.ts +13 -2
  272. package/src/molstar/core/trajectory.ts +117 -0
  273. package/src/panel/ui/PanelRail.tsx +3 -0
  274. package/src/raman.ts +2 -1
  275. package/src/router/core/basePath.ts +2 -2
  276. package/src/router/core/siteAddresses.ts +1 -1
  277. package/src/seo/core/siteFiles.ts +1 -1
  278. package/src/server/answerAddresses.ts +3 -3
  279. package/src/structure/core/index.ts +8 -0
  280. package/src/structure/core/structureTransfer.ts +37 -0
  281. package/src/structure/ui/EditorImportButton.tsx +59 -0
  282. package/src/structure/ui/EditorImportProblem.tsx +63 -0
  283. package/src/structure/ui/StructureDrop.tsx +66 -0
  284. package/src/structure/ui/StructureDropOverlay.tsx +50 -0
  285. package/src/structure/ui/StructureEditor.tsx +49 -134
  286. package/src/structure/ui/importedStructure.ts +83 -0
  287. package/src/structure/ui/index.ts +2 -0
  288. package/src/structure/ui/structureEditorProps.ts +103 -0
  289. package/src/structure/ui/useDebouncedChange.ts +41 -0
  290. package/src/structure/ui/useStructureDrop.ts +76 -0
  291. package/src/structure/ui/useStructureImport.ts +122 -0
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ir/ui/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,YAAY,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,YAAY,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,YAAY,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,eA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gB,EAAE,MAAM,qBAAqB,CAAC;AAErE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC"}
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import type { Dispatch } from 'react';
9
9
  import type { IrAction } from '../core/irReducer.ts';
10
- import type { IrSidePanelId } from '../core/irSidePanels.ts';
10
+ import type { IrPanelId } from '../core/irSidePanels.ts';
11
11
  import type { IrDomain, IrSpectrum } from '../core/irSpectrum.ts';
12
12
  import type { IrSettings, IrTool, PartialIrState } from '../core/irState.ts';
13
13
  /** Everything the viewer can be asked to do. */
@@ -32,8 +32,8 @@ export interface IrEditorActions {
32
32
  resetDomain: () => void;
33
33
  /** Run this tool on the next drag. */
34
34
  setTool: (tool: IrTool) => void;
35
- /** Open or close a side panel. */
36
- togglePanel: (panelId: IrSidePanelId) => void;
35
+ /** Open or close a side panel, the viewer's own or one a host added. */
36
+ togglePanel: (panelId: IrPanelId) => void;
37
37
  /** Say why something was refused, or that nothing is wrong any more. */
38
38
  setError: (error: string | null) => void;
39
39
  /** Change how the spectra are drawn and read. */
@@ -1 +1 @@
1
- {"version":3,"file":"irActions.d.ts","sourceRoot":"","sources":["../../../src/ir/ui/irActions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEtC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,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IAAI,KAAK,IAAI,CAAC;IAC5C,wBAAwB;IACxB,SAAS,EAAE,CAAC,MAAM,EAAE,QAAQ,KAAK,IAAI,CAAC;IACtC,4BAA4B;IAC5B,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,sCAAsC;IACtC,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,wEAAwE;IACxE,WAAW,EAAE,CAAC,OAAO,EAAE,SAAS,KAAK,IAAI,CAAC;IAC1C,wEAAwE;IACxE,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACzC,iDAAiD;IACjD,WAAW,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC;IACrD,+DAA+D;IAC/D,SAAS,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IAC3C,gEAAgE;IAChE,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC,GAAG,eAAe,CAgD7E"}
@@ -91,6 +91,13 @@ export interface IrChartProps {
91
91
  * @default undefined
92
92
  */
93
93
  onDomainChange?: (domain: IrDomain) => void;
94
+ /**
95
+ * Told the wavenumber a click on the plot landed at: a press let go over the
96
+ * plot without travelling. The end of a drag is never one, nor is a press let
97
+ * go over the axis labels, which inverts to a value the chart is not drawing.
98
+ * @default undefined
99
+ */
100
+ onPlotClick?: (wavenumber: number) => void;
94
101
  /**
95
102
  * What a drag across the plot asks for: the wavenumber axis alone, or exactly
96
103
  * the rectangle it sweeps out. A viewer offering a square-zoom tool switches
@@ -1 +1 @@
1
- {"version":3,"file":"irChartProps.d.ts","sourceRoot":"","sources":["../../../src/ir/ui/irChartProps.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,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AC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C;;;;;OAKG;IACH,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * The panels a host adds to the viewer's own, and the one list both make.
3
+ *
4
+ * A host panel is a panel like any other once it is in the list: the activity
5
+ * bar and the stack read the same list, so it toggles, folds and closes
6
+ * exactly as the spectra or the bands do. The host brings the body and nothing
7
+ * else — the header, its close button and the place in the column are the
8
+ * viewer's, which is what keeps every header reading the same.
9
+ */
10
+ import type { IconName } from '@blueprintjs/core';
11
+ import type { ReactNode } from 'react';
12
+ import { irSidePanels } from '../core/irSidePanels.ts';
13
+ /** A panel the host adds to the editor's own stack. */
14
+ export interface IrHostPanel {
15
+ /**
16
+ * Its identity in the activity bar and in `defaultPanelIds`; never a
17
+ * built-in id. One that is, or that an earlier host panel already took, is
18
+ * left out: one icon cannot open two panels.
19
+ */
20
+ id: string;
21
+ /** What its header and its activity-bar item say. */
22
+ title: string;
23
+ /** Its glyph in the activity bar (a Blueprint IconName). */
24
+ icon: IconName;
25
+ /**
26
+ * Its body. It brings its own toolbar as first row: the header carries the
27
+ * close button only.
28
+ *
29
+ * It is laid out in a column filling the panel's share of the height, so a
30
+ * toolbar row in `panelToolbarStyle` followed by a body in `panelBodyStyle`,
31
+ * both from `react-cheminfo/core`, keeps the toolbar in place while a tall
32
+ * body scrolls under it. It is rendered inside the viewer, so a component in
33
+ * it reaches the viewer it stands in through `useIrEditorState` and
34
+ * `useIrActions` — to overlay a predicted spectrum, say.
35
+ */
36
+ content: ReactNode;
37
+ }
38
+ /** One panel of the side: one of the viewer's own, or one a host added. */
39
+ export type IrStackPanel = (typeof irSidePanels)[number] | IrHostPanel;
40
+ /**
41
+ * Every panel the side offers, in the order the activity bar stacks them: the
42
+ * host's first, in the order given, then the viewer's own.
43
+ * @param hostPanels - What the host adds.
44
+ * @returns The panels; the viewer's own list itself when the host adds none.
45
+ */
46
+ export declare function irStackPanels(hostPanels: readonly IrHostPanel[]): readonly IrStackPanel[];
47
+ /**
48
+ * Whether a panel of the side is one a host added, whose body it brings.
49
+ * @param panel - The panel.
50
+ * @returns True for a host's panel.
51
+ */
52
+ export declare function isIrHostPanel(panel: IrStackPanel): panel is IrHostPanel;
53
+ //# sourceMappingURL=irHostPanels.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"irHostPanels.d.ts","sourceRoot":"","sources":["../../../src/ir/ui/irHostPanels.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,uDAAuD;AACvD,MAAM,WAAW,WAAW;IAC1B;;;;OAIG;IACH,EAAE,EAAE,MAAM,CAAC;IACX,qDAAqD;IACrD,KAAK,EAAE,MAAM,CAAC;IACd,4DAA4D;IAC5D,IAAI,EAAE,QAAQ,CAAC;IACf;;;;;;;;;;OAUG;IACH,OAAO,EAAE,SAAS,CAAC;CACpB;AAED,2EAA2E;AAC3E,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,GAAG,WAAW,CAAC;AAEvE;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,UAAU,EAAE,SAAS,WAAW,EAAE,GACjC,SAAS,YAAY,EAAE,CAWzB;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,YAAY,GAAG,KAAK,IAAI,WAAW,CAEvE"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * The panels a host adds to the viewer's own, and the one list both make.
3
+ *
4
+ * A host panel is a panel like any other once it is in the list: the activity
5
+ * bar and the stack read the same list, so it toggles, folds and closes
6
+ * exactly as the spectra or the bands do. The host brings the body and nothing
7
+ * else — the header, its close button and the place in the column are the
8
+ * viewer's, which is what keeps every header reading the same.
9
+ */
10
+ import { irSidePanels } from "../core/irSidePanels.js";
11
+ /**
12
+ * Every panel the side offers, in the order the activity bar stacks them: the
13
+ * host's first, in the order given, then the viewer's own.
14
+ * @param hostPanels - What the host adds.
15
+ * @returns The panels; the viewer's own list itself when the host adds none.
16
+ */
17
+ export function irStackPanels(hostPanels) {
18
+ if (hostPanels.length === 0)
19
+ return irSidePanels;
20
+ const taken = new Set(BUILT_IN_IDS);
21
+ const panels = [];
22
+ for (const panel of hostPanels) {
23
+ if (taken.has(panel.id))
24
+ continue;
25
+ taken.add(panel.id);
26
+ panels.push(panel);
27
+ }
28
+ panels.push(...irSidePanels);
29
+ return panels;
30
+ }
31
+ /**
32
+ * Whether a panel of the side is one a host added, whose body it brings.
33
+ * @param panel - The panel.
34
+ * @returns True for a host's panel.
35
+ */
36
+ export function isIrHostPanel(panel) {
37
+ return 'content' in panel;
38
+ }
39
+ /** The ids no host panel may take. */
40
+ const BUILT_IN_IDS = irSidePanels.map((panel) => panel.id);
41
+ //# sourceMappingURL=irHostPanels.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"irHostPanels.js","sourceRoot":"","sources":["../../../src/ir/ui/irHostPanels.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AA+BvD;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAC3B,UAAkC;IAElC,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,YAAY,CAAC;IACjD,MAAM,KAAK,GAAG,IAAI,GAAG,CAAS,YAAY,CAAC,CAAC;IAC5C,MAAM,MAAM,GAAmB,EAAE,CAAC;IAClC,KAAK,MAAM,KAAK,IAAI,UAAU,EAAE,CAAC;QAC/B,IAAI,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;YAAE,SAAS;QAClC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACpB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC;IACD,MAAM,CAAC,IAAI,CAAC,GAAG,YAAY,CAAC,CAAC;IAC7B,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,KAAmB;IAC/C,OAAO,SAAS,IAAI,KAAK,CAAC;AAC5B,CAAC;AAED,sCAAsC;AACtC,MAAM,YAAY,GAAsB,YAAY,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * The side of the viewer: the panels it offers, whether any of them is open,
3
+ * and what dragging the splitter shut and back open does to them.
4
+ *
5
+ * A hook of its own beside the shell, because the shell lays the side out and
6
+ * this decides what is on it.
7
+ */
8
+ import type { IrHostPanel, IrStackPanel } from './irHostPanels.ts';
9
+ /** The side, as the shell lays it out. */
10
+ export interface IrSide {
11
+ /** Every panel on offer, in the order their icons are stacked. */
12
+ panels: readonly IrStackPanel[];
13
+ /** Whether a panel on offer is open, which is whether the side is. */
14
+ isOpen: boolean;
15
+ /**
16
+ * Open or close the side, as the splitter is dragged shut and back open.
17
+ * @param open - Whether the side is now open.
18
+ */
19
+ setOpen: (open: boolean) => void;
20
+ }
21
+ /**
22
+ * The side of the viewer this is called inside.
23
+ * @param hostPanels - The panels the host adds to the viewer's own.
24
+ * @returns The panels on offer, whether the side is open, and how to open it.
25
+ */
26
+ export declare function useIrSide(hostPanels: readonly IrHostPanel[]): IrSide;
27
+ //# sourceMappingURL=useIrSide.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useIrSide.d.ts","sourceRoot":"","sources":["../../../src/ir/ui/useIrSide.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAInE,0CAA0C;AAC1C,MAAM,WAAW,MAAM;IACrB,kEAAkE;IAClE,MAAM,EAAE,SAAS,YAAY,EAAE,CAAC;IAChC,sEAAsE;IACtE,MAAM,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CAClC;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,UAAU,EAAE,SAAS,WAAW,EAAE,GAAG,MAAM,CAyBpE"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * The side of the viewer: the panels it offers, whether any of them is open,
3
+ * and what dragging the splitter shut and back open does to them.
4
+ *
5
+ * A hook of its own beside the shell, because the shell lays the side out and
6
+ * this decides what is on it.
7
+ */
8
+ import { useMemo } from 'react';
9
+ import { DEFAULT_SIDE_PANEL } from "../core/irState.js";
10
+ import { irStackPanels } from "./irHostPanels.js";
11
+ import { useIrActions, useIrEditorState } from "./irStateContext.js";
12
+ /**
13
+ * The side of the viewer this is called inside.
14
+ * @param hostPanels - The panels the host adds to the viewer's own.
15
+ * @returns The panels on offer, whether the side is open, and how to open it.
16
+ */
17
+ export function useIrSide(hostPanels) {
18
+ const { state } = useIrEditorState();
19
+ const actions = useIrActions();
20
+ const { openPanelIds } = state.view;
21
+ const panels = useMemo(() => irStackPanels(hostPanels), [hostPanels]);
22
+ // Read off the panels on offer rather than off the ids: an id no panel
23
+ // answers to opens nothing, and a side open on it alone is an empty column.
24
+ const isOpen = panels.some((panel) => openPanelIds.includes(panel.id));
25
+ /**
26
+ * Open or close the side.
27
+ * @param open - Whether the side is now open.
28
+ */
29
+ function setOpen(open) {
30
+ if (!open) {
31
+ for (const panelId of openPanelIds)
32
+ actions.togglePanel(panelId);
33
+ return;
34
+ }
35
+ // Dragging the splitter back open must land on something, or it opens on an
36
+ // empty column and reads as broken.
37
+ if (!isOpen)
38
+ actions.togglePanel(DEFAULT_SIDE_PANEL);
39
+ }
40
+ return { panels, isOpen, setOpen };
41
+ }
42
+ //# sourceMappingURL=useIrSide.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useIrSide.js","sourceRoot":"","sources":["../../../src/ir/ui/useIrSide.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAGxD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAerE;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,UAAkC;IAC1D,MAAM,EAAE,KAAK,EAAE,GAAG,gBAAgB,EAAE,CAAC;IACrC,MAAM,OAAO,GAAG,YAAY,EAAE,CAAC;IAC/B,MAAM,EAAE,YAAY,EAAE,GAAG,KAAK,CAAC,IAAI,CAAC;IAEpC,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,aAAa,CAAC,UAAU,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;IACtE,uEAAuE;IACvE,4EAA4E;IAC5E,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;IAEvE;;;OAGG;IACH,SAAS,OAAO,CAAC,IAAa;QAC5B,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,KAAK,MAAM,OAAO,IAAI,YAAY;gBAAE,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;YACjE,OAAO;QACT,CAAC;QACD,4EAA4E;QAC5E,oCAAoC;QACpC,IAAI,CAAC,MAAM;YAAE,OAAO,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC;IACvD,CAAC;IAED,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;AACrC,CAAC"}
@@ -13,6 +13,7 @@
13
13
  import type { RefObject } from 'react';
14
14
  import type { ZoomDragMode } from '../../chart/core/chartDomain.ts';
15
15
  import type { PlotRect } from '../../chart/core/chartGeometry.ts';
16
+ import type { ChartPoint } from '../../chart/core/svgPoint.ts';
16
17
  import type { ChartZoom } from '../../chart/ui/useChartZoom.ts';
17
18
  import type { IrDomain, IrMode, IrSpectrum } from '../core/irSpectrum.ts';
18
19
  import type { IrTechnique } from '../core/irTechnique.ts';
@@ -44,6 +45,13 @@ export interface IrZoomOptions {
44
45
  * @default 'xAxis'
45
46
  */
46
47
  drag?: ZoomDragMode;
48
+ /**
49
+ * Told where a click on the plot landed — a press let go over it without
50
+ * travelling, never the end of a drag — as a wavenumber and a value in the
51
+ * mode drawn.
52
+ * @default undefined
53
+ */
54
+ onClick?: (point: ChartPoint) => void;
47
55
  }
48
56
  /**
49
57
  * Zoom an infrared chart by dragging it, and — reading absorbance — by the wheel.
@@ -1 +1 @@
1
- {"version":3,"file":"useIrZoom.d.ts","sourceRoot":"","sources":["../../../src/ir/ui/useIrZoom.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAIhE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC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;IACxB,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,uEAAuE;IACvE,MAAM,EAAE,SAAS,CAAC,aAAa,GAAG,IAAI,CAAC,CAAC;IACxC,yEAAyE;IACzE,IAAI,EAAE,QAAQ,CAAC;IACf;;;;OAIG;IACH,MAAM,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IACzB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;CACvC;AAED;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,aAAa,GAAG,SAAS,CA+B3D"}
@@ -25,7 +25,7 @@ import { IR_TECHNIQUE_RULES } from "../core/irTechnique.js";
25
25
  * @returns The window and the gestures that move it.
26
26
  */
27
27
  export function useIrZoom(options) {
28
- const { spectra, technique = 'infrared', mode, svgRef, plot, domain = null, drag = 'xAxis', } = options;
28
+ const { spectra, technique = 'infrared', mode, svgRef, plot, domain = null, drag = 'xAxis', onClick, } = options;
29
29
  const fitted = useMemo(() => fullDomain(spectra, mode), [spectra, mode]);
30
30
  const fitKey = useMemo(() => fittedTo(spectra, mode), [spectra, mode]);
31
31
  const yAxis = useMemo(() => yAxisRules(mode), [mode]);
@@ -42,6 +42,7 @@ export function useIrZoom(options) {
42
42
  domain,
43
43
  gestures,
44
44
  reverseX: IR_TECHNIQUE_RULES[technique].reverseX,
45
+ onClick,
45
46
  });
46
47
  }
47
48
  //# sourceMappingURL=useIrZoom.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useIrZoom.js","sourceRoot":"","sources":["../../../src/ir/ui/useIrZoom.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAKhC,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,QAAQ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kB,CAAC,SAAS,CAAC,CAAC,QAAQ;QAChD,OAAO;KACR,CAAC,CAAC;AACL,CAAC"}
@@ -34,7 +34,7 @@
34
34
  "site.nmrium.tagline": "NMR-Spektren im Browser verarbeiten und zuordnen.",
35
35
  "site.metabo.tagline": "Eine Reihe von NMR-Spektren in eine Karte Ihrer Proben verwandeln.",
36
36
  "site.derepflow.tagline": "Die Bestandteile eines Gemischs aus seinem ¹³C-Spektrum bestimmen.",
37
- "site.surge.tagline": "Alle Konstitutionsisomere einer Summenformel.",
37
+ "site.isomers.tagline": "Alle Konstitutionsisomere einer Summenformel.",
38
38
  "site.tex.tagline": "LaTeX-Formeln, aus einer URL als SVG oder PNG gerendert.",
39
39
  "site.lcao.tagline": "Atomorbitale zu Molekülorbitalen kombinieren.",
40
40
  "site.regexp.tagline": "Reguläre Ausdrücke in einer interaktiven Spielwiese lernen.",
@@ -493,6 +493,10 @@
493
493
  "structure.tool.reactionOnly": "Nur beim Zeichnen einer Reaktion.",
494
494
  "structure.tool.unavailable": "In diesem Editor nicht verfügbar.",
495
495
  "structure.loadingEditor": "Der Editor wird geladen…",
496
+ "structure.import.open": "Eine Strukturdatei öffnen",
497
+ "structure.import.drop": "Ablegen, um die Struktur zu laden",
498
+ "structure.import.unreadableFile": "{name} enthält weder Molfile noch SMILES noch idCode, die Zeichnung bleibt erhalten.",
499
+ "structure.import.unreadableText": "Dieser Text ist weder ein Molfile noch ein SMILES noch ein idCode, die Zeichnung bleibt erhalten.",
496
500
  "structure.export.open": "Struktur exportieren",
497
501
  "structure.export.glyph": "Struktur kopieren oder speichern: SMILES, Molfile",
498
502
  "structure.export.title": "Struktur exportieren",
@@ -522,6 +526,10 @@
522
526
  "molecule3d.molecularSurface": "Moleküloberfläche",
523
527
  "molecule3d.displayOptions": "Anzeigeoptionen",
524
528
  "molecule3d.exportImage": "Bild exportieren",
529
+ "molecule3d.frames": "Bilder",
530
+ "molecule3d.framesHelp": "Ein animiertes PNG enthält alle Bilder und spielt sie in einer Schleife ab. Browser spielen es ab; ein Programm, das es nicht kann, zeigt das erste Bild.",
531
+ "molecule3d.frames.one": "Dieses",
532
+ "molecule3d.frames.all": "Alle {count}, animiert",
525
533
  "molecule3d.fullScreen": "Vollbild",
526
534
  "molecule3d.measure": "Messen",
527
535
  "molecule3d.clearMeasurements": "Alle Messungen entfernen",
@@ -34,7 +34,7 @@
34
34
  "site.nmrium.tagline": "Process and assign NMR spectra in the browser.",
35
35
  "site.metabo.tagline": "Turn a batch of NMR spectra into a map of your samples.",
36
36
  "site.derepflow.tagline": "Identify the constituents of a mixture from its ¹³C spectrum.",
37
- "site.surge.tagline": "Every constitutional isomer of a molecular formula.",
37
+ "site.isomers.tagline": "Every constitutional isomer of a molecular formula.",
38
38
  "site.tex.tagline": "LaTeX formulas rendered to SVG or PNG from a URL.",
39
39
  "site.lcao.tagline": "Combine atomic orbitals into molecular ones.",
40
40
  "site.regexp.tagline": "Learn regular expressions in a live playground.",
@@ -437,6 +437,10 @@
437
437
  "structure.tool.reactionOnly": "Only when drawing a reaction.",
438
438
  "structure.tool.unavailable": "Not available in this editor.",
439
439
  "structure.loadingEditor": "Loading the editor…",
440
+ "structure.import.open": "Open a structure file",
441
+ "structure.import.drop": "Drop to load the structure",
442
+ "structure.import.unreadableFile": "{name} holds no molfile, SMILES or idCode, so the drawing was kept.",
443
+ "structure.import.unreadableText": "That text is not a molfile, a SMILES or an idCode, so the drawing was kept.",
440
444
  "structure.export.open": "Export the structure",
441
445
  "structure.export.glyph": "Copy or save the structure: SMILES, molfile",
442
446
  "structure.export.title": "Export the structure",
@@ -498,6 +502,10 @@
498
502
  "molecule3d.molecularSurface": "Molecular surface",
499
503
  "molecule3d.displayOptions": "Display options",
500
504
  "molecule3d.exportImage": "Export image",
505
+ "molecule3d.frames": "Frames",
506
+ "molecule3d.framesHelp": "An animated PNG holds every frame and plays them in a loop. Browsers play it; a program that cannot shows its first frame.",
507
+ "molecule3d.frames.one": "This one",
508
+ "molecule3d.frames.all": "All {count}, animated",
501
509
  "molecule3d.fullScreen": "Full screen",
502
510
  "molecule3d.measure": "Measure",
503
511
  "molecule3d.clearMeasurements": "Remove all measurements",
@@ -34,7 +34,7 @@
34
34
  "site.nmrium.tagline": "Procesar y asignar espectros de RMN en el navegador.",
35
35
  "site.metabo.tagline": "Convertir un lote de espectros de RMN en un mapa de sus muestras.",
36
36
  "site.derepflow.tagline": "Identificar los constituyentes de una mezcla a partir de su espectro de ¹³C.",
37
- "site.surge.tagline": "Todos los isómeros constitucionales de una fórmula molecular.",
37
+ "site.isomers.tagline": "Todos los isómeros constitucionales de una fórmula molecular.",
38
38
  "site.tex.tagline": "Fórmulas LaTeX representadas en SVG o PNG desde una URL.",
39
39
  "site.lcao.tagline": "Combinar orbitales atómicos en orbitales moleculares.",
40
40
  "site.regexp.tagline": "Aprender expresiones regulares en un entorno interactivo.",
@@ -493,6 +493,10 @@
493
493
  "structure.tool.reactionOnly": "Solo al dibujar una reacción.",
494
494
  "structure.tool.unavailable": "No disponible en este editor.",
495
495
  "structure.loadingEditor": "Cargando el editor…",
496
+ "structure.import.open": "Abrir un archivo de estructura",
497
+ "structure.import.drop": "Suelta para cargar la estructura",
498
+ "structure.import.unreadableFile": "{name} no contiene ningún molfile, SMILES ni idCode, así que se conserva el dibujo.",
499
+ "structure.import.unreadableText": "Ese texto no es un molfile, un SMILES ni un idCode, así que se conserva el dibujo.",
496
500
  "structure.export.open": "Exportar la estructura",
497
501
  "structure.export.glyph": "Copiar o guardar la estructura: SMILES, molfile",
498
502
  "structure.export.title": "Exportar la estructura",
@@ -522,6 +526,10 @@
522
526
  "molecule3d.molecularSurface": "Superficie molecular",
523
527
  "molecule3d.displayOptions": "Opciones de presentación",
524
528
  "molecule3d.exportImage": "Exportar la imagen",
529
+ "molecule3d.frames": "Fotogramas",
530
+ "molecule3d.framesHelp": "Un PNG animado contiene todos los fotogramas y los reproduce en bucle. Los navegadores lo reproducen; un programa que no puede muestra el primer fotograma.",
531
+ "molecule3d.frames.one": "Este",
532
+ "molecule3d.frames.all": "Los {count}, animados",
525
533
  "molecule3d.fullScreen": "Pantalla completa",
526
534
  "molecule3d.measure": "Medir",
527
535
  "molecule3d.clearMeasurements": "Quitar todas las medidas",
@@ -34,7 +34,7 @@
34
34
  "site.nmrium.tagline": "Traiter et attribuer des spectres RMN dans le navigateur.",
35
35
  "site.metabo.tagline": "Transformer un lot de spectres RMN en une carte de vos échantillons.",
36
36
  "site.derepflow.tagline": "Identifier les constituants d'un mélange à partir de son spectre ¹³C.",
37
- "site.surge.tagline": "Tous les isomères de constitution d'une formule moléculaire.",
37
+ "site.isomers.tagline": "Tous les isomères de constitution d'une formule moléculaire.",
38
38
  "site.tex.tagline": "Des formules LaTeX rendues en SVG ou PNG depuis une URL.",
39
39
  "site.lcao.tagline": "Combiner des orbitales atomiques en orbitales moléculaires.",
40
40
  "site.regexp.tagline": "Apprendre les expressions régulières dans un bac à sable interactif.",
@@ -493,6 +493,10 @@
493
493
  "structure.tool.reactionOnly": "Seulement lors du dessin d'une réaction.",
494
494
  "structure.tool.unavailable": "Indisponible dans cet éditeur.",
495
495
  "structure.loadingEditor": "Chargement de l'éditeur…",
496
+ "structure.import.open": "Ouvrir un fichier de structure",
497
+ "structure.import.drop": "Déposer pour charger la structure",
498
+ "structure.import.unreadableFile": "{name} ne contient ni molfile, ni SMILES, ni idCode : le dessin est conservé.",
499
+ "structure.import.unreadableText": "Ce texte n'est ni un molfile, ni un SMILES, ni un idCode : le dessin est conservé.",
496
500
  "structure.export.open": "Exporter la structure",
497
501
  "structure.export.glyph": "Copier ou enregistrer la structure : SMILES, molfile",
498
502
  "structure.export.title": "Exporter la structure",
@@ -522,6 +526,10 @@
522
526
  "molecule3d.molecularSurface": "Surface moléculaire",
523
527
  "molecule3d.displayOptions": "Options d'affichage",
524
528
  "molecule3d.exportImage": "Exporter l'image",
529
+ "molecule3d.frames": "Images",
530
+ "molecule3d.framesHelp": "Un PNG animé contient toutes les images et les joue en boucle. Les navigateurs le jouent ; un programme qui ne le peut pas montre la première image.",
531
+ "molecule3d.frames.one": "Celle-ci",
532
+ "molecule3d.frames.all": "Les {count}, animées",
525
533
  "molecule3d.fullScreen": "Plein écran",
526
534
  "molecule3d.measure": "Mesurer",
527
535
  "molecule3d.clearMeasurements": "Retirer toutes les mesures",
@@ -34,7 +34,7 @@
34
34
  "site.nmrium.tagline": "Elaborare e assegnare spettri NMR nel browser.",
35
35
  "site.metabo.tagline": "Trasformare una serie di spettri NMR in una mappa dei propri campioni.",
36
36
  "site.derepflow.tagline": "Identificare i costituenti di una miscela dal suo spettro ¹³C.",
37
- "site.surge.tagline": "Tutti gli isomeri costituzionali di una formula molecolare.",
37
+ "site.isomers.tagline": "Tutti gli isomeri costituzionali di una formula molecolare.",
38
38
  "site.tex.tagline": "Formule LaTeX rese in SVG o PNG a partire da un URL.",
39
39
  "site.lcao.tagline": "Combinare orbitali atomici in orbitali molecolari.",
40
40
  "site.regexp.tagline": "Imparare le espressioni regolari in un ambiente interattivo.",
@@ -437,6 +437,10 @@
437
437
  "structure.tool.reactionOnly": "Solo quando si disegna una reazione.",
438
438
  "structure.tool.unavailable": "Non disponibile in questo editor.",
439
439
  "structure.loadingEditor": "Caricamento dell'editor…",
440
+ "structure.import.open": "Apri un file di struttura",
441
+ "structure.import.drop": "Rilascia per caricare la struttura",
442
+ "structure.import.unreadableFile": "{name} non contiene né molfile, né SMILES, né idCode, quindi il disegno resta com'era.",
443
+ "structure.import.unreadableText": "Questo testo non è né un molfile, né uno SMILES, né un idCode, quindi il disegno resta com'era.",
440
444
  "structure.export.open": "Esporta la struttura",
441
445
  "structure.export.glyph": "Copia o salva la struttura: SMILES, molfile",
442
446
  "structure.export.title": "Esporta la struttura",
@@ -498,6 +502,10 @@
498
502
  "molecule3d.molecularSurface": "Superficie molecolare",
499
503
  "molecule3d.displayOptions": "Opzioni di visualizzazione",
500
504
  "molecule3d.exportImage": "Esporta l'immagine",
505
+ "molecule3d.frames": "Fotogrammi",
506
+ "molecule3d.framesHelp": "Un PNG animato contiene tutti i fotogrammi e li riproduce in ciclo. I browser lo riproducono; un programma che non può mostra il primo fotogramma.",
507
+ "molecule3d.frames.one": "Questo",
508
+ "molecule3d.frames.all": "Tutti i {count}, animati",
501
509
  "molecule3d.fullScreen": "Schermo intero",
502
510
  "molecule3d.measure": "Misura",
503
511
  "molecule3d.clearMeasurements": "Togli tutte le misure",
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Frames of a scene as one animated PNG, which loops forever.
3
+ *
4
+ * An APNG is a PNG whose frames every browser plays, and whose first frame
5
+ * any program that does not play them still shows. It keeps every colour of a
6
+ * shaded molecule, which a GIF's 256 cannot.
7
+ */
8
+ /** How many frames a second are played, and saved, when nobody says. */
9
+ export declare const DEFAULT_FRAMES_PER_SECOND = 25;
10
+ /** One frame: its pixels as RGBA bytes, row by row from the top. */
11
+ export interface RgbaFrame {
12
+ width: number;
13
+ height: number;
14
+ data: Uint8ClampedArray | Uint8Array;
15
+ }
16
+ /**
17
+ * Encode frames as one animated PNG, every frame shown for the same time, the
18
+ * whole looping forever. The encoder is loaded on first use.
19
+ * @param frames - The frames, in order, all the same size.
20
+ * @param framesPerSecond - How many are shown per second.
21
+ * @returns The PNG file.
22
+ * @throws {Error} When there is no frame, or the frames differ in size.
23
+ */
24
+ export declare function encodeAnimatedPng(frames: readonly RgbaFrame[], framesPerSecond: number): Promise<Uint8Array<ArrayBuffer>>;
25
+ //# sourceMappingURL=animatedPng.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"animatedPng.d.ts","sourceRoot":"","sources":["../../../src/molecule3d/core/animatedPng.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,wEAAwE;AACxE,eAAO,MAAM,yBAAyB,KAAK,CAAC;AAE5C,oEAAoE;AACpE,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,iBAAiB,GAAG,UAAU,CAAC;CACtC;AAED;;;;;;;GAOG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,SAAS,SAAS,EAAE,EAC5B,eAAe,EAAE,MAAM,GACtB,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAiBlC"}
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Frames of a scene as one animated PNG, which loops forever.
3
+ *
4
+ * An APNG is a PNG whose frames every browser plays, and whose first frame
5
+ * any program that does not play them still shows. It keeps every colour of a
6
+ * shaded molecule, which a GIF's 256 cannot.
7
+ */
8
+ /** How many frames a second are played, and saved, when nobody says. */
9
+ export const DEFAULT_FRAMES_PER_SECOND = 25;
10
+ /**
11
+ * Encode frames as one animated PNG, every frame shown for the same time, the
12
+ * whole looping forever. The encoder is loaded on first use.
13
+ * @param frames - The frames, in order, all the same size.
14
+ * @param framesPerSecond - How many are shown per second.
15
+ * @returns The PNG file.
16
+ * @throws {Error} When there is no frame, or the frames differ in size.
17
+ */
18
+ export async function encodeAnimatedPng(frames, framesPerSecond) {
19
+ const first = frames[0];
20
+ if (first === undefined)
21
+ throw new Error('There is no frame to encode.');
22
+ const { width, height } = first;
23
+ const buffers = [];
24
+ const delays = [];
25
+ const delay = Math.max(1, Math.round(1000 / framesPerSecond));
26
+ for (const frame of frames) {
27
+ if (frame.width !== width || frame.height !== height) {
28
+ throw new Error('Every frame of an animated PNG must be the same size.');
29
+ }
30
+ buffers.push(rgbaBuffer(frame));
31
+ delays.push(delay);
32
+ }
33
+ const upng = await loadEncoder();
34
+ // 0 colours: lossless.
35
+ return new Uint8Array(upng.encode(buffers, width, height, 0, delays));
36
+ }
37
+ /**
38
+ * The bytes of a frame in an ArrayBuffer of their own size, which the encoder
39
+ * reads whole.
40
+ * @param frame - The frame.
41
+ * @returns Its RGBA bytes.
42
+ */
43
+ function rgbaBuffer(frame) {
44
+ const { data } = frame;
45
+ const { buffer, byteOffset, byteLength } = data;
46
+ if (buffer instanceof ArrayBuffer &&
47
+ byteOffset === 0 &&
48
+ byteLength === buffer.byteLength) {
49
+ return buffer;
50
+ }
51
+ return new Uint8Array(data).buffer;
52
+ }
53
+ async function loadEncoder() {
54
+ const { default: loaded } = (await import('@pdf-lib/upng'));
55
+ // A bundler hands the ES build's one default object; Node's own import hands
56
+ // the exports of the CommonJS build, whose default is that object.
57
+ return 'encode' in loaded ? loaded : loaded.default;
58
+ }
59
+ //# sourceMappingURL=animatedPng.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"animatedPng.js","sourceRoot":"","sources":["../../../src/molecule3d/core/animatedPng.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,wEAAwE;AACxE,MAAM,CAAC,MAAM,yBAAyB,GAAG,EAAE,CAAC;AAS5C;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,MAA4B,EAC5B,eAAuB;IAEvB,MAAM,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IACxB,IAAI,KAAK,KAAK,SAAS;QAAE,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;IACzE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IAChC,MAAM,OAAO,GAAkB,EAAE,CAAC;IAClC,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,eAAe,CAAC,CAAC,CAAC;IAC9D,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,IAAI,KAAK,CAAC,KAAK,KAAK,KAAK,IAAI,KAAK,CAAC,MAAM,KAAK,MAAM,EAAE,CAAC;YACrD,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;QAC3E,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;QAChC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC;IACD,MAAM,IAAI,GAAG,MAAM,WAAW,EAAE,CAAC;IACjC,uBAAuB;IACvB,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;AACxE,CAAC;AAED;;;;;GAKG;AACH,SAAS,UAAU,CAAC,KAAgB;IAClC,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;IACvB,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;IAChD,IACE,MAAM,YAAY,WAAW;QAC7B,UAAU,KAAK,CAAC;QAChB,UAAU,KAAK,MAAM,CAAC,UAAU,EAChC,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC;AACrC,CAAC;AAID,KAAK,UAAU,WAAW;IACxB,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,MAAM,CAAC,eAAe,CAAC,CAEzD,CAAC;IACF,6EAA6E;IAC7E,mEAAmE;IACnE,OAAO,QAAQ,IAAI,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC;AACtD,CAAC"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * A molfile for the viewer, with the parser molstar has to read it with.
3
+ *
4
+ * A file of several models — an SDF of several records, an XYZ of several
5
+ * frames — is a series of frames of one molecule, which the viewer can play
6
+ * and export as an animated PNG.
7
+ */
8
+ export interface Molecule3DFile {
9
+ /**
10
+ * molstar's format id: `mol` reads V2000, `sdf` reads V2000 and V3000, `xyz`
11
+ * reads bare coordinates and infers the bonds from the distances.
12
+ */
13
+ format: 'mol' | 'sdf' | 'xyz';
14
+ /** The file text. It must carry 3D coordinates. */
15
+ data: string;
16
+ /**
17
+ * Names the molecule the file draws, when several files draw one — one per
18
+ * normal mode, say. Replacing a file by another of the same name keeps the
19
+ * camera where the reader left it, instead of framing a new molecule.
20
+ * @default undefined — every other file is another molecule
21
+ */
22
+ moleculeId?: string;
23
+ }
24
+ //# sourceMappingURL=file.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../../src/molecule3d/core/file.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,MAAM,EAAE,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;IAC9B,mDAAmD;IACnD,IAAI,EAAE,MAAM,CAAC;IACb;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=file.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file.js","sourceRoot":"","sources":["../../../src/molecule3d/core/file.ts"],"names":[],"mappings":""}