react-cheminfo 0.64.1 → 0.66.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 +293 -6
- package/lib/card/core/cardAddress.d.ts +70 -0
- package/lib/card/core/cardAddress.d.ts.map +1 -0
- package/lib/card/core/cardAddress.js +59 -0
- package/lib/card/core/cardAddress.js.map +1 -0
- package/lib/card/core/cardPageUrl.d.ts +49 -0
- package/lib/card/core/cardPageUrl.d.ts.map +1 -0
- package/lib/card/core/cardPageUrl.js +59 -0
- package/lib/card/core/cardPageUrl.js.map +1 -0
- package/lib/card/core/index.d.ts +7 -0
- package/lib/card/core/index.d.ts.map +1 -0
- package/lib/card/core/index.js +4 -0
- package/lib/card/core/index.js.map +1 -0
- package/lib/card/core/panelRoom.d.ts +40 -0
- package/lib/card/core/panelRoom.d.ts.map +1 -0
- package/lib/card/core/panelRoom.js +40 -0
- package/lib/card/core/panelRoom.js.map +1 -0
- package/lib/card/ui/CardDetailsButton.d.ts +38 -0
- package/lib/card/ui/CardDetailsButton.d.ts.map +1 -0
- package/lib/card/ui/CardDetailsButton.js +50 -0
- package/lib/card/ui/CardDetailsButton.js.map +1 -0
- package/lib/card/ui/CardFigure.d.ts +51 -0
- package/lib/card/ui/CardFigure.d.ts.map +1 -0
- package/lib/card/ui/CardFigure.js +27 -0
- package/lib/card/ui/CardFigure.js.map +1 -0
- package/lib/card/ui/CardFrame.d.ts +30 -0
- package/lib/card/ui/CardFrame.d.ts.map +1 -0
- package/lib/card/ui/CardFrame.js +20 -0
- package/lib/card/ui/CardFrame.js.map +1 -0
- package/lib/card/ui/CopyTableButton.d.ts +37 -0
- package/lib/card/ui/CopyTableButton.d.ts.map +1 -0
- package/lib/card/ui/CopyTableButton.js +19 -0
- package/lib/card/ui/CopyTableButton.js.map +1 -0
- package/lib/card/ui/cardTooltip.d.ts +14 -0
- package/lib/card/ui/cardTooltip.d.ts.map +1 -0
- package/lib/card/ui/cardTooltip.js +15 -0
- package/lib/card/ui/cardTooltip.js.map +1 -0
- package/lib/card/ui/embed.d.ts +15 -0
- package/lib/card/ui/embed.d.ts.map +1 -0
- package/lib/card/ui/embed.js +24 -0
- package/lib/card/ui/embed.js.map +1 -0
- package/lib/card/ui/fitCardToFrame.d.ts +31 -0
- package/lib/card/ui/fitCardToFrame.d.ts.map +1 -0
- package/lib/card/ui/fitCardToFrame.js +66 -0
- package/lib/card/ui/fitCardToFrame.js.map +1 -0
- package/lib/card/ui/holdRoomForPanels.d.ts +16 -0
- package/lib/card/ui/holdRoomForPanels.d.ts.map +1 -0
- package/lib/card/ui/holdRoomForPanels.js +76 -0
- package/lib/card/ui/holdRoomForPanels.js.map +1 -0
- package/lib/card/ui/index.d.ts +11 -0
- package/lib/card/ui/index.d.ts.map +1 -0
- package/lib/card/ui/index.js +7 -0
- package/lib/card/ui/index.js.map +1 -0
- package/lib/card/ui/openPanels.d.ts +25 -0
- package/lib/card/ui/openPanels.d.ts.map +1 -0
- package/lib/card/ui/openPanels.js +85 -0
- package/lib/card/ui/openPanels.js.map +1 -0
- package/lib/card.d.ts +13 -0
- package/lib/card.d.ts.map +1 -0
- package/lib/card.js +13 -0
- package/lib/card.js.map +1 -0
- package/lib/conformers.d.ts +1 -0
- package/lib/conformers.d.ts.map +1 -1
- package/lib/conformers.js +1 -0
- package/lib/conformers.js.map +1 -1
- package/lib/core.d.ts +4 -0
- package/lib/core.d.ts.map +1 -1
- package/lib/core.js +5 -0
- package/lib/core.js.map +1 -1
- package/lib/fetch/core/apiError.d.ts +56 -0
- package/lib/fetch/core/apiError.d.ts.map +1 -0
- package/lib/fetch/core/apiError.js +43 -0
- package/lib/fetch/core/apiError.js.map +1 -0
- package/lib/fetch/core/fetchJson.d.ts +47 -0
- package/lib/fetch/core/fetchJson.d.ts.map +1 -0
- package/lib/fetch/core/fetchJson.js +109 -0
- package/lib/fetch/core/fetchJson.js.map +1 -0
- package/lib/fetch/core/index.d.ts +5 -0
- package/lib/fetch/core/index.d.ts.map +1 -0
- package/lib/fetch/core/index.js +3 -0
- package/lib/fetch/core/index.js.map +1 -0
- package/lib/formula/core/formulaText.d.ts +46 -0
- package/lib/formula/core/formulaText.d.ts.map +1 -0
- package/lib/formula/core/formulaText.js +74 -0
- package/lib/formula/core/formulaText.js.map +1 -0
- package/lib/formula/core/index.d.ts +6 -0
- package/lib/formula/core/index.d.ts.map +1 -0
- package/lib/formula/core/index.js +4 -0
- package/lib/formula/core/index.js.map +1 -0
- package/lib/formula/core/normalizeFormula.d.ts +22 -0
- package/lib/formula/core/normalizeFormula.d.ts.map +1 -0
- package/lib/formula/core/normalizeFormula.js +46 -0
- package/lib/formula/core/normalizeFormula.js.map +1 -0
- package/lib/formula/core/readFormula.d.ts +73 -0
- package/lib/formula/core/readFormula.d.ts.map +1 -0
- package/lib/formula/core/readFormula.js +132 -0
- package/lib/formula/core/readFormula.js.map +1 -0
- package/lib/formula/ui/CopyableFormula.d.ts +31 -0
- package/lib/formula/ui/CopyableFormula.d.ts.map +1 -0
- package/lib/formula/ui/CopyableFormula.js +19 -0
- package/lib/formula/ui/CopyableFormula.js.map +1 -0
- package/lib/formula/ui/FormulaInput.d.ts +29 -0
- package/lib/formula/ui/FormulaInput.d.ts.map +1 -0
- package/lib/formula/ui/FormulaInput.js +16 -0
- package/lib/formula/ui/FormulaInput.js.map +1 -0
- package/lib/formula/ui/QuestionFormula.d.ts +14 -0
- package/lib/formula/ui/QuestionFormula.d.ts.map +1 -0
- package/lib/formula/ui/QuestionFormula.js +13 -0
- package/lib/formula/ui/QuestionFormula.js.map +1 -0
- package/lib/formula/ui/index.d.ts +7 -0
- package/lib/formula/ui/index.d.ts.map +1 -0
- package/lib/formula/ui/index.js +4 -0
- package/lib/formula/ui/index.js.map +1 -0
- package/lib/formula.d.ts +11 -0
- package/lib/formula.d.ts.map +1 -0
- package/lib/formula.js +11 -0
- package/lib/formula.js.map +1 -0
- package/lib/hooks/ui/index.d.ts +1 -0
- package/lib/hooks/ui/index.d.ts.map +1 -1
- package/lib/hooks/ui/index.js.map +1 -1
- package/lib/hooks/ui/keyTargets.d.ts +4 -2
- package/lib/hooks/ui/keyTargets.d.ts.map +1 -1
- package/lib/hooks/ui/keyTargets.js +5 -3
- package/lib/hooks/ui/keyTargets.js.map +1 -1
- package/lib/hooks/ui/useAsync.d.ts +20 -5
- package/lib/hooks/ui/useAsync.d.ts.map +1 -1
- package/lib/hooks/ui/useAsync.js +29 -14
- package/lib/hooks/ui/useAsync.js.map +1 -1
- package/lib/i18n/core/chromeCatalog.d.ts +1 -1
- package/lib/i18n/core/chromeCatalog.d.ts.map +1 -1
- package/lib/ir/core/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 +13 -9
- 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/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 +0 -28
- 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/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 +40 -2
- 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.map +1 -1
- package/lib/ir/ui/IrCanvas.js +2 -2
- 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 +18 -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 +3 -1
- 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.map +1 -1
- package/lib/ir/ui/IrShell.js +23 -56
- package/lib/ir/ui/IrShell.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 +46 -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 +48 -0
- package/lib/ir/ui/VibrationalEditor.d.ts.map +1 -0
- package/lib/ir/ui/VibrationalEditor.js +31 -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/irChartProps.d.ts +14 -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/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/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 +7 -0
- package/lib/ir/ui/useIrZoom.d.ts.map +1 -1
- package/lib/ir/ui/useIrZoom.js +5 -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 +57 -1
- package/lib/locales/en.json +57 -1
- package/lib/locales/es.json +57 -1
- package/lib/locales/fr.json +57 -1
- package/lib/locales/it.json +57 -1
- package/lib/moleculesClient/core/index.d.ts +5 -0
- package/lib/moleculesClient/core/index.d.ts.map +1 -0
- package/lib/moleculesClient/core/index.js +3 -0
- package/lib/moleculesClient/core/index.js.map +1 -0
- package/lib/moleculesClient/core/moleculesClient.d.ts +12 -0
- package/lib/moleculesClient/core/moleculesClient.d.ts.map +1 -0
- package/lib/moleculesClient/core/moleculesClient.js +105 -0
- package/lib/moleculesClient/core/moleculesClient.js.map +1 -0
- package/lib/moleculesClient/core/moleculesClientApi.d.ts +100 -0
- package/lib/moleculesClient/core/moleculesClientApi.d.ts.map +1 -0
- package/lib/moleculesClient/core/moleculesClientApi.js +20 -0
- package/lib/moleculesClient/core/moleculesClientApi.js.map +1 -0
- package/lib/moleculesClient/core/moleculesTypes.d.ts +154 -0
- package/lib/moleculesClient/core/moleculesTypes.d.ts.map +1 -0
- package/lib/moleculesClient/core/moleculesTypes.js +2 -0
- package/lib/moleculesClient/core/moleculesTypes.js.map +1 -0
- package/lib/moleculesClient/core/requestRetry.d.ts +50 -0
- package/lib/moleculesClient/core/requestRetry.d.ts.map +1 -0
- package/lib/moleculesClient/core/requestRetry.js +108 -0
- package/lib/moleculesClient/core/requestRetry.js.map +1 -0
- package/lib/molstar/core/camera.d.ts +2 -1
- package/lib/molstar/core/camera.d.ts.map +1 -1
- package/lib/molstar/core/camera.js +3 -2
- package/lib/molstar/core/camera.js.map +1 -1
- package/lib/molstar/core/framing.d.ts +102 -0
- package/lib/molstar/core/framing.d.ts.map +1 -0
- package/lib/molstar/core/framing.js +120 -0
- package/lib/molstar/core/framing.js.map +1 -0
- package/lib/molstar/core/hover.d.ts +16 -0
- package/lib/molstar/core/hover.d.ts.map +1 -1
- package/lib/molstar/core/hover.js +14 -0
- package/lib/molstar/core/hover.js.map +1 -1
- package/lib/molstar/core/index.d.ts +4 -1
- package/lib/molstar/core/index.d.ts.map +1 -1
- package/lib/molstar/core/index.js +2 -1
- package/lib/molstar/core/index.js.map +1 -1
- package/lib/pedagogy/core/answers.d.ts +46 -0
- package/lib/pedagogy/core/answers.d.ts.map +1 -0
- package/lib/pedagogy/core/answers.js +77 -0
- package/lib/pedagogy/core/answers.js.map +1 -0
- package/lib/pedagogy/core/attempts.d.ts +86 -0
- package/lib/pedagogy/core/attempts.d.ts.map +1 -0
- package/lib/pedagogy/core/attempts.js +117 -0
- package/lib/pedagogy/core/attempts.js.map +1 -0
- package/lib/pedagogy/core/index.d.ts +8 -0
- package/lib/pedagogy/core/index.d.ts.map +1 -1
- package/lib/pedagogy/core/index.js +4 -0
- package/lib/pedagogy/core/index.js.map +1 -1
- package/lib/pedagogy/core/progressController.d.ts +64 -0
- package/lib/pedagogy/core/progressController.d.ts.map +1 -0
- package/lib/pedagogy/core/progressController.js +56 -0
- package/lib/pedagogy/core/progressController.js.map +1 -0
- package/lib/pedagogy/core/seed.d.ts +96 -0
- package/lib/pedagogy/core/seed.d.ts.map +1 -0
- package/lib/pedagogy/core/seed.js +128 -0
- package/lib/pedagogy/core/seed.js.map +1 -0
- package/lib/pedagogy/core/series.d.ts +77 -0
- package/lib/pedagogy/core/series.d.ts.map +1 -0
- package/lib/pedagogy/core/series.js +10 -0
- package/lib/pedagogy/core/series.js.map +1 -0
- package/lib/pedagogy/ui/AnswerFields.d.ts +21 -0
- package/lib/pedagogy/ui/AnswerFields.d.ts.map +1 -0
- package/lib/pedagogy/ui/AnswerFields.js +24 -0
- package/lib/pedagogy/ui/AnswerFields.js.map +1 -0
- package/lib/pedagogy/ui/ExerciseList.d.ts +82 -0
- package/lib/pedagogy/ui/ExerciseList.d.ts.map +1 -0
- package/lib/pedagogy/ui/ExerciseList.js +53 -0
- package/lib/pedagogy/ui/ExerciseList.js.map +1 -0
- package/lib/pedagogy/ui/ExerciseSeries.d.ts +95 -0
- package/lib/pedagogy/ui/ExerciseSeries.d.ts.map +1 -0
- package/lib/pedagogy/ui/ExerciseSeries.js +74 -0
- package/lib/pedagogy/ui/ExerciseSeries.js.map +1 -0
- package/lib/pedagogy/ui/QuestionCard.d.ts +64 -0
- package/lib/pedagogy/ui/QuestionCard.d.ts.map +1 -0
- package/lib/pedagogy/ui/QuestionCard.js +73 -0
- package/lib/pedagogy/ui/QuestionCard.js.map +1 -0
- package/lib/pedagogy/ui/index.d.ts +10 -0
- package/lib/pedagogy/ui/index.d.ts.map +1 -1
- package/lib/pedagogy/ui/index.js +6 -0
- package/lib/pedagogy/ui/index.js.map +1 -1
- package/lib/pedagogy/ui/seriesCounts.d.ts +17 -0
- package/lib/pedagogy/ui/seriesCounts.d.ts.map +1 -0
- package/lib/pedagogy/ui/seriesCounts.js +27 -0
- package/lib/pedagogy/ui/seriesCounts.js.map +1 -0
- package/lib/pedagogy/ui/seriesParts.d.ts +55 -0
- package/lib/pedagogy/ui/seriesParts.d.ts.map +1 -0
- package/lib/pedagogy/ui/seriesParts.js +38 -0
- package/lib/pedagogy/ui/seriesParts.js.map +1 -0
- package/lib/pedagogy/ui/useAttemptRecords.d.ts +10 -0
- package/lib/pedagogy/ui/useAttemptRecords.d.ts.map +1 -0
- package/lib/pedagogy/ui/useAttemptRecords.js +11 -0
- package/lib/pedagogy/ui/useAttemptRecords.js.map +1 -0
- package/lib/periodic/ui/PeriodicTable.d.ts.map +1 -1
- package/lib/periodic/ui/PeriodicTable.js +6 -3
- package/lib/periodic/ui/PeriodicTable.js.map +1 -1
- package/lib/property/core/copyableText.d.ts +14 -0
- package/lib/property/core/copyableText.d.ts.map +1 -0
- package/lib/property/core/copyableText.js +21 -0
- package/lib/property/core/copyableText.js.map +1 -0
- package/lib/property/core/index.d.ts +2 -0
- package/lib/property/core/index.d.ts.map +1 -0
- package/lib/property/core/index.js +2 -0
- package/lib/property/core/index.js.map +1 -0
- package/lib/property/ui/PropertyTable.d.ts +43 -0
- package/lib/property/ui/PropertyTable.d.ts.map +1 -0
- package/lib/property/ui/PropertyTable.js +19 -0
- package/lib/property/ui/PropertyTable.js.map +1 -0
- package/lib/property/ui/index.d.ts +3 -0
- package/lib/property/ui/index.d.ts.map +1 -0
- package/lib/property/ui/index.js +2 -0
- package/lib/property/ui/index.js.map +1 -0
- package/lib/raman.d.ts +16 -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/history.d.ts +24 -3
- package/lib/router/core/history.d.ts.map +1 -1
- package/lib/router/core/history.js +55 -7
- package/lib/router/core/history.js.map +1 -1
- package/lib/router/core/index.d.ts +3 -3
- package/lib/router/core/index.d.ts.map +1 -1
- package/lib/router/core/index.js +2 -2
- package/lib/router/core/index.js.map +1 -1
- package/lib/router/core/languageRoute.d.ts +61 -0
- package/lib/router/core/languageRoute.d.ts.map +1 -0
- package/lib/router/core/languageRoute.js +96 -0
- package/lib/router/core/languageRoute.js.map +1 -0
- package/lib/router/core/siteAddresses.d.ts +23 -0
- package/lib/router/core/siteAddresses.d.ts.map +1 -1
- package/lib/router/core/siteAddresses.js +26 -0
- package/lib/router/core/siteAddresses.js.map +1 -1
- package/lib/router/core/tabRouter.d.ts +2 -108
- package/lib/router/core/tabRouter.d.ts.map +1 -1
- package/lib/router/core/tabRouter.js +38 -5
- package/lib/router/core/tabRouter.js.map +1 -1
- package/lib/router/core/tabRouterTypes.d.ts +154 -0
- package/lib/router/core/tabRouterTypes.d.ts.map +1 -0
- package/lib/router/core/tabRouterTypes.js +2 -0
- package/lib/router/core/tabRouterTypes.js.map +1 -0
- package/lib/seo/core/fitDescription.d.ts +40 -0
- package/lib/seo/core/fitDescription.d.ts.map +1 -0
- package/lib/seo/core/fitDescription.js +45 -0
- package/lib/seo/core/fitDescription.js.map +1 -0
- package/lib/seo/core/index.d.ts +7 -0
- package/lib/seo/core/index.d.ts.map +1 -1
- package/lib/seo/core/index.js +4 -0
- package/lib/seo/core/index.js.map +1 -1
- package/lib/seo/core/limits.d.ts +24 -0
- package/lib/seo/core/limits.d.ts.map +1 -0
- package/lib/seo/core/limits.js +24 -0
- package/lib/seo/core/limits.js.map +1 -0
- package/lib/seo/core/pageContent.d.ts +25 -0
- package/lib/seo/core/pageContent.d.ts.map +1 -0
- package/lib/seo/core/pageContent.js +25 -0
- package/lib/seo/core/pageContent.js.map +1 -0
- package/lib/seo/core/plainDescription.d.ts.map +1 -1
- package/lib/seo/core/plainDescription.js +3 -2
- package/lib/seo/core/plainDescription.js.map +1 -1
- package/lib/seo/core/routeProblems.d.ts.map +1 -1
- package/lib/seo/core/routeProblems.js +1 -6
- package/lib/seo/core/routeProblems.js.map +1 -1
- package/lib/seo/core/routeTable.d.ts +31 -0
- package/lib/seo/core/routeTable.d.ts.map +1 -0
- package/lib/seo/core/routeTable.js +96 -0
- package/lib/seo/core/routeTable.js.map +1 -0
- package/lib/seo/vite/index.d.ts +2 -0
- package/lib/seo/vite/index.d.ts.map +1 -1
- package/lib/seo/vite/index.js +1 -0
- package/lib/seo/vite/index.js.map +1 -1
- package/lib/seo/vite/prerender.d.ts +10 -0
- package/lib/seo/vite/prerender.d.ts.map +1 -1
- package/lib/seo/vite/prerender.js +12 -1
- package/lib/seo/vite/prerender.js.map +1 -1
- package/lib/seo/vite/routeTable.d.ts +40 -0
- package/lib/seo/vite/routeTable.d.ts.map +1 -0
- package/lib/seo/vite/routeTable.js +44 -0
- package/lib/seo/vite/routeTable.js.map +1 -0
- package/lib/server/answerAddresses.d.ts +51 -0
- package/lib/server/answerAddresses.d.ts.map +1 -0
- package/lib/server/answerAddresses.js +72 -0
- package/lib/server/answerAddresses.js.map +1 -0
- package/lib/server/cardMeta.d.ts +57 -0
- package/lib/server/cardMeta.d.ts.map +1 -0
- package/lib/server/cardMeta.js +52 -0
- package/lib/server/cardMeta.js.map +1 -0
- package/lib/server/config.d.ts +72 -0
- package/lib/server/config.d.ts.map +1 -0
- package/lib/server/config.js +67 -0
- package/lib/server/config.js.map +1 -0
- package/lib/server/envNumber.d.ts +35 -0
- package/lib/server/envNumber.d.ts.map +1 -0
- package/lib/server/envNumber.js +42 -0
- package/lib/server/envNumber.js.map +1 -0
- package/lib/server/healthRoute.d.ts +26 -0
- package/lib/server/healthRoute.d.ts.map +1 -0
- package/lib/server/healthRoute.js +22 -0
- package/lib/server/healthRoute.js.map +1 -0
- package/lib/server/listenSite.d.ts +38 -0
- package/lib/server/listenSite.d.ts.map +1 -0
- package/lib/server/listenSite.js +60 -0
- package/lib/server/listenSite.js.map +1 -0
- package/lib/server/mcpServer.d.ts +8 -0
- package/lib/server/mcpServer.d.ts.map +1 -0
- package/lib/server/mcpServer.js +11 -0
- package/lib/server/mcpServer.js.map +1 -0
- package/lib/server/repositoryVersion.d.ts +16 -0
- package/lib/server/repositoryVersion.d.ts.map +1 -0
- package/lib/server/repositoryVersion.js +33 -0
- package/lib/server/repositoryVersion.js.map +1 -0
- package/lib/server/routeOptions.d.ts +23 -0
- package/lib/server/routeOptions.d.ts.map +1 -0
- package/lib/server/routeOptions.js +20 -0
- package/lib/server/routeOptions.js.map +1 -0
- package/lib/server/routeTable.d.ts +14 -0
- package/lib/server/routeTable.d.ts.map +1 -0
- package/lib/server/routeTable.js +32 -0
- package/lib/server/routeTable.js.map +1 -0
- package/lib/server/siteView.d.ts +29 -0
- package/lib/server/siteView.d.ts.map +1 -0
- package/lib/server/siteView.js +21 -0
- package/lib/server/siteView.js.map +1 -0
- package/lib/server/spaPages.d.ts +32 -0
- package/lib/server/spaPages.d.ts.map +1 -0
- package/lib/server/spaPages.js +126 -0
- package/lib/server/spaPages.js.map +1 -0
- package/lib/server/spaSite.d.ts +30 -0
- package/lib/server/spaSite.d.ts.map +1 -0
- package/lib/server/spaSite.js +170 -0
- package/lib/server/spaSite.js.map +1 -0
- package/lib/server/spaSiteOptions.d.ts +126 -0
- package/lib/server/spaSiteOptions.d.ts.map +1 -0
- package/lib/server/spaSiteOptions.js +2 -0
- package/lib/server/spaSiteOptions.js.map +1 -0
- package/lib/server/staticSite.d.ts +9 -0
- package/lib/server/staticSite.d.ts.map +1 -1
- package/lib/server/staticSite.js +41 -19
- package/lib/server/staticSite.js.map +1 -1
- package/lib/server/toolSiteServer.d.ts +77 -0
- package/lib/server/toolSiteServer.d.ts.map +1 -0
- package/lib/server/toolSiteServer.js +58 -0
- package/lib/server/toolSiteServer.js.map +1 -0
- package/lib/server/trustProxy.d.ts +20 -0
- package/lib/server/trustProxy.d.ts.map +1 -0
- package/lib/server/trustProxy.js +32 -0
- package/lib/server/trustProxy.js.map +1 -0
- package/lib/server/types.d.ts +13 -0
- package/lib/server/types.d.ts.map +1 -0
- package/lib/server/types.js +2 -0
- package/lib/server/types.js.map +1 -0
- package/lib/server.d.ts +22 -0
- package/lib/server.d.ts.map +1 -1
- package/lib/server.js +12 -0
- package/lib/server.js.map +1 -1
- package/lib/share/core/config.d.ts +18 -0
- package/lib/share/core/config.d.ts.map +1 -1
- package/lib/share/core/config.js +33 -2
- package/lib/share/core/config.js.map +1 -1
- package/lib/share/core/index.d.ts +3 -1
- package/lib/share/core/index.d.ts.map +1 -1
- package/lib/share/core/index.js +2 -1
- package/lib/share/core/index.js.map +1 -1
- package/lib/share/core/keySetParam.d.ts +40 -0
- package/lib/share/core/keySetParam.d.ts.map +1 -0
- package/lib/share/core/keySetParam.js +60 -0
- package/lib/share/core/keySetParam.js.map +1 -0
- package/lib/share/core/vocabulary.d.ts +8 -0
- package/lib/share/core/vocabulary.d.ts.map +1 -1
- package/lib/shell/ui/ShareControl.d.ts +75 -0
- package/lib/shell/ui/ShareControl.d.ts.map +1 -0
- package/lib/shell/ui/ShareControl.js +40 -0
- package/lib/shell/ui/ShareControl.js.map +1 -0
- package/lib/shell/ui/ShellFrame.d.ts +14 -0
- package/lib/shell/ui/ShellFrame.d.ts.map +1 -0
- package/lib/shell/ui/ShellFrame.js +45 -0
- package/lib/shell/ui/ShellFrame.js.map +1 -0
- package/lib/shell/ui/SiteShell.d.ts +251 -0
- package/lib/shell/ui/SiteShell.d.ts.map +1 -0
- package/lib/shell/ui/SiteShell.js +39 -0
- package/lib/shell/ui/SiteShell.js.map +1 -0
- package/lib/shell/ui/index.d.ts +5 -0
- package/lib/shell/ui/index.d.ts.map +1 -0
- package/lib/shell/ui/index.js +3 -0
- package/lib/shell/ui/index.js.map +1 -0
- package/lib/state/core/index.d.ts +1 -0
- package/lib/state/core/index.d.ts.map +1 -1
- package/lib/state/core/index.js.map +1 -1
- package/lib/state/core/legacyEntries.d.ts +30 -0
- package/lib/state/core/legacyEntries.d.ts.map +1 -0
- package/lib/state/core/legacyEntries.js +51 -0
- package/lib/state/core/legacyEntries.js.map +1 -0
- package/lib/state/core/persistBucket.d.ts +26 -2
- package/lib/state/core/persistBucket.d.ts.map +1 -1
- package/lib/state/core/persistBucket.js +26 -9
- package/lib/state/core/persistBucket.js.map +1 -1
- package/lib/state/core/persistSignalBucket.d.ts +26 -0
- package/lib/state/core/persistSignalBucket.d.ts.map +1 -1
- package/lib/state/core/persistSignalBucket.js +31 -0
- package/lib/state/core/persistSignalBucket.js.map +1 -1
- package/lib/state/core/storageEntry.d.ts +15 -0
- package/lib/state/core/storageEntry.d.ts.map +1 -1
- package/lib/state/core/storageEntry.js +33 -0
- package/lib/state/core/storageEntry.js.map +1 -1
- package/lib/structure/ui/StructureExportButton.d.ts +27 -0
- package/lib/structure/ui/StructureExportButton.d.ts.map +1 -0
- package/lib/structure/ui/StructureExportButton.js +21 -0
- package/lib/structure/ui/StructureExportButton.js.map +1 -0
- package/lib/structure/ui/index.d.ts +4 -0
- package/lib/structure/ui/index.d.ts.map +1 -1
- package/lib/structure/ui/index.js +2 -0
- package/lib/structure/ui/index.js.map +1 -1
- package/lib/structure/ui/useStructureDraft.d.ts +32 -0
- package/lib/structure/ui/useStructureDraft.d.ts.map +1 -0
- package/lib/structure/ui/useStructureDraft.js +20 -0
- package/lib/structure/ui/useStructureDraft.js.map +1 -0
- package/lib/ui.d.ts +2 -0
- package/lib/ui.d.ts.map +1 -1
- package/lib/ui.js +2 -0
- package/lib/ui.js.map +1 -1
- package/lib/worker/core/index.d.ts +1 -1
- package/lib/worker/core/index.d.ts.map +1 -1
- package/lib/worker/core/messages.d.ts +4 -2
- package/lib/worker/core/messages.d.ts.map +1 -1
- package/lib/worker/core/messages.js.map +1 -1
- package/lib/worker/core/oclResourcesUrl.d.ts +16 -0
- package/lib/worker/core/oclResourcesUrl.d.ts.map +1 -0
- package/lib/worker/core/oclResourcesUrl.js +19 -0
- package/lib/worker/core/oclResourcesUrl.js.map +1 -0
- package/lib/worker/core/serveWorkerRequests.d.ts +8 -0
- package/lib/worker/core/serveWorkerRequests.d.ts.map +1 -1
- package/lib/worker/core/serveWorkerRequests.js +15 -2
- package/lib/worker/core/serveWorkerRequests.js.map +1 -1
- package/lib/worker/core/workerChannel.d.ts +3 -4
- package/lib/worker/core/workerChannel.d.ts.map +1 -1
- package/lib/worker/core/workerChannel.js +72 -67
- package/lib/worker/core/workerChannel.js.map +1 -1
- package/lib/worker/core/workerChannelParts.d.ts +17 -6
- package/lib/worker/core/workerChannelParts.d.ts.map +1 -1
- package/lib/worker/core/workerChannelParts.js +20 -4
- package/lib/worker/core/workerChannelParts.js.map +1 -1
- package/lib/worker/core/workerChannelTypes.d.ts +46 -2
- package/lib/worker/core/workerChannelTypes.d.ts.map +1 -1
- package/lib/worker/core/workerSlot.d.ts +66 -0
- package/lib/worker/core/workerSlot.d.ts.map +1 -0
- package/lib/worker/core/workerSlot.js +107 -0
- package/lib/worker/core/workerSlot.js.map +1 -0
- package/package.json +17 -1
- package/src/card/core/cardAddress.ts +100 -0
- package/src/card/core/cardPageUrl.ts +97 -0
- package/src/card/core/index.ts +6 -0
- package/src/card/core/panelRoom.ts +66 -0
- package/src/card/ui/CardDetailsButton.tsx +104 -0
- package/src/card/ui/CardFigure.tsx +86 -0
- package/src/card/ui/CardFrame.tsx +46 -0
- package/src/card/ui/CopyTableButton.tsx +81 -0
- package/src/card/ui/cardTooltip.ts +18 -0
- package/src/card/ui/embed.ts +27 -0
- package/src/card/ui/fitCardToFrame.ts +76 -0
- package/src/card/ui/holdRoomForPanels.ts +83 -0
- package/src/card/ui/index.ts +14 -0
- package/src/card/ui/openPanels.ts +106 -0
- package/src/card.ts +13 -0
- package/src/conformers.ts +4 -0
- package/src/core.ts +5 -0
- package/src/fetch/core/apiError.ts +65 -0
- package/src/fetch/core/fetchJson.ts +129 -0
- package/src/fetch/core/index.ts +4 -0
- package/src/formula/core/formulaText.ts +96 -0
- package/src/formula/core/index.ts +20 -0
- package/src/formula/core/normalizeFormula.ts +50 -0
- package/src/formula/core/readFormula.ts +211 -0
- package/src/formula/ui/CopyableFormula.tsx +51 -0
- package/src/formula/ui/FormulaInput.tsx +50 -0
- package/src/formula/ui/QuestionFormula.tsx +20 -0
- package/src/formula/ui/index.ts +6 -0
- package/src/formula.ts +11 -0
- package/src/hooks/ui/index.ts +1 -0
- package/src/hooks/ui/keyTargets.ts +5 -3
- package/src/hooks/ui/useAsync.ts +50 -14
- package/src/ir/core/analysisSpectra.ts +26 -10
- package/src/ir/core/bandLabelPlan.ts +21 -10
- package/src/ir/core/index.ts +25 -5
- 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/irFormat.ts +39 -6
- package/src/ir/core/irMode.ts +42 -10
- package/src/ir/core/irReducer.ts +1 -49
- package/src/ir/core/irSpectrum.ts +59 -30
- package/src/ir/core/irState.ts +67 -2
- 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 +2 -1
- package/src/ir/ui/IrChart.tsx +20 -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 +5 -36
- package/src/ir/ui/IrHeader.tsx +10 -3
- package/src/ir/ui/IrLogo.tsx +28 -9
- package/src/ir/ui/IrShell.tsx +27 -75
- 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 +53 -0
- package/src/ir/ui/SpectraPanel.tsx +2 -1
- package/src/ir/ui/SpectrumRow.tsx +14 -5
- package/src/ir/ui/VibrationalEditor.tsx +94 -0
- package/src/ir/ui/bandsTsv.ts +46 -0
- package/src/ir/ui/irChartProps.ts +14 -4
- package/src/ir/ui/irCommandContext.tsx +18 -3
- package/src/ir/ui/useIrEditor.ts +20 -8
- package/src/ir/ui/useIrHandle.ts +51 -0
- package/src/ir/ui/useIrText.ts +170 -0
- package/src/ir/ui/useIrZoom.ts +12 -3
- package/src/ir/ui/useValueAxisZoom.ts +67 -0
- package/src/ir.ts +3 -0
- package/src/locales/de.json +57 -1
- package/src/locales/en.json +57 -1
- package/src/locales/es.json +57 -1
- package/src/locales/fr.json +57 -1
- package/src/locales/it.json +57 -1
- package/src/moleculesClient/core/index.ts +19 -0
- package/src/moleculesClient/core/moleculesClient.ts +175 -0
- package/src/moleculesClient/core/moleculesClientApi.ts +120 -0
- package/src/moleculesClient/core/moleculesTypes.ts +163 -0
- package/src/moleculesClient/core/requestRetry.ts +118 -0
- package/src/molstar/core/camera.ts +3 -2
- package/src/molstar/core/framing.ts +200 -0
- package/src/molstar/core/hover.ts +26 -0
- package/src/molstar/core/index.ts +21 -1
- package/src/pedagogy/core/answers.ts +94 -0
- package/src/pedagogy/core/attempts.ts +205 -0
- package/src/pedagogy/core/index.ts +36 -0
- package/src/pedagogy/core/progressController.ts +116 -0
- package/src/pedagogy/core/seed.ts +177 -0
- package/src/pedagogy/core/series.ts +82 -0
- package/src/pedagogy/ui/AnswerFields.tsx +63 -0
- package/src/pedagogy/ui/ExerciseList.tsx +202 -0
- package/src/pedagogy/ui/ExerciseSeries.tsx +250 -0
- package/src/pedagogy/ui/QuestionCard.tsx +231 -0
- package/src/pedagogy/ui/index.ts +18 -0
- package/src/pedagogy/ui/seriesCounts.ts +34 -0
- package/src/pedagogy/ui/seriesParts.tsx +127 -0
- package/src/pedagogy/ui/useAttemptRecords.ts +16 -0
- package/src/periodic/ui/PeriodicTable.tsx +6 -3
- package/src/property/core/copyableText.ts +20 -0
- package/src/property/core/index.ts +1 -0
- package/src/property/ui/PropertyTable.tsx +83 -0
- package/src/property/ui/index.ts +2 -0
- package/src/raman.ts +19 -0
- package/src/router/core/history.ts +61 -7
- package/src/router/core/index.ts +3 -2
- package/src/router/core/languageRoute.ts +136 -0
- package/src/router/core/siteAddresses.ts +38 -0
- package/src/router/core/tabRouter.ts +59 -117
- package/src/router/core/tabRouterTypes.ts +158 -0
- package/src/seo/core/fitDescription.ts +74 -0
- package/src/seo/core/index.ts +17 -0
- package/src/seo/core/limits.ts +27 -0
- package/src/seo/core/pageContent.ts +42 -0
- package/src/seo/core/plainDescription.ts +4 -2
- package/src/seo/core/routeProblems.ts +1 -7
- package/src/seo/core/routeTable.ts +103 -0
- package/src/seo/vite/index.ts +2 -0
- package/src/seo/vite/prerender.ts +26 -1
- package/src/seo/vite/routeTable.ts +79 -0
- package/src/server/answerAddresses.ts +92 -0
- package/src/server/cardMeta.ts +88 -0
- package/src/server/config.ts +125 -0
- package/src/server/envNumber.ts +65 -0
- package/src/server/healthRoute.ts +42 -0
- package/src/server/listenSite.ts +90 -0
- package/src/server/mcpServer.ts +14 -0
- package/src/server/repositoryVersion.ts +33 -0
- package/src/server/routeOptions.ts +26 -0
- package/src/server/routeTable.ts +35 -0
- package/src/server/siteView.ts +42 -0
- package/src/server/spaPages.ts +179 -0
- package/src/server/spaSite.ts +216 -0
- package/src/server/spaSiteOptions.ts +133 -0
- package/src/server/staticSite.ts +65 -35
- package/src/server/toolSiteServer.ts +127 -0
- package/src/server/trustProxy.ts +32 -0
- package/src/server/types.ts +25 -0
- package/src/server.ts +40 -0
- package/src/share/core/config.ts +45 -2
- package/src/share/core/index.ts +4 -0
- package/src/share/core/keySetParam.ts +92 -0
- package/src/share/core/vocabulary.ts +8 -0
- package/src/shell/ui/ShareControl.tsx +150 -0
- package/src/shell/ui/ShellFrame.tsx +180 -0
- package/src/shell/ui/SiteShell.tsx +297 -0
- package/src/shell/ui/index.ts +9 -0
- package/src/state/core/index.ts +1 -0
- package/src/state/core/legacyEntries.ts +76 -0
- package/src/state/core/persistBucket.ts +50 -10
- package/src/state/core/persistSignalBucket.ts +52 -0
- package/src/state/core/storageEntry.ts +32 -0
- package/src/structure/ui/StructureExportButton.tsx +57 -0
- package/src/structure/ui/index.ts +4 -0
- package/src/structure/ui/useStructureDraft.ts +47 -0
- package/src/ui.ts +2 -0
- package/src/worker/core/index.ts +1 -0
- package/src/worker/core/messages.ts +4 -3
- package/src/worker/core/oclResourcesUrl.ts +21 -0
- package/src/worker/core/serveWorkerRequests.ts +30 -2
- package/src/worker/core/workerChannel.ts +74 -74
- package/src/worker/core/workerChannelParts.ts +33 -13
- package/src/worker/core/workerChannelTypes.ts +47 -2
- package/src/worker/core/workerSlot.ts +181 -0
- package/styles/card.css +145 -0
- package/styles/chrome.css +248 -0
|
@@ -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,CAAC;AAEvE,uDAAuD;AACvD,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC;AAEtC,yCAAyC;AACzC,MAAM,CAAC,MAAM,eAAe,GAAG,qBAAqB,CAAC;AAErD,8EAA8E;AAC9E,MAAM,CAAC,MAAM,iBAAiB,GAAG,kBAAkB,CAAC,QAAQ,CAAC,QAAQ,CAAC;AAEtE;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,iBAAiB,CAAC,QAAoB,EAAE,IAAY;IAClE,MAAM,OAAO,GAAG,WAAW,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IAC5C,MAAM,MAAM,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC;IACjC,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CAAC,GAAG,QAAQ,CAAC,IAAI,kCAAkC,CAAC,CAAC;IACtE,CAAC;IACD,OAAO,QAAQ,CACb,EAA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,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;;;;;;;GAOG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAmCtE;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAC1B,MAAwB,EACxB,UAA+B,EAAE;IAEjC,MAAM,EACJ,EAAE,GAAG,MAAM,CAAC,UAAU,EAAE,EACxB,KAAK,GAAG,EAAE,EACV,IAAI,EACJ,OAAO,GAAG,IAAI,GACf,GAAG,OAAO,CAAC;IACZ,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,iBAAiB,CAAC,KAAK,CAAC,CAAC;IACxD,OAAO;QACL,EAAE;QACF,IAAI,EAAE,IAAI,IAAI,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,MAAM,CAAC,QAAQ,IAAI,UAAU;QACjE,KAAK;QACL,UAAU,EAAE,MAAM,CAAC,UAAU;QAC7B,
|
|
1
|
+
{"version":3,"file":"toIrSpectrum.js","sourceRoot":"","sources":["../../../src/ir/core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C,KAAK,CAAC,CAAC;QAC5B,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACzB,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;;;;GAOG;AACH,SAAS,SAAS,CAChB,MAAwB;IAExB,MAAM,EAAE,UAAU,EAAE,aAAa,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC;IACxD,OAAO;QACL,GAAG,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC;QACnD,GAAG,CAAC,aAAa,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,CAAC;QACzD,GAAG,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC;KAClD,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { AssignedBand } from '../core/assignBands.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;;;;;;;;;GASG;AACH,MAAM,UAAU,OAAO,CAAC,KAAmB;IACzC,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC;IAC7D,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;IAEvB,OAAO,CACL,cACE,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,EACpC,cAAc,EAAE,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,IAAI,CAAC,EACzC,cAAc,EAAE,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,IAAI,CAAC,aAEzC,aAAI,KAAK,EAAE,oBAAoB,YAAG,gBAAgB,CAAC,IAAI,CAAC,UAAU,CAAC,GAAM,EACzE,aAAI,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,YAC7D,IAAI,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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.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AAC,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"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { Dialog, DialogBody } from '@blueprintjs/core';
|
|
3
|
+
import { Prose } from "../../i18n/ui/Prose.js";
|
|
4
|
+
import { useChromeT } from "../../i18n/ui/useT.js";
|
|
5
|
+
import { irCommands } from "../core/irCommands.js";
|
|
3
6
|
import { IrLogo } from "./IrLogo.js";
|
|
7
|
+
import { useIrText } from "./useIrText.js";
|
|
4
8
|
/**
|
|
5
9
|
* What the viewer is, what it stands on, and who is owed for it.
|
|
6
10
|
*
|
|
@@ -12,9 +16,18 @@ import { IrLogo } from "./IrLogo.js";
|
|
|
12
16
|
* @returns The dialog.
|
|
13
17
|
*/
|
|
14
18
|
export function IrAboutDialog(props) {
|
|
15
|
-
const { isOpen, onClose } = props;
|
|
16
|
-
|
|
19
|
+
const { isOpen, onClose, technique = 'infrared' } = props;
|
|
20
|
+
const t = useChromeT();
|
|
21
|
+
const title = (useIrText(technique).command('about') ?? irCommands.about)
|
|
22
|
+
.title;
|
|
23
|
+
const raman = technique === 'raman';
|
|
24
|
+
return (_jsx(Dialog, { isOpen: isOpen, onClose: onClose, title: title, icon: _jsx(IrLogo, { size: 20, technique: technique }), style: dialogStyle, children: _jsxs(DialogBody, { children: [_jsxs("div", { style: brandStyle, children: [_jsx(IrLogo, { size: 64, technique: technique }), _jsxs("div", { children: [_jsx("p", { style: leadStyle, children: DOORS[technique] }), raman ? (_jsx("p", { style: paragraphStyle, children: t('ir.raman.aboutLead') })) : (_jsx("p", { style: paragraphStyle, children: "Draws an infrared spectrum the way infrared is printed, reads it as absorbance or as percent transmittance, picks its bands and offers every functional group each band could be." }))] })] }), _jsx("h4", { style: headingStyle, children: "Credits" }), _jsxs("ul", { style: listStyle, children: [raman ? (_jsxs(_Fragment, { children: [_jsx("li", { children: _jsx(Prose, { text: t('ir.raman.credit.picking') }) }), _jsx("li", { children: _jsx(Prose, { text: t('ir.raman.credit.jcamp') }) })] })) : (_jsxs(_Fragment, { children: [_jsxs("li", { children: [_jsx("strong", { children: "ir-spectrum" }), " (cheminfo, MIT) reads the JCAMP-DX and SPC files, derives the absorbance/transmittance pair, and picks the bands. This package deliberately does none of that arithmetic itself."] }), _jsxs("li", { children: [_jsx("strong", { children: "common-spectrum" }), ",", ' ', _jsx("strong", { children: "jcampconverter" }), " and ", _jsx("strong", { children: "spc-parser" }), ' ', "(cheminfo, MIT) are what it reads through."] })] })), _jsxs("li", { children: [_jsx("strong", { children: "ml-spectra-processing" }), " (mljs, MIT) for the array work."] }), _jsxs("li", { children: ["The ", _jsx("strong", { children: "shared chart" }), " of this package for the drawing \u2014 the same arithmetic every other spectrum viewer of the family is drawn with."] }), _jsxs("li", { children: [_jsx("strong", { children: "react-science" }), " and ", _jsx("strong", { children: "BlueprintJS" }), "(zakodium, Palantir) for the shell this viewer is shaped like."] }), raman ? null : (_jsxs("li", { children: ["The ", _jsx("strong", { children: "correlation table" }), " is the conventional teaching set of group frequencies, as any introductory spectroscopy text tabulates them. The ranges are deliberately the rounded, generous ones: narrowing them to look precise would rule out assignments that are genuinely possible."] })), _jsxs("li", { children: ["The ", _jsx("strong", { children: "colours" }), " are Okabe and Ito's colour-universal palette, so two traces stay distinguishable for a reader with a colour vision deficiency."] })] })] }) }));
|
|
17
25
|
}
|
|
26
|
+
/** The entry point each technique's viewer is imported from. */
|
|
27
|
+
const DOORS = {
|
|
28
|
+
infrared: 'react-cheminfo/ir',
|
|
29
|
+
raman: 'react-cheminfo/raman',
|
|
30
|
+
};
|
|
18
31
|
const dialogStyle = { width: 'min(680px, 92vw)' };
|
|
19
32
|
const brandStyle = {
|
|
20
33
|
display: 'flex',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IrAboutDialog.js","sourceRoot":"","sources":["../../../src/ir/ui/IrAboutDialog.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEvD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"IrAboutDialog.js","sourceRoot":"","sources":["../../../src/ir/ui/IrAboutDialog.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEvD,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAyB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAGnD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAc,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAe3C;;;;;;;;;GASG;AACH,MAAM,UAAU,aAAa,CAAC,KAAyB;IACrD,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,GAAG,UAAU,EAAE,GAAG,KAAK,CAAC;IAC1D,MAAM,CAAC,GAAG,UAAU,EAAE,CAAC;IACvB,MAAM,KAAK,GAAG,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC;SACtE,KAAK,CAAC;IACT,MAAM,KAAK,GAAG,SAAS,KAAK,OAAO,CAAC;IAEpC,OAAO,CACL,KAAC,MAAM,IACL,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,KAAC,MAAM,IAAC,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,SAAS,GAAI,EAChD,KAAK,EAAE,WAAW,YAElB,MAAC,UAAU,eACT,eAAK,KAAK,EAAE,UAAU,aACpB,KA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G,EAAE,EAAE;CACC,CAAC;AAEX,MAAM,SAAS,GAAG;IAChB,MAAM,EAAE,SAAS;IACjB,UAAU,EAAE,GAAG;IACf,QAAQ,EAAE,EAAE;CACJ,CAAC;AAEX,MAAM,cAAc,GAAG,EAAE,MAAM,EAAE,SAAS,EAAW,CAAC;AAEtD,MAAM,YAAY,GAAG,EAAE,MAAM,EAAE,YAAY,EAAW,CAAC;AAEvD,MAAM,SAAS,GAAG,EAAE,MAAM,EAAE,CAAC,EAAE,WAAW,EAAE,EAAE,EAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IrCanvas.d.ts","sourceRoot":"","sources":["../../../src/ir/ui/IrCanvas.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAOhD,MAAM,WAAW,aAAa;IAC5B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC5C;;;;;OAKG;IACH,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI,KAAK,IAAI,CAAC;IACvD;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,+
|
|
1
|
+
{"version":3,"file":"IrCanvas.d.ts","sourceRoot":"","sources":["../../../src/ir/ui/IrCanvas.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAOhD,MAAM,WAAW,aAAa;IAC5B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC5C;;;;;OAKG;IACH,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI,KAAK,IAAI,CAAC;IACvD;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,+BAmC5C"}
|
package/lib/ir/ui/IrCanvas.js
CHANGED
|
@@ -23,11 +23,11 @@ export function IrCanvas(props) {
|
|
|
23
23
|
const { state, visibleSpectra, assigned } = useIrEditorState();
|
|
24
24
|
const actions = useIrActions();
|
|
25
25
|
const { domain, tool, selectedId } = state.view;
|
|
26
|
-
const { mode, showAssignments, labelLimit } = state.settings;
|
|
26
|
+
const { technique, mode, showAssignments, labelLimit } = state.settings;
|
|
27
27
|
const onDomainChange = useCallback((next) => {
|
|
28
28
|
actions.setDomain(next);
|
|
29
29
|
}, [actions]);
|
|
30
|
-
return (_jsxs("div", { style: rootStyle, children: [_jsx("div", { ref: attachChart, id: chartId, style: chartStyle, children: _jsx(IrChart, { spectra: visibleSpectra, mode: mode, assigned: assigned, showAssignments: showAssignments, labelLimit: labelLimit, highlight: highlight, onHighlight: onHighlight, domain: domain, onDomainChange: onDomainChange, drag: tool === 'box' ? 'box' : 'xAxis', emphasisedId: selectedId }) }), _jsx(IrStatusBar, {})] }));
|
|
30
|
+
return (_jsxs("div", { style: rootStyle, children: [_jsx("div", { ref: attachChart, id: chartId, style: chartStyle, children: _jsx(IrChart, { spectra: visibleSpectra, technique: technique, mode: mode, assigned: assigned, showAssignments: showAssignments, labelLimit: labelLimit, highlight: highlight, onHighlight: onHighlight, domain: domain, onDomainChange: onDomainChange, drag: tool === 'box' ? 'box' : 'xAxis', emphasisedId: selectedId }) }), _jsx(IrStatusBar, {})] }));
|
|
31
31
|
}
|
|
32
32
|
const rootStyle = {
|
|
33
33
|
display: 'flex',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IrCanvas.js","sourceRoot":"","sources":["../../../src/ir/ui/IrCanvas.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAKpC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAe,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAmB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AA6BrE;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAoB;IAC3C,MAAM,EAAE,SAAS,GAAG,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IACtE,MAAM,EAAE,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,GAAG,gBAAgB,EAAE,CAAC;IAC/D,MAAM,OAAO,GAAG,YAAY,EAAE,CAAC;IAC/B,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC,IAAI,CAAC;IAChD,MAAM,EAAE,IAAI,EAAE,eAAe,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"IrCanvas.js","sourceRoot":"","sources":["../../../src/ir/ui/IrCanvas.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAKpC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAe,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAmB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AA6BrE;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAoB;IAC3C,MAAM,EAAE,SAAS,GAAG,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IAC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AAS,EAAE,CAAC,EAAW,CAAC"}
|
package/lib/ir/ui/IrChart.d.ts
CHANGED
|
@@ -9,7 +9,8 @@ import type { IrChartProps } from './irChartProps.ts';
|
|
|
9
9
|
* building the scale onto a reversed pixel range and nothing else: the data stays
|
|
10
10
|
* in ascending wavenumbers, every window stays low end first, and no other piece
|
|
11
11
|
* of arithmetic in either package has to know. That is the whole reason
|
|
12
|
-
* `createScale` takes its range rather than deriving it.
|
|
12
|
+
* `createScale` takes its range rather than deriving it. A Raman spectrum is
|
|
13
|
+
* drawn the other way, low shifts at the left, by the same means.
|
|
13
14
|
*
|
|
14
15
|
* The axes go under the data, so a grid line is never read as a band. Only the
|
|
15
16
|
* data band is clipped, so a zoomed trace stops at the plot edge while the
|