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,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The panels a host adds to the viewer's own, and the one list both make.
|
|
3
|
+
*
|
|
4
|
+
* A host panel is a panel like any other once it is in the list: the activity
|
|
5
|
+
* bar and the stack read the same list, so it toggles, folds and closes
|
|
6
|
+
* exactly as the spectra or the bands do. The host brings the body and nothing
|
|
7
|
+
* else — the header, its close button and the place in the column are the
|
|
8
|
+
* viewer's, which is what keeps every header reading the same.
|
|
9
|
+
*/
|
|
10
|
+
import type { IconName } from '@blueprintjs/core';
|
|
11
|
+
import type { ReactNode } from 'react';
|
|
12
|
+
import { irSidePanels } from '../core/irSidePanels.ts';
|
|
13
|
+
/** A panel the host adds to the editor's own stack. */
|
|
14
|
+
export interface IrHostPanel {
|
|
15
|
+
/**
|
|
16
|
+
* Its identity in the activity bar and in `defaultPanelIds`; never a
|
|
17
|
+
* built-in id. One that is, or that an earlier host panel already took, is
|
|
18
|
+
* left out: one icon cannot open two panels.
|
|
19
|
+
*/
|
|
20
|
+
id: string;
|
|
21
|
+
/** What its header and its activity-bar item say. */
|
|
22
|
+
title: string;
|
|
23
|
+
/** Its glyph in the activity bar (a Blueprint IconName). */
|
|
24
|
+
icon: IconName;
|
|
25
|
+
/**
|
|
26
|
+
* Its body. It brings its own toolbar as first row: the header carries the
|
|
27
|
+
* close button only.
|
|
28
|
+
*
|
|
29
|
+
* It is laid out in a column filling the panel's share of the height, so a
|
|
30
|
+
* toolbar row in `panelToolbarStyle` followed by a body in `panelBodyStyle`,
|
|
31
|
+
* both from `react-cheminfo/core`, keeps the toolbar in place while a tall
|
|
32
|
+
* body scrolls under it. It is rendered inside the viewer, so a component in
|
|
33
|
+
* it reaches the viewer it stands in through `useIrEditorState` and
|
|
34
|
+
* `useIrActions` — to overlay a predicted spectrum, say.
|
|
35
|
+
*/
|
|
36
|
+
content: ReactNode;
|
|
37
|
+
}
|
|
38
|
+
/** One panel of the side: one of the viewer's own, or one a host added. */
|
|
39
|
+
export type IrStackPanel = (typeof irSidePanels)[number] | IrHostPanel;
|
|
40
|
+
/**
|
|
41
|
+
* Every panel the side offers, in the order the activity bar stacks them: the
|
|
42
|
+
* host's first, in the order given, then the viewer's own.
|
|
43
|
+
* @param hostPanels - What the host adds.
|
|
44
|
+
* @returns The panels; the viewer's own list itself when the host adds none.
|
|
45
|
+
*/
|
|
46
|
+
export declare function irStackPanels(hostPanels: readonly IrHostPanel[]): readonly IrStackPanel[];
|
|
47
|
+
/**
|
|
48
|
+
* Whether a panel of the side is one a host added, whose body it brings.
|
|
49
|
+
* @param panel - The panel.
|
|
50
|
+
* @returns True for a host's panel.
|
|
51
|
+
*/
|
|
52
|
+
export declare function isIrHostPanel(panel: IrStackPanel): panel is IrHostPanel;
|
|
53
|
+
//# sourceMappingURL=irHostPanels.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"irHostPanels.d.ts","sourceRoot":"","sources":["../../../src/ir/ui/irHostPanels.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,uDAAuD;AACvD,MAAM,WAAW,WAAW;IAC1B;;;;OAIG;IACH,EAAE,EAAE,MAAM,CAAC;IACX,qDAAqD;IACrD,KAAK,EAAE,MAAM,CAAC;IACd,4DAA4D;IAC5D,IAAI,EAAE,QAAQ,CAAC;IACf;;;;;;;;;;OAUG;IACH,OAAO,EAAE,SAAS,CAAC;CACpB;AAED,2EAA2E;AAC3E,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,GAAG,WAAW,CAAC;AAEvE;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,UAAU,EAAE,SAAS,WAAW,EAAE,GACjC,SAAS,YAAY,EAAE,CAWzB;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,YAAY,GAAG,KAAK,IAAI,WAAW,CAEvE"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The panels a host adds to the viewer's own, and the one list both make.
|
|
3
|
+
*
|
|
4
|
+
* A host panel is a panel like any other once it is in the list: the activity
|
|
5
|
+
* bar and the stack read the same list, so it toggles, folds and closes
|
|
6
|
+
* exactly as the spectra or the bands do. The host brings the body and nothing
|
|
7
|
+
* else — the header, its close button and the place in the column are the
|
|
8
|
+
* viewer's, which is what keeps every header reading the same.
|
|
9
|
+
*/
|
|
10
|
+
import { irSidePanels } from "../core/irSidePanels.js";
|
|
11
|
+
/**
|
|
12
|
+
* Every panel the side offers, in the order the activity bar stacks them: the
|
|
13
|
+
* host's first, in the order given, then the viewer's own.
|
|
14
|
+
* @param hostPanels - What the host adds.
|
|
15
|
+
* @returns The panels; the viewer's own list itself when the host adds none.
|
|
16
|
+
*/
|
|
17
|
+
export function irStackPanels(hostPanels) {
|
|
18
|
+
if (hostPanels.length === 0)
|
|
19
|
+
return irSidePanels;
|
|
20
|
+
const taken = new Set(BUILT_IN_IDS);
|
|
21
|
+
const panels = [];
|
|
22
|
+
for (const panel of hostPanels) {
|
|
23
|
+
if (taken.has(panel.id))
|
|
24
|
+
continue;
|
|
25
|
+
taken.add(panel.id);
|
|
26
|
+
panels.push(panel);
|
|
27
|
+
}
|
|
28
|
+
panels.push(...irSidePanels);
|
|
29
|
+
return panels;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Whether a panel of the side is one a host added, whose body it brings.
|
|
33
|
+
* @param panel - The panel.
|
|
34
|
+
* @returns True for a host's panel.
|
|
35
|
+
*/
|
|
36
|
+
export function isIrHostPanel(panel) {
|
|
37
|
+
return 'content' in panel;
|
|
38
|
+
}
|
|
39
|
+
/** The ids no host panel may take. */
|
|
40
|
+
const BUILT_IN_IDS = irSidePanels.map((panel) => panel.id);
|
|
41
|
+
//# sourceMappingURL=irHostPanels.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"irHostPanels.js","sourceRoot":"","sources":["../../../src/ir/ui/irHostPanels.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AA+BvD;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAC3B,UAAkC;IAElC,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,YAAY,CAAC;IACjD,MAAM,KAAK,GAAG,IAAI,GAAG,CAAS,YAAY,CAAC,CAAC;IAC5C,MAAM,MAAM,GAAmB,EAAE,CAAC;IAClC,KAAK,MAAM,KAAK,IAAI,UAAU,EAAE,CAAC;QAC/B,IAAI,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;YAAE,SAAS;QAClC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACpB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC;IACD,MAAM,CAAC,IAAI,CAAC,GAAG,YAAY,CAAC,CAAC;IAC7B,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,KAAmB;IAC/C,OAAO,SAAS,IAAI,KAAK,CAAC;AAC5B,CAAC;AAED,sCAAsC;AACtC,MAAM,YAAY,GAAsB,YAAY,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC"}
|
|
@@ -13,9 +13,8 @@
|
|
|
13
13
|
* to on every change of a threshold.
|
|
14
14
|
*/
|
|
15
15
|
import type { AssignedBand } from '../core/assignBands.ts';
|
|
16
|
-
import type { CreateIrStateOptions } from '../core/irReducer.ts';
|
|
17
16
|
import type { IrSpectrum } from '../core/irSpectrum.ts';
|
|
18
|
-
import type { IrState } from '../core/irState.ts';
|
|
17
|
+
import type { CreateIrStateOptions, IrState } from '../core/irState.ts';
|
|
19
18
|
import type { IrEditorActions } from './irActions.ts';
|
|
20
19
|
/** What a viewer opens on, and who to tell when the spectra change. */
|
|
21
20
|
export interface UseIrEditorOptions extends CreateIrStateOptions {
|
|
@@ -36,7 +35,8 @@ export interface IrEditorApi {
|
|
|
36
35
|
selectedSpectrum: IrSpectrum | null;
|
|
37
36
|
/**
|
|
38
37
|
* The bands of the selected spectrum, with everything each might be. Empty
|
|
39
|
-
* while nothing is selected or while picking is switched off
|
|
38
|
+
* while nothing is selected or while picking is switched off, and every band
|
|
39
|
+
* without a candidate for a technique the correlation table does not cover.
|
|
40
40
|
*/
|
|
41
41
|
assigned: AssignedBand[];
|
|
42
42
|
/** Everything to do. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIrEditor.d.ts","sourceRoot":"","sources":["../../../src/ir/ui/useIrEditor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"useIrEditor.d.ts","sourceRoot":"","sources":["../../../src/ir/ui/useIrEditor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAK3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAE,oBAAoB,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAKxE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGtD,uEAAuE;AACvE,MAAM,WAAW,kBAAmB,SAAQ,oBAAoB;IAC9D;;;;OAIG;IACH,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,UAAU,EAAE,KAAK,IAAI,CAAC;CAC5C;AAED,kDAAkD;AAClD,MAAM,WAAW,WAAW;IAC1B,yDAAyD;IACzD,KAAK,EAAE,OAAO,CAAC;IACf,kEAAkE;IAClE,cAAc,EAAE,UAAU,EAAE,CAAC;IAC7B,qEAAqE;IACrE,gBAAgB,EAAE,UAAU,GAAG,IAAI,CAAC;IACpC;;;;OAIG;IACH,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,wBAAwB;IACxB,OAAO,EAAE,eAAe,CAAC;CAC1B;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,OAAO,GAAE,kBAAuB,GAAG,WAAW,CA+DzE"}
|
package/lib/ir/ui/useIrEditor.js
CHANGED
|
@@ -14,7 +14,10 @@
|
|
|
14
14
|
*/
|
|
15
15
|
import { useEffect, useMemo, useReducer, useRef } from 'react';
|
|
16
16
|
import { assignBands } from "../core/assignBands.js";
|
|
17
|
-
import {
|
|
17
|
+
import { BAND_ASSIGNMENTS } from "../core/bandAssignments.js";
|
|
18
|
+
import { irReducer } from "../core/irReducer.js";
|
|
19
|
+
import { createIrState } from "../core/irState.js";
|
|
20
|
+
import { IR_TECHNIQUE_RULES } from "../core/irTechnique.js";
|
|
18
21
|
import { pickBands } from "../core/pickBands.js";
|
|
19
22
|
import { createIrActions } from "./irActions.js";
|
|
20
23
|
/**
|
|
@@ -29,7 +32,7 @@ export function useIrEditor(options = {}) {
|
|
|
29
32
|
const { spectra } = state.data;
|
|
30
33
|
const { selectedId } = state.view;
|
|
31
34
|
const { pickBands: picking, picking: pickingOptions } = state.settings;
|
|
32
|
-
const { assignmentTolerance } = state.settings;
|
|
35
|
+
const { assignmentTolerance, technique } = state.settings;
|
|
33
36
|
const visibleSpectra = useMemo(() => {
|
|
34
37
|
const visible = [];
|
|
35
38
|
for (const spectrum of spectra) {
|
|
@@ -52,8 +55,12 @@ export function useIrEditor(options = {}) {
|
|
|
52
55
|
: pickBands(selectedSpectrum, pickingOptions), [selectedSpectrum, picking, pickingOptions]);
|
|
53
56
|
// Assigning is a walk of thirty ranges per band, which is nothing beside the
|
|
54
57
|
// picking — so it is a memo of its own, and moving the tolerance does not
|
|
55
|
-
// re-pick.
|
|
56
|
-
const
|
|
58
|
+
// re-pick. A technique the table does not cover is matched against no table.
|
|
59
|
+
const { assignments } = IR_TECHNIQUE_RULES[technique];
|
|
60
|
+
const assigned = useMemo(() => assignBands(bands, {
|
|
61
|
+
tolerance: assignmentTolerance,
|
|
62
|
+
assignments: assignments ? BAND_ASSIGNMENTS : NO_ASSIGNMENTS,
|
|
63
|
+
}), [bands, assignmentTolerance, assignments]);
|
|
57
64
|
// What was reported last, so a host passing a fresh callback on every render
|
|
58
65
|
// is not told about spectra that did not change. The identities are compared
|
|
59
66
|
// rather than the array: every edit replaces it, including the ones that only
|
|
@@ -67,6 +74,8 @@ export function useIrEditor(options = {}) {
|
|
|
67
74
|
}, [spectra, onChange]);
|
|
68
75
|
return useMemo(() => ({ state, visibleSpectra, selectedSpectrum, assigned, actions }), [state, visibleSpectra, selectedSpectrum, assigned, actions]);
|
|
69
76
|
}
|
|
77
|
+
/** The table a technique the correlation table does not cover is matched against. */
|
|
78
|
+
const NO_ASSIGNMENTS = [];
|
|
70
79
|
/**
|
|
71
80
|
* Whether two lists hold the same spectra, by identity and in order.
|
|
72
81
|
* @param current - What was reported last.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIrEditor.js","sourceRoot":"","sources":["../../../src/ir/ui/useIrEditor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAG/D,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"useIrEditor.js","sourceRoot":"","sources":["../../../src/ir/ui/useIrEditor.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The handle a host drives the viewer through, filled in from its state.
|
|
3
|
+
*
|
|
4
|
+
* A hook of its own beside the shell, because every gesture on the handle reads
|
|
5
|
+
* the state the shell already reads — and the shell is long enough without it.
|
|
6
|
+
*/
|
|
7
|
+
import type { Ref } from 'react';
|
|
8
|
+
import type { IrEditorHandle } from '../core/irEditorApi.ts';
|
|
9
|
+
/**
|
|
10
|
+
* Fill in a host's handle on the viewer this is called inside.
|
|
11
|
+
* @param handle - The handle to fill in, if the host asked for one.
|
|
12
|
+
*/
|
|
13
|
+
export declare function useIrHandle(handle: Ref<IrEditorHandle> | undefined): void;
|
|
14
|
+
//# sourceMappingURL=useIrHandle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIrHandle.d.ts","sourceRoot":"","sources":["../../../src/ir/ui/useIrHandle.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAIjC,OAAO,KAAK,EAAE,cAAc,EAAqB,MAAM,wBAAwB,CAAC;AAKhF;;;GAGG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,GAAG,CAAC,cAAc,CAAC,GAAG,SAAS,GAAG,IAAI,CA2BzE"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The handle a host drives the viewer through, filled in from its state.
|
|
3
|
+
*
|
|
4
|
+
* A hook of its own beside the shell, because every gesture on the handle reads
|
|
5
|
+
* the state the shell already reads — and the shell is long enough without it.
|
|
6
|
+
*/
|
|
7
|
+
import { useImperativeHandle } from 'react';
|
|
8
|
+
import { fullDomain } from "../core/irDomain.js";
|
|
9
|
+
import { useIrActions, useIrEditorState } from "./irStateContext.js";
|
|
10
|
+
/**
|
|
11
|
+
* Fill in a host's handle on the viewer this is called inside.
|
|
12
|
+
* @param handle - The handle to fill in, if the host asked for one.
|
|
13
|
+
*/
|
|
14
|
+
export function useIrHandle(handle) {
|
|
15
|
+
const { state, visibleSpectra } = useIrEditorState();
|
|
16
|
+
const actions = useIrActions();
|
|
17
|
+
const { domain } = state.view;
|
|
18
|
+
const { mode } = state.settings;
|
|
19
|
+
useImperativeHandle(handle, () => ({
|
|
20
|
+
getSpectra: () => state.data.spectra,
|
|
21
|
+
setSpectra: (spectra) => actions.setSpectra(spectra),
|
|
22
|
+
addSpectra: (spectra) => actions.addSpectra(spectra),
|
|
23
|
+
clear: () => actions.clear(),
|
|
24
|
+
setDomain: (next) => actions.setDomain(next),
|
|
25
|
+
resetDomain: () => actions.resetDomain(),
|
|
26
|
+
zoomToWavenumber: (wavenumber, options = {}) => {
|
|
27
|
+
const { width = DEFAULT_FRAME_WIDTH } = options;
|
|
28
|
+
const shown = domain ?? fullDomain(visibleSpectra, mode);
|
|
29
|
+
actions.setDomain({
|
|
30
|
+
x: [wavenumber - width / 2, wavenumber + width / 2],
|
|
31
|
+
y: shown.y,
|
|
32
|
+
});
|
|
33
|
+
},
|
|
34
|
+
selectSpectrum: (id) => actions.selectSpectrum(id),
|
|
35
|
+
}), [state.data.spectra, actions, domain, visibleSpectra, mode]);
|
|
36
|
+
}
|
|
37
|
+
/** How wide a window a host gets when it asks to frame a band without saying. */
|
|
38
|
+
const DEFAULT_FRAME_WIDTH = 200;
|
|
39
|
+
//# sourceMappingURL=useIrHandle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIrHandle.js","sourceRoot":"","sources":["../../../src/ir/ui/useIrHandle.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAIjD,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAErE;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,MAAuC;IACjE,MAAM,EAAE,KAAK,EAAE,cAAc,EAAE,GAAG,gBAAgB,EAAE,CAAC;IACrD,MAAM,OAAO,GAAG,YAAY,EAAE,CAAC;IAC/B,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC,IAAI,CAAC;IAC9B,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC,QAAQ,CAAC;IAEhC,mBAAmB,CACjB,MAAM,EACN,GAAmB,EAAE,CAAC,CAAC;QACrB,UAAU,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO;QACpC,UAAU,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC;QACpD,UAAU,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC;QACpD,KAAK,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE;QAC5B,SAAS,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC;QAC5C,WAAW,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,WAAW,EAAE;QACxC,gBAAgB,EAAE,CAAC,UAAU,EAAE,UAA6B,EAAE,EAAE,EAAE;YAChE,MAAM,EAAE,KAAK,GAAG,mBAAmB,EAAE,GAAG,OAAO,CAAC;YAChD,MAAM,KAAK,GAAa,MAAM,IAAI,UAAU,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC;YACnE,OAAO,CAAC,SAAS,CAAC;gBAChB,CAAC,EAAE,CAAC,UAAU,GAAG,KAAK,GAAG,CAAC,EAAE,UAAU,GAAG,KAAK,GAAG,CAAC,CAAC;gBACnD,CAAC,EAAE,KAAK,CAAC,CAAC;aACX,CAAC,CAAC;QACL,CAAC;QACD,cAAc,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE,CAAC;KACnD,CAAC,EACF,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,IAAI,CAAC,CAC5D,CAAC;AACJ,CAAC;AAED,iFAAiF;AACjF,MAAM,mBAAmB,GAAG,GAAG,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The side of the viewer: the panels it offers, whether any of them is open,
|
|
3
|
+
* and what dragging the splitter shut and back open does to them.
|
|
4
|
+
*
|
|
5
|
+
* A hook of its own beside the shell, because the shell lays the side out and
|
|
6
|
+
* this decides what is on it.
|
|
7
|
+
*/
|
|
8
|
+
import type { IrHostPanel, IrStackPanel } from './irHostPanels.ts';
|
|
9
|
+
/** The side, as the shell lays it out. */
|
|
10
|
+
export interface IrSide {
|
|
11
|
+
/** Every panel on offer, in the order their icons are stacked. */
|
|
12
|
+
panels: readonly IrStackPanel[];
|
|
13
|
+
/** Whether a panel on offer is open, which is whether the side is. */
|
|
14
|
+
isOpen: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Open or close the side, as the splitter is dragged shut and back open.
|
|
17
|
+
* @param open - Whether the side is now open.
|
|
18
|
+
*/
|
|
19
|
+
setOpen: (open: boolean) => void;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* The side of the viewer this is called inside.
|
|
23
|
+
* @param hostPanels - The panels the host adds to the viewer's own.
|
|
24
|
+
* @returns The panels on offer, whether the side is open, and how to open it.
|
|
25
|
+
*/
|
|
26
|
+
export declare function useIrSide(hostPanels: readonly IrHostPanel[]): IrSide;
|
|
27
|
+
//# sourceMappingURL=useIrSide.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIrSide.d.ts","sourceRoot":"","sources":["../../../src/ir/ui/useIrSide.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAInE,0CAA0C;AAC1C,MAAM,WAAW,MAAM;IACrB,kEAAkE;IAClE,MAAM,EAAE,SAAS,YAAY,EAAE,CAAC;IAChC,sEAAsE;IACtE,MAAM,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CAClC;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,UAAU,EAAE,SAAS,WAAW,EAAE,GAAG,MAAM,CAyBpE"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The side of the viewer: the panels it offers, whether any of them is open,
|
|
3
|
+
* and what dragging the splitter shut and back open does to them.
|
|
4
|
+
*
|
|
5
|
+
* A hook of its own beside the shell, because the shell lays the side out and
|
|
6
|
+
* this decides what is on it.
|
|
7
|
+
*/
|
|
8
|
+
import { useMemo } from 'react';
|
|
9
|
+
import { DEFAULT_SIDE_PANEL } from "../core/irState.js";
|
|
10
|
+
import { irStackPanels } from "./irHostPanels.js";
|
|
11
|
+
import { useIrActions, useIrEditorState } from "./irStateContext.js";
|
|
12
|
+
/**
|
|
13
|
+
* The side of the viewer this is called inside.
|
|
14
|
+
* @param hostPanels - The panels the host adds to the viewer's own.
|
|
15
|
+
* @returns The panels on offer, whether the side is open, and how to open it.
|
|
16
|
+
*/
|
|
17
|
+
export function useIrSide(hostPanels) {
|
|
18
|
+
const { state } = useIrEditorState();
|
|
19
|
+
const actions = useIrActions();
|
|
20
|
+
const { openPanelIds } = state.view;
|
|
21
|
+
const panels = useMemo(() => irStackPanels(hostPanels), [hostPanels]);
|
|
22
|
+
// Read off the panels on offer rather than off the ids: an id no panel
|
|
23
|
+
// answers to opens nothing, and a side open on it alone is an empty column.
|
|
24
|
+
const isOpen = panels.some((panel) => openPanelIds.includes(panel.id));
|
|
25
|
+
/**
|
|
26
|
+
* Open or close the side.
|
|
27
|
+
* @param open - Whether the side is now open.
|
|
28
|
+
*/
|
|
29
|
+
function setOpen(open) {
|
|
30
|
+
if (!open) {
|
|
31
|
+
for (const panelId of openPanelIds)
|
|
32
|
+
actions.togglePanel(panelId);
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
// Dragging the splitter back open must land on something, or it opens on an
|
|
36
|
+
// empty column and reads as broken.
|
|
37
|
+
if (!isOpen)
|
|
38
|
+
actions.togglePanel(DEFAULT_SIDE_PANEL);
|
|
39
|
+
}
|
|
40
|
+
return { panels, isOpen, setOpen };
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=useIrSide.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIrSide.js","sourceRoot":"","sources":["../../../src/ir/ui/useIrSide.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAGxD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAerE;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,UAAkC;IAC1D,MAAM,EAAE,KAAK,EAAE,GAAG,gBAAgB,EAAE,CAAC;IACrC,MAAM,OAAO,GAAG,YAAY,EAAE,CAAC;IAC/B,MAAM,EAAE,YAAY,EAAE,GAAG,KAAK,CAAC,IAAI,CAAC;IAEpC,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,aAAa,CAAC,UAAU,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;IACtE,uEAAuE;IACvE,4EAA4E;IAC5E,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;IAEvE;;;OAGG;IACH,SAAS,OAAO,CAAC,IAAa;QAC5B,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,KAAK,MAAM,OAAO,IAAI,YAAY;gBAAE,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;YACjE,OAAO;QACT,CAAC;QACD,4EAA4E;QAC5E,oCAAoC;QACpC,IAAI,CAAC,MAAM;YAAE,OAAO,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC;IACvD,CAAC;IAED,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;AACrC,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The words of the viewer that change with what was measured, in the language
|
|
3
|
+
* the page is written in.
|
|
4
|
+
*
|
|
5
|
+
* Infrared's are not in the chrome's catalog: they are read from the core
|
|
6
|
+
* records, so an infrared viewer reads the same in every language. Raman's are
|
|
7
|
+
* in the catalog, each key written out rather than built, so a key the catalog
|
|
8
|
+
* lacks fails the type check instead of rendering raw.
|
|
9
|
+
*/
|
|
10
|
+
import type { IrCommand, IrCommandId } from '../core/irCommands.ts';
|
|
11
|
+
import type { IrMode } from '../core/irSpectrum.ts';
|
|
12
|
+
import type { IrTechnique } from '../core/irTechnique.ts';
|
|
13
|
+
/** The words that change with what was measured. */
|
|
14
|
+
export interface IrText {
|
|
15
|
+
/** What the horizontal axis is called. */
|
|
16
|
+
xTitle: string;
|
|
17
|
+
/** What the value axis is called in a mode. */
|
|
18
|
+
yTitle: (mode: IrMode) => string;
|
|
19
|
+
/** What the chart is and what can be done to it, for whoever cannot see it. */
|
|
20
|
+
chart: (mode: IrMode) => string;
|
|
21
|
+
/** The accessible name of the tool rail. */
|
|
22
|
+
tools: string;
|
|
23
|
+
/** The accessible name of the header. */
|
|
24
|
+
viewer: string;
|
|
25
|
+
/** The accessible name of the header's help group. */
|
|
26
|
+
viewerHelp: string;
|
|
27
|
+
/** The accessible name of the mark. */
|
|
28
|
+
mark: string;
|
|
29
|
+
/** The title of the documentation dialog. */
|
|
30
|
+
documentation: string;
|
|
31
|
+
/** A command as the viewer words it, `undefined` for one it does not offer. */
|
|
32
|
+
command: (id: IrCommandId) => IrCommand | undefined;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* The words of a viewer of one technique.
|
|
36
|
+
* @param technique - What was measured.
|
|
37
|
+
* @returns The words, in the language of the page where the catalog has them.
|
|
38
|
+
*/
|
|
39
|
+
export declare function useIrText(technique: IrTechnique): IrText;
|
|
40
|
+
//# sourceMappingURL=useIrText.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIrText.d.ts","sourceRoot":"","sources":["../../../src/ir/ui/useIrText.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAI1D,oDAAoD;AACpD,MAAM,WAAW,MAAM;IACrB,0CAA0C;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,+CAA+C;IAC/C,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACjC,+EAA+E;IAC/E,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAChC,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,yCAAyC;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,sDAAsD;IACtD,UAAU,EAAE,MAAM,CAAC;IACnB,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,6CAA6C;IAC7C,aAAa,EAAE,MAAM,CAAC;IACtB,+EAA+E;IAC/E,OAAO,EAAE,CAAC,EAAE,EAAE,WAAW,KAAK,SAAS,GAAG,SAAS,CAAC;CACrD;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,SAAS,EAAE,WAAW,GAAG,MAAM,CAGxD"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The words of the viewer that change with what was measured, in the language
|
|
3
|
+
* the page is written in.
|
|
4
|
+
*
|
|
5
|
+
* Infrared's are not in the chrome's catalog: they are read from the core
|
|
6
|
+
* records, so an infrared viewer reads the same in every language. Raman's are
|
|
7
|
+
* in the catalog, each key written out rather than built, so a key the catalog
|
|
8
|
+
* lacks fails the type check instead of rendering raw.
|
|
9
|
+
*/
|
|
10
|
+
import { useChromeT } from "../../i18n/ui/useT.js";
|
|
11
|
+
import { boxZoomOnly, yAxisTitle } from "../core/irMode.js";
|
|
12
|
+
import { IR_TECHNIQUE_RULES } from "../core/irTechnique.js";
|
|
13
|
+
import { irCommandsFor } from "../core/irTechniqueCommands.js";
|
|
14
|
+
/**
|
|
15
|
+
* The words of a viewer of one technique.
|
|
16
|
+
* @param technique - What was measured.
|
|
17
|
+
* @returns The words, in the language of the page where the catalog has them.
|
|
18
|
+
*/
|
|
19
|
+
export function useIrText(technique) {
|
|
20
|
+
const t = useChromeT();
|
|
21
|
+
return technique === 'raman' ? ramanText(t) : infraredText(t);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The words of an infrared viewer, from the core records.
|
|
25
|
+
* @param t - The chrome's formatter, for a value axis the catalog names.
|
|
26
|
+
* @returns The words.
|
|
27
|
+
*/
|
|
28
|
+
function infraredText(t) {
|
|
29
|
+
const { name, xTitle } = IR_TECHNIQUE_RULES.infrared;
|
|
30
|
+
const opening = `${name.charAt(0).toUpperCase()}${name.slice(1)}`;
|
|
31
|
+
const commands = irCommandsFor('infrared');
|
|
32
|
+
return {
|
|
33
|
+
xTitle,
|
|
34
|
+
yTitle: (mode) => modeTitle(t, mode),
|
|
35
|
+
chart: (mode) => infraredChartLabel(opening, mode),
|
|
36
|
+
tools: `${opening} spectrum tools`,
|
|
37
|
+
viewer: `${opening} spectrum viewer`,
|
|
38
|
+
viewerHelp: `${opening} spectrum viewer help`,
|
|
39
|
+
mark: `${opening} viewer`,
|
|
40
|
+
documentation: `Using the ${name} viewer`,
|
|
41
|
+
command: (id) => commands[id],
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* The words of a Raman viewer, all of them from the catalog.
|
|
46
|
+
* @param t - The chrome's formatter.
|
|
47
|
+
* @returns The words.
|
|
48
|
+
*/
|
|
49
|
+
function ramanText(t) {
|
|
50
|
+
const commands = irCommandsFor('raman');
|
|
51
|
+
return {
|
|
52
|
+
xTitle: t('ir.raman.xTitle'),
|
|
53
|
+
yTitle: (mode) => modeTitle(t, mode),
|
|
54
|
+
chart: () => t('ir.raman.chart'),
|
|
55
|
+
tools: t('ir.raman.tools'),
|
|
56
|
+
viewer: t('ir.raman.viewer'),
|
|
57
|
+
viewerHelp: t('ir.raman.viewerHelp'),
|
|
58
|
+
mark: t('ir.raman.mark'),
|
|
59
|
+
documentation: t('ir.raman.documentation'),
|
|
60
|
+
command: (id) => translated(t, commands[id], RAMAN_COMMAND_KEYS[id]),
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* What the value axis is called, translated where the catalog has the axis.
|
|
65
|
+
* @param t - The chrome's formatter.
|
|
66
|
+
* @param mode - Which value axis.
|
|
67
|
+
* @returns The title.
|
|
68
|
+
*/
|
|
69
|
+
function modeTitle(t, mode) {
|
|
70
|
+
const key = MODE_KEYS[mode];
|
|
71
|
+
return key === undefined ? yAxisTitle(mode) : t(key);
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* The infrared chart's accessible name. The gestures differ by mode, so the
|
|
75
|
+
* sentence does too — a label promising the wheel to a reader who cannot watch
|
|
76
|
+
* it fail to do anything is worse than no label at all.
|
|
77
|
+
* @param opening - The technique's name, as a sentence opens on it.
|
|
78
|
+
* @param mode - Which value axis is being drawn.
|
|
79
|
+
* @returns The label.
|
|
80
|
+
*/
|
|
81
|
+
function infraredChartLabel(opening, mode) {
|
|
82
|
+
const axis = `${opening} spectrum read as ${yAxisTitle(mode)}, wavenumber running from high at the left to low at the right.`;
|
|
83
|
+
return boxZoomOnly(mode)
|
|
84
|
+
? `${axis} Drag a rectangle over it to zoom to that rectangle, and double click to fit everything again.`
|
|
85
|
+
: `${axis} Drag across it to zoom the wavenumber axis, drag past the baseline to take the value axis with it, turn the wheel to scale the value axis, and double click to fit everything again.`;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* A command with its words read from the catalog where it has them.
|
|
89
|
+
* @param t - The chrome's formatter.
|
|
90
|
+
* @param entry - The command as its table words it.
|
|
91
|
+
* @param keys - The catalog keys of its title and description, if any.
|
|
92
|
+
* @returns The command, translated.
|
|
93
|
+
*/
|
|
94
|
+
function translated(t, entry, keys) {
|
|
95
|
+
if (entry === undefined || keys === undefined)
|
|
96
|
+
return entry;
|
|
97
|
+
return {
|
|
98
|
+
...entry,
|
|
99
|
+
...(keys.title === undefined ? {} : { title: t(keys.title) }),
|
|
100
|
+
...(keys.description === undefined
|
|
101
|
+
? {}
|
|
102
|
+
: { description: t(keys.description) }),
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
/** The value axes the catalog has a name for. */
|
|
106
|
+
const MODE_KEYS = {
|
|
107
|
+
intensity: 'ir.mode.intensity',
|
|
108
|
+
};
|
|
109
|
+
/** The catalog keys of every command a Raman viewer words its own way. */
|
|
110
|
+
const RAMAN_COMMAND_KEYS = {
|
|
111
|
+
about: { title: 'ir.raman.about' },
|
|
112
|
+
documentation: { description: 'ir.raman.command.documentation' },
|
|
113
|
+
readTool: { description: 'ir.raman.command.readTool' },
|
|
114
|
+
boxTool: { description: 'ir.raman.command.boxTool' },
|
|
115
|
+
zoomIn: { description: 'ir.raman.command.zoomIn' },
|
|
116
|
+
togglePicking: { description: 'ir.raman.command.togglePicking' },
|
|
117
|
+
};
|
|
118
|
+
//# sourceMappingURL=useIrText.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIrText.js","sourceRoot":"","sources":["../../../src/ir/ui/useIrText.ts"],"names":[],"mappings":"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"}
|
package/lib/ir/ui/useIrZoom.d.ts
CHANGED
|
@@ -13,11 +13,19 @@
|
|
|
13
13
|
import type { RefObject } from 'react';
|
|
14
14
|
import type { ZoomDragMode } from '../../chart/core/chartDomain.ts';
|
|
15
15
|
import type { PlotRect } from '../../chart/core/chartGeometry.ts';
|
|
16
|
+
import type { ChartPoint } from '../../chart/core/svgPoint.ts';
|
|
16
17
|
import type { ChartZoom } from '../../chart/ui/useChartZoom.ts';
|
|
17
18
|
import type { IrDomain, IrMode, IrSpectrum } from '../core/irSpectrum.ts';
|
|
19
|
+
import type { IrTechnique } from '../core/irTechnique.ts';
|
|
18
20
|
export interface IrZoomOptions {
|
|
19
21
|
/** Everything the chart holds, which is what the window is fitted to. */
|
|
20
22
|
spectra: readonly IrSpectrum[];
|
|
23
|
+
/**
|
|
24
|
+
* What the spectra were measured with, which decides which way the
|
|
25
|
+
* wavenumber axis runs.
|
|
26
|
+
* @default 'infrared'
|
|
27
|
+
*/
|
|
28
|
+
technique?: IrTechnique;
|
|
21
29
|
/** Which value axis is being drawn. */
|
|
22
30
|
mode: IrMode;
|
|
23
31
|
/** The SVG the gestures are made on, as it was handed to its `ref`. */
|
|
@@ -37,6 +45,13 @@ export interface IrZoomOptions {
|
|
|
37
45
|
* @default 'xAxis'
|
|
38
46
|
*/
|
|
39
47
|
drag?: ZoomDragMode;
|
|
48
|
+
/**
|
|
49
|
+
* Told where a click on the plot landed — a press let go over it without
|
|
50
|
+
* travelling, never the end of a drag — as a wavenumber and a value in the
|
|
51
|
+
* mode drawn.
|
|
52
|
+
* @default undefined
|
|
53
|
+
*/
|
|
54
|
+
onClick?: (point: ChartPoint) => void;
|
|
40
55
|
}
|
|
41
56
|
/**
|
|
42
57
|
* Zoom an infrared chart by dragging it, and — reading absorbance — by the wheel.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIrZoom.d.ts","sourceRoot":"","sources":["../../../src/ir/ui/useIrZoom.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAIhE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"useIrZoom.d.ts","sourceRoot":"","sources":["../../../src/ir/ui/useIrZoom.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAIhE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC1E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAG1D,MAAM,WAAW,aAAa;IAC5B,yEAAyE;IACzE,OAAO,EAAE,SAAS,UAAU,EAAE,CAAC;IAC/B;;;;OAIG;IACH,SAAS,CAAC,EAAE,WAAW,CAAC;IACxB,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,uEAAuE;IACvE,MAAM,EAAE,SAAS,CAAC,aAAa,GAAG,IAAI,CAAC,CAAC;IACxC,yEAAyE;IACzE,IAAI,EAAE,QAAQ,CAAC;IACf;;;;OAIG;IACH,MAAM,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IACzB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;CACvC;AAED;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,aAAa,GAAG,SAAS,CA+B3D"}
|
package/lib/ir/ui/useIrZoom.js
CHANGED
|
@@ -14,6 +14,7 @@ import { useMemo } from 'react';
|
|
|
14
14
|
import { useChartZoom } from "../../chart/ui/useChartZoom.js";
|
|
15
15
|
import { fittedTo, fullDomain } from "../core/irDomain.js";
|
|
16
16
|
import { yAxisRules, zoomGestures } from "../core/irMode.js";
|
|
17
|
+
import { IR_TECHNIQUE_RULES } from "../core/irTechnique.js";
|
|
17
18
|
/**
|
|
18
19
|
* Zoom an infrared chart by dragging it, and — reading absorbance — by the wheel.
|
|
19
20
|
*
|
|
@@ -24,14 +25,14 @@ import { yAxisRules, zoomGestures } from "../core/irMode.js";
|
|
|
24
25
|
* @returns The window and the gestures that move it.
|
|
25
26
|
*/
|
|
26
27
|
export function useIrZoom(options) {
|
|
27
|
-
const { spectra, mode, svgRef, plot, domain = null, drag = 'xAxis', } = options;
|
|
28
|
+
const { spectra, technique = 'infrared', mode, svgRef, plot, domain = null, drag = 'xAxis', onClick, } = options;
|
|
28
29
|
const fitted = useMemo(() => fullDomain(spectra, mode), [spectra, mode]);
|
|
29
30
|
const fitKey = useMemo(() => fittedTo(spectra, mode), [spectra, mode]);
|
|
30
31
|
const yAxis = useMemo(() => yAxisRules(mode), [mode]);
|
|
31
32
|
const gestures = useMemo(() => zoomGestures(mode, drag), [mode, drag]);
|
|
32
33
|
// `reverseX` is not decoration: the hook measures every gesture by inverting a
|
|
33
|
-
// pixel through the scale it builds, so it has to build the same
|
|
34
|
-
//
|
|
34
|
+
// pixel through the scale it builds, so it has to build the same scale the
|
|
35
|
+
// chart draws with — reversed for infrared, forward for Raman.
|
|
35
36
|
return useChartZoom({
|
|
36
37
|
fitted,
|
|
37
38
|
fitKey,
|
|
@@ -40,7 +41,8 @@ export function useIrZoom(options) {
|
|
|
40
41
|
yAxis,
|
|
41
42
|
domain,
|
|
42
43
|
gestures,
|
|
43
|
-
reverseX:
|
|
44
|
+
reverseX: IR_TECHNIQUE_RULES[technique].reverseX,
|
|
45
|
+
onClick,
|
|
44
46
|
});
|
|
45
47
|
}
|
|
46
48
|
//# sourceMappingURL=useIrZoom.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIrZoom.js","sourceRoot":"","sources":["../../../src/ir/ui/useIrZoom.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"useIrZoom.js","sourceRoot":"","sources":["../../../src/ir/ui/useIrZoom.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAMhC,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAG7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAuC5D;;;;;;;;GAQG;AACH,MAAM,UAAU,SAAS,CAAC,OAAsB;IAC9C,MAAM,EACJ,OAAO,EACP,SAAS,GAAG,UAAU,EACtB,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,MAAM,GAAG,IAAI,EACb,IAAI,GAAG,OAAO,EACd,OAAO,GACR,GAAG,OAAO,CAAC;IAEZ,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;IACzE,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;IACvE,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IACtD,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;IAEvE,+EAA+E;IAC/E,2EAA2E;IAC3E,+DAA+D;IAC/D,OAAO,YAAY,CAAC;QAClB,MAAM;QACN,MAAM;QACN,MAAM;QACN,IAAI;QACJ,KAAK;QACL,MAAM;QACN,QAAQ;QACR,QAAQ,EAAE,kBAAkB,CAAC,SAAS,CAAC,CAAC,QAAQ;QAChD,OAAO;KACR,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The zoom in and zoom out commands, which scale the value axis alone.
|
|
3
|
+
*
|
|
4
|
+
* They scale it about the baseline the mode hangs from — 100 for percent
|
|
5
|
+
* transmittance, zero for absorbance and intensity — so a weak band comes up
|
|
6
|
+
* out of its baseline rather than the whole trace drifting off the plot.
|
|
7
|
+
*/
|
|
8
|
+
/** The two commands, ready to hand to a button or a key. */
|
|
9
|
+
export interface ValueAxisZoom {
|
|
10
|
+
/** Bring the bands up by one step. */
|
|
11
|
+
zoomIn: () => void;
|
|
12
|
+
/** Put the axis back out by one step. */
|
|
13
|
+
zoomOut: () => void;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Zoom the value axis of the viewer this is called inside.
|
|
17
|
+
* @returns The two commands.
|
|
18
|
+
*/
|
|
19
|
+
export declare function useValueAxisZoom(): ValueAxisZoom;
|
|
20
|
+
//# sourceMappingURL=useValueAxisZoom.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useValueAxisZoom.d.ts","sourceRoot":"","sources":["../../../src/ir/ui/useValueAxisZoom.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AASH,4DAA4D;AAC5D,MAAM,WAAW,aAAa;IAC5B,sCAAsC;IACtC,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,yCAAyC;IACzC,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,aAAa,CA8BhD"}
|