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
|
@@ -19,8 +19,14 @@ interface ProjectionReadoutProps {
|
|
|
19
19
|
result: ProjectionResult;
|
|
20
20
|
/** Who the rows are. */
|
|
21
21
|
samples: ProjectionSamples;
|
|
22
|
-
/** The
|
|
22
|
+
/** The grouping the figure is coloured by, for the colour of the row's group. */
|
|
23
23
|
groups: ResolvedProjectionGroups;
|
|
24
|
+
/**
|
|
25
|
+
* Which grouping colours the figure, so the row of that grouping carries the
|
|
26
|
+
* colour its dot is drawn in.
|
|
27
|
+
* @default undefined — no row carries a colour
|
|
28
|
+
*/
|
|
29
|
+
colorBy?: string;
|
|
24
30
|
/** Which axis is drawn horizontally, from 0. */
|
|
25
31
|
xAxis: number;
|
|
26
32
|
/** Which axis is drawn vertically. */
|
|
@@ -85,6 +91,7 @@ export function ProjectionReadout(props: ProjectionReadoutProps): ReactElement {
|
|
|
85
91
|
result,
|
|
86
92
|
samples,
|
|
87
93
|
groups,
|
|
94
|
+
colorBy,
|
|
88
95
|
xAxis,
|
|
89
96
|
yAxis,
|
|
90
97
|
zAxis,
|
|
@@ -104,8 +111,12 @@ export function ProjectionReadout(props: ProjectionReadoutProps): ReactElement {
|
|
|
104
111
|
[xAxis, yAxis, zAxis],
|
|
105
112
|
);
|
|
106
113
|
const rows = useMemo(
|
|
107
|
-
() =>
|
|
108
|
-
|
|
114
|
+
() =>
|
|
115
|
+
readoutRows(index, result, samples, drawn, formatValue, {
|
|
116
|
+
groups,
|
|
117
|
+
colorBy,
|
|
118
|
+
}),
|
|
119
|
+
[colorBy, drawn, formatValue, groups, index, result, samples],
|
|
109
120
|
);
|
|
110
121
|
|
|
111
122
|
return (
|
|
@@ -114,7 +125,7 @@ export function ProjectionReadout(props: ProjectionReadoutProps): ReactElement {
|
|
|
114
125
|
y={y}
|
|
115
126
|
boxWidth={boxWidth}
|
|
116
127
|
boxHeight={boxHeight}
|
|
117
|
-
title={samples.ids[index] ?? ''}
|
|
128
|
+
title={samples.labels?.[index] ?? samples.ids[index] ?? ''}
|
|
118
129
|
rows={rows}
|
|
119
130
|
maxRows={maxRows}
|
|
120
131
|
pinned={pinned}
|
|
@@ -128,9 +139,9 @@ function readoutRows(
|
|
|
128
139
|
index: number,
|
|
129
140
|
result: ProjectionResult,
|
|
130
141
|
samples: ProjectionSamples,
|
|
131
|
-
groups: ResolvedProjectionGroups,
|
|
132
142
|
drawn: readonly number[],
|
|
133
143
|
formatValue: (value: number) => string,
|
|
144
|
+
coloured: { groups: ResolvedProjectionGroups; colorBy?: string },
|
|
134
145
|
): OverlayReadoutRow[] {
|
|
135
146
|
const rows: OverlayReadoutRow[] = [];
|
|
136
147
|
const { axes, scores } = result;
|
|
@@ -145,9 +156,18 @@ function readoutRows(
|
|
|
145
156
|
});
|
|
146
157
|
}
|
|
147
158
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
159
|
+
// Every grouping is written, the one the dots are coloured by with its
|
|
160
|
+
// colour: a card naming only the colour's group would hide the very
|
|
161
|
+
// grouping the shapes stand for.
|
|
162
|
+
const { groups, colorBy } = coloured;
|
|
163
|
+
for (const grouping of samples.groupings ?? []) {
|
|
164
|
+
const value = grouping.groups[index];
|
|
165
|
+
if (value === undefined) continue;
|
|
166
|
+
const group =
|
|
167
|
+
grouping.id === colorBy
|
|
168
|
+
? groups.entries[groups.groupOf[index] ?? -1]
|
|
169
|
+
: undefined;
|
|
170
|
+
rows.push({ label: grouping.label, value, color: group?.color });
|
|
151
171
|
}
|
|
152
172
|
|
|
153
173
|
if (known && samples.fields !== undefined) {
|
|
@@ -8,11 +8,11 @@ import { OverlayToggle } from '../../overlay/ui/OverlayToggle.tsx';
|
|
|
8
8
|
import { OverlayValueMenu } from '../../overlay/ui/OverlayValueMenu.tsx';
|
|
9
9
|
import type { CloudGesture } from '../../scatter3d/core/cloudGesture.ts';
|
|
10
10
|
import type { ProjectionCopy } from '../core/projectionCopy.ts';
|
|
11
|
-
import type {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
} from '../core/projectionOptions.ts';
|
|
11
|
+
import type { ProjectionOptions } from '../core/projectionOptions.ts';
|
|
12
|
+
import { NO_GROUPING } from '../core/projectionOptions.ts';
|
|
13
|
+
import type { ProjectionGrouping } from '../core/projectionSamples.ts';
|
|
15
14
|
|
|
15
|
+
import { ProjectionColourPicker } from './ProjectionGroupingPickers.tsx';
|
|
16
16
|
import type { ProjectionReading } from './projectionBarReadings.ts';
|
|
17
17
|
import { projectionChipSettings } from './projectionBarReadings.ts';
|
|
18
18
|
import {
|
|
@@ -20,7 +20,6 @@ import {
|
|
|
20
20
|
ellipseKey,
|
|
21
21
|
ellipseSize,
|
|
22
22
|
} from './projectionEllipse.ts';
|
|
23
|
-
import { projectionColourChoices } from './projectionMapChoices.ts';
|
|
24
23
|
import { projectionCloudGestureChoices } from './projectionWordChoices.ts';
|
|
25
24
|
|
|
26
25
|
/** What the cloud's controls are drawn from, wherever in the bar they sit. */
|
|
@@ -31,14 +30,11 @@ export interface ProjectionSpaceControlsProps {
|
|
|
31
30
|
onChange: (patch: Partial<ProjectionOptions>) => void;
|
|
32
31
|
/** The words the bar writes, already merged over the defaults. */
|
|
33
32
|
copy: ProjectionCopy;
|
|
34
|
-
/** What the set of groups is called. */
|
|
35
|
-
groupLabel: string;
|
|
36
33
|
/**
|
|
37
|
-
*
|
|
34
|
+
* Every grouping the samples carry. Without one the shells stand for
|
|
38
35
|
* nothing, so their control is greyed rather than removed.
|
|
39
|
-
* @default false
|
|
40
36
|
*/
|
|
41
|
-
|
|
37
|
+
groupings: readonly ProjectionGrouping[];
|
|
42
38
|
/**
|
|
43
39
|
* What the settings currently read, built once for the bar and handed down.
|
|
44
40
|
* @default [] — nothing is written, which is what the cog's panel wants
|
|
@@ -71,11 +67,12 @@ export interface ProjectionSpaceControlsProps {
|
|
|
71
67
|
export function ProjectionSpaceControls(
|
|
72
68
|
props: ProjectionSpaceControlsProps,
|
|
73
69
|
): ReactElement {
|
|
74
|
-
const { options, onChange, copy,
|
|
70
|
+
const { options, onChange, copy, groupings } = props;
|
|
75
71
|
const { readings = NO_READINGS, tier = 'full' } = props;
|
|
76
72
|
const { bar, help, outline, reason } = copy;
|
|
77
73
|
|
|
78
|
-
const
|
|
74
|
+
const hasGroups = groupings.length > 0;
|
|
75
|
+
const uncoloured = !hasGroups || options.colorBy === NO_GROUPING;
|
|
79
76
|
const names = (
|
|
80
77
|
<>
|
|
81
78
|
<OverlayToggle
|
|
@@ -109,8 +106,7 @@ export function ProjectionSpaceControls(
|
|
|
109
106
|
options={options}
|
|
110
107
|
onChange={onChange}
|
|
111
108
|
copy={copy}
|
|
112
|
-
|
|
113
|
-
hasGroups={hasGroups}
|
|
109
|
+
groupings={groupings}
|
|
114
110
|
/>
|
|
115
111
|
</OverlayChip>
|
|
116
112
|
{names}
|
|
@@ -151,10 +147,8 @@ interface SpaceSettingsProps {
|
|
|
151
147
|
onChange: (patch: Partial<ProjectionOptions>) => void;
|
|
152
148
|
/** The words the panel writes. */
|
|
153
149
|
copy: ProjectionCopy;
|
|
154
|
-
/**
|
|
155
|
-
|
|
156
|
-
/** Whether the samples carry groups at all. */
|
|
157
|
-
hasGroups: boolean;
|
|
150
|
+
/** Every grouping the samples carry. */
|
|
151
|
+
groupings: readonly ProjectionGrouping[];
|
|
158
152
|
}
|
|
159
153
|
|
|
160
154
|
/**
|
|
@@ -163,8 +157,8 @@ interface SpaceSettingsProps {
|
|
|
163
157
|
* @returns The captioned controls.
|
|
164
158
|
*/
|
|
165
159
|
function SpaceSettings(props: SpaceSettingsProps): ReactElement {
|
|
166
|
-
const { options, onChange, copy,
|
|
167
|
-
const {
|
|
160
|
+
const { options, onChange, copy, groupings } = props;
|
|
161
|
+
const { help, outline } = copy;
|
|
168
162
|
|
|
169
163
|
return (
|
|
170
164
|
<>
|
|
@@ -175,19 +169,18 @@ function SpaceSettings(props: SpaceSettingsProps): ReactElement {
|
|
|
175
169
|
options={projectionCloudGestureChoices(copy)}
|
|
176
170
|
onChange={(cloudGesture) => onChange({ cloudGesture })}
|
|
177
171
|
/>
|
|
178
|
-
<
|
|
172
|
+
<ProjectionColourPicker
|
|
179
173
|
label={help.colorBy.title}
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
onChange={(colorBy) => onChange({ colorBy })}
|
|
174
|
+
options={options}
|
|
175
|
+
onChange={onChange}
|
|
176
|
+
copy={copy}
|
|
177
|
+
groupings={groupings}
|
|
185
178
|
/>
|
|
186
179
|
<OverlaySelect
|
|
187
180
|
label={help.ellipse.title}
|
|
188
181
|
help={help.ellipse}
|
|
189
182
|
value={ellipseKey(options.ellipse)}
|
|
190
|
-
disabled={
|
|
183
|
+
disabled={groupings.length === 0 || options.colorBy === NO_GROUPING}
|
|
191
184
|
options={ellipseChoices(options.ellipse, outline, 'space')}
|
|
192
185
|
onChange={(value) => onChange({ ellipse: ellipseSize(value) })}
|
|
193
186
|
/>
|
|
@@ -11,6 +11,7 @@ import type { CloudGesture } from '../../scatter3d/core/cloudGesture.ts';
|
|
|
11
11
|
import type { ProjectionResult } from '../core/projectionResult.ts';
|
|
12
12
|
import { PROJECTION_TAB_DEFAULTS } from '../core/projectionTabDefaults.ts';
|
|
13
13
|
|
|
14
|
+
import { ProjectionShapePicker } from './ProjectionGroupingPickers.tsx';
|
|
14
15
|
import type { ProjectionSpaceControlsProps } from './ProjectionSpaceControls.tsx';
|
|
15
16
|
import { projectionAxisChoices } from './projectionAxisChoices.ts';
|
|
16
17
|
import {
|
|
@@ -35,8 +36,8 @@ interface ProjectionSpaceMoreProps extends ProjectionSpaceControlsProps {
|
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
/**
|
|
38
|
-
* What the cloud keeps behind the cog: its three axes, the dot size
|
|
39
|
-
* the two drags do.
|
|
39
|
+
* What the cloud keeps behind the cog: its three axes, the dot size and shape,
|
|
40
|
+
* and what the two drags do.
|
|
40
41
|
*
|
|
41
42
|
* It is the map's panel with one picker more and one action fewer. There is no
|
|
42
43
|
* "zoom to selection" here, because a box has no frame to draw round a crowd:
|
|
@@ -49,7 +50,7 @@ interface ProjectionSpaceMoreProps extends ProjectionSpaceControlsProps {
|
|
|
49
50
|
export function ProjectionSpaceMore(
|
|
50
51
|
props: ProjectionSpaceMoreProps,
|
|
51
52
|
): ReactElement {
|
|
52
|
-
const { result, options, onChange, copy } = props;
|
|
53
|
+
const { result, options, onChange, copy, groupings } = props;
|
|
53
54
|
const { selectedCount = 0, onResetView, onClearSelection } = props;
|
|
54
55
|
const { action, help, panel, reason, tab } = copy;
|
|
55
56
|
|
|
@@ -122,6 +123,14 @@ export function ProjectionSpaceMore(
|
|
|
122
123
|
unit="px"
|
|
123
124
|
onChange={(pointRadius) => onChange({ pointRadius })}
|
|
124
125
|
/>
|
|
126
|
+
<ProjectionShapePicker
|
|
127
|
+
label={panel.name.shapeBy}
|
|
128
|
+
options={options}
|
|
129
|
+
onChange={onChange}
|
|
130
|
+
copy={copy}
|
|
131
|
+
groupings={groupings}
|
|
132
|
+
rows={result.scores.rows}
|
|
133
|
+
/>
|
|
125
134
|
</OverlayGroup>
|
|
126
135
|
<OverlayGroup label={panel.section.handling}>
|
|
127
136
|
<OverlaySegmented<CloudGesture>
|
|
@@ -7,8 +7,12 @@ import type { OrbitCamera } from '../../scatter3d/core/orbitCamera.ts';
|
|
|
7
7
|
import { ScatterCloud } from '../../scatter3d/ui/ScatterCloud.tsx';
|
|
8
8
|
import type { ProjectionCopy } from '../core/projectionCopy.ts';
|
|
9
9
|
import type { ProjectionOptions } from '../core/projectionOptions.ts';
|
|
10
|
+
import { NO_GROUPING } from '../core/projectionOptions.ts';
|
|
10
11
|
import type { ProjectionResult } from '../core/projectionResult.ts';
|
|
11
|
-
import type {
|
|
12
|
+
import type {
|
|
13
|
+
ResolvedProjectionGroups,
|
|
14
|
+
ResolvedProjectionShapes,
|
|
15
|
+
} from '../core/projectionSamples.ts';
|
|
12
16
|
|
|
13
17
|
import type { SelectionReport } from './ProjectionMapCaption.tsx';
|
|
14
18
|
import { ProjectionMapCaption } from './ProjectionMapCaption.tsx';
|
|
@@ -19,6 +23,7 @@ import {
|
|
|
19
23
|
projectionAxisTitle,
|
|
20
24
|
projectionMapCloud,
|
|
21
25
|
projectionScatterGroups,
|
|
26
|
+
projectionScatterShapes,
|
|
22
27
|
} from './projectionMapModel.ts';
|
|
23
28
|
import { MINIMUM_SHELL_POINTS } from './projectionSpaceModel.ts';
|
|
24
29
|
|
|
@@ -26,8 +31,16 @@ import { MINIMUM_SHELL_POINTS } from './projectionSpaceModel.ts';
|
|
|
26
31
|
interface ProjectionSpaceTabProps {
|
|
27
32
|
/** What the run produced, whatever produced it. */
|
|
28
33
|
result: ProjectionResult;
|
|
29
|
-
/**
|
|
34
|
+
/**
|
|
35
|
+
* The grouping the dots are coloured by, resolved once by the viewer so every
|
|
36
|
+
* tab colours alike; empty while the colour stands for nothing.
|
|
37
|
+
*/
|
|
30
38
|
groups: ResolvedProjectionGroups;
|
|
39
|
+
/**
|
|
40
|
+
* The grouping the dots are shaped by, resolved once by the viewer.
|
|
41
|
+
* @default null — every dot is a disc
|
|
42
|
+
*/
|
|
43
|
+
shapes?: ResolvedProjectionShapes | null;
|
|
31
44
|
/** What the cloud is showing, already resolved against `result`. */
|
|
32
45
|
options: ProjectionOptions;
|
|
33
46
|
/** The words the cloud writes, already merged over the defaults. */
|
|
@@ -38,7 +51,7 @@ interface ProjectionSpaceTabProps {
|
|
|
38
51
|
* What each sample is called, in the score matrix's row order.
|
|
39
52
|
* @default undefined — the setting has nothing to write and draws nothing
|
|
40
53
|
*/
|
|
41
|
-
|
|
54
|
+
names?: readonly string[];
|
|
42
55
|
/** Width of the figure, in pixels. */
|
|
43
56
|
width: number;
|
|
44
57
|
/** Height of the figure, in pixels. */
|
|
@@ -113,7 +126,8 @@ export function ProjectionSpaceTab(
|
|
|
113
126
|
props: ProjectionSpaceTabProps,
|
|
114
127
|
): ReactElement {
|
|
115
128
|
const { result, groups, options, copy, chrome, width, height } = props;
|
|
116
|
-
const {
|
|
129
|
+
const { names, shapes = null, selected } = props;
|
|
130
|
+
const { report = null, camera, zoom } = props;
|
|
117
131
|
const { onCameraChange, onZoomChange, wheelZoom } = props;
|
|
118
132
|
const { onSelectionChange, onHoverChange, hoverCard, testId } = props;
|
|
119
133
|
const { onPointDoubleClick } = props;
|
|
@@ -131,7 +145,8 @@ export function ProjectionSpaceTab(
|
|
|
131
145
|
[scores, zAxis],
|
|
132
146
|
);
|
|
133
147
|
|
|
134
|
-
const
|
|
148
|
+
const shapeList = useMemo(() => projectionScatterShapes(shapes), [shapes]);
|
|
149
|
+
const colored = colorBy !== NO_GROUPING && groups.entries.length > 0;
|
|
135
150
|
|
|
136
151
|
return (
|
|
137
152
|
<div style={{ position: 'relative' }} data-testid={testId}>
|
|
@@ -146,10 +161,12 @@ export function ProjectionSpaceTab(
|
|
|
146
161
|
zLabel={axisName(result, zAxis)}
|
|
147
162
|
groupOf={colored ? groups.groupOf : undefined}
|
|
148
163
|
groups={colored ? projectionScatterGroups(groups) : undefined}
|
|
164
|
+
shapeOf={shapes?.shapeOf}
|
|
165
|
+
shapes={shapeList}
|
|
149
166
|
ellipsoid={colored ? shells : null}
|
|
150
167
|
ellipsoidMinimumPoints={MINIMUM_SHELL_POINTS}
|
|
151
168
|
showGroupLabels={colored && showGroupLabels}
|
|
152
|
-
pointLabels={showIds ?
|
|
169
|
+
pointLabels={showIds ? names : undefined}
|
|
153
170
|
pointRadius={pointRadius}
|
|
154
171
|
outlinedFrom={fittedCount}
|
|
155
172
|
selected={selected}
|
|
@@ -13,6 +13,7 @@ import type { OverlayMetrics } from '../../overlay/core/overlayMetrics.ts';
|
|
|
13
13
|
import type { OverlayChipSetting } from '../../overlay/ui/OverlayChip.tsx';
|
|
14
14
|
import type { ProjectionCopy } from '../core/projectionCopy.ts';
|
|
15
15
|
import type { ProjectionOptions } from '../core/projectionOptions.ts';
|
|
16
|
+
import { NO_GROUPING } from '../core/projectionOptions.ts';
|
|
16
17
|
import type { ResolvedProjectionGroups } from '../core/projectionSamples.ts';
|
|
17
18
|
import type { ProjectionTab } from '../core/projectionTabs.ts';
|
|
18
19
|
|
|
@@ -48,7 +49,10 @@ interface ProjectionReadingsInput {
|
|
|
48
49
|
copy: ProjectionCopy;
|
|
49
50
|
/** What the figure is showing, already made safe against the result. */
|
|
50
51
|
options: ProjectionOptions;
|
|
51
|
-
/**
|
|
52
|
+
/**
|
|
53
|
+
* The grouping the figures are coloured by, whose colours the map writes;
|
|
54
|
+
* empty while nothing colours them.
|
|
55
|
+
*/
|
|
52
56
|
groups: ResolvedProjectionGroups;
|
|
53
57
|
}
|
|
54
58
|
|
|
@@ -83,10 +87,9 @@ export function projectionBarReadings(
|
|
|
83
87
|
];
|
|
84
88
|
}
|
|
85
89
|
if (tab === 'space') {
|
|
86
|
-
const coverage =
|
|
87
|
-
options.
|
|
88
|
-
|
|
89
|
-
: '';
|
|
90
|
+
const coverage = isColoured(options, groups)
|
|
91
|
+
? ellipseCoverageText(options.ellipse, 'space')
|
|
92
|
+
: '';
|
|
90
93
|
return [
|
|
91
94
|
{
|
|
92
95
|
key: bar.key.cloudGesture,
|
|
@@ -163,14 +166,14 @@ export function projectionChipSettings(
|
|
|
163
166
|
* Empty while the colour stands for nothing, so a bar that says `Nothing`
|
|
164
167
|
* does not carry a row of dots contradicting it.
|
|
165
168
|
* @param options - What the figure is showing.
|
|
166
|
-
* @param groups - The
|
|
169
|
+
* @param groups - The grouping the figures are coloured by.
|
|
167
170
|
* @returns The colours, in the order the figure draws them.
|
|
168
171
|
*/
|
|
169
172
|
function projectionGroupColors(
|
|
170
173
|
options: ProjectionOptions,
|
|
171
174
|
groups: ResolvedProjectionGroups,
|
|
172
175
|
): readonly string[] {
|
|
173
|
-
if (options
|
|
176
|
+
if (!isColoured(options, groups)) return NO_COLORS;
|
|
174
177
|
const colors: string[] = [];
|
|
175
178
|
for (const entry of groups.entries) colors.push(entry.color);
|
|
176
179
|
return colors;
|
|
@@ -195,7 +198,7 @@ function mapReadings(
|
|
|
195
198
|
groups: ResolvedProjectionGroups,
|
|
196
199
|
): readonly ProjectionReading[] {
|
|
197
200
|
const { bar, help } = copy;
|
|
198
|
-
const colored = options
|
|
201
|
+
const colored = isColoured(options, groups);
|
|
199
202
|
const coverage = ellipseCoverageText(options.ellipse);
|
|
200
203
|
return [
|
|
201
204
|
{
|
|
@@ -212,5 +215,18 @@ function mapReadings(
|
|
|
212
215
|
];
|
|
213
216
|
}
|
|
214
217
|
|
|
218
|
+
/**
|
|
219
|
+
* Whether the colour stands for a grouping at all.
|
|
220
|
+
* @param options - What the figure is showing.
|
|
221
|
+
* @param groups - The grouping the figures are coloured by.
|
|
222
|
+
* @returns `true` when the dots are painted by group.
|
|
223
|
+
*/
|
|
224
|
+
function isColoured(
|
|
225
|
+
options: ProjectionOptions,
|
|
226
|
+
groups: ResolvedProjectionGroups,
|
|
227
|
+
): boolean {
|
|
228
|
+
return options.colorBy !== NO_GROUPING && groups.entries.length > 0;
|
|
229
|
+
}
|
|
230
|
+
|
|
215
231
|
/** No colours at all, which is what an uncoloured map paints. */
|
|
216
232
|
const NO_COLORS: readonly string[] = [];
|
|
@@ -4,7 +4,10 @@ import type { OverlayTier } from '../../overlay/core/overlayTiers.ts';
|
|
|
4
4
|
import type { ProjectionCopy } from '../core/projectionCopy.ts';
|
|
5
5
|
import type { ProjectionOptions } from '../core/projectionOptions.ts';
|
|
6
6
|
import type { ProjectionResult } from '../core/projectionResult.ts';
|
|
7
|
-
import type {
|
|
7
|
+
import type {
|
|
8
|
+
ProjectionGrouping,
|
|
9
|
+
ResolvedProjectionGroups,
|
|
10
|
+
} from '../core/projectionSamples.ts';
|
|
8
11
|
import type { ProjectionTab } from '../core/projectionTabs.ts';
|
|
9
12
|
|
|
10
13
|
import { ProjectionMapControls } from './ProjectionMapControls.tsx';
|
|
@@ -50,8 +53,10 @@ interface ProjectionBarSlotsInput {
|
|
|
50
53
|
map: ProjectionMapView;
|
|
51
54
|
/** Every option, already made safe against the result. */
|
|
52
55
|
options: ProjectionOptions;
|
|
53
|
-
/** The
|
|
56
|
+
/** The grouping the figures are coloured by; empty while nothing colours them. */
|
|
54
57
|
groups: ResolvedProjectionGroups;
|
|
58
|
+
/** Every grouping the samples carry, which the pickers choose between. */
|
|
59
|
+
groupings: readonly ProjectionGrouping[];
|
|
55
60
|
/** The selected rows, as indices. */
|
|
56
61
|
selected: readonly number[];
|
|
57
62
|
/** Width of the viewer, in pixels. */
|
|
@@ -79,16 +84,14 @@ export function projectionBarSlots(
|
|
|
79
84
|
input: ProjectionBarSlotsInput,
|
|
80
85
|
): ProjectionBarSlots {
|
|
81
86
|
const { tab, result, copy, models, map, readings, tier } = input;
|
|
82
|
-
const { options, groups, selected, width, onChange } = input;
|
|
87
|
+
const { options, groups, groupings, selected, width, onChange } = input;
|
|
83
88
|
|
|
84
|
-
const
|
|
85
|
-
const
|
|
86
|
-
const shared = { options, onChange, copy, groupLabel: groups.label };
|
|
89
|
+
const colored = groups.entries.length > 0;
|
|
90
|
+
const shared = { options, onChange, copy, groupings };
|
|
87
91
|
|
|
88
92
|
if (tab === 'pairs') {
|
|
89
93
|
const pairs = {
|
|
90
94
|
...shared,
|
|
91
|
-
hasGroups,
|
|
92
95
|
axisCount: result.axes.length,
|
|
93
96
|
width,
|
|
94
97
|
};
|
|
@@ -102,7 +105,6 @@ export function projectionBarSlots(
|
|
|
102
105
|
const space = {
|
|
103
106
|
...shared,
|
|
104
107
|
result,
|
|
105
|
-
hasGroups,
|
|
106
108
|
selectedCount: selected.length,
|
|
107
109
|
onResetView: map.resetSpaceView,
|
|
108
110
|
onClearSelection: map.clearSelection,
|
|
@@ -144,7 +146,6 @@ export function projectionBarSlots(
|
|
|
144
146
|
const forMap = {
|
|
145
147
|
...shared,
|
|
146
148
|
result,
|
|
147
|
-
hasGroups,
|
|
148
149
|
selectedCount: selected.length,
|
|
149
150
|
onZoomToSelection: map.zoomToSelection,
|
|
150
151
|
onResetView: map.resetView,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* What the map's
|
|
2
|
+
* What the map's settings offer, in the lengths the bar needs.
|
|
3
3
|
*
|
|
4
4
|
* The same choices are written twice — once as bare shares on a value menu
|
|
5
5
|
* whose own heading already says what they are shares of, and once as whole
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
|
|
10
10
|
import type { OverlayOption } from '../../overlay/ui/OverlayRow.tsx';
|
|
11
11
|
import type { ProjectionCopy } from '../core/projectionCopy.ts';
|
|
12
|
-
import
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} from '../core/
|
|
12
|
+
import { resolveProjectionShapes } from '../core/projectionGroupings.ts';
|
|
13
|
+
import type { ProjectionOptions } from '../core/projectionOptions.ts';
|
|
14
|
+
import { NO_GROUPING } from '../core/projectionOptions.ts';
|
|
15
|
+
import type { ProjectionGrouping } from '../core/projectionSamples.ts';
|
|
16
16
|
|
|
17
17
|
import {
|
|
18
18
|
ellipseChoices,
|
|
@@ -21,19 +21,76 @@ import {
|
|
|
21
21
|
} from './projectionEllipse.ts';
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
|
-
* What the colour may stand for.
|
|
25
|
-
* @param
|
|
24
|
+
* What the colour may stand for: each grouping the samples carry, or nothing.
|
|
25
|
+
* @param groupings - The groupings the samples carry.
|
|
26
26
|
* @param uncoloured - What "the colour stands for nothing" reads.
|
|
27
|
-
* @returns The
|
|
27
|
+
* @returns The choices, in the order the groupings were handed in.
|
|
28
28
|
*/
|
|
29
29
|
export function projectionColourChoices(
|
|
30
|
-
|
|
30
|
+
groupings: readonly ProjectionGrouping[],
|
|
31
31
|
uncoloured: string,
|
|
32
|
-
):
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
): readonly OverlayOption[] {
|
|
33
|
+
const choices: OverlayOption[] = [];
|
|
34
|
+
for (const { id, label } of groupings) choices.push({ value: id, label });
|
|
35
|
+
choices.push({ value: NO_GROUPING, label: uncoloured });
|
|
36
|
+
return choices;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* What the shape may stand for: each grouping the samples carry, or nothing.
|
|
41
|
+
*
|
|
42
|
+
* A grouping the colour already stands for is kept in the list but greyed, as
|
|
43
|
+
* is one of more groups than there are shapes, so the reader sees why it cannot
|
|
44
|
+
* be picked rather than wondering where it went.
|
|
45
|
+
* @param groupings - The groupings the samples carry.
|
|
46
|
+
* @param options - What the figure is showing, whose colour is taken.
|
|
47
|
+
* @param rows - How many rows there are, which is what a grouping is cut over.
|
|
48
|
+
* @param copy - The words the viewer writes.
|
|
49
|
+
* @returns The choices, in the order the groupings were handed in.
|
|
50
|
+
*/
|
|
51
|
+
export function projectionShapeChoices(
|
|
52
|
+
groupings: readonly ProjectionGrouping[],
|
|
53
|
+
options: ProjectionOptions,
|
|
54
|
+
rows: number,
|
|
55
|
+
copy: ProjectionCopy,
|
|
56
|
+
): readonly OverlayOption[] {
|
|
57
|
+
const choices: OverlayOption[] = [];
|
|
58
|
+
for (const grouping of groupings) {
|
|
59
|
+
const { id, label } = grouping;
|
|
60
|
+
const reason =
|
|
61
|
+
id === options.colorBy
|
|
62
|
+
? copy.reason.shapeIsColour
|
|
63
|
+
: resolveProjectionShapes(grouping, rows) === null
|
|
64
|
+
? copy.reason.tooManyShapes
|
|
65
|
+
: undefined;
|
|
66
|
+
choices.push({
|
|
67
|
+
value: id,
|
|
68
|
+
label,
|
|
69
|
+
disabled: reason !== undefined,
|
|
70
|
+
title: reason,
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
choices.push({ value: NO_GROUPING, label: copy.bar.unshaped });
|
|
74
|
+
return choices;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* What changes when the colour is given to another grouping.
|
|
79
|
+
*
|
|
80
|
+
* A grouping drawn as the shape that is picked for the colour swaps places
|
|
81
|
+
* with it rather than being dropped, so the reader never loses one of the two
|
|
82
|
+
* groupings they were comparing by trading them round.
|
|
83
|
+
* @param options - What the figure is showing.
|
|
84
|
+
* @param colorBy - The grouping picked for the colour.
|
|
85
|
+
* @returns The options that change.
|
|
86
|
+
*/
|
|
87
|
+
export function projectionColourPatch(
|
|
88
|
+
options: ProjectionOptions,
|
|
89
|
+
colorBy: string,
|
|
90
|
+
): Partial<ProjectionOptions> {
|
|
91
|
+
return colorBy !== NO_GROUPING && colorBy === options.shapeBy
|
|
92
|
+
? { colorBy, shapeBy: options.colorBy }
|
|
93
|
+
: { colorBy };
|
|
37
94
|
}
|
|
38
95
|
|
|
39
96
|
/**
|