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
|
@@ -1,17 +1,27 @@
|
|
|
1
1
|
import { Dialog, DialogBody } from '@blueprintjs/core';
|
|
2
2
|
|
|
3
|
+
import { Prose } from '../../i18n/ui/Prose.tsx';
|
|
4
|
+
import { useChromeT } from '../../i18n/ui/useT.ts';
|
|
3
5
|
import { TOKEN } from '../../tokens/core/familyTokens.ts';
|
|
4
6
|
import type { IrCommand, IrCommandId } from '../core/irCommands.ts';
|
|
5
|
-
import { irCommands } from '../core/irCommands.ts';
|
|
6
7
|
import { IR_MODE_RULES } from '../core/irMode.ts';
|
|
8
|
+
import type { IrTechnique } from '../core/irTechnique.ts';
|
|
9
|
+
import { irCommandsFor } from '../core/irTechniqueCommands.ts';
|
|
7
10
|
|
|
8
11
|
import { IrLogo } from './IrLogo.tsx';
|
|
12
|
+
import { useIrText } from './useIrText.ts';
|
|
9
13
|
|
|
10
14
|
export interface IrDocumentationDialogProps {
|
|
11
15
|
/** Whether the dialog is open. */
|
|
12
16
|
isOpen: boolean;
|
|
13
17
|
/** Close it. */
|
|
14
18
|
onClose: () => void;
|
|
19
|
+
/**
|
|
20
|
+
* What the spectra were measured with, which decides what the guide says:
|
|
21
|
+
* only what is true of the technique, and only the commands it offers.
|
|
22
|
+
* @default 'infrared'
|
|
23
|
+
*/
|
|
24
|
+
technique?: IrTechnique;
|
|
15
25
|
}
|
|
16
26
|
|
|
17
27
|
/**
|
|
@@ -19,73 +29,36 @@ export interface IrDocumentationDialogProps {
|
|
|
19
29
|
*
|
|
20
30
|
* In the component rather than on a site, so there is nowhere to leave for and
|
|
21
31
|
* nothing to keep in step: every key in the table below is read out of the same
|
|
22
|
-
*
|
|
32
|
+
* command table the toolbar and the key handler read, so a shortcut cannot be
|
|
23
33
|
* documented as one thing and bound as another.
|
|
24
34
|
* @param props - Component props.
|
|
25
35
|
* @returns The dialog.
|
|
26
36
|
*/
|
|
27
37
|
export function IrDocumentationDialog(props: IrDocumentationDialogProps) {
|
|
28
|
-
const { isOpen, onClose } = props;
|
|
38
|
+
const { isOpen, onClose, technique = 'infrared' } = props;
|
|
39
|
+
const text = useIrText(technique);
|
|
40
|
+
const ids = Object.keys(irCommandsFor(technique)) as IrCommandId[];
|
|
29
41
|
|
|
30
42
|
return (
|
|
31
43
|
<Dialog
|
|
32
44
|
isOpen={isOpen}
|
|
33
45
|
onClose={onClose}
|
|
34
|
-
title=
|
|
35
|
-
icon={<IrLogo size={20} />}
|
|
46
|
+
title={text.documentation}
|
|
47
|
+
icon={<IrLogo size={20} technique={technique} />}
|
|
36
48
|
style={dialogStyle}
|
|
37
49
|
>
|
|
38
50
|
<DialogBody>
|
|
39
|
-
<
|
|
40
|
-
<p style={paragraphStyle}>
|
|
41
|
-
JCAMP-DX (<code>.jdx</code>, <code>.dx</code>) and Thermo Galactic SPC
|
|
42
|
-
(<code>.spc</code>) are read. A file holding several blocks — a sample
|
|
43
|
-
beside its background, or an infrared spectrum beside a Raman one —
|
|
44
|
-
gives one spectrum per infrared block; the others are left to their
|
|
45
|
-
own viewers. Two columns of numbers are not read yet.
|
|
46
|
-
</p>
|
|
47
|
-
|
|
48
|
-
<h4 style={headingStyle}>The axis runs backwards</h4>
|
|
49
|
-
<p style={paragraphStyle}>
|
|
50
|
-
Wavenumber decreases to the right, from 4000 cm⁻¹ down to 400, which
|
|
51
|
-
is how infrared spectra have been printed since the instruments
|
|
52
|
-
scanned that way. Every window is still stated low end first.
|
|
53
|
-
</p>
|
|
54
|
-
|
|
55
|
-
<h4 style={headingStyle}>Absorbance or transmittance</h4>
|
|
56
|
-
<p style={paragraphStyle}>
|
|
57
|
-
The same measurement, read the other way up — the file carries both,
|
|
58
|
-
whichever it was written in. In{' '}
|
|
59
|
-
<strong>{IR_MODE_RULES.transmittance.title}</strong> the bands hang
|
|
60
|
-
down from a baseline near 100; in{' '}
|
|
61
|
-
<strong>{IR_MODE_RULES.absorbance.title}</strong> they stand up out of
|
|
62
|
-
zero. The labels and the marks follow, so the pair reads the same way
|
|
63
|
-
up in either.
|
|
64
|
-
</p>
|
|
65
|
-
|
|
66
|
-
<h4 style={headingStyle}>Reading the bands</h4>
|
|
67
|
-
<p style={paragraphStyle}>
|
|
68
|
-
The bands of the <em>selected</em> spectrum are picked, marked on the
|
|
69
|
-
chart, and listed in the bands panel with{' '}
|
|
70
|
-
<strong>every vibration whose range contains them</strong> — narrowest
|
|
71
|
-
claim first. That is deliberate: a band at 1715 cm⁻¹ really is a
|
|
72
|
-
ketone, an aldehyde and a carboxylic acid until something else decides
|
|
73
|
-
between them, and the note on each candidate is what tells them apart.
|
|
74
|
-
Hovering a row marks the band on the chart, and hovering the chart
|
|
75
|
-
lights the row.
|
|
76
|
-
</p>
|
|
77
|
-
<p style={paragraphStyle}>
|
|
78
|
-
A band is reported at the sampled point it peaked on, so on a 4 cm⁻¹
|
|
79
|
-
grid a carbonyl centred at 1710 reads 1708 or 1712. Do not quote one
|
|
80
|
-
as though it were measured to the wavenumber.
|
|
81
|
-
</p>
|
|
51
|
+
{technique === 'raman' ? <RamanGuide /> : <InfraredGuide />}
|
|
82
52
|
|
|
83
53
|
<h4 style={headingStyle}>Gestures and keys</h4>
|
|
84
54
|
<table style={tableStyle}>
|
|
85
55
|
<tbody>
|
|
86
|
-
{
|
|
87
|
-
|
|
88
|
-
|
|
56
|
+
{ids.map((id) => {
|
|
57
|
+
const entry = text.command(id);
|
|
58
|
+
return entry === undefined ? null : (
|
|
59
|
+
<CommandRow key={id} entry={entry} />
|
|
60
|
+
);
|
|
61
|
+
})}
|
|
89
62
|
</tbody>
|
|
90
63
|
</table>
|
|
91
64
|
</DialogBody>
|
|
@@ -93,9 +66,81 @@ export function IrDocumentationDialog(props: IrDocumentationDialogProps) {
|
|
|
93
66
|
);
|
|
94
67
|
}
|
|
95
68
|
|
|
69
|
+
/**
|
|
70
|
+
* What is true of reading an infrared spectrum here.
|
|
71
|
+
* @returns The sections.
|
|
72
|
+
*/
|
|
73
|
+
function InfraredGuide() {
|
|
74
|
+
return (
|
|
75
|
+
<>
|
|
76
|
+
<h4 style={headingStyle}>Opening a spectrum</h4>
|
|
77
|
+
<p style={paragraphStyle}>
|
|
78
|
+
JCAMP-DX (<code>.jdx</code>, <code>.dx</code>) and Thermo Galactic SPC (
|
|
79
|
+
<code>.spc</code>) are read. A file holding several blocks — a sample
|
|
80
|
+
beside its background, or an infrared spectrum beside a Raman one —
|
|
81
|
+
gives one spectrum per infrared block; the others are left to their own
|
|
82
|
+
viewers. Two columns of numbers are not read yet.
|
|
83
|
+
</p>
|
|
84
|
+
|
|
85
|
+
<h4 style={headingStyle}>The axis runs backwards</h4>
|
|
86
|
+
<p style={paragraphStyle}>
|
|
87
|
+
Wavenumber decreases to the right, from 4000 cm⁻¹ down to 400, which is
|
|
88
|
+
how infrared spectra have been printed since the instruments scanned
|
|
89
|
+
that way. Every window is still stated low end first.
|
|
90
|
+
</p>
|
|
91
|
+
|
|
92
|
+
<h4 style={headingStyle}>Absorbance or transmittance</h4>
|
|
93
|
+
<p style={paragraphStyle}>
|
|
94
|
+
The same measurement, read the other way up — the file carries both,
|
|
95
|
+
whichever it was written in. In{' '}
|
|
96
|
+
<strong>{IR_MODE_RULES.transmittance.title}</strong> the bands hang down
|
|
97
|
+
from a baseline near 100; in{' '}
|
|
98
|
+
<strong>{IR_MODE_RULES.absorbance.title}</strong> they stand up out of
|
|
99
|
+
zero. The labels and the marks follow, so the pair reads the same way up
|
|
100
|
+
in either.
|
|
101
|
+
</p>
|
|
102
|
+
|
|
103
|
+
<h4 style={headingStyle}>Reading the bands</h4>
|
|
104
|
+
<p style={paragraphStyle}>
|
|
105
|
+
The bands of the <em>selected</em> spectrum are picked, marked on the
|
|
106
|
+
chart, and listed in the bands panel with{' '}
|
|
107
|
+
<strong>every vibration whose range contains them</strong> — narrowest
|
|
108
|
+
claim first. That is deliberate: a band at 1715 cm⁻¹ really is a ketone,
|
|
109
|
+
an aldehyde and a carboxylic acid until something else decides between
|
|
110
|
+
them, and the note on each candidate is what tells them apart. Hovering
|
|
111
|
+
a row marks the band on the chart, and hovering the chart lights the
|
|
112
|
+
row.
|
|
113
|
+
</p>
|
|
114
|
+
<p style={paragraphStyle}>
|
|
115
|
+
A band is reported at the sampled point it peaked on, so on a 4 cm⁻¹
|
|
116
|
+
grid a carbonyl centred at 1710 reads 1708 or 1712. Do not quote one as
|
|
117
|
+
though it were measured to the wavenumber.
|
|
118
|
+
</p>
|
|
119
|
+
</>
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* What is true of reading a Raman spectrum here: only the bands, since it has
|
|
125
|
+
* one value axis, runs the usual way, and is not assigned.
|
|
126
|
+
* @returns The section.
|
|
127
|
+
*/
|
|
128
|
+
function RamanGuide() {
|
|
129
|
+
const t = useChromeT();
|
|
130
|
+
return (
|
|
131
|
+
<>
|
|
132
|
+
<h4 style={headingStyle}>Reading the bands</h4>
|
|
133
|
+
<p style={paragraphStyle}>
|
|
134
|
+
<Prose text={t('ir.raman.doc.bands')} />
|
|
135
|
+
</p>
|
|
136
|
+
<p style={paragraphStyle}>{t('ir.raman.doc.sampled')}</p>
|
|
137
|
+
</>
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
|
|
96
141
|
interface CommandRowProps {
|
|
97
|
-
/**
|
|
98
|
-
|
|
142
|
+
/** The command, as the viewer words it. */
|
|
143
|
+
entry: IrCommand;
|
|
99
144
|
}
|
|
100
145
|
|
|
101
146
|
/**
|
|
@@ -104,8 +149,7 @@ interface CommandRowProps {
|
|
|
104
149
|
* @returns The row.
|
|
105
150
|
*/
|
|
106
151
|
function CommandRow(props: CommandRowProps) {
|
|
107
|
-
const {
|
|
108
|
-
const entry = irCommands[id] as IrCommand;
|
|
152
|
+
const { entry } = props;
|
|
109
153
|
const keys = entry.shortcut?.label ?? entry.shortcut?.keys;
|
|
110
154
|
|
|
111
155
|
return (
|
package/src/ir/ui/IrEditor.tsx
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import type { Ref } from 'react';
|
|
2
|
-
import { RootLayout } from 'react-science/ui';
|
|
3
2
|
|
|
4
3
|
import type { IrEditorHandle } from '../core/irEditorApi.ts';
|
|
5
4
|
import type { IrSidePanelId } from '../core/irSidePanels.ts';
|
|
6
5
|
import type { IrMode, IrSpectrum } from '../core/irSpectrum.ts';
|
|
7
6
|
|
|
8
|
-
import {
|
|
9
|
-
import { IrStateProvider } from './IrStateProvider.tsx';
|
|
10
|
-
import { useIrEditor } from './useIrEditor.ts';
|
|
7
|
+
import { VibrationalEditor } from './VibrationalEditor.tsx';
|
|
11
8
|
|
|
12
9
|
export interface IrEditorProps {
|
|
13
10
|
/**
|
|
@@ -29,7 +26,8 @@ export interface IrEditorProps {
|
|
|
29
26
|
*/
|
|
30
27
|
onChange?: (spectra: IrSpectrum[]) => void;
|
|
31
28
|
/**
|
|
32
|
-
* Which value axis to open in.
|
|
29
|
+
* Which value axis to open in: transmittance or absorbance. Intensity, which
|
|
30
|
+
* infrared does not offer, opens transmittance instead.
|
|
33
31
|
* @default 'transmittance'
|
|
34
32
|
*/
|
|
35
33
|
mode?: IrMode;
|
|
@@ -49,6 +47,7 @@ export interface IrEditorProps {
|
|
|
49
47
|
/**
|
|
50
48
|
* An infrared spectrum viewer: a header across the top, the chart in the middle,
|
|
51
49
|
* the tools down the left, and the panels that interrogate it down the right.
|
|
50
|
+
* `RamanEditor`, from `react-cheminfo/raman`, is the same viewer for Raman.
|
|
52
51
|
*
|
|
53
52
|
* The same shape as the mass viewer, deliberately — a page may well hold both,
|
|
54
53
|
* and a chemist who has learned one should not have to learn the other. The chart
|
|
@@ -65,35 +64,5 @@ export interface IrEditorProps {
|
|
|
65
64
|
* @returns The viewer.
|
|
66
65
|
*/
|
|
67
66
|
export function IrEditor(props: IrEditorProps) {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
const editor = useIrEditor({
|
|
71
|
-
spectra: data,
|
|
72
|
-
settings: mode === undefined ? undefined : { mode },
|
|
73
|
-
panelIds: defaultPanelIds,
|
|
74
|
-
onChange,
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
return (
|
|
78
|
-
<IrStateProvider editor={editor}>
|
|
79
|
-
{/* `react-science`'s own root: it holds the element the browser is asked
|
|
80
|
-
to show full screen, points Blueprint's portals at that element so
|
|
81
|
-
dialogs and tooltips are not left behind in `document.body`, and paints
|
|
82
|
-
the backdrop white. Above the shell rather than inside it, so the shell
|
|
83
|
-
can ask whether it is full screen and offer the way out. */}
|
|
84
|
-
<RootLayout style={rootLayoutStyle}>
|
|
85
|
-
<IrShell handle={ref} />
|
|
86
|
-
</RootLayout>
|
|
87
|
-
</IrStateProvider>
|
|
88
|
-
);
|
|
67
|
+
return <VibrationalEditor technique="infrared" {...props} />;
|
|
89
68
|
}
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* The viewer fills what it is given, and its own children scroll rather than
|
|
93
|
-
* push: `react-science` lays its root out as a column of full width and height,
|
|
94
|
-
* and a flex column with no `minHeight` grows past its parent instead.
|
|
95
|
-
*/
|
|
96
|
-
const rootLayoutStyle = { minHeight: 0 } as const;
|
|
97
|
-
|
|
98
|
-
/** What a viewer opens on when it is handed nothing, kept stable for the memo. */
|
|
99
|
-
const NO_SPECTRA: IrSpectrum[] = [];
|
package/src/ir/ui/IrHeader.tsx
CHANGED
|
@@ -2,6 +2,8 @@ import { Header, Toolbar, useFullscreen } from 'react-science/ui';
|
|
|
2
2
|
|
|
3
3
|
import { IrLogo } from './IrLogo.tsx';
|
|
4
4
|
import { useIrCommandProps } from './irCommandContext.tsx';
|
|
5
|
+
import { useIrEditorState } from './irStateContext.ts';
|
|
6
|
+
import { useIrText } from './useIrText.ts';
|
|
5
7
|
|
|
6
8
|
/**
|
|
7
9
|
* The bar across the top: the mark on the left, the viewer on the right.
|
|
@@ -17,13 +19,18 @@ import { useIrCommandProps } from './irCommandContext.tsx';
|
|
|
17
19
|
export function IrHeader() {
|
|
18
20
|
const command = useIrCommandProps();
|
|
19
21
|
const { isFullScreen } = useFullscreen();
|
|
22
|
+
const { technique } = useIrEditorState().state.settings;
|
|
23
|
+
const text = useIrText(technique);
|
|
20
24
|
|
|
21
25
|
return (
|
|
22
26
|
<Header>
|
|
23
|
-
<Toolbar aria-label=
|
|
24
|
-
<Toolbar.Item
|
|
27
|
+
<Toolbar aria-label={text.viewer}>
|
|
28
|
+
<Toolbar.Item
|
|
29
|
+
icon={<IrLogo size={16} technique={technique} />}
|
|
30
|
+
{...command('about')}
|
|
31
|
+
/>
|
|
25
32
|
</Toolbar>
|
|
26
|
-
<Toolbar aria-label=
|
|
33
|
+
<Toolbar aria-label={text.viewerHelp}>
|
|
27
34
|
<Toolbar.Item icon="help" {...command('documentation')} />
|
|
28
35
|
{/* Always the last thing in the bar, hard against the right edge: the
|
|
29
36
|
corner a window is made bigger from is the corner it is looked for
|
package/src/ir/ui/IrLogo.tsx
CHANGED
|
@@ -1,24 +1,37 @@
|
|
|
1
|
+
import type { IrTechnique } from '../core/irTechnique.ts';
|
|
2
|
+
|
|
3
|
+
import { useIrText } from './useIrText.ts';
|
|
4
|
+
|
|
1
5
|
export interface IrLogoProps {
|
|
2
6
|
/**
|
|
3
7
|
* How big to draw it, in pixels.
|
|
4
8
|
* @default 16
|
|
5
9
|
*/
|
|
6
10
|
size?: number;
|
|
11
|
+
/**
|
|
12
|
+
* What the spectra were measured with, which decides which way the bands
|
|
13
|
+
* point.
|
|
14
|
+
* @default 'infrared'
|
|
15
|
+
*/
|
|
16
|
+
technique?: IrTechnique;
|
|
7
17
|
}
|
|
8
18
|
|
|
9
19
|
/**
|
|
10
|
-
* The viewer's mark: three bands
|
|
20
|
+
* The viewer's mark: three bands meeting a baseline.
|
|
11
21
|
*
|
|
12
22
|
* Drawn from the domain's own primitives rather than being a picture of a chart —
|
|
13
23
|
* a transmittance baseline near the top with a strong band, a medium one and a
|
|
14
24
|
* weak one dropping out of it, which is what an infrared spectrum looks like at a
|
|
15
|
-
* glance and what nothing else looks like.
|
|
16
|
-
*
|
|
25
|
+
* glance and what nothing else looks like. A Raman spectrum's bands stand up from
|
|
26
|
+
* a baseline near the foot instead, so its mark is the same three bands rising.
|
|
27
|
+
* Three elements, because that is what survives 16 pixels.
|
|
17
28
|
* @param props - Component props.
|
|
18
29
|
* @returns The mark, as SVG.
|
|
19
30
|
*/
|
|
20
31
|
export function IrLogo(props: IrLogoProps) {
|
|
21
|
-
const { size = 16 } = props;
|
|
32
|
+
const { size = 16, technique = 'infrared' } = props;
|
|
33
|
+
const { mark } = useIrText(technique);
|
|
34
|
+
const { baseline, bands } = MARKS[technique];
|
|
22
35
|
|
|
23
36
|
return (
|
|
24
37
|
<svg
|
|
@@ -26,19 +39,19 @@ export function IrLogo(props: IrLogoProps) {
|
|
|
26
39
|
height={size}
|
|
27
40
|
viewBox="0 0 16 16"
|
|
28
41
|
role="img"
|
|
29
|
-
aria-label=
|
|
42
|
+
aria-label={mark}
|
|
30
43
|
>
|
|
31
|
-
{/* The baseline
|
|
44
|
+
{/* The baseline: high up where 100 % transmittance runs, low for Raman. */}
|
|
32
45
|
<path
|
|
33
|
-
d=
|
|
46
|
+
d={baseline}
|
|
34
47
|
fill="none"
|
|
35
48
|
stroke="#94a3b8"
|
|
36
49
|
strokeWidth={1}
|
|
37
50
|
strokeLinecap="round"
|
|
38
51
|
/>
|
|
39
|
-
{/* Three bands
|
|
52
|
+
{/* Three bands meeting it, strong, medium, weak. */}
|
|
40
53
|
<path
|
|
41
|
-
d=
|
|
54
|
+
d={bands}
|
|
42
55
|
fill="none"
|
|
43
56
|
stroke="#0072b2"
|
|
44
57
|
strokeWidth={2}
|
|
@@ -47,3 +60,9 @@ export function IrLogo(props: IrLogoProps) {
|
|
|
47
60
|
</svg>
|
|
48
61
|
);
|
|
49
62
|
}
|
|
63
|
+
|
|
64
|
+
/** The two strokes of each technique's mark. */
|
|
65
|
+
const MARKS: Record<IrTechnique, { baseline: string; bands: string }> = {
|
|
66
|
+
infrared: { baseline: 'M1 3H15', bands: 'M3 3V13M8 3V8.5M12.5 3V6' },
|
|
67
|
+
raman: { baseline: 'M1 13H15', bands: 'M3 13V3M8 13V7.5M12.5 13V10' },
|
|
68
|
+
};
|
package/src/ir/ui/IrShell.tsx
CHANGED
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import type { Ref } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
useCallback,
|
|
4
|
-
useId,
|
|
5
|
-
useImperativeHandle,
|
|
6
|
-
useMemo,
|
|
7
|
-
useState,
|
|
8
|
-
} from 'react';
|
|
2
|
+
import { useId, useMemo, useState } from 'react';
|
|
9
3
|
import { SplitPane, useFullscreen } from 'react-science/ui';
|
|
10
4
|
|
|
11
5
|
import { sanitizeFileName } from '../../download/core/sanitizeFileName.ts';
|
|
@@ -13,12 +7,12 @@ import { useFigureDownload } from '../../download/ui/useFigureDownload.tsx';
|
|
|
13
7
|
import { PanelRail } from '../../panel/ui/PanelRail.tsx';
|
|
14
8
|
import type { IrBand } from '../core/irBand.ts';
|
|
15
9
|
import type { IrCommandHandlers } from '../core/irCommands.ts';
|
|
16
|
-
import {
|
|
17
|
-
import
|
|
18
|
-
import { otherIrMode, yAxisRules } from '../core/irMode.ts';
|
|
10
|
+
import type { IrEditorHandle } from '../core/irEditorApi.ts';
|
|
11
|
+
import { otherIrMode } from '../core/irMode.ts';
|
|
19
12
|
import { irSidePanels } from '../core/irSidePanels.ts';
|
|
20
|
-
import type {
|
|
13
|
+
import type { IrSpectrum } from '../core/irSpectrum.ts';
|
|
21
14
|
import { DEFAULT_SIDE_PANEL } from '../core/irState.ts';
|
|
15
|
+
import { irCommandOffered } from '../core/irTechniqueCommands.ts';
|
|
22
16
|
|
|
23
17
|
import { IrAboutDialog } from './IrAboutDialog.tsx';
|
|
24
18
|
import { IrCanvas } from './IrCanvas.tsx';
|
|
@@ -28,7 +22,9 @@ import { IrHeader } from './IrHeader.tsx';
|
|
|
28
22
|
import { IrSidePanel } from './IrSidePanel.tsx';
|
|
29
23
|
import { IrToolbar } from './IrToolbar.tsx';
|
|
30
24
|
import { useIrActions, useIrEditorState } from './irStateContext.ts';
|
|
25
|
+
import { useIrHandle } from './useIrHandle.ts';
|
|
31
26
|
import { useIrShortcuts } from './useIrShortcuts.ts';
|
|
27
|
+
import { useValueAxisZoom } from './useValueAxisZoom.ts';
|
|
32
28
|
|
|
33
29
|
export interface IrShellProps {
|
|
34
30
|
/**
|
|
@@ -58,8 +54,8 @@ export function IrShell(props: IrShellProps) {
|
|
|
58
54
|
const { state, visibleSpectra, selectedSpectrum } = useIrEditorState();
|
|
59
55
|
const actions = useIrActions();
|
|
60
56
|
const { toggle: toggleFullScreen } = useFullscreen();
|
|
61
|
-
const { openPanelIds, tool
|
|
62
|
-
const { mode, pickBands, showAssignments } = state.settings;
|
|
57
|
+
const { openPanelIds, tool } = state.view;
|
|
58
|
+
const { mode, pickBands, showAssignments, technique } = state.settings;
|
|
63
59
|
|
|
64
60
|
const [isAboutOpen, setIsAboutOpen] = useState(false);
|
|
65
61
|
const [isDocumentationOpen, setIsDocumentationOpen] = useState(false);
|
|
@@ -79,27 +75,7 @@ export function IrShell(props: IrShellProps) {
|
|
|
79
75
|
// times a second.
|
|
80
76
|
const [highlight, setHighlight] = useState<IrBand | null>(null);
|
|
81
77
|
|
|
82
|
-
|
|
83
|
-
* ChartScale the value axis by a factor, about the baseline the mode hangs from.
|
|
84
|
-
* @param factor - Above one to zoom out.
|
|
85
|
-
*/
|
|
86
|
-
const scaleValueAxis = useCallback(
|
|
87
|
-
(factor: number) => {
|
|
88
|
-
const shown = domain ?? fullDomain(visibleSpectra, mode);
|
|
89
|
-
// Asked of the mode rather than written out again here: the baseline a
|
|
90
|
-
// value axis is scaled about is `irMode`'s to know, and a second copy of
|
|
91
|
-
// it is a second thing to get wrong.
|
|
92
|
-
const { baseline = 0 } = yAxisRules(mode);
|
|
93
|
-
actions.setDomain({
|
|
94
|
-
x: shown.x,
|
|
95
|
-
y: [
|
|
96
|
-
baseline + (shown.y[0] - baseline) * factor,
|
|
97
|
-
baseline + (shown.y[1] - baseline) * factor,
|
|
98
|
-
],
|
|
99
|
-
});
|
|
100
|
-
},
|
|
101
|
-
[actions, domain, visibleSpectra, mode],
|
|
102
|
-
);
|
|
78
|
+
const { zoomIn, zoomOut } = useValueAxisZoom();
|
|
103
79
|
|
|
104
80
|
const commands = useMemo<IrCommandHandlers>(
|
|
105
81
|
() => ({
|
|
@@ -108,13 +84,18 @@ export function IrShell(props: IrShellProps) {
|
|
|
108
84
|
fullScreen: toggleFullScreen,
|
|
109
85
|
readTool: () => actions.setTool('read'),
|
|
110
86
|
boxTool: () => actions.setTool(tool === 'box' ? 'read' : 'box'),
|
|
111
|
-
zoomIn
|
|
112
|
-
zoomOut
|
|
87
|
+
zoomIn,
|
|
88
|
+
zoomOut,
|
|
113
89
|
resetZoom: () => actions.resetDomain(),
|
|
114
|
-
|
|
90
|
+
// A command the technique does not offer has no handler, so its key
|
|
91
|
+
// stays with the page.
|
|
92
|
+
toggleMode: irCommandOffered(technique, 'toggleMode')
|
|
93
|
+
? () => actions.setSettings({ mode: otherIrMode(mode, technique) })
|
|
94
|
+
: undefined,
|
|
115
95
|
togglePicking: () => actions.setSettings({ pickBands: !pickBands }),
|
|
116
|
-
toggleAssignments: ()
|
|
117
|
-
actions.setSettings({ showAssignments: !showAssignments })
|
|
96
|
+
toggleAssignments: irCommandOffered(technique, 'toggleAssignments')
|
|
97
|
+
? () => actions.setSettings({ showAssignments: !showAssignments })
|
|
98
|
+
: undefined,
|
|
118
99
|
exportImage: () => setFigureOpen(!isFigureOpen),
|
|
119
100
|
clear: () => actions.clear(),
|
|
120
101
|
}),
|
|
@@ -122,9 +103,11 @@ export function IrShell(props: IrShellProps) {
|
|
|
122
103
|
actions,
|
|
123
104
|
tool,
|
|
124
105
|
mode,
|
|
106
|
+
technique,
|
|
125
107
|
pickBands,
|
|
126
108
|
showAssignments,
|
|
127
|
-
|
|
109
|
+
zoomIn,
|
|
110
|
+
zoomOut,
|
|
128
111
|
toggleFullScreen,
|
|
129
112
|
isFigureOpen,
|
|
130
113
|
setFigureOpen,
|
|
@@ -137,28 +120,7 @@ export function IrShell(props: IrShellProps) {
|
|
|
137
120
|
// again.
|
|
138
121
|
const [root, setRoot] = useState<HTMLElement | null>(null);
|
|
139
122
|
useIrShortcuts(root, commands);
|
|
140
|
-
|
|
141
|
-
useImperativeHandle(
|
|
142
|
-
handle,
|
|
143
|
-
(): IrEditorHandle => ({
|
|
144
|
-
getSpectra: () => state.data.spectra,
|
|
145
|
-
setSpectra: (spectra) => actions.setSpectra(spectra),
|
|
146
|
-
addSpectra: (spectra) => actions.addSpectra(spectra),
|
|
147
|
-
clear: () => actions.clear(),
|
|
148
|
-
setDomain: (next) => actions.setDomain(next),
|
|
149
|
-
resetDomain: () => actions.resetDomain(),
|
|
150
|
-
zoomToWavenumber: (wavenumber, options: ZoomToBandOptions = {}) => {
|
|
151
|
-
const { width = DEFAULT_FRAME_WIDTH } = options;
|
|
152
|
-
const shown: IrDomain = domain ?? fullDomain(visibleSpectra, mode);
|
|
153
|
-
actions.setDomain({
|
|
154
|
-
x: [wavenumber - width / 2, wavenumber + width / 2],
|
|
155
|
-
y: shown.y,
|
|
156
|
-
});
|
|
157
|
-
},
|
|
158
|
-
selectSpectrum: (id) => actions.selectSpectrum(id),
|
|
159
|
-
}),
|
|
160
|
-
[state.data.spectra, actions, domain, visibleSpectra, mode],
|
|
161
|
-
);
|
|
123
|
+
useIrHandle(handle);
|
|
162
124
|
|
|
163
125
|
/**
|
|
164
126
|
* Open or close the side, as the splitter is dragged shut and back open.
|
|
@@ -175,7 +137,7 @@ export function IrShell(props: IrShellProps) {
|
|
|
175
137
|
}
|
|
176
138
|
|
|
177
139
|
return (
|
|
178
|
-
<IrCommandProvider handlers={commands}>
|
|
140
|
+
<IrCommandProvider handlers={commands} technique={technique}>
|
|
179
141
|
{/* `tabIndex` so a click anywhere in the viewer makes this the target the
|
|
180
142
|
shortcuts are heard on: keys are delivered to whatever holds the caret,
|
|
181
143
|
and an SVG never does. */}
|
|
@@ -221,27 +183,17 @@ export function IrShell(props: IrShellProps) {
|
|
|
221
183
|
<IrAboutDialog
|
|
222
184
|
isOpen={isAboutOpen}
|
|
223
185
|
onClose={() => setIsAboutOpen(false)}
|
|
186
|
+
technique={technique}
|
|
224
187
|
/>
|
|
225
188
|
<IrDocumentationDialog
|
|
226
189
|
isOpen={isDocumentationOpen}
|
|
227
190
|
onClose={() => setIsDocumentationOpen(false)}
|
|
191
|
+
technique={technique}
|
|
228
192
|
/>
|
|
229
193
|
</IrCommandProvider>
|
|
230
194
|
);
|
|
231
195
|
}
|
|
232
196
|
|
|
233
|
-
/**
|
|
234
|
-
* What one press of zoom in or out is worth.
|
|
235
|
-
*
|
|
236
|
-
* A fifth, which is about what one notch of a mouse wheel does — so the button
|
|
237
|
-
* and the wheel feel like the same gesture at two speeds rather than two
|
|
238
|
-
* different ones.
|
|
239
|
-
*/
|
|
240
|
-
const ZOOM_STEP = 1.2;
|
|
241
|
-
|
|
242
|
-
/** How wide a window a host gets when it asks to frame a band without saying. */
|
|
243
|
-
const DEFAULT_FRAME_WIDTH = 200;
|
|
244
|
-
|
|
245
197
|
/**
|
|
246
198
|
* What a picture of the chart is called.
|
|
247
199
|
*
|
|
@@ -8,18 +8,21 @@ import {
|
|
|
8
8
|
statusSpacerStyle as spacerStyle,
|
|
9
9
|
} from '../../panel/core/statusBar.ts';
|
|
10
10
|
import { countAssigned } from '../core/assignBands.ts';
|
|
11
|
-
import {
|
|
12
|
-
import { boxZoomOnly
|
|
11
|
+
import { formatWavenumberRange } from '../core/irFormat.ts';
|
|
12
|
+
import { boxZoomOnly } from '../core/irMode.ts';
|
|
13
|
+
import { IR_TECHNIQUE_RULES } from '../core/irTechnique.ts';
|
|
13
14
|
|
|
14
15
|
import { useIrEditorState } from './irStateContext.ts';
|
|
16
|
+
import { useIrText } from './useIrText.ts';
|
|
15
17
|
|
|
16
18
|
/**
|
|
17
19
|
* The one line under the chart: what is drawn, what was found, what went wrong.
|
|
18
20
|
*
|
|
19
21
|
* Everything in it is derived, so it is the cheapest place in the viewer to
|
|
20
22
|
* answer "did that work" — how many spectra are drawn of those open, how many
|
|
21
|
-
* bands the picking found and how many the table had something to say about
|
|
22
|
-
* the range the selected spectrum
|
|
23
|
+
* bands the picking found and how many the table had something to say about
|
|
24
|
+
* (where the table covers the technique), and the range the selected spectrum
|
|
25
|
+
* covers, in the order its axis is read.
|
|
23
26
|
*
|
|
24
27
|
* The refusal is last and is the only red in the shell, so the eye that has just
|
|
25
28
|
* pressed something and seen nothing happen lands on the reason.
|
|
@@ -30,12 +33,14 @@ export function IrStatusBar() {
|
|
|
30
33
|
useIrEditorState();
|
|
31
34
|
const { spectra } = state.data;
|
|
32
35
|
const { error, tool } = state.view;
|
|
33
|
-
const { mode, pickBands } = state.settings;
|
|
36
|
+
const { mode, pickBands, technique } = state.settings;
|
|
37
|
+
const { reverseX, assignments } = IR_TECHNIQUE_RULES[technique];
|
|
38
|
+
const text = useIrText(technique);
|
|
34
39
|
|
|
35
40
|
const range =
|
|
36
|
-
selectedSpectrum === null
|
|
37
|
-
?
|
|
38
|
-
:
|
|
41
|
+
selectedSpectrum === null
|
|
42
|
+
? ''
|
|
43
|
+
: formatWavenumberRange(selectedSpectrum.wavenumber, reverseX);
|
|
39
44
|
|
|
40
45
|
return (
|
|
41
46
|
<div style={barStyle}>
|
|
@@ -45,7 +50,7 @@ export function IrStatusBar() {
|
|
|
45
50
|
: `${countLabel(visibleSpectra.length, 'spectrum', 'spectra')} drawn of ${spectra.length}`}
|
|
46
51
|
</span>
|
|
47
52
|
|
|
48
|
-
<span style={itemStyle}>{
|
|
53
|
+
<span style={itemStyle}>{text.yTitle(mode)}</span>
|
|
49
54
|
|
|
50
55
|
{selectedSpectrum === null ? null : (
|
|
51
56
|
<span style={nameStyle} title={selectedSpectrum.name}>
|
|
@@ -53,12 +58,12 @@ export function IrStatusBar() {
|
|
|
53
58
|
</span>
|
|
54
59
|
)}
|
|
55
60
|
|
|
56
|
-
{range ===
|
|
61
|
+
{range === '' ? null : <span style={mutedStyle}>{range}</span>}
|
|
57
62
|
|
|
58
63
|
{pickBands && assigned.length > 0 ? (
|
|
59
64
|
<span style={itemStyle}>
|
|
60
|
-
{countLabel(assigned.length, 'band', 'bands')}
|
|
61
|
-
{countAssigned(assigned)} assigned
|
|
65
|
+
{countLabel(assigned.length, 'band', 'bands')}
|
|
66
|
+
{assignments ? `, ${countAssigned(assigned)} assigned` : null}
|
|
62
67
|
</span>
|
|
63
68
|
) : null}
|
|
64
69
|
|