react-cheminfo 0.28.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/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/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,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
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
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,EAAE,KAAK,EAAE,GAAG,gBAAgB,EAAE,CAAC;IACrC,MAAM,OAAO,GAAG,YAAY,EAAE,CAAC;IAC/B,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CA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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"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Button } from 'react-science/ui';
|
|
3
|
+
import { SpectrumColorSwatch } from "../../panel/ui/SpectrumColorSwatch.js";
|
|
4
|
+
import { formatWavenumber } from "../core/irFormat.js";
|
|
5
|
+
/**
|
|
6
|
+
* One spectrum: its colour, its name, where it runs, and what can be done to it.
|
|
7
|
+
* @param props - Component props.
|
|
8
|
+
* @returns The row.
|
|
9
|
+
*/
|
|
10
|
+
export function SpectrumRow(props) {
|
|
11
|
+
const { spectrum, selected, onSelect, onToggle, onColor, onDownload, onRemove, onRename, } = props;
|
|
12
|
+
const range = spectrum.wavenumber.length === 0
|
|
13
|
+
? ''
|
|
14
|
+
: `${formatWavenumber(spectrum.wavenumber.at(-1))}–${formatWavenumber(spectrum.wavenumber[0])} cm⁻¹`;
|
|
15
|
+
return (_jsxs("div", { style: selected ? selectedRowStyle : rowStyle, "data-selected": selected ? 'true' : undefined, children: [_jsx(Button, { variant: "minimal", icon: spectrum.visible ? 'eye-open' : 'eye-off', tooltipProps: { content: spectrum.visible ? 'Hide' : 'Draw' }, "aria-label": spectrum.visible ? 'Hide this spectrum' : 'Draw it', onClick: onToggle }), _jsx(SpectrumColorSwatch, { color: spectrum.color, name: spectrum.name, onPick: onColor }), _jsx("input", { style: nameStyle, value: spectrum.name, spellCheck: false, autoComplete: "off", "aria-label": "What this spectrum is called", onFocus: onSelect, onChange: (event) => onRename(event.target.value) }), _jsx("span", { style: rangeStyle, children: range }), _jsx(Button, { variant: "minimal", icon: "download", tooltipProps: { content: 'Download this spectrum as a JCAMP-DX file' }, "aria-label": "Download this spectrum", onClick: onDownload }), _jsx(Button, { variant: "minimal", icon: "cross", intent: "danger", tooltipProps: { content: 'Close this spectrum' }, "aria-label": "Close this spectrum", onClick: onRemove })] }));
|
|
16
|
+
}
|
|
17
|
+
const rowStyle = {
|
|
18
|
+
display: 'flex',
|
|
19
|
+
alignItems: 'center',
|
|
20
|
+
gap: 4,
|
|
21
|
+
padding: '1px 2px',
|
|
22
|
+
borderRadius: 3,
|
|
23
|
+
};
|
|
24
|
+
const selectedRowStyle = { ...rowStyle, background: '#e8f1fb' };
|
|
25
|
+
const nameStyle = {
|
|
26
|
+
flex: '1 1 1px',
|
|
27
|
+
minWidth: 0,
|
|
28
|
+
border: '1px solid transparent',
|
|
29
|
+
borderRadius: 2,
|
|
30
|
+
background: 'transparent',
|
|
31
|
+
font: 'inherit',
|
|
32
|
+
fontSize: 12,
|
|
33
|
+
padding: '1px 3px',
|
|
34
|
+
};
|
|
35
|
+
const rangeStyle = {
|
|
36
|
+
flex: 'none',
|
|
37
|
+
fontSize: 11,
|
|
38
|
+
opacity: 0.6,
|
|
39
|
+
fontVariantNumeric: 'tabular-nums',
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=SpectrumRow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SpectrumRow.js","sourceRoot":"","sources":["../../../src/ir/ui/SpectrumRow.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAwC,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAsBvD;;;;GAIG;AACH,MAAM,UAAU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nothing: it takes spectra, bands, a mode
|
|
5
|
+
* and a window as props and hands every gesture back, so it fits a report page
|
|
6
|
+
* or a test as readily as an editor. The chart's own drawing — scales, ticks,
|
|
7
|
+
* plot geometry, the zoom gestures and the label placement — is the shared
|
|
8
|
+
* chart layer, which every viewer of the family draws with.
|
|
9
|
+
*/
|
|
10
|
+
export type { BandMarksProps } from './BandMarks.tsx';
|
|
11
|
+
export { BandMarks } from './BandMarks.tsx';
|
|
12
|
+
export type { BandsPanelProps } from './BandsPanel.tsx';
|
|
13
|
+
export { BandsPanel } from './BandsPanel.tsx';
|
|
14
|
+
export type { IrAboutDialogProps } from './IrAboutDialog.tsx';
|
|
15
|
+
export { IrAboutDialog } from './IrAboutDialog.tsx';
|
|
16
|
+
export type { IrCanvasProps } from './IrCanvas.tsx';
|
|
17
|
+
export { IrCanvas } from './IrCanvas.tsx';
|
|
18
|
+
export { IrChart } from './IrChart.tsx';
|
|
19
|
+
export type { IrCommandProviderProps } from './IrCommandProvider.tsx';
|
|
20
|
+
export { IrCommandProvider } from './IrCommandProvider.tsx';
|
|
21
|
+
export type { IrCommandTooltipProps } from './IrCommandTooltip.tsx';
|
|
22
|
+
export { IrCommandTooltip } from './IrCommandTooltip.tsx';
|
|
23
|
+
export type { IrDocumentationDialogProps } from './IrDocumentationDialog.tsx';
|
|
24
|
+
export { IrDocumentationDialog } from './IrDocumentationDialog.tsx';
|
|
25
|
+
export type { IrEditorProps } from './IrEditor.tsx';
|
|
26
|
+
export { IrEditor } from './IrEditor.tsx';
|
|
27
|
+
export type { IrLogoProps } from './IrLogo.tsx';
|
|
28
|
+
export { IrLogo } from './IrLogo.tsx';
|
|
29
|
+
export type { IrPointerTrackerProps } from './IrPointerTracker.tsx';
|
|
30
|
+
export { IrPointerTracker } from './IrPointerTracker.tsx';
|
|
31
|
+
export type { IrSidePanelProps } from './IrSidePanel.tsx';
|
|
32
|
+
export { IrSidePanel } from './IrSidePanel.tsx';
|
|
33
|
+
export type { IrStateProviderProps } from './IrStateProvider.tsx';
|
|
34
|
+
export { IrStateProvider } from './IrStateProvider.tsx';
|
|
35
|
+
export { IrStatusBar } from './IrStatusBar.tsx';
|
|
36
|
+
export { IrToolbar } from './IrToolbar.tsx';
|
|
37
|
+
export type { IrTracesProps } from './IrTraces.tsx';
|
|
38
|
+
export { IrTraces } from './IrTraces.tsx';
|
|
39
|
+
export { MetadataPanel } from './MetadataPanel.tsx';
|
|
40
|
+
export { SpectraPanel } from './SpectraPanel.tsx';
|
|
41
|
+
export type { SpectrumRowProps } from './SpectrumRow.tsx';
|
|
42
|
+
export { SpectrumRow } from './SpectrumRow.tsx';
|
|
43
|
+
export type { IrEditorActions } from './irActions.ts';
|
|
44
|
+
export { createIrActions } from './irActions.ts';
|
|
45
|
+
export type { IrChartProps } from './irChartProps.ts';
|
|
46
|
+
export type { IrCommandContextValue } from './irCommandContext.tsx';
|
|
47
|
+
export { useIrCommand, useIrCommandProps } from './irCommandContext.tsx';
|
|
48
|
+
export { useIrActions, useIrEditorState } from './irStateContext.ts';
|
|
49
|
+
export type { IrEditorApi, UseIrEditorOptions } from './useIrEditor.ts';
|
|
50
|
+
export { useIrEditor } from './useIrEditor.ts';
|
|
51
|
+
export type { IrPointerOptions, IrReadout } from './useIrPointer.ts';
|
|
52
|
+
export { sameIrReadout, useIrPointer } from './useIrPointer.ts';
|
|
53
|
+
export { useIrShortcuts } from './useIrShortcuts.ts';
|
|
54
|
+
export type { IrZoomOptions } from './useIrZoom.ts';
|
|
55
|
+
export { useIrZoom } from './useIrZoom.ts';
|
|
56
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ir/ui/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,YAAY,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,YAAY,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ectra, bands, a mode
|
|
5
|
+
* and a window as props and hands every gesture back, so it fits a report page
|
|
6
|
+
* or a test as readily as an editor. The chart's own drawing — scales, ticks,
|
|
7
|
+
* plot geometry, the zoom gestures and the label placement — is the shared
|
|
8
|
+
* chart layer, which every viewer of the family draws with.
|
|
9
|
+
*/
|
|
10
|
+
export { BandMarks } from "./BandMarks.js";
|
|
11
|
+
export { BandsPanel } from "./BandsPanel.js";
|
|
12
|
+
export { IrAboutDialog } from "./IrAboutDialog.js";
|
|
13
|
+
export { IrCanvas } from "./IrCanvas.js";
|
|
14
|
+
export { IrChart } from "./IrChart.js";
|
|
15
|
+
export { IrCommandProvider } from "./IrCommandProvider.js";
|
|
16
|
+
export { IrCommandTooltip } from "./IrCommandTooltip.js";
|
|
17
|
+
export { IrDocumentationDialog } from "./IrDocumentationDialog.js";
|
|
18
|
+
export { IrEditor } from "./IrEditor.js";
|
|
19
|
+
export { IrLogo } from "./IrLogo.js";
|
|
20
|
+
export { IrPointerTracker } from "./IrPointerTracker.js";
|
|
21
|
+
export { IrSidePanel } from "./IrSidePanel.js";
|
|
22
|
+
export { IrStateProvider } from "./IrStateProvider.js";
|
|
23
|
+
export { IrStatusBar } from "./IrStatusBar.js";
|
|
24
|
+
export { IrToolbar } from "./IrToolbar.js";
|
|
25
|
+
export { IrTraces } from "./IrTraces.js";
|
|
26
|
+
export { MetadataPanel } from "./MetadataPanel.js";
|
|
27
|
+
export { SpectraPanel } from "./SpectraPanel.js";
|
|
28
|
+
export { SpectrumRow } from "./SpectrumRow.js";
|
|
29
|
+
export { createIrActions } from "./irActions.js";
|
|
30
|
+
export { useIrCommand, useIrCommandProps } from "./irCommandContext.js";
|
|
31
|
+
export { useIrActions, useIrEditorState } from "./irStateContext.js";
|
|
32
|
+
export { useIrEditor } from "./useIrEditor.js";
|
|
33
|
+
export { sameIrReadout, useIrPointer } from "./useIrPointer.js";
|
|
34
|
+
export { useIrShortcuts } from "./useIrShortcuts.js";
|
|
35
|
+
export { useIrZ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EAAE,iBAAiB,EAAE,MAAM,uBAAwB,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAErE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
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
|
+
import type { Dispatch } from 'react';
|
|
9
|
+
import type { IrAction } from '../core/irReducer.ts';
|
|
10
|
+
import type { IrSidePanelId } from '../core/irSidePanels.ts';
|
|
11
|
+
import type { IrDomain, IrSpectrum } from '../core/irSpectrum.ts';
|
|
12
|
+
import type { IrSettings, IrTool, PartialIrState } from '../core/irState.ts';
|
|
13
|
+
/** Everything the viewer can be asked to do. */
|
|
14
|
+
export interface IrEditorActions {
|
|
15
|
+
/** Draw these as well as what is already open. */
|
|
16
|
+
addSpectra: (spectra: IrSpectrum[]) => void;
|
|
17
|
+
/** Draw these instead of what is open, and refit the window to them. */
|
|
18
|
+
setSpectra: (spectra: IrSpectrum[]) => void;
|
|
19
|
+
/** Close one. */
|
|
20
|
+
removeSpectrum: (id: string) => void;
|
|
21
|
+
/** Call one something else. */
|
|
22
|
+
renameSpectrum: (id: string, name: string) => void;
|
|
23
|
+
/** Draw one in another colour. */
|
|
24
|
+
setSpectrumColor: (id: string, color: string) => void;
|
|
25
|
+
/** Draw one, or stop drawing it. */
|
|
26
|
+
setSpectrumVisible: (id: string, visible: boolean) => void;
|
|
27
|
+
/** Point the panels at one, or at none. */
|
|
28
|
+
selectSpectrum: (id: string | null) => void;
|
|
29
|
+
/** Show this window. */
|
|
30
|
+
setDomain: (domain: IrDomain) => void;
|
|
31
|
+
/** Show what fits again. */
|
|
32
|
+
resetDomain: () => void;
|
|
33
|
+
/** Run this tool on the next drag. */
|
|
34
|
+
setTool: (tool: IrTool) => void;
|
|
35
|
+
/** Open or close a side panel. */
|
|
36
|
+
togglePanel: (panelId: IrSidePanelId) => void;
|
|
37
|
+
/** Say why something was refused, or that nothing is wrong any more. */
|
|
38
|
+
setError: (error: string | null) => void;
|
|
39
|
+
/** Change how the spectra are drawn and read. */
|
|
40
|
+
setSettings: (settings: Partial<IrSettings>) => void;
|
|
41
|
+
/** Take a whole state, as a host restoring one supplies it. */
|
|
42
|
+
loadState: (state: PartialIrState) => void;
|
|
43
|
+
/** Close every spectrum and start again from an empty chart. */
|
|
44
|
+
clear: () => void;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Bind every action to a dispatch.
|
|
48
|
+
* @param dispatch - The reducer's dispatch.
|
|
49
|
+
* @returns The actions, stable for as long as the dispatch is.
|
|
50
|
+
*/
|
|
51
|
+
export declare function createIrActions(dispatch: Dispatch<IrAction>): IrEditorActions;
|
|
52
|
+
//# sourceMappingURL=irActions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"irActions.d.ts","sourceRoot":"","sources":["../../../src/ir/ui/irActions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEtC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,E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KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IAC3C,gEAAgE;IAChE,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC,GAAG,eAAe,CAgD7E"}
|
|
@@ -0,0 +1,62 @@
|
|
|
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
|
+
* Bind every action to a dispatch.
|
|
10
|
+
* @param dispatch - The reducer's dispatch.
|
|
11
|
+
* @returns The actions, stable for as long as the dispatch is.
|
|
12
|
+
*/
|
|
13
|
+
export function createIrActions(dispatch) {
|
|
14
|
+
return {
|
|
15
|
+
addSpectra(spectra) {
|
|
16
|
+
dispatch({ type: 'addSpectra', spectra });
|
|
17
|
+
},
|
|
18
|
+
setSpectra(spectra) {
|
|
19
|
+
dispatch({ type: 'setSpectra', spectra });
|
|
20
|
+
},
|
|
21
|
+
removeSpectrum(id) {
|
|
22
|
+
dispatch({ type: 'removeSpectrum', id });
|
|
23
|
+
},
|
|
24
|
+
renameSpectrum(id, name) {
|
|
25
|
+
dispatch({ type: 'renameSpectrum', id, name });
|
|
26
|
+
},
|
|
27
|
+
setSpectrumColor(id, color) {
|
|
28
|
+
dispatch({ type: 'setSpectrumColor', id, color });
|
|
29
|
+
},
|
|
30
|
+
setSpectrumVisible(id, visible) {
|
|
31
|
+
dispatch({ type: 'setSpectrumVisible', id, visible });
|
|
32
|
+
},
|
|
33
|
+
selectSpectrum(id) {
|
|
34
|
+
dispatch({ type: 'selectSpectrum', id });
|
|
35
|
+
},
|
|
36
|
+
setDomain(domain) {
|
|
37
|
+
dispatch({ type: 'setDomain', domain });
|
|
38
|
+
},
|
|
39
|
+
resetDomain() {
|
|
40
|
+
dispatch({ type: 'resetDomain' });
|
|
41
|
+
},
|
|
42
|
+
setTool(tool) {
|
|
43
|
+
dispatch({ type: 'setTool', tool });
|
|
44
|
+
},
|
|
45
|
+
togglePanel(panelId) {
|
|
46
|
+
dispatch({ type: 'togglePanel', panelId });
|
|
47
|
+
},
|
|
48
|
+
setError(error) {
|
|
49
|
+
dispatch({ type: 'setError', error });
|
|
50
|
+
},
|
|
51
|
+
setSettings(settings) {
|
|
52
|
+
dispatch({ type: 'setSettings', settings });
|
|
53
|
+
},
|
|
54
|
+
loadState(state) {
|
|
55
|
+
dispatch({ type: 'loadState', state });
|
|
56
|
+
},
|
|
57
|
+
clear() {
|
|
58
|
+
dispatch({ type: 'clear' });
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=irActions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"irActions.js","sourceRoot":"","sources":["../../../src/ir/ui/irActions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA2CH;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,QAA4B;IAC1D,OAAO;QACL,UAAU,CAAC,OAAO;YAChB,QAAQ,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC,CAAC;QAC5C,CAAC;QACD,UAAU,CAAC,OAAO;YAChB,QAAQ,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC,CAAC;QAC5C,CAAC;QACD,cAAc,CAAC,EAAE;YACf,QAAQ,CAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,EAAE,EAAE,CAAC,CAAC;QAC3C,CAAC;QACD,cAAc,CAAC,EAAE,EAAE,IAAI;YACrB,QAAQ,CAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;QACjD,CAAC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
|
|
@@ -0,0 +1,116 @@
|
|
|
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 band marked 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
|
+
* context and no store, so the same component serves an editor, a report page
|
|
11
|
+
* that only ever draws one spectrum, and a test.
|
|
12
|
+
*/
|
|
13
|
+
import type { ReactNode } from 'react';
|
|
14
|
+
import type { ZoomDragMode } from '../../chart/core/chartDomain.ts';
|
|
15
|
+
import type { AssignedBand } from '../core/assignBands.ts';
|
|
16
|
+
import type { IrBand } from '../core/irBand.ts';
|
|
17
|
+
import type { IrDomain, IrMode, IrSpectrum } from '../core/irSpectrum.ts';
|
|
18
|
+
export interface IrChartProps {
|
|
19
|
+
/** The spectra to draw, each saying in itself whether it is drawn. */
|
|
20
|
+
spectra: readonly IrSpectrum[];
|
|
21
|
+
/**
|
|
22
|
+
* Which value axis to draw them in.
|
|
23
|
+
*
|
|
24
|
+
* A prop rather than state, so the switch lives with whoever owns the toolbar
|
|
25
|
+
* that flips it — and so two charts of the same spectra can be shown side by
|
|
26
|
+
* side, one in each, which is the clearest way to see what the pair means.
|
|
27
|
+
* @default 'transmittance'
|
|
28
|
+
*/
|
|
29
|
+
mode?: IrMode;
|
|
30
|
+
/**
|
|
31
|
+
* The bands to mark, with whatever the correlation table said about them.
|
|
32
|
+
*
|
|
33
|
+
* Handed in rather than picked here, because the same bands answer the chart,
|
|
34
|
+
* a table beside it and any assignment count — and picking three times over
|
|
35
|
+
* would let them disagree.
|
|
36
|
+
* @default no bands
|
|
37
|
+
*/
|
|
38
|
+
assigned?: readonly AssignedBand[];
|
|
39
|
+
/**
|
|
40
|
+
* Whether each band label names its assignment as well as its wavenumber.
|
|
41
|
+
* @default false
|
|
42
|
+
*/
|
|
43
|
+
showAssignments?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* At most how many bands are labelled; all of them are still marked.
|
|
46
|
+
* @default 12
|
|
47
|
+
*/
|
|
48
|
+
labelLimit?: number;
|
|
49
|
+
/**
|
|
50
|
+
* The band the pointer has come to rest on, wherever it was hovered. The chart
|
|
51
|
+
* draws its mark larger, which is how a band hovered in a panel beside the
|
|
52
|
+
* chart shows up on the trace.
|
|
53
|
+
* @default null
|
|
54
|
+
*/
|
|
55
|
+
highlight?: IrBand | null;
|
|
56
|
+
/**
|
|
57
|
+
* Told which band the pointer has come to rest on, and told `null` when it
|
|
58
|
+
* leaves — called only when the answer changes, so it is safe to hang a
|
|
59
|
+
* highlight that redraws half the page on it.
|
|
60
|
+
* @default undefined
|
|
61
|
+
*/
|
|
62
|
+
onHighlight?: (band: IrBand | null) => void;
|
|
63
|
+
/**
|
|
64
|
+
* The window to show, `null` to let the chart show what fits.
|
|
65
|
+
*
|
|
66
|
+
* The chart holds a window of its own — where you are looking is neither saved
|
|
67
|
+
* nor undone — so this is an override rather than the chart's state. Every
|
|
68
|
+
* window a gesture arrives at is reported through `onDomainChange`, and a host
|
|
69
|
+
* that keeps one is expected to hand back what it is told. Handing back `null`
|
|
70
|
+
* where a window was is how a host asks for the fit again, which is what "zoom
|
|
71
|
+
* to fit" on a toolbar comes down to.
|
|
72
|
+
*
|
|
73
|
+
* `x` is in wavenumbers and runs low to high, whichever way the axis is drawn.
|
|
74
|
+
* @default null
|
|
75
|
+
*/
|
|
76
|
+
domain?: IrDomain | null;
|
|
77
|
+
/**
|
|
78
|
+
* Told the window the chart has come to show, whenever it changes — a drag, a
|
|
79
|
+
* turn of the wheel, the double click that fits everything again, or a refit
|
|
80
|
+
* after what is drawn changed.
|
|
81
|
+
* @default undefined
|
|
82
|
+
*/
|
|
83
|
+
onDomainChange?: (domain: IrDomain) => void;
|
|
84
|
+
/**
|
|
85
|
+
* What a drag across the plot asks for: the wavenumber axis alone, or exactly
|
|
86
|
+
* the rectangle it sweeps out. A viewer offering a square-zoom tool switches
|
|
87
|
+
* this while the tool is chosen.
|
|
88
|
+
* @default 'xAxis'
|
|
89
|
+
*/
|
|
90
|
+
drag?: ZoomDragMode;
|
|
91
|
+
/**
|
|
92
|
+
* Identity of the spectrum drawn thicker than the rest, `null` for none.
|
|
93
|
+
* @default null
|
|
94
|
+
*/
|
|
95
|
+
emphasisedId?: string | null;
|
|
96
|
+
/**
|
|
97
|
+
* How wide the chart is drawn, in pixels. Left out, it fills the box it is
|
|
98
|
+
* given and follows it as that box is resized.
|
|
99
|
+
* @default the width of its container
|
|
100
|
+
*/
|
|
101
|
+
width?: number;
|
|
102
|
+
/**
|
|
103
|
+
* How tall it is drawn, in pixels.
|
|
104
|
+
* @default the height of its container
|
|
105
|
+
*/
|
|
106
|
+
height?: number;
|
|
107
|
+
/**
|
|
108
|
+
* Anything else to draw over the spectra, in the same pixels and under the
|
|
109
|
+
* same clip — a band marking a region of interest, a second producer's layer,
|
|
110
|
+
* a ruler. It is rendered last inside the plot, so a host adds to the chart
|
|
111
|
+
* instead of forking it.
|
|
112
|
+
* @default undefined
|
|
113
|
+
*/
|
|
114
|
+
children?: ReactNode;
|
|
115
|
+
}
|
|
116
|
+
//# sourceMappingURL=irChartProps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"irChartProps.d.ts","sourceRoot":"","sources":["../../../src/ir/ui/irChartProps.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAE1E,MAAM,WAAW,YAAY;IAC3B,sEAAsE;IACtE,OAAO,EAAE,SAAS,UAAU,EAAE,CAAC;IAC/B;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,SAAS,YAAY,EAAE,CAAC;IACnC;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B;;;;;OAKG;IACH,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC5C;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IACzB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,QAAQ,KAAK,IAAI,CAAC;IAC5C;;;;;OAKG;IACH,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
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 band marked 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
|
+
* context and no store, so the same component serves an editor, a report page
|
|
11
|
+
* that only ever draws one spectrum, and a test.
|
|
12
|
+
*/
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=irChartProps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"irChartProps.js","sourceRoot":"","sources":["../../../src/ir/ui/irChartProps.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG"}
|