nmrium 2.7.0 → 3.0.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 (489) hide show
  1. package/lib/component/1d/BrushTracker1D.d.ts.map +1 -1
  2. package/lib/component/1d/BrushTracker1D.js +15 -14
  3. package/lib/component/1d/BrushTracker1D.js.map +1 -1
  4. package/lib/component/1d/SVGContent1D.js +3 -3
  5. package/lib/component/1d/SVGContent1D.js.map +1 -1
  6. package/lib/component/1d/Viewer1D.d.ts.map +1 -1
  7. package/lib/component/1d/Viewer1D.js +2 -1
  8. package/lib/component/1d/Viewer1D.js.map +1 -1
  9. package/lib/component/1d/inset/DraggableInset.d.ts +1 -1
  10. package/lib/component/1d/inset/DraggableInset.d.ts.map +1 -1
  11. package/lib/component/1d/inset/DraggableInset.js.map +1 -1
  12. package/lib/component/1d/inset/InsetProvider.d.ts +1 -1
  13. package/lib/component/1d/inset/InsetProvider.d.ts.map +1 -1
  14. package/lib/component/1d/inset/InsetProvider.js.map +1 -1
  15. package/lib/component/1d/inset/SpectraInsets.d.ts +0 -23
  16. package/lib/component/1d/inset/SpectraInsets.d.ts.map +1 -1
  17. package/lib/component/1d/inset/SpectraInsets.js +1 -1
  18. package/lib/component/1d/inset/SpectraInsets.js.map +1 -1
  19. package/lib/component/1d/peaks/PeakEditionManager.d.ts +1 -1
  20. package/lib/component/1d/peaks/PeakEditionManager.d.ts.map +1 -1
  21. package/lib/component/1d/peaks/PeaksShapes.d.ts +1 -2
  22. package/lib/component/1d/peaks/PeaksShapes.d.ts.map +1 -1
  23. package/lib/component/1d/peaks/PeaksShapes.js +31 -17
  24. package/lib/component/1d/peaks/PeaksShapes.js.map +1 -1
  25. package/lib/component/1d/peaks/usePeakShapesPath.d.ts +1 -2
  26. package/lib/component/1d/peaks/usePeakShapesPath.d.ts.map +1 -1
  27. package/lib/component/1d/peaks/usePeakShapesPath.js +2 -3
  28. package/lib/component/1d/peaks/usePeakShapesPath.js.map +1 -1
  29. package/lib/component/1d/plugin_chart_brush_tracker.d.ts +2 -0
  30. package/lib/component/1d/plugin_chart_brush_tracker.d.ts.map +1 -0
  31. package/lib/component/1d/plugin_chart_brush_tracker.js +41 -0
  32. package/lib/component/1d/plugin_chart_brush_tracker.js.map +1 -0
  33. package/lib/component/1d/plugin_svg_chart.d.ts +1 -1
  34. package/lib/component/1d/plugin_svg_chart.d.ts.map +1 -1
  35. package/lib/component/1d/plugin_svg_chart.js +16 -11
  36. package/lib/component/1d/plugin_svg_chart.js.map +1 -1
  37. package/lib/component/1d-2d/tools/BrushXY.d.ts +1 -1
  38. package/lib/component/1d-2d/tools/BrushXY.d.ts.map +1 -1
  39. package/lib/component/1d-2d/tools/BrushXY.js.map +1 -1
  40. package/lib/component/1d-2d/tools/CrossLinePointer.d.ts +1 -1
  41. package/lib/component/1d-2d/tools/CrossLinePointer.d.ts.map +1 -1
  42. package/lib/component/1d-2d/tools/CrossLinePointer.js.map +1 -1
  43. package/lib/component/1d-2d/tools/CursorToolIcon.d.ts.map +1 -1
  44. package/lib/component/1d-2d/tools/CursorToolIcon.js +23 -6
  45. package/lib/component/1d-2d/tools/CursorToolIcon.js.map +1 -1
  46. package/lib/component/2d/BrushTracker2D.js.map +1 -1
  47. package/lib/component/2d/utilities/DimensionLayout.d.ts +1 -1
  48. package/lib/component/2d/utilities/DimensionLayout.d.ts.map +1 -1
  49. package/lib/component/EventsTrackers/BrushTracker.d.ts +1 -84
  50. package/lib/component/EventsTrackers/BrushTracker.d.ts.map +1 -1
  51. package/lib/component/EventsTrackers/BrushTracker.js +70 -3
  52. package/lib/component/EventsTrackers/BrushTracker.js.map +1 -1
  53. package/lib/component/EventsTrackers/KeysListenerTracker.d.ts +1 -1
  54. package/lib/component/EventsTrackers/KeysListenerTracker.d.ts.map +1 -1
  55. package/lib/component/EventsTrackers/brush_tracker.types.d.ts +93 -0
  56. package/lib/component/EventsTrackers/brush_tracker.types.d.ts.map +1 -0
  57. package/lib/component/EventsTrackers/brush_tracker.types.js +2 -0
  58. package/lib/component/EventsTrackers/brush_tracker.types.js.map +1 -0
  59. package/lib/component/EventsTrackers/brush_tracker_events_listeners.d.ts +7 -0
  60. package/lib/component/EventsTrackers/brush_tracker_events_listeners.d.ts.map +1 -0
  61. package/lib/component/EventsTrackers/brush_tracker_events_listeners.js +15 -0
  62. package/lib/component/EventsTrackers/brush_tracker_events_listeners.js.map +1 -0
  63. package/lib/component/context/LoggerContext.js +1 -1
  64. package/lib/component/context/LoggerContext.js.map +1 -1
  65. package/lib/component/context/ScaleContext.d.ts +1 -1
  66. package/lib/component/context/ScaleContext.d.ts.map +1 -1
  67. package/lib/component/context/ScaleContext.js.map +1 -1
  68. package/lib/component/context/processings_mutations_context.api.d.ts +3 -2
  69. package/lib/component/context/processings_mutations_context.api.d.ts.map +1 -1
  70. package/lib/component/context/processings_mutations_context.api.js +82 -10
  71. package/lib/component/context/processings_mutations_context.api.js.map +1 -1
  72. package/lib/component/elements/Anchor.d.ts +1 -1
  73. package/lib/component/elements/Anchor.d.ts.map +1 -1
  74. package/lib/component/elements/DraggableDialog.js.map +1 -1
  75. package/lib/component/elements/EditableColumn.d.ts +6 -2
  76. package/lib/component/elements/EditableColumn.d.ts.map +1 -1
  77. package/lib/component/elements/EditableColumn.js +35 -25
  78. package/lib/component/elements/EditableColumn.js.map +1 -1
  79. package/lib/component/elements/ResizerWithScale.js +1 -1
  80. package/lib/component/elements/ResizerWithScale.js.map +1 -1
  81. package/lib/component/elements/export/ExportManager.d.ts +1 -1
  82. package/lib/component/elements/export/ExportManager.d.ts.map +1 -1
  83. package/lib/component/elements/export/ExportManager.js.map +1 -1
  84. package/lib/component/elements/tanstack_table/create_action_column.d.ts +11 -0
  85. package/lib/component/elements/tanstack_table/create_action_column.d.ts.map +1 -0
  86. package/lib/component/elements/tanstack_table/create_action_column.js +24 -0
  87. package/lib/component/elements/tanstack_table/create_action_column.js.map +1 -0
  88. package/lib/component/elements/tanstack_table/create_column_helper.d.ts +5 -0
  89. package/lib/component/elements/tanstack_table/create_column_helper.d.ts.map +1 -0
  90. package/lib/component/elements/tanstack_table/create_column_helper.js +5 -0
  91. package/lib/component/elements/tanstack_table/create_column_helper.js.map +1 -0
  92. package/lib/component/elements/{ReactTable/BaseReactTable.d.ts → tanstack_table/elements/base_react_table.d.ts} +1 -1
  93. package/lib/component/elements/tanstack_table/elements/base_react_table.d.ts.map +1 -0
  94. package/lib/component/elements/{ReactTable/BaseReactTable.js → tanstack_table/elements/base_react_table.js} +1 -1
  95. package/lib/component/elements/tanstack_table/elements/base_react_table.js.map +1 -0
  96. package/lib/component/elements/{ReactTable/Elements/EmptyDataRow.d.ts → tanstack_table/elements/empty_data_row.d.ts} +1 -1
  97. package/lib/component/elements/tanstack_table/elements/empty_data_row.d.ts.map +1 -0
  98. package/lib/component/elements/{ReactTable/Elements/EmptyDataRow.js → tanstack_table/elements/empty_data_row.js} +1 -1
  99. package/lib/component/elements/tanstack_table/elements/empty_data_row.js.map +1 -0
  100. package/lib/component/elements/tanstack_table/elements/table_context.d.ts +4 -0
  101. package/lib/component/elements/tanstack_table/elements/table_context.d.ts.map +1 -0
  102. package/lib/component/elements/tanstack_table/elements/table_context.js +11 -0
  103. package/lib/component/elements/tanstack_table/elements/table_context.js.map +1 -0
  104. package/lib/component/elements/tanstack_table/elements/table_header.d.ts +12 -0
  105. package/lib/component/elements/tanstack_table/elements/table_header.d.ts.map +1 -0
  106. package/lib/component/elements/tanstack_table/elements/table_header.js +42 -0
  107. package/lib/component/elements/tanstack_table/elements/table_header.js.map +1 -0
  108. package/lib/component/elements/tanstack_table/elements/table_row.d.ts +12 -0
  109. package/lib/component/elements/tanstack_table/elements/table_row.d.ts.map +1 -0
  110. package/lib/component/elements/{ReactTable/Elements/ReactTableRow.js → tanstack_table/elements/table_row.js} +18 -17
  111. package/lib/component/elements/tanstack_table/elements/table_row.js.map +1 -0
  112. package/lib/component/elements/tanstack_table/features.d.ts +21 -0
  113. package/lib/component/elements/tanstack_table/features.d.ts.map +1 -0
  114. package/lib/component/elements/tanstack_table/features.js +14 -0
  115. package/lib/component/elements/tanstack_table/features.js.map +1 -0
  116. package/lib/component/elements/tanstack_table/index.d.ts +6 -0
  117. package/lib/component/elements/tanstack_table/index.d.ts.map +1 -0
  118. package/lib/component/elements/tanstack_table/index.js +6 -0
  119. package/lib/component/elements/tanstack_table/index.js.map +1 -0
  120. package/lib/component/elements/tanstack_table/table.d.ts +26 -0
  121. package/lib/component/elements/tanstack_table/table.d.ts.map +1 -0
  122. package/lib/component/elements/{ReactTable/ReactTable.js → tanstack_table/table.js} +30 -38
  123. package/lib/component/elements/tanstack_table/table.js.map +1 -0
  124. package/lib/component/elements/tanstack_table/types.d.ts +47 -0
  125. package/lib/component/elements/tanstack_table/types.d.ts.map +1 -0
  126. package/lib/component/elements/tanstack_table/types.js +2 -0
  127. package/lib/component/elements/tanstack_table/types.js.map +1 -0
  128. package/lib/component/header/AutoPeakPickingOptionPanel.js +1 -1
  129. package/lib/component/header/AutoPeakPickingOptionPanel.js.map +1 -1
  130. package/lib/component/header/Header.js +1 -1
  131. package/lib/component/header/Header.js.map +1 -1
  132. package/lib/component/hooks/reduce2DSpectrum.js +1 -1
  133. package/lib/component/hooks/useCombinedRefs.d.ts +2 -2
  134. package/lib/component/hooks/useCombinedRefs.d.ts.map +1 -1
  135. package/lib/component/hooks/useCombinedRefs.js +1 -1
  136. package/lib/component/hooks/useCombinedRefs.js.map +1 -1
  137. package/lib/component/hooks/useSaveSettings.js +1 -1
  138. package/lib/component/hooks/useSaveSettings.js.map +1 -1
  139. package/lib/component/hooks/use_axis_unit.d.ts +3 -3
  140. package/lib/component/main/InnerNMRiumContents.d.ts +4 -4
  141. package/lib/component/main/InnerNMRiumContents.d.ts.map +1 -1
  142. package/lib/component/main/NMRium.d.ts +1 -1
  143. package/lib/component/main/NMRium.d.ts.map +1 -1
  144. package/lib/component/main/NMRiumRefAPI.d.ts +1 -1
  145. package/lib/component/main/NMRiumRefAPI.d.ts.map +1 -1
  146. package/lib/component/main/NMRiumRefAPI.js.map +1 -1
  147. package/lib/component/main/NMRiumStateProvider.d.ts.map +1 -1
  148. package/lib/component/main/NMRiumStateProvider.js +4 -2
  149. package/lib/component/main/NMRiumStateProvider.js.map +1 -1
  150. package/lib/component/main/NMRiumViewer.d.ts +1 -1
  151. package/lib/component/main/NMRiumViewer.d.ts.map +1 -1
  152. package/lib/component/main/NMRiumViewerWrapper.d.ts +1 -1
  153. package/lib/component/main/NMRiumViewerWrapper.d.ts.map +1 -1
  154. package/lib/component/main/types.d.ts +2 -2
  155. package/lib/component/main/types.d.ts.map +1 -1
  156. package/lib/component/modal/ImportPublicationStringModal.d.ts.map +1 -1
  157. package/lib/component/modal/ImportPublicationStringModal.js +96 -73
  158. package/lib/component/modal/ImportPublicationStringModal.js.map +1 -1
  159. package/lib/component/modal/LogsHistoryModal.d.ts.map +1 -1
  160. package/lib/component/modal/LogsHistoryModal.js +44 -40
  161. package/lib/component/modal/LogsHistoryModal.js.map +1 -1
  162. package/lib/component/modal/changeSum/SelectMolecule.js +2 -2
  163. package/lib/component/modal/changeSum/SelectMolecule.js.map +1 -1
  164. package/lib/component/modal/editRange/forms/components/signal-tabs/SignalJCouplingsTable.d.ts.map +1 -1
  165. package/lib/component/modal/editRange/forms/components/signal-tabs/SignalJCouplingsTable.js +48 -44
  166. package/lib/component/modal/editRange/forms/components/signal-tabs/SignalJCouplingsTable.js.map +1 -1
  167. package/lib/component/modal/editRange/forms/components/signal-tabs/SignalPeaksTable.d.ts.map +1 -1
  168. package/lib/component/modal/editRange/forms/components/signal-tabs/SignalPeaksTable.js +36 -32
  169. package/lib/component/modal/editRange/forms/components/signal-tabs/SignalPeaksTable.js.map +1 -1
  170. package/lib/component/modal/metaImportation/MetaImportationModal.d.ts.map +1 -1
  171. package/lib/component/modal/metaImportation/MetaImportationModal.js +15 -14
  172. package/lib/component/modal/metaImportation/MetaImportationModal.js.map +1 -1
  173. package/lib/component/modal/setting/tanstack_general_settings/errors/context.d.ts +81 -81
  174. package/lib/component/modal/setting/tanstack_general_settings/errors/renderer.d.ts +81 -81
  175. package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.d.ts +81 -81
  176. package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_footer.d.ts +54 -54
  177. package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.d.ts +54 -54
  178. package/lib/component/modal/setting/tanstack_general_settings/hooks/use_safe_workspace.d.ts +9 -9
  179. package/lib/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.d.ts +54 -54
  180. package/lib/component/modal/setting/tanstack_general_settings/tabs/axis_tab.d.ts +54 -54
  181. package/lib/component/modal/setting/tanstack_general_settings/tabs/database_tab.d.ts +54 -54
  182. package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.d.ts +54 -54
  183. package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.d.ts +2 -2
  184. package/lib/component/modal/setting/tanstack_general_settings/tabs/external_api_tab.d.ts +54 -54
  185. package/lib/component/modal/setting/tanstack_general_settings/tabs/general_tab.d.ts +54 -54
  186. package/lib/component/modal/setting/tanstack_general_settings/tabs/import_filters_tab.d.ts +54 -54
  187. package/lib/component/modal/setting/tanstack_general_settings/tabs/nuclei_tab.d.ts +54 -54
  188. package/lib/component/modal/setting/tanstack_general_settings/tabs/panels_tab.d.ts +54 -54
  189. package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_colors_tab.d.ts +54 -54
  190. package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.d.ts +54 -54
  191. package/lib/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.d.ts +54 -54
  192. package/lib/component/modal/setting/tanstack_general_settings/tabs/tools_tab.d.ts +54 -54
  193. package/lib/component/modal/setting/tanstack_general_settings/validation/auto_processing_tab_validation.d.ts +28 -28
  194. package/lib/component/modal/setting/tanstack_general_settings/validation/export_tab_validation.d.ts +10 -10
  195. package/lib/component/modal/setting/tanstack_general_settings/validation/general_tab_validation.d.ts +6 -6
  196. package/lib/component/modal/setting/tanstack_general_settings/validation/import_filters_tab_validation.d.ts +1 -1
  197. package/lib/component/modal/setting/tanstack_general_settings/validation.d.ts +27 -27
  198. package/lib/component/panels/AutomaticAssignment/AutomaticAssignmentTable.d.ts +1 -1
  199. package/lib/component/panels/AutomaticAssignment/AutomaticAssignmentTable.d.ts.map +1 -1
  200. package/lib/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js +29 -26
  201. package/lib/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js.map +1 -1
  202. package/lib/component/panels/AutomaticAssignment/useAutoAssignments.js +1 -1
  203. package/lib/component/panels/AutomaticAssignment/useAutoAssignments.js.map +1 -1
  204. package/lib/component/panels/IntegralsPanel/IntegralTable.d.ts.map +1 -1
  205. package/lib/component/panels/IntegralsPanel/IntegralTable.js +70 -76
  206. package/lib/component/panels/IntegralsPanel/IntegralTable.js.map +1 -1
  207. package/lib/component/panels/IntegralsPanel/IntegralsPreferences.d.ts +1 -1
  208. package/lib/component/panels/MatrixGenerationPanel/ExclusionsZonesTable.d.ts.map +1 -1
  209. package/lib/component/panels/MatrixGenerationPanel/ExclusionsZonesTable.js +33 -29
  210. package/lib/component/panels/MatrixGenerationPanel/ExclusionsZonesTable.js.map +1 -1
  211. package/lib/component/panels/MoleculesPanel/hooks/useExtractAtomAssignmentLabel.d.ts +1 -0
  212. package/lib/component/panels/MoleculesPanel/hooks/useExtractAtomAssignmentLabel.d.ts.map +1 -1
  213. package/lib/component/panels/MoleculesPanel/hooks/useExtractAtomAssignmentLabel.js +30 -6
  214. package/lib/component/panels/MoleculesPanel/hooks/useExtractAtomAssignmentLabel.js.map +1 -1
  215. package/lib/component/panels/PeaksPanel/PeaksPreferences.d.ts +1 -1
  216. package/lib/component/panels/PeaksPanel/PeaksTable.d.ts +8 -6
  217. package/lib/component/panels/PeaksPanel/PeaksTable.d.ts.map +1 -1
  218. package/lib/component/panels/PeaksPanel/PeaksTable.js +116 -126
  219. package/lib/component/panels/PeaksPanel/PeaksTable.js.map +1 -1
  220. package/lib/component/panels/PeaksPanel/peaksToTSV.d.ts +2 -2
  221. package/lib/component/panels/PeaksPanel/peaksToTSV.d.ts.map +1 -1
  222. package/lib/component/panels/PeaksPanel/peaksToTSV.js +9 -11
  223. package/lib/component/panels/PeaksPanel/peaksToTSV.js.map +1 -1
  224. package/lib/component/panels/RangesPanel/RangesTable.d.ts +3 -2
  225. package/lib/component/panels/RangesPanel/RangesTable.d.ts.map +1 -1
  226. package/lib/component/panels/RangesPanel/RangesTable.js.map +1 -1
  227. package/lib/component/panels/RangesPanel/RangesTableRow.d.ts +2 -2
  228. package/lib/component/panels/RangesPanel/RangesTableRow.d.ts.map +1 -1
  229. package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentColumn.d.ts.map +1 -1
  230. package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentColumn.js +33 -2
  231. package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentColumn.js.map +1 -1
  232. package/lib/component/panels/SpectraPanel/SpectraPreferences.d.ts +1 -1
  233. package/lib/component/panels/SpectraPanel/SpectraTable.d.ts.map +1 -1
  234. package/lib/component/panels/SpectraPanel/SpectraTable.js +37 -26
  235. package/lib/component/panels/SpectraPanel/SpectraTable.js.map +1 -1
  236. package/lib/component/panels/SpectraPanel/SpectrumListPanel.js +1 -1
  237. package/lib/component/panels/SpectraPanel/SpectrumListPanel.js.map +1 -1
  238. package/lib/component/panels/SpectraPanel/base/SpectraColumnsManager.d.ts +1 -1
  239. package/lib/component/panels/SpectraPanel/base/SpectraColumnsManager.d.ts.map +1 -1
  240. package/lib/component/panels/SpectraPanel/base/SpectraColumnsManager.js +56 -52
  241. package/lib/component/panels/SpectraPanel/base/SpectraColumnsManager.js.map +1 -1
  242. package/lib/component/panels/SummaryPanel/SetShiftTolerancesModal.d.ts.map +1 -1
  243. package/lib/component/panels/SummaryPanel/SetShiftTolerancesModal.js +23 -20
  244. package/lib/component/panels/SummaryPanel/SetShiftTolerancesModal.js.map +1 -1
  245. package/lib/component/panels/ZonesPanel/ZonesPreferences.d.ts +1 -1
  246. package/lib/component/panels/ZonesPanel/ZonesTableRow.d.ts +2 -2
  247. package/lib/component/panels/ZonesPanel/ZonesTableRow.d.ts.map +1 -1
  248. package/lib/component/panels/databasePanel/DatabaseTable.d.ts +1 -1
  249. package/lib/component/panels/databasePanel/DatabaseTable.d.ts.map +1 -1
  250. package/lib/component/panels/databasePanel/DatabaseTable.js +171 -153
  251. package/lib/component/panels/databasePanel/DatabaseTable.js.map +1 -1
  252. package/lib/component/panels/filtersPanel/Filters/ExclusionZonesOptionsPanel.d.ts.map +1 -1
  253. package/lib/component/panels/filtersPanel/Filters/ExclusionZonesOptionsPanel.js +27 -24
  254. package/lib/component/panels/filtersPanel/Filters/ExclusionZonesOptionsPanel.js.map +1 -1
  255. package/lib/component/panels/filtersPanel/Filters/FiltersSectionsPanel.d.ts +1 -1
  256. package/lib/component/panels/filtersPanel/Filters/FiltersSectionsPanel.js +1 -1
  257. package/lib/component/panels/filtersPanel/Filters/FiltersSectionsPanel.js.map +1 -1
  258. package/lib/component/panels/filtersPanel/Filters/hooks/usePhaseCorrection.d.ts +2 -2
  259. package/lib/component/panels/filtersPanel/Filters/hooks/usePhaseCorrection.js +2 -2
  260. package/lib/component/panels/filtersPanel/Filters/hooks/usePhaseCorrection.js.map +1 -1
  261. package/lib/component/panels/filtersPanel/Filters/hooks/usePhaseCorrectionTwoDimensions.d.ts +2 -2
  262. package/lib/component/panels/filtersPanel/Filters/hooks/usePhaseCorrectionTwoDimensions.js +2 -2
  263. package/lib/component/panels/filtersPanel/Filters/hooks/usePhaseCorrectionTwoDimensions.js.map +1 -1
  264. package/lib/component/panels/filtersPanel/processings/processing_item.js +1 -1
  265. package/lib/component/panels/filtersPanel/processings/processing_item.js.map +1 -1
  266. package/lib/component/panels/filtersPanel/processings/use_live_edit.d.ts +2 -6
  267. package/lib/component/panels/filtersPanel/processings/use_live_edit.d.ts.map +1 -1
  268. package/lib/component/panels/filtersPanel/processings/use_live_edit.js +9 -9
  269. package/lib/component/panels/filtersPanel/processings/use_live_edit.js.map +1 -1
  270. package/lib/component/panels/informationPanel/InformationEditionModal.d.ts.map +1 -1
  271. package/lib/component/panels/informationPanel/InformationEditionModal.js +69 -64
  272. package/lib/component/panels/informationPanel/InformationEditionModal.js.map +1 -1
  273. package/lib/component/panels/multipleAnalysisPanel/MultipleSpectraAnalysisTable.d.ts.map +1 -1
  274. package/lib/component/panels/multipleAnalysisPanel/MultipleSpectraAnalysisTable.js +17 -20
  275. package/lib/component/panels/multipleAnalysisPanel/MultipleSpectraAnalysisTable.js.map +1 -1
  276. package/lib/component/panels/multipleAnalysisPanel/preferences/AnalysisTablePreferences.d.ts.map +1 -1
  277. package/lib/component/panels/multipleAnalysisPanel/preferences/AnalysisTablePreferences.js +25 -20
  278. package/lib/component/panels/multipleAnalysisPanel/preferences/AnalysisTablePreferences.js.map +1 -1
  279. package/lib/component/panels/multipleAnalysisPanel/preferences/LegendsPreferences.d.ts.map +1 -1
  280. package/lib/component/panels/multipleAnalysisPanel/preferences/LegendsPreferences.js +41 -36
  281. package/lib/component/panels/multipleAnalysisPanel/preferences/LegendsPreferences.js.map +1 -1
  282. package/lib/component/panels/spectrumSimulation/SpinSystemTable.d.ts.map +1 -1
  283. package/lib/component/panels/spectrumSimulation/SpinSystemTable.js +14 -15
  284. package/lib/component/panels/spectrumSimulation/SpinSystemTable.js.map +1 -1
  285. package/lib/component/reducer/Reducer.d.ts +5 -6
  286. package/lib/component/reducer/Reducer.d.ts.map +1 -1
  287. package/lib/component/reducer/Reducer.js +1 -1
  288. package/lib/component/reducer/Reducer.js.map +1 -1
  289. package/lib/component/reducer/actions/DatabaseActions.d.ts.map +1 -1
  290. package/lib/component/reducer/actions/DatabaseActions.js +3 -2
  291. package/lib/component/reducer/actions/DatabaseActions.js.map +1 -1
  292. package/lib/component/reducer/actions/InsetActions.d.ts +2 -3
  293. package/lib/component/reducer/actions/InsetActions.d.ts.map +1 -1
  294. package/lib/component/reducer/actions/InsetActions.js +4 -5
  295. package/lib/component/reducer/actions/InsetActions.js.map +1 -1
  296. package/lib/component/reducer/actions/RangesActions.d.ts +1 -0
  297. package/lib/component/reducer/actions/RangesActions.d.ts.map +1 -1
  298. package/lib/component/reducer/actions/RangesActions.js +33 -11
  299. package/lib/component/reducer/actions/RangesActions.js.map +1 -1
  300. package/lib/component/reducer/actions/ToolsActions.d.ts +1 -1
  301. package/lib/component/reducer/actions/ToolsActions.d.ts.map +1 -1
  302. package/lib/component/reducer/actions/processings_actions.d.ts +1 -0
  303. package/lib/component/reducer/actions/processings_actions.d.ts.map +1 -1
  304. package/lib/component/reducer/actions/processings_actions.js +4 -2
  305. package/lib/component/reducer/actions/processings_actions.js.map +1 -1
  306. package/lib/component/reducer/helper/Zoom1DManager.d.ts +1 -1
  307. package/lib/component/reducer/helper/Zoom1DManager.d.ts.map +1 -1
  308. package/lib/component/reducer/helper/ZoomHistoryManager.d.ts +2 -2
  309. package/lib/component/reducer/helper/ZoomHistoryManager.d.ts.map +1 -1
  310. package/lib/component/reducer/helper/removeSpectrumRelatedObjectsById.js +1 -1
  311. package/lib/component/reducer/helper/removeSpectrumRelatedObjectsById.js.map +1 -1
  312. package/lib/component/reducer/preferences/actions/matrixGeneration.d.ts +1 -1
  313. package/lib/component/reducer/preferences/actions/matrixGeneration.d.ts.map +1 -1
  314. package/lib/component/utility/Events.d.ts +1 -1
  315. package/lib/component/utility/Events.d.ts.map +1 -1
  316. package/lib/component/utility/core_slots/core_operator_brush.commons.d.ts +9 -0
  317. package/lib/component/utility/core_slots/core_operator_brush.commons.d.ts.map +1 -0
  318. package/lib/component/utility/core_slots/core_operator_brush.commons.js +15 -0
  319. package/lib/component/utility/core_slots/core_operator_brush.commons.js.map +1 -0
  320. package/lib/component/utility/core_slots/core_operator_chart_brush.commons.d.ts +7 -0
  321. package/lib/component/utility/core_slots/core_operator_chart_brush.commons.d.ts.map +1 -0
  322. package/lib/component/utility/core_slots/core_operator_chart_brush.commons.js +82 -0
  323. package/lib/component/utility/core_slots/core_operator_chart_brush.commons.js.map +1 -0
  324. package/lib/component/utility/core_slots/core_operator_chart_brush_tracker.d.ts +8 -0
  325. package/lib/component/utility/core_slots/core_operator_chart_brush_tracker.d.ts.map +1 -0
  326. package/lib/component/utility/core_slots/core_operator_chart_brush_tracker.js +11 -0
  327. package/lib/component/utility/core_slots/core_operator_chart_brush_tracker.js.map +1 -0
  328. package/lib/component/utility/core_slots/core_operator_chart_mouse_icon.d.ts +9 -0
  329. package/lib/component/utility/core_slots/core_operator_chart_mouse_icon.d.ts.map +1 -0
  330. package/lib/component/utility/core_slots/core_operator_chart_mouse_icon.js +14 -0
  331. package/lib/component/utility/core_slots/core_operator_chart_mouse_icon.js.map +1 -0
  332. package/lib/component/utility/core_slots/core_operator_chart_svg.js +1 -13
  333. package/lib/component/utility/core_slots/core_operator_chart_svg.js.map +1 -1
  334. package/lib/component/utility/core_slots/core_operator_expanded.d.ts +1 -1
  335. package/lib/component/utility/core_slots/core_operator_expanded.d.ts.map +1 -1
  336. package/lib/component/utility/core_slots/core_slot.d.ts +1 -1
  337. package/lib/component/utility/core_slots/core_slot.d.ts.map +1 -1
  338. package/lib/component/utility/filterDatabaseInfoEntry.js +1 -1
  339. package/lib/component/utility/filterDatabaseInfoEntry.js.map +1 -1
  340. package/lib/data/data1d/Spectrum1D/initiateDatum1D.d.ts.map +1 -1
  341. package/lib/data/data1d/Spectrum1D/initiateDatum1D.js +2 -0
  342. package/lib/data/data1d/Spectrum1D/initiateDatum1D.js.map +1 -1
  343. package/lib/data/data1d/Spectrum1D/ranges/detectSignals.d.ts +1 -0
  344. package/lib/data/data1d/Spectrum1D/ranges/detectSignals.d.ts.map +1 -1
  345. package/lib/data/data2d/Spectrum2D/contours.js +2 -2
  346. package/lib/data/data2d/Spectrum2D/get2DColor.js +5 -5
  347. package/lib/data/data2d/Spectrum2D/get2DColor.js.map +1 -1
  348. package/lib/data/data2d/Spectrum2D/initiateDatum2D.d.ts.map +1 -1
  349. package/lib/data/data2d/Spectrum2D/initiateDatum2D.js +2 -0
  350. package/lib/data/data2d/Spectrum2D/initiateDatum2D.js.map +1 -1
  351. package/lib/utils/clipboard/clipboardComponents.js.map +1 -1
  352. package/lib/versionInfo.js +1 -1
  353. package/package.json +34 -36
  354. package/src/component/1d/BrushTracker1D.tsx +19 -21
  355. package/src/component/1d/SVGContent1D.tsx +3 -3
  356. package/src/component/1d/Viewer1D.tsx +2 -0
  357. package/src/component/1d/inset/DraggableInset.tsx +2 -1
  358. package/src/component/1d/inset/InsetProvider.tsx +1 -2
  359. package/src/component/1d/inset/SpectraInsets.tsx +1 -32
  360. package/src/component/1d/peaks/PeaksShapes.tsx +62 -40
  361. package/src/component/1d/peaks/usePeakShapesPath.ts +2 -4
  362. package/src/component/1d/plugin_chart_brush_tracker.tsx +63 -0
  363. package/src/component/1d/plugin_svg_chart.tsx +26 -15
  364. package/src/component/1d-2d/tools/BrushXY.tsx +1 -1
  365. package/src/component/1d-2d/tools/CrossLinePointer.tsx +1 -1
  366. package/src/component/1d-2d/tools/CursorToolIcon.tsx +38 -16
  367. package/src/component/2d/BrushTracker2D.tsx +5 -5
  368. package/src/component/2d/utilities/DimensionLayout.ts +1 -1
  369. package/src/component/EventsTrackers/BrushTracker.tsx +119 -119
  370. package/src/component/EventsTrackers/KeysListenerTracker.tsx +1 -1
  371. package/src/component/EventsTrackers/brush_tracker.types.ts +111 -0
  372. package/src/component/EventsTrackers/brush_tracker_events_listeners.ts +32 -0
  373. package/src/component/context/LoggerContext.tsx +1 -1
  374. package/src/component/context/ScaleContext.tsx +2 -1
  375. package/src/component/context/processings_mutations_context.api.ts +115 -17
  376. package/src/component/elements/Anchor.tsx +1 -1
  377. package/src/component/elements/DraggableDialog.tsx +2 -2
  378. package/src/component/elements/EditableColumn.tsx +93 -63
  379. package/src/component/elements/ResizerWithScale.tsx +1 -1
  380. package/src/component/elements/export/ExportManager.tsx +1 -1
  381. package/src/component/elements/tanstack_table/create_action_column.tsx +43 -0
  382. package/src/component/elements/tanstack_table/create_column_helper.ts +11 -0
  383. package/src/component/elements/tanstack_table/elements/table_context.ts +15 -0
  384. package/src/component/elements/tanstack_table/elements/table_header.tsx +111 -0
  385. package/src/component/elements/{ReactTable/Elements/ReactTableRow.tsx → tanstack_table/elements/table_row.tsx} +51 -50
  386. package/src/component/elements/tanstack_table/features.ts +33 -0
  387. package/src/component/elements/tanstack_table/index.ts +5 -0
  388. package/src/component/elements/{ReactTable/ReactTable.tsx → tanstack_table/table.tsx} +79 -158
  389. package/src/component/elements/tanstack_table/types.ts +86 -0
  390. package/src/component/header/AutoPeakPickingOptionPanel.tsx +1 -1
  391. package/src/component/header/Header.tsx +1 -1
  392. package/src/component/hooks/reduce2DSpectrum.ts +1 -1
  393. package/src/component/hooks/useCombinedRefs.ts +3 -3
  394. package/src/component/hooks/useSaveSettings.tsx +1 -1
  395. package/src/component/main/InnerNMRiumContents.tsx +4 -4
  396. package/src/component/main/NMRiumRefAPI.ts +1 -1
  397. package/src/component/main/NMRiumStateProvider.tsx +4 -2
  398. package/src/component/main/NMRiumViewer.tsx +1 -1
  399. package/src/component/main/NMRiumViewerWrapper.tsx +1 -1
  400. package/src/component/main/types.ts +3 -3
  401. package/src/component/modal/ImportPublicationStringModal.tsx +167 -136
  402. package/src/component/modal/LogsHistoryModal.tsx +32 -25
  403. package/src/component/modal/changeSum/SelectMolecule.tsx +2 -2
  404. package/src/component/modal/editRange/forms/components/signal-tabs/SignalJCouplingsTable.tsx +28 -24
  405. package/src/component/modal/editRange/forms/components/signal-tabs/SignalPeaksTable.tsx +27 -25
  406. package/src/component/modal/metaImportation/MetaImportationModal.tsx +19 -15
  407. package/src/component/panels/AutomaticAssignment/AutomaticAssignmentTable.tsx +27 -25
  408. package/src/component/panels/AutomaticAssignment/useAutoAssignments.ts +1 -1
  409. package/src/component/panels/IntegralsPanel/IntegralTable.tsx +75 -89
  410. package/src/component/panels/MatrixGenerationPanel/ExclusionsZonesTable.tsx +68 -60
  411. package/src/component/panels/MoleculesPanel/hooks/useExtractAtomAssignmentLabel.ts +40 -8
  412. package/src/component/panels/PeaksPanel/PeaksTable.tsx +126 -124
  413. package/src/component/panels/PeaksPanel/peaksToTSV.ts +14 -15
  414. package/src/component/panels/RangesPanel/RangesTable.tsx +3 -2
  415. package/src/component/panels/RangesPanel/RangesTableRow.tsx +2 -2
  416. package/src/component/panels/RangesPanel/TableColumns/SignalAssignmentColumn.tsx +52 -2
  417. package/src/component/panels/SpectraPanel/SpectraTable.tsx +58 -36
  418. package/src/component/panels/SpectraPanel/SpectrumListPanel.tsx +1 -1
  419. package/src/component/panels/SpectraPanel/base/SpectraColumnsManager.tsx +31 -35
  420. package/src/component/panels/SummaryPanel/SetShiftTolerancesModal.tsx +25 -20
  421. package/src/component/panels/ZonesPanel/ZonesTableRow.tsx +2 -2
  422. package/src/component/panels/databasePanel/DatabasePanel.tsx +1 -1
  423. package/src/component/panels/databasePanel/DatabaseTable.tsx +189 -183
  424. package/src/component/panels/filtersPanel/Filters/ExclusionZonesOptionsPanel.tsx +20 -20
  425. package/src/component/panels/filtersPanel/Filters/FiltersSectionsPanel.tsx +1 -1
  426. package/src/component/panels/filtersPanel/Filters/hooks/usePhaseCorrection.tsx +2 -2
  427. package/src/component/panels/filtersPanel/Filters/hooks/usePhaseCorrectionTwoDimensions.tsx +2 -2
  428. package/src/component/panels/filtersPanel/processings/processing_item.tsx +1 -1
  429. package/src/component/panels/filtersPanel/processings/use_live_edit.ts +9 -17
  430. package/src/component/panels/informationPanel/InformationEditionModal.tsx +40 -37
  431. package/src/component/panels/multipleAnalysisPanel/MultipleSpectraAnalysisTable.tsx +23 -24
  432. package/src/component/panels/multipleAnalysisPanel/preferences/AnalysisTablePreferences.tsx +33 -24
  433. package/src/component/panels/multipleAnalysisPanel/preferences/LegendsPreferences.tsx +34 -31
  434. package/src/component/panels/spectrumSimulation/SpinSystemTable.tsx +19 -18
  435. package/src/component/reducer/Reducer.ts +7 -4
  436. package/src/component/reducer/actions/DatabaseActions.ts +4 -3
  437. package/src/component/reducer/actions/InsetActions.ts +8 -10
  438. package/src/component/reducer/actions/RangesActions.ts +78 -20
  439. package/src/component/reducer/actions/ToolsActions.ts +1 -1
  440. package/src/component/reducer/actions/processings_actions.ts +5 -2
  441. package/src/component/reducer/helper/Zoom1DManager.ts +1 -1
  442. package/src/component/reducer/helper/ZoomHistoryManager.ts +2 -2
  443. package/src/component/reducer/helper/removeSpectrumRelatedObjectsById.ts +1 -1
  444. package/src/component/reducer/preferences/actions/matrixGeneration.ts +1 -1
  445. package/src/component/utility/Events.tsx +1 -1
  446. package/src/component/utility/core_slots/core_operator_brush.commons.ts +18 -0
  447. package/src/component/utility/core_slots/core_operator_chart_brush.commons.ts +138 -0
  448. package/src/component/utility/core_slots/core_operator_chart_brush_tracker.tsx +27 -0
  449. package/src/component/utility/core_slots/core_operator_chart_mouse_icon.tsx +32 -0
  450. package/src/component/utility/core_slots/core_operator_chart_svg.tsx +2 -17
  451. package/src/component/utility/filterDatabaseInfoEntry.ts +1 -1
  452. package/src/data/data1d/Spectrum1D/initiateDatum1D.ts +3 -0
  453. package/src/data/data2d/Spectrum2D/contours.ts +2 -2
  454. package/src/data/data2d/Spectrum2D/get2DColor.ts +5 -5
  455. package/src/data/data2d/Spectrum2D/initiateDatum2D.ts +4 -0
  456. package/src/utils/clipboard/clipboardComponents.tsx +5 -5
  457. package/src/versionInfo.ts +1 -1
  458. package/lib/component/elements/ReactTable/BaseReactTable.d.ts.map +0 -1
  459. package/lib/component/elements/ReactTable/BaseReactTable.js.map +0 -1
  460. package/lib/component/elements/ReactTable/Elements/EmptyDataRow.d.ts.map +0 -1
  461. package/lib/component/elements/ReactTable/Elements/EmptyDataRow.js.map +0 -1
  462. package/lib/component/elements/ReactTable/Elements/ReactTableHeader.d.ts +0 -10
  463. package/lib/component/elements/ReactTable/Elements/ReactTableHeader.d.ts.map +0 -1
  464. package/lib/component/elements/ReactTable/Elements/ReactTableHeader.js +0 -27
  465. package/lib/component/elements/ReactTable/Elements/ReactTableHeader.js.map +0 -1
  466. package/lib/component/elements/ReactTable/Elements/ReactTableRow.d.ts +0 -16
  467. package/lib/component/elements/ReactTable/Elements/ReactTableRow.d.ts.map +0 -1
  468. package/lib/component/elements/ReactTable/Elements/ReactTableRow.js.map +0 -1
  469. package/lib/component/elements/ReactTable/ReactTable.d.ts +0 -64
  470. package/lib/component/elements/ReactTable/ReactTable.d.ts.map +0 -1
  471. package/lib/component/elements/ReactTable/ReactTable.js.map +0 -1
  472. package/lib/component/elements/ReactTable/utility/ReactTableContext.d.ts +0 -4
  473. package/lib/component/elements/ReactTable/utility/ReactTableContext.d.ts.map +0 -1
  474. package/lib/component/elements/ReactTable/utility/ReactTableContext.js +0 -11
  475. package/lib/component/elements/ReactTable/utility/ReactTableContext.js.map +0 -1
  476. package/lib/component/elements/ReactTable/utility/addCustomColumn.d.ts +0 -19
  477. package/lib/component/elements/ReactTable/utility/addCustomColumn.d.ts.map +0 -1
  478. package/lib/component/elements/ReactTable/utility/addCustomColumn.js +0 -36
  479. package/lib/component/elements/ReactTable/utility/addCustomColumn.js.map +0 -1
  480. package/lib/component/elements/ReactTable/utility/useRowSpan.d.ts +0 -9
  481. package/lib/component/elements/ReactTable/utility/useRowSpan.d.ts.map +0 -1
  482. package/lib/component/elements/ReactTable/utility/useRowSpan.js +0 -40
  483. package/lib/component/elements/ReactTable/utility/useRowSpan.js.map +0 -1
  484. package/src/component/elements/ReactTable/Elements/ReactTableHeader.tsx +0 -81
  485. package/src/component/elements/ReactTable/utility/ReactTableContext.ts +0 -14
  486. package/src/component/elements/ReactTable/utility/addCustomColumn.tsx +0 -75
  487. package/src/component/elements/ReactTable/utility/useRowSpan.ts +0 -61
  488. /package/src/component/elements/{ReactTable/BaseReactTable.tsx → tanstack_table/elements/base_react_table.tsx} +0 -0
  489. /package/src/component/elements/{ReactTable/Elements/EmptyDataRow.tsx → tanstack_table/elements/empty_data_row.tsx} +0 -0
