nmrium 2.6.0 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/component/1d/ApodizationLine.js +2 -2
- package/lib/component/1d/ApodizationLine.js.map +1 -1
- package/lib/component/1d/BrushTracker1D.d.ts.map +1 -1
- package/lib/component/1d/BrushTracker1D.js +15 -14
- package/lib/component/1d/BrushTracker1D.js.map +1 -1
- package/lib/component/1d/Line.js +2 -2
- package/lib/component/1d/Line.js.map +1 -1
- package/lib/component/1d/SVGContent1D.d.ts.map +1 -1
- package/lib/component/1d/SVGContent1D.js +4 -1
- package/lib/component/1d/SVGContent1D.js.map +1 -1
- package/lib/component/1d/Viewer1D.d.ts.map +1 -1
- package/lib/component/1d/Viewer1D.js +2 -1
- package/lib/component/1d/Viewer1D.js.map +1 -1
- package/lib/component/1d/baseline/BaselinePreview.js +2 -2
- package/lib/component/1d/baseline/BaselinePreview.js.map +1 -1
- package/lib/component/1d/database/DatabaseSpectrum.js +2 -2
- package/lib/component/1d/database/DatabaseSpectrum.js.map +1 -1
- package/lib/component/1d/database/ResurrectedDatabaseRanges.js +2 -2
- package/lib/component/1d/database/ResurrectedDatabaseRanges.js.map +1 -1
- package/lib/component/1d/matrix/Boxplot.js +5 -5
- package/lib/component/1d/matrix/Boxplot.js.map +1 -1
- package/lib/component/1d/matrix/Stocsy.js +2 -2
- package/lib/component/1d/matrix/Stocsy.js.map +1 -1
- package/lib/component/1d/peaks/PeakAnnotationsSpreadMode.d.ts.map +1 -1
- package/lib/component/1d/peaks/PeakAnnotationsSpreadMode.js +12 -3
- package/lib/component/1d/peaks/PeakAnnotationsSpreadMode.js.map +1 -1
- package/lib/component/1d/peaks/usePeakShapesPath.js +2 -2
- package/lib/component/1d/peaks/usePeakShapesPath.js.map +1 -1
- package/lib/component/1d/plugin_chart_brush_tracker.d.ts +2 -0
- package/lib/component/1d/plugin_chart_brush_tracker.d.ts.map +1 -0
- package/lib/component/1d/plugin_chart_brush_tracker.js +41 -0
- package/lib/component/1d/plugin_chart_brush_tracker.js.map +1 -0
- package/lib/component/1d/plugin_svg_chart.d.ts +2 -0
- package/lib/component/1d/plugin_svg_chart.d.ts.map +1 -0
- package/lib/component/1d/plugin_svg_chart.js +43 -0
- package/lib/component/1d/plugin_svg_chart.js.map +1 -0
- package/lib/component/1d-2d/components/RangeIndicator.d.ts.map +1 -1
- package/lib/component/1d-2d/components/RangeIndicator.js +1 -7
- package/lib/component/1d-2d/components/RangeIndicator.js.map +1 -1
- package/lib/component/1d-2d/tools/BrushXY.d.ts +1 -1
- package/lib/component/1d-2d/tools/BrushXY.d.ts.map +1 -1
- package/lib/component/1d-2d/tools/BrushXY.js.map +1 -1
- package/lib/component/1d-2d/tools/CrossLinePointer.d.ts +1 -1
- package/lib/component/1d-2d/tools/CrossLinePointer.d.ts.map +1 -1
- package/lib/component/1d-2d/tools/CrossLinePointer.js.map +1 -1
- package/lib/component/2d/1d-tracer/HorizontalSliceChart.js +2 -2
- package/lib/component/2d/1d-tracer/HorizontalSliceChart.js.map +1 -1
- package/lib/component/2d/1d-tracer/Left1DChart.js +2 -2
- package/lib/component/2d/1d-tracer/Left1DChart.js.map +1 -1
- package/lib/component/2d/1d-tracer/Top1DChart.js +2 -2
- package/lib/component/2d/1d-tracer/Top1DChart.js.map +1 -1
- package/lib/component/2d/1d-tracer/VerticalSliceChart.js +2 -2
- package/lib/component/2d/1d-tracer/VerticalSliceChart.js.map +1 -1
- package/lib/component/2d/1d-tracer/phase-correction-traces/SpectrumPhaseTrace.js +3 -3
- package/lib/component/2d/1d-tracer/phase-correction-traces/SpectrumPhaseTrace.js.map +1 -1
- package/lib/component/2d/BrushTracker2D.js.map +1 -1
- package/lib/component/2d/ft/Contours.js +2 -2
- package/lib/component/2d/ft/Contours.js.map +1 -1
- package/lib/component/2d/utilities/DimensionLayout.d.ts +1 -1
- package/lib/component/2d/utilities/DimensionLayout.d.ts.map +1 -1
- package/lib/component/EventsTrackers/BrushTracker.d.ts +1 -84
- package/lib/component/EventsTrackers/BrushTracker.d.ts.map +1 -1
- package/lib/component/EventsTrackers/BrushTracker.js +70 -3
- package/lib/component/EventsTrackers/BrushTracker.js.map +1 -1
- package/lib/component/EventsTrackers/brush_tracker.types.d.ts +93 -0
- package/lib/component/EventsTrackers/brush_tracker.types.d.ts.map +1 -0
- package/lib/component/EventsTrackers/brush_tracker.types.js +2 -0
- package/lib/component/EventsTrackers/brush_tracker.types.js.map +1 -0
- package/lib/component/EventsTrackers/brush_tracker_events_listeners.d.ts +7 -0
- package/lib/component/EventsTrackers/brush_tracker_events_listeners.d.ts.map +1 -0
- package/lib/component/EventsTrackers/brush_tracker_events_listeners.js +15 -0
- package/lib/component/EventsTrackers/brush_tracker_events_listeners.js.map +1 -0
- package/lib/component/context/ScaleContext.d.ts +1 -1
- package/lib/component/context/ScaleContext.d.ts.map +1 -1
- package/lib/component/elements/D3Axis.d.ts.map +1 -1
- package/lib/component/elements/D3Axis.js +15 -32
- package/lib/component/elements/D3Axis.js.map +1 -1
- package/lib/component/elements/export/ExportContent.d.ts.map +1 -1
- package/lib/component/elements/export/ExportContent.js +2 -2
- package/lib/component/elements/export/ExportContent.js.map +1 -1
- package/lib/component/elements/export/ExportOptionsModal.d.ts.map +1 -1
- package/lib/component/elements/export/ExportOptionsModal.js +9 -3
- package/lib/component/elements/export/ExportOptionsModal.js.map +1 -1
- package/lib/component/elements/export/useExportConfigurer.d.ts +1 -0
- package/lib/component/elements/export/useExportConfigurer.d.ts.map +1 -1
- package/lib/component/elements/export/useExportConfigurer.js +5 -0
- package/lib/component/elements/export/useExportConfigurer.js.map +1 -1
- package/lib/component/elements/print/PrintContent.d.ts.map +1 -1
- package/lib/component/elements/print/PrintContent.js +6 -25
- package/lib/component/elements/print/PrintContent.js.map +1 -1
- package/lib/component/elements/tanstack_table/create_action_column.d.ts +11 -0
- package/lib/component/elements/tanstack_table/create_action_column.d.ts.map +1 -0
- package/lib/component/elements/tanstack_table/create_action_column.js +24 -0
- package/lib/component/elements/tanstack_table/create_action_column.js.map +1 -0
- package/lib/component/elements/tanstack_table/create_column_helper.d.ts +5 -0
- package/lib/component/elements/tanstack_table/create_column_helper.d.ts.map +1 -0
- package/lib/component/elements/tanstack_table/create_column_helper.js +5 -0
- package/lib/component/elements/tanstack_table/create_column_helper.js.map +1 -0
- package/lib/component/elements/{ReactTable/BaseReactTable.d.ts → tanstack_table/elements/base_react_table.d.ts} +1 -1
- package/lib/component/elements/tanstack_table/elements/base_react_table.d.ts.map +1 -0
- package/lib/component/elements/{ReactTable/BaseReactTable.js → tanstack_table/elements/base_react_table.js} +1 -1
- package/lib/component/elements/tanstack_table/elements/base_react_table.js.map +1 -0
- package/lib/component/elements/{ReactTable/Elements/EmptyDataRow.d.ts → tanstack_table/elements/empty_data_row.d.ts} +1 -1
- package/lib/component/elements/tanstack_table/elements/empty_data_row.d.ts.map +1 -0
- package/lib/component/elements/{ReactTable/Elements/EmptyDataRow.js → tanstack_table/elements/empty_data_row.js} +1 -1
- package/lib/component/elements/tanstack_table/elements/empty_data_row.js.map +1 -0
- package/lib/component/elements/tanstack_table/elements/table_context.d.ts +4 -0
- package/lib/component/elements/tanstack_table/elements/table_context.d.ts.map +1 -0
- package/lib/component/elements/tanstack_table/elements/table_context.js +11 -0
- package/lib/component/elements/tanstack_table/elements/table_context.js.map +1 -0
- package/lib/component/elements/tanstack_table/elements/table_header.d.ts +12 -0
- package/lib/component/elements/tanstack_table/elements/table_header.d.ts.map +1 -0
- package/lib/component/elements/tanstack_table/elements/table_header.js +42 -0
- package/lib/component/elements/tanstack_table/elements/table_header.js.map +1 -0
- package/lib/component/elements/tanstack_table/elements/table_row.d.ts +12 -0
- package/lib/component/elements/tanstack_table/elements/table_row.d.ts.map +1 -0
- package/lib/component/elements/{ReactTable/Elements/ReactTableRow.js → tanstack_table/elements/table_row.js} +18 -17
- package/lib/component/elements/tanstack_table/elements/table_row.js.map +1 -0
- package/lib/component/elements/tanstack_table/features.d.ts +21 -0
- package/lib/component/elements/tanstack_table/features.d.ts.map +1 -0
- package/lib/component/elements/tanstack_table/features.js +14 -0
- package/lib/component/elements/tanstack_table/features.js.map +1 -0
- package/lib/component/elements/tanstack_table/index.d.ts +6 -0
- package/lib/component/elements/tanstack_table/index.d.ts.map +1 -0
- package/lib/component/elements/tanstack_table/index.js +6 -0
- package/lib/component/elements/tanstack_table/index.js.map +1 -0
- package/lib/component/elements/tanstack_table/table.d.ts +26 -0
- package/lib/component/elements/tanstack_table/table.d.ts.map +1 -0
- package/lib/component/elements/{ReactTable/ReactTable.js → tanstack_table/table.js} +29 -37
- package/lib/component/elements/tanstack_table/table.js.map +1 -0
- package/lib/component/elements/tanstack_table/types.d.ts +47 -0
- package/lib/component/elements/tanstack_table/types.d.ts.map +1 -0
- package/lib/component/elements/tanstack_table/types.js +2 -0
- package/lib/component/elements/tanstack_table/types.js.map +1 -0
- package/lib/component/elements/utilities/transferStyles.d.ts +2 -0
- package/lib/component/elements/utilities/transferStyles.d.ts.map +1 -0
- package/lib/component/elements/utilities/transferStyles.js +29 -0
- package/lib/component/elements/utilities/transferStyles.js.map +1 -0
- package/lib/component/header/AutoPeakPickingOptionPanel.js +1 -1
- package/lib/component/header/AutoPeakPickingOptionPanel.js.map +1 -1
- package/lib/component/hooks/useIntegralPath.js +2 -2
- package/lib/component/hooks/useIntegralPath.js.map +1 -1
- package/lib/component/modal/ImportPublicationStringModal.d.ts.map +1 -1
- package/lib/component/modal/ImportPublicationStringModal.js +91 -73
- package/lib/component/modal/ImportPublicationStringModal.js.map +1 -1
- package/lib/component/modal/LogsHistoryModal.d.ts.map +1 -1
- package/lib/component/modal/LogsHistoryModal.js +44 -40
- package/lib/component/modal/LogsHistoryModal.js.map +1 -1
- package/lib/component/modal/editRange/forms/components/signal-tabs/SignalJCouplingsTable.d.ts.map +1 -1
- package/lib/component/modal/editRange/forms/components/signal-tabs/SignalJCouplingsTable.js +48 -44
- package/lib/component/modal/editRange/forms/components/signal-tabs/SignalJCouplingsTable.js.map +1 -1
- package/lib/component/modal/editRange/forms/components/signal-tabs/SignalPeaksTable.d.ts.map +1 -1
- package/lib/component/modal/editRange/forms/components/signal-tabs/SignalPeaksTable.js +36 -32
- package/lib/component/modal/editRange/forms/components/signal-tabs/SignalPeaksTable.js.map +1 -1
- package/lib/component/modal/metaImportation/MetaImportationModal.d.ts.map +1 -1
- package/lib/component/modal/metaImportation/MetaImportationModal.js +15 -14
- package/lib/component/modal/metaImportation/MetaImportationModal.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/errors/context.d.ts +106 -105
- 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 +106 -105
- 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 +106 -105
- 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 +91 -90
- 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 +91 -90
- 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 +15 -15
- package/lib/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.d.ts +91 -90
- 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 +91 -90
- 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 +91 -90
- 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 +91 -90
- 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/export_tab.fields.d.ts +12 -10
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.js +32 -40
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/external_api_tab.d.ts +91 -90
- 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 +91 -90
- 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 +91 -90
- 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 +91 -90
- 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 +91 -90
- 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/spectra_colors_tab.d.ts +91 -90
- 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 +91 -90
- 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 +91 -90
- 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 +91 -90
- package/lib/component/modal/setting/tanstack_general_settings/tabs/tools_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/validation/export_tab_validation.d.ts +61 -17
- package/lib/component/modal/setting/tanstack_general_settings/validation/export_tab_validation.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/validation/export_tab_validation.js +79 -28
- package/lib/component/modal/setting/tanstack_general_settings/validation/export_tab_validation.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/validation.d.ts +15 -15
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignmentTable.d.ts +1 -1
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignmentTable.d.ts.map +1 -1
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js +29 -26
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js.map +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralTable.d.ts.map +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralTable.js +70 -76
- package/lib/component/panels/IntegralsPanel/IntegralTable.js.map +1 -1
- package/lib/component/panels/MatrixGenerationPanel/ExclusionsZonesTable.d.ts.map +1 -1
- package/lib/component/panels/MatrixGenerationPanel/ExclusionsZonesTable.js +33 -29
- package/lib/component/panels/MatrixGenerationPanel/ExclusionsZonesTable.js.map +1 -1
- package/lib/component/panels/PeaksPanel/PeaksTable.d.ts +8 -6
- package/lib/component/panels/PeaksPanel/PeaksTable.d.ts.map +1 -1
- package/lib/component/panels/PeaksPanel/PeaksTable.js +116 -126
- package/lib/component/panels/PeaksPanel/PeaksTable.js.map +1 -1
- package/lib/component/panels/PeaksPanel/peaksToTSV.d.ts +2 -2
- package/lib/component/panels/PeaksPanel/peaksToTSV.d.ts.map +1 -1
- package/lib/component/panels/PeaksPanel/peaksToTSV.js +9 -11
- package/lib/component/panels/PeaksPanel/peaksToTSV.js.map +1 -1
- package/lib/component/panels/RangesPanel/RangesTable.d.ts +3 -2
- package/lib/component/panels/RangesPanel/RangesTable.d.ts.map +1 -1
- package/lib/component/panels/RangesPanel/RangesTable.js.map +1 -1
- package/lib/component/panels/RangesPanel/RangesTableRow.d.ts +2 -2
- package/lib/component/panels/RangesPanel/RangesTableRow.d.ts.map +1 -1
- package/lib/component/panels/SpectraPanel/SpectraTable.d.ts.map +1 -1
- package/lib/component/panels/SpectraPanel/SpectraTable.js +37 -26
- package/lib/component/panels/SpectraPanel/SpectraTable.js.map +1 -1
- package/lib/component/panels/SpectraPanel/base/SpectraColumnsManager.d.ts +1 -1
- package/lib/component/panels/SpectraPanel/base/SpectraColumnsManager.d.ts.map +1 -1
- package/lib/component/panels/SpectraPanel/base/SpectraColumnsManager.js +56 -52
- package/lib/component/panels/SpectraPanel/base/SpectraColumnsManager.js.map +1 -1
- package/lib/component/panels/SummaryPanel/SetShiftTolerancesModal.d.ts.map +1 -1
- package/lib/component/panels/SummaryPanel/SetShiftTolerancesModal.js +23 -20
- package/lib/component/panels/SummaryPanel/SetShiftTolerancesModal.js.map +1 -1
- package/lib/component/panels/ZonesPanel/ZonesTableRow.d.ts +2 -2
- package/lib/component/panels/ZonesPanel/ZonesTableRow.d.ts.map +1 -1
- package/lib/component/panels/databasePanel/DatabaseTable.d.ts +1 -1
- package/lib/component/panels/databasePanel/DatabaseTable.d.ts.map +1 -1
- package/lib/component/panels/databasePanel/DatabaseTable.js +171 -153
- package/lib/component/panels/databasePanel/DatabaseTable.js.map +1 -1
- package/lib/component/panels/filtersPanel/Filters/ExclusionZonesOptionsPanel.d.ts.map +1 -1
- package/lib/component/panels/filtersPanel/Filters/ExclusionZonesOptionsPanel.js +27 -24
- package/lib/component/panels/filtersPanel/Filters/ExclusionZonesOptionsPanel.js.map +1 -1
- package/lib/component/panels/filtersPanel/processings_sections_panel.js +1 -1
- package/lib/component/panels/filtersPanel/processings_sections_panel.js.map +1 -1
- package/lib/component/panels/informationPanel/InformationEditionModal.d.ts.map +1 -1
- package/lib/component/panels/informationPanel/InformationEditionModal.js +69 -64
- package/lib/component/panels/informationPanel/InformationEditionModal.js.map +1 -1
- package/lib/component/panels/multipleAnalysisPanel/AlignSpectra.d.ts +3 -3
- package/lib/component/panels/multipleAnalysisPanel/AlignSpectra.d.ts.map +1 -1
- package/lib/component/panels/multipleAnalysisPanel/AlignSpectra.js +69 -56
- package/lib/component/panels/multipleAnalysisPanel/AlignSpectra.js.map +1 -1
- package/lib/component/panels/multipleAnalysisPanel/MultipleSpectraAnalysisPanel.js +1 -1
- package/lib/component/panels/multipleAnalysisPanel/MultipleSpectraAnalysisPanel.js.map +1 -1
- package/lib/component/panels/multipleAnalysisPanel/MultipleSpectraAnalysisTable.d.ts.map +1 -1
- package/lib/component/panels/multipleAnalysisPanel/MultipleSpectraAnalysisTable.js +17 -20
- package/lib/component/panels/multipleAnalysisPanel/MultipleSpectraAnalysisTable.js.map +1 -1
- package/lib/component/panels/multipleAnalysisPanel/preferences/AnalysisTablePreferences.d.ts.map +1 -1
- package/lib/component/panels/multipleAnalysisPanel/preferences/AnalysisTablePreferences.js +25 -20
- package/lib/component/panels/multipleAnalysisPanel/preferences/AnalysisTablePreferences.js.map +1 -1
- package/lib/component/panels/multipleAnalysisPanel/preferences/LegendsPreferences.d.ts.map +1 -1
- package/lib/component/panels/multipleAnalysisPanel/preferences/LegendsPreferences.js +41 -36
- package/lib/component/panels/multipleAnalysisPanel/preferences/LegendsPreferences.js.map +1 -1
- package/lib/component/panels/spectrumSimulation/SpinSystemTable.d.ts.map +1 -1
- package/lib/component/panels/spectrumSimulation/SpinSystemTable.js +14 -15
- package/lib/component/panels/spectrumSimulation/SpinSystemTable.js.map +1 -1
- package/lib/component/reducer/actions/DatabaseActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/DatabaseActions.js +3 -2
- package/lib/component/reducer/actions/DatabaseActions.js.map +1 -1
- package/lib/component/reducer/actions/InsetActions.d.ts +1 -1
- package/lib/component/reducer/actions/InsetActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/ToolsActions.d.ts +1 -1
- package/lib/component/reducer/actions/ToolsActions.d.ts.map +1 -1
- package/lib/component/reducer/helper/Zoom1DManager.d.ts +1 -1
- package/lib/component/reducer/helper/Zoom1DManager.d.ts.map +1 -1
- package/lib/component/reducer/helper/ZoomHistoryManager.d.ts +1 -1
- package/lib/component/reducer/helper/ZoomHistoryManager.d.ts.map +1 -1
- package/lib/component/reducer/preferences/actions/matrixGeneration.d.ts +1 -1
- package/lib/component/reducer/preferences/actions/matrixGeneration.d.ts.map +1 -1
- package/lib/component/toolbar/nmr_toolbar.js +1 -1
- package/lib/component/toolbar/nmr_toolbar.js.map +1 -1
- package/lib/component/utility/Events.d.ts +1 -1
- package/lib/component/utility/Events.d.ts.map +1 -1
- package/lib/component/utility/core_slots/core_operator_brush.commons.d.ts +9 -0
- package/lib/component/utility/core_slots/core_operator_brush.commons.d.ts.map +1 -0
- package/lib/component/utility/core_slots/core_operator_brush.commons.js +15 -0
- package/lib/component/utility/core_slots/core_operator_brush.commons.js.map +1 -0
- package/lib/component/utility/core_slots/core_operator_chart_brush.commons.d.ts +7 -0
- package/lib/component/utility/core_slots/core_operator_chart_brush.commons.d.ts.map +1 -0
- package/lib/component/utility/core_slots/core_operator_chart_brush.commons.js +82 -0
- package/lib/component/utility/core_slots/core_operator_chart_brush.commons.js.map +1 -0
- package/lib/component/utility/core_slots/core_operator_chart_brush_tracker.d.ts +8 -0
- package/lib/component/utility/core_slots/core_operator_chart_brush_tracker.d.ts.map +1 -0
- package/lib/component/utility/core_slots/core_operator_chart_brush_tracker.js +11 -0
- package/lib/component/utility/core_slots/core_operator_chart_brush_tracker.js.map +1 -0
- package/lib/component/utility/core_slots/core_operator_chart_svg.d.ts +8 -0
- package/lib/component/utility/core_slots/core_operator_chart_svg.d.ts.map +1 -0
- package/lib/component/utility/core_slots/core_operator_chart_svg.js +11 -0
- package/lib/component/utility/core_slots/core_operator_chart_svg.js.map +1 -0
- package/lib/component/utility/core_slots/core_operator_panel_tool.d.ts +2 -8
- package/lib/component/utility/core_slots/core_operator_panel_tool.d.ts.map +1 -1
- package/lib/component/utility/core_slots/core_operator_panel_tool.js +8 -6
- package/lib/component/utility/core_slots/core_operator_panel_tool.js.map +1 -1
- package/lib/component/utility/core_slots/core_operator_tool.commons.d.ts +11 -0
- package/lib/component/utility/core_slots/core_operator_tool.commons.d.ts.map +1 -0
- package/lib/component/utility/core_slots/core_operator_tool.commons.js +30 -0
- package/lib/component/utility/core_slots/core_operator_tool.commons.js.map +1 -0
- package/lib/component/utility/core_slots/core_operator_tool.d.ts +2 -8
- package/lib/component/utility/core_slots/core_operator_tool.d.ts.map +1 -1
- package/lib/component/utility/core_slots/core_operator_tool.js +8 -6
- package/lib/component/utility/core_slots/core_operator_tool.js.map +1 -1
- package/lib/component/utility/export.d.ts +5 -0
- package/lib/component/utility/export.d.ts.map +1 -1
- package/lib/component/utility/export.js +22 -0
- package/lib/component/utility/export.js.map +1 -1
- package/lib/data/data2d/Spectrum2D/contours.d.ts.map +1 -1
- package/lib/data/data2d/Spectrum2D/contours.js +23 -10
- package/lib/data/data2d/Spectrum2D/contours.js.map +1 -1
- package/lib/data/data2d/Spectrum2D/findBestMinContour/estimateNoiseLevel.d.ts +13 -0
- package/lib/data/data2d/Spectrum2D/findBestMinContour/estimateNoiseLevel.d.ts.map +1 -0
- package/lib/data/data2d/Spectrum2D/findBestMinContour/estimateNoiseLevel.js +40 -0
- package/lib/data/data2d/Spectrum2D/findBestMinContour/estimateNoiseLevel.js.map +1 -0
- package/lib/data/data2d/Spectrum2D/findBestMinContour/evaluation.d.ts +27 -0
- package/lib/data/data2d/Spectrum2D/findBestMinContour/evaluation.d.ts.map +1 -0
- package/lib/data/data2d/Spectrum2D/findBestMinContour/evaluation.js +230 -0
- package/lib/data/data2d/Spectrum2D/findBestMinContour/evaluation.js.map +1 -0
- package/lib/data/data2d/Spectrum2D/findBestMinContour/findAutomaticContourLevels.d.ts +227 -0
- package/lib/data/data2d/Spectrum2D/findBestMinContour/findAutomaticContourLevels.d.ts.map +1 -0
- package/lib/data/data2d/Spectrum2D/findBestMinContour/findAutomaticContourLevels.js +67 -0
- package/lib/data/data2d/Spectrum2D/findBestMinContour/findAutomaticContourLevels.js.map +1 -0
- package/lib/data/data2d/Spectrum2D/findBestMinContour/math.d.ts +4 -0
- package/lib/data/data2d/Spectrum2D/findBestMinContour/math.d.ts.map +1 -0
- package/lib/data/data2d/Spectrum2D/findBestMinContour/math.js +42 -0
- package/lib/data/data2d/Spectrum2D/findBestMinContour/math.js.map +1 -0
- package/lib/data/utilities/calculateSanPlot.d.ts +3 -1
- package/lib/data/utilities/calculateSanPlot.d.ts.map +1 -1
- package/lib/data/utilities/calculateSanPlot.js +2 -2
- package/lib/data/utilities/calculateSanPlot.js.map +1 -1
- package/lib/versionInfo.js +1 -1
- package/package.json +7 -8
- package/src/component/1d/ApodizationLine.tsx +2 -2
- package/src/component/1d/BrushTracker1D.tsx +19 -21
- package/src/component/1d/Line.tsx +2 -2
- package/src/component/1d/SVGContent1D.tsx +6 -0
- package/src/component/1d/Viewer1D.tsx +2 -0
- package/src/component/1d/baseline/BaselinePreview.tsx +2 -2
- package/src/component/1d/database/DatabaseSpectrum.tsx +2 -2
- package/src/component/1d/database/ResurrectedDatabaseRanges.tsx +2 -2
- package/src/component/1d/matrix/Boxplot.tsx +5 -5
- package/src/component/1d/matrix/Stocsy.tsx +2 -2
- package/src/component/1d/peaks/PeakAnnotationsSpreadMode.tsx +17 -3
- package/src/component/1d/peaks/usePeakShapesPath.ts +2 -2
- package/src/component/1d/plugin_chart_brush_tracker.tsx +63 -0
- package/src/component/1d/plugin_svg_chart.tsx +60 -0
- package/src/component/1d-2d/components/RangeIndicator.tsx +8 -9
- package/src/component/1d-2d/tools/BrushXY.tsx +1 -1
- package/src/component/1d-2d/tools/CrossLinePointer.tsx +1 -1
- package/src/component/2d/1d-tracer/HorizontalSliceChart.tsx +2 -2
- package/src/component/2d/1d-tracer/Left1DChart.tsx +2 -2
- package/src/component/2d/1d-tracer/Top1DChart.tsx +2 -2
- package/src/component/2d/1d-tracer/VerticalSliceChart.tsx +2 -2
- package/src/component/2d/1d-tracer/phase-correction-traces/SpectrumPhaseTrace.tsx +3 -3
- package/src/component/2d/BrushTracker2D.tsx +5 -5
- package/src/component/2d/ft/Contours.tsx +2 -2
- package/src/component/2d/utilities/DimensionLayout.ts +1 -1
- package/src/component/EventsTrackers/BrushTracker.tsx +118 -115
- package/src/component/EventsTrackers/brush_tracker.types.ts +111 -0
- package/src/component/EventsTrackers/brush_tracker_events_listeners.ts +32 -0
- package/src/component/context/ScaleContext.tsx +1 -1
- package/src/component/elements/D3Axis.tsx +49 -67
- package/src/component/elements/export/ExportContent.tsx +3 -2
- package/src/component/elements/export/ExportOptionsModal.tsx +32 -1
- package/src/component/elements/export/useExportConfigurer.tsx +6 -0
- package/src/component/elements/print/PrintContent.tsx +6 -27
- package/src/component/elements/tanstack_table/create_action_column.tsx +43 -0
- package/src/component/elements/tanstack_table/create_column_helper.ts +11 -0
- package/src/component/elements/tanstack_table/elements/table_context.ts +15 -0
- package/src/component/elements/tanstack_table/elements/table_header.tsx +111 -0
- package/src/component/elements/{ReactTable/Elements/ReactTableRow.tsx → tanstack_table/elements/table_row.tsx} +51 -50
- package/src/component/elements/tanstack_table/features.ts +33 -0
- package/src/component/elements/tanstack_table/index.ts +5 -0
- package/src/component/elements/{ReactTable/ReactTable.tsx → tanstack_table/table.tsx} +78 -157
- package/src/component/elements/tanstack_table/types.ts +86 -0
- package/src/component/elements/utilities/transferStyles.ts +32 -0
- package/src/component/header/AutoPeakPickingOptionPanel.tsx +1 -1
- package/src/component/hooks/useIntegralPath.ts +2 -2
- package/src/component/modal/ImportPublicationStringModal.tsx +160 -136
- package/src/component/modal/LogsHistoryModal.tsx +32 -25
- package/src/component/modal/editRange/forms/components/signal-tabs/SignalJCouplingsTable.tsx +28 -24
- package/src/component/modal/editRange/forms/components/signal-tabs/SignalPeaksTable.tsx +27 -25
- package/src/component/modal/metaImportation/MetaImportationModal.tsx +19 -15
- package/src/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.tsx +47 -57
- package/src/component/modal/setting/tanstack_general_settings/validation/export_tab_validation.ts +100 -28
- package/src/component/panels/AutomaticAssignment/AutomaticAssignmentTable.tsx +27 -25
- package/src/component/panels/IntegralsPanel/IntegralTable.tsx +75 -89
- package/src/component/panels/MatrixGenerationPanel/ExclusionsZonesTable.tsx +68 -60
- package/src/component/panels/PeaksPanel/PeaksTable.tsx +126 -124
- package/src/component/panels/PeaksPanel/peaksToTSV.ts +14 -15
- package/src/component/panels/RangesPanel/RangesTable.tsx +3 -2
- package/src/component/panels/RangesPanel/RangesTableRow.tsx +2 -2
- package/src/component/panels/SpectraPanel/SpectraTable.tsx +58 -36
- package/src/component/panels/SpectraPanel/base/SpectraColumnsManager.tsx +31 -35
- package/src/component/panels/SummaryPanel/SetShiftTolerancesModal.tsx +25 -20
- package/src/component/panels/ZonesPanel/ZonesTableRow.tsx +2 -2
- package/src/component/panels/databasePanel/DatabasePanel.tsx +1 -1
- package/src/component/panels/databasePanel/DatabaseTable.tsx +189 -183
- package/src/component/panels/filtersPanel/Filters/ExclusionZonesOptionsPanel.tsx +20 -20
- package/src/component/panels/filtersPanel/processings_sections_panel.tsx +1 -1
- package/src/component/panels/informationPanel/InformationEditionModal.tsx +40 -37
- package/src/component/panels/multipleAnalysisPanel/AlignSpectra.tsx +128 -98
- package/src/component/panels/multipleAnalysisPanel/MultipleSpectraAnalysisPanel.tsx +1 -1
- package/src/component/panels/multipleAnalysisPanel/MultipleSpectraAnalysisTable.tsx +23 -24
- package/src/component/panels/multipleAnalysisPanel/preferences/AnalysisTablePreferences.tsx +33 -24
- package/src/component/panels/multipleAnalysisPanel/preferences/LegendsPreferences.tsx +34 -31
- package/src/component/panels/spectrumSimulation/SpinSystemTable.tsx +19 -18
- package/src/component/reducer/actions/DatabaseActions.ts +4 -3
- package/src/component/reducer/actions/InsetActions.ts +1 -1
- package/src/component/reducer/actions/ToolsActions.ts +1 -1
- package/src/component/reducer/helper/Zoom1DManager.ts +1 -1
- package/src/component/reducer/helper/ZoomHistoryManager.ts +1 -1
- package/src/component/reducer/preferences/actions/matrixGeneration.ts +1 -1
- package/src/component/toolbar/nmr_toolbar.tsx +1 -1
- package/src/component/utility/Events.tsx +1 -1
- package/src/component/utility/core_slots/core_operator_brush.commons.ts +18 -0
- package/src/component/utility/core_slots/core_operator_chart_brush.commons.ts +138 -0
- package/src/component/utility/core_slots/core_operator_chart_brush_tracker.tsx +27 -0
- package/src/component/utility/core_slots/core_operator_chart_svg.tsx +46 -0
- package/src/component/utility/core_slots/core_operator_panel_tool.tsx +9 -27
- package/src/component/utility/core_slots/core_operator_tool.commons.ts +63 -0
- package/src/component/utility/core_slots/core_operator_tool.tsx +9 -27
- package/src/component/utility/export.ts +34 -0
- package/src/data/data2d/Spectrum2D/contours.ts +40 -14
- package/src/data/data2d/Spectrum2D/findBestMinContour/estimateNoiseLevel.ts +67 -0
- package/src/data/data2d/Spectrum2D/findBestMinContour/evaluation.ts +432 -0
- package/src/data/data2d/Spectrum2D/findBestMinContour/findAutomaticContourLevels.ts +431 -0
- package/src/data/data2d/Spectrum2D/findBestMinContour/math.ts +59 -0
- package/src/data/utilities/calculateSanPlot.ts +2 -1
- package/src/versionInfo.ts +1 -1
- package/lib/component/elements/ReactTable/BaseReactTable.d.ts.map +0 -1
- package/lib/component/elements/ReactTable/BaseReactTable.js.map +0 -1
- package/lib/component/elements/ReactTable/Elements/EmptyDataRow.d.ts.map +0 -1
- package/lib/component/elements/ReactTable/Elements/EmptyDataRow.js.map +0 -1
- package/lib/component/elements/ReactTable/Elements/ReactTableHeader.d.ts +0 -10
- package/lib/component/elements/ReactTable/Elements/ReactTableHeader.d.ts.map +0 -1
- package/lib/component/elements/ReactTable/Elements/ReactTableHeader.js +0 -27
- package/lib/component/elements/ReactTable/Elements/ReactTableHeader.js.map +0 -1
- package/lib/component/elements/ReactTable/Elements/ReactTableRow.d.ts +0 -16
- package/lib/component/elements/ReactTable/Elements/ReactTableRow.d.ts.map +0 -1
- package/lib/component/elements/ReactTable/Elements/ReactTableRow.js.map +0 -1
- package/lib/component/elements/ReactTable/ReactTable.d.ts +0 -64
- package/lib/component/elements/ReactTable/ReactTable.d.ts.map +0 -1
- package/lib/component/elements/ReactTable/ReactTable.js.map +0 -1
- package/lib/component/elements/ReactTable/utility/ReactTableContext.d.ts +0 -4
- package/lib/component/elements/ReactTable/utility/ReactTableContext.d.ts.map +0 -1
- package/lib/component/elements/ReactTable/utility/ReactTableContext.js +0 -11
- package/lib/component/elements/ReactTable/utility/ReactTableContext.js.map +0 -1
- package/lib/component/elements/ReactTable/utility/addCustomColumn.d.ts +0 -19
- package/lib/component/elements/ReactTable/utility/addCustomColumn.d.ts.map +0 -1
- package/lib/component/elements/ReactTable/utility/addCustomColumn.js +0 -36
- package/lib/component/elements/ReactTable/utility/addCustomColumn.js.map +0 -1
- package/lib/component/elements/ReactTable/utility/useRowSpan.d.ts +0 -9
- package/lib/component/elements/ReactTable/utility/useRowSpan.d.ts.map +0 -1
- package/lib/component/elements/ReactTable/utility/useRowSpan.js +0 -40
- package/lib/component/elements/ReactTable/utility/useRowSpan.js.map +0 -1
- package/lib/component/elements/export/utilities/transferDocumentStyles.d.ts +0 -2
- package/lib/component/elements/export/utilities/transferDocumentStyles.d.ts.map +0 -1
- package/lib/component/elements/export/utilities/transferDocumentStyles.js +0 -21
- package/lib/component/elements/export/utilities/transferDocumentStyles.js.map +0 -1
- package/lib/component/utility/PathBuilder.d.ts +0 -10
- package/lib/component/utility/PathBuilder.d.ts.map +0 -1
- package/lib/component/utility/PathBuilder.js +0 -38
- package/lib/component/utility/PathBuilder.js.map +0 -1
- package/src/component/elements/ReactTable/Elements/ReactTableHeader.tsx +0 -81
- package/src/component/elements/ReactTable/utility/ReactTableContext.ts +0 -14
- package/src/component/elements/ReactTable/utility/addCustomColumn.tsx +0 -75
- package/src/component/elements/ReactTable/utility/useRowSpan.ts +0 -61
- package/src/component/elements/export/utilities/transferDocumentStyles.ts +0 -21
- package/src/component/utility/PathBuilder.ts +0 -41
- /package/src/component/elements/{ReactTable/BaseReactTable.tsx → tanstack_table/elements/base_react_table.tsx} +0 -0
- /package/src/component/elements/{ReactTable/Elements/EmptyDataRow.tsx → tanstack_table/elements/empty_data_row.tsx} +0 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export function gaussianTwoSidedTail(k) {
|
|
2
|
+
return erfc(k / Math.SQRT2);
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* Approximation of the complementary error function.
|
|
6
|
+
* @TODO it would be replaced by the same implementation from ml-spectra-processing.
|
|
7
|
+
*/
|
|
8
|
+
function erfc(x) {
|
|
9
|
+
const sign = x < 0 ? -1 : 1;
|
|
10
|
+
const ax = Math.abs(x);
|
|
11
|
+
const p = 0.3275911;
|
|
12
|
+
const a1 = 0.254829592;
|
|
13
|
+
const a2 = -0.284496736;
|
|
14
|
+
const a3 = 1.421413741;
|
|
15
|
+
const a4 = -1.453152027;
|
|
16
|
+
const a5 = 1.061405429;
|
|
17
|
+
const t = 1 / (1 + p * ax);
|
|
18
|
+
const polynomial = ((((a5 * t + a4) * t + a3) * t + a2) * t + a1) * t;
|
|
19
|
+
const result = polynomial * Math.exp(-ax * ax);
|
|
20
|
+
return sign >= 0 ? result : 2 - result;
|
|
21
|
+
}
|
|
22
|
+
export function violation(value, limit) {
|
|
23
|
+
if (limit === 0) {
|
|
24
|
+
return value === 0 ? 0 : 1;
|
|
25
|
+
}
|
|
26
|
+
return Math.max(0, value / limit - 1);
|
|
27
|
+
}
|
|
28
|
+
export function validateInput(matrix, rows, cols, noiseLevel) {
|
|
29
|
+
if (!Number.isInteger(rows) || rows <= 0) {
|
|
30
|
+
throw new Error('rows must be a positive integer');
|
|
31
|
+
}
|
|
32
|
+
if (!Number.isInteger(cols) || cols <= 0) {
|
|
33
|
+
throw new Error('cols must be a positive integer');
|
|
34
|
+
}
|
|
35
|
+
if (matrix.length !== rows * cols) {
|
|
36
|
+
throw new Error('matrix.length must equal rows * cols');
|
|
37
|
+
}
|
|
38
|
+
if (!Number.isFinite(noiseLevel) || noiseLevel <= 0) {
|
|
39
|
+
throw new Error('noiseLevel must be a positive finite number');
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=math.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"math.js","sourceRoot":"","sources":["../../../../../src/data/data2d/Spectrum2D/findBestMinContour/math.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,oBAAoB,CAAC,CAAS;IAC5C,OAAO,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;AAC9B,CAAC;AAED;;;GAGG;AACH,SAAS,IAAI,CAAC,CAAS;IACrB,MAAM,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5B,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAEvB,MAAM,CAAC,GAAG,SAAS,CAAC;IAEpB,MAAM,EAAE,GAAG,WAAW,CAAC;IACvB,MAAM,EAAE,GAAG,CAAC,WAAW,CAAC;IACxB,MAAM,EAAE,GAAG,WAAW,CAAC;IACvB,MAAM,EAAE,GAAG,CAAC,WAAW,CAAC;IACxB,MAAM,EAAE,GAAG,WAAW,CAAC;IAEvB,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC;IAE3B,MAAM,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC;IAEtE,MAAM,MAAM,GAAG,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;IAE/C,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC;AACzC,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,KAAa,EAAE,KAAa;IACpD,IAAI,KAAK,KAAK,CAAC,EAAE,CAAC;QAChB,OAAO,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7B,CAAC;IAED,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,CAAC,CAAC,CAAC;AACxC,CAAC;AAED,MAAM,UAAU,aAAa,CAC3B,MAAyB,EACzB,IAAY,EACZ,IAAY,EACZ,UAAkB;IAElB,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,EAAE,CAAC;QACzC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;IACrD,CAAC;IAED,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,EAAE,CAAC;QACzC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;IACrD,CAAC;IAED,IAAI,MAAM,CAAC,MAAM,KAAK,IAAI,GAAG,IAAI,EAAE,CAAC;QAClC,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;IAC1D,CAAC;IAED,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,UAAU,IAAI,CAAC,EAAE,CAAC;QACpD,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;IACjE,CAAC;AACH,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import type { NmrData1D, NmrData2DFt } from 'cheminfo-types';
|
|
2
|
-
export declare function calculateSanPlot<T extends '1D' | '2D'>(dimension: T, data: T extends '1D' ? NmrData1D : NmrData2DFt['rr']
|
|
2
|
+
export declare function calculateSanPlot<T extends '1D' | '2D'>(dimension: T, data: T extends '1D' ? NmrData1D : NmrData2DFt['rr'], options?: {
|
|
3
|
+
magnitudeMode?: boolean;
|
|
4
|
+
}): import("ml-spectra-processing").XNoiseSanPlotResult;
|
|
3
5
|
//# sourceMappingURL=calculateSanPlot.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calculateSanPlot.d.ts","sourceRoot":"","sources":["../../../src/data/utilities/calculateSanPlot.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7D,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,IAAI,GAAG,IAAI,EACpD,SAAS,EAAE,CAAC,EACZ,IAAI,EAAE,CAAC,SAAS,IAAI,GAAG,SAAS,GAAG,WAAW,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"calculateSanPlot.d.ts","sourceRoot":"","sources":["../../../src/data/utilities/calculateSanPlot.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7D,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,IAAI,GAAG,IAAI,EACpD,SAAS,EAAE,CAAC,EACZ,IAAI,EAAE,CAAC,SAAS,IAAI,GAAG,SAAS,GAAG,WAAW,CAAC,IAAI,CAAC,EACpD,OAAO,CAAC,EAAE;IAAE,aAAa,CAAC,EAAE,OAAO,CAAA;CAAE,uDAQtC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { xNoiseSanPlot } from 'ml-spectra-processing';
|
|
2
|
-
export function calculateSanPlot(dimension, data) {
|
|
2
|
+
export function calculateSanPlot(dimension, data, options) {
|
|
3
3
|
const input = dimension === '1D'
|
|
4
4
|
? prepare1DData(data)
|
|
5
5
|
: prepare2DData(data);
|
|
6
|
-
return xNoiseSanPlot(input);
|
|
6
|
+
return xNoiseSanPlot(input, options);
|
|
7
7
|
}
|
|
8
8
|
function prepare1DData(data) {
|
|
9
9
|
const length = data.re.length;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calculateSanPlot.js","sourceRoot":"","sources":["../../../src/data/utilities/calculateSanPlot.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,MAAM,UAAU,gBAAgB,CAC9B,SAAY,EACZ,IAAoD;
|
|
1
|
+
{"version":3,"file":"calculateSanPlot.js","sourceRoot":"","sources":["../../../src/data/utilities/calculateSanPlot.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,MAAM,UAAU,gBAAgB,CAC9B,SAAY,EACZ,IAAoD,EACpD,OAAqC;IAErC,MAAM,KAAK,GACT,SAAS,KAAK,IAAI;QAChB,CAAC,CAAC,aAAa,CAAC,IAAiB,CAAC;QAClC,CAAC,CAAC,aAAa,CAAC,IAAyB,CAAC,CAAC;IAE/C,OAAO,aAAa,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AACvC,CAAC;AAED,SAAS,aAAa,CAAC,IAAe;IACpC,MAAM,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC;IAC9B,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;IAC9C,MAAM,KAAK,GAAG,IAAI,YAAY,CAAC,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACrD,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC;QAC5C,KAAK,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAC9B,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,aAAa,CAAC,IAAuB;IAC5C,MAAM,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IAC9B,MAAM,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC;IAC3B,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;IACrD,MAAM,KAAK,GAAG,IAAI,YAAY,CAAC,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAC5D,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;QACjC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC;YACpC,KAAK,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAChC,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
|
package/lib/versionInfo.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export default { version: 'v2.
|
|
1
|
+
export default { version: 'v2.8.0' };
|
|
2
2
|
//# sourceMappingURL=versionInfo.js.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nmrium",
|
|
3
3
|
"description": "React component to display and process nuclear magnetic resonance (NMR) spectra.",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.8.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"clean-lib": "rimraf lib",
|
|
27
27
|
"cspell": "cspell lint \"**/*.tsx\"",
|
|
28
28
|
"dev": "vite --host localhost --port 3000 --open",
|
|
29
|
-
"eslint": "eslint . --cache --max-warnings=
|
|
29
|
+
"eslint": "eslint . --cache --max-warnings=106",
|
|
30
30
|
"eslint-fix": "node --run eslint -- --fix",
|
|
31
31
|
"install:clean": "rm -rf node_modules/ && rm -rf package-lock.json && npm install && npm start",
|
|
32
32
|
"knip": "knip",
|
|
@@ -65,9 +65,10 @@
|
|
|
65
65
|
"@hookform/resolvers": "^5.9.1",
|
|
66
66
|
"@tanstack/react-form": "^1.33.5",
|
|
67
67
|
"@tanstack/react-store": "^0.11.1",
|
|
68
|
-
"@
|
|
69
|
-
"@zakodium/
|
|
70
|
-
"@zakodium/nmrium-core
|
|
68
|
+
"@tanstack/react-table": "^9.1.2",
|
|
69
|
+
"@zakodium/nmr-types": "^0.5.26",
|
|
70
|
+
"@zakodium/nmrium-core": "^0.7.66",
|
|
71
|
+
"@zakodium/nmrium-core-plugins": "^0.7.88",
|
|
71
72
|
"@zakodium/pdnd-esm": "^1.1.1",
|
|
72
73
|
"@zakodium/utils": "^0.5.1",
|
|
73
74
|
"@zip.js/zip.js": "^2.8.53",
|
|
@@ -111,8 +112,7 @@
|
|
|
111
112
|
"react-ocl-nmr": "^4.1.1",
|
|
112
113
|
"react-plot": "^3.1.2",
|
|
113
114
|
"react-rnd": "^10.5.3",
|
|
114
|
-
"react-science": "^23.
|
|
115
|
-
"react-table": "^7.8.0",
|
|
115
|
+
"react-science": "^23.1.1",
|
|
116
116
|
"smart-array-filter": "^5.0.0",
|
|
117
117
|
"ts-pattern": "^5.9.0",
|
|
118
118
|
"usehooks-ts": "^3.1.1",
|
|
@@ -136,7 +136,6 @@
|
|
|
136
136
|
"@types/papaparse": "^5.5.2",
|
|
137
137
|
"@types/react": "^18.3.13",
|
|
138
138
|
"@types/react-dom": "^18.3.1",
|
|
139
|
-
"@types/react-table": "^7.7.20",
|
|
140
139
|
"@vitejs/plugin-react": "^6.0.5",
|
|
141
140
|
"@vitest/coverage-v8": "^4.1.11",
|
|
142
141
|
"@zakodium/tsconfig": "^1.0.5",
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
createApodizationWindowData,
|
|
7
7
|
default1DApodization,
|
|
8
8
|
} from 'nmr-processing';
|
|
9
|
+
import { SVGPathBuilder } from 'react-science/ui';
|
|
9
10
|
|
|
10
11
|
import { useChartData } from '../context/ChartContext.js';
|
|
11
12
|
import { useFilterSyncOptions } from '../context/FilterSyncOptionsContext.js';
|
|
@@ -16,7 +17,6 @@ import useSpectrum from '../hooks/useSpectrum.js';
|
|
|
16
17
|
import useTempSpectrum from '../hooks/useTempSpectrum.js';
|
|
17
18
|
import { useVerticalAlign } from '../hooks/useVerticalAlign.js';
|
|
18
19
|
import type { ApodizationOptions } from '../panels/filtersPanel/Filters/hooks/useApodization.js';
|
|
19
|
-
import { PathBuilder } from '../utility/PathBuilder.js';
|
|
20
20
|
|
|
21
21
|
import { useIsInset } from './inset/InsetProvider.js';
|
|
22
22
|
import { getXScale, getYScale } from './utilities/scale.js';
|
|
@@ -84,7 +84,7 @@ export function ApodizationLine() {
|
|
|
84
84
|
scaleX = windowScaleX;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
const pathBuilder = new
|
|
87
|
+
const pathBuilder = new SVGPathBuilder();
|
|
88
88
|
const { re, x } = tempSpectrum.data;
|
|
89
89
|
|
|
90
90
|
const apodizationOptions = merge(
|
|
@@ -5,17 +5,17 @@ import { useOnOff } from 'react-science/ui';
|
|
|
5
5
|
|
|
6
6
|
import { createRange } from '../../data/data1d/Spectrum1D/index.js';
|
|
7
7
|
import { cutRange } from '../../data/data1d/Spectrum1D/ranges/createRange.js';
|
|
8
|
+
import {
|
|
9
|
+
BrushTracker,
|
|
10
|
+
detectBrushing,
|
|
11
|
+
} from '../EventsTrackers/BrushTracker.js';
|
|
8
12
|
import type {
|
|
9
13
|
BaseDetectBrushingOptions,
|
|
10
14
|
BrushTrackerData,
|
|
11
15
|
OnBrush,
|
|
12
16
|
OnClick,
|
|
13
17
|
OnZoom,
|
|
14
|
-
} from '../EventsTrackers/
|
|
15
|
-
import {
|
|
16
|
-
BrushTracker,
|
|
17
|
-
detectBrushing,
|
|
18
|
-
} from '../EventsTrackers/BrushTracker.js';
|
|
18
|
+
} from '../EventsTrackers/brush_tracker.types.ts';
|
|
19
19
|
import { useChartData } from '../context/ChartContext.js';
|
|
20
20
|
import { useDispatch } from '../context/DispatchContext.js';
|
|
21
21
|
import { useFilterSyncOptions } from '../context/FilterSyncOptionsContext.tsx';
|
|
@@ -150,10 +150,10 @@ export function BrushTracker1D({ children }: Required<PropsWithChildren>) {
|
|
|
150
150
|
brushStartRef.current = null;
|
|
151
151
|
setBrushData(brushData);
|
|
152
152
|
const brushDataInPPM = convertToPPM(brushData);
|
|
153
|
-
|
|
154
|
-
const keyModifiers = getModifiersKey(brushData);
|
|
155
|
-
|
|
156
153
|
const selectRange = sortRange(brushDataInPPM.startX, brushDataInPPM.endX);
|
|
154
|
+
const modifiers = getModifiersKey(brushData);
|
|
155
|
+
const isAltOnly = modifiers === 'shift[false]_ctrl[false]_alt[true]';
|
|
156
|
+
const isPrimary = isPrimaryKeyActivated(brushData);
|
|
157
157
|
|
|
158
158
|
if (brushData.mouseButton === 'main') {
|
|
159
159
|
const propagateEvent = () => {
|
|
@@ -165,9 +165,17 @@ export function BrushTracker1D({ children }: Required<PropsWithChildren>) {
|
|
|
165
165
|
|
|
166
166
|
let executeDefaultAction = false;
|
|
167
167
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
168
|
+
if (isAltOnly) {
|
|
169
|
+
switch (selectedTool) {
|
|
170
|
+
case options.rangePicking.id: {
|
|
171
|
+
openAnalysisModal();
|
|
172
|
+
break;
|
|
173
|
+
}
|
|
174
|
+
default:
|
|
175
|
+
executeDefaultAction = true;
|
|
176
|
+
break;
|
|
177
|
+
}
|
|
178
|
+
} else if (isPrimary) {
|
|
171
179
|
switch (selectedTool) {
|
|
172
180
|
case options.integral.id:
|
|
173
181
|
dispatch({
|
|
@@ -249,16 +257,6 @@ export function BrushTracker1D({ children }: Required<PropsWithChildren>) {
|
|
|
249
257
|
executeDefaultAction = true;
|
|
250
258
|
break;
|
|
251
259
|
}
|
|
252
|
-
} else if (keyModifiers === 'shift[true]_ctrl[false]_alt[false]') {
|
|
253
|
-
switch (selectedTool) {
|
|
254
|
-
case options.rangePicking.id: {
|
|
255
|
-
openAnalysisModal();
|
|
256
|
-
break;
|
|
257
|
-
}
|
|
258
|
-
default:
|
|
259
|
-
executeDefaultAction = true;
|
|
260
|
-
break;
|
|
261
|
-
}
|
|
262
260
|
} else {
|
|
263
261
|
executeDefaultAction = true;
|
|
264
262
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { CSSProperties } from 'react';
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
|
+
import { SVGPathBuilder } from 'react-science/ui';
|
|
3
4
|
|
|
4
5
|
import { useScaleChecked } from '../context/ScaleContext.js';
|
|
5
6
|
import useActiveSpectrumStyleOptions from '../hooks/useActiveSpectrumStyleOptions.js';
|
|
6
7
|
import useXYReduce from '../hooks/useXYReduce.js';
|
|
7
|
-
import { PathBuilder } from '../utility/PathBuilder.js';
|
|
8
8
|
import { parseColor } from '../utility/parseColor.js';
|
|
9
9
|
|
|
10
10
|
import { useInsetOptions } from './inset/InsetProvider.js';
|
|
@@ -31,7 +31,7 @@ function Line({ data, id, display, index }: LineProps) {
|
|
|
31
31
|
const _scaleX = scaleX();
|
|
32
32
|
const _scaleY = scaleY({ spectrumId: id });
|
|
33
33
|
|
|
34
|
-
const pathBuilder = new
|
|
34
|
+
const pathBuilder = new SVGPathBuilder();
|
|
35
35
|
if (data?.x && data?.y && _scaleX(0)) {
|
|
36
36
|
const pathPoints = xyReduce(data);
|
|
37
37
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ClipPathContainer } from '../1d-2d/components/ClipPathContainer.js';
|
|
2
2
|
import SpectrumInfoBlock from '../1d-2d/components/SpectrumInfoBlock.js';
|
|
3
3
|
import { ShareDataProvider } from '../context/ShareDataContext.js';
|
|
4
|
+
import useCheckExperimentalFeature from '../hooks/useCheckExperimentalFeature.ts';
|
|
4
5
|
|
|
5
6
|
import { ApodizationLine } from './ApodizationLine.js';
|
|
6
7
|
import ExclusionZonesAnnotations from './ExclusionZonesAnnotations.js';
|
|
@@ -18,11 +19,14 @@ import MultiAnalysisRanges from './multiAnalysis/MultiAnalysisRanges.js';
|
|
|
18
19
|
import MultiplicityTrees from './multiplicityTree/MultiplicityTrees.js';
|
|
19
20
|
import Peaks from './peaks/Peaks.js';
|
|
20
21
|
import PeaksShapes from './peaks/PeaksShapes.js';
|
|
22
|
+
import { PluginSVGChart } from './plugin_svg_chart.tsx';
|
|
21
23
|
import Ranges from './ranges/Ranges.js';
|
|
22
24
|
import RangesIntegrals from './ranges/RangesIntegrals.js';
|
|
23
25
|
import { Signals } from './ranges/Signals.tsx';
|
|
24
26
|
|
|
25
27
|
export function SVGContent1D() {
|
|
28
|
+
const isExperimental = useCheckExperimentalFeature();
|
|
29
|
+
|
|
26
30
|
return (
|
|
27
31
|
<g>
|
|
28
32
|
<ClipPathContainer>
|
|
@@ -47,6 +51,8 @@ export function SVGContent1D() {
|
|
|
47
51
|
<SpectrumInfoBlock />
|
|
48
52
|
|
|
49
53
|
<SimilarityTree />
|
|
54
|
+
|
|
55
|
+
{isExperimental && <PluginSVGChart />}
|
|
50
56
|
</ClipPathContainer>
|
|
51
57
|
<Signals />
|
|
52
58
|
<JGraph />
|
|
@@ -16,6 +16,7 @@ import FooterBanner from './FooterBanner.js';
|
|
|
16
16
|
import { SVGContent1D } from './SVGContent1D.js';
|
|
17
17
|
import { BaselinePreview } from './baseline/BaselinePreview.tsx';
|
|
18
18
|
import { PeakEditionProvider } from './peaks/PeakEditionManager.js';
|
|
19
|
+
import { PluginChartBrushTracker } from './plugin_chart_brush_tracker.tsx';
|
|
19
20
|
import BaseLine from './tool/BaseLine.js';
|
|
20
21
|
import PeakPointer from './tool/PeakPointer.js';
|
|
21
22
|
import { PivotIndicator1D } from './tool/PivotIndicator1D.js';
|
|
@@ -61,6 +62,7 @@ function InnerViewer1D(props: InnerViewer1DProps) {
|
|
|
61
62
|
</PeakEditionProvider>
|
|
62
63
|
<BaseLine />
|
|
63
64
|
<PivotIndicator1D />
|
|
65
|
+
<PluginChartBrushTracker />
|
|
64
66
|
</MouseTracker>
|
|
65
67
|
</BrushTracker1D>
|
|
66
68
|
)}
|
|
@@ -4,6 +4,7 @@ import type { Spectrum1D } from '@zakodium/nmrium-core';
|
|
|
4
4
|
import { isSpectrum1D } from '@zakodium/nmrium-core';
|
|
5
5
|
import { xyBaselineCalculation } from 'nmr-processing';
|
|
6
6
|
import { useMemo, useRef, useState } from 'react';
|
|
7
|
+
import { SVGPathBuilder } from 'react-science/ui';
|
|
7
8
|
|
|
8
9
|
import { useChartData } from '../../context/ChartContext.tsx';
|
|
9
10
|
import { useFilterSyncOptions } from '../../context/FilterSyncOptionsContext.tsx';
|
|
@@ -18,7 +19,6 @@ import {
|
|
|
18
19
|
DEFAULT_BASELINE_ALGORITHM,
|
|
19
20
|
getBaselineValues,
|
|
20
21
|
} from '../../panels/filtersPanel/Filters/hooks/useBaselineCorrection.tsx';
|
|
21
|
-
import { PathBuilder } from '../../utility/PathBuilder.ts';
|
|
22
22
|
|
|
23
23
|
import { getMedianWindow } from './getMedianWindow.ts';
|
|
24
24
|
import { getMedianY } from './getMedianY.ts';
|
|
@@ -227,7 +227,7 @@ function SpectrumPreview({ spectrum, anchors }: SpectrumPreviewProps) {
|
|
|
227
227
|
const _scaleX = scaleX();
|
|
228
228
|
const _scaleY = scaleY({ spectrumId: activeSpectrum?.id });
|
|
229
229
|
|
|
230
|
-
const pathBuilder = new
|
|
230
|
+
const pathBuilder = new SVGPathBuilder();
|
|
231
231
|
|
|
232
232
|
if (!x || !y || !_scaleX(0)) return '';
|
|
233
233
|
|
|
@@ -2,6 +2,7 @@ import type { Spectrum1D } from '@zakodium/nmrium-core';
|
|
|
2
2
|
import { extent } from 'd3-array';
|
|
3
3
|
import throttle from 'lodash/throttle.js';
|
|
4
4
|
import { useCallback, useContext, useEffect, useRef, useState } from 'react';
|
|
5
|
+
import { SVGPathBuilder } from 'react-science/ui';
|
|
5
6
|
|
|
6
7
|
import { useChartData } from '../../context/ChartContext.js';
|
|
7
8
|
import { useCore } from '../../context/CoreContext.js';
|
|
@@ -13,7 +14,6 @@ import {
|
|
|
13
14
|
} from '../../highlight/index.js';
|
|
14
15
|
import { usePanelPreferences } from '../../hooks/usePanelPreferences.js';
|
|
15
16
|
import { spinnerContext } from '../../loader/SpinnerContext.js';
|
|
16
|
-
import { PathBuilder } from '../../utility/PathBuilder.js';
|
|
17
17
|
import { getYScaleWithRation } from '../utilities/scale.js';
|
|
18
18
|
|
|
19
19
|
function DatabaseSpectrum() {
|
|
@@ -61,7 +61,7 @@ function DatabaseSpectrum() {
|
|
|
61
61
|
setLoading(false);
|
|
62
62
|
const spectrum = data?.spectra?.[0] || null;
|
|
63
63
|
if (spectrum) {
|
|
64
|
-
const pathBuilder = new
|
|
64
|
+
const pathBuilder = new SVGPathBuilder();
|
|
65
65
|
const { x, re: y } = (spectrum as Spectrum1D).data;
|
|
66
66
|
const yDomain = extent(y) as number[];
|
|
67
67
|
const finalScaleX = scaleX();
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Spectrum1D } from '@zakodium/nmrium-core';
|
|
2
2
|
import { extent } from 'd3-array';
|
|
3
3
|
import { rangesToXY } from 'nmr-processing';
|
|
4
|
+
import { SVGPathBuilder } from 'react-science/ui';
|
|
4
5
|
|
|
5
6
|
import { useChartData } from '../../context/ChartContext.js';
|
|
6
7
|
import { useScaleChecked } from '../../context/ScaleContext.js';
|
|
@@ -11,7 +12,6 @@ import {
|
|
|
11
12
|
import { usePanelPreferences } from '../../hooks/usePanelPreferences.js';
|
|
12
13
|
import useSpectrum from '../../hooks/useSpectrum.js';
|
|
13
14
|
import { useVerticalAlign } from '../../hooks/useVerticalAlign.js';
|
|
14
|
-
import { PathBuilder } from '../../utility/PathBuilder.js';
|
|
15
15
|
import { getYScale } from '../utilities/scale.js';
|
|
16
16
|
|
|
17
17
|
const emptyData = { info: { originFrequency: 400 } };
|
|
@@ -71,7 +71,7 @@ function ResurrectedDatabaseRanges() {
|
|
|
71
71
|
const finalScaleX = scaleX();
|
|
72
72
|
|
|
73
73
|
const paths = spectra.map(({ data: { x, y }, from, to }) => {
|
|
74
|
-
const pathBuilder = new
|
|
74
|
+
const pathBuilder = new SVGPathBuilder();
|
|
75
75
|
pathBuilder.moveTo(finalScaleX(x[0]), scaleY(y[0]));
|
|
76
76
|
for (let i = 1; i < x.length; i++) {
|
|
77
77
|
pathBuilder.lineTo(finalScaleX(x[i]), scaleY(y[i]));
|
|
@@ -4,12 +4,12 @@ import { xFindClosestIndex } from 'ml-spectra-processing';
|
|
|
4
4
|
import { matrixToBoxPlot } from 'nmr-processing';
|
|
5
5
|
import type { CSSProperties } from 'react';
|
|
6
6
|
import { useMemo } from 'react';
|
|
7
|
+
import { SVGPathBuilder } from 'react-science/ui';
|
|
7
8
|
|
|
8
9
|
import { useChartData } from '../../context/ChartContext.js';
|
|
9
10
|
import { useScaleChecked } from '../../context/ScaleContext.js';
|
|
10
11
|
import { useActiveNucleusTab } from '../../hooks/useActiveNucleusTab.js';
|
|
11
12
|
import { usePanelPreferences } from '../../hooks/usePanelPreferences.js';
|
|
12
|
-
import { PathBuilder } from '../../utility/PathBuilder.js';
|
|
13
13
|
import { getYScaleWithRation } from '../utilities/scale.js';
|
|
14
14
|
|
|
15
15
|
import { sliceArrayForDomain, useMatrix } from './useMatrix.js';
|
|
@@ -64,7 +64,7 @@ function usePath(
|
|
|
64
64
|
const { scaleX } = useScaleChecked();
|
|
65
65
|
const scaleY = useYScale(scaleRatio, yDomain);
|
|
66
66
|
|
|
67
|
-
const pathBuilder = new
|
|
67
|
+
const pathBuilder = new SVGPathBuilder();
|
|
68
68
|
|
|
69
69
|
const xScaler = scaleX();
|
|
70
70
|
|
|
@@ -83,8 +83,8 @@ function useAreaPath(
|
|
|
83
83
|
const { scaleX } = useScaleChecked();
|
|
84
84
|
const scaleY = useYScale(scaleRatio, yDomain);
|
|
85
85
|
|
|
86
|
-
const pathBuilder = new
|
|
87
|
-
const pathBuilder2 = new
|
|
86
|
+
const pathBuilder = new SVGPathBuilder();
|
|
87
|
+
const pathBuilder2 = new SVGPathBuilder();
|
|
88
88
|
|
|
89
89
|
const xScaler = scaleX();
|
|
90
90
|
|
|
@@ -97,7 +97,7 @@ function useAreaPath(
|
|
|
97
97
|
pathBuilder2.lineTo(xScaler(pathPoints.x[i]), scaleY(pathPoints.y2[i]));
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
return
|
|
100
|
+
return SVGPathBuilder.concat(pathBuilder, pathBuilder2).toString();
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
function useBoxPlot() {
|
|
@@ -2,12 +2,12 @@ import { extent } from 'd3-array';
|
|
|
2
2
|
import { xFindClosestIndex } from 'ml-spectra-processing';
|
|
3
3
|
import { matrixToStocsy } from 'nmr-processing';
|
|
4
4
|
import { useMemo } from 'react';
|
|
5
|
+
import { SVGPathBuilder } from 'react-science/ui';
|
|
5
6
|
|
|
6
7
|
import { useChartData } from '../../context/ChartContext.js';
|
|
7
8
|
import { useScaleChecked } from '../../context/ScaleContext.js';
|
|
8
9
|
import { useActiveNucleusTab } from '../../hooks/useActiveNucleusTab.js';
|
|
9
10
|
import { usePanelPreferences } from '../../hooks/usePanelPreferences.js';
|
|
10
|
-
import { PathBuilder } from '../../utility/PathBuilder.js';
|
|
11
11
|
import { getYScaleWithRation } from '../utilities/scale.js';
|
|
12
12
|
|
|
13
13
|
import {
|
|
@@ -162,7 +162,7 @@ function RenderStocsyAsSVG(props: StocsyProps) {
|
|
|
162
162
|
|
|
163
163
|
return Object.keys(colorGroups).map((color) => {
|
|
164
164
|
const points = colorGroups[color];
|
|
165
|
-
const pathBuilder = new
|
|
165
|
+
const pathBuilder = new SVGPathBuilder();
|
|
166
166
|
|
|
167
167
|
pathBuilder.moveTo(xScaler(points[0].x), scaleY(points[0].y));
|
|
168
168
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { memo, useState } from 'react';
|
|
1
|
+
import { memo, useCallback, useRef, useState } from 'react';
|
|
2
2
|
import { useResizeObserver } from 'react-d3-utils';
|
|
3
3
|
import { BsArrowsMove } from 'react-icons/bs';
|
|
4
4
|
|
|
@@ -81,7 +81,18 @@ function PeakAnnotationsSpreadMode(props: PeakAnnotationsSpreadModeProps) {
|
|
|
81
81
|
spectrumKey,
|
|
82
82
|
} = props;
|
|
83
83
|
|
|
84
|
-
const [
|
|
84
|
+
const [resizeRef, { height: boxSizeHeight } = { height: 0 }] =
|
|
85
|
+
useResizeObserver();
|
|
86
|
+
const labelGroupRef = useRef<SVGGElement | null>(null);
|
|
87
|
+
const ref = useCallback(
|
|
88
|
+
(node: SVGGElement | null) => {
|
|
89
|
+
// Keep a direct SVG node ref for getBBox (SVG unit measurement).
|
|
90
|
+
labelGroupRef.current = node;
|
|
91
|
+
// ResizeObserver is used as a re-render trigger when geometry changes.
|
|
92
|
+
resizeRef(node);
|
|
93
|
+
},
|
|
94
|
+
[resizeRef],
|
|
95
|
+
);
|
|
85
96
|
const { marginTop, isDragActive, onPointerDown } = usePeaksPosition();
|
|
86
97
|
|
|
87
98
|
const actionsButtons: ActionsButtonsPopoverProps['buttons'] = [
|
|
@@ -104,7 +115,9 @@ function PeakAnnotationsSpreadMode(props: PeakAnnotationsSpreadModeProps) {
|
|
|
104
115
|
groupMargin: 10,
|
|
105
116
|
});
|
|
106
117
|
|
|
107
|
-
|
|
118
|
+
// getBBox is stable across export/view contexts because it returns SVG-space size.
|
|
119
|
+
const bboxHeight = labelGroupRef.current?.getBBox().height ?? 0;
|
|
120
|
+
const roundedBoxHeight = Math.max(0, Math.round(bboxHeight));
|
|
108
121
|
|
|
109
122
|
let y = roundedBoxHeight + marginTop;
|
|
110
123
|
|
|
@@ -115,6 +128,7 @@ function PeakAnnotationsSpreadMode(props: PeakAnnotationsSpreadModeProps) {
|
|
|
115
128
|
if (marginTop < 0) {
|
|
116
129
|
y = roundedBoxHeight;
|
|
117
130
|
}
|
|
131
|
+
|
|
118
132
|
return (
|
|
119
133
|
<ActionsButtonsPopover
|
|
120
134
|
targetTagName="g"
|
|
@@ -2,10 +2,10 @@ import type { Peak1D } from '@zakodium/nmr-types';
|
|
|
2
2
|
import type { Spectrum1D } from '@zakodium/nmrium-core';
|
|
3
3
|
import type { DataXY } from 'cheminfo-types';
|
|
4
4
|
import { peakToXY, peaksToXY } from 'nmr-processing';
|
|
5
|
+
import { SVGPathBuilder } from 'react-science/ui';
|
|
5
6
|
|
|
6
7
|
import { useChartData } from '../../context/ChartContext.js';
|
|
7
8
|
import { useScaleChecked } from '../../context/ScaleContext.js';
|
|
8
|
-
import { PathBuilder } from '../../utility/PathBuilder.js';
|
|
9
9
|
|
|
10
10
|
type PeaksShapesOptions =
|
|
11
11
|
| {
|
|
@@ -56,7 +56,7 @@ export function usePeakShapesPath(spectrum: Spectrum1D) {
|
|
|
56
56
|
const _scaleX = scaleX();
|
|
57
57
|
const _scaleY = scaleY({ spectrumId: spectrum.id });
|
|
58
58
|
|
|
59
|
-
const pathBuilder = new
|
|
59
|
+
const pathBuilder = new SVGPathBuilder();
|
|
60
60
|
let fill = 'transparent';
|
|
61
61
|
|
|
62
62
|
if (pathSeries) {
|
|
@@ -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);
|
|
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
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
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 { useIndicatorLineColor } from '../hooks/useIndicatorLineColor.ts';
|
|
7
|
+
import { useStableSpectrum } from '../hooks/useSpectrum.ts';
|
|
8
|
+
import { useVerticalAlign } from '../hooks/useVerticalAlign.ts';
|
|
9
|
+
import { useLiveOperation } from '../panels/filtersPanel/processings/use_live_operation.ts';
|
|
10
|
+
import { CoreOperatorChartSVG } from '../utility/core_slots/core_operator_chart_svg.tsx';
|
|
11
|
+
|
|
12
|
+
import { getYScale } from './utilities/scale.ts';
|
|
13
|
+
|
|
14
|
+
export function PluginSVGChart() {
|
|
15
|
+
const core = useCore();
|
|
16
|
+
const spectrum = useStableSpectrum();
|
|
17
|
+
const { height, width, margin } = useChartData();
|
|
18
|
+
const [liveOperation] = useLiveOperation();
|
|
19
|
+
const { scaleX: scaleXBuilder } = useScaleChecked();
|
|
20
|
+
const indicatorLineColor = useIndicatorLineColor();
|
|
21
|
+
|
|
22
|
+
const scaleX = useMemo(() => scaleXBuilder(), [scaleXBuilder]);
|
|
23
|
+
const scaleY = useWindowYScale();
|
|
24
|
+
|
|
25
|
+
if (!liveOperation) return null;
|
|
26
|
+
if (!spectrum) return null;
|
|
27
|
+
|
|
28
|
+
const operatorUI = core.slotOperator(liveOperation.operatorId);
|
|
29
|
+
if (!operatorUI) return null;
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<CoreOperatorChartSVG
|
|
33
|
+
core={core}
|
|
34
|
+
operatorUI={operatorUI}
|
|
35
|
+
spectrum={spectrum}
|
|
36
|
+
operation={liveOperation}
|
|
37
|
+
height={height}
|
|
38
|
+
width={width}
|
|
39
|
+
margin={margin}
|
|
40
|
+
scaleX={scaleX}
|
|
41
|
+
scaleY={scaleY}
|
|
42
|
+
indicatorLineColor={indicatorLineColor}
|
|
43
|
+
/>
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function useWindowYScale() {
|
|
48
|
+
const { spectraBottomMargin } = useScaleChecked();
|
|
49
|
+
const { height, margin, yDomains } = useChartData();
|
|
50
|
+
const verticalAlign = useVerticalAlign();
|
|
51
|
+
|
|
52
|
+
return getYScale({
|
|
53
|
+
height,
|
|
54
|
+
margin,
|
|
55
|
+
verticalAlign,
|
|
56
|
+
yDomain: [0, 1],
|
|
57
|
+
yDomains,
|
|
58
|
+
spectraBottomMargin,
|
|
59
|
+
});
|
|
60
|
+
}
|