nmrium 2.4.0 → 2.5.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 (277) hide show
  1. package/lib/component/1d/HorizontalAxis1D.d.ts.map +1 -1
  2. package/lib/component/1d/HorizontalAxis1D.js +4 -1
  3. package/lib/component/1d/HorizontalAxis1D.js.map +1 -1
  4. package/lib/component/1d/SVGContent1D.d.ts.map +1 -1
  5. package/lib/component/1d/SVGContent1D.js +2 -1
  6. package/lib/component/1d/SVGContent1D.js.map +1 -1
  7. package/lib/component/1d/Viewer1D.d.ts.map +1 -1
  8. package/lib/component/1d/Viewer1D.js +2 -1
  9. package/lib/component/1d/Viewer1D.js.map +1 -1
  10. package/lib/component/1d/integral/IntegralResizable.d.ts.map +1 -1
  11. package/lib/component/1d/integral/IntegralResizable.js +4 -4
  12. package/lib/component/1d/integral/IntegralResizable.js.map +1 -1
  13. package/lib/component/1d/ranges/Range.d.ts.map +1 -1
  14. package/lib/component/1d/ranges/Range.js +3 -3
  15. package/lib/component/1d/ranges/Range.js.map +1 -1
  16. package/lib/component/1d/ranges/Signals.d.ts +2 -0
  17. package/lib/component/1d/ranges/Signals.d.ts.map +1 -0
  18. package/lib/component/1d/ranges/Signals.js +16 -0
  19. package/lib/component/1d/ranges/Signals.js.map +1 -0
  20. package/lib/component/1d-2d/components/RangeIndicator.d.ts +13 -0
  21. package/lib/component/1d-2d/components/RangeIndicator.d.ts.map +1 -0
  22. package/lib/component/1d-2d/components/RangeIndicator.js +52 -0
  23. package/lib/component/1d-2d/components/RangeIndicator.js.map +1 -0
  24. package/lib/component/1d-2d/components/Signals1D.d.ts +19 -0
  25. package/lib/component/1d-2d/components/Signals1D.d.ts.map +1 -0
  26. package/lib/component/1d-2d/components/Signals1D.js +155 -0
  27. package/lib/component/1d-2d/components/Signals1D.js.map +1 -0
  28. package/lib/component/1d-2d/tools/CrossLinePointer.d.ts +16 -1
  29. package/lib/component/1d-2d/tools/CrossLinePointer.d.ts.map +1 -1
  30. package/lib/component/1d-2d/tools/CrossLinePointer.js +25 -15
  31. package/lib/component/1d-2d/tools/CrossLinePointer.js.map +1 -1
  32. package/lib/component/1d-2d/tools/CursorToolIcon.d.ts +9 -0
  33. package/lib/component/1d-2d/tools/CursorToolIcon.d.ts.map +1 -0
  34. package/lib/component/1d-2d/tools/CursorToolIcon.js +58 -0
  35. package/lib/component/1d-2d/tools/CursorToolIcon.js.map +1 -0
  36. package/lib/component/2d/1d-tracer/Left1DChart.d.ts.map +1 -1
  37. package/lib/component/2d/1d-tracer/Left1DChart.js +3 -2
  38. package/lib/component/2d/1d-tracer/Left1DChart.js.map +1 -1
  39. package/lib/component/2d/1d-tracer/Ranges1D.d.ts.map +1 -1
  40. package/lib/component/2d/1d-tracer/Ranges1D.js +4 -60
  41. package/lib/component/2d/1d-tracer/Ranges1D.js.map +1 -1
  42. package/lib/component/2d/1d-tracer/Top1DChart.d.ts.map +1 -1
  43. package/lib/component/2d/1d-tracer/Top1DChart.js +3 -2
  44. package/lib/component/2d/1d-tracer/Top1DChart.js.map +1 -1
  45. package/lib/component/2d/DirectAxis2D.d.ts.map +1 -1
  46. package/lib/component/2d/DirectAxis2D.js +4 -1
  47. package/lib/component/2d/DirectAxis2D.js.map +1 -1
  48. package/lib/component/2d/IndirectAxis2D.d.ts.map +1 -1
  49. package/lib/component/2d/IndirectAxis2D.js +5 -2
  50. package/lib/component/2d/IndirectAxis2D.js.map +1 -1
  51. package/lib/component/2d/Viewer2D.d.ts.map +1 -1
  52. package/lib/component/2d/Viewer2D.js +2 -1
  53. package/lib/component/2d/Viewer2D.js.map +1 -1
  54. package/lib/component/AnchorSVG.d.ts +5 -6
  55. package/lib/component/AnchorSVG.d.ts.map +1 -1
  56. package/lib/component/AnchorSVG.js +9 -6
  57. package/lib/component/AnchorSVG.js.map +1 -1
  58. package/lib/component/EventsTrackers/BrushTracker.d.ts.map +1 -1
  59. package/lib/component/EventsTrackers/BrushTracker.js +14 -4
  60. package/lib/component/EventsTrackers/BrushTracker.js.map +1 -1
  61. package/lib/component/EventsTrackers/MouseTracker.d.ts +3 -0
  62. package/lib/component/EventsTrackers/MouseTracker.d.ts.map +1 -1
  63. package/lib/component/EventsTrackers/MouseTracker.js +15 -0
  64. package/lib/component/EventsTrackers/MouseTracker.js.map +1 -1
  65. package/lib/component/context/KeyModifierContext.d.ts +1 -0
  66. package/lib/component/context/KeyModifierContext.d.ts.map +1 -1
  67. package/lib/component/context/KeyModifierContext.js +22 -6
  68. package/lib/component/context/KeyModifierContext.js.map +1 -1
  69. package/lib/component/elements/D3Axis.d.ts.map +1 -1
  70. package/lib/component/elements/D3Axis.js +4 -3
  71. package/lib/component/elements/D3Axis.js.map +1 -1
  72. package/lib/component/header/AutoPeakPickingOptionPanel.d.ts.map +1 -1
  73. package/lib/component/header/AutoPeakPickingOptionPanel.js +59 -31
  74. package/lib/component/header/AutoPeakPickingOptionPanel.js.map +1 -1
  75. package/lib/component/header/RangesPickingOptionPanel.d.ts.map +1 -1
  76. package/lib/component/header/RangesPickingOptionPanel.js +34 -19
  77. package/lib/component/header/RangesPickingOptionPanel.js.map +1 -1
  78. package/lib/component/hooks/useAddMultipletSignal.d.ts +7 -0
  79. package/lib/component/hooks/useAddMultipletSignal.d.ts.map +1 -0
  80. package/lib/component/hooks/useAddMultipletSignal.js +28 -0
  81. package/lib/component/hooks/useAddMultipletSignal.js.map +1 -0
  82. package/lib/component/hooks/useFilter.d.ts.map +1 -1
  83. package/lib/component/hooks/useFilter.js.map +1 -1
  84. package/lib/component/hooks/useSpectrum.d.ts +3 -1
  85. package/lib/component/hooks/useSpectrum.d.ts.map +1 -1
  86. package/lib/component/hooks/useSpectrum.js +1 -1
  87. package/lib/component/hooks/useSpectrum.js.map +1 -1
  88. package/lib/component/hooks/useSpectrumWithDataSource.d.ts +1 -1
  89. package/lib/component/hooks/useSpectrumWithDataSource.d.ts.map +1 -1
  90. package/lib/component/hooks/useSpectrumWithDataSource.js.map +1 -1
  91. package/lib/component/hooks/useTempSpectrum.d.ts +1 -1
  92. package/lib/component/hooks/useTempSpectrum.d.ts.map +1 -1
  93. package/lib/component/hooks/use_ticks_config.d.ts +1 -4
  94. package/lib/component/hooks/use_ticks_config.d.ts.map +1 -1
  95. package/lib/component/hooks/use_ticks_config.js +1 -6
  96. package/lib/component/hooks/use_ticks_config.js.map +1 -1
  97. package/lib/component/modal/PublicationStringModal.d.ts +1 -1
  98. package/lib/component/modal/PublicationStringModal.d.ts.map +1 -1
  99. package/lib/component/modal/PublicationStringModal.js +2 -2
  100. package/lib/component/modal/PublicationStringModal.js.map +1 -1
  101. package/lib/component/modal/setting/tanstack_general_settings/errors/context.d.ts +118 -0
  102. package/lib/component/modal/setting/tanstack_general_settings/errors/context.d.ts.map +1 -1
  103. package/lib/component/modal/setting/tanstack_general_settings/errors/renderer.d.ts +118 -0
  104. package/lib/component/modal/setting/tanstack_general_settings/errors/renderer.d.ts.map +1 -1
  105. package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.d.ts +118 -0
  106. package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.d.ts.map +1 -1
  107. package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_footer.d.ts +96 -0
  108. package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_footer.d.ts.map +1 -1
  109. package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.d.ts +96 -0
  110. package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.d.ts.map +1 -1
  111. package/lib/component/modal/setting/tanstack_general_settings/hooks/use_safe_workspace.d.ts +16 -0
  112. package/lib/component/modal/setting/tanstack_general_settings/hooks/use_safe_workspace.d.ts.map +1 -1
  113. package/lib/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.d.ts +96 -0
  114. package/lib/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.d.ts.map +1 -1
  115. package/lib/component/modal/setting/tanstack_general_settings/tabs/axis_tab.d.ts +96 -0
  116. package/lib/component/modal/setting/tanstack_general_settings/tabs/axis_tab.d.ts.map +1 -1
  117. package/lib/component/modal/setting/tanstack_general_settings/tabs/axis_tab.js +12 -1
  118. package/lib/component/modal/setting/tanstack_general_settings/tabs/axis_tab.js.map +1 -1
  119. package/lib/component/modal/setting/tanstack_general_settings/tabs/database_tab.d.ts +96 -0
  120. package/lib/component/modal/setting/tanstack_general_settings/tabs/database_tab.d.ts.map +1 -1
  121. package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.d.ts +96 -0
  122. package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.d.ts.map +1 -1
  123. package/lib/component/modal/setting/tanstack_general_settings/tabs/external_api_tab.d.ts +96 -0
  124. package/lib/component/modal/setting/tanstack_general_settings/tabs/external_api_tab.d.ts.map +1 -1
  125. package/lib/component/modal/setting/tanstack_general_settings/tabs/general_tab.d.ts +96 -0
  126. package/lib/component/modal/setting/tanstack_general_settings/tabs/general_tab.d.ts.map +1 -1
  127. package/lib/component/modal/setting/tanstack_general_settings/tabs/import_filters_tab.d.ts +96 -0
  128. package/lib/component/modal/setting/tanstack_general_settings/tabs/import_filters_tab.d.ts.map +1 -1
  129. package/lib/component/modal/setting/tanstack_general_settings/tabs/nuclei_tab.d.ts +96 -0
  130. package/lib/component/modal/setting/tanstack_general_settings/tabs/nuclei_tab.d.ts.map +1 -1
  131. package/lib/component/modal/setting/tanstack_general_settings/tabs/panels_tab.d.ts +96 -0
  132. package/lib/component/modal/setting/tanstack_general_settings/tabs/panels_tab.d.ts.map +1 -1
  133. package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_colors_tab.d.ts +96 -0
  134. package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_colors_tab.d.ts.map +1 -1
  135. package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.d.ts +96 -0
  136. package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.d.ts.map +1 -1
  137. package/lib/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.d.ts +96 -0
  138. package/lib/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.d.ts.map +1 -1
  139. package/lib/component/modal/setting/tanstack_general_settings/tabs/tools_tab.d.ts +96 -0
  140. package/lib/component/modal/setting/tanstack_general_settings/tabs/tools_tab.d.ts.map +1 -1
  141. package/lib/component/modal/setting/tanstack_general_settings/validation/axis_tab_validation.d.ts +22 -0
  142. package/lib/component/modal/setting/tanstack_general_settings/validation/axis_tab_validation.d.ts.map +1 -1
  143. package/lib/component/modal/setting/tanstack_general_settings/validation/axis_tab_validation.js +15 -2
  144. package/lib/component/modal/setting/tanstack_general_settings/validation/axis_tab_validation.js.map +1 -1
  145. package/lib/component/modal/setting/tanstack_general_settings/validation.d.ts +22 -0
  146. package/lib/component/modal/setting/tanstack_general_settings/validation.d.ts.map +1 -1
  147. package/lib/component/panels/MoleculesPanel/hooks/useAtomAssignment.js +1 -1
  148. package/lib/component/panels/MoleculesPanel/hooks/useAtomAssignment.js.map +1 -1
  149. package/lib/component/panels/RangesPanel/RangesPanel.d.ts.map +1 -1
  150. package/lib/component/panels/RangesPanel/RangesPanel.js +1 -3
  151. package/lib/component/panels/RangesPanel/RangesPanel.js.map +1 -1
  152. package/lib/component/panels/RangesPanel/RangesTableRow.d.ts.map +1 -1
  153. package/lib/component/panels/RangesPanel/RangesTableRow.js +10 -12
  154. package/lib/component/panels/RangesPanel/RangesTableRow.js.map +1 -1
  155. package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.d.ts +1 -1
  156. package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.d.ts.map +1 -1
  157. package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.js +1 -1
  158. package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.js.map +1 -1
  159. package/lib/component/panels/filtersPanel/processings_sections_panel.d.ts.map +1 -1
  160. package/lib/component/panels/filtersPanel/processings_sections_panel.js +13 -23
  161. package/lib/component/panels/filtersPanel/processings_sections_panel.js.map +1 -1
  162. package/lib/component/panels/hooks/use_processings_mutation.d.ts +10 -0
  163. package/lib/component/panels/hooks/use_processings_mutation.d.ts.map +1 -0
  164. package/lib/component/panels/hooks/use_processings_mutation.js +130 -0
  165. package/lib/component/panels/hooks/use_processings_mutation.js.map +1 -0
  166. package/lib/component/panels/informationPanel/InformationPanel.js +1 -1
  167. package/lib/component/panels/informationPanel/InformationPanel.js.map +1 -1
  168. package/lib/component/reducer/Reducer.d.ts.map +1 -1
  169. package/lib/component/reducer/Reducer.js +2 -0
  170. package/lib/component/reducer/Reducer.js.map +1 -1
  171. package/lib/component/reducer/actions/CorrelationsActions.js +1 -1
  172. package/lib/component/reducer/actions/CorrelationsActions.js.map +1 -1
  173. package/lib/component/reducer/actions/FiltersActions.d.ts +2 -0
  174. package/lib/component/reducer/actions/FiltersActions.d.ts.map +1 -1
  175. package/lib/component/reducer/actions/FiltersActions.js +1 -1
  176. package/lib/component/reducer/actions/FiltersActions.js.map +1 -1
  177. package/lib/component/reducer/actions/RangesActions.d.ts.map +1 -1
  178. package/lib/component/reducer/actions/RangesActions.js +13 -24
  179. package/lib/component/reducer/actions/RangesActions.js.map +1 -1
  180. package/lib/component/reducer/actions/SpectraActions.d.ts +8 -2
  181. package/lib/component/reducer/actions/SpectraActions.d.ts.map +1 -1
  182. package/lib/component/reducer/actions/SpectraActions.js +6 -1
  183. package/lib/component/reducer/actions/SpectraActions.js.map +1 -1
  184. package/lib/component/reducer/preferences/actions/setPreferences.d.ts +2 -2
  185. package/lib/component/reducer/preferences/actions/setPreferences.d.ts.map +1 -1
  186. package/lib/component/reducer/preferences/actions/setPreferences.js +8 -5
  187. package/lib/component/reducer/preferences/actions/setPreferences.js.map +1 -1
  188. package/lib/component/reducer/preferences/preferencesReducer.d.ts +1 -1
  189. package/lib/component/reducer/preferences/preferencesReducer.d.ts.map +1 -1
  190. package/lib/component/toolbar/ToolTypes.d.ts +21 -1
  191. package/lib/component/toolbar/ToolTypes.d.ts.map +1 -1
  192. package/lib/component/toolbar/ToolTypes.js +40 -0
  193. package/lib/component/toolbar/ToolTypes.js.map +1 -1
  194. package/lib/component/toolbar/nmr_toolbar.d.ts.map +1 -1
  195. package/lib/component/toolbar/nmr_toolbar.js +9 -35
  196. package/lib/component/toolbar/nmr_toolbar.js.map +1 -1
  197. package/lib/component/workspaces/workspaceDefaultProperties.d.ts.map +1 -1
  198. package/lib/component/workspaces/workspaceDefaultProperties.js +19 -2
  199. package/lib/component/workspaces/workspaceDefaultProperties.js.map +1 -1
  200. package/lib/data/data1d/Spectrum1D/initiateDatum1D.d.ts.map +1 -1
  201. package/lib/data/data1d/Spectrum1D/initiateDatum1D.js +13 -5
  202. package/lib/data/data1d/Spectrum1D/initiateDatum1D.js.map +1 -1
  203. package/lib/data/data2d/Spectrum2D/initiateDatum2D.d.ts.map +1 -1
  204. package/lib/data/data2d/Spectrum2D/initiateDatum2D.js +12 -4
  205. package/lib/data/data2d/Spectrum2D/initiateDatum2D.js.map +1 -1
  206. package/lib/data/data2d/Spectrum2D/isSpectrum2D.d.ts +1 -1
  207. package/lib/data/data2d/Spectrum2D/isSpectrum2D.d.ts.map +1 -1
  208. package/lib/data/data2d/Spectrum2D/isSpectrum2D.js.map +1 -1
  209. package/lib/data/utilities/RangeUtilities.d.ts +1 -6
  210. package/lib/data/utilities/RangeUtilities.d.ts.map +1 -1
  211. package/lib/data/utilities/RangeUtilities.js +10 -27
  212. package/lib/data/utilities/RangeUtilities.js.map +1 -1
  213. package/lib/versionInfo.js +1 -1
  214. package/package.json +15 -14
  215. package/src/component/1d/HorizontalAxis1D.tsx +12 -2
  216. package/src/component/1d/SVGContent1D.tsx +2 -0
  217. package/src/component/1d/Viewer1D.tsx +2 -0
  218. package/src/component/1d/integral/IntegralResizable.tsx +6 -6
  219. package/src/component/1d/ranges/Range.tsx +6 -6
  220. package/src/component/1d/ranges/Signals.tsx +28 -0
  221. package/src/component/1d-2d/components/RangeIndicator.tsx +106 -0
  222. package/src/component/1d-2d/components/Signals1D.tsx +306 -0
  223. package/src/component/1d-2d/tools/CrossLinePointer.tsx +75 -32
  224. package/src/component/1d-2d/tools/CursorToolIcon.tsx +110 -0
  225. package/src/component/2d/1d-tracer/Left1DChart.tsx +4 -2
  226. package/src/component/2d/1d-tracer/Ranges1D.tsx +4 -100
  227. package/src/component/2d/1d-tracer/Top1DChart.tsx +4 -2
  228. package/src/component/2d/DirectAxis2D.tsx +12 -3
  229. package/src/component/2d/IndirectAxis2D.tsx +9 -5
  230. package/src/component/2d/Viewer2D.tsx +5 -2
  231. package/src/component/AnchorSVG.tsx +27 -28
  232. package/src/component/EventsTrackers/BrushTracker.tsx +21 -7
  233. package/src/component/EventsTrackers/MouseTracker.tsx +21 -0
  234. package/src/component/context/KeyModifierContext.tsx +27 -8
  235. package/src/component/elements/D3Axis.tsx +31 -9
  236. package/src/component/header/AutoPeakPickingOptionPanel.tsx +173 -102
  237. package/src/component/header/RangesPickingOptionPanel.tsx +72 -59
  238. package/src/component/hooks/useAddMultipletSignal.tsx +32 -0
  239. package/src/component/hooks/useFilter.ts +2 -1
  240. package/src/component/hooks/useSpectrum.ts +7 -1
  241. package/src/component/hooks/useSpectrumWithDataSource.ts +16 -8
  242. package/src/component/hooks/use_ticks_config.ts +1 -7
  243. package/src/component/modal/PublicationStringModal.tsx +3 -3
  244. package/src/component/modal/setting/tanstack_general_settings/tabs/axis_tab.tsx +76 -12
  245. package/src/component/modal/setting/tanstack_general_settings/validation/axis_tab_validation.ts +16 -2
  246. package/src/component/panels/MoleculesPanel/hooks/useAtomAssignment.tsx +1 -1
  247. package/src/component/panels/RangesPanel/RangesPanel.tsx +1 -3
  248. package/src/component/panels/RangesPanel/RangesTableRow.tsx +10 -12
  249. package/src/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.tsx +2 -2
  250. package/src/component/panels/filtersPanel/processings_sections_panel.tsx +27 -44
  251. package/src/component/panels/hooks/use_processings_mutation.ts +171 -0
  252. package/src/component/panels/informationPanel/InformationPanel.tsx +1 -1
  253. package/src/component/reducer/Reducer.ts +2 -0
  254. package/src/component/reducer/actions/CorrelationsActions.ts +1 -1
  255. package/src/component/reducer/actions/FiltersActions.ts +1 -1
  256. package/src/component/reducer/actions/RangesActions.ts +14 -25
  257. package/src/component/reducer/actions/SpectraActions.ts +20 -1
  258. package/src/component/reducer/preferences/actions/setPreferences.ts +18 -10
  259. package/src/component/reducer/preferences/preferencesReducer.ts +1 -1
  260. package/src/component/toolbar/ToolTypes.ts +92 -1
  261. package/src/component/toolbar/nmr_toolbar.tsx +12 -69
  262. package/src/component/workspaces/workspaceDefaultProperties.ts +19 -2
  263. package/src/data/data1d/Spectrum1D/initiateDatum1D.ts +14 -8
  264. package/src/data/data2d/Spectrum2D/initiateDatum2D.ts +12 -4
  265. package/src/data/data2d/Spectrum2D/isSpectrum2D.ts +1 -1
  266. package/src/data/utilities/RangeUtilities.ts +12 -36
  267. package/src/versionInfo.ts +1 -1
  268. package/lib/component/1d/integral/IntegralIndicator.d.ts +0 -9
  269. package/lib/component/1d/integral/IntegralIndicator.d.ts.map +0 -1
  270. package/lib/component/1d/integral/IntegralIndicator.js +0 -22
  271. package/lib/component/1d/integral/IntegralIndicator.js.map +0 -1
  272. package/lib/component/2d/1d-tracer/Signals1D.d.ts +0 -11
  273. package/lib/component/2d/1d-tracer/Signals1D.d.ts.map +0 -1
  274. package/lib/component/2d/1d-tracer/Signals1D.js +0 -90
  275. package/lib/component/2d/1d-tracer/Signals1D.js.map +0 -1
  276. package/src/component/1d/integral/IntegralIndicator.tsx +0 -43
  277. package/src/component/2d/1d-tracer/Signals1D.tsx +0 -145