@@ -1,4 +1,5 @@
1
1
  import type { Spectrum1D } from '@zakodium/nmrium-core';
2
+ import { isSpectrum1D } from '@zakodium/nmrium-core';
2
3
 
3
4
  import { useScale } from '../../context/ScaleContext.js';
4
5
  import { useActiveSpectrum } from '../../hooks/useActiveSpectrum.js';
@@ -7,15 +8,21 @@ import useSpectrum from '../../hooks/useSpectrum.js';
7
8
 
8
9
  import { usePeakShapesPath } from './usePeakShapesPath.js';
9
10
 
10
- const emptyData = { peaks: {}, display: {} };
11
+ type PeaksShapesMode = 'peakShape' | 'peaksSum';
11
12
 
12
- function PeaksShapes() {
13
+ export function PeaksShapes() {
13
14
  const { shiftY } = useScale();
14
15
  const { showPeaksShapes, showPeaksSum } = useActiveSpectrumPeaksViewState();
15
16
  const activeSpectrum = useActiveSpectrum();
16
- const spectrum = useSpectrum(emptyData) as Spectrum1D;
17
+ const spectrum = useSpectrum();
17
18
 
18
- if (!spectrum?.peaks?.values || !spectrum.display.isVisible) {
19
+ if (!isSpectrum1D(spectrum)) {
20
+ return null;
21
+ }
22
+
23
+ const { peaks, display } = spectrum;
24
+
25
+ if (!peaks?.values || !display.isVisible) {
19
26
  return null;
20
27
  }
21
28
 
@@ -23,52 +30,67 @@ function PeaksShapes() {
23
30
 
24
31
  return (
25
32
  <g className="peaks-shapes">
26
- {showPeaksShapes && <PeaksShapesItems vAlign={shift} />}
27
- {showPeaksSum && <PeaksShapesSum vAlign={shift} />}
33
+ {showPeaksShapes && <PeaksShapesItems vAlign={shift} mode="peakShape" />}
34
+ {showPeaksSum && <PeaksShapesItems vAlign={shift} mode="peaksSum" />}
28
35
  </g>
29
36
  );
30
37
  }
31
38
 
32
- function PeaksShapesItems(props: { vAlign: number }) {
33
- const spectrum = useSpectrum(emptyData) as Spectrum1D;
34
- const getPath = usePeakShapesPath(spectrum);
39
+ function PeaksShapesItems(props: { vAlign: number; mode: PeaksShapesMode }) {
40
+ const spectrum = useSpectrum();
35
41
 
36
- return (
37
- <g>
38
- {' '}
39
- {spectrum.peaks.values.map((peak) => {
40
- const { fill, path } = getPath({ target: 'peakShape', peak });
41
- return (
42
- <path
43
- key={peak.id}
44
- fill={fill}
45
- fillOpacity={0.3}
46
- d={path}
47
- transform={`translate(0,-${props.vAlign})`}
48
- />
49
- );
50
- })}
51
- </g>
52
- );
42
+ if (!isSpectrum1D(spectrum)) {
43
+ return null;
44
+ }
45
+
46
+ return <PeaksShapesItemsContent spectrum={spectrum} {...props} />;
53
47
  }
54
48
 
55
- function PeaksShapesSum(props: { vAlign: number }) {
56
- const spectrum = useSpectrum(emptyData) as Spectrum1D;
57
- const getPath = usePeakShapesPath(spectrum);
49
+ function PeaksShapesItemsContent(props: {
50
+ spectrum: Spectrum1D;
51
+ vAlign: number;
52
+ mode: PeaksShapesMode;
53
+ }) {
54
+ const { spectrum, vAlign, mode } = props;
55
+ const {
56
+ id,
57
+ info: { originFrequency },
58
+ } = spectrum;
59
+ const getPath = usePeakShapesPath(id, originFrequency);
60
+
61
+ const {
62
+ peaks: { values: peaksList },
63
+ } = spectrum;
64
+
65
+ if (peaksList.length === 0) {
66
+ return null;
67
+ }
68
+
69
+ const transform = `translate(0,-${vAlign})`;
70
+
71
+ if (mode === 'peakShape') {
72
+ return (
73
+ <g>
74
+ {peaksList.map((peak) => {
75
+ const { fill, path } = getPath({ target: 'peakShape', peak });
76
+ return (
77
+ <path
78
+ key={peak.id}
79
+ fill={fill}
80
+ fillOpacity={0.3}
81
+ d={path}
82
+ transform={transform}
83
+ />
84
+ );
85
+ })}
86
+ </g>
87
+ );
88
+ }
58
89
 
59
90
  const { fill, path } = getPath({
60
91
  target: 'peaksSum',
61
- peaks: spectrum.peaks.values,
92
+ peaks: peaksList,
62
93
  });
63
94
 
64
- return (
65
- <path
66
- stroke={'darkblue'}
67
- fill={fill}
68
- d={path}
69
- transform={`translate(0,-${props.vAlign})`}
70
- />
71
- );
95
+ return <path stroke="darkblue" fill={fill} d={path} transform={transform} />;
72
96
  }
73
-
74
- export default PeaksShapes;
@@ -1,5 +1,4 @@
1
1
  import type { Peak1D } from '@zakodium/nmr-types';
2
- import type { Spectrum1D } from '@zakodium/nmrium-core';
3
2
  import type { DataXY } from 'cheminfo-types';
4
3
  import { peakToXY, peaksToXY } from 'nmr-processing';
5
4
  import { SVGPathBuilder } from 'react-science/ui';
@@ -17,7 +16,7 @@ type PeaksShapesOptions =
17
16
  peaks: Peak1D[];
18
17
  };
19
18
 
20
- export function usePeakShapesPath(spectrum: Spectrum1D) {
19
+ export function usePeakShapesPath(spectrumId: string, frequency: number) {
21
20
  const { scaleX, scaleY } = useScaleChecked();
22
21
  const { width, xDomain } = useChartData();
23
22
 
@@ -27,7 +26,6 @@ export function usePeakShapesPath(spectrum: Spectrum1D) {
27
26
  } {
28
27
  const { target } = options;
29
28
 
30
- const frequency = spectrum.info.originFrequency;
31
29
  let pathSeries: DataXY | null = null;
32
30
  switch (target) {
33
31
  case 'peakShape': {
@@ -54,7 +52,7 @@ export function usePeakShapesPath(spectrum: Spectrum1D) {
54
52
  break;
55
53
  }
56
54
  const _scaleX = scaleX();
57
- const _scaleY = scaleY({ spectrumId: spectrum.id });
55
+ const _scaleY = scaleY({ spectrumId });
58
56
 
59
57
  const pathBuilder = new SVGPathBuilder();
60
58
  let fill = 'transparent';
@@ -0,0 +1,63 @@
1
+ import { useMemo } from 'react';
2
+
3
+ import { useChartData } from '../context/ChartContext.tsx';
4
+ import { useCore } from '../context/CoreContext.tsx';
5
+ import { useScaleChecked } from '../context/ScaleContext.tsx';
6
+ import { useProcessingsMutations } from '../context/processings_mutations_context.tsx';
7
+ import { useIndicatorLineColor } from '../hooks/useIndicatorLineColor.ts';
8
+ import { useStableSpectrum } from '../hooks/useSpectrum.ts';
9
+ import { useLiveEdit } from '../panels/filtersPanel/processings/use_live_edit.ts';
10
+ import { useLiveOperation } from '../panels/filtersPanel/processings/use_live_operation.ts';
11
+ import { useBrushTrackerEvent } from '../utility/core_slots/core_operator_chart_brush.commons.ts';
12
+ import { CoreOperatorChartBrushTracker } from '../utility/core_slots/core_operator_chart_brush_tracker.tsx';
13
+
14
+ export function PluginChartBrushTracker() {
15
+ const core = useCore();
16
+ const spectrum = useStableSpectrum();
17
+ const { height, width, margin } = useChartData();
18
+
19
+ const { scaleX: scaleXBuilder, scaleY: scaleYBuilder } = useScaleChecked();
20
+ const indicatorLineColor = useIndicatorLineColor();
21
+
22
+ const [liveOperation, setLiveOperation] = useLiveOperation();
23
+ const liveEdit = useLiveEdit(liveOperation?.uid);
24
+ const processingsMutations = useProcessingsMutations();
25
+
26
+ const scaleX = useMemo(() => scaleXBuilder(), [scaleXBuilder]);
27
+ const scaleY = useMemo(() => scaleYBuilder(), [scaleYBuilder]);
28
+
29
+ if (!liveOperation) return null;
30
+ if (!spectrum) return null;
31
+
32
+ const operatorUI = core.slotOperator(liveOperation.operatorId);
33
+ if (!operatorUI) return null;
34
+
35
+ const isLiveEditable = operatorUI?.isLiveEditable ?? false;
36
+
37
+ return (
38
+ <CoreOperatorChartBrushTracker
39
+ core={core}
40
+ operatorUI={operatorUI}
41
+ spectrum={spectrum}
42
+ operation={liveOperation}
43
+ height={height}
44
+ width={width}
45
+ margin={margin}
46
+ scaleX={scaleX}
47
+ scaleY={scaleY}
48
+ indicatorLineColor={indicatorLineColor}
49
+ useBrushTrackerEvent={useBrushTrackerEvent}
50
+ onChange={(liveOperation) => {
51
+ liveOperation = setLiveOperation(liveOperation);
52
+
53
+ if (!isLiveEditable) return;
54
+ if (!liveEdit.value?.checked) return;
55
+
56
+ void processingsMutations.applyLiveChange(
57
+ liveOperation,
58
+ liveEdit.value?.shouldProcessNext ?? false,
59
+ );
60
+ }}
61
+ />
62
+ );
63
+ }
@@ -1,29 +1,32 @@
1
+ import { assertDefined } from '@zakodium/utils';
1
2
  import { useMemo } from 'react';
2
3
 
3
4
  import { useChartData } from '../context/ChartContext.tsx';
4
5
  import { useCore } from '../context/CoreContext.tsx';
6
+ import type { ScaleLinearNumberFunction } from '../context/ScaleContext.tsx';
5
7
  import { useScaleChecked } from '../context/ScaleContext.tsx';
6
8
  import { useIndicatorLineColor } from '../hooks/useIndicatorLineColor.ts';
7
- import { useStableSpectrum } from '../hooks/useSpectrum.ts';
9
+ import useSpectrum from '../hooks/useSpectrum.ts';
8
10
  import { useVerticalAlign } from '../hooks/useVerticalAlign.ts';
9
11
  import { useLiveOperation } from '../panels/filtersPanel/processings/use_live_operation.ts';
10
12
  import { CoreOperatorChartSVG } from '../utility/core_slots/core_operator_chart_svg.tsx';
11
13
 
12
14
  import { getYScale } from './utilities/scale.ts';
13
15
 
14
- export function PluginSVGChart() {
16
+ export function PluginSVGChart1D() {
15
17
  const core = useCore();
16
- const spectrum = useStableSpectrum();
18
+ const spectrum = useSpectrum();
17
19
  const { height, width, margin } = useChartData();
18
20
  const [liveOperation] = useLiveOperation();
19
21
  const { scaleX: scaleXBuilder } = useScaleChecked();
20
22
  const indicatorLineColor = useIndicatorLineColor();
21
23
 
22
- const scaleX = useMemo(() => scaleXBuilder(), [scaleXBuilder]);
23
- const scaleY = useWindowYScale();
24
+ const scaleX = useChartScaleX(scaleXBuilder);
25
+ const scaleY = useChartScaleY();
24
26
 
25
27
  if (!liveOperation) return null;
26
28
  if (!spectrum) return null;
29
+ assertDefined(scaleX);
27
30
 
28
31
  const operatorUI = core.slotOperator(liveOperation.operatorId);
29
32
  if (!operatorUI) return null;
@@ -44,17 +47,25 @@ export function PluginSVGChart() {
44
47
  );
45
48
  }
46
49
 
47
- function useWindowYScale() {
50
+ function useChartScaleX(scaleXBuilder: ScaleLinearNumberFunction) {
51
+ return useMemo(() => scaleXBuilder(), [scaleXBuilder]);
52
+ }
53
+
54
+ function useChartScaleY() {
48
55
  const { spectraBottomMargin } = useScaleChecked();
49
- const { height, margin, yDomains } = useChartData();
56
+ const { height, margin, yDomain } = useChartData();
50
57
  const verticalAlign = useVerticalAlign();
51
58
 
52
- return getYScale({
53
- height,
54
- margin,
55
- verticalAlign,
56
- yDomain: [0, 1],
57
- yDomains,
58
- spectraBottomMargin,
59
- });
59
+ return useMemo(
60
+ () =>
61
+ getYScale({
62
+ height,
63
+ margin,
64
+ verticalAlign,
65
+ yDomain,
66
+ yDomains: {},
67
+ spectraBottomMargin,
68
+ }),
69
+ [height, margin, spectraBottomMargin, verticalAlign, yDomain],
70
+ );
60
71
  }
@@ -3,12 +3,12 @@ import { isSpectrum1D, isSpectrum2D } from '@zakodium/nmrium-core';
3
3
  import type { CSSProperties } from 'react';
4
4
 
5
5
  import { useScale2DX } from '../../2d/utilities/scale.js';
6
- import type { BrushAxis } from '../../EventsTrackers/BrushTracker.js';
7
6
  import {
8
7
  detectBrushing,
9
8
  useBrushDetectionOptions,
10
9
  useBrushTracker,
11
10
  } from '../../EventsTrackers/BrushTracker.js';
11
+ import type { BrushAxis } from '../../EventsTrackers/brush_tracker.types.ts';
12
12
  import { useChartData } from '../../context/ChartContext.js';
13
13
  import { useKeyModifiers } from '../../context/KeyModifierContext.tsx';
14
14
  import { useScaleChecked } from '../../context/ScaleContext.js';
@@ -1,8 +1,8 @@
1
1
  import styled from '@emotion/styled';
2
2
 
3
- import type { BrushAxis } from '../../EventsTrackers/BrushTracker.js';
4
3
  import { useBrushTracker } from '../../EventsTrackers/BrushTracker.js';
5
4
  import { useMouseTracker } from '../../EventsTrackers/MouseTracker.js';
5
+ import type { BrushAxis } from '../../EventsTrackers/brush_tracker.types.ts';
6
6
  import { useChartData } from '../../context/ChartContext.js';
7
7
  import type { Margin } from '../../reducer/Reducer.js';
8
8
  import type { Tool } from '../../toolbar/ToolTypes.js';
@@ -1,12 +1,16 @@
1
1
  import styled from '@emotion/styled';
2
2
  import { createElement } from 'react';
3
3
  import { TbRulerMeasure } from 'react-icons/tb';
4
+ import { match } from 'ts-pattern';
4
5
 
5
6
  import { useMouseTracker } from '../../EventsTrackers/MouseTracker.js';
6
7
  import { useChartData } from '../../context/ChartContext.js';
8
+ import { useCore } from '../../context/CoreContext.tsx';
7
9
  import { useKeyModifiers } from '../../context/KeyModifierContext.tsx';
10
+ import useCheckExperimentalFeature from '../../hooks/useCheckExperimentalFeature.ts';
8
11
  import type { IconDataContext, Tool } from '../../toolbar/ToolTypes.ts';
9
12
  import { getToolIcon } from '../../toolbar/ToolTypes.ts';
13
+ import { CoreOperatorChartMouseIcon } from '../../utility/core_slots/core_operator_chart_mouse_icon.tsx';
10
14
 
11
15
  const CursorWrapper = styled.div`
12
16
  position: absolute;
@@ -52,15 +56,14 @@ function getCursorOffset(placement: CursorPlacement, offset: number) {
52
56
  interface ToolIconRendererProps extends IconDataContext {
53
57
  toolId: Tool;
54
58
  size?: number;
55
- strokeWidth?: number;
56
59
  }
57
60
 
58
61
  function ToolIconRenderer(props: ToolIconRendererProps) {
59
- const { toolId, size, strokeWidth, ...idc } = props;
62
+ const { toolId, size, ...idc } = props;
60
63
 
61
64
  const icon = getToolIcon(toolId, idc);
62
65
  if (!icon) return null;
63
- return createElement(icon, { fontSize: size, strokeWidth });
66
+ return createElement(icon, { fontSize: size });
64
67
  }
65
68
  export function CursorToolIcon({
66
69
  placement = 'bottom-right',
@@ -72,7 +75,10 @@ export function CursorToolIcon({
72
75
  height,
73
76
  margin,
74
77
  toolOptions: { selectedTool },
78
+ processingOperators: { selected: selectedProcessingTool },
75
79
  } = useChartData();
80
+ const core = useCore();
81
+ const isExperimental = useCheckExperimentalFeature();
76
82
  const mousePosition = useMouseTracker();
77
83
  const { isPrimary, shiftKey } = useKeyModifiers();
78
84
  if (
@@ -92,19 +98,35 @@ export function CursorToolIcon({
92
98
  const showRulerIcon = selectedTool === 'zoom' && shiftKey;
93
99
 
94
100
  return (
95
- <CursorWrapper
96
- style={{
97
- transform: `translate(${x}px, ${y}px)`,
98
- }}
99
- >
100
- {showRulerIcon ? (
101
- <TbRulerMeasure size={size} />
102
- ) : (
103
- <ToolIconRenderer
104
- toolId={isPrimary ? selectedTool : 'zoom'}
105
- size={size}
106
- />
107
- )}
101
+ <CursorWrapper style={{ transform: `translate(${x}px, ${y}px)` }}>
102
+ {match({ showRulerIcon, selectedProcessingTool, isExperimental })
103
+ .when(
104
+ (input) => {
105
+ const { selectedProcessingTool, isExperimental } = input;
106
+
107
+ if (!isExperimental) return false;
108
+ if (!selectedProcessingTool) return false;
109
+
110
+ const operatorUI = core.slotOperator(selectedProcessingTool);
111
+ if (!operatorUI?.ChartMouseIcon) return false;
112
+
113
+ return true;
114
+ },
115
+ ({ selectedProcessingTool }) => (
116
+ <CoreOperatorChartMouseIcon
117
+ core={core}
118
+ selected={selectedProcessingTool}
119
+ size={size}
120
+ />
121
+ ),
122
+ )
123
+ .with({ showRulerIcon: true }, () => <TbRulerMeasure size={size} />)
124
+ .otherwise(() => (
125
+ <ToolIconRenderer
126
+ toolId={isPrimary ? selectedTool : 'zoom'}
127
+ size={size}
128
+ />
129
+ ))}
108
130
  </CursorWrapper>
109
131
  );
110
132
  }
@@ -2,6 +2,10 @@ import type { PropsWithChildren } from 'react';
2
2
  import { useCallback, useRef } from 'react';
3
3
 
4
4
  import { getAlignedPoint } from '../1d-2d/tools/DistanceLine.tsx';
5
+ import {
6
+ BrushTracker,
7
+ detectBrushing,
8
+ } from '../EventsTrackers/BrushTracker.js';
5
9
  import type {
6
10
  BaseDetectBrushingOptions,
7
11
  BrushAxis,
@@ -10,11 +14,7 @@ import type {
10
14
  OnClick,
11
15
  OnDoubleClick,
12
16
  OnZoom,
13
- } from '../EventsTrackers/BrushTracker.js';
14
- import {
15
- BrushTracker,
16
- detectBrushing,
17
- } from '../EventsTrackers/BrushTracker.js';
17
+ } from '../EventsTrackers/brush_tracker.types.ts';
18
18
  import { useChartData } from '../context/ChartContext.js';
19
19
  import { useDispatch } from '../context/DispatchContext.js';
20
20
  import { useMapKeyModifiers } from '../context/KeyModifierContext.js';
@@ -1,4 +1,4 @@
1
- import type { BrushCoordination } from '../../EventsTrackers/BrushTracker.js';
1
+ import type { BrushCoordination } from '../../EventsTrackers/brush_tracker.types.ts';
2
2
 
3
3
  export const LAYOUT = {
4
4
  main: 'MAIN',