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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Where a map's samples land, and
|
|
2
|
+
* Where a map's samples land, and what a plot is handed to draw them.
|
|
3
3
|
*
|
|
4
4
|
* It sits beside the component rather than inside it because a plot has to
|
|
5
5
|
* know where its dots fall before it can decide where its controls may sit,
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import type { ChartViewport } from '../../chart/core/chartViewport.ts';
|
|
10
10
|
import type { MatrixLike } from '../../chart/core/matrix.ts';
|
|
11
|
-
import type {
|
|
11
|
+
import type { OverlaySampleShape } from '../../overlay/core/overlayMarks.ts';
|
|
12
12
|
import type { ScatterGroup } from '../../scatter/ui/scatterFigureProps.ts';
|
|
13
13
|
import type { ScatterMarker } from '../../scatter/ui/scatterPlotProps.ts';
|
|
14
14
|
import type { ProjectionMarker, ProjectionResult } from '../core/projectionResult.ts';
|
|
15
|
-
import type { ResolvedProjectionGroups } from '../core/projectionSamples.ts';
|
|
15
|
+
import type { ResolvedProjectionGroups, ResolvedProjectionShapes } from '../core/projectionSamples.ts';
|
|
16
16
|
/** Where every sample sits on the map, in the embedding's own units. */
|
|
17
17
|
export interface ProjectionMapCloud {
|
|
18
18
|
/** Horizontal coordinate of every sample, in row order. */
|
|
@@ -70,21 +70,6 @@ export declare function projectionMapDomain(scores: MatrixLike, column: number,
|
|
|
70
70
|
* @returns The frame, in the embedding's own units.
|
|
71
71
|
*/
|
|
72
72
|
export declare function projectionMapViewport(scores: MatrixLike, xColumn: number, yColumn: number, rows?: readonly number[], padding?: number): ChartViewport;
|
|
73
|
-
/**
|
|
74
|
-
* The corner of the map with the fewest dots under it.
|
|
75
|
-
*
|
|
76
|
-
* All four are offered. The chrome that asks is laid out inside the plot
|
|
77
|
-
* rectangle rather than over the figure's box, so no corner of it costs the
|
|
78
|
-
* reader an axis label, and the only thing left to weigh is how many samples
|
|
79
|
-
* each one would cover.
|
|
80
|
-
* @param cloud - Where every sample sits, in data units.
|
|
81
|
-
* @param xDomain - The range the horizontal axis covers.
|
|
82
|
-
* @param yDomain - The range the vertical axis covers.
|
|
83
|
-
* @param width - Width of the plot rectangle, in pixels.
|
|
84
|
-
* @param height - Its height.
|
|
85
|
-
* @returns The corner the card sits in.
|
|
86
|
-
*/
|
|
87
|
-
export declare function projectionMapCorner(cloud: ProjectionMapCloud, xDomain: readonly [number, number], yDomain: readonly [number, number], width: number, height: number): OverlayCorner;
|
|
88
73
|
/**
|
|
89
74
|
* The reference points of a result, placed on the two axes the map draws.
|
|
90
75
|
* @param markers - The reference points, in the embedding's own units.
|
|
@@ -100,6 +85,12 @@ export declare function projectionMapMarkers(markers: readonly ProjectionMarker[
|
|
|
100
85
|
* @returns One entry per group, in the order they are coloured.
|
|
101
86
|
*/
|
|
102
87
|
export declare function projectionScatterGroups(groups: ResolvedProjectionGroups): ScatterGroup[];
|
|
88
|
+
/**
|
|
89
|
+
* The shapes in the order a plot names them by index.
|
|
90
|
+
* @param shapes - The grouping the dots are shaped by, or `null`.
|
|
91
|
+
* @returns One shape per group, or nothing while every dot is a disc.
|
|
92
|
+
*/
|
|
93
|
+
export declare function projectionScatterShapes(shapes: ResolvedProjectionShapes | null): OverlaySampleShape[] | undefined;
|
|
103
94
|
/**
|
|
104
95
|
* What one axis of the map is called.
|
|
105
96
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projectionMapModel.d.ts","sourceRoot":"","sources":["../../../src/projection/ui/projectionMapModel.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"projectionMapModel.d.ts","sourceRoot":"","sources":["../../../src/projection/ui/projectionMapModel.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,KAAK,EACV,gBAAgB,EAChB,gBAAgB,EACjB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EACV,wBAAwB,EACxB,wBAAwB,EACzB,MAAM,8BAA8B,CAAC;AAEtC,wEAAwE;AACxE,MAAM,WAAW,kBAAkB;IACjC,2DAA2D;IAC3D,CAAC,EAAE,YAAY,CAAC;IAChB,8DAA8D;IAC9D,CAAC,EAAE,YAAY,CAAC;CACjB;AAED;;;;;GAKG;AACH,eAAO,MAAM,aAAa,sBAAsB,CAAC;AAEjD;;;GAGG;AACH,eAAO,MAAM,sBAAsB,IAAI,CAAC;AAExC;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,UAAU,EAClB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,GACd,kBAAkB,CASpB;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,UAAU,EAClB,MAAM,EAAE,MAAM,EACd,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,GACvB,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAI3B;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,UAAU,EAClB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,EACxB,OAAO,SAAiB,GACvB,aAAa,CAKf;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,SAAS,gBAAgB,EAAE,EACpC,MAAM,EAAE,wBAAwB,EAChC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,GACd,aAAa,EAAE,CAejB;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,wBAAwB,GAC/B,YAAY,EAAE,CAMhB;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,wBAAwB,GAAG,IAAI,GACtC,kBAAkB,EAAE,GAAG,SAAS,CAKlC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,gBAAgB,EACxB,KAAK,EAAE,MAAM,GACZ,MAAM,GAAG,SAAS,CAIpB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Where a map's samples land, and
|
|
2
|
+
* Where a map's samples land, and what a plot is handed to draw them.
|
|
3
3
|
*
|
|
4
4
|
* It sits beside the component rather than inside it because a plot has to
|
|
5
5
|
* know where its dots fall before it can decide where its controls may sit,
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { chartColumnExtent, chartPadExtent, } from "../../chart/core/chartExtent.js";
|
|
10
10
|
import { chartAxisTitle } from "../../chart/core/chartLabels.js";
|
|
11
|
-
import { emptiestCorner } from "../../overlay/core/emptiestCorner.js";
|
|
12
11
|
/**
|
|
13
12
|
* A dot, a marker or an average that stands for no group at all.
|
|
14
13
|
*
|
|
@@ -77,23 +76,6 @@ export function projectionMapViewport(scores, xColumn, yColumn, rows, padding =
|
|
|
77
76
|
y: withRoom(projectionMapDomain(scores, yColumn, rows), padding),
|
|
78
77
|
};
|
|
79
78
|
}
|
|
80
|
-
/**
|
|
81
|
-
* The corner of the map with the fewest dots under it.
|
|
82
|
-
*
|
|
83
|
-
* All four are offered. The chrome that asks is laid out inside the plot
|
|
84
|
-
* rectangle rather than over the figure's box, so no corner of it costs the
|
|
85
|
-
* reader an axis label, and the only thing left to weigh is how many samples
|
|
86
|
-
* each one would cover.
|
|
87
|
-
* @param cloud - Where every sample sits, in data units.
|
|
88
|
-
* @param xDomain - The range the horizontal axis covers.
|
|
89
|
-
* @param yDomain - The range the vertical axis covers.
|
|
90
|
-
* @param width - Width of the plot rectangle, in pixels.
|
|
91
|
-
* @param height - Its height.
|
|
92
|
-
* @returns The corner the card sits in.
|
|
93
|
-
*/
|
|
94
|
-
export function projectionMapCorner(cloud, xDomain, yDomain, width, height) {
|
|
95
|
-
return emptiestCorner(placeAlong(cloud.x, xDomain, width, false), placeAlong(cloud.y, yDomain, height, true), { width, height, cardWidth: CARD_WIDTH, cardHeight: CARD_HEIGHT });
|
|
96
|
-
}
|
|
97
79
|
/**
|
|
98
80
|
* The reference points of a result, placed on the two axes the map draws.
|
|
99
81
|
* @param markers - The reference points, in the embedding's own units.
|
|
@@ -131,6 +113,19 @@ export function projectionScatterGroups(groups) {
|
|
|
131
113
|
}
|
|
132
114
|
return plotted;
|
|
133
115
|
}
|
|
116
|
+
/**
|
|
117
|
+
* The shapes in the order a plot names them by index.
|
|
118
|
+
* @param shapes - The grouping the dots are shaped by, or `null`.
|
|
119
|
+
* @returns One shape per group, or nothing while every dot is a disc.
|
|
120
|
+
*/
|
|
121
|
+
export function projectionScatterShapes(shapes) {
|
|
122
|
+
if (shapes === null)
|
|
123
|
+
return undefined;
|
|
124
|
+
const list = [];
|
|
125
|
+
for (const entry of shapes.entries)
|
|
126
|
+
list.push(entry.shape);
|
|
127
|
+
return list;
|
|
128
|
+
}
|
|
134
129
|
/**
|
|
135
130
|
* What one axis of the map is called.
|
|
136
131
|
*
|
|
@@ -152,26 +147,6 @@ function withRoom(domain, padding) {
|
|
|
152
147
|
const extent = chartPadExtent({ min: domain[0], max: domain[1] }, padding);
|
|
153
148
|
return [extent.min, extent.max];
|
|
154
149
|
}
|
|
155
|
-
function placeAlong(values, domain, size, flip) {
|
|
156
|
-
const span = domain[1] - domain[0];
|
|
157
|
-
const factor = span === 0 ? 0 : size / span;
|
|
158
|
-
const pixels = new Float64Array(values.length);
|
|
159
|
-
for (let index = 0; index < values.length; index++) {
|
|
160
|
-
const along = ((values[index] ?? Number.NaN) - domain[0]) * factor;
|
|
161
|
-
pixels[index] = flip ? size - along : along;
|
|
162
|
-
}
|
|
163
|
-
return pixels;
|
|
164
|
-
}
|
|
165
|
-
/**
|
|
166
|
-
* How much of the plot the floating key is expected to cover.
|
|
167
|
-
*
|
|
168
|
-
* It is an estimate on purpose — the card has not been laid out when the
|
|
169
|
-
* corner is chosen — and it is the compact key's size rather than the roomier
|
|
170
|
-
* card the overlay domain assumes: a corner counted as three species wide
|
|
171
|
-
* would call a corner busy that the key never reaches.
|
|
172
|
-
*/
|
|
173
|
-
const CARD_WIDTH = 170;
|
|
174
|
-
const CARD_HEIGHT = 84;
|
|
175
150
|
/** Room left around a framed selection, as a share of its own span. */
|
|
176
151
|
const SELECTION_ROOM = 0.1;
|
|
177
152
|
//# sourceMappingURL=projectionMapModel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projectionMapModel.js","sourceRoot":"","sources":["../../../src/projection/ui/projectionMapModel.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,iBAAiB,EACjB,cAAc,GACf,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"projectionMapModel.js","sourceRoot":"","sources":["../../../src/projection/ui/projectionMapModel.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,iBAAiB,EACjB,cAAc,GACf,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAuBjE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,mBAAmB,CAAC;AAEjD;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC;AAExC;;;;;;;;;;GAUG;AACH,MAAM,UAAU,kBAAkB,CAChC,MAAkB,EAClB,OAAe,EACf,OAAe;IAEf,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;IACvC,MAAM,CAAC,GAAG,IAAI,YAAY,CAAC,KAAK,CAAC,CAAC;IAClC,MAAM,CAAC,GAAG,IAAI,YAAY,CAAC,KAAK,CAAC,CAAC;IAClC,KAAK,IAAI,GAAG,GAAG,CAAC,EAAE,GAAG,GAAG,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC;QACrC,CAAC,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;QAClC,CAAC,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IACpC,CAAC;IACD,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;AAClB,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,mBAAmB,CACjC,MAAkB,EAClB,MAAc,EACd,IAAwB;IAExB,MAAM,OAAO,GAAG,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC;IAC3E,MAAM,MAAM,GAAG,iBAAi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c,GAAG,GAAG,CAAC"}
|
|
@@ -14,7 +14,7 @@ import type { OrbitCamera } from '../../scatter3d/core/orbitCamera.ts';
|
|
|
14
14
|
import type { ProjectionCopy } from '../core/projectionCopy.ts';
|
|
15
15
|
import type { ProjectionOptions } from '../core/projectionOptions.ts';
|
|
16
16
|
import type { ProjectionResult } from '../core/projectionResult.ts';
|
|
17
|
-
import type { ResolvedProjectionGroups } from '../core/projectionSamples.ts';
|
|
17
|
+
import type { ResolvedProjectionGroups, ResolvedProjectionShapes } from '../core/projectionSamples.ts';
|
|
18
18
|
import type { SelectionReport } from './ProjectionMapCaption.tsx';
|
|
19
19
|
import type { ProjectionMapChrome } from './projectionMapChrome.ts';
|
|
20
20
|
/** What {@link useProjectionMapView} needs. */
|
|
@@ -25,6 +25,8 @@ interface ProjectionMapViewInput {
|
|
|
25
25
|
copy: ProjectionCopy;
|
|
26
26
|
/** The groups as every figure of this viewer draws them. */
|
|
27
27
|
groups: ResolvedProjectionGroups;
|
|
28
|
+
/** The grouping the dots are shaped by, or `null` while they are all discs. */
|
|
29
|
+
shapes: ResolvedProjectionShapes | null;
|
|
28
30
|
/** Every option, already made safe against the result. */
|
|
29
31
|
options: ProjectionOptions;
|
|
30
32
|
/** The selected rows, as indices into the score matrix. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projectionMapView.d.ts","sourceRoot":"","sources":["../../../src/projection/ui/projectionMapView.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAEvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAC/E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAEvE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,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E,WAAW,CAAC;IACpB,oBAAoB;IACpB,SAAS,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IACzC,sCAAsC;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,oBAAoB;IACpB,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,gFAAgF;IAChF,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,qFAAqF;IACrF,QAAQ,EAAE,aAAa,GAAG,IAAI,CAAC;IAC/B,mEAAmE;IACnE,WAAW,EAAE,CAAC,QAAQ,EAAE,aAAa,GAAG,IAAI,KAAK,IAAI,CAAC;IACtD,wEAAwE;IACxE,MAAM,EAAE,eAAe,GAAG,IAAI,CAAC;IAC/B,2DAA2D;IAC3D,MAAM,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;IAC1C,kDAAkD;IAClD,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,8CAA8C;IAC9C,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,2BAA2B;IAC3B,cAAc,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,sBAAsB,GAC5B,iBAAiB,CAgInB"}
|
|
@@ -11,8 +11,10 @@
|
|
|
11
11
|
import { useCallback, useMemo, useState } from 'react';
|
|
12
12
|
import { chartClampViewport } from "../../chart/core/chartViewport.js";
|
|
13
13
|
import { DEFAULT_ORBIT_CAMERA } from "../../scatter3d/core/orbitCamera.js";
|
|
14
|
-
import {
|
|
14
|
+
import { NO_GROUPING } from "../core/projectionOptions.js";
|
|
15
|
+
import { projectionMapChrome } from "./projectionMapChrome.js";
|
|
15
16
|
import { MINIMUM_OUTLINE_POINTS, projectionMapDomain, projectionMapViewport, } from "./projectionMapModel.js";
|
|
17
|
+
import { projectionSelectionSentence } from "./projectionSelectionSentence.js";
|
|
16
18
|
import { MINIMUM_SHELL_POINTS } from "./projectionSpaceModel.js";
|
|
17
19
|
/**
|
|
18
20
|
* The map's frame, its last report, and the words around it.
|
|
@@ -20,7 +22,7 @@ import { MINIMUM_SHELL_POINTS } from "./projectionSpaceModel.js";
|
|
|
20
22
|
* @returns See {@link ProjectionMapView}.
|
|
21
23
|
*/
|
|
22
24
|
export function useProjectionMapView(input) {
|
|
23
|
-
const { result, copy, groups, options, selected, onSettle } = input;
|
|
25
|
+
const { result, copy, groups, shapes, options, selected, onSettle } = input;
|
|
24
26
|
const { scores, fittedCount, markers } = result;
|
|
25
27
|
const { colorBy, ellipse, showGroupMeans, xAxis, yAxis } = options;
|
|
26
28
|
const [zoom, setZoom] = useState(null);
|
|
@@ -51,11 +53,12 @@ export function useProjectionMapView(input) {
|
|
|
51
53
|
setCamera(DEFAULT_ORBIT_CAMERA);
|
|
52
54
|
setCloudZoom(1);
|
|
53
55
|
}, []);
|
|
54
|
-
const colored = colorBy
|
|
56
|
+
const colored = colorBy !== NO_GROUPING && groups.entries.length > 0;
|
|
55
57
|
const chrome = useMemo(() => projectionMapChrome({
|
|
56
58
|
copy,
|
|
57
59
|
groups,
|
|
58
60
|
colored,
|
|
61
|
+
shapes,
|
|
59
62
|
ellipse: colored ? ellipse : null,
|
|
60
63
|
minimumPoints: MINIMUM_OUTLINE_POINTS,
|
|
61
64
|
showGroupMeans,
|
|
@@ -66,6 +69,7 @@ export function useProjectionMapView(input) {
|
|
|
66
69
|
copy,
|
|
67
70
|
groups,
|
|
68
71
|
colored,
|
|
72
|
+
shapes,
|
|
69
73
|
ellipse,
|
|
70
74
|
showGroupMeans,
|
|
71
75
|
markers,
|
|
@@ -76,6 +80,7 @@ export function useProjectionMapView(input) {
|
|
|
76
80
|
copy,
|
|
77
81
|
groups,
|
|
78
82
|
colored,
|
|
83
|
+
shapes,
|
|
79
84
|
ellipse: colored ? ellipse : null,
|
|
80
85
|
minimumPoints: MINIMUM_SHELL_POINTS,
|
|
81
86
|
showGroupMeans: false,
|
|
@@ -83,7 +88,7 @@ export function useProjectionMapView(input) {
|
|
|
83
88
|
fittedCount: fittedCount ?? scores.rows,
|
|
84
89
|
total: scores.rows,
|
|
85
90
|
figure: 'space',
|
|
86
|
-
}), [copy, groups, colored, ellipse, fittedCount, scores]);
|
|
91
|
+
}), [copy, groups, colored, shapes, ellipse, fittedCount, scores]);
|
|
87
92
|
const settle = useCallback((change) => {
|
|
88
93
|
setReport((previous) => ({
|
|
89
94
|
text: projectionSelectionSentence(copy, change.indices.length, scores.rows),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projectionMapView.js","sourceRoot":"","sources":["../../../src/projection/ui/projectionMapView.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAGvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"projectionMapView.js","sourceRoot":"","sources":["../../../src/projection/ui/projectionMapView.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAGvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAG3E,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAY3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAoDjE;;;;GAIG;AACH,M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cAAc;QACd,MAAM;QACN,MAAM;QACN,eAAe;QACf,SAAS;QACT,cAAc;KACf,CAAC;AACJ,CAAC;AAYD,MAAM,YAAY,GAAsB,EAAE,CAAC;AAC3C,MAAM,UAAU,GAAgC,EAAE,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ProjectionCopy } from '../core/projectionCopy.ts';
|
|
2
|
+
/**
|
|
3
|
+
* The sentence reporting what a gesture picked out.
|
|
4
|
+
* @param copy - The words the map writes.
|
|
5
|
+
* @param count - How many samples are selected.
|
|
6
|
+
* @param total - How many there are in all.
|
|
7
|
+
* @returns The sentence.
|
|
8
|
+
*/
|
|
9
|
+
export declare function projectionSelectionSentence(copy: ProjectionCopy, count: number, total: number): string;
|
|
10
|
+
//# sourceMappingURL=projectionSelectionSentence.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projectionSelectionSentence.d.ts","sourceRoot":"","sources":["../../../src/projection/ui/projectionSelectionSentence.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAEhE;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,cAAc,EACpB,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,GACZ,MAAM,CAMR"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { formatInteger } from "../../format/core/numbers.js";
|
|
2
|
+
import { fillCopy } from "../core/fillCopy.js";
|
|
3
|
+
/**
|
|
4
|
+
* The sentence reporting what a gesture picked out.
|
|
5
|
+
* @param copy - The words the map writes.
|
|
6
|
+
* @param count - How many samples are selected.
|
|
7
|
+
* @param total - How many there are in all.
|
|
8
|
+
* @returns The sentence.
|
|
9
|
+
*/
|
|
10
|
+
export function projectionSelectionSentence(copy, count, total) {
|
|
11
|
+
if (count === 0)
|
|
12
|
+
return copy.sentence.selectionNone;
|
|
13
|
+
return fillCopy(copy.sentence.selection, {
|
|
14
|
+
count: formatInteger(count),
|
|
15
|
+
total: formatInteger(total),
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=projectionSelectionSentence.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projectionSelectionSentence.js","sourceRoot":"","sources":["../../../src/projection/ui/projectionSelectionSentence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAG/C;;;;;;GAMG;AACH,MAAM,UAAU,2BAA2B,CACzC,IAAoB,EACpB,KAAa,EACb,KAAa;IAEb,IAAI,KAAK,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC;IACpD,OAAO,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE;QACvC,KAAK,EAAE,aAAa,CAAC,KAAK,CAAC;QAC3B,KAAK,EAAE,aAAa,CAAC,KAAK,CAAC;KAC5B,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the one hook every tab shares hands out.
|
|
3
|
+
*
|
|
4
|
+
* The type lives beside the hook rather than inside it because the hook is
|
|
5
|
+
* short and its answer is not: a reader looking for how the state is kept
|
|
6
|
+
* should not have to scroll past a page of documented fields to find it.
|
|
7
|
+
*/
|
|
8
|
+
import type { ScatterSelectionMode } from '../../scatter/core/scatterSelection.ts';
|
|
9
|
+
import type { SelectionChange } from '../../scatter/ui/useScatterSelection.ts';
|
|
10
|
+
import type { ProjectionOptions } from '../core/projectionOptions.ts';
|
|
11
|
+
import type { ProjectionGrouping, ResolvedProjectionGroups, ResolvedProjectionShapes } from '../core/projectionSamples.ts';
|
|
12
|
+
import type { ProjectionTab } from '../core/projectionTabs.ts';
|
|
13
|
+
import type { ProjectionSelection } from './projectionSelection.ts';
|
|
14
|
+
/** What every tab reads, and the five ways any of them changes it. */
|
|
15
|
+
export interface ProjectionStateApi {
|
|
16
|
+
/** The tabs this result can fill, in reading order. */
|
|
17
|
+
tabs: readonly ProjectionTab[];
|
|
18
|
+
/** The one showing. */
|
|
19
|
+
tab: ProjectionTab;
|
|
20
|
+
/** Move to another tab. One the result cannot fill is ignored. */
|
|
21
|
+
setTab: (tab: ProjectionTab) => void;
|
|
22
|
+
/**
|
|
23
|
+
* The grouping the dots are coloured by, resolved once per change; empty
|
|
24
|
+
* while the colour stands for nothing.
|
|
25
|
+
*/
|
|
26
|
+
groups: ResolvedProjectionGroups;
|
|
27
|
+
/**
|
|
28
|
+
* The grouping the dots are shaped by, resolved once per change, or `null`
|
|
29
|
+
* while they are all discs.
|
|
30
|
+
*/
|
|
31
|
+
shapes: ResolvedProjectionShapes | null;
|
|
32
|
+
/** Every grouping the samples carry, for the pickers that choose between them. */
|
|
33
|
+
groupings: readonly ProjectionGrouping[];
|
|
34
|
+
/** Every option, already made safe against the result. */
|
|
35
|
+
options: ProjectionOptions;
|
|
36
|
+
/** Change some of them; the rest are carried over and checked again. */
|
|
37
|
+
setOptions: (patch: Partial<ProjectionOptions>) => void;
|
|
38
|
+
/** The selected rows, as indices, which is what a plot draws. */
|
|
39
|
+
selected: readonly number[];
|
|
40
|
+
/** Settle a selection a plot's own gesture produced. */
|
|
41
|
+
settleSelection: (change: SelectionChange) => void;
|
|
42
|
+
/** Settle one from elsewhere — a legend entry, a table beside the figure. */
|
|
43
|
+
selectRows: (rows: readonly number[], mode: ScatterSelectionMode, source: ProjectionSelection['source']) => void;
|
|
44
|
+
/** Draw one pair of axes on the map, which is what a cell of the grid does. */
|
|
45
|
+
selectPair: (xAxis: number, yAxis: number) => void;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=projectionStateApi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projectionStateApi.d.ts","sourceRoot":"","sources":["../../../src/projection/ui/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IAAI,CAAC;IACV,+EAA+E;IAC/E,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACpD"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the one hook every tab shares hands out.
|
|
3
|
+
*
|
|
4
|
+
* The type lives beside the hook rather than inside it because the hook is
|
|
5
|
+
* short and its answer is not: a reader looking for how the state is kept
|
|
6
|
+
* should not have to scroll past a page of documented fields to find it.
|
|
7
|
+
*/
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=projectionStateApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projectionStateApi.js","sourceRoot":"","sources":["../../../src/projection/ui/projectionStateApi.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projectionTabModels.js","sourceRoot":"","sources":["../../../src/projection/ui/projectionTabModels.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAIhC,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7D,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAqC7D;;;;GAIG;AACH,MAAM,UAAU,mBAAmB,CACjC,KAA4B;IAE5B,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAC3D,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;IACtC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;IAE1C,MAAM,GAAG,GAAG,QAAQ,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,C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C,WAAW,CAAC,CAC5B,CAAC;IAEF,OAAO;QACL,QAAQ;QACR,MAAM;QACN,UAAU,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,OAAO,GAAG,GAAG,CAAC,EAAE;KAC1E,CAAC;AACJ,CAAC;AAED;;;;;;GAMG;AACH,SAAS,SAAS,CAAC,MAAkB,EAAE,GAAW,EAAE,KAAa;IAC/D,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;IAC5D,MAAM,MAAM,GAAG,IAAI,KAAK,CAAS,MAAM,CAAC,CAAC;IACzC,KAAK,IAAI,MAAM,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC;QAC/C,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IAC3C,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { SelectionChange } from '../../scatter/ui/useScatterSelection.ts';
|
|
3
|
-
import type { ProjectionOptions } from '../core/projectionOptions.ts';
|
|
4
|
-
import type { ResolvedProjectionGroups } from '../core/projectionSamples.ts';
|
|
5
|
-
import type { ProjectionTab } from '../core/projectionTabs.ts';
|
|
6
|
-
import type { ProjectionSelection } from './projectionSelection.ts';
|
|
1
|
+
import type { ProjectionStateApi } from './projectionStateApi.ts';
|
|
7
2
|
import type { ProjectionViewerProps } from './projectionViewerProps.ts';
|
|
8
3
|
/**
|
|
9
4
|
* What {@link useProjectionState} needs: the run, the rows, and the three
|
|
@@ -14,29 +9,6 @@ import type { ProjectionViewerProps } from './projectionViewerProps.ts';
|
|
|
14
9
|
* hook actually applies and the two cannot drift apart.
|
|
15
10
|
*/
|
|
16
11
|
type ProjectionStateOptions = Pick<ProjectionViewerProps, 'result' | 'samples' | 'tab' | 'defaultTab' | 'onTabChange' | 'selected' | 'defaultSelected' | 'onSelectionChange' | 'options' | 'panels' | 'defaultOptions' | 'onOptionsChange'>;
|
|
17
|
-
/** What every tab reads, and the five ways any of them changes it. */
|
|
18
|
-
export interface ProjectionStateApi {
|
|
19
|
-
/** The tabs this result can fill, in reading order. */
|
|
20
|
-
tabs: readonly ProjectionTab[];
|
|
21
|
-
/** The one showing. */
|
|
22
|
-
tab: ProjectionTab;
|
|
23
|
-
/** Move to another tab. One the result cannot fill is ignored. */
|
|
24
|
-
setTab: (tab: ProjectionTab) => void;
|
|
25
|
-
/** The groups as every figure draws them, resolved once per change. */
|
|
26
|
-
groups: ResolvedProjectionGroups;
|
|
27
|
-
/** Every option, already made safe against the result. */
|
|
28
|
-
options: ProjectionOptions;
|
|
29
|
-
/** Change some of them; the rest are carried over and checked again. */
|
|
30
|
-
setOptions: (patch: Partial<ProjectionOptions>) => void;
|
|
31
|
-
/** The selected rows, as indices, which is what a plot draws. */
|
|
32
|
-
selected: readonly number[];
|
|
33
|
-
/** Settle a selection a plot's own gesture produced. */
|
|
34
|
-
settleSelection: (change: SelectionChange) => void;
|
|
35
|
-
/** Settle one from elsewhere — a legend entry, a table beside the figure. */
|
|
36
|
-
selectRows: (rows: readonly number[], mode: ScatterSelectionMode, source: ProjectionSelection['source']) => void;
|
|
37
|
-
/** Draw one pair of axes on the map, which is what a cell of the grid does. */
|
|
38
|
-
selectPair: (xAxis: number, yAxis: number) => void;
|
|
39
|
-
}
|
|
40
12
|
/**
|
|
41
13
|
* The tab, the pair of axes, the selection and the options, controlled or not.
|
|
42
14
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useProjectionState.d.ts","sourceRoot":"","sources":["../../../src/projection/ui/useProjectionState.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useProjectionState.d.ts","sourceRoot":"","sources":["../../../src/projection/ui/useProjectionState.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAExE;;;;;;;GAOG;AACH,KAAK,sBAAsB,GAAG,IAAI,CAChC,qBAAqB,EACnB,QAAQ,GACR,SAAS,GACT,KAAK,GACL,YAAY,GACZ,aAAa,GACb,UAAU,GACV,iBAAiB,GACjB,mBAAmB,GACnB,SAAS,GACT,QAAQ,GACR,gBAAgB,GAChB,iBAAiB,CACpB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,sBAAsB,GAC9B,kBAAkB,CA0HpB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useCallback, useMemo, useState } from 'react';
|
|
2
|
-
import { resolveProjectionGroups } from "../core/
|
|
2
|
+
import { projectionGrouping, resolveProjectionGroups, resolveProjectionShapes, } from "../core/projectionGroupings.js";
|
|
3
3
|
import { projectionTabs } from "../core/projectionTabs.js";
|
|
4
4
|
import { resolveProjectionOptions } from "../core/resolveProjectionOptions.js";
|
|
5
5
|
import { indexProjectionIds, projectionNamesOf, projectionRowsOf, } from "./projectionSelection.js";
|
|
@@ -33,8 +33,12 @@ export function useProjectionState(options) {
|
|
|
33
33
|
const [ownTab, setOwnTab] = useState(defaultTab);
|
|
34
34
|
const [ownSelected, setOwnSelected] = useState(() => projectionRowsOf(defaultSelected, rowOfId));
|
|
35
35
|
const [ownOptions, setOwnOptions] = useState(() => defaultOptions ?? {});
|
|
36
|
-
const
|
|
37
|
-
const settled = useMemo(() => resolveProjectionOptions(heldOptions ?? ownOptions, result), [heldOptions, ownOptions, result]);
|
|
36
|
+
const groupings = samples.groupings ?? NO_GROUPINGS;
|
|
37
|
+
const settled = useMemo(() => resolveProjectionOptions(heldOptions ?? ownOptions, result, groupings), [groupings, heldOptions, ownOptions, result]);
|
|
38
|
+
const { colorBy, shapeBy } = settled;
|
|
39
|
+
const rowCount = result.scores.rows;
|
|
40
|
+
const groups = useMemo(() => resolveProjectionGroups(projectionGrouping(samples, colorBy), rowCount), [colorBy, rowCount, samples]);
|
|
41
|
+
const shapes = useMemo(() => resolveProjectionShapes(projectionGrouping(samples, shapeBy), rowCount), [rowCount, samples, shapeBy]);
|
|
38
42
|
const setTab = useCallback((wanted) => {
|
|
39
43
|
const reachable = inReach(wanted, tabs);
|
|
40
44
|
if (reachable === undefined)
|
|
@@ -44,11 +48,11 @@ export function useProjectionState(options) {
|
|
|
44
48
|
onTabChange?.(reachable);
|
|
45
49
|
}, [onTabChange, tab, tabs]);
|
|
46
50
|
const setOptions = useCallback((patch) => {
|
|
47
|
-
const next = resolveProjectionOptions({ ...settled, ...patch }, result);
|
|
51
|
+
const next = resolveProjectionOptions({ ...settled, ...patch }, result, groupings);
|
|
48
52
|
if (heldOptions === undefined)
|
|
49
53
|
setOwnOptions(next);
|
|
50
54
|
onOptionsChange?.(next);
|
|
51
|
-
}, [heldOptions, onOptionsChange, result, settled]);
|
|
55
|
+
}, [groupings, heldOptions, onOptionsChange, result, settled]);
|
|
52
56
|
const selectRows = useCallback((rows, mode, source) => {
|
|
53
57
|
if (selected === undefined)
|
|
54
58
|
setOwnSelected(rows);
|
|
@@ -74,6 +78,8 @@ export function useProjectionState(options) {
|
|
|
74
78
|
tab: inReach(tab, tabs) ?? inReach(ownTab, tabs) ?? tabs[0] ?? 'map',
|
|
75
79
|
setTab,
|
|
76
80
|
groups,
|
|
81
|
+
shapes,
|
|
82
|
+
groupings,
|
|
77
83
|
options: settled,
|
|
78
84
|
setOptions,
|
|
79
85
|
selected: selected === undefined
|
|
@@ -104,4 +110,6 @@ function inReach(wanted, tabs) {
|
|
|
104
110
|
}
|
|
105
111
|
return undefined;
|
|
106
112
|
}
|
|
113
|
+
/** No groupings at all, shared so an absent list keeps one identity. */
|
|
114
|
+
const NO_GROUPINGS = [];
|
|
107
115
|
//# sourceMappingURL=useProjectionState.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useProjectionState.js","sourceRoot":"","sources":["../../../src/projection/ui/useProjectionState.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"useProjectionState.js","sourceRoot":"","sources":["../../../src/projection/ui/useProjectionState.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAIvD,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,gCAAgC,CAAC;AAIxC,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAG/E,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,0BAA0B,CAAC;AA4BlC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,kBAAkB,CAChC,OAA+B;IAE/B,MAAM,EACJ,MAAM,EACN,OAAO,EACP,GAAG,EACH,UAAU,EACV,WAAW,EACX,QAAQ,EACR,eAAe,EACf,iBAAiB,EACjB,OAAO,EAAE,WAAW,EACpB,cAAc,EACd,eAAe,EACf,MAAM,GACP,GAAG,OAAO,CAAC;IAEZ,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC;IACxB,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC7E,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,kBAAkB,CAAC,GAAG,CAAC,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Aa,EAAE,KAAa,EAAE,EAAE;QAC/B,UAAU,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;QAC7B,MAAM,CAAC,KAAK,CAAC,CAAC;IAChB,CAAC,EACD,CAAC,UAAU,EAAE,MAAM,CAAC,CACrB,CAAC;IAEF,OAAO;QACL,IAAI;QACJ,uEAAuE;QACvE,2EAA2E;QAC3E,gEAAgE;QAChE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,KAAK;QACpE,MAAM;QACN,MAAM;QACN,MAAM;QACN,SAAS;QACT,OAAO,EAAE,OAAO;QAChB,UAAU;QACV,QAAQ,EACN,QAAQ,KAAK,SAAS;YACpB,CAAC,CAAC,WAAW;YACb,CAAC,CAAC,gBAAgB,CAAC,QAAQ,EAAE,OAAO,CAAC;QACzC,eAAe;QACf,UAAU;QACV,UAAU;KACX,CAAC;AACJ,CAAC;AAED;;;;;;;;;;GAUG;AACH,SAAS,OAAO,CACd,MAAiC,EACjC,IAA8B;IAE9B,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC3C,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,IAAI,GAAG,KAAK,MAAM;YAAE,OAAO,MAAM,CAAC;IACpC,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,wEAAwE;AACxE,MAAM,YAAY,GAAkC,EAAE,CAAC"}
|
|
@@ -19,6 +19,7 @@ export { ellipsePolygon, projectEllipse } from './ellipseProjection.ts';
|
|
|
19
19
|
export type { LassoPath } from './lassoPath.ts';
|
|
20
20
|
export { appendLassoPoint, createLassoPath, lassoPathData, resetLassoPath, } from './lassoPath.ts';
|
|
21
21
|
export { pointInPolygon, pointsInPolygon, polygonBounds } from './polygon.ts';
|
|
22
|
+
export { pointShapePath } from './pointShape.ts';
|
|
22
23
|
export type { ScatterGroupMoments } from './scatterGroupMoments.ts';
|
|
23
24
|
export type { ScatterGroupSpread, ScatterGroupSpreadOptions, } from './scatterGroupSpread.ts';
|
|
24
25
|
export { scatterGroupSpread, scatterPairEllipse, scatterSkippedGroups, } from './scatterGroupSpread.ts';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/scatter/core/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,YAAY,EACV,iBAAiB,EACjB,wBAAwB,EACxB,mBAAmB,EACnB,YAAY,EACZ,WAAW,EACX,4BAA4B,GAC7B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,iBAAiB,EACjB,yBAAyB,GAC1B,MAAM,wBAAwB,CAAC;AAChC,YAAY,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EACL,6BAA6B,EAC7B,6BAA6B,GAC9B,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxE,YAAY,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,cAAc,GACf,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC9E,YAAY,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACpE,YAAY,EACV,kBAAkB,EAClB,yBAAyB,GAC1B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EAAE,oBAAoB,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AkB,EAClB,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,oBAAoB,GACrB,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -15,6 +15,7 @@ export { coverageForStandardDeviations, standardDeviationsForCoverage, } from ".
|
|
|
15
15
|
export { ellipsePolygon, projectEllipse } from "./ellipseProjection.js";
|
|
16
16
|
export { appendLassoPoint, createLassoPath, lassoPathData, resetLassoPath, } from "./lassoPath.js";
|
|
17
17
|
export { pointInPolygon, pointsInPolygon, polygonBounds } from "./polygon.js";
|
|
18
|
+
export { pointShapePath } from "./pointShape.js";
|
|
18
19
|
export { scatterGroupSpread, scatterPairEllipse, scatterSkippedGroups, } from "./scatterGroupSpread.js";
|
|
19
20
|
export { mergeScatterSelection, scatterSelectedIndices, scatterSelectionMask, } from "./scatterSelection.js";
|
|
20
21
|
export { nearestPointIndex, pointsWithinBounds } from "./screenPoints.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/scatter/core/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAUH,OAAO,EACL,iBAAiB,EACjB,yBAAyB,GAC1B,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EACL,6BAA6B,EAC7B,6BAA6B,GAC9B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExE,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,cAAc,GACf,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/scatter/core/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAUH,OAAO,EACL,iBAAiB,EACjB,yBAAyB,GAC1B,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EACL,6BAA6B,EAC7B,6BAA6B,GAC9B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExE,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,cAAc,GACf,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAMjD,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,oBAAoB,GACrB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { OverlayMarkShape } from '../../overlay/core/overlayMarks.ts';
|
|
2
|
+
/**
|
|
3
|
+
* The outline of a mark drawn as a filled polygon — a sample shaped by a
|
|
4
|
+
* second grouping, or a marker drawn in one of those shapes — as SVG path data.
|
|
5
|
+
*
|
|
6
|
+
* Every shape covers the area of the disc it stands in for. The eye weighs a
|
|
7
|
+
* mark by its ink, so a square drawn in the disc's own box would make its
|
|
8
|
+
* group read as the heavier one — which is a claim about the data that nothing
|
|
9
|
+
* in the data supports.
|
|
10
|
+
* @param shape - The shape.
|
|
11
|
+
* @param x - Horizontal centre, in pixels.
|
|
12
|
+
* @param y - Vertical centre, in pixels.
|
|
13
|
+
* @param radius - Radius of the disc the shape stands in for, in pixels.
|
|
14
|
+
* @returns The path data, or `null` for a disc, which is drawn as a circle,
|
|
15
|
+
* and for every mark that is not a filled polygon.
|
|
16
|
+
*/
|
|
17
|
+
export declare function pointShapePath(shape: OverlayMarkShape, x: number, y: number, radius: number): string | null;
|
|
18
|
+
//# sourceMappingURL=pointShape.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pointShape.d.ts","sourceRoot":"","sources":["../../../src/scatter/core/pointShape.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAE3E;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,gBAAgB,EACvB,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,MAAM,EAAE,MAAM,GACb,MAAM,GAAG,IAAI,CAiCf"}
|