nmrium 1.6.1 → 1.8.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 (488) hide show
  1. package/lib/component/1d/FloatingRanges.js +4 -4
  2. package/lib/component/1d/FloatingRanges.js.map +1 -1
  3. package/lib/component/1d/database/DatabaseSpectrum.js +1 -1
  4. package/lib/component/1d/database/DatabaseSpectrum.js.map +1 -1
  5. package/lib/component/1d/multiAnalysis/MultiAnalysisRanges.js +1 -1
  6. package/lib/component/1d/multiAnalysis/MultiAnalysisRanges.js.map +1 -1
  7. package/lib/component/1d/multiplicityTree/MultiplicityTree.d.ts.map +1 -1
  8. package/lib/component/1d/multiplicityTree/MultiplicityTree.js +4 -2
  9. package/lib/component/1d/multiplicityTree/MultiplicityTree.js.map +1 -1
  10. package/lib/component/1d/peaks/PeakAnnotations.d.ts.map +1 -1
  11. package/lib/component/1d/peaks/PeakAnnotations.js +2 -2
  12. package/lib/component/1d/peaks/PeakAnnotations.js.map +1 -1
  13. package/lib/component/1d/peaks/PeakAnnotationsSpreadMode.d.ts.map +1 -1
  14. package/lib/component/1d/peaks/PeakAnnotationsSpreadMode.js +4 -4
  15. package/lib/component/1d/peaks/PeakAnnotationsSpreadMode.js.map +1 -1
  16. package/lib/component/1d/peaks/Peaks.d.ts +4 -1
  17. package/lib/component/1d/peaks/Peaks.d.ts.map +1 -1
  18. package/lib/component/1d/peaks/Peaks.js +5 -2
  19. package/lib/component/1d/peaks/Peaks.js.map +1 -1
  20. package/lib/component/1d/ranges/Atoms.d.ts.map +1 -1
  21. package/lib/component/1d/ranges/Atoms.js +24 -9
  22. package/lib/component/1d/ranges/Atoms.js.map +1 -1
  23. package/lib/component/1d/ranges/Range.d.ts.map +1 -1
  24. package/lib/component/1d/ranges/Range.js +3 -3
  25. package/lib/component/1d/ranges/Range.js.map +1 -1
  26. package/lib/component/1d/ranges/RangesIntegrals.d.ts.map +1 -1
  27. package/lib/component/1d/ranges/RangesIntegrals.js +5 -3
  28. package/lib/component/1d/ranges/RangesIntegrals.js.map +1 -1
  29. package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.d.ts +2 -1
  30. package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.d.ts.map +1 -1
  31. package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js +32 -41
  32. package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js.map +1 -1
  33. package/lib/component/1d-2d/components/FloatMoleculeStructures/FloatMolecules.d.ts.map +1 -1
  34. package/lib/component/1d-2d/components/FloatMoleculeStructures/FloatMolecules.js.map +1 -1
  35. package/lib/component/2d/FooterBanner.js +2 -2
  36. package/lib/component/2d/FooterBanner.js.map +1 -1
  37. package/lib/component/2d/YAxis.d.ts +0 -1
  38. package/lib/component/2d/YAxis.d.ts.map +1 -1
  39. package/lib/component/2d/YAxis.js +11 -4
  40. package/lib/component/2d/YAxis.js.map +1 -1
  41. package/lib/component/2d/useTracesSpectra.d.ts.map +1 -1
  42. package/lib/component/2d/useTracesSpectra.js +2 -0
  43. package/lib/component/2d/useTracesSpectra.js.map +1 -1
  44. package/lib/component/2d/utilities/extractSpectrumSignals.d.ts +2 -9
  45. package/lib/component/2d/utilities/extractSpectrumSignals.d.ts.map +1 -1
  46. package/lib/component/2d/utilities/extractSpectrumSignals.js +4 -5
  47. package/lib/component/2d/utilities/extractSpectrumSignals.js.map +1 -1
  48. package/lib/component/2d/zones/SignalsGuideLines.d.ts.map +1 -1
  49. package/lib/component/2d/zones/SignalsGuideLines.js +7 -10
  50. package/lib/component/2d/zones/SignalsGuideLines.js.map +1 -1
  51. package/lib/component/2d/zones/ZonesAssignmentsLabels.d.ts.map +1 -1
  52. package/lib/component/2d/zones/ZonesAssignmentsLabels.js.map +1 -1
  53. package/lib/component/context/DispatchContext.d.ts +2 -2
  54. package/lib/component/context/DispatchContext.d.ts.map +1 -1
  55. package/lib/component/context/LoggerContext.d.ts.map +1 -1
  56. package/lib/component/context/LoggerContext.js +8 -9
  57. package/lib/component/context/LoggerContext.js.map +1 -1
  58. package/lib/component/context/PreferencesContext.d.ts +7 -3
  59. package/lib/component/context/PreferencesContext.d.ts.map +1 -1
  60. package/lib/component/context/PreferencesContext.js +1 -2
  61. package/lib/component/context/PreferencesContext.js.map +1 -1
  62. package/lib/component/elements/D3Axis.d.ts.map +1 -1
  63. package/lib/component/elements/D3Axis.js +1 -1
  64. package/lib/component/elements/D3Axis.js.map +1 -1
  65. package/lib/component/elements/Sections.js +1 -1
  66. package/lib/component/elements/Sections.js.map +1 -1
  67. package/lib/component/hooks/useActiveSpectrumRangesViewState.d.ts.map +1 -1
  68. package/lib/component/hooks/useActiveSpectrumRangesViewState.js +2 -2
  69. package/lib/component/hooks/useActiveSpectrumRangesViewState.js.map +1 -1
  70. package/lib/component/hooks/useExport.d.ts.map +1 -1
  71. package/lib/component/hooks/useExport.js +24 -6
  72. package/lib/component/hooks/useExport.js.map +1 -1
  73. package/lib/component/loader/Spinner.js +1 -1
  74. package/lib/component/loader/Spinner.js.map +1 -1
  75. package/lib/component/loader/useLoadFiles.d.ts.map +1 -1
  76. package/lib/component/loader/useLoadFiles.js +60 -25
  77. package/lib/component/loader/useLoadFiles.js.map +1 -1
  78. package/lib/component/main/InnerNMRium.d.ts.map +1 -1
  79. package/lib/component/main/InnerNMRium.js +4 -2
  80. package/lib/component/main/InnerNMRium.js.map +1 -1
  81. package/lib/component/main/NMRiumStateProvider.d.ts.map +1 -1
  82. package/lib/component/main/NMRiumStateProvider.js +17 -6
  83. package/lib/component/main/NMRiumStateProvider.js.map +1 -1
  84. package/lib/component/modal/LoadJCAMPModal.d.ts.map +1 -1
  85. package/lib/component/modal/LoadJCAMPModal.js +7 -3
  86. package/lib/component/modal/LoadJCAMPModal.js.map +1 -1
  87. package/lib/component/modal/MoleculeStructureEditorModal.d.ts.map +1 -1
  88. package/lib/component/modal/MoleculeStructureEditorModal.js +7 -3
  89. package/lib/component/modal/MoleculeStructureEditorModal.js.map +1 -1
  90. package/lib/component/modal/MultipletAnalysisModal.js +0 -2
  91. package/lib/component/modal/MultipletAnalysisModal.js.map +1 -1
  92. package/lib/component/modal/SaveAsModal.d.ts.map +1 -1
  93. package/lib/component/modal/SaveAsModal.js +10 -3
  94. package/lib/component/modal/SaveAsModal.js.map +1 -1
  95. package/lib/component/modal/changeSum/ChangeSumModalContents.d.ts.map +1 -1
  96. package/lib/component/modal/changeSum/ChangeSumModalContents.js +0 -2
  97. package/lib/component/modal/changeSum/ChangeSumModalContents.js.map +1 -1
  98. package/lib/component/modal/changeSum/SelectMolecule.d.ts.map +1 -1
  99. package/lib/component/modal/changeSum/SelectMolecule.js +0 -2
  100. package/lib/component/modal/changeSum/SelectMolecule.js.map +1 -1
  101. package/lib/component/modal/setting/settings-tabs/DatabasesTabContent.d.ts +2 -2
  102. package/lib/component/modal/setting/settings-tabs/DatabasesTabContent.d.ts.map +1 -1
  103. package/lib/component/modal/setting/settings-tabs/DatabasesTabContent.js +1 -2
  104. package/lib/component/modal/setting/settings-tabs/DatabasesTabContent.js.map +1 -1
  105. package/lib/component/modal/setting/settings-tabs/ToolsTabContent.d.ts.map +1 -1
  106. package/lib/component/modal/setting/settings-tabs/ToolsTabContent.js +16 -0
  107. package/lib/component/modal/setting/settings-tabs/ToolsTabContent.js.map +1 -1
  108. package/lib/component/modal/setting/settingsValidation.js +2 -2
  109. package/lib/component/modal/setting/settingsValidation.js.map +1 -1
  110. package/lib/component/panels/IntegralsPanel/IntegralPanel.d.ts.map +1 -1
  111. package/lib/component/panels/IntegralsPanel/IntegralPanel.js +2 -1
  112. package/lib/component/panels/IntegralsPanel/IntegralPanel.js.map +1 -1
  113. package/lib/component/panels/IntegralsPanel/IntegralTable.d.ts +1 -1
  114. package/lib/component/panels/IntegralsPanel/IntegralTable.d.ts.map +1 -1
  115. package/lib/component/panels/IntegralsPanel/IntegralTable.js +4 -3
  116. package/lib/component/panels/IntegralsPanel/IntegralTable.js.map +1 -1
  117. package/lib/component/panels/MoleculesPanel/MoleculeOptionsPanel.d.ts +6 -0
  118. package/lib/component/panels/MoleculesPanel/MoleculeOptionsPanel.d.ts.map +1 -0
  119. package/lib/component/panels/MoleculesPanel/MoleculeOptionsPanel.js +87 -0
  120. package/lib/component/panels/MoleculesPanel/MoleculeOptionsPanel.js.map +1 -0
  121. package/lib/component/panels/MoleculesPanel/MoleculePanel.d.ts.map +1 -1
  122. package/lib/component/panels/MoleculesPanel/MoleculePanel.js +18 -28
  123. package/lib/component/panels/MoleculesPanel/MoleculePanel.js.map +1 -1
  124. package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.d.ts.map +1 -1
  125. package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +32 -25
  126. package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js.map +1 -1
  127. package/lib/component/panels/MoleculesPanel/MoleculeStructure.d.ts +13 -0
  128. package/lib/component/panels/MoleculesPanel/MoleculeStructure.d.ts.map +1 -0
  129. package/lib/component/panels/MoleculesPanel/MoleculeStructure.js +66 -0
  130. package/lib/component/panels/MoleculesPanel/MoleculeStructure.js.map +1 -0
  131. package/lib/component/panels/MoleculesPanel/{useAtomAssignment.d.ts → hooks/useAtomAssignment.d.ts} +1 -1
  132. package/lib/component/panels/MoleculesPanel/hooks/useAtomAssignment.d.ts.map +1 -0
  133. package/lib/component/panels/MoleculesPanel/{useAtomAssignment.js → hooks/useAtomAssignment.js} +50 -19
  134. package/lib/component/panels/MoleculesPanel/hooks/useAtomAssignment.js.map +1 -0
  135. package/lib/component/panels/MoleculesPanel/hooks/useExtractAtomAssignmentLabel.d.ts +12 -0
  136. package/lib/component/panels/MoleculesPanel/hooks/useExtractAtomAssignmentLabel.d.ts.map +1 -0
  137. package/lib/component/panels/MoleculesPanel/hooks/useExtractAtomAssignmentLabel.js +58 -0
  138. package/lib/component/panels/MoleculesPanel/hooks/useExtractAtomAssignmentLabel.js.map +1 -0
  139. package/lib/component/panels/MoleculesPanel/utilities/AtomData.d.ts +5 -0
  140. package/lib/component/panels/MoleculesPanel/utilities/AtomData.d.ts.map +1 -0
  141. package/lib/component/panels/MoleculesPanel/utilities/AtomData.js +2 -0
  142. package/lib/component/panels/MoleculesPanel/utilities/AtomData.js.map +1 -0
  143. package/lib/component/panels/MoleculesPanel/utilities/extractFromAtom.d.ts +16 -0
  144. package/lib/component/panels/MoleculesPanel/utilities/extractFromAtom.d.ts.map +1 -0
  145. package/lib/component/panels/MoleculesPanel/utilities/extractFromAtom.js +47 -0
  146. package/lib/component/panels/MoleculesPanel/utilities/extractFromAtom.js.map +1 -0
  147. package/lib/component/panels/MoleculesPanel/utilities/getAssignIds.d.ts +18 -0
  148. package/lib/component/panels/MoleculesPanel/utilities/getAssignIds.d.ts.map +1 -0
  149. package/lib/component/panels/MoleculesPanel/utilities/getAssignIds.js +31 -0
  150. package/lib/component/panels/MoleculesPanel/utilities/getAssignIds.js.map +1 -0
  151. package/lib/component/panels/MoleculesPanel/utilities/getCurrentDiaIDsToHighlight.d.ts +3 -0
  152. package/lib/component/panels/MoleculesPanel/utilities/getCurrentDiaIDsToHighlight.d.ts.map +1 -0
  153. package/lib/component/panels/MoleculesPanel/utilities/getCurrentDiaIDsToHighlight.js +12 -0
  154. package/lib/component/panels/MoleculesPanel/utilities/getCurrentDiaIDsToHighlight.js.map +1 -0
  155. package/lib/component/panels/MoleculesPanel/utilities/getHighlightsOnHover.d.ts +4 -0
  156. package/lib/component/panels/MoleculesPanel/utilities/getHighlightsOnHover.d.ts.map +1 -0
  157. package/lib/component/panels/MoleculesPanel/utilities/getHighlightsOnHover.js +25 -0
  158. package/lib/component/panels/MoleculesPanel/utilities/getHighlightsOnHover.js.map +1 -0
  159. package/lib/component/panels/MoleculesPanel/utilities/getUniqueDiaIDs.d.ts +6 -0
  160. package/lib/component/panels/MoleculesPanel/utilities/getUniqueDiaIDs.d.ts.map +1 -0
  161. package/lib/component/panels/MoleculesPanel/utilities/getUniqueDiaIDs.js +18 -0
  162. package/lib/component/panels/MoleculesPanel/utilities/getUniqueDiaIDs.js.map +1 -0
  163. package/lib/component/panels/PeaksPanel/PeaksPanel.d.ts.map +1 -1
  164. package/lib/component/panels/PeaksPanel/PeaksPanel.js +24 -26
  165. package/lib/component/panels/PeaksPanel/PeaksPanel.js.map +1 -1
  166. package/lib/component/panels/PeaksPanel/PeaksTable.d.ts +1 -1
  167. package/lib/component/panels/PeaksPanel/PeaksTable.d.ts.map +1 -1
  168. package/lib/component/panels/PeaksPanel/PeaksTable.js +3 -2
  169. package/lib/component/panels/PeaksPanel/PeaksTable.js.map +1 -1
  170. package/lib/component/panels/RangesPanel/RangesHeader.d.ts.map +1 -1
  171. package/lib/component/panels/RangesPanel/RangesHeader.js +3 -2
  172. package/lib/component/panels/RangesPanel/RangesHeader.js.map +1 -1
  173. package/lib/component/panels/RangesPanel/RangesTable.d.ts +1 -1
  174. package/lib/component/panels/RangesPanel/RangesTable.d.ts.map +1 -1
  175. package/lib/component/panels/RangesPanel/RangesTable.js +2 -1
  176. package/lib/component/panels/RangesPanel/RangesTable.js.map +1 -1
  177. package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +2 -2
  178. package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js.map +1 -1
  179. package/lib/component/panels/RangesPanel/TableColumns/RelativeColumn.js +2 -2
  180. package/lib/component/panels/RangesPanel/TableColumns/RelativeColumn.js.map +1 -1
  181. package/lib/component/panels/SpectraPanel/SpectraTable.d.ts.map +1 -1
  182. package/lib/component/panels/SpectraPanel/SpectraTable.js +3 -2
  183. package/lib/component/panels/SpectraPanel/SpectraTable.js.map +1 -1
  184. package/lib/component/panels/SummaryPanel/utilities/Utilities.js +2 -2
  185. package/lib/component/panels/SummaryPanel/utilities/Utilities.js.map +1 -1
  186. package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.js +1 -1
  187. package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.js.map +1 -1
  188. package/lib/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.d.ts.map +1 -1
  189. package/lib/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.js +0 -4
  190. package/lib/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.js.map +1 -1
  191. package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.js +8 -8
  192. package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.js.map +1 -1
  193. package/lib/component/panels/ZonesPanel/ZonesPanel.d.ts.map +1 -1
  194. package/lib/component/panels/ZonesPanel/ZonesPanel.js +6 -1
  195. package/lib/component/panels/ZonesPanel/ZonesPanel.js.map +1 -1
  196. package/lib/component/panels/ZonesPanel/ZonesTable.d.ts +8 -9
  197. package/lib/component/panels/ZonesPanel/ZonesTable.d.ts.map +1 -1
  198. package/lib/component/panels/ZonesPanel/ZonesTable.js +3 -2
  199. package/lib/component/panels/ZonesPanel/ZonesTable.js.map +1 -1
  200. package/lib/component/panels/ZonesPanel/ZonesTableRow.d.ts.map +1 -1
  201. package/lib/component/panels/ZonesPanel/ZonesTableRow.js +0 -2
  202. package/lib/component/panels/ZonesPanel/ZonesTableRow.js.map +1 -1
  203. package/lib/component/panels/ZonesPanel/hooks/useMapZones.d.ts +7 -7
  204. package/lib/component/panels/ZonesPanel/hooks/useMapZones.d.ts.map +1 -1
  205. package/lib/component/panels/ZonesPanel/hooks/useMapZones.js +3 -3
  206. package/lib/component/panels/ZonesPanel/hooks/useMapZones.js.map +1 -1
  207. package/lib/component/panels/databasePanel/DatabasePanel.d.ts.map +1 -1
  208. package/lib/component/panels/databasePanel/DatabasePanel.js +13 -10
  209. package/lib/component/panels/databasePanel/DatabasePanel.js.map +1 -1
  210. package/lib/component/panels/filtersPanel/Filters/hooks/usePhaseCorrectionTwoDimensions.d.ts.map +1 -1
  211. package/lib/component/panels/filtersPanel/Filters/hooks/usePhaseCorrectionTwoDimensions.js +0 -2
  212. package/lib/component/panels/filtersPanel/Filters/hooks/usePhaseCorrectionTwoDimensions.js.map +1 -1
  213. package/lib/component/panels/hooks/useMoleculeAnnotationCore.d.ts +9 -0
  214. package/lib/component/panels/hooks/useMoleculeAnnotationCore.d.ts.map +1 -0
  215. package/lib/component/panels/hooks/useMoleculeAnnotationCore.js +27 -0
  216. package/lib/component/panels/hooks/useMoleculeAnnotationCore.js.map +1 -0
  217. package/lib/component/panels/multipleAnalysisPanel/preferences/MultipleAnalysisCodeEditor.d.ts.map +1 -1
  218. package/lib/component/panels/multipleAnalysisPanel/preferences/MultipleAnalysisCodeEditor.js +0 -2
  219. package/lib/component/panels/multipleAnalysisPanel/preferences/MultipleAnalysisCodeEditor.js.map +1 -1
  220. package/lib/component/reducer/IgnoreActions.d.ts.map +1 -1
  221. package/lib/component/reducer/IgnoreActions.js +2 -1
  222. package/lib/component/reducer/IgnoreActions.js.map +1 -1
  223. package/lib/component/reducer/Reducer.d.ts +13 -1
  224. package/lib/component/reducer/Reducer.d.ts.map +1 -1
  225. package/lib/component/reducer/Reducer.js +10 -3
  226. package/lib/component/reducer/Reducer.js.map +1 -1
  227. package/lib/component/reducer/actions/DatabaseActions.d.ts.map +1 -1
  228. package/lib/component/reducer/actions/DatabaseActions.js +2 -1
  229. package/lib/component/reducer/actions/DatabaseActions.js.map +1 -1
  230. package/lib/component/reducer/actions/IntegralsActions.js.map +1 -1
  231. package/lib/component/reducer/actions/{LoadActions.d.ts → LoadAction.d.ts} +16 -5
  232. package/lib/component/reducer/actions/LoadAction.d.ts.map +1 -0
  233. package/lib/component/reducer/actions/{LoadActions.js → LoadAction.js} +60 -16
  234. package/lib/component/reducer/actions/LoadAction.js.map +1 -0
  235. package/lib/component/reducer/actions/MoleculeActions.d.ts +22 -6
  236. package/lib/component/reducer/actions/MoleculeActions.d.ts.map +1 -1
  237. package/lib/component/reducer/actions/MoleculeActions.js +43 -29
  238. package/lib/component/reducer/actions/MoleculeActions.js.map +1 -1
  239. package/lib/component/reducer/actions/RangesActions.d.ts +12 -6
  240. package/lib/component/reducer/actions/RangesActions.d.ts.map +1 -1
  241. package/lib/component/reducer/actions/RangesActions.js +37 -16
  242. package/lib/component/reducer/actions/RangesActions.js.map +1 -1
  243. package/lib/component/reducer/actions/ZonesActions.d.ts +3 -3
  244. package/lib/component/reducer/actions/ZonesActions.d.ts.map +1 -1
  245. package/lib/component/reducer/actions/ZonesActions.js +9 -4
  246. package/lib/component/reducer/actions/ZonesActions.js.map +1 -1
  247. package/lib/component/reducer/preferences/actions/changeDefaultMoleculeSettings.d.ts +4 -0
  248. package/lib/component/reducer/preferences/actions/changeDefaultMoleculeSettings.d.ts.map +1 -0
  249. package/lib/component/reducer/preferences/actions/changeDefaultMoleculeSettings.js +7 -0
  250. package/lib/component/reducer/preferences/actions/changeDefaultMoleculeSettings.js.map +1 -0
  251. package/lib/component/reducer/preferences/actions/initPreferences.d.ts.map +1 -1
  252. package/lib/component/reducer/preferences/actions/initPreferences.js +1 -2
  253. package/lib/component/reducer/preferences/actions/initPreferences.js.map +1 -1
  254. package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.d.ts.map +1 -1
  255. package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js +2 -1
  256. package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js.map +1 -1
  257. package/lib/component/reducer/preferences/preferencesReducer.d.ts +9 -8
  258. package/lib/component/reducer/preferences/preferencesReducer.d.ts.map +1 -1
  259. package/lib/component/reducer/preferences/preferencesReducer.js +3 -1
  260. package/lib/component/reducer/preferences/preferencesReducer.js.map +1 -1
  261. package/lib/component/toolbar/ToolTypes.d.ts.map +1 -1
  262. package/lib/component/toolbar/ToolTypes.js +1 -0
  263. package/lib/component/toolbar/ToolTypes.js.map +1 -1
  264. package/lib/component/utility/export.d.ts +3 -3
  265. package/lib/component/utility/export.d.ts.map +1 -1
  266. package/lib/component/utility/export.js +13 -21
  267. package/lib/component/utility/export.js.map +1 -1
  268. package/lib/component/utility/getClosePeak.js +1 -1
  269. package/lib/component/utility/getClosePeak.js.map +1 -1
  270. package/lib/component/utility/save_as.d.ts +9 -0
  271. package/lib/component/utility/save_as.d.ts.map +1 -0
  272. package/lib/component/utility/save_as.js +7 -0
  273. package/lib/component/utility/save_as.js.map +1 -0
  274. package/lib/component/workspaces/assignment.d.ts.map +1 -1
  275. package/lib/component/workspaces/assignment.js +7 -0
  276. package/lib/component/workspaces/assignment.js.map +1 -1
  277. package/lib/component/workspaces/basic.d.ts.map +1 -1
  278. package/lib/component/workspaces/basic.js +5 -0
  279. package/lib/component/workspaces/basic.js.map +1 -1
  280. package/lib/component/workspaces/embedded.d.ts.map +1 -1
  281. package/lib/component/workspaces/embedded.js +5 -0
  282. package/lib/component/workspaces/embedded.js.map +1 -1
  283. package/lib/component/workspaces/exercise.d.ts.map +1 -1
  284. package/lib/component/workspaces/exercise.js +5 -0
  285. package/lib/component/workspaces/exercise.js.map +1 -1
  286. package/lib/component/workspaces/prediction.d.ts.map +1 -1
  287. package/lib/component/workspaces/prediction.js +5 -0
  288. package/lib/component/workspaces/prediction.js.map +1 -1
  289. package/lib/component/workspaces/process1D.d.ts.map +1 -1
  290. package/lib/component/workspaces/process1D.js +6 -0
  291. package/lib/component/workspaces/process1D.js.map +1 -1
  292. package/lib/component/workspaces/workspaceDefaultProperties.d.ts.map +1 -1
  293. package/lib/component/workspaces/workspaceDefaultProperties.js +18 -0
  294. package/lib/component/workspaces/workspaceDefaultProperties.js.map +1 -1
  295. package/lib/data/PredictionManager.d.ts.map +1 -1
  296. package/lib/data/PredictionManager.js +13 -9
  297. package/lib/data/PredictionManager.js.map +1 -1
  298. package/lib/data/SpectraManager.d.ts +45 -4
  299. package/lib/data/SpectraManager.d.ts.map +1 -1
  300. package/lib/data/SpectraManager.js +69 -12
  301. package/lib/data/SpectraManager.js.map +1 -1
  302. package/lib/data/constants/signalsKinds.d.ts +1 -6
  303. package/lib/data/constants/signalsKinds.d.ts.map +1 -1
  304. package/lib/data/constants/signalsKinds.js +2 -17
  305. package/lib/data/constants/signalsKinds.js.map +1 -1
  306. package/lib/data/data1d/Spectrum1D/generateJGraphData.js +1 -1
  307. package/lib/data/data1d/Spectrum1D/generateJGraphData.js.map +1 -1
  308. package/lib/data/data1d/Spectrum1D/initiateDatum1D.js +16 -14
  309. package/lib/data/data1d/Spectrum1D/initiateDatum1D.js.map +1 -1
  310. package/lib/data/data1d/Spectrum1D/integrals/initiateIntegrals.d.ts +1 -10
  311. package/lib/data/data1d/Spectrum1D/integrals/initiateIntegrals.d.ts.map +1 -1
  312. package/lib/data/data1d/Spectrum1D/isRangeAssigned.d.ts.map +1 -1
  313. package/lib/data/data1d/Spectrum1D/isRangeAssigned.js.map +1 -1
  314. package/lib/data/data1d/Spectrum1D/ranges/autoRangesDetection.d.ts.map +1 -1
  315. package/lib/data/data1d/Spectrum1D/ranges/autoRangesDetection.js +6 -4
  316. package/lib/data/data1d/Spectrum1D/ranges/autoRangesDetection.js.map +1 -1
  317. package/lib/data/data1d/Spectrum1D/ranges/detectRanges.d.ts.map +1 -1
  318. package/lib/data/data1d/Spectrum1D/ranges/detectRanges.js +5 -1
  319. package/lib/data/data1d/Spectrum1D/ranges/detectRanges.js.map +1 -1
  320. package/lib/data/data1d/Spectrum1D/ranges/detectSignals.d.ts +1 -1
  321. package/lib/data/data1d/Spectrum1D/ranges/detectSignals.js +1 -1
  322. package/lib/data/data2d/Spectrum2D/contours.d.ts.map +1 -1
  323. package/lib/data/data2d/Spectrum2D/contours.js +1 -1
  324. package/lib/data/data2d/Spectrum2D/contours.js.map +1 -1
  325. package/lib/data/data2d/Spectrum2D/initiateDatum2D.d.ts.map +1 -1
  326. package/lib/data/data2d/Spectrum2D/initiateDatum2D.js +6 -4
  327. package/lib/data/data2d/Spectrum2D/initiateDatum2D.js.map +1 -1
  328. package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.d.ts +2 -2
  329. package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.d.ts.map +1 -1
  330. package/lib/data/data2d/Spectrum2D/zones/initiateZones.d.ts +2 -2
  331. package/lib/data/data2d/Spectrum2D/zones/initiateZones.d.ts.map +1 -1
  332. package/lib/data/molecules/Molecule.d.ts +2 -22
  333. package/lib/data/molecules/Molecule.d.ts.map +1 -1
  334. package/lib/data/molecules/Molecule.js +3 -1
  335. package/lib/data/molecules/Molecule.js.map +1 -1
  336. package/lib/data/molecules/MoleculeManager.d.ts +3 -2
  337. package/lib/data/molecules/MoleculeManager.d.ts.map +1 -1
  338. package/lib/data/molecules/MoleculeManager.js +4 -2
  339. package/lib/data/molecules/MoleculeManager.js.map +1 -1
  340. package/lib/data/utilities/RangeUtilities.d.ts +3 -2
  341. package/lib/data/utilities/RangeUtilities.d.ts.map +1 -1
  342. package/lib/data/utilities/RangeUtilities.js +9 -3
  343. package/lib/data/utilities/RangeUtilities.js.map +1 -1
  344. package/lib/data/utilities/ZoneUtilities.d.ts.map +1 -1
  345. package/lib/data/utilities/ZoneUtilities.js +1 -2
  346. package/lib/data/utilities/ZoneUtilities.js.map +1 -1
  347. package/lib/data/utilities/isProton.d.ts +2 -0
  348. package/lib/data/utilities/isProton.d.ts.map +1 -0
  349. package/lib/data/utilities/isProton.js +4 -0
  350. package/lib/data/utilities/isProton.js.map +1 -0
  351. package/lib/versionInfo.js +1 -1
  352. package/package.json +32 -32
  353. package/src/component/1d/FloatingRanges.tsx +5 -5
  354. package/src/component/1d/database/DatabaseSpectrum.tsx +1 -1
  355. package/src/component/1d/multiAnalysis/MultiAnalysisRanges.tsx +1 -1
  356. package/src/component/1d/multiplicityTree/MultiplicityTree.tsx +4 -2
  357. package/src/component/1d/peaks/PeakAnnotations.tsx +2 -1
  358. package/src/component/1d/peaks/PeakAnnotationsSpreadMode.tsx +11 -1
  359. package/src/component/1d/peaks/Peaks.tsx +9 -3
  360. package/src/component/1d/ranges/Atoms.tsx +36 -13
  361. package/src/component/1d/ranges/Range.tsx +4 -3
  362. package/src/component/1d/ranges/RangesIntegrals.tsx +6 -2
  363. package/src/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.tsx +38 -78
  364. package/src/component/1d-2d/components/FloatMoleculeStructures/FloatMolecules.tsx +5 -2
  365. package/src/component/2d/FooterBanner.tsx +2 -2
  366. package/src/component/2d/YAxis.tsx +31 -13
  367. package/src/component/2d/useTracesSpectra.ts +3 -0
  368. package/src/component/2d/utilities/extractSpectrumSignals.ts +6 -16
  369. package/src/component/2d/zones/SignalsGuideLines.tsx +11 -9
  370. package/src/component/2d/zones/ZonesAssignmentsLabels.tsx +2 -3
  371. package/src/component/context/DispatchContext.tsx +2 -2
  372. package/src/component/context/LoggerContext.tsx +8 -11
  373. package/src/component/context/PreferencesContext.tsx +8 -5
  374. package/src/component/elements/D3Axis.tsx +1 -2
  375. package/src/component/elements/Sections.tsx +1 -1
  376. package/src/component/hooks/useActiveSpectrumRangesViewState.ts +2 -2
  377. package/src/component/hooks/useExport.tsx +38 -6
  378. package/src/component/loader/Spinner.tsx +1 -1
  379. package/src/component/loader/useLoadFiles.ts +79 -30
  380. package/src/component/main/InnerNMRium.tsx +6 -2
  381. package/src/component/main/NMRiumStateProvider.tsx +18 -7
  382. package/src/component/modal/LoadJCAMPModal.tsx +10 -5
  383. package/src/component/modal/MoleculeStructureEditorModal.tsx +11 -3
  384. package/src/component/modal/MultipletAnalysisModal.tsx +0 -2
  385. package/src/component/modal/SaveAsModal.tsx +35 -6
  386. package/src/component/modal/changeSum/ChangeSumModalContents.tsx +0 -2
  387. package/src/component/modal/changeSum/SelectMolecule.tsx +0 -2
  388. package/src/component/modal/setting/settings-tabs/DatabasesTabContent.tsx +1 -3
  389. package/src/component/modal/setting/settings-tabs/ToolsTabContent.tsx +16 -0
  390. package/src/component/modal/setting/settingsValidation.ts +2 -2
  391. package/src/component/panels/IntegralsPanel/IntegralPanel.tsx +2 -6
  392. package/src/component/panels/IntegralsPanel/IntegralTable.tsx +4 -3
  393. package/src/component/panels/MoleculesPanel/MoleculeOptionsPanel.tsx +160 -0
  394. package/src/component/panels/MoleculesPanel/MoleculePanel.tsx +77 -102
  395. package/src/component/panels/MoleculesPanel/MoleculePanelHeader.tsx +54 -35
  396. package/src/component/panels/MoleculesPanel/MoleculeStructure.tsx +117 -0
  397. package/src/component/panels/MoleculesPanel/{useAtomAssignment.tsx → hooks/useAtomAssignment.tsx} +71 -30
  398. package/src/component/panels/MoleculesPanel/hooks/useExtractAtomAssignmentLabel.ts +74 -0
  399. package/src/component/panels/MoleculesPanel/utilities/AtomData.ts +4 -0
  400. package/src/component/panels/MoleculesPanel/utilities/extractFromAtom.ts +63 -0
  401. package/src/component/panels/MoleculesPanel/utilities/getAssignIds.ts +59 -0
  402. package/src/component/panels/MoleculesPanel/utilities/getCurrentDiaIDsToHighlight.ts +12 -0
  403. package/src/component/panels/MoleculesPanel/utilities/getHighlightsOnHover.ts +36 -0
  404. package/src/component/panels/MoleculesPanel/utilities/getUniqueDiaIDs.ts +20 -0
  405. package/src/component/panels/PeaksPanel/PeaksPanel.tsx +25 -35
  406. package/src/component/panels/PeaksPanel/PeaksTable.tsx +3 -2
  407. package/src/component/panels/RangesPanel/RangesHeader.tsx +3 -2
  408. package/src/component/panels/RangesPanel/RangesTable.tsx +10 -8
  409. package/src/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.tsx +3 -3
  410. package/src/component/panels/RangesPanel/TableColumns/RelativeColumn.tsx +2 -2
  411. package/src/component/panels/SpectraPanel/SpectraTable.tsx +3 -2
  412. package/src/component/panels/SummaryPanel/utilities/Utilities.ts +2 -2
  413. package/src/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.tsx +1 -1
  414. package/src/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.tsx +0 -4
  415. package/src/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.tsx +9 -9
  416. package/src/component/panels/ZonesPanel/ZonesPanel.tsx +15 -5
  417. package/src/component/panels/ZonesPanel/ZonesTable.tsx +9 -10
  418. package/src/component/panels/ZonesPanel/ZonesTableRow.tsx +0 -2
  419. package/src/component/panels/ZonesPanel/hooks/useMapZones.ts +11 -11
  420. package/src/component/panels/databasePanel/DatabasePanel.tsx +18 -14
  421. package/src/component/panels/filtersPanel/Filters/hooks/usePhaseCorrectionTwoDimensions.tsx +0 -2
  422. package/src/component/panels/hooks/useMoleculeAnnotationCore.ts +36 -0
  423. package/src/component/panels/multipleAnalysisPanel/preferences/MultipleAnalysisCodeEditor.tsx +0 -2
  424. package/src/component/reducer/IgnoreActions.ts +2 -1
  425. package/src/component/reducer/Reducer.ts +28 -4
  426. package/src/component/reducer/actions/DatabaseActions.ts +3 -0
  427. package/src/component/reducer/actions/IntegralsActions.ts +1 -1
  428. package/src/component/reducer/actions/{LoadActions.ts → LoadAction.ts} +87 -25
  429. package/src/component/reducer/actions/MoleculeActions.ts +91 -44
  430. package/src/component/reducer/actions/RangesActions.ts +66 -30
  431. package/src/component/reducer/actions/ZonesActions.ts +18 -10
  432. package/src/component/reducer/preferences/actions/changeDefaultMoleculeSettings.ts +16 -0
  433. package/src/component/reducer/preferences/actions/initPreferences.ts +0 -3
  434. package/src/component/reducer/preferences/panelsPreferencesDefaultValues.ts +2 -1
  435. package/src/component/reducer/preferences/preferencesReducer.ts +20 -11
  436. package/src/component/toolbar/ToolTypes.ts +1 -0
  437. package/src/component/utility/export.ts +15 -20
  438. package/src/component/utility/getClosePeak.ts +1 -1
  439. package/src/component/utility/save_as.ts +16 -0
  440. package/src/component/workspaces/assignment.ts +7 -0
  441. package/src/component/workspaces/basic.ts +5 -0
  442. package/src/component/workspaces/embedded.ts +5 -0
  443. package/src/component/workspaces/exercise.ts +5 -0
  444. package/src/component/workspaces/prediction.ts +5 -0
  445. package/src/component/workspaces/process1D.ts +6 -0
  446. package/src/component/workspaces/workspaceDefaultProperties.ts +18 -0
  447. package/src/data/PredictionManager.ts +21 -14
  448. package/src/data/SpectraManager.ts +90 -19
  449. package/src/data/constants/signalsKinds.ts +5 -20
  450. package/src/data/data1d/Spectrum1D/generateJGraphData.ts +1 -1
  451. package/src/data/data1d/Spectrum1D/initiateDatum1D.ts +16 -16
  452. package/src/data/data1d/Spectrum1D/isRangeAssigned.ts +1 -0
  453. package/src/data/data1d/Spectrum1D/ranges/autoRangesDetection.ts +7 -4
  454. package/src/data/data1d/Spectrum1D/ranges/detectRanges.ts +8 -1
  455. package/src/data/data1d/Spectrum1D/ranges/detectSignals.ts +1 -1
  456. package/src/data/data2d/Spectrum2D/contours.ts +2 -3
  457. package/src/data/data2d/Spectrum2D/initiateDatum2D.ts +6 -7
  458. package/src/data/molecules/Molecule.ts +9 -23
  459. package/src/data/molecules/MoleculeManager.ts +10 -8
  460. package/src/data/utilities/RangeUtilities.ts +12 -4
  461. package/src/data/utilities/ZoneUtilities.ts +1 -3
  462. package/src/data/utilities/isProton.ts +3 -0
  463. package/src/index.tsx +0 -3
  464. package/src/versionInfo.ts +1 -1
  465. package/lib/component/panels/MoleculesPanel/Utilities.d.ts +0 -43
  466. package/lib/component/panels/MoleculesPanel/Utilities.d.ts.map +0 -1
  467. package/lib/component/panels/MoleculesPanel/Utilities.js +0 -126
  468. package/lib/component/panels/MoleculesPanel/Utilities.js.map +0 -1
  469. package/lib/component/panels/MoleculesPanel/useAtomAssignment.d.ts.map +0 -1
  470. package/lib/component/panels/MoleculesPanel/useAtomAssignment.js.map +0 -1
  471. package/lib/component/reducer/actions/LoadActions.d.ts.map +0 -1
  472. package/lib/component/reducer/actions/LoadActions.js.map +0 -1
  473. package/lib/component/utility/isHomoNuclear.d.ts +0 -2
  474. package/lib/component/utility/isHomoNuclear.d.ts.map +0 -1
  475. package/lib/component/utility/isHomoNuclear.js +0 -11
  476. package/lib/component/utility/isHomoNuclear.js.map +0 -1
  477. package/lib/data/types/common/SignalKind.d.ts +0 -2
  478. package/lib/data/types/common/SignalKind.d.ts.map +0 -1
  479. package/lib/data/types/common/SignalKind.js +0 -2
  480. package/lib/data/types/common/SignalKind.js.map +0 -1
  481. package/lib/utils/stringCapitalize.d.ts +0 -2
  482. package/lib/utils/stringCapitalize.d.ts.map +0 -1
  483. package/lib/utils/stringCapitalize.js +0 -4
  484. package/lib/utils/stringCapitalize.js.map +0 -1
  485. package/src/component/panels/MoleculesPanel/Utilities.ts +0 -186
  486. package/src/component/utility/isHomoNuclear.ts +0 -11
  487. package/src/data/types/common/SignalKind.ts +0 -10
  488. package/src/utils/stringCapitalize.ts +0 -3
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nmrium",
3
3
  "description": "React component to display and process nuclear magnetic resonance (NMR) spectra.",
