nmrium 3.1.0 → 3.2.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.
- package/lib/component/1d/BrushTracker1D.d.ts.map +1 -1
- package/lib/component/1d/BrushTracker1D.js +5 -2
- package/lib/component/1d/BrushTracker1D.js.map +1 -1
- package/lib/component/1d/FloatPublicationString.d.ts.map +1 -1
- package/lib/component/1d/FloatPublicationString.js +28 -24
- package/lib/component/1d/FloatPublicationString.js.map +1 -1
- package/lib/component/1d/plugin_chart_brush_tracker.d.ts.map +1 -1
- package/lib/component/1d/plugin_chart_brush_tracker.js +2 -1
- package/lib/component/1d/plugin_chart_brush_tracker.js.map +1 -1
- package/lib/component/1d/plugin_svg_chart.d.ts.map +1 -1
- package/lib/component/1d/plugin_svg_chart.js +15 -2
- package/lib/component/1d/plugin_svg_chart.js.map +1 -1
- package/lib/component/1d/ranges/FloatingRanges.js +2 -2
- package/lib/component/1d/ranges/FloatingRanges.js.map +1 -1
- package/lib/component/1d/ranges/Range.d.ts.map +1 -1
- package/lib/component/1d/ranges/Range.js +1 -1
- package/lib/component/1d/ranges/Range.js.map +1 -1
- package/lib/component/1d-2d/FieldEdition.d.ts +2 -1
- package/lib/component/1d-2d/FieldEdition.d.ts.map +1 -1
- package/lib/component/1d-2d/FieldEdition.js +3 -3
- package/lib/component/1d-2d/FieldEdition.js.map +1 -1
- package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js +3 -3
- package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js.map +1 -1
- package/lib/component/2d/1d-tracer/HorizontalSliceChart.d.ts.map +1 -1
- package/lib/component/2d/1d-tracer/HorizontalSliceChart.js +2 -1
- package/lib/component/2d/1d-tracer/HorizontalSliceChart.js.map +1 -1
- package/lib/component/2d/1d-tracer/VerticalSliceChart.d.ts.map +1 -1
- package/lib/component/2d/1d-tracer/VerticalSliceChart.js +2 -1
- package/lib/component/2d/1d-tracer/VerticalSliceChart.js.map +1 -1
- package/lib/component/2d/BrushTracker2D.d.ts.map +1 -1
- package/lib/component/2d/BrushTracker2D.js +5 -1
- package/lib/component/2d/BrushTracker2D.js.map +1 -1
- package/lib/component/2d/SVGContent2D.d.ts.map +1 -1
- package/lib/component/2d/SVGContent2D.js +2 -1
- package/lib/component/2d/SVGContent2D.js.map +1 -1
- package/lib/component/2d/SignalDeltaLine.d.ts +3 -0
- package/lib/component/2d/SignalDeltaLine.d.ts.map +1 -1
- package/lib/component/2d/SignalDeltaLine.js +3 -4
- package/lib/component/2d/SignalDeltaLine.js.map +1 -1
- package/lib/component/2d/linked-signals/LinkedSignal.d.ts +7 -0
- package/lib/component/2d/linked-signals/LinkedSignal.d.ts.map +1 -0
- package/lib/component/2d/linked-signals/LinkedSignal.js +42 -0
- package/lib/component/2d/linked-signals/LinkedSignal.js.map +1 -0
- package/lib/component/2d/linked-signals/LinkedSignalAssignmentLabel.d.ts +8 -0
- package/lib/component/2d/linked-signals/LinkedSignalAssignmentLabel.d.ts.map +1 -0
- package/lib/component/2d/linked-signals/LinkedSignalAssignmentLabel.js +152 -0
- package/lib/component/2d/linked-signals/LinkedSignalAssignmentLabel.js.map +1 -0
- package/lib/component/2d/linked-signals/LinkedSignals.d.ts +2 -0
- package/lib/component/2d/linked-signals/LinkedSignals.d.ts.map +1 -0
- package/lib/component/2d/linked-signals/LinkedSignals.js +32 -0
- package/lib/component/2d/linked-signals/LinkedSignals.js.map +1 -0
- package/lib/component/2d/linked-signals/SignalCrossingIndicator.d.ts +3 -0
- package/lib/component/2d/linked-signals/SignalCrossingIndicator.d.ts.map +1 -0
- package/lib/component/2d/linked-signals/SignalCrossingIndicator.js +36 -0
- package/lib/component/2d/linked-signals/SignalCrossingIndicator.js.map +1 -0
- package/lib/component/2d/linked-signals/useClassifyCorrelation.d.ts +5 -0
- package/lib/component/2d/linked-signals/useClassifyCorrelation.d.ts.map +1 -0
- package/lib/component/2d/linked-signals/useClassifyCorrelation.js +16 -0
- package/lib/component/2d/linked-signals/useClassifyCorrelation.js.map +1 -0
- package/lib/component/2d/linked-signals/useNearestSignalCrossing.d.ts +13 -0
- package/lib/component/2d/linked-signals/useNearestSignalCrossing.d.ts.map +1 -0
- package/lib/component/2d/linked-signals/useNearestSignalCrossing.js +41 -0
- package/lib/component/2d/linked-signals/useNearestSignalCrossing.js.map +1 -0
- package/lib/component/2d/linked-signals/utilities/getCorrelationColor.d.ts +5 -0
- package/lib/component/2d/linked-signals/utilities/getCorrelationColor.d.ts.map +1 -0
- package/lib/component/2d/linked-signals/utilities/getCorrelationColor.js +31 -0
- package/lib/component/2d/linked-signals/utilities/getCorrelationColor.js.map +1 -0
- package/lib/component/2d/linked-signals/utilities/getCouplingLength.d.ts +3 -0
- package/lib/component/2d/linked-signals/utilities/getCouplingLength.d.ts.map +1 -0
- package/lib/component/2d/linked-signals/utilities/getCouplingLength.js +41 -0
- package/lib/component/2d/linked-signals/utilities/getCouplingLength.js.map +1 -0
- package/lib/component/2d/linked-signals/utilities/signalCrossings.d.ts +45 -0
- package/lib/component/2d/linked-signals/utilities/signalCrossings.d.ts.map +1 -0
- package/lib/component/2d/linked-signals/utilities/signalCrossings.js +73 -0
- package/lib/component/2d/linked-signals/utilities/signalCrossings.js.map +1 -0
- package/lib/component/2d/utilities/extractSpectrumSignals.d.ts +5 -0
- package/lib/component/2d/utilities/extractSpectrumSignals.d.ts.map +1 -1
- package/lib/component/2d/utilities/extractSpectrumSignals.js +15 -0
- package/lib/component/2d/utilities/extractSpectrumSignals.js.map +1 -1
- package/lib/component/2d/utilities/useAssignmentLabelLinkPath.d.ts +17 -0
- package/lib/component/2d/utilities/useAssignmentLabelLinkPath.d.ts.map +1 -0
- package/lib/component/2d/utilities/useAssignmentLabelLinkPath.js +99 -0
- package/lib/component/2d/utilities/useAssignmentLabelLinkPath.js.map +1 -0
- package/lib/component/2d/zones/SignalsGuideLines.d.ts.map +1 -1
- package/lib/component/2d/zones/SignalsGuideLines.js +3 -2
- package/lib/component/2d/zones/SignalsGuideLines.js.map +1 -1
- package/lib/component/2d/zones/Zone.d.ts.map +1 -1
- package/lib/component/2d/zones/Zone.js +47 -1
- package/lib/component/2d/zones/Zone.js.map +1 -1
- package/lib/component/2d/zones/ZonesAssignmentsLabels.d.ts.map +1 -1
- package/lib/component/2d/zones/ZonesAssignmentsLabels.js +4 -148
- package/lib/component/2d/zones/ZonesAssignmentsLabels.js.map +1 -1
- package/lib/component/EventsTrackers/BrushTracker.d.ts.map +1 -1
- package/lib/component/EventsTrackers/BrushTracker.js +101 -16
- package/lib/component/EventsTrackers/BrushTracker.js.map +1 -1
- package/lib/component/EventsTrackers/KeysListenerTracker.d.ts.map +1 -1
- package/lib/component/EventsTrackers/KeysListenerTracker.js +6 -0
- package/lib/component/EventsTrackers/KeysListenerTracker.js.map +1 -1
- package/lib/component/EventsTrackers/brush_tracker.types.d.ts +40 -0
- package/lib/component/EventsTrackers/brush_tracker.types.d.ts.map +1 -1
- package/lib/component/EventsTrackers/brush_tracker_drag_gesture.d.ts +42 -0
- package/lib/component/EventsTrackers/brush_tracker_drag_gesture.d.ts.map +1 -0
- package/lib/component/EventsTrackers/brush_tracker_drag_gesture.js +46 -0
- package/lib/component/EventsTrackers/brush_tracker_drag_gesture.js.map +1 -0
- package/lib/component/EventsTrackers/brush_tracker_events_listeners.d.ts +1 -1
- package/lib/component/EventsTrackers/brush_tracker_events_listeners.d.ts.map +1 -1
- package/lib/component/EventsTrackers/brush_tracker_events_listeners.js.map +1 -1
- package/lib/component/context/DispatchContext.d.ts +2 -1
- package/lib/component/context/DispatchContext.d.ts.map +1 -1
- package/lib/component/context/DispatchContext.js.map +1 -1
- package/lib/component/context/processings_mutations_context.api.d.ts.map +1 -1
- package/lib/component/context/processings_mutations_context.api.js +5 -2
- package/lib/component/context/processings_mutations_context.api.js.map +1 -1
- package/lib/component/elements/ActionsButtonsPopover.d.ts +1 -0
- package/lib/component/elements/ActionsButtonsPopover.d.ts.map +1 -1
- package/lib/component/elements/ActionsButtonsPopover.js +14 -6
- package/lib/component/elements/ActionsButtonsPopover.js.map +1 -1
- package/lib/component/elements/export/ExportContent.js +1 -1
- package/lib/component/elements/export/ExportContent.js.map +1 -1
- package/lib/component/elements/print/PrintContent.js +1 -1
- package/lib/component/elements/print/PrintContent.js.map +1 -1
- package/lib/component/elements/tanstack_table/elements/table_row.d.ts.map +1 -1
- package/lib/component/elements/tanstack_table/elements/table_row.js +2 -2
- package/lib/component/elements/tanstack_table/elements/table_row.js.map +1 -1
- package/lib/component/elements/tanstack_table/table.d.ts.map +1 -1
- package/lib/component/elements/tanstack_table/table.js +2 -1
- package/lib/component/elements/tanstack_table/table.js.map +1 -1
- package/lib/component/elements/tanstack_table/types.d.ts +2 -0
- package/lib/component/elements/tanstack_table/types.d.ts.map +1 -1
- package/lib/component/highlight/index.d.ts +2 -0
- package/lib/component/highlight/index.d.ts.map +1 -1
- package/lib/component/highlight/index.js.map +1 -1
- package/lib/component/hooks/usePanelPreferences.d.ts +2 -2
- package/lib/component/hooks/usePanelPreferences.d.ts.map +1 -1
- package/lib/component/hooks/usePanelPreferences.js +5 -1
- package/lib/component/hooks/usePanelPreferences.js.map +1 -1
- package/lib/component/hooks/useToolsFunctions.d.ts.map +1 -1
- package/lib/component/hooks/useToolsFunctions.js +8 -5
- package/lib/component/hooks/useToolsFunctions.js.map +1 -1
- package/lib/component/hooks/use_publication_strings.d.ts +3 -1
- package/lib/component/hooks/use_publication_strings.d.ts.map +1 -1
- package/lib/component/hooks/use_publication_strings.js +10 -6
- package/lib/component/hooks/use_publication_strings.js.map +1 -1
- package/lib/component/modal/PredictSpectraModal.d.ts.map +1 -1
- package/lib/component/modal/PredictSpectraModal.js +5 -2
- package/lib/component/modal/PredictSpectraModal.js.map +1 -1
- package/lib/component/modal/PredictionLimitModal.d.ts +10 -0
- package/lib/component/modal/PredictionLimitModal.d.ts.map +1 -0
- package/lib/component/modal/PredictionLimitModal.js +31 -0
- package/lib/component/modal/PredictionLimitModal.js.map +1 -0
- package/lib/component/modal/editRange/forms/validation/EditRangeValidation.js +1 -1
- package/lib/component/modal/editRange/forms/validation/EditRangeValidation.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/errors/context.d.ts +24 -0
- package/lib/component/modal/setting/tanstack_general_settings/errors/context.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/errors/renderer.d.ts +24 -0
- package/lib/component/modal/setting/tanstack_general_settings/errors/renderer.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.d.ts +24 -0
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_footer.d.ts +12 -0
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_footer.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.d.ts +12 -0
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/hooks/use_safe_workspace.d.ts +2 -0
- package/lib/component/modal/setting/tanstack_general_settings/hooks/use_safe_workspace.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.d.ts +12 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/axis_tab.d.ts +12 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/axis_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/database_tab.d.ts +12 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/database_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.d.ts +12 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/external_api_tab.d.ts +12 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/external_api_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/general_tab.d.ts +12 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/general_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/import_filters_tab.d.ts +12 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/import_filters_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/nuclei_tab.d.ts +12 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/nuclei_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/panels_tab.d.ts +12 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/panels_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/panels_tab.js +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/panels_tab.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_colors_tab.d.ts +12 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_colors_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.d.ts +12 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.d.ts +12 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/tools_tab.d.ts +12 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/tools_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/tools_tab.js +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/tools_tab.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/validation/panels_tab_validation.d.ts +11 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/panels_tab_validation.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/validation/panels_tab_validation.js +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/panels_tab_validation.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/validation/tools_tab_validation.d.ts +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/tools_tab_validation.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/validation/tools_tab_validation.js +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/tools_tab_validation.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/validation.d.ts +12 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation.d.ts.map +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralTable.js +2 -2
- package/lib/component/panels/IntegralsPanel/IntegralTable.js.map +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.d.ts.map +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +5 -5
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js.map +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculeStructure.d.ts.map +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculeStructure.js +11 -9
- package/lib/component/panels/MoleculesPanel/MoleculeStructure.js.map +1 -1
- package/lib/component/panels/MoleculesPanel/hooks/useAtomAssignment.d.ts.map +1 -1
- package/lib/component/panels/MoleculesPanel/hooks/useAtomAssignment.js +7 -2
- package/lib/component/panels/MoleculesPanel/hooks/useAtomAssignment.js.map +1 -1
- package/lib/component/panels/MoleculesPanel/hooks/useExtractAtomAssignmentLabel.d.ts +3 -0
- package/lib/component/panels/MoleculesPanel/hooks/useExtractAtomAssignmentLabel.d.ts.map +1 -1
- package/lib/component/panels/MoleculesPanel/hooks/useExtractAtomAssignmentLabel.js +31 -17
- package/lib/component/panels/MoleculesPanel/hooks/useExtractAtomAssignmentLabel.js.map +1 -1
- package/lib/component/panels/MoleculesPanel/hooks/useSignalAssignmentUpdates.d.ts +18 -0
- package/lib/component/panels/MoleculesPanel/hooks/useSignalAssignmentUpdates.d.ts.map +1 -0
- package/lib/component/panels/MoleculesPanel/hooks/useSignalAssignmentUpdates.js +113 -0
- package/lib/component/panels/MoleculesPanel/hooks/useSignalAssignmentUpdates.js.map +1 -0
- package/lib/component/panels/MoleculesPanel/utilities/sortAssignmentLabels.d.ts +11 -0
- package/lib/component/panels/MoleculesPanel/utilities/sortAssignmentLabels.d.ts.map +1 -0
- package/lib/component/panels/MoleculesPanel/utilities/sortAssignmentLabels.js +28 -0
- package/lib/component/panels/MoleculesPanel/utilities/sortAssignmentLabels.js.map +1 -0
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.js +2 -2
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.js.map +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaHzColumn.js +2 -2
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaHzColumn.js.map +1 -1
- package/lib/component/panels/SpectraPanel/SpectraPanelHeader.js +1 -1
- package/lib/component/panels/SpectraPanel/SpectraPanelHeader.js.map +1 -1
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.js +1 -3
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.js.map +1 -1
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentLabelColumn.d.ts.map +1 -1
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentLabelColumn.js +40 -4
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentLabelColumn.js.map +1 -1
- package/lib/component/panels/ZonesPanel/ZonesPanel.d.ts.map +1 -1
- package/lib/component/panels/ZonesPanel/ZonesPanel.js +17 -5
- package/lib/component/panels/ZonesPanel/ZonesPanel.js.map +1 -1
- package/lib/component/panels/accordionItems.d.ts.map +1 -1
- package/lib/component/panels/accordionItems.js +7 -0
- package/lib/component/panels/accordionItems.js.map +1 -1
- package/lib/component/panels/assignment-summary/AssignmentSummaryPanel.d.ts +2 -0
- package/lib/component/panels/assignment-summary/AssignmentSummaryPanel.d.ts.map +1 -0
- package/lib/component/panels/assignment-summary/AssignmentSummaryPanel.js +136 -0
- package/lib/component/panels/assignment-summary/AssignmentSummaryPanel.js.map +1 -0
- package/lib/component/panels/assignment-summary/AssignmentsExportModal.d.ts +10 -0
- package/lib/component/panels/assignment-summary/AssignmentsExportModal.d.ts.map +1 -0
- package/lib/component/panels/assignment-summary/AssignmentsExportModal.js +128 -0
- package/lib/component/panels/assignment-summary/AssignmentsExportModal.js.map +1 -0
- package/lib/component/panels/assignment-summary/MoleculeAssignmentTable.d.ts +11 -0
- package/lib/component/panels/assignment-summary/MoleculeAssignmentTable.d.ts.map +1 -0
- package/lib/component/panels/assignment-summary/MoleculeAssignmentTable.js +113 -0
- package/lib/component/panels/assignment-summary/MoleculeAssignmentTable.js.map +1 -0
- package/lib/component/panels/assignment-summary/table-cells/AssignmentAtomCell.d.ts +8 -0
- package/lib/component/panels/assignment-summary/table-cells/AssignmentAtomCell.d.ts.map +1 -0
- package/lib/component/panels/assignment-summary/table-cells/AssignmentAtomCell.js +16 -0
- package/lib/component/panels/assignment-summary/table-cells/AssignmentAtomCell.js.map +1 -0
- package/lib/component/panels/assignment-summary/table-cells/AssignmentChemicalShiftCell.d.ts +7 -0
- package/lib/component/panels/assignment-summary/table-cells/AssignmentChemicalShiftCell.d.ts.map +1 -0
- package/lib/component/panels/assignment-summary/table-cells/AssignmentChemicalShiftCell.js +22 -0
- package/lib/component/panels/assignment-summary/table-cells/AssignmentChemicalShiftCell.js.map +1 -0
- package/lib/component/panels/assignment-summary/table-cells/AssignmentCorrelationCell.d.ts +7 -0
- package/lib/component/panels/assignment-summary/table-cells/AssignmentCorrelationCell.d.ts.map +1 -0
- package/lib/component/panels/assignment-summary/table-cells/AssignmentCorrelationCell.js +5 -0
- package/lib/component/panels/assignment-summary/table-cells/AssignmentCorrelationCell.js.map +1 -0
- package/lib/component/panels/assignment-summary/table-cells/AssignmentLabelCell.d.ts +9 -0
- package/lib/component/panels/assignment-summary/table-cells/AssignmentLabelCell.d.ts.map +1 -0
- package/lib/component/panels/assignment-summary/table-cells/AssignmentLabelCell.js +10 -0
- package/lib/component/panels/assignment-summary/table-cells/AssignmentLabelCell.js.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/atomGroupsToAssignmentRows.d.ts +54 -0
- package/lib/component/panels/assignment-summary/utilities/atomGroupsToAssignmentRows.d.ts.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/atomGroupsToAssignmentRows.js +161 -0
- package/lib/component/panels/assignment-summary/utilities/atomGroupsToAssignmentRows.js.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/exportAssignments.d.ts +19 -0
- package/lib/component/panels/assignment-summary/utilities/exportAssignments.d.ts.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/exportAssignments.js +74 -0
- package/lib/component/panels/assignment-summary/utilities/exportAssignments.js.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/formatAssignmentACS.d.ts +7 -0
- package/lib/component/panels/assignment-summary/utilities/formatAssignmentACS.d.ts.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/formatAssignmentACS.js +28 -0
- package/lib/component/panels/assignment-summary/utilities/formatAssignmentACS.js.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/formatAssignmentShifts.d.ts +12 -0
- package/lib/component/panels/assignment-summary/utilities/formatAssignmentShifts.d.ts.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/formatAssignmentShifts.js +14 -0
- package/lib/component/panels/assignment-summary/utilities/formatAssignmentShifts.js.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/getAssignedAtomCounts.d.ts +9 -0
- package/lib/component/panels/assignment-summary/utilities/getAssignedAtomCounts.d.ts.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/getAssignedAtomCounts.js +23 -0
- package/lib/component/panels/assignment-summary/utilities/getAssignedAtomCounts.js.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/getAssignmentSignals.d.ts +7 -0
- package/lib/component/panels/assignment-summary/utilities/getAssignmentSignals.d.ts.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/getAssignmentSignals.js +41 -0
- package/lib/component/panels/assignment-summary/utilities/getAssignmentSignals.js.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/getLinkedCorrelationsByExperiment.d.ts +18 -0
- package/lib/component/panels/assignment-summary/utilities/getLinkedCorrelationsByExperiment.d.ts.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/getLinkedCorrelationsByExperiment.js +121 -0
- package/lib/component/panels/assignment-summary/utilities/getLinkedCorrelationsByExperiment.js.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/getSignalsByNucleus.d.ts +16 -0
- package/lib/component/panels/assignment-summary/utilities/getSignalsByNucleus.d.ts.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/getSignalsByNucleus.js +53 -0
- package/lib/component/panels/assignment-summary/utilities/getSignalsByNucleus.js.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/types.d.ts +39 -0
- package/lib/component/panels/assignment-summary/utilities/types.d.ts.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/types.js +2 -0
- package/lib/component/panels/assignment-summary/utilities/types.js.map +1 -0
- package/lib/component/panels/extra/utilities/MultiplicityUtilities.js +2 -2
- package/lib/component/panels/extra/utilities/MultiplicityUtilities.js.map +1 -1
- package/lib/component/panels/filtersPanel/processings/operator_edit_banner.d.ts +6 -0
- package/lib/component/panels/filtersPanel/processings/operator_edit_banner.d.ts.map +1 -1
- package/lib/component/panels/filtersPanel/processings/operator_edit_banner.js +2 -2
- package/lib/component/panels/filtersPanel/processings/operator_edit_banner.js.map +1 -1
- package/lib/component/panels/filtersPanel/processings/processing_item.d.ts.map +1 -1
- package/lib/component/panels/filtersPanel/processings/processing_item.js +1 -1
- package/lib/component/panels/filtersPanel/processings/processing_item.js.map +1 -1
- package/lib/component/panels/predictionPanel/PredictionPanel.d.ts.map +1 -1
- package/lib/component/panels/predictionPanel/PredictionPanel.js +4 -2
- package/lib/component/panels/predictionPanel/PredictionPanel.js.map +1 -1
- package/lib/component/reducer/Reducer.d.ts.map +1 -1
- package/lib/component/reducer/Reducer.js +14 -2
- package/lib/component/reducer/Reducer.js.map +1 -1
- package/lib/component/reducer/actions/FiltersActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/FiltersActions.js +5 -2
- package/lib/component/reducer/actions/FiltersActions.js.map +1 -1
- package/lib/component/reducer/actions/LinkedSignalsActions.d.ts +29 -0
- package/lib/component/reducer/actions/LinkedSignalsActions.d.ts.map +1 -0
- package/lib/component/reducer/actions/LinkedSignalsActions.js +62 -0
- package/lib/component/reducer/actions/LinkedSignalsActions.js.map +1 -0
- package/lib/component/reducer/actions/MoleculeActions.d.ts +7 -28
- package/lib/component/reducer/actions/MoleculeActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/MoleculeActions.js +78 -10
- package/lib/component/reducer/actions/MoleculeActions.js.map +1 -1
- package/lib/component/reducer/actions/RangesActions.d.ts +2 -8
- package/lib/component/reducer/actions/RangesActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/RangesActions.js +3 -43
- package/lib/component/reducer/actions/RangesActions.js.map +1 -1
- package/lib/component/reducer/actions/ToolsActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/ToolsActions.js +10 -0
- package/lib/component/reducer/actions/ToolsActions.js.map +1 -1
- package/lib/component/reducer/actions/ZonesActions.d.ts +16 -2
- package/lib/component/reducer/actions/ZonesActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/ZonesActions.js +57 -14
- package/lib/component/reducer/actions/ZonesActions.js.map +1 -1
- package/lib/component/reducer/helper/ZoomHistoryManager.d.ts +19 -1
- package/lib/component/reducer/helper/ZoomHistoryManager.d.ts.map +1 -1
- package/lib/component/reducer/helper/ZoomHistoryManager.js +19 -1
- package/lib/component/reducer/helper/ZoomHistoryManager.js.map +1 -1
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.d.ts +3 -2
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.d.ts.map +1 -1
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js +4 -1
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js.map +1 -1
- package/lib/component/toolbar/ToolTypes.d.ts.map +1 -1
- package/lib/component/toolbar/ToolTypes.js +15 -0
- package/lib/component/toolbar/ToolTypes.js.map +1 -1
- package/lib/component/toolbar/nmr_toolbar.d.ts.map +1 -1
- package/lib/component/toolbar/nmr_toolbar.js +15 -7
- package/lib/component/toolbar/nmr_toolbar.js.map +1 -1
- package/lib/component/utility/core_slots/core_operator_chart_brush.commons.d.ts.map +1 -1
- package/lib/component/utility/core_slots/core_operator_chart_brush.commons.js +62 -4
- package/lib/component/utility/core_slots/core_operator_chart_brush.commons.js.map +1 -1
- package/lib/component/utility/core_slots/core_operator_chart_svg.d.ts.map +1 -1
- package/lib/component/utility/core_slots/core_operator_chart_svg.js +2 -2
- package/lib/component/utility/core_slots/core_operator_chart_svg.js.map +1 -1
- package/lib/component/workspaces/assignment.d.ts.map +1 -1
- package/lib/component/workspaces/assignment.js +5 -3
- package/lib/component/workspaces/assignment.js.map +1 -1
- package/lib/component/workspaces/basic.d.ts.map +1 -1
- package/lib/component/workspaces/basic.js +7 -5
- package/lib/component/workspaces/basic.js.map +1 -1
- package/lib/component/workspaces/embedded.d.ts.map +1 -1
- package/lib/component/workspaces/embedded.js +1 -0
- package/lib/component/workspaces/embedded.js.map +1 -1
- package/lib/component/workspaces/prediction.d.ts.map +1 -1
- package/lib/component/workspaces/prediction.js +1 -0
- package/lib/component/workspaces/prediction.js.map +1 -1
- package/lib/component/workspaces/workspaceDefaultProperties.d.ts.map +1 -1
- package/lib/component/workspaces/workspaceDefaultProperties.js +2 -0
- package/lib/component/workspaces/workspaceDefaultProperties.js.map +1 -1
- package/lib/data/PredictionManager.d.ts +5 -0
- package/lib/data/PredictionManager.d.ts.map +1 -1
- package/lib/data/PredictionManager.js +11 -1
- package/lib/data/PredictionManager.js.map +1 -1
- package/lib/data/constants/Multiplets.js +2 -2
- package/lib/data/constants/Multiplets.js.map +1 -1
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.d.ts.map +1 -1
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.js +1 -0
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.js.map +1 -1
- package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.js +1 -1
- package/lib/data/data2d/Spectrum2D/zones/getDetectionZones.js +9 -10
- package/lib/data/data2d/Spectrum2D/zones/getDetectionZones.js.map +1 -1
- package/lib/data/molecules/Molecule.d.ts +1 -0
- package/lib/data/molecules/Molecule.d.ts.map +1 -1
- package/lib/data/molecules/Molecule.js +18 -3
- package/lib/data/molecules/Molecule.js.map +1 -1
- package/lib/data/molecules/MoleculeManager.d.ts +5 -2
- package/lib/data/molecules/MoleculeManager.d.ts.map +1 -1
- package/lib/data/molecules/MoleculeManager.js +10 -7
- package/lib/data/molecules/MoleculeManager.js.map +1 -1
- package/lib/utils/clipboard/clipboardHooks.d.ts +3 -1
- package/lib/utils/clipboard/clipboardHooks.d.ts.map +1 -1
- package/lib/utils/clipboard/clipboardHooks.js +15 -9
- package/lib/utils/clipboard/clipboardHooks.js.map +1 -1
- package/lib/versionInfo.js +1 -1
- package/package.json +48 -48
- package/src/component/1d/BrushTracker1D.tsx +5 -2
- package/src/component/1d/FloatPublicationString.tsx +39 -33
- package/src/component/1d/plugin_chart_brush_tracker.tsx +2 -0
- package/src/component/1d/plugin_svg_chart.tsx +20 -1
- package/src/component/1d/ranges/FloatingRanges.tsx +2 -2
- package/src/component/1d/ranges/Range.tsx +1 -2
- package/src/component/1d-2d/FieldEdition.tsx +14 -4
- package/src/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.tsx +3 -3
- package/src/component/2d/1d-tracer/HorizontalSliceChart.tsx +6 -1
- package/src/component/2d/1d-tracer/VerticalSliceChart.tsx +6 -1
- package/src/component/2d/BrushTracker2D.tsx +7 -1
- package/src/component/2d/SVGContent2D.tsx +2 -0
- package/src/component/2d/SignalDeltaLine.tsx +8 -2
- package/src/component/2d/linked-signals/LinkedSignal.tsx +68 -0
- package/src/component/2d/linked-signals/LinkedSignalAssignmentLabel.tsx +248 -0
- package/src/component/2d/linked-signals/LinkedSignals.tsx +56 -0
- package/src/component/2d/linked-signals/SignalCrossingIndicator.tsx +63 -0
- package/src/component/2d/linked-signals/useClassifyCorrelation.ts +24 -0
- package/src/component/2d/linked-signals/useNearestSignalCrossing.ts +68 -0
- package/src/component/2d/linked-signals/utilities/getCorrelationColor.ts +46 -0
- package/src/component/2d/linked-signals/utilities/getCouplingLength.ts +58 -0
- package/src/component/2d/linked-signals/utilities/signalCrossings.ts +167 -0
- package/src/component/2d/utilities/extractSpectrumSignals.ts +22 -0
- package/src/component/2d/utilities/useAssignmentLabelLinkPath.ts +138 -0
- package/src/component/2d/zones/SignalsGuideLines.tsx +9 -2
- package/src/component/2d/zones/Zone.tsx +58 -1
- package/src/component/2d/zones/ZonesAssignmentsLabels.tsx +5 -198
- package/src/component/EventsTrackers/BrushTracker.tsx +135 -25
- package/src/component/EventsTrackers/KeysListenerTracker.tsx +6 -0
- package/src/component/EventsTrackers/brush_tracker.types.ts +43 -0
- package/src/component/EventsTrackers/brush_tracker_drag_gesture.ts +84 -0
- package/src/component/EventsTrackers/brush_tracker_events_listeners.ts +7 -1
- package/src/component/context/DispatchContext.tsx +2 -0
- package/src/component/context/processings_mutations_context.api.ts +6 -2
- package/src/component/elements/ActionsButtonsPopover.tsx +22 -3
- package/src/component/elements/export/ExportContent.tsx +1 -0
- package/src/component/elements/print/PrintContent.tsx +1 -0
- package/src/component/elements/tanstack_table/elements/table_row.tsx +5 -1
- package/src/component/elements/tanstack_table/table.tsx +2 -0
- package/src/component/elements/tanstack_table/types.ts +2 -0
- package/src/component/highlight/index.tsx +2 -0
- package/src/component/hooks/usePanelPreferences.ts +15 -5
- package/src/component/hooks/useToolsFunctions.ts +8 -4
- package/src/component/hooks/use_publication_strings.ts +19 -7
- package/src/component/modal/PredictSpectraModal.tsx +8 -2
- package/src/component/modal/PredictionLimitModal.tsx +88 -0
- package/src/component/modal/editRange/forms/validation/EditRangeValidation.ts +1 -1
- package/src/component/modal/setting/tanstack_general_settings/tabs/panels_tab.tsx +6 -0
- package/src/component/modal/setting/tanstack_general_settings/tabs/tools_tab.tsx +3 -0
- package/src/component/modal/setting/tanstack_general_settings/validation/panels_tab_validation.ts +1 -0
- package/src/component/modal/setting/tanstack_general_settings/validation/tools_tab_validation.ts +1 -0
- package/src/component/panels/IntegralsPanel/IntegralTable.tsx +2 -2
- package/src/component/panels/MoleculesPanel/MoleculePanelHeader.tsx +7 -5
- package/src/component/panels/MoleculesPanel/MoleculeStructure.tsx +14 -12
- package/src/component/panels/MoleculesPanel/hooks/useAtomAssignment.tsx +12 -2
- package/src/component/panels/MoleculesPanel/hooks/useExtractAtomAssignmentLabel.ts +57 -20
- package/src/component/panels/MoleculesPanel/hooks/useSignalAssignmentUpdates.ts +191 -0
- package/src/component/panels/MoleculesPanel/utilities/sortAssignmentLabels.ts +29 -0
- package/src/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.tsx +2 -2
- package/src/component/panels/RangesPanel/TableColumns/SignalDeltaHzColumn.tsx +2 -2
- package/src/component/panels/SpectraPanel/SpectraPanelHeader.tsx +1 -1
- package/src/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.tsx +3 -3
- package/src/component/panels/ZonesPanel/TableColumns/ZoneAssignmentLabelColumn.tsx +57 -4
- package/src/component/panels/ZonesPanel/ZonesPanel.tsx +19 -8
- package/src/component/panels/accordionItems.tsx +7 -0
- package/src/component/panels/assignment-summary/AssignmentSummaryPanel.tsx +263 -0
- package/src/component/panels/assignment-summary/AssignmentsExportModal.tsx +249 -0
- package/src/component/panels/assignment-summary/MoleculeAssignmentTable.tsx +223 -0
- package/src/component/panels/assignment-summary/table-cells/AssignmentAtomCell.tsx +36 -0
- package/src/component/panels/assignment-summary/table-cells/AssignmentChemicalShiftCell.tsx +57 -0
- package/src/component/panels/assignment-summary/table-cells/AssignmentCorrelationCell.tsx +23 -0
- package/src/component/panels/assignment-summary/table-cells/AssignmentLabelCell.tsx +16 -0
- package/src/component/panels/assignment-summary/utilities/atomGroupsToAssignmentRows.ts +254 -0
- package/src/component/panels/assignment-summary/utilities/exportAssignments.ts +135 -0
- package/src/component/panels/assignment-summary/utilities/formatAssignmentACS.ts +35 -0
- package/src/component/panels/assignment-summary/utilities/formatAssignmentShifts.ts +26 -0
- package/src/component/panels/assignment-summary/utilities/getAssignedAtomCounts.ts +32 -0
- package/src/component/panels/assignment-summary/utilities/getAssignmentSignals.ts +55 -0
- package/src/component/panels/assignment-summary/utilities/getLinkedCorrelationsByExperiment.ts +175 -0
- package/src/component/panels/assignment-summary/utilities/getSignalsByNucleus.ts +60 -0
- package/src/component/panels/assignment-summary/utilities/types.ts +47 -0
- package/src/component/panels/extra/utilities/MultiplicityUtilities.ts +2 -2
- package/src/component/panels/filtersPanel/processings/operator_edit_banner.tsx +8 -1
- package/src/component/panels/filtersPanel/processings/processing_item.tsx +2 -1
- package/src/component/panels/predictionPanel/PredictionPanel.tsx +6 -2
- package/src/component/reducer/Reducer.ts +23 -5
- package/src/component/reducer/actions/FiltersActions.ts +6 -2
- package/src/component/reducer/actions/LinkedSignalsActions.ts +128 -0
- package/src/component/reducer/actions/MoleculeActions.ts +139 -11
- package/src/component/reducer/actions/RangesActions.ts +3 -85
- package/src/component/reducer/actions/ToolsActions.ts +13 -0
- package/src/component/reducer/actions/ZonesActions.ts +95 -13
- package/src/component/reducer/helper/ZoomHistoryManager.ts +41 -1
- package/src/component/reducer/preferences/panelsPreferencesDefaultValues.ts +7 -0
- package/src/component/toolbar/ToolTypes.ts +15 -0
- package/src/component/toolbar/nmr_toolbar.tsx +17 -21
- package/src/component/utility/core_slots/core_operator_chart_brush.commons.ts +99 -3
- package/src/component/utility/core_slots/core_operator_chart_svg.tsx +4 -0
- package/src/component/workspaces/assignment.ts +5 -3
- package/src/component/workspaces/basic.ts +7 -5
- package/src/component/workspaces/embedded.ts +1 -0
- package/src/component/workspaces/prediction.ts +1 -0
- package/src/component/workspaces/workspaceDefaultProperties.ts +2 -0
- package/src/data/PredictionManager.ts +11 -1
- package/src/data/constants/Multiplets.ts +2 -2
- package/src/data/data2d/Spectrum2D/initiateDatum2D.ts +1 -0
- package/src/data/data2d/Spectrum2D/zones/detectZonesManual.ts +1 -1
- package/src/data/data2d/Spectrum2D/zones/getDetectionZones.ts +7 -8
- package/src/data/molecules/Molecule.ts +22 -6
- package/src/data/molecules/MoleculeManager.ts +11 -9
- package/src/utils/clipboard/clipboardHooks.ts +19 -16
- package/src/versionInfo.ts +1 -1
- package/lib/utils/clipboard/clipboard.d.ts +0 -15
- package/lib/utils/clipboard/clipboard.d.ts.map +0 -1
- package/lib/utils/clipboard/clipboard.js +0 -19
- package/lib/utils/clipboard/clipboard.js.map +0 -1
- package/src/utils/clipboard/clipboard.ts +0 -36
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { TopicMolecule } from 'openchemlib-utils';
|
|
2
|
+
|
|
3
|
+
export function getCouplingLength(
|
|
4
|
+
topicMolecules: Record<string, TopicMolecule>,
|
|
5
|
+
xDiaIDs: string[],
|
|
6
|
+
yDiaIDs: string[],
|
|
7
|
+
): number | null {
|
|
8
|
+
const candidates = getCouplingCandidates(topicMolecules, xDiaIDs, yDiaIDs);
|
|
9
|
+
if (candidates.length === 0) return null;
|
|
10
|
+
return Math.min(...candidates.map((c) => c.distance));
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
interface CouplingCandidate {
|
|
14
|
+
moleculeId: string;
|
|
15
|
+
xDiaID: string;
|
|
16
|
+
yDiaID: string;
|
|
17
|
+
xAtom: number;
|
|
18
|
+
yAtom: number;
|
|
19
|
+
distance: number;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function getCouplingCandidates(
|
|
23
|
+
topicMolecules: Record<string, TopicMolecule>,
|
|
24
|
+
xDiaIDs: string[],
|
|
25
|
+
yDiaIDs: string[],
|
|
26
|
+
): CouplingCandidate[] {
|
|
27
|
+
const couplingCandidate: CouplingCandidate[] = [];
|
|
28
|
+
if (xDiaIDs.length === 0 || yDiaIDs.length === 0) return couplingCandidate;
|
|
29
|
+
|
|
30
|
+
for (const [moleculeId, topicMolecule] of Object.entries(topicMolecules)) {
|
|
31
|
+
const diaIDsObject = topicMolecule.getDiaIDsObject();
|
|
32
|
+
for (const x of xDiaIDs) {
|
|
33
|
+
const xGroup = diaIDsObject[x];
|
|
34
|
+
if (!xGroup) continue;
|
|
35
|
+
for (const y of yDiaIDs) {
|
|
36
|
+
const yGroup = diaIDsObject[y];
|
|
37
|
+
if (!yGroup) continue;
|
|
38
|
+
|
|
39
|
+
for (const xAtom of xGroup.atoms) {
|
|
40
|
+
for (const yAtom of yGroup.atoms) {
|
|
41
|
+
const distance = topicMolecule.distanceMatrix[xAtom][yAtom];
|
|
42
|
+
if (distance >= 0) {
|
|
43
|
+
couplingCandidate.push({
|
|
44
|
+
moleculeId,
|
|
45
|
+
xDiaID: x,
|
|
46
|
+
yDiaID: y,
|
|
47
|
+
xAtom,
|
|
48
|
+
yAtom,
|
|
49
|
+
distance,
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return couplingCandidate;
|
|
58
|
+
}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import type { Signal1D, Spectrum2D } from '@zakodium/nmr-types';
|
|
2
|
+
|
|
3
|
+
export interface Candidate {
|
|
4
|
+
xSignalId: string;
|
|
5
|
+
ySignalId: string;
|
|
6
|
+
xDelta: number;
|
|
7
|
+
yDelta: number;
|
|
8
|
+
isLinked: boolean;
|
|
9
|
+
assignment: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface CrossingScales {
|
|
13
|
+
x: (ppm: number) => number;
|
|
14
|
+
y: (ppm: number) => number;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
interface CrossingDomains {
|
|
18
|
+
xDomain: number[];
|
|
19
|
+
yDomain: number[];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
interface BuildCandidatesOptions extends Pick<Spectrum2D, 'linkedSignals'> {
|
|
23
|
+
xSignals: Signal1D[];
|
|
24
|
+
ySignals: Signal1D[];
|
|
25
|
+
domains: CrossingDomains;
|
|
26
|
+
hasSameNucleus: boolean;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
interface Position {
|
|
30
|
+
x: number;
|
|
31
|
+
y: number;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
type LinkedSignal = Spectrum2D['linkedSignals'][number];
|
|
35
|
+
|
|
36
|
+
export interface PositionedLinkedSignal extends LinkedSignal {
|
|
37
|
+
xDelta: number;
|
|
38
|
+
yDelta: number;
|
|
39
|
+
xDiaIDs: string[];
|
|
40
|
+
yDiaIDs: string[];
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function getLinkedSignalPositions({
|
|
44
|
+
xSignals,
|
|
45
|
+
ySignals,
|
|
46
|
+
linkedSignals,
|
|
47
|
+
}: Omit<
|
|
48
|
+
BuildCandidatesOptions,
|
|
49
|
+
'domains' | 'hasSameNucleus'
|
|
50
|
+
>): PositionedLinkedSignal[] {
|
|
51
|
+
if (!linkedSignals?.length) return [];
|
|
52
|
+
|
|
53
|
+
const xSignalsById = new Map(xSignals.map((signal) => [signal.id, signal]));
|
|
54
|
+
const ySignalsById = new Map(ySignals.map((signal) => [signal.id, signal]));
|
|
55
|
+
const positionedSignals: PositionedLinkedSignal[] = [];
|
|
56
|
+
|
|
57
|
+
for (const link of linkedSignals) {
|
|
58
|
+
const xSignal = xSignalsById.get(link.xSignalId);
|
|
59
|
+
const ySignal = ySignalsById.get(link.ySignalId);
|
|
60
|
+
|
|
61
|
+
if (xSignal === undefined || ySignal === undefined) continue;
|
|
62
|
+
|
|
63
|
+
positionedSignals.push({
|
|
64
|
+
...link,
|
|
65
|
+
xDelta: xSignal.delta,
|
|
66
|
+
yDelta: ySignal.delta,
|
|
67
|
+
xDiaIDs: xSignal.diaIDs ?? [],
|
|
68
|
+
yDiaIDs: ySignal.diaIDs ?? [],
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return positionedSignals;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function inDomain(value: number, domain: number[]) {
|
|
76
|
+
const [min, max] = domain;
|
|
77
|
+
return value >= Math.min(min, max) && value <= Math.max(min, max);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
interface CrossingAssignmentLabelOptions {
|
|
81
|
+
xAssignment?: string;
|
|
82
|
+
yAssignment?: string;
|
|
83
|
+
hasSameNucleus: boolean;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function getCrossingAssignmentLabel({
|
|
87
|
+
xAssignment,
|
|
88
|
+
yAssignment,
|
|
89
|
+
hasSameNucleus,
|
|
90
|
+
}: CrossingAssignmentLabelOptions): string {
|
|
91
|
+
if (hasSameNucleus && xAssignment === yAssignment) {
|
|
92
|
+
return xAssignment || '';
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return [xAssignment, yAssignment].filter(Boolean).join('→');
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export function buildCandidates({
|
|
99
|
+
xSignals,
|
|
100
|
+
ySignals,
|
|
101
|
+
linkedSignals,
|
|
102
|
+
domains,
|
|
103
|
+
hasSameNucleus,
|
|
104
|
+
}: BuildCandidatesOptions): Candidate[] {
|
|
105
|
+
const linked = new Set(
|
|
106
|
+
linkedSignals?.map((link) => `${link.xSignalId}:${link.ySignalId}`),
|
|
107
|
+
);
|
|
108
|
+
const xs = xSignals.filter((signal) =>
|
|
109
|
+
inDomain(signal.delta, domains.xDomain),
|
|
110
|
+
);
|
|
111
|
+
const ys = ySignals.filter((signal) =>
|
|
112
|
+
inDomain(signal.delta, domains.yDomain),
|
|
113
|
+
);
|
|
114
|
+
const candidates: Candidate[] = [];
|
|
115
|
+
|
|
116
|
+
for (const x of xs) {
|
|
117
|
+
for (const y of ys) {
|
|
118
|
+
candidates.push({
|
|
119
|
+
xSignalId: x.id,
|
|
120
|
+
ySignalId: y.id,
|
|
121
|
+
xDelta: x.delta,
|
|
122
|
+
yDelta: y.delta,
|
|
123
|
+
isLinked: linked.has(`${x.id}:${y.id}`),
|
|
124
|
+
assignment: getCrossingAssignmentLabel({
|
|
125
|
+
xAssignment: x.assignment,
|
|
126
|
+
yAssignment: y.assignment,
|
|
127
|
+
hasSameNucleus,
|
|
128
|
+
}),
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
return candidates;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
function distance(
|
|
136
|
+
candidate: Candidate,
|
|
137
|
+
mouse: Position,
|
|
138
|
+
scales: CrossingScales,
|
|
139
|
+
) {
|
|
140
|
+
return Math.hypot(
|
|
141
|
+
scales.x(candidate.xDelta) - mouse.x,
|
|
142
|
+
scales.y(candidate.yDelta) - mouse.y,
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export function findNearestCrossing(
|
|
147
|
+
mouse: Position,
|
|
148
|
+
candidates: Candidate[],
|
|
149
|
+
scales: CrossingScales,
|
|
150
|
+
radius = 14,
|
|
151
|
+
): Candidate | null {
|
|
152
|
+
let best: Candidate | null = null;
|
|
153
|
+
let bestDistance = Infinity;
|
|
154
|
+
|
|
155
|
+
for (const candidate of candidates) {
|
|
156
|
+
const candidateDistance = distance(candidate, mouse, scales);
|
|
157
|
+
if (candidateDistance < bestDistance) {
|
|
158
|
+
bestDistance = candidateDistance;
|
|
159
|
+
best = candidate;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
//return null if the nearest crossing is outside the cursor's pixel radius.
|
|
164
|
+
if (!best || bestDistance > radius) return null;
|
|
165
|
+
|
|
166
|
+
return best;
|
|
167
|
+
}
|
|
@@ -61,3 +61,25 @@ export function extractSpectrumSignals<T extends object = object>(
|
|
|
61
61
|
|
|
62
62
|
return result;
|
|
63
63
|
}
|
|
64
|
+
|
|
65
|
+
export function getClosestSignal(
|
|
66
|
+
spectrum: Spectrum1D | null,
|
|
67
|
+
options: { from: number; to: number; center: number },
|
|
68
|
+
): Signal1D | undefined {
|
|
69
|
+
if (!spectrum) return;
|
|
70
|
+
|
|
71
|
+
const signals = extractSpectrumSignals(spectrum, options);
|
|
72
|
+
signals.sort((first, second) => first.delta - second.delta);
|
|
73
|
+
|
|
74
|
+
let closest: Signal1D | undefined;
|
|
75
|
+
for (const signal of signals) {
|
|
76
|
+
if (
|
|
77
|
+
!closest ||
|
|
78
|
+
Math.abs(signal.delta - options.center) <
|
|
79
|
+
Math.abs(closest.delta - options.center)
|
|
80
|
+
) {
|
|
81
|
+
closest = signal;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return closest;
|
|
85
|
+
}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import type { Position } from '../../elements/draggable/useDraggable.js';
|
|
2
|
+
|
|
3
|
+
import { useScale2DX, useScale2DY } from './scale.js';
|
|
4
|
+
|
|
5
|
+
interface TargetBoundary {
|
|
6
|
+
x1: number;
|
|
7
|
+
x2: number;
|
|
8
|
+
y1: number;
|
|
9
|
+
y2: number;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface Boundary {
|
|
13
|
+
width: number;
|
|
14
|
+
height: number;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
interface FindBestLinkResult {
|
|
18
|
+
sourcePoint: { a: Position; b: Position };
|
|
19
|
+
targetPoint: Position;
|
|
20
|
+
distance: number;
|
|
21
|
+
angle: number;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function getDistance(x1: number, y1: number, x2: number, y2: number) {
|
|
25
|
+
return Math.hypot(x2 - x1, y2 - y1);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function getAngleFromSides(a: number, b: number, c: number) {
|
|
29
|
+
const radians = Math.acos((b ** 2 + c ** 2 - a ** 2) / (2 * b * c));
|
|
30
|
+
return radians * (180 / Math.PI);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function findBestLink(
|
|
34
|
+
sourcePoints: Array<{ a: Position; b: Position }>,
|
|
35
|
+
targetPoints: Position[],
|
|
36
|
+
): FindBestLinkResult {
|
|
37
|
+
const result: FindBestLinkResult[] = [];
|
|
38
|
+
|
|
39
|
+
for (const sourcePoint of sourcePoints) {
|
|
40
|
+
const { a, b } = sourcePoint;
|
|
41
|
+
for (const targetPoint of targetPoints) {
|
|
42
|
+
const { x, y } = targetPoint;
|
|
43
|
+
const aLength = getDistance(a.x, a.y, x, y);
|
|
44
|
+
const bLength = getDistance(b.x, b.y, x, y);
|
|
45
|
+
const deltaLength = getDistance(a.x, a.y, b.x, b.y);
|
|
46
|
+
const distance = Math.min(aLength, bLength);
|
|
47
|
+
const angle = Number(
|
|
48
|
+
getAngleFromSides(deltaLength, aLength, bLength).toFixed(1),
|
|
49
|
+
);
|
|
50
|
+
result.push({ distance, angle, targetPoint, sourcePoint });
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
result.sort((a, b) => {
|
|
55
|
+
if (a.angle !== b.angle) return b.angle - a.angle;
|
|
56
|
+
return a.distance - b.distance;
|
|
57
|
+
});
|
|
58
|
+
return result[0];
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function useAssignmentLabelLinkPath(
|
|
62
|
+
currentPosition: Position,
|
|
63
|
+
targetBoundary: TargetBoundary,
|
|
64
|
+
sourceElementBoundary: Boundary,
|
|
65
|
+
options: { sideLength?: number; shift?: number } = {},
|
|
66
|
+
) {
|
|
67
|
+
const { sideLength = 6, shift = 5 } = options;
|
|
68
|
+
const { x1, x2, y1, y2 } = targetBoundary;
|
|
69
|
+
const { x, y } = currentPosition;
|
|
70
|
+
const scaleX = useScale2DX();
|
|
71
|
+
const scaleY = useScale2DY();
|
|
72
|
+
const { width, height } = sourceElementBoundary;
|
|
73
|
+
const centerX = width / 2;
|
|
74
|
+
const centerY = height / 2;
|
|
75
|
+
const leftX = x - centerX - shift;
|
|
76
|
+
const rightX = x + centerX + shift;
|
|
77
|
+
const topY = y - height;
|
|
78
|
+
const bottomY = y + shift;
|
|
79
|
+
const targetWidth = scaleX(x2) - scaleX(x1);
|
|
80
|
+
const targetHeight = scaleY(y2) - scaleY(y1);
|
|
81
|
+
const targetXCenter = scaleX(x1) + targetWidth / 2;
|
|
82
|
+
const targetYCenter = scaleY(y1) + targetHeight / 2;
|
|
83
|
+
|
|
84
|
+
const sourcePoints: Array<{ a: Position; b: Position }> = [
|
|
85
|
+
{
|
|
86
|
+
a: { x, y: bottomY },
|
|
87
|
+
b: { x: x + sideLength, y: bottomY },
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
a: { x, y: topY },
|
|
91
|
+
b: { x: x + sideLength, y: topY },
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
a: { x: leftX, y: y - centerY - sideLength / 2 },
|
|
95
|
+
b: { x: leftX, y: y - centerY + sideLength / 2 },
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
a: { x: rightX, y: y - centerY - sideLength / 2 },
|
|
99
|
+
b: { x: rightX, y: y - centerY + sideLength / 2 },
|
|
100
|
+
},
|
|
101
|
+
];
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Coordination
|
|
105
|
+
* xMid= x2-x1/2;
|
|
106
|
+
* yMid= y2-y1/2;
|
|
107
|
+
* (x1,y1) ---------- (xMid,y1) ---------- (x2,y1)
|
|
108
|
+
* | |
|
|
109
|
+
* | |
|
|
110
|
+
* (x1,yMid) (x2,yMid)
|
|
111
|
+
* | |
|
|
112
|
+
* | |
|
|
113
|
+
* (x1,y2) ---------- (xMid,y2) ---------- (x2,y2)
|
|
114
|
+
*
|
|
115
|
+
*/
|
|
116
|
+
const targetPoints: Position[] = [
|
|
117
|
+
//Left Top
|
|
118
|
+
|
|
119
|
+
{ x: scaleX(x1), y: scaleY(y1) },
|
|
120
|
+
//Center Top
|
|
121
|
+
{ x: targetXCenter, y: scaleY(y1) },
|
|
122
|
+
//Right Top
|
|
123
|
+
{ x: scaleX(x2), y: scaleY(y1) },
|
|
124
|
+
//Right Center
|
|
125
|
+
{ x: scaleX(x2), y: targetYCenter },
|
|
126
|
+
//Right Bottom
|
|
127
|
+
{ x: scaleX(x2), y: scaleY(y2) },
|
|
128
|
+
//Center Bottom
|
|
129
|
+
{ x: targetXCenter, y: scaleY(y2) },
|
|
130
|
+
//Left Bottom
|
|
131
|
+
{ x: scaleX(x1), y: scaleY(y2) },
|
|
132
|
+
//Left Center
|
|
133
|
+
{ x: scaleX(x1), y: targetYCenter },
|
|
134
|
+
];
|
|
135
|
+
const link = findBestLink(sourcePoints, targetPoints);
|
|
136
|
+
|
|
137
|
+
return `${link.sourcePoint.a.x},${link.sourcePoint.a.y} ${link.sourcePoint.b.x},${link.sourcePoint.b.y} ${link.targetPoint.x},${link.targetPoint.y}`;
|
|
138
|
+
}
|
|
@@ -196,7 +196,12 @@ function IndicationLine(props: IndicationLineProps) {
|
|
|
196
196
|
const { id: rangeId } = range;
|
|
197
197
|
const highlightColor = useHighlightColor();
|
|
198
198
|
const isSignalAssigned = isRangeSignalAssigned({ range, diaIDs, nbAtoms });
|
|
199
|
-
const {
|
|
199
|
+
const {
|
|
200
|
+
margin,
|
|
201
|
+
width,
|
|
202
|
+
height,
|
|
203
|
+
toolOptions: { selectedTool },
|
|
204
|
+
} = useChartData();
|
|
200
205
|
const { setData: addNewAssignmentLabel } = useShareData();
|
|
201
206
|
|
|
202
207
|
const dispatch = useDispatch();
|
|
@@ -297,10 +302,12 @@ function IndicationLine(props: IndicationLineProps) {
|
|
|
297
302
|
];
|
|
298
303
|
|
|
299
304
|
const isOpen = isAssignBtnTrigged.current ? isAssignmentActive : undefined;
|
|
305
|
+
const isLinking = selectedTool === 'signalLinking';
|
|
300
306
|
|
|
301
307
|
return (
|
|
302
308
|
<ActionsButtonsPopover
|
|
303
|
-
isOpen={isOpen}
|
|
309
|
+
isOpen={isLinking ? false : isOpen}
|
|
310
|
+
disabled={isLinking}
|
|
304
311
|
targetTagName="g"
|
|
305
312
|
buttons={actionsButtons}
|
|
306
313
|
space={2}
|
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
import type { Zone as ZoneType } from '@zakodium/nmr-types';
|
|
2
2
|
import { useEffect, useState } from 'react';
|
|
3
|
+
import { LuLink } from 'react-icons/lu';
|
|
3
4
|
import { PiTextTBold } from 'react-icons/pi';
|
|
4
5
|
|
|
5
6
|
import { checkZoneKind } from '../../../data/utilities/ZoneUtilities.js';
|
|
6
7
|
import { useAssignment } from '../../assignment/AssignmentsContext.js';
|
|
8
|
+
import { useDispatch } from '../../context/DispatchContext.js';
|
|
7
9
|
import { useShareData } from '../../context/ShareDataContext.js';
|
|
8
10
|
import type { ActionsButtonsPopoverProps } from '../../elements/ActionsButtonsPopover.js';
|
|
9
11
|
import { ActionsButtonsPopover } from '../../elements/ActionsButtonsPopover.js';
|
|
10
12
|
import { useHighlight } from '../../highlight/index.js';
|
|
11
13
|
import { useActiveSpectrumZonesViewState } from '../../hooks/useActiveSpectrumZonesViewState.js';
|
|
14
|
+
import { useExtractAtomAssignmentLabel } from '../../panels/MoleculesPanel/hooks/useExtractAtomAssignmentLabel.js';
|
|
15
|
+
import type { Spectrum1DTraces } from '../useTracesSpectra.js';
|
|
16
|
+
import { useTracesSpectra } from '../useTracesSpectra.js';
|
|
17
|
+
import { getClosestSignal } from '../utilities/extractSpectrumSignals.js';
|
|
12
18
|
import { useScale2DX, useScale2DY } from '../utilities/scale.js';
|
|
13
19
|
|
|
14
20
|
import Signal from './Signal.js';
|
|
@@ -18,10 +24,30 @@ interface ZoneProps {
|
|
|
18
24
|
zoneData: ZoneType;
|
|
19
25
|
}
|
|
20
26
|
|
|
27
|
+
function getAxisAssignment(
|
|
28
|
+
zoneData: ZoneType,
|
|
29
|
+
traces: Spectrum1DTraces,
|
|
30
|
+
signal: ZoneType['signals'][number],
|
|
31
|
+
axis: 'x' | 'y',
|
|
32
|
+
) {
|
|
33
|
+
const { from, to } = zoneData[axis];
|
|
34
|
+
const match = getClosestSignal(traces[axis], {
|
|
35
|
+
from,
|
|
36
|
+
to,
|
|
37
|
+
center: signal[axis].delta,
|
|
38
|
+
});
|
|
39
|
+
if (!match?.diaIDs?.length) return;
|
|
40
|
+
|
|
41
|
+
return { diaIDs: match.diaIDs, nbAtoms: match.nbAtoms ?? 0 };
|
|
42
|
+
}
|
|
43
|
+
|
|
21
44
|
function Zone(props: ZoneProps) {
|
|
22
45
|
const { zoneData } = props;
|
|
23
46
|
const { x, y, id, signals } = zoneData;
|
|
24
47
|
|
|
48
|
+
const dispatch = useDispatch();
|
|
49
|
+
const traces = useTracesSpectra();
|
|
50
|
+
const { get2DSignalAssignmentLabel } = useExtractAtomAssignmentLabel();
|
|
25
51
|
const { setData } = useShareData<{ id: string }>();
|
|
26
52
|
const assignmentZone = useAssignment(id);
|
|
27
53
|
const { showZones } = useActiveSpectrumZonesViewState();
|
|
@@ -45,7 +71,37 @@ function Zone(props: ZoneProps) {
|
|
|
45
71
|
const zoneWidth = scaleX(x1) - scaleX(x2);
|
|
46
72
|
const zoneHeight = scaleY(y2) - scaleY(y1);
|
|
47
73
|
|
|
74
|
+
const assignments = signals.flatMap((signal) => {
|
|
75
|
+
const x = getAxisAssignment(zoneData, traces, signal, 'x');
|
|
76
|
+
const y = getAxisAssignment(zoneData, traces, signal, 'y');
|
|
77
|
+
if (!x && !y) return [];
|
|
78
|
+
|
|
79
|
+
const linkedSignal = {
|
|
80
|
+
...signal,
|
|
81
|
+
x: x ? { ...signal.x, ...x } : signal.x,
|
|
82
|
+
y: y ? { ...signal.y, ...y } : signal.y,
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
return {
|
|
86
|
+
signalId: signal.id,
|
|
87
|
+
...(x && { x }),
|
|
88
|
+
...(y && { y }),
|
|
89
|
+
assignment: get2DSignalAssignmentLabel(linkedSignal),
|
|
90
|
+
};
|
|
91
|
+
});
|
|
92
|
+
|
|
48
93
|
const actionButtons: ActionsButtonsPopoverProps['buttons'] = [
|
|
94
|
+
{
|
|
95
|
+
icon: <LuLink />,
|
|
96
|
+
onClick: () =>
|
|
97
|
+
dispatch({
|
|
98
|
+
type: 'AUTO_LINK_2D_SIGNALS',
|
|
99
|
+
payload: { zoneId: id, assignments },
|
|
100
|
+
}),
|
|
101
|
+
intent: 'success',
|
|
102
|
+
title: 'Auto link',
|
|
103
|
+
disabled: assignments.length === 0,
|
|
104
|
+
},
|
|
49
105
|
{
|
|
50
106
|
icon: <PiTextTBold />,
|
|
51
107
|
onClick: () => setData({ id: signals[0]?.id }),
|
|
@@ -74,7 +130,8 @@ function Zone(props: ZoneProps) {
|
|
|
74
130
|
<ActionsButtonsPopover
|
|
75
131
|
buttons={actionButtons}
|
|
76
132
|
targetTagName="g"
|
|
77
|
-
{
|
|
133
|
+
space={5}
|
|
134
|
+
closeOnAction
|
|
78
135
|
>
|
|
79
136
|
{showZones && (
|
|
80
137
|
<g transform={`translate(${scaleX(x2)},${scaleY(y1)})`}>
|