react-cheminfo 0.69.0 → 0.71.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/README.md +70 -2
- package/lib/about/core/providers.d.ts +6 -0
- package/lib/about/core/providers.d.ts.map +1 -1
- package/lib/about/core/providers.js +7 -0
- package/lib/about/core/providers.js.map +1 -1
- package/lib/about/ui/AboutProvidedBy.js +34 -0
- package/lib/about/ui/AboutProvidedBy.js.map +1 -1
- package/lib/chart/ui/useChartPointer.d.ts +9 -1
- package/lib/chart/ui/useChartPointer.d.ts.map +1 -1
- package/lib/chart/ui/useChartPointer.js +11 -3
- package/lib/chart/ui/useChartPointer.js.map +1 -1
- package/lib/credits/core/credits.d.ts +41 -0
- package/lib/credits/core/credits.d.ts.map +1 -1
- package/lib/credits/core/credits.js +50 -0
- package/lib/credits/core/credits.js.map +1 -1
- package/lib/download/core/drawingMarkup.d.ts +8 -1
- package/lib/download/core/drawingMarkup.d.ts.map +1 -1
- package/lib/download/core/drawingMarkup.js +13 -1
- package/lib/download/core/drawingMarkup.js.map +1 -1
- package/lib/download/core/figurePng.d.ts +14 -0
- package/lib/download/core/figurePng.d.ts.map +1 -1
- package/lib/download/core/figurePng.js +21 -6
- package/lib/download/core/figurePng.js.map +1 -1
- package/lib/download/core/figureSvg.d.ts.map +1 -1
- package/lib/download/core/figureSvg.js +5 -3
- package/lib/download/core/figureSvg.js.map +1 -1
- package/lib/download/core/figureTarget.d.ts +13 -0
- package/lib/download/core/figureTarget.d.ts.map +1 -1
- package/lib/download/core/figureTarget.js +25 -5
- package/lib/download/core/figureTarget.js.map +1 -1
- package/lib/download/core/svgBounds.d.ts +15 -0
- package/lib/download/core/svgBounds.d.ts.map +1 -1
- package/lib/download/core/svgBounds.js +20 -0
- package/lib/download/core/svgBounds.js.map +1 -1
- package/lib/download/core/svgToPng.d.ts.map +1 -1
- package/lib/download/core/svgToPng.js +4 -2
- package/lib/download/core/svgToPng.js.map +1 -1
- package/lib/format/core/relativeTime.d.ts +8 -3
- package/lib/format/core/relativeTime.d.ts.map +1 -1
- package/lib/format/core/relativeTime.js +19 -7
- package/lib/format/core/relativeTime.js.map +1 -1
- package/lib/host/core/connectHost.d.ts +25 -34
- package/lib/host/core/connectHost.d.ts.map +1 -1
- package/lib/host/core/connectHost.js +43 -89
- package/lib/host/core/connectHost.js.map +1 -1
- package/lib/host/core/hostOutputs.d.ts +58 -0
- package/lib/host/core/hostOutputs.d.ts.map +1 -0
- package/lib/host/core/hostOutputs.js +151 -0
- package/lib/host/core/hostOutputs.js.map +1 -0
- package/lib/host/core/index.d.ts +9 -3
- package/lib/host/core/index.d.ts.map +1 -1
- package/lib/host/core/index.js +4 -1
- package/lib/host/core/index.js.map +1 -1
- package/lib/host/core/irKinds.d.ts +124 -0
- package/lib/host/core/irKinds.d.ts.map +1 -0
- package/lib/host/core/irKinds.js +46 -0
- package/lib/host/core/irKinds.js.map +1 -0
- package/lib/host/core/kinds.d.ts +13 -5
- package/lib/host/core/kinds.d.ts.map +1 -1
- package/lib/host/core/kinds.js +11 -5
- package/lib/host/core/kinds.js.map +1 -1
- package/lib/host/core/protocol.d.ts +50 -7
- package/lib/host/core/protocol.d.ts.map +1 -1
- package/lib/host/core/protocol.js +10 -6
- package/lib/host/core/protocol.js.map +1 -1
- package/lib/host/core/selectInputs.d.ts +37 -0
- package/lib/host/core/selectInputs.d.ts.map +1 -0
- package/lib/host/core/selectInputs.js +110 -0
- package/lib/host/core/selectInputs.js.map +1 -0
- package/lib/host/testing/sciPeaks.d.ts +31 -0
- package/lib/host/testing/sciPeaks.d.ts.map +1 -1
- package/lib/host/testing/sciPeaks.js +73 -0
- package/lib/host/testing/sciPeaks.js.map +1 -1
- package/lib/host/testing/standInHost.d.ts +9 -1
- package/lib/host/testing/standInHost.d.ts.map +1 -1
- package/lib/host/testing/standInHost.js +19 -1
- package/lib/host/testing/standInHost.js.map +1 -1
- package/lib/host/ui/useHostConnection.d.ts +13 -5
- package/lib/host/ui/useHostConnection.d.ts.map +1 -1
- package/lib/host/ui/useHostConnection.js +4 -3
- package/lib/host/ui/useHostConnection.js.map +1 -1
- package/lib/host-testing.d.ts +2 -2
- package/lib/host-testing.d.ts.map +1 -1
- package/lib/host-testing.js +2 -2
- package/lib/host-testing.js.map +1 -1
- package/lib/i18n/core/chromeCatalog.d.ts +1 -1
- package/lib/i18n/core/chromeCatalog.d.ts.map +1 -1
- package/lib/ir/core/handPicking.d.ts +58 -0
- package/lib/ir/core/handPicking.d.ts.map +1 -0
- package/lib/ir/core/handPicking.js +130 -0
- package/lib/ir/core/handPicking.js.map +1 -0
- package/lib/ir/core/index.d.ts +3 -0
- package/lib/ir/core/index.d.ts.map +1 -1
- package/lib/ir/core/index.js +3 -0
- package/lib/ir/core/index.js.map +1 -1
- package/lib/ir/core/irBandState.d.ts +57 -0
- package/lib/ir/core/irBandState.d.ts.map +1 -0
- package/lib/ir/core/irBandState.js +119 -0
- package/lib/ir/core/irBandState.js.map +1 -0
- package/lib/ir/core/irCommands.d.ts +11 -0
- package/lib/ir/core/irCommands.d.ts.map +1 -1
- package/lib/ir/core/irCommands.js +6 -0
- package/lib/ir/core/irCommands.js.map +1 -1
- package/lib/ir/core/irPeaks.d.ts +28 -0
- package/lib/ir/core/irPeaks.d.ts.map +1 -0
- package/lib/ir/core/irPeaks.js +66 -0
- package/lib/ir/core/irPeaks.js.map +1 -0
- package/lib/ir/core/irReducer.d.ts +8 -0
- package/lib/ir/core/irReducer.d.ts.map +1 -1
- package/lib/ir/core/irReducer.js +15 -32
- package/lib/ir/core/irReducer.js.map +1 -1
- package/lib/ir/core/irSpectrum.d.ts +15 -0
- package/lib/ir/core/irSpectrum.d.ts.map +1 -1
- package/lib/ir/core/irSpectrum.js.map +1 -1
- package/lib/ir/core/irState.d.ts +9 -6
- package/lib/ir/core/irState.d.ts.map +1 -1
- package/lib/ir/core/irState.js +10 -6
- package/lib/ir/core/irState.js.map +1 -1
- package/lib/ir/core/pickBands.d.ts +14 -0
- package/lib/ir/core/pickBands.d.ts.map +1 -1
- package/lib/ir/core/pickBands.js +39 -33
- package/lib/ir/core/pickBands.js.map +1 -1
- package/lib/ir/core/ramanBands.d.ts +9 -1
- package/lib/ir/core/ramanBands.d.ts.map +1 -1
- package/lib/ir/core/ramanBands.js +2 -2
- package/lib/ir/core/ramanBands.js.map +1 -1
- package/lib/ir/core/spectrumBands.d.ts +46 -0
- package/lib/ir/core/spectrumBands.d.ts.map +1 -0
- package/lib/ir/core/spectrumBands.js +98 -0
- package/lib/ir/core/spectrumBands.js.map +1 -0
- package/lib/ir/ui/BandRow.d.ts +5 -0
- package/lib/ir/ui/BandRow.d.ts.map +1 -1
- package/lib/ir/ui/BandRow.js +4 -3
- package/lib/ir/ui/BandRow.js.map +1 -1
- package/lib/ir/ui/BandsPanel.d.ts +5 -0
- package/lib/ir/ui/BandsPanel.d.ts.map +1 -1
- package/lib/ir/ui/BandsPanel.js +36 -16
- package/lib/ir/ui/BandsPanel.js.map +1 -1
- package/lib/ir/ui/BandsToolbar.d.ts +9 -0
- package/lib/ir/ui/BandsToolbar.d.ts.map +1 -0
- package/lib/ir/ui/BandsToolbar.js +61 -0
- package/lib/ir/ui/BandsToolbar.js.map +1 -0
- package/lib/ir/ui/IrCanvas.d.ts +2 -1
- package/lib/ir/ui/IrCanvas.d.ts.map +1 -1
- package/lib/ir/ui/IrCanvas.js +19 -5
- package/lib/ir/ui/IrCanvas.js.map +1 -1
- package/lib/ir/ui/IrChart.d.ts.map +1 -1
- package/lib/ir/ui/IrChart.js +8 -1
- package/lib/ir/ui/IrChart.js.map +1 -1
- package/lib/ir/ui/IrDocumentationDialog.js +1 -1
- package/lib/ir/ui/IrDocumentationDialog.js.map +1 -1
- package/lib/ir/ui/IrEditor.d.ts +4 -2
- package/lib/ir/ui/IrEditor.d.ts.map +1 -1
- package/lib/ir/ui/IrEditor.js.map +1 -1
- package/lib/ir/ui/IrShell.d.ts.map +1 -1
- package/lib/ir/ui/IrShell.js +6 -0
- package/lib/ir/ui/IrShell.js.map +1 -1
- package/lib/ir/ui/IrStatusBar.d.ts.map +1 -1
- package/lib/ir/ui/IrStatusBar.js +1 -1
- package/lib/ir/ui/IrStatusBar.js.map +1 -1
- package/lib/ir/ui/IrToolbar.d.ts +4 -3
- package/lib/ir/ui/IrToolbar.d.ts.map +1 -1
- package/lib/ir/ui/IrToolbar.js +5 -4
- package/lib/ir/ui/IrToolbar.js.map +1 -1
- package/lib/ir/ui/VibrationalEditor.d.ts +2 -1
- package/lib/ir/ui/VibrationalEditor.d.ts.map +1 -1
- package/lib/ir/ui/VibrationalEditor.js.map +1 -1
- package/lib/ir/ui/irActions.d.ts +5 -0
- package/lib/ir/ui/irActions.d.ts.map +1 -1
- package/lib/ir/ui/irActions.js +6 -0
- package/lib/ir/ui/irActions.js.map +1 -1
- package/lib/ir/ui/irChartProps.d.ts +4 -1
- package/lib/ir/ui/irChartProps.d.ts.map +1 -1
- package/lib/ir/ui/useIrEditor.d.ts +5 -11
- package/lib/ir/ui/useIrEditor.d.ts.map +1 -1
- package/lib/ir/ui/useIrEditor.js +17 -18
- package/lib/ir/ui/useIrEditor.js.map +1 -1
- package/lib/locales/de.json +63 -0
- package/lib/locales/en.json +63 -0
- package/lib/locales/es.json +63 -0
- package/lib/locales/fr.json +63 -0
- package/lib/locales/it.json +63 -0
- package/lib/mass/core/analyseSpectrum.d.ts +85 -0
- package/lib/mass/core/analyseSpectrum.d.ts.map +1 -0
- package/lib/mass/core/analyseSpectrum.js +101 -0
- package/lib/mass/core/analyseSpectrum.js.map +1 -0
- package/lib/mass/core/ascendingTrace.d.ts +24 -0
- package/lib/mass/core/ascendingTrace.d.ts.map +1 -0
- package/lib/mass/core/ascendingTrace.js +57 -0
- package/lib/mass/core/ascendingTrace.js.map +1 -0
- package/lib/mass/core/centroidPeaks.d.ts +77 -0
- package/lib/mass/core/centroidPeaks.d.ts.map +1 -0
- package/lib/mass/core/centroidPeaks.js +62 -0
- package/lib/mass/core/centroidPeaks.js.map +1 -0
- package/lib/mass/core/detectMassFormat.d.ts +24 -0
- package/lib/mass/core/detectMassFormat.d.ts.map +1 -0
- package/lib/mass/core/detectMassFormat.js +105 -0
- package/lib/mass/core/detectMassFormat.js.map +1 -0
- package/lib/mass/core/downloadSpectra.d.ts +24 -0
- package/lib/mass/core/downloadSpectra.d.ts.map +1 -0
- package/lib/mass/core/downloadSpectra.js +35 -0
- package/lib/mass/core/downloadSpectra.js.map +1 -0
- package/lib/mass/core/fromJcamp.d.ts +46 -0
- package/lib/mass/core/fromJcamp.d.ts.map +1 -0
- package/lib/mass/core/fromJcamp.js +123 -0
- package/lib/mass/core/fromJcamp.js.map +1 -0
- package/lib/mass/core/fromText.d.ts +30 -0
- package/lib/mass/core/fromText.d.ts.map +1 -0
- package/lib/mass/core/fromText.js +39 -0
- package/lib/mass/core/fromText.js.map +1 -0
- package/lib/mass/core/index.d.ts +70 -0
- package/lib/mass/core/index.d.ts.map +1 -0
- package/lib/mass/core/index.js +42 -0
- package/lib/mass/core/index.js.map +1 -0
- package/lib/mass/core/jcampTechnique.d.ts +38 -0
- package/lib/mass/core/jcampTechnique.d.ts.map +1 -0
- package/lib/mass/core/jcampTechnique.js +70 -0
- package/lib/mass/core/jcampTechnique.js.map +1 -0
- package/lib/mass/core/labelStackBox.d.ts +49 -0
- package/lib/mass/core/labelStackBox.d.ts.map +1 -0
- package/lib/mass/core/labelStackBox.js +44 -0
- package/lib/mass/core/labelStackBox.js.map +1 -0
- package/lib/mass/core/labelledPeaks.d.ts +79 -0
- package/lib/mass/core/labelledPeaks.d.ts.map +1 -0
- package/lib/mass/core/labelledPeaks.js +74 -0
- package/lib/mass/core/labelledPeaks.js.map +1 -0
- package/lib/mass/core/loadMassSpectra.d.ts +57 -0
- package/lib/mass/core/loadMassSpectra.d.ts.map +1 -0
- package/lib/mass/core/loadMassSpectra.js +45 -0
- package/lib/mass/core/loadMassSpectra.js.map +1 -0
- package/lib/mass/core/loadedMassSpectrum.d.ts +42 -0
- package/lib/mass/core/loadedMassSpectrum.d.ts.map +1 -0
- package/lib/mass/core/loadedMassSpectrum.js +15 -0
- package/lib/mass/core/loadedMassSpectrum.js.map +1 -0
- package/lib/mass/core/massCommands.d.ts +170 -0
- package/lib/mass/core/massCommands.d.ts.map +1 -0
- package/lib/mass/core/massCommands.js +95 -0
- package/lib/mass/core/massCommands.js.map +1 -0
- package/lib/mass/core/massDomain.d.ts +121 -0
- package/lib/mass/core/massDomain.d.ts.map +1 -0
- package/lib/mass/core/massDomain.js +179 -0
- package/lib/mass/core/massDomain.js.map +1 -0
- package/lib/mass/core/massEditorApi.d.ts +65 -0
- package/lib/mass/core/massEditorApi.d.ts.map +1 -0
- package/lib/mass/core/massEditorApi.js +10 -0
- package/lib/mass/core/massEditorApi.js.map +1 -0
- package/lib/mass/core/massFormat.d.ts +78 -0
- package/lib/mass/core/massFormat.d.ts.map +1 -0
- package/lib/mass/core/massFormat.js +168 -0
- package/lib/mass/core/massFormat.js.map +1 -0
- package/lib/mass/core/massMeta.d.ts +85 -0
- package/lib/mass/core/massMeta.d.ts.map +1 -0
- package/lib/mass/core/massMeta.js +182 -0
- package/lib/mass/core/massMeta.js.map +1 -0
- package/lib/mass/core/massReducer.d.ts +82 -0
- package/lib/mass/core/massReducer.d.ts.map +1 -0
- package/lib/mass/core/massReducer.js +163 -0
- package/lib/mass/core/massReducer.js.map +1 -0
- package/lib/mass/core/massResolution.d.ts +92 -0
- package/lib/mass/core/massResolution.d.ts.map +1 -0
- package/lib/mass/core/massResolution.js +126 -0
- package/lib/mass/core/massResolution.js.map +1 -0
- package/lib/mass/core/massSidePanels.d.ts +28 -0
- package/lib/mass/core/massSidePanels.d.ts.map +1 -0
- package/lib/mass/core/massSidePanels.js +12 -0
- package/lib/mass/core/massSidePanels.js.map +1 -0
- package/lib/mass/core/massSpectrum.d.ts +206 -0
- package/lib/mass/core/massSpectrum.d.ts.map +1 -0
- package/lib/mass/core/massSpectrum.js +41 -0
- package/lib/mass/core/massSpectrum.js.map +1 -0
- package/lib/mass/core/massState.d.ts +145 -0
- package/lib/mass/core/massState.d.ts.map +1 -0
- package/lib/mass/core/massState.js +102 -0
- package/lib/mass/core/massState.js.map +1 -0
- package/lib/mass/core/massStateEdits.d.ts +51 -0
- package/lib/mass/core/massStateEdits.d.ts.map +1 -0
- package/lib/mass/core/massStateEdits.js +90 -0
- package/lib/mass/core/massStateEdits.js.map +1 -0
- package/lib/mass/core/massSummary.d.ts +77 -0
- package/lib/mass/core/massSummary.d.ts.map +1 -0
- package/lib/mass/core/massSummary.js +174 -0
- package/lib/mass/core/massSummary.js.map +1 -0
- package/lib/mass/core/mzDecimalsSetting.d.ts +36 -0
- package/lib/mass/core/mzDecimalsSetting.d.ts.map +1 -0
- package/lib/mass/core/mzDecimalsSetting.js +42 -0
- package/lib/mass/core/mzDecimalsSetting.js.map +1 -0
- package/lib/mass/core/nearestPeak.d.ts +75 -0
- package/lib/mass/core/nearestPeak.d.ts.map +1 -0
- package/lib/mass/core/nearestPeak.js +99 -0
- package/lib/mass/core/nearestPeak.js.map +1 -0
- package/lib/mass/core/peakLabelLines.d.ts +77 -0
- package/lib/mass/core/peakLabelLines.d.ts.map +1 -0
- package/lib/mass/core/peakLabelLines.js +54 -0
- package/lib/mass/core/peakLabelLines.js.map +1 -0
- package/lib/mass/core/peakLabelPlan.d.ts +109 -0
- package/lib/mass/core/peakLabelPlan.d.ts.map +1 -0
- package/lib/mass/core/peakLabelPlan.js +143 -0
- package/lib/mass/core/peakLabelPlan.js.map +1 -0
- package/lib/mass/core/peakTable.d.ts +54 -0
- package/lib/mass/core/peakTable.d.ts.map +1 -0
- package/lib/mass/core/peakTable.js +53 -0
- package/lib/mass/core/peakTable.js.map +1 -0
- package/lib/mass/core/resolutionOf.d.ts +60 -0
- package/lib/mass/core/resolutionOf.d.ts.map +1 -0
- package/lib/mass/core/resolutionOf.js +84 -0
- package/lib/mass/core/resolutionOf.js.map +1 -0
- package/lib/mass/core/scanFilter.d.ts +25 -0
- package/lib/mass/core/scanFilter.d.ts.map +1 -0
- package/lib/mass/core/scanFilter.js +107 -0
- package/lib/mass/core/scanFilter.js.map +1 -0
- package/lib/mass/core/spectrumJcamp.d.ts +47 -0
- package/lib/mass/core/spectrumJcamp.d.ts.map +1 -0
- package/lib/mass/core/spectrumJcamp.js +167 -0
- package/lib/mass/core/spectrumJcamp.js.map +1 -0
- package/lib/mass/core/toMassSpectrum.d.ts +67 -0
- package/lib/mass/core/toMassSpectrum.d.ts.map +1 -0
- package/lib/mass/core/toMassSpectrum.js +78 -0
- package/lib/mass/core/toMassSpectrum.js.map +1 -0
- package/lib/mass/core/traceIcon.d.ts +82 -0
- package/lib/mass/core/traceIcon.d.ts.map +1 -0
- package/lib/mass/core/traceIcon.js +66 -0
- package/lib/mass/core/traceIcon.js.map +1 -0
- package/lib/mass/core/writtenResolution.d.ts +40 -0
- package/lib/mass/core/writtenResolution.d.ts.map +1 -0
- package/lib/mass/core/writtenResolution.js +77 -0
- package/lib/mass/core/writtenResolution.js.map +1 -0
- package/lib/mass/ui/MassAboutDialog.d.ts +16 -0
- package/lib/mass/ui/MassAboutDialog.d.ts.map +1 -0
- package/lib/mass/ui/MassAboutDialog.js +44 -0
- package/lib/mass/ui/MassAboutDialog.js.map +1 -0
- package/lib/mass/ui/MassCanvas.d.ts +46 -0
- package/lib/mass/ui/MassCanvas.d.ts.map +1 -0
- package/lib/mass/ui/MassCanvas.js +84 -0
- package/lib/mass/ui/MassCanvas.js.map +1 -0
- package/lib/mass/ui/MassChart.d.ts +21 -0
- package/lib/mass/ui/MassChart.d.ts.map +1 -0
- package/lib/mass/ui/MassChart.js +139 -0
- package/lib/mass/ui/MassChart.js.map +1 -0
- package/lib/mass/ui/MassCommandProvider.d.ts +15 -0
- package/lib/mass/ui/MassCommandProvider.d.ts.map +1 -0
- package/lib/mass/ui/MassCommandProvider.js +14 -0
- package/lib/mass/ui/MassCommandProvider.js.map +1 -0
- package/lib/mass/ui/MassCommandTooltip.d.ts +16 -0
- package/lib/mass/ui/MassCommandTooltip.d.ts.map +1 -0
- package/lib/mass/ui/MassCommandTooltip.js +22 -0
- package/lib/mass/ui/MassCommandTooltip.js.map +1 -0
- package/lib/mass/ui/MassDocumentationDialog.d.ts +18 -0
- package/lib/mass/ui/MassDocumentationDialog.d.ts.map +1 -0
- package/lib/mass/ui/MassDocumentationDialog.js +70 -0
- package/lib/mass/ui/MassDocumentationDialog.js.map +1 -0
- package/lib/mass/ui/MassEditor.d.ts +78 -0
- package/lib/mass/ui/MassEditor.d.ts.map +1 -0
- package/lib/mass/ui/MassEditor.js +42 -0
- package/lib/mass/ui/MassEditor.js.map +1 -0
- package/lib/mass/ui/MassHeader.d.ts +12 -0
- package/lib/mass/ui/MassHeader.d.ts.map +1 -0
- package/lib/mass/ui/MassHeader.js +20 -0
- package/lib/mass/ui/MassHeader.js.map +1 -0
- package/lib/mass/ui/MassLogo.d.ts +21 -0
- package/lib/mass/ui/MassLogo.d.ts.map +1 -0
- package/lib/mass/ui/MassLogo.js +36 -0
- package/lib/mass/ui/MassLogo.js.map +1 -0
- package/lib/mass/ui/MassPointerTracker.d.ts +44 -0
- package/lib/mass/ui/MassPointerTracker.d.ts.map +1 -0
- package/lib/mass/ui/MassPointerTracker.js +29 -0
- package/lib/mass/ui/MassPointerTracker.js.map +1 -0
- package/lib/mass/ui/MassShell.d.ts +29 -0
- package/lib/mass/ui/MassShell.d.ts.map +1 -0
- package/lib/mass/ui/MassShell.js +133 -0
- package/lib/mass/ui/MassShell.js.map +1 -0
- package/lib/mass/ui/MassSidePanel.d.ts +32 -0
- package/lib/mass/ui/MassSidePanel.d.ts.map +1 -0
- package/lib/mass/ui/MassSidePanel.js +44 -0
- package/lib/mass/ui/MassSidePanel.js.map +1 -0
- package/lib/mass/ui/MassStateProvider.d.ts +19 -0
- package/lib/mass/ui/MassStateProvider.d.ts.map +1 -0
- package/lib/mass/ui/MassStateProvider.js +16 -0
- package/lib/mass/ui/MassStateProvider.js.map +1 -0
- package/lib/mass/ui/MassStatusBar.d.ts +15 -0
- package/lib/mass/ui/MassStatusBar.d.ts.map +1 -0
- package/lib/mass/ui/MassStatusBar.js +50 -0
- package/lib/mass/ui/MassStatusBar.js.map +1 -0
- package/lib/mass/ui/MassToolbar.d.ts +24 -0
- package/lib/mass/ui/MassToolbar.d.ts.map +1 -0
- package/lib/mass/ui/MassToolbar.js +36 -0
- package/lib/mass/ui/MassToolbar.js.map +1 -0
- package/lib/mass/ui/MetadataPanel.d.ts +35 -0
- package/lib/mass/ui/MetadataPanel.d.ts.map +1 -0
- package/lib/mass/ui/MetadataPanel.js +100 -0
- package/lib/mass/ui/MetadataPanel.js.map +1 -0
- package/lib/mass/ui/MzDecimalsMenu.d.ts +28 -0
- package/lib/mass/ui/MzDecimalsMenu.d.ts.map +1 -0
- package/lib/mass/ui/MzDecimalsMenu.js +40 -0
- package/lib/mass/ui/MzDecimalsMenu.js.map +1 -0
- package/lib/mass/ui/PeakLabels.d.ts +93 -0
- package/lib/mass/ui/PeakLabels.d.ts.map +1 -0
- package/lib/mass/ui/PeakLabels.js +91 -0
- package/lib/mass/ui/PeakLabels.js.map +1 -0
- package/lib/mass/ui/PeakTable.d.ts +34 -0
- package/lib/mass/ui/PeakTable.d.ts.map +1 -0
- package/lib/mass/ui/PeakTable.js +49 -0
- package/lib/mass/ui/PeakTable.js.map +1 -0
- package/lib/mass/ui/PeaksPanel.d.ts +31 -0
- package/lib/mass/ui/PeaksPanel.d.ts.map +1 -0
- package/lib/mass/ui/PeaksPanel.js +53 -0
- package/lib/mass/ui/PeaksPanel.js.map +1 -0
- package/lib/mass/ui/SpectraPanel.d.ts +17 -0
- package/lib/mass/ui/SpectraPanel.d.ts.map +1 -0
- package/lib/mass/ui/SpectraPanel.js +76 -0
- package/lib/mass/ui/SpectraPanel.js.map +1 -0
- package/lib/mass/ui/SpectrumRow.d.ts +26 -0
- package/lib/mass/ui/SpectrumRow.d.ts.map +1 -0
- package/lib/mass/ui/SpectrumRow.js +141 -0
- package/lib/mass/ui/SpectrumRow.js.map +1 -0
- package/lib/mass/ui/SpectrumTrace.d.ts +46 -0
- package/lib/mass/ui/SpectrumTrace.d.ts.map +1 -0
- package/lib/mass/ui/SpectrumTrace.js +68 -0
- package/lib/mass/ui/SpectrumTrace.js.map +1 -0
- package/lib/mass/ui/index.d.ts +69 -0
- package/lib/mass/ui/index.d.ts.map +1 -0
- package/lib/mass/ui/index.js +42 -0
- package/lib/mass/ui/index.js.map +1 -0
- package/lib/mass/ui/massActions.d.ts +52 -0
- package/lib/mass/ui/massActions.d.ts.map +1 -0
- package/lib/mass/ui/massActions.js +62 -0
- package/lib/mass/ui/massActions.js.map +1 -0
- package/lib/mass/ui/massChartProps.d.ts +128 -0
- package/lib/mass/ui/massChartProps.d.ts.map +1 -0
- package/lib/mass/ui/massChartProps.js +14 -0
- package/lib/mass/ui/massChartProps.js.map +1 -0
- package/lib/mass/ui/massCommandContext.d.ts +36 -0
- package/lib/mass/ui/massCommandContext.d.ts.map +1 -0
- package/lib/mass/ui/massCommandContext.js +45 -0
- package/lib/mass/ui/massCommandContext.js.map +1 -0
- package/lib/mass/ui/massHostPanels.d.ts +48 -0
- package/lib/mass/ui/massHostPanels.d.ts.map +1 -0
- package/lib/mass/ui/massHostPanels.js +41 -0
- package/lib/mass/ui/massHostPanels.js.map +1 -0
- package/lib/mass/ui/massStateContext.d.ts +26 -0
- package/lib/mass/ui/massStateContext.d.ts.map +1 -0
- package/lib/mass/ui/massStateContext.js +37 -0
- package/lib/mass/ui/massStateContext.js.map +1 -0
- package/lib/mass/ui/useIntensityZoom.d.ts +20 -0
- package/lib/mass/ui/useIntensityZoom.d.ts.map +1 -0
- package/lib/mass/ui/useIntensityZoom.js +42 -0
- package/lib/mass/ui/useIntensityZoom.js.map +1 -0
- package/lib/mass/ui/useMassEditor.d.ts +52 -0
- package/lib/mass/ui/useMassEditor.d.ts.map +1 -0
- package/lib/mass/ui/useMassEditor.js +93 -0
- package/lib/mass/ui/useMassEditor.js.map +1 -0
- package/lib/mass/ui/useMassFiles.d.ts +22 -0
- package/lib/mass/ui/useMassFiles.d.ts.map +1 -0
- package/lib/mass/ui/useMassFiles.js +71 -0
- package/lib/mass/ui/useMassFiles.js.map +1 -0
- package/lib/mass/ui/useMassHandle.d.ts +15 -0
- package/lib/mass/ui/useMassHandle.d.ts.map +1 -0
- package/lib/mass/ui/useMassHandle.js +35 -0
- package/lib/mass/ui/useMassHandle.js.map +1 -0
- package/lib/mass/ui/useMassPointer.d.ts +70 -0
- package/lib/mass/ui/useMassPointer.d.ts.map +1 -0
- package/lib/mass/ui/useMassPointer.js +57 -0
- package/lib/mass/ui/useMassPointer.js.map +1 -0
- package/lib/mass/ui/useMassShortcuts.d.ts +21 -0
- package/lib/mass/ui/useMassShortcuts.d.ts.map +1 -0
- package/lib/mass/ui/useMassShortcuts.js +66 -0
- package/lib/mass/ui/useMassShortcuts.js.map +1 -0
- package/lib/mass/ui/useMassSide.d.ts +27 -0
- package/lib/mass/ui/useMassSide.d.ts.map +1 -0
- package/lib/mass/ui/useMassSide.js +45 -0
- package/lib/mass/ui/useMassSide.js.map +1 -0
- package/lib/mass/ui/useMassZoom.d.ts +92 -0
- package/lib/mass/ui/useMassZoom.d.ts.map +1 -0
- package/lib/mass/ui/useMassZoom.js +65 -0
- package/lib/mass/ui/useMassZoom.js.map +1 -0
- package/lib/mass.d.ts +16 -0
- package/lib/mass.d.ts.map +1 -0
- package/lib/mass.js +16 -0
- package/lib/mass.js.map +1 -0
- package/lib/panel/ui/PanelRail.d.ts.map +1 -1
- package/lib/panel/ui/PanelRail.js +6 -1
- package/lib/panel/ui/PanelRail.js.map +1 -1
- package/lib/slides/ui/slideSanitizeSchema.d.ts +3 -2
- package/lib/slides/ui/slideSanitizeSchema.d.ts.map +1 -1
- package/lib/slides/ui/slideSanitizeSchema.js +82 -2
- package/lib/slides/ui/slideSanitizeSchema.js.map +1 -1
- package/package.json +6 -1
- package/src/about/core/providers.ts +7 -0
- package/src/about/ui/AboutProvidedBy.tsx +49 -0
- package/src/chart/ui/useChartPointer.ts +18 -4
- package/src/credits/core/credits.ts +53 -0
- package/src/download/core/drawingMarkup.ts +18 -1
- package/src/download/core/figurePng.ts +21 -8
- package/src/download/core/figureSvg.ts +5 -2
- package/src/download/core/figureTarget.ts +28 -3
- package/src/download/core/svgBounds.ts +21 -0
- package/src/download/core/svgToPng.ts +3 -4
- package/src/format/core/relativeTime.ts +29 -7
- package/src/host/core/connectHost.ts +77 -120
- package/src/host/core/hostOutputs.ts +197 -0
- package/src/host/core/index.ts +13 -7
- package/src/host/core/irKinds.ts +92 -0
- package/src/host/core/kinds.ts +16 -6
- package/src/host/core/protocol.ts +50 -8
- package/src/host/core/selectInputs.ts +145 -0
- package/src/host/testing/sciPeaks.ts +140 -0
- package/src/host/testing/standInHost.ts +30 -5
- package/src/host/ui/useHostConnection.ts +17 -8
- package/src/host-testing.ts +4 -0
- package/src/ir/core/handPicking.ts +154 -0
- package/src/ir/core/index.ts +14 -0
- package/src/ir/core/irBandState.ts +155 -0
- package/src/ir/core/irCommands.ts +7 -0
- package/src/ir/core/irPeaks.ts +79 -0
- package/src/ir/core/irReducer.ts +27 -34
- package/src/ir/core/irSpectrum.ts +16 -0
- package/src/ir/core/irState.ts +15 -8
- package/src/ir/core/pickBands.ts +46 -39
- package/src/ir/core/ramanBands.ts +2 -2
- package/src/ir/core/spectrumBands.ts +113 -0
- package/src/ir/ui/BandRow.tsx +20 -2
- package/src/ir/ui/BandsPanel.tsx +46 -88
- package/src/ir/ui/BandsToolbar.tsx +152 -0
- package/src/ir/ui/IrCanvas.tsx +22 -11
- package/src/ir/ui/IrChart.tsx +10 -1
- package/src/ir/ui/IrDocumentationDialog.tsx +7 -0
- package/src/ir/ui/IrEditor.tsx +4 -2
- package/src/ir/ui/IrShell.tsx +5 -0
- package/src/ir/ui/IrStatusBar.tsx +4 -1
- package/src/ir/ui/IrToolbar.tsx +14 -5
- package/src/ir/ui/VibrationalEditor.tsx +2 -1
- package/src/ir/ui/irActions.ts +11 -0
- package/src/ir/ui/irChartProps.ts +4 -1
- package/src/ir/ui/useIrEditor.ts +21 -21
- package/src/locales/de.json +63 -0
- package/src/locales/en.json +63 -0
- package/src/locales/es.json +63 -0
- package/src/locales/fr.json +63 -0
- package/src/locales/it.json +63 -0
- package/src/mass/core/analyseSpectrum.ts +191 -0
- package/src/mass/core/ascendingTrace.ts +62 -0
- package/src/mass/core/centroidPeaks.ts +114 -0
- package/src/mass/core/detectMassFormat.ts +113 -0
- package/src/mass/core/downloadSpectra.ts +52 -0
- package/src/mass/core/fromJcamp.ts +151 -0
- package/src/mass/core/fromText.ts +58 -0
- package/src/mass/core/index.ts +194 -0
- package/src/mass/core/jcampTechnique.ts +87 -0
- package/src/mass/core/labelStackBox.ts +75 -0
- package/src/mass/core/labelledPeaks.ts +135 -0
- package/src/mass/core/loadMassSpectra.ts +86 -0
- package/src/mass/core/loadedMassSpectrum.ts +43 -0
- package/src/mass/core/massCommands.ts +156 -0
- package/src/mass/core/massDomain.ts +229 -0
- package/src/mass/core/massEditorApi.ts +68 -0
- package/src/mass/core/massFormat.ts +187 -0
- package/src/mass/core/massMeta.ts +239 -0
- package/src/mass/core/massReducer.ts +232 -0
- package/src/mass/core/massResolution.ts +169 -0
- package/src/mass/core/massSidePanels.ts +27 -0
- package/src/mass/core/massSpectrum.ts +220 -0
- package/src/mass/core/massState.ts +206 -0
- package/src/mass/core/massStateEdits.ts +104 -0
- package/src/mass/core/massSummary.ts +213 -0
- package/src/mass/core/mzDecimalsSetting.ts +52 -0
- package/src/mass/core/nearestPeak.ts +130 -0
- package/src/mass/core/peakLabelLines.ts +112 -0
- package/src/mass/core/peakLabelPlan.ts +246 -0
- package/src/mass/core/peakTable.ts +82 -0
- package/src/mass/core/resolutionOf.ts +100 -0
- package/src/mass/core/scanFilter.ts +119 -0
- package/src/mass/core/spectrumJcamp.ts +186 -0
- package/src/mass/core/toMassSpectrum.ts +126 -0
- package/src/mass/core/traceIcon.ts +105 -0
- package/src/mass/core/writtenResolution.ts +81 -0
- package/src/mass/ui/MassAboutDialog.tsx +89 -0
- package/src/mass/ui/MassCanvas.tsx +170 -0
- package/src/mass/ui/MassChart.tsx +266 -0
- package/src/mass/ui/MassCommandProvider.tsx +34 -0
- package/src/mass/ui/MassCommandTooltip.tsx +36 -0
- package/src/mass/ui/MassDocumentationDialog.tsx +136 -0
- package/src/mass/ui/MassEditor.tsx +130 -0
- package/src/mass/ui/MassHeader.tsx +38 -0
- package/src/mass/ui/MassLogo.tsx +84 -0
- package/src/mass/ui/MassPointerTracker.tsx +72 -0
- package/src/mass/ui/MassShell.tsx +237 -0
- package/src/mass/ui/MassSidePanel.tsx +107 -0
- package/src/mass/ui/MassStateProvider.tsx +32 -0
- package/src/mass/ui/MassStatusBar.tsx +108 -0
- package/src/mass/ui/MassToolbar.tsx +120 -0
- package/src/mass/ui/MetadataPanel.tsx +201 -0
- package/src/mass/ui/MzDecimalsMenu.tsx +86 -0
- package/src/mass/ui/PeakLabels.tsx +242 -0
- package/src/mass/ui/PeakTable.tsx +199 -0
- package/src/mass/ui/PeaksPanel.tsx +182 -0
- package/src/mass/ui/SpectraPanel.tsx +153 -0
- package/src/mass/ui/SpectrumRow.tsx +246 -0
- package/src/mass/ui/SpectrumTrace.tsx +119 -0
- package/src/mass/ui/index.ts +69 -0
- package/src/mass/ui/massActions.ts +109 -0
- package/src/mass/ui/massChartProps.ts +130 -0
- package/src/mass/ui/massCommandContext.tsx +65 -0
- package/src/mass/ui/massHostPanels.ts +71 -0
- package/src/mass/ui/massStateContext.ts +48 -0
- package/src/mass/ui/useIntensityZoom.ts +55 -0
- package/src/mass/ui/useMassEditor.ts +156 -0
- package/src/mass/ui/useMassFiles.ts +91 -0
- package/src/mass/ui/useMassHandle.ts +58 -0
- package/src/mass/ui/useMassPointer.ts +120 -0
- package/src/mass/ui/useMassShortcuts.ts +85 -0
- package/src/mass/ui/useMassSide.ts +63 -0
- package/src/mass/ui/useMassZoom.ts +157 -0
- package/src/mass.ts +16 -0
- package/src/panel/ui/PanelRail.tsx +5 -1
- package/src/slides/ui/slideSanitizeSchema.ts +86 -2
- package/styles/chrome.css +7 -0
- package/styles/slides.css +47 -0
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Everything the viewer can be asked to do, as functions rather than actions.
|
|
3
|
+
*
|
|
4
|
+
* A component that dispatched action objects would have the shape of the reducer
|
|
5
|
+
* spread across every panel; one that calls `actions.selectSpectrum(id)` does
|
|
6
|
+
* not, and the reducer stays free to change how it holds things.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import type { Dispatch } from 'react';
|
|
10
|
+
|
|
11
|
+
import type { MassAction, SpectrumVisibility } from '../core/massReducer.ts';
|
|
12
|
+
import type { MassPanelId } from '../core/massSidePanels.ts';
|
|
13
|
+
import type { MassDomain, MassSpectrum } from '../core/massSpectrum.ts';
|
|
14
|
+
import type {
|
|
15
|
+
MassSettings,
|
|
16
|
+
MassTool,
|
|
17
|
+
PartialMassState,
|
|
18
|
+
} from '../core/massState.ts';
|
|
19
|
+
|
|
20
|
+
/** Everything the viewer can be asked to do. */
|
|
21
|
+
export interface MassEditorActions {
|
|
22
|
+
/** Draw these as well as what is already open. */
|
|
23
|
+
addSpectra: (spectra: MassSpectrum[]) => void;
|
|
24
|
+
/** Draw these instead of what is open, and refit the window to them. */
|
|
25
|
+
setSpectra: (spectra: MassSpectrum[]) => void;
|
|
26
|
+
/** Close one. */
|
|
27
|
+
removeSpectrum: (id: string) => void;
|
|
28
|
+
/** Call one something else. */
|
|
29
|
+
renameSpectrum: (id: string, name: string) => void;
|
|
30
|
+
/** Draw one in another colour. */
|
|
31
|
+
setSpectrumColor: (id: string, color: string) => void;
|
|
32
|
+
/** Draw one as its profile, as its sticks, or not at all. */
|
|
33
|
+
setSpectrumVisibility: (id: string, visibility: SpectrumVisibility) => void;
|
|
34
|
+
/** Point the panels at one, or at none. */
|
|
35
|
+
selectSpectrum: (id: string | null) => void;
|
|
36
|
+
/** Show this window. */
|
|
37
|
+
setDomain: (domain: MassDomain) => void;
|
|
38
|
+
/** Show what fits again. */
|
|
39
|
+
resetDomain: () => void;
|
|
40
|
+
/** Run this tool on the next drag. */
|
|
41
|
+
setTool: (tool: MassTool) => void;
|
|
42
|
+
/** Open or close a side panel, the viewer's own or one a host added. */
|
|
43
|
+
togglePanel: (panelId: MassPanelId) => void;
|
|
44
|
+
/** Say why something was refused, or that nothing is wrong any more. */
|
|
45
|
+
setError: (error: string | null) => void;
|
|
46
|
+
/** Change how the spectra are drawn. */
|
|
47
|
+
setSettings: (settings: Partial<MassSettings>) => void;
|
|
48
|
+
/** Take a whole state, as a host restoring one supplies it. */
|
|
49
|
+
loadState: (state: PartialMassState) => void;
|
|
50
|
+
/** Close every spectrum and start again from an empty chart. */
|
|
51
|
+
clear: () => void;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Bind every action to a dispatch.
|
|
56
|
+
* @param dispatch - The reducer's dispatch.
|
|
57
|
+
* @returns The actions, stable for as long as the dispatch is.
|
|
58
|
+
*/
|
|
59
|
+
export function createMassActions(
|
|
60
|
+
dispatch: Dispatch<MassAction>,
|
|
61
|
+
): MassEditorActions {
|
|
62
|
+
return {
|
|
63
|
+
addSpectra(spectra) {
|
|
64
|
+
dispatch({ type: 'addSpectra', spectra });
|
|
65
|
+
},
|
|
66
|
+
setSpectra(spectra) {
|
|
67
|
+
dispatch({ type: 'setSpectra', spectra });
|
|
68
|
+
},
|
|
69
|
+
removeSpectrum(id) {
|
|
70
|
+
dispatch({ type: 'removeSpectrum', id });
|
|
71
|
+
},
|
|
72
|
+
renameSpectrum(id, name) {
|
|
73
|
+
dispatch({ type: 'renameSpectrum', id, name });
|
|
74
|
+
},
|
|
75
|
+
setSpectrumColor(id, color) {
|
|
76
|
+
dispatch({ type: 'setSpectrumColor', id, color });
|
|
77
|
+
},
|
|
78
|
+
setSpectrumVisibility(id, visibility) {
|
|
79
|
+
dispatch({ type: 'setSpectrumVisibility', id, visibility });
|
|
80
|
+
},
|
|
81
|
+
selectSpectrum(id) {
|
|
82
|
+
dispatch({ type: 'selectSpectrum', id });
|
|
83
|
+
},
|
|
84
|
+
setDomain(domain) {
|
|
85
|
+
dispatch({ type: 'setDomain', domain });
|
|
86
|
+
},
|
|
87
|
+
resetDomain() {
|
|
88
|
+
dispatch({ type: 'resetDomain' });
|
|
89
|
+
},
|
|
90
|
+
setTool(tool) {
|
|
91
|
+
dispatch({ type: 'setTool', tool });
|
|
92
|
+
},
|
|
93
|
+
togglePanel(panelId) {
|
|
94
|
+
dispatch({ type: 'togglePanel', panelId });
|
|
95
|
+
},
|
|
96
|
+
setError(error) {
|
|
97
|
+
dispatch({ type: 'setError', error });
|
|
98
|
+
},
|
|
99
|
+
setSettings(settings) {
|
|
100
|
+
dispatch({ type: 'setSettings', settings });
|
|
101
|
+
},
|
|
102
|
+
loadState(state) {
|
|
103
|
+
dispatch({ type: 'loadState', state });
|
|
104
|
+
},
|
|
105
|
+
clear() {
|
|
106
|
+
dispatch({ type: 'clear' });
|
|
107
|
+
},
|
|
108
|
+
};
|
|
109
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a consumer hands the chart, and what the chart tells it back.
|
|
3
|
+
*
|
|
4
|
+
* Held apart from the component because it is the whole of the chart's public
|
|
5
|
+
* API — every spectrum drawn, every peak labelled on it and every gesture that
|
|
6
|
+
* comes back out is one of these — while the component behind it is an assembly
|
|
7
|
+
* of half a dozen layers nobody needs to read in order to mount one.
|
|
8
|
+
*
|
|
9
|
+
* Everything arrives as a prop and nothing is reached for: the chart reads no
|
|
10
|
+
* store and no context, so the same component serves an editor, a report page
|
|
11
|
+
* that only ever draws one spectrum, and a test.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import type { ReactNode } from 'react';
|
|
15
|
+
|
|
16
|
+
import type { ZoomDragMode } from '../../chart/core/chartDomain.ts';
|
|
17
|
+
import type { MassDomain, MassSpectrum } from '../core/massSpectrum.ts';
|
|
18
|
+
import type { NearestPeak } from '../core/nearestPeak.ts';
|
|
19
|
+
|
|
20
|
+
export interface MassChartProps {
|
|
21
|
+
/** The spectra to draw, each saying in itself which of its traces is drawn. */
|
|
22
|
+
spectra: readonly MassSpectrum[];
|
|
23
|
+
/**
|
|
24
|
+
* Identity of the spectrum whose peaks are labelled, `null` for none. One
|
|
25
|
+
* spectrum and never all of them: two stacks over every shared peak are the
|
|
26
|
+
* same m/z written twice, a pixel apart, in two colours.
|
|
27
|
+
* @default the first spectrum drawn
|
|
28
|
+
*/
|
|
29
|
+
labelledId?: string | null;
|
|
30
|
+
/**
|
|
31
|
+
* Whether that spectrum's peaks are labelled at all.
|
|
32
|
+
* @default true
|
|
33
|
+
*/
|
|
34
|
+
showLabels?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* At most how many peaks are labelled; every labelled one is still marked.
|
|
37
|
+
* @default DEFAULT_LABEL_LIMIT
|
|
38
|
+
*/
|
|
39
|
+
labelLimit?: number;
|
|
40
|
+
/**
|
|
41
|
+
* Whether a label writes the charge of a peak whose charge was established.
|
|
42
|
+
* @default false
|
|
43
|
+
*/
|
|
44
|
+
showCharges?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* How many decimals every mass is written with, overriding what the spectra
|
|
47
|
+
* resolve — where the labels follow the labelled spectrum's own resolution,
|
|
48
|
+
* and the crosshair what the drawn spectra resolve together.
|
|
49
|
+
* @default what the spectra resolve, as `mzDecimalsOf` decides
|
|
50
|
+
*/
|
|
51
|
+
mzDecimals?: number;
|
|
52
|
+
/**
|
|
53
|
+
* What explains a peak, keyed as `peakKey` keys it — the name written on top
|
|
54
|
+
* of its label. This is how a host annotates peaks without the chart having
|
|
55
|
+
* to know where the names came from.
|
|
56
|
+
* @default undefined
|
|
57
|
+
*/
|
|
58
|
+
annotationLabels?: ReadonlyMap<string, string>;
|
|
59
|
+
/**
|
|
60
|
+
* The m/z a guide is drawn at, `null` for none — the peak a row of a table
|
|
61
|
+
* beside the chart is resting on.
|
|
62
|
+
* @default null
|
|
63
|
+
*/
|
|
64
|
+
highlightMz?: number | null;
|
|
65
|
+
/**
|
|
66
|
+
* Told which picked peak the pointer has come to rest on, and told `null` when
|
|
67
|
+
* it leaves one — called only when the answer changes.
|
|
68
|
+
* @default undefined
|
|
69
|
+
*/
|
|
70
|
+
onPeakHover?: (peak: NearestPeak | null) => void;
|
|
71
|
+
/**
|
|
72
|
+
* The window to show, `null` to let the chart show what fits.
|
|
73
|
+
*
|
|
74
|
+
* The chart holds a window of its own, so this is an override rather than the
|
|
75
|
+
* chart's state: every window a gesture arrives at is reported through
|
|
76
|
+
* `onDomainChange`, and a host that keeps one is expected to hand back what it
|
|
77
|
+
* is told. Handing back `null` where a window was is how a host asks for the
|
|
78
|
+
* fit again.
|
|
79
|
+
* @default null
|
|
80
|
+
*/
|
|
81
|
+
domain?: MassDomain | null;
|
|
82
|
+
/**
|
|
83
|
+
* Told the window the chart has come to show, whenever it changes — a drag, a
|
|
84
|
+
* turn of the wheel, the double click that fits everything again, or a refit
|
|
85
|
+
* after what is drawn changed.
|
|
86
|
+
* @default undefined
|
|
87
|
+
*/
|
|
88
|
+
onDomainChange?: (domain: MassDomain) => void;
|
|
89
|
+
/**
|
|
90
|
+
* Told where a click on the plot landed, in m/z, and the picked peak within
|
|
91
|
+
* reach of it — `null` when it landed on none. The end of a drag is never a
|
|
92
|
+
* click.
|
|
93
|
+
* @default undefined
|
|
94
|
+
*/
|
|
95
|
+
onPlotClick?: (mz: number, peak: NearestPeak | null) => void;
|
|
96
|
+
/**
|
|
97
|
+
* What a drag across the plot asks for: the m/z axis alone, or exactly the
|
|
98
|
+
* rectangle it sweeps out.
|
|
99
|
+
* @default 'xAxis'
|
|
100
|
+
*/
|
|
101
|
+
drag?: ZoomDragMode;
|
|
102
|
+
/**
|
|
103
|
+
* Whether the chart answers `f` with the fit itself. A viewer around it that
|
|
104
|
+
* runs its keys through a command table turns this off.
|
|
105
|
+
* @default true
|
|
106
|
+
*/
|
|
107
|
+
answersKeys?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* Identity of the spectrum drawn thicker than the rest, `null` for none.
|
|
110
|
+
* @default null
|
|
111
|
+
*/
|
|
112
|
+
emphasisedId?: string | null;
|
|
113
|
+
/**
|
|
114
|
+
* How wide the chart is drawn, in pixels.
|
|
115
|
+
* @default the width of its container
|
|
116
|
+
*/
|
|
117
|
+
width?: number;
|
|
118
|
+
/**
|
|
119
|
+
* How tall it is drawn, in pixels.
|
|
120
|
+
* @default the height of its container
|
|
121
|
+
*/
|
|
122
|
+
height?: number;
|
|
123
|
+
/**
|
|
124
|
+
* Anything else to draw over the spectra, in the same pixels and under the
|
|
125
|
+
* same clip. Rendered last inside the plot, so a host adds to the chart
|
|
126
|
+
* instead of forking it.
|
|
127
|
+
* @default undefined
|
|
128
|
+
*/
|
|
129
|
+
children?: ReactNode;
|
|
130
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How a component reaches the commands, and what a toolbar item needs to be one.
|
|
3
|
+
*
|
|
4
|
+
* The hooks and the context object, with no component of its own: a module that
|
|
5
|
+
* exports a component and a constant together cannot be hot reloaded, which is
|
|
6
|
+
* why the provider and the tooltip are files of their own beside this one.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { createContext, useContext } from 'react';
|
|
10
|
+
|
|
11
|
+
import type {
|
|
12
|
+
MassCommandHandlers,
|
|
13
|
+
MassCommandId,
|
|
14
|
+
RunMassCommand,
|
|
15
|
+
} from '../core/massCommands.ts';
|
|
16
|
+
import { massCommandLabel } from '../core/massCommands.ts';
|
|
17
|
+
|
|
18
|
+
import { MassCommandTooltip } from './MassCommandTooltip.tsx';
|
|
19
|
+
|
|
20
|
+
/** What the provider holds. */
|
|
21
|
+
export interface MassCommandContextValue {
|
|
22
|
+
/** What each command does. */
|
|
23
|
+
handlers: MassCommandHandlers;
|
|
24
|
+
/** Run one. */
|
|
25
|
+
run: RunMassCommand;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/** Where the provider puts it. */
|
|
29
|
+
export const massCommandContext = createContext<MassCommandContextValue | null>(
|
|
30
|
+
null,
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Run a command from anywhere inside the viewer.
|
|
35
|
+
* @returns The runner; a command nothing handles does nothing.
|
|
36
|
+
*/
|
|
37
|
+
export function useMassCommand(): RunMassCommand {
|
|
38
|
+
const value = useContext(massCommandContext);
|
|
39
|
+
return value?.run ?? noRun;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Everything a toolbar item needs to be one command, in one spread.
|
|
44
|
+
*
|
|
45
|
+
* The tooltip, the label a screen reader is given and the click handler all come
|
|
46
|
+
* from the same table entry, so a button cannot end up titled one thing and
|
|
47
|
+
* doing another.
|
|
48
|
+
* @returns A function from a command's identity to the props for its button.
|
|
49
|
+
*/
|
|
50
|
+
export function useMassCommandProps() {
|
|
51
|
+
const run = useMassCommand();
|
|
52
|
+
return function command(id: MassCommandId) {
|
|
53
|
+
return {
|
|
54
|
+
tooltip: <MassCommandTooltip id={id} />,
|
|
55
|
+
'aria-label': massCommandLabel(id),
|
|
56
|
+
onClick: () => run(id),
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/** What running a command comes to outside a provider: nothing at all. */
|
|
62
|
+
function noRun(): void {
|
|
63
|
+
// Deliberately empty: a chart mounted without the shell has no commands, and
|
|
64
|
+
// a missing provider is not a reason to throw at a button press.
|
|
65
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The panels a host adds to the viewer's own, and the one list both make.
|
|
3
|
+
*
|
|
4
|
+
* A host panel is a panel like any other once it is in the list: the activity
|
|
5
|
+
* bar and the stack read the same list, so it toggles, folds and closes exactly
|
|
6
|
+
* as the spectra or the peaks do. The host brings the body and nothing else —
|
|
7
|
+
* the header, its close button and the place in the column are the viewer's,
|
|
8
|
+
* which is what keeps every header reading the same.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import type { IconName } from '@blueprintjs/core';
|
|
12
|
+
import type { ReactNode } from 'react';
|
|
13
|
+
|
|
14
|
+
import { massSidePanels } from '../core/massSidePanels.ts';
|
|
15
|
+
|
|
16
|
+
/** A panel the host adds to the editor's own stack. */
|
|
17
|
+
export interface MassHostPanel {
|
|
18
|
+
/**
|
|
19
|
+
* Its identity in the activity bar and in `defaultPanelIds`; never a built-in
|
|
20
|
+
* id. One that is, or that an earlier host panel already took, is left out:
|
|
21
|
+
* one icon cannot open two panels.
|
|
22
|
+
*/
|
|
23
|
+
id: string;
|
|
24
|
+
/** What its header and its activity-bar item say. */
|
|
25
|
+
title: string;
|
|
26
|
+
/** Its glyph in the activity bar (a Blueprint IconName). */
|
|
27
|
+
icon: IconName;
|
|
28
|
+
/**
|
|
29
|
+
* Its body. It brings its own toolbar as first row: the header carries the
|
|
30
|
+
* close button only. It is rendered inside the viewer, so a component in it
|
|
31
|
+
* reaches the viewer it stands in through `useMassEditorState` and
|
|
32
|
+
* `useMassActions` — to overlay a predicted isotopic pattern, say.
|
|
33
|
+
*/
|
|
34
|
+
content: ReactNode;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** One panel of the side: one of the viewer's own, or one a host added. */
|
|
38
|
+
export type MassStackPanel = (typeof massSidePanels)[number] | MassHostPanel;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Every panel the side offers, in the order the activity bar stacks them: the
|
|
42
|
+
* host's first, in the order given, then the viewer's own.
|
|
43
|
+
* @param hostPanels - What the host adds.
|
|
44
|
+
* @returns The panels; the viewer's own list itself when the host adds none.
|
|
45
|
+
*/
|
|
46
|
+
export function massStackPanels(
|
|
47
|
+
hostPanels: readonly MassHostPanel[],
|
|
48
|
+
): readonly MassStackPanel[] {
|
|
49
|
+
if (hostPanels.length === 0) return massSidePanels;
|
|
50
|
+
const taken = new Set<string>(BUILT_IN_IDS);
|
|
51
|
+
const panels: MassStackPanel[] = [];
|
|
52
|
+
for (const panel of hostPanels) {
|
|
53
|
+
if (taken.has(panel.id)) continue;
|
|
54
|
+
taken.add(panel.id);
|
|
55
|
+
panels.push(panel);
|
|
56
|
+
}
|
|
57
|
+
panels.push(...massSidePanels);
|
|
58
|
+
return panels;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Whether a panel of the side is one a host added, whose body it brings.
|
|
63
|
+
* @param panel - The panel.
|
|
64
|
+
* @returns True for a host's panel.
|
|
65
|
+
*/
|
|
66
|
+
export function isMassHostPanel(panel: MassStackPanel): panel is MassHostPanel {
|
|
67
|
+
return 'content' in panel;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/** The ids no host panel may take. */
|
|
71
|
+
const BUILT_IN_IDS: readonly string[] = massSidePanels.map((panel) => panel.id);
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How a panel reaches the viewer it is inside.
|
|
3
|
+
*
|
|
4
|
+
* Two contexts rather than one, because the actions never change while the state
|
|
5
|
+
* changes on every drag of the chart: a panel that only ever acts — a toolbar
|
|
6
|
+
* button — reads the second and is not re-rendered by the first.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { createContext, useContext } from 'react';
|
|
10
|
+
|
|
11
|
+
import type { MassEditorActions } from './massActions.ts';
|
|
12
|
+
import type { MassEditorApi } from './useMassEditor.ts';
|
|
13
|
+
|
|
14
|
+
/** Everything one viewer knows, as the provider holds it. */
|
|
15
|
+
export const massStateContext = createContext<MassEditorApi | null>(null);
|
|
16
|
+
|
|
17
|
+
/** Everything that changes it, as the provider holds it. */
|
|
18
|
+
export const massActionsContext = createContext<MassEditorActions | null>(null);
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Everything the viewer knows, from inside it.
|
|
22
|
+
* @returns The state and what follows from it.
|
|
23
|
+
* @throws {Error} When read outside a `MassStateProvider`.
|
|
24
|
+
*/
|
|
25
|
+
export function useMassEditorState(): MassEditorApi {
|
|
26
|
+
const editor = useContext(massStateContext);
|
|
27
|
+
if (editor === null) {
|
|
28
|
+
throw new Error(
|
|
29
|
+
'The mass spectrum viewer state was read outside a MassStateProvider',
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
return editor;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Everything to do, from inside the viewer.
|
|
37
|
+
* @returns The actions.
|
|
38
|
+
* @throws {Error} When read outside a `MassStateProvider`.
|
|
39
|
+
*/
|
|
40
|
+
export function useMassActions(): MassEditorActions {
|
|
41
|
+
const actions = useContext(massActionsContext);
|
|
42
|
+
if (actions === null) {
|
|
43
|
+
throw new Error(
|
|
44
|
+
'The mass spectrum viewer actions were read outside a MassStateProvider',
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
return actions;
|
|
48
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The zoom in and zoom out commands, which scale the intensity axis alone.
|
|
3
|
+
*
|
|
4
|
+
* They scale it about zero, the baseline every stick stands on, so a small peak
|
|
5
|
+
* comes up out of the baseline rather than the whole spectrum drifting off the
|
|
6
|
+
* plot — what a turn of the wheel does, at the speed of a key press.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { useMemo } from 'react';
|
|
10
|
+
|
|
11
|
+
import { fullDomain } from '../core/massDomain.ts';
|
|
12
|
+
|
|
13
|
+
import { useMassActions, useMassEditorState } from './massStateContext.ts';
|
|
14
|
+
|
|
15
|
+
/** The two commands, ready to hand to a button or a key. */
|
|
16
|
+
export interface IntensityZoom {
|
|
17
|
+
/** Bring the peaks up by one step. */
|
|
18
|
+
zoomIn: () => void;
|
|
19
|
+
/** Put the axis back out by one step. */
|
|
20
|
+
zoomOut: () => void;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Zoom the intensity axis of the viewer this is called inside.
|
|
25
|
+
* @returns The two commands.
|
|
26
|
+
*/
|
|
27
|
+
export function useIntensityZoom(): IntensityZoom {
|
|
28
|
+
const { state, visibleSpectra } = useMassEditorState();
|
|
29
|
+
const actions = useMassActions();
|
|
30
|
+
const { domain } = state.view;
|
|
31
|
+
|
|
32
|
+
return useMemo(() => {
|
|
33
|
+
/**
|
|
34
|
+
* Scale the intensity axis by a factor, about zero.
|
|
35
|
+
* @param factor - Above one to zoom out.
|
|
36
|
+
*/
|
|
37
|
+
function scale(factor: number): void {
|
|
38
|
+
const shown = domain ?? fullDomain(visibleSpectra);
|
|
39
|
+
actions.setDomain({
|
|
40
|
+
x: shown.x,
|
|
41
|
+
y: [shown.y[0] * factor, shown.y[1] * factor],
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
zoomIn: () => scale(1 / ZOOM_STEP),
|
|
46
|
+
zoomOut: () => scale(ZOOM_STEP),
|
|
47
|
+
};
|
|
48
|
+
}, [actions, domain, visibleSpectra]);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* What one press of zoom in or out is worth: about what one notch of a mouse
|
|
53
|
+
* wheel does, so the button and the wheel feel like one gesture at two speeds.
|
|
54
|
+
*/
|
|
55
|
+
const ZOOM_STEP = 1.2;
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One viewer's state, and everything derived from it.
|
|
3
|
+
*
|
|
4
|
+
* What is derived here is what three panels and the chart read alike — which
|
|
5
|
+
* spectra are drawn, which one is selected, and how many decimals every mass on
|
|
6
|
+
* screen is written with — so it is worked out once per change rather than once
|
|
7
|
+
* per reader.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { useEffect, useMemo, useReducer, useRef } from 'react';
|
|
11
|
+
|
|
12
|
+
import { massReducer } from '../core/massReducer.ts';
|
|
13
|
+
import type { MassSpectrum } from '../core/massSpectrum.ts';
|
|
14
|
+
import { isSpectrumDrawn } from '../core/massSpectrum.ts';
|
|
15
|
+
import type { CreateMassStateOptions, MassState } from '../core/massState.ts';
|
|
16
|
+
import { createMassState } from '../core/massState.ts';
|
|
17
|
+
import { mzDecimalsFor } from '../core/mzDecimalsSetting.ts';
|
|
18
|
+
import { mzDecimalsOf } from '../core/resolutionOf.ts';
|
|
19
|
+
|
|
20
|
+
import type { MassEditorActions } from './massActions.ts';
|
|
21
|
+
import { createMassActions } from './massActions.ts';
|
|
22
|
+
|
|
23
|
+
/** What a viewer opens on, and who to tell when the spectra change. */
|
|
24
|
+
export interface UseMassEditorOptions extends CreateMassStateOptions {
|
|
25
|
+
/**
|
|
26
|
+
* Called whenever the spectra open change — one loaded, one closed, the chart
|
|
27
|
+
* cleared — with the spectra now open.
|
|
28
|
+
* @default undefined
|
|
29
|
+
*/
|
|
30
|
+
onChange?: (spectra: MassSpectrum[]) => void;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** What a component drives the viewer through. */
|
|
34
|
+
export interface MassEditorApi {
|
|
35
|
+
/** Everything the viewer knows, in its three buckets. */
|
|
36
|
+
state: MassState;
|
|
37
|
+
/** The spectra currently drawn, by either trace, in the order they were loaded. */
|
|
38
|
+
visibleSpectra: MassSpectrum[];
|
|
39
|
+
/** The spectrum the panels act on, `null` while none is selected. */
|
|
40
|
+
selectedSpectrum: MassSpectrum | null;
|
|
41
|
+
/**
|
|
42
|
+
* How many decimals the masses the panels write are written with: the number
|
|
43
|
+
* chosen in the settings, or else the selected spectrum's own, since the peak
|
|
44
|
+
* table, the acquisition table and the labels are all about it alone — a
|
|
45
|
+
* nominal-mass table is written in whole numbers even beside an Orbitrap
|
|
46
|
+
* scan. With nothing selected, what the drawn spectra resolve together — see
|
|
47
|
+
* `mzDecimalsOf`.
|
|
48
|
+
*/
|
|
49
|
+
mzDecimals: number;
|
|
50
|
+
/**
|
|
51
|
+
* What `mzDecimals` comes to when nothing is chosen, for a control that says
|
|
52
|
+
* what choosing nothing would mean.
|
|
53
|
+
*/
|
|
54
|
+
autoMzDecimals: number;
|
|
55
|
+
/** Everything to do. */
|
|
56
|
+
actions: MassEditorActions;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Hold one viewer's state.
|
|
61
|
+
* @param options - What it opens on.
|
|
62
|
+
* @returns The state, what follows from it, and everything to do.
|
|
63
|
+
*/
|
|
64
|
+
export function useMassEditor(
|
|
65
|
+
options: UseMassEditorOptions = {},
|
|
66
|
+
): MassEditorApi {
|
|
67
|
+
const { onChange, ...initial } = options;
|
|
68
|
+
|
|
69
|
+
const [state, dispatch] = useReducer(massReducer, initial, createMassState);
|
|
70
|
+
const actions = useMemo(() => createMassActions(dispatch), [dispatch]);
|
|
71
|
+
|
|
72
|
+
const { spectra } = state.data;
|
|
73
|
+
const { selectedId } = state.view;
|
|
74
|
+
|
|
75
|
+
const visibleSpectra = useMemo(() => {
|
|
76
|
+
const visible: MassSpectrum[] = [];
|
|
77
|
+
for (const spectrum of spectra) {
|
|
78
|
+
if (isSpectrumDrawn(spectrum)) visible.push(spectrum);
|
|
79
|
+
}
|
|
80
|
+
return visible;
|
|
81
|
+
}, [spectra]);
|
|
82
|
+
|
|
83
|
+
const selectedSpectrum = useMemo(() => {
|
|
84
|
+
if (selectedId === null) return null;
|
|
85
|
+
for (const spectrum of spectra) {
|
|
86
|
+
if (spectrum.id === selectedId) return spectrum;
|
|
87
|
+
}
|
|
88
|
+
return null;
|
|
89
|
+
}, [spectra, selectedId]);
|
|
90
|
+
|
|
91
|
+
const decimalsSetting = state.settings.mzDecimals;
|
|
92
|
+
const shownSpectra = useMemo(
|
|
93
|
+
() => (selectedSpectrum === null ? visibleSpectra : [selectedSpectrum]),
|
|
94
|
+
[visibleSpectra, selectedSpectrum],
|
|
95
|
+
);
|
|
96
|
+
const autoMzDecimals = useMemo(
|
|
97
|
+
() => mzDecimalsOf(shownSpectra),
|
|
98
|
+
[shownSpectra],
|
|
99
|
+
);
|
|
100
|
+
const mzDecimals = useMemo(
|
|
101
|
+
() => mzDecimalsFor(decimalsSetting, shownSpectra),
|
|
102
|
+
[decimalsSetting, shownSpectra],
|
|
103
|
+
);
|
|
104
|
+
|
|
105
|
+
// What was reported last, so a host passing a fresh callback on every render
|
|
106
|
+
// is not told about spectra that did not change. The identities are compared
|
|
107
|
+
// rather than the array: a rename or a colour builds a new spectrum around
|
|
108
|
+
// the same peaks, and that is not a change of what is loaded.
|
|
109
|
+
const reported = useRef(spectra);
|
|
110
|
+
useEffect(() => {
|
|
111
|
+
if (sameSpectra(reported.current, spectra)) return;
|
|
112
|
+
reported.current = spectra;
|
|
113
|
+
onChange?.(spectra);
|
|
114
|
+
}, [spectra, onChange]);
|
|
115
|
+
|
|
116
|
+
return useMemo(
|
|
117
|
+
() => ({
|
|
118
|
+
state,
|
|
119
|
+
visibleSpectra,
|
|
120
|
+
selectedSpectrum,
|
|
121
|
+
mzDecimals,
|
|
122
|
+
autoMzDecimals,
|
|
123
|
+
actions,
|
|
124
|
+
}),
|
|
125
|
+
[
|
|
126
|
+
state,
|
|
127
|
+
visibleSpectra,
|
|
128
|
+
selectedSpectrum,
|
|
129
|
+
mzDecimals,
|
|
130
|
+
autoMzDecimals,
|
|
131
|
+
actions,
|
|
132
|
+
],
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Whether two lists hold the same spectra, in order.
|
|
138
|
+
* @param current - What was reported last.
|
|
139
|
+
* @param next - What is open now.
|
|
140
|
+
* @returns Whether the report can be skipped.
|
|
141
|
+
*/
|
|
142
|
+
function sameSpectra(
|
|
143
|
+
current: readonly MassSpectrum[],
|
|
144
|
+
next: readonly MassSpectrum[],
|
|
145
|
+
): boolean {
|
|
146
|
+
if (current === next) return true;
|
|
147
|
+
if (current.length !== next.length) return false;
|
|
148
|
+
for (let index = 0; index < current.length; index++) {
|
|
149
|
+
if (
|
|
150
|
+
(current[index] as MassSpectrum).id !== (next[index] as MassSpectrum).id
|
|
151
|
+
) {
|
|
152
|
+
return false;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
return true;
|
|
156
|
+
}
|