react-cheminfo 0.65.0 → 0.67.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 +33 -17
- package/lib/download/ui/FigureDownloadPanel.d.ts +7 -1
- package/lib/download/ui/FigureDownloadPanel.d.ts.map +1 -1
- package/lib/download/ui/FigureDownloadPanel.js +2 -2
- package/lib/download/ui/FigureDownloadPanel.js.map +1 -1
- package/lib/ecosystem/core/sites.js +3 -3
- package/lib/ecosystem/core/sites.js.map +1 -1
- package/lib/ecosystem/core/types.d.ts +1 -1
- package/lib/ecosystem/core/types.d.ts.map +1 -1
- package/lib/ecosystem/ui/glyphs.js +1 -1
- package/lib/ecosystem/ui/glyphs.js.map +1 -1
- package/lib/i18n/core/chromeCatalog.d.ts +1 -1
- package/lib/i18n/core/chromeCatalog.d.ts.map +1 -1
- package/lib/i18n/core/messageCatalog.d.ts +2 -2
- package/lib/i18n/vite/localeCatalog.d.ts +1 -1
- package/lib/ir/core/analysisSpectra.d.ts +23 -6
- package/lib/ir/core/analysisSpectra.d.ts.map +1 -1
- package/lib/ir/core/analysisSpectra.js.map +1 -1
- package/lib/ir/core/bandLabelPlan.d.ts.map +1 -1
- package/lib/ir/core/bandLabelPlan.js +11 -6
- package/lib/ir/core/bandLabelPlan.js.map +1 -1
- package/lib/ir/core/index.d.ts +15 -11
- package/lib/ir/core/index.d.ts.map +1 -1
- package/lib/ir/core/index.js +9 -6
- package/lib/ir/core/index.js.map +1 -1
- package/lib/ir/core/irBand.d.ts +45 -14
- package/lib/ir/core/irBand.d.ts.map +1 -1
- package/lib/ir/core/irBand.js +28 -6
- package/lib/ir/core/irBand.js.map +1 -1
- package/lib/ir/core/irCommands.d.ts +11 -0
- package/lib/ir/core/irCommands.d.ts.map +1 -1
- package/lib/ir/core/irCommands.js +11 -1
- package/lib/ir/core/irCommands.js.map +1 -1
- package/lib/ir/core/irDomain.d.ts +4 -3
- package/lib/ir/core/irDomain.d.ts.map +1 -1
- package/lib/ir/core/irDomain.js +10 -7
- package/lib/ir/core/irDomain.js.map +1 -1
- package/lib/ir/core/irEditorApi.d.ts +12 -0
- package/lib/ir/core/irEditorApi.d.ts.map +1 -1
- package/lib/ir/core/irFormat.d.ts +14 -2
- package/lib/ir/core/irFormat.d.ts.map +1 -1
- package/lib/ir/core/irFormat.js +33 -4
- package/lib/ir/core/irFormat.js.map +1 -1
- package/lib/ir/core/irMode.d.ts +35 -8
- package/lib/ir/core/irMode.d.ts.map +1 -1
- package/lib/ir/core/irMode.js +38 -10
- package/lib/ir/core/irMode.js.map +1 -1
- package/lib/ir/core/irReducer.d.ts +2 -30
- package/lib/ir/core/irReducer.d.ts.map +1 -1
- package/lib/ir/core/irReducer.js +1 -24
- package/lib/ir/core/irReducer.js.map +1 -1
- package/lib/ir/core/irSidePanels.d.ts +7 -1
- package/lib/ir/core/irSidePanels.d.ts.map +1 -1
- package/lib/ir/core/irSpectrum.d.ts +52 -26
- package/lib/ir/core/irSpectrum.d.ts.map +1 -1
- package/lib/ir/core/irSpectrum.js +21 -15
- package/lib/ir/core/irSpectrum.js.map +1 -1
- package/lib/ir/core/irState.d.ts +46 -5
- package/lib/ir/core/irState.d.ts.map +1 -1
- package/lib/ir/core/irState.js +38 -1
- package/lib/ir/core/irState.js.map +1 -1
- package/lib/ir/core/irTechnique.d.ts +94 -0
- package/lib/ir/core/irTechnique.d.ts.map +1 -0
- package/lib/ir/core/irTechnique.js +87 -0
- package/lib/ir/core/irTechnique.js.map +1 -0
- package/lib/ir/core/irTechniqueCommands.d.ts +26 -0
- package/lib/ir/core/irTechniqueCommands.d.ts.map +1 -0
- package/lib/ir/core/irTechniqueCommands.js +68 -0
- package/lib/ir/core/irTechniqueCommands.js.map +1 -0
- package/lib/ir/core/pickBands.d.ts +6 -5
- package/lib/ir/core/pickBands.d.ts.map +1 -1
- package/lib/ir/core/pickBands.js +49 -26
- package/lib/ir/core/pickBands.js.map +1 -1
- package/lib/ir/core/ramanBands.d.ts +30 -0
- package/lib/ir/core/ramanBands.d.ts.map +1 -0
- package/lib/ir/core/ramanBands.js +83 -0
- package/lib/ir/core/ramanBands.js.map +1 -0
- package/lib/ir/core/spectrumJcamp.d.ts +10 -5
- package/lib/ir/core/spectrumJcamp.d.ts.map +1 -1
- package/lib/ir/core/spectrumJcamp.js +63 -15
- package/lib/ir/core/spectrumJcamp.js.map +1 -1
- package/lib/ir/core/toIrSpectrum.d.ts.map +1 -1
- package/lib/ir/core/toIrSpectrum.js +17 -2
- package/lib/ir/core/toIrSpectrum.js.map +1 -1
- package/lib/ir/ui/BandRow.d.ts +30 -0
- package/lib/ir/ui/BandRow.d.ts.map +1 -0
- package/lib/ir/ui/BandRow.js +42 -0
- package/lib/ir/ui/BandRow.js.map +1 -0
- package/lib/ir/ui/BandsPanel.d.ts +4 -0
- package/lib/ir/ui/BandsPanel.d.ts.map +1 -1
- package/lib/ir/ui/BandsPanel.js +14 -59
- package/lib/ir/ui/BandsPanel.js.map +1 -1
- package/lib/ir/ui/IrAboutDialog.d.ts +7 -0
- package/lib/ir/ui/IrAboutDialog.d.ts.map +1 -1
- package/lib/ir/ui/IrAboutDialog.js +16 -3
- package/lib/ir/ui/IrAboutDialog.js.map +1 -1
- package/lib/ir/ui/IrCanvas.d.ts +7 -0
- package/lib/ir/ui/IrCanvas.d.ts.map +1 -1
- package/lib/ir/ui/IrCanvas.js +9 -4
- package/lib/ir/ui/IrCanvas.js.map +1 -1
- package/lib/ir/ui/IrChart.d.ts +2 -1
- package/lib/ir/ui/IrChart.d.ts.map +1 -1
- package/lib/ir/ui/IrChart.js +22 -21
- package/lib/ir/ui/IrChart.js.map +1 -1
- package/lib/ir/ui/IrCommandProvider.d.ts +7 -0
- package/lib/ir/ui/IrCommandProvider.d.ts.map +1 -1
- package/lib/ir/ui/IrCommandProvider.js +2 -2
- package/lib/ir/ui/IrCommandProvider.js.map +1 -1
- package/lib/ir/ui/IrCommandTooltip.d.ts +7 -0
- package/lib/ir/ui/IrCommandTooltip.d.ts.map +1 -1
- package/lib/ir/ui/IrCommandTooltip.js +3 -2
- package/lib/ir/ui/IrCommandTooltip.js.map +1 -1
- package/lib/ir/ui/IrDocumentationDialog.d.ts +8 -1
- package/lib/ir/ui/IrDocumentationDialog.d.ts.map +1 -1
- package/lib/ir/ui/IrDocumentationDialog.js +30 -7
- package/lib/ir/ui/IrDocumentationDialog.js.map +1 -1
- package/lib/ir/ui/IrEditor.d.ts +25 -5
- package/lib/ir/ui/IrEditor.d.ts.map +1 -1
- package/lib/ir/ui/IrEditor.js +3 -20
- package/lib/ir/ui/IrEditor.js.map +1 -1
- package/lib/ir/ui/IrHeader.d.ts.map +1 -1
- package/lib/ir/ui/IrHeader.js +5 -1
- package/lib/ir/ui/IrHeader.js.map +1 -1
- package/lib/ir/ui/IrLogo.d.ts +11 -3
- package/lib/ir/ui/IrLogo.d.ts.map +1 -1
- package/lib/ir/ui/IrLogo.js +14 -5
- package/lib/ir/ui/IrLogo.js.map +1 -1
- package/lib/ir/ui/IrShell.d.ts +9 -1
- package/lib/ir/ui/IrShell.d.ts.map +1 -1
- package/lib/ir/ui/IrShell.js +26 -74
- package/lib/ir/ui/IrShell.js.map +1 -1
- package/lib/ir/ui/IrSidePanel.d.ts +11 -0
- package/lib/ir/ui/IrSidePanel.d.ts.map +1 -1
- package/lib/ir/ui/IrSidePanel.js +12 -3
- package/lib/ir/ui/IrSidePanel.js.map +1 -1
- package/lib/ir/ui/IrStatusBar.d.ts +3 -2
- package/lib/ir/ui/IrStatusBar.d.ts.map +1 -1
- package/lib/ir/ui/IrStatusBar.js +14 -9
- package/lib/ir/ui/IrStatusBar.js.map +1 -1
- package/lib/ir/ui/IrToolbar.d.ts +3 -0
- package/lib/ir/ui/IrToolbar.d.ts.map +1 -1
- package/lib/ir/ui/IrToolbar.js +10 -3
- package/lib/ir/ui/IrToolbar.js.map +1 -1
- package/lib/ir/ui/IrTraces.d.ts +4 -1
- package/lib/ir/ui/IrTraces.d.ts.map +1 -1
- package/lib/ir/ui/IrTraces.js +2 -0
- package/lib/ir/ui/IrTraces.js.map +1 -1
- package/lib/ir/ui/RamanEditor.d.ts +64 -0
- package/lib/ir/ui/RamanEditor.d.ts.map +1 -0
- package/lib/ir/ui/RamanEditor.js +17 -0
- package/lib/ir/ui/RamanEditor.js.map +1 -0
- package/lib/ir/ui/SpectraPanel.d.ts.map +1 -1
- package/lib/ir/ui/SpectraPanel.js +2 -2
- package/lib/ir/ui/SpectraPanel.js.map +1 -1
- package/lib/ir/ui/SpectrumRow.d.ts +7 -0
- package/lib/ir/ui/SpectrumRow.d.ts.map +1 -1
- package/lib/ir/ui/SpectrumRow.js +4 -5
- package/lib/ir/ui/SpectrumRow.js.map +1 -1
- package/lib/ir/ui/VibrationalEditor.d.ts +62 -0
- package/lib/ir/ui/VibrationalEditor.d.ts.map +1 -0
- package/lib/ir/ui/VibrationalEditor.js +33 -0
- package/lib/ir/ui/VibrationalEditor.js.map +1 -0
- package/lib/ir/ui/bandsTsv.d.ts +19 -0
- package/lib/ir/ui/bandsTsv.d.ts.map +1 -0
- package/lib/ir/ui/bandsTsv.js +38 -0
- package/lib/ir/ui/bandsTsv.js.map +1 -0
- package/lib/ir/ui/index.d.ts +1 -0
- package/lib/ir/ui/index.d.ts.map +1 -1
- package/lib/ir/ui/index.js.map +1 -1
- package/lib/ir/ui/irActions.d.ts +3 -3
- package/lib/ir/ui/irActions.d.ts.map +1 -1
- package/lib/ir/ui/irChartProps.d.ts +21 -4
- package/lib/ir/ui/irChartProps.d.ts.map +1 -1
- package/lib/ir/ui/irChartProps.js +3 -2
- package/lib/ir/ui/irChartProps.js.map +1 -1
- package/lib/ir/ui/irCommandContext.d.ts +8 -0
- package/lib/ir/ui/irCommandContext.d.ts.map +1 -1
- package/lib/ir/ui/irCommandContext.js +14 -3
- package/lib/ir/ui/irCommandContext.js.map +1 -1
- package/lib/ir/ui/irHostPanels.d.ts +53 -0
- package/lib/ir/ui/irHostPanels.d.ts.map +1 -0
- package/lib/ir/ui/irHostPanels.js +41 -0
- package/lib/ir/ui/irHostPanels.js.map +1 -0
- package/lib/ir/ui/useIrEditor.d.ts +3 -3
- package/lib/ir/ui/useIrEditor.d.ts.map +1 -1
- package/lib/ir/ui/useIrEditor.js +13 -4
- package/lib/ir/ui/useIrEditor.js.map +1 -1
- package/lib/ir/ui/useIrHandle.d.ts +14 -0
- package/lib/ir/ui/useIrHandle.d.ts.map +1 -0
- package/lib/ir/ui/useIrHandle.js +39 -0
- package/lib/ir/ui/useIrHandle.js.map +1 -0
- package/lib/ir/ui/useIrSide.d.ts +27 -0
- package/lib/ir/ui/useIrSide.d.ts.map +1 -0
- package/lib/ir/ui/useIrSide.js +42 -0
- package/lib/ir/ui/useIrSide.js.map +1 -0
- package/lib/ir/ui/useIrText.d.ts +40 -0
- package/lib/ir/ui/useIrText.d.ts.map +1 -0
- package/lib/ir/ui/useIrText.js +118 -0
- package/lib/ir/ui/useIrText.js.map +1 -0
- package/lib/ir/ui/useIrZoom.d.ts +15 -0
- package/lib/ir/ui/useIrZoom.d.ts.map +1 -1
- package/lib/ir/ui/useIrZoom.js +6 -4
- package/lib/ir/ui/useIrZoom.js.map +1 -1
- package/lib/ir/ui/useValueAxisZoom.d.ts +20 -0
- package/lib/ir/ui/useValueAxisZoom.d.ts.map +1 -0
- package/lib/ir/ui/useValueAxisZoom.js +54 -0
- package/lib/ir/ui/useValueAxisZoom.js.map +1 -0
- package/lib/ir.d.ts +3 -0
- package/lib/ir.d.ts.map +1 -1
- package/lib/ir.js +3 -0
- package/lib/ir.js.map +1 -1
- package/lib/locales/de.json +29 -2
- package/lib/locales/en.json +29 -2
- package/lib/locales/es.json +29 -2
- package/lib/locales/fr.json +29 -2
- package/lib/locales/it.json +29 -2
- package/lib/molecule3d/core/animatedPng.d.ts +25 -0
- package/lib/molecule3d/core/animatedPng.d.ts.map +1 -0
- package/lib/molecule3d/core/animatedPng.js +59 -0
- package/lib/molecule3d/core/animatedPng.js.map +1 -0
- package/lib/molecule3d/core/file.d.ts +24 -0
- package/lib/molecule3d/core/file.d.ts.map +1 -0
- package/lib/molecule3d/core/file.js +2 -0
- package/lib/molecule3d/core/file.js.map +1 -0
- package/lib/molecule3d/core/index.d.ts +4 -1
- package/lib/molecule3d/core/index.d.ts.map +1 -1
- package/lib/molecule3d/core/index.js +1 -0
- package/lib/molecule3d/core/index.js.map +1 -1
- package/lib/molecule3d/core/settings.d.ts +0 -7
- package/lib/molecule3d/core/settings.d.ts.map +1 -1
- package/lib/molecule3d/core/settings.js.map +1 -1
- package/lib/molecule3d/ui/Molecule3DExport.d.ts +10 -2
- package/lib/molecule3d/ui/Molecule3DExport.d.ts.map +1 -1
- package/lib/molecule3d/ui/Molecule3DExport.js +15 -2
- package/lib/molecule3d/ui/Molecule3DExport.js.map +1 -1
- package/lib/molecule3d/ui/Molecule3DToolbar.js +9 -2
- package/lib/molecule3d/ui/Molecule3DToolbar.js.map +1 -1
- package/lib/molecule3d/ui/MoleculeCanvas3D.d.ts.map +1 -1
- package/lib/molecule3d/ui/MoleculeCanvas3D.js +23 -41
- package/lib/molecule3d/ui/MoleculeCanvas3D.js.map +1 -1
- package/lib/molecule3d/ui/drawScene.d.ts +2 -1
- package/lib/molecule3d/ui/drawScene.d.ts.map +1 -1
- package/lib/molecule3d/ui/drawScene.js.map +1 -1
- package/lib/molecule3d/ui/exportMoleculeImage.d.ts +15 -1
- package/lib/molecule3d/ui/exportMoleculeImage.d.ts.map +1 -1
- package/lib/molecule3d/ui/exportMoleculeImage.js +14 -2
- package/lib/molecule3d/ui/exportMoleculeImage.js.map +1 -1
- package/lib/molecule3d/ui/moleculeFrames.d.ts +47 -0
- package/lib/molecule3d/ui/moleculeFrames.d.ts.map +1 -0
- package/lib/molecule3d/ui/moleculeFrames.js +65 -0
- package/lib/molecule3d/ui/moleculeFrames.js.map +1 -0
- package/lib/molecule3d/ui/moleculeViewer3DProps.d.ts +14 -1
- package/lib/molecule3d/ui/moleculeViewer3DProps.d.ts.map +1 -1
- package/lib/molecule3d/ui/renderMolecule.d.ts +3 -3
- package/lib/molecule3d/ui/renderMolecule.d.ts.map +1 -1
- package/lib/molecule3d/ui/renderMolecule.js +2 -1
- package/lib/molecule3d/ui/renderMolecule.js.map +1 -1
- package/lib/molecule3d/ui/sceneDrawer.d.ts +2 -1
- package/lib/molecule3d/ui/sceneDrawer.d.ts.map +1 -1
- package/lib/molecule3d/ui/sceneDrawer.js +9 -1
- package/lib/molecule3d/ui/sceneDrawer.js.map +1 -1
- package/lib/molecule3d/ui/useImageExport.d.ts +8 -3
- package/lib/molecule3d/ui/useImageExport.d.ts.map +1 -1
- package/lib/molecule3d/ui/useImageExport.js +13 -4
- package/lib/molecule3d/ui/useImageExport.js.map +1 -1
- package/lib/molecule3d/ui/useMoleculeScene.d.ts +2 -1
- package/lib/molecule3d/ui/useMoleculeScene.d.ts.map +1 -1
- package/lib/molecule3d/ui/useMoleculeScene.js.map +1 -1
- package/lib/molecule3d/ui/useMoleculeViewer.d.ts +16 -0
- package/lib/molecule3d/ui/useMoleculeViewer.d.ts.map +1 -0
- package/lib/molecule3d/ui/useMoleculeViewer.js +37 -0
- package/lib/molecule3d/ui/useMoleculeViewer.js.map +1 -0
- package/lib/molecule3d/ui/usePolarSurfaceArea.d.ts +3 -3
- package/lib/molecule3d/ui/usePolarSurfaceArea.d.ts.map +1 -1
- package/lib/molecule3d/ui/usePolarSurfaceArea.js +4 -3
- package/lib/molecule3d/ui/usePolarSurfaceArea.js.map +1 -1
- package/lib/molecule3d/ui/viewer.d.ts +4 -1
- package/lib/molecule3d/ui/viewer.d.ts.map +1 -1
- package/lib/molecule3d/ui/viewer.js +21 -19
- package/lib/molecule3d/ui/viewer.js.map +1 -1
- package/lib/molecule3d/ui/viewerTypes.d.ts +6 -0
- package/lib/molecule3d/ui/viewerTypes.d.ts.map +1 -1
- package/lib/molstar/core/captureScene.d.ts +19 -1
- package/lib/molstar/core/captureScene.d.ts.map +1 -1
- package/lib/molstar/core/captureScene.js +57 -2
- package/lib/molstar/core/captureScene.js.map +1 -1
- package/lib/molstar/core/index.d.ts +5 -2
- package/lib/molstar/core/index.d.ts.map +1 -1
- package/lib/molstar/core/index.js +4 -2
- package/lib/molstar/core/index.js.map +1 -1
- package/lib/molstar/core/trajectory.d.ts +56 -0
- package/lib/molstar/core/trajectory.d.ts.map +1 -0
- package/lib/molstar/core/trajectory.js +96 -0
- package/lib/molstar/core/trajectory.js.map +1 -0
- package/lib/panel/ui/PanelRail.d.ts.map +1 -1
- package/lib/panel/ui/PanelRail.js +1 -1
- package/lib/panel/ui/PanelRail.js.map +1 -1
- package/lib/raman.d.ts +17 -0
- package/lib/raman.d.ts.map +1 -0
- package/lib/raman.js +12 -0
- package/lib/raman.js.map +1 -0
- package/lib/router/core/basePath.d.ts +2 -2
- package/lib/router/core/basePath.js +2 -2
- package/lib/router/core/siteAddresses.d.ts +1 -1
- package/lib/router/core/siteAddresses.js +1 -1
- package/lib/seo/core/siteFiles.js +1 -1
- package/lib/seo/core/siteFiles.js.map +1 -1
- package/lib/server/answerAddresses.d.ts +3 -3
- package/lib/server/answerAddresses.js +3 -3
- package/lib/structure/core/index.d.ts +2 -0
- package/lib/structure/core/index.d.ts.map +1 -1
- package/lib/structure/core/index.js +1 -0
- package/lib/structure/core/index.js.map +1 -1
- package/lib/structure/core/structureTransfer.d.ts +29 -0
- package/lib/structure/core/structureTransfer.d.ts.map +1 -0
- package/lib/structure/core/structureTransfer.js +26 -0
- package/lib/structure/core/structureTransfer.js.map +1 -0
- package/lib/structure/ui/EditorImportButton.d.ts +20 -0
- package/lib/structure/ui/EditorImportButton.d.ts.map +1 -0
- package/lib/structure/ui/EditorImportButton.js +24 -0
- package/lib/structure/ui/EditorImportButton.js.map +1 -0
- package/lib/structure/ui/EditorImportProblem.d.ts +17 -0
- package/lib/structure/ui/EditorImportProblem.d.ts.map +1 -0
- package/lib/structure/ui/EditorImportProblem.js +32 -0
- package/lib/structure/ui/EditorImportProblem.js.map +1 -0
- package/lib/structure/ui/StructureDrop.d.ts +39 -0
- package/lib/structure/ui/StructureDrop.d.ts.map +1 -0
- package/lib/structure/ui/StructureDrop.js +19 -0
- package/lib/structure/ui/StructureDrop.js.map +1 -0
- package/lib/structure/ui/StructureDropOverlay.d.ts +16 -0
- package/lib/structure/ui/StructureDropOverlay.d.ts.map +1 -0
- package/lib/structure/ui/StructureDropOverlay.js +29 -0
- package/lib/structure/ui/StructureDropOverlay.js.map +1 -0
- package/lib/structure/ui/StructureEditor.d.ts +3 -80
- package/lib/structure/ui/StructureEditor.d.ts.map +1 -1
- package/lib/structure/ui/StructureEditor.js +21 -33
- package/lib/structure/ui/StructureEditor.js.map +1 -1
- package/lib/structure/ui/importedStructure.d.ts +25 -0
- package/lib/structure/ui/importedStructure.d.ts.map +1 -0
- package/lib/structure/ui/importedStructure.js +74 -0
- package/lib/structure/ui/importedStructure.js.map +1 -0
- package/lib/structure/ui/index.d.ts +2 -0
- package/lib/structure/ui/index.d.ts.map +1 -1
- package/lib/structure/ui/index.js +1 -0
- package/lib/structure/ui/index.js.map +1 -1
- package/lib/structure/ui/structureEditorProps.d.ts +98 -0
- package/lib/structure/ui/structureEditorProps.d.ts.map +1 -0
- package/lib/structure/ui/structureEditorProps.js +2 -0
- package/lib/structure/ui/structureEditorProps.js.map +1 -0
- package/lib/structure/ui/useDebouncedChange.d.ts +16 -0
- package/lib/structure/ui/useDebouncedChange.d.ts.map +1 -0
- package/lib/structure/ui/useDebouncedChange.js +30 -0
- package/lib/structure/ui/useDebouncedChange.js.map +1 -0
- package/lib/structure/ui/useStructureDrop.d.ts +30 -0
- package/lib/structure/ui/useStructureDrop.d.ts.map +1 -0
- package/lib/structure/ui/useStructureDrop.js +49 -0
- package/lib/structure/ui/useStructureDrop.js.map +1 -0
- package/lib/structure/ui/useStructureImport.d.ts +45 -0
- package/lib/structure/ui/useStructureImport.d.ts.map +1 -0
- package/lib/structure/ui/useStructureImport.js +62 -0
- package/lib/structure/ui/useStructureImport.js.map +1 -0
- package/package.json +5 -1
- package/src/download/ui/FigureDownloadPanel.tsx +9 -2
- package/src/ecosystem/core/sites.ts +3 -3
- package/src/ecosystem/core/types.ts +1 -1
- package/src/ecosystem/ui/glyphs.tsx +1 -1
- package/src/i18n/core/messageCatalog.ts +2 -2
- package/src/i18n/vite/localeCatalog.ts +1 -1
- package/src/ir/core/analysisSpectra.ts +26 -10
- package/src/ir/core/bandLabelPlan.ts +21 -10
- package/src/ir/core/index.ts +31 -7
- package/src/ir/core/irBand.ts +52 -14
- package/src/ir/core/irCommands.ts +15 -1
- package/src/ir/core/irDomain.ts +9 -7
- package/src/ir/core/irEditorApi.ts +13 -0
- package/src/ir/core/irFormat.ts +39 -6
- package/src/ir/core/irMode.ts +42 -10
- package/src/ir/core/irReducer.ts +3 -51
- package/src/ir/core/irSidePanels.ts +8 -1
- package/src/ir/core/irSpectrum.ts +59 -30
- package/src/ir/core/irState.ts +73 -5
- package/src/ir/core/irTechnique.ts +115 -0
- package/src/ir/core/irTechniqueCommands.ts +82 -0
- package/src/ir/core/pickBands.ts +63 -28
- package/src/ir/core/ramanBands.ts +105 -0
- package/src/ir/core/spectrumJcamp.ts +65 -16
- package/src/ir/core/toIrSpectrum.ts +20 -2
- package/src/ir/ui/BandRow.tsx +107 -0
- package/src/ir/ui/BandsPanel.tsx +32 -125
- package/src/ir/ui/IrAboutDialog.tsx +69 -28
- package/src/ir/ui/IrCanvas.tsx +29 -3
- package/src/ir/ui/IrChart.tsx +31 -24
- package/src/ir/ui/IrCommandProvider.tsx +10 -3
- package/src/ir/ui/IrCommandTooltip.tsx +11 -2
- package/src/ir/ui/IrDocumentationDialog.tsx +99 -55
- package/src/ir/ui/IrEditor.tsx +27 -40
- package/src/ir/ui/IrHeader.tsx +10 -3
- package/src/ir/ui/IrLogo.tsx +28 -9
- package/src/ir/ui/IrShell.tsx +47 -96
- package/src/ir/ui/IrSidePanel.tsx +36 -10
- package/src/ir/ui/IrStatusBar.tsx +17 -12
- package/src/ir/ui/IrToolbar.tsx +26 -15
- package/src/ir/ui/IrTraces.tsx +5 -1
- package/src/ir/ui/RamanEditor.tsx +71 -0
- package/src/ir/ui/SpectraPanel.tsx +2 -1
- package/src/ir/ui/SpectrumRow.tsx +14 -5
- package/src/ir/ui/VibrationalEditor.tsx +113 -0
- package/src/ir/ui/bandsTsv.ts +46 -0
- package/src/ir/ui/index.ts +1 -0
- package/src/ir/ui/irActions.ts +3 -3
- package/src/ir/ui/irChartProps.ts +21 -4
- package/src/ir/ui/irCommandContext.tsx +18 -3
- package/src/ir/ui/irHostPanels.ts +76 -0
- package/src/ir/ui/useIrEditor.ts +20 -8
- package/src/ir/ui/useIrHandle.ts +51 -0
- package/src/ir/ui/useIrSide.ts +60 -0
- package/src/ir/ui/useIrText.ts +170 -0
- package/src/ir/ui/useIrZoom.ts +22 -3
- package/src/ir/ui/useValueAxisZoom.ts +67 -0
- package/src/ir.ts +3 -0
- package/src/locales/de.json +29 -2
- package/src/locales/en.json +29 -2
- package/src/locales/es.json +29 -2
- package/src/locales/fr.json +29 -2
- package/src/locales/it.json +29 -2
- package/src/molecule3d/core/animatedPng.ts +79 -0
- package/src/molecule3d/core/file.ts +23 -0
- package/src/molecule3d/core/index.ts +3 -1
- package/src/molecule3d/core/settings.ts +0 -8
- package/src/molecule3d/ui/Molecule3DExport.tsx +43 -5
- package/src/molecule3d/ui/Molecule3DToolbar.tsx +9 -2
- package/src/molecule3d/ui/MoleculeCanvas3D.tsx +24 -38
- package/src/molecule3d/ui/drawScene.ts +2 -1
- package/src/molecule3d/ui/exportMoleculeImage.ts +28 -3
- package/src/molecule3d/ui/moleculeFrames.ts +88 -0
- package/src/molecule3d/ui/moleculeViewer3DProps.ts +14 -5
- package/src/molecule3d/ui/renderMolecule.ts +5 -3
- package/src/molecule3d/ui/sceneDrawer.ts +14 -2
- package/src/molecule3d/ui/useImageExport.ts +22 -5
- package/src/molecule3d/ui/useMoleculeScene.ts +2 -1
- package/src/molecule3d/ui/useMoleculeViewer.ts +46 -0
- package/src/molecule3d/ui/usePolarSurfaceArea.ts +6 -4
- package/src/molecule3d/ui/viewer.ts +34 -27
- package/src/molecule3d/ui/viewerTypes.ts +6 -0
- package/src/molstar/core/captureScene.ts +85 -2
- package/src/molstar/core/index.ts +13 -2
- package/src/molstar/core/trajectory.ts +117 -0
- package/src/panel/ui/PanelRail.tsx +3 -0
- package/src/raman.ts +20 -0
- package/src/router/core/basePath.ts +2 -2
- package/src/router/core/siteAddresses.ts +1 -1
- package/src/seo/core/siteFiles.ts +1 -1
- package/src/server/answerAddresses.ts +3 -3
- package/src/structure/core/index.ts +8 -0
- package/src/structure/core/structureTransfer.ts +37 -0
- package/src/structure/ui/EditorImportButton.tsx +59 -0
- package/src/structure/ui/EditorImportProblem.tsx +63 -0
- package/src/structure/ui/StructureDrop.tsx +66 -0
- package/src/structure/ui/StructureDropOverlay.tsx +50 -0
- package/src/structure/ui/StructureEditor.tsx +49 -134
- package/src/structure/ui/importedStructure.ts +83 -0
- package/src/structure/ui/index.ts +2 -0
- package/src/structure/ui/structureEditorProps.ts +103 -0
- package/src/structure/ui/useDebouncedChange.ts +41 -0
- package/src/structure/ui/useStructureDrop.ts +76 -0
- package/src/structure/ui/useStructureImport.ts +122 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Finding the bands of a Raman spectrum, with the picker infrared bands are
|
|
3
|
+
* found with.
|
|
4
|
+
*
|
|
5
|
+
* `autoPeakPicking` from `ir-spectrum` is `common-spectrum`'s, which runs
|
|
6
|
+
* `ml-gsd` over whichever variable it is pointed at — the picker
|
|
7
|
+
* `raman-spectrum` itself exports — and converts each peak to absorbance and
|
|
8
|
+
* transmittance on top. A Raman band is a maximum of intensity, so the picker is
|
|
9
|
+
* pointed at the intensity and only where each peak sits is read back: the
|
|
10
|
+
* conversion speaks two axes a Raman spectrum does not have.
|
|
11
|
+
*
|
|
12
|
+
* The strength letter follows the rule `ir-spectrum` applies to transmittance,
|
|
13
|
+
* applied to intensity: where the band's top sits between the spectrum's own
|
|
14
|
+
* lowest and highest intensity — below a third weak, below two thirds medium,
|
|
15
|
+
* strong above.
|
|
16
|
+
*/
|
|
17
|
+
import { autoPeakPicking } from 'ir-spectrum';
|
|
18
|
+
import { xFindClosestIndex, xMinMaxValues } from 'ml-spectra-processing';
|
|
19
|
+
/**
|
|
20
|
+
* The bands of a Raman spectrum, picked on its intensity.
|
|
21
|
+
* @param spectrum - The spectrum to pick from.
|
|
22
|
+
* @param intensity - Its intensity, which the bands are maxima of.
|
|
23
|
+
* @param picking - Where to pick, and how finely.
|
|
24
|
+
* @returns The bands, in the order they were found.
|
|
25
|
+
*/
|
|
26
|
+
export function ramanBands(spectrum, intensity, picking) {
|
|
27
|
+
const { id, wavenumber } = spectrum;
|
|
28
|
+
const picked = autoPeakPicking(measurementOf(wavenumber, intensity), {
|
|
29
|
+
...picking,
|
|
30
|
+
yVariable: 'y',
|
|
31
|
+
});
|
|
32
|
+
const { min, max } = xMinMaxValues(intensity);
|
|
33
|
+
const bands = [];
|
|
34
|
+
for (const peak of picked) {
|
|
35
|
+
if (!Number.isFinite(peak.wavenumber))
|
|
36
|
+
continue;
|
|
37
|
+
// The peak sits on a sample, so its intensity is read off that sample.
|
|
38
|
+
const value = intensity[xFindClosestIndex(wavenumber, peak.wavenumber)];
|
|
39
|
+
if (value === undefined)
|
|
40
|
+
continue;
|
|
41
|
+
bands.push({
|
|
42
|
+
spectrumId: id,
|
|
43
|
+
wavenumber: peak.wavenumber,
|
|
44
|
+
intensity: value,
|
|
45
|
+
strength: strengthOf(value, min, max),
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
return bands;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* How strong a band is, from where its top sits in the spectrum's range.
|
|
52
|
+
* @param value - The band's intensity.
|
|
53
|
+
* @param lowest - The spectrum's lowest intensity.
|
|
54
|
+
* @param highest - Its highest.
|
|
55
|
+
* @returns The letter a correlation table would use.
|
|
56
|
+
*/
|
|
57
|
+
function strengthOf(value, lowest, highest) {
|
|
58
|
+
const position = (value - lowest) / (highest - lowest);
|
|
59
|
+
if (position < WEAK_BELOW)
|
|
60
|
+
return 'w';
|
|
61
|
+
if (position < MEDIUM_BELOW)
|
|
62
|
+
return 'm';
|
|
63
|
+
return 'S';
|
|
64
|
+
}
|
|
65
|
+
/** Below this fraction of the spectrum's range a band is weak. */
|
|
66
|
+
const WEAK_BELOW = 0.33;
|
|
67
|
+
/** Below this one it is medium, and strong from here up. */
|
|
68
|
+
const MEDIUM_BELOW = 0.66;
|
|
69
|
+
/**
|
|
70
|
+
* The spectrum as `ir-spectrum` wants it: the shifts, and the intensity as `y`.
|
|
71
|
+
* @param shift - The Raman shifts, ascending.
|
|
72
|
+
* @param intensity - The intensity at each.
|
|
73
|
+
* @returns The measurement.
|
|
74
|
+
*/
|
|
75
|
+
function measurementOf(shift, intensity) {
|
|
76
|
+
return {
|
|
77
|
+
variables: {
|
|
78
|
+
x: { label: 'Raman shift', units: '1/cm', symbol: 'x', data: shift },
|
|
79
|
+
y: { label: 'Intensity', units: '', symbol: 'y', data: intensity },
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=ramanBands.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ramanBands.js","sourceRoot":"","sources":["../../../src/ir/core/ramanBands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAUzE;;;;;;GAMG;AACH,MAAM,UAAU,UAAU,CACxB,QAAoB,EACpB,SAAuB,EACvB,OAA2B;IAE3B,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,GAAG,QAAQ,CAAC;IACpC,MAAM,MAAM,GAAG,eAAe,CAAC,aAAa,CAAC,UAAU,E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AAC,EAAE,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE;YACpE,CAAC,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE;SACnE;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
* turned inside out, and a bare column of numbers leaves whoever opens it next
|
|
8
8
|
* to guess which. `##YUNITS=` states it, and `ir-spectrum` reads it back and
|
|
9
9
|
* derives the other axis from it, so a spectrum written here returns carrying
|
|
10
|
-
* both.
|
|
10
|
+
* both. A Raman spectrum is written as its intensity, under a `##DATA TYPE=`
|
|
11
|
+
* that says it is Raman.
|
|
11
12
|
*
|
|
12
13
|
* The points are written as an `##PEAK TABLE=` of explicit `x y` pairs rather
|
|
13
14
|
* than as a compressed `##XYDATA=` record. An XYDATA record states a first
|
|
@@ -21,8 +22,8 @@ import type { IrMode, IrSpectrum } from './irSpectrum.ts';
|
|
|
21
22
|
export declare const JCAMP_EXTENSION = ".jdx";
|
|
22
23
|
/** What a JCAMP-DX file is served as. */
|
|
23
24
|
export declare const JCAMP_MIME_TYPE = "chemical/x-jcamp-dx";
|
|
24
|
-
/**
|
|
25
|
-
export declare const DEFAULT_DATA_TYPE
|
|
25
|
+
/** The infrared data type, written when the file that was read named none. */
|
|
26
|
+
export declare const DEFAULT_DATA_TYPE: "INFRARED SPECTRUM";
|
|
26
27
|
/**
|
|
27
28
|
* Write one spectrum as a JCAMP-DX block.
|
|
28
29
|
*
|
|
@@ -30,10 +31,13 @@ export declare const DEFAULT_DATA_TYPE = "INFRARED SPECTRUM";
|
|
|
30
31
|
* which that was, and only otherwise the one being read. Writing what is on
|
|
31
32
|
* screen instead would export a spectrum that had been through a logarithm it
|
|
32
33
|
* was never measured with — and, where a band bottoms out at zero transmittance,
|
|
33
|
-
* an absorbance of infinity that no reader can take back.
|
|
34
|
+
* an absorbance of infinity that no reader can take back. A spectrum carrying
|
|
35
|
+
* neither falls back on whichever axis it does carry, so a Raman spectrum is
|
|
36
|
+
* written as its intensity.
|
|
34
37
|
* @param spectrum - The spectrum.
|
|
35
38
|
* @param mode - The axis being read, used when the file named none.
|
|
36
39
|
* @returns The block, `##TITLE=` through `##END=`.
|
|
40
|
+
* @throws {Error} When the spectrum carries no value axis at all.
|
|
37
41
|
*/
|
|
38
42
|
export declare function irSpectrumToJcamp(spectrum: IrSpectrum, mode: IrMode): string;
|
|
39
43
|
/**
|
|
@@ -51,7 +55,8 @@ export declare function irSpectrumToJcamp(spectrum: IrSpectrum, mode: IrMode): s
|
|
|
51
55
|
* spectrum would have written.
|
|
52
56
|
* @param spectra - The spectra, in the order the list holds them.
|
|
53
57
|
* @param mode - The axis being read, used for a spectrum whose file named none.
|
|
54
|
-
* @param title - What to call the file's own outer block.
|
|
58
|
+
* @param title - What to call the file's own outer block. Defaults to the
|
|
59
|
+
* count and the technique that reads `mode`: `2 infrared spectra`.
|
|
55
60
|
* @returns The file.
|
|
56
61
|
*/
|
|
57
62
|
export declare function irSpectraToJcamp(spectra: readonly IrSpectrum[], mode: IrMode, title?: string): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spectrumJcamp.d.ts","sourceRoot":"","sources":["../../../src/ir/core/spectrumJcamp.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"spectrumJcamp.d.ts","sourceRoot":"","sources":["../../../src/ir/core/spectrumJcamp.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAG1D,uDAAuD;AACvD,eAAO,MAAM,eAAe,SAAS,CAAC;AAEtC,yCAAyC;AACzC,eAAO,MAAM,eAAe,wBAAwB,CAAC;AAErD,8EAA8E;AAC9E,eAAO,MAAM,iBAAiB,qBAAuC,CAAC;AAEtE;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAU5E;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,SAAS,UAAU,EAAE,EAC9B,IAAI,EAAE,MAAM,EACZ,KAAK,SAAgF,GACpF,MAAM,CAeR"}
|
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
* turned inside out, and a bare column of numbers leaves whoever opens it next
|
|
8
8
|
* to guess which. `##YUNITS=` states it, and `ir-spectrum` reads it back and
|
|
9
9
|
* derives the other axis from it, so a spectrum written here returns carrying
|
|
10
|
-
* both.
|
|
10
|
+
* both. A Raman spectrum is written as its intensity, under a `##DATA TYPE=`
|
|
11
|
+
* that says it is Raman.
|
|
11
12
|
*
|
|
12
13
|
* The points are written as an `##PEAK TABLE=` of explicit `x y` pairs rather
|
|
13
14
|
* than as a compressed `##XYDATA=` record. An XYDATA record states a first
|
|
@@ -17,12 +18,13 @@
|
|
|
17
18
|
* Explicit pairs round trip whatever the spacing.
|
|
18
19
|
*/
|
|
19
20
|
import { fromJSON } from 'convert-to-jcamp';
|
|
21
|
+
import { IR_TECHNIQUE_RULES, irModeTechnique } from "./irTechnique.js";
|
|
20
22
|
/** The extension a written spectrum is saved under. */
|
|
21
23
|
export const JCAMP_EXTENSION = '.jdx';
|
|
22
24
|
/** What a JCAMP-DX file is served as. */
|
|
23
25
|
export const JCAMP_MIME_TYPE = 'chemical/x-jcamp-dx';
|
|
24
|
-
/**
|
|
25
|
-
export const DEFAULT_DATA_TYPE =
|
|
26
|
+
/** The infrared data type, written when the file that was read named none. */
|
|
27
|
+
export const DEFAULT_DATA_TYPE = IR_TECHNIQUE_RULES.infrared.dataType;
|
|
26
28
|
/**
|
|
27
29
|
* Write one spectrum as a JCAMP-DX block.
|
|
28
30
|
*
|
|
@@ -30,14 +32,20 @@ export const DEFAULT_DATA_TYPE = 'INFRARED SPECTRUM';
|
|
|
30
32
|
* which that was, and only otherwise the one being read. Writing what is on
|
|
31
33
|
* screen instead would export a spectrum that had been through a logarithm it
|
|
32
34
|
* was never measured with — and, where a band bottoms out at zero transmittance,
|
|
33
|
-
* an absorbance of infinity that no reader can take back.
|
|
35
|
+
* an absorbance of infinity that no reader can take back. A spectrum carrying
|
|
36
|
+
* neither falls back on whichever axis it does carry, so a Raman spectrum is
|
|
37
|
+
* written as its intensity.
|
|
34
38
|
* @param spectrum - The spectrum.
|
|
35
39
|
* @param mode - The axis being read, used when the file named none.
|
|
36
40
|
* @returns The block, `##TITLE=` through `##END=`.
|
|
41
|
+
* @throws {Error} When the spectrum carries no value axis at all.
|
|
37
42
|
*/
|
|
38
43
|
export function irSpectrumToJcamp(spectrum, mode) {
|
|
39
|
-
const written = spectrum
|
|
40
|
-
const values = written
|
|
44
|
+
const written = writtenAxis(spectrum, mode);
|
|
45
|
+
const values = spectrum[written];
|
|
46
|
+
if (values === undefined) {
|
|
47
|
+
throw new Error(`${spectrum.name} carries no value axis to write.`);
|
|
48
|
+
}
|
|
41
49
|
return fromJSON({ x: spectrum.wavenumber, y: values }, { info: infoRecords(spectrum, written), meta: metaRecords(spectrum) });
|
|
42
50
|
}
|
|
43
51
|
/**
|
|
@@ -55,10 +63,11 @@ export function irSpectrumToJcamp(spectrum, mode) {
|
|
|
55
63
|
* spectrum would have written.
|
|
56
64
|
* @param spectra - The spectra, in the order the list holds them.
|
|
57
65
|
* @param mode - The axis being read, used for a spectrum whose file named none.
|
|
58
|
-
* @param title - What to call the file's own outer block.
|
|
66
|
+
* @param title - What to call the file's own outer block. Defaults to the
|
|
67
|
+
* count and the technique that reads `mode`: `2 infrared spectra`.
|
|
59
68
|
* @returns The file.
|
|
60
69
|
*/
|
|
61
|
-
export function irSpectraToJcamp(spectra, mode, title = `${spectra.length}
|
|
70
|
+
export function irSpectraToJcamp(spectra, mode, title = `${spectra.length} ${IR_TECHNIQUE_RULES[irModeTechnique(mode)].name} spectra`) {
|
|
62
71
|
const only = spectra.length === 1 ? spectra[0] : undefined;
|
|
63
72
|
if (only !== undefined)
|
|
64
73
|
return irSpectrumToJcamp(only, mode);
|
|
@@ -74,6 +83,32 @@ ${blocks.join('\n')}
|
|
|
74
83
|
##END=
|
|
75
84
|
`;
|
|
76
85
|
}
|
|
86
|
+
/**
|
|
87
|
+
* Which axis of a spectrum is written.
|
|
88
|
+
* @param spectrum - The spectrum.
|
|
89
|
+
* @param mode - The axis being read.
|
|
90
|
+
* @returns The axis its file recorded, else the one being read, else the first
|
|
91
|
+
* it carries; `mode` when it carries none, which the caller refuses.
|
|
92
|
+
*/
|
|
93
|
+
function writtenAxis(spectrum, mode) {
|
|
94
|
+
const { recorded } = spectrum.origin;
|
|
95
|
+
if (recorded !== undefined && spectrum[recorded] !== undefined) {
|
|
96
|
+
return recorded;
|
|
97
|
+
}
|
|
98
|
+
if (spectrum[mode] !== undefined)
|
|
99
|
+
return mode;
|
|
100
|
+
for (const axis of WRITTEN_AXES) {
|
|
101
|
+
if (spectrum[axis] !== undefined)
|
|
102
|
+
return axis;
|
|
103
|
+
}
|
|
104
|
+
return mode;
|
|
105
|
+
}
|
|
106
|
+
/** The axes a spectrum may carry, in the order one is looked for. */
|
|
107
|
+
const WRITTEN_AXES = [
|
|
108
|
+
'transmittance',
|
|
109
|
+
'absorbance',
|
|
110
|
+
'intensity',
|
|
111
|
+
];
|
|
77
112
|
/**
|
|
78
113
|
* The standard records of a block: what it is called, and what its axes are.
|
|
79
114
|
* @param spectrum - The spectrum.
|
|
@@ -83,16 +118,29 @@ ${blocks.join('\n')}
|
|
|
83
118
|
function infoRecords(spectrum, written) {
|
|
84
119
|
return {
|
|
85
120
|
title: recordValue(spectrum.name),
|
|
86
|
-
// The technique as the file stated it,
|
|
87
|
-
//
|
|
88
|
-
|
|
121
|
+
// The technique as the file stated it, and otherwise the one the written
|
|
122
|
+
// axis belongs to, so a Raman spectrum is never written out claiming to be
|
|
123
|
+
// infrared.
|
|
124
|
+
dataType: technique(spectrum) ??
|
|
125
|
+
IR_TECHNIQUE_RULES[irModeTechnique(written)].dataType,
|
|
89
126
|
xUnits: '1/CM',
|
|
90
|
-
|
|
91
|
-
// transmittance when the label says `trans`, and to be a percentage rather
|
|
92
|
-
// than a fraction when it carries a `%`.
|
|
93
|
-
yUnits: written === 'absorbance' ? 'ABSORBANCE' : 'Transmittance (%)',
|
|
127
|
+
yUnits: Y_UNITS[written],
|
|
94
128
|
};
|
|
95
129
|
}
|
|
130
|
+
/**
|
|
131
|
+
* What each axis is called in `##YUNITS=`.
|
|
132
|
+
*
|
|
133
|
+
* Spelled the way `ir-spectrum` reads them: it takes the axis to be
|
|
134
|
+
* transmittance when the label says `trans`, and to be a percentage rather than
|
|
135
|
+
* a fraction when it carries a `%`. A Raman intensity has no unit of its own —
|
|
136
|
+
* counts on one instrument, a fraction of the strongest band on another — so it
|
|
137
|
+
* is named, as Raman instruments write it.
|
|
138
|
+
*/
|
|
139
|
+
const Y_UNITS = {
|
|
140
|
+
transmittance: 'Transmittance (%)',
|
|
141
|
+
absorbance: 'ABSORBANCE',
|
|
142
|
+
intensity: 'INTENSITY',
|
|
143
|
+
};
|
|
96
144
|
/**
|
|
97
145
|
* The `$`-prefixed records of a block: the acquisition, as the file stated it.
|
|
98
146
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spectrumJcamp.js","sourceRoot":"","sources":["../../../src/ir/core/spectrumJcamp.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"spectrumJcamp.js","sourceRoot":"","sources":["../../../src/ir/core/spectrumJcamp.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG5C,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,kBAAkB,C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"toIrSpectrum.d.ts","sourceRoot":"","sources":["../../../src/ir/core/toIrSpectrum.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,yEAAyE;AACzE,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1B;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,gBAAgB,EACxB,OAAO,GAAE,mBAAwB,GAChC,UAAU,
|
|
1
|
+
{"version":3,"file":"toIrSpectrum.d.ts","sourceRoot":"","sources":["../../../src/ir/core/toIrSpectrum.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,yEAAyE;AACzE,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1B;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,gBAAgB,EACxB,OAAO,GAAE,mBAAwB,GAChC,UAAU,CAkBZ;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CACzB,MAAM,EAAE,SAAS,gBAAgB,EAAE,EACnC,OAAO,GAAE,IAAI,CAAC,mBAAmB,EAAE,OAAO,GAAG,SAAS,CAAM,GAC3D,UAAU,EAAE,CAad"}
|
|
@@ -21,8 +21,7 @@ export function toIrSpectrum(loaded, options = {}) {
|
|
|
21
21
|
name: name ?? loaded.name ?? loaded.origin.fileName ?? 'spectrum',
|
|
22
22
|
color,
|
|
23
23
|
wavenumber: loaded.wavenumber,
|
|
24
|
-
|
|
25
|
-
transmittance: loaded.transmittance,
|
|
24
|
+
...valueAxes(loaded),
|
|
26
25
|
meta: loaded.meta,
|
|
27
26
|
origin: loaded.origin,
|
|
28
27
|
visible,
|
|
@@ -53,4 +52,20 @@ export function toIrSpectra(loaded, options = {}) {
|
|
|
53
52
|
}
|
|
54
53
|
return spectra;
|
|
55
54
|
}
|
|
55
|
+
/**
|
|
56
|
+
* The value axes a loaded spectrum carries, and only those.
|
|
57
|
+
*
|
|
58
|
+
* An absent axis is an absent key, never a key holding `undefined`: the two
|
|
59
|
+
* read the same in a debugger and differently in every structural comparison.
|
|
60
|
+
* @param loaded - What the reader produced.
|
|
61
|
+
* @returns Its absorbance and transmittance, or its intensity.
|
|
62
|
+
*/
|
|
63
|
+
function valueAxes(loaded) {
|
|
64
|
+
const { absorbance, transmittance, intensity } = loaded;
|
|
65
|
+
return {
|
|
66
|
+
...(absorbance === undefined ? {} : { absorbance }),
|
|
67
|
+
...(transmittance === undefined ? {} : { transmittance }),
|
|
68
|
+
...(intensity === undefined ? {} : { intensity }),
|
|
69
|
+
};
|
|
70
|
+
}
|
|
56
71
|
//# sourceMappingURL=toIrSpectrum.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toIrSpectrum.js","sourceRoot":"","sources":["../../../src/ir/core/toIrSpectrum.ts"],"names":[],"mappings":"AAAA;;;;;;;G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ands.ts';
|
|
2
|
+
import type { IrBand } from '../core/irBand.ts';
|
|
3
|
+
import type { IrMode } from '../core/irSpectrum.ts';
|
|
4
|
+
export interface BandRowProps {
|
|
5
|
+
/** The band and everything it might be. */
|
|
6
|
+
entry: AssignedBand;
|
|
7
|
+
/** Which value axis is being read. */
|
|
8
|
+
mode: IrMode;
|
|
9
|
+
/** Whether the row has a column for what the band could be. */
|
|
10
|
+
assignments: boolean;
|
|
11
|
+
/** Whether the pointer is on this band, here or on the chart. */
|
|
12
|
+
lit: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Told when the pointer arrives on this row, and when it leaves.
|
|
15
|
+
* @default undefined
|
|
16
|
+
*/
|
|
17
|
+
onHighlight?: (band: IrBand | null) => void;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* One band: where it is, how strong, and every vibration it could be.
|
|
21
|
+
*
|
|
22
|
+
* The candidates are written as one line rather than a list, so a strong band
|
|
23
|
+
* with four of them stays one row of the table and the wavenumbers keep reading
|
|
24
|
+
* down the column. The `title` carries them again with each one's note, which is
|
|
25
|
+
* where the reason to prefer one lives.
|
|
26
|
+
* @param props - Component props.
|
|
27
|
+
* @returns The row.
|
|
28
|
+
*/
|
|
29
|
+
export declare function BandRow(props: BandRowProps): import("react").JSX.Element;
|
|
30
|
+
//# sourceMappingURL=BandRow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BandRow.d.ts","sourceRoot":"","sources":["../../../src/ir/ui/BandRow.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAGhD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAEpD,MAAM,WAAW,YAAY;IAC3B,2CAA2C;IAC3C,KAAK,EAAE,YAAY,CAAC;IACpB,sCAAsC;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,+DAA+D;IAC/D,WAAW,EAAE,OAAO,CAAC;IACrB,iEAAiE;IACjE,GAAG,EAAE,OAAO,CAAC;IACb;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CAC7C;AAED;;;;;;;;;GASG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,+BAoB1C"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Icon } from '@blueprintjs/core';
|
|
3
|
+
import { panelCellStyle, panelNumberCellStyle, } from "../../panel/core/panelStyles.js";
|
|
4
|
+
import { bandValue } from "../core/irBand.js";
|
|
5
|
+
import { formatIrValue, formatWavenumber } from "../core/irFormat.js";
|
|
6
|
+
/**
|
|
7
|
+
* One band: where it is, how strong, and every vibration it could be.
|
|
8
|
+
*
|
|
9
|
+
* The candidates are written as one line rather than a list, so a strong band
|
|
10
|
+
* with four of them stays one row of the table and the wavenumbers keep reading
|
|
11
|
+
* down the column. The `title` carries them again with each one's note, which is
|
|
12
|
+
* where the reason to prefer one lives.
|
|
13
|
+
* @param props - Component props.
|
|
14
|
+
* @returns The row.
|
|
15
|
+
*/
|
|
16
|
+
export function BandRow(props) {
|
|
17
|
+
const { entry, mode, assignments, lit, onHighlight } = props;
|
|
18
|
+
const { band } = entry;
|
|
19
|
+
return (_jsxs("tr", { style: lit ? litRowStyle : undefined, onPointerEnter: () => onHighlight?.(band), onPointerLeave: () => onHighlight?.(null), children: [_jsx("td", { style: panelNumberCellStyle, children: formatWavenumber(band.wavenumber) }), _jsx("td", { style: panelCellStyle, title: STRENGTH_TITLES[band.strength], children: band.strength }), _jsx("td", { style: panelNumberCellStyle, children: formatIrValue(bandValue(band, mode) ?? Number.NaN, mode) }), assignments ? _jsx(CandidatesCell, { entry: entry }) : null] }));
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* What a band could be: the narrowest candidate, and how many more there are.
|
|
23
|
+
* @param props - Component props.
|
|
24
|
+
* @returns The cell.
|
|
25
|
+
*/
|
|
26
|
+
function CandidatesCell(props) {
|
|
27
|
+
const { candidates } = props.entry;
|
|
28
|
+
const detail = candidates
|
|
29
|
+
.map((candidate) => candidate.note === undefined
|
|
30
|
+
? `${candidate.group} ${candidate.vibration}`
|
|
31
|
+
: `${candidate.group} ${candidate.vibration} — ${candidate.note}`)
|
|
32
|
+
.join('\n');
|
|
33
|
+
return (_jsx("td", { style: panelCellStyle, title: detail, children: candidates.length === 0 ? (_jsx("span", { style: { opacity: 0.5 }, children: "\u2014" })) : (_jsxs("span", { style: { whiteSpace: 'normal' }, children: [candidates[0]?.group, " ", candidates[0]?.vibration, candidates.length > 1 ? (_jsxs("span", { style: { opacity: 0.6 }, children: [' ', _jsx(Icon, { icon: "more", size: 10 }), " ", candidates.length - 1, " more"] })) : null] })) }));
|
|
34
|
+
}
|
|
35
|
+
/** What each strength letter means, for the column that shows only the letter. */
|
|
36
|
+
const STRENGTH_TITLES = {
|
|
37
|
+
w: 'weak, relative to this spectrum',
|
|
38
|
+
m: 'medium, relative to this spectrum',
|
|
39
|
+
S: 'strong, relative to this spectrum',
|
|
40
|
+
};
|
|
41
|
+
const litRowStyle = { background: '#fff3e0' };
|
|
42
|
+
//# sourceMappingURL=BandRow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BandRow.js","sourceRoot":"","sources":["../../../src/ir/ui/BandRow.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAO,EACL,cAAc,EACd,oBAAoB,GACrB,MAAM,iCAAiC,CAAC;AAGzC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAmBtE;;;;;;;;;G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S,CAAC,IAAI,EAAE,CACpE;SACA,IAAI,CAAC,IAAI,CAAC,CAAC;IAEd,OAAO,CACL,aAAI,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,YACrC,UAAU,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CACzB,eAAM,KAAK,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,uBAAU,CACxC,CAAC,CAAC,CAAC,CACF,gBAAM,KAAK,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,aAClC,UAAU,CAAC,CAAC,CAAC,EAAE,KAAK,OAAG,UAAU,CAAC,CAAC,CAAC,EAAE,SAAS,EAC/C,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CACvB,gBAAM,KAAK,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,aAC1B,GAAG,EACJ,KAAC,IAAI,IAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAE,EAAE,GAAI,OAAE,UAAU,CAAC,MAAM,GAAG,CAAC,aAChD,CACR,CAAC,CAAC,CAAC,IAAI,IACH,CACR,GACE,CACN,CAAC;AACJ,CAAC;AAED,kFAAkF;AAClF,MAAM,eAAe,GAAG;IACtB,CAAC,EAAE,iCAAiC;IACpC,CAAC,EAAE,mCAAmC;IACtC,CAAC,EAAE,mCAAmC;CAC9B,CAAC;AAEX,MAAM,WAAW,GAAG,EAAE,UAAU,EAAE,SAAS,EAAW,CAAC"}
|
|
@@ -24,6 +24,10 @@ export interface BandsPanelProps {
|
|
|
24
24
|
* Hovering a row marks the band on the chart and hovering the chart lights the
|
|
25
25
|
* row, which is the whole reason the highlight is threaded through the shell
|
|
26
26
|
* rather than held here: the two views are of one thing.
|
|
27
|
+
*
|
|
28
|
+
* For a technique the correlation table does not cover — Raman — the column of
|
|
29
|
+
* candidates and the button naming them are left out, and the table is the
|
|
30
|
+
* bands themselves.
|
|
27
31
|
* @param props - Component props.
|
|
28
32
|
* @returns The panel.
|
|
29
33
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BandsPanel.d.ts","sourceRoot":"","sources":["../../../src/ir/ui/BandsPanel.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BandsPanel.d.ts","sourceRoot":"","sources":["../../../src/ir/ui/BandsPanel.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAShD,MAAM,WAAW,eAAe;IAC9B;;;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;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,+BAqHhD"}
|
package/lib/ir/ui/BandsPanel.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Icon } from '@blueprintjs/core';
|
|
3
2
|
import { useMemo } from 'react';
|
|
4
3
|
import { Button, Toolbar } from 'react-science/ui';
|
|
5
|
-
import { panelBodyStyle,
|
|
4
|
+
import { panelBodyStyle, panelEmptyStyle, panelHeaderCellStyle, panelStyle, panelTableStyle, panelToolbarStyle, } from "../../panel/core/panelStyles.js";
|
|
6
5
|
import { sameIrBand } from "../core/irBand.js";
|
|
7
|
-
import {
|
|
6
|
+
import { shortModeLabel } from "../core/irFormat.js";
|
|
7
|
+
import { IR_TECHNIQUE_RULES } from "../core/irTechnique.js";
|
|
8
|
+
import { BandRow } from "./BandRow.js";
|
|
9
|
+
import { bandsToTsv } from "./bandsTsv.js";
|
|
8
10
|
import { useIrActions, useIrEditorState } from "./irStateContext.js";
|
|
9
11
|
/**
|
|
10
12
|
* Every band of the selected spectrum, and everything each one might be.
|
|
@@ -19,6 +21,10 @@ import { useIrActions, useIrEditorState } from "./irStateContext.js";
|
|
|
19
21
|
* Hovering a row marks the band on the chart and hovering the chart lights the
|
|
20
22
|
* row, which is the whole reason the highlight is threaded through the shell
|
|
21
23
|
* rather than held here: the two views are of one thing.
|
|
24
|
+
*
|
|
25
|
+
* For a technique the correlation table does not cover — Raman — the column of
|
|
26
|
+
* candidates and the button naming them are left out, and the table is the
|
|
27
|
+
* bands themselves.
|
|
22
28
|
* @param props - Component props.
|
|
23
29
|
* @returns The panel.
|
|
24
30
|
*/
|
|
@@ -26,65 +32,14 @@ export function BandsPanel(props) {
|
|
|
26
32
|
const { highlight = null, onHighlight } = props;
|
|
27
33
|
const { state, selectedSpectrum, assigned } = useIrEditorState();
|
|
28
34
|
const actions = useIrActions();
|
|
29
|
-
const { mode, pickBands, showAssignments, picking } = state.settings;
|
|
35
|
+
const { mode, pickBands, showAssignments, picking, technique } = state.settings;
|
|
36
|
+
const { assignments } = IR_TECHNIQUE_RULES[technique];
|
|
30
37
|
const rows = useMemo(() => assigned, [assigned]);
|
|
31
|
-
const tsv = useMemo(() => bandsToTsv(rows, mode), [rows, mode]);
|
|
32
|
-
return (_jsxs("div", { style: panelStyle, children: [_jsxs("div", { style: panelToolbarStyle, children: [_jsxs(Toolbar, { "aria-label": "Band actions", children: [_jsx(Toolbar.Item, { icon: "locate", active: pickBands, tooltip: pickBands ? 'Stop picking bands' : 'Pick the bands', "aria-label": "Pick the bands", onClick: () => actions.setSettings({ pickBands: !pickBands }) }), _jsx(Toolbar.Item, { icon: "label", active: showAssignments, tooltip: "Name the assignments on the chart", "aria-label": "Name the assignments on the chart", disabled: !pickBands, onClick: () => actions.setSettings({ showAssignments: !showAssignments }) })] }), _jsxs("label", { style: thresholdStyle, children: [_jsx("span", { style: { opacity: 0.7 }, children: "threshold" }), _jsx("input", { type: "range", min: 0.005, max: 0.3, step: 0.005, value: picking.minRelativeHeight ?? 0.02, disabled: !pickBands, "aria-label": "How tall a band must be to be picked", onChange: (event) => actions.setSettings({
|
|
38
|
+
const tsv = useMemo(() => bandsToTsv(rows, mode, assignments), [rows, mode, assignments]);
|
|
39
|
+
return (_jsxs("div", { style: panelStyle, children: [_jsxs("div", { style: panelToolbarStyle, children: [_jsxs(Toolbar, { "aria-label": "Band actions", children: [_jsx(Toolbar.Item, { icon: "locate", active: pickBands, tooltip: pickBands ? 'Stop picking bands' : 'Pick the bands', "aria-label": "Pick the bands", onClick: () => actions.setSettings({ pickBands: !pickBands }) }), assignments ? (_jsx(Toolbar.Item, { icon: "label", active: showAssignments, tooltip: "Name the assignments on the chart", "aria-label": "Name the assignments on the chart", disabled: !pickBands, onClick: () => actions.setSettings({ showAssignments: !showAssignments }) })) : null] }), _jsxs("label", { style: thresholdStyle, children: [_jsx("span", { style: { opacity: 0.7 }, children: "threshold" }), _jsx("input", { type: "range", min: 0.005, max: 0.3, step: 0.005, value: picking.minRelativeHeight ?? 0.02, disabled: !pickBands, "aria-label": "How tall a band must be to be picked", onChange: (event) => actions.setSettings({
|
|
33
40
|
picking: { minRelativeHeight: event.target.valueAsNumber },
|
|
34
|
-
}) })] }), _jsx("span", { style: { flex: 1 } }), _jsx(Button, { variant: "minimal", icon: "clipboard", disabled: rows.length === 0, tooltipProps: { content: 'Copy the table' }, "aria-label": "Copy the table", onClick: () => void navigator.clipboard?.writeText(tsv) })] }), _jsx("div", { style: panelBodyStyle, children: selectedSpectrum === null ? (_jsx("p", { style: panelEmptyStyle, children: "No spectrum is selected." })) : !pickBands ? (_jsx("p", { style: panelEmptyStyle, children: "The bands are not being picked. Press the locate button above to find them." })) : rows.length === 0 ? (_jsx("p", { style: panelEmptyStyle, children: "No band was found above the threshold. Lower it to pick the weaker ones." })) : (_jsxs("table", { style: panelTableStyle, children: [_jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { style: panelHeaderCellStyle, children: "cm\u207B\u00B9" }), _jsx("th", { style: panelHeaderCellStyle }), _jsx("th", { style: { ...panelHeaderCellStyle, textAlign: 'right' }, children: mode
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* One band: where it is, how strong, and every vibration it could be.
|
|
38
|
-
*
|
|
39
|
-
* The candidates are written as one line rather than a list, so a strong band
|
|
40
|
-
* with four of them stays one row of the table and the wavenumbers keep reading
|
|
41
|
-
* down the column. The `title` carries them again with each one's note, which is
|
|
42
|
-
* where the reason to prefer one lives.
|
|
43
|
-
* @param props - Component props.
|
|
44
|
-
* @returns The row.
|
|
45
|
-
*/
|
|
46
|
-
function BandRow(props) {
|
|
47
|
-
const { entry, mode, lit, onHighlight } = props;
|
|
48
|
-
const { band, candidates } = entry;
|
|
49
|
-
const value = mode === 'absorbance' ? band.absorbance : band.transmittance;
|
|
50
|
-
const detail = candidates
|
|
51
|
-
.map((candidate) => candidate.note === undefined
|
|
52
|
-
? `${candidate.group} ${candidate.vibration}`
|
|
53
|
-
: `${candidate.group} ${candidate.vibration} — ${candidate.note}`)
|
|
54
|
-
.join('\n');
|
|
55
|
-
return (_jsxs("tr", { style: lit ? litRowStyle : undefined, onPointerEnter: () => onHighlight?.(band), onPointerLeave: () => onHighlight?.(null), children: [_jsx("td", { style: panelNumberCellStyle, children: formatWavenumber(band.wavenumber) }), _jsx("td", { style: panelCellStyle, title: STRENGTH_TITLES[band.strength], children: band.strength }), _jsx("td", { style: panelNumberCellStyle, children: formatIrValue(value, mode) }), _jsx("td", { style: panelCellStyle, title: detail, children: candidates.length === 0 ? (_jsx("span", { style: { opacity: 0.5 }, children: "\u2014" })) : (_jsxs("span", { style: { whiteSpace: 'normal' }, children: [candidates[0]?.group, " ", candidates[0]?.vibration, candidates.length > 1 ? (_jsxs("span", { style: { opacity: 0.6 }, children: [' ', _jsx(Icon, { icon: "more", size: 10 }), " ", candidates.length - 1, " more"] })) : null] })) })] }));
|
|
56
|
-
}
|
|
57
|
-
/** What each strength letter means, for the column that shows only the letter. */
|
|
58
|
-
const STRENGTH_TITLES = {
|
|
59
|
-
w: 'weak, relative to this spectrum',
|
|
60
|
-
m: 'medium, relative to this spectrum',
|
|
61
|
-
S: 'strong, relative to this spectrum',
|
|
62
|
-
};
|
|
63
|
-
/**
|
|
64
|
-
* The table as text, for pasting into a notebook.
|
|
65
|
-
*
|
|
66
|
-
* Tab separated with every candidate on the row, because the reason to copy a
|
|
67
|
-
* band table is to put it beside a structure and argue about it — and the
|
|
68
|
-
* argument is over the candidates rather than over the wavenumbers.
|
|
69
|
-
* @param rows - The bands, as they are shown.
|
|
70
|
-
* @param mode - Which value axis is being read.
|
|
71
|
-
* @returns The table, one line per band, with a heading.
|
|
72
|
-
*/
|
|
73
|
-
function bandsToTsv(rows, mode) {
|
|
74
|
-
const heading = ['wavenumber', 'strength', mode, 'could be'].join('\t');
|
|
75
|
-
const lines = rows.map((entry) => [
|
|
76
|
-
formatWavenumber(entry.band.wavenumber),
|
|
77
|
-
entry.band.strength,
|
|
78
|
-
formatIrValue(mode === 'absorbance'
|
|
79
|
-
? entry.band.absorbance
|
|
80
|
-
: entry.band.transmittance, mode),
|
|
81
|
-
entry.candidates
|
|
82
|
-
.map((candidate) => `${candidate.group} ${candidate.vibration}`)
|
|
83
|
-
.join('; '),
|
|
84
|
-
].join('\t'));
|
|
85
|
-
return [heading, ...lines].join('\n');
|
|
41
|
+
}) })] }), _jsx("span", { style: { flex: 1 } }), _jsx(Button, { variant: "minimal", icon: "clipboard", disabled: rows.length === 0, tooltipProps: { content: 'Copy the table' }, "aria-label": "Copy the table", onClick: () => void navigator.clipboard?.writeText(tsv) })] }), _jsx("div", { style: panelBodyStyle, children: selectedSpectrum === null ? (_jsx("p", { style: panelEmptyStyle, children: "No spectrum is selected." })) : !pickBands ? (_jsx("p", { style: panelEmptyStyle, children: "The bands are not being picked. Press the locate button above to find them." })) : rows.length === 0 ? (_jsx("p", { style: panelEmptyStyle, children: "No band was found above the threshold. Lower it to pick the weaker ones." })) : (_jsxs("table", { style: panelTableStyle, children: [_jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { style: panelHeaderCellStyle, children: "cm\u207B\u00B9" }), _jsx("th", { style: panelHeaderCellStyle }), _jsx("th", { style: { ...panelHeaderCellStyle, textAlign: 'right' }, children: shortModeLabel(mode) }), assignments ? (_jsx("th", { style: panelHeaderCellStyle, children: "could be" })) : null] }) }), _jsx("tbody", { children: rows.map((entry) => (_jsx(BandRow, { entry: entry, mode: mode, assignments: assignments, lit: sameIrBand(entry.band, highlight), onHighlight: onHighlight }, `${entry.band.spectrumId} ${entry.band.wavenumber}`))) })] })) })] }));
|
|
86
42
|
}
|
|
87
|
-
const litRowStyle = { background: '#fff3e0' };
|
|
88
43
|
const thresholdStyle = {
|
|
89
44
|
display: 'inline-flex',
|
|
90
45
|
alignItems: 'center',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BandsPanel.js","sourceRoot":"","sources":["../../../src/ir/ui/BandsPanel.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"BandsPanel.js","sourceRoot":"","sources":["../../../src/ir/ui/BandsPanel.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EACL,cAAc,EACd,eAAe,EACf,oBAAoB,EACpB,UAAU,EACV,eAAe,EACf,iBAAiB,GAClB,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAe,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAerE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MA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CAAC,CACtB,YAAG,KAAK,EAAE,eAAe,yFAGrB,CACL,CAAC,CAAC,CAAC,CACF,iBAAO,KAAK,EAAE,eAAe,aAC3B,0BACE,yBACE,aAAI,KAAK,EAAE,oBAAoB,+BAAW,EAC1C,aAAI,KAAK,EAAE,oBAAoB,GAAI,EACnC,aAAI,KAAK,EAAE,EAAE,GAAG,oBAAoB,EAAE,SAAS,EAAE,OAAO,EAAE,YACvD,cAAc,CAAC,IAAI,CAAC,GAClB,EACJ,WAAW,CAAC,CAAC,CAAC,CACb,aAAI,KAAK,EAAE,oBAAoB,yBAAe,CAC/C,CAAC,CAAC,CAAC,IAAI,IACL,GACC,EACR,0BACG,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CACnB,KAAC,OAAO,IAEN,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,IAAI,EACV,WAAW,EAAE,WAAW,EACxB,GAAG,EAAE,UAAU,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,EACtC,WAAW,EAAE,WAAW,IALnB,GAAG,KAAK,CAAC,IAAI,CAAC,UAAU,IAAI,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,CAMxD,CACH,CAAC,GACI,IACF,CACT,GACG,IACF,CACP,CAAC;AACJ,CAAC;AAED,MAAM,cAAc,GAAG;IACrB,OAAO,EAAE,aAAa;IACtB,UAAU,EAAE,QAAQ;IACpB,GAAG,EAAE,CAAC;IACN,QAAQ,EAAE,EAAE;CACJ,CAAC"}
|
|
@@ -1,8 +1,15 @@
|
|
|
1
|
+
import type { IrTechnique } from '../core/irTechnique.ts';
|
|
1
2
|
export interface IrAboutDialogProps {
|
|
2
3
|
/** Whether the dialog is open. */
|
|
3
4
|
isOpen: boolean;
|
|
4
5
|
/** Close it. */
|
|
5
6
|
onClose: () => void;
|
|
7
|
+
/**
|
|
8
|
+
* What the spectra were measured with, which decides what the viewer says it
|
|
9
|
+
* does and whom it credits for it.
|
|
10
|
+
* @default 'infrared'
|
|
11
|
+
*/
|
|
12
|
+
technique?: IrTechnique;
|
|
6
13
|
}
|
|
7
14
|
/**
|
|
8
15
|
* What the viewer is, what it stands on, and who is owed for it.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IrAboutDialog.d.ts","sourceRoot":"","sources":["../../../src/ir/ui/IrAboutDialog.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IrAboutDialog.d.ts","sourceRoot":"","sources":["../../../src/ir/ui/IrAboutDialog.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAK1D,MAAM,WAAW,kBAAkB;IACjC,kCAAkC;IAClC,MAAM,EAAE,OAAO,CAAC;IAChB,gBAAgB;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB;;;;OAIG;IACH,SAAS,CAAC,EAAE,WAAW,CAAC;CACzB;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,+BAyFtD"}
|