@@ -1 +1 @@
1
- {"version":3,"file":"RangeUtilities.js","sourceRoot":"","sources":["../../../src/data/utilities/RangeUtilities.ts"],"names":[],"mappings":"AACA,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAElC,SAAS,WAAW,CAAC,KAAY;IAC/B,MAAM,WAAW,GAAG,CAAC,QAA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@
1
- export default { version: 'v2.4.0' };
1
+ export default { version: 'v2.5.0' };
2
2
  //# sourceMappingURL=versionInfo.js.map
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": "2.4.0",
4
+ "version": "2.5.0",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "exports": {
@@ -26,7 +26,7 @@
26
26
  "clean-lib": "rimraf lib",
27
27
  "cspell": "cspell lint \"**/*.tsx\"",
28
28
  "dev": "vite --host localhost --port 3000 --open",
29
- "eslint": "eslint . --cache --max-warnings=102",
29
+ "eslint": "eslint . --cache --max-warnings=103",
30
30
  "eslint-fix": "node --run eslint -- --fix",
31
31
  "install:clean": "rm -rf node_modules/ && rm -rf package-lock.json && npm install && npm start",
32
32
  "knip": "knip",
@@ -66,12 +66,12 @@
66
66
  "@emotion/react": "^11.14.0",
67
67
  "@emotion/styled": "^11.14.1",
68
68
  "@hookform/resolvers": "^5.4.0",
69
- "@tanstack/react-form": "^1.33.0",
69
+ "@tanstack/react-form": "^1.33.1",
70
70
  "@tanstack/react-store": "^0.11.0",
71
71
  "@tanstack/react-table": "^8.21.3",
72
- "@zakodium/nmr-types": "^0.5.18",
73
- "@zakodium/nmrium-core": "^0.7.37",
74
- "@zakodium/nmrium-core-plugins": "^0.7.50",
72
+ "@zakodium/nmr-types": "^0.5.19",
73
+ "@zakodium/nmrium-core": "^0.7.41",
74
+ "@zakodium/nmrium-core-plugins": "^0.7.54",
75
75
  "@zakodium/pdnd-esm": "^1.1.0",
76
76
  "@zakodium/utils": "^0.2.0",
77
77
  "@zip.js/zip.js": "^2.8.26",
@@ -98,19 +98,20 @@
98
98
  "ml-spectra-processing": "^14.29.2",
99
99
  "ml-tree-similarity": "^2.2.0",
100
100
  "nmr-correlation": "2.3.3",
101
- "nmr-processing": "^22.19.0",
101
+ "nmr-processing": "^22.19.1",
102
102
  "numeral": "^2.0.6",
103
103
  "openchemlib": "^9.24.0",
104
104
  "openchemlib-utils": "^8.17.1",
105
105
  "papaparse": "^5.5.4",
106
106
  "react-d3-utils": "^3.1.2",
107
+ "react-draggable": "=4.5.0",
107
108
  "react-dropzone": "^15.0.0",
108
109
  "react-error-boundary": "^6.1.2",
109
110
  "react-hook-form": "^7.81.0",
110
111
  "react-icons": "^5.7.0",
111
112
  "react-inspector": "^9.0.0",
112
113
  "react-mf": "^3.1.1",
113
- "react-ocl": "^8.7.1",
114
+ "react-ocl": "^8.7.2",
114
115
  "react-ocl-nmr": "^4.1.1",
115
116
  "react-plot": "^3.1.2",
116
117
  "react-rnd": "^10.5.3",
@@ -122,9 +123,9 @@
122
123
  "zod": "^4.4.3"
123
124
  },
124
125
  "devDependencies": {
125
- "@blueprintjs/core": "^6.17.1",
126
+ "@blueprintjs/core": "^6.17.2",
126
127
  "@blueprintjs/icons": "^6.13.0",
127
- "@blueprintjs/select": "^6.3.2",
128
+ "@blueprintjs/select": "^6.3.3",
128
129
  "@playwright/test": "=1.57.0",
129
130
  "@simbathesailor/use-what-changed": "^2.0.0",
130
131
  "@types/d3-array": "^3.2.2",
@@ -133,7 +134,7 @@
133
134
  "@types/dlv": "^1.1.5",
134
135
  "@types/file-saver": "^2.0.7",
135
136
  "@types/lodash": "^4.17.24",
136
- "@types/node": "^26.1.0",
137
+ "@types/node": "^26.1.1",
137
138
  "@types/numeral": "^2.0.5",
138
139
  "@types/papaparse": "^5.5.2",
139
140
  "@types/react": "^18.3.13",
@@ -147,11 +148,11 @@
147
148
  "eslint": "^9.39.2",
148
149
  "eslint-config-cheminfo-react": "^20.1.0",
149
150
  "eslint-config-cheminfo-typescript": "^22.1.0",
150
- "knip": "^6.25.0",
151
+ "knip": "^6.26.0",
151
152
  "modern-normalize": "^3.0.1",
152
153
  "postcss": "^8.5.16",
153
154
  "postcss-styled-syntax": "^0.7.2",
154
- "prettier": "^3.9.4",
155
+ "prettier": "^3.9.5",
155
156
  "rc-menu": "^9.16.1",
156
157
  "react": "^18.3.1",
157
158
  "react-dom": "^18.3.1",
@@ -161,7 +162,7 @@
161
162
  "stylelint": "^17.14.0",
162
163
  "stylelint-config-standard": "^40.0.0",
163
164
  "typescript": "~6.0.3",
164
- "vite": "^8.1.3",
165
+ "vite": "^8.1.4",
165
166
  "vitest": "^4.1.10"
166
167
  },
167
168
  "volta": {
@@ -1,5 +1,6 @@
1
1
  import { useMemo, useRef } from 'react';
2
2
  import { useLinearPrimaryTicks } from 'react-d3-utils';
3
+ import { SVGStyledText } from 'react-science/ui';
3
4
 
4
5
  import { AxisUnitPicker } from '../1d-2d/components/axis_unit_picker.tsx';
5
6
  import { useChartData } from '../context/ChartContext.js';
@@ -11,6 +12,7 @@ import {
11
12
  useHorizontalAxisUnit,
12
13
  } from '../hooks/use_axis_unit.ts';
13
14
  import { useGridline1DConfig } from '../hooks/use_gridlines_config.ts';
15
+ import { useTicksConfig } from '../hooks/use_ticks_config.ts';
14
16
 
15
17
  import { useIsInset } from './inset/InsetProvider.js';
16
18
 
@@ -33,6 +35,7 @@ export function HorizontalAxis1D() {
33
35
  'horizontal',
34
36
  refAxis,
35
37
  );
38
+ const { labelStyle } = useTicksConfig();
36
39
  const gridConfig = useGridline1DConfig();
37
40
 
38
41
  if (!width || !height) {
@@ -59,9 +62,16 @@ export function HorizontalAxis1D() {
59
62
  allowedUnits={allowedUnits}
60
63
  onChange={setUnit}
61
64
  >
62
- <text fill="#000" x={width - 10} y="30" dy="0.70em" textAnchor="end">
65
+ <SVGStyledText
66
+ fill="black"
67
+ x={width - 10}
68
+ y="30"
69
+ dy="0.70em"
70
+ textAnchor="end"
71
+ {...labelStyle}
72
+ >
63
73
  {unitLabel}
64
- </text>
74
+ </SVGStyledText>
65
75
  </AxisUnitPicker>
66
76
  )}
67
77
  </D3Axis>
@@ -20,6 +20,7 @@ import Peaks from './peaks/Peaks.js';
20
20
  import PeaksShapes from './peaks/PeaksShapes.js';
21
21
  import Ranges from './ranges/Ranges.js';
22
22
  import RangesIntegrals from './ranges/RangesIntegrals.js';
23
+ import { Signals } from './ranges/Signals.tsx';
23
24
 
24
25
  export function SVGContent1D() {
25
26
  return (
@@ -47,6 +48,7 @@ export function SVGContent1D() {
47
48
 
48
49
  <SimilarityTree />
49
50
  </ClipPathContainer>
51
+ <Signals />
50
52
  <JGraph />
51
53
  <PredictionErrorsNotations />
52
54
 
@@ -5,6 +5,7 @@ import { SVGRootContainer } from '../1d-2d/components/SVGRootContainer.js';
5
5
  import { ViewerResponsiveWrapper } from '../1d-2d/components/ViewerResponsiveWrapper.js';
6
6
  import BrushXY from '../1d-2d/tools/BrushXY.js';
7
7
  import CrossLinePointer from '../1d-2d/tools/CrossLinePointer.js';
8
+ import { CursorToolIcon } from '../1d-2d/tools/CursorToolIcon.tsx';
8
9
  import { MouseTracker } from '../EventsTrackers/MouseTracker.js';
9
10
  import { useChartData } from '../context/ChartContext.js';
10
11
  import { ScaleProvider } from '../context/ScaleContext.js';
@@ -47,6 +48,7 @@ function InnerViewer1D(props: InnerViewer1DProps) {
47
48
  position: 'absolute',
48
49
  }}
49
50
  >
51
+ <CursorToolIcon />
50
52
  <CrossLinePointer />
51
53
  <BrushXY axis="XY" enableHorizontalGuideline />
52
54
  <XLabelPointer />
@@ -1,6 +1,7 @@
1
1
  import styled from '@emotion/styled';
2
2
  import type { Integral } from '@zakodium/nmr-types';
3
3
 
4
+ import { RangeIndicator } from '../../1d-2d/components/RangeIndicator.tsx';
4
5
  import { useChartData } from '../../context/ChartContext.js';
5
6
  import { useDispatch } from '../../context/DispatchContext.js';
6
7
  import { useScaleChecked } from '../../context/ScaleContext.js';
@@ -10,8 +11,6 @@ import { useHighlight } from '../../highlight/index.js';
10
11
  import { useResizerStatus } from '../../hooks/useResizerStatus.js';
11
12
  import useSpectrum from '../../hooks/useSpectrum.js';
12
13
 
13
- import { IntegralIndicator } from './IntegralIndicator.js';
14
-
15
14
  const Group = styled.g<{ isActive: boolean }>`
16
15
  rect {
17
16
  fill: ${(props) => (props.isActive ? '#ff6f0057' : 'transparent')};
@@ -39,7 +38,7 @@ function IntegralResizable({
39
38
  const { id, integral, to, from } = integralData;
40
39
  const highlight = useHighlight([id], {
41
40
  type: 'INTEGRAL',
42
- extra: { id, spectrumID: spectrum.id },
41
+ extra: { id, spectrumID: spectrum?.id },
43
42
  });
44
43
 
45
44
  function handleOnStopResizing(position: Position) {
@@ -51,7 +50,7 @@ function IntegralResizable({
51
50
  from: scaleX().invert(position.x2),
52
51
  to: scaleX().invert(position.x1),
53
52
  },
54
- spectrumKey: spectrum.id,
53
+ spectrumKey: spectrum?.id,
55
54
  },
56
55
  });
57
56
  }
@@ -77,10 +76,11 @@ function IntegralResizable({
77
76
  return (
78
77
  <Group isActive={highlight.isActive || isActive}>
79
78
  <rect width={width} height={bottom} data-no-export="true" />
80
- <IntegralIndicator
79
+ <RangeIndicator
80
+ position={0}
81
81
  value={integral}
82
82
  format={integralFormat}
83
- width={width}
83
+ size={width}
84
84
  />
85
85
  </Group>
86
86
  );
@@ -7,6 +7,7 @@ import {
7
7
  } from '../../../data/data1d/Spectrum1D/index.js';
8
8
  import { isRangeAssigned } from '../../../data/data1d/Spectrum1D/isRangeAssigned.js';
9
9
  import { getOpacityBasedOnSignalKind } from '../../../data/utilities/RangeUtilities.js';
10
+ import { RangeIndicator } from '../../1d-2d/components/RangeIndicator.tsx';
10
11
  import {
11
12
  useAssignment,
12
13
  useAssignmentContext,
@@ -27,7 +28,6 @@ import useSpectrum from '../../hooks/useSpectrum.js';
27
28
  import { EditRangeModal } from '../../modal/editRange/EditRangeModal.js';
28
29
  import type { StackOverlappingLabelsMapReturnType } from '../../utility/stackOverlappingLabels.js';
29
30
  import { useIsInset } from '../inset/InsetProvider.js';
30
- import { IntegralIndicator } from '../integral/IntegralIndicator.js';
31
31
  import { useScaleX } from '../utilities/scale.js';
32
32
 
33
33
  import { AssignmentLabel } from './AssignmentLabel.js';
@@ -64,7 +64,7 @@ function Range(options: RangeProps) {
64
64
  ),
65
65
  {
66
66
  type: 'RANGE',
67
- extra: { id, spectrumID: spectrum.id },
67
+ extra: { id, spectrumID: spectrum?.id },
68
68
  },
69
69
  );
70
70
 
@@ -74,7 +74,6 @@ function Range(options: RangeProps) {
74
74
  const { showIntegralsValues } = useActiveSpectrumRangesViewState();
75
75
 
76
76
  const { isDialogOpen } = useDialogData();
77
-
78
77
  const isBlockedByEditing = selectedTool && isDialogOpen(EditRangeModal);
79
78
 
80
79
  function handleOnStopResizing(position: Position) {
@@ -213,11 +212,12 @@ function Range(options: RangeProps) {
213
212
  <Atoms range={range} x={rangeWidth / 2} />
214
213
 
215
214
  {showIntegralsValues && (
216
- <IntegralIndicator
215
+ <RangeIndicator
216
+ position={0}
217
+ size={rangeWidth}
217
218
  value={integration}
218
- format={relativeFormat}
219
- width={rangeWidth}
220
219
  opacity={opacity}
220
+ format={relativeFormat}
221
221
  />
222
222
  )}
223
223
  </g>
@@ -0,0 +1,28 @@
1
+ import { isSpectrum1D } from '@zakodium/nmrium-core';
2
+
3
+ import { Signals1D } from '../../1d-2d/components/Signals1D.tsx';
4
+ import { useChartData } from '../../context/ChartContext.tsx';
5
+ import { useScaleChecked } from '../../context/ScaleContext.tsx';
6
+ import useSpectrum from '../../hooks/useSpectrum.ts';
7
+
8
+ export function Signals() {
9
+ const spectrum = useSpectrum();
10
+ const { scaleX } = useScaleChecked();
11
+ const { height, margin } = useChartData();
12
+
13
+ if (!isSpectrum1D(spectrum)) return null;
14
+
15
+ const {
16
+ id,
17
+ ranges: { values },
18
+ } = spectrum;
19
+ return (
20
+ <Signals1D
21
+ orientation="horizontal"
22
+ spectrumId={id}
23
+ ranges={values}
24
+ scale={scaleX()}
25
+ position={height - margin.bottom}
26
+ />
27
+ );
28
+ }
@@ -0,0 +1,106 @@
1
+ import styled from '@emotion/styled';
2
+
3
+ import { useChartData } from '../../context/ChartContext.tsx';
4
+ import { formatNumber } from '../../utility/formatNumber.ts';
5
+
6
+ const Path = styled.path`
7
+ fill: none;
8
+ stroke-width: 1px;
9
+ shape-rendering: crispedges;
10
+ stroke: black;
11
+
12
+ &:hover {
13
+ stroke: red;
14
+ }
15
+ `;
16
+ const Text = styled.text`
17
+ font-size: 11px;
18
+ fill: black;
19
+ `;
20
+
21
+ export type IndicatorOrientation = 'horizontal' | 'vertical';
22
+
23
+ interface RangeIndicatorProps extends Pick<
24
+ React.HTMLAttributes<SVGGElement>,
25
+ 'onClick'
26
+ > {
27
+ position: number;
28
+ size: number;
29
+ orientation?: IndicatorOrientation;
30
+ value?: number;
31
+ format?: string;
32
+ opacity?: number;
33
+ }
34
+ const BRACKET_LENGTH = 5;
35
+
36
+ interface Layout {
37
+ groupTransform: string;
38
+ pathD: string;
39
+ textTransform: string;
40
+ textAnchor: 'start' | 'end' | undefined;
41
+ }
42
+
43
+ function getLayout(
44
+ orientation: IndicatorOrientation,
45
+ position: number,
46
+ size: number,
47
+ top: number,
48
+ ): Layout {
49
+ if (orientation === 'vertical') {
50
+ return {
51
+ groupTransform: `translate(${top} ${position})`,
52
+ pathD: `M0 0 L${BRACKET_LENGTH} 0 L${BRACKET_LENGTH} ${size} L0 ${size}`,
53
+ textTransform: `translate(${-BRACKET_LENGTH - 4} ${Math.round(size / 2) + 4})`,
54
+ textAnchor: 'end',
55
+ };
56
+ }
57
+
58
+ return {
59
+ groupTransform: `translate(${position} ${top})`,
60
+ pathD: `M0 0 L0 ${BRACKET_LENGTH} L${size} ${BRACKET_LENGTH} L${size} 0`,
61
+ textTransform: `rotate(-90) translate(5 ${Math.round(size / 2) + 4})`,
62
+ textAnchor: undefined,
63
+ };
64
+ }
65
+
66
+ export function useMarginBottom(
67
+ orientation: IndicatorOrientation,
68
+ offset = 10,
69
+ ) {
70
+ const { margin, height, displayerMode } = useChartData();
71
+ if (displayerMode === '1D') {
72
+ return height - margin.bottom - offset;
73
+ }
74
+
75
+ if (orientation === 'vertical') {
76
+ return margin.left - offset;
77
+ }
78
+
79
+ return margin.top - offset;
80
+ }
81
+
82
+ export function RangeIndicator(props: RangeIndicatorProps) {
83
+ const {
84
+ position,
85
+ size,
86
+ orientation = 'horizontal',
87
+ value,
88
+ format,
89
+ opacity = 1,
90
+ onClick,
91
+ } = props;
92
+ const resolvedTop = useMarginBottom(orientation);
93
+
94
+ const layout = getLayout(orientation, position, size, resolvedTop);
95
+
96
+ return (
97
+ <g transform={layout.groupTransform} style={{ opacity }} onClick={onClick}>
98
+ <Path d={layout.pathD} />
99
+ {value !== undefined && (
100
+ <Text transform={layout.textTransform} textAnchor={layout.textAnchor}>
101
+ {formatNumber(value, format ?? '')}
102
+ </Text>
103
+ )}
104
+ </g>
105
+ );
106
+ }