react-cheminfo 0.22.0 → 0.24.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 +51 -28
- package/lib/chrome/ui/HeaderToggle.d.ts +52 -0
- package/lib/chrome/ui/HeaderToggle.d.ts.map +1 -0
- package/lib/chrome/ui/HeaderToggle.js +31 -0
- package/lib/chrome/ui/HeaderToggle.js.map +1 -0
- package/lib/chrome/ui/index.d.ts +2 -0
- package/lib/chrome/ui/index.d.ts.map +1 -1
- package/lib/chrome/ui/index.js +1 -0
- package/lib/chrome/ui/index.js.map +1 -1
- package/lib/citation/core/gfn2Paper.d.ts +10 -0
- package/lib/citation/core/gfn2Paper.d.ts.map +1 -0
- package/lib/citation/core/gfn2Paper.js +28 -0
- package/lib/citation/core/gfn2Paper.js.map +1 -0
- package/lib/citation/core/index.d.ts +1 -0
- package/lib/citation/core/index.d.ts.map +1 -1
- package/lib/citation/core/index.js +1 -0
- package/lib/citation/core/index.js.map +1 -1
- package/lib/clipboard/ui/ClickToCopy.d.ts +8 -7
- package/lib/clipboard/ui/ClickToCopy.d.ts.map +1 -1
- package/lib/clipboard/ui/ClickToCopy.js +3 -3
- package/lib/clipboard/ui/ClickToCopy.js.map +1 -1
- package/lib/conformers.d.ts +27 -0
- package/lib/conformers.d.ts.map +1 -0
- package/lib/conformers.js +19 -0
- package/lib/conformers.js.map +1 -0
- package/lib/core.d.ts +1 -0
- package/lib/core.d.ts.map +1 -1
- package/lib/core.js +1 -0
- package/lib/core.js.map +1 -1
- package/lib/credits/core/credits.d.ts +12 -0
- package/lib/credits/core/credits.d.ts.map +1 -1
- package/lib/credits/core/credits.js +14 -0
- package/lib/credits/core/credits.js.map +1 -1
- package/lib/ecosystem/core/index.d.ts +1 -1
- package/lib/ecosystem/core/index.d.ts.map +1 -1
- package/lib/ecosystem/core/index.js.map +1 -1
- package/lib/ecosystem/core/sites.d.ts +11 -1
- package/lib/ecosystem/core/sites.d.ts.map +1 -1
- package/lib/ecosystem/core/sites.js +7 -2
- package/lib/ecosystem/core/sites.js.map +1 -1
- package/lib/ecosystem/ui/EcosystemLinks.d.ts.map +1 -1
- package/lib/ecosystem/ui/EcosystemLinks.js +3 -1
- package/lib/ecosystem/ui/EcosystemLinks.js.map +1 -1
- package/lib/ecosystem/ui/SiteTile.d.ts.map +1 -1
- package/lib/ecosystem/ui/SiteTile.js +3 -1
- package/lib/ecosystem/ui/SiteTile.js.map +1 -1
- package/lib/format/core/index.d.ts +1 -1
- package/lib/format/core/index.d.ts.map +1 -1
- package/lib/format/core/index.js +1 -1
- package/lib/format/core/index.js.map +1 -1
- package/lib/format/core/words.d.ts +9 -0
- package/lib/format/core/words.d.ts.map +1 -1
- package/lib/format/core/words.js +16 -0
- package/lib/format/core/words.js.map +1 -1
- package/lib/language/core/index.d.ts +3 -0
- package/lib/language/core/index.d.ts.map +1 -0
- package/lib/language/core/index.js +3 -0
- package/lib/language/core/index.js.map +1 -0
- package/lib/language/core/languageName.d.ts +8 -0
- package/lib/language/core/languageName.d.ts.map +1 -0
- package/lib/language/core/languageName.js +16 -0
- package/lib/language/core/languageName.js.map +1 -0
- package/lib/language/core/languageParam.d.ts +35 -0
- package/lib/language/core/languageParam.d.ts.map +1 -0
- package/lib/language/core/languageParam.js +67 -0
- package/lib/language/core/languageParam.js.map +1 -0
- package/lib/language/ui/SiteLanguage.d.ts +20 -0
- package/lib/language/ui/SiteLanguage.d.ts.map +1 -0
- package/lib/language/ui/SiteLanguage.js +14 -0
- package/lib/language/ui/SiteLanguage.js.map +1 -0
- package/lib/language/ui/index.d.ts +4 -0
- package/lib/language/ui/index.d.ts.map +1 -0
- package/lib/language/ui/index.js +3 -0
- package/lib/language/ui/index.js.map +1 -0
- package/lib/language/ui/siteLanguageContext.d.ts +12 -0
- package/lib/language/ui/siteLanguageContext.d.ts.map +1 -0
- package/lib/language/ui/siteLanguageContext.js +19 -0
- package/lib/language/ui/siteLanguageContext.js.map +1 -0
- package/lib/orbital/core/atomicOrbitals.d.ts +9 -1
- package/lib/orbital/core/atomicOrbitals.d.ts.map +1 -1
- package/lib/orbital/core/atomicOrbitals.js +7 -0
- package/lib/orbital/core/atomicOrbitals.js.map +1 -1
- package/lib/orbital/core/hydrogenic.d.ts +2 -1
- package/lib/orbital/core/hydrogenic.d.ts.map +1 -1
- package/lib/orbital/core/hydrogenic.js +2 -1
- package/lib/orbital/core/hydrogenic.js.map +1 -1
- package/lib/orbital/core/index.d.ts +1 -0
- package/lib/orbital/core/index.d.ts.map +1 -1
- package/lib/orbital/core/index.js +1 -0
- package/lib/orbital/core/index.js.map +1 -1
- package/lib/orbital/core/slaterEnergy.d.ts +35 -0
- package/lib/orbital/core/slaterEnergy.d.ts.map +1 -0
- package/lib/orbital/core/slaterEnergy.js +66 -0
- package/lib/orbital/core/slaterEnergy.js.map +1 -0
- package/lib/overlay/core/index.d.ts +2 -2
- package/lib/overlay/core/index.d.ts.map +1 -1
- package/lib/overlay/core/index.js +1 -1
- package/lib/overlay/core/index.js.map +1 -1
- package/lib/overlay/core/overlayMarks.d.ts +20 -5
- package/lib/overlay/core/overlayMarks.d.ts.map +1 -1
- package/lib/overlay/core/overlayMarks.js +31 -5
- package/lib/overlay/core/overlayMarks.js.map +1 -1
- package/lib/overlay/ui/OverlayLegendMark.js +5 -0
- package/lib/overlay/ui/OverlayLegendMark.js.map +1 -1
- package/lib/projection/core/index.d.ts +4 -4
- package/lib/projection/core/index.d.ts.map +1 -1
- package/lib/projection/core/index.js +2 -2
- package/lib/projection/core/index.js.map +1 -1
- package/lib/projection/core/projectionCopy.d.ts +2 -0
- package/lib/projection/core/projectionCopy.d.ts.map +1 -1
- package/lib/projection/core/projectionCopy.js +1 -0
- package/lib/projection/core/projectionCopy.js.map +1 -1
- package/lib/projection/core/projectionGroupings.d.ts +44 -0
- package/lib/projection/core/projectionGroupings.d.ts.map +1 -0
- package/lib/projection/core/projectionGroupings.js +132 -0
- package/lib/projection/core/projectionGroupings.js.map +1 -0
- package/lib/projection/core/projectionOptions.d.ts +16 -6
- package/lib/projection/core/projectionOptions.d.ts.map +1 -1
- package/lib/projection/core/projectionOptions.js +7 -1
- package/lib/projection/core/projectionOptions.js.map +1 -1
- package/lib/projection/core/projectionPanelWords.d.ts +6 -0
- package/lib/projection/core/projectionPanelWords.d.ts.map +1 -1
- package/lib/projection/core/projectionPanelWords.js +4 -0
- package/lib/projection/core/projectionPanelWords.js.map +1 -1
- package/lib/projection/core/projectionSamples.d.ts +63 -32
- package/lib/projection/core/projectionSamples.d.ts.map +1 -1
- package/lib/projection/core/projectionSamples.js +1 -80
- package/lib/projection/core/projectionSamples.js.map +1 -1
- package/lib/projection/core/projectionStrings.d.ts +2 -0
- package/lib/projection/core/projectionStrings.d.ts.map +1 -1
- package/lib/projection/core/projectionStrings.js +10 -1
- package/lib/projection/core/projectionStrings.js.map +1 -1
- package/lib/projection/core/resolveProjectionOptions.d.ts +8 -3
- package/lib/projection/core/resolveProjectionOptions.d.ts.map +1 -1
- package/lib/projection/core/resolveProjectionOptions.js +58 -5
- package/lib/projection/core/resolveProjectionOptions.js.map +1 -1
- package/lib/projection/ui/ProjectionBar.d.ts +1 -1
- package/lib/projection/ui/ProjectionBar.d.ts.map +1 -1
- package/lib/projection/ui/ProjectionBar.js +3 -1
- package/lib/projection/ui/ProjectionBar.js.map +1 -1
- package/lib/projection/ui/ProjectionGroupingPickers.d.ts +38 -0
- package/lib/projection/ui/ProjectionGroupingPickers.d.ts.map +1 -0
- package/lib/projection/ui/ProjectionGroupingPickers.js +33 -0
- package/lib/projection/ui/ProjectionGroupingPickers.js.map +1 -0
- package/lib/projection/ui/ProjectionMapControls.d.ts +6 -7
- package/lib/projection/ui/ProjectionMapControls.d.ts.map +1 -1
- package/lib/projection/ui/ProjectionMapControls.js +11 -9
- package/lib/projection/ui/ProjectionMapControls.js.map +1 -1
- package/lib/projection/ui/ProjectionMapLegend.d.ts.map +1 -1
- package/lib/projection/ui/ProjectionMapLegend.js +1 -1
- package/lib/projection/ui/ProjectionMapLegend.js.map +1 -1
- package/lib/projection/ui/ProjectionMapMore.d.ts +2 -2
- package/lib/projection/ui/ProjectionMapMore.d.ts.map +1 -1
- package/lib/projection/ui/ProjectionMapMore.js +7 -5
- package/lib/projection/ui/ProjectionMapMore.js.map +1 -1
- package/lib/projection/ui/ProjectionMapTab.d.ts +15 -6
- package/lib/projection/ui/ProjectionMapTab.d.ts.map +1 -1
- package/lib/projection/ui/ProjectionMapTab.js +11 -7
- package/lib/projection/ui/ProjectionMapTab.js.map +1 -1
- package/lib/projection/ui/ProjectionPairsMore.d.ts +3 -7
- package/lib/projection/ui/ProjectionPairsMore.d.ts.map +1 -1
- package/lib/projection/ui/ProjectionPairsMore.js +4 -5
- package/lib/projection/ui/ProjectionPairsMore.js.map +1 -1
- package/lib/projection/ui/ProjectionPairsTab.d.ts.map +1 -1
- package/lib/projection/ui/ProjectionPairsTab.js +2 -2
- package/lib/projection/ui/ProjectionPairsTab.js.map +1 -1
- package/lib/projection/ui/ProjectionPanel.d.ts +1 -1
- package/lib/projection/ui/ProjectionPanel.d.ts.map +1 -1
- package/lib/projection/ui/ProjectionPanel.js +1 -1
- package/lib/projection/ui/ProjectionPanel.js.map +1 -1
- package/lib/projection/ui/ProjectionReadout.d.ts +7 -1
- package/lib/projection/ui/ProjectionReadout.d.ts.map +1 -1
- package/lib/projection/ui/ProjectionReadout.js +19 -7
- package/lib/projection/ui/ProjectionReadout.js.map +1 -1
- package/lib/projection/ui/ProjectionSpaceControls.d.ts +3 -5
- package/lib/projection/ui/ProjectionSpaceControls.d.ts.map +1 -1
- package/lib/projection/ui/ProjectionSpaceControls.js +9 -7
- package/lib/projection/ui/ProjectionSpaceControls.js.map +1 -1
- package/lib/projection/ui/ProjectionSpaceMore.d.ts +2 -2
- package/lib/projection/ui/ProjectionSpaceMore.d.ts.map +1 -1
- package/lib/projection/ui/ProjectionSpaceMore.js +5 -4
- package/lib/projection/ui/ProjectionSpaceMore.js.map +1 -1
- package/lib/projection/ui/ProjectionSpaceTab.d.ts +11 -3
- package/lib/projection/ui/ProjectionSpaceTab.d.ts.map +1 -1
- package/lib/projection/ui/ProjectionSpaceTab.js +7 -4
- package/lib/projection/ui/ProjectionSpaceTab.js.map +1 -1
- package/lib/projection/ui/ProjectionViewer.d.ts.map +1 -1
- package/lib/projection/ui/ProjectionViewer.js +1 -0
- package/lib/projection/ui/ProjectionViewer.js.map +1 -1
- package/lib/projection/ui/projectionBarReadings.d.ts +4 -1
- package/lib/projection/ui/projectionBarReadings.d.ts.map +1 -1
- package/lib/projection/ui/projectionBarReadings.js +14 -4
- package/lib/projection/ui/projectionBarReadings.js.map +1 -1
- package/lib/projection/ui/projectionBarSlots.d.ts +4 -2
- package/lib/projection/ui/projectionBarSlots.d.ts.map +1 -1
- package/lib/projection/ui/projectionBarSlots.js +3 -7
- package/lib/projection/ui/projectionBarSlots.js.map +1 -1
- package/lib/projection/ui/projectionMapChoices.d.ts +31 -6
- package/lib/projection/ui/projectionMapChoices.d.ts.map +1 -1
- package/lib/projection/ui/projectionMapChoices.js +58 -9
- package/lib/projection/ui/projectionMapChoices.js.map +1 -1
- package/lib/projection/ui/projectionMapChrome.d.ts +3 -9
- package/lib/projection/ui/projectionMapChrome.d.ts.map +1 -1
- package/lib/projection/ui/projectionMapChrome.js +41 -27
- package/lib/projection/ui/projectionMapChrome.js.map +1 -1
- package/lib/projection/ui/projectionMapCorner.d.ts +25 -0
- package/lib/projection/ui/projectionMapCorner.d.ts.map +1 -0
- package/lib/projection/ui/projectionMapCorner.js +46 -0
- package/lib/projection/ui/projectionMapCorner.js.map +1 -0
- package/lib/projection/ui/projectionMapModel.d.ts +9 -18
- package/lib/projection/ui/projectionMapModel.d.ts.map +1 -1
- package/lib/projection/ui/projectionMapModel.js +14 -39
- package/lib/projection/ui/projectionMapModel.js.map +1 -1
- package/lib/projection/ui/projectionMapView.d.ts +3 -1
- package/lib/projection/ui/projectionMapView.d.ts.map +1 -1
- package/lib/projection/ui/projectionMapView.js +9 -4
- package/lib/projection/ui/projectionMapView.js.map +1 -1
- package/lib/projection/ui/projectionSelectionSentence.d.ts +10 -0
- package/lib/projection/ui/projectionSelectionSentence.d.ts.map +1 -0
- package/lib/projection/ui/projectionSelectionSentence.js +18 -0
- package/lib/projection/ui/projectionSelectionSentence.js.map +1 -0
- package/lib/projection/ui/projectionStateApi.d.ts +47 -0
- package/lib/projection/ui/projectionStateApi.d.ts.map +1 -0
- package/lib/projection/ui/projectionStateApi.js +9 -0
- package/lib/projection/ui/projectionStateApi.js.map +1 -0
- package/lib/projection/ui/projectionTabModels.js +1 -1
- package/lib/projection/ui/projectionTabModels.js.map +1 -1
- package/lib/projection/ui/useProjectionState.d.ts +1 -29
- package/lib/projection/ui/useProjectionState.d.ts.map +1 -1
- package/lib/projection/ui/useProjectionState.js +13 -5
- package/lib/projection/ui/useProjectionState.js.map +1 -1
- package/lib/scatter/core/index.d.ts +1 -0
- package/lib/scatter/core/index.d.ts.map +1 -1
- package/lib/scatter/core/index.js +1 -0
- package/lib/scatter/core/index.js.map +1 -1
- package/lib/scatter/core/pointShape.d.ts +18 -0
- package/lib/scatter/core/pointShape.d.ts.map +1 -0
- package/lib/scatter/core/pointShape.js +70 -0
- package/lib/scatter/core/pointShape.js.map +1 -0
- package/lib/scatter/ui/ScatterPlot.d.ts.map +1 -1
- package/lib/scatter/ui/ScatterPlot.js +3 -2
- package/lib/scatter/ui/ScatterPlot.js.map +1 -1
- package/lib/scatter/ui/ScatterPointLayer.d.ts +14 -1
- package/lib/scatter/ui/ScatterPointLayer.d.ts.map +1 -1
- package/lib/scatter/ui/ScatterPointLayer.js +15 -3
- package/lib/scatter/ui/ScatterPointLayer.js.map +1 -1
- package/lib/scatter/ui/scatterFigureProps.d.ts +13 -0
- package/lib/scatter/ui/scatterFigureProps.d.ts.map +1 -1
- package/lib/scatter/ui/scatterMarkGlyph.d.ts +2 -1
- package/lib/scatter/ui/scatterMarkGlyph.d.ts.map +1 -1
- package/lib/scatter/ui/scatterMarkGlyph.js +7 -1
- package/lib/scatter/ui/scatterMarkGlyph.js.map +1 -1
- package/lib/scatter3d/ui/ScatterCloud.d.ts.map +1 -1
- package/lib/scatter3d/ui/ScatterCloud.js +2 -1
- package/lib/scatter3d/ui/ScatterCloud.js.map +1 -1
- package/lib/shared/ui/MenuButton.d.ts +3 -2
- package/lib/shared/ui/MenuButton.d.ts.map +1 -1
- package/lib/shared/ui/MenuButton.js +1 -1
- package/lib/shared/ui/MenuButton.js.map +1 -1
- package/lib/structure/core/conformerMinimise.d.ts +36 -0
- package/lib/structure/core/conformerMinimise.d.ts.map +1 -0
- package/lib/structure/core/conformerMinimise.js +81 -0
- package/lib/structure/core/conformerMinimise.js.map +1 -0
- package/lib/structure/core/conformerMinimum.d.ts +62 -0
- package/lib/structure/core/conformerMinimum.d.ts.map +1 -0
- package/lib/structure/core/conformerMinimum.js +90 -0
- package/lib/structure/core/conformerMinimum.js.map +1 -0
- package/lib/structure/core/conformerOptions.d.ts +62 -0
- package/lib/structure/core/conformerOptions.d.ts.map +1 -0
- package/lib/structure/core/conformerOptions.js +83 -0
- package/lib/structure/core/conformerOptions.js.map +1 -0
- package/lib/structure/core/conformerRefine.d.ts +104 -0
- package/lib/structure/core/conformerRefine.d.ts.map +1 -0
- package/lib/structure/core/conformerRefine.js +130 -0
- package/lib/structure/core/conformerRefine.js.map +1 -0
- package/lib/structure/core/conformerRefineRank.d.ts +36 -0
- package/lib/structure/core/conformerRefineRank.d.ts.map +1 -0
- package/lib/structure/core/conformerRefineRank.js +69 -0
- package/lib/structure/core/conformerRefineRank.js.map +1 -0
- package/lib/structure/core/conformerSession.d.ts +50 -0
- package/lib/structure/core/conformerSession.d.ts.map +1 -0
- package/lib/structure/core/conformerSession.js +88 -0
- package/lib/structure/core/conformerSession.js.map +1 -0
- package/lib/structure/core/conformerShape.d.ts +36 -0
- package/lib/structure/core/conformerShape.d.ts.map +1 -0
- package/lib/structure/core/conformerShape.js +150 -0
- package/lib/structure/core/conformerShape.js.map +1 -0
- package/lib/structure/core/conformers.d.ts +107 -0
- package/lib/structure/core/conformers.d.ts.map +1 -0
- package/lib/structure/core/conformers.js +149 -0
- package/lib/structure/core/conformers.js.map +1 -0
- package/lib/structure/core/geometryRelaxer.d.ts +66 -0
- package/lib/structure/core/geometryRelaxer.d.ts.map +1 -0
- package/lib/structure/core/geometryRelaxer.js +2 -0
- package/lib/structure/core/geometryRelaxer.js.map +1 -0
- package/lib/structure/core/index.d.ts +4 -0
- package/lib/structure/core/index.d.ts.map +1 -1
- package/lib/structure/core/index.js +2 -0
- package/lib/structure/core/index.js.map +1 -1
- package/lib/structure/core/moleculeCoordinates.d.ts +31 -0
- package/lib/structure/core/moleculeCoordinates.d.ts.map +1 -0
- package/lib/structure/core/moleculeCoordinates.js +80 -0
- package/lib/structure/core/moleculeCoordinates.js.map +1 -0
- package/lib/structure/core/molfileExport.d.ts +42 -0
- package/lib/structure/core/molfileExport.d.ts.map +1 -0
- package/lib/structure/core/molfileExport.js +47 -0
- package/lib/structure/core/molfileExport.js.map +1 -0
- package/lib/structure/core/oclResources.d.ts +12 -0
- package/lib/structure/core/oclResources.d.ts.map +1 -0
- package/lib/structure/core/oclResources.js +35 -0
- package/lib/structure/core/oclResources.js.map +1 -0
- package/lib/translate/core/catalog.d.ts +61 -0
- package/lib/translate/core/catalog.d.ts.map +1 -0
- package/lib/translate/core/catalog.js +49 -0
- package/lib/translate/core/catalog.js.map +1 -0
- package/lib/translate/core/checkTranslation.d.ts +32 -0
- package/lib/translate/core/checkTranslation.d.ts.map +1 -0
- package/lib/translate/core/checkTranslation.js +98 -0
- package/lib/translate/core/checkTranslation.js.map +1 -0
- package/lib/translate/core/contribution.d.ts +88 -0
- package/lib/translate/core/contribution.d.ts.map +1 -0
- package/lib/translate/core/contribution.js +14 -0
- package/lib/translate/core/contribution.js.map +1 -0
- package/lib/translate/core/index.d.ts +19 -0
- package/lib/translate/core/index.d.ts.map +1 -0
- package/lib/translate/core/index.js +15 -0
- package/lib/translate/core/index.js.map +1 -0
- package/lib/translate/core/marker.d.ts +45 -0
- package/lib/translate/core/marker.d.ts.map +1 -0
- package/lib/translate/core/marker.js +79 -0
- package/lib/translate/core/marker.js.map +1 -0
- package/lib/translate/core/mergeMessages.d.ts +35 -0
- package/lib/translate/core/mergeMessages.d.ts.map +1 -0
- package/lib/translate/core/mergeMessages.js +69 -0
- package/lib/translate/core/mergeMessages.js.map +1 -0
- package/lib/translate/core/session.d.ts +102 -0
- package/lib/translate/core/session.d.ts.map +1 -0
- package/lib/translate/core/session.js +162 -0
- package/lib/translate/core/session.js.map +1 -0
- package/lib/translate/core/start.d.ts +70 -0
- package/lib/translate/core/start.d.ts.map +1 -0
- package/lib/translate/core/start.js +73 -0
- package/lib/translate/core/start.js.map +1 -0
- package/lib/translate/core/suggestions.d.ts +77 -0
- package/lib/translate/core/suggestions.d.ts.map +1 -0
- package/lib/translate/core/suggestions.js +143 -0
- package/lib/translate/core/suggestions.js.map +1 -0
- package/lib/translate/core/tables.d.ts +100 -0
- package/lib/translate/core/tables.d.ts.map +1 -0
- package/lib/translate/core/tables.js +51 -0
- package/lib/translate/core/tables.js.map +1 -0
- package/lib/translate.d.ts +2 -0
- package/lib/translate.d.ts.map +1 -0
- package/lib/translate.js +6 -0
- package/lib/translate.js.map +1 -0
- package/lib/ui.d.ts +1 -0
- package/lib/ui.d.ts.map +1 -1
- package/lib/ui.js +1 -0
- package/lib/ui.js.map +1 -1
- package/lib/xtb/core/xtbRelaxer.d.ts +61 -0
- package/lib/xtb/core/xtbRelaxer.d.ts.map +1 -0
- package/lib/xtb/core/xtbRelaxer.js +108 -0
- package/lib/xtb/core/xtbRelaxer.js.map +1 -0
- package/lib/xtb.d.ts +11 -0
- package/lib/xtb.d.ts.map +1 -0
- package/lib/xtb.js +10 -0
- package/lib/xtb.js.map +1 -0
- package/package.json +18 -11
- package/src/chrome/ui/HeaderToggle.tsx +100 -0
- package/src/chrome/ui/index.ts +2 -0
- package/src/citation/core/gfn2Paper.ts +32 -0
- package/src/citation/core/index.ts +1 -0
- package/src/clipboard/ui/ClickToCopy.tsx +8 -7
- package/src/conformers.ts +87 -0
- package/src/core.ts +1 -0
- package/src/credits/core/credits.ts +16 -0
- package/src/ecosystem/core/index.ts +1 -0
- package/src/ecosystem/core/sites.ts +20 -2
- package/src/ecosystem/ui/EcosystemLinks.tsx +3 -1
- package/src/ecosystem/ui/SiteTile.tsx +3 -1
- package/src/format/core/index.ts +1 -1
- package/src/format/core/words.ts +19 -0
- package/src/language/core/index.ts +7 -0
- package/src/language/core/languageName.ts +16 -0
- package/src/language/core/languageParam.ts +70 -0
- package/src/language/ui/SiteLanguage.tsx +26 -0
- package/src/language/ui/index.ts +3 -0
- package/src/language/ui/siteLanguageContext.ts +20 -0
- package/src/orbital/core/atomicOrbitals.ts +17 -1
- package/src/orbital/core/hydrogenic.ts +2 -1
- package/src/orbital/core/index.ts +1 -0
- package/src/orbital/core/slaterEnergy.ts +83 -0
- package/src/overlay/core/index.ts +6 -2
- package/src/overlay/core/overlayMarks.ts +51 -6
- package/src/overlay/ui/OverlayLegendMark.tsx +5 -0
- package/src/projection/core/index.ts +11 -3
- package/src/projection/core/projectionCopy.ts +3 -0
- package/src/projection/core/projectionGroupings.ts +174 -0
- package/src/projection/core/projectionOptions.ts +18 -7
- package/src/projection/core/projectionPanelWords.ts +10 -0
- package/src/projection/core/projectionSamples.ts +62 -120
- package/src/projection/core/projectionStrings.ts +12 -1
- package/src/projection/core/resolveProjectionOptions.ts +66 -4
- package/src/projection/ui/ProjectionBar.tsx +4 -2
- package/src/projection/ui/ProjectionGroupingPickers.tsx +91 -0
- package/src/projection/ui/ProjectionMapControls.tsx +29 -32
- package/src/projection/ui/ProjectionMapLegend.tsx +1 -1
- package/src/projection/ui/ProjectionMapMore.tsx +14 -4
- package/src/projection/ui/ProjectionMapTab.tsx +27 -9
- package/src/projection/ui/ProjectionPairsMore.tsx +12 -21
- package/src/projection/ui/ProjectionPairsTab.tsx +5 -2
- package/src/projection/ui/ProjectionPanel.tsx +7 -3
- package/src/projection/ui/ProjectionReadout.tsx +28 -8
- package/src/projection/ui/ProjectionSpaceControls.tsx +20 -27
- package/src/projection/ui/ProjectionSpaceMore.tsx +12 -3
- package/src/projection/ui/ProjectionSpaceTab.tsx +23 -6
- package/src/projection/ui/ProjectionViewer.tsx +1 -0
- package/src/projection/ui/projectionBarReadings.ts +24 -8
- package/src/projection/ui/projectionBarSlots.tsx +10 -9
- package/src/projection/ui/projectionMapChoices.ts +71 -14
- package/src/projection/ui/projectionMapChrome.ts +55 -30
- package/src/projection/ui/projectionMapCorner.ts +67 -0
- package/src/projection/ui/projectionMapModel.ts +20 -59
- package/src/projection/ui/projectionMapView.ts +15 -8
- package/src/projection/ui/projectionSelectionSentence.ts +22 -0
- package/src/projection/ui/projectionStateApi.ts +57 -0
- package/src/projection/ui/projectionTabModels.ts +1 -1
- package/src/projection/ui/useProjectionState.ts +33 -37
- package/src/scatter/core/index.ts +1 -0
- package/src/scatter/core/pointShape.ts +80 -0
- package/src/scatter/ui/ScatterPlot.tsx +4 -1
- package/src/scatter/ui/ScatterPointLayer.tsx +39 -11
- package/src/scatter/ui/scatterFigureProps.ts +13 -0
- package/src/scatter/ui/scatterMarkGlyph.tsx +9 -1
- package/src/scatter3d/ui/ScatterCloud.tsx +3 -0
- package/src/shared/ui/MenuButton.tsx +4 -3
- package/src/structure/core/conformerMinimise.ts +99 -0
- package/src/structure/core/conformerMinimum.ts +125 -0
- package/src/structure/core/conformerOptions.ts +125 -0
- package/src/structure/core/conformerRefine.ts +234 -0
- package/src/structure/core/conformerRefineRank.ts +89 -0
- package/src/structure/core/conformerSession.ts +123 -0
- package/src/structure/core/conformerShape.ts +181 -0
- package/src/structure/core/conformers.ts +282 -0
- package/src/structure/core/geometryRelaxer.ts +71 -0
- package/src/structure/core/index.ts +13 -0
- package/src/structure/core/moleculeCoordinates.ts +93 -0
- package/src/structure/core/molfileExport.ts +62 -0
- package/src/structure/core/oclResources.ts +41 -0
- package/src/translate/core/catalog.ts +83 -0
- package/src/translate/core/checkTranslation.ts +128 -0
- package/src/translate/core/contribution.ts +99 -0
- package/src/translate/core/index.ts +72 -0
- package/src/translate/core/marker.ts +85 -0
- package/src/translate/core/mergeMessages.ts +74 -0
- package/src/translate/core/session.ts +250 -0
- package/src/translate/core/start.ts +121 -0
- package/src/translate/core/suggestions.ts +211 -0
- package/src/translate/core/tables.ts +120 -0
- package/src/translate.ts +5 -0
- package/src/ui.ts +1 -0
- package/src/xtb/core/xtbRelaxer.ts +160 -0
- package/src/xtb.ts +16 -0
- package/styles/chrome.css +61 -30
|
@@ -10,25 +10,62 @@
|
|
|
10
10
|
|
|
11
11
|
/** Which mark a legend entry, a marker or a series stands for. */
|
|
12
12
|
export type OverlayMarkShape =
|
|
13
|
-
|
|
13
|
+
| 'dot'
|
|
14
|
+
| 'ring'
|
|
15
|
+
| 'square'
|
|
16
|
+
| 'triangle'
|
|
17
|
+
| 'diamond'
|
|
18
|
+
| 'triangle-down'
|
|
19
|
+
| 'line'
|
|
20
|
+
| 'dashed'
|
|
21
|
+
| 'cross';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The shapes a sample's own dot can take, which is how a second grouping of
|
|
25
|
+
* the same samples is drawn while colour keeps the first.
|
|
26
|
+
*/
|
|
27
|
+
export type OverlaySampleShape = Extract<
|
|
28
|
+
OverlayMarkShape,
|
|
29
|
+
'dot' | 'square' | 'triangle' | 'diamond' | 'triangle-down'
|
|
30
|
+
>;
|
|
14
31
|
|
|
15
32
|
/**
|
|
16
33
|
* Every mark, in the order a picker offers them.
|
|
17
34
|
*
|
|
18
|
-
* The first
|
|
19
|
-
* last three carry a second meaning on one figure — a
|
|
20
|
-
* beside dots for the samples — which is what keeps a
|
|
21
|
-
* colours run out or the reader does not separate two
|
|
35
|
+
* The filled ones come first and separate one thing from another by colour or
|
|
36
|
+
* by outline alone; the last three carry a second meaning on one figure — a
|
|
37
|
+
* line for a component beside dots for the samples — which is what keeps a
|
|
38
|
+
* figure readable when the colours run out or the reader does not separate two
|
|
39
|
+
* of them.
|
|
22
40
|
*/
|
|
23
41
|
export const OVERLAY_MARK_SHAPES: readonly OverlayMarkShape[] = [
|
|
24
42
|
'dot',
|
|
25
43
|
'ring',
|
|
26
44
|
'square',
|
|
45
|
+
'triangle',
|
|
46
|
+
'diamond',
|
|
47
|
+
'triangle-down',
|
|
27
48
|
'line',
|
|
28
49
|
'dashed',
|
|
29
50
|
'cross',
|
|
30
51
|
];
|
|
31
52
|
|
|
53
|
+
/**
|
|
54
|
+
* The shapes a second grouping is given, in the order its groups are listed.
|
|
55
|
+
*
|
|
56
|
+
* Five, because that is about where a reader stops telling small shapes apart
|
|
57
|
+
* at a glance. None of them is a ring or a cross: a ring is a sample placed
|
|
58
|
+
* into a finished model and a cross is a group's average, and a sample drawn
|
|
59
|
+
* as either would be read as one of those.
|
|
60
|
+
*/
|
|
61
|
+
export const OVERLAY_SAMPLE_SHAPES: readonly OverlaySampleShape[] = [
|
|
62
|
+
'dot',
|
|
63
|
+
'square',
|
|
64
|
+
'triangle',
|
|
65
|
+
'diamond',
|
|
66
|
+
'triangle-down',
|
|
67
|
+
];
|
|
68
|
+
|
|
32
69
|
/**
|
|
33
70
|
* Whether a mark is drawn as a solid area rather than as a stroke.
|
|
34
71
|
*
|
|
@@ -39,5 +76,13 @@ export const OVERLAY_MARK_SHAPES: readonly OverlayMarkShape[] = [
|
|
|
39
76
|
* @returns `true` for the filled marks, `false` for the drawn ones.
|
|
40
77
|
*/
|
|
41
78
|
export function isFilledMark(shape: OverlayMarkShape): boolean {
|
|
42
|
-
return shape
|
|
79
|
+
return FILLED_MARKS.has(shape);
|
|
43
80
|
}
|
|
81
|
+
|
|
82
|
+
const FILLED_MARKS: ReadonlySet<OverlayMarkShape> = new Set<OverlayMarkShape>([
|
|
83
|
+
'dot',
|
|
84
|
+
'square',
|
|
85
|
+
'triangle',
|
|
86
|
+
'diamond',
|
|
87
|
+
'triangle-down',
|
|
88
|
+
]);
|
|
@@ -73,6 +73,11 @@ const MARK_GEOMETRY: Record<OverlayMarkShape, ReactElement> = {
|
|
|
73
73
|
dot: <circle cx="6" cy="6" r="4.2" />,
|
|
74
74
|
ring: <circle cx="6" cy="6" r="3.4" strokeWidth="2.2" />,
|
|
75
75
|
square: <rect x="2" y="2" width="8" height="8" rx="1.5" />,
|
|
76
|
+
// Balanced on the centre of the box, as the dots they name are balanced on
|
|
77
|
+
// their samples.
|
|
78
|
+
triangle: <path d="M6 0.8L10.5 8.6L1.5 8.6Z" />,
|
|
79
|
+
diamond: <path d="M6 1L11 6L6 11L1 6Z" />,
|
|
80
|
+
'triangle-down': <path d="M1.5 3.4L10.5 3.4L6 11.2Z" />,
|
|
76
81
|
line: <line x1="0.5" y1="6" x2="11.5" y2="6" strokeWidth="2.8" />,
|
|
77
82
|
dashed: (
|
|
78
83
|
<line
|
|
@@ -35,13 +35,15 @@ export type { ProjectionCopy } from './projectionCopy.ts';
|
|
|
35
35
|
export { PROJECTION_COPY } from './projectionCopy.ts';
|
|
36
36
|
export type { ProjectionCopyPatch } from './projectionCopyPatch.ts';
|
|
37
37
|
export type {
|
|
38
|
-
ProjectionColorBy,
|
|
39
38
|
ProjectionOptionId,
|
|
40
39
|
ProjectionOptions,
|
|
41
40
|
ProjectionVariablesView,
|
|
42
41
|
} from './projectionOptions.ts';
|
|
43
42
|
export { mergeProjectionCopy } from './mergeProjectionCopy.ts';
|
|
44
|
-
export {
|
|
43
|
+
export {
|
|
44
|
+
DEFAULT_PROJECTION_OPTIONS,
|
|
45
|
+
NO_GROUPING,
|
|
46
|
+
} from './projectionOptions.ts';
|
|
45
47
|
export type {
|
|
46
48
|
ProjectionChoiceWords,
|
|
47
49
|
ProjectionOutlineWords,
|
|
@@ -56,10 +58,16 @@ export type {
|
|
|
56
58
|
} from './projectionResult.ts';
|
|
57
59
|
export type {
|
|
58
60
|
ProjectionField,
|
|
61
|
+
ProjectionGrouping,
|
|
59
62
|
ProjectionSamples,
|
|
60
63
|
ResolvedProjectionGroups,
|
|
64
|
+
ResolvedProjectionShapes,
|
|
61
65
|
} from './projectionSamples.ts';
|
|
62
|
-
export {
|
|
66
|
+
export {
|
|
67
|
+
projectionGrouping,
|
|
68
|
+
resolveProjectionGroups,
|
|
69
|
+
resolveProjectionShapes,
|
|
70
|
+
} from './projectionGroupings.ts';
|
|
63
71
|
export type {
|
|
64
72
|
ProjectionBarWords,
|
|
65
73
|
ProjectionHelp,
|
|
@@ -86,6 +86,8 @@ export interface ProjectionCopy {
|
|
|
86
86
|
projected: string;
|
|
87
87
|
/** The title of a key whose colour stands for nothing, so only shape is left. */
|
|
88
88
|
shapes: string;
|
|
89
|
+
/** What the shape stands for, after what the colour does. Carries `{shapes}`. */
|
|
90
|
+
shapedBy: string;
|
|
89
91
|
};
|
|
90
92
|
/** The sentences the viewer builds from the data. */
|
|
91
93
|
sentence: {
|
|
@@ -208,6 +210,7 @@ export const PROJECTION_COPY: ProjectionCopy = {
|
|
|
208
210
|
notOutlined: 'Not outlined: too few samples.',
|
|
209
211
|
projected: 'Hollow = added after the map was built',
|
|
210
212
|
shapes: 'Shape = what each mark is.',
|
|
213
|
+
shapedBy: 'Shape = {shapes}.',
|
|
211
214
|
},
|
|
212
215
|
sentence: {
|
|
213
216
|
sharesFirst:
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How the groupings a page hands in become what a figure draws: the one that
|
|
3
|
+
* colours the dots, painted from the shared palette, and the one that shapes
|
|
4
|
+
* them, given one shape per group.
|
|
5
|
+
*
|
|
6
|
+
* Both are cut the same way — the page's own order first, then every group in
|
|
7
|
+
* the order its first row names it — so a group keeps its colour and its shape
|
|
8
|
+
* however the rows are filtered.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import {
|
|
12
|
+
CHART_SERIES_COLORS,
|
|
13
|
+
chartSeriesColor,
|
|
14
|
+
} from '../../chart/core/chartPalette.ts';
|
|
15
|
+
import { OVERLAY_SAMPLE_SHAPES } from '../../overlay/core/overlayMarks.ts';
|
|
16
|
+
|
|
17
|
+
import type {
|
|
18
|
+
ProjectionGrouping,
|
|
19
|
+
ProjectionSamples,
|
|
20
|
+
ResolvedProjectionGroups,
|
|
21
|
+
ResolvedProjectionShapes,
|
|
22
|
+
} from './projectionSamples.ts';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The grouping a set of samples is coloured by, in a shape a legend and a plot
|
|
26
|
+
* can both read.
|
|
27
|
+
*
|
|
28
|
+
* A group named in `order` but held by no row is kept, so a legend does not
|
|
29
|
+
* reshuffle when a filter empties one; a row naming a group that is not in
|
|
30
|
+
* `order` is appended in the order it appears.
|
|
31
|
+
* @param grouping - The grouping, or nothing when the dots are not coloured.
|
|
32
|
+
* @param count - How many rows there are, which is the score matrix's height.
|
|
33
|
+
* @returns The resolved groups. No grouping gives no entries at all, and every
|
|
34
|
+
* row lands at `-1`.
|
|
35
|
+
*/
|
|
36
|
+
export function resolveProjectionGroups(
|
|
37
|
+
grouping: ProjectionGrouping | undefined,
|
|
38
|
+
count: number,
|
|
39
|
+
): ResolvedProjectionGroups {
|
|
40
|
+
const { label, entries, rowOf } = partition(grouping, count);
|
|
41
|
+
const colored = entries.map((entry) => ({ ...entry, color: '' }));
|
|
42
|
+
paintGroups(colored, grouping?.colors);
|
|
43
|
+
return { label, entries: colored, groupOf: rowOf };
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* The grouping a set of samples is shaped by, one shape per group.
|
|
48
|
+
*
|
|
49
|
+
* A grouping of more groups than there are shapes is refused as a whole rather
|
|
50
|
+
* than drawn with two groups sharing a shape, or with the last ones falling
|
|
51
|
+
* back to a disc: either would put two groups under one mark, which is the one
|
|
52
|
+
* thing a key cannot undo.
|
|
53
|
+
* @param grouping - The grouping, or nothing when the dots are not shaped.
|
|
54
|
+
* @param count - How many rows there are, which is the score matrix's height.
|
|
55
|
+
* @returns The resolved shapes, or `null` when there is no grouping or its
|
|
56
|
+
* groups outnumber the shapes.
|
|
57
|
+
*/
|
|
58
|
+
export function resolveProjectionShapes(
|
|
59
|
+
grouping: ProjectionGrouping | undefined,
|
|
60
|
+
count: number,
|
|
61
|
+
): ResolvedProjectionShapes | null {
|
|
62
|
+
if (grouping === undefined) return null;
|
|
63
|
+
const { label, entries, rowOf } = partition(grouping, count);
|
|
64
|
+
if (entries.length > OVERLAY_SAMPLE_SHAPES.length) return null;
|
|
65
|
+
const shaped = entries.map((entry, index) => ({
|
|
66
|
+
...entry,
|
|
67
|
+
shape: OVERLAY_SAMPLE_SHAPES[index] ?? 'dot',
|
|
68
|
+
}));
|
|
69
|
+
return { label, entries: shaped, shapeOf: rowOf };
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* The grouping carrying an id.
|
|
74
|
+
* @param samples - Who the rows are.
|
|
75
|
+
* @param id - The id asked for.
|
|
76
|
+
* @returns The grouping, or `undefined` when none carries it.
|
|
77
|
+
*/
|
|
78
|
+
export function projectionGrouping(
|
|
79
|
+
samples: ProjectionSamples,
|
|
80
|
+
id: string,
|
|
81
|
+
): ProjectionGrouping | undefined {
|
|
82
|
+
for (const grouping of samples.groupings ?? NO_GROUPINGS) {
|
|
83
|
+
if (grouping.id === id) return grouping;
|
|
84
|
+
}
|
|
85
|
+
return undefined;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const NO_GROUP = -1;
|
|
89
|
+
const DEFAULT_GROUP_LABEL = 'Group';
|
|
90
|
+
const NO_GROUPINGS: readonly ProjectionGrouping[] = [];
|
|
91
|
+
|
|
92
|
+
interface GroupEntry {
|
|
93
|
+
id: string;
|
|
94
|
+
label: string;
|
|
95
|
+
count: number;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
interface ColoredEntry extends GroupEntry {
|
|
99
|
+
color: string;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function partition(
|
|
103
|
+
grouping: ProjectionGrouping | undefined,
|
|
104
|
+
count: number,
|
|
105
|
+
): { label: string; entries: GroupEntry[]; rowOf: Int32Array } {
|
|
106
|
+
const rowCount = Number.isFinite(count) ? Math.max(0, Math.floor(count)) : 0;
|
|
107
|
+
const label = grouping?.label ?? DEFAULT_GROUP_LABEL;
|
|
108
|
+
const rowOf = new Int32Array(rowCount).fill(NO_GROUP);
|
|
109
|
+
const entries: GroupEntry[] = [];
|
|
110
|
+
if (grouping === undefined) return { label, entries, rowOf };
|
|
111
|
+
|
|
112
|
+
const indexOfGroup = new Map<string, number>();
|
|
113
|
+
for (const id of grouping.order ?? []) {
|
|
114
|
+
appendGroup(entries, indexOfGroup, id);
|
|
115
|
+
}
|
|
116
|
+
for (let row = 0; row < rowCount; row++) {
|
|
117
|
+
const id = grouping.groups[row];
|
|
118
|
+
if (id === undefined) continue;
|
|
119
|
+
const at = appendGroup(entries, indexOfGroup, id);
|
|
120
|
+
rowOf[row] = at;
|
|
121
|
+
const entry = entries[at];
|
|
122
|
+
if (entry !== undefined) entry.count++;
|
|
123
|
+
}
|
|
124
|
+
return { label, entries, rowOf };
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
function appendGroup(
|
|
128
|
+
entries: GroupEntry[],
|
|
129
|
+
indexOfGroup: Map<string, number>,
|
|
130
|
+
id: string,
|
|
131
|
+
): number {
|
|
132
|
+
const known = indexOfGroup.get(id);
|
|
133
|
+
if (known !== undefined) return known;
|
|
134
|
+
const at = entries.length;
|
|
135
|
+
indexOfGroup.set(id, at);
|
|
136
|
+
entries.push({ id, label: id, count: 0 });
|
|
137
|
+
return at;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
function paintGroups(
|
|
141
|
+
entries: ColoredEntry[],
|
|
142
|
+
pinned: Readonly<Record<string, string>> | undefined,
|
|
143
|
+
): void {
|
|
144
|
+
// Every pinned colour is taken out of the palette before any group draws
|
|
145
|
+
// from it, so pinning the third group's hue onto the first does not leave
|
|
146
|
+
// two groups wearing it.
|
|
147
|
+
const taken = new Set<string>();
|
|
148
|
+
if (pinned !== undefined) {
|
|
149
|
+
for (const entry of entries) {
|
|
150
|
+
const color = pinned[entry.id];
|
|
151
|
+
if (color !== undefined) taken.add(color.toLowerCase());
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
let cursor = 0;
|
|
156
|
+
for (const entry of entries) {
|
|
157
|
+
const own = pinned?.[entry.id];
|
|
158
|
+
if (own !== undefined) {
|
|
159
|
+
entry.color = own;
|
|
160
|
+
continue;
|
|
161
|
+
}
|
|
162
|
+
let color = chartSeriesColor(cursor, 'group');
|
|
163
|
+
while (
|
|
164
|
+
cursor < CHART_SERIES_COLORS.length &&
|
|
165
|
+
taken.has(color.toLowerCase())
|
|
166
|
+
) {
|
|
167
|
+
cursor++;
|
|
168
|
+
color = chartSeriesColor(cursor, 'group');
|
|
169
|
+
}
|
|
170
|
+
cursor++;
|
|
171
|
+
taken.add(color.toLowerCase());
|
|
172
|
+
entry.color = color;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
@@ -14,10 +14,10 @@ export type ProjectionVariablesView =
|
|
|
14
14
|
| 'sample';
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
18
|
-
*
|
|
17
|
+
* The word for "no grouping" wherever an option names one, which is why no
|
|
18
|
+
* grouping may be called it.
|
|
19
19
|
*/
|
|
20
|
-
export
|
|
20
|
+
export const NO_GROUPING = 'none';
|
|
21
21
|
|
|
22
22
|
/** What the figure is currently showing. Every field is a control in the floating bar. */
|
|
23
23
|
export interface ProjectionOptions {
|
|
@@ -43,10 +43,20 @@ export interface ProjectionOptions {
|
|
|
43
43
|
*/
|
|
44
44
|
cloudGesture: CloudGesture;
|
|
45
45
|
/**
|
|
46
|
-
*
|
|
47
|
-
*
|
|
46
|
+
* Which grouping colours the dots, by its id, or `'none'`. An id no grouping
|
|
47
|
+
* carries — the empty string, or one saved on other data — takes the first
|
|
48
|
+
* grouping.
|
|
49
|
+
* @default ''
|
|
48
50
|
*/
|
|
49
|
-
colorBy:
|
|
51
|
+
colorBy: string;
|
|
52
|
+
/**
|
|
53
|
+
* Which grouping gives the dots their shapes, by its id, or `'none'`. An id
|
|
54
|
+
* no grouping carries takes the second grouping — the first when the colour
|
|
55
|
+
* has taken the second — and a grouping of more groups than there are
|
|
56
|
+
* shapes is not drawn.
|
|
57
|
+
* @default ''
|
|
58
|
+
*/
|
|
59
|
+
shapeBy: string;
|
|
50
60
|
/**
|
|
51
61
|
* How large the group outlines are, or `null` for none.
|
|
52
62
|
* @default { kind: 'coverage', probability: 0.95 }
|
|
@@ -134,7 +144,8 @@ export const DEFAULT_PROJECTION_OPTIONS: ProjectionOptions = {
|
|
|
134
144
|
yAxis: 1,
|
|
135
145
|
zAxis: 2,
|
|
136
146
|
cloudGesture: 'turn',
|
|
137
|
-
colorBy: '
|
|
147
|
+
colorBy: '',
|
|
148
|
+
shapeBy: '',
|
|
138
149
|
ellipse: { kind: 'coverage', probability: 0.95 },
|
|
139
150
|
pointRadius: 3.5,
|
|
140
151
|
showGroupMeans: false,
|
|
@@ -44,6 +44,12 @@ export interface ProjectionPanelWords {
|
|
|
44
44
|
export interface ProjectionReasonWords {
|
|
45
45
|
/** Why the colour cannot be set: the samples carry no groups. */
|
|
46
46
|
noGroups: string;
|
|
47
|
+
/** Why the shape cannot be set: the samples carry no groups. */
|
|
48
|
+
noGroupsToShape: string;
|
|
49
|
+
/** Why a grouping is greyed in the shape picker: the colour already draws it. */
|
|
50
|
+
shapeIsColour: string;
|
|
51
|
+
/** Why a grouping is greyed in the shape picker: it has more groups than shapes. */
|
|
52
|
+
tooManyShapes: string;
|
|
47
53
|
/** Why the map's outlines cannot be set while nothing is coloured. */
|
|
48
54
|
uncolouredOutlines: string;
|
|
49
55
|
/** Why the cloud's shells cannot be set while nothing is coloured. */
|
|
@@ -97,6 +103,7 @@ export const PROJECTION_PANEL_WORDS: ProjectionPanelWords = {
|
|
|
97
103
|
zAxis: 'Into',
|
|
98
104
|
cloudGesture: 'Drag does',
|
|
99
105
|
colorBy: 'Colour by',
|
|
106
|
+
shapeBy: 'Shape by',
|
|
100
107
|
ellipse: 'Outlines',
|
|
101
108
|
pointRadius: 'Dot size',
|
|
102
109
|
showGroupMeans: 'Averages',
|
|
@@ -124,6 +131,9 @@ export const PROJECTION_PANEL_WORDS: ProjectionPanelWords = {
|
|
|
124
131
|
/** The reasons a greyed control gives when a site overrides nothing. */
|
|
125
132
|
export const PROJECTION_REASON_WORDS: ProjectionReasonWords = {
|
|
126
133
|
noGroups: 'These samples carry no groups to colour by.',
|
|
134
|
+
noGroupsToShape: 'These samples carry no groups to shape by.',
|
|
135
|
+
shapeIsColour: 'The colour already stands for these groups.',
|
|
136
|
+
tooManyShapes: 'More groups than there are shapes to tell apart.',
|
|
127
137
|
uncolouredOutlines:
|
|
128
138
|
'Outlines follow the groups, so colour the map by them first.',
|
|
129
139
|
uncolouredShells:
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
CHART_SERIES_COLORS,
|
|
3
|
-
chartSeriesColor,
|
|
4
|
-
} from '../../chart/core/chartPalette.ts';
|
|
1
|
+
import type { OverlaySampleShape } from '../../overlay/core/overlayMarks.ts';
|
|
5
2
|
|
|
6
3
|
/** One line of the card that appears when the pointer rests on a sample. */
|
|
7
4
|
export interface ProjectionField {
|
|
@@ -11,46 +8,72 @@ export interface ProjectionField {
|
|
|
11
8
|
value: string;
|
|
12
9
|
}
|
|
13
10
|
|
|
14
|
-
/**
|
|
15
|
-
|
|
11
|
+
/**
|
|
12
|
+
* One way of sorting the rows into groups — a species, a batch, the cluster a
|
|
13
|
+
* run put each sample in.
|
|
14
|
+
*/
|
|
15
|
+
export interface ProjectionGrouping {
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
18
|
-
*
|
|
17
|
+
* What the options name it by, e.g. `species`. It is kept apart from the
|
|
18
|
+
* label so that a saved choice still finds the grouping once its label is
|
|
19
|
+
* reworded, and it may not be `none`, which is the word for no grouping.
|
|
19
20
|
*/
|
|
20
|
-
|
|
21
|
+
id: string;
|
|
22
|
+
/** What the set of groups is called, for the key and the hover card: `Species`. */
|
|
23
|
+
label: string;
|
|
21
24
|
/**
|
|
22
|
-
*
|
|
25
|
+
* Which group each row is in, in the score matrix's row order. A row with no
|
|
23
26
|
* group is drawn in the muted ink and left out of every outline.
|
|
24
|
-
* @default undefined — every row is one crowd
|
|
25
27
|
*/
|
|
26
|
-
groups
|
|
28
|
+
groups: ReadonlyArray<string | undefined>;
|
|
27
29
|
/**
|
|
28
|
-
* The order the groups are listed and
|
|
30
|
+
* The order the groups are listed, coloured and shaped in.
|
|
29
31
|
* @default the order the groups first appear in `groups`
|
|
30
32
|
*/
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* What the set of groups is called, for the legend's heading and the hover
|
|
34
|
-
* card — `Species`, `Cluster`, `Batch`.
|
|
35
|
-
* @default 'Group'
|
|
36
|
-
*/
|
|
37
|
-
groupLabel?: string;
|
|
33
|
+
order?: readonly string[];
|
|
38
34
|
/**
|
|
39
35
|
* A colour per group. Anything not named here takes the next unused colour
|
|
40
36
|
* of the shared palette, so two groups never share one.
|
|
41
37
|
* @default undefined — every group is coloured from the palette
|
|
42
38
|
*/
|
|
43
|
-
|
|
39
|
+
colors?: Readonly<Record<string, string>>;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** Who the rows are: what they are called, what they belong to, what is known. */
|
|
43
|
+
export interface ProjectionSamples {
|
|
44
|
+
/**
|
|
45
|
+
* A stable key per row, in the score matrix's row order. It is the currency
|
|
46
|
+
* of the selection callbacks, so a caller never has to keep a second index.
|
|
47
|
+
*/
|
|
48
|
+
ids: readonly string[];
|
|
49
|
+
/**
|
|
50
|
+
* What each row is written as: the title of its hover card and the name
|
|
51
|
+
* beside its dot. A page whose keys are not names a reader should read — a
|
|
52
|
+
* database id, a spectrum's uuid — writes its names here and keeps `ids`
|
|
53
|
+
* stable, and two samples may then share a name without either becoming
|
|
54
|
+
* impossible to select.
|
|
55
|
+
* @default the ids
|
|
56
|
+
*/
|
|
57
|
+
labels?: readonly string[];
|
|
58
|
+
/**
|
|
59
|
+
* The ways the rows are grouped. The first colours the dots until the reader
|
|
60
|
+
* picks another, and the next one gives them their shapes, so two groupings
|
|
61
|
+
* of the same samples — the clusters a run found and the classes the reader
|
|
62
|
+
* gave — are compared on one picture. Every one of them is written on the
|
|
63
|
+
* hover card.
|
|
64
|
+
* @default undefined — every row is one crowd
|
|
65
|
+
*/
|
|
66
|
+
groupings?: readonly ProjectionGrouping[];
|
|
44
67
|
/**
|
|
45
68
|
* Everything else worth showing about one row. A callback rather than an
|
|
46
69
|
* array, so a table of ten thousand rows builds one record when a reader
|
|
47
70
|
* points at one row, and none otherwise.
|
|
48
|
-
* @default undefined — the card shows the id, the
|
|
71
|
+
* @default undefined — the card shows the id, the groups and the two axes
|
|
49
72
|
*/
|
|
50
73
|
fields?: (index: number) => readonly ProjectionField[];
|
|
51
74
|
}
|
|
52
75
|
|
|
53
|
-
/** The
|
|
76
|
+
/** The grouping that colours the dots, as the viewer draws it. */
|
|
54
77
|
export interface ResolvedProjectionGroups {
|
|
55
78
|
/** What the set of groups is called. */
|
|
56
79
|
label: string;
|
|
@@ -69,102 +92,21 @@ export interface ResolvedProjectionGroups {
|
|
|
69
92
|
groupOf: Int32Array;
|
|
70
93
|
}
|
|
71
94
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
interface GroupEntry {
|
|
76
|
-
id: string;
|
|
95
|
+
/** The grouping that shapes the dots, as the viewer draws it. */
|
|
96
|
+
export interface ResolvedProjectionShapes {
|
|
97
|
+
/** What the set of groups is called. */
|
|
77
98
|
label: string;
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
* @returns The resolved groups. A set of samples with no `groups` gives no
|
|
92
|
-
* entries at all, and every row lands at `-1`.
|
|
93
|
-
*/
|
|
94
|
-
export function resolveProjectionGroups(
|
|
95
|
-
samples: ProjectionSamples,
|
|
96
|
-
count: number,
|
|
97
|
-
): ResolvedProjectionGroups {
|
|
98
|
-
const rowCount = Number.isFinite(count) ? Math.max(0, Math.floor(count)) : 0;
|
|
99
|
-
const label = samples.groupLabel ?? DEFAULT_GROUP_LABEL;
|
|
100
|
-
const groupOf = new Int32Array(rowCount).fill(NO_GROUP);
|
|
101
|
-
const { groups, groupColors, groupOrder } = samples;
|
|
102
|
-
if (groups === undefined) return { label, entries: [], groupOf };
|
|
103
|
-
|
|
104
|
-
const entries: GroupEntry[] = [];
|
|
105
|
-
const indexOfGroup = new Map<string, number>();
|
|
106
|
-
if (groupOrder !== undefined) {
|
|
107
|
-
for (const id of groupOrder) appendGroup(entries, indexOfGroup, id);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
for (let row = 0; row < rowCount; row++) {
|
|
111
|
-
const id = groups[row];
|
|
112
|
-
if (id === undefined) continue;
|
|
113
|
-
const at = appendGroup(entries, indexOfGroup, id);
|
|
114
|
-
groupOf[row] = at;
|
|
115
|
-
const entry = entries[at];
|
|
116
|
-
if (entry !== undefined) entry.count++;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
paintGroups(entries, groupColors);
|
|
120
|
-
return { label, entries, groupOf };
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
function appendGroup(
|
|
124
|
-
entries: GroupEntry[],
|
|
125
|
-
indexOfGroup: Map<string, number>,
|
|
126
|
-
id: string,
|
|
127
|
-
): number {
|
|
128
|
-
const known = indexOfGroup.get(id);
|
|
129
|
-
if (known !== undefined) return known;
|
|
130
|
-
const at = entries.length;
|
|
131
|
-
indexOfGroup.set(id, at);
|
|
132
|
-
entries.push({ id, label: id, color: '', count: 0 });
|
|
133
|
-
return at;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
function paintGroups(
|
|
137
|
-
entries: GroupEntry[],
|
|
138
|
-
pinned: Readonly<Record<string, string>> | undefined,
|
|
139
|
-
): void {
|
|
140
|
-
// Every pinned colour is taken out of the palette before any group draws
|
|
141
|
-
// from it, so pinning the third group's hue onto the first does not leave
|
|
142
|
-
// two groups wearing it.
|
|
143
|
-
const taken = new Set<string>();
|
|
144
|
-
if (pinned !== undefined) {
|
|
145
|
-
for (const entry of entries) {
|
|
146
|
-
const color = pinned[entry.id];
|
|
147
|
-
if (color !== undefined) taken.add(color.toLowerCase());
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
let cursor = 0;
|
|
152
|
-
for (const entry of entries) {
|
|
153
|
-
const own = pinned?.[entry.id];
|
|
154
|
-
if (own !== undefined) {
|
|
155
|
-
entry.color = own;
|
|
156
|
-
continue;
|
|
157
|
-
}
|
|
158
|
-
let color = chartSeriesColor(cursor, 'group');
|
|
159
|
-
while (
|
|
160
|
-
cursor < CHART_SERIES_COLORS.length &&
|
|
161
|
-
taken.has(color.toLowerCase())
|
|
162
|
-
) {
|
|
163
|
-
cursor++;
|
|
164
|
-
color = chartSeriesColor(cursor, 'group');
|
|
165
|
-
}
|
|
166
|
-
cursor++;
|
|
167
|
-
taken.add(color.toLowerCase());
|
|
168
|
-
entry.color = color;
|
|
169
|
-
}
|
|
99
|
+
/** The groups, in the order they are listed and given their shapes. */
|
|
100
|
+
entries: ReadonlyArray<{
|
|
101
|
+
/** The group's own name, which is also its id. */
|
|
102
|
+
id: string;
|
|
103
|
+
/** What it is called. */
|
|
104
|
+
label: string;
|
|
105
|
+
/** Its shape. */
|
|
106
|
+
shape: OverlaySampleShape;
|
|
107
|
+
/** How many rows are in it. */
|
|
108
|
+
count: number;
|
|
109
|
+
}>;
|
|
110
|
+
/** Which group each row is in, as an index into `entries`, or `-1`. */
|
|
111
|
+
shapeOf: Int32Array;
|
|
170
112
|
}
|
|
@@ -70,6 +70,14 @@ export const PROJECTION_HELP: Record<ProjectionOptionId, ProjectionHelp> = {
|
|
|
70
70
|
title: 'Colour by',
|
|
71
71
|
body: 'What a dot’s colour stands for. Colouring by nothing is useful when the groups are what you are trying to find rather than what you already know.',
|
|
72
72
|
},
|
|
73
|
+
shapeBy: {
|
|
74
|
+
title: 'Shape by',
|
|
75
|
+
body: 'What a dot’s shape stands for. With colour for one grouping and shape for another, you see at a glance where two ways of sorting the same samples disagree — the clusters a run found against the classes you gave. Past five groups the shapes stop being told apart, so a grouping that large is not offered.',
|
|
76
|
+
example: {
|
|
77
|
+
code: 'Colour = cluster · Shape = class',
|
|
78
|
+
note: 'A square among circles of the same colour is a sample the clustering put with another class.',
|
|
79
|
+
},
|
|
80
|
+
},
|
|
73
81
|
ellipse: {
|
|
74
82
|
title: 'Group outlines',
|
|
75
83
|
body: 'Each outline is drawn to cover about that share of its group’s samples, assuming the group is roughly bell-shaped. It is a summary of where a group sits, not a boundary.',
|
|
@@ -95,7 +103,7 @@ export const PROJECTION_HELP: Record<ProjectionOptionId, ProjectionHelp> = {
|
|
|
95
103
|
body: 'Writes every sample’s own name beside its dot. It is what turns a dot sitting on its own into something you can go and look up. In a crowd there is only room for some of the names, so the ones that do not fit are left out rather than written over each other.',
|
|
96
104
|
example: {
|
|
97
105
|
code: '0326_3a',
|
|
98
|
-
note: 'The name is
|
|
106
|
+
note: 'The name is the one the sample was loaded with, so it is the one you can find again in your own files.',
|
|
99
107
|
},
|
|
100
108
|
},
|
|
101
109
|
pairCount: {
|
|
@@ -189,6 +197,8 @@ export interface ProjectionBarWords {
|
|
|
189
197
|
};
|
|
190
198
|
/** What "the colour stands for nothing" reads. */
|
|
191
199
|
uncoloured: string;
|
|
200
|
+
/** What "the shape stands for nothing" reads. */
|
|
201
|
+
unshaped: string;
|
|
192
202
|
/** What "no outlines at all" reads where there is no room for a sentence. */
|
|
193
203
|
noOutlines: string;
|
|
194
204
|
/** What the settings gathered into one chip are called together. */
|
|
@@ -218,6 +228,7 @@ export const PROJECTION_BAR_WORDS: ProjectionBarWords = {
|
|
|
218
228
|
showIds: 'Show sample ID',
|
|
219
229
|
},
|
|
220
230
|
uncoloured: 'Nothing',
|
|
231
|
+
unshaped: 'Nothing',
|
|
221
232
|
noOutlines: 'None',
|
|
222
233
|
settings: 'How this is drawn',
|
|
223
234
|
view: {
|