4
- "version": "1.6.1",
4
+ "version": "1.8.0",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "exports": {
@@ -68,11 +68,11 @@
68
68
  "@emotion/react": "^11.14.0",
69
69
  "@emotion/styled": "^11.14.1",
70
70
  "@hookform/resolvers": "^5.2.2",
71
- "@zakodium/nmr-types": "^0.2.1",
72
- "@zakodium/nmrium-core": "^0.2.3",
73
- "@zakodium/nmrium-core-plugins": "^0.3.6",
71
+ "@zakodium/nmr-types": "^0.4.3",
72
+ "@zakodium/nmrium-core": "^0.4.10",
73
+ "@zakodium/nmrium-core-plugins": "^0.6.11",
74
74
  "@zakodium/pdnd-esm": "^1.0.2",
75
- "@zip.js/zip.js": "^2.8.7",
75
+ "@zip.js/zip.js": "^2.8.10",
76
76
  "cheminfo-font": "^1.13.1",
77
77
  "cheminfo-types": "^1.8.1",
78
78
  "clipboard-polyfill": "^4.1.1",
@@ -82,45 +82,45 @@
82
82
  "dlv": "^1.1.3",
83
83
  "eventemitter3": "^5.0.1",
84
84
  "fifo-logger": "^2.0.1",
85
- "file-collection": "^5.2.0",
85
+ "file-collection": "^6.2.1",
86
86
  "file-saver": "^2.0.5",
87
- "immer": "^10.1.3",
87
+ "immer": "^10.2.0",
88
88
  "lodash": "^4.17.21",
89
89
  "mf-parser": "^3.6.0",
90
90
  "ml-array-mean": "^1.1.6",
91
91
  "ml-array-median": "^1.1.6",
92
92
  "ml-conrec": "^5.0.3",
93
- "ml-gsd": "^13.1.0",
93
+ "ml-gsd": "^13.1.1",
94
94
  "ml-signal-processing": "^2.1.0",
95
95
  "ml-spectra-processing": "^14.18.0",
96
96
  "ml-tree-similarity": "^2.2.0",
97
97
  "nmr-correlation": "2.3.3",
98
- "nmr-processing": "^19.4.1",
98
+ "nmr-processing": "^21.1.3",
99
99
  "numeral": "^2.0.6",
100
- "openchemlib": "^9.11.1",
101
- "openchemlib-utils": "^8.6.0",
100
+ "openchemlib": "^9.18.1",
101
+ "openchemlib-utils": "^8.8.1",
102
102
  "papaparse": "^5.5.3",
103
103
  "react-d3-utils": "^3.1.2",
104
104
  "react-dropzone": "^14.3.8",
105
105
  "react-error-boundary": "^6.0.0",
106
- "react-hook-form": "^7.64.0",
106
+ "react-hook-form": "^7.66.1",
107
107
  "react-icons": "^5.5.0",
108
108
  "react-inspector": "^9.0.0",
109
109
  "react-mf": "^3.1.1",
110
- "react-ocl": "^8.3.0",
110
+ "react-ocl": "^8.4.0",
111
111
  "react-ocl-nmr": "^4.1.1",
112
112
  "react-plot": "^3.1.1",
113
113
  "react-rnd": "^10.5.2",
114
- "react-science": "^19.3.0",
114
+ "react-science": "^19.3.1",
115
115
  "react-table": "^7.8.0",
116
116
  "smart-array-filter": "^5.0.0",
117
117
  "yup": "^1.7.1"
118
118
  },
