react-cheminfo 0.27.0 → 0.29.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 +38 -25
- package/lib/chart/core/axisLabels.d.ts +82 -0
- package/lib/chart/core/axisLabels.d.ts.map +1 -0
- package/lib/chart/core/axisLabels.js +111 -0
- package/lib/chart/core/axisLabels.js.map +1 -0
- package/lib/chart/core/boxLayout.d.ts +53 -0
- package/lib/chart/core/boxLayout.d.ts.map +1 -0
- package/lib/chart/core/boxLayout.js +112 -0
- package/lib/chart/core/boxLayout.js.map +1 -0
- package/lib/chart/core/chartAxisScale.d.ts +23 -2
- package/lib/chart/core/chartAxisScale.d.ts.map +1 -1
- package/lib/chart/core/chartAxisScale.js +64 -13
- package/lib/chart/core/chartAxisScale.js.map +1 -1
- package/lib/chart/core/chartDomain.d.ts +160 -0
- package/lib/chart/core/chartDomain.d.ts.map +1 -0
- package/lib/chart/core/chartDomain.js +46 -0
- package/lib/chart/core/chartDomain.js.map +1 -0
- package/lib/chart/core/chartGeometry.d.ts +131 -0
- package/lib/chart/core/chartGeometry.d.ts.map +1 -0
- package/lib/chart/core/chartGeometry.js +101 -0
- package/lib/chart/core/chartGeometry.js.map +1 -0
- package/lib/chart/core/chartPane.d.ts +11 -0
- package/lib/chart/core/chartPane.d.ts.map +1 -0
- package/lib/chart/core/chartPane.js +11 -0
- package/lib/chart/core/chartPane.js.map +1 -0
- package/lib/chart/core/chartScale.d.ts +4 -1
- package/lib/chart/core/chartScale.d.ts.map +1 -1
- package/lib/chart/core/chartScale.js +8 -4
- package/lib/chart/core/chartScale.js.map +1 -1
- package/lib/chart/core/chartTheme.d.ts +156 -0
- package/lib/chart/core/chartTheme.d.ts.map +1 -0
- package/lib/chart/core/chartTheme.js +156 -0
- package/lib/chart/core/chartTheme.js.map +1 -0
- package/lib/chart/core/chartViewport.d.ts +32 -5
- package/lib/chart/core/chartViewport.d.ts.map +1 -1
- package/lib/chart/core/chartViewport.js +40 -11
- package/lib/chart/core/chartViewport.js.map +1 -1
- package/lib/chart/core/guidePlacement.d.ts +52 -0
- package/lib/chart/core/guidePlacement.d.ts.map +1 -0
- package/lib/chart/core/guidePlacement.js +52 -0
- package/lib/chart/core/guidePlacement.js.map +1 -0
- package/lib/chart/core/index.d.ts +29 -2
- package/lib/chart/core/index.d.ts.map +1 -1
- package/lib/chart/core/index.js +19 -2
- package/lib/chart/core/index.js.map +1 -1
- package/lib/chart/core/labelStack.d.ts +27 -0
- package/lib/chart/core/labelStack.d.ts.map +1 -0
- package/lib/chart/core/labelStack.js +62 -0
- package/lib/chart/core/labelStack.js.map +1 -0
- package/lib/chart/core/legendBox.d.ts +152 -0
- package/lib/chart/core/legendBox.d.ts.map +1 -0
- package/lib/chart/core/legendBox.js +169 -0
- package/lib/chart/core/legendBox.js.map +1 -0
- package/lib/chart/core/selectionGeometry.d.ts +45 -0
- package/lib/chart/core/selectionGeometry.d.ts.map +1 -0
- package/lib/chart/core/selectionGeometry.js +49 -0
- package/lib/chart/core/selectionGeometry.js.map +1 -0
- package/lib/chart/core/spectrumColor.d.ts +80 -0
- package/lib/chart/core/spectrumColor.d.ts.map +1 -0
- package/lib/chart/core/spectrumColor.js +120 -0
- package/lib/chart/core/spectrumColor.js.map +1 -0
- package/lib/chart/core/stackCapacity.d.ts +136 -0
- package/lib/chart/core/stackCapacity.d.ts.map +1 -0
- package/lib/chart/core/stackCapacity.js +153 -0
- package/lib/chart/core/stackCapacity.js.map +1 -0
- package/lib/chart/core/svgPoint.d.ts +62 -0
- package/lib/chart/core/svgPoint.d.ts.map +1 -0
- package/lib/chart/core/svgPoint.js +43 -0
- package/lib/chart/core/svgPoint.js.map +1 -0
- package/lib/chart/core/tracePath.d.ts +94 -0
- package/lib/chart/core/tracePath.d.ts.map +1 -0
- package/lib/chart/core/tracePath.js +191 -0
- package/lib/chart/core/tracePath.js.map +1 -0
- package/lib/chart/core/trackerReadout.d.ts +55 -0
- package/lib/chart/core/trackerReadout.d.ts.map +1 -0
- package/lib/chart/core/trackerReadout.js +53 -0
- package/lib/chart/core/trackerReadout.js.map +1 -0
- package/lib/chart/core/viewTransform.d.ts +167 -0
- package/lib/chart/core/viewTransform.d.ts.map +1 -0
- package/lib/chart/core/viewTransform.js +188 -0
- package/lib/chart/core/viewTransform.js.map +1 -0
- package/lib/chart/core/zoomDomain.d.ts +127 -0
- package/lib/chart/core/zoomDomain.d.ts.map +1 -0
- package/lib/chart/core/zoomDomain.js +175 -0
- package/lib/chart/core/zoomDomain.js.map +1 -0
- package/lib/chart/ui/Axes.d.ts +104 -0
- package/lib/chart/ui/Axes.d.ts.map +1 -0
- package/lib/chart/ui/Axes.js +155 -0
- package/lib/chart/ui/Axes.js.map +1 -0
- package/lib/chart/ui/AxisGuide.d.ts +60 -0
- package/lib/chart/ui/AxisGuide.d.ts.map +1 -0
- package/lib/chart/ui/AxisGuide.js +111 -0
- package/lib/chart/ui/AxisGuide.js.map +1 -0
- package/lib/chart/ui/ChartStack.d.ts +81 -0
- package/lib/chart/ui/ChartStack.d.ts.map +1 -0
- package/lib/chart/ui/ChartStack.js +42 -0
- package/lib/chart/ui/ChartStack.js.map +1 -0
- package/lib/chart/ui/ChartTracker.d.ts +36 -0
- package/lib/chart/ui/ChartTracker.d.ts.map +1 -0
- package/lib/chart/ui/ChartTracker.js +27 -0
- package/lib/chart/ui/ChartTracker.js.map +1 -0
- package/lib/chart/ui/PlotCaption.d.ts +44 -0
- package/lib/chart/ui/PlotCaption.d.ts.map +1 -0
- package/lib/chart/ui/PlotCaption.js +68 -0
- package/lib/chart/ui/PlotCaption.js.map +1 -0
- package/lib/chart/ui/SelectionRect.d.ts +27 -0
- package/lib/chart/ui/SelectionRect.d.ts.map +1 -0
- package/lib/chart/ui/SelectionRect.js +31 -0
- package/lib/chart/ui/SelectionRect.js.map +1 -0
- package/lib/chart/ui/TraceLegend.d.ts +99 -0
- package/lib/chart/ui/TraceLegend.d.ts.map +1 -0
- package/lib/chart/ui/TraceLegend.js +45 -0
- package/lib/chart/ui/TraceLegend.js.map +1 -0
- package/lib/chart/ui/chartGestures.d.ts +158 -0
- package/lib/chart/ui/chartGestures.d.ts.map +1 -0
- package/lib/chart/ui/chartGestures.js +145 -0
- package/lib/chart/ui/chartGestures.js.map +1 -0
- package/lib/chart/ui/chartStackLevel.d.ts +115 -0
- package/lib/chart/ui/chartStackLevel.d.ts.map +1 -0
- package/lib/chart/ui/chartStackLevel.js +96 -0
- package/lib/chart/ui/chartStackLevel.js.map +1 -0
- package/lib/chart/ui/chartSurface.d.ts +35 -0
- package/lib/chart/ui/chartSurface.d.ts.map +1 -0
- package/lib/chart/ui/chartSurface.js +58 -0
- package/lib/chart/ui/chartSurface.js.map +1 -0
- package/lib/chart/ui/index.d.ts +24 -0
- package/lib/chart/ui/index.d.ts.map +1 -1
- package/lib/chart/ui/index.js +13 -0
- package/lib/chart/ui/index.js.map +1 -1
- package/lib/chart/ui/useChartPointer.d.ts +124 -0
- package/lib/chart/ui/useChartPointer.d.ts.map +1 -0
- package/lib/chart/ui/useChartPointer.js +152 -0
- package/lib/chart/ui/useChartPointer.js.map +1 -0
- package/lib/chart/ui/useChartSize.d.ts +49 -0
- package/lib/chart/ui/useChartSize.d.ts.map +1 -0
- package/lib/chart/ui/useChartSize.js +91 -0
- package/lib/chart/ui/useChartSize.js.map +1 -0
- package/lib/chart/ui/useChartWindow.d.ts +147 -0
- package/lib/chart/ui/useChartWindow.d.ts.map +1 -0
- package/lib/chart/ui/useChartWindow.js +135 -0
- package/lib/chart/ui/useChartWindow.js.map +1 -0
- package/lib/chart/ui/useChartZoom.d.ts +88 -0
- package/lib/chart/ui/useChartZoom.d.ts.map +1 -0
- package/lib/chart/ui/useChartZoom.js +142 -0
- package/lib/chart/ui/useChartZoom.js.map +1 -0
- package/lib/chart/ui/useWheelListener.d.ts +30 -0
- package/lib/chart/ui/useWheelListener.d.ts.map +1 -0
- package/lib/chart/ui/useWheelListener.js +57 -0
- package/lib/chart/ui/useWheelListener.js.map +1 -0
- package/lib/clipboard/core/copyPng.d.ts +13 -0
- package/lib/clipboard/core/copyPng.d.ts.map +1 -0
- package/lib/clipboard/core/copyPng.js +19 -0
- package/lib/clipboard/core/copyPng.js.map +1 -0
- package/lib/clipboard/core/index.d.ts +1 -0
- package/lib/clipboard/core/index.d.ts.map +1 -1
- package/lib/clipboard/core/index.js +1 -0
- package/lib/clipboard/core/index.js.map +1 -1
- package/lib/clipboard/ui/CopyableValue.d.ts +12 -9
- package/lib/clipboard/ui/CopyableValue.d.ts.map +1 -1
- package/lib/clipboard/ui/CopyableValue.js +11 -15
- package/lib/clipboard/ui/CopyableValue.js.map +1 -1
- package/lib/core.d.ts +1 -0
- package/lib/core.d.ts.map +1 -1
- package/lib/core.js +1 -0
- package/lib/core.js.map +1 -1
- package/lib/download/core/exportStyles.d.ts +22 -0
- package/lib/download/core/exportStyles.d.ts.map +1 -0
- package/lib/download/core/exportStyles.js +19 -0
- package/lib/download/core/exportStyles.js.map +1 -0
- package/lib/download/core/imageResolution.d.ts +88 -0
- package/lib/download/core/imageResolution.d.ts.map +1 -0
- package/lib/download/core/imageResolution.js +77 -0
- package/lib/download/core/imageResolution.js.map +1 -0
- package/lib/download/core/index.d.ts +13 -0
- package/lib/download/core/index.d.ts.map +1 -1
- package/lib/download/core/index.js +8 -0
- package/lib/download/core/index.js.map +1 -1
- package/lib/download/core/pictureExport.d.ts +93 -0
- package/lib/download/core/pictureExport.d.ts.map +1 -0
- package/lib/download/core/pictureExport.js +116 -0
- package/lib/download/core/pictureExport.js.map +1 -0
- package/lib/download/core/stackedDrawing.d.ts +36 -0
- package/lib/download/core/stackedDrawing.d.ts.map +1 -0
- package/lib/download/core/stackedDrawing.js +98 -0
- package/lib/download/core/stackedDrawing.js.map +1 -0
- package/lib/download/core/svgBounds.d.ts +44 -0
- package/lib/download/core/svgBounds.d.ts.map +1 -0
- package/lib/download/core/svgBounds.js +69 -0
- package/lib/download/core/svgBounds.js.map +1 -0
- package/lib/download/core/svgNamespace.d.ts +9 -0
- package/lib/download/core/svgNamespace.d.ts.map +1 -0
- package/lib/download/core/svgNamespace.js +10 -0
- package/lib/download/core/svgNamespace.js.map +1 -0
- package/lib/download/core/svgToPng.d.ts +43 -0
- package/lib/download/core/svgToPng.d.ts.map +1 -0
- package/lib/download/core/svgToPng.js +79 -0
- package/lib/download/core/svgToPng.js.map +1 -0
- package/lib/download/core/svgToString.d.ts +45 -0
- package/lib/download/core/svgToString.d.ts.map +1 -0
- package/lib/download/core/svgToString.js +58 -0
- package/lib/download/core/svgToString.js.map +1 -0
- package/lib/download/ui/ExportDialogFrame.d.ts +46 -0
- package/lib/download/ui/ExportDialogFrame.d.ts.map +1 -0
- package/lib/download/ui/ExportDialogFrame.js +24 -0
- package/lib/download/ui/ExportDialogFrame.js.map +1 -0
- package/lib/download/ui/ExportImageDialog.d.ts +47 -0
- package/lib/download/ui/ExportImageDialog.d.ts.map +1 -0
- package/lib/download/ui/ExportImageDialog.js +25 -0
- package/lib/download/ui/ExportImageDialog.js.map +1 -0
- package/lib/download/ui/ExportNameField.d.ts +29 -0
- package/lib/download/ui/ExportNameField.d.ts.map +1 -0
- package/lib/download/ui/ExportNameField.js +99 -0
- package/lib/download/ui/ExportNameField.js.map +1 -0
- package/lib/download/ui/ExportPictureSection.d.ts +38 -0
- package/lib/download/ui/ExportPictureSection.d.ts.map +1 -0
- package/lib/download/ui/ExportPictureSection.js +48 -0
- package/lib/download/ui/ExportPictureSection.js.map +1 -0
- package/lib/download/ui/index.d.ts +10 -0
- package/lib/download/ui/index.d.ts.map +1 -1
- package/lib/download/ui/index.js +5 -0
- package/lib/download/ui/index.js.map +1 -1
- package/lib/download/ui/useDrawingBox.d.ts +23 -0
- package/lib/download/ui/useDrawingBox.d.ts.map +1 -0
- package/lib/download/ui/useDrawingBox.js +21 -0
- package/lib/download/ui/useDrawingBox.js.map +1 -0
- package/lib/error/core/describeSource.d.ts +17 -0
- package/lib/error/core/describeSource.d.ts.map +1 -0
- package/lib/error/core/describeSource.js +19 -0
- package/lib/error/core/describeSource.js.map +1 -0
- package/lib/error/core/index.d.ts +1 -0
- package/lib/error/core/index.d.ts.map +1 -1
- package/lib/error/core/index.js +1 -0
- package/lib/error/core/index.js.map +1 -1
- package/lib/help/ui/HelpBody.d.ts +10 -1
- package/lib/help/ui/HelpBody.d.ts.map +1 -1
- package/lib/help/ui/HelpBody.js +24 -1
- package/lib/help/ui/HelpBody.js.map +1 -1
- package/lib/help/ui/index.d.ts +1 -1
- package/lib/help/ui/index.d.ts.map +1 -1
- package/lib/help/ui/index.js.map +1 -1
- package/lib/ir/core/analysisSpectra.d.ts +46 -0
- package/lib/ir/core/analysisSpectra.d.ts.map +1 -0
- package/lib/ir/core/analysisSpectra.js +187 -0
- package/lib/ir/core/analysisSpectra.js.map +1 -0
- package/lib/ir/core/assignBands.d.ts +83 -0
- package/lib/ir/core/assignBands.d.ts.map +1 -0
- package/lib/ir/core/assignBands.js +83 -0
- package/lib/ir/core/assignBands.js.map +1 -0
- package/lib/ir/core/bandAssignments.d.ts +47 -0
- package/lib/ir/core/bandAssignments.d.ts.map +1 -0
- package/lib/ir/core/bandAssignments.js +305 -0
- package/lib/ir/core/bandAssignments.js.map +1 -0
- package/lib/ir/core/bandLabelPlan.d.ts +93 -0
- package/lib/ir/core/bandLabelPlan.d.ts.map +1 -0
- package/lib/ir/core/bandLabelPlan.js +104 -0
- package/lib/ir/core/bandLabelPlan.js.map +1 -0
- package/lib/ir/core/detectIrFormat.d.ts +23 -0
- package/lib/ir/core/detectIrFormat.d.ts.map +1 -0
- package/lib/ir/core/detectIrFormat.js +133 -0
- package/lib/ir/core/detectIrFormat.js.map +1 -0
- package/lib/ir/core/downloadSpectra.d.ts +26 -0
- package/lib/ir/core/downloadSpectra.d.ts.map +1 -0
- package/lib/ir/core/downloadSpectra.js +37 -0
- package/lib/ir/core/downloadSpectra.js.map +1 -0
- package/lib/ir/core/fromJcamp.d.ts +35 -0
- package/lib/ir/core/fromJcamp.d.ts.map +1 -0
- package/lib/ir/core/fromJcamp.js +48 -0
- package/lib/ir/core/fromJcamp.js.map +1 -0
- package/lib/ir/core/fromSpc.d.ts +30 -0
- package/lib/ir/core/fromSpc.d.ts.map +1 -0
- package/lib/ir/core/fromSpc.js +40 -0
- package/lib/ir/core/fromSpc.js.map +1 -0
- package/lib/ir/core/index.d.ts +51 -0
- package/lib/ir/core/index.d.ts.map +1 -0
- package/lib/ir/core/index.js +35 -0
- package/lib/ir/core/index.js.map +1 -0
- package/lib/ir/core/irBand.d.ts +45 -0
- package/lib/ir/core/irBand.d.ts.map +1 -0
- package/lib/ir/core/irBand.js +30 -0
- package/lib/ir/core/irBand.js.map +1 -0
- package/lib/ir/core/irCommands.d.ts +168 -0
- package/lib/ir/core/irCommands.d.ts.map +1 -0
- package/lib/ir/core/irCommands.js +94 -0
- package/lib/ir/core/irCommands.js.map +1 -0
- package/lib/ir/core/irDomain.d.ts +63 -0
- package/lib/ir/core/irDomain.d.ts.map +1 -0
- package/lib/ir/core/irDomain.js +136 -0
- package/lib/ir/core/irDomain.js.map +1 -0
- package/lib/ir/core/irEditorApi.d.ts +42 -0
- package/lib/ir/core/irEditorApi.d.ts.map +1 -0
- package/lib/ir/core/irEditorApi.js +10 -0
- package/lib/ir/core/irEditorApi.js.map +1 -0
- package/lib/ir/core/irFormat.d.ts +42 -0
- package/lib/ir/core/irFormat.d.ts.map +1 -0
- package/lib/ir/core/irFormat.js +51 -0
- package/lib/ir/core/irFormat.js.map +1 -0
- package/lib/ir/core/irMode.d.ts +160 -0
- package/lib/ir/core/irMode.d.ts.map +1 -0
- package/lib/ir/core/irMode.js +175 -0
- package/lib/ir/core/irMode.js.map +1 -0
- package/lib/ir/core/irReducer.d.ts +101 -0
- package/lib/ir/core/irReducer.d.ts.map +1 -0
- package/lib/ir/core/irReducer.js +207 -0
- package/lib/ir/core/irReducer.js.map +1 -0
- package/lib/ir/core/irSidePanels.d.ts +22 -0
- package/lib/ir/core/irSidePanels.d.ts.map +1 -0
- package/lib/ir/core/irSidePanels.js +12 -0
- package/lib/ir/core/irSidePanels.js.map +1 -0
- package/lib/ir/core/irSpectrum.d.ts +140 -0
- package/lib/ir/core/irSpectrum.d.ts.map +1 -0
- package/lib/ir/core/irSpectrum.js +34 -0
- package/lib/ir/core/irSpectrum.js.map +1 -0
- package/lib/ir/core/irState.d.ts +119 -0
- package/lib/ir/core/irState.d.ts.map +1 -0
- package/lib/ir/core/irState.js +92 -0
- package/lib/ir/core/irState.js.map +1 -0
- package/lib/ir/core/loadIrSpectra.d.ts +36 -0
- package/lib/ir/core/loadIrSpectra.d.ts.map +1 -0
- package/lib/ir/core/loadIrSpectra.js +44 -0
- package/lib/ir/core/loadIrSpectra.js.map +1 -0
- package/lib/ir/core/nearestBand.d.ts +35 -0
- package/lib/ir/core/nearestBand.d.ts.map +1 -0
- package/lib/ir/core/nearestBand.js +47 -0
- package/lib/ir/core/nearestBand.js.map +1 -0
- package/lib/ir/core/pickBands.d.ts +70 -0
- package/lib/ir/core/pickBands.d.ts.map +1 -0
- package/lib/ir/core/pickBands.js +125 -0
- package/lib/ir/core/pickBands.js.map +1 -0
- package/lib/ir/core/spectrumJcamp.d.ts +58 -0
- package/lib/ir/core/spectrumJcamp.d.ts.map +1 -0
- package/lib/ir/core/spectrumJcamp.js +156 -0
- package/lib/ir/core/spectrumJcamp.js.map +1 -0
- package/lib/ir/core/toIrSpectrum.d.ts +59 -0
- package/lib/ir/core/toIrSpectrum.d.ts.map +1 -0
- package/lib/ir/core/toIrSpectrum.js +56 -0
- package/lib/ir/core/toIrSpectrum.js.map +1 -0
- package/lib/ir/ui/BandMarks.d.ts +52 -0
- package/lib/ir/ui/BandMarks.d.ts.map +1 -0
- package/lib/ir/ui/BandMarks.js +71 -0
- package/lib/ir/ui/BandMarks.js.map +1 -0
- package/lib/ir/ui/BandsPanel.d.ts +31 -0
- package/lib/ir/ui/BandsPanel.d.ts.map +1 -0
- package/lib/ir/ui/BandsPanel.js +94 -0
- package/lib/ir/ui/BandsPanel.js.map +1 -0
- package/lib/ir/ui/IrAboutDialog.d.ts +18 -0
- package/lib/ir/ui/IrAboutDialog.d.ts.map +1 -0
- package/lib/ir/ui/IrAboutDialog.js +32 -0
- package/lib/ir/ui/IrAboutDialog.js.map +1 -0
- package/lib/ir/ui/IrCanvas.d.ts +38 -0
- package/lib/ir/ui/IrCanvas.d.ts.map +1 -0
- package/lib/ir/ui/IrCanvas.js +41 -0
- package/lib/ir/ui/IrCanvas.js.map +1 -0
- package/lib/ir/ui/IrChart.d.ts +28 -0
- package/lib/ir/ui/IrChart.d.ts.map +1 -0
- package/lib/ir/ui/IrChart.js +114 -0
- package/lib/ir/ui/IrChart.js.map +1 -0
- package/lib/ir/ui/IrCommandProvider.d.ts +15 -0
- package/lib/ir/ui/IrCommandProvider.d.ts.map +1 -0
- package/lib/ir/ui/IrCommandProvider.js +14 -0
- package/lib/ir/ui/IrCommandProvider.js.map +1 -0
- package/lib/ir/ui/IrCommandTooltip.d.ts +16 -0
- package/lib/ir/ui/IrCommandTooltip.d.ts.map +1 -0
- package/lib/ir/ui/IrCommandTooltip.js +22 -0
- package/lib/ir/ui/IrCommandTooltip.js.map +1 -0
- package/lib/ir/ui/IrDocumentationDialog.d.ts +18 -0
- package/lib/ir/ui/IrDocumentationDialog.d.ts.map +1 -0
- package/lib/ir/ui/IrDocumentationDialog.js +68 -0
- package/lib/ir/ui/IrDocumentationDialog.js.map +1 -0
- package/lib/ir/ui/IrEditor.d.ts +60 -0
- package/lib/ir/ui/IrEditor.d.ts.map +1 -0
- package/lib/ir/ui/IrEditor.js +42 -0
- package/lib/ir/ui/IrEditor.js.map +1 -0
- package/lib/ir/ui/IrHeader.d.ts +13 -0
- package/lib/ir/ui/IrHeader.d.ts.map +1 -0
- package/lib/ir/ui/IrHeader.js +21 -0
- package/lib/ir/ui/IrHeader.js.map +1 -0
- package/lib/ir/ui/IrLogo.d.ts +20 -0
- package/lib/ir/ui/IrLogo.d.ts.map +1 -0
- package/lib/ir/ui/IrLogo.js +17 -0
- package/lib/ir/ui/IrLogo.js.map +1 -0
- package/lib/ir/ui/IrPointerTracker.d.ts +29 -0
- package/lib/ir/ui/IrPointerTracker.d.ts.map +1 -0
- package/lib/ir/ui/IrPointerTracker.js +47 -0
- package/lib/ir/ui/IrPointerTracker.js.map +1 -0
- package/lib/ir/ui/IrShell.d.ts +25 -0
- package/lib/ir/ui/IrShell.d.ts.map +1 -0
- package/lib/ir/ui/IrShell.js +178 -0
- package/lib/ir/ui/IrShell.js.map +1 -0
- package/lib/ir/ui/IrSidePanel.d.ts +26 -0
- package/lib/ir/ui/IrSidePanel.d.ts.map +1 -0
- package/lib/ir/ui/IrSidePanel.js +39 -0
- package/lib/ir/ui/IrSidePanel.js.map +1 -0
- package/lib/ir/ui/IrStateProvider.d.ts +19 -0
- package/lib/ir/ui/IrStateProvider.d.ts.map +1 -0
- package/lib/ir/ui/IrStateProvider.js +16 -0
- package/lib/ir/ui/IrStateProvider.js.map +1 -0
- package/lib/ir/ui/IrStatusBar.d.ts +14 -0
- package/lib/ir/ui/IrStatusBar.d.ts.map +1 -0
- package/lib/ir/ui/IrStatusBar.js +48 -0
- package/lib/ir/ui/IrStatusBar.js.map +1 -0
- package/lib/ir/ui/IrToolbar.d.ts +18 -0
- package/lib/ir/ui/IrToolbar.d.ts.map +1 -0
- package/lib/ir/ui/IrToolbar.js +32 -0
- package/lib/ir/ui/IrToolbar.js.map +1 -0
- package/lib/ir/ui/IrTraces.d.ts +63 -0
- package/lib/ir/ui/IrTraces.d.ts.map +1 -0
- package/lib/ir/ui/IrTraces.js +72 -0
- package/lib/ir/ui/IrTraces.js.map +1 -0
- package/lib/ir/ui/MetadataPanel.d.ts +15 -0
- package/lib/ir/ui/MetadataPanel.d.ts.map +1 -0
- package/lib/ir/ui/MetadataPanel.js +49 -0
- package/lib/ir/ui/MetadataPanel.js.map +1 -0
- package/lib/ir/ui/SpectraPanel.d.ts +20 -0
- package/lib/ir/ui/SpectraPanel.d.ts.map +1 -0
- package/lib/ir/ui/SpectraPanel.js +42 -0
- package/lib/ir/ui/SpectraPanel.js.map +1 -0
- package/lib/ir/ui/SpectrumRow.d.ts +26 -0
- package/lib/ir/ui/SpectrumRow.d.ts.map +1 -0
- package/lib/ir/ui/SpectrumRow.js +41 -0
- package/lib/ir/ui/SpectrumRow.js.map +1 -0
- package/lib/ir/ui/index.d.ts +56 -0
- package/lib/ir/ui/index.d.ts.map +1 -0
- package/lib/ir/ui/index.js +36 -0
- package/lib/ir/ui/index.js.map +1 -0
- package/lib/ir/ui/irActions.d.ts +52 -0
- package/lib/ir/ui/irActions.d.ts.map +1 -0
- package/lib/ir/ui/irActions.js +62 -0
- package/lib/ir/ui/irActions.js.map +1 -0
- package/lib/ir/ui/irChartProps.d.ts +116 -0
- package/lib/ir/ui/irChartProps.d.ts.map +1 -0
- package/lib/ir/ui/irChartProps.js +14 -0
- package/lib/ir/ui/irChartProps.js.map +1 -0
- package/lib/ir/ui/irCommandContext.d.ts +35 -0
- package/lib/ir/ui/irCommandContext.d.ts.map +1 -0
- package/lib/ir/ui/irCommandContext.js +44 -0
- package/lib/ir/ui/irCommandContext.js.map +1 -0
- package/lib/ir/ui/irStateContext.d.ts +26 -0
- package/lib/ir/ui/irStateContext.d.ts.map +1 -0
- package/lib/ir/ui/irStateContext.js +37 -0
- package/lib/ir/ui/irStateContext.js.map +1 -0
- package/lib/ir/ui/useIrEditor.d.ts +51 -0
- package/lib/ir/ui/useIrEditor.d.ts.map +1 -0
- package/lib/ir/ui/useIrEditor.js +88 -0
- package/lib/ir/ui/useIrEditor.js.map +1 -0
- package/lib/ir/ui/useIrPointer.d.ts +66 -0
- package/lib/ir/ui/useIrPointer.d.ts.map +1 -0
- package/lib/ir/ui/useIrPointer.js +53 -0
- package/lib/ir/ui/useIrPointer.js.map +1 -0
- package/lib/ir/ui/useIrShortcuts.d.ts +24 -0
- package/lib/ir/ui/useIrShortcuts.d.ts.map +1 -0
- package/lib/ir/ui/useIrShortcuts.js +73 -0
- package/lib/ir/ui/useIrShortcuts.js.map +1 -0
- package/lib/ir/ui/useIrZoom.d.ts +51 -0
- package/lib/ir/ui/useIrZoom.d.ts.map +1 -0
- package/lib/ir/ui/useIrZoom.js +46 -0
- package/lib/ir/ui/useIrZoom.js.map +1 -0
- package/lib/ir.d.ts +13 -0
- package/lib/ir.d.ts.map +1 -0
- package/lib/ir.js +13 -0
- package/lib/ir.js.map +1 -0
- package/lib/panel/core/dialogStyles.d.ts +13 -0
- package/lib/panel/core/dialogStyles.d.ts.map +1 -0
- package/lib/panel/core/dialogStyles.js +11 -0
- package/lib/panel/core/dialogStyles.js.map +1 -0
- package/lib/panel/core/index.d.ts +19 -0
- package/lib/panel/core/index.d.ts.map +1 -0
- package/lib/panel/core/index.js +18 -0
- package/lib/panel/core/index.js.map +1 -0
- package/lib/panel/core/isEditingField.d.ts +17 -0
- package/lib/panel/core/isEditingField.d.ts.map +1 -0
- package/lib/panel/core/isEditingField.js +25 -0
- package/lib/panel/core/isEditingField.js.map +1 -0
- package/lib/panel/core/panelStyles.d.ts +242 -0
- package/lib/panel/core/panelStyles.d.ts.map +1 -0
- package/lib/panel/core/panelStyles.js +228 -0
- package/lib/panel/core/panelStyles.js.map +1 -0
- package/lib/panel/core/rowSpacers.d.ts +38 -0
- package/lib/panel/core/rowSpacers.d.ts.map +1 -0
- package/lib/panel/core/rowSpacers.js +31 -0
- package/lib/panel/core/rowSpacers.js.map +1 -0
- package/lib/panel/core/statusBar.d.ts +44 -0
- package/lib/panel/core/statusBar.d.ts.map +1 -0
- package/lib/panel/core/statusBar.js +40 -0
- package/lib/panel/core/statusBar.js.map +1 -0
- package/lib/panel/core/textFilter.d.ts +22 -0
- package/lib/panel/core/textFilter.d.ts.map +1 -0
- package/lib/panel/core/textFilter.js +32 -0
- package/lib/panel/core/textFilter.js.map +1 -0
- package/lib/panel/core/yieldToPainting.d.ts +17 -0
- package/lib/panel/core/yieldToPainting.d.ts.map +1 -0
- package/lib/panel/core/yieldToPainting.js +21 -0
- package/lib/panel/core/yieldToPainting.js.map +1 -0
- package/lib/panel/ui/AboutDialogFrame.d.ts +36 -0
- package/lib/panel/ui/AboutDialogFrame.d.ts.map +1 -0
- package/lib/panel/ui/AboutDialogFrame.js +43 -0
- package/lib/panel/ui/AboutDialogFrame.js.map +1 -0
- package/lib/panel/ui/ClearButton.d.ts +28 -0
- package/lib/panel/ui/ClearButton.d.ts.map +1 -0
- package/lib/panel/ui/ClearButton.js +23 -0
- package/lib/panel/ui/ClearButton.js.map +1 -0
- package/lib/panel/ui/DocumentationDialogFrame.d.ts +39 -0
- package/lib/panel/ui/DocumentationDialogFrame.d.ts.map +1 -0
- package/lib/panel/ui/DocumentationDialogFrame.js +29 -0
- package/lib/panel/ui/DocumentationDialogFrame.js.map +1 -0
- package/lib/panel/ui/FilterInput.d.ts +31 -0
- package/lib/panel/ui/FilterInput.d.ts.map +1 -0
- package/lib/panel/ui/FilterInput.js +23 -0
- package/lib/panel/ui/FilterInput.js.map +1 -0
- package/lib/panel/ui/HelpLabel.d.ts +24 -0
- package/lib/panel/ui/HelpLabel.d.ts.map +1 -0
- package/lib/panel/ui/HelpLabel.js +23 -0
- package/lib/panel/ui/HelpLabel.js.map +1 -0
- package/lib/panel/ui/PanelMessage.d.ts +41 -0
- package/lib/panel/ui/PanelMessage.d.ts.map +1 -0
- package/lib/panel/ui/PanelMessage.js +30 -0
- package/lib/panel/ui/PanelMessage.js.map +1 -0
- package/lib/panel/ui/PanelRail.d.ts +41 -0
- package/lib/panel/ui/PanelRail.d.ts.map +1 -0
- package/lib/panel/ui/PanelRail.js +12 -0
- package/lib/panel/ui/PanelRail.js.map +1 -0
- package/lib/panel/ui/Section.d.ts +25 -0
- package/lib/panel/ui/Section.d.ts.map +1 -0
- package/lib/panel/ui/Section.js +41 -0
- package/lib/panel/ui/Section.js.map +1 -0
- package/lib/panel/ui/SidePanelStack.d.ts +62 -0
- package/lib/panel/ui/SidePanelStack.d.ts.map +1 -0
- package/lib/panel/ui/SidePanelStack.js +40 -0
- package/lib/panel/ui/SidePanelStack.js.map +1 -0
- package/lib/panel/ui/SpectrumColorSwatch.d.ts +33 -0
- package/lib/panel/ui/SpectrumColorSwatch.d.ts.map +1 -0
- package/lib/panel/ui/SpectrumColorSwatch.js +76 -0
- package/lib/panel/ui/SpectrumColorSwatch.js.map +1 -0
- package/lib/panel/ui/index.d.ts +37 -0
- package/lib/panel/ui/index.d.ts.map +1 -0
- package/lib/panel/ui/index.js +24 -0
- package/lib/panel/ui/index.js.map +1 -0
- package/lib/panel/ui/useConfirmOnEnter.d.ts +19 -0
- package/lib/panel/ui/useConfirmOnEnter.d.ts.map +1 -0
- package/lib/panel/ui/useConfirmOnEnter.js +64 -0
- package/lib/panel/ui/useConfirmOnEnter.js.map +1 -0
- package/lib/panel/ui/useFilterBox.d.ts +23 -0
- package/lib/panel/ui/useFilterBox.d.ts.map +1 -0
- package/lib/panel/ui/useFilterBox.js +22 -0
- package/lib/panel/ui/useFilterBox.js.map +1 -0
- package/lib/panel/ui/useVirtualRows.d.ts +46 -0
- package/lib/panel/ui/useVirtualRows.d.ts.map +1 -0
- package/lib/panel/ui/useVirtualRows.js +56 -0
- package/lib/panel/ui/useVirtualRows.js.map +1 -0
- package/lib/panel/ui/useVirtualWindowRows.d.ts +40 -0
- package/lib/panel/ui/useVirtualWindowRows.d.ts.map +1 -0
- package/lib/panel/ui/useVirtualWindowRows.js +65 -0
- package/lib/panel/ui/useVirtualWindowRows.js.map +1 -0
- package/lib/ui.d.ts +1 -0
- package/lib/ui.d.ts.map +1 -1
- package/lib/ui.js +1 -0
- package/lib/ui.js.map +1 -1
- package/package.json +8 -1
- package/src/chart/core/axisLabels.ts +117 -0
- package/src/chart/core/boxLayout.ts +126 -0
- package/src/chart/core/chartAxisScale.ts +92 -10
- package/src/chart/core/chartDomain.ts +185 -0
- package/src/chart/core/chartGeometry.ts +159 -0
- package/src/chart/core/chartPane.ts +10 -0
- package/src/chart/core/chartScale.ts +7 -4
- package/src/chart/core/chartTheme.ts +161 -0
- package/src/chart/core/chartViewport.ts +40 -13
- package/src/chart/core/guidePlacement.ts +66 -0
- package/src/chart/core/index.ts +121 -2
- package/src/chart/core/labelStack.ts +72 -0
- package/src/chart/core/legendBox.ts +263 -0
- package/src/chart/core/selectionGeometry.ts +68 -0
- package/src/chart/core/spectrumColor.ts +129 -0
- package/src/chart/core/stackCapacity.ts +162 -0
- package/src/chart/core/svgPoint.ts +77 -0
- package/src/chart/core/tracePath.ts +228 -0
- package/src/chart/core/trackerReadout.ts +78 -0
- package/src/chart/core/viewTransform.ts +287 -0
- package/src/chart/core/zoomDomain.ts +235 -0
- package/src/chart/ui/Axes.tsx +361 -0
- package/src/chart/ui/AxisGuide.tsx +187 -0
- package/src/chart/ui/ChartStack.tsx +130 -0
- package/src/chart/ui/ChartTracker.tsx +101 -0
- package/src/chart/ui/PlotCaption.tsx +108 -0
- package/src/chart/ui/SelectionRect.tsx +52 -0
- package/src/chart/ui/TraceLegend.tsx +193 -0
- package/src/chart/ui/chartGestures.ts +270 -0
- package/src/chart/ui/chartStackLevel.tsx +210 -0
- package/src/chart/ui/chartSurface.ts +66 -0
- package/src/chart/ui/index.ts +35 -0
- package/src/chart/ui/useChartPointer.ts +223 -0
- package/src/chart/ui/useChartSize.ts +115 -0
- package/src/chart/ui/useChartWindow.ts +240 -0
- package/src/chart/ui/useChartZoom.ts +255 -0
- package/src/chart/ui/useWheelListener.ts +62 -0
- package/src/clipboard/core/copyPng.ts +20 -0
- package/src/clipboard/core/index.ts +1 -0
- package/src/clipboard/ui/CopyableValue.tsx +22 -35
- package/src/core.ts +1 -0
- package/src/download/core/exportStyles.ts +20 -0
- package/src/download/core/imageResolution.ts +118 -0
- package/src/download/core/index.ts +34 -0
- package/src/download/core/pictureExport.ts +207 -0
- package/src/download/core/stackedDrawing.ts +108 -0
- package/src/download/core/svgBounds.ts +80 -0
- package/src/download/core/svgNamespace.ts +9 -0
- package/src/download/core/svgToPng.ts +121 -0
- package/src/download/core/svgToString.ts +95 -0
- package/src/download/ui/ExportDialogFrame.tsx +86 -0
- package/src/download/ui/ExportImageDialog.tsx +91 -0
- package/src/download/ui/ExportNameField.tsx +148 -0
- package/src/download/ui/ExportPictureSection.tsx +142 -0
- package/src/download/ui/index.ts +11 -0
- package/src/download/ui/useDrawingBox.ts +37 -0
- package/src/error/core/describeSource.ts +18 -0
- package/src/error/core/index.ts +1 -0
- package/src/help/ui/HelpBody.tsx +41 -2
- package/src/help/ui/index.ts +6 -1
- package/src/ir/core/analysisSpectra.ts +231 -0
- package/src/ir/core/assignBands.ts +144 -0
- package/src/ir/core/bandAssignments.ts +329 -0
- package/src/ir/core/bandLabelPlan.ts +194 -0
- package/src/ir/core/detectIrFormat.ts +139 -0
- package/src/ir/core/downloadSpectra.ts +57 -0
- package/src/ir/core/fromJcamp.ts +70 -0
- package/src/ir/core/fromSpc.ts +61 -0
- package/src/ir/core/index.ts +113 -0
- package/src/ir/core/irBand.ts +57 -0
- package/src/ir/core/irCommands.ts +154 -0
- package/src/ir/core/irDomain.ts +163 -0
- package/src/ir/core/irEditorApi.ts +44 -0
- package/src/ir/core/irFormat.ts +57 -0
- package/src/ir/core/irMode.ts +203 -0
- package/src/ir/core/irReducer.ts +273 -0
- package/src/ir/core/irSidePanels.ts +20 -0
- package/src/ir/core/irSpectrum.ts +155 -0
- package/src/ir/core/irState.ts +173 -0
- package/src/ir/core/loadIrSpectra.ts +79 -0
- package/src/ir/core/nearestBand.ts +57 -0
- package/src/ir/core/pickBands.ts +181 -0
- package/src/ir/core/spectrumJcamp.ts +178 -0
- package/src/ir/core/toIrSpectrum.ts +102 -0
- package/src/ir/ui/BandMarks.tsx +166 -0
- package/src/ir/ui/BandsPanel.tsx +271 -0
- package/src/ir/ui/IrAboutDialog.tsx +121 -0
- package/src/ir/ui/IrCanvas.tsx +91 -0
- package/src/ir/ui/IrChart.tsx +215 -0
- package/src/ir/ui/IrCommandProvider.tsx +32 -0
- package/src/ir/ui/IrCommandTooltip.tsx +36 -0
- package/src/ir/ui/IrDocumentationDialog.tsx +174 -0
- package/src/ir/ui/IrEditor.tsx +99 -0
- package/src/ir/ui/IrHeader.tsx +39 -0
- package/src/ir/ui/IrLogo.tsx +49 -0
- package/src/ir/ui/IrPointerTracker.tsx +102 -0
- package/src/ir/ui/IrShell.tsx +285 -0
- package/src/ir/ui/IrSidePanel.tsx +78 -0
- package/src/ir/ui/IrStateProvider.tsx +32 -0
- package/src/ir/ui/IrStatusBar.tsx +97 -0
- package/src/ir/ui/IrToolbar.tsx +102 -0
- package/src/ir/ui/IrTraces.tsx +134 -0
- package/src/ir/ui/MetadataPanel.tsx +88 -0
- package/src/ir/ui/SpectraPanel.tsx +114 -0
- package/src/ir/ui/SpectrumRow.tsx +127 -0
- package/src/ir/ui/index.ts +56 -0
- package/src/ir/ui/irActions.ts +103 -0
- package/src/ir/ui/irChartProps.ts +118 -0
- package/src/ir/ui/irCommandContext.tsx +62 -0
- package/src/ir/ui/irStateContext.ts +48 -0
- package/src/ir/ui/useIrEditor.ts +139 -0
- package/src/ir/ui/useIrPointer.ts +109 -0
- package/src/ir/ui/useIrShortcuts.ts +95 -0
- package/src/ir/ui/useIrZoom.ts +86 -0
- package/src/ir.ts +13 -0
- package/src/panel/core/dialogStyles.ts +11 -0
- package/src/panel/core/index.ts +47 -0
- package/src/panel/core/isEditingField.ts +23 -0
- package/src/panel/core/panelStyles.ts +248 -0
- package/src/panel/core/rowSpacers.ts +50 -0
- package/src/panel/core/statusBar.ts +48 -0
- package/src/panel/core/textFilter.ts +33 -0
- package/src/panel/core/yieldToPainting.ts +20 -0
- package/src/panel/ui/AboutDialogFrame.tsx +100 -0
- package/src/panel/ui/ClearButton.tsx +42 -0
- package/src/panel/ui/DocumentationDialogFrame.tsx +86 -0
- package/src/panel/ui/FilterInput.tsx +60 -0
- package/src/panel/ui/HelpLabel.tsx +43 -0
- package/src/panel/ui/PanelMessage.tsx +64 -0
- package/src/panel/ui/PanelRail.tsx +64 -0
- package/src/panel/ui/Section.tsx +66 -0
- package/src/panel/ui/SidePanelStack.tsx +109 -0
- package/src/panel/ui/SpectrumColorSwatch.tsx +119 -0
- package/src/panel/ui/index.ts +47 -0
- package/src/panel/ui/useConfirmOnEnter.ts +68 -0
- package/src/panel/ui/useFilterBox.ts +35 -0
- package/src/panel/ui/useVirtualRows.ts +82 -0
- package/src/panel/ui/useVirtualWindowRows.ts +86 -0
- package/src/ui.ts +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IrShell.js","sourceRoot":"","sources":["../../../src/ir/ui/IrShell.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5E,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAE5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAyC,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA8B,CAAC;AAGzD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAExD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAqB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAgB,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAyB,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA6B,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,M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AC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IAC1E,OAAO,KAAK,KAAK,SAAS;QACxB,CAAC,CAAC,SAAS;QACX,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;AAC/C,CAAC;AAED,MAAM,SAAS,GAAG;IAChB,OAAO,EAAE,MAAM;IACf,aAAa,EAAE,QAAQ;IACvB,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,MAAM;IACd,SAAS,EAAE,CAAC;IACZ,OAAO,EAAE,MAAM;CACP,CAAC;AAEX,MAAM,SAAS,GAAG;IAChB,OAAO,EAAE,MAAM;IACf,IAAI,EAAE,SAAS;IACf,QAAQ,EAAE,CAAC;IACX,SAAS,EAAE,CAAC;CACJ,CAAC;AAEX,MAAM,SAAS,GAAG,EAAE,IAAI,EAAE,MAAM,EAAW,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { IrBand } from '../core/irBand.ts';
|
|
2
|
+
export interface IrSidePanelProps {
|
|
3
|
+
/**
|
|
4
|
+
* The band the pointer is resting on.
|
|
5
|
+
* @default null
|
|
6
|
+
*/
|
|
7
|
+
highlight?: IrBand | null;
|
|
8
|
+
/**
|
|
9
|
+
* Told when a row is hovered.
|
|
10
|
+
* @default undefined
|
|
11
|
+
*/
|
|
12
|
+
onHighlight?: (band: IrBand | null) => void;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* The panels that are open, stacked down the right.
|
|
16
|
+
*
|
|
17
|
+
* Every open panel gets a share of the height rather than a turn, because the
|
|
18
|
+
* things they hold are read together: which spectrum is selected and what its
|
|
19
|
+
* bands are is one question asked of two panels. The header carries the close
|
|
20
|
+
* button and nothing else — a panel's own actions are a toolbar inside its body,
|
|
21
|
+
* so they travel with it.
|
|
22
|
+
* @param props - Component props.
|
|
23
|
+
* @returns The panel stack.
|
|
24
|
+
*/
|
|
25
|
+
export declare function IrSidePanel(props: IrSidePanelProps): import("react").JSX.Element;
|
|
26
|
+
//# sourceMappingURL=IrSidePanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IrSidePanel.d.ts","sourceRoot":"","sources":["../../../src/ir/ui/IrSidePanel.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAShD,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CAC7C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,+BAqBlD"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { SidePanelStack } from "../../panel/ui/SidePanelStack.js";
|
|
3
|
+
import { irSidePanels } from "../core/irSidePanels.js";
|
|
4
|
+
import { BandsPanel } from "./BandsPanel.js";
|
|
5
|
+
import { MetadataPanel } from "./MetadataPanel.js";
|
|
6
|
+
import { SpectraPanel } from "./SpectraPanel.js";
|
|
7
|
+
import { useIrActions, useIrEditorState } from "./irStateContext.js";
|
|
8
|
+
/**
|
|
9
|
+
* The panels that are open, stacked down the right.
|
|
10
|
+
*
|
|
11
|
+
* Every open panel gets a share of the height rather than a turn, because the
|
|
12
|
+
* things they hold are read together: which spectrum is selected and what its
|
|
13
|
+
* bands are is one question asked of two panels. The header carries the close
|
|
14
|
+
* button and nothing else — a panel's own actions are a toolbar inside its body,
|
|
15
|
+
* so they travel with it.
|
|
16
|
+
* @param props - Component props.
|
|
17
|
+
* @returns The panel stack.
|
|
18
|
+
*/
|
|
19
|
+
export function IrSidePanel(props) {
|
|
20
|
+
const { highlight = null, onHighlight } = props;
|
|
21
|
+
const { state } = useIrEditorState();
|
|
22
|
+
const actions = useIrActions();
|
|
23
|
+
const { openPanelIds } = state.view;
|
|
24
|
+
return (_jsx(SidePanelStack, { panels: irSidePanels, openPanelIds: openPanelIds, onClose: actions.togglePanel, children: (panel) => (_jsx(PanelBody, { panelId: panel.id, highlight: highlight, onHighlight: onHighlight })) }));
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Which panel a panel id is.
|
|
28
|
+
* @param props - Component props.
|
|
29
|
+
* @returns The panel's body.
|
|
30
|
+
*/
|
|
31
|
+
function PanelBody(props) {
|
|
32
|
+
const { panelId, highlight, onHighlight } = props;
|
|
33
|
+
if (panelId === 'spectra')
|
|
34
|
+
return _jsx(SpectraPanel, {});
|
|
35
|
+
if (panelId === 'metadata')
|
|
36
|
+
return _jsx(MetadataPanel, {});
|
|
37
|
+
return _jsx(BandsPanel, { highlight: highlight, onHighlight: onHighlight });
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=IrSidePanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IrSidePanel.js","sourceRoot":"","sources":["../../../src/ir/ui/IrSidePanel.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAmC,CAAC;AAGnE,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAkB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAqB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAoB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAerE;;;;;;;;;;GAUG;AACH,MAAM,UAAU,WAAW,CAAC,KAAuB;IACjD,MAAM,EAAE,SAAS,GAAG,IAAI,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC;IAChD,MAAM,EAAE,KAAK,EAAE,GAAG,gBAAgB,EAAE,CAAC;IACrC,MAAM,OAAO,GAAG,YAAY,EAAE,CAAC;IAC/B,MAAM,EAAE,YAAY,EAAE,GAAG,KAAK,CAAC,IAAI,CAAC;IAEpC,OAAO,CACL,KAAC,cAAc,IACb,MAAM,EAAE,YAAY,EACpB,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,OAAO,CAAC,WAAW,YAE3B,CAAC,KAAK,EAAE,EAAE,CAAC,CACV,KAAC,SAAS,IACR,OAAO,EAAE,KAAK,CAAC,EAAE,EACjB,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,WAAW,GACxB,CACH,GACc,CAClB,CAAC;AACJ,CAAC;AAWD;;;;GAIG;AACH,SAAS,SAAS,CAAC,KAAqB;IACtC,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC;IAElD,IAAI,OAAO,KAAK,SAAS;QAAE,OAAO,KAAC,YAAY,KAAG,CAAC;IACnD,IAAI,OAAO,KAAK,UAAU;QAAE,OAAO,KAAC,aAAa,KAAG,CAAC;IACrD,OAAO,KAAC,UAAU,IAAC,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,GAAI,CAAC;AACxE,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { IrEditorApi } from './useIrEditor.ts';
|
|
3
|
+
export interface IrStateProviderProps {
|
|
4
|
+
/** The viewer's state, as `useIrEditor` holds it. */
|
|
5
|
+
editor: IrEditorApi;
|
|
6
|
+
/** The viewer. */
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Put one viewer's state where its panels can reach it.
|
|
11
|
+
*
|
|
12
|
+
* The state and the actions go into separate contexts on purpose — see
|
|
13
|
+
* `irStateContext.ts` for why — and the actions are handed over as they are,
|
|
14
|
+
* since `useIrEditor` already keeps them stable for the life of the viewer.
|
|
15
|
+
* @param props - Component props.
|
|
16
|
+
* @returns The provider.
|
|
17
|
+
*/
|
|
18
|
+
export declare function IrStateProvider(props: IrStateProviderProps): import("react").JSX.Element;
|
|
19
|
+
//# sourceMappingURL=IrStateProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IrStateProvider.d.ts","sourceRoot":"","sources":["../../../src/ir/ui/IrStateProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,MAAM,WAAW,oBAAoB;IACnC,qDAAqD;IACrD,MAAM,EAAE,WAAW,CAAC;IACpB,kBAAkB;IAClB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,+BAU1D"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { actionsContext, stateContext } from "./irStateContext.js";
|
|
3
|
+
/**
|
|
4
|
+
* Put one viewer's state where its panels can reach it.
|
|
5
|
+
*
|
|
6
|
+
* The state and the actions go into separate contexts on purpose — see
|
|
7
|
+
* `irStateContext.ts` for why — and the actions are handed over as they are,
|
|
8
|
+
* since `useIrEditor` already keeps them stable for the life of the viewer.
|
|
9
|
+
* @param props - Component props.
|
|
10
|
+
* @returns The provider.
|
|
11
|
+
*/
|
|
12
|
+
export function IrStateProvider(props) {
|
|
13
|
+
const { editor, children } = props;
|
|
14
|
+
return (_jsx(stateContext.Provider, { value: editor, children: _jsx(actionsContext.Provider, { value: editor.actions, children: children }) }));
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=IrStateProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IrStateProvider.js","sourceRoot":"","sources":["../../../src/ir/ui/IrStateProvider.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAUnE;;;;;;;;GAQG;AACH,MAAM,UAAU,eAAe,CAAC,KAA2B;IACzD,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAEnC,OAAO,CACL,KAAC,YAAY,CAAC,QAAQ,IAAC,KAAK,EAAE,MAAM,YAClC,KAAC,cAAc,CAAC,QAAQ,IAAC,KAAK,EAAE,MAAM,CAAC,OAAO,YAC3C,QAAQ,GACe,GACJ,CACzB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The one line under the chart: what is drawn, what was found, what went wrong.
|
|
3
|
+
*
|
|
4
|
+
* Everything in it is derived, so it is the cheapest place in the viewer to
|
|
5
|
+
* answer "did that work" — how many spectra are drawn of those open, how many
|
|
6
|
+
* bands the picking found and how many the table had something to say about, and
|
|
7
|
+
* the range the selected spectrum covers.
|
|
8
|
+
*
|
|
9
|
+
* The refusal is last and is the only red in the shell, so the eye that has just
|
|
10
|
+
* pressed something and seen nothing happen lands on the reason.
|
|
11
|
+
* @returns The status bar.
|
|
12
|
+
*/
|
|
13
|
+
export declare function IrStatusBar(): import("react").JSX.Element;
|
|
14
|
+
//# sourceMappingURL=IrStatusBar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IrStatusBar.d.ts","sourceRoot":"","sources":["../../../src/ir/ui/IrStatusBar.tsx"],"names":[],"mappings":"AAeA;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,gCAmD1B"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Icon } from '@blueprintjs/core';
|
|
3
|
+
import { countLabel, statusBarStyle as barStyle, statusItemStyle as itemStyle, statusMutedStyle as mutedStyle, statusSpacerStyle as spacerStyle, } from "../../panel/core/statusBar.js";
|
|
4
|
+
import { countAssigned } from "../core/assignBands.js";
|
|
5
|
+
import { formatWavenumber } from "../core/irFormat.js";
|
|
6
|
+
import { boxZoomOnly, yAxisTitle } from "../core/irMode.js";
|
|
7
|
+
import { useIrEditorState } from "./irStateContext.js";
|
|
8
|
+
/**
|
|
9
|
+
* The one line under the chart: what is drawn, what was found, what went wrong.
|
|
10
|
+
*
|
|
11
|
+
* Everything in it is derived, so it is the cheapest place in the viewer to
|
|
12
|
+
* answer "did that work" — how many spectra are drawn of those open, how many
|
|
13
|
+
* bands the picking found and how many the table had something to say about, and
|
|
14
|
+
* the range the selected spectrum covers.
|
|
15
|
+
*
|
|
16
|
+
* The refusal is last and is the only red in the shell, so the eye that has just
|
|
17
|
+
* pressed something and seen nothing happen lands on the reason.
|
|
18
|
+
* @returns The status bar.
|
|
19
|
+
*/
|
|
20
|
+
export function IrStatusBar() {
|
|
21
|
+
const { state, visibleSpectra, selectedSpectrum, assigned } = useIrEditorState();
|
|
22
|
+
const { spectra } = state.data;
|
|
23
|
+
const { error, tool } = state.view;
|
|
24
|
+
const { mode, pickBands } = state.settings;
|
|
25
|
+
const range = selectedSpectrum === null || selectedSpectrum.wavenumber.length === 0
|
|
26
|
+
? null
|
|
27
|
+
: `${formatWavenumber(selectedSpectrum.wavenumber.at(-1))}–${formatWavenumber(selectedSpectrum.wavenumber[0])} cm⁻¹`;
|
|
28
|
+
return (_jsxs("div", { style: barStyle, children: [_jsx("span", { style: itemStyle, children: spectra.length === 0
|
|
29
|
+
? 'no spectrum open'
|
|
30
|
+
: `${countLabel(visibleSpectra.length, 'spectrum', 'spectra')} drawn of ${spectra.length}` }), _jsx("span", { style: itemStyle, children: yAxisTitle(mode) }), selectedSpectrum === null ? null : (_jsx("span", { style: nameStyle, title: selectedSpectrum.name, children: selectedSpectrum.name })), range === null ? null : _jsx("span", { style: mutedStyle, children: range }), pickBands && assigned.length > 0 ? (_jsxs("span", { style: itemStyle, children: [countLabel(assigned.length, 'band', 'bands'), ",", ' ', countAssigned(assigned), " assigned"] })) : null, boxZoomOnly(mode) || tool === 'box' ? (_jsx("span", { style: mutedStyle, children: "square zoom: drag a rectangle" })) : null, _jsx("span", { style: spacerStyle }), error === null ? null : (_jsxs("span", { style: errorStyle, title: error, children: [_jsx(Icon, { icon: "warning-sign", size: 12 }), error] }))] }));
|
|
31
|
+
}
|
|
32
|
+
const nameStyle = {
|
|
33
|
+
...itemStyle,
|
|
34
|
+
overflow: 'hidden',
|
|
35
|
+
textOverflow: 'ellipsis',
|
|
36
|
+
maxWidth: '32%',
|
|
37
|
+
fontWeight: 600,
|
|
38
|
+
};
|
|
39
|
+
/** The one red in the shell: a refusal, and nothing else, is written in it. */
|
|
40
|
+
const errorStyle = {
|
|
41
|
+
...itemStyle,
|
|
42
|
+
gap: 4,
|
|
43
|
+
color: '#C0392B',
|
|
44
|
+
overflow: 'hidden',
|
|
45
|
+
textOverflow: 'ellipsis',
|
|
46
|
+
maxWidth: '60%',
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=IrStatusBar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IrStatusBar.js","sourceRoot":"","sources":["../../../src/ir/ui/IrStatusBar.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAO,EACL,UAAU,EACV,cAAc,IAAI,QAAQ,EAC1B,eAAe,IAAI,SAAS,EAC5B,gBAAgB,IAAI,UAAU,EAC9B,iBAAiB,IAAI,WAAW,GACjC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,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AM,KAAK,EAAE,UAAU,YAAG,KAAK,GAAQ,EAE/D,SAAS,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAClC,gBAAM,KAAK,EAAE,SAAS,aACnB,UAAU,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,OAAG,GAAG,EAClD,aAAa,CAAC,QAAQ,CAAC,iBACnB,CACR,CAAC,CAAC,CAAC,IAAI,EAEP,WAAW,CAAC,IAAI,CAAC,IAAI,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,CACrC,eAAM,KAAK,EAAE,UAAU,8CAAsC,CAC9D,CAAC,CAAC,CAAC,IAAI,EAER,eAAM,KAAK,EAAE,WAAW,GAAI,EAE3B,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CACvB,gBAAM,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,aACnC,KAAC,IAAI,IAAC,IAAI,EAAC,cAAc,EAAC,IAAI,EAAE,EAAE,GAAI,EACrC,KAAK,IACD,CACR,IACG,CACP,CAAC;AACJ,CAAC;AAED,MAAM,SAAS,GAAG;IAChB,GAAG,SAAS;IACZ,QAAQ,EAAE,QAAQ;IAClB,YAAY,EAAE,UAAU;IACxB,QAAQ,EAAE,KAAK;IACf,UAAU,EAAE,GAAG;CACP,CAAC;AAEX,+EAA+E;AAC/E,MAAM,UAAU,GAAG;IACjB,GAAG,SAAS;IACZ,GAAG,EAAE,CAAC;IACN,KAAK,EAAE,SAAS;IAChB,QAAQ,EAAE,QAAQ;IAClB,YAAY,EAAE,UAAU;IACxB,QAAQ,EAAE,KAAK;CACP,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The tools, down the left of the chart.
|
|
3
|
+
*
|
|
4
|
+
* Only what is done to the spectra: what is asked of the viewer itself — the
|
|
5
|
+
* mark, help, full screen — is in the header. The two **tools** — read and
|
|
6
|
+
* square zoom — come first and show which of the two a drag is currently
|
|
7
|
+
* running, then the zoom commands that act at once, then what is being read: the
|
|
8
|
+
* value axis, the picking, the assignments. Closing every spectrum is last and
|
|
9
|
+
* alone, being the only one that throws something away.
|
|
10
|
+
*
|
|
11
|
+
* Reading percent transmittance, the pair is settled rather than chosen: every
|
|
12
|
+
* drag on that axis is a rectangle, so both buttons go dead with the square zoom
|
|
13
|
+
* lit. Showing `read` as available there would offer a gesture the chart does not
|
|
14
|
+
* make, and showing it as *active* would name the wrong one.
|
|
15
|
+
* @returns The toolbar.
|
|
16
|
+
*/
|
|
17
|
+
export declare function IrToolbar(): import("react").JSX.Element;
|
|
18
|
+
//# sourceMappingURL=IrToolbar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IrToolbar.d.ts","sourceRoot":"","sources":["../../../src/ir/ui/IrToolbar.tsx"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,SAAS,gCA8ExB"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Toolbar } from 'react-science/ui';
|
|
3
|
+
import { boxZoomOnly } from "../core/irMode.js";
|
|
4
|
+
import { useIrCommandProps } from "./irCommandContext.js";
|
|
5
|
+
import { useIrEditorState } from "./irStateContext.js";
|
|
6
|
+
/**
|
|
7
|
+
* The tools, down the left of the chart.
|
|
8
|
+
*
|
|
9
|
+
* Only what is done to the spectra: what is asked of the viewer itself — the
|
|
10
|
+
* mark, help, full screen — is in the header. The two **tools** — read and
|
|
11
|
+
* square zoom — come first and show which of the two a drag is currently
|
|
12
|
+
* running, then the zoom commands that act at once, then what is being read: the
|
|
13
|
+
* value axis, the picking, the assignments. Closing every spectrum is last and
|
|
14
|
+
* alone, being the only one that throws something away.
|
|
15
|
+
*
|
|
16
|
+
* Reading percent transmittance, the pair is settled rather than chosen: every
|
|
17
|
+
* drag on that axis is a rectangle, so both buttons go dead with the square zoom
|
|
18
|
+
* lit. Showing `read` as available there would offer a gesture the chart does not
|
|
19
|
+
* make, and showing it as *active* would name the wrong one.
|
|
20
|
+
* @returns The toolbar.
|
|
21
|
+
*/
|
|
22
|
+
export function IrToolbar() {
|
|
23
|
+
const { state, selectedSpectrum } = useIrEditorState();
|
|
24
|
+
const command = useIrCommandProps();
|
|
25
|
+
const { spectra } = state.data;
|
|
26
|
+
const { domain, tool } = state.view;
|
|
27
|
+
const { mode, pickBands, showAssignments } = state.settings;
|
|
28
|
+
const isEmpty = spectra.length === 0;
|
|
29
|
+
const settled = boxZoomOnly(mode);
|
|
30
|
+
return (_jsxs(Toolbar, { vertical: true, overflow: "collapse", "aria-label": "Infrared spectrum tools", children: [_jsx(Toolbar.Item, { icon: "trash", intent: "danger", ...command('clear'), disabled: isEmpty }), _jsx(Toolbar.Item, { icon: "arrows-horizontal", active: !settled && tool === 'read', ...command('readTool'), disabled: isEmpty || settled }), _jsx(Toolbar.Item, { icon: "select", active: settled || tool === 'box', ...command('boxTool'), disabled: isEmpty || settled }), _jsx(Toolbar.Item, { icon: "zoom-in", ...command('zoomIn'), disabled: isEmpty }), _jsx(Toolbar.Item, { icon: "zoom-out", ...command('zoomOut'), disabled: isEmpty }), _jsx(Toolbar.Item, { icon: "zoom-to-fit", ...command('resetZoom'), disabled: domain === null }), _jsx(Toolbar.Item, { icon: mode === 'absorbance' ? 'arrow-up' : 'arrow-down', active: mode === 'absorbance', ...command('toggleMode'), disabled: isEmpty }), _jsx(Toolbar.Item, { icon: "locate", active: pickBands, ...command('togglePicking'), disabled: selectedSpectrum === null }), _jsx(Toolbar.Item, { icon: "label", active: showAssignments, ...command('toggleAssignments'), disabled: !pickBands || selectedSpectrum === null }), _jsx(Toolbar.Item, { icon: "media", ...command('exportImage'), disabled: isEmpty })] }));
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=IrToolbar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1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from 'react';
|
|
2
|
+
import type { PlotRect } from '../../chart/core/chartGeometry.ts';
|
|
3
|
+
import type { ChartScale } from '../../chart/core/chartScale.ts';
|
|
4
|
+
import type { IrMode, IrSpectrum } from '../core/irSpectrum.ts';
|
|
5
|
+
export interface IrTracesProps {
|
|
6
|
+
/** The spectra to draw, each saying in itself whether it is drawn. */
|
|
7
|
+
spectra: readonly IrSpectrum[];
|
|
8
|
+
/** Which value axis is being drawn. */
|
|
9
|
+
mode: IrMode;
|
|
10
|
+
/**
|
|
11
|
+
* Where the plot sits, whose width is how many points are worth drawing. A
|
|
12
|
+
* trace is reduced to the pixel columns it will occupy, so the width is what
|
|
13
|
+
* says how much of a spectrum the chart can actually show.
|
|
14
|
+
*/
|
|
15
|
+
plot: PlotRect;
|
|
16
|
+
/**
|
|
17
|
+
* The window being shown, low end first — which is what the reduction is cut
|
|
18
|
+
* to. Read from the window rather than inverted back out of `xScale`, because
|
|
19
|
+
* the wavenumber axis runs right to left and inverting its left edge gives
|
|
20
|
+
* the *high* end, the opposite of what every other chart's does.
|
|
21
|
+
*/
|
|
22
|
+
xDomain: readonly [number, number];
|
|
23
|
+
/** The wavenumber axis as it is currently zoomed, running right to left. */
|
|
24
|
+
xScale: ChartScale;
|
|
25
|
+
/** The value axis as it is currently zoomed. */
|
|
26
|
+
yScale: ChartScale;
|
|
27
|
+
/**
|
|
28
|
+
* Identity of the spectrum drawn thicker than the rest, `null` for none. The
|
|
29
|
+
* one every panel beside the chart is about, so that which trace the numbers
|
|
30
|
+
* belong to can be seen rather than inferred from a colour swatch.
|
|
31
|
+
* @default null
|
|
32
|
+
*/
|
|
33
|
+
emphasisedId?: string | null;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Every visible spectrum, one `<path>` each.
|
|
37
|
+
*
|
|
38
|
+
* One path per spectrum and never one element per point: an infrared spectrum is
|
|
39
|
+
* a few thousand samples, and drawn as a line each the browser holds thousands of
|
|
40
|
+
* nodes for a picture that is a single stroke — and every pointer move across the
|
|
41
|
+
* chart then costs a walk of all of them.
|
|
42
|
+
*
|
|
43
|
+
* Nor every sample: a spectrum is reduced to the pixel columns it will occupy
|
|
44
|
+
* before it becomes a path. A bench instrument's 1 cm⁻¹ grid over 4000–400 is
|
|
45
|
+
* some eight thousand samples against a plot around thirteen hundred pixels
|
|
46
|
+
* wide, and a chart holding the four infrared blocks of one JCAMP file writes
|
|
47
|
+
* a fifth of a megabyte of `d` for a picture no denser than the one it would
|
|
48
|
+
* have drawn from a tenth of that. `xyReduce` keeps the lowest and the highest
|
|
49
|
+
* sample of every slot, so a band still reaches its true depth rather than the
|
|
50
|
+
* depth of whichever sample a slot boundary happened to land on — and it cuts
|
|
51
|
+
* by wavenumber rather than by index, which is what makes it safe on the
|
|
52
|
+
* uneven grids a converted or interpolated file arrives on.
|
|
53
|
+
*
|
|
54
|
+
* There is no stick trace here and no mirror mode, which is the visible
|
|
55
|
+
* difference from a mass chart: infrared is a continuous absorption profile, the
|
|
56
|
+
* bands are features *of* that curve rather than a second representation of it,
|
|
57
|
+
* and two spectra are compared by drawing them over one another rather than head
|
|
58
|
+
* to head — the baselines have to line up for the comparison to mean anything.
|
|
59
|
+
* @param props - Component props.
|
|
60
|
+
* @returns The traces, as SVG.
|
|
61
|
+
*/
|
|
62
|
+
export declare function IrTraces(props: IrTracesProps): ReactElement;
|
|
63
|
+
//# sourceMappingURL=IrTraces.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IrTraces.d.ts","sourceRoot":"","sources":["../../../src/ir/ui/IrTraces.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAG1C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAEjE,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAGhE,MAAM,WAAW,aAAa;IAC5B,sEAAsE;IACtE,OAAO,EAAE,SAAS,UAAU,EAAE,CAAC;IAC/B,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,IAAI,EAAE,QAAQ,CAAC;IACf;;;;;OAKG;IACH,OAAO,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,4EAA4E;IAC5E,MAAM,EAAE,UAAU,CAAC;IACnB,gDAAgD;IAChD,MAAM,EAAE,UAAU,CAAC;IACnB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,YAAY,CA0C3D"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { xyReduce } from 'ml-spectra-processing';
|
|
3
|
+
import { useMemo } from 'react';
|
|
4
|
+
import { profilePath } from "../../chart/core/tracePath.js";
|
|
5
|
+
import { traceOf } from "../core/irSpectrum.js";
|
|
6
|
+
/**
|
|
7
|
+
* Every visible spectrum, one `<path>` each.
|
|
8
|
+
*
|
|
9
|
+
* One path per spectrum and never one element per point: an infrared spectrum is
|
|
10
|
+
* a few thousand samples, and drawn as a line each the browser holds thousands of
|
|
11
|
+
* nodes for a picture that is a single stroke — and every pointer move across the
|
|
12
|
+
* chart then costs a walk of all of them.
|
|
13
|
+
*
|
|
14
|
+
* Nor every sample: a spectrum is reduced to the pixel columns it will occupy
|
|
15
|
+
* before it becomes a path. A bench instrument's 1 cm⁻¹ grid over 4000–400 is
|
|
16
|
+
* some eight thousand samples against a plot around thirteen hundred pixels
|
|
17
|
+
* wide, and a chart holding the four infrared blocks of one JCAMP file writes
|
|
18
|
+
* a fifth of a megabyte of `d` for a picture no denser than the one it would
|
|
19
|
+
* have drawn from a tenth of that. `xyReduce` keeps the lowest and the highest
|
|
20
|
+
* sample of every slot, so a band still reaches its true depth rather than the
|
|
21
|
+
* depth of whichever sample a slot boundary happened to land on — and it cuts
|
|
22
|
+
* by wavenumber rather than by index, which is what makes it safe on the
|
|
23
|
+
* uneven grids a converted or interpolated file arrives on.
|
|
24
|
+
*
|
|
25
|
+
* There is no stick trace here and no mirror mode, which is the visible
|
|
26
|
+
* difference from a mass chart: infrared is a continuous absorption profile, the
|
|
27
|
+
* bands are features *of* that curve rather than a second representation of it,
|
|
28
|
+
* and two spectra are compared by drawing them over one another rather than head
|
|
29
|
+
* to head — the baselines have to line up for the comparison to mean anything.
|
|
30
|
+
* @param props - Component props.
|
|
31
|
+
* @returns The traces, as SVG.
|
|
32
|
+
*/
|
|
33
|
+
export function IrTraces(props) {
|
|
34
|
+
const { spectra, mode, plot, xDomain, xScale, yScale, emphasisedId = null, } = props;
|
|
35
|
+
const [from, to] = xDomain;
|
|
36
|
+
const wanted = Math.max(2, Math.round(plot.width)) * POINTS_PER_COLUMN;
|
|
37
|
+
const paths = useMemo(() => {
|
|
38
|
+
const drawn = [];
|
|
39
|
+
for (const spectrum of spectra) {
|
|
40
|
+
if (!spectrum.visible)
|
|
41
|
+
continue;
|
|
42
|
+
const trace = traceOf(spectrum, mode);
|
|
43
|
+
const { x, y } = xyReduce(trace, { from, to, nbPoints: wanted });
|
|
44
|
+
const d = profilePath(x, y, xScale, yScale);
|
|
45
|
+
if (d !== '')
|
|
46
|
+
drawn.push({ id: spectrum.id, color: spectrum.color, d });
|
|
47
|
+
}
|
|
48
|
+
return drawn;
|
|
49
|
+
}, [spectra, mode, from, to, wanted, xScale, yScale]);
|
|
50
|
+
return (_jsx("g", { pointerEvents: "none", children: paths.map((path) => (_jsx("path", { d: path.d, fill: "none", stroke: path.color, strokeWidth: path.id === emphasisedId ? EMPHASISED_WIDTH : TRACE_WIDTH, strokeLinejoin: "round" }, path.id))) }));
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* How many reduced samples each pixel column is given.
|
|
54
|
+
*
|
|
55
|
+
* The reduction keeps the lowest and the highest sample of every slot, so two
|
|
56
|
+
* per column is the least that draws a column at all — and `xyReduce` asks for
|
|
57
|
+
* about four times what is displayed before a narrow band survives at its true
|
|
58
|
+
* depth rather than at the depth of whichever sample the slot boundary happened
|
|
59
|
+
* to land on.
|
|
60
|
+
*/
|
|
61
|
+
const POINTS_PER_COLUMN = 4;
|
|
62
|
+
/** How thick a trace is drawn. */
|
|
63
|
+
const TRACE_WIDTH = 1;
|
|
64
|
+
/**
|
|
65
|
+
* How thick the one every panel is about is drawn.
|
|
66
|
+
*
|
|
67
|
+
* Barely thicker, because the difference has to be visible without reading as a
|
|
68
|
+
* different kind of thing: at two pixels a trace still looks like the others,
|
|
69
|
+
* where at three it looks like a fit or an envelope drawn over them.
|
|
70
|
+
*/
|
|
71
|
+
const EMPHASISED_WIDTH = 2;
|
|
72
|
+
//# sourceMappingURL=IrTraces.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IrTraces.js","sourceRoot":"","sources":["../../../src/ir/ui/IrTraces.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAIhC,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAE5D,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAiChD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAoB;IAC3C,MAAM,EACJ,OAAO,EACP,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,MAAM,EACN,MAAM,EACN,YAAY,GAAG,IAAI,GACpB,GAAG,KAAK,CAAC;IAEV,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,OAAO,CAAC;IAC3B,MAAM,MAAM,GAAG,IAAI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,OAAO,IAPjB,IAAI,CAAC,EAAE,CAQZ,CACH,CAAC,GACA,CACL,CAAC;AACJ,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAE5B,kCAAkC;AAClC,MAAM,WAAW,GAAG,CAAC,CAAC;AAEtB;;;;;;GAMG;AACH,MAAM,gBAAgB,GAAG,CAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the file said about the selected spectrum's acquisition.
|
|
3
|
+
*
|
|
4
|
+
* Only what it actually said. A field the file left blank is left out rather than
|
|
5
|
+
* shown empty, so every line in the table is a fact — which is what makes the
|
|
6
|
+
* table worth reading at all on a format where instruments write whatever they
|
|
7
|
+
* like.
|
|
8
|
+
*
|
|
9
|
+
* Where the spectrum came from is shown even when the file said nothing: the
|
|
10
|
+
* format and the file name are the two things a reader asks first when a trace
|
|
11
|
+
* looks wrong.
|
|
12
|
+
* @returns The panel.
|
|
13
|
+
*/
|
|
14
|
+
export declare function MetadataPanel(): import("react").JSX.Element;
|
|
15
|
+
//# sourceMappingURL=MetadataPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MetadataPanel.d.ts","sourceRoot":"","sources":["../../../src/ir/ui/MetadataPanel.tsx"],"names":[],"mappings":"AAUA;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,gCAsD5B"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { panelBodyStyle, panelCellStyle, panelEmptyStyle, panelStyle, panelTableStyle, } from "../../panel/core/panelStyles.js";
|
|
3
|
+
import { useIrEditorState } from "./irStateContext.js";
|
|
4
|
+
/**
|
|
5
|
+
* What the file said about the selected spectrum's acquisition.
|
|
6
|
+
*
|
|
7
|
+
* Only what it actually said. A field the file left blank is left out rather than
|
|
8
|
+
* shown empty, so every line in the table is a fact — which is what makes the
|
|
9
|
+
* table worth reading at all on a format where instruments write whatever they
|
|
10
|
+
* like.
|
|
11
|
+
*
|
|
12
|
+
* Where the spectrum came from is shown even when the file said nothing: the
|
|
13
|
+
* format and the file name are the two things a reader asks first when a trace
|
|
14
|
+
* looks wrong.
|
|
15
|
+
* @returns The panel.
|
|
16
|
+
*/
|
|
17
|
+
export function MetadataPanel() {
|
|
18
|
+
const { selectedSpectrum } = useIrEditorState();
|
|
19
|
+
if (selectedSpectrum === null) {
|
|
20
|
+
return (_jsx("div", { style: panelStyle, children: _jsx("div", { style: panelBodyStyle, children: _jsx("p", { style: panelEmptyStyle, children: "No spectrum is selected." }) }) }));
|
|
21
|
+
}
|
|
22
|
+
const { meta, origin, wavenumber } = selectedSpectrum;
|
|
23
|
+
const rows = [
|
|
24
|
+
['Format', origin.format],
|
|
25
|
+
...(origin.fileName === undefined
|
|
26
|
+
? []
|
|
27
|
+
: [['File', origin.fileName]]),
|
|
28
|
+
...(origin.blockIndex === undefined
|
|
29
|
+
? []
|
|
30
|
+
: [['Block', String(origin.blockIndex)]]),
|
|
31
|
+
...(origin.recorded === undefined
|
|
32
|
+
? []
|
|
33
|
+
: [['Recorded as', origin.recorded]]),
|
|
34
|
+
['Points', String(wavenumber.length)],
|
|
35
|
+
...(meta === null
|
|
36
|
+
? []
|
|
37
|
+
: meta.fields.map((field) => [field.label, field.value])),
|
|
38
|
+
];
|
|
39
|
+
return (_jsx("div", { style: panelStyle, children: _jsxs("div", { style: panelBodyStyle, children: [meta?.title === null || meta?.title === undefined ? null : (_jsx("p", { style: titleStyle, children: meta.title })), _jsx("table", { style: panelTableStyle, children: _jsx("tbody", { children: rows.map(([label, value]) => (_jsxs("tr", { children: [_jsx("th", { style: labelCellStyle, children: label }), _jsx("td", { style: { ...panelCellStyle, whiteSpace: 'normal' }, children: value })] }, label))) }) })] }) }));
|
|
40
|
+
}
|
|
41
|
+
const titleStyle = { margin: 0, fontWeight: 600 };
|
|
42
|
+
const labelCellStyle = {
|
|
43
|
+
...panelCellStyle,
|
|
44
|
+
textAlign: 'left',
|
|
45
|
+
fontWeight: 400,
|
|
46
|
+
opacity: 0.7,
|
|
47
|
+
width: '40%',
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=MetadataPanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MetadataPanel.js","sourceRoot":"","sources":["../../../src/ir/ui/MetadataPanel.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,cAAc,EACd,cAAc,EACd,eAAe,EACf,UAAU,EACV,eAAe,GAChB,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,aAAa;IAC3B,MAAM,EAAE,gBAAgB,EAAE,GAAG,gBAAgB,EAAE,CAAC;IAEhD,IAAI,gBAAgB,KAAK,IAAI,EAAE,CAAC;QAC9B,OAAO,CACL,cAAK,KAAK,EAAE,UAAU,YACpB,cAAK,KAAK,EAAE,cAAc,YACxB,YAAG,KAAK,EAAE,eAAe,yCAA8B,GACnD,GACF,CACP,CAAC;IACJ,CAAC;IAED,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,gBAAgB,CAAC;IACtD,MAAM,IAAI,GAA4B;QACpC,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC;QACzB,GAAG,CAAC,MAAM,CAAC,QAAQ,KAAK,SAAS;YAC/B,CAAC,CAAC,EAAE;YACJ,CAAC,CAAE,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,CAA6B,CAAC;QAC7D,GAAG,CAAC,MAAM,CAAC,UAAU,KAAK,SAAS;YACjC,CAAC,CAAC,EAAE;YACJ,CAAC,CAAE,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAA6B,CAAC;QACxE,GAAG,CAAC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E,KAAK;CACJ,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The spectra that are open: which is drawn, which the panels are about, and
|
|
3
|
+
* what each is called.
|
|
4
|
+
*
|
|
5
|
+
* One row per spectrum, and the row is the selection: the panels and the picking
|
|
6
|
+
* are about one spectrum at a time, so which one that is has to be visible and
|
|
7
|
+
* one click away. Drawing is separate from selecting — a reference can be kept on
|
|
8
|
+
* the chart while the bands of the sample are read — which is why the eye and the
|
|
9
|
+
* row are two different targets.
|
|
10
|
+
*
|
|
11
|
+
* What acts on the list rather than on one row — drawing them all again, handing
|
|
12
|
+
* the whole list over as a file, closing the selected one, closing every one — is
|
|
13
|
+
* a toolbar under the header, where a panel's own actions belong. Closing the
|
|
14
|
+
* selected spectrum is offered there as well as on its row because the row's
|
|
15
|
+
* cross is a small target in a list of twenty, and the selected spectrum is the
|
|
16
|
+
* one being worked on.
|
|
17
|
+
* @returns The panel.
|
|
18
|
+
*/
|
|
19
|
+
export declare function SpectraPanel(): import("react").JSX.Element;
|
|
20
|
+
//# sourceMappingURL=SpectraPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SpectraPanel.d.ts","sourceRoot":"","sources":["../../../src/ir/ui/SpectraPanel.tsx"],"names":[],"mappings":"AAgBA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,YAAY,gCA+E3B"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Toolbar } from 'react-science/ui';
|
|
3
|
+
import { panelBodyStyle, panelEmptyStyle, panelStyle, panelToolbarStyle, } from "../../panel/core/panelStyles.js";
|
|
4
|
+
import { downloadIrSpectra, downloadIrSpectrum, } from "../core/downloadSpectra.js";
|
|
5
|
+
import { SpectrumRow } from "./SpectrumRow.js";
|
|
6
|
+
import { useIrActions, useIrEditorState } from "./irStateContext.js";
|
|
7
|
+
/**
|
|
8
|
+
* The spectra that are open: which is drawn, which the panels are about, and
|
|
9
|
+
* what each is called.
|
|
10
|
+
*
|
|
11
|
+
* One row per spectrum, and the row is the selection: the panels and the picking
|
|
12
|
+
* are about one spectrum at a time, so which one that is has to be visible and
|
|
13
|
+
* one click away. Drawing is separate from selecting — a reference can be kept on
|
|
14
|
+
* the chart while the bands of the sample are read — which is why the eye and the
|
|
15
|
+
* row are two different targets.
|
|
16
|
+
*
|
|
17
|
+
* What acts on the list rather than on one row — drawing them all again, handing
|
|
18
|
+
* the whole list over as a file, closing the selected one, closing every one — is
|
|
19
|
+
* a toolbar under the header, where a panel's own actions belong. Closing the
|
|
20
|
+
* selected spectrum is offered there as well as on its row because the row's
|
|
21
|
+
* cross is a small target in a list of twenty, and the selected spectrum is the
|
|
22
|
+
* one being worked on.
|
|
23
|
+
* @returns The panel.
|
|
24
|
+
*/
|
|
25
|
+
export function SpectraPanel() {
|
|
26
|
+
const { state } = useIrEditorState();
|
|
27
|
+
const actions = useIrActions();
|
|
28
|
+
const { spectra } = state.data;
|
|
29
|
+
const { selectedId } = state.view;
|
|
30
|
+
const { mode } = state.settings;
|
|
31
|
+
const selected = spectra.find((spectrum) => spectrum.id === selectedId);
|
|
32
|
+
const allDrawn = spectra.every((spectrum) => spectrum.visible);
|
|
33
|
+
return (_jsxs("div", { style: panelStyle, children: [_jsx("div", { style: panelToolbarStyle, children: _jsxs(Toolbar, { "aria-label": "Spectra", children: [_jsx(Toolbar.Item, { icon: "trash", intent: "danger", tooltip: "Close every spectrum", "aria-label": "Close every spectrum", disabled: spectra.length === 0, onClick: actions.clear }), _jsx(Toolbar.Item, { icon: "cross", intent: "danger", tooltip: "Close the selected spectrum", "aria-label": "Close the selected spectrum", disabled: selected === undefined, onClick: () => {
|
|
34
|
+
if (selected !== undefined)
|
|
35
|
+
actions.removeSpectrum(selected.id);
|
|
36
|
+
} }), _jsx(Toolbar.Item, { icon: "eye-open", tooltip: "Draw every spectrum again", "aria-label": "Draw every spectrum again", disabled: spectra.length === 0 || allDrawn, onClick: () => {
|
|
37
|
+
for (const spectrum of spectra) {
|
|
38
|
+
actions.setSpectrumVisible(spectrum.id, true);
|
|
39
|
+
}
|
|
40
|
+
} }), _jsx(Toolbar.Item, { icon: "download", tooltip: "Download every spectrum as one JCAMP-DX file", "aria-label": "Download every spectrum", disabled: spectra.length === 0, onClick: () => downloadIrSpectra(spectra, mode) })] }) }), _jsx("div", { style: panelBodyStyle, children: spectra.length === 0 ? (_jsx("p", { style: panelEmptyStyle, children: "No spectrum is open. Open one of the examples, or drop a JCAMP-DX file on the chart." })) : (spectra.map((spectrum) => (_jsx(SpectrumRow, { spectrum: spectrum, selected: spectrum.id === selectedId, onSelect: () => actions.selectSpectrum(spectrum.id), onToggle: () => actions.setSpectrumVisible(spectrum.id, !spectrum.visible), onColor: (color) => actions.setSpectrumColor(spectrum.id, color), onDownload: () => downloadIrSpectrum(spectrum, mode), onRemove: () => actions.removeSpectrum(spectrum.id), onRename: (name) => actions.renameSpectrum(spectrum.id, name) }, spectrum.id)))) })] }));
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=SpectraPanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SpectraPanel.js","sourceRoot":"","sources":["../../../src/ir/ui/SpectraPanel.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,OAAO,EACL,cAAc,EACd,eAAe,EACf,UAAU,EACV,iBAAiB,GAClB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAmB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAErE;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,YAAY;IAC1B,MAAM,EA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QAAQ,CAAC,EAAE,CAAC,EACnD,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC,IAVxD,QAAQ,CAAC,EAAE,CAWhB,CACH,CAAC,CACH,GACG,IACF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { IrSpectrum } from '../core/irSpectrum.ts';
|
|
2
|
+
export interface SpectrumRowProps {
|
|
3
|
+
/** The spectrum the row is about. */
|
|
4
|
+
spectrum: IrSpectrum;
|
|
5
|
+
/** Whether the panels are about it. */
|
|
6
|
+
selected: boolean;
|
|
7
|
+
/** Point the panels at it. */
|
|
8
|
+
onSelect: () => void;
|
|
9
|
+
/** Draw it, or stop drawing it. */
|
|
10
|
+
onToggle: () => void;
|
|
11
|
+
/** Draw it in another colour of the palette. */
|
|
12
|
+
onColor: (color: string) => void;
|
|
13
|
+
/** Hand it over as a file. */
|
|
14
|
+
onDownload: () => void;
|
|
15
|
+
/** Close it. */
|
|
16
|
+
onRemove: () => void;
|
|
17
|
+
/** Call it something else. */
|
|
18
|
+
onRename: (name: string) => void;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* One spectrum: its colour, its name, where it runs, and what can be done to it.
|
|
22
|
+
* @param props - Component props.
|
|
23
|
+
* @returns The row.
|
|
24
|
+
*/
|
|
25
|
+
export declare function SpectrumRow(props: SpectrumRowProps): import("react").JSX.Element;
|
|
26
|
+
//# sourceMappingURL=SpectrumRow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SpectrumRow.d.ts","sourceRoot":"","sources":["../../../src/ir/ui/SpectrumRow.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAExD,MAAM,WAAW,gBAAgB;IAC/B,qCAAqC;IACrC,QAAQ,EAAE,UAAU,CAAC;IACrB,uCAAuC;IACvC,QAAQ,EAAE,OAAO,CAAC;IAClB,8BAA8B;IAC9B,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,mCAAmC;IACnC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,gDAAgD;IAChD,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,8BAA8B;IAC9B,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,gBAAgB;IAChB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,8BAA8B;IAC9B,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAClC;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,+BAoElD"}
|