119
119
  "devDependencies": {
120
- "@blueprintjs/core": "^6.3.1",
121
- "@blueprintjs/icons": "^6.1.0",
122
- "@blueprintjs/select": "^6.0.5",
123
- "@playwright/test": "^1.56.0",
120
+ "@blueprintjs/core": "^6.3.4",
121
+ "@blueprintjs/icons": "^6.3.1",
122
+ "@blueprintjs/select": "^6.0.8",
123
+ "@playwright/test": "^1.56.1",
124
124
  "@simbathesailor/use-what-changed": "^2.0.0",
125
125
  "@types/d3-array": "^3.2.2",
126
126
  "@types/d3-scale": "^4.0.9",
@@ -128,21 +128,21 @@
128
128
  "@types/dlv": "^1.1.5",
129
129
  "@types/file-saver": "^2.0.7",
130
130
  "@types/lodash": "^4.17.20",
131
- "@types/node": "^24.7.1",
131
+ "@types/node": "^24.10.1",
132
132
  "@types/numeral": "^2.0.5",
133
- "@types/papaparse": "^5.3.16",
133
+ "@types/papaparse": "^5.5.0",
134
134
  "@types/react": "^18.3.13",
135
135
  "@types/react-dom": "^18.3.1",
136
136
  "@types/react-table": "^7.7.20",
137
- "@vitejs/plugin-react": "^5.0.4",
138
- "@vitest/coverage-v8": "^3.2.4",
137
+ "@vitejs/plugin-react": "^5.1.1",
138
+ "@vitest/coverage-v8": "^4.0.10",
139
139
  "@zakodium/tsconfig": "^1.0.2",
140
140
  "cross-env": "^10.1.0",
141
- "cspell": "^9.2.1",
142
- "eslint": "^9.37.0",
143
- "eslint-config-cheminfo-react": "^18.0.1",
144
- "eslint-config-cheminfo-typescript": "^20.0.0",
145
- "knip": "^5.64.3",
141
+ "cspell": "^9.3.2",
142
+ "eslint": "^9.39.1",
143
+ "eslint-config-cheminfo-react": "^19.0.0",
144
+ "eslint-config-cheminfo-typescript": "^21.0.1",
145
+ "knip": "^5.70.0",
146
146
  "modern-normalize": "^3.0.1",
147
147
  "postcss": "^8.5.6",
148
148
  "postcss-styled-syntax": "^0.7.1",
@@ -150,17 +150,17 @@
150
150
  "rc-menu": "^9.16.1",
151
151
  "react": "^18.3.1",
152
152
  "react-dom": "^18.3.1",
153
- "react-router-dom": "^7.9.4",
154
- "rimraf": "^6.0.1",
153
+ "react-router-dom": "^7.9.6",
154
+ "rimraf": "^6.1.0",
155
155
  "rollup-plugin-analyzer": "^4.0.0",
156
156
  "serve": "^14.2.5",
157
157
  "stylelint": "^16.25.0",
158
158
  "stylelint-config-standard": "^39.0.1",
159
159
  "typescript": "~5.9.3",
160
- "vite": "^7.1.9",
161
- "vitest": "^3.2.4"
160
+ "vite": "^7.2.2",
161
+ "vitest": "^4.0.10"
162
162
  },
163
163
  "volta": {
164
- "node": "24.8.0"
164
+ "node": "24.11.0"
165
165
  }
166
166
  }
@@ -8,7 +8,7 @@ import { FaTimes } from 'react-icons/fa';
8
8
  import { Rnd } from 'react-rnd';
9
9
 
10
10
  import { isSpectrum1D } from '../../data/data1d/Spectrum1D/index.js';
11
- import { checkRangeKind } from '../../data/utilities/RangeUtilities.js';
11
+ import { isSignalRange } from '../../data/utilities/RangeUtilities.js';
12
12
  import type { SVGTableColumn } from '../SVGTable.js';
13
13
  import { SVGTable } from '../SVGTable.js';
14
14
  import { useChartData } from '../context/ChartContext.js';
@@ -55,7 +55,7 @@ function useMapRanges(ranges: Ranges['values']) {
55
55
  const preferences = usePanelPreferences('ranges', activeTab);
56
56
  for (const range of ranges) {
57
57
  const { id, from, to, integration, signals = [] } = range;
58
- const relativeFlag = checkRangeKind(range);
58
+ const relativeFlag = isSignalRange(range);
59
59
  const formattedValue = formatNumber(
60
60
  integration,
61
61
  preferences.relative.format,
@@ -158,13 +158,13 @@ function InnerSVGRangesTable(props: RangesTableProps) {
158
158
  const SVGRangesTable = memo(InnerSVGRangesTable);
159
159
 
160
160
  interface DraggablePublicationStringProps {
161
- ranges: Ranges['values'];
161
+ ranges: Ranges['values'] | undefined;
162
162
  bonding: BoundingBox;
163
163
  spectrumKey: string;
164
164
  }
165
165
 
166
166
  function DraggableRanges(props: DraggablePublicationStringProps) {
167
- const { ranges, bonding: externalBounding, spectrumKey } = props;
167
+ const { ranges = [], bonding: externalBounding, spectrumKey } = props;
168
168
  const dispatch = useDispatch();
169
169
  const { viewerRef } = useGlobal();
170
170
  const [bounding, setBounding] = useState<BoundingBox>(externalBounding);
@@ -276,7 +276,7 @@ function DraggableRanges(props: DraggablePublicationStringProps) {
276
276
  onClick: handleRemove,
277
277
  },
278
278
  ];
279
- if (!viewerRef || !ranges || ranges.length === 0) return null;
279
+ if (!viewerRef || ranges.length === 0) return null;
280
280
 
281
281
  const { x: xInPercent, y: yInPercent } = bounding;
282
282
 
@@ -47,7 +47,7 @@ function DatabaseSpectrum() {
47
47
  try {
48
48
  setLoading(true);
49
49
  const url = new URL(jcampRelativeURL, baseURL);
50
- const { data } = await core.readFromWebSource({
50
+ const [{ data }] = await core.readFromWebSource({
51
51
  entries: [{ relativePath: url.pathname, baseURL: url.origin }],
52
52
  });
53
53
  setLoading(false);
@@ -20,7 +20,7 @@ function MultiAnalysisRangesInner({
20
20
  (key) => columns[key].type !== ANALYSIS_COLUMN_TYPES.FORMULA,
21
21
  );
22
22
 
23
- if (!ranges || ranges.length === 0) {
23
+ if (ranges.length === 0) {
24
24
  return null;
25
25
  }
26
26
 
@@ -14,6 +14,7 @@ import { useScaleChecked } from '../../context/ScaleContext.js';
14
14
  import type { ActionsButtonsPopoverProps } from '../../elements/ActionsButtonsPopover.js';
15
15
  import { ActionsButtonsPopover } from '../../elements/ActionsButtonsPopover.js';
16
16
  import { useHighlight } from '../../highlight/index.js';
17
+ import { useActiveSpectrum } from '../../hooks/useActiveSpectrum.ts';
17
18
  import useSpectrum from '../../hooks/useSpectrum.js';
18
19
  import { useIsInset } from '../inset/InsetProvider.js';
19
20
 
@@ -79,11 +80,11 @@ function Tree(props: TreeProps) {
79
80
  } = props;
80
81
  const { from, to } = range;
81
82
  const { width } = useChartData();
82
- const { scaleX } = useScaleChecked();
83
+ const { scaleX, shiftY } = useScaleChecked();
83
84
  const dispatch = useDispatch();
84
85
  const isInset = useIsInset();
85
86
  const isAssignBtnTrigged = useRef(false);
86
-
87
+ const activeSpectrum = useActiveSpectrum();
87
88
  const assignment = useAssignment(signalKey);
88
89
  const highlight = useHighlight(extractID(signalKey, assignment), {
89
90
  type: 'SIGNAL',
@@ -172,6 +173,7 @@ function Tree(props: TreeProps) {
172
173
  }}
173
174
  >
174
175
  <Group
176
+ transform={`translate(0,-${(activeSpectrum?.index || 0) * shiftY})`}
175
177
  isActive={isAssignmentActive}
176
178
  isHighlighted={isHighlighted}
177
179
  onMouseEnter={() => {
@@ -166,7 +166,7 @@ function PeakAnnotation({
166
166
  format,
167
167
  isOverlap = false,
168
168
  }: PeakAnnotationProps) {
169
- const { id, parentKeys, x, y } = peak;
169
+ const { id, parentKeys, x, y, opacity } = peak;
170
170
  const sign = Math.sign(y);
171
171
  const highlight = useHighlight([id], {
172
172
  type: getHighlightSource(peaksSource),
@@ -188,6 +188,7 @@ function PeakAnnotation({
188
188
  transform={`translate(${sx}, ${sy})`}
189
189
  onMouseEnter={() => highlight.show()}
190
190
  onMouseLeave={() => highlight.hide()}
191
+ opacity={opacity}
191
192
  >
192
193
  <line
193
194
  x1="0"
@@ -144,7 +144,13 @@ function PeakAnnotationsSpreadMode(props: PeakAnnotationsSpreadModeProps) {
144
144
  transform={`translate(${group.meta.groupStartX},0)`}
145
145
  >
146
146
  {group.group.map((item, index) => {
147
- const { id, x: value, xInPixel, parentKeys } = item;
147
+ const {
148
+ id,
149
+ x: value,
150
+ xInPixel,
151
+ parentKeys,
152
+ opacity,
153
+ } = item;
148
154
  const startX = index * (notationWidth + notationMargin);
149
155
  const x = xInPixel - group.meta.groupStartX;
150
156
  return (
@@ -163,6 +169,7 @@ function PeakAnnotationsSpreadMode(props: PeakAnnotationsSpreadModeProps) {
163
169
  }}
164
170
  peaksSource={peaksSource}
165
171
  spectrumKey={spectrumKey}
172
+ opacity={opacity}
166
173
  />
167
174
  );
168
175
  })}
@@ -181,6 +188,7 @@ interface PeakAnnotationProps {
181
188
  x: number;
182
189
  format: string;
183
190
  color: string;
191
+ opacity: number;
184
192
  id: string;
185
193
  value: number;
186
194
  peakEditionFieldPosition: { x: number; y: number };
@@ -200,6 +208,7 @@ function PeakAnnotation(props: PeakAnnotationProps) {
200
208
  peaksSource,
201
209
  parentKeys,
202
210
  spectrumKey,
211
+ opacity,
203
212
  } = props;
204
213
  const highlight = useHighlight([id], {
205
214
  type: getHighlightSource(peaksSource),
@@ -212,6 +221,7 @@ function PeakAnnotation(props: PeakAnnotationProps) {
212
221
  <g
213
222
  onMouseEnter={() => highlight.show()}
214
223
  onMouseLeave={() => highlight.hide()}
224
+ opacity={opacity}
215
225
  >
216
226
  <PeakEditionListener {...{ ...peakEditionFieldPosition, id, value }}>
217
227
  <text
@@ -2,6 +2,7 @@ import type { NMRPeak1D, Peak1D, Range } from '@zakodium/nmr-types';
2
2
  import type { Spectrum1D } from '@zakodium/nmrium-core';
3
3
  import { memo, useMemo } from 'react';
4
4
 
5
+ import { getOpacityBasedOnSignalKind } from '../../../data/utilities/RangeUtilities.ts';
5
6
  import { useChartData } from '../../context/ChartContext.js';
6
7
  import { useScaleChecked } from '../../context/ScaleContext.tsx';
7
8
  import { useActiveSpectrumPeaksViewState } from '../../hooks/useActiveSpectrumPeaksViewState.js';
@@ -18,6 +19,7 @@ interface Peak1DWithParentKeys extends Peak1D {
18
19
  }
19
20
  interface NMRPeak1DWithParentKeys extends NMRPeak1D {
20
21
  parentKeys?: string[];
22
+ opacity: number;
21
23
  }
22
24
 
23
25
  interface SpreadPeak1D extends Peak1DWithParentKeys {
@@ -29,7 +31,9 @@ interface SpreadNMRPeak1D extends NMRPeak1DWithParentKeys {
29
31
  yInPixel: number;
30
32
  }
31
33
 
32
- export type Peak = Required<SpreadPeak1D | SpreadNMRPeak1D>;
34
+ export type Peak = Required<SpreadPeak1D | SpreadNMRPeak1D> & {
35
+ opacity: number;
36
+ };
33
37
  type PeaksMode = 'spread' | 'single';
34
38
  export type PeaksSource = 'peaks' | 'ranges';
35
39
 
@@ -61,9 +65,11 @@ export function getHighlightExtraId(
61
65
  function flatRangesPeaks(ranges: Range[]) {
62
66
  const results: NMRPeak1DWithParentKeys[] = [];
63
67
  for (const { signals = [], id: rangeID } of ranges) {
64
- for (const { peaks = [], id: signalID } of signals) {
68
+ for (const signal of signals) {
69
+ const { peaks = [], id: signalID } = signal;
70
+ const opacity = getOpacityBasedOnSignalKind(signal);
65
71
  for (const peak of peaks) {
66
- results.push({ ...peak, parentKeys: [rangeID, signalID] });
72
+ results.push({ ...peak, parentKeys: [rangeID, signalID], opacity });
67
73
  }
68
74
  }
69
75
  }
@@ -1,4 +1,5 @@
1
1
  import type { Range } from '@zakodium/nmr-types';
2
+ import type { MoleculesView } from '@zakodium/nmrium-core';
2
3
 
3
4
  import { useChartData } from '../../context/ChartContext.js';
4
5
  import { useTopicMolecule } from '../../context/TopicMoleculeContext.js';
@@ -19,24 +20,48 @@ function getDiaIds(range: Range) {
19
20
  return ids;
20
21
  }
21
22
 
22
- function useAtoms(range: Range) {
23
+ function useAtoms(range: Range, moleculesView: MoleculesView) {
23
24
  const topicMolecule = useTopicMolecule();
24
25
  const diaIDs = getDiaIds(range);
25
- const atomsList: Array<{ id: string; atoms: number[] }> = [];
26
+ const atomsList: Array<{ id: string; atoms: Array<string | number> }> = [];
26
27
 
27
28
  for (const [id, topicMoleculeObject] of Object.entries(topicMolecule)) {
28
- const atoms: number[] = [];
29
+ const atoms: Array<string | number> = [];
29
30
  const diaIDsObject = topicMoleculeObject.getDiaIDsObject();
30
- if (diaIDsObject) {
31
- for (const id of diaIDs) {
32
- const existingAtoms = diaIDsObject[id]?.existingAtoms;
33
- if (existingAtoms?.length > 0) {
34
- atoms.push(...existingAtoms);
35
- }
31
+
32
+ if (!diaIDsObject || !(id in moleculesView)) continue;
33
+
34
+ const { atomAnnotation } = moleculesView[id];
35
+ for (const id of diaIDs) {
36
+ if (!(id in diaIDsObject)) continue;
37
+
38
+ const {
39
+ existingAtoms = [],
40
+ customLabels = [],
41
+ heavyAtomsCustomLabels = [],
42
+ } = diaIDsObject[id];
43
+
44
+ if (atomAnnotation === 'atom-numbers') {
45
+ atoms.push(...existingAtoms);
46
+ }
47
+
48
+ if (atomAnnotation === 'custom-labels') {
49
+ const labels =
50
+ customLabels.length > 0 ? customLabels : heavyAtomsCustomLabels;
51
+ atoms.push(...labels);
36
52
  }
37
53
  }
54
+
38
55
  if (atoms.length > 0) {
39
- atoms.sort((a, b) => a - b);
56
+ atoms.sort((a, b) => {
57
+ if (typeof a === 'number' && typeof b === 'number') {
58
+ return a - b;
59
+ }
60
+ if (typeof a === 'string' && typeof b === 'string') {
61
+ return a.localeCompare(b);
62
+ }
63
+ return 0;
64
+ });
40
65
  atomsList.push({
41
66
  id,
42
67
  atoms: Array.from(new Set(atoms)),
@@ -56,9 +81,7 @@ export function Atoms(props: AtomsProps) {
56
81
  const {
57
82
  view: { molecules },
58
83
  } = useChartData();
59
- const atomsList = useAtoms(range).filter(
60
- (atomsList) => molecules?.[atomsList.id]?.showAtomNumber,
61
- );
84
+ const atomsList = useAtoms(range, molecules);
62
85
 
63
86
  return (
64
87
  <SVGGroup
@@ -8,7 +8,7 @@ import {
8
8
  resizeRange,
9
9
  } from '../../../data/data1d/Spectrum1D/index.js';
10
10
  import { isRangeAssigned } from '../../../data/data1d/Spectrum1D/isRangeAssigned.js';
11
- import { checkRangeKind } from '../../../data/utilities/RangeUtilities.js';
11
+ import { getOpacityBasedOnSignalKind } from '../../../data/utilities/RangeUtilities.js';
12
12
  import {
13
13
  useAssignment,
14
14
  useAssignmentContext,
@@ -131,7 +131,8 @@ function Range(options: RangeProps) {
131
131
  });
132
132
  }
133
133
  const isAssignmentActive = assignmentRange.isActive;
134
- const isNotSignal = !checkRangeKind(range);
134
+ const opacity = getOpacityBasedOnSignalKind(range);
135
+
135
136
  const isHighlighted =
136
137
  isBlockedByEditing || highlightRange.isActive || isAssignmentActive;
137
138
 
@@ -248,7 +249,7 @@ function Range(options: RangeProps) {
248
249
  value={integration}
249
250
  format={relativeFormat}
250
251
  width={rangeWidth}
251
- opacity={isNotSignal ? 0.5 : 1}
252
+ opacity={opacity}
252
253
  />
253
254
  )}
254
255
  </g>
@@ -1,6 +1,7 @@
1
1
  import type { Spectrum1D } from '@zakodium/nmrium-core';
2
2
  import { xyIntegral, xyMaxY } from 'ml-spectra-processing';
3
3
 
4
+ import { getOpacityBasedOnSignalKind } from '../../../data/utilities/RangeUtilities.ts';
4
5
  import { useChartData } from '../../context/ChartContext.js';
5
6
  import { useActiveSpectrumRangesViewState } from '../../hooks/useActiveSpectrumRangesViewState.js';
6
7
  import useIntegralPath from '../../hooks/useIntegralPath.js';
@@ -13,6 +14,7 @@ interface IntegralData {
13
14
  id: string;
14
15
  from: number;
15
16
  to: number;
17
+ opacity: number;
16
18
  }
17
19
 
18
20
  interface IntegralProps extends IntegralData {
@@ -20,7 +22,7 @@ interface IntegralProps extends IntegralData {
20
22
  }
21
23
 
22
24
  function Integral(props: IntegralProps) {
23
- const { x, y, max, from, to } = props;
25
+ const { x, y, max, from, to, opacity } = props;
24
26
  const { integralsScaleRatio } = useActiveSpectrumRangesViewState();
25
27
  const path = useIntegralPath({
26
28
  x,
@@ -37,6 +39,7 @@ function Integral(props: IntegralProps) {
37
39
  stroke="black"
38
40
  strokeWidth="1"
39
41
  fill="none"
42
+ opacity={opacity}
40
43
  d={path}
41
44
  />
42
45
  );
@@ -90,6 +93,7 @@ function useIntegrals() {
90
93
  } = spectrum;
91
94
  for (const range of ranges?.values || []) {
92
95
  const { from, to, id } = range;
96
+ const opacity = getOpacityBasedOnSignalKind(range);
93
97
  const integral = xyIntegral(
94
98
  { x, y: re },
95
99
  {
@@ -98,7 +102,7 @@ function useIntegrals() {
98
102
  reverse: true,
99
103
  },
100
104
  );
101
- values.push({ ...integral, id } as IntegralData);
105
+ values.push({ ...integral, id, opacity } as IntegralData);
102
106
  const value = xyMaxY(integral);
103
107
  if (value > max) max = value;
104
108
  }
@@ -1,33 +1,26 @@
1
1
  import styled from '@emotion/styled';
2
+ import type { MoleculeView } from '@zakodium/nmrium-core';
2
3
  import { useEffect, useState } from 'react';
3
4
  import { ResponsiveChart } from 'react-d3-utils';
4
5
  import { BsArrowsMove } from 'react-icons/bs';
5
- import { FaTimes } from 'react-icons/fa';
6
- import type { MolfileSvgRendererProps } from 'react-ocl';
7
- import { MolfileSvgRenderer } from 'react-ocl';
8
- import OCLnmr from 'react-ocl-nmr';
6
+ import { FaRegBookmark, FaTimes } from 'react-icons/fa';
7
+ import { MdFormatColorText, MdNumbers } from 'react-icons/md';
9
8
  import { Rnd } from 'react-rnd';
10
9
 
11
10
  import type {
12
11
  MoleculeBoundingRect,
13
- MoleculeView,
14
12
  StateMoleculeExtended,
15
13
  } from '../../../../data/molecules/Molecule.js';
16
14
  import { useDispatch } from '../../../context/DispatchContext.js';
17
15
  import { useGlobal } from '../../../context/GlobalContext.js';
18
16
  import type { ActionsButtonsPopoverProps } from '../../../elements/ActionsButtonsPopover.js';
19
17
  import { ActionsButtonsPopover } from '../../../elements/ActionsButtonsPopover.js';
20
- import { useHighlightColor } from '../../../hooks/useHighlightColor.js';
21
18
  import { useSVGUnitConverter } from '../../../hooks/useSVGUnitConverter.js';
22
19
  import { useCheckExportStatus } from '../../../hooks/useViewportSize.js';
23
20
  import { useMoleculeEditor } from '../../../modal/MoleculeStructureEditorModal.js';
24
- import useAtomAssignment from '../../../panels/MoleculesPanel/useAtomAssignment.js';
25
-
26
- interface DraggableMoleculeProps extends DraggableStructureProps {
27
- width: number;
28
- height: number;
29
- renderAsSVG?: boolean;
30
- }
21
+ import { MoleculeStructure } from '../../../panels/MoleculesPanel/MoleculeStructure.tsx';
22
+ import { useMoleculeAnnotationCore } from '../../../panels/hooks/useMoleculeAnnotationCore.ts';
23
+ import { booleanToString } from '../../../utility/booleanToString.ts';
31
24
 
32
25
  interface DraggableStructureProps {
33
26
  moleculeView: MoleculeView;
@@ -103,6 +96,12 @@ export function DraggableStructure(props: DraggableStructureProps) {
103
96
  return { x: pixelToPercent(x, 'x'), y: pixelToPercent(y, 'y') };
104
97
  }
105
98
 
99
+ const {
100
+ handleChangeAtomAnnotation,
101
+ isAnnotation,
102
+ handleToggleMoleculeLabel,
103
+ } = useMoleculeAnnotationCore(molecule.id, moleculeView);
104
+
106
105
  if (!viewerRef) return null;
107
106
 
108
107
  const actionsButtons: ActionsButtonsPopoverProps['buttons'] = [
@@ -119,8 +118,31 @@ export function DraggableStructure(props: DraggableStructureProps) {
119
118
  title: 'Hide molecule',
120
119
  onClick: floatMoleculeHandler,
121
120
  },
121
+ {
122
+ elementType: 'separator',
123
+ },
124
+ {
125
+ icon: <MdFormatColorText />,
126
+ title: `${booleanToString(!moleculeView.showLabel)} molecule label`,
127
+ onClick: handleToggleMoleculeLabel,
128
+ active: moleculeView.showLabel,
129
+ },
130
+ {
131
+ elementType: 'separator',
132
+ },
133
+ {
134
+ icon: <MdNumbers />,
135
+ title: `${booleanToString(!isAnnotation('atom-numbers'))} atom number`,
136
+ onClick: () => handleChangeAtomAnnotation('atom-numbers'),
137
+ active: isAnnotation('atom-numbers'),
138
+ },
139
+ {
140
+ icon: <FaRegBookmark />,
141
+ title: `${booleanToString(!isAnnotation('custom-labels'))} custom labels`,
142
+ onClick: () => handleChangeAtomAnnotation('custom-labels'),
143
+ active: isAnnotation('custom-labels'),
144
+ },
122
145
  ];
123
-
124
146
  const { x: xInPercent, y: yInPercent, width, height } = bounding;
125
147
 
126
148
  const x = percentToPixel(xInPercent, 'x');
@@ -129,7 +151,7 @@ export function DraggableStructure(props: DraggableStructureProps) {
129
151
  if (isExportProcessStart) {
130
152
  return (
131
153
  <g transform={`translate(${x} ${y})`}>
132
- <DraggableMolecule renderAsSVG {...{ width, height }} {...props} />
154
+ <MoleculeStructure renderAsSVG {...{ width, height }} {...props} />
133
155
  </g>
134
156
  );
135
157
  }
@@ -176,7 +198,7 @@ export function DraggableStructure(props: DraggableStructureProps) {
176
198
  >
177
199
  <ResponsiveChart>
178
200
  {({ width, height }) => {
179
- return <DraggableMolecule {...{ width, height }} {...props} />;
201
+ return <MoleculeStructure {...{ width, height }} {...props} />;
180
202
  }}
181
203
  </ResponsiveChart>
182
204
  </div>
@@ -186,65 +208,3 @@ export function DraggableStructure(props: DraggableStructureProps) {
186
208
  </ReactRnd>
187
209
  );
188
210
  }
189
-
190
- function DraggableMolecule(props: DraggableMoleculeProps) {
191
- const {
192
- molecule,
193
- index,
194
- moleculeView,
195
- width,
196
- height,
197
- renderAsSVG = false,
198
- } = props;
199
- const {
200
- currentDiaIDsToHighlight,
201
- handleOnAtomHover,
202
- handleOnClickAtom,
203
- assignedDiaIDsMerged,
204
- } = useAtomAssignment();
205
- const highlightColor = useHighlightColor();
206
- const dispatch = useDispatch();
207
-
208
- const atomHighlightColor =
209
- currentDiaIDsToHighlight?.length > 0 ? '#ff000080' : highlightColor;
210
- const baseProps: MolfileSvgRendererProps = {
211
- id: `molSVG${index || ''}`,
212
- height,
213
- width,
214
- label: molecule.label,
215
- labelFontSize: 15,
216
- labelColor: 'rgb(0,0,0)',
217
- molfile: molecule.molfile,
218
- atomHighlightColor,
219
- atomHighlightOpacity: 1,
220
- showAtomNumber: moleculeView.showAtomNumber,
221
- };
222
-
223
- if (renderAsSVG) {
224
- return <MolfileSvgRenderer {...baseProps} />;
225
- }
226
-
227
- return (
228
- <OCLnmr
229
- {...baseProps}
230
- setSelectedAtom={handleOnClickAtom}
231
- highlights={
232
- currentDiaIDsToHighlight?.length > 0
233
- ? currentDiaIDsToHighlight
234
- : assignedDiaIDsMerged
235
- }
236
- atomHighlightStrategy="prefer-editor-props"
237
- setHoverAtom={handleOnAtomHover}
238
- setMolfile={(molfile) => {
239
- dispatch({
240
- type: 'SET_MOLECULE',
241
- payload: {
242
- molfile,
243
- id: molecule.id,
244
- label: molecule.label,
245
- },
246
- });
247
- }}
248
- />
249
- );
250
- }
@@ -1,10 +1,13 @@
1
1
  import type { Ranges, Zones } from '@zakodium/nmr-types';
2
- import type { Spectrum1D, Spectrum2D } from '@zakodium/nmrium-core';
2
+ import type {
3
+ MoleculeView,
4
+ Spectrum1D,
5
+ Spectrum2D,
6
+ } from '@zakodium/nmrium-core';
3
7
  import { memo } from 'react';
4
8
  import { assert } from 'react-science/ui';
5
9
 
6
10
  import type {
7
- MoleculeView,
8
11
  MoleculesView,
9
12
  StateMoleculeExtended,
10
13
  } from '../../../../data/molecules/Molecule.js';